@chaibuilder/pages 0.4.9-beta.6 → 0.4.9-beta.7

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.
@@ -4,19 +4,19 @@ var ks = (e) => {
4
4
  var Ls = (e, t, n) => t.has(e) || ks("Cannot " + n);
5
5
  var R = (e, t, n) => (Ls(e, t, "read from private field"), n ? n.call(e) : t.get(e)), re = (e, t, n) => t.has(e) ? ks("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), te = (e, t, n, s) => (Ls(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
6
6
  import { jsx as r, jsxs as u, Fragment as we } from "react/jsx-runtime";
7
- import { get as ne, isEmpty as me, reverse as Ra, sortBy as Oa, each as Ba, find as ge, set as Ma, has as nn, startsWith as Rt, isEqual as is, map as Fe, toLower as Dt, trim as Fa, filter as Ce, startCase as It, groupBy as qa, compact as Nn, includes as Mt, concat as Zs, endsWith as Js, orderBy as mn, first as Ha, uniq as Ka, debounce as ja, pick as er, keys as Va, pickBy as $a, isArray as za, cloneDeep as Wa, isString as Ds } from "lodash-es";
7
+ import { get as ne, isEmpty as me, reverse as Ra, sortBy as Oa, each as Ba, find as ge, set as Ma, has as nn, startsWith as Rt, isEqual as is, map as Fe, toLower as Dt, trim as Fa, filter as Ce, startCase as It, groupBy as qa, compact as Nn, includes as Mt, concat as Zs, endsWith as Js, orderBy as mn, first as Ha, uniq as Ka, debounce as ja, pick as er, keys as Va, pickBy as $a, isArray as za, noop as Wa, isFunction as Ya, cloneDeep as Qa, isString as Ds } from "lodash-es";
8
8
  import * as ue from "react";
9
- import tr, { useCallback as Pe, useMemo as z, useState as P, useEffect as Se, useRef as ut, Suspense as Ya, lazy as Qa } from "react";
9
+ import tr, { useCallback as Pe, useMemo as z, useState as P, useEffect as Se, useRef as ut, Suspense as Xa, lazy as Za } from "react";
10
10
  import { useAtom as Dn, atom as ls } from "jotai";
11
- import { useQueryClient as Ne, useQuery as Ae, useMutation as xe, onlineManager as nr, QueryClient as Xa, QueryClientProvider as Za } from "@tanstack/react-query";
11
+ import { useQueryClient as Ne, useQuery as Ae, useMutation as xe, onlineManager as nr, QueryClient as Ja, QueryClientProvider as ei } from "@tanstack/react-query";
12
12
  import { toast as $ } from "sonner";
13
- import { useLanguages as dt, useUpdateBlocksPropsRealtime as sr, PERMISSIONS as Ja, usePartailBlocksStore as ei, usePermissions as sn, useLibraryBlocks as ti, useTheme as ni, mergeClasses as si, useSavePage as rr, useRightPanel as ri, useBlocksStore as ai, getBlocksFromHTML as ii, useTranslation as li, useSidebarActivePanel as oi, registerChaiSidebarPanel as zn, registerChaiTopBar as ci, registerChaiMediaManager as ui, registerChaiSaveToLibrary as di, ChaiBuilderEditor as hi } from "@chaibuilder/sdk";
14
- import { Card as os, CardHeader as cs, CardTitle as us, CardContent as ds, CardFooter as hs, Button as _, AlertDialog as ar, AlertDialogTrigger as ir, AlertDialogContent as lr, AlertDialogHeader as or, AlertDialogTitle as cr, AlertDialogDescription as ur, AlertDialogFooter as dr, AlertDialogCancel as hr, AlertDialogAction as mr, Popover as fr, PopoverTrigger as gr, PopoverContent as pr, Input as ve, Label as Z, Dialog as He, DialogContent as Ke, DialogHeader as je, DialogTitle as Ve, DialogDescription as Ye, Alert as yr, DialogFooter as et, DropdownMenu as rn, DropdownMenuTrigger as an, DropdownMenuContent as ln, DropdownMenuItem as De, Textarea as Gt, Select as mi, SelectTrigger as fi, SelectValue as gi, SelectContent as pi, SelectItem as yi, Badge as qn, Sheet as vr, SheetContent as Er, SheetHeader as br, SheetTitle as wr, Separator as vi, TooltipProvider as Sr, Tooltip as ms, SheetTrigger as Ei, TooltipTrigger as fs, ScrollArea as bi, TooltipContent as gs, Skeleton as fn, DropdownMenuSeparator as wi, CardDescription as Si, Command as Ni, CommandInput as Ai, CommandList as xi, CommandEmpty as Ti, CommandGroup as Ci, CommandItem as Gs, AlertDescription as Pi, Accordion as _i, AccordionItem as gn, AccordionTrigger as pn, AccordionContent as yn, HoverCard as Ii, HoverCardTrigger as ki, HoverCardContent as Li } from "@chaibuilder/sdk/ui";
15
- import { LockIcon as Nr, UserIcon as Di, AlertTriangleIcon as Gi, Trash2 as Ar, Plus as ps, ImageIcon as xr, X as Tr, AlertCircle as Cr, StarIcon as Ui, MoreHorizontal as ys, PencilIcon as Ri, Power as Pr, TrashIcon as Oi, Tag as Bi, File as on, Search as Mi, StarsIcon as Fi, Globe as qi, Pencil as Hi, Trash as vs, SquareLibrary as Us, Logs as Ki, Loader as _r, Languages as ji, ChevronDown as Ir, Star as Vi, History as Rs, ArrowUpRight as $i, Clock as zi, Undo2 as kr, CloudOff as Wi, Edit as Yi, Save as Lr, GlobeIcon as Qi, Eye as Dr, Palette as Xi, CheckCircle as Zi, Send as Os, Rocket as Bs, Settings as Ji, ExternalLink as el, EyeOff as tl, Loader2 as Gr, LanguagesIcon as nl, DatabaseIcon as sl, ChevronLeft as rl, ChevronRight as al, User as il } from "lucide-react";
16
- import { format as Gn, formatDistanceToNow as ll } from "date-fns";
17
- import { useRegisteredChaiBlocks as ol, getDefaultBlockProps as cl } from "@chaibuilder/runtime";
13
+ import { useLanguages as dt, useUpdateBlocksPropsRealtime as sr, PERMISSIONS as ti, usePartailBlocksStore as ni, usePermissions as sn, useLibraryBlocks as si, useTheme as ri, mergeClasses as ai, useSavePage as rr, useRightPanel as ii, useBlocksStore as li, getBlocksFromHTML as oi, useTranslation as ci, useSidebarActivePanel as ui, registerChaiSidebarPanel as zn, registerChaiTopBar as di, registerChaiMediaManager as hi, registerChaiSaveToLibrary as mi, ChaiBuilderEditor as fi } from "@chaibuilder/sdk";
14
+ import { Card as os, CardHeader as cs, CardTitle as us, CardContent as ds, CardFooter as hs, Button as _, AlertDialog as ar, AlertDialogTrigger as ir, AlertDialogContent as lr, AlertDialogHeader as or, AlertDialogTitle as cr, AlertDialogDescription as ur, AlertDialogFooter as dr, AlertDialogCancel as hr, AlertDialogAction as mr, Popover as fr, PopoverTrigger as gr, PopoverContent as pr, Input as ve, Label as Z, Dialog as He, DialogContent as Ke, DialogHeader as je, DialogTitle as Ve, DialogDescription as Ye, Alert as yr, DialogFooter as et, DropdownMenu as rn, DropdownMenuTrigger as an, DropdownMenuContent as ln, DropdownMenuItem as De, Textarea as Gt, Select as gi, SelectTrigger as pi, SelectValue as yi, SelectContent as vi, SelectItem as Ei, Badge as qn, Sheet as vr, SheetContent as Er, SheetHeader as br, SheetTitle as wr, Separator as bi, TooltipProvider as Sr, Tooltip as ms, SheetTrigger as wi, TooltipTrigger as fs, ScrollArea as Si, TooltipContent as gs, Skeleton as fn, DropdownMenuSeparator as Ni, CardDescription as Ai, Command as xi, CommandInput as Ti, CommandList as Ci, CommandEmpty as Pi, CommandGroup as _i, CommandItem as Gs, AlertDescription as Ii, Accordion as ki, AccordionItem as gn, AccordionTrigger as pn, AccordionContent as yn, HoverCard as Li, HoverCardTrigger as Di, HoverCardContent as Gi } from "@chaibuilder/sdk/ui";
15
+ import { LockIcon as Nr, UserIcon as Ui, AlertTriangleIcon as Ri, Trash2 as Ar, Plus as ps, ImageIcon as xr, X as Tr, AlertCircle as Cr, StarIcon as Oi, MoreHorizontal as ys, PencilIcon as Bi, Power as Pr, TrashIcon as Mi, Tag as Fi, File as on, Search as qi, StarsIcon as Hi, Globe as Ki, Pencil as ji, Trash as vs, SquareLibrary as Us, Logs as Vi, Loader as _r, Languages as $i, ChevronDown as Ir, Star as zi, History as Rs, ArrowUpRight as Wi, Clock as Yi, Undo2 as kr, CloudOff as Qi, Edit as Xi, Save as Lr, GlobeIcon as Zi, Eye as Dr, Palette as Ji, CheckCircle as el, Send as Os, Rocket as Bs, Settings as tl, ExternalLink as nl, EyeOff as sl, Loader2 as Gr, LanguagesIcon as rl, DatabaseIcon as al, ChevronLeft as il, ChevronRight as ll, User as ol } from "lucide-react";
16
+ import { format as Gn, formatDistanceToNow as cl } from "date-fns";
17
+ import { useRegisteredChaiBlocks as ul, getDefaultBlockProps as dl } from "@chaibuilder/runtime";
18
18
  import { z as An } from "zod";
19
- import { loadWebBlocks as ul } from "@chaibuilder/sdk/web-blocks";
19
+ import { loadWebBlocks as hl } from "@chaibuilder/sdk/web-blocks";
20
20
  const qe = {
21
21
  ab: "Abkhazian",
22
22
  aa: "Afar",
@@ -253,28 +253,28 @@ const qe = {
253
253
  UPDATE_ASSET: "UPDATE_ASSET",
254
254
  GET_ASSETS: "GET_ASSETS"
255
255
  }, j = "chaibuilder";
256
- let dl = 0;
256
+ let ml = 0;
257
257
  function Ms(e, t) {
258
- const n = `atom${++dl}`, s = {
258
+ const n = `atom${++ml}`, s = {
259
259
  toString() {
260
260
  return n;
261
261
  }
262
262
  };
263
- return typeof e == "function" ? s.read = e : (s.init = e, s.read = hl, s.write = ml), t && (s.write = t), s;
263
+ return typeof e == "function" ? s.read = e : (s.init = e, s.read = fl, s.write = gl), t && (s.write = t), s;
264
264
  }
265
- function hl(e) {
265
+ function fl(e) {
266
266
  return e(this);
267
267
  }
268
- function ml(e, t, n) {
268
+ function gl(e, t, n) {
269
269
  return t(
270
270
  this,
271
271
  typeof n == "function" ? n(e(this)) : n
272
272
  );
273
273
  }
274
- const fl = Symbol(
274
+ const pl = Symbol(
275
275
  ""
276
- ), gl = (e) => typeof (e == null ? void 0 : e.then) == "function";
277
- function pl(e = () => {
276
+ ), yl = (e) => typeof (e == null ? void 0 : e.then) == "function";
277
+ function vl(e = () => {
278
278
  try {
279
279
  return window.localStorage;
280
280
  } catch {
@@ -297,7 +297,7 @@ function pl(e = () => {
297
297
  }
298
298
  return a;
299
299
  }, y = (d = (g = e()) == null ? void 0 : g.getItem(c)) != null ? d : null;
300
- return gl(y) ? y.then(E) : E(y);
300
+ return yl(y) ? y.then(E) : E(y);
301
301
  },
302
302
  setItem: (c, h) => {
303
303
  var g;
@@ -336,8 +336,8 @@ function pl(e = () => {
336
336
  };
337
337
  }), o && (i.subscribe = l(o)), i;
338
338
  }
339
- const yl = pl();
340
- function vl(e, t, n = yl, s) {
339
+ const El = vl();
340
+ function bl(e, t, n = El, s) {
341
341
  const a = Ms(
342
342
  t
343
343
  );
@@ -349,12 +349,12 @@ function vl(e, t, n = yl, s) {
349
349
  (l) => l(a),
350
350
  (l, o, c) => {
351
351
  const h = typeof c == "function" ? c(l(a)) : c;
352
- return h === fl ? (o(a, t), n.removeItem(e)) : h instanceof Promise ? h.then((g) => (o(a, g), n.setItem(e, g))) : (o(a, h), n.setItem(e, h));
352
+ return h === pl ? (o(a, t), n.removeItem(e)) : h instanceof Promise ? h.then((g) => (o(a, g), n.setItem(e, g))) : (o(a, h), n.setItem(e, h));
353
353
  }
354
354
  );
355
355
  }
356
- const El = vl("__chai__user", null), st = () => {
357
- const [e, t] = Dn(El), n = Pe(() => {
356
+ const wl = bl("__chai__user", null), rt = () => {
357
+ const [e, t] = Dn(wl), n = Pe(() => {
358
358
  t(null);
359
359
  }, [t]);
360
360
  return {
@@ -363,8 +363,8 @@ const El = vl("__chai__user", null), st = () => {
363
363
  setUser: t,
364
364
  logout: n
365
365
  };
366
- }, bl = () => {
367
- const { user: e, setUser: t, logout: n } = st(), s = Un(), a = Ne();
366
+ }, Sl = () => {
367
+ const { user: e, setUser: t, logout: n } = rt(), s = Un(), a = Ne();
368
368
  return Ae({
369
369
  queryKey: ["refresh_token"],
370
370
  queryFn: async () => {
@@ -411,8 +411,8 @@ if (import.meta.vitest) {
411
411
  t(n).toBeDefined();
412
412
  });
413
413
  }
414
- const Wu = () => {
415
- const { user: e } = st(), t = rt("onSessionExpired"), n = z(
414
+ const Qu = () => {
415
+ const { user: e } = rt(), t = tt("onSessionExpired"), n = z(
416
416
  () => e == null ? void 0 : e.accessToken,
417
417
  [e == null ? void 0 : e.accessToken]
418
418
  );
@@ -444,10 +444,10 @@ const Wu = () => {
444
444
  [n, t]
445
445
  );
446
446
  }, W = () => {
447
- const { user: e } = st(), t = z(
447
+ const { user: e } = rt(), t = z(
448
448
  () => e == null ? void 0 : e.accessToken,
449
449
  [e == null ? void 0 : e.accessToken]
450
- ), { refetch: n } = bl();
450
+ ), { refetch: n } = Sl();
451
451
  return Pe(
452
452
  async (s, a, i = {}) => {
453
453
  if (t)
@@ -498,7 +498,7 @@ const Wu = () => {
498
498
  });
499
499
  }
500
500
  });
501
- }, wl = () => {
501
+ }, Nl = () => {
502
502
  const e = X(), t = Ne(), n = W();
503
503
  return xe({
504
504
  mutationFn: async (s) => n(e, { action: I.UPDATE_WEBSITE_DATA, data: s }),
@@ -527,18 +527,18 @@ function Ue() {
527
527
  };
528
528
  }, []), [e, t];
529
529
  }
530
- const Sl = ls({}), Or = () => Dn(Sl), Nl = () => {
530
+ const Al = ls({}), Or = () => Dn(Al), xl = () => {
531
531
  const [e] = Ue(), t = e.get("page"), n = ut(""), { mutate: s } = Ur();
532
532
  Se(() => {
533
533
  !me(n.current) && t !== n.current && s({ id: n.current }), n.current = t;
534
534
  }, [t, s, n]);
535
- }, rt = (e, t) => {
535
+ }, tt = (e, t) => {
536
536
  const [n] = Or();
537
537
  return z(
538
538
  () => ne(n, e, t),
539
539
  [n, e, t]
540
540
  );
541
- }, X = () => rt("apiUrl", "/chai/api"), Un = () => rt("usersApiUrl", "/chai/users"), Yu = () => rt("assetsApiUrl", "/chai/assets"), cn = () => {
541
+ }, X = () => tt("apiUrl", "/chai/api"), Un = () => tt("usersApiUrl", "/chai/users"), Xu = () => tt("assetsApiUrl", "/chai/assets"), cn = () => {
542
542
  const e = X(), [t] = Ue(), n = t.get("page"), s = W();
543
543
  return Ae({
544
544
  queryKey: [j, I.GET_LANGUAGE_PAGES, n],
@@ -595,7 +595,7 @@ const Sl = ls({}), Or = () => Dn(Sl), Nl = () => {
595
595
  staleTime: 1e3 * 60 * 5,
596
596
  queryFn: async () => e(t, { action: I.GET_WEBSITE_PAGES }) || []
597
597
  });
598
- }, Al = ls({ lastSaved: void 0 }), ws = () => Dn(Al), Re = () => {
598
+ }, Tl = ls({ lastSaved: void 0 }), ws = () => Dn(Tl), Re = () => {
599
599
  const [e] = Ue(), t = e.get("page"), { data: n, isFetching: s } = Rn();
600
600
  return { data: z(
601
601
  () => ge(n, { id: t }) || {},
@@ -611,8 +611,8 @@ const Sl = ls({}), Or = () => Dn(Sl), Nl = () => {
611
611
  }),
612
612
  enabled: !!e && e !== "EXPIRED"
613
613
  });
614
- }, xl = ls(void 0), hn = () => {
615
- const [e] = Ue(), t = e.get("page"), { user: n } = st(), [s, a] = Dn(xl);
614
+ }, Cl = ls(void 0), hn = () => {
615
+ const [e] = Ue(), t = e.get("page"), { user: n } = rt(), [s, a] = Dn(Cl);
616
616
  return z(() => ({
617
617
  isLocked: t && (n == null ? void 0 : n.id) !== s,
618
618
  currentEditor: s,
@@ -651,7 +651,7 @@ const Sl = ls({}), Or = () => Dn(Sl), Nl = () => {
651
651
  enabled: !!e && !!t
652
652
  });
653
653
  };
654
- function Tl({
654
+ function Pl({
655
655
  avatar: e,
656
656
  name: t,
657
657
  email: n,
@@ -673,7 +673,7 @@ function Tl({
673
673
  alt: t,
674
674
  className: "w-12 h-12 border border-gray-300 rounded-full"
675
675
  }
676
- ) : /* @__PURE__ */ r(Di, { className: "w-12 h-12 p-2 border border-gray-300 rounded-full" }),
676
+ ) : /* @__PURE__ */ r(Ui, { className: "w-12 h-12 p-2 border border-gray-300 rounded-full" }),
677
677
  /* @__PURE__ */ u("div", { className: "space-y-1", children: [
678
678
  /* @__PURE__ */ r("h3", { className: "font-semibold", children: t }),
679
679
  n && /* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground", children: n })
@@ -699,7 +699,7 @@ function Tl({
699
699
  /* @__PURE__ */ r(cr, { children: "Are you sure you want to take over?" }),
700
700
  /* @__PURE__ */ u(ur, { children: [
701
701
  /* @__PURE__ */ u("span", { className: "flex items-center space-x-2 text-yellow-500", children: [
702
- /* @__PURE__ */ r(Gi, { className: "w-5 h-5" }),
702
+ /* @__PURE__ */ r(Ri, { className: "w-5 h-5" }),
703
703
  /* @__PURE__ */ r("span", { children: "This action might cause the other user to lose unsaved changes." })
704
704
  ] }),
705
705
  /* @__PURE__ */ r("br", {}),
@@ -720,12 +720,12 @@ function Tl({
720
720
  ] }) })
721
721
  ] }) });
722
722
  }
723
- const Cl = () => {
723
+ const _l = () => {
724
724
  const { isLocked: e, currentEditor: t } = hn(), { data: n } = dn(t), [s] = Ue(), a = s.get("page"), { mutate: i } = Ur(), { isFetching: l } = Mr(), o = Pe(() => {
725
725
  i({ id: a });
726
726
  }, [a, i]);
727
727
  return !e || l ? /* @__PURE__ */ r("div", { className: "" }) : /* @__PURE__ */ r(
728
- Tl,
728
+ Pl,
729
729
  {
730
730
  ...n,
731
731
  name: (n == null ? void 0 : n.name) || "Unknown User",
@@ -734,7 +734,7 @@ const Cl = () => {
734
734
  onTakeOver: o
735
735
  }
736
736
  );
737
- }, Pl = () => {
737
+ }, Il = () => {
738
738
  const [e, t] = Ue(), n = e.get("lang"), s = Br(n), { setSelectedLang: a } = dt(), i = () => {
739
739
  const o = new URLSearchParams(window.location.search);
740
740
  o.delete("lang");
@@ -767,7 +767,7 @@ const Cl = () => {
767
767
  }
768
768
  ) })
769
769
  ] }) });
770
- }, _l = (e) => {
770
+ }, kl = (e) => {
771
771
  const t = X(), n = W();
772
772
  return xe({
773
773
  mutationFn: async (s) => n(t, {
@@ -783,7 +783,7 @@ const Cl = () => {
783
783
  });
784
784
  }
785
785
  });
786
- }, Il = (e) => {
786
+ }, Ll = (e) => {
787
787
  const t = X(), n = W();
788
788
  return Ae({
789
789
  queryKey: [j, "uiBlockDetails", e],
@@ -804,7 +804,7 @@ const Cl = () => {
804
804
  },
805
805
  retry: !1
806
806
  });
807
- }, kl = (e) => {
807
+ }, Dl = (e) => {
808
808
  const t = X(), n = W();
809
809
  return xe({
810
810
  mutationFn: async (s) => n(t, {
@@ -820,7 +820,7 @@ const Cl = () => {
820
820
  });
821
821
  }
822
822
  });
823
- }, Ll = ({
823
+ }, Gl = ({
824
824
  blockId: e,
825
825
  libBlockId: t,
826
826
  isOpen: n,
@@ -828,7 +828,7 @@ const Cl = () => {
828
828
  blockName: a,
829
829
  trigger: i
830
830
  }) => {
831
- const [l, o] = P(!1), c = sr(), h = kl(() => {
831
+ const [l, o] = P(!1), c = sr(), h = Dl(() => {
832
832
  c([e], { _libBlockId: void 0 }), $.success("Block deleted successfully"), o(!1), s();
833
833
  });
834
834
  return /* @__PURE__ */ u(fr, { open: n, onOpenChange: (E) => !E && s(), children: [
@@ -894,7 +894,7 @@ const Cl = () => {
894
894
  }
895
895
  )
896
896
  ] });
897
- }, Dl = ({
897
+ }, Ul = ({
898
898
  blockId: e,
899
899
  libBlockId: t,
900
900
  blockName: n,
@@ -904,7 +904,7 @@ const Cl = () => {
904
904
  }) => {
905
905
  const [l, o] = P(!1);
906
906
  return /* @__PURE__ */ r(
907
- Ll,
907
+ Gl,
908
908
  {
909
909
  blockId: e,
910
910
  libBlockId: t,
@@ -929,7 +929,7 @@ const Cl = () => {
929
929
  )
930
930
  }
931
931
  );
932
- }, Gl = () => {
932
+ }, Rl = () => {
933
933
  const e = X(), t = W(), n = Ne(), {
934
934
  data: s = [],
935
935
  isLoading: a,
@@ -973,8 +973,8 @@ const Cl = () => {
973
973
  createGroup: l,
974
974
  isCreating: o
975
975
  };
976
- }, Ul = ({ value: e, onChange: t }) => {
977
- const [n, s] = P(!1), [a, i] = P(""), l = ut(null), { groups: o } = Gl(), [c, h] = P([
976
+ }, Ol = ({ value: e, onChange: t }) => {
977
+ const [n, s] = P(!1), [a, i] = P(""), l = ut(null), { groups: o } = Rl(), [c, h] = P([
978
978
  { id: "hero", name: "Hero" },
979
979
  { id: "feature", name: "Feature" },
980
980
  { id: "footer", name: "Footer" },
@@ -1076,13 +1076,13 @@ const Cl = () => {
1076
1076
  }
1077
1077
  )
1078
1078
  ] });
1079
- }, Rl = 1 * 1024 * 1024, Ol = ({ value: e, onChange: t }) => {
1079
+ }, Bl = 1 * 1024 * 1024, Ml = ({ value: e, onChange: t }) => {
1080
1080
  const [n, s] = P(!1), a = ut(null), i = Pe(
1081
1081
  (c) => {
1082
1082
  var g;
1083
1083
  const h = (g = c.target.files) == null ? void 0 : g[0];
1084
1084
  if (h) {
1085
- if (h.size > Rl) {
1085
+ if (h.size > Bl) {
1086
1086
  $.error("File too large", {
1087
1087
  description: `Maximum file size is 1mb. Selected file is ${(h.size / 1024 / 1024).toFixed(2)}MB.`
1088
1088
  }), a.current && (a.current.value = "");
@@ -1158,7 +1158,7 @@ const Cl = () => {
1158
1158
  ) })
1159
1159
  ] });
1160
1160
  }, de = {
1161
- ...Ja,
1161
+ ...ti,
1162
1162
  //pages
1163
1163
  ADD_PAGE: "add_page",
1164
1164
  EDIT_PAGE: "edit_page",
@@ -1193,8 +1193,8 @@ const Cl = () => {
1193
1193
  ADD_MEDIA: "add_media",
1194
1194
  EDIT_MEDIA: "edit_media",
1195
1195
  DELETE_MEDIA: "delete_media"
1196
- }, Bl = (e) => {
1197
- const { blocks: t, close: n, blockId: s } = e, { getPartailBlocks: a } = ei(), i = t.find((N) => N._id === s), l = i == null ? void 0 : i._libBlockId, o = !!l, c = z(() => t.some(
1196
+ }, Fl = (e) => {
1197
+ const { blocks: t, close: n, blockId: s } = e, { getPartailBlocks: a } = ni(), i = t.find((N) => N._id === s), l = i == null ? void 0 : i._libBlockId, o = !!l, c = z(() => t.some(
1198
1198
  (N) => N._type === "PartialBlock" || N._type === "GlobalBlock"
1199
1199
  ), [t]), h = z(() => {
1200
1200
  let N = [];
@@ -1211,7 +1211,7 @@ const Cl = () => {
1211
1211
  data: fe,
1212
1212
  isLoading: Y,
1213
1213
  isError: he
1214
- } = Il(l);
1214
+ } = Ll(l);
1215
1215
  Se(() => {
1216
1216
  he && o && (k(!0), ee(!1));
1217
1217
  }, [he, o]), Se(() => {
@@ -1223,7 +1223,7 @@ const Cl = () => {
1223
1223
  const F = () => {
1224
1224
  const N = {};
1225
1225
  return g.trim() ? g.length < 2 && (N.name = "Name must be at least 2 characters") : N.name = "Name is required", E || (N.group = "Group is required"), b(N), Object.keys(N).length === 0 && !c;
1226
- }, { resetLibrary: be } = ti({ id: "" }), Qe = _l(
1226
+ }, { resetLibrary: be } = si({ id: "" }), Qe = kl(
1227
1227
  (N) => {
1228
1228
  o || M([s], { _libBlockId: N.id }), $.success(`Block ${o ? "updated" : "saved"} successfully`), be(N.library), n();
1229
1229
  }
@@ -1287,7 +1287,7 @@ const Cl = () => {
1287
1287
  children: "Group"
1288
1288
  }
1289
1289
  ),
1290
- /* @__PURE__ */ r(Ul, { value: E, onChange: y }),
1290
+ /* @__PURE__ */ r(Ol, { value: E, onChange: y }),
1291
1291
  U.group && /* @__PURE__ */ r("p", { className: "text-xs text-destructive", children: U.group })
1292
1292
  ] }),
1293
1293
  /* @__PURE__ */ u("div", { className: "space-y-2", children: [
@@ -1305,12 +1305,12 @@ const Cl = () => {
1305
1305
  ] }),
1306
1306
  /* @__PURE__ */ u("div", { className: "space-y-2", children: [
1307
1307
  /* @__PURE__ */ r(Z, { htmlFor: "previewImage", children: "Preview Image (optional)" }),
1308
- /* @__PURE__ */ r(Ol, { value: v, onChange: x }),
1308
+ /* @__PURE__ */ r(Ml, { value: v, onChange: x }),
1309
1309
  /* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground", children: "max 1mb" })
1310
1310
  ] }),
1311
1311
  /* @__PURE__ */ u("div", { className: "flex justify-end gap-2 pt-2", children: [
1312
1312
  o && A && /* @__PURE__ */ r(
1313
- Dl,
1313
+ Ul,
1314
1314
  {
1315
1315
  blockId: s,
1316
1316
  libBlockId: l,
@@ -1382,7 +1382,7 @@ const Cl = () => {
1382
1382
  GLOBAL_BLOCK_PUBLISH_SUCCESS: "Global block published successfully.",
1383
1383
  PAGES_PUBLISH_SUCCESS: "Your changes have been published successfully.",
1384
1384
  SLUG_CHANGE_SUCCESS: "Slug changed successfully."
1385
- }, Ml = {
1385
+ }, ql = {
1386
1386
  SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
1387
1387
  }, ke = () => {
1388
1388
  const e = X(), t = W();
@@ -1391,13 +1391,13 @@ const Cl = () => {
1391
1391
  initialData: [],
1392
1392
  queryFn: async () => t(e, { action: I.GET_PAGE_TYPES })
1393
1393
  });
1394
- }, Fl = (e) => {
1394
+ }, Hl = (e) => {
1395
1395
  const { data: t } = ke();
1396
1396
  return z(
1397
1397
  () => t == null ? void 0 : t.find((n) => n.key === e),
1398
1398
  [t, e]
1399
1399
  );
1400
- }, ql = () => {
1400
+ }, Kl = () => {
1401
1401
  const e = X(), t = W();
1402
1402
  return xe({
1403
1403
  mutationFn: async ({ pageType: n, query: s }) => {
@@ -1437,7 +1437,7 @@ const Cl = () => {
1437
1437
  $.error(
1438
1438
  `Failed to add new ${l != null && l.hasSlug ? "page" : l.name}.`,
1439
1439
  {
1440
- description: ne(Ml, a.message, a.message)
1440
+ description: ne(ql, a.message, a.message)
1441
1441
  }
1442
1442
  );
1443
1443
  }
@@ -1470,7 +1470,7 @@ const Cl = () => {
1470
1470
  );
1471
1471
  }
1472
1472
  });
1473
- }, Hl = () => {
1473
+ }, jl = () => {
1474
1474
  const e = X(), t = Ne(), n = W(), { data: s } = ke();
1475
1475
  return xe({
1476
1476
  mutationFn: async (a) => n(e, {
@@ -1504,7 +1504,7 @@ const Cl = () => {
1504
1504
  );
1505
1505
  }
1506
1506
  });
1507
- }, Kl = () => {
1507
+ }, Vl = () => {
1508
1508
  const e = X(), t = Ne(), n = W(), { data: s } = ke();
1509
1509
  return xe({
1510
1510
  mutationFn: async (a) => n(e, {
@@ -1556,7 +1556,7 @@ const Cl = () => {
1556
1556
  $.error("Failed to publish pages.");
1557
1557
  }
1558
1558
  });
1559
- }, jl = () => {
1559
+ }, $l = () => {
1560
1560
  const e = X(), t = W(), n = Ne();
1561
1561
  return xe({
1562
1562
  mutationFn: async (s) => {
@@ -1581,7 +1581,7 @@ const Cl = () => {
1581
1581
  $.error("Failed to mark page as template.");
1582
1582
  }
1583
1583
  });
1584
- }, Vl = () => {
1584
+ }, zl = () => {
1585
1585
  const e = X(), t = W(), n = Ne();
1586
1586
  return xe({
1587
1587
  mutationFn: async (s) => t(e, {
@@ -1597,7 +1597,7 @@ const Cl = () => {
1597
1597
  $.error("Failed to unmark page as template.");
1598
1598
  }
1599
1599
  });
1600
- }, $l = () => {
1600
+ }, Wl = () => {
1601
1601
  const e = X(), t = W(), n = Ne();
1602
1602
  return xe({
1603
1603
  mutationFn: async ({ id: s, slug: a }) => t(e, {
@@ -2020,14 +2020,14 @@ var As = {};
2020
2020
  })(/* @__PURE__ */ function() {
2021
2021
  return typeof window < "u" ? window : typeof self < "u" ? self : this || {};
2022
2022
  }(), As, !1);
2023
- const zl = As.exports;
2023
+ const Yl = As.exports;
2024
2024
  As.exports.create;
2025
- const Wl = {
2025
+ const Ql = {
2026
2026
  particleCount: 350,
2027
2027
  spread: 120,
2028
2028
  origin: { y: 0.6 },
2029
2029
  angle: 90
2030
- }, Yl = {
2030
+ }, Xl = {
2031
2031
  TOP_RIGHT: {
2032
2032
  angle: 225,
2033
2033
  origin: { x: 0.9, y: 0 }
@@ -2037,12 +2037,12 @@ const Wl = {
2037
2037
  origin: { x: 0.9, y: 0.9 }
2038
2038
  }
2039
2039
  }, Tn = (e) => {
2040
- let t = Yl[e];
2040
+ let t = Xl[e];
2041
2041
  t || (t = {});
2042
- const n = { ...Wl, ...t };
2043
- zl(n);
2044
- }, Ql = () => {
2045
- const [e] = ni(), { mutate: t, isPending: n } = Ns(), { mutateAsync: s, isPending: a } = Rr();
2042
+ const n = { ...Ql, ...t };
2043
+ Yl(n);
2044
+ }, Zl = () => {
2045
+ const [e] = ri(), { mutate: t, isPending: n } = Ns(), { mutateAsync: s, isPending: a } = Rr();
2046
2046
  return /* @__PURE__ */ u("div", { className: "bg-white py-3 flex items-center justify-center gap-x-3 border-t", children: [
2047
2047
  /* @__PURE__ */ r(
2048
2048
  _,
@@ -2075,11 +2075,11 @@ const Wl = {
2075
2075
  }
2076
2076
  )
2077
2077
  ] });
2078
- }, Xl = ({
2078
+ }, Jl = ({
2079
2079
  page: e,
2080
2080
  onClose: t
2081
2081
  }) => {
2082
- const [n, s] = P(e.slug || ""), { mutate: a, isPending: i } = $l(), { data: l } = ke(), o = ge(l, { key: e == null ? void 0 : e.pageType }), c = (g) => {
2082
+ const [n, s] = P(e.slug || ""), { mutate: a, isPending: i } = Wl(), { data: l } = ke(), o = ge(l, { key: e == null ? void 0 : e.pageType }), c = (g) => {
2083
2083
  if (g.preventDefault(), !(e != null && e.primaryPage) && Object.keys(qe).some((y) => n === `/${y}` || Rt(n, `/${y}/`))) {
2084
2084
  $.error("Error", {
2085
2085
  description: "Slugs cannot start with a language code for primary page"
@@ -2156,7 +2156,7 @@ function Hr({
2156
2156
  page: e,
2157
2157
  onClose: t
2158
2158
  }) {
2159
- const [, n] = Ue(), { mutate: s, isPending: a } = Hl(), { data: i } = ke(), l = () => {
2159
+ const [, n] = Ue(), { mutate: s, isPending: a } = jl(), { data: i } = ke(), l = () => {
2160
2160
  s(e, {
2161
2161
  onSuccess: () => {
2162
2162
  e != null && e.primaryPage || (window.history.replaceState(null, "", "/"), n(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate"))), t();
@@ -2208,7 +2208,7 @@ const Oe = ({
2208
2208
  page: e,
2209
2209
  onClose: t
2210
2210
  }) => {
2211
- const { mutate: n, isPending: s } = Kl(), a = async () => {
2211
+ const { mutate: n, isPending: s } = Vl(), a = async () => {
2212
2212
  n(e, { onSuccess: t });
2213
2213
  };
2214
2214
  return /* @__PURE__ */ r(He, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
@@ -2330,7 +2330,7 @@ const Oe = ({
2330
2330
  ) })
2331
2331
  ] })
2332
2332
  ] }) });
2333
- }, Zl = () => {
2333
+ }, eo = () => {
2334
2334
  const [e, t] = P(null), { selectedLang: n, fallbackLang: s, setSelectedLang: a } = dt(), { data: i, isFetching: l } = cn(), { data: o } = Re(), [c, h] = P(null), [g, d] = P(null), [E, y] = P(null), { data: p } = un(), S = Ce(
2335
2335
  ne(p, "languages") || ["en"],
2336
2336
  (v) => !ge(i, { lang: v }) && v !== ne(p, "fallbackLang")
@@ -2381,7 +2381,7 @@ const Oe = ({
2381
2381
  ] })
2382
2382
  ] }),
2383
2383
  b ? /* @__PURE__ */ u("div", { className: "flex items-center text-[11px] text-orange-500 gap-x-1", children: [
2384
- /* @__PURE__ */ r(Ui, { fill: "orange", className: "w-3 h-3" }),
2384
+ /* @__PURE__ */ r(Oi, { fill: "orange", className: "w-3 h-3" }),
2385
2385
  /* @__PURE__ */ r("b", { children: " Primary" })
2386
2386
  ] }) : /* @__PURE__ */ r("div", { className: "flex items-center gap-x-3", children: /* @__PURE__ */ r(
2387
2387
  Oe,
@@ -2426,7 +2426,7 @@ const Oe = ({
2426
2426
  T.stopPropagation(), t({ ...v, edit: !0 });
2427
2427
  },
2428
2428
  children: [
2429
- /* @__PURE__ */ r(Ri, { className: "size-3" }),
2429
+ /* @__PURE__ */ r(Bi, { className: "size-3" }),
2430
2430
  B.EDIT
2431
2431
  ]
2432
2432
  }
@@ -2464,7 +2464,7 @@ const Oe = ({
2464
2464
  T.stopPropagation(), h(v);
2465
2465
  },
2466
2466
  children: [
2467
- /* @__PURE__ */ r(Oi, { className: "size-3" }),
2467
+ /* @__PURE__ */ r(Mi, { className: "size-3" }),
2468
2468
  B.DELETE
2469
2469
  ]
2470
2470
  }
@@ -2519,7 +2519,7 @@ const Oe = ({
2519
2519
  }
2520
2520
  ),
2521
2521
  E && /* @__PURE__ */ r(
2522
- Xl,
2522
+ Jl,
2523
2523
  {
2524
2524
  page: E,
2525
2525
  onClose: () => y(null)
@@ -2527,7 +2527,7 @@ const Oe = ({
2527
2527
  )
2528
2528
  ] });
2529
2529
  };
2530
- function Jl({
2530
+ function to({
2531
2531
  pages: e,
2532
2532
  selectedParentId: t,
2533
2533
  onChange: n,
@@ -2566,7 +2566,7 @@ function Jl({
2566
2566
  )
2567
2567
  ] });
2568
2568
  }
2569
- const eo = ({
2569
+ const no = ({
2570
2570
  templates: e,
2571
2571
  selectedTemplateId: t,
2572
2572
  onSelectTemplate: n,
@@ -2614,13 +2614,13 @@ const eo = ({
2614
2614
  /* @__PURE__ */ r("div", { className: "p-2 text-xs text-gray-500 bg-gray-50 border-t", children: "Template preview" })
2615
2615
  ] })
2616
2616
  ] });
2617
- }, to = () => {
2617
+ }, so = () => {
2618
2618
  const e = X(), t = W();
2619
2619
  return Ae({
2620
2620
  queryKey: [j, I.GET_LIBRARIES],
2621
2621
  queryFn: async () => await t(e, { action: I.GET_LIBRARIES }) || []
2622
2622
  });
2623
- }, no = (e) => {
2623
+ }, ro = (e) => {
2624
2624
  const t = X(), n = W();
2625
2625
  return Ae({
2626
2626
  queryKey: [j, I.GET_TEMPLATES_BY_TYPE, e],
@@ -2633,8 +2633,8 @@ const eo = ({
2633
2633
  return (e ? Ce(s, { pageType: e }) : s) || [];
2634
2634
  }
2635
2635
  });
2636
- }, so = (e) => {
2637
- const { data: t = [], isLoading: n } = no(e), { data: s = [], isLoading: a } = to(), i = z(() => n || a ? [] : t.map((o) => {
2636
+ }, ao = (e) => {
2637
+ const { data: t = [], isLoading: n } = ro(e), { data: s = [], isLoading: a } = so(), i = z(() => n || a ? [] : t.map((o) => {
2638
2638
  const c = ge(s, { id: o.library });
2639
2639
  return {
2640
2640
  ...o,
@@ -2648,7 +2648,7 @@ const eo = ({
2648
2648
  isLoading: n || a
2649
2649
  };
2650
2650
  };
2651
- function ro({
2651
+ function io({
2652
2652
  addEditPage: e,
2653
2653
  additionalPageTypes: t = [],
2654
2654
  close: n
@@ -2666,7 +2666,7 @@ function ro({
2666
2666
  (e == null ? void 0 : e.dynamic) ?? !1
2667
2667
  ), [T, D] = P(
2668
2668
  b ? "" : ((e == null ? void 0 : e.slug) ?? "").split("/").pop() || ""
2669
- ), [ee, le] = P(""), { data: k, isLoading: q } = so(d), A = l || c, M = t.find(
2669
+ ), [ee, le] = P(""), { data: k, isLoading: q } = ao(d), A = l || c, M = t.find(
2670
2670
  (f) => f.key === d
2671
2671
  ), se = (f) => {
2672
2672
  E(f), v(""), D(""), w(!1), le(""), p(
@@ -2812,7 +2812,7 @@ function ro({
2812
2812
  !s && (y == null ? void 0 : y.hasSlug) && k.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-1", children: [
2813
2813
  /* @__PURE__ */ r(Z, { className: "text-sm mb-1 block", children: "Template" }),
2814
2814
  /* @__PURE__ */ r(
2815
- eo,
2815
+ no,
2816
2816
  {
2817
2817
  templates: k,
2818
2818
  selectedTemplateId: ee,
@@ -2822,7 +2822,7 @@ function ro({
2822
2822
  )
2823
2823
  ] }),
2824
2824
  /* @__PURE__ */ r(
2825
- Jl,
2825
+ to,
2826
2826
  {
2827
2827
  pages: a,
2828
2828
  selectedParentId: S,
@@ -2924,7 +2924,7 @@ function ro({
2924
2924
  }
2925
2925
  );
2926
2926
  }
2927
- const ao = ({
2927
+ const lo = ({
2928
2928
  addEditPage: e,
2929
2929
  setAddEditPage: t
2930
2930
  }) => {
@@ -2938,7 +2938,7 @@ const ao = ({
2938
2938
  /* @__PURE__ */ r(Ye, { children: s ? "Update your page name" : "Enter details to create a new page" })
2939
2939
  ] }),
2940
2940
  /* @__PURE__ */ r(
2941
- ro,
2941
+ io,
2942
2942
  {
2943
2943
  addEditPage: e,
2944
2944
  close: () => t(void 0),
@@ -2946,18 +2946,18 @@ const ao = ({
2946
2946
  }
2947
2947
  )
2948
2948
  ] }) });
2949
- }, io = 1 * 1024 * 1024, lo = ({
2949
+ }, oo = 1 * 1024 * 1024, co = ({
2950
2950
  page: e,
2951
2951
  onClose: t
2952
2952
  }) => {
2953
- const [n, s] = P(!1), [a, i] = P(""), [l, o] = P(""), [c, h] = P(!1), g = ut(null), d = jl(), { data: E } = ke(), y = E == null ? void 0 : E.find(
2953
+ const [n, s] = P(!1), [a, i] = P(""), [l, o] = P(""), [c, h] = P(!1), g = ut(null), d = $l(), { data: E } = ke(), y = E == null ? void 0 : E.find(
2954
2954
  (b) => b.key === e.pageType
2955
2955
  ), p = (y == null ? void 0 : y.name) || It(e.pageType), S = Pe(
2956
2956
  (b) => {
2957
2957
  var T;
2958
2958
  const w = (T = b.target.files) == null ? void 0 : T[0];
2959
2959
  if (w) {
2960
- if (w.size > io) {
2960
+ if (w.size > oo) {
2961
2961
  $.error("File too large", {
2962
2962
  description: `Maximum file size is 1MB. Selected file is ${(w.size / 1024).toFixed(2)}KB.`
2963
2963
  }), g.current && (g.current.value = "");
@@ -3013,7 +3013,7 @@ const ao = ({
3013
3013
  /* @__PURE__ */ u("div", { className: "space-y-4 mb-4 text-xs", children: [
3014
3014
  /* @__PURE__ */ u("div", { className: "p-4 border rounded bg-slate-50 space-y-3", children: [
3015
3015
  /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
3016
- /* @__PURE__ */ r(Bi, { className: "w-4 h-4 text-slate-500" }),
3016
+ /* @__PURE__ */ r(Fi, { className: "w-4 h-4 text-slate-500" }),
3017
3017
  /* @__PURE__ */ r("span", { className: "font-medium text-slate-500", children: "Page Name:" }),
3018
3018
  /* @__PURE__ */ r("span", { className: "font-semibold", children: It(e.name) })
3019
3019
  ] }),
@@ -3111,11 +3111,11 @@ const ao = ({
3111
3111
  }
3112
3112
  )
3113
3113
  ] }) });
3114
- }, oo = ({
3114
+ }, uo = ({
3115
3115
  page: e,
3116
3116
  onClose: t
3117
3117
  }) => {
3118
- const [n, s] = P(!1), a = Vl();
3118
+ const [n, s] = P(!1), a = zl();
3119
3119
  return /* @__PURE__ */ r(He, { open: !0, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
3120
3120
  /* @__PURE__ */ u(je, { children: [
3121
3121
  /* @__PURE__ */ r(Ve, { children: "Unmark as template" }),
@@ -3175,13 +3175,13 @@ const ao = ({
3175
3175
  className: `rounded flex p-1.5 items-center justify-between leading-none duration-300 cursor-pointer px-3 py-1.5 ${n ? "bg-gray-200" : "hover:bg-gray-100"}`,
3176
3176
  children: [
3177
3177
  /* @__PURE__ */ u("div", { className: "flex items-center gap-x-2", children: [
3178
- t.dynamic ? /* @__PURE__ */ r("div", { className: "w-4 h-4 text-slate-500 stroke-[1]", children: /* @__PURE__ */ r(Fi, { className: "w-4 h-4 text-yellow-400" }) }) : d != null && d.icon ? /* @__PURE__ */ r(
3178
+ t.dynamic ? /* @__PURE__ */ r("div", { className: "w-4 h-4 text-slate-500 stroke-[1]", children: /* @__PURE__ */ r(Hi, { className: "w-4 h-4 text-yellow-400" }) }) : d != null && d.icon ? /* @__PURE__ */ r(
3179
3179
  "div",
3180
3180
  {
3181
3181
  className: "w-4 h-4 text-slate-500 stroke-[1]",
3182
3182
  dangerouslySetInnerHTML: { __html: d.icon }
3183
3183
  }
3184
- ) : d != null && d.hasSlug ? /* @__PURE__ */ r(on, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ r(qi, { className: "w-4 h-4 text-slate-500 stroke-[1]" }),
3184
+ ) : d != null && d.hasSlug ? /* @__PURE__ */ r(on, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ r(Ki, { className: "w-4 h-4 text-slate-500 stroke-[1]" }),
3185
3185
  /* @__PURE__ */ r(
3186
3186
  "div",
3187
3187
  {
@@ -3230,7 +3230,7 @@ const ao = ({
3230
3230
  });
3231
3231
  },
3232
3232
  children: [
3233
- /* @__PURE__ */ r(Hi, { className: "size-3" }),
3233
+ /* @__PURE__ */ r(ji, { className: "size-3" }),
3234
3234
  "Edit"
3235
3235
  ]
3236
3236
  }
@@ -3291,7 +3291,7 @@ const ao = ({
3291
3291
  ]
3292
3292
  }
3293
3293
  );
3294
- }, co = ({ close: e }) => {
3294
+ }, ho = ({ close: e }) => {
3295
3295
  const [, t] = P([]), [n, s] = P(""), [a, i] = P(null), [l, o] = P(null), [c, h] = P(null), [g, d] = P(null), [E, y] = P(null), { data: p, isFetching: S } = Rn(), [v, x] = P(""), { hasPermission: U } = sn(), [b, w] = Ue(), T = b.get("page"), { data: D } = ke(), ee = Pe(
3296
3296
  (A) => {
3297
3297
  var M;
@@ -3352,7 +3352,7 @@ const ao = ({
3352
3352
  /* @__PURE__ */ u("div", { className: "flex flex-col h-full space-y-6", children: [
3353
3353
  /* @__PURE__ */ u("div", { className: "relative flex item-center gap-x-4", children: [
3354
3354
  /* @__PURE__ */ r(
3355
- Mi,
3355
+ qi,
3356
3356
  {
3357
3357
  strokeWidth: 2.5,
3358
3358
  className: "absolute left-3 top-2.5 h-4 w-4 text-gray-400"
@@ -3367,17 +3367,17 @@ const ao = ({
3367
3367
  onChange: (A) => s(A.target.value)
3368
3368
  }
3369
3369
  ),
3370
- !me(v) && /* @__PURE__ */ u(mi, { value: v, onValueChange: le, children: [
3370
+ !me(v) && /* @__PURE__ */ u(gi, { value: v, onValueChange: le, children: [
3371
3371
  /* @__PURE__ */ r(
3372
- fi,
3372
+ pi,
3373
3373
  {
3374
3374
  className: `${v === "all" ? "bg-gray-50 hover:bg-gray-100" : "bg-gray-100 hover:bg-gray-50"} min-w-[120px] h-max p-0 py-1 pl-2 pr-1 top-1.5 -mt-px absolute text-gray-600 right-1.5 w-max text-xs whitespace-nowrap ring-0 focus:ring-0 shadow-none`,
3375
- children: /* @__PURE__ */ r(gi, { placeholder: "Select page type" })
3375
+ children: /* @__PURE__ */ r(yi, { placeholder: "Select page type" })
3376
3376
  }
3377
3377
  ),
3378
- /* @__PURE__ */ r(pi, { align: "end", children: Fe(
3378
+ /* @__PURE__ */ r(vi, { align: "end", children: Fe(
3379
3379
  Zs([{ key: "all", name: "All" }], D),
3380
- (A) => /* @__PURE__ */ r(yi, { value: ne(A, "key"), children: ne(A, "name") })
3380
+ (A) => /* @__PURE__ */ r(Ei, { value: ne(A, "key"), children: ne(A, "name") })
3381
3381
  ) })
3382
3382
  ] })
3383
3383
  ] }),
@@ -3456,7 +3456,7 @@ const ao = ({
3456
3456
  }
3457
3457
  ),
3458
3458
  c && /* @__PURE__ */ r(
3459
- ao,
3459
+ lo,
3460
3460
  {
3461
3461
  editPage: k,
3462
3462
  addEditPage: c,
@@ -3472,24 +3472,24 @@ const ao = ({
3472
3472
  }
3473
3473
  ),
3474
3474
  g && /* @__PURE__ */ r(
3475
- lo,
3475
+ co,
3476
3476
  {
3477
3477
  page: g,
3478
3478
  onClose: () => d(null)
3479
3479
  }
3480
3480
  ),
3481
3481
  E && /* @__PURE__ */ r(
3482
- oo,
3482
+ uo,
3483
3483
  {
3484
3484
  page: E,
3485
3485
  onClose: () => y(null)
3486
3486
  }
3487
3487
  )
3488
3488
  ] });
3489
- }, uo = () => {
3490
- const e = rt("logo", null);
3489
+ }, mo = () => {
3490
+ const e = tt("logo", null);
3491
3491
  return e ? /* @__PURE__ */ r("div", { className: "w-full max-h-9 overflow-hidden pr-2", children: tr.createElement(e, {}) }) : null;
3492
- }, ho = () => {
3492
+ }, fo = () => {
3493
3493
  const [e] = Ue(), t = e.get("page"), { data: n, isFetching: s } = Re(), [a, i] = P(!1), l = !!t && !me(n), o = !t || !s && me(n) || a;
3494
3494
  return /* @__PURE__ */ u(we, { children: [
3495
3495
  /* @__PURE__ */ u(
@@ -3499,7 +3499,7 @@ const ao = ({
3499
3499
  className: "flex items-center w-full space-x-2 py-1",
3500
3500
  onClick: () => i(!0),
3501
3501
  children: [
3502
- /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(Ki, { className: "h-4 w-4" }) }),
3502
+ /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(Vi, { className: "h-4 w-4" }) }),
3503
3503
  /* @__PURE__ */ u("span", { className: "truncate leading-tight flex items-center max-w-[200px]", children: [
3504
3504
  /* @__PURE__ */ r("span", { className: "text-slate-600 pr-1 font-light", children: "Editing:" }),
3505
3505
  s ? /* @__PURE__ */ r(_r, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : It(ne(n, "name")) ?? ""
@@ -3526,14 +3526,14 @@ const ao = ({
3526
3526
  /* @__PURE__ */ r("span", { className: "text-xs text-muted-foreground", children: "Manage your site structure" })
3527
3527
  ] })
3528
3528
  ] }) }),
3529
- /* @__PURE__ */ r("div", { className: "h-[calc(100vh-100px)] overflow-y-auto", children: /* @__PURE__ */ r(co, { close: () => i(!1) }) })
3529
+ /* @__PURE__ */ r("div", { className: "h-[calc(100vh-100px)] overflow-y-auto", children: /* @__PURE__ */ r(ho, { close: () => i(!1) }) })
3530
3530
  ]
3531
3531
  }
3532
3532
  )
3533
3533
  }
3534
3534
  )
3535
3535
  ] });
3536
- }, mo = () => {
3536
+ }, go = () => {
3537
3537
  const { fallbackLang: e, languages: t, selectedLang: n, setSelectedLang: s } = dt(), a = me(n) ? e : n, [, i] = Ue();
3538
3538
  Se(() => {
3539
3539
  const p = new URLSearchParams(window.location.search), S = p.get("lang");
@@ -3568,7 +3568,7 @@ const ao = ({
3568
3568
  return me(t) || d ? null : /* @__PURE__ */ u(we, { children: [
3569
3569
  /* @__PURE__ */ u(rn, { children: [
3570
3570
  /* @__PURE__ */ r(an, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ u(_, { variant: "ghost", size: "sm", className: "gap-2", children: [
3571
- /* @__PURE__ */ r(ji, { className: "w-4 h-4" }),
3571
+ /* @__PURE__ */ r($i, { className: "w-4 h-4" }),
3572
3572
  ne(qe, a, a),
3573
3573
  /* @__PURE__ */ r(Ir, { className: "w-4 h-4" })
3574
3574
  ] }) }),
@@ -3578,7 +3578,7 @@ const ao = ({
3578
3578
  (p) => /* @__PURE__ */ u(
3579
3579
  De,
3580
3580
  {
3581
- className: si(
3581
+ className: ai(
3582
3582
  "flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
3583
3583
  p.key === a && "!bg-gray-200 text-gray-700"
3584
3584
  ),
@@ -3590,7 +3590,7 @@ const ao = ({
3590
3590
  {
3591
3591
  className: "text-[9px] flex items-center gap-x-1 text-orange-500 leading-none",
3592
3592
  children: [
3593
- /* @__PURE__ */ r(Vi, { fill: "orange", className: "w-2 h-2" }),
3593
+ /* @__PURE__ */ r(zi, { fill: "orange", className: "w-2 h-2" }),
3594
3594
  "Primary"
3595
3595
  ]
3596
3596
  }
@@ -3601,7 +3601,7 @@ const ao = ({
3601
3601
  )
3602
3602
  ),
3603
3603
  !me(E.filter((p) => !p.isLangPageAdded)) && /* @__PURE__ */ u(we, { children: [
3604
- /* @__PURE__ */ r(vi, {}),
3604
+ /* @__PURE__ */ r(bi, {}),
3605
3605
  /* @__PURE__ */ u(
3606
3606
  _,
3607
3607
  {
@@ -3636,14 +3636,14 @@ const ao = ({
3636
3636
  )
3637
3637
  ] });
3638
3638
  };
3639
- function fo() {
3639
+ function po() {
3640
3640
  return /* @__PURE__ */ u("div", { className: "flex relative z-10 items-center justify-end gap-1", children: [
3641
- /* @__PURE__ */ r(uo, {}),
3642
- /* @__PURE__ */ r(ho, {}),
3643
- /* @__PURE__ */ r(mo, {})
3641
+ /* @__PURE__ */ r(mo, {}),
3642
+ /* @__PURE__ */ r(fo, {}),
3643
+ /* @__PURE__ */ r(go, {})
3644
3644
  ] });
3645
3645
  }
3646
- function go(e) {
3646
+ function yo(e) {
3647
3647
  const t = X(), n = W();
3648
3648
  return Ae({
3649
3649
  queryKey: [j, "revisions", e],
@@ -3656,7 +3656,7 @@ function go(e) {
3656
3656
  staleTime: 0
3657
3657
  });
3658
3658
  }
3659
- const po = () => {
3659
+ const vo = () => {
3660
3660
  const e = X(), t = W(), n = Ne();
3661
3661
  return xe({
3662
3662
  mutationFn: async (s) => await t(e, {
@@ -3669,7 +3669,7 @@ const po = () => {
3669
3669
  });
3670
3670
  }
3671
3671
  });
3672
- }, yo = () => {
3672
+ }, Eo = () => {
3673
3673
  const e = X(), t = W(), n = Ne();
3674
3674
  return xe({
3675
3675
  mutationFn: async ({
@@ -3686,20 +3686,20 @@ const po = () => {
3686
3686
  }
3687
3687
  });
3688
3688
  };
3689
- function vo() {
3689
+ function bo() {
3690
3690
  const { data: e } = Re(), { saveState: t } = rr(), [n] = ws();
3691
3691
  return e ? /* @__PURE__ */ r("div", { className: "flex items-start gap-3 rounded-md border p-2 hover:bg-accent/50 bg-primary/5 mb-4", children: /* @__PURE__ */ u("div", { className: "flex-1 space-y-1", children: [
3692
3692
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ r("p", { className: "text-sm flex items-center gap-1 font-medium leading-none", children: /* @__PURE__ */ r("span", { className: "font-bold", children: "Currently editing" }) }) }),
3693
3693
  /* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: !me(n.lastSaved) && /* @__PURE__ */ u("span", { children: [
3694
3694
  "Last updated",
3695
3695
  " ",
3696
- ll(new Date(n.lastSaved), {
3696
+ cl(new Date(n.lastSaved), {
3697
3697
  addSuffix: !0
3698
3698
  })
3699
3699
  ] }) }),
3700
3700
  /* @__PURE__ */ u("div", { className: "flex items-center gap-2 pt-0.5", children: [
3701
3701
  /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-amber-500/10 px-1.5 py-0.5 text-xs text-amber-600", children: [
3702
- /* @__PURE__ */ r(Yi, { className: "h-3 w-3" }),
3702
+ /* @__PURE__ */ r(Xi, { className: "h-3 w-3" }),
3703
3703
  /* @__PURE__ */ r("span", { children: "Draft" })
3704
3704
  ] }),
3705
3705
  t === "UNSAVED" ? /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-red-500/10 px-1.5 py-0.5 text-xs text-red-600", children: [
@@ -3709,13 +3709,13 @@ function vo() {
3709
3709
  ] })
3710
3710
  ] }) }) : null;
3711
3711
  }
3712
- function Eo() {
3712
+ function wo() {
3713
3713
  const [e, t] = ue.useState(!1), [n, s] = ue.useState(null), [a, i] = ue.useState(!1), [l, o] = ue.useState(!1), { data: c } = Re(), {
3714
3714
  data: h,
3715
3715
  isFetching: g,
3716
3716
  error: d,
3717
3717
  refetch: E
3718
- } = go(c == null ? void 0 : c.id), { mutate: y, isPending: p } = po(), { mutate: S, isPending: v } = yo(), x = Ne(), U = (D) => {
3718
+ } = yo(c == null ? void 0 : c.id), { mutate: y, isPending: p } = vo(), { mutate: S, isPending: v } = Eo(), x = Ne(), U = (D) => {
3719
3719
  n && S(
3720
3720
  { revisionId: n.uid, discardCurrent: D },
3721
3721
  {
@@ -3742,7 +3742,7 @@ function Eo() {
3742
3742
  }, [e, E]), /* @__PURE__ */ u(we, { children: [
3743
3743
  /* @__PURE__ */ r(Sr, { children: /* @__PURE__ */ u(ms, { children: [
3744
3744
  /* @__PURE__ */ u(vr, { open: e, onOpenChange: t, children: [
3745
- /* @__PURE__ */ r(Ei, { asChild: !0, children: /* @__PURE__ */ r(fs, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
3745
+ /* @__PURE__ */ r(wi, { asChild: !0, children: /* @__PURE__ */ r(fs, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
3746
3746
  /* @__PURE__ */ u(_, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
3747
3747
  /* @__PURE__ */ r(Rs, { className: "h-4 w-4" }),
3748
3748
  /* @__PURE__ */ r("span", { className: "sr-only", children: "View revision history" })
@@ -3764,10 +3764,10 @@ function Eo() {
3764
3764
  )
3765
3765
  ] })
3766
3766
  ] }),
3767
- /* @__PURE__ */ r(bi, { className: "h-[calc(100vh-6rem)] pr-2", children: g ? /* @__PURE__ */ r(bo, {}) : d ? /* @__PURE__ */ r("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "Failed to load revisions. Please try again." }) : /* @__PURE__ */ u("div", { className: "mt-2 space-y-2", children: [
3768
- /* @__PURE__ */ r(vo, {}),
3767
+ /* @__PURE__ */ r(Si, { className: "h-[calc(100vh-6rem)] pr-2", children: g ? /* @__PURE__ */ r(So, {}) : d ? /* @__PURE__ */ r("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "Failed to load revisions. Please try again." }) : /* @__PURE__ */ u("div", { className: "mt-2 space-y-2", children: [
3768
+ /* @__PURE__ */ r(bo, {}),
3769
3769
  h == null ? void 0 : h.map((D) => /* @__PURE__ */ r(
3770
- wo,
3770
+ No,
3771
3771
  {
3772
3772
  revision: D,
3773
3773
  isLatest: D.uid === "current",
@@ -3782,7 +3782,7 @@ function Eo() {
3782
3782
  /* @__PURE__ */ r(gs, { side: "bottom", children: /* @__PURE__ */ r("p", { children: "Revision history" }) })
3783
3783
  ] }) }),
3784
3784
  /* @__PURE__ */ r(
3785
- No,
3785
+ xo,
3786
3786
  {
3787
3787
  open: a,
3788
3788
  onOpenChange: i,
@@ -3792,7 +3792,7 @@ function Eo() {
3792
3792
  }
3793
3793
  ),
3794
3794
  /* @__PURE__ */ r(
3795
- Ao,
3795
+ To,
3796
3796
  {
3797
3797
  open: l,
3798
3798
  onOpenChange: o,
@@ -3803,7 +3803,7 @@ function Eo() {
3803
3803
  )
3804
3804
  ] });
3805
3805
  }
3806
- function bo() {
3806
+ function So() {
3807
3807
  return /* @__PURE__ */ r("div", { className: "space-y-2 mt-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ u("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
3808
3808
  /* @__PURE__ */ u("div", { className: "flex-1 space-y-1", children: [
3809
3809
  /* @__PURE__ */ r(fn, { className: "h-4 w-3/4" }),
@@ -3813,7 +3813,7 @@ function bo() {
3813
3813
  /* @__PURE__ */ r(fn, { className: "h-8 w-8 rounded-full" })
3814
3814
  ] }, t)) });
3815
3815
  }
3816
- function wo({
3816
+ function No({
3817
3817
  revision: e,
3818
3818
  isLatest: t,
3819
3819
  onRestore: n,
@@ -3836,10 +3836,10 @@ function wo({
3836
3836
  ] }) }),
3837
3837
  /* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: /* @__PURE__ */ r("span", { children: Gn(e.createdAt, "MMM d, h:mm a") }) }),
3838
3838
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2 pt-0.5", children: e.type === "published" ? /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-green-500/10 px-1.5 py-0.5 text-xs text-green-600", children: [
3839
- /* @__PURE__ */ r($i, { className: "h-3 w-3" }),
3839
+ /* @__PURE__ */ r(Wi, { className: "h-3 w-3" }),
3840
3840
  /* @__PURE__ */ r("span", { children: "Published" })
3841
3841
  ] }) : /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-amber-500/10 px-1.5 py-0.5 text-xs text-amber-600", children: [
3842
- /* @__PURE__ */ r(zi, { className: "h-3 w-3" }),
3842
+ /* @__PURE__ */ r(Yi, { className: "h-3 w-3" }),
3843
3843
  /* @__PURE__ */ r("span", { children: "Draft" })
3844
3844
  ] }) })
3845
3845
  ] }),
@@ -3851,7 +3851,7 @@ function wo({
3851
3851
  de.DELETE_REVISION
3852
3852
  ],
3853
3853
  children: /* @__PURE__ */ r(
3854
- So,
3854
+ Ao,
3855
3855
  {
3856
3856
  revision: e,
3857
3857
  onRestore: n,
@@ -3862,7 +3862,7 @@ function wo({
3862
3862
  )
3863
3863
  ] });
3864
3864
  }
3865
- function So({
3865
+ function Ao({
3866
3866
  revision: e,
3867
3867
  onRestore: t,
3868
3868
  onDelete: n
@@ -3878,7 +3878,7 @@ function So({
3878
3878
  /* @__PURE__ */ r("span", { children: "Restore this version" })
3879
3879
  ] }) }),
3880
3880
  /* @__PURE__ */ r(Oe, { permission: de.DELETE_REVISION, children: e.uid !== "current" && /* @__PURE__ */ u(we, { children: [
3881
- /* @__PURE__ */ r(wi, {}),
3881
+ /* @__PURE__ */ r(Ni, {}),
3882
3882
  /* @__PURE__ */ u(
3883
3883
  De,
3884
3884
  {
@@ -3894,7 +3894,7 @@ function So({
3894
3894
  ] })
3895
3895
  ] });
3896
3896
  }
3897
- function No({
3897
+ function xo({
3898
3898
  open: e,
3899
3899
  onOpenChange: t,
3900
3900
  revision: n,
@@ -3936,7 +3936,7 @@ function No({
3936
3936
  /* @__PURE__ */ r("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
3937
3937
  "Saving as draft..."
3938
3938
  ] }) : /* @__PURE__ */ u(we, { children: [
3939
- /* @__PURE__ */ r(Wi, { className: "mr-2 h-4 w-4" }),
3939
+ /* @__PURE__ */ r(Qi, { className: "mr-2 h-4 w-4" }),
3940
3940
  "Save as draft"
3941
3941
  ] })
3942
3942
  }
@@ -3962,7 +3962,7 @@ function No({
3962
3962
  }
3963
3963
  ) : null;
3964
3964
  }
3965
- function Ao({
3965
+ function To({
3966
3966
  open: e,
3967
3967
  onOpenChange: t,
3968
3968
  revision: n,
@@ -4024,21 +4024,21 @@ function Ao({
4024
4024
  }
4025
4025
  ) : null;
4026
4026
  }
4027
- const xo = () => {
4027
+ const Co = () => {
4028
4028
  const e = X(), t = W();
4029
4029
  return Ae({
4030
4030
  queryKey: [j, I.GET_CHANGES],
4031
4031
  queryFn: async () => t(e, { action: I.GET_CHANGES })
4032
4032
  });
4033
- }, To = ({ currentEditor: e }) => {
4033
+ }, Po = ({ currentEditor: e }) => {
4034
4034
  const { data: t } = dn(e);
4035
4035
  return t == null ? void 0 : t.name;
4036
4036
  };
4037
- function Co({
4037
+ function _o({
4038
4038
  showModal: e = !1,
4039
4039
  onClose: t = () => console.log("Cancelled")
4040
4040
  }) {
4041
- const [n, s] = P([]), { data: a, isFetching: i } = xo(), { data: l } = ke(), o = Pe(
4041
+ const [n, s] = P([]), { data: a, isFetching: i } = Co(), { data: l } = ke(), o = Pe(
4042
4042
  (w) => {
4043
4043
  var T;
4044
4044
  return (T = ge(l, { key: w })) == null ? void 0 : T.hasSlug;
@@ -4167,7 +4167,7 @@ function Co({
4167
4167
  }
4168
4168
  ),
4169
4169
  " ",
4170
- o(w.pageType) ? /* @__PURE__ */ r(on, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Qi, { className: "w-4 h-4" }),
4170
+ o(w.pageType) ? /* @__PURE__ */ r(on, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Zi, { className: "w-4 h-4" }),
4171
4171
  w.name,
4172
4172
  w.slug && /* @__PURE__ */ u("span", { className: "text-xs text-gray-500", children: [
4173
4173
  "(",
@@ -4179,7 +4179,7 @@ function Co({
4179
4179
  "-",
4180
4180
  " ",
4181
4181
  /* @__PURE__ */ r(
4182
- To,
4182
+ Po,
4183
4183
  {
4184
4184
  currentEditor: w.currentEditor
4185
4185
  }
@@ -4212,7 +4212,7 @@ function Co({
4212
4212
  ] })
4213
4213
  ] }) });
4214
4214
  }
4215
- const Po = () => {
4215
+ const Io = () => {
4216
4216
  const e = W(), t = X();
4217
4217
  return Ae({
4218
4218
  queryKey: [I.GET_WEBSITE_DATA],
@@ -4223,8 +4223,8 @@ const Po = () => {
4223
4223
  })
4224
4224
  });
4225
4225
  };
4226
- function _o({ onClose: e }) {
4227
- const { data: t, isFetching: n } = Po(), { mutateAsync: s, isPending: a } = wl(), i = rt("settingComponent", null), l = ja(async (o) => (await s({ data: o }), !0), 300);
4226
+ function ko({ onClose: e }) {
4227
+ const { data: t, isFetching: n } = Io(), { mutateAsync: s, isPending: a } = Nl(), i = tt("settingComponent", null), l = ja(async (o) => (await s({ data: o }), !0), 300);
4228
4228
  return i ? /* @__PURE__ */ r(He, { open: !0, onOpenChange: e, children: /* @__PURE__ */ u(Ke, { className: "w-full", children: [
4229
4229
  /* @__PURE__ */ r(je, { children: /* @__PURE__ */ r(Ve, { children: "Website Settings" }) }),
4230
4230
  n ? /* @__PURE__ */ u("div", { className: "w-full space-y-3 py-4", children: [
@@ -4252,8 +4252,8 @@ function jr({
4252
4252
  /* @__PURE__ */ r(gs, { side: "bottom", sideOffset: 10, children: /* @__PURE__ */ r("p", { children: t }) })
4253
4253
  ] }) });
4254
4254
  }
4255
- const Io = () => {
4256
- const { selectedLang: e } = dt(), t = rt("getPreviewUrl", async (g) => g), [n, s] = P(""), { data: a, isFetching: i } = Re(), { data: l } = cn(), { data: o } = ke(), c = z(
4255
+ const Lo = () => {
4256
+ const { selectedLang: e } = dt(), t = tt("getPreviewUrl", async (g) => g), [n, s] = P(""), { data: a, isFetching: i } = Re(), { data: l } = cn(), { data: o } = ke(), c = z(
4257
4257
  () => {
4258
4258
  var g;
4259
4259
  return (g = l == null ? void 0 : l.find((d) => (d == null ? void 0 : d.lang) === e)) == null ? void 0 : g.slug;
@@ -4279,8 +4279,8 @@ const Io = () => {
4279
4279
  " ",
4280
4280
  B.PREVIEW
4281
4281
  ] }) }) });
4282
- }, ko = () => {
4283
- const [e, t] = ri();
4282
+ }, Do = () => {
4283
+ const [e, t] = ii();
4284
4284
  return /* @__PURE__ */ u(we, { children: [
4285
4285
  /* @__PURE__ */ r(jr, { content: B.THEME, children: /* @__PURE__ */ r(
4286
4286
  _,
@@ -4289,12 +4289,12 @@ const Io = () => {
4289
4289
  size: "icon",
4290
4290
  className: "gap-2",
4291
4291
  onClick: () => t(e === "theme" ? "block" : "theme"),
4292
- children: /* @__PURE__ */ r(Xi, { className: "w-4 h-4" })
4292
+ children: /* @__PURE__ */ r(Ji, { className: "w-4 h-4" })
4293
4293
  }
4294
4294
  ) }),
4295
4295
  /* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
4296
4296
  ] });
4297
- }, Lo = () => {
4297
+ }, Go = () => {
4298
4298
  const [e, t] = P(!1), { isLocked: n } = hn(), { savePage: s, saveState: a } = rr();
4299
4299
  Se(() => {
4300
4300
  const g = (d) => {
@@ -4330,7 +4330,7 @@ const Io = () => {
4330
4330
  case "SAVED":
4331
4331
  return {
4332
4332
  tooltipContent: B.SAVED,
4333
- buttonIcon: /* @__PURE__ */ r(Zi, { className: "w-4 h-4" }),
4333
+ buttonIcon: /* @__PURE__ */ r(el, { className: "w-4 h-4" }),
4334
4334
  buttonClass: "text-green-500 flex items-center gap-x-1 leading-tight"
4335
4335
  };
4336
4336
  }
@@ -4349,8 +4349,8 @@ const Io = () => {
4349
4349
  ]
4350
4350
  }
4351
4351
  );
4352
- }, Do = () => {
4353
- const [e, t] = P(!1), [n, s] = P(!1), [a, i] = P(null), { data: l } = Re(), { mutate: o, isPending: c } = Ns(), [h] = ai(), { buttonText: g, buttonClassName: d, isPublished: E } = z(() => {
4352
+ }, Uo = () => {
4353
+ const [e, t] = P(!1), [n, s] = P(!1), [a, i] = P(null), { data: l } = Re(), { mutate: o, isPending: c } = Ns(), [h] = li(), { buttonText: g, buttonClassName: d, isPublished: E } = z(() => {
4354
4354
  const p = l && (l == null ? void 0 : l.online);
4355
4355
  return {
4356
4356
  buttonClassName: p ? "hover:bg-green-600 bg-green-500" : "",
@@ -4446,7 +4446,7 @@ const Io = () => {
4446
4446
  ] })
4447
4447
  ] })
4448
4448
  ] }),
4449
- /* @__PURE__ */ r(Co, { showModal: e, onClose: () => t(!1) }),
4449
+ /* @__PURE__ */ r(_o, { showModal: e, onClose: () => t(!1) }),
4450
4450
  a && /* @__PURE__ */ r(
4451
4451
  xs,
4452
4452
  {
@@ -4455,8 +4455,8 @@ const Io = () => {
4455
4455
  }
4456
4456
  )
4457
4457
  ] });
4458
- }, Go = () => {
4459
- const e = rt("settingComponent", null), [t, n] = P(!1);
4458
+ }, Ro = () => {
4459
+ const e = tt("settingComponent", null), [t, n] = P(!1);
4460
4460
  return e ? /* @__PURE__ */ u(we, { children: [
4461
4461
  /* @__PURE__ */ r(jr, { content: B.WEBSITEDATA, children: /* @__PURE__ */ r(
4462
4462
  _,
@@ -4465,13 +4465,13 @@ const Io = () => {
4465
4465
  size: "icon",
4466
4466
  className: "gap-2",
4467
4467
  onClick: () => n(!0),
4468
- children: /* @__PURE__ */ r(Ji, { className: "w-4 h-4" })
4468
+ children: /* @__PURE__ */ r(tl, { className: "w-4 h-4" })
4469
4469
  }
4470
4470
  ) }),
4471
- t && /* @__PURE__ */ r(_o, { onClose: () => n(!1) }),
4471
+ t && /* @__PURE__ */ r(ko, { onClose: () => n(!1) }),
4472
4472
  /* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
4473
4473
  ] }) : null;
4474
- }, Uo = () => {
4474
+ }, Oo = () => {
4475
4475
  const { data: e } = Re(), t = e && (e == null ? void 0 : e.online), { data: n } = ke();
4476
4476
  return Pe(
4477
4477
  (a) => {
@@ -4488,28 +4488,28 @@ const Io = () => {
4488
4488
  size: "sm",
4489
4489
  className: "flex items-center gap-1",
4490
4490
  children: [
4491
- /* @__PURE__ */ r(el, { className: "w-4 h-4" }),
4491
+ /* @__PURE__ */ r(nl, { className: "w-4 h-4" }),
4492
4492
  /* @__PURE__ */ r("span", { className: "hidden sm:inline", children: B.OPEN })
4493
4493
  ]
4494
4494
  }
4495
4495
  ) : null;
4496
4496
  };
4497
- function Ro() {
4497
+ function Bo() {
4498
4498
  const { isLocked: e } = hn(), [t] = Ue(), n = t.get("lang"), s = Br(n);
4499
4499
  return e || !s ? null : /* @__PURE__ */ u("div", { className: "flex items-center justify-end gap-1", children: [
4500
- /* @__PURE__ */ r(Eo, {}),
4501
- /* @__PURE__ */ r(Oe, { permission: de.EDIT_THEME, children: /* @__PURE__ */ r(ko, {}) }),
4502
- /* @__PURE__ */ r(Oe, { permission: de.EDIT_SETTINGS, children: /* @__PURE__ */ r(Go, {}) }),
4503
- /* @__PURE__ */ r(Io, {}),
4504
- /* @__PURE__ */ r(Oe, { permission: de.SAVE_PAGE, children: /* @__PURE__ */ r(Lo, {}) }),
4505
- /* @__PURE__ */ r(Oe, { permission: de.PUBLISH_PAGE, children: /* @__PURE__ */ r(Do, {}) }),
4506
- /* @__PURE__ */ r(Uo, {})
4500
+ /* @__PURE__ */ r(wo, {}),
4501
+ /* @__PURE__ */ r(Oe, { permission: de.EDIT_THEME, children: /* @__PURE__ */ r(Do, {}) }),
4502
+ /* @__PURE__ */ r(Oe, { permission: de.EDIT_SETTINGS, children: /* @__PURE__ */ r(Ro, {}) }),
4503
+ /* @__PURE__ */ r(Lo, {}),
4504
+ /* @__PURE__ */ r(Oe, { permission: de.SAVE_PAGE, children: /* @__PURE__ */ r(Go, {}) }),
4505
+ /* @__PURE__ */ r(Oe, { permission: de.PUBLISH_PAGE, children: /* @__PURE__ */ r(Uo, {}) }),
4506
+ /* @__PURE__ */ r(Oo, {})
4507
4507
  ] });
4508
4508
  }
4509
- const Oo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-center justify-between w-full", children: [
4510
- /* @__PURE__ */ r(fo, {}),
4511
- /* @__PURE__ */ r(Ro, {})
4512
- ] }), Bo = () => {
4509
+ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-center justify-between w-full", children: [
4510
+ /* @__PURE__ */ r(po, {}),
4511
+ /* @__PURE__ */ r(Bo, {})
4512
+ ] }), Fo = () => {
4513
4513
  const e = X(), { aiContext: t } = bs(), n = W();
4514
4514
  return Pe(
4515
4515
  async (s, a, i, l) => n(e, {
@@ -4518,9 +4518,9 @@ const Oo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4518
4518
  }),
4519
4519
  [e, t, n]
4520
4520
  );
4521
- }, Mo = (e, t) => t.map((n) => {
4521
+ }, qo = (e, t) => t.map((n) => {
4522
4522
  if (nn(e, n._type)) {
4523
- const s = cl(n._type);
4523
+ const s = dl(n._type);
4524
4524
  return {
4525
4525
  ...s,
4526
4526
  ...er(n, [
@@ -4536,17 +4536,17 @@ const Oo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4536
4536
  };
4537
4537
  }
4538
4538
  return n;
4539
- }), Fo = (e) => {
4540
- const t = ol();
4539
+ }), Ho = (e) => {
4540
+ const t = ul();
4541
4541
  return z(() => {
4542
4542
  if (!e || me(e)) return { blocks: [] };
4543
4543
  const n = Ce(
4544
4544
  e,
4545
4545
  (s) => !Mt(s == null ? void 0 : s._type, "@chai/")
4546
4546
  );
4547
- return { blocks: Mo(t, n) };
4547
+ return { blocks: qo(t, n) };
4548
4548
  }, [e, t]);
4549
- }, qo = () => {
4549
+ }, Ko = () => {
4550
4550
  const e = X(), t = W();
4551
4551
  return Ae({
4552
4552
  queryKey: [j, "uiLibraries"],
@@ -4555,8 +4555,8 @@ const Oo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4555
4555
  ...s
4556
4556
  }))
4557
4557
  });
4558
- }, Ho = () => {
4559
- const e = Un(), t = W(), { user: n } = st(), s = n == null ? void 0 : n.id;
4558
+ }, jo = () => {
4559
+ const e = Un(), t = W(), { user: n } = rt(), s = n == null ? void 0 : n.id;
4560
4560
  return Ae({
4561
4561
  queryKey: [j, "permissions", s],
4562
4562
  queryFn: () => t(e, {
@@ -4565,14 +4565,14 @@ const Oo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4565
4565
  }),
4566
4566
  enabled: !!s
4567
4567
  });
4568
- }, Ko = () => {
4568
+ }, Vo = () => {
4569
4569
  const e = X(), t = W(), { setCurrentEditor: n } = hn(), [, s] = ws();
4570
4570
  return { getUILibraryBlock: async (o, c) => {
4571
4571
  const h = await t(e, {
4572
4572
  action: "GET_LIBRARY_ITEM",
4573
4573
  data: { id: c.id }
4574
4574
  }), g = ne(h, "html", ""), d = ne(h, "blocks", []);
4575
- return za(d) ? d : ii(g);
4575
+ return za(d) ? d : oi(g);
4576
4576
  }, getUILibraryBlocks: async (o) => {
4577
4577
  try {
4578
4578
  return (await t(e, {
@@ -4603,7 +4603,7 @@ const Oo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4603
4603
  return console.error(h), new Error("Failed to save blocks");
4604
4604
  }
4605
4605
  } };
4606
- }, jo = () => {
4606
+ }, $o = () => {
4607
4607
  const { data: e } = Rn(), t = X(), n = W();
4608
4608
  return {
4609
4609
  getPartialBlocks: Pe(async () => {
@@ -4635,8 +4635,8 @@ const Oo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4635
4635
  }, Fs = An.object({
4636
4636
  email: An.string().email({ message: "Please enter a valid email address" }),
4637
4637
  password: An.string().min(6, { message: "Password must be at least 6 characters" })
4638
- }), Vo = () => {
4639
- const { setUser: e } = st(), t = Un(), [n, s] = P(""), [a, i] = P(""), [l, o] = P({}), [c, h] = P(!1), [g, d] = P(""), E = xe({
4638
+ }), zo = () => {
4639
+ const { setUser: e } = rt(), t = Un(), [n, s] = P(""), [a, i] = P(""), [l, o] = P({}), [c, h] = P(!1), [g, d] = P(""), E = xe({
4640
4640
  mutationFn: async (S) => {
4641
4641
  d("");
4642
4642
  const v = await Es(t, {
@@ -4678,7 +4678,7 @@ const Oo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4678
4678
  return /* @__PURE__ */ r("div", { className: "flex justify-center items-center min-h-screen bg-slate-50", children: /* @__PURE__ */ u(os, { className: "w-full max-w-md", children: [
4679
4679
  /* @__PURE__ */ u(cs, { children: [
4680
4680
  /* @__PURE__ */ r(us, { className: "text-2xl", children: "Sign in" }),
4681
- /* @__PURE__ */ r(Si, { children: "Enter your credentials to sign in to visual builder" })
4681
+ /* @__PURE__ */ r(Ai, { children: "Enter your credentials to sign in to visual builder" })
4682
4682
  ] }),
4683
4683
  /* @__PURE__ */ r(ds, { children: /* @__PURE__ */ u("form", { onSubmit: y, className: "space-y-4", children: [
4684
4684
  /* @__PURE__ */ u("div", { className: "space-y-1", children: [
@@ -4716,7 +4716,7 @@ const Oo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4716
4716
  type: "button",
4717
4717
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",
4718
4718
  onClick: () => h(!c),
4719
- children: c ? /* @__PURE__ */ r(tl, { className: "h-4 w-4" }) : /* @__PURE__ */ r(Dr, { className: "h-4 w-4" })
4719
+ children: c ? /* @__PURE__ */ r(sl, { className: "h-4 w-4" }) : /* @__PURE__ */ r(Dr, { className: "h-4 w-4" })
4720
4720
  }
4721
4721
  )
4722
4722
  ] }),
@@ -4778,24 +4778,24 @@ const Oo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4778
4778
  ] })
4779
4779
  ] }) });
4780
4780
  };
4781
- let Wn = Vo;
4782
- const $o = () => z(() => Wn, [Wn]), Qu = (e) => {
4781
+ let Wn = zo;
4782
+ const Wo = () => z(() => Wn, [Wn]), Zu = (e) => {
4783
4783
  Wn = e;
4784
- }, zo = () => {
4785
- const e = $o();
4786
- return /* @__PURE__ */ r(Ya, { fallback: /* @__PURE__ */ r("div", { children: "Loading..." }), children: /* @__PURE__ */ r(e, {}) });
4787
- }, Wo = ({
4784
+ }, Yo = () => {
4785
+ const e = Wo();
4786
+ return /* @__PURE__ */ r(Xa, { fallback: /* @__PURE__ */ r("div", { children: "Loading..." }), children: /* @__PURE__ */ r(e, {}) });
4787
+ }, Qo = ({
4788
4788
  isActive: e,
4789
4789
  show: t
4790
4790
  }) => {
4791
4791
  const { data: n } = un();
4792
- return !nn(n, "languages") || !ne(n, "languages", []).length ? null : /* @__PURE__ */ r(_, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ r(nl, { className: "w-4 h-4" }) });
4793
- }, Vr = "lang", Yo = {
4792
+ return !nn(n, "languages") || !ne(n, "languages", []).length ? null : /* @__PURE__ */ r(_, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ r(rl, { className: "w-4 h-4" }) });
4793
+ }, Vr = "lang", Xo = {
4794
4794
  id: Vr,
4795
4795
  label: "Languages",
4796
4796
  position: "top",
4797
- panel: Zl,
4798
- button: Wo,
4797
+ panel: eo,
4798
+ button: Qo,
4799
4799
  view: "modal",
4800
4800
  width: 400
4801
4801
  };
@@ -4836,23 +4836,23 @@ function Ze({
4836
4836
  role: "combobox",
4837
4837
  "aria-expanded": a,
4838
4838
  disabled: s,
4839
- children: /* @__PURE__ */ r(sl, { className: "h-3 w-3" })
4839
+ children: /* @__PURE__ */ r(al, { className: "h-3 w-3" })
4840
4840
  }
4841
4841
  ) }) }),
4842
4842
  /* @__PURE__ */ r(gs, { children: "Add field" })
4843
4843
  ] }),
4844
- /* @__PURE__ */ r(pr, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ u(Ni, { children: [
4845
- /* @__PURE__ */ r(Ai, { className: "border-none", placeholder: "Search..." }),
4846
- /* @__PURE__ */ u(xi, { children: [
4847
- /* @__PURE__ */ r(Ti, { children: "No option found." }),
4848
- /* @__PURE__ */ u(Ci, { children: [
4844
+ /* @__PURE__ */ r(pr, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ u(xi, { children: [
4845
+ /* @__PURE__ */ r(Ti, { className: "border-none", placeholder: "Search..." }),
4846
+ /* @__PURE__ */ u(Ci, { children: [
4847
+ /* @__PURE__ */ r(Pi, { children: "No option found." }),
4848
+ /* @__PURE__ */ u(_i, { children: [
4849
4849
  l.length > 0 && /* @__PURE__ */ u(
4850
4850
  Gs,
4851
4851
  {
4852
4852
  onSelect: E,
4853
4853
  className: "flex items-center text-sm",
4854
4854
  children: [
4855
- /* @__PURE__ */ r(rl, { className: "w-4 h-4 mr-2" }),
4855
+ /* @__PURE__ */ r(il, { className: "w-4 h-4 mr-2" }),
4856
4856
  "Back"
4857
4857
  ]
4858
4858
  }
@@ -4877,7 +4877,7 @@ function Ze({
4877
4877
  children: "Select"
4878
4878
  }
4879
4879
  ),
4880
- (p.type === "object" || p.type === "array") && /* @__PURE__ */ r("div", { className: "p-1 rounded hover:bg-muted cursor-pointer", children: /* @__PURE__ */ r(al, { className: "w-4 h-4 opacity-50" }) })
4880
+ (p.type === "object" || p.type === "array") && /* @__PURE__ */ r("div", { className: "p-1 rounded hover:bg-muted cursor-pointer", children: /* @__PURE__ */ r(ll, { className: "w-4 h-4 opacity-50" }) })
4881
4881
  ] })
4882
4882
  ]
4883
4883
  },
@@ -4888,10 +4888,10 @@ function Ze({
4888
4888
  ] }) })
4889
4889
  ] });
4890
4890
  }
4891
- const Qo = () => {
4891
+ const Zo = () => {
4892
4892
  const { selectedLang: e } = dt(), { data: t, isFetching: n } = cn();
4893
4893
  return { data: z(() => ge(t, { lang: e || "" }) || {}, [t, e]), isFetching: n };
4894
- }, Xo = (e, t) => {
4894
+ }, Jo = (e, t) => {
4895
4895
  const n = e.selectionStart || 0, s = e.selectionEnd || 0, a = e.value, i = a.substring(0, n), l = a.substring(s);
4896
4896
  let o = !1;
4897
4897
  if (n > 0 && i.length > 0) {
@@ -4910,10 +4910,10 @@ const Qo = () => {
4910
4910
  newCursorPos: y
4911
4911
  };
4912
4912
  }, $r = () => {
4913
- const { t: e } = li(), { selectedLang: t, fallbackLang: n, languages: s } = dt(), [, a] = oi(), { data: i } = Re(), { data: l } = Fr({
4913
+ const { t: e } = ci(), { selectedLang: t, fallbackLang: n, languages: s } = dt(), [, a] = ui(), { data: i } = Re(), { data: l } = Fr({
4914
4914
  lang: t || n,
4915
4915
  pageType: i == null ? void 0 : i.pageType
4916
- }), { data: o, isFetching: c } = Qo(), h = o == null ? void 0 : o.seo, g = ut(
4916
+ }), { data: o, isFetching: c } = Zo(), h = o == null ? void 0 : o.seo, g = ut(
4917
4917
  null
4918
4918
  ), [d, E] = P({
4919
4919
  title: "",
@@ -4969,7 +4969,7 @@ const Qo = () => {
4969
4969
  }, ee = (k, q) => {
4970
4970
  const A = document.getElementById(q);
4971
4971
  if (A) {
4972
- const { value: M, newCursorPos: se } = Xo(
4972
+ const { value: M, newCursorPos: se } = Jo(
4973
4973
  A,
4974
4974
  k
4975
4975
  );
@@ -5007,7 +5007,7 @@ const Qo = () => {
5007
5007
  E(q), y.current.updated = q;
5008
5008
  };
5009
5009
  return /* @__PURE__ */ u("div", { className: "relative h-full flex flex-col", children: [
5010
- !b && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ r(yr, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ r(Pi, { children: e(
5010
+ !b && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ r(yr, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ r(Ii, { children: e(
5011
5011
  "You don't have permission to edit SEO settings. Contact your administrator for access."
5012
5012
  ) }) }) }),
5013
5013
  /* @__PURE__ */ u("div", { className: "flex-grow overflow-y-auto no-scrollbar px-2", children: [
@@ -5022,7 +5022,7 @@ const Qo = () => {
5022
5022
  ")"
5023
5023
  ] })
5024
5024
  ] }),
5025
- /* @__PURE__ */ r("form", { className: "space-y-8", children: /* @__PURE__ */ u(_i, { type: "multiple", defaultValue: ["page"], children: [
5025
+ /* @__PURE__ */ r("form", { className: "space-y-8", children: /* @__PURE__ */ u(ki, { type: "multiple", defaultValue: ["page"], children: [
5026
5026
  /* @__PURE__ */ u(gn, { value: "page", children: [
5027
5027
  /* @__PURE__ */ r(pn, { className: "font-semibold text-slate-700", children: e("SEO") }),
5028
5028
  /* @__PURE__ */ r(yn, { className: "pt-2", children: /* @__PURE__ */ u("div", { className: "space-y-4", children: [
@@ -5351,11 +5351,11 @@ const Qo = () => {
5351
5351
  ] });
5352
5352
  };
5353
5353
  $r.displayName = "SeoPanel";
5354
- const zr = "seo", Zo = ({
5354
+ const zr = "seo", ec = ({
5355
5355
  isActive: e,
5356
5356
  show: t
5357
5357
  }) => {
5358
- const { data: n } = Re(), s = Fl(n == null ? void 0 : n.pageType);
5358
+ const { data: n } = Re(), s = Hl(n == null ? void 0 : n.pageType);
5359
5359
  return !nn(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ r(
5360
5360
  _,
5361
5361
  {
@@ -5378,21 +5378,21 @@ const zr = "seo", Zo = ({
5378
5378
  )
5379
5379
  }
5380
5380
  );
5381
- }, Jo = {
5381
+ }, tc = {
5382
5382
  id: zr,
5383
5383
  label: "SEO",
5384
5384
  panel: $r,
5385
- button: Zo,
5385
+ button: ec,
5386
5386
  position: "top",
5387
5387
  view: "modal",
5388
5388
  width: 600
5389
- }, ec = () => {
5390
- zn(zr, Jo), zn(Vr, Yo);
5391
- }, tc = "user-info", nc = () => {
5392
- const { user: e, logout: t } = st();
5393
- return e ? /* @__PURE__ */ u(Ii, { children: [
5394
- /* @__PURE__ */ r(ki, { asChild: !0, children: /* @__PURE__ */ r(_, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ r(il, { className: "w-4 h-4" }) }) }),
5395
- /* @__PURE__ */ u(Li, { className: "w-auto p-4 space-y-2", children: [
5389
+ }, nc = () => {
5390
+ zn(zr, tc), zn(Vr, Xo);
5391
+ }, sc = "user-info", rc = () => {
5392
+ const { user: e, logout: t } = rt(), n = tt("onLogout", Wa);
5393
+ return e ? /* @__PURE__ */ u(Li, { children: [
5394
+ /* @__PURE__ */ r(Di, { asChild: !0, children: /* @__PURE__ */ r(_, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ r(ol, { className: "w-4 h-4" }) }) }),
5395
+ /* @__PURE__ */ u(Gi, { className: "w-auto p-4 space-y-2", children: [
5396
5396
  /* @__PURE__ */ r("div", { className: "text-sm font-medium", children: e.name ?? e.email }),
5397
5397
  /* @__PURE__ */ r("div", { className: "text-xs text-muted-foreground", children: e.email }),
5398
5398
  /* @__PURE__ */ u(ar, { children: [
@@ -5404,16 +5404,24 @@ const zr = "seo", Zo = ({
5404
5404
  ] }),
5405
5405
  /* @__PURE__ */ u(dr, { children: [
5406
5406
  /* @__PURE__ */ r(hr, { children: "Cancel" }),
5407
- /* @__PURE__ */ r(mr, { onClick: () => t(), children: "Logout" })
5407
+ /* @__PURE__ */ r(
5408
+ mr,
5409
+ {
5410
+ onClick: () => {
5411
+ t(), Ya(n) && n();
5412
+ },
5413
+ children: "Logout"
5414
+ }
5415
+ )
5408
5416
  ] })
5409
5417
  ] })
5410
5418
  ] })
5411
5419
  ] })
5412
5420
  ] }) : null;
5413
- }, sc = {
5414
- id: tc,
5421
+ }, ac = {
5422
+ id: sc,
5415
5423
  label: "User Info",
5416
- button: nc,
5424
+ button: rc,
5417
5425
  position: "bottom"
5418
5426
  };
5419
5427
  var O = {
@@ -5435,14 +5443,14 @@ function qs(e) {
5435
5443
  function Ut(e) {
5436
5444
  O.context = e;
5437
5445
  }
5438
- var rc = (e, t) => e === t, Cn = Symbol("solid-proxy"), Wr = typeof Proxy == "function", Yr = Symbol("solid-track"), Pn = {
5439
- equals: rc
5440
- }, Qr = na, tt = 1, _n = 2, Xr = {
5446
+ var ic = (e, t) => e === t, Cn = Symbol("solid-proxy"), Wr = typeof Proxy == "function", Yr = Symbol("solid-track"), Pn = {
5447
+ equals: ic
5448
+ }, Qr = na, nt = 1, _n = 2, Xr = {
5441
5449
  owned: null,
5442
5450
  cleanups: null,
5443
5451
  context: null,
5444
5452
  owner: null
5445
- }, Kn = {}, J = null, jn = null, ac = null, ae = null, Ie = null, Je = null, On = 0;
5453
+ }, Kn = {}, J = null, jn = null, lc = null, ae = null, Ie = null, Je = null, On = 0;
5446
5454
  function ot(e, t) {
5447
5455
  const n = ae, s = J, a = e.length === 0, i = t === void 0 ? s : t, l = a ? Xr : {
5448
5456
  owned: null,
@@ -5467,17 +5475,17 @@ function Ee(e, t) {
5467
5475
  }, s = (a) => (typeof a == "function" && (a = a(n.value)), ta(n, a));
5468
5476
  return [ea.bind(n), s];
5469
5477
  }
5470
- function ic(e, t, n) {
5471
- const s = Bn(e, t, !0, tt);
5478
+ function oc(e, t, n) {
5479
+ const s = Bn(e, t, !0, nt);
5472
5480
  Lt(s);
5473
5481
  }
5474
5482
  function ct(e, t, n) {
5475
- const s = Bn(e, t, !1, tt);
5483
+ const s = Bn(e, t, !1, nt);
5476
5484
  Lt(s);
5477
5485
  }
5478
5486
  function Zr(e, t, n) {
5479
- Qr = pc;
5480
- const s = Bn(e, t, !1, tt);
5487
+ Qr = vc;
5488
+ const s = Bn(e, t, !1, nt);
5481
5489
  (!n || !n.render) && (s.user = !0), Je ? Je.push(s) : Lt(s);
5482
5490
  }
5483
5491
  function Ge(e, t, n) {
@@ -5485,10 +5493,10 @@ function Ge(e, t, n) {
5485
5493
  const s = Bn(e, t, !0, 0);
5486
5494
  return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, Lt(s), ea.bind(s);
5487
5495
  }
5488
- function lc(e) {
5496
+ function cc(e) {
5489
5497
  return e && typeof e == "object" && "then" in e;
5490
5498
  }
5491
- function oc(e, t, n) {
5499
+ function uc(e, t, n) {
5492
5500
  let s, a, i;
5493
5501
  arguments.length === 1 ? (s = !0, a = e, i = {}) : (s = e, a = t, i = {});
5494
5502
  let l = null, o = Kn, c = null, h = !1, g = "initialValue" in i, d = typeof s == "function" && Ge(s);
@@ -5512,7 +5520,7 @@ function oc(e, t, n) {
5512
5520
  }, !1);
5513
5521
  }
5514
5522
  function ee() {
5515
- const k = mc, q = y(), A = S();
5523
+ const k = gc, q = y(), A = S();
5516
5524
  if (A !== void 0 && !l)
5517
5525
  throw A;
5518
5526
  return ae && ae.user, q;
@@ -5532,7 +5540,7 @@ function oc(e, t, n) {
5532
5540
  refetching: k
5533
5541
  })
5534
5542
  );
5535
- return lc(A) ? (l = A, "value" in A ? (A.status === "success" ? T(l, A.value, void 0, q) : T(l, void 0, Yn(A.value), q), A) : (h = !0, queueMicrotask(() => h = !1), We(() => {
5543
+ return cc(A) ? (l = A, "value" in A ? (A.status === "success" ? T(l, A.value, void 0, q) : T(l, void 0, Yn(A.value), q), A) : (h = !0, queueMicrotask(() => h = !1), We(() => {
5536
5544
  w(g ? "refreshing" : "pending"), U();
5537
5545
  }, !1), A.then(
5538
5546
  (M) => T(A, M, void 0, q),
@@ -5562,7 +5570,7 @@ function oc(e, t, n) {
5562
5570
  return y();
5563
5571
  }
5564
5572
  }
5565
- }), d ? ic(() => le(!1)) : le(!1), [
5573
+ }), d ? oc(() => le(!1)) : le(!1), [
5566
5574
  ee,
5567
5575
  {
5568
5576
  refetch: le,
@@ -5570,7 +5578,7 @@ function oc(e, t, n) {
5570
5578
  }
5571
5579
  ];
5572
5580
  }
5573
- function Xu(e) {
5581
+ function Ju(e) {
5574
5582
  return We(e, !1);
5575
5583
  }
5576
5584
  function _e(e) {
@@ -5584,7 +5592,7 @@ function _e(e) {
5584
5592
  ae = t;
5585
5593
  }
5586
5594
  }
5587
- function Zu(e, t, n) {
5595
+ function ed(e, t, n) {
5588
5596
  const s = Array.isArray(e);
5589
5597
  let a, i = n && n.defer;
5590
5598
  return (l) => {
@@ -5601,7 +5609,7 @@ function Zu(e, t, n) {
5601
5609
  return a = o, c;
5602
5610
  };
5603
5611
  }
5604
- function cc(e) {
5612
+ function dc(e) {
5605
5613
  Zr(() => _e(e));
5606
5614
  }
5607
5615
  function Ft(e) {
@@ -5610,7 +5618,7 @@ function Ft(e) {
5610
5618
  function Hs() {
5611
5619
  return J;
5612
5620
  }
5613
- function uc(e, t) {
5621
+ function hc(e, t) {
5614
5622
  const n = J, s = ae;
5615
5623
  J = e, ae = null;
5616
5624
  try {
@@ -5621,7 +5629,7 @@ function uc(e, t) {
5621
5629
  J = n, ae = s;
5622
5630
  }
5623
5631
  }
5624
- function dc(e) {
5632
+ function mc(e) {
5625
5633
  const t = ae, n = J;
5626
5634
  return Promise.resolve().then(() => {
5627
5635
  ae = t, J = n;
@@ -5629,19 +5637,19 @@ function dc(e) {
5629
5637
  return We(e, !1), ae = J = null, s ? s.done : void 0;
5630
5638
  });
5631
5639
  }
5632
- var [hc, Ju] = /* @__PURE__ */ Ee(!1);
5633
- function ed() {
5634
- return [hc, dc];
5640
+ var [fc, td] = /* @__PURE__ */ Ee(!1);
5641
+ function nd() {
5642
+ return [fc, mc];
5635
5643
  }
5636
- function td(e, t) {
5644
+ function sd(e, t) {
5637
5645
  const n = Symbol("context");
5638
5646
  return {
5639
5647
  id: n,
5640
- Provider: yc(n),
5648
+ Provider: Ec(n),
5641
5649
  defaultValue: e
5642
5650
  };
5643
5651
  }
5644
- function nd(e) {
5652
+ function rd(e) {
5645
5653
  let t;
5646
5654
  return J && J.context && (t = J.context[e.id]) !== void 0 ? t : e.defaultValue;
5647
5655
  }
@@ -5652,10 +5660,10 @@ function Jr(e) {
5652
5660
  return Array.isArray(s) ? s : s != null ? [s] : [];
5653
5661
  }, n;
5654
5662
  }
5655
- var mc;
5663
+ var gc;
5656
5664
  function ea() {
5657
5665
  if (this.sources && this.state)
5658
- if (this.state === tt)
5666
+ if (this.state === nt)
5659
5667
  Lt(this);
5660
5668
  else {
5661
5669
  const e = Ie;
@@ -5672,7 +5680,7 @@ function ta(e, t, n) {
5672
5680
  return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && We(() => {
5673
5681
  for (let a = 0; a < e.observers.length; a += 1) {
5674
5682
  const i = e.observers[a], l = jn && jn.running;
5675
- l && jn.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? Ie.push(i) : Je.push(i), i.observers && sa(i)), l || (i.state = tt);
5683
+ l && jn.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? Ie.push(i) : Je.push(i), i.observers && sa(i)), l || (i.state = nt);
5676
5684
  }
5677
5685
  if (Ie.length > 1e6)
5678
5686
  throw Ie = [], new Error();
@@ -5683,26 +5691,26 @@ function Lt(e) {
5683
5691
  return;
5684
5692
  qt(e);
5685
5693
  const t = On;
5686
- fc(
5694
+ pc(
5687
5695
  e,
5688
5696
  e.value,
5689
5697
  t
5690
5698
  );
5691
5699
  }
5692
- function fc(e, t, n) {
5700
+ function pc(e, t, n) {
5693
5701
  let s;
5694
5702
  const a = J, i = ae;
5695
5703
  ae = J = e;
5696
5704
  try {
5697
5705
  s = e.fn(t);
5698
5706
  } catch (l) {
5699
- return e.pure && (e.state = tt, e.owned && e.owned.forEach(qt), e.owned = null), e.updatedAt = n + 1, Ts(l);
5707
+ return e.pure && (e.state = nt, e.owned && e.owned.forEach(qt), e.owned = null), e.updatedAt = n + 1, Ts(l);
5700
5708
  } finally {
5701
5709
  ae = i, J = a;
5702
5710
  }
5703
5711
  (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? ta(e, s) : e.value = s, e.updatedAt = n);
5704
5712
  }
5705
- function Bn(e, t, n, s = tt, a) {
5713
+ function Bn(e, t, n, s = nt, a) {
5706
5714
  const i = {
5707
5715
  fn: e,
5708
5716
  state: s,
@@ -5729,7 +5737,7 @@ function In(e) {
5729
5737
  for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < On); )
5730
5738
  e.state && t.push(e);
5731
5739
  for (let n = t.length - 1; n >= 0; n--)
5732
- if (e = t[n], e.state === tt)
5740
+ if (e = t[n], e.state === nt)
5733
5741
  Lt(e);
5734
5742
  else if (e.state === _n) {
5735
5743
  const s = Ie;
@@ -5743,12 +5751,12 @@ function We(e, t) {
5743
5751
  t || (Ie = []), Je ? n = !0 : Je = [], On++;
5744
5752
  try {
5745
5753
  const s = e();
5746
- return gc(n), s;
5754
+ return yc(n), s;
5747
5755
  } catch (s) {
5748
5756
  n || (Je = null), Ie = null, Ts(s);
5749
5757
  }
5750
5758
  }
5751
- function gc(e) {
5759
+ function yc(e) {
5752
5760
  if (Ie && (na(Ie), Ie = null), e)
5753
5761
  return;
5754
5762
  const t = Je;
@@ -5758,7 +5766,7 @@ function na(e) {
5758
5766
  for (let t = 0; t < e.length; t++)
5759
5767
  In(e[t]);
5760
5768
  }
5761
- function pc(e) {
5769
+ function vc(e) {
5762
5770
  let t, n = 0;
5763
5771
  for (t = 0; t < e.length; t++) {
5764
5772
  const s = e[t];
@@ -5780,7 +5788,7 @@ function kn(e, t) {
5780
5788
  const s = e.sources[n];
5781
5789
  if (s.sources) {
5782
5790
  const a = s.state;
5783
- a === tt ? s !== t && (!s.updatedAt || s.updatedAt < On) && In(s) : a === _n && kn(s, t);
5791
+ a === nt ? s !== t && (!s.updatedAt || s.updatedAt < On) && In(s) : a === _n && kn(s, t);
5784
5792
  }
5785
5793
  }
5786
5794
  }
@@ -5838,7 +5846,7 @@ function Qn(e) {
5838
5846
  }
5839
5847
  return e;
5840
5848
  }
5841
- function yc(e, t) {
5849
+ function Ec(e, t) {
5842
5850
  return function(s) {
5843
5851
  let a;
5844
5852
  return ct(
@@ -5855,7 +5863,7 @@ function Ln(e) {
5855
5863
  for (let t = 0; t < e.length; t++)
5856
5864
  e[t]();
5857
5865
  }
5858
- function vc(e, t, n = {}) {
5866
+ function bc(e, t, n = {}) {
5859
5867
  let s = [], a = [], i = [], l = 0, o = t.length > 1 ? [] : null;
5860
5868
  return Ft(() => Ln(i)), () => {
5861
5869
  let c = e() || [], h = c.length, g, d;
@@ -5891,7 +5899,7 @@ function vc(e, t, n = {}) {
5891
5899
  }
5892
5900
  };
5893
5901
  }
5894
- function Ec(e, t, n = {}) {
5902
+ function wc(e, t, n = {}) {
5895
5903
  let s = [], a = [], i = [], l = [], o = 0, c;
5896
5904
  return Ft(() => Ln(i)), () => {
5897
5905
  const h = e() || [], g = h.length;
@@ -5944,7 +5952,7 @@ var Zn = {
5944
5952
  function Vn(e) {
5945
5953
  return (e = typeof e == "function" ? e() : e) ? e : {};
5946
5954
  }
5947
- function bc() {
5955
+ function Sc() {
5948
5956
  for (let e = 0, t = this.length; e < t; ++e) {
5949
5957
  const n = this[e]();
5950
5958
  if (n !== void 0)
@@ -5997,7 +6005,7 @@ function aa(...e) {
5997
6005
  s[g] = d.get ? {
5998
6006
  enumerable: !0,
5999
6007
  configurable: !0,
6000
- get: bc.bind(n[g] = [d.get.bind(o)])
6008
+ get: Sc.bind(n[g] = [d.get.bind(o)])
6001
6009
  } : d.value !== void 0 ? d : void 0;
6002
6010
  else {
6003
6011
  const E = n[g];
@@ -6012,7 +6020,7 @@ function aa(...e) {
6012
6020
  }
6013
6021
  return a;
6014
6022
  }
6015
- function wc(e, ...t) {
6023
+ function Nc(e, ...t) {
6016
6024
  if (Wr && Cn in e) {
6017
6025
  const a = new Set(t.length > 1 ? t.flat() : t[0]), i = t.map((l) => new Proxy(
6018
6026
  {
@@ -6065,7 +6073,7 @@ function ia(e) {
6065
6073
  !O.done && Ut(i), O.count--, c(() => h.default), Ut();
6066
6074
  }), t = o;
6067
6075
  } else if (!t) {
6068
- const [o] = oc(() => (n || (n = e())).then((c) => c.default));
6076
+ const [o] = uc(() => (n || (n = e())).then((c) => c.default));
6069
6077
  t = o;
6070
6078
  }
6071
6079
  let l;
@@ -6082,24 +6090,24 @@ function ia(e) {
6082
6090
  };
6083
6091
  return s.preload = () => n || ((n = e()).then((a) => t = () => a.default), n), s;
6084
6092
  }
6085
- var Sc = 0;
6086
- function sd() {
6087
- return O.context ? O.getNextContextId() : `cl-${Sc++}`;
6093
+ var Ac = 0;
6094
+ function ad() {
6095
+ return O.context ? O.getNextContextId() : `cl-${Ac++}`;
6088
6096
  }
6089
6097
  var la = (e) => `Stale read from <${e}>.`;
6090
- function rd(e) {
6098
+ function id(e) {
6091
6099
  const t = "fallback" in e && {
6092
6100
  fallback: () => e.fallback
6093
6101
  };
6094
- return Ge(vc(() => e.each, e.children, t || void 0));
6102
+ return Ge(bc(() => e.each, e.children, t || void 0));
6095
6103
  }
6096
- function ad(e) {
6104
+ function ld(e) {
6097
6105
  const t = "fallback" in e && {
6098
6106
  fallback: () => e.fallback
6099
6107
  };
6100
- return Ge(Ec(() => e.each, e.children, t || void 0));
6108
+ return Ge(wc(() => e.each, e.children, t || void 0));
6101
6109
  }
6102
- function id(e) {
6110
+ function od(e) {
6103
6111
  const t = e.keyed, n = Ge(() => e.when, void 0, {
6104
6112
  equals: (s, a) => t ? s === a : !s == !a
6105
6113
  });
@@ -6124,7 +6132,7 @@ function id(e) {
6124
6132
  void 0
6125
6133
  );
6126
6134
  }
6127
- function ld(e) {
6135
+ function cd(e) {
6128
6136
  let t = !1;
6129
6137
  const n = (i, l) => (t ? i[1] === l[1] : !i[1] == !l[1]) && i[2] === l[2], s = Jr(() => e.children), a = Ge(
6130
6138
  () => {
@@ -6162,10 +6170,10 @@ function ld(e) {
6162
6170
  void 0
6163
6171
  );
6164
6172
  }
6165
- function od(e) {
6173
+ function ud(e) {
6166
6174
  return e;
6167
6175
  }
6168
- var Nc = [
6176
+ var xc = [
6169
6177
  "allowfullscreen",
6170
6178
  "async",
6171
6179
  "autofocus",
@@ -6191,7 +6199,7 @@ var Nc = [
6191
6199
  "reversed",
6192
6200
  "seamless",
6193
6201
  "selected"
6194
- ], Ac = /* @__PURE__ */ new Set([
6202
+ ], Tc = /* @__PURE__ */ new Set([
6195
6203
  "className",
6196
6204
  "value",
6197
6205
  "readOnly",
@@ -6199,16 +6207,16 @@ var Nc = [
6199
6207
  "isMap",
6200
6208
  "noModule",
6201
6209
  "playsInline",
6202
- ...Nc
6203
- ]), xc = /* @__PURE__ */ new Set([
6210
+ ...xc
6211
+ ]), Cc = /* @__PURE__ */ new Set([
6204
6212
  "innerHTML",
6205
6213
  "textContent",
6206
6214
  "innerText",
6207
6215
  "children"
6208
- ]), Tc = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
6216
+ ]), Pc = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
6209
6217
  className: "class",
6210
6218
  htmlFor: "for"
6211
- }), Cc = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
6219
+ }), _c = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
6212
6220
  class: "className",
6213
6221
  formnovalidate: {
6214
6222
  $: "formNoValidate",
@@ -6233,11 +6241,11 @@ var Nc = [
6233
6241
  TEXTAREA: 1
6234
6242
  }
6235
6243
  });
6236
- function Pc(e, t) {
6237
- const n = Cc[e];
6244
+ function Ic(e, t) {
6245
+ const n = _c[e];
6238
6246
  return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
6239
6247
  }
6240
- var _c = /* @__PURE__ */ new Set([
6248
+ var kc = /* @__PURE__ */ new Set([
6241
6249
  "beforeinput",
6242
6250
  "click",
6243
6251
  "dblclick",
@@ -6260,7 +6268,7 @@ var _c = /* @__PURE__ */ new Set([
6260
6268
  "touchend",
6261
6269
  "touchmove",
6262
6270
  "touchstart"
6263
- ]), Ic = /* @__PURE__ */ new Set([
6271
+ ]), Lc = /* @__PURE__ */ new Set([
6264
6272
  "altGlyph",
6265
6273
  "altGlyphDef",
6266
6274
  "altGlyphItem",
@@ -6338,11 +6346,11 @@ var _c = /* @__PURE__ */ new Set([
6338
6346
  "use",
6339
6347
  "view",
6340
6348
  "vkern"
6341
- ]), kc = {
6349
+ ]), Dc = {
6342
6350
  xlink: "http://www.w3.org/1999/xlink",
6343
6351
  xml: "http://www.w3.org/XML/1998/namespace"
6344
6352
  };
6345
- function Lc(e, t, n) {
6353
+ function Gc(e, t, n) {
6346
6354
  let s = n.length, a = t.length, i = s, l = 0, o = 0, c = t[a - 1].nextSibling, h = null;
6347
6355
  for (; l < a || o < i; ) {
6348
6356
  if (t[l] === n[o]) {
@@ -6396,7 +6404,7 @@ function oa(e, t, n, s = {}) {
6396
6404
  a(), t.textContent = "";
6397
6405
  };
6398
6406
  }
6399
- function cd(e, t, n) {
6407
+ function dd(e, t, n) {
6400
6408
  let s;
6401
6409
  const a = () => {
6402
6410
  const l = document.createElement("template");
@@ -6404,14 +6412,14 @@ function cd(e, t, n) {
6404
6412
  }, i = () => (s || (s = a())).cloneNode(!0);
6405
6413
  return i.cloneNode = i, i;
6406
6414
  }
6407
- function Dc(e, t = window.document) {
6415
+ function Uc(e, t = window.document) {
6408
6416
  const n = t[Ot] || (t[Ot] = /* @__PURE__ */ new Set());
6409
6417
  for (let s = 0, a = e.length; s < a; s++) {
6410
6418
  const i = e[s];
6411
6419
  n.has(i) || (n.add(i), t.addEventListener(i, ca));
6412
6420
  }
6413
6421
  }
6414
- function ud(e = window.document) {
6422
+ function hd(e = window.document) {
6415
6423
  if (e[Ot]) {
6416
6424
  for (let t of e[Ot].keys())
6417
6425
  e.removeEventListener(t, ca);
@@ -6421,16 +6429,16 @@ function ud(e = window.document) {
6421
6429
  function Jn(e, t, n) {
6422
6430
  ht(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
6423
6431
  }
6424
- function Gc(e, t, n, s) {
6432
+ function Rc(e, t, n, s) {
6425
6433
  ht(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
6426
6434
  }
6427
- function Uc(e, t, n) {
6435
+ function Oc(e, t, n) {
6428
6436
  ht(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
6429
6437
  }
6430
- function Rc(e, t) {
6438
+ function Bc(e, t) {
6431
6439
  ht(e) || (t == null ? e.removeAttribute("class") : e.className = t);
6432
6440
  }
6433
- function Oc(e, t, n, s) {
6441
+ function Mc(e, t, n, s) {
6434
6442
  if (s)
6435
6443
  Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
6436
6444
  else if (Array.isArray(n)) {
@@ -6439,7 +6447,7 @@ function Oc(e, t, n, s) {
6439
6447
  } else
6440
6448
  e.addEventListener(t, n, typeof n != "function" && n);
6441
6449
  }
6442
- function Bc(e, t, n = {}) {
6450
+ function Fc(e, t, n = {}) {
6443
6451
  const s = Object.keys(t || {}), a = Object.keys(n);
6444
6452
  let i, l;
6445
6453
  for (i = 0, l = a.length; i < l; i++) {
@@ -6452,7 +6460,7 @@ function Bc(e, t, n = {}) {
6452
6460
  }
6453
6461
  return n;
6454
6462
  }
6455
- function Mc(e, t, n) {
6463
+ function qc(e, t, n) {
6456
6464
  if (!t)
6457
6465
  return n ? Jn(e, "style") : t;
6458
6466
  const s = e.style;
@@ -6466,13 +6474,13 @@ function Mc(e, t, n) {
6466
6474
  a = t[i], a !== n[i] && (s.setProperty(i, a), n[i] = a);
6467
6475
  return n;
6468
6476
  }
6469
- function Fc(e, t = {}, n, s) {
6477
+ function Hc(e, t = {}, n, s) {
6470
6478
  const a = {};
6471
6479
  return s || ct(
6472
6480
  () => a.children = Ht(e, t.children, a.children)
6473
- ), ct(() => typeof t.ref == "function" && qc(t.ref, e)), ct(() => Hc(e, t, n, !0, a, !0)), a;
6481
+ ), ct(() => typeof t.ref == "function" && Kc(t.ref, e)), ct(() => jc(e, t, n, !0, a, !0)), a;
6474
6482
  }
6475
- function qc(e, t, n) {
6483
+ function Kc(e, t, n) {
6476
6484
  return _e(() => e(t, n));
6477
6485
  }
6478
6486
  function es(e, t, n, s) {
@@ -6480,7 +6488,7 @@ function es(e, t, n, s) {
6480
6488
  return Ht(e, t, s, n);
6481
6489
  ct((a) => Ht(e, t(), a, n), s);
6482
6490
  }
6483
- function Hc(e, t, n, s, a = {}, i = !1) {
6491
+ function jc(e, t, n, s, a = {}, i = !1) {
6484
6492
  t || (t = {});
6485
6493
  for (const l in a)
6486
6494
  if (!(l in t)) {
@@ -6495,14 +6503,14 @@ function Hc(e, t, n, s, a = {}, i = !1) {
6495
6503
  a[l] = js(e, l, o, a[l], n, i, t);
6496
6504
  }
6497
6505
  }
6498
- function Kc(e) {
6506
+ function Vc(e) {
6499
6507
  let t, n;
6500
- return !ht() || !(t = O.registry.get(n = Vc())) ? e() : (O.completed && O.completed.add(t), O.registry.delete(n), t);
6508
+ return !ht() || !(t = O.registry.get(n = zc())) ? e() : (O.completed && O.completed.add(t), O.registry.delete(n), t);
6501
6509
  }
6502
6510
  function ht(e) {
6503
6511
  return !!O.context && !O.done && (!e || e.isConnected);
6504
6512
  }
6505
- function jc(e) {
6513
+ function $c(e) {
6506
6514
  return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
6507
6515
  }
6508
6516
  function Ks(e, t, n) {
@@ -6513,9 +6521,9 @@ function Ks(e, t, n) {
6513
6521
  function js(e, t, n, s, a, i, l) {
6514
6522
  let o, c, h, g, d;
6515
6523
  if (t === "style")
6516
- return Mc(e, n, s);
6524
+ return qc(e, n, s);
6517
6525
  if (t === "classList")
6518
- return Bc(e, n, s);
6526
+ return Fc(e, n, s);
6519
6527
  if (n === s)
6520
6528
  return s;
6521
6529
  if (t === "ref")
@@ -6527,25 +6535,25 @@ function js(e, t, n, s, a, i, l) {
6527
6535
  const E = t.slice(10);
6528
6536
  s && e.removeEventListener(E, s, !0), n && e.addEventListener(E, n, !0);
6529
6537
  } else if (t.slice(0, 2) === "on") {
6530
- const E = t.slice(2).toLowerCase(), y = _c.has(E);
6538
+ const E = t.slice(2).toLowerCase(), y = kc.has(E);
6531
6539
  if (!y && s) {
6532
6540
  const p = Array.isArray(s) ? s[0] : s;
6533
6541
  e.removeEventListener(E, p);
6534
6542
  }
6535
- (y || n) && (Oc(e, E, n, y), y && Dc([E]));
6543
+ (y || n) && (Mc(e, E, n, y), y && Uc([E]));
6536
6544
  } else if (t.slice(0, 5) === "attr:")
6537
6545
  Jn(e, t.slice(5), n);
6538
6546
  else if (t.slice(0, 5) === "bool:")
6539
- Uc(e, t.slice(5), n);
6540
- else if ((d = t.slice(0, 5) === "prop:") || (h = xc.has(t)) || !a && ((g = Pc(t, e.tagName)) || (c = Ac.has(t))) || (o = e.nodeName.includes("-") || "is" in l)) {
6547
+ Oc(e, t.slice(5), n);
6548
+ else if ((d = t.slice(0, 5) === "prop:") || (h = Cc.has(t)) || !a && ((g = Ic(t, e.tagName)) || (c = Tc.has(t))) || (o = e.nodeName.includes("-") || "is" in l)) {
6541
6549
  if (d)
6542
6550
  t = t.slice(5), c = !0;
6543
6551
  else if (ht(e))
6544
6552
  return n;
6545
- t === "class" || t === "className" ? Rc(e, n) : o && !c && !h ? e[jc(t)] = n : e[g || t] = n;
6553
+ t === "class" || t === "className" ? Bc(e, n) : o && !c && !h ? e[$c(t)] = n : e[g || t] = n;
6546
6554
  } else {
6547
- const E = a && t.indexOf(":") > -1 && kc[t.split(":")[0]];
6548
- E ? Gc(e, E, t, n) : Jn(e, Tc[t] || t, n);
6555
+ const E = a && t.indexOf(":") > -1 && Dc[t.split(":")[0]];
6556
+ E ? Rc(e, E, t, n) : Jn(e, Pc[t] || t, n);
6549
6557
  }
6550
6558
  return n;
6551
6559
  }
@@ -6644,7 +6652,7 @@ function Ht(e, t, n, s, a) {
6644
6652
  if (c.length === 0) {
6645
6653
  if (n = mt(e, n, s), o)
6646
6654
  return n;
6647
- } else h ? n.length === 0 ? Vs(e, c, s) : Lc(e, n, c) : (n && mt(e), Vs(e, c));
6655
+ } else h ? n.length === 0 ? Vs(e, c, s) : Gc(e, n, c) : (n && mt(e), Vs(e, c));
6648
6656
  n = c;
6649
6657
  } else if (t.nodeType) {
6650
6658
  if (i && t.parentNode)
@@ -6708,19 +6716,19 @@ function mt(e, t, n, s) {
6708
6716
  e.insertBefore(a, n);
6709
6717
  return [a];
6710
6718
  }
6711
- function Vc() {
6719
+ function zc() {
6712
6720
  return O.getNextContextId();
6713
6721
  }
6714
- var $c = "http://www.w3.org/2000/svg";
6722
+ var Wc = "http://www.w3.org/2000/svg";
6715
6723
  function ua(e, t = !1) {
6716
- return t ? document.createElementNS($c, e) : document.createElement(e);
6724
+ return t ? document.createElementNS(Wc, e) : document.createElement(e);
6717
6725
  }
6718
- function dd(e) {
6726
+ function md(e) {
6719
6727
  const { useShadow: t } = e, n = document.createTextNode(""), s = () => e.mount || document.body, a = Hs();
6720
6728
  let i, l = !!O.context;
6721
6729
  return Zr(
6722
6730
  () => {
6723
- l && (Hs().user = l = !1), i || (i = uc(a, () => Ge(() => e.children)));
6731
+ l && (Hs().user = l = !1), i || (i = hc(a, () => Ge(() => e.children)));
6724
6732
  const o = s();
6725
6733
  if (o instanceof HTMLHeadElement) {
6726
6734
  const [c, h] = Ee(!1), g = () => h(!0);
@@ -6743,20 +6751,20 @@ function dd(e) {
6743
6751
  }
6744
6752
  ), n;
6745
6753
  }
6746
- function hd(e) {
6747
- const [t, n] = wc(e, ["component"]), s = Ge(() => t.component);
6754
+ function fd(e) {
6755
+ const [t, n] = Nc(e, ["component"]), s = Ge(() => t.component);
6748
6756
  return Ge(() => {
6749
6757
  const a = s();
6750
6758
  switch (typeof a) {
6751
6759
  case "function":
6752
6760
  return _e(() => a(n));
6753
6761
  case "string":
6754
- const i = Ic.has(a), l = O.context ? Kc() : ua(a, i);
6755
- return Fc(l, n, i), l;
6762
+ const i = Lc.has(a), l = O.context ? Vc() : ua(a, i);
6763
+ return Hc(l, n, i), l;
6756
6764
  }
6757
6765
  });
6758
6766
  }
6759
- var zc = class {
6767
+ var Yc = class {
6760
6768
  constructor() {
6761
6769
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
6762
6770
  }
@@ -6774,7 +6782,7 @@ var zc = class {
6774
6782
  }
6775
6783
  }, da = class {
6776
6784
  constructor(e) {
6777
- this.generateIdentifier = e, this.kv = new zc();
6785
+ this.generateIdentifier = e, this.kv = new Yc();
6778
6786
  }
6779
6787
  register(e, t) {
6780
6788
  this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
@@ -6788,7 +6796,7 @@ var zc = class {
6788
6796
  getValue(e) {
6789
6797
  return this.kv.getByKey(e);
6790
6798
  }
6791
- }, Wc = class extends da {
6799
+ }, Qc = class extends da {
6792
6800
  constructor() {
6793
6801
  super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
6794
6802
  }
@@ -6799,7 +6807,7 @@ var zc = class {
6799
6807
  return this.classToAllowedProps.get(e);
6800
6808
  }
6801
6809
  };
6802
- function Yc(e) {
6810
+ function Xc(e) {
6803
6811
  if ("values" in Object)
6804
6812
  return Object.values(e);
6805
6813
  const t = [];
@@ -6807,8 +6815,8 @@ function Yc(e) {
6807
6815
  e.hasOwnProperty(n) && t.push(e[n]);
6808
6816
  return t;
6809
6817
  }
6810
- function Qc(e, t) {
6811
- const n = Yc(e);
6818
+ function Zc(e, t) {
6819
+ const n = Xc(e);
6812
6820
  if ("find" in n)
6813
6821
  return n.find(t);
6814
6822
  const s = n;
@@ -6831,7 +6839,7 @@ function $s(e, t) {
6831
6839
  return s;
6832
6840
  }
6833
6841
  }
6834
- var Xc = class {
6842
+ var Jc = class {
6835
6843
  constructor() {
6836
6844
  this.transfomers = {};
6837
6845
  }
@@ -6839,12 +6847,12 @@ var Xc = class {
6839
6847
  this.transfomers[e.name] = e;
6840
6848
  }
6841
6849
  findApplicable(e) {
6842
- return Qc(this.transfomers, (t) => t.isApplicable(e));
6850
+ return Zc(this.transfomers, (t) => t.isApplicable(e));
6843
6851
  }
6844
6852
  findByName(e) {
6845
6853
  return this.transfomers[e];
6846
6854
  }
6847
- }, Zc = (e) => Object.prototype.toString.call(e).slice(8, -1), ha = (e) => typeof e > "u", Jc = (e) => e === null, Kt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, ns = (e) => Kt(e) && Object.keys(e).length === 0, nt = (e) => Array.isArray(e), eu = (e) => typeof e == "string", tu = (e) => typeof e == "number" && !isNaN(e), nu = (e) => typeof e == "boolean", su = (e) => e instanceof RegExp, jt = (e) => e instanceof Map, Vt = (e) => e instanceof Set, ma = (e) => Zc(e) === "Symbol", ru = (e) => e instanceof Date && !isNaN(e.valueOf()), au = (e) => e instanceof Error, zs = (e) => typeof e == "number" && isNaN(e), iu = (e) => nu(e) || Jc(e) || ha(e) || tu(e) || eu(e) || ma(e), lu = (e) => typeof e == "bigint", ou = (e) => e === 1 / 0 || e === -1 / 0, cu = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), uu = (e) => e instanceof URL, fa = (e) => e.replace(/\./g, "\\."), $n = (e) => e.map(String).map(fa).join("."), Bt = (e) => {
6855
+ }, eu = (e) => Object.prototype.toString.call(e).slice(8, -1), ha = (e) => typeof e > "u", tu = (e) => e === null, Kt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, ns = (e) => Kt(e) && Object.keys(e).length === 0, st = (e) => Array.isArray(e), nu = (e) => typeof e == "string", su = (e) => typeof e == "number" && !isNaN(e), ru = (e) => typeof e == "boolean", au = (e) => e instanceof RegExp, jt = (e) => e instanceof Map, Vt = (e) => e instanceof Set, ma = (e) => eu(e) === "Symbol", iu = (e) => e instanceof Date && !isNaN(e.valueOf()), lu = (e) => e instanceof Error, zs = (e) => typeof e == "number" && isNaN(e), ou = (e) => ru(e) || tu(e) || ha(e) || su(e) || nu(e) || ma(e), cu = (e) => typeof e == "bigint", uu = (e) => e === 1 / 0 || e === -1 / 0, du = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), hu = (e) => e instanceof URL, fa = (e) => e.replace(/\./g, "\\."), $n = (e) => e.map(String).map(fa).join("."), Bt = (e) => {
6848
6856
  const t = [];
6849
6857
  let n = "";
6850
6858
  for (let a = 0; a < e.length; a++) {
@@ -6873,9 +6881,9 @@ function ze(e, t, n, s) {
6873
6881
  var ga = [
6874
6882
  ze(ha, "undefined", () => null, () => {
6875
6883
  }),
6876
- ze(lu, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
6877
- ze(ru, "Date", (e) => e.toISOString(), (e) => new Date(e)),
6878
- ze(au, "Error", (e, t) => {
6884
+ ze(cu, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
6885
+ ze(iu, "Date", (e) => e.toISOString(), (e) => new Date(e)),
6886
+ ze(lu, "Error", (e, t) => {
6879
6887
  const n = {
6880
6888
  name: e.name,
6881
6889
  message: e.message
@@ -6889,7 +6897,7 @@ var ga = [
6889
6897
  n[s] = e[s];
6890
6898
  }), n;
6891
6899
  }),
6892
- ze(su, "regexp", (e) => "" + e, (e) => {
6900
+ ze(au, "regexp", (e) => "" + e, (e) => {
6893
6901
  const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
6894
6902
  return new RegExp(t, n);
6895
6903
  }),
@@ -6902,9 +6910,9 @@ var ga = [
6902
6910
  (e) => new Set(e)
6903
6911
  ),
6904
6912
  ze(jt, "map", (e) => [...e.entries()], (e) => new Map(e)),
6905
- ze((e) => zs(e) || ou(e), "number", (e) => zs(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
6913
+ ze((e) => zs(e) || uu(e), "number", (e) => zs(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
6906
6914
  ze((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
6907
- ze(uu, "URL", (e) => e.toString(), (e) => new URL(e))
6915
+ ze(hu, "URL", (e) => e.toString(), (e) => new URL(e))
6908
6916
  ];
6909
6917
  function Mn(e, t, n, s) {
6910
6918
  return {
@@ -6919,7 +6927,7 @@ var pa = Mn((e, t) => ma(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
6919
6927
  if (!s)
6920
6928
  throw new Error("Trying to deserialize unknown symbol");
6921
6929
  return s;
6922
- }), du = [
6930
+ }), mu = [
6923
6931
  Int8Array,
6924
6932
  Uint8Array,
6925
6933
  Int16Array,
@@ -6929,8 +6937,8 @@ var pa = Mn((e, t) => ma(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
6929
6937
  Float32Array,
6930
6938
  Float64Array,
6931
6939
  Uint8ClampedArray
6932
- ].reduce((e, t) => (e[t.name] = t, e), {}), ya = Mn(cu, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
6933
- const n = du[t[1]];
6940
+ ].reduce((e, t) => (e[t.name] = t, e), {}), ya = Mn(du, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
6941
+ const n = mu[t[1]];
6934
6942
  if (!n)
6935
6943
  throw new Error("Trying to deserialize unknown typed array");
6936
6944
  return new n(e);
@@ -6956,8 +6964,8 @@ var Ea = Mn(va, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
6956
6964
  if (!s)
6957
6965
  throw new Error("Trying to deserialize unknown custom value");
6958
6966
  return s.deserialize(e);
6959
- }), hu = [Ea, pa, ba, ya], Ws = (e, t) => {
6960
- const n = $s(hu, (a) => a.isApplicable(e, t));
6967
+ }), fu = [Ea, pa, ba, ya], Ws = (e, t) => {
6968
+ const n = $s(fu, (a) => a.isApplicable(e, t));
6961
6969
  if (n)
6962
6970
  return {
6963
6971
  value: n.transform(e, t),
@@ -6973,8 +6981,8 @@ var Ea = Mn(va, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
6973
6981
  ga.forEach((e) => {
6974
6982
  wa[e.annotation] = e;
6975
6983
  });
6976
- var mu = (e, t, n) => {
6977
- if (nt(t))
6984
+ var gu = (e, t, n) => {
6985
+ if (st(t))
6978
6986
  switch (t[0]) {
6979
6987
  case "symbol":
6980
6988
  return pa.untransform(e, t, n);
@@ -7007,7 +7015,7 @@ function Sa(e) {
7007
7015
  if (xn(e, "constructor"))
7008
7016
  throw new Error("constructor is not allowed as a property");
7009
7017
  }
7010
- var fu = (e, t) => {
7018
+ var pu = (e, t) => {
7011
7019
  Sa(t);
7012
7020
  for (let n = 0; n < t.length; n++) {
7013
7021
  const s = t[n];
@@ -7033,7 +7041,7 @@ var fu = (e, t) => {
7033
7041
  let s = e;
7034
7042
  for (let i = 0; i < t.length - 1; i++) {
7035
7043
  const l = t[i];
7036
- if (nt(s)) {
7044
+ if (st(s)) {
7037
7045
  const o = +l;
7038
7046
  s = s[o];
7039
7047
  } else if (Kt(s))
@@ -7056,7 +7064,7 @@ var fu = (e, t) => {
7056
7064
  }
7057
7065
  }
7058
7066
  const a = t[t.length - 1];
7059
- if (nt(s) ? s[+a] = n(s[+a]) : Kt(s) && (s[a] = n(s[a])), Vt(s)) {
7067
+ if (st(s) ? s[+a] = n(s[+a]) : Kt(s) && (s[a] = n(s[a])), Vt(s)) {
7060
7068
  const i = ft(s, +a), l = n(i);
7061
7069
  i !== l && (s.delete(i), s.add(l));
7062
7070
  }
@@ -7079,7 +7087,7 @@ var fu = (e, t) => {
7079
7087
  function rs(e, t, n = []) {
7080
7088
  if (!e)
7081
7089
  return;
7082
- if (!nt(e)) {
7090
+ if (!st(e)) {
7083
7091
  kt(e, (i, l) => rs(i, t, [...n, ...Bt(l)]));
7084
7092
  return;
7085
7093
  }
@@ -7088,19 +7096,19 @@ function rs(e, t, n = []) {
7088
7096
  rs(i, t, [...n, ...Bt(l)]);
7089
7097
  }), t(s, n);
7090
7098
  }
7091
- function gu(e, t, n) {
7099
+ function yu(e, t, n) {
7092
7100
  return rs(t, (s, a) => {
7093
- e = ss(e, a, (i) => mu(i, s, n));
7101
+ e = ss(e, a, (i) => gu(i, s, n));
7094
7102
  }), e;
7095
7103
  }
7096
- function pu(e, t) {
7104
+ function vu(e, t) {
7097
7105
  function n(s, a) {
7098
- const i = fu(e, Bt(a));
7106
+ const i = pu(e, Bt(a));
7099
7107
  s.map(Bt).forEach((l) => {
7100
7108
  e = ss(e, l, () => i);
7101
7109
  });
7102
7110
  }
7103
- if (nt(t)) {
7111
+ if (st(t)) {
7104
7112
  const [s, a] = t;
7105
7113
  s.forEach((i) => {
7106
7114
  e = ss(e, Bt(i), () => e);
@@ -7109,12 +7117,12 @@ function pu(e, t) {
7109
7117
  kt(t, n);
7110
7118
  return e;
7111
7119
  }
7112
- var yu = (e, t) => Kt(e) || nt(e) || jt(e) || Vt(e) || va(e, t);
7113
- function vu(e, t, n) {
7120
+ var Eu = (e, t) => Kt(e) || st(e) || jt(e) || Vt(e) || va(e, t);
7121
+ function bu(e, t, n) {
7114
7122
  const s = n.get(e);
7115
7123
  s ? s.push(t) : n.set(e, [t]);
7116
7124
  }
7117
- function Eu(e, t) {
7125
+ function wu(e, t) {
7118
7126
  const n = {};
7119
7127
  let s;
7120
7128
  return e.forEach((a) => {
@@ -7126,16 +7134,16 @@ function Eu(e, t) {
7126
7134
  }), s ? ns(n) ? [s] : [s, n] : ns(n) ? void 0 : n;
7127
7135
  }
7128
7136
  var Na = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7129
- const o = iu(e);
7137
+ const o = ou(e);
7130
7138
  if (!o) {
7131
- vu(e, a, t);
7139
+ bu(e, a, t);
7132
7140
  const y = l.get(e);
7133
7141
  if (y)
7134
7142
  return s ? {
7135
7143
  transformedValue: null
7136
7144
  } : y;
7137
7145
  }
7138
- if (!yu(e, n)) {
7146
+ if (!Eu(e, n)) {
7139
7147
  const y = Ws(e, n), p = y ? {
7140
7148
  transformedValue: y.value,
7141
7149
  annotations: [y.type]
@@ -7148,12 +7156,12 @@ var Na = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7148
7156
  return {
7149
7157
  transformedValue: null
7150
7158
  };
7151
- const c = Ws(e, n), h = (c == null ? void 0 : c.value) ?? e, g = nt(h) ? [] : {}, d = {};
7159
+ const c = Ws(e, n), h = (c == null ? void 0 : c.value) ?? e, g = st(h) ? [] : {}, d = {};
7152
7160
  kt(h, (y, p) => {
7153
7161
  if (p === "__proto__" || p === "constructor" || p === "prototype")
7154
7162
  throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
7155
7163
  const S = Na(y, t, n, s, [...a, p], [...i, e], l);
7156
- g[p] = S.transformedValue, nt(S.annotations) ? d[p] = S.annotations : Kt(S.annotations) && kt(S.annotations, (v, x) => {
7164
+ g[p] = S.transformedValue, st(S.annotations) ? d[p] = S.annotations : Kt(S.annotations) && kt(S.annotations, (v, x) => {
7157
7165
  d[fa(p) + "." + x] = v;
7158
7166
  });
7159
7167
  });
@@ -7172,13 +7180,13 @@ function Aa(e) {
7172
7180
  function Ys(e) {
7173
7181
  return Aa(e) === "Array";
7174
7182
  }
7175
- function bu(e) {
7183
+ function Su(e) {
7176
7184
  if (Aa(e) !== "Object")
7177
7185
  return !1;
7178
7186
  const t = Object.getPrototypeOf(e);
7179
7187
  return !!t && t.constructor === Object && t === Object.prototype;
7180
7188
  }
7181
- function wu(e, t, n, s, a) {
7189
+ function Nu(e, t, n, s, a) {
7182
7190
  const i = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
7183
7191
  i === "enumerable" && (e[t] = n), a && i === "nonenumerable" && Object.defineProperty(e, t, {
7184
7192
  value: n,
@@ -7190,14 +7198,14 @@ function wu(e, t, n, s, a) {
7190
7198
  function as(e, t = {}) {
7191
7199
  if (Ys(e))
7192
7200
  return e.map((a) => as(a, t));
7193
- if (!bu(e))
7201
+ if (!Su(e))
7194
7202
  return e;
7195
7203
  const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
7196
7204
  return [...n, ...s].reduce((a, i) => {
7197
7205
  if (Ys(t.props) && !t.props.includes(i))
7198
7206
  return a;
7199
7207
  const l = e[i], o = as(l, t);
7200
- return wu(a, i, o, e, t.nonenumerable), a;
7208
+ return Nu(a, i, o, e, t.nonenumerable), a;
7201
7209
  }, {});
7202
7210
  }
7203
7211
  var ie = class {
@@ -7205,7 +7213,7 @@ var ie = class {
7205
7213
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
7206
7214
  */
7207
7215
  constructor({ dedupe: e = !1 } = {}) {
7208
- this.classRegistry = new Wc(), this.symbolRegistry = new da((t) => t.description ?? ""), this.customTransformerRegistry = new Xc(), this.allowedErrorProps = [], this.dedupe = e;
7216
+ this.classRegistry = new Qc(), this.symbolRegistry = new da((t) => t.description ?? ""), this.customTransformerRegistry = new Jc(), this.allowedErrorProps = [], this.dedupe = e;
7209
7217
  }
7210
7218
  serialize(e) {
7211
7219
  const t = /* @__PURE__ */ new Map(), n = Na(e, t, this, this.dedupe), s = {
@@ -7215,7 +7223,7 @@ var ie = class {
7215
7223
  ...s.meta,
7216
7224
  values: n.annotations
7217
7225
  });
7218
- const a = Eu(t, this.dedupe);
7226
+ const a = wu(t, this.dedupe);
7219
7227
  return a && (s.meta = {
7220
7228
  ...s.meta,
7221
7229
  referentialEqualities: a
@@ -7224,7 +7232,7 @@ var ie = class {
7224
7232
  deserialize(e) {
7225
7233
  const { json: t, meta: n } = e;
7226
7234
  let s = as(t);
7227
- return n != null && n.values && (s = gu(s, n.values, this)), n != null && n.referentialEqualities && (s = pu(s, n.referentialEqualities)), s;
7235
+ return n != null && n.values && (s = yu(s, n.values, this)), n != null && n.referentialEqualities && (s = vu(s, n.referentialEqualities)), s;
7228
7236
  }
7229
7237
  stringify(e) {
7230
7238
  return JSON.stringify(this.serialize(e));
@@ -7257,44 +7265,44 @@ ie.registerClass = ie.defaultInstance.registerClass.bind(ie.defaultInstance);
7257
7265
  ie.registerSymbol = ie.defaultInstance.registerSymbol.bind(ie.defaultInstance);
7258
7266
  ie.registerCustom = ie.defaultInstance.registerCustom.bind(ie.defaultInstance);
7259
7267
  ie.allowErrorProps = ie.defaultInstance.allowErrorProps.bind(ie.defaultInstance);
7260
- var Su = ie.serialize, md = ie.stringify;
7261
- function fd(e) {
7268
+ var Au = ie.serialize, gd = ie.stringify;
7269
+ function pd(e) {
7262
7270
  return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
7263
7271
  }
7264
- function gd(e, t) {
7272
+ function yd(e, t) {
7265
7273
  return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
7266
7274
  }
7267
- function pd({
7275
+ function vd({
7268
7276
  queryState: e,
7269
7277
  observerCount: t,
7270
7278
  isStale: n
7271
7279
  }) {
7272
7280
  return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
7273
7281
  }
7274
- function yd({
7282
+ function Ed({
7275
7283
  status: e,
7276
7284
  isPaused: t
7277
7285
  }) {
7278
7286
  return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
7279
7287
  }
7280
- function vd(e) {
7288
+ function bd(e) {
7281
7289
  return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
7282
7290
  }
7283
- var Ed = (e, t = !1) => {
7291
+ var wd = (e, t = !1) => {
7284
7292
  const {
7285
7293
  json: n
7286
- } = Su(e);
7294
+ } = Au(e);
7287
7295
  return JSON.stringify(n, null, t ? 2 : void 0);
7288
- }, En = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, Nu = (e, t) => e.queryHash.localeCompare(t.queryHash), xa = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, Au = (e, t) => En(e) === En(t) ? xa(e, t) : En(e) > En(t) ? 1 : -1, bd = {
7289
- status: Au,
7290
- "query hash": Nu,
7296
+ }, En = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, xu = (e, t) => e.queryHash.localeCompare(t.queryHash), xa = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, Tu = (e, t) => En(e) === En(t) ? xa(e, t) : En(e) > En(t) ? 1 : -1, Sd = {
7297
+ status: Tu,
7298
+ "query hash": xu,
7291
7299
  "last updated": xa
7292
- }, bn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Ta = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, xu = (e, t) => bn(e) === bn(t) ? Ta(e, t) : bn(e) > bn(t) ? 1 : -1, wd = {
7293
- status: xu,
7300
+ }, bn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Ta = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Cu = (e, t) => bn(e) === bn(t) ? Ta(e, t) : bn(e) > bn(t) ? 1 : -1, Nd = {
7301
+ status: Cu,
7294
7302
  "last updated": Ta
7295
- }, Sd = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Nd = () => {
7303
+ }, Ad = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), xd = () => {
7296
7304
  const [e, t] = Ee("dark");
7297
- return cc(() => {
7305
+ return dc(() => {
7298
7306
  const n = window.matchMedia("(prefers-color-scheme: dark)");
7299
7307
  t(n.matches ? "dark" : "light");
7300
7308
  const s = (a) => {
@@ -7367,7 +7375,7 @@ var Ed = (e, t = !1) => {
7367
7375
  return;
7368
7376
  const s = document.createElement("style"), a = document.createTextNode("");
7369
7377
  s.appendChild(a), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
7370
- }, gt, $t, zt, Wt, it, Yt, pt, yt, vt, Et, bt, wt, Qt, Qs, Tu = (Qs = class {
7378
+ }, gt, $t, zt, Wt, it, Yt, pt, yt, vt, Et, bt, wt, Qt, Qs, Pu = (Qs = class {
7371
7379
  constructor(e) {
7372
7380
  re(this, gt);
7373
7381
  re(this, $t);
@@ -7417,7 +7425,7 @@ var Ed = (e, t = !1) => {
7417
7425
  const t = oa(() => {
7418
7426
  const n = this, [s] = R(this, yt), [a] = R(this, vt), [i] = R(this, Et), [l] = R(this, bt), [o] = R(this, gt);
7419
7427
  let c;
7420
- return R(this, wt) ? c = R(this, wt) : (c = ia(() => import("./HO4MOOFI-Be7ATNM5.js")), te(this, wt, c)), Ca(R(this, Yt), R(this, pt)), ra(c, aa({
7428
+ return R(this, wt) ? c = R(this, wt) : (c = ia(() => import("./HO4MOOFI-SP-gIdLE.js")), te(this, wt, c)), Ca(R(this, Yt), R(this, pt)), ra(c, aa({
7421
7429
  get queryFlavor() {
7422
7430
  return R(n, zt);
7423
7431
  },
@@ -7456,7 +7464,7 @@ var Ed = (e, t = !1) => {
7456
7464
  throw new Error("Devtools is not mounted");
7457
7465
  (e = R(this, Qt)) == null || e.call(this), te(this, it, !1);
7458
7466
  }
7459
- }, gt = new WeakMap(), $t = new WeakMap(), zt = new WeakMap(), Wt = new WeakMap(), it = new WeakMap(), Yt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), vt = new WeakMap(), Et = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), Qt = new WeakMap(), Qs), St, Xt, Zt, Jt, lt, en, Nt, At, xt, Tt, Ct, Pt, _t, tn, Xs, Cu = (Xs = class {
7467
+ }, gt = new WeakMap(), $t = new WeakMap(), zt = new WeakMap(), Wt = new WeakMap(), it = new WeakMap(), Yt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), vt = new WeakMap(), Et = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), Qt = new WeakMap(), Qs), St, Xt, Zt, Jt, lt, en, Nt, At, xt, Tt, Ct, Pt, _t, tn, Xs, _u = (Xs = class {
7460
7468
  constructor(e) {
7461
7469
  re(this, St);
7462
7470
  re(this, Xt);
@@ -7511,7 +7519,7 @@ var Ed = (e, t = !1) => {
7511
7519
  const t = oa(() => {
7512
7520
  const n = this, [s] = R(this, At), [a] = R(this, xt), [i] = R(this, Tt), [l] = R(this, Ct), [o] = R(this, St), [c] = R(this, Pt);
7513
7521
  let h;
7514
- return R(this, _t) ? h = R(this, _t) : (h = ia(() => import("./HUY7CZI3-DjUkpQI6.js")), te(this, _t, h)), Ca(R(this, en), R(this, Nt)), ra(h, aa({
7522
+ return R(this, _t) ? h = R(this, _t) : (h = ia(() => import("./HUY7CZI3-BrEPS_Ge.js")), te(this, _t, h)), Ca(R(this, en), R(this, Nt)), ra(h, aa({
7515
7523
  get queryFlavor() {
7516
7524
  return R(n, Zt);
7517
7525
  },
@@ -7554,7 +7562,7 @@ var Ed = (e, t = !1) => {
7554
7562
  (e = R(this, tn)) == null || e.call(this), te(this, lt, !1);
7555
7563
  }
7556
7564
  }, St = new WeakMap(), Xt = new WeakMap(), Zt = new WeakMap(), Jt = new WeakMap(), lt = new WeakMap(), en = new WeakMap(), Nt = new WeakMap(), At = new WeakMap(), xt = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), _t = new WeakMap(), tn = new WeakMap(), Xs);
7557
- function Pu(e) {
7565
+ function Iu(e) {
7558
7566
  const t = Ne(e.client), n = ue.useRef(null), {
7559
7567
  buttonPosition: s,
7560
7568
  position: a,
@@ -7563,7 +7571,7 @@ function Pu(e) {
7563
7571
  styleNonce: o,
7564
7572
  shadowDOMTarget: c
7565
7573
  } = e, [h] = ue.useState(
7566
- new Tu({
7574
+ new Pu({
7567
7575
  client: t,
7568
7576
  queryFlavor: "React Query",
7569
7577
  version: "5",
@@ -7590,9 +7598,9 @@ function Pu(e) {
7590
7598
  h.unmount();
7591
7599
  }), [h]), /* @__PURE__ */ r("div", { className: "tsqd-parent-container", ref: n });
7592
7600
  }
7593
- function _u(e) {
7601
+ function ku(e) {
7594
7602
  const t = Ne(e.client), n = ue.useRef(null), { errorTypes: s, styleNonce: a, shadowDOMTarget: i } = e, [l] = ue.useState(
7595
- new Cu({
7603
+ new _u({
7596
7604
  client: t,
7597
7605
  queryFlavor: "React Query",
7598
7606
  version: "5",
@@ -7624,33 +7632,33 @@ function _u(e) {
7624
7632
  }
7625
7633
  );
7626
7634
  }
7627
- var Iu = process.env.NODE_ENV !== "development" ? function() {
7635
+ var Lu = process.env.NODE_ENV !== "development" ? function() {
7628
7636
  return null;
7629
- } : Pu;
7637
+ } : Iu;
7630
7638
  process.env.NODE_ENV;
7631
- const ku = Qa(
7632
- () => import("./digital-asset-manager-ZaGekAia.js")
7639
+ const Du = Za(
7640
+ () => import("./digital-asset-manager-DJC2nCxu.js")
7633
7641
  );
7634
- ul();
7635
- ec();
7636
- ci(Oo);
7637
- ui(ku);
7638
- di(Bl);
7639
- zn("user-info", sc);
7640
- const Lu = (e) => {
7642
+ hl();
7643
+ nc();
7644
+ di(Mo);
7645
+ hi(Du);
7646
+ mi(Fl);
7647
+ zn("user-info", ac);
7648
+ const Gu = (e) => {
7641
7649
  const t = ut([]), [n] = Ue(), s = n.get("page"), a = n.get("lang"), { data: i } = Re(), {
7642
7650
  data: l = {
7643
7651
  role: "",
7644
7652
  permissions: null
7645
7653
  }
7646
- } = Ho(), { data: o } = qo(), { data: c, isFetching: h } = Mr(), { blocks: g } = Fo(c), { data: d } = un(), { data: E } = ke(), { mutateAsync: y } = Rr(), p = Bo(), { getUILibraryBlock: S, getUILibraryBlocks: v, onSave: x } = Ko(), { getPartialBlocks: U, getPartialBlockBlocks: b } = jo(), { aiContext: w, setAiContext: T } = bs(), { mutateAsync: D } = ql(), [ee, le] = P(!1), k = z(
7654
+ } = jo(), { data: o } = Ko(), { data: c, isFetching: h } = Mr(), { blocks: g } = Ho(c), { data: d } = un(), { data: E } = ke(), { mutateAsync: y } = Rr(), p = Fo(), { getUILibraryBlock: S, getUILibraryBlocks: v, onSave: x } = Vo(), { getPartialBlocks: U, getPartialBlockBlocks: b } = $o(), { aiContext: w, setAiContext: T } = bs(), { mutateAsync: D } = Kl(), [ee, le] = P(!1), k = z(
7647
7655
  () => (d == null ? void 0 : d.fallbackLang) || "en",
7648
7656
  [d]
7649
7657
  ), { data: q } = Fr({
7650
7658
  pageType: i == null ? void 0 : i.pageType,
7651
7659
  lang: a || k
7652
7660
  });
7653
- Nl(), Se(() => {
7661
+ xl(), Se(() => {
7654
7662
  const Y = () => {
7655
7663
  document.hidden ? le(!0) : le(!1);
7656
7664
  };
@@ -7669,7 +7677,7 @@ const Lu = (e) => {
7669
7677
  return /* @__PURE__ */ u(we, { children: [
7670
7678
  h && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-50 flex items-center justify-center w-screen h-screen bg-white/30", children: /* @__PURE__ */ r("div", { className: "flex items-center justify-center bg-white rounded-full size-10", children: /* @__PURE__ */ r(Gr, { className: "size-5 animate-spin" }) }) }),
7671
7679
  /* @__PURE__ */ r(
7672
- hi,
7680
+ fi,
7673
7681
  {
7674
7682
  pageExternalData: q,
7675
7683
  themePresets: e.themePresets ?? [],
@@ -7687,7 +7695,7 @@ const Lu = (e) => {
7687
7695
  getPartialBlockBlocks: b,
7688
7696
  getPartialBlocks: U,
7689
7697
  blocks: h ? [] : g,
7690
- theme: Wa(fe),
7698
+ theme: Qa(fe),
7691
7699
  getUILibraryBlock: S,
7692
7700
  getUILibraryBlocks: v,
7693
7701
  uiLibraries: M,
@@ -7712,24 +7720,24 @@ const Lu = (e) => {
7712
7720
  }, be = [...Y, F];
7713
7721
  return await x({ page: s, blocks: be }), t.current = be, is(he, fe) || await y({ settings: { theme: he } }), !0;
7714
7722
  },
7715
- themePanelComponent: Ql,
7723
+ themePanelComponent: Zl,
7716
7724
  ...A
7717
7725
  }
7718
7726
  ),
7719
7727
  /* @__PURE__ */ u("div", { children: [
7720
- /* @__PURE__ */ r(Cl, {}),
7721
- /* @__PURE__ */ r(Pl, {})
7728
+ /* @__PURE__ */ r(_l, {}),
7729
+ /* @__PURE__ */ r(Il, {})
7722
7730
  ] })
7723
7731
  ] });
7724
- }, Du = new Xa({
7732
+ }, Uu = new Ja({
7725
7733
  defaultOptions: {
7726
7734
  queries: {
7727
7735
  refetchOnWindowFocus: !1,
7728
7736
  refetchOnReconnect: !1
7729
7737
  }
7730
7738
  }
7731
- }), Ad = (e) => {
7732
- const { isLoggedIn: t } = st(), [, n] = Or(), [s, a] = P(!1);
7739
+ }), Td = (e) => {
7740
+ const { isLoggedIn: t } = rt(), [, n] = Or(), [s, a] = P(!1);
7733
7741
  return Se(() => (n(
7734
7742
  er(e, [
7735
7743
  "apiUrl",
@@ -7743,76 +7751,76 @@ const Lu = (e) => {
7743
7751
  a(!0);
7744
7752
  }, 200), () => {
7745
7753
  a(!1), n({});
7746
- }), [e, n]), s ? /* @__PURE__ */ u(Za, { client: Du, children: [
7747
- t ? /* @__PURE__ */ r(Lu, { ...e }) : /* @__PURE__ */ r(zo, {}),
7748
- /* @__PURE__ */ r(Iu, {})
7754
+ }), [e, n]), s ? /* @__PURE__ */ u(ei, { client: Uu, children: [
7755
+ t ? /* @__PURE__ */ r(Gu, { ...e }) : /* @__PURE__ */ r(Yo, {}),
7756
+ /* @__PURE__ */ r(Lu, {})
7749
7757
  ] }) : /* @__PURE__ */ r("div", {});
7750
7758
  };
7751
7759
  if (typeof window > "u")
7752
7760
  throw new Error("@chaibuilder/pages is not available on the server");
7753
7761
  export {
7754
7762
  Yr as $,
7755
- Ed as A,
7756
- Xu as B,
7757
- ud as C,
7758
- hd as D,
7763
+ wd as A,
7764
+ Ju as B,
7765
+ hd as C,
7766
+ fd as D,
7759
7767
  _e as E,
7760
- rd as F,
7761
- ic as G,
7762
- Su as H,
7763
- ad as I,
7768
+ id as F,
7769
+ oc as G,
7770
+ Au as H,
7771
+ ld as I,
7764
7772
  wn as J,
7765
- Sd as K,
7766
- gd as L,
7767
- fd as M,
7773
+ Ad as K,
7774
+ yd as L,
7775
+ pd as M,
7768
7776
  ot as N,
7769
- Oc as O,
7770
- dd as P,
7771
- md as Q,
7772
- od as R,
7773
- id as S,
7774
- ld as T,
7777
+ Mc as O,
7778
+ md as P,
7779
+ gd as Q,
7780
+ ud as R,
7781
+ od as S,
7782
+ cd as T,
7775
7783
  Sn as U,
7776
- ed as V,
7777
- Yu as W,
7784
+ nd as V,
7785
+ Xu as W,
7778
7786
  W as X,
7779
7787
  I as Y,
7780
7788
  j as Z,
7781
- Ad as _,
7789
+ Td as _,
7782
7790
  ra as a,
7783
7791
  Oe as a0,
7784
- Qu as a1,
7792
+ Zu as a1,
7785
7793
  Re as a2,
7786
7794
  cn as a3,
7787
7795
  Rn as a4,
7788
7796
  un as a5,
7789
- st as a6,
7790
- Ho as a7,
7791
- Wu as a8,
7797
+ rt as a6,
7798
+ jo as a7,
7799
+ Qu as a8,
7792
7800
  dn as a9,
7793
7801
  Ee as b,
7794
7802
  Ge as c,
7795
- Dc as d,
7803
+ Uc as d,
7796
7804
  Zr as e,
7797
7805
  aa as f,
7798
- Nd as g,
7799
- wc as h,
7800
- td as i,
7806
+ xd as g,
7807
+ Nc as h,
7808
+ sd as i,
7801
7809
  ct as j,
7802
7810
  Jn as k,
7803
- sd as l,
7804
- wd as m,
7811
+ ad as l,
7812
+ Nd as m,
7805
7813
  Ft as n,
7806
- Zu as o,
7807
- cc as p,
7808
- qc as q,
7814
+ ed as o,
7815
+ dc as p,
7816
+ Kc as q,
7809
7817
  es as r,
7810
- bd as s,
7811
- cd as t,
7812
- nd as u,
7813
- Rc as v,
7814
- pd as w,
7815
- yd as x,
7816
- Fc as y,
7817
- vd as z
7818
+ Sd as s,
7819
+ dd as t,
7820
+ rd as u,
7821
+ Bc as v,
7822
+ vd as w,
7823
+ Ed as x,
7824
+ Hc as y,
7825
+ bd as z
7818
7826
  };