bi-components-library 1.0.28 → 1.0.30

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