@arkyn/components 3.0.1-beta.50 → 3.0.1-beta.52

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/bundle.js CHANGED
@@ -1,22 +1,22 @@
1
- import { jsx as f, jsxs as k, Fragment as ke } from "react/jsx-runtime";
1
+ import { jsx as f, jsxs as k, Fragment as Ce } from "react/jsx-runtime";
2
2
  import * as ee from "react";
3
- import Tr, { createContext as Fe, useContext as Ae, useState as F, useRef as oe, useEffect as Ce, cloneElement as Da, useId as Ie, useSyncExternalStore as $a, forwardRef as gn, Children as La, useCallback as tt } from "react";
4
- import { Info as ja, AlertTriangle as Ba, XCircle as za, CheckCircle2 as Ha, Pause as Ga, Play as Va, Loader2 as Oe, RefreshCw as hn, Check as pn, X as yn, FileImage as Ua, FileAudio as qa, FileArchive as Wa, File as Ka, ChevronDown as Or, Search as Xa } from "lucide-react";
5
- import { AnimatePresence as Pr, motion as ft } from "framer-motion";
3
+ import Tr, { createContext as Se, useContext as Re, useState as S, useRef as ie, useEffect as be, cloneElement as $a, useId as Me, useSyncExternalStore as La, forwardRef as gn, Children as ja, useCallback as nt } from "react";
4
+ import { Info as Ba, AlertTriangle as za, XCircle as Ha, CheckCircle2 as Ga, Pause as Va, Play as Ua, Loader2 as Ae, RefreshCw as hn, Check as pn, X as yn, FileImage as qa, FileAudio as Wa, FileArchive as Ka, File as Xa, ChevronDown as Or, Search as Ya } from "lucide-react";
5
+ import { AnimatePresence as Pr, motion as dt } from "framer-motion";
6
6
  import { InputMask as Ar } from "@react-input/mask";
