@archbase/admin 4.12.0 → 4.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { jsx as r, jsxs as R, Fragment as Pe } from "react/jsx-runtime";
2
2
  import * as HA from "react";
3
- import xe, { useState as ge, useRef as Z, useEffect as oe, useMemo as ce, useContext as ye, useCallback as C, createContext as Ne, memo as YA, Fragment as qA, useLayoutEffect as Er, useImperativeHandle as Rr, startTransition as nA, useReducer as Pr, useSyncExternalStore as Lr } from "react";
4
- import { useArchbaseSecurityManager as Mr } from "@archbase/security";
5
- import { useUncontrolled as aA, useMediaQuery as DA, useHotkeys as Dr, useDisclosure as Nr, useFocusTrap as zr, useForceUpdate as Or } from "@mantine/hooks";
6
- import { Flex as Ye, useMantineColorScheme as de, Menu as ie, ActionIcon as De, Group as Le, Tooltip as Me, Button as $r, ScrollArea as ze, Badge as pA, Center as Je, Image as Qr, useMantineTheme as me, px as fe, Burger as Kr, Box as H, Avatar as iA, Text as Te, Stack as _, Skeleton as pe, Paper as Fr, NavLink as NA, Kbd as jA, UnstyledButton as cA, Collapse as Vr, TextInput as XA, Indicator as Gr, Transition as Br, Divider as dA, AppShell as Be, Drawer as JA } from "@mantine/core";
3
+ import xe, { useState as ge, useRef as Ae, useEffect as oe, useMemo as ce, useContext as ye, useCallback as w, createContext as Ne, memo as YA, Fragment as qA, useLayoutEffect as Er, useImperativeHandle as Rr, startTransition as nA, useReducer as Pr, useSyncExternalStore as Lr } from "react";
4
+ import { useArchbaseSecurityManager as Dr } from "@archbase/security";
5
+ import { useUncontrolled as aA, useMediaQuery as MA, useHotkeys as Mr, useDisclosure as Nr, useFocusTrap as zr, useForceUpdate as Or } from "@mantine/hooks";
6
+ import { Flex as Ye, useMantineColorScheme as de, Menu as ie, ActionIcon as Me, Group as Le, Tooltip as De, Button as $r, ScrollArea as ze, Badge as fA, Center as Je, Image as Qr, useMantineTheme as me, px as pe, Burger as Kr, Box as q, Avatar as iA, Text as Te, Stack as W, Skeleton as fe, Paper as Fr, NavLink as NA, Kbd as jA, UnstyledButton as cA, Collapse as Vr, TextInput as XA, Indicator as Gr, Transition as Br, Divider as dA, AppShell as Be, Drawer as JA } from "@mantine/core";
7
7
  import { IconSun as _A, IconMoonStars as WA, IconTerminal as Ur, IconSearch as _e, IconAlertCircle as Hr, IconDots as ZA, IconChevronRight as gA, IconChevronDown as Yr, IconX as er, IconChevronLeft as qr, IconHome2 as jr, IconDashboard as Xr, IconUsers as Jr, IconListSearch as Ar, IconUserPlus as _r, IconNews as Wr, IconFilePlus as Zr, IconSettings as et } from "@tabler/icons-react";
8
8
  import { useArchbaseAppContext as bA, getI18nextInstance as ne, useArchbaseTranslation as mA, archbaseI18next as Re, useArchbaseValidator as At, ARCHBASE_IOC_API_TYPE as rt } from "@archbase/core";
9
- import { BRFlag as He, USFlag as rr, ESFlag as uA, VEFlag as tt, UYFlag as ot, SVFlag as nt, PYFlag as st, PEFlag as lt, PAFlag as at, NIFlag as it, MXFlag as ct, HNFlag as dt, GTFlag as ut, ECFlag as ht, DOFlag as ft, CUFlag as pt, CRFlag as gt, COFlag as bt, CLFlag as mt, BOFlag as yt, ARFlag as vt } from "mantine-flagpack";
9
+ import { BRFlag as He, USFlag as rr, ESFlag as uA, VEFlag as tt, UYFlag as ot, SVFlag as nt, PYFlag as st, PEFlag as lt, PAFlag as at, NIFlag as it, MXFlag as ct, HNFlag as dt, GTFlag as ut, ECFlag as ht, DOFlag as pt, CUFlag as ft, CRFlag as gt, COFlag as bt, CLFlag as mt, BOFlag as yt, ARFlag as vt } from "mantine-flagpack";
10
10
  import { spotlight as Ct, Spotlight as Ue } from "@mantine/spotlight";
11
11
  import { useNavigate as qe, useLocation as je, matchPath as zA } from "react-router";
12
12
  import { useLocation as Xe, useOutlet as wt, matchPath as St, Route as Ke, Routes as tr, useParams as or, useNavigationType as kt, UNSAFE_LocationContext as xt, useSearchParams as nr, useNavigate as It } from "react-router-dom";
13
13
  import { useMediaQuery as Tt } from "usehooks-ts";
14
14
  import { useArchbaseNavigateParams as Et, useArchbaseVisible as Rt, ArchbaseNotifications as Pt, ArchbaseAvatarEdit as Lt, ArchbaseEdit as sA } from "@archbase/components";
15
- import { SubMenu as Mt, MenuItem as OA, menuClasses as te, Sidebar as sr, Menu as lr, sidebarClasses as ar } from "react-pro-sidebar";
16
- import { createPortal as Dt } from "react-dom";
15
+ import { SubMenu as Dt, MenuItem as OA, menuClasses as te, Sidebar as sr, Menu as lr, sidebarClasses as ar } from "react-pro-sidebar";
16
+ import { createPortal as Mt } from "react-dom";
17
17
  import Nt from "@rehooks/component-size";
18
18
  import { ArchbaseAdvancedTabs as zt } from "@archbase/layout";
19
19
  import { create as ir, useStore as Ot } from "zustand";
