bi-components-library 1.0.27 → 1.0.28

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,19 +1,19 @@
1
- import { jsx as m, jsxs as W, Fragment as Ue } from "react/jsx-runtime";
2
- import { useState as X, useRef as j, useMemo as Oe, useCallback as U, useEffect as ae, useLayoutEffect as Re } from "react";
3
- import { Button as ge, Card as Be, Modal as Xe, Table as _e, Flex as He, Spin as Je, Empty as Qe, Select as Ge, Form as Ce, Input as Fe, Space as Ye, Dropdown as Ze, Tooltip as et, Progress as tt, Pagination as nt, theme as at } from "antd";
4
- import { createFromIconfontCN as rt, LeftOutlined as ot, SearchOutlined as lt, ReloadOutlined as st, InfoCircleOutlined as it, SendOutlined as ct, PauseCircleOutlined as ut, PlayCircleOutlined as dt } from "@ant-design/icons";
5
- import { createPortal as pt } from "react-dom";
6
- const ft = ({
1
+ import { jsx as E, jsxs as Z, Fragment as Ze } from "react/jsx-runtime";
2
+ import { useState as ne, useRef as Q, useMemo as Ye, useCallback as ae, useEffect as de, useLayoutEffect as ze } from "react";
3
+ import { Button as $e, Card as Oe, Modal as et, Table as Re, Flex as We, Spin as tt, Empty as nt, Select as Ge, Form as Ie, Input as Ke, Space as at, DatePicker as rt, Dropdown as ot, Tooltip as st, Progress as lt, Pagination as it, theme as ct } from "antd";
4
+ import { createFromIconfontCN as ut, LeftOutlined as dt, SearchOutlined as pt, ReloadOutlined as ft, InfoCircleOutlined as yt, SendOutlined as mt, PauseCircleOutlined as ht, PlayCircleOutlined as gt } from "@ant-design/icons";
5
+ import { createPortal as Xe } from "react-dom";
6
+ const vt = ({
7
7
  variant: t = "primary",
8
- loading: y = !1,
9
- children: u,
10
- ...i
11
- }) => /* @__PURE__ */ m(
12
- ge,
8
+ loading: b = !1,
9
+ children: p,
10
+ ...l
11
+ }) => /* @__PURE__ */ E(
12
+ $e,
13
13
  {
14
- ...i,
15
- type: ((k) => {
16
- switch (k) {
14
+ ...l,
15
+ type: ((T) => {
16
+ switch (T) {
17
17
  case "primary":
18
18
  return "primary";
19
19
  case "ghost":
@@ -28,12 +28,12 @@ const ft = ({
28
28
  return "primary";
29
29
  }
30
30
  })(t),
31
- loading: y,
31
+ loading: b,
32
32
  ghost: t === "ghost",
33
- children: u
33
+ children: p
34
34
  }
35
35
  );
36
- ft.__docgenInfo = {
36
+ vt.__docgenInfo = {
37
37
  displayName: "Button",
38
38
  description: "基础按钮,用于触发操作",
39
39
  props: {
@@ -77,25 +77,25 @@ ft.__docgenInfo = {
77
77
  }
78
78
  }
79
79
  };
80
- const yt = ({
80
+ const bt = ({
81
81
  title: t,
82
- children: y,
83
- bordered: u = !0,
84
- hoverable: i = !1,
85
- size: c = "default",
86
- ...k
87
- }) => /* @__PURE__ */ m(
88
- Be,
82
+ children: b,
83
+ bordered: p = !0,
84
+ hoverable: l = !1,
85
+ size: f = "default",
86
+ ...T
87
+ }) => /* @__PURE__ */ E(
88
+ Oe,
89
89
  {
90
- ...k,
90
+ ...T,
91
91
  title: t,
92
- bordered: u,
93
- hoverable: i,
94
- size: c,
95
- children: y
92
+ bordered: p,
93
+ hoverable: l,
94
+ size: f,
95
+ children: b
96
96
  }
97
97
  );
98
- yt.__docgenInfo = {
98
+ bt.__docgenInfo = {
99
99
  displayName: "Card",
100
100
  description: "卡片容器,用于分组内容",
101
101
  props: {
@@ -146,23 +146,23 @@ yt.__docgenInfo = {
146
146
  }
147
147
  }
148
148
  };
149
- const mt = ({
149
+ const xt = ({
150
150
  showDefaultFooter: t = !0,
151
- ...y
151
+ ...b
152
152
  }) => {
153
- const u = y.footer !== void 0 ? y.footer : t ? (i, { OkBtn: c, CancelBtn: k }) => /* @__PURE__ */ W(Ue, { children: [
154
- /* @__PURE__ */ m(c, {}),
155
- /* @__PURE__ */ m(k, {})
153
+ const p = b.footer !== void 0 ? b.footer : t ? (l, { OkBtn: f, CancelBtn: T }) => /* @__PURE__ */ Z(Ze, { children: [
154
+ /* @__PURE__ */ E(f, {}),
155
+ /* @__PURE__ */ E(T, {})
156
156
  ] }) : null;
157
- return /* @__PURE__ */ m(
158
- Xe,
157
+ return /* @__PURE__ */ E(
158
+ et,
159
159
  {
160
- ...y,
161
- footer: u
160
+ ...b,
161
+ footer: p
162
162
  }
163
163
  );
164
164
  };
165
- mt.__docgenInfo = {
165
+ xt.__docgenInfo = {
166
166
  displayName: "AppModal",
167
167
  description: "应用级模态框组件,基于 Ant Design Modal 封装",
168
168
  props: {
@@ -223,29 +223,29 @@ mt.__docgenInfo = {
223
223
  }
224
224
  }
225
225
  };
226
- const gt = ({
226
+ const kt = ({
227
227
  scrollX: t,
228
- showPagination: y = !0,
229
- defaultPageSize: u = 10,
230
- ...i
231
- }) => /* @__PURE__ */ m(
232
- _e,
228
+ showPagination: b = !0,
229
+ defaultPageSize: p = 10,
230
+ ...l
231
+ }) => /* @__PURE__ */ E(
232
+ Re,
233
233
  {
234
- ...i,
234
+ ...l,
235
235
  scroll: {
236
236
  x: t || "max-content",
237
237
  y: "50vh"
238
238
  },
239
- pagination: y ? {
239
+ pagination: b ? {
240
240
  hideOnSinglePage: !0,
241
241
  showSizeChanger: !0,
242
242
  showQuickJumper: !0,
243
- defaultPageSize: u,
244
- ...i.pagination
243
+ defaultPageSize: p,
244
+ ...l.pagination
245
245
  } : !1
246
246
  }
247
247
  );
248
- gt.__docgenInfo = {
248
+ kt.__docgenInfo = {
249
249
  displayName: "PageTable",
250
250
  description: "页面级表格组件,高度铺满容器,自动滚动",
251
251
  props: {
@@ -295,30 +295,30 @@ gt.__docgenInfo = {
295
295
  }
296
296
  }
297
297
  };
298
- const ht = rt({
298
+ const wt = ut({
299
299
  scriptUrl: ["https://at.alicdn.com/t/c/font_4968458_eh91gfr4j9e.js"]
300
- }), vt = ({
300
+ }), Et = ({
301
301
  name: t,
302
- size: y,
303
- color: u,
304
- style: i,
305
- ...c
302
+ size: b,
303
+ color: p,
304
+ style: l,
305
+ ...f
306
306
  }) => {
307
- const k = {
308
- fontSize: y,
309
- color: u,
310
- ...i
307
+ const T = {
308
+ fontSize: b,
309
+ color: p,
310
+ ...l
311
311
  };
312
- return /* @__PURE__ */ m(
313
- ht,
312
+ return /* @__PURE__ */ E(
313
+ wt,
314
314
  {
315
- ...c,
315
+ ...f,
316
316
  type: t,
317
- style: k
317
+ style: T
318
318
  }
319
319
  );
320
320
  };
321
- vt.__docgenInfo = {
321
+ Et.__docgenInfo = {
322
322
  displayName: "XcIcon",
323
323
  description: "自定义图标组件,基于 iconfont",
324
324
  props: {
@@ -354,43 +354,43 @@ vt.__docgenInfo = {
354
354
  }
355
355
  }
356
356
  };
357
- const xt = ({
357
+ const $t = ({
358
358
  loading: t,
359
- description: y = "暂无数据",
360
- className: u,
361
- emptyChildren: i,
362
- loadingText: c,
363
- emptyImage: k
364
- }) => t ? /* @__PURE__ */ W(
365
- He,
359
+ description: b = "暂无数据",
360
+ className: p,
361
+ emptyChildren: l,
362
+ loadingText: f,
363
+ emptyImage: T
364
+ }) => t ? /* @__PURE__ */ Z(
365
+ We,
366
366
  {
367
- className: `pt-10 w-full ${u || ""}`,
367
+ className: `pt-10 w-full ${p || ""}`,
368
368
  align: "center",
369
369
  justify: "center",
370
370
  vertical: !0,
371
371
  children: [
372
- /* @__PURE__ */ m(Je, { size: "large" }),
373
- c && /* @__PURE__ */ m("div", { className: "mt-4 text-gray-500", children: c })
372
+ /* @__PURE__ */ E(tt, { size: "large" }),
373
+ f && /* @__PURE__ */ E("div", { className: "mt-4 text-gray-500", children: f })
374
374
  ]
375
375
  }
376
- ) : /* @__PURE__ */ m(
377
- He,
376
+ ) : /* @__PURE__ */ E(
377
+ We,
378
378
  {
379
- className: `pt-10 w-full ${u || ""}`,
379
+ className: `pt-10 w-full ${p || ""}`,
380
380
  align: "center",
381
381
  justify: "center",
382
- children: /* @__PURE__ */ m(
383
- Qe,
382
+ children: /* @__PURE__ */ E(
383
+ nt,
384
384
  {
385
- image: k,
386
- description: y,
385
+ image: T,
386
+ description: b,
387
387
  imageStyle: { height: 180 },
388
- children: i
388
+ children: l
389
389
  }
390
390
  )
391
391
  }
392
392
  );
393
- xt.__docgenInfo = {
393
+ $t.__docgenInfo = {
394
394
  displayName: "EmptyAndSpin",
395
395
  description: "空状态和加载状态组合组件",
396
396
  props: {
@@ -433,24 +433,24 @@ xt.__docgenInfo = {
433
433
  }
434
434
  }
435
435
  };
436
- const bt = ({
436
+ const Ct = ({
437
437
  onClick: t,
438
- showText: y = !1,
439
- className: u,
440
- size: i = "small",
441
- type: c = "default"
442
- }) => /* @__PURE__ */ m(
443
- ge,
438
+ showText: b = !1,
439
+ className: p,
440
+ size: l = "small",
441
+ type: f = "default"
442
+ }) => /* @__PURE__ */ E(
443
+ $e,
444
444
  {
445
- size: i,
446
- type: c,
447
- icon: /* @__PURE__ */ m(ot, {}),
448
- className: `cursor-pointer ${u || ""}`,
445
+ size: l,
446
+ type: f,
447
+ icon: /* @__PURE__ */ E(dt, {}),
448
+ className: `cursor-pointer ${p || ""}`,
449
449
  onClick: t,
450
- children: y && "返回"
450
+ children: b && "返回"
451
451
  }
452
452
  );
453
- bt.__docgenInfo = {
453
+ Ct.__docgenInfo = {
454
454
  displayName: "BackButton",
455
455
  description: "返回按钮组件",
456
456
  props: {
@@ -489,23 +489,23 @@ bt.__docgenInfo = {
489
489
  }
490
490
  }
491
491
  };
492
- const kt = ({
492
+ const Tt = ({
493
493
  removePadding: t = !0,
494
- className: y,
495
- ...u
494
+ className: b,
495
+ ...p
496
496
  }) => {
497
- const i = t ? `px-0 h-auto ${y || ""}` : y;
498
- return /* @__PURE__ */ m(
499
- ge,
497
+ const l = t ? `px-0 h-auto ${b || ""}` : b;
498
+ return /* @__PURE__ */ E(
499
+ $e,
500
500
  {
501
501
  type: "link",
502
- ...u,
503
- className: i,
504
- children: u.children
502
+ ...p,
503
+ className: l,
504
+ children: p.children
505
505
  }
506
506
  );
507
507
  };
508
- kt.__docgenInfo = {
508
+ Tt.__docgenInfo = {
509
509
  displayName: "LinkButton",
510
510
  description: "链接样式按钮组件,适用于表格操作列",
511
511
  props: {
@@ -542,129 +542,129 @@ kt.__docgenInfo = {
542
542
  }
543
543
  }
544
544
  };
545
- const { Option: wt } = Ge, Et = ({
545
+ const { Option: qt } = Ge, St = ({
546
546
  columns: t,
547
- request: y,
548
- searchFields: u = [],
549
- showSearch: i = !0,
550
- showRefresh: c = !0,
551
- defaultPageSize: k = 10,
552
- pageSizeOptions: L = ["10", "20", "50", "100"],
553
- autoLoad: E = !0,
554
- externalParams: C = {},
547
+ request: b,
548
+ searchFields: p = [],
549
+ showSearch: l = !0,
550
+ showRefresh: f = !0,
551
+ defaultPageSize: T = 10,
552
+ pageSizeOptions: M = ["10", "20", "50", "100"],
553
+ autoLoad: $ = !0,
554
+ externalParams: w = {},
555
555
  ...e
556
556
  }) => {
557
- const [A, g] = X([]), [l, a] = X(!1), [n, o] = X({
557
+ const [q, y] = ne([]), [s, r] = ne(!1), [n, o] = ne({
558
558
  current: 1,
559
- pageSize: k,
559
+ pageSize: T,
560
560
  total: 0
561
- }), [r, s] = X({}), [d, h] = X({}), [x] = Ce.useForm(), G = j(n);
562
- G.current = n;
563
- const T = j(C);
564
- T.current = C;
565
- const _ = j(!1), H = Oe(() => t.map((N) => {
566
- const { sortable: M, render: ne, ...re } = N;
561
+ }), [a, u] = ne({}), [d, x] = ne({}), [v] = Ie.useForm(), _ = Q(n);
562
+ _.current = n;
563
+ const k = Q(w);
564
+ k.current = w;
565
+ const P = Q(!1), H = Ye(() => t.map((i) => {
566
+ const { sortable: c, render: g, ...L } = i;
567
567
  return {
568
- ...re,
569
- sorter: M ? !0 : void 0,
570
- render: ne || ((ce) => ce)
568
+ ...L,
569
+ sorter: c ? !0 : void 0,
570
+ render: g || ((S) => S)
571
571
  };
572
- }), [t]), D = U(async (N = {}) => {
573
- if (y) {
574
- a(!0);
572
+ }), [t]), F = ae(async (i = {}) => {
573
+ if (b) {
574
+ r(!0);
575
575
  try {
576
- const M = {
577
- page: G.current.current,
578
- pageSize: G.current.pageSize,
576
+ const c = {
577
+ page: _.current.current,
578
+ pageSize: _.current.pageSize,
579
579
  sortField: d.field,
580
580
  sortOrder: d.order,
581
- searchParams: { ...r, ...T.current },
582
- ...N
583
- }, ne = await y(M);
584
- ne.success && (g(ne.data), o((re) => ({
585
- ...re,
586
- total: ne.total,
587
- current: M.page || re.current
581
+ searchParams: { ...a, ...k.current },
582
+ ...i
583
+ }, g = await b(c);
584
+ g.success && (y(g.data), o((L) => ({
585
+ ...L,
586
+ total: g.total,
587
+ current: c.page || L.current
588
588
  })));
589
- } catch (M) {
590
- console.error("加载数据失败:", M);
589
+ } catch (c) {
590
+ console.error("加载数据失败:", c);
591
591
  } finally {
592
- a(!1);
592
+ r(!1);
593
593
  }
594
594
  }
595
- }, [y, d, r]), K = U((N) => {
596
- s(N), o((M) => ({ ...M, current: 1 }));
597
- }, []), Q = U(() => {
598
- x.resetFields(), s({}), o((N) => ({ ...N, current: 1 }));
599
- }, [x]), Y = U(() => {
600
- D();
601
- }, [D]), te = U((N, M, ne) => {
602
- const re = {
603
- current: N.current || 1,
604
- pageSize: N.pageSize || k,
605
- total: N.total || 0
606
- }, ce = {
607
- field: ne?.field,
608
- order: ne?.order
595
+ }, [b, d, a]), U = ae((i) => {
596
+ u(i), o((c) => ({ ...c, current: 1 }));
597
+ }, []), R = ae(() => {
598
+ v.resetFields(), u({}), o((i) => ({ ...i, current: 1 }));
599
+ }, [v]), ee = ae(() => {
600
+ F();
601
+ }, [F]), re = ae((i, c, g) => {
602
+ const L = {
603
+ current: i.current || 1,
604
+ pageSize: i.pageSize || T,
605
+ total: i.total || 0
606
+ }, S = {
607
+ field: g?.field,
608
+ order: g?.order
609
609
  };
610
- o(re), h(ce);
611
- }, [k]);
612
- return ae(() => {
613
- const N = Object.keys(C).length > 0;
614
- (E && !_.current || N) && (D(), _.current = !0);
615
- }, [E, C, D]), /* @__PURE__ */ W("div", { children: [
616
- i && u.length > 0 && /* @__PURE__ */ m(Be, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ W(
617
- Ce,
610
+ o(L), x(S);
611
+ }, [T]);
612
+ return de(() => {
613
+ const i = Object.keys(w).length > 0;
614
+ ($ && !P.current || i) && (F(), P.current = !0);
615
+ }, [$, w, F]), /* @__PURE__ */ Z("div", { children: [
616
+ l && p.length > 0 && /* @__PURE__ */ E(Oe, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ Z(
617
+ Ie,
618
618
  {
619
- form: x,
619
+ form: v,
620
620
  layout: "inline",
621
- onFinish: K,
622
- initialValues: u.reduce((N, M) => (M.defaultValue !== void 0 && (N[M.key] = M.defaultValue), N), {}),
621
+ onFinish: U,
622
+ initialValues: p.reduce((i, c) => (c.defaultValue !== void 0 && (i[c.key] = c.defaultValue), i), {}),
623
623
  children: [
624
- u.map((N) => /* @__PURE__ */ m(Ce.Item, { name: N.key, label: N.label, children: N.type === "input" ? /* @__PURE__ */ m(
625
- Fe,
624
+ p.map((i) => /* @__PURE__ */ E(Ie.Item, { name: i.key, label: i.label, children: i.type === "input" ? /* @__PURE__ */ E(
625
+ Ke,
626
626
  {
627
- placeholder: N.placeholder || `请输入${N.label}`,
627
+ placeholder: i.placeholder || `请输入${i.label}`,
628
628
  style: { width: 200 }
629
629
  }
630
- ) : /* @__PURE__ */ m(
630
+ ) : /* @__PURE__ */ E(
631
631
  Ge,
632
632
  {
633
- placeholder: N.placeholder || `请选择${N.label}`,
633
+ placeholder: i.placeholder || `请选择${i.label}`,
634
634
  style: { width: 200 },
635
635
  allowClear: !0,
636
- children: N.options?.map((M) => /* @__PURE__ */ m(wt, { value: M.value, children: M.label }, M.value))
636
+ children: i.options?.map((c) => /* @__PURE__ */ E(qt, { value: c.value, children: c.label }, c.value))
637
637
  }
638
- ) }, N.key)),
639
- /* @__PURE__ */ m(Ce.Item, { children: /* @__PURE__ */ W(Ye, { children: [
640
- /* @__PURE__ */ m(ge, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ m(lt, {}), children: "查询" }),
641
- /* @__PURE__ */ m(ge, { onClick: Q, children: "重置" }),
642
- c && /* @__PURE__ */ m(ge, { icon: /* @__PURE__ */ m(st, {}), onClick: Y, children: "刷新" })
638
+ ) }, i.key)),
639
+ /* @__PURE__ */ E(Ie.Item, { children: /* @__PURE__ */ Z(at, { children: [
640
+ /* @__PURE__ */ E($e, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ E(pt, {}), children: "查询" }),
641
+ /* @__PURE__ */ E($e, { onClick: R, children: "重置" }),
642
+ f && /* @__PURE__ */ E($e, { icon: /* @__PURE__ */ E(ft, {}), onClick: ee, children: "刷新" })
643
643
  ] }) })
644
644
  ]
645
645
  }
646
646
  ) }),
647
- /* @__PURE__ */ m(
648
- _e,
647
+ /* @__PURE__ */ E(
648
+ Re,
649
649
  {
650
650
  ...e,
651
651
  columns: H,
652
- dataSource: A,
653
- loading: l,
652
+ dataSource: q,
653
+ loading: s,
654
654
  pagination: {
655
655
  ...n,
656
656
  showSizeChanger: !0,
657
657
  showQuickJumper: !0,
658
- showTotal: (N, M) => `第 ${M[0]}-${M[1]} 条/共 ${N} 条`,
659
- pageSizeOptions: L
658
+ showTotal: (i, c) => `第 ${c[0]}-${c[1]} 条/共 ${i} 条`,
659
+ pageSizeOptions: M
660
660
  },
661
- onChange: te,
661
+ onChange: re,
662
662
  scroll: { x: "max-content", y: "50vh" }
663
663
  }
664
664
  )
665
665
  ] });
666
666
  };
667
- Et.__docgenInfo = {
667
+ St.__docgenInfo = {
668
668
  displayName: "AdvancedTable",
669
669
  description: "高阶表格组件,支持异步请求、搜索、排序等功能",
670
670
  props: {
@@ -731,88 +731,88 @@ Et.__docgenInfo = {
731
731
  }
732
732
  }
733
733
  };
734
- function Te(t, y, u) {
734
+ function Be(t, b, p) {
735
735
  if (!t.current) return;
736
- const i = /* @__PURE__ */ new Set(), c = {};
737
- for (const g of y)
738
- g.exclusionGroup && g.exclusionGroup !== "separator" && (i.add(g.exclusionGroup), c[g.exclusionGroup] || (c[g.exclusionGroup] = []), c[g.exclusionGroup].push({
739
- type: g.type,
740
- key: g.key,
741
- exclusionGroup: g.exclusionGroup
736
+ const l = /* @__PURE__ */ new Set(), f = {};
737
+ for (const y of b)
738
+ y.exclusionGroup && y.exclusionGroup !== "separator" && (l.add(y.exclusionGroup), f[y.exclusionGroup] || (f[y.exclusionGroup] = []), f[y.exclusionGroup].push({
739
+ type: y.type,
740
+ key: y.key,
741
+ exclusionGroup: y.exclusionGroup
742
742
  }));
743
- const k = {};
744
- for (const g of i) {
745
- k[g] = !1;
746
- for (const l of c[g])
747
- if (l.type === "upload" && l.key) {
748
- if (u[l.key] !== null && u[l.key] !== void 0) {
749
- k[g] = !0;
743
+ const T = {};
744
+ for (const y of l) {
745
+ T[y] = !1;
746
+ for (const s of f[y])
747
+ if (s.type === "upload" && s.key) {
748
+ if (p[s.key] !== null && p[s.key] !== void 0) {
749
+ T[y] = !0;
750
750
  break;
751
751
  }
752
- } else if (l.type === "variable" && l.key) {
753
- const a = t.current.querySelector(
754
- `[data-type="variable"][data-key="${l.key}"]`
752
+ } else if (s.type === "variable" && s.key) {
753
+ const r = t.current.querySelector(
754
+ `[data-type="variable"][data-key="${s.key}"]`
755
755
  );
756
- if (a && a.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
757
- k[g] = !0;
756
+ if (r && r.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
757
+ T[y] = !0;
758
758
  break;
759
759
  }
760
760
  }
761
761
  }
762
- const L = y.some((g) => g.exclusionGroup === "separator"), C = Object.keys(k).filter(
763
- (g) => k[g]
762
+ const M = b.some((y) => y.exclusionGroup === "separator"), w = Object.keys(T).filter(
763
+ (y) => T[y]
764
764
  ).length > 0;
765
765
  let e = null;
766
- if (C && L) {
767
- for (const g of y)
768
- if (g.exclusionGroup && g.exclusionGroup !== "separator" && k[g.exclusionGroup]) {
769
- e = g.exclusionGroup;
766
+ if (w && M) {
767
+ for (const y of b)
768
+ if (y.exclusionGroup && y.exclusionGroup !== "separator" && T[y.exclusionGroup]) {
769
+ e = y.exclusionGroup;
770
770
  break;
771
771
  }
772
772
  }
773
- for (const g of i) {
774
- const l = t.current.querySelectorAll(
775
- `[data-group="${g}"]`
773
+ for (const y of l) {
774
+ const s = t.current.querySelectorAll(
775
+ `[data-group="${y}"]`
776
776
  );
777
- L && C && e ? g === e ? l.forEach((a) => {
778
- a.classList.contains("required-upload-group") ? a.style.setProperty("display", "inline-flex", "important") : (a.classList.contains("exclusion-wrapper"), a.style.setProperty("display", "inline-block", "important"));
779
- }) : l.forEach((a) => {
780
- a.style.display = "none", a.style.setProperty("display", "none", "important");
781
- }) : l.forEach((a) => {
782
- a.classList.contains("required-upload-group") ? a.style.setProperty("display", "inline-flex", "important") : (a.classList.contains("exclusion-wrapper"), a.style.setProperty("display", "inline-block", "important"));
777
+ M && w && e ? y === e ? s.forEach((r) => {
778
+ r.classList.contains("required-upload-group") ? r.style.setProperty("display", "inline-flex", "important") : (r.classList.contains("exclusion-wrapper"), r.style.setProperty("display", "inline-block", "important"));
779
+ }) : s.forEach((r) => {
780
+ r.style.display = "none", r.style.setProperty("display", "none", "important");
781
+ }) : s.forEach((r) => {
782
+ r.classList.contains("required-upload-group") ? r.style.setProperty("display", "inline-flex", "important") : (r.classList.contains("exclusion-wrapper"), r.style.setProperty("display", "inline-block", "important"));
783
783
  });
784
784
  }
785
785
  t.current.querySelectorAll(
786
786
  '[data-group="separator"]'
787
- ).forEach((g) => {
788
- g.style.display = C ? "none" : "inline";
787
+ ).forEach((y) => {
788
+ y.style.display = w ? "none" : "inline";
789
789
  });
790
790
  }
791
- function $e(t, y, u, i) {
791
+ function Pe(t, b, p, l) {
792
792
  if (!t.current) {
793
- i(!1);
793
+ l(!1);
794
794
  return;
795
795
  }
796
- const c = [];
797
- for (let l = 0; l < y.length; l++) {
798
- const a = y[l];
799
- if ((a.type === "variable" || a.type === "upload" || a.type === "multi-variable" || a.type === "select" || a.type === "textarea" || a.type === "richtext" || a.type === "datepicker") && a.required && a.key) {
800
- c.push({
801
- exclusionGroup: a.exclusionGroup || "",
802
- key: a.key,
803
- type: a.type === "multi-variable" ? "variable" : a.type,
804
- isMultiVariable: a.type === "multi-variable",
805
- minCount: a.type === "multi-variable" ? a.minCount : void 0
796
+ const f = [];
797
+ for (let s = 0; s < b.length; s++) {
798
+ const r = b[s];
799
+ if ((r.type === "variable" || r.type === "upload" || r.type === "multi-variable" || r.type === "select" || r.type === "textarea" || r.type === "richtext" || r.type === "datepicker") && r.required && r.key) {
800
+ f.push({
801
+ exclusionGroup: r.exclusionGroup || "",
802
+ key: r.key,
803
+ type: r.type === "multi-variable" ? "variable" : r.type,
804
+ isMultiVariable: r.type === "multi-variable",
805
+ minCount: r.type === "multi-variable" ? r.minCount : void 0
806
806
  });
807
807
  continue;
808
808
  }
809
- if (a.type === "text" && a.className?.includes("rte-text-required"))
810
- if (a.exclusionGroup)
811
- for (let n = l + 1; n < y.length; n++) {
812
- const o = y[n];
813
- if (o.exclusionGroup === a.exclusionGroup && (o.type === "variable" || o.type === "upload" || o.type === "select" || o.type === "textarea" || o.type === "richtext" || o.type === "datepicker") && o.key) {
814
- c.push({
815
- exclusionGroup: a.exclusionGroup,
809
+ if (r.type === "text" && r.className?.includes("rte-text-required"))
810
+ if (r.exclusionGroup)
811
+ for (let n = s + 1; n < b.length; n++) {
812
+ const o = b[n];
813
+ if (o.exclusionGroup === r.exclusionGroup && (o.type === "variable" || o.type === "upload" || o.type === "select" || o.type === "textarea" || o.type === "richtext" || o.type === "datepicker") && o.key) {
814
+ f.push({
815
+ exclusionGroup: r.exclusionGroup,
816
816
  key: o.key,
817
817
  type: o.type
818
818
  });
@@ -820,10 +820,10 @@ function $e(t, y, u, i) {
820
820
  }
821
821
  }
822
822
  else
823
- for (let n = l + 1; n < y.length; n++) {
824
- const o = y[n];
823
+ for (let n = s + 1; n < b.length; n++) {
824
+ const o = b[n];
825
825
  if ((o.type === "variable" || o.type === "upload" || o.type === "select" || o.type === "textarea" || o.type === "richtext" || o.type === "datepicker") && o.key) {
826
- c.push({
826
+ f.push({
827
827
  exclusionGroup: o.exclusionGroup || "",
828
828
  key: o.key,
829
829
  type: o.type
@@ -832,1478 +832,1854 @@ function $e(t, y, u, i) {
832
832
  }
833
833
  }
834
834
  }
835
- const k = y.some((l) => l.exclusionGroup === "separator"), L = [];
836
- if (k && c.length > 1) {
837
- const l = [];
838
- y.forEach((a, n) => {
839
- a.exclusionGroup === "separator" && l.push(n);
835
+ const T = b.some((s) => s.exclusionGroup === "separator"), M = [];
836
+ if (T && f.length > 1) {
837
+ const s = [];
838
+ b.forEach((r, n) => {
839
+ r.exclusionGroup === "separator" && s.push(n);
840
840
  });
841
- for (const a of l) {
842
- let n = null;
843
- for (let r = a - 1; r >= 0; r--) {
844
- const s = y[r];
845
- if ((s.type === "variable" || s.type === "upload" || s.type === "select" || s.type === "textarea" || s.type === "richtext" || s.type === "datepicker") && s.key) {
846
- const d = c.find((h) => h.key === s.key);
847
- if (d) {
848
- n = d;
849
- break;
850
- }
851
- }
852
- }
853
- let o = null;
854
- for (let r = a + 1; r < y.length; r++) {
855
- const s = y[r];
856
- if ((s.type === "variable" || s.type === "upload" || s.type === "select" || s.type === "textarea" || s.type === "richtext" || s.type === "datepicker") && s.key) {
857
- const d = c.find((h) => h.key === s.key);
858
- if (d) {
859
- o = d;
860
- break;
861
- }
862
- }
863
- }
864
- n && o && L.push([n, o]);
841
+ for (const r of s) {
842
+ const n = f.filter((a) => {
843
+ const u = b.findIndex(
844
+ (d) => (d.type === "variable" || d.type === "upload" || d.type === "select" || d.type === "textarea" || d.type === "richtext" || d.type === "datepicker") && d.key === a.key
845
+ );
846
+ return u >= 0 && u < r;
847
+ }), o = f.filter((a) => {
848
+ const u = b.findIndex(
849
+ (d) => (d.type === "variable" || d.type === "upload" || d.type === "select" || d.type === "textarea" || d.type === "richtext" || d.type === "datepicker") && d.key === a.key
850
+ );
851
+ return u >= 0 && u > r;
852
+ });
853
+ n.length > 0 && o.length > 0 && M.push([...n, ...o]);
865
854
  }
866
855
  }
867
- if (c.length === 0) {
868
- if (y.length === 0) {
856
+ if (f.length === 0) {
857
+ if (b.length === 0) {
869
858
  if (!t.current) {
870
- i(!1);
859
+ l(!1);
871
860
  return;
872
861
  }
873
- const l = t.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
874
- i(l.length > 0);
862
+ const s = t.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
863
+ l(s.length > 0);
875
864
  return;
876
865
  }
877
- i(!0);
866
+ l(!0);
878
867
  return;
879
868
  }
880
- const E = c.filter((l) => {
869
+ const $ = f.filter((s) => {
881
870
  if (!t.current) return !1;
882
- if (l.exclusionGroup) {
883
- const a = t.current.querySelectorAll(
884
- `[data-group="${l.exclusionGroup}"]`
871
+ if (s.exclusionGroup) {
872
+ const r = t.current.querySelectorAll(
873
+ `[data-group="${s.exclusionGroup}"]`
885
874
  );
886
- if (a.length > 0)
887
- return a[0].style.display !== "none";
875
+ if (r.length > 0)
876
+ return r[0].style.display !== "none";
888
877
  }
889
- if (l.type === "upload" && l.key) {
890
- const a = t.current.querySelector(
891
- `[data-type="upload"][data-key="${l.key}"]`
878
+ if (s.type === "upload" && s.key) {
879
+ const r = t.current.querySelector(
880
+ `[data-type="upload"][data-key="${s.key}"]`
892
881
  );
893
- if (a) {
894
- const n = a.closest("[data-group]") || a.parentElement;
882
+ if (r) {
883
+ const n = r.closest("[data-group]") || r.parentElement;
895
884
  return n ? n.style.display !== "none" : !0;
896
885
  }
897
- } else if (l.type === "variable" && l.key)
898
- if (l.isMultiVariable) {
899
- const a = t.current.querySelectorAll(
900
- `[data-type="variable"][data-multi-key="${l.key}"]`
886
+ } else if (s.type === "variable" && s.key)
887
+ if (s.isMultiVariable) {
888
+ const r = t.current.querySelectorAll(
889
+ `[data-type="variable"][data-multi-key="${s.key}"]`
901
890
  );
902
- if (a.length > 0) {
903
- const n = a[0], o = n.closest("[data-group]") || n.parentElement;
891
+ if (r.length > 0) {
892
+ const n = r[0], o = n.closest("[data-group]") || n.parentElement;
904
893
  return o ? o.style.display !== "none" : !0;
905
894
  }
906
895
  } else {
907
- const a = t.current.querySelector(
908
- `[data-type="variable"][data-key="${l.key}"]`
896
+ const r = t.current.querySelector(
897
+ `[data-type="variable"][data-key="${s.key}"]`
909
898
  );
910
- if (a) {
911
- const n = a.closest("[data-group]") || a.parentElement;
899
+ if (r) {
900
+ const n = r.closest("[data-group]") || r.parentElement;
912
901
  return n ? n.style.display !== "none" : !0;
913
902
  }
914
903
  }
915
- else if (l.type === "select" && l.key) {
916
- const a = t.current.querySelector(
917
- `[data-type="select"][data-key="${l.key}"]`
904
+ else if (s.type === "select" && s.key) {
905
+ const r = t.current.querySelector(
906
+ `[data-type="select"][data-key="${s.key}"]`
918
907
  );
919
- if (a) {
920
- const n = a.closest("[data-group]") || a.parentElement;
908
+ if (r) {
909
+ const n = r.closest("[data-group]") || r.parentElement;
921
910
  return n ? n.style.display !== "none" : !0;
922
911
  }
923
- } else if (l.type === "textarea" && l.key) {
924
- const a = t.current.querySelector(
925
- `[data-type="textarea"][data-key="${l.key}"]`
912
+ } else if (s.type === "textarea" && s.key) {
913
+ const r = t.current.querySelector(
914
+ `[data-type="textarea"][data-key="${s.key}"]`
926
915
  );
927
- if (a) {
928
- const n = a.closest("[data-group]") || a.parentElement;
916
+ if (r) {
917
+ const n = r.closest("[data-group]") || r.parentElement;
929
918
  return n ? n.style.display !== "none" : !0;
930
919
  }
931
- } else if (l.type === "richtext" && l.key) {
932
- const a = t.current.querySelector(
933
- `[data-type="richtext"][data-key="${l.key}"]`
920
+ } else if (s.type === "richtext" && s.key) {
921
+ const r = t.current.querySelector(
922
+ `[data-type="richtext"][data-key="${s.key}"]`
934
923
  );
935
- if (a) {
936
- const n = a.closest("[data-group]") || a.parentElement;
924
+ if (r) {
925
+ const n = r.closest("[data-group]") || r.parentElement;
937
926
  return n ? n.style.display !== "none" : !0;
938
927
  }
939
- } else if (l.type === "datepicker" && l.key) {
940
- const a = t.current.querySelector(
941
- `[data-type="datepicker"][data-key="${l.key}"]`
928
+ } else if (s.type === "datepicker" && s.key) {
929
+ const r = t.current.querySelector(
930
+ `[data-type="datepicker"][data-key="${s.key}"]`
942
931
  );
943
- if (a) {
944
- const n = a.closest("[data-group]") || a.parentElement;
932
+ if (r) {
933
+ const n = r.closest("[data-group]") || r.parentElement;
945
934
  return n ? n.style.display !== "none" : !0;
946
935
  }
947
936
  }
948
937
  return !1;
949
938
  });
950
- if (E.length === 0) {
951
- i(!0);
939
+ if ($.length === 0) {
940
+ l(!0);
952
941
  return;
953
942
  }
954
- const C = /* @__PURE__ */ new Set();
955
- L.forEach((l) => {
956
- l.forEach((a) => {
957
- a.key && C.add(a.key);
943
+ const w = /* @__PURE__ */ new Set();
944
+ M.forEach((s) => {
945
+ s.forEach((r) => {
946
+ r.key && w.add(r.key);
958
947
  });
959
948
  });
960
- const e = E.filter(
961
- (l) => !l.key || !C.has(l.key)
949
+ const e = $.filter(
950
+ (s) => !s.key || !w.has(s.key)
962
951
  );
963
- let A = (L.length === 0, !0);
964
- for (const l of L) {
965
- const a = l.filter((o) => {
952
+ let q = (M.length === 0, !0);
953
+ for (const s of M) {
954
+ const r = s.filter((o) => {
966
955
  if (!t.current) return !1;
967
956
  if (o.exclusionGroup) {
968
- const r = t.current.querySelectorAll(
957
+ const a = t.current.querySelectorAll(
969
958
  `[data-group="${o.exclusionGroup}"]`
970
959
  );
971
- if (r.length > 0)
972
- return r[0].style.display !== "none";
960
+ if (a.length > 0)
961
+ return a[0].style.display !== "none";
973
962
  }
974
963
  return !0;
975
964
  });
976
- if (a.length === 0)
965
+ if (r.length === 0)
977
966
  continue;
978
967
  let n = !1;
979
- for (const o of a)
968
+ for (const o of r)
980
969
  if (o.type === "upload" && o.key) {
981
- if (u[o.key] !== null && u[o.key] !== void 0) {
970
+ if (p[o.key] !== null && p[o.key] !== void 0) {
982
971
  n = !0;
983
972
  break;
984
973
  }
985
974
  } else if (o.type === "variable" && o.key)
986
975
  if (o.isMultiVariable) {
987
- const r = t.current.querySelectorAll(
976
+ const a = t.current.querySelectorAll(
988
977
  `[data-type="variable"][data-multi-key="${o.key}"]`
989
978
  );
990
- let s = 0;
991
- for (const h of Array.from(r))
992
- h.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (s += 1);
979
+ let u = 0;
980
+ for (const x of Array.from(a))
981
+ x.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (u += 1);
993
982
  const d = o.minCount && o.minCount > 0 ? o.minCount : 1;
994
- if (s >= d) {
983
+ if (u >= d) {
995
984
  n = !0;
996
985
  break;
997
986
  }
998
987
  } else {
999
- const r = t.current.querySelector(
988
+ const a = t.current.querySelector(
1000
989
  `[data-type="variable"][data-key="${o.key}"]`
1001
990
  );
1002
- if (r && r.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
991
+ if (a && a.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1003
992
  n = !0;
1004
993
  break;
1005
994
  }
1006
995
  }
1007
996
  else if (o.type === "select" && o.key) {
1008
- const r = t.current.querySelector(
997
+ const a = t.current.querySelector(
1009
998
  `[data-type="select"][data-key="${o.key}"]`
1010
999
  );
1011
- if (r && (r.value || "").trim().length > 0) {
1000
+ if (a && (a.value || "").trim().length > 0) {
1012
1001
  n = !0;
1013
1002
  break;
1014
1003
  }
1015
1004
  } else if (o.type === "textarea" && o.key) {
1016
- const r = t.current.querySelector(
1005
+ const a = t.current.querySelector(
1017
1006
  `[data-type="textarea"][data-key="${o.key}"]`
1018
1007
  );
1019
- if (r && (r.value || "").trim().length > 0) {
1008
+ if (a && (a.value || "").trim().length > 0) {
1020
1009
  n = !0;
1021
1010
  break;
1022
1011
  }
1023
1012
  } else if (o.type === "richtext" && o.key) {
1024
- const r = t.current.querySelector(
1013
+ const a = t.current.querySelector(
1025
1014
  `[data-type="richtext"][data-key="${o.key}"]`
1026
1015
  );
1027
- if (r && (r.textContent || "").replace(/[\u200B]/g, "").trim().length > 0) {
1016
+ if (a && (a.textContent || "").replace(/[\u200B]/g, "").trim().length > 0) {
1028
1017
  n = !0;
1029
1018
  break;
1030
1019
  }
1031
1020
  } else if (o.type === "datepicker" && o.key) {
1032
- const r = t.current.querySelector(
1021
+ const a = t.current.querySelector(
1033
1022
  `[data-type="datepicker"][data-key="${o.key}"]`
1034
1023
  );
1035
- if (r && (r.getAttribute("data-value") || "").trim().length > 0) {
1024
+ if (a && (a.getAttribute("data-value") || "").trim().length > 0) {
1036
1025
  n = !0;
1037
1026
  break;
1038
1027
  }
1039
1028
  }
1040
1029
  if (!n) {
1041
- A = !1;
1030
+ q = !1;
1042
1031
  break;
1043
1032
  }
1044
1033
  }
1045
- let g = !0;
1046
- for (const l of e)
1047
- if (l.type === "upload" && l.key) {
1048
- if (u[l.key] === null || u[l.key] === void 0) {
1049
- g = !1;
1034
+ let y = !0;
1035
+ for (const s of e)
1036
+ if (s.type === "upload" && s.key) {
1037
+ if (p[s.key] === null || p[s.key] === void 0) {
1038
+ y = !1;
1050
1039
  break;
1051
1040
  }
1052
- } else if (l.type === "variable" && l.key)
1053
- if (l.isMultiVariable) {
1054
- const a = t.current.querySelectorAll(
1055
- `[data-type="variable"][data-multi-key="${l.key}"]`
1041
+ } else if (s.type === "variable" && s.key)
1042
+ if (s.isMultiVariable) {
1043
+ const r = t.current.querySelectorAll(
1044
+ `[data-type="variable"][data-multi-key="${s.key}"]`
1056
1045
  );
1057
1046
  let n = 0;
1058
- for (const r of Array.from(a))
1059
- r.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (n += 1);
1060
- const o = l.minCount && l.minCount > 0 ? l.minCount : 1;
1047
+ for (const a of Array.from(r))
1048
+ a.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && (n += 1);
1049
+ const o = s.minCount && s.minCount > 0 ? s.minCount : 1;
1061
1050
  if (n < o) {
1062
- g = !1;
1051
+ y = !1;
1063
1052
  break;
1064
1053
  }
1065
1054
  } else {
1066
- const a = t.current.querySelector(
1067
- `[data-type="variable"][data-key="${l.key}"]`
1055
+ const r = t.current.querySelector(
1056
+ `[data-type="variable"][data-key="${s.key}"]`
1068
1057
  );
1069
- if (!a) {
1070
- g = !1;
1058
+ if (!r) {
1059
+ y = !1;
1071
1060
  break;
1072
1061
  }
1073
- if (a.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
1074
- g = !1;
1062
+ if (r.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
1063
+ y = !1;
1075
1064
  break;
1076
1065
  }
1077
1066
  }
1078
- else if (l.type === "select" && l.key) {
1079
- const a = t.current.querySelector(
1080
- `[data-type="select"][data-key="${l.key}"]`
1067
+ else if (s.type === "select" && s.key) {
1068
+ const r = t.current.querySelector(
1069
+ `[data-type="select"][data-key="${s.key}"]`
1081
1070
  );
1082
- if (!a || (a.value || "").trim().length === 0) {
1083
- g = !1;
1071
+ if (!r || (r.value || "").trim().length === 0) {
1072
+ y = !1;
1084
1073
  break;
1085
1074
  }
1086
- } else if (l.type === "textarea" && l.key) {
1087
- const a = t.current.querySelector(
1088
- `[data-type="textarea"][data-key="${l.key}"]`
1075
+ } else if (s.type === "textarea" && s.key) {
1076
+ const r = t.current.querySelector(
1077
+ `[data-type="textarea"][data-key="${s.key}"]`
1089
1078
  );
1090
- if (!a || (a.value || "").trim().length === 0) {
1091
- g = !1;
1079
+ if (!r || (r.value || "").trim().length === 0) {
1080
+ y = !1;
1092
1081
  break;
1093
1082
  }
1094
- } else if (l.type === "richtext" && l.key) {
1095
- const a = t.current.querySelector(
1096
- `[data-type="richtext"][data-key="${l.key}"]`
1083
+ } else if (s.type === "richtext" && s.key) {
1084
+ const r = t.current.querySelector(
1085
+ `[data-type="richtext"][data-key="${s.key}"]`
1097
1086
  );
1098
- if (!a || (a.textContent || "").replace(/[\u200B]/g, "").trim().length === 0) {
1099
- g = !1;
1087
+ if (!r || (r.textContent || "").replace(/[\u200B]/g, "").trim().length === 0) {
1088
+ y = !1;
1100
1089
  break;
1101
1090
  }
1102
- } else if (l.type === "datepicker" && l.key) {
1103
- const a = t.current.querySelector(
1104
- `[data-type="datepicker"][data-key="${l.key}"]`
1091
+ } else if (s.type === "datepicker" && s.key) {
1092
+ const r = t.current.querySelector(
1093
+ `[data-type="datepicker"][data-key="${s.key}"]`
1105
1094
  );
1106
- if (!a || (a.getAttribute("data-value") || "").trim().length === 0) {
1107
- g = !1;
1095
+ if (!r || (r.getAttribute("data-value") || "").trim().length === 0) {
1096
+ y = !1;
1108
1097
  break;
1109
1098
  }
1110
1099
  }
1111
- i(A && g);
1100
+ l(q && y);
1112
1101
  }
1113
- function Ve(t, y) {
1102
+ function Ve(t, b) {
1114
1103
  if (!t.current) return;
1115
- t.current.querySelectorAll('[data-type="variable"]').forEach((i) => {
1116
- const c = i.innerText.replace(/\n/g, "");
1117
- c.replace(/\u200B/g, "") ? i.classList.remove("show-placeholder") : (c !== "​" && (i.innerText = "​"), i.classList.add("show-placeholder"));
1104
+ t.current.querySelectorAll('[data-type="variable"]').forEach((l) => {
1105
+ const f = l.innerText.replace(/\n/g, "");
1106
+ f.replace(/\u200B/g, "") ? l.classList.remove("show-placeholder") : (f !== "​" && (l.innerText = "​"), l.classList.add("show-placeholder"));
1118
1107
  });
1119
1108
  }
1120
- function qt(t, y, u, i, c, k = {}, L) {
1109
+ function Nt(t, b, p, l, f, T = {}, M) {
1121
1110
  if (!t.current) return;
1122
- let E = "", C = 0;
1123
- for (; C < y.length; ) {
1124
- const e = y[C], A = C + 1 < y.length ? y[C + 1] : null;
1125
- if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && A) {
1126
- const r = A.type === "upload" && A.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === A.exclusionGroup, s = A.type === "variable" && A.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === A.exclusionGroup;
1127
- if (r) {
1128
- const h = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, x = "</span>";
1129
- let G = "";
1130
- e.className ? G = `<span class="${e.className}">${e.text ?? ""}</span>` : G = e.text ?? "";
1131
- const T = A, _ = u[T.key] !== null && u[T.key] !== void 0, H = _ ? u[T.key] : null, D = _ ? u[T.key]?.name : T.text, K = _ ? "" : "hidden", Q = T.tooltip && !_ ? "" : "hidden", Y = _ ? "has-file" : "", te = _ && D ? ` data-file-name="${D.replace(/"/g, "&quot;")}"` : "";
1132
- let N = "";
1133
- _ && H && (H.type?.startsWith("image/") ? N = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(H)}" alt="preview" />` : N = "<i class='iconfont icon-exlwenjian'></i>");
1134
- const M = `<span contenteditable="false" data-type="upload" data-key="${T.key}" class="upload-chip"><span class="upload-inner-wrapper ${Y}"><span class="upload-icon">${N}</span><span class="upload-label"${te}>${D || T.text}</span>${T.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${Q}" data-upload-key="${T.key}" data-tooltip="${T.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${K}" title="移除文件">×</span></span></span>`;
1135
- E += h + G + M + x, C += 2;
1111
+ let $ = "", w = 0;
1112
+ for (; w < b.length; ) {
1113
+ const e = b[w], q = w + 1 < b.length ? b[w + 1] : null;
1114
+ if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && q) {
1115
+ const a = q.type === "upload" && q.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === q.exclusionGroup, u = q.type === "variable" && q.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === q.exclusionGroup;
1116
+ if (a) {
1117
+ const x = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, v = "</span>";
1118
+ let _ = "";
1119
+ e.className ? _ = `<span class="${e.className}">${e.text ?? ""}</span>` : _ = e.text ?? "";
1120
+ const k = q, P = p[k.key] !== null && p[k.key] !== void 0, H = P ? p[k.key] : null, F = P ? p[k.key]?.name : k.text, U = P ? "" : "hidden", R = k.tooltip && !P ? "" : "hidden", ee = P ? "has-file" : "", re = P && F ? ` data-file-name="${F.replace(/"/g, "&quot;")}"` : "";
1121
+ let i = "";
1122
+ P && H && (H.type?.startsWith("image/") ? i = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(H)}" alt="preview" />` : i = "<i class='iconfont icon-exlwenjian'></i>");
1123
+ const c = `<span contenteditable="false" data-type="upload" data-key="${k.key}" class="upload-chip"><span class="upload-inner-wrapper ${ee}"><span class="upload-icon">${i}</span><span class="upload-label"${re}>${F || k.text}</span>${k.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${R}" data-upload-key="${k.key}" data-tooltip="${k.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${U}" title="移除文件">×</span></span></span>`;
1124
+ $ += x + _ + c + v, w += 2;
1136
1125
  continue;
1137
1126
  }
1138
- if (s) {
1139
- const h = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, x = "</span>";
1140
- let G = "";
1141
- e.className ? G = `<span class="${e.className}">${e.text ?? ""}</span>` : G = e.text ?? "";
1142
- const T = A, H = (T.key ? c[T.key] : void 0) || T.text || "", D = !H, K = D ? "​" : H, Q = D ? "show-placeholder" : "", Y = T.exclusionGroup ? ` data-group="${T.exclusionGroup}"` : "", te = T.tooltip ? ` data-tooltip="${T.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${T.key || ""}"` : "", N = T.tooltip && D ? "" : "hidden", M = `<span contenteditable="true" data-type="variable" data-key="${T.key}" data-placeholder="${T.placeholder || ""}"${Y}${te} class="variable-chip ${Q}">${K}${T.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${N}" data-variable-key="${T.key}" data-tooltip="${T.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1143
- E += h + G + M + x, C += 2;
1127
+ if (u) {
1128
+ const x = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, v = "</span>";
1129
+ let _ = "";
1130
+ e.className ? _ = `<span class="${e.className}">${e.text ?? ""}</span>` : _ = e.text ?? "";
1131
+ const k = q, H = (k.key ? f[k.key] : void 0) || k.text || "", F = !H, U = F ? "​" : H, R = F ? "show-placeholder" : "", ee = k.exclusionGroup ? ` data-group="${k.exclusionGroup}"` : "", re = k.tooltip ? ` data-tooltip="${k.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${k.key || ""}"` : "", i = k.tooltip && F ? "" : "hidden", c = `<span contenteditable="true" data-type="variable" data-key="${k.key}" data-placeholder="${k.placeholder || ""}"${ee}${re} class="variable-chip ${R}">${U}${k.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${i}" data-variable-key="${k.key}" data-tooltip="${k.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1132
+ $ += x + _ + c + v, w += 2;
1144
1133
  continue;
1145
1134
  }
1146
1135
  }
1147
- const l = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", a = e.exclusionGroup ? `<span ${l} class="exclusion-wrapper">` : "", n = e.exclusionGroup ? "</span>" : "";
1136
+ const s = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", r = e.exclusionGroup ? `<span ${s} class="exclusion-wrapper">` : "", n = e.exclusionGroup ? "</span>" : "";
1148
1137
  let o = "";
1149
1138
  if (e.type === "tag") {
1150
- const s = i || L === "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>', d = i ? ' data-locked="true"' : "", h = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1151
- o = `<span contenteditable="false" class="tag-node group"${d}${h}><span class="tag-label">${e.text}</span>${s}</span>`;
1139
+ const u = l || M === "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>', d = l ? ' data-locked="true"' : "", x = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1140
+ o = `<span contenteditable="false" class="tag-node group"${d}${x}><span class="tag-label">${e.text}</span>${u}</span>`;
1152
1141
  } else if (e.type === "text") {
1153
- const r = i ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', d = (e.text ?? "").replace(/\n/g, "<br/>");
1154
- e.className ? o = `<span class="${e.className}"${r}>${d}</span>` : o = i ? `<span${r}>${d}</span>` : `<span contenteditable="false">${d}</span>`;
1142
+ const a = l ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', d = (e.text ?? "").replace(/\n/g, "<br/>");
1143
+ e.className ? o = `<span class="${e.className}"${a}>${d}</span>` : o = l ? `<span${a}>${d}</span>` : `<span contenteditable="false">${d}</span>`;
1155
1144
  } else if (e.type === "variable" && e.key) {
1156
- const s = c[e.key] || e.text || "", d = !s, h = d ? "​" : s, x = d ? "show-placeholder" : "", G = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", T = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", _ = e.tooltip && d ? "" : "hidden", H = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${G}${T} class="variable-chip ${x}">${h}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${_}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1145
+ const u = f[e.key] || e.text || "", d = !u, x = d ? "​" : u, v = d ? "show-placeholder" : "", _ = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", k = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", P = e.tooltip && d ? "" : "hidden", H = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${_}${k} class="variable-chip ${v}">${x}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${P}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1157
1146
  e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${H}</span>` : o = H;
1158
1147
  } else if (e.type === "upload" && e.key) {
1159
- const r = u[e.key] !== null && u[e.key] !== void 0, s = r ? u[e.key] : null, d = r ? u[e.key]?.name : e.text, h = r ? "" : "hidden", x = e.tooltip && !r ? "" : "hidden", G = r ? "has-file" : "", T = r && d ? ` data-file-name="${d.replace(/"/g, "&quot;")}"` : "";
1160
- let _ = "";
1161
- r && s && (s.type?.startsWith("image/") ? _ = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(s)}" alt="preview" />` : _ = "<i class='iconfont icon-exlwenjian'></i>");
1162
- const H = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${G}"><span class="upload-icon">${_}</span><span class="upload-label"${T}>${d || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${x}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${h}" title="移除文件">×</span></span></span>`;
1148
+ const a = p[e.key] !== null && p[e.key] !== void 0, u = a ? p[e.key] : null, d = a ? p[e.key]?.name : e.text, x = a ? "" : "hidden", v = e.tooltip && !a ? "" : "hidden", _ = a ? "has-file" : "", k = a && d ? ` data-file-name="${d.replace(/"/g, "&quot;")}"` : "";
1149
+ let P = "";
1150
+ a && u && (u.type?.startsWith("image/") ? P = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(u)}" alt="preview" />` : P = "<i class='iconfont icon-exlwenjian'></i>");
1151
+ const H = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${_}"><span class="upload-icon">${P}</span><span class="upload-label"${k}>${d || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${v}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${x}" title="移除文件">×</span></span></span>`;
1163
1152
  e.required ? o = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${H}</span>` : o = H;
1164
1153
  } else if (e.type === "select" && e.key) {
1165
- const r = c[e.key] ?? e.text ?? "", s = (e.options || []).map((T) => {
1166
- const _ = r === T.value ? "selected" : "";
1167
- return `<option value="${T.value}" ${_}>${T.label}</option>`;
1168
- }).join(""), d = e.placeholder ? `<option value="" ${r ? "" : "selected"} disabled hidden>${e.placeholder}</option>` : "", G = `<span class="rte-select-wrapper">${`<select data-type="select" data-key="${e.key}" class="rte-select rte-select-has-icon">${d}${s}</select>`}<i class="iconfont icon-qiehuan-xiayizhang rte-select-icon"></i></span>`;
1169
- e.required ? o = `<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>` : o = G;
1154
+ const a = f[e.key] || "", u = (e.options || []).map((v) => {
1155
+ const _ = a === v.value ? "selected" : "";
1156
+ return `<option value="${v.value}" ${_}>${v.label}</option>`;
1157
+ }).join(""), d = e.placeholder ? `<option value="" ${a ? "" : "selected"} disabled hidden>${e.placeholder}</option>` : "", x = `<select data-type="select" data-key="${e.key}" class="rte-select">${d}${u}</select>`;
1158
+ e.required ? o = `<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>${x}</span>` : o = x;
1170
1159
  } else if (e.type === "textarea" && e.key) {
1171
- const r = c[e.key] || "", s = e.maxHeight || 252, d = e.expandable !== !1, h = e.placeholder ? ` placeholder="${e.placeholder}"` : "", x = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" data-max-height="${s}" style="max-height:${s}px;"${h}>${r}</textarea>`, G = d ? `<button type="button" class="rte-textarea-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", T = `<div class="rte-textarea-wrapper" data-key="${e.key}">${x}${G}</div>`;
1172
- e.required ? o = `<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>${T}</span>` : o = T;
1160
+ const a = f[e.key] || "", u = e.maxHeight || 252, d = e.expandable !== !1, x = e.placeholder ? ` placeholder="${e.placeholder}"` : "", v = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" data-max-height="${u}" style="max-height:${u}px;"${x}>${a}</textarea>`, _ = d ? `<button type="button" class="rte-textarea-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", k = `<div class="rte-textarea-wrapper" data-key="${e.key}">${v}${_}</div>`;
1161
+ e.required ? o = `<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>${k}</span>` : o = k;
1173
1162
  } else if (e.type === "richtext" && e.key) {
1174
- const r = c[e.key] || e.text || "", s = e.minHeight || 140, d = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", h = e.expandable !== !1, x = r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;"), G = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${d} style="min-height:${s}px;">${x}</div>`, T = h ? `<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>` : "", _ = `<div class="rte-richtext-wrapper" data-key="${e.key}">${G}${T}</div>`, H = `<div class="rte-richtext-container" data-key="${e.key}">${_}</div>`;
1163
+ const a = f[e.key] || e.text || "", u = e.minHeight || 140, d = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", x = e.expandable !== !1, v = a, _ = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${d} style="min-height:${u}px;">${v}</div>`, k = x ? `<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", P = `<div class="rte-richtext-wrapper" data-key="${e.key}">${_}${k}</div>`, H = `<div class="rte-richtext-container" data-key="${e.key}">${P}</div>`;
1175
1164
  e.required ? o = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group rte-richtext-required"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${H}</div>` : o = H;
1176
1165
  } else if (e.type === "datepicker" && e.key) {
1177
- const r = c[e.key] || "", s = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", d = `<div data-type="datepicker" data-key="${e.key}" data-value="${r}" class="rte-datepicker-host"${s}></div>`;
1178
- e.required ? o = `<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>${d}</span>` : o = d;
1166
+ const a = f[e.key] || "", u = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", d = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", x = e.disableFuture ? ' data-disable-future="true"' : "", v = `<div data-type="datepicker" data-key="${e.key}" data-value="${a}" class="rte-datepicker-host"${u}${d}${x}></div>`;
1167
+ e.required ? o = `<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>${v}</span>` : o = v;
1179
1168
  } else if (e.type === "multi-variable" && e.key) {
1180
- const r = e.maxCount || 9, s = k[e.key] || 1, d = Math.min(s, r);
1169
+ const a = e.maxCount || 9, u = T[e.key] || 1, d = Math.min(u, a);
1181
1170
  if (e.required) {
1182
- const h = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, x = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
1183
- let G = "";
1184
- for (let T = 0; T < d; T++) {
1185
- const _ = `${e.key}_${T}`, H = c[_] || "", D = !H, K = D ? "​" : H, Q = D ? "show-placeholder" : "", Y = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", te = e.tooltip && D ? "" : "hidden", N = `<span contenteditable="true" data-type="variable" data-key="${_}" data-multi-key="${e.key}" data-index="${T}" data-placeholder="${e.placeholder || ""}"${Y} class="variable-chip ${Q}">${K}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${te}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1186
- T === 0 ? G += `<span ${x} class="exclusion-wrapper required-upload-group required-multi-first">${h}${N}</span>` : G += N;
1171
+ const x = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, v = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
1172
+ let _ = "";
1173
+ for (let k = 0; k < d; k++) {
1174
+ const P = `${e.key}_${k}`, H = f[P] || "", F = !H, U = F ? "​" : H, R = F ? "show-placeholder" : "", ee = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", re = e.tooltip && F ? "" : "hidden", i = `<span contenteditable="true" data-type="variable" data-key="${P}" data-multi-key="${e.key}" data-index="${k}" data-placeholder="${e.placeholder || ""}"${ee} class="variable-chip ${R}">${U}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${re}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1175
+ k === 0 ? _ += `<span ${v} class="exclusion-wrapper required-upload-group required-multi-first">${x}${i}</span>` : _ += i;
1187
1176
  }
1188
- o = G;
1177
+ o = _;
1189
1178
  } else {
1190
- let h = "";
1191
- for (let x = 0; x < d; x++) {
1192
- const G = `${e.key}_${x}`, T = c[G] || "", _ = !T, H = _ ? "​" : T, D = _ ? "show-placeholder" : "", K = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", Q = e.tooltip && _ ? "" : "hidden", Y = `<span contenteditable="true" data-type="variable" data-key="${G}" data-multi-key="${e.key}" data-index="${x}" data-placeholder="${e.placeholder || ""}"${K} class="variable-chip ${D}">${H}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${Q}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1193
- h += Y;
1179
+ let x = "";
1180
+ for (let v = 0; v < d; v++) {
1181
+ const _ = `${e.key}_${v}`, k = f[_] || "", P = !k, H = P ? "​" : k, F = P ? "show-placeholder" : "", U = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", R = e.tooltip && P ? "" : "hidden", ee = `<span contenteditable="true" data-type="variable" data-key="${_}" data-multi-key="${e.key}" data-index="${v}" data-placeholder="${e.placeholder || ""}"${U} class="variable-chip ${F}">${H}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${R}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1182
+ x += ee;
1194
1183
  }
1195
- o = h;
1184
+ o = x;
1196
1185
  }
1197
1186
  }
1198
- E += a + o + n, C++;
1187
+ $ += r + o + n, w++;
1199
1188
  }
1200
- t.current && (t.current.innerHTML = E, setTimeout(() => {
1189
+ t.current && (t.current.innerHTML = $, setTimeout(() => {
1201
1190
  if (!t.current) return;
1202
- t.current.querySelectorAll('[data-type="variable"]').forEach((A) => {
1203
- const g = A.innerText.replace(/\n/g, "");
1204
- g.replace(/\u200B/g, "") ? A.classList.remove("show-placeholder") : (g !== "​" && (A.innerText = "​"), A.classList.add("show-placeholder"));
1191
+ t.current.querySelectorAll('[data-type="variable"]').forEach((q) => {
1192
+ const y = q.innerText.replace(/\n/g, "");
1193
+ y.replace(/\u200B/g, "") ? q.classList.remove("show-placeholder") : (y !== "​" && (q.innerText = "​"), q.classList.add("show-placeholder"));
1205
1194
  });
1206
1195
  }, 0));
1207
1196
  }
1208
- function Ct(t, y, u, i, c = {}, k, L, E) {
1209
- const C = U(() => {
1197
+ function At(t, b, p, l, f = {}, T, M, $) {
1198
+ const w = ae(() => {
1210
1199
  if (!t.current) return;
1211
- if (y.length === 0) {
1200
+ if (b.length === 0) {
1212
1201
  t.current.innerHTML = "";
1213
1202
  return;
1214
1203
  }
1215
1204
  let e = {};
1216
- const g = t.current.__tempVariableValues;
1217
- if (g ? (e = g, setTimeout(() => {
1205
+ const y = t.current.__tempVariableValues;
1206
+ if (y ? (e = y, setTimeout(() => {
1218
1207
  if (t.current) {
1219
- const l = t.current;
1220
- l.__tempVariableValues === g && delete l.__tempVariableValues;
1208
+ const s = t.current;
1209
+ s.__tempVariableValues === y && delete s.__tempVariableValues;
1221
1210
  }
1222
- }, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((s) => {
1223
- const d = s.dataset.key;
1211
+ }, 100)) : (t.current.querySelectorAll('[data-type="variable"]').forEach((u) => {
1212
+ const d = u.dataset.key;
1224
1213
  if (d) {
1225
- const h = s.innerText.replace(/[\u200B\n]/g, "").trim();
1226
- h && (e[d] = h);
1214
+ const x = u.innerText.replace(/[\u200B\n]/g, "").trim();
1215
+ x && (e[d] = x);
1227
1216
  }
1228
- }), t.current.querySelectorAll('[data-type="select"]').forEach((s) => {
1229
- const d = s.dataset.key;
1217
+ }), t.current.querySelectorAll('[data-type="select"]').forEach((u) => {
1218
+ const d = u.dataset.key;
1230
1219
  if (d) {
1231
- const h = s.value.trim();
1232
- h && (e[d] = h);
1220
+ const x = u.value.trim();
1221
+ x && (e[d] = x);
1233
1222
  }
1234
- }), t.current.querySelectorAll('[data-type="textarea"]').forEach((s) => {
1235
- const d = s.dataset.key;
1223
+ }), t.current.querySelectorAll('[data-type="textarea"]').forEach((u) => {
1224
+ const d = u.dataset.key;
1236
1225
  if (d) {
1237
- const h = s.value.replace(/[\u200B]/g, "").trim();
1238
- h && (e[d] = h);
1226
+ const x = u.value.replace(/[\u200B]/g, "").trim();
1227
+ x && (e[d] = x);
1239
1228
  }
1240
- }), t.current.querySelectorAll('[data-type="richtext"]').forEach((s) => {
1241
- const d = s.dataset.key;
1229
+ }), t.current.querySelectorAll('[data-type="richtext"]').forEach((u) => {
1230
+ const d = u.dataset.key;
1242
1231
  if (d) {
1243
- const h = (s.textContent || "").replace(/[\u200B]/g, "").trim();
1244
- h && (e[d] = h);
1232
+ const x = (u.textContent || "").replace(/[\u200B]/g, "").trim();
1233
+ x && (e[d] = x);
1245
1234
  }
1246
- }), t.current.querySelectorAll('[data-type="datepicker"]').forEach((s) => {
1247
- const d = s.dataset.key;
1235
+ }), t.current.querySelectorAll('[data-type="datepicker"]').forEach((u) => {
1236
+ const d = u.dataset.key;
1248
1237
  if (d) {
1249
- const h = (s.getAttribute("data-value") || "").trim();
1250
- h && (e[d] = h);
1238
+ const x = (u.getAttribute("data-value") || "").trim();
1239
+ x && (e[d] = x);
1251
1240
  }
1252
- })), qt(t, y, u, i, e, c, E), k?.current) {
1253
- const { key: l, offset: a } = k.current;
1241
+ })), Nt(t, b, p, l, e, f, $), T?.current) {
1242
+ const { key: s, offset: r } = T.current;
1254
1243
  setTimeout(() => {
1255
1244
  if (!t.current) return;
1256
1245
  const n = t.current.querySelector(
1257
- `[data-type="variable"][data-key="${l}"]`
1246
+ `[data-type="variable"][data-key="${s}"]`
1258
1247
  );
1259
1248
  if (n) {
1260
1249
  try {
1261
- const o = document.createRange(), r = document.createTreeWalker(
1250
+ const o = document.createRange(), a = document.createTreeWalker(
1262
1251
  n,
1263
1252
  NodeFilter.SHOW_TEXT,
1264
1253
  null
1265
1254
  );
1266
- let s = 0, d = null, h = 0;
1267
- for (; r.nextNode(); ) {
1268
- const x = r.currentNode, G = x.textContent?.length || 0;
1269
- if (s + G >= a) {
1270
- d = x, h = a - s;
1255
+ let u = 0, d = null, x = 0;
1256
+ for (; a.nextNode(); ) {
1257
+ const v = a.currentNode, _ = v.textContent?.length || 0;
1258
+ if (u + _ >= r) {
1259
+ d = v, x = r - u;
1271
1260
  break;
1272
1261
  }
1273
- s += G;
1262
+ u += _;
1274
1263
  }
1275
1264
  if (d) {
1276
- o.setStart(d, Math.min(h, d.textContent?.length || 0)), o.collapse(!0);
1277
- const x = window.getSelection();
1278
- x && (x.removeAllRanges(), x.addRange(o), n.focus());
1265
+ o.setStart(d, Math.min(x, d.textContent?.length || 0)), o.collapse(!0);
1266
+ const v = window.getSelection();
1267
+ v && (v.removeAllRanges(), v.addRange(o), n.focus());
1279
1268
  } else {
1280
1269
  o.selectNodeContents(n), o.collapse(!1);
1281
- const x = window.getSelection();
1282
- x && (x.removeAllRanges(), x.addRange(o), n.focus());
1270
+ const v = window.getSelection();
1271
+ v && (v.removeAllRanges(), v.addRange(o), n.focus());
1283
1272
  }
1284
1273
  } catch {
1285
1274
  const o = document.createRange();
1286
1275
  o.selectNodeContents(n), o.collapse(!1);
1287
- const r = window.getSelection();
1288
- r && (r.removeAllRanges(), r.addRange(o), n.focus());
1276
+ const a = window.getSelection();
1277
+ a && (a.removeAllRanges(), a.addRange(o), n.focus());
1289
1278
  }
1290
- k.current = null;
1279
+ T.current = null;
1291
1280
  }
1292
1281
  }, 0);
1293
1282
  }
1294
- }, [y, u, i, t, c, k, L, E]);
1295
- ae(() => {
1296
- C();
1297
- }, [C]);
1283
+ }, [b, p, l, t, f, T, M, $]);
1284
+ de(() => {
1285
+ w();
1286
+ }, [w]);
1298
1287
  }
1299
- function Tt(t, y, u, i) {
1300
- ae(() => {
1301
- const c = t.current;
1302
- if (!c) return;
1303
- const k = (E) => {
1304
- const C = E.target?.closest(".upload-info-icon");
1305
- if (C && C.classList.contains("upload-info-icon")) {
1306
- const A = C.dataset.uploadKey;
1307
- A && i({ key: A, anchorEl: C, type: "upload" });
1288
+ function Lt(t, b, p, l) {
1289
+ de(() => {
1290
+ const f = t.current;
1291
+ if (!f) return;
1292
+ const T = ($) => {
1293
+ const w = $.target?.closest(".upload-info-icon");
1294
+ if (w && w.classList.contains("upload-info-icon")) {
1295
+ const q = w.dataset.uploadKey;
1296
+ q && l({ key: q, anchorEl: w, type: "upload" });
1308
1297
  return;
1309
1298
  }
1310
- const e = E.target?.closest('[data-type="upload"]');
1299
+ const e = $.target?.closest('[data-type="upload"]');
1311
1300
  if (e) {
1312
- const A = e.dataset.key;
1313
- if (A) {
1314
- const g = u[A];
1315
- g && g.type && g.type.startsWith("image/") && i({ key: A, anchorEl: e, type: "upload-preview" });
1301
+ const q = e.dataset.key;
1302
+ if (q) {
1303
+ const y = p[q];
1304
+ y && y.type && y.type.startsWith("image/") && l({ key: q, anchorEl: e, type: "upload-preview" });
1316
1305
  }
1317
1306
  }
1318
- }, L = (E) => {
1319
- const C = E.target?.closest(".upload-info-icon"), e = E.relatedTarget;
1320
- if (C && C.classList.contains("upload-info-icon")) {
1321
- !e || !c.contains(e) ? i(null) : e.closest(".upload-info-icon") || i(null);
1307
+ }, M = ($) => {
1308
+ const w = $.target?.closest(".upload-info-icon"), e = $.relatedTarget;
1309
+ if (w && w.classList.contains("upload-info-icon")) {
1310
+ !e || !f.contains(e) ? l(null) : e.closest(".upload-info-icon") || l(null);
1322
1311
  return;
1323
1312
  }
1324
- const A = E.target?.closest('[data-type="upload"]');
1325
- if (A) {
1326
- const g = e;
1327
- if (g && A.contains(g))
1313
+ const q = $.target?.closest('[data-type="upload"]');
1314
+ if (q) {
1315
+ const y = e;
1316
+ if (y && q.contains(y))
1328
1317
  return;
1329
- i(null);
1318
+ l(null);
1330
1319
  }
1331
1320
  };
1332
- return c.addEventListener("mouseover", k, !0), c.addEventListener("mouseout", L, !0), () => {
1333
- c.removeEventListener("mouseover", k, !0), c.removeEventListener("mouseout", L, !0);
1321
+ return f.addEventListener("mouseover", T, !0), f.addEventListener("mouseout", M, !0), () => {
1322
+ f.removeEventListener("mouseover", T, !0), f.removeEventListener("mouseout", M, !0);
1334
1323
  };
1335
- }, [y, u, t, i]);
1324
+ }, [b, p, t, l]);
1336
1325
  }
1337
- function $t(t, y, u, i) {
1338
- ae(() => {
1326
+ function It(t, b, p, l) {
1327
+ de(() => {
1339
1328
  if (!t.current) return;
1340
- const c = (C) => {
1341
- if (i === "hideTagClose")
1329
+ const f = (w) => {
1330
+ if (l === "hideTagClose")
1342
1331
  return;
1343
- const e = C.currentTarget, A = e.dataset.tooltip, g = e.dataset.tagKey || "";
1344
- A && u({ key: g, anchorEl: e, type: "tag" });
1345
- }, k = () => {
1346
- u(null);
1332
+ const e = w.currentTarget, q = e.dataset.tooltip, y = e.dataset.tagKey || "";
1333
+ q && p({ key: y, anchorEl: e, type: "tag" });
1334
+ }, T = () => {
1335
+ p(null);
1347
1336
  };
1348
- let L;
1349
- const E = () => {
1337
+ let M;
1338
+ const $ = () => {
1350
1339
  if (!t.current) return;
1351
1340
  t.current.querySelectorAll(
1352
1341
  ".tag-node[data-tooltip]"
1353
1342
  ).forEach((e) => {
1354
- e.addEventListener("mouseenter", c), e.addEventListener("mouseleave", k);
1343
+ e.addEventListener("mouseenter", f), e.addEventListener("mouseleave", T);
1355
1344
  });
1356
1345
  };
1357
- return L = requestAnimationFrame(() => {
1358
- L = requestAnimationFrame(E);
1346
+ return M = requestAnimationFrame(() => {
1347
+ M = requestAnimationFrame($);
1359
1348
  }), () => {
1360
- cancelAnimationFrame(L), t.current && t.current.querySelectorAll(
1349
+ cancelAnimationFrame(M), t.current && t.current.querySelectorAll(
1361
1350
  ".tag-node[data-tooltip]"
1362
1351
  ).forEach((e) => {
1363
- e.removeEventListener("mouseenter", c), e.removeEventListener("mouseleave", k);
1352
+ e.removeEventListener("mouseenter", f), e.removeEventListener("mouseleave", T);
1364
1353
  });
1365
1354
  };
1366
- }, [y, t, u, i]);
1355
+ }, [b, t, p, l]);
1367
1356
  }
1368
- function Nt(t, y, u) {
1369
- ae(() => {
1370
- const i = t.current;
1371
- if (!i) return;
1372
- const c = (L) => {
1373
- const E = L.target?.closest(".variable-info-icon");
1374
- if (E && E.classList.contains("variable-info-icon")) {
1375
- const C = E.dataset.variableKey;
1376
- C && u({ key: C, anchorEl: E, type: "variable" });
1377
- }
1378
- }, k = (L) => {
1379
- const E = L.target?.closest(".variable-info-icon"), C = L.relatedTarget;
1380
- E && E.classList.contains("variable-info-icon") && (!C || !i.contains(C) ? u(null) : C.closest(".variable-info-icon") || u(null));
1357
+ function Dt(t, b, p) {
1358
+ de(() => {
1359
+ const l = t.current;
1360
+ if (!l) return;
1361
+ const f = (M) => {
1362
+ const $ = M.target?.closest(".variable-info-icon");
1363
+ if ($ && $.classList.contains("variable-info-icon")) {
1364
+ const w = $.dataset.variableKey;
1365
+ w && p({ key: w, anchorEl: $, type: "variable" });
1366
+ }
1367
+ }, T = (M) => {
1368
+ const $ = M.target?.closest(".variable-info-icon"), w = M.relatedTarget;
1369
+ $ && $.classList.contains("variable-info-icon") && (!w || !l.contains(w) ? p(null) : w.closest(".variable-info-icon") || p(null));
1381
1370
  };
1382
- return i.addEventListener("mouseover", c, !0), i.addEventListener("mouseout", k, !0), () => {
1383
- i.removeEventListener("mouseover", c, !0), i.removeEventListener("mouseout", k, !0);
1371
+ return l.addEventListener("mouseover", f, !0), l.addEventListener("mouseout", T, !0), () => {
1372
+ l.removeEventListener("mouseover", f, !0), l.removeEventListener("mouseout", T, !0);
1384
1373
  };
1385
- }, [y, t, u]);
1374
+ }, [b, t, p]);
1386
1375
  }
1387
- function St(t, y, u, i) {
1388
- ae(() => {
1376
+ function Mt(t, b, p, l) {
1377
+ de(() => {
1389
1378
  if (!t.current) return;
1390
- const c = (C) => {
1391
- const e = C.currentTarget;
1392
- e.dataset.fileName && i({ key: "", anchorEl: e, type: "upload-label" });
1393
- }, k = () => {
1394
- i(null);
1379
+ const f = (w) => {
1380
+ const e = w.currentTarget;
1381
+ e.dataset.fileName && l({ key: "", anchorEl: e, type: "upload-label" });
1382
+ }, T = () => {
1383
+ l(null);
1395
1384
  };
1396
- let L;
1397
- const E = () => {
1385
+ let M;
1386
+ const $ = () => {
1398
1387
  if (!t.current) return;
1399
1388
  t.current.querySelectorAll(
1400
1389
  ".upload-label[data-file-name]"
1401
1390
  ).forEach((e) => {
1402
- e.addEventListener("mouseenter", c), e.addEventListener("mouseleave", k);
1391
+ e.addEventListener("mouseenter", f), e.addEventListener("mouseleave", T);
1403
1392
  });
1404
1393
  };
1405
- return L = requestAnimationFrame(() => {
1406
- L = requestAnimationFrame(E);
1394
+ return M = requestAnimationFrame(() => {
1395
+ M = requestAnimationFrame($);
1407
1396
  }), () => {
1408
- cancelAnimationFrame(L), t.current && t.current.querySelectorAll(
1397
+ cancelAnimationFrame(M), t.current && t.current.querySelectorAll(
1409
1398
  ".upload-label[data-file-name]"
1410
1399
  ).forEach((e) => {
1411
- e.removeEventListener("mouseenter", c), e.removeEventListener("mouseleave", k);
1400
+ e.removeEventListener("mouseenter", f), e.removeEventListener("mouseleave", T);
1412
1401
  });
1413
1402
  };
1414
- }, [y, u, t, i]);
1403
+ }, [b, p, t, l]);
1415
1404
  }
1416
- function At(t, y, u, i) {
1417
- ae(() => {
1418
- const c = setTimeout(() => {
1419
- Te(t, y, u), $e(t, y, u, i);
1420
- }, 0);
1421
- return () => clearTimeout(c);
1422
- }, [u, y, t, i]), ae(() => {
1423
- const c = t.current;
1424
- if (!c) return;
1425
- const k = (L) => {
1426
- const E = L.target;
1427
- E && E.matches('[data-type="select"]') && (Te(t, y, u), $e(t, y, u, i));
1428
- };
1429
- return c.addEventListener("change", k, !0), () => {
1430
- c.removeEventListener("change", k, !0);
1431
- };
1432
- }, [y, u, t, i]);
1405
+ function Vt(t, b, p, l) {
1406
+ de(() => {
1407
+ Be(t, b, p), Pe(t, b, p, l);
1408
+ }, [p, b, t, l]);
1433
1409
  }
1434
- function Lt(t, y) {
1435
- ae(() => {
1410
+ function _t(t, b) {
1411
+ const p = Q(0);
1412
+ de(() => {
1436
1413
  if (!t.current) return;
1437
- let u = !1, i = 0;
1438
- const c = () => {
1439
- u = !0;
1440
- }, k = () => {
1441
- u = !1, i = Date.now();
1414
+ let l = !1, f = 0;
1415
+ const T = (a) => a instanceof HTMLElement ? !!(a.closest(".rte-datepicker-wrapper") || a.closest(".rte-datepicker-host") || a.closest(".ant-picker") || a.closest(".ant-picker-dropdown")) : !1, M = (a) => {
1416
+ l = !0, T(a.target) && (p.current = Date.now(), console.log("[SelectionCtrl] mousedown on datepicker target"));
1417
+ }, $ = () => {
1418
+ l = !1, f = Date.now();
1442
1419
  };
1443
- let L = !1, E = 0;
1444
- const C = () => {
1445
- L = !0;
1446
- }, e = () => {
1447
- L = !1, E = Date.now();
1448
- }, A = () => {
1449
- E = Date.now();
1450
- }, g = () => {
1420
+ let w = !1, e = 0;
1421
+ const q = () => {
1422
+ w = !0;
1423
+ }, y = () => {
1424
+ w = !1, e = Date.now();
1425
+ }, s = () => {
1426
+ e = Date.now();
1427
+ }, r = (a) => {
1428
+ T(a.target) && (p.current = Date.now(), console.log("[SelectionCtrl] focusin datepicker target"));
1429
+ }, n = () => {
1430
+ if (Date.now() - p.current < 800) {
1431
+ console.log("[SelectionCtrl] skip selectionchange due to recent datepicker interaction");
1432
+ return;
1433
+ }
1434
+ const a = document.activeElement;
1435
+ if (a && (a.closest(".rte-datepicker-wrapper") || a.closest(".rte-datepicker-host") || a.closest(".ant-picker-dropdown") || // Antd dropdown
1436
+ a.tagName === "INPUT" && a.closest(".ant-picker"))) {
1437
+ console.log("[SelectionCtrl] activeElement is datepicker; skip");
1438
+ return;
1439
+ }
1451
1440
  if (!t.current) return;
1452
- const a = window.getSelection();
1453
- if (!a || a.rangeCount === 0 || y.current || u || L || Date.now() - E < 500)
1441
+ const u = window.getSelection();
1442
+ if (!u || u.rangeCount === 0 || b.current || l || w || Date.now() - e < 500)
1443
+ return;
1444
+ const d = u.getRangeAt(0);
1445
+ if (!d.collapsed)
1446
+ return t.current.contains(d.commonAncestorContainer), void 0;
1447
+ const x = u.anchorNode;
1448
+ if (!x || !t.current.contains(x))
1454
1449
  return;
1455
- const n = a.getRangeAt(0);
1456
- if (!n.collapsed)
1457
- return t.current.contains(n.commonAncestorContainer), void 0;
1458
- const o = a.anchorNode;
1459
- if (!o || !t.current.contains(o))
1450
+ let v = !1;
1451
+ if (x.nodeType === Node.ELEMENT_NODE) {
1452
+ const k = x;
1453
+ (k.closest('[data-type="datepicker"]') || k.closest(".rte-datepicker-wrapper") || k.closest(".rte-datepicker-host")) && (v = !0);
1454
+ } else if (x.parentElement) {
1455
+ const k = x.parentElement;
1456
+ (k.closest('[data-type="datepicker"]') || k.closest(".rte-datepicker-wrapper") || k.closest(".rte-datepicker-host")) && (v = !0);
1457
+ }
1458
+ if (v)
1460
1459
  return;
1461
- let r = null;
1462
- if (o.nodeType === Node.ELEMENT_NODE ? r = o.closest('[data-type="variable"]') : o.nodeType === Node.TEXT_NODE && o.parentElement && (r = o.parentElement.closest('[data-type="variable"]')), !r) {
1463
- if (Date.now() - i > 500)
1460
+ let _ = null;
1461
+ if (x.nodeType === Node.ELEMENT_NODE ? _ = x.closest('[data-type="variable"]') : x.nodeType === Node.TEXT_NODE && x.parentElement && (_ = x.parentElement.closest('[data-type="variable"]')), !_) {
1462
+ if (Date.now() - f > 500)
1464
1463
  return;
1465
- const s = t.current.querySelectorAll('[data-type="variable"]');
1466
- if (s.length > 0) {
1467
- let d = null;
1468
- for (const h of Array.from(s))
1469
- if (h.style.display !== "none") {
1470
- d = h;
1464
+ const k = t.current.querySelectorAll('[data-type="variable"]');
1465
+ if (k.length > 0) {
1466
+ let P = null;
1467
+ for (const H of Array.from(k))
1468
+ if (H.style.display !== "none") {
1469
+ P = H;
1471
1470
  break;
1472
1471
  }
1473
- if (!d && s.length > 0 && (d = s[0]), d) {
1474
- const h = document.createRange();
1475
- h.selectNodeContents(d), h.collapse(!1), a.removeAllRanges(), a.addRange(h), d.focus();
1472
+ if (!P && k.length > 0 && (P = k[0]), P) {
1473
+ const H = document.createRange();
1474
+ H.selectNodeContents(P), H.collapse(!1), u.removeAllRanges(), u.addRange(H), P.focus();
1476
1475
  } else
1477
- a.removeAllRanges();
1476
+ u.removeAllRanges();
1478
1477
  } else
1479
- a.removeAllRanges();
1478
+ u.removeAllRanges();
1480
1479
  }
1481
- }, l = t.current;
1482
- return l && (l.addEventListener("compositionstart", C), l.addEventListener("compositionend", e), l.addEventListener("input", A)), document.addEventListener("mousedown", c), document.addEventListener("mouseup", k), document.addEventListener("selectionchange", g), () => {
1480
+ }, o = t.current;
1481
+ return o && (o.addEventListener("compositionstart", q), o.addEventListener("compositionend", y), o.addEventListener("input", s)), document.addEventListener("mousedown", M), document.addEventListener("mouseup", $), document.addEventListener("focusin", r), document.addEventListener("selectionchange", n), () => {
1483
1482
  const a = t.current;
1484
- a && (a.removeEventListener("compositionstart", C), a.removeEventListener("compositionend", e), a.removeEventListener("input", A)), document.removeEventListener("mousedown", c), document.removeEventListener("mouseup", k), document.removeEventListener("selectionchange", g);
1483
+ a && (a.removeEventListener("compositionstart", q), a.removeEventListener("compositionend", y), a.removeEventListener("input", s)), document.removeEventListener("mousedown", M), document.removeEventListener("mouseup", $), document.removeEventListener("focusin", r), document.removeEventListener("selectionchange", n);
1485
1484
  };
1486
- }, [t, y]);
1485
+ }, [t, b]);
1486
+ }
1487
+ function Bt(t) {
1488
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
1489
+ }
1490
+ var De = { exports: {} }, Pt = De.exports, je;
1491
+ function Ot() {
1492
+ return je || (je = 1, function(t, b) {
1493
+ (function(p, l) {
1494
+ t.exports = l();
1495
+ })(Pt, function() {
1496
+ var p = 1e3, l = 6e4, f = 36e5, T = "millisecond", M = "second", $ = "minute", w = "hour", e = "day", q = "week", y = "month", s = "quarter", r = "year", n = "date", o = "Invalid Date", a = /^(\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(i) {
1497
+ var c = ["th", "st", "nd", "rd"], g = i % 100;
1498
+ return "[" + i + (c[(g - 20) % 10] || c[g] || c[0]) + "]";
1499
+ } }, x = function(i, c, g) {
1500
+ var L = String(i);
1501
+ return !L || L.length >= c ? i : "" + Array(c + 1 - L.length).join(g) + i;
1502
+ }, v = { s: x, z: function(i) {
1503
+ var c = -i.utcOffset(), g = Math.abs(c), L = Math.floor(g / 60), S = g % 60;
1504
+ return (c <= 0 ? "+" : "-") + x(L, 2, "0") + ":" + x(S, 2, "0");
1505
+ }, m: function i(c, g) {
1506
+ if (c.date() < g.date()) return -i(g, c);
1507
+ var L = 12 * (g.year() - c.year()) + (g.month() - c.month()), S = c.clone().add(L, y), W = g - S < 0, z = c.clone().add(L + (W ? -1 : 1), y);
1508
+ return +(-(L + (g - S) / (W ? S - z : z - S)) || 0);
1509
+ }, a: function(i) {
1510
+ return i < 0 ? Math.ceil(i) || 0 : Math.floor(i);
1511
+ }, p: function(i) {
1512
+ return { M: y, y: r, w: q, d: e, D: n, h: w, m: $, s: M, ms: T, Q: s }[i] || String(i || "").toLowerCase().replace(/s$/, "");
1513
+ }, u: function(i) {
1514
+ return i === void 0;
1515
+ } }, _ = "en", k = {};
1516
+ k[_] = d;
1517
+ var P = "$isDayjsObject", H = function(i) {
1518
+ return i instanceof ee || !(!i || !i[P]);
1519
+ }, F = function i(c, g, L) {
1520
+ var S;
1521
+ if (!c) return _;
1522
+ if (typeof c == "string") {
1523
+ var W = c.toLowerCase();
1524
+ k[W] && (S = W), g && (k[W] = g, S = W);
1525
+ var z = c.split("-");
1526
+ if (!S && z.length > 1) return i(z[0]);
1527
+ } else {
1528
+ var te = c.name;
1529
+ k[te] = c, S = te;
1530
+ }
1531
+ return !L && S && (_ = S), S || !L && _;
1532
+ }, U = function(i, c) {
1533
+ if (H(i)) return i.clone();
1534
+ var g = typeof c == "object" ? c : {};
1535
+ return g.date = i, g.args = arguments, new ee(g);
1536
+ }, R = v;
1537
+ R.l = F, R.i = H, R.w = function(i, c) {
1538
+ return U(i, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
1539
+ };
1540
+ var ee = function() {
1541
+ function i(g) {
1542
+ this.$L = F(g.locale, null, !0), this.parse(g), this.$x = this.$x || g.x || {}, this[P] = !0;
1543
+ }
1544
+ var c = i.prototype;
1545
+ return c.parse = function(g) {
1546
+ this.$d = function(L) {
1547
+ var S = L.date, W = L.utc;
1548
+ if (S === null) return /* @__PURE__ */ new Date(NaN);
1549
+ if (R.u(S)) return /* @__PURE__ */ new Date();
1550
+ if (S instanceof Date) return new Date(S);
1551
+ if (typeof S == "string" && !/Z$/i.test(S)) {
1552
+ var z = S.match(a);
1553
+ if (z) {
1554
+ var te = z[2] - 1 || 0, se = (z[7] || "0").substring(0, 3);
1555
+ return W ? new Date(Date.UTC(z[1], te, z[3] || 1, z[4] || 0, z[5] || 0, z[6] || 0, se)) : new Date(z[1], te, z[3] || 1, z[4] || 0, z[5] || 0, z[6] || 0, se);
1556
+ }
1557
+ }
1558
+ return new Date(S);
1559
+ }(g), this.init();
1560
+ }, c.init = function() {
1561
+ var g = this.$d;
1562
+ this.$y = g.getFullYear(), this.$M = g.getMonth(), this.$D = g.getDate(), this.$W = g.getDay(), this.$H = g.getHours(), this.$m = g.getMinutes(), this.$s = g.getSeconds(), this.$ms = g.getMilliseconds();
1563
+ }, c.$utils = function() {
1564
+ return R;
1565
+ }, c.isValid = function() {
1566
+ return this.$d.toString() !== o;
1567
+ }, c.isSame = function(g, L) {
1568
+ var S = U(g);
1569
+ return this.startOf(L) <= S && S <= this.endOf(L);
1570
+ }, c.isAfter = function(g, L) {
1571
+ return U(g) < this.startOf(L);
1572
+ }, c.isBefore = function(g, L) {
1573
+ return this.endOf(L) < U(g);
1574
+ }, c.$g = function(g, L, S) {
1575
+ return R.u(g) ? this[L] : this.set(S, g);
1576
+ }, c.unix = function() {
1577
+ return Math.floor(this.valueOf() / 1e3);
1578
+ }, c.valueOf = function() {
1579
+ return this.$d.getTime();
1580
+ }, c.startOf = function(g, L) {
1581
+ var S = this, W = !!R.u(L) || L, z = R.p(g), te = function(he, ye) {
1582
+ var xe = R.w(S.$u ? Date.UTC(S.$y, ye, he) : new Date(S.$y, ye, he), S);
1583
+ return W ? xe : xe.endOf(e);
1584
+ }, se = function(he, ye) {
1585
+ return R.w(S.toDate()[he].apply(S.toDate("s"), (W ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ye)), S);
1586
+ }, ce = this.$W, pe = this.$M, fe = this.$D, be = "set" + (this.$u ? "UTC" : "");
1587
+ switch (z) {
1588
+ case r:
1589
+ return W ? te(1, 0) : te(31, 11);
1590
+ case y:
1591
+ return W ? te(1, pe) : te(0, pe + 1);
1592
+ case q:
1593
+ var X = this.$locale().weekStart || 0, ue = (ce < X ? ce + 7 : ce) - X;
1594
+ return te(W ? fe - ue : fe + (6 - ue), pe);
1595
+ case e:
1596
+ case n:
1597
+ return se(be + "Hours", 0);
1598
+ case w:
1599
+ return se(be + "Minutes", 1);
1600
+ case $:
1601
+ return se(be + "Seconds", 2);
1602
+ case M:
1603
+ return se(be + "Milliseconds", 3);
1604
+ default:
1605
+ return this.clone();
1606
+ }
1607
+ }, c.endOf = function(g) {
1608
+ return this.startOf(g, !1);
1609
+ }, c.$set = function(g, L) {
1610
+ var S, W = R.p(g), z = "set" + (this.$u ? "UTC" : ""), te = (S = {}, S[e] = z + "Date", S[n] = z + "Date", S[y] = z + "Month", S[r] = z + "FullYear", S[w] = z + "Hours", S[$] = z + "Minutes", S[M] = z + "Seconds", S[T] = z + "Milliseconds", S)[W], se = W === e ? this.$D + (L - this.$W) : L;
1611
+ if (W === y || W === r) {
1612
+ var ce = this.clone().set(n, 1);
1613
+ ce.$d[te](se), ce.init(), this.$d = ce.set(n, Math.min(this.$D, ce.daysInMonth())).$d;
1614
+ } else te && this.$d[te](se);
1615
+ return this.init(), this;
1616
+ }, c.set = function(g, L) {
1617
+ return this.clone().$set(g, L);
1618
+ }, c.get = function(g) {
1619
+ return this[R.p(g)]();
1620
+ }, c.add = function(g, L) {
1621
+ var S, W = this;
1622
+ g = Number(g);
1623
+ var z = R.p(L), te = function(pe) {
1624
+ var fe = U(W);
1625
+ return R.w(fe.date(fe.date() + Math.round(pe * g)), W);
1626
+ };
1627
+ if (z === y) return this.set(y, this.$M + g);
1628
+ if (z === r) return this.set(r, this.$y + g);
1629
+ if (z === e) return te(1);
1630
+ if (z === q) return te(7);
1631
+ var se = (S = {}, S[$] = l, S[w] = f, S[M] = p, S)[z] || 1, ce = this.$d.getTime() + g * se;
1632
+ return R.w(ce, this);
1633
+ }, c.subtract = function(g, L) {
1634
+ return this.add(-1 * g, L);
1635
+ }, c.format = function(g) {
1636
+ var L = this, S = this.$locale();
1637
+ if (!this.isValid()) return S.invalidDate || o;
1638
+ var W = g || "YYYY-MM-DDTHH:mm:ssZ", z = R.z(this), te = this.$H, se = this.$m, ce = this.$M, pe = S.weekdays, fe = S.months, be = S.meridiem, X = function(ye, xe, we, Ce) {
1639
+ return ye && (ye[xe] || ye(L, W)) || we[xe].slice(0, Ce);
1640
+ }, ue = function(ye) {
1641
+ return R.s(te % 12 || 12, ye, "0");
1642
+ }, he = be || function(ye, xe, we) {
1643
+ var Ce = ye < 12 ? "AM" : "PM";
1644
+ return we ? Ce.toLowerCase() : Ce;
1645
+ };
1646
+ return W.replace(u, function(ye, xe) {
1647
+ return xe || function(we) {
1648
+ switch (we) {
1649
+ case "YY":
1650
+ return String(L.$y).slice(-2);
1651
+ case "YYYY":
1652
+ return R.s(L.$y, 4, "0");
1653
+ case "M":
1654
+ return ce + 1;
1655
+ case "MM":
1656
+ return R.s(ce + 1, 2, "0");
1657
+ case "MMM":
1658
+ return X(S.monthsShort, ce, fe, 3);
1659
+ case "MMMM":
1660
+ return X(fe, ce);
1661
+ case "D":
1662
+ return L.$D;
1663
+ case "DD":
1664
+ return R.s(L.$D, 2, "0");
1665
+ case "d":
1666
+ return String(L.$W);
1667
+ case "dd":
1668
+ return X(S.weekdaysMin, L.$W, pe, 2);
1669
+ case "ddd":
1670
+ return X(S.weekdaysShort, L.$W, pe, 3);
1671
+ case "dddd":
1672
+ return pe[L.$W];
1673
+ case "H":
1674
+ return String(te);
1675
+ case "HH":
1676
+ return R.s(te, 2, "0");
1677
+ case "h":
1678
+ return ue(1);
1679
+ case "hh":
1680
+ return ue(2);
1681
+ case "a":
1682
+ return he(te, se, !0);
1683
+ case "A":
1684
+ return he(te, se, !1);
1685
+ case "m":
1686
+ return String(se);
1687
+ case "mm":
1688
+ return R.s(se, 2, "0");
1689
+ case "s":
1690
+ return String(L.$s);
1691
+ case "ss":
1692
+ return R.s(L.$s, 2, "0");
1693
+ case "SSS":
1694
+ return R.s(L.$ms, 3, "0");
1695
+ case "Z":
1696
+ return z;
1697
+ }
1698
+ return null;
1699
+ }(ye) || z.replace(":", "");
1700
+ });
1701
+ }, c.utcOffset = function() {
1702
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1703
+ }, c.diff = function(g, L, S) {
1704
+ var W, z = this, te = R.p(L), se = U(g), ce = (se.utcOffset() - this.utcOffset()) * l, pe = this - se, fe = function() {
1705
+ return R.m(z, se);
1706
+ };
1707
+ switch (te) {
1708
+ case r:
1709
+ W = fe() / 12;
1710
+ break;
1711
+ case y:
1712
+ W = fe();
1713
+ break;
1714
+ case s:
1715
+ W = fe() / 3;
1716
+ break;
1717
+ case q:
1718
+ W = (pe - ce) / 6048e5;
1719
+ break;
1720
+ case e:
1721
+ W = (pe - ce) / 864e5;
1722
+ break;
1723
+ case w:
1724
+ W = pe / f;
1725
+ break;
1726
+ case $:
1727
+ W = pe / l;
1728
+ break;
1729
+ case M:
1730
+ W = pe / p;
1731
+ break;
1732
+ default:
1733
+ W = pe;
1734
+ }
1735
+ return S ? W : R.a(W);
1736
+ }, c.daysInMonth = function() {
1737
+ return this.endOf(y).$D;
1738
+ }, c.$locale = function() {
1739
+ return k[this.$L];
1740
+ }, c.locale = function(g, L) {
1741
+ if (!g) return this.$L;
1742
+ var S = this.clone(), W = F(g, L, !0);
1743
+ return W && (S.$L = W), S;
1744
+ }, c.clone = function() {
1745
+ return R.w(this.$d, this);
1746
+ }, c.toDate = function() {
1747
+ return new Date(this.valueOf());
1748
+ }, c.toJSON = function() {
1749
+ return this.isValid() ? this.toISOString() : null;
1750
+ }, c.toISOString = function() {
1751
+ return this.$d.toISOString();
1752
+ }, c.toString = function() {
1753
+ return this.$d.toUTCString();
1754
+ }, i;
1755
+ }(), re = ee.prototype;
1756
+ return U.prototype = re, [["$ms", T], ["$s", M], ["$m", $], ["$H", w], ["$W", e], ["$M", y], ["$y", r], ["$D", n]].forEach(function(i) {
1757
+ re[i[1]] = function(c) {
1758
+ return this.$g(c, i[0], i[1]);
1759
+ };
1760
+ }), U.extend = function(i, c) {
1761
+ return i.$i || (i(c, ee, U), i.$i = !0), U;
1762
+ }, U.locale = F, U.isDayjs = H, U.unix = function(i) {
1763
+ return U(1e3 * i);
1764
+ }, U.en = k[_], U.Ls = k, U.p = {}, U;
1765
+ });
1766
+ }(De)), De.exports;
1487
1767
  }
1488
- const It = ({
1768
+ var Rt = Ot();
1769
+ const _e = /* @__PURE__ */ Bt(Rt), { RangePicker: Gt } = rt, Ht = ({ host: t, onChange: b }) => {
1770
+ const p = t.dataset.key, l = t.dataset.value, f = t.dataset.placeholder, T = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, M = t.dataset.disableFuture === "true", [$, w] = ne(() => {
1771
+ if (!l) return null;
1772
+ const o = l.split(",");
1773
+ return o.length === 2 && o[0] && o[1] ? [_e(o[0]), _e(o[1])] : null;
1774
+ }), [e, q] = ne(null);
1775
+ return Xe(
1776
+ /* @__PURE__ */ E("div", { className: "rte-datepicker-wrapper", contentEditable: !1, style: { display: "inline-block", verticalAlign: "middle", width: "240px" }, children: /* @__PURE__ */ E(
1777
+ Gt,
1778
+ {
1779
+ value: $,
1780
+ disabledDate: (o) => o ? M && o.isAfter(_e(), "day") ? !0 : !T || !e || !e[0] ? !1 : Math.abs(o.diff(e[0], "days")) > T : !1,
1781
+ onCalendarChange: (o) => {
1782
+ console.log("[DatePicker] onCalendarChange", o?.map((a) => a?.format("YYYY-MM-DD") || null)), q(o);
1783
+ },
1784
+ onChange: (o) => {
1785
+ if (console.log("[DatePicker] onChange", o?.map((a) => a?.format("YYYY-MM-DD") || null)), w(o), q(null), o && o[0] && o[1]) {
1786
+ const a = `${o[0].format("YYYY-MM-DD")},${o[1].format("YYYY-MM-DD")}`;
1787
+ t.setAttribute("data-value", a), b(p, a);
1788
+ } else
1789
+ t.setAttribute("data-value", ""), b(p, "");
1790
+ },
1791
+ onOpenChange: (o) => {
1792
+ console.log("[DatePicker] onOpenChange", o), q(o ? $ : null);
1793
+ },
1794
+ placeholder: [f || "开始日期", f || "结束日期"],
1795
+ style: { width: "100%" },
1796
+ size: "small",
1797
+ allowClear: !0,
1798
+ getPopupContainer: () => document.body,
1799
+ popupClassName: "rte-datepicker-dropdown"
1800
+ }
1801
+ ) }),
1802
+ t
1803
+ );
1804
+ }, Ft = (t) => {
1805
+ const [b, p] = ne([]);
1806
+ return de(() => {
1807
+ const l = t.current;
1808
+ if (!l) return;
1809
+ const f = () => {
1810
+ const M = l.querySelectorAll(".rte-datepicker-host"), $ = [];
1811
+ M.forEach((w) => {
1812
+ const e = w.getAttribute("data-key");
1813
+ e && $.push(
1814
+ /* @__PURE__ */ E(
1815
+ Ht,
1816
+ {
1817
+ host: w,
1818
+ onChange: (q, y) => {
1819
+ if (t.current) {
1820
+ const s = new Event("input", { bubbles: !0 });
1821
+ t.current.dispatchEvent(s);
1822
+ }
1823
+ }
1824
+ },
1825
+ `datepicker-${e}`
1826
+ )
1827
+ );
1828
+ }), p($);
1829
+ };
1830
+ f();
1831
+ const T = new MutationObserver((M) => {
1832
+ let $ = !1;
1833
+ for (const w of M)
1834
+ if (w.type === "childList") {
1835
+ let e = !1;
1836
+ if (w.addedNodes.forEach((q) => {
1837
+ if (q.nodeType === Node.ELEMENT_NODE) {
1838
+ const y = q;
1839
+ (y.classList?.contains("rte-datepicker-host") || y.querySelector?.(".rte-datepicker-host")) && (e = !0);
1840
+ }
1841
+ }), w.removedNodes.forEach((q) => {
1842
+ if (q.nodeType === Node.ELEMENT_NODE) {
1843
+ const y = q;
1844
+ (y.classList?.contains("rte-datepicker-host") || y.querySelector?.(".rte-datepicker-host")) && (e = !0);
1845
+ }
1846
+ }), e) {
1847
+ $ = !0;
1848
+ break;
1849
+ }
1850
+ }
1851
+ $ && f();
1852
+ });
1853
+ return T.observe(l, { childList: !0, subtree: !0 }), () => T.disconnect();
1854
+ }, [t]), b;
1855
+ }, zt = ({
1489
1856
  config: t,
1490
- onSend: y,
1491
- isProcessing: u = !1,
1492
- disabled: i = !1,
1493
- width: c,
1494
- lockStructure: k = !1,
1495
- agentOptions: L = [],
1496
- onAgentSelect: E,
1497
- onAgentExit: C,
1857
+ onSend: b,
1858
+ isProcessing: p = !1,
1859
+ disabled: l = !1,
1860
+ width: f,
1861
+ lockStructure: T = !1,
1862
+ agentOptions: M = [],
1863
+ onAgentSelect: $,
1864
+ onAgentExit: w,
1498
1865
  loading: e = !1,
1499
- placeholder: A,
1500
- border: g,
1501
- background: l = "transparent",
1502
- hideButtons: a
1866
+ placeholder: q,
1867
+ border: y,
1868
+ background: s = "transparent",
1869
+ hideButtons: r
1503
1870
  }) => {
1504
- const n = j(null), o = j(null), [r, s] = X({}), [d, h] = X(null), [x, G] = X(null), T = j(!1), _ = j(null), [H, D] = X(!1), K = j(null), [Q, Y] = X(!0), [te, N] = X(() => {
1505
- const p = {};
1506
- return t.forEach((f) => {
1507
- f.type === "multi-variable" && f.key && (p[f.key] = 1);
1508
- }), p;
1509
- }), M = j({}), ne = j({}), re = j({});
1510
- ae(() => {
1511
- ne.current = r;
1512
- }, [r]), ae(() => {
1513
- re.current = te;
1514
- }, [te]);
1515
- const ce = U((p) => p.find((v) => v.type === "tag")?.text || null, []), ye = j(t), ue = j(null);
1516
- ae(() => {
1517
- const p = ce(ye.current), f = ce(t);
1518
- if (p && p !== f && n.current) {
1519
- const v = {};
1520
- n.current.querySelectorAll('[data-type="variable"]').forEach((w) => {
1521
- const B = w.dataset.key;
1522
- if (B) {
1523
- const $ = w.innerText.replace(/[\u200B\n]/g, "").trim();
1524
- $ && (v[B] = $);
1871
+ const n = Q(null), o = Q(null), [a, u] = ne({}), [d, x] = ne(null), [v, _] = ne(null), k = Q(!1), P = Q(null), [H, F] = ne(!1), U = Q(null), [R, ee] = ne(!0), [re, i] = ne(() => {
1872
+ const h = {};
1873
+ return t.forEach((m) => {
1874
+ m.type === "multi-variable" && m.key && (h[m.key] = 1);
1875
+ }), h;
1876
+ }), c = Q({}), g = Q({}), L = Q({});
1877
+ de(() => {
1878
+ g.current = a;
1879
+ }, [a]), de(() => {
1880
+ L.current = re;
1881
+ }, [re]);
1882
+ const S = ae((h) => h.find((C) => C.type === "tag")?.text || null, []), W = Q(t), z = Q(null);
1883
+ de(() => {
1884
+ const h = S(W.current), m = S(t);
1885
+ if (h && h !== m && n.current) {
1886
+ const C = {};
1887
+ n.current.querySelectorAll('[data-type="variable"]').forEach((A) => {
1888
+ const G = A.dataset.key;
1889
+ if (G) {
1890
+ const D = A.innerText.replace(/[\u200B\n]/g, "").trim();
1891
+ D && (C[G] = D);
1525
1892
  }
1526
- }), n.current.querySelectorAll('[data-type="select"]').forEach((w) => {
1527
- const B = w.dataset.key;
1528
- if (B) {
1529
- const $ = w.value.trim();
1530
- $ && (v[B] = $);
1893
+ }), n.current.querySelectorAll('[data-type="select"]').forEach((A) => {
1894
+ const G = A.dataset.key;
1895
+ if (G) {
1896
+ const D = A.value.trim();
1897
+ D && (C[G] = D);
1531
1898
  }
1532
- }), n.current.querySelectorAll('[data-type="textarea"]').forEach((w) => {
1533
- const B = w.dataset.key;
1534
- if (B) {
1535
- const $ = w.value.replace(/[\u200B]/g, "").trim();
1536
- $ && (v[B] = $);
1899
+ }), n.current.querySelectorAll('[data-type="textarea"]').forEach((A) => {
1900
+ const G = A.dataset.key;
1901
+ if (G) {
1902
+ const D = A.value.replace(/[\u200B]/g, "").trim();
1903
+ D && (C[G] = D);
1537
1904
  }
1538
- }), M.current[p] = {
1539
- variableValues: v,
1540
- files: { ...ne.current },
1541
- multiVariableCounts: { ...re.current }
1905
+ }), c.current[h] = {
1906
+ variableValues: C,
1907
+ files: { ...g.current },
1908
+ multiVariableCounts: { ...L.current }
1542
1909
  };
1543
1910
  }
1544
- if (f && M.current[f]) {
1545
- const v = M.current[f];
1546
- ue.current = v, s(v.files), N(v.multiVariableCounts);
1547
- } else if (f) {
1548
- ue.current = null;
1549
- const v = {};
1550
- t.forEach((S) => {
1551
- S.type === "multi-variable" && S.key && (v[S.key] = 1);
1552
- }), N(v), s({});
1911
+ if (m && c.current[m]) {
1912
+ const C = c.current[m];
1913
+ z.current = C, u(C.files), i(C.multiVariableCounts);
1914
+ } else if (m) {
1915
+ z.current = null;
1916
+ const C = {};
1917
+ t.forEach((V) => {
1918
+ V.type === "multi-variable" && V.key && (C[V.key] = 1);
1919
+ }), i(C), u({});
1553
1920
  } else
1554
- ue.current = null, N({}), s({});
1555
- ye.current = t;
1556
- }, [t, ce]), Re(() => {
1557
- ue.current && n.current && (n.current.__tempVariableValues = ue.current.variableValues, setTimeout(() => {
1558
- ue.current && (ue.current = null);
1921
+ z.current = null, i({}), u({});
1922
+ W.current = t;
1923
+ }, [t, S]), ze(() => {
1924
+ z.current && n.current && (n.current.__tempVariableValues = z.current.variableValues, setTimeout(() => {
1925
+ z.current && (z.current = null);
1559
1926
  }, 0));
1560
- }), Ct(n, t, r, k, te, K, void 0, a), Tt(n, t, r, G), $t(n, t, G, a), St(n, t, r, G), Nt(n, t, G), At(n, t, r, D), Lt(n, T), ae(() => {
1927
+ }), At(n, t, a, T, re, U, void 0, r), Lt(n, t, a, _), It(n, t, _, r), Mt(n, t, a, _), Dt(n, t, _), Vt(n, t, a, F), _t(n, k);
1928
+ const te = Ft(n);
1929
+ de(() => {
1561
1930
  if (t.length > 0) {
1562
- Y(!1);
1931
+ ee(!1);
1563
1932
  return;
1564
1933
  }
1565
- const p = () => {
1934
+ const h = () => {
1566
1935
  if (!n.current) {
1567
- Y(!0);
1936
+ ee(!0);
1568
1937
  return;
1569
1938
  }
1570
- const v = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", S = n.current.querySelectorAll('[data-type="variable"]'), b = n.current.querySelectorAll('[data-type="upload"]');
1571
- let q = !1;
1572
- S.forEach((B) => {
1573
- (B.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (q = !0);
1574
- }), b.forEach((B) => {
1575
- B.querySelector(".upload-inner-wrapper.has-file") && (q = !0);
1939
+ const C = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", V = n.current.querySelectorAll('[data-type="variable"]'), N = n.current.querySelectorAll('[data-type="upload"]');
1940
+ let I = !1;
1941
+ V.forEach((G) => {
1942
+ (G.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (I = !0);
1943
+ }), N.forEach((G) => {
1944
+ G.querySelector(".upload-inner-wrapper.has-file") && (I = !0);
1576
1945
  });
1577
- const w = !v && !q;
1578
- Y(w), t.length === 0 && D(!w);
1946
+ const A = !C && !I;
1947
+ ee(A), t.length === 0 && F(!A);
1579
1948
  };
1580
- p();
1581
- const f = new MutationObserver(p);
1582
- return n.current && f.observe(n.current, {
1949
+ h();
1950
+ const m = new MutationObserver(h);
1951
+ return n.current && m.observe(n.current, {
1583
1952
  childList: !0,
1584
1953
  subtree: !0,
1585
1954
  characterData: !0
1586
1955
  }), () => {
1587
- f.disconnect();
1956
+ m.disconnect();
1588
1957
  };
1589
1958
  }, [t]);
1590
- const Ne = (p) => {
1591
- if (i) {
1592
- p.preventDefault();
1959
+ const se = (h) => {
1960
+ if (l) {
1961
+ h.preventDefault();
1593
1962
  return;
1594
1963
  }
1595
- p.preventDefault();
1596
- const f = p.clipboardData.getData("text/plain"), v = window.getSelection();
1597
- if (v && v.rangeCount > 0) {
1598
- const S = v.anchorNode;
1599
- if (S) {
1600
- let b = null;
1601
- if (S.nodeType === Node.ELEMENT_NODE ? b = S.closest('[data-type="variable"]') : S.nodeType === Node.TEXT_NODE && S.parentElement && (b = S.parentElement.closest('[data-type="variable"]')), b) {
1602
- const q = b.dataset.multiKey;
1603
- if (q) {
1604
- const w = /[、,,\s\n\r\t]+/, B = f.split(w).map(($) => $.trim()).filter(($) => $.length > 0);
1605
- if (console.log("[Paste Event] 粘贴的内容:", f), console.log("[Paste Event] 拆分后的值:", B), B.length > 1) {
1606
- const $ = parseInt(b.dataset.index || "0", 10), P = t.find((ee) => ee.type === "multi-variable" && ee.key === q)?.maxCount || 9, z = te[q] || 1, I = Math.min($ + B.length, P);
1607
- I > z && N((F) => ({
1608
- ...F,
1609
- [q]: I
1964
+ h.preventDefault();
1965
+ const m = h.clipboardData.getData("text/plain"), C = window.getSelection();
1966
+ if (C && C.rangeCount > 0) {
1967
+ const V = C.anchorNode;
1968
+ if (V) {
1969
+ let N = null;
1970
+ if (V.nodeType === Node.ELEMENT_NODE ? N = V.closest('[data-type="variable"]') : V.nodeType === Node.TEXT_NODE && V.parentElement && (N = V.parentElement.closest('[data-type="variable"]')), N) {
1971
+ const I = N.dataset.multiKey;
1972
+ if (I) {
1973
+ const A = /[、,,\s\n\r\t]+/, G = m.split(A).map((D) => D.trim()).filter((D) => D.length > 0);
1974
+ if (console.log("[Paste Event] 粘贴的内容:", m), console.log("[Paste Event] 拆分后的值:", G), G.length > 1) {
1975
+ const D = parseInt(N.dataset.index || "0", 10), j = t.find((ie) => ie.type === "multi-variable" && ie.key === I)?.maxCount || 9, Y = re[I] || 1, B = Math.min(D + G.length, j);
1976
+ B > Y && i((J) => ({
1977
+ ...J,
1978
+ [I]: B
1610
1979
  }));
1611
- const R = [];
1612
- for (let F = 0; F < z; F++) {
1613
- const ee = `${q}_${F}`, se = n.current.querySelector(
1614
- `[data-type="variable"][data-key="${ee}"][data-multi-key="${q}"]`
1980
+ const K = [];
1981
+ for (let J = 0; J < Y; J++) {
1982
+ const ie = `${I}_${J}`, ge = n.current.querySelector(
1983
+ `[data-type="variable"][data-key="${ie}"][data-multi-key="${I}"]`
1615
1984
  );
1616
- if (se) {
1617
- const pe = se.innerText.replace(/[\u200B\n]/g, "").trim();
1618
- R.push(pe);
1985
+ if (ge) {
1986
+ const ke = ge.innerText.replace(/[\u200B\n]/g, "").trim();
1987
+ K.push(ke);
1619
1988
  }
1620
1989
  }
1621
- R.splice($, 1, ...B.slice(0, P - $));
1622
- const J = R.slice(0, P);
1623
- J.length > 0 && J[J.length - 1] !== "" && J.length < P && J.push("");
1624
- const V = Math.max(J.length, 1), Z = {};
1625
- J.forEach((F, ee) => {
1626
- F && (Z[`${q}_${ee}`] = F);
1990
+ K.splice(D, 1, ...G.slice(0, j - D));
1991
+ const oe = K.slice(0, j);
1992
+ oe.length > 0 && oe[oe.length - 1] !== "" && oe.length < j && oe.push("");
1993
+ const O = Math.max(oe.length, 1), le = {};
1994
+ oe.forEach((J, ie) => {
1995
+ J && (le[`${I}_${ie}`] = J);
1627
1996
  }), n.current.querySelectorAll(
1628
1997
  '[data-type="variable"]'
1629
- ).forEach((F) => {
1630
- const ee = F.dataset.key, se = F.dataset.multiKey;
1631
- if (ee && se !== q) {
1632
- const pe = F.innerText.replace(/[\u200B\n]/g, "").trim();
1633
- pe && (Z[ee] = pe);
1998
+ ).forEach((J) => {
1999
+ const ie = J.dataset.key, ge = J.dataset.multiKey;
2000
+ if (ie && ge !== I) {
2001
+ const ke = J.innerText.replace(/[\u200B\n]/g, "").trim();
2002
+ ke && (le[ie] = ke);
1634
2003
  }
1635
- }), n.current.__tempVariableValues = Z, N((F) => ({
1636
- ...F,
1637
- [q]: V
1638
- })), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", J);
2004
+ }), n.current.__tempVariableValues = le, i((J) => ({
2005
+ ...J,
2006
+ [I]: O
2007
+ })), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", oe);
1639
2008
  return;
1640
- } else B.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
2009
+ } else G.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
1641
2010
  }
1642
2011
  }
1643
2012
  }
1644
2013
  }
1645
- document.execCommand("insertText", !1, f), de(), setTimeout(() => {
1646
- const S = window.getSelection();
1647
- if (S && S.rangeCount > 0) {
1648
- const b = S.anchorNode;
1649
- if (b) {
1650
- let q = null;
1651
- if (b.nodeType === Node.ELEMENT_NODE ? q = b.closest('[data-type="variable"][data-multi-key]') : b.nodeType === Node.TEXT_NODE && b.parentElement && (q = b.parentElement.closest('[data-type="variable"][data-multi-key]')), q) {
1652
- const w = q.innerText.replace(/[\u200B\n]/g, "").trim();
1653
- /[、,,\s]+/.test(w) && (console.log("[Paste Event] 粘贴后检测到分隔符,内容:", w), console.log("[Paste Event] 提示:失去焦点后将自动拆分"));
2014
+ document.execCommand("insertText", !1, m), ye(), setTimeout(() => {
2015
+ const V = window.getSelection();
2016
+ if (V && V.rangeCount > 0) {
2017
+ const N = V.anchorNode;
2018
+ if (N) {
2019
+ let I = null;
2020
+ if (N.nodeType === Node.ELEMENT_NODE ? I = N.closest('[data-type="variable"][data-multi-key]') : N.nodeType === Node.TEXT_NODE && N.parentElement && (I = N.parentElement.closest('[data-type="variable"][data-multi-key]')), I) {
2021
+ const A = I.innerText.replace(/[\u200B\n]/g, "").trim();
2022
+ /[、,,\s]+/.test(A) && (console.log("[Paste Event] 粘贴后检测到分隔符,内容:", A), console.log("[Paste Event] 提示:失去焦点后将自动拆分"));
1654
2023
  }
1655
2024
  }
1656
2025
  }
1657
2026
  }, 0);
1658
- }, Se = (p) => {
1659
- if (p.target.files && p.target.files[0] && d) {
1660
- const f = p.target.files[0], v = d;
1661
- s((S) => ({ ...S, [v]: f }));
2027
+ }, ce = (h) => {
2028
+ if (h.target.files && h.target.files[0] && d) {
2029
+ const m = h.target.files[0], C = d;
2030
+ u((V) => ({ ...V, [C]: m }));
1662
2031
  }
1663
- p.target && (p.target.value = ""), h(null);
1664
- }, xe = (p) => {
1665
- s((f) => {
1666
- const v = { ...f };
1667
- return delete v[p], v;
2032
+ h.target && (h.target.value = ""), x(null);
2033
+ }, pe = (h) => {
2034
+ u((m) => {
2035
+ const C = { ...m };
2036
+ return delete C[h], C;
1668
2037
  });
1669
- }, Ae = (p) => {
1670
- const f = p.target;
1671
- if (f.closest(".tag-close-btn")) {
1672
- if (p.preventDefault(), p.stopPropagation(), k)
2038
+ }, fe = (h) => {
2039
+ const m = h.target;
2040
+ if (m.closest(".rte-datepicker-wrapper") || m.closest(".rte-datepicker-host"))
2041
+ return;
2042
+ if (m.closest(".tag-close-btn")) {
2043
+ if (h.preventDefault(), h.stopPropagation(), T)
1673
2044
  return;
1674
- G(null), C ? C() : n.current && (n.current.innerHTML = "", n.current.focus());
2045
+ _(null), w ? w() : n.current && (n.current.innerHTML = "", n.current.focus());
1675
2046
  return;
1676
2047
  }
1677
- if (k) {
1678
- const b = f.closest(".tag-node"), q = f.closest('[data-type="text"]');
1679
- if (b || q) {
1680
- p.preventDefault(), p.stopPropagation();
1681
- const w = window.getSelection();
1682
- w && w.removeAllRanges();
2048
+ if (T) {
2049
+ const N = m.closest(".tag-node"), I = m.closest('[data-type="text"]');
2050
+ if (N || I) {
2051
+ h.preventDefault(), h.stopPropagation();
2052
+ const A = window.getSelection();
2053
+ A && A.removeAllRanges();
1683
2054
  return;
1684
2055
  }
1685
2056
  }
1686
- f.closest('[data-type="variable"]') || (_.current = { x: p.clientX, y: p.clientY }, T.current = !1, f.closest(".file-remove-btn") && (p.preventDefault(), p.stopPropagation()));
1687
- }, me = (p) => {
1688
- if (!p.target.closest('[data-type="variable"]') && _.current) {
1689
- const S = Math.abs(p.clientX - _.current.x), b = Math.abs(p.clientY - _.current.y);
1690
- (S > 3 || b > 3) && (T.current = !0);
2057
+ m.closest('[data-type="variable"]') || (P.current = { x: h.clientX, y: h.clientY }, k.current = !1, m.closest(".file-remove-btn") && (h.preventDefault(), h.stopPropagation()));
2058
+ }, be = (h) => {
2059
+ if (!h.target.closest('[data-type="variable"]') && P.current) {
2060
+ const V = Math.abs(h.clientX - P.current.x), N = Math.abs(h.clientY - P.current.y);
2061
+ (V > 3 || N > 3) && (k.current = !0);
1691
2062
  }
1692
- }, Le = (p) => {
1693
- if (p.target.closest('[data-type="variable"]')) {
1694
- _.current = null, T.current = !1;
2063
+ }, X = (h) => {
2064
+ if (h.target.closest('[data-type="variable"]')) {
2065
+ P.current = null, k.current = !1;
1695
2066
  return;
1696
2067
  }
1697
- _.current = null, T.current = !1;
1698
- }, O = (p) => {
1699
- if (i)
2068
+ P.current = null, k.current = !1;
2069
+ }, ue = (h) => {
2070
+ if (l)
1700
2071
  return;
1701
- const f = p.target;
1702
- if (f.closest('[data-type="datepicker"]'))
2072
+ const m = h.target;
2073
+ if (m.closest('[data-type="datepicker"]'))
1703
2074
  return;
1704
- if (f.closest(".tag-close-btn")) {
1705
- p.preventDefault(), p.stopPropagation();
2075
+ if (m.closest(".tag-close-btn")) {
2076
+ h.preventDefault(), h.stopPropagation();
1706
2077
  return;
1707
2078
  }
1708
2079
  if (t.length === 0)
1709
2080
  return;
1710
- const b = (I, R) => {
2081
+ const N = (B, K) => {
1711
2082
  if (!n.current) return;
1712
- Array.from(n.current.children).forEach((V) => {
1713
- if (V !== I)
1714
- if (R)
1715
- V.dataset.prevDisplay === void 0 && (V.dataset.prevDisplay = V.style.display || ""), V.style.setProperty("display", "none", "important");
1716
- else if (V.dataset.prevDisplay !== void 0) {
1717
- const Z = V.dataset.prevDisplay;
1718
- Z ? V.style.display = Z : V.style.removeProperty("display"), delete V.dataset.prevDisplay;
2083
+ Array.from(n.current.children).forEach((O) => {
2084
+ if (O !== B)
2085
+ if (K)
2086
+ O.dataset.prevDisplay === void 0 && (O.dataset.prevDisplay = O.style.display || ""), O.style.setProperty("display", "none", "important");
2087
+ else if (O.dataset.prevDisplay !== void 0) {
2088
+ const le = O.dataset.prevDisplay;
2089
+ le ? O.style.display = le : O.style.removeProperty("display"), delete O.dataset.prevDisplay;
1719
2090
  } else
1720
- V.style.removeProperty("display");
2091
+ O.style.removeProperty("display");
1721
2092
  });
1722
- }, q = f.closest(".rte-textarea-toggle");
1723
- if (q) {
1724
- p.preventDefault(), p.stopPropagation();
1725
- const I = q.closest(".rte-textarea-wrapper"), R = I?.querySelector('[data-type="textarea"]'), V = !(q.getAttribute("data-expanded") === "true");
1726
- q.setAttribute("data-expanded", String(V)), q.textContent = V ? "收起" : "展开", I && I.classList.toggle("rte-textarea-expanded", V);
1727
- const Z = I?.closest(".rte-textarea-required");
1728
- if (Z ? Z.classList.toggle("rte-textarea-overlay", V) : I && I.classList.toggle("rte-textarea-overlay", V), R)
1729
- if (V)
1730
- R.classList.add("rte-textarea-expanded"), R.style.maxHeight = "none", R.style.height = "100%";
2093
+ }, I = m.closest(".rte-textarea-toggle");
2094
+ if (I) {
2095
+ h.preventDefault(), h.stopPropagation();
2096
+ const B = I.closest(".rte-textarea-wrapper"), K = B?.querySelector('[data-type="textarea"]'), O = !(I.getAttribute("data-expanded") === "true");
2097
+ I.setAttribute("data-expanded", String(O)), I.textContent = O ? "收起" : "展开", B && B.classList.toggle("rte-textarea-expanded", O);
2098
+ const le = B?.closest(".rte-textarea-required");
2099
+ if (le ? le.classList.toggle("rte-textarea-overlay", O) : B && B.classList.toggle("rte-textarea-overlay", O), K)
2100
+ if (O)
2101
+ K.classList.add("rte-textarea-expanded"), K.style.maxHeight = "none", K.style.height = "100%";
1731
2102
  else {
1732
- R.classList.remove("rte-textarea-expanded");
1733
- const oe = R.dataset.maxHeight || "252";
1734
- R.style.maxHeight = `${oe}px`, R.style.height = "auto";
2103
+ K.classList.remove("rte-textarea-expanded");
2104
+ const me = K.dataset.maxHeight || "252";
2105
+ K.style.maxHeight = `${me}px`, K.style.height = "auto";
1735
2106
  }
1736
- n.current && (V ? n.current.classList.add("rte-overlay-active") : n.current.classList.remove("rte-overlay-active"));
2107
+ n.current && (O ? n.current.classList.add("rte-overlay-active") : n.current.classList.remove("rte-overlay-active"));
1737
2108
  return;
1738
2109
  }
1739
- const w = f.closest(".rte-richtext-toggle");
1740
- if (w) {
1741
- p.preventDefault(), p.stopPropagation();
1742
- const I = w.closest(".rte-richtext-wrapper"), R = I?.querySelector('[data-type="richtext"]'), V = !(w.getAttribute("data-expanded") === "true");
1743
- ((ee, se) => {
1744
- ee.setAttribute("data-expanded", String(se)), ee.innerHTML = se ? '<i class="iconfont icon-shouqi1"></i><span class="rte-richtext-toggle-label">收起</span>' : '<i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span>';
1745
- })(w, V);
1746
- const oe = I?.closest(".rte-richtext-required");
1747
- oe ? oe.classList.toggle("rte-richtext-expanded", V) : I && I.classList.toggle("rte-richtext-expanded", V);
1748
- const F = I?.closest(".exclusion-wrapper") || I?.parentElement;
1749
- R && (V ? (R.style.height = "100%", R.style.overflow = "auto") : (R.style.height = "", R.style.overflow = "")), F && (F.classList.toggle("rte-richtext-host-expanded", V), b(F, V)), n.current && n.current.classList.toggle("rte-richtext-fullscreen-active", V);
2110
+ const A = m.closest(".rte-richtext-toggle");
2111
+ if (A) {
2112
+ h.preventDefault(), h.stopPropagation();
2113
+ const B = A.closest(".rte-richtext-wrapper"), K = B?.querySelector('[data-type="richtext"]'), O = !(A.getAttribute("data-expanded") === "true");
2114
+ ((ie, ge) => {
2115
+ ie.setAttribute("data-expanded", String(ge)), ie.innerHTML = ge ? '<i class="iconfont icon-shouqi1"></i><span class="rte-richtext-toggle-label">收起</span>' : '<i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span>';
2116
+ })(A, O);
2117
+ const me = B?.closest(".rte-richtext-required");
2118
+ me ? me.classList.toggle("rte-richtext-expanded", O) : B && B.classList.toggle("rte-richtext-expanded", O);
2119
+ const J = B?.closest(".exclusion-wrapper") || B?.parentElement;
2120
+ K && (O ? (K.style.height = "100%", K.style.overflow = "auto") : (K.style.height = "", K.style.overflow = "")), J && (J.classList.toggle("rte-richtext-host-expanded", O), N(J, O)), n.current && n.current.classList.toggle("rte-richtext-fullscreen-active", O);
1750
2121
  return;
1751
2122
  }
1752
- if (f.closest('[data-type="text"]')) {
1753
- p.preventDefault(), p.stopPropagation();
1754
- const I = window.getSelection();
1755
- I && I.removeAllRanges();
2123
+ if (m.closest('[data-type="text"]')) {
2124
+ h.preventDefault(), h.stopPropagation();
2125
+ const B = window.getSelection();
2126
+ B && B.removeAllRanges();
1756
2127
  return;
1757
2128
  }
1758
- if (k && f.closest(".tag-node")) {
1759
- p.preventDefault(), p.stopPropagation();
1760
- const R = window.getSelection();
1761
- R && R.removeAllRanges();
2129
+ if (T && m.closest(".tag-node")) {
2130
+ h.preventDefault(), h.stopPropagation();
2131
+ const K = window.getSelection();
2132
+ K && K.removeAllRanges();
1762
2133
  return;
1763
2134
  }
1764
- if (f.closest('[data-type="variable"]')) {
1765
- if (T.current)
2135
+ if (m.closest('[data-type="variable"]')) {
2136
+ if (k.current)
1766
2137
  return;
1767
2138
  setTimeout(() => {
1768
- const I = window.getSelection();
1769
- I && !I.isCollapsed || Ve(n);
2139
+ const B = window.getSelection();
2140
+ B && !B.isCollapsed || Ve(n);
1770
2141
  }, 10);
1771
2142
  return;
1772
2143
  }
1773
- const P = f.closest(".file-remove-btn");
1774
- if (P) {
1775
- p.preventDefault(), p.stopPropagation();
1776
- const R = P.closest('[data-type="upload"]')?.dataset.key;
1777
- R && xe(R);
2144
+ const j = m.closest(".file-remove-btn");
2145
+ if (j) {
2146
+ h.preventDefault(), h.stopPropagation();
2147
+ const K = j.closest('[data-type="upload"]')?.dataset.key;
2148
+ K && pe(K);
1778
2149
  return;
1779
2150
  }
1780
- const z = f.closest('[data-type="upload"]');
1781
- if (z) {
1782
- const I = z.dataset.key;
1783
- I && (h(I), o.current?.click());
2151
+ const Y = m.closest('[data-type="upload"]');
2152
+ if (Y) {
2153
+ const B = Y.dataset.key;
2154
+ B && (x(B), o.current?.click());
1784
2155
  return;
1785
2156
  }
1786
- }, le = (p) => {
1787
- const v = p.target.closest('[data-type="variable"]');
1788
- if (v) {
1789
- const S = window.getSelection();
1790
- if (S) {
1791
- const b = document.createRange(), q = v.textContent || "";
1792
- if (q.replace(/\u200B/g, "")) {
1793
- let B = 0, $ = q.length;
1794
- q.startsWith("​") && (B = 1), q.endsWith("​") && q.length > 1 && ($ = q.length - 1);
1795
- const P = v.firstChild;
1796
- P && P.nodeType === Node.TEXT_NODE ? (b.setStart(P, B), b.setEnd(P, $)) : b.selectNodeContents(v);
2157
+ }, he = (h) => {
2158
+ const C = h.target.closest('[data-type="variable"]');
2159
+ if (C) {
2160
+ const V = window.getSelection();
2161
+ if (V) {
2162
+ const N = document.createRange(), I = C.textContent || "";
2163
+ if (I.replace(/\u200B/g, "")) {
2164
+ let G = 0, D = I.length;
2165
+ I.startsWith("​") && (G = 1), I.endsWith("​") && I.length > 1 && (D = I.length - 1);
2166
+ const j = C.firstChild;
2167
+ j && j.nodeType === Node.TEXT_NODE ? (N.setStart(j, G), N.setEnd(j, D)) : N.selectNodeContents(C);
1797
2168
  } else
1798
- b.selectNodeContents(v), b.collapse(!0);
1799
- S.removeAllRanges(), S.addRange(b);
2169
+ N.selectNodeContents(C), N.collapse(!0);
2170
+ V.removeAllRanges(), V.addRange(N);
1800
2171
  }
1801
2172
  }
1802
- }, de = () => {
2173
+ }, ye = () => {
1803
2174
  if (t.length === 0) {
1804
2175
  if (n.current) {
1805
- const v = !(n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
1806
- Y(v), D(!v);
2176
+ const C = !(n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
2177
+ ee(C), F(!C);
1807
2178
  }
1808
2179
  return;
1809
2180
  }
1810
- if (Ve(n), n.current && n.current.querySelectorAll('[data-type="variable"]').forEach((v) => {
1811
- const S = v.querySelector(".variable-info-icon");
1812
- if (S) {
1813
- let b = !1;
1814
- const q = document.createTreeWalker(
1815
- v,
2181
+ if (Ve(n), n.current && n.current.querySelectorAll('[data-type="variable"]').forEach((C) => {
2182
+ const V = C.querySelector(".variable-info-icon");
2183
+ if (V) {
2184
+ let N = !1;
2185
+ const I = document.createTreeWalker(
2186
+ C,
1816
2187
  NodeFilter.SHOW_TEXT,
1817
2188
  {
1818
- acceptNode: (w) => S.contains(w) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
2189
+ acceptNode: (A) => V.contains(A) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
1819
2190
  }
1820
2191
  );
1821
- for (; q.nextNode(); )
1822
- if (q.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
1823
- b = !0;
2192
+ for (; I.nextNode(); )
2193
+ if (I.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
2194
+ N = !0;
1824
2195
  break;
1825
2196
  }
1826
- b ? S.classList.add("hidden") : S.classList.remove("hidden");
1827
- }
1828
- }), Te(n, t, r), $e(n, t, r, D), !n.current) return;
1829
- t.filter((f) => f.type === "multi-variable" && f.key).forEach((f) => {
1830
- if (!f.key) return;
1831
- const v = f.maxCount || 9, S = te[f.key] || 1, b = [];
1832
- for (let P = 0; P < S; P++) {
1833
- const z = `${f.key}_${P}`, I = n.current.querySelector(
1834
- `[data-type="variable"][data-key="${z}"][data-multi-key="${f.key}"]`
2197
+ N ? V.classList.add("hidden") : V.classList.remove("hidden");
2198
+ }
2199
+ }), Be(n, t, a), Pe(n, t, a, F), !n.current) return;
2200
+ t.filter((m) => m.type === "multi-variable" && m.key).forEach((m) => {
2201
+ if (!m.key) return;
2202
+ const C = m.maxCount || 9, V = re[m.key] || 1, N = [];
2203
+ for (let j = 0; j < V; j++) {
2204
+ const Y = `${m.key}_${j}`, B = n.current.querySelector(
2205
+ `[data-type="variable"][data-key="${Y}"][data-multi-key="${m.key}"]`
1835
2206
  );
1836
- if (I) {
1837
- const R = I.innerText.replace(/[\u200B\n]/g, "").trim();
1838
- b.push(R);
2207
+ if (B) {
2208
+ const K = B.innerText.replace(/[\u200B\n]/g, "").trim();
2209
+ N.push(K);
1839
2210
  }
1840
2211
  }
1841
- const w = (b[b.length - 1] || "") === "";
1842
- let B = !1, $ = -1;
1843
- for (let P = 0; P < b.length - 1; P++)
1844
- if (b[P] === "") {
1845
- B = !0, $ = P;
2212
+ const A = (N[N.length - 1] || "") === "";
2213
+ let G = !1, D = -1;
2214
+ for (let j = 0; j < N.length - 1; j++)
2215
+ if (N[j] === "") {
2216
+ G = !0, D = j;
1846
2217
  break;
1847
2218
  }
1848
- if (B && $ >= 0) {
1849
- const P = window.getSelection();
1850
- if (P && P.rangeCount > 0) {
1851
- const V = P.getRangeAt(0), Z = V.startContainer, oe = Z.nodeType === Node.ELEMENT_NODE ? Z.closest('[data-type="variable"][data-multi-key]') : Z.parentElement?.closest('[data-type="variable"][data-multi-key]');
1852
- if (oe) {
1853
- const F = oe.dataset.key;
1854
- if (F) {
1855
- const ee = document.createRange();
1856
- ee.setStartBefore(oe), ee.setEnd(V.startContainer, V.startOffset);
1857
- const se = ee.toString().length;
1858
- K.current = { key: F, offset: se };
2219
+ if (G && D >= 0) {
2220
+ const j = window.getSelection();
2221
+ if (j && j.rangeCount > 0) {
2222
+ const O = j.getRangeAt(0), le = O.startContainer, me = le.nodeType === Node.ELEMENT_NODE ? le.closest('[data-type="variable"][data-multi-key]') : le.parentElement?.closest('[data-type="variable"][data-multi-key]');
2223
+ if (me) {
2224
+ const J = me.dataset.key;
2225
+ if (J) {
2226
+ const ie = document.createRange();
2227
+ ie.setStartBefore(me), ie.setEnd(O.startContainer, O.startOffset);
2228
+ const ge = ie.toString().length;
2229
+ U.current = { key: J, offset: ge };
1859
2230
  }
1860
2231
  }
1861
2232
  }
1862
- const z = [...b];
1863
- for (let V = $; V < z.length - 1; V++)
1864
- z[V] = z[V + 1];
1865
- z.pop();
1866
- const I = {};
1867
- z.forEach((V, Z) => {
1868
- V && (I[`${f.key}_${Z}`] = V);
2233
+ const Y = [...N];
2234
+ for (let O = D; O < Y.length - 1; O++)
2235
+ Y[O] = Y[O + 1];
2236
+ Y.pop();
2237
+ const B = {};
2238
+ Y.forEach((O, le) => {
2239
+ O && (B[`${m.key}_${le}`] = O);
1869
2240
  });
1870
- const R = Math.max(w ? z.length : z.length + 1, 1);
2241
+ const K = Math.max(A ? Y.length : Y.length + 1, 1);
1871
2242
  n.current.querySelectorAll(
1872
2243
  '[data-type="variable"]'
1873
- ).forEach((V) => {
1874
- const Z = V.dataset.key, oe = V.dataset.multiKey;
1875
- if (Z && oe !== f.key) {
1876
- const F = V.innerText.replace(/[\u200B\n]/g, "").trim();
1877
- F && (I[Z] = F);
2244
+ ).forEach((O) => {
2245
+ const le = O.dataset.key, me = O.dataset.multiKey;
2246
+ if (le && me !== m.key) {
2247
+ const J = O.innerText.replace(/[\u200B\n]/g, "").trim();
2248
+ J && (B[le] = J);
1878
2249
  }
1879
- }), n.current.__tempVariableValues = I, N((V) => ({
1880
- ...V,
1881
- [f.key]: R
2250
+ }), n.current.__tempVariableValues = B, i((O) => ({
2251
+ ...O,
2252
+ [m.key]: K
1882
2253
  }));
1883
2254
  return;
1884
2255
  }
1885
- if (!w) {
1886
- const P = S - 1, z = `${f.key}_${P}`, I = n.current.querySelector(
1887
- `[data-type="variable"][data-key="${z}"][data-multi-key="${f.key}"]`
2256
+ if (!A) {
2257
+ const j = V - 1, Y = `${m.key}_${j}`, B = n.current.querySelector(
2258
+ `[data-type="variable"][data-key="${Y}"][data-multi-key="${m.key}"]`
1888
2259
  );
1889
- if (I && I.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && S < v) {
1890
- const J = window.getSelection();
1891
- if (J && J.rangeCount > 0) {
1892
- const V = J.getRangeAt(0), Z = V.startContainer, oe = Z.nodeType === Node.ELEMENT_NODE ? Z.closest('[data-type="variable"][data-multi-key]') : Z.parentElement?.closest('[data-type="variable"][data-multi-key]');
1893
- if (oe) {
1894
- const F = oe.dataset.key;
1895
- if (F) {
1896
- const ee = document.createRange();
1897
- ee.setStartBefore(oe), ee.setEnd(V.startContainer, V.startOffset);
1898
- const se = ee.toString().length;
1899
- K.current = { key: F, offset: se };
2260
+ if (B && B.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && V < C) {
2261
+ const oe = window.getSelection();
2262
+ if (oe && oe.rangeCount > 0) {
2263
+ const O = oe.getRangeAt(0), le = O.startContainer, me = le.nodeType === Node.ELEMENT_NODE ? le.closest('[data-type="variable"][data-multi-key]') : le.parentElement?.closest('[data-type="variable"][data-multi-key]');
2264
+ if (me) {
2265
+ const J = me.dataset.key;
2266
+ if (J) {
2267
+ const ie = document.createRange();
2268
+ ie.setStartBefore(me), ie.setEnd(O.startContainer, O.startOffset);
2269
+ const ge = ie.toString().length;
2270
+ U.current = { key: J, offset: ge };
1900
2271
  }
1901
2272
  }
1902
2273
  }
1903
- N((V) => ({
1904
- ...V,
1905
- [f.key]: S + 1
2274
+ i((O) => ({
2275
+ ...O,
2276
+ [m.key]: V + 1
1906
2277
  }));
1907
2278
  }
1908
2279
  }
1909
2280
  });
1910
2281
  };
1911
- Re(() => {
1912
- const p = n.current;
1913
- if (!p) return;
1914
- const f = /* @__PURE__ */ new Map(), v = (q) => {
1915
- const w = q.target, B = q.relatedTarget;
1916
- !w || !n.current || !n.current.contains(w) || B && n.current.contains(B) || setTimeout(() => {
2282
+ ze(() => {
2283
+ const h = n.current;
2284
+ if (!h) return;
2285
+ const m = /* @__PURE__ */ new Map(), C = (I) => {
2286
+ const A = I.target, G = I.relatedTarget;
2287
+ !A || !n.current || !n.current.contains(A) || G && n.current.contains(G) || setTimeout(() => {
1917
2288
  if (n.current) {
1918
2289
  if (t.length === 0) {
1919
- const $ = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
1920
- D($.length > 0);
2290
+ const D = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
2291
+ F(D.length > 0);
1921
2292
  return;
1922
2293
  }
1923
- Ve(n), Te(n, t, r), $e(n, t, r, D);
2294
+ Ve(n), Be(n, t, a), Pe(n, t, a, F);
1924
2295
  }
1925
2296
  }, 0);
1926
2297
  };
1927
- p.addEventListener("blur", v, !0);
1928
- const S = () => {
2298
+ h.addEventListener("blur", C, !0);
2299
+ const V = () => {
1929
2300
  if (!n.current) return;
1930
- f.forEach((B, $) => {
1931
- $.removeEventListener("blur", B, !1);
1932
- }), f.clear();
1933
- const q = n.current.querySelectorAll(
2301
+ m.forEach((G, D) => {
2302
+ D.removeEventListener("blur", G, !1);
2303
+ }), m.clear();
2304
+ const I = n.current.querySelectorAll(
1934
2305
  '[data-type="variable"][data-multi-key]'
1935
- ), w = (B) => {
1936
- B.stopPropagation(), B.stopImmediatePropagation();
1937
- const $ = B.target;
1938
- if (!$ || !n.current || !n.current.contains($))
2306
+ ), A = (G) => {
2307
+ G.stopPropagation(), G.stopImmediatePropagation();
2308
+ const D = G.target;
2309
+ if (!D || !n.current || !n.current.contains(D))
1939
2310
  return;
1940
- const P = $.closest('[data-type="variable"][data-multi-key]');
1941
- if (!P || !n.current.contains(P))
2311
+ const j = D.closest('[data-type="variable"][data-multi-key]');
2312
+ if (!j || !n.current.contains(j))
1942
2313
  return;
1943
- let z = !1;
1944
- if (f.forEach((ee, se) => {
1945
- (se === P || se.contains($)) && (z = !0);
1946
- }), !z)
2314
+ let Y = !1;
2315
+ if (m.forEach((ie, ge) => {
2316
+ (ge === j || ge.contains(D)) && (Y = !0);
2317
+ }), !Y)
1947
2318
  return;
1948
- const I = P.dataset.multiKey, R = P.dataset.key, J = P.dataset.index;
1949
- if (!I || !R || J === void 0) return;
1950
- const V = B.relatedTarget;
1951
- if (!(!V || !n.current.contains(V)))
2319
+ const B = j.dataset.multiKey, K = j.dataset.key, oe = j.dataset.index;
2320
+ if (!B || !K || oe === void 0) return;
2321
+ const O = G.relatedTarget;
2322
+ if (!(!O || !n.current.contains(O)))
1952
2323
  return;
1953
- const oe = P.innerText.replace(/[\u200B\n]/g, "").trim();
2324
+ const me = j.innerText.replace(/[\u200B\n]/g, "").trim();
1954
2325
  console.log("[Blur Event] 失去焦点的 multi-variable 输入框:", {
1955
- multiKey: I,
1956
- currentKey: R,
1957
- index: J,
1958
- content: oe
2326
+ multiKey: B,
2327
+ currentKey: K,
2328
+ index: oe,
2329
+ content: me
1959
2330
  });
1960
- const F = /[、,,\s]+/;
1961
- if (F.test(oe)) {
1962
- const ee = oe.split(F).map((he) => he.trim()).filter((he) => he.length > 0);
1963
- console.log("[Blur Event] 拆分前的内容:", oe), console.log("[Blur Event] 拆分后的部分:", ee);
1964
- const pe = ee.slice(0, 9);
1965
- if (console.log("[Blur Event] 有效的部分(最多9个):", pe), pe.length > 1) {
1966
- const he = t.find((ke) => ke.type === "multi-variable" && ke.key === I);
1967
- if (he) {
1968
- const ke = te[I] || 1, De = parseInt(J, 10), Me = he.maxCount || 9, we = [];
1969
- for (let ie = 0; ie < ke; ie++) {
1970
- const ve = `${I}_${ie}`, Ee = n.current.querySelector(
1971
- `[data-type="variable"][data-key="${ve}"][data-multi-key="${I}"]`
2331
+ const J = /[、,,\s]+/;
2332
+ if (J.test(me)) {
2333
+ const ie = me.split(J).map((Te) => Te.trim()).filter((Te) => Te.length > 0);
2334
+ console.log("[Blur Event] 拆分前的内容:", me), console.log("[Blur Event] 拆分后的部分:", ie);
2335
+ const ke = ie.slice(0, 9);
2336
+ if (console.log("[Blur Event] 有效的部分(最多9个):", ke), ke.length > 1) {
2337
+ const Te = t.find((Se) => Se.type === "multi-variable" && Se.key === B);
2338
+ if (Te) {
2339
+ const Se = re[B] || 1, He = parseInt(oe, 10), Fe = Te.maxCount || 9, Ne = [];
2340
+ for (let ve = 0; ve < Se; ve++) {
2341
+ const qe = `${B}_${ve}`, Ae = n.current.querySelector(
2342
+ `[data-type="variable"][data-key="${qe}"][data-multi-key="${B}"]`
1972
2343
  );
1973
- if (Ee) {
1974
- const qe = Ee.innerText.replace(/[\u200B\n]/g, "").trim();
1975
- we.push(qe);
2344
+ if (Ae) {
2345
+ const Le = Ae.innerText.replace(/[\u200B\n]/g, "").trim();
2346
+ Ne.push(Le);
1976
2347
  }
1977
2348
  }
1978
- console.log("[Blur Event] 拆分前的所有值:", we), console.log("[Blur Event] 当前索引:", De), console.log("[Blur Event] 要插入的值:", pe), we.splice(De, 1, ...pe);
1979
- const fe = we.slice(0, Me);
1980
- console.log("[Blur Event] 拆分后的所有值:", fe), fe.length > 0 && fe[fe.length - 1] !== "" && fe.length < Me && fe.push("");
1981
- const Ke = Math.max(fe.length, 1), Ie = {};
1982
- fe.forEach((ie, ve) => {
1983
- ie && (Ie[`${I}_${ve}`] = ie);
2349
+ console.log("[Blur Event] 拆分前的所有值:", Ne), console.log("[Blur Event] 当前索引:", He), console.log("[Blur Event] 要插入的值:", ke), Ne.splice(He, 1, ...ke);
2350
+ const Ee = Ne.slice(0, Fe);
2351
+ console.log("[Blur Event] 拆分后的所有值:", Ee), Ee.length > 0 && Ee[Ee.length - 1] !== "" && Ee.length < Fe && Ee.push("");
2352
+ const Qe = Math.max(Ee.length, 1), Me = {};
2353
+ Ee.forEach((ve, qe) => {
2354
+ ve && (Me[`${B}_${qe}`] = ve);
1984
2355
  }), n.current.querySelectorAll(
1985
2356
  '[data-type="variable"]'
1986
- ).forEach((ie) => {
1987
- const ve = ie.dataset.key, Ee = ie.dataset.multiKey;
1988
- if (ve && Ee !== I) {
1989
- const qe = ie.innerText.replace(/[\u200B\n]/g, "").trim();
1990
- qe && (Ie[ve] = qe);
2357
+ ).forEach((ve) => {
2358
+ const qe = ve.dataset.key, Ae = ve.dataset.multiKey;
2359
+ if (qe && Ae !== B) {
2360
+ const Le = ve.innerText.replace(/[\u200B\n]/g, "").trim();
2361
+ Le && (Me[qe] = Le);
1991
2362
  }
1992
- }), n.current.__tempVariableValues = Ie, N((ie) => ({
1993
- ...ie,
1994
- [I]: Ke
2363
+ }), n.current.__tempVariableValues = Me, i((ve) => ({
2364
+ ...ve,
2365
+ [B]: Qe
1995
2366
  }));
1996
2367
  }
1997
2368
  }
1998
2369
  }
1999
2370
  };
2000
- q.forEach((B) => {
2001
- B.addEventListener("blur", w, !1), f.set(B, w);
2371
+ I.forEach((G) => {
2372
+ G.addEventListener("blur", A, !1), m.set(G, A);
2002
2373
  });
2003
- }, b = setTimeout(() => {
2004
- S();
2374
+ }, N = setTimeout(() => {
2375
+ V();
2005
2376
  }, 0);
2006
2377
  return () => {
2007
- clearTimeout(b), p.removeEventListener("blur", v, !0), f.forEach((q, w) => {
2008
- w.removeEventListener("blur", q, !1);
2009
- }), f.clear();
2378
+ clearTimeout(N), h.removeEventListener("blur", C, !0), m.forEach((I, A) => {
2379
+ A.removeEventListener("blur", I, !1);
2380
+ }), m.clear();
2010
2381
  };
2011
- }, [t, te, r]);
2012
- const be = (p) => {
2013
- if (i) {
2014
- p.preventDefault();
2382
+ }, [t, re, a]);
2383
+ const xe = (h) => {
2384
+ if (l) {
2385
+ h.preventDefault();
2015
2386
  return;
2016
2387
  }
2017
- const f = window.getSelection();
2018
- if (f && f.rangeCount > 0) {
2019
- const v = f.anchorNode;
2020
- let S = null;
2021
- if (v && (v.nodeType === Node.ELEMENT_NODE ? S = v.closest('[data-type="text"]') : v.nodeType === Node.TEXT_NODE && v.parentElement && (S = v.parentElement.closest('[data-type="text"]'))), S) {
2022
- if (p.preventDefault(), p.stopPropagation(), n.current) {
2023
- const b = n.current.querySelector(
2388
+ const m = window.getSelection();
2389
+ if (m && m.rangeCount > 0) {
2390
+ const C = m.anchorNode;
2391
+ let V = null;
2392
+ if (C && (C.nodeType === Node.ELEMENT_NODE ? V = C.closest('[data-type="text"]') : C.nodeType === Node.TEXT_NODE && C.parentElement && (V = C.parentElement.closest('[data-type="text"]'))), V) {
2393
+ if (h.preventDefault(), h.stopPropagation(), n.current) {
2394
+ const N = n.current.querySelector(
2024
2395
  '[data-type="variable"], [data-type="upload"]'
2025
2396
  );
2026
- b && b.focus();
2397
+ N && N.focus();
2027
2398
  }
2028
2399
  return;
2029
2400
  }
2030
2401
  }
2031
- if (k && f && f.rangeCount > 0) {
2032
- const v = f.anchorNode;
2033
- let S = null;
2034
- if (v && (v.nodeType === Node.ELEMENT_NODE ? S = v.closest(".tag-node") : v.nodeType === Node.TEXT_NODE && v.parentElement && (S = v.parentElement.closest(".tag-node"))), S) {
2035
- if (p.preventDefault(), p.stopPropagation(), n.current) {
2036
- const b = n.current.querySelector(
2402
+ if (T && m && m.rangeCount > 0) {
2403
+ const C = m.anchorNode;
2404
+ let V = null;
2405
+ if (C && (C.nodeType === Node.ELEMENT_NODE ? V = C.closest(".tag-node") : C.nodeType === Node.TEXT_NODE && C.parentElement && (V = C.parentElement.closest(".tag-node"))), V) {
2406
+ if (h.preventDefault(), h.stopPropagation(), n.current) {
2407
+ const N = n.current.querySelector(
2037
2408
  '[data-type="variable"], [data-type="upload"]'
2038
2409
  );
2039
- b && b.focus();
2410
+ N && N.focus();
2040
2411
  }
2041
2412
  return;
2042
2413
  }
2043
2414
  }
2044
- if (p.key === "Enter" && !p.shiftKey && (p.preventDefault(), Pe()), p.key === "Escape" && n.current) {
2045
- if (k) {
2046
- p.preventDefault();
2415
+ if (h.key === "Enter" && !h.shiftKey && (h.preventDefault(), we()), h.key === "Escape" && n.current) {
2416
+ if (T) {
2417
+ h.preventDefault();
2047
2418
  return;
2048
2419
  }
2049
2420
  n.current.innerHTML = "", n.current.focus();
2050
2421
  }
2051
- if (p.key === "Backspace") {
2052
- const v = window.getSelection();
2053
- if (v && v.rangeCount > 0) {
2054
- const S = v.getRangeAt(0), b = v.anchorNode;
2055
- if (k) {
2056
- let w = null, B = null;
2057
- if (b && (b.nodeType === Node.ELEMENT_NODE ? (w = b.closest(".tag-node"), B = b.closest('[data-type="text"]')) : b.nodeType === Node.TEXT_NODE && b.parentElement && (w = b.parentElement.closest(".tag-node"), B = b.parentElement.closest('[data-type="text"]'))), (w || B) && S.collapsed && S.startOffset === 0) {
2058
- p.preventDefault();
2422
+ if (h.key === "Backspace") {
2423
+ const C = window.getSelection();
2424
+ if (C && C.rangeCount > 0) {
2425
+ const V = C.getRangeAt(0), N = C.anchorNode;
2426
+ if (T) {
2427
+ let A = null, G = null;
2428
+ if (N && (N.nodeType === Node.ELEMENT_NODE ? (A = N.closest(".tag-node"), G = N.closest('[data-type="text"]')) : N.nodeType === Node.TEXT_NODE && N.parentElement && (A = N.parentElement.closest(".tag-node"), G = N.parentElement.closest('[data-type="text"]'))), (A || G) && V.collapsed && V.startOffset === 0) {
2429
+ h.preventDefault();
2059
2430
  return;
2060
2431
  }
2061
2432
  }
2062
- let q = null;
2063
- if (b && (b.nodeType === Node.ELEMENT_NODE ? q = b.closest(
2433
+ let I = null;
2434
+ if (N && (N.nodeType === Node.ELEMENT_NODE ? I = N.closest(
2064
2435
  '[data-type="variable"]'
2065
- ) : b.nodeType === Node.TEXT_NODE && b.parentElement && (q = b.parentElement.closest(
2436
+ ) : N.nodeType === Node.TEXT_NODE && N.parentElement && (I = N.parentElement.closest(
2066
2437
  '[data-type="variable"]'
2067
- ))), q) {
2068
- if (!S.collapsed)
2438
+ ))), I) {
2439
+ if (!V.collapsed)
2069
2440
  return;
2070
- const w = q.innerText;
2071
- if (w === "​" || w === "") {
2072
- p.preventDefault();
2441
+ const A = I.innerText;
2442
+ if (A === "​" || A === "") {
2443
+ h.preventDefault();
2073
2444
  return;
2074
2445
  }
2075
- if (S.startOffset === 0) {
2076
- p.preventDefault();
2446
+ if (V.startOffset === 0) {
2447
+ h.preventDefault();
2077
2448
  return;
2078
2449
  }
2079
- if (w.startsWith("​") && S.startOffset === 1) {
2080
- p.preventDefault();
2450
+ if (A.startsWith("​") && V.startOffset === 1) {
2451
+ h.preventDefault();
2081
2452
  return;
2082
2453
  }
2083
2454
  }
2084
2455
  }
2085
2456
  }
2086
- }, Pe = () => {
2087
- if (u || i || e || !H || !n.current) return;
2457
+ }, we = () => {
2458
+ if (p || l || e || !H || !n.current) return;
2088
2459
  if (t.length === 0) {
2089
- const q = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
2090
- if (!q) return;
2091
- y(q, q);
2460
+ const I = n.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
2461
+ if (!I) return;
2462
+ b(I, I);
2092
2463
  return;
2093
2464
  }
2094
- const p = n.current;
2095
- let f = "";
2096
- const v = {}, S = (q) => {
2097
- if (!(q.nodeType === Node.ELEMENT_NODE && q.style.display === "none")) {
2098
- if (q.nodeType === Node.TEXT_NODE)
2099
- f += (q.textContent || "").replace(/\u200B/g, "");
2100
- else if (q.nodeType === Node.ELEMENT_NODE) {
2101
- const w = q, B = w.dataset.type, $ = w.dataset.key;
2102
- if (B === "variable" && $) {
2103
- let P = "";
2104
- const z = document.createTreeWalker(
2105
- w,
2465
+ const h = n.current;
2466
+ let m = "";
2467
+ const C = {}, V = (I) => {
2468
+ if (!(I.nodeType === Node.ELEMENT_NODE && I.style.display === "none")) {
2469
+ if (I.nodeType === Node.TEXT_NODE)
2470
+ m += (I.textContent || "").replace(/\u200B/g, "");
2471
+ else if (I.nodeType === Node.ELEMENT_NODE) {
2472
+ const A = I, G = A.dataset.type, D = A.dataset.key;
2473
+ if (G === "variable" && D) {
2474
+ let j = "";
2475
+ const Y = document.createTreeWalker(
2476
+ A,
2106
2477
  NodeFilter.SHOW_TEXT,
2107
2478
  {
2108
- acceptNode: (R) => {
2109
- const J = w.querySelector(".variable-info-icon");
2110
- return J && J.contains(R) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
2479
+ acceptNode: (K) => {
2480
+ const oe = A.querySelector(".variable-info-icon");
2481
+ return oe && oe.contains(K) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
2111
2482
  }
2112
2483
  }
2113
2484
  );
2114
- for (; z.nextNode(); )
2115
- P += z.currentNode.textContent || "";
2116
- const I = P.replace(/[\u200B\n]/g, "").trim();
2117
- if (I) {
2118
- const R = w.dataset.multiKey;
2119
- if (R) {
2120
- (!v[R] || !Array.isArray(v[R])) && (v[R] = []);
2121
- const J = v[R];
2122
- J.push(I), J.length > 1 && (f += " "), f += I;
2485
+ for (; Y.nextNode(); )
2486
+ j += Y.currentNode.textContent || "";
2487
+ const B = j.replace(/[\u200B\n]/g, "").trim();
2488
+ if (B) {
2489
+ const K = A.dataset.multiKey;
2490
+ if (K) {
2491
+ (!C[K] || !Array.isArray(C[K])) && (C[K] = []);
2492
+ const oe = C[K];
2493
+ oe.push(B), oe.length > 1 && (m += " "), m += B;
2123
2494
  } else
2124
- v[$] = I, f += I;
2495
+ C[D] = B, m += B;
2125
2496
  }
2126
- } else if (B === "select" && $) {
2127
- const P = w, z = (P.value || "").trim();
2128
- if (z) {
2129
- v[$] = z;
2130
- const I = P.selectedOptions?.[0];
2131
- f += I?.textContent || z;
2497
+ } else if (G === "select" && D) {
2498
+ const j = A, Y = (j.value || "").trim();
2499
+ if (Y) {
2500
+ C[D] = Y;
2501
+ const B = j.selectedOptions?.[0];
2502
+ m += B?.textContent || Y;
2132
2503
  }
2133
- } else if (B === "textarea" && $) {
2134
- const z = (w.value || "").replace(/\u200B/g, "").trim();
2135
- z && (v[$] = z, f += z);
2136
- } else if (B === "richtext" && $) {
2137
- const z = (w.textContent || "").replace(/\u200B/g, "").trim();
2138
- z && (v[$] = z, f += z);
2139
- } else if (B === "datepicker" && $) {
2140
- const z = (w.getAttribute("data-value") || "").trim();
2141
- z && (v[$] = z, f += z);
2142
- } else if (B === "upload" && $)
2143
- v[$] = r[$] ?? null, r[$] && (f += ` [附带文件: ${r[$]?.name}] `);
2504
+ } else if (G === "textarea" && D) {
2505
+ const Y = (A.value || "").replace(/\u200B/g, "").trim();
2506
+ Y && (C[D] = Y, m += Y);
2507
+ } else if (G === "richtext" && D) {
2508
+ const Y = (A.textContent || "").replace(/\u200B/g, "").trim();
2509
+ Y && (C[D] = Y, m += Y);
2510
+ } else if (G === "datepicker" && D) {
2511
+ const Y = (A.getAttribute("data-value") || "").trim();
2512
+ if (Y)
2513
+ if (Y.includes(",")) {
2514
+ const B = Y.split(",");
2515
+ B.length === 2 ? (C[D] = B, m += `[${B[0]}, ${B[1]}]`) : (C[D] = Y, m += Y);
2516
+ } else
2517
+ C[D] = Y, m += Y;
2518
+ } else if (G === "upload" && D)
2519
+ C[D] = a[D] ?? null, a[D] && (m += ` [附带文件: ${a[D]?.name}] `);
2144
2520
  else {
2145
- if (w.classList.contains("tag-close-btn") || w.classList.contains("file-remove-btn")) return;
2146
- w.getAttribute("contenteditable") === "false" && !B && w.classList.contains("tag-node") ? f += w.innerText : w.childNodes.forEach(S);
2521
+ if (A.classList.contains("tag-close-btn") || A.classList.contains("file-remove-btn")) return;
2522
+ A.getAttribute("contenteditable") === "false" && !G && A.classList.contains("tag-node") ? m += A.innerText : A.childNodes.forEach(V);
2147
2523
  }
2148
2524
  }
2149
2525
  }
2150
2526
  };
2151
- if (p.childNodes.forEach(S), f = f.trim(), !f) return;
2152
- const b = new FormData();
2153
- b.append("fullPrompt", f), Object.keys(v).forEach((q) => {
2154
- const w = v[q];
2155
- w != null && (w instanceof File ? b.append(q, w) : Array.isArray(w) ? t.some(
2156
- ($) => $.type === "multi-variable" && $.key === q
2157
- ) ? w.forEach(($) => {
2158
- $ != null && $ !== "" && b.append(q, String($));
2159
- }) : w.forEach(($, P) => {
2160
- $ != null && ($ instanceof File ? b.append(`${q}[${P}]`, $) : typeof $ == "string" ? b.append(`${q}[${P}]`, $) : b.append(`${q}[${P}]`, String($)));
2161
- }) : typeof w == "string" ? b.append(q, w) : b.append(q, String(w)));
2162
- }), y(b, f);
2163
- }, je = {
2164
- ...c ? { width: typeof c == "number" ? `${c}px` : c } : {},
2165
- ...g ? { border: g } : {},
2166
- ...l ? { background: l } : {}
2527
+ if (h.childNodes.forEach(V), m = m.trim(), !m) return;
2528
+ const N = new FormData();
2529
+ N.append("fullPrompt", m), Object.keys(C).forEach((I) => {
2530
+ const A = C[I];
2531
+ A != null && (A instanceof File ? N.append(I, A) : Array.isArray(A) ? t.some(
2532
+ (D) => D.type === "multi-variable" && D.key === I
2533
+ ) ? A.forEach((D) => {
2534
+ D != null && D !== "" && N.append(I, String(D));
2535
+ }) : A.forEach((D, j) => {
2536
+ D != null && (D instanceof File ? N.append(`${I}[${j}]`, D) : typeof D == "string" ? N.append(`${I}[${j}]`, D) : N.append(`${I}[${j}]`, String(D)));
2537
+ }) : typeof A == "string" ? N.append(I, A) : N.append(I, String(A)));
2538
+ }), b(N, m);
2539
+ }, Ce = {
2540
+ ...f ? { width: typeof f == "number" ? `${f}px` : f } : {},
2541
+ ...y ? { border: y } : {},
2542
+ ...s ? { background: s } : {}
2167
2543
  };
2168
- return /* @__PURE__ */ W(
2544
+ return /* @__PURE__ */ Z(
2169
2545
  "div",
2170
2546
  {
2171
2547
  className: "rich-text-editor",
2172
- style: je,
2173
- "data-disabled": i,
2548
+ style: Ce,
2549
+ "data-disabled": l,
2174
2550
  children: [
2175
- /* @__PURE__ */ m(
2551
+ /* @__PURE__ */ E(
2176
2552
  "div",
2177
2553
  {
2178
2554
  ref: n,
2179
- className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${Q && A ? "rte-editor-empty" : ""}`,
2555
+ className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${R && q ? "rte-editor-empty" : ""}`,
2180
2556
  contentEditable: t.length === 0,
2181
2557
  suppressContentEditableWarning: !0,
2182
- "data-placeholder": A,
2183
- onMouseDown: Ae,
2184
- onMouseMove: me,
2185
- onMouseUp: Le,
2186
- onClick: O,
2187
- onDoubleClick: le,
2188
- onInput: de,
2189
- onKeyDown: be,
2190
- onPaste: Ne
2558
+ "data-placeholder": q,
2559
+ onMouseDown: fe,
2560
+ onMouseMove: be,
2561
+ onMouseUp: X,
2562
+ onClick: ue,
2563
+ onDoubleClick: he,
2564
+ onInput: ye,
2565
+ onKeyDown: xe,
2566
+ onPaste: se
2191
2567
  }
2192
2568
  ),
2193
- /* @__PURE__ */ m(
2569
+ /* @__PURE__ */ E(
2194
2570
  "input",
2195
2571
  {
2196
2572
  type: "file",
2197
2573
  ref: o,
2198
2574
  className: "rte-file-input",
2199
2575
  accept: ".csv,.xlsx,.xls,.txt,.pdf,image/*",
2200
- onChange: Se
2576
+ onChange: ce
2201
2577
  }
2202
2578
  ),
2203
- /* @__PURE__ */ W("div", { className: "rich-text-editor-footer", children: [
2204
- /* @__PURE__ */ m("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ W("div", { className: "rich-text-editor-brand", children: [
2205
- /* @__PURE__ */ W("div", { className: "rte-brand-badge", children: [
2206
- /* @__PURE__ */ m("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
2207
- /* @__PURE__ */ m("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
2579
+ /* @__PURE__ */ Z("div", { className: "rich-text-editor-footer", children: [
2580
+ /* @__PURE__ */ E("div", { className: "rich-text-editor-footer-left", children: /* @__PURE__ */ Z("div", { className: "rich-text-editor-brand", children: [
2581
+ /* @__PURE__ */ Z("div", { className: "rte-brand-badge", children: [
2582
+ /* @__PURE__ */ E("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
2583
+ /* @__PURE__ */ E("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
2208
2584
  ] }),
2209
- a !== "hideAgent" && /* @__PURE__ */ m(
2210
- Ze,
2585
+ r !== "hideAgent" && /* @__PURE__ */ E(
2586
+ ot,
2211
2587
  {
2212
2588
  placement: "top",
2213
2589
  menu: {
2214
- items: L.map((p) => ({
2215
- key: p.key,
2216
- label: /* @__PURE__ */ W("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2217
- p.icon && /* @__PURE__ */ m("i", { className: p.icon }),
2218
- /* @__PURE__ */ m("span", { children: p.label })
2590
+ items: M.map((h) => ({
2591
+ key: h.key,
2592
+ label: /* @__PURE__ */ Z("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2593
+ h.icon && /* @__PURE__ */ E("i", { className: h.icon }),
2594
+ /* @__PURE__ */ E("span", { children: h.label })
2219
2595
  ] }),
2220
2596
  onClick: () => {
2221
- E?.(p);
2597
+ $?.(h);
2222
2598
  }
2223
2599
  }))
2224
2600
  },
2225
2601
  trigger: ["click"],
2226
- disabled: i || u,
2227
- children: /* @__PURE__ */ W("div", { className: "rte-agent-badge", style: { cursor: L.length > 0 ? "pointer" : "default" }, children: [
2228
- /* @__PURE__ */ m("i", { className: "iconfont icon-zhinengti" }),
2229
- /* @__PURE__ */ m("span", { className: "rte-agent-text", children: "智能体" })
2602
+ disabled: l || p,
2603
+ children: /* @__PURE__ */ Z("div", { className: "rte-agent-badge", style: { cursor: M.length > 0 ? "pointer" : "default" }, children: [
2604
+ /* @__PURE__ */ E("i", { className: "iconfont icon-zhinengti" }),
2605
+ /* @__PURE__ */ E("span", { className: "rte-agent-text", children: "智能体" })
2230
2606
  ] })
2231
2607
  }
2232
2608
  )
2233
2609
  ] }) }),
2234
- /* @__PURE__ */ W("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2610
+ /* @__PURE__ */ Z("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2235
2611
  (() => {
2236
- const p = t.find((v) => v.type === "tag");
2237
- if (!p || !p.text) return null;
2238
- const f = L.find((v) => v.label === p.text);
2239
- return !f || f.points === void 0 || f.points === null ? null : /* @__PURE__ */ W("div", { className: "rte-points-badge", children: [
2240
- /* @__PURE__ */ m("i", { className: "iconfont icon-jifen", style: { marginRight: "4px" } }),
2241
- /* @__PURE__ */ W("span", { style: { fontSize: "16px" }, children: [
2612
+ const h = t.find((C) => C.type === "tag");
2613
+ if (!h || !h.text) return null;
2614
+ const m = M.find((C) => C.label === h.text);
2615
+ return !m || m.points === void 0 || m.points === null ? null : /* @__PURE__ */ Z("div", { className: "rte-points-badge", children: [
2616
+ /* @__PURE__ */ E("i", { className: "iconfont icon-jifen", style: { marginRight: "4px" } }),
2617
+ /* @__PURE__ */ Z("span", { style: { fontSize: "16px" }, children: [
2242
2618
  "-",
2243
- String(f.points)
2619
+ String(m.points)
2244
2620
  ] })
2245
2621
  ] });
2246
2622
  })(),
2247
- /* @__PURE__ */ m(
2623
+ /* @__PURE__ */ E(
2248
2624
  "button",
2249
2625
  {
2250
2626
  type: "button",
2251
- onClick: Pe,
2252
- disabled: u || i || e || !H,
2627
+ onClick: we,
2628
+ disabled: p || l || e || !H,
2253
2629
  className: "rich-text-editor-send-button",
2254
- children: u || e ? /* @__PURE__ */ m("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ m("i", { className: "iconfont icon-fasong" })
2630
+ children: p || e ? /* @__PURE__ */ E("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ E("i", { className: "iconfont icon-fasong" })
2255
2631
  }
2256
2632
  )
2257
2633
  ] })
2258
2634
  ] }),
2259
- x?.anchorEl && (() => {
2260
- if (!document.body.contains(x.anchorEl))
2635
+ v?.anchorEl && (() => {
2636
+ if (!document.body.contains(v.anchorEl))
2261
2637
  return null;
2262
- let p = "", f = {
2638
+ let h = "", m = {
2263
2639
  background: "var(--neutral-800, #262626)"
2264
2640
  };
2265
- if (x.type === "upload")
2266
- p = t.find(
2267
- (b) => b.type === "upload" && b.key === x.key
2641
+ if (v.type === "upload")
2642
+ h = t.find(
2643
+ (N) => N.type === "upload" && N.key === v.key
2268
2644
  )?.tooltip || "";
2269
- else if (x.type === "tag")
2270
- p = x.anchorEl.dataset.tooltip || "";
2271
- else if (x.type === "upload-label")
2272
- p = x.anchorEl.dataset.fileName || "";
2273
- else if (x.type === "variable")
2274
- p = x.anchorEl.dataset.tooltip || "";
2275
- else if (x.type === "upload-preview") {
2276
- const S = r[x.key];
2277
- if (S && S.type && S.type.startsWith("image/")) {
2278
- const b = URL.createObjectURL(S);
2279
- p = /* @__PURE__ */ m("div", { style: { width: 120, height: 120, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ m("img", { src: b, style: { maxWidth: 120, maxHeight: 120, objectFit: "contain" } }) }), f = {
2645
+ else if (v.type === "tag")
2646
+ h = v.anchorEl.dataset.tooltip || "";
2647
+ else if (v.type === "upload-label")
2648
+ h = v.anchorEl.dataset.fileName || "";
2649
+ else if (v.type === "variable")
2650
+ h = v.anchorEl.dataset.tooltip || "";
2651
+ else if (v.type === "upload-preview") {
2652
+ const V = a[v.key];
2653
+ if (V && V.type && V.type.startsWith("image/")) {
2654
+ const N = URL.createObjectURL(V);
2655
+ h = /* @__PURE__ */ E("div", { style: { width: 120, height: 120, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ E("img", { src: N, style: { maxWidth: 120, maxHeight: 120, objectFit: "contain" } }) }), m = {
2280
2656
  background: "#fff",
2281
2657
  padding: 4
2282
- }, setTimeout(() => URL.revokeObjectURL(b), 1e3);
2658
+ }, setTimeout(() => URL.revokeObjectURL(N), 1e3);
2283
2659
  } else
2284
- p = "";
2660
+ h = "";
2285
2661
  }
2286
- if (!p) return null;
2287
- const v = x.type === "upload-preview" ? "#0A0A0A" : "#fff";
2288
- return pt(
2289
- /* @__PURE__ */ m(
2290
- et,
2662
+ if (!h) return null;
2663
+ const C = v.type === "upload-preview" ? "#0A0A0A" : "#fff";
2664
+ return Xe(
2665
+ /* @__PURE__ */ E(
2666
+ st,
2291
2667
  {
2292
2668
  arrow: !1,
2293
- title: /* @__PURE__ */ m("div", { style: { maxWidth: "200px", fontSize: "12px", color: v }, children: p }),
2669
+ title: /* @__PURE__ */ E("div", { style: { maxWidth: "200px", fontSize: "12px", color: C }, children: h }),
2294
2670
  open: !0,
2295
2671
  placement: "top",
2296
2672
  getPopupContainer: () => document.body,
2297
- overlayInnerStyle: f,
2298
- children: /* @__PURE__ */ m(
2673
+ overlayInnerStyle: m,
2674
+ children: /* @__PURE__ */ E(
2299
2675
  "div",
2300
2676
  {
2301
2677
  style: {
2302
2678
  position: "fixed",
2303
- left: `${x.anchorEl.getBoundingClientRect().left}px`,
2304
- top: `${x.anchorEl.getBoundingClientRect().top}px`,
2305
- width: `${x.anchorEl.offsetWidth}px`,
2306
- height: `${x.anchorEl.offsetHeight}px`,
2679
+ left: `${v.anchorEl.getBoundingClientRect().left}px`,
2680
+ top: `${v.anchorEl.getBoundingClientRect().top}px`,
2681
+ width: `${v.anchorEl.offsetWidth}px`,
2682
+ height: `${v.anchorEl.offsetHeight}px`,
2307
2683
  pointerEvents: "none"
2308
2684
  }
2309
2685
  }
@@ -2312,12 +2688,13 @@ const It = ({
2312
2688
  ),
2313
2689
  document.body
2314
2690
  );
2315
- })()
2691
+ })(),
2692
+ te
2316
2693
  ]
2317
2694
  }
2318
2695
  );
2319
2696
  };
2320
- It.__docgenInfo = {
2697
+ zt.__docgenInfo = {
2321
2698
  displayName: "RichTextEditor",
2322
2699
  description: "结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",
2323
2700
  props: {
@@ -2345,43 +2722,43 @@ It.__docgenInfo = {
2345
2722
  }
2346
2723
  }
2347
2724
  };
2348
- const ze = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==", Vt = [
2725
+ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==", Wt = [
2349
2726
  { label: "5页", value: 5 },
2350
2727
  { label: "10页", value: 10 },
2351
2728
  { label: "15页", value: 15 },
2352
2729
  { label: "30页", value: 30 }
2353
- ], Bt = ({
2730
+ ], jt = ({
2354
2731
  autoLoading: t,
2355
- batchSize: y,
2356
- loadingProgress: u,
2357
- loadIcon: i,
2358
- onBatchSizeChange: c,
2359
- onLoadNextPage: k,
2360
- onStartAutoLoad: L,
2361
- onStopLoad: E
2362
- }) => t && u ? /* @__PURE__ */ W("div", { className: "auto_load_progress", children: [
2363
- i || /* @__PURE__ */ m("img", { src: ze, alt: "自动加载", width: 14, height: 14 }),
2364
- /* @__PURE__ */ W("span", { children: [
2732
+ batchSize: b,
2733
+ loadingProgress: p,
2734
+ loadIcon: l,
2735
+ onBatchSizeChange: f,
2736
+ onLoadNextPage: T,
2737
+ onStartAutoLoad: M,
2738
+ onStopLoad: $
2739
+ }) => t && p ? /* @__PURE__ */ Z("div", { className: "auto_load_progress", children: [
2740
+ l || /* @__PURE__ */ E("img", { src: Ue, alt: "自动加载", width: 14, height: 14 }),
2741
+ /* @__PURE__ */ Z("span", { children: [
2365
2742
  "正在加载第",
2366
- u.currentPage,
2743
+ p.currentPage,
2367
2744
  "/",
2368
- u.totalPages,
2745
+ p.totalPages,
2369
2746
  "页"
2370
2747
  ] }),
2371
- /* @__PURE__ */ m(
2372
- tt,
2748
+ /* @__PURE__ */ E(
2749
+ lt,
2373
2750
  {
2374
- percent: u.percentage,
2751
+ percent: p.percentage,
2375
2752
  type: "line",
2376
2753
  size: [160, 8]
2377
2754
  }
2378
2755
  ),
2379
- /* @__PURE__ */ m("span", { onClick: E, className: "auto_load_stop_btn", children: "停止加载" })
2380
- ] }) : /* @__PURE__ */ W("div", { className: "auto_load_container", children: [
2381
- /* @__PURE__ */ m(
2756
+ /* @__PURE__ */ E("span", { onClick: $, className: "auto_load_stop_btn", children: "停止加载" })
2757
+ ] }) : /* @__PURE__ */ Z("div", { className: "auto_load_container", children: [
2758
+ /* @__PURE__ */ E(
2382
2759
  "div",
2383
2760
  {
2384
- onClick: k,
2761
+ onClick: T,
2385
2762
  className: "auto_load_next_btn",
2386
2763
  style: {
2387
2764
  backgroundColor: t ? "#f5f5f5" : "#2563eb"
@@ -2389,7 +2766,7 @@ const ze = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2389
2766
  children: "加载下一页"
2390
2767
  }
2391
2768
  ),
2392
- /* @__PURE__ */ W(
2769
+ /* @__PURE__ */ Z(
2393
2770
  "div",
2394
2771
  {
2395
2772
  className: "right_control_wrap",
@@ -2397,23 +2774,23 @@ const ze = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2397
2774
  backgroundColor: t ? "#f5f5f5" : "#2563eb"
2398
2775
  },
2399
2776
  children: [
2400
- /* @__PURE__ */ W(
2777
+ /* @__PURE__ */ Z(
2401
2778
  "div",
2402
2779
  {
2403
2780
  className: "auto_load_btn",
2404
- onClick: t ? void 0 : L,
2781
+ onClick: t ? void 0 : M,
2405
2782
  children: [
2406
- i || /* @__PURE__ */ m("img", { src: ze, alt: "自动加载", width: 14, height: 14 }),
2407
- /* @__PURE__ */ m("span", { children: "自动加载" })
2783
+ l || /* @__PURE__ */ E("img", { src: Ue, alt: "自动加载", width: 14, height: 14 }),
2784
+ /* @__PURE__ */ E("span", { children: "自动加载" })
2408
2785
  ]
2409
2786
  }
2410
2787
  ),
2411
- /* @__PURE__ */ m(
2788
+ /* @__PURE__ */ E(
2412
2789
  Ge,
2413
2790
  {
2414
- value: y,
2415
- onChange: c,
2416
- options: Vt,
2791
+ value: b,
2792
+ onChange: f,
2793
+ options: Wt,
2417
2794
  disabled: t,
2418
2795
  size: "small",
2419
2796
  className: "auto_load_select",
@@ -2423,80 +2800,80 @@ const ze = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2423
2800
  ]
2424
2801
  }
2425
2802
  )
2426
- ] }), _t = ({
2803
+ ] }), Ut = ({
2427
2804
  current: t,
2428
- loadIcon: y,
2429
- pageSize: u,
2430
- total: i,
2431
- cachedPages: c,
2432
- loadedCount: k,
2433
- autoLoading: L = !1,
2434
- loadingProgress: E,
2435
- onChange: C,
2805
+ loadIcon: b,
2806
+ pageSize: p,
2807
+ total: l,
2808
+ cachedPages: f,
2809
+ loadedCount: T,
2810
+ autoLoading: M = !1,
2811
+ loadingProgress: $,
2812
+ onChange: w,
2436
2813
  onLoadNextPage: e,
2437
- onStartAutoLoad: A,
2438
- onStopLoading: g
2814
+ onStartAutoLoad: q,
2815
+ onStopLoading: y
2439
2816
  }) => {
2440
- const [l, a] = X(5), n = Math.ceil(i / u), o = Oe(() => c.length >= n, [c, n]), r = () => Array.from(
2817
+ const [s, r] = ne(5), n = Math.ceil(l / p), o = Ye(() => f.length >= n, [f, n]), a = () => Array.from(
2441
2818
  { length: n },
2442
- (h, x) => x + 1
2443
- ).filter((h) => !c.includes(h)).slice(0, l);
2444
- return /* @__PURE__ */ W("div", { className: "pagination_footer", children: [
2445
- /* @__PURE__ */ W("div", { className: "pagination_leftWrap", children: [
2446
- /* @__PURE__ */ W("span", { className: "pagination_total", children: [
2447
- /* @__PURE__ */ m(
2448
- it,
2819
+ (x, v) => v + 1
2820
+ ).filter((x) => !f.includes(x)).slice(0, s);
2821
+ return /* @__PURE__ */ Z("div", { className: "pagination_footer", children: [
2822
+ /* @__PURE__ */ Z("div", { className: "pagination_leftWrap", children: [
2823
+ /* @__PURE__ */ Z("span", { className: "pagination_total", children: [
2824
+ /* @__PURE__ */ E(
2825
+ yt,
2449
2826
  {
2450
2827
  style: { color: "#2563EB", marginRight: "4px" }
2451
2828
  }
2452
2829
  ),
2453
2830
  "已加载: ",
2454
- k,
2831
+ T,
2455
2832
  "/",
2456
- i,
2833
+ l,
2457
2834
  "条数据"
2458
2835
  ] }),
2459
- !o && /* @__PURE__ */ m(
2460
- Bt,
2836
+ !o && /* @__PURE__ */ E(
2837
+ jt,
2461
2838
  {
2462
- loadIcon: y || void 0,
2463
- autoLoading: L,
2464
- batchSize: l,
2465
- loadingProgress: E,
2466
- disabled: !e || !A,
2467
- onBatchSizeChange: a,
2839
+ loadIcon: b || void 0,
2840
+ autoLoading: M,
2841
+ batchSize: s,
2842
+ loadingProgress: $,
2843
+ disabled: !e || !q,
2844
+ onBatchSizeChange: r,
2468
2845
  onLoadNextPage: () => e?.(),
2469
2846
  onStartAutoLoad: () => {
2470
- const d = r();
2471
- A?.(d);
2847
+ const d = a();
2848
+ q?.(d);
2472
2849
  },
2473
- onStopLoad: () => g?.()
2850
+ onStopLoad: () => y?.()
2474
2851
  }
2475
2852
  )
2476
2853
  ] }),
2477
- /* @__PURE__ */ m(
2478
- nt,
2854
+ /* @__PURE__ */ E(
2855
+ it,
2479
2856
  {
2480
2857
  current: t,
2481
- pageSize: u,
2482
- total: i,
2483
- onChange: (d) => C(d),
2858
+ pageSize: p,
2859
+ total: l,
2860
+ onChange: (d) => w(d),
2484
2861
  showSizeChanger: !1,
2485
2862
  showQuickJumper: !1,
2486
- showTotal: (d, h) => "",
2487
- itemRender: (d, h, x) => {
2488
- const G = c.includes(d);
2489
- return h === "prev" || h === "next" || h === "jump-prev" || h === "jump-next" ? /* @__PURE__ */ m("div", { className: "pageBox", children: x }) : /* @__PURE__ */ W(
2863
+ showTotal: (d, x) => "",
2864
+ itemRender: (d, x, v) => {
2865
+ const _ = f.includes(d);
2866
+ return x === "prev" || x === "next" || x === "jump-prev" || x === "jump-next" ? /* @__PURE__ */ E("div", { className: "pageBox", children: v }) : /* @__PURE__ */ Z(
2490
2867
  "div",
2491
2868
  {
2492
2869
  className: "pageBox",
2493
2870
  style: {
2494
2871
  backgroundColor: t === d ? "#2563EB" : "#f5f5f5",
2495
- color: t === d ? "#fff" : G ? "#171717" : "#a3a3a3"
2872
+ color: t === d ? "#fff" : _ ? "#171717" : "#a3a3a3"
2496
2873
  },
2497
2874
  children: [
2498
2875
  d,
2499
- !G && /* @__PURE__ */ m("span", { className: "unload_spot" })
2876
+ !_ && /* @__PURE__ */ E("span", { className: "unload_spot" })
2500
2877
  ]
2501
2878
  }
2502
2879
  );
@@ -2504,62 +2881,62 @@ const ze = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2504
2881
  }
2505
2882
  )
2506
2883
  ] });
2507
- }, Gt = (t) => {
2884
+ }, Yt = (t) => {
2508
2885
  const {
2509
- loading: y,
2510
- autoLoading: u,
2511
- loadingProgress: i,
2512
- columns: c = [],
2513
- dataSource: k = [],
2514
- total: L,
2515
- current: E,
2516
- pageSize: C,
2886
+ loading: b,
2887
+ autoLoading: p,
2888
+ loadingProgress: l,
2889
+ columns: f = [],
2890
+ dataSource: T = [],
2891
+ total: M,
2892
+ current: $,
2893
+ pageSize: w,
2517
2894
  cachedPages: e,
2518
- onChangePage: A,
2519
- onLoadNextPage: g,
2520
- onStartAutoLoad: l,
2521
- onStopLoading: a,
2895
+ onChangePage: q,
2896
+ onLoadNextPage: y,
2897
+ onStartAutoLoad: s,
2898
+ onStopLoading: r,
2522
2899
  ...n
2523
- } = t, o = j(null), r = U(
2524
- (s) => {
2525
- A(s), e.includes(s) && o.current?.scrollTo({
2526
- key: `${(s - 1) * C + 1}`
2900
+ } = t, o = Q(null), a = ae(
2901
+ (u) => {
2902
+ q(u), e.includes(u) && o.current?.scrollTo({
2903
+ key: `${(u - 1) * w + 1}`
2527
2904
  });
2528
2905
  },
2529
- [E]
2906
+ [$]
2530
2907
  );
2531
- return /* @__PURE__ */ W("div", { className: "flex flex-col", children: [
2532
- /* @__PURE__ */ m(
2533
- _e,
2908
+ return /* @__PURE__ */ Z("div", { className: "flex flex-col", children: [
2909
+ /* @__PURE__ */ E(
2910
+ Re,
2534
2911
  {
2535
2912
  ref: o,
2536
2913
  ...n,
2537
- columns: c,
2538
- dataSource: k,
2914
+ columns: f,
2915
+ dataSource: T,
2539
2916
  pagination: !1,
2540
2917
  virtual: !0
2541
2918
  }
2542
2919
  ),
2543
- /* @__PURE__ */ m(
2544
- _t,
2920
+ /* @__PURE__ */ E(
2921
+ Ut,
2545
2922
  {
2546
- loading: y,
2547
- autoLoading: u,
2548
- loadingProgress: i,
2549
- current: E,
2550
- pageSize: C,
2551
- total: L,
2552
- loadedCount: k.length,
2923
+ loading: b,
2924
+ autoLoading: p,
2925
+ loadingProgress: l,
2926
+ current: $,
2927
+ pageSize: w,
2928
+ total: M,
2929
+ loadedCount: T.length,
2553
2930
  cachedPages: e,
2554
- onChange: r,
2555
- onLoadNextPage: g,
2556
- onStartAutoLoad: l,
2557
- onStopLoading: a
2931
+ onChange: a,
2932
+ onLoadNextPage: y,
2933
+ onStartAutoLoad: s,
2934
+ onStopLoading: r
2558
2935
  }
2559
2936
  )
2560
2937
  ] });
2561
2938
  };
2562
- Gt.__docgenInfo = {
2939
+ Yt.__docgenInfo = {
2563
2940
  displayName: "VirtualTable",
2564
2941
  description: "虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",
2565
2942
  props: {
@@ -2666,77 +3043,77 @@ Gt.__docgenInfo = {
2666
3043
  }
2667
3044
  }
2668
3045
  };
2669
- const Pt = ({
3046
+ const Kt = ({
2670
3047
  texts: t = [],
2671
- placeholder: y = "请输入内容",
2672
- animationSpeed: u = 100,
2673
- autoPlay: i = !0,
2674
- value: c,
2675
- onChange: k,
2676
- ...L
3048
+ placeholder: b = "请输入内容",
3049
+ animationSpeed: p = 100,
3050
+ autoPlay: l = !0,
3051
+ value: f,
3052
+ onChange: T,
3053
+ ...M
2677
3054
  }) => {
2678
- const [E, C] = X(""), [e, A] = X(0), [g, l] = X(!1), [a, n] = X(!1), [o, r] = X(!1), s = j(void 0), d = j(void 0), h = j(t), x = j(e), G = j(a), T = j(E);
2679
- ae(() => {
2680
- h.current = t, x.current = e, G.current = a, T.current = E;
3055
+ const [$, w] = ne(""), [e, q] = ne(0), [y, s] = ne(!1), [r, n] = ne(!1), [o, a] = ne(!1), u = Q(void 0), d = Q(void 0), x = Q(t), v = Q(e), _ = Q(r), k = Q($);
3056
+ de(() => {
3057
+ x.current = t, v.current = e, _.current = r, k.current = $;
2681
3058
  });
2682
- const _ = U((N, M) => {
2683
- let ne = 0;
2684
- r(!0);
2685
- const re = () => {
2686
- ne < N.length ? (C(N.slice(0, ne + 1)), ne++, d.current = window.setTimeout(re, u)) : (r(!1), M?.());
3059
+ const P = ae((i, c) => {
3060
+ let g = 0;
3061
+ a(!0);
3062
+ const L = () => {
3063
+ g < i.length ? (w(i.slice(0, g + 1)), g++, d.current = window.setTimeout(L, p)) : (a(!1), c?.());
2687
3064
  };
2688
- re();
2689
- }, [u]), H = U((N) => {
2690
- let M = T.current.length;
2691
- const ne = () => {
2692
- M > 0 ? (C(T.current.slice(0, M - 1)), M--, d.current = window.setTimeout(ne, u / 2)) : N?.();
3065
+ L();
3066
+ }, [p]), H = ae((i) => {
3067
+ let c = k.current.length;
3068
+ const g = () => {
3069
+ c > 0 ? (w(k.current.slice(0, c - 1)), c--, d.current = window.setTimeout(g, p / 2)) : i?.();
2693
3070
  };
2694
- ne();
2695
- }, [u]), D = U(() => {
2696
- if (h.current.length === 0 || G.current) return;
2697
- l(!0);
2698
- const N = h.current[x.current];
2699
- T.current ? H(() => {
2700
- _(N, () => {
2701
- s.current = window.setTimeout(() => {
2702
- A((M) => (M + 1) % h.current.length), l(!1);
3071
+ g();
3072
+ }, [p]), F = ae(() => {
3073
+ if (x.current.length === 0 || _.current) return;
3074
+ s(!0);
3075
+ const i = x.current[v.current];
3076
+ k.current ? H(() => {
3077
+ P(i, () => {
3078
+ u.current = window.setTimeout(() => {
3079
+ q((c) => (c + 1) % x.current.length), s(!1);
2703
3080
  }, 2e3);
2704
3081
  });
2705
- }) : _(N, () => {
2706
- s.current = window.setTimeout(() => {
2707
- A((M) => (M + 1) % h.current.length), l(!1);
3082
+ }) : P(i, () => {
3083
+ u.current = window.setTimeout(() => {
3084
+ q((c) => (c + 1) % x.current.length), s(!1);
2708
3085
  }, 2e3);
2709
3086
  });
2710
- }, [H, _]);
2711
- return ae(() => (i && t.length > 0 && !a && D(), () => {
2712
- s.current && window.clearTimeout(s.current), d.current && window.clearTimeout(d.current);
2713
- }), [e, a, i, t.length, D]), ae(() => {
2714
- !g && i && t.length > 0 && !a && D();
2715
- }, [e, g, i, t.length, a, D]), /* @__PURE__ */ W("div", { style: { position: "relative" }, children: [
2716
- /* @__PURE__ */ m(
2717
- Fe,
3087
+ }, [H, P]);
3088
+ return de(() => (l && t.length > 0 && !r && F(), () => {
3089
+ u.current && window.clearTimeout(u.current), d.current && window.clearTimeout(d.current);
3090
+ }), [e, r, l, t.length, F]), de(() => {
3091
+ !y && l && t.length > 0 && !r && F();
3092
+ }, [e, y, l, t.length, r, F]), /* @__PURE__ */ Z("div", { style: { position: "relative" }, children: [
3093
+ /* @__PURE__ */ E(
3094
+ Ke,
2718
3095
  {
2719
- ...L,
2720
- value: c,
2721
- onChange: (N) => {
2722
- k?.(N.target.value), L.onChange?.(N);
3096
+ ...M,
3097
+ value: f,
3098
+ onChange: (i) => {
3099
+ T?.(i.target.value), M.onChange?.(i);
2723
3100
  },
2724
- onFocus: (N) => {
2725
- n(!0), s.current && window.clearTimeout(s.current), d.current && window.clearTimeout(d.current), l(!1), r(!1), L.onFocus?.(N);
3101
+ onFocus: (i) => {
3102
+ n(!0), u.current && window.clearTimeout(u.current), d.current && window.clearTimeout(d.current), s(!1), a(!1), M.onFocus?.(i);
2726
3103
  },
2727
- onBlur: (N) => {
2728
- n(!1), !c && t.length > 0 && (C(""), A(0)), L.onBlur?.(N);
3104
+ onBlur: (i) => {
3105
+ n(!1), !f && t.length > 0 && (w(""), q(0)), M.onBlur?.(i);
2729
3106
  },
2730
- placeholder: a || c ? y : E || y,
3107
+ placeholder: r || f ? b : $ || b,
2731
3108
  style: {
2732
3109
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2733
- ...L.style,
3110
+ ...M.style,
2734
3111
  position: "relative",
2735
3112
  zIndex: 1
2736
3113
  }
2737
3114
  }
2738
3115
  ),
2739
- !a && !c && E && /* @__PURE__ */ W(
3116
+ !r && !f && $ && /* @__PURE__ */ Z(
2740
3117
  "div",
2741
3118
  {
2742
3119
  style: {
@@ -2756,8 +3133,8 @@ const Pt = ({
2756
3133
  fontFamily: "inherit"
2757
3134
  },
2758
3135
  children: [
2759
- /* @__PURE__ */ m("span", { children: E }),
2760
- o && /* @__PURE__ */ m(
3136
+ /* @__PURE__ */ E("span", { children: $ }),
3137
+ o && /* @__PURE__ */ E(
2761
3138
  "span",
2762
3139
  {
2763
3140
  style: {
@@ -2773,7 +3150,7 @@ const Pt = ({
2773
3150
  ]
2774
3151
  }
2775
3152
  ),
2776
- /* @__PURE__ */ m("style", { children: `
3153
+ /* @__PURE__ */ E("style", { children: `
2777
3154
  @keyframes blink {
2778
3155
  0%, 50% { opacity: 1; }
2779
3156
  51%, 100% { opacity: 0; }
@@ -2781,7 +3158,7 @@ const Pt = ({
2781
3158
  ` })
2782
3159
  ] });
2783
3160
  };
2784
- Pt.__docgenInfo = {
3161
+ Kt.__docgenInfo = {
2785
3162
  displayName: "DynamicInput",
2786
3163
  description: "动态文案输入框组件,支持流式文字动画效果",
2787
3164
  props: {
@@ -2826,109 +3203,109 @@ Pt.__docgenInfo = {
2826
3203
  }
2827
3204
  }
2828
3205
  };
2829
- const Dt = ({
3206
+ const Xt = ({
2830
3207
  texts: t = [],
2831
3208
  // 动态文案数组,默认为空数组
2832
- placeholder: y = "请输入内容",
3209
+ placeholder: b = "请输入内容",
2833
3210
  // 占位符文本
2834
- animationSpeed: u = 100,
3211
+ animationSpeed: p = 100,
2835
3212
  // 打字机动画速度,毫秒
2836
- autoPlay: i = !0,
3213
+ autoPlay: l = !0,
2837
3214
  // 是否自动播放动画
2838
- value: c = "",
3215
+ value: f = "",
2839
3216
  // 受控模式的值
2840
- onChange: k,
3217
+ onChange: T,
2841
3218
  // 受控模式的变化回调
2842
- onSubmit: L,
3219
+ onSubmit: M,
2843
3220
  // 提交回调
2844
- maxLength: E = 500,
3221
+ maxLength: $ = 500,
2845
3222
  // 最大字符数限制
2846
- showCount: C = !0,
3223
+ showCount: w = !0,
2847
3224
  // 是否显示字数统计
2848
3225
  submitText: e = "发送",
2849
3226
  // 提交按钮文本
2850
- disabled: A = !1,
3227
+ disabled: q = !1,
2851
3228
  // 是否禁用组件
2852
- rows: g = 4,
3229
+ rows: y = 4,
2853
3230
  // 文本域行数
2854
- style: l,
3231
+ style: s,
2855
3232
  // 自定义样式
2856
- ...a
3233
+ ...r
2857
3234
  // 其他原生属性
2858
3235
  }) => {
2859
- const [n, o] = X(""), [r, s] = X(0), [d, h] = X(!1), [x, G] = X(!1), [T, _] = X(!1), [H, D] = X(c || ""), K = j(void 0), Q = j(void 0), Y = j(t), te = j(r), N = j(x), M = j(n), ne = j(null);
2860
- ae(() => {
2861
- Y.current = t, te.current = r, N.current = x, M.current = n;
3236
+ const [n, o] = ne(""), [a, u] = ne(0), [d, x] = ne(!1), [v, _] = ne(!1), [k, P] = ne(!1), [H, F] = ne(f || ""), U = Q(void 0), R = Q(void 0), ee = Q(t), re = Q(a), i = Q(v), c = Q(n), g = Q(null);
3237
+ de(() => {
3238
+ ee.current = t, re.current = a, i.current = v, c.current = n;
2862
3239
  });
2863
- const re = U((O, le) => {
2864
- let de = 0;
2865
- _(!0);
2866
- const be = () => {
2867
- de < O.length ? (o(O.slice(0, de + 1)), de++, Q.current = window.setTimeout(be, u)) : (_(!1), le?.());
3240
+ const L = ae((X, ue) => {
3241
+ let he = 0;
3242
+ P(!0);
3243
+ const ye = () => {
3244
+ he < X.length ? (o(X.slice(0, he + 1)), he++, R.current = window.setTimeout(ye, p)) : (P(!1), ue?.());
2868
3245
  };
2869
- be();
2870
- }, [u]), ce = U((O) => {
2871
- let le = M.current.length;
2872
- const de = () => {
2873
- le > 0 ? (o(M.current.slice(0, le - 1)), le--, Q.current = window.setTimeout(de, u / 2)) : O?.();
3246
+ ye();
3247
+ }, [p]), S = ae((X) => {
3248
+ let ue = c.current.length;
3249
+ const he = () => {
3250
+ ue > 0 ? (o(c.current.slice(0, ue - 1)), ue--, R.current = window.setTimeout(he, p / 2)) : X?.();
2874
3251
  };
2875
- de();
2876
- }, [u]), ye = U(() => {
2877
- if (Y.current.length === 0 || N.current) return;
2878
- h(!0);
2879
- const O = Y.current[te.current];
2880
- M.current ? ce(() => {
2881
- re(O, () => {
2882
- K.current = window.setTimeout(() => {
2883
- s((le) => (le + 1) % Y.current.length), h(!1);
3252
+ he();
3253
+ }, [p]), W = ae(() => {
3254
+ if (ee.current.length === 0 || i.current) return;
3255
+ x(!0);
3256
+ const X = ee.current[re.current];
3257
+ c.current ? S(() => {
3258
+ L(X, () => {
3259
+ U.current = window.setTimeout(() => {
3260
+ u((ue) => (ue + 1) % ee.current.length), x(!1);
2884
3261
  }, 2e3);
2885
3262
  });
2886
- }) : re(O, () => {
2887
- K.current = window.setTimeout(() => {
2888
- s((le) => (le + 1) % Y.current.length), h(!1);
3263
+ }) : L(X, () => {
3264
+ U.current = window.setTimeout(() => {
3265
+ u((ue) => (ue + 1) % ee.current.length), x(!1);
2889
3266
  }, 2e3);
2890
3267
  });
2891
- }, [ce, re]);
2892
- ae(() => (i && t.length > 0 && !x && ye(), () => {
2893
- K.current && window.clearTimeout(K.current), Q.current && window.clearTimeout(Q.current);
2894
- }), [r, x, i, t.length, ye]), ae(() => {
2895
- !d && i && t.length > 0 && !x && ye();
2896
- }, [r, d, i, t.length, x, ye]);
2897
- const ue = (O) => {
2898
- G(!0), K.current && window.clearTimeout(K.current), Q.current && window.clearTimeout(Q.current), h(!1), _(!1), a.onFocus?.(O);
2899
- }, Ne = (O) => {
2900
- G(!1), !c && t.length > 0 && (o(""), s(0)), a.onBlur?.(O);
2901
- }, Se = (O) => {
2902
- const le = O.target.value;
2903
- E && le.length > E || (k ? k(le) : D(le), a.onChange?.(O));
2904
- }, xe = () => {
2905
- const O = k ? c : H;
2906
- O.trim() && !A && (L?.(O), k || D(""));
2907
- }, Ae = (O) => {
2908
- (O.ctrlKey || O.metaKey) && O.key === "Enter" && (O.preventDefault(), xe()), a.onKeyDown?.(O);
2909
- }, me = k ? c : H, Le = A || !me.trim() || (E ? me.length > E : !1);
2910
- return /* @__PURE__ */ W("div", { style: { position: "relative", ...l }, children: [
2911
- /* @__PURE__ */ W("div", { style: { position: "relative" }, children: [
2912
- /* @__PURE__ */ m(
3268
+ }, [S, L]);
3269
+ de(() => (l && t.length > 0 && !v && W(), () => {
3270
+ U.current && window.clearTimeout(U.current), R.current && window.clearTimeout(R.current);
3271
+ }), [a, v, l, t.length, W]), de(() => {
3272
+ !d && l && t.length > 0 && !v && W();
3273
+ }, [a, d, l, t.length, v, W]);
3274
+ const z = (X) => {
3275
+ _(!0), U.current && window.clearTimeout(U.current), R.current && window.clearTimeout(R.current), x(!1), P(!1), r.onFocus?.(X);
3276
+ }, te = (X) => {
3277
+ _(!1), !f && t.length > 0 && (o(""), u(0)), r.onBlur?.(X);
3278
+ }, se = (X) => {
3279
+ const ue = X.target.value;
3280
+ $ && ue.length > $ || (T ? T(ue) : F(ue), r.onChange?.(X));
3281
+ }, ce = () => {
3282
+ const X = T ? f : H;
3283
+ X.trim() && !q && (M?.(X), T || F(""));
3284
+ }, pe = (X) => {
3285
+ (X.ctrlKey || X.metaKey) && X.key === "Enter" && (X.preventDefault(), ce()), r.onKeyDown?.(X);
3286
+ }, fe = T ? f : H, be = q || !fe.trim() || ($ ? fe.length > $ : !1);
3287
+ return /* @__PURE__ */ Z("div", { style: { position: "relative", ...s }, children: [
3288
+ /* @__PURE__ */ Z("div", { style: { position: "relative" }, children: [
3289
+ /* @__PURE__ */ E(
2913
3290
  "textarea",
2914
3291
  {
2915
- ref: ne,
2916
- value: k ? c : H,
2917
- onChange: Se,
2918
- onFocus: (O) => {
2919
- O.target.style.borderColor = "#1890ff", O.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", ue(O);
3292
+ ref: g,
3293
+ value: T ? f : H,
3294
+ onChange: se,
3295
+ onFocus: (X) => {
3296
+ X.target.style.borderColor = "#1890ff", X.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", z(X);
2920
3297
  },
2921
- onBlur: (O) => {
2922
- O.target.style.borderColor = "#d9d9d9", O.target.style.boxShadow = "none", Ne(O);
3298
+ onBlur: (X) => {
3299
+ X.target.style.borderColor = "#d9d9d9", X.target.style.boxShadow = "none", te(X);
2923
3300
  },
2924
- onKeyDown: Ae,
2925
- placeholder: x || me ? y : "",
2926
- maxLength: E,
2927
- rows: g,
2928
- disabled: A,
3301
+ onKeyDown: pe,
3302
+ placeholder: v || fe ? b : "",
3303
+ maxLength: $,
3304
+ rows: y,
3305
+ disabled: q,
2929
3306
  style: {
2930
3307
  width: "100%",
2931
- minHeight: `${g * 24 + 16}px`,
3308
+ minHeight: `${y * 24 + 16}px`,
2932
3309
  padding: "8px 60px 8px 12px",
2933
3310
  // 右侧留出按钮空间
2934
3311
  border: "1px solid #d9d9d9",
@@ -2941,12 +3318,12 @@ const Dt = ({
2941
3318
  transition: "border-color 0.3s, box-shadow 0.3s",
2942
3319
  backgroundColor: "#fff",
2943
3320
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2944
- ...a.style
3321
+ ...r.style
2945
3322
  },
2946
- ...a
3323
+ ...r
2947
3324
  }
2948
3325
  ),
2949
- !x && !me && n && /* @__PURE__ */ W(
3326
+ !v && !fe && n && /* @__PURE__ */ Z(
2950
3327
  "div",
2951
3328
  {
2952
3329
  style: {
@@ -2968,8 +3345,8 @@ const Dt = ({
2968
3345
  lineHeight: "1.5"
2969
3346
  },
2970
3347
  children: [
2971
- /* @__PURE__ */ m("span", { children: n }),
2972
- T && /* @__PURE__ */ m(
3348
+ /* @__PURE__ */ E("span", { children: n }),
3349
+ k && /* @__PURE__ */ E(
2973
3350
  "span",
2974
3351
  {
2975
3352
  style: {
@@ -2985,7 +3362,7 @@ const Dt = ({
2985
3362
  ]
2986
3363
  }
2987
3364
  ),
2988
- /* @__PURE__ */ m(
3365
+ /* @__PURE__ */ E(
2989
3366
  "div",
2990
3367
  {
2991
3368
  style: {
@@ -2994,14 +3371,14 @@ const Dt = ({
2994
3371
  right: 8,
2995
3372
  zIndex: 3
2996
3373
  },
2997
- children: /* @__PURE__ */ m(
2998
- ge,
3374
+ children: /* @__PURE__ */ E(
3375
+ $e,
2999
3376
  {
3000
3377
  type: "primary",
3001
3378
  size: "small",
3002
- icon: /* @__PURE__ */ m(ct, {}),
3003
- onClick: xe,
3004
- disabled: Le,
3379
+ icon: /* @__PURE__ */ E(mt, {}),
3380
+ onClick: ce,
3381
+ disabled: be,
3005
3382
  style: {
3006
3383
  borderRadius: 6,
3007
3384
  minWidth: 32,
@@ -3016,7 +3393,7 @@ const Dt = ({
3016
3393
  }
3017
3394
  )
3018
3395
  ] }),
3019
- C && /* @__PURE__ */ W(
3396
+ w && /* @__PURE__ */ Z(
3020
3397
  "div",
3021
3398
  {
3022
3399
  style: {
@@ -3026,13 +3403,13 @@ const Dt = ({
3026
3403
  color: "#999"
3027
3404
  },
3028
3405
  children: [
3029
- me.length,
3406
+ fe.length,
3030
3407
  "/",
3031
- E
3408
+ $
3032
3409
  ]
3033
3410
  }
3034
3411
  ),
3035
- /* @__PURE__ */ m("style", { children: `
3412
+ /* @__PURE__ */ E("style", { children: `
3036
3413
  @keyframes blink {
3037
3414
  0%, 50% { opacity: 1; }
3038
3415
  51%, 100% { opacity: 0; }
@@ -3040,7 +3417,7 @@ const Dt = ({
3040
3417
  ` })
3041
3418
  ] });
3042
3419
  };
3043
- Dt.__docgenInfo = {
3420
+ Xt.__docgenInfo = {
3044
3421
  displayName: "DynamicTextArea",
3045
3422
  description: "动态文案文本域组件,支持流式文字动画效果",
3046
3423
  props: {
@@ -3126,96 +3503,96 @@ Dt.__docgenInfo = {
3126
3503
  }
3127
3504
  }
3128
3505
  };
3129
- const We = ({
3506
+ const Je = ({
3130
3507
  src: t,
3131
- poster: y,
3132
- width: u = 300,
3133
- height: i,
3134
- videoWidth: c,
3508
+ poster: b,
3509
+ width: p = 300,
3510
+ height: l,
3511
+ videoWidth: f,
3135
3512
  // 参数保留但不使用,由CSS控制
3136
- videoHeight: k,
3513
+ videoHeight: T,
3137
3514
  // 参数保留但不使用,由CSS控制
3138
- showPlayButton: L = !0,
3139
- autoPlayOnHover: E = !0,
3140
- onClick: C,
3515
+ showPlayButton: M = !0,
3516
+ autoPlayOnHover: $ = !0,
3517
+ onClick: w,
3141
3518
  onVideoLoaded: e,
3142
- onVideoPlay: A,
3143
- onVideoPause: g,
3144
- onVideoEnded: l,
3145
- className: a,
3519
+ onVideoPlay: q,
3520
+ onVideoPause: y,
3521
+ onVideoEnded: s,
3522
+ className: r,
3146
3523
  style: n,
3147
3524
  ...o
3148
3525
  }) => {
3149
- const r = j(null), [s, d] = X(!1), [h, x] = X(!1), [G, T] = X(!1), _ = U(() => {
3150
- r.current && (r.current.play(), d(!0), A?.());
3151
- }, [A]), H = U(() => {
3152
- r.current && (r.current.pause(), d(!1), g?.());
3153
- }, [g]), D = U((re) => {
3154
- re.stopPropagation(), s ? H() : _();
3155
- }, [s, _, H]), K = U(() => {
3156
- x(!0), E && !s && _();
3157
- }, [E, s, _]), Q = U(() => {
3158
- x(!1), E && s && H();
3159
- }, [E, s, H]), Y = U(() => {
3160
- T(!0), e?.();
3161
- }, [e]), te = U(() => {
3162
- d(!0), A?.();
3163
- }, [A]), N = U(() => {
3164
- d(!1), g?.();
3165
- }, [g]), M = U(() => {
3166
- d(!1), l?.();
3167
- }, [l]), ne = U((re) => {
3168
- C?.(re);
3169
- }, [C]);
3170
- return /* @__PURE__ */ m(
3171
- Be,
3526
+ const a = Q(null), [u, d] = ne(!1), [x, v] = ne(!1), [_, k] = ne(!1), P = ae(() => {
3527
+ a.current && (a.current.play(), d(!0), q?.());
3528
+ }, [q]), H = ae(() => {
3529
+ a.current && (a.current.pause(), d(!1), y?.());
3530
+ }, [y]), F = ae((L) => {
3531
+ L.stopPropagation(), u ? H() : P();
3532
+ }, [u, P, H]), U = ae(() => {
3533
+ v(!0), $ && !u && P();
3534
+ }, [$, u, P]), R = ae(() => {
3535
+ v(!1), $ && u && H();
3536
+ }, [$, u, H]), ee = ae(() => {
3537
+ k(!0), e?.();
3538
+ }, [e]), re = ae(() => {
3539
+ d(!0), q?.();
3540
+ }, [q]), i = ae(() => {
3541
+ d(!1), y?.();
3542
+ }, [y]), c = ae(() => {
3543
+ d(!1), s?.();
3544
+ }, [s]), g = ae((L) => {
3545
+ w?.(L);
3546
+ }, [w]);
3547
+ return /* @__PURE__ */ E(
3548
+ Oe,
3172
3549
  {
3173
3550
  ...o,
3174
- className: `video-card ${a || ""}`,
3551
+ className: `video-card ${r || ""}`,
3175
3552
  style: {
3176
- width: u,
3177
- height: i,
3553
+ width: p,
3554
+ height: l,
3178
3555
  padding: 0,
3179
3556
  overflow: "hidden",
3180
- cursor: C ? "pointer" : "default",
3557
+ cursor: w ? "pointer" : "default",
3181
3558
  border: "none",
3182
3559
  borderRadius: 0,
3183
3560
  ...n
3184
3561
  },
3185
3562
  bordered: !1,
3186
- onMouseEnter: K,
3187
- onMouseLeave: Q,
3188
- onClick: ne,
3189
- children: /* @__PURE__ */ W("div", { className: "video-card-container", children: [
3190
- /* @__PURE__ */ m(
3563
+ onMouseEnter: U,
3564
+ onMouseLeave: R,
3565
+ onClick: g,
3566
+ children: /* @__PURE__ */ Z("div", { className: "video-card-container", children: [
3567
+ /* @__PURE__ */ E(
3191
3568
  "video",
3192
3569
  {
3193
- ref: r,
3570
+ ref: a,
3194
3571
  src: t,
3195
- poster: y,
3572
+ poster: b,
3196
3573
  preload: "metadata",
3197
- onLoadedData: Y,
3198
- onPlay: te,
3199
- onPause: N,
3200
- onEnded: M,
3574
+ onLoadedData: ee,
3575
+ onPlay: re,
3576
+ onPause: i,
3577
+ onEnded: c,
3201
3578
  muted: !0,
3202
3579
  loop: !0
3203
3580
  }
3204
3581
  ),
3205
- L && /* @__PURE__ */ m(
3582
+ M && /* @__PURE__ */ E(
3206
3583
  "div",
3207
3584
  {
3208
- className: `video-play-button ${h ? "hovered" : ""}`,
3209
- onClick: D,
3210
- children: s ? /* @__PURE__ */ m(ut, { className: "play-icon" }) : /* @__PURE__ */ m(dt, { className: "play-icon" })
3585
+ className: `video-play-button ${x ? "hovered" : ""}`,
3586
+ onClick: F,
3587
+ children: u ? /* @__PURE__ */ E(ht, { className: "play-icon" }) : /* @__PURE__ */ E(gt, { className: "play-icon" })
3211
3588
  }
3212
3589
  ),
3213
- !G && /* @__PURE__ */ m("div", { className: "video-loading-mask", children: /* @__PURE__ */ m("div", { className: "loading-spinner" }) })
3590
+ !_ && /* @__PURE__ */ E("div", { className: "video-loading-mask", children: /* @__PURE__ */ E("div", { className: "loading-spinner" }) })
3214
3591
  ] })
3215
3592
  }
3216
3593
  );
3217
3594
  };
3218
- We.__docgenInfo = {
3595
+ Je.__docgenInfo = {
3219
3596
  displayName: "VideoCard",
3220
3597
  description: "视频卡片组件,支持鼠标悬浮播放控制",
3221
3598
  props: {
@@ -3316,12 +3693,12 @@ We.__docgenInfo = {
3316
3693
  }
3317
3694
  }
3318
3695
  };
3319
- const Mt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((u) => t.toLowerCase().includes(u)), Rt = (t) => t.type ? t.type : Mt(t.url) ? "video" : "image", Ht = ({
3696
+ const Jt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((p) => t.toLowerCase().includes(p)), Qt = (t) => t.type ? t.type : Jt(t.url) ? "video" : "image", Zt = ({
3320
3697
  items: t,
3321
- columns: y,
3322
- gap: u = 0,
3323
- responsive: i = !0,
3324
- breakpoints: c = {
3698
+ columns: b,
3699
+ gap: p = 0,
3700
+ responsive: l = !0,
3701
+ breakpoints: f = {
3325
3702
  xs: 1,
3326
3703
  sm: 2,
3327
3704
  md: 3,
@@ -3329,92 +3706,92 @@ const Mt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
3329
3706
  xl: 5,
3330
3707
  xxl: 6
3331
3708
  },
3332
- className: k,
3333
- style: L,
3334
- onClick: E
3709
+ className: T,
3710
+ style: M,
3711
+ onClick: $
3335
3712
  }) => {
3336
- const C = j(null), [e, A] = X(y || c.md || 3), g = j(/* @__PURE__ */ new Map()), l = U(() => {
3337
- if (!i || y)
3338
- return y || c.md || 3;
3339
- const r = window.innerWidth;
3340
- return r < 576 ? c.xs || 1 : r < 768 ? c.sm || 2 : r < 992 ? c.md || 3 : r < 1200 ? c.lg || 4 : r < 1600 ? c.xl || 5 : c.xxl || 6;
3341
- }, [i, y, c]), a = U(() => {
3342
- if (!C.current) return;
3343
- const r = e, s = C.current, h = (s.offsetWidth - u * (r - 1)) / r, x = new Array(r).fill(0);
3344
- t.forEach((T, _) => {
3345
- const H = T.id || _, D = g.current.get(H);
3346
- if (!D) return;
3347
- const K = Math.min(...x), Q = x.indexOf(K), Y = Q * (h + u), te = x[Q];
3348
- D.style.position = "absolute", D.style.left = `${Y}px`, D.style.top = `${te}px`, D.style.width = `${h}px`, x[Q] += D.offsetHeight + u;
3713
+ const w = Q(null), [e, q] = ne(b || f.md || 3), y = Q(/* @__PURE__ */ new Map()), s = ae(() => {
3714
+ if (!l || b)
3715
+ return b || f.md || 3;
3716
+ const a = window.innerWidth;
3717
+ return a < 576 ? f.xs || 1 : a < 768 ? f.sm || 2 : a < 992 ? f.md || 3 : a < 1200 ? f.lg || 4 : a < 1600 ? f.xl || 5 : f.xxl || 6;
3718
+ }, [l, b, f]), r = ae(() => {
3719
+ if (!w.current) return;
3720
+ const a = e, u = w.current, x = (u.offsetWidth - p * (a - 1)) / a, v = new Array(a).fill(0);
3721
+ t.forEach((k, P) => {
3722
+ const H = k.id || P, F = y.current.get(H);
3723
+ if (!F) return;
3724
+ const U = Math.min(...v), R = v.indexOf(U), ee = R * (x + p), re = v[R];
3725
+ F.style.position = "absolute", F.style.left = `${ee}px`, F.style.top = `${re}px`, F.style.width = `${x}px`, v[R] += F.offsetHeight + p;
3349
3726
  });
3350
- const G = Math.max(...x);
3351
- s.style.height = `${G}px`;
3352
- }, [t, e, u]);
3353
- ae(() => {
3354
- const r = () => {
3355
- const s = l();
3356
- s !== e && A(s);
3727
+ const _ = Math.max(...v);
3728
+ u.style.height = `${_}px`;
3729
+ }, [t, e, p]);
3730
+ de(() => {
3731
+ const a = () => {
3732
+ const u = s();
3733
+ u !== e && q(u);
3357
3734
  };
3358
- if (i)
3359
- return window.addEventListener("resize", r), r(), () => window.removeEventListener("resize", r);
3360
- }, [i, l, e]), ae(() => {
3361
- const r = setTimeout(() => {
3362
- a();
3735
+ if (l)
3736
+ return window.addEventListener("resize", a), a(), () => window.removeEventListener("resize", a);
3737
+ }, [l, s, e]), de(() => {
3738
+ const a = setTimeout(() => {
3739
+ r();
3363
3740
  }, 100);
3364
- return () => clearTimeout(r);
3365
- }, [t, e, a]);
3366
- const n = U(() => {
3367
- a();
3368
- }, [a]), o = U((r) => {
3369
- E && E(r), r.onClick?.(r);
3370
- }, [E]);
3371
- return /* @__PURE__ */ m(
3741
+ return () => clearTimeout(a);
3742
+ }, [t, e, r]);
3743
+ const n = ae(() => {
3744
+ r();
3745
+ }, [r]), o = ae((a) => {
3746
+ $ && $(a), a.onClick?.(a);
3747
+ }, [$]);
3748
+ return /* @__PURE__ */ E(
3372
3749
  "div",
3373
3750
  {
3374
- ref: C,
3375
- className: `waterfall-container ${k || ""}`,
3751
+ ref: w,
3752
+ className: `waterfall-container ${T || ""}`,
3376
3753
  style: {
3377
3754
  position: "relative",
3378
3755
  width: "100%",
3379
- ...L
3756
+ ...M
3380
3757
  },
3381
- children: t.map((r, s) => {
3382
- const d = r.id || s, h = Rt(r);
3383
- return /* @__PURE__ */ m(
3758
+ children: t.map((a, u) => {
3759
+ const d = a.id || u, x = Qt(a);
3760
+ return /* @__PURE__ */ E(
3384
3761
  "div",
3385
3762
  {
3386
- ref: (x) => {
3387
- x ? g.current.set(d, x) : g.current.delete(d);
3763
+ ref: (v) => {
3764
+ v ? y.current.set(d, v) : y.current.delete(d);
3388
3765
  },
3389
3766
  className: "waterfall-item",
3390
- children: h === "video" ? /* @__PURE__ */ m("div", { style: {
3767
+ children: x === "video" ? /* @__PURE__ */ E("div", { style: {
3391
3768
  width: "100%",
3392
3769
  position: "relative",
3393
3770
  paddingBottom: "56.25%",
3394
- cursor: E || r.onClick ? "pointer" : "default"
3395
- }, children: /* @__PURE__ */ m("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ m(
3396
- We,
3771
+ cursor: $ || a.onClick ? "pointer" : "default"
3772
+ }, children: /* @__PURE__ */ E("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ E(
3773
+ Je,
3397
3774
  {
3398
- src: r.url,
3399
- poster: r.poster,
3775
+ src: a.url,
3776
+ poster: a.poster,
3400
3777
  width: "100%",
3401
3778
  height: "100%",
3402
- onClick: () => o(r),
3779
+ onClick: () => o(a),
3403
3780
  onVideoLoaded: n,
3404
3781
  autoPlayOnHover: !0,
3405
3782
  showPlayButton: !1
3406
3783
  }
3407
- ) }) }) : /* @__PURE__ */ m(
3784
+ ) }) }) : /* @__PURE__ */ E(
3408
3785
  "div",
3409
3786
  {
3410
3787
  className: "waterfall-image-wrapper",
3411
- onClick: () => o(r),
3412
- style: { cursor: E || r.onClick ? "pointer" : "default" },
3413
- children: /* @__PURE__ */ m(
3788
+ onClick: () => o(a),
3789
+ style: { cursor: $ || a.onClick ? "pointer" : "default" },
3790
+ children: /* @__PURE__ */ E(
3414
3791
  "img",
3415
3792
  {
3416
- src: r.url,
3417
- alt: `瀑布流图片 ${s + 1}`,
3793
+ src: a.url,
3794
+ alt: `瀑布流图片 ${u + 1}`,
3418
3795
  className: "waterfall-image",
3419
3796
  onLoad: n,
3420
3797
  onError: n,
@@ -3430,7 +3807,7 @@ const Mt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
3430
3807
  }
3431
3808
  );
3432
3809
  };
3433
- Ht.__docgenInfo = {
3810
+ Zt.__docgenInfo = {
3434
3811
  displayName: "Waterfall",
3435
3812
  description: "瀑布流布局组件,支持图片和视频混合展示",
3436
3813
  props: {
@@ -3486,8 +3863,8 @@ Ht.__docgenInfo = {
3486
3863
  }
3487
3864
  }
3488
3865
  };
3489
- const Ut = {
3490
- algorithm: at.defaultAlgorithm,
3866
+ const sn = {
3867
+ algorithm: ct.defaultAlgorithm,
3491
3868
  token: {
3492
3869
  // 主色
3493
3870
  colorPrimary: "#3b82f6",
@@ -3553,21 +3930,21 @@ const Ut = {
3553
3930
  }
3554
3931
  };
3555
3932
  export {
3556
- Et as AdvancedTable,
3557
- mt as AppModal,
3558
- bt as BackButton,
3559
- ft as Button,
3560
- yt as Card,
3561
- Pt as DynamicInput,
3562
- Dt as DynamicTextArea,
3563
- xt as EmptyAndSpin,
3564
- kt as LinkButton,
3565
- gt as PageTable,
3566
- It as RichTextEditor,
3567
- We as VideoCard,
3568
- Gt as VirtualTable,
3569
- Ht as Waterfall,
3570
- vt as XcIcon,
3571
- Ut as lightTheme
3933
+ St as AdvancedTable,
3934
+ xt as AppModal,
3935
+ Ct as BackButton,
3936
+ vt as Button,
3937
+ bt as Card,
3938
+ Kt as DynamicInput,
3939
+ Xt as DynamicTextArea,
3940
+ $t as EmptyAndSpin,
3941
+ Tt as LinkButton,
3942
+ kt as PageTable,
3943
+ zt as RichTextEditor,
3944
+ Je as VideoCard,
3945
+ Yt as VirtualTable,
3946
+ Zt as Waterfall,
3947
+ Et as XcIcon,
3948
+ sn as lightTheme
3572
3949
  };
3573
3950
  //# sourceMappingURL=index.es.js.map