@archbase/admin 4.12.0 → 4.13.1

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