@chaibuilder/pages 0.4.9-beta.3 → 0.4.9-beta.5

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.
@@ -1,18 +1,18 @@
1
- var Is = (e) => {
1
+ var ks = (e) => {
2
2
  throw TypeError(e);
3
3
  };
4
- var ks = (e, t, n) => t.has(e) || Is("Cannot " + n);
5
- var R = (e, t, n) => (ks(e, t, "read from private field"), n ? n.call(e) : t.get(e)), re = (e, t, n) => t.has(e) ? Is("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), te = (e, t, n, s) => (ks(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
4
+ var Ls = (e, t, n) => t.has(e) || ks("Cannot " + n);
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 { noop as Ra, isFunction as Oa, get as ne, isEmpty as me, reverse as Ba, sortBy as Ma, each as Fa, find as ge, set as qa, has as nn, startsWith as Rt, isEqual as as, map as Fe, toLower as Dt, trim as Ha, filter as Ce, startCase as It, groupBy as Ka, compact as Nn, includes as Mt, concat as Xs, endsWith as Zs, orderBy as mn, first as Va, uniq as ja, debounce as $a, pick as Js, keys as za, pickBy as Wa, isArray as Ya, cloneDeep as Qa, isString as Ls } from "lodash-es";
8
- import { useAtom as Dn, atom as is } from "jotai";
7
+ import { isFunction as Ra, noop as Oa, get as ne, isEmpty as me, reverse as Ba, sortBy as Ma, each as Fa, find as ge, set as qa, has as nn, startsWith as Rt, isEqual as is, map as Fe, toLower as Dt, trim as Ha, filter as Ce, startCase as It, groupBy as Ka, compact as Nn, includes as Mt, concat as Zs, endsWith as Js, orderBy as mn, first as Va, uniq as ja, debounce as $a, pick as er, keys as za, pickBy as Wa, isArray as Ya, cloneDeep as Qa, isString as Ds } from "lodash-es";
8
+ import { useAtom as Dn, atom as ls } from "jotai";
9
9
  import * as ue from "react";
10
- import er, { useMemo as Y, useCallback as Ie, useState as P, useEffect as Se, useRef as ut, Suspense as Xa, lazy as Za } from "react";
11
- import { useQueryClient as Ne, useQuery as Ae, useMutation as xe, onlineManager as tr, QueryClient as Ja, QueryClientProvider as ei } from "@tanstack/react-query";
10
+ import tr, { useCallback as Pe, useMemo as Y, useState as P, useEffect as Se, useRef as ut, Suspense as Xa, lazy as Za } from "react";
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 nr, PERMISSIONS as ti, usePartailBlocksStore as ni, usePermissions as sn, useLibraryBlocks as si, useTheme as ri, mergeClasses as ai, useSavePage as sr, 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 ls, CardHeader as os, CardTitle as cs, CardContent as us, CardFooter as ds, Button as _, AlertDialog as rr, AlertDialogTrigger as ar, AlertDialogContent as ir, AlertDialogHeader as lr, AlertDialogTitle as or, AlertDialogDescription as cr, AlertDialogFooter as ur, AlertDialogCancel as dr, AlertDialogAction as hr, Popover as mr, PopoverTrigger as fr, PopoverContent as gr, Input as ve, Label as Z, Dialog as He, DialogContent as Ke, DialogHeader as Ve, DialogTitle as je, DialogDescription as Ye, Alert as pr, 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 yr, SheetContent as vr, SheetHeader as Er, SheetTitle as br, Separator as bi, TooltipProvider as wr, Tooltip as hs, SheetTrigger as wi, TooltipTrigger as ms, ScrollArea as Si, TooltipContent as fs, 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 Ds, 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 Sr, UserIcon as Ui, AlertTriangleIcon as Ri, Trash2 as Nr, Plus as gs, ImageIcon as Ar, X as xr, AlertCircle as Tr, StarIcon as Oi, MoreHorizontal as ps, PencilIcon as Bi, Power as Cr, TrashIcon as Mi, Tag as Fi, File as on, Search as qi, StarsIcon as Hi, Globe as Ki, Pencil as Vi, Trash as ys, SquareLibrary as Gs, Logs as ji, Loader as Pr, Languages as $i, ChevronDown as _r, Star as zi, History as Us, ArrowUpRight as Wi, Clock as Yi, Undo2 as Ir, CloudOff as Qi, Edit as Xi, Save as kr, GlobeIcon as Zi, Eye as Lr, Palette as Ji, CheckCircle as el, Send as Rs, Rocket as Os, Settings as tl, ExternalLink as nl, EyeOff as sl, Loader2 as Dr, LanguagesIcon as rl, DatabaseIcon as al, ChevronLeft as il, ChevronRight as ll, User as ol } from "lucide-react";
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 Ve, DialogTitle as je, 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 Vi, Trash as vs, SquareLibrary as Us, Logs as ji, 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
16
  import { format as Gn, formatDistanceToNow as cl } from "date-fns";
17
17
  import { useRegisteredChaiBlocks as ul, getDefaultBlockProps as dl } from "@chaibuilder/runtime";
18
18
  import { z as An } from "zod";
@@ -254,7 +254,7 @@ const qe = {
254
254
  GET_ASSETS: "GET_ASSETS"
255
255
  }, V = "chaibuilder";
256
256
  let ml = 0;
257
- function Bs(e, t) {
257
+ function Ms(e, t) {
258
258
  const n = `atom${++ml}`, s = {
259
259
  toString() {
260
260
  return n;
@@ -338,14 +338,14 @@ function vl(e = () => {
338
338
  }
339
339
  const El = vl();
340
340
  function bl(e, t, n = El, s) {
341
- const a = Bs(
341
+ const a = Ms(
342
342
  t
343
343
  );
344
344
  return a.onMount = (l) => {
345
345
  l(n.getItem(e, t));
346
346
  let o;
347
347
  return n.subscribe && (o = n.subscribe(e, l, t)), o;
348
- }, Bs(
348
+ }, Ms(
349
349
  (l) => l(a),
350
350
  (l, o, c) => {
351
351
  const h = typeof c == "function" ? c(l(a)) : c;
@@ -353,15 +353,15 @@ function bl(e, t, n = El, s) {
353
353
  }
354
354
  );
355
355
  }
356
- const wl = bl("__chai_user", null), rt = () => {
357
- const [e, t] = Dn(wl), n = tt("onLogout", Ra);
356
+ const wl = bl("__chai__user", null), rt = () => {
357
+ const [e, t] = Dn(wl), n = tt("onLogout", Oa), s = Pe(() => {
358
+ t(null), Ra(n) && n();
359
+ }, [n, t]);
358
360
  return {
359
361
  isLoggedIn: !!e,
360
362
  user: e,
361
363
  setUser: t,
362
- logout: () => {
363
- t(null), Oa(n) && n();
364
- }
364
+ logout: s
365
365
  };
366
366
  }, Sl = () => {
367
367
  const { user: e, setUser: t, logout: n } = rt(), s = Un(), a = Ne();
@@ -394,7 +394,7 @@ const wl = bl("__chai_user", null), rt = () => {
394
394
  retry: !1,
395
395
  enabled: !1
396
396
  });
397
- }, vs = async (e, t, n = {}) => await fetch(e, {
397
+ }, Es = async (e, t, n = {}) => await fetch(e, {
398
398
  method: "POST",
399
399
  headers: {
400
400
  "Content-Type": "application/json",
@@ -405,7 +405,7 @@ const wl = bl("__chai_user", null), rt = () => {
405
405
  if (import.meta.vitest) {
406
406
  const { it: e, expect: t } = import.meta.vitest;
407
407
  e("should fetch API", async () => {
408
- const n = await vs("/v1/api/chai", {
408
+ const n = await Es("/v1/api/chai", {
409
409
  action: "test"
410
410
  });
411
411
  t(n).toBeDefined();
@@ -416,7 +416,7 @@ const Qu = () => {
416
416
  () => e == null ? void 0 : e.accessToken,
417
417
  [e == null ? void 0 : e.accessToken]
418
418
  );
419
- return Ie(
419
+ return Pe(
420
420
  async (s, a, i = {}) => {
421
421
  if (!n) {
422
422
  console.log("no auth token");
@@ -448,11 +448,11 @@ const Qu = () => {
448
448
  () => e == null ? void 0 : e.accessToken,
449
449
  [e == null ? void 0 : e.accessToken]
450
450
  ), { refetch: n } = Sl();
451
- return Ie(
451
+ return Pe(
452
452
  async (s, a, i = {}) => {
453
453
  if (t)
454
454
  try {
455
- const l = ne(a, "action", "").toLowerCase(), o = await vs(
455
+ const l = ne(a, "action", "").toLowerCase(), o = await Es(
456
456
  s + (l ? `?action=${l}` : ""),
457
457
  a,
458
458
  {
@@ -469,7 +469,7 @@ const Qu = () => {
469
469
  },
470
470
  [t, n]
471
471
  );
472
- }, Gr = () => {
472
+ }, Ur = () => {
473
473
  const e = X(), t = Ne(), n = z();
474
474
  return xe({
475
475
  mutationFn: async (s) => n(e, { action: I.RELEASE_LOCK, data: s }),
@@ -479,7 +479,7 @@ const Qu = () => {
479
479
  });
480
480
  }
481
481
  });
482
- }, Ur = () => {
482
+ }, Rr = () => {
483
483
  const e = X(), t = Ne(), n = z();
484
484
  return xe({
485
485
  mutationFn: async (s) => n(e, {
@@ -527,13 +527,13 @@ function Ue() {
527
527
  };
528
528
  }, []), [e, t];
529
529
  }
530
- const Al = is({}), Rr = () => Dn(Al), xl = () => {
531
- const [e] = Ue(), t = e.get("page"), n = ut(""), { mutate: s } = Gr();
530
+ const Al = ls({}), Or = () => Dn(Al), xl = () => {
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
535
  }, tt = (e, t) => {
536
- const [n] = Rr();
536
+ const [n] = Or();
537
537
  return ne(n, e, t);
538
538
  }, X = () => tt("apiUrl", "/chai/api"), Un = () => tt("usersApiUrl", "/chai/users"), Xu = () => tt("assetsApiUrl", "/chai/assets"), cn = () => {
539
539
  const e = X(), [t] = Ue(), n = t.get("page"), s = z();
@@ -564,7 +564,7 @@ const Al = is({}), Rr = () => Dn(Al), xl = () => {
564
564
  data: { draft: !0 }
565
565
  })
566
566
  });
567
- }, Or = (e) => {
567
+ }, Br = (e) => {
568
568
  const { fallbackLang: t } = dt(), { data: n } = un(), { data: s, isFetching: a } = cn(), i = Y(() => {
569
569
  const l = { [t]: !0 };
570
570
  return Fa(ne(n, "languages"), (o) => {
@@ -573,13 +573,13 @@ const Al = is({}), Rr = () => Dn(Al), xl = () => {
573
573
  }), l;
574
574
  }, [t, s, n]);
575
575
  return a || me(e) || e && i[e];
576
- }, Es = () => {
576
+ }, bs = () => {
577
577
  const e = Ne(), { data: t } = Ae({
578
578
  queryKey: ["chaibuilder", I.AI_CONTEXT],
579
579
  initialData: "",
580
580
  queryFn: () => ""
581
581
  });
582
- return { setAiContext: Ie(
582
+ return { setAiContext: Pe(
583
583
  (s) => {
584
584
  e.setQueryData([I.AI_CONTEXT], s);
585
585
  },
@@ -592,7 +592,7 @@ const Al = is({}), Rr = () => Dn(Al), xl = () => {
592
592
  staleTime: 1e3 * 60 * 5,
593
593
  queryFn: async () => e(t, { action: I.GET_WEBSITE_PAGES }) || []
594
594
  });
595
- }, Tl = is({ lastSaved: void 0 }), bs = () => Dn(Tl), Re = () => {
595
+ }, Tl = ls({ lastSaved: void 0 }), ws = () => Dn(Tl), Re = () => {
596
596
  const [e] = Ue(), t = e.get("page"), { data: n, isFetching: s } = Rn();
597
597
  return { data: Y(
598
598
  () => ge(n, { id: t }) || {},
@@ -608,15 +608,15 @@ const Al = is({}), Rr = () => Dn(Al), xl = () => {
608
608
  }),
609
609
  enabled: !!e && e !== "EXPIRED"
610
610
  });
611
- }, Cl = is(void 0), hn = () => {
611
+ }, Cl = ls(void 0), hn = () => {
612
612
  const [e] = Ue(), t = e.get("page"), { user: n } = rt(), [s, a] = Dn(Cl);
613
613
  return Y(() => ({
614
614
  isLocked: t && (n == null ? void 0 : n.id) !== s,
615
615
  currentEditor: s,
616
616
  setCurrentEditor: (i) => a(i)
617
617
  }), [n == null ? void 0 : n.id, s, t, a]);
618
- }, Br = () => {
619
- const [e] = Ue(), t = e.get("page"), n = X(), { setAiContext: s } = Es(), { setCurrentEditor: a } = hn(), [, i] = bs(), l = z();
618
+ }, Mr = () => {
619
+ const [e] = Ue(), t = e.get("page"), n = X(), { setAiContext: s } = bs(), { setCurrentEditor: a } = hn(), [, i] = ws(), l = z();
620
620
  return Ae({
621
621
  queryKey: [V, I.GET_DRAFT_PAGE, t],
622
622
  staleTime: 1 / 0,
@@ -633,7 +633,7 @@ const Al = is({}), Rr = () => Dn(Al), xl = () => {
633
633
  },
634
634
  enabled: !!t
635
635
  });
636
- }, Mr = ({
636
+ }, Fr = ({
637
637
  pageType: e,
638
638
  lang: t
639
639
  }) => {
@@ -656,12 +656,12 @@ function Pl({
656
656
  currentEditor: a
657
657
  }) {
658
658
  const [i, l] = P(!1);
659
- return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(ls, { className: "w-full max-w-md mx-auto", children: [
660
- /* @__PURE__ */ r(os, { className: "space-y-1", children: /* @__PURE__ */ u(cs, { className: "flex items-center gap-2 text-2xl", children: [
661
- /* @__PURE__ */ r(Sr, { className: "w-6 h-6 text-yellow-500" }),
659
+ return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(os, { className: "w-full max-w-md mx-auto", children: [
660
+ /* @__PURE__ */ r(cs, { className: "space-y-1", children: /* @__PURE__ */ u(us, { className: "flex items-center gap-2 text-2xl", children: [
661
+ /* @__PURE__ */ r(Nr, { className: "w-6 h-6 text-yellow-500" }),
662
662
  a === "EXPIRED" ? "Editing access timed out" : "Page locked for editing"
663
663
  ] }) }),
664
- /* @__PURE__ */ r(us, { className: "grid gap-4", children: a === "EXPIRED" ? /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("p", { children: "Your editing access has been paused due to inactivity. Please refresh the page to continue" }) }) : /* @__PURE__ */ u("div", { children: [
664
+ /* @__PURE__ */ r(ds, { className: "grid gap-4", children: a === "EXPIRED" ? /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("p", { children: "Your editing access has been paused due to inactivity. Please refresh the page to continue" }) }) : /* @__PURE__ */ u("div", { children: [
665
665
  /* @__PURE__ */ u("div", { className: "flex items-center space-x-4", children: [
666
666
  e ? /* @__PURE__ */ r(
667
667
  "img",
@@ -678,7 +678,7 @@ function Pl({
678
678
  ] }),
679
679
  /* @__PURE__ */ r("div", { className: "text-sm mt-4", children: /* @__PURE__ */ r("p", { children: "This user is currently editing the page. You cannot make changes." }) })
680
680
  ] }) }),
681
- /* @__PURE__ */ r(ds, { children: a === "EXPIRED" ? /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
681
+ /* @__PURE__ */ r(hs, { children: a === "EXPIRED" ? /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
682
682
  _,
683
683
  {
684
684
  className: "w-full",
@@ -686,15 +686,15 @@ function Pl({
686
686
  variant: "destructive",
687
687
  children: "Refresh"
688
688
  }
689
- ) }) : /* @__PURE__ */ u(rr, { open: i, onOpenChange: l, children: [
690
- /* @__PURE__ */ r(ar, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex flex-col items-center", children: [
689
+ ) }) : /* @__PURE__ */ u(ar, { open: i, onOpenChange: l, children: [
690
+ /* @__PURE__ */ r(ir, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex flex-col items-center", children: [
691
691
  /* @__PURE__ */ r(_, { className: "w-full", variant: "destructive", children: "Take Over" }),
692
692
  /* @__PURE__ */ r("p", { className: "mt-2 text-xs text-muted-foreground", children: "If you need to edit, you can take over the lock, but be aware that the other user might lose unsaved changes." })
693
693
  ] }) }),
694
- /* @__PURE__ */ u(ir, { className: "z-[99]", children: [
695
- /* @__PURE__ */ u(lr, { children: [
696
- /* @__PURE__ */ r(or, { children: "Are you sure you want to take over?" }),
697
- /* @__PURE__ */ u(cr, { children: [
694
+ /* @__PURE__ */ u(lr, { className: "z-[99]", children: [
695
+ /* @__PURE__ */ u(or, { children: [
696
+ /* @__PURE__ */ r(cr, { children: "Are you sure you want to take over?" }),
697
+ /* @__PURE__ */ u(ur, { children: [
698
698
  /* @__PURE__ */ u("span", { className: "flex items-center space-x-2 text-yellow-500", children: [
699
699
  /* @__PURE__ */ r(Ri, { className: "w-5 h-5" }),
700
700
  /* @__PURE__ */ r("span", { children: "This action might cause the other user to lose unsaved changes." })
@@ -707,9 +707,9 @@ function Pl({
707
707
  ] })
708
708
  ] })
709
709
  ] }),
710
- /* @__PURE__ */ u(ur, { children: [
711
- /* @__PURE__ */ r(dr, { children: "Cancel" }),
712
- /* @__PURE__ */ r(hr, { onClick: () => {
710
+ /* @__PURE__ */ u(dr, { children: [
711
+ /* @__PURE__ */ r(hr, { children: "Cancel" }),
712
+ /* @__PURE__ */ r(mr, { onClick: () => {
713
713
  l(!1), s();
714
714
  }, children: "Yes, Take Over" })
715
715
  ] })
@@ -718,7 +718,7 @@ function Pl({
718
718
  ] }) });
719
719
  }
720
720
  const _l = () => {
721
- const { isLocked: e, currentEditor: t } = hn(), { data: n } = dn(t), [s] = Ue(), a = s.get("page"), { mutate: i } = Gr(), { isFetching: l } = Br(), o = Ie(() => {
721
+ const { isLocked: e, currentEditor: t } = hn(), { data: n } = dn(t), [s] = Ue(), a = s.get("page"), { mutate: i } = Ur(), { isFetching: l } = Mr(), o = Pe(() => {
722
722
  i({ id: a });
723
723
  }, [a, i]);
724
724
  return !e || l ? /* @__PURE__ */ r("div", { className: "" }) : /* @__PURE__ */ r(
@@ -732,7 +732,7 @@ const _l = () => {
732
732
  }
733
733
  );
734
734
  }, Il = () => {
735
- const [e, t] = Ue(), n = e.get("lang"), s = Or(n), { setSelectedLang: a } = dt(), i = () => {
735
+ const [e, t] = Ue(), n = e.get("lang"), s = Br(n), { setSelectedLang: a } = dt(), i = () => {
736
736
  const o = new URLSearchParams(window.location.search);
737
737
  o.delete("lang");
738
738
  const c = o.toString(), h = `${window.location.pathname}${c ? `?${c}` : ""}`;
@@ -740,21 +740,21 @@ const _l = () => {
740
740
  };
741
741
  if (s) return null;
742
742
  const l = ne(qe, n);
743
- return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(ls, { className: "w-full max-w-md mx-auto", children: [
744
- /* @__PURE__ */ r(os, { className: "space-y-1", children: /* @__PURE__ */ u(cs, { className: "flex items-center gap-2 text-2xl", children: [
745
- /* @__PURE__ */ r(Sr, { className: "w-6 h-6 text-yellow-500" }),
743
+ return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(os, { className: "w-full max-w-md mx-auto", children: [
744
+ /* @__PURE__ */ r(cs, { className: "space-y-1", children: /* @__PURE__ */ u(us, { className: "flex items-center gap-2 text-2xl", children: [
745
+ /* @__PURE__ */ r(Nr, { className: "w-6 h-6 text-yellow-500" }),
746
746
  'Page missing for "',
747
747
  l,
748
748
  '" language.'
749
749
  ] }) }),
750
- /* @__PURE__ */ r(us, { className: "grid gap-4", children: /* @__PURE__ */ u("div", { children: [
750
+ /* @__PURE__ */ r(ds, { className: "grid gap-4", children: /* @__PURE__ */ u("div", { children: [
751
751
  'Page is not available in the "',
752
752
  l,
753
753
  '" language. Either create the page in the "',
754
754
  l,
755
755
  '" language or switch to the base language.'
756
756
  ] }) }),
757
- /* @__PURE__ */ r(ds, { children: /* @__PURE__ */ r(
757
+ /* @__PURE__ */ r(hs, { children: /* @__PURE__ */ r(
758
758
  _,
759
759
  {
760
760
  onClick: i,
@@ -825,11 +825,11 @@ const _l = () => {
825
825
  blockName: a,
826
826
  trigger: i
827
827
  }) => {
828
- const [l, o] = P(!1), c = nr(), h = Dl(() => {
828
+ const [l, o] = P(!1), c = sr(), h = Dl(() => {
829
829
  c([e], { _libBlockId: void 0 }), $.success("Block deleted successfully"), o(!1), s();
830
830
  });
831
- return /* @__PURE__ */ u(mr, { open: n, onOpenChange: (E) => !E && s(), children: [
832
- /* @__PURE__ */ r(fr, { asChild: !0, children: i || /* @__PURE__ */ u(
831
+ return /* @__PURE__ */ u(fr, { open: n, onOpenChange: (E) => !E && s(), children: [
832
+ /* @__PURE__ */ r(gr, { asChild: !0, children: i || /* @__PURE__ */ u(
833
833
  _,
834
834
  {
835
835
  type: "button",
@@ -838,13 +838,13 @@ const _l = () => {
838
838
  onClick: (E) => E.preventDefault(),
839
839
  disabled: l,
840
840
  children: [
841
- /* @__PURE__ */ r(Nr, { className: "h-4 w-4 mr-2" }),
841
+ /* @__PURE__ */ r(Ar, { className: "h-4 w-4 mr-2" }),
842
842
  "Delete"
843
843
  ]
844
844
  }
845
845
  ) }),
846
846
  /* @__PURE__ */ r(
847
- gr,
847
+ pr,
848
848
  {
849
849
  className: "w-72 p-4 z-[9999]",
850
850
  sideOffset: 5,
@@ -919,7 +919,7 @@ const _l = () => {
919
919
  className: a,
920
920
  onClick: () => o(!0),
921
921
  children: [
922
- /* @__PURE__ */ r(Nr, { className: "h-4 w-4 mr-2" }),
922
+ /* @__PURE__ */ r(Ar, { className: "h-4 w-4 mr-2" }),
923
923
  "Delete"
924
924
  ]
925
925
  }
@@ -1069,12 +1069,12 @@ const _l = () => {
1069
1069
  size: "icon",
1070
1070
  variant: "outline",
1071
1071
  onClick: () => s(!0),
1072
- children: /* @__PURE__ */ r(gs, { className: "h-4 w-4" })
1072
+ children: /* @__PURE__ */ r(ps, { className: "h-4 w-4" })
1073
1073
  }
1074
1074
  )
1075
1075
  ] });
1076
1076
  }, Bl = 1 * 1024 * 1024, Ml = ({ value: e, onChange: t }) => {
1077
- const [n, s] = P(!1), a = ut(null), i = Ie(
1077
+ const [n, s] = P(!1), a = ut(null), i = Pe(
1078
1078
  (c) => {
1079
1079
  var g;
1080
1080
  const h = (g = c.target.files) == null ? void 0 : g[0];
@@ -1127,7 +1127,7 @@ const _l = () => {
1127
1127
  /* @__PURE__ */ r("div", { className: "animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" }),
1128
1128
  "Uploading..."
1129
1129
  ] }) : /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
1130
- /* @__PURE__ */ r(Ar, { className: "h-4 w-4" }),
1130
+ /* @__PURE__ */ r(xr, { className: "h-4 w-4" }),
1131
1131
  "Select image"
1132
1132
  ] })
1133
1133
  }
@@ -1141,7 +1141,7 @@ const _l = () => {
1141
1141
  onClick: () => {
1142
1142
  t(""), a.current && (a.current.value = "");
1143
1143
  },
1144
- children: /* @__PURE__ */ r(xr, { className: "h-4 w-4" })
1144
+ children: /* @__PURE__ */ r(Tr, { className: "h-4 w-4" })
1145
1145
  }
1146
1146
  )
1147
1147
  ] }),
@@ -1202,7 +1202,7 @@ const _l = () => {
1202
1202
  } else
1203
1203
  N.push(C);
1204
1204
  return N;
1205
- }, [t, a]), [g, d] = P(""), [E, y] = P(""), [p, S] = P(""), [v, x] = P(""), [U, b] = P({}), [w, T] = P(!1), [D, ee] = P(o), [le, k] = P(!1), { hasPermission: q } = sn(), A = q(de.DELETE_LIBRARY_BLOCK), M = nr(), se = () => {
1205
+ }, [t, a]), [g, d] = P(""), [E, y] = P(""), [p, S] = P(""), [v, x] = P(""), [U, b] = P({}), [w, T] = P(!1), [D, ee] = P(o), [le, k] = P(!1), { hasPermission: q } = sn(), A = q(de.DELETE_LIBRARY_BLOCK), M = sr(), se = () => {
1206
1206
  M([s], { _libBlockId: void 0 }), $.success("Block delinked from library"), n();
1207
1207
  }, {
1208
1208
  data: fe,
@@ -1247,7 +1247,7 @@ const _l = () => {
1247
1247
  ] })
1248
1248
  ] }) : /* @__PURE__ */ u("div", { children: [
1249
1249
  c && /* @__PURE__ */ u("div", { className: "mb-4 p-3 border border-destructive/50 bg-destructive/10 text-destructive rounded-md flex items-start gap-2", children: [
1250
- /* @__PURE__ */ r(Tr, { className: "h-5 w-5 flex-shrink-0 mt-0.5" }),
1250
+ /* @__PURE__ */ r(Cr, { className: "h-5 w-5 flex-shrink-0 mt-0.5" }),
1251
1251
  /* @__PURE__ */ u("div", { children: [
1252
1252
  /* @__PURE__ */ r("p", { className: "font-medium", children: "Partial Blocks Detected" }),
1253
1253
  /* @__PURE__ */ r("p", { className: "text-xs mt-1", children: "This block contains one or more Partial Blocks. Partial blocks will be merged into the library block" })
@@ -1411,7 +1411,7 @@ const _l = () => {
1411
1411
  }
1412
1412
  }
1413
1413
  });
1414
- }, Fr = () => {
1414
+ }, qr = () => {
1415
1415
  const e = X(), t = Ne(), n = z(), { data: s } = ke();
1416
1416
  return xe({
1417
1417
  mutationFn: async (a) => (a.template && console.log("Creating page from template:", a.template), n(e, { action: I.CREATE_PAGE, data: a })),
@@ -1439,7 +1439,7 @@ const _l = () => {
1439
1439
  );
1440
1440
  }
1441
1441
  });
1442
- }, ws = () => {
1442
+ }, Ss = () => {
1443
1443
  const e = X(), t = Ne(), n = z(), { data: s } = ke();
1444
1444
  return xe({
1445
1445
  mutationFn: async (a) => await n(e, {
@@ -1533,7 +1533,7 @@ const _l = () => {
1533
1533
  );
1534
1534
  }
1535
1535
  });
1536
- }, Ss = () => {
1536
+ }, Ns = () => {
1537
1537
  const e = X(), t = z(), n = Ne(), { data: s } = Re();
1538
1538
  return xe({
1539
1539
  mutationFn: async ({ ids: a }) => t(e, {
@@ -1613,7 +1613,7 @@ const _l = () => {
1613
1613
  }
1614
1614
  });
1615
1615
  };
1616
- var Ns = {};
1616
+ var As = {};
1617
1617
  (function e(t, n, s, a) {
1618
1618
  var i = !!(t.Worker && t.Blob && t.Promise && t.OffscreenCanvas && t.OffscreenCanvasRenderingContext2D && t.HTMLCanvasElement && t.HTMLCanvasElement.prototype.transferControlToOffscreen && t.URL && t.URL.createObjectURL), l = typeof Path2D == "function" && typeof DOMMatrix == "function", o = function() {
1619
1619
  if (!t.OffscreenCanvas)
@@ -1891,7 +1891,7 @@ var Ns = {};
1891
1891
  function fe(f, m) {
1892
1892
  var N = !f, C = !!v(m || {}, "resize"), G = !1, H = v(m, "disableForReducedMotion", Boolean), K = i && !!v(m || {}, "useWorker"), L = K ? E() : null, j = N ? ee : le, oe = f && L ? !!f.__confetti_initialized : !1, pe = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, ce;
1893
1893
  function ye(Q, Le, Be) {
1894
- for (var Me = v(Q, "particleCount", x), Xe = v(Q, "angle", Number), at = v(Q, "spread", Number), $e = v(Q, "startVelocity", Number), Pa = v(Q, "decay", Number), _a = v(Q, "gravity", Number), Ia = v(Q, "drift", Number), Ts = v(Q, "colors", w), ka = v(Q, "ticks", Number), Cs = v(Q, "shapes"), La = v(Q, "scalar"), Da = !!v(Q, "flat"), Ps = D(Q), _s = Me, Fn = [], Ga = f.width * Ps.x, Ua = f.height * Ps.y; _s--; )
1894
+ for (var Me = v(Q, "particleCount", x), Xe = v(Q, "angle", Number), at = v(Q, "spread", Number), $e = v(Q, "startVelocity", Number), Pa = v(Q, "decay", Number), _a = v(Q, "gravity", Number), Ia = v(Q, "drift", Number), Cs = v(Q, "colors", w), ka = v(Q, "ticks", Number), Ps = v(Q, "shapes"), La = v(Q, "scalar"), Da = !!v(Q, "flat"), _s = D(Q), Is = Me, Fn = [], Ga = f.width * _s.x, Ua = f.height * _s.y; Is--; )
1895
1895
  Fn.push(
1896
1896
  A({
1897
1897
  x: Ga,
@@ -1899,8 +1899,8 @@ var Ns = {};
1899
1899
  angle: Xe,
1900
1900
  spread: at,
1901
1901
  startVelocity: $e,
1902
- color: Ts[_s % Ts.length],
1903
- shape: Cs[U(0, Cs.length)],
1902
+ color: Cs[Is % Cs.length],
1903
+ shape: Ps[U(0, Ps.length)],
1904
1904
  ticks: ka,
1905
1905
  decay: Pa,
1906
1906
  gravity: _a,
@@ -2016,9 +2016,9 @@ var Ns = {};
2016
2016
  }, n.exports.create = fe, n.exports.shapeFromPath = be, n.exports.shapeFromText = Qe;
2017
2017
  })(/* @__PURE__ */ function() {
2018
2018
  return typeof window < "u" ? window : typeof self < "u" ? self : this || {};
2019
- }(), Ns, !1);
2020
- const Yl = Ns.exports;
2021
- Ns.exports.create;
2019
+ }(), As, !1);
2020
+ const Yl = As.exports;
2021
+ As.exports.create;
2022
2022
  const Ql = {
2023
2023
  particleCount: 350,
2024
2024
  spread: 120,
@@ -2039,7 +2039,7 @@ const Ql = {
2039
2039
  const n = { ...Ql, ...t };
2040
2040
  Yl(n);
2041
2041
  }, Zl = () => {
2042
- const [e] = ri(), { mutate: t, isPending: n } = Ss(), { mutateAsync: s, isPending: a } = Ur();
2042
+ const [e] = ri(), { mutate: t, isPending: n } = Ns(), { mutateAsync: s, isPending: a } = Rr();
2043
2043
  return /* @__PURE__ */ u("div", { className: "bg-white py-3 flex items-center justify-center gap-x-3 border-t", children: [
2044
2044
  /* @__PURE__ */ r(
2045
2045
  _,
@@ -2088,8 +2088,8 @@ const Ql = {
2088
2088
  return /* @__PURE__ */ r(He, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
2089
2089
  /* @__PURE__ */ u(Ve, { children: [
2090
2090
  /* @__PURE__ */ r(je, { children: "Change Slug" }),
2091
- /* @__PURE__ */ r(Ye, { className: "text-xs", children: /* @__PURE__ */ u(pr, { variant: "destructive", className: "mt-2", children: [
2092
- /* @__PURE__ */ r(Tr, { className: "h-4 w-4" }),
2091
+ /* @__PURE__ */ r(Ye, { className: "text-xs", children: /* @__PURE__ */ u(yr, { variant: "destructive", className: "mt-2", children: [
2092
+ /* @__PURE__ */ r(Cr, { className: "h-4 w-4" }),
2093
2093
  "Changing the slug may have impact on your SEO. Please proceed with caution."
2094
2094
  ] }) })
2095
2095
  ] }),
@@ -2142,14 +2142,14 @@ const Ql = {
2142
2142
  _,
2143
2143
  {
2144
2144
  type: "submit",
2145
- disabled: i || !Rt(n, `/${h}`) || as(e == null ? void 0 : e.slug, n),
2145
+ disabled: i || !Rt(n, `/${h}`) || is(e == null ? void 0 : e.slug, n),
2146
2146
  children: i ? "Changing..." : "Change Slug"
2147
2147
  }
2148
2148
  ) })
2149
2149
  ] })
2150
2150
  ] }) });
2151
2151
  };
2152
- function qr({
2152
+ function Hr({
2153
2153
  page: e,
2154
2154
  onClose: t
2155
2155
  }) {
@@ -2201,7 +2201,7 @@ const Oe = ({
2201
2201
  }) => {
2202
2202
  const { hasPermission: a } = sn();
2203
2203
  return e && !a(e) || t && !t.some((i) => a(i)) ? s : n;
2204
- }, As = ({
2204
+ }, xs = ({
2205
2205
  page: e,
2206
2206
  onClose: t
2207
2207
  }) => {
@@ -2231,12 +2231,12 @@ const Oe = ({
2231
2231
  )
2232
2232
  ] })
2233
2233
  ] }) });
2234
- }, Hr = ({
2234
+ }, Kr = ({
2235
2235
  langProps: e,
2236
2236
  onClose: t,
2237
2237
  languages: n
2238
2238
  }) => {
2239
- const { data: s } = Re(), { data: a } = ke(), [i, l] = P(e.name || ""), [o, c] = P(e.edit ? e.lang : ""), [h, g] = P(e.edit ? e.slug : ""), { mutate: d, isPending: E } = Fr(), { mutate: y, isPending: p } = ws(), S = Y(
2239
+ const { data: s } = Re(), { data: a } = ke(), [i, l] = P(e.name || ""), [o, c] = P(e.edit ? e.lang : ""), [h, g] = P(e.edit ? e.slug : ""), { mutate: d, isPending: E } = qr(), { mutate: y, isPending: p } = Ss(), S = Y(
2240
2240
  () => a == null ? void 0 : a.find(
2241
2241
  (b) => b.key === e.pageType
2242
2242
  ),
@@ -2400,7 +2400,7 @@ const Oe = ({
2400
2400
  variant: "ghost",
2401
2401
  size: "sm",
2402
2402
  className: "h-8 w-8 p-0",
2403
- children: /* @__PURE__ */ r(ps, { className: "h-4 w-4" })
2403
+ children: /* @__PURE__ */ r(ys, { className: "h-4 w-4" })
2404
2404
  }
2405
2405
  )
2406
2406
  }
@@ -2442,7 +2442,7 @@ const Oe = ({
2442
2442
  T.stopPropagation(), d(v);
2443
2443
  },
2444
2444
  children: [
2445
- /* @__PURE__ */ r(Cr, { className: "size-3" }),
2445
+ /* @__PURE__ */ r(Pr, { className: "size-3" }),
2446
2446
  B.UNPUBLISH
2447
2447
  ]
2448
2448
  }
@@ -2500,16 +2500,16 @@ const Oe = ({
2500
2500
  }
2501
2501
  ) }) }),
2502
2502
  e && /* @__PURE__ */ r(
2503
- Hr,
2503
+ Kr,
2504
2504
  {
2505
2505
  languages: S,
2506
2506
  langProps: e,
2507
2507
  onClose: () => t(null)
2508
2508
  }
2509
2509
  ),
2510
- c && /* @__PURE__ */ r(qr, { page: c, onClose: () => h(null) }),
2510
+ c && /* @__PURE__ */ r(Hr, { page: c, onClose: () => h(null) }),
2511
2511
  g && /* @__PURE__ */ r(
2512
- As,
2512
+ xs,
2513
2513
  {
2514
2514
  page: g,
2515
2515
  onClose: () => d(null)
@@ -2651,7 +2651,7 @@ function io({
2651
2651
  close: n
2652
2652
  }) {
2653
2653
  var be, Qe;
2654
- const s = !!(e != null && e.id), { data: a } = Rn(), { mutate: i, isPending: l } = Fr(), { mutate: o, isPending: c } = ws(), [h, g] = P(null), [d, E] = P(
2654
+ const s = !!(e != null && e.id), { data: a } = Rn(), { mutate: i, isPending: l } = qr(), { mutate: o, isPending: c } = Ss(), [h, g] = P(null), [d, E] = P(
2655
2655
  (e == null ? void 0 : e.pageType) ?? "page"
2656
2656
  ), [y, p] = P(
2657
2657
  t.find(
@@ -2949,7 +2949,7 @@ const lo = ({
2949
2949
  }) => {
2950
2950
  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(
2951
2951
  (b) => b.key === e.pageType
2952
- ), p = (y == null ? void 0 : y.name) || It(e.pageType), S = Ie(
2952
+ ), p = (y == null ? void 0 : y.name) || It(e.pageType), S = Pe(
2953
2953
  (b) => {
2954
2954
  var T;
2955
2955
  const w = (T = b.target.files) == null ? void 0 : T[0];
@@ -3060,7 +3060,7 @@ const lo = ({
3060
3060
  /* @__PURE__ */ r("div", { className: "animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" }),
3061
3061
  "Uploading..."
3062
3062
  ] }) : /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
3063
- /* @__PURE__ */ r(Ar, { className: "h-4 w-4" }),
3063
+ /* @__PURE__ */ r(xr, { className: "h-4 w-4" }),
3064
3064
  "Select image"
3065
3065
  ] })
3066
3066
  }
@@ -3072,7 +3072,7 @@ const lo = ({
3072
3072
  variant: "outline",
3073
3073
  size: "icon",
3074
3074
  onClick: v,
3075
- children: /* @__PURE__ */ r(xr, { className: "h-4 w-4" })
3075
+ children: /* @__PURE__ */ r(Tr, { className: "h-4 w-4" })
3076
3076
  }
3077
3077
  )
3078
3078
  ] }),
@@ -3193,7 +3193,7 @@ const lo = ({
3193
3193
  className: `ml-2 text-xs max-w-full leading-tight py-px font-normal rounded-full text-gray-400 border ${n ? "border-gray-300" : "border-gray-200"}`,
3194
3194
  children: [
3195
3195
  E,
3196
- t.dynamic && /* @__PURE__ */ r("span", { className: "text-xs font-light leading-none text-slate-500", children: Zs(E, "/") ? `${d == null ? void 0 : d.dynamicSlug}` : `/${d == null ? void 0 : d.dynamicSlug}` })
3196
+ t.dynamic && /* @__PURE__ */ r("span", { className: "text-xs font-light leading-none text-slate-500", children: Js(E, "/") ? `${d == null ? void 0 : d.dynamicSlug}` : `/${d == null ? void 0 : d.dynamicSlug}` })
3197
3197
  ]
3198
3198
  }
3199
3199
  ) : /* @__PURE__ */ r(
@@ -3214,7 +3214,7 @@ const lo = ({
3214
3214
  )
3215
3215
  ] }),
3216
3216
  /* @__PURE__ */ r("div", { className: "flex items-center space-x-4", children: !y && /* @__PURE__ */ u(rn, { children: [
3217
- /* @__PURE__ */ r(an, { asChild: !0, onClick: (v) => v.stopPropagation(), children: /* @__PURE__ */ r(ps, { className: "h-4 w-4 hover:stroke-[3]" }) }),
3217
+ /* @__PURE__ */ r(an, { asChild: !0, onClick: (v) => v.stopPropagation(), children: /* @__PURE__ */ r(ys, { className: "h-4 w-4 hover:stroke-[3]" }) }),
3218
3218
  /* @__PURE__ */ u(ln, { align: "end", className: "text-sm", children: [
3219
3219
  g(de.EDIT_PAGE) && /* @__PURE__ */ u(
3220
3220
  De,
@@ -3240,7 +3240,7 @@ const lo = ({
3240
3240
  v.stopPropagation(), a(t);
3241
3241
  },
3242
3242
  children: [
3243
- /* @__PURE__ */ r(Cr, { className: "size-3" }),
3243
+ /* @__PURE__ */ r(Pr, { className: "size-3" }),
3244
3244
  B.UNPUBLISH
3245
3245
  ]
3246
3246
  }
@@ -3253,7 +3253,7 @@ const lo = ({
3253
3253
  v.stopPropagation(), i(t);
3254
3254
  },
3255
3255
  children: [
3256
- /* @__PURE__ */ r(ys, { className: "size-3" }),
3256
+ /* @__PURE__ */ r(vs, { className: "size-3" }),
3257
3257
  B.DELETE
3258
3258
  ]
3259
3259
  }
@@ -3266,7 +3266,7 @@ const lo = ({
3266
3266
  v.stopPropagation(), c(t);
3267
3267
  },
3268
3268
  children: [
3269
- /* @__PURE__ */ r(Gs, { className: "size-3" }),
3269
+ /* @__PURE__ */ r(Us, { className: "size-3" }),
3270
3270
  B.UNMARK_AS_TEMPLATE
3271
3271
  ]
3272
3272
  }
@@ -3278,7 +3278,7 @@ const lo = ({
3278
3278
  v.stopPropagation(), o(t);
3279
3279
  },
3280
3280
  children: [
3281
- /* @__PURE__ */ r(Gs, { className: "size-3" }),
3281
+ /* @__PURE__ */ r(Us, { className: "size-3" }),
3282
3282
  B.MARK_AS_TEMPLATE
3283
3283
  ]
3284
3284
  }
@@ -3289,7 +3289,7 @@ const lo = ({
3289
3289
  }
3290
3290
  );
3291
3291
  }, ho = ({ close: e }) => {
3292
- 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 = Ie(
3292
+ 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(
3293
3293
  (A) => {
3294
3294
  var M;
3295
3295
  return (M = ge(D, { key: A })) == null ? void 0 : M.hasSlug;
@@ -3303,7 +3303,7 @@ const lo = ({
3303
3303
  }, [D, v]);
3304
3304
  const le = (A) => {
3305
3305
  x(A), sessionStorage.setItem("pageTypeFilter", A);
3306
- }, k = Ie(
3306
+ }, k = Pe(
3307
3307
  (A) => {
3308
3308
  const se = new URLSearchParams(window.location.search).get("lang"), fe = new URLSearchParams({ page: A });
3309
3309
  se && fe.set("lang", se), window.history.pushState({}, "", `?${fe.toString()}`), w(fe), window.dispatchEvent(new PopStateEvent("popstate")), e();
@@ -3373,7 +3373,7 @@ const lo = ({
3373
3373
  }
3374
3374
  ),
3375
3375
  /* @__PURE__ */ r(vi, { align: "end", children: Fe(
3376
- Xs([{ key: "all", name: "All" }], D),
3376
+ Zs([{ key: "all", name: "All" }], D),
3377
3377
  (A) => /* @__PURE__ */ r(Ei, { value: ne(A, "key"), children: ne(A, "name") })
3378
3378
  ) })
3379
3379
  ] })
@@ -3447,7 +3447,7 @@ const lo = ({
3447
3447
  });
3448
3448
  },
3449
3449
  children: [
3450
- /* @__PURE__ */ r(gs, { className: "w-4 h-4" }),
3450
+ /* @__PURE__ */ r(ps, { className: "w-4 h-4" }),
3451
3451
  " Add New"
3452
3452
  ]
3453
3453
  }
@@ -3460,9 +3460,9 @@ const lo = ({
3460
3460
  setAddEditPage: h
3461
3461
  }
3462
3462
  ),
3463
- a && /* @__PURE__ */ r(qr, { page: a, onClose: () => i(null) }),
3463
+ a && /* @__PURE__ */ r(Hr, { page: a, onClose: () => i(null) }),
3464
3464
  l && /* @__PURE__ */ r(
3465
- As,
3465
+ xs,
3466
3466
  {
3467
3467
  page: l,
3468
3468
  onClose: () => o(null)
@@ -3485,7 +3485,7 @@ const lo = ({
3485
3485
  ] });
3486
3486
  }, mo = () => {
3487
3487
  const e = tt("logo", null);
3488
- return e ? /* @__PURE__ */ r("div", { className: "w-full max-h-9 overflow-hidden pr-2", children: er.createElement(e, {}) }) : null;
3488
+ return e ? /* @__PURE__ */ r("div", { className: "w-full max-h-9 overflow-hidden pr-2", children: tr.createElement(e, {}) }) : null;
3489
3489
  }, fo = () => {
3490
3490
  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;
3491
3491
  return /* @__PURE__ */ u(we, { children: [
@@ -3499,24 +3499,24 @@ const lo = ({
3499
3499
  /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(ji, { className: "h-4 w-4" }) }),
3500
3500
  /* @__PURE__ */ u("span", { className: "truncate leading-tight flex items-center max-w-[200px]", children: [
3501
3501
  /* @__PURE__ */ r("span", { className: "text-slate-600 pr-1 font-light", children: "Editing:" }),
3502
- s ? /* @__PURE__ */ r(Pr, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : It(ne(n, "name")) ?? ""
3502
+ s ? /* @__PURE__ */ r(_r, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : It(ne(n, "name")) ?? ""
3503
3503
  ] })
3504
3504
  ]
3505
3505
  },
3506
3506
  "template-viewer"
3507
3507
  ),
3508
3508
  /* @__PURE__ */ r(
3509
- yr,
3509
+ vr,
3510
3510
  {
3511
3511
  open: o,
3512
3512
  onOpenChange: (c) => !c && l && i(!1),
3513
3513
  children: /* @__PURE__ */ u(
3514
- vr,
3514
+ Er,
3515
3515
  {
3516
3516
  side: "left",
3517
3517
  className: `!max-w-screen-md z-50 border-border w-full ${l ? "" : "sheet-hide-close-btn"}`,
3518
3518
  children: [
3519
- /* @__PURE__ */ r(Er, { className: "mb-3", children: /* @__PURE__ */ u(br, { className: "text-sm flex items-center gap-2 font-semibold", children: [
3519
+ /* @__PURE__ */ r(br, { className: "mb-3", children: /* @__PURE__ */ u(wr, { className: "text-sm flex items-center gap-2 font-semibold", children: [
3520
3520
  /* @__PURE__ */ r("div", { className: "p-2 rounded-md bg-primary text-primary-foreground", children: /* @__PURE__ */ r(on, { className: "w-6 h-6" }) }),
3521
3521
  /* @__PURE__ */ u("div", { className: "flex flex-col", children: [
3522
3522
  /* @__PURE__ */ r("span", { className: "text-sm font-semibold", children: "Pages" }),
@@ -3567,7 +3567,7 @@ const lo = ({
3567
3567
  /* @__PURE__ */ r(an, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ u(_, { variant: "ghost", size: "sm", className: "gap-2", children: [
3568
3568
  /* @__PURE__ */ r($i, { className: "w-4 h-4" }),
3569
3569
  ne(qe, a, a),
3570
- /* @__PURE__ */ r(_r, { className: "w-4 h-4" })
3570
+ /* @__PURE__ */ r(Ir, { className: "w-4 h-4" })
3571
3571
  ] }) }),
3572
3572
  /* @__PURE__ */ u(ln, { className: "border-border space-y-1", children: [
3573
3573
  Fe(
@@ -3615,7 +3615,7 @@ const lo = ({
3615
3615
  },
3616
3616
  className: "hover:bg-slate-300 duration-200 font-normal text-xs hover:text-slate-800",
3617
3617
  children: [
3618
- /* @__PURE__ */ r(gs, { className: "w-3 h-3 mr-1" }),
3618
+ /* @__PURE__ */ r(ps, { className: "w-3 h-3 mr-1" }),
3619
3619
  " Add Langauge"
3620
3620
  ]
3621
3621
  }
@@ -3624,7 +3624,7 @@ const lo = ({
3624
3624
  ] })
3625
3625
  ] }),
3626
3626
  l && /* @__PURE__ */ r(
3627
- Hr,
3627
+ Kr,
3628
3628
  {
3629
3629
  languages: t,
3630
3630
  langProps: l,
@@ -3684,7 +3684,7 @@ const vo = () => {
3684
3684
  });
3685
3685
  };
3686
3686
  function bo() {
3687
- const { data: e } = Re(), { saveState: t } = sr(), [n] = bs();
3687
+ const { data: e } = Re(), { saveState: t } = rr(), [n] = ws();
3688
3688
  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: [
3689
3689
  /* @__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" }) }) }),
3690
3690
  /* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: !me(n.lastSaved) && /* @__PURE__ */ u("span", { children: [
@@ -3700,7 +3700,7 @@ function bo() {
3700
3700
  /* @__PURE__ */ r("span", { children: "Draft" })
3701
3701
  ] }),
3702
3702
  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: [
3703
- /* @__PURE__ */ r(kr, { className: "h-3 w-3" }),
3703
+ /* @__PURE__ */ r(Lr, { className: "h-3 w-3" }),
3704
3704
  /* @__PURE__ */ r("span", { children: " Unsaved changes" })
3705
3705
  ] }) : null
3706
3706
  ] })
@@ -3737,19 +3737,19 @@ function wo() {
3737
3737
  return Se(() => {
3738
3738
  e && E();
3739
3739
  }, [e, E]), /* @__PURE__ */ u(we, { children: [
3740
- /* @__PURE__ */ r(wr, { children: /* @__PURE__ */ u(hs, { children: [
3741
- /* @__PURE__ */ u(yr, { open: e, onOpenChange: t, children: [
3742
- /* @__PURE__ */ r(wi, { asChild: !0, children: /* @__PURE__ */ r(ms, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
3740
+ /* @__PURE__ */ r(Sr, { children: /* @__PURE__ */ u(ms, { children: [
3741
+ /* @__PURE__ */ u(vr, { open: e, onOpenChange: t, children: [
3742
+ /* @__PURE__ */ r(wi, { asChild: !0, children: /* @__PURE__ */ r(fs, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
3743
3743
  /* @__PURE__ */ u(_, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
3744
- /* @__PURE__ */ r(Us, { className: "h-4 w-4" }),
3744
+ /* @__PURE__ */ r(Rs, { className: "h-4 w-4" }),
3745
3745
  /* @__PURE__ */ r("span", { className: "sr-only", children: "View revision history" })
3746
3746
  ] }),
3747
3747
  /* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
3748
3748
  ] }) }) }),
3749
- /* @__PURE__ */ u(vr, { className: "sm:max-w-md p-4", children: [
3750
- /* @__PURE__ */ u(Er, { className: "pb-2", children: [
3751
- /* @__PURE__ */ u(br, { className: "flex items-center gap-2", children: [
3752
- /* @__PURE__ */ r(Us, { className: "h-5 w-5" }),
3749
+ /* @__PURE__ */ u(Er, { className: "sm:max-w-md p-4", children: [
3750
+ /* @__PURE__ */ u(br, { className: "pb-2", children: [
3751
+ /* @__PURE__ */ u(wr, { className: "flex items-center gap-2", children: [
3752
+ /* @__PURE__ */ r(Rs, { className: "h-5 w-5" }),
3753
3753
  "Revision History"
3754
3754
  ] }),
3755
3755
  (c == null ? void 0 : c.createdAt) && /* @__PURE__ */ u("p", { className: "text-xs text-muted-foreground mt-1", children: [
@@ -3776,7 +3776,7 @@ function wo() {
3776
3776
  ] }) })
3777
3777
  ] })
3778
3778
  ] }),
3779
- /* @__PURE__ */ r(fs, { side: "bottom", children: /* @__PURE__ */ r("p", { children: "Revision history" }) })
3779
+ /* @__PURE__ */ r(gs, { side: "bottom", children: /* @__PURE__ */ r("p", { children: "Revision history" }) })
3780
3780
  ] }) }),
3781
3781
  /* @__PURE__ */ r(
3782
3782
  xo,
@@ -3866,12 +3866,12 @@ function Ao({
3866
3866
  }) {
3867
3867
  return /* @__PURE__ */ u(rn, { children: [
3868
3868
  /* @__PURE__ */ r(an, { asChild: !0, children: /* @__PURE__ */ u(_, { variant: "ghost", size: "icon", className: "h-7 w-7 -mr-1", children: [
3869
- /* @__PURE__ */ r(ps, { className: "h-4 w-4" }),
3869
+ /* @__PURE__ */ r(ys, { className: "h-4 w-4" }),
3870
3870
  /* @__PURE__ */ r("span", { className: "sr-only", children: "More options" })
3871
3871
  ] }) }),
3872
3872
  /* @__PURE__ */ u(ln, { align: "end", className: "text-xs", children: [
3873
3873
  /* @__PURE__ */ r(Oe, { permission: de.RESTORE_REVISION, children: /* @__PURE__ */ u(De, { onClick: t, className: "cursor-pointer", children: [
3874
- /* @__PURE__ */ r(Ir, { className: "mr-2 h-4 w-4" }),
3874
+ /* @__PURE__ */ r(kr, { className: "mr-2 h-4 w-4" }),
3875
3875
  /* @__PURE__ */ r("span", { children: "Restore this version" })
3876
3876
  ] }) }),
3877
3877
  /* @__PURE__ */ r(Oe, { permission: de.DELETE_REVISION, children: e.uid !== "current" && /* @__PURE__ */ u(we, { children: [
@@ -3882,7 +3882,7 @@ function Ao({
3882
3882
  onClick: n,
3883
3883
  className: "cursor-pointer text-destructive",
3884
3884
  children: [
3885
- /* @__PURE__ */ r(ys, { className: "mr-2 h-4 w-4" }),
3885
+ /* @__PURE__ */ r(vs, { className: "mr-2 h-4 w-4" }),
3886
3886
  /* @__PURE__ */ r("span", { children: "Delete this version" })
3887
3887
  ]
3888
3888
  }
@@ -3949,7 +3949,7 @@ function xo({
3949
3949
  /* @__PURE__ */ r("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
3950
3950
  "Discarding current..."
3951
3951
  ] }) : /* @__PURE__ */ u(we, { children: [
3952
- /* @__PURE__ */ r(Ir, { className: "mr-2 h-4 w-4" }),
3952
+ /* @__PURE__ */ r(kr, { className: "mr-2 h-4 w-4" }),
3953
3953
  "Discard current"
3954
3954
  ] })
3955
3955
  }
@@ -4011,7 +4011,7 @@ function To({
4011
4011
  /* @__PURE__ */ r("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
4012
4012
  "Deleting..."
4013
4013
  ] }) : /* @__PURE__ */ u(we, { children: [
4014
- /* @__PURE__ */ r(ys, { className: "mr-2 h-4 w-4" }),
4014
+ /* @__PURE__ */ r(vs, { className: "mr-2 h-4 w-4" }),
4015
4015
  "Delete Revision"
4016
4016
  ] })
4017
4017
  }
@@ -4035,7 +4035,7 @@ function _o({
4035
4035
  showModal: e = !1,
4036
4036
  onClose: t = () => console.log("Cancelled")
4037
4037
  }) {
4038
- const [n, s] = P([]), { data: a, isFetching: i } = Co(), { data: l } = ke(), o = Ie(
4038
+ const [n, s] = P([]), { data: a, isFetching: i } = Co(), { data: l } = ke(), o = Pe(
4039
4039
  (w) => {
4040
4040
  var T;
4041
4041
  return (T = ge(l, { key: w })) == null ? void 0 : T.hasSlug;
@@ -4055,14 +4055,14 @@ function _o({
4055
4055
  ), d = Y(
4056
4056
  () => ge(a, { pageType: "theme", id: "THEME" }),
4057
4057
  [a]
4058
- ), { mutate: E, isPending: y } = Ss();
4058
+ ), { mutate: E, isPending: y } = Ns();
4059
4059
  Se(() => {
4060
4060
  const w = Fe(Ce(a, { online: !0 }), "id");
4061
4061
  d && w.push(d == null ? void 0 : d.id), s(w);
4062
4062
  }, [a, d]);
4063
4063
  const p = n.length === (a == null ? void 0 : a.length), S = (w) => {
4064
4064
  s(
4065
- (T) => Mt(T, w) ? Ce(T, (D) => D !== w) : Xs(T, w)
4065
+ (T) => Mt(T, w) ? Ce(T, (D) => D !== w) : Zs(T, w)
4066
4066
  );
4067
4067
  }, v = () => {
4068
4068
  s(p ? [] : Fe(a, "id"));
@@ -4231,7 +4231,7 @@ function ko({ onClose: e }) {
4231
4231
  /* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
4232
4232
  /* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
4233
4233
  /* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" })
4234
- ] }) : /* @__PURE__ */ r("div", { children: er.createElement(i, {
4234
+ ] }) : /* @__PURE__ */ r("div", { children: tr.createElement(i, {
4235
4235
  data: t || {},
4236
4236
  onSave: a ? () => {
4237
4237
  } : l,
@@ -4240,13 +4240,13 @@ function ko({ onClose: e }) {
4240
4240
  }) })
4241
4241
  ] }) }) : null;
4242
4242
  }
4243
- function Kr({
4243
+ function Vr({
4244
4244
  children: e,
4245
4245
  content: t
4246
4246
  }) {
4247
- return /* @__PURE__ */ r(wr, { children: /* @__PURE__ */ u(hs, { children: [
4248
- /* @__PURE__ */ r(ms, { asChild: !0, children: e }),
4249
- /* @__PURE__ */ r(fs, { side: "bottom", sideOffset: 10, children: /* @__PURE__ */ r("p", { children: t }) })
4247
+ return /* @__PURE__ */ r(Sr, { children: /* @__PURE__ */ u(ms, { children: [
4248
+ /* @__PURE__ */ r(fs, { asChild: !0, children: e }),
4249
+ /* @__PURE__ */ r(gs, { side: "bottom", sideOffset: 10, children: /* @__PURE__ */ r("p", { children: t }) })
4250
4250
  ] }) });
4251
4251
  }
4252
4252
  const Lo = () => {
@@ -4256,7 +4256,7 @@ const Lo = () => {
4256
4256
  return (g = l == null ? void 0 : l.find((d) => (d == null ? void 0 : d.lang) === e)) == null ? void 0 : g.slug;
4257
4257
  },
4258
4258
  [e, l]
4259
- ), h = Ie(
4259
+ ), h = Pe(
4260
4260
  (g) => {
4261
4261
  var d;
4262
4262
  return (d = ge(o, { key: g })) == null ? void 0 : d.hasSlug;
@@ -4272,14 +4272,14 @@ const Lo = () => {
4272
4272
  s("");
4273
4273
  })();
4274
4274
  }, [t, c]), !n || !h(a == null ? void 0 : a.pageType) || i ? null : /* @__PURE__ */ r(we, { children: /* @__PURE__ */ r("a", { href: n, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ u(_, { variant: "ghost", size: "sm", className: "gap-2", children: [
4275
- /* @__PURE__ */ r(Lr, { className: "w-4 h-4" }),
4275
+ /* @__PURE__ */ r(Dr, { className: "w-4 h-4" }),
4276
4276
  " ",
4277
4277
  B.PREVIEW
4278
4278
  ] }) }) });
4279
4279
  }, Do = () => {
4280
4280
  const [e, t] = ii();
4281
4281
  return /* @__PURE__ */ u(we, { children: [
4282
- /* @__PURE__ */ r(Kr, { content: B.THEME, children: /* @__PURE__ */ r(
4282
+ /* @__PURE__ */ r(Vr, { content: B.THEME, children: /* @__PURE__ */ r(
4283
4283
  _,
4284
4284
  {
4285
4285
  variant: e === "theme" ? "outline" : "ghost",
@@ -4292,7 +4292,7 @@ const Lo = () => {
4292
4292
  /* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
4293
4293
  ] });
4294
4294
  }, Go = () => {
4295
- const [e, t] = P(!1), { isLocked: n } = hn(), { savePage: s, saveState: a } = sr();
4295
+ const [e, t] = P(!1), { isLocked: n } = hn(), { savePage: s, saveState: a } = rr();
4296
4296
  Se(() => {
4297
4297
  const g = (d) => {
4298
4298
  a === "UNSAVED" && (d.preventDefault(), d.returnValue = !1);
@@ -4301,7 +4301,7 @@ const Lo = () => {
4301
4301
  window.removeEventListener("beforeunload", g);
4302
4302
  };
4303
4303
  }, [a]);
4304
- const i = Ie(async () => {
4304
+ const i = Pe(async () => {
4305
4305
  t(!0), await s(!1);
4306
4306
  }, [s]);
4307
4307
  Se(() => {
@@ -4315,13 +4315,13 @@ const Lo = () => {
4315
4315
  case "UNSAVED":
4316
4316
  return {
4317
4317
  tooltipContent: B.SAVEDRAFT,
4318
- buttonIcon: /* @__PURE__ */ r(kr, { className: "w-4 h-4" }),
4318
+ buttonIcon: /* @__PURE__ */ r(Lr, { className: "w-4 h-4" }),
4319
4319
  buttonClass: "flex items-center gap-x-1 leading-tight"
4320
4320
  };
4321
4321
  case "SAVING":
4322
4322
  return {
4323
4323
  tooltipContent: B.SAVING,
4324
- buttonIcon: /* @__PURE__ */ r(Pr, { className: "w-4 h-4 animate-spin" }),
4324
+ buttonIcon: /* @__PURE__ */ r(_r, { className: "w-4 h-4 animate-spin" }),
4325
4325
  buttonClass: "flex items-center gap-x-1 leading-tight"
4326
4326
  };
4327
4327
  case "SAVED":
@@ -4347,7 +4347,7 @@ const Lo = () => {
4347
4347
  }
4348
4348
  );
4349
4349
  }, Uo = () => {
4350
- const [e, t] = P(!1), [n, s] = P(!1), [a, i] = P(null), { data: l } = Re(), { mutate: o, isPending: c } = Ss(), [h] = li(), { buttonText: g, buttonClassName: d, isPublished: E } = Y(() => {
4350
+ 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 } = Y(() => {
4351
4351
  const p = l && (l == null ? void 0 : l.online);
4352
4352
  return {
4353
4353
  buttonClassName: p ? "hover:bg-green-600 bg-green-500" : "",
@@ -4378,14 +4378,14 @@ const Lo = () => {
4378
4378
  "span",
4379
4379
  {
4380
4380
  className: `flex items-center transition-transform duration-300 ease-in-out ${n ? "-translate-y-10" : ""}`,
4381
- children: E ? /* @__PURE__ */ r(Rs, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Os, { className: "w-4 h-4" })
4381
+ children: E ? /* @__PURE__ */ r(Os, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Bs, { className: "w-4 h-4" })
4382
4382
  }
4383
4383
  ),
4384
4384
  /* @__PURE__ */ r(
4385
4385
  "span",
4386
4386
  {
4387
4387
  className: `absolute inset-0 flex items-center left-3 transition-transform duration-300 ease-in-out ${n ? "" : "translate-y-10"}`,
4388
- children: E ? /* @__PURE__ */ r(Os, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Rs, { className: "w-4 h-4" })
4388
+ children: E ? /* @__PURE__ */ r(Bs, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Os, { className: "w-4 h-4" })
4389
4389
  }
4390
4390
  ),
4391
4391
  /* @__PURE__ */ r("span", { children: g })
@@ -4399,7 +4399,7 @@ const Lo = () => {
4399
4399
  size: "sm",
4400
4400
  disabled: c || !(l != null && l.id),
4401
4401
  className: `px-2 text-white border-l border-white/50 rounded-l-none ${d}`,
4402
- children: /* @__PURE__ */ r(_r, { className: "w-4 h-4" })
4402
+ children: /* @__PURE__ */ r(Ir, { className: "w-4 h-4" })
4403
4403
  }
4404
4404
  ) }),
4405
4405
  /* @__PURE__ */ u(ln, { align: "end", className: "w-36", children: [
@@ -4445,7 +4445,7 @@ const Lo = () => {
4445
4445
  ] }),
4446
4446
  /* @__PURE__ */ r(_o, { showModal: e, onClose: () => t(!1) }),
4447
4447
  a && /* @__PURE__ */ r(
4448
- As,
4448
+ xs,
4449
4449
  {
4450
4450
  page: a,
4451
4451
  onClose: () => i(null)
@@ -4455,7 +4455,7 @@ const Lo = () => {
4455
4455
  }, Ro = () => {
4456
4456
  const e = tt("settingComponent", null), [t, n] = P(!1);
4457
4457
  return e ? /* @__PURE__ */ u(we, { children: [
4458
- /* @__PURE__ */ r(Kr, { content: B.WEBSITEDATA, children: /* @__PURE__ */ r(
4458
+ /* @__PURE__ */ r(Vr, { content: B.WEBSITEDATA, children: /* @__PURE__ */ r(
4459
4459
  _,
4460
4460
  {
4461
4461
  variant: "ghost",
@@ -4470,7 +4470,7 @@ const Lo = () => {
4470
4470
  ] }) : null;
4471
4471
  }, Oo = () => {
4472
4472
  const { data: e } = Re(), t = e && (e == null ? void 0 : e.online), { data: n } = ke();
4473
- return Ie(
4473
+ return Pe(
4474
4474
  (a) => {
4475
4475
  var i;
4476
4476
  return (i = ge(n, { key: a })) == null ? void 0 : i.hasSlug;
@@ -4492,7 +4492,7 @@ const Lo = () => {
4492
4492
  ) : null;
4493
4493
  };
4494
4494
  function Bo() {
4495
- const { isLocked: e } = hn(), [t] = Ue(), n = t.get("lang"), s = Or(n);
4495
+ const { isLocked: e } = hn(), [t] = Ue(), n = t.get("lang"), s = Br(n);
4496
4496
  return e || !s ? null : /* @__PURE__ */ u("div", { className: "flex items-center justify-end gap-1", children: [
4497
4497
  /* @__PURE__ */ r(wo, {}),
4498
4498
  /* @__PURE__ */ r(Oe, { permission: de.EDIT_THEME, children: /* @__PURE__ */ r(Do, {}) }),
@@ -4507,8 +4507,8 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4507
4507
  /* @__PURE__ */ r(po, {}),
4508
4508
  /* @__PURE__ */ r(Bo, {})
4509
4509
  ] }), Fo = () => {
4510
- const e = X(), { aiContext: t } = Es(), n = z();
4511
- return Ie(
4510
+ const e = X(), { aiContext: t } = bs(), n = z();
4511
+ return Pe(
4512
4512
  async (s, a, i, l) => n(e, {
4513
4513
  action: I.ASK_AI,
4514
4514
  data: { type: s, prompt: a, blocks: i, context: t, lang: l }
@@ -4520,7 +4520,7 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4520
4520
  const s = dl(n._type);
4521
4521
  return {
4522
4522
  ...s,
4523
- ...Js(n, [
4523
+ ...er(n, [
4524
4524
  ...za(s),
4525
4525
  "_type",
4526
4526
  "_id",
@@ -4528,7 +4528,7 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4528
4528
  "_parent",
4529
4529
  "_bindings"
4530
4530
  ]),
4531
- ...Wa(n, (a, i) => Zs(i, "_attrs")),
4531
+ ...Wa(n, (a, i) => Js(i, "_attrs")),
4532
4532
  ...n
4533
4533
  };
4534
4534
  }
@@ -4563,7 +4563,7 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4563
4563
  enabled: !!s
4564
4564
  });
4565
4565
  }, jo = () => {
4566
- const e = X(), t = z(), { setCurrentEditor: n } = hn(), [, s] = bs();
4566
+ const e = X(), t = z(), { setCurrentEditor: n } = hn(), [, s] = ws();
4567
4567
  return { getUILibraryBlock: async (o, c) => {
4568
4568
  const h = await t(e, {
4569
4569
  action: "GET_LIBRARY_ITEM",
@@ -4603,7 +4603,7 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4603
4603
  }, $o = () => {
4604
4604
  const { data: e } = Rn(), t = X(), n = z();
4605
4605
  return {
4606
- getPartialBlocks: Ie(async () => {
4606
+ getPartialBlocks: Pe(async () => {
4607
4607
  const s = {};
4608
4608
  for (const a of e ?? [])
4609
4609
  me(a == null ? void 0 : a.slug) && (s[a.id] = {
@@ -4613,7 +4613,7 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4613
4613
  });
4614
4614
  return s;
4615
4615
  }, [e]),
4616
- getPartialBlockBlocks: Ie(
4616
+ getPartialBlockBlocks: Pe(
4617
4617
  async (s) => {
4618
4618
  if (!s) return [];
4619
4619
  try {
@@ -4629,14 +4629,14 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4629
4629
  [n, t]
4630
4630
  )
4631
4631
  };
4632
- }, Ms = An.object({
4632
+ }, Fs = An.object({
4633
4633
  email: An.string().email({ message: "Please enter a valid email address" }),
4634
4634
  password: An.string().min(6, { message: "Password must be at least 6 characters" })
4635
4635
  }), zo = () => {
4636
4636
  const { setUser: e } = rt(), t = Un(), [n, s] = P(""), [a, i] = P(""), [l, o] = P({}), [c, h] = P(!1), [g, d] = P(""), E = xe({
4637
4637
  mutationFn: async (S) => {
4638
4638
  d("");
4639
- const v = await vs(t, {
4639
+ const v = await Es(t, {
4640
4640
  action: "LOGIN",
4641
4641
  data: S
4642
4642
  });
@@ -4660,7 +4660,7 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4660
4660
  S.preventDefault(), o({});
4661
4661
  const v = { email: n, password: a };
4662
4662
  try {
4663
- const x = Ms.parse(v);
4663
+ const x = Fs.parse(v);
4664
4664
  E.mutate(x);
4665
4665
  } catch (x) {
4666
4666
  if (x instanceof An.ZodError) {
@@ -4671,13 +4671,13 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4671
4671
  o(U);
4672
4672
  }
4673
4673
  }
4674
- }, p = Ms.safeParse({ email: n, password: a }).success;
4675
- return /* @__PURE__ */ r("div", { className: "flex justify-center items-center min-h-screen bg-slate-50", children: /* @__PURE__ */ u(ls, { className: "w-full max-w-md", children: [
4676
- /* @__PURE__ */ u(os, { children: [
4677
- /* @__PURE__ */ r(cs, { className: "text-2xl", children: "Sign in" }),
4674
+ }, p = Fs.safeParse({ email: n, password: a }).success;
4675
+ 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: [
4676
+ /* @__PURE__ */ u(cs, { children: [
4677
+ /* @__PURE__ */ r(us, { className: "text-2xl", children: "Sign in" }),
4678
4678
  /* @__PURE__ */ r(Ai, { children: "Enter your credentials to sign in to visual builder" })
4679
4679
  ] }),
4680
- /* @__PURE__ */ r(us, { children: /* @__PURE__ */ u("form", { onSubmit: y, className: "space-y-4", children: [
4680
+ /* @__PURE__ */ r(ds, { children: /* @__PURE__ */ u("form", { onSubmit: y, className: "space-y-4", children: [
4681
4681
  /* @__PURE__ */ u("div", { className: "space-y-1", children: [
4682
4682
  /* @__PURE__ */ r(Z, { htmlFor: "email", children: "Email" }),
4683
4683
  /* @__PURE__ */ r(
@@ -4713,7 +4713,7 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4713
4713
  type: "button",
4714
4714
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",
4715
4715
  onClick: () => h(!c),
4716
- children: c ? /* @__PURE__ */ r(sl, { className: "h-4 w-4" }) : /* @__PURE__ */ r(Lr, { className: "h-4 w-4" })
4716
+ children: c ? /* @__PURE__ */ r(sl, { className: "h-4 w-4" }) : /* @__PURE__ */ r(Dr, { className: "h-4 w-4" })
4717
4717
  }
4718
4718
  )
4719
4719
  ] }),
@@ -4727,13 +4727,13 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4727
4727
  className: "w-full",
4728
4728
  disabled: !p || E.isPending,
4729
4729
  children: E.isPending ? /* @__PURE__ */ u(we, { children: [
4730
- /* @__PURE__ */ r(Dr, { className: "mr-2 h-4 w-4 animate-spin" }),
4730
+ /* @__PURE__ */ r(Gr, { className: "mr-2 h-4 w-4 animate-spin" }),
4731
4731
  "Logging in..."
4732
4732
  ] }) : "Login"
4733
4733
  }
4734
4734
  )
4735
4735
  ] }) }),
4736
- /* @__PURE__ */ u(ds, { className: "flex flex-col justify-center", children: [
4736
+ /* @__PURE__ */ u(hs, { className: "flex flex-col justify-center", children: [
4737
4737
  /* @__PURE__ */ u("p", { className: "text-sm text-muted-foreground", children: [
4738
4738
  "Forgot your password?",
4739
4739
  " ",
@@ -4775,9 +4775,9 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4775
4775
  ] })
4776
4776
  ] }) });
4777
4777
  };
4778
- let Vr = zo;
4779
- const Wo = () => Y(() => Vr, []), Zu = (e) => {
4780
- Vr = e;
4778
+ let Wn = zo;
4779
+ const Wo = () => Y(() => Wn, [Wn]), Zu = (e) => {
4780
+ Wn = e;
4781
4781
  }, Yo = () => {
4782
4782
  const e = Wo();
4783
4783
  return /* @__PURE__ */ r(Xa, { fallback: /* @__PURE__ */ r("div", { children: "Loading..." }), children: /* @__PURE__ */ r(e, {}) });
@@ -4822,9 +4822,9 @@ function Ze({
4822
4822
  value: S,
4823
4823
  type: g(S)
4824
4824
  })).filter((p) => n === "value" ? p.type === "value" || p.type === "object" : n === "array" ? p.type === "array" || p.type === "object" : n === "object" ? p.type === "object" : !0), [c, n]);
4825
- return /* @__PURE__ */ u(mr, { open: a, onOpenChange: i, children: [
4826
- /* @__PURE__ */ u(hs, { children: [
4827
- /* @__PURE__ */ r(ms, { asChild: !0, children: /* @__PURE__ */ r(fr, { asChild: !0, children: /* @__PURE__ */ r(
4825
+ return /* @__PURE__ */ u(fr, { open: a, onOpenChange: i, children: [
4826
+ /* @__PURE__ */ u(ms, { children: [
4827
+ /* @__PURE__ */ r(fs, { asChild: !0, children: /* @__PURE__ */ r(gr, { asChild: !0, children: /* @__PURE__ */ r(
4828
4828
  _,
4829
4829
  {
4830
4830
  size: "sm",
@@ -4836,15 +4836,15 @@ function Ze({
4836
4836
  children: /* @__PURE__ */ r(al, { className: "h-3 w-3" })
4837
4837
  }
4838
4838
  ) }) }),
4839
- /* @__PURE__ */ r(fs, { children: "Add field" })
4839
+ /* @__PURE__ */ r(gs, { children: "Add field" })
4840
4840
  ] }),
4841
- /* @__PURE__ */ r(gr, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ u(xi, { children: [
4841
+ /* @__PURE__ */ r(pr, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ u(xi, { children: [
4842
4842
  /* @__PURE__ */ r(Ti, { className: "border-none", placeholder: "Search..." }),
4843
4843
  /* @__PURE__ */ u(Ci, { children: [
4844
4844
  /* @__PURE__ */ r(Pi, { children: "No option found." }),
4845
4845
  /* @__PURE__ */ u(_i, { children: [
4846
4846
  l.length > 0 && /* @__PURE__ */ u(
4847
- Ds,
4847
+ Gs,
4848
4848
  {
4849
4849
  onSelect: E,
4850
4850
  className: "flex items-center text-sm",
@@ -4855,7 +4855,7 @@ function Ze({
4855
4855
  }
4856
4856
  ),
4857
4857
  y.map((p) => /* @__PURE__ */ u(
4858
- Ds,
4858
+ Gs,
4859
4859
  {
4860
4860
  onSelect: () => d(p),
4861
4861
  className: "flex items-center justify-between",
@@ -4907,7 +4907,7 @@ const Zo = () => {
4907
4907
  newCursorPos: y
4908
4908
  };
4909
4909
  }, $r = () => {
4910
- const { t: e } = ci(), { selectedLang: t, fallbackLang: n, languages: s } = dt(), [, a] = ui(), { data: i } = Re(), { data: l } = Mr({
4910
+ const { t: e } = ci(), { selectedLang: t, fallbackLang: n, languages: s } = dt(), [, a] = ui(), { data: i } = Re(), { data: l } = Fr({
4911
4911
  lang: t || n,
4912
4912
  pageType: i == null ? void 0 : i.pageType
4913
4913
  }), { data: o, isFetching: c } = Zo(), h = o == null ? void 0 : o.seo, g = ut(
@@ -4925,7 +4925,7 @@ const Zo = () => {
4925
4925
  searchDescription: "",
4926
4926
  jsonLD: "",
4927
4927
  ...h
4928
- }), y = ut({ initial: d, updated: d }), p = t.length ? t : n, { mutate: S, isPending: v } = ws(), x = v, { hasPermission: U } = sn(), b = U(de.EDIT_SEO);
4928
+ }), y = ut({ initial: d, updated: d }), p = t.length ? t : n, { mutate: S, isPending: v } = Ss(), x = v, { hasPermission: U } = sn(), b = U(de.EDIT_SEO);
4929
4929
  Se(() => {
4930
4930
  !c && h && E({
4931
4931
  title: "",
@@ -5004,7 +5004,7 @@ const Zo = () => {
5004
5004
  E(q), y.current.updated = q;
5005
5005
  };
5006
5006
  return /* @__PURE__ */ u("div", { className: "relative h-full flex flex-col", children: [
5007
- !b && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ r(pr, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ r(Ii, { children: e(
5007
+ !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(
5008
5008
  "You don't have permission to edit SEO settings. Contact your administrator for access."
5009
5009
  ) }) }) }),
5010
5010
  /* @__PURE__ */ u("div", { className: "flex-grow overflow-y-auto no-scrollbar px-2", children: [
@@ -5341,7 +5341,7 @@ const Zo = () => {
5341
5341
  size: "lg",
5342
5342
  variant: "default",
5343
5343
  onClick: w,
5344
- disabled: as(y.current.initial, d) || x || !b,
5344
+ disabled: is(y.current.initial, d) || x || !b,
5345
5345
  children: e(v ? "Saving..." : "Save")
5346
5346
  }
5347
5347
  ) })
@@ -5392,16 +5392,16 @@ const zr = "seo", ec = ({
5392
5392
  /* @__PURE__ */ u(Gi, { className: "w-auto p-4 space-y-2", children: [
5393
5393
  /* @__PURE__ */ r("div", { className: "text-sm font-medium", children: e.name ?? e.email }),
5394
5394
  /* @__PURE__ */ r("div", { className: "text-xs text-muted-foreground", children: e.email }),
5395
- /* @__PURE__ */ u(rr, { children: [
5396
- /* @__PURE__ */ r(ar, { asChild: !0, children: /* @__PURE__ */ r(_, { variant: "outline", size: "sm", className: "w-full", children: "Logout" }) }),
5397
- /* @__PURE__ */ u(ir, { children: [
5398
- /* @__PURE__ */ u(lr, { children: [
5399
- /* @__PURE__ */ r(or, { children: "Are you sure you want to logout?" }),
5400
- /* @__PURE__ */ r(cr, { children: "You will be redirected to the login page." })
5395
+ /* @__PURE__ */ u(ar, { children: [
5396
+ /* @__PURE__ */ r(ir, { asChild: !0, children: /* @__PURE__ */ r(_, { variant: "outline", size: "sm", className: "w-full", children: "Logout" }) }),
5397
+ /* @__PURE__ */ u(lr, { children: [
5398
+ /* @__PURE__ */ u(or, { children: [
5399
+ /* @__PURE__ */ r(cr, { children: "Are you sure you want to logout?" }),
5400
+ /* @__PURE__ */ r(ur, { children: "You will be redirected to the login page." })
5401
5401
  ] }),
5402
- /* @__PURE__ */ u(ur, { children: [
5403
- /* @__PURE__ */ r(dr, { children: "Cancel" }),
5404
- /* @__PURE__ */ r(hr, { onClick: () => t(), children: "Logout" })
5402
+ /* @__PURE__ */ u(dr, { children: [
5403
+ /* @__PURE__ */ r(hr, { children: "Cancel" }),
5404
+ /* @__PURE__ */ r(mr, { onClick: () => t(), children: "Logout" })
5405
5405
  ] })
5406
5406
  ] })
5407
5407
  ] })
@@ -5419,13 +5419,13 @@ var O = {
5419
5419
  effects: void 0,
5420
5420
  done: !1,
5421
5421
  getContextId() {
5422
- return Fs(this.context.count);
5422
+ return qs(this.context.count);
5423
5423
  },
5424
5424
  getNextContextId() {
5425
- return Fs(this.context.count++);
5425
+ return qs(this.context.count++);
5426
5426
  }
5427
5427
  };
5428
- function Fs(e) {
5428
+ function qs(e) {
5429
5429
  const t = String(e), n = t.length - 1;
5430
5430
  return O.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
5431
5431
  }
@@ -5439,14 +5439,14 @@ var ic = (e, t) => e === t, Cn = Symbol("solid-proxy"), Wr = typeof Proxy == "fu
5439
5439
  cleanups: null,
5440
5440
  context: null,
5441
5441
  owner: null
5442
- }, Kn = {}, J = null, Vn = null, lc = null, ae = null, _e = null, Je = null, On = 0;
5442
+ }, Kn = {}, J = null, Vn = null, lc = null, ae = null, Ie = null, Je = null, On = 0;
5443
5443
  function ot(e, t) {
5444
5444
  const n = ae, s = J, a = e.length === 0, i = t === void 0 ? s : t, l = a ? Xr : {
5445
5445
  owned: null,
5446
5446
  cleanups: null,
5447
5447
  context: i ? i.context : null,
5448
5448
  owner: i
5449
- }, o = a ? e : () => e(() => Pe(() => qt(l)));
5449
+ }, o = a ? e : () => e(() => _e(() => qt(l)));
5450
5450
  J = l, ae = null;
5451
5451
  try {
5452
5452
  return We(o, !0);
@@ -5520,20 +5520,20 @@ function uc(e, t, n) {
5520
5520
  h = !1;
5521
5521
  const q = d ? d() : s;
5522
5522
  if (q == null || q === !1) {
5523
- T(l, Pe(y));
5523
+ T(l, _e(y));
5524
5524
  return;
5525
5525
  }
5526
- const A = o !== Kn ? o : Pe(
5526
+ const A = o !== Kn ? o : _e(
5527
5527
  () => a(q, {
5528
5528
  value: y(),
5529
5529
  refetching: k
5530
5530
  })
5531
5531
  );
5532
- return cc(A) ? (l = A, "value" in A ? (A.status === "success" ? T(l, A.value, void 0, q) : T(l, void 0, Wn(A.value), q), A) : (h = !0, queueMicrotask(() => h = !1), We(() => {
5532
+ 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(() => {
5533
5533
  w(g ? "refreshing" : "pending"), U();
5534
5534
  }, !1), A.then(
5535
5535
  (M) => T(A, M, void 0, q),
5536
- (M) => T(A, void 0, Wn(M), q)
5536
+ (M) => T(A, void 0, Yn(M), q)
5537
5537
  ))) : (T(l, A, void 0, q), A);
5538
5538
  }
5539
5539
  return Object.defineProperties(ee, {
@@ -5570,7 +5570,7 @@ function uc(e, t, n) {
5570
5570
  function Ju(e) {
5571
5571
  return We(e, !1);
5572
5572
  }
5573
- function Pe(e) {
5573
+ function _e(e) {
5574
5574
  if (ae === null)
5575
5575
  return e();
5576
5576
  const t = ae;
@@ -5594,17 +5594,17 @@ function ed(e, t, n) {
5594
5594
  o = e();
5595
5595
  if (i)
5596
5596
  return i = !1, l;
5597
- const c = Pe(() => t(o, a, l));
5597
+ const c = _e(() => t(o, a, l));
5598
5598
  return a = o, c;
5599
5599
  };
5600
5600
  }
5601
5601
  function dc(e) {
5602
- Zr(() => Pe(e));
5602
+ Zr(() => _e(e));
5603
5603
  }
5604
5604
  function Ft(e) {
5605
5605
  return J === null || (J.cleanups === null ? J.cleanups = [e] : J.cleanups.push(e)), e;
5606
5606
  }
5607
- function qs() {
5607
+ function Hs() {
5608
5608
  return J;
5609
5609
  }
5610
5610
  function hc(e, t) {
@@ -5613,7 +5613,7 @@ function hc(e, t) {
5613
5613
  try {
5614
5614
  return We(t, !0);
5615
5615
  } catch (a) {
5616
- xs(a);
5616
+ Ts(a);
5617
5617
  } finally {
5618
5618
  J = n, ae = s;
5619
5619
  }
@@ -5643,7 +5643,7 @@ function rd(e) {
5643
5643
  return J && J.context && (t = J.context[e.id]) !== void 0 ? t : e.defaultValue;
5644
5644
  }
5645
5645
  function Jr(e) {
5646
- const t = Ge(e), n = Ge(() => Yn(t()));
5646
+ const t = Ge(e), n = Ge(() => Qn(t()));
5647
5647
  return n.toArray = () => {
5648
5648
  const s = n();
5649
5649
  return Array.isArray(s) ? s : s != null ? [s] : [];
@@ -5655,8 +5655,8 @@ function ea() {
5655
5655
  if (this.state === nt)
5656
5656
  Lt(this);
5657
5657
  else {
5658
- const e = _e;
5659
- _e = null, We(() => kn(this), !1), _e = e;
5658
+ const e = Ie;
5659
+ Ie = null, We(() => kn(this), !1), Ie = e;
5660
5660
  }
5661
5661
  if (ae) {
5662
5662
  const e = this.observers ? this.observers.length : 0;
@@ -5669,10 +5669,10 @@ function ta(e, t, n) {
5669
5669
  return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && We(() => {
5670
5670
  for (let a = 0; a < e.observers.length; a += 1) {
5671
5671
  const i = e.observers[a], l = Vn && Vn.running;
5672
- l && Vn.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? _e.push(i) : Je.push(i), i.observers && sa(i)), l || (i.state = nt);
5672
+ l && Vn.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? Ie.push(i) : Je.push(i), i.observers && sa(i)), l || (i.state = nt);
5673
5673
  }
5674
- if (_e.length > 1e6)
5675
- throw _e = [], new Error();
5674
+ if (Ie.length > 1e6)
5675
+ throw Ie = [], new Error();
5676
5676
  }, !1)), t;
5677
5677
  }
5678
5678
  function Lt(e) {
@@ -5693,7 +5693,7 @@ function pc(e, t, n) {
5693
5693
  try {
5694
5694
  s = e.fn(t);
5695
5695
  } catch (l) {
5696
- return e.pure && (e.state = nt, e.owned && e.owned.forEach(qt), e.owned = null), e.updatedAt = n + 1, xs(l);
5696
+ return e.pure && (e.state = nt, e.owned && e.owned.forEach(qt), e.owned = null), e.updatedAt = n + 1, Ts(l);
5697
5697
  } finally {
5698
5698
  ae = i, J = a;
5699
5699
  }
@@ -5720,7 +5720,7 @@ function In(e) {
5720
5720
  return;
5721
5721
  if (e.state === _n)
5722
5722
  return kn(e);
5723
- if (e.suspense && Pe(e.suspense.inFallback))
5723
+ if (e.suspense && _e(e.suspense.inFallback))
5724
5724
  return e.suspense.effects.push(e);
5725
5725
  const t = [e];
5726
5726
  for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < On); )
@@ -5729,24 +5729,24 @@ function In(e) {
5729
5729
  if (e = t[n], e.state === nt)
5730
5730
  Lt(e);
5731
5731
  else if (e.state === _n) {
5732
- const s = _e;
5733
- _e = null, We(() => kn(e, t[0]), !1), _e = s;
5732
+ const s = Ie;
5733
+ Ie = null, We(() => kn(e, t[0]), !1), Ie = s;
5734
5734
  }
5735
5735
  }
5736
5736
  function We(e, t) {
5737
- if (_e)
5737
+ if (Ie)
5738
5738
  return e();
5739
5739
  let n = !1;
5740
- t || (_e = []), Je ? n = !0 : Je = [], On++;
5740
+ t || (Ie = []), Je ? n = !0 : Je = [], On++;
5741
5741
  try {
5742
5742
  const s = e();
5743
5743
  return yc(n), s;
5744
5744
  } catch (s) {
5745
- n || (Je = null), _e = null, xs(s);
5745
+ n || (Je = null), Ie = null, Ts(s);
5746
5746
  }
5747
5747
  }
5748
5748
  function yc(e) {
5749
- if (_e && (na(_e), _e = null), e)
5749
+ if (Ie && (na(Ie), Ie = null), e)
5750
5750
  return;
5751
5751
  const t = Je;
5752
5752
  Je = null, t.length && We(() => Qr(t), !1);
@@ -5784,7 +5784,7 @@ function kn(e, t) {
5784
5784
  function sa(e) {
5785
5785
  for (let t = 0; t < e.observers.length; t += 1) {
5786
5786
  const n = e.observers[t];
5787
- n.state || (n.state = _n, n.pure ? _e.push(n) : Je.push(n), n.observers && sa(n));
5787
+ n.state || (n.state = _n, n.pure ? Ie.push(n) : Je.push(n), n.observers && sa(n));
5788
5788
  }
5789
5789
  }
5790
5790
  function qt(e) {
@@ -5814,21 +5814,21 @@ function qt(e) {
5814
5814
  }
5815
5815
  e.state = 0;
5816
5816
  }
5817
- function Wn(e) {
5817
+ function Yn(e) {
5818
5818
  return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
5819
5819
  cause: e
5820
5820
  });
5821
5821
  }
5822
- function xs(e, t = J) {
5823
- throw Wn(e);
5822
+ function Ts(e, t = J) {
5823
+ throw Yn(e);
5824
5824
  }
5825
- function Yn(e) {
5825
+ function Qn(e) {
5826
5826
  if (typeof e == "function" && !e.length)
5827
- return Yn(e());
5827
+ return Qn(e());
5828
5828
  if (Array.isArray(e)) {
5829
5829
  const t = [];
5830
5830
  for (let n = 0; n < e.length; n++) {
5831
- const s = Yn(e[n]);
5831
+ const s = Qn(e[n]);
5832
5832
  Array.isArray(s) ? t.push.apply(t, s) : t.push(s);
5833
5833
  }
5834
5834
  return t;
@@ -5839,7 +5839,7 @@ function Ec(e, t) {
5839
5839
  return function(s) {
5840
5840
  let a;
5841
5841
  return ct(
5842
- () => a = Pe(() => (J.context = {
5842
+ () => a = _e(() => (J.context = {
5843
5843
  ...J.context,
5844
5844
  [e]: s.value
5845
5845
  }, Jr(() => s.children))),
@@ -5847,7 +5847,7 @@ function Ec(e, t) {
5847
5847
  ), a;
5848
5848
  };
5849
5849
  }
5850
- var Qn = Symbol("fallback");
5850
+ var Xn = Symbol("fallback");
5851
5851
  function Ln(e) {
5852
5852
  for (let t = 0; t < e.length; t++)
5853
5853
  e[t]();
@@ -5856,10 +5856,10 @@ function bc(e, t, n = {}) {
5856
5856
  let s = [], a = [], i = [], l = 0, o = t.length > 1 ? [] : null;
5857
5857
  return Ft(() => Ln(i)), () => {
5858
5858
  let c = e() || [], h = c.length, g, d;
5859
- return c[Yr], Pe(() => {
5859
+ return c[Yr], _e(() => {
5860
5860
  let y, p, S, v, x, U, b, w, T;
5861
5861
  if (h === 0)
5862
- l !== 0 && (Ln(i), i = [], s = [], a = [], l = 0, o && (o = [])), n.fallback && (s = [Qn], a[0] = ot((D) => (i[0] = D, n.fallback())), l = 1);
5862
+ l !== 0 && (Ln(i), i = [], s = [], a = [], l = 0, o && (o = [])), n.fallback && (s = [Xn], a[0] = ot((D) => (i[0] = D, n.fallback())), l = 1);
5863
5863
  else if (l === 0) {
5864
5864
  for (a = new Array(h), d = 0; d < h; d++)
5865
5865
  s[d] = c[d], a[d] = ot(E);
@@ -5892,10 +5892,10 @@ function wc(e, t, n = {}) {
5892
5892
  let s = [], a = [], i = [], l = [], o = 0, c;
5893
5893
  return Ft(() => Ln(i)), () => {
5894
5894
  const h = e() || [], g = h.length;
5895
- return h[Yr], Pe(() => {
5895
+ return h[Yr], _e(() => {
5896
5896
  if (g === 0)
5897
- return o !== 0 && (Ln(i), i = [], s = [], a = [], o = 0, l = []), n.fallback && (s = [Qn], a[0] = ot((E) => (i[0] = E, n.fallback())), o = 1), a;
5898
- for (s[0] === Qn && (i[0](), i = [], s = [], a = [], o = 0), c = 0; c < g; c++)
5897
+ return o !== 0 && (Ln(i), i = [], s = [], a = [], o = 0, l = []), n.fallback && (s = [Xn], a[0] = ot((E) => (i[0] = E, n.fallback())), o = 1), a;
5898
+ for (s[0] === Xn && (i[0](), i = [], s = [], a = [], o = 0), c = 0; c < g; c++)
5899
5899
  c < s.length && s[c] !== h[c] ? l[c](() => h[c]) : c >= s.length && (a[c] = ot(d));
5900
5900
  for (; c < s.length; c++)
5901
5901
  i[c]();
@@ -5909,12 +5909,12 @@ function wc(e, t, n = {}) {
5909
5909
  };
5910
5910
  }
5911
5911
  function ra(e, t) {
5912
- return Pe(() => e(t || {}));
5912
+ return _e(() => e(t || {}));
5913
5913
  }
5914
5914
  function vn() {
5915
5915
  return !0;
5916
5916
  }
5917
- var Xn = {
5917
+ var Zn = {
5918
5918
  get(e, t, n) {
5919
5919
  return t === Cn ? n : e.get(t);
5920
5920
  },
@@ -5977,7 +5977,7 @@ function aa(...e) {
5977
5977
  return [...new Set(l)];
5978
5978
  }
5979
5979
  },
5980
- Xn
5980
+ Zn
5981
5981
  );
5982
5982
  const n = {}, s = /* @__PURE__ */ Object.create(null);
5983
5983
  for (let l = e.length - 1; l >= 0; l--) {
@@ -6023,7 +6023,7 @@ function Nc(e, ...t) {
6023
6023
  return l.filter((o) => o in e);
6024
6024
  }
6025
6025
  },
6026
- Xn
6026
+ Zn
6027
6027
  ));
6028
6028
  return i.push(
6029
6029
  new Proxy(
@@ -6038,7 +6038,7 @@ function Nc(e, ...t) {
6038
6038
  return Object.keys(e).filter((l) => !a.has(l));
6039
6039
  }
6040
6040
  },
6041
- Xn
6041
+ Zn
6042
6042
  )
6043
6043
  ), i;
6044
6044
  }
@@ -6067,7 +6067,7 @@ function ia(e) {
6067
6067
  }
6068
6068
  let l;
6069
6069
  return Ge(
6070
- () => (l = t()) ? Pe(() => {
6070
+ () => (l = t()) ? _e(() => {
6071
6071
  if (!i || O.done)
6072
6072
  return l(a);
6073
6073
  const o = O.context;
@@ -6105,10 +6105,10 @@ function od(e) {
6105
6105
  const s = n();
6106
6106
  if (s) {
6107
6107
  const a = e.children;
6108
- return typeof a == "function" && a.length > 0 ? Pe(
6108
+ return typeof a == "function" && a.length > 0 ? _e(
6109
6109
  () => a(
6110
6110
  t ? s : () => {
6111
- if (!Pe(n))
6111
+ if (!_e(n))
6112
6112
  throw la("Show");
6113
6113
  return e.when;
6114
6114
  }
@@ -6145,10 +6145,10 @@ function cd(e) {
6145
6145
  if (i < 0)
6146
6146
  return e.fallback;
6147
6147
  const c = o.children;
6148
- return typeof c == "function" && c.length > 0 ? Pe(
6148
+ return typeof c == "function" && c.length > 0 ? _e(
6149
6149
  () => c(
6150
6150
  t ? l : () => {
6151
- if (Pe(a)[0] !== i)
6151
+ if (_e(a)[0] !== i)
6152
6152
  throw la("Match");
6153
6153
  return o.when;
6154
6154
  }
@@ -6388,7 +6388,7 @@ var Ot = "_$DX_DELEGATE";
6388
6388
  function oa(e, t, n, s = {}) {
6389
6389
  let a;
6390
6390
  return ot((i) => {
6391
- a = i, t === document ? e() : Jn(t, e(), t.firstChild ? null : void 0, n);
6391
+ a = i, t === document ? e() : es(t, e(), t.firstChild ? null : void 0, n);
6392
6392
  }, s.owner), () => {
6393
6393
  a(), t.textContent = "";
6394
6394
  };
@@ -6415,7 +6415,7 @@ function hd(e = window.document) {
6415
6415
  delete e[Ot];
6416
6416
  }
6417
6417
  }
6418
- function Zn(e, t, n) {
6418
+ function Jn(e, t, n) {
6419
6419
  ht(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
6420
6420
  }
6421
6421
  function Rc(e, t, n, s) {
@@ -6441,17 +6441,17 @@ function Fc(e, t, n = {}) {
6441
6441
  let i, l;
6442
6442
  for (i = 0, l = a.length; i < l; i++) {
6443
6443
  const o = a[i];
6444
- !o || o === "undefined" || t[o] || (Hs(e, o, !1), delete n[o]);
6444
+ !o || o === "undefined" || t[o] || (Ks(e, o, !1), delete n[o]);
6445
6445
  }
6446
6446
  for (i = 0, l = s.length; i < l; i++) {
6447
6447
  const o = s[i], c = !!t[o];
6448
- !o || o === "undefined" || n[o] === c || !c || (Hs(e, o, !0), n[o] = c);
6448
+ !o || o === "undefined" || n[o] === c || !c || (Ks(e, o, !0), n[o] = c);
6449
6449
  }
6450
6450
  return n;
6451
6451
  }
6452
6452
  function qc(e, t, n) {
6453
6453
  if (!t)
6454
- return n ? Zn(e, "style") : t;
6454
+ return n ? Jn(e, "style") : t;
6455
6455
  const s = e.style;
6456
6456
  if (typeof t == "string")
6457
6457
  return s.cssText = t;
@@ -6470,9 +6470,9 @@ function Hc(e, t = {}, n, s) {
6470
6470
  ), ct(() => typeof t.ref == "function" && Kc(t.ref, e)), ct(() => Vc(e, t, n, !0, a, !0)), a;
6471
6471
  }
6472
6472
  function Kc(e, t, n) {
6473
- return Pe(() => e(t, n));
6473
+ return _e(() => e(t, n));
6474
6474
  }
6475
- function Jn(e, t, n, s) {
6475
+ function es(e, t, n, s) {
6476
6476
  if (n !== void 0 && !s && (s = []), typeof t != "function")
6477
6477
  return Ht(e, t, s, n);
6478
6478
  ct((a) => Ht(e, t(), a, n), s);
@@ -6483,13 +6483,13 @@ function Vc(e, t, n, s, a = {}, i = !1) {
6483
6483
  if (!(l in t)) {
6484
6484
  if (l === "children")
6485
6485
  continue;
6486
- a[l] = Ks(e, l, null, a[l], n, i, t);
6486
+ a[l] = Vs(e, l, null, a[l], n, i, t);
6487
6487
  }
6488
6488
  for (const l in t) {
6489
6489
  if (l === "children")
6490
6490
  continue;
6491
6491
  const o = t[l];
6492
- a[l] = Ks(e, l, o, a[l], n, i, t);
6492
+ a[l] = Vs(e, l, o, a[l], n, i, t);
6493
6493
  }
6494
6494
  }
6495
6495
  function jc(e) {
@@ -6502,12 +6502,12 @@ function ht(e) {
6502
6502
  function $c(e) {
6503
6503
  return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
6504
6504
  }
6505
- function Hs(e, t, n) {
6505
+ function Ks(e, t, n) {
6506
6506
  const s = t.trim().split(/\s+/);
6507
6507
  for (let a = 0, i = s.length; a < i; a++)
6508
6508
  e.classList.toggle(s[a], n);
6509
6509
  }
6510
- function Ks(e, t, n, s, a, i, l) {
6510
+ function Vs(e, t, n, s, a, i, l) {
6511
6511
  let o, c, h, g, d;
6512
6512
  if (t === "style")
6513
6513
  return qc(e, n, s);
@@ -6531,7 +6531,7 @@ function Ks(e, t, n, s, a, i, l) {
6531
6531
  }
6532
6532
  (y || n) && (Mc(e, E, n, y), y && Uc([E]));
6533
6533
  } else if (t.slice(0, 5) === "attr:")
6534
- Zn(e, t.slice(5), n);
6534
+ Jn(e, t.slice(5), n);
6535
6535
  else if (t.slice(0, 5) === "bool:")
6536
6536
  Oc(e, t.slice(5), n);
6537
6537
  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)) {
@@ -6542,7 +6542,7 @@ function Ks(e, t, n, s, a, i, l) {
6542
6542
  t === "class" || t === "className" ? Bc(e, n) : o && !c && !h ? e[$c(t)] = n : e[g || t] = n;
6543
6543
  } else {
6544
6544
  const E = a && t.indexOf(":") > -1 && Dc[t.split(":")[0]];
6545
- E ? Rc(e, E, t, n) : Zn(e, Pc[t] || t, n);
6545
+ E ? Rc(e, E, t, n) : Jn(e, Pc[t] || t, n);
6546
6546
  }
6547
6547
  return n;
6548
6548
  }
@@ -6623,7 +6623,7 @@ function Ht(e, t, n, s, a) {
6623
6623
  }), () => n;
6624
6624
  if (Array.isArray(t)) {
6625
6625
  const c = [], h = n && Array.isArray(n);
6626
- if (es(c, t, n, a))
6626
+ if (ts(c, t, n, a))
6627
6627
  return ct(() => n = Ht(e, c, n, s, !0)), () => n;
6628
6628
  if (i) {
6629
6629
  if (!c.length)
@@ -6641,7 +6641,7 @@ function Ht(e, t, n, s, a) {
6641
6641
  if (c.length === 0) {
6642
6642
  if (n = mt(e, n, s), o)
6643
6643
  return n;
6644
- } else h ? n.length === 0 ? Vs(e, c, s) : Gc(e, n, c) : (n && mt(e), Vs(e, c));
6644
+ } else h ? n.length === 0 ? js(e, c, s) : Gc(e, n, c) : (n && mt(e), js(e, c));
6645
6645
  n = c;
6646
6646
  } else if (t.nodeType) {
6647
6647
  if (i && t.parentNode)
@@ -6656,7 +6656,7 @@ function Ht(e, t, n, s, a) {
6656
6656
  }
6657
6657
  return n;
6658
6658
  }
6659
- function es(e, t, n, s) {
6659
+ function ts(e, t, n, s) {
6660
6660
  let a = !1;
6661
6661
  for (let i = 0, l = t.length; i < l; i++) {
6662
6662
  let o = t[i], c = n && n[e.length], h;
@@ -6664,12 +6664,12 @@ function es(e, t, n, s) {
6664
6664
  if ((h = typeof o) == "object" && o.nodeType)
6665
6665
  e.push(o);
6666
6666
  else if (Array.isArray(o))
6667
- a = es(e, o, c) || a;
6667
+ a = ts(e, o, c) || a;
6668
6668
  else if (h === "function")
6669
6669
  if (s) {
6670
6670
  for (; typeof o == "function"; )
6671
6671
  o = o();
6672
- a = es(
6672
+ a = ts(
6673
6673
  e,
6674
6674
  Array.isArray(o) ? o : [o],
6675
6675
  Array.isArray(c) ? c : [c]
@@ -6683,7 +6683,7 @@ function es(e, t, n, s) {
6683
6683
  }
6684
6684
  return a;
6685
6685
  }
6686
- function Vs(e, t, n = null) {
6686
+ function js(e, t, n = null) {
6687
6687
  for (let s = 0, a = t.length; s < a; s++)
6688
6688
  e.insertBefore(t[s], n);
6689
6689
  }
@@ -6713,15 +6713,15 @@ function ua(e, t = !1) {
6713
6713
  return t ? document.createElementNS(Wc, e) : document.createElement(e);
6714
6714
  }
6715
6715
  function md(e) {
6716
- const { useShadow: t } = e, n = document.createTextNode(""), s = () => e.mount || document.body, a = qs();
6716
+ const { useShadow: t } = e, n = document.createTextNode(""), s = () => e.mount || document.body, a = Hs();
6717
6717
  let i, l = !!O.context;
6718
6718
  return Zr(
6719
6719
  () => {
6720
- l && (qs().user = l = !1), i || (i = hc(a, () => Ge(() => e.children)));
6720
+ l && (Hs().user = l = !1), i || (i = hc(a, () => Ge(() => e.children)));
6721
6721
  const o = s();
6722
6722
  if (o instanceof HTMLHeadElement) {
6723
6723
  const [c, h] = Ee(!1), g = () => h(!0);
6724
- ot((d) => Jn(o, () => c() ? d() : i(), null)), Ft(g);
6724
+ ot((d) => es(o, () => c() ? d() : i(), null)), Ft(g);
6725
6725
  } else {
6726
6726
  const c = ua(e.isSVG ? "g" : "div", e.isSVG), h = t && c.attachShadow ? c.attachShadow({
6727
6727
  mode: "open"
@@ -6731,7 +6731,7 @@ function md(e) {
6731
6731
  return n.parentNode;
6732
6732
  },
6733
6733
  configurable: !0
6734
- }), Jn(h, i), o.appendChild(c), e.ref && e.ref(c), Ft(() => o.removeChild(c));
6734
+ }), es(h, i), o.appendChild(c), e.ref && e.ref(c), Ft(() => o.removeChild(c));
6735
6735
  }
6736
6736
  },
6737
6737
  void 0,
@@ -6746,7 +6746,7 @@ function fd(e) {
6746
6746
  const a = s();
6747
6747
  switch (typeof a) {
6748
6748
  case "function":
6749
- return Pe(() => a(n));
6749
+ return _e(() => a(n));
6750
6750
  case "string":
6751
6751
  const i = Lc.has(a), l = O.context ? jc() : ua(a, i);
6752
6752
  return Hc(l, n, i), l;
@@ -6821,7 +6821,7 @@ function kt(e, t) {
6821
6821
  function xn(e, t) {
6822
6822
  return e.indexOf(t) !== -1;
6823
6823
  }
6824
- function js(e, t) {
6824
+ function $s(e, t) {
6825
6825
  for (let n = 0; n < e.length; n++) {
6826
6826
  const s = e[n];
6827
6827
  if (t(s))
@@ -6841,7 +6841,7 @@ var Jc = class {
6841
6841
  findByName(e) {
6842
6842
  return this.transfomers[e];
6843
6843
  }
6844
- }, 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, ts = (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, Vt = (e) => e instanceof Map, jt = (e) => e instanceof Set, ma = (e) => eu(e) === "Symbol", iu = (e) => e instanceof Date && !isNaN(e.valueOf()), lu = (e) => e instanceof Error, $s = (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) => {
6844
+ }, 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, Vt = (e) => e instanceof Map, jt = (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) => {
6845
6845
  const t = [];
6846
6846
  let n = "";
6847
6847
  for (let a = 0; a < e.length; a++) {
@@ -6899,7 +6899,7 @@ var ga = [
6899
6899
  (e) => new Set(e)
6900
6900
  ),
6901
6901
  ze(Vt, "map", (e) => [...e.entries()], (e) => new Map(e)),
6902
- ze((e) => $s(e) || uu(e), "number", (e) => $s(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
6902
+ ze((e) => zs(e) || uu(e), "number", (e) => zs(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
6903
6903
  ze((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
6904
6904
  ze(hu, "URL", (e) => e.toString(), (e) => new URL(e))
6905
6905
  ];
@@ -6953,14 +6953,14 @@ var Ea = Mn(va, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
6953
6953
  if (!s)
6954
6954
  throw new Error("Trying to deserialize unknown custom value");
6955
6955
  return s.deserialize(e);
6956
- }), fu = [Ea, pa, ba, ya], zs = (e, t) => {
6957
- const n = js(fu, (a) => a.isApplicable(e, t));
6956
+ }), fu = [Ea, pa, ba, ya], Ws = (e, t) => {
6957
+ const n = $s(fu, (a) => a.isApplicable(e, t));
6958
6958
  if (n)
6959
6959
  return {
6960
6960
  value: n.transform(e, t),
6961
6961
  type: n.annotation(e, t)
6962
6962
  };
6963
- const s = js(ga, (a) => a.isApplicable(e, t));
6963
+ const s = $s(ga, (a) => a.isApplicable(e, t));
6964
6964
  if (s)
6965
6965
  return {
6966
6966
  value: s.transform(e, t),
@@ -7024,7 +7024,7 @@ var pu = (e, t) => {
7024
7024
  e = e[s];
7025
7025
  }
7026
7026
  return e;
7027
- }, ns = (e, t, n) => {
7027
+ }, ss = (e, t, n) => {
7028
7028
  if (Sa(t), t.length === 0)
7029
7029
  return n(e);
7030
7030
  let s = e;
@@ -7073,34 +7073,34 @@ var pu = (e, t) => {
7073
7073
  }
7074
7074
  return e;
7075
7075
  };
7076
- function ss(e, t, n = []) {
7076
+ function rs(e, t, n = []) {
7077
7077
  if (!e)
7078
7078
  return;
7079
7079
  if (!st(e)) {
7080
- kt(e, (i, l) => ss(i, t, [...n, ...Bt(l)]));
7080
+ kt(e, (i, l) => rs(i, t, [...n, ...Bt(l)]));
7081
7081
  return;
7082
7082
  }
7083
7083
  const [s, a] = e;
7084
7084
  a && kt(a, (i, l) => {
7085
- ss(i, t, [...n, ...Bt(l)]);
7085
+ rs(i, t, [...n, ...Bt(l)]);
7086
7086
  }), t(s, n);
7087
7087
  }
7088
7088
  function yu(e, t, n) {
7089
- return ss(t, (s, a) => {
7090
- e = ns(e, a, (i) => gu(i, s, n));
7089
+ return rs(t, (s, a) => {
7090
+ e = ss(e, a, (i) => gu(i, s, n));
7091
7091
  }), e;
7092
7092
  }
7093
7093
  function vu(e, t) {
7094
7094
  function n(s, a) {
7095
7095
  const i = pu(e, Bt(a));
7096
7096
  s.map(Bt).forEach((l) => {
7097
- e = ns(e, l, () => i);
7097
+ e = ss(e, l, () => i);
7098
7098
  });
7099
7099
  }
7100
7100
  if (st(t)) {
7101
7101
  const [s, a] = t;
7102
7102
  s.forEach((i) => {
7103
- e = ns(e, Bt(i), () => e);
7103
+ e = ss(e, Bt(i), () => e);
7104
7104
  }), a && kt(a, n);
7105
7105
  } else
7106
7106
  kt(t, n);
@@ -7120,7 +7120,7 @@ function wu(e, t) {
7120
7120
  t || (a = a.map((o) => o.map(String)).sort((o, c) => o.length - c.length));
7121
7121
  const [i, ...l] = a;
7122
7122
  i.length === 0 ? s = l.map($n) : n[$n(i)] = l.map($n);
7123
- }), s ? ts(n) ? [s] : [s, n] : ts(n) ? void 0 : n;
7123
+ }), s ? ns(n) ? [s] : [s, n] : ns(n) ? void 0 : n;
7124
7124
  }
7125
7125
  var Na = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7126
7126
  const o = ou(e);
@@ -7133,7 +7133,7 @@ var Na = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7133
7133
  } : y;
7134
7134
  }
7135
7135
  if (!Eu(e, n)) {
7136
- const y = zs(e, n), p = y ? {
7136
+ const y = Ws(e, n), p = y ? {
7137
7137
  transformedValue: y.value,
7138
7138
  annotations: [y.type]
7139
7139
  } : {
@@ -7145,7 +7145,7 @@ var Na = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7145
7145
  return {
7146
7146
  transformedValue: null
7147
7147
  };
7148
- const c = zs(e, n), h = (c == null ? void 0 : c.value) ?? e, g = st(h) ? [] : {}, d = {};
7148
+ const c = Ws(e, n), h = (c == null ? void 0 : c.value) ?? e, g = st(h) ? [] : {}, d = {};
7149
7149
  kt(h, (y, p) => {
7150
7150
  if (p === "__proto__" || p === "constructor" || p === "prototype")
7151
7151
  throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
@@ -7154,7 +7154,7 @@ var Na = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7154
7154
  d[fa(p) + "." + x] = v;
7155
7155
  });
7156
7156
  });
7157
- const E = ts(d) ? {
7157
+ const E = ns(d) ? {
7158
7158
  transformedValue: g,
7159
7159
  annotations: c ? [c.type] : void 0
7160
7160
  } : {
@@ -7166,7 +7166,7 @@ var Na = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7166
7166
  function Aa(e) {
7167
7167
  return Object.prototype.toString.call(e).slice(8, -1);
7168
7168
  }
7169
- function Ws(e) {
7169
+ function Ys(e) {
7170
7170
  return Aa(e) === "Array";
7171
7171
  }
7172
7172
  function Su(e) {
@@ -7184,16 +7184,16 @@ function Nu(e, t, n, s, a) {
7184
7184
  configurable: !0
7185
7185
  });
7186
7186
  }
7187
- function rs(e, t = {}) {
7188
- if (Ws(e))
7189
- return e.map((a) => rs(a, t));
7187
+ function as(e, t = {}) {
7188
+ if (Ys(e))
7189
+ return e.map((a) => as(a, t));
7190
7190
  if (!Su(e))
7191
7191
  return e;
7192
7192
  const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
7193
7193
  return [...n, ...s].reduce((a, i) => {
7194
- if (Ws(t.props) && !t.props.includes(i))
7194
+ if (Ys(t.props) && !t.props.includes(i))
7195
7195
  return a;
7196
- const l = e[i], o = rs(l, t);
7196
+ const l = e[i], o = as(l, t);
7197
7197
  return Nu(a, i, o, e, t.nonenumerable), a;
7198
7198
  }, {});
7199
7199
  }
@@ -7220,7 +7220,7 @@ var ie = class {
7220
7220
  }
7221
7221
  deserialize(e) {
7222
7222
  const { json: t, meta: n } = e;
7223
- let s = rs(t);
7223
+ let s = as(t);
7224
7224
  return n != null && n.values && (s = yu(s, n.values, this)), n != null && n.referentialEqualities && (s = vu(s, n.referentialEqualities)), s;
7225
7225
  }
7226
7226
  stringify(e) {
@@ -7364,7 +7364,7 @@ var wd = (e, t = !1) => {
7364
7364
  return;
7365
7365
  const s = document.createElement("style"), a = document.createTextNode("");
7366
7366
  s.appendChild(a), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
7367
- }, gt, $t, zt, Wt, it, Yt, pt, yt, vt, Et, bt, wt, Qt, Ys, Pu = (Ys = class {
7367
+ }, gt, $t, zt, Wt, it, Yt, pt, yt, vt, Et, bt, wt, Qt, Qs, Pu = (Qs = class {
7368
7368
  constructor(e) {
7369
7369
  re(this, gt);
7370
7370
  re(this, $t);
@@ -7414,7 +7414,7 @@ var wd = (e, t = !1) => {
7414
7414
  const t = oa(() => {
7415
7415
  const n = this, [s] = R(this, yt), [a] = R(this, vt), [i] = R(this, Et), [l] = R(this, bt), [o] = R(this, gt);
7416
7416
  let c;
7417
- return R(this, wt) ? c = R(this, wt) : (c = ia(() => import("./HO4MOOFI-DKn2krpW.js")), te(this, wt, c)), Ca(R(this, Yt), R(this, pt)), ra(c, aa({
7417
+ return R(this, wt) ? c = R(this, wt) : (c = ia(() => import("./HO4MOOFI-ReftF839.js")), te(this, wt, c)), Ca(R(this, Yt), R(this, pt)), ra(c, aa({
7418
7418
  get queryFlavor() {
7419
7419
  return R(n, zt);
7420
7420
  },
@@ -7453,7 +7453,7 @@ var wd = (e, t = !1) => {
7453
7453
  throw new Error("Devtools is not mounted");
7454
7454
  (e = R(this, Qt)) == null || e.call(this), te(this, it, !1);
7455
7455
  }
7456
- }, 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(), Ys), St, Xt, Zt, Jt, lt, en, Nt, At, xt, Tt, Ct, Pt, _t, tn, Qs, _u = (Qs = class {
7456
+ }, 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 {
7457
7457
  constructor(e) {
7458
7458
  re(this, St);
7459
7459
  re(this, Xt);
@@ -7508,7 +7508,7 @@ var wd = (e, t = !1) => {
7508
7508
  const t = oa(() => {
7509
7509
  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);
7510
7510
  let h;
7511
- return R(this, _t) ? h = R(this, _t) : (h = ia(() => import("./HUY7CZI3-Ceei1mWg.js")), te(this, _t, h)), Ca(R(this, en), R(this, Nt)), ra(h, aa({
7511
+ return R(this, _t) ? h = R(this, _t) : (h = ia(() => import("./HUY7CZI3-DKB5lU_R.js")), te(this, _t, h)), Ca(R(this, en), R(this, Nt)), ra(h, aa({
7512
7512
  get queryFlavor() {
7513
7513
  return R(n, Zt);
7514
7514
  },
@@ -7550,7 +7550,7 @@ var wd = (e, t = !1) => {
7550
7550
  throw new Error("Devtools is not mounted");
7551
7551
  (e = R(this, tn)) == null || e.call(this), te(this, lt, !1);
7552
7552
  }
7553
- }, 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(), Qs);
7553
+ }, 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);
7554
7554
  function Iu(e) {
7555
7555
  const t = Ne(e.client), n = ue.useRef(null), {
7556
7556
  buttonPosition: s,
@@ -7564,7 +7564,7 @@ function Iu(e) {
7564
7564
  client: t,
7565
7565
  queryFlavor: "React Query",
7566
7566
  version: "5",
7567
- onlineManager: tr,
7567
+ onlineManager: nr,
7568
7568
  buttonPosition: s,
7569
7569
  position: a,
7570
7570
  initialIsOpen: i,
@@ -7593,7 +7593,7 @@ function ku(e) {
7593
7593
  client: t,
7594
7594
  queryFlavor: "React Query",
7595
7595
  version: "5",
7596
- onlineManager: tr,
7596
+ onlineManager: nr,
7597
7597
  buttonPosition: "bottom-left",
7598
7598
  position: "bottom",
7599
7599
  initialIsOpen: !0,
@@ -7626,7 +7626,7 @@ var Lu = process.env.NODE_ENV !== "development" ? function() {
7626
7626
  } : Iu;
7627
7627
  process.env.NODE_ENV;
7628
7628
  const Du = Za(
7629
- () => import("./digital-asset-manager-9FZ7IfFy.js")
7629
+ () => import("./digital-asset-manager-DePlpEGM.js")
7630
7630
  );
7631
7631
  hl();
7632
7632
  nc();
@@ -7640,10 +7640,10 @@ const Gu = (e) => {
7640
7640
  role: "",
7641
7641
  permissions: null
7642
7642
  }
7643
- } = Vo(), { data: o } = Ko(), { data: c, isFetching: h } = Br(), { blocks: g } = Ho(c), { data: d } = un(), { data: E } = ke(), { mutateAsync: y } = Ur(), p = Fo(), { getUILibraryBlock: S, getUILibraryBlocks: v, onSave: x } = jo(), { getPartialBlocks: U, getPartialBlockBlocks: b } = $o(), { aiContext: w, setAiContext: T } = Es(), { mutateAsync: D } = Kl(), [ee, le] = P(!1), k = Y(
7643
+ } = Vo(), { 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 } = jo(), { getPartialBlocks: U, getPartialBlockBlocks: b } = $o(), { aiContext: w, setAiContext: T } = bs(), { mutateAsync: D } = Kl(), [ee, le] = P(!1), k = Y(
7644
7644
  () => (d == null ? void 0 : d.fallbackLang) || "en",
7645
7645
  [d]
7646
- ), { data: q } = Mr({
7646
+ ), { data: q } = Fr({
7647
7647
  pageType: i == null ? void 0 : i.pageType,
7648
7648
  lang: a || k
7649
7649
  });
@@ -7656,7 +7656,7 @@ const Gu = (e) => {
7656
7656
  const A = Y(() => {
7657
7657
  const W = {};
7658
7658
  return l && (W.permissions = ne(l, "permissions", null), W.role = ne(l, "role", "user")), W;
7659
- }, [l]), M = Y(() => o, [o]), se = Ie(
7659
+ }, [l]), M = Y(() => o, [o]), se = Pe(
7660
7660
  async (W, he) => await D({ pageType: W, query: he }),
7661
7661
  [D]
7662
7662
  ), fe = Y(
@@ -7664,7 +7664,7 @@ const Gu = (e) => {
7664
7664
  [d]
7665
7665
  );
7666
7666
  return /* @__PURE__ */ u(we, { children: [
7667
- 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(Dr, { className: "size-5 animate-spin" }) }) }),
7667
+ 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" }) }) }),
7668
7668
  /* @__PURE__ */ r(
7669
7669
  fi,
7670
7670
  {
@@ -7694,7 +7694,7 @@ const Gu = (e) => {
7694
7694
  if (!s) return !0;
7695
7695
  const he = t.current, F = {
7696
7696
  _type: "@chai/ai-context",
7697
- _value: Ls(W) ? W : ""
7697
+ _value: Ds(W) ? W : ""
7698
7698
  }, be = [...he, F];
7699
7699
  return await x({ page: s, blocks: be }), T(W), !0;
7700
7700
  },
@@ -7705,9 +7705,9 @@ const Gu = (e) => {
7705
7705
  t.current = W;
7706
7706
  const F = {
7707
7707
  _type: "@chai/ai-context",
7708
- _value: Ls(w) ? w : ""
7708
+ _value: Ds(w) ? w : ""
7709
7709
  }, be = [...W, F];
7710
- return await x({ page: s, blocks: be }), t.current = be, as(he, fe) || await y({ settings: { theme: he } }), !0;
7710
+ return await x({ page: s, blocks: be }), t.current = be, is(he, fe) || await y({ settings: { theme: he } }), !0;
7711
7711
  },
7712
7712
  themePanelComponent: Zl,
7713
7713
  ...A
@@ -7726,9 +7726,9 @@ const Gu = (e) => {
7726
7726
  }
7727
7727
  }
7728
7728
  }), Td = (e) => {
7729
- const { isLoggedIn: t } = rt(), [, n] = Rr(), [s, a] = P(!1);
7729
+ const { isLoggedIn: t } = rt(), [, n] = Or(), [s, a] = P(!1);
7730
7730
  return Se(() => (n(
7731
- Js(e, [
7731
+ er(e, [
7732
7732
  "apiUrl",
7733
7733
  "usersApiUrl",
7734
7734
  "assetsApiUrl",
@@ -7753,7 +7753,7 @@ export {
7753
7753
  Ju as B,
7754
7754
  hd as C,
7755
7755
  fd as D,
7756
- Pe as E,
7756
+ _e as E,
7757
7757
  id as F,
7758
7758
  oc as G,
7759
7759
  Au as H,
@@ -7796,14 +7796,14 @@ export {
7796
7796
  Nc as h,
7797
7797
  sd as i,
7798
7798
  ct as j,
7799
- Zn as k,
7799
+ Jn as k,
7800
7800
  ad as l,
7801
7801
  Nd as m,
7802
7802
  Ft as n,
7803
7803
  ed as o,
7804
7804
  dc as p,
7805
7805
  Kc as q,
7806
- Jn as r,
7806
+ es as r,
7807
7807
  Sd as s,
7808
7808
  dd as t,
7809
7809
  rd as u,