@tailor-platform/app-shell 0.27.0 → 0.27.2

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/app-shell.js CHANGED
@@ -1,25 +1,24 @@
1
1
  import { jsx as a, jsxs as c, Fragment as S } from "react/jsx-runtime";
2
2
  import { capitalCase as D } from "change-case";
3
- import { useRouteError as ue, isRouteErrorResponse as we, redirect as he, Outlet as nt, NavLink as me, Navigate as fe, useRouteLoaderData as pe, createMemoryRouter as ge, createBrowserRouter as be, RouterProvider as xe, useHref as ve, Link as ye, useLocation as Y, Await as zt, useMatch as Ne, useNavigate as Se } from "react-router";
3
+ import { useRouteError as ue, isRouteErrorResponse as we, redirect as me, Outlet as nt, NavLink as he, Navigate as pe, useRouteLoaderData as fe, createMemoryRouter as ge, createBrowserRouter as be, RouterProvider as xe, useLocation as Y, Link as $, Await as zt, useMatch as ve, useNavigate as ye } from "react-router";
4
4
  import { Link as er, useLocation as ar, useNavigate as sr, useParams as rr, useRouteError as nr, useSearchParams as or } from "react-router";
5
- import { Slot as j } from "@radix-ui/react-slot";
6
5
  import { cva as ot } from "class-variance-authority";
