bi-components-library 1.0.13 → 1.0.15

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,8 +1,8 @@
1
- import Ue, { useState as J, useRef as z, useMemo as Ge, useCallback as W, useEffect as oe, useLayoutEffect as Xe } from "react";
2
- import { Button as xe, Card as Re, Modal as Ke, Table as Ie, Flex as Pe, Spin as Ye, Empty as Je, Select as Ve, Form as Ce, Input as Fe, Space as Qe, Dropdown as Ze, Tooltip as et, Progress as tt, Pagination as nt, theme as at } from "antd";
3
- import { createFromIconfontCN as rt, LeftOutlined as ot, SearchOutlined as lt, ReloadOutlined as st, InfoCircleOutlined as it, SendOutlined as ct, PauseCircleOutlined as ut, PlayCircleOutlined as dt } from "@ant-design/icons";
4
- import { createPortal as pt } from "react-dom";
5
- var Se = { exports: {} }, Ee = {};
1
+ import Ze, { useState as Q, useRef as F, useMemo as Xe, useCallback as U, useEffect as le, useLayoutEffect as Ge } from "react";
2
+ import { Button as we, Card as Pe, Modal as et, Table as Be, Flex as Fe, Spin as tt, Empty as nt, Select as Oe, Form as $e, Input as Ke, Space as rt, Dropdown as at, Tooltip as ot, Progress as lt, Pagination as st, theme as it } from "antd";
3
+ import { createFromIconfontCN as ct, LeftOutlined as ut, SearchOutlined as dt, ReloadOutlined as pt, InfoCircleOutlined as ft, SendOutlined as mt, PauseCircleOutlined as yt, PlayCircleOutlined as gt } from "@ant-design/icons";
4
+ import { createPortal as ht } from "react-dom";
5
+ var je = { exports: {} }, ke = {};
6
6
  /**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.js
@@ -12,29 +12,29 @@ var Se = { exports: {} }, Ee = {};
12
12
  * This source code is licensed under the MIT license found in the
13
13
  * LICENSE file in the root directory of this source tree.
14
14
  */
