@tailor-platform/app-shell 0.24.0 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app-shell.js CHANGED
@@ -1,25 +1,24 @@
1
- import { jsx as a, jsxs as d, Fragment as B } from "react/jsx-runtime";
2
- import { capitalCase as A } from "change-case";
3
- import { useRouteError as Yt, isRouteErrorResponse as Xt, redirect as kt, Outlet as G, NavLink as Zt, Navigate as Jt, useRouteLoaderData as te, createMemoryRouter as ee, createBrowserRouter as ae, RouterProvider as se, useHref as re, Link as ne, useLocation as Rt, Await as Et, useMatch as oe, useNavigate as ie } from "react-router";
4
- import { Link as xs, useLocation as vs, useNavigate as ys, useParams as Ns, useRouteError as Cs, useSearchParams as Ss } from "react-router";
1
+ import { jsx as a, jsxs as d, Fragment as E } from "react/jsx-runtime";
2
+ import { capitalCase as I } from "change-case";
3
+ import { useRouteError as Xt, isRouteErrorResponse as Zt, redirect as Rt, Outlet as X, NavLink as Jt, Navigate as te, useRouteLoaderData as ee, createMemoryRouter as ae, createBrowserRouter as se, RouterProvider as re, useHref as ne, Link as oe, useLocation as Et, Await as Bt, useMatch as ie, useNavigate as le } from "react-router";
4
+ import { Link as Cs, useLocation as Ts, useNavigate as ks, useParams as Rs, useRouteError as Es, useSearchParams as Bs } from "react-router";
5
5
  import { Slot as z } from "@radix-ui/react-slot";
6
- import { cva as Y } from "class-variance-authority";
7
- import { clsx as le } from "clsx";
8
- import { twMerge as de } from "tailwind-merge";
9
- import { AlertCircle as dt, Table as ce, XIcon as Bt, PanelLeftIcon as we, ChevronRight as Q, SunIcon as ue, SearchIcon as me, ExternalLink as he, Check as fe, Copy as ge } from "lucide-react";
10
- import * as p from "react";
11
- import { createContext as W, useContext as D, useState as R, useMemo as k, useEffect as y, Suspense as Dt, useRef as pe, useCallback as ct } from "react";
12
- import { Toaster as be } from "sonner";
13
- import * as X from "@radix-ui/react-collapsible";
6
+ import { cva as Z } from "class-variance-authority";
7
+ import { clsx as de } from "clsx";
8
+ import { twMerge as ce } from "tailwind-merge";
9
+ import { AlertCircle as wt, Table as we, XIcon as At, PanelLeftIcon as ue, ChevronRight as Q, SunIcon as me, SearchIcon as he, ExternalLink as fe, Check as pe, Copy as ge } from "lucide-react";
10
+ import * as g from "react";
11
+ import { createContext as j, useContext as B, useState as M, useMemo as k, useEffect as y, Suspense as Dt, useRef as be, useCallback as W, useSyncExternalStore as xe } from "react";
12
+ import { Toaster as ve, toast as ye } from "sonner";
13
+ import * as J from "@radix-ui/react-collapsible";
14
14
  import "@radix-ui/react-separator";
15
15
  import * as b from "@radix-ui/react-dialog";
16
- import * as E from "@radix-ui/react-tooltip";
17
- import { print as xe } from "graphql";
18
- import { createAuthClient as ve } from "@tailor-platform/auth-browser-client";
16
+ import * as R from "@radix-ui/react-tooltip";
17
+ import { createAuthClient as Ne } from "@tailor-platform/auth-public-client";
19
18
  function m(...t) {
20
- return de(le(t));
19
+ return ce(de(t));
21
20
  }
