@svar-ui/react-core 2.4.1 → 2.4.3

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,21 +1,21 @@
1
1
  import { jsx as l, jsxs as $, Fragment as J } from "react/jsx-runtime";
2
- import { createContext as ce, useContext as Q, useCallback as y, useRef as P, useEffect as E, useMemo as B, useId as De, useState as H, forwardRef as Ie, useImperativeHandle as Ce } from "react";
3
- import { useWritableProp as W, snippet as te, useHotkeys as Pe } from "@svar-ui/lib-react";
4
- import { env as ae, clickOutside as de, locale as Ve, locateID as He, getDuodecade as $e, dateToString as X, delegateClick as Te, calculatePosition as Be, uid as oe, setEnv as Ee } from "@svar-ui/lib-dom";
2
+ import { createContext as ae, useContext as Q, useState as P, useCallback as y, useRef as H, useEffect as B, useMemo as E, useId as Fe, forwardRef as Le, useImperativeHandle as Ce } from "react";
3
+ import { useWritableProp as W, snippet as ne, useHotkeys as Pe } from "@svar-ui/lib-react";
4
+ import { uid as le, env as oe, clickOutside as de, locale as De, locateID as He, getDuodecade as Ve, dateToString as X, delegateClick as $e, calculatePosition as Be, setEnv as Ee } from "@svar-ui/lib-dom";
5
5
  import { locale as tn } from "@svar-ui/lib-dom";
6
- import { en as Me } from "@svar-ui/core-locales";
6
+ import { en as Te } from "@svar-ui/core-locales";
7
7
  import { en as ln } from "@svar-ui/core-locales";
8
8
  import { createPortal as Ae } from "react-dom";
9
- const le = ce("willow"), Re = ce({}), G = ce(null), re = ce(null), Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9
+ const re = ae("willow"), Me = ae({}), G = ae(null), se = ae(null), Dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10
10
  __proto__: null,
11
- fieldId: re,
12
- helpers: Re,
11
+ fieldId: se,
12
+ helpers: Me,
13
13
  i18n: G,
14
- theme: le
14
+ theme: re
15
15
  }, Symbol.toStringTag, { value: "Module" }));
16
16
  function z(e) {
17
- const n = Q(re);
18
- return e || n;
17
+ const n = Q(se), [t] = P(() => e || n && n() || le());
18
+ return t;
19
19
  }