15
- var Be;
16
- function ft() {
17
- if (Be) return Ee;
18
- Be = 1;
15
+ var ze;
16
+ function vt() {
17
+ if (ze) return ke;
18
+ ze = 1;
19
19
  var t = Symbol.for("react.transitional.element"), p = Symbol.for("react.fragment");
20
- function l(a, r, m) {
21
- var A = null;
22
- if (m !== void 0 && (A = "" + m), r.key !== void 0 && (A = "" + r.key), "key" in r) {
23
- m = {};
24
- for (var g in r)
25
- g !== "key" && (m[g] = r[g]);
26
- } else m = r;
27
- return r = m.ref, {
20
+ function l(r, o, y) {
21
+ var S = null;
22
+ if (y !== void 0 && (S = "" + y), o.key !== void 0 && (S = "" + o.key), "key" in o) {
23
+ y = {};
24
+ for (var h in o)
25
+ h !== "key" && (y[h] = o[h]);
26
+ } else y = o;
27
+ return o = y.ref, {
28
28
  $$typeof: t,
29
- type: a,
30
- key: A,
31
- ref: r !== void 0 ? r : null,
32
- props: m
29
+ type: r,
30
+ key: S,
31
+ ref: o !== void 0 ? o : null,
32
+ props: y
33
33
  };
34
34
  }
35
- return Ee.Fragment = p, Ee.jsx = l, Ee.jsxs = l, Ee;
35
+ return ke.Fragment = p, ke.jsx = l, ke.jsxs = l, ke;
36
36
  }
37
- var ke = {};
37
+ var Ne = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.development.js
@@ -44,20 +44,20 @@ var ke = {};
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
46
  */
47
- var Oe;
48
- function mt() {
49
- return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && function() {
47
+ var He;
48
+ function bt() {
49
+ return He || (He = 1, process.env.NODE_ENV !== "production" && function() {
50
50
  function t(s) {
51
51
  if (s == null) return null;
52
52
  if (typeof s == "function")
53
- return s.$$typeof === U ? null : s.displayName || s.name || null;
53
+ return s.$$typeof === X ? null : s.displayName || s.name || null;
54
54
  if (typeof s == "string") return s;
55
55
  switch (s) {
56
- case S:
56
+ case C:
57
57
  return "Fragment";
58
- case w:
58
+ case E:
59
59
  return "Profiler";
60
- case c:
60
+ case i:
61
61
  return "StrictMode";
62
62
  case V:
63
63
  return "Suspense";
@@ -70,13 +70,13 @@ function mt() {
70
70
  switch (typeof s.tag == "number" && console.error(
71
71
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
72
72
  ), s.$$typeof) {
73
- case o:
73
+ case a:
74
74
  return "Portal";
75
- case $:
75
+ case A:
76
76
  return (s.displayName || "Context") + ".Provider";
77
- case k:
77
+ case T:
78
78
  return (s._context.displayName || "Context") + ".Consumer";
79
- case b:
79
+ case v:
80
80
  var L = s.render;
81
81
  return s = s.displayName, s || (s = L.displayName || L.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
82
82
  case P:
@@ -102,16 +102,16 @@ function mt() {
102
102
  }
103
103
  if (L) {
104
104
  L = console;
105
- var K = L.error, ae = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
106
- return K.call(
105
+ var Y = L.error, re = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
106
+ return Y.call(
107
107
  L,
108
108
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
109
- ae
109
+ re
110
110
  ), p(s);
111
111
  }
112
112
  }
113
- function a(s) {
114
- if (s === S) return "<>";
113
+ function r(s) {
114
+ if (s === C) return "<>";
115
115
  if (typeof s == "object" && s !== null && s.$$typeof === D)
116
116
  return "<...>";
117
117
  try {
@@ -121,48 +121,48 @@ function mt() {
121
121
  return "<...>";
122
122
  }
123
123
  }
124
- function r() {
125
- var s = H.A;
124
+ function o() {
125
+ var s = z.A;
126
126
  return s === null ? null : s.getOwner();
127
127
  }
128
- function m() {
128
+ function y() {
129
129
  return Error("react-stack-top-frame");
130
130
  }
131
- function A(s) {
132
- if (X.call(s, "key")) {
131
+ function S(s) {
132
+ if (K.call(s, "key")) {
133
133
  var L = Object.getOwnPropertyDescriptor(s, "key").get;
134
134
  if (L && L.isReactWarning) return !1;
135
135
  }
136
136
  return s.key !== void 0;
137
137
  }
138
- function g(s, L) {
139
- function K() {
138
+ function h(s, L) {
139
+ function Y() {
140
140
  I || (I = !0, console.error(
141
141
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
142
142
  L
143
143
  ));
144
144
  }
145
- K.isReactWarning = !0, Object.defineProperty(s, "key", {
146
- get: K,
145
+ Y.isReactWarning = !0, Object.defineProperty(s, "key", {
146
+ get: Y,
147
147
  configurable: !0
148
148
  });
149
149
  }
150
- function i() {
150
+ function c() {
151
151
  var s = t(this.type);
152
- return Q[s] || (Q[s] = !0, console.error(
152
+ return Z[s] || (Z[s] = !0, console.error(
153
153
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
154
154
  )), s = this.props.ref, s !== void 0 ? s : null;
155
155
  }
156
- function e(s, L, K, ae, ye, ce, be, O) {
157
- return K = ce.ref, s = {
158
- $$typeof: d,
156
+ function e(s, L, Y, re, fe, ie, xe, M) {
157
+ return Y = ie.ref, s = {
158
+ $$typeof: m,
159
159
  type: s,
160
160
  key: L,
161
- props: ce,
162
- _owner: ye
163
- }, (K !== void 0 ? K : null) !== null ? Object.defineProperty(s, "ref", {
161
+ props: ie,
162
+ _owner: fe
163
+ }, (Y !== void 0 ? Y : null) !== null ? Object.defineProperty(s, "ref", {
164
164
  enumerable: !1,
165
- get: i
165
+ get: c
166
166
  }) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
167
167
  configurable: !1,
168
168
  enumerable: !1,
@@ -177,68 +177,68 @@ function mt() {
177
177
  configurable: !1,
178
178
  enumerable: !1,
179
179
  writable: !0,
180
- value: be
180
+ value: xe
181
181
  }), Object.defineProperty(s, "_debugTask", {
182
182
  configurable: !1,
183
183
  enumerable: !1,
184
184
  writable: !0,
185
- value: O
185
+ value: M
186
186
  }), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
187
187
  }
188
- function x(s, L, K, ae, ye, ce, be, O) {
188
+ function w(s, L, Y, re, fe, ie, xe, M) {
189
189
  var G = L.children;
190
190
  if (G !== void 0)
191
- if (ae)
192
- if (Z(G)) {
193
- for (ae = 0; ae < G.length; ae++)
194
- u(G[ae]);
191
+ if (re)
192
+ if (ee(G)) {
193
+ for (re = 0; re < G.length; re++)
194
+ u(G[re]);
195
195
  Object.freeze && Object.freeze(G);
196
196
  } else
197
197
  console.error(
198
198
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
199
199
  );
200
200
  else u(G);
201
- if (X.call(L, "key")) {
201
+ if (K.call(L, "key")) {
202
202
  G = t(s);
203
- var ue = Object.keys(L).filter(function(qe) {
204
- return qe !== "key";
203
+ var ue = Object.keys(L).filter(function(Ce) {
204
+ return Ce !== "key";
205
205
  });
206
- ae = 0 < ue.length ? "{key: someKey, " + ue.join(": ..., ") + ": ...}" : "{key: someKey}", he[G + ae] || (ue = 0 < ue.length ? "{" + ue.join(": ..., ") + ": ...}" : "{}", console.error(
206
+ re = 0 < ue.length ? "{key: someKey, " + ue.join(": ..., ") + ": ...}" : "{key: someKey}", ge[G + re] || (ue = 0 < ue.length ? "{" + ue.join(": ..., ") + ": ...}" : "{}", console.error(
207
207
  `A props object containing a "key" prop is being spread into JSX:
208
208
  let props = %s;
209
209
  <%s {...props} />
210
210
  React keys must be passed directly to JSX without using spread:
211
211
  let props = %s;
212
212
  <%s key={someKey} {...props} />`,
213
- ae,
213
+ re,
214
214
  G,
215
215
  ue,
216
216
  G
217
- ), he[G + ae] = !0);
217
+ ), ge[G + re] = !0);
218
218
  }
219
- if (G = null, K !== void 0 && (l(K), G = "" + K), A(L) && (l(L.key), G = "" + L.key), "key" in L) {
220
- K = {};
219
+ if (G = null, Y !== void 0 && (l(Y), G = "" + Y), S(L) && (l(L.key), G = "" + L.key), "key" in L) {
220
+ Y = {};
221
221
  for (var ve in L)
222
- ve !== "key" && (K[ve] = L[ve]);
223
- } else K = L;
224
- return G && g(
225
- K,
222
+ ve !== "key" && (Y[ve] = L[ve]);
223
+ } else Y = L;
224
+ return G && h(
225
+ Y,
226
226
  typeof s == "function" ? s.displayName || s.name || "Unknown" : s
227
227
  ), e(
228
228
  s,
229
229
  G,
230
- ce,
231
- ye,
232
- r(),
233
- K,
234
- be,
235
- O
230
+ ie,
231
+ fe,
232
+ o(),
233
+ Y,
234
+ xe,
235
+ M
236
236
  );
237
237
  }
238
238
  function u(s) {
239
- typeof s == "object" && s !== null && s.$$typeof === d && s._store && (s._store.validated = 1);
239
+ typeof s == "object" && s !== null && s.$$typeof === m && s._store && (s._store.validated = 1);
240
240
  }
241
- var q = Ue, d = Symbol.for("react.transitional.element"), o = Symbol.for("react.portal"), S = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), k = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), U = Symbol.for("react.client.reference"), H = q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, X = Object.prototype.hasOwnProperty, Z = Array.isArray, T = console.createTask ? console.createTask : function() {
241
+ var q = Ze, m = Symbol.for("react.transitional.element"), a = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), T = Symbol.for("react.consumer"), A = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), X = Symbol.for("react.client.reference"), z = q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, K = Object.prototype.hasOwnProperty, ee = Array.isArray, k = console.createTask ? console.createTask : function() {
242
242
  return null;
243
243
  };
244
244
  q = {
@@ -246,50 +246,50 @@ React keys must be passed directly to JSX without using spread:
246
246
  return s();
247
247
  }
248
248
  };
249
- var I, Q = {}, ee = q.react_stack_bottom_frame.bind(
249
+ var I, Z = {}, te = q.react_stack_bottom_frame.bind(
250
250
  q,
251
- m
252
- )(), pe = T(a(m)), he = {};
253
- ke.Fragment = S, ke.jsx = function(s, L, K, ae, ye) {
254
- var ce = 1e4 > H.recentlyCreatedOwnerStacks++;
255
- return x(
251
+ y
252
+ )(), pe = k(r(y)), ge = {};
253
+ Ne.Fragment = C, Ne.jsx = function(s, L, Y, re, fe) {
254
+ var ie = 1e4 > z.recentlyCreatedOwnerStacks++;
255
+ return w(
256
256
  s,
257
257
  L,
258
- K,
258
+ Y,
259
259
  !1,
260
- ae,
261
- ye,
262
- ce ? Error("react-stack-top-frame") : ee,
263
- ce ? T(a(s)) : pe
260
+ re,
261
+ fe,
262
+ ie ? Error("react-stack-top-frame") : te,
263
+ ie ? k(r(s)) : pe
264
264
  );
265
- }, ke.jsxs = function(s, L, K, ae, ye) {
266
- var ce = 1e4 > H.recentlyCreatedOwnerStacks++;
267
- return x(
265
+ }, Ne.jsxs = function(s, L, Y, re, fe) {
266
+ var ie = 1e4 > z.recentlyCreatedOwnerStacks++;
267
+ return w(
268
268
  s,
269
269
  L,
270
- K,
270
+ Y,
271
271
  !0,
272
- ae,
273
- ye,
274
- ce ? Error("react-stack-top-frame") : ee,
275
- ce ? T(a(s)) : pe
272
+ re,
273
+ fe,
274
+ ie ? Error("react-stack-top-frame") : te,
275
+ ie ? k(r(s)) : pe
276
276
  );
277
277
  };
278
- }()), ke;
278
+ }()), Ne;
279
279
  }
280
- var Me;
281
- function yt() {
282
- return Me || (Me = 1, process.env.NODE_ENV === "production" ? Se.exports = ft() : Se.exports = mt()), Se.exports;
280
+ var We;
281
+ function xt() {
282
+ return We || (We = 1, process.env.NODE_ENV === "production" ? je.exports = vt() : je.exports = bt()), je.exports;
283
283
  }
284
- var n = yt();
285
- const gt = ({
284
+ var n = xt();
285
+ const wt = ({
286
286
  variant: t = "primary",
287
287
  loading: p = !1,
288
288
  children: l,
289
- ...a
289
+ ...r
290
290
  }) => {
291
- const r = (m) => {
292
- switch (m) {
291
+ const o = (y) => {
292
+ switch (y) {
293
293
  case "primary":
294
294
  return "primary";
295
295
  case "ghost":
@@ -305,17 +305,17 @@ const gt = ({
305
305
  }
306
306
  };
307
307
  return /* @__PURE__ */ n.jsx(
308
- xe,
308
+ we,
309
309
  {
310
- ...a,
311
- type: r(t),
310
+ ...r,
311
+ type: o(t),
312
312
  loading: p,
313
313
  ghost: t === "ghost",
314
314
  children: l
315
315
  }
316
316
  );
317
317
  };
318
- gt.__docgenInfo = {
318
+ wt.__docgenInfo = {
319
319
  displayName: "Button",
320
320
  description: "基础按钮,用于触发操作",
321
321
  props: {
@@ -359,25 +359,25 @@ gt.__docgenInfo = {
359
359
  }
360
360
  }
361
361
  };
362
- const ht = ({
362
+ const Et = ({
363
363
  title: t,
364
364
  children: p,
365
365
  bordered: l = !0,
366
- hoverable: a = !1,
367
- size: r = "default",
368
- ...m
366
+ hoverable: r = !1,
367
+ size: o = "default",
368
+ ...y
369
369
  }) => /* @__PURE__ */ n.jsx(
370
- Re,
370
+ Pe,
371
371
  {
372
- ...m,
372
+ ...y,
373
373
  title: t,
374
374
  bordered: l,
375
- hoverable: a,
376
- size: r,
375
+ hoverable: r,
376
+ size: o,
377
377
  children: p
378
378
  }
379
379
  );
380
- ht.__docgenInfo = {
380
+ Et.__docgenInfo = {
381
381
  displayName: "Card",
382
382
  description: "卡片容器,用于分组内容",
383
383
  props: {
@@ -428,23 +428,23 @@ ht.__docgenInfo = {
428
428
  }
429
429
  }
430
430
  };
431
- const vt = ({
431
+ const Tt = ({
432
432
  showDefaultFooter: t = !0,
433
433
  ...p
434
434
  }) => {
435
- const l = p.footer !== void 0 ? p.footer : t ? (a, { OkBtn: r, CancelBtn: m }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
436
- /* @__PURE__ */ n.jsx(r, {}),
437
- /* @__PURE__ */ n.jsx(m, {})
435
+ const l = p.footer !== void 0 ? p.footer : t ? (r, { OkBtn: o, CancelBtn: y }) => /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
436
+ /* @__PURE__ */ n.jsx(o, {}),
437
+ /* @__PURE__ */ n.jsx(y, {})
438
438
  ] }) : null;
439
439
  return /* @__PURE__ */ n.jsx(
440
- Ke,
440
+ et,
441
441
  {
442
442
  ...p,
443
443
  footer: l
444
444
  }
445
445
  );
446
446
  };
447
- vt.__docgenInfo = {
447
+ Tt.__docgenInfo = {
448
448
  displayName: "AppModal",
449
449
  description: "应用级模态框组件,基于 Ant Design Modal 封装",
450
450
  props: {
@@ -505,15 +505,15 @@ vt.__docgenInfo = {
505
505
  }
506
506
  }
507
507
  };
508
- const bt = ({
508
+ const kt = ({
509
509
  scrollX: t,
510
510
  showPagination: p = !0,
511
511
  defaultPageSize: l = 10,
512
- ...a
512
+ ...r
513
513
  }) => /* @__PURE__ */ n.jsx(
514
- Ie,
514
+ Be,
515
515
  {
516
- ...a,
516
+ ...r,
517
517
  scroll: {
518
518
  x: t || "max-content",
519
519
  y: "50vh"
@@ -523,11 +523,11 @@ const bt = ({
523
523
  showSizeChanger: !0,
524
524
  showQuickJumper: !0,
525
525
  defaultPageSize: l,
526
- ...a.pagination
526
+ ...r.pagination
527
527
  } : !1
528
528
  }
529
529
  );
530
- bt.__docgenInfo = {
530
+ kt.__docgenInfo = {
531
531
  displayName: "PageTable",
532
532
  description: "页面级表格组件,高度铺满容器,自动滚动",
533
533
  props: {
@@ -577,30 +577,30 @@ bt.__docgenInfo = {
577
577
  }
578
578
  }
579
579
  };
580
- const xt = rt({
580
+ const Nt = ct({
581
581
  scriptUrl: ["https://at.alicdn.com/t/c/font_4968458_eh91gfr4j9e.js"]
582
- }), wt = ({
582
+ }), Ct = ({
583
583
  name: t,
584
584
  size: p,
585
585
  color: l,
586
- style: a,
587
- ...r
586
+ style: r,
587
+ ...o
588
588
  }) => {
589
- const m = {
589
+ const y = {
590
590
  fontSize: p,
591
591
  color: l,
592
- ...a
592
+ ...r
593
593
  };
594
594
  return /* @__PURE__ */ n.jsx(
595
- xt,
595
+ Nt,
596
596
  {
597
- ...r,
597
+ ...o,
598
598
  type: t,
599
- style: m
599
+ style: y
600
600
  }
601
601
  );
602
602
  };
603
- wt.__docgenInfo = {
603
+ Ct.__docgenInfo = {
604
604
  displayName: "XcIcon",
605
605
  description: "自定义图标组件,基于 iconfont",
606
606
  props: {
@@ -636,43 +636,43 @@ wt.__docgenInfo = {
636
636
  }
637
637
  }
638
638
  };
639
- const Et = ({
639
+ const St = ({
640
640
  loading: t,
641
641
  description: p = "暂无数据",
642
642
  className: l,
643
- emptyChildren: a,
644
- loadingText: r,
645
- emptyImage: m
643
+ emptyChildren: r,
644
+ loadingText: o,
645
+ emptyImage: y
646
646
  }) => t ? /* @__PURE__ */ n.jsxs(
647
- Pe,
647
+ Fe,
648
648
  {
649
649
  className: `pt-10 w-full ${l || ""}`,
650
650
  align: "center",
651
651
  justify: "center",
652
652
  vertical: !0,
653
653
  children: [
654
- /* @__PURE__ */ n.jsx(Ye, { size: "large" }),
655
- r && /* @__PURE__ */ n.jsx("div", { className: "mt-4 text-gray-500", children: r })
654
+ /* @__PURE__ */ n.jsx(tt, { size: "large" }),
655
+ o && /* @__PURE__ */ n.jsx("div", { className: "mt-4 text-gray-500", children: o })
656
656
  ]
657
657
  }
658
658
  ) : /* @__PURE__ */ n.jsx(
659
- Pe,
659
+ Fe,
660
660
  {
661
661
  className: `pt-10 w-full ${l || ""}`,
662
662
  align: "center",
663
663
  justify: "center",
664
664
  children: /* @__PURE__ */ n.jsx(
665
- Je,
665
+ nt,
666
666
  {
667
- image: m,
667
+ image: y,
668
668
  description: p,
669
669
  imageStyle: { height: 180 },
670
- children: a
670
+ children: r
671
671
  }
672
672
  )
673
673
  }
674
674
  );
675
- Et.__docgenInfo = {
675
+ St.__docgenInfo = {
676
676
  displayName: "EmptyAndSpin",
677
677
  description: "空状态和加载状态组合组件",
678
678
  props: {
@@ -715,24 +715,24 @@ Et.__docgenInfo = {
715
715
  }
716
716
  }
717
717
  };
718
- const kt = ({
718
+ const qt = ({
719
719
  onClick: t,
720
720
  showText: p = !1,
721
721
  className: l,
722
- size: a = "small",
723
- type: r = "default"
722
+ size: r = "small",
723
+ type: o = "default"
724
724
  }) => /* @__PURE__ */ n.jsx(
725
- xe,
725
+ we,
726
726
  {
727
- size: a,
728
- type: r,
729
- icon: /* @__PURE__ */ n.jsx(ot, {}),
727
+ size: r,
728
+ type: o,
729
+ icon: /* @__PURE__ */ n.jsx(ut, {}),
730
730
  className: `cursor-pointer ${l || ""}`,
731
731
  onClick: t,
732
732
  children: p && "返回"
733
733
  }
734
734
  );
735
- kt.__docgenInfo = {
735
+ qt.__docgenInfo = {
736
736
  displayName: "BackButton",
737
737
  description: "返回按钮组件",
738
738
  props: {
@@ -771,23 +771,23 @@ kt.__docgenInfo = {
771
771
  }
772
772
  }
773
773
  };
774
- const Tt = ({
774
+ const At = ({
775
775
  removePadding: t = !0,
776
776
  className: p,
777
777
  ...l
778
778
  }) => {
779
- const a = t ? `px-0 h-auto ${p || ""}` : p;
779
+ const r = t ? `px-0 h-auto ${p || ""}` : p;
780
780
  return /* @__PURE__ */ n.jsx(
781
- xe,
781
+ we,
782
782
  {
783
783
  type: "link",
784
784
  ...l,
785
- className: a,
785
+ className: r,
786
786
  children: l.children
787
787
  }
788
788
  );
789
789
  };
790
- Tt.__docgenInfo = {
790
+ At.__docgenInfo = {
791
791
  displayName: "LinkButton",
792
792
  description: "链接样式按钮组件,适用于表格操作列",
793
793
  props: {
@@ -824,129 +824,129 @@ Tt.__docgenInfo = {
824
824
  }
825
825
  }
826
826
  };
827
- const { Option: Nt } = Ve, Ct = ({
827
+ const { Option: _t } = Oe, $t = ({
828
828
  columns: t,
829
829
  request: p,
830
830
  searchFields: l = [],
831
- showSearch: a = !0,
832
- showRefresh: r = !0,
833
- defaultPageSize: m = 10,
834
- pageSizeOptions: A = ["10", "20", "50", "100"],
835
- autoLoad: g = !0,
836
- externalParams: i = {},
831
+ showSearch: r = !0,
832
+ showRefresh: o = !0,
833
+ defaultPageSize: y = 10,
834
+ pageSizeOptions: S = ["10", "20", "50", "100"],
835
+ autoLoad: h = !0,
836
+ externalParams: c = {},
837
837
  ...e
838
838
  }) => {
839
- const [x, u] = J([]), [q, d] = J(!1), [o, S] = J({
839
+ const [w, u] = Q([]), [q, m] = Q(!1), [a, C] = Q({
840
840
  current: 1,
841
- pageSize: m,
841
+ pageSize: y,
842
842
  total: 0
843
- }), [c, w] = J({}), [k, $] = J({}), [b] = Ce.useForm(), V = z(o);
844
- V.current = o;
845
- const _ = z(i);
846
- _.current = i;
847
- const P = z(!1), D = Ge(() => t.map((T) => {
848
- const { sortable: I, render: Q, ...ee } = T;
843
+ }), [i, E] = Q({}), [T, A] = Q({}), [v] = $e.useForm(), V = F(a);
844
+ V.current = a;
845
+ const _ = F(c);
846
+ _.current = c;
847
+ const P = F(!1), D = Xe(() => t.map((k) => {
848
+ const { sortable: I, render: Z, ...te } = k;
849
849
  return {
850
- ...ee,
850
+ ...te,
851
851
  sorter: I ? !0 : void 0,
852
- render: Q || ((pe) => pe)
852
+ render: Z || ((pe) => pe)
853
853
  };
854
- }), [t]), B = W(async (T = {}) => {
854
+ }), [t]), B = U(async (k = {}) => {
855
855
  if (p) {
856
- d(!0);
856
+ m(!0);
857
857
  try {
858
858
  const I = {
859
859
  page: V.current.current,
860
860
  pageSize: V.current.pageSize,
861
- sortField: k.field,
862
- sortOrder: k.order,
863
- searchParams: { ...c, ..._.current },
864
- ...T
865
- }, Q = await p(I);
866
- Q.success && (u(Q.data), S((ee) => ({
867
- ...ee,
868
- total: Q.total,
869
- current: I.page || ee.current
861
+ sortField: T.field,
862
+ sortOrder: T.order,
863
+ searchParams: { ...i, ..._.current },
864
+ ...k
865
+ }, Z = await p(I);
866
+ Z.success && (u(Z.data), C((te) => ({
867
+ ...te,
868
+ total: Z.total,
869
+ current: I.page || te.current
870
870
  })));
871
871
  } catch (I) {
872
872
  console.error("加载数据失败:", I);
873
873
  } finally {
874
- d(!1);
874
+ m(!1);
875
875
  }
876
876
  }
877
- }, [p, k, c]), U = W((T) => {
878
- w(T), S((I) => ({ ...I, current: 1 }));
879
- }, []), H = W(() => {
880
- b.resetFields(), w({}), S((T) => ({ ...T, current: 1 }));
881
- }, [b]), X = W(() => {
877
+ }, [p, T, i]), X = U((k) => {
878
+ E(k), C((I) => ({ ...I, current: 1 }));
879
+ }, []), z = U(() => {
880
+ v.resetFields(), E({}), C((k) => ({ ...k, current: 1 }));
881
+ }, [v]), K = U(() => {
882
882
  B();
883
- }, [B]), Z = W((T, I, Q) => {
884
- const ee = {
885
- current: T.current || 1,
886
- pageSize: T.pageSize || m,
887
- total: T.total || 0
883
+ }, [B]), ee = U((k, I, Z) => {
884
+ const te = {
885
+ current: k.current || 1,
886
+ pageSize: k.pageSize || y,
887
+ total: k.total || 0
888
888
  }, pe = {
889
- field: Q?.field,
890
- order: Q?.order
889
+ field: Z?.field,
890
+ order: Z?.order
891
891
  };
892
- S(ee), $(pe);
893
- }, [m]);
894
- return oe(() => {
895
- const T = Object.keys(i).length > 0;
896
- (g && !P.current || T) && (B(), P.current = !0);
897
- }, [g, i, B]), /* @__PURE__ */ n.jsxs("div", { children: [
898
- a && l.length > 0 && /* @__PURE__ */ n.jsx(Re, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ n.jsxs(
899
- Ce,
892
+ C(te), A(pe);
893
+ }, [y]);
894
+ return le(() => {
895
+ const k = Object.keys(c).length > 0;
896
+ (h && !P.current || k) && (B(), P.current = !0);
897
+ }, [h, c, B]), /* @__PURE__ */ n.jsxs("div", { children: [
898
+ r && l.length > 0 && /* @__PURE__ */ n.jsx(Pe, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ n.jsxs(
899
+ $e,
900
900
  {
901
- form: b,
901
+ form: v,
902
902
  layout: "inline",
903
- onFinish: U,
904
- initialValues: l.reduce((T, I) => (I.defaultValue !== void 0 && (T[I.key] = I.defaultValue), T), {}),
903
+ onFinish: X,
904
+ initialValues: l.reduce((k, I) => (I.defaultValue !== void 0 && (k[I.key] = I.defaultValue), k), {}),
905
905
  children: [
906
- l.map((T) => /* @__PURE__ */ n.jsx(Ce.Item, { name: T.key, label: T.label, children: T.type === "input" ? /* @__PURE__ */ n.jsx(
907
- Fe,
906
+ l.map((k) => /* @__PURE__ */ n.jsx($e.Item, { name: k.key, label: k.label, children: k.type === "input" ? /* @__PURE__ */ n.jsx(
907
+ Ke,
908
908
  {
909
- placeholder: T.placeholder || `请输入${T.label}`,
909
+ placeholder: k.placeholder || `请输入${k.label}`,
910
910
  style: { width: 200 }
911
911
  }
912
912
  ) : /* @__PURE__ */ n.jsx(
913
- Ve,
913
+ Oe,
914
914
  {
915
- placeholder: T.placeholder || `请选择${T.label}`,
915
+ placeholder: k.placeholder || `请选择${k.label}`,
916
916
  style: { width: 200 },
917
917
  allowClear: !0,
918
- children: T.options?.map((I) => /* @__PURE__ */ n.jsx(Nt, { value: I.value, children: I.label }, I.value))
918
+ children: k.options?.map((I) => /* @__PURE__ */ n.jsx(_t, { value: I.value, children: I.label }, I.value))
919
919
  }
920
- ) }, T.key)),
921
- /* @__PURE__ */ n.jsx(Ce.Item, { children: /* @__PURE__ */ n.jsxs(Qe, { children: [
922
- /* @__PURE__ */ n.jsx(xe, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ n.jsx(lt, {}), children: "查询" }),
923
- /* @__PURE__ */ n.jsx(xe, { onClick: H, children: "重置" }),
924
- r && /* @__PURE__ */ n.jsx(xe, { icon: /* @__PURE__ */ n.jsx(st, {}), onClick: X, children: "刷新" })
920
+ ) }, k.key)),
921
+ /* @__PURE__ */ n.jsx($e.Item, { children: /* @__PURE__ */ n.jsxs(rt, { children: [
922
+ /* @__PURE__ */ n.jsx(we, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ n.jsx(dt, {}), children: "查询" }),
923
+ /* @__PURE__ */ n.jsx(we, { onClick: z, children: "重置" }),
924
+ o && /* @__PURE__ */ n.jsx(we, { icon: /* @__PURE__ */ n.jsx(pt, {}), onClick: K, children: "刷新" })
925
925
  ] }) })
926
926
  ]
927
927
  }
928
928
  ) }),
929
929
  /* @__PURE__ */ n.jsx(
930
- Ie,
930
+ Be,
931
931
  {
932
932
  ...e,
933
933
  columns: D,
934
- dataSource: x,
934
+ dataSource: w,
935
935
  loading: q,
936
936
  pagination: {
937
- ...o,
937
+ ...a,
938
938
  showSizeChanger: !0,
939
939
  showQuickJumper: !0,
940
- showTotal: (T, I) => `第 ${I[0]}-${I[1]} 条/共 ${T} 条`,
941
- pageSizeOptions: A
940
+ showTotal: (k, I) => `第 ${I[0]}-${I[1]} 条/共 ${k} 条`,
941
+ pageSizeOptions: S
942
942
  },
943
- onChange: Z,
943
+ onChange: ee,
944
944
  scroll: { x: "max-content", y: "50vh" }
945
945
  }
946
946
  )
947
947
  ] });
948
948
  };
949
- Ct.__docgenInfo = {
949
+ $t.__docgenInfo = {
950
950
  displayName: "AdvancedTable",
951
951
  description: "高阶表格组件,支持异步请求、搜索、排序等功能",
952
952
  props: {
@@ -1013,73 +1013,73 @@ Ct.__docgenInfo = {
1013
1013
  }
1014
1014
  }
1015
1015
  };
1016
- function _e(t, p, l) {
1016
+ function Ve(t, p, l) {
1017
1017
  if (!t.current) return;
1018
- const a = /* @__PURE__ */ new Set(), r = {};
1018
+ const r = /* @__PURE__ */ new Set(), o = {};
1019
1019
  for (const u of p)
1020
- u.exclusionGroup && u.exclusionGroup !== "separator" && (a.add(u.exclusionGroup), r[u.exclusionGroup] || (r[u.exclusionGroup] = []), r[u.exclusionGroup].push({
1020
+ u.exclusionGroup && u.exclusionGroup !== "separator" && (r.add(u.exclusionGroup), o[u.exclusionGroup] || (o[u.exclusionGroup] = []), o[u.exclusionGroup].push({
1021
1021
  type: u.type,
1022
1022
  key: u.key,
1023
1023
  exclusionGroup: u.exclusionGroup
1024
1024
  }));
1025
- const m = {};
1026
- for (const u of a) {
1027
- m[u] = !1;
1028
- for (const q of r[u])
1025
+ const y = {};
1026
+ for (const u of r) {
1027
+ y[u] = !1;
1028
+ for (const q of o[u])
1029
1029
  if (q.type === "upload" && q.key) {
1030
1030
  if (l[q.key] !== null && l[q.key] !== void 0) {
1031
- m[u] = !0;
1031
+ y[u] = !0;
1032
1032
  break;
1033
1033
  }
1034
1034
  } else if (q.type === "variable" && q.key) {
1035
- const d = t.current.querySelector(
1035
+ const m = t.current.querySelector(
1036
1036
  `[data-type="variable"][data-key="${q.key}"]`
1037
1037
  );
1038
- if (d && d.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1039
- m[u] = !0;
1038
+ if (m && m.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1039
+ y[u] = !0;
1040
1040
  break;
1041
1041
  }
1042
1042
  }
1043
1043
  }
1044
- const A = p.some((u) => u.exclusionGroup === "separator"), i = Object.keys(m).filter(
1045
- (u) => m[u]
1044
+ const S = p.some((u) => u.exclusionGroup === "separator"), c = Object.keys(y).filter(
1045
+ (u) => y[u]
1046
1046
  ).length > 0;
1047
1047
  let e = null;
1048
- if (i && A) {
1048
+ if (c && S) {
1049
1049
  for (const u of p)
1050
- if (u.exclusionGroup && u.exclusionGroup !== "separator" && m[u.exclusionGroup]) {
1050
+ if (u.exclusionGroup && u.exclusionGroup !== "separator" && y[u.exclusionGroup]) {
1051
1051
  e = u.exclusionGroup;
1052
1052
  break;
1053
1053
  }
1054
1054
  }
1055
- for (const u of a) {
1055
+ for (const u of r) {
1056
1056
  const q = t.current.querySelectorAll(
1057
1057
  `[data-group="${u}"]`
1058
1058
  );
1059
- A && i && e ? u === e ? q.forEach((d) => {
1060
- d.classList.contains("required-upload-group") ? d.style.setProperty("display", "inline-flex", "important") : (d.classList.contains("exclusion-wrapper"), d.style.setProperty("display", "inline-block", "important"));
1061
- }) : q.forEach((d) => {
1062
- d.style.display = "none", d.style.setProperty("display", "none", "important");
1063
- }) : q.forEach((d) => {
1064
- d.classList.contains("required-upload-group") ? d.style.setProperty("display", "inline-flex", "important") : (d.classList.contains("exclusion-wrapper"), d.style.setProperty("display", "inline-block", "important"));
1059
+ S && c && e ? u === e ? q.forEach((m) => {
1060
+ m.classList.contains("required-upload-group") ? m.style.setProperty("display", "inline-flex", "important") : (m.classList.contains("exclusion-wrapper"), m.style.setProperty("display", "inline-block", "important"));
1061
+ }) : q.forEach((m) => {
1062
+ m.style.display = "none", m.style.setProperty("display", "none", "important");
1063
+ }) : q.forEach((m) => {
1064
+ m.classList.contains("required-upload-group") ? m.style.setProperty("display", "inline-flex", "important") : (m.classList.contains("exclusion-wrapper"), m.style.setProperty("display", "inline-block", "important"));
1065
1065
  });
1066
1066
  }
1067
1067
  t.current.querySelectorAll(
1068
1068
  '[data-group="separator"]'
1069
1069
  ).forEach((u) => {
1070
- u.style.display = i ? "none" : "inline";
1070
+ u.style.display = c ? "none" : "inline";
1071
1071
  });
1072
1072
  }
1073
- function je(t, p, l, a) {
1073
+ function Le(t, p, l, r) {
1074
1074
  if (!t.current) {
1075
- a(!1);
1075
+ r(!1);
1076
1076
  return;
1077
1077
  }
1078
- const r = [];
1079
- for (let i = 0; i < p.length; i++) {
1080
- const e = p[i];
1078
+ const o = [];
1079
+ for (let c = 0; c < p.length; c++) {
1080
+ const e = p[c];
1081
1081
  if ((e.type === "variable" || e.type === "upload" || e.type === "multi-variable") && e.required && e.key) {
1082
- r.push({
1082
+ o.push({
1083
1083
  exclusionGroup: e.exclusionGroup || "",
1084
1084
  key: e.key,
1085
1085
  type: e.type === "multi-variable" ? "variable" : e.type,
@@ -1088,10 +1088,10 @@ function je(t, p, l, a) {
1088
1088
  continue;
1089
1089
  }
1090
1090
  if (e.type === "text" && e.className?.includes("rte-text-required") && e.exclusionGroup)
1091
- for (let x = i + 1; x < p.length; x++) {
1092
- const u = p[x];
1091
+ for (let w = c + 1; w < p.length; w++) {
1092
+ const u = p[w];
1093
1093
  if (u.exclusionGroup === e.exclusionGroup && (u.type === "variable" || u.type === "upload") && u.key) {
1094
- r.push({
1094
+ o.push({
1095
1095
  exclusionGroup: e.exclusionGroup,
1096
1096
  key: u.key,
1097
1097
  type: u.type
@@ -1100,178 +1100,178 @@ function je(t, p, l, a) {
1100
1100
  }
1101
1101
  }
1102
1102
  }
1103
- const m = p.some((i) => i.exclusionGroup === "separator");
1104
- let A = !1;
1105
- if (m && r.length > 1) {
1106
- const i = p.findIndex((u) => u.exclusionGroup === "separator"), e = r.filter((u) => p.findIndex(
1107
- (d) => (d.type === "variable" || d.type === "upload") && d.key === u.key && d.exclusionGroup === u.exclusionGroup
1108
- ) < i), x = r.filter((u) => p.findIndex(
1109
- (d) => (d.type === "variable" || d.type === "upload") && d.key === u.key && d.exclusionGroup === u.exclusionGroup
1110
- ) > i);
1111
- A = e.length > 0 && x.length > 0;
1103
+ const y = p.some((c) => c.exclusionGroup === "separator");
1104
+ let S = !1;
1105
+ if (y && o.length > 1) {
1106
+ const c = p.findIndex((u) => u.exclusionGroup === "separator"), e = o.filter((u) => p.findIndex(
1107
+ (m) => (m.type === "variable" || m.type === "upload") && m.key === u.key && m.exclusionGroup === u.exclusionGroup
1108
+ ) < c), w = o.filter((u) => p.findIndex(
1109
+ (m) => (m.type === "variable" || m.type === "upload") && m.key === u.key && m.exclusionGroup === u.exclusionGroup
1110
+ ) > c);
1111
+ S = e.length > 0 && w.length > 0;
1112
1112
  }
1113
- if (r.length === 0) {
1113
+ if (o.length === 0) {
1114
1114
  if (p.length === 0) {
1115
1115
  if (!t.current) {
1116
- a(!1);
1116
+ r(!1);
1117
1117
  return;
1118
1118
  }
1119
- const i = t.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
1120
- a(i.length > 0);
1119
+ const c = t.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
1120
+ r(c.length > 0);
1121
1121
  return;
1122
1122
  }
1123
- a(!0);
1123
+ r(!0);
1124
1124
  return;
1125
1125
  }
1126
- const g = r.filter((i) => {
1126
+ const h = o.filter((c) => {
1127
1127
  if (!t.current) return !1;
1128
1128
  const e = t.current.querySelectorAll(
1129
- `[data-group="${i.exclusionGroup}"]`
1129
+ `[data-group="${c.exclusionGroup}"]`
1130
1130
  );
1131
1131
  return e.length === 0 ? !1 : e[0].style.display !== "none";
1132
1132
  });
1133
- if (g.length === 0) {
1134
- a(!0);
1133
+ if (h.length === 0) {
1134
+ r(!0);
1135
1135
  return;
1136
1136
  }
1137
- if (A) {
1138
- let i = !1;
1139
- for (const e of g)
1137
+ if (S) {
1138
+ let c = !1;
1139
+ for (const e of h)
1140
1140
  if (e.type === "upload" && e.key) {
1141
1141
  if (l[e.key] !== null && l[e.key] !== void 0) {
1142
- i = !0;
1142
+ c = !0;
1143
1143
  break;
1144
1144
  }
1145
1145
  } else if (e.type === "variable" && e.key)
1146
1146
  if (e.isMultiVariable) {
1147
- const x = t.current.querySelectorAll(
1147
+ const w = t.current.querySelectorAll(
1148
1148
  `[data-type="variable"][data-multi-key="${e.key}"]`
1149
1149
  );
1150
1150
  let u = !1;
1151
- for (const q of Array.from(x))
1151
+ for (const q of Array.from(w))
1152
1152
  if (q.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1153
1153
  u = !0;
1154
1154
  break;
1155
1155
  }
1156
1156
  if (u) {
1157
- i = !0;
1157
+ c = !0;
1158
1158
  break;
1159
1159
  }
1160
1160
  } else {
1161
- const x = t.current.querySelector(
1161
+ const w = t.current.querySelector(
1162
1162
  `[data-type="variable"][data-key="${e.key}"]`
1163
1163
  );
1164
- if (x && x.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1165
- i = !0;
1164
+ if (w && w.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1165
+ c = !0;
1166
1166
  break;
1167
1167
  }
1168
1168
  }
1169
- a(i);
1169
+ r(c);
1170
1170
  } else {
1171
- let i = !0;
1172
- for (const e of g)
1171
+ let c = !0;
1172
+ for (const e of h)
1173
1173
  if (e.type === "upload" && e.key) {
1174
1174
  if (l[e.key] === null || l[e.key] === void 0) {
1175
- i = !1;
1175
+ c = !1;
1176
1176
  break;
1177
1177
  }
1178
1178
  } else if (e.type === "variable" && e.key)
1179
1179
  if (e.isMultiVariable) {
1180
- const x = t.current.querySelectorAll(
1180
+ const w = t.current.querySelectorAll(
1181
1181
  `[data-type="variable"][data-multi-key="${e.key}"]`
1182
1182
  );
1183
1183
  let u = !1;
1184
- for (const q of Array.from(x))
1184
+ for (const q of Array.from(w))
1185
1185
  if (q.innerText.replace(/[\u200B\n]/g, "").trim().length > 0) {
1186
1186
  u = !0;
1187
1187
  break;
1188
1188
  }
1189
1189
  if (!u) {
1190
- i = !1;
1190
+ c = !1;
1191
1191
  break;
1192
1192
  }
1193
1193
  } else {
1194
- const x = t.current.querySelector(
1194
+ const w = t.current.querySelector(
1195
1195
  `[data-type="variable"][data-key="${e.key}"]`
1196
1196
  );
1197
- if (!x) {
1198
- i = !1;
1197
+ if (!w) {
1198
+ c = !1;
1199
1199
  break;
1200
1200
  }
1201
- if (x.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
1202
- i = !1;
1201
+ if (w.innerText.replace(/[\u200B\n]/g, "").trim().length === 0) {
1202
+ c = !1;
1203
1203
  break;
1204
1204
  }
1205
1205
  }
1206
- a(i);
1206
+ r(c);
1207
1207
  }
1208
1208
  }
1209
- function $e(t, p) {
1209
+ function Ie(t, p) {
1210
1210
  if (!t.current) return;
1211
- t.current.querySelectorAll('[data-type="variable"]').forEach((a) => {
1212
- const r = a.innerText.replace(/\n/g, "");
1213
- r.replace(/\u200B/g, "") ? a.classList.remove("show-placeholder") : (r !== "​" && (a.innerText = "​"), a.classList.add("show-placeholder"));
1211
+ t.current.querySelectorAll('[data-type="variable"]').forEach((r) => {
1212
+ const o = r.innerText.replace(/\n/g, "");
1213
+ o.replace(/\u200B/g, "") ? r.classList.remove("show-placeholder") : (o !== "​" && (r.innerText = "​"), r.classList.add("show-placeholder"));
1214
1214
  });
1215
1215
  }
1216
- function St(t, p, l, a, r, m = {}, A) {
1216
+ function jt(t, p, l, r, o, y = {}, S) {
1217
1217
  if (!t.current) return;
1218
- let g = "", i = 0;
1219
- for (; i < p.length; ) {
1220
- const e = p[i], x = i + 1 < p.length ? p[i + 1] : null;
1221
- if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && x) {
1222
- const c = x.type === "upload" && x.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === x.exclusionGroup, w = x.type === "variable" && x.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === x.exclusionGroup;
1223
- if (c) {
1224
- const $ = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, b = "</span>";
1218
+ let h = "", c = 0;
1219
+ for (; c < p.length; ) {
1220
+ const e = p[c], w = c + 1 < p.length ? p[c + 1] : null;
1221
+ if (e.type === "text" && (e.text?.includes("icon-bitian") || e.className === "rte-text-required") && w) {
1222
+ const i = w.type === "upload" && w.exclusionGroup === "fileInput" && e.exclusionGroup === "fileInput" && e.exclusionGroup === w.exclusionGroup, E = w.type === "variable" && w.exclusionGroup === "textInput" && e.exclusionGroup === "textInput" && e.exclusionGroup === w.exclusionGroup;
1223
+ if (i) {
1224
+ const A = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, v = "</span>";
1225
1225
  let V = "";
1226
1226
  e.className ? V = `<span class="${e.className}">${e.text ?? ""}</span>` : V = e.text ?? "";
1227
- const _ = x, P = l[_.key] !== null && l[_.key] !== void 0, D = P ? l[_.key]?.name : _.text, B = P ? "" : "hidden", U = _.tooltip && !P ? "" : "hidden", H = P ? "has-file" : "", X = P && D ? ` data-file-name="${D.replace(/"/g, "&quot;")}"` : "", Z = `<span contenteditable="false" data-type="upload" data-key="${_.key}" class="upload-chip"><span class="upload-inner-wrapper ${H}"><span class="upload-icon">${P ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${X}>${D || _.text}</span>${_.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${U}" data-upload-key="${_.key}" data-tooltip="${_.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${B}" title="移除文件">×</span></span></span>`;
1228
- g += $ + V + Z + b, i += 2;
1227
+ const _ = w, P = l[_.key] !== null && l[_.key] !== void 0, D = P ? l[_.key]?.name : _.text, B = P ? "" : "hidden", X = _.tooltip && !P ? "" : "hidden", z = P ? "has-file" : "", K = P && D ? ` data-file-name="${D.replace(/"/g, "&quot;")}"` : "", ee = `<span contenteditable="false" data-type="upload" data-key="${_.key}" class="upload-chip"><span class="upload-inner-wrapper ${z}"><span class="upload-icon">${P ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${K}>${D || _.text}</span>${_.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${X}" data-upload-key="${_.key}" data-tooltip="${_.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${B}" title="移除文件">×</span></span></span>`;
1228
+ h += A + V + ee + v, c += 2;
1229
1229
  continue;
1230
1230
  }
1231
- if (w) {
1232
- const $ = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, b = "</span>";
1231
+ if (E) {
1232
+ const A = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, v = "</span>";
1233
1233
  let V = "";
1234
1234
  e.className ? V = `<span class="${e.className}">${e.text ?? ""}</span>` : V = e.text ?? "";
1235
- const _ = x, D = (_.key ? r[_.key] : void 0) || _.text || "", B = !D, U = B ? "​" : D, H = B ? "show-placeholder" : "", X = _.exclusionGroup ? ` data-group="${_.exclusionGroup}"` : "", Z = _.tooltip ? ` data-tooltip="${_.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${_.key || ""}"` : "", T = _.tooltip && B ? "" : "hidden", I = `<span contenteditable="true" data-type="variable" data-key="${_.key}" data-placeholder="${_.placeholder || ""}"${X}${Z} class="variable-chip ${H}">${U}${_.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${T}" data-variable-key="${_.key}" data-tooltip="${_.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1236
- g += $ + V + I + b, i += 2;
1235
+ const _ = w, D = (_.key ? o[_.key] : void 0) || _.text || "", B = !D, X = B ? "​" : D, z = B ? "show-placeholder" : "", K = _.exclusionGroup ? ` data-group="${_.exclusionGroup}"` : "", ee = _.tooltip ? ` data-tooltip="${_.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${_.key || ""}"` : "", k = _.tooltip && B ? "" : "hidden", I = `<span contenteditable="true" data-type="variable" data-key="${_.key}" data-placeholder="${_.placeholder || ""}"${K}${ee} class="variable-chip ${z}">${X}${_.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${k}" data-variable-key="${_.key}" data-tooltip="${_.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1236
+ h += A + V + I + v, c += 2;
1237
1237
  continue;
1238
1238
  }
1239
1239
  }
1240
- const q = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", d = e.exclusionGroup ? `<span ${q} class="exclusion-wrapper">` : "", o = e.exclusionGroup ? "</span>" : "";
1241
- let S = "";
1240
+ const q = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", m = e.exclusionGroup ? `<span ${q} class="exclusion-wrapper">` : "", a = e.exclusionGroup ? "</span>" : "";
1241
+ let C = "";
1242
1242
  if (e.type === "tag") {
1243
- const w = a || A === "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>', k = a ? ' data-locked="true"' : "", $ = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1244
- S = `<span contenteditable="false" class="tag-node group"${k}${$}><span class="tag-label">${e.text}</span>${w}</span>`;
1243
+ const E = r || S === "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>', T = r ? ' data-locked="true"' : "", A = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-tag-key="${e.key || ""}"` : "";
1244
+ C = `<span contenteditable="false" class="tag-node group"${T}${A}><span class="tag-label">${e.text}</span>${E}</span>`;
1245
1245
  } else if (e.type === "text") {
1246
- const c = a ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"';
1247
- e.className ? S = `<span class="${e.className}"${c}>${e.text ?? ""}</span>` : S = a ? `<span${c}>${e.text ?? ""}</span>` : `<span contenteditable="false">${e.text ?? ""}</span>`;
1246
+ const i = r ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"';
1247
+ e.className ? C = `<span class="${e.className}"${i}>${e.text ?? ""}</span>` : C = r ? `<span${i}>${e.text ?? ""}</span>` : `<span contenteditable="false">${e.text ?? ""}</span>`;
1248
1248
  } else if (e.type === "variable" && e.key) {
1249
- const w = r[e.key] || e.text || "", k = !w, $ = k ? "​" : w, b = k ? "show-placeholder" : "", V = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", _ = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", P = e.tooltip && k ? "" : "hidden", D = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${V}${_} class="variable-chip ${b}">${$}${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>`;
1250
- e.required ? S = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${D}</span>` : S = D;
1249
+ const E = o[e.key] || e.text || "", T = !E, A = T ? "​" : E, v = T ? "show-placeholder" : "", V = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", _ = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", P = e.tooltip && T ? "" : "hidden", D = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${V}${_} class="variable-chip ${v}">${A}${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>`;
1250
+ e.required ? C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${D}</span>` : C = D;
1251
1251
  } else if (e.type === "upload" && e.key) {
1252
- const c = l[e.key] !== null && l[e.key] !== void 0, w = c ? l[e.key]?.name : e.text, k = c ? "" : "hidden", $ = e.tooltip && !c ? "" : "hidden", b = c ? "has-file" : "", V = c && w ? ` data-file-name="${w.replace(/"/g, "&quot;")}"` : "", _ = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${b}"><span class="upload-icon">${c ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${V}>${w || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${$}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${k}" title="移除文件">×</span></span></span>`;
1253
- e.required ? S = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${_}</span>` : S = _;
1252
+ const i = l[e.key] !== null && l[e.key] !== void 0, E = i ? l[e.key]?.name : e.text, T = i ? "" : "hidden", A = e.tooltip && !i ? "" : "hidden", v = i ? "has-file" : "", V = i && E ? ` data-file-name="${E.replace(/"/g, "&quot;")}"` : "", _ = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${v}"><span class="upload-icon">${i ? "<i class='iconfont icon-exlwenjian'></i>" : "<i class='iconfont icon-shangchuan1'></i>"}</span><span class="upload-label"${V}>${E || e.text}</span>${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi upload-info-icon ${A}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" title="提示"></i>` : ""}<span class="file-remove-btn ${T}" title="移除文件">×</span></span></span>`;
1253
+ e.required ? C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${_}</span>` : C = _;
1254
1254
  } else if (e.type === "multi-variable" && e.key) {
1255
- const c = e.maxCount || 9, w = m[e.key] || 1, k = Math.min(w, c);
1256
- let $ = "";
1257
- for (let b = 0; b < k; b++) {
1258
- const V = `${e.key}_${b}`, _ = r[V] || "", P = !_, D = P ? "​" : _, B = P ? "show-placeholder" : "", U = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", H = e.tooltip && P ? "" : "hidden", X = `<span contenteditable="true" data-type="variable" data-key="${V}" data-multi-key="${e.key}" data-index="${b}" data-placeholder="${e.placeholder || ""}"${U} class="variable-chip ${B}">${D}${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>`;
1259
- $ += X;
1255
+ const i = e.maxCount || 9, E = y[e.key] || 1, T = Math.min(E, i);
1256
+ let A = "";
1257
+ for (let v = 0; v < T; v++) {
1258
+ const V = `${e.key}_${v}`, _ = o[V] || "", P = !_, D = P ? "​" : _, B = P ? "show-placeholder" : "", X = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", z = e.tooltip && P ? "" : "hidden", K = `<span contenteditable="true" data-type="variable" data-key="${V}" data-multi-key="${e.key}" data-index="${v}" data-placeholder="${e.placeholder || ""}"${X} class="variable-chip ${B}">${D}${e.tooltip ? `<i contenteditable="false" class="iconfont icon-tishi variable-info-icon ${z}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" title="提示"></i>` : ""}</span>`;
1259
+ A += K;
1260
1260
  }
1261
- e.required ? S = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${$}</span>` : S = $;
1261
+ e.required ? C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${A}</span>` : C = A;
1262
1262
  }
1263
- g += d + S + o, i++;
1263
+ h += m + C + a, c++;
1264
1264
  }
1265
- t.current && (t.current.innerHTML = g, setTimeout(() => {
1265
+ t.current && (t.current.innerHTML = h, setTimeout(() => {
1266
1266
  if (!t.current) return;
1267
- t.current.querySelectorAll('[data-type="variable"]').forEach((x) => {
1268
- const u = x.innerText.replace(/\n/g, "");
1269
- u.replace(/\u200B/g, "") ? x.classList.remove("show-placeholder") : (u !== "​" && (x.innerText = "​"), x.classList.add("show-placeholder"));
1267
+ t.current.querySelectorAll('[data-type="variable"]').forEach((w) => {
1268
+ const u = w.innerText.replace(/\n/g, "");
1269
+ u.replace(/\u200B/g, "") ? w.classList.remove("show-placeholder") : (u !== "​" && (w.innerText = "​"), w.classList.add("show-placeholder"));
1270
1270
  });
1271
1271
  }, 0));
1272
1272
  }
1273
- function qt(t, p, l, a, r = {}, m, A, g) {
1274
- const i = W(() => {
1273
+ function Rt(t, p, l, r, o = {}, y, S, h) {
1274
+ const c = U(() => {
1275
1275
  if (!t.current) return;
1276
1276
  if (p.length === 0) {
1277
1277
  t.current.innerHTML = "";
@@ -1286,810 +1286,821 @@ function qt(t, p, l, a, r = {}, m, A, g) {
1286
1286
  }
1287
1287
  }, 100)) : t.current.querySelectorAll(
1288
1288
  '[data-type="variable"]'
1289
- ).forEach((d) => {
1290
- const o = d.dataset.key;
1291
- if (o) {
1292
- const S = d.innerText.replace(/[\u200B\n]/g, "").trim();
1293
- S && (e[o] = S);
1289
+ ).forEach((m) => {
1290
+ const a = m.dataset.key;
1291
+ if (a) {
1292
+ const C = m.innerText.replace(/[\u200B\n]/g, "").trim();
1293
+ C && (e[a] = C);
1294
1294
  }
1295
- }), St(t, p, l, a, e, r, g), m?.current) {
1296
- const { key: q, offset: d } = m.current;
1295
+ }), jt(t, p, l, r, e, o, h), y?.current) {
1296
+ const { key: q, offset: m } = y.current;
1297
1297
  setTimeout(() => {
1298
1298
  if (!t.current) return;
1299
- const o = t.current.querySelector(
1299
+ const a = t.current.querySelector(
1300
1300
  `[data-type="variable"][data-key="${q}"]`
1301
1301
  );
1302
- if (o) {
1302
+ if (a) {
1303
1303
  try {
1304
- const S = document.createRange(), c = document.createTreeWalker(
1305
- o,
1304
+ const C = document.createRange(), i = document.createTreeWalker(
1305
+ a,
1306
1306
  NodeFilter.SHOW_TEXT,
1307
1307
  null
1308
1308
  );
1309
- let w = 0, k = null, $ = 0;
1310
- for (; c.nextNode(); ) {
1311
- const b = c.currentNode, V = b.textContent?.length || 0;
1312
- if (w + V >= d) {
1313
- k = b, $ = d - w;
1309
+ let E = 0, T = null, A = 0;
1310
+ for (; i.nextNode(); ) {
1311
+ const v = i.currentNode, V = v.textContent?.length || 0;
1312
+ if (E + V >= m) {
1313
+ T = v, A = m - E;
1314
1314
  break;
1315
1315
  }
1316
- w += V;
1316
+ E += V;
1317
1317
  }
1318
- if (k) {
1319
- S.setStart(k, Math.min($, k.textContent?.length || 0)), S.collapse(!0);
1320
- const b = window.getSelection();
1321
- b && (b.removeAllRanges(), b.addRange(S), o.focus());
1318
+ if (T) {
1319
+ C.setStart(T, Math.min(A, T.textContent?.length || 0)), C.collapse(!0);
1320
+ const v = window.getSelection();
1321
+ v && (v.removeAllRanges(), v.addRange(C), a.focus());
1322
1322
  } else {
1323
- S.selectNodeContents(o), S.collapse(!1);
1324
- const b = window.getSelection();
1325
- b && (b.removeAllRanges(), b.addRange(S), o.focus());
1323
+ C.selectNodeContents(a), C.collapse(!1);
1324
+ const v = window.getSelection();
1325
+ v && (v.removeAllRanges(), v.addRange(C), a.focus());
1326
1326
  }
1327
1327
  } catch {
1328
- const S = document.createRange();
1329
- S.selectNodeContents(o), S.collapse(!1);
1330
- const c = window.getSelection();
1331
- c && (c.removeAllRanges(), c.addRange(S), o.focus());
1328
+ const C = document.createRange();
1329
+ C.selectNodeContents(a), C.collapse(!1);
1330
+ const i = window.getSelection();
1331
+ i && (i.removeAllRanges(), i.addRange(C), a.focus());
1332
1332
  }
1333
- m.current = null;
1333
+ y.current = null;
1334
1334
  }
1335
1335
  }, 0);
1336
1336
  }
1337
- }, [p, l, a, t, r, m, A, g]);
1338
- oe(() => {
1339
- i();
1340
- }, [i]);
1337
+ }, [p, l, r, t, o, y, S, h]);
1338
+ le(() => {
1339
+ c();
1340
+ }, [c]);
1341
1341
  }
1342
- function At(t, p, l, a) {
1343
- oe(() => {
1344
- const r = t.current;
1345
- if (!r) return;
1346
- const m = (g) => {
1347
- const i = g.target?.closest(".upload-info-icon");
1348
- if (i && i.classList.contains("upload-info-icon")) {
1349
- const e = i.dataset.uploadKey;
1350
- e && a({ key: e, anchorEl: i, type: "upload" });
1342
+ function It(t, p, l, r) {
1343
+ le(() => {
1344
+ const o = t.current;
1345
+ if (!o) return;
1346
+ const y = (h) => {
1347
+ const c = h.target?.closest(".upload-info-icon");
1348
+ if (c && c.classList.contains("upload-info-icon")) {
1349
+ const e = c.dataset.uploadKey;
1350
+ e && r({ key: e, anchorEl: c, type: "upload" });
1351
1351
  }
1352
- }, A = (g) => {
1353
- const i = g.target?.closest(".upload-info-icon"), e = g.relatedTarget;
1354
- i && i.classList.contains("upload-info-icon") && (!e || !r.contains(e) ? a(null) : e.closest(".upload-info-icon") || a(null));
1352
+ }, S = (h) => {
1353
+ const c = h.target?.closest(".upload-info-icon"), e = h.relatedTarget;
1354
+ c && c.classList.contains("upload-info-icon") && (!e || !o.contains(e) ? r(null) : e.closest(".upload-info-icon") || r(null));
1355
1355
  };
1356
- return r.addEventListener("mouseover", m, !0), r.addEventListener("mouseout", A, !0), () => {
1357
- r.removeEventListener("mouseover", m, !0), r.removeEventListener("mouseout", A, !0);
1356
+ return o.addEventListener("mouseover", y, !0), o.addEventListener("mouseout", S, !0), () => {
1357
+ o.removeEventListener("mouseover", y, !0), o.removeEventListener("mouseout", S, !0);
1358
1358
  };
1359
- }, [p, l, t, a]);
1359
+ }, [p, l, t, r]);
1360
1360
  }
1361
- function $t(t, p, l, a) {
1362
- oe(() => {
1361
+ function Vt(t, p, l, r) {
1362
+ le(() => {
1363
1363
  if (!t.current) return;
1364
- const r = (i) => {
1365
- if (a === "hideTagClose")
1364
+ const o = (c) => {
1365
+ if (r === "hideTagClose")
1366
1366
  return;
1367
- const e = i.currentTarget, x = e.dataset.tooltip, u = e.dataset.tagKey || "";
1368
- x && l({ key: u, anchorEl: e, type: "tag" });
1369
- }, m = () => {
1367
+ const e = c.currentTarget, w = e.dataset.tooltip, u = e.dataset.tagKey || "";
1368
+ w && l({ key: u, anchorEl: e, type: "tag" });
1369
+ }, y = () => {
1370
1370
  l(null);
1371
1371
  };
1372
- let A;
1373
- const g = () => {
1372
+ let S;
1373
+ const h = () => {
1374
1374
  if (!t.current) return;
1375
1375
  t.current.querySelectorAll(
1376
1376
  ".tag-node[data-tooltip]"
1377
1377
  ).forEach((e) => {
1378
- e.addEventListener("mouseenter", r), e.addEventListener("mouseleave", m);
1378
+ e.addEventListener("mouseenter", o), e.addEventListener("mouseleave", y);
1379
1379
  });
1380
1380
  };
1381
- return A = requestAnimationFrame(() => {
1382
- A = requestAnimationFrame(g);
1381
+ return S = requestAnimationFrame(() => {
1382
+ S = requestAnimationFrame(h);
1383
1383
  }), () => {
1384
- cancelAnimationFrame(A), t.current && t.current.querySelectorAll(
1384
+ cancelAnimationFrame(S), t.current && t.current.querySelectorAll(
1385
1385
  ".tag-node[data-tooltip]"
1386
1386
  ).forEach((e) => {
1387
- e.removeEventListener("mouseenter", r), e.removeEventListener("mouseleave", m);
1387
+ e.removeEventListener("mouseenter", o), e.removeEventListener("mouseleave", y);
1388
1388
  });
1389
1389
  };
1390
- }, [p, t, l, a]);
1390
+ }, [p, t, l, r]);
1391
1391
  }
1392
- function _t(t, p, l) {
1393
- oe(() => {
1394
- const a = t.current;
1395
- if (!a) return;
1396
- const r = (A) => {
1397
- const g = A.target?.closest(".variable-info-icon");
1398
- if (g && g.classList.contains("variable-info-icon")) {
1399
- const i = g.dataset.variableKey;
1400
- i && l({ key: i, anchorEl: g, type: "variable" });
1392
+ function Lt(t, p, l) {
1393
+ le(() => {
1394
+ const r = t.current;
1395
+ if (!r) return;
1396
+ const o = (S) => {
1397
+ const h = S.target?.closest(".variable-info-icon");
1398
+ if (h && h.classList.contains("variable-info-icon")) {
1399
+ const c = h.dataset.variableKey;
1400
+ c && l({ key: c, anchorEl: h, type: "variable" });
1401
1401
  }
1402
- }, m = (A) => {
1403
- const g = A.target?.closest(".variable-info-icon"), i = A.relatedTarget;
1404
- g && g.classList.contains("variable-info-icon") && (!i || !a.contains(i) ? l(null) : i.closest(".variable-info-icon") || l(null));
1402
+ }, y = (S) => {
1403
+ const h = S.target?.closest(".variable-info-icon"), c = S.relatedTarget;
1404
+ h && h.classList.contains("variable-info-icon") && (!c || !r.contains(c) ? l(null) : c.closest(".variable-info-icon") || l(null));
1405
1405
  };
1406
- return a.addEventListener("mouseover", r, !0), a.addEventListener("mouseout", m, !0), () => {
1407
- a.removeEventListener("mouseover", r, !0), a.removeEventListener("mouseout", m, !0);
1406
+ return r.addEventListener("mouseover", o, !0), r.addEventListener("mouseout", y, !0), () => {
1407
+ r.removeEventListener("mouseover", o, !0), r.removeEventListener("mouseout", y, !0);
1408
1408
  };
1409
1409
  }, [p, t, l]);
1410
1410
  }
1411
- function jt(t, p, l, a) {
1412
- oe(() => {
1411
+ function Pt(t, p, l, r) {
1412
+ le(() => {
1413
1413
  if (!t.current) return;
1414
- const r = (i) => {
1415
- const e = i.currentTarget;
1416
- e.dataset.fileName && a({ key: "", anchorEl: e, type: "upload-label" });
1417
- }, m = () => {
1418
- a(null);
1414
+ const o = (c) => {
1415
+ const e = c.currentTarget;
1416
+ e.dataset.fileName && r({ key: "", anchorEl: e, type: "upload-label" });
1417
+ }, y = () => {
1418
+ r(null);
1419
1419
  };
1420
- let A;
1421
- const g = () => {
1420
+ let S;
1421
+ const h = () => {
1422
1422
  if (!t.current) return;
1423
1423
  t.current.querySelectorAll(
1424
1424
  ".upload-label[data-file-name]"
1425
1425
  ).forEach((e) => {
1426
- e.addEventListener("mouseenter", r), e.addEventListener("mouseleave", m);
1426
+ e.addEventListener("mouseenter", o), e.addEventListener("mouseleave", y);
1427
1427
  });
1428
1428
  };
1429
- return A = requestAnimationFrame(() => {
1430
- A = requestAnimationFrame(g);
1429
+ return S = requestAnimationFrame(() => {
1430
+ S = requestAnimationFrame(h);
1431
1431
  }), () => {
1432
- cancelAnimationFrame(A), t.current && t.current.querySelectorAll(
1432
+ cancelAnimationFrame(S), t.current && t.current.querySelectorAll(
1433
1433
  ".upload-label[data-file-name]"
1434
1434
  ).forEach((e) => {
1435
- e.removeEventListener("mouseenter", r), e.removeEventListener("mouseleave", m);
1435
+ e.removeEventListener("mouseenter", o), e.removeEventListener("mouseleave", y);
1436
1436
  });
1437
1437
  };
1438
- }, [p, l, t, a]);
1438
+ }, [p, l, t, r]);
1439
1439
  }
1440
- function Rt(t, p, l, a) {
1441
- oe(() => {
1442
- _e(t, p, l), je(t, p, l, a);
1443
- }, [l, p, t, a]);
1440
+ function Bt(t, p, l, r) {
1441
+ le(() => {
1442
+ Ve(t, p, l), Le(t, p, l, r);
1443
+ }, [l, p, t, r]);
1444
1444
  }
1445
- function It(t, p) {
1446
- oe(() => {
1445
+ function Ot(t, p) {
1446
+ le(() => {
1447
1447
  if (!t.current) return;
1448
- let l = !1, a = 0;
1449
- const r = () => {
1448
+ let l = !1, r = 0;
1449
+ const o = () => {
1450
1450
  l = !0;
1451
- }, m = () => {
1452
- l = !1, a = Date.now();
1451
+ }, y = () => {
1452
+ l = !1, r = Date.now();
1453
1453
  };
1454
- let A = !1, g = 0;
1455
- const i = () => {
1456
- A = !0;
1454
+ let S = !1, h = 0;
1455
+ const c = () => {
1456
+ S = !0;
1457
1457
  }, e = () => {
1458
- A = !1, g = Date.now();
1459
- }, x = () => {
1460
- g = Date.now();
1458
+ S = !1, h = Date.now();
1459
+ }, w = () => {
1460
+ h = Date.now();
1461
1461
  }, u = () => {
1462
1462
  if (!t.current) return;
1463
- const d = window.getSelection();
1464
- if (!d || d.rangeCount === 0 || p.current || l || A || Date.now() - g < 500)
1465
- return;
1466
- const o = d.getRangeAt(0);
1467
- if (!o.collapsed) {
1468
- t.current.contains(o.commonAncestorContainer) || d.removeAllRanges();
1463
+ const m = window.getSelection();
1464
+ if (!m || m.rangeCount === 0 || p.current || l || S || Date.now() - h < 500)
1469
1465
  return;
1470
- }
1471
- const S = d.anchorNode;
1472
- if (!S) return;
1473
- if (!t.current.contains(S)) {
1474
- d.removeAllRanges();
1466
+ const a = m.getRangeAt(0);
1467
+ if (!a.collapsed)
1468
+ return t.current.contains(a.commonAncestorContainer), void 0;
1469
+ const C = m.anchorNode;
1470
+ if (!C || !t.current.contains(C))
1475
1471
  return;
1476
- }
1477
- let c = null;
1478
- if (S.nodeType === Node.ELEMENT_NODE ? c = S.closest('[data-type="variable"]') : S.nodeType === Node.TEXT_NODE && S.parentElement && (c = S.parentElement.closest('[data-type="variable"]')), !c) {
1479
- if (Date.now() - a > 500)
1472
+ let i = null;
1473
+ if (C.nodeType === Node.ELEMENT_NODE ? i = C.closest('[data-type="variable"]') : C.nodeType === Node.TEXT_NODE && C.parentElement && (i = C.parentElement.closest('[data-type="variable"]')), !i) {
1474
+ if (Date.now() - r > 500)
1480
1475
  return;
1481
- const w = t.current.querySelectorAll('[data-type="variable"]');
1482
- if (w.length > 0) {
1483
- let k = null;
1484
- for (const $ of Array.from(w))
1485
- if ($.style.display !== "none") {
1486
- k = $;
1476
+ const E = t.current.querySelectorAll('[data-type="variable"]');
1477
+ if (E.length > 0) {
1478
+ let T = null;
1479
+ for (const A of Array.from(E))
1480
+ if (A.style.display !== "none") {
1481
+ T = A;
1487
1482
  break;
1488
1483
  }
1489
- if (!k && w.length > 0 && (k = w[0]), k) {
1490
- const $ = document.createRange();
1491
- $.selectNodeContents(k), $.collapse(!1), d.removeAllRanges(), d.addRange($), k.focus();
1484
+ if (!T && E.length > 0 && (T = E[0]), T) {
1485
+ const A = document.createRange();
1486
+ A.selectNodeContents(T), A.collapse(!1), m.removeAllRanges(), m.addRange(A), T.focus();
1492
1487
  } else
1493
- d.removeAllRanges();
1488
+ m.removeAllRanges();
1494
1489
  } else
1495
- d.removeAllRanges();
1490
+ m.removeAllRanges();
1496
1491
  }
1497
1492
  }, q = t.current;
1498
- return q && (q.addEventListener("compositionstart", i), q.addEventListener("compositionend", e), q.addEventListener("input", x)), document.addEventListener("mousedown", r), document.addEventListener("mouseup", m), document.addEventListener("selectionchange", u), () => {
1499
- const d = t.current;
1500
- d && (d.removeEventListener("compositionstart", i), d.removeEventListener("compositionend", e), d.removeEventListener("input", x)), document.removeEventListener("mousedown", r), document.removeEventListener("mouseup", m), document.removeEventListener("selectionchange", u);
1493
+ return q && (q.addEventListener("compositionstart", c), q.addEventListener("compositionend", e), q.addEventListener("input", w)), document.addEventListener("mousedown", o), document.addEventListener("mouseup", y), document.addEventListener("selectionchange", u), () => {
1494
+ const m = t.current;
1495
+ m && (m.removeEventListener("compositionstart", c), m.removeEventListener("compositionend", e), m.removeEventListener("input", w)), document.removeEventListener("mousedown", o), document.removeEventListener("mouseup", y), document.removeEventListener("selectionchange", u);
1501
1496
  };
1502
1497
  }, [t, p]);
1503
1498
  }
1504
- const Vt = ({
1499
+ const Mt = ({
1505
1500
  config: t,
1506
1501
  onSend: p,
1507
1502
  isProcessing: l = !1,
1508
- disabled: a = !1,
1509
- width: r,
1510
- lockStructure: m = !1,
1511
- agentOptions: A = [],
1512
- onAgentSelect: g,
1513
- onAgentExit: i,
1503
+ disabled: r = !1,
1504
+ width: o,
1505
+ lockStructure: y = !1,
1506
+ agentOptions: S = [],
1507
+ onAgentSelect: h,
1508
+ onAgentExit: c,
1514
1509
  loading: e = !1,
1515
- placeholder: x,
1510
+ placeholder: w,
1516
1511
  border: u,
1517
1512
  background: q = "transparent",
1518
- hideButtons: d
1513
+ hideButtons: m
1519
1514
  }) => {
1520
- const o = z(null), S = z(null), [c, w] = J({}), [k, $] = J(null), [b, V] = J(null), _ = z(!1), P = z(null), [D, B] = J(!1), U = z(null), [H, X] = J(!0), [Z, T] = J(() => {
1521
- const f = {};
1522
- return t.forEach((y) => {
1523
- y.type === "multi-variable" && y.key && (f[y.key] = 1);
1524
- }), f;
1525
- }), I = z({}), Q = z({}), ee = z({});
1526
- oe(() => {
1527
- Q.current = c;
1528
- }, [c]), oe(() => {
1529
- ee.current = Z;
1530
- }, [Z]);
1531
- const pe = W((f) => f.find((h) => h.type === "tag")?.text || null, []), he = z(t), s = z(null);
1532
- oe(() => {
1533
- const f = pe(he.current), y = pe(t);
1534
- if (f && f !== y && o.current) {
1535
- const h = {};
1536
- o.current.querySelectorAll('[data-type="variable"]').forEach((v) => {
1537
- const E = v.dataset.key;
1538
- if (E) {
1539
- const N = v.innerText.replace(/[\u200B\n]/g, "").trim();
1540
- N && (h[E] = N);
1515
+ const a = F(null), C = F(null), [i, E] = Q({}), [T, A] = Q(null), [v, V] = Q(null), _ = F(!1), P = F(null), [D, B] = Q(!1), X = F(null), [z, K] = Q(!0), [ee, k] = Q(() => {
1516
+ const d = {};
1517
+ return t.forEach((f) => {
1518
+ f.type === "multi-variable" && f.key && (d[f.key] = 1);
1519
+ }), d;
1520
+ }), I = F({}), Z = F({}), te = F({});
1521
+ le(() => {
1522
+ Z.current = i;
1523
+ }, [i]), le(() => {
1524
+ te.current = ee;
1525
+ }, [ee]);
1526
+ const pe = U((d) => d.find((g) => g.type === "tag")?.text || null, []), ge = F(t), s = F(null);
1527
+ le(() => {
1528
+ const d = pe(ge.current), f = pe(t);
1529
+ if (d && d !== f && a.current) {
1530
+ const g = {};
1531
+ a.current.querySelectorAll('[data-type="variable"]').forEach((b) => {
1532
+ const x = b.dataset.key;
1533
+ if (x) {
1534
+ const N = b.innerText.replace(/[\u200B\n]/g, "").trim();
1535
+ N && (g[x] = N);
1541
1536
  }
1542
- }), I.current[f] = {
1543
- variableValues: h,
1544
- files: { ...Q.current },
1545
- multiVariableCounts: { ...ee.current }
1537
+ }), I.current[d] = {
1538
+ variableValues: g,
1539
+ files: { ...Z.current },
1540
+ multiVariableCounts: { ...te.current }
1546
1541
  };
1547
1542
  }
1548
- if (y && I.current[y]) {
1549
- const h = I.current[y];
1550
- s.current = h, w(h.files), T(h.multiVariableCounts);
1551
- } else if (y) {
1543
+ if (f && I.current[f]) {
1544
+ const g = I.current[f];
1545
+ s.current = g, E(g.files), k(g.multiVariableCounts);
1546
+ } else if (f) {
1552
1547
  s.current = null;
1553
- const h = {};
1554
- t.forEach((C) => {
1555
- C.type === "multi-variable" && C.key && (h[C.key] = 1);
1556
- }), T(h), w({});
1548
+ const g = {};
1549
+ t.forEach(($) => {
1550
+ $.type === "multi-variable" && $.key && (g[$.key] = 1);
1551
+ }), k(g), E({});
1557
1552
  } else
1558
- s.current = null, T({}), w({});
1559
- he.current = t;
1560
- }, [t, pe]), Xe(() => {
1561
- s.current && o.current && (o.current.__tempVariableValues = s.current.variableValues, setTimeout(() => {
1553
+ s.current = null, k({}), E({});
1554
+ ge.current = t;
1555
+ }, [t, pe]), Ge(() => {
1556
+ s.current && a.current && (a.current.__tempVariableValues = s.current.variableValues, setTimeout(() => {
1562
1557
  s.current && (s.current = null);
1563
1558
  }, 0));
1564
- }), qt(o, t, c, m, Z, U, void 0, d), At(o, t, c, V), $t(o, t, V, d), jt(o, t, c, V), _t(o, t, V), Rt(o, t, c, B), It(o, _), oe(() => {
1559
+ }), Rt(a, t, i, y, ee, X, void 0, m), It(a, t, i, V), Vt(a, t, V, m), Pt(a, t, i, V), Lt(a, t, V), Bt(a, t, i, B), Ot(a, _), le(() => {
1565
1560
  if (t.length > 0) {
1566
- X(!1);
1561
+ K(!1);
1567
1562
  return;
1568
1563
  }
1569
- const f = () => {
1570
- if (!o.current) {
1571
- X(!0);
1564
+ const d = () => {
1565
+ if (!a.current) {
1566
+ K(!0);
1572
1567
  return;
1573
1568
  }
1574
- const h = o.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", C = o.current.querySelectorAll('[data-type="variable"]'), v = o.current.querySelectorAll('[data-type="upload"]');
1575
- let E = !1;
1576
- C.forEach((R) => {
1577
- (R.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (E = !0);
1578
- }), v.forEach((R) => {
1579
- R.querySelector(".upload-inner-wrapper.has-file") && (E = !0);
1569
+ const g = a.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", $ = a.current.querySelectorAll('[data-type="variable"]'), b = a.current.querySelectorAll('[data-type="upload"]');
1570
+ let x = !1;
1571
+ $.forEach((R) => {
1572
+ (R.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (x = !0);
1573
+ }), b.forEach((R) => {
1574
+ R.querySelector(".upload-inner-wrapper.has-file") && (x = !0);
1580
1575
  });
1581
- const N = !h && !E;
1582
- X(N), t.length === 0 && B(!N);
1576
+ const N = !g && !x;
1577
+ K(N), t.length === 0 && B(!N);
1583
1578
  };
1584
- f();
1585
- const y = new MutationObserver(f);
1586
- return o.current && y.observe(o.current, {
1579
+ d();
1580
+ const f = new MutationObserver(d);
1581
+ return a.current && f.observe(a.current, {
1587
1582
  childList: !0,
1588
1583
  subtree: !0,
1589
1584
  characterData: !0
1590
1585
  }), () => {
1591
- y.disconnect();
1586
+ f.disconnect();
1592
1587
  };
1593
1588
  }, [t]);
1594
- const L = (f) => {
1595
- if (a) {
1596
- f.preventDefault();
1589
+ const L = (d) => {
1590
+ if (r) {
1591
+ d.preventDefault();
1597
1592
  return;
1598
1593
  }
1599
- f.preventDefault();
1600
- const y = f.clipboardData.getData("text/plain"), h = window.getSelection();
1601
- if (h && h.rangeCount > 0) {
1602
- const C = h.anchorNode;
1603
- if (C) {
1604
- let v = null;
1605
- if (C.nodeType === Node.ELEMENT_NODE ? v = C.closest('[data-type="variable"]') : C.nodeType === Node.TEXT_NODE && C.parentElement && (v = C.parentElement.closest('[data-type="variable"]')), v) {
1606
- const E = v.dataset.multiKey;
1607
- if (E) {
1608
- const N = /[、,,\s\n\r\t]+/, R = y.split(N).map((j) => j.trim()).filter((j) => j.length > 0);
1609
- if (console.log("[Paste Event] 粘贴的内容:", y), console.log("[Paste Event] 拆分后的值:", R), R.length > 1) {
1610
- const j = parseInt(v.dataset.index || "0", 10), M = t.find((se) => se.type === "multi-variable" && se.key === E)?.maxCount || 9, ne = Z[E] || 1, re = Math.min(j + R.length, M);
1611
- re > ne && T((Y) => ({
1612
- ...Y,
1613
- [E]: re
1594
+ d.preventDefault();
1595
+ const f = d.clipboardData.getData("text/plain"), g = window.getSelection();
1596
+ if (g && g.rangeCount > 0) {
1597
+ const $ = g.anchorNode;
1598
+ if ($) {
1599
+ let b = null;
1600
+ if ($.nodeType === Node.ELEMENT_NODE ? b = $.closest('[data-type="variable"]') : $.nodeType === Node.TEXT_NODE && $.parentElement && (b = $.parentElement.closest('[data-type="variable"]')), b) {
1601
+ const x = b.dataset.multiKey;
1602
+ if (x) {
1603
+ const N = /[、,,\s\n\r\t]+/, R = f.split(N).map((j) => j.trim()).filter((j) => j.length > 0);
1604
+ if (console.log("[Paste Event] 粘贴的内容:", f), console.log("[Paste Event] 拆分后的值:", R), R.length > 1) {
1605
+ const j = parseInt(b.dataset.index || "0", 10), O = t.find((ae) => ae.type === "multi-variable" && ae.key === x)?.maxCount || 9, oe = ee[x] || 1, H = Math.min(j + R.length, O);
1606
+ H > oe && k((J) => ({
1607
+ ...J,
1608
+ [x]: H
1614
1609
  }));
1615
- const ie = [];
1616
- for (let Y = 0; Y < ne; Y++) {
1617
- const se = `${E}_${Y}`, fe = o.current.querySelector(
1618
- `[data-type="variable"][data-key="${se}"][data-multi-key="${E}"]`
1610
+ const se = [];
1611
+ for (let J = 0; J < oe; J++) {
1612
+ const ae = `${x}_${J}`, me = a.current.querySelector(
1613
+ `[data-type="variable"][data-key="${ae}"][data-multi-key="${x}"]`
1619
1614
  );
1620
- if (fe) {
1621
- const me = fe.innerText.replace(/[\u200B\n]/g, "").trim();
1622
- ie.push(me);
1615
+ if (me) {
1616
+ const he = me.innerText.replace(/[\u200B\n]/g, "").trim();
1617
+ se.push(he);
1623
1618
  }
1624
1619
  }
1625
- ie.splice(j, 1, ...R.slice(0, M - j));
1626
- const le = ie.slice(0, M);
1627
- le.length > 0 && le[le.length - 1] !== "" && le.length < M && le.push("");
1628
- const F = Math.max(le.length, 1), te = {};
1629
- le.forEach((Y, se) => {
1630
- Y && (te[`${E}_${se}`] = Y);
1631
- }), o.current.querySelectorAll(
1620
+ se.splice(j, 1, ...R.slice(0, O - j));
1621
+ const ne = se.slice(0, O);
1622
+ ne.length > 0 && ne[ne.length - 1] !== "" && ne.length < O && ne.push("");
1623
+ const W = Math.max(ne.length, 1), ce = {};
1624
+ ne.forEach((J, ae) => {
1625
+ J && (ce[`${x}_${ae}`] = J);
1626
+ }), a.current.querySelectorAll(
1632
1627
  '[data-type="variable"]'
1633
- ).forEach((Y) => {
1634
- const se = Y.dataset.key, fe = Y.dataset.multiKey;
1635
- if (se && fe !== E) {
1636
- const me = Y.innerText.replace(/[\u200B\n]/g, "").trim();
1637
- me && (te[se] = me);
1628
+ ).forEach((J) => {
1629
+ const ae = J.dataset.key, me = J.dataset.multiKey;
1630
+ if (ae && me !== x) {
1631
+ const he = J.innerText.replace(/[\u200B\n]/g, "").trim();
1632
+ he && (ce[ae] = he);
1638
1633
  }
1639
- }), o.current.__tempVariableValues = te, T((Y) => ({
1640
- ...Y,
1641
- [E]: F
1642
- })), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", le);
1634
+ }), a.current.__tempVariableValues = ce, k((J) => ({
1635
+ ...J,
1636
+ [x]: W
1637
+ })), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", ne);
1643
1638
  return;
1644
1639
  } else R.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
1645
1640
  }
1646
1641
  }
1647
1642
  }
1648
1643
  }
1649
- document.execCommand("insertText", !1, y), ue(), setTimeout(() => {
1650
- const C = window.getSelection();
1651
- if (C && C.rangeCount > 0) {
1652
- const v = C.anchorNode;
1653
- if (v) {
1654
- let E = null;
1655
- if (v.nodeType === Node.ELEMENT_NODE ? E = v.closest('[data-type="variable"][data-multi-key]') : v.nodeType === Node.TEXT_NODE && v.parentElement && (E = v.parentElement.closest('[data-type="variable"][data-multi-key]')), E) {
1656
- const N = E.innerText.replace(/[\u200B\n]/g, "").trim();
1644
+ document.execCommand("insertText", !1, f), ue(), setTimeout(() => {
1645
+ const $ = window.getSelection();
1646
+ if ($ && $.rangeCount > 0) {
1647
+ const b = $.anchorNode;
1648
+ if (b) {
1649
+ let x = null;
1650
+ if (b.nodeType === Node.ELEMENT_NODE ? x = b.closest('[data-type="variable"][data-multi-key]') : b.nodeType === Node.TEXT_NODE && b.parentElement && (x = b.parentElement.closest('[data-type="variable"][data-multi-key]')), x) {
1651
+ const N = x.innerText.replace(/[\u200B\n]/g, "").trim();
1657
1652
  /[、,,\s]+/.test(N) && (console.log("[Paste Event] 粘贴后检测到分隔符,内容:", N), console.log("[Paste Event] 提示:失去焦点后将自动拆分"));
1658
1653
  }
1659
1654
  }
1660
1655
  }
1661
1656
  }, 0);
1662
- }, K = (f) => {
1663
- if (f.target.files && f.target.files[0] && k) {
1664
- const y = f.target.files[0], h = k;
1665
- w((C) => ({ ...C, [h]: y }));
1666
- }
1667
- f.target && (f.target.value = ""), $(null);
1668
- }, ae = (f) => {
1669
- w((y) => {
1670
- const h = { ...y };
1671
- return delete h[f], h;
1657
+ }, Y = (d) => {
1658
+ if (d.target.files && d.target.files[0] && T) {
1659
+ const f = d.target.files[0], g = T;
1660
+ E(($) => ({ ...$, [g]: f }));
1661
+ }
1662
+ d.target && (d.target.value = ""), A(null);
1663
+ }, re = (d) => {
1664
+ E((f) => {
1665
+ const g = { ...f };
1666
+ return delete g[d], g;
1672
1667
  });
1673
- }, ye = (f) => {
1674
- const y = f.target;
1675
- if (y.closest(".tag-close-btn")) {
1676
- if (f.preventDefault(), f.stopPropagation(), m)
1668
+ }, fe = (d) => {
1669
+ const f = d.target;
1670
+ if (f.closest(".tag-close-btn")) {
1671
+ if (d.preventDefault(), d.stopPropagation(), y)
1677
1672
  return;
1678
- V(null), i ? i() : o.current && (o.current.innerHTML = "", o.current.focus());
1673
+ V(null), c ? c() : a.current && (a.current.innerHTML = "", a.current.focus());
1679
1674
  return;
1680
1675
  }
1681
- if (m) {
1682
- const v = y.closest(".tag-node"), E = y.closest('[data-type="text"]');
1683
- if (v || E) {
1684
- f.preventDefault(), f.stopPropagation();
1676
+ if (y) {
1677
+ const b = f.closest(".tag-node"), x = f.closest('[data-type="text"]');
1678
+ if (b || x) {
1679
+ d.preventDefault(), d.stopPropagation();
1685
1680
  const N = window.getSelection();
1686
1681
  N && N.removeAllRanges();
1687
1682
  return;
1688
1683
  }
1689
1684
  }
1690
- y.closest('[data-type="variable"]') || (P.current = { x: f.clientX, y: f.clientY }, _.current = !1, y.closest(".file-remove-btn") && (f.preventDefault(), f.stopPropagation()));
1691
- }, ce = (f) => {
1692
- if (!f.target.closest('[data-type="variable"]') && P.current) {
1693
- const C = Math.abs(f.clientX - P.current.x), v = Math.abs(f.clientY - P.current.y);
1694
- (C > 3 || v > 3) && (_.current = !0);
1685
+ f.closest('[data-type="variable"]') || (P.current = { x: d.clientX, y: d.clientY }, _.current = !1, f.closest(".file-remove-btn") && (d.preventDefault(), d.stopPropagation()));
1686
+ }, ie = (d) => {
1687
+ if (!d.target.closest('[data-type="variable"]') && P.current) {
1688
+ const $ = Math.abs(d.clientX - P.current.x), b = Math.abs(d.clientY - P.current.y);
1689
+ ($ > 3 || b > 3) && (_.current = !0);
1695
1690
  }
1696
- }, be = (f) => {
1697
- if (f.target.closest('[data-type="variable"]')) {
1691
+ }, xe = (d) => {
1692
+ if (d.target.closest('[data-type="variable"]')) {
1698
1693
  P.current = null, _.current = !1;
1699
1694
  return;
1700
1695
  }
1701
1696
  P.current = null, _.current = !1;
1702
- }, O = (f) => {
1703
- if (a)
1697
+ }, M = (d) => {
1698
+ if (r)
1704
1699
  return;
1705
- const y = f.target;
1706
- if (y.closest(".tag-close-btn")) {
1707
- f.preventDefault(), f.stopPropagation();
1700
+ const f = d.target;
1701
+ if (f.closest(".tag-close-btn")) {
1702
+ d.preventDefault(), d.stopPropagation();
1708
1703
  return;
1709
1704
  }
1710
1705
  if (t.length === 0)
1711
1706
  return;
1712
- if (y.closest('[data-type="text"]')) {
1713
- f.preventDefault(), f.stopPropagation();
1707
+ if (f.closest('[data-type="text"]')) {
1708
+ d.preventDefault(), d.stopPropagation();
1714
1709
  const R = window.getSelection();
1715
1710
  R && R.removeAllRanges();
1716
1711
  return;
1717
1712
  }
1718
- if (m && y.closest(".tag-node")) {
1719
- f.preventDefault(), f.stopPropagation();
1713
+ if (y && f.closest(".tag-node")) {
1714
+ d.preventDefault(), d.stopPropagation();
1720
1715
  const j = window.getSelection();
1721
1716
  j && j.removeAllRanges();
1722
1717
  return;
1723
1718
  }
1724
- if (y.closest('[data-type="variable"]')) {
1719
+ if (f.closest('[data-type="variable"]')) {
1725
1720
  if (_.current)
1726
1721
  return;
1727
1722
  setTimeout(() => {
1728
1723
  const R = window.getSelection();
1729
- R && !R.isCollapsed || $e(o);
1724
+ R && !R.isCollapsed || Ie(a);
1730
1725
  }, 10);
1731
1726
  return;
1732
1727
  }
1733
- const E = y.closest(".file-remove-btn");
1734
- if (E) {
1735
- f.preventDefault(), f.stopPropagation();
1736
- const j = E.closest('[data-type="upload"]')?.dataset.key;
1737
- j && ae(j);
1728
+ const x = f.closest(".file-remove-btn");
1729
+ if (x) {
1730
+ d.preventDefault(), d.stopPropagation();
1731
+ const j = x.closest('[data-type="upload"]')?.dataset.key;
1732
+ j && re(j);
1738
1733
  return;
1739
1734
  }
1740
- const N = y.closest('[data-type="upload"]');
1735
+ const N = f.closest('[data-type="upload"]');
1741
1736
  if (N) {
1742
1737
  const R = N.dataset.key;
1743
- R && ($(R), S.current?.click());
1738
+ R && (A(R), C.current?.click());
1744
1739
  return;
1745
1740
  }
1746
- }, G = (f) => {
1747
- const h = f.target.closest('[data-type="variable"]');
1748
- if (h) {
1749
- const C = window.getSelection();
1750
- if (C) {
1751
- const v = document.createRange(), E = h.textContent || "";
1752
- if (E.replace(/\u200B/g, "")) {
1753
- let R = 0, j = E.length;
1754
- E.startsWith("​") && (R = 1), E.endsWith("​") && E.length > 1 && (j = E.length - 1);
1755
- const M = h.firstChild;
1756
- M && M.nodeType === Node.TEXT_NODE ? (v.setStart(M, R), v.setEnd(M, j)) : v.selectNodeContents(h);
1741
+ }, G = (d) => {
1742
+ const g = d.target.closest('[data-type="variable"]');
1743
+ if (g) {
1744
+ const $ = window.getSelection();
1745
+ if ($) {
1746
+ const b = document.createRange(), x = g.textContent || "";
1747
+ if (x.replace(/\u200B/g, "")) {
1748
+ let R = 0, j = x.length;
1749
+ x.startsWith("​") && (R = 1), x.endsWith("​") && x.length > 1 && (j = x.length - 1);
1750
+ const O = g.firstChild;
1751
+ O && O.nodeType === Node.TEXT_NODE ? (b.setStart(O, R), b.setEnd(O, j)) : b.selectNodeContents(g);
1757
1752
  } else
1758
- v.selectNodeContents(h), v.collapse(!0);
1759
- C.removeAllRanges(), C.addRange(v);
1753
+ b.selectNodeContents(g), b.collapse(!0);
1754
+ $.removeAllRanges(), $.addRange(b);
1760
1755
  }
1761
1756
  }
1762
1757
  }, ue = () => {
1763
1758
  if (t.length === 0) {
1764
- if (o.current) {
1765
- const h = !(o.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
1766
- X(h), B(!h);
1759
+ if (a.current) {
1760
+ const g = !(a.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
1761
+ K(g), B(!g);
1767
1762
  }
1768
1763
  return;
1769
1764
  }
1770
- if ($e(o), o.current && o.current.querySelectorAll('[data-type="variable"]').forEach((h) => {
1771
- const C = h.querySelector(".variable-info-icon");
1772
- if (C) {
1773
- let v = !1;
1774
- const E = document.createTreeWalker(
1775
- h,
1765
+ if (Ie(a), a.current && a.current.querySelectorAll('[data-type="variable"]').forEach((g) => {
1766
+ const $ = g.querySelector(".variable-info-icon");
1767
+ if ($) {
1768
+ let b = !1;
1769
+ const x = document.createTreeWalker(
1770
+ g,
1776
1771
  NodeFilter.SHOW_TEXT,
1777
1772
  {
1778
- acceptNode: (N) => C.contains(N) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
1773
+ acceptNode: (N) => $.contains(N) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
1779
1774
  }
1780
1775
  );
1781
- for (; E.nextNode(); )
1782
- if (E.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
1783
- v = !0;
1776
+ for (; x.nextNode(); )
1777
+ if (x.currentNode.textContent?.replace(/[\u200B\n]/g, "").trim()) {
1778
+ b = !0;
1784
1779
  break;
1785
1780
  }
1786
- v ? C.classList.add("hidden") : C.classList.remove("hidden");
1781
+ b ? $.classList.add("hidden") : $.classList.remove("hidden");
1787
1782
  }
1788
- }), _e(o, t, c), je(o, t, c, B), !o.current) return;
1789
- t.filter((y) => y.type === "multi-variable" && y.key).forEach((y) => {
1790
- if (!y.key) return;
1791
- const h = y.maxCount || 9, C = Z[y.key] || 1, v = [];
1792
- for (let M = 0; M < C; M++) {
1793
- const ne = `${y.key}_${M}`, re = o.current.querySelector(
1794
- `[data-type="variable"][data-key="${ne}"][data-multi-key="${y.key}"]`
1783
+ }), Ve(a, t, i), Le(a, t, i, B), !a.current) return;
1784
+ t.filter((f) => f.type === "multi-variable" && f.key).forEach((f) => {
1785
+ if (!f.key) return;
1786
+ const g = f.maxCount || 9, $ = ee[f.key] || 1, b = [];
1787
+ for (let O = 0; O < $; O++) {
1788
+ const oe = `${f.key}_${O}`, H = a.current.querySelector(
1789
+ `[data-type="variable"][data-key="${oe}"][data-multi-key="${f.key}"]`
1795
1790
  );
1796
- if (re) {
1797
- const ie = re.innerText.replace(/[\u200B\n]/g, "").trim();
1798
- v.push(ie);
1791
+ if (H) {
1792
+ const se = H.innerText.replace(/[\u200B\n]/g, "").trim();
1793
+ b.push(se);
1799
1794
  }
1800
1795
  }
1801
- const N = (v[v.length - 1] || "") === "";
1796
+ const N = (b[b.length - 1] || "") === "";
1802
1797
  let R = !1, j = -1;
1803
- for (let M = 0; M < v.length - 1; M++)
1804
- if (v[M] === "") {
1805
- R = !0, j = M;
1798
+ for (let O = 0; O < b.length - 1; O++)
1799
+ if (b[O] === "") {
1800
+ R = !0, j = O;
1806
1801
  break;
1807
1802
  }
1808
1803
  if (R && j >= 0) {
1809
- const M = window.getSelection();
1810
- if (M && M.rangeCount > 0) {
1811
- const F = M.getRangeAt(0), te = F.startContainer, de = te.nodeType === Node.ELEMENT_NODE ? te.closest('[data-type="variable"][data-multi-key]') : te.parentElement?.closest('[data-type="variable"][data-multi-key]');
1804
+ const O = window.getSelection();
1805
+ if (O && O.rangeCount > 0) {
1806
+ const W = O.getRangeAt(0), ce = W.startContainer, de = ce.nodeType === Node.ELEMENT_NODE ? ce.closest('[data-type="variable"][data-multi-key]') : ce.parentElement?.closest('[data-type="variable"][data-multi-key]');
1812
1807
  if (de) {
1813
- const Y = de.dataset.key;
1814
- if (Y) {
1815
- const se = document.createRange();
1816
- se.setStartBefore(de), se.setEnd(F.startContainer, F.startOffset);
1817
- const fe = se.toString().length;
1818
- U.current = { key: Y, offset: fe };
1808
+ const J = de.dataset.key;
1809
+ if (J) {
1810
+ const ae = document.createRange();
1811
+ ae.setStartBefore(de), ae.setEnd(W.startContainer, W.startOffset);
1812
+ const me = ae.toString().length;
1813
+ X.current = { key: J, offset: me };
1819
1814
  }
1820
1815
  }
1821
1816
  }
1822
- const ne = [...v];
1823
- for (let F = j; F < ne.length - 1; F++)
1824
- ne[F] = ne[F + 1];
1825
- ne.pop();
1826
- const re = {};
1827
- ne.forEach((F, te) => {
1828
- F && (re[`${y.key}_${te}`] = F);
1817
+ const oe = [...b];
1818
+ for (let W = j; W < oe.length - 1; W++)
1819
+ oe[W] = oe[W + 1];
1820
+ oe.pop();
1821
+ const H = {};
1822
+ oe.forEach((W, ce) => {
1823
+ W && (H[`${f.key}_${ce}`] = W);
1829
1824
  });
1830
- const ie = Math.max(N ? ne.length : ne.length + 1, 1);
1831
- o.current.querySelectorAll(
1825
+ const se = Math.max(N ? oe.length : oe.length + 1, 1);
1826
+ a.current.querySelectorAll(
1832
1827
  '[data-type="variable"]'
1833
- ).forEach((F) => {
1834
- const te = F.dataset.key, de = F.dataset.multiKey;
1835
- if (te && de !== y.key) {
1836
- const Y = F.innerText.replace(/[\u200B\n]/g, "").trim();
1837
- Y && (re[te] = Y);
1828
+ ).forEach((W) => {
1829
+ const ce = W.dataset.key, de = W.dataset.multiKey;
1830
+ if (ce && de !== f.key) {
1831
+ const J = W.innerText.replace(/[\u200B\n]/g, "").trim();
1832
+ J && (H[ce] = J);
1838
1833
  }
1839
- }), o.current.__tempVariableValues = re, T((F) => ({
1840
- ...F,
1841
- [y.key]: ie
1834
+ }), a.current.__tempVariableValues = H, k((W) => ({
1835
+ ...W,
1836
+ [f.key]: se
1842
1837
  }));
1843
1838
  return;
1844
1839
  }
1845
1840
  if (!N) {
1846
- const M = C - 1, ne = `${y.key}_${M}`, re = o.current.querySelector(
1847
- `[data-type="variable"][data-key="${ne}"][data-multi-key="${y.key}"]`
1841
+ const O = $ - 1, oe = `${f.key}_${O}`, H = a.current.querySelector(
1842
+ `[data-type="variable"][data-key="${oe}"][data-multi-key="${f.key}"]`
1848
1843
  );
1849
- if (re && re.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && C < h) {
1850
- const le = window.getSelection();
1851
- if (le && le.rangeCount > 0) {
1852
- const F = le.getRangeAt(0), te = F.startContainer, de = te.nodeType === Node.ELEMENT_NODE ? te.closest('[data-type="variable"][data-multi-key]') : te.parentElement?.closest('[data-type="variable"][data-multi-key]');
1844
+ if (H && H.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && $ < g) {
1845
+ const ne = window.getSelection();
1846
+ if (ne && ne.rangeCount > 0) {
1847
+ const W = ne.getRangeAt(0), ce = W.startContainer, de = ce.nodeType === Node.ELEMENT_NODE ? ce.closest('[data-type="variable"][data-multi-key]') : ce.parentElement?.closest('[data-type="variable"][data-multi-key]');
1853
1848
  if (de) {
1854
- const Y = de.dataset.key;
1855
- if (Y) {
1856
- const se = document.createRange();
1857
- se.setStartBefore(de), se.setEnd(F.startContainer, F.startOffset);
1858
- const fe = se.toString().length;
1859
- U.current = { key: Y, offset: fe };
1849
+ const J = de.dataset.key;
1850
+ if (J) {
1851
+ const ae = document.createRange();
1852
+ ae.setStartBefore(de), ae.setEnd(W.startContainer, W.startOffset);
1853
+ const me = ae.toString().length;
1854
+ X.current = { key: J, offset: me };
1860
1855
  }
1861
1856
  }
1862
1857
  }
1863
- T((F) => ({
1864
- ...F,
1865
- [y.key]: C + 1
1858
+ k((W) => ({
1859
+ ...W,
1860
+ [f.key]: $ + 1
1866
1861
  }));
1867
1862
  }
1868
1863
  }
1869
1864
  });
1870
1865
  };
1871
- oe(() => {
1872
- const f = o.current;
1873
- if (!f) return;
1874
- const y = (h) => {
1875
- const C = h.target;
1876
- if (!C || !o.current || !o.current.contains(C))
1877
- return;
1878
- const v = h.relatedTarget, E = !v || !o.current.contains(v);
1879
- if (console.log("[Blur Event] 事件触发:", {
1880
- target: C,
1881
- relatedTarget: v,
1882
- isReallyBlurred: E,
1883
- activeElement: document.activeElement,
1884
- targetTagName: C.tagName,
1885
- targetClassName: C.className
1886
- }), !E) {
1887
- console.log("[Blur Event] 焦点仍在编辑器内,跳过处理");
1888
- return;
1889
- }
1890
- const N = C.closest('[data-type="variable"][data-multi-key]');
1891
- if (N && o.current.contains(N)) {
1892
- const R = N.dataset.multiKey, j = N.dataset.key, M = N.dataset.index;
1893
- if (R && j && M !== void 0) {
1894
- const ne = N.innerText.replace(/[\u200B\n]/g, "").trim();
1895
- console.log("[Blur Event] 失去焦点的 multi-variable 输入框:", {
1896
- multiKey: R,
1897
- currentKey: j,
1898
- index: M,
1899
- content: ne
1900
- });
1901
- const re = /[、,,\s]+/;
1902
- if (re.test(ne)) {
1903
- const ie = ne.split(re).map((te) => te.trim()).filter((te) => te.length > 0);
1904
- console.log("[Blur Event] 拆分前的内容:", ne), console.log("[Blur Event] 拆分后的部分:", ie);
1905
- const F = ie.slice(0, 9);
1906
- if (console.log("[Blur Event] 有效的部分(最多9个):", F), F.length > 1) {
1907
- const te = t.find((de) => de.type === "multi-variable" && de.key === R);
1908
- if (te) {
1909
- const de = Z[R] || 1, Y = parseInt(M, 10), se = te.maxCount || 9, fe = [];
1910
- for (let ge = 0; ge < de; ge++) {
1911
- const we = `${R}_${ge}`, Te = o.current.querySelector(
1912
- `[data-type="variable"][data-key="${we}"][data-multi-key="${R}"]`
1913
- );
1914
- if (Te) {
1915
- const Ne = Te.innerText.replace(/[\u200B\n]/g, "").trim();
1916
- fe.push(Ne);
1917
- }
1866
+ Ge(() => {
1867
+ const d = a.current;
1868
+ if (!d) return;
1869
+ const f = /* @__PURE__ */ new Map(), g = (x) => {
1870
+ const N = x.target, R = x.relatedTarget;
1871
+ !N || !a.current || !a.current.contains(N) || R && a.current.contains(R) || setTimeout(() => {
1872
+ if (a.current) {
1873
+ if (t.length === 0) {
1874
+ const j = a.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
1875
+ B(j.length > 0);
1876
+ return;
1877
+ }
1878
+ Ie(a), Ve(a, t, i), Le(a, t, i, B);
1879
+ }
1880
+ }, 0);
1881
+ };
1882
+ d.addEventListener("blur", g, !0);
1883
+ const $ = () => {
1884
+ if (!a.current) return;
1885
+ f.forEach((R, j) => {
1886
+ j.removeEventListener("blur", R, !1);
1887
+ }), f.clear();
1888
+ const x = a.current.querySelectorAll(
1889
+ '[data-type="variable"][data-multi-key]'
1890
+ ), N = (R) => {
1891
+ R.stopPropagation(), R.stopImmediatePropagation();
1892
+ const j = R.target;
1893
+ if (!j || !a.current || !a.current.contains(j))
1894
+ return;
1895
+ const O = j.closest('[data-type="variable"][data-multi-key]');
1896
+ if (!O || !a.current.contains(O))
1897
+ return;
1898
+ let oe = !1;
1899
+ if (f.forEach((ae, me) => {
1900
+ (me === O || me.contains(j)) && (oe = !0);
1901
+ }), !oe)
1902
+ return;
1903
+ const H = O.dataset.multiKey, se = O.dataset.key, ne = O.dataset.index;
1904
+ if (!H || !se || ne === void 0) return;
1905
+ const W = R.relatedTarget;
1906
+ if (!(!W || !a.current.contains(W)))
1907
+ return;
1908
+ const de = O.innerText.replace(/[\u200B\n]/g, "").trim();
1909
+ console.log("[Blur Event] 失去焦点的 multi-variable 输入框:", {
1910
+ multiKey: H,
1911
+ currentKey: se,
1912
+ index: ne,
1913
+ content: de
1914
+ });
1915
+ const J = /[、,,\s]+/;
1916
+ if (J.test(de)) {
1917
+ const ae = de.split(J).map((Ee) => Ee.trim()).filter((Ee) => Ee.length > 0);
1918
+ console.log("[Blur Event] 拆分前的内容:", de), console.log("[Blur Event] 拆分后的部分:", ae);
1919
+ const he = ae.slice(0, 9);
1920
+ if (console.log("[Blur Event] 有效的部分(最多9个):", he), he.length > 1) {
1921
+ const Ee = t.find((Se) => Se.type === "multi-variable" && Se.key === H);
1922
+ if (Ee) {
1923
+ const Se = ee[H] || 1, Me = parseInt(ne, 10), De = Ee.maxCount || 9, qe = [];
1924
+ for (let ye = 0; ye < Se; ye++) {
1925
+ const Te = `${H}_${ye}`, Ae = a.current.querySelector(
1926
+ `[data-type="variable"][data-key="${Te}"][data-multi-key="${H}"]`
1927
+ );
1928
+ if (Ae) {
1929
+ const _e = Ae.innerText.replace(/[\u200B\n]/g, "").trim();
1930
+ qe.push(_e);
1918
1931
  }
1919
- console.log("[Blur Event] 拆分前的所有值:", fe), console.log("[Blur Event] 当前索引:", Y), console.log("[Blur Event] 要插入的值:", F), fe.splice(Y, 1, ...F);
1920
- const me = fe.slice(0, se);
1921
- console.log("[Blur Event] 拆分后的所有值:", me), me.length > 0 && me[me.length - 1] !== "" && me.length < se && me.push("");
1922
- const We = Math.max(me.length, 1), Ae = {};
1923
- me.forEach((ge, we) => {
1924
- ge && (Ae[`${R}_${we}`] = ge);
1925
- }), o.current.querySelectorAll(
1926
- '[data-type="variable"]'
1927
- ).forEach((ge) => {
1928
- const we = ge.dataset.key, Te = ge.dataset.multiKey;
1929
- if (we && Te !== R) {
1930
- const Ne = ge.innerText.replace(/[\u200B\n]/g, "").trim();
1931
- Ne && (Ae[we] = Ne);
1932
- }
1933
- }), o.current.__tempVariableValues = Ae, T((ge) => ({
1934
- ...ge,
1935
- [R]: We
1936
- }));
1937
1932
  }
1933
+ console.log("[Blur Event] 拆分前的所有值:", qe), console.log("[Blur Event] 当前索引:", Me), console.log("[Blur Event] 要插入的值:", he), qe.splice(Me, 1, ...he);
1934
+ const be = qe.slice(0, De);
1935
+ console.log("[Blur Event] 拆分后的所有值:", be), be.length > 0 && be[be.length - 1] !== "" && be.length < De && be.push("");
1936
+ const Qe = Math.max(be.length, 1), Re = {};
1937
+ be.forEach((ye, Te) => {
1938
+ ye && (Re[`${H}_${Te}`] = ye);
1939
+ }), a.current.querySelectorAll(
1940
+ '[data-type="variable"]'
1941
+ ).forEach((ye) => {
1942
+ const Te = ye.dataset.key, Ae = ye.dataset.multiKey;
1943
+ if (Te && Ae !== H) {
1944
+ const _e = ye.innerText.replace(/[\u200B\n]/g, "").trim();
1945
+ _e && (Re[Te] = _e);
1946
+ }
1947
+ }), a.current.__tempVariableValues = Re, k((ye) => ({
1948
+ ...ye,
1949
+ [H]: Qe
1950
+ }));
1938
1951
  }
1939
1952
  }
1940
1953
  }
1941
- }
1942
- };
1943
- return f.addEventListener("blur", y, !0), () => {
1944
- f.removeEventListener("blur", y, !0);
1954
+ };
1955
+ x.forEach((R) => {
1956
+ R.addEventListener("blur", N, !1), f.set(R, N);
1957
+ });
1958
+ }, b = setTimeout(() => {
1959
+ $();
1960
+ }, 0);
1961
+ return () => {
1962
+ clearTimeout(b), d.removeEventListener("blur", g, !0), f.forEach((x, N) => {
1963
+ N.removeEventListener("blur", x, !1);
1964
+ }), f.clear();
1945
1965
  };
1946
- }, [t, Z]);
1947
- const ve = () => {
1948
- if (o.current) {
1949
- if (t.length === 0) {
1950
- const f = o.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
1951
- B(f.length > 0);
1952
- return;
1953
- }
1954
- $e(o), _e(o, t, c), je(o, t, c, B);
1955
- }
1956
- }, qe = (f) => {
1957
- if (a) {
1958
- f.preventDefault();
1966
+ }, [t, ee, i]);
1967
+ const ve = (d) => {
1968
+ if (r) {
1969
+ d.preventDefault();
1959
1970
  return;
1960
1971
  }
1961
- const y = window.getSelection();
1962
- if (y && y.rangeCount > 0) {
1963
- const h = y.anchorNode;
1964
- let C = null;
1965
- if (h && (h.nodeType === Node.ELEMENT_NODE ? C = h.closest('[data-type="text"]') : h.nodeType === Node.TEXT_NODE && h.parentElement && (C = h.parentElement.closest('[data-type="text"]'))), C) {
1966
- if (f.preventDefault(), f.stopPropagation(), o.current) {
1967
- const v = o.current.querySelector(
1972
+ const f = window.getSelection();
1973
+ if (f && f.rangeCount > 0) {
1974
+ const g = f.anchorNode;
1975
+ let $ = null;
1976
+ if (g && (g.nodeType === Node.ELEMENT_NODE ? $ = g.closest('[data-type="text"]') : g.nodeType === Node.TEXT_NODE && g.parentElement && ($ = g.parentElement.closest('[data-type="text"]'))), $) {
1977
+ if (d.preventDefault(), d.stopPropagation(), a.current) {
1978
+ const b = a.current.querySelector(
1968
1979
  '[data-type="variable"], [data-type="upload"]'
1969
1980
  );
1970
- v && v.focus();
1981
+ b && b.focus();
1971
1982
  }
1972
1983
  return;
1973
1984
  }
1974
1985
  }
1975
- if (m && y && y.rangeCount > 0) {
1976
- const h = y.anchorNode;
1977
- let C = null;
1978
- if (h && (h.nodeType === Node.ELEMENT_NODE ? C = h.closest(".tag-node") : h.nodeType === Node.TEXT_NODE && h.parentElement && (C = h.parentElement.closest(".tag-node"))), C) {
1979
- if (f.preventDefault(), f.stopPropagation(), o.current) {
1980
- const v = o.current.querySelector(
1986
+ if (y && f && f.rangeCount > 0) {
1987
+ const g = f.anchorNode;
1988
+ let $ = null;
1989
+ if (g && (g.nodeType === Node.ELEMENT_NODE ? $ = g.closest(".tag-node") : g.nodeType === Node.TEXT_NODE && g.parentElement && ($ = g.parentElement.closest(".tag-node"))), $) {
1990
+ if (d.preventDefault(), d.stopPropagation(), a.current) {
1991
+ const b = a.current.querySelector(
1981
1992
  '[data-type="variable"], [data-type="upload"]'
1982
1993
  );
1983
- v && v.focus();
1994
+ b && b.focus();
1984
1995
  }
1985
1996
  return;
1986
1997
  }
1987
1998
  }
1988
- if (f.key === "Enter" && !f.shiftKey && (f.preventDefault(), Le()), f.key === "Escape" && o.current) {
1989
- if (m) {
1990
- f.preventDefault();
1999
+ if (d.key === "Enter" && !d.shiftKey && (d.preventDefault(), Ce()), d.key === "Escape" && a.current) {
2000
+ if (y) {
2001
+ d.preventDefault();
1991
2002
  return;
1992
2003
  }
1993
- o.current.innerHTML = "", o.current.focus();
2004
+ a.current.innerHTML = "", a.current.focus();
1994
2005
  }
1995
- if (f.key === "Backspace") {
1996
- const h = window.getSelection();
1997
- if (h && h.rangeCount > 0) {
1998
- const C = h.getRangeAt(0), v = h.anchorNode;
1999
- if (m) {
2006
+ if (d.key === "Backspace") {
2007
+ const g = window.getSelection();
2008
+ if (g && g.rangeCount > 0) {
2009
+ const $ = g.getRangeAt(0), b = g.anchorNode;
2010
+ if (y) {
2000
2011
  let N = null, R = null;
2001
- if (v && (v.nodeType === Node.ELEMENT_NODE ? (N = v.closest(".tag-node"), R = v.closest('[data-type="text"]')) : v.nodeType === Node.TEXT_NODE && v.parentElement && (N = v.parentElement.closest(".tag-node"), R = v.parentElement.closest('[data-type="text"]'))), (N || R) && C.collapsed && C.startOffset === 0) {
2002
- f.preventDefault();
2012
+ if (b && (b.nodeType === Node.ELEMENT_NODE ? (N = b.closest(".tag-node"), R = b.closest('[data-type="text"]')) : b.nodeType === Node.TEXT_NODE && b.parentElement && (N = b.parentElement.closest(".tag-node"), R = b.parentElement.closest('[data-type="text"]'))), (N || R) && $.collapsed && $.startOffset === 0) {
2013
+ d.preventDefault();
2003
2014
  return;
2004
2015
  }
2005
2016
  }
2006
- let E = null;
2007
- if (v && (v.nodeType === Node.ELEMENT_NODE ? E = v.closest(
2017
+ let x = null;
2018
+ if (b && (b.nodeType === Node.ELEMENT_NODE ? x = b.closest(
2008
2019
  '[data-type="variable"]'
2009
- ) : v.nodeType === Node.TEXT_NODE && v.parentElement && (E = v.parentElement.closest(
2020
+ ) : b.nodeType === Node.TEXT_NODE && b.parentElement && (x = b.parentElement.closest(
2010
2021
  '[data-type="variable"]'
2011
- ))), E) {
2012
- if (!C.collapsed)
2022
+ ))), x) {
2023
+ if (!$.collapsed)
2013
2024
  return;
2014
- const N = E.innerText;
2025
+ const N = x.innerText;
2015
2026
  if (N === "​" || N === "") {
2016
- f.preventDefault();
2027
+ d.preventDefault();
2017
2028
  return;
2018
2029
  }
2019
- if (C.startOffset === 0) {
2020
- f.preventDefault();
2030
+ if ($.startOffset === 0) {
2031
+ d.preventDefault();
2021
2032
  return;
2022
2033
  }
2023
- if (N.startsWith("​") && C.startOffset === 1) {
2024
- f.preventDefault();
2034
+ if (N.startsWith("​") && $.startOffset === 1) {
2035
+ d.preventDefault();
2025
2036
  return;
2026
2037
  }
2027
2038
  }
2028
2039
  }
2029
2040
  }
2030
- }, Le = () => {
2031
- if (l || a || e || !D || !o.current) return;
2041
+ }, Ce = () => {
2042
+ if (l || r || e || !D || !a.current) return;
2032
2043
  if (t.length === 0) {
2033
- const E = o.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
2034
- if (!E) return;
2035
- p(E, E);
2044
+ const x = a.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "";
2045
+ if (!x) return;
2046
+ p(x, x);
2036
2047
  return;
2037
2048
  }
2038
- const f = o.current;
2039
- let y = "";
2040
- const h = {}, C = (E) => {
2041
- if (!(E.nodeType === Node.ELEMENT_NODE && E.style.display === "none")) {
2042
- if (E.nodeType === Node.TEXT_NODE)
2043
- y += (E.textContent || "").replace(/\u200B/g, "");
2044
- else if (E.nodeType === Node.ELEMENT_NODE) {
2045
- const N = E, R = N.dataset.type, j = N.dataset.key;
2049
+ const d = a.current;
2050
+ let f = "";
2051
+ const g = {}, $ = (x) => {
2052
+ if (!(x.nodeType === Node.ELEMENT_NODE && x.style.display === "none")) {
2053
+ if (x.nodeType === Node.TEXT_NODE)
2054
+ f += (x.textContent || "").replace(/\u200B/g, "");
2055
+ else if (x.nodeType === Node.ELEMENT_NODE) {
2056
+ const N = x, R = N.dataset.type, j = N.dataset.key;
2046
2057
  if (R === "variable" && j) {
2047
- let M = "";
2048
- const ne = document.createTreeWalker(
2058
+ let O = "";
2059
+ const oe = document.createTreeWalker(
2049
2060
  N,
2050
2061
  NodeFilter.SHOW_TEXT,
2051
2062
  {
2052
- acceptNode: (ie) => {
2053
- const le = N.querySelector(".variable-info-icon");
2054
- return le && le.contains(ie) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
2063
+ acceptNode: (se) => {
2064
+ const ne = N.querySelector(".variable-info-icon");
2065
+ return ne && ne.contains(se) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
2055
2066
  }
2056
2067
  }
2057
2068
  );
2058
- for (; ne.nextNode(); )
2059
- M += ne.currentNode.textContent || "";
2060
- const re = M.replace(/[\u200B\n]/g, "").trim();
2061
- if (re) {
2062
- const ie = N.dataset.multiKey;
2063
- if (ie) {
2064
- (!h[ie] || !Array.isArray(h[ie])) && (h[ie] = []);
2065
- const le = h[ie];
2066
- le.push(re), le.length > 1 && (y += " "), y += re;
2069
+ for (; oe.nextNode(); )
2070
+ O += oe.currentNode.textContent || "";
2071
+ const H = O.replace(/[\u200B\n]/g, "").trim();
2072
+ if (H) {
2073
+ const se = N.dataset.multiKey;
2074
+ if (se) {
2075
+ (!g[se] || !Array.isArray(g[se])) && (g[se] = []);
2076
+ const ne = g[se];
2077
+ ne.push(H), ne.length > 1 && (f += " "), f += H;
2067
2078
  } else
2068
- h[j] = re, y += re;
2079
+ g[j] = H, f += H;
2069
2080
  }
2070
2081
  } else if (R === "upload" && j)
2071
- h[j] = c[j] ?? null, c[j] && (y += ` [附带文件: ${c[j]?.name}] `);
2082
+ g[j] = i[j] ?? null, i[j] && (f += ` [附带文件: ${i[j]?.name}] `);
2072
2083
  else {
2073
2084
  if (N.classList.contains("tag-close-btn") || N.classList.contains("file-remove-btn")) return;
2074
- N.getAttribute("contenteditable") === "false" && !R && N.classList.contains("tag-node") ? y += N.innerText : N.childNodes.forEach(C);
2085
+ N.getAttribute("contenteditable") === "false" && !R && N.classList.contains("tag-node") ? f += N.innerText : N.childNodes.forEach($);
2075
2086
  }
2076
2087
  }
2077
2088
  }
2078
2089
  };
2079
- if (f.childNodes.forEach(C), y = y.trim(), !y) return;
2080
- const v = new FormData();
2081
- v.append("fullPrompt", y), Object.keys(h).forEach((E) => {
2082
- const N = h[E];
2083
- N != null && (N instanceof File ? v.append(E, N) : Array.isArray(N) ? t.some(
2084
- (j) => j.type === "multi-variable" && j.key === E
2090
+ if (d.childNodes.forEach($), f = f.trim(), !f) return;
2091
+ const b = new FormData();
2092
+ b.append("fullPrompt", f), Object.keys(g).forEach((x) => {
2093
+ const N = g[x];
2094
+ N != null && (N instanceof File ? b.append(x, N) : Array.isArray(N) ? t.some(
2095
+ (j) => j.type === "multi-variable" && j.key === x
2085
2096
  ) ? N.forEach((j) => {
2086
- j != null && j !== "" && v.append(E, String(j));
2087
- }) : N.forEach((j, M) => {
2088
- j != null && (j instanceof File ? v.append(`${E}[${M}]`, j) : typeof j == "string" ? v.append(`${E}[${M}]`, j) : v.append(`${E}[${M}]`, String(j)));
2089
- }) : typeof N == "string" ? v.append(E, N) : v.append(E, String(N)));
2090
- }), p(v, y);
2091
- }, He = {
2092
- ...r ? { width: typeof r == "number" ? `${r}px` : r } : {},
2097
+ j != null && j !== "" && b.append(x, String(j));
2098
+ }) : N.forEach((j, O) => {
2099
+ j != null && (j instanceof File ? b.append(`${x}[${O}]`, j) : typeof j == "string" ? b.append(`${x}[${O}]`, j) : b.append(`${x}[${O}]`, String(j)));
2100
+ }) : typeof N == "string" ? b.append(x, N) : b.append(x, String(N)));
2101
+ }), p(b, f);
2102
+ }, Je = {
2103
+ ...o ? { width: typeof o == "number" ? `${o}px` : o } : {},
2093
2104
  ...u ? { border: u } : {},
2094
2105
  ...q ? { background: q } : {}
2095
2106
  };
@@ -2097,36 +2108,35 @@ const Vt = ({
2097
2108
  "div",
2098
2109
  {
2099
2110
  className: "rich-text-editor",
2100
- style: He,
2101
- "data-disabled": a,
2111
+ style: Je,
2112
+ "data-disabled": r,
2102
2113
  children: [
2103
2114
  /* @__PURE__ */ n.jsx(
2104
2115
  "div",
2105
2116
  {
2106
- ref: o,
2107
- className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${H && x ? "rte-editor-empty" : ""}`,
2117
+ ref: a,
2118
+ className: `rte-editor ${t.length === 0 ? "rte-editor-default" : ""} ${z && w ? "rte-editor-empty" : ""}`,
2108
2119
  contentEditable: t.length === 0,
2109
2120
  suppressContentEditableWarning: !0,
2110
- "data-placeholder": x,
2111
- onMouseDown: ye,
2112
- onMouseMove: ce,
2113
- onMouseUp: be,
2114
- onClick: O,
2121
+ "data-placeholder": w,
2122
+ onMouseDown: fe,
2123
+ onMouseMove: ie,
2124
+ onMouseUp: xe,
2125
+ onClick: M,
2115
2126
  onDoubleClick: G,
2116
2127
  onInput: ue,
2117
- onKeyDown: qe,
2118
- onPaste: L,
2119
- onBlur: ve
2128
+ onKeyDown: ve,
2129
+ onPaste: L
2120
2130
  }
2121
2131
  ),
2122
2132
  /* @__PURE__ */ n.jsx(
2123
2133
  "input",
2124
2134
  {
2125
2135
  type: "file",
2126
- ref: S,
2136
+ ref: C,
2127
2137
  className: "rte-file-input",
2128
2138
  accept: ".csv,.xlsx,.xls,.txt,.pdf,image/*",
2129
- onChange: K
2139
+ onChange: Y
2130
2140
  }
2131
2141
  ),
2132
2142
  /* @__PURE__ */ n.jsxs("div", { className: "rich-text-editor-footer", children: [
@@ -2135,54 +2145,68 @@ const Vt = ({
2135
2145
  /* @__PURE__ */ n.jsx("img", { src: "https://oospublic.sealseek.cn/file/website/ball.png", alt: "" }),
2136
2146
  /* @__PURE__ */ n.jsx("span", { className: "rte-brand-text", children: "SealSeek 1.0" })
2137
2147
  ] }),
2138
- d !== "hideAgent" && /* @__PURE__ */ n.jsx(
2139
- Ze,
2148
+ m !== "hideAgent" && /* @__PURE__ */ n.jsx(
2149
+ at,
2140
2150
  {
2141
2151
  placement: "top",
2142
2152
  menu: {
2143
- items: A.map((f) => ({
2144
- key: f.key,
2153
+ items: S.map((d) => ({
2154
+ key: d.key,
2145
2155
  label: /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2146
- f.icon && /* @__PURE__ */ n.jsx("i", { className: f.icon }),
2147
- /* @__PURE__ */ n.jsx("span", { children: f.label })
2156
+ d.icon && /* @__PURE__ */ n.jsx("i", { className: d.icon }),
2157
+ /* @__PURE__ */ n.jsx("span", { children: d.label })
2148
2158
  ] }),
2149
2159
  onClick: () => {
2150
- g?.(f);
2160
+ h?.(d);
2151
2161
  }
2152
2162
  }))
2153
2163
  },
2154
2164
  trigger: ["click"],
2155
- disabled: a || l,
2156
- children: /* @__PURE__ */ n.jsxs("div", { className: "rte-agent-badge", style: { cursor: A.length > 0 ? "pointer" : "default" }, children: [
2165
+ disabled: r || l,
2166
+ children: /* @__PURE__ */ n.jsxs("div", { className: "rte-agent-badge", style: { cursor: S.length > 0 ? "pointer" : "default" }, children: [
2157
2167
  /* @__PURE__ */ n.jsx("i", { className: "iconfont icon-zhinengti" }),
2158
2168
  /* @__PURE__ */ n.jsx("span", { className: "rte-agent-text", children: "智能体" })
2159
2169
  ] })
2160
2170
  }
2161
2171
  )
2162
2172
  ] }) }),
2163
- /* @__PURE__ */ n.jsx(
2164
- "button",
2165
- {
2166
- type: "button",
2167
- onClick: Le,
2168
- disabled: l || a || e || !D,
2169
- className: "rich-text-editor-send-button",
2170
- children: l || e ? /* @__PURE__ */ n.jsx("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ n.jsx("i", { className: "iconfont icon-fasong" })
2171
- }
2172
- )
2173
+ /* @__PURE__ */ n.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2174
+ (() => {
2175
+ const d = t.find((g) => g.type === "tag");
2176
+ if (!d || !d.text) return null;
2177
+ const f = S.find((g) => g.label === d.text);
2178
+ return !f || f.points === void 0 || f.points === null ? null : /* @__PURE__ */ n.jsxs("div", { className: "rte-points-badge", children: [
2179
+ /* @__PURE__ */ n.jsx("i", { className: "iconfont icon-jifen", style: { marginRight: "4px" } }),
2180
+ /* @__PURE__ */ n.jsxs("span", { style: { fontSize: "16px" }, children: [
2181
+ "-",
2182
+ String(f.points)
2183
+ ] })
2184
+ ] });
2185
+ })(),
2186
+ /* @__PURE__ */ n.jsx(
2187
+ "button",
2188
+ {
2189
+ type: "button",
2190
+ onClick: Ce,
2191
+ disabled: l || r || e || !D,
2192
+ className: "rich-text-editor-send-button",
2193
+ children: l || e ? /* @__PURE__ */ n.jsx("span", { className: "rte-send-spinner" }) : /* @__PURE__ */ n.jsx("i", { className: "iconfont icon-fasong" })
2194
+ }
2195
+ )
2196
+ ] })
2173
2197
  ] }),
2174
- b?.anchorEl && (() => {
2175
- if (!document.body.contains(b.anchorEl))
2198
+ v?.anchorEl && (() => {
2199
+ if (!document.body.contains(v.anchorEl))
2176
2200
  return null;
2177
- let f = "";
2178
- return b.type === "upload" ? f = t.find(
2179
- (h) => h.type === "upload" && h.key === b.key
2180
- )?.tooltip || "" : b.type === "tag" ? f = b.anchorEl.dataset.tooltip || "" : b.type === "upload-label" ? f = b.anchorEl.dataset.fileName || "" : b.type === "variable" && (f = b.anchorEl.dataset.tooltip || ""), pt(
2201
+ let d = "";
2202
+ return v.type === "upload" ? d = t.find(
2203
+ (g) => g.type === "upload" && g.key === v.key
2204
+ )?.tooltip || "" : v.type === "tag" ? d = v.anchorEl.dataset.tooltip || "" : v.type === "upload-label" ? d = v.anchorEl.dataset.fileName || "" : v.type === "variable" && (d = v.anchorEl.dataset.tooltip || ""), ht(
2181
2205
  /* @__PURE__ */ n.jsx(
2182
- et,
2206
+ ot,
2183
2207
  {
2184
2208
  arrow: !1,
2185
- title: /* @__PURE__ */ n.jsx("div", { style: { maxWidth: "200px", fontSize: "12px", color: "#fff" }, children: f }),
2209
+ title: /* @__PURE__ */ n.jsx("div", { style: { maxWidth: "200px", fontSize: "12px", color: "#fff" }, children: d }),
2186
2210
  open: !0,
2187
2211
  placement: "top",
2188
2212
  getPopupContainer: () => document.body,
@@ -2194,10 +2218,10 @@ const Vt = ({
2194
2218
  {
2195
2219
  style: {
2196
2220
  position: "fixed",
2197
- left: `${b.anchorEl.getBoundingClientRect().left}px`,
2198
- top: `${b.anchorEl.getBoundingClientRect().top}px`,
2199
- width: `${b.anchorEl.offsetWidth}px`,
2200
- height: `${b.anchorEl.offsetHeight}px`,
2221
+ left: `${v.anchorEl.getBoundingClientRect().left}px`,
2222
+ top: `${v.anchorEl.getBoundingClientRect().top}px`,
2223
+ width: `${v.anchorEl.offsetWidth}px`,
2224
+ height: `${v.anchorEl.offsetHeight}px`,
2201
2225
  pointerEvents: "none"
2202
2226
  }
2203
2227
  }
@@ -2211,7 +2235,7 @@ const Vt = ({
2211
2235
  }
2212
2236
  );
2213
2237
  };
2214
- Vt.__docgenInfo = {
2238
+ Mt.__docgenInfo = {
2215
2239
  displayName: "RichTextEditor",
2216
2240
  description: "结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",
2217
2241
  props: {
@@ -2239,22 +2263,22 @@ Vt.__docgenInfo = {
2239
2263
  }
2240
2264
  }
2241
2265
  };
2242
- const De = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==", Lt = [
2266
+ const Ue = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==", Dt = [
2243
2267
  { label: "5页", value: 5 },
2244
2268
  { label: "10页", value: 10 },
2245
2269
  { label: "15页", value: 15 },
2246
2270
  { label: "30页", value: 30 }
2247
- ], Pt = ({
2271
+ ], Gt = ({
2248
2272
  autoLoading: t,
2249
2273
  batchSize: p,
2250
2274
  loadingProgress: l,
2251
- loadIcon: a,
2252
- onBatchSizeChange: r,
2253
- onLoadNextPage: m,
2254
- onStartAutoLoad: A,
2255
- onStopLoad: g
2275
+ loadIcon: r,
2276
+ onBatchSizeChange: o,
2277
+ onLoadNextPage: y,
2278
+ onStartAutoLoad: S,
2279
+ onStopLoad: h
2256
2280
  }) => t && l ? /* @__PURE__ */ n.jsxs("div", { className: "auto_load_progress", children: [
2257
- a || /* @__PURE__ */ n.jsx("img", { src: De, alt: "自动加载", width: 14, height: 14 }),
2281
+ r || /* @__PURE__ */ n.jsx("img", { src: Ue, alt: "自动加载", width: 14, height: 14 }),
2258
2282
  /* @__PURE__ */ n.jsxs("span", { children: [
2259
2283
  "正在加载第",
2260
2284
  l.currentPage,
@@ -2263,19 +2287,19 @@ const De = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2263
2287
  "页"
2264
2288
  ] }),
2265
2289
  /* @__PURE__ */ n.jsx(
2266
- tt,
2290
+ lt,
2267
2291
  {
2268
2292
  percent: l.percentage,
2269
2293
  type: "line",
2270
2294
  size: [160, 8]
2271
2295
  }
2272
2296
  ),
2273
- /* @__PURE__ */ n.jsx("span", { onClick: g, className: "auto_load_stop_btn", children: "停止加载" })
2297
+ /* @__PURE__ */ n.jsx("span", { onClick: h, className: "auto_load_stop_btn", children: "停止加载" })
2274
2298
  ] }) : /* @__PURE__ */ n.jsxs("div", { className: "auto_load_container", children: [
2275
2299
  /* @__PURE__ */ n.jsx(
2276
2300
  "div",
2277
2301
  {
2278
- onClick: m,
2302
+ onClick: y,
2279
2303
  className: "auto_load_next_btn",
2280
2304
  style: {
2281
2305
  backgroundColor: t ? "#f5f5f5" : "#2563eb"
@@ -2295,19 +2319,19 @@ const De = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2295
2319
  "div",
2296
2320
  {
2297
2321
  className: "auto_load_btn",
2298
- onClick: t ? void 0 : A,
2322
+ onClick: t ? void 0 : S,
2299
2323
  children: [
2300
- a || /* @__PURE__ */ n.jsx("img", { src: De, alt: "自动加载", width: 14, height: 14 }),
2324
+ r || /* @__PURE__ */ n.jsx("img", { src: Ue, alt: "自动加载", width: 14, height: 14 }),
2301
2325
  /* @__PURE__ */ n.jsx("span", { children: "自动加载" })
2302
2326
  ]
2303
2327
  }
2304
2328
  ),
2305
2329
  /* @__PURE__ */ n.jsx(
2306
- Ve,
2330
+ Oe,
2307
2331
  {
2308
2332
  value: p,
2309
- onChange: r,
2310
- options: Lt,
2333
+ onChange: o,
2334
+ options: Dt,
2311
2335
  disabled: t,
2312
2336
  size: "small",
2313
2337
  className: "auto_load_select",
@@ -2317,35 +2341,35 @@ const De = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2317
2341
  ]
2318
2342
  }
2319
2343
  )
2320
- ] }), Bt = ({
2344
+ ] }), Ft = ({
2321
2345
  current: t,
2322
2346
  loadIcon: p,
2323
2347
  pageSize: l,
2324
- total: a,
2325
- cachedPages: r,
2326
- loadedCount: m,
2327
- autoLoading: A = !1,
2328
- loadingProgress: g,
2329
- onChange: i,
2348
+ total: r,
2349
+ cachedPages: o,
2350
+ loadedCount: y,
2351
+ autoLoading: S = !1,
2352
+ loadingProgress: h,
2353
+ onChange: c,
2330
2354
  onLoadNextPage: e,
2331
- onStartAutoLoad: x,
2355
+ onStartAutoLoad: w,
2332
2356
  onStopLoading: u
2333
2357
  }) => {
2334
- const [q, d] = J(5), o = Math.ceil(a / l), S = Ge(() => r.length >= o, [r, o]), c = () => Array.from(
2335
- { length: o },
2336
- ($, b) => b + 1
2337
- ).filter(($) => !r.includes($)).slice(0, q), w = (k, $, b) => {
2338
- const V = r.includes(k);
2339
- return $ === "prev" || $ === "next" || $ === "jump-prev" || $ === "jump-next" ? /* @__PURE__ */ n.jsx("div", { className: "pageBox", children: b }) : /* @__PURE__ */ n.jsxs(
2358
+ const [q, m] = Q(5), a = Math.ceil(r / l), C = Xe(() => o.length >= a, [o, a]), i = () => Array.from(
2359
+ { length: a },
2360
+ (A, v) => v + 1
2361
+ ).filter((A) => !o.includes(A)).slice(0, q), E = (T, A, v) => {
2362
+ const V = o.includes(T);
2363
+ return A === "prev" || A === "next" || A === "jump-prev" || A === "jump-next" ? /* @__PURE__ */ n.jsx("div", { className: "pageBox", children: v }) : /* @__PURE__ */ n.jsxs(
2340
2364
  "div",
2341
2365
  {
2342
2366
  className: "pageBox",
2343
2367
  style: {
2344
- backgroundColor: t === k ? "#2563EB" : "#f5f5f5",
2345
- color: t === k ? "#fff" : V ? "#171717" : "#a3a3a3"
2368
+ backgroundColor: t === T ? "#2563EB" : "#f5f5f5",
2369
+ color: t === T ? "#fff" : V ? "#171717" : "#a3a3a3"
2346
2370
  },
2347
2371
  children: [
2348
- k,
2372
+ T,
2349
2373
  !V && /* @__PURE__ */ n.jsx("span", { className: "unload_spot" })
2350
2374
  ]
2351
2375
  }
@@ -2355,105 +2379,105 @@ const De = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
2355
2379
  /* @__PURE__ */ n.jsxs("div", { className: "pagination_leftWrap", children: [
2356
2380
  /* @__PURE__ */ n.jsxs("span", { className: "pagination_total", children: [
2357
2381
  /* @__PURE__ */ n.jsx(
2358
- it,
2382
+ ft,
2359
2383
  {
2360
2384
  style: { color: "#2563EB", marginRight: "4px" }
2361
2385
  }
2362
2386
  ),
2363
2387
  "已加载: ",
2364
- m,
2388
+ y,
2365
2389
  "/",
2366
- a,
2390
+ r,
2367
2391
  "条数据"
2368
2392
  ] }),
2369
- !S && /* @__PURE__ */ n.jsx(
2370
- Pt,
2393
+ !C && /* @__PURE__ */ n.jsx(
2394
+ Gt,
2371
2395
  {
2372
2396
  loadIcon: p || void 0,
2373
- autoLoading: A,
2397
+ autoLoading: S,
2374
2398
  batchSize: q,
2375
- loadingProgress: g,
2376
- disabled: !e || !x,
2377
- onBatchSizeChange: d,
2399
+ loadingProgress: h,
2400
+ disabled: !e || !w,
2401
+ onBatchSizeChange: m,
2378
2402
  onLoadNextPage: () => e?.(),
2379
2403
  onStartAutoLoad: () => {
2380
- const k = c();
2381
- x?.(k);
2404
+ const T = i();
2405
+ w?.(T);
2382
2406
  },
2383
2407
  onStopLoad: () => u?.()
2384
2408
  }
2385
2409
  )
2386
2410
  ] }),
2387
2411
  /* @__PURE__ */ n.jsx(
2388
- nt,
2412
+ st,
2389
2413
  {
2390
2414
  current: t,
2391
2415
  pageSize: l,
2392
- total: a,
2393
- onChange: (k) => i(k),
2416
+ total: r,
2417
+ onChange: (T) => c(T),
2394
2418
  showSizeChanger: !1,
2395
2419
  showQuickJumper: !1,
2396
- showTotal: (k, $) => "",
2397
- itemRender: w
2420
+ showTotal: (T, A) => "",
2421
+ itemRender: E
2398
2422
  }
2399
2423
  )
2400
2424
  ] });
2401
- }, Ot = (t) => {
2425
+ }, zt = (t) => {
2402
2426
  const {
2403
2427
  loading: p,
2404
2428
  autoLoading: l,
2405
- loadingProgress: a,
2406
- columns: r = [],
2407
- dataSource: m = [],
2408
- total: A,
2409
- current: g,
2410
- pageSize: i,
2429
+ loadingProgress: r,
2430
+ columns: o = [],
2431
+ dataSource: y = [],
2432
+ total: S,
2433
+ current: h,
2434
+ pageSize: c,
2411
2435
  cachedPages: e,
2412
- onChangePage: x,
2436
+ onChangePage: w,
2413
2437
  onLoadNextPage: u,
2414
2438
  onStartAutoLoad: q,
2415
- onStopLoading: d,
2416
- ...o
2417
- } = t, S = z(null), c = W(
2418
- (w) => {
2419
- x(w), e.includes(w) && S.current?.scrollTo({
2420
- key: `${(w - 1) * i + 1}`
2439
+ onStopLoading: m,
2440
+ ...a
2441
+ } = t, C = F(null), i = U(
2442
+ (E) => {
2443
+ w(E), e.includes(E) && C.current?.scrollTo({
2444
+ key: `${(E - 1) * c + 1}`
2421
2445
  });
2422
2446
  },
2423
- [g]
2447
+ [h]
2424
2448
  );
2425
2449
  return /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col", children: [
2426
2450
  /* @__PURE__ */ n.jsx(
2427
- Ie,
2451
+ Be,
2428
2452
  {
2429
- ref: S,
2430
- ...o,
2431
- columns: r,
2432
- dataSource: m,
2453
+ ref: C,
2454
+ ...a,
2455
+ columns: o,
2456
+ dataSource: y,
2433
2457
  pagination: !1,
2434
2458
  virtual: !0
2435
2459
  }
2436
2460
  ),
2437
2461
  /* @__PURE__ */ n.jsx(
2438
- Bt,
2462
+ Ft,
2439
2463
  {
2440
2464
  loading: p,
2441
2465
  autoLoading: l,
2442
- loadingProgress: a,
2443
- current: g,
2444
- pageSize: i,
2445
- total: A,
2446
- loadedCount: m.length,
2466
+ loadingProgress: r,
2467
+ current: h,
2468
+ pageSize: c,
2469
+ total: S,
2470
+ loadedCount: y.length,
2447
2471
  cachedPages: e,
2448
- onChange: c,
2472
+ onChange: i,
2449
2473
  onLoadNextPage: u,
2450
2474
  onStartAutoLoad: q,
2451
- onStopLoading: d
2475
+ onStopLoading: m
2452
2476
  }
2453
2477
  )
2454
2478
  ] });
2455
2479
  };
2456
- Ot.__docgenInfo = {
2480
+ zt.__docgenInfo = {
2457
2481
  displayName: "VirtualTable",
2458
2482
  description: "虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",
2459
2483
  props: {
@@ -2560,79 +2584,79 @@ Ot.__docgenInfo = {
2560
2584
  }
2561
2585
  }
2562
2586
  };
2563
- const Mt = ({
2587
+ const Ht = ({
2564
2588
  texts: t = [],
2565
2589
  placeholder: p = "请输入内容",
2566
2590
  animationSpeed: l = 100,
2567
- autoPlay: a = !0,
2568
- value: r,
2569
- onChange: m,
2570
- ...A
2591
+ autoPlay: r = !0,
2592
+ value: o,
2593
+ onChange: y,
2594
+ ...S
2571
2595
  }) => {
2572
- const [g, i] = J(""), [e, x] = J(0), [u, q] = J(!1), [d, o] = J(!1), [S, c] = J(!1), w = z(void 0), k = z(void 0), $ = z(t), b = z(e), V = z(d), _ = z(g);
2573
- oe(() => {
2574
- $.current = t, b.current = e, V.current = d, _.current = g;
2596
+ const [h, c] = Q(""), [e, w] = Q(0), [u, q] = Q(!1), [m, a] = Q(!1), [C, i] = Q(!1), E = F(void 0), T = F(void 0), A = F(t), v = F(e), V = F(m), _ = F(h);
2597
+ le(() => {
2598
+ A.current = t, v.current = e, V.current = m, _.current = h;
2575
2599
  });
2576
- const P = W((T, I) => {
2577
- let Q = 0;
2578
- c(!0);
2579
- const ee = () => {
2580
- Q < T.length ? (i(T.slice(0, Q + 1)), Q++, k.current = window.setTimeout(ee, l)) : (c(!1), I?.());
2600
+ const P = U((k, I) => {
2601
+ let Z = 0;
2602
+ i(!0);
2603
+ const te = () => {
2604
+ Z < k.length ? (c(k.slice(0, Z + 1)), Z++, T.current = window.setTimeout(te, l)) : (i(!1), I?.());
2581
2605
  };
2582
- ee();
2583
- }, [l]), D = W((T) => {
2606
+ te();
2607
+ }, [l]), D = U((k) => {
2584
2608
  let I = _.current.length;
2585
- const Q = () => {
2586
- I > 0 ? (i(_.current.slice(0, I - 1)), I--, k.current = window.setTimeout(Q, l / 2)) : T?.();
2609
+ const Z = () => {
2610
+ I > 0 ? (c(_.current.slice(0, I - 1)), I--, T.current = window.setTimeout(Z, l / 2)) : k?.();
2587
2611
  };
2588
- Q();
2589
- }, [l]), B = W(() => {
2590
- if ($.current.length === 0 || V.current) return;
2612
+ Z();
2613
+ }, [l]), B = U(() => {
2614
+ if (A.current.length === 0 || V.current) return;
2591
2615
  q(!0);
2592
- const T = $.current[b.current];
2616
+ const k = A.current[v.current];
2593
2617
  _.current ? D(() => {
2594
- P(T, () => {
2595
- w.current = window.setTimeout(() => {
2596
- x((I) => (I + 1) % $.current.length), q(!1);
2618
+ P(k, () => {
2619
+ E.current = window.setTimeout(() => {
2620
+ w((I) => (I + 1) % A.current.length), q(!1);
2597
2621
  }, 2e3);
2598
2622
  });
2599
- }) : P(T, () => {
2600
- w.current = window.setTimeout(() => {
2601
- x((I) => (I + 1) % $.current.length), q(!1);
2623
+ }) : P(k, () => {
2624
+ E.current = window.setTimeout(() => {
2625
+ w((I) => (I + 1) % A.current.length), q(!1);
2602
2626
  }, 2e3);
2603
2627
  });
2604
2628
  }, [D, P]);
2605
- oe(() => (a && t.length > 0 && !d && B(), () => {
2606
- w.current && window.clearTimeout(w.current), k.current && window.clearTimeout(k.current);
2607
- }), [e, d, a, t.length, B]), oe(() => {
2608
- !u && a && t.length > 0 && !d && B();
2609
- }, [e, u, a, t.length, d, B]);
2610
- const U = (T) => {
2611
- o(!0), w.current && window.clearTimeout(w.current), k.current && window.clearTimeout(k.current), q(!1), c(!1), A.onFocus?.(T);
2612
- }, H = (T) => {
2613
- o(!1), !r && t.length > 0 && (i(""), x(0)), A.onBlur?.(T);
2614
- }, X = (T) => {
2615
- m?.(T.target.value), A.onChange?.(T);
2616
- }, Z = () => d || r ? p : g || p;
2629
+ le(() => (r && t.length > 0 && !m && B(), () => {
2630
+ E.current && window.clearTimeout(E.current), T.current && window.clearTimeout(T.current);
2631
+ }), [e, m, r, t.length, B]), le(() => {
2632
+ !u && r && t.length > 0 && !m && B();
2633
+ }, [e, u, r, t.length, m, B]);
2634
+ const X = (k) => {
2635
+ a(!0), E.current && window.clearTimeout(E.current), T.current && window.clearTimeout(T.current), q(!1), i(!1), S.onFocus?.(k);
2636
+ }, z = (k) => {
2637
+ a(!1), !o && t.length > 0 && (c(""), w(0)), S.onBlur?.(k);
2638
+ }, K = (k) => {
2639
+ y?.(k.target.value), S.onChange?.(k);
2640
+ }, ee = () => m || o ? p : h || p;
2617
2641
  return /* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
2618
2642
  /* @__PURE__ */ n.jsx(
2619
- Fe,
2643
+ Ke,
2620
2644
  {
2621
- ...A,
2622
- value: r,
2623
- onChange: X,
2624
- onFocus: U,
2625
- onBlur: H,
2626
- placeholder: Z(),
2645
+ ...S,
2646
+ value: o,
2647
+ onChange: K,
2648
+ onFocus: X,
2649
+ onBlur: z,
2650
+ placeholder: ee(),
2627
2651
  style: {
2628
2652
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2629
- ...A.style,
2653
+ ...S.style,
2630
2654
  position: "relative",
2631
2655
  zIndex: 1
2632
2656
  }
2633
2657
  }
2634
2658
  ),
2635
- !d && !r && g && /* @__PURE__ */ n.jsxs(
2659
+ !m && !o && h && /* @__PURE__ */ n.jsxs(
2636
2660
  "div",
2637
2661
  {
2638
2662
  style: {
@@ -2652,8 +2676,8 @@ const Mt = ({
2652
2676
  fontFamily: "inherit"
2653
2677
  },
2654
2678
  children: [
2655
- /* @__PURE__ */ n.jsx("span", { children: g }),
2656
- S && /* @__PURE__ */ n.jsx(
2679
+ /* @__PURE__ */ n.jsx("span", { children: h }),
2680
+ C && /* @__PURE__ */ n.jsx(
2657
2681
  "span",
2658
2682
  {
2659
2683
  style: {
@@ -2677,7 +2701,7 @@ const Mt = ({
2677
2701
  ` })
2678
2702
  ] });
2679
2703
  };
2680
- Mt.__docgenInfo = {
2704
+ Ht.__docgenInfo = {
2681
2705
  displayName: "DynamicInput",
2682
2706
  description: "动态文案输入框组件,支持流式文字动画效果",
2683
2707
  props: {
@@ -2722,106 +2746,106 @@ Mt.__docgenInfo = {
2722
2746
  }
2723
2747
  }
2724
2748
  };
2725
- const Dt = ({
2749
+ const Wt = ({
2726
2750
  texts: t = [],
2727
2751
  // 动态文案数组,默认为空数组
2728
2752
  placeholder: p = "请输入内容",
2729
2753
  // 占位符文本
2730
2754
  animationSpeed: l = 100,
2731
2755
  // 打字机动画速度,毫秒
2732
- autoPlay: a = !0,
2756
+ autoPlay: r = !0,
2733
2757
  // 是否自动播放动画
2734
- value: r = "",
2758
+ value: o = "",
2735
2759
  // 受控模式的值
2736
- onChange: m,
2760
+ onChange: y,
2737
2761
  // 受控模式的变化回调
2738
- onSubmit: A,
2762
+ onSubmit: S,
2739
2763
  // 提交回调
2740
- maxLength: g = 500,
2764
+ maxLength: h = 500,
2741
2765
  // 最大字符数限制
2742
- showCount: i = !0,
2766
+ showCount: c = !0,
2743
2767
  // 是否显示字数统计
2744
2768
  submitText: e = "发送",
2745
2769
  // 提交按钮文本
2746
- disabled: x = !1,
2770
+ disabled: w = !1,
2747
2771
  // 是否禁用组件
2748
2772
  rows: u = 4,
2749
2773
  // 文本域行数
2750
2774
  style: q,
2751
2775
  // 自定义样式
2752
- ...d
2776
+ ...m
2753
2777
  // 其他原生属性
2754
2778
  }) => {
2755
- const [o, S] = J(""), [c, w] = J(0), [k, $] = J(!1), [b, V] = J(!1), [_, P] = J(!1), [D, B] = J(r || ""), U = z(void 0), H = z(void 0), X = z(t), Z = z(c), T = z(b), I = z(o), Q = z(null);
2756
- oe(() => {
2757
- X.current = t, Z.current = c, T.current = b, I.current = o;
2779
+ const [a, C] = Q(""), [i, E] = Q(0), [T, A] = Q(!1), [v, V] = Q(!1), [_, P] = Q(!1), [D, B] = Q(o || ""), X = F(void 0), z = F(void 0), K = F(t), ee = F(i), k = F(v), I = F(a), Z = F(null);
2780
+ le(() => {
2781
+ K.current = t, ee.current = i, k.current = v, I.current = a;
2758
2782
  });
2759
- const ee = W((O, G) => {
2783
+ const te = U((M, G) => {
2760
2784
  let ue = 0;
2761
2785
  P(!0);
2762
2786
  const ve = () => {
2763
- ue < O.length ? (S(O.slice(0, ue + 1)), ue++, H.current = window.setTimeout(ve, l)) : (P(!1), G?.());
2787
+ ue < M.length ? (C(M.slice(0, ue + 1)), ue++, z.current = window.setTimeout(ve, l)) : (P(!1), G?.());
2764
2788
  };
2765
2789
  ve();
2766
- }, [l]), pe = W((O) => {
2790
+ }, [l]), pe = U((M) => {
2767
2791
  let G = I.current.length;
2768
2792
  const ue = () => {
2769
- G > 0 ? (S(I.current.slice(0, G - 1)), G--, H.current = window.setTimeout(ue, l / 2)) : O?.();
2793
+ G > 0 ? (C(I.current.slice(0, G - 1)), G--, z.current = window.setTimeout(ue, l / 2)) : M?.();
2770
2794
  };
2771
2795
  ue();
2772
- }, [l]), he = W(() => {
2773
- if (X.current.length === 0 || T.current) return;
2774
- $(!0);
2775
- const O = X.current[Z.current];
2796
+ }, [l]), ge = U(() => {
2797
+ if (K.current.length === 0 || k.current) return;
2798
+ A(!0);
2799
+ const M = K.current[ee.current];
2776
2800
  I.current ? pe(() => {
2777
- ee(O, () => {
2778
- U.current = window.setTimeout(() => {
2779
- w((G) => (G + 1) % X.current.length), $(!1);
2801
+ te(M, () => {
2802
+ X.current = window.setTimeout(() => {
2803
+ E((G) => (G + 1) % K.current.length), A(!1);
2780
2804
  }, 2e3);
2781
2805
  });
2782
- }) : ee(O, () => {
2783
- U.current = window.setTimeout(() => {
2784
- w((G) => (G + 1) % X.current.length), $(!1);
2806
+ }) : te(M, () => {
2807
+ X.current = window.setTimeout(() => {
2808
+ E((G) => (G + 1) % K.current.length), A(!1);
2785
2809
  }, 2e3);
2786
2810
  });
2787
- }, [pe, ee]);
2788
- oe(() => (a && t.length > 0 && !b && he(), () => {
2789
- U.current && window.clearTimeout(U.current), H.current && window.clearTimeout(H.current);
2790
- }), [c, b, a, t.length, he]), oe(() => {
2791
- !k && a && t.length > 0 && !b && he();
2792
- }, [c, k, a, t.length, b, he]);
2793
- const s = (O) => {
2794
- V(!0), U.current && window.clearTimeout(U.current), H.current && window.clearTimeout(H.current), $(!1), P(!1), d.onFocus?.(O);
2795
- }, L = (O) => {
2796
- V(!1), !r && t.length > 0 && (S(""), w(0)), d.onBlur?.(O);
2797
- }, K = (O) => {
2798
- const G = O.target.value;
2799
- g && G.length > g || (m ? m(G) : B(G), d.onChange?.(O));
2800
- }, ae = () => {
2801
- const O = m ? r : D;
2802
- O.trim() && !x && (A?.(O), m || B(""));
2803
- }, ye = (O) => {
2804
- (O.ctrlKey || O.metaKey) && O.key === "Enter" && (O.preventDefault(), ae()), d.onKeyDown?.(O);
2805
- }, ce = m ? r : D, be = x || !ce.trim() || (g ? ce.length > g : !1);
2811
+ }, [pe, te]);
2812
+ le(() => (r && t.length > 0 && !v && ge(), () => {
2813
+ X.current && window.clearTimeout(X.current), z.current && window.clearTimeout(z.current);
2814
+ }), [i, v, r, t.length, ge]), le(() => {
2815
+ !T && r && t.length > 0 && !v && ge();
2816
+ }, [i, T, r, t.length, v, ge]);
2817
+ const s = (M) => {
2818
+ V(!0), X.current && window.clearTimeout(X.current), z.current && window.clearTimeout(z.current), A(!1), P(!1), m.onFocus?.(M);
2819
+ }, L = (M) => {
2820
+ V(!1), !o && t.length > 0 && (C(""), E(0)), m.onBlur?.(M);
2821
+ }, Y = (M) => {
2822
+ const G = M.target.value;
2823
+ h && G.length > h || (y ? y(G) : B(G), m.onChange?.(M));
2824
+ }, re = () => {
2825
+ const M = y ? o : D;
2826
+ M.trim() && !w && (S?.(M), y || B(""));
2827
+ }, fe = (M) => {
2828
+ (M.ctrlKey || M.metaKey) && M.key === "Enter" && (M.preventDefault(), re()), m.onKeyDown?.(M);
2829
+ }, ie = y ? o : D, xe = w || !ie.trim() || (h ? ie.length > h : !1);
2806
2830
  return /* @__PURE__ */ n.jsxs("div", { style: { position: "relative", ...q }, children: [
2807
2831
  /* @__PURE__ */ n.jsxs("div", { style: { position: "relative" }, children: [
2808
2832
  /* @__PURE__ */ n.jsx(
2809
2833
  "textarea",
2810
2834
  {
2811
- ref: Q,
2812
- value: m ? r : D,
2813
- onChange: K,
2814
- onFocus: (O) => {
2815
- O.target.style.borderColor = "#1890ff", O.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", s(O);
2835
+ ref: Z,
2836
+ value: y ? o : D,
2837
+ onChange: Y,
2838
+ onFocus: (M) => {
2839
+ M.target.style.borderColor = "#1890ff", M.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", s(M);
2816
2840
  },
2817
- onBlur: (O) => {
2818
- O.target.style.borderColor = "#d9d9d9", O.target.style.boxShadow = "none", L(O);
2841
+ onBlur: (M) => {
2842
+ M.target.style.borderColor = "#d9d9d9", M.target.style.boxShadow = "none", L(M);
2819
2843
  },
2820
- onKeyDown: ye,
2821
- placeholder: b || ce ? p : "",
2822
- maxLength: g,
2844
+ onKeyDown: fe,
2845
+ placeholder: v || ie ? p : "",
2846
+ maxLength: h,
2823
2847
  rows: u,
2824
- disabled: x,
2848
+ disabled: w,
2825
2849
  style: {
2826
2850
  width: "100%",
2827
2851
  minHeight: `${u * 24 + 16}px`,
@@ -2837,12 +2861,12 @@ const Dt = ({
2837
2861
  transition: "border-color 0.3s, box-shadow 0.3s",
2838
2862
  backgroundColor: "#fff",
2839
2863
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2840
- ...d.style
2864
+ ...m.style
2841
2865
  },
2842
- ...d
2866
+ ...m
2843
2867
  }
2844
2868
  ),
2845
- !b && !ce && o && /* @__PURE__ */ n.jsxs(
2869
+ !v && !ie && a && /* @__PURE__ */ n.jsxs(
2846
2870
  "div",
2847
2871
  {
2848
2872
  style: {
@@ -2864,7 +2888,7 @@ const Dt = ({
2864
2888
  lineHeight: "1.5"
2865
2889
  },
2866
2890
  children: [
2867
- /* @__PURE__ */ n.jsx("span", { children: o }),
2891
+ /* @__PURE__ */ n.jsx("span", { children: a }),
2868
2892
  _ && /* @__PURE__ */ n.jsx(
2869
2893
  "span",
2870
2894
  {
@@ -2891,13 +2915,13 @@ const Dt = ({
2891
2915
  zIndex: 3
2892
2916
  },
2893
2917
  children: /* @__PURE__ */ n.jsx(
2894
- xe,
2918
+ we,
2895
2919
  {
2896
2920
  type: "primary",
2897
2921
  size: "small",
2898
- icon: /* @__PURE__ */ n.jsx(ct, {}),
2899
- onClick: ae,
2900
- disabled: be,
2922
+ icon: /* @__PURE__ */ n.jsx(mt, {}),
2923
+ onClick: re,
2924
+ disabled: xe,
2901
2925
  style: {
2902
2926
  borderRadius: 6,
2903
2927
  minWidth: 32,
@@ -2912,7 +2936,7 @@ const Dt = ({
2912
2936
  }
2913
2937
  )
2914
2938
  ] }),
2915
- i && /* @__PURE__ */ n.jsxs(
2939
+ c && /* @__PURE__ */ n.jsxs(
2916
2940
  "div",
2917
2941
  {
2918
2942
  style: {
@@ -2922,9 +2946,9 @@ const Dt = ({
2922
2946
  color: "#999"
2923
2947
  },
2924
2948
  children: [
2925
- ce.length,
2949
+ ie.length,
2926
2950
  "/",
2927
- g
2951
+ h
2928
2952
  ]
2929
2953
  }
2930
2954
  ),
@@ -2936,7 +2960,7 @@ const Dt = ({
2936
2960
  ` })
2937
2961
  ] });
2938
2962
  };
2939
- Dt.__docgenInfo = {
2963
+ Wt.__docgenInfo = {
2940
2964
  displayName: "DynamicTextArea",
2941
2965
  description: "动态文案文本域组件,支持流式文字动画效果",
2942
2966
  props: {
@@ -3022,88 +3046,88 @@ Dt.__docgenInfo = {
3022
3046
  }
3023
3047
  }
3024
3048
  };
3025
- const ze = ({
3049
+ const Ye = ({
3026
3050
  src: t,
3027
3051
  poster: p,
3028
3052
  width: l = 300,
3029
- height: a,
3030
- videoWidth: r,
3053
+ height: r,
3054
+ videoWidth: o,
3031
3055
  // 参数保留但不使用,由CSS控制
3032
- videoHeight: m,
3056
+ videoHeight: y,
3033
3057
  // 参数保留但不使用,由CSS控制
3034
- showPlayButton: A = !0,
3035
- autoPlayOnHover: g = !0,
3036
- onClick: i,
3058
+ showPlayButton: S = !0,
3059
+ autoPlayOnHover: h = !0,
3060
+ onClick: c,
3037
3061
  onVideoLoaded: e,
3038
- onVideoPlay: x,
3062
+ onVideoPlay: w,
3039
3063
  onVideoPause: u,
3040
3064
  onVideoEnded: q,
3041
- className: d,
3042
- style: o,
3043
- ...S
3065
+ className: m,
3066
+ style: a,
3067
+ ...C
3044
3068
  }) => {
3045
- const c = z(null), [w, k] = J(!1), [$, b] = J(!1), [V, _] = J(!1), P = W(() => {
3046
- c.current && (c.current.play(), k(!0), x?.());
3047
- }, [x]), D = W(() => {
3048
- c.current && (c.current.pause(), k(!1), u?.());
3049
- }, [u]), B = W((ee) => {
3050
- ee.stopPropagation(), w ? D() : P();
3051
- }, [w, P, D]), U = W(() => {
3052
- b(!0), g && !w && P();
3053
- }, [g, w, P]), H = W(() => {
3054
- b(!1), g && w && D();
3055
- }, [g, w, D]), X = W(() => {
3069
+ const i = F(null), [E, T] = Q(!1), [A, v] = Q(!1), [V, _] = Q(!1), P = U(() => {
3070
+ i.current && (i.current.play(), T(!0), w?.());
3071
+ }, [w]), D = U(() => {
3072
+ i.current && (i.current.pause(), T(!1), u?.());
3073
+ }, [u]), B = U((te) => {
3074
+ te.stopPropagation(), E ? D() : P();
3075
+ }, [E, P, D]), X = U(() => {
3076
+ v(!0), h && !E && P();
3077
+ }, [h, E, P]), z = U(() => {
3078
+ v(!1), h && E && D();
3079
+ }, [h, E, D]), K = U(() => {
3056
3080
  _(!0), e?.();
3057
- }, [e]), Z = W(() => {
3058
- k(!0), x?.();
3059
- }, [x]), T = W(() => {
3060
- k(!1), u?.();
3061
- }, [u]), I = W(() => {
3062
- k(!1), q?.();
3063
- }, [q]), Q = W((ee) => {
3064
- i?.(ee);
3065
- }, [i]);
3081
+ }, [e]), ee = U(() => {
3082
+ T(!0), w?.();
3083
+ }, [w]), k = U(() => {
3084
+ T(!1), u?.();
3085
+ }, [u]), I = U(() => {
3086
+ T(!1), q?.();
3087
+ }, [q]), Z = U((te) => {
3088
+ c?.(te);
3089
+ }, [c]);
3066
3090
  return /* @__PURE__ */ n.jsx(
3067
- Re,
3091
+ Pe,
3068
3092
  {
3069
- ...S,
3070
- className: `video-card ${d || ""}`,
3093
+ ...C,
3094
+ className: `video-card ${m || ""}`,
3071
3095
  style: {
3072
3096
  width: l,
3073
- height: a,
3097
+ height: r,
3074
3098
  padding: 0,
3075
3099
  overflow: "hidden",
3076
- cursor: i ? "pointer" : "default",
3100
+ cursor: c ? "pointer" : "default",
3077
3101
  border: "none",
3078
3102
  borderRadius: 0,
3079
- ...o
3103
+ ...a
3080
3104
  },
3081
3105
  bordered: !1,
3082
- onMouseEnter: U,
3083
- onMouseLeave: H,
3084
- onClick: Q,
3106
+ onMouseEnter: X,
3107
+ onMouseLeave: z,
3108
+ onClick: Z,
3085
3109
  children: /* @__PURE__ */ n.jsxs("div", { className: "video-card-container", children: [
3086
3110
  /* @__PURE__ */ n.jsx(
3087
3111
  "video",
3088
3112
  {
3089
- ref: c,
3113
+ ref: i,
3090
3114
  src: t,
3091
3115
  poster: p,
3092
3116
  preload: "metadata",
3093
- onLoadedData: X,
3094
- onPlay: Z,
3095
- onPause: T,
3117
+ onLoadedData: K,
3118
+ onPlay: ee,
3119
+ onPause: k,
3096
3120
  onEnded: I,
3097
3121
  muted: !0,
3098
3122
  loop: !0
3099
3123
  }
3100
3124
  ),
3101
- A && /* @__PURE__ */ n.jsx(
3125
+ S && /* @__PURE__ */ n.jsx(
3102
3126
  "div",
3103
3127
  {
3104
- className: `video-play-button ${$ ? "hovered" : ""}`,
3128
+ className: `video-play-button ${A ? "hovered" : ""}`,
3105
3129
  onClick: B,
3106
- children: w ? /* @__PURE__ */ n.jsx(ut, { className: "play-icon" }) : /* @__PURE__ */ n.jsx(dt, { className: "play-icon" })
3130
+ children: E ? /* @__PURE__ */ n.jsx(yt, { className: "play-icon" }) : /* @__PURE__ */ n.jsx(gt, { className: "play-icon" })
3107
3131
  }
3108
3132
  ),
3109
3133
  !V && /* @__PURE__ */ n.jsx("div", { className: "video-loading-mask", children: /* @__PURE__ */ n.jsx("div", { className: "loading-spinner" }) })
@@ -3111,7 +3135,7 @@ const ze = ({
3111
3135
  }
3112
3136
  );
3113
3137
  };
3114
- ze.__docgenInfo = {
3138
+ Ye.__docgenInfo = {
3115
3139
  displayName: "VideoCard",
3116
3140
  description: "视频卡片组件,支持鼠标悬浮播放控制",
3117
3141
  props: {
@@ -3212,12 +3236,12 @@ ze.__docgenInfo = {
3212
3236
  }
3213
3237
  }
3214
3238
  };
3215
- const Gt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((l) => t.toLowerCase().includes(l)), Ft = (t) => t.type ? t.type : Gt(t.url) ? "video" : "image", zt = ({
3239
+ const Ut = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mkv"].some((l) => t.toLowerCase().includes(l)), Xt = (t) => t.type ? t.type : Ut(t.url) ? "video" : "image", Kt = ({
3216
3240
  items: t,
3217
3241
  columns: p,
3218
3242
  gap: l = 0,
3219
- responsive: a = !0,
3220
- breakpoints: r = {
3243
+ responsive: r = !0,
3244
+ breakpoints: o = {
3221
3245
  xs: 1,
3222
3246
  sm: 2,
3223
3247
  md: 3,
@@ -3225,78 +3249,78 @@ const Gt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
3225
3249
  xl: 5,
3226
3250
  xxl: 6
3227
3251
  },
3228
- className: m,
3229
- style: A,
3230
- onClick: g
3252
+ className: y,
3253
+ style: S,
3254
+ onClick: h
3231
3255
  }) => {
3232
- const i = z(null), [e, x] = J(p || r.md || 3), u = z(/* @__PURE__ */ new Map()), q = W(() => {
3233
- if (!a || p)
3234
- return p || r.md || 3;
3235
- const c = window.innerWidth;
3236
- return c < 576 ? r.xs || 1 : c < 768 ? r.sm || 2 : c < 992 ? r.md || 3 : c < 1200 ? r.lg || 4 : c < 1600 ? r.xl || 5 : r.xxl || 6;
3237
- }, [a, p, r]), d = W(() => {
3238
- if (!i.current) return;
3239
- const c = e, w = i.current, $ = (w.offsetWidth - l * (c - 1)) / c, b = new Array(c).fill(0);
3256
+ const c = F(null), [e, w] = Q(p || o.md || 3), u = F(/* @__PURE__ */ new Map()), q = U(() => {
3257
+ if (!r || p)
3258
+ return p || o.md || 3;
3259
+ const i = window.innerWidth;
3260
+ return i < 576 ? o.xs || 1 : i < 768 ? o.sm || 2 : i < 992 ? o.md || 3 : i < 1200 ? o.lg || 4 : i < 1600 ? o.xl || 5 : o.xxl || 6;
3261
+ }, [r, p, o]), m = U(() => {
3262
+ if (!c.current) return;
3263
+ const i = e, E = c.current, A = (E.offsetWidth - l * (i - 1)) / i, v = new Array(i).fill(0);
3240
3264
  t.forEach((_, P) => {
3241
3265
  const D = _.id || P, B = u.current.get(D);
3242
3266
  if (!B) return;
3243
- const U = Math.min(...b), H = b.indexOf(U), X = H * ($ + l), Z = b[H];
3244
- B.style.position = "absolute", B.style.left = `${X}px`, B.style.top = `${Z}px`, B.style.width = `${$}px`, b[H] += B.offsetHeight + l;
3267
+ const X = Math.min(...v), z = v.indexOf(X), K = z * (A + l), ee = v[z];
3268
+ B.style.position = "absolute", B.style.left = `${K}px`, B.style.top = `${ee}px`, B.style.width = `${A}px`, v[z] += B.offsetHeight + l;
3245
3269
  });
3246
- const V = Math.max(...b);
3247
- w.style.height = `${V}px`;
3270
+ const V = Math.max(...v);
3271
+ E.style.height = `${V}px`;
3248
3272
  }, [t, e, l]);
3249
- oe(() => {
3250
- const c = () => {
3251
- const w = q();
3252
- w !== e && x(w);
3273
+ le(() => {
3274
+ const i = () => {
3275
+ const E = q();
3276
+ E !== e && w(E);
3253
3277
  };
3254
- if (a)
3255
- return window.addEventListener("resize", c), c(), () => window.removeEventListener("resize", c);
3256
- }, [a, q, e]), oe(() => {
3257
- const c = setTimeout(() => {
3258
- d();
3278
+ if (r)
3279
+ return window.addEventListener("resize", i), i(), () => window.removeEventListener("resize", i);
3280
+ }, [r, q, e]), le(() => {
3281
+ const i = setTimeout(() => {
3282
+ m();
3259
3283
  }, 100);
3260
- return () => clearTimeout(c);
3261
- }, [t, e, d]);
3262
- const o = W(() => {
3263
- d();
3264
- }, [d]), S = W((c) => {
3265
- g && g(c), c.onClick?.(c);
3266
- }, [g]);
3284
+ return () => clearTimeout(i);
3285
+ }, [t, e, m]);
3286
+ const a = U(() => {
3287
+ m();
3288
+ }, [m]), C = U((i) => {
3289
+ h && h(i), i.onClick?.(i);
3290
+ }, [h]);
3267
3291
  return /* @__PURE__ */ n.jsx(
3268
3292
  "div",
3269
3293
  {
3270
- ref: i,
3271
- className: `waterfall-container ${m || ""}`,
3294
+ ref: c,
3295
+ className: `waterfall-container ${y || ""}`,
3272
3296
  style: {
3273
3297
  position: "relative",
3274
3298
  width: "100%",
3275
- ...A
3299
+ ...S
3276
3300
  },
3277
- children: t.map((c, w) => {
3278
- const k = c.id || w, $ = Ft(c);
3301
+ children: t.map((i, E) => {
3302
+ const T = i.id || E, A = Xt(i);
3279
3303
  return /* @__PURE__ */ n.jsx(
3280
3304
  "div",
3281
3305
  {
3282
- ref: (b) => {
3283
- b ? u.current.set(k, b) : u.current.delete(k);
3306
+ ref: (v) => {
3307
+ v ? u.current.set(T, v) : u.current.delete(T);
3284
3308
  },
3285
3309
  className: "waterfall-item",
3286
- children: $ === "video" ? /* @__PURE__ */ n.jsx("div", { style: {
3310
+ children: A === "video" ? /* @__PURE__ */ n.jsx("div", { style: {
3287
3311
  width: "100%",
3288
3312
  position: "relative",
3289
3313
  paddingBottom: "56.25%",
3290
- cursor: g || c.onClick ? "pointer" : "default"
3314
+ cursor: h || i.onClick ? "pointer" : "default"
3291
3315
  }, children: /* @__PURE__ */ n.jsx("div", { style: { position: "absolute", top: 0, left: 0, width: "100%", height: "100%" }, children: /* @__PURE__ */ n.jsx(
3292
- ze,
3316
+ Ye,
3293
3317
  {
3294
- src: c.url,
3295
- poster: c.poster,
3318
+ src: i.url,
3319
+ poster: i.poster,
3296
3320
  width: "100%",
3297
3321
  height: "100%",
3298
- onClick: () => S(c),
3299
- onVideoLoaded: o,
3322
+ onClick: () => C(i),
3323
+ onVideoLoaded: a,
3300
3324
  autoPlayOnHover: !0,
3301
3325
  showPlayButton: !1
3302
3326
  }
@@ -3304,29 +3328,29 @@ const Gt = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
3304
3328
  "div",
3305
3329
  {
3306
3330
  className: "waterfall-image-wrapper",
3307
- onClick: () => S(c),
3308
- style: { cursor: g || c.onClick ? "pointer" : "default" },
3331
+ onClick: () => C(i),
3332
+ style: { cursor: h || i.onClick ? "pointer" : "default" },
3309
3333
  children: /* @__PURE__ */ n.jsx(
3310
3334
  "img",
3311
3335
  {
3312
- src: c.url,
3313
- alt: `瀑布流图片 ${w + 1}`,
3336
+ src: i.url,
3337
+ alt: `瀑布流图片 ${E + 1}`,
3314
3338
  className: "waterfall-image",
3315
- onLoad: o,
3316
- onError: o,
3339
+ onLoad: a,
3340
+ onError: a,
3317
3341
  style: { display: "block", width: "100%", height: "auto" }
3318
3342
  }
3319
3343
  )
3320
3344
  }
3321
3345
  )
3322
3346
  },
3323
- k
3347
+ T
3324
3348
  );
3325
3349
  })
3326
3350
  }
3327
3351
  );
3328
3352
  };
3329
- zt.__docgenInfo = {
3353
+ Kt.__docgenInfo = {
3330
3354
  displayName: "Waterfall",
3331
3355
  description: "瀑布流布局组件,支持图片和视频混合展示",
3332
3356
  props: {
@@ -3382,8 +3406,8 @@ zt.__docgenInfo = {
3382
3406
  }
3383
3407
  }
3384
3408
  };
3385
- const Yt = {
3386
- algorithm: at.defaultAlgorithm,
3409
+ const tn = {
3410
+ algorithm: it.defaultAlgorithm,
3387
3411
  token: {
3388
3412
  // 主色
3389
3413
  colorPrimary: "#3b82f6",
@@ -3449,21 +3473,21 @@ const Yt = {
3449
3473
  }
3450
3474
  };
3451
3475
  export {
3452
- Ct as AdvancedTable,
3453
- vt as AppModal,
3454
- kt as BackButton,
3455
- gt as Button,
3456
- ht as Card,
3457
- Mt as DynamicInput,
3458
- Dt as DynamicTextArea,
3459
- Et as EmptyAndSpin,
3460
- Tt as LinkButton,
3461
- bt as PageTable,
3462
- Vt as RichTextEditor,
3463
- ze as VideoCard,
3464
- Ot as VirtualTable,
3465
- zt as Waterfall,
3466
- wt as XcIcon,
3467
- Yt as lightTheme
3476
+ $t as AdvancedTable,
3477
+ Tt as AppModal,
3478
+ qt as BackButton,
3479
+ wt as Button,
3480
+ Et as Card,
3481
+ Ht as DynamicInput,
3482
+ Wt as DynamicTextArea,
3483
+ St as EmptyAndSpin,
3484
+ At as LinkButton,
3485
+ kt as PageTable,
3486
+ Mt as RichTextEditor,
3487
+ Ye as VideoCard,
3488
+ zt as VirtualTable,
3489
+ Kt as Waterfall,
3490
+ Ct as XcIcon,
3491
+ tn as lightTheme
3468
3492
  };
3469
3493
  //# sourceMappingURL=index.es.js.map