22
- const ye = Y(
21
+ const Se = Z(
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: {
@@ -55,12 +54,12 @@ function _({
55
54
  r ? z : "button",
56
55
  {
57
56
  "data-slot": "button",
58
- className: m(ye({ variant: e, size: s, className: t })),
57
+ className: m(Se({ variant: e, size: s, className: t })),
59
58
  ...n
60
59
  }
61
60
  );
62
61
  }
63
- const $ = "en", Ne = () => {
62
+ const $ = "en", Ce = () => {
64
63
  try {
65
64
  if (typeof navigator > "u")
66
65
  return $;
@@ -69,16 +68,16 @@ const $ = "en", Ne = () => {
69
68
  } catch {
70
69
  return $;
71
70
  }
72
- }, Z = (t) => (e, s) => e ? typeof e == "string" ? e : e(t) ?? s : s, Pt = (t) => {
73
- const e = Z(t);
74
- return (s, r) => e(s, typeof s == "string" ? s : A(r));
75
- }, Ce = (t) => ({
71
+ }, tt = (t) => (e, s) => e ? typeof e == "string" ? e : e(t) ?? s : s, Pt = (t) => {
72
+ const e = tt(t);
73
+ return (s, r) => e(s, typeof s == "string" ? s : I(r));
74
+ }, Te = (t) => ({
76
75
  modules: t.modules,
77
76
  settingsResources: t.settingsResources ?? [],
78
- errorBoundary: t.errorBoundary ?? /* @__PURE__ */ a(j, {}),
77
+ errorBoundary: t.errorBoundary ?? /* @__PURE__ */ a(K, {}),
79
78
  basePath: t.basePath,
80
- locale: t.locale ?? Ne()
81
- }), J = W({
79
+ locale: t.locale ?? Ce()
80
+ }), et = j({
82
81
  configurations: {
83
82
  modules: [],
84
83
  settingsResources: [],
@@ -91,18 +90,18 @@ const $ = "en", Ne = () => {
91
90
  // always provides the context via AppShellConfigContext.Provider.
92
91
  errorBoundary: null
93
92
  }
94
- }), tt = W({
93
+ }), at = j({
95
94
  contextData: {}
96
- }), P = () => D(J), ns = () => D(tt), Se = () => {
97
- const t = D(J), e = D(tt);
95
+ }), A = () => B(et), is = () => B(at), ke = () => {
96
+ const t = B(et), e = B(at);
98
97
  return {
99
98
  ...t,
100
99
  ...e
101
100
  };
102
- }, Te = () => {
103
- const { configurations: t } = P(), e = Z(t.locale);
101
+ }, Re = () => {
102
+ const { configurations: t } = A(), e = tt(t.locale);
104
103
  return (s, r) => e(s, r);
105
- }, ke = (t) => {
104
+ }, Ee = (t) => {
106
105
  const e = (s) => (r) => t[s]?.[r] ?? t.en[r];
107
106
  return {
108
107
  /**
@@ -125,7 +124,7 @@ const $ = "en", Ne = () => {
125
124
  * ```
126
125
  */
127
126
  useT: () => {
128
- const { configurations: s } = P(), r = e(s.locale), n = ((o, ...i) => {
127
+ const { configurations: s } = A(), r = e(s.locale), n = ((o, ...i) => {
129
128
  const l = r(o);
130
129
  return typeof l == "function" ? l(i[0]) : l;
131
130
  });
@@ -161,7 +160,7 @@ const $ = "en", Ne = () => {
161
160
  return typeof o == "function" ? o(r[0]) : o;
162
161
  }
163
162
  };
164
- }, Re = ke({
163
+ }, Be = Ee({
165
164
  en: {
166
165
  error404Title: "404 Not Found",
167
166
  error404Body: "The page you requested could not be found.",
@@ -200,14 +199,14 @@ const $ = "en", Ne = () => {
200
199
  commandPaletteSearch: "ページを検索...",
201
200
  commandPaletteNoResults: "結果が見つかりません"
202
201
  }
203
- }), L = Re.useT, j = () => {
204
- const t = Yt(), e = L(), s = {
202
+ }), D = Be.useT, K = () => {
203
+ const t = Xt(), e = D(), s = {
205
204
  role: "alert",
206
205
  "aria-label": "default-error-boundary"
207
206
  };
208
- if (Xt(t) && t.status === 404)
207
+ if (Zt(t) && t.status === 404)
209
208
  return /* @__PURE__ */ a("div", { ...s, className: "astw:p-6", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:items-start astw:gap-4", children: [
210
- /* @__PURE__ */ a(dt, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }),
209
+ /* @__PURE__ */ a(wt, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }),
211
210
  /* @__PURE__ */ d("div", { children: [
212
211
  /* @__PURE__ */ a("h1", { className: "astw:font-semibold astw:text-lg", children: e("error404Title") }),
213
212
  /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground astw:mt-1", children: e("error404Body") }),
@@ -225,7 +224,7 @@ const $ = "en", Ne = () => {
225
224
  ] }) });
226
225
  const r = t instanceof Error ? t.message : e("errorUnexpected");
227
226
  return /* @__PURE__ */ a("div", { ...s, className: "astw:p-6", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:items-start astw:gap-4", children: [
228
- /* @__PURE__ */ a(dt, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }),
227
+ /* @__PURE__ */ a(wt, { className: "astw:h-5 astw:w-5 astw:text-destructive astw:flex-shrink-0 astw:mt-0.5" }),
229
228
  /* @__PURE__ */ d("div", { children: [
230
229
  /* @__PURE__ */ a("h1", { className: "astw:font-semibold astw:text-lg", children: e("errorTitle") }),
231
230
  /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground astw:mt-1", children: r }),
@@ -243,12 +242,12 @@ const $ = "en", Ne = () => {
243
242
  ] }) });
244
243
  };
245
244
  let Lt = {};
246
- const Ee = (t) => {
245
+ const Ae = (t) => {
247
246
  Lt = t;
248
- }, os = () => ({ type: "pass" }), is = () => ({ type: "hidden" }), ls = (t) => ({
247
+ }, ls = () => ({ type: "pass" }), ds = () => ({ type: "hidden" }), cs = (t) => ({
249
248
  type: "redirect",
250
249
  to: t
251
- }), Mt = () => new Response("Not Found", { status: 404 }), et = async (t, e) => {
250
+ }), st = () => new Response("Not Found", { status: 404 }), V = async (t, e) => {
252
251
  if (!t || t.length === 0) return { type: "pass" };
253
252
  const s = new URL(e.request.url), r = {
254
253
  params: e.params,
@@ -262,22 +261,22 @@ const Ee = (t) => {
262
261
  return o;
263
262
  }
264
263
  return { type: "pass" };
265
- }, It = (t, e) => async (s) => {
266
- const r = await et(t, s);
264
+ }, Mt = (t, e) => async (s) => {
265
+ const r = await V(t, s);
267
266
  switch (r.type) {
268
267
  case "hidden":
269
- throw Mt();
268
+ throw st();
270
269
  case "redirect":
271
- return kt(r.to);
270
+ return Rt(r.to);
272
271
  case "pass":
273
272
  return e ? e(s) : null;
274
273
  }
275
- }, At = (t, e) => () => {
276
- const { configurations: s } = P(), { metaTitle: r, fallbackTitle: n } = t, i = Z(s.locale)(r, n);
274
+ }, It = (t, e) => () => {
275
+ const { configurations: s } = A(), { metaTitle: r, fallbackTitle: n } = t, i = tt(s.locale)(r, n);
277
276
  return e(i);
278
277
  };
279
- function ds(t) {
280
- const { path: e, meta: s, component: r, resources: n, errorBoundary: o, guards: i } = t, l = s?.title ?? A(e), u = A(e), w = i && i.length > 0 ? It(i) : void 0, c = r ? At(
278
+ function ws(t) {
279
+ const { path: e, meta: s, component: r, resources: n, errorBoundary: o, guards: i } = t, l = s?.title ?? I(e), u = I(e), w = i && i.length > 0 ? Mt(i) : void 0, c = r ? It(
281
280
  { metaTitle: l, fallbackTitle: u },
282
281
  (h) => r({ title: h, resources: n })
283
282
  ) : void 0;
@@ -295,12 +294,12 @@ function ds(t) {
295
294
  icon: t.meta?.icon
296
295
  },
297
296
  resources: n,
298
- errorBoundary: o || /* @__PURE__ */ a(j, {}),
297
+ errorBoundary: o || /* @__PURE__ */ a(K, {}),
299
298
  guards: i
300
299
  };
301
300
  }
302
- function cs(t) {
303
- const { path: e, component: s, subResources: r, meta: n, errorBoundary: o, guards: i } = t, l = n?.title ?? A(e), u = A(e), w = i && i.length > 0 ? It(i) : void 0;
301
+ function us(t) {
302
+ const { path: e, component: s, subResources: r, meta: n, errorBoundary: o, guards: i } = t, l = n?.title ?? I(e), u = I(e), w = i && i.length > 0 ? Mt(i) : void 0;
304
303
  return {
305
304
  _type: "resource",
306
305
  type: "component",
@@ -310,31 +309,31 @@ function cs(t) {
310
309
  icon: n?.icon,
311
310
  ...n?.breadcrumbTitle !== void 0 ? { breadcrumbTitle: n.breadcrumbTitle } : {}
312
311
  },
313
- component: At(
312
+ component: It(
314
313
  { metaTitle: l, fallbackTitle: u },
315
314
  (c) => s({ title: c, resources: r })
316
315
  ),
317
316
  subResources: r,
318
- errorBoundary: o ?? /* @__PURE__ */ a(j, {}),
317
+ errorBoundary: o ?? /* @__PURE__ */ a(K, {}),
319
318
  guards: i,
320
319
  loader: w
321
320
  };
322
321
  }
323
- const Be = () => {
324
- const t = L();
325
- return /* @__PURE__ */ d(B, { children: [
322
+ const De = () => {
323
+ const t = D();
324
+ return /* @__PURE__ */ d(E, { children: [
326
325
  /* @__PURE__ */ a("p", { className: "astw:font-semibold astw:leading-none astw:tracking-tight", children: t("welcomeTitle") }),
327
326
  /* @__PURE__ */ a("p", { className: "pt-4", children: t("welcomeBody") })
328
327
  ] });
329
- }, wt = () => /* @__PURE__ */ d(B, { children: [
330
- /* @__PURE__ */ a(G, {}),
331
- /* @__PURE__ */ a(be, {})
332
- ] }), De = () => {
333
- const { configurations: t } = Se(), e = L(), s = Te();
328
+ }, ut = () => /* @__PURE__ */ d(E, { children: [
329
+ /* @__PURE__ */ a(X, {}),
330
+ /* @__PURE__ */ a(ve, {})
331
+ ] }), Pe = () => {
332
+ const { configurations: t } = ke(), e = D(), s = Re();
334
333
  return /* @__PURE__ */ d("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: [
335
334
  /* @__PURE__ */ a("div", { children: /* @__PURE__ */ d("nav", { className: "astw:bg-card astw:md:w-xs astw:rounded-md astw:border astw:p-3 astw:shadow-xs", children: [
336
335
  /* @__PURE__ */ a("h2", { className: "astw:text-sm astw:leading-[36px] astw:mb-2 astw:font-bold ", children: e("settings") }),
337
- /* @__PURE__ */ a("ul", { className: "astw:flex astw:flex-col astw:gap-1", children: t.settingsResources.map((r) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(Zt, { to: `./${r.path}`, children: ({ isActive: n }) => /* @__PURE__ */ d(
336
+ /* @__PURE__ */ a("ul", { className: "astw:flex astw:flex-col astw:gap-1", children: t.settingsResources.map((r) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a(Jt, { to: `./${r.path}`, children: ({ isActive: n }) => /* @__PURE__ */ d(
338
337
  _,
339
338
  {
340
339
  variant: n ? "secondary" : "ghost",
@@ -346,9 +345,9 @@ const Be = () => {
346
345
  }
347
346
  ) }) }, r.path)) })
348
347
  ] }) }),
349
- /* @__PURE__ */ a("section", { className: "astw:bg-card astw:flex-1 astw:rounded-md astw:border astw:shadow-xs", children: /* @__PURE__ */ a(G, {}) })
348
+ /* @__PURE__ */ a("section", { className: "astw:bg-card astw:flex-1 astw:rounded-md astw:border astw:shadow-xs", children: /* @__PURE__ */ a(X, {}) })
350
349
  ] });
351
- }, at = (t) => () => /* @__PURE__ */ a(B, { children: t }), _t = (t, e, s) => {
350
+ }, rt = (t) => () => /* @__PURE__ */ a(E, { children: t }), _t = (t, e, s) => {
352
351
  const r = t.errorBoundary || s, n = t.component ? {
353
352
  index: !0,
354
353
  Component: t.component
@@ -357,7 +356,7 @@ const Be = () => {
357
356
  path: t.path,
358
357
  ...t.loader && { loader: t.loader },
359
358
  ...t.errorBoundary && {
360
- ErrorBoundary: at(t.errorBoundary)
359
+ ErrorBoundary: rt(t.errorBoundary)
361
360
  },
362
361
  ...e && e.length > 0 ? {
363
362
  children: [
@@ -370,34 +369,42 @@ const Be = () => {
370
369
  children: [n]
371
370
  } : {}
372
371
  };
373
- }, Pe = (t) => {
372
+ }, Le = (t) => {
374
373
  const e = _t(t, t.resources, t.errorBoundary);
375
374
  if (!t.component && t.resources.length > 0) {
376
- const s = t.resources[0].path, r = {
375
+ const s = {
377
376
  index: !0,
378
- loader: () => kt(s)
379
- }, n = {
377
+ // Component is required to suppress React Router's warning about empty leaf routes,
378
+ // even though the loader always redirects and this component will never render.
379
+ Component: () => null,
380
+ loader: async (n) => {
381
+ for (const o of t.resources)
382
+ if ((await V(o.guards, n)).type === "pass")
383
+ return Rt(o.path);
384
+ throw st();
385
+ }
386
+ }, r = {
380
387
  path: e.path,
381
- children: [r, ...e.children ?? []],
388
+ children: [s, ...e.children ?? []],
382
389
  ...e.loader && { loader: e.loader }
383
390
  };
384
- return e.ErrorBoundary && (n.ErrorBoundary = e.ErrorBoundary), n;
391
+ return e.ErrorBoundary && (r.ErrorBoundary = e.ErrorBoundary), r;
385
392
  }
386
393
  return e;
387
- }, Le = (t) => t.map((e) => Pe(e)), Me = ({
394
+ }, Me = (t) => t.map((e) => Le(e)), Ie = ({
388
395
  modules: t,
389
396
  settingsResources: e,
390
397
  rootComponent: s
391
398
  }) => {
392
399
  const r = {
393
400
  index: !0,
394
- Component: s ?? Be
401
+ Component: s ?? De
395
402
  }, n = e.length > 0 ? [
396
403
  {
397
404
  path: "settings",
398
405
  index: !0,
399
406
  Component: () => /* @__PURE__ */ a(
400
- Jt,
407
+ te,
401
408
  {
402
409
  to: e[0].path,
403
410
  relative: "path",
@@ -407,12 +414,12 @@ const Be = () => {
407
414
  },
408
415
  {
409
416
  path: "settings",
410
- Component: De,
417
+ Component: Pe,
411
418
  children: e.map((o) => ({
412
419
  path: o.path,
413
420
  Component: o.component,
414
421
  ...o.errorBoundary && {
415
- ErrorBoundary: at(o.errorBoundary)
422
+ ErrorBoundary: rt(o.errorBoundary)
416
423
  }
417
424
  }))
418
425
  }
@@ -420,28 +427,28 @@ const Be = () => {
420
427
  return [
421
428
  r,
422
429
  {
423
- children: Le(t)
430
+ children: Me(t)
424
431
  },
425
432
  ...n,
426
433
  {
427
434
  path: "*",
428
435
  loader: () => {
429
- throw Mt();
436
+ throw st();
430
437
  },
431
438
  // Component is required to suppress React Router's warning about empty leaf routes,
432
439
  // even though the loader always throws and this component will never render.
433
440
  Component: () => null,
434
- ErrorBoundary: j
441
+ ErrorBoundary: K
435
442
  }
436
443
  ];
437
- }, zt = "appshell-root-nav", Ie = (t) => ({
444
+ }, zt = "appshell-root-nav", _e = (t) => ({
438
445
  loaderID: zt,
439
- loader: async (e) => ({ navItems: Ae(t, e) })
440
- }), Ft = () => te(zt)?.navItems, Ae = async (t, e) => {
446
+ loader: async (e) => ({ navItems: ze(t, e) })
447
+ }), Ft = () => ee(zt)?.navItems, ze = async (t, e) => {
441
448
  const s = Pt(t.locale);
442
449
  return (await Promise.all(
443
450
  t.modules.map(async (n) => {
444
- if (n.path.startsWith(":") || (await et(n.guards, e)).type !== "pass") return null;
451
+ if (n.path.startsWith(":") || (await V(n.guards, e)).type !== "pass") return null;
445
452
  const i = await Ot(
446
453
  n.resources,
447
454
  n.path,
@@ -453,12 +460,12 @@ const Be = () => {
453
460
  )).filter((n) => n !== null).map(({ module: n, resources: o }) => ({
454
461
  title: s(n.meta.title, n.path),
455
462
  url: n.meta.menuItemClickable ? n.path : void 0,
456
- icon: n.meta.icon || /* @__PURE__ */ a(ce, {}),
463
+ icon: n.meta.icon || /* @__PURE__ */ a(we, {}),
457
464
  items: o
458
465
  }));
459
466
  }, Ot = async (t, e, s, r) => (await Promise.all(
460
467
  t.map(async (o) => {
461
- if (o.path.startsWith(":") || (await et(o.guards, s)).type !== "pass") return null;
468
+ if (o.path.startsWith(":") || (await V(o.guards, s)).type !== "pass") return null;
462
469
  const l = `${e}/${o.path}`, u = r(o.meta.title, o.path), w = o.subResources ? await Ot(
463
470
  o.subResources,
464
471
  l,
@@ -471,12 +478,12 @@ const Be = () => {
471
478
  items: w && w.length > 0 ? w : void 0
472
479
  };
473
480
  })
474
- )).filter((o) => o !== null), _e = (t) => {
475
- const { configurations: e } = P(), { rootComponent: s, children: r } = t, n = Me({
481
+ )).filter((o) => o !== null), Fe = (t) => {
482
+ const { configurations: e } = A(), { rootComponent: s, children: r } = t, n = Ie({
476
483
  modules: e.modules,
477
484
  settingsResources: e.settingsResources,
478
485
  rootComponent: s
479
- }), o = e.errorBoundary, { loaderID: i, loader: l } = Ie({
486
+ }), o = e.errorBoundary, { loaderID: i, loader: l } = _e({
480
487
  modules: e.modules,
481
488
  locale: e.locale
482
489
  }), u = [
@@ -486,8 +493,8 @@ const Be = () => {
486
493
  element: r,
487
494
  children: o ? [
488
495
  {
489
- element: /* @__PURE__ */ a(G, {}),
490
- ErrorBoundary: at(o),
496
+ element: /* @__PURE__ */ a(X, {}),
497
+ ErrorBoundary: rt(o),
491
498
  children: n
492
499
  }
493
500
  ] : n,
@@ -497,25 +504,25 @@ const Be = () => {
497
504
  */
498
505
  HydrateFallback: () => null
499
506
  }
500
- ], w = e.basePath ? "/" + e.basePath : void 0, c = t.memory ? ee(u, {
507
+ ], w = e.basePath ? "/" + e.basePath : void 0, c = t.memory ? ae(u, {
501
508
  basename: w,
502
509
  ...t.initialEntries ? { initialEntries: t.initialEntries } : {}
503
- }) : ae(u, {
510
+ }) : se(u, {
504
511
  basename: w
505
512
  });
506
- return /* @__PURE__ */ a(se, { router: c });
507
- }, ze = {
513
+ return /* @__PURE__ */ a(re, { router: c });
514
+ }, Oe = {
508
515
  resolvedTheme: "light",
509
516
  theme: "system",
510
517
  setTheme: () => null
511
- }, $t = W(ze);
512
- function Fe({
518
+ }, $t = j(Oe);
519
+ function $e({
513
520
  children: t,
514
521
  storageKey: e,
515
522
  defaultTheme: s = "system",
516
523
  ...r
517
524
  }) {
518
- const [n, o] = R(
525
+ const [n, o] = M(
519
526
  () => localStorage.getItem(e) || s
520
527
  ), i = k(() => n !== "system" ? n : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", [n]);
521
528
  y(() => {
@@ -531,20 +538,20 @@ function Fe({
531
538
  };
532
539
  return /* @__PURE__ */ a($t.Provider, { ...r, value: l, children: t });
533
540
  }
534
- const Oe = () => {
535
- const t = D($t);
541
+ const We = () => {
542
+ const t = B($t);
536
543
  if (t === void 0)
537
544
  throw new Error("useTheme must be used within a ThemeProvider");
538
545
  return t;
539
- }, ws = (t) => {
540
- const [e, s] = R(!1);
546
+ }, ms = (t) => {
547
+ const [e, s] = M(!1);
541
548
  y(function() {
542
549
  s(!0);
543
550
  }, []);
544
551
  const r = t.contextData ?? {};
545
- Ee(r);
552
+ Ae(r);
546
553
  const n = k(
547
- () => Ce({
554
+ () => Te({
548
555
  modules: t.modules,
549
556
  settingsResources: t.settingsResources,
550
557
  basePath: t.basePath,
@@ -565,66 +572,66 @@ const Oe = () => {
565
572
  () => ({ contextData: t.contextData ?? {} }),
566
573
  [t.contextData]
567
574
  );
568
- return e ? /* @__PURE__ */ a(J.Provider, { value: o, children: /* @__PURE__ */ a(tt.Provider, { value: i, children: /* @__PURE__ */ a(Fe, { defaultTheme: "system", storageKey: "appshell-ui-theme", children: /* @__PURE__ */ a(_e, { rootComponent: t.rootComponent, children: t.children }) }) }) }) : null;
575
+ return e ? /* @__PURE__ */ a(et.Provider, { value: o, children: /* @__PURE__ */ a(at.Provider, { value: i, children: /* @__PURE__ */ a($e, { defaultTheme: "system", storageKey: "appshell-ui-theme", children: /* @__PURE__ */ a(Fe, { rootComponent: t.rootComponent, children: t.children }) }) }) }) : null;
569
576
  };
570
- function $e({
577
+ function je({
571
578
  ...t
572
579
  }) {
573
- return /* @__PURE__ */ a(X.Root, { "data-slot": "collapsible", ...t });
580
+ return /* @__PURE__ */ a(J.Root, { "data-slot": "collapsible", ...t });
574
581
  }
575
- function ut({
582
+ function mt({
576
583
  ...t
577
584
  }) {
578
585
  return /* @__PURE__ */ a(
579
- X.CollapsibleTrigger,
586
+ J.CollapsibleTrigger,
580
587
  {
581
588
  "data-slot": "collapsible-trigger",
582
589
  ...t
583
590
  }
584
591
  );
585
592
  }
586
- function We({
593
+ function Ke({
587
594
  ...t
588
595
  }) {
589
596
  return /* @__PURE__ */ a(
590
- X.CollapsibleContent,
597
+ J.CollapsibleContent,
591
598
  {
592
599
  "data-slot": "collapsible-content",
593
600
  ...t
594
601
  }
595
602
  );
596
603
  }
597
- const V = 768;
598
- function je() {
599
- const [t, e] = p.useState(
604
+ const H = 768;
605
+ function Ve() {
606
+ const [t, e] = g.useState(
600
607
  void 0
601
608
  );
602
- return p.useEffect(() => {
603
- const s = window.matchMedia(`(max-width: ${V - 1}px)`), r = () => {
604
- e(window.innerWidth < V);
609
+ return g.useEffect(() => {
610
+ const s = window.matchMedia(`(max-width: ${H - 1}px)`), r = () => {
611
+ e(window.innerWidth < H);
605
612
  };
606
- return s.addEventListener("change", r), e(window.innerWidth < V), () => s.removeEventListener("change", r);
613
+ return s.addEventListener("change", r), e(window.innerWidth < H), () => s.removeEventListener("change", r);
607
614
  }, []), !!t;
608
615
  }
609
- const H = 768, U = 1199;
610
- function Ke() {
611
- const [t, e] = p.useState(
616
+ const q = 768, G = 1199;
617
+ function Ue() {
618
+ const [t, e] = g.useState(
612
619
  void 0
613
620
  );
614
- return p.useEffect(() => {
621
+ return g.useEffect(() => {
615
622
  const s = window.matchMedia(
616
- `(min-width: ${H}px) and (max-width: ${U}px)`
623
+ `(min-width: ${q}px) and (max-width: ${G}px)`
617
624
  ), r = () => {
618
625
  e(
619
- window.innerWidth >= H && window.innerWidth <= U
626
+ window.innerWidth >= q && window.innerWidth <= G
620
627
  );
621
628
  };
622
629
  return s.addEventListener("change", r), e(
623
- window.innerWidth >= H && window.innerWidth <= U
630
+ window.innerWidth >= q && window.innerWidth <= G
624
631
  ), () => s.removeEventListener("change", r);
625
632
  }, []), !!t;
626
633
  }
627
- function Ve({ className: t, type: e, ...s }) {
634
+ function He({ className: t, type: e, ...s }) {
628
635
  return /* @__PURE__ */ a(
629
636
  "input",
630
637
  {
@@ -640,15 +647,15 @@ function Ve({ className: t, type: e, ...s }) {
640
647
  }
641
648
  );
642
649
  }
643
- function mt({ ...t }) {
650
+ function ht({ ...t }) {
644
651
  return /* @__PURE__ */ a(b.Root, { "data-slot": "sheet", ...t });
645
652
  }
646
- function He({
653
+ function qe({
647
654
  ...t
648
655
  }) {
649
656
  return /* @__PURE__ */ a(b.Portal, { "data-slot": "sheet-portal", ...t });
650
657
  }
651
- function Ue({
658
+ function Ge({
652
659
  className: t,
653
660
  ...e
654
661
  }) {
@@ -664,14 +671,14 @@ function Ue({
664
671
  }
665
672
  );
666
673
  }
667
- function ht({
674
+ function ft({
668
675
  className: t,
669
676
  children: e,
670
677
  side: s = "right",
671
678
  ...r
672
679
  }) {
673
- return /* @__PURE__ */ d(He, { children: [
674
- /* @__PURE__ */ a(Ue, {}),
680
+ return /* @__PURE__ */ d(qe, { children: [
681
+ /* @__PURE__ */ a(Ge, {}),
675
682
  /* @__PURE__ */ d(
676
683
  b.Content,
677
684
  {
@@ -688,7 +695,7 @@ function ht({
688
695
  children: [
689
696
  e,
690
697
  /* @__PURE__ */ d(b.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: [
691
- /* @__PURE__ */ a(Bt, { className: "astw:size-4" }),
698
+ /* @__PURE__ */ a(At, { className: "astw:size-4" }),
692
699
  /* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Close" })
693
700
  ] })
694
701
  ]
@@ -696,7 +703,7 @@ function ht({
696
703
  )
697
704
  ] });
698
705
  }
699
- function ft({ className: t, ...e }) {
706
+ function pt({ className: t, ...e }) {
700
707
  return /* @__PURE__ */ a(
701
708
  "div",
702
709
  {
@@ -719,7 +726,7 @@ function gt({
719
726
  }
720
727
  );
721
728
  }
722
- function pt({
729
+ function bt({
723
730
  className: t,
724
731
  ...e
725
732
  }) {
@@ -732,12 +739,12 @@ function pt({
732
739
  }
733
740
  );
734
741
  }
735
- function st({
742
+ function nt({
736
743
  delayDuration: t = 0,
737
744
  ...e
738
745
  }) {
739
746
  return /* @__PURE__ */ a(
740
- E.Provider,
747
+ R.Provider,
741
748
  {
742
749
  "data-slot": "tooltip-provider",
743
750
  delayDuration: t,
@@ -745,24 +752,24 @@ function st({
745
752
  }
746
753
  );
747
754
  }
748
- function rt({
755
+ function ot({
749
756
  ...t
750
757
  }) {
751
- return /* @__PURE__ */ a(st, { children: /* @__PURE__ */ a(E.Root, { "data-slot": "tooltip", ...t }) });
758
+ return /* @__PURE__ */ a(nt, { children: /* @__PURE__ */ a(R.Root, { "data-slot": "tooltip", ...t }) });
752
759
  }
753
- function nt({
760
+ function it({
754
761
  ...t
755
762
  }) {
756
- return /* @__PURE__ */ a(E.Trigger, { "data-slot": "tooltip-trigger", ...t });
763
+ return /* @__PURE__ */ a(R.Trigger, { "data-slot": "tooltip-trigger", ...t });
757
764
  }
758
- function ot({
765
+ function lt({
759
766
  className: t,
760
767
  sideOffset: e = 0,
761
768
  children: s,
762
769
  ...r
763
770
  }) {
764
- return /* @__PURE__ */ a(E.Portal, { children: /* @__PURE__ */ d(
765
- E.Content,
771
+ return /* @__PURE__ */ a(R.Portal, { children: /* @__PURE__ */ d(
772
+ R.Content,
766
773
  {
767
774
  "data-slot": "tooltip-content",
768
775
  sideOffset: e,
@@ -773,19 +780,19 @@ function ot({
773
780
  ...r,
774
781
  children: [
775
782
  s,
776
- /* @__PURE__ */ a(E.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]" })
783
+ /* @__PURE__ */ a(R.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]" })
777
784
  ]
778
785
  }
779
786
  ) });
780
787
  }
781
- const Wt = "16rem", Qe = "18rem", qe = "3rem", Ge = "b", jt = p.createContext(null);
788
+ const Wt = "16rem", Qe = "18rem", Ye = "3rem", Xe = "b", jt = g.createContext(null);
782
789
  function F() {
783
- const t = p.useContext(jt);
790
+ const t = g.useContext(jt);
784
791
  if (!t)
785
792
  throw new Error("useSidebar must be used within a SidebarProvider.");
786
793
  return t;
787
794
  }
788
- function Ye({
795
+ function Ze({
789
796
  defaultOpen: t = !0,
790
797
  open: e,
791
798
  onOpenChange: s,
@@ -794,41 +801,41 @@ function Ye({
794
801
  children: o,
795
802
  ...i
796
803
  }) {
797
- const l = je(), u = Ke(), [w, c] = p.useState(!1), [h, f] = p.useState(!1), [g, M] = p.useState(t), C = e ?? g, I = p.useCallback(
804
+ const l = Ve(), u = Ue(), [w, c] = g.useState(!1), [h, f] = g.useState(!1), [p, P] = g.useState(t), S = e ?? p, L = g.useCallback(
798
805
  (x) => {
799
- const T = typeof x == "function" ? x(C) : x;
800
- s ? s(T) : M(T);
806
+ const T = typeof x == "function" ? x(S) : x;
807
+ s ? s(T) : P(T);
801
808
  },
802
- [s, C]
803
- ), S = u && !l, O = p.useCallback(() => l ? c((x) => !x) : S ? f((x) => !x) : I((x) => !x), [l, S, I, c]);
804
- p.useEffect(() => {
809
+ [s, S]
810
+ ), C = u && !l, O = g.useCallback(() => l ? c((x) => !x) : C ? f((x) => !x) : L((x) => !x), [l, C, L, c]);
811
+ g.useEffect(() => {
805
812
  const x = (T) => {
806
- T.key === Ge && (T.metaKey || T.ctrlKey) && (T.preventDefault(), O());
813
+ T.key === Xe && (T.metaKey || T.ctrlKey) && (T.preventDefault(), O());
807
814
  };
808
815
  return window.addEventListener("keydown", x), () => window.removeEventListener("keydown", x);
809
816
  }, [O]);
810
- const lt = C ? "expanded" : "collapsed", Gt = p.useMemo(
817
+ const ct = S ? "expanded" : "collapsed", Yt = g.useMemo(
811
818
  () => ({
812
- state: lt,
813
- open: C,
814
- setOpen: I,
819
+ state: ct,
820
+ open: S,
821
+ setOpen: L,
815
822
  isMobile: l,
816
823
  openMobile: w,
817
824
  setOpenMobile: c,
818
825
  toggleSidebar: O,
819
- isIconMode: S,
826
+ isIconMode: C,
820
827
  openIconMode: h,
821
828
  setOpenIconMode: f
822
829
  }),
823
- [lt, C, I, l, w, c, O, S, h, f]
830
+ [ct, S, L, l, w, c, O, C, h, f]
824
831
  );
825
- return /* @__PURE__ */ a(jt.Provider, { value: Gt, children: /* @__PURE__ */ a(st, { delayDuration: 0, children: /* @__PURE__ */ a(
832
+ return /* @__PURE__ */ a(jt.Provider, { value: Yt, children: /* @__PURE__ */ a(nt, { delayDuration: 0, children: /* @__PURE__ */ a(
826
833
  "div",
827
834
  {
828
835
  "data-slot": "sidebar-wrapper",
829
836
  style: {
830
837
  "--sidebar-width": Wt,
831
- "--sidebar-width-icon": qe,
838
+ "--sidebar-width-icon": Ye,
832
839
  ...n
833
840
  },
834
841
  className: m(
@@ -840,7 +847,7 @@ function Ye({
840
847
  }
841
848
  ) }) });
842
849
  }
843
- function Xe({
850
+ function Je({
844
851
  side: t = "left",
845
852
  variant: e = "sidebar",
846
853
  collapsible: s = "offcanvas",
@@ -860,8 +867,8 @@ function Xe({
860
867
  ...o,
861
868
  children: n
862
869
  }
863
- ) : i ? /* @__PURE__ */ a(mt, { open: u, onOpenChange: w, ...o, children: /* @__PURE__ */ d(
864
- ht,
870
+ ) : i ? /* @__PURE__ */ a(ht, { open: u, onOpenChange: w, ...o, children: /* @__PURE__ */ d(
871
+ ft,
865
872
  {
866
873
  "data-sidebar": "sidebar",
867
874
  "data-slot": "sidebar",
@@ -872,14 +879,14 @@ function Xe({
872
879
  },
873
880
  side: t,
874
881
  children: [
875
- /* @__PURE__ */ d(ft, { className: "astw:sr-only", children: [
882
+ /* @__PURE__ */ d(pt, { className: "astw:sr-only", children: [
876
883
  /* @__PURE__ */ a(gt, { children: "Sidebar" }),
877
- /* @__PURE__ */ a(pt, { children: "Displays the mobile sidebar." })
884
+ /* @__PURE__ */ a(bt, { children: "Displays the mobile sidebar." })
878
885
  ] }),
879
886
  /* @__PURE__ */ a("div", { className: "flex h-full w-full flex-col", children: n })
880
887
  ]
881
888
  }
882
- ) }) : c && s === "icon" ? /* @__PURE__ */ d(B, { children: [
889
+ ) }) : c && s === "icon" ? /* @__PURE__ */ d(E, { children: [
883
890
  /* @__PURE__ */ d(
884
891
  "div",
885
892
  {
@@ -924,8 +931,8 @@ function Xe({
924
931
  ]
925
932
  }
926
933
  ),
927
- /* @__PURE__ */ a(mt, { open: h, onOpenChange: f, ...o, children: /* @__PURE__ */ d(
928
- ht,
934
+ /* @__PURE__ */ a(ht, { open: h, onOpenChange: f, ...o, children: /* @__PURE__ */ d(
935
+ ft,
929
936
  {
930
937
  "data-sidebar": "sidebar",
931
938
  "data-slot": "sidebar-overlay",
@@ -936,9 +943,9 @@ function Xe({
936
943
  },
937
944
  side: t,
938
945
  children: [
939
- /* @__PURE__ */ d(ft, { className: "astw:sr-only", children: [
946
+ /* @__PURE__ */ d(pt, { className: "astw:sr-only", children: [
940
947
  /* @__PURE__ */ a(gt, { children: "Sidebar" }),
941
- /* @__PURE__ */ a(pt, { children: "Displays the sidebar overlay." })
948
+ /* @__PURE__ */ a(bt, { children: "Displays the sidebar overlay." })
942
949
  ] }),
943
950
  /* @__PURE__ */ a("div", { className: "flex h-full w-full flex-col", children: n })
944
951
  ]
@@ -1013,13 +1020,13 @@ function Kt({
1013
1020
  },
1014
1021
  ...s,
1015
1022
  children: [
1016
- /* @__PURE__ */ a(we, { className: "astw:size-4.5" }),
1023
+ /* @__PURE__ */ a(ue, { className: "astw:size-4.5" }),
1017
1024
  /* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Toggle Sidebar" })
1018
1025
  ]
1019
1026
  }
1020
1027
  );
1021
1028
  }
1022
- function Ze({ className: t, ...e }) {
1029
+ function ta({ className: t, ...e }) {
1023
1030
  return /* @__PURE__ */ a(
1024
1031
  "main",
1025
1032
  {
@@ -1034,7 +1041,7 @@ function Ze({ className: t, ...e }) {
1034
1041
  }
1035
1042
  );
1036
1043
  }
1037
- function Je({ className: t, ...e }) {
1044
+ function ea({ className: t, ...e }) {
1038
1045
  return /* @__PURE__ */ a(
1039
1046
  "div",
1040
1047
  {
@@ -1045,7 +1052,7 @@ function Je({ className: t, ...e }) {
1045
1052
  }
1046
1053
  );
1047
1054
  }
1048
- function ta({ className: t, ...e }) {
1055
+ function aa({ className: t, ...e }) {
1049
1056
  return /* @__PURE__ */ a(
1050
1057
  "div",
1051
1058
  {
@@ -1067,7 +1074,7 @@ function Vt({ className: t, ...e }) {
1067
1074
  }
1068
1075
  );
1069
1076
  }
1070
- function Ht({ className: t, ...e }) {
1077
+ function Ut({ className: t, ...e }) {
1071
1078
  return /* @__PURE__ */ a(
1072
1079
  "ul",
1073
1080
  {
@@ -1078,7 +1085,7 @@ function Ht({ className: t, ...e }) {
1078
1085
  }
1079
1086
  );
1080
1087
  }
1081
- function Ut({ className: t, ...e }) {
1088
+ function Ht({ className: t, ...e }) {
1082
1089
  return /* @__PURE__ */ a(
1083
1090
  "li",
1084
1091
  {
@@ -1089,7 +1096,7 @@ function Ut({ className: t, ...e }) {
1089
1096
  }
1090
1097
  );
1091
1098
  }
1092
- const ea = Y(
1099
+ const sa = Z(
1093
1100
  "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",
1094
1101
  {
1095
1102
  variants: {
@@ -1109,7 +1116,7 @@ const ea = Y(
1109
1116
  }
1110
1117
  }
1111
1118
  );
1112
- function bt({
1119
+ function xt({
1113
1120
  asChild: t = !1,
1114
1121
  isActive: e = !1,
1115
1122
  variant: s = "default",
@@ -1125,16 +1132,16 @@ function bt({
1125
1132
  "data-sidebar": "menu-button",
1126
1133
  "data-size": r,
1127
1134
  "data-active": e,
1128
- className: m(ea({ variant: s, size: r }), o),
1135
+ className: m(sa({ variant: s, size: r }), o),
1129
1136
  ...i
1130
1137
  }
1131
1138
  );
1132
1139
  return n ? (typeof n == "string" && (n = {
1133
1140
  children: n
1134
- }), /* @__PURE__ */ d(rt, { children: [
1135
- /* @__PURE__ */ a(nt, { asChild: !0, children: c }),
1141
+ }), /* @__PURE__ */ d(ot, { children: [
1142
+ /* @__PURE__ */ a(it, { asChild: !0, children: c }),
1136
1143
  /* @__PURE__ */ a(
1137
- ot,
1144
+ lt,
1138
1145
  {
1139
1146
  side: "right",
1140
1147
  align: "center",
@@ -1144,7 +1151,7 @@ function bt({
1144
1151
  )
1145
1152
  ] })) : c;
1146
1153
  }
1147
- function xt({
1154
+ function vt({
1148
1155
  className: t,
1149
1156
  asChild: e = !1,
1150
1157
  showOnHover: s = !1,
@@ -1170,7 +1177,7 @@ function xt({
1170
1177
  }
1171
1178
  );
1172
1179
  }
1173
- function aa({ className: t, ...e }) {
1180
+ function ra({ className: t, ...e }) {
1174
1181
  return /* @__PURE__ */ a(
1175
1182
  "ul",
1176
1183
  {
@@ -1185,7 +1192,7 @@ function aa({ className: t, ...e }) {
1185
1192
  }
1186
1193
  );
1187
1194
  }
1188
- function sa({
1195
+ function na({
1189
1196
  className: t,
1190
1197
  ...e
1191
1198
  }) {
@@ -1199,7 +1206,7 @@ function sa({
1199
1206
  }
1200
1207
  );
1201
1208
  }
1202
- function ra({
1209
+ function oa({
1203
1210
  asChild: t = !1,
1204
1211
  size: e = "md",
1205
1212
  isActive: s = !1,
@@ -1225,17 +1232,17 @@ function ra({
1225
1232
  }
1226
1233
  );
1227
1234
  }
1228
- function q({ to: t, children: e, ...s }) {
1235
+ function Y({ to: t, children: e, ...s }) {
1229
1236
  try {
1230
- return re(t), /* @__PURE__ */ a(ne, { to: t, ...s, children: e });
1237
+ return ne(t), /* @__PURE__ */ a(oe, { to: t, ...s, children: e });
1231
1238
  } catch {
1232
1239
  return /* @__PURE__ */ a("a", { href: t, ...s, children: e });
1233
1240
  }
1234
1241
  }
1235
- function vt({ ...t }) {
1242
+ function yt({ ...t }) {
1236
1243
  return /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...t });
1237
1244
  }
1238
- function yt({ className: t, ...e }) {
1245
+ function Nt({ className: t, ...e }) {
1239
1246
  return /* @__PURE__ */ a(
1240
1247
  "ol",
1241
1248
  {
@@ -1248,7 +1255,7 @@ function yt({ className: t, ...e }) {
1248
1255
  }
1249
1256
  );
1250
1257
  }
1251
- function Nt({ className: t, ...e }) {
1258
+ function St({ className: t, ...e }) {
1252
1259
  return /* @__PURE__ */ a(
1253
1260
  "li",
1254
1261
  {
@@ -1265,7 +1272,7 @@ function Ct({
1265
1272
  ...r
1266
1273
  }) {
1267
1274
  return /* @__PURE__ */ a(
1268
- t ? z : q,
1275
+ t ? z : Y,
1269
1276
  {
1270
1277
  "data-slot": "breadcrumb-link",
1271
1278
  className: m("astw:hover:text-foreground astw:transition-colors", e),
@@ -1274,7 +1281,7 @@ function Ct({
1274
1281
  }
1275
1282
  );
1276
1283
  }
1277
- function na({
1284
+ function ia({
1278
1285
  children: t,
1279
1286
  className: e,
1280
1287
  ...s
@@ -1291,14 +1298,14 @@ function na({
1291
1298
  }
1292
1299
  );
1293
1300
  }
1294
- function oa(t, e) {
1301
+ function la(t, e) {
1295
1302
  if (!e.trim()) return t;
1296
1303
  const s = e.toLowerCase();
1297
1304
  return t.filter(
1298
1305
  (r) => r.title.toLowerCase().includes(s) || r.path.toLowerCase().includes(s)
1299
1306
  );
1300
1307
  }
1301
- const ia = (t, e) => {
1308
+ const da = (t, e) => {
1302
1309
  const s = Pt(e);
1303
1310
  return t.reduce(
1304
1311
  (r, n) => {
@@ -1327,18 +1334,18 @@ const ia = (t, e) => {
1327
1334
  {}
1328
1335
  );
1329
1336
  };
1330
- function la(t, e, s, r) {
1331
- const n = t.split("/").filter((u) => u !== ""), o = e && n[0] === e ? n.slice(1) : n, i = ia(s, r), l = o.map((u, w) => {
1337
+ function ca(t, e, s, r) {
1338
+ 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) => {
1332
1339
  const c = o.slice(0, w + 1).join("/");
1333
1340
  let h = i[c];
1334
1341
  if (!h) {
1335
- const g = Object.entries(i).find(
1336
- ([M]) => {
1337
- const C = M.split("/").map((S) => S.startsWith(":") ? "[^/]+" : S).join("/");
1338
- return new RegExp(`^${C}$`).test(c);
1342
+ const p = Object.entries(i).find(
1343
+ ([P]) => {
1344
+ const S = P.split("/").map((C) => C.startsWith(":") ? "[^/]+" : C).join("/");
1345
+ return new RegExp(`^${S}$`).test(c);
1339
1346
  }
1340
1347
  )?.[1];
1341
- g && (h = g);
1348
+ p && (h = p);
1342
1349
  }
1343
1350
  let f;
1344
1351
  return h ? typeof h.breadcrumbTitle == "function" ? f = h.breadcrumbTitle(u) : typeof h.breadcrumbTitle == "string" ? f = h.breadcrumbTitle : f = h.title : f = decodeURIComponent(u), {
@@ -1352,28 +1359,28 @@ function la(t, e, s, r) {
1352
1359
  segments: l
1353
1360
  };
1354
1361
  }
1355
- const da = () => {
1362
+ const wa = () => {
1356
1363
  const { open: t, isIconMode: e } = F();
1357
1364
  return /* @__PURE__ */ a("div", { className: t && !e ? "astw:md:hidden" : void 0, children: /* @__PURE__ */ a(Kt, { className: "astw:-ml-2.5" }) });
1358
- }, us = (t) => {
1359
- const e = t.children ? t.children({ Outlet: wt }) : null, s = Oe(), r = () => {
1365
+ }, hs = (t) => {
1366
+ const e = t.children ? t.children({ Outlet: ut }) : null, s = We(), r = () => {
1360
1367
  s.setTheme(s.theme === "dark" ? "light" : "dark");
1361
1368
  };
1362
- return /* @__PURE__ */ a(Ye, { className: "astw:flex astw:flex-col", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:flex-1", children: [
1363
- t.sidebar ?? /* @__PURE__ */ a(ca, {}),
1364
- /* @__PURE__ */ d(Ze, { className: "astw:w-[calc(100%-var(--sidebar-width))]", children: [
1369
+ return /* @__PURE__ */ a(Ze, { className: "astw:flex astw:flex-col", children: /* @__PURE__ */ d("div", { className: "astw:flex astw:flex-1", children: [
1370
+ t.sidebar ?? /* @__PURE__ */ a(ua, {}),
1371
+ /* @__PURE__ */ d(ta, { className: "astw:w-[calc(100%-var(--sidebar-width))]", children: [
1365
1372
  /* @__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__ */ d("div", { className: "astw:flex astw:w-full astw:items-center astw:justify-between", children: [
1366
1373
  /* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:gap-2", children: [
1367
- /* @__PURE__ */ a(da, {}),
1368
- /* @__PURE__ */ a(fa, {})
1374
+ /* @__PURE__ */ a(wa, {}),
1375
+ /* @__PURE__ */ a(ga, {})
1369
1376
  ] }),
1370
- /* @__PURE__ */ a("div", { className: "astw:flex astw:items-center astw:gap-2", children: /* @__PURE__ */ a(_, { variant: "outline", size: "icon", onClick: r, children: /* @__PURE__ */ a(ue, {}) }) })
1377
+ /* @__PURE__ */ a("div", { className: "astw:flex astw:items-center astw:gap-2", children: /* @__PURE__ */ a(_, { variant: "outline", size: "icon", onClick: r, children: /* @__PURE__ */ a(me, {}) }) })
1371
1378
  ] }) }),
1372
- /* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-4", children: e ?? /* @__PURE__ */ a(wt, {}) })
1379
+ /* @__PURE__ */ a("div", { className: "astw:flex astw:flex-col astw:gap-4", children: e ?? /* @__PURE__ */ a(ut, {}) })
1373
1380
  ] })
1374
1381
  ] }) });
1375
- }, ca = (t) => {
1376
- const { title: e, icon: s } = P(), { pathname: r } = Rt(), { isIconMode: n } = F(), o = /* @__PURE__ */ d(Je, { children: [
1382
+ }, ua = (t) => {
1383
+ const { title: e, icon: s } = A(), { pathname: r } = Et(), { isIconMode: n } = F(), o = /* @__PURE__ */ d(ea, { children: [
1377
1384
  s,
1378
1385
  /* @__PURE__ */ a(
1379
1386
  "h1",
@@ -1386,23 +1393,23 @@ const da = () => {
1386
1393
  }
1387
1394
  )
1388
1395
  ] });
1389
- return /* @__PURE__ */ d(Xe, { variant: "inset", collapsible: n ? "icon" : "offcanvas", children: [
1396
+ return /* @__PURE__ */ d(Je, { variant: "inset", collapsible: n ? "icon" : "offcanvas", children: [
1390
1397
  !n && /* @__PURE__ */ d("div", { className: "astw:flex astw:justify-between astw:items-center", children: [
1391
1398
  t.header ?? o,
1392
1399
  /* @__PURE__ */ a("div", { className: "astw:hidden astw:md:block", children: /* @__PURE__ */ a(Kt, { className: "astw:-ml-1" }) })
1393
1400
  ] }),
1394
- /* @__PURE__ */ a(ta, { children: /* @__PURE__ */ a(Dt, { fallback: /* @__PURE__ */ a(ma, {}), children: /* @__PURE__ */ a(wa, { currentPath: r }) }) }),
1401
+ /* @__PURE__ */ a(aa, { children: /* @__PURE__ */ a(Dt, { fallback: /* @__PURE__ */ a(fa, {}), children: /* @__PURE__ */ a(ma, { currentPath: r }) }) }),
1395
1402
  t.footer ?? null
1396
1403
  ] });
1397
- }, wa = ({ currentPath: t }) => {
1404
+ }, ma = ({ currentPath: t }) => {
1398
1405
  const e = Ft();
1399
- return /* @__PURE__ */ a(Et, { resolve: e, children: (s) => /* @__PURE__ */ a(ua, { items: s ?? [], currentPath: t }) });
1400
- }, ua = (t) => {
1401
- const e = L();
1402
- return /* @__PURE__ */ a(Vt, { children: /* @__PURE__ */ a(Ht, { children: t.items.map((s) => /* @__PURE__ */ a($e, { asChild: !0, defaultOpen: !0, children: /* @__PURE__ */ d(Ut, { children: [
1403
- s.url ? /* @__PURE__ */ d(B, { children: [
1404
- /* @__PURE__ */ a(bt, { asChild: !0, tooltip: s.title, children: /* @__PURE__ */ d(
1405
- q,
1406
+ return /* @__PURE__ */ a(Bt, { resolve: e, children: (s) => /* @__PURE__ */ a(ha, { items: s ?? [], currentPath: t }) });
1407
+ }, ha = (t) => {
1408
+ const e = D();
1409
+ return /* @__PURE__ */ a(Vt, { children: /* @__PURE__ */ a(Ut, { children: t.items.map((s) => /* @__PURE__ */ a(je, { asChild: !0, defaultOpen: !0, children: /* @__PURE__ */ d(Ht, { children: [
1410
+ s.url ? /* @__PURE__ */ d(E, { children: [
1411
+ /* @__PURE__ */ a(xt, { asChild: !0, tooltip: s.title, children: /* @__PURE__ */ d(
1412
+ Y,
1406
1413
  {
1407
1414
  to: s.url,
1408
1415
  className: s.url === t.currentPath ? "astw:bg-sidebar-accent astw:font-medium" : void 0,
@@ -1412,17 +1419,17 @@ const da = () => {
1412
1419
  ]
1413
1420
  }
1414
1421
  ) }),
1415
- !!s.items?.length && /* @__PURE__ */ a(ut, { asChild: !0, children: /* @__PURE__ */ d(xt, { className: "astw:data-[state=open]:rotate-90", children: [
1422
+ !!s.items?.length && /* @__PURE__ */ a(mt, { asChild: !0, children: /* @__PURE__ */ d(vt, { className: "astw:data-[state=open]:rotate-90", children: [
1416
1423
  /* @__PURE__ */ a(Q, {}),
1417
1424
  /* @__PURE__ */ a("span", { className: "astw:sr-only", children: e("toggle") })
1418
1425
  ] }) })
1419
- ] }) : /* @__PURE__ */ a(B, { children: /* @__PURE__ */ d(ut, { className: "astw:flex astw:w-[100%] astw:[&[data-state=open]_.astw-rotate-target]:rotate-90", children: [
1420
- /* @__PURE__ */ a(bt, { asChild: !0, tooltip: s.title, children: /* @__PURE__ */ d("span", { className: "astw:flex astw:w-[100%]", children: [
1426
+ ] }) : /* @__PURE__ */ a(E, { children: /* @__PURE__ */ d(mt, { className: "astw:flex astw:w-[100%] astw:[&[data-state=open]_.astw-rotate-target]:rotate-90", children: [
1427
+ /* @__PURE__ */ a(xt, { asChild: !0, tooltip: s.title, children: /* @__PURE__ */ d("span", { className: "astw:flex astw:w-[100%]", children: [
1421
1428
  s.icon,
1422
1429
  /* @__PURE__ */ a("span", { children: s.title })
1423
1430
  ] }) }),
1424
1431
  !!s.items?.length && /* @__PURE__ */ a(
1425
- xt,
1432
+ vt,
1426
1433
  {
1427
1434
  className: "astw-rotate-target",
1428
1435
  asChild: !0,
@@ -1433,8 +1440,8 @@ const da = () => {
1433
1440
  }
1434
1441
  )
1435
1442
  ] }) }),
1436
- !!s.items?.length && /* @__PURE__ */ a(We, { children: /* @__PURE__ */ a(aa, { children: s.items?.map((r) => /* @__PURE__ */ a(sa, { children: /* @__PURE__ */ a(ra, { asChild: !0, children: /* @__PURE__ */ a(
1437
- q,
1443
+ !!s.items?.length && /* @__PURE__ */ a(Ke, { children: /* @__PURE__ */ a(ra, { children: s.items?.map((r) => /* @__PURE__ */ a(na, { children: /* @__PURE__ */ a(oa, { asChild: !0, children: /* @__PURE__ */ a(
1444
+ Y,
1438
1445
  {
1439
1446
  to: r.url,
1440
1447
  className: r.url === t.currentPath ? "astw:bg-sidebar-accent astw:font-medium" : void 0,
@@ -1442,9 +1449,9 @@ const da = () => {
1442
1449
  }
1443
1450
  ) }) }, r.title)) }) })
1444
1451
  ] }) }, s.title)) }) });
1445
- }, ma = () => {
1452
+ }, fa = () => {
1446
1453
  const e = [...[112, 96, 80, 104, 88, 100, 92, 84]].sort(() => Math.random() - 0.5);
1447
- return /* @__PURE__ */ a(Vt, { children: /* @__PURE__ */ a(Ht, { className: "astw:px-2", children: e.map((s, r) => /* @__PURE__ */ a(Ut, { children: /* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:gap-2 astw:py-1.5", children: [
1454
+ return /* @__PURE__ */ a(Vt, { children: /* @__PURE__ */ a(Ut, { className: "astw:px-2", children: e.map((s, r) => /* @__PURE__ */ a(Ht, { children: /* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:gap-2 astw:py-1.5", children: [
1448
1455
  /* @__PURE__ */ a("div", { className: "astw:h-4 astw:w-4 astw:rounded-md astw:bg-muted" }),
1449
1456
  /* @__PURE__ */ a(
1450
1457
  "div",
@@ -1454,39 +1461,39 @@ const da = () => {
1454
1461
  }
1455
1462
  )
1456
1463
  ] }) }, r)) }) });
1457
- }, ha = () => {
1458
- const { configurations: t } = P(), e = Rt();
1459
- return la(
1464
+ }, pa = () => {
1465
+ const { configurations: t } = A(), e = Et();
1466
+ return ca(
1460
1467
  e.pathname,
1461
1468
  t.basePath,
1462
1469
  t.modules,
1463
1470
  t.locale
1464
1471
  );
1465
- }, fa = () => {
1466
- const { segments: t } = ha(), e = oe("/:prefix/settings/:suffix"), s = L();
1467
- return e ? /* @__PURE__ */ a(vt, { children: /* @__PURE__ */ a(yt, { children: /* @__PURE__ */ a("div", { className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground", children: /* @__PURE__ */ a(Nt, { children: /* @__PURE__ */ a(Ct, { to: `/${e.params.prefix}/settings`, children: s("settings") }) }) }) }) }) : /* @__PURE__ */ a(vt, { children: /* @__PURE__ */ a(yt, { children: t.map((r, n) => /* @__PURE__ */ d(
1472
+ }, ga = () => {
1473
+ const { segments: t } = pa(), e = ie("/:prefix/settings/:suffix"), s = D();
1474
+ return e ? /* @__PURE__ */ a(yt, { children: /* @__PURE__ */ a(Nt, { children: /* @__PURE__ */ a("div", { className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground", children: /* @__PURE__ */ a(St, { children: /* @__PURE__ */ a(Ct, { to: `/${e.params.prefix}/settings`, children: s("settings") }) }) }) }) }) : /* @__PURE__ */ a(yt, { children: /* @__PURE__ */ a(Nt, { children: t.map((r, n) => /* @__PURE__ */ d(
1468
1475
  "div",
1469
1476
  {
1470
1477
  className: "astw:inline-flex astw:items-center astw:gap-3 astw:last:text-foreground",
1471
1478
  children: [
1472
- /* @__PURE__ */ a(Nt, { children: /* @__PURE__ */ a(Ct, { to: r.path, children: r.title }) }),
1473
- n < t.length - 1 && /* @__PURE__ */ a(na, {})
1479
+ /* @__PURE__ */ a(St, { children: /* @__PURE__ */ a(Ct, { to: r.path, children: r.title }) }),
1480
+ n < t.length - 1 && /* @__PURE__ */ a(ia, {})
1474
1481
  ]
1475
1482
  },
1476
1483
  n
1477
1484
  )) }) });
1478
1485
  };
1479
- function ga({
1486
+ function ba({
1480
1487
  ...t
1481
1488
  }) {
1482
1489
  return /* @__PURE__ */ a(b.Root, { "data-slot": "dialog", ...t });
1483
1490
  }
1484
- function pa({
1491
+ function xa({
1485
1492
  ...t
1486
1493
  }) {
1487
1494
  return /* @__PURE__ */ a(b.Portal, { "data-slot": "dialog-portal", ...t });
1488
1495
  }
1489
- function ba({
1496
+ function va({
1490
1497
  className: t,
1491
1498
  ...e
1492
1499
  }) {
@@ -1502,13 +1509,13 @@ function ba({
1502
1509
  }
1503
1510
  );
1504
1511
  }
1505
- function xa({
1512
+ function ya({
1506
1513
  className: t,
1507
1514
  children: e,
1508
1515
  ...s
1509
1516
  }) {
1510
- return /* @__PURE__ */ d(pa, { "data-slot": "dialog-portal", children: [
1511
- /* @__PURE__ */ a(ba, {}),
1517
+ return /* @__PURE__ */ d(xa, { "data-slot": "dialog-portal", children: [
1518
+ /* @__PURE__ */ a(va, {}),
1512
1519
  /* @__PURE__ */ d(
1513
1520
  b.Content,
1514
1521
  {
@@ -1521,7 +1528,7 @@ function xa({
1521
1528
  children: [
1522
1529
  e,
1523
1530
  /* @__PURE__ */ d(b.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: [
1524
- /* @__PURE__ */ a(Bt, {}),
1531
+ /* @__PURE__ */ a(At, {}),
1525
1532
  /* @__PURE__ */ a("span", { className: "astw:sr-only", children: "Close" })
1526
1533
  ] })
1527
1534
  ]
@@ -1529,7 +1536,7 @@ function xa({
1529
1536
  )
1530
1537
  ] });
1531
1538
  }
1532
- function va({
1539
+ function Na({
1533
1540
  className: t,
1534
1541
  ...e
1535
1542
  }) {
@@ -1542,7 +1549,7 @@ function va({
1542
1549
  }
1543
1550
  );
1544
1551
  }
1545
- function ya(t) {
1552
+ function Sa(t) {
1546
1553
  const e = [], s = (r, n, o) => {
1547
1554
  r.forEach((i) => {
1548
1555
  const l = [...o, i.title];
@@ -1563,16 +1570,16 @@ function ya(t) {
1563
1570
  }), s(r.items, r.icon, [r.title]);
1564
1571
  }), e;
1565
1572
  }
1566
- function Na({
1573
+ function Ca({
1567
1574
  routes: t
1568
1575
  }) {
1569
- const e = ie(), s = pe(null), [r, n] = R(!1), [o, i] = R(""), [l, u] = R(0), w = k(
1570
- () => oa(t, o),
1576
+ const e = le(), s = be(null), [r, n] = M(!1), [o, i] = M(""), [l, u] = M(0), w = k(
1577
+ () => la(t, o),
1571
1578
  [t, o]
1572
1579
  );
1573
1580
  y(() => {
1574
- const f = (g) => {
1575
- (g.metaKey || g.ctrlKey) && g.key === "k" && (g.preventDefault(), n((M) => !M));
1581
+ const f = (p) => {
1582
+ (p.metaKey || p.ctrlKey) && p.key === "k" && (p.preventDefault(), n((P) => !P));
1576
1583
  };
1577
1584
  return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
1578
1585
  }, []), y(() => {
@@ -1582,22 +1589,22 @@ function Na({
1582
1589
  }, [r]), y(() => {
1583
1590
  s.current && s.current.querySelector(`[data-index="${l}"]`)?.scrollIntoView({ block: "nearest" });
1584
1591
  }, [l]);
1585
- const c = ct(
1592
+ const c = W(
1586
1593
  (f) => {
1587
1594
  e(f.path), n(!1), i("");
1588
1595
  },
1589
1596
  [e]
1590
- ), h = ct(
1597
+ ), h = W(
1591
1598
  (f) => {
1592
1599
  if (!f.nativeEvent.isComposing)
1593
1600
  switch (f.key) {
1594
1601
  case "ArrowDown":
1595
1602
  f.preventDefault(), u(
1596
- (g) => g < w.length - 1 ? g + 1 : g
1603
+ (p) => p < w.length - 1 ? p + 1 : p
1597
1604
  );
1598
1605
  break;
1599
1606
  case "ArrowUp":
1600
- f.preventDefault(), u((g) => g > 0 ? g - 1 : g);
1607
+ f.preventDefault(), u((p) => p > 0 ? p - 1 : p);
1601
1608
  break;
1602
1609
  case "Enter":
1603
1610
  f.preventDefault(), w[l] && c(w[l]);
@@ -1618,10 +1625,10 @@ function Na({
1618
1625
  listRef: s
1619
1626
  };
1620
1627
  }
1621
- function Ca({
1628
+ function Ta({
1622
1629
  navItems: t
1623
1630
  }) {
1624
- const e = L(), s = k(() => ya(t), [t]), {
1631
+ const e = D(), s = k(() => Sa(t), [t]), {
1625
1632
  open: r,
1626
1633
  setOpen: n,
1627
1634
  search: o,
@@ -1631,19 +1638,19 @@ function Ca({
1631
1638
  handleSelect: w,
1632
1639
  handleKeyDown: c,
1633
1640
  listRef: h
1634
- } = Na({ routes: s });
1635
- return /* @__PURE__ */ a(ga, { open: r, onOpenChange: n, children: /* @__PURE__ */ d(
1636
- xa,
1641
+ } = Ca({ routes: s });
1642
+ return /* @__PURE__ */ a(ba, { open: r, onOpenChange: n, children: /* @__PURE__ */ d(
1643
+ ya,
1637
1644
  {
1638
1645
  className: "astw:p-0 astw:gap-0 astw:sm:max-w-2xl astw:overflow-hidden",
1639
1646
  onKeyDown: c,
1640
1647
  "aria-describedby": void 0,
1641
1648
  children: [
1642
- /* @__PURE__ */ a(va, { className: "astw:sr-only", children: e("commandPaletteSearch") }),
1649
+ /* @__PURE__ */ a(Na, { className: "astw:sr-only", children: e("commandPaletteSearch") }),
1643
1650
  /* @__PURE__ */ d("div", { className: "astw:flex astw:items-center astw:border-b astw:px-3 astw:py-1", children: [
1644
- /* @__PURE__ */ a(me, { className: "astw:mr-2 astw:h-4 astw:w-4 astw:shrink-0 astw:opacity-50" }),
1651
+ /* @__PURE__ */ a(he, { className: "astw:mr-2 astw:h-4 astw:w-4 astw:shrink-0 astw:opacity-50" }),
1645
1652
  /* @__PURE__ */ a(
1646
- Ve,
1653
+ He,
1647
1654
  {
1648
1655
  value: o,
1649
1656
  onChange: (f) => i(f.target.value),
@@ -1658,14 +1665,14 @@ function Ca({
1658
1665
  {
1659
1666
  ref: h,
1660
1667
  className: "astw:max-h-[300px] astw:overflow-y-auto astw:overflow-x-hidden",
1661
- 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__ */ d(
1668
+ 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, p) => /* @__PURE__ */ d(
1662
1669
  "button",
1663
1670
  {
1664
- "data-index": g,
1671
+ "data-index": p,
1665
1672
  onClick: () => w(f),
1666
1673
  className: m(
1667
1674
  "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",
1668
- g === l ? "astw:bg-accent astw:text-accent-foreground" : "astw:hover:bg-accent astw:hover:text-accent-foreground"
1675
+ p === l ? "astw:bg-accent astw:text-accent-foreground" : "astw:hover:bg-accent astw:hover:text-accent-foreground"
1669
1676
  ),
1670
1677
  children: [
1671
1678
  /* @__PURE__ */ a("span", { className: "astw:truncate astw:w-full astw:text-left", children: f.breadcrumb.join(" > ") }),
@@ -1683,50 +1690,98 @@ function Ca({
1683
1690
  }
1684
1691
  ) });
1685
1692
  }
1686
- function ms() {
1693
+ function fs() {
1687
1694
  const t = Ft();
1688
- return /* @__PURE__ */ a(Dt, { fallback: null, children: /* @__PURE__ */ a(Et, { resolve: t, children: (e) => /* @__PURE__ */ a(Ca, { navItems: e ?? [] }) }) });
1689
- }
1690
- const Qt = W(null), hs = (t) => {
1691
- const e = k(
1692
- () => ve({
1693
- clientId: t.clientId,
1694
- appUri: t.apiEndpoint,
1695
- redirectUri: t.redirectUri,
1696
- meQuery: t.meQuery && (typeof t.meQuery == "string" ? t.meQuery : xe(t.meQuery))
1697
- }),
1698
- [t.clientId, t.apiEndpoint, t.redirectUri, t.meQuery]
1699
- ), [s, r] = R(
1700
- () => e.getState()
1701
- );
1702
- y(() => {
1703
- t.autoLogin && (s.isLoading || s.isAuthenticated || (async () => await e.login())());
1704
- }, [s.isLoading, s.isAuthenticated, t.autoLogin]), y(
1705
- () => e.addEventListener((o) => {
1706
- o.type === "auth_state_changed" && r(o.data);
1695
+ return /* @__PURE__ */ a(Dt, { fallback: null, children: /* @__PURE__ */ a(Bt, { resolve: t, children: (e) => /* @__PURE__ */ a(Ta, { navItems: e ?? [] }) }) });
1696
+ }
1697
+ function ka(t) {
1698
+ const e = new URLSearchParams(t.search);
1699
+ e.delete("code"), e.delete("state");
1700
+ const s = e.toString();
1701
+ return t.pathname + (s ? `?${s}` : "") + t.hash;
1702
+ }
1703
+ function ps(t) {
1704
+ const e = Ne(t), { appUri: s } = t;
1705
+ return {
1706
+ ...e,
1707
+ getAppUri() {
1708
+ return s;
1709
+ },
1710
+ async getAuthHeadersForQuery(n = "/query", o = "POST") {
1711
+ const i = `${s}${n}`;
1712
+ return e.getAuthHeaders(i, o);
1713
+ }
1714
+ };
1715
+ }
1716
+ const qt = j(null), gs = (t) => {
1717
+ const e = t.client, s = W(
1718
+ (l) => e.addEventListener((u) => {
1719
+ u.type === "auth_state_changed" && l();
1707
1720
  }),
1708
1721
  [e]
1709
- );
1710
- const n = t.guardComponent && (s.isLoading || !s.isAuthenticated) ? /* @__PURE__ */ a(t.guardComponent, {}) : t.children;
1722
+ ), r = W(() => e.getState(), [e]), n = xe(s, r);
1723
+ y(() => {
1724
+ (async () => {
1725
+ if (new URLSearchParams(window.location.search).has("code"))
1726
+ try {
1727
+ await e.handleCallback();
1728
+ const w = ka(
1729
+ new URL(window.location.href)
1730
+ );
1731
+ window.history.replaceState({}, "", w);
1732
+ } catch (w) {
1733
+ console.error("Failed to handle callback:", w);
1734
+ }
1735
+ else
1736
+ await e.checkAuthStatus();
1737
+ })();
1738
+ }, [e]), y(() => {
1739
+ t.autoLogin && (!n.isReady || n.isAuthenticated || e.login());
1740
+ }, [n.isReady, n.isAuthenticated, t.autoLogin, e]);
1741
+ const o = n.isAuthenticated, i = t.guardComponent && (!n.isReady || !o) ? /* @__PURE__ */ a(t.guardComponent, {}) : t.children;
1711
1742
  return /* @__PURE__ */ a(
1712
- Qt.Provider,
1743
+ qt.Provider,
1713
1744
  {
1714
1745
  value: {
1715
- authState: s,
1716
- login: async () => e.login(),
1717
- logout: async () => e.logout(),
1718
- checkAuthStatus: async () => e.checkAuthStatus(),
1719
- handleCallback: async () => e.handleCallback()
1746
+ authState: n,
1747
+ login: () => e.login(),
1748
+ logout: () => e.logout(),
1749
+ checkAuthStatus: () => e.checkAuthStatus(),
1750
+ ready: () => e.ready()
1720
1751
  },
1721
- children: n
1752
+ children: i
1722
1753
  }
1723
1754
  );
1724
- }, fs = () => {
1725
- const t = D(Qt);
1755
+ }, Gt = () => {
1756
+ const t = B(qt);
1726
1757
  if (!t)
1727
- throw new Error("useAuth must be used within an AuthProvider");
1758
+ throw new Error(
1759
+ "useAuth/useAuthSuspense must be used within an AuthProvider"
1760
+ );
1728
1761
  return t;
1729
- }, Sa = Y(
1762
+ }, bs = () => {
1763
+ const t = Gt(), { isAuthenticated: e, error: s, isReady: r } = t.authState;
1764
+ return {
1765
+ error: s,
1766
+ isAuthenticated: e,
1767
+ isReady: r,
1768
+ login: t.login,
1769
+ logout: t.logout,
1770
+ checkAuthStatus: t.checkAuthStatus
1771
+ };
1772
+ }, xs = () => {
1773
+ const t = Gt();
1774
+ if (!t.authState.isReady)
1775
+ throw t.ready();
1776
+ const { isAuthenticated: e, error: s } = t.authState;
1777
+ return {
1778
+ error: s,
1779
+ isAuthenticated: e,
1780
+ login: t.login,
1781
+ logout: t.logout,
1782
+ checkAuthStatus: t.checkAuthStatus
1783
+ };
1784
+ }, vs = () => ye, Ra = Z(
1730
1785
  "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",
1731
1786
  {
1732
1787
  variants: {
@@ -1748,38 +1803,38 @@ const Qt = W(null), hs = (t) => {
1748
1803
  variant: "default"
1749
1804
  }
1750
1805
  }
1751
- ), Ta = {
1806
+ ), Ea = {
1752
1807
  "outline-success": "astw:bg-green-500",
1753
1808
  "outline-warning": "astw:bg-orange-500",
1754
1809
  "outline-error": "astw:bg-red-500",
1755
1810
  "outline-info": "astw:bg-blue-500",
1756
1811
  "outline-neutral": "astw:bg-neutral-400"
1757
1812
  };
1758
- function ka({ variant: t }) {
1759
- const e = Ta[t];
1813
+ function Ba({ variant: t }) {
1814
+ const e = Ea[t];
1760
1815
  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;
1761
1816
  }
1762
- function Ra({ className: t, variant: e, children: s, ...r }) {
1817
+ function Aa({ className: t, variant: e, children: s, ...r }) {
1763
1818
  const n = e?.toString().startsWith("outline-");
1764
1819
  return /* @__PURE__ */ d(
1765
1820
  "div",
1766
1821
  {
1767
- className: m(Sa({ variant: e }), t),
1822
+ className: m(Ra({ variant: e }), t),
1768
1823
  ...r,
1769
1824
  children: [
1770
- n && /* @__PURE__ */ a(ka, { variant: e }),
1825
+ n && /* @__PURE__ */ a(Ba, { variant: e }),
1771
1826
  s
1772
1827
  ]
1773
1828
  }
1774
1829
  );
1775
1830
  }
1776
- function Ea(t) {
1831
+ function Da(t) {
1777
1832
  return t.type === "divider";
1778
1833
  }
1779
- function Ba(t) {
1834
+ function Pa(t) {
1780
1835
  return t.type !== "divider" && "key" in t;
1781
1836
  }
1782
- function K(t, e) {
1837
+ function U(t, e) {
1783
1838
  return e.split(".").reduce((s, r) => {
1784
1839
  if (s && typeof s == "object" && r in s)
1785
1840
  return s[r];
@@ -1788,10 +1843,10 @@ function K(t, e) {
1788
1843
  function v(t) {
1789
1844
  return t == null || t === "";
1790
1845
  }
1791
- function Da(t) {
1846
+ function La(t) {
1792
1847
  return t.toLowerCase().replace(/_/g, " ").replace(/^\w/, (e) => e.toUpperCase());
1793
1848
  }
1794
- function Pa(t, e = "medium") {
1849
+ function Ma(t, e = "medium") {
1795
1850
  if (v(t)) return "";
1796
1851
  const s = t instanceof Date ? t : new Date(String(t));
1797
1852
  if (isNaN(s.getTime())) return String(t);
@@ -1823,7 +1878,7 @@ function Pa(t, e = "medium") {
1823
1878
  return s.toLocaleDateString();
1824
1879
  }
1825
1880
  }
1826
- function La(t, e) {
1881
+ function Ia(t, e) {
1827
1882
  if (v(t)) return "";
1828
1883
  const s = typeof t == "number" ? t : parseFloat(String(t));
1829
1884
  if (isNaN(s)) return String(t);
@@ -1836,7 +1891,7 @@ function La(t, e) {
1836
1891
  return `${e || "$"}${s.toFixed(2)}`;
1837
1892
  }
1838
1893
  }
1839
- function Ma(t) {
1894
+ function _a(t) {
1840
1895
  if (v(t)) return [];
1841
1896
  if (typeof t == "string")
1842
1897
  return t.split(/[,\n]/).map((e) => e.trim()).filter(Boolean);
@@ -1852,10 +1907,10 @@ function Ma(t) {
1852
1907
  }
1853
1908
  return [String(t)];
1854
1909
  }
1855
- function qt({ value: t }) {
1856
- const [e, s] = p.useState(!1);
1857
- return /* @__PURE__ */ d(rt, { children: [
1858
- /* @__PURE__ */ a(nt, { asChild: !0, children: /* @__PURE__ */ a(
1910
+ function Qt({ value: t }) {
1911
+ const [e, s] = g.useState(!1);
1912
+ return /* @__PURE__ */ d(ot, { children: [
1913
+ /* @__PURE__ */ a(it, { asChild: !0, children: /* @__PURE__ */ a(
1859
1914
  "button",
1860
1915
  {
1861
1916
  onClick: async (n) => {
@@ -1866,16 +1921,16 @@ function qt({ value: t }) {
1866
1921
  }
1867
1922
  },
1868
1923
  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",
1869
- children: e ? /* @__PURE__ */ a(fe, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 }) : /* @__PURE__ */ a(ge, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 })
1924
+ children: e ? /* @__PURE__ */ a(pe, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 }) : /* @__PURE__ */ a(ge, { className: "astw:h-3 astw:w-3", strokeWidth: 2.5 })
1870
1925
  }
1871
1926
  ) }),
1872
- /* @__PURE__ */ a(ot, { side: "top", children: e ? "Copied!" : "Copy" })
1927
+ /* @__PURE__ */ a(lt, { side: "top", children: e ? "Copied!" : "Copy" })
1873
1928
  ] });
1874
1929
  }
1875
1930
  const N = "–";
1876
- function Ia({ field: t }) {
1877
- const e = v(t.value) ? N : String(t.value), s = t.meta?.copyable && !v(t.value), r = t.meta?.truncateLines, n = p.useRef(null), [o, i] = p.useState(!1);
1878
- p.useEffect(() => {
1931
+ function za({ field: t }) {
1932
+ const e = v(t.value) ? N : String(t.value), s = t.meta?.copyable && !v(t.value), r = t.meta?.truncateLines, n = g.useRef(null), [o, i] = g.useState(!1);
1933
+ g.useEffect(() => {
1879
1934
  if (!r) {
1880
1935
  i(!1);
1881
1936
  return;
@@ -1905,35 +1960,35 @@ function Ia({ field: t }) {
1905
1960
  children: e
1906
1961
  }
1907
1962
  ),
1908
- s && /* @__PURE__ */ a(qt, { value: String(t.value) })
1963
+ s && /* @__PURE__ */ a(Qt, { value: String(t.value) })
1909
1964
  ] });
1910
- return r && o ? /* @__PURE__ */ d(rt, { children: [
1911
- /* @__PURE__ */ a(nt, { asChild: !0, children: /* @__PURE__ */ a("span", { className: "astw:cursor-default", children: u }) }),
1912
- /* @__PURE__ */ a(ot, { side: "bottom", style: { maxWidth: 320 }, children: /* @__PURE__ */ a("p", { className: "astw:text-sm", children: e }) })
1965
+ return r && o ? /* @__PURE__ */ d(ot, { children: [
1966
+ /* @__PURE__ */ a(it, { asChild: !0, children: /* @__PURE__ */ a("span", { className: "astw:cursor-default", children: u }) }),
1967
+ /* @__PURE__ */ a(lt, { side: "bottom", style: { maxWidth: 320 }, children: /* @__PURE__ */ a("p", { className: "astw:text-sm", children: e }) })
1913
1968
  ] }) : u;
1914
1969
  }
1915
- function Aa({ field: t }) {
1970
+ function Fa({ field: t }) {
1916
1971
  if (v(t.value))
1917
1972
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: N });
1918
1973
  const e = String(t.value), s = t.meta?.badgeVariantMap || {}, r = e.toLowerCase(), n = s[e] || s[r] || "outline-neutral";
1919
- return /* @__PURE__ */ a(Ra, { variant: n, className: "astw:w-fit", children: Da(e) });
1974
+ return /* @__PURE__ */ a(Aa, { variant: n, className: "astw:w-fit", children: La(e) });
1920
1975
  }
1921
- function _a({ field: t }) {
1976
+ function Oa({ field: t }) {
1922
1977
  if (v(t.value))
1923
1978
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: N });
1924
- const e = t.meta?.currencyKey || "currency", s = K(t.data, e), r = La(t.value, s);
1979
+ const e = t.meta?.currencyKey || "currency", s = U(t.data, e), r = Ia(t.value, s);
1925
1980
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:tabular-nums", children: r });
1926
1981
  }
1927
- function za({ field: t }) {
1982
+ function $a({ field: t }) {
1928
1983
  if (v(t.value))
1929
1984
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: N });
1930
- const e = t.meta?.dateFormat || "medium", s = Pa(t.value, e);
1985
+ const e = t.meta?.dateFormat || "medium", s = Ma(t.value, e);
1931
1986
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: s });
1932
1987
  }
1933
- function Fa({ field: t }) {
1988
+ function Wa({ field: t }) {
1934
1989
  if (v(t.value))
1935
1990
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: N });
1936
- const e = t.meta?.hrefKey, s = e ? K(t.data, e) : void 0, r = t.meta?.external ?? !1, n = String(t.value);
1991
+ const e = t.meta?.hrefKey, s = e ? U(t.data, e) : void 0, r = t.meta?.external ?? !1, n = String(t.value);
1937
1992
  return s ? /* @__PURE__ */ d(
1938
1993
  "a",
1939
1994
  {
@@ -1943,63 +1998,63 @@ function Fa({ field: t }) {
1943
1998
  className: "astw:inline-flex astw:items-center astw:gap-1 astw:text-sm astw:text-primary astw:hover:underline",
1944
1999
  children: [
1945
2000
  n,
1946
- r && /* @__PURE__ */ a(he, { className: "astw:h-3 astw:w-3" })
2001
+ r && /* @__PURE__ */ a(fe, { className: "astw:h-3 astw:w-3" })
1947
2002
  ]
1948
2003
  }
1949
2004
  ) : /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: n });
1950
2005
  }
1951
- function Oa({ field: t }) {
2006
+ function ja({ field: t }) {
1952
2007
  if (v(t.value))
1953
2008
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: N });
1954
- const e = Ma(t.value), s = t.meta?.copyable && !v(t.value), r = e.join(`
2009
+ const e = _a(t.value), s = t.meta?.copyable && !v(t.value), r = e.join(`
1955
2010
  `);
1956
2011
  return /* @__PURE__ */ d("div", { className: "astw:flex astw:items-start astw:gap-1 astw:min-w-0", children: [
1957
- /* @__PURE__ */ a("address", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:not-italic", children: e.map((n, o) => /* @__PURE__ */ d(p.Fragment, { children: [
2012
+ /* @__PURE__ */ a("address", { className: "astw:text-sm astw:font-medium astw:text-foreground astw:not-italic", children: e.map((n, o) => /* @__PURE__ */ d(g.Fragment, { children: [
1958
2013
  n,
1959
2014
  o < e.length - 1 && /* @__PURE__ */ a("br", {})
1960
2015
  ] }, o)) }),
1961
- s && /* @__PURE__ */ a(qt, { value: r })
2016
+ s && /* @__PURE__ */ a(Qt, { value: r })
1962
2017
  ] });
1963
2018
  }
1964
- function $a({ field: t }) {
2019
+ function Ka({ field: t }) {
1965
2020
  if (v(t.value))
1966
2021
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: N });
1967
- const e = t.meta?.referenceIdKey, s = t.meta?.referenceUrlPattern, r = e ? K(t.data, e) : void 0, n = String(t.value);
2022
+ const e = t.meta?.referenceIdKey, s = t.meta?.referenceUrlPattern, r = e ? U(t.data, e) : void 0, n = String(t.value);
1968
2023
  if (!r || !s)
1969
2024
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: n });
1970
2025
  const o = s.replace("{id}", r);
1971
2026
  return /* @__PURE__ */ a("a", { href: o, className: "astw:text-sm astw:text-primary astw:hover:underline", children: n });
1972
2027
  }
1973
- function St(t) {
2028
+ function Tt(t) {
1974
2029
  switch (t.type) {
1975
2030
  case "text":
1976
- return /* @__PURE__ */ a(Ia, { field: t });
2031
+ return /* @__PURE__ */ a(za, { field: t });
1977
2032
  case "badge":
1978
- return /* @__PURE__ */ a(Aa, { field: t });
2033
+ return /* @__PURE__ */ a(Fa, { field: t });
1979
2034
  case "money":
1980
- return /* @__PURE__ */ a(_a, { field: t });
2035
+ return /* @__PURE__ */ a(Oa, { field: t });
1981
2036
  case "date":
1982
- return /* @__PURE__ */ a(za, { field: t });
2037
+ return /* @__PURE__ */ a($a, { field: t });
1983
2038
  case "link":
1984
- return /* @__PURE__ */ a(Fa, { field: t });
2039
+ return /* @__PURE__ */ a(Wa, { field: t });
1985
2040
  case "address":
1986
- return /* @__PURE__ */ a(Oa, { field: t });
2041
+ return /* @__PURE__ */ a(ja, { field: t });
1987
2042
  case "reference":
1988
- return /* @__PURE__ */ a($a, { field: t });
2043
+ return /* @__PURE__ */ a(Ka, { field: t });
1989
2044
  default:
1990
2045
  return /* @__PURE__ */ a("span", { className: "astw:text-sm astw:font-medium astw:text-foreground", children: N });
1991
2046
  }
1992
2047
  }
1993
- function Wa(t) {
2048
+ function Va(t) {
1994
2049
  if (t.emptyBehavior !== "hide") return !1;
1995
2050
  const e = t.value;
1996
2051
  return e == null || e === "";
1997
2052
  }
1998
- function ja(t) {
2053
+ function Ua(t) {
1999
2054
  return !1;
2000
2055
  }
2001
- function Ka(t, e, s) {
2002
- const r = K(e, t.key);
2056
+ function Ha(t, e, s) {
2057
+ const r = U(e, t.key);
2003
2058
  return {
2004
2059
  id: `${t.key}-${s}`,
2005
2060
  label: t.label,
@@ -2010,19 +2065,19 @@ function Ka(t, e, s) {
2010
2065
  data: e
2011
2066
  };
2012
2067
  }
2013
- function Va(t, e) {
2068
+ function qa(t, e) {
2014
2069
  const s = [];
2015
2070
  let r = [], n = 0, o = 0;
2016
2071
  for (const i of t)
2017
- if (Ea(i))
2072
+ if (Da(i))
2018
2073
  r.length > 0 && (s.push({ id: `section-${n}`, fields: r }), n++, r = []);
2019
- else if (Ba(i)) {
2020
- const l = Ka(i, e, o);
2021
- o++, Wa(l) || r.push(l);
2074
+ else if (Pa(i)) {
2075
+ const l = Ha(i, e, o);
2076
+ o++, Va(l) || r.push(l);
2022
2077
  }
2023
2078
  return r.length > 0 && s.push({ id: `section-${n}`, fields: r }), s;
2024
2079
  }
2025
- function Tt({ label: t, children: e, fullWidth: s }) {
2080
+ function kt({ label: t, children: e, fullWidth: s }) {
2026
2081
  return /* @__PURE__ */ d(
2027
2082
  "div",
2028
2083
  {
@@ -2037,7 +2092,7 @@ function Tt({ label: t, children: e, fullWidth: s }) {
2037
2092
  }
2038
2093
  );
2039
2094
  }
2040
- function gs({
2095
+ function ys({
2041
2096
  data: t,
2042
2097
  title: e,
2043
2098
  fields: s,
@@ -2045,7 +2100,7 @@ function gs({
2045
2100
  className: n,
2046
2101
  headerAction: o
2047
2102
  }) {
2048
- const i = Va(s, t), l = i.some((c) => c.fields.length > 0), u = m(
2103
+ const i = qa(s, t), l = i.some((c) => c.fields.length > 0), u = m(
2049
2104
  "astw:grid astw:gap-x-6 astw:gap-y-4",
2050
2105
  // Default: 1 column
2051
2106
  "astw:grid-cols-1",
@@ -2058,13 +2113,13 @@ function gs({
2058
2113
  "astw:@[400px]:grid-cols-2 astw:@[600px]:grid-cols-3"
2059
2114
  )
2060
2115
  ), w = (c) => {
2061
- const h = c.fields.filter((g) => !0), f = c.fields.filter((g) => ja());
2116
+ const h = c.fields.filter((p) => !0), f = c.fields.filter((p) => Ua());
2062
2117
  return /* @__PURE__ */ d("div", { className: "astw:space-y-4", children: [
2063
- h.length > 0 && /* @__PURE__ */ a("div", { className: u, children: h.map((g) => /* @__PURE__ */ a(Tt, { label: g.label, children: St(g) }, g.id)) }),
2064
- f.length > 0 && /* @__PURE__ */ a("div", { className: u, children: f.map((g) => /* @__PURE__ */ a(Tt, { label: g.label, fullWidth: !0, children: St(g) }, g.id)) })
2118
+ h.length > 0 && /* @__PURE__ */ a("div", { className: u, children: h.map((p) => /* @__PURE__ */ a(kt, { label: p.label, children: Tt(p) }, p.id)) }),
2119
+ f.length > 0 && /* @__PURE__ */ a("div", { className: u, children: f.map((p) => /* @__PURE__ */ a(kt, { label: p.label, fullWidth: !0, children: Tt(p) }, p.id)) })
2065
2120
  ] }, c.id);
2066
2121
  };
2067
- return /* @__PURE__ */ a(st, { delayDuration: 300, children: /* @__PURE__ */ d(
2122
+ return /* @__PURE__ */ a(nt, { delayDuration: 300, children: /* @__PURE__ */ d(
2068
2123
  "div",
2069
2124
  {
2070
2125
  className: m(
@@ -2076,7 +2131,7 @@ function gs({
2076
2131
  /* @__PURE__ */ a("h3", { className: "astw:text-lg astw:font-semibold astw:leading-none", children: e }),
2077
2132
  o && /* @__PURE__ */ a("div", { children: o })
2078
2133
  ] }),
2079
- /* @__PURE__ */ a("div", { className: "astw:px-6 astw:pb-4", children: l ? /* @__PURE__ */ a("div", { className: "astw:space-y-4", children: i.map((c, h) => /* @__PURE__ */ d(p.Fragment, { children: [
2134
+ /* @__PURE__ */ a("div", { className: "astw:px-6 astw:pb-4", children: l ? /* @__PURE__ */ a("div", { className: "astw:space-y-4", children: i.map((c, h) => /* @__PURE__ */ d(g.Fragment, { children: [
2080
2135
  h > 0 && /* @__PURE__ */ a("div", { className: "astw:h-px astw:bg-border", role: "separator" }),
2081
2136
  w(c)
2082
2137
  ] }, c.id)) }) : /* @__PURE__ */ a("p", { className: "astw:text-sm astw:text-muted-foreground", children: "No information available" }) })
@@ -2084,7 +2139,7 @@ function gs({
2084
2139
  }
2085
2140
  ) });
2086
2141
  }
2087
- const it = p.forwardRef(
2142
+ const dt = g.forwardRef(
2088
2143
  ({ className: t, children: e, ...s }, r) => /* @__PURE__ */ a(
2089
2144
  "div",
2090
2145
  {
@@ -2095,8 +2150,8 @@ const it = p.forwardRef(
2095
2150
  }
2096
2151
  )
2097
2152
  );
2098
- it.displayName = "Layout.Column";
2099
- function Ha({
2153
+ dt.displayName = "Layout.Column";
2154
+ function Ga({
2100
2155
  columns: t,
2101
2156
  className: e,
2102
2157
  gap: s = 4,
@@ -2105,7 +2160,7 @@ function Ha({
2105
2160
  children: o
2106
2161
  }) {
2107
2162
  if (process.env.NODE_ENV !== "production") {
2108
- const h = p.Children.toArray(o).reduce((f, g) => p.isValidElement(g) && g.type === it ? f + 1 : f, 0);
2163
+ const h = g.Children.toArray(o).reduce((f, p) => g.isValidElement(p) && p.type === dt ? f + 1 : f, 0);
2109
2164
  if (h !== t)
2110
2165
  throw new Error(
2111
2166
  `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.`
@@ -2129,13 +2184,13 @@ function Ha({
2129
2184
  "astw:xl:flex-row"
2130
2185
  ],
2131
2186
  e
2132
- ), u = p.useMemo(() => t === 1 ? p.Children.map(o, (c) => c) : t === 2 ? p.Children.map(o, (c, h) => p.isValidElement(c) ? p.cloneElement(c, {
2187
+ ), u = g.useMemo(() => t === 1 ? g.Children.map(o, (c) => c) : t === 2 ? g.Children.map(o, (c, h) => g.isValidElement(c) ? g.cloneElement(c, {
2133
2188
  className: m(
2134
2189
  c.props.className,
2135
2190
  h === 0 ? "astw:lg:flex-1" : "astw:lg:min-w-[280px]"
2136
2191
  // Second column: fixed 280px
2137
2192
  )
2138
- }) : c) : t === 3 ? p.Children.map(o, (c, h) => p.isValidElement(c) ? p.cloneElement(c, {
2193
+ }) : c) : t === 3 ? g.Children.map(o, (c, h) => g.isValidElement(c) ? g.cloneElement(c, {
2139
2194
  className: m(
2140
2195
  c.props.className,
2141
2196
  h === 0 ? "astw:xl:min-w-[320px]" : h === 2 ? "astw:xl:min-w-[280px]" : "astw:xl:flex-1"
@@ -2150,39 +2205,42 @@ function Ha({
2150
2205
  style: { padding: "1.5rem", paddingBottom: "1rem" },
2151
2206
  children: [
2152
2207
  r && /* @__PURE__ */ a("h1", { style: { fontSize: "1.5rem", fontWeight: "bold" }, children: r }),
2153
- n && n.length > 0 && /* @__PURE__ */ a("div", { className: "astw:flex astw:gap-2 astw:items-center", children: n.map((c, h) => /* @__PURE__ */ a(p.Fragment, { children: c }, h)) })
2208
+ n && n.length > 0 && /* @__PURE__ */ a("div", { className: "astw:flex astw:gap-2 astw:items-center", children: n.map((c, h) => /* @__PURE__ */ a(g.Fragment, { children: c }, h)) })
2154
2209
  ]
2155
2210
  }
2156
2211
  ),
2157
2212
  /* @__PURE__ */ a("div", { style: { padding: w ? "0 1.5rem 1.5rem 1.5rem" : "1.5rem" }, children: /* @__PURE__ */ a("div", { className: l, children: u }) })
2158
2213
  ] });
2159
2214
  }
2160
- Ha.Column = it;
2215
+ Ga.Column = dt;
2161
2216
  export {
2162
- ws as AppShell,
2163
- hs as AuthProvider,
2164
- Ra as Badge,
2165
- ms as CommandPalette,
2166
- ca as DefaultSidebar,
2167
- gs as DescriptionCard,
2168
- Ha as Layout,
2169
- xs as Link,
2170
- us as SidebarLayout,
2171
- Sa as badgeVariants,
2172
- ke as defineI18nLabels,
2173
- ds as defineModule,
2174
- cs as defineResource,
2175
- is as hidden,
2176
- os as pass,
2177
- ls as redirectTo,
2178
- Se as useAppShell,
2179
- P as useAppShellConfig,
2180
- ns as useAppShellData,
2181
- fs as useAuth,
2182
- vs as useLocation,
2183
- ys as useNavigate,
2184
- Ns as useParams,
2185
- Cs as useRouteError,
2186
- Ss as useSearchParams,
2187
- Oe as useTheme
2217
+ ms as AppShell,
2218
+ gs as AuthProvider,
2219
+ Aa as Badge,
2220
+ fs as CommandPalette,
2221
+ ua as DefaultSidebar,
2222
+ ys as DescriptionCard,
2223
+ Ga as Layout,
2224
+ Cs as Link,
2225
+ hs as SidebarLayout,
2226
+ Ra as badgeVariants,
2227
+ ps as createAuthClient,
2228
+ Ee as defineI18nLabels,
2229
+ ws as defineModule,
2230
+ us as defineResource,
2231
+ ds as hidden,
2232
+ ls as pass,
2233
+ cs as redirectTo,
2234
+ ke as useAppShell,
2235
+ A as useAppShellConfig,
2236
+ is as useAppShellData,
2237
+ bs as useAuth,
2238
+ xs as useAuthSuspense,
2239
+ Ts as useLocation,
2240
+ ks as useNavigate,
2241
+ Rs as useParams,
2242
+ Es as useRouteError,
2243
+ Bs as useSearchParams,
2244
+ We as useTheme,
2245
+ vs as useToast
2188
2246
  };