bi-components-library 1.0.73 → 1.0.74

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,15 +1,15 @@
1
- import { jsx as L, jsxs as me, Fragment as vn } from "react/jsx-runtime";
2
- import xn, { useState as ce, useRef as te, useMemo as $t, useCallback as de, useEffect as ye, useLayoutEffect as Ye } from "react";
3
- import { Button as He, Card as Et, Modal as wn, Table as Ct, Flex as Gt, Spin as kn, Empty as $n, Select as dt, Form as st, Input as Ut, Space as En, DatePicker as Cn, message as Sn, Dropdown as Tn, Tooltip as Nn, Progress as qn, Pagination as An, theme as _n } from "antd";
4
- import { createFromIconfontCN as Ln, LeftOutlined as In, SearchOutlined as Mn, ReloadOutlined as Dn, InfoCircleOutlined as Bn, SendOutlined as Hn, PauseCircleOutlined as Pn, PlayCircleOutlined as Vn } from "@ant-design/icons";
5
- import { createPortal as St } from "react-dom";
6
- const Rn = ({
1
+ import { jsx as L, jsxs as ue, Fragment as Tn } from "react/jsx-runtime";
2
+ import Sn, { useState as oe, useRef as te, useMemo as qt, useCallback as ce, useEffect as fe, useLayoutEffect as Je } from "react";
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
+ 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
+ import { createPortal as Lt } from "react-dom";
6
+ const Wn = ({
7
7
  variant: t = "primary",
8
8
  loading: y = !1,
9
9
  children: s,
10
10
  ...o
11
11
  }) => /* @__PURE__ */ L(
12
- He,
12
+ Pe,
13
13
  {
14
14
  ...o,
15
15
  type: ((T) => {
@@ -33,7 +33,7 @@ const Rn = ({
33
33
  children: s
34
34
  }
35
35
  );
36
- Rn.__docgenInfo = {
36
+ Wn.__docgenInfo = {
37
37
  displayName: "Button",
38
38
  description: "基础按钮,用于触发操作",
39
39
  props: {
@@ -77,7 +77,7 @@ Rn.__docgenInfo = {
77
77
  }
78
78
  }
79
79
  };
80
- const On = ({
80
+ const Un = ({
81
81
  title: t,
82
82
  children: y,
83
83
  bordered: s = !0,
@@ -85,7 +85,7 @@ const On = ({
85
85
  size: b = "default",
86
86
  ...T
87
87
  }) => /* @__PURE__ */ L(
88
- Et,
88
+ At,
89
89
  {
90
90
  ...T,
91
91
  title: t,
@@ -95,7 +95,7 @@ const On = ({
95
95
  children: y
96
96
  }
97
97
  );
98
- On.__docgenInfo = {
98
+ Un.__docgenInfo = {
99
99
  displayName: "Card",
100
100
  description: "卡片容器,用于分组内容",
101
101
  props: {
@@ -146,23 +146,23 @@ On.__docgenInfo = {
146
146
  }
147
147
  }
148
148
  };
149
- const Gn = ({
149
+ const Kn = ({
150
150
  showDefaultFooter: t = !0,
151
151
  ...y
152
152
  }) => {
153
- const s = y.footer !== void 0 ? y.footer : t ? (o, { OkBtn: b, CancelBtn: T }) => /* @__PURE__ */ me(vn, { children: [
153
+ const s = y.footer !== void 0 ? y.footer : t ? (o, { OkBtn: b, CancelBtn: T }) => /* @__PURE__ */ ue(Tn, { children: [
154
154
  /* @__PURE__ */ L(b, {}),
155
155
  /* @__PURE__ */ L(T, {})
156
156
  ] }) : null;
157
157
  return /* @__PURE__ */ L(
158
- wn,
158
+ Nn,
159
159
  {
160
160
  ...y,
161
161
  footer: s
162
162
  }
163
163
  );
164
164
  };
165
- Gn.__docgenInfo = {
165
+ Kn.__docgenInfo = {
166
166
  displayName: "AppModal",
167
167
  description: "应用级模态框组件,基于 Ant Design Modal 封装",
168
168
  props: {
@@ -223,13 +223,13 @@ Gn.__docgenInfo = {
223
223
  }
224
224
  }
225
225
  };
226
- const Fn = ({
226
+ const Xn = ({
227
227
  scrollX: t,
228
228
  showPagination: y = !0,
229
229
  defaultPageSize: s = 10,
230
230
  ...o
231
231
  }) => /* @__PURE__ */ L(
232
- Ct,
232
+ _t,
233
233
  {
234
234
  ...o,
235
235
  scroll: {
@@ -245,7 +245,7 @@ const Fn = ({
245
245
  } : !1
246
246
  }
247
247
  );
248
- Fn.__docgenInfo = {
248
+ Xn.__docgenInfo = {
249
249
  displayName: "PageTable",
250
250
  description: "页面级表格组件,高度铺满容器,自动滚动",
251
251
  props: {
@@ -295,9 +295,9 @@ Fn.__docgenInfo = {
295
295
  }
296
296
  }
297
297
  };
298
- const zn = Ln({
298
+ const Jn = Vn({
299
299
  scriptUrl: ["//at.alicdn.com/t/c/font_5037819_a72xy7yjoj.js"]
300
- }), Yn = ({
300
+ }), Qn = ({
301
301
  name: t,
302
302
  size: y,
303
303
  color: s,
@@ -310,7 +310,7 @@ const zn = Ln({
310
310
  ...o
311
311
  };
312
312
  return /* @__PURE__ */ L(
313
- zn,
313
+ Jn,
314
314
  {
315
315
  ...b,
316
316
  type: t,
@@ -318,7 +318,7 @@ const zn = Ln({
318
318
  }
319
319
  );
320
320
  };
321
- Yn.__docgenInfo = {
321
+ Qn.__docgenInfo = {
322
322
  displayName: "XcIcon",
323
323
  description: "自定义图标组件,基于 iconfont",
324
324
  props: {
@@ -354,33 +354,33 @@ Yn.__docgenInfo = {
354
354
  }
355
355
  }
356
356
  };
357
- const jn = ({
357
+ const Zn = ({
358
358
  loading: t,
359
359
  description: y = "暂无数据",
360
360
  className: s,
361
361
  emptyChildren: o,
362
362
  loadingText: b,
363
363
  emptyImage: T
364
- }) => t ? /* @__PURE__ */ me(
365
- Gt,
364
+ }) => t ? /* @__PURE__ */ ue(
365
+ Kt,
366
366
  {
367
367
  className: `pt-10 w-full ${s || ""}`,
368
368
  align: "center",
369
369
  justify: "center",
370
370
  vertical: !0,
371
371
  children: [
372
- /* @__PURE__ */ L(kn, { size: "large" }),
372
+ /* @__PURE__ */ L(qn, { size: "large" }),
373
373
  b && /* @__PURE__ */ L("div", { className: "mt-4 text-gray-500", children: b })
374
374
  ]
375
375
  }
376
376
  ) : /* @__PURE__ */ L(
377
- Gt,
377
+ Kt,
378
378
  {
379
379
  className: `pt-10 w-full ${s || ""}`,
380
380
  align: "center",
381
381
  justify: "center",
382
382
  children: /* @__PURE__ */ L(
383
- $n,
383
+ An,
384
384
  {
385
385
  image: T,
386
386
  description: y,
@@ -390,7 +390,7 @@ const jn = ({
390
390
  )
391
391
  }
392
392
  );
393
- jn.__docgenInfo = {
393
+ Zn.__docgenInfo = {
394
394
  displayName: "EmptyAndSpin",
395
395
  description: "空状态和加载状态组合组件",
396
396
  props: {
@@ -433,24 +433,24 @@ jn.__docgenInfo = {
433
433
  }
434
434
  }
435
435
  };
436
- const Wn = ({
436
+ const er = ({
437
437
  onClick: t,
438
438
  showText: y = !1,
439
439
  className: s,
440
440
  size: o = "small",
441
441
  type: b = "default"
442
442
  }) => /* @__PURE__ */ L(
443
- He,
443
+ Pe,
444
444
  {
445
445
  size: o,
446
446
  type: b,
447
- icon: /* @__PURE__ */ L(In, {}),
447
+ icon: /* @__PURE__ */ L(Rn, {}),
448
448
  className: `cursor-pointer ${s || ""}`,
449
449
  onClick: t,
450
450
  children: y && "返回"
451
451
  }
452
452
  );
453
- Wn.__docgenInfo = {
453
+ er.__docgenInfo = {
454
454
  displayName: "BackButton",
455
455
  description: "返回按钮组件",
456
456
  props: {
@@ -489,14 +489,14 @@ Wn.__docgenInfo = {
489
489
  }
490
490
  }
491
491
  };
492
- const Un = ({
492
+ const tr = ({
493
493
  removePadding: t = !0,
494
494
  className: y,
495
495
  ...s
496
496
  }) => {
497
497
  const o = t ? `px-0 h-auto ${y || ""}` : y;
498
498
  return /* @__PURE__ */ L(
499
- He,
499
+ Pe,
500
500
  {
501
501
  type: "link",
502
502
  ...s,
@@ -505,7 +505,7 @@ const Un = ({
505
505
  }
506
506
  );
507
507
  };
508
- Un.__docgenInfo = {
508
+ tr.__docgenInfo = {
509
509
  displayName: "LinkButton",
510
510
  description: "链接样式按钮组件,适用于表格操作列",
511
511
  props: {
@@ -542,7 +542,7 @@ Un.__docgenInfo = {
542
542
  }
543
543
  }
544
544
  };
545
- const { Option: Kn } = dt, Xn = ({
545
+ const { Option: nr } = gt, rr = ({
546
546
  columns: t,
547
547
  request: y,
548
548
  searchFields: s = [],
@@ -552,119 +552,119 @@ const { Option: Kn } = dt, Xn = ({
552
552
  pageSizeOptions: I = ["10", "20", "50", "100"],
553
553
  autoLoad: A = !0,
554
554
  externalParams: $ = {},
555
- ...C
555
+ ...E
556
556
  }) => {
557
- const [N, w] = ce([]), [P, k] = ce(!1), [e, n] = ce({
557
+ const [S, w] = oe([]), [V, k] = oe(!1), [e, n] = oe({
558
558
  current: 1,
559
559
  pageSize: T,
560
560
  total: 0
561
- }), [r, d] = ce({}), [c, M] = ce({}), [S] = st.useForm(), F = te(e);
561
+ }), [r, u] = oe({}), [d, D] = oe({}), [C] = pt.useForm(), F = te(e);
562
562
  F.current = e;
563
563
  const Y = te($);
564
564
  Y.current = $;
565
- const z = te(!1), O = $t(() => t.map((u) => {
566
- const { sortable: p, render: v, ...D } = u;
565
+ const z = te(!1), O = qt(() => t.map((p) => {
566
+ const { sortable: c, render: v, ...P } = p;
567
567
  return {
568
- ...D,
569
- sorter: p ? !0 : void 0,
568
+ ...P,
569
+ sorter: c ? !0 : void 0,
570
570
  render: v || ((B) => B)
571
571
  };
572
- }), [t]), V = de(async (u = {}) => {
572
+ }), [t]), _ = ce(async (p = {}) => {
573
573
  if (y) {
574
574
  k(!0);
575
575
  try {
576
- const p = {
576
+ const c = {
577
577
  page: F.current.current,
578
578
  pageSize: F.current.pageSize,
579
- sortField: c.field,
580
- sortOrder: c.order,
579
+ sortField: d.field,
580
+ sortOrder: d.order,
581
581
  searchParams: { ...r, ...Y.current },
582
- ...u
583
- }, v = await y(p);
584
- v.success && (w(v.data), n((D) => ({
585
- ...D,
582
+ ...p
583
+ }, v = await y(c);
584
+ v.success && (w(v.data), n((P) => ({
585
+ ...P,
586
586
  total: v.total,
587
- current: p.page || D.current
587
+ current: c.page || P.current
588
588
  })));
589
- } catch (p) {
590
- console.error("加载数据失败:", p);
589
+ } catch (c) {
590
+ console.error("加载数据失败:", c);
591
591
  } finally {
592
592
  k(!1);
593
593
  }
594
594
  }
595
- }, [y, c, r]), G = de((u) => {
596
- d(u), n((p) => ({ ...p, current: 1 }));
597
- }, []), _ = de(() => {
598
- S.resetFields(), d({}), n((u) => ({ ...u, current: 1 }));
599
- }, [S]), R = de(() => {
600
- V();
601
- }, [V]), J = de((u, p, v) => {
602
- const D = {
603
- current: u.current || 1,
604
- pageSize: u.pageSize || T,
605
- total: u.total || 0
595
+ }, [y, d, r]), G = ce((p) => {
596
+ u(p), n((c) => ({ ...c, current: 1 }));
597
+ }, []), M = ce(() => {
598
+ C.resetFields(), u({}), n((p) => ({ ...p, current: 1 }));
599
+ }, [C]), R = ce(() => {
600
+ _();
601
+ }, [_]), X = ce((p, c, v) => {
602
+ const P = {
603
+ current: p.current || 1,
604
+ pageSize: p.pageSize || T,
605
+ total: p.total || 0
606
606
  }, B = {
607
607
  field: v?.field,
608
608
  order: v?.order
609
609
  };
610
- n(D), M(B);
610
+ n(P), D(B);
611
611
  }, [T]);
612
- return ye(() => {
613
- const u = Object.keys($).length > 0;
614
- (A && !z.current || u) && (V(), z.current = !0);
615
- }, [A, $, V]), /* @__PURE__ */ me("div", { children: [
616
- o && s.length > 0 && /* @__PURE__ */ L(Et, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ me(
617
- st,
612
+ return fe(() => {
613
+ const p = Object.keys($).length > 0;
614
+ (A && !z.current || p) && (_(), z.current = !0);
615
+ }, [A, $, _]), /* @__PURE__ */ ue("div", { children: [
616
+ o && s.length > 0 && /* @__PURE__ */ L(At, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ ue(
617
+ pt,
618
618
  {
619
- form: S,
619
+ form: C,
620
620
  layout: "inline",
621
621
  onFinish: G,
622
- initialValues: s.reduce((u, p) => (p.defaultValue !== void 0 && (u[p.key] = p.defaultValue), u), {}),
622
+ initialValues: s.reduce((p, c) => (c.defaultValue !== void 0 && (p[c.key] = c.defaultValue), p), {}),
623
623
  children: [
624
- s.map((u) => /* @__PURE__ */ L(st.Item, { name: u.key, label: u.label, children: u.type === "input" ? /* @__PURE__ */ L(
625
- Ut,
624
+ s.map((p) => /* @__PURE__ */ L(pt.Item, { name: p.key, label: p.label, children: p.type === "input" ? /* @__PURE__ */ L(
625
+ tn,
626
626
  {
627
- placeholder: u.placeholder || `请输入${u.label}`,
627
+ placeholder: p.placeholder || `请输入${p.label}`,
628
628
  style: { width: 200 }
629
629
  }
630
630
  ) : /* @__PURE__ */ L(
631
- dt,
631
+ gt,
632
632
  {
633
- placeholder: u.placeholder || `请选择${u.label}`,
633
+ placeholder: p.placeholder || `请选择${p.label}`,
634
634
  style: { width: 200 },
635
635
  allowClear: !0,
636
- children: u.options?.map((p) => /* @__PURE__ */ L(Kn, { value: p.value, children: p.label }, p.value))
636
+ children: p.options?.map((c) => /* @__PURE__ */ L(nr, { value: c.value, children: c.label }, c.value))
637
637
  }
638
- ) }, u.key)),
639
- /* @__PURE__ */ L(st.Item, { children: /* @__PURE__ */ me(En, { children: [
640
- /* @__PURE__ */ L(He, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ L(Mn, {}), children: "查询" }),
641
- /* @__PURE__ */ L(He, { onClick: _, children: "重置" }),
642
- b && /* @__PURE__ */ L(He, { icon: /* @__PURE__ */ L(Dn, {}), onClick: R, children: "刷新" })
638
+ ) }, p.key)),
639
+ /* @__PURE__ */ L(pt.Item, { children: /* @__PURE__ */ ue(_n, { children: [
640
+ /* @__PURE__ */ L(Pe, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ L(On, {}), children: "查询" }),
641
+ /* @__PURE__ */ L(Pe, { onClick: M, children: "重置" }),
642
+ b && /* @__PURE__ */ L(Pe, { icon: /* @__PURE__ */ L(Gn, {}), onClick: R, children: "刷新" })
643
643
  ] }) })
644
644
  ]
645
645
  }
646
646
  ) }),
647
647
  /* @__PURE__ */ L(
648
- Ct,
648
+ _t,
649
649
  {
650
- ...C,
650
+ ...E,
651
651
  columns: O,
652
- dataSource: N,
653
- loading: P,
652
+ dataSource: S,
653
+ loading: V,
654
654
  pagination: {
655
655
  ...e,
656
656
  showSizeChanger: !0,
657
657
  showQuickJumper: !0,
658
- showTotal: (u, p) => `第 ${p[0]}-${p[1]} 条/共 ${u} 条`,
658
+ showTotal: (p, c) => `第 ${c[0]}-${c[1]} 条/共 ${p} 条`,
659
659
  pageSizeOptions: I
660
660
  },
661
- onChange: J,
661
+ onChange: X,
662
662
  scroll: { x: "max-content", y: "50vh" }
663
663
  }
664
664
  )
665
665
  ] });
666
666
  };
667
- Xn.__docgenInfo = {
667
+ rr.__docgenInfo = {
668
668
  displayName: "AdvancedTable",
669
669
  description: "高阶表格组件,支持异步请求、搜索、排序等功能",
670
670
  props: {
@@ -731,7 +731,7 @@ Xn.__docgenInfo = {
731
731
  }
732
732
  }
733
733
  };
734
- function wt(t, y, s) {
734
+ function St(t, y, s) {
735
735
  if (!t.current) return;
736
736
  const o = /* @__PURE__ */ new Set(), b = {};
737
737
  for (const w of y)
@@ -743,17 +743,17 @@ function wt(t, y, s) {
743
743
  const T = {};
744
744
  for (const w of o) {
745
745
  T[w] = !1;
746
- for (const P of b[w])
747
- if (P.type === "upload" && P.key) {
748
- if (s[P.key] !== null && s[P.key] !== void 0) {
746
+ for (const V of b[w])
747
+ if (V.type === "upload" && V.key) {
748
+ if (s[V.key] !== null && s[V.key] !== void 0) {
749
749
  T[w] = !0;
750
750
  break;
751
751
  }
752
- } else if ((P.type === "variable" || P.type === "multi-variable") && P.key) {
753
- const k = P.type === "multi-variable" ? t.current.querySelectorAll(
754
- `[data-type="variable"][data-multi-key="${P.key}"]`
752
+ } else if ((V.type === "variable" || V.type === "multi-variable") && V.key) {
753
+ const k = V.type === "multi-variable" ? t.current.querySelectorAll(
754
+ `[data-type="variable"][data-multi-key="${V.key}"]`
755
755
  ) : [t.current.querySelector(
756
- `[data-type="variable"][data-key="${P.key}"]`
756
+ `[data-type="variable"][data-key="${V.key}"]`
757
757
  )].filter(Boolean);
758
758
  for (const e of k)
759
759
  if (!e.classList.contains("show-placeholder") && e.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
@@ -767,23 +767,23 @@ function wt(t, y, s) {
767
767
  const I = y.some((w) => w.exclusionGroup === "separator"), $ = Object.keys(T).filter(
768
768
  (w) => T[w]
769
769
  ).length > 0;
770
- let C = null;
770
+ let E = null;
771
771
  if ($ && I) {
772
772
  for (const w of y)
773
773
  if (w.exclusionGroup && w.exclusionGroup !== "separator" && T[w.exclusionGroup]) {
774
- C = w.exclusionGroup;
774
+ E = w.exclusionGroup;
775
775
  break;
776
776
  }
777
777
  }
778
778
  for (const w of o) {
779
- const P = t.current.querySelectorAll(
779
+ const V = t.current.querySelectorAll(
780
780
  `[data-group="${w}"]`
781
781
  );
782
- I && $ && C ? w === C ? P.forEach((k) => {
782
+ I && $ && E ? w === E ? V.forEach((k) => {
783
783
  k.closest('[data-rte-force-hidden="1"]') || (k.classList.contains("required-upload-group") ? k.style.setProperty("display", "inline-flex", "important") : (k.classList.contains("exclusion-wrapper"), k.style.setProperty("display", "inline-block", "important")));
784
- }) : P.forEach((k) => {
784
+ }) : V.forEach((k) => {
785
785
  k.closest('[data-rte-force-hidden="1"]') || (k.style.display = "none", k.style.setProperty("display", "none", "important"));
786
- }) : P.forEach((k) => {
786
+ }) : V.forEach((k) => {
787
787
  k.closest('[data-rte-force-hidden="1"]') || (k.classList.contains("required-upload-group") ? k.style.setProperty("display", "inline-flex", "important") : (k.classList.contains("exclusion-wrapper"), k.style.setProperty("display", "inline-block", "important")));
788
788
  });
789
789
  }
@@ -793,7 +793,7 @@ function wt(t, y, s) {
793
793
  w.style.display = $ ? "none" : "inline";
794
794
  });
795
795
  }
796
- function kt(t, y, s, o) {
796
+ function Nt(t, y, s, o) {
797
797
  if (!t.current) {
798
798
  o(!1);
799
799
  return;
@@ -801,16 +801,16 @@ function kt(t, y, s, o) {
801
801
  const b = (e) => {
802
802
  if ((e.getAttribute("data-node-type") || "") !== "report-module")
803
803
  return (e.textContent || "").replace(/[\u200B]/g, "").trim();
804
- const r = (e.textContent || "").replace(/[\u200B]/g, "").trim(), d = Array.from(e.querySelectorAll(":scope > div"));
805
- if (d.length === 0)
804
+ const r = (e.textContent || "").replace(/[\u200B]/g, "").trim(), u = Array.from(e.querySelectorAll(":scope > div"));
805
+ if (u.length === 0)
806
806
  return r;
807
- let c = -1;
808
- for (let F = 0; F < d.length; F++)
809
- if ((d[F].textContent || "").replace(/[\u200B]/g, "").trim().length > 0) {
810
- c = F;
807
+ let d = -1;
808
+ for (let F = 0; F < u.length; F++)
809
+ if ((u[F].textContent || "").replace(/[\u200B]/g, "").trim().length > 0) {
810
+ d = F;
811
811
  break;
812
812
  }
813
- return d.filter((F, Y) => Y !== c).map((F) => (F.textContent || "").replace(/[\u200B]/g, "").trim()).join(`
813
+ return u.filter((F, Y) => Y !== d).map((F) => (F.textContent || "").replace(/[\u200B]/g, "").trim()).join(`
814
814
  `).trim() || r;
815
815
  }, T = (e) => e ? !!e.closest('[data-rte-force-hidden="1"]') : !1, I = [];
816
816
  for (let e = 0; e < y.length; e++) {
@@ -829,12 +829,12 @@ function kt(t, y, s, o) {
829
829
  if (n.type === "text" && n.className?.includes("rte-text-required"))
830
830
  if (n.exclusionGroup)
831
831
  for (let r = e + 1; r < y.length; r++) {
832
- const d = y[r];
833
- if (d.exclusionGroup === n.exclusionGroup && (d.type === "variable" || d.type === "upload" || d.type === "select" || d.type === "textarea" || d.type === "richtext" || d.type === "datepicker") && d.key) {
832
+ const u = y[r];
833
+ if (u.exclusionGroup === n.exclusionGroup && (u.type === "variable" || u.type === "upload" || u.type === "select" || u.type === "textarea" || u.type === "richtext" || u.type === "datepicker") && u.key) {
834
834
  I.push({
835
835
  exclusionGroup: n.exclusionGroup,
836
- key: d.key,
837
- type: d.type,
836
+ key: u.key,
837
+ type: u.type,
838
838
  __index: r
839
839
  });
840
840
  break;
@@ -842,12 +842,12 @@ function kt(t, y, s, o) {
842
842
  }
843
843
  else
844
844
  for (let r = e + 1; r < y.length; r++) {
845
- const d = y[r];
846
- if ((d.type === "variable" || d.type === "upload" || d.type === "select" || d.type === "textarea" || d.type === "richtext" || d.type === "datepicker") && d.key) {
845
+ const u = y[r];
846
+ if ((u.type === "variable" || u.type === "upload" || u.type === "select" || u.type === "textarea" || u.type === "richtext" || u.type === "datepicker") && u.key) {
847
847
  I.push({
848
- exclusionGroup: d.exclusionGroup || "",
849
- key: d.key,
850
- type: d.type,
848
+ exclusionGroup: u.exclusionGroup || "",
849
+ key: u.key,
850
+ type: u.type,
851
851
  __index: r
852
852
  });
853
853
  break;
@@ -861,8 +861,8 @@ function kt(t, y, s, o) {
861
861
  n.exclusionGroup === "separator" && e.push(r);
862
862
  });
863
863
  for (const n of e) {
864
- const d = I.filter((S) => typeof S.__index == "number" && S.__index < n).sort((S, F) => (F.__index ?? 0) - (S.__index ?? 0))[0], M = I.filter((S) => typeof S.__index == "number" && S.__index > n).sort((S, F) => (S.__index ?? 0) - (F.__index ?? 0))[0];
865
- d && M && $.push([d, M]);
864
+ const u = I.filter((C) => typeof C.__index == "number" && C.__index < n).sort((C, F) => (F.__index ?? 0) - (C.__index ?? 0))[0], D = I.filter((C) => typeof C.__index == "number" && C.__index > n).sort((C, F) => (C.__index ?? 0) - (F.__index ?? 0))[0];
865
+ u && D && $.push([u, D]);
866
866
  }
867
867
  }
868
868
  if (I.length === 0) {
@@ -878,7 +878,7 @@ function kt(t, y, s, o) {
878
878
  o(!0);
879
879
  return;
880
880
  }
881
- const C = I.filter((e) => {
881
+ const E = I.filter((e) => {
882
882
  if (!t.current) return !1;
883
883
  if (e.exclusionGroup) {
884
884
  const n = t.current.querySelectorAll(
@@ -901,8 +901,8 @@ function kt(t, y, s, o) {
901
901
  `[data-type="variable"][data-multi-key="${e.key}"]`
902
902
  );
903
903
  if (n.length > 0) {
904
- const r = n[0], d = r.closest("[data-group]") || r.parentElement;
905
- return T(d) ? !0 : d ? d.style.display !== "none" : !0;
904
+ const r = n[0], u = r.closest("[data-group]") || r.parentElement;
905
+ return T(u) ? !0 : u ? u.style.display !== "none" : !0;
906
906
  }
907
907
  } else {
908
908
  const n = t.current.querySelector(
@@ -948,30 +948,30 @@ function kt(t, y, s, o) {
948
948
  }
949
949
  return !1;
950
950
  });
951
- if (C.length === 0) {
951
+ if (E.length === 0) {
952
952
  o(!0);
953
953
  return;
954
954
  }
955
- const N = /* @__PURE__ */ new Set();
955
+ const S = /* @__PURE__ */ new Set();
956
956
  $.forEach((e) => {
957
957
  e.forEach((n) => {
958
- n.key && N.add(n.key);
958
+ n.key && S.add(n.key);
959
959
  });
960
960
  });
961
- const w = C.filter(
962
- (e) => !e.key || !N.has(e.key)
961
+ const w = E.filter(
962
+ (e) => !e.key || !S.has(e.key)
963
963
  );
964
- let P = ($.length === 0, !0);
964
+ let V = ($.length === 0, !0);
965
965
  for (const e of $) {
966
- const n = e.filter((d) => {
966
+ const n = e.filter((u) => {
967
967
  if (!t.current) return !1;
968
- if (d.exclusionGroup) {
969
- const c = t.current.querySelectorAll(
970
- `[data-group="${d.exclusionGroup}"]`
968
+ if (u.exclusionGroup) {
969
+ const d = t.current.querySelectorAll(
970
+ `[data-group="${u.exclusionGroup}"]`
971
971
  );
972
- if (c.length > 0) {
973
- const M = c[0];
974
- return T(M) ? !0 : M.style.display !== "none";
972
+ if (d.length > 0) {
973
+ const D = d[0];
974
+ return T(D) ? !0 : D.style.display !== "none";
975
975
  }
976
976
  }
977
977
  return !0;
@@ -979,91 +979,91 @@ function kt(t, y, s, o) {
979
979
  if (n.length === 0)
980
980
  continue;
981
981
  let r = !1;
982
- for (const d of n)
983
- if (d.type === "upload" && d.key) {
984
- if (d.minCount && d.minCount > 0) {
985
- let c = 0;
986
- const M = t.current.querySelectorAll(
987
- `[data-type="upload"][data-batch-key="${d.key}"]`
982
+ for (const u of n)
983
+ if (u.type === "upload" && u.key) {
984
+ if (u.minCount && u.minCount > 0) {
985
+ let d = 0;
986
+ const D = t.current.querySelectorAll(
987
+ `[data-type="upload"][data-batch-key="${u.key}"]`
988
988
  );
989
- if (M.length === 0)
989
+ if (D.length === 0)
990
990
  continue;
991
- for (let S = 0; S < M.length; S++) {
992
- const Y = M[S].dataset.key;
993
- Y && s[Y] != null && (c += 1);
991
+ for (let C = 0; C < D.length; C++) {
992
+ const Y = D[C].dataset.key;
993
+ Y && s[Y] != null && (d += 1);
994
994
  }
995
- if (c >= d.minCount) {
995
+ if (d >= u.minCount) {
996
996
  r = !0;
997
997
  break;
998
998
  }
999
- } else if (s[d.key] !== null && s[d.key] !== void 0) {
999
+ } else if (s[u.key] !== null && s[u.key] !== void 0) {
1000
1000
  r = !0;
1001
1001
  break;
1002
1002
  }
1003
- } else if (d.type === "variable" && d.key)
1004
- if (d.isMultiVariable) {
1005
- const c = t.current.querySelectorAll(
1006
- `[data-type="variable"][data-multi-key="${d.key}"]`
1003
+ } else if (u.type === "variable" && u.key)
1004
+ if (u.isMultiVariable) {
1005
+ const d = t.current.querySelectorAll(
1006
+ `[data-type="variable"][data-multi-key="${u.key}"]`
1007
1007
  );
1008
- let M = 0;
1009
- for (const F of Array.from(c)) {
1008
+ let D = 0;
1009
+ for (const F of Array.from(d)) {
1010
1010
  if (F.classList.contains("show-placeholder"))
1011
1011
  continue;
1012
- F.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (M += 1);
1012
+ F.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (D += 1);
1013
1013
  }
1014
- const S = d.minCount && d.minCount > 0 ? d.minCount : 1;
1015
- if (M >= S) {
1014
+ const C = u.minCount && u.minCount > 0 ? u.minCount : 1;
1015
+ if (D >= C) {
1016
1016
  r = !0;
1017
1017
  break;
1018
1018
  }
1019
1019
  } else {
1020
- const c = t.current.querySelector(
1021
- `[data-type="variable"][data-key="${d.key}"]`
1020
+ const d = t.current.querySelector(
1021
+ `[data-type="variable"][data-key="${u.key}"]`
1022
1022
  );
1023
- if (c) {
1024
- if (c.classList.contains("show-placeholder"))
1023
+ if (d) {
1024
+ if (d.classList.contains("show-placeholder"))
1025
1025
  continue;
1026
- if (c.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1026
+ if (d.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1027
1027
  r = !0;
1028
1028
  break;
1029
1029
  }
1030
1030
  }
1031
1031
  }
1032
- else if (d.type === "select" && d.key) {
1033
- const c = t.current.querySelector(
1034
- `[data-type="select"][data-key="${d.key}"]`
1032
+ else if (u.type === "select" && u.key) {
1033
+ const d = t.current.querySelector(
1034
+ `[data-type="select"][data-key="${u.key}"]`
1035
1035
  );
1036
- if (c && (c.getAttribute("data-value") || "").trim().length > 0) {
1036
+ if (d && (d.getAttribute("data-value") || "").trim().length > 0) {
1037
1037
  r = !0;
1038
1038
  break;
1039
1039
  }
1040
- } else if (d.type === "textarea" && d.key) {
1041
- const c = t.current.querySelector(
1042
- `[data-type="textarea"][data-key="${d.key}"]`
1040
+ } else if (u.type === "textarea" && u.key) {
1041
+ const d = t.current.querySelector(
1042
+ `[data-type="textarea"][data-key="${u.key}"]`
1043
1043
  );
1044
- if (c && (c.value || "").trim().length > 0) {
1044
+ if (d && (d.value || "").trim().length > 0) {
1045
1045
  r = !0;
1046
1046
  break;
1047
1047
  }
1048
- } else if (d.type === "richtext" && d.key) {
1049
- const c = t.current.querySelector(
1050
- `[data-type="richtext"][data-key="${d.key}"]`
1048
+ } else if (u.type === "richtext" && u.key) {
1049
+ const d = t.current.querySelector(
1050
+ `[data-type="richtext"][data-key="${u.key}"]`
1051
1051
  );
1052
- if (c && b(c).length > 0) {
1052
+ if (d && b(d).length > 0) {
1053
1053
  r = !0;
1054
1054
  break;
1055
1055
  }
1056
- } else if (d.type === "datepicker" && d.key) {
1057
- const c = t.current.querySelector(
1058
- `[data-type="datepicker"][data-key="${d.key}"]`
1056
+ } else if (u.type === "datepicker" && u.key) {
1057
+ const d = t.current.querySelector(
1058
+ `[data-type="datepicker"][data-key="${u.key}"]`
1059
1059
  );
1060
- if (c && (c.getAttribute("data-value") || "").trim().length > 0) {
1060
+ if (d && (d.getAttribute("data-value") || "").trim().length > 0) {
1061
1061
  r = !0;
1062
1062
  break;
1063
1063
  }
1064
1064
  }
1065
1065
  if (!r) {
1066
- P = !1;
1066
+ V = !1;
1067
1067
  break;
1068
1068
  }
1069
1069
  }
@@ -1079,9 +1079,9 @@ function kt(t, y, s, o) {
1079
1079
  k = !1;
1080
1080
  break;
1081
1081
  }
1082
- for (let d = 0; d < r.length; d++) {
1083
- const M = r[d].dataset.key;
1084
- M && s[M] != null && (n += 1);
1082
+ for (let u = 0; u < r.length; u++) {
1083
+ const D = r[u].dataset.key;
1084
+ D && s[D] != null && (n += 1);
1085
1085
  }
1086
1086
  if (n < e.minCount) {
1087
1087
  k = !1;
@@ -1097,13 +1097,13 @@ function kt(t, y, s, o) {
1097
1097
  `[data-type="variable"][data-multi-key="${e.key}"]`
1098
1098
  );
1099
1099
  let r = 0;
1100
- for (const c of Array.from(n)) {
1101
- if (c.classList.contains("show-placeholder"))
1100
+ for (const d of Array.from(n)) {
1101
+ if (d.classList.contains("show-placeholder"))
1102
1102
  continue;
1103
- c.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (r += 1);
1103
+ d.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (r += 1);
1104
1104
  }
1105
- const d = e.minCount && e.minCount > 0 ? e.minCount : 1;
1106
- if (r < d) {
1105
+ const u = e.minCount && e.minCount > 0 ? e.minCount : 1;
1106
+ if (r < u) {
1107
1107
  k = !1;
1108
1108
  break;
1109
1109
  }
@@ -1157,49 +1157,49 @@ function kt(t, y, s, o) {
1157
1157
  break;
1158
1158
  }
1159
1159
  }
1160
- o(P && k);
1160
+ o(V && k);
1161
1161
  }
1162
- function xt(t, y) {
1162
+ function Tt(t, y) {
1163
1163
  if (!t.current) return;
1164
1164
  t.current.querySelectorAll('[data-type="variable"]').forEach((o) => {
1165
1165
  const b = o.innerText;
1166
1166
  b.replace(/\u200B/g, "").trim().length === 0 ? (b !== "​" && (o.innerText = "​"), o.classList.add("show-placeholder")) : o.classList.remove("show-placeholder");
1167
1167
  });
1168
1168
  }
1169
- const Jn = ({ host: t, onChange: y }) => {
1170
- const s = t.dataset.key, o = t.dataset.placeholder, b = t.dataset.options ? decodeURIComponent(t.dataset.options) : "[]", T = t.dataset.required === "true", I = t.dataset.value || "", A = xn.useMemo(() => {
1169
+ const ar = ({ host: t, onChange: y }) => {
1170
+ const s = t.dataset.key, o = t.dataset.placeholder, b = t.dataset.options ? decodeURIComponent(t.dataset.options) : "[]", T = t.dataset.required === "true", I = t.dataset.value || "", A = Sn.useMemo(() => {
1171
1171
  try {
1172
1172
  return JSON.parse(b);
1173
1173
  } catch {
1174
1174
  return [];
1175
1175
  }
1176
- }, [b]), [$, C] = ce(I || void 0), [N, w] = ce(80), P = (e) => {
1176
+ }, [b]), [$, E] = oe(I || void 0), [S, w] = oe(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
  };
1180
- ye(() => {
1181
- const e = $ ? A.find((d) => d.value === $)?.label || $ : o || "请选择", n = P(e), r = Math.max(64, Math.ceil(n + 40));
1180
+ fe(() => {
1181
+ const e = $ ? A.find((u) => u.value === $)?.label || $ : o || "请选择", n = V(e), r = Math.max(64, Math.ceil(n + 40));
1182
1182
  w(r);
1183
1183
  }, [$, A, o]);
1184
1184
  const k = (e) => {
1185
- C(e), t.setAttribute("data-value", e), y(s, e);
1185
+ E(e), t.setAttribute("data-value", e), y(s, e);
1186
1186
  };
1187
- return ye(() => {
1188
- C(I || void 0);
1189
- }, [I]), St(
1187
+ return fe(() => {
1188
+ E(I || void 0);
1189
+ }, [I]), Lt(
1190
1190
  /* @__PURE__ */ L(
1191
1191
  "div",
1192
1192
  {
1193
1193
  className: "rte-select-wrapper",
1194
1194
  contentEditable: !1,
1195
- style: { display: "inline-block", minWidth: N, width: N },
1195
+ style: { display: "inline-block", minWidth: S, width: S },
1196
1196
  children: /* @__PURE__ */ L(
1197
- dt,
1197
+ gt,
1198
1198
  {
1199
1199
  value: $,
1200
1200
  onChange: k,
1201
1201
  placeholder: o || "请选择",
1202
- style: { width: "100%", minWidth: N },
1202
+ style: { width: "100%", minWidth: S },
1203
1203
  options: A,
1204
1204
  allowClear: !T,
1205
1205
  size: "small",
@@ -1213,28 +1213,28 @@ const Jn = ({ host: t, onChange: y }) => {
1213
1213
  ),
1214
1214
  t
1215
1215
  );
1216
- }, Qn = (t) => {
1217
- const [y, s] = ce([]);
1218
- return ye(() => {
1216
+ }, or = (t) => {
1217
+ const [y, s] = oe([]);
1218
+ return fe(() => {
1219
1219
  const o = t.current;
1220
1220
  if (!o) return;
1221
1221
  const b = () => {
1222
1222
  const I = o.querySelectorAll(".rte-select-host"), A = [];
1223
1223
  I.forEach(($) => {
1224
- const C = $.getAttribute("data-key");
1225
- C && A.push(
1224
+ const E = $.getAttribute("data-key");
1225
+ E && A.push(
1226
1226
  /* @__PURE__ */ L(
1227
- Jn,
1227
+ ar,
1228
1228
  {
1229
1229
  host: $,
1230
1230
  onChange: () => {
1231
1231
  if (t.current) {
1232
- const N = new Event("input", { bubbles: !0 });
1233
- t.current.dispatchEvent(N);
1232
+ const S = new Event("input", { bubbles: !0 });
1233
+ t.current.dispatchEvent(S);
1234
1234
  }
1235
1235
  }
1236
1236
  },
1237
- `select-${C}`
1237
+ `select-${E}`
1238
1238
  )
1239
1239
  );
1240
1240
  }), s(A);
@@ -1244,18 +1244,18 @@ const Jn = ({ host: t, onChange: y }) => {
1244
1244
  let A = !1;
1245
1245
  for (const $ of I)
1246
1246
  if ($.type === "childList") {
1247
- let C = !1;
1248
- if ($.addedNodes.forEach((N) => {
1249
- if (N.nodeType === Node.ELEMENT_NODE) {
1250
- const w = N;
1251
- (w.classList?.contains("rte-select-host") || w.querySelector?.(".rte-select-host")) && (C = !0);
1247
+ let E = !1;
1248
+ if ($.addedNodes.forEach((S) => {
1249
+ if (S.nodeType === Node.ELEMENT_NODE) {
1250
+ const w = S;
1251
+ (w.classList?.contains("rte-select-host") || w.querySelector?.(".rte-select-host")) && (E = !0);
1252
1252
  }
1253
- }), $.removedNodes.forEach((N) => {
1254
- if (N.nodeType === Node.ELEMENT_NODE) {
1255
- const w = N;
1256
- (w.classList?.contains("rte-select-host") || w.querySelector?.(".rte-select-host")) && (C = !0);
1253
+ }), $.removedNodes.forEach((S) => {
1254
+ if (S.nodeType === Node.ELEMENT_NODE) {
1255
+ const w = S;
1256
+ (w.classList?.contains("rte-select-host") || w.querySelector?.(".rte-select-host")) && (E = !0);
1257
1257
  }
1258
- }), C) {
1258
+ }), E) {
1259
1259
  A = !0;
1260
1260
  break;
1261
1261
  }
@@ -1264,142 +1264,142 @@ const Jn = ({ host: t, onChange: y }) => {
1264
1264
  });
1265
1265
  return T.observe(o, { childList: !0, subtree: !0 }), () => T.disconnect();
1266
1266
  }, [t]), y;
1267
- }, lt = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1268
- function Zn(t, y, s, o, b, T = {}, I, A) {
1267
+ }, ft = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1268
+ function sr(t, y, s, o, b, T = {}, I, A) {
1269
1269
  if (!t.current) return;
1270
- const $ = /[;;,,。.!!??::、]/, C = (e) => {
1270
+ const $ = /[;;,,。.!!??::、]/, E = (e) => {
1271
1271
  const n = (e ?? "").trim();
1272
1272
  return n.length === 1 && $.test(n);
1273
- }, N = (e) => {
1273
+ }, S = (e) => {
1274
1274
  const n = e ?? "", r = n.match(new RegExp(`^\\s*(${$.source})`));
1275
1275
  if (!r) return null;
1276
- const d = r[1], c = n.replace(new RegExp(`^\\s*${$.source}`), "");
1277
- return { punct: d, rest: c };
1278
- }, w = (e) => `<span data-type="text" class="rte-inline-punct" contenteditable="false">${e}</span>`, P = [];
1276
+ const u = r[1], d = n.replace(new RegExp(`^\\s*${$.source}`), "");
1277
+ return { punct: u, rest: d };
1278
+ }, w = (e) => `<span data-type="text" class="rte-inline-punct" contenteditable="false">${e}</span>`, V = [];
1279
1279
  let k = 0;
1280
1280
  for (; k < y.length; ) {
1281
1281
  const e = y[k], n = k + 1 < y.length ? y[k + 1] : null;
1282
1282
  if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && n) {
1283
1283
  const Y = n.type === "upload" && n.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === n.exclusionGroup, z = n.type === "variable" && n.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === n.exclusionGroup;
1284
1284
  if (Y) {
1285
- const O = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", V = `<span ${O} class="exclusion-wrapper required-upload-group">`, G = "</span>";
1286
- let _ = "";
1287
- e.className ? _ = `<span class="${e.className}">${e.text ?? ""}</span>` : _ = e.text ?? "";
1288
- const R = n, J = s[R.key] !== null && s[R.key] !== void 0, u = J ? s[R.key] : null, p = J ? s[R.key]?.name : R.text, v = J ? "" : "hidden", D = R.tooltip && !J ? "" : "hidden", B = J ? "has-file" : "", W = J && p ? ` data-file-name="${p.replace(/"/g, "&quot;")}"` : "";
1289
- let X = "";
1290
- J && u ? u.type?.startsWith("image/") ? X = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(u)}" alt="preview" />` : X = "<i class='iconfont icon-exlwenjian'></i>" : X = "<i class='iconfont icon-shangchuan1'></i>";
1291
- const ne = (R.text || "").trim(), E = J && ne.length >= 12 ? `<span ${O} contenteditable="false" class="exclusion-wrapper upload-hint">${ne}</span>` : "", oe = `<span contenteditable="false" data-type="upload" data-key="${R.key}" class="upload-chip"><span class="upload-inner-wrapper ${B}"><span class="upload-icon">${X}</span><span class="upload-label"${W}>${p || R.text}</span>${R.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${D}" data-upload-key="${R.key}" data-tooltip="${R.tooltip}"></i>` : ""}<span class="file-remove-btn ${v}" title="移除文件">×</span></span></span>`;
1292
- P.push(V + _ + oe + G + E), k += 2;
1285
+ const O = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", _ = `<span ${O} class="exclusion-wrapper required-upload-group">`, G = "</span>";
1286
+ let M = "";
1287
+ e.className ? M = `<span class="${e.className}">${e.text ?? ""}</span>` : M = 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, v = X ? "" : "hidden", P = R.tooltip && !X ? "" : "hidden", B = X ? "has-file" : "", j = X && c ? ` data-file-name="${c.replace(/"/g, "&quot;")}"` : "";
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 ${B}"><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 ${v}" title="移除文件">×</span></span></span>`;
1292
+ V.push(_ + M + ye + G + de), k += 2;
1293
1293
  continue;
1294
1294
  }
1295
1295
  if (z) {
1296
- const V = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, G = "</span>";
1297
- let _ = "";
1298
- e.className ? _ = `<span class="${e.className}">${e.text ?? ""}</span>` : _ = e.text ?? "";
1299
- const R = n, u = (R.key ? b[R.key] : void 0) || R.text || "", p = !u, v = p ? "​" : u, D = p ? "show-placeholder" : "", B = R.exclusionGroup ? ` data-group="${R.exclusionGroup}"` : "", W = R.tooltip ? ` data-tooltip="${R.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${R.key || ""}"` : "", X = R.tooltip && p ? "" : "hidden", ne = `<span contenteditable="true" data-type="variable" data-key="${R.key}" data-placeholder="${R.placeholder || ""}"${B}${W} class="variable-chip ${D}">${v}${R.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${X}" data-variable-key="${R.key}" data-tooltip="${R.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1300
- P.push(V + _ + ne + G), k += 2;
1296
+ const _ = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, G = "</span>";
1297
+ let M = "";
1298
+ e.className ? M = `<span class="${e.className}">${e.text ?? ""}</span>` : M = e.text ?? "";
1299
+ const R = n, p = (R.key ? b[R.key] : void 0) || R.text || "", c = !p, v = c ? "​" : p, P = c ? "show-placeholder" : "", B = 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 || ""}"${B}${j} class="variable-chip ${P}">${v}${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(_ + M + re + G), k += 2;
1301
1301
  continue;
1302
1302
  }
1303
1303
  }
1304
- const d = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", c = e.exclusionGroup ? `<span ${d} class="exclusion-wrapper">` : "", M = e.exclusionGroup ? "</span>" : "";
1305
- let S = "";
1304
+ const u = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", d = e.exclusionGroup ? `<span ${u} class="exclusion-wrapper">` : "", D = e.exclusionGroup ? "</span>" : "";
1305
+ let C = "";
1306
1306
  if (e.type === "tag") {
1307
- const z = o || I === "hideTagClose" ? "" : '<span class="tag-close-btn" title="Clear (ESC)"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6L6 18M6 6l12 12"/></svg></span>', O = o ? ' data-locked="true"' : "", V = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1308
- S = `<span contenteditable="false" class="tag-node group"${O}${V}><span class="tag-label">${e.text}</span>${z}</span>`;
1307
+ const z = o || I === "hideTagClose" ? "" : '<span class="tag-close-btn" title="Clear (ESC)"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6L6 18M6 6l12 12"/></svg></span>', O = o ? ' data-locked="true"' : "", _ = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1308
+ C = `<span contenteditable="false" class="tag-node group"${O}${_}><span class="tag-label">${e.text}</span>${z}</span>`;
1309
1309
  } else if (e.type === "text") {
1310
1310
  const Y = o ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', O = (e.text ?? "").replace(/\n/g, "<br/>");
1311
- e.className ? S = `<span data-type="text" class="${e.className}"${Y}>${O}</span>` : S = o ? `<span data-type="text"${Y}>${O}</span>` : `<span data-type="text" contenteditable="false">${O}</span>`;
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 = b[e.key] || e.text || "", O = !z, V = O ? "​" : z, G = O ? "show-placeholder" : "", _ = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", R = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", J = e.tooltip && O ? "" : "hidden", u = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${_}${R} class="variable-chip ${G}">${V}${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>`;
1314
- e.required ? S = `<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>${u}</span>` : S = u;
1313
+ const z = b[e.key] || e.text || "", O = !z, _ = O ? "​" : z, G = O ? "show-placeholder" : "", M = 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 || ""}"${M}${R} class="variable-chip ${G}">${_}${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;
1315
1315
  } else if (e.type === "report-url" && e.key) {
1316
- const z = b[e.key] || e.text || "", O = !z, V = O ? "​" : z, G = O ? "show-placeholder" : "", _ = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", R = e.tooltip ? ` data-tooltip="${lt(e.tooltip)}" data-variable-key="${e.key || ""}"` : "", J = e.tooltip && O ? "" : "hidden", u = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${lt(e.placeholder || "")}"${_}${R} class="variable-chip rte-report-url ${G}">${V}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${J}" data-variable-key="${e.key}" data-tooltip="${lt(e.tooltip)}" ></i>` : ""}</span>`;
1317
- e.required ? S = `<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>${u}</span>` : S = u;
1316
+ const z = b[e.key] || e.text || "", O = !z, _ = O ? "​" : z, G = O ? "show-placeholder" : "", M = 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 || "")}"${M}${R} class="variable-chip rte-report-url ${G}">${_}${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;
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;
1321
- let V = 0;
1321
+ let _ = 0;
1322
1322
  for (let R = 0; R < O; R++) {
1323
- const J = `${e.key}-${R}`;
1324
- s[J] != null && (V += 1);
1323
+ const X = `${e.key}-${R}`;
1324
+ s[X] != null && (_ += 1);
1325
1325
  }
1326
1326
  const G = Math.min(
1327
1327
  O,
1328
- Math.max(z, V + (V < O ? 1 : 0))
1328
+ Math.max(z, _ + (_ < O ? 1 : 0))
1329
1329
  );
1330
- let _ = "";
1330
+ let M = "";
1331
1331
  for (let R = 0; R < G; R++) {
1332
- const J = `${e.key}-${R}`, u = s[J] !== null && s[J] !== void 0, p = u ? s[J] : null, v = u ? s[J]?.name : e.text, D = u ? "" : "hidden", B = e.tooltip && !u ? "" : "hidden", W = u ? "has-file" : "", X = u && v ? ` data-file-name="${v.replace(/"/g, "&quot;")}"` : "";
1333
- let ne = "";
1334
- u && p ? p.type?.startsWith("image/") ? ne = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(p)}" alt="preview" />` : ne = "<i class='iconfont icon-exlwenjian'></i>" : ne = "<i class='iconfont icon-shangchuan1'></i>";
1335
- const pe = ` data-batch-key="${e.key}"`, E = ` data-batch-index="${R}"`, oe = `<span contenteditable="false" data-type="upload" data-key="${J}"${pe}${E} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${W}"><span class="upload-icon">${ne}</span><span class="upload-label"${X}>${v || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${B}" data-upload-key="${J}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${D}" title="移除文件">×</span></span></span>`;
1336
- _ += oe;
1332
+ const X = `${e.key}-${R}`, p = s[X] !== null && s[X] !== void 0, c = p ? s[X] : null, v = p ? s[X]?.name : e.text, P = p ? "" : "hidden", B = e.tooltip && !p ? "" : "hidden", j = p ? "has-file" : "", J = p && v ? ` data-file-name="${v.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}>${v || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${B}" data-upload-key="${X}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${P}" title="移除文件">×</span></span></span>`;
1336
+ M += ye;
1337
1337
  }
1338
- e.required ? S = `<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">${_}</span></span>` : S = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-upload-batch-chips">${_}</span>`;
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">${M}</span></span>` : C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-upload-batch-chips">${M}</span>`;
1339
1339
  } else {
1340
- const z = s[e.key] !== null && s[e.key] !== void 0, O = z ? s[e.key] : null, V = z ? s[e.key]?.name : e.text, G = z ? "" : "hidden", _ = e.tooltip && !z ? "" : "hidden", R = z ? "has-file" : "", J = z && V ? ` data-file-name="${V.replace(/"/g, "&quot;")}"` : "";
1341
- let u = "";
1342
- z && O ? O.type?.startsWith("image/") ? u = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(O)}" alt="preview" />` : u = "<i class='iconfont icon-exlwenjian'></i>" : u = "<i class='iconfont icon-shangchuan1'></i>";
1343
- const p = (e.text || "").trim(), D = z && e.showHint === !0 && p.length >= 12 ? `<span ${d} contenteditable="false" class="exclusion-wrapper upload-hint">${p}</span>` : "", B = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${R}"><span class="upload-icon">${u}</span><span class="upload-label"${J}>${V || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${_}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${G}" title="移除文件">×</span></span></span>`;
1344
- e.required ? S = `<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>${B}</span>${D}` : S = B + D;
1340
+ const z = s[e.key] !== null && s[e.key] !== void 0, O = z ? s[e.key] : null, _ = z ? s[e.key]?.name : e.text, G = z ? "" : "hidden", M = e.tooltip && !z ? "" : "hidden", R = z ? "has-file" : "", X = z && _ ? ` data-file-name="${_.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>` : "", B = `<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}>${_ || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${M}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${G}" title="移除文件">×</span></span></span>`;
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>${B}</span>${P}` : C = B + P;
1345
1345
  }
1346
1346
  else if (e.type === "select" && e.key) {
1347
- const Y = b[e.key] || e.defaultValue || "", z = encodeURIComponent(JSON.stringify(e.options || [])), O = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", V = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", G = e.required ? ' data-required="true"' : "", _ = `<div data-type="select" data-key="${e.key}" data-value="${Y}" data-options="${z}"${O}${V}${G} class="rte-select-host"></div>`;
1348
- e.required ? S = `<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>${_}</span>` : S = _;
1347
+ const Y = b[e.key] || e.defaultValue || "", z = encodeURIComponent(JSON.stringify(e.options || [])), O = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", _ = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", G = e.required ? ' data-required="true"' : "", M = `<div data-type="select" data-key="${e.key}" data-value="${Y}" data-options="${z}"${O}${_}${G} class="rte-select-host"></div>`;
1348
+ 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>${M}</span>` : C = M;
1349
1349
  } else if (e.type === "textarea" && e.key) {
1350
- const Y = b[e.key] || "", z = typeof e.maxHeight == "number" ? e.maxHeight : A?.textarea?.maxHeight ?? 252, O = typeof e.expandable == "boolean" ? e.expandable : A?.textarea?.expandable ?? !0, V = 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;"${V}>${Y}</textarea>`, _ = 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}${_}</div>`;
1351
- e.required ? S = `<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>` : S = R;
1350
+ const Y = b[e.key] || "", z = typeof e.maxHeight == "number" ? e.maxHeight : A?.textarea?.maxHeight ?? 252, O = typeof e.expandable == "boolean" ? e.expandable : A?.textarea?.expandable ?? !0, _ = 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;"${_}>${Y}</textarea>`, M = 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}${M}</div>`;
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 = b[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, V = Math.max(O, z), G = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", _ = typeof e.expandable == "boolean" ? e.expandable : A?.richtext?.expandable ?? !0, R = Y, J = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${G} style="min-height:${z}px;max-height:${V}px;overflow:auto;">${R}</div>`, u = _ ? `<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>` : "", p = `<div class="rte-richtext-wrapper" data-key="${e.key}">${J}${u}</div>`, v = `<div class="rte-richtext-container" data-key="${e.key}">${p}</div>`;
1354
- e.required ? S = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${v}</div>` : S = v;
1353
+ const Y = b[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, _ = Math.max(O, z), G = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", M = 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:${_}px;overflow:auto;">${R}</div>`, p = M ? `<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>`, v = `<div class="rte-richtext-container" data-key="${e.key}">${c}</div>`;
1354
+ e.required ? C = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${v}</div>` : C = v;
1355
1355
  } else if (e.type === "report-module" && e.key) {
1356
- const z = Object.prototype.hasOwnProperty.call(b, e.key) ? b[e.key] : e.text || "", O = typeof e.minHeight == "number" ? e.minHeight : 80, V = typeof e.maxHeight == "number" ? e.maxHeight : 240, G = Math.max(V, O), _ = e.placeholder ? ` data-placeholder="${lt(e.placeholder)}"` : "", R = z, J = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" class="rte-richtext rte-report-module"${_} style="min-height:${O}px;max-height:${G}px;overflow:auto;">${R}</div>`, u = `<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${J}</div>`, p = `<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${u}</div>`;
1357
- e.required ? S = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${p}</div>` : S = p;
1356
+ const z = Object.prototype.hasOwnProperty.call(b, e.key) ? b[e.key] : e.text || "", O = typeof e.minHeight == "number" ? e.minHeight : 80, _ = typeof e.maxHeight == "number" ? e.maxHeight : 240, G = Math.max(_, O), M = 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"${M} 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>`;
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
- const Y = b[e.key] || "", z = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", O = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", V = e.disableFuture ? ' data-disable-future="true"' : "", G = `<div data-type="datepicker" data-key="${e.key}" data-value="${Y}" class="rte-datepicker-host"${z}${O}${V}></div>`;
1360
- e.required ? S = `<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>${G}</span>` : S = G;
1359
+ const Y = b[e.key] || "", z = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", O = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", _ = e.disableFuture ? ' data-disable-future="true"' : "", G = `<div data-type="datepicker" data-key="${e.key}" data-value="${Y}" class="rte-datepicker-host"${z}${O}${_}></div>`;
1360
+ 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>${G}</span>` : C = G;
1361
1361
  } else if (e.type === "multi-variable" && e.key) {
1362
1362
  const Y = e.maxCount || 9, z = T[e.key] || 1, O = Math.min(z, Y);
1363
1363
  if (e.required) {
1364
- const V = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, G = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
1365
- let _ = "";
1364
+ const _ = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, G = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
1365
+ let M = "";
1366
1366
  for (let R = 0; R < O; R++) {
1367
- const J = `${e.key}_${R}`, u = b[J] || "", p = !u, v = p ? "​" : u, D = p ? "show-placeholder" : "", B = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", W = e.tooltip && p ? "" : "hidden", X = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", ne = `<span contenteditable="true" data-type="variable" data-key="${J}" data-multi-key="${e.key}" data-index="${R}" data-placeholder="${e.placeholder || ""}"${X}${B} class="variable-chip ${D}">${v}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${W}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1368
- R === 0 ? _ += `<span ${G} class="exclusion-wrapper required-upload-group required-multi-first">${V}${ne}</span>` : _ += ne;
1367
+ const X = `${e.key}_${R}`, p = b[X] || "", c = !p, v = c ? "​" : p, P = c ? "show-placeholder" : "", B = 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}${B} class="variable-chip ${P}">${v}${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 ? M += `<span ${G} class="exclusion-wrapper required-upload-group required-multi-first">${_}${re}</span>` : M += re;
1369
1369
  }
1370
- S = _;
1370
+ C = M;
1371
1371
  } else {
1372
- let V = "";
1372
+ let _ = "";
1373
1373
  for (let G = 0; G < O; G++) {
1374
- const _ = `${e.key}_${G}`, R = b[_] || "", J = !R, u = J ? "​" : R, p = J ? "show-placeholder" : "", v = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", D = e.tooltip && J ? "" : "hidden", B = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", W = `<span contenteditable="true" data-type="variable" data-key="${_}" data-multi-key="${e.key}" data-index="${G}" data-placeholder="${e.placeholder || ""}"${B}${v} class="variable-chip ${p}">${u}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${D}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1375
- V += W;
1374
+ const M = `${e.key}_${G}`, R = b[M] || "", X = !R, p = X ? "​" : R, c = X ? "show-placeholder" : "", v = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", P = e.tooltip && X ? "" : "hidden", B = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", j = `<span contenteditable="true" data-type="variable" data-key="${M}" data-multi-key="${e.key}" data-index="${G}" data-placeholder="${e.placeholder || ""}"${B}${v} 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>`;
1375
+ _ += j;
1376
1376
  }
1377
- S = V;
1377
+ C = _;
1378
1378
  }
1379
1379
  }
1380
- const F = c + S + M;
1380
+ const F = d + C + D;
1381
1381
  if (e.type === "text" && !e.className && !e.exclusionGroup) {
1382
- if (C(e.text) && P.length > 0) {
1383
- const z = P[P.length - 1], O = (e.text ?? "").trim();
1384
- P[P.length - 1] = `<span class="rte-inline-group">${z}${w(O)}</span>`, k++;
1382
+ if (E(e.text) && V.length > 0) {
1383
+ const z = V[V.length - 1], O = (e.text ?? "").trim();
1384
+ V[V.length - 1] = `<span class="rte-inline-group">${z}${w(O)}</span>`, k++;
1385
1385
  continue;
1386
1386
  }
1387
- const Y = N(e.text);
1388
- if (Y && P.length > 0) {
1389
- const z = P[P.length - 1];
1390
- P[P.length - 1] = `<span class="rte-inline-group">${z}${w(Y.punct)}</span>`;
1387
+ const Y = S(e.text);
1388
+ if (Y && V.length > 0) {
1389
+ const z = V[V.length - 1];
1390
+ V[V.length - 1] = `<span class="rte-inline-group">${z}${w(Y.punct)}</span>`;
1391
1391
  const O = Y.rest;
1392
1392
  if (O) {
1393
- const V = O.replace(/\n/g, "<br/>");
1394
- P.push(`<span data-type="text" contenteditable="false">${V}</span>`);
1393
+ const _ = O.replace(/\n/g, "<br/>");
1394
+ V.push(`<span data-type="text" contenteditable="false">${_}</span>`);
1395
1395
  }
1396
1396
  k++;
1397
1397
  continue;
1398
1398
  }
1399
1399
  }
1400
- P.push(F), k++;
1400
+ V.push(F), k++;
1401
1401
  }
1402
- t.current && (t.current.innerHTML = P.join(""), setTimeout(() => {
1402
+ t.current && (t.current.innerHTML = V.join(""), setTimeout(() => {
1403
1403
  if (!t.current) return;
1404
1404
  t.current.querySelectorAll('[data-type="variable"]').forEach((n) => {
1405
1405
  const r = n.innerText.replace(/\n/g, "");
@@ -1407,56 +1407,56 @@ function Zn(t, y, s, o, b, T = {}, I, A) {
1407
1407
  });
1408
1408
  }, 0));
1409
1409
  }
1410
- function er(t, y, s, o, b = {}, T, I, A, $) {
1411
- const C = de(() => {
1410
+ function lr(t, y, s, o, b = {}, T, I, A, $) {
1411
+ const E = ce(() => {
1412
1412
  if (!t.current) return;
1413
1413
  if (y.length === 0) {
1414
1414
  t.current.innerHTML = "";
1415
1415
  return;
1416
1416
  }
1417
- let N = {};
1418
- const P = t.current.__tempVariableValues;
1419
- if (P ? (N = P, setTimeout(() => {
1417
+ let S = {};
1418
+ const V = t.current.__tempVariableValues;
1419
+ if (V ? (S = V, setTimeout(() => {
1420
1420
  if (t.current) {
1421
1421
  const k = t.current;
1422
- k.__tempVariableValues === P && delete k.__tempVariableValues;
1422
+ k.__tempVariableValues === V && delete k.__tempVariableValues;
1423
1423
  }
1424
- }, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((c) => {
1425
- const M = c.dataset.key;
1426
- if (M) {
1427
- const S = c.innerText.replace(/[\u200B\n]/g, "").trim();
1428
- S && (N[M] = S);
1424
+ }, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((d) => {
1425
+ const D = d.dataset.key;
1426
+ if (D) {
1427
+ const C = d.innerText.replace(/[\u200B\n]/g, "").trim();
1428
+ C && (S[D] = C);
1429
1429
  }
1430
- }), t.current.querySelectorAll('[data-type="select"]').forEach((c) => {
1431
- const M = c.dataset.key;
1432
- if (M) {
1433
- const S = (c.getAttribute("data-value") || "").trim();
1434
- S && (N[M] = S);
1430
+ }), t.current.querySelectorAll('[data-type="select"]').forEach((d) => {
1431
+ const D = d.dataset.key;
1432
+ if (D) {
1433
+ const C = (d.getAttribute("data-value") || "").trim();
1434
+ C && (S[D] = C);
1435
1435
  }
1436
- }), t.current.querySelectorAll('[data-type="textarea"]').forEach((c) => {
1437
- const M = c.dataset.key;
1438
- if (M) {
1439
- const S = c.value.replace(/[\u200B]/g, "").trim();
1440
- S && (N[M] = S);
1436
+ }), t.current.querySelectorAll('[data-type="textarea"]').forEach((d) => {
1437
+ const D = d.dataset.key;
1438
+ if (D) {
1439
+ const C = d.value.replace(/[\u200B]/g, "").trim();
1440
+ C && (S[D] = C);
1441
1441
  }
1442
- }), t.current.querySelectorAll('[data-type="richtext"]').forEach((c) => {
1443
- const M = c.dataset.key;
1444
- if (M) {
1445
- const S = c.getAttribute("data-node-type") || "", F = S === "report-module" ? (c.innerHTML || "").replace(/[\u200B]/g, "").trim() : (c.textContent || "").replace(/[\u200B]/g, "").trim();
1446
- (S === "report-module" || F) && (N[M] = F);
1442
+ }), t.current.querySelectorAll('[data-type="richtext"]').forEach((d) => {
1443
+ const D = d.dataset.key;
1444
+ if (D) {
1445
+ const C = d.getAttribute("data-node-type") || "", F = C === "report-module" ? (d.innerHTML || "").replace(/[\u200B]/g, "").trim() : (d.textContent || "").replace(/[\u200B]/g, "").trim();
1446
+ (C === "report-module" || F) && (S[D] = F);
1447
1447
  }
1448
- }), t.current.querySelectorAll('[data-type="datepicker"]').forEach((c) => {
1449
- const M = c.dataset.key;
1450
- if (M) {
1451
- const S = (c.getAttribute("data-value") || "").trim();
1452
- S && (N[M] = S);
1448
+ }), t.current.querySelectorAll('[data-type="datepicker"]').forEach((d) => {
1449
+ const D = d.dataset.key;
1450
+ if (D) {
1451
+ const C = (d.getAttribute("data-value") || "").trim();
1452
+ C && (S[D] = C);
1453
1453
  }
1454
- })), Zn(
1454
+ })), sr(
1455
1455
  t,
1456
1456
  y,
1457
1457
  s,
1458
1458
  o,
1459
- N,
1459
+ S,
1460
1460
  b,
1461
1461
  A,
1462
1462
  $
@@ -1469,22 +1469,22 @@ function er(t, y, s, o, b = {}, T, I, A, $) {
1469
1469
  );
1470
1470
  if (n) {
1471
1471
  try {
1472
- const r = document.createRange(), d = document.createTreeWalker(
1472
+ const r = document.createRange(), u = document.createTreeWalker(
1473
1473
  n,
1474
1474
  NodeFilter.SHOW_TEXT,
1475
1475
  null
1476
1476
  );
1477
- let c = 0, M = null, S = 0;
1478
- for (; d.nextNode(); ) {
1479
- const F = d.currentNode, Y = F.textContent?.length || 0;
1480
- if (c + Y >= e) {
1481
- M = F, S = e - c;
1477
+ let d = 0, D = null, C = 0;
1478
+ for (; u.nextNode(); ) {
1479
+ const F = u.currentNode, Y = F.textContent?.length || 0;
1480
+ if (d + Y >= e) {
1481
+ D = F, C = e - d;
1482
1482
  break;
1483
1483
  }
1484
- c += Y;
1484
+ d += Y;
1485
1485
  }
1486
- if (M) {
1487
- r.setStart(M, Math.min(S, M.textContent?.length || 0)), r.collapse(!0);
1486
+ if (D) {
1487
+ r.setStart(D, Math.min(C, D.textContent?.length || 0)), r.collapse(!0);
1488
1488
  const F = window.getSelection();
1489
1489
  F && (F.removeAllRanges(), F.addRange(r), n.focus());
1490
1490
  } else {
@@ -1495,58 +1495,58 @@ function er(t, y, s, o, b = {}, T, I, A, $) {
1495
1495
  } catch {
1496
1496
  const r = document.createRange();
1497
1497
  r.selectNodeContents(n), r.collapse(!1);
1498
- const d = window.getSelection();
1499
- d && (d.removeAllRanges(), d.addRange(r), n.focus());
1498
+ const u = window.getSelection();
1499
+ u && (u.removeAllRanges(), u.addRange(r), n.focus());
1500
1500
  }
1501
1501
  T.current = null;
1502
1502
  }
1503
1503
  }, 0);
1504
1504
  }
1505
1505
  }, [y, s, o, t, b, T, I, A, $]);
1506
- ye(() => {
1507
- C();
1508
- }, [C]);
1506
+ fe(() => {
1507
+ E();
1508
+ }, [E]);
1509
1509
  }
1510
- function tr(t, y, s, o) {
1511
- ye(() => {
1510
+ function ir(t, y, s, o) {
1511
+ fe(() => {
1512
1512
  const b = t.current;
1513
1513
  if (!b) return;
1514
1514
  const T = ($) => $.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test($.name || ""), I = ($) => {
1515
- const C = $.target?.closest(".upload-info-icon");
1516
- if (C && C.classList.contains("upload-info-icon")) {
1517
- const w = C.dataset.uploadKey;
1515
+ const E = $.target?.closest(".upload-info-icon");
1516
+ if (E && E.classList.contains("upload-info-icon")) {
1517
+ const w = E.dataset.uploadKey;
1518
1518
  if (w) {
1519
- const P = C.closest('[data-type="upload"]');
1520
- o(P ? { key: w, anchorEl: P, type: "upload" } : { key: w, anchorEl: C, type: "upload" });
1519
+ const V = E.closest('[data-type="upload"]');
1520
+ o(V ? { key: w, anchorEl: V, type: "upload" } : { key: w, anchorEl: E, type: "upload" });
1521
1521
  }
1522
1522
  return;
1523
1523
  }
1524
- const N = $.target?.closest('[data-type="upload"]');
1525
- if (N) {
1526
- const w = N.dataset.key;
1524
+ const S = $.target?.closest('[data-type="upload"]');
1525
+ if (S) {
1526
+ const w = S.dataset.key;
1527
1527
  if (w) {
1528
- const P = s[w];
1529
- P && T(P) && o({ key: w, anchorEl: N, type: "upload-preview" });
1528
+ const V = s[w];
1529
+ V && T(V) && o({ key: w, anchorEl: S, type: "upload-preview" });
1530
1530
  }
1531
1531
  }
1532
1532
  }, A = ($) => {
1533
- const C = $.target?.closest(".upload-info-icon"), N = $.relatedTarget;
1534
- if (C && C.classList.contains("upload-info-icon")) {
1535
- const P = C.closest('[data-type="upload"]');
1536
- if (N && P && P.contains(N))
1533
+ const E = $.target?.closest(".upload-info-icon"), S = $.relatedTarget;
1534
+ if (E && E.classList.contains("upload-info-icon")) {
1535
+ const V = E.closest('[data-type="upload"]');
1536
+ if (S && V && V.contains(S))
1537
1537
  return;
1538
- if (!N || !b.contains(N))
1538
+ if (!S || !b.contains(S))
1539
1539
  o(null);
1540
1540
  else {
1541
- const k = N.closest('[data-type="upload"]');
1542
- (!k || k !== P) && o(null);
1541
+ const k = S.closest('[data-type="upload"]');
1542
+ (!k || k !== V) && o(null);
1543
1543
  }
1544
1544
  return;
1545
1545
  }
1546
1546
  const w = $.target?.closest('[data-type="upload"]');
1547
1547
  if (w) {
1548
- const P = N;
1549
- if (P && w.contains(P))
1548
+ const V = S;
1549
+ if (V && w.contains(V))
1550
1550
  return;
1551
1551
  o(null);
1552
1552
  }
@@ -1556,14 +1556,14 @@ function tr(t, y, s, o) {
1556
1556
  };
1557
1557
  }, [y, s, t, o]);
1558
1558
  }
1559
- function nr(t, y, s, o) {
1560
- ye(() => {
1559
+ function cr(t, y, s, o) {
1560
+ fe(() => {
1561
1561
  if (!t.current) return;
1562
1562
  const b = ($) => {
1563
1563
  if (o === "hideTagClose")
1564
1564
  return;
1565
- const C = $.currentTarget, N = C.dataset.tooltip, w = C.dataset.tagKey || "";
1566
- N && s({ key: w, anchorEl: C, type: "tag" });
1565
+ const E = $.currentTarget, S = E.dataset.tooltip, w = E.dataset.tagKey || "";
1566
+ S && s({ key: w, anchorEl: E, type: "tag" });
1567
1567
  }, T = () => {
1568
1568
  s(null);
1569
1569
  };
@@ -1572,8 +1572,8 @@ function nr(t, y, s, o) {
1572
1572
  if (!t.current) return;
1573
1573
  t.current.querySelectorAll(
1574
1574
  ".tag-node[data-tooltip]"
1575
- ).forEach((C) => {
1576
- C.addEventListener("mouseenter", b), C.addEventListener("mouseleave", T);
1575
+ ).forEach((E) => {
1576
+ E.addEventListener("mouseenter", b), E.addEventListener("mouseleave", T);
1577
1577
  });
1578
1578
  };
1579
1579
  return I = requestAnimationFrame(() => {
@@ -1581,14 +1581,14 @@ function nr(t, y, s, o) {
1581
1581
  }), () => {
1582
1582
  cancelAnimationFrame(I), t.current && t.current.querySelectorAll(
1583
1583
  ".tag-node[data-tooltip]"
1584
- ).forEach((C) => {
1585
- C.removeEventListener("mouseenter", b), C.removeEventListener("mouseleave", T);
1584
+ ).forEach((E) => {
1585
+ E.removeEventListener("mouseenter", b), E.removeEventListener("mouseleave", T);
1586
1586
  });
1587
1587
  };
1588
1588
  }, [y, t, s, o]);
1589
1589
  }
1590
- function rr(t, y, s) {
1591
- ye(() => {
1590
+ function ur(t, y, s) {
1591
+ fe(() => {
1592
1592
  const o = t.current;
1593
1593
  if (!o) return;
1594
1594
  const b = (I) => {
@@ -1606,16 +1606,16 @@ function rr(t, y, s) {
1606
1606
  };
1607
1607
  }, [y, t, s]);
1608
1608
  }
1609
- function ar(t, y, s, o) {
1610
- ye(() => {
1609
+ function dr(t, y, s, o) {
1610
+ fe(() => {
1611
1611
  if (!t.current) return;
1612
- const b = (C) => C.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(C.name || ""), T = (C) => {
1613
- const N = C.currentTarget, w = N.dataset.fileName, P = N.closest('[data-type="upload"]'), k = P?.dataset.key || "", e = k ? s[k] : null;
1612
+ const b = (E) => E.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(E.name || ""), T = (E) => {
1613
+ const S = E.currentTarget, w = S.dataset.fileName, V = S.closest('[data-type="upload"]'), k = V?.dataset.key || "", e = k ? s[k] : null;
1614
1614
  if (e && b(e)) {
1615
- o({ key: k, anchorEl: P || N, type: "upload-preview" });
1615
+ o({ key: k, anchorEl: V || S, type: "upload-preview" });
1616
1616
  return;
1617
1617
  }
1618
- w && o({ key: k, anchorEl: P || N, type: "upload-label" });
1618
+ w && o({ key: k, anchorEl: V || S, type: "upload-label" });
1619
1619
  }, I = () => {
1620
1620
  o(null);
1621
1621
  };
@@ -1624,8 +1624,8 @@ function ar(t, y, s, o) {
1624
1624
  if (!t.current) return;
1625
1625
  t.current.querySelectorAll(
1626
1626
  ".upload-label[data-file-name]"
1627
- ).forEach((N) => {
1628
- N.addEventListener("mouseenter", T), N.addEventListener("mouseleave", I);
1627
+ ).forEach((S) => {
1628
+ S.addEventListener("mouseenter", T), S.addEventListener("mouseleave", I);
1629
1629
  });
1630
1630
  };
1631
1631
  return A = requestAnimationFrame(() => {
@@ -1633,67 +1633,67 @@ function ar(t, y, s, o) {
1633
1633
  }), () => {
1634
1634
  cancelAnimationFrame(A), t.current && t.current.querySelectorAll(
1635
1635
  ".upload-label[data-file-name]"
1636
- ).forEach((N) => {
1637
- N.removeEventListener("mouseenter", T), N.removeEventListener("mouseleave", I);
1636
+ ).forEach((S) => {
1637
+ S.removeEventListener("mouseenter", T), S.removeEventListener("mouseleave", I);
1638
1638
  });
1639
1639
  };
1640
1640
  }, [y, s, t, o]);
1641
1641
  }
1642
- function or(t, y, s, o) {
1643
- ye(() => {
1642
+ function pr(t, y, s, o) {
1643
+ fe(() => {
1644
1644
  const b = setTimeout(() => {
1645
- wt(t, y, s), kt(t, y, s, o);
1645
+ St(t, y, s), Nt(t, y, s, o);
1646
1646
  }, 0);
1647
1647
  return () => clearTimeout(b);
1648
1648
  }, [s, y, t, o]);
1649
1649
  }
1650
- function sr(t, y) {
1650
+ function fr(t, y) {
1651
1651
  const s = te(0), o = te(0);
1652
- ye(() => {
1652
+ fe(() => {
1653
1653
  if (!t.current) return;
1654
1654
  let b = !1, T = 0;
1655
- const I = (c) => c instanceof HTMLElement ? !!(c.closest(".rte-datepicker-wrapper") || c.closest(".rte-datepicker-host") || c.closest(".ant-picker") || c.closest(".ant-picker-dropdown")) : !1, A = (c) => c instanceof HTMLElement ? !!(c.closest(".rte-select-wrapper") || c.closest(".rte-select-host") || c.closest(".ant-select") || c.closest(".ant-select-dropdown")) : !1, $ = (c) => {
1656
- b = !0, I(c.target) && (s.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target")), A(c.target) && (o.current = Date.now(), console.log("[SelectionCtrl] mousedown on select target"));
1657
- }, C = () => {
1655
+ const I = (d) => d instanceof HTMLElement ? !!(d.closest(".rte-datepicker-wrapper") || d.closest(".rte-datepicker-host") || d.closest(".ant-picker") || d.closest(".ant-picker-dropdown")) : !1, A = (d) => d instanceof HTMLElement ? !!(d.closest(".rte-select-wrapper") || d.closest(".rte-select-host") || d.closest(".ant-select") || d.closest(".ant-select-dropdown")) : !1, $ = (d) => {
1656
+ b = !0, I(d.target) && (s.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target")), A(d.target) && (o.current = Date.now(), console.log("[SelectionCtrl] mousedown on select target"));
1657
+ }, E = () => {
1658
1658
  b = !1, T = Date.now();
1659
1659
  };
1660
- let N = !1, w = 0;
1661
- const P = () => {
1662
- N = !0;
1660
+ let S = !1, w = 0;
1661
+ const V = () => {
1662
+ S = !0;
1663
1663
  }, k = () => {
1664
- N = !1, w = Date.now();
1664
+ S = !1, w = Date.now();
1665
1665
  }, e = () => {
1666
1666
  w = Date.now();
1667
- }, n = (c) => {
1668
- I(c.target) && (s.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target")), A(c.target) && (o.current = Date.now(), console.log("[SelectionCtrl] focusin select target"));
1667
+ }, n = (d) => {
1668
+ I(d.target) && (s.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target")), A(d.target) && (o.current = Date.now(), console.log("[SelectionCtrl] focusin select target"));
1669
1669
  }, r = () => {
1670
1670
  if (Date.now() - s.current < 800 || Date.now() - o.current < 800) {
1671
1671
  console.log("[SelectionCtrl] skip selectionchange due to recent picker/select interaction");
1672
1672
  return;
1673
1673
  }
1674
- const c = document.activeElement;
1675
- if (c && (c.closest(".rte-datepicker-wrapper") || c.closest(".rte-datepicker-host") || c.closest(".ant-picker-dropdown") || // Antd dropdown
1676
- c.tagName === "INPUT" && c.closest(".ant-picker") || c.closest(".rte-select-wrapper") || c.closest(".rte-select-host") || c.closest(".ant-select") || c.closest(".ant-select-dropdown"))) {
1674
+ const d = document.activeElement;
1675
+ if (d && (d.closest(".rte-datepicker-wrapper") || d.closest(".rte-datepicker-host") || d.closest(".ant-picker-dropdown") || // Antd dropdown
1676
+ d.tagName === "INPUT" && d.closest(".ant-picker") || d.closest(".rte-select-wrapper") || d.closest(".rte-select-host") || d.closest(".ant-select") || d.closest(".ant-select-dropdown"))) {
1677
1677
  console.log("[SelectionCtrl] activeElement is picker/select; skip");
1678
1678
  return;
1679
1679
  }
1680
1680
  if (!t.current) return;
1681
- const M = window.getSelection();
1682
- if (!M || M.rangeCount === 0 || y.current || b || N || Date.now() - w < 500)
1681
+ const D = window.getSelection();
1682
+ if (!D || D.rangeCount === 0 || y.current || b || S || Date.now() - w < 500)
1683
1683
  return;
1684
- const S = M.getRangeAt(0);
1685
- if (!S.collapsed)
1686
- return t.current.contains(S.commonAncestorContainer), void 0;
1687
- const F = M.anchorNode;
1684
+ const C = D.getRangeAt(0);
1685
+ if (!C.collapsed)
1686
+ return t.current.contains(C.commonAncestorContainer), void 0;
1687
+ const F = D.anchorNode;
1688
1688
  if (!F || !t.current.contains(F))
1689
1689
  return;
1690
1690
  let Y = !1, z = !1;
1691
1691
  if (F.nodeType === Node.ELEMENT_NODE) {
1692
- const V = F;
1693
- (V.closest('[data-type="datepicker"]') || V.closest(".rte-datepicker-wrapper") || V.closest(".rte-datepicker-host")) && (Y = !0), (V.closest('[data-type="select"]') || V.closest(".rte-select-wrapper") || V.closest(".rte-select-host")) && (z = !0);
1692
+ const _ = F;
1693
+ (_.closest('[data-type="datepicker"]') || _.closest(".rte-datepicker-wrapper") || _.closest(".rte-datepicker-host")) && (Y = !0), (_.closest('[data-type="select"]') || _.closest(".rte-select-wrapper") || _.closest(".rte-select-host")) && (z = !0);
1694
1694
  } else if (F.parentElement) {
1695
- const V = F.parentElement;
1696
- (V.closest('[data-type="datepicker"]') || V.closest(".rte-datepicker-wrapper") || V.closest(".rte-datepicker-host")) && (Y = !0), (V.closest('[data-type="select"]') || V.closest(".rte-select-wrapper") || V.closest(".rte-select-host")) && (z = !0);
1695
+ const _ = F.parentElement;
1696
+ (_.closest('[data-type="datepicker"]') || _.closest(".rte-datepicker-wrapper") || _.closest(".rte-datepicker-host")) && (Y = !0), (_.closest('[data-type="select"]') || _.closest(".rte-select-wrapper") || _.closest(".rte-select-host")) && (z = !0);
1697
1697
  }
1698
1698
  if (Y || z)
1699
1699
  return;
@@ -1701,318 +1701,318 @@ function sr(t, y) {
1701
1701
  if (F.nodeType === Node.ELEMENT_NODE ? O = F.closest('[data-type="variable"]') : F.nodeType === Node.TEXT_NODE && F.parentElement && (O = F.parentElement.closest('[data-type="variable"]')), !O) {
1702
1702
  if (Date.now() - T > 500)
1703
1703
  return;
1704
- const V = t.current.querySelectorAll('[data-type="variable"]');
1705
- if (V.length > 0) {
1704
+ const _ = t.current.querySelectorAll('[data-type="variable"]');
1705
+ if (_.length > 0) {
1706
1706
  let G = null;
1707
- for (const _ of Array.from(V))
1708
- if (_.style.display !== "none") {
1709
- G = _;
1707
+ for (const M of Array.from(_))
1708
+ if (M.style.display !== "none") {
1709
+ G = M;
1710
1710
  break;
1711
1711
  }
1712
- if (!G && V.length > 0 && (G = V[0]), G) {
1713
- const _ = document.createRange();
1714
- _.selectNodeContents(G), _.collapse(!1), M.removeAllRanges(), M.addRange(_), G.focus();
1712
+ if (!G && _.length > 0 && (G = _[0]), G) {
1713
+ const M = document.createRange();
1714
+ M.selectNodeContents(G), M.collapse(!1), D.removeAllRanges(), D.addRange(M), G.focus();
1715
1715
  } else
1716
- M.removeAllRanges();
1716
+ D.removeAllRanges();
1717
1717
  } else
1718
- M.removeAllRanges();
1718
+ D.removeAllRanges();
1719
1719
  }
1720
- }, d = t.current;
1721
- return d && (d.addEventListener("compositionstart", P), d.addEventListener("compositionend", k), d.addEventListener("input", e)), document.addEventListener("mousedown", $), document.addEventListener("mouseup", C), document.addEventListener("focusin", n), document.addEventListener("selectionchange", r), () => {
1722
- const c = t.current;
1723
- c && (c.removeEventListener("compositionstart", P), c.removeEventListener("compositionend", k), c.removeEventListener("input", e)), document.removeEventListener("mousedown", $), document.removeEventListener("mouseup", C), document.removeEventListener("focusin", n), document.removeEventListener("selectionchange", r);
1720
+ }, u = t.current;
1721
+ return u && (u.addEventListener("compositionstart", V), u.addEventListener("compositionend", k), u.addEventListener("input", e)), document.addEventListener("mousedown", $), document.addEventListener("mouseup", E), document.addEventListener("focusin", n), document.addEventListener("selectionchange", r), () => {
1722
+ const d = t.current;
1723
+ d && (d.removeEventListener("compositionstart", V), d.removeEventListener("compositionend", k), d.removeEventListener("input", e)), document.removeEventListener("mousedown", $), document.removeEventListener("mouseup", E), document.removeEventListener("focusin", n), document.removeEventListener("selectionchange", r);
1724
1724
  };
1725
1725
  }, [t, y]);
1726
1726
  }
1727
- function lr(t) {
1727
+ function mr(t) {
1728
1728
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1729
1729
  }
1730
- var it = { exports: {} }, ir = it.exports, Ft;
1731
- function Kt() {
1732
- return Ft || (Ft = 1, function(t, y) {
1730
+ var mt = { exports: {} }, yr = mt.exports, Xt;
1731
+ function nn() {
1732
+ return Xt || (Xt = 1, function(t, y) {
1733
1733
  (function(s, o) {
1734
1734
  t.exports = o();
1735
- })(ir, function() {
1736
- var s = 1e3, o = 6e4, b = 36e5, T = "millisecond", I = "second", A = "minute", $ = "hour", C = "day", N = "week", w = "month", P = "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+)?$/, d = /\[([^\]]+)]|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, c = { 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(u) {
1737
- var p = ["th", "st", "nd", "rd"], v = u % 100;
1738
- return "[" + u + (p[(v - 20) % 10] || p[v] || p[0]) + "]";
1739
- } }, M = function(u, p, v) {
1740
- var D = String(u);
1741
- return !D || D.length >= p ? u : "" + Array(p + 1 - D.length).join(v) + u;
1742
- }, S = { s: M, z: function(u) {
1743
- var p = -u.utcOffset(), v = Math.abs(p), D = Math.floor(v / 60), B = v % 60;
1744
- return (p <= 0 ? "+" : "-") + M(D, 2, "0") + ":" + M(B, 2, "0");
1745
- }, m: function u(p, v) {
1746
- if (p.date() < v.date()) return -u(v, p);
1747
- var D = 12 * (v.year() - p.year()) + (v.month() - p.month()), B = p.clone().add(D, w), W = v - B < 0, X = p.clone().add(D + (W ? -1 : 1), w);
1748
- return +(-(D + (v - B) / (W ? B - X : X - B)) || 0);
1749
- }, a: function(u) {
1750
- return u < 0 ? Math.ceil(u) || 0 : Math.floor(u);
1751
- }, p: function(u) {
1752
- return { M: w, y: k, w: N, d: C, D: e, h: $, m: A, s: I, ms: T, Q: P }[u] || String(u || "").toLowerCase().replace(/s$/, "");
1753
- }, u: function(u) {
1754
- return u === void 0;
1735
+ })(yr, function() {
1736
+ var s = 1e3, o = 6e4, b = 36e5, T = "millisecond", I = "second", A = "minute", $ = "hour", E = "day", S = "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"], v = p % 100;
1738
+ return "[" + p + (c[(v - 20) % 10] || c[v] || c[0]) + "]";
1739
+ } }, D = function(p, c, v) {
1740
+ var P = String(p);
1741
+ return !P || P.length >= c ? p : "" + Array(c + 1 - P.length).join(v) + p;
1742
+ }, C = { s: D, z: function(p) {
1743
+ var c = -p.utcOffset(), v = Math.abs(c), P = Math.floor(v / 60), B = v % 60;
1744
+ return (c <= 0 ? "+" : "-") + D(P, 2, "0") + ":" + D(B, 2, "0");
1745
+ }, m: function p(c, v) {
1746
+ if (c.date() < v.date()) return -p(v, c);
1747
+ var P = 12 * (v.year() - c.year()) + (v.month() - c.month()), B = c.clone().add(P, w), j = v - B < 0, J = c.clone().add(P + (j ? -1 : 1), w);
1748
+ return +(-(P + (v - B) / (j ? B - J : J - B)) || 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: S, d: E, D: e, h: $, m: A, s: I, ms: T, Q: V }[p] || String(p || "").toLowerCase().replace(/s$/, "");
1753
+ }, u: function(p) {
1754
+ return p === void 0;
1755
1755
  } }, F = "en", Y = {};
1756
- Y[F] = c;
1757
- var z = "$isDayjsObject", O = function(u) {
1758
- return u instanceof R || !(!u || !u[z]);
1759
- }, V = function u(p, v, D) {
1756
+ Y[F] = d;
1757
+ var z = "$isDayjsObject", O = function(p) {
1758
+ return p instanceof R || !(!p || !p[z]);
1759
+ }, _ = function p(c, v, P) {
1760
1760
  var B;
1761
- if (!p) return F;
1762
- if (typeof p == "string") {
1763
- var W = p.toLowerCase();
1764
- Y[W] && (B = W), v && (Y[W] = v, B = W);
1765
- var X = p.split("-");
1766
- if (!B && X.length > 1) return u(X[0]);
1761
+ if (!c) return F;
1762
+ if (typeof c == "string") {
1763
+ var j = c.toLowerCase();
1764
+ Y[j] && (B = j), v && (Y[j] = v, B = j);
1765
+ var J = c.split("-");
1766
+ if (!B && J.length > 1) return p(J[0]);
1767
1767
  } else {
1768
- var ne = p.name;
1769
- Y[ne] = p, B = ne;
1768
+ var re = c.name;
1769
+ Y[re] = c, B = re;
1770
1770
  }
1771
- return !D && B && (F = B), B || !D && F;
1772
- }, G = function(u, p) {
1773
- if (O(u)) return u.clone();
1774
- var v = typeof p == "object" ? p : {};
1775
- return v.date = u, v.args = arguments, new R(v);
1776
- }, _ = S;
1777
- _.l = V, _.i = O, _.w = function(u, p) {
1778
- return G(u, { locale: p.$L, utc: p.$u, x: p.$x, $offset: p.$offset });
1771
+ return !P && B && (F = B), B || !P && F;
1772
+ }, G = function(p, c) {
1773
+ if (O(p)) return p.clone();
1774
+ var v = typeof c == "object" ? c : {};
1775
+ return v.date = p, v.args = arguments, new R(v);
1776
+ }, M = C;
1777
+ M.l = _, M.i = O, M.w = function(p, c) {
1778
+ return G(p, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
1779
1779
  };
1780
1780
  var R = function() {
1781
- function u(v) {
1782
- this.$L = V(v.locale, null, !0), this.parse(v), this.$x = this.$x || v.x || {}, this[z] = !0;
1781
+ function p(v) {
1782
+ this.$L = _(v.locale, null, !0), this.parse(v), this.$x = this.$x || v.x || {}, this[z] = !0;
1783
1783
  }
1784
- var p = u.prototype;
1785
- return p.parse = function(v) {
1786
- this.$d = function(D) {
1787
- var B = D.date, W = D.utc;
1784
+ var c = p.prototype;
1785
+ return c.parse = function(v) {
1786
+ this.$d = function(P) {
1787
+ var B = P.date, j = P.utc;
1788
1788
  if (B === null) return /* @__PURE__ */ new Date(NaN);
1789
- if (_.u(B)) return /* @__PURE__ */ new Date();
1789
+ if (M.u(B)) return /* @__PURE__ */ new Date();
1790
1790
  if (B instanceof Date) return new Date(B);
1791
1791
  if (typeof B == "string" && !/Z$/i.test(B)) {
1792
- var X = B.match(r);
1793
- if (X) {
1794
- var ne = X[2] - 1 || 0, pe = (X[7] || "0").substring(0, 3);
1795
- return W ? new Date(Date.UTC(X[1], ne, X[3] || 1, X[4] || 0, X[5] || 0, X[6] || 0, pe)) : new Date(X[1], ne, X[3] || 1, X[4] || 0, X[5] || 0, X[6] || 0, pe);
1792
+ var J = B.match(r);
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);
1796
1796
  }
1797
1797
  }
1798
1798
  return new Date(B);
1799
1799
  }(v), this.init();
1800
- }, p.init = function() {
1800
+ }, c.init = function() {
1801
1801
  var v = this.$d;
1802
1802
  this.$y = v.getFullYear(), this.$M = v.getMonth(), this.$D = v.getDate(), this.$W = v.getDay(), this.$H = v.getHours(), this.$m = v.getMinutes(), this.$s = v.getSeconds(), this.$ms = v.getMilliseconds();
1803
- }, p.$utils = function() {
1804
- return _;
1805
- }, p.isValid = function() {
1803
+ }, c.$utils = function() {
1804
+ return M;
1805
+ }, c.isValid = function() {
1806
1806
  return this.$d.toString() !== n;
1807
- }, p.isSame = function(v, D) {
1807
+ }, c.isSame = function(v, P) {
1808
1808
  var B = G(v);
1809
- return this.startOf(D) <= B && B <= this.endOf(D);
1810
- }, p.isAfter = function(v, D) {
1811
- return G(v) < this.startOf(D);
1812
- }, p.isBefore = function(v, D) {
1813
- return this.endOf(D) < G(v);
1814
- }, p.$g = function(v, D, B) {
1815
- return _.u(v) ? this[D] : this.set(B, v);
1816
- }, p.unix = function() {
1809
+ return this.startOf(P) <= B && B <= this.endOf(P);
1810
+ }, c.isAfter = function(v, P) {
1811
+ return G(v) < this.startOf(P);
1812
+ }, c.isBefore = function(v, P) {
1813
+ return this.endOf(P) < G(v);
1814
+ }, c.$g = function(v, P, B) {
1815
+ return M.u(v) ? this[P] : this.set(B, v);
1816
+ }, c.unix = function() {
1817
1817
  return Math.floor(this.valueOf() / 1e3);
1818
- }, p.valueOf = function() {
1818
+ }, c.valueOf = function() {
1819
1819
  return this.$d.getTime();
1820
- }, p.startOf = function(v, D) {
1821
- var B = this, W = !!_.u(D) || D, X = _.p(v), ne = function(xe, ge) {
1822
- var fe = _.w(B.$u ? Date.UTC(B.$y, ge, xe) : new Date(B.$y, ge, xe), B);
1823
- return W ? fe : fe.endOf(C);
1824
- }, pe = function(xe, ge) {
1825
- return _.w(B.toDate()[xe].apply(B.toDate("s"), (W ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ge)), B);
1826
- }, E = this.$W, oe = this.$M, re = this.$D, we = "set" + (this.$u ? "UTC" : "");
1827
- switch (X) {
1820
+ }, c.startOf = function(v, P) {
1821
+ var B = this, j = !!M.u(P) || P, J = M.p(v), re = function($e, xe) {
1822
+ var qe = M.w(B.$u ? Date.UTC(B.$y, xe, $e) : new Date(B.$y, xe, $e), B);
1823
+ return j ? qe : qe.endOf(E);
1824
+ }, me = function($e, xe) {
1825
+ return M.w(B.toDate()[$e].apply(B.toDate("s"), (j ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(xe)), B);
1826
+ }, de = this.$W, ye = this.$M, N = this.$D, be = "set" + (this.$u ? "UTC" : "");
1827
+ switch (J) {
1828
1828
  case k:
1829
- return W ? ne(1, 0) : ne(31, 11);
1829
+ return j ? re(1, 0) : re(31, 11);
1830
1830
  case w:
1831
- return W ? ne(1, oe) : ne(0, oe + 1);
1832
- case N:
1833
- var ae = this.$locale().weekStart || 0, he = (E < ae ? E + 7 : E) - ae;
1834
- return ne(W ? re - he : re + (6 - he), oe);
1835
- case C:
1831
+ return j ? re(1, ye) : re(0, ye + 1);
1832
+ case S:
1833
+ var U = this.$locale().weekStart || 0, ge = (de < U ? de + 7 : de) - U;
1834
+ return re(j ? N - ge : N + (6 - ge), ye);
1835
+ case E:
1836
1836
  case e:
1837
- return pe(we + "Hours", 0);
1837
+ return me(be + "Hours", 0);
1838
1838
  case $:
1839
- return pe(we + "Minutes", 1);
1839
+ return me(be + "Minutes", 1);
1840
1840
  case A:
1841
- return pe(we + "Seconds", 2);
1841
+ return me(be + "Seconds", 2);
1842
1842
  case I:
1843
- return pe(we + "Milliseconds", 3);
1843
+ return me(be + "Milliseconds", 3);
1844
1844
  default:
1845
1845
  return this.clone();
1846
1846
  }
1847
- }, p.endOf = function(v) {
1847
+ }, c.endOf = function(v) {
1848
1848
  return this.startOf(v, !1);
1849
- }, p.$set = function(v, D) {
1850
- var B, W = _.p(v), X = "set" + (this.$u ? "UTC" : ""), ne = (B = {}, B[C] = X + "Date", B[e] = X + "Date", B[w] = X + "Month", B[k] = X + "FullYear", B[$] = X + "Hours", B[A] = X + "Minutes", B[I] = X + "Seconds", B[T] = X + "Milliseconds", B)[W], pe = W === C ? this.$D + (D - this.$W) : D;
1851
- if (W === w || W === k) {
1852
- var E = this.clone().set(e, 1);
1853
- E.$d[ne](pe), E.init(), this.$d = E.set(e, Math.min(this.$D, E.daysInMonth())).$d;
1854
- } else ne && this.$d[ne](pe);
1849
+ }, c.$set = function(v, P) {
1850
+ var B, j = M.p(v), J = "set" + (this.$u ? "UTC" : ""), re = (B = {}, B[E] = J + "Date", B[e] = J + "Date", B[w] = J + "Month", B[k] = J + "FullYear", B[$] = J + "Hours", B[A] = J + "Minutes", B[I] = J + "Seconds", B[T] = J + "Milliseconds", B)[j], me = j === E ? this.$D + (P - this.$W) : P;
1851
+ if (j === w || j === k) {
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);
1855
1855
  return this.init(), this;
1856
- }, p.set = function(v, D) {
1857
- return this.clone().$set(v, D);
1858
- }, p.get = function(v) {
1859
- return this[_.p(v)]();
1860
- }, p.add = function(v, D) {
1861
- var B, W = this;
1856
+ }, c.set = function(v, P) {
1857
+ return this.clone().$set(v, P);
1858
+ }, c.get = function(v) {
1859
+ return this[M.p(v)]();
1860
+ }, c.add = function(v, P) {
1861
+ var B, j = this;
1862
1862
  v = Number(v);
1863
- var X = _.p(D), ne = function(oe) {
1864
- var re = G(W);
1865
- return _.w(re.date(re.date() + Math.round(oe * v)), W);
1863
+ var J = M.p(P), re = function(ye) {
1864
+ var N = G(j);
1865
+ return M.w(N.date(N.date() + Math.round(ye * v)), j);
1866
1866
  };
1867
- if (X === w) return this.set(w, this.$M + v);
1868
- if (X === k) return this.set(k, this.$y + v);
1869
- if (X === C) return ne(1);
1870
- if (X === N) return ne(7);
1871
- var pe = (B = {}, B[A] = o, B[$] = b, B[I] = s, B)[X] || 1, E = this.$d.getTime() + v * pe;
1872
- return _.w(E, this);
1873
- }, p.subtract = function(v, D) {
1874
- return this.add(-1 * v, D);
1875
- }, p.format = function(v) {
1876
- var D = this, B = this.$locale();
1867
+ if (J === w) return this.set(w, this.$M + v);
1868
+ if (J === k) return this.set(k, this.$y + v);
1869
+ if (J === E) return re(1);
1870
+ if (J === S) return re(7);
1871
+ var me = (B = {}, B[A] = o, B[$] = b, B[I] = s, B)[J] || 1, de = this.$d.getTime() + v * me;
1872
+ return M.w(de, this);
1873
+ }, c.subtract = function(v, P) {
1874
+ return this.add(-1 * v, P);
1875
+ }, c.format = function(v) {
1876
+ var P = this, B = this.$locale();
1877
1877
  if (!this.isValid()) return B.invalidDate || n;
1878
- var W = v || "YYYY-MM-DDTHH:mm:ssZ", X = _.z(this), ne = this.$H, pe = this.$m, E = this.$M, oe = B.weekdays, re = B.months, we = B.meridiem, ae = function(ge, fe, Ce, Se) {
1879
- return ge && (ge[fe] || ge(D, W)) || Ce[fe].slice(0, Se);
1880
- }, he = function(ge) {
1881
- return _.s(ne % 12 || 12, ge, "0");
1882
- }, xe = we || function(ge, fe, Ce) {
1883
- var Se = ge < 12 ? "AM" : "PM";
1884
- return Ce ? Se.toLowerCase() : Se;
1878
+ var j = v || "YYYY-MM-DDTHH:mm:ssZ", J = M.z(this), re = this.$H, me = this.$m, de = this.$M, ye = B.weekdays, N = B.months, be = B.meridiem, U = function(xe, qe, Ae, he) {
1879
+ return xe && (xe[qe] || xe(P, j)) || Ae[qe].slice(0, he);
1880
+ }, ge = function(xe) {
1881
+ return M.s(re % 12 || 12, xe, "0");
1882
+ }, $e = be || function(xe, qe, Ae) {
1883
+ var he = xe < 12 ? "AM" : "PM";
1884
+ return Ae ? he.toLowerCase() : he;
1885
1885
  };
1886
- return W.replace(d, function(ge, fe) {
1887
- return fe || function(Ce) {
1888
- switch (Ce) {
1886
+ return j.replace(u, function(xe, qe) {
1887
+ return qe || function(Ae) {
1888
+ switch (Ae) {
1889
1889
  case "YY":
1890
- return String(D.$y).slice(-2);
1890
+ return String(P.$y).slice(-2);
1891
1891
  case "YYYY":
1892
- return _.s(D.$y, 4, "0");
1892
+ return M.s(P.$y, 4, "0");
1893
1893
  case "M":
1894
- return E + 1;
1894
+ return de + 1;
1895
1895
  case "MM":
1896
- return _.s(E + 1, 2, "0");
1896
+ return M.s(de + 1, 2, "0");
1897
1897
  case "MMM":
1898
- return ae(B.monthsShort, E, re, 3);
1898
+ return U(B.monthsShort, de, N, 3);
1899
1899
  case "MMMM":
1900
- return ae(re, E);
1900
+ return U(N, de);
1901
1901
  case "D":
1902
- return D.$D;
1902
+ return P.$D;
1903
1903
  case "DD":
1904
- return _.s(D.$D, 2, "0");
1904
+ return M.s(P.$D, 2, "0");
1905
1905
  case "d":
1906
- return String(D.$W);
1906
+ return String(P.$W);
1907
1907
  case "dd":
1908
- return ae(B.weekdaysMin, D.$W, oe, 2);
1908
+ return U(B.weekdaysMin, P.$W, ye, 2);
1909
1909
  case "ddd":
1910
- return ae(B.weekdaysShort, D.$W, oe, 3);
1910
+ return U(B.weekdaysShort, P.$W, ye, 3);
1911
1911
  case "dddd":
1912
- return oe[D.$W];
1912
+ return ye[P.$W];
1913
1913
  case "H":
1914
- return String(ne);
1914
+ return String(re);
1915
1915
  case "HH":
1916
- return _.s(ne, 2, "0");
1916
+ return M.s(re, 2, "0");
1917
1917
  case "h":
1918
- return he(1);
1918
+ return ge(1);
1919
1919
  case "hh":
1920
- return he(2);
1920
+ return ge(2);
1921
1921
  case "a":
1922
- return xe(ne, pe, !0);
1922
+ return $e(re, me, !0);
1923
1923
  case "A":
1924
- return xe(ne, pe, !1);
1924
+ return $e(re, me, !1);
1925
1925
  case "m":
1926
- return String(pe);
1926
+ return String(me);
1927
1927
  case "mm":
1928
- return _.s(pe, 2, "0");
1928
+ return M.s(me, 2, "0");
1929
1929
  case "s":
1930
- return String(D.$s);
1930
+ return String(P.$s);
1931
1931
  case "ss":
1932
- return _.s(D.$s, 2, "0");
1932
+ return M.s(P.$s, 2, "0");
1933
1933
  case "SSS":
1934
- return _.s(D.$ms, 3, "0");
1934
+ return M.s(P.$ms, 3, "0");
1935
1935
  case "Z":
1936
- return X;
1936
+ return J;
1937
1937
  }
1938
1938
  return null;
1939
- }(ge) || X.replace(":", "");
1939
+ }(xe) || J.replace(":", "");
1940
1940
  });
1941
- }, p.utcOffset = function() {
1941
+ }, c.utcOffset = function() {
1942
1942
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1943
- }, p.diff = function(v, D, B) {
1944
- var W, X = this, ne = _.p(D), pe = G(v), E = (pe.utcOffset() - this.utcOffset()) * o, oe = this - pe, re = function() {
1945
- return _.m(X, pe);
1943
+ }, c.diff = function(v, P, B) {
1944
+ var j, J = this, re = M.p(P), me = G(v), de = (me.utcOffset() - this.utcOffset()) * o, ye = this - me, N = function() {
1945
+ return M.m(J, me);
1946
1946
  };
1947
- switch (ne) {
1947
+ switch (re) {
1948
1948
  case k:
1949
- W = re() / 12;
1949
+ j = N() / 12;
1950
1950
  break;
1951
1951
  case w:
1952
- W = re();
1952
+ j = N();
1953
1953
  break;
1954
- case P:
1955
- W = re() / 3;
1954
+ case V:
1955
+ j = N() / 3;
1956
1956
  break;
1957
- case N:
1958
- W = (oe - E) / 6048e5;
1957
+ case S:
1958
+ j = (ye - de) / 6048e5;
1959
1959
  break;
1960
- case C:
1961
- W = (oe - E) / 864e5;
1960
+ case E:
1961
+ j = (ye - de) / 864e5;
1962
1962
  break;
1963
1963
  case $:
1964
- W = oe / b;
1964
+ j = ye / b;
1965
1965
  break;
1966
1966
  case A:
1967
- W = oe / o;
1967
+ j = ye / o;
1968
1968
  break;
1969
1969
  case I:
1970
- W = oe / s;
1970
+ j = ye / s;
1971
1971
  break;
1972
1972
  default:
1973
- W = oe;
1973
+ j = ye;
1974
1974
  }
1975
- return B ? W : _.a(W);
1976
- }, p.daysInMonth = function() {
1975
+ return B ? j : M.a(j);
1976
+ }, c.daysInMonth = function() {
1977
1977
  return this.endOf(w).$D;
1978
- }, p.$locale = function() {
1978
+ }, c.$locale = function() {
1979
1979
  return Y[this.$L];
1980
- }, p.locale = function(v, D) {
1980
+ }, c.locale = function(v, P) {
1981
1981
  if (!v) return this.$L;
1982
- var B = this.clone(), W = V(v, D, !0);
1983
- return W && (B.$L = W), B;
1984
- }, p.clone = function() {
1985
- return _.w(this.$d, this);
1986
- }, p.toDate = function() {
1982
+ var B = this.clone(), j = _(v, P, !0);
1983
+ return j && (B.$L = j), B;
1984
+ }, c.clone = function() {
1985
+ return M.w(this.$d, this);
1986
+ }, c.toDate = function() {
1987
1987
  return new Date(this.valueOf());
1988
- }, p.toJSON = function() {
1988
+ }, c.toJSON = function() {
1989
1989
  return this.isValid() ? this.toISOString() : null;
1990
- }, p.toISOString = function() {
1990
+ }, c.toISOString = function() {
1991
1991
  return this.$d.toISOString();
1992
- }, p.toString = function() {
1992
+ }, c.toString = function() {
1993
1993
  return this.$d.toUTCString();
1994
- }, u;
1995
- }(), J = R.prototype;
1996
- return G.prototype = J, [["$ms", T], ["$s", I], ["$m", A], ["$H", $], ["$W", C], ["$M", w], ["$y", k], ["$D", e]].forEach(function(u) {
1997
- J[u[1]] = function(p) {
1998
- return this.$g(p, u[0], u[1]);
1994
+ }, p;
1995
+ }(), X = R.prototype;
1996
+ return G.prototype = X, [["$ms", T], ["$s", I], ["$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]);
1999
1999
  };
2000
- }), G.extend = function(u, p) {
2001
- return u.$i || (u(p, R, G), u.$i = !0), G;
2002
- }, G.locale = V, G.isDayjs = O, G.unix = function(u) {
2003
- return G(1e3 * u);
2000
+ }), G.extend = function(p, c) {
2001
+ return p.$i || (p(c, R, G), p.$i = !0), G;
2002
+ }, G.locale = _, G.isDayjs = O, G.unix = function(p) {
2003
+ return G(1e3 * p);
2004
2004
  }, G.en = Y[F], G.Ls = Y, G.p = {}, G;
2005
2005
  });
2006
- }(it)), it.exports;
2006
+ }(mt)), mt.exports;
2007
2007
  }
2008
- var cr = Kt();
2009
- const ct = /* @__PURE__ */ lr(cr);
2010
- var ut = { exports: {} }, ur = ut.exports, zt;
2011
- function dr() {
2012
- return zt || (zt = 1, function(t, y) {
2008
+ var hr = nn();
2009
+ const yt = /* @__PURE__ */ mr(hr);
2010
+ var ht = { exports: {} }, gr = ht.exports, Jt;
2011
+ function br() {
2012
+ return Jt || (Jt = 1, function(t, y) {
2013
2013
  (function(s, o) {
2014
- t.exports = o(Kt());
2015
- })(ur, function(s) {
2014
+ t.exports = o(nn());
2015
+ })(gr, function(s) {
2016
2016
  function o(I) {
2017
2017
  return I && typeof I == "object" && "default" in I ? I : { default: I };
2018
2018
  }
@@ -2024,40 +2024,40 @@ function dr() {
2024
2024
  } };
2025
2025
  return b.default.locale(T, null, !0), T;
2026
2026
  });
2027
- }(ut)), ut.exports;
2027
+ }(ht)), ht.exports;
2028
2028
  }
2029
- dr();
2030
- function je(t) {
2029
+ br();
2030
+ function Qe(t) {
2031
2031
  "@babel/helpers - typeof";
2032
- return je = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(y) {
2032
+ return Qe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(y) {
2033
2033
  return typeof y;
2034
2034
  } : function(y) {
2035
2035
  return y && typeof Symbol == "function" && y.constructor === Symbol && y !== Symbol.prototype ? "symbol" : typeof y;
2036
- }, je(t);
2036
+ }, Qe(t);
2037
2037
  }
2038
- function pr(t, y) {
2039
- if (je(t) != "object" || !t) return t;
2038
+ function vr(t, y) {
2039
+ if (Qe(t) != "object" || !t) return t;
2040
2040
  var s = t[Symbol.toPrimitive];
2041
2041
  if (s !== void 0) {
2042
2042
  var o = s.call(t, y);
2043
- if (je(o) != "object") return o;
2043
+ if (Qe(o) != "object") return o;
2044
2044
  throw new TypeError("@@toPrimitive must return a primitive value.");
2045
2045
  }
2046
2046
  return (y === "string" ? String : Number)(t);
2047
2047
  }
2048
- function fr(t) {
2049
- var y = pr(t, "string");
2050
- return je(y) == "symbol" ? y : y + "";
2048
+ function xr(t) {
2049
+ var y = vr(t, "string");
2050
+ return Qe(y) == "symbol" ? y : y + "";
2051
2051
  }
2052
- function mr(t, y, s) {
2053
- return (y = fr(y)) in t ? Object.defineProperty(t, y, {
2052
+ function wr(t, y, s) {
2053
+ return (y = xr(y)) in t ? Object.defineProperty(t, y, {
2054
2054
  value: s,
2055
2055
  enumerable: !0,
2056
2056
  configurable: !0,
2057
2057
  writable: !0
2058
2058
  }) : t[y] = s, t;
2059
2059
  }
2060
- function Yt(t, y) {
2060
+ function Qt(t, y) {
2061
2061
  var s = Object.keys(t);
2062
2062
  if (Object.getOwnPropertySymbols) {
2063
2063
  var o = Object.getOwnPropertySymbols(t);
@@ -2067,23 +2067,23 @@ function Yt(t, y) {
2067
2067
  }
2068
2068
  return s;
2069
2069
  }
2070
- function jt(t) {
2070
+ function Zt(t) {
2071
2071
  for (var y = 1; y < arguments.length; y++) {
2072
2072
  var s = arguments[y] != null ? arguments[y] : {};
2073
- y % 2 ? Yt(Object(s), !0).forEach(function(o) {
2074
- mr(t, o, s[o]);
2075
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(s)) : Yt(Object(s)).forEach(function(o) {
2073
+ y % 2 ? Qt(Object(s), !0).forEach(function(o) {
2074
+ wr(t, o, s[o]);
2075
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(s)) : Qt(Object(s)).forEach(function(o) {
2076
2076
  Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(s, o));
2077
2077
  });
2078
2078
  }
2079
2079
  return t;
2080
2080
  }
2081
- var yr = {
2081
+ var kr = {
2082
2082
  yearFormat: "YYYY",
2083
2083
  dayFormat: "D",
2084
2084
  cellMeridiemFormat: "A",
2085
2085
  monthBeforeYear: !0
2086
- }, hr = jt(jt({}, yr), {}, {
2086
+ }, $r = Zt(Zt({}, kr), {}, {
2087
2087
  locale: "zh_CN",
2088
2088
  today: "今天",
2089
2089
  now: "此刻",
@@ -2111,10 +2111,10 @@ var yr = {
2111
2111
  cellDateFormat: "D",
2112
2112
  monthBeforeYear: !1
2113
2113
  });
2114
- const gr = {
2114
+ const Er = {
2115
2115
  placeholder: "请选择时间",
2116
2116
  rangePlaceholder: ["开始时间", "结束时间"]
2117
- }, Xt = {
2117
+ }, rn = {
2118
2118
  lang: Object.assign({
2119
2119
  placeholder: "请选择日期",
2120
2120
  yearPlaceholder: "请选择年份",
@@ -2126,69 +2126,69 @@ const gr = {
2126
2126
  rangeMonthPlaceholder: ["开始月份", "结束月份"],
2127
2127
  rangeQuarterPlaceholder: ["开始季度", "结束季度"],
2128
2128
  rangeWeekPlaceholder: ["开始周", "结束周"]
2129
- }, hr),
2130
- timePickerLocale: Object.assign({}, gr)
2129
+ }, $r),
2130
+ timePickerLocale: Object.assign({}, Er)
2131
2131
  };
2132
- Xt.lang.ok = "确定";
2133
- ct.locale("zh-cn");
2134
- const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2135
- const s = t.dataset.key, o = t.dataset.value, b = t.dataset.placeholder, T = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, I = t.dataset.disableFuture === "true", [A, $] = ce(() => {
2132
+ rn.lang.ok = "确定";
2133
+ yt.locale("zh-cn");
2134
+ const { RangePicker: Cr } = Ln, Tr = ({ host: t, onChange: y }) => {
2135
+ const s = t.dataset.key, o = t.dataset.value, b = t.dataset.placeholder, T = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, I = t.dataset.disableFuture === "true", [A, $] = oe(() => {
2136
2136
  if (!o) return null;
2137
2137
  const n = o.split(",");
2138
- return n.length === 2 && n[0] && n[1] ? [ct(n[0]), ct(n[1])] : null;
2139
- }), [C, N] = ce(null);
2140
- return St(
2138
+ return n.length === 2 && n[0] && n[1] ? [yt(n[0]), yt(n[1])] : null;
2139
+ }), [E, S] = oe(null);
2140
+ return Lt(
2141
2141
  /* @__PURE__ */ L("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__ */ L(
2142
- br,
2142
+ Cr,
2143
2143
  {
2144
2144
  value: A,
2145
- disabledDate: (n) => n ? I && n.isAfter(ct(), "day") ? !0 : !T || !C || !C[0] ? !1 : Math.abs(n.diff(C[0], "days")) > T : !1,
2145
+ disabledDate: (n) => n ? I && n.isAfter(yt(), "day") ? !0 : !T || !E || !E[0] ? !1 : Math.abs(n.diff(E[0], "days")) > T : !1,
2146
2146
  onCalendarChange: (n) => {
2147
- console.log("[DatePicker] onCalendarChange", n?.map((r) => r?.format("YYYY-MM-DD") || null)), N(n);
2147
+ console.log("[DatePicker] onCalendarChange", n?.map((r) => r?.format("YYYY-MM-DD") || null)), S(n);
2148
2148
  },
2149
2149
  onChange: (n) => {
2150
- if (console.log("[DatePicker] onChange", n?.map((r) => r?.format("YYYY-MM-DD") || null)), $(n), N(null), n && n[0] && n[1]) {
2150
+ if (console.log("[DatePicker] onChange", n?.map((r) => r?.format("YYYY-MM-DD") || null)), $(n), S(null), n && n[0] && n[1]) {
2151
2151
  const r = `${n[0].format("YYYY-MM-DD")},${n[1].format("YYYY-MM-DD")}`;
2152
2152
  t.setAttribute("data-value", r), y(s, r);
2153
2153
  } else
2154
2154
  t.setAttribute("data-value", ""), y(s, "");
2155
2155
  },
2156
2156
  onOpenChange: (n) => {
2157
- console.log("[DatePicker] onOpenChange", n), N(n ? A : null);
2157
+ console.log("[DatePicker] onOpenChange", n), S(n ? A : null);
2158
2158
  },
2159
2159
  placeholder: [b || "开始日期", b || "结束日期"],
2160
2160
  style: { width: "100%" },
2161
2161
  size: "small",
2162
2162
  allowClear: !0,
2163
- locale: Xt,
2163
+ locale: rn,
2164
2164
  getPopupContainer: () => document.body,
2165
2165
  popupClassName: "rte-datepicker-dropdown"
2166
2166
  }
2167
2167
  ) }),
2168
2168
  t
2169
2169
  );
2170
- }, xr = (t) => {
2171
- const [y, s] = ce([]);
2172
- return ye(() => {
2170
+ }, Sr = (t) => {
2171
+ const [y, s] = oe([]);
2172
+ return fe(() => {
2173
2173
  const o = t.current;
2174
2174
  if (!o) return;
2175
2175
  const b = () => {
2176
2176
  const I = o.querySelectorAll(".rte-datepicker-host"), A = [];
2177
2177
  I.forEach(($) => {
2178
- const C = $.getAttribute("data-key");
2179
- C && A.push(
2178
+ const E = $.getAttribute("data-key");
2179
+ E && A.push(
2180
2180
  /* @__PURE__ */ L(
2181
- vr,
2181
+ Tr,
2182
2182
  {
2183
2183
  host: $,
2184
2184
  onChange: () => {
2185
2185
  if (t.current) {
2186
- const N = new Event("input", { bubbles: !0 });
2187
- t.current.dispatchEvent(N);
2186
+ const S = new Event("input", { bubbles: !0 });
2187
+ t.current.dispatchEvent(S);
2188
2188
  }
2189
2189
  }
2190
2190
  },
2191
- `datepicker-${C}`
2191
+ `datepicker-${E}`
2192
2192
  )
2193
2193
  );
2194
2194
  }), s(A);
@@ -2198,18 +2198,18 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2198
2198
  let A = !1;
2199
2199
  for (const $ of I)
2200
2200
  if ($.type === "childList") {
2201
- let C = !1;
2202
- if ($.addedNodes.forEach((N) => {
2203
- if (N.nodeType === Node.ELEMENT_NODE) {
2204
- const w = N;
2205
- (w.classList?.contains("rte-datepicker-host") || w.querySelector?.(".rte-datepicker-host")) && (C = !0);
2201
+ let E = !1;
2202
+ if ($.addedNodes.forEach((S) => {
2203
+ if (S.nodeType === Node.ELEMENT_NODE) {
2204
+ const w = S;
2205
+ (w.classList?.contains("rte-datepicker-host") || w.querySelector?.(".rte-datepicker-host")) && (E = !0);
2206
2206
  }
2207
- }), $.removedNodes.forEach((N) => {
2208
- if (N.nodeType === Node.ELEMENT_NODE) {
2209
- const w = N;
2210
- (w.classList?.contains("rte-datepicker-host") || w.querySelector?.(".rte-datepicker-host")) && (C = !0);
2207
+ }), $.removedNodes.forEach((S) => {
2208
+ if (S.nodeType === Node.ELEMENT_NODE) {
2209
+ const w = S;
2210
+ (w.classList?.contains("rte-datepicker-host") || w.querySelector?.(".rte-datepicker-host")) && (E = !0);
2211
2211
  }
2212
- }), C) {
2212
+ }), E) {
2213
2213
  A = !0;
2214
2214
  break;
2215
2215
  }
@@ -2218,7 +2218,7 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2218
2218
  });
2219
2219
  return T.observe(o, { childList: !0, subtree: !0 }), () => T.disconnect();
2220
2220
  }, [t]), y;
2221
- }, wr = ({
2221
+ }, Nr = ({
2222
2222
  config: t,
2223
2223
  onSend: y,
2224
2224
  isProcessing: s = !1,
@@ -2228,258 +2228,303 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2228
2228
  agentOptions: I = [],
2229
2229
  onAgentSelect: A,
2230
2230
  onAgentExit: $,
2231
- loading: C = !1,
2232
- placeholder: N,
2231
+ loading: E = !1,
2232
+ placeholder: S,
2233
2233
  border: w,
2234
- background: P = "transparent",
2234
+ background: V = "transparent",
2235
2235
  hideButtons: k,
2236
2236
  maxHeight: e,
2237
2237
  minHeight: n,
2238
2238
  className: r = "",
2239
- onEditorAreaClick: d,
2240
- autoCollapseOnScroll: c,
2241
- scrollContainerRef: M,
2242
- atBottomOffset: S = 10,
2243
- atBottomExitOffset: F,
2244
- collapseOnScrollAtBottom: Y = !1,
2245
- scrollEndDebounceMs: z = 120,
2246
- collapseTransitionMs: O = 0,
2247
- lockDuringCollapseTransition: V = !0,
2248
- collapsedTotalHeight: G = 132,
2249
- clickOverrideAutoCollapseMs: _ = 360,
2250
- toggleOnBlankClick: R,
2251
- scrollThrottleMs: J,
2252
- collapsed: u,
2253
- defaultCollapsed: p,
2254
- onCollapsedChange: v,
2255
- reportAnalyze: D,
2256
- nodeDefaults: B
2239
+ onEditorAreaClick: u,
2240
+ autoCollapseOnScroll: d,
2241
+ scrollContainerRef: D,
2242
+ scrollCollapseMode: C = "default",
2243
+ atBottomOffset: F = 10,
2244
+ atBottomExitOffset: Y,
2245
+ collapseOnScrollAtBottom: z = !1,
2246
+ scrollEndDebounceMs: O = 120,
2247
+ collapseTransitionMs: _ = 0,
2248
+ lockDuringCollapseTransition: G = !0,
2249
+ collapseAutoToggleThrottleMs: M = 0,
2250
+ collapsedTotalHeight: R = 132,
2251
+ clickOverrideAutoCollapseMs: X = 360,
2252
+ toggleOnBlankClick: p,
2253
+ scrollThrottleMs: c,
2254
+ collapsed: v,
2255
+ defaultCollapsed: P,
2256
+ onCollapsedChange: B,
2257
+ reportAnalyze: j,
2258
+ nodeDefaults: J
2257
2259
  }) => {
2258
- const [W, X] = Sn.useMessage(), ne = te(null), pe = te(null), E = te(null), oe = te(null), [re, we] = ce({}), [ae, he] = ce(null), [xe, ge] = ce(null), [fe, Ce] = ce(null), Se = te(!1), Pe = te(null), [Tt, Ve] = ce(!1), [We, Ue] = ce({}), pt = te(() => {
2259
- }), Re = te({}), Ke = te({}), Xe = te(null), [Qt, Je] = ce(!0), Nt = te(null), [Zt, en] = ce(0), Qe = typeof u == "boolean", [Ze, tn] = ce(
2260
- p ?? !1
2261
- ), [Ge, nn] = ce(!1), Fe = te(!1), qt = te(Ze), At = te(window), ft = te(null), et = te(!1), [rn, _t] = ce(!1), mt = te(null), tt = te(null), nt = te(null), Ie = te(0), Te = te(null), yt = te(0), Lt = de(() => {
2262
- yt.current = 0;
2263
- }, []), It = de(
2260
+ const [re, me] = Mn.useMessage(), de = te(null), ye = te(null), N = te(null), be = te(null), [U, ge] = oe({}), [$e, xe] = oe(null), [qe, Ae] = 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 v == "boolean", [ot, cn] = oe(
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(() => {
2264
+ wt.current = 0;
2265
+ }, []), kt = ce(() => {
2266
+ Fe.current != null && (window.clearTimeout(Fe.current), Fe.current = null);
2267
+ }, []), Ke = ce(
2264
2268
  (a, l, i = !1) => {
2265
- if ((Qe ? u : qt.current) === a) return;
2266
- const m = V && typeof O == "number" && O > 0;
2267
- if (!i && m && et.current) {
2268
- mt.current = { next: a, reason: l };
2269
+ if ((at ? v : Dt.current) === a) return;
2270
+ const m = G && typeof _ == "number" && _ > 0;
2271
+ if (!i && m && st.current) {
2272
+ xt.current = { next: a, reason: l };
2269
2273
  return;
2270
2274
  }
2271
- m && (et.current = !0, _t(!0), tt.current && window.clearTimeout(tt.current), tt.current = window.setTimeout(() => {
2272
- et.current = !1, _t(!1), tt.current = null;
2273
- const H = mt.current;
2274
- mt.current = null, H && It(H.next, H.reason, !0);
2275
+ m && (st.current = !0, Ht(!0), lt.current && window.clearTimeout(lt.current), lt.current = window.setTimeout(() => {
2276
+ st.current = !1, Ht(!1), lt.current = null;
2277
+ const H = xt.current;
2278
+ xt.current = null, H && Ke(H.next, H.reason, !0);
2275
2279
  try {
2276
- nt.current?.();
2280
+ it.current?.();
2277
2281
  } catch {
2278
2282
  }
2279
- }, O)), Qe || tn(a), v?.(a, l);
2283
+ }, _)), at || cn(a), B?.(a, l);
2280
2284
  },
2281
2285
  [
2282
- Qe,
2283
- u,
2284
- V,
2285
- O,
2286
- v
2286
+ at,
2287
+ v,
2288
+ G,
2289
+ _,
2290
+ B
2287
2291
  ]
2288
- ), ze = It;
2289
- ye(() => {
2290
- qt.current = Ze;
2291
- }, [Ze]), ye(() => {
2292
- Fe.current = Ge;
2293
- }, [Ge]), Ye(() => {
2294
- const a = Nt.current;
2292
+ ), pn = Ke;
2293
+ fe(() => {
2294
+ Dt.current = ot;
2295
+ }, [ot]), fe(() => {
2296
+ We.current = je;
2297
+ }, [je]), Je(() => {
2298
+ const a = It.current;
2295
2299
  if (!a) return;
2296
2300
  const l = () => {
2297
2301
  const h = Math.ceil(a.getBoundingClientRect().height || 0);
2298
- en((m) => m === h ? m : h);
2302
+ ln((m) => m === h ? m : h);
2299
2303
  };
2300
2304
  if (l(), typeof ResizeObserver > "u") return;
2301
2305
  const i = new ResizeObserver(() => l());
2302
2306
  return i.observe(a), () => i.disconnect();
2303
- }, []), ye(() => {
2304
- if (!c) return;
2305
- const a = M?.current ?? null, i = ((U) => {
2306
- let ie = U;
2307
- for (; ie && ie !== document.body; ) {
2308
- const be = window.getComputedStyle(ie), ke = be.overflowY, ve = be.overflowX, Ne = (ke === "auto" || ke === "scroll") && ie.scrollHeight > ie.clientHeight + 1, Be = (ve === "auto" || ve === "scroll") && ie.scrollWidth > ie.clientWidth + 1;
2309
- if (Ne || Be) return ie;
2310
- ie = ie.parentElement;
2307
+ }, []), fe(() => {
2308
+ if (!d) return;
2309
+ const a = D?.current ?? null, i = ((Z) => {
2310
+ let le = Z;
2311
+ for (; le && le !== document.body; ) {
2312
+ const we = window.getComputedStyle(le), ve = we.overflowY, Se = we.overflowX, ke = (ve === "auto" || ve === "scroll") && le.scrollHeight > le.clientHeight + 1, Ce = (Se === "auto" || Se === "scroll") && le.scrollWidth > le.clientWidth + 1;
2313
+ if (ke || Ce) return le;
2314
+ le = le.parentElement;
2311
2315
  }
2312
2316
  return null;
2313
- })(ne.current?.parentElement ?? null), h = a ?? i ?? window;
2314
- At.current = h;
2317
+ })(de.current?.parentElement ?? null), h = C === "approach-input" ? a ?? window : a ?? i ?? window;
2318
+ Bt.current = h;
2315
2319
  const m = () => {
2316
- Lt();
2317
- }, H = (U) => {
2318
- const ie = U.target;
2319
- ie && (h !== window ? h.contains(ie) && m() : ne.current?.contains(ie) && m());
2320
+ Pt();
2321
+ }, H = (Z) => {
2322
+ const le = Z.target;
2323
+ le && (h !== window ? h.contains(le) && m() : de.current?.contains(le) && m());
2320
2324
  };
2321
2325
  window.addEventListener("wheel", m, { passive: !0 }), window.addEventListener("touchmove", m, { passive: !0 }), window.addEventListener("pointerdown", H, { passive: !0 });
2322
- let x = 0, g = 0, q = null, f = -1, Q = "none";
2323
- const K = () => {
2326
+ let x = 0, g = 0, q = null, f = -1, Q = "none", K = -1;
2327
+ const ee = () => {
2324
2328
  if (h === window) {
2325
- const ie = document.documentElement;
2329
+ const le = document.documentElement;
2326
2330
  return {
2327
- scrollTop: ie.scrollTop,
2328
- scrollHeight: ie.scrollHeight,
2329
- clientHeight: ie.clientHeight
2331
+ scrollTop: le.scrollTop,
2332
+ scrollHeight: le.scrollHeight,
2333
+ clientHeight: le.clientHeight
2330
2334
  };
2331
2335
  }
2332
- const U = h;
2336
+ const Z = h;
2333
2337
  return {
2334
- scrollTop: U.scrollTop,
2335
- scrollHeight: U.scrollHeight,
2336
- clientHeight: U.clientHeight
2338
+ scrollTop: Z.scrollTop,
2339
+ scrollHeight: Z.scrollHeight,
2340
+ clientHeight: Z.clientHeight
2337
2341
  };
2338
- }, ee = () => {
2342
+ }, ne = () => {
2339
2343
  if (h === window) {
2340
- const U = document.documentElement;
2341
- U.scrollTop = Math.max(0, U.scrollHeight - U.clientHeight);
2344
+ const Z = document.documentElement;
2345
+ Z.scrollTop = Math.max(0, Z.scrollHeight - Z.clientHeight);
2342
2346
  } else {
2343
- const U = h;
2344
- U.scrollTop = Math.max(0, U.scrollHeight - U.clientHeight);
2347
+ const Z = h;
2348
+ Z.scrollTop = Math.max(0, Z.scrollHeight - Z.clientHeight);
2345
2349
  }
2346
- }, Z = () => {
2347
- const U = S, ie = Math.max(
2348
- U + 1,
2349
- typeof F == "number" ? F : U + 16
2350
- ), be = Fe.current;
2351
- if (Date.now() < Ie.current) return !0;
2350
+ }, W = () => {
2351
+ const Z = F, le = Math.max(
2352
+ Z + 1,
2353
+ typeof Y == "number" ? Y : Z + 16
2354
+ ), we = We.current;
2355
+ if (Date.now() < De.current) return !0;
2352
2356
  if (h === window) {
2353
- const Ne = document.documentElement;
2354
- if (Ne.scrollHeight <= Ne.clientHeight + S) return !1;
2355
- const Be = Ne.scrollHeight - Ne.scrollTop - Ne.clientHeight;
2356
- return be ? Be <= ie : Be <= U;
2357
+ const ke = document.documentElement;
2358
+ if (ke.scrollHeight <= ke.clientHeight + F) return !1;
2359
+ const Ce = ke.scrollHeight - ke.scrollTop - ke.clientHeight;
2360
+ return we ? Ce <= le : Ce <= Z;
2357
2361
  }
2358
- const ke = h;
2359
- if (ke.scrollHeight <= ke.clientHeight + S) return !1;
2360
- const ve = ke.scrollHeight - ke.scrollTop - ke.clientHeight;
2361
- return be ? ve <= ie : ve <= U;
2362
- }, j = (U) => {
2363
- Ie.current = Math.max(Ie.current, Date.now() + U);
2364
- const ie = () => {
2365
- Te.current = null, !(Date.now() >= Ie.current) && (ee(), Te.current = window.requestAnimationFrame(ie));
2362
+ const ve = h;
2363
+ if (ve.scrollHeight <= ve.clientHeight + F) return !1;
2364
+ const Se = ve.scrollHeight - ve.scrollTop - ve.clientHeight;
2365
+ return we ? Se <= le : Se <= 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));
2366
2370
  };
2367
- Te.current == null && (ee(), Te.current = window.requestAnimationFrame(ie));
2368
- }, se = () => {
2369
- Ie.current = 0, Te.current != null && (window.cancelAnimationFrame(Te.current), Te.current = null);
2370
- }, ue = (U = !1) => {
2371
- if (!U && typeof J == "number" && J > 0) {
2371
+ _e.current == null && (ne(), _e.current = window.requestAnimationFrame(le));
2372
+ }, ie = () => {
2373
+ De.current = 0, _e.current != null && (window.cancelAnimationFrame(_e.current), _e.current = null);
2374
+ }, ae = (Z, le) => {
2375
+ if (typeof X == "number" && X > 0 && Date.now() < wt.current)
2376
+ return;
2377
+ const we = typeof M == "number" ? M : 0;
2378
+ if (we > 0) {
2372
2379
  const ve = Date.now();
2373
- if (ve - g < J) return;
2380
+ if (ve < Ue.current) {
2381
+ if (ct.current = { next: Z, reason: le }, Fe.current == null) {
2382
+ const Se = Math.max(0, Ue.current - ve);
2383
+ Fe.current = window.setTimeout(() => {
2384
+ Fe.current = null;
2385
+ const ke = ct.current;
2386
+ ct.current = null, ke && (Ue.current = Date.now() + we, Ke(ke.next, ke.reason));
2387
+ }, Se);
2388
+ }
2389
+ return;
2390
+ }
2391
+ Ue.current = ve + we, kt();
2392
+ }
2393
+ Ke(Z, le);
2394
+ }, pe = (Z = !1) => {
2395
+ if (!Z && typeof c == "number" && c > 0) {
2396
+ const ve = Date.now();
2397
+ if (ve - g < c) return;
2374
2398
  g = ve;
2375
2399
  }
2376
- const ie = Fe.current, be = Z();
2377
- if (Fe.current = be, nn((ve) => ve === be ? ve : be), !(c && typeof _ == "number" && _ > 0 && Date.now() < yt.current)) {
2378
- if (be) {
2379
- if (!(Y && Q === "up") && (ze(!1, "bottom"), Q !== "up" && !ie)) {
2380
- const ve = Math.max(200, _e + 80);
2381
- j(ve);
2400
+ const le = We.current, we = W();
2401
+ if (We.current = we, un((ve) => ve === we ? ve : we), C === "approach-input" && h !== window) {
2402
+ const { scrollTop: ve, scrollHeight: Se, clientHeight: ke } = ee(), Ce = Se - ve - ke, Xe = K >= 0 && Ce < K - 2;
2403
+ if (K = Ce, Z) {
2404
+ we ? ae(!1, "bottom") : ae(!0, "scroll");
2405
+ return;
2406
+ }
2407
+ if (we) {
2408
+ if (ae(!1, "bottom"), Q !== "up" && !le) {
2409
+ const Ut = Math.max(200, Le + 80);
2410
+ se(Ut);
2382
2411
  }
2383
2412
  return;
2384
2413
  }
2385
- Ie.current && se(), ze(!0, "scroll");
2414
+ Xe && ae(!0, "scroll");
2415
+ return;
2416
+ }
2417
+ if (we) {
2418
+ if (!(z && Q === "up") && (ae(!1, "bottom"), Q !== "up" && !le)) {
2419
+ const ve = Math.max(200, Le + 80);
2420
+ se(ve);
2421
+ }
2422
+ return;
2386
2423
  }
2424
+ De.current && ie(), ae(!0, "scroll");
2387
2425
  };
2388
- nt.current = () => ue(!0);
2389
- const le = () => {
2390
- if (V && typeof O == "number" && O > 0 && et.current) {
2391
- const { scrollTop: U } = K();
2392
- f >= 0 && (U > f ? Q = "down" : U < f && (Q = "up")), f >= 0 && U < f && se(), f = U;
2426
+ it.current = () => pe(!0);
2427
+ const Ee = () => {
2428
+ if (G && typeof _ == "number" && _ > 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;
2393
2431
  return;
2394
2432
  }
2395
2433
  {
2396
- const { scrollTop: U } = K();
2397
- f >= 0 && (U > f ? Q = "down" : U < f && (Q = "up")), f >= 0 && U < f && se(), Y && f >= 0 && Fe.current && U < f && (ft.current = ne.current?.getBoundingClientRect().height ?? null, ze(!0, "scroll")), f = U;
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;
2398
2436
  }
2399
2437
  x || (x = window.requestAnimationFrame(() => {
2400
- x = 0, ue();
2401
- }), z && z > 0 && (q && window.clearTimeout(q), q = window.setTimeout(() => {
2402
- ue(!0);
2403
- }, z)));
2438
+ x = 0, pe();
2439
+ }), O && O > 0 && (q && window.clearTimeout(q), q = window.setTimeout(() => {
2440
+ pe(!0);
2441
+ }, O)));
2404
2442
  };
2405
- return h === window ? window.addEventListener("scroll", le, { passive: !0 }) : h.addEventListener("scroll", le, { passive: !0 }), f = K().scrollTop, ue(!0), () => {
2406
- nt.current && (nt.current = null), Te.current != null && (window.cancelAnimationFrame(Te.current), Te.current = null), Ie.current = 0, window.removeEventListener("wheel", m), window.removeEventListener("touchmove", m), window.removeEventListener("pointerdown", H), h === window ? window.removeEventListener("scroll", le) : h.removeEventListener("scroll", le), q && window.clearTimeout(q), x && window.cancelAnimationFrame(x);
2443
+ h === window ? window.addEventListener("scroll", Ee, { passive: !0 }) : h.addEventListener("scroll", Ee, { passive: !0 }), f = ee().scrollTop;
2444
+ {
2445
+ const Z = ee();
2446
+ K = Z.scrollHeight - Z.scrollTop - Z.clientHeight;
2447
+ }
2448
+ return pe(!0), () => {
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", m), window.removeEventListener("touchmove", m), window.removeEventListener("pointerdown", H), h === window ? window.removeEventListener("scroll", Ee) : h.removeEventListener("scroll", Ee), q && window.clearTimeout(q), x && window.cancelAnimationFrame(x);
2407
2450
  };
2408
2451
  }, [
2409
- c,
2410
- M,
2411
- S,
2452
+ d,
2453
+ D,
2412
2454
  F,
2413
- J,
2414
2455
  Y,
2456
+ c,
2415
2457
  z,
2416
- ze,
2417
- Lt,
2418
- _
2458
+ O,
2459
+ Ke,
2460
+ Pt,
2461
+ X,
2462
+ M,
2463
+ kt
2419
2464
  ]);
2420
- const [Me, qe] = ce(() => {
2465
+ const [Be, Me] = oe(() => {
2421
2466
  const a = {};
2422
2467
  return t.forEach((l) => {
2423
2468
  l.type === "multi-variable" && l.key && (a[l.key] = 1);
2424
2469
  }), a;
2425
- }), ht = te({}), Mt = te({}), Dt = te({});
2426
- ye(() => {
2427
- Mt.current = re;
2428
- }, [re]), ye(() => {
2429
- Dt.current = Me;
2430
- }, [Me]);
2431
- const gt = de((a) => a.find((i) => i.type === "tag")?.text || null, []), Bt = te(t), De = te(null);
2432
- ye(() => {
2433
- const a = gt(Bt.current), l = gt(t);
2434
- if (a && a !== l && E.current) {
2470
+ }), $t = te({}), Vt = te({}), Rt = te({});
2471
+ fe(() => {
2472
+ Vt.current = U;
2473
+ }, [U]), fe(() => {
2474
+ Rt.current = Be;
2475
+ }, [Be]);
2476
+ const Et = ce((a) => a.find((i) => i.type === "tag")?.text || null, []), Ot = te(t), He = te(null);
2477
+ fe(() => {
2478
+ const a = Et(Ot.current), l = Et(t);
2479
+ if (a && a !== l && N.current) {
2435
2480
  const i = {};
2436
- E.current.querySelectorAll('[data-type="variable"]').forEach((x) => {
2481
+ N.current.querySelectorAll('[data-type="variable"]').forEach((x) => {
2437
2482
  const g = x.dataset.key;
2438
2483
  if (g) {
2439
2484
  const q = x.innerText.replace(/[\u200B\n]/g, "").trim();
2440
2485
  q && (i[g] = q);
2441
2486
  }
2442
- }), E.current.querySelectorAll('[data-type="select"]').forEach((x) => {
2487
+ }), N.current.querySelectorAll('[data-type="select"]').forEach((x) => {
2443
2488
  const g = x.dataset.key;
2444
2489
  if (g) {
2445
2490
  const q = (x.getAttribute("data-value") || "").trim();
2446
2491
  q && (i[g] = q);
2447
2492
  }
2448
- }), E.current.querySelectorAll('[data-type="textarea"]').forEach((x) => {
2493
+ }), N.current.querySelectorAll('[data-type="textarea"]').forEach((x) => {
2449
2494
  const g = x.dataset.key;
2450
2495
  if (g) {
2451
2496
  const q = x.value.replace(/[\u200B]/g, "").trim();
2452
2497
  q && (i[g] = q);
2453
2498
  }
2454
- }), ht.current[a] = {
2499
+ }), $t.current[a] = {
2455
2500
  variableValues: i,
2456
- files: { ...Mt.current },
2457
- multiVariableCounts: { ...Dt.current }
2501
+ files: { ...Vt.current },
2502
+ multiVariableCounts: { ...Rt.current }
2458
2503
  };
2459
2504
  }
2460
- if (l && ht.current[l]) {
2461
- const i = ht.current[l];
2462
- De.current = i, we(i.files), qe(i.multiVariableCounts);
2505
+ if (l && $t.current[l]) {
2506
+ const i = $t.current[l];
2507
+ He.current = i, ge(i.files), Me(i.multiVariableCounts);
2463
2508
  } else if (l) {
2464
- De.current = null;
2509
+ He.current = null;
2465
2510
  const i = {};
2466
2511
  t.forEach((h) => {
2467
2512
  h.type === "multi-variable" && h.key && (i[h.key] = 1);
2468
- }), qe(i), we({});
2513
+ }), Me(i), ge({});
2469
2514
  } else
2470
- De.current = null, qe({}), we({});
2471
- Bt.current = t;
2472
- }, [t, gt]), Ye(() => {
2473
- De.current && E.current && (E.current.__tempVariableValues = De.current.variableValues, setTimeout(() => {
2474
- De.current && (De.current = null);
2515
+ He.current = null, Me({}), ge({});
2516
+ Ot.current = t;
2517
+ }, [t, Et]), Je(() => {
2518
+ He.current && N.current && (N.current.__tempVariableValues = He.current.variableValues, setTimeout(() => {
2519
+ He.current && (He.current = null);
2475
2520
  }, 0));
2476
2521
  });
2477
- const $e = $t(() => {
2522
+ const Te = qt(() => {
2478
2523
  if (!t || t.length === 0) return t;
2479
2524
  const a = [], l = (i) => i.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2480
2525
  for (const i of t) {
2481
2526
  if (a.push(i), i.type !== "report-url" || !i.key) continue;
2482
- const h = We[i.key], m = h?.status ?? "idle", H = h?.modules ?? [];
2527
+ const h = Ze[i.key], m = h?.status ?? "idle", H = h?.modules ?? [];
2483
2528
  m === "loading" && a.push({
2484
2529
  type: "text",
2485
2530
  className: "rte-report-parsing",
@@ -2504,19 +2549,19 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2504
2549
  ` }));
2505
2550
  }
2506
2551
  return a;
2507
- }, [t, We]);
2508
- er(
2509
- E,
2510
- $e,
2511
- re,
2552
+ }, [t, Ze]);
2553
+ lr(
2554
+ N,
2555
+ Te,
2556
+ U,
2512
2557
  T,
2513
- Me,
2514
- Xe,
2558
+ Be,
2559
+ nt,
2515
2560
  void 0,
2516
2561
  k,
2517
- B
2518
- ), tr(E, $e, re, Ce), nr(E, $e, Ce, k), ar(E, $e, re, Ce), rr(E, $e, Ce), or(E, $e, re, Ve), sr(E, Se);
2519
- const an = Qn(E), on = xr(E), bt = de((a) => {
2562
+ J
2563
+ ), ir(N, Te, U, Ye), cr(N, Te, Ye, k), dr(N, Te, U, Ye), ur(N, Te, Ye), pr(N, Te, U, Oe), fr(N, Ve);
2564
+ const fn = or(N), mn = Sr(N), Ct = ce((a) => {
2520
2565
  const l = a.trim();
2521
2566
  if (!l) return { url: "" };
2522
2567
  let i = null;
@@ -2531,10 +2576,10 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2531
2576
  }
2532
2577
  const h = i.pathname.split("/").filter(Boolean), m = h.findIndex((q) => q === "report"), H = m >= 0 ? h[m + 1] : void 0, x = h[0] && h[0].length <= 5 ? h[0] : void 0, g = i.searchParams.get("agentId") || void 0;
2533
2578
  return { url: l, reportId: H, agentId: g, lang: x };
2534
- }, []), Ht = de(() => {
2579
+ }, []), Gt = ce(() => {
2535
2580
  const a = {};
2536
- if (!E.current) return a;
2537
- const l = E.current;
2581
+ if (!N.current) return a;
2582
+ const l = N.current;
2538
2583
  return l.querySelectorAll('[data-type="variable"]').forEach((g) => {
2539
2584
  const q = g.dataset.key;
2540
2585
  if (!q) return;
@@ -2561,18 +2606,18 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2561
2606
  const f = (g.getAttribute("data-value") || "").trim();
2562
2607
  f && (a[q] = f);
2563
2608
  }), a;
2564
- }, []), Pt = de(
2609
+ }, []), Ft = ce(
2565
2610
  (a) => (a?.modules || []).map((i, h) => {
2566
2611
  const m = (i?.title || `模块${h + 1}`).trim() || `模块${h + 1}`, H = (i?.content || "").trim(), x = H.length > 0 ? H : `请补充:${m}`;
2567
2612
  return { title: m, content: x };
2568
2613
  }),
2569
2614
  []
2570
- ), Vt = de(
2615
+ ), zt = ce(
2571
2616
  (a, l) => {
2572
2617
  const i = (l || "").trim();
2573
2618
  if (!a) return;
2574
2619
  if (!i) {
2575
- Ue((x) => ({
2620
+ et((x) => ({
2576
2621
  ...x,
2577
2622
  [a]: { status: "idle", modules: [], lastParsedUrl: void 0, error: void 0 }
2578
2623
  }));
@@ -2582,18 +2627,18 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2582
2627
  const x = window.getSelection();
2583
2628
  if (x && x.rangeCount > 0) {
2584
2629
  const g = x.getRangeAt(0), q = g.startContainer, f = q.nodeType === Node.ELEMENT_NODE ? q.closest(`[data-type="variable"][data-key="${a}"]`) : q.parentElement?.closest(`[data-type="variable"][data-key="${a}"]`);
2585
- if (f && E.current?.contains(f)) {
2630
+ if (f && N.current?.contains(f)) {
2586
2631
  const Q = document.createRange();
2587
2632
  Q.setStartBefore(f), Q.setEnd(g.startContainer, g.startOffset);
2588
2633
  const K = Q.toString().length;
2589
- Xe.current = { key: a, offset: K };
2634
+ nt.current = { key: a, offset: K };
2590
2635
  }
2591
2636
  }
2592
2637
  } catch {
2593
2638
  }
2594
- const h = We[a];
2639
+ const h = Ze[a];
2595
2640
  if (h?.lastParsedUrl && h.lastParsedUrl === i && h.status === "loading") return;
2596
- Ue((x) => ({
2641
+ et((x) => ({
2597
2642
  ...x,
2598
2643
  [a]: {
2599
2644
  ...x[a] || { modules: [] },
@@ -2602,8 +2647,8 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2602
2647
  lastParsedUrl: i
2603
2648
  }
2604
2649
  }));
2605
- const m = bt(i);
2606
- (D || (async (x) => ({
2650
+ const m = Ct(i);
2651
+ (j || (async (x) => ({
2607
2652
  modules: [
2608
2653
  {
2609
2654
  title: "第1张:人群+场景直击图",
@@ -2616,20 +2661,20 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2616
2661
  }
2617
2662
  ]
2618
2663
  })))(m).then((x) => {
2619
- const g = Pt(x);
2620
- if (E.current) {
2621
- const q = Ht();
2664
+ const g = Ft(x);
2665
+ if (N.current) {
2666
+ const q = Gt();
2622
2667
  g.forEach((f, Q) => {
2623
2668
  q[`${a}__module_${Q}`] = f.content;
2624
- }), E.current.__tempVariableValues = q;
2669
+ }), N.current.__tempVariableValues = q;
2625
2670
  }
2626
- Ue((q) => ({
2671
+ et((q) => ({
2627
2672
  ...q,
2628
2673
  [a]: { status: "success", error: void 0, lastParsedUrl: i, modules: g }
2629
2674
  }));
2630
2675
  }).catch((x) => {
2631
2676
  const g = x instanceof Error ? x.message : String(x);
2632
- Ue((q) => ({
2677
+ et((q) => ({
2633
2678
  ...q,
2634
2679
  [a]: {
2635
2680
  ...q[a] || { modules: [] },
@@ -2641,24 +2686,24 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2641
2686
  }));
2642
2687
  });
2643
2688
  },
2644
- [Ht, Pt, bt, D, We]
2689
+ [Gt, Ft, Ct, j, Ze]
2645
2690
  );
2646
- ye(() => {
2647
- pt.current = Vt;
2648
- }, [Vt]), ye(() => () => {
2649
- const a = Re.current;
2650
- Object.keys(a).forEach((l) => window.clearTimeout(a[l])), Re.current = {}, Ke.current = {};
2651
- }, []), ye(() => {
2652
- if ($e.length > 0) {
2653
- Je(!1);
2691
+ fe(() => {
2692
+ bt.current = zt;
2693
+ }, [zt]), fe(() => () => {
2694
+ const a = Ge.current;
2695
+ Object.keys(a).forEach((l) => window.clearTimeout(a[l])), Ge.current = {}, tt.current = {};
2696
+ }, []), fe(() => {
2697
+ if (Te.length > 0) {
2698
+ rt(!1);
2654
2699
  return;
2655
2700
  }
2656
2701
  const a = () => {
2657
- if (!E.current) {
2658
- Je(!0);
2702
+ if (!N.current) {
2703
+ rt(!0);
2659
2704
  return;
2660
2705
  }
2661
- const i = E.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", h = E.current.querySelectorAll('[data-type="variable"]'), m = E.current.querySelectorAll('[data-type="upload"]');
2706
+ const i = N.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", h = N.current.querySelectorAll('[data-type="variable"]'), m = N.current.querySelectorAll('[data-type="upload"]');
2662
2707
  let H = !1;
2663
2708
  h.forEach((g) => {
2664
2709
  (g.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (H = !0);
@@ -2666,19 +2711,19 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2666
2711
  g.querySelector(".upload-inner-wrapper.has-file") && (H = !0);
2667
2712
  });
2668
2713
  const x = !i && !H;
2669
- Je(x), $e.length === 0 && Ve(!x);
2714
+ rt(x), Te.length === 0 && Oe(!x);
2670
2715
  };
2671
2716
  a();
2672
2717
  const l = new MutationObserver(a);
2673
- return E.current && l.observe(E.current, {
2718
+ return N.current && l.observe(N.current, {
2674
2719
  childList: !0,
2675
2720
  subtree: !0,
2676
2721
  characterData: !0
2677
2722
  }), () => {
2678
2723
  l.disconnect();
2679
2724
  };
2680
- }, [$e]);
2681
- const sn = (a) => {
2725
+ }, [Te]);
2726
+ const yn = (a) => {
2682
2727
  if (o) {
2683
2728
  a.preventDefault();
2684
2729
  return;
@@ -2694,46 +2739,46 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2694
2739
  if (H) {
2695
2740
  const x = /[、,,\s\n\r\t]+/, g = l.split(x).map((q) => q.trim()).filter((q) => q.length > 0);
2696
2741
  if (console.log("[Paste Event] 粘贴的内容:", l), console.log("[Paste Event] 拆分后的值:", g), g.length > 1) {
2697
- const q = parseInt(m.dataset.index || "0", 10), f = t.find((U) => U.type === "multi-variable" && U.key === H)?.maxCount || 9, Q = Me[H] || 1, K = Math.min(q + g.length, f);
2698
- K > Q && qe((le) => ({
2699
- ...le,
2742
+ const q = parseInt(m.dataset.index || "0", 10), f = t.find((pe) => pe.type === "multi-variable" && pe.key === H)?.maxCount || 9, Q = Be[H] || 1, K = Math.min(q + g.length, f);
2743
+ K > Q && Me((ae) => ({
2744
+ ...ae,
2700
2745
  [H]: K
2701
2746
  }));
2702
2747
  const ee = [];
2703
- for (let le = 0; le < Q; le++) {
2704
- const U = `${H}_${le}`, ie = E.current.querySelector(
2705
- `[data-type="variable"][data-key="${U}"][data-multi-key="${H}"]`
2748
+ for (let ae = 0; ae < Q; ae++) {
2749
+ const pe = `${H}_${ae}`, Ee = N.current.querySelector(
2750
+ `[data-type="variable"][data-key="${pe}"][data-multi-key="${H}"]`
2706
2751
  );
2707
- if (ie) {
2708
- const be = ie.innerText.replace(/[\u200B\n]/g, "").trim();
2709
- ee.push(be);
2752
+ if (Ee) {
2753
+ const Z = Ee.innerText.replace(/[\u200B\n]/g, "").trim();
2754
+ ee.push(Z);
2710
2755
  }
2711
2756
  }
2712
2757
  ee.splice(q, 1, ...g.slice(0, f - q));
2713
- const Z = ee.slice(0, f);
2714
- Z.length > 0 && Z[Z.length - 1] !== "" && Z.length < f && Z.push("");
2715
- const j = Math.max(Z.length, 1), se = {};
2716
- Z.forEach((le, U) => {
2717
- le && (se[`${H}_${U}`] = le);
2718
- }), E.current.querySelectorAll(
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[`${H}_${pe}`] = ae);
2763
+ }), N.current.querySelectorAll(
2719
2764
  '[data-type="variable"]'
2720
- ).forEach((le) => {
2721
- const U = le.dataset.key, ie = le.dataset.multiKey;
2722
- if (U && ie !== H) {
2723
- const be = le.innerText.replace(/[\u200B\n]/g, "").trim();
2724
- be && (se[U] = be);
2765
+ ).forEach((ae) => {
2766
+ const pe = ae.dataset.key, Ee = ae.dataset.multiKey;
2767
+ if (pe && Ee !== H) {
2768
+ const Z = ae.innerText.replace(/[\u200B\n]/g, "").trim();
2769
+ Z && (se[pe] = Z);
2725
2770
  }
2726
- }), E.current.__tempVariableValues = se, qe((le) => ({
2727
- ...le,
2728
- [H]: j
2729
- })), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", Z);
2771
+ }), N.current.__tempVariableValues = se, Me((ae) => ({
2772
+ ...ae,
2773
+ [H]: W
2774
+ })), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", ne);
2730
2775
  return;
2731
2776
  } else g.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
2732
2777
  }
2733
2778
  }
2734
2779
  }
2735
2780
  }
2736
- document.execCommand("insertText", !1, l), Ot(), setTimeout(() => {
2781
+ document.execCommand("insertText", !1, l), jt(), setTimeout(() => {
2737
2782
  const h = window.getSelection();
2738
2783
  if (h && h.rangeCount > 0) {
2739
2784
  const m = h.anchorNode;
@@ -2746,47 +2791,47 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2746
2791
  }
2747
2792
  }
2748
2793
  }, 0);
2749
- }, ln = (a) => {
2794
+ }, hn = (a) => {
2750
2795
  if (!a.target.files) {
2751
- a.target && (a.target.value = ""), he(null), ge(null);
2796
+ a.target && (a.target.value = ""), xe(null), Ae(null);
2752
2797
  return;
2753
2798
  }
2754
2799
  const l = 10 * 1024 * 1024, i = (m) => m.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(m.name || ""), h = (m) => i(m) && m.size > l;
2755
- if (xe && a.target.files && a.target.files.length > 0) {
2756
- const m = xe, H = t.find((f) => f.type === "upload" && f.key === m), x = Array.from(a.target.files), g = x.filter((f) => !h(f)), q = x.length - g.length;
2757
- if (q > 0 && W.error(`已自动过滤 ${q} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`), H && typeof H.maxCount == "number" && typeof H.minCount == "number") {
2800
+ if (qe && a.target.files && a.target.files.length > 0) {
2801
+ const m = qe, H = t.find((f) => f.type === "upload" && f.key === m), x = Array.from(a.target.files), g = x.filter((f) => !h(f)), q = x.length - g.length;
2802
+ if (q > 0 && re.error(`已自动过滤 ${q} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`), H && typeof H.maxCount == "number" && typeof H.minCount == "number") {
2758
2803
  const f = H.maxCount;
2759
2804
  let Q = 0;
2760
- we((K) => {
2805
+ ge((K) => {
2761
2806
  for (let se = 0; se < f; se++) {
2762
- const ue = `${m}-${se}`;
2763
- K[ue] && (Q = se + 1);
2807
+ const ie = `${m}-${se}`;
2808
+ K[ie] && (Q = se + 1);
2764
2809
  }
2765
- const ee = f - Q, Z = g.slice(0, ee), j = { ...K };
2766
- return Z.forEach((se, ue) => {
2767
- const le = `${m}-${Q + ue}`;
2768
- j[le] = se;
2769
- }), j;
2810
+ const ee = f - Q, ne = g.slice(0, ee), W = { ...K };
2811
+ return ne.forEach((se, ie) => {
2812
+ const ae = `${m}-${Q + ie}`;
2813
+ W[ae] = se;
2814
+ }), W;
2770
2815
  });
2771
2816
  }
2772
- } else if (ae && a.target.files[0]) {
2773
- const m = a.target.files[0], H = ae;
2774
- h(m) ? W.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)") : we((x) => ({ ...x, [H]: m }));
2817
+ } else if ($e && a.target.files[0]) {
2818
+ const m = a.target.files[0], H = $e;
2819
+ h(m) ? re.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)") : ge((x) => ({ ...x, [H]: m }));
2775
2820
  }
2776
- a.target && (a.target.value = ""), he(null), ge(null);
2777
- }, Rt = (a) => {
2778
- we((l) => {
2821
+ a.target && (a.target.value = ""), xe(null), Ae(null);
2822
+ }, Yt = (a) => {
2823
+ ge((l) => {
2779
2824
  const i = { ...l };
2780
2825
  return delete i[a], i;
2781
2826
  });
2782
- }, cn = (a) => {
2827
+ }, gn = (a) => {
2783
2828
  const l = a.target;
2784
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"))
2785
2830
  return;
2786
2831
  if (l.closest(".tag-close-btn")) {
2787
2832
  if (a.preventDefault(), a.stopPropagation(), T)
2788
2833
  return;
2789
- Ce(null), $ ? $() : E.current && (E.current.innerHTML = "", E.current.focus());
2834
+ Ye(null), $ ? $() : N.current && (N.current.innerHTML = "", N.current.focus());
2790
2835
  return;
2791
2836
  }
2792
2837
  if (T) {
@@ -2798,19 +2843,19 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2798
2843
  return;
2799
2844
  }
2800
2845
  }
2801
- l.closest('[data-type="variable"]') || (Pe.current = { x: a.clientX, y: a.clientY }, Se.current = !1, l.closest(".file-remove-btn") && (a.preventDefault(), a.stopPropagation()));
2802
- }, un = (a) => {
2803
- if (!a.target.closest('[data-type="variable"]') && Pe.current) {
2804
- const h = Math.abs(a.clientX - Pe.current.x), m = Math.abs(a.clientY - Pe.current.y);
2805
- (h > 3 || m > 3) && (Se.current = !0);
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()));
2847
+ }, bn = (a) => {
2848
+ if (!a.target.closest('[data-type="variable"]') && Re.current) {
2849
+ const h = Math.abs(a.clientX - Re.current.x), m = Math.abs(a.clientY - Re.current.y);
2850
+ (h > 3 || m > 3) && (Ve.current = !0);
2806
2851
  }
2807
- }, dn = (a) => {
2852
+ }, vn = (a) => {
2808
2853
  if (a.target.closest('[data-type="variable"]')) {
2809
- Pe.current = null, Se.current = !1;
2854
+ Re.current = null, Ve.current = !1;
2810
2855
  return;
2811
2856
  }
2812
- Pe.current = null, Se.current = !1;
2813
- }, pn = (a) => {
2857
+ Re.current = null, Ve.current = !1;
2858
+ }, xn = (a) => {
2814
2859
  if (o)
2815
2860
  return;
2816
2861
  const l = a.target;
@@ -2835,11 +2880,11 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2835
2880
  return;
2836
2881
  }
2837
2882
  if (l.closest('[data-type="variable"]')) {
2838
- if (Se.current)
2883
+ if (Ve.current)
2839
2884
  return;
2840
2885
  setTimeout(() => {
2841
2886
  const q = window.getSelection();
2842
- q && !q.isCollapsed || xt(E);
2887
+ q && !q.isCollapsed || Tt(N);
2843
2888
  }, 10);
2844
2889
  return;
2845
2890
  }
@@ -2852,22 +2897,22 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2852
2897
  const K = t.find((ee) => ee.type === "upload" && ee.key === Q);
2853
2898
  if (K && typeof K.maxCount == "number" && typeof K.minCount == "number") {
2854
2899
  const ee = K.maxCount;
2855
- we((Z) => {
2856
- const j = { ...Z }, se = [];
2857
- for (let ue = 0; ue < ee; ue++) {
2858
- const le = `${Q}-${ue}`, U = j[le];
2859
- U != null && le !== f && se.push(U);
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);
2860
2905
  }
2861
- for (let ue = 0; ue < ee; ue++)
2862
- delete j[`${Q}-${ue}`];
2863
- return se.forEach((ue, le) => {
2864
- j[`${Q}-${le}`] = ue;
2865
- }), j;
2906
+ for (let ie = 0; ie < ee; ie++)
2907
+ delete W[`${Q}-${ie}`];
2908
+ return se.forEach((ie, ae) => {
2909
+ W[`${Q}-${ae}`] = ie;
2910
+ }), W;
2866
2911
  });
2867
2912
  } else
2868
- Rt(f);
2913
+ Yt(f);
2869
2914
  } else
2870
- Rt(f);
2915
+ Yt(f);
2871
2916
  return;
2872
2917
  }
2873
2918
  const g = l.closest('[data-type="upload"]');
@@ -2878,21 +2923,21 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2878
2923
  const Q = t.find((K) => K.type === "upload" && K.key === f);
2879
2924
  if (Q && typeof Q.maxCount == "number" && typeof Q.minCount == "number") {
2880
2925
  const K = Q.maxCount;
2881
- if (re[q] != null) {
2882
- oe.current && (oe.current.multiple = !1), ge(null), he(q), oe.current?.click();
2926
+ if (U[q] != null) {
2927
+ be.current && (be.current.multiple = !1), Ae(null), xe(q), be.current?.click();
2883
2928
  return;
2884
2929
  }
2885
- let Z = 0;
2886
- for (let j = 0; j < K; j++)
2887
- re[`${f}-${j}`] != null && (Z += 1);
2888
- Z < K && oe.current ? (oe.current.multiple = !0, ge(f), oe.current.click()) : (oe.current && (oe.current.multiple = !1), he(q), oe.current?.click());
2930
+ let ne = 0;
2931
+ for (let W = 0; W < K; W++)
2932
+ U[`${f}-${W}`] != null && (ne += 1);
2933
+ ne < K && be.current ? (be.current.multiple = !0, Ae(f), be.current.click()) : (be.current && (be.current.multiple = !1), xe(q), be.current?.click());
2889
2934
  } else
2890
- oe.current && (oe.current.multiple = !1), he(q), oe.current?.click();
2935
+ be.current && (be.current.multiple = !1), xe(q), be.current?.click();
2891
2936
  } else
2892
- oe.current && (oe.current.multiple = !1), he(q), oe.current?.click();
2937
+ be.current && (be.current.multiple = !1), xe(q), be.current?.click();
2893
2938
  return;
2894
2939
  }
2895
- }, fn = (a) => {
2940
+ }, wn = (a) => {
2896
2941
  const i = a.target.closest('[data-type="variable"]');
2897
2942
  if (i) {
2898
2943
  const h = window.getSelection();
@@ -2908,15 +2953,15 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2908
2953
  h.removeAllRanges(), h.addRange(m);
2909
2954
  }
2910
2955
  }
2911
- }, Ot = () => {
2956
+ }, jt = () => {
2912
2957
  if (t.length === 0) {
2913
- if (E.current) {
2914
- const i = !(E.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
2915
- Je(i), Ve(!i);
2958
+ if (N.current) {
2959
+ const i = !(N.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
2960
+ rt(i), Oe(!i);
2916
2961
  }
2917
2962
  return;
2918
2963
  }
2919
- xt(E);
2964
+ Tt(N);
2920
2965
  try {
2921
2966
  const i = window.getSelection()?.anchorNode ?? null;
2922
2967
  let h = null;
@@ -2929,21 +2974,21 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2929
2974
  if (m) {
2930
2975
  const H = h.innerText.replace(/[\u200B\n]/g, "").trim();
2931
2976
  if (H) {
2932
- if (!bt(H).reportId || Ke.current[m] === H) return;
2933
- Ke.current[m] = H;
2934
- const g = Re.current[m];
2935
- g && window.clearTimeout(g), Re.current[m] = window.setTimeout(() => {
2936
- pt.current(m, H);
2977
+ if (!Ct(H).reportId || tt.current[m] === H) return;
2978
+ tt.current[m] = H;
2979
+ const g = Ge.current[m];
2980
+ g && window.clearTimeout(g), Ge.current[m] = window.setTimeout(() => {
2981
+ bt.current(m, H);
2937
2982
  }, 400);
2938
2983
  } else {
2939
- const x = Re.current[m];
2940
- x && window.clearTimeout(x), delete Re.current[m], Ke.current[m] = "", pt.current(m, "");
2984
+ const x = Ge.current[m];
2985
+ x && window.clearTimeout(x), delete Ge.current[m], tt.current[m] = "", bt.current(m, "");
2941
2986
  }
2942
2987
  }
2943
2988
  }
2944
2989
  } catch {
2945
2990
  }
2946
- if (E.current && E.current.querySelectorAll('[data-type="variable"]').forEach((i) => {
2991
+ if (N.current && N.current.querySelectorAll('[data-type="variable"]').forEach((i) => {
2947
2992
  const h = i.querySelector(".variable-info-icon");
2948
2993
  if (h) {
2949
2994
  let m = !1;
@@ -2961,12 +3006,12 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2961
3006
  }
2962
3007
  m ? h.classList.add("hidden") : h.classList.remove("hidden");
2963
3008
  }
2964
- }), wt(E, t, re), kt(E, $e, re, Ve), !E.current) return;
3009
+ }), St(N, t, U), Nt(N, Te, U, Oe), !N.current) return;
2965
3010
  t.filter((l) => l.type === "multi-variable" && l.key).forEach((l) => {
2966
3011
  if (!l.key) return;
2967
- const i = l.maxCount || 9, h = Me[l.key] || 1, m = [];
3012
+ const i = l.maxCount || 9, h = Be[l.key] || 1, m = [];
2968
3013
  for (let f = 0; f < h; f++) {
2969
- const Q = `${l.key}_${f}`, K = E.current.querySelector(
3014
+ const Q = `${l.key}_${f}`, K = N.current.querySelector(
2970
3015
  `[data-type="variable"][data-key="${Q}"][data-multi-key="${l.key}"]`
2971
3016
  );
2972
3017
  if (K) {
@@ -2984,150 +3029,150 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
2984
3029
  if (g && q >= 0) {
2985
3030
  const f = window.getSelection();
2986
3031
  if (f && f.rangeCount > 0) {
2987
- const j = f.getRangeAt(0), se = j.startContainer, ue = se.nodeType === Node.ELEMENT_NODE ? se.closest('[data-type="variable"][data-multi-key]') : se.parentElement?.closest('[data-type="variable"][data-multi-key]');
2988
- if (ue) {
2989
- const le = ue.dataset.key;
2990
- if (le) {
2991
- const U = document.createRange();
2992
- U.setStartBefore(ue), U.setEnd(j.startContainer, j.startOffset);
2993
- const ie = U.toString().length;
2994
- Xe.current = { key: le, offset: ie };
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) {
3036
+ const pe = document.createRange();
3037
+ pe.setStartBefore(ie), pe.setEnd(W.startContainer, W.startOffset);
3038
+ const Ee = pe.toString().length;
3039
+ nt.current = { key: ae, offset: Ee };
2995
3040
  }
2996
3041
  }
2997
3042
  }
2998
3043
  const Q = [...m];
2999
- for (let j = q; j < Q.length - 1; j++)
3000
- Q[j] = Q[j + 1];
3044
+ for (let W = q; W < Q.length - 1; W++)
3045
+ Q[W] = Q[W + 1];
3001
3046
  Q.pop();
3002
3047
  const K = {};
3003
- Q.forEach((j, se) => {
3004
- j && (K[`${l.key}_${se}`] = j);
3048
+ Q.forEach((W, se) => {
3049
+ W && (K[`${l.key}_${se}`] = W);
3005
3050
  });
3006
3051
  const ee = Math.max(x ? Q.length : Q.length + 1, 1);
3007
- E.current.querySelectorAll(
3052
+ N.current.querySelectorAll(
3008
3053
  '[data-type="variable"]'
3009
- ).forEach((j) => {
3010
- const se = j.dataset.key, ue = j.dataset.multiKey;
3011
- if (se && ue !== l.key) {
3012
- const le = j.innerText.replace(/[\u200B\n]/g, "").trim();
3013
- le && (K[se] = le);
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);
3014
3059
  }
3015
- }), E.current.__tempVariableValues = K, qe((j) => ({
3016
- ...j,
3060
+ }), N.current.__tempVariableValues = K, Me((W) => ({
3061
+ ...W,
3017
3062
  [l.key]: ee
3018
3063
  }));
3019
3064
  return;
3020
3065
  }
3021
3066
  if (!x) {
3022
- const f = h - 1, Q = `${l.key}_${f}`, K = E.current.querySelector(
3067
+ const f = h - 1, Q = `${l.key}_${f}`, K = N.current.querySelector(
3023
3068
  `[data-type="variable"][data-key="${Q}"][data-multi-key="${l.key}"]`
3024
3069
  );
3025
3070
  if (K && K.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && h < i) {
3026
- const Z = window.getSelection();
3027
- if (Z && Z.rangeCount > 0) {
3028
- const j = Z.getRangeAt(0), se = j.startContainer, ue = se.nodeType === Node.ELEMENT_NODE ? se.closest('[data-type="variable"][data-multi-key]') : se.parentElement?.closest('[data-type="variable"][data-multi-key]');
3029
- if (ue) {
3030
- const le = ue.dataset.key;
3031
- if (le) {
3032
- const U = document.createRange();
3033
- U.setStartBefore(ue), U.setEnd(j.startContainer, j.startOffset);
3034
- const ie = U.toString().length;
3035
- Xe.current = { key: le, offset: ie };
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) {
3077
+ const pe = document.createRange();
3078
+ pe.setStartBefore(ie), pe.setEnd(W.startContainer, W.startOffset);
3079
+ const Ee = pe.toString().length;
3080
+ nt.current = { key: ae, offset: Ee };
3036
3081
  }
3037
3082
  }
3038
3083
  }
3039
- qe((j) => ({
3040
- ...j,
3084
+ Me((W) => ({
3085
+ ...W,
3041
3086
  [l.key]: h + 1
3042
3087
  }));
3043
3088
  }
3044
3089
  }
3045
3090
  });
3046
3091
  };
3047
- Ye(() => {
3048
- const a = E.current;
3092
+ Je(() => {
3093
+ const a = N.current;
3049
3094
  if (!a) return;
3050
3095
  const l = /* @__PURE__ */ new Map(), i = (H) => {
3051
3096
  const x = H.target, g = H.relatedTarget;
3052
- !x || !E.current || !E.current.contains(x) || g && E.current.contains(g) || setTimeout(() => {
3053
- if (E.current) {
3054
- if ($e.length === 0) {
3055
- const q = E.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
3056
- Ve(q.length > 0);
3097
+ !x || !N.current || !N.current.contains(x) || g && N.current.contains(g) || setTimeout(() => {
3098
+ if (N.current) {
3099
+ if (Te.length === 0) {
3100
+ const q = N.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
3101
+ Oe(q.length > 0);
3057
3102
  return;
3058
3103
  }
3059
- xt(E), wt(E, $e, re), kt(E, $e, re, Ve);
3104
+ Tt(N), St(N, Te, U), Nt(N, Te, U, Oe);
3060
3105
  }
3061
3106
  }, 0);
3062
3107
  };
3063
3108
  a.addEventListener("blur", i, !0);
3064
3109
  const h = () => {
3065
- if (!E.current) return;
3110
+ if (!N.current) return;
3066
3111
  l.forEach((g, q) => {
3067
3112
  q.removeEventListener("blur", g, !1);
3068
3113
  }), l.clear();
3069
- const H = E.current.querySelectorAll(
3114
+ const H = N.current.querySelectorAll(
3070
3115
  '[data-type="variable"][data-multi-key]'
3071
3116
  ), x = (g) => {
3072
3117
  g.stopPropagation(), g.stopImmediatePropagation();
3073
3118
  const q = g.target;
3074
- if (!q || !E.current || !E.current.contains(q))
3119
+ if (!q || !N.current || !N.current.contains(q))
3075
3120
  return;
3076
3121
  const f = q.closest('[data-type="variable"][data-multi-key]');
3077
- if (!f || !E.current.contains(f))
3122
+ if (!f || !N.current.contains(f))
3078
3123
  return;
3079
3124
  let Q = !1;
3080
- if (l.forEach((U, ie) => {
3081
- (ie === f || ie.contains(q)) && (Q = !0);
3125
+ if (l.forEach((pe, Ee) => {
3126
+ (Ee === f || Ee.contains(q)) && (Q = !0);
3082
3127
  }), !Q)
3083
3128
  return;
3084
- const K = f.dataset.multiKey, ee = f.dataset.key, Z = f.dataset.index;
3085
- if (!K || !ee || Z === void 0) return;
3086
- const j = g.relatedTarget;
3087
- if (!(!j || !E.current.contains(j)))
3129
+ const K = f.dataset.multiKey, ee = f.dataset.key, ne = f.dataset.index;
3130
+ if (!K || !ee || ne === void 0) return;
3131
+ const W = g.relatedTarget;
3132
+ if (!(!W || !N.current.contains(W)))
3088
3133
  return;
3089
- const ue = f.innerText.replace(/[\u200B\n]/g, "").trim();
3134
+ const ie = f.innerText.replace(/[\u200B\n]/g, "").trim();
3090
3135
  console.log("[Blur Event] 失去焦点的 multi-variable 输入框:", {
3091
3136
  multiKey: K,
3092
3137
  currentKey: ee,
3093
- index: Z,
3094
- content: ue
3138
+ index: ne,
3139
+ content: ie
3095
3140
  });
3096
- const le = /[、,,\s]+/;
3097
- if (le.test(ue)) {
3098
- const U = ue.split(le).map((ke) => ke.trim()).filter((ke) => ke.length > 0);
3099
- console.log("[Blur Event] 拆分前的内容:", ue), console.log("[Blur Event] 拆分后的部分:", U);
3100
- const be = U.slice(0, 9);
3101
- if (console.log("[Blur Event] 有效的部分(最多9个):", be), be.length > 1) {
3102
- const ke = t.find((ve) => ve.type === "multi-variable" && ve.key === K);
3103
- if (ke) {
3104
- const ve = Me[K] || 1, Ne = parseInt(Z, 10), Be = ke.maxCount || 9, rt = [];
3105
- for (let Ee = 0; Ee < ve; Ee++) {
3106
- const Oe = `${K}_${Ee}`, at = E.current.querySelector(
3107
- `[data-type="variable"][data-key="${Oe}"][data-multi-key="${K}"]`
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, ve = parseInt(ne, 10), Se = le.maxCount || 9, ke = [];
3150
+ for (let Ne = 0; Ne < we; Ne++) {
3151
+ const ze = `${K}_${Ne}`, ut = N.current.querySelector(
3152
+ `[data-type="variable"][data-key="${ze}"][data-multi-key="${K}"]`
3108
3153
  );
3109
- if (at) {
3110
- const ot = at.innerText.replace(/[\u200B\n]/g, "").trim();
3111
- rt.push(ot);
3154
+ if (ut) {
3155
+ const dt = ut.innerText.replace(/[\u200B\n]/g, "").trim();
3156
+ ke.push(dt);
3112
3157
  }
3113
3158
  }
3114
- console.log("[Blur Event] 拆分前的所有值:", rt), console.log("[Blur Event] 当前索引:", Ne), console.log("[Blur Event] 要插入的值:", be), rt.splice(Ne, 1, ...be);
3115
- const Le = rt.slice(0, Be);
3116
- console.log("[Blur Event] 拆分后的所有值:", Le), Le.length > 0 && Le[Le.length - 1] !== "" && Le.length < Be && Le.push("");
3117
- const bn = Math.max(Le.length, 1), vt = {};
3118
- Le.forEach((Ee, Oe) => {
3119
- Ee && (vt[`${K}_${Oe}`] = Ee);
3120
- }), E.current.querySelectorAll(
3159
+ console.log("[Blur Event] 拆分前的所有值:", ke), console.log("[Blur Event] 当前索引:", ve), console.log("[Blur Event] 要插入的值:", Z), ke.splice(ve, 1, ...Z);
3160
+ const Ce = ke.slice(0, Se);
3161
+ console.log("[Blur Event] 拆分后的所有值:", Ce), Ce.length > 0 && Ce[Ce.length - 1] !== "" && Ce.length < Se && Ce.push("");
3162
+ const Wt = Math.max(Ce.length, 1), Xe = {};
3163
+ Ce.forEach((Ne, ze) => {
3164
+ Ne && (Xe[`${K}_${ze}`] = Ne);
3165
+ }), N.current.querySelectorAll(
3121
3166
  '[data-type="variable"]'
3122
- ).forEach((Ee) => {
3123
- const Oe = Ee.dataset.key, at = Ee.dataset.multiKey;
3124
- if (Oe && at !== K) {
3125
- const ot = Ee.innerText.replace(/[\u200B\n]/g, "").trim();
3126
- ot && (vt[Oe] = ot);
3167
+ ).forEach((Ne) => {
3168
+ const ze = Ne.dataset.key, ut = Ne.dataset.multiKey;
3169
+ if (ze && ut !== K) {
3170
+ const dt = Ne.innerText.replace(/[\u200B\n]/g, "").trim();
3171
+ dt && (Xe[ze] = dt);
3127
3172
  }
3128
- }), E.current.__tempVariableValues = vt, qe((Ee) => ({
3129
- ...Ee,
3130
- [K]: bn
3173
+ }), N.current.__tempVariableValues = Xe, Me((Ne) => ({
3174
+ ...Ne,
3175
+ [K]: Wt
3131
3176
  }));
3132
3177
  }
3133
3178
  }
@@ -3144,8 +3189,8 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3144
3189
  x.removeEventListener("blur", H, !1);
3145
3190
  }), l.clear();
3146
3191
  };
3147
- }, [t, $e, Me, re]);
3148
- const mn = (a) => {
3192
+ }, [t, Te, Be, U]);
3193
+ const kn = (a) => {
3149
3194
  if (o) {
3150
3195
  a.preventDefault();
3151
3196
  return;
@@ -3159,8 +3204,8 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3159
3204
  const i = l.anchorNode;
3160
3205
  let h = null;
3161
3206
  if (i && (i.nodeType === Node.ELEMENT_NODE ? h = i.closest('[data-type="text"]') : i.nodeType === Node.TEXT_NODE && i.parentElement && (h = i.parentElement.closest('[data-type="text"]'))), h) {
3162
- if (a.preventDefault(), a.stopPropagation(), E.current) {
3163
- const m = E.current.querySelector(
3207
+ if (a.preventDefault(), a.stopPropagation(), N.current) {
3208
+ const m = N.current.querySelector(
3164
3209
  '[data-type="variable"], [data-type="upload"]'
3165
3210
  );
3166
3211
  m && m.focus();
@@ -3172,8 +3217,8 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3172
3217
  const i = l.anchorNode;
3173
3218
  let h = null;
3174
3219
  if (i && (i.nodeType === Node.ELEMENT_NODE ? h = i.closest(".tag-node") : i.nodeType === Node.TEXT_NODE && i.parentElement && (h = i.parentElement.closest(".tag-node"))), h) {
3175
- if (a.preventDefault(), a.stopPropagation(), E.current) {
3176
- const m = E.current.querySelector(
3220
+ if (a.preventDefault(), a.stopPropagation(), N.current) {
3221
+ const m = N.current.querySelector(
3177
3222
  '[data-type="variable"], [data-type="upload"]'
3178
3223
  );
3179
3224
  m && m.focus();
@@ -3181,12 +3226,12 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3181
3226
  return;
3182
3227
  }
3183
3228
  }
3184
- if (a.key === "Escape" && E.current) {
3229
+ if (a.key === "Escape" && N.current) {
3185
3230
  if (T) {
3186
3231
  a.preventDefault();
3187
3232
  return;
3188
3233
  }
3189
- E.current.innerHTML = "", E.current.focus();
3234
+ N.current.innerHTML = "", N.current.focus();
3190
3235
  }
3191
3236
  if (a.key === "Backspace") {
3192
3237
  const i = window.getSelection();
@@ -3223,19 +3268,19 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3223
3268
  }
3224
3269
  }
3225
3270
  }
3226
- }, yn = () => {
3227
- if (s || o || C || !Tt || !E.current) return;
3271
+ }, $n = () => {
3272
+ if (s || o || E || !Mt || !N.current) return;
3228
3273
  if (t.length === 0) {
3229
- const x = E.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
3274
+ const x = N.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
3230
3275
  if (!x) return;
3231
- if (y(x, x), E.current) {
3232
- E.current.textContent = "";
3276
+ if (y(x, x), N.current) {
3277
+ N.current.textContent = "";
3233
3278
  const g = new Event("input", { bubbles: !0 });
3234
- E.current.dispatchEvent(g);
3279
+ N.current.dispatchEvent(g);
3235
3280
  }
3236
3281
  return;
3237
3282
  }
3238
- const a = E.current;
3283
+ const a = N.current;
3239
3284
  let l = "";
3240
3285
  const i = {}, h = /* @__PURE__ */ new Set(), m = (x) => {
3241
3286
  if (!(x.nodeType === Node.ELEMENT_NODE && x.style.display === "none")) {
@@ -3249,23 +3294,23 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3249
3294
  g,
3250
3295
  NodeFilter.SHOW_TEXT,
3251
3296
  {
3252
- acceptNode: (j) => {
3297
+ acceptNode: (W) => {
3253
3298
  const se = g.querySelector(".variable-info-icon");
3254
- return se && se.contains(j) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
3299
+ return se && se.contains(W) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
3255
3300
  }
3256
3301
  }
3257
3302
  );
3258
3303
  for (; ee.nextNode(); )
3259
3304
  K += ee.currentNode.textContent || "";
3260
- const Z = K.replace(/[\u200B\n]/g, "").trim();
3261
- if (Z) {
3262
- const j = g.dataset.multiKey;
3263
- if (j) {
3264
- (!i[j] || !Array.isArray(i[j])) && (i[j] = []);
3265
- const se = i[j];
3266
- se.push(Z), se.length > 1 && (l += " "), l += Z;
3305
+ const ne = K.replace(/[\u200B\n]/g, "").trim();
3306
+ if (ne) {
3307
+ const W = g.dataset.multiKey;
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;
3267
3312
  } else
3268
- Q === "report-url" ? (i[`${f}__sourceUrl`] = Z, l += Z) : (i[f] = Z, l += Z);
3313
+ Q === "report-url" ? (i[`${f}__sourceUrl`] = ne, l += ne) : (i[f] = ne, l += ne);
3269
3314
  }
3270
3315
  } else if (q === "select" && f) {
3271
3316
  const K = (g.getAttribute("data-value") || "").trim();
@@ -3277,33 +3322,33 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3277
3322
  const ee = (g.textContent || "").replace(/\u200B/g, "").trim();
3278
3323
  if (ee)
3279
3324
  if (Q === "report-module") {
3280
- const j = (f.match(/^(.*)__module_\d+$/)?.[1] || f).trim();
3281
- (!i[j] || !Array.isArray(i[j])) && (i[j] = []), i[j].push(ee), h.add(j), l += ee;
3325
+ const W = (f.match(/^(.*)__module_\d+$/)?.[1] || f).trim();
3326
+ (!i[W] || !Array.isArray(i[W])) && (i[W] = []), i[W].push(ee), h.add(W), l += ee;
3282
3327
  } else
3283
3328
  i[f] = ee, l += ee;
3284
3329
  } else if (q === "datepicker" && f) {
3285
3330
  const ee = (g.getAttribute("data-value") || "").trim();
3286
3331
  if (ee)
3287
3332
  if (ee.includes(",")) {
3288
- const Z = ee.split(",");
3289
- Z.length === 2 ? (i[f] = Z, l += `[${Z[0]}, ${Z[1]}]`) : (i[f] = ee, l += ee);
3333
+ const ne = ee.split(",");
3334
+ ne.length === 2 ? (i[f] = ne, l += `[${ne[0]}, ${ne[1]}]`) : (i[f] = ee, l += ee);
3290
3335
  } else
3291
3336
  i[f] = ee, l += ee;
3292
3337
  } else if (q === "upload" && f) {
3293
3338
  const K = g.dataset.batchKey;
3294
3339
  if (K) {
3295
- const ee = t.find((Z) => Z.type === "upload" && Z.key === K);
3340
+ const ee = t.find((ne) => ne.type === "upload" && ne.key === K);
3296
3341
  if (ee && typeof ee.maxCount == "number" && typeof ee.minCount == "number") {
3297
- const Z = [];
3298
- for (let j = 0; j < ee.maxCount; j++) {
3299
- const se = `${K}-${j}`, ue = re[se];
3300
- ue && Z.push(ue);
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);
3301
3346
  }
3302
- i[K] || (i[K] = Z.length > 0 ? Z : null, Z.length > 0 && (l += ` [附带${Z.length}个文件: ${Z.map((j) => j.name).join(", ")}] `));
3347
+ i[K] || (i[K] = ne.length > 0 ? ne : null, ne.length > 0 && (l += ` [附带${ne.length}个文件: ${ne.map((W) => W.name).join(", ")}] `));
3303
3348
  } else
3304
- i[f] = re[f] ?? null, re[f] && (l += ` [附带文件: ${re[f]?.name}] `);
3349
+ i[f] = U[f] ?? null, U[f] && (l += ` [附带文件: ${U[f]?.name}] `);
3305
3350
  } else
3306
- i[f] = re[f] ?? null, re[f] && (l += ` [附带文件: ${re[f]?.name}] `);
3351
+ i[f] = U[f] ?? null, U[f] && (l += ` [附带文件: ${U[f]?.name}] `);
3307
3352
  } else {
3308
3353
  if (g.classList.contains("tag-close-btn") || g.classList.contains("file-remove-btn")) return;
3309
3354
  g.getAttribute("contenteditable") === "false" && !q && g.classList.contains("tag-node") ? l += g.innerText : g.childNodes.forEach(m);
@@ -3323,38 +3368,38 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3323
3368
  f != null && (f instanceof File ? H.append(`${x}[${Q}]`, f) : typeof f == "string" ? H.append(`${x}[${Q}]`, f) : H.append(`${x}[${Q}]`, String(f)));
3324
3369
  }) : typeof g == "string" ? H.append(x, g) : H.append(x, String(g)));
3325
3370
  }), y(H, l);
3326
- }, Ae = Ge ? !1 : Qe ? u : Ze, hn = Math.max(
3371
+ }, Ie = je ? !1 : at ? v : ot, En = Math.max(
3327
3372
  0,
3328
- G - Zt
3329
- ), _e = typeof O == "number" && O > 0 ? O : 0, gn = {
3373
+ R - sn
3374
+ ), Le = typeof _ == "number" && _ > 0 ? _ : 0, Cn = {
3330
3375
  ...b ? { width: typeof b == "number" ? `${b}px` : b } : {},
3331
3376
  ...w ? { border: w } : {},
3332
- ...P ? { background: P } : {},
3333
- ..._e ? {
3334
- transition: `height ${_e}ms cubic-bezier(0.2, 0, 0, 1), max-height ${_e}ms cubic-bezier(0.2, 0, 0, 1)`
3377
+ ...V ? { background: V } : {},
3378
+ ...Le ? {
3379
+ transition: `height ${Le}ms cubic-bezier(0.2, 0, 0, 1), max-height ${Le}ms cubic-bezier(0.2, 0, 0, 1)`
3335
3380
  } : {},
3336
- ...Ae ? {
3337
- height: `${G}px`,
3338
- maxHeight: `${G}px`,
3339
- minHeight: `${G}px`
3381
+ ...Ie ? {
3382
+ height: `${R}px`,
3383
+ maxHeight: `${R}px`,
3384
+ minHeight: `${R}px`
3340
3385
  } : {
3341
3386
  ...e ? { maxHeight: typeof e == "number" ? `${e}px` : e } : {},
3342
3387
  ...n ? { minHeight: typeof n == "number" ? `${n}px` : n } : {}
3343
3388
  }
3344
3389
  };
3345
- return Ye(() => {
3346
- if (!Ae || !pe.current) return;
3390
+ return Je(() => {
3391
+ if (!Ie || !ye.current) return;
3347
3392
  const l = window.requestAnimationFrame(() => {
3348
- pe.current && (pe.current.scrollTop = 0, pe.current.scrollLeft = 0);
3393
+ ye.current && (ye.current.scrollTop = 0, ye.current.scrollLeft = 0);
3349
3394
  });
3350
3395
  return () => window.cancelAnimationFrame(l);
3351
- }, [Ae]), Ye(() => {
3352
- if (!Ae) return;
3353
- const a = ft.current;
3396
+ }, [Ie]), Je(() => {
3397
+ if (!Ie) return;
3398
+ const a = vt.current;
3354
3399
  if (!a) return;
3355
- const l = ne.current?.getBoundingClientRect().height ?? 0, i = Math.max(0, a - l);
3400
+ const l = de.current?.getBoundingClientRect().height ?? 0, i = Math.max(0, a - l);
3356
3401
  if (i > 0) {
3357
- const h = At.current;
3402
+ const h = Bt.current;
3358
3403
  if (h === window) {
3359
3404
  const m = document.documentElement;
3360
3405
  m.scrollTop = Math.max(0, m.scrollTop - i);
@@ -3363,43 +3408,43 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3363
3408
  m.scrollTop = Math.max(0, m.scrollTop - i);
3364
3409
  }
3365
3410
  }
3366
- ft.current = null;
3367
- }, [Ae]), /* @__PURE__ */ me(
3411
+ vt.current = null;
3412
+ }, [Ie]), /* @__PURE__ */ ue(
3368
3413
  "div",
3369
3414
  {
3370
- className: `rich-text-editor${Ae ? " rte-auto-collapsed" : ""}${r ? ` ${r}` : ""}`,
3371
- style: gn,
3415
+ className: `rich-text-editor${Ie ? " rte-auto-collapsed" : ""}${r ? ` ${r}` : ""}`,
3416
+ style: Cn,
3372
3417
  "data-disabled": o,
3373
- ref: ne,
3418
+ ref: de,
3374
3419
  children: [
3375
- X,
3376
- /* @__PURE__ */ me(
3420
+ me,
3421
+ /* @__PURE__ */ ue(
3377
3422
  "div",
3378
3423
  {
3379
3424
  className: "rich-text-editor-content",
3380
- ref: pe,
3381
- style: Ae ? {
3425
+ ref: ye,
3426
+ style: Ie ? {
3382
3427
  // 折叠态:只裁切内容区(footer 保持),高度由 collapsedTotalHeight - footerHeight 得出
3383
- maxHeight: `${hn}px`,
3428
+ maxHeight: `${En}px`,
3384
3429
  overflow: "hidden",
3385
- ..._e ? {
3386
- transition: `max-height ${_e}ms cubic-bezier(0.2, 0, 0, 1)`
3430
+ ...Le ? {
3431
+ transition: `max-height ${Le}ms cubic-bezier(0.2, 0, 0, 1)`
3387
3432
  } : {}
3388
- } : _e ? { transition: `max-height ${_e}ms cubic-bezier(0.2, 0, 0, 1)` } : void 0,
3433
+ } : Le ? { transition: `max-height ${Le}ms cubic-bezier(0.2, 0, 0, 1)` } : void 0,
3389
3434
  children: [
3390
3435
  /* @__PURE__ */ L(
3391
3436
  "div",
3392
3437
  {
3393
- ref: E,
3394
- className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${Qt && N ? "rte-editor-empty" : ""}`,
3438
+ ref: N,
3439
+ className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${on && S ? "rte-editor-empty" : ""}`,
3395
3440
  contentEditable: t.length === 0,
3396
3441
  suppressContentEditableWarning: !0,
3397
- "data-placeholder": N,
3398
- onMouseDown: cn,
3399
- onMouseMove: un,
3400
- onMouseUp: dn,
3442
+ "data-placeholder": S,
3443
+ onMouseDown: gn,
3444
+ onMouseMove: bn,
3445
+ onMouseUp: vn,
3401
3446
  onClick: (a) => {
3402
- pn(a);
3447
+ xn(a);
3403
3448
  const l = a.target;
3404
3449
  if (l) {
3405
3450
  const h = [
@@ -3429,45 +3474,45 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3429
3474
  ].join(",");
3430
3475
  if (l.closest(h)) return;
3431
3476
  }
3432
- if (R || c && !Ge) {
3433
- if (rn || c && Ge) return;
3434
- c && typeof _ == "number" && _ > 0 && (yt.current = Date.now() + _), ze(!Ae, "click");
3477
+ if (p || d && !je) {
3478
+ if (dn || d && je) return;
3479
+ d && typeof X == "number" && X > 0 && (wt.current = Date.now() + X), pn(!Ie, "click");
3435
3480
  }
3436
- d && d(a);
3481
+ u && u(a);
3437
3482
  },
3438
- onDoubleClick: fn,
3439
- onInput: Ot,
3440
- onKeyDown: mn,
3441
- onPaste: sn
3483
+ onDoubleClick: wn,
3484
+ onInput: jt,
3485
+ onKeyDown: kn,
3486
+ onPaste: yn
3442
3487
  }
3443
3488
  ),
3444
3489
  /* @__PURE__ */ L(
3445
3490
  "input",
3446
3491
  {
3447
3492
  type: "file",
3448
- ref: oe,
3493
+ ref: be,
3449
3494
  className: "rte-file-input",
3450
3495
  accept: ".csv,.xlsx,.xls,.txt,.pdf,image/*",
3451
- onChange: ln
3496
+ onChange: hn
3452
3497
  }
3453
3498
  )
3454
3499
  ]
3455
3500
  }
3456
3501
  ),
3457
- /* @__PURE__ */ me("div", { className: "rich-text-editor-footer", ref: Nt, children: [
3458
- /* @__PURE__ */ L("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ me("div", { className: "rich-text-editor-brand", children: [
3459
- /* @__PURE__ */ me("div", { className: "rte-brand-badge", children: [
3502
+ /* @__PURE__ */ ue("div", { className: "rich-text-editor-footer", ref: It, children: [
3503
+ /* @__PURE__ */ L("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ ue("div", { className: "rich-text-editor-brand", children: [
3504
+ /* @__PURE__ */ ue("div", { className: "rte-brand-badge", children: [
3460
3505
  /* @__PURE__ */ L("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
3461
3506
  /* @__PURE__ */ L("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
3462
3507
  ] }),
3463
3508
  k !== "hideAgent" && /* @__PURE__ */ L(
3464
- Tn,
3509
+ In,
3465
3510
  {
3466
3511
  placement: "topLeft",
3467
3512
  menu: {
3468
3513
  items: I.filter((a) => a.isShowNew !== 1).map((a) => ({
3469
3514
  key: a.key,
3470
- label: /* @__PURE__ */ me("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
3515
+ label: /* @__PURE__ */ ue("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
3471
3516
  a.icon && /* @__PURE__ */ L("i", { className: a.icon }),
3472
3517
  /* @__PURE__ */ L("span", { children: a.label })
3473
3518
  ] }),
@@ -3479,21 +3524,21 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3479
3524
  trigger: ["click"],
3480
3525
  disabled: o || s,
3481
3526
  overlayClassName: "rte-agent-dropdown",
3482
- children: /* @__PURE__ */ me("div", { className: "rte-agent-badge", style: { cursor: I.length > 0 ? "pointer" : "default" }, children: [
3527
+ children: /* @__PURE__ */ ue("div", { className: "rte-agent-badge", style: { cursor: I.length > 0 ? "pointer" : "default" }, children: [
3483
3528
  /* @__PURE__ */ L("i", { className: "iconfont icon-zhinengti", style: { fontSize: "16px" } }),
3484
3529
  /* @__PURE__ */ L("span", { className: "rte-agent-text", children: "智能体" })
3485
3530
  ] })
3486
3531
  }
3487
3532
  )
3488
3533
  ] }) }),
3489
- /* @__PURE__ */ me("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
3534
+ /* @__PURE__ */ ue("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
3490
3535
  (() => {
3491
3536
  const a = t.find((i) => i.type === "tag");
3492
3537
  if (!a || !a.text) return null;
3493
3538
  const l = I.find((i) => i.label === a.text);
3494
- return !l || l.points === void 0 || l.points === null ? null : /* @__PURE__ */ me("div", { className: "rte-points-badge", children: [
3539
+ return !l || l.points === void 0 || l.points === null ? null : /* @__PURE__ */ ue("div", { className: "rte-points-badge", children: [
3495
3540
  /* @__PURE__ */ L("i", { className: "iconfont icon-jifen", style: { marginRight: "4px", fontSize: "16px" } }),
3496
- /* @__PURE__ */ me("span", { style: { fontSize: "16px", lineHeight: "22px" }, children: [
3541
+ /* @__PURE__ */ ue("span", { style: { fontSize: "16px", lineHeight: "22px" }, children: [
3497
3542
  "-",
3498
3543
  String(l.points)
3499
3544
  ] })
@@ -3503,32 +3548,32 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3503
3548
  "button",
3504
3549
  {
3505
3550
  type: "button",
3506
- onClick: yn,
3507
- disabled: s || o || C || !Tt,
3551
+ onClick: $n,
3552
+ disabled: s || o || E || !Mt,
3508
3553
  className: "rich-text-editor-send-button",
3509
- children: s || C ? /* @__PURE__ */ L("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ L("i", { className: "iconfont icon-fasong" })
3554
+ children: s || E ? /* @__PURE__ */ L("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ L("i", { className: "iconfont icon-fasong" })
3510
3555
  }
3511
3556
  )
3512
3557
  ] })
3513
3558
  ] }),
3514
- fe?.anchorEl && (() => {
3515
- if (!document.body.contains(fe.anchorEl))
3559
+ he?.anchorEl && (() => {
3560
+ if (!document.body.contains(he.anchorEl))
3516
3561
  return null;
3517
3562
  let a = "", l = {
3518
3563
  background: "var(--neutral-800, #262626)"
3519
3564
  };
3520
- if (fe.type === "upload")
3565
+ if (he.type === "upload")
3521
3566
  a = t.find(
3522
- (m) => m.type === "upload" && m.key === fe.key
3567
+ (m) => m.type === "upload" && m.key === he.key
3523
3568
  )?.tooltip || "";
3524
- else if (fe.type === "tag")
3525
- a = fe.anchorEl.dataset.tooltip || "";
3526
- else if (fe.type === "upload-label")
3527
- a = fe.anchorEl.querySelector(".upload-label[data-file-name]")?.dataset.fileName || fe.anchorEl.dataset.fileName || "";
3528
- else if (fe.type === "variable")
3529
- a = fe.anchorEl.dataset.tooltip || "";
3530
- else if (fe.type === "upload-preview") {
3531
- const h = re[fe.key], m = !!h && (h.type?.startsWith("image/") || /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(h.name || ""));
3569
+ else if (he.type === "tag")
3570
+ a = he.anchorEl.dataset.tooltip || "";
3571
+ else if (he.type === "upload-label")
3572
+ a = he.anchorEl.querySelector(".upload-label[data-file-name]")?.dataset.fileName || he.anchorEl.dataset.fileName || "";
3573
+ else if (he.type === "variable")
3574
+ a = he.anchorEl.dataset.tooltip || "";
3575
+ else if (he.type === "upload-preview") {
3576
+ const h = U[he.key], m = !!h && (h.type?.startsWith("image/") || /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(h.name || ""));
3532
3577
  if (h && m) {
3533
3578
  const H = URL.createObjectURL(h);
3534
3579
  a = /* @__PURE__ */ L("div", { className: "rte-upload-preview", children: /* @__PURE__ */ L("img", { className: "rte-upload-preview-img", src: H, alt: h.name }) }), l = {
@@ -3541,20 +3586,20 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3541
3586
  a = "";
3542
3587
  }
3543
3588
  if (!a) return null;
3544
- const i = fe.type === "upload-preview" ? "#0A0A0A" : "#fff";
3545
- return St(
3589
+ const i = he.type === "upload-preview" ? "#0A0A0A" : "#fff";
3590
+ return Lt(
3546
3591
  /* @__PURE__ */ L(
3547
- Nn,
3592
+ Dn,
3548
3593
  {
3549
3594
  arrow: !1,
3550
3595
  overlayClassName: [
3551
3596
  "rte-tooltip",
3552
- fe.type === "upload-preview" ? "rte-tooltip-preview" : "",
3553
- fe.type === "tag" ? "rte-tooltip-tag" : ""
3597
+ he.type === "upload-preview" ? "rte-tooltip-preview" : "",
3598
+ he.type === "tag" ? "rte-tooltip-tag" : ""
3554
3599
  ].filter(Boolean).join(" "),
3555
- title: fe.type === "upload-preview" ? a : /* @__PURE__ */ L("div", { style: { maxWidth: "200px", fontSize: "12px", color: i }, children: a }),
3600
+ title: he.type === "upload-preview" ? a : /* @__PURE__ */ L("div", { style: { maxWidth: "200px", fontSize: "12px", color: i }, children: a }),
3556
3601
  open: !0,
3557
- placement: fe.type === "upload-preview" ? "topLeft" : "top",
3602
+ placement: he.type === "upload-preview" ? "topLeft" : "top",
3558
3603
  getPopupContainer: () => document.body,
3559
3604
  overlayInnerStyle: l,
3560
3605
  children: /* @__PURE__ */ L(
@@ -3562,11 +3607,11 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3562
3607
  {
3563
3608
  style: {
3564
3609
  position: "fixed",
3565
- left: `${fe.anchorEl.getBoundingClientRect().left}px`,
3610
+ left: `${he.anchorEl.getBoundingClientRect().left}px`,
3566
3611
  // 对于 upload-label 类型的 tooltip,向上移动 6px 以增加间距
3567
- top: `${fe.anchorEl.getBoundingClientRect().top - (fe.type === "upload-label" ? 4 : 0)}px`,
3568
- width: `${fe.anchorEl.offsetWidth}px`,
3569
- height: `${fe.anchorEl.offsetHeight}px`,
3612
+ top: `${he.anchorEl.getBoundingClientRect().top - (he.type === "upload-label" ? 4 : 0)}px`,
3613
+ width: `${he.anchorEl.offsetWidth}px`,
3614
+ height: `${he.anchorEl.offsetHeight}px`,
3570
3615
  pointerEvents: "none"
3571
3616
  }
3572
3617
  }
@@ -3576,13 +3621,13 @@ const { RangePicker: br } = Cn, vr = ({ host: t, onChange: y }) => {
3576
3621
  document.body
3577
3622
  );
3578
3623
  })(),
3579
- on,
3580
- an
3624
+ mn,
3625
+ fn
3581
3626
  ]
3582
3627
  }
3583
3628
  );
3584
3629
  };
3585
- wr.__docgenInfo = {
3630
+ Nr.__docgenInfo = {
3586
3631
  displayName: "RichTextEditor",
3587
3632
  description: "结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",
3588
3633
  props: {
@@ -3610,12 +3655,12 @@ wr.__docgenInfo = {
3610
3655
  }
3611
3656
  }
3612
3657
  };
3613
- const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==", kr = [
3658
+ const en = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==", qr = [
3614
3659
  { label: "5页", value: 5 },
3615
3660
  { label: "10页", value: 10 },
3616
3661
  { label: "15页", value: 15 },
3617
3662
  { label: "30页", value: 30 }
3618
- ], $r = ({
3663
+ ], Ar = ({
3619
3664
  autoLoading: t,
3620
3665
  batchSize: y,
3621
3666
  loadingProgress: s,
@@ -3624,9 +3669,9 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3624
3669
  onLoadNextPage: T,
3625
3670
  onStartAutoLoad: I,
3626
3671
  onStopLoad: A
3627
- }) => t && s ? /* @__PURE__ */ me("div", { className: "auto_load_progress", children: [
3628
- o || /* @__PURE__ */ L("img", { src: Wt, alt: "自动加载", width: 14, height: 14 }),
3629
- /* @__PURE__ */ me("span", { children: [
3672
+ }) => t && s ? /* @__PURE__ */ ue("div", { className: "auto_load_progress", children: [
3673
+ o || /* @__PURE__ */ L("img", { src: en, alt: "自动加载", width: 14, height: 14 }),
3674
+ /* @__PURE__ */ ue("span", { children: [
3630
3675
  "正在加载第",
3631
3676
  s.currentPage,
3632
3677
  "/",
@@ -3634,7 +3679,7 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3634
3679
  "页"
3635
3680
  ] }),
3636
3681
  /* @__PURE__ */ L(
3637
- qn,
3682
+ Bn,
3638
3683
  {
3639
3684
  percent: s.percentage,
3640
3685
  type: "line",
@@ -3642,7 +3687,7 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3642
3687
  }
3643
3688
  ),
3644
3689
  /* @__PURE__ */ L("span", { onClick: A, className: "auto_load_stop_btn", children: "停止加载" })
3645
- ] }) : /* @__PURE__ */ me("div", { className: "auto_load_container", children: [
3690
+ ] }) : /* @__PURE__ */ ue("div", { className: "auto_load_container", children: [
3646
3691
  /* @__PURE__ */ L(
3647
3692
  "div",
3648
3693
  {
@@ -3654,7 +3699,7 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3654
3699
  children: "加载下一页"
3655
3700
  }
3656
3701
  ),
3657
- /* @__PURE__ */ me(
3702
+ /* @__PURE__ */ ue(
3658
3703
  "div",
3659
3704
  {
3660
3705
  className: "right_control_wrap",
@@ -3662,23 +3707,23 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3662
3707
  backgroundColor: t ? "#f5f5f5" : "#2563eb"
3663
3708
  },
3664
3709
  children: [
3665
- /* @__PURE__ */ me(
3710
+ /* @__PURE__ */ ue(
3666
3711
  "div",
3667
3712
  {
3668
3713
  className: "auto_load_btn",
3669
3714
  onClick: t ? void 0 : I,
3670
3715
  children: [
3671
- o || /* @__PURE__ */ L("img", { src: Wt, alt: "自动加载", width: 14, height: 14 }),
3716
+ o || /* @__PURE__ */ L("img", { src: en, alt: "自动加载", width: 14, height: 14 }),
3672
3717
  /* @__PURE__ */ L("span", { children: "自动加载" })
3673
3718
  ]
3674
3719
  }
3675
3720
  ),
3676
3721
  /* @__PURE__ */ L(
3677
- dt,
3722
+ gt,
3678
3723
  {
3679
3724
  value: y,
3680
3725
  onChange: b,
3681
- options: kr,
3726
+ options: qr,
3682
3727
  disabled: t,
3683
3728
  size: "small",
3684
3729
  className: "auto_load_select",
@@ -3688,7 +3733,7 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3688
3733
  ]
3689
3734
  }
3690
3735
  )
3691
- ] }), Er = ({
3736
+ ] }), _r = ({
3692
3737
  current: t,
3693
3738
  loadIcon: y,
3694
3739
  pageSize: s,
@@ -3698,19 +3743,19 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3698
3743
  autoLoading: I = !1,
3699
3744
  loadingProgress: A,
3700
3745
  onChange: $,
3701
- onLoadNextPage: C,
3702
- onStartAutoLoad: N,
3746
+ onLoadNextPage: E,
3747
+ onStartAutoLoad: S,
3703
3748
  onStopLoading: w
3704
3749
  }) => {
3705
- const [P, k] = ce(5), e = Math.ceil(o / s), n = $t(() => b.length >= e, [b, e]), r = () => Array.from(
3750
+ const [V, k] = oe(5), e = Math.ceil(o / s), n = qt(() => b.length >= e, [b, e]), r = () => Array.from(
3706
3751
  { length: e },
3707
- (M, S) => S + 1
3708
- ).filter((M) => !b.includes(M)).slice(0, P);
3709
- return /* @__PURE__ */ me("div", { className: "pagination_footer", children: [
3710
- /* @__PURE__ */ me("div", { className: "pagination_leftWrap", children: [
3711
- /* @__PURE__ */ me("span", { className: "pagination_total", children: [
3752
+ (D, C) => C + 1
3753
+ ).filter((D) => !b.includes(D)).slice(0, V);
3754
+ return /* @__PURE__ */ ue("div", { className: "pagination_footer", children: [
3755
+ /* @__PURE__ */ ue("div", { className: "pagination_leftWrap", children: [
3756
+ /* @__PURE__ */ ue("span", { className: "pagination_total", children: [
3712
3757
  /* @__PURE__ */ L(
3713
- Bn,
3758
+ Fn,
3714
3759
  {
3715
3760
  style: { color: "#2563EB", marginRight: "4px" }
3716
3761
  }
@@ -3722,45 +3767,45 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3722
3767
  "条数据"
3723
3768
  ] }),
3724
3769
  !n && /* @__PURE__ */ L(
3725
- $r,
3770
+ Ar,
3726
3771
  {
3727
3772
  loadIcon: y || void 0,
3728
3773
  autoLoading: I,
3729
- batchSize: P,
3774
+ batchSize: V,
3730
3775
  loadingProgress: A,
3731
- disabled: !C || !N,
3776
+ disabled: !E || !S,
3732
3777
  onBatchSizeChange: k,
3733
- onLoadNextPage: () => C?.(),
3778
+ onLoadNextPage: () => E?.(),
3734
3779
  onStartAutoLoad: () => {
3735
- const c = r();
3736
- N?.(c);
3780
+ const d = r();
3781
+ S?.(d);
3737
3782
  },
3738
3783
  onStopLoad: () => w?.()
3739
3784
  }
3740
3785
  )
3741
3786
  ] }),
3742
3787
  /* @__PURE__ */ L(
3743
- An,
3788
+ Hn,
3744
3789
  {
3745
3790
  current: t,
3746
3791
  pageSize: s,
3747
3792
  total: o,
3748
- onChange: (c) => $(c),
3793
+ onChange: (d) => $(d),
3749
3794
  showSizeChanger: !1,
3750
3795
  showQuickJumper: !1,
3751
3796
  showTotal: () => "",
3752
- itemRender: (c, M, S) => {
3753
- const F = b.includes(c);
3754
- return M === "prev" || M === "next" || M === "jump-prev" || M === "jump-next" ? /* @__PURE__ */ L("div", { className: "pageBox", children: S }) : /* @__PURE__ */ me(
3797
+ itemRender: (d, D, C) => {
3798
+ const F = b.includes(d);
3799
+ return D === "prev" || D === "next" || D === "jump-prev" || D === "jump-next" ? /* @__PURE__ */ L("div", { className: "pageBox", children: C }) : /* @__PURE__ */ ue(
3755
3800
  "div",
3756
3801
  {
3757
3802
  className: "pageBox",
3758
3803
  style: {
3759
- backgroundColor: t === c ? "#2563EB" : "#f5f5f5",
3760
- color: t === c ? "#fff" : F ? "#171717" : "#a3a3a3"
3804
+ backgroundColor: t === d ? "#2563EB" : "#f5f5f5",
3805
+ color: t === d ? "#fff" : F ? "#171717" : "#a3a3a3"
3761
3806
  },
3762
3807
  children: [
3763
- c,
3808
+ d,
3764
3809
  !F && /* @__PURE__ */ L("span", { className: "unload_spot" })
3765
3810
  ]
3766
3811
  }
@@ -3769,7 +3814,7 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3769
3814
  }
3770
3815
  )
3771
3816
  ] });
3772
- }, Cr = (t) => {
3817
+ }, Lr = (t) => {
3773
3818
  const {
3774
3819
  loading: y,
3775
3820
  autoLoading: s,
@@ -3779,23 +3824,23 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3779
3824
  total: I,
3780
3825
  current: A,
3781
3826
  pageSize: $,
3782
- cachedPages: C,
3783
- onChangePage: N,
3827
+ cachedPages: E,
3828
+ onChangePage: S,
3784
3829
  onLoadNextPage: w,
3785
- onStartAutoLoad: P,
3830
+ onStartAutoLoad: V,
3786
3831
  onStopLoading: k,
3787
3832
  ...e
3788
- } = t, n = te(null), r = de(
3789
- (d) => {
3790
- N(d), C.includes(d) && n.current?.scrollTo({
3791
- key: `${(d - 1) * $ + 1}`
3833
+ } = t, n = te(null), r = ce(
3834
+ (u) => {
3835
+ S(u), E.includes(u) && n.current?.scrollTo({
3836
+ key: `${(u - 1) * $ + 1}`
3792
3837
  });
3793
3838
  },
3794
- [C, N, $]
3839
+ [E, S, $]
3795
3840
  );
3796
- return /* @__PURE__ */ me("div", { className: "flex flex-col", children: [
3841
+ return /* @__PURE__ */ ue("div", { className: "flex flex-col", children: [
3797
3842
  /* @__PURE__ */ L(
3798
- Ct,
3843
+ _t,
3799
3844
  {
3800
3845
  ref: n,
3801
3846
  ...e,
@@ -3806,7 +3851,7 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3806
3851
  }
3807
3852
  ),
3808
3853
  /* @__PURE__ */ L(
3809
- Er,
3854
+ _r,
3810
3855
  {
3811
3856
  loading: y,
3812
3857
  autoLoading: s,
@@ -3815,16 +3860,16 @@ const Wt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3815
3860
  pageSize: $,
3816
3861
  total: I,
3817
3862
  loadedCount: T.length,
3818
- cachedPages: C,
3863
+ cachedPages: E,
3819
3864
  onChange: r,
3820
3865
  onLoadNextPage: w,
3821
- onStartAutoLoad: P,
3866
+ onStartAutoLoad: V,
3822
3867
  onStopLoading: k
3823
3868
  }
3824
3869
  )
3825
3870
  ] });
3826
3871
  };
3827
- Cr.__docgenInfo = {
3872
+ Lr.__docgenInfo = {
3828
3873
  displayName: "VirtualTable",
3829
3874
  description: "虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",
3830
3875
  props: {
@@ -3931,7 +3976,7 @@ Cr.__docgenInfo = {
3931
3976
  }
3932
3977
  }
3933
3978
  };
3934
- const Sr = ({
3979
+ const Mr = ({
3935
3980
  texts: t = [],
3936
3981
  placeholder: y = "请输入内容",
3937
3982
  animationSpeed: s = 100,
@@ -3940,57 +3985,57 @@ const Sr = ({
3940
3985
  onChange: T,
3941
3986
  ...I
3942
3987
  }) => {
3943
- const [A, $] = ce(""), [C, N] = ce(0), [w, P] = ce(!1), [k, e] = ce(!1), [n, r] = ce(!1), d = te(void 0), c = te(void 0), M = te(t), S = te(C), F = te(k), Y = te(A);
3944
- ye(() => {
3945
- M.current = t, S.current = C, F.current = k, Y.current = A;
3988
+ const [A, $] = oe(""), [E, S] = oe(0), [w, V] = oe(!1), [k, e] = oe(!1), [n, r] = oe(!1), u = te(void 0), d = te(void 0), D = te(t), C = te(E), F = te(k), Y = te(A);
3989
+ fe(() => {
3990
+ D.current = t, C.current = E, F.current = k, Y.current = A;
3946
3991
  });
3947
- const z = de((u, p) => {
3992
+ const z = ce((p, c) => {
3948
3993
  let v = 0;
3949
3994
  r(!0);
3950
- const D = () => {
3951
- v < u.length ? ($(u.slice(0, v + 1)), v++, c.current = window.setTimeout(D, s)) : (r(!1), p?.());
3995
+ const P = () => {
3996
+ v < p.length ? ($(p.slice(0, v + 1)), v++, d.current = window.setTimeout(P, s)) : (r(!1), c?.());
3952
3997
  };
3953
- D();
3954
- }, [s]), O = de((u) => {
3955
- let p = Y.current.length;
3998
+ P();
3999
+ }, [s]), O = ce((p) => {
4000
+ let c = Y.current.length;
3956
4001
  const v = () => {
3957
- p > 0 ? ($(Y.current.slice(0, p - 1)), p--, c.current = window.setTimeout(v, s / 2)) : u?.();
4002
+ c > 0 ? ($(Y.current.slice(0, c - 1)), c--, d.current = window.setTimeout(v, s / 2)) : p?.();
3958
4003
  };
3959
4004
  v();
3960
- }, [s]), V = de(() => {
3961
- if (M.current.length === 0 || F.current) return;
3962
- P(!0);
3963
- const u = M.current[S.current];
4005
+ }, [s]), _ = ce(() => {
4006
+ if (D.current.length === 0 || F.current) return;
4007
+ V(!0);
4008
+ const p = D.current[C.current];
3964
4009
  Y.current ? O(() => {
3965
- z(u, () => {
3966
- d.current = window.setTimeout(() => {
3967
- N((p) => (p + 1) % M.current.length), P(!1);
4010
+ z(p, () => {
4011
+ u.current = window.setTimeout(() => {
4012
+ S((c) => (c + 1) % D.current.length), V(!1);
3968
4013
  }, 2e3);
3969
4014
  });
3970
- }) : z(u, () => {
3971
- d.current = window.setTimeout(() => {
3972
- N((p) => (p + 1) % M.current.length), P(!1);
4015
+ }) : z(p, () => {
4016
+ u.current = window.setTimeout(() => {
4017
+ S((c) => (c + 1) % D.current.length), V(!1);
3973
4018
  }, 2e3);
3974
4019
  });
3975
4020
  }, [O, z]);
3976
- return ye(() => (o && t.length > 0 && !k && V(), () => {
3977
- d.current && window.clearTimeout(d.current), c.current && window.clearTimeout(c.current);
3978
- }), [C, k, o, t.length, V]), ye(() => {
3979
- !w && o && t.length > 0 && !k && V();
3980
- }, [C, w, o, t.length, k, V]), /* @__PURE__ */ me("div", { style: { position: "relative" }, children: [
4021
+ return fe(() => (o && t.length > 0 && !k && _(), () => {
4022
+ u.current && window.clearTimeout(u.current), d.current && window.clearTimeout(d.current);
4023
+ }), [E, k, o, t.length, _]), fe(() => {
4024
+ !w && o && t.length > 0 && !k && _();
4025
+ }, [E, w, o, t.length, k, _]), /* @__PURE__ */ ue("div", { style: { position: "relative" }, children: [
3981
4026
  /* @__PURE__ */ L(
3982
- Ut,
4027
+ tn,
3983
4028
  {
3984
4029
  ...I,
3985
4030
  value: b,
3986
- onChange: (u) => {
3987
- T?.(u.target.value), I.onChange?.(u);
4031
+ onChange: (p) => {
4032
+ T?.(p.target.value), I.onChange?.(p);
3988
4033
  },
3989
- onFocus: (u) => {
3990
- e(!0), d.current && window.clearTimeout(d.current), c.current && window.clearTimeout(c.current), P(!1), r(!1), I.onFocus?.(u);
4034
+ onFocus: (p) => {
4035
+ e(!0), u.current && window.clearTimeout(u.current), d.current && window.clearTimeout(d.current), V(!1), r(!1), I.onFocus?.(p);
3991
4036
  },
3992
- onBlur: (u) => {
3993
- e(!1), !b && t.length > 0 && ($(""), N(0)), I.onBlur?.(u);
4037
+ onBlur: (p) => {
4038
+ e(!1), !b && t.length > 0 && ($(""), S(0)), I.onBlur?.(p);
3994
4039
  },
3995
4040
  placeholder: k || b ? y : A || y,
3996
4041
  style: {
@@ -4001,7 +4046,7 @@ const Sr = ({
4001
4046
  }
4002
4047
  }
4003
4048
  ),
4004
- !k && !b && A && /* @__PURE__ */ me(
4049
+ !k && !b && A && /* @__PURE__ */ ue(
4005
4050
  "div",
4006
4051
  {
4007
4052
  style: {
@@ -4046,7 +4091,7 @@ const Sr = ({
4046
4091
  ` })
4047
4092
  ] });
4048
4093
  };
4049
- Sr.__docgenInfo = {
4094
+ Mr.__docgenInfo = {
4050
4095
  displayName: "DynamicInput",
4051
4096
  description: "动态文案输入框组件,支持流式文字动画效果",
4052
4097
  props: {
@@ -4091,7 +4136,7 @@ Sr.__docgenInfo = {
4091
4136
  }
4092
4137
  }
4093
4138
  };
4094
- const Tr = ({
4139
+ const Ir = ({
4095
4140
  texts: t = [],
4096
4141
  // 动态文案数组,默认为空数组
4097
4142
  placeholder: y = "请输入内容",
@@ -4110,87 +4155,87 @@ const Tr = ({
4110
4155
  // 最大字符数限制
4111
4156
  showCount: $ = !0,
4112
4157
  // 是否显示字数统计
4113
- submitText: C = "发送",
4158
+ submitText: E = "发送",
4114
4159
  // 提交按钮文本
4115
- disabled: N = !1,
4160
+ disabled: S = !1,
4116
4161
  // 是否禁用组件
4117
4162
  rows: w = 4,
4118
4163
  // 文本域行数
4119
- style: P,
4164
+ style: V,
4120
4165
  // 自定义样式
4121
4166
  ...k
4122
4167
  // 其他原生属性
4123
4168
  }) => {
4124
- const [e, n] = ce(""), [r, d] = ce(0), [c, M] = ce(!1), [S, F] = ce(!1), [Y, z] = ce(!1), [O, V] = ce(b || ""), G = te(void 0), _ = te(void 0), R = te(t), J = te(r), u = te(S), p = te(e), v = te(null);
4125
- ye(() => {
4126
- R.current = t, J.current = r, u.current = S, p.current = e;
4169
+ const [e, n] = oe(""), [r, u] = oe(0), [d, D] = oe(!1), [C, F] = oe(!1), [Y, z] = oe(!1), [O, _] = oe(b || ""), G = te(void 0), M = te(void 0), R = te(t), X = te(r), p = te(C), c = te(e), v = te(null);
4170
+ fe(() => {
4171
+ R.current = t, X.current = r, p.current = C, c.current = e;
4127
4172
  });
4128
- const D = de((ae, he) => {
4129
- let xe = 0;
4173
+ const P = ce((U, ge) => {
4174
+ let $e = 0;
4130
4175
  z(!0);
4131
- const ge = () => {
4132
- xe < ae.length ? (n(ae.slice(0, xe + 1)), xe++, _.current = window.setTimeout(ge, s)) : (z(!1), he?.());
4133
- };
4134
- ge();
4135
- }, [s]), B = de((ae) => {
4136
- let he = p.current.length;
4137
4176
  const xe = () => {
4138
- he > 0 ? (n(p.current.slice(0, he - 1)), he--, _.current = window.setTimeout(xe, s / 2)) : ae?.();
4177
+ $e < U.length ? (n(U.slice(0, $e + 1)), $e++, M.current = window.setTimeout(xe, s)) : (z(!1), ge?.());
4139
4178
  };
4140
4179
  xe();
4141
- }, [s]), W = de(() => {
4142
- if (R.current.length === 0 || u.current) return;
4143
- M(!0);
4144
- const ae = R.current[J.current];
4145
- p.current ? B(() => {
4146
- D(ae, () => {
4180
+ }, [s]), B = ce((U) => {
4181
+ let ge = c.current.length;
4182
+ const $e = () => {
4183
+ ge > 0 ? (n(c.current.slice(0, ge - 1)), ge--, M.current = window.setTimeout($e, s / 2)) : U?.();
4184
+ };
4185
+ $e();
4186
+ }, [s]), j = ce(() => {
4187
+ if (R.current.length === 0 || p.current) return;
4188
+ D(!0);
4189
+ const U = R.current[X.current];
4190
+ c.current ? B(() => {
4191
+ P(U, () => {
4147
4192
  G.current = window.setTimeout(() => {
4148
- d((he) => (he + 1) % R.current.length), M(!1);
4193
+ u((ge) => (ge + 1) % R.current.length), D(!1);
4149
4194
  }, 2e3);
4150
4195
  });
4151
- }) : D(ae, () => {
4196
+ }) : P(U, () => {
4152
4197
  G.current = window.setTimeout(() => {
4153
- d((he) => (he + 1) % R.current.length), M(!1);
4198
+ u((ge) => (ge + 1) % R.current.length), D(!1);
4154
4199
  }, 2e3);
4155
4200
  });
4156
- }, [B, D]);
4157
- ye(() => (o && t.length > 0 && !S && W(), () => {
4158
- G.current && window.clearTimeout(G.current), _.current && window.clearTimeout(_.current);
4159
- }), [r, S, o, t.length, W]), ye(() => {
4160
- !c && o && t.length > 0 && !S && W();
4161
- }, [r, c, o, t.length, S, W]);
4162
- const X = (ae) => {
4163
- F(!0), G.current && window.clearTimeout(G.current), _.current && window.clearTimeout(_.current), M(!1), z(!1), k.onFocus?.(ae);
4164
- }, ne = (ae) => {
4165
- F(!1), !b && t.length > 0 && (n(""), d(0)), k.onBlur?.(ae);
4166
- }, pe = (ae) => {
4167
- const he = ae.target.value;
4168
- A && he.length > A || (T ? T(he) : V(he), k.onChange?.(ae));
4169
- }, E = () => {
4170
- const ae = T ? b : O;
4171
- ae.trim() && !N && (I?.(ae), T || V(""));
4172
- }, oe = (ae) => {
4173
- (ae.ctrlKey || ae.metaKey) && ae.key === "Enter" && (ae.preventDefault(), E()), k.onKeyDown?.(ae);
4174
- }, re = T ? b : O, we = N || !re.trim() || (A ? re.length > A : !1);
4175
- return /* @__PURE__ */ me("div", { style: { position: "relative", ...P }, children: [
4176
- /* @__PURE__ */ me("div", { style: { position: "relative" }, children: [
4201
+ }, [B, P]);
4202
+ fe(() => (o && t.length > 0 && !C && j(), () => {
4203
+ G.current && window.clearTimeout(G.current), M.current && window.clearTimeout(M.current);
4204
+ }), [r, C, o, t.length, j]), fe(() => {
4205
+ !d && o && t.length > 0 && !C && j();
4206
+ }, [r, d, o, t.length, C, j]);
4207
+ const J = (U) => {
4208
+ F(!0), G.current && window.clearTimeout(G.current), M.current && window.clearTimeout(M.current), D(!1), z(!1), k.onFocus?.(U);
4209
+ }, re = (U) => {
4210
+ F(!1), !b && t.length > 0 && (n(""), u(0)), k.onBlur?.(U);
4211
+ }, me = (U) => {
4212
+ const ge = U.target.value;
4213
+ A && ge.length > A || (T ? T(ge) : _(ge), k.onChange?.(U));
4214
+ }, de = () => {
4215
+ const U = T ? b : O;
4216
+ U.trim() && !S && (I?.(U), T || _(""));
4217
+ }, ye = (U) => {
4218
+ (U.ctrlKey || U.metaKey) && U.key === "Enter" && (U.preventDefault(), de()), k.onKeyDown?.(U);
4219
+ }, N = T ? b : O, be = S || !N.trim() || (A ? N.length > A : !1);
4220
+ return /* @__PURE__ */ ue("div", { style: { position: "relative", ...V }, children: [
4221
+ /* @__PURE__ */ ue("div", { style: { position: "relative" }, children: [
4177
4222
  /* @__PURE__ */ L(
4178
4223
  "textarea",
4179
4224
  {
4180
4225
  ref: v,
4181
4226
  value: T ? b : O,
4182
- onChange: pe,
4183
- onFocus: (ae) => {
4184
- ae.target.style.borderColor = "#1890ff", ae.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", X(ae);
4227
+ onChange: me,
4228
+ onFocus: (U) => {
4229
+ U.target.style.borderColor = "#1890ff", U.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", J(U);
4185
4230
  },
4186
- onBlur: (ae) => {
4187
- ae.target.style.borderColor = "#d9d9d9", ae.target.style.boxShadow = "none", ne(ae);
4231
+ onBlur: (U) => {
4232
+ U.target.style.borderColor = "#d9d9d9", U.target.style.boxShadow = "none", re(U);
4188
4233
  },
4189
- onKeyDown: oe,
4190
- placeholder: S || re ? y : "",
4234
+ onKeyDown: ye,
4235
+ placeholder: C || N ? y : "",
4191
4236
  maxLength: A,
4192
4237
  rows: w,
4193
- disabled: N,
4238
+ disabled: S,
4194
4239
  style: {
4195
4240
  width: "100%",
4196
4241
  minHeight: `${w * 24 + 16}px`,
@@ -4211,7 +4256,7 @@ const Tr = ({
4211
4256
  ...k
4212
4257
  }
4213
4258
  ),
4214
- !S && !re && e && /* @__PURE__ */ me(
4259
+ !C && !N && e && /* @__PURE__ */ ue(
4215
4260
  "div",
4216
4261
  {
4217
4262
  style: {
@@ -4260,13 +4305,13 @@ const Tr = ({
4260
4305
  zIndex: 3
4261
4306
  },
4262
4307
  children: /* @__PURE__ */ L(
4263
- He,
4308
+ Pe,
4264
4309
  {
4265
4310
  type: "primary",
4266
4311
  size: "small",
4267
- icon: /* @__PURE__ */ L(Hn, {}),
4268
- onClick: E,
4269
- disabled: we,
4312
+ icon: /* @__PURE__ */ L(zn, {}),
4313
+ onClick: de,
4314
+ disabled: be,
4270
4315
  style: {
4271
4316
  borderRadius: 6,
4272
4317
  minWidth: 32,
@@ -4275,13 +4320,13 @@ const Tr = ({
4275
4320
  alignItems: "center",
4276
4321
  justifyContent: "center"
4277
4322
  },
4278
- children: C
4323
+ children: E
4279
4324
  }
4280
4325
  )
4281
4326
  }
4282
4327
  )
4283
4328
  ] }),
4284
- $ && /* @__PURE__ */ me(
4329
+ $ && /* @__PURE__ */ ue(
4285
4330
  "div",
4286
4331
  {
4287
4332
  style: {
@@ -4291,7 +4336,7 @@ const Tr = ({
4291
4336
  color: "#999"
4292
4337
  },
4293
4338
  children: [
4294
- re.length,
4339
+ N.length,
4295
4340
  "/",
4296
4341
  A
4297
4342
  ]
@@ -4305,7 +4350,7 @@ const Tr = ({
4305
4350
  ` })
4306
4351
  ] });
4307
4352
  };
4308
- Tr.__docgenInfo = {
4353
+ Ir.__docgenInfo = {
4309
4354
  displayName: "DynamicTextArea",
4310
4355
  description: "动态文案文本域组件,支持流式文字动画效果",
4311
4356
  props: {
@@ -4391,7 +4436,7 @@ Tr.__docgenInfo = {
4391
4436
  }
4392
4437
  }
4393
4438
  };
4394
- const Jt = ({
4439
+ const an = ({
4395
4440
  src: t,
4396
4441
  poster: y,
4397
4442
  width: s = 300,
@@ -4403,37 +4448,37 @@ const Jt = ({
4403
4448
  showPlayButton: I = !0,
4404
4449
  autoPlayOnHover: A = !0,
4405
4450
  onClick: $,
4406
- onVideoLoaded: C,
4407
- onVideoPlay: N,
4451
+ onVideoLoaded: E,
4452
+ onVideoPlay: S,
4408
4453
  onVideoPause: w,
4409
- onVideoEnded: P,
4454
+ onVideoEnded: V,
4410
4455
  className: k,
4411
4456
  style: e,
4412
4457
  ...n
4413
4458
  }) => {
4414
- const r = te(null), [d, c] = ce(!1), [M, S] = ce(!1), [F, Y] = ce(!1), z = de(() => {
4415
- r.current && (r.current.play(), c(!0), N?.());
4416
- }, [N]), O = de(() => {
4417
- r.current && (r.current.pause(), c(!1), w?.());
4418
- }, [w]), V = de((D) => {
4419
- D.stopPropagation(), d ? O() : z();
4420
- }, [d, z, O]), G = de(() => {
4421
- S(!0), A && !d && z();
4422
- }, [A, d, z]), _ = de(() => {
4423
- S(!1), A && d && O();
4424
- }, [A, d, O]), R = de(() => {
4425
- Y(!0), C?.();
4426
- }, [C]), J = de(() => {
4427
- c(!0), N?.();
4428
- }, [N]), u = de(() => {
4429
- c(!1), w?.();
4430
- }, [w]), p = de(() => {
4431
- c(!1), P?.();
4432
- }, [P]), v = de((D) => {
4433
- $?.(D);
4459
+ const r = te(null), [u, d] = oe(!1), [D, C] = oe(!1), [F, Y] = oe(!1), z = ce(() => {
4460
+ r.current && (r.current.play(), d(!0), S?.());
4461
+ }, [S]), O = ce(() => {
4462
+ r.current && (r.current.pause(), d(!1), w?.());
4463
+ }, [w]), _ = ce((P) => {
4464
+ P.stopPropagation(), u ? O() : z();
4465
+ }, [u, z, O]), G = ce(() => {
4466
+ C(!0), A && !u && z();
4467
+ }, [A, u, z]), M = ce(() => {
4468
+ C(!1), A && u && O();
4469
+ }, [A, u, O]), R = ce(() => {
4470
+ Y(!0), E?.();
4471
+ }, [E]), X = ce(() => {
4472
+ d(!0), S?.();
4473
+ }, [S]), p = ce(() => {
4474
+ d(!1), w?.();
4475
+ }, [w]), c = ce(() => {
4476
+ d(!1), V?.();
4477
+ }, [V]), v = ce((P) => {
4478
+ $?.(P);
4434
4479
  }, [$]);
4435
4480
  return /* @__PURE__ */ L(
4436
- Et,
4481
+ At,
4437
4482
  {
4438
4483
  ...n,
4439
4484
  className: `video-card ${k || ""}`,
@@ -4449,9 +4494,9 @@ const Jt = ({
4449
4494
  },
4450
4495
  bordered: !1,
4451
4496
  onMouseEnter: G,
4452
- onMouseLeave: _,
4497
+ onMouseLeave: M,
4453
4498
  onClick: v,
4454
- children: /* @__PURE__ */ me("div", { className: "video-card-container", children: [
4499
+ children: /* @__PURE__ */ ue("div", { className: "video-card-container", children: [
4455
4500
  /* @__PURE__ */ L(
4456
4501
  "video",
4457
4502
  {
@@ -4460,9 +4505,9 @@ const Jt = ({
4460
4505
  poster: y,
4461
4506
  preload: "metadata",
4462
4507
  onLoadedData: R,
4463
- onPlay: J,
4464
- onPause: u,
4465
- onEnded: p,
4508
+ onPlay: X,
4509
+ onPause: p,
4510
+ onEnded: c,
4466
4511
  muted: !0,
4467
4512
  loop: !0
4468
4513
  }
@@ -4470,9 +4515,9 @@ const Jt = ({
4470
4515
  I && /* @__PURE__ */ L(
4471
4516
  "div",
4472
4517
  {
4473
- className: `video-play-button ${M ? "hovered" : ""}`,
4474
- onClick: V,
4475
- children: d ? /* @__PURE__ */ L(Pn, { className: "play-icon" }) : /* @__PURE__ */ L(Vn, { className: "play-icon" })
4518
+ className: `video-play-button ${D ? "hovered" : ""}`,
4519
+ onClick: _,
4520
+ children: u ? /* @__PURE__ */ L(Yn, { className: "play-icon" }) : /* @__PURE__ */ L(jn, { className: "play-icon" })
4476
4521
  }
4477
4522
  ),
4478
4523
  !F && /* @__PURE__ */ L("div", { className: "video-loading-mask", children: /* @__PURE__ */ L("div", { className: "loading-spinner" }) })
@@ -4480,7 +4525,7 @@ const Jt = ({
4480
4525
  }
4481
4526
  );
4482
4527
  };
4483
- Jt.__docgenInfo = {
4528
+ an.__docgenInfo = {
4484
4529
  displayName: "VideoCard",
4485
4530
  description: "视频卡片组件,支持鼠标悬浮播放控制",
4486
4531
  props: {
@@ -4581,7 +4626,7 @@ Jt.__docgenInfo = {
4581
4626
  }
4582
4627
  }
4583
4628
  };
4584
- const Nr = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((s) => t.toLowerCase().includes(s)), qr = (t) => t.type ? t.type : Nr(t.url) ? "video" : "image", Ar = ({
4629
+ const Dr = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((s) => t.toLowerCase().includes(s)), Br = (t) => t.type ? t.type : Dr(t.url) ? "video" : "image", Hr = ({
4585
4630
  items: t,
4586
4631
  columns: y,
4587
4632
  gap: s = 0,
@@ -4598,39 +4643,39 @@ const Nr = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
4598
4643
  style: I,
4599
4644
  onClick: A
4600
4645
  }) => {
4601
- const $ = te(null), [C, N] = ce(y || b.md || 3), w = te(/* @__PURE__ */ new Map()), P = de(() => {
4646
+ const $ = te(null), [E, S] = oe(y || b.md || 3), w = te(/* @__PURE__ */ new Map()), V = ce(() => {
4602
4647
  if (!o || y)
4603
4648
  return y || b.md || 3;
4604
4649
  const r = window.innerWidth;
4605
4650
  return r < 576 ? b.xs || 1 : r < 768 ? b.sm || 2 : r < 992 ? b.md || 3 : r < 1200 ? b.lg || 4 : r < 1600 ? b.xl || 5 : b.xxl || 6;
4606
- }, [o, y, b]), k = de(() => {
4651
+ }, [o, y, b]), k = ce(() => {
4607
4652
  if (!$.current) return;
4608
- const r = C, d = $.current, M = (d.offsetWidth - s * (r - 1)) / r, S = new Array(r).fill(0);
4653
+ const r = E, u = $.current, D = (u.offsetWidth - s * (r - 1)) / r, C = new Array(r).fill(0);
4609
4654
  t.forEach((Y, z) => {
4610
- const O = Y.id || z, V = w.current.get(O);
4611
- if (!V) return;
4612
- const G = Math.min(...S), _ = S.indexOf(G), R = _ * (M + s), J = S[_];
4613
- V.style.position = "absolute", V.style.left = `${R}px`, V.style.top = `${J}px`, V.style.width = `${M}px`, S[_] += V.offsetHeight + s;
4655
+ const O = Y.id || z, _ = w.current.get(O);
4656
+ if (!_) return;
4657
+ const G = Math.min(...C), M = C.indexOf(G), R = M * (D + s), X = C[M];
4658
+ _.style.position = "absolute", _.style.left = `${R}px`, _.style.top = `${X}px`, _.style.width = `${D}px`, C[M] += _.offsetHeight + s;
4614
4659
  });
4615
- const F = Math.max(...S);
4616
- d.style.height = `${F}px`;
4617
- }, [t, C, s]);
4618
- ye(() => {
4660
+ const F = Math.max(...C);
4661
+ u.style.height = `${F}px`;
4662
+ }, [t, E, s]);
4663
+ fe(() => {
4619
4664
  const r = () => {
4620
- const d = P();
4621
- d !== C && N(d);
4665
+ const u = V();
4666
+ u !== E && S(u);
4622
4667
  };
4623
4668
  if (o)
4624
4669
  return window.addEventListener("resize", r), r(), () => window.removeEventListener("resize", r);
4625
- }, [o, P, C]), ye(() => {
4670
+ }, [o, V, E]), fe(() => {
4626
4671
  const r = setTimeout(() => {
4627
4672
  k();
4628
4673
  }, 100);
4629
4674
  return () => clearTimeout(r);
4630
- }, [t, C, k]);
4631
- const e = de(() => {
4675
+ }, [t, E, k]);
4676
+ const e = ce(() => {
4632
4677
  k();
4633
- }, [k]), n = de((r) => {
4678
+ }, [k]), n = ce((r) => {
4634
4679
  A && A(r), r.onClick?.(r);
4635
4680
  }, [A]);
4636
4681
  return /* @__PURE__ */ L(
@@ -4643,22 +4688,22 @@ const Nr = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
4643
4688
  width: "100%",
4644
4689
  ...I
4645
4690
  },
4646
- children: t.map((r, d) => {
4647
- const c = r.id || d, M = qr(r);
4691
+ children: t.map((r, u) => {
4692
+ const d = r.id || u, D = Br(r);
4648
4693
  return /* @__PURE__ */ L(
4649
4694
  "div",
4650
4695
  {
4651
- ref: (S) => {
4652
- S ? w.current.set(c, S) : w.current.delete(c);
4696
+ ref: (C) => {
4697
+ C ? w.current.set(d, C) : w.current.delete(d);
4653
4698
  },
4654
4699
  className: "waterfall-item",
4655
- children: M === "video" ? /* @__PURE__ */ L("div", { style: {
4700
+ children: D === "video" ? /* @__PURE__ */ L("div", { style: {
4656
4701
  width: "100%",
4657
4702
  position: "relative",
4658
4703
  paddingBottom: "56.25%",
4659
4704
  cursor: A || r.onClick ? "pointer" : "default"
4660
4705
  }, children: /* @__PURE__ */ L("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ L(
4661
- Jt,
4706
+ an,
4662
4707
  {
4663
4708
  src: r.url,
4664
4709
  poster: r.poster,
@@ -4679,7 +4724,7 @@ const Nr = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
4679
4724
  "img",
4680
4725
  {
4681
4726
  src: r.url,
4682
- alt: `瀑布流图片 ${d + 1}`,
4727
+ alt: `瀑布流图片 ${u + 1}`,
4683
4728
  className: "waterfall-image",
4684
4729
  onLoad: e,
4685
4730
  onError: e,
@@ -4689,13 +4734,13 @@ const Nr = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
4689
4734
  }
4690
4735
  )
4691
4736
  },
4692
- c
4737
+ d
4693
4738
  );
4694
4739
  })
4695
4740
  }
4696
4741
  );
4697
4742
  };
4698
- Ar.__docgenInfo = {
4743
+ Hr.__docgenInfo = {
4699
4744
  displayName: "Waterfall",
4700
4745
  description: "瀑布流布局组件,支持图片和视频混合展示",
4701
4746
  props: {
@@ -4751,8 +4796,8 @@ Ar.__docgenInfo = {
4751
4796
  }
4752
4797
  }
4753
4798
  };
4754
- const Hr = {
4755
- algorithm: _n.defaultAlgorithm,
4799
+ const Fr = {
4800
+ algorithm: Pn.defaultAlgorithm,
4756
4801
  token: {
4757
4802
  // 主色
4758
4803
  colorPrimary: "#3b82f6",
@@ -4818,21 +4863,21 @@ const Hr = {
4818
4863
  }
4819
4864
  };
4820
4865
  export {
4821
- Xn as AdvancedTable,
4822
- Gn as AppModal,
4823
- Wn as BackButton,
4824
- Rn as Button,
4825
- On as Card,
4826
- Sr as DynamicInput,
4827
- Tr as DynamicTextArea,
4828
- jn as EmptyAndSpin,
4829
- Un as LinkButton,
4830
- Fn as PageTable,
4831
- wr as RichTextEditor,
4832
- Jt as VideoCard,
4833
- Cr as VirtualTable,
4834
- Ar as Waterfall,
4835
- Yn as XcIcon,
4836
- Hr as lightTheme
4866
+ rr as AdvancedTable,
4867
+ Kn as AppModal,
4868
+ er as BackButton,
4869
+ Wn as Button,
4870
+ Un as Card,
4871
+ Mr as DynamicInput,
4872
+ Ir as DynamicTextArea,
4873
+ Zn as EmptyAndSpin,
4874
+ tr as LinkButton,
4875
+ Xn as PageTable,
4876
+ Nr as RichTextEditor,
4877
+ an as VideoCard,
4878
+ Lr as VirtualTable,
4879
+ Hr as Waterfall,
4880
+ Qn as XcIcon,
4881
+ Fr as lightTheme
4837
4882
  };
4838
4883
  //# sourceMappingURL=index.es.js.map