20
20
  function Vt({
21
21
  value: e = "",
@@ -27,25 +27,25 @@ function Vt({
27
27
  readonly: o = !1,
28
28
  onChange: s
29
29
  }) {
30
- const a = z(n), [u, w] = W(e), x = y(
30
+ const a = z(n), [u, w] = W(e), f = y(
31
31
  (p) => {
32
32
  const d = p.target.value;
33
33
  w(d), s && s({ value: d, input: !0 });
34
34
  },
35
35
  [s]
36
- ), f = y(
36
+ ), x = y(
37
37
  (p) => {
38
38
  const d = p.target.value;
39
39
  w(d), s && s({ value: d });
40
40
  },
41
41
  [s]
42
- ), m = P(null);
43
- return E(() => {
44
- const p = f, d = m.current;
42
+ ), m = H(null);
43
+ return B(() => {
44
+ const p = x, d = m.current;
45
45
  return d.addEventListener("change", p), () => {
46
46
  d && d.removeEventListener("change", p);
47
47
  };
48
- }, [f]), /* @__PURE__ */ l(
48
+ }, [x]), /* @__PURE__ */ l(
49
49
  "textarea",
50
50
  {
51
51
  className: `wx-3yFVAC wx-textarea ${i ? "wx-error" : ""}`,
@@ -55,7 +55,7 @@ function Vt({
55
55
  readOnly: o,
56
56
  title: c,
57
57
  value: u,
58
- onInput: x,
58
+ onInput: f,
59
59
  ref: m
60
60
  }
61
61
  );
@@ -70,8 +70,8 @@ function ee({
70
70
  children: o,
71
71
  onClick: s
72
72
  }) {
73
- const a = B(() => {
74
- let w = e ? e.split(" ").filter((x) => x !== "").map((x) => "wx-" + x).join(" ") : "";
73
+ const a = E(() => {
74
+ let w = e ? e.split(" ").filter((f) => f !== "").map((f) => "wx-" + f).join(" ") : "";
75
75
  return n + (n ? " " : "") + w;
76
76
  }, [e, n]), u = (w) => {
77
77
  s && s(w);
@@ -90,7 +90,7 @@ function ee({
90
90
  }
91
91
  );
92
92
  }
93
- function Se({
93
+ function Ie({
94
94
  id: e,
95
95
  label: n = "",
96
96
  inputValue: t = "",
@@ -98,24 +98,24 @@ function Se({
98
98
  onChange: r,
99
99
  disabled: i = !1
100
100
  }) {
101
- const o = De(), s = z(e) || o, [a, u] = W(c);
101
+ const o = z(e), [s, a] = W(c);
102
102
  return /* @__PURE__ */ $("div", { className: "wx-2IvefP wx-checkbox", children: [
103
103
  /* @__PURE__ */ l(
104
104
  "input",
105
105
  {
106
106
  type: "checkbox",
107
- id: s,
107
+ id: o,
108
108
  disabled: i,
109
109
  className: "wx-2IvefP wx-check",
110
- checked: a,
110
+ checked: s,
111
111
  value: t,
112
- onChange: ({ target: x }) => {
113
- const f = x.checked;
114
- u(f), r && r({ value: f, inputValue: t });
112
+ onChange: ({ target: w }) => {
113
+ const f = w.checked;
114
+ a(f), r && r({ value: f, inputValue: t });
115
115
  }
116
116
  }
117
117
  ),
118
- /* @__PURE__ */ $("label", { htmlFor: s, className: "wx-2IvefP wx-label", children: [
118
+ /* @__PURE__ */ $("label", { htmlFor: o, className: "wx-2IvefP wx-label", children: [
119
119
  /* @__PURE__ */ l("span", { className: "wx-2IvefP wx-before" }),
120
120
  n && /* @__PURE__ */ l("span", { className: "wx-2IvefP wx-after", children: n })
121
121
  ] })
@@ -134,8 +134,8 @@ function $t({
134
134
  },
135
135
  [n, c]
136
136
  );
137
- return /* @__PURE__ */ l(re.Provider, { value: null, children: /* @__PURE__ */ l("div", { className: `wx-q8xwRD wx-checkboxgroup ${t && `wx-${t}`}`, children: e.map((i) => /* @__PURE__ */ l("div", { className: "wx-q8xwRD wx-item", children: /* @__PURE__ */ l(
138
- Se,
137
+ return /* @__PURE__ */ l(se.Provider, { value: null, children: /* @__PURE__ */ l("div", { className: `wx-q8xwRD wx-checkboxgroup ${t && `wx-${t}`}`, children: e.map((i) => /* @__PURE__ */ l("div", { className: "wx-q8xwRD wx-item", children: /* @__PURE__ */ l(
138
+ Ie,
139
139
  {
140
140
  label: i.label,
141
141
  inputValue: i.id,
@@ -144,7 +144,7 @@ function $t({
144
144
  }
145
145
  ) }, i.id)) }) });
146
146
  }
147
- function ne({
147
+ function te({
148
148
  position: e = "bottom",
149
149
  align: n = "start",
150
150
  autoFit: t = !0,
@@ -152,21 +152,21 @@ function ne({
152
152
  width: r = "100%",
153
153
  children: i
154
154
  }) {
155
- const o = P(null), [s, a] = W(e), [u, w] = W(n);
156
- return E(() => {
155
+ const o = H(null), [s, a] = W(e), [u, w] = W(n);
156
+ return B(() => {
157
157
  if (t) {
158
- const x = o.current;
159
- if (x) {
160
- const f = x.getBoundingClientRect(), m = ae.getTopNode(x).getBoundingClientRect();
161
- f.right >= m.right && w("end"), f.bottom >= m.bottom && a("top");
158
+ const f = o.current;
159
+ if (f) {
160
+ const x = f.getBoundingClientRect(), m = oe.getTopNode(f).getBoundingClientRect();
161
+ x.right >= m.right && w("end"), x.bottom >= m.bottom && a("top");
162
162
  }
163
163
  }
164
- }, [t]), E(() => {
164
+ }, [t]), B(() => {
165
165
  if (o.current) {
166
- const x = (f) => {
167
- c && c(f);
166
+ const f = (x) => {
167
+ c && c(x);
168
168
  };
169
- return de(o.current, x).destroy;
169
+ return de(o.current, f).destroy;
170
170
  }
171
171
  }, [c]), /* @__PURE__ */ l(
172
172
  "div",
@@ -198,14 +198,14 @@ function Tt({
198
198
  disabled: s = !1,
199
199
  error: a = !1
200
200
  }) {
201
- const u = z(c), [w, x] = H(n), [f, m] = H(!1), p = y(
202
- (v, g) => {
203
- v.stopPropagation(), x(g), m(!1), t && t({ value: g });
201
+ const u = z(c), [w, f] = P(n), [x, m] = P(!1), p = y(
202
+ (v, N) => {
203
+ v.stopPropagation(), f(N), m(!1), t && t({ value: N });
204
204
  },
205
205
  [t]
206
206
  ), d = y(
207
207
  (v) => {
208
- v.stopPropagation(), x(""), t && t({ value: "" });
208
+ v.stopPropagation(), f(""), t && t({ value: "" });
209
209
  },
210
210
  [t]
211
211
  ), h = y(() => {
@@ -216,7 +216,7 @@ function Tt({
216
216
  /* @__PURE__ */ l(
217
217
  "input",
218
218
  {
219
- className: "wx-121TgJ wx-input" + (a ? " wx-error" : "") + (f ? " wx-focus" : ""),
219
+ className: "wx-121TgJ wx-input" + (a ? " wx-error" : "") + (x ? " wx-focus" : ""),
220
220
  title: o,
221
221
  value: w,
222
222
  readOnly: !0,
@@ -233,7 +233,7 @@ function Tt({
233
233
  style: { backgroundColor: w || "#00a037" }
234
234
  }
235
235
  ) : /* @__PURE__ */ l("div", { className: "wx-121TgJ wx-empty wx-selected" }),
236
- f && /* @__PURE__ */ l(ne, { onCancel: () => m(!1), children: /* @__PURE__ */ $("div", { className: "wx-121TgJ wx-colors", children: [
236
+ x && /* @__PURE__ */ l(te, { onCancel: () => m(!1), children: /* @__PURE__ */ $("div", { className: "wx-121TgJ wx-colors", children: [
237
237
  /* @__PURE__ */ l(
238
238
  "div",
239
239
  {
@@ -241,14 +241,14 @@ function Tt({
241
241
  onClick: (v) => p(v, "")
242
242
  }
243
243
  ),
244
- e.map((v, g) => /* @__PURE__ */ l(
244
+ e.map((v, N) => /* @__PURE__ */ l(
245
245
  "div",
246
246
  {
247
247
  className: "wx-121TgJ wx-color",
248
248
  style: { backgroundColor: v },
249
- onClick: (S) => p(S, v)
249
+ onClick: (R) => p(R, v)
250
250
  },
251
- g
251
+ N
252
252
  ))
253
253
  ] }) })
254
254
  ] });
@@ -259,9 +259,9 @@ function me(e, n) {
259
259
  o(a), t.focus(), window.addEventListener("mousemove", o), window.addEventListener("mouseup", s);
260
260
  }
261
261
  function o(a) {
262
- let u, w, x, f;
262
+ let u, w, f, x;
263
263
  const m = e.getBoundingClientRect();
264
- u = m.left, w = m.top, x = a.clientX - u, f = a.clientY - w, c && n.moveBlockSlider(x, f), r && n.moveLineSlider(x);
264
+ u = m.left, w = m.top, f = a.clientX - u, x = a.clientY - w, c && n.moveBlockSlider(f, x), r && n.moveLineSlider(f);
265
265
  }
266
266
  function s() {
267
267
  t.blur(), window.removeEventListener("mousemove", o), window.removeEventListener("mouseup", s);
@@ -356,7 +356,7 @@ function he(e) {
356
356
  return e ? (e = e.toString(16), e.charAt(0) === "#" && (e = e.slice(1)), We(e) ? (e.length === 3 && (e = e.slice(0, 3).split("").reduce((n, t) => n + t + t, "")), `#${e.toUpperCase()}`) : null) : null;
357
357
  }
358
358
  function Z() {
359
- return Ve(Me);
359
+ return De(Te);
360
360
  }
361
361
  const pe = "Block", ve = "Line";
362
362
  function Ye({
@@ -364,69 +364,69 @@ function Ye({
364
364
  button: n = !1,
365
365
  onChange: t
366
366
  }) {
367
- const c = (Q(G) || Z()).getGroup("core"), r = P(null), i = P(null), [o, s] = H(), [a, u] = H(), [w, x] = H(), [f, m] = H(), [p, d] = W(e), h = B(() => he(p) || "#65D3B3", [p]), v = B(
367
+ const c = (Q(G) || Z()).getGroup("core"), r = H(null), i = H(null), [o, s] = P(), [a, u] = P(), [w, f] = P(), [x, m] = P(), [p, d] = W(e), h = E(() => he(p) || "#65D3B3", [p]), v = E(
368
368
  () => q.hvsToHex(w || 0, 1, 1),
369
369
  [w]
370
- ), g = y(
370
+ ), N = y(
371
371
  (b, k) => {
372
- const { width: L, height: A } = r.current.getBoundingClientRect();
373
- k < 0 ? k = 0 : k > A && (k = A), b < 0 ? b = 0 : b > L && (b = L), s(k), u(b);
374
- let I, R;
372
+ const { width: F, height: A } = r.current.getBoundingClientRect();
373
+ k < 0 ? k = 0 : k > A && (k = A), b < 0 ? b = 0 : b > F && (b = F), s(k), u(b);
374
+ let L, I;
375
375
  q.hexToHvs(h);
376
- const O = L / 100, Y = A / 100;
377
- I = Math.ceil(b / O) / 100, R = Math.ceil(Math.abs(k / Y - 100)) / 100;
376
+ const O = F / 100, Y = A / 100;
377
+ L = Math.ceil(b / O) / 100, I = Math.ceil(Math.abs(k / Y - 100)) / 100;
378
378
  const _ = q.hvsToHex(
379
379
  w || 0,
380
- I,
381
- R
380
+ L,
381
+ I
382
382
  );
383
383
  d(_), t && t({ value: _, input: !0 });
384
384
  },
385
385
  [h, w, t]
386
- ), S = y(
386
+ ), R = y(
387
387
  (b) => {
388
388
  const k = i.current.getBoundingClientRect().width;
389
389
  b < 0 ? b = 0 : b > k && (b = k);
390
- const L = Math.round(b * 359 / k), A = Math.max(Math.min(L, 359), 0);
391
- x(A), m(b);
392
- let I, R;
393
- [, I, R] = q.hexToHvs(h);
394
- const O = q.hvsToHex(A, I, R);
390
+ const F = Math.round(b * 359 / k), A = Math.max(Math.min(F, 359), 0);
391
+ f(A), m(b);
392
+ let L, I;
393
+ [, L, I] = q.hexToHvs(h);
394
+ const O = q.hvsToHex(A, L, I);
395
395
  d(O), t && t({ value: O, input: !0 });
396
396
  },
397
397
  [h, t]
398
- ), N = y(() => {
399
- const [b, k, L] = q.hexToHvs(h);
400
- if (x(b), r.current) {
401
- const { width: A, height: I } = r.current.getBoundingClientRect();
398
+ ), g = y(() => {
399
+ const [b, k, F] = q.hexToHvs(h);
400
+ if (f(b), r.current) {
401
+ const { width: A, height: L } = r.current.getBoundingClientRect();
402
402
  i.current && m(
403
403
  b * i.current.getBoundingClientRect().width / 359
404
- ), u(k * A), s(Math.abs(I * (L - 1)));
404
+ ), u(k * A), s(Math.abs(L * (F - 1)));
405
405
  }
406
406
  }, [h]), T = y(
407
407
  ({ target: b }) => {
408
408
  const k = he(b.value);
409
- d(k), t && t({ value: k, input: !0 }), k && N();
409
+ d(k), t && t({ value: k, input: !0 }), k && g();
410
410
  },
411
- [t, N]
411
+ [t, g]
412
412
  ), M = y(
413
413
  (b) => {
414
414
  b.stopPropagation(), t && t({ value: h });
415
415
  },
416
416
  [h, t]
417
- ), F = y(
417
+ ), S = y(
418
418
  (b) => {
419
- const k = b.target, L = k.getAttribute("data-slider") === pe, A = k.getAttribute("data-slider") === ve;
420
- let I = window.getComputedStyle(k), R = parseFloat(I.left), O = parseFloat(I.top);
419
+ const k = b.target, F = k.getAttribute("data-slider") === pe, A = k.getAttribute("data-slider") === ve;
420
+ let L = window.getComputedStyle(k), I = parseFloat(L.left), O = parseFloat(L.top);
421
421
  const Y = b.code;
422
- if (L) {
422
+ if (F) {
423
423
  switch (Y) {
424
424
  case "ArrowLeft": {
425
- R--;
425
+ I--;
426
426
  break;
427
427
  }
428
428
  case "ArrowRight": {
429
- R++;
429
+ I++;
430
430
  break;
431
431
  }
432
432
  case "ArrowDown": {
@@ -440,29 +440,29 @@ function Ye({
440
440
  default:
441
441
  return;
442
442
  }
443
- g(R, O);
443
+ N(I, O);
444
444
  }
445
445
  if (A) {
446
- if (Y === "ArrowLeft" || Y === "ArrowDown") R--;
447
- else if (Y === "ArrowRight" || Y === "ArrowUp") R++;
446
+ if (Y === "ArrowLeft" || Y === "ArrowDown") I--;
447
+ else if (Y === "ArrowRight" || Y === "ArrowUp") I++;
448
448
  else return;
449
- S(R);
449
+ R(I);
450
450
  }
451
451
  b.preventDefault();
452
452
  },
453
- [g, S]
453
+ [N, R]
454
454
  );
455
- E(() => {
456
- N();
457
- }, [N]), E(() => {
458
- p !== p && (d(p), N());
459
- }, [p, p, N]), E(() => {
460
- r.current && me(r.current, { moveBlockSlider: g }), i.current && me(i.current, { moveLineSlider: S });
461
- }, [g, S]), E(() => {
455
+ B(() => {
456
+ g();
457
+ }, [g]), B(() => {
458
+ p !== p && (d(p), g());
459
+ }, [p, p, g]), B(() => {
460
+ r.current && me(r.current, { moveBlockSlider: N }), i.current && me(i.current, { moveLineSlider: R });
461
+ }, [N, R]), B(() => {
462
462
  p !== p && t && t({ value: p, input: !0 });
463
- }, [p, t]), E(() => {
464
- h && r.current && N();
465
- }, [h, N]);
463
+ }, [p, t]), B(() => {
464
+ h && r.current && g();
465
+ }, [h, g]);
466
466
  const D = "wx-1yoKzq";
467
467
  return /* @__PURE__ */ $("div", { className: D + " wx-colorboard", children: [
468
468
  /* @__PURE__ */ l(
@@ -482,7 +482,7 @@ function Ye({
482
482
  },
483
483
  tabIndex: 0,
484
484
  "data-slider": pe,
485
- onKeyDown: F
485
+ onKeyDown: S
486
486
  }
487
487
  )
488
488
  }
@@ -491,10 +491,10 @@ function Ye({
491
491
  "div",
492
492
  {
493
493
  className: D + " wx-color-line-slider wx-slider",
494
- style: { background: v, left: f + "px" },
494
+ style: { background: v, left: x + "px" },
495
495
  tabIndex: 0,
496
496
  "data-slider": ve,
497
- onKeyDown: F
497
+ onKeyDown: S
498
498
  }
499
499
  ) }),
500
500
  /* @__PURE__ */ $("div", { className: D + " wx-color-controls", children: [
@@ -530,14 +530,14 @@ function Mt({
530
530
  }) {
531
531
  const a = z(n);
532
532
  let [u, w] = W(e);
533
- const [x, f] = H(!1);
533
+ const [f, x] = P(!1);
534
534
  function m() {
535
535
  if (r) return !1;
536
- f(!0);
536
+ x(!0);
537
537
  }
538
538
  function p(h) {
539
539
  if (h.input) return;
540
- f(!1);
540
+ x(!1);
541
541
  const v = h.value;
542
542
  w(v), s && s({ value: v });
543
543
  }
@@ -548,7 +548,7 @@ function Mt({
548
548
  /* @__PURE__ */ l(
549
549
  "input",
550
550
  {
551
- className: "wx-mmT8WH wx-input" + (i ? " wx-error" : "") + (x ? " wx-focus" : ""),
551
+ className: "wx-mmT8WH wx-input" + (i ? " wx-error" : "") + (f ? " wx-focus" : ""),
552
552
  title: c,
553
553
  value: u,
554
554
  readOnly: !0,
@@ -559,29 +559,29 @@ function Mt({
559
559
  ),
560
560
  /* @__PURE__ */ l("div", { className: "wx-mmT8WH wx-color", style: { background: u } }),
561
561
  o && !r && u && /* @__PURE__ */ l("i", { className: "wx-mmT8WH wxi-close", onClick: d }),
562
- x && /* @__PURE__ */ l(ne, { onCancel: () => f(!1), children: /* @__PURE__ */ l(Ye, { value: u, button: "true", onChange: p }) })
562
+ f && /* @__PURE__ */ l(te, { onCancel: () => x(!1), children: /* @__PURE__ */ l(Ye, { value: u, button: "true", onChange: p }) })
563
563
  ] });
564
564
  }
565
565
  function je() {
566
566
  let e = null, n = !1, t, c, r, i;
567
- const o = (f, m, p, d) => {
568
- t = f, c = m, r = p, i = d;
569
- }, s = (f) => {
570
- e = f, n = e !== null, r(e);
571
- }, a = (f, m) => {
572
- if (f !== null && t) {
573
- const p = t.querySelectorAll(".wx-list > .wx-item")[f];
567
+ const o = (x, m, p, d) => {
568
+ t = x, c = m, r = p, i = d;
569
+ }, s = (x) => {
570
+ e = x, n = e !== null, r(e);
571
+ }, a = (x, m) => {
572
+ if (x !== null && t) {
573
+ const p = t.querySelectorAll(".wx-list > .wx-item")[x];
574
574
  p && (p.scrollIntoView({ block: "nearest" }), m && m.preventDefault());
575
575
  }
576
- }, u = (f, m) => {
577
- const p = f === null ? null : Math.max(0, Math.min(e + f, c.length - 1));
576
+ }, u = (x, m) => {
577
+ const p = x === null ? null : Math.max(0, Math.min(e + x, c.length - 1));
578
578
  p !== e && (s(p), t ? a(p, m) : requestAnimationFrame(() => a(p, m)));
579
579
  };
580
- return { move: (f) => {
581
- const m = He(f), p = c.findIndex((d) => d.id == m);
580
+ return { move: (x) => {
581
+ const m = He(x), p = c.findIndex((d) => d.id == m);
582
582
  p !== e && s(p);
583
- }, keydown: (f, m) => {
584
- switch (f.code) {
583
+ }, keydown: (x, m) => {
584
+ switch (x.code) {
585
585
  case "Enter":
586
586
  n ? i() : s(0);
587
587
  break;
@@ -595,10 +595,10 @@ function je() {
595
595
  r(e = null);
596
596
  break;
597
597
  case "ArrowDown":
598
- u(n ? 1 : m || 0, f);
598
+ u(n ? 1 : m || 0, x);
599
599
  break;
600
600
  case "ArrowUp":
601
- u(n ? -1 : m || 0, f);
601
+ u(n ? -1 : m || 0, x);
602
602
  break;
603
603
  }
604
604
  }, init: o, navigate: u };
@@ -609,44 +609,44 @@ function we({
609
609
  onSelect: t,
610
610
  onReady: c
611
611
  }) {
612
- const r = P(), i = P(je()), [o, s] = H(null), a = P(o), u = (Q(G) || Z()).getGroup("core"), w = (f) => {
613
- f && f.stopPropagation(), t && t({ id: e[a.current]?.id });
612
+ const r = H(), i = H(je()), [o, s] = P(null), a = H(o), u = (Q(G) || Z()).getGroup("core"), w = (x) => {
613
+ x && x.stopPropagation(), t && t({ id: e[a.current]?.id });
614
614
  };
615
- E(() => {
615
+ B(() => {
616
616
  i.current.init(
617
617
  r.current,
618
618
  e,
619
- (f) => {
620
- s(f), a.current = f;
619
+ (x) => {
620
+ s(x), a.current = x;
621
621
  },
622
622
  w
623
623
  );
624
- }, [e, r.current]), E(() => {
624
+ }, [e, r.current]), B(() => {
625
625
  c && c(i.current);
626
626
  }, []);
627
- const x = y(() => {
627
+ const f = y(() => {
628
628
  i.current.navigate(null);
629
629
  }, [i]);
630
- return o === null ? null : /* @__PURE__ */ l(ne, { onCancel: x, children: /* @__PURE__ */ l(
630
+ return o === null ? null : /* @__PURE__ */ l(te, { onCancel: f, children: /* @__PURE__ */ l(
631
631
  "div",
632
632
  {
633
633
  className: "wx-233fr7 wx-list",
634
634
  ref: r,
635
635
  onClick: w,
636
636
  onMouseMove: i.current.move,
637
- children: e.length ? e.map((f, m) => /* @__PURE__ */ l(
637
+ children: e.length ? e.map((x, m) => /* @__PURE__ */ l(
638
638
  "div",
639
639
  {
640
640
  className: `wx-233fr7 wx-item ${m === o ? "wx-focus" : ""}`,
641
- "data-id": f.id,
642
- children: n ? te(n, { option: f }) : f.label
641
+ "data-id": x.id,
642
+ children: n ? ne(n, { option: x }) : x.label
643
643
  },
644
- f.id
644
+ x.id
645
645
  )) : /* @__PURE__ */ l("div", { className: "wx-233fr7 wx-no-data", children: u("No data") })
646
646
  }
647
647
  ) });
648
648
  }
649
- function Rt({
649
+ function It({
650
650
  value: e = "",
651
651
  id: n,
652
652
  options: t = [],
@@ -658,49 +658,49 @@ function Rt({
658
658
  error: a = !1,
659
659
  clear: u = !1,
660
660
  children: w,
661
- onChange: x
661
+ onChange: f
662
662
  }) {
663
- const f = z(n), m = P(null), p = P(null), [d, h] = W(e), [v, g] = H(!1), [S, N] = H(""), T = P(null), M = P(!1), F = B(() => {
664
- if (v) return S;
663
+ const x = z(n), m = H(null), p = H(null), [d, h] = W(e), [v, N] = P(!1), [R, g] = P(""), T = H(null), M = H(!1), S = E(() => {
664
+ if (v) return R;
665
665
  if (d || d === 0) {
666
666
  const C = (c || t).find((U) => U.id === d);
667
667
  if (C) return C[r];
668
668
  }
669
669
  return "";
670
- }, [v, S, d, c, t, r]), D = B(() => !F || !v ? t : t.filter(
671
- (C) => C[r].toLowerCase().includes(F.toLowerCase())
672
- ), [F, v, t, r]), b = y(
670
+ }, [v, R, d, c, t, r]), D = E(() => !S || !v ? t : t.filter(
671
+ (C) => C[r].toLowerCase().includes(S.toLowerCase())
672
+ ), [S, v, t, r]), b = y(
673
673
  () => D.findIndex((C) => C.id === d),
674
674
  [D, d]
675
675
  ), k = y((C) => {
676
676
  m.current = C.navigate, p.current = C.keydown;
677
- }, []), L = y(
677
+ }, []), F = y(
678
678
  (C, U) => {
679
679
  if (C || C === 0) {
680
680
  let K = t.find((V) => V.id === C);
681
- if (g(!1), U && m.current(null), K && d !== K.id) {
681
+ if (N(!1), U && m.current(null), K && d !== K.id) {
682
682
  const V = K.id;
683
- h(V), x && x({ value: V });
683
+ h(V), f && f({ value: V });
684
684
  }
685
685
  }
686
686
  !M.current && U && T.current.focus();
687
687
  },
688
- [t, d, x]
688
+ [t, d, f]
689
689
  ), A = y(
690
690
  ({ id: C }) => {
691
- L(C, !0);
691
+ F(C, !0);
692
692
  },
693
- [L]
694
- ), I = y(
693
+ [F]
694
+ ), L = y(
695
695
  (C) => {
696
- C && C.stopPropagation(), h(""), g(!1), x && x({ value: "" });
696
+ C && C.stopPropagation(), h(""), N(!1), f && f({ value: "" });
697
697
  },
698
- [x]
699
- ), R = y(
698
+ [f]
699
+ ), I = y(
700
700
  (C) => {
701
701
  if (!t.length) return;
702
702
  if (C === "" && u) {
703
- I();
703
+ L();
704
704
  return;
705
705
  }
706
706
  let U = t.find((V) => V[r] === C);
@@ -708,18 +708,18 @@ function Rt({
708
708
  (V) => V[r].toLowerCase().includes(C.toLowerCase())
709
709
  ));
710
710
  const K = U ? U.id : d || t[0].id;
711
- L(K, !1);
711
+ F(K, !1);
712
712
  },
713
- [t, r, u, d, L, I]
713
+ [t, r, u, d, F, L]
714
714
  ), O = y(() => {
715
- N(T.current.value), g(!0), D.length ? m.current(0) : m.current(null);
715
+ g(T.current.value), N(!0), D.length ? m.current(0) : m.current(null);
716
716
  }, [D.length, m]), Y = y(() => {
717
717
  M.current = !0;
718
718
  }, []), _ = y(() => {
719
719
  M.current = !1, setTimeout(() => {
720
- M.current || R(F);
720
+ M.current || I(S);
721
721
  }, 200);
722
- }, [R, F]);
722
+ }, [I, S]);
723
723
  return /* @__PURE__ */ $(
724
724
  "div",
725
725
  {
@@ -732,9 +732,9 @@ function Rt({
732
732
  "input",
733
733
  {
734
734
  className: "wx-1j11Jk wx-input " + (a ? "wx-error" : ""),
735
- id: f,
735
+ id: x,
736
736
  ref: T,
737
- value: F,
737
+ value: S,
738
738
  disabled: s,
739
739
  placeholder: i,
740
740
  onFocus: Y,
@@ -742,7 +742,7 @@ function Rt({
742
742
  onInput: O
743
743
  }
744
744
  ),
745
- u && !s && d ? /* @__PURE__ */ l("i", { className: "wx-1j11Jk wx-icon wxi-close", onClick: I }) : /* @__PURE__ */ l("i", { className: "wx-1j11Jk wx-icon wxi-angle-down" }),
745
+ u && !s && d ? /* @__PURE__ */ l("i", { className: "wx-1j11Jk wx-icon wxi-close", onClick: L }) : /* @__PURE__ */ l("i", { className: "wx-1j11Jk wx-icon wxi-angle-down" }),
746
746
  !s && /* @__PURE__ */ l(we, { items: D, onReady: k, onSelect: A, children: ({ option: C }) => /* @__PURE__ */ l(J, { children: w ? w({ option: C }) : C[r] }) })
747
747
  ]
748
748
  }
@@ -760,21 +760,21 @@ function fe({
760
760
  error: a = !1,
761
761
  inputStyle: u = {},
762
762
  title: w = "",
763
- css: x = "",
764
- icon: f = "",
763
+ css: f = "",
764
+ icon: x = "",
765
765
  clear: m = !1,
766
766
  onChange: p
767
767
  }) {
768
- const d = z(n), [h, v] = W(e), g = P(null), S = B(
769
- () => f && x.indexOf("wx-icon-left") === -1 ? "wx-icon-right " + x : x,
770
- [f, x]
771
- ), N = B(
772
- () => f && x.indexOf("wx-icon-left") !== -1,
773
- [f, x]
768
+ const d = z(n), [h, v] = W(e), N = H(null), R = E(
769
+ () => x && f.indexOf("wx-icon-left") === -1 ? "wx-icon-right " + f : f,
770
+ [x, f]
771
+ ), g = E(
772
+ () => x && f.indexOf("wx-icon-left") !== -1,
773
+ [x, f]
774
774
  );
775
- E(() => {
775
+ B(() => {
776
776
  const b = setTimeout(() => {
777
- c && g.current && g.current.focus(), r && g.current && g.current.select();
777
+ c && N.current && N.current.focus(), r && N.current && N.current.select();
778
778
  }, 1);
779
779
  return () => clearTimeout(b);
780
780
  }, [c, r]);
@@ -788,25 +788,25 @@ function fe({
788
788
  (b) => p && p({ value: b.target.value }),
789
789
  [p]
790
790
  );
791
- function F(b) {
791
+ function S(b) {
792
792
  b.stopPropagation(), v(""), p && p({ value: "" });
793
793
  }
794
794
  let D = i;
795
- return i !== "password" && i !== "number" && (D = "text"), E(() => {
796
- const b = M, k = g.current;
795
+ return i !== "password" && i !== "number" && (D = "text"), B(() => {
796
+ const b = M, k = N.current;
797
797
  return k.addEventListener("change", b), () => {
798
798
  k && k.removeEventListener("change", b);
799
799
  };
800
800
  }, [M]), /* @__PURE__ */ $(
801
801
  "div",
802
802
  {
803
- className: `wx-hQ64J4 wx-text ${S} ${a ? "wx-error" : ""} ${s ? "wx-disabled" : ""} ${m ? "wx-clear" : ""}`,
803
+ className: `wx-hQ64J4 wx-text ${R} ${a ? "wx-error" : ""} ${s ? "wx-disabled" : ""} ${m ? "wx-clear" : ""}`,
804
804
  children: [
805
805
  /* @__PURE__ */ l(
806
806
  "input",
807
807
  {
808
808
  className: "wx-hQ64J4 wx-input",
809
- ref: g,
809
+ ref: N,
810
810
  id: d,
811
811
  readOnly: t,
812
812
  disabled: s,
@@ -819,23 +819,23 @@ function fe({
819
819
  }
820
820
  ),
821
821
  m && !s && h ? /* @__PURE__ */ $(J, { children: [
822
- /* @__PURE__ */ l("i", { className: "wx-hQ64J4 wx-icon wxi-close", onClick: F }),
823
- N && /* @__PURE__ */ l("i", { className: `wx-hQ64J4 wx-icon ${f}` })
824
- ] }) : f ? /* @__PURE__ */ l("i", { className: `wx-hQ64J4 wx-icon ${f}` }) : null
822
+ /* @__PURE__ */ l("i", { className: "wx-hQ64J4 wx-icon wxi-close", onClick: S }),
823
+ g && /* @__PURE__ */ l("i", { className: `wx-hQ64J4 wx-icon ${x}` })
824
+ ] }) : x ? /* @__PURE__ */ l("i", { className: `wx-hQ64J4 wx-icon ${x}` }) : null
825
825
  ]
826
826
  }
827
827
  );
828
828
  }
829
829
  function Je({ date: e, type: n, part: t, onShift: c }) {
830
- const { calendar: r, formats: i } = Q(G).getRaw(), o = e.getFullYear(), s = B(() => {
830
+ const { calendar: r, formats: i } = Q(G).getRaw(), o = e.getFullYear(), s = E(() => {
831
831
  switch (n) {
832
832
  case "month":
833
833
  return X(i.monthYearFormat, r)(e);
834
834
  case "year":
835
835
  return X(i.yearFormat, r)(e);
836
836
  case "duodecade": {
837
- const { start: u, end: w } = $e(o), x = X(i.yearFormat, r);
838
- return `${x(new Date(u, 0, 1))} - ${x(new Date(w, 11, 31))}`;
837
+ const { start: u, end: w } = Ve(o), f = X(i.yearFormat, r);
838
+ return `${f(new Date(u, 0, 1))} - ${f(new Date(w, 11, 31))}`;
839
839
  }
840
840
  default:
841
841
  return "";
@@ -873,35 +873,35 @@ function Ge({
873
873
  onCancel: r,
874
874
  onChange: i
875
875
  }) {
876
- const o = (Q(G) || Z()).getRaw().calendar, s = (o.weekStart || 7) % 7, a = o.dayShort.slice(s).concat(o.dayShort.slice(0, s)), u = (N, T, M) => new Date(
877
- N.getFullYear(),
878
- N.getMonth() + (T || 0),
879
- N.getDate() + (M || 0)
876
+ const o = (Q(G) || Z()).getRaw().calendar, s = (o.weekStart || 7) % 7, a = o.dayShort.slice(s).concat(o.dayShort.slice(0, s)), u = (g, T, M) => new Date(
877
+ g.getFullYear(),
878
+ g.getMonth() + (T || 0),
879
+ g.getDate() + (M || 0)
880
880
  );
881
881
  let w = t !== "normal";
882
- function x(N) {
883
- const T = N.getDay();
882
+ function f(g) {
883
+ const T = g.getDay();
884
884
  return T === 0 || T === 6;
885
885
  }
886
- function f() {
887
- const N = u(n, 0, 1 - n.getDate());
888
- return N.setDate(N.getDate() - (N.getDay() - (s - 7)) % 7), N;
886
+ function x() {
887
+ const g = u(n, 0, 1 - n.getDate());
888
+ return g.setDate(g.getDate() - (g.getDay() - (s - 7)) % 7), g;
889
889
  }
890
890
  function m() {
891
- const N = u(n, 1, -n.getDate());
892
- return N.setDate(N.getDate() + (6 - N.getDay() + s) % 7), N;
891
+ const g = u(n, 1, -n.getDate());
892
+ return g.setDate(g.getDate() + (6 - g.getDay() + s) % 7), g;
893
893
  }
894
- const p = P(0);
895
- function d(N, T) {
896
- T.timeStamp !== p.current && (p.current = T.timeStamp, T.stopPropagation(), i && i(new Date(new Date(N))), r && r());
894
+ const p = H(0);
895
+ function d(g, T) {
896
+ T.timeStamp !== p.current && (p.current = T.timeStamp, T.stopPropagation(), i && i(new Date(new Date(g))), r && r());
897
897
  }
898
- const h = B(() => t == "normal" ? [e ? u(e).valueOf() : 0] : e ? [
898
+ const h = E(() => t == "normal" ? [e ? u(e).valueOf() : 0] : e ? [
899
899
  e.start ? u(e.start).valueOf() : 0,
900
900
  e.end ? u(e.end).valueOf() : 0
901
- ] : [0, 0], [t, e]), v = B(() => {
902
- const N = f(), T = m(), M = n.getMonth();
903
- let F = [];
904
- for (let D = N; D <= T; D.setDate(D.getDate() + 1)) {
901
+ ] : [0, 0], [t, e]), v = E(() => {
902
+ const g = x(), T = m(), M = n.getMonth();
903
+ let S = [];
904
+ for (let D = g; D <= T; D.setDate(D.getDate() + 1)) {
905
905
  const b = {
906
906
  day: D.getDate(),
907
907
  in: D.getMonth() === M,
@@ -909,30 +909,30 @@ function Ge({
909
909
  };
910
910
  let k = "";
911
911
  if (k += b.in ? "" : " wx-inactive", k += h.indexOf(b.date) > -1 ? " wx-selected" : "", w) {
912
- const L = b.date == h[0], A = b.date == h[1];
913
- L && !A ? k += " wx-left" : A && !L && (k += " wx-right"), b.date > h[0] && b.date < h[1] && (k += " wx-inrange");
912
+ const F = b.date == h[0], A = b.date == h[1];
913
+ F && !A ? k += " wx-left" : A && !F && (k += " wx-right"), b.date > h[0] && b.date < h[1] && (k += " wx-inrange");
914
914
  }
915
- if (k += x(D) ? " wx-weekend" : "", c) {
916
- const L = c(D);
917
- L && (k += " " + L);
915
+ if (k += f(D) ? " wx-weekend" : "", c) {
916
+ const F = c(D);
917
+ F && (k += " " + F);
918
918
  }
919
- F.push({ ...b, css: k });
919
+ S.push({ ...b, css: k });
920
920
  }
921
- return F;
922
- }, [n, h, w, c]), g = P(null);
923
- let S = P({});
924
- return S.current.click = d, E(() => {
925
- Te(g.current, S.current);
921
+ return S;
922
+ }, [n, h, w, c]), N = H(null);
923
+ let R = H({});
924
+ return R.current.click = d, B(() => {
925
+ $e(N.current, R.current);
926
926
  }, []), /* @__PURE__ */ $("div", { children: [
927
- /* @__PURE__ */ l("div", { className: "wx-398RBS wx-weekdays", children: a.map((N) => /* @__PURE__ */ l("div", { className: "wx-398RBS wx-weekday", children: N }, N)) }),
928
- /* @__PURE__ */ l("div", { className: "wx-398RBS wx-days", ref: g, children: v.map((N) => /* @__PURE__ */ l(
927
+ /* @__PURE__ */ l("div", { className: "wx-398RBS wx-weekdays", children: a.map((g) => /* @__PURE__ */ l("div", { className: "wx-398RBS wx-weekday", children: g }, g)) }),
928
+ /* @__PURE__ */ l("div", { className: "wx-398RBS wx-days", ref: N, children: v.map((g) => /* @__PURE__ */ l(
929
929
  "div",
930
930
  {
931
- className: `wx-398RBS wx-day ${N.css} ${N.in ? "" : "wx-out"}`,
932
- "data-id": N.date,
933
- children: N.day
931
+ className: `wx-398RBS wx-day ${g.css} ${g.in ? "" : "wx-out"}`,
932
+ "data-id": g.date,
933
+ children: g.day
934
934
  },
935
- N.date
935
+ g.date
936
936
  )) })
937
937
  ] });
938
938
  }
@@ -944,34 +944,34 @@ function Qe({
944
944
  onChange: r,
945
945
  onShift: i
946
946
  }) {
947
- const [o, s] = W(e || /* @__PURE__ */ new Date()), [a, u] = W(n || /* @__PURE__ */ new Date()), w = Q(G).getRaw().calendar, x = w.monthShort || [], f = B(() => a.getMonth(), [a]), m = y(
947
+ const [o, s] = W(e || /* @__PURE__ */ new Date()), [a, u] = W(n || /* @__PURE__ */ new Date()), w = Q(G).getRaw().calendar, f = w.monthShort || [], x = E(() => a.getMonth(), [a]), m = y(
948
948
  (h, v) => {
949
949
  if (h != null) {
950
950
  v.stopPropagation();
951
- const g = new Date(a);
952
- g.setMonth(h), u(g), i && i({ current: g });
951
+ const N = new Date(a);
952
+ N.setMonth(h), u(N), i && i({ current: N });
953
953
  }
954
954
  t === "normal" && s(new Date(a)), c && c();
955
955
  },
956
956
  [a, t, i, c]
957
957
  ), p = y(() => {
958
- const h = new Date(Fe(o, t) || a);
958
+ const h = new Date(Re(o, t) || a);
959
959
  h.setMonth(a.getMonth()), h.setFullYear(a.getFullYear()), r && r(h);
960
960
  }, [o, a, t, r]), d = y(
961
961
  (h) => {
962
962
  const v = h.target.closest("[data-id]");
963
963
  if (v) {
964
- const g = parseInt(v.getAttribute("data-id"), 10);
965
- m(g, h);
964
+ const N = parseInt(v.getAttribute("data-id"), 10);
965
+ m(N, h);
966
966
  }
967
967
  },
968
968
  [m]
969
969
  );
970
970
  return /* @__PURE__ */ $(J, { children: [
971
- /* @__PURE__ */ l("div", { className: "wx-34U8T8 wx-months", onClick: d, children: x.map((h, v) => /* @__PURE__ */ l(
971
+ /* @__PURE__ */ l("div", { className: "wx-34U8T8 wx-months", onClick: d, children: f.map((h, v) => /* @__PURE__ */ l(
972
972
  "div",
973
973
  {
974
- className: "wx-34U8T8 wx-month" + (f === v ? " wx-current" : ""),
974
+ className: "wx-34U8T8 wx-month" + (x === v ? " wx-current" : ""),
975
975
  "data-id": v,
976
976
  children: h
977
977
  },
@@ -981,42 +981,42 @@ function Qe({
981
981
  ] });
982
982
  }
983
983
  const ie = "wx-1XEF33", _e = ({ value: e, current: n, onCancel: t, onChange: c, onShift: r, part: i }) => {
984
- const o = Q(G).getRaw().calendar, [s, a] = W(n), [u, w] = W(e), x = B(() => s.getFullYear(), [s]), f = B(() => {
985
- const { start: v, end: g } = $e(x), S = [];
986
- for (let N = v; N <= g; ++N)
987
- S.push(N);
988
- return S;
989
- }, [x]), m = {
984
+ const o = Q(G).getRaw().calendar, [s, a] = W(n), [u, w] = W(e), f = E(() => s.getFullYear(), [s]), x = E(() => {
985
+ const { start: v, end: N } = Ve(f), R = [];
986
+ for (let g = v; g <= N; ++g)
987
+ R.push(g);
988
+ return R;
989
+ }, [f]), m = {
990
990
  click: p
991
991
  };
992
- function p(v, g) {
992
+ function p(v, N) {
993
993
  if (v) {
994
- g.stopPropagation();
995
- const S = new Date(s);
996
- S.setFullYear(v), a(S), r && r({ current: S });
994
+ N.stopPropagation();
995
+ const R = new Date(s);
996
+ R.setFullYear(v), a(R), r && r({ current: R });
997
997
  }
998
998
  i === "normal" && w(new Date(s)), t && t();
999
999
  }
1000
1000
  function d() {
1001
- const v = new Date(Fe(u, i) || s);
1001
+ const v = new Date(Re(u, i) || s);
1002
1002
  v.setFullYear(s.getFullYear()), c && c(v);
1003
1003
  }
1004
- const h = P(null);
1005
- return E(() => {
1006
- h.current && Te(h.current, m);
1004
+ const h = H(null);
1005
+ return B(() => {
1006
+ h.current && $e(h.current, m);
1007
1007
  }, []), /* @__PURE__ */ $(J, { children: [
1008
- /* @__PURE__ */ l("div", { className: ie + " wx-years", ref: h, children: f.map((v, g) => /* @__PURE__ */ l(
1008
+ /* @__PURE__ */ l("div", { className: ie + " wx-years", ref: h, children: x.map((v, N) => /* @__PURE__ */ l(
1009
1009
  "div",
1010
1010
  {
1011
- className: ie + ` wx-year ${x == v ? "wx-current" : ""} ${g === 0 ? "wx-prev-decade" : ""} ${g === 11 ? "wx-next-decade" : ""}`,
1011
+ className: ie + ` wx-year ${f == v ? "wx-current" : ""} ${N === 0 ? "wx-prev-decade" : ""} ${N === 11 ? "wx-next-decade" : ""}`,
1012
1012
  "data-id": v,
1013
1013
  children: v
1014
1014
  },
1015
- g
1015
+ N
1016
1016
  )) }),
1017
1017
  /* @__PURE__ */ l("div", { className: ie + " wx-buttons", children: /* @__PURE__ */ l(xe, { onClick: d, children: o.done }) })
1018
1018
  ] });
1019
- }, Ne = {
1019
+ }, ge = {
1020
1020
  month: {
1021
1021
  component: Ge,
1022
1022
  next: ze,
@@ -1051,7 +1051,7 @@ function qe(e) {
1051
1051
  function Xe(e) {
1052
1052
  return e = new Date(e), e.setFullYear(e.getFullYear() + 10), e;
1053
1053
  }
1054
- function Fe(e, n) {
1054
+ function Re(e, n) {
1055
1055
  let t;
1056
1056
  if (n === "normal") t = e;
1057
1057
  else {
@@ -1066,7 +1066,7 @@ function tt(e) {
1066
1066
  if (e === "clear") return null;
1067
1067
  if (e === "today") return /* @__PURE__ */ new Date();
1068
1068
  }
1069
- function se({
1069
+ function ce({
1070
1070
  value: e,
1071
1071
  current: n,
1072
1072
  onCurrentChange: t,
@@ -1076,24 +1076,24 @@ function se({
1076
1076
  onShift: o,
1077
1077
  onChange: s
1078
1078
  }) {
1079
- const a = Q(G).getGroup("calendar"), [u, w] = H("month"), x = Array.isArray(i) ? i : i ? et : [], f = (v, g) => {
1080
- v.preventDefault(), s && s({ value: g });
1079
+ const a = Q(G).getGroup("calendar"), [u, w] = P("month"), f = Array.isArray(i) ? i : i ? et : [], x = (v, N) => {
1080
+ v.preventDefault(), s && s({ value: N });
1081
1081
  }, m = () => {
1082
1082
  u === "duodecade" ? w("year") : u === "year" && w("month");
1083
1083
  }, p = (v) => {
1084
- const { diff: g, current: S } = v;
1085
- if (g === 0) {
1084
+ const { diff: N, current: R } = v;
1085
+ if (N === 0) {
1086
1086
  u === "month" ? w("year") : u === "year" && w("duodecade");
1087
1087
  return;
1088
1088
  }
1089
- if (g) {
1090
- const N = Ne[u];
1091
- t(g > 0 ? N.next(n) : N.prev(n));
1092
- } else S && t(S);
1089
+ if (N) {
1090
+ const g = ge[u];
1091
+ t(N > 0 ? g.next(n) : g.prev(n));
1092
+ } else R && t(R);
1093
1093
  o && o();
1094
1094
  }, d = (v) => {
1095
1095
  w("month"), s && s({ select: !0, value: v });
1096
- }, h = B(() => Ne[u].component, [u]);
1096
+ }, h = E(() => ge[u].component, [u]);
1097
1097
  return /* @__PURE__ */ l(
1098
1098
  "div",
1099
1099
  {
@@ -1114,10 +1114,10 @@ function se({
1114
1114
  onShift: p
1115
1115
  }
1116
1116
  ),
1117
- u === "month" && x.length > 0 && /* @__PURE__ */ l("div", { className: "wx-2Gr4AS wx-buttons", children: x.map((v) => /* @__PURE__ */ l("div", { className: "wx-2Gr4AS wx-button-item", children: /* @__PURE__ */ l(
1117
+ u === "month" && f.length > 0 && /* @__PURE__ */ l("div", { className: "wx-2Gr4AS wx-buttons", children: f.map((v) => /* @__PURE__ */ l("div", { className: "wx-2Gr4AS wx-button-item", children: /* @__PURE__ */ l(
1118
1118
  xe,
1119
1119
  {
1120
- onClick: (g) => f(g, tt(v)),
1120
+ onClick: (N) => x(N, tt(v)),
1121
1121
  children: a(v)
1122
1122
  }
1123
1123
  ) }, v)) })
@@ -1128,13 +1128,13 @@ function se({
1128
1128
  }
1129
1129
  function ue(e) {
1130
1130
  let { words: n = null, optional: t = !1, children: c } = e, r = Q(G);
1131
- const i = B(() => {
1131
+ const i = E(() => {
1132
1132
  let o = r;
1133
- return (!o || !o.extend) && (o = Ve(Me)), n !== null && (o = o.extend(n, t)), o;
1133
+ return (!o || !o.extend) && (o = De(Te)), n !== null && (o = o.extend(n, t)), o;
1134
1134
  }, [n, t, r]);
1135
1135
  return /* @__PURE__ */ l(G.Provider, { value: i, children: c });
1136
1136
  }
1137
- function ge(e, n, t, c) {
1137
+ function Ne(e, n, t, c) {
1138
1138
  if (!e || c) {
1139
1139
  const r = n ? new Date(n) : /* @__PURE__ */ new Date();
1140
1140
  r.setDate(1), t(r);
@@ -1152,23 +1152,23 @@ function lt({
1152
1152
  onChange: r
1153
1153
  }) {
1154
1154
  const [i, o] = W(e), [s, a] = W(n);
1155
- E(() => {
1156
- ge(s, i, a, !1);
1155
+ B(() => {
1156
+ Ne(s, i, a, !1);
1157
1157
  }, [i, s]);
1158
1158
  const u = y(
1159
- (x) => {
1160
- const f = x.value;
1161
- f ? (o(new Date(f)), ge(s, new Date(f), a, !0)) : o(null), r && r({ value: f ? new Date(f) : null });
1159
+ (f) => {
1160
+ const x = f.value;
1161
+ x ? (o(new Date(x)), Ne(s, new Date(x), a, !0)) : o(null), r && r({ value: x ? new Date(x) : null });
1162
1162
  },
1163
1163
  [r, s]
1164
1164
  ), w = y(
1165
- (x) => {
1166
- a(x);
1165
+ (f) => {
1166
+ a(f);
1167
1167
  },
1168
1168
  [a]
1169
1169
  );
1170
1170
  return s ? /* @__PURE__ */ l(ue, { children: /* @__PURE__ */ l(
1171
- se,
1171
+ ce,
1172
1172
  {
1173
1173
  value: i,
1174
1174
  current: s,
@@ -1180,7 +1180,7 @@ function lt({
1180
1180
  ) }) : null;
1181
1181
  }
1182
1182
  const rt = ["clear", "today"];
1183
- function St({
1183
+ function Rt({
1184
1184
  value: e,
1185
1185
  id: n,
1186
1186
  disabled: t = !1,
@@ -1192,33 +1192,33 @@ function St({
1192
1192
  buttons: a = rt,
1193
1193
  css: u = "",
1194
1194
  title: w = "",
1195
- editable: x = !1,
1196
- clear: f = !1,
1195
+ editable: f = !1,
1196
+ clear: x = !1,
1197
1197
  onChange: m
1198
1198
  }) {
1199
1199
  const { calendar: p, formats: d } = (Q(G) || Z()).getRaw(), h = s || d?.dateFormat;
1200
1200
  let v = typeof h == "function" ? h : X(h, p);
1201
- const [g, S] = H(e), [N, T] = H(!1);
1202
- E(() => {
1203
- S(e);
1201
+ const [N, R] = P(e), [g, T] = P(!1);
1202
+ B(() => {
1203
+ R(e);
1204
1204
  }, [e]);
1205
1205
  function M() {
1206
1206
  T(!1);
1207
1207
  }
1208
- function F(k) {
1209
- const L = k === g || k && g && k.valueOf() === g.valueOf() || !k && !g;
1210
- S(k), L || m && m({ value: k }), setTimeout(M, 1);
1208
+ function S(k) {
1209
+ const F = k === N || k && N && k.valueOf() === N.valueOf() || !k && !N;
1210
+ R(k), F || m && m({ value: k }), setTimeout(M, 1);
1211
1211
  }
1212
- const D = B(
1213
- () => g ? v(g) : "",
1214
- [g, v]
1212
+ const D = E(
1213
+ () => N ? v(N) : "",
1214
+ [N, v]
1215
1215
  );
1216
- function b({ value: k, input: L }) {
1217
- if (!x && !f || L) return;
1218
- let A = typeof x == "function" ? x(k) : k ? new Date(k) : null;
1219
- A = isNaN(A) ? g || null : A || null, F(A);
1216
+ function b({ value: k, input: F }) {
1217
+ if (!f && !x || F) return;
1218
+ let A = typeof f == "function" ? f(k) : k ? new Date(k) : null;
1219
+ A = isNaN(A) ? N || null : A || null, S(A);
1220
1220
  }
1221
- return E(() => {
1221
+ return B(() => {
1222
1222
  const k = M;
1223
1223
  return window.addEventListener("scroll", k), () => window.removeEventListener("scroll", k);
1224
1224
  }, []), /* @__PURE__ */ $("div", { className: "wx-1lKOFG wx-datepicker", onClick: () => T(!0), children: [
@@ -1229,7 +1229,7 @@ function St({
1229
1229
  title: w,
1230
1230
  value: D,
1231
1231
  id: n,
1232
- readonly: !x,
1232
+ readonly: !f,
1233
1233
  disabled: t,
1234
1234
  error: c,
1235
1235
  placeholder: o,
@@ -1241,11 +1241,11 @@ function St({
1241
1241
  width: "100%",
1242
1242
  paddingRight: "calc(var(--wx-input-icon-size) + var(--wx-input-icon-indent) * 2)"
1243
1243
  },
1244
- clear: f
1244
+ clear: x
1245
1245
  }
1246
1246
  ),
1247
- N && !t && /* @__PURE__ */ l(
1248
- ne,
1247
+ g && !t && /* @__PURE__ */ l(
1248
+ te,
1249
1249
  {
1250
1250
  onCancel: M,
1251
1251
  width: r,
@@ -1255,8 +1255,8 @@ function St({
1255
1255
  lt,
1256
1256
  {
1257
1257
  buttons: a,
1258
- value: g,
1259
- onChange: (k) => F(k.value)
1258
+ value: N,
1259
+ onChange: (k) => S(k.value)
1260
1260
  }
1261
1261
  )
1262
1262
  }
@@ -1272,12 +1272,12 @@ const st = ["clear", "today"], ct = ({
1272
1272
  buttons: i = st,
1273
1273
  onChange: o
1274
1274
  }) => {
1275
- const [s, a] = W(e), [u, w] = W(n), [x, f] = H(), [m, p] = H(), d = y((T, M, F) => {
1275
+ const [s, a] = W(e), [u, w] = W(n), [f, x] = P(), [m, p] = P(), d = y((T, M, S) => {
1276
1276
  const D = new Date(T);
1277
- return D.setMonth(D.getMonth() + M), F && D.valueOf() === F.valueOf() ? F : D;
1277
+ return D.setMonth(D.getMonth() + M), S && D.valueOf() === S.valueOf() ? S : D;
1278
1278
  }, []), h = y(
1279
1279
  (T) => {
1280
- f(() => {
1280
+ x(() => {
1281
1281
  const M = new Date(T);
1282
1282
  return M.setDate(1), p(d(M, 1)), M;
1283
1283
  });
@@ -1287,63 +1287,63 @@ const st = ["clear", "today"], ct = ({
1287
1287
  (T) => {
1288
1288
  p(() => {
1289
1289
  const M = new Date(T);
1290
- return M.setDate(1), f(d(M, -1)), M;
1290
+ return M.setDate(1), x(d(M, -1)), M;
1291
1291
  });
1292
1292
  },
1293
1293
  [d]
1294
1294
  );
1295
- E(() => {
1295
+ B(() => {
1296
1296
  const T = s;
1297
- x || h(T ? new Date(T) : t || /* @__PURE__ */ new Date());
1298
- }, [s, t, x, h]);
1299
- const g = y(
1297
+ f || h(T ? new Date(T) : t || /* @__PURE__ */ new Date());
1298
+ }, [s, t, f, h]);
1299
+ const N = y(
1300
1300
  (T) => {
1301
1301
  const M = T.value;
1302
- let F = s, D = u;
1302
+ let S = s, D = u;
1303
1303
  const b = M === -1;
1304
- return b || (T.select ? !s || u ? (a(F = M), w(D = null)) : s > M ? (w(D = s), a(F = M)) : w(D = M) : M ? (a(F = new Date(M)), w(D = new Date(M))) : (a(F = null), w(D = null))), (b || !i.includes("done")) && o && o({ start: F, end: D }), [F, D];
1304
+ return b || (T.select ? !s || u ? (a(S = M), w(D = null)) : s > M ? (w(D = s), a(S = M)) : w(D = M) : M ? (a(S = new Date(M)), w(D = new Date(M))) : (a(S = null), w(D = null))), (b || !i.includes("done")) && o && o({ start: S, end: D }), [S, D];
1305
1305
  },
1306
1306
  [s, u, i, o]
1307
- ), S = y(
1307
+ ), R = y(
1308
1308
  (T) => {
1309
- const [M] = g(T);
1309
+ const [M] = N(T);
1310
1310
  M && h(new Date(M));
1311
1311
  },
1312
1312
  [h, s, u]
1313
- ), N = y(
1313
+ ), g = y(
1314
1314
  (T) => {
1315
- const [, M] = g(T);
1315
+ const [, M] = N(T);
1316
1316
  M && v(new Date(M));
1317
1317
  },
1318
1318
  [v, s, u]
1319
1319
  );
1320
- return !x || !m ? null : c === 1 ? /* @__PURE__ */ l(ue, { children: /* @__PURE__ */ l(
1321
- se,
1320
+ return !f || !m ? null : c === 1 ? /* @__PURE__ */ l(ue, { children: /* @__PURE__ */ l(
1321
+ ce,
1322
1322
  {
1323
1323
  value: { start: s, end: u },
1324
- current: x,
1324
+ current: f,
1325
1325
  setCurrent: h,
1326
1326
  markers: r,
1327
1327
  buttons: i,
1328
1328
  part: "both",
1329
- onChange: S
1329
+ onChange: R
1330
1330
  }
1331
1331
  ) }) : /* @__PURE__ */ l(ue, { children: /* @__PURE__ */ $("div", { className: "wx-p2jCaW wx-rangecalendar", children: [
1332
1332
  /* @__PURE__ */ l("div", { className: "wx-p2jCaW wx-half", children: /* @__PURE__ */ l(
1333
- se,
1333
+ ce,
1334
1334
  {
1335
1335
  value: { start: s, end: u },
1336
- current: x,
1336
+ current: f,
1337
1337
  setCurrent: h,
1338
1338
  markers: r,
1339
1339
  buttons: !1,
1340
1340
  part: "left",
1341
- onChange: S,
1341
+ onChange: R,
1342
1342
  onCurrentChange: (T) => h(T)
1343
1343
  }
1344
1344
  ) }),
1345
1345
  /* @__PURE__ */ l("div", { className: "wx-p2jCaW wx-half", children: /* @__PURE__ */ l(
1346
- se,
1346
+ ce,
1347
1347
  {
1348
1348
  value: { start: s, end: u },
1349
1349
  current: m,
@@ -1351,12 +1351,12 @@ const st = ["clear", "today"], ct = ({
1351
1351
  markers: r,
1352
1352
  buttons: i,
1353
1353
  part: "right",
1354
- onChange: N,
1354
+ onChange: g,
1355
1355
  onCurrentChange: (T) => v(T)
1356
1356
  }
1357
1357
  ) })
1358
1358
  ] }) });
1359
- }, at = ["clear", "today"], Ft = ({
1359
+ }, at = ["clear", "today"], St = ({
1360
1360
  value: e,
1361
1361
  onChange: n,
1362
1362
  id: t,
@@ -1368,41 +1368,41 @@ const st = ["clear", "today"], ct = ({
1368
1368
  css: a = "",
1369
1369
  title: u = "",
1370
1370
  format: w = "",
1371
- months: x = 2,
1372
- buttons: f = at,
1371
+ months: f = 2,
1372
+ buttons: x = at,
1373
1373
  editable: m = !1,
1374
1374
  clear: p = !1
1375
1375
  }) => {
1376
- const [d, h] = W(e), { calendar: v, formats: g } = (Q(G) || Z()).getRaw(), S = w || g?.dateFormat, N = typeof S == "function" ? S : X(S, v), [T, M] = H(!1), F = y(() => {
1376
+ const [d, h] = W(e), { calendar: v, formats: N } = (Q(G) || Z()).getRaw(), R = w || N?.dateFormat, g = typeof R == "function" ? R : X(R, v), [T, M] = P(!1), S = y(() => {
1377
1377
  M(!1);
1378
- }, []), D = B(() => d ? d.start ? N(d.start) + (d.end ? ` - ${N(d.end)}` : "") : N(d) : "", [d, N]), b = B(() => d && d.start || null, [d]), k = B(() => d && d.end || null, [d]), L = y(
1379
- (I) => {
1380
- const R = I.start || I.end ? { start: I.start, end: I.end } : null;
1381
- h && h(R), (I.start && I.end || !I.start && !I.end) && (n && n({ value: R }), setTimeout(F, 1));
1378
+ }, []), D = E(() => d ? d.start ? g(d.start) + (d.end ? ` - ${g(d.end)}` : "") : g(d) : "", [d, g]), b = E(() => d && d.start || null, [d]), k = E(() => d && d.end || null, [d]), F = y(
1379
+ (L) => {
1380
+ const I = L.start || L.end ? { start: L.start, end: L.end } : null;
1381
+ h && h(I), (L.start && L.end || !L.start && !L.end) && (n && n({ value: I }), setTimeout(S, 1));
1382
1382
  },
1383
- [n, F, h]
1383
+ [n, S, h]
1384
1384
  ), A = y(
1385
- (I) => {
1385
+ (L) => {
1386
1386
  if (!m && !p) return;
1387
- const { value: R, input: O } = I;
1387
+ const { value: I, input: O } = L;
1388
1388
  if (O) return;
1389
- const [Y, _] = R.split(" -").map((C, U) => {
1389
+ const [Y, _] = I.split(" -").map((C, U) => {
1390
1390
  const K = C.trim();
1391
1391
  let V = typeof m == "function" ? m(K) : K ? new Date(K) : null, j = U === 0 ? b : k;
1392
1392
  return isNaN(V) ? j || null : V || null;
1393
1393
  });
1394
- L({ start: Y, end: _ });
1394
+ F({ start: Y, end: _ });
1395
1395
  },
1396
- [m, p, b, k, L]
1396
+ [m, p, b, k, F]
1397
1397
  );
1398
- return E(() => {
1399
- const I = () => {
1400
- F();
1398
+ return B(() => {
1399
+ const L = () => {
1400
+ S();
1401
1401
  };
1402
- return window.addEventListener("scroll", I), () => {
1403
- window.removeEventListener("scroll", I);
1402
+ return window.addEventListener("scroll", L), () => {
1403
+ window.removeEventListener("scroll", L);
1404
1404
  };
1405
- }, [F]), /* @__PURE__ */ $(
1405
+ }, [S]), /* @__PURE__ */ $(
1406
1406
  "div",
1407
1407
  {
1408
1408
  className: `wx-1b0WDQ wx-daterangepicker ${c ? "wx-disabled" : ""} ${r ? "wx-error" : ""}`,
@@ -1430,21 +1430,21 @@ const st = ["clear", "today"], ct = ({
1430
1430
  }
1431
1431
  ),
1432
1432
  T && !c && /* @__PURE__ */ l(
1433
- ne,
1433
+ te,
1434
1434
  {
1435
- onCancel: F,
1435
+ onCancel: S,
1436
1436
  width: i,
1437
1437
  align: o,
1438
1438
  autoFit: !!o,
1439
1439
  children: /* @__PURE__ */ l(
1440
1440
  ct,
1441
1441
  {
1442
- onCancel: F,
1443
- buttons: f,
1442
+ onCancel: S,
1443
+ buttons: x,
1444
1444
  start: b,
1445
1445
  end: k,
1446
- months: x,
1447
- onChange: L
1446
+ months: f,
1447
+ onChange: F
1448
1448
  }
1449
1449
  )
1450
1450
  }
@@ -1453,19 +1453,19 @@ const st = ["clear", "today"], ct = ({
1453
1453
  }
1454
1454
  );
1455
1455
  };
1456
- function Lt({
1456
+ function Ft({
1457
1457
  hotkey: e = null,
1458
1458
  toggleButton: n,
1459
1459
  children: t
1460
1460
  }) {
1461
- const c = P(null), [r, i] = H(!1), o = B(
1461
+ const c = H(null), [r, i] = P(!1), o = E(
1462
1462
  () => `wxi-${r ? "collapse" : "expand"}`,
1463
1463
  [r]
1464
- ), s = P(null);
1464
+ ), s = H(null);
1465
1465
  return s.current = () => {
1466
1466
  const a = c.current;
1467
1467
  !r && a ? a.requestFullscreen() : r && document.exitFullscreen(), i((u) => !u);
1468
- }, Pe({ [e]: () => s.current() }, c), E(() => {
1468
+ }, Pe({ [e]: () => s.current() }, c), B(() => {
1469
1469
  const a = () => {
1470
1470
  i(document.fullscreenElement === c.current);
1471
1471
  };
@@ -1477,7 +1477,7 @@ function Lt({
1477
1477
  n ? n(s.current, r) : /* @__PURE__ */ l(ee, { css: "wx-13aa5W wx-fullscreen-button", onClick: s.current, children: /* @__PURE__ */ l("i", { className: `wx-13aa5W ${o} wx-fullscreen-icon`, children: " " }) })
1478
1478
  ] });
1479
1479
  }
1480
- function It({ css: e = "", title: n = "", children: t, onClick: c }) {
1480
+ function Lt({ css: e = "", title: n = "", children: t, onClick: c }) {
1481
1481
  return t ? /* @__PURE__ */ l(
1482
1482
  "i",
1483
1483
  {
@@ -1509,86 +1509,86 @@ function Ct({
1509
1509
  error: a = !1,
1510
1510
  checkboxes: u = !1,
1511
1511
  onChange: w,
1512
- children: x
1512
+ children: f
1513
1513
  }) {
1514
- const f = z(e), m = P(null), p = P(null), [d, h] = W(n), [v, g] = H(""), [S, N] = H(!1), T = P(null), M = B(() => d ? (c || t).filter((R) => d.includes(R.id)) : [], [d, c, t]), F = B(() => {
1515
- const R = t;
1516
- return v ? R.filter((O) => O[r].toLowerCase().includes(v.toLowerCase())) : R;
1517
- }, [v, t, r]), D = y((R) => {
1518
- m.current = R.navigate, p.current = R.keydown;
1514
+ const x = z(e), m = H(null), p = H(null), [d, h] = W(n), [v, N] = P(""), [R, g] = P(!1), T = H(null), M = E(() => d ? (c || t).filter((I) => d.includes(I.id)) : [], [d, c, t]), S = E(() => {
1515
+ const I = t;
1516
+ return v ? I.filter((O) => O[r].toLowerCase().includes(v.toLowerCase())) : I;
1517
+ }, [v, t, r]), D = y((I) => {
1518
+ m.current = I.navigate, p.current = I.keydown;
1519
1519
  }, []), b = y(() => {
1520
- F.length ? m.current(0) : m.current(null);
1521
- }, [F]), k = y(
1522
- (R) => {
1523
- const { id: O } = R;
1520
+ S.length ? m.current(0) : m.current(null);
1521
+ }, [S]), k = y(
1522
+ (I) => {
1523
+ const { id: O } = I;
1524
1524
  if (O) {
1525
1525
  let Y;
1526
1526
  d ? d.includes(O) ? Y = d.filter((_) => _ !== O) : Y = [...d, O] : Y = [O], h(Y), w && w({ value: Y }), T.current.focus();
1527
1527
  }
1528
1528
  },
1529
1529
  [d, w]
1530
- ), L = y(
1531
- (R, O) => {
1530
+ ), F = y(
1531
+ (I, O) => {
1532
1532
  O && O.stopPropagation();
1533
- const Y = d.filter((_) => _ !== R);
1533
+ const Y = d.filter((_) => _ !== I);
1534
1534
  h(Y), w && w({ value: Y });
1535
1535
  },
1536
1536
  [d, w]
1537
1537
  ), A = y(
1538
- () => d && d.length ? F.findIndex((R) => R.id === d[0]) : 0,
1539
- [d, F]
1540
- ), I = y(() => {
1538
+ () => d && d.length ? S.findIndex((I) => I.id === d[0]) : 0,
1539
+ [d, S]
1540
+ ), L = y(() => {
1541
1541
  s || (T.current.focus(), m.current(A()));
1542
1542
  }, [s, A]);
1543
1543
  return /* @__PURE__ */ $(
1544
1544
  "div",
1545
1545
  {
1546
1546
  title: o,
1547
- className: `wx-12Wj21 wx-multicombo ${a ? "wx-error" : ""} ${s ? "wx-disabled" : ""} ${M.length ? "wx-not-empty" : ""} ${S && !s ? "wx-focus" : ""}`,
1548
- onClick: I,
1549
- onKeyDown: (R) => p.current(R, A()),
1547
+ className: `wx-12Wj21 wx-multicombo ${a ? "wx-error" : ""} ${s ? "wx-disabled" : ""} ${M.length ? "wx-not-empty" : ""} ${R && !s ? "wx-focus" : ""}`,
1548
+ onClick: L,
1549
+ onKeyDown: (I) => p.current(I, A()),
1550
1550
  children: [
1551
1551
  /* @__PURE__ */ $("div", { className: "wx-12Wj21 wx-wrapper", children: [
1552
- /* @__PURE__ */ l("div", { className: "wx-12Wj21 wx-tags", children: M.map((R) => /* @__PURE__ */ $("div", { className: "wx-12Wj21 wx-tag", children: [
1553
- x ? te(x, { option: R }) : R[r],
1552
+ /* @__PURE__ */ l("div", { className: "wx-12Wj21 wx-tags", children: M.map((I) => /* @__PURE__ */ $("div", { className: "wx-12Wj21 wx-tag", children: [
1553
+ f ? ne(f, { option: I }) : I[r],
1554
1554
  !s && /* @__PURE__ */ l(
1555
1555
  "i",
1556
1556
  {
1557
1557
  className: "wx-12Wj21 wx-icon wxi-close",
1558
- onClick: (O) => L(R.id, O)
1558
+ onClick: (O) => F(I.id, O)
1559
1559
  }
1560
1560
  )
1561
- ] }, R.id)) }),
1561
+ ] }, I.id)) }),
1562
1562
  /* @__PURE__ */ $("div", { className: "wx-12Wj21 wx-select", children: [
1563
1563
  /* @__PURE__ */ l(
1564
1564
  "input",
1565
1565
  {
1566
1566
  className: "wx-12Wj21 wx-input",
1567
- id: f,
1567
+ id: x,
1568
1568
  type: "text",
1569
1569
  value: v,
1570
- onChange: (R) => g(R.target.value),
1570
+ onChange: (I) => N(I.target.value),
1571
1571
  onInput: b,
1572
1572
  placeholder: i,
1573
1573
  disabled: s,
1574
- onFocus: () => N(!0),
1575
- onBlur: () => N(!1),
1574
+ onFocus: () => g(!0),
1575
+ onBlur: () => g(!1),
1576
1576
  ref: T
1577
1577
  }
1578
1578
  ),
1579
1579
  /* @__PURE__ */ l("i", { className: "wx-12Wj21 wx-icon wxi-angle-down" })
1580
1580
  ] })
1581
1581
  ] }),
1582
- !s && /* @__PURE__ */ l(we, { items: F, onReady: D, onSelect: k, children: ({ option: R }) => /* @__PURE__ */ $(J, { children: [
1582
+ !s && /* @__PURE__ */ l(we, { items: S, onReady: D, onSelect: k, children: ({ option: I }) => /* @__PURE__ */ $(J, { children: [
1583
1583
  u && /* @__PURE__ */ l(
1584
- Se,
1584
+ Ie,
1585
1585
  {
1586
1586
  style: { marginRight: "8px", pointerEvents: "none" },
1587
- name: R.id,
1588
- value: d && d.includes(R.id)
1587
+ name: I.id,
1588
+ value: d && d.includes(I.id)
1589
1589
  }
1590
1590
  ),
1591
- x ? te(x, { option: R }) : R[r]
1591
+ f ? ne(f, { option: I }) : I[r]
1592
1592
  ] }) })
1593
1593
  ]
1594
1594
  }
@@ -1602,16 +1602,16 @@ function Pt({
1602
1602
  onCancel: r,
1603
1603
  children: i
1604
1604
  }) {
1605
- const [o, s] = H(0), [a, u] = H(0), [w, x] = H("auto"), [f, m] = H(!1), p = P(null), d = y(() => {
1605
+ const [o, s] = P(0), [a, u] = P(0), [w, f] = P("auto"), [x, m] = P(!1), p = H(null), d = y(() => {
1606
1606
  if (!p.current) return;
1607
1607
  const h = Be(p.current, c, t, e, n);
1608
- h && (s(h.x), u(h.y), x(h.width), m(!0));
1608
+ h && (s(h.x), u(h.y), f(h.width), m(!0));
1609
1609
  }, [p, c, t, e, n]);
1610
- return E(() => {
1610
+ return B(() => {
1611
1611
  requestAnimationFrame(d);
1612
- }, []), E(() => {
1612
+ }, []), B(() => {
1613
1613
  d(c);
1614
- }, [c, t, e, n]), E(() => {
1614
+ }, [c, t, e, n]), B(() => {
1615
1615
  const h = (v) => {
1616
1616
  r && r(v);
1617
1617
  };
@@ -1624,7 +1624,7 @@ function Pt({
1624
1624
  className: "wx-37M6Fj wx-popup",
1625
1625
  style: {
1626
1626
  position: "absolute",
1627
- visibility: f ? "visible" : "hidden",
1627
+ visibility: x ? "visible" : "hidden",
1628
1628
  top: a + "px",
1629
1629
  left: o + "px",
1630
1630
  width: w
@@ -1639,7 +1639,7 @@ const Ht = ({
1639
1639
  value: t = 1,
1640
1640
  onChange: c
1641
1641
  }) => {
1642
- const [r, i] = W(n), [o, s] = W(t), a = (Q(G) || Z()).getGroup("core"), u = Math.ceil(e / r), w = (o - 1) * r, x = Math.min(o * r, e), f = (d, h) => {
1642
+ const [r, i] = W(n), [o, s] = W(t), a = (Q(G) || Z()).getGroup("core"), u = Math.ceil(e / r), w = (o - 1) * r, f = Math.min(o * r, e), x = (d, h) => {
1643
1643
  Number.isNaN(d) || (h || s(d), d = Math.max(1, Math.min(d, u)), h && s(d), d !== o && setTimeout(() => {
1644
1644
  c && c({
1645
1645
  value: d,
@@ -1652,22 +1652,22 @@ const Ht = ({
1652
1652
  function m(d) {
1653
1653
  switch (d) {
1654
1654
  case "first":
1655
- f(1);
1655
+ x(1);
1656
1656
  break;
1657
1657
  case "prev":
1658
- f(o - 1);
1658
+ x(o - 1);
1659
1659
  break;
1660
1660
  case "next":
1661
- f(o + 1);
1661
+ x(o + 1);
1662
1662
  break;
1663
1663
  case "last":
1664
- f(u);
1664
+ x(u);
1665
1665
  break;
1666
1666
  }
1667
1667
  }
1668
1668
  const p = (d) => {
1669
1669
  const h = d.target.value * 1;
1670
- Number.isNaN(h) || (i(h), c && c({ value: o, from: w, to: x, pageSize: h }));
1670
+ Number.isNaN(h) || (i(h), c && c({ value: o, from: w, to: f, pageSize: h }));
1671
1671
  };
1672
1672
  return /* @__PURE__ */ $("div", { className: "wx-35Np0p wx-pager", children: [
1673
1673
  /* @__PURE__ */ $("div", { className: "wx-35Np0p wx-left", children: [
@@ -1707,8 +1707,8 @@ const Ht = ({
1707
1707
  type: "text",
1708
1708
  value: o,
1709
1709
  className: "wx-35Np0p wx-input",
1710
- onChange: (d) => f(d.target.value * 1),
1711
- onBlur: (d) => f(d.target.value * 1, !0)
1710
+ onChange: (d) => x(d.target.value * 1),
1711
+ onBlur: (d) => x(d.target.value * 1, !0)
1712
1712
  }
1713
1713
  ),
1714
1714
  /* @__PURE__ */ l(
@@ -1742,10 +1742,10 @@ function it({
1742
1742
  disabled: i = !1,
1743
1743
  onChange: o
1744
1744
  }) {
1745
- const s = De(), a = z(e) || s, [u, w] = H(!1), x = t !== void 0, f = x ? t : u;
1745
+ const s = Fe(), a = z(e) || s, [u, w] = P(!1), f = t !== void 0, x = f ? t : u;
1746
1746
  function m(p) {
1747
1747
  const d = p.target.checked;
1748
- x || w(d), d && o && o({ value: !0, inputValue: r });
1748
+ f || w(d), d && o && o({ value: !0, inputValue: r });
1749
1749
  }
1750
1750
  return /* @__PURE__ */ $("div", { className: "wx-3lDF1s wx-radio", children: [
1751
1751
  /* @__PURE__ */ l(
@@ -1757,7 +1757,7 @@ function it({
1757
1757
  disabled: i,
1758
1758
  name: c,
1759
1759
  value: r,
1760
- checked: f,
1760
+ checked: x,
1761
1761
  onChange: m
1762
1762
  }
1763
1763
  ),
@@ -1773,15 +1773,15 @@ function Bt({
1773
1773
  onChange: t,
1774
1774
  type: c = ""
1775
1775
  }) {
1776
- const r = oe(), [i, o] = H(n);
1777
- E(() => {
1776
+ const r = le(), [i, o] = P(n);
1777
+ B(() => {
1778
1778
  o(n);
1779
1779
  }, [n]);
1780
1780
  function s(a) {
1781
1781
  const u = a.inputValue;
1782
1782
  o(u), t && t({ value: u });
1783
1783
  }
1784
- return /* @__PURE__ */ l(re.Provider, { value: null, children: /* @__PURE__ */ l("div", { className: `wx-38w70j wx-radiogroup ${c && `wx-${c}`}`, children: e.map((a) => /* @__PURE__ */ l("div", { className: "wx-38w70j wx-item", children: /* @__PURE__ */ l(
1784
+ return /* @__PURE__ */ l(se.Provider, { value: null, children: /* @__PURE__ */ l("div", { className: `wx-38w70j wx-radiogroup ${c && `wx-${c}`}`, children: e.map((a) => /* @__PURE__ */ l("div", { className: "wx-38w70j wx-item", children: /* @__PURE__ */ l(
1785
1785
  it,
1786
1786
  {
1787
1787
  label: a.label,
@@ -1805,34 +1805,34 @@ function Et({
1805
1805
  children: u,
1806
1806
  onChange: w
1807
1807
  }) {
1808
- const x = P(null), f = P(null);
1808
+ const f = H(null), x = H(null);
1809
1809
  let [m, p] = W(e);
1810
- function d(N) {
1811
- x.current = N.navigate, f.current = N.keydown;
1810
+ function d(g) {
1811
+ f.current = g.navigate, x.current = g.keydown;
1812
1812
  }
1813
- const h = B(() => m || m === 0 ? (t || n).find((N) => N.id === m) : null, [m, t, n]), v = y(
1814
- ({ id: N }) => {
1815
- (N || N === 0) && (p(N), x.current(null), w && w({ value: N }));
1813
+ const h = E(() => m || m === 0 ? (t || n).find((g) => g.id === m) : null, [m, t, n]), v = y(
1814
+ ({ id: g }) => {
1815
+ (g || g === 0) && (p(g), f.current(null), w && w({ value: g }));
1816
1816
  },
1817
1817
  [p, w]
1818
- ), g = y(
1819
- (N) => {
1820
- N.stopPropagation(), p(""), w && w({ value: "" });
1818
+ ), N = y(
1819
+ (g) => {
1820
+ g.stopPropagation(), p(""), w && w({ value: "" });
1821
1821
  },
1822
1822
  [p, w]
1823
- ), S = y(() => n.findIndex((N) => N.id === m), [n, m]);
1823
+ ), R = y(() => n.findIndex((g) => g.id === m), [n, m]);
1824
1824
  return /* @__PURE__ */ $(
1825
1825
  "div",
1826
1826
  {
1827
1827
  className: `wx-2YgblL wx-richselect ${i ? "wx-2YgblL wx-error" : ""} ${r ? "wx-2YgblL wx-disabled" : ""} ${u ? "" : "wx-2YgblL wx-nowrap"}`,
1828
1828
  title: o,
1829
- onClick: () => x.current(S()),
1830
- onKeyDown: (N) => f.current(N, S()),
1829
+ onClick: () => f.current(R()),
1830
+ onKeyDown: (g) => x.current(g, R()),
1831
1831
  tabIndex: 0,
1832
1832
  children: [
1833
1833
  /* @__PURE__ */ l("div", { className: "wx-2YgblL wx-label", children: h ? u ? u(h) : h[s] : c ? /* @__PURE__ */ l("span", { className: "wx-2YgblL wx-placeholder", children: c }) : " " }),
1834
- a && !r && m ? /* @__PURE__ */ l("i", { className: "wx-2YgblL wx-icon wxi-close", onClick: g }) : /* @__PURE__ */ l("i", { className: "wx-2YgblL wx-icon wxi-angle-down" }),
1835
- !r && /* @__PURE__ */ l(we, { items: n, onReady: d, onSelect: v, children: ({ option: N }) => u ? u(N) : N[s] })
1834
+ a && !r && m ? /* @__PURE__ */ l("i", { className: "wx-2YgblL wx-icon wxi-close", onClick: N }) : /* @__PURE__ */ l("i", { className: "wx-2YgblL wx-icon wxi-angle-down" }),
1835
+ !r && /* @__PURE__ */ l(we, { items: n, onReady: d, onSelect: v, children: ({ option: g }) => u ? u(g) : g[s] })
1836
1836
  ]
1837
1837
  }
1838
1838
  );
@@ -1844,10 +1844,10 @@ const At = ({
1844
1844
  children: c,
1845
1845
  onChange: r
1846
1846
  }) => {
1847
- const [i, o] = H(n), s = (a) => {
1847
+ const [i, o] = P(n), s = (a) => {
1848
1848
  o(a), r && r({ value: a });
1849
1849
  };
1850
- return E(() => {
1850
+ return B(() => {
1851
1851
  o(n);
1852
1852
  }, [n]), /* @__PURE__ */ l("div", { className: `wx-0hMO7P wx-segmented ${t}`, children: e.map((a) => /* @__PURE__ */ l(
1853
1853
  "button",
@@ -1855,7 +1855,7 @@ const At = ({
1855
1855
  className: `wx-0hMO7P wx-segment ${a.css} ${a.id === i ? "wx-selected" : ""}`,
1856
1856
  title: a.title,
1857
1857
  onClick: () => s(a.id),
1858
- children: c ? te(c, { option: a }) : /* @__PURE__ */ $(J, { children: [
1858
+ children: c ? ne(c, { option: a }) : /* @__PURE__ */ $(J, { children: [
1859
1859
  a.icon && /* @__PURE__ */ l(
1860
1860
  "i",
1861
1861
  {
@@ -1880,21 +1880,21 @@ function Ot({
1880
1880
  id: a,
1881
1881
  onChange: u
1882
1882
  }) {
1883
- const w = z(a), [x, f] = H(e || ""), m = y(
1883
+ const w = z(a), [f, x] = P(e || ""), m = y(
1884
1884
  (d) => {
1885
1885
  const h = d.target.value;
1886
- f(h), u && u({ value: h });
1886
+ x(h), u && u({ value: h });
1887
1887
  },
1888
1888
  [u]
1889
1889
  ), p = y(() => {
1890
- f(""), u && u({ value: "" });
1890
+ x(""), u && u({ value: "" });
1891
1891
  }, [u]);
1892
1892
  return /* @__PURE__ */ $("div", { className: "wx-2yx1Fo wx-select-box", children: [
1893
1893
  /* @__PURE__ */ $(
1894
1894
  "select",
1895
1895
  {
1896
1896
  id: w,
1897
- value: x,
1897
+ value: f,
1898
1898
  disabled: r,
1899
1899
  className: `wx-2yx1Fo wx-select ${i ? "wx-2yx1Fo wx-error" : ""}`,
1900
1900
  title: c,
@@ -1905,7 +1905,7 @@ function Ot({
1905
1905
  ]
1906
1906
  }
1907
1907
  ),
1908
- s && !r && x ? /* @__PURE__ */ l("i", { className: "wx-2yx1Fo wx-icon wxi-close", onClick: p }) : /* @__PURE__ */ l("i", { className: "wx-2yx1Fo wx-icon wxi-angle-down" })
1908
+ s && !r && f ? /* @__PURE__ */ l("i", { className: "wx-2yx1Fo wx-icon wxi-close", onClick: p }) : /* @__PURE__ */ l("i", { className: "wx-2yx1Fo wx-icon wxi-angle-down" })
1909
1909
  ] });
1910
1910
  }
1911
1911
  function ke({
@@ -1920,32 +1920,32 @@ function ke({
1920
1920
  disabled: a = !1,
1921
1921
  onChange: u
1922
1922
  }) {
1923
- const w = z(e), [x, f] = W(i), m = P({ value: x, input: x }), p = B(
1924
- () => (x - c) / (r - c) * 100 + "%",
1925
- [x, c, r]
1926
- ), d = B(() => a ? "" : `linear-gradient(90deg, var(--wx-slider-primary) 0% ${p}, var(--wx-slider-background) ${p} 100%)`, [a, p]);
1927
- function h({ target: S }) {
1928
- const N = S.value * 1;
1929
- f(N), u && u({
1930
- value: N,
1923
+ const w = z(e), [f, x] = W(i), m = H({ value: f, input: f }), p = E(
1924
+ () => (f - c) / (r - c) * 100 + "%",
1925
+ [f, c, r]
1926
+ ), d = E(() => a ? "" : `linear-gradient(90deg, var(--wx-slider-primary) 0% ${p}, var(--wx-slider-background) ${p} 100%)`, [a, p]);
1927
+ function h({ target: R }) {
1928
+ const g = R.value * 1;
1929
+ x(g), u && u({
1930
+ value: g,
1931
1931
  previous: m.current.input,
1932
1932
  input: !0
1933
- }), m.current.input = N;
1933
+ }), m.current.input = g;
1934
1934
  }
1935
- function v({ target: S }) {
1936
- const N = S.value * 1;
1937
- f(N), u && u({ value: N, previous: m.current.value }), m.current.value = N;
1935
+ function v({ target: R }) {
1936
+ const g = R.value * 1;
1937
+ x(g), u && u({ value: g, previous: m.current.value }), m.current.value = g;
1938
1938
  }
1939
- E(() => {
1940
- f(i);
1939
+ B(() => {
1940
+ x(i);
1941
1941
  }, [i]);
1942
- const g = P(null);
1943
- return E(() => {
1944
- if (g.current)
1945
- return g.current.addEventListener("change", v), () => {
1946
- g.current && g.current.removeEventListener("change", v);
1942
+ const N = H(null);
1943
+ return B(() => {
1944
+ if (N.current)
1945
+ return N.current.addEventListener("change", v), () => {
1946
+ N.current && N.current.removeEventListener("change", v);
1947
1947
  };
1948
- }, [g, v]), /* @__PURE__ */ $("div", { className: `wx-2EDJ8G wx-slider ${t}`, title: s, children: [
1948
+ }, [N, v]), /* @__PURE__ */ $("div", { className: `wx-2EDJ8G wx-slider ${t}`, title: s, children: [
1949
1949
  n && /* @__PURE__ */ l("label", { className: "wx-2EDJ8G wx-label", htmlFor: w, children: n }),
1950
1950
  /* @__PURE__ */ l("div", { className: "wx-2EDJ8G wx-inner", children: /* @__PURE__ */ l(
1951
1951
  "input",
@@ -1957,10 +1957,10 @@ function ke({
1957
1957
  max: r,
1958
1958
  step: o,
1959
1959
  disabled: a,
1960
- value: x,
1960
+ value: f,
1961
1961
  onInput: h,
1962
1962
  style: { background: d },
1963
- ref: g
1963
+ ref: N
1964
1964
  }
1965
1965
  ) })
1966
1966
  ] });
@@ -2032,23 +2032,23 @@ const Yt = ({
2032
2032
  readonly: s = !1,
2033
2033
  onChange: a
2034
2034
  }) => {
2035
- const u = z(e), [w, x] = W(n), f = y(() => {
2035
+ const u = z(e), [w, f] = W(n), x = y(() => {
2036
2036
  if (s || w <= c) return;
2037
2037
  const h = w - t;
2038
- x(h), a && a({ value: h });
2038
+ f(h), a && a({ value: h });
2039
2039
  }, [w, s, c, t, a]), m = y(() => {
2040
2040
  if (s || w >= r) return;
2041
2041
  const h = w + t;
2042
- x(h), a && a({ value: h });
2042
+ f(h), a && a({ value: h });
2043
2043
  }, [w, s, r, t, a]), p = y(() => {
2044
2044
  if (!s) {
2045
2045
  const h = Math.round(Math.min(r, Math.max(w, c)) / t) * t, v = isNaN(h) ? Math.max(c, 0) : h;
2046
- x(v), a && a({ value: v });
2046
+ f(v), a && a({ value: v });
2047
2047
  }
2048
2048
  }, [s, w, r, c, t, a]), d = y(
2049
2049
  (h) => {
2050
2050
  const v = h.target.value * 1;
2051
- x(v), a && a({ value: v, input: !0 });
2051
+ f(v), a && a({ value: v, input: !0 });
2052
2052
  },
2053
2053
  [a]
2054
2054
  );
@@ -2063,7 +2063,7 @@ const Yt = ({
2063
2063
  "aria-label": "-",
2064
2064
  className: "wx-22t21n wx-btn wx-btn-dec",
2065
2065
  disabled: o,
2066
- onClick: f,
2066
+ onClick: x,
2067
2067
  children: /* @__PURE__ */ l(
2068
2068
  "svg",
2069
2069
  {
@@ -2152,26 +2152,26 @@ function wt({
2152
2152
  onConfirm: i,
2153
2153
  onCancel: o
2154
2154
  }) {
2155
- const s = (Q(G) || Z()).getGroup("core"), a = P(null);
2156
- E(() => {
2155
+ const s = (Q(G) || Z()).getGroup("core"), a = H(null);
2156
+ B(() => {
2157
2157
  a.current?.focus();
2158
2158
  }, []);
2159
- function u(x) {
2160
- switch (x.code) {
2159
+ function u(f) {
2160
+ switch (f.code) {
2161
2161
  case "Enter": {
2162
- const f = x.target.tagName;
2163
- if (f === "TEXTAREA" || f === "BUTTON") return;
2164
- i && i({ event: x });
2162
+ const x = f.target.tagName;
2163
+ if (x === "TEXTAREA" || x === "BUTTON") return;
2164
+ i && i({ event: f });
2165
2165
  break;
2166
2166
  }
2167
2167
  case "Escape":
2168
- o && o({ event: x });
2168
+ o && o({ event: f });
2169
2169
  break;
2170
2170
  }
2171
2171
  }
2172
- function w(x, f) {
2173
- const m = { event: x, button: f };
2174
- f === "cancel" ? o && o(m) : i && i(m);
2172
+ function w(f, x) {
2173
+ const m = { event: f, button: x };
2174
+ x === "cancel" ? o && o(m) : i && i(m);
2175
2175
  }
2176
2176
  return /* @__PURE__ */ l(
2177
2177
  "div",
@@ -2183,20 +2183,20 @@ function wt({
2183
2183
  children: /* @__PURE__ */ $("div", { className: "wx-1FxkZa wx-window", children: [
2184
2184
  t || (e ? /* @__PURE__ */ l("div", { className: "wx-1FxkZa wx-header", children: e }) : null),
2185
2185
  /* @__PURE__ */ l("div", { children: c }),
2186
- r || n && /* @__PURE__ */ l("div", { className: "wx-1FxkZa wx-buttons", children: n.map((x) => /* @__PURE__ */ l("div", { className: "wx-1FxkZa wx-button", children: /* @__PURE__ */ l(
2186
+ r || n && /* @__PURE__ */ l("div", { className: "wx-1FxkZa wx-buttons", children: n.map((f) => /* @__PURE__ */ l("div", { className: "wx-1FxkZa wx-button", children: /* @__PURE__ */ l(
2187
2187
  ee,
2188
2188
  {
2189
- type: `block ${x === "ok" ? "primary" : "secondary"}`,
2190
- onClick: (f) => w(f, x),
2191
- children: s(x)
2189
+ type: `block ${f === "ok" ? "primary" : "secondary"}`,
2190
+ onClick: (x) => w(x, f),
2191
+ children: s(f)
2192
2192
  }
2193
- ) }, x)) })
2193
+ ) }, f)) })
2194
2194
  ] })
2195
2195
  }
2196
2196
  );
2197
2197
  }
2198
2198
  function ft({ children: e }, n) {
2199
- const [t, c] = H(null), [r, i] = H([]);
2199
+ const [t, c] = P(null), [r, i] = P([]);
2200
2200
  return Ce(
2201
2201
  n,
2202
2202
  () => ({
@@ -2211,7 +2211,7 @@ function ft({ children: e }, n) {
2211
2211
  });
2212
2212
  },
2213
2213
  showNotice: (o) => {
2214
- o = { ...o }, o.id = o.id || oe(), o.remove = () => i((s) => s.filter((a) => a.id !== o.id)), o.expire != -1 && setTimeout(o.remove, o.expire || 5100), i((s) => [...s, o]);
2214
+ o = { ...o }, o.id = o.id || le(), o.remove = () => i((s) => s.filter((a) => a.id !== o.id)), o.expire != -1 && setTimeout(o.remove, o.expire || 5100), i((s) => [...s, o]);
2215
2215
  }
2216
2216
  }),
2217
2217
  []
@@ -2230,16 +2230,16 @@ function ft({ children: e }, n) {
2230
2230
  /* @__PURE__ */ l(dt, { data: r })
2231
2231
  ] });
2232
2232
  }
2233
- const xt = Ie(ft);
2233
+ const xt = Le(ft);
2234
2234
  function Jt(e) {
2235
- let { children: n } = e, t = P();
2236
- const c = B(() => ({
2235
+ let { children: n } = e, t = H();
2236
+ const c = E(() => ({
2237
2237
  showNotice: (r) => t.current.showNotice(r),
2238
2238
  showModal: (r) => t.current.showModal(r)
2239
2239
  }), []);
2240
- return /* @__PURE__ */ l(Re.Provider, { value: c, children: /* @__PURE__ */ l(xt, { ref: t, children: n }) });
2240
+ return /* @__PURE__ */ l(Me.Provider, { value: c, children: /* @__PURE__ */ l(xt, { ref: t, children: n }) });
2241
2241
  }
2242
- function be({
2242
+ function ye({
2243
2243
  label: e = "",
2244
2244
  position: n = "",
2245
2245
  css: t = "",
@@ -2248,14 +2248,18 @@ function be({
2248
2248
  required: i = !1,
2249
2249
  children: o
2250
2250
  }) {
2251
- const s = B(() => oe(), []);
2252
- return /* @__PURE__ */ l(re.Provider, { value: s, children: /* @__PURE__ */ $(
2251
+ const s = H(null), a = y(() => {
2252
+ if (s.current) return s.current;
2253
+ const u = le();
2254
+ return s.current = u, u;
2255
+ }, []);
2256
+ return /* @__PURE__ */ l(se.Provider, { value: a, children: /* @__PURE__ */ $(
2253
2257
  "div",
2254
2258
  {
2255
2259
  className: `wx-2oVUvC wx-field wx-${n} ${t} ${c ? "wx-error" : ""} ${i ? "wx-required" : ""}`.trim(),
2256
2260
  children: [
2257
- e && /* @__PURE__ */ l("label", { className: "wx-2oVUvC wx-label", htmlFor: s, children: e }),
2258
- /* @__PURE__ */ l("div", { className: `wx-2oVUvC wx-field-control wx-${r}`, children: te(o, { id: s }) })
2261
+ e && /* @__PURE__ */ l("label", { className: "wx-2oVUvC wx-label", htmlFor: s.current, children: e }),
2262
+ /* @__PURE__ */ l("div", { className: `wx-2oVUvC wx-field-control wx-${r}`, children: o })
2259
2263
  ]
2260
2264
  }
2261
2265
  ) });
@@ -2272,17 +2276,17 @@ const mt = ({
2272
2276
  text: a = "",
2273
2277
  textActive: u = "",
2274
2278
  children: w,
2275
- active: x,
2276
- onChange: f
2279
+ active: f,
2280
+ onChange: x
2277
2281
  }) => {
2278
- const [m, p] = W(e), d = B(() => (m ? "pressed" : "") + (n ? " " + n : ""), [m, n]), h = y(
2282
+ const [m, p] = W(e), d = E(() => (m ? "pressed" : "") + (n ? " " + n : ""), [m, n]), h = y(
2279
2283
  (v) => {
2280
- let g = !m;
2281
- i && i(v), v.defaultPrevented || (p(g), f && f({ value: g }));
2284
+ let N = !m;
2285
+ i && i(v), v.defaultPrevented || (p(N), x && x({ value: N }));
2282
2286
  },
2283
- [m, i, f]
2287
+ [m, i, x]
2284
2288
  );
2285
- return m && x ? /* @__PURE__ */ l(
2289
+ return m && f ? /* @__PURE__ */ l(
2286
2290
  ee,
2287
2291
  {
2288
2292
  title: o,
@@ -2292,7 +2296,7 @@ const mt = ({
2292
2296
  icon: m && r || t,
2293
2297
  onClick: h,
2294
2298
  disabled: c,
2295
- children: te(x, { value: m })
2299
+ children: ne(f, { value: m })
2296
2300
  }
2297
2301
  ) : w ? /* @__PURE__ */ l(
2298
2302
  ee,
@@ -2318,9 +2322,9 @@ const mt = ({
2318
2322
  disabled: c
2319
2323
  }
2320
2324
  );
2321
- }, ye = new Date(0, 0, 0, 0, 0);
2325
+ }, be = new Date(0, 0, 0, 0, 0);
2322
2326
  function Gt({
2323
- value: e = ye,
2327
+ value: e = be,
2324
2328
  id: n,
2325
2329
  title: t = "",
2326
2330
  css: c = "",
@@ -2330,18 +2334,18 @@ function Gt({
2330
2334
  onChange: s
2331
2335
  }) {
2332
2336
  let [a, u] = W(e);
2333
- const { calendar: w, formats: x } = (Q(G) || Z()).getRaw(), f = w.clockFormat == 12, m = 23, p = 59, d = B(() => {
2334
- const V = o || x?.timeFormat;
2337
+ const { calendar: w, formats: f } = (Q(G) || Z()).getRaw(), x = w.clockFormat == 12, m = 23, p = 59, d = E(() => {
2338
+ const V = o || f?.timeFormat;
2335
2339
  return typeof V == "function" ? V : X(V, w);
2336
- }, [o, x, w]), h = B(() => d(new Date(0, 0, 0, 1)).indexOf("01") != -1, [d]), v = (V, j) => (V < 10 && j ? `0${V}` : `${V}`).slice(-2), g = (V) => v(V, !0), S = (V) => `${V}`.replace(/[^\d]/g, "") || 0, N = (V) => f && (V = V % 12, V === 0) ? "12" : v(V, h), T = y((V, j) => (V = S(V), Math.min(V, j)), []), [M, F] = H(null), D = a || ye, b = T(D.getHours(), m), k = T(D.getMinutes(), p), L = b > 12, A = N(b), I = g(k), R = B(
2340
+ }, [o, f, w]), h = E(() => d(new Date(0, 0, 0, 1)).indexOf("01") != -1, [d]), v = (V, j) => (V < 10 && j ? `0${V}` : `${V}`).slice(-2), N = (V) => v(V, !0), R = (V) => `${V}`.replace(/[^\d]/g, "") || 0, g = (V) => x && (V = V % 12, V === 0) ? "12" : v(V, h), T = y((V, j) => (V = R(V), Math.min(V, j)), []), [M, S] = P(null), D = a || be, b = T(D.getHours(), m), k = T(D.getMinutes(), p), F = b > 12, A = g(b), L = N(k), I = E(
2337
2341
  () => d(new Date(0, 0, 0, b, k)),
2338
2342
  [b, k, d]
2339
2343
  ), O = y(() => {
2340
- F(!0);
2344
+ S(!0);
2341
2345
  }, []), Y = y(() => {
2342
2346
  const V = new Date(D);
2343
- V.setHours(V.getHours() + (L ? -12 : 12)), u(V), s && s({ value: V });
2344
- }, [D, L, s]), _ = y(
2347
+ V.setHours(V.getHours() + (F ? -12 : 12)), u(V), s && s({ value: V });
2348
+ }, [D, F, s]), _ = y(
2345
2349
  ({ value: V }) => {
2346
2350
  if (D.getHours() === V) return;
2347
2351
  const j = new Date(D);
@@ -2356,10 +2360,10 @@ function Gt({
2356
2360
  },
2357
2361
  [D, s]
2358
2362
  ), U = y(
2359
- (V) => (V = T(V, m), f && (V = V * 1, V === 12 && (V = 0), L && (V += 12)), V),
2360
- [T, f, L]
2363
+ (V) => (V = T(V, m), x && (V = V * 1, V === 12 && (V = 0), F && (V += 12)), V),
2364
+ [T, x, F]
2361
2365
  ), K = y(() => {
2362
- F(null);
2366
+ S(null);
2363
2367
  }, []);
2364
2368
  return /* @__PURE__ */ $(
2365
2369
  "div",
@@ -2374,7 +2378,7 @@ function Gt({
2374
2378
  id: n,
2375
2379
  css: c,
2376
2380
  title: t,
2377
- value: R,
2381
+ value: I,
2378
2382
  readonly: !0,
2379
2383
  disabled: r,
2380
2384
  error: i,
@@ -2386,7 +2390,7 @@ function Gt({
2386
2390
  }
2387
2391
  }
2388
2392
  ),
2389
- M && !r && /* @__PURE__ */ l(ne, { onCancel: K, width: "unset", children: /* @__PURE__ */ $("div", { className: "wx-7f497i wx-wrapper", children: [
2393
+ M && !r && /* @__PURE__ */ l(te, { onCancel: K, width: "unset", children: /* @__PURE__ */ $("div", { className: "wx-7f497i wx-wrapper", children: [
2390
2394
  /* @__PURE__ */ $("div", { className: "wx-7f497i wx-timer", children: [
2391
2395
  /* @__PURE__ */ l(
2392
2396
  "input",
@@ -2404,24 +2408,24 @@ function Gt({
2404
2408
  "input",
2405
2409
  {
2406
2410
  className: "wx-7f497i wx-digit",
2407
- value: I,
2411
+ value: L,
2408
2412
  onChange: (V) => {
2409
2413
  const j = T(V.target.value, p);
2410
2414
  C({ value: j });
2411
2415
  }
2412
2416
  }
2413
2417
  ),
2414
- f && /* @__PURE__ */ l(
2418
+ x && /* @__PURE__ */ l(
2415
2419
  mt,
2416
2420
  {
2417
- value: L,
2421
+ value: F,
2418
2422
  onClick: Y,
2419
2423
  active: () => /* @__PURE__ */ l("span", { children: "pm" }),
2420
2424
  children: /* @__PURE__ */ l("span", { children: "am" })
2421
2425
  }
2422
2426
  )
2423
2427
  ] }),
2424
- /* @__PURE__ */ l(be, { width: "unset", children: /* @__PURE__ */ l(
2428
+ /* @__PURE__ */ l(ye, { width: "unset", children: /* @__PURE__ */ l(
2425
2429
  ke,
2426
2430
  {
2427
2431
  label: w.hours,
@@ -2430,7 +2434,7 @@ function Gt({
2430
2434
  max: m
2431
2435
  }
2432
2436
  ) }),
2433
- /* @__PURE__ */ l(be, { width: "unset", children: /* @__PURE__ */ l(
2437
+ /* @__PURE__ */ l(ye, { width: "unset", children: /* @__PURE__ */ l(
2434
2438
  ke,
2435
2439
  {
2436
2440
  label: w.minutes,
@@ -2448,16 +2452,16 @@ function Qt({ children: e }) {
2448
2452
  return /* @__PURE__ */ l("div", { className: "wx-KgpO9N wx-modal", children: /* @__PURE__ */ l("div", { className: "wx-KgpO9N wx-window", children: e }) });
2449
2453
  }
2450
2454
  function _t({ position: e = "right", children: n, onCancel: t }) {
2451
- const c = P(null);
2452
- return E(() => de(c.current, t).destroy, []), /* @__PURE__ */ l("div", { ref: c, className: `wx-2L733M wx-sidearea wx-pos-${e}`, children: n });
2455
+ const c = H(null);
2456
+ return B(() => de(c.current, t).destroy, []), /* @__PURE__ */ l("div", { ref: c, className: `wx-2L733M wx-sidearea wx-pos-${e}`, children: n });
2453
2457
  }
2454
2458
  function Ut({ theme: e = "", target: n, children: t }) {
2455
- const c = P(null), r = P(null), [i, o] = H(null);
2459
+ const c = H(null), r = H(null), [i, o] = P(null);
2456
2460
  c.current || (c.current = document.createElement("div"));
2457
- const s = Q(le);
2458
- return E(() => {
2461
+ const s = Q(re);
2462
+ return B(() => {
2459
2463
  o(
2460
- n || ht(r.current) || ae.getTopNode(r.current)
2464
+ n || ht(r.current) || oe.getTopNode(r.current)
2461
2465
  );
2462
2466
  }, [r.current]), /* @__PURE__ */ $(J, { children: [
2463
2467
  /* @__PURE__ */ l("span", { ref: r, style: { display: "none" } }),
@@ -2474,7 +2478,7 @@ function Ut({ theme: e = "", target: n, children: t }) {
2474
2478
  ] });
2475
2479
  }
2476
2480
  function ht(e) {
2477
- const n = ae.getTopNode(e);
2481
+ const n = oe.getTopNode(e);
2478
2482
  for (; e && e !== n && !e.getAttribute("data-wx-portal-root"); )
2479
2483
  e = e.parentNode;
2480
2484
  return e;
@@ -2484,7 +2488,7 @@ function pt() {
2484
2488
  }
2485
2489
  function zt(e) {
2486
2490
  const { fonts: n = !0, children: t } = e;
2487
- return /* @__PURE__ */ l(le.Provider, { value: "material", children: /* @__PURE__ */ $(J, { children: [
2491
+ return /* @__PURE__ */ l(re.Provider, { value: "material", children: /* @__PURE__ */ $(J, { children: [
2488
2492
  t && /* @__PURE__ */ l("div", { className: "wx-theme wx-material-theme", children: t }),
2489
2493
  n && /* @__PURE__ */ $(J, { children: [
2490
2494
  /* @__PURE__ */ l(
@@ -2506,12 +2510,12 @@ function zt(e) {
2506
2510
  ] })
2507
2511
  ] }) });
2508
2512
  }
2509
- function Le() {
2513
+ function Se() {
2510
2514
  return /* @__PURE__ */ l(J, {});
2511
2515
  }
2512
2516
  function Kt(e) {
2513
2517
  const { fonts: n = !0, children: t } = e;
2514
- return /* @__PURE__ */ l(le.Provider, { value: "willow", children: /* @__PURE__ */ $(J, { children: [
2518
+ return /* @__PURE__ */ l(re.Provider, { value: "willow", children: /* @__PURE__ */ $(J, { children: [
2515
2519
  t && t && /* @__PURE__ */ l("div", { className: "wx-theme wx-willow-theme", children: t }),
2516
2520
  n && /* @__PURE__ */ $(J, { children: [
2517
2521
  /* @__PURE__ */ l(
@@ -2522,7 +2526,7 @@ function Kt(e) {
2522
2526
  crossOrigin: "true"
2523
2527
  }
2524
2528
  ),
2525
- /* @__PURE__ */ l(Le, {}),
2529
+ /* @__PURE__ */ l(Se, {}),
2526
2530
  /* @__PURE__ */ l(
2527
2531
  "link",
2528
2532
  {
@@ -2535,7 +2539,7 @@ function Kt(e) {
2535
2539
  }
2536
2540
  function Zt(e) {
2537
2541
  const { fonts: n = !0, children: t } = e;
2538
- return /* @__PURE__ */ l(le.Provider, { value: "willow-dark", children: /* @__PURE__ */ $(J, { children: [
2542
+ return /* @__PURE__ */ l(re.Provider, { value: "willow-dark", children: /* @__PURE__ */ $(J, { children: [
2539
2543
  t && t && /* @__PURE__ */ l("div", { className: "wx-theme wx-willow-dark-theme", children: t }),
2540
2544
  n && /* @__PURE__ */ $(J, { children: [
2541
2545
  /* @__PURE__ */ l(
@@ -2546,7 +2550,7 @@ function Zt(e) {
2546
2550
  crossOrigin: "true"
2547
2551
  }
2548
2552
  ),
2549
- /* @__PURE__ */ l(Le, {}),
2553
+ /* @__PURE__ */ l(Se, {}),
2550
2554
  /* @__PURE__ */ l(
2551
2555
  "link",
2552
2556
  {
@@ -2558,27 +2562,27 @@ function Zt(e) {
2558
2562
  ] }) });
2559
2563
  }
2560
2564
  function qt(e) {
2561
- const n = oe();
2565
+ const n = le();
2562
2566
  e.setAttribute("data-wx-portal-root", n);
2563
2567
  }
2564
- Ee(ae);
2568
+ Ee(oe);
2565
2569
  export {
2566
2570
  ee as Button,
2567
2571
  lt as Calendar,
2568
- Se as Checkbox,
2572
+ Ie as Checkbox,
2569
2573
  $t as CheckboxGroup,
2570
2574
  Ye as ColorBoard,
2571
2575
  Mt as ColorPicker,
2572
2576
  Tt as ColorSelect,
2573
- Rt as Combo,
2577
+ It as Combo,
2574
2578
  jt as Counter,
2575
- St as DatePicker,
2576
- Ft as DateRangePicker,
2577
- ne as Dropdown,
2578
- be as Field,
2579
- Lt as Fullscreen,
2579
+ Rt as DatePicker,
2580
+ St as DateRangePicker,
2581
+ te as Dropdown,
2582
+ ye as Field,
2583
+ Ft as Fullscreen,
2580
2584
  Jt as Globals,
2581
- It as Icon,
2585
+ Lt as Icon,
2582
2586
  ue as Locale,
2583
2587
  zt as Material,
2584
2588
  wt as Modal,
@@ -2610,3 +2614,4 @@ export {
2610
2614
  tn as locale,
2611
2615
  qt as popupContainer
2612
2616
  };
2617
+ //# sourceMappingURL=index.es.js.map