7
- function Ya(e) {
7
+ function Za(e) {
8
8
  const { className: t, ...n } = e, r = `arkynAlertTitle ${t}`;
9
9
  return /* @__PURE__ */ f("div", { className: r.trim(), ...n });
10
10
  }
11
- const Ir = Fe({});
12
- function Za() {
13
- return Ae(Ir);
11
+ const Ir = Se({});
12
+ function Ja() {
13
+ return Re(Ir);
14
14
  }
15
15
  function yc(e) {
16
16
  const { schema: t, children: n, className: r, ...a } = e, i = !((l) => {
17
17
  let u = !1;
18
18
  const d = (_) => {
19
- Array.isArray(_) ? _.forEach(d) : _ && typeof _ == "object" && "type" in _ && (_.type === Ya ? u = !0 : _.props && typeof _.props == "object" && _.props !== null && "children" in _.props && d(_.props.children));
19
+ Array.isArray(_) ? _.forEach(d) : _ && typeof _ == "object" && "type" in _ && (_.type === Za ? u = !0 : _.props && typeof _.props == "object" && _.props !== null && "children" in _.props && d(_.props.children));
20
20
  };
21
21
  return d(l), u;
22
22
  })(n) ? "nonExistsAlertTitle" : "existsAlertTitle", c = `arkynAlertContainer ${t} ${i} ${r}`;
@@ -31,29 +31,29 @@ function kc(e) {
31
31
  return /* @__PURE__ */ f("div", { className: r.trim(), ...n });
32
32
  }
33
33
  function Cc(e) {
34
- const { className: t, ...n } = e, { schema: r } = Za(), a = `arkynAlertIcon ${r} ${t}`;
34
+ const { className: t, ...n } = e, { schema: r } = Ja(), a = `arkynAlertIcon ${r} ${t}`;
35
35
  switch (r) {
36
36
  case "success":
37
- return /* @__PURE__ */ f(Ha, { className: a, ...n });
37
+ return /* @__PURE__ */ f(Ga, { className: a, ...n });
38
38
  case "danger":
39
- return /* @__PURE__ */ f(za, { className: a, ...n });
39
+ return /* @__PURE__ */ f(Ha, { className: a, ...n });
40
40
  case "warning":
41
- return /* @__PURE__ */ f(Ba, { className: a, ...n });
41
+ return /* @__PURE__ */ f(za, { className: a, ...n });
42
42
  case "info":
43
- return /* @__PURE__ */ f(ja, { className: a, ...n });
43
+ return /* @__PURE__ */ f(Ba, { className: a, ...n });
44
44
  }
45
45
  }
46
- function Ja(e) {
46
+ function Qa(e) {
47
47
  function t() {
48
48
  return !e || e <= 0 ? 0 : e >= 100 ? 100 : e;
49
49
  }
50
- const [n, r] = F(t());
50
+ const [n, r] = S(t());
51
51
  function a(s) {
52
52
  return s <= 0 ? r(0) : s >= 100 ? r(100) : r(s);
53
53
  }
54
54
  return [n, a];
55
55
  }
56
- function Qa(e) {
56
+ function es(e) {
57
57
  const {
58
58
  onChange: t,
59
59
  value: n,
@@ -61,16 +61,16 @@ function Qa(e) {
61
61
  onDragging: a,
62
62
  className: s = "",
63
63
  ...o
64
- } = e, [i, c] = F(!1), l = oe(null), u = () => c(!0), d = () => c(!1), _ = (C) => {
64
+ } = e, [i, c] = S(!1), l = ie(null), u = () => c(!0), d = () => c(!1), _ = (C) => {
65
65
  if (r || !i || !l.current) return;
66
- const x = l.current.getBoundingClientRect(), v = C.clientX - x.left, w = Math.min(Math.max(v / x.width * 100, 0), 100);
66
+ const E = l.current.getBoundingClientRect(), v = C.clientX - E.left, w = Math.min(Math.max(v / E.width * 100, 0), 100);
67
67
  t(w);
68
68
  }, h = (C) => {
69
69
  if (r || !l.current) return;
70
- const x = l.current.getBoundingClientRect(), v = C.clientX - x.left, w = Math.min(Math.max(v / x.width * 100, 0), 100);
70
+ const E = l.current.getBoundingClientRect(), v = C.clientX - E.left, w = Math.min(Math.max(v / E.width * 100, 0), 100);
71
71
  t(w);
72
72
  };
73
- Ce(() => (i ? (a && a(!0), document.addEventListener("mousemove", _), document.addEventListener("mouseup", d)) : (a && a(!1), document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", d)), () => {
73
+ be(() => (i ? (a && a(!0), document.addEventListener("mousemove", _), document.addEventListener("mouseup", d)) : (a && a(!1), document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", d)), () => {
74
74
  document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", d);
75
75
  }), [i]);
76
76
  const y = `arkynSliderTrack ${i ? "isDragging" : "isNotDragging"} ${r ? "isDisabled" : "isEnabled"} ${s}`;
@@ -89,9 +89,9 @@ function Qa(e) {
89
89
  }
90
90
  );
91
91
  }
92
- function es(e) {
93
- var L, T, G, S;
94
- const { onPlayAudio: t, onPauseAudio: n, disabled: r, ...a } = e, [s, o] = Ja(0), [i, c] = F(!1), [l, u] = F(!1), d = oe(null), _ = (L = d.current) == null ? void 0 : L.currentTime, h = (T = d.current) == null ? void 0 : T.duration, m = C(_), g = C(h), y = {
92
+ function ts(e) {
93
+ var D, T, j, A;
94
+ const { onPlayAudio: t, onPauseAudio: n, disabled: r, ...a } = e, [s, o] = Qa(0), [i, c] = S(!1), [l, u] = S(!1), d = ie(null), _ = (D = d.current) == null ? void 0 : D.currentTime, h = (T = d.current) == null ? void 0 : T.duration, m = C(_), g = C(h), y = {
95
95
  totalTime: h,
96
96
  currentTime: _,
97
97
  formattedCurrentTime: m,
@@ -99,10 +99,10 @@ function es(e) {
99
99
  };
100
100
  function C(b) {
101
101
  if (!b) return "00:00";
102
- const O = Math.floor(b / 60), M = Math.floor(b % 60), P = String(O).padStart(2, "0"), j = String(M).padStart(2, "0");
103
- return `${P}:${j}`;
102
+ const O = Math.floor(b / 60), $ = Math.floor(b % 60), I = String(O).padStart(2, "0"), z = String($).padStart(2, "0");
103
+ return `${I}:${z}`;
104
104
  }
105
- function x() {
105
+ function E() {
106
106
  const b = d.current;
107
107
  b && (e.onPlayAudio && e.onPlayAudio(y), b.play(), c(!0));
108
108
  }
@@ -111,20 +111,20 @@ function es(e) {
111
111
  b && (e.onPauseAudio && e.onPauseAudio(y), b.pause(), c(!1));
112
112
  }
113
113
  function w() {
114
- i ? v() : x();
114
+ i ? v() : E();
115
115
  }
116
116
  function H(b) {
117
117
  const O = d.current;
118
118
  if (!O) return;
119
- const M = O.duration, P = b / 100 * M;
120
- O.currentTime = P;
119
+ const $ = O.duration, I = b / 100 * $;
120
+ O.currentTime = I;
121
121
  }
122
- return l || !i ? (G = d.current) == null || G.pause() : i && ((S = d.current) == null || S.play()), Ce(() => {
122
+ return l || !i ? (j = d.current) == null || j.pause() : i && ((A = d.current) == null || A.play()), be(() => {
123
123
  const b = d.current;
124
124
  if (!b) return;
125
125
  const O = () => {
126
- const M = b.duration, j = b.currentTime / M * 100;
127
- o(j);
126
+ const $ = b.duration, z = b.currentTime / $ * 100;
127
+ o(z);
128
128
  };
129
129
  return b.addEventListener("timeupdate", O), () => {
130
130
  b.removeEventListener("timeupdate", O);
@@ -140,12 +140,12 @@ function es(e) {
140
140
  }
141
141
  ),
142
142
  /* @__PURE__ */ k("button", { type: "button", disabled: r, onClick: w, children: [
143
- i && /* @__PURE__ */ f(Ga, {}),
144
- !i && /* @__PURE__ */ f(Va, {})
143
+ i && /* @__PURE__ */ f(Va, {}),
144
+ !i && /* @__PURE__ */ f(Ua, {})
145
145
  ] }),
146
146
  /* @__PURE__ */ f("p", { children: m }),
147
147
  /* @__PURE__ */ f(
148
- Qa,
148
+ es,
149
149
  {
150
150
  value: s,
151
151
  onChange: H,
@@ -156,22 +156,22 @@ function es(e) {
156
156
  /* @__PURE__ */ f("p", { children: g })
157
157
  ] });
158
158
  }
159
- const Rr = Fe({});
159
+ const Rr = Se({});
160
160
  function bc(e) {
161
161
  const { children: t, fieldErrors: n, form: r } = e;
162
162
  return /* @__PURE__ */ k(Rr.Provider, { value: { fieldErrors: n }, children: [
163
163
  !r && t,
164
- r && Da(r, r.props, t)
164
+ r && $a(r, r.props, t)
165
165
  ] });
166
166
  }
167
- function be() {
168
- return Ae(Rr);
167
+ function xe() {
168
+ return Re(Rr);
169
169
  }
170
- function xe(e) {
170
+ function Ee(e) {
171
171
  const { children: t, className: n, ...r } = e, a = `arkynFieldError ${n}`;
172
- return t ? /* @__PURE__ */ f("strong", { className: a.trim(), ...r, children: t }) : /* @__PURE__ */ f(ke, {});
172
+ return t ? /* @__PURE__ */ f("strong", { className: a.trim(), ...r, children: t }) : /* @__PURE__ */ f(Ce, {});
173
173
  }
174
- function pe(e) {
174
+ function ye(e) {
175
175
  const {
176
176
  showAsterisk: t = !1,
177
177
  className: n = "",
@@ -179,7 +179,7 @@ function pe(e) {
179
179
  } = e, s = `arkynFieldLabel ${t ? "asteriskTrue" : "asteriskFalse"} ${n}`;
180
180
  return /* @__PURE__ */ f("label", { className: s.trim(), ...r });
181
181
  }
182
- function ye(e) {
182
+ function ve(e) {
183
183
  const {
184
184
  children: t,
185
185
  className: n,
@@ -190,9 +190,9 @@ function ye(e) {
190
190
  }
191
191
  function K(e) {
192
192
  const { iconSize: t, icon: n, className: r, show: a = !0 } = e;
193
- return a ? n ? typeof n == "string" ? /* @__PURE__ */ f("p", { className: r, children: n }) : /* @__PURE__ */ f("p", { className: r, children: /* @__PURE__ */ f(n, { size: t, strokeWidth: 2.5 }) }) : /* @__PURE__ */ f(ke, {}) : /* @__PURE__ */ f(ke, {});
193
+ return a ? n ? typeof n == "string" ? /* @__PURE__ */ f("p", { className: r, children: n }) : /* @__PURE__ */ f("p", { className: r, children: /* @__PURE__ */ f(n, { size: t, strokeWidth: 2.5 }) }) : /* @__PURE__ */ f(Ce, {}) : /* @__PURE__ */ f(Ce, {});
194
194
  }
195
- function at(e) {
195
+ function st(e) {
196
196
  const {
197
197
  isLoading: t = !1,
198
198
  scheme: n = "primary",
@@ -208,7 +208,7 @@ function at(e) {
208
208
  } = e, h = { xs: 12, sm: 16, md: 20, lg: 24 }[s], y = `arkynButton ${t ? "loadingTrue" : "loadingFalse"} ${r} ${n} ${s} ${a ? "loadingTextTrue" : "loadingTextFalse"} ${l}`;
209
209
  return /* @__PURE__ */ k("button", { className: y, disabled: c || t, ...d, children: [
210
210
  /* @__PURE__ */ k("div", { className: "arkynButtonSpinner", children: [
211
- /* @__PURE__ */ f(Oe, { size: h, strokeWidth: 2.5 }),
211
+ /* @__PURE__ */ f(Ae, { size: h, strokeWidth: 2.5 }),
212
212
  a && a
213
213
  ] }),
214
214
  /* @__PURE__ */ k("div", { className: "arkynButtonContent", children: [
@@ -244,7 +244,7 @@ function kn(e) {
244
244
  className: d.trim(),
245
245
  ...c,
246
246
  children: [
247
- /* @__PURE__ */ f("div", { className: "arkynIconButtonSpinner", children: /* @__PURE__ */ f(Oe, { size: l[a], strokeWidth: 2.5 }) }),
247
+ /* @__PURE__ */ f("div", { className: "arkynIconButtonSpinner", children: /* @__PURE__ */ f(Ae, { size: l[a], strokeWidth: 2.5 }) }),
248
248
  /* @__PURE__ */ f("div", { className: "arkynIconButtonContent", children: /* @__PURE__ */ f(s, { size: l[a], strokeWidth: 2.5 }) })
249
249
  ]
250
250
  }
@@ -258,15 +258,15 @@ function Cn(e) {
258
258
  orientation: a = "top",
259
259
  className: s = "",
260
260
  ...o
261
- } = e, i = Ie(), c = oe(null), [l, u] = F(a);
262
- Ce(() => {
261
+ } = e, i = Me(), c = ie(null), [l, u] = S(a);
262
+ be(() => {
263
263
  const _ = () => {
264
264
  if (!c.current) return;
265
265
  const g = document.getElementById(i);
266
266
  g && (u(a), requestAnimationFrame(() => {
267
- const y = g.getBoundingClientRect(), C = window.innerWidth, x = window.innerHeight;
267
+ const y = g.getBoundingClientRect(), C = window.innerWidth, E = window.innerHeight;
268
268
  let v = a;
269
- a === "left" && y.left < 0 ? v = "right" : a === "right" && y.right > C ? v = "left" : a === "top" && y.top < 0 ? v = "bottom" : a === "bottom" && y.bottom > x && (v = "top"), v === "right" && y.right > C ? v = "left" : v === "left" && y.left < 0 ? v = "right" : v === "bottom" && y.bottom > x ? v = "top" : v === "top" && y.top < 0 && (v = "bottom"), u(v);
269
+ a === "left" && y.left < 0 ? v = "right" : a === "right" && y.right > C ? v = "left" : a === "top" && y.top < 0 ? v = "bottom" : a === "bottom" && y.bottom > E && (v = "top"), v === "right" && y.right > C ? v = "left" : v === "left" && y.left < 0 ? v = "right" : v === "bottom" && y.bottom > E ? v = "top" : v === "top" && y.top < 0 && (v = "bottom"), u(v);
270
270
  }));
271
271
  }, h = c.current;
272
272
  if (!h) return;
@@ -290,7 +290,7 @@ function Cn(e) {
290
290
  )
291
291
  ] });
292
292
  }
293
- function ts(e) {
293
+ function ns(e) {
294
294
  const {
295
295
  filePath: t,
296
296
  disabled: n,
@@ -310,7 +310,7 @@ function ts(e) {
310
310
  }, l.click();
311
311
  }
312
312
  return /* @__PURE__ */ k("div", { className: "arkynAudioUploadHasFileContentContainer", children: [
313
- /* @__PURE__ */ f(es, { src: t }),
313
+ /* @__PURE__ */ f(ts, { src: t }),
314
314
  /* @__PURE__ */ f(vn, {}),
315
315
  /* @__PURE__ */ k("div", { className: "arkynAudioUploadButtonsContainer", children: [
316
316
  !!o && /* @__PURE__ */ f(Cn, { orientation: "bottom", text: "Reenviar áudio", children: /* @__PURE__ */ f(
@@ -328,7 +328,7 @@ function ts(e) {
328
328
  }
329
329
  ) }),
330
330
  /* @__PURE__ */ f(
331
- at,
331
+ st,
332
332
  {
333
333
  isLoading: s,
334
334
  onClick: c,
@@ -342,7 +342,7 @@ function ts(e) {
342
342
  ] })
343
343
  ] });
344
344
  }
345
- function ns(e) {
345
+ function rs(e) {
346
346
  const {
347
347
  dropAudioText: t,
348
348
  isLoading: n,
@@ -368,7 +368,7 @@ function ns(e) {
368
368
  }
369
369
  return /* @__PURE__ */ k("div", { onDrop: i, className: "arkynAudioUploadNoFileContent", children: [
370
370
  /* @__PURE__ */ f(
371
- at,
371
+ st,
372
372
  {
373
373
  isLoading: n,
374
374
  onClick: c,
@@ -398,56 +398,56 @@ function xc(e) {
398
398
  defaultValue: _ = "",
399
399
  showAsterisk: h = !1,
400
400
  disabled: m = !1
401
- } = e, { fieldErrors: g } = be(), y = g == null ? void 0 : g[t], [C, x] = F(_), [v, w] = F(""), [H, L] = F(null), [T, G] = F(_), [S, b] = F(!1);
402
- async function O(I) {
401
+ } = e, { fieldErrors: g } = xe(), y = g == null ? void 0 : g[t], [C, E] = S(_), [v, w] = S(""), [H, D] = S(null), [T, j] = S(_), [A, b] = S(!1);
402
+ async function O(N) {
403
403
  if (m) return;
404
- b(!0), L(I), w("");
405
- const Z = new FormData();
406
- Z.append(r, I), await fetch(d, { method: a, body: Z }).then(async (E) => await E.json()).then((E) => {
407
- E != null && E.error ? w(E.error) : x(E == null ? void 0 : E[o]), s && s(E == null ? void 0 : E[o]);
408
- }).catch((E) => {
409
- console.error(E), w("Erro ao enviar audio");
404
+ b(!0), D(N), w("");
405
+ const Y = new FormData();
406
+ Y.append(r, N), await fetch(d, { method: a, body: Y }).then(async (x) => await x.json()).then((x) => {
407
+ x != null && x.error ? w(x.error) : E(x == null ? void 0 : x[o]), s && s(x == null ? void 0 : x[o]);
408
+ }).catch((x) => {
409
+ console.error(x), w("Erro ao enviar audio");
410
410
  }).finally(() => b(!1));
411
411
  }
412
- function M(I) {
412
+ function $(N) {
413
413
  if (!m) {
414
- if (I.type.indexOf("audio") === -1) {
414
+ if (N.type.indexOf("audio") === -1) {
415
415
  w("O arquivo selecionado não é um arquivo de áudio");
416
416
  return;
417
417
  }
418
- G(URL.createObjectURL(I)), O(I);
418
+ j(URL.createObjectURL(N)), O(N);
419
419
  }
420
420
  }
421
- const P = y || v;
422
- return /* @__PURE__ */ k(ye, { children: [
423
- n && /* @__PURE__ */ f(pe, { showAsterisk: h, children: n }),
424
- /* @__PURE__ */ k("div", { className: `arkynAudioUpload ${P ? "hasError" : "noHasError"} ${T ? "hasAudio" : "noHasAudio"}`, children: [
421
+ const I = y || v;
422
+ return /* @__PURE__ */ k(ve, { children: [
423
+ n && /* @__PURE__ */ f(ye, { showAsterisk: h, children: n }),
424
+ /* @__PURE__ */ k("div", { className: `arkynAudioUpload ${I ? "hasError" : "noHasError"} ${T ? "hasAudio" : "noHasAudio"}`, children: [
425
425
  /* @__PURE__ */ f("input", { type: "hidden", name: t, value: C || "" }),
426
426
  !T && /* @__PURE__ */ f(
427
- ns,
427
+ rs,
428
428
  {
429
429
  disabled: m,
430
- isLoading: S,
430
+ isLoading: A,
431
431
  acceptAudio: u,
432
432
  dropAudioText: c,
433
- handleSelectFile: M,
433
+ handleSelectFile: $,
434
434
  selectAudioButtonText: i
435
435
  }
436
436
  ),
437
437
  T && /* @__PURE__ */ f(
438
- ts,
438
+ ns,
439
439
  {
440
440
  filePath: T,
441
441
  acceptAudio: u,
442
442
  changeAudioButtonText: l,
443
443
  disabled: m,
444
- handleSelectFile: M,
445
- isLoading: S,
446
- reSendAudio: P && H ? () => O(H) : void 0
444
+ handleSelectFile: $,
445
+ isLoading: A,
446
+ reSendAudio: I && H ? () => O(H) : void 0
447
447
  }
448
448
  )
449
449
  ] }),
450
- P && /* @__PURE__ */ f(xe, { children: P })
450
+ I && /* @__PURE__ */ f(Ee, { children: I })
451
451
  ] });
452
452
  }
453
453
  function Ec(e) {
@@ -467,11 +467,11 @@ function Ec(e) {
467
467
  /* @__PURE__ */ f(K, { iconSize: u, icon: s })
468
468
  ] });
469
469
  }
470
- const Mr = Fe({});
471
- function rs() {
472
- return Ae(Mr);
470
+ const Mr = Se({});
471
+ function as() {
472
+ return Re(Mr);
473
473
  }
474
- function as(e) {
474
+ function ss(e) {
475
475
  return /* @__PURE__ */ f(Mr.Provider, { value: e, children: e.children });
476
476
  }
477
477
  function wc(e) {
@@ -482,7 +482,7 @@ function wc(e) {
482
482
  onClick: a,
483
483
  value: s,
484
484
  ...o
485
- } = e, { disabled: i, currentTab: c, changeCurrentTab: l } = rs(), u = i || n, h = `arkynCardTabButton ${u ? "isDisabled" : ""} ${c === s && s ? "isActive" : ""} ${r}`;
485
+ } = e, { disabled: i, currentTab: c, changeCurrentTab: l } = as(), u = i || n, h = `arkynCardTabButton ${u ? "isDisabled" : ""} ${c === s && s ? "isActive" : ""} ${r}`;
486
486
  function m(g) {
487
487
  l(s), a && a(g);
488
488
  }
@@ -506,12 +506,12 @@ function Nc(e) {
506
506
  disabled: a = !1,
507
507
  className: s,
508
508
  ...o
509
- } = e, [i, c] = F(r || ""), l = `arkynCardTabContainer ${s || ""}`;
509
+ } = e, [i, c] = S(r || ""), l = `arkynCardTabContainer ${s || ""}`;
510
510
  function u(d) {
511
511
  c(d), n && n(d);
512
512
  }
513
513
  return /* @__PURE__ */ f(
514
- as,
514
+ ss,
515
515
  {
516
516
  disabled: a,
517
517
  currentTab: i,
@@ -534,20 +534,20 @@ function Fc(e) {
534
534
  orientation: u,
535
535
  value: d,
536
536
  ..._
537
- } = e, { fieldErrors: h } = be(), m = oe(null), g = t || Ie(), y = s || (h == null ? void 0 : h[n]), C = !!y, [x, v] = F(o || !1), w = typeof c == "boolean" ? c : x, T = `arkynCheckbox ${a} ${C ? "errorTrue" : "errorFalse"} ${w ? "checkedTrue" : "checkedFalse"} ${r}`;
538
- function G() {
539
- const S = x;
540
- v(!S), l && l(S ? "" : d || "checked");
537
+ } = e, { fieldErrors: h } = xe(), m = ie(null), g = t || Me(), y = s || (h == null ? void 0 : h[n]), C = !!y, [E, v] = S(o || !1), w = typeof c == "boolean" ? c : E, T = `arkynCheckbox ${a} ${C ? "errorTrue" : "errorFalse"} ${w ? "checkedTrue" : "checkedFalse"} ${r}`;
538
+ function j() {
539
+ const A = E;
540
+ v(!A), l && l(A ? "" : d || "checked");
541
541
  }
542
- return /* @__PURE__ */ k(ye, { orientation: u, children: [
543
- i && /* @__PURE__ */ f(pe, { children: i }),
542
+ return /* @__PURE__ */ k(ve, { orientation: u, children: [
543
+ i && /* @__PURE__ */ f(ye, { children: i }),
544
544
  /* @__PURE__ */ k(
545
545
  "button",
546
546
  {
547
547
  id: g,
548
548
  type: "button",
549
549
  className: T,
550
- onClick: G,
550
+ onClick: j,
551
551
  ..._,
552
552
  children: [
553
553
  /* @__PURE__ */ f(
@@ -563,25 +563,25 @@ function Fc(e) {
563
563
  ]
564
564
  }
565
565
  ),
566
- y && /* @__PURE__ */ f(xe, { children: y })
566
+ y && /* @__PURE__ */ f(Ee, { children: y })
567
567
  ] });
568
568
  }
569
- function ss() {
569
+ function os() {
570
570
  return () => {
571
571
  };
572
572
  }
573
- function os() {
574
- return $a(
575
- ss,
573
+ function is() {
574
+ return La(
575
+ os,
576
576
  () => !0,
577
577
  () => !1
578
578
  );
579
579
  }
580
580
  function Sc(e) {
581
581
  const { children: t, fallback: n = null } = e;
582
- return os() ? /* @__PURE__ */ f(ke, { children: t() }) : /* @__PURE__ */ f(ke, { children: n });
582
+ return is() ? /* @__PURE__ */ f(Ce, { children: t() }) : /* @__PURE__ */ f(Ce, { children: n });
583
583
  }
584
- const tn = (e) => e.replace(/[^0-9]/g, ""), nt = [
584
+ const tn = (e) => e.replace(/[^0-9]/g, ""), rt = [
585
585
  {
586
586
  name: "Afghanistan",
587
587
  code: "+93",
@@ -2557,25 +2557,25 @@ const tn = (e) => e.replace(/[^0-9]/g, ""), nt = [
2557
2557
  TRY: { countryLanguage: "tr-TR", countryCurrency: "TRY" },
2558
2558
  IDR: { countryLanguage: "id-ID", countryCurrency: "IDR" },
2559
2559
  THB: { countryLanguage: "th-TH", countryCurrency: "THB" }
2560
- }, is = (e) => e.replace(new RegExp("(?:R\\$|\\p{Sc}|[$€¥£])", "gu"), "").trim(), Un = (e, t, n = { showPrefix: !0 }) => {
2560
+ }, cs = (e) => e.replace(new RegExp("(?:R\\$|\\p{Sc}|[$€¥£])", "gu"), "").trim(), Un = (e, t, n = { showPrefix: !0 }) => {
2561
2561
  if (!Vn[t])
2562
2562
  throw new Error("Unsupported currency code");
2563
2563
  const { countryCurrency: r, countryLanguage: a } = Vn[t], s = new Intl.NumberFormat(a, {
2564
2564
  style: "currency",
2565
2565
  currency: r
2566
2566
  }).format(e);
2567
- return n.showPrefix ? s.replace(/\s/g, " ") : is(s).replace(/\s/g, " ");
2568
- }, cs = {
2567
+ return n.showPrefix ? s.replace(/\s/g, " ") : cs(s).replace(/\s/g, " ");
2568
+ }, ls = {
2569
2569
  NINE: "(99) 99999-9999"
2570
2570
  };
2571
- tn(cs.NINE).length;
2572
- function ls(e) {
2571
+ tn(ls.NINE).length;
2572
+ function Dr(e) {
2573
2573
  let t = e;
2574
2574
  return typeof e == "string" ? (t = +tn(e), t % 1 !== 0 && (t = t.toFixed(2))) : t = Number.isInteger(e) ? Number(e) * 10 ** 2 : e.toFixed(2), +tn(String(t)) / 10 ** 2;
2575
2575
  }
2576
2576
  function Yt(e, t) {
2577
2577
  if (!e) return [0, Un(0, t)];
2578
- const n = ls(e), r = Un(n, t);
2578
+ const n = Dr(e), r = Un(n, t);
2579
2579
  return [n, r];
2580
2580
  }
2581
2581
  function Tc(e) {
@@ -2589,7 +2589,7 @@ function Tc(e) {
2589
2589
  className: i = "",
2590
2590
  value: c,
2591
2591
  defaultValue: l,
2592
- max: u,
2592
+ max: u = 1e9,
2593
2593
  locale: d,
2594
2594
  onChange: _,
2595
2595
  prefix: h,
@@ -2597,98 +2597,107 @@ function Tc(e) {
2597
2597
  isLoading: g = !1,
2598
2598
  leftIcon: y,
2599
2599
  readOnly: C,
2600
- onFocus: x,
2600
+ onFocus: E,
2601
2601
  onBlur: v,
2602
2602
  errorMessage: w,
2603
2603
  showAsterisk: H,
2604
- rightIcon: L,
2604
+ rightIcon: D,
2605
2605
  size: T = "md",
2606
- id: G,
2607
- ...S
2608
- } = e, { fieldErrors: b } = be(), [O, M] = F(!1), [P, j] = F("0"), D = oe(null), B = G || Ie(), I = w || (b == null ? void 0 : b[t]), Z = !!I, E = n || g, te = { md: 20, lg: 20 }[T], J = L ? "right" : "left", ve = J === "left" && g, ce = J === "right" && g;
2609
- function re() {
2610
- E || !(D != null && D.current) || (M(!0), D.current.focus());
2606
+ id: j,
2607
+ ...A
2608
+ } = e, { fieldErrors: b } = xe(), [O, $] = S(!1), [I, z] = S("0"), R = ie(null), B = j || Me(), N = w || (b == null ? void 0 : b[t]), Y = !!N, x = n || g, X = { md: 20, lg: 20 }[T], Z = D ? "right" : "left", he = Z === "left" && g, ce = Z === "right" && g;
2609
+ function se() {
2610
+ x || !(R != null && R.current) || ($(!0), R.current.focus());
2611
2611
  }
2612
- function ae(fe) {
2613
- M(!0), x && x(fe);
2612
+ function te(ue) {
2613
+ $(!0), E && E(ue);
2614
2614
  }
2615
- function $(fe) {
2616
- M(!1), v && v(fe);
2615
+ function L(ue) {
2616
+ $(!1), v && v(ue);
2617
2617
  }
2618
- const X = (fe) => {
2619
- const [De, He] = Yt(
2620
- fe,
2618
+ const ne = (ue) => {
2619
+ const [Le, Ve] = Yt(
2620
+ ue,
2621
2621
  d
2622
2622
  );
2623
- return !u || De <= u ? (j(He), [De, He]) : Yt(fe, d);
2624
- }, Re = (fe) => {
2625
- fe.preventDefault();
2626
- const [De, He] = X(fe.target.value);
2627
- _ && _(fe, String(De), String(He));
2623
+ return !u || Le <= u ? (z(Ve), [Le, Ve]) : Yt(ue, d);
2624
+ }, Te = (ue) => {
2625
+ ue.preventDefault();
2626
+ const [Le, Ve] = ne(ue.target.value);
2627
+ _ && _(ue, String(Le), String(Ve));
2628
2628
  };
2629
- Ce(() => {
2630
- const fe = c || +l || void 0, [, De] = Yt(fe, d);
2631
- j(De);
2629
+ be(() => {
2630
+ const ue = c || +l || void 0, [, Le] = Yt(ue, d);
2631
+ z(Le);
2632
2632
  }, [d, l, c]);
2633
- const qt = `arkynCurrencyInput ${h ? "hasPrefix" : ""} ${m ? "hasSuffix" : ""} ${s} ${T} ${E || C || g ? "opacity" : ""} ${Z ? "errored" : ""} ${O ? "focused" : ""} ${i}`;
2634
- return /* @__PURE__ */ k(ye, { children: [
2635
- o && /* @__PURE__ */ f(pe, { showAsterisk: H, htmlFor: B, children: o }),
2633
+ const qt = `arkynCurrencyInput ${h ? "hasPrefix" : ""} ${m ? "hasSuffix" : ""} ${s} ${T} ${x || C || g ? "opacity" : ""} ${Y ? "errored" : ""} ${O ? "focused" : ""} ${i}`;
2634
+ return /* @__PURE__ */ k(ve, { children: [
2635
+ o && /* @__PURE__ */ f(ye, { showAsterisk: H, htmlFor: B, children: o }),
2636
2636
  /* @__PURE__ */ k(
2637
2637
  "section",
2638
2638
  {
2639
2639
  title: r,
2640
2640
  style: a,
2641
- onClick: re,
2641
+ onClick: se,
2642
2642
  className: qt,
2643
2643
  children: [
2644
- /* @__PURE__ */ f(K, { iconSize: te, icon: h, className: "prefix" }),
2644
+ /* @__PURE__ */ f(K, { iconSize: X, icon: h, className: "prefix" }),
2645
2645
  /* @__PURE__ */ f(
2646
2646
  K,
2647
2647
  {
2648
- show: ve,
2649
- iconSize: te,
2648
+ show: he,
2649
+ iconSize: X,
2650
2650
  className: "spinner",
2651
- icon: Oe
2651
+ icon: Ae
2652
2652
  }
2653
2653
  ),
2654
- /* @__PURE__ */ f(K, { show: !g, icon: y, iconSize: te }),
2654
+ /* @__PURE__ */ f(K, { show: !g, icon: y, iconSize: X }),
2655
2655
  /* @__PURE__ */ f(
2656
2656
  "input",
2657
2657
  {
2658
- value: P,
2659
- disabled: E,
2658
+ disabled: x,
2660
2659
  readOnly: C,
2661
- ref: D,
2662
- onFocus: ae,
2663
- onBlur: $,
2664
- onChange: Re,
2660
+ ref: R,
2661
+ onFocus: te,
2662
+ onBlur: L,
2663
+ onChange: Te,
2665
2664
  id: B,
2665
+ placeholder: x ? I : void 0,
2666
+ value: x ? void 0 : I,
2667
+ ...A
2668
+ }
2669
+ ),
2670
+ /* @__PURE__ */ f(
2671
+ "input",
2672
+ {
2673
+ type: "hidden",
2666
2674
  name: t,
2667
- ...S
2675
+ value: Dr(I),
2676
+ readOnly: !0
2668
2677
  }
2669
2678
  ),
2670
- /* @__PURE__ */ f(K, { show: !g, icon: L, iconSize: te }),
2679
+ /* @__PURE__ */ f(K, { show: !g, icon: D, iconSize: X }),
2671
2680
  /* @__PURE__ */ f(
2672
2681
  K,
2673
2682
  {
2674
2683
  show: ce,
2675
- iconSize: te,
2684
+ iconSize: X,
2676
2685
  className: "spinner",
2677
- icon: Oe
2686
+ icon: Ae
2678
2687
  }
2679
2688
  ),
2680
- /* @__PURE__ */ f(K, { iconSize: te, icon: m, className: "suffix" })
2689
+ /* @__PURE__ */ f(K, { iconSize: X, icon: m, className: "suffix" })
2681
2690
  ]
2682
2691
  }
2683
2692
  ),
2684
- I && /* @__PURE__ */ f(xe, { children: I })
2693
+ N && /* @__PURE__ */ f(Ee, { children: N })
2685
2694
  ] });
2686
2695
  }
2687
2696
  function us() {
2688
2697
  return typeof window > "u" ? 0 : window.innerWidth - document.documentElement.clientWidth;
2689
2698
  }
2690
- function pt(e) {
2691
- Ce(() => {
2699
+ function yt(e) {
2700
+ be(() => {
2692
2701
  if (e) {
2693
2702
  const t = document.body.style.overflow, n = document.body.style.paddingRight, r = us();
2694
2703
  if (r > 0) {
@@ -2701,12 +2710,12 @@ function pt(e) {
2701
2710
  }
2702
2711
  }, [e]);
2703
2712
  }
2704
- const Dr = Fe({});
2713
+ const $r = Se({});
2705
2714
  function fs(e) {
2706
- return /* @__PURE__ */ f(Dr.Provider, { value: { makeInvisible: e.makeInvisible }, children: e.children });
2715
+ return /* @__PURE__ */ f($r.Provider, { value: { makeInvisible: e.makeInvisible }, children: e.children });
2707
2716
  }
2708
2717
  function ds() {
2709
- return Ae(Dr);
2718
+ return Re($r);
2710
2719
  }
2711
2720
  function Oc(e) {
2712
2721
  const {
@@ -2717,11 +2726,11 @@ function Oc(e) {
2717
2726
  className: s,
2718
2727
  ...o
2719
2728
  } = e;
2720
- pt(t);
2729
+ yt(t);
2721
2730
  const i = r === "left" ? "-100%" : "100%", l = `arkynDrawerContainer ${r} ${t ? "visibleTrue" : "visibleFalse"} ${s}`;
2722
2731
  return /* @__PURE__ */ f(fs, { makeInvisible: n, children: /* @__PURE__ */ f(Pr, { children: t && /* @__PURE__ */ k("aside", { className: l.trim(), ...o, children: [
2723
2732
  /* @__PURE__ */ f(
2724
- ft.div,
2733
+ dt.div,
2725
2734
  {
2726
2735
  className: "arkynDrawerContainerOverlay",
2727
2736
  transition: { duration: 0.15, ease: "easeOut" },
@@ -2732,7 +2741,7 @@ function Oc(e) {
2732
2741
  }
2733
2742
  ),
2734
2743
  /* @__PURE__ */ f(
2735
- ft.div,
2744
+ dt.div,
2736
2745
  {
2737
2746
  className: "arkynDrawerContainerContent",
2738
2747
  transition: { ease: "easeOut", duration: 0.15 },
@@ -2785,7 +2794,7 @@ function _s(e) {
2785
2794
  }, u.click();
2786
2795
  }
2787
2796
  function l() {
2788
- return n.type.startsWith("image/") ? /* @__PURE__ */ f(Ua, {}) : n.type.startsWith("audio/") ? /* @__PURE__ */ f(qa, {}) : n.type.startsWith("application/zip") ? /* @__PURE__ */ f(Wa, {}) : /* @__PURE__ */ f(Ka, {});
2797
+ return n.type.startsWith("image/") ? /* @__PURE__ */ f(qa, {}) : n.type.startsWith("audio/") ? /* @__PURE__ */ f(Wa, {}) : n.type.startsWith("application/zip") ? /* @__PURE__ */ f(Ka, {}) : /* @__PURE__ */ f(Xa, {});
2789
2798
  }
2790
2799
  return /* @__PURE__ */ k("div", { className: "arkynFileUploadHasFileContent", children: [
2791
2800
  /* @__PURE__ */ k("section", { className: "arkynFileUploadFileContainer", children: [
@@ -2809,7 +2818,7 @@ function _s(e) {
2809
2818
  }
2810
2819
  ) }),
2811
2820
  /* @__PURE__ */ f(
2812
- at,
2821
+ st,
2813
2822
  {
2814
2823
  isLoading: r,
2815
2824
  onClick: c,
@@ -2849,7 +2858,7 @@ function ms(e) {
2849
2858
  }
2850
2859
  return /* @__PURE__ */ k("div", { onDrop: i, className: "arkynFileUploadNoFileContent", children: [
2851
2860
  /* @__PURE__ */ f(
2852
- at,
2861
+ st,
2853
2862
  {
2854
2863
  isLoading: n,
2855
2864
  onClick: c,
@@ -2878,33 +2887,33 @@ function Ac(e) {
2878
2887
  dropFileText: d = "Ou arraste e solte o arquivo aqui",
2879
2888
  onChange: _,
2880
2889
  disabled: h = !1
2881
- } = e, { fieldErrors: m } = be(), g = m == null ? void 0 : m[t], [y, C] = F(""), [x, v] = F(""), [w, H] = F(null), [L, T] = F(!1);
2882
- async function G(j) {
2890
+ } = e, { fieldErrors: m } = xe(), g = m == null ? void 0 : m[t], [y, C] = S(""), [E, v] = S(""), [w, H] = S(null), [D, T] = S(!1);
2891
+ async function j(z) {
2883
2892
  if (h) return;
2884
- T(!0), H(j), v("");
2885
- const D = new FormData();
2886
- D.append(s, j), await fetch(a, { method: o, body: D }).then(async (B) => await B.json()).then((B) => {
2893
+ T(!0), H(z), v("");
2894
+ const R = new FormData();
2895
+ R.append(s, z), await fetch(a, { method: o, body: R }).then(async (B) => await B.json()).then((B) => {
2887
2896
  B != null && B.error ? v(B.error) : C(B == null ? void 0 : B[c]), _ && _(B == null ? void 0 : B[c]);
2888
2897
  }).catch((B) => {
2889
2898
  console.error(B), v("Erro ao enviar o arquivo");
2890
2899
  }).finally(() => T(!1));
2891
2900
  }
2892
- function S(j) {
2893
- h || G(j);
2901
+ function A(z) {
2902
+ h || j(z);
2894
2903
  }
2895
- const b = g || x;
2896
- return /* @__PURE__ */ k(ye, { children: [
2897
- n && /* @__PURE__ */ f(pe, { showAsterisk: r, children: n }),
2904
+ const b = g || E;
2905
+ return /* @__PURE__ */ k(ve, { children: [
2906
+ n && /* @__PURE__ */ f(ye, { showAsterisk: r, children: n }),
2898
2907
  /* @__PURE__ */ k("div", { className: `arkynFileUpload ${b ? "hasError" : "noHasError"} ${w ? "hasFile" : "noHasFile"}`, children: [
2899
2908
  /* @__PURE__ */ f("input", { type: "hidden", name: t, value: y || "" }),
2900
2909
  !w && /* @__PURE__ */ f(
2901
2910
  ms,
2902
2911
  {
2903
2912
  disabled: h,
2904
- isLoading: L,
2913
+ isLoading: D,
2905
2914
  acceptFile: i,
2906
2915
  dropFileText: d,
2907
- handleSelectFile: S,
2916
+ handleSelectFile: A,
2908
2917
  selectFileButtonText: u
2909
2918
  }
2910
2919
  ),
@@ -2912,16 +2921,16 @@ function Ac(e) {
2912
2921
  _s,
2913
2922
  {
2914
2923
  disabled: h,
2915
- isLoading: L,
2924
+ isLoading: D,
2916
2925
  acceptFile: i,
2917
2926
  file: w,
2918
- handleSelectFile: S,
2927
+ handleSelectFile: A,
2919
2928
  changeFileButtonText: l,
2920
- reSendFile: b && w ? () => G(w) : void 0
2929
+ reSendFile: b && w ? () => j(w) : void 0
2921
2930
  }
2922
2931
  )
2923
2932
  ] }),
2924
- b && /* @__PURE__ */ f(xe, { children: b })
2933
+ b && /* @__PURE__ */ f(Ee, { children: b })
2925
2934
  ] });
2926
2935
  }
2927
2936
  function gs(e) {
@@ -2964,7 +2973,7 @@ function gs(e) {
2964
2973
  }
2965
2974
  ) }),
2966
2975
  /* @__PURE__ */ f(
2967
- at,
2976
+ st,
2968
2977
  {
2969
2978
  isLoading: r,
2970
2979
  onClick: c,
@@ -3005,7 +3014,7 @@ function hs(e) {
3005
3014
  }
3006
3015
  return /* @__PURE__ */ k("div", { onDrop: i, className: "arkynImageUploadNoFileContent", children: [
3007
3016
  /* @__PURE__ */ f(
3008
- at,
3017
+ st,
3009
3018
  {
3010
3019
  isLoading: n,
3011
3020
  onClick: c,
@@ -3035,33 +3044,33 @@ function Ic(e) {
3035
3044
  dropImageText: _ = "Ou arraste e solte a imagem aqui",
3036
3045
  onChange: h,
3037
3046
  disabled: m = !1
3038
- } = e, { fieldErrors: g } = be(), y = g == null ? void 0 : g[t], [C, x] = F(n), [v, w] = F(""), [H, L] = F(null), [T, G] = F(n), [S, b] = F(!1);
3039
- async function O(I) {
3047
+ } = e, { fieldErrors: g } = xe(), y = g == null ? void 0 : g[t], [C, E] = S(n), [v, w] = S(""), [H, D] = S(null), [T, j] = S(n), [A, b] = S(!1);
3048
+ async function O(N) {
3040
3049
  if (m) return;
3041
- b(!0), L(I), w("");
3042
- const Z = new FormData();
3043
- Z.append(o, I), await fetch(s, { method: i, body: Z }).then(async (E) => await E.json()).then((E) => {
3044
- E != null && E.error ? w(E.error) : x(E == null ? void 0 : E[l]), h && h(E == null ? void 0 : E[l]);
3045
- }).catch((E) => {
3046
- console.error(E), w("Erro ao enviar imagem");
3050
+ b(!0), D(N), w("");
3051
+ const Y = new FormData();
3052
+ Y.append(o, N), await fetch(s, { method: i, body: Y }).then(async (x) => await x.json()).then((x) => {
3053
+ x != null && x.error ? w(x.error) : E(x == null ? void 0 : x[l]), h && h(x == null ? void 0 : x[l]);
3054
+ }).catch((x) => {
3055
+ console.error(x), w("Erro ao enviar imagem");
3047
3056
  }).finally(() => b(!1));
3048
3057
  }
3049
- function M(I) {
3050
- m || (G(URL.createObjectURL(I)), O(I));
3058
+ function $(N) {
3059
+ m || (j(URL.createObjectURL(N)), O(N));
3051
3060
  }
3052
- const P = y || v;
3053
- return /* @__PURE__ */ k(ye, { children: [
3054
- r && /* @__PURE__ */ f(pe, { showAsterisk: a, children: r }),
3055
- /* @__PURE__ */ k("div", { className: `arkynImageUpload ${P ? "hasError" : "noHasError"} ${T ? "hasImage" : "noHasImage"}`, children: [
3061
+ const I = y || v;
3062
+ return /* @__PURE__ */ k(ve, { children: [
3063
+ r && /* @__PURE__ */ f(ye, { showAsterisk: a, children: r }),
3064
+ /* @__PURE__ */ k("div", { className: `arkynImageUpload ${I ? "hasError" : "noHasError"} ${T ? "hasImage" : "noHasImage"}`, children: [
3056
3065
  /* @__PURE__ */ f("input", { type: "hidden", name: t, value: C || "" }),
3057
3066
  !T && /* @__PURE__ */ f(
3058
3067
  hs,
3059
3068
  {
3060
3069
  disabled: m,
3061
- isLoading: S,
3070
+ isLoading: A,
3062
3071
  acceptImage: c,
3063
3072
  dropImageText: _,
3064
- handleSelectFile: M,
3073
+ handleSelectFile: $,
3065
3074
  selectImageButtonText: d
3066
3075
  }
3067
3076
  ),
@@ -3069,16 +3078,16 @@ function Ic(e) {
3069
3078
  gs,
3070
3079
  {
3071
3080
  disabled: m,
3072
- isLoading: S,
3081
+ isLoading: A,
3073
3082
  acceptImage: c,
3074
3083
  filePath: T,
3075
- handleSelectFile: M,
3084
+ handleSelectFile: $,
3076
3085
  changeImageButtonText: u,
3077
- reSendImage: P && H ? () => O(H) : void 0
3086
+ reSendImage: I && H ? () => O(H) : void 0
3078
3087
  }
3079
3088
  )
3080
3089
  ] }),
3081
- P && /* @__PURE__ */ f(xe, { children: P })
3090
+ I && /* @__PURE__ */ f(Ee, { children: I })
3082
3091
  ] });
3083
3092
  }
3084
3093
  function ps(e) {
@@ -3100,82 +3109,86 @@ function ps(e) {
3100
3109
  errorMessage: g,
3101
3110
  showAsterisk: y,
3102
3111
  rightIcon: C,
3103
- type: x = "text",
3112
+ type: E = "text",
3104
3113
  size: v = "md",
3105
3114
  id: w,
3106
- ...H
3107
- } = e, { fieldErrors: L } = be(), [T, G] = F(!1), S = oe(null), b = w || Ie(), O = g || (L == null ? void 0 : L[t]), M = !!O, P = n || u, D = { md: 20, lg: 20 }[v], B = C ? "right" : "left", I = B === "left" && u, Z = B === "right" && u;
3108
- function E() {
3109
- P || !(S != null && S.current) || (G(!0), S.current.focus());
3115
+ value: H,
3116
+ placeholder: D,
3117
+ ...T
3118
+ } = e, { fieldErrors: j } = xe(), [A, b] = S(!1), O = ie(null), $ = w || Me(), I = g || (j == null ? void 0 : j[t]), z = !!I, R = n || u, N = { md: 20, lg: 20 }[v], Y = C ? "right" : "left", x = Y === "left" && u, _e = Y === "right" && u;
3119
+ function X() {
3120
+ R || !(O != null && O.current) || (b(!0), O.current.focus());
3110
3121
  }
3111
- function ie(X) {
3112
- G(!0), h && h(X);
3122
+ function Z(ke) {
3123
+ b(!0), h && h(ke);
3113
3124
  }
3114
- function te(X) {
3115
- G(!1), m && m(X);
3125
+ function he(ke) {
3126
+ b(!1), m && m(ke);
3116
3127
  }
3117
- if (x === "hidden")
3128
+ if (E === "hidden")
3118
3129
  return /* @__PURE__ */ f(
3119
3130
  "input",
3120
3131
  {
3121
3132
  style: { display: "none" },
3122
3133
  readOnly: !0,
3123
3134
  type: "text",
3124
- ref: S,
3125
- ...H
3135
+ ref: O,
3136
+ ...T
3126
3137
  }
3127
3138
  );
3128
- const $ = `arkynInput ${c ? "hasPrefix" : ""} ${l ? "hasSuffix" : ""} ${s} ${v} ${P || _ || u ? "opacity" : ""} ${M ? "errored" : ""} ${T ? "focused" : ""} ${i}`;
3129
- return /* @__PURE__ */ k(ye, { children: [
3130
- o && /* @__PURE__ */ f(pe, { showAsterisk: y, htmlFor: b, children: o }),
3139
+ const De = `arkynInput ${c ? "hasPrefix" : ""} ${n ? "disabled" : ""} ${l ? "hasSuffix" : ""} ${s} ${v} ${R || _ || u ? "opacity" : ""} ${z ? "errored" : ""} ${A ? "focused" : ""} ${i}`;
3140
+ return /* @__PURE__ */ k(ve, { children: [
3141
+ o && /* @__PURE__ */ f(ye, { showAsterisk: y, htmlFor: $, children: o }),
3131
3142
  /* @__PURE__ */ k(
3132
3143
  "section",
3133
3144
  {
3134
3145
  title: r,
3135
3146
  style: a,
3136
- onClick: E,
3137
- className: $,
3147
+ onClick: X,
3148
+ className: De,
3138
3149
  children: [
3139
- /* @__PURE__ */ f(K, { iconSize: D, icon: c, className: "prefix" }),
3150
+ /* @__PURE__ */ f(K, { iconSize: N, icon: c, className: "prefix" }),
3140
3151
  /* @__PURE__ */ f(
3141
3152
  K,
3142
3153
  {
3143
- show: I,
3144
- iconSize: D,
3154
+ show: x,
3155
+ iconSize: N,
3145
3156
  className: "spinner",
3146
- icon: Oe
3157
+ icon: Ae
3147
3158
  }
3148
3159
  ),
3149
- /* @__PURE__ */ f(K, { show: !u, icon: d, iconSize: D }),
3160
+ /* @__PURE__ */ f(K, { show: !u, icon: d, iconSize: N }),
3150
3161
  /* @__PURE__ */ f(
3151
3162
  "input",
3152
3163
  {
3153
- disabled: P,
3164
+ disabled: R,
3154
3165
  readOnly: _,
3155
- ref: S,
3156
- onFocus: ie,
3157
- onBlur: te,
3158
- type: x,
3159
- id: b,
3166
+ ref: O,
3167
+ onFocus: Z,
3168
+ onBlur: he,
3169
+ type: E,
3170
+ id: $,
3160
3171
  name: t,
3161
- ...H
3172
+ placeholder: R && H || D,
3173
+ value: R ? void 0 : H,
3174
+ ...T
3162
3175
  }
3163
3176
  ),
3164
- /* @__PURE__ */ f(K, { show: !u, icon: C, iconSize: D }),
3177
+ /* @__PURE__ */ f(K, { show: !u, icon: C, iconSize: N }),
3165
3178
  /* @__PURE__ */ f(
3166
3179
  K,
3167
3180
  {
3168
- show: Z,
3169
- iconSize: D,
3181
+ show: _e,
3182
+ iconSize: N,
3170
3183
  className: "spinner",
3171
- icon: Oe
3184
+ icon: Ae
3172
3185
  }
3173
3186
  ),
3174
- /* @__PURE__ */ f(K, { iconSize: D, icon: l, className: "suffix" })
3187
+ /* @__PURE__ */ f(K, { iconSize: N, icon: l, className: "suffix" })
3175
3188
  ]
3176
3189
  }
3177
3190
  ),
3178
- O && /* @__PURE__ */ f(xe, { children: O })
3191
+ I && /* @__PURE__ */ f(Ee, { children: I })
3179
3192
  ] });
3180
3193
  }
3181
3194
  const ys = gn((e, t) => /* @__PURE__ */ f("input", { ref: t, ...e }));
@@ -3198,46 +3211,48 @@ function Rc(e) {
3198
3211
  leftIcon: g,
3199
3212
  readOnly: y,
3200
3213
  onFocus: C,
3201
- onBlur: x,
3214
+ onBlur: E,
3202
3215
  errorMessage: v,
3203
3216
  defaultValue: w,
3204
3217
  showAsterisk: H,
3205
- rightIcon: L,
3218
+ rightIcon: D,
3206
3219
  size: T = "md",
3207
- id: G,
3208
- ...S
3209
- } = e, { fieldErrors: b } = be(), [O, M] = F(!1), P = oe(null), j = G || Ie(), D = v || (b == null ? void 0 : b[t]), B = !!D, I = n || m, E = { md: 20, lg: 20 }[T], ie = L ? "right" : "left", te = ie === "left" && m, J = ie === "right" && m;
3210
- function ve() {
3211
- I || !(P != null && P.current) || (M(!0), P.current.focus());
3212
- }
3213
- function ce(z) {
3214
- M(!0), C && C(z);
3215
- }
3216
- function re(z) {
3217
- M(!1), x && x(z);
3218
- }
3219
- const Me = `arkynMaskedInput ${_ ? "hasPrefix" : ""} ${h ? "hasSuffix" : ""} ${s} ${T} ${I || y || m ? "opacity" : ""} ${B ? "errored" : ""} ${O ? "focused" : ""} ${d}`;
3220
- return /* @__PURE__ */ k(ye, { children: [
3221
- u && /* @__PURE__ */ f(pe, { showAsterisk: H, htmlFor: j, children: u }),
3220
+ id: j,
3221
+ value: A,
3222
+ placeholder: b,
3223
+ ...O
3224
+ } = e, { fieldErrors: $ } = xe(), [I, z] = S(!1), R = ie(null), B = j || Me(), N = v || ($ == null ? void 0 : $[t]), Y = !!N, x = n || m, X = { md: 20, lg: 20 }[T], Z = D ? "right" : "left", he = Z === "left" && m, ce = Z === "right" && m;
3225
+ function se() {
3226
+ x || !(R != null && R.current) || (z(!0), R.current.focus());
3227
+ }
3228
+ function te($e) {
3229
+ z(!0), C && C($e);
3230
+ }
3231
+ function L($e) {
3232
+ z(!1), E && E($e);
3233
+ }
3234
+ const re = `arkynMaskedInput ${_ ? "hasPrefix" : ""} ${h ? "hasSuffix" : ""} ${s} ${T} ${x || y || m ? "opacity" : ""} ${Y ? "errored" : ""} ${I ? "focused" : ""} ${d}`;
3235
+ return /* @__PURE__ */ k(ve, { children: [
3236
+ u && /* @__PURE__ */ f(ye, { showAsterisk: H, htmlFor: B, children: u }),
3222
3237
  /* @__PURE__ */ k(
3223
3238
  "section",
3224
3239
  {
3225
3240
  title: r,
3226
3241
  style: a,
3227
- onClick: ve,
3228
- className: Me,
3242
+ onClick: se,
3243
+ className: re,
3229
3244
  children: [
3230
- /* @__PURE__ */ f(K, { iconSize: E, icon: _, className: "prefix" }),
3245
+ /* @__PURE__ */ f(K, { iconSize: X, icon: _, className: "prefix" }),
3231
3246
  /* @__PURE__ */ f(
3232
3247
  K,
3233
3248
  {
3234
- show: te,
3235
- iconSize: E,
3249
+ show: he,
3250
+ iconSize: X,
3236
3251
  className: "spinner",
3237
- icon: Oe
3252
+ icon: Ae
3238
3253
  }
3239
3254
  ),
3240
- /* @__PURE__ */ f(K, { show: !m, icon: g, iconSize: E }),
3255
+ /* @__PURE__ */ f(K, { show: !m, icon: g, iconSize: X }),
3241
3256
  /* @__PURE__ */ f(
3242
3257
  Ar,
3243
3258
  {
@@ -3246,39 +3261,41 @@ function Rc(e) {
3246
3261
  replacement: l,
3247
3262
  separate: o,
3248
3263
  showMask: c,
3249
- ref: P,
3250
- onFocus: ce,
3251
- onBlur: re,
3252
- disabled: I,
3264
+ ref: R,
3265
+ onFocus: te,
3266
+ onBlur: L,
3267
+ disabled: x,
3253
3268
  readOnly: y,
3254
- id: j,
3269
+ id: B,
3255
3270
  name: t,
3256
- ...S
3271
+ placeholder: x && A || b,
3272
+ value: x ? void 0 : A,
3273
+ ...O
3257
3274
  }
3258
3275
  ),
3259
- /* @__PURE__ */ f(K, { show: !m, icon: L, iconSize: E }),
3276
+ /* @__PURE__ */ f(K, { show: !m, icon: D, iconSize: X }),
3260
3277
  /* @__PURE__ */ f(
3261
3278
  K,
3262
3279
  {
3263
- show: J,
3264
- iconSize: E,
3280
+ show: ce,
3281
+ iconSize: X,
3265
3282
  className: "spinner",
3266
- icon: Oe
3283
+ icon: Ae
3267
3284
  }
3268
3285
  ),
3269
- /* @__PURE__ */ f(K, { iconSize: E, icon: h, className: "suffix" })
3286
+ /* @__PURE__ */ f(K, { iconSize: X, icon: h, className: "suffix" })
3270
3287
  ]
3271
3288
  }
3272
3289
  ),
3273
- D && /* @__PURE__ */ f(xe, { children: D })
3290
+ N && /* @__PURE__ */ f(Ee, { children: N })
3274
3291
  ] });
3275
3292
  }
3276
- const $r = Fe({});
3293
+ const Lr = Se({});
3277
3294
  function vs(e) {
3278
- return /* @__PURE__ */ f($r.Provider, { value: { makeInvisible: e.makeInvisible }, children: e.children });
3295
+ return /* @__PURE__ */ f(Lr.Provider, { value: { makeInvisible: e.makeInvisible }, children: e.children });
3279
3296
  }
3280
3297
  function ks() {
3281
- return Ae($r);
3298
+ return Re(Lr);
3282
3299
  }
3283
3300
  function Mc(e) {
3284
3301
  const {
@@ -3288,11 +3305,11 @@ function Mc(e) {
3288
3305
  className: a = "",
3289
3306
  ...s
3290
3307
  } = e;
3291
- pt(t);
3308
+ yt(t);
3292
3309
  const i = `arkynModalContainer ${t ? "visibleTrue" : "visibleFalse"} ${a}`;
3293
3310
  return /* @__PURE__ */ f(vs, { makeInvisible: n, children: /* @__PURE__ */ f(Pr, { children: t && /* @__PURE__ */ k("aside", { className: i.trim(), ...s, children: [
3294
3311
  /* @__PURE__ */ f(
3295
- ft.div,
3312
+ dt.div,
3296
3313
  {
3297
3314
  className: "arkynModalContainerOverlay",
3298
3315
  transition: { duration: 0.15, ease: "easeOut" },
@@ -3303,7 +3320,7 @@ function Mc(e) {
3303
3320
  }
3304
3321
  ),
3305
3322
  /* @__PURE__ */ f(
3306
- ft.div,
3323
+ dt.div,
3307
3324
  {
3308
3325
  className: "arkynModalContainerContent",
3309
3326
  transition: { duration: 0.15, ease: "easeOut" },
@@ -3342,7 +3359,7 @@ function $c(e) {
3342
3359
  }
3343
3360
  function Cs(e) {
3344
3361
  const { iconSize: t, isLoading: n, disabled: r, readOnly: a, isFocused: s } = e, c = `arkynMultiSelectChevron ${r || a ? "notAnimate" : ""} ${s ? "focused" : ""}`;
3345
- return n ? /* @__PURE__ */ f(ke, {}) : /* @__PURE__ */ f(Or, { className: c, size: t, strokeWidth: 2.5 });
3362
+ return n ? /* @__PURE__ */ f(Ce, {}) : /* @__PURE__ */ f(Or, { className: c, size: t, strokeWidth: 2.5 });
3346
3363
  }
3347
3364
  function bs(e) {
3348
3365
  const {
@@ -3399,8 +3416,8 @@ function ws(e) {
3399
3416
  ] });
3400
3417
  }
3401
3418
  function Ns(e) {
3402
- const { children: t, isFocused: n, isSearchable: r, search: a, onSearch: s } = e, o = oe(null), [i, c] = F("bottom");
3403
- pt(n), Ce(() => {
3419
+ const { children: t, isFocused: n, isSearchable: r, search: a, onSearch: s } = e, o = ie(null), [i, c] = S("bottom");
3420
+ yt(n), be(() => {
3404
3421
  if (!n) return;
3405
3422
  (() => {
3406
3423
  if (!o.current) return;
@@ -3425,7 +3442,7 @@ function Ns(e) {
3425
3442
  type: "search",
3426
3443
  name: "search-select",
3427
3444
  variant: "underline",
3428
- leftIcon: Xa,
3445
+ leftIcon: Ya,
3429
3446
  value: a,
3430
3447
  onChange: l
3431
3448
  }
@@ -3433,22 +3450,22 @@ function Ns(e) {
3433
3450
  t
3434
3451
  ]
3435
3452
  }
3436
- ) : /* @__PURE__ */ f(ke, {});
3453
+ ) : /* @__PURE__ */ f(Ce, {});
3437
3454
  }
3438
3455
  function Fs(e) {
3439
3456
  const { isFocused: t, handleBlur: n } = e;
3440
- return t ? /* @__PURE__ */ f("aside", { className: "arkynMultiSelectOverlay", onClick: n }) : /* @__PURE__ */ f(ke, {});
3457
+ return t ? /* @__PURE__ */ f("aside", { className: "arkynMultiSelectOverlay", onClick: n }) : /* @__PURE__ */ f(Ce, {});
3441
3458
  }
3442
3459
  function Ss(e) {
3443
3460
  const { iconSize: t, isLoading: n } = e;
3444
3461
  return n ? /* @__PURE__ */ f(
3445
- Oe,
3462
+ Ae,
3446
3463
  {
3447
3464
  className: "arkynMultiSelectSpinner",
3448
3465
  size: t,
3449
3466
  strokeWidth: 2.5
3450
3467
  }
3451
- ) : /* @__PURE__ */ f(ke, {});
3468
+ ) : /* @__PURE__ */ f(Ce, {});
3452
3469
  }
3453
3470
  function Lc(e) {
3454
3471
  const {
@@ -3469,51 +3486,51 @@ function Lc(e) {
3469
3486
  leftIcon: g,
3470
3487
  onSearch: y,
3471
3488
  onChange: C,
3472
- onBlur: x,
3489
+ onBlur: E,
3473
3490
  notFoundText: v = "Sem opções disponíveis",
3474
3491
  onFocus: w,
3475
3492
  disabled: H = !1,
3476
- prefix: L,
3493
+ prefix: D,
3477
3494
  size: T = "md",
3478
- value: G,
3479
- variant: S = "solid"
3480
- } = e, { fieldErrors: b } = be(), O = oe(null), M = d || Ie(), P = i || (b == null ? void 0 : b[t]), j = !!P, D = H || c || l, I = { md: 20, lg: 20 }[T], [Z, E] = F(""), [ie, te] = F(!1), [J, ve] = F(o), ce = G || J;
3481
- function re(z) {
3482
- return ce.includes(z);
3495
+ value: j,
3496
+ variant: A = "solid"
3497
+ } = e, { fieldErrors: b } = xe(), O = ie(null), $ = d || Me(), I = i || (b == null ? void 0 : b[t]), z = !!I, R = H || c || l, N = { md: 20, lg: 20 }[T], [Y, x] = S(""), [_e, X] = S(!1), [Z, he] = S(o), ce = j || Z;
3498
+ function se(G) {
3499
+ return ce.includes(G);
3483
3500
  }
3484
- function ae(z) {
3485
- const le = n.find((vt) => vt.value === z);
3486
- return (le == null ? void 0 : le.label) || "";
3501
+ function te(G) {
3502
+ const re = n.find(($e) => $e.value === G);
3503
+ return (re == null ? void 0 : re.label) || "";
3487
3504
  }
3488
- function $() {
3489
- D || !(O != null && O.current) || ie || (te(!0), O.current.focus(), w && w());
3505
+ function L() {
3506
+ R || !(O != null && O.current) || _e || (X(!0), O.current.focus(), w && w());
3490
3507
  }
3491
- function X() {
3492
- te(!1), x && O.current && O.current.blur();
3508
+ function ne() {
3509
+ X(!1), E && O.current && O.current.blur();
3493
3510
  }
3494
- function Re(z) {
3495
- E(z), y && y(z);
3511
+ function Te(G) {
3512
+ x(G), y && y(G);
3496
3513
  }
3497
- function Ze(z) {
3498
- re(z) ? (ve(J.filter((le) => le !== z)), C && C(J.filter((le) => le !== z))) : (ve([...J, z]), C && C([...J, z])), s && X();
3514
+ function De(G) {
3515
+ se(G) ? (he(Z.filter((re) => re !== G)), C && C(Z.filter((re) => re !== G))) : (he([...Z, G]), C && C([...Z, G])), s && ne();
3499
3516
  }
3500
- const Me = n.filter((z) => !!(e.onSearch || !e.isSearchable || z.label.toLowerCase().includes(Z.toLowerCase())));
3501
- return /* @__PURE__ */ k(ye, { children: [
3502
- _ && /* @__PURE__ */ f(pe, { showAsterisk: m, children: _ }),
3517
+ const ke = n.filter((G) => !!(e.onSearch || !e.isSearchable || G.label.toLowerCase().includes(Y.toLowerCase())));
3518
+ return /* @__PURE__ */ k(ve, { children: [
3519
+ _ && /* @__PURE__ */ f(ye, { showAsterisk: m, children: _ }),
3503
3520
  /* @__PURE__ */ k(
3504
3521
  bs,
3505
3522
  {
3506
- handleContainerFocus: $,
3507
- disabled: D,
3508
- isError: j,
3509
- isFocused: ie,
3523
+ handleContainerFocus: L,
3524
+ disabled: R,
3525
+ isError: z,
3526
+ isFocused: _e,
3510
3527
  isLoading: c,
3511
3528
  readOnly: l,
3512
3529
  size: T,
3513
- variant: S,
3530
+ variant: A,
3514
3531
  className: r,
3515
- prefixExists: !!L,
3516
- id: M,
3532
+ prefixExists: !!D,
3533
+ id: $,
3517
3534
  children: [
3518
3535
  /* @__PURE__ */ f(
3519
3536
  "input",
@@ -3524,60 +3541,60 @@ function Lc(e) {
3524
3541
  type: "hidden"
3525
3542
  }
3526
3543
  ),
3527
- /* @__PURE__ */ f(K, { iconSize: I, icon: L, className: "prefix" }),
3528
- g && /* @__PURE__ */ f(g, { size: I, strokeWidth: 2.5 }),
3544
+ /* @__PURE__ */ f(K, { iconSize: N, icon: D, className: "prefix" }),
3545
+ g && /* @__PURE__ */ f(g, { size: N, strokeWidth: 2.5 }),
3529
3546
  /* @__PURE__ */ k(xs, { size: T, children: [
3530
- ce.map((z) => /* @__PURE__ */ f(
3547
+ ce.map((G) => /* @__PURE__ */ f(
3531
3548
  Es,
3532
3549
  {
3533
- label: ae(z),
3534
- value: z,
3535
- handleChangeValue: Ze,
3536
- disabled: D
3550
+ label: te(G),
3551
+ value: G,
3552
+ handleChangeValue: De,
3553
+ disabled: R
3537
3554
  },
3538
- z
3555
+ G
3539
3556
  )),
3540
3557
  ce.length <= 0 && /* @__PURE__ */ f("p", { children: a })
3541
3558
  ] }),
3542
3559
  /* @__PURE__ */ k(
3543
3560
  Ns,
3544
3561
  {
3545
- isFocused: ie,
3562
+ isFocused: _e,
3546
3563
  isSearchable: u,
3547
- search: Z,
3548
- onSearch: Re,
3564
+ search: Y,
3565
+ onSearch: Te,
3549
3566
  children: [
3550
- Me.map(({ label: z, value: le }) => /* @__PURE__ */ f(
3567
+ ke.map(({ label: G, value: re }) => /* @__PURE__ */ f(
3551
3568
  ws,
3552
3569
  {
3553
- label: z,
3554
- value: le,
3570
+ label: G,
3571
+ value: re,
3555
3572
  size: T,
3556
- handleChangeValue: Ze,
3557
- optionHasSelected: re
3573
+ handleChangeValue: De,
3574
+ optionHasSelected: se
3558
3575
  },
3559
- le
3576
+ re
3560
3577
  )),
3561
- Me.length <= 0 && /* @__PURE__ */ f("p", { children: v })
3578
+ ke.length <= 0 && /* @__PURE__ */ f("p", { children: v })
3562
3579
  ]
3563
3580
  }
3564
3581
  ),
3565
3582
  /* @__PURE__ */ f(
3566
3583
  Cs,
3567
3584
  {
3568
- disabled: D,
3569
- isFocused: ie,
3585
+ disabled: R,
3586
+ isFocused: _e,
3570
3587
  readOnly: l,
3571
- iconSize: I,
3588
+ iconSize: N,
3572
3589
  isLoading: c
3573
3590
  }
3574
3591
  ),
3575
- /* @__PURE__ */ f(Ss, { iconSize: I, isLoading: c }),
3576
- /* @__PURE__ */ f(Fs, { handleBlur: X, isFocused: ie })
3592
+ /* @__PURE__ */ f(Ss, { iconSize: N, isLoading: c }),
3593
+ /* @__PURE__ */ f(Fs, { handleBlur: ne, isFocused: _e })
3577
3594
  ]
3578
3595
  }
3579
3596
  ),
3580
- P && /* @__PURE__ */ f(xe, { children: P })
3597
+ I && /* @__PURE__ */ f(Ee, { children: I })
3581
3598
  ] });
3582
3599
  }
3583
3600
  function bn(e) {
@@ -3587,7 +3604,7 @@ const xn = {
3587
3604
  EIGHT: "(99) 9999-9999",
3588
3605
  NINE: "(99) 99999-9999"
3589
3606
  };
3590
- function Lr(e, t) {
3607
+ function jr(e, t) {
3591
3608
  let n = "", r = 0;
3592
3609
  for (let a = 0; a < t.length; a++)
3593
3610
  if (t[a] === "9")
@@ -3601,15 +3618,15 @@ function Lr(e, t) {
3601
3618
  break;
3602
3619
  return n;
3603
3620
  }
3604
- function jr(e) {
3621
+ function Br(e) {
3605
3622
  return e.length > 10 ? "NINE" : "EIGHT";
3606
3623
  }
3607
- const Br = bn(xn.NINE).length;
3624
+ const zr = bn(xn.NINE).length;
3608
3625
  function qn(e, t) {
3609
3626
  if (t.code === "+55") {
3610
3627
  let a = bn(e);
3611
- const s = jr(a);
3612
- return a.length > Br ? void 0 : (a = Lr(a, xn[s]), a);
3628
+ const s = Br(a);
3629
+ return a.length > zr ? void 0 : (a = jr(a, xn[s]), a);
3613
3630
  }
3614
3631
  let r = t.mask;
3615
3632
  if (t.prefix) {
@@ -3621,13 +3638,13 @@ function qn(e, t) {
3621
3638
  return r;
3622
3639
  }
3623
3640
  function Ts(e, t) {
3624
- const n = nt.find(
3641
+ const n = rt.find(
3625
3642
  (r) => r.code === e && r.prefix === t
3626
3643
  );
3627
3644
  return n || null;
3628
3645
  }
3629
3646
  function Os(e) {
3630
- const t = nt.find((n) => n.code === e);
3647
+ const t = rt.find((n) => n.code === e);
3631
3648
  return t || null;
3632
3649
  }
3633
3650
  function Ps(e) {
@@ -3663,7 +3680,7 @@ function As(e) {
3663
3680
  }
3664
3681
  function Is(e) {
3665
3682
  const { isOpen: t, onClick: n } = e;
3666
- return t ? /* @__PURE__ */ f("aside", { className: "arkynPhoneInputCountriesOverlay", onClick: n }) : /* @__PURE__ */ f(ke, {});
3683
+ return t ? /* @__PURE__ */ f("aside", { className: "arkynPhoneInputCountriesOverlay", onClick: n }) : /* @__PURE__ */ f(Ce, {});
3667
3684
  }
3668
3685
  function Rs(e) {
3669
3686
  const { country: t, isActive: n, handleChangeValue: r, size: a } = e, o = `arkynPhoneInputCountryOption ${a} ${n ? "active" : ""}`;
@@ -3676,11 +3693,11 @@ function Rs(e) {
3676
3693
  ] });
3677
3694
  }
3678
3695
  function Ms(e) {
3679
- const { children: t, isOpen: n, onSearch: r, search: a, placeholder: s } = e, o = oe(null), [i, c] = F("bottom");
3696
+ const { children: t, isOpen: n, onSearch: r, search: a, placeholder: s } = e, o = ie(null), [i, c] = S("bottom");
3680
3697
  function l(u) {
3681
3698
  r(u.target.value);
3682
3699
  }
3683
- return pt(n), Ce(() => {
3700
+ return yt(n), be(() => {
3684
3701
  if (!n) return;
3685
3702
  (() => {
3686
3703
  if (!o.current) return;
@@ -3710,7 +3727,7 @@ function Ms(e) {
3710
3727
  t
3711
3728
  ]
3712
3729
  }
3713
- ) : /* @__PURE__ */ f(ke, {});
3730
+ ) : /* @__PURE__ */ f(Ce, {});
3714
3731
  }
3715
3732
  function Ds(e) {
3716
3733
  const { currentCountry: t, onClick: n } = e;
@@ -3738,15 +3755,15 @@ const $s = gn((e, t) => /* @__PURE__ */ f("input", { ref: t, ...e })), Ls = gn(
3738
3755
  value: i,
3739
3756
  currentCountry: c,
3740
3757
  disabled: l
3741
- } = e, [u, d] = F(!1);
3742
- Ce(() => {
3758
+ } = e, [u, d] = S(!1);
3759
+ be(() => {
3743
3760
  u ? o(c.mask) : d(!0);
3744
3761
  }, [c]);
3745
3762
  const _ = `phoneInputMask ${s}`;
3746
3763
  function h(m) {
3747
3764
  let g = bn(m.target.value);
3748
- const y = jr(g);
3749
- g.length > Br || (g = Lr(g, xn[y]), m.target.value = g, o(g));
3765
+ const y = Br(g);
3766
+ g.length > zr || (g = jr(g, xn[y]), m.target.value = g, o(g));
3750
3767
  }
3751
3768
  return c.code === "+55" ? /* @__PURE__ */ f(
3752
3769
  "input",
@@ -3796,120 +3813,120 @@ function jc(e) {
3796
3813
  searchCountryPlaceholder: m = "Pesquisar país",
3797
3814
  notFoundCountryText: g = "Nenhum país encontrado",
3798
3815
  id: y
3799
- } = e, C = Ps(l), [x, v] = F(!1), [w, H] = F(""), [L, T] = F(!1), [G, S] = F(C.formattedNumber || ""), [b, O] = F(() => {
3816
+ } = e, C = Ps(l), [E, v] = S(!1), [w, H] = S(""), [D, T] = S(!1), [j, A] = S(C.formattedNumber || ""), [b, O] = S(() => {
3800
3817
  if (C.country) return C.country;
3801
- const $ = nt.find((X) => X.iso === t);
3802
- return $ || nt[30];
3803
- }), { fieldErrors: M } = be(), P = oe(null), j = y || Ie(), D = s || (M == null ? void 0 : M[_]), B = !!D, I = a || o, Z = oe(null);
3804
- function E() {
3805
- I || x || L || (v(!0), Z.current && Z.current.focus());
3818
+ const L = rt.find((ne) => ne.iso === t);
3819
+ return L || rt[30];
3820
+ }), { fieldErrors: $ } = xe(), I = ie(null), z = y || Me(), R = s || ($ == null ? void 0 : $[_]), B = !!R, N = a || o, Y = ie(null);
3821
+ function x() {
3822
+ N || E || D || (v(!0), Y.current && Y.current.focus());
3806
3823
  }
3807
- function ie() {
3824
+ function _e() {
3808
3825
  T(!0), v(!0);
3809
3826
  }
3810
- function te() {
3827
+ function X() {
3811
3828
  T(!1), v(!1);
3812
3829
  }
3813
- function J() {
3830
+ function Z() {
3814
3831
  v(!0);
3815
3832
  }
3816
- function ve() {
3833
+ function he() {
3817
3834
  v(!1);
3818
3835
  }
3819
- function ce($) {
3820
- return $.name.toLowerCase().includes(w.toLowerCase());
3836
+ function ce(L) {
3837
+ return L.name.toLowerCase().includes(w.toLowerCase());
3821
3838
  }
3822
- function re($) {
3823
- return b.prefix ? $.replace(b.prefix, "").replaceAll(" ", "").replaceAll("-", "").replaceAll("(", "").replaceAll(")", "").trim() : $.replaceAll(" ", "").replaceAll("-", "").replaceAll("(", "").replaceAll(")", "").trim();
3839
+ function se(L) {
3840
+ return b.prefix ? L.replace(b.prefix, "").replaceAll(" ", "").replaceAll("-", "").replaceAll("(", "").replaceAll(")", "").trim() : L.replaceAll(" ", "").replaceAll("-", "").replaceAll("(", "").replaceAll(")", "").trim();
3824
3841
  }
3825
- function ae($) {
3826
- let X = b.code;
3827
- return b.prefix && (X += `-${b.prefix}`), X += " ", X += re($ || G), X;
3842
+ function te(L) {
3843
+ let ne = b.code;
3844
+ return b.prefix && (ne += `-${b.prefix}`), ne += " ", ne += se(L || j), ne;
3828
3845
  }
3829
- return /* @__PURE__ */ k(ye, { children: [
3830
- n && /* @__PURE__ */ f(pe, { showAsterisk: d, children: n }),
3846
+ return /* @__PURE__ */ k(ve, { children: [
3847
+ n && /* @__PURE__ */ f(ye, { showAsterisk: d, children: n }),
3831
3848
  /* @__PURE__ */ k(
3832
3849
  As,
3833
3850
  {
3834
- id: j,
3835
- disabled: I,
3851
+ id: z,
3852
+ disabled: N,
3836
3853
  isError: B,
3837
3854
  isLoading: o,
3838
- isFocused: x,
3855
+ isFocused: E,
3839
3856
  readOnly: i,
3840
3857
  size: c,
3841
3858
  variant: u,
3842
3859
  className: r,
3843
- onFocus: E,
3860
+ onFocus: x,
3844
3861
  children: [
3845
3862
  /* @__PURE__ */ f(
3846
3863
  Ds,
3847
3864
  {
3848
3865
  currentCountry: b,
3849
- onClick: ie,
3866
+ onClick: _e,
3850
3867
  size: c
3851
3868
  }
3852
3869
  ),
3853
3870
  /* @__PURE__ */ k(
3854
3871
  Ms,
3855
3872
  {
3856
- isOpen: I || i ? !1 : L,
3873
+ isOpen: N || i ? !1 : D,
3857
3874
  search: w,
3858
3875
  placeholder: m,
3859
3876
  onSearch: H,
3860
3877
  children: [
3861
- nt.filter(($) => ce($)).map(($) => /* @__PURE__ */ f(
3878
+ rt.filter((L) => ce(L)).map((L) => /* @__PURE__ */ f(
3862
3879
  Rs,
3863
3880
  {
3864
- country: $,
3881
+ country: L,
3865
3882
  handleChangeValue: () => {
3866
- O($), T(!1), S($.mask);
3883
+ O(L), T(!1), A(L.mask);
3867
3884
  },
3868
- isActive: $.iso === b.iso,
3885
+ isActive: L.iso === b.iso,
3869
3886
  size: c
3870
3887
  },
3871
- $.iso
3888
+ L.iso
3872
3889
  )),
3873
- nt.filter(($) => ce($)).length === 0 && /* @__PURE__ */ f("p", { children: g })
3890
+ rt.filter((L) => ce(L)).length === 0 && /* @__PURE__ */ f("p", { children: g })
3874
3891
  ]
3875
3892
  }
3876
3893
  ),
3877
3894
  /* @__PURE__ */ f(
3878
3895
  Is,
3879
3896
  {
3880
- isOpen: I || i ? !1 : L,
3881
- onClick: te
3897
+ isOpen: N || i ? !1 : D,
3898
+ onClick: X
3882
3899
  }
3883
3900
  ),
3884
3901
  /* @__PURE__ */ f(
3885
3902
  Ls,
3886
3903
  {
3887
- ref: Z,
3904
+ ref: Y,
3888
3905
  readonly: i,
3889
3906
  currentCountry: b,
3890
- value: G,
3891
- disabled: I,
3892
- onBlur: ve,
3893
- onFocus: J,
3907
+ value: j,
3908
+ disabled: N,
3909
+ onBlur: he,
3910
+ onFocus: Z,
3894
3911
  size: c,
3895
- onChange: ($) => {
3896
- S($), h && h(ae($));
3912
+ onChange: (L) => {
3913
+ A(L), h && h(te(L));
3897
3914
  }
3898
3915
  }
3899
3916
  ),
3900
3917
  /* @__PURE__ */ f(
3901
3918
  "input",
3902
3919
  {
3903
- ref: P,
3920
+ ref: I,
3904
3921
  type: "hidden",
3905
3922
  name: _,
3906
- value: ae()
3923
+ value: te()
3907
3924
  }
3908
3925
  )
3909
3926
  ]
3910
3927
  }
3911
3928
  ),
3912
- D && /* @__PURE__ */ f(xe, { children: D })
3929
+ R && /* @__PURE__ */ f(Ee, { children: R })
3913
3930
  ] });
3914
3931
  }
3915
3932
  function Bc(e) {
@@ -3919,14 +3936,14 @@ function Bc(e) {
3919
3936
  closeOnClick: r,
3920
3937
  className: a = "",
3921
3938
  orientation: s = "bottomLeft"
3922
- } = e, [o, i] = F(!1), l = `arkynPopover ${s} ${o ? "visibleTrue" : "visibleFalse"} ${a}`;
3939
+ } = e, [o, i] = S(!1), l = `arkynPopover ${s} ${o ? "visibleTrue" : "visibleFalse"} ${a}`;
3923
3940
  function u() {
3924
3941
  o || i(!0);
3925
3942
  }
3926
- return pt(o), /* @__PURE__ */ k("div", { className: l, onClick: u, children: [
3943
+ return yt(o), /* @__PURE__ */ k("div", { className: l, onClick: u, children: [
3927
3944
  n,
3928
3945
  /* @__PURE__ */ f(
3929
- ft.div,
3946
+ dt.div,
3930
3947
  {
3931
3948
  style: { visibility: o ? "visible" : "hidden" },
3932
3949
  transition: { ease: "easeOut", duration: 0 },
@@ -3941,13 +3958,13 @@ function Bc(e) {
3941
3958
  o && /* @__PURE__ */ f("div", { onClick: () => i(!1), className: "arkynPopoverOverlay" })
3942
3959
  ] });
3943
3960
  }
3944
- const zr = Fe({});
3961
+ const Hr = Se({});
3945
3962
  function js(e) {
3946
3963
  const { children: t, size: n, isError: r, handleChange: a, value: s } = e;
3947
- return /* @__PURE__ */ f(zr.Provider, { value: { handleChange: a, value: s, size: n, isError: r }, children: t });
3964
+ return /* @__PURE__ */ f(Hr.Provider, { value: { handleChange: a, value: s, size: n, isError: r }, children: t });
3948
3965
  }
3949
3966
  function Bs() {
3950
- return Ae(zr);
3967
+ return Re(Hr);
3951
3968
  }
3952
3969
  function zc(e) {
3953
3970
  const {
@@ -3984,13 +4001,13 @@ function Hc(e) {
3984
4001
  size: c = "md",
3985
4002
  className: l = "",
3986
4003
  ...u
3987
- } = e, [d, _] = F(t), { fieldErrors: h } = be();
3988
- function m(x) {
3989
- _(x), i && i(x);
4004
+ } = e, [d, _] = S(t), { fieldErrors: h } = xe();
4005
+ function m(E) {
4006
+ _(E), i && i(E);
3990
4007
  }
3991
4008
  const g = s || (h == null ? void 0 : h[n]), y = !!g, C = `arkynRadioGroup ${c} ${l}`;
3992
- return /* @__PURE__ */ k(ye, { children: [
3993
- r && /* @__PURE__ */ f(pe, { showAsterisk: a, children: r }),
4009
+ return /* @__PURE__ */ k(ve, { children: [
4010
+ r && /* @__PURE__ */ f(ye, { showAsterisk: a, children: r }),
3994
4011
  /* @__PURE__ */ k(
3995
4012
  js,
3996
4013
  {
@@ -4013,7 +4030,7 @@ function Hc(e) {
4013
4030
  ]
4014
4031
  }
4015
4032
  ),
4016
- g && /* @__PURE__ */ f(xe, { children: g })
4033
+ g && /* @__PURE__ */ f(Ee, { children: g })
4017
4034
  ] });
4018
4035
  }
4019
4036
  function Gc(e) {
@@ -4030,18 +4047,18 @@ function Gc(e) {
4030
4047
  id: u,
4031
4048
  orientation: d,
4032
4049
  ..._
4033
- } = e, h = oe(null), m = u || Ie(), [g, y] = F(r), C = typeof a == "boolean" ? a : g;
4034
- function x() {
4050
+ } = e, h = ie(null), m = u || Me(), [g, y] = S(r), C = typeof a == "boolean" ? a : g;
4051
+ function E() {
4035
4052
  y(!g), l && l(C ? o : s || "checked");
4036
4053
  }
4037
4054
  const w = `arkynSwitch ${C ? "checkedTrue" : "checkedFalse"} ${n} ${c}`;
4038
- return /* @__PURE__ */ k(ye, { orientation: d, children: [
4039
- t && /* @__PURE__ */ f(pe, { children: t }),
4055
+ return /* @__PURE__ */ k(ve, { orientation: d, children: [
4056
+ t && /* @__PURE__ */ f(ye, { children: t }),
4040
4057
  /* @__PURE__ */ f(
4041
4058
  "button",
4042
4059
  {
4043
4060
  type: "button",
4044
- onClick: x,
4061
+ onClick: E,
4045
4062
  className: w,
4046
4063
  ..._,
4047
4064
  children: /* @__PURE__ */ f(
@@ -4051,7 +4068,7 @@ function Gc(e) {
4051
4068
  type: "hidden",
4052
4069
  name: i,
4053
4070
  ref: h,
4054
- onClick: x,
4071
+ onClick: E,
4055
4072
  value: C ? s || "checked" : o
4056
4073
  }
4057
4074
  )
@@ -4059,12 +4076,12 @@ function Gc(e) {
4059
4076
  )
4060
4077
  ] });
4061
4078
  }
4062
- const Hr = Fe({});
4079
+ const Gr = Se({});
4063
4080
  function zs() {
4064
- return Ae(Hr);
4081
+ return Re(Gr);
4065
4082
  }
4066
4083
  function Hs(e) {
4067
- return /* @__PURE__ */ f(Hr.Provider, { value: e, children: e.children });
4084
+ return /* @__PURE__ */ f(Gr.Provider, { value: e, children: e.children });
4068
4085
  }
4069
4086
  function Vc(e) {
4070
4087
  const {
@@ -4098,7 +4115,7 @@ function Uc(e) {
4098
4115
  disabled: a = !1,
4099
4116
  className: s,
4100
4117
  ...o
4101
- } = e, [i, c] = F(r || ""), l = `arkynTabContainer ${s || ""}`;
4118
+ } = e, [i, c] = S(r || ""), l = `arkynTabContainer ${s || ""}`;
4102
4119
  function u(d) {
4103
4120
  c(d), n && n(d);
4104
4121
  }
@@ -4118,7 +4135,7 @@ function qc(e) {
4118
4135
  className: n,
4119
4136
  children: r,
4120
4137
  ...a
4121
- } = e, s = `arkynTableBody ${n}`, o = La.count(r) === 0;
4138
+ } = e, s = `arkynTableBody ${n}`, o = ja.count(r) === 0;
4122
4139
  return /* @__PURE__ */ f("tbody", { className: s.trim(), ...a, children: o ? /* @__PURE__ */ f("tr", { className: "arkynTableBodyEmptyLine", children: /* @__PURE__ */ f("td", { colSpan: 100, children: /* @__PURE__ */ f("div", { children: t }) }) }) : r });
4123
4140
  }
4124
4141
  function Wc(e) {
@@ -4158,47 +4175,52 @@ function Zc(e) {
4158
4175
  onBlur: d,
4159
4176
  title: _,
4160
4177
  style: h,
4161
- id: m,
4162
- ...g
4163
- } = e, { fieldErrors: y } = be(), [C, x] = F(!1), v = oe(null), w = m || Ie(), H = a || (y == null ? void 0 : y[l]), b = `arkynTextarea ${t} ${n} ${s || o ? "opacityTrue" : "opacityFalse"} ${!!H ? "errorTrue" : "errorFalse"} ${C ? "focusedTrue" : "focusedFalse"} ${r}`;
4164
- function O() {
4165
- s || !(v != null && v.current) || (x(!0), v.current.focus());
4166
- }
4167
- function M(j) {
4168
- x(!0), u && u(j);
4169
- }
4170
- function P(j) {
4171
- x(!1), d && d(j);
4172
- }
4173
- return /* @__PURE__ */ k(ye, { children: [
4174
- i && /* @__PURE__ */ f(pe, { showAsterisk: c, children: i }),
4178
+ value: m,
4179
+ defaultValue: g,
4180
+ placeholder: y,
4181
+ id: C,
4182
+ ...E
4183
+ } = e, { fieldErrors: v } = xe(), [w, H] = S(!1), D = ie(null), T = C || Me(), j = a || (v == null ? void 0 : v[l]), I = `arkynTextarea ${t} ${n} ${s || o ? "opacityTrue" : "opacityFalse"} ${!!j ? "errorTrue" : "errorFalse"} ${w ? "focusedTrue" : "focusedFalse"} ${r}`;
4184
+ function z() {
4185
+ s || !(D != null && D.current) || (H(!0), D.current.focus());
4186
+ }
4187
+ function R(N) {
4188
+ H(!0), u && u(N);
4189
+ }
4190
+ function B(N) {
4191
+ H(!1), d && d(N);
4192
+ }
4193
+ return /* @__PURE__ */ k(ve, { children: [
4194
+ i && /* @__PURE__ */ f(ye, { showAsterisk: c, children: i }),
4175
4195
  /* @__PURE__ */ f(
4176
4196
  "section",
4177
4197
  {
4178
4198
  title: _,
4179
4199
  style: h,
4180
- onClick: O,
4181
- className: b,
4200
+ onClick: z,
4201
+ className: I,
4182
4202
  children: /* @__PURE__ */ f(
4183
4203
  "textarea",
4184
4204
  {
4185
- id: w,
4205
+ id: T,
4186
4206
  disabled: s,
4187
4207
  readOnly: o,
4188
- ref: v,
4189
- onFocus: M,
4190
- onBlur: P,
4191
- ...g
4208
+ ref: D,
4209
+ onFocus: R,
4210
+ onBlur: B,
4211
+ placeholder: s && m || y,
4212
+ value: s ? void 0 : m,
4213
+ ...E
4192
4214
  }
4193
4215
  )
4194
4216
  }
4195
4217
  ),
4196
- H && /* @__PURE__ */ f(xe, { children: H })
4218
+ j && /* @__PURE__ */ f(Ee, { children: j })
4197
4219
  ] });
4198
4220
  }
4199
- const Gr = Fe({});
4221
+ const Vr = Se({});
4200
4222
  function Jc(e) {
4201
- const { children: t = !1 } = e, [n, r] = F([]);
4223
+ const { children: t = !1 } = e, [n, r] = S([]);
4202
4224
  function a(c) {
4203
4225
  return !!n.some((l) => l.key === c);
4204
4226
  }
@@ -4214,7 +4236,7 @@ function Jc(e) {
4214
4236
  r(n.filter((l) => l.key !== c));
4215
4237
  }
4216
4238
  return /* @__PURE__ */ f(
4217
- Gr.Provider,
4239
+ Vr.Provider,
4218
4240
  {
4219
4241
  value: { drawerIsOpen: a, drawerData: s, openDrawer: o, closeDrawer: i },
4220
4242
  children: t
@@ -4222,7 +4244,7 @@ function Jc(e) {
4222
4244
  );
4223
4245
  }
4224
4246
  function Qc(e) {
4225
- const t = Ae(Gr);
4247
+ const t = Re(Vr);
4226
4248
  if (Object.entries(t).length === 0)
4227
4249
  throw new Error("useDrawer must be used within a Provider");
4228
4250
  if (e) {
@@ -4236,9 +4258,9 @@ function Qc(e) {
4236
4258
  } else
4237
4259
  return t;
4238
4260
  }
4239
- const Vr = Fe({});
4261
+ const Ur = Se({});
4240
4262
  function el(e) {
4241
- const { children: t = !1 } = e, [n, r] = F([]);
4263
+ const { children: t = !1 } = e, [n, r] = S([]);
4242
4264
  function a(l) {
4243
4265
  return !!n.some((u) => u.key === l);
4244
4266
  }
@@ -4257,7 +4279,7 @@ function el(e) {
4257
4279
  r([]);
4258
4280
  }
4259
4281
  return /* @__PURE__ */ f(
4260
- Vr.Provider,
4282
+ Ur.Provider,
4261
4283
  {
4262
4284
  value: { modalIsOpen: a, modalData: s, openModal: o, closeModal: i, closeAll: c },
4263
4285
  children: t
@@ -4265,7 +4287,7 @@ function el(e) {
4265
4287
  );
4266
4288
  }
4267
4289
  function tl(e) {
4268
- const t = Ae(Vr);
4290
+ const t = Re(Ur);
4269
4291
  if (Object.entries(t).length === 0)
4270
4292
  throw new Error("useModal must be used within a Provider");
4271
4293
  if (e) {
@@ -4294,43 +4316,43 @@ function nl(e, t = "") {
4294
4316
  }
4295
4317
  };
4296
4318
  }
4297
- let Gs = { data: "" }, Vs = (e) => typeof window == "object" ? ((e ? e.querySelector("#_goober") : window._goober) || Object.assign((e || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : e || Gs, Us = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, qs = /\/\*[^]*?\*\/| +/g, Wn = /\n+/g, Le = (e, t) => {
4319
+ let Gs = { data: "" }, Vs = (e) => typeof window == "object" ? ((e ? e.querySelector("#_goober") : window._goober) || Object.assign((e || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : e || Gs, Us = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, qs = /\/\*[^]*?\*\/| +/g, Wn = /\n+/g, Be = (e, t) => {
4298
4320
  let n = "", r = "", a = "";
4299
4321
  for (let s in e) {
4300
4322
  let o = e[s];
4301
- s[0] == "@" ? s[1] == "i" ? n = s + " " + o + ";" : r += s[1] == "f" ? Le(o, s) : s + "{" + Le(o, s[1] == "k" ? "" : t) + "}" : typeof o == "object" ? r += Le(o, t ? t.replace(/([^,])+/g, (i) => s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g, (c) => /&/.test(c) ? c.replace(/&/g, i) : i ? i + " " + c : c)) : s) : o != null && (s = /^--/.test(s) ? s : s.replace(/[A-Z]/g, "-$&").toLowerCase(), a += Le.p ? Le.p(s, o) : s + ":" + o + ";");
4323
+ s[0] == "@" ? s[1] == "i" ? n = s + " " + o + ";" : r += s[1] == "f" ? Be(o, s) : s + "{" + Be(o, s[1] == "k" ? "" : t) + "}" : typeof o == "object" ? r += Be(o, t ? t.replace(/([^,])+/g, (i) => s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g, (c) => /&/.test(c) ? c.replace(/&/g, i) : i ? i + " " + c : c)) : s) : o != null && (s = /^--/.test(s) ? s : s.replace(/[A-Z]/g, "-$&").toLowerCase(), a += Be.p ? Be.p(s, o) : s + ":" + o + ";");
4302
4324
  }
4303
4325
  return n + (t && a ? t + "{" + a + "}" : a) + r;
4304
- }, Se = {}, Ur = (e) => {
4326
+ }, Oe = {}, qr = (e) => {
4305
4327
  if (typeof e == "object") {
4306
4328
  let t = "";
4307
- for (let n in e) t += n + Ur(e[n]);
4329
+ for (let n in e) t += n + qr(e[n]);
4308
4330
  return t;
4309
4331
  }
4310
4332
  return e;
4311
4333
  }, Ws = (e, t, n, r, a) => {
4312
- let s = Ur(e), o = Se[s] || (Se[s] = ((c) => {
4334
+ let s = qr(e), o = Oe[s] || (Oe[s] = ((c) => {
4313
4335
  let l = 0, u = 11;
4314
4336
  for (; l < c.length; ) u = 101 * u + c.charCodeAt(l++) >>> 0;
4315
4337
  return "go" + u;
4316
4338
  })(s));
4317
- if (!Se[o]) {
4339
+ if (!Oe[o]) {
4318
4340
  let c = s !== e ? e : ((l) => {
4319
4341
  let u, d, _ = [{}];
4320
4342
  for (; u = Us.exec(l.replace(qs, "")); ) u[4] ? _.shift() : u[3] ? (d = u[3].replace(Wn, " ").trim(), _.unshift(_[0][d] = _[0][d] || {})) : _[0][u[1]] = u[2].replace(Wn, " ").trim();
4321
4343
  return _[0];
4322
4344
  })(e);
4323
- Se[o] = Le(a ? { ["@keyframes " + o]: c } : c, n ? "" : "." + o);
4345
+ Oe[o] = Be(a ? { ["@keyframes " + o]: c } : c, n ? "" : "." + o);
4324
4346
  }
4325
- let i = n && Se.g ? Se.g : null;
4326
- return n && (Se.g = Se[o]), ((c, l, u, d) => {
4347
+ let i = n && Oe.g ? Oe.g : null;
4348
+ return n && (Oe.g = Oe[o]), ((c, l, u, d) => {
4327
4349
  d ? l.data = l.data.replace(d, c) : l.data.indexOf(c) === -1 && (l.data = u ? c + l.data : l.data + c);
4328
- })(Se[o], t, r, i), o;
4350
+ })(Oe[o], t, r, i), o;
4329
4351
  }, Ks = (e, t, n) => e.reduce((r, a, s) => {
4330
4352
  let o = t[s];
4331
4353
  if (o && o.call) {
4332
4354
  let i = o(n), c = i && i.props && i.props.className || /^go/.test(i) && i;
4333
- o = c ? "." + c : i && typeof i == "object" ? i.props ? "" : Le(i, "") : i === !1 ? "" : i;
4355
+ o = c ? "." + c : i && typeof i == "object" ? i.props ? "" : Be(i, "") : i === !1 ? "" : i;
4334
4356
  }
4335
4357
  return r + a + (o ?? "");
4336
4358
  }, "");
@@ -4338,13 +4360,13 @@ function It(e) {
4338
4360
  let t = this || {}, n = e.call ? e(t.p) : e;
4339
4361
  return Ws(n.unshift ? n.raw ? Ks(n, [].slice.call(arguments, 1), t.p) : n.reduce((r, a) => Object.assign(r, a && a.call ? a(t.p) : a), {}) : n, Vs(t.target), t.g, t.o, t.k);
4340
4362
  }
4341
- let qr, nn, rn;
4363
+ let Wr, nn, rn;
4342
4364
  It.bind({ g: 1 });
4343
- let Pe = It.bind({ k: 1 });
4365
+ let Ie = It.bind({ k: 1 });
4344
4366
  function Xs(e, t, n, r) {
4345
- Le.p = t, qr = e, nn = n, rn = r;
4367
+ Be.p = t, Wr = e, nn = n, rn = r;
4346
4368
  }
4347
- function je(e, t) {
4369
+ function ze(e, t) {
4348
4370
  let n = this || {};
4349
4371
  return function() {
4350
4372
  let r = arguments;
@@ -4352,7 +4374,7 @@ function je(e, t) {
4352
4374
  let i = Object.assign({}, s), c = i.className || a.className;
4353
4375
  n.p = Object.assign({ theme: nn && nn() }, i), n.o = / *go\d+/.test(c), i.className = It.apply(n, r) + (c ? " " + c : "");
4354
4376
  let l = e;
4355
- return e[0] && (l = i.as || e, delete i.as), rn && l[0] && rn(i), qr(l, i);
4377
+ return e[0] && (l = i.as || e, delete i.as), rn && l[0] && rn(i), Wr(l, i);
4356
4378
  }
4357
4379
  return a;
4358
4380
  };
@@ -4360,7 +4382,7 @@ function je(e, t) {
4360
4382
  var Ys = (e) => typeof e == "function", St = (e, t) => Ys(e) ? e(t) : e, Zs = /* @__PURE__ */ (() => {
4361
4383
  let e = 0;
4362
4384
  return () => (++e).toString();
4363
- })(), Wr = /* @__PURE__ */ (() => {
4385
+ })(), Kr = /* @__PURE__ */ (() => {
4364
4386
  let e;
4365
4387
  return () => {
4366
4388
  if (e === void 0 && typeof window < "u") {
@@ -4369,7 +4391,7 @@ var Ys = (e) => typeof e == "function", St = (e, t) => Ys(e) ? e(t) : e, Zs = /*
4369
4391
  }
4370
4392
  return e;
4371
4393
  };
4372
- })(), Js = 20, En = "default", Kr = (e, t) => {
4394
+ })(), Js = 20, En = "default", Xr = (e, t) => {
4373
4395
  let { toastLimit: n } = e.settings;
4374
4396
  switch (t.type) {
4375
4397
  case 0:
@@ -4378,7 +4400,7 @@ var Ys = (e) => typeof e == "function", St = (e, t) => Ys(e) ? e(t) : e, Zs = /*
4378
4400
  return { ...e, toasts: e.toasts.map((o) => o.id === t.toast.id ? { ...o, ...t.toast } : o) };
4379
4401
  case 2:
4380
4402
  let { toast: r } = t;
4381
- return Kr(e, { type: e.toasts.find((o) => o.id === r.id) ? 1 : 0, toast: r });
4403
+ return Xr(e, { type: e.toasts.find((o) => o.id === r.id) ? 1 : 0, toast: r });
4382
4404
  case 3:
4383
4405
  let { toastId: a } = t;
4384
4406
  return { ...e, toasts: e.toasts.map((o) => o.id === a || a === void 0 ? { ...o, dismissed: !0, visible: !1 } : o) };
@@ -4390,15 +4412,15 @@ var Ys = (e) => typeof e == "function", St = (e, t) => Ys(e) ? e(t) : e, Zs = /*
4390
4412
  let s = t.time - (e.pausedAt || 0);
4391
4413
  return { ...e, pausedAt: void 0, toasts: e.toasts.map((o) => ({ ...o, pauseDuration: o.pauseDuration + s })) };
4392
4414
  }
4393
- }, Ft = [], Xr = { toasts: [], pausedAt: void 0, settings: { toastLimit: Js } }, Ne = {}, Yr = (e, t = En) => {
4394
- Ne[t] = Kr(Ne[t] || Xr, e), Ft.forEach(([n, r]) => {
4395
- n === t && r(Ne[t]);
4415
+ }, Ft = [], Yr = { toasts: [], pausedAt: void 0, settings: { toastLimit: Js } }, Fe = {}, Zr = (e, t = En) => {
4416
+ Fe[t] = Xr(Fe[t] || Yr, e), Ft.forEach(([n, r]) => {
4417
+ n === t && r(Fe[t]);
4396
4418
  });
4397
- }, Zr = (e) => Object.keys(Ne).forEach((t) => Yr(e, t)), Qs = (e) => Object.keys(Ne).find((t) => Ne[t].toasts.some((n) => n.id === e)), Rt = (e = En) => (t) => {
4398
- Yr(t, e);
4419
+ }, Jr = (e) => Object.keys(Fe).forEach((t) => Zr(e, t)), Qs = (e) => Object.keys(Fe).find((t) => Fe[t].toasts.some((n) => n.id === e)), Rt = (e = En) => (t) => {
4420
+ Zr(t, e);
4399
4421
  }, eo = { blank: 4e3, error: 4e3, success: 2e3, loading: 1 / 0, custom: 4e3 }, to = (e = {}, t = En) => {
4400
- let [n, r] = F(Ne[t] || Xr), a = oe(Ne[t]);
4401
- Ce(() => (a.current !== Ne[t] && r(Ne[t]), Ft.push([t, r]), () => {
4422
+ let [n, r] = S(Fe[t] || Yr), a = ie(Fe[t]);
4423
+ be(() => (a.current !== Fe[t] && r(Fe[t]), Ft.push([t, r]), () => {
4402
4424
  let o = Ft.findIndex(([i]) => i === t);
4403
4425
  o > -1 && Ft.splice(o, 1);
4404
4426
  }), [t]);
@@ -4407,22 +4429,22 @@ var Ys = (e) => typeof e == "function", St = (e, t) => Ys(e) ? e(t) : e, Zs = /*
4407
4429
  return { ...e, ...e[o.type], ...o, removeDelay: o.removeDelay || ((i = e[o.type]) == null ? void 0 : i.removeDelay) || (e == null ? void 0 : e.removeDelay), duration: o.duration || ((c = e[o.type]) == null ? void 0 : c.duration) || (e == null ? void 0 : e.duration) || eo[o.type], style: { ...e.style, ...(l = e[o.type]) == null ? void 0 : l.style, ...o.style } };
4408
4430
  });
4409
4431
  return { ...n, toasts: s };
4410
- }, no = (e, t = "blank", n) => ({ createdAt: Date.now(), visible: !0, dismissed: !1, type: t, ariaProps: { role: "status", "aria-live": "polite" }, message: e, pauseDuration: 0, ...n, id: (n == null ? void 0 : n.id) || Zs() }), yt = (e) => (t, n) => {
4432
+ }, no = (e, t = "blank", n) => ({ createdAt: Date.now(), visible: !0, dismissed: !1, type: t, ariaProps: { role: "status", "aria-live": "polite" }, message: e, pauseDuration: 0, ...n, id: (n == null ? void 0 : n.id) || Zs() }), vt = (e) => (t, n) => {
4411
4433
  let r = no(t, e, n);
4412
4434
  return Rt(r.toasterId || Qs(r.id))({ type: 2, toast: r }), r.id;
4413
- }, Q = (e, t) => yt("blank")(e, t);
4414
- Q.error = yt("error");
4415
- Q.success = yt("success");
4416
- Q.loading = yt("loading");
4417
- Q.custom = yt("custom");
4435
+ }, Q = (e, t) => vt("blank")(e, t);
4436
+ Q.error = vt("error");
4437
+ Q.success = vt("success");
4438
+ Q.loading = vt("loading");
4439
+ Q.custom = vt("custom");
4418
4440
  Q.dismiss = (e, t) => {
4419
4441
  let n = { type: 3, toastId: e };
4420
- t ? Rt(t)(n) : Zr(n);
4442
+ t ? Rt(t)(n) : Jr(n);
4421
4443
  };
4422
4444
  Q.dismissAll = (e) => Q.dismiss(void 0, e);
4423
4445
  Q.remove = (e, t) => {
4424
4446
  let n = { type: 4, toastId: e };
4425
- t ? Rt(t)(n) : Zr(n);
4447
+ t ? Rt(t)(n) : Jr(n);
4426
4448
  };
4427
4449
  Q.removeAll = (e) => Q.remove(void 0, e);
4428
4450
  Q.promise = (e, t, n) => {
@@ -4436,14 +4458,14 @@ Q.promise = (e, t, n) => {
4436
4458
  }), e;
4437
4459
  };
4438
4460
  var ro = 1e3, ao = (e, t = "default") => {
4439
- let { toasts: n, pausedAt: r } = to(e, t), a = oe(/* @__PURE__ */ new Map()).current, s = tt((d, _ = ro) => {
4461
+ let { toasts: n, pausedAt: r } = to(e, t), a = ie(/* @__PURE__ */ new Map()).current, s = nt((d, _ = ro) => {
4440
4462
  if (a.has(d)) return;
4441
4463
  let h = setTimeout(() => {
4442
4464
  a.delete(d), o({ type: 4, toastId: d });
4443
4465
  }, _);
4444
4466
  a.set(d, h);
4445
4467
  }, []);
4446
- Ce(() => {
4468
+ be(() => {
4447
4469
  if (r) return;
4448
4470
  let d = Date.now(), _ = n.map((h) => {
4449
4471
  if (h.duration === 1 / 0) return;
@@ -4458,17 +4480,17 @@ var ro = 1e3, ao = (e, t = "default") => {
4458
4480
  _.forEach((h) => h && clearTimeout(h));
4459
4481
  };
4460
4482
  }, [n, r, t]);
4461
- let o = tt(Rt(t), [t]), i = tt(() => {
4483
+ let o = nt(Rt(t), [t]), i = nt(() => {
4462
4484
  o({ type: 5, time: Date.now() });
4463
- }, [o]), c = tt((d, _) => {
4485
+ }, [o]), c = nt((d, _) => {
4464
4486
  o({ type: 1, toast: { id: d, height: _ } });
4465
- }, [o]), l = tt(() => {
4487
+ }, [o]), l = nt(() => {
4466
4488
  r && o({ type: 6, time: Date.now() });
4467
- }, [r, o]), u = tt((d, _) => {
4468
- let { reverseOrder: h = !1, gutter: m = 8, defaultPosition: g } = _ || {}, y = n.filter((v) => (v.position || g) === (d.position || g) && v.height), C = y.findIndex((v) => v.id === d.id), x = y.filter((v, w) => w < C && v.visible).length;
4469
- return y.filter((v) => v.visible).slice(...h ? [x + 1] : [0, x]).reduce((v, w) => v + (w.height || 0) + m, 0);
4489
+ }, [r, o]), u = nt((d, _) => {
4490
+ let { reverseOrder: h = !1, gutter: m = 8, defaultPosition: g } = _ || {}, y = n.filter((v) => (v.position || g) === (d.position || g) && v.height), C = y.findIndex((v) => v.id === d.id), E = y.filter((v, w) => w < C && v.visible).length;
4491
+ return y.filter((v) => v.visible).slice(...h ? [E + 1] : [0, E]).reduce((v, w) => v + (w.height || 0) + m, 0);
4470
4492
  }, [n]);
4471
- return Ce(() => {
4493
+ return be(() => {
4472
4494
  n.forEach((d) => {
4473
4495
  if (d.dismissed) s(d.id, d.removeDelay);
4474
4496
  else {
@@ -4477,7 +4499,7 @@ var ro = 1e3, ao = (e, t = "default") => {
4477
4499
  }
4478
4500
  });
4479
4501
  }, [n, s]), { toasts: n, handlers: { updateHeight: c, startPause: i, endPause: l, calculateOffset: u } };
4480
- }, so = Pe`
4502
+ }, so = Ie`
4481
4503
  from {
4482
4504
  transform: scale(0) rotate(45deg);
4483
4505
  opacity: 0;
@@ -4485,7 +4507,7 @@ from {
4485
4507
  to {
4486
4508
  transform: scale(1) rotate(45deg);
4487
4509
  opacity: 1;
4488
- }`, oo = Pe`
4510
+ }`, oo = Ie`
4489
4511
  from {
4490
4512
  transform: scale(0);
4491
4513
  opacity: 0;
@@ -4493,7 +4515,7 @@ from {
4493
4515
  to {
4494
4516
  transform: scale(1);
4495
4517
  opacity: 1;
4496
- }`, io = Pe`
4518
+ }`, io = Ie`
4497
4519
  from {
4498
4520
  transform: scale(0) rotate(90deg);
4499
4521
  opacity: 0;
@@ -4501,7 +4523,7 @@ from {
4501
4523
  to {
4502
4524
  transform: scale(1) rotate(90deg);
4503
4525
  opacity: 1;
4504
- }`, co = je("div")`
4526
+ }`, co = ze("div")`
4505
4527
  width: 20px;
4506
4528
  opacity: 0;
4507
4529
  height: 20px;
@@ -4534,14 +4556,14 @@ to {
4534
4556
  animation-delay: 180ms;
4535
4557
  transform: rotate(90deg);
4536
4558
  }
4537
- `, lo = Pe`
4559
+ `, lo = Ie`
4538
4560
  from {
4539
4561
  transform: rotate(0deg);
4540
4562
  }
4541
4563
  to {
4542
4564
  transform: rotate(360deg);
4543
4565
  }
4544
- `, uo = je("div")`
4566
+ `, uo = ze("div")`
4545
4567
  width: 12px;
4546
4568
  height: 12px;
4547
4569
  box-sizing: border-box;
@@ -4550,7 +4572,7 @@ to {
4550
4572
  border-color: ${(e) => e.secondary || "#e0e0e0"};
4551
4573
  border-right-color: ${(e) => e.primary || "#616161"};
4552
4574
  animation: ${lo} 1s linear infinite;
4553
- `, fo = Pe`
4575
+ `, fo = Ie`
4554
4576
  from {
4555
4577
  transform: scale(0) rotate(45deg);
4556
4578
  opacity: 0;
@@ -4558,7 +4580,7 @@ from {
4558
4580
  to {
4559
4581
  transform: scale(1) rotate(45deg);
4560
4582
  opacity: 1;
4561
- }`, _o = Pe`
4583
+ }`, _o = Ie`
4562
4584
  0% {
4563
4585
  height: 0;
4564
4586
  width: 0;
@@ -4572,7 +4594,7 @@ to {
4572
4594
  100% {
4573
4595
  opacity: 1;
4574
4596
  height: 10px;
4575
- }`, mo = je("div")`
4597
+ }`, mo = ze("div")`
4576
4598
  width: 20px;
4577
4599
  opacity: 0;
4578
4600
  height: 20px;
@@ -4599,16 +4621,16 @@ to {
4599
4621
  height: 10px;
4600
4622
  width: 6px;
4601
4623
  }
4602
- `, go = je("div")`
4624
+ `, go = ze("div")`
4603
4625
  position: absolute;
4604
- `, ho = je("div")`
4626
+ `, ho = ze("div")`
4605
4627
  position: relative;
4606
4628
  display: flex;
4607
4629
  justify-content: center;
4608
4630
  align-items: center;
4609
4631
  min-width: 20px;
4610
4632
  min-height: 20px;
4611
- `, po = Pe`
4633
+ `, po = Ie`
4612
4634
  from {
4613
4635
  transform: scale(0.6);
4614
4636
  opacity: 0.4;
@@ -4616,7 +4638,7 @@ from {
4616
4638
  to {
4617
4639
  transform: scale(1);
4618
4640
  opacity: 1;
4619
- }`, yo = je("div")`
4641
+ }`, yo = ze("div")`
4620
4642
  position: relative;
4621
4643
  transform: scale(0.6);
4622
4644
  opacity: 0.4;
@@ -4632,7 +4654,7 @@ to {
4632
4654
  `, Co = (e) => `
4633
4655
  0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
4634
4656
  100% {transform: translate3d(0,${e * -150}%,-1px) scale(.6); opacity:0;}
4635
- `, bo = "0%{opacity:0;} 100%{opacity:1;}", xo = "0%{opacity:1;} 100%{opacity:0;}", Eo = je("div")`
4657
+ `, bo = "0%{opacity:0;} 100%{opacity:1;}", xo = "0%{opacity:1;} 100%{opacity:0;}", Eo = ze("div")`
4636
4658
  display: flex;
4637
4659
  align-items: center;
4638
4660
  background: #fff;
@@ -4644,7 +4666,7 @@ to {
4644
4666
  pointer-events: auto;
4645
4667
  padding: 8px 10px;
4646
4668
  border-radius: 8px;
4647
- `, wo = je("div")`
4669
+ `, wo = ze("div")`
4648
4670
  display: flex;
4649
4671
  justify-content: center;
4650
4672
  margin: 4px 10px;
@@ -4652,8 +4674,8 @@ to {
4652
4674
  flex: 1 1 auto;
4653
4675
  white-space: pre-line;
4654
4676
  `, No = (e, t) => {
4655
- let n = e.includes("top") ? 1 : -1, [r, a] = Wr() ? [bo, xo] : [ko(n), Co(n)];
4656
- return { animation: t ? `${Pe(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards` : `${Pe(a)} 0.4s forwards cubic-bezier(.06,.71,.55,1)` };
4677
+ let n = e.includes("top") ? 1 : -1, [r, a] = Kr() ? [bo, xo] : [ko(n), Co(n)];
4678
+ return { animation: t ? `${Ie(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards` : `${Ie(a)} 0.4s forwards cubic-bezier(.06,.71,.55,1)` };
4657
4679
  }, Fo = ee.memo(({ toast: e, position: t, style: n, children: r }) => {
4658
4680
  let a = e.height ? No(e.position || t || "top-center", e.visible) : { opacity: 0 }, s = ee.createElement(vo, { toast: e }), o = ee.createElement(wo, { ...e.ariaProps }, St(e.message, e));
4659
4681
  return ee.createElement(Eo, { className: e.className, style: { ...a, ...n, ...e.style } }, typeof r == "function" ? r({ icon: s, message: o }) : ee.createElement(ee.Fragment, null, s, o));
@@ -4672,7 +4694,7 @@ var So = ({ id: e, className: t, style: n, onHeightUpdate: r, children: a }) =>
4672
4694
  return ee.createElement("div", { ref: s, className: t, style: n }, a);
4673
4695
  }, To = (e, t) => {
4674
4696
  let n = e.includes("top"), r = n ? { top: 0 } : { bottom: 0 }, a = e.includes("center") ? { justifyContent: "center" } : e.includes("right") ? { justifyContent: "flex-end" } : {};
4675
- return { left: 0, right: 0, display: "flex", position: "absolute", transition: Wr() ? void 0 : "all 230ms cubic-bezier(.21,1.02,.73,1)", transform: `translateY(${t * (n ? 1 : -1)}px)`, ...r, ...a };
4697
+ return { left: 0, right: 0, display: "flex", position: "absolute", transition: Kr() ? void 0 : "all 230ms cubic-bezier(.21,1.02,.73,1)", transform: `translateY(${t * (n ? 1 : -1)}px)`, ...r, ...a };
4676
4698
  }, Oo = It`
4677
4699
  z-index: 9999;
4678
4700
  > * {
@@ -4685,7 +4707,7 @@ var So = ({ id: e, className: t, style: n, onHeightUpdate: r, children: a }) =>
4685
4707
  return ee.createElement(So, { id: u.id, key: u.id, onHeightUpdate: l.updateHeight, className: u.visible ? Oo : "", style: h }, u.type === "custom" ? St(u.message, u) : a ? a(u) : ee.createElement(Fo, { toast: u, position: d }));
4686
4708
  }));
4687
4709
  }, Kn = Q;
4688
- const Ao = Fe({});
4710
+ const Ao = Se({});
4689
4711
  function rl({ children: e }) {
4690
4712
  function t(n) {
4691
4713
  switch (n.type) {
@@ -4739,11 +4761,11 @@ function rl({ children: e }) {
4739
4761
  function Xn(e) {
4740
4762
  return Object.prototype.toString.call(e) === "[object Object]";
4741
4763
  }
4742
- function se(e) {
4764
+ function oe(e) {
4743
4765
  var t, n;
4744
4766
  return Xn(e) === !1 ? !1 : (t = e.constructor, t === void 0 ? !0 : (n = t.prototype, !(Xn(n) === !1 || n.hasOwnProperty("isPrototypeOf") === !1)));
4745
4767
  }
4746
- var Jr = Symbol.for("immer-nothing"), Yn = Symbol.for("immer-draftable"), me = Symbol.for("immer-state"), Io = process.env.NODE_ENV !== "production" ? [
4768
+ var Qr = Symbol.for("immer-nothing"), Yn = Symbol.for("immer-draftable"), me = Symbol.for("immer-state"), Io = process.env.NODE_ENV !== "production" ? [
4747
4769
  // All error codes, starting by 0:
4748
4770
  function(e) {
4749
4771
  return `The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`;
@@ -4774,7 +4796,7 @@ var Jr = Symbol.for("immer-nothing"), Yn = Symbol.for("immer-draftable"), me = S
4774
4796
  // Note: if more errors are added, the errorOffset in Patches.ts should be increased
4775
4797
  // See Patches.ts for additional errors
4776
4798
  ] : [];
4777
- function de(e, ...t) {
4799
+ function fe(e, ...t) {
4778
4800
  if (process.env.NODE_ENV !== "production") {
4779
4801
  const n = Io[e], r = typeof n == "function" ? n.apply(null, t) : n;
4780
4802
  throw new Error(`[Immer] ${r}`);
@@ -4783,19 +4805,19 @@ function de(e, ...t) {
4783
4805
  `[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`
4784
4806
  );
4785
4807
  }
4786
- var rt = Object.getPrototypeOf;
4787
- function We(e) {
4808
+ var at = Object.getPrototypeOf;
4809
+ function Xe(e) {
4788
4810
  return !!e && !!e[me];
4789
4811
  }
4790
- function Ke(e) {
4812
+ function Ye(e) {
4791
4813
  var t;
4792
- return e ? Qr(e) || Array.isArray(e) || !!e[Yn] || !!((t = e.constructor) != null && t[Yn]) || Dt(e) || $t(e) : !1;
4814
+ return e ? ea(e) || Array.isArray(e) || !!e[Yn] || !!((t = e.constructor) != null && t[Yn]) || Dt(e) || $t(e) : !1;
4793
4815
  }
4794
4816
  var Ro = Object.prototype.constructor.toString();
4795
- function Qr(e) {
4817
+ function ea(e) {
4796
4818
  if (!e || typeof e != "object")
4797
4819
  return !1;
4798
- const t = rt(e);
4820
+ const t = at(e);
4799
4821
  if (t === null)
4800
4822
  return !0;
4801
4823
  const n = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
@@ -4813,7 +4835,7 @@ function Mt(e) {
4813
4835
  function an(e, t) {
4814
4836
  return Mt(e) === 2 ? e.has(t) : Object.prototype.hasOwnProperty.call(e, t);
4815
4837
  }
4816
- function ea(e, t, n) {
4838
+ function ta(e, t, n) {
4817
4839
  const r = Mt(e);
4818
4840
  r === 2 ? e.set(t, n) : r === 3 ? e.add(n) : e[t] = n;
4819
4841
  }
@@ -4826,7 +4848,7 @@ function Dt(e) {
4826
4848
  function $t(e) {
4827
4849
  return e instanceof Set;
4828
4850
  }
4829
- function Ue(e) {
4851
+ function We(e) {
4830
4852
  return e.copy_ || e.base_;
4831
4853
  }
4832
4854
  function sn(e, t) {
@@ -4836,7 +4858,7 @@ function sn(e, t) {
4836
4858
  return new Set(e);
4837
4859
  if (Array.isArray(e))
4838
4860
  return Array.prototype.slice.call(e);
4839
- const n = Qr(e);
4861
+ const n = ea(e);
4840
4862
  if (t === !0 || t === "class_only" && !n) {
4841
4863
  const r = Object.getOwnPropertyDescriptors(e);
4842
4864
  delete r[me];
@@ -4851,9 +4873,9 @@ function sn(e, t) {
4851
4873
  value: e[o]
4852
4874
  });
4853
4875
  }
4854
- return Object.create(rt(e), r);
4876
+ return Object.create(at(e), r);
4855
4877
  } else {
4856
- const r = rt(e);
4878
+ const r = at(e);
4857
4879
  if (r !== null && n)
4858
4880
  return { ...e };
4859
4881
  const a = Object.create(r);
@@ -4861,22 +4883,22 @@ function sn(e, t) {
4861
4883
  }
4862
4884
  }
4863
4885
  function wn(e, t = !1) {
4864
- return Lt(e) || We(e) || !Ke(e) || (Mt(e) > 1 && (e.set = e.add = e.clear = e.delete = Do), Object.freeze(e), t && Object.entries(e).forEach(([n, r]) => wn(r, !0))), e;
4886
+ return Lt(e) || Xe(e) || !Ye(e) || (Mt(e) > 1 && (e.set = e.add = e.clear = e.delete = Do), Object.freeze(e), t && Object.entries(e).forEach(([n, r]) => wn(r, !0))), e;
4865
4887
  }
4866
4888
  function Do() {
4867
- de(2);
4889
+ fe(2);
4868
4890
  }
4869
4891
  function Lt(e) {
4870
4892
  return Object.isFrozen(e);
4871
4893
  }
4872
4894
  var $o = {};
4873
- function Xe(e) {
4895
+ function Ze(e) {
4874
4896
  const t = $o[e];
4875
- return t || de(0, e), t;
4897
+ return t || fe(0, e), t;
4876
4898
  }
4877
- var dt;
4878
- function ta() {
4879
- return dt;
4899
+ var _t;
4900
+ function na() {
4901
+ return _t;
4880
4902
  }
4881
4903
  function Lo(e, t) {
4882
4904
  return {
@@ -4890,16 +4912,16 @@ function Lo(e, t) {
4890
4912
  };
4891
4913
  }
4892
4914
  function Zn(e, t) {
4893
- t && (Xe("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
4915
+ t && (Ze("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
4894
4916
  }
4895
4917
  function on(e) {
4896
4918
  cn(e), e.drafts_.forEach(jo), e.drafts_ = null;
4897
4919
  }
4898
4920
  function cn(e) {
4899
- e === dt && (dt = e.parent_);
4921
+ e === _t && (_t = e.parent_);
4900
4922
  }
4901
4923
  function Jn(e) {
4902
- return dt = Lo(dt, e);
4924
+ return _t = Lo(_t, e);
4903
4925
  }
4904
4926
  function jo(e) {
4905
4927
  const t = e[me];
@@ -4908,12 +4930,12 @@ function jo(e) {
4908
4930
  function Qn(e, t) {
4909
4931
  t.unfinalizedDrafts_ = t.drafts_.length;
4910
4932
  const n = t.drafts_[0];
4911
- return e !== void 0 && e !== n ? (n[me].modified_ && (on(t), de(4)), Ke(e) && (e = Ot(t, e), t.parent_ || Pt(t, e)), t.patches_ && Xe("Patches").generateReplacementPatches_(
4933
+ return e !== void 0 && e !== n ? (n[me].modified_ && (on(t), fe(4)), Ye(e) && (e = Ot(t, e), t.parent_ || Pt(t, e)), t.patches_ && Ze("Patches").generateReplacementPatches_(
4912
4934
  n[me].base_,
4913
4935
  e,
4914
4936
  t.patches_,
4915
4937
  t.inversePatches_
4916
- )) : e = Ot(t, n, []), on(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e !== Jr ? e : void 0;
4938
+ )) : e = Ot(t, n, []), on(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e !== Qr ? e : void 0;
4917
4939
  }
4918
4940
  function Ot(e, t, n) {
4919
4941
  if (Lt(t))
@@ -4935,7 +4957,7 @@ function Ot(e, t, n) {
4935
4957
  r.type_ === 3 && (s = new Set(a), a.clear(), o = !0), Tt(
4936
4958
  s,
4937
4959
  (i, c) => er(e, r, a, i, c, n, o)
4938
- ), Pt(e, a, !1), n && e.patches_ && Xe("Patches").generatePatches_(
4960
+ ), Pt(e, a, !1), n && e.patches_ && Ze("Patches").generatePatches_(
4939
4961
  r,
4940
4962
  n,
4941
4963
  e.patches_,
@@ -4945,15 +4967,15 @@ function Ot(e, t, n) {
4945
4967
  return r.copy_;
4946
4968
  }
4947
4969
  function er(e, t, n, r, a, s, o) {
4948
- if (process.env.NODE_ENV !== "production" && a === n && de(5), We(a)) {
4970
+ if (process.env.NODE_ENV !== "production" && a === n && fe(5), Xe(a)) {
4949
4971
  const i = s && t && t.type_ !== 3 && // Set objects are atomic since they have no keys.
4950
4972
  !an(t.assigned_, r) ? s.concat(r) : void 0, c = Ot(e, a, i);
4951
- if (ea(n, r, c), We(c))
4973
+ if (ta(n, r, c), Xe(c))
4952
4974
  e.canAutoFreeze_ = !1;
4953
4975
  else
4954
4976
  return;
4955
4977
  } else o && n.add(a);
4956
- if (Ke(a) && !Lt(a)) {
4978
+ if (Ye(a) && !Lt(a)) {
4957
4979
  if (!e.immer_.autoFreeze_ && e.unfinalizedDrafts_ < 1)
4958
4980
  return;
4959
4981
  Ot(e, a), (!t || !t.scope_.parent_) && typeof r != "symbol" && Object.prototype.propertyIsEnumerable.call(n, r) && Pt(e, a);
@@ -4966,7 +4988,7 @@ function Bo(e, t) {
4966
4988
  const n = Array.isArray(e), r = {
4967
4989
  type_: n ? 1 : 0,
4968
4990
  // Track which produce call this is associated with.
4969
- scope_: t ? t.scope_ : ta(),
4991
+ scope_: t ? t.scope_ : na(),
4970
4992
  // True for both shallow and deep changes.
4971
4993
  modified_: !1,
4972
4994
  // Used during finalization.
@@ -4987,7 +5009,7 @@ function Bo(e, t) {
4987
5009
  isManual_: !1
4988
5010
  };
4989
5011
  let a = r, s = Nn;
4990
- n && (a = [r], s = _t);
5012
+ n && (a = [r], s = mt);
4991
5013
  const { revoke: o, proxy: i } = Proxy.revocable(a, s);
4992
5014
  return r.draft_ = i, r.revoke_ = o, i;
4993
5015
  }
@@ -4995,24 +5017,24 @@ var Nn = {
4995
5017
  get(e, t) {
4996
5018
  if (t === me)
4997
5019
  return e;
4998
- const n = Ue(e);
5020
+ const n = We(e);
4999
5021
  if (!an(n, t))
5000
5022
  return zo(e, n, t);
5001
5023
  const r = n[t];
5002
- return e.finalized_ || !Ke(r) ? r : r === Zt(e.base_, t) ? (Jt(e), e.copy_[t] = un(r, e)) : r;
5024
+ return e.finalized_ || !Ye(r) ? r : r === Zt(e.base_, t) ? (Jt(e), e.copy_[t] = un(r, e)) : r;
5003
5025
  },
5004
5026
  has(e, t) {
5005
- return t in Ue(e);
5027
+ return t in We(e);
5006
5028
  },
5007
5029
  ownKeys(e) {
5008
- return Reflect.ownKeys(Ue(e));
5030
+ return Reflect.ownKeys(We(e));
5009
5031
  },
5010
5032
  set(e, t, n) {
5011
- const r = na(Ue(e), t);
5033
+ const r = ra(We(e), t);
5012
5034
  if (r != null && r.set)
5013
5035
  return r.set.call(e.draft_, n), !0;
5014
5036
  if (!e.modified_) {
5015
- const a = Zt(Ue(e), t), s = a == null ? void 0 : a[me];
5037
+ const a = Zt(We(e), t), s = a == null ? void 0 : a[me];
5016
5038
  if (s && s.base_ === n)
5017
5039
  return e.copy_[t] = n, e.assigned_[t] = !1, !0;
5018
5040
  if (Mo(n, a) && (n !== void 0 || an(e.base_, t)))
@@ -5029,7 +5051,7 @@ var Nn = {
5029
5051
  // Note: We never coerce `desc.value` into an Immer draft, because we can't make
5030
5052
  // the same guarantee in ES5 mode.
5031
5053
  getOwnPropertyDescriptor(e, t) {
5032
- const n = Ue(e), r = Reflect.getOwnPropertyDescriptor(n, t);
5054
+ const n = We(e), r = Reflect.getOwnPropertyDescriptor(n, t);
5033
5055
  return r && {
5034
5056
  writable: !0,
5035
5057
  configurable: e.type_ !== 1 || t !== "length",
@@ -5038,48 +5060,48 @@ var Nn = {
5038
5060
  };
5039
5061
  },
5040
5062
  defineProperty() {
5041
- de(11);
5063
+ fe(11);
5042
5064
  },
5043
5065
  getPrototypeOf(e) {
5044
- return rt(e.base_);
5066
+ return at(e.base_);
5045
5067
  },
5046
5068
  setPrototypeOf() {
5047
- de(12);
5069
+ fe(12);
5048
5070
  }
5049
- }, _t = {};
5071
+ }, mt = {};
5050
5072
  Tt(Nn, (e, t) => {
5051
- _t[e] = function() {
5073
+ mt[e] = function() {
5052
5074
  return arguments[0] = arguments[0][0], t.apply(this, arguments);
5053
5075
  };
5054
5076
  });
5055
- _t.deleteProperty = function(e, t) {
5056
- return process.env.NODE_ENV !== "production" && isNaN(parseInt(t)) && de(13), _t.set.call(this, e, t, void 0);
5077
+ mt.deleteProperty = function(e, t) {
5078
+ return process.env.NODE_ENV !== "production" && isNaN(parseInt(t)) && fe(13), mt.set.call(this, e, t, void 0);
5057
5079
  };
5058
- _t.set = function(e, t, n) {
5059
- return process.env.NODE_ENV !== "production" && t !== "length" && isNaN(parseInt(t)) && de(14), Nn.set.call(this, e[0], t, n, e[0]);
5080
+ mt.set = function(e, t, n) {
5081
+ return process.env.NODE_ENV !== "production" && t !== "length" && isNaN(parseInt(t)) && fe(14), Nn.set.call(this, e[0], t, n, e[0]);
5060
5082
  };
5061
5083
  function Zt(e, t) {
5062
5084
  const n = e[me];
5063
- return (n ? Ue(n) : e)[t];
5085
+ return (n ? We(n) : e)[t];
5064
5086
  }
5065
5087
  function zo(e, t, n) {
5066
5088
  var a;
5067
- const r = na(t, n);
5089
+ const r = ra(t, n);
5068
5090
  return r ? "value" in r ? r.value : (
5069
5091
  // This is a very special case, if the prop is a getter defined by the
5070
5092
  // prototype, we should invoke it with the draft as context!
5071
5093
  (a = r.get) == null ? void 0 : a.call(e.draft_)
5072
5094
  ) : void 0;
5073
5095
  }
5074
- function na(e, t) {
5096
+ function ra(e, t) {
5075
5097
  if (!(t in e))
5076
5098
  return;
5077
- let n = rt(e);
5099
+ let n = at(e);
5078
5100
  for (; n; ) {
5079
5101
  const r = Object.getOwnPropertyDescriptor(n, t);
5080
5102
  if (r)
5081
5103
  return r;
5082
- n = rt(n);
5104
+ n = at(n);
5083
5105
  }
5084
5106
  }
5085
5107
  function ln(e) {
@@ -5102,9 +5124,9 @@ var Ho = class {
5102
5124
  return o.produce(c, (u) => n.call(this, u, ...l));
5103
5125
  };
5104
5126
  }
5105
- typeof n != "function" && de(6), r !== void 0 && typeof r != "function" && de(7);
5127
+ typeof n != "function" && fe(6), r !== void 0 && typeof r != "function" && fe(7);
5106
5128
  let a;
5107
- if (Ke(t)) {
5129
+ if (Ye(t)) {
5108
5130
  const s = Jn(this), o = un(t, void 0);
5109
5131
  let i = !0;
5110
5132
  try {
@@ -5114,13 +5136,13 @@ var Ho = class {
5114
5136
  }
5115
5137
  return Zn(s, r), Qn(a, s);
5116
5138
  } else if (!t || typeof t != "object") {
5117
- if (a = n(t), a === void 0 && (a = t), a === Jr && (a = void 0), this.autoFreeze_ && wn(a, !0), r) {
5139
+ if (a = n(t), a === void 0 && (a = t), a === Qr && (a = void 0), this.autoFreeze_ && wn(a, !0), r) {
5118
5140
  const s = [], o = [];
5119
- Xe("Patches").generateReplacementPatches_(t, a, s, o), r(s, o);
5141
+ Ze("Patches").generateReplacementPatches_(t, a, s, o), r(s, o);
5120
5142
  }
5121
5143
  return a;
5122
5144
  } else
5123
- de(1, t);
5145
+ fe(1, t);
5124
5146
  }, this.produceWithPatches = (t, n) => {
5125
5147
  if (typeof t == "function")
5126
5148
  return (o, ...i) => this.produceWithPatches(o, (c) => t(c, ...i));
@@ -5131,13 +5153,13 @@ var Ho = class {
5131
5153
  }, typeof (e == null ? void 0 : e.autoFreeze) == "boolean" && this.setAutoFreeze(e.autoFreeze), typeof (e == null ? void 0 : e.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(e.useStrictShallowCopy);
5132
5154
  }
5133
5155
  createDraft(e) {
5134
- Ke(e) || de(8), We(e) && (e = Go(e));
5156
+ Ye(e) || fe(8), Xe(e) && (e = Go(e));
5135
5157
  const t = Jn(this), n = un(e, void 0);
5136
5158
  return n[me].isManual_ = !0, cn(t), n;
5137
5159
  }
5138
5160
  finishDraft(e, t) {
5139
5161
  const n = e && e[me];
5140
- (!n || !n.isManual_) && de(9);
5162
+ (!n || !n.isManual_) && fe(9);
5141
5163
  const { scope_: r } = n;
5142
5164
  return Zn(r, t), Qn(void 0, r);
5143
5165
  }
@@ -5167,22 +5189,22 @@ var Ho = class {
5167
5189
  }
5168
5190
  }
5169
5191
  n > -1 && (t = t.slice(n + 1));
5170
- const r = Xe("Patches").applyPatches_;
5171
- return We(e) ? r(e, t) : this.produce(
5192
+ const r = Ze("Patches").applyPatches_;
5193
+ return Xe(e) ? r(e, t) : this.produce(
5172
5194
  e,
5173
5195
  (a) => r(a, t)
5174
5196
  );
5175
5197
  }
5176
5198
  };
5177
5199
  function un(e, t) {
5178
- const n = Dt(e) ? Xe("MapSet").proxyMap_(e, t) : $t(e) ? Xe("MapSet").proxySet_(e, t) : Bo(e, t);
5179
- return (t ? t.scope_ : ta()).drafts_.push(n), n;
5200
+ const n = Dt(e) ? Ze("MapSet").proxyMap_(e, t) : $t(e) ? Ze("MapSet").proxySet_(e, t) : Bo(e, t);
5201
+ return (t ? t.scope_ : na()).drafts_.push(n), n;
5180
5202
  }
5181
5203
  function Go(e) {
5182
- return We(e) || de(10, e), ra(e);
5204
+ return Xe(e) || fe(10, e), aa(e);
5183
5205
  }
5184
- function ra(e) {
5185
- if (!Ke(e) || Lt(e))
5206
+ function aa(e) {
5207
+ if (!Ye(e) || Lt(e))
5186
5208
  return e;
5187
5209
  const t = e[me];
5188
5210
  let n;
@@ -5193,7 +5215,7 @@ function ra(e) {
5193
5215
  } else
5194
5216
  n = sn(e, !0);
5195
5217
  return Tt(n, (r, a) => {
5196
- ea(n, r, ra(a));
5218
+ ta(n, r, aa(a));
5197
5219
  }), t && (t.finalized_ = !1), n;
5198
5220
  }
5199
5221
  var ge = new Ho(), Fn = ge.produce;
@@ -5379,29 +5401,29 @@ var tr = ge.createDraft.bind(ge), nr = ge.finishDraft.bind(ge), p = {
5379
5401
  return r;
5380
5402
  }
5381
5403
  };
5382
- function mt(e) {
5404
+ function gt(e) {
5383
5405
  "@babel/helpers - typeof";
5384
- return mt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
5406
+ return gt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
5385
5407
  return typeof t;
5386
5408
  } : function(t) {
5387
5409
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
5388
- }, mt(e);
5410
+ }, gt(e);
5389
5411
  }
5390
5412
  function Vo(e, t) {
5391
- if (mt(e) !== "object" || e === null) return e;
5413
+ if (gt(e) !== "object" || e === null) return e;
5392
5414
  var n = e[Symbol.toPrimitive];
5393
5415
  if (n !== void 0) {
5394
5416
  var r = n.call(e, t);
5395
- if (mt(r) !== "object") return r;
5417
+ if (gt(r) !== "object") return r;
5396
5418
  throw new TypeError("@@toPrimitive must return a primitive value.");
5397
5419
  }
5398
5420
  return (t === "string" ? String : Number)(e);
5399
5421
  }
5400
5422
  function Uo(e) {
5401
5423
  var t = Vo(e, "string");
5402
- return mt(t) === "symbol" ? t : String(t);
5424
+ return gt(t) === "symbol" ? t : String(t);
5403
5425
  }
5404
- function st(e, t, n) {
5426
+ function ot(e, t, n) {
5405
5427
  return t = Uo(t), t in e ? Object.defineProperty(e, t, {
5406
5428
  value: n,
5407
5429
  enumerable: !0,
@@ -5419,11 +5441,11 @@ function rr(e, t) {
5419
5441
  }
5420
5442
  return n;
5421
5443
  }
5422
- function ot(e) {
5444
+ function it(e) {
5423
5445
  for (var t = 1; t < arguments.length; t++) {
5424
5446
  var n = arguments[t] != null ? arguments[t] : {};
5425
5447
  t % 2 ? rr(Object(n), !0).forEach(function(r) {
5426
- st(e, r, n[r]);
5448
+ ot(e, r, n[r]);
5427
5449
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : rr(Object(n)).forEach(function(r) {
5428
5450
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
5429
5451
  });
@@ -5436,11 +5458,11 @@ var qo = (e, t, n) => {
5436
5458
  var {
5437
5459
  path: r,
5438
5460
  node: a
5439
- } = n, s = N.parent(e, r), o = r[r.length - 1];
5461
+ } = n, s = F.parent(e, r), o = r[r.length - 1];
5440
5462
  if (o > s.children.length)
5441
5463
  throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r, "] because the destination is past the end of the node."));
5442
5464
  if (s.children.splice(o, 0, a), t)
5443
- for (var [i, c] of R.points(t))
5465
+ for (var [i, c] of M.points(t))
5444
5466
  t[c] = U.transform(i, n);
5445
5467
  break;
5446
5468
  }
@@ -5451,145 +5473,145 @@ var qo = (e, t, n) => {
5451
5473
  text: d
5452
5474
  } = n;
5453
5475
  if (d.length === 0) break;
5454
- var _ = N.leaf(e, l), h = _.text.slice(0, u), m = _.text.slice(u);
5476
+ var _ = F.leaf(e, l), h = _.text.slice(0, u), m = _.text.slice(u);
5455
5477
  if (_.text = h + d + m, t)
5456
- for (var [g, y] of R.points(t))
5478
+ for (var [g, y] of M.points(t))
5457
5479
  t[y] = U.transform(g, n);
5458
5480
  break;
5459
5481
  }
5460
5482
  case "merge_node": {
5461
5483
  var {
5462
5484
  path: C
5463
- } = n, x = N.get(e, C), v = p.previous(C), w = N.get(e, v), H = N.parent(e, C), L = C[C.length - 1];
5464
- if (W.isText(x) && W.isText(w))
5465
- w.text += x.text;
5466
- else if (!W.isText(x) && !W.isText(w))
5467
- w.children.push(...x.children);
5485
+ } = n, E = F.get(e, C), v = p.previous(C), w = F.get(e, v), H = F.parent(e, C), D = C[C.length - 1];
5486
+ if (W.isText(E) && W.isText(w))
5487
+ w.text += E.text;
5488
+ else if (!W.isText(E) && !W.isText(w))
5489
+ w.children.push(...E.children);
5468
5490
  else
5469
- throw new Error('Cannot apply a "merge_node" operation at path ['.concat(C, "] to nodes of different interfaces: ").concat(we.stringify(x), " ").concat(we.stringify(w)));
5470
- if (H.children.splice(L, 1), t)
5471
- for (var [T, G] of R.points(t))
5472
- t[G] = U.transform(T, n);
5491
+ throw new Error('Cannot apply a "merge_node" operation at path ['.concat(C, "] to nodes of different interfaces: ").concat(Ne.stringify(E), " ").concat(Ne.stringify(w)));
5492
+ if (H.children.splice(D, 1), t)
5493
+ for (var [T, j] of M.points(t))
5494
+ t[j] = U.transform(T, n);
5473
5495
  break;
5474
5496
  }
5475
5497
  case "move_node": {
5476
5498
  var {
5477
- path: S,
5499
+ path: A,
5478
5500
  newPath: b
5479
5501
  } = n;
5480
- if (p.isAncestor(S, b))
5481
- throw new Error("Cannot move a path [".concat(S, "] to new path [").concat(b, "] because the destination is inside itself."));
5482
- var O = N.get(e, S), M = N.parent(e, S), P = S[S.length - 1];
5483
- M.children.splice(P, 1);
5484
- var j = p.transform(S, n), D = N.get(e, p.parent(j)), B = j[j.length - 1];
5485
- if (D.children.splice(B, 0, O), t)
5486
- for (var [I, Z] of R.points(t))
5487
- t[Z] = U.transform(I, n);
5502
+ if (p.isAncestor(A, b))
5503
+ throw new Error("Cannot move a path [".concat(A, "] to new path [").concat(b, "] because the destination is inside itself."));
5504
+ var O = F.get(e, A), $ = F.parent(e, A), I = A[A.length - 1];
5505
+ $.children.splice(I, 1);
5506
+ var z = p.transform(A, n), R = F.get(e, p.parent(z)), B = z[z.length - 1];
5507
+ if (R.children.splice(B, 0, O), t)
5508
+ for (var [N, Y] of M.points(t))
5509
+ t[Y] = U.transform(N, n);
5488
5510
  break;
5489
5511
  }
5490
5512
  case "remove_node": {
5491
5513
  var {
5492
- path: E
5493
- } = n, ie = E[E.length - 1], te = N.parent(e, E);
5494
- if (te.children.splice(ie, 1), t)
5495
- for (var [J, ve] of R.points(t)) {
5496
- var ce = U.transform(J, n);
5514
+ path: x
5515
+ } = n, _e = x[x.length - 1], X = F.parent(e, x);
5516
+ if (X.children.splice(_e, 1), t)
5517
+ for (var [Z, he] of M.points(t)) {
5518
+ var ce = U.transform(Z, n);
5497
5519
  if (t != null && ce != null)
5498
- t[ve] = ce;
5520
+ t[he] = ce;
5499
5521
  else {
5500
- var re = void 0, ae = void 0;
5501
- for (var [$, X] of N.texts(e))
5502
- if (p.compare(X, E) === -1)
5503
- re = [$, X];
5522
+ var se = void 0, te = void 0;
5523
+ for (var [L, ne] of F.texts(e))
5524
+ if (p.compare(ne, x) === -1)
5525
+ se = [L, ne];
5504
5526
  else {
5505
- ae = [$, X];
5527
+ te = [L, ne];
5506
5528
  break;
5507
5529
  }
5508
- var Re = !1;
5509
- re && ae && (p.equals(ae[1], E) ? Re = !p.hasPrevious(ae[1]) : Re = p.common(re[1], E).length < p.common(ae[1], E).length), re && !Re ? (J.path = re[1], J.offset = re[0].text.length) : ae ? (J.path = ae[1], J.offset = 0) : t = null;
5530
+ var Te = !1;
5531
+ se && te && (p.equals(te[1], x) ? Te = !p.hasPrevious(te[1]) : Te = p.common(se[1], x).length < p.common(te[1], x).length), se && !Te ? (Z.path = se[1], Z.offset = se[0].text.length) : te ? (Z.path = te[1], Z.offset = 0) : t = null;
5510
5532
  }
5511
5533
  }
5512
5534
  break;
5513
5535
  }
5514
5536
  case "remove_text": {
5515
5537
  var {
5516
- path: Ze,
5517
- offset: Me,
5518
- text: z
5538
+ path: De,
5539
+ offset: ke,
5540
+ text: G
5519
5541
  } = n;
5520
- if (z.length === 0) break;
5521
- var le = N.leaf(e, Ze), vt = le.text.slice(0, Me), qt = le.text.slice(Me + z.length);
5522
- if (le.text = vt + qt, t)
5523
- for (var [fe, De] of R.points(t))
5524
- t[De] = U.transform(fe, n);
5542
+ if (G.length === 0) break;
5543
+ var re = F.leaf(e, De), $e = re.text.slice(0, ke), qt = re.text.slice(ke + G.length);
5544
+ if (re.text = $e + qt, t)
5545
+ for (var [ue, Le] of M.points(t))
5546
+ t[Le] = U.transform(ue, n);
5525
5547
  break;
5526
5548
  }
5527
5549
  case "set_node": {
5528
5550
  var {
5529
- path: He,
5530
- properties: Fa,
5551
+ path: Ve,
5552
+ properties: Sa,
5531
5553
  newProperties: Wt
5532
5554
  } = n;
5533
- if (He.length === 0)
5555
+ if (Ve.length === 0)
5534
5556
  throw new Error("Cannot set properties on the root node!");
5535
- var Kt = N.get(e, He);
5536
- for (var Je in Wt) {
5537
- if (Je === "children" || Je === "text")
5538
- throw new Error('Cannot set the "'.concat(Je, '" property of nodes!'));
5539
- var Bn = Wt[Je];
5540
- Bn == null ? delete Kt[Je] : Kt[Je] = Bn;
5557
+ var Kt = F.get(e, Ve);
5558
+ for (var Qe in Wt) {
5559
+ if (Qe === "children" || Qe === "text")
5560
+ throw new Error('Cannot set the "'.concat(Qe, '" property of nodes!'));
5561
+ var Bn = Wt[Qe];
5562
+ Bn == null ? delete Kt[Qe] : Kt[Qe] = Bn;
5541
5563
  }
5542
- for (var zn in Fa)
5564
+ for (var zn in Sa)
5543
5565
  Wt.hasOwnProperty(zn) || delete Kt[zn];
5544
5566
  break;
5545
5567
  }
5546
5568
  case "set_selection": {
5547
5569
  var {
5548
- newProperties: Ge
5570
+ newProperties: Ue
5549
5571
  } = n;
5550
- if (Ge == null)
5551
- t = Ge;
5572
+ if (Ue == null)
5573
+ t = Ue;
5552
5574
  else {
5553
5575
  if (t == null) {
5554
- if (!R.isRange(Ge))
5555
- throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(we.stringify(Ge), " when there is no current selection."));
5556
- t = ot({}, Ge);
5576
+ if (!M.isRange(Ue))
5577
+ throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ne.stringify(Ue), " when there is no current selection."));
5578
+ t = it({}, Ue);
5557
5579
  }
5558
- for (var Qe in Ge) {
5559
- var Hn = Ge[Qe];
5580
+ for (var et in Ue) {
5581
+ var Hn = Ue[et];
5560
5582
  if (Hn == null) {
5561
- if (Qe === "anchor" || Qe === "focus")
5562
- throw new Error('Cannot remove the "'.concat(Qe, '" selection property'));
5563
- delete t[Qe];
5583
+ if (et === "anchor" || et === "focus")
5584
+ throw new Error('Cannot remove the "'.concat(et, '" selection property'));
5585
+ delete t[et];
5564
5586
  } else
5565
- t[Qe] = Hn;
5587
+ t[et] = Hn;
5566
5588
  }
5567
5589
  }
5568
5590
  break;
5569
5591
  }
5570
5592
  case "split_node": {
5571
5593
  var {
5572
- path: et,
5594
+ path: tt,
5573
5595
  position: kt,
5574
5596
  properties: Gn
5575
5597
  } = n;
5576
- if (et.length === 0)
5577
- throw new Error('Cannot apply a "split_node" operation at path ['.concat(et, "] because the root node cannot be split."));
5578
- var Ve = N.get(e, et), Sa = N.parent(e, et), Ta = et[et.length - 1], Xt;
5579
- if (W.isText(Ve)) {
5580
- var Oa = Ve.text.slice(0, kt), Pa = Ve.text.slice(kt);
5581
- Ve.text = Oa, Xt = ot(ot({}, Gn), {}, {
5582
- text: Pa
5598
+ if (tt.length === 0)
5599
+ throw new Error('Cannot apply a "split_node" operation at path ['.concat(tt, "] because the root node cannot be split."));
5600
+ var qe = F.get(e, tt), Ta = F.parent(e, tt), Oa = tt[tt.length - 1], Xt;
5601
+ if (W.isText(qe)) {
5602
+ var Pa = qe.text.slice(0, kt), Aa = qe.text.slice(kt);
5603
+ qe.text = Pa, Xt = it(it({}, Gn), {}, {
5604
+ text: Aa
5583
5605
  });
5584
5606
  } else {
5585
- var Aa = Ve.children.slice(0, kt), Ia = Ve.children.slice(kt);
5586
- Ve.children = Aa, Xt = ot(ot({}, Gn), {}, {
5587
- children: Ia
5607
+ var Ia = qe.children.slice(0, kt), Ra = qe.children.slice(kt);
5608
+ qe.children = Ia, Xt = it(it({}, Gn), {}, {
5609
+ children: Ra
5588
5610
  });
5589
5611
  }
5590
- if (Sa.children.splice(Ta + 1, 0, Xt), t)
5591
- for (var [Ra, Ma] of R.points(t))
5592
- t[Ma] = U.transform(Ra, n);
5612
+ if (Ta.children.splice(Oa + 1, 0, Xt), t)
5613
+ for (var [Ma, Da] of M.points(t))
5614
+ t[Da] = U.transform(Ma, n);
5593
5615
  break;
5594
5616
  }
5595
5617
  }
@@ -5601,7 +5623,7 @@ var qo = (e, t, n) => {
5601
5623
  try {
5602
5624
  n = qo(e, n, t);
5603
5625
  } finally {
5604
- e.children = nr(e.children), n ? e.selection = We(n) ? nr(n) : n : e.selection = null;
5626
+ e.children = nr(e.children), n ? e.selection = Xe(n) ? nr(n) : n : e.selection = null;
5605
5627
  }
5606
5628
  }
5607
5629
  }, Ko = {
@@ -5654,11 +5676,11 @@ var qo = (e, t, n) => {
5654
5676
  setSelection(e, t) {
5655
5677
  e.setSelection(t);
5656
5678
  }
5657
- }, aa = (e, t) => {
5679
+ }, sa = (e, t) => {
5658
5680
  for (var n in e) {
5659
5681
  var r = e[n], a = t[n];
5660
- if (se(r) && se(a)) {
5661
- if (!aa(r, a)) return !1;
5682
+ if (oe(r) && oe(a)) {
5683
+ if (!sa(r, a)) return !1;
5662
5684
  } else if (Array.isArray(r) && Array.isArray(a)) {
5663
5685
  if (r.length !== a.length) return !1;
5664
5686
  for (var s = 0; s < r.length; s++)
@@ -5678,7 +5700,7 @@ function Yo(e, t) {
5678
5700
  a = r[s], !(t.indexOf(a) >= 0) && (n[a] = e[a]);
5679
5701
  return n;
5680
5702
  }
5681
- function gt(e, t) {
5703
+ function ht(e, t) {
5682
5704
  if (e == null) return {};
5683
5705
  var n = Yo(e, t), r, a;
5684
5706
  if (Object.getOwnPropertySymbols) {
@@ -5703,14 +5725,14 @@ function Jo(e) {
5703
5725
  for (var t = 1; t < arguments.length; t++) {
5704
5726
  var n = arguments[t] != null ? arguments[t] : {};
5705
5727
  t % 2 ? ar(Object(n), !0).forEach(function(r) {
5706
- st(e, r, n[r]);
5728
+ ot(e, r, n[r]);
5707
5729
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ar(Object(n)).forEach(function(r) {
5708
5730
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
5709
5731
  });
5710
5732
  }
5711
5733
  return e;
5712
5734
  }
5713
- var R = {
5735
+ var M = {
5714
5736
  edges(e) {
5715
5737
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, {
5716
5738
  reverse: n = !1
@@ -5718,27 +5740,27 @@ var R = {
5718
5740
  anchor: r,
5719
5741
  focus: a
5720
5742
  } = e;
5721
- return R.isBackward(e) === n ? [r, a] : [a, r];
5743
+ return M.isBackward(e) === n ? [r, a] : [a, r];
5722
5744
  },
5723
5745
  end(e) {
5724
- var [, t] = R.edges(e);
5746
+ var [, t] = M.edges(e);
5725
5747
  return t;
5726
5748
  },
5727
5749
  equals(e, t) {
5728
5750
  return U.equals(e.anchor, t.anchor) && U.equals(e.focus, t.focus);
5729
5751
  },
5730
5752
  includes(e, t) {
5731
- if (R.isRange(t)) {
5732
- if (R.includes(e, t.anchor) || R.includes(e, t.focus))
5753
+ if (M.isRange(t)) {
5754
+ if (M.includes(e, t.anchor) || M.includes(e, t.focus))
5733
5755
  return !0;
5734
- var [n, r] = R.edges(e), [a, s] = R.edges(t);
5756
+ var [n, r] = M.edges(e), [a, s] = M.edges(t);
5735
5757
  return U.isBefore(n, a) && U.isAfter(r, s);
5736
5758
  }
5737
- var [o, i] = R.edges(e), c = !1, l = !1;
5759
+ var [o, i] = M.edges(e), c = !1, l = !1;
5738
5760
  return U.isPoint(t) ? (c = U.compare(t, o) >= 0, l = U.compare(t, i) <= 0) : (c = p.compare(t, o.path) >= 0, l = p.compare(t, i.path) <= 0), c && l;
5739
5761
  },
5740
5762
  intersection(e, t) {
5741
- var n = gt(e, Zo), [r, a] = R.edges(e), [s, o] = R.edges(t), i = U.isBefore(r, s) ? s : r, c = U.isBefore(a, o) ? a : o;
5763
+ var n = ht(e, Zo), [r, a] = M.edges(e), [s, o] = M.edges(t), i = U.isBefore(r, s) ? s : r, c = U.isBefore(a, o) ? a : o;
5742
5764
  return U.isBefore(c, i) ? null : Jo({
5743
5765
  anchor: i,
5744
5766
  focus: c
@@ -5759,19 +5781,19 @@ var R = {
5759
5781
  return U.equals(t, n);
5760
5782
  },
5761
5783
  isExpanded(e) {
5762
- return !R.isCollapsed(e);
5784
+ return !M.isCollapsed(e);
5763
5785
  },
5764
5786
  isForward(e) {
5765
- return !R.isBackward(e);
5787
+ return !M.isBackward(e);
5766
5788
  },
5767
5789
  isRange(e) {
5768
- return se(e) && U.isPoint(e.anchor) && U.isPoint(e.focus);
5790
+ return oe(e) && U.isPoint(e.anchor) && U.isPoint(e.focus);
5769
5791
  },
5770
5792
  *points(e) {
5771
5793
  yield [e.anchor, "anchor"], yield [e.focus, "focus"];
5772
5794
  },
5773
5795
  start(e) {
5774
- var [t] = R.edges(e);
5796
+ var [t] = M.edges(e);
5775
5797
  return t;
5776
5798
  },
5777
5799
  transform(e, t) {
@@ -5783,9 +5805,9 @@ var R = {
5783
5805
  affinity: a = "inward"
5784
5806
  } = n, s, o;
5785
5807
  if (a === "inward") {
5786
- var i = R.isCollapsed(r);
5787
- R.isForward(r) ? (s = "forward", o = i ? s : "backward") : (s = "backward", o = i ? s : "forward");
5788
- } else a === "outward" ? R.isForward(r) ? (s = "backward", o = "forward") : (s = "forward", o = "backward") : (s = a, o = a);
5808
+ var i = M.isCollapsed(r);
5809
+ M.isForward(r) ? (s = "forward", o = i ? s : "backward") : (s = "backward", o = i ? s : "forward");
5810
+ } else a === "outward" ? M.isForward(r) ? (s = "backward", o = "forward") : (s = "forward", o = "backward") : (s = a, o = a);
5789
5811
  var c = U.transform(r.anchor, t, {
5790
5812
  affinity: s
5791
5813
  }), l = U.transform(r.focus, t, {
@@ -5796,13 +5818,13 @@ var R = {
5796
5818
  r.anchor = c, r.focus = l;
5797
5819
  });
5798
5820
  }
5799
- }, sr = (e) => se(e) && N.isNodeList(e.children) && !he.isEditor(e), $e = {
5821
+ }, sr = (e) => oe(e) && F.isNodeList(e.children) && !pe.isEditor(e), je = {
5800
5822
  isAncestor(e) {
5801
- return se(e) && N.isNodeList(e.children);
5823
+ return oe(e) && F.isNodeList(e.children);
5802
5824
  },
5803
5825
  isElement: sr,
5804
5826
  isElementList(e) {
5805
- return Array.isArray(e) && e.every((t) => $e.isElement(t));
5827
+ return Array.isArray(e) && e.every((t) => je.isElement(t));
5806
5828
  },
5807
5829
  isElementProps(e) {
5808
5830
  return e.children !== void 0;
@@ -5817,28 +5839,28 @@ var R = {
5817
5839
  return !1;
5818
5840
  return !0;
5819
5841
  }
5820
- }, Qo = ["children"], ei = ["text"], or = /* @__PURE__ */ new WeakMap(), N = {
5842
+ }, Qo = ["children"], ei = ["text"], or = /* @__PURE__ */ new WeakMap(), F = {
5821
5843
  ancestor(e, t) {
5822
- var n = N.get(e, t);
5844
+ var n = F.get(e, t);
5823
5845
  if (W.isText(n))
5824
- throw new Error("Cannot get the ancestor node at path [".concat(t, "] because it refers to a text node instead: ").concat(we.stringify(n)));
5846
+ throw new Error("Cannot get the ancestor node at path [".concat(t, "] because it refers to a text node instead: ").concat(Ne.stringify(n)));
5825
5847
  return n;
5826
5848
  },
5827
5849
  ancestors(e, t) {
5828
5850
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
5829
5851
  return function* () {
5830
5852
  for (var r of p.ancestors(t, n)) {
5831
- var a = N.ancestor(e, r), s = [a, r];
5853
+ var a = F.ancestor(e, r), s = [a, r];
5832
5854
  yield s;
5833
5855
  }
5834
5856
  }();
5835
5857
  },
5836
5858
  child(e, t) {
5837
5859
  if (W.isText(e))
5838
- throw new Error("Cannot get the child of a text node: ".concat(we.stringify(e)));
5860
+ throw new Error("Cannot get the child of a text node: ".concat(Ne.stringify(e)));
5839
5861
  var n = e.children[t];
5840
5862
  if (n == null)
5841
- throw new Error("Cannot get child at index `".concat(t, "` in node: ").concat(we.stringify(e)));
5863
+ throw new Error("Cannot get child at index `".concat(t, "` in node: ").concat(Ne.stringify(e)));
5842
5864
  return n;
5843
5865
  },
5844
5866
  children(e, t) {
@@ -5846,80 +5868,80 @@ var R = {
5846
5868
  return function* () {
5847
5869
  for (var {
5848
5870
  reverse: r = !1
5849
- } = n, a = N.ancestor(e, t), {
5871
+ } = n, a = F.ancestor(e, t), {
5850
5872
  children: s
5851
5873
  } = a, o = r ? s.length - 1 : 0; r ? o >= 0 : o < s.length; ) {
5852
- var i = N.child(a, o), c = t.concat(o);
5874
+ var i = F.child(a, o), c = t.concat(o);
5853
5875
  yield [i, c], o = r ? o - 1 : o + 1;
5854
5876
  }
5855
5877
  }();
5856
5878
  },
5857
5879
  common(e, t, n) {
5858
- var r = p.common(t, n), a = N.get(e, r);
5880
+ var r = p.common(t, n), a = F.get(e, r);
5859
5881
  return [a, r];
5860
5882
  },
5861
5883
  descendant(e, t) {
5862
- var n = N.get(e, t);
5863
- if (he.isEditor(n))
5864
- throw new Error("Cannot get the descendant node at path [".concat(t, "] because it refers to the root editor node instead: ").concat(we.stringify(n)));
5884
+ var n = F.get(e, t);
5885
+ if (pe.isEditor(n))
5886
+ throw new Error("Cannot get the descendant node at path [".concat(t, "] because it refers to the root editor node instead: ").concat(Ne.stringify(n)));
5865
5887
  return n;
5866
5888
  },
5867
5889
  descendants(e) {
5868
5890
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
5869
5891
  return function* () {
5870
- for (var [n, r] of N.nodes(e, t))
5892
+ for (var [n, r] of F.nodes(e, t))
5871
5893
  r.length !== 0 && (yield [n, r]);
5872
5894
  }();
5873
5895
  },
5874
5896
  elements(e) {
5875
5897
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
5876
5898
  return function* () {
5877
- for (var [n, r] of N.nodes(e, t))
5878
- $e.isElement(n) && (yield [n, r]);
5899
+ for (var [n, r] of F.nodes(e, t))
5900
+ je.isElement(n) && (yield [n, r]);
5879
5901
  }();
5880
5902
  },
5881
5903
  extractProps(e) {
5882
- if ($e.isAncestor(e)) {
5883
- var t = gt(e, Qo);
5904
+ if (je.isAncestor(e)) {
5905
+ var t = ht(e, Qo);
5884
5906
  return t;
5885
5907
  } else {
5886
- var t = gt(e, ei);
5908
+ var t = ht(e, ei);
5887
5909
  return t;
5888
5910
  }
5889
5911
  },
5890
5912
  first(e, t) {
5891
- for (var n = t.slice(), r = N.get(e, n); r && !(W.isText(r) || r.children.length === 0); )
5913
+ for (var n = t.slice(), r = F.get(e, n); r && !(W.isText(r) || r.children.length === 0); )
5892
5914
  r = r.children[0], n.push(0);
5893
5915
  return [r, n];
5894
5916
  },
5895
5917
  fragment(e, t) {
5896
5918
  if (W.isText(e))
5897
- throw new Error("Cannot get a fragment starting from a root text node: ".concat(we.stringify(e)));
5919
+ throw new Error("Cannot get a fragment starting from a root text node: ".concat(Ne.stringify(e)));
5898
5920
  var n = Fn({
5899
5921
  children: e.children
5900
5922
  }, (r) => {
5901
- var [a, s] = R.edges(t), o = N.nodes(r, {
5923
+ var [a, s] = M.edges(t), o = F.nodes(r, {
5902
5924
  reverse: !0,
5903
5925
  pass: (_) => {
5904
5926
  var [, h] = _;
5905
- return !R.includes(t, h);
5927
+ return !M.includes(t, h);
5906
5928
  }
5907
5929
  });
5908
5930
  for (var [, i] of o) {
5909
- if (!R.includes(t, i)) {
5910
- var c = N.parent(r, i), l = i[i.length - 1];
5931
+ if (!M.includes(t, i)) {
5932
+ var c = F.parent(r, i), l = i[i.length - 1];
5911
5933
  c.children.splice(l, 1);
5912
5934
  }
5913
5935
  if (p.equals(i, s.path)) {
5914
- var u = N.leaf(r, i);
5936
+ var u = F.leaf(r, i);
5915
5937
  u.text = u.text.slice(0, s.offset);
5916
5938
  }
5917
5939
  if (p.equals(i, a.path)) {
5918
- var d = N.leaf(r, i);
5940
+ var d = F.leaf(r, i);
5919
5941
  d.text = d.text.slice(a.offset);
5920
5942
  }
5921
5943
  }
5922
- he.isEditor(r) && (r.selection = null);
5944
+ pe.isEditor(r) && (r.selection = null);
5923
5945
  });
5924
5946
  return n.children;
5925
5947
  },
@@ -5927,7 +5949,7 @@ var R = {
5927
5949
  for (var n = e, r = 0; r < t.length; r++) {
5928
5950
  var a = t[r];
5929
5951
  if (W.isText(n) || !n.children[a])
5930
- throw new Error("Cannot find a descendant at path [".concat(t, "] in node: ").concat(we.stringify(e)));
5952
+ throw new Error("Cannot find a descendant at path [".concat(t, "] in node: ").concat(Ne.stringify(e)));
5931
5953
  n = n.children[a];
5932
5954
  }
5933
5955
  return n;
@@ -5942,7 +5964,7 @@ var R = {
5942
5964
  return !0;
5943
5965
  },
5944
5966
  isNode(e) {
5945
- return W.isText(e) || $e.isElement(e) || he.isEditor(e);
5967
+ return W.isText(e) || je.isElement(e) || pe.isEditor(e);
5946
5968
  },
5947
5969
  isNodeList(e) {
5948
5970
  if (!Array.isArray(e))
@@ -5950,33 +5972,33 @@ var R = {
5950
5972
  var t = or.get(e);
5951
5973
  if (t !== void 0)
5952
5974
  return t;
5953
- var n = e.every((r) => N.isNode(r));
5975
+ var n = e.every((r) => F.isNode(r));
5954
5976
  return or.set(e, n), n;
5955
5977
  },
5956
5978
  last(e, t) {
5957
- for (var n = t.slice(), r = N.get(e, n); r && !(W.isText(r) || r.children.length === 0); ) {
5979
+ for (var n = t.slice(), r = F.get(e, n); r && !(W.isText(r) || r.children.length === 0); ) {
5958
5980
  var a = r.children.length - 1;
5959
5981
  r = r.children[a], n.push(a);
5960
5982
  }
5961
5983
  return [r, n];
5962
5984
  },
5963
5985
  leaf(e, t) {
5964
- var n = N.get(e, t);
5986
+ var n = F.get(e, t);
5965
5987
  if (!W.isText(n))
5966
- throw new Error("Cannot get the leaf node at path [".concat(t, "] because it refers to a non-leaf node: ").concat(we.stringify(n)));
5988
+ throw new Error("Cannot get the leaf node at path [".concat(t, "] because it refers to a non-leaf node: ").concat(Ne.stringify(n)));
5967
5989
  return n;
5968
5990
  },
5969
5991
  levels(e, t) {
5970
5992
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
5971
5993
  return function* () {
5972
5994
  for (var r of p.levels(t, n)) {
5973
- var a = N.get(e, r);
5995
+ var a = F.get(e, r);
5974
5996
  yield [a, r];
5975
5997
  }
5976
5998
  }();
5977
5999
  },
5978
6000
  matches(e, t) {
5979
- return $e.isElement(e) && $e.isElementProps(t) && $e.matches(e, t) || W.isText(e) && W.isTextProps(t) && W.matches(e, t);
6001
+ return je.isElement(e) && je.isElementProps(t) && je.matches(e, t) || W.isText(e) && W.isTextProps(t) && W.matches(e, t);
5980
6002
  },
5981
6003
  nodes(e) {
5982
6004
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
@@ -5991,40 +6013,40 @@ var R = {
5991
6013
  if (o.has(c) || (yield [c, i]), !o.has(c) && !W.isText(c) && c.children.length !== 0 && (n == null || n([c, i]) === !1)) {
5992
6014
  o.add(c);
5993
6015
  var l = r ? c.children.length - 1 : 0;
5994
- p.isAncestor(i, a) && (l = a[i.length]), i = i.concat(l), c = N.get(e, i);
6016
+ p.isAncestor(i, a) && (l = a[i.length]), i = i.concat(l), c = F.get(e, i);
5995
6017
  continue;
5996
6018
  }
5997
6019
  if (i.length === 0)
5998
6020
  break;
5999
6021
  if (!r) {
6000
6022
  var u = p.next(i);
6001
- if (N.has(e, u)) {
6002
- i = u, c = N.get(e, i);
6023
+ if (F.has(e, u)) {
6024
+ i = u, c = F.get(e, i);
6003
6025
  continue;
6004
6026
  }
6005
6027
  }
6006
6028
  if (r && i[i.length - 1] !== 0) {
6007
6029
  var d = p.previous(i);
6008
- i = d, c = N.get(e, i);
6030
+ i = d, c = F.get(e, i);
6009
6031
  continue;
6010
6032
  }
6011
- i = p.parent(i), c = N.get(e, i), o.add(c);
6033
+ i = p.parent(i), c = F.get(e, i), o.add(c);
6012
6034
  }
6013
6035
  }();
6014
6036
  },
6015
6037
  parent(e, t) {
6016
- var n = p.parent(t), r = N.get(e, n);
6038
+ var n = p.parent(t), r = F.get(e, n);
6017
6039
  if (W.isText(r))
6018
6040
  throw new Error("Cannot get the parent of path [".concat(t, "] because it does not exist in the root."));
6019
6041
  return r;
6020
6042
  },
6021
6043
  string(e) {
6022
- return W.isText(e) ? e.text : e.children.map(N.string).join("");
6044
+ return W.isText(e) ? e.text : e.children.map(F.string).join("");
6023
6045
  },
6024
6046
  texts(e) {
6025
6047
  var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6026
6048
  return function* () {
6027
- for (var [n, r] of N.nodes(e, t))
6049
+ for (var [n, r] of F.nodes(e, t))
6028
6050
  W.isText(n) && (yield [n, r]);
6029
6051
  }();
6030
6052
  }
@@ -6043,51 +6065,51 @@ function q(e) {
6043
6065
  for (var t = 1; t < arguments.length; t++) {
6044
6066
  var n = arguments[t] != null ? arguments[t] : {};
6045
6067
  t % 2 ? ir(Object(n), !0).forEach(function(r) {
6046
- st(e, r, n[r]);
6068
+ ot(e, r, n[r]);
6047
6069
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ir(Object(n)).forEach(function(r) {
6048
6070
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
6049
6071
  });
6050
6072
  }
6051
6073
  return e;
6052
6074
  }
6053
- var it = {
6075
+ var ct = {
6054
6076
  isNodeOperation(e) {
6055
- return it.isOperation(e) && e.type.endsWith("_node");
6077
+ return ct.isOperation(e) && e.type.endsWith("_node");
6056
6078
  },
6057
6079
  isOperation(e) {
6058
- if (!se(e))
6080
+ if (!oe(e))
6059
6081
  return !1;
6060
6082
  switch (e.type) {
6061
6083
  case "insert_node":
6062
- return p.isPath(e.path) && N.isNode(e.node);
6084
+ return p.isPath(e.path) && F.isNode(e.node);
6063
6085
  case "insert_text":
6064
6086
  return typeof e.offset == "number" && typeof e.text == "string" && p.isPath(e.path);
6065
6087
  case "merge_node":
6066
- return typeof e.position == "number" && p.isPath(e.path) && se(e.properties);
6088
+ return typeof e.position == "number" && p.isPath(e.path) && oe(e.properties);
6067
6089
  case "move_node":
6068
6090
  return p.isPath(e.path) && p.isPath(e.newPath);
6069
6091
  case "remove_node":
6070
- return p.isPath(e.path) && N.isNode(e.node);
6092
+ return p.isPath(e.path) && F.isNode(e.node);
6071
6093
  case "remove_text":
6072
6094
  return typeof e.offset == "number" && typeof e.text == "string" && p.isPath(e.path);
6073
6095
  case "set_node":
6074
- return p.isPath(e.path) && se(e.properties) && se(e.newProperties);
6096
+ return p.isPath(e.path) && oe(e.properties) && oe(e.newProperties);
6075
6097
  case "set_selection":
6076
- return e.properties === null && R.isRange(e.newProperties) || e.newProperties === null && R.isRange(e.properties) || se(e.properties) && se(e.newProperties);
6098
+ return e.properties === null && M.isRange(e.newProperties) || e.newProperties === null && M.isRange(e.properties) || oe(e.properties) && oe(e.newProperties);
6077
6099
  case "split_node":
6078
- return p.isPath(e.path) && typeof e.position == "number" && se(e.properties);
6100
+ return p.isPath(e.path) && typeof e.position == "number" && oe(e.properties);
6079
6101
  default:
6080
6102
  return !1;
6081
6103
  }
6082
6104
  },
6083
6105
  isOperationList(e) {
6084
- return Array.isArray(e) && e.every((t) => it.isOperation(t));
6106
+ return Array.isArray(e) && e.every((t) => ct.isOperation(t));
6085
6107
  },
6086
6108
  isSelectionOperation(e) {
6087
- return it.isOperation(e) && e.type.endsWith("_selection");
6109
+ return ct.isOperation(e) && e.type.endsWith("_selection");
6088
6110
  },
6089
6111
  isTextOperation(e) {
6090
- return it.isOperation(e) && e.type.endsWith("_text");
6112
+ return ct.isOperation(e) && e.type.endsWith("_text");
6091
6113
  },
6092
6114
  inverse(e) {
6093
6115
  switch (e.type) {
@@ -6167,11 +6189,11 @@ var it = {
6167
6189
  var t = cr.get(e);
6168
6190
  if (t !== void 0)
6169
6191
  return t;
6170
- if (!se(e))
6192
+ if (!oe(e))
6171
6193
  return !1;
6172
- var n = typeof e.addMark == "function" && typeof e.apply == "function" && typeof e.deleteFragment == "function" && typeof e.insertBreak == "function" && typeof e.insertSoftBreak == "function" && typeof e.insertFragment == "function" && typeof e.insertNode == "function" && typeof e.insertText == "function" && typeof e.isElementReadOnly == "function" && typeof e.isInline == "function" && typeof e.isSelectable == "function" && typeof e.isVoid == "function" && typeof e.normalizeNode == "function" && typeof e.onChange == "function" && typeof e.removeMark == "function" && typeof e.getDirtyPaths == "function" && (e.marks === null || se(e.marks)) && (e.selection === null || R.isRange(e.selection)) && N.isNodeList(e.children) && it.isOperationList(e.operations);
6194
+ var n = typeof e.addMark == "function" && typeof e.apply == "function" && typeof e.deleteFragment == "function" && typeof e.insertBreak == "function" && typeof e.insertSoftBreak == "function" && typeof e.insertFragment == "function" && typeof e.insertNode == "function" && typeof e.insertText == "function" && typeof e.isElementReadOnly == "function" && typeof e.isInline == "function" && typeof e.isSelectable == "function" && typeof e.isVoid == "function" && typeof e.normalizeNode == "function" && typeof e.onChange == "function" && typeof e.removeMark == "function" && typeof e.getDirtyPaths == "function" && (e.marks === null || oe(e.marks)) && (e.selection === null || M.isRange(e.selection)) && F.isNodeList(e.children) && ct.isOperationList(e.operations);
6173
6195
  return cr.set(e, n), n;
6174
- }, he = {
6196
+ }, pe = {
6175
6197
  above(e, t) {
6176
6198
  return e.above(t);
6177
6199
  },
@@ -6372,7 +6394,7 @@ function ur(e) {
6372
6394
  for (var t = 1; t < arguments.length; t++) {
6373
6395
  var n = arguments[t] != null ? arguments[t] : {};
6374
6396
  t % 2 ? lr(Object(n), !0).forEach(function(r) {
6375
- st(e, r, n[r]);
6397
+ ot(e, r, n[r]);
6376
6398
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : lr(Object(n)).forEach(function(r) {
6377
6399
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
6378
6400
  });
@@ -6394,7 +6416,7 @@ var U = {
6394
6416
  return e.offset === t.offset && p.equals(e.path, t.path);
6395
6417
  },
6396
6418
  isPoint(e) {
6397
- return se(e) && typeof e.offset == "number" && p.isPath(e.path);
6419
+ return oe(e) && typeof e.offset == "number" && p.isPath(e.path);
6398
6420
  },
6399
6421
  transform(e, t) {
6400
6422
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
@@ -6445,7 +6467,7 @@ var U = {
6445
6467
  }
6446
6468
  });
6447
6469
  }
6448
- }, fr = void 0, we = {
6470
+ }, fr = void 0, Ne = {
6449
6471
  setScrubber(e) {
6450
6472
  fr = e;
6451
6473
  },
@@ -6463,11 +6485,11 @@ function dr(e, t) {
6463
6485
  }
6464
6486
  return n;
6465
6487
  }
6466
- function Te(e) {
6488
+ function Pe(e) {
6467
6489
  for (var t = 1; t < arguments.length; t++) {
6468
6490
  var n = arguments[t] != null ? arguments[t] : {};
6469
6491
  t % 2 ? dr(Object(n), !0).forEach(function(r) {
6470
- st(e, r, n[r]);
6492
+ ot(e, r, n[r]);
6471
6493
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : dr(Object(n)).forEach(function(r) {
6472
6494
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
6473
6495
  });
@@ -6480,13 +6502,13 @@ var W = {
6480
6502
  loose: r = !1
6481
6503
  } = n;
6482
6504
  function a(s) {
6483
- var o = gt(s, ni);
6505
+ var o = ht(s, ni);
6484
6506
  return o;
6485
6507
  }
6486
- return aa(r ? a(e) : e, r ? a(t) : t);
6508
+ return sa(r ? a(e) : e, r ? a(t) : t);
6487
6509
  },
6488
6510
  isText(e) {
6489
- return se(e) && typeof e.text == "string";
6511
+ return oe(e) && typeof e.text == "string";
6490
6512
  },
6491
6513
  isTextList(e) {
6492
6514
  return Array.isArray(e) && e.every((t) => W.isText(t));
@@ -6501,9 +6523,9 @@ var W = {
6501
6523
  return !0;
6502
6524
  },
6503
6525
  decorations(e, t) {
6504
- var n = [Te({}, e)];
6526
+ var n = [Pe({}, e)];
6505
6527
  for (var r of t) {
6506
- var a = gt(r, ri), [s, o] = R.edges(r), i = [], c = 0, l = s.offset, u = o.offset;
6528
+ var a = ht(r, ri), [s, o] = M.edges(r), i = [], c = 0, l = s.offset, u = o.offset;
6507
6529
  for (var d of n) {
6508
6530
  var {
6509
6531
  length: _
@@ -6519,18 +6541,18 @@ var W = {
6519
6541
  var m = d, g = void 0, y = void 0;
6520
6542
  if (u < c) {
6521
6543
  var C = u - h;
6522
- y = Te(Te({}, m), {}, {
6544
+ y = Pe(Pe({}, m), {}, {
6523
6545
  text: m.text.slice(C)
6524
- }), m = Te(Te({}, m), {}, {
6546
+ }), m = Pe(Pe({}, m), {}, {
6525
6547
  text: m.text.slice(0, C)
6526
6548
  });
6527
6549
  }
6528
6550
  if (l > h) {
6529
- var x = l - h;
6530
- g = Te(Te({}, m), {}, {
6531
- text: m.text.slice(0, x)
6532
- }), m = Te(Te({}, m), {}, {
6533
- text: m.text.slice(x)
6551
+ var E = l - h;
6552
+ g = Pe(Pe({}, m), {}, {
6553
+ text: m.text.slice(0, E)
6554
+ }), m = Pe(Pe({}, m), {}, {
6555
+ text: m.text.slice(E)
6534
6556
  });
6535
6557
  }
6536
6558
  Object.assign(m, a), g && i.push(g), i.push(m), y && i.push(y);
@@ -6539,7 +6561,7 @@ var W = {
6539
6561
  }
6540
6562
  return n;
6541
6563
  }
6542
- }, ai = (e) => e.selection ? e.selection : e.children.length > 0 ? he.end(e, []) : [0], V;
6564
+ }, ai = (e) => e.selection ? e.selection : e.children.length > 0 ? pe.end(e, []) : [0], V;
6543
6565
  (function(e) {
6544
6566
  e[e.None = 0] = "None", e[e.Extend = 1] = "Extend", e[e.ZWJ = 2] = "ZWJ", e[e.RI = 4] = "RI", e[e.Prepend = 8] = "Prepend", e[e.SpacingMark = 16] = "SpacingMark", e[e.L = 32] = "L", e[e.V = 64] = "V", e[e.T = 128] = "T", e[e.LV = 256] = "LV", e[e.LVT = 512] = "LVT", e[e.ExtPict = 1024] = "ExtPict", e[e.Any = 2048] = "Any";
6545
6567
  })(V || (V = {}));
@@ -6553,22 +6575,22 @@ var si = {
6553
6575
  },
6554
6576
  insertText(e, t) {
6555
6577
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
6556
- he.withoutNormalizing(e, () => {
6578
+ pe.withoutNormalizing(e, () => {
6557
6579
  var {
6558
6580
  voids: r = !1
6559
6581
  } = n, {
6560
6582
  at: a = ai(e)
6561
6583
  } = n;
6562
- if (p.isPath(a) && (a = he.range(e, a)), R.isRange(a))
6563
- if (R.isCollapsed(a))
6584
+ if (p.isPath(a) && (a = pe.range(e, a)), M.isRange(a))
6585
+ if (M.isCollapsed(a))
6564
6586
  a = a.anchor;
6565
6587
  else {
6566
- var s = R.end(a);
6567
- if (!r && he.void(e, {
6588
+ var s = M.end(a);
6589
+ if (!r && pe.void(e, {
6568
6590
  at: s
6569
6591
  }))
6570
6592
  return;
6571
- var o = R.start(a), i = he.pointRef(e, o), c = he.pointRef(e, s);
6593
+ var o = M.start(a), i = pe.pointRef(e, o), c = pe.pointRef(e, s);
6572
6594
  mr.delete(e, {
6573
6595
  at: a,
6574
6596
  voids: r
@@ -6579,9 +6601,9 @@ var si = {
6579
6601
  focus: a
6580
6602
  });
6581
6603
  }
6582
- if (!(!r && he.void(e, {
6604
+ if (!(!r && pe.void(e, {
6583
6605
  at: a
6584
- }) || he.elementReadOnly(e, {
6606
+ }) || pe.elementReadOnly(e, {
6585
6607
  at: a
6586
6608
  }))) {
6587
6609
  var {
@@ -6612,7 +6634,7 @@ function bt(e) {
6612
6634
  for (var t = 1; t < arguments.length; t++) {
6613
6635
  var n = arguments[t] != null ? arguments[t] : {};
6614
6636
  t % 2 ? _r(Object(n), !0).forEach(function(r) {
6615
- st(e, r, n[r]);
6637
+ ot(e, r, n[r]);
6616
6638
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : _r(Object(n)).forEach(function(r) {
6617
6639
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
6618
6640
  });
@@ -6620,13 +6642,13 @@ function bt(e) {
6620
6642
  return e;
6621
6643
  }
6622
6644
  var mr = bt(bt(bt(bt({}, Wo), Ko), Xo), si);
6623
- function sa(e) {
6645
+ function oa(e) {
6624
6646
  if (W.isText(e)) {
6625
6647
  let t = e == null ? void 0 : e.text;
6626
6648
  return e != null && e.bold && (t = `<strong>${t}</strong>`), e != null && e.code && (t = `<code>${t}</code>`), e != null && e.italic && (t = `<em>${t}</em>`), e != null && e.underline && (t = `<u>${t}</u>`), t;
6627
6649
  }
6628
- if ($e.isElement(e)) {
6629
- const t = e.children.map((r) => sa(r)).join(""), n = e.align || "left";
6650
+ if (je.isElement(e)) {
6651
+ const t = e.children.map((r) => oa(r)).join(""), n = e.align || "left";
6630
6652
  switch (e.type) {
6631
6653
  case "image":
6632
6654
  return `<img src="${e.src}" class="align_${n}" />`;
@@ -6690,13 +6712,13 @@ function fn(e) {
6690
6712
  }
6691
6713
  }
6692
6714
  function al(e) {
6693
- return e.map((t) => sa(t)).join("");
6715
+ return e.map((t) => oa(t)).join("");
6694
6716
  }
6695
- var Y = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6717
+ var J = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6696
6718
  function oi(e) {
6697
6719
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6698
6720
  }
6699
- var oa = {}, Sn = {}, Tn = {}, Ye = {}, On = {}, Pn = {};
6721
+ var ia = {}, Sn = {}, Tn = {}, Je = {}, On = {}, Pn = {};
6700
6722
  (function(e) {
6701
6723
  Object.defineProperty(e, "__esModule", { value: !0 }), e.Doctype = e.CDATA = e.Tag = e.Style = e.Script = e.Comment = e.Directive = e.Text = e.Root = e.isTag = e.ElementType = void 0;
6702
6724
  var t;
@@ -6708,7 +6730,7 @@ var oa = {}, Sn = {}, Tn = {}, Ye = {}, On = {}, Pn = {};
6708
6730
  }
6709
6731
  e.isTag = n, e.Root = t.Root, e.Text = t.Text, e.Directive = t.Directive, e.Comment = t.Comment, e.Script = t.Script, e.Style = t.Style, e.Tag = t.Tag, e.CDATA = t.CDATA, e.Doctype = t.Doctype;
6710
6732
  })(Pn);
6711
- var A = {}, Be = Y && Y.__extends || /* @__PURE__ */ function() {
6733
+ var P = {}, He = J && J.__extends || /* @__PURE__ */ function() {
6712
6734
  var e = function(t, n) {
6713
6735
  return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, a) {
6714
6736
  r.__proto__ = a;
@@ -6725,18 +6747,18 @@ var A = {}, Be = Y && Y.__extends || /* @__PURE__ */ function() {
6725
6747
  }
6726
6748
  t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
6727
6749
  };
6728
- }(), lt = Y && Y.__assign || function() {
6729
- return lt = Object.assign || function(e) {
6750
+ }(), ut = J && J.__assign || function() {
6751
+ return ut = Object.assign || function(e) {
6730
6752
  for (var t, n = 1, r = arguments.length; n < r; n++) {
6731
6753
  t = arguments[n];
6732
6754
  for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
6733
6755
  }
6734
6756
  return e;
6735
- }, lt.apply(this, arguments);
6757
+ }, ut.apply(this, arguments);
6736
6758
  };
6737
- Object.defineProperty(A, "__esModule", { value: !0 });
6738
- A.cloneNode = A.hasChildren = A.isDocument = A.isDirective = A.isComment = A.isText = A.isCDATA = A.isTag = A.Element = A.Document = A.CDATA = A.NodeWithChildren = A.ProcessingInstruction = A.Comment = A.Text = A.DataNode = A.Node = void 0;
6739
- var _e = Pn, An = (
6759
+ Object.defineProperty(P, "__esModule", { value: !0 });
6760
+ P.cloneNode = P.hasChildren = P.isDocument = P.isDirective = P.isComment = P.isText = P.isCDATA = P.isTag = P.Element = P.Document = P.CDATA = P.NodeWithChildren = P.ProcessingInstruction = P.Comment = P.Text = P.DataNode = P.Node = void 0;
6761
+ var de = Pn, An = (
6740
6762
  /** @class */
6741
6763
  function() {
6742
6764
  function e() {
@@ -6787,11 +6809,11 @@ var _e = Pn, An = (
6787
6809
  }, e;
6788
6810
  }()
6789
6811
  );
6790
- A.Node = An;
6812
+ P.Node = An;
6791
6813
  var jt = (
6792
6814
  /** @class */
6793
6815
  function(e) {
6794
- Be(t, e);
6816
+ He(t, e);
6795
6817
  function t(n) {
6796
6818
  var r = e.call(this) || this;
6797
6819
  return r.data = n, r;
@@ -6812,14 +6834,14 @@ var jt = (
6812
6834
  }), t;
6813
6835
  }(An)
6814
6836
  );
6815
- A.DataNode = jt;
6816
- var ia = (
6837
+ P.DataNode = jt;
6838
+ var ca = (
6817
6839
  /** @class */
6818
6840
  function(e) {
6819
- Be(t, e);
6841
+ He(t, e);
6820
6842
  function t() {
6821
6843
  var n = e !== null && e.apply(this, arguments) || this;
6822
- return n.type = _e.ElementType.Text, n;
6844
+ return n.type = de.ElementType.Text, n;
6823
6845
  }
6824
6846
  return Object.defineProperty(t.prototype, "nodeType", {
6825
6847
  get: function() {
@@ -6830,14 +6852,14 @@ var ia = (
6830
6852
  }), t;
6831
6853
  }(jt)
6832
6854
  );
6833
- A.Text = ia;
6834
- var ca = (
6855
+ P.Text = ca;
6856
+ var la = (
6835
6857
  /** @class */
6836
6858
  function(e) {
6837
- Be(t, e);
6859
+ He(t, e);
6838
6860
  function t() {
6839
6861
  var n = e !== null && e.apply(this, arguments) || this;
6840
- return n.type = _e.ElementType.Comment, n;
6862
+ return n.type = de.ElementType.Comment, n;
6841
6863
  }
6842
6864
  return Object.defineProperty(t.prototype, "nodeType", {
6843
6865
  get: function() {
@@ -6848,14 +6870,14 @@ var ca = (
6848
6870
  }), t;
6849
6871
  }(jt)
6850
6872
  );
6851
- A.Comment = ca;
6852
- var la = (
6873
+ P.Comment = la;
6874
+ var ua = (
6853
6875
  /** @class */
6854
6876
  function(e) {
6855
- Be(t, e);
6877
+ He(t, e);
6856
6878
  function t(n, r) {
6857
6879
  var a = e.call(this, r) || this;
6858
- return a.name = n, a.type = _e.ElementType.Directive, a;
6880
+ return a.name = n, a.type = de.ElementType.Directive, a;
6859
6881
  }
6860
6882
  return Object.defineProperty(t.prototype, "nodeType", {
6861
6883
  get: function() {
@@ -6866,11 +6888,11 @@ var la = (
6866
6888
  }), t;
6867
6889
  }(jt)
6868
6890
  );
6869
- A.ProcessingInstruction = la;
6891
+ P.ProcessingInstruction = ua;
6870
6892
  var Bt = (
6871
6893
  /** @class */
6872
6894
  function(e) {
6873
- Be(t, e);
6895
+ He(t, e);
6874
6896
  function t(n) {
6875
6897
  var r = e.call(this) || this;
6876
6898
  return r.children = n, r;
@@ -6907,14 +6929,14 @@ var Bt = (
6907
6929
  }), t;
6908
6930
  }(An)
6909
6931
  );
6910
- A.NodeWithChildren = Bt;
6911
- var ua = (
6932
+ P.NodeWithChildren = Bt;
6933
+ var fa = (
6912
6934
  /** @class */
6913
6935
  function(e) {
6914
- Be(t, e);
6936
+ He(t, e);
6915
6937
  function t() {
6916
6938
  var n = e !== null && e.apply(this, arguments) || this;
6917
- return n.type = _e.ElementType.CDATA, n;
6939
+ return n.type = de.ElementType.CDATA, n;
6918
6940
  }
6919
6941
  return Object.defineProperty(t.prototype, "nodeType", {
6920
6942
  get: function() {
@@ -6925,14 +6947,14 @@ var ua = (
6925
6947
  }), t;
6926
6948
  }(Bt)
6927
6949
  );
6928
- A.CDATA = ua;
6929
- var fa = (
6950
+ P.CDATA = fa;
6951
+ var da = (
6930
6952
  /** @class */
6931
6953
  function(e) {
6932
- Be(t, e);
6954
+ He(t, e);
6933
6955
  function t() {
6934
6956
  var n = e !== null && e.apply(this, arguments) || this;
6935
- return n.type = _e.ElementType.Root, n;
6957
+ return n.type = de.ElementType.Root, n;
6936
6958
  }
6937
6959
  return Object.defineProperty(t.prototype, "nodeType", {
6938
6960
  get: function() {
@@ -6943,13 +6965,13 @@ var fa = (
6943
6965
  }), t;
6944
6966
  }(Bt)
6945
6967
  );
6946
- A.Document = fa;
6947
- var da = (
6968
+ P.Document = da;
6969
+ var _a = (
6948
6970
  /** @class */
6949
6971
  function(e) {
6950
- Be(t, e);
6972
+ He(t, e);
6951
6973
  function t(n, r, a, s) {
6952
- a === void 0 && (a = []), s === void 0 && (s = n === "script" ? _e.ElementType.Script : n === "style" ? _e.ElementType.Style : _e.ElementType.Tag);
6974
+ a === void 0 && (a = []), s === void 0 && (s = n === "script" ? de.ElementType.Script : n === "style" ? de.ElementType.Style : de.ElementType.Tag);
6953
6975
  var o = e.call(this, a) || this;
6954
6976
  return o.name = n, o.attribs = r, o.type = s, o;
6955
6977
  }
@@ -6991,65 +7013,65 @@ var da = (
6991
7013
  }), t;
6992
7014
  }(Bt)
6993
7015
  );
6994
- A.Element = da;
6995
- function _a(e) {
6996
- return (0, _e.isTag)(e);
6997
- }
6998
- A.isTag = _a;
7016
+ P.Element = _a;
6999
7017
  function ma(e) {
7000
- return e.type === _e.ElementType.CDATA;
7018
+ return (0, de.isTag)(e);
7001
7019
  }
7002
- A.isCDATA = ma;
7020
+ P.isTag = ma;
7003
7021
  function ga(e) {
7004
- return e.type === _e.ElementType.Text;
7022
+ return e.type === de.ElementType.CDATA;
7005
7023
  }
7006
- A.isText = ga;
7024
+ P.isCDATA = ga;
7007
7025
  function ha(e) {
7008
- return e.type === _e.ElementType.Comment;
7026
+ return e.type === de.ElementType.Text;
7009
7027
  }
7010
- A.isComment = ha;
7028
+ P.isText = ha;
7011
7029
  function pa(e) {
7012
- return e.type === _e.ElementType.Directive;
7030
+ return e.type === de.ElementType.Comment;
7013
7031
  }
7014
- A.isDirective = pa;
7032
+ P.isComment = pa;
7015
7033
  function ya(e) {
7016
- return e.type === _e.ElementType.Root;
7034
+ return e.type === de.ElementType.Directive;
7017
7035
  }
7018
- A.isDocument = ya;
7036
+ P.isDirective = ya;
7037
+ function va(e) {
7038
+ return e.type === de.ElementType.Root;
7039
+ }
7040
+ P.isDocument = va;
7019
7041
  function ii(e) {
7020
7042
  return Object.prototype.hasOwnProperty.call(e, "children");
7021
7043
  }
7022
- A.hasChildren = ii;
7044
+ P.hasChildren = ii;
7023
7045
  function In(e, t) {
7024
7046
  t === void 0 && (t = !1);
7025
7047
  var n;
7026
- if (ga(e))
7027
- n = new ia(e.data);
7028
- else if (ha(e))
7048
+ if (ha(e))
7029
7049
  n = new ca(e.data);
7030
- else if (_a(e)) {
7031
- var r = t ? Qt(e.children) : [], a = new da(e.name, lt({}, e.attribs), r);
7050
+ else if (pa(e))
7051
+ n = new la(e.data);
7052
+ else if (ma(e)) {
7053
+ var r = t ? Qt(e.children) : [], a = new _a(e.name, ut({}, e.attribs), r);
7032
7054
  r.forEach(function(c) {
7033
7055
  return c.parent = a;
7034
- }), e.namespace != null && (a.namespace = e.namespace), e["x-attribsNamespace"] && (a["x-attribsNamespace"] = lt({}, e["x-attribsNamespace"])), e["x-attribsPrefix"] && (a["x-attribsPrefix"] = lt({}, e["x-attribsPrefix"])), n = a;
7035
- } else if (ma(e)) {
7036
- var r = t ? Qt(e.children) : [], s = new ua(r);
7056
+ }), e.namespace != null && (a.namespace = e.namespace), e["x-attribsNamespace"] && (a["x-attribsNamespace"] = ut({}, e["x-attribsNamespace"])), e["x-attribsPrefix"] && (a["x-attribsPrefix"] = ut({}, e["x-attribsPrefix"])), n = a;
7057
+ } else if (ga(e)) {
7058
+ var r = t ? Qt(e.children) : [], s = new fa(r);
7037
7059
  r.forEach(function(l) {
7038
7060
  return l.parent = s;
7039
7061
  }), n = s;
7040
- } else if (ya(e)) {
7041
- var r = t ? Qt(e.children) : [], o = new fa(r);
7062
+ } else if (va(e)) {
7063
+ var r = t ? Qt(e.children) : [], o = new da(r);
7042
7064
  r.forEach(function(l) {
7043
7065
  return l.parent = o;
7044
7066
  }), e["x-mode"] && (o["x-mode"] = e["x-mode"]), n = o;
7045
- } else if (pa(e)) {
7046
- var i = new la(e.name, e.data);
7067
+ } else if (ya(e)) {
7068
+ var i = new ua(e.name, e.data);
7047
7069
  e["x-name"] != null && (i["x-name"] = e["x-name"], i["x-publicId"] = e["x-publicId"], i["x-systemId"] = e["x-systemId"]), n = i;
7048
7070
  } else
7049
7071
  throw new Error("Not implemented yet: ".concat(e.type));
7050
7072
  return n.startIndex = e.startIndex, n.endIndex = e.endIndex, e.sourceCodeLocation != null && (n.sourceCodeLocation = e.sourceCodeLocation), n;
7051
7073
  }
7052
- A.cloneNode = In;
7074
+ P.cloneNode = In;
7053
7075
  function Qt(e) {
7054
7076
  for (var t = e.map(function(r) {
7055
7077
  return In(r, !0);
@@ -7058,7 +7080,7 @@ function Qt(e) {
7058
7080
  return t;
7059
7081
  }
7060
7082
  (function(e) {
7061
- var t = Y && Y.__createBinding || (Object.create ? function(i, c, l, u) {
7083
+ var t = J && J.__createBinding || (Object.create ? function(i, c, l, u) {
7062
7084
  u === void 0 && (u = l);
7063
7085
  var d = Object.getOwnPropertyDescriptor(c, l);
7064
7086
  (!d || ("get" in d ? !c.__esModule : d.writable || d.configurable)) && (d = { enumerable: !0, get: function() {
@@ -7066,12 +7088,12 @@ function Qt(e) {
7066
7088
  } }), Object.defineProperty(i, u, d);
7067
7089
  } : function(i, c, l, u) {
7068
7090
  u === void 0 && (u = l), i[u] = c[l];
7069
- }), n = Y && Y.__exportStar || function(i, c) {
7091
+ }), n = J && J.__exportStar || function(i, c) {
7070
7092
  for (var l in i) l !== "default" && !Object.prototype.hasOwnProperty.call(c, l) && t(c, i, l);
7071
7093
  };
7072
7094
  Object.defineProperty(e, "__esModule", { value: !0 }), e.DomHandler = void 0;
7073
- var r = Pn, a = A;
7074
- n(A, e);
7095
+ var r = Pn, a = P;
7096
+ n(P, e);
7075
7097
  var s = {
7076
7098
  withStartIndices: !1,
7077
7099
  withEndIndices: !1,
@@ -7135,7 +7157,7 @@ function Qt(e) {
7135
7157
  );
7136
7158
  e.DomHandler = o, e.default = o;
7137
7159
  })(On);
7138
- var va = {};
7160
+ var ka = {};
7139
7161
  (function(e) {
7140
7162
  Object.defineProperty(e, "__esModule", { value: !0 }), e.CARRIAGE_RETURN_PLACEHOLDER_REGEX = e.CARRIAGE_RETURN_PLACEHOLDER = e.CARRIAGE_RETURN_REGEX = e.CARRIAGE_RETURN = e.CASE_SENSITIVE_TAG_NAMES_MAP = e.CASE_SENSITIVE_TAG_NAMES = void 0, e.CASE_SENSITIVE_TAG_NAMES = [
7141
7163
  "animateMotion",
@@ -7172,17 +7194,17 @@ var va = {};
7172
7194
  ], e.CASE_SENSITIVE_TAG_NAMES_MAP = e.CASE_SENSITIVE_TAG_NAMES.reduce(function(t, n) {
7173
7195
  return t[n.toLowerCase()] = n, t;
7174
7196
  }, {}), e.CARRIAGE_RETURN = "\r", e.CARRIAGE_RETURN_REGEX = new RegExp(e.CARRIAGE_RETURN, "g"), e.CARRIAGE_RETURN_PLACEHOLDER = "__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(), "__"), e.CARRIAGE_RETURN_PLACEHOLDER_REGEX = new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER, "g");
7175
- })(va);
7176
- Object.defineProperty(Ye, "__esModule", { value: !0 });
7177
- Ye.formatAttributes = ka;
7178
- Ye.escapeSpecialCharacters = ui;
7179
- Ye.revertEscapedCharacters = Ca;
7180
- Ye.formatDOM = ba;
7181
- var xt = On, ht = va;
7197
+ })(ka);
7198
+ Object.defineProperty(Je, "__esModule", { value: !0 });
7199
+ Je.formatAttributes = Ca;
7200
+ Je.escapeSpecialCharacters = ui;
7201
+ Je.revertEscapedCharacters = ba;
7202
+ Je.formatDOM = xa;
7203
+ var xt = On, pt = ka;
7182
7204
  function ci(e) {
7183
- return ht.CASE_SENSITIVE_TAG_NAMES_MAP[e];
7205
+ return pt.CASE_SENSITIVE_TAG_NAMES_MAP[e];
7184
7206
  }
7185
- function ka(e) {
7207
+ function Ca(e) {
7186
7208
  for (var t = {}, n = 0, r = e.length; n < r; n++) {
7187
7209
  var a = e[n];
7188
7210
  t[a.name] = a.value;
@@ -7195,19 +7217,19 @@ function li(e) {
7195
7217
  return t || e;
7196
7218
  }
7197
7219
  function ui(e) {
7198
- return e.replace(ht.CARRIAGE_RETURN_REGEX, ht.CARRIAGE_RETURN_PLACEHOLDER);
7220
+ return e.replace(pt.CARRIAGE_RETURN_REGEX, pt.CARRIAGE_RETURN_PLACEHOLDER);
7199
7221
  }
7200
- function Ca(e) {
7201
- return e.replace(ht.CARRIAGE_RETURN_PLACEHOLDER_REGEX, ht.CARRIAGE_RETURN);
7222
+ function ba(e) {
7223
+ return e.replace(pt.CARRIAGE_RETURN_PLACEHOLDER_REGEX, pt.CARRIAGE_RETURN);
7202
7224
  }
7203
- function ba(e, t, n) {
7225
+ function xa(e, t, n) {
7204
7226
  t === void 0 && (t = null);
7205
7227
  for (var r = [], a, s = 0, o = e.length; s < o; s++) {
7206
7228
  var i = e[s];
7207
7229
  switch (i.nodeType) {
7208
7230
  case 1: {
7209
7231
  var c = li(i.nodeName);
7210
- a = new xt.Element(c, ka(i.attributes)), a.children = ba(
7232
+ a = new xt.Element(c, Ca(i.attributes)), a.children = xa(
7211
7233
  // template children are on content
7212
7234
  c === "template" ? i.content.childNodes : i.childNodes,
7213
7235
  a
@@ -7215,7 +7237,7 @@ function ba(e, t, n) {
7215
7237
  break;
7216
7238
  }
7217
7239
  case 3:
7218
- a = new xt.Text(Ca(i.nodeValue));
7240
+ a = new xt.Text(ba(i.nodeValue));
7219
7241
  break;
7220
7242
  case 8:
7221
7243
  a = new xt.Comment(i.nodeValue);
@@ -7230,7 +7252,7 @@ function ba(e, t, n) {
7230
7252
  }
7231
7253
  Object.defineProperty(Tn, "__esModule", { value: !0 });
7232
7254
  Tn.default = gi;
7233
- var fi = Ye, gr = "html", hr = "head", Et = "body", di = /<([a-zA-Z]+[0-9]?)/, pr = /<head[^]*>/i, yr = /<body[^]*>/i, At = function(e, t) {
7255
+ var fi = Je, gr = "html", hr = "head", Et = "body", di = /<([a-zA-Z]+[0-9]?)/, pr = /<head[^]*>/i, yr = /<body[^]*>/i, At = function(e, t) {
7234
7256
  throw new Error("This browser does not support `document.implementation.createHTMLDocument`");
7235
7257
  }, dn = function(e, t) {
7236
7258
  throw new Error("This browser does not support `DOMParser.prototype.parseFromString`");
@@ -7285,12 +7307,12 @@ function gi(e) {
7285
7307
  }
7286
7308
  }
7287
7309
  }
7288
- var hi = Y && Y.__importDefault || function(e) {
7310
+ var hi = J && J.__importDefault || function(e) {
7289
7311
  return e && e.__esModule ? e : { default: e };
7290
7312
  };
7291
7313
  Object.defineProperty(Sn, "__esModule", { value: !0 });
7292
7314
  Sn.default = ki;
7293
- var pi = hi(Tn), yi = Ye, vi = /<(![a-zA-Z\s]+)>/;
7315
+ var pi = hi(Tn), yi = Je, vi = /<(![a-zA-Z\s]+)>/;
7294
7316
  function ki(e) {
7295
7317
  if (typeof e != "string")
7296
7318
  throw new TypeError("First argument must be a string");
@@ -7299,7 +7321,7 @@ function ki(e) {
7299
7321
  var t = e.match(vi), n = t ? t[1] : void 0;
7300
7322
  return (0, yi.formatDOM)((0, pi.default)(e), null, n);
7301
7323
  }
7302
- var zt = {}, Ee = {}, Ht = {}, Ci = 0;
7324
+ var zt = {}, we = {}, Ht = {}, Ci = 0;
7303
7325
  Ht.SAME = Ci;
7304
7326
  var bi = 1;
7305
7327
  Ht.CAMELCASE = bi;
@@ -7788,14 +7810,14 @@ Ht.possibleStandardNames = {
7788
7810
  z: 0,
7789
7811
  zoomAndPan: 1
7790
7812
  };
7791
- const xa = 0, ze = 1, Gt = 2, Vt = 3, Rn = 4, Ea = 5, wa = 6;
7813
+ const Ea = 0, Ge = 1, Gt = 2, Vt = 3, Rn = 4, wa = 5, Na = 6;
7792
7814
  function xi(e) {
7793
- return ne.hasOwnProperty(e) ? ne[e] : null;
7815
+ return ae.hasOwnProperty(e) ? ae[e] : null;
7794
7816
  }
7795
- function ue(e, t, n, r, a, s, o) {
7817
+ function le(e, t, n, r, a, s, o) {
7796
7818
  this.acceptsBooleans = t === Gt || t === Vt || t === Rn, this.attributeName = r, this.attributeNamespace = a, this.mustUseProperty = n, this.propertyName = e, this.type = t, this.sanitizeURL = s, this.removeEmptyString = o;
7797
7819
  }
7798
- const ne = {}, Ei = [
7820
+ const ae = {}, Ei = [
7799
7821
  "children",
7800
7822
  "dangerouslySetInnerHTML",
7801
7823
  // TODO: This prevents the assignment of defaultValue to regular
@@ -7809,9 +7831,9 @@ const ne = {}, Ei = [
7809
7831
  "style"
7810
7832
  ];
7811
7833
  Ei.forEach((e) => {
7812
- ne[e] = new ue(
7834
+ ae[e] = new le(
7813
7835
  e,
7814
- xa,
7836
+ Ea,
7815
7837
  !1,
7816
7838
  // mustUseProperty
7817
7839
  e,
@@ -7830,9 +7852,9 @@ Ei.forEach((e) => {
7830
7852
  ["htmlFor", "for"],
7831
7853
  ["httpEquiv", "http-equiv"]
7832
7854
  ].forEach(([e, t]) => {
7833
- ne[e] = new ue(
7855
+ ae[e] = new le(
7834
7856
  e,
7835
- ze,
7857
+ Ge,
7836
7858
  !1,
7837
7859
  // mustUseProperty
7838
7860
  t,
@@ -7846,7 +7868,7 @@ Ei.forEach((e) => {
7846
7868
  );
7847
7869
  });
7848
7870
  ["contentEditable", "draggable", "spellCheck", "value"].forEach((e) => {
7849
- ne[e] = new ue(
7871
+ ae[e] = new le(
7850
7872
  e,
7851
7873
  Gt,
7852
7874
  !1,
@@ -7867,7 +7889,7 @@ Ei.forEach((e) => {
7867
7889
  "focusable",
7868
7890
  "preserveAlpha"
7869
7891
  ].forEach((e) => {
7870
- ne[e] = new ue(
7892
+ ae[e] = new le(
7871
7893
  e,
7872
7894
  Gt,
7873
7895
  !1,
@@ -7910,7 +7932,7 @@ Ei.forEach((e) => {
7910
7932
  // Microdata
7911
7933
  "itemScope"
7912
7934
  ].forEach((e) => {
7913
- ne[e] = new ue(
7935
+ ae[e] = new le(
7914
7936
  e,
7915
7937
  Vt,
7916
7938
  !1,
@@ -7936,7 +7958,7 @@ Ei.forEach((e) => {
7936
7958
  // you'll need to set attributeName to name.toLowerCase()
7937
7959
  // instead in the assignment below.
7938
7960
  ].forEach((e) => {
7939
- ne[e] = new ue(
7961
+ ae[e] = new le(
7940
7962
  e,
7941
7963
  Vt,
7942
7964
  !0,
@@ -7958,7 +7980,7 @@ Ei.forEach((e) => {
7958
7980
  // you'll need to set attributeName to name.toLowerCase()
7959
7981
  // instead in the assignment below.
7960
7982
  ].forEach((e) => {
7961
- ne[e] = new ue(
7983
+ ae[e] = new le(
7962
7984
  e,
7963
7985
  Rn,
7964
7986
  !1,
@@ -7982,9 +8004,9 @@ Ei.forEach((e) => {
7982
8004
  // you'll need to set attributeName to name.toLowerCase()
7983
8005
  // instead in the assignment below.
7984
8006
  ].forEach((e) => {
7985
- ne[e] = new ue(
8007
+ ae[e] = new le(
7986
8008
  e,
7987
- wa,
8009
+ Na,
7988
8010
  !1,
7989
8011
  // mustUseProperty
7990
8012
  e,
@@ -7998,9 +8020,9 @@ Ei.forEach((e) => {
7998
8020
  );
7999
8021
  });
8000
8022
  ["rowSpan", "start"].forEach((e) => {
8001
- ne[e] = new ue(
8023
+ ae[e] = new le(
8002
8024
  e,
8003
- Ea,
8025
+ wa,
8004
8026
  !1,
8005
8027
  // mustUseProperty
8006
8028
  e.toLowerCase(),
@@ -8093,9 +8115,9 @@ const Mn = /[\-\:]([a-z])/g, Dn = (e) => e[1].toUpperCase();
8093
8115
  // instead in the assignment below.
8094
8116
  ].forEach((e) => {
8095
8117
  const t = e.replace(Mn, Dn);
8096
- ne[t] = new ue(
8118
+ ae[t] = new le(
8097
8119
  t,
8098
- ze,
8120
+ Ge,
8099
8121
  !1,
8100
8122
  // mustUseProperty
8101
8123
  e,
@@ -8119,9 +8141,9 @@ const Mn = /[\-\:]([a-z])/g, Dn = (e) => e[1].toUpperCase();
8119
8141
  // instead in the assignment below.
8120
8142
  ].forEach((e) => {
8121
8143
  const t = e.replace(Mn, Dn);
8122
- ne[t] = new ue(
8144
+ ae[t] = new le(
8123
8145
  t,
8124
- ze,
8146
+ Ge,
8125
8147
  !1,
8126
8148
  // mustUseProperty
8127
8149
  e,
@@ -8141,9 +8163,9 @@ const Mn = /[\-\:]([a-z])/g, Dn = (e) => e[1].toUpperCase();
8141
8163
  // instead in the assignment below.
8142
8164
  ].forEach((e) => {
8143
8165
  const t = e.replace(Mn, Dn);
8144
- ne[t] = new ue(
8166
+ ae[t] = new le(
8145
8167
  t,
8146
- ze,
8168
+ Ge,
8147
8169
  !1,
8148
8170
  // mustUseProperty
8149
8171
  e,
@@ -8155,9 +8177,9 @@ const Mn = /[\-\:]([a-z])/g, Dn = (e) => e[1].toUpperCase();
8155
8177
  );
8156
8178
  });
8157
8179
  ["tabIndex", "crossOrigin"].forEach((e) => {
8158
- ne[e] = new ue(
8180
+ ae[e] = new le(
8159
8181
  e,
8160
- ze,
8182
+ Ge,
8161
8183
  !1,
8162
8184
  // mustUseProperty
8163
8185
  e.toLowerCase(),
@@ -8171,9 +8193,9 @@ const Mn = /[\-\:]([a-z])/g, Dn = (e) => e[1].toUpperCase();
8171
8193
  );
8172
8194
  });
8173
8195
  const wi = "xlinkHref";
8174
- ne[wi] = new ue(
8196
+ ae[wi] = new le(
8175
8197
  "xlinkHref",
8176
- ze,
8198
+ Ge,
8177
8199
  !1,
8178
8200
  // mustUseProperty
8179
8201
  "xlink:href",
@@ -8184,9 +8206,9 @@ ne[wi] = new ue(
8184
8206
  // removeEmptyString
8185
8207
  );
8186
8208
  ["src", "href", "action", "formAction"].forEach((e) => {
8187
- ne[e] = new ue(
8209
+ ae[e] = new le(
8188
8210
  e,
8189
- ze,
8211
+ Ge,
8190
8212
  !1,
8191
8213
  // mustUseProperty
8192
8214
  e.toLowerCase(),
@@ -8212,18 +8234,18 @@ const {
8212
8234
  const n = kr[t];
8213
8235
  return n === Fi ? e[t] = t : n === Ni ? e[t.toLowerCase()] = t : e[t] = n, e;
8214
8236
  }, {});
8215
- Ee.BOOLEAN = Vt;
8216
- Ee.BOOLEANISH_STRING = Gt;
8217
- Ee.NUMERIC = Ea;
8218
- Ee.OVERLOADED_BOOLEAN = Rn;
8219
- Ee.POSITIVE_NUMERIC = wa;
8220
- Ee.RESERVED = xa;
8221
- Ee.STRING = ze;
8222
- Ee.getPropertyInfo = xi;
8223
- Ee.isCustomAttribute = Oi;
8224
- Ee.possibleStandardNames = Pi;
8237
+ we.BOOLEAN = Vt;
8238
+ we.BOOLEANISH_STRING = Gt;
8239
+ we.NUMERIC = wa;
8240
+ we.OVERLOADED_BOOLEAN = Rn;
8241
+ we.POSITIVE_NUMERIC = Na;
8242
+ we.RESERVED = Ea;
8243
+ we.STRING = Ge;
8244
+ we.getPropertyInfo = xi;
8245
+ we.isCustomAttribute = Oi;
8246
+ we.possibleStandardNames = Pi;
8225
8247
  var $n = {}, Ln = {}, Cr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, Ai = /\n/g, Ii = /^\s*/, Ri = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, Mi = /^:\s*/, Di = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, $i = /^[;\s]*/, Li = /^\s+|\s+$/g, ji = `
8226
- `, br = "/", xr = "*", qe = "", Bi = "comment", zi = "declaration", Hi = function(e, t) {
8248
+ `, br = "/", xr = "*", Ke = "", Bi = "comment", zi = "declaration", Hi = function(e, t) {
8227
8249
  if (typeof e != "string")
8228
8250
  throw new TypeError("First argument must be a string");
8229
8251
  if (!e) return [];
@@ -8270,9 +8292,9 @@ var $n = {}, Ln = {}, Cr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, Ai = /\n/g, Ii = /
8270
8292
  function d() {
8271
8293
  var m = s();
8272
8294
  if (!(br != e.charAt(0) || xr != e.charAt(1))) {
8273
- for (var g = 2; qe != e.charAt(g) && (xr != e.charAt(g) || br != e.charAt(g + 1)); )
8295
+ for (var g = 2; Ke != e.charAt(g) && (xr != e.charAt(g) || br != e.charAt(g + 1)); )
8274
8296
  ++g;
8275
- if (g += 2, qe === e.charAt(g - 1))
8297
+ if (g += 2, Ke === e.charAt(g - 1))
8276
8298
  return i("End of comment missing");
8277
8299
  var y = e.slice(2, g - 2);
8278
8300
  return r += 2, a(y), e = e.slice(g), r += 2, m({
@@ -8287,8 +8309,8 @@ var $n = {}, Ln = {}, Cr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, Ai = /\n/g, Ii = /
8287
8309
  if (d(), !c(Mi)) return i("property missing ':'");
8288
8310
  var y = c(Di), C = m({
8289
8311
  type: zi,
8290
- property: Er(g[0].replace(Cr, qe)),
8291
- value: y ? Er(y[0].replace(Cr, qe)) : qe
8312
+ property: Er(g[0].replace(Cr, Ke)),
8313
+ value: y ? Er(y[0].replace(Cr, Ke)) : Ke
8292
8314
  });
8293
8315
  return c($i), C;
8294
8316
  }
@@ -8303,9 +8325,9 @@ var $n = {}, Ln = {}, Cr = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, Ai = /\n/g, Ii = /
8303
8325
  return l(), h();
8304
8326
  };
8305
8327
  function Er(e) {
8306
- return e ? e.replace(Li, qe) : qe;
8328
+ return e ? e.replace(Li, Ke) : Ke;
8307
8329
  }
8308
- var Gi = Y && Y.__importDefault || function(e) {
8330
+ var Gi = J && J.__importDefault || function(e) {
8309
8331
  return e && e.__esModule ? e : { default: e };
8310
8332
  };
8311
8333
  Object.defineProperty(Ln, "__esModule", { value: !0 });
@@ -8336,7 +8358,7 @@ var qi = /^--[a-zA-Z0-9_-]+$/, Wi = /-([a-z])/g, Ki = /^[^-]+$/, Xi = /^-(webkit
8336
8358
  return t === void 0 && (t = {}), Zi(e) ? e : (e = e.toLowerCase(), t.reactCompat ? e = e.replace(Yi, wr) : e = e.replace(Xi, wr), e.replace(Wi, Ji));
8337
8359
  };
8338
8360
  Ut.camelCase = Qi;
8339
- var ec = Y && Y.__importDefault || function(e) {
8361
+ var ec = J && J.__importDefault || function(e) {
8340
8362
  return e && e.__esModule ? e : { default: e };
8341
8363
  }, tc = ec(Ln), nc = Ut;
8342
8364
  function mn(e, t) {
@@ -8348,7 +8370,7 @@ function mn(e, t) {
8348
8370
  mn.default = mn;
8349
8371
  var rc = mn;
8350
8372
  (function(e) {
8351
- var t = Y && Y.__importDefault || function(u) {
8373
+ var t = J && J.__importDefault || function(u) {
8352
8374
  return u && u.__esModule ? u : { default: u };
8353
8375
  };
8354
8376
  Object.defineProperty(e, "__esModule", { value: !0 }), e.returnFirstArg = e.canTextBeChildOfNode = e.ELEMENTS_WITH_NO_TEXT_CHILDREN = e.PRESERVE_CUSTOM_ATTRIBUTES = void 0, e.isCustomComponent = s, e.setStyleProp = i;
@@ -8403,7 +8425,7 @@ var rc = mn;
8403
8425
  })($n);
8404
8426
  Object.defineProperty(zt, "__esModule", { value: !0 });
8405
8427
  zt.default = ic;
8406
- var ct = Ee, Nr = $n, ac = ["checked", "value"], sc = ["input", "select", "textarea"], oc = {
8428
+ var lt = we, Nr = $n, ac = ["checked", "value"], sc = ["input", "select", "textarea"], oc = {
8407
8429
  reset: !0,
8408
8430
  submit: !0
8409
8431
  };
@@ -8412,18 +8434,18 @@ function ic(e, t) {
8412
8434
  var n = {}, r = !!(e.type && oc[e.type]);
8413
8435
  for (var a in e) {
8414
8436
  var s = e[a];
8415
- if ((0, ct.isCustomAttribute)(a)) {
8437
+ if ((0, lt.isCustomAttribute)(a)) {
8416
8438
  n[a] = s;
8417
8439
  continue;
8418
8440
  }
8419
8441
  var o = a.toLowerCase(), i = Fr(o);
8420
8442
  if (i) {
8421
- var c = (0, ct.getPropertyInfo)(i);
8443
+ var c = (0, lt.getPropertyInfo)(i);
8422
8444
  switch (ac.includes(i) && sc.includes(t) && !r && (i = Fr("default" + o)), n[i] = s, c && c.type) {
8423
- case ct.BOOLEAN:
8445
+ case lt.BOOLEAN:
8424
8446
  n[i] = !0;
8425
8447
  break;
8426
- case ct.OVERLOADED_BOOLEAN:
8448
+ case lt.OVERLOADED_BOOLEAN:
8427
8449
  s === "" && (n[i] = !0);
8428
8450
  break;
8429
8451
  }
@@ -8434,21 +8456,21 @@ function ic(e, t) {
8434
8456
  return (0, Nr.setStyleProp)(e.style, n), n;
8435
8457
  }
8436
8458
  function Fr(e) {
8437
- return ct.possibleStandardNames[e];
8459
+ return lt.possibleStandardNames[e];
8438
8460
  }
8439
- var jn = {}, cc = Y && Y.__importDefault || function(e) {
8461
+ var jn = {}, cc = J && J.__importDefault || function(e) {
8440
8462
  return e && e.__esModule ? e : { default: e };
8441
8463
  };
8442
8464
  Object.defineProperty(jn, "__esModule", { value: !0 });
8443
- jn.default = Na;
8444
- var en = Tr, lc = cc(zt), ut = $n, uc = {
8465
+ jn.default = Fa;
8466
+ var en = Tr, lc = cc(zt), ft = $n, uc = {
8445
8467
  cloneElement: en.cloneElement,
8446
8468
  createElement: en.createElement,
8447
8469
  isValidElement: en.isValidElement
8448
8470
  };
8449
- function Na(e, t) {
8471
+ function Fa(e, t) {
8450
8472
  t === void 0 && (t = {});
8451
- for (var n = [], r = typeof t.replace == "function", a = t.transform || ut.returnFirstArg, s = t.library || uc, o = s.cloneElement, i = s.createElement, c = s.isValidElement, l = e.length, u = 0; u < l; u++) {
8473
+ for (var n = [], r = typeof t.replace == "function", a = t.transform || ft.returnFirstArg, s = t.library || uc, o = s.cloneElement, i = s.createElement, c = s.isValidElement, l = e.length, u = 0; u < l; u++) {
8452
8474
  var d = e[u];
8453
8475
  if (r) {
8454
8476
  var _ = t.replace(d, u);
@@ -8461,13 +8483,13 @@ function Na(e, t) {
8461
8483
  }
8462
8484
  if (d.type === "text") {
8463
8485
  var h = !d.data.trim().length;
8464
- if (h && d.parent && !(0, ut.canTextBeChildOfNode)(d.parent) || t.trim && h)
8486
+ if (h && d.parent && !(0, ft.canTextBeChildOfNode)(d.parent) || t.trim && h)
8465
8487
  continue;
8466
8488
  n.push(a(d.data, d, u));
8467
8489
  continue;
8468
8490
  }
8469
8491
  var m = d, g = {};
8470
- fc(m) ? ((0, ut.setStyleProp)(m.attribs.style, m.attribs), g = m.attribs) : m.attribs && (g = (0, lc.default)(m.attribs, m.name));
8492
+ fc(m) ? ((0, ft.setStyleProp)(m.attribs.style, m.attribs), g = m.attribs) : m.attribs && (g = (0, lc.default)(m.attribs, m.name));
8471
8493
  var y = void 0;
8472
8494
  switch (d.type) {
8473
8495
  case "script":
@@ -8477,7 +8499,7 @@ function Na(e, t) {
8477
8499
  });
8478
8500
  break;
8479
8501
  case "tag":
8480
- d.name === "textarea" && d.children[0] ? g.defaultValue = d.children[0].data : d.children && d.children.length && (y = Na(d.children, t));
8502
+ d.name === "textarea" && d.children[0] ? g.defaultValue = d.children[0].data : d.children && d.children.length && (y = Fa(d.children, t));
8481
8503
  break;
8482
8504
  default:
8483
8505
  continue;
@@ -8487,10 +8509,10 @@ function Na(e, t) {
8487
8509
  return n.length === 1 ? n[0] : n;
8488
8510
  }
8489
8511
  function fc(e) {
8490
- return ut.PRESERVE_CUSTOM_ATTRIBUTES && e.type === "tag" && (0, ut.isCustomComponent)(e.name, e.attribs);
8512
+ return ft.PRESERVE_CUSTOM_ATTRIBUTES && e.type === "tag" && (0, ft.isCustomComponent)(e.name, e.attribs);
8491
8513
  }
8492
8514
  (function(e) {
8493
- var t = Y && Y.__importDefault || function(c) {
8515
+ var t = J && J.__importDefault || function(c) {
8494
8516
  return c && c.__esModule ? c : { default: c };
8495
8517
  };
8496
8518
  Object.defineProperty(e, "__esModule", { value: !0 }), e.htmlToDOM = e.domToReact = e.attributesToProps = e.Text = e.ProcessingInstruction = e.Element = e.Comment = void 0, e.default = i;
@@ -8516,8 +8538,8 @@ function fc(e) {
8516
8538
  throw new TypeError("First argument must be a string");
8517
8539
  return c ? (0, a.default)((0, n.default)(c, (l == null ? void 0 : l.htmlparser2) || o), l) : [];
8518
8540
  }
8519
- })(oa);
8520
- const Sr = /* @__PURE__ */ oi(oa), dc = Sr.default || Sr;
8541
+ })(ia);
8542
+ const Sr = /* @__PURE__ */ oi(ia), dc = Sr.default || Sr;
8521
8543
  function sl(e) {
8522
8544
  const t = dc(e);
8523
8545
  return Array.isArray(t) ? t.map((n) => typeof n == "string" ? { text: n } : fn(n)) : typeof t == "string" ? [{ text: t }] : [fn(t)];
@@ -8527,11 +8549,11 @@ export {
8527
8549
  vc as AlertContent,
8528
8550
  kc as AlertDescription,
8529
8551
  Cc as AlertIcon,
8530
- Ya as AlertTitle,
8531
- es as AudioPlayer,
8552
+ Za as AlertTitle,
8553
+ ts as AudioPlayer,
8532
8554
  xc as AudioUpload,
8533
8555
  Ec as Badge,
8534
- at as Button,
8556
+ st as Button,
8535
8557
  wc as CardTabButton,
8536
8558
  Nc as CardTabContainer,
8537
8559
  Fc as Checkbox,
@@ -8541,9 +8563,9 @@ export {
8541
8563
  Oc as DrawerContainer,
8542
8564
  Pc as DrawerHeader,
8543
8565
  Jc as DrawerProvider,
8544
- xe as FieldError,
8545
- pe as FieldLabel,
8546
- ye as FieldWrapper,
8566
+ Ee as FieldError,
8567
+ ye as FieldLabel,
8568
+ ve as FieldWrapper,
8547
8569
  Ac as FileUpload,
8548
8570
  bc as FormProvider,
8549
8571
  kn as IconButton,
@@ -8559,7 +8581,7 @@ export {
8559
8581
  Bc as Popover,
8560
8582
  zc as RadioBox,
8561
8583
  Hc as RadioGroup,
8562
- Qa as Slider,
8584
+ es as Slider,
8563
8585
  Gc as Switch,
8564
8586
  Vc as TabButton,
8565
8587
  Uc as TabContainer,
@@ -8574,10 +8596,10 @@ export {
8574
8596
  al as toHtml,
8575
8597
  sl as toRichTextValue,
8576
8598
  Qc as useDrawer,
8577
- be as useForm,
8578
- os as useHydrated,
8599
+ xe as useForm,
8600
+ is as useHydrated,
8579
8601
  tl as useModal,
8580
8602
  nl as useScopedParams,
8581
- pt as useScrollLock,
8582
- Ja as useSlider
8603
+ yt as useScrollLock,
8604
+ Qa as useSlider
8583
8605
  };