@@ -31,96 +31,109 @@ const rA = xe.createContext({}), Bt = ({
31
31
  enableSecurity: a,
32
32
  securityOptions: l,
33
33
  onNavigationDataChange: i,
34
- initialSidebarCollapsed: h
34
+ initialSidebarCollapsed: h,
35
+ securityFailMode: c = "closed"
35
36
  }) => {
36
- const [c, d] = ge(h), [u, p] = ge(!1), [v, b] = ge(() => a === !0), [m, g] = ge(null), f = Z(!1), [x, I] = aA({
37
+ const [d, u] = ge(h), [p, y] = ge(!1), [m, g] = ge(() => a === !0), [b, f] = ge(null), x = Ae(!1), [E, M] = aA({
37
38
  value: i !== void 0 ? A : void 0,
38
39
  defaultValue: a ? [] : A,
39
40
  finalValue: [],
40
41
  onChange: i
41
42
  });
42
43
  oe(() => {
43
- }, [x, a]);
44
- const { securityManager: L } = Mr({
44
+ }, [E, a]);
45
+ const { securityManager: V } = Dr({
45
46
  resourceName: l?.navigationResourceName ? l.navigationResourceName : "ArchbaseAdvancedSidebar",
46
47
  resourceDescription: l?.navigationResourceDescription ? l.navigationResourceDescription : "archbase:Navegação",
47
48
  enableSecurity: a
48
49
  });
49
50
  return oe(() => {
50
- f.current = !1;
51
+ x.current = !1;
51
52
  }, [t?.id]), oe(() => {
52
53
  if (!a) {
53
- b(!1);
54
+ g(!1);
54
55
  return;
55
56
  }
56
- if (f.current)
57
+ if (x.current)
57
58
  return;
58
- A.filter((P) => P.showInSidebar).forEach((P) => {
59
- L.registerAction(P.label, P.label), P?.links?.forEach((y) => L.registerAction(`${P.label} -> ${y.label}`, `${P.label} -> ${y.label}`));
59
+ A.filter((L) => L.showInSidebar).forEach((L) => {
60
+ V.registerAction(L.label, L.label), L?.links?.forEach((C) => V.registerAction(`${L.label} -> ${C.label}`, `${L.label} -> ${C.label}`));
60
61
  });
61
- const V = () => {
62
- f.current = !0;
63
- const P = A.map((y) => ({
64
- ...y,
65
- disabled: !L.hasPermission(y.label),
66
- links: y.links && y.links.map((F) => {
67
- const T = L.hasPermission(`${y.label} -> ${F.label}`);
62
+ const Y = () => {
63
+ if (c === "open") {
64
+ M(A);
65
+ return;
66
+ }
67
+ M(
68
+ A.map((L) => ({
69
+ ...L,
70
+ disabled: !0,
71
+ links: L.links && L.links.map((C) => ({ ...C, disabled: !0 }))
72
+ }))
73
+ );
74
+ }, P = () => {
75
+ x.current = !0;
76
+ const L = A.map((C) => ({
77
+ ...C,
78
+ disabled: !V.hasPermission(C.label),
79
+ links: C.links && C.links.map((_) => {
80
+ const H = V.hasPermission(`${C.label} -> ${_.label}`);
68
81
  return {
69
- ...F,
70
- disabled: !T
82
+ ..._,
83
+ disabled: !H
71
84
  };
72
85
  })
73
86
  }));
74
- I(P), b(!1), g(null);
75
- }, Y = !L.isLoading() && !L.isError();
76
- if (L.isError()) {
77
- f.current = !0;
78
- const P = L.getError() || "Erro ao carregar permissões de navegação";
79
- g(P), b(!1), I(A);
87
+ M(L), g(!1), f(null);
88
+ }, F = !V.isLoading() && !V.isError();
89
+ if (V.isError()) {
90
+ x.current = !0;
91
+ const L = V.getError() || "Erro ao carregar permissões de navegação";
92
+ f(L), g(!1), Y();
80
93
  return;
81
94
  }
82
- if (Y) {
83
- V();
95
+ if (F) {
96
+ P();
84
97
  return;
85
98
  }
86
- b(!0), g(null);
87
- let O = !1;
88
- const D = setInterval(() => {
89
- if (!O && L.isError()) {
90
- clearInterval(D), f.current = !0;
91
- const P = L.getError() || "Erro ao carregar permissões de navegação";
92
- g(P), b(!1), I(A);
99
+ g(!0), f(null);
100
+ let Q = !1;
101
+ const O = setInterval(() => {
102
+ if (!Q && V.isError()) {
103
+ clearInterval(O), x.current = !0;
104
+ const L = V.getError() || "Erro ao carregar permissões de navegação";
105
+ f(L), g(!1), Y();
93
106
  }
94
- }, 100), K = setTimeout(() => {
95
- O || (clearInterval(D), b((P) => P && (f.current = !0, console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - carregando menu sem filtro de segurança"), I(A), !1)));
107
+ }, 100), v = setTimeout(() => {
108
+ Q || (clearInterval(O), console.warn("[ArchbaseAdminLayout] Timeout ao carregar permissões - aguardando a resposta com o menu fechado"), Y(), g(!1));
96
109
  }, 3e3);
97
- return L.apply(() => {
98
- O || (clearInterval(D), clearTimeout(K), V());
110
+ return V.apply(() => {
111
+ Q || (clearInterval(O), clearTimeout(v), P());
99
112
  }), () => {
100
- O = !0, clearInterval(D), clearTimeout(K);
113
+ Q = !0, clearInterval(O), clearTimeout(v);
101
114
  };
102
- }, [t?.id, a, A, L, I]), /* @__PURE__ */ r(
115
+ }, [t?.id, a, A, V, M, c]), /* @__PURE__ */ r(
103
116
  rA.Provider,
104
117
  {
105
118
  value: {
106
- navigationData: x,
107
- setNavigationData: I,
119
+ navigationData: E,
120
+ setNavigationData: M,
108
121
  user: t,
109
122
  owner: o,
110
123
  company: e,
111
124
  navigationRootLink: n,
112
- collapsed: c,
113
- setCollapsed: d,
114
- hidden: u,
115
- setHidden: p,
125
+ collapsed: d,
126
+ setCollapsed: u,
127
+ hidden: p,
128
+ setHidden: y,
116
129
  onNavigationDataChange: i,
117
- isLoadingPermissions: v,
118
- permissionsError: m
130
+ isLoadingPermissions: m,
131
+ permissionsError: b
119
132
  },
120
133
  children: s
121
134
  }
122
135
  );
123
- }, Dn = ({ children: A }) => /* @__PURE__ */ r(Ye, { align: "center", direction: "row", wrap: "wrap", h: "100%", children: A }), Ut = () => {
136
+ }, Mn = ({ children: A }) => /* @__PURE__ */ r(Ye, { align: "center", direction: "row", wrap: "wrap", h: "100%", children: A }), Ut = () => {
124
137
  const A = bA(), { colorScheme: t } = de(), o = t === "dark", [e, n] = ge(ne().language);
125
138
  oe(() => {
126
139
  const i = (h) => {
@@ -153,9 +166,9 @@ const rA = xe.createContext({}), Bt = ({
153
166
  case "es-CR":
154
167
  return /* @__PURE__ */ r(gt, { size: 24 });
155
168
  case "es-CU":
156
- return /* @__PURE__ */ r(pt, { size: 24 });
157
- case "es-DO":
158
169
  return /* @__PURE__ */ r(ft, { size: 24 });
170
+ case "es-DO":
171
+ return /* @__PURE__ */ r(pt, { size: 24 });
159
172
  case "es-EC":
160
173
  return /* @__PURE__ */ r(ht, { size: 24 });
161
174
  case "es-GT":
@@ -197,7 +210,7 @@ const rA = xe.createContext({}), Bt = ({
197
210
  ne().changeLanguage(i);
198
211
  };
199
212
  return /* @__PURE__ */ R(ie, { shadow: "md", width: 200, position: "bottom-end", children: [
200
- /* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(De, { variant: "transparent", color: o ? "white" : "blue", title: ne().t("toggleLanguage"), children: s(e) }) }),
213
+ /* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(Me, { variant: "transparent", color: o ? "white" : "blue", title: ne().t("toggleLanguage"), children: s(e) }) }),
201
214
  /* @__PURE__ */ r(ie.Dropdown, { children: a() })
202
215
  ] });
203
216
  }, Ht = () => {
@@ -244,7 +257,7 @@ const rA = xe.createContext({}), Bt = ({
244
257
  A ? A() : s();
245
258
  }, l = n === "dark";
246
259
  return /* @__PURE__ */ r(
247
- De,
260
+ Me,
248
261
  {
249
262
  variant: "transparent",
250
263
  color: l ? t : o,
@@ -262,7 +275,7 @@ function jt({ category: A, label: t, color: o, description: e, image: n, onClick
262
275
  label: `${ne().t(t || "")}`,
263
276
  description: e ? ne().t(e) : void 0,
264
277
  leftSection: n ? /* @__PURE__ */ r(Je, { children: /* @__PURE__ */ r(Qr, { src: n, alt: ne().t(t || ""), width: 24, height: 24 }) }) : void 0,
265
- rightSection: A ? /* @__PURE__ */ r(pA, { color: o, size: "sm", children: ne().t(A) }) : void 0
278
+ rightSection: A ? /* @__PURE__ */ r(fA, { color: o, size: "sm", children: ne().t(A) }) : void 0
266
279
  },
267
280
  t
268
281
  );
@@ -298,7 +311,7 @@ const Xt = ({ navigationData: A, color: t }) => {
298
311
  return h && h.toLowerCase().includes(o.toLowerCase().trim());
299
312
  }).map((i) => /* @__PURE__ */ r(jt, { ...i }, i.id));
300
313
  return /* @__PURE__ */ r(Pe, { children: a && a.length > 0 ? /* @__PURE__ */ R(Pe, { children: [
301
- /* @__PURE__ */ r(Me, { withinPortal: !0, withArrow: !0, label: `${s("archbase:Comandos ⌘M")}`, children: /* @__PURE__ */ r($r, { color: t, leftSection: /* @__PURE__ */ r(Ur, { size: "24px" }), onClick: () => Ct.open() }) }),
314
+ /* @__PURE__ */ r(De, { withinPortal: !0, withArrow: !0, label: `${s("archbase:Comandos ⌘M")}`, children: /* @__PURE__ */ r($r, { color: t, leftSection: /* @__PURE__ */ r(Ur, { size: "24px" }), onClick: () => Ct.open() }) }),
302
315
  /* @__PURE__ */ R(
303
316
  Ue.Root,
304
317
  {
@@ -327,62 +340,62 @@ const Xt = ({ navigationData: A, color: t }) => {
327
340
  hideAutoHeaderActionsOnUserMenuBreakPoint: d,
328
341
  withDividerAfterUserMenuToggleColorScheme: u = !0,
329
342
  user: p,
330
- navigationData: v = [],
331
- logo: b,
332
- headerActions: m,
333
- styleLogo: g,
343
+ navigationData: y = [],
344
+ logo: m,
345
+ headerActions: g,
346
+ styleLogo: b,
334
347
  showLanguageSelector: f = !1,
335
348
  sideBarHiddenBreakPoint: x,
336
- headerLeftContent: I,
337
- toggleColorScheme: L,
338
- logoLeftSection: J,
339
- logoRightSection: V,
349
+ headerLeftContent: E,
350
+ toggleColorScheme: M,
351
+ logoLeftSection: V,
352
+ logoRightSection: U,
340
353
  showBurger: Y = !0,
341
- showCommands: M = !0,
342
- sunColor: O,
343
- moonColor: D,
344
- styles: K
354
+ showCommands: P = !0,
355
+ sunColor: F,
356
+ moonColor: z,
357
+ styles: Q
345
358
  }) => {
346
- const P = me(), { colorScheme: y, toggleColorScheme: F } = de(), T = ye(rA), ee = DA(
347
- `(max-width: ${x ? fe(x) : P.breakpoints.md})`
348
- ), U = DA(
349
- `(max-width: ${d ? fe(d) : P.breakpoints.md})`
359
+ const O = me(), { colorScheme: v, toggleColorScheme: L } = de(), C = ye(rA), _ = MA(
360
+ `(max-width: ${x ? pe(x) : O.breakpoints.md})`
361
+ ), H = MA(
362
+ `(max-width: ${d ? pe(d) : O.breakpoints.md})`
350
363
  );
351
- let k = !1, G = !1;
352
- return i && (h = !U, c = !U, t = U, o = U, a = U, u = U, f && (G = !U, k = U)), /* @__PURE__ */ R(Pe, { children: [
364
+ let I = !1, G = !1;
365
+ return i && (h = !H, c = !H, t = H, o = H, a = H, u = H, f && (G = !H, I = H)), /* @__PURE__ */ R(Pe, { children: [
353
366
  /* @__PURE__ */ R(Ye, { style: { width: 300, height: 50 }, align: "center", children: [
354
- J,
367
+ V,
355
368
  /* @__PURE__ */ r(
356
369
  "img",
357
370
  {
358
371
  style: {
359
372
  height: 50,
360
- ...g
373
+ ...b
361
374
  },
362
375
  alt: "logo",
363
- src: b
376
+ src: m
364
377
  }
365
378
  ),
366
- V
379
+ U
367
380
  ] }),
368
381
  Y && /* @__PURE__ */ r(
369
382
  Kr,
370
383
  {
371
- opened: T.hidden ? T.hidden : !1,
372
- onClick: () => T.setHidden(!T.hidden),
384
+ opened: C.hidden ? C.hidden : !1,
385
+ onClick: () => C.setHidden(!C.hidden),
373
386
  size: "sm",
374
- color: P.colors.gray[7],
387
+ color: O.colors.gray[7],
375
388
  mx: { base: "xs", xs: "lg", sm: "xl" },
376
- display: ee ? "" : "none"
389
+ display: _ ? "" : "none"
377
390
  }
378
391
  ),
379
- /* @__PURE__ */ r("div", { children: M && /* @__PURE__ */ r(Xt, { navigationData: v }) }),
380
- /* @__PURE__ */ r(H, { style: { flex: 1 }, children: I }),
392
+ /* @__PURE__ */ r("div", { children: P && /* @__PURE__ */ r(Xt, { navigationData: y }) }),
393
+ /* @__PURE__ */ r(q, { style: { flex: 1 }, children: E }),
381
394
  /* @__PURE__ */ R(qt, { children: [
382
- h && m,
383
- c && /* @__PURE__ */ r(Yt, { toggleColorScheme: L, sunColor: O, moonColor: D }),
395
+ h && g,
396
+ c && /* @__PURE__ */ r(Yt, { toggleColorScheme: M, sunColor: F, moonColor: z }),
384
397
  G && /* @__PURE__ */ r(Ut, {}),
385
- /* @__PURE__ */ R(ie, { shadow: "md", width: 200, position: "bottom-end", styles: K?.menu, children: [
398
+ /* @__PURE__ */ R(ie, { shadow: "md", width: 200, position: "bottom-end", styles: Q?.menu, children: [
386
399
  /* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ R("div", { children: [
387
400
  /* @__PURE__ */ r(
388
401
  iA,
@@ -422,12 +435,12 @@ const Xt = ({ navigationData: A, color: t }) => {
422
435
  t && /* @__PURE__ */ r(
423
436
  ie.Item,
424
437
  {
425
- leftSection: y === "dark" ? /* @__PURE__ */ r(_A, { size: e }) : /* @__PURE__ */ r(WA, { size: e }),
426
- onClick: L || F,
438
+ leftSection: v === "dark" ? /* @__PURE__ */ r(_A, { size: e }) : /* @__PURE__ */ r(WA, { size: e }),
439
+ onClick: M || L,
427
440
  children: `${ne().t("archbase:toggleColorScheme")}`
428
441
  }
429
442
  ),
430
- k && /* @__PURE__ */ r(Ht, {}),
443
+ I && /* @__PURE__ */ r(Ht, {}),
431
444
  u && /* @__PURE__ */ r(ie.Divider, {}),
432
445
  n && s
433
446
  ] })
@@ -439,8 +452,8 @@ function $A(A, t, o, e, n, s, a, l, i, h) {
439
452
  const c = s ? A.colorScheme === "dark" ? A.colors[A.primaryColor][8] : A.colors[A.primaryColor][7] : void 0, d = s ? (A.colorScheme === "dark", A.colors[A.primaryColor][0]) : void 0, u = A.colorScheme === "dark" ? "#3e5e7e" : "#9fb6cf", p = "0.5";
440
453
  if (e.links) {
441
454
  if (!(e.disabled && e.hideDisabledItem))
442
- return /* @__PURE__ */ r(Me, { disabled: !t, label: Re.t(e.label), children: /* @__PURE__ */ r(
443
- Mt,
455
+ return /* @__PURE__ */ r(De, { disabled: !t, label: Re.t(e.label), children: /* @__PURE__ */ r(
456
+ Dt,
444
457
  {
445
458
  rootStyles: {
446
459
  fontSize: "16px",
@@ -472,17 +485,17 @@ function $A(A, t, o, e, n, s, a, l, i, h) {
472
485
  defaultOpen: !e.disabled,
473
486
  label: t ? "" : Re.t(e.label),
474
487
  disabled: e.disabled,
475
- children: e.links && e.links.filter((v) => v.showInSidebar === !0 && (!v.disabled || !v.hideDisabledItem)).map((v, b) => /* @__PURE__ */ r(
488
+ children: e.links && e.links.filter((y) => y.showInSidebar === !0 && (!y.disabled || !y.hideDisabledItem)).map((y, m) => /* @__PURE__ */ r(
476
489
  OA,
477
490
  {
478
- onClick: () => o(v),
491
+ onClick: () => o(y),
479
492
  rootStyles: {
480
493
  [`.${te.icon}`]: {
481
494
  background: c,
482
- color: l && v.link === a ? "white" : d
495
+ color: l && y.link === a ? "white" : d
483
496
  },
484
497
  [`.${te.label}`]: {
485
- color: l && v.link === a ? "white" : i
498
+ color: l && y.link === a ? "white" : i
486
499
  },
487
500
  [`.${te.button}`]: {
488
501
  paddingLeft: "40px !important",
@@ -506,19 +519,19 @@ function $A(A, t, o, e, n, s, a, l, i, h) {
506
519
  }
507
520
  }
508
521
  },
509
- id: v.label,
510
- icon: v.icon,
511
- disabled: typeof v.disabled == "function" ? v.disabled() : v.disabled,
512
- active: l && v.link === a,
513
- children: Re.t(v.label)
522
+ id: y.label,
523
+ icon: y.icon,
524
+ disabled: typeof y.disabled == "function" ? y.disabled() : y.disabled,
525
+ active: l && y.link === a,
526
+ children: Re.t(y.label)
514
527
  },
515
- b
528
+ m
516
529
  ))
517
530
  },
518
531
  n
519
532
  ) });
520
533
  } else if (e.showInSidebar && (!e.disabled || !e.hideDisabledItem))
521
- return /* @__PURE__ */ r(Me, { disabled: !t, label: Re.t(e.label), children: /* @__PURE__ */ r(
534
+ return /* @__PURE__ */ r(De, { disabled: !t, label: Re.t(e.label), children: /* @__PURE__ */ r(
522
535
  OA,
523
536
  {
524
537
  rootStyles: {
@@ -598,7 +611,7 @@ const _t = (A) => ({
598
611
  }
599
612
  }
600
613
  }), Wt = (A, t, o, e, n, s, a, l, i, h, c) => {
601
- const d = _t(), u = s ? {} : { padding: o ? `0 ${(n - e) / 2}px` : "0 20px" }, p = s ? {} : { display: "none" }, v = a ? A === "dark" ? t.colors[t.primaryColor][8] : t.colors[t.primaryColor][0] : void 0;
614
+ const d = _t(), u = s ? {} : { padding: o ? `0 ${(n - e) / 2}px` : "0 20px" }, p = s ? {} : { display: "none" }, y = a ? A === "dark" ? t.colors[t.primaryColor][8] : t.colors[t.primaryColor][0] : void 0;
602
615
  return {
603
616
  root: {
604
617
  fontSize: "14px",
@@ -607,7 +620,7 @@ const _t = (A) => ({
607
620
  color: t.white
608
621
  },
609
622
  icon: {
610
- background: v,
623
+ background: y,
611
624
  color: c,
612
625
  [`&.${te.disabled}`]: {
613
626
  color: d[A].menu.disabled.color
@@ -634,8 +647,8 @@ const _t = (A) => ({
634
647
  height: l,
635
648
  ...u
636
649
  },
637
- label: ({ open: b }) => ({
638
- fontWeight: b ? 600 : void 0,
650
+ label: ({ open: m }) => ({
651
+ fontWeight: m ? 600 : void 0,
639
652
  color: h,
640
653
  "&:hover": {
641
654
  color: t.white
@@ -656,12 +669,12 @@ function Zt(A, t, o, e, n, s, a, l, i, h, c) {
656
669
  overflowY: "hidden",
657
670
  left: 0,
658
671
  right: 0,
659
- height: a ? "calc(100vh - 28px)" : `${fe(l)}px`
672
+ height: a ? "calc(100vh - 28px)" : `${pe(l)}px`
660
673
  }
661
674
  },
662
675
  collapsed: t,
663
- width: `${fe(o)}px`,
664
- collapsedWidth: `${fe(e)}px`,
676
+ width: `${pe(o)}px`,
677
+ collapsedWidth: `${pe(e)}px`,
665
678
  children: [
666
679
  i && /* @__PURE__ */ r(Pe, { children: i }),
667
680
  /* @__PURE__ */ r(ze, { style: { overflowY: "auto", overflowX: "hidden", height: l }, children: /* @__PURE__ */ r(lr, { rootStyles: { background: c }, menuItemStyles: n, closeOnClick: !0, children: s && /* @__PURE__ */ r(Pe, { children: s }) }) }),
@@ -677,7 +690,7 @@ function QA({
677
690
  }) {
678
691
  const e = me(), { colorScheme: n } = de(), s = o ?? (n === "dark" ? e.colors.dark[7] : e.white);
679
692
  return t ? /* @__PURE__ */ r(
680
- _,
693
+ W,
681
694
  {
682
695
  gap: "sm",
683
696
  p: "xs",
@@ -688,7 +701,7 @@ function QA({
688
701
  height: "100%"
689
702
  },
690
703
  children: Array.from({ length: A }).map((a, l) => /* @__PURE__ */ r(
691
- pe,
704
+ fe,
692
705
  {
693
706
  height: 32,
694
707
  width: 32,
@@ -698,7 +711,7 @@ function QA({
698
711
  ))
699
712
  }
700
713
  ) : /* @__PURE__ */ r(
701
- _,
714
+ W,
702
715
  {
703
716
  gap: "xs",
704
717
  p: "md",
@@ -710,7 +723,7 @@ function QA({
710
723
  },
711
724
  children: Array.from({ length: A }).map((a, l) => /* @__PURE__ */ R(Le, { gap: "sm", wrap: "nowrap", children: [
712
725
  /* @__PURE__ */ r(
713
- pe,
726
+ fe,
714
727
  {
715
728
  height: 24,
716
729
  width: 24,
@@ -718,7 +731,7 @@ function QA({
718
731
  }
719
732
  ),
720
733
  /* @__PURE__ */ r(
721
- pe,
734
+ fe,
722
735
  {
723
736
  height: 18,
724
737
  radius: "xl",
@@ -737,7 +750,7 @@ function eo({
737
750
  }) {
738
751
  const n = me(), { colorScheme: s } = de(), a = e ?? (s === "dark" ? n.colors.dark[6] : n.colors.gray[2]);
739
752
  return /* @__PURE__ */ r(
740
- _,
753
+ W,
741
754
  {
742
755
  gap: "md",
743
756
  p: "xs",
@@ -747,9 +760,9 @@ function eo({
747
760
  height: o,
748
761
  backgroundColor: a
749
762
  },
750
- children: Array.from({ length: A }).map((l, i) => /* @__PURE__ */ R(_, { gap: 4, align: "center", children: [
763
+ children: Array.from({ length: A }).map((l, i) => /* @__PURE__ */ R(W, { gap: 4, align: "center", children: [
751
764
  /* @__PURE__ */ r(
752
- pe,
765
+ fe,
753
766
  {
754
767
  height: 48,
755
768
  width: 48,
@@ -758,7 +771,7 @@ function eo({
758
771
  }
759
772
  ),
760
773
  /* @__PURE__ */ r(
761
- pe,
774
+ fe,
762
775
  {
763
776
  height: 10,
764
777
  width: 40,
@@ -775,7 +788,7 @@ function KA({
775
788
  children: o
776
789
  }) {
777
790
  const e = me(), { colorScheme: n } = de(), s = t ?? (n === "dark" ? e.colors.dark[7] : e.white), a = n === "dark" ? e.colors.red[4] : e.colors.red[6];
778
- return o ? /* @__PURE__ */ r(Pe, { children: o }) : /* @__PURE__ */ r(Je, { p: "md", style: { backgroundColor: s, flex: 1, height: "100%" }, children: /* @__PURE__ */ R(_, { align: "center", gap: "xs", children: [
791
+ return o ? /* @__PURE__ */ r(Pe, { children: o }) : /* @__PURE__ */ r(Je, { p: "md", style: { backgroundColor: s, flex: 1, height: "100%" }, children: /* @__PURE__ */ R(W, { align: "center", gap: "xs", children: [
779
792
  /* @__PURE__ */ r(Hr, { size: 32, color: a }),
780
793
  /* @__PURE__ */ r(Te, { size: "sm", c: a, ta: "center", children: A })
781
794
  ] }) });
@@ -795,56 +808,56 @@ function Ao({
795
808
  groupLabelDarkColor: d,
796
809
  groupLabelLightColor: u,
797
810
  collapsed: p,
798
- onMenuItemClick: v,
799
- onClickActionIcon: b,
800
- withBorder: m = !1,
801
- showGroupLabels: g = !0,
811
+ onMenuItemClick: y,
812
+ onClickActionIcon: m,
813
+ withBorder: g = !1,
814
+ showGroupLabels: b = !0,
802
815
  theme: f,
803
816
  sidebarRef: x,
804
- defaultGroupIcon: I,
805
- selectedGroupName: L,
806
- sideBarHeaderContent: J,
807
- iconsWithBackground: V = !1,
817
+ defaultGroupIcon: E,
818
+ selectedGroupName: M,
819
+ sideBarHeaderContent: V,
820
+ iconsWithBackground: U = !1,
808
821
  menuItemHeight: Y = 40,
809
- highlightActiveMenuItem: M = !0,
810
- backgroundDarkColor: O,
811
- backgroundLightColor: D,
812
- textDarkColor: K,
813
- textLightColor: P,
814
- iconDarkColor: y,
815
- iconLightColor: F,
816
- collapsedSubmenuWidth: T,
817
- isLoading: ee = !1,
818
- loadingError: U,
819
- loadingComponent: k,
822
+ highlightActiveMenuItem: P = !0,
823
+ backgroundDarkColor: F,
824
+ backgroundLightColor: z,
825
+ textDarkColor: Q,
826
+ textLightColor: O,
827
+ iconDarkColor: v,
828
+ iconLightColor: L,
829
+ collapsedSubmenuWidth: C,
830
+ isLoading: _ = !1,
831
+ loadingError: H,
832
+ loadingComponent: I,
820
833
  errorComponent: G,
821
- skeletonItemCount: Ae = 8,
834
+ skeletonItemCount: re = 8,
822
835
  skeletonGroupCount: Ce = 3
823
836
  }) {
824
- const [se, be] = ge(""), we = bA(), Se = je(), { colorScheme: w } = de(), S = w === "dark" ? O ?? f.colors.dark[7] : D ?? f.white, $ = s || (w === "dark" ? f.colors[f.primaryColor][8] : f.colors[f.primaryColor][0]), N = w === "dark" ? K ?? "var(--mantine-color-text)" : P ?? "var(--mantine-color-text)", B = w === "dark" ? y ?? f.colors[f.primaryColor][0] : F ?? f.colors[f.primaryColor][7], E = ce(() => {
825
- const re = /* @__PURE__ */ new Set();
826
- return A.forEach((X) => {
827
- if (X.showInSidebar && (!X.disabled || !X.hideDisabledItem)) {
837
+ const [se, be] = ge(""), we = bA(), Se = je(), { colorScheme: S } = de(), k = S === "dark" ? F ?? f.colors.dark[7] : z ?? f.white, $ = s || (S === "dark" ? f.colors[f.primaryColor][8] : f.colors[f.primaryColor][0]), D = S === "dark" ? Q ?? "var(--mantine-color-text)" : O ?? "var(--mantine-color-text)", B = S === "dark" ? v ?? f.colors[f.primaryColor][0] : L ?? f.colors[f.primaryColor][7], T = ce(() => {
838
+ const ee = /* @__PURE__ */ new Set();
839
+ return A.forEach((J) => {
840
+ if (J.showInSidebar && (!J.disabled || !J.hideDisabledItem)) {
828
841
  let ke = !1;
829
- X.group || (X.group = {
830
- icon: I || /* @__PURE__ */ r(ZA, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
842
+ J.group || (J.group = {
843
+ icon: E || /* @__PURE__ */ r(ZA, { size: "2.2rem", color: "#63B1FB", stroke: 1 }),
831
844
  label: "Default",
832
845
  name: "Default",
833
846
  hint: "Default",
834
847
  indexOrder: 0
835
- }), re.forEach((Q) => {
836
- Q.name === X.group.name && (ke = !0);
837
- }), ke || re.add({
838
- name: X.group.name,
839
- indexOrder: X.group.indexOrder,
848
+ }), ee.forEach((K) => {
849
+ K.name === J.group.name && (ke = !0);
850
+ }), ke || ee.add({
851
+ name: J.group.name,
852
+ indexOrder: J.group.indexOrder,
840
853
  component: /* @__PURE__ */ r(
841
- Me,
854
+ De,
842
855
  {
843
- content: X.group.hint,
844
- label: X.group.label,
845
- disabled: g,
856
+ content: J.group.hint,
857
+ label: J.group.label,
858
+ disabled: b,
846
859
  children: /* @__PURE__ */ R(
847
- _,
860
+ W,
848
861
  {
849
862
  gap: "2px",
850
863
  style: {
@@ -855,69 +868,69 @@ function Ao({
855
868
  },
856
869
  children: [
857
870
  /* @__PURE__ */ r(
858
- De,
871
+ Me,
859
872
  {
860
873
  size: "48px",
861
- variant: X.group.name === se ? "filled" : l ? "subtle" : "light",
862
- color: X.group.name === se ? $ : a,
874
+ variant: J.group.name === se ? "filled" : l ? "subtle" : "light",
875
+ color: J.group.name === se ? $ : a,
863
876
  onClick: () => {
864
- be((Q) => (b && b(Q, X.group.name), X.group.name === Q && !i ? "" : X.group.name));
877
+ be((K) => (m && m(K, J.group.name), J.group.name === K && !i ? "" : J.group.name));
865
878
  },
866
- children: X.group.icon
879
+ children: J.group.icon
867
880
  }
868
881
  ),
869
- g ? /* @__PURE__ */ r(
882
+ b ? /* @__PURE__ */ r(
870
883
  Te,
871
884
  {
872
885
  size: "xs",
873
- c: w === "dark" ? d || f.colors[f.primaryColor][2] : u || f.colors[f.primaryColor][2],
874
- children: X.group.label
886
+ c: S === "dark" ? d || f.colors[f.primaryColor][2] : u || f.colors[f.primaryColor][2],
887
+ children: J.group.label
875
888
  }
876
889
  ) : !1
877
890
  ]
878
891
  }
879
892
  )
880
893
  },
881
- X.group.name
894
+ J.group.name
882
895
  )
883
896
  });
884
897
  }
885
- }), re.forEach((X) => {
886
- const ke = A.filter((Q) => Q.showInSidebar === !0 && (!Q.disabled || !Q.hideDisabledItem) && Q.group && Q.group.name === X.name);
887
- X.links = ke.map((Q, le) => $A(f, p, v, Q, le, V, Se.pathname, M, N, T));
888
- }), [...re].sort((X, ke) => X.indexOrder - ke.indexOrder);
889
- }, [A, se, w, p, we.selectedCompany, M, Se]), z = Wt(
890
- w,
898
+ }), ee.forEach((J) => {
899
+ const ke = A.filter((K) => K.showInSidebar === !0 && (!K.disabled || !K.hideDisabledItem) && K.group && K.group.name === J.name);
900
+ J.links = ke.map((K, le) => $A(f, p, y, K, le, U, Se.pathname, P, D, C));
901
+ }), [...ee].sort((J, ke) => J.indexOrder - ke.indexOrder);
902
+ }, [A, se, S, p, we.selectedCompany, P, Se]), N = Wt(
903
+ S,
891
904
  f,
892
905
  p,
893
906
  35,
894
- Number(fe(n)),
895
- E.length > 1,
896
- V,
907
+ Number(pe(n)),
908
+ T.length > 1,
909
+ U,
897
910
  Y,
898
- S,
899
- N,
911
+ k,
912
+ D,
900
913
  B
901
- ), j = p || se === "" ? "0px" : `calc(${o} - ${t})`, he = l || (w === "dark" ? f.colors[f.primaryColor][6] : f.colors[f.primaryColor][7]), Ie = C(() => {
902
- L && E.map((re) => re.name).includes(L) ? be(L) : E.length > 1 && be("Default");
914
+ ), X = p || se === "" ? "0px" : `calc(${o} - ${t})`, he = l || (S === "dark" ? f.colors[f.primaryColor][6] : f.colors[f.primaryColor][7]), Ie = w(() => {
915
+ M && T.map((ee) => ee.name).includes(M) ? be(M) : T.length > 1 && be("Default");
903
916
  }, []);
904
917
  oe(() => {
905
918
  Ie();
906
919
  }, []), oe(() => {
907
920
  p ? be("") : se === "" && Ie();
908
921
  }, [p]);
909
- const q = () => U ? G || /* @__PURE__ */ r(
922
+ const j = () => H ? G || /* @__PURE__ */ r(
910
923
  KA,
911
924
  {
912
- message: U,
913
- backgroundColor: S
925
+ message: H,
926
+ backgroundColor: k
914
927
  }
915
- ) : ee ? k || /* @__PURE__ */ r(
928
+ ) : _ ? I || /* @__PURE__ */ r(
916
929
  QA,
917
930
  {
918
- itemCount: Ae,
931
+ itemCount: re,
919
932
  collapsed: p,
920
- backgroundColor: S
933
+ backgroundColor: k
921
934
  }
922
935
  ) : se !== "" ? /* @__PURE__ */ r(
923
936
  sr,
@@ -925,16 +938,16 @@ function Ao({
925
938
  ref: x,
926
939
  rootStyles: {
927
940
  [`.${ar.container}`]: {
928
- background: S,
941
+ background: k,
929
942
  overflowX: "hidden",
930
943
  overflowY: "hidden",
931
944
  left: 0,
932
- height: `${fe(e)}px`
945
+ height: `${pe(e)}px`
933
946
  }
934
947
  },
935
- style: { borderColor: w === "dark" ? "#000" : "#efefef" },
948
+ style: { borderColor: S === "dark" ? "#000" : "#efefef" },
936
949
  collapsed: p,
937
- width: `${fe(j)}`,
950
+ width: `${pe(X)}`,
938
951
  collapsedWidth: "0px",
939
952
  children: /* @__PURE__ */ r(
940
953
  ze,
@@ -943,21 +956,21 @@ function Ao({
943
956
  overflowY: "auto",
944
957
  overflowX: "hidden",
945
958
  height: "100%",
946
- width: j
959
+ width: X
947
960
  },
948
- children: /* @__PURE__ */ r(lr, { rootStyles: { background: S }, menuItemStyles: z, closeOnClick: !0, children: E.find((re) => re.name === se)?.links || null })
961
+ children: /* @__PURE__ */ r(lr, { rootStyles: { background: k }, menuItemStyles: N, closeOnClick: !0, children: T.find((ee) => ee.name === se)?.links || null })
949
962
  }
950
963
  )
951
964
  }
952
- ) : null, ve = () => ee && E.length === 0 ? /* @__PURE__ */ r(
965
+ ) : null, ve = () => _ && T.length === 0 ? /* @__PURE__ */ r(
953
966
  eo,
954
967
  {
955
968
  groupCount: Ce,
956
969
  width: t,
957
970
  height: e
958
971
  }
959
- ) : E.length !== 0 ? /* @__PURE__ */ r(
960
- _,
972
+ ) : T.length !== 0 ? /* @__PURE__ */ r(
973
+ W,
961
974
  {
962
975
  gap: "4px",
963
976
  style: {
@@ -966,41 +979,41 @@ function Ao({
966
979
  padding: "4px",
967
980
  backgroundColor: he
968
981
  },
969
- children: E.map((re) => /* @__PURE__ */ r(xe.Fragment, { children: re.component }, re.name))
982
+ children: T.map((ee) => /* @__PURE__ */ r(xe.Fragment, { children: ee.component }, ee.name))
970
983
  }
971
- ) : null, W = () => U ? G || /* @__PURE__ */ r(
984
+ ) : null, Z = () => H ? G || /* @__PURE__ */ r(
972
985
  KA,
973
986
  {
974
- message: U,
975
- backgroundColor: S
987
+ message: H,
988
+ backgroundColor: k
976
989
  }
977
- ) : ee ? k || /* @__PURE__ */ r(
990
+ ) : _ ? I || /* @__PURE__ */ r(
978
991
  QA,
979
992
  {
980
- itemCount: Ae,
993
+ itemCount: re,
981
994
  collapsed: p,
982
- backgroundColor: S
995
+ backgroundColor: k
983
996
  }
984
997
  ) : A.map(
985
- (re, Ee) => $A(f, p, v, re, Ee, V, Se.pathname, M, N, T)
998
+ (ee, Ee) => $A(f, p, y, ee, Ee, U, Se.pathname, P, D, C)
986
999
  );
987
- return /* @__PURE__ */ r(Pe, { children: E.length == 1 ? Zt(
1000
+ return /* @__PURE__ */ r(Pe, { children: T.length == 1 ? Zt(
988
1001
  x,
989
1002
  p,
990
1003
  o,
991
1004
  n,
992
- z,
993
- W(),
1005
+ N,
1006
+ Z(),
994
1007
  i,
995
1008
  e,
996
- J,
1009
+ V,
997
1010
  c,
998
- S
1011
+ k
999
1012
  ) : /* @__PURE__ */ R(Ye, { direction: "column", w: p ? n : o, children: [
1000
- /* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: J }),
1001
- /* @__PURE__ */ R(Fr, { withBorder: m, h: e, w: "100%", display: "flex", children: [
1013
+ /* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: V }),
1014
+ /* @__PURE__ */ R(Fr, { withBorder: g, h: e, w: "100%", display: "flex", children: [
1002
1015
  ve(),
1003
- q()
1016
+ j()
1004
1017
  ] }),
1005
1018
  /* @__PURE__ */ r("div", { style: { height: "auto", width: "100%" }, children: c })
1006
1019
  ] }) });
@@ -1029,102 +1042,102 @@ function CA({
1029
1042
  highlightActiveItem: c = !0,
1030
1043
  onMenuItemClick: d
1031
1044
  }) {
1032
- const u = je(), p = qe(), [v, b] = aA({
1045
+ const u = je(), p = qe(), [y, m] = aA({
1033
1046
  value: n,
1034
1047
  defaultValue: e,
1035
1048
  finalValue: !1,
1036
1049
  onChange: s
1037
- }), [m, g] = aA({
1050
+ }), [g, b] = aA({
1038
1051
  value: l,
1039
1052
  defaultValue: a,
1040
1053
  finalValue: "",
1041
1054
  onChange: i
1042
- }), [f, x] = ge(""), [I, L] = ge(() => {
1043
- const y = /* @__PURE__ */ new Set();
1044
- return t.forEach((F, T) => {
1045
- F.initiallyOpened && F.links && F.links.length > 0 && y.add(`group-${T}`);
1046
- }), y;
1047
- }), J = u.pathname, V = C(() => {
1048
- b(!v);
1049
- }, [v, b]), Y = C((y) => {
1050
- L((F) => {
1051
- const T = new Set(F);
1052
- return T.has(y) ? T.delete(y) : T.add(y), T;
1055
+ }), [f, x] = ge(""), [E, M] = ge(() => {
1056
+ const v = /* @__PURE__ */ new Set();
1057
+ return t.forEach((L, C) => {
1058
+ L.initiallyOpened && L.links && L.links.length > 0 && v.add(`group-${C}`);
1059
+ }), v;
1060
+ }), V = u.pathname, U = w(() => {
1061
+ m(!y);
1062
+ }, [y, m]), Y = w((v) => {
1063
+ M((L) => {
1064
+ const C = new Set(L);
1065
+ return C.has(v) ? C.delete(v) : C.add(v), C;
1053
1066
  });
1054
- }, []), M = C((y) => {
1055
- L((F) => {
1056
- const T = new Set(F);
1057
- return T.add(y), T;
1067
+ }, []), P = w((v) => {
1068
+ M((L) => {
1069
+ const C = new Set(L);
1070
+ return C.add(v), C;
1058
1071
  });
1059
- }, []), O = C((y) => {
1060
- L((F) => {
1061
- const T = new Set(F);
1062
- return T.delete(y), T;
1072
+ }, []), F = w((v) => {
1073
+ M((L) => {
1074
+ const C = new Set(L);
1075
+ return C.delete(v), C;
1063
1076
  });
1064
- }, []), D = ce(() => {
1077
+ }, []), z = ce(() => {
1065
1078
  if (!f.trim())
1066
1079
  return t;
1067
- const y = f.toLowerCase().trim(), F = (T) => T.reduce((ee, U) => {
1068
- const k = U.label.toLowerCase().includes(y), G = U.links ? F(U.links) : [];
1069
- return (k || G.length > 0) && ee.push({
1070
- ...U,
1071
- links: G.length > 0 ? G : U.links,
1080
+ const v = f.toLowerCase().trim(), L = (C) => C.reduce((_, H) => {
1081
+ const I = H.label.toLowerCase().includes(v), G = H.links ? L(H.links) : [];
1082
+ return (I || G.length > 0) && _.push({
1083
+ ...H,
1084
+ links: G.length > 0 ? G : H.links,
1072
1085
  // Expandir automaticamente quando há match em subitens
1073
- initiallyOpened: G.length > 0 || k
1074
- }), ee;
1086
+ initiallyOpened: G.length > 0 || I
1087
+ }), _;
1075
1088
  }, []);
1076
- return F(t);
1077
- }, [t, f]), K = C(
1078
- (y) => {
1079
- d && d(y), y.link && (y.routeParams ? p(y.link, { state: y.routeParams }) : p(y.link)), y.redirect && p(y.redirect);
1089
+ return L(t);
1090
+ }, [t, f]), Q = w(
1091
+ (v) => {
1092
+ d && d(v), v.link && (v.routeParams ? p(v.link, { state: v.routeParams }) : p(v.link)), v.redirect && p(v.redirect);
1080
1093
  },
1081
1094
  [p, d]
1082
- ), P = ce(
1095
+ ), O = ce(
1083
1096
  () => ({
1084
- collapsed: v,
1085
- setCollapsed: b,
1086
- toggleCollapsed: V,
1087
- activeGroup: m,
1088
- setActiveGroup: g,
1089
- activeItemPath: J,
1090
- navigateToItem: K,
1097
+ collapsed: y,
1098
+ setCollapsed: m,
1099
+ toggleCollapsed: U,
1100
+ activeGroup: g,
1101
+ setActiveGroup: b,
1102
+ activeItemPath: V,
1103
+ navigateToItem: Q,
1091
1104
  searchQuery: f,
1092
1105
  setSearchQuery: x,
1093
- filteredItems: D,
1094
- expandedGroups: I,
1106
+ filteredItems: z,
1107
+ expandedGroups: E,
1095
1108
  toggleGroup: Y,
1096
- expandGroup: M,
1097
- collapseGroup: O,
1109
+ expandGroup: P,
1110
+ collapseGroup: F,
1098
1111
  variant: o,
1099
1112
  showKeyboardShortcuts: h,
1100
1113
  highlightActiveItem: c
1101
1114
  }),
1102
1115
  [
1103
- v,
1104
- b,
1105
- V,
1116
+ y,
1106
1117
  m,
1118
+ U,
1107
1119
  g,
1108
- J,
1109
- K,
1120
+ b,
1121
+ V,
1122
+ Q,
1110
1123
  f,
1111
- D,
1112
- I,
1124
+ z,
1125
+ E,
1113
1126
  Y,
1114
- M,
1115
- O,
1127
+ P,
1128
+ F,
1116
1129
  o,
1117
1130
  h,
1118
1131
  c
1119
1132
  ]
1120
1133
  );
1121
- return /* @__PURE__ */ r(yA.Provider, { value: P, children: A });
1134
+ return /* @__PURE__ */ r(yA.Provider, { value: O, children: A });
1122
1135
  }
1123
1136
  function wA({
1124
1137
  navigationData: A,
1125
1138
  onMenuItemClick: t
1126
1139
  }) {
1127
- const o = je(), e = qe(), n = o.pathname, s = C(
1140
+ const o = je(), e = qe(), n = o.pathname, s = w(
1128
1141
  (d) => {
1129
1142
  for (const u of d) {
1130
1143
  if (u.link === n)
@@ -1138,25 +1151,25 @@ function wA({
1138
1151
  return null;
1139
1152
  },
1140
1153
  [n]
1141
- ), a = ce(() => s(A), [s, A]), l = C(
1154
+ ), a = ce(() => s(A), [s, A]), l = w(
1142
1155
  (d) => d.link === n,
1143
1156
  [n]
1144
- ), i = C(
1157
+ ), i = w(
1145
1158
  (d) => d.link === n ? !0 : d.links ? d.links.some((u) => i(u)) : !1,
1146
1159
  [n]
1147
1160
  ), h = ce(() => {
1148
- const d = [], u = (p, v) => {
1149
- for (const b of p) {
1150
- const m = [...v, b];
1151
- if (b.link === n)
1152
- return d.push(...m), !0;
1153
- if (b.links && u(b.links, m))
1161
+ const d = [], u = (p, y) => {
1162
+ for (const m of p) {
1163
+ const g = [...y, m];
1164
+ if (m.link === n)
1165
+ return d.push(...g), !0;
1166
+ if (m.links && u(m.links, g))
1154
1167
  return !0;
1155
1168
  }
1156
1169
  return !1;
1157
1170
  };
1158
1171
  return u(A, []), d;
1159
- }, [A, n]), c = C(
1172
+ }, [A, n]), c = w(
1160
1173
  (d) => {
1161
1174
  (typeof d.disabled == "function" ? d.disabled() : d.disabled) || (t && t(d), d.link && (d.routeParams ? e(d.link, { state: d.routeParams }) : e(d.link)), d.redirect && e(d.redirect));
1162
1175
  },
@@ -1175,7 +1188,7 @@ function ro({
1175
1188
  navigationData: A,
1176
1189
  onSearch: t
1177
1190
  }) {
1178
- const [o, e] = ge(""), n = C((h) => h.reduce((c, d) => {
1191
+ const [o, e] = ge(""), n = w((h) => h.reduce((c, d) => {
1179
1192
  let u = 1;
1180
1193
  return d.links && (u += n(d.links)), c + u;
1181
1194
  }, 0), []), s = ce(() => {
@@ -1184,29 +1197,29 @@ function ro({
1184
1197
  const h = o.toLowerCase().trim(), c = (d) => d.reduce((u, p) => {
1185
1198
  if (!p.showInSidebar)
1186
1199
  return u;
1187
- const v = p.label.toLowerCase().includes(h), b = p.links ? c(p.links) : [];
1188
- return (v || b.length > 0) && u.push({
1200
+ const y = p.label.toLowerCase().includes(h), m = p.links ? c(p.links) : [];
1201
+ return (y || m.length > 0) && u.push({
1189
1202
  ...p,
1190
- links: b.length > 0 ? b : p.links,
1203
+ links: m.length > 0 ? m : p.links,
1191
1204
  // Expandir automaticamente grupos com match
1192
1205
  initiallyOpened: !0
1193
1206
  }), u;
1194
1207
  }, []);
1195
1208
  return c(A);
1196
- }, [A, o]), a = ce(() => o.trim() ? n(s) : n(A), [o, A, s, n]), l = C(
1209
+ }, [A, o]), a = ce(() => o.trim() ? n(s) : n(A), [o, A, s, n]), l = w(
1197
1210
  (h) => {
1198
1211
  if (e(h), t) {
1199
1212
  const c = h.toLowerCase().trim();
1200
1213
  if (!c)
1201
1214
  t(h, A);
1202
1215
  else {
1203
- const d = (u) => u.reduce((p, v) => {
1204
- if (!v.showInSidebar)
1216
+ const d = (u) => u.reduce((p, y) => {
1217
+ if (!y.showInSidebar)
1205
1218
  return p;
1206
- const b = v.label.toLowerCase().includes(c), m = v.links ? d(v.links) : [];
1207
- return (b || m.length > 0) && p.push({
1208
- ...v,
1209
- links: m.length > 0 ? m : v.links,
1219
+ const m = y.label.toLowerCase().includes(c), g = y.links ? d(y.links) : [];
1220
+ return (m || g.length > 0) && p.push({
1221
+ ...y,
1222
+ links: g.length > 0 ? g : y.links,
1210
1223
  initiallyOpened: !0
1211
1224
  }), p;
1212
1225
  }, []);
@@ -1215,7 +1228,7 @@ function ro({
1215
1228
  }
1216
1229
  },
1217
1230
  [A, t]
1218
- ), i = C(() => {
1231
+ ), i = w(() => {
1219
1232
  l("");
1220
1233
  }, [l]);
1221
1234
  return {
@@ -1245,10 +1258,10 @@ function SA({
1245
1258
  });
1246
1259
  };
1247
1260
  return h(A), i;
1248
- }, [A]), s = C(
1261
+ }, [A]), s = w(
1249
1262
  (i) => !!i.shortcut,
1250
1263
  []
1251
- ), a = C(
1264
+ ), a = w(
1252
1265
  (i) => i.shortcut,
1253
1266
  []
1254
1267
  ), l = ce(() => {
@@ -1265,7 +1278,7 @@ function SA({
1265
1278
  ]);
1266
1279
  }), i;
1267
1280
  }, [e, n, t, o]);
1268
- return Dr(l), {
1281
+ return Mr(l), {
1269
1282
  shortcuts: n,
1270
1283
  hasShortcut: s,
1271
1284
  getShortcut: a
@@ -1286,20 +1299,20 @@ function $e({
1286
1299
  activeBackground: d,
1287
1300
  isActive: u
1288
1301
  }) {
1289
- const p = me(), { colorScheme: v } = de(), b = A, [m, g] = ge(!1), f = s || "var(--mantine-color-text)", x = a || p.colors[p.primaryColor][6], I = l || p.colors[p.primaryColor][6], L = l ? `color-mix(in srgb, ${l} 80%, black)` : p.colors[p.primaryColor][8], J = m ? e ? L : I : e ? I : "transparent", V = m || e ? p.white : f, Y = m || e ? p.white : x, O = e && !m && !!d ? { background: d, backgroundColor: void 0 } : { background: void 0, backgroundColor: J }, D = typeof A.disabled == "function" ? A.disabled() : A.disabled;
1290
- if (D && A.hideDisabledItem || !A.showInSidebar)
1302
+ const p = me(), { colorScheme: y } = de(), m = A, [g, b] = ge(!1), f = s || "var(--mantine-color-text)", x = a || p.colors[p.primaryColor][6], E = l || p.colors[p.primaryColor][6], M = l ? `color-mix(in srgb, ${l} 80%, black)` : p.colors[p.primaryColor][8], V = g ? e ? M : E : e ? E : "transparent", U = g || e ? p.white : f, Y = g || e ? p.white : x, F = e && !g && !!d ? { background: d, backgroundColor: void 0 } : { background: void 0, backgroundColor: V }, z = typeof A.disabled == "function" ? A.disabled() : A.disabled;
1303
+ if (z && A.hideDisabledItem || !A.showInSidebar)
1291
1304
  return null;
1292
- const K = C(() => {
1293
- !D && n && n(A);
1294
- }, [D, n, A]), P = Re.t(A.label), y = () => b.badge ? /* @__PURE__ */ r(pA, { size: "xs", color: b.badgeColor || "blue", variant: "filled", children: b.badge }) : null, F = () => b.shortcut ? /* @__PURE__ */ r(jA, { size: "xs", style: { marginLeft: "auto" }, children: b.shortcut }) : null;
1305
+ const Q = w(() => {
1306
+ !z && n && n(A);
1307
+ }, [z, n, A]), O = Re.t(A.label), v = () => m.badge ? /* @__PURE__ */ r(fA, { size: "xs", color: m.badgeColor || "blue", variant: "filled", children: m.badge }) : null, L = () => m.shortcut ? /* @__PURE__ */ r(jA, { size: "xs", style: { marginLeft: "auto" }, children: m.shortcut }) : null;
1295
1308
  if (A.links && A.links.length > 0) {
1296
- const T = A.links.filter((k) => {
1297
- const G = typeof k.disabled == "function" ? k.disabled() : k.disabled;
1298
- return k.showInSidebar && (!G || !k.hideDisabledItem);
1309
+ const C = A.links.filter((I) => {
1310
+ const G = typeof I.disabled == "function" ? I.disabled() : I.disabled;
1311
+ return I.showInSidebar && (!G || !I.hideDisabledItem);
1299
1312
  });
1300
- if (T.length === 0 && D && A.hideDisabledItem)
1313
+ if (C.length === 0 && z && A.hideDisabledItem)
1301
1314
  return null;
1302
- const ee = (k) => u ? u(k) : e, U = (k) => k.some((G) => ee(G) || (G.links ? U(G.links) : !1));
1315
+ const _ = (I) => u ? u(I) : e, H = (I) => I.some((G) => _(G) || (G.links ? H(G.links) : !1));
1303
1316
  return o ? /* @__PURE__ */ R(
1304
1317
  ie,
1305
1318
  {
@@ -1310,8 +1323,8 @@ function $e({
1310
1323
  openDelay: 100,
1311
1324
  closeDelay: 200,
1312
1325
  children: [
1313
- /* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(Je, { style: { width: "100%", padding: "2px 0" }, children: /* @__PURE__ */ r(Me, { label: P, position: "right", withArrow: !0, children: /* @__PURE__ */ R(
1314
- _,
1326
+ /* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(Je, { style: { width: "100%", padding: "2px 0" }, children: /* @__PURE__ */ r(De, { label: O, position: "right", withArrow: !0, children: /* @__PURE__ */ R(
1327
+ W,
1315
1328
  {
1316
1329
  gap: 1,
1317
1330
  align: "center",
@@ -1320,7 +1333,7 @@ function $e({
1320
1333
  },
1321
1334
  children: [
1322
1335
  /* @__PURE__ */ r(
1323
- H,
1336
+ q,
1324
1337
  {
1325
1338
  style: {
1326
1339
  color: x,
@@ -1344,23 +1357,23 @@ function $e({
1344
1357
  textOverflow: "ellipsis",
1345
1358
  whiteSpace: "nowrap"
1346
1359
  },
1347
- children: P
1360
+ children: O
1348
1361
  }
1349
1362
  )
1350
1363
  ]
1351
1364
  }
1352
1365
  ) }) }) }),
1353
1366
  /* @__PURE__ */ R(ie.Dropdown, { children: [
1354
- /* @__PURE__ */ r(ie.Label, { children: P }),
1355
- T.map((k, G) => {
1356
- const Ae = typeof k.disabled == "function" ? k.disabled() : k.disabled;
1367
+ /* @__PURE__ */ r(ie.Label, { children: O }),
1368
+ C.map((I, G) => {
1369
+ const re = typeof I.disabled == "function" ? I.disabled() : I.disabled;
1357
1370
  return /* @__PURE__ */ r(
1358
1371
  ie.Item,
1359
1372
  {
1360
- leftSection: k.icon,
1361
- disabled: Ae,
1362
- onClick: () => n?.(k),
1363
- children: Re.t(k.label)
1373
+ leftSection: I.icon,
1374
+ disabled: re,
1375
+ onClick: () => n?.(I),
1376
+ children: Re.t(I.label)
1364
1377
  },
1365
1378
  G
1366
1379
  );
@@ -1371,10 +1384,10 @@ function $e({
1371
1384
  ) : /* @__PURE__ */ r(
1372
1385
  NA,
1373
1386
  {
1374
- label: P,
1375
- leftSection: /* @__PURE__ */ r(H, { style: { color: Y }, children: A.icon }),
1376
- rightSection: /* @__PURE__ */ R(H, { style: { display: "flex", alignItems: "center", gap: 4, color: V }, children: [
1377
- y(),
1387
+ label: O,
1388
+ leftSection: /* @__PURE__ */ r(q, { style: { color: Y }, children: A.icon }),
1389
+ rightSection: /* @__PURE__ */ R(q, { style: { display: "flex", alignItems: "center", gap: 4, color: U }, children: [
1390
+ v(),
1378
1391
  /* @__PURE__ */ r(
1379
1392
  gA,
1380
1393
  {
@@ -1386,15 +1399,15 @@ function $e({
1386
1399
  )
1387
1400
  ] }),
1388
1401
  childrenOffset: 28,
1389
- defaultOpened: A.initiallyOpened || e || U(T),
1390
- disabled: D,
1391
- onMouseEnter: () => g(!0),
1392
- onMouseLeave: () => g(!1),
1402
+ defaultOpened: A.initiallyOpened || e || H(C),
1403
+ disabled: z,
1404
+ onMouseEnter: () => b(!0),
1405
+ onMouseLeave: () => b(!1),
1393
1406
  style: {
1394
1407
  height: i,
1395
1408
  marginInline: c,
1396
1409
  width: c ? "auto" : void 0,
1397
- ...O,
1410
+ ...F,
1398
1411
  transition: "background 150ms ease, background-color 150ms ease"
1399
1412
  },
1400
1413
  styles: {
@@ -1402,19 +1415,19 @@ function $e({
1402
1415
  borderRadius: h
1403
1416
  },
1404
1417
  label: {
1405
- color: V
1418
+ color: U
1406
1419
  },
1407
1420
  children: {
1408
1421
  paddingLeft: 0
1409
1422
  }
1410
1423
  },
1411
- children: T.map((k, G) => /* @__PURE__ */ r(
1424
+ children: C.map((I, G) => /* @__PURE__ */ r(
1412
1425
  $e,
1413
1426
  {
1414
- item: k,
1427
+ item: I,
1415
1428
  depth: t + 1,
1416
1429
  collapsed: o,
1417
- active: ee(k),
1430
+ active: _(I),
1418
1431
  onClick: n,
1419
1432
  textColor: s,
1420
1433
  iconColor: a,
@@ -1431,9 +1444,9 @@ function $e({
1431
1444
  );
1432
1445
  }
1433
1446
  return o ? /* @__PURE__ */ r(
1434
- Me,
1447
+ De,
1435
1448
  {
1436
- label: b.tooltip || P,
1449
+ label: m.tooltip || O,
1437
1450
  position: "right",
1438
1451
  withArrow: !0,
1439
1452
  children: /* @__PURE__ */ r(
@@ -1443,26 +1456,26 @@ function $e({
1443
1456
  width: c ? "auto" : "100%",
1444
1457
  marginInline: c,
1445
1458
  borderRadius: h,
1446
- cursor: D ? "not-allowed" : "pointer",
1447
- opacity: D ? 0.5 : 1,
1459
+ cursor: z ? "not-allowed" : "pointer",
1460
+ opacity: z ? 0.5 : 1,
1448
1461
  // Gradiente (activeBackground) via shorthand; senão a cor sólida.
1449
- ...e && d ? { background: d } : { backgroundColor: e ? I : "transparent" },
1462
+ ...e && d ? { background: d } : { backgroundColor: e ? E : "transparent" },
1450
1463
  transition: "background 150ms ease, background-color 150ms ease",
1451
1464
  padding: "2px 0"
1452
1465
  },
1453
- onClick: K,
1454
- onMouseEnter: (T) => {
1455
- if (!D) {
1466
+ onClick: Q,
1467
+ onMouseEnter: (C) => {
1468
+ if (!z) {
1456
1469
  if (e && d)
1457
1470
  return;
1458
- T.currentTarget.style.backgroundColor = e ? L : I;
1471
+ C.currentTarget.style.backgroundColor = e ? M : E;
1459
1472
  }
1460
1473
  },
1461
- onMouseLeave: (T) => {
1462
- e && d || (T.currentTarget.style.backgroundColor = e ? I : "transparent");
1474
+ onMouseLeave: (C) => {
1475
+ e && d || (C.currentTarget.style.backgroundColor = e ? E : "transparent");
1463
1476
  },
1464
- children: /* @__PURE__ */ R(_, { gap: 1, align: "center", children: [
1465
- /* @__PURE__ */ r(H, { style: { color: e ? p.white : x }, children: A.icon }),
1477
+ children: /* @__PURE__ */ R(W, { gap: 1, align: "center", children: [
1478
+ /* @__PURE__ */ r(q, { style: { color: e ? p.white : x }, children: A.icon }),
1466
1479
  /* @__PURE__ */ r(
1467
1480
  Te,
1468
1481
  {
@@ -1476,7 +1489,7 @@ function $e({
1476
1489
  textOverflow: "ellipsis",
1477
1490
  whiteSpace: "nowrap"
1478
1491
  },
1479
- children: P
1492
+ children: O
1480
1493
  }
1481
1494
  )
1482
1495
  ] })
@@ -1486,23 +1499,23 @@ function $e({
1486
1499
  ) : /* @__PURE__ */ r(
1487
1500
  NA,
1488
1501
  {
1489
- label: P,
1490
- leftSection: /* @__PURE__ */ r(H, { style: { color: Y }, children: A.icon }),
1491
- rightSection: /* @__PURE__ */ R(H, { style: { display: "flex", alignItems: "center", gap: 4, color: V }, children: [
1492
- y(),
1493
- F()
1502
+ label: O,
1503
+ leftSection: /* @__PURE__ */ r(q, { style: { color: Y }, children: A.icon }),
1504
+ rightSection: /* @__PURE__ */ R(q, { style: { display: "flex", alignItems: "center", gap: 4, color: U }, children: [
1505
+ v(),
1506
+ L()
1494
1507
  ] }),
1495
1508
  active: e,
1496
- disabled: D,
1497
- onClick: K,
1498
- onMouseEnter: () => g(!0),
1499
- onMouseLeave: () => g(!1),
1509
+ disabled: z,
1510
+ onClick: Q,
1511
+ onMouseEnter: () => b(!0),
1512
+ onMouseLeave: () => b(!1),
1500
1513
  style: {
1501
1514
  height: i,
1502
1515
  paddingLeft: t > 0 ? t * 16 + 12 : void 0,
1503
1516
  marginInline: c,
1504
1517
  width: c ? "auto" : void 0,
1505
- ...O,
1518
+ ...F,
1506
1519
  transition: "background 150ms ease, background-color 150ms ease"
1507
1520
  },
1508
1521
  styles: {
@@ -1510,7 +1523,7 @@ function $e({
1510
1523
  borderRadius: h
1511
1524
  },
1512
1525
  label: {
1513
- color: V
1526
+ color: U
1514
1527
  }
1515
1528
  }
1516
1529
  }
@@ -1525,10 +1538,10 @@ function oo({
1525
1538
  onExpandedChange: s,
1526
1539
  groupId: a
1527
1540
  }) {
1528
- const l = me(), { colorScheme: i } = de(), [h, c] = ge(e), d = n !== void 0, u = d ? n : h, p = C(() => {
1541
+ const l = me(), { colorScheme: i } = de(), [h, c] = ge(e), d = n !== void 0, u = d ? n : h, p = w(() => {
1529
1542
  d ? s?.(!u) : c((f) => !f);
1530
- }, [d, u, s]), v = i === "dark" ? l.colors.dark[6] : l.colors.gray[1], b = i === "dark" ? l.colors.dark[5] : l.colors.gray[2], m = i === "dark" ? l.colors.gray[4] : l.colors.gray[7], g = i === "dark" ? l.colors[l.primaryColor][4] : l.colors[l.primaryColor][6];
1531
- return /* @__PURE__ */ R(H, { children: [
1543
+ }, [d, u, s]), y = i === "dark" ? l.colors.dark[6] : l.colors.gray[1], m = i === "dark" ? l.colors.dark[5] : l.colors.gray[2], g = i === "dark" ? l.colors.gray[4] : l.colors.gray[7], b = i === "dark" ? l.colors[l.primaryColor][4] : l.colors[l.primaryColor][6];
1544
+ return /* @__PURE__ */ R(q, { children: [
1532
1545
  /* @__PURE__ */ r(
1533
1546
  cA,
1534
1547
  {
@@ -1537,26 +1550,26 @@ function oo({
1537
1550
  p: "xs",
1538
1551
  style: {
1539
1552
  borderRadius: l.radius.sm,
1540
- backgroundColor: v,
1553
+ backgroundColor: y,
1541
1554
  transition: "background-color 150ms ease"
1542
1555
  },
1543
1556
  styles: {
1544
1557
  root: {
1545
1558
  "&:hover": {
1546
- backgroundColor: b
1559
+ backgroundColor: m
1547
1560
  }
1548
1561
  }
1549
1562
  },
1550
1563
  children: /* @__PURE__ */ R(Le, { justify: "space-between", wrap: "nowrap", children: [
1551
1564
  /* @__PURE__ */ R(Le, { gap: "xs", wrap: "nowrap", children: [
1552
- t && /* @__PURE__ */ r(H, { style: { color: g }, children: t }),
1553
- /* @__PURE__ */ r(Te, { size: "sm", fw: 600, c: m, children: Re.t(A) })
1565
+ t && /* @__PURE__ */ r(q, { style: { color: b }, children: t }),
1566
+ /* @__PURE__ */ r(Te, { size: "sm", fw: 600, c: g, children: Re.t(A) })
1554
1567
  ] }),
1555
1568
  /* @__PURE__ */ r(
1556
1569
  Yr,
1557
1570
  {
1558
1571
  size: 16,
1559
- color: m,
1572
+ color: g,
1560
1573
  style: {
1561
1574
  transform: u ? "rotate(180deg)" : "rotate(0deg)",
1562
1575
  transition: "transform 200ms ease"
@@ -1566,7 +1579,7 @@ function oo({
1566
1579
  ] })
1567
1580
  }
1568
1581
  ),
1569
- /* @__PURE__ */ r(Vr, { expanded: u, children: /* @__PURE__ */ r(H, { mt: 4, children: o }) })
1582
+ /* @__PURE__ */ r(Vr, { expanded: u, children: /* @__PURE__ */ r(q, { mt: 4, children: o }) })
1570
1583
  ] });
1571
1584
  }
1572
1585
  function On({
@@ -1574,7 +1587,7 @@ function On({
1574
1587
  children: t
1575
1588
  }) {
1576
1589
  const o = me(), { colorScheme: e } = de(), n = e === "dark" ? o.colors.gray[5] : o.colors.gray[6];
1577
- return /* @__PURE__ */ R(H, { children: [
1590
+ return /* @__PURE__ */ R(q, { children: [
1578
1591
  /* @__PURE__ */ r(
1579
1592
  Te,
1580
1593
  {
@@ -1600,7 +1613,7 @@ function no({
1600
1613
  inactiveColor: s
1601
1614
  }) {
1602
1615
  const a = me(), { colorScheme: l } = de(), i = l === "dark" ? a.colors[a.primaryColor][8] : a.colors[a.primaryColor][0], h = l === "dark" ? a.colors[a.primaryColor][6] : a.colors[a.primaryColor][7], c = a.colors[a.primaryColor][2], p = /* @__PURE__ */ R(
1603
- _,
1616
+ W,
1604
1617
  {
1605
1618
  gap: 2,
1606
1619
  align: "center",
@@ -1608,7 +1621,7 @@ function no({
1608
1621
  style: { textAlign: "center" },
1609
1622
  children: [
1610
1623
  /* @__PURE__ */ r(
1611
- De,
1624
+ Me,
1612
1625
  {
1613
1626
  size: 48,
1614
1627
  variant: t ? "filled" : "subtle",
@@ -1637,7 +1650,7 @@ function no({
1637
1650
  ]
1638
1651
  }
1639
1652
  );
1640
- return e ? p : /* @__PURE__ */ r(Me, { label: A.hint || A.label, position: "right", withArrow: !0, children: p });
1653
+ return e ? p : /* @__PURE__ */ r(De, { label: A.hint || A.label, position: "right", withArrow: !0, children: p });
1641
1654
  }
1642
1655
  function $n({
1643
1656
  placeholder: A = "Buscar...",
@@ -1646,16 +1659,16 @@ function $n({
1646
1659
  onClear: e,
1647
1660
  collapsed: n = !1
1648
1661
  }) {
1649
- const s = me(), { colorScheme: a } = de(), l = C(
1662
+ const s = me(), { colorScheme: a } = de(), l = w(
1650
1663
  (c) => {
1651
1664
  o?.(c.currentTarget.value);
1652
1665
  },
1653
1666
  [o]
1654
- ), i = C(() => {
1667
+ ), i = w(() => {
1655
1668
  o?.(""), e?.();
1656
1669
  }, [o, e]), h = t && t.length > 0;
1657
1670
  return n ? /* @__PURE__ */ r(
1658
- De,
1671
+ Me,
1659
1672
  {
1660
1673
  variant: "subtle",
1661
1674
  size: "lg",
@@ -1668,7 +1681,7 @@ function $n({
1668
1681
  placeholder: A,
1669
1682
  leftSection: /* @__PURE__ */ r(_e, { size: 16 }),
1670
1683
  rightSection: h ? /* @__PURE__ */ r(
1671
- De,
1684
+ Me,
1672
1685
  {
1673
1686
  variant: "subtle",
1674
1687
  size: "sm",
@@ -1703,7 +1716,7 @@ function Qn({
1703
1716
  const h = A ? A.split(" ").map((c) => c[0]).slice(0, 2).join("").toUpperCase() : "?";
1704
1717
  return /* @__PURE__ */ r(iA, { radius: "xl", size: n ? "sm" : "md", color: s.primaryColor, children: h });
1705
1718
  };
1706
- return n ? /* @__PURE__ */ r(Me, { label: A || "Perfil", position: "right", withArrow: !0, children: /* @__PURE__ */ r(
1719
+ return n ? /* @__PURE__ */ r(De, { label: A || "Perfil", position: "right", withArrow: !0, children: /* @__PURE__ */ r(
1707
1720
  cA,
1708
1721
  {
1709
1722
  onClick: e,
@@ -1743,7 +1756,7 @@ function Qn({
1743
1756
  },
1744
1757
  children: /* @__PURE__ */ R(Le, { wrap: "nowrap", children: [
1745
1758
  i(),
1746
- /* @__PURE__ */ R(H, { style: { flex: 1, overflow: "hidden" }, children: [
1759
+ /* @__PURE__ */ R(q, { style: { flex: 1, overflow: "hidden" }, children: [
1747
1760
  A && /* @__PURE__ */ r(
1748
1761
  Te,
1749
1762
  {
@@ -1788,7 +1801,7 @@ function Kn({
1788
1801
  size: o = "xs"
1789
1802
  }) {
1790
1803
  const e = typeof A == "number" && A > 99 ? "99+" : A;
1791
- return /* @__PURE__ */ r(pA, { size: o, color: t, variant: "filled", children: e });
1804
+ return /* @__PURE__ */ r(fA, { size: o, color: t, variant: "filled", children: e });
1792
1805
  }
1793
1806
  function Fn({
1794
1807
  children: A,
@@ -1818,9 +1831,9 @@ function kA({
1818
1831
  }) {
1819
1832
  const a = me(), { colorScheme: l } = de(), i = o || (l === "dark" ? a.colors.dark[7] : a.white);
1820
1833
  if (t)
1821
- return /* @__PURE__ */ r(_, { gap: "sm", p: "xs", style: { backgroundColor: i }, children: Array.from({ length: A }).map((d, u) => /* @__PURE__ */ r(pe, { circle: !0, height: 32, width: 32 }, u)) });
1822
- const h = (d, u = !1) => Array.from({ length: d }).map((p, v) => {
1823
- const b = 60 + Math.random() * 30;
1834
+ return /* @__PURE__ */ r(W, { gap: "sm", p: "xs", style: { backgroundColor: i }, children: Array.from({ length: A }).map((d, u) => /* @__PURE__ */ r(fe, { circle: !0, height: 32, width: 32 }, u)) });
1835
+ const h = (d, u = !1) => Array.from({ length: d }).map((p, y) => {
1836
+ const m = 60 + Math.random() * 30;
1824
1837
  return /* @__PURE__ */ R(
1825
1838
  Le,
1826
1839
  {
@@ -1831,22 +1844,22 @@ function kA({
1831
1844
  height: e
1832
1845
  },
1833
1846
  children: [
1834
- /* @__PURE__ */ r(pe, { circle: !0, height: 24, width: 24 }),
1835
- /* @__PURE__ */ r(pe, { height: 14, width: `${b}%`, radius: "sm" })
1847
+ /* @__PURE__ */ r(fe, { circle: !0, height: 24, width: 24 }),
1848
+ /* @__PURE__ */ r(fe, { height: 14, width: `${m}%`, radius: "sm" })
1836
1849
  ]
1837
1850
  },
1838
- v
1851
+ y
1839
1852
  );
1840
1853
  });
1841
1854
  if (!n)
1842
- return /* @__PURE__ */ r(_, { gap: 2, p: "xs", style: { backgroundColor: i }, children: h(A) });
1855
+ return /* @__PURE__ */ r(W, { gap: 2, p: "xs", style: { backgroundColor: i }, children: h(A) });
1843
1856
  const c = Math.ceil(A / s);
1844
- return /* @__PURE__ */ r(_, { gap: "md", p: "xs", style: { backgroundColor: i }, children: Array.from({ length: s }).map((d, u) => /* @__PURE__ */ R(H, { children: [
1857
+ return /* @__PURE__ */ r(W, { gap: "md", p: "xs", style: { backgroundColor: i }, children: Array.from({ length: s }).map((d, u) => /* @__PURE__ */ R(q, { children: [
1845
1858
  /* @__PURE__ */ R(Le, { gap: "sm", p: "xs", children: [
1846
- /* @__PURE__ */ r(pe, { circle: !0, height: 20, width: 20 }),
1847
- /* @__PURE__ */ r(pe, { height: 12, width: 80 + Math.random() * 40, radius: "sm" })
1859
+ /* @__PURE__ */ r(fe, { circle: !0, height: 20, width: 20 }),
1860
+ /* @__PURE__ */ r(fe, { height: 12, width: 80 + Math.random() * 40, radius: "sm" })
1848
1861
  ] }),
1849
- /* @__PURE__ */ r(_, { gap: 2, mt: 4, children: h(
1862
+ /* @__PURE__ */ r(W, { gap: 2, mt: 4, children: h(
1850
1863
  u === s - 1 ? A - u * c : c,
1851
1864
  !0
1852
1865
  ) })
@@ -1859,7 +1872,7 @@ function so({
1859
1872
  }) {
1860
1873
  const e = me(), { colorScheme: n } = de(), s = o || (n === "dark" ? e.colors[e.primaryColor][8] : e.colors[e.primaryColor][6]);
1861
1874
  return /* @__PURE__ */ r(
1862
- _,
1875
+ W,
1863
1876
  {
1864
1877
  gap: "sm",
1865
1878
  p: "xs",
@@ -1869,9 +1882,9 @@ function so({
1869
1882
  backgroundColor: s,
1870
1883
  height: "100%"
1871
1884
  },
1872
- children: Array.from({ length: A }).map((a, l) => /* @__PURE__ */ R(_, { gap: 4, align: "center", children: [
1873
- /* @__PURE__ */ r(pe, { circle: !0, height: 48, width: 48 }),
1874
- /* @__PURE__ */ r(pe, { height: 10, width: 40, radius: "sm" })
1885
+ children: Array.from({ length: A }).map((a, l) => /* @__PURE__ */ R(W, { gap: 4, align: "center", children: [
1886
+ /* @__PURE__ */ r(fe, { circle: !0, height: 48, width: 48 }),
1887
+ /* @__PURE__ */ r(fe, { height: 10, width: 40, radius: "sm" })
1875
1888
  ] }, l))
1876
1889
  }
1877
1890
  );
@@ -1879,22 +1892,22 @@ function so({
1879
1892
  function Vn({
1880
1893
  collapsed: A = !1
1881
1894
  }) {
1882
- return A ? /* @__PURE__ */ r(H, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(pe, { circle: !0, height: 32, width: 32 }) }) : /* @__PURE__ */ R(Le, { gap: "sm", p: "md", children: [
1883
- /* @__PURE__ */ r(pe, { circle: !0, height: 40, width: 40 }),
1884
- /* @__PURE__ */ R(_, { gap: 4, style: { flex: 1 }, children: [
1885
- /* @__PURE__ */ r(pe, { height: 14, width: "70%", radius: "sm" }),
1886
- /* @__PURE__ */ r(pe, { height: 10, width: "50%", radius: "sm" })
1895
+ return A ? /* @__PURE__ */ r(q, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(fe, { circle: !0, height: 32, width: 32 }) }) : /* @__PURE__ */ R(Le, { gap: "sm", p: "md", children: [
1896
+ /* @__PURE__ */ r(fe, { circle: !0, height: 40, width: 40 }),
1897
+ /* @__PURE__ */ R(W, { gap: 4, style: { flex: 1 }, children: [
1898
+ /* @__PURE__ */ r(fe, { height: 14, width: "70%", radius: "sm" }),
1899
+ /* @__PURE__ */ r(fe, { height: 10, width: "50%", radius: "sm" })
1887
1900
  ] })
1888
1901
  ] });
1889
1902
  }
1890
1903
  function Gn({
1891
1904
  collapsed: A = !1
1892
1905
  }) {
1893
- return A ? /* @__PURE__ */ r(H, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(pe, { circle: !0, height: 36, width: 36 }) }) : /* @__PURE__ */ R(Le, { gap: "sm", p: "sm", children: [
1894
- /* @__PURE__ */ r(pe, { circle: !0, height: 36, width: 36 }),
1895
- /* @__PURE__ */ R(_, { gap: 4, style: { flex: 1 }, children: [
1896
- /* @__PURE__ */ r(pe, { height: 12, width: "60%", radius: "sm" }),
1897
- /* @__PURE__ */ r(pe, { height: 10, width: "80%", radius: "sm" })
1906
+ return A ? /* @__PURE__ */ r(q, { p: "xs", style: { display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ r(fe, { circle: !0, height: 36, width: 36 }) }) : /* @__PURE__ */ R(Le, { gap: "sm", p: "sm", children: [
1907
+ /* @__PURE__ */ r(fe, { circle: !0, height: 36, width: 36 }),
1908
+ /* @__PURE__ */ R(W, { gap: 4, style: { flex: 1 }, children: [
1909
+ /* @__PURE__ */ r(fe, { height: 12, width: "60%", radius: "sm" }),
1910
+ /* @__PURE__ */ r(fe, { height: 10, width: "80%", radius: "sm" })
1898
1911
  ] })
1899
1912
  ] });
1900
1913
  }
@@ -1904,7 +1917,7 @@ function xA({
1904
1917
  }) {
1905
1918
  const o = me(), { colorScheme: e } = de(), n = t || (e === "dark" ? o.colors.dark[7] : o.white), s = e === "dark" ? o.colors.red[4] : o.colors.red[6];
1906
1919
  return /* @__PURE__ */ r(
1907
- H,
1920
+ q,
1908
1921
  {
1909
1922
  p: "md",
1910
1923
  style: {
@@ -1915,7 +1928,7 @@ function xA({
1915
1928
  height: "100%"
1916
1929
  },
1917
1930
  children: /* @__PURE__ */ r(
1918
- H,
1931
+ q,
1919
1932
  {
1920
1933
  p: "md",
1921
1934
  style: {
@@ -1946,140 +1959,140 @@ function lo({
1946
1959
  loadingError: d,
1947
1960
  loadingComponent: u,
1948
1961
  errorComponent: p,
1949
- skeletonItemCount: v = 8,
1950
- backgroundDarkColor: b,
1951
- backgroundLightColor: m,
1952
- backgroundImage: g,
1962
+ skeletonItemCount: y = 8,
1963
+ backgroundDarkColor: m,
1964
+ backgroundLightColor: g,
1965
+ backgroundImage: b,
1953
1966
  textDarkColor: f,
1954
1967
  textLightColor: x,
1955
- iconDarkColor: I,
1956
- iconLightColor: L,
1957
- activeColor: J,
1958
- withBorder: V = !0,
1968
+ iconDarkColor: E,
1969
+ iconLightColor: M,
1970
+ activeColor: V,
1971
+ withBorder: U = !0,
1959
1972
  withShadow: Y = !1,
1960
- highlightActiveItem: M = !0,
1961
- onMenuItemClick: O,
1962
- itemBorderRadius: D,
1963
- itemHorizontalGap: K,
1964
- itemActiveBackground: P
1973
+ highlightActiveItem: P = !0,
1974
+ onMenuItemClick: F,
1975
+ itemBorderRadius: z,
1976
+ itemHorizontalGap: Q,
1977
+ itemActiveBackground: O
1965
1978
  }) {
1966
- const y = me(), { colorScheme: F } = de(), { collapsed: T, toggleCollapsed: ee } = vA(), U = F === "dark" ? b ?? y.colors.dark[7] : m ?? y.white, k = F === "dark" ? f ?? y.colors.gray[3] : x ?? y.colors.gray[7], G = F === "dark" ? I ?? y.colors[y.primaryColor][4] : L ?? y.colors[y.primaryColor][6], Ae = J ? y.colors[J]?.[6] ?? y.colors[y.primaryColor][6] : y.colors[y.primaryColor][6], Ce = g ? { background: g } : { backgroundColor: U }, se = g ? "transparent" : U, {
1979
+ const v = me(), { colorScheme: L } = de(), { collapsed: C, toggleCollapsed: _ } = vA(), H = L === "dark" ? m ?? v.colors.dark[7] : g ?? v.white, I = L === "dark" ? f ?? v.colors.gray[3] : x ?? v.colors.gray[7], G = L === "dark" ? E ?? v.colors[v.primaryColor][4] : M ?? v.colors[v.primaryColor][6], re = V ? v.colors[V]?.[6] ?? v.colors[v.primaryColor][6] : v.colors[v.primaryColor][6], Ce = b ? { background: b } : { backgroundColor: H }, se = b ? "transparent" : H, {
1967
1980
  query: be,
1968
1981
  setQuery: we,
1969
1982
  filteredItems: Se,
1970
- isSearching: w,
1971
- clearSearch: S
1983
+ isSearching: S,
1984
+ clearSearch: k
1972
1985
  } = ro({
1973
1986
  navigationData: A,
1974
1987
  onSearch: a
1975
- }), { navigateToItem: $, isItemActive: N, isItemOrChildActive: B } = wA({
1988
+ }), { navigateToItem: $, isItemActive: D, isItemOrChildActive: B } = wA({
1976
1989
  navigationData: A,
1977
- onMenuItemClick: O
1978
- }), E = C(
1979
- (q) => !!M && N(q),
1980
- [M, N]
1981
- ), z = {
1982
- itemBorderRadius: D,
1983
- itemHorizontalGap: K,
1984
- activeBackground: P,
1985
- isActive: E
1990
+ onMenuItemClick: F
1991
+ }), T = w(
1992
+ (j) => !!P && D(j),
1993
+ [P, D]
1994
+ ), N = {
1995
+ itemBorderRadius: z,
1996
+ itemHorizontalGap: Q,
1997
+ activeBackground: O,
1998
+ isActive: T
1986
1999
  };
1987
2000
  SA({
1988
2001
  navigationData: A,
1989
2002
  navigateToItem: $,
1990
- onToggleSidebar: ee,
2003
+ onToggleSidebar: _,
1991
2004
  enabled: !0
1992
2005
  });
1993
- const j = T ? o : t, he = ce(() => {
1994
- const q = /* @__PURE__ */ new Map(), ve = [];
1995
- return Se.forEach((W) => {
1996
- if (!(!W.showInSidebar || (typeof W.disabled == "function" ? W.disabled() : W.disabled) && W.hideDisabledItem))
1997
- if (W.category) {
1998
- const Ee = q.get(W.category) || [];
1999
- Ee.push(W), q.set(W.category, Ee);
2006
+ const X = C ? o : t, he = ce(() => {
2007
+ const j = /* @__PURE__ */ new Map(), ve = [];
2008
+ return Se.forEach((Z) => {
2009
+ if (!(!Z.showInSidebar || (typeof Z.disabled == "function" ? Z.disabled() : Z.disabled) && Z.hideDisabledItem))
2010
+ if (Z.category) {
2011
+ const Ee = j.get(Z.category) || [];
2012
+ Ee.push(Z), j.set(Z.category, Ee);
2000
2013
  } else
2001
- ve.push(W);
2002
- }), { groups: q, ungrouped: ve };
2014
+ ve.push(Z);
2015
+ }), { groups: j, ungrouped: ve };
2003
2016
  }, [Se]), Ie = () => {
2004
2017
  if (d)
2005
- return p || /* @__PURE__ */ r(xA, { message: d, backgroundColor: U });
2018
+ return p || /* @__PURE__ */ r(xA, { message: d, backgroundColor: H });
2006
2019
  if (c)
2007
2020
  return u || /* @__PURE__ */ r(
2008
2021
  kA,
2009
2022
  {
2010
- itemCount: v,
2011
- collapsed: T,
2012
- backgroundColor: U,
2013
- showGroups: !T
2023
+ itemCount: y,
2024
+ collapsed: C,
2025
+ backgroundColor: H,
2026
+ showGroups: !C
2014
2027
  }
2015
2028
  );
2016
- const q = () => he.ungrouped.map((W, re) => /* @__PURE__ */ r(
2029
+ const j = () => he.ungrouped.map((Z, ee) => /* @__PURE__ */ r(
2017
2030
  $e,
2018
2031
  {
2019
- item: W,
2020
- collapsed: T,
2021
- active: M && N(W),
2032
+ item: Z,
2033
+ collapsed: C,
2034
+ active: P && D(Z),
2022
2035
  onClick: $,
2023
- textColor: k,
2036
+ textColor: I,
2024
2037
  iconColor: G,
2025
- hoverColor: Ae,
2026
- ...z
2038
+ hoverColor: re,
2039
+ ...N
2027
2040
  },
2028
- `item-${re}`
2029
- )), ve = () => Array.from(he.groups.entries()).map(([re, Ee], X) => /* @__PURE__ */ r(
2041
+ `item-${ee}`
2042
+ )), ve = () => Array.from(he.groups.entries()).map(([ee, Ee], J) => /* @__PURE__ */ r(
2030
2043
  oo,
2031
2044
  {
2032
- label: re,
2033
- groupId: `group-${X}`,
2045
+ label: ee,
2046
+ groupId: `group-${J}`,
2034
2047
  defaultExpanded: !0,
2035
- children: Ee.map((ke, Q) => /* @__PURE__ */ r(
2048
+ children: Ee.map((ke, K) => /* @__PURE__ */ r(
2036
2049
  $e,
2037
2050
  {
2038
2051
  item: ke,
2039
- collapsed: T,
2040
- active: M && N(ke),
2052
+ collapsed: C,
2053
+ active: P && D(ke),
2041
2054
  onClick: $,
2042
- textColor: k,
2055
+ textColor: I,
2043
2056
  iconColor: G,
2044
- hoverColor: Ae,
2045
- ...z
2057
+ hoverColor: re,
2058
+ ...N
2046
2059
  },
2047
- `group-${X}-item-${Q}`
2060
+ `group-${J}-item-${K}`
2048
2061
  ))
2049
2062
  },
2050
- `group-${X}`
2063
+ `group-${J}`
2051
2064
  ));
2052
- return T ? /* @__PURE__ */ R(_, { gap: 4, children: [
2053
- he.ungrouped.map((W, re) => /* @__PURE__ */ r(
2065
+ return C ? /* @__PURE__ */ R(W, { gap: 4, children: [
2066
+ he.ungrouped.map((Z, ee) => /* @__PURE__ */ r(
2054
2067
  $e,
2055
2068
  {
2056
- item: W,
2069
+ item: Z,
2057
2070
  collapsed: !0,
2058
- active: M && N(W),
2071
+ active: P && D(Z),
2059
2072
  onClick: $,
2060
- textColor: k,
2073
+ textColor: I,
2061
2074
  iconColor: G,
2062
- hoverColor: Ae,
2063
- ...z
2075
+ hoverColor: re,
2076
+ ...N
2064
2077
  },
2065
- `item-${re}`
2078
+ `item-${ee}`
2066
2079
  )),
2067
- Array.from(he.groups.values()).flat().map((W, re) => /* @__PURE__ */ r(
2080
+ Array.from(he.groups.values()).flat().map((Z, ee) => /* @__PURE__ */ r(
2068
2081
  $e,
2069
2082
  {
2070
- item: W,
2083
+ item: Z,
2071
2084
  collapsed: !0,
2072
- active: M && N(W),
2085
+ active: P && D(Z),
2073
2086
  onClick: $,
2074
- textColor: k,
2087
+ textColor: I,
2075
2088
  iconColor: G,
2076
- hoverColor: Ae,
2077
- ...z
2089
+ hoverColor: re,
2090
+ ...N
2078
2091
  },
2079
- `grouped-item-${re}`
2092
+ `grouped-item-${ee}`
2080
2093
  ))
2081
- ] }) : /* @__PURE__ */ R(_, { gap: "xs", children: [
2082
- he.ungrouped.length > 0 && /* @__PURE__ */ r(_, { gap: 2, children: q() }),
2094
+ ] }) : /* @__PURE__ */ R(W, { gap: "xs", children: [
2095
+ he.ungrouped.length > 0 && /* @__PURE__ */ r(W, { gap: 2, children: j() }),
2083
2096
  he.groups.size > 0 && he.ungrouped.length > 0 && /* @__PURE__ */ r(dA, { my: "xs" }),
2084
2097
  ve()
2085
2098
  ] });
@@ -2091,35 +2104,35 @@ function lo({
2091
2104
  transition: "slide-right",
2092
2105
  duration: 200,
2093
2106
  timingFunction: "ease",
2094
- children: (q) => /* @__PURE__ */ R(
2095
- H,
2107
+ children: (j) => /* @__PURE__ */ R(
2108
+ q,
2096
2109
  {
2097
2110
  style: {
2098
- ...q,
2099
- width: fe(j),
2100
- height: typeof e == "number" ? fe(e) : e,
2101
- minHeight: typeof e == "number" ? fe(e) : e,
2111
+ ...j,
2112
+ width: pe(X),
2113
+ height: typeof e == "number" ? pe(e) : e,
2114
+ minHeight: typeof e == "number" ? pe(e) : e,
2102
2115
  ...Ce,
2103
2116
  display: "flex",
2104
2117
  flexDirection: "column",
2105
2118
  overflow: "hidden",
2106
2119
  transition: "width 200ms ease",
2107
- borderRight: V ? `1px solid ${F === "dark" ? y.colors.dark[5] : y.colors.gray[2]}` : void 0,
2108
- boxShadow: Y ? y.shadows.sm : void 0
2120
+ borderRight: U ? `1px solid ${L === "dark" ? v.colors.dark[5] : v.colors.gray[2]}` : void 0,
2121
+ boxShadow: Y ? v.shadows.sm : void 0
2109
2122
  },
2110
2123
  children: [
2111
- l && /* @__PURE__ */ r(H, { style: { flexShrink: 0 }, children: l }),
2112
- n && !T && /* @__PURE__ */ r(H, { p: "sm", style: { flexShrink: 0 }, children: /* @__PURE__ */ r(
2124
+ l && /* @__PURE__ */ r(q, { style: { flexShrink: 0 }, children: l }),
2125
+ n && !C && /* @__PURE__ */ r(q, { p: "sm", style: { flexShrink: 0 }, children: /* @__PURE__ */ r(
2113
2126
  XA,
2114
2127
  {
2115
2128
  placeholder: s,
2116
2129
  leftSection: /* @__PURE__ */ r(_e, { size: 16 }),
2117
- rightSection: w ? /* @__PURE__ */ r(
2130
+ rightSection: S ? /* @__PURE__ */ r(
2118
2131
  er,
2119
2132
  {
2120
2133
  size: 16,
2121
2134
  style: { cursor: "pointer" },
2122
- onClick: S
2135
+ onClick: k
2123
2136
  }
2124
2137
  ) : null,
2125
2138
  value: be,
@@ -2134,17 +2147,17 @@ function lo({
2134
2147
  scrollbarSize: 6,
2135
2148
  type: "hover",
2136
2149
  offsetScrollbars: !0,
2137
- children: /* @__PURE__ */ r(H, { p: "xs", children: Ie() })
2150
+ children: /* @__PURE__ */ r(q, { p: "xs", children: Ie() })
2138
2151
  }
2139
2152
  ),
2140
2153
  i && /* @__PURE__ */ r(
2141
- H,
2154
+ q,
2142
2155
  {
2143
2156
  style: {
2144
2157
  flexShrink: 0,
2145
2158
  height: h,
2146
2159
  backgroundColor: se,
2147
- borderTop: V ? `1px solid ${F === "dark" ? y.colors.dark[5] : y.colors.gray[2]}` : void 0
2160
+ borderTop: U ? `1px solid ${L === "dark" ? v.colors.dark[5] : v.colors.gray[2]}` : void 0
2148
2161
  },
2149
2162
  children: i
2150
2163
  }
@@ -2207,9 +2220,9 @@ function io({
2207
2220
  openDelay: 100,
2208
2221
  closeDelay: 200,
2209
2222
  children: [
2210
- /* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(Me, { label: l, position: "right", withArrow: !0, children: /* @__PURE__ */ R(_, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
2223
+ /* @__PURE__ */ r(ie.Target, { children: /* @__PURE__ */ r(De, { label: l, position: "right", withArrow: !0, children: /* @__PURE__ */ R(W, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
2211
2224
  /* @__PURE__ */ r(
2212
- De,
2225
+ Me,
2213
2226
  {
2214
2227
  size: "xl",
2215
2228
  variant: t ? "filled" : "subtle",
@@ -2218,7 +2231,7 @@ function io({
2218
2231
  style: {
2219
2232
  opacity: a ? 0.5 : 1
2220
2233
  },
2221
- children: /* @__PURE__ */ r(H, { style: { color: t ? "white" : e }, children: A.icon })
2234
+ children: /* @__PURE__ */ r(q, { style: { color: t ? "white" : e }, children: A.icon })
2222
2235
  }
2223
2236
  ),
2224
2237
  /* @__PURE__ */ r(
@@ -2258,9 +2271,9 @@ function io({
2258
2271
  }
2259
2272
  );
2260
2273
  }
2261
- return /* @__PURE__ */ r(Me, { label: l, position: "right", withArrow: !0, children: /* @__PURE__ */ R(_, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
2274
+ return /* @__PURE__ */ r(De, { label: l, position: "right", withArrow: !0, children: /* @__PURE__ */ R(W, { gap: 1, align: "center", style: { cursor: "pointer" }, children: [
2262
2275
  /* @__PURE__ */ r(
2263
- De,
2276
+ Me,
2264
2277
  {
2265
2278
  size: "xl",
2266
2279
  variant: t ? "filled" : "subtle",
@@ -2270,7 +2283,7 @@ function io({
2270
2283
  style: {
2271
2284
  opacity: a ? 0.5 : 1
2272
2285
  },
2273
- children: /* @__PURE__ */ r(H, { style: { color: t ? "white" : e }, children: A.icon })
2286
+ children: /* @__PURE__ */ r(q, { style: { color: t ? "white" : e }, children: A.icon })
2274
2287
  }
2275
2288
  ),
2276
2289
  /* @__PURE__ */ r(
@@ -2306,63 +2319,63 @@ function co({
2306
2319
  backgroundDarkColor: d,
2307
2320
  backgroundLightColor: u,
2308
2321
  iconDarkColor: p,
2309
- iconLightColor: v,
2310
- activeColor: b,
2311
- withBorder: m = !0,
2312
- withShadow: g = !1,
2322
+ iconLightColor: y,
2323
+ activeColor: m,
2324
+ withBorder: g = !0,
2325
+ withShadow: b = !1,
2313
2326
  highlightActiveItem: f = !0,
2314
2327
  onMenuItemClick: x
2315
2328
  }) {
2316
- const I = me(), { colorScheme: L } = de(), { toggleCollapsed: J } = vA(), V = L === "dark" ? d ?? I.colors.dark[7] : u ?? I.white, Y = L === "dark" ? p ?? I.colors[I.primaryColor][4] : v ?? I.colors[I.primaryColor][6], M = b ?? I.primaryColor, { navigateToItem: O, isItemActive: D, isItemOrChildActive: K } = wA({
2329
+ const E = me(), { colorScheme: M } = de(), { toggleCollapsed: V } = vA(), U = M === "dark" ? d ?? E.colors.dark[7] : u ?? E.white, Y = M === "dark" ? p ?? E.colors[E.primaryColor][4] : y ?? E.colors[E.primaryColor][6], P = m ?? E.primaryColor, { navigateToItem: F, isItemActive: z, isItemOrChildActive: Q } = wA({
2317
2330
  navigationData: A,
2318
2331
  onMenuItemClick: x
2319
2332
  });
2320
2333
  SA({
2321
2334
  navigationData: A,
2322
- navigateToItem: O,
2323
- onToggleSidebar: J,
2335
+ navigateToItem: F,
2336
+ onToggleSidebar: V,
2324
2337
  enabled: !0
2325
2338
  });
2326
- const P = A.filter((T) => !(!T.showInSidebar || (typeof T.disabled == "function" ? T.disabled() : T.disabled) && T.hideDisabledItem)), y = () => l ? h || /* @__PURE__ */ r(xA, { message: l, backgroundColor: V }) : a ? i || /* @__PURE__ */ r(
2339
+ const O = A.filter((C) => !(!C.showInSidebar || (typeof C.disabled == "function" ? C.disabled() : C.disabled) && C.hideDisabledItem)), v = () => l ? h || /* @__PURE__ */ r(xA, { message: l, backgroundColor: U }) : a ? i || /* @__PURE__ */ r(
2327
2340
  kA,
2328
2341
  {
2329
2342
  itemCount: c,
2330
2343
  collapsed: !0,
2331
- backgroundColor: V
2344
+ backgroundColor: U
2332
2345
  }
2333
- ) : /* @__PURE__ */ r(_, { gap: 8, align: "center", children: P.map((T, ee) => /* @__PURE__ */ r(
2346
+ ) : /* @__PURE__ */ r(W, { gap: 8, align: "center", children: O.map((C, _) => /* @__PURE__ */ r(
2334
2347
  io,
2335
2348
  {
2336
- item: T,
2337
- active: f && (D(T) || K(T)),
2338
- onClick: O,
2349
+ item: C,
2350
+ active: f && (z(C) || Q(C)),
2351
+ onClick: F,
2339
2352
  iconColor: Y,
2340
- activeColor: M
2353
+ activeColor: P
2341
2354
  },
2342
- ee
2343
- )) }), F = L === "dark" ? I.colors.dark[5] : I.colors.gray[2];
2355
+ _
2356
+ )) }), L = M === "dark" ? E.colors.dark[5] : E.colors.gray[2];
2344
2357
  return /* @__PURE__ */ R(
2345
- H,
2358
+ q,
2346
2359
  {
2347
2360
  style: {
2348
- width: fe(t),
2349
- height: fe(o),
2350
- backgroundColor: V,
2361
+ width: pe(t),
2362
+ height: pe(o),
2363
+ backgroundColor: U,
2351
2364
  display: "flex",
2352
2365
  flexDirection: "column",
2353
2366
  overflow: "hidden",
2354
- boxShadow: g ? I.shadows.sm : void 0,
2355
- borderRight: m ? `1px solid ${F}` : void 0
2367
+ boxShadow: b ? E.shadows.sm : void 0,
2368
+ borderRight: g ? `1px solid ${L}` : void 0
2356
2369
  },
2357
2370
  children: [
2358
2371
  e && /* @__PURE__ */ r(
2359
- H,
2372
+ q,
2360
2373
  {
2361
2374
  style: {
2362
2375
  flexShrink: 0,
2363
2376
  display: "flex",
2364
2377
  justifyContent: "center",
2365
- padding: I.spacing.xs
2378
+ padding: E.spacing.xs
2366
2379
  },
2367
2380
  children: e
2368
2381
  }
@@ -2374,20 +2387,20 @@ function co({
2374
2387
  style: { flex: 1 },
2375
2388
  scrollbarSize: 4,
2376
2389
  type: "hover",
2377
- children: /* @__PURE__ */ r(H, { p: "xs", children: y() })
2390
+ children: /* @__PURE__ */ r(q, { p: "xs", children: v() })
2378
2391
  }
2379
2392
  ),
2380
2393
  n && /* @__PURE__ */ R(Pe, { children: [
2381
2394
  /* @__PURE__ */ r(dA, {}),
2382
2395
  /* @__PURE__ */ r(
2383
- H,
2396
+ q,
2384
2397
  {
2385
2398
  style: {
2386
2399
  flexShrink: 0,
2387
2400
  height: s,
2388
2401
  display: "flex",
2389
2402
  justifyContent: "center",
2390
- padding: I.spacing.xs
2403
+ padding: E.spacing.xs
2391
2404
  },
2392
2405
  children: n
2393
2406
  }
@@ -2437,53 +2450,53 @@ function ho({
2437
2450
  loadingError: d,
2438
2451
  loadingComponent: u,
2439
2452
  errorComponent: p,
2440
- skeletonItemCount: v = 8,
2441
- skeletonGroupCount: b = 3,
2442
- backgroundDarkColor: m,
2443
- backgroundLightColor: g,
2453
+ skeletonItemCount: y = 8,
2454
+ skeletonGroupCount: m = 3,
2455
+ backgroundDarkColor: g,
2456
+ backgroundLightColor: b,
2444
2457
  backgroundImage: f,
2445
2458
  textDarkColor: x,
2446
- textLightColor: I,
2447
- iconDarkColor: L,
2448
- iconLightColor: J,
2449
- activeColor: V,
2459
+ textLightColor: E,
2460
+ iconDarkColor: M,
2461
+ iconLightColor: V,
2462
+ activeColor: U,
2450
2463
  groupBackgroundColor: Y,
2451
- selectedGroupColor: M,
2452
- groupColor: O,
2453
- groupLabelDarkColor: D,
2454
- groupLabelLightColor: K,
2455
- withBorder: P = !1,
2456
- highlightActiveItem: y = !0,
2457
- onMenuItemClick: F,
2458
- itemBorderRadius: T,
2459
- itemHorizontalGap: ee,
2460
- itemActiveBackground: U
2464
+ selectedGroupColor: P,
2465
+ groupColor: F,
2466
+ groupLabelDarkColor: z,
2467
+ groupLabelLightColor: Q,
2468
+ withBorder: O = !1,
2469
+ highlightActiveItem: v = !0,
2470
+ onMenuItemClick: L,
2471
+ itemBorderRadius: C,
2472
+ itemHorizontalGap: _,
2473
+ itemActiveBackground: H
2461
2474
  }) {
2462
- const k = me(), { colorScheme: G } = de(), {
2463
- collapsed: Ae,
2475
+ const I = me(), { colorScheme: G } = de(), {
2476
+ collapsed: re,
2464
2477
  toggleCollapsed: Ce,
2465
2478
  activeGroup: se,
2466
2479
  setActiveGroup: be
2467
- } = vA(), we = G === "dark" ? m ?? k.colors.dark[7] : g ?? k.white, Se = f ? { background: f } : { backgroundColor: we }, w = f ? "transparent" : we, S = G === "dark" ? x ?? k.colors.gray[3] : I ?? k.colors.gray[7], $ = G === "dark" ? L ?? k.colors[k.primaryColor][4] : J ?? k.colors[k.primaryColor][6], N = V ? k.colors[V]?.[6] ?? k.colors[k.primaryColor][6] : k.colors[k.primaryColor][6], B = Y || (G === "dark" ? k.colors[k.primaryColor][6] : k.colors[k.primaryColor][7]), E = M || (G === "dark" ? k.colors[k.primaryColor][8] : k.colors[k.primaryColor][0]), { navigateToItem: z, isItemActive: j } = wA({
2480
+ } = vA(), we = G === "dark" ? g ?? I.colors.dark[7] : b ?? I.white, Se = f ? { background: f } : { backgroundColor: we }, S = f ? "transparent" : we, k = G === "dark" ? x ?? I.colors.gray[3] : E ?? I.colors.gray[7], $ = G === "dark" ? M ?? I.colors[I.primaryColor][4] : V ?? I.colors[I.primaryColor][6], D = U ? I.colors[U]?.[6] ?? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][6], B = Y || (G === "dark" ? I.colors[I.primaryColor][6] : I.colors[I.primaryColor][7]), T = P || (G === "dark" ? I.colors[I.primaryColor][8] : I.colors[I.primaryColor][0]), { navigateToItem: N, isItemActive: X } = wA({
2468
2481
  navigationData: A,
2469
- onMenuItemClick: F
2470
- }), he = C(
2471
- (Q) => !!y && j(Q),
2472
- [y, j]
2482
+ onMenuItemClick: L
2483
+ }), he = w(
2484
+ (K) => !!v && X(K),
2485
+ [v, X]
2473
2486
  ), Ie = {
2474
- itemBorderRadius: T,
2475
- itemHorizontalGap: ee,
2476
- activeBackground: U,
2487
+ itemBorderRadius: C,
2488
+ itemHorizontalGap: _,
2489
+ activeBackground: H,
2477
2490
  isActive: he
2478
2491
  };
2479
2492
  SA({
2480
2493
  navigationData: A,
2481
- navigateToItem: z,
2494
+ navigateToItem: N,
2482
2495
  onToggleSidebar: Ce,
2483
2496
  enabled: !0
2484
2497
  });
2485
- const q = ce(() => {
2486
- const Q = /* @__PURE__ */ new Map();
2498
+ const j = ce(() => {
2499
+ const K = /* @__PURE__ */ new Map();
2487
2500
  return A.forEach((le) => {
2488
2501
  if (!le.showInSidebar || (typeof le.disabled == "function" ? le.disabled() : le.disabled) && le.hideDisabledItem)
2489
2502
  return;
@@ -2493,27 +2506,27 @@ function ho({
2493
2506
  name: "Default",
2494
2507
  hint: "Default",
2495
2508
  indexOrder: 0
2496
- }, Qe = Q.get(Ve.name);
2497
- Qe ? Qe.items.push(le) : Q.set(Ve.name, {
2509
+ }, Qe = K.get(Ve.name);
2510
+ Qe ? Qe.items.push(le) : K.set(Ve.name, {
2498
2511
  group: Ve,
2499
2512
  items: [le]
2500
2513
  });
2501
- }), Array.from(Q.values()).sort((le, Fe) => le.group.indexOrder - Fe.group.indexOrder);
2514
+ }), Array.from(K.values()).sort((le, Fe) => le.group.indexOrder - Fe.group.indexOrder);
2502
2515
  }, [A, s]);
2503
2516
  oe(() => {
2504
- !se && q.length > 0 && be(q[0].group.name);
2505
- }, [se, q, be]);
2506
- const ve = ce(() => q.find((le) => le.group.name === se)?.items ?? [], [q, se]), W = C((Q) => {
2507
- Ae ? (Ce(), be(Q)) : se === Q ? Ce() : be(Q);
2508
- }, [Ae, se, Ce, be]), re = Ae ? 0 : Number(fe(t)) - Number(fe(n)), Ee = () => c && q.length === 0 ? /* @__PURE__ */ r(
2517
+ !se && j.length > 0 && be(j[0].group.name);
2518
+ }, [se, j, be]);
2519
+ const ve = ce(() => j.find((le) => le.group.name === se)?.items ?? [], [j, se]), Z = w((K) => {
2520
+ re ? (Ce(), be(K)) : se === K ? Ce() : be(K);
2521
+ }, [re, se, Ce, be]), ee = re ? 0 : Number(pe(t)) - Number(pe(n)), Ee = () => c && j.length === 0 ? /* @__PURE__ */ r(
2509
2522
  so,
2510
2523
  {
2511
- groupCount: b,
2524
+ groupCount: m,
2512
2525
  width: n,
2513
2526
  backgroundColor: B
2514
2527
  }
2515
- ) : q.length <= 1 ? null : /* @__PURE__ */ r(
2516
- _,
2528
+ ) : j.length <= 1 ? null : /* @__PURE__ */ r(
2529
+ W,
2517
2530
  {
2518
2531
  gap: 4,
2519
2532
  p: 4,
@@ -2524,107 +2537,107 @@ function ho({
2524
2537
  backgroundColor: B,
2525
2538
  flexShrink: 0
2526
2539
  },
2527
- children: q.map((Q) => /* @__PURE__ */ r(
2540
+ children: j.map((K) => /* @__PURE__ */ r(
2528
2541
  no,
2529
2542
  {
2530
- group: Q.group,
2531
- active: Q.group.name === se,
2532
- onClick: () => W(Q.group.name),
2543
+ group: K.group,
2544
+ active: K.group.name === se,
2545
+ onClick: () => Z(K.group.name),
2533
2546
  showLabel: a,
2534
- activeColor: E,
2535
- inactiveColor: O
2547
+ activeColor: T,
2548
+ inactiveColor: F
2536
2549
  },
2537
- Q.group.name
2550
+ K.group.name
2538
2551
  ))
2539
2552
  }
2540
- ), X = () => d ? p || /* @__PURE__ */ r(xA, { message: d, backgroundColor: we }) : c ? u || /* @__PURE__ */ r(
2553
+ ), J = () => d ? p || /* @__PURE__ */ r(xA, { message: d, backgroundColor: we }) : c ? u || /* @__PURE__ */ r(
2541
2554
  kA,
2542
2555
  {
2543
- itemCount: v,
2556
+ itemCount: y,
2544
2557
  collapsed: !1,
2545
2558
  backgroundColor: we,
2546
2559
  showGroups: !1
2547
2560
  }
2548
- ) : /* @__PURE__ */ r(_, { gap: 2, children: ve.map((Q, le) => /* @__PURE__ */ r(
2561
+ ) : /* @__PURE__ */ r(W, { gap: 2, children: ve.map((K, le) => /* @__PURE__ */ r(
2549
2562
  $e,
2550
2563
  {
2551
- item: Q,
2564
+ item: K,
2552
2565
  collapsed: !1,
2553
- active: y && j(Q),
2554
- onClick: z,
2555
- textColor: S,
2566
+ active: v && X(K),
2567
+ onClick: N,
2568
+ textColor: k,
2556
2569
  iconColor: $,
2557
- hoverColor: N,
2570
+ hoverColor: D,
2558
2571
  ...Ie
2559
2572
  },
2560
2573
  le
2561
- )) }), ke = G === "dark" ? k.colors.dark[5] : k.colors.gray[2];
2562
- return q.length <= 1 ? /* @__PURE__ */ R(Ye, { direction: "column", w: Ae ? o : t, h: "100%", style: Se, children: [
2563
- l && /* @__PURE__ */ r(H, { style: { width: "100%", flexShrink: 0 }, children: l }),
2574
+ )) }), ke = G === "dark" ? I.colors.dark[5] : I.colors.gray[2];
2575
+ return j.length <= 1 ? /* @__PURE__ */ R(Ye, { direction: "column", w: re ? o : t, h: "100%", style: Se, children: [
2576
+ l && /* @__PURE__ */ r(q, { style: { width: "100%", flexShrink: 0 }, children: l }),
2564
2577
  /* @__PURE__ */ r(
2565
- H,
2578
+ q,
2566
2579
  {
2567
2580
  style: {
2568
2581
  flex: 1,
2569
2582
  width: "100%",
2570
- backgroundColor: w,
2583
+ backgroundColor: S,
2571
2584
  display: "flex",
2572
2585
  flexDirection: "column",
2573
2586
  overflow: "hidden",
2574
- borderRight: P ? `1px solid ${ke}` : void 0
2587
+ borderRight: O ? `1px solid ${ke}` : void 0
2575
2588
  },
2576
- children: /* @__PURE__ */ r(ze, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(H, { p: "xs", children: Ae ? /* @__PURE__ */ r(_, { gap: 8, align: "center", children: A.filter((Q) => Q.showInSidebar ? !((typeof Q.disabled == "function" ? Q.disabled() : Q.disabled) && Q.hideDisabledItem) : !1).map((Q, le) => /* @__PURE__ */ r(
2589
+ children: /* @__PURE__ */ r(ze, { style: { flex: 1 }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(q, { p: "xs", children: re ? /* @__PURE__ */ r(W, { gap: 8, align: "center", children: A.filter((K) => K.showInSidebar ? !((typeof K.disabled == "function" ? K.disabled() : K.disabled) && K.hideDisabledItem) : !1).map((K, le) => /* @__PURE__ */ r(
2577
2590
  $e,
2578
2591
  {
2579
- item: Q,
2592
+ item: K,
2580
2593
  collapsed: !0,
2581
- active: y && j(Q),
2582
- onClick: z,
2583
- textColor: S,
2594
+ active: v && X(K),
2595
+ onClick: N,
2596
+ textColor: k,
2584
2597
  iconColor: $,
2585
- hoverColor: N,
2598
+ hoverColor: D,
2586
2599
  ...Ie
2587
2600
  },
2588
2601
  le
2589
- )) }) : X() }) })
2602
+ )) }) : J() }) })
2590
2603
  }
2591
2604
  ),
2592
- i && /* @__PURE__ */ r(H, { style: { width: "100%", backgroundColor: w, flexShrink: 0 }, children: i })
2593
- ] }) : /* @__PURE__ */ R(Ye, { direction: "column", w: Ae ? n : t, h: "100%", style: Se, children: [
2594
- l && /* @__PURE__ */ r(H, { style: { width: "100%", flexShrink: 0 }, children: l }),
2605
+ i && /* @__PURE__ */ r(q, { style: { width: "100%", backgroundColor: S, flexShrink: 0 }, children: i })
2606
+ ] }) : /* @__PURE__ */ R(Ye, { direction: "column", w: re ? n : t, h: "100%", style: Se, children: [
2607
+ l && /* @__PURE__ */ r(q, { style: { width: "100%", flexShrink: 0 }, children: l }),
2595
2608
  /* @__PURE__ */ R(
2596
- H,
2609
+ q,
2597
2610
  {
2598
2611
  style: {
2599
2612
  flex: 1,
2600
2613
  width: "100%",
2601
2614
  display: "flex",
2602
2615
  overflow: "hidden",
2603
- borderRight: P ? `1px solid ${ke}` : void 0
2616
+ borderRight: O ? `1px solid ${ke}` : void 0
2604
2617
  },
2605
2618
  children: [
2606
2619
  Ee(),
2607
2620
  /* @__PURE__ */ r(
2608
- H,
2621
+ q,
2609
2622
  {
2610
2623
  style: {
2611
- width: Ae ? 0 : re,
2624
+ width: re ? 0 : ee,
2612
2625
  height: "100%",
2613
- backgroundColor: w,
2626
+ backgroundColor: S,
2614
2627
  overflow: "hidden",
2615
2628
  transition: "width 200ms ease",
2616
- borderLeft: q.length > 1 ? `1px solid ${G === "dark" ? k.colors.dark[5] : k.colors.gray[2]}` : void 0
2629
+ borderLeft: j.length > 1 ? `1px solid ${G === "dark" ? I.colors.dark[5] : I.colors.gray[2]}` : void 0
2617
2630
  },
2618
- children: !Ae && se && /* @__PURE__ */ r(ze, { style: { height: "100%" }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(H, { p: "xs", children: X() }) })
2631
+ children: !re && se && /* @__PURE__ */ r(ze, { style: { height: "100%" }, scrollbarSize: 6, type: "hover", children: /* @__PURE__ */ r(q, { p: "xs", children: J() }) })
2619
2632
  }
2620
2633
  )
2621
2634
  ]
2622
2635
  }
2623
2636
  ),
2624
- i && /* @__PURE__ */ r(H, { style: { width: "100%", backgroundColor: w, flexShrink: 0 }, children: i })
2637
+ i && /* @__PURE__ */ r(q, { style: { width: "100%", backgroundColor: S, flexShrink: 0 }, children: i })
2625
2638
  ] });
2626
2639
  }
2627
- function fo(A) {
2640
+ function po(A) {
2628
2641
  const {
2629
2642
  navigationData: t,
2630
2643
  collapsed: o,
@@ -2655,7 +2668,7 @@ function fo(A) {
2655
2668
  }
2656
2669
  );
2657
2670
  }
2658
- function po({
2671
+ function fo({
2659
2672
  variant: A = "standard",
2660
2673
  ...t
2661
2674
  }) {
@@ -2663,7 +2676,7 @@ function po({
2663
2676
  case "minimal":
2664
2677
  return /* @__PURE__ */ r(uo, { ...t });
2665
2678
  case "rail":
2666
- return /* @__PURE__ */ r(fo, { ...t });
2679
+ return /* @__PURE__ */ r(po, { ...t });
2667
2680
  case "standard":
2668
2681
  default:
2669
2682
  return /* @__PURE__ */ r(ao, { ...t });
@@ -2702,21 +2715,21 @@ var ur = Ne({ active: !1, refresh: () => {
2702
2715
  }, destroy: () => Promise.resolve(), destroyAll: () => Promise.resolve(), destroyOther: () => Promise.resolve(), getCacheNodes: () => [] }), go = YA(function(A) {
2703
2716
  let { children: t, active: o, refresh: e, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l } = A, i = ce(() => ({ active: o, refresh: e, destroy: n, destroyAll: s, destroyOther: a, getCacheNodes: l }), [o, e, n, s, a, l]);
2704
2717
  return r(ur.Provider, { value: i, children: t });
2705
- }), bo = go, hr = HA.Activity, mo = hr ?? HA.Fragment, yo = !!hr, fr = "keepalive-cache-div";
2706
- function pr(A) {
2718
+ }), bo = go, hr = HA.Activity, mo = hr ?? HA.Fragment, yo = !!hr, pr = "keepalive-cache-div";
2719
+ function fr(A) {
2707
2720
  return A ? Array.from(A.children) : [];
2708
2721
  }
2709
- function fA(A) {
2722
+ function pA(A) {
2710
2723
  A.forEach((t) => {
2711
- t.classList.contains(fr) && t.remove();
2724
+ t.classList.contains(pr) && t.remove();
2712
2725
  });
2713
2726
  }
2714
2727
  function GA(A, t) {
2715
- let o = pr(A);
2716
- fA(o), A.appendChild(t), t.classList.remove("inactive"), t.classList.add("active");
2728
+ let o = fr(A);
2729
+ pA(o), A.appendChild(t), t.classList.remove("inactive"), t.classList.add("active");
2717
2730
  }
2718
2731
  function BA(A, t) {
2719
- let o = pr(A).filter((e) => e.classList.contains("active") && e.getAttribute("data-cache-key") !== t);
2732
+ let o = fr(A).filter((e) => e.classList.contains("active") && e.getAttribute("data-cache-key") !== t);
2720
2733
  return o.forEach((e) => {
2721
2734
  e.classList.remove("active"), e.classList.add("inactive");
2722
2735
  }), o;
@@ -2725,14 +2738,14 @@ function vo(A, t, o) {
2725
2738
  return o ? VA(o, A) : t ? !VA(t, A) : !0;
2726
2739
  }
2727
2740
  var Co = YA(function(A) {
2728
- let { errorElement: t = qA, cacheNodeClassName: o, children: e, cacheKey: n, exclude: s, include: a, enableActivity: l } = A, { active: i, renderCount: h, destroy: c, transition: d, viewTransition: u, duration: p, containerDivRef: v } = A, b = Z(!1);
2729
- b.current = b.current || i;
2730
- let m = ce(() => {
2731
- let g = document.createElement("div");
2732
- return dr(g).set("data-cache-key", n).set("style", "height: 100%").set("data-render-count", h.toString()), g.className = fr + (o ? ` ${o}` : ""), g;
2741
+ let { errorElement: t = qA, cacheNodeClassName: o, children: e, cacheKey: n, exclude: s, include: a, enableActivity: l } = A, { active: i, renderCount: h, destroy: c, transition: d, viewTransition: u, duration: p, containerDivRef: y } = A, m = Ae(!1);
2742
+ m.current = m.current || i;
2743
+ let g = ce(() => {
2744
+ let b = document.createElement("div");
2745
+ return dr(b).set("data-cache-key", n).set("style", "height: 100%").set("data-render-count", h.toString()), b.className = pr + (o ? ` ${o}` : ""), b;
2733
2746
  }, [h, o]);
2734
2747
  return oe(() => {
2735
- let g = vo(n, s, a), f = v.current;
2748
+ let b = vo(n, s, a), f = y.current;
2736
2749
  if (!f) {
2737
2750
  console.warn("keepalive: cache container not found");
2738
2751
  return;
@@ -2741,89 +2754,89 @@ var Co = YA(function(A) {
2741
2754
  (async () => {
2742
2755
  if (i) {
2743
2756
  let x = BA(f, n);
2744
- if (await FA(p - 40), fA(x), f.contains(m))
2757
+ if (await FA(p - 40), pA(x), f.contains(g))
2745
2758
  return;
2746
- GA(f, m);
2759
+ GA(f, g);
2747
2760
  } else
2748
- g || (await FA(p), c(n));
2761
+ b || (await FA(p), c(n));
2749
2762
  })();
2750
2763
  else if (i) {
2751
2764
  let x = () => {
2752
- let I = BA(f, n);
2753
- fA(I), !f.contains(m) && GA(f, m);
2765
+ let E = BA(f, n);
2766
+ pA(E), !f.contains(g) && GA(f, g);
2754
2767
  };
2755
2768
  u && document.startViewTransition ? document.startViewTransition(x) : x();
2756
2769
  } else
2757
- g || c(n);
2758
- }, [i, v, n, s, a]), b.current ? Dt(r(t, { children: yo && l ? R(mo, { mode: i ? "visible" : "hidden", children: [" ", e] }) : e }), m, n) : null;
2770
+ b || c(n);
2771
+ }, [i, y, n, s, a]), m.current ? Mt(r(t, { children: yo && l ? R(mo, { mode: i ? "visible" : "hidden", children: [" ", e] }) : e }), g, n) : null;
2759
2772
  }, (A, t) => A.active === t.active && A.renderCount === t.renderCount && A.children === t.children && A.exclude === t.exclude && A.include === t.include), wo = Co, So = (A) => {
2760
2773
  typeof nA < "u" && We(nA) ? nA(A) : A();
2761
2774
  }, ko = So;
2762
2775
  function gr() {
2763
- return Z(null);
2776
+ return Ae(null);
2764
2777
  }
2765
2778
  function xo(A) {
2766
- let { activeCacheKey: t, max: o = 10, exclude: e, include: n, onBeforeActive: s, customContainerRef: a, cacheNodeClassName: l = "cache-component", containerClassName: i = "keep-alive-render", errorElement: h, transition: c = !1, viewTransition: d = !1, duration: u = 200, children: p, aliveRef: v, maxAliveTime: b = 0, enableActivity: m = !1 } = A, g = a || Z(null), [f, x] = ge([]);
2779
+ let { activeCacheKey: t, max: o = 10, exclude: e, include: n, onBeforeActive: s, customContainerRef: a, cacheNodeClassName: l = "cache-component", containerClassName: i = "keep-alive-render", errorElement: h, transition: c = !1, viewTransition: d = !1, duration: u = 200, children: p, aliveRef: y, maxAliveTime: m = 0, enableActivity: g = !1 } = A, b = a || Ae(null), [f, x] = ge([]);
2767
2780
  Er(() => {
2768
2781
  IA(t) || ko(() => {
2769
- x((M) => {
2770
- let O = Date.now();
2771
- if (M.find((D) => D.cacheKey === t))
2772
- return M.map((D) => {
2773
- if (D.cacheKey === t) {
2774
- let K = !1;
2775
- if (We(s) && s(t), b) {
2776
- let P = D.lastActiveTime;
2777
- if (hA(b)) {
2778
- let y = b.find((F) => cr(F.match) ? F.match.test(t) : F.match === t);
2779
- y && (K = y && P + y.expire * 1e3 < O);
2782
+ x((P) => {
2783
+ let F = Date.now();
2784
+ if (P.find((z) => z.cacheKey === t))
2785
+ return P.map((z) => {
2786
+ if (z.cacheKey === t) {
2787
+ let Q = !1;
2788
+ if (We(s) && s(t), m) {
2789
+ let O = z.lastActiveTime;
2790
+ if (hA(m)) {
2791
+ let v = m.find((L) => cr(L.match) ? L.match.test(t) : L.match === t);
2792
+ v && (Q = v && O + v.expire * 1e3 < F);
2780
2793
  } else
2781
- K = P + b * 1e3 < O;
2794
+ Q = O + m * 1e3 < F;
2782
2795
  }
2783
- return { ...D, ele: p, lastActiveTime: O, renderCount: K ? D.renderCount + 1 : D.renderCount };
2796
+ return { ...z, ele: p, lastActiveTime: F, renderCount: Q ? z.renderCount + 1 : z.renderCount };
2784
2797
  }
2785
- return D;
2798
+ return z;
2786
2799
  });
2787
- if (We(s) && s(t), M.length > o) {
2788
- let D = M.reduce((K, P) => K.lastActiveTime < P.lastActiveTime ? K : P);
2789
- M.splice(M.indexOf(D), 1);
2800
+ if (We(s) && s(t), P.length > o) {
2801
+ let z = P.reduce((Q, O) => Q.lastActiveTime < O.lastActiveTime ? Q : O);
2802
+ P.splice(P.indexOf(z), 1);
2790
2803
  }
2791
- return [...M, { cacheKey: t, lastActiveTime: O, ele: p, renderCount: 0 }];
2804
+ return [...P, { cacheKey: t, lastActiveTime: F, ele: p, renderCount: 0 }];
2792
2805
  });
2793
2806
  });
2794
2807
  }, [t, p]);
2795
- let I = C((M) => {
2796
- x((O) => {
2797
- let D = M || t;
2798
- return O.map((K) => K.cacheKey === D ? { ...K, renderCount: K.renderCount + 1 } : K);
2808
+ let E = w((P) => {
2809
+ x((F) => {
2810
+ let z = P || t;
2811
+ return F.map((Q) => Q.cacheKey === z ? { ...Q, renderCount: Q.renderCount + 1 } : Q);
2799
2812
  });
2800
- }, [x, t]), L = C((M) => {
2801
- let O = M || t, D = hA(O) ? O : [O];
2802
- return new Promise((K) => {
2813
+ }, [x, t]), M = w((P) => {
2814
+ let F = P || t, z = hA(F) ? F : [F];
2815
+ return new Promise((Q) => {
2803
2816
  lA(() => {
2804
- x((P) => [...P.filter((y) => !D.includes(y.cacheKey))]), K();
2817
+ x((O) => [...O.filter((v) => !z.includes(v.cacheKey))]), Q();
2805
2818
  });
2806
2819
  });
2807
- }, [x, t]), J = C(() => new Promise((M) => {
2820
+ }, [x, t]), V = w(() => new Promise((P) => {
2808
2821
  lA(() => {
2809
- x([]), M();
2822
+ x([]), P();
2810
2823
  });
2811
- }), [x]), V = C((M) => {
2812
- let O = M || t;
2813
- return new Promise((D) => {
2824
+ }), [x]), U = w((P) => {
2825
+ let F = P || t;
2826
+ return new Promise((z) => {
2814
2827
  lA(() => {
2815
- x((K) => [...K.filter((P) => P.cacheKey === O)]), D();
2828
+ x((Q) => [...Q.filter((O) => O.cacheKey === F)]), z();
2816
2829
  });
2817
2830
  });
2818
- }, [t, x]), Y = C(() => f, [f]);
2819
- return Rr(v, () => ({ refresh: I, destroy: L, destroyAll: J, destroyOther: V, getCacheNodes: Y })), R(qA, { children: [r("div", { ref: g, className: i, style: { height: "100%" } }), f.map((M) => {
2820
- let { cacheKey: O, ele: D, renderCount: K } = M;
2821
- return r(bo, { active: t === O, refresh: I, destroy: L, destroyAll: J, destroyOther: V, getCacheNodes: Y, children: r(wo, { destroy: L, include: n, exclude: e, transition: c, viewTransition: d, duration: u, renderCount: K, containerDivRef: g, errorElement: h, active: t === O, cacheNodeClassName: l, cacheKey: O, enableActivity: m, children: D }) }, `${O}-${K}`);
2831
+ }, [t, x]), Y = w(() => f, [f]);
2832
+ return Rr(y, () => ({ refresh: E, destroy: M, destroyAll: V, destroyOther: U, getCacheNodes: Y })), R(qA, { children: [r("div", { ref: b, className: i, style: { height: "100%" } }), f.map((P) => {
2833
+ let { cacheKey: F, ele: z, renderCount: Q } = P;
2834
+ return r(bo, { active: t === F, refresh: E, destroy: M, destroyAll: V, destroyOther: U, getCacheNodes: Y, children: r(wo, { destroy: M, include: n, exclude: e, transition: c, viewTransition: d, duration: u, renderCount: Q, containerDivRef: b, errorElement: h, active: t === F, cacheNodeClassName: l, cacheKey: F, enableActivity: g, children: z }) }, `${F}-${Q}`);
2822
2835
  })] });
2823
2836
  }
2824
2837
  var Io = xo, To = () => ye(ur), br = To;
2825
2838
  function Eo(A, t, o = !1, e) {
2826
- let { active: n } = br(), s = Z(!1);
2839
+ let { active: n } = br(), s = Ae(!1);
2827
2840
  e(() => {
2828
2841
  if (!n)
2829
2842
  return;
@@ -2852,7 +2865,7 @@ const mr = Ne({
2852
2865
  const n = Object.keys(A);
2853
2866
  return n.length === 0 ? !1 : n.some((s) => A[s] !== void 0);
2854
2867
  }, [A]) ? A : o;
2855
- }, Ze = Ne(null), Mo = () => ye(Ze), Do = ({ children: A }) => {
2868
+ }, Ze = Ne(null), Do = () => ye(Ze), Mo = ({ children: A }) => {
2856
2869
  const t = gr(), o = ce(() => ({
2857
2870
  requestUnregister: (e) => {
2858
2871
  t.current?.destroy(e);
@@ -2870,20 +2883,20 @@ const mr = Ne({
2870
2883
  }), [t]);
2871
2884
  return /* @__PURE__ */ r(Ze.Provider, { value: o, children: /* @__PURE__ */ r(yr.Provider, { value: t, children: A }) });
2872
2885
  }, yr = Ne(null), eA = (A) => null, No = (A) => A.includes(":"), zo = (A, t) => No(A) ? t : A, Oo = ({ children: A }) => {
2873
- const { active: t } = br(), o = or(), e = Xe(), n = kt(), s = Z(o), [a, l] = ge(o);
2886
+ const { active: t } = br(), o = or(), e = Xe(), n = kt(), s = Ae(o), [a, l] = ge(o);
2874
2887
  s.current = o;
2875
- const i = Z({ location: e, navigationType: n });
2888
+ const i = Ae({ location: e, navigationType: n });
2876
2889
  t && (i.current = { location: e, navigationType: n });
2877
2890
  const h = ce(
2878
2891
  () => t ? { location: e, navigationType: n } : i.current,
2879
2892
  [t, e, n]
2880
- ), [c, d] = ge(0), u = Z(t);
2893
+ ), [c, d] = ge(0), u = Ae(t);
2881
2894
  Lo(() => {
2882
2895
  l(s.current), requestAnimationFrame(() => {
2883
2896
  window.dispatchEvent(new Event("resize"));
2884
2897
  });
2885
2898
  }, []), oe(() => {
2886
- t && (l(s.current), u.current || d((v) => v + 1)), u.current = t;
2899
+ t && (l(s.current), u.current || d((y) => y + 1)), u.current = t;
2887
2900
  }, [t]);
2888
2901
  const p = ce(
2889
2902
  () => ({ isVisible: t, wasRestored: c > 0, restoreCount: c }),
@@ -2910,39 +2923,39 @@ const mr = Ne({
2910
2923
  });
2911
2924
  vr.displayName = "KeepAliveLayout";
2912
2925
  const Qo = ({ children: A, maxKeepAliveTabs: t = 10, ...o }) => {
2913
- const e = gr(), s = ye(yr) || e, a = Z(null), l = Z(""), { keepAlivePaths: i, routeElements: h } = ce(() => {
2914
- const p = xe.Children.toArray(A), v = p.map((f) => {
2926
+ const e = gr(), s = ye(yr) || e, a = Ae(null), l = Ae(""), { keepAlivePaths: i, routeElements: h } = ce(() => {
2927
+ const p = xe.Children.toArray(A), y = p.map((f) => {
2915
2928
  if (xe.isValidElement(f)) {
2916
- const x = f.props?.path || "", I = f.type === eA;
2917
- return `${x}:${I}`;
2929
+ const x = f.props?.path || "", E = f.type === eA;
2930
+ return `${x}:${E}`;
2918
2931
  }
2919
2932
  return "";
2920
2933
  }).join("|");
2921
- if (a.current && l.current === v)
2934
+ if (a.current && l.current === y)
2922
2935
  return a.current;
2923
- l.current = v;
2924
- const b = [], m = [];
2936
+ l.current = y;
2937
+ const m = [], g = [];
2925
2938
  p.forEach((f) => {
2926
2939
  if (xe.isValidElement(f))
2927
2940
  if (f.type === eA) {
2928
2941
  const x = f.props;
2929
- x.path && b.push(x.path);
2930
- const I = x.component, L = typeof I == "function" ? xe.createElement(I) : I;
2931
- m.push(
2942
+ x.path && m.push(x.path);
2943
+ const E = x.component, M = typeof E == "function" ? xe.createElement(E) : E;
2944
+ g.push(
2932
2945
  /* @__PURE__ */ r(
2933
2946
  Ke,
2934
2947
  {
2935
2948
  path: x.path,
2936
- element: /* @__PURE__ */ r(Oo, { children: L })
2949
+ element: /* @__PURE__ */ r(Oo, { children: M })
2937
2950
  },
2938
2951
  x.path || f.key
2939
2952
  )
2940
2953
  );
2941
2954
  } else
2942
- m.push(f);
2955
+ g.push(f);
2943
2956
  });
2944
- const g = { keepAlivePaths: b, routeElements: m };
2945
- return a.current = g, g;
2957
+ const b = { keepAlivePaths: m, routeElements: g };
2958
+ return a.current = b, b;
2946
2959
  }, [A]), c = ye(Ze), d = ce(() => ({
2947
2960
  requestUnregister: (p) => {
2948
2961
  s.current?.destroy(p);
@@ -2974,9 +2987,9 @@ const Qo = ({ children: A, maxKeepAliveTabs: t = 10, ...o }) => {
2974
2987
  isNavigating: !1
2975
2988
  }), wr = () => ye(Cr), Ko = 150;
2976
2989
  function Fo({ children: A }) {
2977
- const [t, o] = ge(!1), e = Z(null), n = Z(0), s = C(() => {
2990
+ const [t, o] = ge(!1), e = Ae(null), n = Ae(0), s = w(() => {
2978
2991
  e.current && clearTimeout(e.current), n.current = Date.now(), o(!0);
2979
- }, []), a = C(() => {
2992
+ }, []), a = w(() => {
2980
2993
  const l = Date.now() - n.current, i = Math.max(0, Ko - l);
2981
2994
  e.current = setTimeout(() => {
2982
2995
  o(!1);
@@ -2998,7 +3011,7 @@ function Vo(A, t, o, e, n, s) {
2998
3011
  zIndex: "101"
2999
3012
  },
3000
3013
  children: /* @__PURE__ */ r(
3001
- De,
3014
+ Me,
3002
3015
  {
3003
3016
  bg: t.colors[t.primaryColor][4],
3004
3017
  color: t.colors[t.primaryColor][6],
@@ -3026,58 +3039,58 @@ function Go({
3026
3039
  sidebarDefaultGroupIcon: d,
3027
3040
  sideBarHeaderHeight: u,
3028
3041
  sideBarHeaderContent: p,
3029
- selectedGroupColor: v = "#132441",
3030
- groupColor: b = "white",
3031
- backgroundGroupColor: m = "#132441",
3032
- groupLabelDarkColor: g = "white",
3042
+ selectedGroupColor: y = "#132441",
3043
+ groupColor: m = "white",
3044
+ backgroundGroupColor: g = "#132441",
3045
+ groupLabelDarkColor: b = "white",
3033
3046
  groupLabelLightColor: f = "white",
3034
3047
  headerColor: x,
3035
- footerHeight: I,
3036
- iconsWithBackground: L,
3037
- menuItemHeight: J,
3038
- showSideBar: V = !0,
3048
+ footerHeight: E,
3049
+ iconsWithBackground: M,
3050
+ menuItemHeight: V,
3051
+ showSideBar: U = !0,
3039
3052
  showHeader: Y = !0,
3040
- headerStyle: M = {},
3041
- highlightActiveMenuItem: O = !0,
3042
- customRenderSidebar: D,
3043
- showCollapsedButton: K = !0,
3044
- sideBarBackgroundDarkColor: P,
3045
- sideBarBackgroundLightColor: y,
3046
- sideBarTextDarkColor: F,
3047
- sideBarTextLightColor: T,
3048
- sideBarIconDarkColor: ee,
3049
- sideBarIconLightColor: U,
3050
- sideBarBackgroundImage: k,
3053
+ headerStyle: P = {},
3054
+ highlightActiveMenuItem: F = !0,
3055
+ customRenderSidebar: z,
3056
+ showCollapsedButton: Q = !0,
3057
+ sideBarBackgroundDarkColor: O,
3058
+ sideBarBackgroundLightColor: v,
3059
+ sideBarTextDarkColor: L,
3060
+ sideBarTextLightColor: C,
3061
+ sideBarIconDarkColor: _,
3062
+ sideBarIconLightColor: H,
3063
+ sideBarBackgroundImage: I,
3051
3064
  mainBackground: G,
3052
- mainBorderRadius: Ae,
3065
+ mainBorderRadius: re,
3053
3066
  mainBorderColor: Ce,
3054
3067
  sideBarItemBorderRadius: se,
3055
3068
  sideBarItemHorizontalGap: be,
3056
3069
  sideBarItemActiveBackground: we,
3057
3070
  sideBarCollapsedSubmenuWidth: Se,
3058
- sidebarActiveColor: w,
3059
- maxKeepAliveTabs: S = 10,
3071
+ sidebarActiveColor: S,
3072
+ maxKeepAliveTabs: k = 10,
3060
3073
  sidebarVariant: $ = "legacy",
3061
- sidebarShowSearch: N = !1
3074
+ sidebarShowSearch: D = !1
3062
3075
  }) {
3063
- const B = me(), E = ye(rA), { colorScheme: z } = de(), j = Et(), [he, Ie] = Rt(), q = Tt(
3064
- `(max-width: ${s ? fe(s) : B.breakpoints.md})`
3076
+ const B = me(), T = ye(rA), { colorScheme: N } = de(), X = Et(), [he, Ie] = Rt(), j = Tt(
3077
+ `(max-width: ${s ? pe(s) : B.breakpoints.md})`
3065
3078
  ), ve = (ae) => {
3066
- ae.link && (ae.routeParams ? j(ae.link, {}, ae.routeParams) : j(ae.link));
3067
- }, W = (ae, ue) => {
3068
- ae == ue && E.collapsed && E.setCollapsed(!1), E.setCollapsed(ae == ue);
3069
- }, re = () => {
3079
+ ae.link && (ae.routeParams ? X(ae.link, {}, ae.routeParams) : X(ae.link));
3080
+ }, Z = (ae, ue) => {
3081
+ ae == ue && T.collapsed && T.setCollapsed(!1), T.setCollapsed(ae == ue);
3082
+ }, ee = () => {
3070
3083
  let ae = 0, ue = 0;
3071
- return u && (ae = Number(fe(u))), a && (ue = Number(fe(a))), `calc(100vh - var(--app-shell-header-offset, 0px) - ${ae + ue}px)`;
3084
+ return u && (ae = Number(pe(u))), a && (ue = Number(pe(a))), `calc(100vh - var(--app-shell-header-offset, 0px) - ${ae + ue}px)`;
3072
3085
  }, Ee = () => {
3073
3086
  let ae = 0, ue = 0;
3074
- return u && (ae = Number(fe(u))), a && (ue = Number(fe(a))), `calc(100vh - 28px - ${ae + ue}px)`;
3075
- }, X = ce(() => {
3087
+ return u && (ae = Number(pe(u))), a && (ue = Number(pe(a))), `calc(100vh - 28px - ${ae + ue}px)`;
3088
+ }, J = ce(() => {
3076
3089
  const ae = [];
3077
- return E.navigationData.forEach((ue, Ge) => {
3078
- ue.links ? ue.links.forEach((Oe, MA) => {
3079
- Oe.keepAlive === !1 ? ae.push(/* @__PURE__ */ r(Ke, { path: Oe.link, element: Oe.component }, `${Oe.link}_${MA}`)) : ae.push(
3080
- /* @__PURE__ */ r(eA, { path: Oe.link, component: Oe.component }, `${Oe.link}_${MA}`)
3090
+ return T.navigationData.forEach((ue, Ge) => {
3091
+ ue.links ? ue.links.forEach((Oe, DA) => {
3092
+ Oe.keepAlive === !1 ? ae.push(/* @__PURE__ */ r(Ke, { path: Oe.link, element: Oe.component }, `${Oe.link}_${DA}`)) : ae.push(
3093
+ /* @__PURE__ */ r(eA, { path: Oe.link, component: Oe.component }, `${Oe.link}_${DA}`)
3081
3094
  );
3082
3095
  }) : ue.keepAlive === !1 ? ae.push(
3083
3096
  /* @__PURE__ */ r(Ke, { path: ue.link, element: ue.component }, `${ue.link}_${Ge}`)
@@ -3085,34 +3098,34 @@ function Go({
3085
3098
  /* @__PURE__ */ r(eA, { path: ue.link, component: ue.component }, `${ue.link}_${Ge}`)
3086
3099
  );
3087
3100
  }), ae;
3088
- }, [E.navigationData, E.collapsed]), ke = C(() => {
3089
- E.setCollapsed(!E.collapsed);
3090
- }, [E.setCollapsed, E.collapsed]), Q = C(() => {
3091
- E.setHidden(!E.hidden);
3092
- }, [E.setHidden, E.hidden]);
3101
+ }, [T.navigationData, T.collapsed]), ke = w(() => {
3102
+ T.setCollapsed(!T.collapsed);
3103
+ }, [T.setCollapsed, T.collapsed]), K = w(() => {
3104
+ T.setHidden(!T.hidden);
3105
+ }, [T.setHidden, T.hidden]);
3093
3106
  oe(() => {
3094
- h && h(E.hidden);
3095
- }, [E.hidden, Q]), oe(() => {
3096
- i && i(E.collapsed);
3097
- }, [E.collapsed, i]);
3098
- const le = $ === "minimal" || E.collapsed ? n : e, Fe = (ae, ue = !1) => D ? D({ width: e, height: ae, isHidden: q }) : $ === "legacy" ? /* @__PURE__ */ r(
3107
+ h && h(T.hidden);
3108
+ }, [T.hidden, K]), oe(() => {
3109
+ i && i(T.collapsed);
3110
+ }, [T.collapsed, i]);
3111
+ const le = $ === "minimal" || T.collapsed ? n : e, Fe = (ae, ue = !1) => z ? z({ width: e, height: ae, isHidden: j }) : $ === "legacy" ? /* @__PURE__ */ r(
3099
3112
  Ao,
3100
3113
  {
3101
- navigationData: E.navigationData,
3114
+ navigationData: T.navigationData,
3102
3115
  sidebarHeight: ae,
3103
3116
  sidebarGroupWidth: n,
3104
3117
  sidebarCollapsedWidth: n,
3105
- selectedGroupColor: v,
3106
- groupColor: b,
3107
- backgroundGroupColor: m,
3108
- groupLabelDarkColor: g,
3118
+ selectedGroupColor: y,
3119
+ groupColor: m,
3120
+ backgroundGroupColor: g,
3121
+ groupLabelDarkColor: b,
3109
3122
  groupLabelLightColor: f,
3110
3123
  showGroupLabels: !1,
3111
- collapsed: ue ? !1 : E.collapsed,
3124
+ collapsed: ue ? !1 : T.collapsed,
3112
3125
  sidebarWidth: e,
3113
- isHidden: q,
3126
+ isHidden: j,
3114
3127
  onMenuItemClick: ve,
3115
- onClickActionIcon: W,
3128
+ onClickActionIcon: Z,
3116
3129
  sideBarFooterHeight: a,
3117
3130
  sideBarFooterContent: l,
3118
3131
  sideBarHeaderContent: p,
@@ -3120,68 +3133,68 @@ function Go({
3120
3133
  sidebarRef: he,
3121
3134
  defaultGroupIcon: d,
3122
3135
  selectedGroupName: c,
3123
- iconsWithBackground: L,
3124
- menuItemHeight: J,
3125
- highlightActiveMenuItem: O,
3126
- backgroundDarkColor: P,
3127
- backgroundLightColor: y,
3128
- textDarkColor: F,
3129
- textLightColor: T,
3130
- iconDarkColor: ee,
3131
- iconLightColor: U,
3136
+ iconsWithBackground: M,
3137
+ menuItemHeight: V,
3138
+ highlightActiveMenuItem: F,
3139
+ backgroundDarkColor: O,
3140
+ backgroundLightColor: v,
3141
+ textDarkColor: L,
3142
+ textLightColor: C,
3143
+ iconDarkColor: _,
3144
+ iconLightColor: H,
3132
3145
  collapsedSubmenuWidth: Se,
3133
- isLoading: E.isLoadingPermissions,
3134
- loadingError: E.permissionsError
3146
+ isLoading: T.isLoadingPermissions,
3147
+ loadingError: T.permissionsError
3135
3148
  }
3136
3149
  ) : /* @__PURE__ */ r(
3137
- po,
3150
+ fo,
3138
3151
  {
3139
- navigationData: E.navigationData,
3152
+ navigationData: T.navigationData,
3140
3153
  variant: $,
3141
3154
  width: le,
3142
3155
  collapsedWidth: n,
3143
3156
  height: ae,
3144
3157
  groupColumnWidth: n,
3145
- collapsed: ue ? !1 : E.collapsed,
3146
- onCollapsedChange: (Ge) => E.setCollapsed(Ge),
3158
+ collapsed: ue ? !1 : T.collapsed,
3159
+ onCollapsedChange: (Ge) => T.setCollapsed(Ge),
3147
3160
  activeGroup: c,
3148
3161
  onActiveGroupChange: (Ge) => {
3149
3162
  },
3150
3163
  defaultGroupIcon: d,
3151
3164
  showGroupLabels: !1,
3152
3165
  onMenuItemClick: ve,
3153
- showSearch: N,
3166
+ showSearch: D,
3154
3167
  header: p,
3155
3168
  footer: l,
3156
3169
  footerHeight: a,
3157
- isLoading: E.isLoadingPermissions,
3158
- loadingError: E.permissionsError,
3170
+ isLoading: T.isLoadingPermissions,
3171
+ loadingError: T.permissionsError,
3159
3172
  theme: B,
3160
- highlightActiveItem: O,
3161
- backgroundDarkColor: P,
3162
- backgroundLightColor: y,
3163
- backgroundImage: k,
3164
- textDarkColor: F,
3165
- textLightColor: T,
3166
- iconDarkColor: ee,
3167
- iconLightColor: U,
3168
- groupBackgroundColor: m,
3169
- selectedGroupColor: v,
3170
- groupColor: b,
3171
- groupLabelDarkColor: g,
3173
+ highlightActiveItem: F,
3174
+ backgroundDarkColor: O,
3175
+ backgroundLightColor: v,
3176
+ backgroundImage: I,
3177
+ textDarkColor: L,
3178
+ textLightColor: C,
3179
+ iconDarkColor: _,
3180
+ iconLightColor: H,
3181
+ groupBackgroundColor: g,
3182
+ selectedGroupColor: y,
3183
+ groupColor: m,
3184
+ groupLabelDarkColor: b,
3172
3185
  groupLabelLightColor: f,
3173
- activeColor: w,
3186
+ activeColor: S,
3174
3187
  itemBorderRadius: se,
3175
3188
  itemHorizontalGap: be,
3176
3189
  itemActiveBackground: we,
3177
3190
  withBorder: !1,
3178
3191
  sidebarRef: he
3179
3192
  }
3180
- ), Ve = z === "dark" ? P ?? B.colors.dark[7] : y ?? B.white, Qe = $ === "legacy", xr = Qe ? void 0 : {
3193
+ ), Ve = N === "dark" ? O ?? B.colors.dark[7] : v ?? B.white, Qe = $ === "legacy", xr = Qe ? void 0 : {
3181
3194
  width: { base: le },
3182
3195
  breakpoint: "sm",
3183
- collapsed: { mobile: q || !V, desktop: q || !V }
3184
- }, RA = G ?? (z === "dark" ? B.colors.dark[8] : B.colors.gray[0]), Ir = Qe ? {
3196
+ collapsed: { mobile: j || !U, desktop: j || !U }
3197
+ }, RA = G ?? (N === "dark" ? B.colors.dark[8] : B.colors.gray[0]), Ir = Qe ? {
3185
3198
  main: {
3186
3199
  background: RA,
3187
3200
  overflow: "hidden"
@@ -3192,14 +3205,14 @@ function Go({
3192
3205
  overflow: "hidden"
3193
3206
  },
3194
3207
  navbar: {
3195
- background: k ?? Ve,
3208
+ background: I ?? Ve,
3196
3209
  border: "none"
3197
3210
  }
3198
- }, PA = typeof Ae == "number" ? `${Ae}px` : Ae ?? "4px", LA = Ce ?? (z === "dark" ? B.colors.dark[4] : "#e4e9ef"), Tr = Qe ? {
3211
+ }, PA = typeof re == "number" ? `${re}px` : re ?? "4px", LA = Ce ?? (N === "dark" ? B.colors.dark[4] : "#e4e9ef"), Tr = Qe ? {
3199
3212
  height: "calc(100vh - var(--app-shell-header-offset, 0px) - var(--app-shell-footer-offset, 0px) - var(--app-shell-padding) - 1rem)",
3200
- width: `calc(100vw - var(--app-shell-padding) - calc(${q ? "0px" : le} + 1rem))`,
3213
+ width: `calc(100vw - var(--app-shell-padding) - calc(${j ? "0px" : le} + 1rem))`,
3201
3214
  marginTop: "0.5rem",
3202
- marginLeft: `calc(${q ? "0px" : le} + 0.5rem)`,
3215
+ marginLeft: `calc(${j ? "0px" : le} + 0.5rem)`,
3203
3216
  border: `1px solid ${LA}`,
3204
3217
  borderRadius: PA,
3205
3218
  overflow: "hidden"
@@ -3218,7 +3231,7 @@ function Go({
3218
3231
  {
3219
3232
  header: { height: "60px", collapsed: !Y },
3220
3233
  navbar: xr,
3221
- footer: { height: I || "0px" },
3234
+ footer: { height: E || "0px" },
3222
3235
  styles: Ir,
3223
3236
  children: [
3224
3237
  /* @__PURE__ */ r(
@@ -3231,30 +3244,30 @@ function Go({
3231
3244
  backgroundColor: "var(--mantine-primary-color-8)",
3232
3245
  alignItems: "center",
3233
3246
  borderBottom: "none",
3234
- ...M
3247
+ ...P
3235
3248
  },
3236
3249
  children: t
3237
3250
  }
3238
3251
  ),
3239
- !q && V && /* @__PURE__ */ r(Be.Navbar, { children: Fe(re(), !1) }),
3252
+ !j && U && /* @__PURE__ */ r(Be.Navbar, { children: Fe(ee(), !1) }),
3240
3253
  /* @__PURE__ */ R(Be.Main, { children: [
3241
- !q && K && Vo(
3242
- z,
3254
+ !j && Q && Vo(
3255
+ N,
3243
3256
  B,
3244
- E,
3257
+ T,
3245
3258
  e,
3246
3259
  n,
3247
3260
  ke
3248
3261
  ),
3249
- /* @__PURE__ */ r(Do, { children: /* @__PURE__ */ R("div", { style: Tr, children: [
3262
+ /* @__PURE__ */ r(Mo, { children: /* @__PURE__ */ R("div", { style: Tr, children: [
3250
3263
  A,
3251
- /* @__PURE__ */ r(Bo, { maxKeepAliveTabs: S, routes: X })
3264
+ /* @__PURE__ */ r(Bo, { maxKeepAliveTabs: k, routes: J })
3252
3265
  ] }) }),
3253
- V && /* @__PURE__ */ r(
3266
+ U && /* @__PURE__ */ r(
3254
3267
  JA,
3255
3268
  {
3256
- opened: E.hidden || !1,
3257
- onClose: Q,
3269
+ opened: T.hidden || !1,
3270
+ onClose: K,
3258
3271
  size: e,
3259
3272
  padding: 0,
3260
3273
  styles: {
@@ -3295,48 +3308,49 @@ function Yn({
3295
3308
  sideBarFooterHeight: d,
3296
3309
  sideBarFooterContent: u,
3297
3310
  onCollapsedSideBar: p,
3298
- onHiddenSidebar: v,
3299
- sidebarDefaultGroupIcon: b,
3300
- sidebarSelectedGroupName: m,
3301
- sideBarHeaderHeight: g,
3311
+ onHiddenSidebar: y,
3312
+ sidebarDefaultGroupIcon: m,
3313
+ sidebarSelectedGroupName: g,
3314
+ sideBarHeaderHeight: b,
3302
3315
  sideBarHeaderContent: f,
3303
3316
  selectedGroupColor: x = "#132441",
3304
- groupColor: I = "white",
3305
- backgroundGroupColor: L = "#132441",
3306
- groupLabelDarkColor: J = "white",
3307
- groupLabelLightColor: V = "white",
3317
+ groupColor: E = "white",
3318
+ backgroundGroupColor: M = "#132441",
3319
+ groupLabelDarkColor: V = "white",
3320
+ groupLabelLightColor: U = "white",
3308
3321
  headerColor: Y,
3309
- footerHeight: M,
3310
- iconsWithBackground: O,
3311
- menuItemHeight: D,
3312
- showSideBar: K,
3313
- showHeader: P,
3314
- headerStyle: y,
3315
- highlightActiveMenuItem: F,
3316
- enableSecurity: T = !1,
3317
- securityOptions: ee,
3318
- customRenderSidebar: U,
3319
- onNavigationDataChange: k,
3320
- showCollapsedButton: G,
3321
- initialSidebarCollapsed: Ae = !1,
3322
- sideBarBackgroundDarkColor: Ce,
3323
- sideBarBackgroundLightColor: se,
3324
- sideBarTextDarkColor: be,
3325
- sideBarTextLightColor: we,
3326
- sideBarIconDarkColor: Se,
3327
- sideBarIconLightColor: w,
3328
- sideBarBackgroundImage: S,
3329
- mainBackground: $,
3330
- mainBorderRadius: N,
3331
- mainBorderColor: B,
3332
- sideBarItemBorderRadius: E,
3333
- sideBarItemHorizontalGap: z,
3334
- sideBarItemActiveBackground: j,
3335
- sideBarCollapsedSubmenuWidth: he,
3336
- sidebarActiveColor: Ie,
3337
- maxKeepAliveTabs: q = 10,
3338
- sidebarVariant: ve = "legacy",
3339
- sidebarShowSearch: W = !1
3322
+ footerHeight: P,
3323
+ iconsWithBackground: F,
3324
+ menuItemHeight: z,
3325
+ showSideBar: Q,
3326
+ showHeader: O,
3327
+ headerStyle: v,
3328
+ highlightActiveMenuItem: L,
3329
+ enableSecurity: C = !1,
3330
+ securityOptions: _,
3331
+ securityFailMode: H,
3332
+ customRenderSidebar: I,
3333
+ onNavigationDataChange: G,
3334
+ showCollapsedButton: re,
3335
+ initialSidebarCollapsed: Ce = !1,
3336
+ sideBarBackgroundDarkColor: se,
3337
+ sideBarBackgroundLightColor: be,
3338
+ sideBarTextDarkColor: we,
3339
+ sideBarTextLightColor: Se,
3340
+ sideBarIconDarkColor: S,
3341
+ sideBarIconLightColor: k,
3342
+ sideBarBackgroundImage: $,
3343
+ mainBackground: D,
3344
+ mainBorderRadius: B,
3345
+ mainBorderColor: T,
3346
+ sideBarItemBorderRadius: N,
3347
+ sideBarItemHorizontalGap: X,
3348
+ sideBarItemActiveBackground: he,
3349
+ sideBarCollapsedSubmenuWidth: Ie,
3350
+ sidebarActiveColor: j,
3351
+ maxKeepAliveTabs: ve = 10,
3352
+ sidebarVariant: Z = "legacy",
3353
+ sidebarShowSearch: ee = !1
3340
3354
  }) {
3341
3355
  return /* @__PURE__ */ r(
3342
3356
  Bt,
@@ -3346,10 +3360,11 @@ function Yn({
3346
3360
  user: o,
3347
3361
  owner: a,
3348
3362
  company: l,
3349
- enableSecurity: T,
3350
- securityOptions: ee,
3351
- onNavigationDataChange: k,
3352
- initialSidebarCollapsed: Ae,
3363
+ enableSecurity: C,
3364
+ securityOptions: _,
3365
+ securityFailMode: H,
3366
+ onNavigationDataChange: G,
3367
+ initialSidebarCollapsed: Ce,
3353
3368
  children: /* @__PURE__ */ r(
3354
3369
  Go,
3355
3370
  {
@@ -3362,48 +3377,48 @@ function Yn({
3362
3377
  sideBarWidth: i,
3363
3378
  sideBarCollapsedWidth: h,
3364
3379
  sideBarHiddenBreakPoint: c,
3365
- sideBarHeaderHeight: g,
3380
+ sideBarHeaderHeight: b,
3366
3381
  sideBarHeaderContent: f,
3367
3382
  sideBarFooterHeight: d,
3368
3383
  sideBarFooterContent: u,
3369
3384
  selectedGroupColor: x,
3370
- groupColor: I,
3371
- backgroundGroupColor: L,
3372
- groupLabelDarkColor: J,
3373
- groupLabelLightColor: V,
3385
+ groupColor: E,
3386
+ backgroundGroupColor: M,
3387
+ groupLabelDarkColor: V,
3388
+ groupLabelLightColor: U,
3374
3389
  onCollapsedSideBar: p,
3375
- onHiddenSidebar: v,
3376
- sidebarDefaultGroupIcon: b,
3377
- sidebarSelectedGroupName: m,
3390
+ onHiddenSidebar: y,
3391
+ sidebarDefaultGroupIcon: m,
3392
+ sidebarSelectedGroupName: g,
3378
3393
  headerColor: Y,
3379
- footerHeight: M,
3380
- iconsWithBackground: O,
3381
- menuItemHeight: D,
3382
- showSideBar: K,
3383
- showHeader: P,
3384
- headerStyle: y,
3385
- highlightActiveMenuItem: F,
3386
- enableSecurity: T,
3387
- customRenderSidebar: U,
3388
- showCollapsedButton: G,
3389
- sideBarBackgroundDarkColor: Ce,
3390
- sideBarBackgroundLightColor: se,
3391
- sideBarTextDarkColor: be,
3392
- sideBarTextLightColor: we,
3393
- sideBarIconDarkColor: Se,
3394
- sideBarIconLightColor: w,
3395
- sideBarBackgroundImage: S,
3396
- mainBackground: $,
3397
- mainBorderRadius: N,
3398
- mainBorderColor: B,
3399
- sideBarItemBorderRadius: E,
3400
- sideBarItemHorizontalGap: z,
3401
- sideBarItemActiveBackground: j,
3402
- sideBarCollapsedSubmenuWidth: he,
3403
- sidebarActiveColor: Ie,
3404
- maxKeepAliveTabs: q,
3405
- sidebarVariant: ve,
3406
- sidebarShowSearch: W,
3394
+ footerHeight: P,
3395
+ iconsWithBackground: F,
3396
+ menuItemHeight: z,
3397
+ showSideBar: Q,
3398
+ showHeader: O,
3399
+ headerStyle: v,
3400
+ highlightActiveMenuItem: L,
3401
+ enableSecurity: C,
3402
+ customRenderSidebar: I,
3403
+ showCollapsedButton: re,
3404
+ sideBarBackgroundDarkColor: se,
3405
+ sideBarBackgroundLightColor: be,
3406
+ sideBarTextDarkColor: we,
3407
+ sideBarTextLightColor: Se,
3408
+ sideBarIconDarkColor: S,
3409
+ sideBarIconLightColor: k,
3410
+ sideBarBackgroundImage: $,
3411
+ mainBackground: D,
3412
+ mainBorderRadius: B,
3413
+ mainBorderColor: T,
3414
+ sideBarItemBorderRadius: N,
3415
+ sideBarItemHorizontalGap: X,
3416
+ sideBarItemActiveBackground: he,
3417
+ sideBarCollapsedSubmenuWidth: Ie,
3418
+ sidebarActiveColor: j,
3419
+ maxKeepAliveTabs: ve,
3420
+ sidebarVariant: Z,
3421
+ sidebarShowSearch: ee,
3407
3422
  children: e
3408
3423
  }
3409
3424
  )
@@ -3447,9 +3462,9 @@ const Sr = Ne({
3447
3462
  throw new Error("useArchbaseNavigationContext deve ser usado dentro de um ArchbaseNavigationProvider");
3448
3463
  return A;
3449
3464
  }, jn = (A, t) => {
3450
- const o = kr(), { state: e, dispatch: n } = o, s = C((i) => {
3465
+ const o = kr(), { state: e, dispatch: n } = o, s = w((i) => {
3451
3466
  n({ type: "CLOSE_ALLOWED", link: A, payload: i });
3452
- }, [n, A]), a = Z(t);
3467
+ }, [n, A]), a = Ae(t);
3453
3468
  a.current = t, oe(() => {
3454
3469
  e && e.userCloseLinkRequest && e.userCloseLinkRequest === A && a.current();
3455
3470
  }, [e, A]);
@@ -3519,193 +3534,193 @@ function Xn({
3519
3534
  openedTabs: n = [],
3520
3535
  colors: s
3521
3536
  }) {
3522
- const [a, l] = xe.useTransition(), i = qe(), { colorScheme: h } = de(), [c, d] = ge(n), [u, p] = ge(e), v = Z(void 0), b = je(), m = Z([]);
3523
- Nt(m);
3524
- const g = kr(), { state: f, dispatch: x } = g, I = ye(rA), L = Mo(), { start: J, done: V } = wr(), Y = AA((w) => w.clearSnapshot), M = AA((w) => w.removeTab), O = Z(t), D = Z(o);
3537
+ const [a, l] = xe.useTransition(), i = qe(), { colorScheme: h } = de(), [c, d] = ge(n), [u, p] = ge(e), y = Ae(void 0), m = je(), g = Ae([]);
3538
+ Nt(g);
3539
+ const b = kr(), { state: f, dispatch: x } = b, E = ye(rA), M = Do(), { start: V, done: U } = wr(), Y = AA((S) => S.clearSnapshot), P = AA((S) => S.removeTab), F = Ae(t), z = Ae(o);
3525
3540
  oe(() => {
3526
- O.current = t, D.current = o;
3541
+ F.current = t, z.current = o;
3527
3542
  });
3528
- const K = Z(u);
3543
+ const Q = Ae(u);
3529
3544
  oe(() => {
3530
- v.current = K.current, K.current = u;
3545
+ y.current = Q.current, Q.current = u;
3531
3546
  }, [u]);
3532
- const P = Z(!1), y = C((w, S) => {
3533
- J(), L ? L.destroy(w) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks."), Y(w), M(w);
3534
- const $ = c.findIndex((j) => j.path === w);
3535
- let N = S?.redirectUrl;
3536
- !N && $ >= 0 && (N = c[$].redirect);
3537
- const B = c.filter((j) => j.id !== w);
3538
- let E = null;
3539
- if (v.current && v.current !== w) {
3540
- const j = B.find((he) => he.id === v.current);
3541
- j && (E = j.id);
3547
+ const O = Ae(!1), v = w((S, k) => {
3548
+ V(), M ? M.destroy(S) : console.error("[ArchbaseAdminTabContainer] keepAliveCache context not available. Tab cache cleanup will not occur. This may cause memory leaks."), Y(S), P(S);
3549
+ const $ = c.findIndex((X) => X.path === S);
3550
+ let D = k?.redirectUrl;
3551
+ !D && $ >= 0 && (D = c[$].redirect);
3552
+ const B = c.filter((X) => X.id !== S);
3553
+ let T = null;
3554
+ if (y.current && y.current !== S) {
3555
+ const X = B.find((he) => he.id === y.current);
3556
+ X && (T = X.id);
3542
3557
  }
3543
- if (!E) {
3544
- let j = -1;
3545
- B.forEach((he, Ie) => he.id === u && (j = Ie)), B.length > 0 && B[j] ? E = B[j].id : B.length > 0 && (E = B[B.length - 1].id);
3558
+ if (!T) {
3559
+ let X = -1;
3560
+ B.forEach((he, Ie) => he.id === u && (X = Ie)), B.length > 0 && B[X] ? T = B[X].id : B.length > 0 && (T = B[B.length - 1].id);
3546
3561
  }
3547
- const z = B.map((j) => ({
3548
- ...j,
3549
- active: E === j.id
3562
+ const N = B.map((X) => ({
3563
+ ...X,
3564
+ active: T === X.id
3550
3565
  }));
3551
- if (d(z), E && E != null)
3552
- p(E), i(N || E);
3566
+ if (d(N), T && T != null)
3567
+ p(T), i(D || T);
3553
3568
  else {
3554
- if (p(void 0), !I.navigationRootLink) {
3569
+ if (p(void 0), !E.navigationRootLink) {
3555
3570
  console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
3556
3571
  return;
3557
3572
  }
3558
- i(I.navigationRootLink);
3573
+ i(E.navigationRootLink);
3559
3574
  }
3560
- x({ type: "DONE", link: "" }), V();
3561
- }, [c, u, i, I.navigationRootLink, x, L, J, V, Y, M]);
3575
+ x({ type: "DONE", link: "" }), U();
3576
+ }, [c, u, i, E.navigationRootLink, x, M, V, U, Y, P]);
3562
3577
  oe(() => {
3563
- f?.linkClosed && y(f?.linkClosed, f?.payload);
3564
- }, [f?.linkClosed, f?.payload, y]);
3565
- const F = (w) => {
3566
- const S = {
3578
+ f?.linkClosed && v(f?.linkClosed, f?.payload);
3579
+ }, [f?.linkClosed, f?.payload, v]);
3580
+ const L = (S) => {
3581
+ const k = {
3567
3582
  item: void 0,
3568
3583
  title: void 0,
3569
- link: w,
3584
+ link: S,
3570
3585
  redirect: void 0,
3571
3586
  customTitle: void 0
3572
3587
  };
3573
3588
  return A.forEach(($) => {
3574
3589
  if ($.links)
3575
- $.links.forEach((N) => {
3576
- zA({ path: N.link || "" }, location.pathname) && (S.item = N, S.title = `${ne().t(N.label)}`, S.redirect = N.redirect, S.customTitle = N.customTitle);
3590
+ $.links.forEach((D) => {
3591
+ zA({ path: D.link || "" }, location.pathname) && (k.item = D, k.title = `${ne().t(D.label)}`, k.redirect = D.redirect, k.customTitle = D.customTitle);
3577
3592
  });
3578
- else if ($.link && !S.item) {
3579
- const N = zA({ path: $.link }, location.pathname);
3580
- N && (N.params && Object.keys(N.params).length > 0 ? S.title = `${N.params[Object.keys(N.params)[0]]}` : S.title = `${ne().t($.label)}`, S.item = $, S.redirect = $.redirect, S.customTitle = $.customTitle);
3593
+ else if ($.link && !k.item) {
3594
+ const D = zA({ path: $.link }, location.pathname);
3595
+ D && (D.params && Object.keys(D.params).length > 0 ? k.title = `${D.params[Object.keys(D.params)[0]]}` : k.title = `${ne().t($.label)}`, k.item = $, k.redirect = $.redirect, k.customTitle = $.customTitle);
3581
3596
  }
3582
- }), S.customTitle && (S.customTitle = S.customTitle.replace("$title", S.title)), S;
3597
+ }), k.customTitle && (k.customTitle = k.customTitle.replace("$title", k.title)), k;
3583
3598
  };
3584
3599
  oe(() => {
3585
- d(n), P.current = !0;
3600
+ d(n), O.current = !0;
3586
3601
  }, [JSON.stringify(n)]);
3587
- const T = Z(c), ee = Z(u);
3602
+ const C = Ae(c), _ = Ae(u);
3588
3603
  oe(() => {
3589
- if (P.current) {
3590
- P.current = !1, T.current = c, ee.current = u;
3604
+ if (O.current) {
3605
+ O.current = !1, C.current = c, _.current = u;
3591
3606
  return;
3592
3607
  }
3593
- const w = JSON.stringify(T.current) !== JSON.stringify(c), S = ee.current !== u;
3594
- if (w || S) {
3608
+ const S = JSON.stringify(C.current) !== JSON.stringify(c), k = _.current !== u;
3609
+ if (S || k) {
3595
3610
  const $ = setTimeout(() => {
3596
- O.current?.(c), D.current?.(u);
3611
+ F.current?.(c), z.current?.(u);
3597
3612
  }, 0);
3598
- return T.current = c, ee.current = u, () => clearTimeout($);
3613
+ return C.current = c, _.current = u, () => clearTimeout($);
3599
3614
  }
3600
3615
  }, [c, u]);
3601
- const U = Z("");
3616
+ const H = Ae("");
3602
3617
  oe(() => {
3603
- if (U.current === b.pathname)
3618
+ if (H.current === m.pathname)
3604
3619
  return;
3605
- U.current = b.pathname;
3606
- const w = F(b.pathname);
3607
- if (w && w.item) {
3608
- const S = c.findIndex(($) => $.path === w.link);
3609
- if (S !== -1) {
3610
- if (c[S].title !== w.title) {
3620
+ H.current = m.pathname;
3621
+ const S = L(m.pathname);
3622
+ if (S && S.item) {
3623
+ const k = c.findIndex(($) => $.path === S.link);
3624
+ if (k !== -1) {
3625
+ if (c[k].title !== S.title) {
3611
3626
  const $ = [...c];
3612
- $[S] = { ...$[S], title: w.title }, d($);
3627
+ $[k] = { ...$[k], title: S.title }, d($);
3613
3628
  }
3614
- p(c[S].id);
3629
+ p(c[k].id);
3615
3630
  } else {
3616
3631
  const $ = {
3617
- id: `${w.link}`,
3618
- title: `${w.title}`,
3619
- path: `${w.link}`,
3632
+ id: `${S.link}`,
3633
+ title: `${S.title}`,
3634
+ path: `${S.link}`,
3620
3635
  active: !0,
3621
- content: w.item.component,
3622
- iconClass: w.item.icon,
3636
+ content: S.item.component,
3637
+ iconClass: S.item.icon,
3623
3638
  closeButton: !0,
3624
- redirect: w.redirect,
3625
- customTitle: w.customTitle
3626
- }, N = [...c.map((B) => ({ ...B, active: !1 })), $];
3627
- d(N), p($.id);
3639
+ redirect: S.redirect,
3640
+ customTitle: S.customTitle
3641
+ }, D = [...c.map((B) => ({ ...B, active: !1 })), $];
3642
+ d(D), p($.id);
3628
3643
  }
3629
3644
  }
3630
- }, [b.pathname]);
3631
- const k = (w) => {
3632
- const S = c.filter(($) => $.id === w);
3633
- S && S.length > 0 && b.pathname !== S[0].path && (J(), i(S[0].path)), l(() => {
3634
- p(w), V();
3645
+ }, [m.pathname]);
3646
+ const I = (S) => {
3647
+ const k = c.filter(($) => $.id === S);
3648
+ k && k.length > 0 && m.pathname !== k[0].path && (V(), i(k[0].path)), l(() => {
3649
+ p(S), U();
3635
3650
  });
3636
- }, G = (w) => {
3651
+ }, G = (S) => {
3637
3652
  try {
3638
- J(), x({ type: "USER_CLOSE_REQUEST", link: w });
3639
- } catch (S) {
3640
- console.error("[TabContainer] Dispatch failed:", S), V();
3653
+ V(), x({ type: "USER_CLOSE_REQUEST", link: S });
3654
+ } catch (k) {
3655
+ console.error("[TabContainer] Dispatch failed:", k), U();
3641
3656
  }
3642
- }, Ae = C(() => {
3643
- if (L?.destroyAll(), c.forEach((w) => {
3644
- Y(w.id), M(w.id);
3645
- }), d([]), p(void 0), !I.navigationRootLink) {
3657
+ }, re = w(() => {
3658
+ if (M?.destroyAll(), c.forEach((S) => {
3659
+ Y(S.id), P(S.id);
3660
+ }), d([]), p(void 0), !E.navigationRootLink) {
3646
3661
  console.error("[ArchbaseAdminTabContainer] navigationRootLink is not configured. Cannot navigate to root.");
3647
3662
  return;
3648
3663
  }
3649
- i(I.navigationRootLink);
3650
- }, [i, I.navigationRootLink, L, c, Y, M]), Ce = C((w) => {
3651
- const S = c.findIndex((z) => z.id === w);
3652
- if (S <= 0)
3664
+ i(E.navigationRootLink);
3665
+ }, [i, E.navigationRootLink, M, c, Y, P]), Ce = w((S) => {
3666
+ const k = c.findIndex((N) => N.id === S);
3667
+ if (k <= 0)
3653
3668
  return;
3654
- c.slice(0, S).forEach((z) => {
3655
- L?.destroy(z.path), Y(z.id), M(z.id);
3669
+ c.slice(0, k).forEach((N) => {
3670
+ M?.destroy(N.path), Y(N.id), P(N.id);
3656
3671
  });
3657
- const N = c.slice(S), B = N.find((z) => z.id === u)?.id || N[0]?.id, E = N.map((z) => ({
3658
- ...z,
3659
- active: z.id === B
3672
+ const D = c.slice(k), B = D.find((N) => N.id === u)?.id || D[0]?.id, T = D.map((N) => ({
3673
+ ...N,
3674
+ active: N.id === B
3660
3675
  }));
3661
- if (d(E), B) {
3676
+ if (d(T), B) {
3662
3677
  p(B);
3663
- const z = E.find((j) => j.id === B);
3664
- z && b.pathname !== z.path && i(z.path);
3678
+ const N = T.find((X) => X.id === B);
3679
+ N && m.pathname !== N.path && i(N.path);
3665
3680
  }
3666
- }, [c, u, i, b.pathname, L, Y, M]), se = C((w) => {
3667
- const S = c.findIndex((z) => z.id === w);
3668
- if (S === -1 || S >= c.length - 1)
3681
+ }, [c, u, i, m.pathname, M, Y, P]), se = w((S) => {
3682
+ const k = c.findIndex((N) => N.id === S);
3683
+ if (k === -1 || k >= c.length - 1)
3669
3684
  return;
3670
- c.slice(S + 1).forEach((z) => {
3671
- L?.destroy(z.path), Y(z.id), M(z.id);
3685
+ c.slice(k + 1).forEach((N) => {
3686
+ M?.destroy(N.path), Y(N.id), P(N.id);
3672
3687
  });
3673
- const N = c.slice(0, S + 1), B = N.find((z) => z.id === u)?.id || N[N.length - 1]?.id, E = N.map((z) => ({
3674
- ...z,
3675
- active: z.id === B
3688
+ const D = c.slice(0, k + 1), B = D.find((N) => N.id === u)?.id || D[D.length - 1]?.id, T = D.map((N) => ({
3689
+ ...N,
3690
+ active: N.id === B
3676
3691
  }));
3677
- if (d(E), B) {
3692
+ if (d(T), B) {
3678
3693
  p(B);
3679
- const z = E.find((j) => j.id === B);
3680
- z && b.pathname !== z.path && i(z.path);
3694
+ const N = T.find((X) => X.id === B);
3695
+ N && m.pathname !== N.path && i(N.path);
3681
3696
  }
3682
- }, [c, u, i, b.pathname, L, Y, M]), be = C((w) => {
3683
- const S = c.find((N) => N.id === w);
3684
- if (!S)
3697
+ }, [c, u, i, m.pathname, M, Y, P]), be = w((S) => {
3698
+ const k = c.find((D) => D.id === S);
3699
+ if (!k)
3685
3700
  return;
3686
- L?.destroyOther(S.path), c.forEach((N) => {
3687
- N.id !== w && (Y(N.id), M(N.id));
3701
+ M?.destroyOther(k.path), c.forEach((D) => {
3702
+ D.id !== S && (Y(D.id), P(D.id));
3688
3703
  });
3689
- const $ = [{ ...S, active: !0 }];
3690
- d($), p(w), b.pathname !== S.path && i(S.path);
3691
- }, [c, i, b.pathname, L, Y, M]), we = f?.isClosing ? f?.userCloseLinkRequest : void 0;
3692
- return /* @__PURE__ */ r("div", { ref: m, children: /* @__PURE__ */ r(
3704
+ const $ = [{ ...k, active: !0 }];
3705
+ d($), p(S), m.pathname !== k.path && i(k.path);
3706
+ }, [c, i, m.pathname, M, Y, P]), we = f?.isClosing ? f?.userCloseLinkRequest : void 0;
3707
+ return /* @__PURE__ */ r("div", { ref: g, children: /* @__PURE__ */ r(
3693
3708
  zt,
3694
3709
  {
3695
3710
  buttonCloseOnlyActiveTab: !0,
3696
- onClick: (w) => k(w),
3697
- onTabClose: (w) => G(w),
3698
- onTabChange: (w) => null,
3699
- onCloseAllTabs: Ae,
3711
+ onClick: (S) => I(S),
3712
+ onTabClose: (S) => G(S),
3713
+ onTabChange: (S) => null,
3714
+ onCloseAllTabs: re,
3700
3715
  onCloseLeftTabs: Ce,
3701
3716
  onCloseRightTabs: se,
3702
3717
  onCloseOtherTabs: be,
3703
- currentTabs: ((w) => w.map((S) => ({
3704
- key: S.id,
3705
- favicon: S.iconClass,
3706
- title: S.title,
3707
- customTitle: S.customTitle,
3708
- closing: we === S.id
3718
+ currentTabs: ((S) => S.map((k) => ({
3719
+ key: k.id,
3720
+ favicon: k.iconClass,
3721
+ title: k.title,
3722
+ customTitle: k.customTitle,
3723
+ closing: we === k.id
3709
3724
  })))(c),
3710
3725
  activeTab: u,
3711
3726
  colors: s,
@@ -3845,7 +3860,7 @@ const nn = {
3845
3860
  avatarMaxOutputSizePx: 512
3846
3861
  };
3847
3862
  function Zn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n }) {
3848
- const s = zr(), a = Or(), l = At(), i = Qt(`myProfile${o}Store`), h = Kt(rt.User), c = { ...nn, ...n ?? {} }, { dataSource: d, isLoading: u, error: p, isError: v, clearError: b } = Ft({
3863
+ const s = zr(), a = Or(), l = At(), i = Qt(`myProfile${o}Store`), h = Kt(rt.User), c = { ...nn, ...n ?? {} }, { dataSource: d, isLoading: u, error: p, isError: y, clearError: m } = Ft({
3849
3864
  name: `dsUser${o}`,
3850
3865
  label: `${ne().t("archbase:My Profile")}`,
3851
3866
  service: h,
@@ -3854,21 +3869,21 @@ function Zn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n })
3854
3869
  loadOnStart: !0,
3855
3870
  validator: l,
3856
3871
  id: o,
3857
- onLoadComplete: (g) => {
3858
- g.isBrowsing() && g.edit(), a();
3872
+ onLoadComplete: (b) => {
3873
+ b.isBrowsing() && b.edit(), a();
3859
3874
  },
3860
- onDestroy: (g) => {
3875
+ onDestroy: (b) => {
3861
3876
  },
3862
- onError: (g, f) => {
3863
- const x = g instanceof Error ? g.message : typeof g == "string" ? g : JSON.stringify(g);
3877
+ onError: (b, f) => {
3878
+ const x = b instanceof Error ? b.message : typeof b == "string" ? b : JSON.stringify(b);
3864
3879
  Pt.showError(ne().t("archbase:WARNING"), x, f);
3865
3880
  }
3866
3881
  });
3867
3882
  oe(() => {
3868
3883
  A && d && d.isBrowsing() && d.edit();
3869
3884
  }, [d, A]);
3870
- const m = (g) => {
3871
- g && (console.log(g), e(g.name, g.avatar));
3885
+ const g = (b) => {
3886
+ b && (console.log(b), e(b.name, b.avatar));
3872
3887
  };
3873
3888
  return /* @__PURE__ */ r(
3874
3889
  Vt,
@@ -3880,9 +3895,9 @@ function Zn({ opened: A, handleClose: t, userId: o, updateUser: e, options: n })
3880
3895
  dataSource: d,
3881
3896
  onClickOk: t,
3882
3897
  onClickCancel: t,
3883
- onAfterSave: m,
3884
- children: /* @__PURE__ */ r(ze, { style: { height: "440px" }, ref: s, children: /* @__PURE__ */ R(_, { children: [
3885
- /* @__PURE__ */ r(_, { align: "center", children: /* @__PURE__ */ r(
3898
+ onAfterSave: g,
3899
+ children: /* @__PURE__ */ r(ze, { style: { height: "440px" }, ref: s, children: /* @__PURE__ */ R(W, { children: [
3900
+ /* @__PURE__ */ r(W, { align: "center", children: /* @__PURE__ */ r(
3886
3901
  Lt,
3887
3902
  {
3888
3903
  dataSource: d,
@@ -4030,7 +4045,7 @@ const es = ir((A) => ({
4030
4045
  tabId: A,
4031
4046
  children: t
4032
4047
  }) => {
4033
- const { getSnapshot: o, saveSnapshot: e } = AA(), n = Z(void 0);
4048
+ const { getSnapshot: o, saveSnapshot: e } = AA(), n = Ae(void 0);
4034
4049
  if (!n.current) {
4035
4050
  const s = o(A);
4036
4051
  n.current = sn(s);
@@ -4058,7 +4073,7 @@ function EA() {
4058
4073
  return ye(tA);
4059
4074
  }
4060
4075
  function oA(A, t) {
4061
- const o = EA(), e = Z({ resolved: !1, value: void 0 });
4076
+ const o = EA(), e = Ae({ resolved: !1, value: void 0 });
4062
4077
  e.current.resolved || (e.current = {
4063
4078
  resolved: !0,
4064
4079
  value: typeof t == "function" ? t() : t
@@ -4075,7 +4090,7 @@ function oA(A, t) {
4075
4090
  // getServerSnapshot
4076
4091
  () => {
4077
4092
  }
4078
- ), i = o ? l !== void 0 ? l : n : s, h = C((c) => {
4093
+ ), i = o ? l !== void 0 ? l : n : s, h = w((c) => {
4079
4094
  if (!o) {
4080
4095
  a(c);
4081
4096
  return;
@@ -4104,26 +4119,26 @@ function os(A, t) {
4104
4119
  const o = { ...an, ...t }, [e, n] = oA(
4105
4120
  `grid_${A}`,
4106
4121
  o
4107
- ), s = C((f) => {
4122
+ ), s = w((f) => {
4108
4123
  n((x) => ({ ...x, ...f }));
4109
- }, [n]), a = C((f) => s({ page: f }), [s]), l = C((f) => s({ pageSize: f, page: 0 }), [s]), i = C((f) => s({ sortModel: f }), [s]), h = C((f) => s({ filterModel: f, page: 0 }), [s]), c = C((f) => s({ selectedRowIds: f }), [s]), d = C((f) => {
4124
+ }, [n]), a = w((f) => s({ page: f }), [s]), l = w((f) => s({ pageSize: f, page: 0 }), [s]), i = w((f) => s({ sortModel: f }), [s]), h = w((f) => s({ filterModel: f, page: 0 }), [s]), c = w((f) => s({ selectedRowIds: f }), [s]), d = w((f) => {
4110
4125
  n((x) => ({
4111
4126
  ...x,
4112
- selectedRowIds: x.selectedRowIds.includes(f) ? x.selectedRowIds.filter((I) => I !== f) : [...x.selectedRowIds, f]
4127
+ selectedRowIds: x.selectedRowIds.includes(f) ? x.selectedRowIds.filter((E) => E !== f) : [...x.selectedRowIds, f]
4113
4128
  }));
4114
- }, [n]), u = C((f) => s({ selectedRowIds: f }), [s]), p = C(() => s({ selectedRowIds: [] }), [s]), v = C((f) => {
4129
+ }, [n]), u = w((f) => s({ selectedRowIds: f }), [s]), p = w(() => s({ selectedRowIds: [] }), [s]), y = w((f) => {
4115
4130
  n((x) => ({
4116
4131
  ...x,
4117
- expandedRowIds: x.expandedRowIds.includes(f) ? x.expandedRowIds.filter((I) => I !== f) : [...x.expandedRowIds, f]
4132
+ expandedRowIds: x.expandedRowIds.includes(f) ? x.expandedRowIds.filter((E) => E !== f) : [...x.expandedRowIds, f]
4118
4133
  }));
4119
- }, [n]), b = C(() => n(o), [n, o]), m = C((f) => e.selectedRowIds.includes(f), [e.selectedRowIds]), g = C((f) => e.expandedRowIds.includes(f), [e.expandedRowIds]);
4134
+ }, [n]), m = w(() => n(o), [n, o]), g = w((f) => e.selectedRowIds.includes(f), [e.selectedRowIds]), b = w((f) => e.expandedRowIds.includes(f), [e.expandedRowIds]);
4120
4135
  return {
4121
4136
  /** Estado completo do grid */
4122
4137
  state: e,
4123
4138
  /** Atualizar multiplos campos */
4124
4139
  update: s,
4125
4140
  /** Resetar para estado inicial */
4126
- reset: b,
4141
+ reset: m,
4127
4142
  // Paginacao
4128
4143
  setPage: a,
4129
4144
  setPageSize: l,
@@ -4135,14 +4150,14 @@ function os(A, t) {
4135
4150
  toggleRowSelection: d,
4136
4151
  selectAllRows: u,
4137
4152
  clearSelection: p,
4138
- isRowSelected: m,
4153
+ isRowSelected: g,
4139
4154
  /** Quantidade de linhas selecionadas */
4140
4155
  selectedCount: e.selectedRowIds.length,
4141
4156
  /** Se tem alguma linha selecionada */
4142
4157
  hasSelection: e.selectedRowIds.length > 0,
4143
4158
  // Expansao (master-detail)
4144
- toggleRowExpansion: v,
4145
- isRowExpanded: g
4159
+ toggleRowExpansion: y,
4160
+ isRowExpanded: b
4146
4161
  };
4147
4162
  }
4148
4163
  const UA = {
@@ -4154,42 +4169,42 @@ function ns(A, t = []) {
4154
4169
  const [o, e] = oA(
4155
4170
  `tree_${A}`,
4156
4171
  { ...UA, expandedNodeIds: t }
4157
- ), n = C((m) => {
4158
- e((g) => ({
4159
- ...g,
4160
- expandedNodeIds: g.expandedNodeIds.includes(m) ? g.expandedNodeIds.filter((f) => f !== m) : [...g.expandedNodeIds, m]
4172
+ ), n = w((g) => {
4173
+ e((b) => ({
4174
+ ...b,
4175
+ expandedNodeIds: b.expandedNodeIds.includes(g) ? b.expandedNodeIds.filter((f) => f !== g) : [...b.expandedNodeIds, g]
4161
4176
  }));
4162
- }, [e]), s = C((m) => {
4163
- e((g) => ({
4164
- ...g,
4165
- expandedNodeIds: g.expandedNodeIds.includes(m) ? g.expandedNodeIds : [...g.expandedNodeIds, m]
4177
+ }, [e]), s = w((g) => {
4178
+ e((b) => ({
4179
+ ...b,
4180
+ expandedNodeIds: b.expandedNodeIds.includes(g) ? b.expandedNodeIds : [...b.expandedNodeIds, g]
4166
4181
  }));
4167
- }, [e]), a = C((m) => {
4168
- e((g) => ({
4169
- ...g,
4170
- expandedNodeIds: g.expandedNodeIds.filter((f) => f !== m)
4182
+ }, [e]), a = w((g) => {
4183
+ e((b) => ({
4184
+ ...b,
4185
+ expandedNodeIds: b.expandedNodeIds.filter((f) => f !== g)
4171
4186
  }));
4172
- }, [e]), l = C((m) => {
4173
- e((g) => ({ ...g, expandedNodeIds: m }));
4174
- }, [e]), i = C(() => {
4175
- e((m) => ({ ...m, expandedNodeIds: [] }));
4176
- }, [e]), h = C((m) => {
4177
- e((g) => ({ ...g, selectedNodeIds: m }));
4178
- }, [e]), c = C((m) => {
4179
- e((g) => ({
4180
- ...g,
4181
- selectedNodeIds: g.selectedNodeIds.includes(m) ? g.selectedNodeIds.filter((f) => f !== m) : [...g.selectedNodeIds, m]
4187
+ }, [e]), l = w((g) => {
4188
+ e((b) => ({ ...b, expandedNodeIds: g }));
4189
+ }, [e]), i = w(() => {
4190
+ e((g) => ({ ...g, expandedNodeIds: [] }));
4191
+ }, [e]), h = w((g) => {
4192
+ e((b) => ({ ...b, selectedNodeIds: g }));
4193
+ }, [e]), c = w((g) => {
4194
+ e((b) => ({
4195
+ ...b,
4196
+ selectedNodeIds: b.selectedNodeIds.includes(g) ? b.selectedNodeIds.filter((f) => f !== g) : [...b.selectedNodeIds, g]
4182
4197
  }));
4183
- }, [e]), d = C(() => {
4184
- e((m) => ({ ...m, selectedNodeIds: [] }));
4185
- }, [e]), u = C((m) => {
4186
- e((g) => ({ ...g, focusedNodeId: m }));
4187
- }, [e]), p = C((m) => o.expandedNodeIds.includes(m), [o.expandedNodeIds]), v = C((m) => o.selectedNodeIds.includes(m), [o.selectedNodeIds]), b = C(() => {
4198
+ }, [e]), d = w(() => {
4199
+ e((g) => ({ ...g, selectedNodeIds: [] }));
4200
+ }, [e]), u = w((g) => {
4201
+ e((b) => ({ ...b, focusedNodeId: g }));
4202
+ }, [e]), p = w((g) => o.expandedNodeIds.includes(g), [o.expandedNodeIds]), y = w((g) => o.selectedNodeIds.includes(g), [o.selectedNodeIds]), m = w(() => {
4188
4203
  e({ ...UA, expandedNodeIds: t });
4189
4204
  }, [e, t]);
4190
4205
  return {
4191
4206
  state: o,
4192
- reset: b,
4207
+ reset: m,
4193
4208
  // Expansao
4194
4209
  toggleExpanded: n,
4195
4210
  expand: s,
@@ -4201,7 +4216,7 @@ function ns(A, t = []) {
4201
4216
  setSelected: h,
4202
4217
  toggleSelected: c,
4203
4218
  clearSelection: d,
4204
- isSelected: v,
4219
+ isSelected: y,
4205
4220
  selectedCount: o.selectedNodeIds.length,
4206
4221
  hasSelection: o.selectedNodeIds.length > 0,
4207
4222
  // Foco
@@ -4213,13 +4228,13 @@ function ss(A, t = [], o = !0) {
4213
4228
  const [e, n] = oA(
4214
4229
  `accordion_${A}`,
4215
4230
  t
4216
- ), s = C((d) => {
4231
+ ), s = w((d) => {
4217
4232
  n((u) => u.includes(d) ? u.filter((p) => p !== d) : o ? [...u, d] : [d]);
4218
- }, [n, o]), a = C((d) => {
4233
+ }, [n, o]), a = w((d) => {
4219
4234
  n((u) => u.includes(d) ? u : o ? [...u, d] : [d]);
4220
- }, [n, o]), l = C((d) => {
4235
+ }, [n, o]), l = w((d) => {
4221
4236
  n((u) => u.filter((p) => p !== d));
4222
- }, [n]), i = C(() => n([]), [n]), h = C((d) => e.includes(d), [e]), c = C((d) => {
4237
+ }, [n]), i = w(() => n([]), [n]), h = w((d) => e.includes(d), [e]), c = w((d) => {
4223
4238
  n(d === null ? [] : typeof d == "string" ? [d] : d);
4224
4239
  }, [n]);
4225
4240
  return {
@@ -4261,7 +4276,7 @@ function ls(A, t = {}) {
4261
4276
  }, [e, A, o]);
4262
4277
  }
4263
4278
  function as(A) {
4264
- const t = Xe(), o = AA((l) => l.activeTabId), e = t.pathname + t.search, n = o === e, s = Z(n), a = Z(!0);
4279
+ const t = Xe(), o = AA((l) => l.activeTabId), e = t.pathname + t.search, n = o === e, s = Ae(n), a = Ae(!0);
4265
4280
  return oe(() => {
4266
4281
  if (a.current) {
4267
4282
  a.current = !1, s.current = n;
@@ -4271,11 +4286,11 @@ function as(A) {
4271
4286
  }, [n, A]), n;
4272
4287
  }
4273
4288
  function is(A) {
4274
- const t = EA(), o = `drawer_${A}_open`, e = `drawer_${A}_data`, n = Z(!1), s = Z(null), a = t ? t.getState().customState[o] ?? !1 : n.current, l = t ? t.getState().customState[e] ?? null : s.current, i = C((d) => {
4289
+ const t = EA(), o = `drawer_${A}_open`, e = `drawer_${A}_data`, n = Ae(!1), s = Ae(null), a = t ? t.getState().customState[o] ?? !1 : n.current, l = t ? t.getState().customState[e] ?? null : s.current, i = w((d) => {
4275
4290
  t ? (d !== void 0 && t.getState().setCustomState(e, d), t.getState().setCustomState(o, !0)) : (d !== void 0 && (s.current = d), n.current = !0);
4276
- }, [t, o, e]), h = C(() => {
4291
+ }, [t, o, e]), h = w(() => {
4277
4292
  t ? t.getState().setCustomState(o, !1) : n.current = !1;
4278
- }, [t, o]), c = C(() => {
4293
+ }, [t, o]), c = w(() => {
4279
4294
  t ? (t.getState().setCustomState(o, !1), t.getState().clearCustomState(e)) : (n.current = !1, s.current = null);
4280
4295
  }, [t, o, e]);
4281
4296
  return {
@@ -4299,7 +4314,7 @@ const cs = ({
4299
4314
  };
4300
4315
  export {
4301
4316
  rA as ArchbaseAdminLayoutContext,
4302
- Dn as ArchbaseAdminLayoutFooter,
4317
+ Mn as ArchbaseAdminLayoutFooter,
4303
4318
  Nn as ArchbaseAdminLayoutHeader,
4304
4319
  Bt as ArchbaseAdminLayoutProvider,
4305
4320
  Yn as ArchbaseAdminMainLayout,
@@ -4312,19 +4327,19 @@ export {
4312
4327
  Wn as ArchbaseDrawerTrigger,
4313
4328
  qt as ArchbaseHeaderNavAction,
4314
4329
  eA as ArchbaseKeepAliveRoute,
4315
- po as ArchbaseMantineSidebar,
4330
+ fo as ArchbaseMantineSidebar,
4316
4331
  Zn as ArchbaseMyProfileModal,
4317
4332
  Sr as ArchbaseNavigationContext,
4318
4333
  qn as ArchbaseNavigationProvider,
4319
4334
  cs as ArchbaseStatefulRoutes,
4320
4335
  Xt as CommandPaletteButton,
4321
- Do as KeepAliveCacheProvider,
4336
+ Mo as KeepAliveCacheProvider,
4322
4337
  xA as MantineSidebarErrorMessage,
4323
4338
  so as MantineSidebarGroupsSkeleton,
4324
4339
  kA as MantineSidebarMenuSkeleton,
4325
4340
  uo as MinimalSidebar,
4326
4341
  Fo as NavigationProgressProvider,
4327
- fo as RailSidebar,
4342
+ po as RailSidebar,
4328
4343
  Kn as SidebarBadge,
4329
4344
  KA as SidebarErrorMessage,
4330
4345
  oo as SidebarGroup,
@@ -4358,7 +4373,7 @@ export {
4358
4373
  ts as useArchbaseStateNamed,
4359
4374
  as as useArchbaseTabActive,
4360
4375
  ns as useArchbaseTreeState,
4361
- Mo as useKeepAliveCache,
4376
+ Do as useKeepAliveCache,
4362
4377
  Bn as useKeepAliveVisibility,
4363
4378
  wr as useNavigationProgress,
4364
4379
  Hn as useParams,