7
- import { clsx as Ce } from "clsx";
8
- import { twMerge as Te } from "tailwind-merge";
9
- import { AlertCircle as yt, Table as ke, XIcon as _t, PanelLeftIcon as Re, ExternalLink as $t, ChevronRight as $, SunIcon as Pe, SearchIcon as Ae, Check as Ee, Copy as Me } from "lucide-react";
10
- import * as p from "react";
11
- import { createContext as X, useContext as L, useState as H, useMemo as M, useEffect as W, useSyncExternalStore as Wt, Suspense as it, useRef as Ft, useCallback as E } from "react";
12
- import { Toaster as Be, toast as De } from "sonner";
13
- import { parsePath as Le } from "@tailor-platform/app-shell-vite-plugin/parser";
14
- import * as Ie from "@radix-ui/react-separator";
15
- import * as v from "@radix-ui/react-dialog";
16
- import * as B from "@radix-ui/react-tooltip";
17
- import * as lt from "@radix-ui/react-collapsible";
18
- import { createAuthClient as ze } from "@tailor-platform/auth-public-client";
19
- function h(...t) {
20
- return Te(Ce(t));
21
- }
22
- const _e = ot(
6
+ import { useRender as j } from "@base-ui/react/use-render";
7
+ import { clsx as Ne } from "clsx";
8
+ import { twMerge as Se } from "tailwind-merge";
9
+ import { AlertCircle as yt, Table as Ce, XIcon as _t, PanelLeftIcon as Te, ExternalLink as $t, ChevronRight as W, SunIcon as ke, SearchIcon as Re, Check as Pe, Copy as Ae } from "lucide-react";
10
+ import * as f from "react";
11
+ import { createContext as X, useContext as L, useState as H, useMemo as B, useEffect as F, useSyncExternalStore as Wt, Suspense as it, useRef as Ft, useCallback as M } from "react";
12
+ import { Toaster as Ee, toast as Me } from "sonner";
13
+ import { parsePath as Be } from "@tailor-platform/app-shell-vite-plugin/parser";
14
+ import { Dialog as v } from "@base-ui/react/dialog";
15
+ import { Tooltip as A } from "@base-ui/react/tooltip";
16
+ import { Collapsible as lt } from "@base-ui/react/collapsible";
17
+ import { createAuthClient as De } from "@tailor-platform/auth-public-client";
18
+ function m(...t) {
19
+ return Se(Ne(t));
20
+ }
21
+ const Le = ot(
23
22
  "astw:inline-flex astw:items-center astw:justify-center astw:gap-2 astw:whitespace-nowrap astw:rounded-md astw:text-sm astw:font-medium astw:transition-all astw:disabled:pointer-events-none astw:disabled:opacity-50 astw:[&_svg]:pointer-events-none astw:[&_svg:not([class*='size-'])]:size-4 astw:shrink-0 astw:[&_svg]:shrink-0 astw:outline-none astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px] astw:aria-invalid:ring-destructive/20 astw:dark:aria-invalid:ring-destructive/40 astw:aria-invalid:border-destructive",
24
23
  {
25
24
  variants: {
@@ -44,23 +43,26 @@ const _e = ot(
44
43
  }
45
44
  }
46
45
  );
47
- function F({
46
+ function O({
48
47
  className: t,
49
48
  variant: e,
50
49
  size: s,
51
- asChild: r = !1,
52
- ...n
50
+ render: r,
51
+ children: n,
52
+ ...o
53
53
  }) {
54
- return /* @__PURE__ */ a(
55
- r ? j : "button",
56
- {
54
+ return j({
55
+ defaultTagName: "button",
56
+ render: r,
57
+ props: {
57
58
  "data-slot": "button",
58
- className: h(_e({ variant: e, size: s, className: t })),
59
- ...n
59
+ className: m(Le({ variant: e, size: s, className: t })),
60
+ children: n,
61
+ ...o
60
62
  }
61
- );
63
+ });
62
64
  }
63
- const G = "en", $e = () => {
65
+ const G = "en", Ie = () => {
64
66
  try {
65
67
  if (typeof navigator > "u")
66
68
  return G;
@@ -72,12 +74,12 @@ const G = "en", $e = () => {
72
74
  }, U = (t) => (e, s) => e ? typeof e == "string" ? e : e(t) ?? s : s, Ot = (t) => {
73
75
  const e = U(t);
74
76
  return (s, r) => e(s, typeof s == "string" ? s : D(r));
75
- }, We = (t) => ({
77
+ }, ze = (t) => ({
76
78
  modules: t.modules,
77
79
  settingsResources: t.settingsResources ?? [],
78
80
  errorBoundary: t.errorBoundary ?? /* @__PURE__ */ a(_, {}),
79
81
  basePath: t.basePath,
80
- locale: t.locale ?? $e()
82
+ locale: t.locale ?? Ie()
81
83
  }), ct = X({
82
84
  configurations: {
83
85
  modules: [],
@@ -99,10 +101,10 @@ const G = "en", $e = () => {
99
101
  ...t,
100
102
  ...e
101
103
  };
102
- }, Fe = () => {
104
+ }, _e = () => {
103
105
  const { configurations: t } = C(), e = U(t.locale);
104
106
  return (s, r) => e(s, r);
105
- }, Oe = (t) => {
107
+ }, $e = (t) => {
106
108
  const e = (s) => (r) => t[s]?.[r] ?? t.en[r];
107
109
  return {
108
110
  /**
@@ -161,7 +163,7 @@ const G = "en", $e = () => {
161
163
  return typeof o == "function" ? o(r[0]) : o;
162
164
  }
163
165
  };
164
- }, je = Oe({
166
+ }, We = $e({
165
167
  en: {
166
168
  error404Title: "404 Not Found",
167
169
  error404Body: "The page you requested could not be found.",
@@ -200,8 +202,8 @@ const G = "en", $e = () => {
200
202
  commandPaletteSearch: "ページを検索...",
201
203
  commandPaletteNoResults: "結果が見つかりません"
202
204
  }
203
- }), A = je.useT, _ = () => {
204
- const t = ue(), e = A(), s = {
205
+ }), E = We.useT, _ = () => {
206
+ const t = ue(), e = E(), s = {
205
207
  role: "alert",
206
208
  "aria-label": "default-error-boundary"
207
209
  };
@@ -212,7 +214,7 @@ const G = "en", $e = () => {
212
214
  /* @__PURE__ */ a("h1", { className: "astw:font-semibold astw:text-lg", children: e("error404Title") }),
213
215
  /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground astw:mt-1", children: e("error404Body") }),
214
216
  /* @__PURE__ */ a(
215
- F,
217
+ O,
216
218
  {
217
219
  variant: "outline",
218
220
  size: "sm",
@@ -230,7 +232,7 @@ const G = "en", $e = () => {
230
232
  /* @__PURE__ */ a("h1", { className: "astw:font-semibold astw:text-lg", children: e("errorTitle") }),
231
233
  /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground astw:mt-1", children: r }),
232
234
  /* @__PURE__ */ a(
233
- F,
235
+ O,
234
236
  {
235
237
  variant: "outline",
236
238
  size: "sm",
@@ -243,7 +245,7 @@ const G = "en", $e = () => {
243
245
  ] }) });
244
246
  };
245
247
  let Ut = {};
246
- const Ue = (t) => {
248
+ const Fe = (t) => {
247
249
  Ut = t;
248
250
  }, Is = () => ({ type: "pass" }), zs = () => ({ type: "hidden" }), _s = (t) => ({
249
251
  type: "redirect",
@@ -265,7 +267,7 @@ const Ue = (t) => {
265
267
  case "hidden":
266
268
  throw Kt();
267
269
  case "redirect":
268
- return he(r.to);
270
+ return me(r.to);
269
271
  case "pass":
270
272
  return e ? e(s) : null;
271
273
  }
@@ -281,7 +283,7 @@ function $s(t) {
281
283
  );
282
284
  const w = i && i.length > 0 ? Vt(i) : void 0, d = r ? Ht(
283
285
  { metaTitle: l, fallbackTitle: u },
284
- (m) => r({ title: m, resources: n })
286
+ (h) => r({ title: h, resources: n })
285
287
  ) : void 0;
286
288
  return {
287
289
  path: e,
@@ -322,22 +324,22 @@ function Ws(t) {
322
324
  loader: w
323
325
  };
324
326
  }
325
- const Ke = () => {
326
- const t = A();
327
+ const Oe = () => {
328
+ const t = E();
327
329
  return /* @__PURE__ */ c(S, { children: [
328
330
  /* @__PURE__ */ a("p", { className: "astw:font-semibold astw:leading-none astw:tracking-tight", children: t("welcomeTitle") }),
329
331
  /* @__PURE__ */ a("p", { className: "pt-4", children: t("welcomeBody") })
330
332
  ] });
331
333
  }, Nt = () => /* @__PURE__ */ c(S, { children: [
332
334
  /* @__PURE__ */ a(nt, {}),
333
- /* @__PURE__ */ a(Be, {})
334
- ] }), Ve = () => {
335
- const { configurations: t } = jt(), e = A(), s = Fe();
335
+ /* @__PURE__ */ a(Ee, {})
336
+ ] }), je = () => {
337
+ const { configurations: t } = jt(), e = E(), s = _e();
336
338
  return /* @__PURE__ */ c("div", { className: "astw:mx-auto astw:flex-col astw:flex astw:md:flex-row astw:max-w-5xl astw:gap-[10px] astw:w-full", children: [
337
339
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ c("nav", { className: "astw:bg-card astw:md:w-xs astw:rounded-md astw:border astw:p-3 astw:shadow-xs", children: [
338
340
  /* @__PURE__ */ a("h2", { className: "astw:text-sm astw:leading-[36px] astw:mb-2 astw:font-bold ", children: e("settings") }),
339
- /* @__PURE__ */ a("ul", { className: "astw:flex astw:flex-col astw:gap-1", children: t.settingsResources.map((r) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(me, { to: `./${r.path}`, children: ({ isActive: n }) => /* @__PURE__ */ c(
340
- F,
341
+ /* @__PURE__ */ a("ul", { className: "astw:flex astw:flex-col astw:gap-1", children: t.settingsResources.map((r) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(he, { to: `./${r.path}`, children: ({ isActive: n }) => /* @__PURE__ */ c(
342
+ O,
341
343
  {
342
344
  variant: n ? "secondary" : "ghost",
343
345
  className: "astw:w-full astw:justify-start",
@@ -372,22 +374,22 @@ const Ke = () => {
372
374
  children: [n]
373
375
  } : {}
374
376
  };
375
- }, He = (t) => t.map(
377
+ }, Ue = (t) => t.map(
376
378
  (e) => Gt(e, e.resources, e.errorBoundary)
377
- ), Ge = ({
379
+ ), Ke = ({
378
380
  modules: t,
379
381
  settingsResources: e,
380
382
  rootComponent: s
381
383
  }) => {
382
384
  const r = {
383
385
  index: !0,
384
- Component: s ?? Ke
386
+ Component: s ?? Oe
385
387
  }, n = e.length > 0 ? [
386
388
  {
387
389
  path: "settings",
388
390
  index: !0,
389
391
  Component: () => /* @__PURE__ */ a(
390
- fe,
392
+ pe,
391
393
  {
392
394
  to: e[0].path,
393
395
  relative: "path",
@@ -397,7 +399,7 @@ const Ke = () => {
397
399
  },
398
400
  {
399
401
  path: "settings",
400
- Component: Ve,
402
+ Component: je,
401
403
  children: e.map((o) => ({
402
404
  path: o.path,
403
405
  Component: o.component,
@@ -410,7 +412,7 @@ const Ke = () => {
410
412
  return [
411
413
  r,
412
414
  {
413
- children: He(t)
415
+ children: Ue(t)
414
416
  },
415
417
  ...n,
416
418
  {
@@ -424,10 +426,10 @@ const Ke = () => {
424
426
  ErrorBoundary: _
425
427
  }
426
428
  ];
427
- }, qt = "appshell-root-nav", qe = (t) => ({
429
+ }, qt = "appshell-root-nav", Ve = (t) => ({
428
430
  loaderID: qt,
429
- loader: async () => ({ navItems: Qe(t) })
430
- }), Qt = () => pe(qt)?.navItems, Qe = async (t) => {
431
+ loader: async () => ({ navItems: He(t) })
432
+ }), Qt = () => fe(qt)?.navItems, He = async (t) => {
431
433
  const e = Ot(t.locale);
432
434
  return (await Promise.all(
433
435
  t.modules.map(async (r) => {
@@ -442,7 +444,7 @@ const Ke = () => {
442
444
  )).filter((r) => r !== null).map(({ module: r, resources: n }) => ({
443
445
  title: e(r.meta.title, r.path),
444
446
  url: r.meta.menuItemClickable ? r.path : void 0,
445
- icon: r.meta.icon || /* @__PURE__ */ a(ke, {}),
447
+ icon: r.meta.icon || /* @__PURE__ */ a(Ce, {}),
446
448
  items: n
447
449
  }));
448
450
  }, Yt = async (t, e, s) => (await Promise.all(
@@ -459,12 +461,12 @@ const Ke = () => {
459
461
  items: u && u.length > 0 ? u : void 0
460
462
  };
461
463
  })
462
- )).filter((n) => n !== null), Ye = (t) => {
463
- const { configurations: e } = C(), { rootComponent: s, children: r } = t, n = Ge({
464
+ )).filter((n) => n !== null), Ge = (t) => {
465
+ const { configurations: e } = C(), { rootComponent: s, children: r } = t, n = Ke({
464
466
  modules: e.modules,
465
467
  settingsResources: e.settingsResources,
466
468
  rootComponent: s
467
- }), o = e.errorBoundary, { loaderID: i, loader: l } = qe({
469
+ }), o = e.errorBoundary, { loaderID: i, loader: l } = Ve({
468
470
  modules: e.modules,
469
471
  locale: e.locale
470
472
  }), u = [
@@ -492,12 +494,12 @@ const Ke = () => {
492
494
  basename: w
493
495
  });
494
496
  return /* @__PURE__ */ a(xe, { router: d });
495
- }, Xe = {
497
+ }, qe = {
496
498
  resolvedTheme: "light",
497
499
  theme: "system",
498
500
  setTheme: () => null
499
- }, Xt = X(Xe);
500
- function Ze({
501
+ }, Xt = X(qe);
502
+ function Qe({
501
503
  children: t,
502
504
  storageKey: e,
503
505
  defaultTheme: s = "system",
@@ -505,8 +507,8 @@ function Ze({
505
507
  }) {
506
508
  const [n, o] = H(
507
509
  () => localStorage.getItem(e) || s
508
- ), i = M(() => n !== "system" ? n : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", [n]);
509
- W(() => {
510
+ ), i = B(() => n !== "system" ? n : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", [n]);
511
+ F(() => {
510
512
  const u = window.document.documentElement;
511
513
  u.classList.remove("light", "dark"), u.classList.add(i);
512
514
  }, [i]);
@@ -519,21 +521,21 @@ function Ze({
519
521
  };
520
522
  return /* @__PURE__ */ a(Xt.Provider, { ...r, value: l, children: t });
521
523
  }
522
- const Je = () => {
524
+ const Ye = () => {
523
525
  const t = L(Xt);
524
526
  if (t === void 0)
525
527
  throw new Error("useTheme must be used within a ThemeProvider");
526
528
  return t;
527
- }, ta = () => () => {
528
- }, ea = () => !0, aa = () => !1;
529
- function sa() {
529
+ }, Xe = () => () => {
530
+ }, Ze = () => !0, Je = () => !1;
531
+ function ta() {
530
532
  return Wt(
531
- ta,
532
- ea,
533
- aa
533
+ Xe,
534
+ Ze,
535
+ Je
534
536
  );
535
537
  }
536
- function ra(t) {
538
+ function ea(t) {
537
539
  const e = {
538
540
  path: "",
539
541
  fullPath: "",
@@ -541,7 +543,7 @@ function ra(t) {
541
543
  children: /* @__PURE__ */ new Map()
542
544
  };
543
545
  for (const s of t) {
544
- const r = Le(s.path);
546
+ const r = Be(s.path);
545
547
  let n = e, o = "";
546
548
  for (const i of r)
547
549
  i.type !== "group" && (o = o ? `${o}/${i.converted}` : i.converted, n.children.has(i.converted) || n.children.set(i.converted, {
@@ -601,10 +603,10 @@ function St(t) {
601
603
  loader: n
602
604
  };
603
605
  }
604
- function na(t) {
606
+ function aa(t) {
605
607
  if (t.length === 0)
606
608
  return [];
607
- const e = ra(t), s = [];
609
+ const e = ea(t), s = [];
608
610
  if (e.component) {
609
611
  const r = St({
610
612
  ...e,
@@ -619,10 +621,10 @@ function na(t) {
619
621
  return s;
620
622
  }
621
623
  const te = (t) => {
622
- const e = sa(), s = t.contextData ?? {};
623
- Ue(s);
624
- const r = t.modules, n = M(
625
- () => r ? We({
624
+ const e = ta(), s = t.contextData ?? {};
625
+ Fe(s);
626
+ const r = t.modules, n = B(
627
+ () => r ? ze({
626
628
  modules: r,
627
629
  settingsResources: t.settingsResources,
628
630
  basePath: t.basePath,
@@ -636,10 +638,10 @@ const te = (t) => {
636
638
  t.errorBoundary,
637
639
  t.locale
638
640
  ]
639
- ), o = M(
641
+ ), o = B(
640
642
  () => n ? { title: t.title, icon: t.icon, configurations: n } : null,
641
643
  [t.title, t.icon, n]
642
- ), i = M(
644
+ ), i = B(
643
645
  () => ({ contextData: t.contextData ?? {} }),
644
646
  [t.contextData]
645
647
  );
@@ -650,10 +652,10 @@ const te = (t) => {
650
652
  /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground", children: l })
651
653
  ] }) });
652
654
  }
653
- return e ? /* @__PURE__ */ a(ct.Provider, { value: o, children: /* @__PURE__ */ a(dt.Provider, { value: i, children: /* @__PURE__ */ a(Ze, { defaultTheme: "system", storageKey: "appshell-ui-theme", children: /* @__PURE__ */ a(Ye, { rootComponent: t.rootComponent, children: t.children }) }) }) }) : null;
655
+ return e ? /* @__PURE__ */ a(ct.Provider, { value: o, children: /* @__PURE__ */ a(dt.Provider, { value: i, children: /* @__PURE__ */ a(Qe, { defaultTheme: "system", storageKey: "appshell-ui-theme", children: /* @__PURE__ */ a(Ge, { rootComponent: t.rootComponent, children: t.children }) }) }) }) : null;
654
656
  };
655
- function oa(t) {
656
- const e = na(t), s = e.find((o) => o.path === ""), r = e.filter((o) => o.path !== "");
657
+ function sa(t) {
658
+ const e = aa(t), s = e.find((o) => o.path === ""), r = e.filter((o) => o.path !== "");
657
659
  return (o) => /* @__PURE__ */ a(
658
660
  te,
659
661
  {
@@ -663,13 +665,13 @@ function oa(t) {
663
665
  }
664
666
  );
665
667
  }
666
- te.WithPages = oa;
668
+ te.WithPages = sa;
667
669
  const J = 768;
668
- function ia() {
669
- const [t, e] = p.useState(
670
+ function ra() {
671
+ const [t, e] = f.useState(
670
672
  void 0
671
673
  );
672
- return p.useEffect(() => {
674
+ return f.useEffect(() => {
673
675
  const s = window.matchMedia(`(max-width: ${J - 1}px)`), r = () => {
674
676
  e(window.innerWidth < J);
675
677
  };
@@ -677,11 +679,11 @@ function ia() {
677
679
  }, []), !!t;
678
680
  }
679
681
  const tt = 768, et = 1199;
680
- function la() {
681
- const [t, e] = p.useState(
682
+ function na() {
683
+ const [t, e] = f.useState(
682
684
  void 0
683
685
  );
684
- return p.useEffect(() => {
686
+ return f.useEffect(() => {
685
687
  const s = window.matchMedia(
686
688
  `(min-width: ${tt}px) and (max-width: ${et}px)`
687
689
  ), r = () => {
@@ -694,13 +696,13 @@ function la() {
694
696
  ), () => s.removeEventListener("change", r);
695
697
  }, []), !!t;
696
698
  }
697
- function ca({ className: t, type: e, ...s }) {
699
+ function oa({ className: t, type: e, ...s }) {
698
700
  return /* @__PURE__ */ a(
699
701
  "input",
700
702
  {
701
703
  type: e,
702
704
  "data-slot": "input",
703
- className: h(
705
+ className: m(
704
706
  "astw:file:text-foreground astw:placeholder:text-muted-foreground astw:selection:bg-primary astw:selection:text-primary-foreground astw:dark:bg-input/30 astw:border-input astw:flex astw:h-9 astw:w-full astw:min-w-0 astw:rounded-md astw:border astw:bg-transparent astw:px-3 astw:py-1 astw:text-base astw:shadow-xs astw:transition-[color,box-shadow] astw:outline-none astw:file:inline-flex astw:file:h-7 astw:file:border-0 astw:file:bg-transparent astw:file:text-sm astw:file:font-medium astw:disabled:pointer-events-none astw:disabled:cursor-not-allowed astw:disabled:opacity-50 astw:md:text-sm",
705
707
  "astw:focus-visible:border-ring astw:focus-visible:ring-ring/50 astw:focus-visible:ring-[3px]",
706
708
  "astw:aria-invalid:ring-destructive/20 astw:dark:aria-invalid:ring-destructive/40 astw:aria-invalid:border-destructive",
@@ -710,20 +712,22 @@ function ca({ className: t, type: e, ...s }) {
710
712
  }
711
713
  );
712
714
  }
713
- function da({
715
+ function ia({
714
716
  className: t,
715
717
  orientation: e = "horizontal",
716
718
  decorative: s = !0,
717
719
  ...r
718
720
  }) {
719
721
  return /* @__PURE__ */ a(
720
- Ie.Root,
722
+ "div",
721
723
  {
722
724
  "data-slot": "separator-root",
723
- decorative: s,
724
- orientation: e,
725
- className: h(
726
- "astw:bg-border astw:shrink-0 astw:data-[orientation=horizontal]:h-px astw:data-[orientation=horizontal]:w-full astw:data-[orientation=vertical]:h-full astw:data-[orientation=vertical]:w-px",
725
+ role: s ? "none" : "separator",
726
+ "aria-orientation": s ? void 0 : e,
727
+ "data-orientation": e,
728
+ className: m(
729
+ "astw:bg-border astw:shrink-0",
730
+ e === "horizontal" ? "astw:h-px astw:w-full" : "astw:h-full astw:w-px",
727
731
  t
728
732
  ),
729
733
  ...r
@@ -733,21 +737,21 @@ function da({
733
737
  function Ct({ ...t }) {
734
738
  return /* @__PURE__ */ a(v.Root, { "data-slot": "sheet", ...t });
735
739
  }
736
- function ua({
740
+ function la({
737
741
  ...t
738
742
  }) {
739
743
  return /* @__PURE__ */ a(v.Portal, { "data-slot": "sheet-portal", ...t });
740
744
  }
741
- function wa({
745
+ function ca({
742
746
  className: t,
743
747
  ...e
744
748
  }) {
745
749
  return /* @__PURE__ */ a(
746
- v.Overlay,
750
+ v.Backdrop,
747
751
  {
748
752
  "data-slot": "sheet-overlay",
749
- className: h(
750
- "astw:data-[state=open]:animate-in astw:data-[state=closed]:animate-out astw:data-[state=closed]:fade-out-0 astw:data-[state=open]:fade-in-0 astw:fixed astw:inset-0 astw:z-50 astw:bg-black/50",
753
+ className: m(
754
+ "astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:fixed astw:inset-0 astw:z-50 astw:bg-black/50",
751
755
  t
752
756
  ),
753
757
  ...e
@@ -760,24 +764,24 @@ function Tt({
760
764
  side: s = "right",
761
765
  ...r
762
766
  }) {
763
- return /* @__PURE__ */ c(ua, { children: [
764
- /* @__PURE__ */ a(wa, {}),
767
+ return /* @__PURE__ */ c(la, { children: [
768
+ /* @__PURE__ */ a(ca, {}),
765
769
  /* @__PURE__ */ c(
766
- v.Content,
770
+ v.Popup,
767
771
  {
768
772
  "data-slot": "sheet-content",
769
- className: h(
770
- "astw:bg-background astw:data-[state=open]:animate-in astw:data-[state=closed]:animate-out astw:fixed astw:z-50 astw:flex astw:flex-col astw:gap-4 astw:shadow-lg astw:transition astw:ease-in-out astw:data-[state=closed]:duration-300 astw:data-[state=open]:duration-500",
771
- s === "right" && "astw:data-[state=closed]:slide-out-to-right astw:data-[state=open]:slide-in-from-right astw:inset-y-0 astw:right-0 astw:h-full astw:w-3/4 astw:border-l astw:sm:max-w-sm",
772
- s === "left" && "astw:data-[state=closed]:slide-out-to-left astw:data-[state=open]:slide-in-from-left astw:inset-y-0 astw:left-0 astw:h-full astw:w-3/4 astw:border-r astw:sm:max-w-sm",
773
- s === "top" && "astw:data-[state=closed]:slide-out-to-top astw:data-[state=open]:slide-in-from-top astw:inset-x-0 astw:top-0 astw:h-auto astw:border-b",
774
- s === "bottom" && "astw:data-[state=closed]:slide-out-to-bottom astw:data-[state=open]:slide-in-from-bottom astw:inset-x-0 astw:bottom-0 astw:h-auto astw:border-t",
773
+ className: m(
774
+ "astw:bg-background astw:data-open:animate-in astw:data-ending-style:animate-out astw:fixed astw:z-50 astw:flex astw:flex-col astw:gap-4 astw:shadow-lg astw:transition astw:ease-in-out astw:data-ending-style:duration-300 astw:data-open:duration-500",
775
+ s === "right" && "astw:data-ending-style:slide-out-to-right astw:data-open:slide-in-from-right astw:inset-y-0 astw:right-0 astw:h-full astw:w-3/4 astw:border-l astw:sm:max-w-sm",
776
+ s === "left" && "astw:data-ending-style:slide-out-to-left astw:data-open:slide-in-from-left astw:inset-y-0 astw:left-0 astw:h-full astw:w-3/4 astw:border-r astw:sm:max-w-sm",
777
+ s === "top" && "astw:data-ending-style:slide-out-to-top astw:data-open:slide-in-from-top astw:inset-x-0 astw:top-0 astw:h-auto astw:border-b",
778
+ s === "bottom" && "astw:data-ending-style:slide-out-to-bottom astw:data-open:slide-in-from-bottom astw:inset-x-0 astw:bottom-0 astw:h-auto astw:border-t",
775
779
  t
776
780
  ),
777
781
  ...r,
778
782
  children: [
779
783
  e,
780
- /* @__PURE__ */ c(v.Close, { className: "astw:ring-offset-bg astw:focus:ring-ring astw:data-[state=open]:bg-secondary astw:absolute astw:top-4 astw:right-4 astw:rounded-xs astw:opacity-70 astw:transition-opacity astw:hover:opacity-100 astw:focus:ring-2 astw:focus:ring-offset-2 astw:focus:outline-hidden astw:disabled:pointer-events-none", children: [
784
+ /* @__PURE__ */ c(v.Close, { className: "astw:ring-offset-bg astw:focus:ring-ring astw:data-open:bg-secondary astw:absolute astw:top-4 astw:right-4 astw:rounded-xs astw:opacity-70 astw:transition-opacity astw:hover:opacity-100 astw:focus:ring-2 astw:focus:ring-offset-2 astw:focus:outline-hidden astw:disabled:pointer-events-none", children: [
781
785
  /* @__PURE__ */ a(_t, { className: "astw:size-4" }),
782
786
  /* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Close" })
783
787
  ] })
@@ -791,7 +795,7 @@ function kt({ className: t, ...e }) {
791
795
  "div",
792
796
  {
793
797
  "data-slot": "sheet-header",
794
- className: h("astw:flex astw:flex-col astw:gap-1.5 astw:p-4", t),
798
+ className: m("astw:flex astw:flex-col astw:gap-1.5 astw:p-4", t),
795
799
  ...e
796
800
  }
797
801
  );
@@ -804,7 +808,7 @@ function Rt({
804
808
  v.Title,
805
809
  {
806
810
  "data-slot": "sheet-title",
807
- className: h("astw:text-foreground astw:font-semibold", t),
811
+ className: m("astw:text-foreground astw:font-semibold", t),
808
812
  ...e
809
813
  }
810
814
  );
@@ -817,65 +821,66 @@ function Pt({
817
821
  v.Description,
818
822
  {
819
823
  "data-slot": "sheet-description",
820
- className: h("astw:text-muted-foreground astw:text-sm", t),
824
+ className: m("astw:text-muted-foreground astw:text-sm", t),
821
825
  ...e
822
826
  }
823
827
  );
824
828
  }
825
- function ht({
829
+ function mt({
826
830
  delayDuration: t = 0,
827
- ...e
831
+ children: e,
832
+ ...s
828
833
  }) {
829
834
  return /* @__PURE__ */ a(
830
- B.Provider,
835
+ A.Provider,
831
836
  {
832
837
  "data-slot": "tooltip-provider",
833
- delayDuration: t,
834
- ...e
838
+ delay: t,
839
+ ...s,
840
+ children: e
835
841
  }
836
842
  );
837
843
  }
838
- function mt({
839
- ...t
840
- }) {
841
- return /* @__PURE__ */ a(ht, { children: /* @__PURE__ */ a(B.Root, { "data-slot": "tooltip", ...t }) });
844
+ function ht({ children: t, ...e }) {
845
+ return /* @__PURE__ */ a(mt, { children: /* @__PURE__ */ a(A.Root, { "data-slot": "tooltip", ...e, children: t }) });
842
846
  }
843
- function ft({
847
+ function pt({
844
848
  ...t
845
849
  }) {
846
- return /* @__PURE__ */ a(B.Trigger, { "data-slot": "tooltip-trigger", ...t });
850
+ return /* @__PURE__ */ a(A.Trigger, { "data-slot": "tooltip-trigger", ...t });
847
851
  }
848
- function pt({
852
+ function ft({
849
853
  className: t,
850
854
  sideOffset: e = 0,
851
- children: s,
852
- ...r
855
+ side: s = "top",
856
+ align: r = "center",
857
+ children: n,
858
+ ...o
853
859
  }) {
854
- return /* @__PURE__ */ a(B.Portal, { children: /* @__PURE__ */ c(
855
- B.Content,
860
+ return /* @__PURE__ */ a(A.Portal, { children: /* @__PURE__ */ a(A.Positioner, { sideOffset: e, side: s, align: r, children: /* @__PURE__ */ c(
861
+ A.Popup,
856
862
  {
857
863
  "data-slot": "tooltip-content",
858
- sideOffset: e,
859
- className: h(
860
- "astw:bg-primary astw:text-primary-foreground astw:animate-in astw:fade-in-0 astw:zoom-in-95 astw:data-[state=closed]:animate-out astw:data-[state=closed]:fade-out-0 astw:data-[state=closed]:zoom-out-95 astw:data-[side=bottom]:slide-in-from-top-2 astw:data-[side=left]:slide-in-from-right-2 astw:data-[side=right]:slide-in-from-left-2 astw:data-[side=top]:slide-in-from-bottom-2 astw:z-50 astw:w-fit astw:origin-(--radix-tooltip-content-transform-origin) astw:rounded-md astw:px-3 astw:py-1.5 astw:text-xs astw:text-balance",
864
+ className: m(
865
+ "astw:bg-primary astw:text-primary-foreground astw:animate-in astw:fade-in-0 astw:zoom-in-95 astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-ending-style:zoom-out-95 astw:data-[side=bottom]:slide-in-from-top-2 astw:data-[side=left]:slide-in-from-right-2 astw:data-[side=right]:slide-in-from-left-2 astw:data-[side=top]:slide-in-from-bottom-2 astw:z-50 astw:w-fit astw:origin-(--transform-origin) astw:rounded-md astw:px-3 astw:py-1.5 astw:text-xs astw:text-balance",
861
866
  t
862
867
  ),
863
- ...r,
868
+ ...o,
864
869
  children: [
865
- s,
866
- /* @__PURE__ */ a(B.Arrow, { className: "astw:bg-primary astw:fill-primary astw:z-50 astw:size-2.5 astw:translate-y-[calc(-50%_-_2px)] astw:rotate-45 astw:rounded-[2px]" })
870
+ n,
871
+ /* @__PURE__ */ a(A.Arrow, { className: "astw:bg-primary astw:fill-primary astw:z-50 astw:size-2.5 astw:translate-y-[calc(-50%_-_2px)] astw:rotate-45 astw:rounded-[2px]" })
867
872
  ]
868
873
  }
869
- ) });
874
+ ) }) });
870
875
  }
871
- const ee = "16rem", ha = "18rem", ma = "3rem", fa = "b", ae = p.createContext(null);
876
+ const ee = "16rem", da = "18rem", ua = "3rem", wa = "b", ae = f.createContext(null);
872
877
  function K() {
873
- const t = p.useContext(ae);
878
+ const t = f.useContext(ae);
874
879
  if (!t)
875
880
  throw new Error("useSidebar must be used within a SidebarProvider.");
876
881
  return t;
877
882
  }
878
- function pa({
883
+ function ma({
879
884
  defaultOpen: t = !0,
880
885
  open: e,
881
886
  onOpenChange: s,
@@ -884,20 +889,20 @@ function pa({
884
889
  children: o,
885
890
  ...i
886
891
  }) {
887
- const l = ia(), u = la(), [w, d] = p.useState(!1), [m, f] = p.useState(!1), [g, x] = p.useState(t), b = e ?? g, k = p.useCallback(
892
+ const l = ra(), u = na(), [w, d] = f.useState(!1), [h, p] = f.useState(!1), [g, x] = f.useState(t), b = e ?? g, k = f.useCallback(
888
893
  (y) => {
889
894
  const P = typeof y == "function" ? y(b) : y;
890
895
  s ? s(P) : x(P);
891
896
  },
892
897
  [s, b]
893
- ), R = u && !l, V = p.useCallback(() => l ? d((y) => !y) : R ? f((y) => !y) : k((y) => !y), [l, R, k, d]);
894
- p.useEffect(() => {
898
+ ), R = u && !l, V = f.useCallback(() => l ? d((y) => !y) : R ? p((y) => !y) : k((y) => !y), [l, R, k, d]);
899
+ f.useEffect(() => {
895
900
  const y = (P) => {
896
- P.key === fa && (P.metaKey || P.ctrlKey) && (P.preventDefault(), V());
901
+ P.key === wa && (P.metaKey || P.ctrlKey) && (P.preventDefault(), V());
897
902
  };
898
903
  return window.addEventListener("keydown", y), () => window.removeEventListener("keydown", y);
899
904
  }, [V]);
900
- const vt = b ? "expanded" : "collapsed", de = p.useMemo(
905
+ const vt = b ? "expanded" : "collapsed", de = f.useMemo(
901
906
  () => ({
902
907
  state: vt,
903
908
  open: b,
@@ -907,8 +912,8 @@ function pa({
907
912
  setOpenMobile: d,
908
913
  toggleSidebar: V,
909
914
  isIconMode: R,
910
- openIconMode: m,
911
- setOpenIconMode: f
915
+ openIconMode: h,
916
+ setOpenIconMode: p
912
917
  }),
913
918
  [
914
919
  vt,
@@ -919,20 +924,20 @@ function pa({
919
924
  d,
920
925
  V,
921
926
  R,
922
- m,
923
- f
927
+ h,
928
+ p
924
929
  ]
925
930
  );
926
- return /* @__PURE__ */ a(ae.Provider, { value: de, children: /* @__PURE__ */ a(ht, { delayDuration: 0, children: /* @__PURE__ */ a(
931
+ return /* @__PURE__ */ a(ae.Provider, { value: de, children: /* @__PURE__ */ a(mt, { delayDuration: 0, children: /* @__PURE__ */ a(
927
932
  "div",
928
933
  {
929
934
  "data-slot": "sidebar-wrapper",
930
935
  style: {
931
936
  "--sidebar-width": ee,
932
- "--sidebar-width-icon": ma,
937
+ "--sidebar-width-icon": ua,
933
938
  ...n
934
939
  },
935
- className: h(
940
+ className: m(
936
941
  "astw:group/sidebar-wrapper astw:has-data-[variant=inset]:bg-sidebar astw:flex astw:min-h-svh astw:w-full astw:overflow-hidden",
937
942
  r
938
943
  ),
@@ -941,7 +946,7 @@ function pa({
941
946
  }
942
947
  ) }) });
943
948
  }
944
- function ga({
949
+ function ha({
945
950
  side: t = "left",
946
951
  variant: e = "sidebar",
947
952
  collapsible: s = "offcanvas",
@@ -955,14 +960,14 @@ function ga({
955
960
  openMobile: u,
956
961
  setOpenMobile: w,
957
962
  isIconMode: d,
958
- openIconMode: m,
959
- setOpenIconMode: f
963
+ openIconMode: h,
964
+ setOpenIconMode: p
960
965
  } = K();
961
966
  return s === "none" ? /* @__PURE__ */ a(
962
967
  "div",
963
968
  {
964
969
  "data-slot": "sidebar",
965
- className: h(
970
+ className: m(
966
971
  "astw:bg-sidebar astw:text-sidebar-foreground astw:flex astw:h-full astw:w-(--sidebar-width) astw:flex-col",
967
972
  r
968
973
  ),
@@ -977,7 +982,7 @@ function ga({
977
982
  "data-mobile": "true",
978
983
  className: "astw:bg-sidebar astw:text-sidebar-foreground astw:w-(--sidebar-width) astw:p-0 astw:[&>button]:hidden",
979
984
  style: {
980
- "--sidebar-width": ha
985
+ "--sidebar-width": da
981
986
  },
982
987
  side: t,
983
988
  children: [
@@ -1003,7 +1008,7 @@ function ga({
1003
1008
  "div",
1004
1009
  {
1005
1010
  "data-slot": "sidebar-gap",
1006
- className: h(
1011
+ className: m(
1007
1012
  "astw:relative astw:bg-transparent astw:transition-[width] astw:duration-200 astw:ease-linear",
1008
1013
  e === "floating" || e === "inset" ? "astw:group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "astw:group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
1009
1014
  )
@@ -1013,7 +1018,7 @@ function ga({
1013
1018
  "div",
1014
1019
  {
1015
1020
  "data-slot": "sidebar-container",
1016
- className: h(
1021
+ className: m(
1017
1022
  "astw:fixed astw:inset-y-0 astw:z-10 astw:hidden astw:h-svh astw:transition-[left,right,width] astw:duration-200 astw:ease-linear astw:md:flex",
1018
1023
  t === "left" ? "astw:left-0" : "astw:right-0",
1019
1024
  e === "floating" || e === "inset" ? "astw:p-2 astw:group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "astw:group-data-[collapsible=icon]:w-(--sidebar-width-icon) astw:group-data-[side=left]:border-r astw:group-data-[side=right]:border-l",
@@ -1033,7 +1038,7 @@ function ga({
1033
1038
  ]
1034
1039
  }
1035
1040
  ),
1036
- /* @__PURE__ */ a(Ct, { open: m, onOpenChange: f, ...o, children: /* @__PURE__ */ c(
1041
+ /* @__PURE__ */ a(Ct, { open: h, onOpenChange: p, ...o, children: /* @__PURE__ */ c(
1037
1042
  Tt,
1038
1043
  {
1039
1044
  "data-sidebar": "sidebar",
@@ -1067,7 +1072,7 @@ function ga({
1067
1072
  "div",
1068
1073
  {
1069
1074
  "data-slot": "sidebar-gap",
1070
- className: h(
1075
+ className: m(
1071
1076
  "astw:relative astw:w-(--sidebar-width) astw:bg-transparent astw:transition-[width] astw:duration-200 astw:ease-linear",
1072
1077
  "astw:group-data-[collapsible=offcanvas]:w-0",
1073
1078
  "astw:group-data-[side=right]:rotate-180",
@@ -1079,7 +1084,7 @@ function ga({
1079
1084
  "div",
1080
1085
  {
1081
1086
  "data-slot": "sidebar-container",
1082
- className: h(
1087
+ className: m(
1083
1088
  "astw:fixed astw:inset-y-0 astw:z-10 astw:hidden astw:h-svh astw:w-(--sidebar-width) astw:transition-[left,right,width] astw:duration-200 astw:ease-linear astw:md:flex",
1084
1089
  t === "left" ? "astw:left-0 astw:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "astw:right-0 astw:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
1085
1090
  // Adjust the padding for floating and inset variants.
@@ -1110,30 +1115,30 @@ function se({
1110
1115
  }) {
1111
1116
  const { toggleSidebar: r } = K();
1112
1117
  return /* @__PURE__ */ c(
1113
- F,
1118
+ O,
1114
1119
  {
1115
1120
  "data-sidebar": "trigger",
1116
1121
  "data-slot": "sidebar-trigger",
1117
1122
  variant: "ghost",
1118
1123
  size: "icon",
1119
- className: h("astw:text-muted-foreground", t),
1124
+ className: m("astw:text-muted-foreground", t),
1120
1125
  onClick: (n) => {
1121
1126
  e?.(n), r();
1122
1127
  },
1123
1128
  ...s,
1124
1129
  children: [
1125
- /* @__PURE__ */ a(Re, { className: "astw:size-4.5" }),
1130
+ /* @__PURE__ */ a(Te, { className: "astw:size-4.5" }),
1126
1131
  /* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Toggle Sidebar" })
1127
1132
  ]
1128
1133
  }
1129
1134
  );
1130
1135
  }
1131
- function ba({ className: t, ...e }) {
1136
+ function pa({ className: t, ...e }) {
1132
1137
  return /* @__PURE__ */ a(
1133
1138
  "main",
1134
1139
  {
1135
1140
  "data-slot": "sidebar-inset",
1136
- className: h(
1141
+ className: m(
1137
1142
  "astw:bg-background astw:relative astw:flex astw:w-full astw:flex-1 astw:flex-col",
1138
1143
  "astw:px-4 astw:md:peer-data-[variant=inset]:px-8 astw:md:peer-data-[variant=inset]:py-2",
1139
1144
  // astw:md:peer-data-[variant=inset]:peer-data-[state=collapsed]:pl-2
@@ -1143,13 +1148,13 @@ function ba({ className: t, ...e }) {
1143
1148
  }
1144
1149
  );
1145
1150
  }
1146
- function xa({ className: t, ...e }) {
1151
+ function fa({ className: t, ...e }) {
1147
1152
  return /* @__PURE__ */ a(
1148
1153
  "div",
1149
1154
  {
1150
1155
  "data-slot": "sidebar-header",
1151
1156
  "data-sidebar": "header",
1152
- className: h(
1157
+ className: m(
1153
1158
  "astw:flex astw:flex-row astw:items-center astw:gap-0.5 astw:p-2",
1154
1159
  t
1155
1160
  ),
@@ -1157,27 +1162,27 @@ function xa({ className: t, ...e }) {
1157
1162
  }
1158
1163
  );
1159
1164
  }
1160
- function va({
1165
+ function ga({
1161
1166
  className: t,
1162
1167
  ...e
1163
1168
  }) {
1164
1169
  return /* @__PURE__ */ a(
1165
- da,
1170
+ ia,
1166
1171
  {
1167
1172
  "data-slot": "sidebar-separator",
1168
1173
  "data-sidebar": "separator",
1169
- className: h("astw:bg-sidebar-border astw:mx-2 astw:w-auto", t),
1174
+ className: m("astw:bg-sidebar-border astw:mx-2 astw:w-auto", t),
1170
1175
  ...e
1171
1176
  }
1172
1177
  );
1173
1178
  }
1174
- function ya({ className: t, ...e }) {
1179
+ function ba({ className: t, ...e }) {
1175
1180
  return /* @__PURE__ */ a(
1176
1181
  "div",
1177
1182
  {
1178
1183
  "data-slot": "sidebar-content",
1179
1184
  "data-sidebar": "content",
1180
- className: h(
1185
+ className: m(
1181
1186
  "astw:flex astw:min-h-0 astw:flex-1 astw:flex-col astw:gap-2 astw:overflow-auto astw:group-data-[collapsible=icon]:overflow-hidden",
1182
1187
  t
1183
1188
  ),
@@ -1191,7 +1196,7 @@ function gt({ className: t, ...e }) {
1191
1196
  {
1192
1197
  "data-slot": "sidebar-group",
1193
1198
  "data-sidebar": "group",
1194
- className: h(
1199
+ className: m(
1195
1200
  "astw:relative astw:flex astw:w-full astw:min-w-0 astw:flex-col astw:p-2",
1196
1201
  t
1197
1202
  ),
@@ -1205,7 +1210,7 @@ function bt({ className: t, ...e }) {
1205
1210
  {
1206
1211
  "data-slot": "sidebar-menu",
1207
1212
  "data-sidebar": "menu",
1208
- className: h(
1213
+ className: m(
1209
1214
  "astw:flex astw:w-full astw:min-w-0 astw:flex-col astw:gap-1",
1210
1215
  t
1211
1216
  ),
@@ -1219,12 +1224,12 @@ function I({ className: t, ...e }) {
1219
1224
  {
1220
1225
  "data-slot": "sidebar-menu-item",
1221
1226
  "data-sidebar": "menu-item",
1222
- className: h("astw:group/menu-item astw:relative", t),
1227
+ className: m("astw:group/menu-item astw:relative", t),
1223
1228
  ...e
1224
1229
  }
1225
1230
  );
1226
1231
  }
1227
- const Na = ot(
1232
+ const xa = ot(
1228
1233
  "astw:peer/menu-button astw:flex astw:w-full astw:items-center astw:gap-2 astw:overflow-hidden astw:rounded-md astw:p-2 astw:text-left astw:text-sm astw:outline-hidden astw:ring-sidebar-ring astw:transition-[width,height,padding] astw:hover:bg-sidebar-accent astw:hover:text-sidebar-accent-foreground astw:focus-visible:ring-2 astw:active:bg-sidebar-accent astw:active:text-sidebar-accent-foreground astw:disabled:pointer-events-none astw:disabled:opacity-50 astw:group-has-data-[sidebar=menu-action]/menu-item:pr-8 astw:aria-disabled:pointer-events-none astw:aria-disabled:opacity-50 astw:data-[active=true]:bg-sidebar-accent astw:data-[active=true]:font-medium astw:data-[active=true]:text-sidebar-accent-foreground astw:data-[state=open]:hover:bg-sidebar-accent astw:data-[state=open]:hover:text-sidebar-accent-foreground astw:group-data-[collapsible=icon]:size-8! astw:group-data-[collapsible=icon]:p-2! astw:[&>span:last-child]:truncate astw:group-data-[collapsible=icon]:[&>span:last-child]:hidden astw:[&>svg]:size-4 astw:[&>svg]:shrink-0",
1229
1234
  {
1230
1235
  variants: {
@@ -1245,31 +1250,34 @@ const Na = ot(
1245
1250
  }
1246
1251
  );
1247
1252
  function z({
1248
- asChild: t = !1,
1253
+ render: t,
1249
1254
  isActive: e = !1,
1250
1255
  variant: s = "default",
1251
1256
  size: r = "default",
1252
1257
  tooltip: n,
1253
1258
  className: o,
1254
- ...i
1259
+ children: i,
1260
+ ...l
1255
1261
  }) {
1256
- const l = t ? j : "button", { isMobile: u, state: w } = K(), d = /* @__PURE__ */ a(
1257
- l,
1258
- {
1262
+ const { isMobile: u, state: w } = K(), d = j({
1263
+ defaultTagName: "button",
1264
+ render: t,
1265
+ props: {
1259
1266
  "data-slot": "sidebar-menu-button",
1260
1267
  "data-sidebar": "menu-button",
1261
1268
  "data-size": r,
1262
1269
  "data-active": e,
1263
- className: h(Na({ variant: s, size: r }), o),
1264
- ...i
1270
+ className: m(xa({ variant: s, size: r }), o),
1271
+ children: i,
1272
+ ...l
1265
1273
  }
1266
- );
1274
+ });
1267
1275
  return n ? (typeof n == "string" && (n = {
1268
1276
  children: n
1269
- }), /* @__PURE__ */ c(mt, { children: [
1270
- /* @__PURE__ */ a(ft, { asChild: !0, children: d }),
1277
+ }), /* @__PURE__ */ c(ht, { children: [
1278
+ /* @__PURE__ */ a(pt, { render: d }),
1271
1279
  /* @__PURE__ */ a(
1272
- pt,
1280
+ ft,
1273
1281
  {
1274
1282
  side: "right",
1275
1283
  align: "center",
@@ -1281,16 +1289,18 @@ function z({
1281
1289
  }
1282
1290
  function q({
1283
1291
  className: t,
1284
- asChild: e = !1,
1292
+ render: e,
1285
1293
  showOnHover: s = !1,
1286
- ...r
1294
+ children: r,
1295
+ ...n
1287
1296
  }) {
1288
- return /* @__PURE__ */ a(
1289
- e ? j : "button",
1290
- {
1297
+ return j({
1298
+ defaultTagName: "button",
1299
+ render: e,
1300
+ props: {
1291
1301
  "data-slot": "sidebar-menu-action",
1292
1302
  "data-sidebar": "menu-action",
1293
- className: h(
1303
+ className: m(
1294
1304
  "astw:text-sidebar-foreground astw:ring-sidebar-ring astw:hover:bg-sidebar-accent astw:hover:text-sidebar-accent-foreground astw:peer-hover/menu-button:text-sidebar-accent-foreground astw:absolute astw:top-1.5 astw:right-1 astw:flex astw:aspect-square astw:w-5 astw:items-center astw:justify-center astw:rounded-md astw:p-0 astw:outline-hidden astw:transition-transform astw:focus-visible:ring-2 astw:[&>svg]:size-4 astw:[&>svg]:shrink-0",
1295
1305
  // Increases the hit area of the button on mobile.
1296
1306
  "astw:after:absolute astw:after:-inset-2 astw:md:after:hidden",
@@ -1301,9 +1311,10 @@ function q({
1301
1311
  s && "astw:peer-data-[active=true]/menu-button:text-sidebar-accent-foreground astw:group-focus-within/menu-item:opacity-100 astw:group-hover/menu-item:opacity-100 astw:data-[state=open]:opacity-100 astw:md:opacity-0",
1302
1312
  t
1303
1313
  ),
1304
- ...r
1314
+ children: r,
1315
+ ...n
1305
1316
  }
1306
- );
1317
+ });
1307
1318
  }
1308
1319
  function at({ className: t, ...e }) {
1309
1320
  return /* @__PURE__ */ a(
@@ -1311,7 +1322,7 @@ function at({ className: t, ...e }) {
1311
1322
  {
1312
1323
  "data-slot": "sidebar-menu-sub",
1313
1324
  "data-sidebar": "menu-sub",
1314
- className: h(
1325
+ className: m(
1315
1326
  "astw:border-sidebar-border astw:ml-3.5 astw:mr-0 astw:flex astw:min-w-0 astw:translate-x-px astw:flex-col astw:gap-1 astw:border-l astw:pl-2.5 astw:pr-0 astw:py-0.5",
1316
1327
  "astw:group-data-[collapsible=icon]:hidden",
1317
1328
  t
@@ -1320,7 +1331,7 @@ function at({ className: t, ...e }) {
1320
1331
  }
1321
1332
  );
1322
1333
  }
1323
- function Sa({
1334
+ function va({
1324
1335
  className: t,
1325
1336
  ...e
1326
1337
  }) {
@@ -1329,26 +1340,28 @@ function Sa({
1329
1340
  {
1330
1341
  "data-slot": "sidebar-menu-sub-item",
1331
1342
  "data-sidebar": "menu-sub-item",
1332
- className: h("astw:group/menu-sub-item astw:relative", t),
1343
+ className: m("astw:group/menu-sub-item astw:relative", t),
1333
1344
  ...e
1334
1345
  }
1335
1346
  );
1336
1347
  }
1337
- function Ca({
1338
- asChild: t = !1,
1348
+ function ya({
1349
+ render: t,
1339
1350
  size: e = "md",
1340
1351
  isActive: s = !1,
1341
1352
  className: r,
1342
- ...n
1353
+ children: n,
1354
+ ...o
1343
1355
  }) {
1344
- return /* @__PURE__ */ a(
1345
- t ? j : "a",
1346
- {
1356
+ return j({
1357
+ defaultTagName: "a",
1358
+ render: t,
1359
+ props: {
1347
1360
  "data-slot": "sidebar-menu-sub-button",
1348
1361
  "data-sidebar": "menu-sub-button",
1349
1362
  "data-size": e,
1350
1363
  "data-active": s,
1351
- className: h(
1364
+ className: m(
1352
1365
  "astw:text-sidebar-foreground astw:ring-sidebar-ring astw:hover:bg-sidebar-accent astw:hover:text-sidebar-accent-foreground astw:active:bg-sidebar-accent astw:active:text-sidebar-accent-foreground astw:[&>svg]:text-sidebar-accent-foreground astw:flex astw:h-7 astw:min-w-0 astw:-translate-x-px astw:items-center astw:gap-2 astw:overflow-hidden astw:rounded-md astw:px-2 astw:outline-hidden astw:focus-visible:ring-2 astw:disabled:pointer-events-none astw:disabled:opacity-50 astw:aria-disabled:pointer-events-none astw:aria-disabled:opacity-50 astw:[&>span:last-child]:truncate astw:group-data-[collapsible=icon]:[&>span:last-child]:hidden astw:[&>svg]:size-4 astw:[&>svg]:shrink-0",
1353
1366
  "astw:data-[active=true]:bg-sidebar-accent astw:data-[active=true]:text-sidebar-accent-foreground",
1354
1367
  e === "sm" && "astw:text-xs",
@@ -1356,21 +1369,15 @@ function Ca({
1356
1369
  "astw:group-data-[collapsible=icon]:hidden",
1357
1370
  r
1358
1371
  ),
1359
- ...n
1372
+ children: n,
1373
+ ...o
1360
1374
  }
1361
- );
1362
- }
1363
- function O({ to: t, children: e, ...s }) {
1364
- try {
1365
- return ve(t), /* @__PURE__ */ a(ye, { to: t, ...s, children: e });
1366
- } catch {
1367
- return /* @__PURE__ */ a("a", { href: t, ...s, children: e });
1368
- }
1375
+ });
1369
1376
  }
1370
- const Ta = (t) => {
1377
+ const Na = (t) => {
1371
1378
  const { configurations: e } = C(), { modules: s, locale: r } = e;
1372
- return ka(t) ? null : Ra(t, s, r);
1373
- }, ka = (t) => t.startsWith("http://") || t.startsWith("https://"), Ra = (t, e, s) => {
1379
+ return Sa(t) ? null : Ca(t, s, r);
1380
+ }, Sa = (t) => t.startsWith("http://") || t.startsWith("https://"), Ca = (t, e, s) => {
1374
1381
  const r = U(s), n = At(t);
1375
1382
  for (const o of e) {
1376
1383
  const i = At(o.path);
@@ -1426,36 +1433,48 @@ const Ta = (t) => {
1426
1433
  activeMatch: n = "prefix",
1427
1434
  title: o,
1428
1435
  icon: i
1429
- } = t, { pathname: l } = Y(), u = Ta(e), w = n === "exact" ? l === e : l === e || l.startsWith(`${e}/`), d = o ?? u?.title ?? Pa(e), m = i ?? u?.icon, f = {
1436
+ } = t, { pathname: l } = Y(), u = Na(e), w = n === "exact" ? l === e : l === e || l.startsWith(`${e}/`), d = o ?? u?.title ?? Ta(e), h = i ?? u?.icon, p = {
1430
1437
  title: d,
1431
1438
  url: e,
1432
- icon: m,
1439
+ icon: h,
1433
1440
  isActive: w
1434
1441
  };
1435
- return s || oe(e) ? /* @__PURE__ */ a(I, { children: /* @__PURE__ */ a(z, { asChild: !0, tooltip: d, children: /* @__PURE__ */ a(
1436
- "a",
1442
+ return s || oe(e) ? /* @__PURE__ */ a(I, { children: /* @__PURE__ */ a(
1443
+ z,
1437
1444
  {
1438
- href: e,
1439
- target: "_blank",
1440
- rel: "noopener noreferrer",
1441
- className: w ? "astw:bg-sidebar-accent astw:font-medium" : void 0,
1442
- children: r ? r(f) : /* @__PURE__ */ c(S, { children: [
1443
- m ?? /* @__PURE__ */ a($t, { className: "astw:size-4" }),
1445
+ render: /* @__PURE__ */ a(
1446
+ "a",
1447
+ {
1448
+ href: e,
1449
+ target: "_blank",
1450
+ rel: "noopener noreferrer",
1451
+ className: w ? "astw:bg-sidebar-accent astw:font-medium" : void 0
1452
+ }
1453
+ ),
1454
+ tooltip: d,
1455
+ children: r ? r(p) : /* @__PURE__ */ c(S, { children: [
1456
+ h ?? /* @__PURE__ */ a($t, { className: "astw:size-4" }),
1444
1457
  /* @__PURE__ */ a("span", { children: d })
1445
1458
  ] })
1446
1459
  }
1447
- ) }) }) : /* @__PURE__ */ a(I, { children: /* @__PURE__ */ a(z, { asChild: !0, tooltip: d, children: /* @__PURE__ */ a(
1448
- O,
1460
+ ) }) : /* @__PURE__ */ a(I, { children: /* @__PURE__ */ a(
1461
+ z,
1449
1462
  {
1450
- to: e,
1451
- className: w ? "astw:bg-sidebar-accent astw:font-medium" : void 0,
1452
- children: r ? r(f) : /* @__PURE__ */ c(S, { children: [
1453
- m,
1463
+ render: /* @__PURE__ */ a(
1464
+ $,
1465
+ {
1466
+ to: e,
1467
+ className: w ? "astw:bg-sidebar-accent astw:font-medium" : void 0
1468
+ }
1469
+ ),
1470
+ tooltip: d,
1471
+ children: r ? r(p) : /* @__PURE__ */ c(S, { children: [
1472
+ h,
1454
1473
  /* @__PURE__ */ a("span", { children: d })
1455
1474
  ] })
1456
1475
  }
1457
- ) }) });
1458
- }, oe = (t) => t.startsWith("http://") || t.startsWith("https://"), Pa = (t) => {
1476
+ ) });
1477
+ }, oe = (t) => t.startsWith("http://") || t.startsWith("https://"), Ta = (t) => {
1459
1478
  if (oe(t))
1460
1479
  try {
1461
1480
  return new URL(t).hostname;
@@ -1473,64 +1492,71 @@ function st({
1473
1492
  function Q({
1474
1493
  ...t
1475
1494
  }) {
1476
- return /* @__PURE__ */ a(
1477
- lt.CollapsibleTrigger,
1478
- {
1479
- "data-slot": "collapsible-trigger",
1480
- ...t
1481
- }
1482
- );
1495
+ return /* @__PURE__ */ a(lt.Trigger, { "data-slot": "collapsible-trigger", ...t });
1483
1496
  }
1484
1497
  function rt({
1485
1498
  ...t
1486
1499
  }) {
1487
- return /* @__PURE__ */ a(
1488
- lt.CollapsibleContent,
1489
- {
1490
- "data-slot": "collapsible-content",
1491
- ...t
1492
- }
1493
- );
1500
+ return /* @__PURE__ */ a(lt.Panel, { "data-slot": "collapsible-content", ...t });
1494
1501
  }
1495
1502
  const Os = (t) => {
1496
- const { title: e, icon: s, to: r, defaultOpen: n = !0, children: o } = t, { pathname: i } = Y(), { configurations: l } = C(), u = U(l.locale), w = A(), d = u(e, typeof e == "string" ? e : ""), m = r ? i === r : !1;
1497
- return r ? /* @__PURE__ */ a(st, { asChild: !0, defaultOpen: n, children: /* @__PURE__ */ c(I, { children: [
1498
- /* @__PURE__ */ a(z, { asChild: !0, tooltip: d, children: /* @__PURE__ */ c(
1499
- O,
1503
+ const { title: e, icon: s, to: r, defaultOpen: n = !0, children: o } = t, { pathname: i } = Y(), { configurations: l } = C(), u = U(l.locale), w = E(), d = u(e, typeof e == "string" ? e : ""), h = r ? i === r : !1;
1504
+ return r ? /* @__PURE__ */ c(st, { render: /* @__PURE__ */ a(I, {}), defaultOpen: n, children: [
1505
+ /* @__PURE__ */ c(
1506
+ z,
1500
1507
  {
1501
- to: r,
1502
- className: m ? "astw:bg-sidebar-accent astw:font-medium" : void 0,
1508
+ render: /* @__PURE__ */ a(
1509
+ $,
1510
+ {
1511
+ to: r,
1512
+ className: h ? "astw:bg-sidebar-accent astw:font-medium" : void 0
1513
+ }
1514
+ ),
1515
+ tooltip: d,
1503
1516
  children: [
1504
1517
  s,
1505
1518
  /* @__PURE__ */ a("span", { children: d })
1506
1519
  ]
1507
1520
  }
1508
- ) }),
1509
- /* @__PURE__ */ a(Q, { asChild: !0, children: /* @__PURE__ */ c(q, { className: "astw:data-[state=open]:rotate-90", children: [
1510
- /* @__PURE__ */ a($, {}),
1511
- /* @__PURE__ */ a("span", { className: "astw:sr-only", children: w("toggle") })
1512
- ] }) }),
1521
+ ),
1522
+ /* @__PURE__ */ c(
1523
+ Q,
1524
+ {
1525
+ render: /* @__PURE__ */ a(q, { className: "astw:data-panel-open:rotate-90" }),
1526
+ children: [
1527
+ /* @__PURE__ */ a(W, {}),
1528
+ /* @__PURE__ */ a("span", { className: "astw:sr-only", children: w("toggle") })
1529
+ ]
1530
+ }
1531
+ ),
1513
1532
  /* @__PURE__ */ a(rt, { children: /* @__PURE__ */ a(at, { children: o }) })
1514
- ] }) }) : /* @__PURE__ */ a(st, { asChild: !0, defaultOpen: n, children: /* @__PURE__ */ c(I, { children: [
1515
- /* @__PURE__ */ c(Q, { className: "astw:flex astw:w-[100%] astw:[&[data-state=open]_.astw-rotate-target]:rotate-90", children: [
1516
- /* @__PURE__ */ a(z, { asChild: !0, tooltip: d, children: /* @__PURE__ */ c("span", { className: "astw:flex astw:w-[100%]", children: [
1517
- s,
1518
- /* @__PURE__ */ a("span", { children: d })
1519
- ] }) }),
1520
- /* @__PURE__ */ a(q, { className: "astw-rotate-target", asChild: !0, children: /* @__PURE__ */ c("span", { children: [
1521
- /* @__PURE__ */ a($, {}),
1533
+ ] }) : /* @__PURE__ */ c(st, { render: /* @__PURE__ */ a(I, {}), defaultOpen: n, children: [
1534
+ /* @__PURE__ */ c(Q, { className: "astw:flex astw:w-full astw:[&[data-panel-open]_.astw-rotate-target]:rotate-90", children: [
1535
+ /* @__PURE__ */ c(
1536
+ z,
1537
+ {
1538
+ render: /* @__PURE__ */ a("span", { className: "astw:flex astw:w-full" }),
1539
+ tooltip: d,
1540
+ children: [
1541
+ s,
1542
+ /* @__PURE__ */ a("span", { children: d })
1543
+ ]
1544
+ }
1545
+ ),
1546
+ /* @__PURE__ */ c(q, { className: "astw-rotate-target", render: /* @__PURE__ */ a("span", {}), children: [
1547
+ /* @__PURE__ */ a(W, {}),
1522
1548
  /* @__PURE__ */ a("span", { className: "astw:sr-only", children: w("toggle") })
1523
- ] }) })
1549
+ ] })
1524
1550
  ] }),
1525
1551
  /* @__PURE__ */ a(rt, { children: /* @__PURE__ */ a(at, { children: o }) })
1526
- ] }) });
1527
- }, js = () => /* @__PURE__ */ a(va, {}), Aa = (t) => {
1528
- const { title: e, icon: s } = C(), { pathname: r } = Y(), { isIconMode: n } = K(), o = /* @__PURE__ */ c(xa, { children: [
1552
+ ] });
1553
+ }, js = () => /* @__PURE__ */ a(ga, {}), ka = (t) => {
1554
+ const { title: e, icon: s } = C(), { pathname: r } = Y(), { isIconMode: n } = K(), o = /* @__PURE__ */ c(fa, { children: [
1529
1555
  s,
1530
1556
  /* @__PURE__ */ a(
1531
1557
  "h1",
1532
1558
  {
1533
- className: h(
1559
+ className: m(
1534
1560
  "astw:text-sm astw:mb-2 astw:mt-2 astw:px-2",
1535
1561
  n && "astw:hidden"
1536
1562
  ),
@@ -1538,69 +1564,101 @@ const Os = (t) => {
1538
1564
  }
1539
1565
  )
1540
1566
  ] });
1541
- return /* @__PURE__ */ c(ga, { variant: "inset", collapsible: n ? "icon" : "offcanvas", children: [
1567
+ return /* @__PURE__ */ c(ha, { variant: "inset", collapsible: n ? "icon" : "offcanvas", children: [
1542
1568
  !n && /* @__PURE__ */ c("div", { className: "astw:flex astw:justify-between astw:items-center", children: [
1543
1569
  t.header ?? o,
1544
1570
  /* @__PURE__ */ a("div", { className: "astw:hidden astw:md:block", children: /* @__PURE__ */ a(se, { className: "astw:-ml-1" }) })
1545
1571
  ] }),
1546
- /* @__PURE__ */ a(ya, { children: t.children ? (
1572
+ /* @__PURE__ */ a(ba, { children: t.children ? (
1547
1573
  // New API: children-based explicit definition
1548
1574
  /* @__PURE__ */ a(gt, { children: /* @__PURE__ */ a(bt, { children: t.children }) })
1549
1575
  ) : (
1550
1576
  // Existing behavior: auto-generation from resources
1551
- /* @__PURE__ */ a(it, { fallback: /* @__PURE__ */ a(Da, {}), children: /* @__PURE__ */ a(Ea, { currentPath: r }) })
1577
+ /* @__PURE__ */ a(it, { fallback: /* @__PURE__ */ a(Ea, {}), children: /* @__PURE__ */ a(Ra, { currentPath: r }) })
1552
1578
  ) }),
1553
1579
  t.footer ?? null
1554
1580
  ] });
1555
- }, Ea = ({ currentPath: t }) => {
1581
+ }, Ra = ({ currentPath: t }) => {
1556
1582
  const e = Qt();
1557
- return /* @__PURE__ */ a(zt, { resolve: e, children: (s) => /* @__PURE__ */ a(Ma, { items: s ?? [], currentPath: t }) });
1558
- }, Ma = (t) => {
1559
- const e = A();
1560
- return /* @__PURE__ */ a(gt, { children: /* @__PURE__ */ a(bt, { children: t.items.map((s) => /* @__PURE__ */ a(st, { asChild: !0, defaultOpen: !0, children: /* @__PURE__ */ c(I, { children: [
1561
- s.url ? /* @__PURE__ */ c(S, { children: [
1562
- /* @__PURE__ */ a(z, { asChild: !0, tooltip: s.title, children: /* @__PURE__ */ c(
1563
- O,
1564
- {
1565
- to: s.url,
1566
- className: s.url === t.currentPath ? "astw:bg-sidebar-accent astw:font-medium" : void 0,
1567
- children: [
1568
- s.icon,
1569
- /* @__PURE__ */ a("span", { children: s.title })
1570
- ]
1571
- }
1572
- ) }),
1573
- !!s.items?.length && /* @__PURE__ */ a(Q, { asChild: !0, children: /* @__PURE__ */ c(q, { className: "astw:data-[state=open]:rotate-90", children: [
1574
- /* @__PURE__ */ a($, {}),
1575
- /* @__PURE__ */ a("span", { className: "astw:sr-only", children: e("toggle") })
1576
- ] }) })
1577
- ] }) : /* @__PURE__ */ a(S, { children: /* @__PURE__ */ c(Q, { className: "astw:flex astw:w-full astw:[&[data-state=open]_.astw-rotate-target]:rotate-90", children: [
1578
- /* @__PURE__ */ a(z, { asChild: !0, tooltip: s.title, children: /* @__PURE__ */ c("span", { className: "astw:flex astw:w-full", children: [
1579
- s.icon,
1580
- /* @__PURE__ */ a("span", { children: s.title })
1581
- ] }) }),
1582
- !!s.items?.length && /* @__PURE__ */ a(
1583
- q,
1584
- {
1585
- className: "astw-rotate-target",
1586
- asChild: !0,
1587
- children: /* @__PURE__ */ c("span", { children: [
1588
- /* @__PURE__ */ a($, {}),
1589
- /* @__PURE__ */ a("span", { className: "astw:sr-only", children: e("toggle") })
1590
- ] })
1591
- }
1592
- )
1593
- ] }) }),
1594
- !!s.items?.length && /* @__PURE__ */ a(rt, { children: /* @__PURE__ */ a(at, { children: s.items?.map((r) => /* @__PURE__ */ a(Sa, { children: /* @__PURE__ */ a(Ca, { asChild: !0, children: /* @__PURE__ */ a(
1595
- O,
1596
- {
1597
- to: r.url,
1598
- className: r.url === t.currentPath ? "astw:bg-sidebar-accent astw:font-medium" : void 0,
1599
- children: /* @__PURE__ */ a("span", { children: r.title })
1600
- }
1601
- ) }) }, r.title)) }) })
1602
- ] }) }, s.title)) }) });
1603
- }, Ba = [104, 80, 112, 88, 96, 100, 84, 92], Da = () => /* @__PURE__ */ a(gt, { children: /* @__PURE__ */ a(bt, { className: "astw:px-2", children: Ba.map((t, e) => /* @__PURE__ */ a(I, { children: /* @__PURE__ */ c("div", { className: "astw:flex astw:items-center astw:gap-2 astw:py-1.5", children: [
1583
+ return /* @__PURE__ */ a(zt, { resolve: e, children: (s) => /* @__PURE__ */ a(Pa, { items: s ?? [], currentPath: t }) });
1584
+ }, Pa = (t) => {
1585
+ const e = E();
1586
+ return /* @__PURE__ */ a(gt, { children: /* @__PURE__ */ a(bt, { children: t.items.map((s) => /* @__PURE__ */ c(
1587
+ st,
1588
+ {
1589
+ render: /* @__PURE__ */ a(I, {}),
1590
+ defaultOpen: !0,
1591
+ children: [
1592
+ s.url ? /* @__PURE__ */ c(S, { children: [
1593
+ /* @__PURE__ */ c(
1594
+ z,
1595
+ {
1596
+ render: /* @__PURE__ */ a(
1597
+ $,
1598
+ {
1599
+ to: s.url,
1600
+ className: s.url === t.currentPath ? "astw:bg-sidebar-accent astw:font-medium" : void 0
1601
+ }
1602
+ ),
1603
+ tooltip: s.title,
1604
+ children: [
1605
+ s.icon,
1606
+ /* @__PURE__ */ a("span", { children: s.title })
1607
+ ]
1608
+ }
1609
+ ),
1610
+ !!s.items?.length && /* @__PURE__ */ c(
1611
+ Q,
1612
+ {
1613
+ render: /* @__PURE__ */ a(q, { className: "astw:data-panel-open:rotate-90" }),
1614
+ children: [
1615
+ /* @__PURE__ */ a(W, {}),
1616
+ /* @__PURE__ */ a("span", { className: "astw:sr-only", children: e("toggle") })
1617
+ ]
1618
+ }
1619
+ )
1620
+ ] }) : /* @__PURE__ */ a(S, { children: /* @__PURE__ */ c(Q, { className: "astw:flex astw:w-full astw:[&[data-panel-open]_.astw-rotate-target]:rotate-90", children: [
1621
+ /* @__PURE__ */ c(
1622
+ z,
1623
+ {
1624
+ render: /* @__PURE__ */ a("span", { className: "astw:flex astw:w-full" }),
1625
+ tooltip: s.title,
1626
+ children: [
1627
+ s.icon,
1628
+ /* @__PURE__ */ a("span", { children: s.title })
1629
+ ]
1630
+ }
1631
+ ),
1632
+ !!s.items?.length && /* @__PURE__ */ c(
1633
+ q,
1634
+ {
1635
+ className: "astw-rotate-target",
1636
+ render: /* @__PURE__ */ a("span", {}),
1637
+ children: [
1638
+ /* @__PURE__ */ a(W, {}),
1639
+ /* @__PURE__ */ a("span", { className: "astw:sr-only", children: e("toggle") })
1640
+ ]
1641
+ }
1642
+ )
1643
+ ] }) }),
1644
+ !!s.items?.length && /* @__PURE__ */ a(rt, { children: /* @__PURE__ */ a(at, { children: s.items?.map((r) => /* @__PURE__ */ a(va, { children: /* @__PURE__ */ a(
1645
+ ya,
1646
+ {
1647
+ render: /* @__PURE__ */ a(
1648
+ $,
1649
+ {
1650
+ to: r.url,
1651
+ className: r.url === t.currentPath ? "astw:bg-sidebar-accent astw:font-medium" : void 0
1652
+ }
1653
+ ),
1654
+ children: /* @__PURE__ */ a("span", { children: r.title })
1655
+ }
1656
+ ) }, r.title)) }) })
1657
+ ]
1658
+ },
1659
+ s.title
1660
+ )) }) });
1661
+ }, Aa = [104, 80, 112, 88, 96, 100, 84, 92], Ea = () => /* @__PURE__ */ a(gt, { children: /* @__PURE__ */ a(bt, { className: "astw:px-2", children: Aa.map((t, e) => /* @__PURE__ */ a(I, { children: /* @__PURE__ */ c("div", { className: "astw:flex astw:items-center astw:gap-2 astw:py-1.5", children: [
1604
1662
  /* @__PURE__ */ a("div", { className: "astw:h-4 astw:w-4 astw:rounded-md astw:bg-muted" }),
1605
1663
  /* @__PURE__ */ a(
1606
1664
  "div",
@@ -1618,7 +1676,7 @@ function Mt({ className: t, ...e }) {
1618
1676
  "ol",
1619
1677
  {
1620
1678
  "data-slot": "breadcrumb-list",
1621
- className: h(
1679
+ className: m(
1622
1680
  "astw:text-muted-foreground astw:flex astw:flex-wrap astw:items-center astw:gap-1.5 astw:text-sm astw:break-words astw:sm:gap-2.5",
1623
1681
  t
1624
1682
  ),
@@ -1631,28 +1689,37 @@ function Bt({ className: t, ...e }) {
1631
1689
  "li",
1632
1690
  {
1633
1691
  "data-slot": "breadcrumb-item",
1634
- className: h("astw:inline-flex astw:items-center astw:gap-1.5", t),
1692
+ className: m(
1693
+ "astw:inline-flex astw:items-center astw:gap-1.5",
1694
+ t
1695
+ ),
1635
1696
  ...e
1636
1697
  }
1637
1698
  );
1638
1699
  }
1639
1700
  function Dt({
1640
- asChild: t,
1701
+ render: t,
1641
1702
  className: e,
1642
1703
  children: s,
1643
- ...r
1704
+ to: r,
1705
+ ...n
1644
1706
  }) {
1645
- return /* @__PURE__ */ a(
1646
- t ? j : O,
1647
- {
1707
+ const o = m(
1708
+ "astw:hover:text-foreground astw:transition-colors",
1709
+ e
1710
+ );
1711
+ return j({
1712
+ defaultTagName: "a",
1713
+ render: t ?? /* @__PURE__ */ a($, { to: r }),
1714
+ props: {
1648
1715
  "data-slot": "breadcrumb-link",
1649
- className: h("astw:hover:text-foreground astw:transition-colors", e),
1650
- ...r,
1651
- children: s
1716
+ className: o,
1717
+ children: s,
1718
+ ...t ? n : { to: r, ...n }
1652
1719
  }
1653
- );
1720
+ });
1654
1721
  }
1655
- function La({
1722
+ function Ma({
1656
1723
  children: t,
1657
1724
  className: e,
1658
1725
  ...s
@@ -1663,20 +1730,20 @@ function La({
1663
1730
  "data-slot": "breadcrumb-separator",
1664
1731
  role: "presentation",
1665
1732
  "aria-hidden": "true",
1666
- className: h("astw:[&>svg]:size-3.5", e),
1733
+ className: m("astw:[&>svg]:size-3.5", e),
1667
1734
  ...s,
1668
- children: t ?? /* @__PURE__ */ a($, {})
1735
+ children: t ?? /* @__PURE__ */ a(W, {})
1669
1736
  }
1670
1737
  );
1671
1738
  }
1672
- function Ia(t, e) {
1739
+ function Ba(t, e) {
1673
1740
  if (!e.trim()) return t;
1674
1741
  const s = e.toLowerCase();
1675
1742
  return t.filter(
1676
1743
  (r) => r.title.toLowerCase().includes(s) || r.path.toLowerCase().includes(s)
1677
1744
  );
1678
1745
  }
1679
- const za = (t, e) => {
1746
+ const Da = (t, e) => {
1680
1747
  const s = Ot(e);
1681
1748
  return t.reduce(
1682
1749
  (r, n) => {
@@ -1688,12 +1755,12 @@ const za = (t, e) => {
1688
1755
  };
1689
1756
  const i = (l, u) => {
1690
1757
  !l || l.length === 0 || l.forEach((w) => {
1691
- const d = `${u}/${w.path}`, m = s(
1758
+ const d = `${u}/${w.path}`, h = s(
1692
1759
  w.meta.title,
1693
1760
  w.path
1694
1761
  );
1695
1762
  r[d] = {
1696
- title: m,
1763
+ title: h,
1697
1764
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- breadcrumbTitle exists at runtime but not in CommonPageResource type
1698
1765
  breadcrumbTitle: w.meta.breadcrumbTitle
1699
1766
  }, w.subResources && w.subResources.length > 0 && i(
@@ -1707,24 +1774,24 @@ const za = (t, e) => {
1707
1774
  {}
1708
1775
  );
1709
1776
  };
1710
- function _a(t, e, s, r) {
1711
- const n = t.split("/").filter((u) => u !== ""), o = e && n[0] === e ? n.slice(1) : n, i = za(s, r), l = o.map((u, w) => {
1777
+ function La(t, e, s, r) {
1778
+ const n = t.split("/").filter((u) => u !== ""), o = e && n[0] === e ? n.slice(1) : n, i = Da(s, r), l = o.map((u, w) => {
1712
1779
  const d = o.slice(0, w + 1).join("/");
1713
- let m = i[d];
1714
- if (!m) {
1780
+ let h = i[d];
1781
+ if (!h) {
1715
1782
  const g = Object.entries(i).find(
1716
1783
  ([x]) => {
1717
1784
  const b = x.split("/").map((R) => R.startsWith(":") ? "[^/]+" : R).join("/");
1718
1785
  return new RegExp(`^${b}$`).test(d);
1719
1786
  }
1720
1787
  )?.[1];
1721
- g && (m = g);
1788
+ g && (h = g);
1722
1789
  }
1723
- let f;
1724
- return m ? typeof m.breadcrumbTitle == "function" ? f = m.breadcrumbTitle(u) : typeof m.breadcrumbTitle == "string" ? f = m.breadcrumbTitle : f = m.title : f = decodeURIComponent(u), {
1790
+ let p;
1791
+ return h ? typeof h.breadcrumbTitle == "function" ? p = h.breadcrumbTitle(u) : typeof h.breadcrumbTitle == "string" ? p = h.breadcrumbTitle : p = h.title : p = decodeURIComponent(u), {
1725
1792
  segment: u,
1726
1793
  path: d,
1727
- title: f
1794
+ title: p
1728
1795
  };
1729
1796
  });
1730
1797
  return {
@@ -1732,93 +1799,93 @@ function _a(t, e, s, r) {
1732
1799
  segments: l
1733
1800
  };
1734
1801
  }
1735
- const $a = () => {
1802
+ const Ia = () => {
1736
1803
  const { configurations: t } = C(), e = Y();
1737
- return _a(
1804
+ return La(
1738
1805
  e.pathname,
1739
1806
  t.basePath,
1740
1807
  t.modules,
1741
1808
  t.locale
1742
1809
  );
1743
- }, Wa = () => {
1744
- const { segments: t } = $a(), e = Ne("/:prefix/settings/:suffix"), s = A();
1810
+ }, za = () => {
1811
+ const { segments: t } = Ia(), e = ve("/:prefix/settings/:suffix"), s = E();
1745
1812
  return e ? /* @__PURE__ */ a(Et, { children: /* @__PURE__ */ a(Mt, { children: /* @__PURE__ */ a("div", { className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground", children: /* @__PURE__ */ a(Bt, { children: /* @__PURE__ */ a(Dt, { to: `/${e.params.prefix}/settings`, children: s("settings") }) }) }) }) }) : /* @__PURE__ */ a(Et, { children: /* @__PURE__ */ a(Mt, { children: t.map((r, n) => /* @__PURE__ */ c(
1746
1813
  "div",
1747
1814
  {
1748
1815
  className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground",
1749
1816
  children: [
1750
1817
  /* @__PURE__ */ a(Bt, { children: /* @__PURE__ */ a(Dt, { to: r.path, children: r.title }) }),
1751
- n < t.length - 1 && /* @__PURE__ */ a(La, {})
1818
+ n < t.length - 1 && /* @__PURE__ */ a(Ma, {})
1752
1819
  ]
1753
1820
  },
1754
1821
  n
1755
1822
  )) }) });
1756
- }, Fa = () => {
1823
+ }, _a = () => {
1757
1824
  const { open: t, isIconMode: e } = K();
1758
1825
  return /* @__PURE__ */ a("div", { className: t && !e ? "astw:md:hidden" : void 0, children: /* @__PURE__ */ a(se, { className: "astw:-ml-2.5" }) });
1759
1826
  }, Us = (t) => {
1760
- const e = t.children ? t.children({ Outlet: Nt }) : null, s = Je(), r = () => {
1827
+ const e = t.children ? t.children({ Outlet: Nt }) : null, s = Ye(), r = () => {
1761
1828
  s.setTheme(s.theme === "dark" ? "light" : "dark");
1762
1829
  };
1763
- return /* @__PURE__ */ a(pa, { className: "astw:flex astw:flex-col", children: /* @__PURE__ */ c("div", { className: "astw:flex astw:flex-1", children: [
1764
- t.sidebar ?? /* @__PURE__ */ a(Aa, {}),
1765
- /* @__PURE__ */ c(ba, { className: "astw:w-[calc(100%-var(--sidebar-width))]", children: [
1830
+ return /* @__PURE__ */ a(ma, { className: "astw:flex astw:flex-col", children: /* @__PURE__ */ c("div", { className: "astw:flex astw:flex-1", children: [
1831
+ t.sidebar ?? /* @__PURE__ */ a(ka, {}),
1832
+ /* @__PURE__ */ c(pa, { className: "astw:w-[calc(100%-var(--sidebar-width))]", children: [
1766
1833
  /* @__PURE__ */ a("header", { className: "astw:flex astw:h-14 astw:shrink-0 astw:items-center astw:gap-2 astw:transition-[width,height] astw:ease-linear astw:group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ c("div", { className: "astw:flex astw:w-full astw:items-center astw:justify-between", children: [
1767
1834
  /* @__PURE__ */ c("div", { className: "astw:flex astw:items-center astw:gap-2", children: [
1768
- /* @__PURE__ */ a(Fa, {}),
1769
- /* @__PURE__ */ a(Wa, {})
1835
+ /* @__PURE__ */ a(_a, {}),
1836
+ /* @__PURE__ */ a(za, {})
1770
1837
  ] }),
1771
- /* @__PURE__ */ a("div", { className: "astw:flex astw:items-center astw:gap-2", children: /* @__PURE__ */ a(F, { variant: "outline", size: "icon", onClick: r, children: /* @__PURE__ */ a(Pe, {}) }) })
1838
+ /* @__PURE__ */ a("div", { className: "astw:flex astw:items-center astw:gap-2", children: /* @__PURE__ */ a(O, { variant: "outline", size: "icon", onClick: r, children: /* @__PURE__ */ a(ke, {}) }) })
1772
1839
  ] }) }),
1773
1840
  /* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-4 astw:flex-1 astw:min-h-0", children: e ?? /* @__PURE__ */ a(Nt, {}) })
1774
1841
  ] })
1775
1842
  ] }) });
1776
1843
  };
1777
- function Oa({
1844
+ function $a({
1778
1845
  ...t
1779
1846
  }) {
1780
1847
  return /* @__PURE__ */ a(v.Root, { "data-slot": "dialog", ...t });
1781
1848
  }
1782
- function ja({
1849
+ function Wa({
1783
1850
  ...t
1784
1851
  }) {
1785
1852
  return /* @__PURE__ */ a(v.Portal, { "data-slot": "dialog-portal", ...t });
1786
1853
  }
1787
- function Ua({
1854
+ function Fa({
1788
1855
  className: t,
1789
1856
  ...e
1790
1857
  }) {
1791
1858
  return /* @__PURE__ */ a(
1792
- v.Overlay,
1859
+ v.Backdrop,
1793
1860
  {
1794
1861
  "data-slot": "dialog-overlay",
1795
- className: h(
1796
- "astw:data-[state=open]:animate-in astw:data-[state=closed]:animate-out astw:data-[state=closed]:fade-out-0 astw:data-[state=open]:fade-in-0 astw:fixed astw:inset-0 astw:z-50 astw:bg-black/50",
1862
+ className: m(
1863
+ "astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:fixed astw:inset-0 astw:z-50 astw:bg-black/50",
1797
1864
  t
1798
1865
  ),
1799
1866
  ...e
1800
1867
  }
1801
1868
  );
1802
1869
  }
1803
- function Ka({
1870
+ function Oa({
1804
1871
  className: t,
1805
1872
  children: e,
1806
1873
  ...s
1807
1874
  }) {
1808
- return /* @__PURE__ */ c(ja, { "data-slot": "dialog-portal", children: [
1809
- /* @__PURE__ */ a(Ua, {}),
1875
+ return /* @__PURE__ */ c(Wa, { "data-slot": "dialog-portal", children: [
1876
+ /* @__PURE__ */ a(Fa, {}),
1810
1877
  /* @__PURE__ */ c(
1811
- v.Content,
1878
+ v.Popup,
1812
1879
  {
1813
1880
  "data-slot": "dialog-content",
1814
- className: h(
1815
- "astw:bg-background astw:data-[state=open]:animate-in astw:data-[state=closed]:animate-out astw:data-[state=closed]:fade-out-0 astw:data-[state=open]:fade-in-0 astw:data-[state=closed]:zoom-out-95 astw:data-[state=open]:zoom-in-95 astw:fixed astw:top-[50%] astw:left-[50%] astw:z-50 astw:grid astw:w-full astw:max-w-[calc(100%-2rem)] astw:translate-x-[-50%] astw:translate-y-[-50%] astw:gap-4 astw:rounded-lg astw:border astw:p-6 astw:shadow-lg astw:duration-200 astw:sm:max-w-lg",
1881
+ className: m(
1882
+ "astw:bg-background astw:data-open:animate-in astw:data-ending-style:animate-out astw:data-ending-style:fade-out-0 astw:data-open:fade-in-0 astw:data-ending-style:zoom-out-95 astw:data-open:zoom-in-95 astw:fixed astw:top-[50%] astw:left-[50%] astw:z-50 astw:grid astw:w-full astw:max-w-[calc(100%-2rem)] astw:translate-x-[-50%] astw:translate-y-[-50%] astw:gap-4 astw:rounded-lg astw:border astw:p-6 astw:shadow-lg astw:duration-200 astw:sm:max-w-lg",
1816
1883
  t
1817
1884
  ),
1818
1885
  ...s,
1819
1886
  children: [
1820
1887
  e,
1821
- /* @__PURE__ */ c(v.Close, { className: "astw:ring-offset-bg astw:focus:ring-ring astw:data-[state=open]:bg-accent astw:data-[state=open]:text-muted-foreground astw:absolute astw:top-4 astw:right-4 astw:rounded-xs astw:opacity-70 astw:transition-opacity astw:hover:opacity-100 astw:focus:ring-2 astw:focus:ring-offset-2 astw:focus:outline-hidden astw:disabled:pointer-events-none astw:[&_svg]:pointer-events-none astw:[&_svg]:shrink-0 astw:[&_svg:not([class*='size-'])]:size-4", children: [
1888
+ /* @__PURE__ */ c(v.Close, { className: "astw:ring-offset-bg astw:focus:ring-ring astw:data-open:bg-accent astw:data-open:text-muted-foreground astw:absolute astw:top-4 astw:right-4 astw:rounded-xs astw:opacity-70 astw:transition-opacity astw:hover:opacity-100 astw:focus:ring-2 astw:focus:ring-offset-2 astw:focus:outline-hidden astw:disabled:pointer-events-none astw:[&_svg]:pointer-events-none astw:[&_svg]:shrink-0 astw:[&_svg:not([class*='size-'])]:size-4", children: [
1822
1889
  /* @__PURE__ */ a(_t, {}),
1823
1890
  /* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Close" })
1824
1891
  ] })
@@ -1827,7 +1894,7 @@ function Ka({
1827
1894
  )
1828
1895
  ] });
1829
1896
  }
1830
- function Va({
1897
+ function ja({
1831
1898
  className: t,
1832
1899
  ...e
1833
1900
  }) {
@@ -1835,12 +1902,12 @@ function Va({
1835
1902
  v.Title,
1836
1903
  {
1837
1904
  "data-slot": "dialog-title",
1838
- className: h("astw:text-lg astw:leading-none astw:font-semibold", t),
1905
+ className: m("astw:text-lg astw:leading-none astw:font-semibold", t),
1839
1906
  ...e
1840
1907
  }
1841
1908
  );
1842
1909
  }
1843
- function Ha(t) {
1910
+ function Ua(t) {
1844
1911
  const e = [], s = (r, n, o) => {
1845
1912
  r.forEach((i) => {
1846
1913
  const l = [...o, i.title];
@@ -1861,33 +1928,33 @@ function Ha(t) {
1861
1928
  }), s(r.items, r.icon, [r.title]);
1862
1929
  }), e;
1863
1930
  }
1864
- function Ga({
1931
+ function Ka({
1865
1932
  routes: t
1866
1933
  }) {
1867
- const e = Se(), s = Ft(null), [r, n] = H(!1), [o, i] = H(""), [l, u] = H(0), w = M(
1868
- () => Ia(t, o),
1934
+ const e = ye(), s = Ft(null), [r, n] = H(!1), [o, i] = H(""), [l, u] = H(0), w = B(
1935
+ () => Ba(t, o),
1869
1936
  [t, o]
1870
- ), d = E((x) => {
1937
+ ), d = M((x) => {
1871
1938
  i(x), u(0);
1872
1939
  }, []);
1873
- W(() => {
1940
+ F(() => {
1874
1941
  const x = (b) => {
1875
1942
  (b.metaKey || b.ctrlKey) && b.key === "k" && (b.preventDefault(), n((k) => !k));
1876
1943
  };
1877
1944
  return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
1878
1945
  }, []);
1879
- const m = E((x) => {
1946
+ const h = M((x) => {
1880
1947
  n(x), x || (i(""), u(0));
1881
1948
  }, []);
1882
- W(() => {
1949
+ F(() => {
1883
1950
  s.current && s.current.querySelector(`[data-index="${l}"]`)?.scrollIntoView({ block: "nearest" });
1884
1951
  }, [l]);
1885
- const f = E(
1952
+ const p = M(
1886
1953
  (x) => {
1887
1954
  e(x.path), n(!1), i("");
1888
1955
  },
1889
1956
  [e]
1890
- ), g = E(
1957
+ ), g = M(
1891
1958
  (x) => {
1892
1959
  if (!x.nativeEvent.isComposing)
1893
1960
  switch (x.key) {
@@ -1900,28 +1967,28 @@ function Ga({
1900
1967
  x.preventDefault(), u((b) => b > 0 ? b - 1 : b);
1901
1968
  break;
1902
1969
  case "Enter":
1903
- x.preventDefault(), w[l] && f(w[l]);
1970
+ x.preventDefault(), w[l] && p(w[l]);
1904
1971
  break;
1905
1972
  }
1906
1973
  },
1907
- [w, l, f]
1974
+ [w, l, p]
1908
1975
  );
1909
1976
  return {
1910
1977
  open: r,
1911
- handleOpenChange: m,
1978
+ handleOpenChange: h,
1912
1979
  search: o,
1913
1980
  setSearch: d,
1914
1981
  selectedIndex: l,
1915
1982
  filteredRoutes: w,
1916
- handleSelect: f,
1983
+ handleSelect: p,
1917
1984
  handleKeyDown: g,
1918
1985
  listRef: s
1919
1986
  };
1920
1987
  }
1921
- function qa({
1988
+ function Va({
1922
1989
  navItems: t
1923
1990
  }) {
1924
- const e = A(), s = M(() => Ha(t), [t]), {
1991
+ const e = E(), s = B(() => Ua(t), [t]), {
1925
1992
  open: r,
1926
1993
  handleOpenChange: n,
1927
1994
  search: o,
@@ -1930,23 +1997,23 @@ function qa({
1930
1997
  filteredRoutes: u,
1931
1998
  handleSelect: w,
1932
1999
  handleKeyDown: d,
1933
- listRef: m
1934
- } = Ga({ routes: s });
1935
- return /* @__PURE__ */ a(Oa, { open: r, onOpenChange: n, children: /* @__PURE__ */ c(
1936
- Ka,
2000
+ listRef: h
2001
+ } = Ka({ routes: s });
2002
+ return /* @__PURE__ */ a($a, { open: r, onOpenChange: n, children: /* @__PURE__ */ c(
2003
+ Oa,
1937
2004
  {
1938
2005
  className: "astw:p-0 astw:gap-0 astw:sm:max-w-2xl astw:overflow-hidden",
1939
2006
  onKeyDown: d,
1940
2007
  "aria-describedby": void 0,
1941
2008
  children: [
1942
- /* @__PURE__ */ a(Va, { className: "astw:sr-only", children: e("commandPaletteSearch") }),
2009
+ /* @__PURE__ */ a(ja, { className: "astw:sr-only", children: e("commandPaletteSearch") }),
1943
2010
  /* @__PURE__ */ c("div", { className: "astw:flex astw:items-center astw:border-b astw:px-3 astw:py-1", children: [
1944
- /* @__PURE__ */ a(Ae, { className: "astw:mr-2 astw:h-4 astw:w-4 astw:shrink-0 astw:opacity-50" }),
2011
+ /* @__PURE__ */ a(Re, { className: "astw:mr-2 astw:h-4 astw:w-4 astw:shrink-0 astw:opacity-50" }),
1945
2012
  /* @__PURE__ */ a(
1946
- ca,
2013
+ oa,
1947
2014
  {
1948
2015
  value: o,
1949
- onChange: (f) => i(f.target.value),
2016
+ onChange: (p) => i(p.target.value),
1950
2017
  placeholder: e("commandPaletteSearch"),
1951
2018
  className: "astw:flex astw:h-10 astw:w-full astw:rounded-md astw:bg-transparent astw:py-3 astw:text-sm astw:outline-none astw:border-0 astw:shadow-none astw:focus-visible:ring-0 astw:placeholder:text-muted-foreground astw:disabled:cursor-not-allowed astw:disabled:opacity-50",
1952
2019
  autoFocus: !0
@@ -1956,26 +2023,26 @@ function qa({
1956
2023
  /* @__PURE__ */ a(
1957
2024
  "div",
1958
2025
  {
1959
- ref: m,
2026
+ ref: h,
1960
2027
  className: "astw:max-h-75 astw:overflow-y-auto astw:overflow-x-hidden",
1961
- children: u.length === 0 ? /* @__PURE__ */ a("div", { className: "astw:py-6 astw:text-center astw:text-sm astw:text-muted-foreground", children: e("commandPaletteNoResults") }) : /* @__PURE__ */ a("div", { className: "astw:p-1", children: u.map((f, g) => /* @__PURE__ */ c(
2028
+ children: u.length === 0 ? /* @__PURE__ */ a("div", { className: "astw:py-6 astw:text-center astw:text-sm astw:text-muted-foreground", children: e("commandPaletteNoResults") }) : /* @__PURE__ */ a("div", { className: "astw:p-1", children: u.map((p, g) => /* @__PURE__ */ c(
1962
2029
  "button",
1963
2030
  {
1964
2031
  "data-index": g,
1965
- onClick: () => w(f),
1966
- className: h(
2032
+ onClick: () => w(p),
2033
+ className: m(
1967
2034
  "astw:relative astw:flex astw:flex-col astw:w-full astw:cursor-pointer astw:select-none astw:items-start astw:rounded-sm astw:px-2 astw:py-2 astw:text-sm astw:outline-none astw:text-left",
1968
2035
  g === l ? "astw:bg-accent astw:text-accent-foreground" : "astw:hover:bg-accent astw:hover:text-accent-foreground"
1969
2036
  ),
1970
2037
  children: [
1971
- /* @__PURE__ */ a("span", { className: "astw:truncate astw:w-full astw:text-left", children: f.breadcrumb.join(" > ") }),
2038
+ /* @__PURE__ */ a("span", { className: "astw:truncate astw:w-full astw:text-left", children: p.breadcrumb.join(" > ") }),
1972
2039
  /* @__PURE__ */ c("span", { className: "astw:text-[11px] astw:text-muted-foreground astw:truncate astw:w-full astw:text-left", children: [
1973
2040
  "/",
1974
- f.path
2041
+ p.path
1975
2042
  ] })
1976
2043
  ]
1977
2044
  },
1978
- f.path
2045
+ p.path
1979
2046
  )) })
1980
2047
  }
1981
2048
  )
@@ -1985,11 +2052,11 @@ function qa({
1985
2052
  }
1986
2053
  function Ks() {
1987
2054
  const t = Qt();
1988
- return /* @__PURE__ */ a(it, { fallback: null, children: /* @__PURE__ */ a(zt, { resolve: t, children: (e) => /* @__PURE__ */ a(qa, { navItems: e ?? [] }) }) });
2055
+ return /* @__PURE__ */ a(it, { fallback: null, children: /* @__PURE__ */ a(zt, { resolve: t, children: (e) => /* @__PURE__ */ a(Va, { navItems: e ?? [] }) }) });
1989
2056
  }
1990
- function Qa(t, e, s) {
2057
+ function Ha(t, e, s) {
1991
2058
  if (s.current === null || s.current.contextData !== e || s.current.guards !== t) {
1992
- const r = Za(t, e), n = {
2059
+ const r = Qa(t, e), n = {
1993
2060
  contextData: e,
1994
2061
  guards: t,
1995
2062
  promise: r,
@@ -2006,7 +2073,7 @@ function Qa(t, e, s) {
2006
2073
  }
2007
2074
  return s.current;
2008
2075
  }
2009
- function Ya(t) {
2076
+ function Ga(t) {
2010
2077
  const { state: e } = t;
2011
2078
  switch (e.status) {
2012
2079
  case "fulfilled":
@@ -2018,9 +2085,9 @@ function Ya(t) {
2018
2085
  }
2019
2086
  }
2020
2087
  const Vs = (t) => {
2021
- const { guards: e, children: s, fallback: r = null, loading: n = null } = t, { contextData: o } = jt(), i = Ft(null), l = Qa(e, o, i);
2022
- return /* @__PURE__ */ a(it, { fallback: n, children: /* @__PURE__ */ a(Xa, { cache: l, children: s, fallback: r }) });
2023
- }, Xa = (t) => Ya(t.cache).type === "pass" ? /* @__PURE__ */ a(S, { children: t.children }) : /* @__PURE__ */ a(S, { children: t.fallback }), Za = async (t, e) => {
2088
+ const { guards: e, children: s, fallback: r = null, loading: n = null } = t, { contextData: o } = jt(), i = Ft(null), l = Ha(e, o, i);
2089
+ return /* @__PURE__ */ a(it, { fallback: n, children: /* @__PURE__ */ a(qa, { cache: l, children: s, fallback: r }) });
2090
+ }, qa = (t) => Ga(t.cache).type === "pass" ? /* @__PURE__ */ a(S, { children: t.children }) : /* @__PURE__ */ a(S, { children: t.fallback }), Qa = async (t, e) => {
2024
2091
  const s = { context: e };
2025
2092
  for (const r of t) {
2026
2093
  const n = await r(s);
@@ -2029,14 +2096,14 @@ const Vs = (t) => {
2029
2096
  }
2030
2097
  return { type: "pass" };
2031
2098
  };
2032
- function Ja(t) {
2099
+ function Ya(t) {
2033
2100
  const e = new URLSearchParams(t.search);
2034
2101
  e.delete("code"), e.delete("state");
2035
2102
  const s = e.toString();
2036
2103
  return t.pathname + (s ? `?${s}` : "") + t.hash;
2037
2104
  }
2038
2105
  function Hs(t) {
2039
- const e = ze(t), { appUri: s } = t;
2106
+ const e = De(t), { appUri: s } = t;
2040
2107
  return {
2041
2108
  ...e,
2042
2109
  getAppUri() {
@@ -2049,18 +2116,18 @@ function Hs(t) {
2049
2116
  };
2050
2117
  }
2051
2118
  const ie = X(null), Gs = (t) => {
2052
- const e = t.client, s = E(
2119
+ const e = t.client, s = M(
2053
2120
  (l) => e.addEventListener((u) => {
2054
2121
  u.type === "auth_state_changed" && l();
2055
2122
  }),
2056
2123
  [e]
2057
- ), r = E(() => e.getState(), [e]), n = Wt(s, r);
2058
- W(() => {
2124
+ ), r = M(() => e.getState(), [e]), n = Wt(s, r);
2125
+ F(() => {
2059
2126
  (async () => {
2060
2127
  if (new URLSearchParams(window.location.search).has("code"))
2061
2128
  try {
2062
2129
  await e.handleCallback();
2063
- const w = Ja(
2130
+ const w = Ya(
2064
2131
  new URL(window.location.href)
2065
2132
  );
2066
2133
  window.history.replaceState({}, "", w);
@@ -2070,7 +2137,7 @@ const ie = X(null), Gs = (t) => {
2070
2137
  else
2071
2138
  await e.checkAuthStatus();
2072
2139
  })();
2073
- }, [e]), W(() => {
2140
+ }, [e]), F(() => {
2074
2141
  t.autoLogin && (!n.isReady || n.isAuthenticated || e.login());
2075
2142
  }, [n.isReady, n.isAuthenticated, t.autoLogin, e]);
2076
2143
  const o = n.isAuthenticated, i = t.guardComponent && (!n.isReady || !o) ? /* @__PURE__ */ a(t.guardComponent, {}) : t.children;
@@ -2116,7 +2183,7 @@ const ie = X(null), Gs = (t) => {
2116
2183
  logout: t.logout,
2117
2184
  checkAuthStatus: t.checkAuthStatus
2118
2185
  };
2119
- }, Ys = () => De, ts = ot(
2186
+ }, Ys = () => Me, Xa = ot(
2120
2187
  "astw:inline-flex astw:items-center astw:rounded-md astw:border astw:px-2 astw:py-0.5 astw:text-xs astw:font-medium astw:transition-colors astw:focus:outline-none astw:focus:ring-2 astw:focus:ring-ring astw:focus:ring-offset-2",
2121
2188
  {
2122
2189
  variants: {
@@ -2138,35 +2205,28 @@ const ie = X(null), Gs = (t) => {
2138
2205
  variant: "default"
2139
2206
  }
2140
2207
  }
2141
- ), es = {
2208
+ ), Za = {
2142
2209
  "outline-success": "astw:bg-green-500",
2143
2210
  "outline-warning": "astw:bg-orange-500",
2144
2211
  "outline-error": "astw:bg-red-500",
2145
2212
  "outline-info": "astw:bg-blue-500",
2146
2213
  "outline-neutral": "astw:bg-neutral-400"
2147
2214
  };
2148
- function as({ variant: t }) {
2149
- const e = es[t];
2150
- return e ? /* @__PURE__ */ a("div", { className: "astw:size-3 astw:shrink-0 astw:flex astw:items-center astw:justify-center", children: /* @__PURE__ */ a("div", { className: h("astw:size-[7px] astw:rounded-full", e) }) }) : null;
2215
+ function Ja({ variant: t }) {
2216
+ const e = Za[t];
2217
+ return e ? /* @__PURE__ */ a("div", { className: "astw:size-3 astw:shrink-0 astw:flex astw:items-center astw:justify-center", children: /* @__PURE__ */ a("div", { className: m("astw:size-[7px] astw:rounded-full", e) }) }) : null;
2151
2218
  }
2152
- function ss({ className: t, variant: e, children: s, ...r }) {
2219
+ function ts({ className: t, variant: e, children: s, ...r }) {
2153
2220
  const n = e?.toString().startsWith("outline-");
2154
- return /* @__PURE__ */ c(
2155
- "div",
2156
- {
2157
- className: h(ts({ variant: e }), t),
2158
- ...r,
2159
- children: [
2160
- n && /* @__PURE__ */ a(as, { variant: e }),
2161
- s
2162
- ]
2163
- }
2164
- );
2221
+ return /* @__PURE__ */ c("div", { className: m(Xa({ variant: e }), t), ...r, children: [
2222
+ n && /* @__PURE__ */ a(Ja, { variant: e }),
2223
+ s
2224
+ ] });
2165
2225
  }
2166
- function rs(t) {
2226
+ function es(t) {
2167
2227
  return t.type === "divider";
2168
2228
  }
2169
- function ns(t) {
2229
+ function as(t) {
2170
2230
  return t.type !== "divider" && "key" in t;
2171
2231
  }
2172
2232
  function Z(t, e) {
@@ -2178,10 +2238,10 @@ function Z(t, e) {
2178
2238
  function N(t) {
2179
2239
  return t == null || t === "";
2180
2240
  }
2181
- function os(t) {
2241
+ function ss(t) {
2182
2242
  return t.toLowerCase().replace(/_/g, " ").replace(/^\w/, (e) => e.toUpperCase());
2183
2243
  }
2184
- function is(t, e = "medium") {
2244
+ function rs(t, e = "medium") {
2185
2245
  if (N(t)) return "";
2186
2246
  const s = t instanceof Date ? t : new Date(String(t));
2187
2247
  if (isNaN(s.getTime())) return String(t);
@@ -2213,7 +2273,7 @@ function is(t, e = "medium") {
2213
2273
  return s.toLocaleDateString();
2214
2274
  }
2215
2275
  }
2216
- function ls(t, e) {
2276
+ function ns(t, e) {
2217
2277
  if (N(t)) return "";
2218
2278
  const s = typeof t == "number" ? t : parseFloat(String(t));
2219
2279
  if (isNaN(s)) return String(t);
@@ -2226,7 +2286,7 @@ function ls(t, e) {
2226
2286
  return `${e || "$"}${s.toFixed(2)}`;
2227
2287
  }
2228
2288
  }
2229
- function cs(t) {
2289
+ function os(t) {
2230
2290
  if (N(t)) return [];
2231
2291
  if (typeof t == "string")
2232
2292
  return t.split(/[,\n]/).map((e) => e.trim()).filter(Boolean);
@@ -2243,37 +2303,42 @@ function cs(t) {
2243
2303
  return [String(t)];
2244
2304
  }
2245
2305
  function ce({ value: t }) {
2246
- const [e, s] = p.useState(!1);
2247
- return /* @__PURE__ */ c(mt, { children: [
2248
- /* @__PURE__ */ a(ft, { asChild: !0, children: /* @__PURE__ */ a(
2249
- "button",
2306
+ const [e, s] = f.useState(!1);
2307
+ return /* @__PURE__ */ c(ht, { children: [
2308
+ /* @__PURE__ */ a(
2309
+ pt,
2250
2310
  {
2251
- onClick: async (n) => {
2252
- n.stopPropagation();
2253
- try {
2254
- await navigator.clipboard.writeText(t), s(!0), setTimeout(() => s(!1), 2e3);
2255
- } catch {
2311
+ render: /* @__PURE__ */ a(
2312
+ "button",
2313
+ {
2314
+ onClick: async (n) => {
2315
+ n.stopPropagation();
2316
+ try {
2317
+ await navigator.clipboard.writeText(t), s(!0), setTimeout(() => s(!1), 2e3);
2318
+ } catch {
2319
+ }
2320
+ },
2321
+ className: "astw:ml-0.5 astw:inline-flex astw:items-center astw:justify-center astw:p-1 astw:rounded astw:hover:bg-muted astw:transition-colors astw:text-muted-foreground astw:hover:text-foreground"
2256
2322
  }
2257
- },
2258
- className: "astw:ml-0.5 astw:inline-flex astw:items-center astw:justify-center astw:p-1 astw:rounded astw:hover:bg-muted astw:transition-colors astw:text-muted-foreground astw:hover:text-foreground",
2259
- children: e ? /* @__PURE__ */ a(Ee, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 }) : /* @__PURE__ */ a(Me, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 })
2323
+ ),
2324
+ children: e ? /* @__PURE__ */ a(Pe, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 }) : /* @__PURE__ */ a(Ae, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 })
2260
2325
  }
2261
- ) }),
2262
- /* @__PURE__ */ a(pt, { side: "top", children: e ? "Copied!" : "Copy" })
2326
+ ),
2327
+ /* @__PURE__ */ a(ft, { side: "top", children: e ? "Copied!" : "Copy" })
2263
2328
  ] });
2264
2329
  }
2265
2330
  const T = "–";
2266
- function ds({ field: t }) {
2267
- const e = N(t.value) ? T : String(t.value), s = t.meta?.copyable && !N(t.value), r = t.meta?.truncateLines, n = p.useRef(null), [o, i] = p.useState(!1);
2268
- p.useEffect(() => {
2331
+ function is({ field: t }) {
2332
+ const e = N(t.value) ? T : String(t.value), s = t.meta?.copyable && !N(t.value), r = t.meta?.truncateLines, n = f.useRef(null), [o, i] = f.useState(!1);
2333
+ f.useEffect(() => {
2269
2334
  if (!r) {
2270
2335
  i(!1);
2271
2336
  return;
2272
2337
  }
2273
2338
  const w = () => {
2274
2339
  if (n.current) {
2275
- const m = n.current;
2276
- i(m.scrollHeight > m.clientHeight + 1);
2340
+ const h = n.current;
2341
+ i(h.scrollHeight > h.clientHeight + 1);
2277
2342
  }
2278
2343
  }, d = setTimeout(w, 50);
2279
2344
  return window.addEventListener("resize", w), () => {
@@ -2297,30 +2362,30 @@ function ds({ field: t }) {
2297
2362
  ),
2298
2363
  s && /* @__PURE__ */ a(ce, { value: String(t.value) })
2299
2364
  ] });
2300
- return r && o ? /* @__PURE__ */ c(mt, { children: [
2301
- /* @__PURE__ */ a(ft, { asChild: !0, children: /* @__PURE__ */ a("span", { className: "astw:cursor-default", children: u }) }),
2302
- /* @__PURE__ */ a(pt, { side: "bottom", style: { maxWidth: 320 }, children: /* @__PURE__ */ a("p", { className: "astw:text-sm", children: e }) })
2365
+ return r && o ? /* @__PURE__ */ c(ht, { children: [
2366
+ /* @__PURE__ */ a(pt, { render: /* @__PURE__ */ a("span", { className: "astw:cursor-default" }), children: u }),
2367
+ /* @__PURE__ */ a(ft, { side: "bottom", style: { maxWidth: 320 }, children: /* @__PURE__ */ a("p", { className: "astw:text-sm", children: e }) })
2303
2368
  ] }) : u;
2304
2369
  }
2305
- function us({ field: t }) {
2370
+ function ls({ field: t }) {
2306
2371
  if (N(t.value))
2307
2372
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: T });
2308
2373
  const e = String(t.value), s = t.meta?.badgeVariantMap || {}, r = e.toLowerCase(), n = s[e] || s[r] || "outline-neutral";
2309
- return /* @__PURE__ */ a(ss, { variant: n, className: "astw:w-fit", children: os(e) });
2374
+ return /* @__PURE__ */ a(ts, { variant: n, className: "astw:w-fit", children: ss(e) });
2310
2375
  }
2311
- function ws({ field: t }) {
2376
+ function cs({ field: t }) {
2312
2377
  if (N(t.value))
2313
2378
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: T });
2314
- const e = t.meta?.currencyKey || "currency", s = Z(t.data, e), r = ls(t.value, s);
2379
+ const e = t.meta?.currencyKey || "currency", s = Z(t.data, e), r = ns(t.value, s);
2315
2380
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:tabular-nums", children: r });
2316
2381
  }
2317
- function hs({ field: t }) {
2382
+ function ds({ field: t }) {
2318
2383
  if (N(t.value))
2319
2384
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: T });
2320
- const e = t.meta?.dateFormat || "medium", s = is(t.value, e);
2385
+ const e = t.meta?.dateFormat || "medium", s = rs(t.value, e);
2321
2386
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: s });
2322
2387
  }
2323
- function ms({ field: t }) {
2388
+ function us({ field: t }) {
2324
2389
  if (N(t.value))
2325
2390
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: T });
2326
2391
  const e = t.meta?.hrefKey, s = e ? Z(t.data, e) : void 0, r = t.meta?.external ?? !1, n = String(t.value);
@@ -2338,57 +2403,64 @@ function ms({ field: t }) {
2338
2403
  }
2339
2404
  ) : /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: n });
2340
2405
  }
2341
- function fs({ field: t }) {
2406
+ function ws({ field: t }) {
2342
2407
  if (N(t.value))
2343
2408
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: T });
2344
- const e = cs(t.value), s = t.meta?.copyable && !N(t.value), r = e.join(`
2409
+ const e = os(t.value), s = t.meta?.copyable && !N(t.value), r = e.join(`
2345
2410
  `);
2346
2411
  return /* @__PURE__ */ c("div", { className: "astw:flex astw:items-start astw:gap-1 astw:min-w-0", children: [
2347
- /* @__PURE__ */ a("address", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:not-italic", children: e.map((n, o) => /* @__PURE__ */ c(p.Fragment, { children: [
2412
+ /* @__PURE__ */ a("address", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:not-italic", children: e.map((n, o) => /* @__PURE__ */ c(f.Fragment, { children: [
2348
2413
  n,
2349
2414
  o < e.length - 1 && /* @__PURE__ */ a("br", {})
2350
2415
  ] }, o)) }),
2351
2416
  s && /* @__PURE__ */ a(ce, { value: r })
2352
2417
  ] });
2353
2418
  }
2354
- function ps({ field: t }) {
2419
+ function ms({ field: t }) {
2355
2420
  if (N(t.value))
2356
2421
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: T });
2357
2422
  const e = t.meta?.referenceIdKey, s = t.meta?.referenceUrlPattern, r = e ? Z(t.data, e) : void 0, n = String(t.value);
2358
2423
  if (!r || !s)
2359
2424
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: n });
2360
2425
  const o = s.replace("{id}", r);
2361
- return /* @__PURE__ */ a("a", { href: o, className: "astw:text-sm astw:text-primary astw:hover:underline", children: n });
2426
+ return /* @__PURE__ */ a(
2427
+ "a",
2428
+ {
2429
+ href: o,
2430
+ className: "astw:text-sm astw:text-primary astw:hover:underline",
2431
+ children: n
2432
+ }
2433
+ );
2362
2434
  }
2363
2435
  function Lt(t) {
2364
2436
  switch (t.type) {
2365
2437
  case "text":
2366
- return /* @__PURE__ */ a(ds, { field: t });
2438
+ return /* @__PURE__ */ a(is, { field: t });
2367
2439
  case "badge":
2368
- return /* @__PURE__ */ a(us, { field: t });
2440
+ return /* @__PURE__ */ a(ls, { field: t });
2369
2441
  case "money":
2370
- return /* @__PURE__ */ a(ws, { field: t });
2442
+ return /* @__PURE__ */ a(cs, { field: t });
2371
2443
  case "date":
2372
- return /* @__PURE__ */ a(hs, { field: t });
2444
+ return /* @__PURE__ */ a(ds, { field: t });
2373
2445
  case "link":
2374
- return /* @__PURE__ */ a(ms, { field: t });
2446
+ return /* @__PURE__ */ a(us, { field: t });
2375
2447
  case "address":
2376
- return /* @__PURE__ */ a(fs, { field: t });
2448
+ return /* @__PURE__ */ a(ws, { field: t });
2377
2449
  case "reference":
2378
- return /* @__PURE__ */ a(ps, { field: t });
2450
+ return /* @__PURE__ */ a(ms, { field: t });
2379
2451
  default:
2380
2452
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: T });
2381
2453
  }
2382
2454
  }
2383
- function gs(t) {
2455
+ function hs(t) {
2384
2456
  if (t.emptyBehavior !== "hide") return !1;
2385
2457
  const e = t.value;
2386
2458
  return e == null || e === "";
2387
2459
  }
2388
- function bs(t) {
2460
+ function ps(t) {
2389
2461
  return !1;
2390
2462
  }
2391
- function xs(t, e, s) {
2463
+ function fs(t, e, s) {
2392
2464
  const r = Z(e, t.key);
2393
2465
  return {
2394
2466
  id: `${t.key}-${s}`,
@@ -2400,15 +2472,18 @@ function xs(t, e, s) {
2400
2472
  data: e
2401
2473
  };
2402
2474
  }
2403
- function vs(t, e) {
2475
+ function gs(t, e) {
2404
2476
  const s = [];
2405
2477
  let r = [], n = 0, o = 0;
2406
2478
  for (const i of t)
2407
- if (rs(i))
2408
- r.length > 0 && (s.push({ id: `section-${n}`, fields: r }), n++, r = []);
2409
- else if (ns(i)) {
2410
- const l = xs(i, e, o);
2411
- o++, gs(l) || r.push(l);
2479
+ if (es(i))
2480
+ r.length > 0 && (s.push({
2481
+ id: `section-${n}`,
2482
+ fields: r
2483
+ }), n++, r = []);
2484
+ else if (as(i)) {
2485
+ const l = fs(i, e, o);
2486
+ o++, hs(l) || r.push(l);
2412
2487
  }
2413
2488
  return r.length > 0 && s.push({ id: `section-${n}`, fields: r }), s;
2414
2489
  }
@@ -2416,7 +2491,7 @@ function It({ label: t, children: e, fullWidth: s }) {
2416
2491
  return /* @__PURE__ */ c(
2417
2492
  "div",
2418
2493
  {
2419
- className: h(
2494
+ className: m(
2420
2495
  "astw:flex astw:flex-col astw:gap-1 astw:min-w-0 astw:py-2",
2421
2496
  s && "astw:col-span-full"
2422
2497
  ),
@@ -2435,7 +2510,7 @@ function Xs({
2435
2510
  className: n,
2436
2511
  headerAction: o
2437
2512
  }) {
2438
- const i = vs(s, t), l = i.some((d) => d.fields.length > 0), u = h(
2513
+ const i = gs(s, t), l = i.some((d) => d.fields.length > 0), u = m(
2439
2514
  "astw:grid astw:gap-x-6 astw:gap-y-4",
2440
2515
  // Default: 1 column
2441
2516
  "astw:grid-cols-1",
@@ -2448,16 +2523,16 @@ function Xs({
2448
2523
  "astw:@[400px]:grid-cols-2 astw:@[600px]:grid-cols-3"
2449
2524
  )
2450
2525
  ), w = (d) => {
2451
- const m = d.fields.filter((g) => !0), f = d.fields.filter((g) => bs());
2526
+ const h = d.fields.filter((g) => !0), p = d.fields.filter((g) => ps());
2452
2527
  return /* @__PURE__ */ c("div", { className: "astw:space-y-4", children: [
2453
- m.length > 0 && /* @__PURE__ */ a("div", { className: u, children: m.map((g) => /* @__PURE__ */ a(It, { label: g.label, children: Lt(g) }, g.id)) }),
2454
- f.length > 0 && /* @__PURE__ */ a("div", { className: u, children: f.map((g) => /* @__PURE__ */ a(It, { label: g.label, fullWidth: !0, children: Lt(g) }, g.id)) })
2528
+ h.length > 0 && /* @__PURE__ */ a("div", { className: u, children: h.map((g) => /* @__PURE__ */ a(It, { label: g.label, children: Lt(g) }, g.id)) }),
2529
+ p.length > 0 && /* @__PURE__ */ a("div", { className: u, children: p.map((g) => /* @__PURE__ */ a(It, { label: g.label, fullWidth: !0, children: Lt(g) }, g.id)) })
2455
2530
  ] }, d.id);
2456
2531
  };
2457
- return /* @__PURE__ */ a(ht, { delayDuration: 300, children: /* @__PURE__ */ c(
2532
+ return /* @__PURE__ */ a(mt, { delayDuration: 300, children: /* @__PURE__ */ c(
2458
2533
  "div",
2459
2534
  {
2460
- className: h(
2535
+ className: m(
2461
2536
  "astw:@container astw:bg-card astw:text-card-foreground astw:rounded-xl astw:border",
2462
2537
  n
2463
2538
  ),
@@ -2466,27 +2541,33 @@ function Xs({
2466
2541
  /* @__PURE__ */ a("h3", { className: "astw:text-lg astw:font-semibold astw:leading-none", children: e }),
2467
2542
  o && /* @__PURE__ */ a("div", { children: o })
2468
2543
  ] }),
2469
- /* @__PURE__ */ a("div", { className: "astw:px-6 astw:pb-4", children: l ? /* @__PURE__ */ a("div", { className: "astw:space-y-4", children: i.map((d, m) => /* @__PURE__ */ c(p.Fragment, { children: [
2470
- m > 0 && /* @__PURE__ */ a("div", { className: "astw:h-px astw:bg-border", role: "separator" }),
2544
+ /* @__PURE__ */ a("div", { className: "astw:px-6 astw:pb-4", children: l ? /* @__PURE__ */ a("div", { className: "astw:space-y-4", children: i.map((d, h) => /* @__PURE__ */ c(f.Fragment, { children: [
2545
+ h > 0 && /* @__PURE__ */ a(
2546
+ "div",
2547
+ {
2548
+ className: "astw:h-px astw:bg-border",
2549
+ role: "separator"
2550
+ }
2551
+ ),
2471
2552
  w(d)
2472
2553
  ] }, d.id)) }) : /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground", children: "No information available" }) })
2473
2554
  ]
2474
2555
  }
2475
2556
  ) });
2476
2557
  }
2477
- const xt = p.forwardRef(
2558
+ const xt = f.forwardRef(
2478
2559
  ({ className: t, children: e, ...s }, r) => /* @__PURE__ */ a(
2479
2560
  "div",
2480
2561
  {
2481
2562
  ref: r,
2482
- className: h("astw:min-w-0 astw:flex astw:flex-col astw:gap-4", t),
2563
+ className: m("astw:min-w-0 astw:flex astw:flex-col astw:gap-4", t),
2483
2564
  ...s,
2484
2565
  children: e
2485
2566
  }
2486
2567
  )
2487
2568
  );
2488
2569
  xt.displayName = "Layout.Column";
2489
- function ys({
2570
+ function bs({
2490
2571
  columns: t,
2491
2572
  className: e,
2492
2573
  gap: s = 4,
@@ -2495,13 +2576,13 @@ function ys({
2495
2576
  children: o
2496
2577
  }) {
2497
2578
  if (process.env.NODE_ENV !== "production") {
2498
- const m = p.Children.toArray(o).reduce((f, g) => p.isValidElement(g) && g.type === xt ? f + 1 : f, 0);
2499
- if (m !== t)
2579
+ const h = f.Children.toArray(o).reduce((p, g) => f.isValidElement(g) && g.type === xt ? p + 1 : p, 0);
2580
+ if (h !== t)
2500
2581
  throw new Error(
2501
- `Layout: Expected exactly ${t} Layout.Column child${t === 1 ? "" : "ren"}, but found ${m}. Please ensure the number of <Layout.Column> children matches the \`columns={${t}}\` prop.`
2582
+ `Layout: Expected exactly ${t} Layout.Column child${t === 1 ? "" : "ren"}, but found ${h}. Please ensure the number of <Layout.Column> children matches the \`columns={${t}}\` prop.`
2502
2583
  );
2503
2584
  }
2504
- const l = h(
2585
+ const l = m(
2505
2586
  "astw:flex astw:w-full",
2506
2587
  s === 4 ? "astw:gap-4" : s === 6 ? "astw:gap-6" : s === 8 ? "astw:gap-8" : "astw:gap-4",
2507
2588
  // 1 column: Always stack vertically
@@ -2519,19 +2600,19 @@ function ys({
2519
2600
  "astw:xl:flex-row"
2520
2601
  ],
2521
2602
  e
2522
- ), u = p.useMemo(() => t === 1 ? p.Children.map(o, (d) => d) : t === 2 ? p.Children.map(o, (d, m) => p.isValidElement(d) ? p.cloneElement(d, {
2523
- className: h(
2603
+ ), u = f.useMemo(() => t === 1 ? f.Children.map(o, (d) => d) : t === 2 ? f.Children.map(o, (d, h) => f.isValidElement(d) ? f.cloneElement(d, {
2604
+ className: m(
2524
2605
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- React child props type is not known
2525
2606
  d.props.className,
2526
- m === 0 ? "astw:lg:flex-1" : "astw:lg:min-w-[280px]"
2607
+ h === 0 ? "astw:lg:flex-1" : "astw:lg:min-w-[280px]"
2527
2608
  // Second column: fixed 280px
2528
2609
  )
2529
2610
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- React.cloneElement requires type assertion
2530
- }) : d) : t === 3 ? p.Children.map(o, (d, m) => p.isValidElement(d) ? p.cloneElement(d, {
2531
- className: h(
2611
+ }) : d) : t === 3 ? f.Children.map(o, (d, h) => f.isValidElement(d) ? f.cloneElement(d, {
2612
+ className: m(
2532
2613
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- React child props type is not known
2533
2614
  d.props.className,
2534
- m === 0 ? "astw:xl:min-w-[320px]" : m === 2 ? "astw:xl:min-w-[280px]" : "astw:xl:flex-1"
2615
+ h === 0 ? "astw:xl:min-w-[320px]" : h === 2 ? "astw:xl:min-w-[280px]" : "astw:xl:flex-1"
2535
2616
  // Middle column: flexible
2536
2617
  )
2537
2618
  // eslint-disable-next-line @typescript-eslint/no-explicit-any -- React.cloneElement requires type assertion
@@ -2544,14 +2625,14 @@ function ys({
2544
2625
  style: { padding: "1.5rem", paddingBottom: "1rem" },
2545
2626
  children: [
2546
2627
  r && /* @__PURE__ */ a("h1", { style: { fontSize: "1.5rem", fontWeight: "bold" }, children: r }),
2547
- n && n.length > 0 && /* @__PURE__ */ a("div", { className: "astw:flex astw:gap-2 astw:items-center", children: n.map((d, m) => /* @__PURE__ */ a(p.Fragment, { children: d }, m)) })
2628
+ n && n.length > 0 && /* @__PURE__ */ a("div", { className: "astw:flex astw:gap-2 astw:items-center", children: n.map((d, h) => /* @__PURE__ */ a(f.Fragment, { children: d }, h)) })
2548
2629
  ]
2549
2630
  }
2550
2631
  ),
2551
2632
  /* @__PURE__ */ a("div", { style: { padding: w ? "0 1.5rem 1.5rem 1.5rem" : "1.5rem" }, children: /* @__PURE__ */ a("div", { className: l, children: u }) })
2552
2633
  ] });
2553
2634
  }
2554
- ys.Column = xt;
2635
+ bs.Column = xt;
2555
2636
  function Zs() {
2556
2637
  return {
2557
2638
  for(t, ...e) {
@@ -2563,21 +2644,21 @@ function Zs() {
2563
2644
  export {
2564
2645
  te as AppShell,
2565
2646
  Gs as AuthProvider,
2566
- ss as Badge,
2647
+ ts as Badge,
2567
2648
  Ks as CommandPalette,
2568
- Aa as DefaultSidebar,
2649
+ ka as DefaultSidebar,
2569
2650
  Xs as DescriptionCard,
2570
- ys as Layout,
2651
+ bs as Layout,
2571
2652
  er as Link,
2572
2653
  Os as SidebarGroup,
2573
2654
  Fs as SidebarItem,
2574
2655
  Us as SidebarLayout,
2575
2656
  js as SidebarSeparator,
2576
2657
  Vs as WithGuard,
2577
- ts as badgeVariants,
2658
+ Xa as badgeVariants,
2578
2659
  Hs as createAuthClient,
2579
2660
  Zs as createTypedPaths,
2580
- Oe as defineI18nLabels,
2661
+ $e as defineI18nLabels,
2581
2662
  $s as defineModule,
2582
2663
  Ws as defineResource,
2583
2664
  zs as hidden,
@@ -2590,10 +2671,10 @@ export {
2590
2671
  Qs as useAuthSuspense,
2591
2672
  ar as useLocation,
2592
2673
  sr as useNavigate,
2593
- Ta as usePageMeta,
2674
+ Na as usePageMeta,
2594
2675
  rr as useParams,
2595
2676
  nr as useRouteError,
2596
2677
  or as useSearchParams,
2597
- Je as useTheme,
2678
+ Ye as useTheme,
2598
2679
  Ys as useToast
2599
2680
  };