@chaibuilder/pages 0.10.13 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,16 +12,16 @@ import Hs, { useCallback as ae, useState as S, useEffect as le, useRef as tt, us
12
12
  import { useAtom as Ue, atom as vt } from "jotai";
13
13
  import { useMutation as ke, useQueryClient as Pe, useQuery as De, onlineManager as Yr, QueryClient as Eo, QueryClientProvider as So } from "@tanstack/react-query";
14
14
  import { toast as H } from "sonner";
15
- import { useLanguages as Fe, useSavePage as Wt, useUpdateBlocksPropsRealtime as Xr, PERMISSIONS as Ao, usePartailBlocksStore as To, usePermissions as Pn, useLibraryBlocks as Co, useTheme as ko, useSidebarActivePanel as Ws, useChaiFeatureFlag as Et, mergeClasses as Vn, useRightPanel as Po, registerChaiLibrary as Io, getBlocksFromHTML as _o, useBuilderProp as Lo, useTranslation as Do, registerChaiSidebarPanel as Ts, registerChaiFeatureFlag as Xt, registerChaiTopBar as Oo, registerChaiMediaManager as Ro, registerChaiSaveToLibrary as Go, ChaiBuilderEditor as Uo } from "@chaibuilder/sdk";
16
- import { Tooltip as Xe, TooltipTrigger as Ze, TooltipContent as et, Card as Qs, CardHeader as Js, CardTitle as Ys, CardContent as Xs, CardFooter as Zs, Button as T, Skeleton as Mt, AlertDialog as Zr, AlertDialogTrigger as ei, AlertDialogContent as ti, AlertDialogHeader as ni, AlertDialogTitle as si, AlertDialogDescription as ai, AlertDialogFooter as ri, AlertDialogCancel as ii, AlertDialogAction as li, Popover as Nn, PopoverTrigger as En, PopoverContent as Sn, Input as xe, Label as he, Dialog as je, DialogContent as ze, DialogHeader as Ve, DialogTitle as Ke, DialogDescription as nt, Alert as In, DialogFooter as ut, CommandList as oi, Command as Kn, CommandEmpty as Hn, CommandGroup as _t, CommandItem as ft, Textarea as An, DropdownMenu as _n, DropdownMenuTrigger as Ln, DropdownMenuContent as Dn, DropdownMenuItem as $e, Select as ci, SelectTrigger as di, SelectValue as Bo, SelectContent as ui, SelectItem as an, Badge as xa, TooltipProvider as Ft, Separator as Mo, Sheet as hi, SheetContent as mi, SheetHeader as fi, SheetTitle as gi, SheetDescription as Fo, Switch as La, ScrollArea as Ds, SheetTrigger as $o, DropdownMenuSeparator as qo, CardDescription as jo, CommandInput as zo, Tabs as pi, TabsList as yi, TabsTrigger as Mn, TabsContent as Fn, AlertDescription as vi, HoverCard as Vo, HoverCardTrigger as Ko, HoverCardContent as Ho } from "@chaibuilder/sdk/ui";
17
- import { formatDistanceToNow as bi, formatDate as Wo, format as ea } from "date-fns";
18
- import { LockIcon as xi, LockKeyhole as Qo, UserIcon as Jo, Info as Yo, KeyIcon as Xo, AlertTriangleIcon as Zo, Loader as wt, TableIcon as ec, CheckCircle as wi, Target as tc, Edit as Wn, Check as it, X as Tn, Trash2 as ta, Plus as gs, ImageIcon as Qn, AlertCircle as na, ChevronDown as Lt, Search as Nt, Tag as nc, File as Qt, CopyPlusIcon as sc, Pencil as Ni, Power as Ei, Trash as Xa, SquareLibrary as br, ChevronsUpDown as Si, ChevronsDownUp as Ai, ChevronRight as sa, StarsIcon as Ti, Globe as Za, MoreHorizontal as Cn, Star as Ci, FilterXIcon as ac, Filter as rc, ListFilter as ic, RefreshCw as lc, NotepadText as oc, Lock as ki, Languages as xr, LogsIcon as cc, Folder as dc, FileJson as Da, Copy as Bs, History as uc, Eye as aa, Undo2 as Pi, CloudOff as hc, Rocket as Oa, Save as Ii, GlobeIcon as mc, Palette as fc, Send as wr, Settings as _i, ExternalLink as gc, EyeOff as pc, Loader2 as Li, StarIcon as yc, PencilIcon as vc, TrashIcon as bc, LanguagesIcon as xc, DatabaseIcon as wc, ChevronLeft as er, Sparkle as Nc, Code as Ec, AlertTriangle as Di, User as Sc, Link as Ac, Archive as Tc, Film as Cc, Upload as kc } from "lucide-react";
19
- import Pc from "compressorjs";
20
- import { parseDiff as Ic, Diff as _c, Hunk as Lc } from "react-diff-view";
21
- import { useRegisteredChaiBlocks as Dc, getDefaultBlockProps as Oc } from "@chaibuilder/runtime";
15
+ import { useLanguages as Fe, useSavePage as Wt, useIsPageLoaded as Ao, useUpdateBlocksPropsRealtime as Xr, PERMISSIONS as To, usePartailBlocksStore as Co, usePermissions as Pn, useLibraryBlocks as ko, useTheme as Po, useSidebarActivePanel as Ws, useChaiFeatureFlag as Et, mergeClasses as Vn, useRightPanel as Io, registerChaiLibrary as _o, getBlocksFromHTML as Lo, useBuilderProp as Do, useTranslation as Oo, registerChaiSidebarPanel as Ts, registerChaiFeatureFlag as Xt, registerChaiTopBar as Ro, registerChaiMediaManager as Go, registerChaiSaveToLibrary as Uo, ChaiBuilderEditor as Bo } from "@chaibuilder/sdk";
16
+ import { Tooltip as Xe, TooltipTrigger as Ze, TooltipContent as et, Card as Qs, CardHeader as Js, CardTitle as Ys, CardContent as Xs, CardFooter as Zs, Button as T, Skeleton as Mt, AlertDialog as Zr, AlertDialogTrigger as ei, AlertDialogContent as ti, AlertDialogHeader as ni, AlertDialogTitle as si, AlertDialogDescription as ai, AlertDialogFooter as ri, AlertDialogCancel as ii, AlertDialogAction as li, Popover as Nn, PopoverTrigger as En, PopoverContent as Sn, Input as xe, Label as he, Dialog as je, DialogContent as ze, DialogHeader as Ve, DialogTitle as Ke, DialogDescription as nt, Alert as In, DialogFooter as ut, CommandList as oi, Command as Kn, CommandEmpty as Hn, CommandGroup as _t, CommandItem as ft, Textarea as An, DropdownMenu as _n, DropdownMenuTrigger as Ln, DropdownMenuContent as Dn, DropdownMenuItem as $e, Select as ci, SelectTrigger as di, SelectValue as Mo, SelectContent as ui, SelectItem as an, Badge as xa, TooltipProvider as Ft, Separator as Fo, Sheet as hi, SheetContent as mi, SheetHeader as fi, SheetTitle as gi, SheetDescription as $o, Switch as La, ScrollArea as Ds, SheetTrigger as qo, DropdownMenuSeparator as jo, CardDescription as zo, CommandInput as Vo, Tabs as pi, TabsList as yi, TabsTrigger as Mn, TabsContent as Fn, AlertDescription as vi, HoverCard as Ko, HoverCardTrigger as Ho, HoverCardContent as Wo } from "@chaibuilder/sdk/ui";
17
+ import { formatDistanceToNow as bi, formatDate as Qo, format as ea } from "date-fns";
18
+ import { LockIcon as xi, LockKeyhole as Jo, UserIcon as Yo, Info as Xo, KeyIcon as Zo, AlertTriangleIcon as ec, Loader as wt, TableIcon as tc, CheckCircle as wi, Target as nc, Edit as Wn, Check as it, X as Tn, Trash2 as ta, Plus as gs, ImageIcon as Qn, AlertCircle as na, ChevronDown as Lt, Search as Nt, Tag as sc, File as Qt, CopyPlusIcon as ac, Pencil as Ni, Power as Ei, Trash as Xa, SquareLibrary as br, ChevronsUpDown as Si, ChevronsDownUp as Ai, ChevronRight as sa, StarsIcon as Ti, Globe as Za, MoreHorizontal as Cn, Star as Ci, FilterXIcon as rc, Filter as ic, ListFilter as lc, RefreshCw as oc, NotepadText as cc, Lock as ki, Languages as xr, LogsIcon as dc, Folder as uc, FileJson as Da, Copy as Bs, History as hc, Eye as aa, Undo2 as Pi, CloudOff as mc, Rocket as Oa, Save as Ii, GlobeIcon as fc, Palette as gc, Send as wr, Settings as _i, ExternalLink as pc, EyeOff as yc, Loader2 as Li, StarIcon as vc, PencilIcon as bc, TrashIcon as xc, LanguagesIcon as wc, DatabaseIcon as Nc, ChevronLeft as er, Sparkle as Ec, Code as Sc, AlertTriangle as Di, User as Ac, Link as Tc, Archive as Cc, Film as kc, Upload as Pc } from "lucide-react";
19
+ import Ic from "compressorjs";
20
+ import { parseDiff as _c, Diff as Lc, Hunk as Dc } from "react-diff-view";
21
+ import { useRegisteredChaiBlocks as Oc, getDefaultBlockProps as Rc } from "@chaibuilder/runtime";
22
22
  import { z as Os } from "zod";
23
- import { useDropzone as Rc } from "react-dropzone";
24
- import { loadWebBlocks as Gc } from "@chaibuilder/sdk/web-blocks";
23
+ import { useDropzone as Gc } from "react-dropzone";
24
+ import { loadWebBlocks as Uc } from "@chaibuilder/sdk/web-blocks";
25
25
  const Le = {
26
26
  ab: "Abkhazian",
27
27
  aa: "Afar",
@@ -267,28 +267,28 @@ const Le = {
267
267
  GET_ASSETS: "GET_ASSETS",
268
268
  GET_ASSET: "GET_ASSET"
269
269
  };
270
- let Uc = 0;
270
+ let Bc = 0;
271
271
  function Nr(e, t) {
272
- const s = `atom${++Uc}`, a = {
272
+ const s = `atom${++Bc}`, a = {
273
273
  toString() {
274
274
  return s;
275
275
  }
276
276
  };
277
- return typeof e == "function" ? a.read = e : (a.init = e, a.read = Bc, a.write = Mc), t && (a.write = t), a;
277
+ return typeof e == "function" ? a.read = e : (a.init = e, a.read = Mc, a.write = Fc), t && (a.write = t), a;
278
278
  }
279
- function Bc(e) {
279
+ function Mc(e) {
280
280
  return e(this);
281
281
  }
282
- function Mc(e, t, s) {
282
+ function Fc(e, t, s) {
283
283
  return t(
284
284
  this,
285
285
  typeof s == "function" ? s(e(this)) : s
286
286
  );
287
287
  }
288
- const Fc = Symbol(
288
+ const $c = Symbol(
289
289
  ""
290
- ), $c = (e) => typeof (e == null ? void 0 : e.then) == "function";
291
- function qc(e = () => {
290
+ ), qc = (e) => typeof (e == null ? void 0 : e.then) == "function";
291
+ function jc(e = () => {
292
292
  try {
293
293
  return window.localStorage;
294
294
  } catch {
@@ -311,7 +311,7 @@ function qc(e = () => {
311
311
  }
312
312
  return r;
313
313
  }, p = (m = (u = e()) == null ? void 0 : u.getItem(d)) != null ? m : null;
314
- return $c(p) ? p.then(y) : y(p);
314
+ return qc(p) ? p.then(y) : y(p);
315
315
  },
316
316
  setItem: (d, h) => {
317
317
  var u;
@@ -350,8 +350,8 @@ function qc(e = () => {
350
350
  };
351
351
  }), o && (i.subscribe = l(o)), i;
352
352
  }
353
- const jc = qc();
354
- function Oi(e, t, s = jc, a) {
353
+ const zc = jc();
354
+ function Oi(e, t, s = zc, a) {
355
355
  const r = Nr(
356
356
  t
357
357
  );
@@ -363,14 +363,14 @@ function Oi(e, t, s = jc, a) {
363
363
  (l) => l(r),
364
364
  (l, o, d) => {
365
365
  const h = typeof d == "function" ? d(l(r)) : d;
366
- return h === Fc ? (o(r, t), s.removeItem(e)) : h instanceof Promise ? h.then((u) => (o(r, u), s.setItem(e, u))) : (o(r, h), s.setItem(e, h));
366
+ return h === $c ? (o(r, t), s.removeItem(e)) : h instanceof Promise ? h.then((u) => (o(r, u), s.setItem(e, u))) : (o(r, h), s.setItem(e, h));
367
367
  }
368
368
  );
369
369
  }
370
370
  localStorage.removeItem("_chai_user");
371
371
  localStorage.removeItem("__chai__user");
372
- const Ri = "__logged_in_user", zc = Oi(Ri, null), ot = () => {
373
- const [e, t] = Ue(zc), s = ae(() => {
372
+ const Ri = "__logged_in_user", Vc = Oi(Ri, null), ot = () => {
373
+ const [e, t] = Ue(Vc), s = ae(() => {
374
374
  t(null), localStorage.removeItem(Ri);
375
375
  }, [t]);
376
376
  return {
@@ -397,7 +397,7 @@ if (import.meta.vitest) {
397
397
  });
398
398
  }
399
399
  let tn = null;
400
- function Vc() {
400
+ function Kc() {
401
401
  const { user: e, setUser: t, logout: s } = ot(), a = ia(), r = ht("getAccessToken", !1), i = async () => {
402
402
  if (r === !1 && e && !(!Ie(e, "expiresAt") || !Ie(e, "accessToken") || !Ie(e, "refreshToken")))
403
403
  try {
@@ -435,11 +435,11 @@ function Vc() {
435
435
  }
436
436
  });
437
437
  }
438
- function Kc() {
438
+ function Hc() {
439
439
  return tn;
440
440
  }
441
441
  const Gi = () => {
442
- const { user: e, setUser: t } = ot(), { mutateAsync: s } = Vc(), a = 60, r = ae(() => {
442
+ const { user: e, setUser: t } = ot(), { mutateAsync: s } = Kc(), a = 60, r = ae(() => {
443
443
  if (!(e != null && e.expiresAt)) return !1;
444
444
  if (!e || !(e != null && e.refreshToken)) return !0;
445
445
  const o = Math.floor(Date.now() / 1e3);
@@ -447,7 +447,7 @@ const Gi = () => {
447
447
  }, [e]), l = ht("getAccessToken", async () => {
448
448
  if (!(!Ie(e, "expiresAt") || !Ie(e, "accessToken") || !Ie(e, "refreshToken"))) {
449
449
  if (r()) {
450
- const o = Kc();
450
+ const o = Hc();
451
451
  if (o) {
452
452
  const h = await o;
453
453
  return h && t(h), (h == null ? void 0 : h.accessToken) || "";
@@ -526,7 +526,7 @@ const Gi = () => {
526
526
  });
527
527
  }
528
528
  });
529
- }, Hc = () => {
529
+ }, Wc = () => {
530
530
  const e = ue(), t = Pe(), s = Z();
531
531
  return ke({
532
532
  mutationFn: async (a) => s(e, { action: U.UPDATE_WEBSITE_DATA, data: a }),
@@ -555,7 +555,7 @@ function He() {
555
555
  };
556
556
  }, []), [e, t];
557
557
  }
558
- const Wc = vt({}), Mi = () => Ue(Wc), Qc = () => {
558
+ const Qc = vt({}), Mi = () => Ue(Qc), Jc = () => {
559
559
  const [e] = He(), t = e.get("page"), s = tt(""), { mutate: a } = Ui();
560
560
  le(() => {
561
561
  !Y(s.current) && t !== s.current && a({ id: s.current }), s.current = t;
@@ -563,7 +563,7 @@ const Wc = vt({}), Mi = () => Ue(Wc), Qc = () => {
563
563
  }, ht = (e, t) => {
564
564
  const [s] = Mi();
565
565
  return W(() => $(s, e, t), [s, e, t]);
566
- }, ue = () => ht("apiUrl", "/chai/api"), ia = () => ht("usersApiUrl", "/chai/users"), ps = () => ht("assetsApiUrl", "/chai/assets"), Jc = () => ht("supabaseInstance", null), pt = (e) => {
566
+ }, ue = () => ht("apiUrl", "/chai/api"), ia = () => ht("usersApiUrl", "/chai/users"), ps = () => ht("assetsApiUrl", "/chai/assets"), Yc = () => ht("supabaseInstance", null), pt = (e) => {
567
567
  const t = ue(), [s] = He(), a = e ?? s.get("page"), r = Z();
568
568
  return De({
569
569
  queryKey: [U.GET_LANGUAGE_PAGES, a],
@@ -614,20 +614,20 @@ const Wc = vt({}), Mi = () => Ue(Wc), Qc = () => {
614
614
  },
615
615
  [e]
616
616
  ), aiContext: t };
617
- }, Yc = vt(
617
+ }, Xc = vt(
618
618
  null
619
- ), $i = () => Ue(Yc), nr = () => {
619
+ ), $i = () => Ue(Xc), nr = () => {
620
620
  const [e] = $i();
621
621
  return (e == null ? void 0 : e.slug) || "";
622
622
  };
623
- function Xc(e, t) {
623
+ function Zc(e, t) {
624
624
  const [s, a] = S(e);
625
625
  return le(() => {
626
626
  const r = setTimeout(() => a(e), t);
627
627
  return () => clearTimeout(r);
628
628
  }, [e, t]), s;
629
629
  }
630
- const Zc = ({ query: e, uuid: t }) => {
630
+ const ed = ({ query: e, uuid: t }) => {
631
631
  const { selectedLang: s, fallbackLang: a } = Fe(), { data: r } = We(), i = r == null ? void 0 : r.pageType, l = ue(), o = Z(), { data: d, isFetching: h } = De({
632
632
  queryKey: [U.GET_DYNAMIC_PAGES, e, i, t],
633
633
  initialData: [],
@@ -639,7 +639,7 @@ const Zc = ({ query: e, uuid: t }) => {
639
639
  }), u = W(() => s === "" ? d.filter((m) => m.lang === "" || m.lang === a) : d.filter((m) => m.lang === s), [s, a, d]);
640
640
  return { allLangPages: d, data: u, isFetching: h };
641
641
  }, qi = () => {
642
- const { selectedLang: e, fallbackLang: t } = Fe(), [s, a] = $i(), [r, i] = S(""), l = Xc(r, 500), { allLangPages: o, data: d, isFetching: h } = Zc({ query: l }), u = ae((p) => a(p), [a]), m = ae((p) => i(p), [i]), y = ae(() => {
642
+ const { selectedLang: e, fallbackLang: t } = Fe(), [s, a] = $i(), [r, i] = S(""), l = Zc(r, 500), { allLangPages: o, data: d, isFetching: h } = ed({ query: l }), u = ae((p) => a(p), [a]), m = ae((p) => i(p), [i]), y = ae(() => {
643
643
  if (!s) return;
644
644
  const p = !(s != null && s.primaryPage), g = e.length === 0, f = p ? s == null ? void 0 : s.id : s == null ? void 0 : s.primaryPage, x = o.filter(
645
645
  (N) => (N == null ? void 0 : N.primaryPage) === f || N.id === f
@@ -671,7 +671,7 @@ const Zc = ({ query: e, uuid: t }) => {
671
671
  queryFn: async () => e(t, { action: U.GET_WEBSITE_PAGES }) || [],
672
672
  placeholderData: (s) => s || []
673
673
  });
674
- }, ed = (e) => {
674
+ }, td = (e) => {
675
675
  const t = Z(), s = ue(), a = Rt();
676
676
  return De({
677
677
  queryKey: [U.GET_WEBSITE_PAGES, e, a],
@@ -687,17 +687,17 @@ const Zc = ({ query: e, uuid: t }) => {
687
687
  },
688
688
  placeholderData: (r) => r || {}
689
689
  });
690
- }, td = vt({ lastSaved: void 0 }), la = () => Ue(td), We = () => {
690
+ }, nd = vt({ lastSaved: void 0 }), la = () => Ue(nd), We = () => {
691
691
  const [e] = He(), t = e.get("page"), [s] = ji(), { data: a, isFetching: r } = On();
692
692
  return { data: W(() => ({ ...ve(a, { id: t }) || {}, metadata: s }), [a, t, s]), isFetching: r };
693
693
  }, Gt = () => {
694
694
  const [e] = He(), t = e.get("lang") ?? "", { data: s, isFetching: a } = pt();
695
695
  return { data: W(() => ve(s, { lang: t }) || {}, [s, t]), isFetching: a };
696
- }, nd = vt({}), ji = () => Ue(nd), zi = () => {
696
+ }, sd = vt({}), ji = () => Ue(sd), zi = () => {
697
697
  const { data: e } = Gt(), t = nr(), s = e == null ? void 0 : e.slug, a = s ? window.location.origin + (s.endsWith("/") ? s.slice(0, -1) : s) : window.location.origin;
698
698
  return t ? a + t : a;
699
699
  };
700
- class sd {
700
+ class ad {
701
701
  constructor(t, s, a, r) {
702
702
  Pt(this, "channelId");
703
703
  Pt(this, "supabase");
@@ -817,14 +817,14 @@ const At = (e) => {
817
817
  },
818
818
  enabled: !Y(e)
819
819
  });
820
- }, ad = vt(void 0), rd = vt({
820
+ }, rd = vt(void 0), id = vt({
821
821
  status: "checking",
822
822
  requestedBy: "",
823
823
  isTakeOverRequested: !1,
824
824
  requestingClientId: "",
825
825
  isActiveInOtherTab: !1
826
- }), id = vt(""), ld = vt(null), sr = vt({}), Vi = () => Ue(sr), Tt = () => {
827
- const [e] = He(), t = e.get("page"), { user: s } = ot(), [a, r] = Ue(ad), [i, l] = Ue(rd), [o, d] = Ue(ld), [h, u] = Ue(id), [m] = Ue(sr);
826
+ }), ld = vt(""), od = vt(null), sr = vt({}), Vi = () => Ue(sr), Tt = () => {
827
+ const [e] = He(), t = e.get("page"), { user: s } = ot(), [a, r] = Ue(rd), [i, l] = Ue(id), [o, d] = Ue(od), [h, u] = Ue(ld), [m] = Ue(sr);
828
828
  return W(() => ({
829
829
  pageLock: i,
830
830
  pageToUser: m,
@@ -850,8 +850,8 @@ const At = (e) => {
850
850
  d,
851
851
  m
852
852
  ]);
853
- }, od = () => {
854
- const e = Jc(), { data: t } = We(), { user: s } = ot(), a = t == null ? void 0 : t.id, { data: r } = St(), { pageLock: i, setPageLock: l, setLockingStatus: o, realtimeInstance: d, setRealtimeInstance: h } = Tt(), [, u] = Ue(sr), m = tt(!1), y = tt(i), p = tt(!1);
853
+ }, cd = () => {
854
+ const e = Yc(), { data: t } = We(), { user: s } = ot(), a = t == null ? void 0 : t.id, { data: r } = St(), { pageLock: i, setPageLock: l, setLockingStatus: o, realtimeInstance: d, setRealtimeInstance: h } = Tt(), [, u] = Ue(sr), m = tt(!1), y = tt(i), p = tt(!1);
855
855
  return le(() => {
856
856
  if (s != null && s.id && e && !d && (r != null && r.appKey) && !p.current) {
857
857
  p.current = !0;
@@ -935,7 +935,7 @@ const At = (e) => {
935
935
  });
936
936
  break;
937
937
  }
938
- }, f = new sd(
938
+ }, f = new ad(
939
939
  e,
940
940
  r == null ? void 0 : r.appKey,
941
941
  s == null ? void 0 : s.id,
@@ -989,20 +989,20 @@ const At = (e) => {
989
989
  requestTakeOver: o
990
990
  };
991
991
  }, Hi = () => {
992
- const [e] = He(), t = e.get("page"), s = ue(), { setAiContext: a } = tr(), { setCurrentEditor: r } = Tt(), [, i] = la(), [, l] = ji(), o = Z();
992
+ const [e] = He(), t = e.get("page"), s = ue(), { setAiContext: a } = tr(), { setCurrentEditor: r } = Tt(), [, i] = la(), [, l] = ji(), [, o] = Ao(), d = Z();
993
993
  return De({
994
994
  queryKey: [U.GET_DRAFT_PAGE, t],
995
995
  staleTime: 1 / 0,
996
996
  gcTime: 1 / 0,
997
997
  queryFn: async () => {
998
- r("");
999
- const d = await o(s, {
998
+ r(""), o(!1);
999
+ const h = await d(s, {
1000
1000
  action: U.GET_DRAFT_PAGE,
1001
1001
  data: { id: t, draft: !0 }
1002
1002
  });
1003
- r(d.currentEditor);
1004
- const h = d.blocks ?? [], u = ve(h, { _type: "@chai/ai-context" });
1005
- return a($(u, "_value", "") || ""), i((m) => ({ ...m, lastSaved: d.lastSaved })), l($(d, "metadata", {})), h;
1003
+ r(h.currentEditor);
1004
+ const u = h.blocks ?? [], m = ve(u, { _type: "@chai/ai-context" });
1005
+ return a($(m, "_value", "") || ""), i((y) => ({ ...y, lastSaved: h.lastSaved })), l($(h, "metadata", {})), setTimeout(() => o(!0), 500), u;
1006
1006
  },
1007
1007
  enabled: !!t
1008
1008
  });
@@ -1041,7 +1041,7 @@ const At = (e) => {
1041
1041
  /* @__PURE__ */ n("div", { className: "h-4 w-4 animate-bounce rounded-full bg-pink-500 [animation-delay:-.5s]" })
1042
1042
  ] });
1043
1043
  return e ? /* @__PURE__ */ n(ys, { children: t }) : /* @__PURE__ */ n("div", { className: "flex h-full w-full items-center justify-center", children: t });
1044
- }, cd = ({ currentEditor: e }) => {
1044
+ }, dd = ({ currentEditor: e }) => {
1045
1045
  const { user: t } = ot(), { data: s } = At(e);
1046
1046
  return !s || !e || e === (t == null ? void 0 : t.id) ? null : /* @__PURE__ */ n("span", { className: "ml-2 flex items-center gap-1 text-xs font-light text-gray-500", children: /* @__PURE__ */ c(Xe, { children: [
1047
1047
  /* @__PURE__ */ n(Ze, { children: /* @__PURE__ */ n(xi, { className: "h-3 w-3" }) }),
@@ -1050,11 +1050,11 @@ const At = (e) => {
1050
1050
  " is editing"
1051
1051
  ] }) })
1052
1052
  ] }) });
1053
- }, dd = ({ userId: e }) => {
1053
+ }, ud = ({ userId: e }) => {
1054
1054
  const { data: t } = At(e);
1055
1055
  return (t == null ? void 0 : t.name) || "Unknown";
1056
1056
  };
1057
- function ud({
1057
+ function hd({
1058
1058
  avatar: e,
1059
1059
  name: t,
1060
1060
  email: s,
@@ -1071,13 +1071,13 @@ function ud({
1071
1071
  };
1072
1072
  return /* @__PURE__ */ n(ys, { children: /* @__PURE__ */ c(Qs, { className: "mx-auto w-full max-w-md", children: [
1073
1073
  /* @__PURE__ */ n(Js, { className: "space-y-1", children: /* @__PURE__ */ c(Ys, { className: "flex items-center gap-2 text-xl", children: [
1074
- /* @__PURE__ */ n(Qo, { className: "h-8 w-8 rounded-md bg-sky-500/20 p-1.5 text-sky-500" }),
1074
+ /* @__PURE__ */ n(Jo, { className: "h-8 w-8 rounded-md bg-sky-500/20 p-1.5 text-sky-500" }),
1075
1075
  "Page is locked for editing"
1076
1076
  ] }) }),
1077
1077
  /* @__PURE__ */ n(Xs, { className: "w-md grid w-full pt-2", children: /* @__PURE__ */ c("div", { children: [
1078
1078
  /* @__PURE__ */ c("div", { className: "relative mx-auto flex w-96 items-center space-x-4 rounded-md border border-green-500 px-2 pb-2 pt-4", children: [
1079
1079
  /* @__PURE__ */ n("div", { className: "absolute -top-2.5 left-3 w-max rounded-full bg-green-500 px-3 py-1 text-xs font-medium leading-3 text-white", children: "Locked By" }),
1080
- e && !o ? /* @__PURE__ */ n("img", { src: e, alt: t, className: "h-14 w-14 rounded-full border border-gray-300" }) : /* @__PURE__ */ n(Jo, { className: "h-14 w-14 flex-shrink-0 rounded-full bg-gradient-to-br from-purple-400 to-pink-500 p-2 text-white" }),
1080
+ e && !o ? /* @__PURE__ */ n("img", { src: e, alt: t, className: "h-14 w-14 rounded-full border border-gray-300" }) : /* @__PURE__ */ n(Yo, { className: "h-14 w-14 flex-shrink-0 rounded-full bg-gradient-to-br from-purple-400 to-pink-500 p-2 text-white" }),
1081
1081
  /* @__PURE__ */ c("div", { className: o ? "space-y-1.5" : "space-y-0", children: [
1082
1082
  o ? /* @__PURE__ */ n(Mt, { className: "h-4 w-40 rounded" }) : /* @__PURE__ */ n("span", { className: "truncate font-medium text-black", children: t }),
1083
1083
  s && !o ? /* @__PURE__ */ n("p", { className: "truncate text-sm text-muted-foreground", children: s }) : /* @__PURE__ */ n(Mt, { className: "h-4 w-60 rounded" }),
@@ -1105,12 +1105,12 @@ function ud({
1105
1105
  ] })
1106
1106
  ] }) }),
1107
1107
  l && /* @__PURE__ */ c("div", { className: "mt-4 flex w-full items-center justify-center gap-x-2 rounded border border-red-500 bg-red-50 p-2 text-center font-medium text-red-500", children: [
1108
- /* @__PURE__ */ n(Yo, { className: "h-5 w-5" }),
1108
+ /* @__PURE__ */ n(Xo, { className: "h-5 w-5" }),
1109
1109
  " Page take over request is rejected"
1110
1110
  ] })
1111
1111
  ] }) }),
1112
1112
  /* @__PURE__ */ n(Zs, { children: i ? /* @__PURE__ */ c(T, { disabled: d, onClick: y, className: "w-full", variant: "destructive", children: [
1113
- /* @__PURE__ */ n(Xo, { className: "h-5 w-5" }),
1113
+ /* @__PURE__ */ n(Zo, { className: "h-5 w-5" }),
1114
1114
  d ? "Page take is requested." : l ? "Request take over again" : "Request take over"
1115
1115
  ] }) : /* @__PURE__ */ c(Zr, { open: u, onOpenChange: m, children: [
1116
1116
  /* @__PURE__ */ n(ei, { asChild: !0, children: /* @__PURE__ */ c("span", { className: "flex flex-col items-center", children: [
@@ -1122,7 +1122,7 @@ function ud({
1122
1122
  /* @__PURE__ */ n(si, { children: "Are you sure you want to take over?" }),
1123
1123
  /* @__PURE__ */ c(ai, { children: [
1124
1124
  /* @__PURE__ */ c("span", { className: "flex items-center space-x-2 text-yellow-500", children: [
1125
- /* @__PURE__ */ n(Zo, { className: "h-5 w-5" }),
1125
+ /* @__PURE__ */ n(ec, { className: "h-5 w-5" }),
1126
1126
  /* @__PURE__ */ n("span", { children: "This action might cause the other user to lose unsaved changes." })
1127
1127
  ] }),
1128
1128
  /* @__PURE__ */ n("br", {}),
@@ -1155,13 +1155,13 @@ const Cs = ({
1155
1155
  (o == null ? void 0 : o.requestedBy) === "ANOTHER_TAB" && d();
1156
1156
  }, [o, d]), (o == null ? void 0 : o.requestedBy) === "ANOTHER_TAB" ? null : e ? /* @__PURE__ */ n(Qi, {}) : /* @__PURE__ */ n(ys, { children: /* @__PURE__ */ c(Qs, { className: "mx-auto w-full max-w-md", children: [
1157
1157
  /* @__PURE__ */ n(Js, { className: "space-y-1", children: /* @__PURE__ */ c(Ys, { className: "flex items-center gap-2 text-xl font-medium", children: [
1158
- a ? /* @__PURE__ */ n(wt, { className: "h-6 w-6 animate-spin text-gray-500" }) : i ? /* @__PURE__ */ n(ec, { className: "h-6 w-6 text-green-500" }) : l ? /* @__PURE__ */ n(wi, { className: "h-6 w-6 text-green-500" }) : /* @__PURE__ */ n(tc, { className: "h-6 w-6 text-green-500" }),
1158
+ a ? /* @__PURE__ */ n(wt, { className: "h-6 w-6 animate-spin text-gray-500" }) : i ? /* @__PURE__ */ n(tc, { className: "h-6 w-6 text-green-500" }) : l ? /* @__PURE__ */ n(wi, { className: "h-6 w-6 text-green-500" }) : /* @__PURE__ */ n(nc, { className: "h-6 w-6 text-green-500" }),
1159
1159
  i ? "Page is active in other tab" : l ? "You can edit the page now." : "Page take over request"
1160
1160
  ] }) }),
1161
1161
  /* @__PURE__ */ n(Xs, { className: "grid gap-4", children: /* @__PURE__ */ n("div", { children: i ? /* @__PURE__ */ n("p", { children: 'You are already editing this page in another tab. To continue editing here, click on "Continue editing here".' }) : l ? /* @__PURE__ */ n("p", { children: "This page is released by other user you can continue editing now." }) : /* @__PURE__ */ c("p", { children: [
1162
1162
  /* @__PURE__ */ c("b", { children: [
1163
1163
  " ",
1164
- /* @__PURE__ */ n(dd, { userId: o == null ? void 0 : o.requestedBy })
1164
+ /* @__PURE__ */ n(ud, { userId: o == null ? void 0 : o.requestedBy })
1165
1165
  ] }),
1166
1166
  " ",
1167
1167
  "has requested to take over this page.",
@@ -1193,7 +1193,7 @@ const Cs = ({
1193
1193
  ] })
1194
1194
  ] })
1195
1195
  ] }) });
1196
- }, hd = () => {
1196
+ }, md = () => {
1197
1197
  const { pageLock: e, requestTakeOver: t } = Ki(), { isLocked: s, currentEditor: a, lockingStatus: r, setLockingStatus: i, realtimePageLockEnabled: l } = Tt(), { data: o, isFetching: d } = At(a), [h] = He(), u = h.get("page"), { mutate: m } = Ui(), { isFetching: y } = Hi(), [p] = la(), g = Pe(), f = ae(() => {
1198
1198
  l ? t() : m({ id: u });
1199
1199
  }, [u, m, t, l]);
@@ -1210,7 +1210,7 @@ const Cs = ({
1210
1210
  }
1211
1211
  }
1212
1212
  ) : null : l && (e != null && e.isActiveInOtherTab) ? /* @__PURE__ */ n(Cs, { lockingStatus: "page_is_active_in_other_tab", onContinue: t }) : /* @__PURE__ */ n(
1213
- ud,
1213
+ hd,
1214
1214
  {
1215
1215
  ...o,
1216
1216
  isFetchingUserInfo: d,
@@ -1222,7 +1222,7 @@ const Cs = ({
1222
1222
  isRequestRejected: r === "take_over_request_rejected"
1223
1223
  }
1224
1224
  ) : null;
1225
- }, md = () => {
1225
+ }, fd = () => {
1226
1226
  const [e, t] = He(), s = e.get("lang"), a = Fi(s), { setSelectedLang: r } = Fe(), i = () => {
1227
1227
  const o = new URLSearchParams(window.location.search);
1228
1228
  o.delete("lang");
@@ -1247,7 +1247,7 @@ const Cs = ({
1247
1247
  ] }) }),
1248
1248
  /* @__PURE__ */ n(Zs, { children: /* @__PURE__ */ n(T, { onClick: i, className: "w-full", variant: "destructive", children: "Switch to default language" }) })
1249
1249
  ] }) });
1250
- }, fd = (e) => {
1250
+ }, gd = (e) => {
1251
1251
  const t = ue(), s = Z();
1252
1252
  return ke({
1253
1253
  mutationFn: async (a) => s(t, {
@@ -1263,7 +1263,7 @@ const Cs = ({
1263
1263
  });
1264
1264
  }
1265
1265
  });
1266
- }, gd = (e) => {
1266
+ }, pd = (e) => {
1267
1267
  const t = ue(), s = Z();
1268
1268
  return De({
1269
1269
  queryKey: ["uiBlockDetails", e],
@@ -1282,7 +1282,7 @@ const Cs = ({
1282
1282
  },
1283
1283
  retry: !1
1284
1284
  });
1285
- }, pd = (e) => {
1285
+ }, yd = (e) => {
1286
1286
  const t = ue(), s = Z();
1287
1287
  return ke({
1288
1288
  mutationFn: async (a) => s(t, {
@@ -1298,7 +1298,7 @@ const Cs = ({
1298
1298
  });
1299
1299
  }
1300
1300
  });
1301
- }, yd = ({
1301
+ }, vd = ({
1302
1302
  blockId: e,
1303
1303
  libBlockId: t,
1304
1304
  isOpen: s,
@@ -1306,7 +1306,7 @@ const Cs = ({
1306
1306
  blockName: r,
1307
1307
  trigger: i
1308
1308
  }) => {
1309
- const [l, o] = S(!1), d = Xr(), h = pd(() => {
1309
+ const [l, o] = S(!1), d = Xr(), h = yd(() => {
1310
1310
  d([e], { _libBlockId: void 0 }), H.success("Block deleted successfully"), o(!1), a();
1311
1311
  });
1312
1312
  return /* @__PURE__ */ c(Nn, { open: s, onOpenChange: (y) => !y && a(), children: [
@@ -1372,7 +1372,7 @@ const Cs = ({
1372
1372
  }
1373
1373
  )
1374
1374
  ] });
1375
- }, vd = ({
1375
+ }, bd = ({
1376
1376
  blockId: e,
1377
1377
  libBlockId: t,
1378
1378
  blockName: s,
@@ -1382,7 +1382,7 @@ const Cs = ({
1382
1382
  }) => {
1383
1383
  const [l, o] = S(!1);
1384
1384
  return /* @__PURE__ */ n(
1385
- yd,
1385
+ vd,
1386
1386
  {
1387
1387
  blockId: e,
1388
1388
  libBlockId: t,
@@ -1407,7 +1407,7 @@ const Cs = ({
1407
1407
  )
1408
1408
  }
1409
1409
  );
1410
- }, bd = () => {
1410
+ }, xd = () => {
1411
1411
  const e = ue(), t = Z(), s = Pe(), {
1412
1412
  data: a = [],
1413
1413
  isLoading: r,
@@ -1451,8 +1451,8 @@ const Cs = ({
1451
1451
  createGroup: l,
1452
1452
  isCreating: o
1453
1453
  };
1454
- }, xd = ({ value: e, onChange: t }) => {
1455
- const [s, a] = S(!1), [r, i] = S(""), l = tt(null), { groups: o } = bd(), [d, h] = S([
1454
+ }, wd = ({ value: e, onChange: t }) => {
1455
+ const [s, a] = S(!1), [r, i] = S(""), l = tt(null), { groups: o } = xd(), [d, h] = S([
1456
1456
  { id: "hero", name: "Hero" },
1457
1457
  { id: "feature", name: "Feature" },
1458
1458
  { id: "footer", name: "Footer" },
@@ -1565,7 +1565,7 @@ function Ji(e) {
1565
1565
  t(e);
1566
1566
  return;
1567
1567
  }
1568
- new Pc(e, {
1568
+ new Ic(e, {
1569
1569
  quality: 0.8,
1570
1570
  // 80% quality
1571
1571
  maxWidth: 2048,
@@ -1585,13 +1585,13 @@ function Ji(e) {
1585
1585
  });
1586
1586
  });
1587
1587
  }
1588
- const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
1588
+ const Nd = 10 * 1024 * 1024, Ed = ({ value: e, onChange: t }) => {
1589
1589
  const [s, a] = S(!1), r = tt(null), i = ae(
1590
1590
  async (d) => {
1591
1591
  var u;
1592
1592
  const h = (u = d.target.files) == null ? void 0 : u[0];
1593
1593
  if (h) {
1594
- if (h.size > wd) {
1594
+ if (h.size > Nd) {
1595
1595
  H.error("File too large", {
1596
1596
  description: `Maximum file size is 10mb. Selected file is ${(h.size / 1024 / 1024).toFixed(2)}MB.`
1597
1597
  }), r.current && (r.current.value = "");
@@ -1634,7 +1634,7 @@ const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
1634
1634
  e && /* @__PURE__ */ n("div", { className: "aspect-video h-[200px] max-h-[200px] overflow-hidden rounded-md border", children: /* @__PURE__ */ n("img", { src: e, alt: "Preview", className: "h-full w-full object-contain" }) })
1635
1635
  ] });
1636
1636
  }, Te = {
1637
- ...Ao,
1637
+ ...To,
1638
1638
  //pages
1639
1639
  ADD_PAGE: "add_page",
1640
1640
  EDIT_PAGE: "edit_page",
@@ -1670,8 +1670,8 @@ const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
1670
1670
  ADD_MEDIA: "add_media",
1671
1671
  EDIT_MEDIA: "edit_media",
1672
1672
  DELETE_MEDIA: "delete_media"
1673
- }, Ed = (e) => {
1674
- const { blocks: t, close: s, blockId: a } = e, { getPartailBlocks: r } = To(), i = t.find((E) => E._id === a), l = i == null ? void 0 : i._libBlockId, o = !!l, d = W(() => t.some(
1673
+ }, Sd = (e) => {
1674
+ const { blocks: t, close: s, blockId: a } = e, { getPartailBlocks: r } = Co(), i = t.find((E) => E._id === a), l = i == null ? void 0 : i._libBlockId, o = !!l, d = W(() => t.some(
1675
1675
  (E) => E._type === "PartialBlock" || E._type === "GlobalBlock"
1676
1676
  ), [t]), h = W(() => {
1677
1677
  let E = [];
@@ -1688,7 +1688,7 @@ const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
1688
1688
  data: B,
1689
1689
  isLoading: K,
1690
1690
  isError: re
1691
- } = gd(l);
1691
+ } = pd(l);
1692
1692
  le(() => {
1693
1693
  re && o && (ee(!0), G(!1));
1694
1694
  }, [re, o]), le(() => {
@@ -1700,7 +1700,7 @@ const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
1700
1700
  const Ae = () => {
1701
1701
  const E = {};
1702
1702
  return u.trim() ? u.length < 2 && (E.name = "Name must be at least 2 characters") : E.name = "Name is required", y || (E.group = "Group is required"), P(E), Object.keys(E).length === 0;
1703
- }, { resetLibrary: Oe } = Co({ id: "" }), me = fd(
1703
+ }, { resetLibrary: Oe } = ko({ id: "" }), me = gd(
1704
1704
  (E) => {
1705
1705
  o || M([a], { _libBlockId: E.id }), H.success(`Block ${o ? "updated" : "saved"} successfully`), Oe(E.library), s();
1706
1706
  }
@@ -1764,7 +1764,7 @@ const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
1764
1764
  children: "Group"
1765
1765
  }
1766
1766
  ),
1767
- /* @__PURE__ */ n(xd, { value: y, onChange: p }),
1767
+ /* @__PURE__ */ n(wd, { value: y, onChange: p }),
1768
1768
  N.group && /* @__PURE__ */ n("p", { className: "text-xs text-destructive", children: N.group })
1769
1769
  ] }),
1770
1770
  /* @__PURE__ */ c("div", { className: "space-y-2", children: [
@@ -1782,11 +1782,11 @@ const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
1782
1782
  ] }),
1783
1783
  /* @__PURE__ */ c("div", { className: "space-y-2", children: [
1784
1784
  /* @__PURE__ */ n(he, { htmlFor: "previewImage", children: "Preview Image (optional)" }),
1785
- /* @__PURE__ */ n(Nd, { value: v, onChange: x })
1785
+ /* @__PURE__ */ n(Ed, { value: v, onChange: x })
1786
1786
  ] }),
1787
1787
  /* @__PURE__ */ c("div", { className: "flex justify-end gap-2 pt-2", children: [
1788
1788
  o && F && /* @__PURE__ */ n(
1789
- vd,
1789
+ bd,
1790
1790
  {
1791
1791
  blockId: a,
1792
1792
  libBlockId: l,
@@ -1858,7 +1858,7 @@ const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
1858
1858
  GLOBAL_BLOCK_PUBLISH_SUCCESS: "Global block published successfully.",
1859
1859
  PAGES_PUBLISH_SUCCESS: "Your changes have been published successfully.",
1860
1860
  SLUG_CHANGE_SUCCESS: "Slug changed successfully."
1861
- }, Sd = {
1861
+ }, Ad = {
1862
1862
  SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
1863
1863
  }, Ge = () => {
1864
1864
  const e = ue(), t = Z();
@@ -1870,7 +1870,7 @@ const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
1870
1870
  }, Yi = (e) => {
1871
1871
  const { data: t } = Ge();
1872
1872
  return W(() => t == null ? void 0 : t.find((s) => s.key === e), [t, e]);
1873
- }, Ad = () => {
1873
+ }, Td = () => {
1874
1874
  const e = ue(), t = Z();
1875
1875
  return ke({
1876
1876
  mutationFn: async ({ pageType: s, query: a }) => {
@@ -1909,7 +1909,7 @@ const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
1909
1909
  onError: (r, i) => {
1910
1910
  const l = ve(a, { key: i.pageType });
1911
1911
  H.error(`Failed to add new ${l != null && l.hasSlug ? "page" : l.name}.`, {
1912
- description: $(Sd, r.message, r.message)
1912
+ description: $(Ad, r.message, r.message)
1913
1913
  });
1914
1914
  }
1915
1915
  });
@@ -1938,7 +1938,7 @@ const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
1938
1938
  });
1939
1939
  }
1940
1940
  });
1941
- }, Td = () => {
1941
+ }, Cd = () => {
1942
1942
  const e = ue(), t = Pe(), s = Z(), { data: a } = Ge();
1943
1943
  return ke({
1944
1944
  mutationFn: async (r) => s(e, {
@@ -1967,7 +1967,7 @@ const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
1967
1967
  });
1968
1968
  }
1969
1969
  });
1970
- }, Cd = () => {
1970
+ }, kd = () => {
1971
1971
  const e = ue(), t = Pe(), s = Z(), { data: a } = Ge();
1972
1972
  return ke({
1973
1973
  mutationFn: async (r) => s(e, {
@@ -2012,7 +2012,7 @@ const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
2012
2012
  console.log("##", i), H.error("Failed to publish pages.");
2013
2013
  }
2014
2014
  });
2015
- }, kd = () => {
2015
+ }, Pd = () => {
2016
2016
  const e = ue(), t = Z(), s = Pe();
2017
2017
  return ke({
2018
2018
  mutationFn: async (a) => {
@@ -2037,7 +2037,7 @@ const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
2037
2037
  H.error("Failed to mark page as template.");
2038
2038
  }
2039
2039
  });
2040
- }, Pd = () => {
2040
+ }, Id = () => {
2041
2041
  const e = ue(), t = Z(), s = Pe();
2042
2042
  return ke({
2043
2043
  mutationFn: async (a) => t(e, {
@@ -2053,7 +2053,7 @@ const wd = 10 * 1024 * 1024, Nd = ({ value: e, onChange: t }) => {
2053
2053
  H.error("Failed to unmark page as template.");
2054
2054
  }
2055
2055
  });
2056
- }, Id = () => {
2056
+ }, _d = () => {
2057
2057
  const e = ue(), t = Z(), s = Pe();
2058
2058
  return ke({
2059
2059
  mutationFn: async ({ id: a, slug: r }) => t(e, {
@@ -2476,14 +2476,14 @@ var ir = {};
2476
2476
  })(/* @__PURE__ */ function() {
2477
2477
  return typeof window < "u" ? window : typeof self < "u" ? self : this || {};
2478
2478
  }(), ir, !1);
2479
- const _d = ir.exports;
2479
+ const Ld = ir.exports;
2480
2480
  ir.exports.create;
2481
- const Ld = {
2481
+ const Dd = {
2482
2482
  particleCount: 350,
2483
2483
  spread: 120,
2484
2484
  origin: { y: 0.6 },
2485
2485
  angle: 90
2486
- }, Dd = {
2486
+ }, Od = {
2487
2487
  TOP_RIGHT: {
2488
2488
  angle: 225,
2489
2489
  origin: { x: 0.9, y: 0 }
@@ -2493,12 +2493,12 @@ const Ld = {
2493
2493
  origin: { x: 0.9, y: 0.9 }
2494
2494
  }
2495
2495
  }, $n = (e) => {
2496
- let t = Dd[e];
2496
+ let t = Od[e];
2497
2497
  t || (t = {});
2498
- const s = { ...Ld, ...t };
2499
- _d(s);
2500
- }, Od = () => {
2501
- const [e] = ko(), { mutate: t, isPending: s } = rr(), { mutateAsync: a, isPending: r } = Bi();
2498
+ const s = { ...Dd, ...t };
2499
+ Ld(s);
2500
+ }, Rd = () => {
2501
+ const [e] = Po(), { mutate: t, isPending: s } = rr(), { mutateAsync: a, isPending: r } = Bi();
2502
2502
  return /* @__PURE__ */ c("div", { className: "flex items-center justify-center gap-x-3 border-t bg-white py-3", children: [
2503
2503
  /* @__PURE__ */ n(T, { size: "sm", variant: "outline", disabled: s || r, onClick: () => {
2504
2504
  a({ settings: { theme: e } });
@@ -2514,7 +2514,7 @@ const Ld = {
2514
2514
  );
2515
2515
  }, children: "Publish" })
2516
2516
  ] });
2517
- }, vs = vt(null), Rd = (e) => {
2517
+ }, vs = vt(null), Gd = (e) => {
2518
2518
  if (!e) return { base: e, extension: null };
2519
2519
  const t = e.lastIndexOf(".");
2520
2520
  if (t <= 0) return { base: e, extension: null };
@@ -2522,10 +2522,10 @@ const Ld = {
2522
2522
  return { base: e.substring(0, t), extension: s };
2523
2523
  }, Dt = (e) => {
2524
2524
  if (!e) return e;
2525
- const { base: t } = Rd(e);
2525
+ const { base: t } = Gd(e);
2526
2526
  return t;
2527
2527
  };
2528
- function Gd(e, t) {
2528
+ function Ud(e, t) {
2529
2529
  const s = (e || "").split("/").filter(Boolean);
2530
2530
  let a = "", r = !0;
2531
2531
  if (t.slug === "/") {
@@ -2546,7 +2546,7 @@ function Gd(e, t) {
2546
2546
  }
2547
2547
  return { initSlug: a, prefix: r };
2548
2548
  }
2549
- const Ud = (e) => e && Dt(e), Er = (e, t) => {
2549
+ const Bd = (e) => e && Dt(e), Er = (e, t) => {
2550
2550
  const s = Dt(e || "");
2551
2551
  return !s || s === "/" ? `/${t}` : `${s}/${t}`;
2552
2552
  };
@@ -2570,7 +2570,7 @@ function lr({
2570
2570
  return /* @__PURE__ */ c("div", { children: [
2571
2571
  a && /* @__PURE__ */ n("div", { className: "mb-1 flex items-center", children: /* @__PURE__ */ c("span", { className: "text-xs text-gray-500", children: [
2572
2572
  "Parent: ",
2573
- /* @__PURE__ */ n("span", { className: "font-mono text-gray-900", children: Ud(a) })
2573
+ /* @__PURE__ */ n("span", { className: "font-mono text-gray-900", children: Bd(a) })
2574
2574
  ] }) }),
2575
2575
  /* @__PURE__ */ c("div", { className: "relative", children: [
2576
2576
  /* @__PURE__ */ n(
@@ -2630,7 +2630,7 @@ const Zi = ({
2630
2630
  disabled: !a || !e
2631
2631
  }
2632
2632
  )
2633
- ] }), Bd = ({
2633
+ ] }), Md = ({
2634
2634
  dynamic: e,
2635
2635
  isNonSlugPageType: t,
2636
2636
  isRootPage: s,
@@ -2707,7 +2707,7 @@ const Zi = ({
2707
2707
  /* @__PURE__ */ n("span", { className: "font-medium", children: Le[s] }),
2708
2708
  " page in the parent to add here."
2709
2709
  ] }) }) });
2710
- }, Md = ({
2710
+ }, Fd = ({
2711
2711
  onSubmit: e,
2712
2712
  edit: t,
2713
2713
  lang: s,
@@ -2767,7 +2767,7 @@ const Zi = ({
2767
2767
  isPending: v
2768
2768
  }
2769
2769
  )
2770
- ] }), Fd = ({
2770
+ ] }), $d = ({
2771
2771
  loading: e,
2772
2772
  onSubmit: t,
2773
2773
  edit: s,
@@ -2793,7 +2793,7 @@ const Zi = ({
2793
2793
  id: I,
2794
2794
  pages: G
2795
2795
  }) => e ? /* @__PURE__ */ n("div", { className: "flex h-80 items-center justify-center", children: /* @__PURE__ */ n(wt, { className: "animate-spin" }) }) : u ? /* @__PURE__ */ n(
2796
- Md,
2796
+ Fd,
2797
2797
  {
2798
2798
  onSubmit: t,
2799
2799
  edit: s,
@@ -2837,7 +2837,7 @@ const Zi = ({
2837
2837
  }
2838
2838
  ),
2839
2839
  /* @__PURE__ */ n(
2840
- Bd,
2840
+ Md,
2841
2841
  {
2842
2842
  dynamic: d == null ? void 0 : d.dynamic,
2843
2843
  isNonSlugPageType: u,
@@ -2874,7 +2874,7 @@ const Zi = ({
2874
2874
  isPending: C
2875
2875
  }
2876
2876
  )
2877
- ] }), $d = ({
2877
+ ] }), qd = ({
2878
2878
  id: e,
2879
2879
  isOpen: t,
2880
2880
  onClose: s,
@@ -2893,7 +2893,7 @@ const Zi = ({
2893
2893
  const z = D == null ? void 0 : D.find((_) => _.id === e);
2894
2894
  if (!z) return;
2895
2895
  h(z.name), m(z.lang);
2896
- const oe = z.slug || "", { initSlug: be, prefix: Ne } = Gd(oe, o);
2896
+ const oe = z.slug || "", { initSlug: be, prefix: Ne } = Ud(oe, o);
2897
2897
  p(be), x(Ne);
2898
2898
  }, [r, e, D, o, i]), le(() => {
2899
2899
  if (i)
@@ -2940,7 +2940,7 @@ const Zi = ({
2940
2940
  /* @__PURE__ */ n(nt, { className: "font-light", children: ce.ENTER_LANGUAGE_DETAILS })
2941
2941
  ] }),
2942
2942
  /* @__PURE__ */ n(
2943
- Fd,
2943
+ $d,
2944
2944
  {
2945
2945
  id: e,
2946
2946
  pages: l,
@@ -2970,7 +2970,7 @@ const Zi = ({
2970
2970
  )
2971
2971
  ] }) });
2972
2972
  };
2973
- function qd({
2973
+ function jd({
2974
2974
  value: e,
2975
2975
  onChange: t,
2976
2976
  placeholder: s = "Enter custom slug part",
@@ -3037,7 +3037,7 @@ const Ms = ({ children: e, onWheel: t, ...s }) => /* @__PURE__ */ n(oi, { ...s,
3037
3037
  }
3038
3038
  t && t(r);
3039
3039
  }, children: e }), Na = (...e) => e.filter(Boolean).join(" ");
3040
- function jd({
3040
+ function zd({
3041
3041
  pages: e,
3042
3042
  selectedParentId: t,
3043
3043
  onChange: s,
@@ -3175,7 +3175,7 @@ function jd({
3175
3175
  )
3176
3176
  ] });
3177
3177
  }
3178
- const zd = (...e) => e.filter(Boolean).join(" "), Vd = ({
3178
+ const Vd = (...e) => e.filter(Boolean).join(" "), Kd = ({
3179
3179
  templates: e,
3180
3180
  selectedTemplateId: t,
3181
3181
  onSelectTemplate: s,
@@ -3240,7 +3240,7 @@ const zd = (...e) => e.filter(Boolean).join(" "), Vd = ({
3240
3240
  /* @__PURE__ */ n(
3241
3241
  it,
3242
3242
  {
3243
- className: zd(
3243
+ className: Vd(
3244
3244
  "mr-2 h-4 w-4",
3245
3245
  t === x.id ? "opacity-100" : "opacity-0"
3246
3246
  )
@@ -3269,13 +3269,13 @@ const zd = (...e) => e.filter(Boolean).join(" "), Vd = ({
3269
3269
  /* @__PURE__ */ n("div", { className: "border-t bg-gray-50 p-2 text-xs text-gray-500", children: "Template preview" })
3270
3270
  ] })
3271
3271
  ] });
3272
- }, Kd = () => {
3272
+ }, Hd = () => {
3273
3273
  const e = ue(), t = Z();
3274
3274
  return De({
3275
3275
  queryKey: [U.GET_LIBRARIES],
3276
3276
  queryFn: async () => await t(e, { action: U.GET_LIBRARIES }) || []
3277
3277
  });
3278
- }, Hd = (e) => {
3278
+ }, Wd = (e) => {
3279
3279
  const t = ue(), s = Z();
3280
3280
  return De({
3281
3281
  queryKey: [U.GET_TEMPLATES_BY_TYPE, e],
@@ -3288,8 +3288,8 @@ const zd = (...e) => e.filter(Boolean).join(" "), Vd = ({
3288
3288
  return (e ? ye(a, { pageType: e }) : a) || [];
3289
3289
  }
3290
3290
  });
3291
- }, Wd = (e) => {
3292
- const { data: t = [], isLoading: s } = Hd(e), { data: a = [], isLoading: r } = Kd(), i = W(() => s || r ? [] : t.map((o) => {
3291
+ }, Qd = (e) => {
3292
+ const { data: t = [], isLoading: s } = Wd(e), { data: a = [], isLoading: r } = Hd(), i = W(() => s || r ? [] : t.map((o) => {
3293
3293
  const d = ve(a, { id: o.library });
3294
3294
  return {
3295
3295
  ...o,
@@ -3373,12 +3373,12 @@ if (import.meta.vitest) {
3373
3373
  });
3374
3374
  }
3375
3375
  const Ut = (...e) => e.filter(Boolean).join(" ");
3376
- function Qd({ addEditPage: e, additionalPageTypes: t = [], close: s, closePanel: a }) {
3376
+ function Jd({ addEditPage: e, additionalPageTypes: t = [], close: s, closePanel: a }) {
3377
3377
  var Ns, Es;
3378
3378
  const r = oa(), i = !!(e != null && e.id), { data: l } = On(), { mutate: o, isPending: d } = Xi(), { mutate: h, isPending: u } = ar(), [m, y] = S(null), [p, g] = S(!0), [f, v] = S((e == null ? void 0 : e.pageType) ?? "page"), { hasPermission: x } = Pn(), N = x(Te.CHANGE_PAGE_TYPE), [P, L] = S(!1), [C, I] = S(""), { selectedLang: G, fallbackLang: J } = Fe(), ee = G || J, [D, F] = S(""), [M, q] = S(!1), B = W(() => {
3379
3379
  const k = t.find((fe) => fe.key === f);
3380
3380
  return (k == null ? void 0 : k.hasSlug) === !1;
3381
- }, [f, t]), [K, re] = S((e == null ? void 0 : e.parent) ?? ""), [Ae, Oe] = S((e == null ? void 0 : e.name) ?? ""), [me, w] = S((e == null ? void 0 : e.dynamic) ?? !1), [b, E] = S(me ? "" : ((e == null ? void 0 : e.slug) ?? "").split("/").pop() || ""), [R, A] = S((e == null ? void 0 : e.dynamicSlugCustom) ?? ""), [O, V] = S(!0), [j, Q] = S(!1), [ie, z] = S(""), { data: oe, isLoading: be } = Wd(f), Ne = d || u, _ = Et("enable-add-page-dropdown"), ne = W(() => !i || !(e != null && e.id) || !l ? null : l.find((k) => k.id === e.id), [i, e == null ? void 0 : e.id, l]), Re = (ne == null ? void 0 : ne.online) || !1, st = W(() => !i || !(e != null && e.id) || !l ? !1 : l.some((k) => k.parent === e.id), [i, e == null ? void 0 : e.id, l]), X = t.find((k) => k.key === f), Je = (k) => {
3381
+ }, [f, t]), [K, re] = S((e == null ? void 0 : e.parent) ?? ""), [Ae, Oe] = S((e == null ? void 0 : e.name) ?? ""), [me, w] = S((e == null ? void 0 : e.dynamic) ?? !1), [b, E] = S(me ? "" : ((e == null ? void 0 : e.slug) ?? "").split("/").pop() || ""), [R, A] = S((e == null ? void 0 : e.dynamicSlugCustom) ?? ""), [O, V] = S(!0), [j, Q] = S(!1), [ie, z] = S(""), { data: oe, isLoading: be } = Qd(f), Ne = d || u, _ = Et("enable-add-page-dropdown"), ne = W(() => !i || !(e != null && e.id) || !l ? null : l.find((k) => k.id === e.id), [i, e == null ? void 0 : e.id, l]), Re = (ne == null ? void 0 : ne.online) || !1, st = W(() => !i || !(e != null && e.id) || !l ? !1 : l.some((k) => k.parent === e.id), [i, e == null ? void 0 : e.id, l]), X = t.find((k) => k.key === f), Je = (k) => {
3382
3382
  if (i && f !== k) {
3383
3383
  I(k), L(!0), F(""), q(!1);
3384
3384
  return;
@@ -3642,7 +3642,7 @@ function Qd({ addEditPage: e, additionalPageTypes: t = [], close: s, closePanel:
3642
3642
  !i && (X == null ? void 0 : X.hasSlug) && oe.length > 0 && /* @__PURE__ */ c("div", { className: "space-y-1", children: [
3643
3643
  /* @__PURE__ */ n(he, { className: "mb-1 block text-sm", children: "Template" }),
3644
3644
  /* @__PURE__ */ n(
3645
- Vd,
3645
+ Kd,
3646
3646
  {
3647
3647
  templates: oe,
3648
3648
  selectedTemplateId: ie,
@@ -3652,7 +3652,7 @@ function Qd({ addEditPage: e, additionalPageTypes: t = [], close: s, closePanel:
3652
3652
  )
3653
3653
  ] }),
3654
3654
  /* @__PURE__ */ n(
3655
- jd,
3655
+ zd,
3656
3656
  {
3657
3657
  pages: l,
3658
3658
  selectedParentId: K,
@@ -3689,7 +3689,7 @@ function Qd({ addEditPage: e, additionalPageTypes: t = [], close: s, closePanel:
3689
3689
  /* @__PURE__ */ n(he, { htmlFor: "useDynamicSlug", className: "text-sm", children: "Use Dynamic Slug" })
3690
3690
  ] }),
3691
3691
  me && /* @__PURE__ */ n("div", { className: "space-y-2", children: /* @__PURE__ */ n("div", { className: "space-y-0.5", children: /* @__PURE__ */ n(
3692
- qd,
3692
+ jd,
3693
3693
  {
3694
3694
  value: R,
3695
3695
  onChange: A,
@@ -3835,7 +3835,7 @@ const or = ({
3835
3835
  /* @__PURE__ */ n(nt, { children: r ? "Update your page name" : "Enter details to create a new page" })
3836
3836
  ] }),
3837
3837
  /* @__PURE__ */ n(
3838
- Qd,
3838
+ Jd,
3839
3839
  {
3840
3840
  closePanel: s,
3841
3841
  addEditPage: e,
@@ -3849,7 +3849,7 @@ function ca({
3849
3849
  page: e,
3850
3850
  onClose: t
3851
3851
  }) {
3852
- const [, s] = He(), { mutate: a, isPending: r } = Td(), { data: i } = Ge(), { setSelectedLang: l, fallbackLang: o } = Fe(), [, d] = Ws(), h = () => {
3852
+ const [, s] = He(), { mutate: a, isPending: r } = Cd(), { data: i } = Ge(), { setSelectedLang: l, fallbackLang: o } = Fe(), [, d] = Ws(), h = () => {
3853
3853
  r || a(e, {
3854
3854
  onSuccess: () => {
3855
3855
  e != null && e.primaryPage ? (window.history.replaceState({}, "", `/?page=${e.primaryPage}`), s(new URLSearchParams({ page: e.primaryPage }))) : (window.history.replaceState({}, "", "/"), s(new URLSearchParams())), window.dispatchEvent(new PopStateEvent("popstate")), l(o), d("outline"), t();
@@ -3889,7 +3889,7 @@ function ca({
3889
3889
  ] })
3890
3890
  ] }) });
3891
3891
  }
3892
- const Jd = () => {
3892
+ const Yd = () => {
3893
3893
  const e = ue(), t = Pe(), s = Z();
3894
3894
  return ke({
3895
3895
  mutationFn: async ({ pageId: a, name: r, slug: i }) => {
@@ -3919,7 +3919,7 @@ const Jd = () => {
3919
3919
  closePanel: s = () => {
3920
3920
  }
3921
3921
  }) => {
3922
- const { mutate: a, isPending: r } = Jd(), [i, l] = S(null), [o, d] = S(`${e.name} (Copy)`), h = oa(), u = Y(e.slug), [m, y] = S(
3922
+ const { mutate: a, isPending: r } = Yd(), [i, l] = S(null), [o, d] = S(`${e.name} (Copy)`), h = oa(), u = Y(e.slug), [m, y] = S(
3923
3923
  u ? "" : `${e.slug.split("/").pop()}-copy`
3924
3924
  ), p = u ? "" : ao(e.slug.split("/")).join("/"), [g, f] = S(!1), v = (x) => {
3925
3925
  if (x.preventDefault(), !o.trim()) {
@@ -4031,18 +4031,18 @@ const Jd = () => {
4031
4031
  ] })
4032
4032
  ] })
4033
4033
  ] }) });
4034
- }, Yd = 1 * 1024 * 1024, dr = ({
4034
+ }, Xd = 1 * 1024 * 1024, dr = ({
4035
4035
  page: e,
4036
4036
  onClose: t
4037
4037
  }) => {
4038
- const [s, a] = S(!1), [r, i] = S(""), [l, o] = S(""), [d, h] = S(!1), u = tt(null), m = kd(), { data: y } = Ge(), p = y == null ? void 0 : y.find(
4038
+ const [s, a] = S(!1), [r, i] = S(""), [l, o] = S(""), [d, h] = S(!1), u = tt(null), m = Pd(), { data: y } = Ge(), p = y == null ? void 0 : y.find(
4039
4039
  (P) => P.key === e.pageType
4040
4040
  ), g = (p == null ? void 0 : p.name) || zt(e.pageType), f = ae(
4041
4041
  (P) => {
4042
4042
  var C;
4043
4043
  const L = (C = P.target.files) == null ? void 0 : C[0];
4044
4044
  if (L) {
4045
- if (L.size > Yd) {
4045
+ if (L.size > Xd) {
4046
4046
  H.error("File too large", {
4047
4047
  description: `Maximum file size is 1MB. Selected file is ${(L.size / 1024).toFixed(2)}KB.`
4048
4048
  }), u.current && (u.current.value = "");
@@ -4098,7 +4098,7 @@ const Jd = () => {
4098
4098
  /* @__PURE__ */ c("div", { className: "space-y-4 mb-4 text-xs", children: [
4099
4099
  /* @__PURE__ */ c("div", { className: "p-4 border rounded bg-slate-50 space-y-3", children: [
4100
4100
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
4101
- /* @__PURE__ */ n(nc, { className: "w-4 h-4 text-slate-500" }),
4101
+ /* @__PURE__ */ n(sc, { className: "w-4 h-4 text-slate-500" }),
4102
4102
  /* @__PURE__ */ n("span", { className: "font-medium text-slate-500", children: "Page Name:" }),
4103
4103
  /* @__PURE__ */ n("span", { className: "font-semibold", children: zt(e.name) })
4104
4104
  ] }),
@@ -4219,7 +4219,7 @@ const Jd = () => {
4219
4219
  f.stopPropagation(), t(e);
4220
4220
  },
4221
4221
  children: [
4222
- /* @__PURE__ */ n(sc, { className: "size-3" }),
4222
+ /* @__PURE__ */ n(ac, { className: "size-3" }),
4223
4223
  "Duplicate page"
4224
4224
  ]
4225
4225
  }
@@ -4297,7 +4297,7 @@ const Jd = () => {
4297
4297
  page: e,
4298
4298
  onClose: t
4299
4299
  }) => {
4300
- const [s, a] = S(!1), r = Pd();
4300
+ const [s, a] = S(!1), r = Id();
4301
4301
  return /* @__PURE__ */ n(je, { open: !0, onOpenChange: t, children: /* @__PURE__ */ c(ze, { children: [
4302
4302
  /* @__PURE__ */ c(Ve, { children: [
4303
4303
  /* @__PURE__ */ n(Ke, { children: "Unmark as template" }),
@@ -4336,7 +4336,7 @@ const Jd = () => {
4336
4336
  page: e,
4337
4337
  onClose: t
4338
4338
  }) => {
4339
- const { mutate: s, isPending: a } = Cd(), r = async () => {
4339
+ const { mutate: s, isPending: a } = kd(), r = async () => {
4340
4340
  s(e, { onSuccess: t });
4341
4341
  };
4342
4342
  return /* @__PURE__ */ n(je, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ c(ze, { children: [
@@ -4362,10 +4362,10 @@ const Jd = () => {
4362
4362
  )
4363
4363
  ] })
4364
4364
  ] }) });
4365
- }, Xd = Oi("expandedPagesState", []), mr = (e) => Ia(e, (t) => [
4365
+ }, Zd = Oi("expandedPagesState", []), mr = (e) => Ia(e, (t) => [
4366
4366
  t,
4367
4367
  ...t.children ? mr(t.children) : []
4368
- ]), Zd = (e, t) => {
4368
+ ]), eu = (e, t) => {
4369
4369
  const s = (a, r = []) => {
4370
4370
  for (const i of a) {
4371
4371
  const l = [...r, i.id];
@@ -4385,12 +4385,12 @@ const Jd = () => {
4385
4385
  if (a) {
4386
4386
  if (a.parent)
4387
4387
  return [...nl(e, a.parent), t];
4388
- const r = Zd(e, t);
4388
+ const r = eu(e, t);
4389
4389
  if (!Y(r))
4390
4390
  return r;
4391
4391
  }
4392
4392
  return [t];
4393
- }, eu = (e) => {
4393
+ }, tu = (e) => {
4394
4394
  const t = /* @__PURE__ */ new Set(), s = (a, r = []) => {
4395
4395
  a.forEach((i) => {
4396
4396
  const l = [...r, i.id];
@@ -4399,7 +4399,7 @@ const Jd = () => {
4399
4399
  };
4400
4400
  return s(e), Array.from(t);
4401
4401
  }, Rn = (e) => {
4402
- const [t, s] = Ue(Xd), a = e ? xt(t, e) : !1, r = ae(() => {
4402
+ const [t, s] = Ue(Zd), a = e ? xt(t, e) : !1, r = ae(() => {
4403
4403
  s(
4404
4404
  (h) => a ? ye(h, (u) => u !== e) : [...h, e]
4405
4405
  );
@@ -4415,7 +4415,7 @@ const Jd = () => {
4415
4415
  ), l = ae(
4416
4416
  (h) => {
4417
4417
  if (Y(h)) return;
4418
- const u = eu(h);
4418
+ const u = tu(h);
4419
4419
  Y(u) || s((m) => ro(m, u));
4420
4420
  },
4421
4421
  [s]
@@ -4444,7 +4444,7 @@ const Jd = () => {
4444
4444
  const a = Bt(t);
4445
4445
  return xt(Bt((s == null ? void 0 : s.name) || ""), a) || xt(Bt((s == null ? void 0 : s.slug) || ""), a);
4446
4446
  })
4447
- ), tu = (e, t) => {
4447
+ ), nu = (e, t) => {
4448
4448
  const s = /* @__PURE__ */ new Set(), a = Ja(e, "id");
4449
4449
  return t.forEach((r) => {
4450
4450
  let i = r;
@@ -4466,7 +4466,7 @@ const Jd = () => {
4466
4466
  shouldExpandOnSearch: r,
4467
4467
  children: a.children ? Ga(a.children, t, s) : []
4468
4468
  };
4469
- }), nu = (e) => {
4469
+ }), su = (e) => {
4470
4470
  if (!e || !e.length) return [];
4471
4471
  const t = {};
4472
4472
  e.forEach((a) => {
@@ -4487,10 +4487,10 @@ const Jd = () => {
4487
4487
  if (s !== "all" && (r = Ks(ye(e, { pageType: s }))), Y(t))
4488
4488
  r = Sr(r, t);
4489
4489
  else {
4490
- const u = Sr(r, t), m = tu(e, u);
4490
+ const u = Sr(r, t), m = nu(e, u);
4491
4491
  r = io([...u, ...m], "id");
4492
4492
  }
4493
- const i = sl(nu(r)), l = Ga(i, t, a), o = ye(l, (u) => a(u.pageType)).sort((u, m) => (u.name || "").localeCompare(m.name || "")), d = ye(l, (u) => !a(u.pageType));
4493
+ const i = sl(su(r)), l = Ga(i, t, a), o = ye(l, (u) => a(u.pageType)).sort((u, m) => (u.name || "").localeCompare(m.name || "")), d = ye(l, (u) => !a(u.pageType));
4494
4494
  let h = [];
4495
4495
  if (s === "all") {
4496
4496
  const u = Ja(d, "pageType");
@@ -4506,7 +4506,7 @@ const Jd = () => {
4506
4506
  } else
4507
4507
  h = d.sort((u, m) => (u.name || "").localeCompare(m.name || ""));
4508
4508
  return [...o, ...h];
4509
- }, su = ({
4509
+ }, au = ({
4510
4510
  parentSlug: e,
4511
4511
  page: t,
4512
4512
  active: s,
@@ -4588,7 +4588,7 @@ const Jd = () => {
4588
4588
  )
4589
4589
  ] }),
4590
4590
  !t.isPartialGroup && /* @__PURE__ */ c("div", { className: "flex items-center space-x-4", children: [
4591
- /* @__PURE__ */ n(cd, { currentEditor: t.currentEditor }),
4591
+ /* @__PURE__ */ n(dd, { currentEditor: t.currentEditor }),
4592
4592
  /* @__PURE__ */ n(
4593
4593
  ur,
4594
4594
  {
@@ -4606,7 +4606,7 @@ const Jd = () => {
4606
4606
  ]
4607
4607
  }
4608
4608
  );
4609
- }, au = ({ close: e }) => {
4609
+ }, ru = ({ close: e }) => {
4610
4610
  const [, t] = S([]), [s, a] = S(null), [r, i] = S(""), [l, o] = S(""), [d, h] = S(null), u = (A) => l ? String($(A, "name", "")).toLowerCase().includes(l.toLowerCase()) || String($(A, "key", "")).toLowerCase().includes(l.toLowerCase()) : !0, [m, y] = S(null), [p, g] = S(null), [f, v] = S(null), [x, N] = S(null), { data: P, isFetching: L } = On(), [C, I] = S(""), { hasPermission: G } = Pn(), { updateForSelectedPage: J, expandPagesOnSearch: ee, expandAll: D, collapseAll: F } = Rn(null), [M, q] = He(), B = M.get("page"), K = tt(null), { data: re } = Ge(), Ae = Et("enable-add-page-dropdown"), Oe = ae((A) => {
4611
4611
  var O;
4612
4612
  return (O = ve(re, { key: A })) == null ? void 0 : O.hasSlug;
@@ -4664,7 +4664,7 @@ const Jd = () => {
4664
4664
  di,
4665
4665
  {
4666
4666
  className: `${C === "all" ? "bg-gray-50 hover:bg-gray-100" : "bg-gray-100 hover:bg-gray-50"} absolute right-1.5 top-1.5 -mt-px h-max w-max min-w-[120px] whitespace-nowrap p-0 py-1 pl-2 pr-1 text-xs text-gray-600 shadow-none ring-0 focus:ring-0`,
4667
- children: /* @__PURE__ */ n(Bo, { placeholder: "Select page type" })
4667
+ children: /* @__PURE__ */ n(Mo, { placeholder: "Select page type" })
4668
4668
  }
4669
4669
  ),
4670
4670
  /* @__PURE__ */ c(ui, { align: "end", children: [
@@ -4780,7 +4780,7 @@ const Jd = () => {
4780
4780
  const m = !Y(e == null ? void 0 : e.children), { isExpanded: y, toggleExpanded: p } = Rn(e == null ? void 0 : e.id);
4781
4781
  return /* @__PURE__ */ c("div", { className: "border-0", children: [
4782
4782
  /* @__PURE__ */ n(
4783
- su,
4783
+ au,
4784
4784
  {
4785
4785
  closePanel: s,
4786
4786
  setUnpublishPage: a,
@@ -4815,7 +4815,7 @@ const Jd = () => {
4815
4815
  g.id || `child-${u}-${g.key}`
4816
4816
  )) })
4817
4817
  ] }, e.id || `level-${u}-${e.key}`);
4818
- }, ru = ({ selectedPageType: e, setSelectedPageType: t }) => {
4818
+ }, iu = ({ selectedPageType: e, setSelectedPageType: t }) => {
4819
4819
  const [s, a] = S(""), { data: r } = Ge(), i = (o) => {
4820
4820
  if (!s) return !0;
4821
4821
  const d = s.toLowerCase(), h = (u) => String($(o, u, "")).toLowerCase().includes(d);
@@ -4829,7 +4829,7 @@ const Jd = () => {
4829
4829
  children: /* @__PURE__ */ c("div", { className: "flex w-full items-center justify-between gap-x-1.5", children: [
4830
4830
  /* @__PURE__ */ n("span", { className: "max-w-[150px] overflow-hidden truncate whitespace-nowrap font-medium leading-tight", children: (l == null ? void 0 : l.name) || "All" }),
4831
4831
  /* @__PURE__ */ n(
4832
- ic,
4832
+ lc,
4833
4833
  {
4834
4834
  className: `${e !== "all" ? "fill-sky-50 text-sky-500" : ""} pointer-events-none h-4 w-4 text-muted-foreground hover:bg-blue-300`
4835
4835
  }
@@ -4873,7 +4873,7 @@ const Jd = () => {
4873
4873
  Y(ye(r, i)) && /* @__PURE__ */ n("div", { className: "px-3 py-2 text-center text-sm text-gray-500", children: "No matching page types found" })
4874
4874
  ] })
4875
4875
  ] });
4876
- }, iu = ({ search: e, setSearch: t }) => /* @__PURE__ */ c("div", { className: "relative flex h-9 flex-1 items-center gap-2 rounded-md border px-2.5", children: [
4876
+ }, lu = ({ search: e, setSearch: t }) => /* @__PURE__ */ c("div", { className: "relative flex h-9 flex-1 items-center gap-2 rounded-md border px-2.5", children: [
4877
4877
  /* @__PURE__ */ n("label", { htmlFor: "page-search-input", className: "sr-only", children: "Search Pages" }),
4878
4878
  /* @__PURE__ */ n(
4879
4879
  Nt,
@@ -4893,7 +4893,7 @@ const Jd = () => {
4893
4893
  autoComplete: "off"
4894
4894
  }
4895
4895
  )
4896
- ] }), lu = ({ pages: e }) => {
4896
+ ] }), ou = ({ pages: e }) => {
4897
4897
  const { expandAll: t, collapseAll: s, expandedPages: a } = Rn(null);
4898
4898
  return /* @__PURE__ */ c("div", { className: "flex gap-1", children: [
4899
4899
  /* @__PURE__ */ c(Xe, { children: [
@@ -4941,12 +4941,12 @@ const Jd = () => {
4941
4941
  variant: "ghost",
4942
4942
  onClick: () => e.invalidateQueries({ queryKey: [U.GET_WEBSITE_PAGES] }),
4943
4943
  className: "mt-1 h-6 w-6",
4944
- children: /* @__PURE__ */ n(lc, {})
4944
+ children: /* @__PURE__ */ n(oc, {})
4945
4945
  }
4946
4946
  ) }),
4947
4947
  /* @__PURE__ */ n(et, { side: "bottom", children: "Refresh pages list" })
4948
4948
  ] });
4949
- }, ou = ({
4949
+ }, cu = ({
4950
4950
  pages: e,
4951
4951
  search: t,
4952
4952
  setSearch: s,
@@ -4962,9 +4962,9 @@ const Jd = () => {
4962
4962
  const m = a.length > 1;
4963
4963
  return /* @__PURE__ */ c("div", { className: "space-y-3 border-b border-b-gray-200 px-4 pb-1", children: [
4964
4964
  /* @__PURE__ */ c("div", { className: "flex items-center gap-x-2", children: [
4965
- /* @__PURE__ */ n(ru, { selectedPageType: o, setSelectedPageType: d }),
4966
- /* @__PURE__ */ n(iu, { search: t, setSearch: s }),
4967
- /* @__PURE__ */ n(lu, { pages: e }),
4965
+ /* @__PURE__ */ n(iu, { selectedPageType: o, setSelectedPageType: d }),
4966
+ /* @__PURE__ */ n(lu, { search: t, setSearch: s }),
4967
+ /* @__PURE__ */ n(ou, { pages: e }),
4968
4968
  /* @__PURE__ */ c(T, { variant: "default", onClick: r, className: "rounded px-3 font-normal", children: [
4969
4969
  /* @__PURE__ */ n(gs, { strokeWidth: 2, className: "stroke-white stroke-[3]" }),
4970
4970
  /* @__PURE__ */ n("span", { className: "font-normal text-white", children: "Add Page" })
@@ -4990,7 +4990,7 @@ const Jd = () => {
4990
4990
  variant: "ghost",
4991
4991
  onClick: () => u(!h),
4992
4992
  className: "h-6 rounded px-3 py-1 text-xs font-normal",
4993
- children: h ? /* @__PURE__ */ n(ac, {}) : /* @__PURE__ */ n(rc, {})
4993
+ children: h ? /* @__PURE__ */ n(rc, {}) : /* @__PURE__ */ n(ic, {})
4994
4994
  }
4995
4995
  ) }),
4996
4996
  /* @__PURE__ */ n(et, { side: "bottom", children: "Toggle Untranslated Pages" })
@@ -5012,7 +5012,7 @@ function Vt({
5012
5012
  /* @__PURE__ */ n(et, { side: s, sideOffset: 10, children: /* @__PURE__ */ n("p", { children: t }) })
5013
5013
  ] }) }) : e;
5014
5014
  }
5015
- const cu = ({ page: e }) => {
5015
+ const du = ({ page: e }) => {
5016
5016
  var a, r;
5017
5017
  const { isExpanded: t, toggleExpanded: s } = Rn(e == null ? void 0 : e.id);
5018
5018
  return /* @__PURE__ */ n(
@@ -5032,13 +5032,13 @@ const cu = ({ page: e }) => {
5032
5032
  )
5033
5033
  }
5034
5034
  );
5035
- }, du = ({ page: e, pageType: t }) => /* @__PURE__ */ n("div", { className: "flex h-full items-center justify-center gap-x-1", children: e.dynamic ? /* @__PURE__ */ n(Ti, { size: 12, className: "text-yellow-400" }) : t != null && t.icon ? /* @__PURE__ */ n(
5035
+ }, uu = ({ page: e, pageType: t }) => /* @__PURE__ */ n("div", { className: "flex h-full items-center justify-center gap-x-1", children: e.dynamic ? /* @__PURE__ */ n(Ti, { size: 12, className: "text-yellow-400" }) : t != null && t.icon ? /* @__PURE__ */ n(
5036
5036
  "div",
5037
5037
  {
5038
5038
  className: "flex h-4 max-h-4 w-4 max-w-4 items-center justify-center stroke-[1] text-slate-500",
5039
5039
  dangerouslySetInnerHTML: { __html: t.icon }
5040
5040
  }
5041
- ) : t != null && t.hasSlug ? /* @__PURE__ */ n(Qt, { size: 12, className: "stroke-[1] text-slate-500" }) : /* @__PURE__ */ n(Za, { size: 12, className: "stroke-[1] text-slate-500" }) }), uu = ({ isOnline: e }) => /* @__PURE__ */ n("div", { className: `h-2 w-2 rounded-full ${e ? "bg-green-300" : "bg-gray-300"}` }), hu = ({
5041
+ ) : t != null && t.hasSlug ? /* @__PURE__ */ n(Qt, { size: 12, className: "stroke-[1] text-slate-500" }) : /* @__PURE__ */ n(Za, { size: 12, className: "stroke-[1] text-slate-500" }) }), hu = ({ isOnline: e }) => /* @__PURE__ */ n("div", { className: `h-2 w-2 rounded-full ${e ? "bg-green-300" : "bg-gray-300"}` }), mu = ({
5042
5042
  page: e,
5043
5043
  pageTypes: t,
5044
5044
  currentPage: s,
@@ -5068,9 +5068,9 @@ const cu = ({ page: e }) => {
5068
5068
  onClick: () => !e.isPartialGroup && v && a("select", e == null ? void 0 : e.id),
5069
5069
  className: L,
5070
5070
  children: [
5071
- /* @__PURE__ */ n(cu, { page: e }),
5072
- !e.isPartialGroup && /* @__PURE__ */ n(uu, { isOnline: f ? f.online : e.online }),
5073
- /* @__PURE__ */ n(du, { page: e, pageType: m }),
5071
+ /* @__PURE__ */ n(du, { page: e }),
5072
+ !e.isPartialGroup && /* @__PURE__ */ n(hu, { isOnline: f ? f.online : e.online }),
5073
+ /* @__PURE__ */ n(uu, { page: e, pageType: m }),
5074
5074
  /* @__PURE__ */ n(Vt, { content: x, side: "top", showTooltip: x.length > 35, children: /* @__PURE__ */ n("span", { className: "max-w-[40%] truncate font-medium text-black", children: x }) }),
5075
5075
  (N || e.dynamic) && /* @__PURE__ */ n(Vt, { content: P, side: "top", showTooltip: !0, children: /* @__PURE__ */ c("span", { className: "max-w-[40%] truncate font-mono text-xs text-muted-foreground", children: [
5076
5076
  N,
@@ -5080,7 +5080,7 @@ const cu = ({ page: e }) => {
5080
5080
  e.dynamicSlugCustom
5081
5081
  ] })
5082
5082
  ] }) }),
5083
- u && /* @__PURE__ */ n(Vt, { content: "Template", side: "top", children: /* @__PURE__ */ n("span", { className: "text-blue-500", children: /* @__PURE__ */ n(oc, { size: 16 }) }) }),
5083
+ u && /* @__PURE__ */ n(Vt, { content: "Template", side: "top", children: /* @__PURE__ */ n("span", { className: "text-blue-500", children: /* @__PURE__ */ n(cc, { size: 16 }) }) }),
5084
5084
  !e.isPartialGroup && v && !g ? /* @__PURE__ */ n("div", { className: "duration absolute right-0.5 top-[3px]", children: /* @__PURE__ */ n(
5085
5085
  ur,
5086
5086
  {
@@ -5136,7 +5136,7 @@ const cu = ({ page: e }) => {
5136
5136
  const { expandedPages: d } = Rn();
5137
5137
  return /* @__PURE__ */ n("div", { className: "space-y-0.5", style: { paddingLeft: `${t * 10}px` }, children: e.map((h) => /* @__PURE__ */ c(de, { children: [
5138
5138
  /* @__PURE__ */ n(
5139
- hu,
5139
+ mu,
5140
5140
  {
5141
5141
  page: h,
5142
5142
  pageTypes: s,
@@ -5161,8 +5161,8 @@ const cu = ({ page: e }) => {
5161
5161
  }
5162
5162
  )
5163
5163
  ] }, h.id)) });
5164
- }, mu = ({ close: e }) => {
5165
- const { languages: t, setSelectedLang: s } = Fe(), { data: a } = Ge(), { data: r, isFetching: i } = On(), [l, o] = He(), { updateForSelectedPage: d, expandPagesOnSearch: h } = Rn(null), u = Rt(), m = l.get("page"), [y, p] = S(""), [g, f] = S(null), [v, x] = S(null), [N, P] = S(null), [L, C] = S(null), [I, G] = S(""), [J, ee] = S(null), [D, F] = S(null), [M, q] = S(u), [B, K] = S(!1), [, re] = Ue(vs), Ae = B && M !== u, { data: Oe, isFetching: me } = ed(M), w = ae(
5164
+ }, fu = ({ close: e }) => {
5165
+ const { languages: t, setSelectedLang: s } = Fe(), { data: a } = Ge(), { data: r, isFetching: i } = On(), [l, o] = He(), { updateForSelectedPage: d, expandPagesOnSearch: h } = Rn(null), u = Rt(), m = l.get("page"), [y, p] = S(""), [g, f] = S(null), [v, x] = S(null), [N, P] = S(null), [L, C] = S(null), [I, G] = S(""), [J, ee] = S(null), [D, F] = S(null), [M, q] = S(u), [B, K] = S(!1), [, re] = Ue(vs), Ae = B && M !== u, { data: Oe, isFetching: me } = td(M), w = ae(
5166
5166
  (A) => {
5167
5167
  var O;
5168
5168
  return (O = ve(a, { key: A })) == null ? void 0 : O.hasSlug;
@@ -5230,7 +5230,7 @@ const cu = ({ page: e }) => {
5230
5230
  return /* @__PURE__ */ c(de, { children: [
5231
5231
  /* @__PURE__ */ c("div", { className: "flex h-full flex-col justify-between", children: [
5232
5232
  /* @__PURE__ */ n(
5233
- ou,
5233
+ cu,
5234
5234
  {
5235
5235
  pages: b,
5236
5236
  search: y,
@@ -5278,10 +5278,10 @@ const cu = ({ page: e }) => {
5278
5278
  D && /* @__PURE__ */ n(hr, { page: D, onClose: () => F(null) }),
5279
5279
  J && /* @__PURE__ */ n(cr, { page: J, onClose: () => ee(null), closePanel: e })
5280
5280
  ] });
5281
- }, fu = () => {
5281
+ }, gu = () => {
5282
5282
  const e = ht("logo", null);
5283
5283
  return e ? /* @__PURE__ */ n("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Hs.createElement(e, {}) }) : null;
5284
- }, gu = () => {
5284
+ }, pu = () => {
5285
5285
  const [e] = He(), t = e.get("page"), { data: s, isFetching: a } = We(), [r, i] = S(!1), { savePage: l } = Wt(), o = !!t && !Y(s), d = !t || !a && Y(s) || r, h = Et("enable-old-page-manager");
5286
5286
  return /* @__PURE__ */ c(de, { children: [
5287
5287
  /* @__PURE__ */ n("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ c(Xe, { children: [
@@ -5293,7 +5293,7 @@ const cu = ({ page: e }) => {
5293
5293
  onClick: () => {
5294
5294
  l(), i(!0);
5295
5295
  },
5296
- children: /* @__PURE__ */ n(cc, { className: "h-4 w-4" })
5296
+ children: /* @__PURE__ */ n(dc, { className: "h-4 w-4" })
5297
5297
  },
5298
5298
  "template-viewer"
5299
5299
  ) }),
@@ -5308,19 +5308,19 @@ const cu = ({ page: e }) => {
5308
5308
  children: [
5309
5309
  /* @__PURE__ */ c(fi, { className: `mb-3 ${h ? "" : "px-4 pt-4"}`, children: [
5310
5310
  /* @__PURE__ */ c(gi, { className: "flex items-center gap-2 text-sm font-semibold", children: [
5311
- /* @__PURE__ */ n("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ n(dc, { className: "h-4 w-4" }) }),
5311
+ /* @__PURE__ */ n("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ n(uc, { className: "h-4 w-4" }) }),
5312
5312
  /* @__PURE__ */ c("div", { className: "flex flex-col", children: [
5313
5313
  /* @__PURE__ */ n("span", { className: "text-sm font-semibold", children: "Pages" }),
5314
5314
  /* @__PURE__ */ n("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: "Manage your site structure" })
5315
5315
  ] })
5316
5316
  ] }),
5317
- /* @__PURE__ */ n(Fo, { className: "sr-only", children: "Manage your site structure" })
5317
+ /* @__PURE__ */ n($o, { className: "sr-only", children: "Manage your site structure" })
5318
5318
  ] }),
5319
5319
  /* @__PURE__ */ n(
5320
5320
  "div",
5321
5321
  {
5322
5322
  className: `${d ? "h-[calc(100vh-80px)] overflow-y-auto" : "h-[calc(100vh-70px)] overflow-y-auto"}`,
5323
- children: h ? /* @__PURE__ */ n(au, { close: () => i(!1) }) : d && /* @__PURE__ */ n(mu, { close: () => i(!1) })
5323
+ children: h ? /* @__PURE__ */ n(ru, { close: () => i(!1) }) : d && /* @__PURE__ */ n(fu, { close: () => i(!1) })
5324
5324
  }
5325
5325
  )
5326
5326
  ]
@@ -5417,7 +5417,7 @@ const cu = ({ page: e }) => {
5417
5417
  )
5418
5418
  ),
5419
5419
  e && !Y(p.filter((v) => !v.isLangPageAdded)) && /* @__PURE__ */ c(de, { children: [
5420
- /* @__PURE__ */ n(Mo, {}),
5420
+ /* @__PURE__ */ n(Fo, {}),
5421
5421
  /* @__PURE__ */ c(
5422
5422
  T,
5423
5423
  {
@@ -5440,13 +5440,13 @@ const cu = ({ page: e }) => {
5440
5440
  ] })
5441
5441
  ] }) });
5442
5442
  };
5443
- function pu() {
5443
+ function yu() {
5444
5444
  const [e, t] = Ue(vs);
5445
5445
  return /* @__PURE__ */ c("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
5446
- /* @__PURE__ */ n(fu, {}),
5447
5446
  /* @__PURE__ */ n(gu, {}),
5447
+ /* @__PURE__ */ n(pu, {}),
5448
5448
  e && /* @__PURE__ */ n(
5449
- $d,
5449
+ qd,
5450
5450
  {
5451
5451
  isOpen: !0,
5452
5452
  id: e == null ? void 0 : e.id,
@@ -5458,7 +5458,7 @@ function pu() {
5458
5458
  )
5459
5459
  ] });
5460
5460
  }
5461
- function yu(e, t) {
5461
+ function vu(e, t) {
5462
5462
  const s = ue(), a = Z();
5463
5463
  return De({
5464
5464
  queryKey: ["revision-comparison", e.uid, t.uid],
@@ -5481,7 +5481,7 @@ function yu(e, t) {
5481
5481
  staleTime: 0
5482
5482
  });
5483
5483
  }
5484
- const vu = ({ version: e }) => {
5484
+ const bu = ({ version: e }) => {
5485
5485
  const t = e == null ? void 0 : e.item, { data: s } = At(t == null ? void 0 : t.currentEditor), a = e.label === "live", r = e.label === "draft";
5486
5486
  return /* @__PURE__ */ c(
5487
5487
  "span",
@@ -5500,13 +5500,13 @@ const vu = ({ version: e }) => {
5500
5500
  /* @__PURE__ */ n("span", { className: "font-light opacity-90", children: r ? "Currently editing" : "Published by" }),
5501
5501
  !r && /* @__PURE__ */ n("span", { className: "pl-1 font-medium", children: (s == null ? void 0 : s.name) || "Unknown" })
5502
5502
  ] }),
5503
- /* @__PURE__ */ n("div", { className: "text-[10px] leading-tight", children: Wo(t.createdAt, "dd MMM yyyy, h:mm a") })
5503
+ /* @__PURE__ */ n("div", { className: "text-[10px] leading-tight", children: Qo(t.createdAt, "dd MMM yyyy, h:mm a") })
5504
5504
  ] })
5505
5505
  ]
5506
5506
  }
5507
5507
  );
5508
- }, Tr = ({ version: e }) => /* @__PURE__ */ n(vu, { version: e });
5509
- function bu(e, t, s = "data.json") {
5508
+ }, Tr = ({ version: e }) => /* @__PURE__ */ n(bu, { version: e });
5509
+ function xu(e, t, s = "data.json") {
5510
5510
  const a = JSON.stringify(e, null, 2), r = JSON.stringify(t, null, 2), i = a.split(`
5511
5511
  `), l = r.split(`
5512
5512
  `);
@@ -5566,7 +5566,7 @@ function qn(e, t = !0, s = !1) {
5566
5566
  }
5567
5567
  return Qr(e) ? Be(e, (a) => qn(a, t, s)) : co(e) ? Hr(e, (a) => qn(a, t, s)) : e;
5568
5568
  }
5569
- const xu = (e) => {
5569
+ const wu = (e) => {
5570
5570
  switch (e) {
5571
5571
  case "blocks":
5572
5572
  return "Blocks";
@@ -5577,20 +5577,20 @@ const xu = (e) => {
5577
5577
  default:
5578
5578
  return e;
5579
5579
  }
5580
- }, wu = (e, t) => {
5580
+ }, Nu = (e, t) => {
5581
5581
  if (!e || !t) return [{ key: "blocks", label: "Blocks" }];
5582
5582
  const s = Object.keys(e), a = Object.keys(t);
5583
- return s.filter((l) => a.includes(l)).map((l) => ({ key: l, label: xu(l) })).filter((l) => l.key.length > 0);
5583
+ return s.filter((l) => a.includes(l)).map((l) => ({ key: l, label: wu(l) })).filter((l) => l.key.length > 0);
5584
5584
  };
5585
- function Nu({ open: e, compare: t, onOpenChange: s }) {
5586
- const a = t[0], r = t[1], [i, l] = S(null), [o, d] = S("split"), [h, u] = S(!1), [m, y] = S("blocks"), { data: p, isLoading: g } = yu(a, r), { leftData: f, rightData: v, options: x } = W(() => {
5585
+ function Eu({ open: e, compare: t, onOpenChange: s }) {
5586
+ const a = t[0], r = t[1], [i, l] = S(null), [o, d] = S("split"), [h, u] = S(!1), [m, y] = S("blocks"), { data: p, isLoading: g } = vu(a, r), { leftData: f, rightData: v, options: x } = W(() => {
5587
5587
  var F, M;
5588
- const I = (F = p == null ? void 0 : p.version1) == null ? void 0 : F[m], G = (M = p == null ? void 0 : p.version2) == null ? void 0 : M[m], J = qn(I), ee = qn(G), D = wu(p == null ? void 0 : p.version1, p == null ? void 0 : p.version2);
5588
+ const I = (F = p == null ? void 0 : p.version1) == null ? void 0 : F[m], G = (M = p == null ? void 0 : p.version2) == null ? void 0 : M[m], J = qn(I), ee = qn(G), D = Nu(p == null ? void 0 : p.version1, p == null ? void 0 : p.version2);
5589
5589
  return { leftData: J, rightData: ee, options: D };
5590
- }, [p, m]), N = W(() => !f || !v ? "" : bu(f, v), [f, v]), P = W(() => {
5590
+ }, [p, m]), N = W(() => !f || !v ? "" : xu(f, v), [f, v]), P = W(() => {
5591
5591
  if (!N) return [];
5592
5592
  try {
5593
- return Ic(N);
5593
+ return _c(N);
5594
5594
  } catch (I) {
5595
5595
  return console.error("Failed to parse diff:", I), [];
5596
5596
  }
@@ -5659,13 +5659,13 @@ function Nu({ open: e, compare: t, onOpenChange: s }) {
5659
5659
  /* @__PURE__ */ n(Da, { className: "mx-auto mb-2 h-8 w-8 opacity-50" }),
5660
5660
  /* @__PURE__ */ n("p", { children: "No differences found or unable to parse diff" })
5661
5661
  ] }) }) : /* @__PURE__ */ n("div", { children: P.map((I, G) => /* @__PURE__ */ n("div", { className: "mb-4", children: /* @__PURE__ */ n(
5662
- _c,
5662
+ Lc,
5663
5663
  {
5664
5664
  viewType: o,
5665
5665
  diffType: I.type,
5666
5666
  hunks: I.hunks,
5667
5667
  className: "rounded-lg text-xs",
5668
- children: (J) => J.map((ee, D) => /* @__PURE__ */ n(Lc, { hunk: ee }, D))
5668
+ children: (J) => J.map((ee, D) => /* @__PURE__ */ n(Dc, { hunk: ee }, D))
5669
5669
  }
5670
5670
  ) }, G)) }) })
5671
5671
  ] }) })
@@ -5680,7 +5680,7 @@ const lt = ({
5680
5680
  const { hasPermission: r } = Pn();
5681
5681
  return e && !r(e) || t && !t.some((i) => r(i)) ? a : s;
5682
5682
  };
5683
- function Eu(e) {
5683
+ function Su(e) {
5684
5684
  const t = ue(), s = Z();
5685
5685
  return De({
5686
5686
  queryKey: ["revisions", e],
@@ -5693,7 +5693,7 @@ function Eu(e) {
5693
5693
  staleTime: 0
5694
5694
  });
5695
5695
  }
5696
- const Su = () => {
5696
+ const Au = () => {
5697
5697
  const e = ue(), t = Z(), s = Pe();
5698
5698
  return ke({
5699
5699
  mutationFn: async (a) => await t(e, {
@@ -5706,7 +5706,7 @@ const Su = () => {
5706
5706
  });
5707
5707
  }
5708
5708
  });
5709
- }, Au = () => {
5709
+ }, Tu = () => {
5710
5710
  const e = ue(), t = Z(), s = Pe();
5711
5711
  return ke({
5712
5712
  mutationFn: async ({ revisionId: a, discardCurrent: r }) => await t(e, {
@@ -5738,7 +5738,7 @@ const Su = () => {
5738
5738
  /* @__PURE__ */ n(Ii, { className: "h-3 w-3" }),
5739
5739
  /* @__PURE__ */ n("span", { className: "text-[11px] leading-tight", children: "Unsaved changes" })
5740
5740
  ] }) : /* @__PURE__ */ n("span", { className: "rounded bg-purple-500/10 px-1.5 py-0.5 font-mono text-xs font-bold text-purple-600", children: e });
5741
- function Tu({ compare: e, setCompare: t, isComparisonEnabled: s }) {
5741
+ function Cu({ compare: e, setCompare: t, isComparisonEnabled: s }) {
5742
5742
  const { data: a } = We(), { saveState: r } = Wt(), [i] = la();
5743
5743
  if (!a) return null;
5744
5744
  const l = !!e.find((h) => {
@@ -5775,9 +5775,9 @@ function Tu({ compare: e, setCompare: t, isComparisonEnabled: s }) {
5775
5775
  )
5776
5776
  ] });
5777
5777
  }
5778
- function Cu() {
5778
+ function ku() {
5779
5779
  var q, B;
5780
- const [e, t] = Ce.useState([]), [s, a] = Ce.useState(!1), [r, i] = Ce.useState(null), [l, o] = Ce.useState(!1), [d, h] = Ce.useState(!1), { data: u } = We(), { data: m, isFetching: y, error: p, refetch: g } = Eu(u == null ? void 0 : u.id), { mutate: f, isPending: v } = Su(), { mutate: x, isPending: N } = Au(), P = Pe(), L = zi(), C = Et("enable-page-revisions-compare"), { selectedLang: I, fallbackLang: G } = Fe(), J = I || G;
5780
+ const [e, t] = Ce.useState([]), [s, a] = Ce.useState(!1), [r, i] = Ce.useState(null), [l, o] = Ce.useState(!1), [d, h] = Ce.useState(!1), { data: u } = We(), { data: m, isFetching: y, error: p, refetch: g } = Su(u == null ? void 0 : u.id), { mutate: f, isPending: v } = Au(), { mutate: x, isPending: N } = Tu(), P = Pe(), L = zi(), C = Et("enable-page-revisions-compare"), { selectedLang: I, fallbackLang: G } = Fe(), J = I || G;
5781
5781
  le(() => t([]), [u == null ? void 0 : u.id]);
5782
5782
  const ee = (K) => {
5783
5783
  r && x(
@@ -5810,9 +5810,9 @@ function Cu() {
5810
5810
  }, [s, g]), /* @__PURE__ */ c(de, { children: [
5811
5811
  /* @__PURE__ */ n(Ft, { children: /* @__PURE__ */ c(Xe, { children: [
5812
5812
  /* @__PURE__ */ c(hi, { open: s, onOpenChange: a, children: [
5813
- /* @__PURE__ */ n($o, { asChild: !0, children: /* @__PURE__ */ n(Ze, { asChild: !0, children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
5813
+ /* @__PURE__ */ n(qo, { asChild: !0, children: /* @__PURE__ */ n(Ze, { asChild: !0, children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
5814
5814
  /* @__PURE__ */ c(T, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
5815
- /* @__PURE__ */ n(uc, { className: "h-4 w-4" }),
5815
+ /* @__PURE__ */ n(hc, { className: "h-4 w-4" }),
5816
5816
  /* @__PURE__ */ n("span", { className: "sr-only", children: "View revision history" })
5817
5817
  ] }),
5818
5818
  /* @__PURE__ */ n("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
@@ -5825,10 +5825,10 @@ function Cu() {
5825
5825
  ea(new Date(u.createdAt), "MMM d, yyyy 'at' h:mm a")
5826
5826
  ] })
5827
5827
  ] }),
5828
- y ? /* @__PURE__ */ n(ku, {}) : p ? /* @__PURE__ */ n("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "Failed to load revisions. Please try again." }) : /* @__PURE__ */ c("div", { className: "mt-2 flex h-full min-h-0 flex-1 flex-col space-y-2", children: [
5829
- C && /* @__PURE__ */ n(Pu, { lang: J, compare: e, setCompare: t, pageId: u == null ? void 0 : u.id }),
5828
+ y ? /* @__PURE__ */ n(Pu, {}) : p ? /* @__PURE__ */ n("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "Failed to load revisions. Please try again." }) : /* @__PURE__ */ c("div", { className: "mt-2 flex h-full min-h-0 flex-1 flex-col space-y-2", children: [
5829
+ C && /* @__PURE__ */ n(Iu, { lang: J, compare: e, setCompare: t, pageId: u == null ? void 0 : u.id }),
5830
5830
  /* @__PURE__ */ n(
5831
- Tu,
5831
+ Cu,
5832
5832
  {
5833
5833
  compare: e,
5834
5834
  setCompare: t,
@@ -5875,7 +5875,7 @@ function Cu() {
5875
5875
  /* @__PURE__ */ n(et, { side: "bottom", children: /* @__PURE__ */ n("p", { children: "Revision history" }) })
5876
5876
  ] }) }),
5877
5877
  /* @__PURE__ */ n(
5878
- _u,
5878
+ Lu,
5879
5879
  {
5880
5880
  open: l,
5881
5881
  onOpenChange: o,
@@ -5885,7 +5885,7 @@ function Cu() {
5885
5885
  }
5886
5886
  ),
5887
5887
  /* @__PURE__ */ n(
5888
- Lu,
5888
+ Du,
5889
5889
  {
5890
5890
  open: d,
5891
5891
  onOpenChange: h,
@@ -5896,7 +5896,7 @@ function Cu() {
5896
5896
  )
5897
5897
  ] });
5898
5898
  }
5899
- function ku() {
5899
+ function Pu() {
5900
5900
  return /* @__PURE__ */ n("div", { className: "mt-2 space-y-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ c("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
5901
5901
  /* @__PURE__ */ c("div", { className: "flex-1 space-y-1", children: [
5902
5902
  /* @__PURE__ */ n(Mt, { className: "h-4 w-3/4" }),
@@ -5949,7 +5949,7 @@ function Cr({
5949
5949
  ] })
5950
5950
  }
5951
5951
  ),
5952
- /* @__PURE__ */ n(lt, { permissions: [Te.RESTORE_REVISION, Te.DELETE_REVISION], children: /* @__PURE__ */ n(Iu, { revision: e, onRestore: s, onDelete: a }) })
5952
+ /* @__PURE__ */ n(lt, { permissions: [Te.RESTORE_REVISION, Te.DELETE_REVISION], children: /* @__PURE__ */ n(_u, { revision: e, onRestore: s, onDelete: a }) })
5953
5953
  ] }),
5954
5954
  h && /* @__PURE__ */ n(
5955
5955
  cl,
@@ -5972,7 +5972,7 @@ function Cr({
5972
5972
  )
5973
5973
  ] });
5974
5974
  }
5975
- function Pu({ compare: e, setCompare: t, pageId: s }) {
5975
+ function Iu({ compare: e, setCompare: t, pageId: s }) {
5976
5976
  const [a, r] = S(!1), [i, l] = e;
5977
5977
  if (e.length === 0) return null;
5978
5978
  const o = ({ tab: d }) => /* @__PURE__ */ c("span", { className: "flex items-center justify-between rounded border border-blue-100 p-1 font-medium", children: [
@@ -6021,7 +6021,7 @@ function Pu({ compare: e, setCompare: t, pageId: s }) {
6021
6021
  }
6022
6022
  )
6023
6023
  ] }),
6024
- a && (e == null ? void 0 : e.length) > 1 && s && /* @__PURE__ */ n(Nu, { open: a, onOpenChange: r, compare: e })
6024
+ a && (e == null ? void 0 : e.length) > 1 && s && /* @__PURE__ */ n(Eu, { open: a, onOpenChange: r, compare: e })
6025
6025
  ] });
6026
6026
  }
6027
6027
  function cl({ checked: e, disabled: t, onChange: s, label: a = "Compare" }) {
@@ -6039,7 +6039,7 @@ function cl({ checked: e, disabled: t, onChange: s, label: a = "Compare" }) {
6039
6039
  /* @__PURE__ */ n("span", { className: "select-none leading-tight", children: a })
6040
6040
  ] }) });
6041
6041
  }
6042
- function Iu({ revision: e, onRestore: t, onDelete: s }) {
6042
+ function _u({ revision: e, onRestore: t, onDelete: s }) {
6043
6043
  return /* @__PURE__ */ c(_n, { children: [
6044
6044
  /* @__PURE__ */ n(Ln, { asChild: !0, children: /* @__PURE__ */ c(T, { variant: "ghost", size: "icon", className: "h-5 w-5", children: [
6045
6045
  /* @__PURE__ */ n(Cn, { className: "h-4 w-4" }),
@@ -6051,7 +6051,7 @@ function Iu({ revision: e, onRestore: t, onDelete: s }) {
6051
6051
  /* @__PURE__ */ n("span", { children: "Restore this version" })
6052
6052
  ] }) }),
6053
6053
  /* @__PURE__ */ n(lt, { permission: Te.DELETE_REVISION, children: e.uid !== "current" && /* @__PURE__ */ c(de, { children: [
6054
- /* @__PURE__ */ n(qo, {}),
6054
+ /* @__PURE__ */ n(jo, {}),
6055
6055
  /* @__PURE__ */ c($e, { onClick: s, className: "cursor-pointer text-destructive", children: [
6056
6056
  /* @__PURE__ */ n(Xa, { className: "mr-2 h-4 w-4" }),
6057
6057
  /* @__PURE__ */ n("span", { children: "Delete this version" })
@@ -6060,7 +6060,7 @@ function Iu({ revision: e, onRestore: t, onDelete: s }) {
6060
6060
  ] })
6061
6061
  ] });
6062
6062
  }
6063
- function _u({
6063
+ function Lu({
6064
6064
  open: e,
6065
6065
  onOpenChange: t,
6066
6066
  revision: s,
@@ -6094,7 +6094,7 @@ function _u({
6094
6094
  /* @__PURE__ */ n("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
6095
6095
  "Saving as draft..."
6096
6096
  ] }) : /* @__PURE__ */ c(de, { children: [
6097
- /* @__PURE__ */ n(hc, { className: "mr-2 h-4 w-4" }),
6097
+ /* @__PURE__ */ n(mc, { className: "mr-2 h-4 w-4" }),
6098
6098
  "Save as draft"
6099
6099
  ] }) }),
6100
6100
  /* @__PURE__ */ n(T, { variant: "default", className: "sm:flex-1", onClick: () => a(!0), disabled: r, children: r ? /* @__PURE__ */ c(de, { children: [
@@ -6109,7 +6109,7 @@ function _u({
6109
6109
  }
6110
6110
  ) : null;
6111
6111
  }
6112
- function Lu({
6112
+ function Du({
6113
6113
  open: e,
6114
6114
  onOpenChange: t,
6115
6115
  revision: s,
@@ -6152,13 +6152,13 @@ function Lu({
6152
6152
  }
6153
6153
  ) : null;
6154
6154
  }
6155
- const Du = () => {
6155
+ const Ou = () => {
6156
6156
  const e = ue(), t = Z();
6157
6157
  return De({
6158
6158
  queryKey: [U.GET_CHANGES],
6159
6159
  queryFn: async () => t(e, { action: U.GET_CHANGES })
6160
6160
  });
6161
- }, Ou = ({ page: e, selectedPages: t, handleCheckboxChange: s, getPageType: a, hasSlug: r, currentOwnerId: i }) => {
6161
+ }, Ru = ({ page: e, selectedPages: t, handleCheckboxChange: s, getPageType: a, hasSlug: r, currentOwnerId: i }) => {
6162
6162
  const { data: l } = At(i), o = l == null ? void 0 : l.name;
6163
6163
  return /* @__PURE__ */ c("tr", { className: "group relative border-b last:border-b-0 hover:bg-gray-50", children: [
6164
6164
  /* @__PURE__ */ c(
@@ -6179,7 +6179,7 @@ const Du = () => {
6179
6179
  }
6180
6180
  ),
6181
6181
  " ",
6182
- r(e.pageType) ? /* @__PURE__ */ n(Qt, { className: "h-4 w-4" }) : /* @__PURE__ */ n(mc, { className: "h-4 w-4" }),
6182
+ r(e.pageType) ? /* @__PURE__ */ n(Qt, { className: "h-4 w-4" }) : /* @__PURE__ */ n(fc, { className: "h-4 w-4" }),
6183
6183
  /* @__PURE__ */ n(Vt, { content: e.name, side: "top", showTooltip: e.name.length > 25, children: /* @__PURE__ */ n("span", { className: "max-w-[200px] truncate font-medium text-black", children: e.name }) }),
6184
6184
  e.slug && /* @__PURE__ */ n(Vt, { content: e.slug, side: "top", showTooltip: e.slug.length > 25, children: /* @__PURE__ */ n("span", { className: "max-w-[200px] truncate font-mono text-xs text-muted-foreground", children: e.slug }) })
6185
6185
  ]
@@ -6195,11 +6195,11 @@ const Du = () => {
6195
6195
  ] }) })
6196
6196
  ] }, e == null ? void 0 : e.id);
6197
6197
  };
6198
- function Ru({
6198
+ function Gu({
6199
6199
  showModal: e = !1,
6200
6200
  onClose: t = () => console.log("Cancelled")
6201
6201
  }) {
6202
- const [s] = Vi(), [a, r] = S([]), i = Rt(), [l, o] = S(i), { data: d, isFetching: h } = Du(), { data: u } = Ge(), m = ae((D) => {
6202
+ const [s] = Vi(), [a, r] = S([]), i = Rt(), [l, o] = S(i), { data: d, isFetching: h } = Ou(), { data: u } = Ge(), m = ae((D) => {
6203
6203
  var F;
6204
6204
  return (F = ve(u, { key: D })) == null ? void 0 : F.hasSlug;
6205
6205
  }, [u]), y = W(
@@ -6295,7 +6295,7 @@ function Ru({
6295
6295
  /* @__PURE__ */ n("div", { className: "absolute inset-0 left-6 flex items-center", children: /* @__PURE__ */ n("div", { className: "order-gray-300 w-full" }) }),
6296
6296
  /* @__PURE__ */ n("div", { className: "relative flex justify-start", children: /* @__PURE__ */ n("span", { className: "bg-gray-50 pr-2", children: D.label }) })
6297
6297
  ] }) }, "separator") : /* @__PURE__ */ n(
6298
- Ou,
6298
+ Ru,
6299
6299
  {
6300
6300
  page: D,
6301
6301
  selectedPages: a,
@@ -6319,7 +6319,7 @@ function Ru({
6319
6319
  ] })
6320
6320
  ] }) });
6321
6321
  }
6322
- const Gu = ({
6322
+ const Uu = ({
6323
6323
  isOpen: e,
6324
6324
  onClose: t,
6325
6325
  onContinue: s,
@@ -6354,7 +6354,7 @@ const Gu = ({
6354
6354
  }
6355
6355
  )
6356
6356
  ] })
6357
- ] }) }), Uu = () => {
6357
+ ] }) }), Bu = () => {
6358
6358
  const e = Z(), t = ue();
6359
6359
  return De({
6360
6360
  queryKey: [U.GET_WEBSITE_DATA],
@@ -6365,8 +6365,8 @@ const Gu = ({
6365
6365
  })
6366
6366
  });
6367
6367
  };
6368
- function Bu({ onClose: e }) {
6369
- const { data: t, isFetching: s } = Uu(), { mutateAsync: a, isPending: r } = Hc(), i = ht("settingComponent", null), l = ho(async (o) => (await a({ data: o }), !0), 300);
6368
+ function Mu({ onClose: e }) {
6369
+ const { data: t, isFetching: s } = Bu(), { mutateAsync: a, isPending: r } = Wc(), i = ht("settingComponent", null), l = ho(async (o) => (await a({ data: o }), !0), 300);
6370
6370
  return i ? /* @__PURE__ */ n(je, { open: !0, onOpenChange: e, children: /* @__PURE__ */ c(ze, { className: "w-full", children: [
6371
6371
  /* @__PURE__ */ n(Ve, { children: /* @__PURE__ */ n(Ke, { children: "Website Settings" }) }),
6372
6372
  s ? /* @__PURE__ */ c("div", { className: "w-full space-y-3 py-4", children: [
@@ -6385,7 +6385,7 @@ function Bu({ onClose: e }) {
6385
6385
  }) })
6386
6386
  ] }) }) : null;
6387
6387
  }
6388
- const Mu = () => {
6388
+ const Fu = () => {
6389
6389
  const { selectedLang: e, fallbackLang: t } = Fe(), s = ht("getPreviewUrl", async (m) => m), [a, r] = S(""), { data: i } = We(), { data: l } = pt(), { data: o } = Ge(), d = W(
6390
6390
  () => {
6391
6391
  var m;
@@ -6411,8 +6411,8 @@ const Mu = () => {
6411
6411
  " ",
6412
6412
  ce.PREVIEW
6413
6413
  ] }) }) });
6414
- }, Fu = () => {
6415
- const [e, t] = Po();
6414
+ }, $u = () => {
6415
+ const [e, t] = Io();
6416
6416
  return /* @__PURE__ */ c(de, { children: [
6417
6417
  /* @__PURE__ */ n(Vt, { content: ce.THEME, children: /* @__PURE__ */ n(
6418
6418
  T,
@@ -6421,12 +6421,12 @@ const Mu = () => {
6421
6421
  size: "icon",
6422
6422
  className: "gap-2",
6423
6423
  onClick: () => t(e === "theme" ? "block" : "theme"),
6424
- children: /* @__PURE__ */ n(fc, { className: "h-4 w-4" })
6424
+ children: /* @__PURE__ */ n(gc, { className: "h-4 w-4" })
6425
6425
  }
6426
6426
  ) }),
6427
6427
  /* @__PURE__ */ n("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
6428
6428
  ] });
6429
- }, $u = () => {
6429
+ }, qu = () => {
6430
6430
  const [e, t] = S(!1), { isLocked: s } = Tt(), { savePageAsync: a, saveState: r } = Wt();
6431
6431
  le(() => {
6432
6432
  const h = (u) => {
@@ -6465,7 +6465,7 @@ const Mu = () => {
6465
6465
  " ",
6466
6466
  d
6467
6467
  ] });
6468
- }, qu = () => {
6468
+ }, ju = () => {
6469
6469
  const { selectedLang: e } = Fe(), { data: t } = Gt(), { data: s } = pt(), [a, r] = S(!1), [i, l] = S(!1), [o, d] = S(null), { savePageAsync: h } = Wt(), [u, m] = S(!1), { data: y } = We(), { mutate: p, isPending: g } = rr(), { needTranslations: f } = Wt(), v = f(), { buttonText: x, buttonClassName: N, isPublished: P } = W(() => {
6470
6470
  const ee = y && (y == null ? void 0 : y.online);
6471
6471
  return {
@@ -6565,10 +6565,10 @@ const Mu = () => {
6565
6565
  ] })
6566
6566
  ] })
6567
6567
  ] }),
6568
- /* @__PURE__ */ n(Ru, { showModal: a, onClose: () => r(!1) }),
6568
+ /* @__PURE__ */ n(Gu, { showModal: a, onClose: () => r(!1) }),
6569
6569
  o && /* @__PURE__ */ n(bs, { page: o, onClose: () => d(null) }),
6570
6570
  /* @__PURE__ */ n(
6571
- Gu,
6571
+ Uu,
6572
6572
  {
6573
6573
  isOpen: u,
6574
6574
  onClose: G,
@@ -6577,26 +6577,26 @@ const Mu = () => {
6577
6577
  }
6578
6578
  )
6579
6579
  ] });
6580
- }, ju = () => {
6580
+ }, zu = () => {
6581
6581
  const e = ht("settingComponent", null), [t, s] = S(!1);
6582
6582
  return e ? /* @__PURE__ */ c(de, { children: [
6583
6583
  /* @__PURE__ */ n(Vt, { content: ce.WEBSITEDATA, children: /* @__PURE__ */ n(T, { variant: "ghost", size: "icon", className: "gap-2", onClick: () => s(!0), children: /* @__PURE__ */ n(_i, { className: "h-4 w-4" }) }) }),
6584
- t && /* @__PURE__ */ n(Bu, { onClose: () => s(!1) }),
6584
+ t && /* @__PURE__ */ n(Mu, { onClose: () => s(!1) }),
6585
6585
  /* @__PURE__ */ n("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
6586
6586
  ] }) : null;
6587
6587
  };
6588
- function zu() {
6588
+ function Vu() {
6589
6589
  const { isLocked: e } = Tt(), [t] = He(), s = t.get("lang"), a = Fi(s);
6590
6590
  return e || !a ? /* @__PURE__ */ n("div", {}) : /* @__PURE__ */ c("div", { className: "flex items-center justify-end gap-1", children: [
6591
- /* @__PURE__ */ n(Cu, {}),
6592
- /* @__PURE__ */ n(lt, { permission: Te.EDIT_THEME, children: /* @__PURE__ */ n(Fu, {}) }),
6593
- /* @__PURE__ */ n(lt, { permission: Te.EDIT_SETTINGS, children: /* @__PURE__ */ n(ju, {}) }),
6594
- /* @__PURE__ */ n(Mu, {}),
6595
- /* @__PURE__ */ n(lt, { permission: Te.SAVE_PAGE, children: /* @__PURE__ */ n($u, {}) }),
6596
- /* @__PURE__ */ n(lt, { permission: Te.PUBLISH_PAGE, children: /* @__PURE__ */ n(qu, {}) })
6591
+ /* @__PURE__ */ n(ku, {}),
6592
+ /* @__PURE__ */ n(lt, { permission: Te.EDIT_THEME, children: /* @__PURE__ */ n($u, {}) }),
6593
+ /* @__PURE__ */ n(lt, { permission: Te.EDIT_SETTINGS, children: /* @__PURE__ */ n(zu, {}) }),
6594
+ /* @__PURE__ */ n(Fu, {}),
6595
+ /* @__PURE__ */ n(lt, { permission: Te.SAVE_PAGE, children: /* @__PURE__ */ n(qu, {}) }),
6596
+ /* @__PURE__ */ n(lt, { permission: Te.PUBLISH_PAGE, children: /* @__PURE__ */ n(ju, {}) })
6597
6597
  ] });
6598
6598
  }
6599
- const Vu = ({
6599
+ const Ku = ({
6600
6600
  isDefaultLang: e,
6601
6601
  searchQuery: t,
6602
6602
  setSearchQuery: s
@@ -6611,7 +6611,7 @@ const Vu = ({
6611
6611
  disabled: !e,
6612
6612
  onKeyDown: (a) => a.stopPropagation()
6613
6613
  }
6614
- ), Ku = ({
6614
+ ), Hu = ({
6615
6615
  dynamicPage: e,
6616
6616
  setDynamicPage: t,
6617
6617
  searchQuery: s,
@@ -6632,7 +6632,7 @@ const Vu = ({
6632
6632
  }
6633
6633
  ) }),
6634
6634
  /* @__PURE__ */ c(Dn, { className: "w-96 divide-y shadow-xl p-0 max-h-[75vh]", children: [
6635
- /* @__PURE__ */ n("div", { className: "p-1.5 bg-gray-50/30", children: /* @__PURE__ */ n(Vu, { isDefaultLang: o, searchQuery: s, setSearchQuery: a }) }),
6635
+ /* @__PURE__ */ n("div", { className: "p-1.5 bg-gray-50/30", children: /* @__PURE__ */ n(Ku, { isDefaultLang: o, searchQuery: s, setSearchQuery: a }) }),
6636
6636
  (r == null ? void 0 : r.length) === 0 ? /* @__PURE__ */ n("div", { className: "h-24 text-xs flex items-center justify-center", children: "No pages found" }) : r == null ? void 0 : r.map((d) => /* @__PURE__ */ n(
6637
6637
  $e,
6638
6638
  {
@@ -6648,7 +6648,7 @@ const Vu = ({
6648
6648
  ))
6649
6649
  ] })
6650
6650
  ] });
6651
- }, Hu = () => {
6651
+ }, Wu = () => {
6652
6652
  const {
6653
6653
  dynamicPage: e,
6654
6654
  dynamicPages: t,
@@ -6662,7 +6662,7 @@ const Vu = ({
6662
6662
  return le(() => {
6663
6663
  d.current !== a && e && (o(), d.current = a);
6664
6664
  }, [a, t]), /* @__PURE__ */ n("div", { className: "relative", children: /* @__PURE__ */ n(
6665
- Ku,
6665
+ Hu,
6666
6666
  {
6667
6667
  dynamicPage: e,
6668
6668
  setDynamicPage: i,
@@ -6671,7 +6671,7 @@ const Vu = ({
6671
6671
  dynamicPages: s
6672
6672
  }
6673
6673
  ) });
6674
- }, Wu = () => {
6674
+ }, Qu = () => {
6675
6675
  const [e, t] = S(null), [s, a] = S(null), [r, i] = S(null), [l, o] = S(null), [d, h] = S(null), [u, m] = S(null), { data: y, isFetching: p } = Gt(), { selectedLang: g, fallbackLang: f } = Fe(), { data: v } = pt(), x = v == null ? void 0 : v.find((I) => I.lang === g), { isLocked: N } = Tt(), P = !(y != null && y.slug), [, L] = Ue(vs);
6676
6676
  if (!y) return null;
6677
6677
  const C = (I) => {
@@ -6726,10 +6726,10 @@ const Vu = ({
6726
6726
  l && /* @__PURE__ */ n(hr, { page: l, onClose: () => o(null) }),
6727
6727
  d && /* @__PURE__ */ n(cr, { page: d, onClose: () => h(null), closePanel: () => m(null) })
6728
6728
  ] });
6729
- }, Qu = ({ hasDynamicPage: e }) => /* @__PURE__ */ n(ys, { children: /* @__PURE__ */ c("div", { className: "flex min-w-[300px] max-w-[400px] flex-col items-center justify-center rounded-lg border bg-white p-4 shadow-lg", children: [
6729
+ }, Ju = ({ hasDynamicPage: e }) => /* @__PURE__ */ n(ys, { children: /* @__PURE__ */ c("div", { className: "flex min-w-[300px] max-w-[400px] flex-col items-center justify-center rounded-lg border bg-white p-4 shadow-lg", children: [
6730
6730
  /* @__PURE__ */ n("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
6731
6731
  /* @__PURE__ */ n("p", { className: "pt-2 text-center text-sm font-light text-gray-600", children: e ? "Please select a page from the list in the top header. This will enable you to edit the page." : "Please add a new page" })
6732
- ] }) }), Ju = () => {
6732
+ ] }) }), Yu = () => {
6733
6733
  const { data: e } = Gt(), t = nr(), { data: s, isFetching: a } = We(), r = $(s, "dynamic", !1), i = Et("dynamic-page-selector"), { dynamicPage: l, allLangPages: o } = qi(), d = o.length > 0, h = e == null ? void 0 : e.slug, u = !h, m = zi(), p = (u ? `Partial: ${e == null ? void 0 : e.name} ` : `${h}${t}`).replace(window.location.host, "");
6734
6734
  return /* @__PURE__ */ c("div", { className: "relative z-10 flex items-center gap-x-1", children: [
6735
6735
  /* @__PURE__ */ n(
@@ -6739,7 +6739,7 @@ const Vu = ({
6739
6739
  "flex h-8 w-auto max-w-[600px] items-center rounded-md border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800",
6740
6740
  a && "pointer-events-none cursor-not-allowed opacity-50"
6741
6741
  ),
6742
- children: /* @__PURE__ */ n(Wu, {})
6742
+ children: /* @__PURE__ */ n(Qu, {})
6743
6743
  }
6744
6744
  ),
6745
6745
  /* @__PURE__ */ c(
@@ -6762,21 +6762,21 @@ const Vu = ({
6762
6762
  ] }) : p
6763
6763
  }
6764
6764
  ),
6765
- !u && /* @__PURE__ */ n("a", { href: m, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ n("div", { className: "ml-2 mr-px flex-shrink-0 rounded-sm p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300", children: /* @__PURE__ */ n(gc, { className: "h-4 w-4", strokeWidth: 1 }) }) })
6765
+ !u && /* @__PURE__ */ n("a", { href: m, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ n("div", { className: "ml-2 mr-px flex-shrink-0 rounded-sm p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300", children: /* @__PURE__ */ n(pc, { className: "h-4 w-4", strokeWidth: 1 }) }) })
6766
6766
  ] })
6767
6767
  ]
6768
6768
  }
6769
6769
  ),
6770
6770
  r && !a && i && /* @__PURE__ */ c("div", { className: "relative", children: [
6771
- !l && /* @__PURE__ */ n(Qu, { hasDynamicPage: d }),
6772
- /* @__PURE__ */ n(Hu, {})
6771
+ !l && /* @__PURE__ */ n(Ju, { hasDynamicPage: d }),
6772
+ /* @__PURE__ */ n(Wu, {})
6773
6773
  ] })
6774
6774
  ] });
6775
- }, Yu = () => /* @__PURE__ */ c("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
6776
- /* @__PURE__ */ n(pu, {}),
6777
- /* @__PURE__ */ n(Ju, {}),
6778
- /* @__PURE__ */ n(zu, {})
6779
- ] }), Xu = () => {
6775
+ }, Xu = () => /* @__PURE__ */ c("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
6776
+ /* @__PURE__ */ n(yu, {}),
6777
+ /* @__PURE__ */ n(Yu, {}),
6778
+ /* @__PURE__ */ n(Vu, {})
6779
+ ] }), Zu = () => {
6780
6780
  const e = ue(), { aiContext: t } = tr(), s = Z();
6781
6781
  return ae(
6782
6782
  async (a, r, i, l) => s(e, {
@@ -6785,9 +6785,9 @@ const Vu = ({
6785
6785
  }),
6786
6786
  [e, t, s]
6787
6787
  );
6788
- }, Zu = (e, t) => t.map((s) => {
6788
+ }, eh = (e, t) => t.map((s) => {
6789
6789
  if (Ie(e, s._type)) {
6790
- const a = Oc(s._type);
6790
+ const a = Rc(s._type);
6791
6791
  return {
6792
6792
  ...a,
6793
6793
  ...fs(s, [
@@ -6803,15 +6803,15 @@ const Vu = ({
6803
6803
  };
6804
6804
  }
6805
6805
  return s;
6806
- }), eh = (e) => {
6807
- const t = Dc();
6806
+ }), th = (e) => {
6807
+ const t = Oc();
6808
6808
  return W(() => {
6809
6809
  if (!e || Y(e)) return { blocks: [] };
6810
6810
  const s = ye(
6811
6811
  e,
6812
6812
  (a) => !xt(a == null ? void 0 : a._type, "@chai/")
6813
6813
  );
6814
- return { blocks: Zu(t, s) };
6814
+ return { blocks: eh(t, s) };
6815
6815
  }, [e, t]);
6816
6816
  }, kr = {
6817
6817
  async getUILibraryBlock(e, t, s) {
@@ -6819,7 +6819,7 @@ const Vu = ({
6819
6819
  action: "GET_LIBRARY_ITEM",
6820
6820
  data: { id: e.id }
6821
6821
  }), r = $(a, "html", ""), i = $(a, "blocks", []);
6822
- return Qr(i) ? i : _o(r);
6822
+ return Qr(i) ? i : Lo(r);
6823
6823
  },
6824
6824
  async getUILibraryBlocks(e, t, s) {
6825
6825
  try {
@@ -6833,7 +6833,7 @@ const Vu = ({
6833
6833
  return console.error(a), [];
6834
6834
  }
6835
6835
  }
6836
- }, th = () => {
6836
+ }, nh = () => {
6837
6837
  const e = ue(), t = Z();
6838
6838
  return De({
6839
6839
  queryKey: ["uiLibraries"],
@@ -6843,7 +6843,7 @@ const Vu = ({
6843
6843
  ...r
6844
6844
  }));
6845
6845
  return a.forEach((r) => {
6846
- Io(r.id, {
6846
+ _o(r.id, {
6847
6847
  name: r.isSiteLibrary ? r.name + " (Current Site) " : r.name,
6848
6848
  description: r.description,
6849
6849
  getBlocksList: (i) => kr.getUILibraryBlocks(i, t, e),
@@ -6852,7 +6852,7 @@ const Vu = ({
6852
6852
  }), a;
6853
6853
  }
6854
6854
  });
6855
- }, nh = () => {
6855
+ }, sh = () => {
6856
6856
  const e = ia(), t = Z(), { user: s } = ot(), a = s == null ? void 0 : s.id;
6857
6857
  return De({
6858
6858
  queryKey: ["permissions", a],
@@ -6862,7 +6862,7 @@ const Vu = ({
6862
6862
  }),
6863
6863
  enabled: !!a
6864
6864
  });
6865
- }, sh = () => {
6865
+ }, ah = () => {
6866
6866
  const e = ue(), t = Z(), { setCurrentEditor: s } = Tt(), [, a] = la();
6867
6867
  return { onSave: async ({
6868
6868
  page: i,
@@ -6882,7 +6882,7 @@ const Vu = ({
6882
6882
  return console.error(d), new Error("Failed to save blocks");
6883
6883
  }
6884
6884
  } };
6885
- }, ah = () => {
6885
+ }, rh = () => {
6886
6886
  const { data: e } = On(), t = ue(), s = Z();
6887
6887
  return {
6888
6888
  getPartialBlocks: ae(async () => {
@@ -6914,7 +6914,7 @@ const Vu = ({
6914
6914
  }, Pr = Os.object({
6915
6915
  email: Os.string().email({ message: "Please enter a valid email address" }),
6916
6916
  password: Os.string().min(6, { message: "Password must be at least 6 characters" })
6917
- }), rh = () => {
6917
+ }), ih = () => {
6918
6918
  const { setUser: e, logout: t } = ot(), s = ia(), [a, r] = S(""), [i, l] = S(""), [o, d] = S({}), [h, u] = S(!1), [m, y] = S(""), p = ke({
6919
6919
  mutationFn: async (v) => {
6920
6920
  y("");
@@ -6961,7 +6961,7 @@ const Vu = ({
6961
6961
  return /* @__PURE__ */ n("div", { className: "flex min-h-screen items-center justify-center bg-slate-50", children: /* @__PURE__ */ c(Qs, { className: "w-full max-w-md", children: [
6962
6962
  /* @__PURE__ */ c(Js, { children: [
6963
6963
  /* @__PURE__ */ n(Ys, { className: "text-2xl", children: "Sign in" }),
6964
- /* @__PURE__ */ n(jo, { children: "Enter your credentials to sign in to visual builder" })
6964
+ /* @__PURE__ */ n(zo, { children: "Enter your credentials to sign in to visual builder" })
6965
6965
  ] }),
6966
6966
  /* @__PURE__ */ n(Xs, { children: /* @__PURE__ */ c("form", { onSubmit: g, className: "space-y-4", children: [
6967
6967
  /* @__PURE__ */ c("div", { className: "space-y-1", children: [
@@ -6999,7 +6999,7 @@ const Vu = ({
6999
6999
  type: "button",
7000
7000
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",
7001
7001
  onClick: () => u(!h),
7002
- children: h ? /* @__PURE__ */ n(pc, { className: "h-4 w-4" }) : /* @__PURE__ */ n(aa, { className: "h-4 w-4" })
7002
+ children: h ? /* @__PURE__ */ n(yc, { className: "h-4 w-4" }) : /* @__PURE__ */ n(aa, { className: "h-4 w-4" })
7003
7003
  }
7004
7004
  )
7005
7005
  ] }),
@@ -7045,17 +7045,17 @@ const Vu = ({
7045
7045
  ] })
7046
7046
  ] }) });
7047
7047
  };
7048
- let Ua = rh;
7049
- const ih = () => W(() => Ua, [Ua]), Jf = (e) => {
7048
+ let Ua = ih;
7049
+ const lh = () => W(() => Ua, [Ua]), Yf = (e) => {
7050
7050
  Ua = e;
7051
- }, lh = () => {
7052
- const e = ih();
7051
+ }, oh = () => {
7052
+ const e = lh();
7053
7053
  return /* @__PURE__ */ n(Ya, { fallback: /* @__PURE__ */ n("div", { children: "Loading..." }), children: /* @__PURE__ */ n(e, {}) });
7054
- }, oh = ({
7054
+ }, ch = ({
7055
7055
  page: e,
7056
7056
  onClose: t
7057
7057
  }) => {
7058
- const [s, a] = S(e.slug || ""), { mutate: r, isPending: i } = Id(), { data: l } = Ge(), o = ve(l, { key: e == null ? void 0 : e.pageType }), d = (u) => {
7058
+ const [s, a] = S(e.slug || ""), { mutate: r, isPending: i } = _d(), { data: l } = Ge(), o = ve(l, { key: e == null ? void 0 : e.pageType }), d = (u) => {
7059
7059
  if (u.preventDefault(), !(e != null && e.primaryPage) && Object.keys(Le).some((p) => s === `/${p}` || sn(s, `/${p}/`))) {
7060
7060
  H.error("Error", {
7061
7061
  description: "Slugs cannot start with a language code for primary page"
@@ -7127,7 +7127,7 @@ const ih = () => W(() => Ua, [Ua]), Jf = (e) => {
7127
7127
  ) })
7128
7128
  ] })
7129
7129
  ] }) });
7130
- }, ch = () => {
7130
+ }, dh = () => {
7131
7131
  const [, e] = Ue(vs), { selectedLang: t, fallbackLang: s, setSelectedLang: a } = Fe(), { data: r, isFetching: i } = pt(), { data: l } = We(), { data: o } = Ge(), d = W(() => {
7132
7132
  const x = o == null ? void 0 : o.find((N) => N.key === (l == null ? void 0 : l.pageType));
7133
7133
  return l != null && l.dynamic ? x == null ? void 0 : x.dynamicSlug : "";
@@ -7170,7 +7170,7 @@ const ih = () => W(() => Ua, [Ua]), Jf = (e) => {
7170
7170
  ] })
7171
7171
  ] }),
7172
7172
  L ? /* @__PURE__ */ c("div", { className: "flex items-center gap-x-1 text-[11px] text-orange-500", children: [
7173
- /* @__PURE__ */ n(yc, { fill: "orange", className: "h-3 w-3" }),
7173
+ /* @__PURE__ */ n(vc, { fill: "orange", className: "h-3 w-3" }),
7174
7174
  /* @__PURE__ */ n("b", { children: " Primary" })
7175
7175
  ] }) : /* @__PURE__ */ n("div", { className: "flex items-center gap-x-3", children: /* @__PURE__ */ n(
7176
7176
  lt,
@@ -7195,7 +7195,7 @@ const ih = () => W(() => Ua, [Ua]), Jf = (e) => {
7195
7195
  });
7196
7196
  },
7197
7197
  children: [
7198
- /* @__PURE__ */ n(vc, { className: "size-3" }),
7198
+ /* @__PURE__ */ n(bc, { className: "size-3" }),
7199
7199
  ce.EDIT
7200
7200
  ]
7201
7201
  }
@@ -7221,7 +7221,7 @@ const ih = () => W(() => Ua, [Ua]), Jf = (e) => {
7221
7221
  I.stopPropagation(), u(x);
7222
7222
  },
7223
7223
  children: [
7224
- /* @__PURE__ */ n(bc, { className: "size-3" }),
7224
+ /* @__PURE__ */ n(xc, { className: "size-3" }),
7225
7225
  ce.DELETE
7226
7226
  ]
7227
7227
  }
@@ -7254,20 +7254,20 @@ const ih = () => W(() => Ua, [Ua]), Jf = (e) => {
7254
7254
  ) }) }),
7255
7255
  h && /* @__PURE__ */ n(ca, { page: h, onClose: () => u(null) }),
7256
7256
  m && /* @__PURE__ */ n(bs, { page: m, onClose: () => y(null) }),
7257
- p && /* @__PURE__ */ n(oh, { page: p, onClose: () => g(null) })
7257
+ p && /* @__PURE__ */ n(ch, { page: p, onClose: () => g(null) })
7258
7258
  ] });
7259
- }, dh = ({
7259
+ }, uh = ({
7260
7260
  isActive: e,
7261
7261
  show: t
7262
7262
  }) => {
7263
7263
  const { data: s } = St();
7264
- return !Ie(s, "languages") || !$(s, "languages", []).length ? null : /* @__PURE__ */ n(T, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ n(xc, { className: "w-4 h-4" }) });
7265
- }, dl = "lang", uh = {
7264
+ return !Ie(s, "languages") || !$(s, "languages", []).length ? null : /* @__PURE__ */ n(T, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ n(wc, { className: "w-4 h-4" }) });
7265
+ }, dl = "lang", hh = {
7266
7266
  id: dl,
7267
7267
  label: "Languages",
7268
7268
  position: "top",
7269
- panel: ch,
7270
- button: dh,
7269
+ panel: dh,
7270
+ button: uh,
7271
7271
  view: "modal",
7272
7272
  width: 400
7273
7273
  };
@@ -7308,13 +7308,13 @@ function It({
7308
7308
  role: "combobox",
7309
7309
  "aria-expanded": r,
7310
7310
  disabled: a,
7311
- children: /* @__PURE__ */ n(wc, { className: "h-3 w-3" })
7311
+ children: /* @__PURE__ */ n(Nc, { className: "h-3 w-3" })
7312
7312
  }
7313
7313
  ) }) }),
7314
7314
  /* @__PURE__ */ n(et, { children: "Add field" })
7315
7315
  ] }),
7316
7316
  /* @__PURE__ */ n(Sn, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ c(Kn, { children: [
7317
- /* @__PURE__ */ n(zo, { className: "border-none", placeholder: "Search..." }),
7317
+ /* @__PURE__ */ n(Vo, { className: "border-none", placeholder: "Search..." }),
7318
7318
  /* @__PURE__ */ c(
7319
7319
  oi,
7320
7320
  {
@@ -7374,10 +7374,10 @@ function It({
7374
7374
  ] }) })
7375
7375
  ] });
7376
7376
  }
7377
- const hh = () => {
7377
+ const mh = () => {
7378
7378
  const { selectedLang: e } = Fe(), { data: t, isFetching: s } = pt();
7379
7379
  return { data: W(() => ve(t, { lang: e || "" }) || {}, [t, e]), isFetching: s };
7380
- }, mh = () => {
7380
+ }, fh = () => {
7381
7381
  var l;
7382
7382
  const t = (l = document.getElementById("canvas-iframe").contentDocument) == null ? void 0 : l.body.innerHTML;
7383
7383
  if (!t) return null;
@@ -7401,9 +7401,9 @@ const hh = () => {
7401
7401
  onComplete: t,
7402
7402
  field: s
7403
7403
  }) => {
7404
- const a = Z(), r = ue(), { selectedLang: i, fallbackLang: l } = Fe(), o = Lo("aiContext", ""), { mutate: d, isPending: h } = ke({
7404
+ const a = Z(), r = ue(), { selectedLang: i, fallbackLang: l } = Fe(), o = Do("aiContext", ""), { mutate: d, isPending: h } = ke({
7405
7405
  mutationFn: async () => {
7406
- const u = mh();
7406
+ const u = fh();
7407
7407
  return await a(r, {
7408
7408
  action: U.GENERATE_SEO_FIELD,
7409
7409
  data: {
@@ -7432,10 +7432,10 @@ const hh = () => {
7432
7432
  variant: "ghost",
7433
7433
  size: "sm",
7434
7434
  onClick: () => d(),
7435
- children: h ? /* @__PURE__ */ n(Li, { className: "h-3 w-3 animate-spin text-yellow-500" }) : /* @__PURE__ */ n(Nc, { className: "text-yellow-500" })
7435
+ children: h ? /* @__PURE__ */ n(Li, { className: "h-3 w-3 animate-spin text-yellow-500" }) : /* @__PURE__ */ n(Ec, { className: "text-yellow-500" })
7436
7436
  }
7437
7437
  );
7438
- }, fh = ({
7438
+ }, gh = ({
7439
7439
  isOpen: e,
7440
7440
  onClose: t,
7441
7441
  onSave: s,
@@ -7461,7 +7461,7 @@ const hh = () => {
7461
7461
  /* @__PURE__ */ n(T, { onClick: s, disabled: r, children: r ? "Saving..." : "Save & Switch" })
7462
7462
  ] })
7463
7463
  ] }) });
7464
- }, gh = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Ir = (e) => {
7464
+ }, ph = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Ir = (e) => {
7465
7465
  if (!e.trim())
7466
7466
  return { isValid: !1, parsed: null, placeholders: [], error: { message: "JSON is empty" } };
7467
7467
  try {
@@ -7496,13 +7496,13 @@ const hh = () => {
7496
7496
  }
7497
7497
  };
7498
7498
  }
7499
- }, ph = (e, t) => {
7499
+ }, yh = (e, t) => {
7500
7500
  let a = JSON.stringify(e, null, 2);
7501
7501
  return t.forEach(({ original: r }, i) => {
7502
- const l = `"__placeholder_${i}__"`, o = new RegExp(gh(l), "g");
7502
+ const l = `"__placeholder_${i}__"`, o = new RegExp(ph(l), "g");
7503
7503
  a = a.replace(o, r);
7504
7504
  }), a;
7505
- }, yh = (e, t) => {
7505
+ }, vh = (e, t) => {
7506
7506
  if (!e) return "";
7507
7507
  let s = JSON.stringify(e, null, 2);
7508
7508
  const a = /{{([^{}]+)}}/g;
@@ -7559,7 +7559,7 @@ const hh = () => {
7559
7559
  const L = Ir(e);
7560
7560
  if (L.isValid)
7561
7561
  if (y(null), L.parsed) {
7562
- const C = yh(L.parsed, o);
7562
+ const C = vh(L.parsed, o);
7563
7563
  g(C);
7564
7564
  } else
7565
7565
  g("");
@@ -7569,7 +7569,7 @@ const hh = () => {
7569
7569
  const N = () => {
7570
7570
  const L = Ir(e);
7571
7571
  if (L.isValid && L.parsed) {
7572
- const C = ph(L.parsed, L.placeholders);
7572
+ const C = yh(L.parsed, L.placeholders);
7573
7573
  t(C);
7574
7574
  }
7575
7575
  }, P = () => {
@@ -7579,7 +7579,7 @@ const hh = () => {
7579
7579
  /* @__PURE__ */ c("div", { className: "mb-2 flex items-center justify-between", children: [
7580
7580
  /* @__PURE__ */ c(yi, { className: "grid w-[200px] grid-cols-2", children: [
7581
7581
  /* @__PURE__ */ c(Mn, { value: "edit", className: "flex items-center gap-1", children: [
7582
- /* @__PURE__ */ n(Ec, { className: "h-4 w-4" }),
7582
+ /* @__PURE__ */ n(Sc, { className: "h-4 w-4" }),
7583
7583
  /* @__PURE__ */ n("span", { children: "Edit" })
7584
7584
  ] }),
7585
7585
  /* @__PURE__ */ c(
@@ -7671,7 +7671,7 @@ const hh = () => {
7671
7671
  } catch {
7672
7672
  return !1;
7673
7673
  }
7674
- }, vh = (e, t) => {
7674
+ }, bh = (e, t) => {
7675
7675
  const s = e.selectionStart || 0, a = e.selectionEnd || 0, r = e.value, i = r.substring(0, s), l = r.substring(a), o = `{{${t}}}`, d = i + "" + o + l, h = s + 0 + // Account for space before if added
7676
7676
  o.length;
7677
7677
  return {
@@ -7679,7 +7679,7 @@ const hh = () => {
7679
7679
  newCursorPos: h
7680
7680
  };
7681
7681
  }, ul = () => {
7682
- const { t: e } = Do(), [, t] = Ws(), { data: s } = We(), { data: a } = Wi(), { data: r, isFetching: i } = hh(), l = r == null ? void 0 : r.seo, o = tt(null), d = s == null ? void 0 : s.id, h = s == null ? void 0 : s.pageType, u = Yi(h), { selectedLang: m, fallbackLang: y } = Fe(), p = m || y, g = Et("enable-seo-meta-tab"), [f, v] = S(!1), [x, N] = S(!1), [P, L] = S(!1), [C, I] = S(null), [G, J] = S({
7682
+ const { t: e } = Oo(), [, t] = Ws(), { data: s } = We(), { data: a } = Wi(), { data: r, isFetching: i } = mh(), l = r == null ? void 0 : r.seo, o = tt(null), d = s == null ? void 0 : s.id, h = s == null ? void 0 : s.pageType, u = Yi(h), { selectedLang: m, fallbackLang: y } = Fe(), p = m || y, g = Et("enable-seo-meta-tab"), [f, v] = S(!1), [x, N] = S(!1), [P, L] = S(!1), [C, I] = S(null), [G, J] = S({
7683
7683
  keyword: "",
7684
7684
  title: "",
7685
7685
  description: "",
@@ -7792,7 +7792,7 @@ const hh = () => {
7792
7792
  }, me = (E, R) => {
7793
7793
  const A = document.getElementById(R);
7794
7794
  if (A) {
7795
- const { value: O, newCursorPos: V } = vh(A, E);
7795
+ const { value: O, newCursorPos: V } = bh(A, E);
7796
7796
  o.current = {
7797
7797
  id: R,
7798
7798
  position: V
@@ -8233,7 +8233,7 @@ const hh = () => {
8233
8233
  ] })
8234
8234
  ] }),
8235
8235
  /* @__PURE__ */ n(
8236
- fh,
8236
+ gh,
8237
8237
  {
8238
8238
  isOpen: P,
8239
8239
  onClose: () => {
@@ -8256,25 +8256,25 @@ const hh = () => {
8256
8256
  ] });
8257
8257
  };
8258
8258
  ul.displayName = "SeoPanel";
8259
- const hl = "seo", bh = ({ isActive: e, show: t }) => {
8259
+ const hl = "seo", xh = ({ isActive: e, show: t }) => {
8260
8260
  const { data: s } = We(), a = Yi(s == null ? void 0 : s.pageType);
8261
8261
  return !Ie(a, "hasSlug") || !a.hasSlug ? null : /* @__PURE__ */ n(T, { size: "sm", className: "my-1", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c("svg", { className: "h-4 w-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 21 21", fill: "currentColor", children: [
8262
8262
  /* @__PURE__ */ n("path", { d: "M9.931 6.818c-1.238 0-2.136.925-2.136 2.2 0 1.279.898 2.207 2.136 2.207.664 0 1.257-.246 1.67-.694a.15.15 0 0 0-.009-.213l-.311-.286a.15.15 0 0 0-.213.009c-.273.297-.677.46-1.137.46-.699 0-1.233-.444-1.375-1.12h3.295a.15.15 0 0 0 .151-.151v-.211c0-1.295-.852-2.2-2.072-2.2m0 .724c.697 0 1.188.422 1.315 1.113h-2.69c.142-.673.676-1.113 1.374-1.113m4.332-.724c-1.246 0-2.15.925-2.15 2.2 0 1.279.904 2.207 2.15 2.207.596 0 1.143-.223 1.538-.628s.612-.965.612-1.579c0-1.275-.904-2.2-2.15-2.2m0 3.683c-.826 0-1.426-.624-1.426-1.483 0-.855.6-1.475 1.426-1.475s1.426.621 1.426 1.476c0 .423-.144.804-.406 1.073-.258.264-.62.41-1.019.41M6.318 8.71c-.665-.206-.902-.335-.902-.645 0-.47.564-.521.806-.521.29 0 .552.07.801.215a.15.15 0 0 0 .206-.055l.212-.366a.15.15 0 0 0-.055-.206 2.27 2.27 0 0 0-1.165-.312c-.915 0-1.53.501-1.53 1.245 0 .899.816 1.152 1.411 1.336.655.203.812.307.804.53-.016.398-.567.429-.735.429-.386 0-.722-.129-.972-.374q-.043-.042-.107-.043a.15.15 0 0 0-.106.045l-.295.302a.15.15 0 0 0 .002.213c.383.374.908.58 1.478.58.859 0 1.432-.441 1.459-1.125.031-.833-.746-1.074-1.313-1.249" }),
8263
8263
  /* @__PURE__ */ n("path", { d: "M20.396 2.049H.604A.604.604 0 0 0 0 2.653v12.7c0 .333.27.604.604.604h6.941c-.266 1.296-.881 1.966-.886 1.971a.604.604 0 0 0 .434 1.024h6.815a.604.604 0 0 0 .434-1.024c-.007-.007-.621-.675-.886-1.971h6.941c.333 0 .604-.27.604-.604V2.652a.604.604 0 0 0-.604-.604m-.604 12.701h-.985v-.17a.604.604 0 0 0-1.208 0v.17h-.63v-.17a.604.604 0 0 0-1.208 0v.17H1.207V3.256h18.585z" })
8264
8264
  ] }) });
8265
- }, xh = {
8265
+ }, wh = {
8266
8266
  id: hl,
8267
8267
  label: "SEO",
8268
8268
  panel: ul,
8269
- button: bh,
8269
+ button: xh,
8270
8270
  position: "top",
8271
8271
  width: 600,
8272
8272
  view: "modal"
8273
8273
  }, Ba = {}, Ea = (e, t) => {
8274
8274
  Ie(Ba, e) && console.warn(`Site setting ${e} already registered. Overriding...`), gt(Ba, e, { id: e, ...t });
8275
- }, wh = () => go(Ba), Nh = () => {
8275
+ }, Nh = () => go(Ba), Eh = () => {
8276
8276
  var i;
8277
- const e = wh(), [t, s] = S(((i = e[0]) == null ? void 0 : i.id) || ""), a = e.find((l) => l.id === t), r = a == null ? void 0 : a.panel;
8277
+ const e = Nh(), [t, s] = S(((i = e[0]) == null ? void 0 : i.id) || ""), a = e.find((l) => l.id === t), r = a == null ? void 0 : a.panel;
8278
8278
  return /* @__PURE__ */ c("div", { className: "flex h-full gap-4", children: [
8279
8279
  /* @__PURE__ */ n("div", { className: "no-scrollbar max-w-[25%] overflow-y-auto border-r pr-2", children: /* @__PURE__ */ n("div", { className: "space-y-1", children: e.map((l) => {
8280
8280
  const o = l.id === t, d = l.button;
@@ -8288,19 +8288,19 @@ const hl = "seo", bh = ({ isActive: e, show: t }) => {
8288
8288
  }) }) }),
8289
8289
  /* @__PURE__ */ n("div", { className: "no-scrollbar flex-1 overflow-y-auto", children: /* @__PURE__ */ n(Ya, { fallback: /* @__PURE__ */ n("div", { className: "flex items-center justify-center h-full", children: "Loading..." }), children: r ? /* @__PURE__ */ n(r, {}) : /* @__PURE__ */ n("div", { className: "flex items-center justify-center h-full text-muted-foreground", children: /* @__PURE__ */ n("p", { children: "Select a setting from the sidebar or register settings using registerChaiSiteSetting" }) }) }) })
8290
8290
  ] });
8291
- }, Eh = "site-settings", Sh = ({ isActive: e, show: t }) => Et("enable-site-settings") ? /* @__PURE__ */ n(T, { size: "sm", className: "my-1", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ n(_i, { className: "h-4 w-4" }) }) : null, Ah = {
8292
- id: Eh,
8291
+ }, Sh = "site-settings", Ah = ({ isActive: e, show: t }) => Et("enable-site-settings") ? /* @__PURE__ */ n(T, { size: "sm", className: "my-1", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ n(_i, { className: "h-4 w-4" }) }) : null, Th = {
8292
+ id: Sh,
8293
8293
  label: "Site Settings",
8294
- panel: Nh,
8295
- button: Sh,
8294
+ panel: Eh,
8295
+ button: Ah,
8296
8296
  position: "bottom",
8297
8297
  width: 800,
8298
8298
  view: "modal"
8299
- }, Th = "user-info", Ch = () => {
8299
+ }, Ch = "user-info", kh = () => {
8300
8300
  const { user: e, logout: t } = ot(), s = ht("onLogout", po);
8301
- return e ? /* @__PURE__ */ c(Vo, { children: [
8302
- /* @__PURE__ */ n(Ko, { asChild: !0, children: /* @__PURE__ */ n(T, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ n(Sc, { className: "h-4 w-4" }) }) }),
8303
- /* @__PURE__ */ c(Ho, { className: "w-auto space-y-2 p-4", children: [
8301
+ return e ? /* @__PURE__ */ c(Ko, { children: [
8302
+ /* @__PURE__ */ n(Ho, { asChild: !0, children: /* @__PURE__ */ n(T, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ n(Ac, { className: "h-4 w-4" }) }) }),
8303
+ /* @__PURE__ */ c(Wo, { className: "w-auto space-y-2 p-4", children: [
8304
8304
  /* @__PURE__ */ n("div", { className: "text-sm font-medium", children: e.name ?? e.email }),
8305
8305
  /* @__PURE__ */ n("div", { className: "text-xs text-muted-foreground", children: e.email }),
8306
8306
  /* @__PURE__ */ c(Zr, { children: [
@@ -8326,13 +8326,13 @@ const hl = "seo", bh = ({ isActive: e, show: t }) => {
8326
8326
  ] })
8327
8327
  ] })
8328
8328
  ] }) : null;
8329
- }, kh = {
8330
- id: Th,
8329
+ }, Ph = {
8330
+ id: Ch,
8331
8331
  label: "User Info",
8332
- button: Ch,
8332
+ button: kh,
8333
8333
  position: "bottom"
8334
- }, Ph = () => {
8335
- Ts(hl, xh), Ts(dl, uh), Ts("site-settings", Ah), Ts("user-info", kh);
8334
+ }, Ih = () => {
8335
+ Ts(hl, wh), Ts(dl, hh), Ts("site-settings", Th), Ts("user-info", Ph);
8336
8336
  };
8337
8337
  var se = {
8338
8338
  context: void 0,
@@ -8353,14 +8353,14 @@ function Dr(e) {
8353
8353
  function Bn(e) {
8354
8354
  se.context = e;
8355
8355
  }
8356
- var ml = !1, Ih = (e, t) => e === t, Fs = Symbol("solid-proxy"), fl = typeof Proxy == "function", gl = Symbol("solid-track"), $s = {
8357
- equals: Ih
8356
+ var ml = !1, _h = (e, t) => e === t, Fs = Symbol("solid-proxy"), fl = typeof Proxy == "function", gl = Symbol("solid-track"), $s = {
8357
+ equals: _h
8358
8358
  }, pl = El, Ct = 1, qs = 2, yl = {
8359
8359
  owned: null,
8360
8360
  cleanups: null,
8361
8361
  context: null,
8362
8362
  owner: null
8363
- }, Sa = {}, ge = null, Aa = null, _h = null, Ee = null, Qe = null, bt = null, da = 0;
8363
+ }, Sa = {}, ge = null, Aa = null, Lh = null, Ee = null, Qe = null, bt = null, da = 0;
8364
8364
  function Kt(e, t) {
8365
8365
  const s = Ee, a = ge, r = e.length === 0, i = t === void 0 ? a : t, l = r ? yl : {
8366
8366
  owned: null,
@@ -8385,7 +8385,7 @@ function _e(e, t) {
8385
8385
  }, a = (r) => (typeof r == "function" && (r = r(s.value)), Nl(s, r));
8386
8386
  return [wl.bind(s), a];
8387
8387
  }
8388
- function Lh(e, t, s) {
8388
+ function Dh(e, t, s) {
8389
8389
  const a = ua(e, t, !0, Ct);
8390
8390
  Gn(a);
8391
8391
  }
@@ -8394,7 +8394,7 @@ function Ht(e, t, s) {
8394
8394
  Gn(a);
8395
8395
  }
8396
8396
  function vl(e, t, s) {
8397
- pl = $h;
8397
+ pl = qh;
8398
8398
  const a = ua(e, t, !1, Ct);
8399
8399
  (!s || !s.render) && (a.user = !0), bt ? bt.push(a) : Gn(a);
8400
8400
  }
@@ -8403,10 +8403,10 @@ function Me(e, t, s) {
8403
8403
  const a = ua(e, t, !0, 0);
8404
8404
  return a.observers = null, a.observerSlots = null, a.comparator = s.equals || void 0, Gn(a), wl.bind(a);
8405
8405
  }
8406
- function Dh(e) {
8406
+ function Oh(e) {
8407
8407
  return e && typeof e == "object" && "then" in e;
8408
8408
  }
8409
- function Oh(e, t, s) {
8409
+ function Rh(e, t, s) {
8410
8410
  let a, r, i;
8411
8411
  a = !0, r = e, i = {};
8412
8412
  let l = null, o = Sa, d = null, h = !1, u = "initialValue" in i, m = typeof a == "function" && Me(a);
@@ -8427,7 +8427,7 @@ function Oh(e, t, s) {
8427
8427
  }, !1);
8428
8428
  }
8429
8429
  function G() {
8430
- const D = Bh, F = p(), M = f();
8430
+ const D = Mh, F = p(), M = f();
8431
8431
  if (M !== void 0 && !l) throw M;
8432
8432
  return Ee && Ee.user, F;
8433
8433
  }
@@ -8453,7 +8453,7 @@ function Oh(e, t, s) {
8453
8453
  if (M !== void 0) {
8454
8454
  C(l, void 0, Rs(M), F);
8455
8455
  return;
8456
- } else if (!Dh(q))
8456
+ } else if (!Oh(q))
8457
8457
  return C(l, q, void 0, F), q;
8458
8458
  return l = q, "v" in q ? (q.s === 1 ? C(l, q.v, void 0, F) : C(l, void 0, Rs(q.v), F), q) : (h = !0, queueMicrotask(() => h = !1), yt(() => {
8459
8459
  L(u ? "refreshing" : "pending"), N();
@@ -8482,12 +8482,12 @@ function Oh(e, t, s) {
8482
8482
  }
8483
8483
  });
8484
8484
  let ee = ge;
8485
- return m ? Lh(() => (ee = ge, J(!1))) : J(!1), [G, {
8485
+ return m ? Dh(() => (ee = ge, J(!1))) : J(!1), [G, {
8486
8486
  refetch: (D) => bl(ee, () => J(D)),
8487
8487
  mutate: g
8488
8488
  }];
8489
8489
  }
8490
- function Yf(e) {
8490
+ function Xf(e) {
8491
8491
  return yt(e, !1);
8492
8492
  }
8493
8493
  function qe(e) {
@@ -8500,7 +8500,7 @@ function qe(e) {
8500
8500
  Ee = t;
8501
8501
  }
8502
8502
  }
8503
- function Xf(e, t, s) {
8503
+ function Zf(e, t, s) {
8504
8504
  const a = Array.isArray(e);
8505
8505
  let r, i = s && s.defer;
8506
8506
  return (l) => {
@@ -8515,7 +8515,7 @@ function Xf(e, t, s) {
8515
8515
  return r = o, d;
8516
8516
  };
8517
8517
  }
8518
- function Rh(e) {
8518
+ function Gh(e) {
8519
8519
  vl(() => qe(e));
8520
8520
  }
8521
8521
  function Jn(e) {
@@ -8535,7 +8535,7 @@ function bl(e, t) {
8535
8535
  ge = s, Ee = a;
8536
8536
  }
8537
8537
  }
8538
- function Gh(e) {
8538
+ function Uh(e) {
8539
8539
  const t = Ee, s = ge;
8540
8540
  return Promise.resolve().then(() => {
8541
8541
  Ee = t, ge = s;
@@ -8543,19 +8543,19 @@ function Gh(e) {
8543
8543
  return yt(e, !1), Ee = ge = null, a ? a.done : void 0;
8544
8544
  });
8545
8545
  }
8546
- var [Uh, Zf] = /* @__PURE__ */ _e(!1);
8547
- function eg() {
8548
- return [Uh, Gh];
8546
+ var [Bh, eg] = /* @__PURE__ */ _e(!1);
8547
+ function tg() {
8548
+ return [Bh, Uh];
8549
8549
  }
8550
- function tg(e, t) {
8550
+ function ng(e, t) {
8551
8551
  const s = Symbol("context");
8552
8552
  return {
8553
8553
  id: s,
8554
- Provider: qh(s),
8554
+ Provider: jh(s),
8555
8555
  defaultValue: e
8556
8556
  };
8557
8557
  }
8558
- function ng(e) {
8558
+ function sg(e) {
8559
8559
  let t;
8560
8560
  return ge && ge.context && (t = ge.context[e.id]) !== void 0 ? t : e.defaultValue;
8561
8561
  }
@@ -8566,7 +8566,7 @@ function xl(e) {
8566
8566
  return Array.isArray(a) ? a : a != null ? [a] : [];
8567
8567
  }, s;
8568
8568
  }
8569
- var Bh;
8569
+ var Mh;
8570
8570
  function wl() {
8571
8571
  if (this.sources && this.state)
8572
8572
  if (this.state === Ct) Gn(this);
@@ -8595,9 +8595,9 @@ function Gn(e) {
8595
8595
  if (!e.fn) return;
8596
8596
  Yn(e);
8597
8597
  const t = da;
8598
- Mh(e, e.value, t);
8598
+ Fh(e, e.value, t);
8599
8599
  }
8600
- function Mh(e, t, s) {
8600
+ function Fh(e, t, s) {
8601
8601
  let a;
8602
8602
  const r = ge, i = Ee;
8603
8603
  Ee = ge = e;
@@ -8647,12 +8647,12 @@ function yt(e, t) {
8647
8647
  t || (Qe = []), bt ? s = !0 : bt = [], da++;
8648
8648
  try {
8649
8649
  const a = e();
8650
- return Fh(s), a;
8650
+ return $h(s), a;
8651
8651
  } catch (a) {
8652
8652
  s || (bt = null), Qe = null, fr(a);
8653
8653
  }
8654
8654
  }
8655
- function Fh(e) {
8655
+ function $h(e) {
8656
8656
  if (Qe && (El(Qe), Qe = null), e) return;
8657
8657
  const t = bt;
8658
8658
  bt = null, t.length && yt(() => pl(t), !1);
@@ -8660,7 +8660,7 @@ function Fh(e) {
8660
8660
  function El(e) {
8661
8661
  for (let t = 0; t < e.length; t++) js(e[t]);
8662
8662
  }
8663
- function $h(e) {
8663
+ function qh(e) {
8664
8664
  let t, s = 0;
8665
8665
  for (t = 0; t < e.length; t++) {
8666
8666
  const a = e[t];
@@ -8735,7 +8735,7 @@ function Ma(e) {
8735
8735
  }
8736
8736
  return e;
8737
8737
  }
8738
- function qh(e, t) {
8738
+ function jh(e, t) {
8739
8739
  return function(a) {
8740
8740
  let r;
8741
8741
  return Ht(() => r = qe(() => (ge.context = {
@@ -8748,7 +8748,7 @@ var Fa = Symbol("fallback");
8748
8748
  function Vs(e) {
8749
8749
  for (let t = 0; t < e.length; t++) e[t]();
8750
8750
  }
8751
- function jh(e, t, s = {}) {
8751
+ function zh(e, t, s = {}) {
8752
8752
  let a = [], r = [], i = [], l = 0, o = t.length > 1 ? [] : null;
8753
8753
  return Jn(() => Vs(i)), () => {
8754
8754
  let d = e() || [], h = d.length, u, m;
@@ -8783,7 +8783,7 @@ function jh(e, t, s = {}) {
8783
8783
  }
8784
8784
  };
8785
8785
  }
8786
- function zh(e, t, s = {}) {
8786
+ function Vh(e, t, s = {}) {
8787
8787
  let a = [], r = [], i = [], l = [], o = 0, d;
8788
8788
  return Jn(() => Vs(i)), () => {
8789
8789
  const h = e() || [], u = h.length;
@@ -8836,7 +8836,7 @@ var $a = {
8836
8836
  function Ta(e) {
8837
8837
  return (e = typeof e == "function" ? e() : e) ? e : {};
8838
8838
  }
8839
- function Vh() {
8839
+ function Kh() {
8840
8840
  for (let e = 0, t = this.length; e < t; ++e) {
8841
8841
  const s = this[e]();
8842
8842
  if (s !== void 0) return s;
@@ -8880,7 +8880,7 @@ function Tl(...e) {
8880
8880
  a[u] = m.get ? {
8881
8881
  enumerable: !0,
8882
8882
  configurable: !0,
8883
- get: Vh.bind(s[u] = [m.get.bind(o)])
8883
+ get: Kh.bind(s[u] = [m.get.bind(o)])
8884
8884
  } : m.value !== void 0 ? m : void 0;
8885
8885
  else {
8886
8886
  const y = s[u];
@@ -8895,7 +8895,7 @@ function Tl(...e) {
8895
8895
  }
8896
8896
  return r;
8897
8897
  }
8898
- function Kh(e, ...t) {
8898
+ function Hh(e, ...t) {
8899
8899
  if (fl && Fs in e) {
8900
8900
  const r = new Set(t.length > 1 ? t.flat() : t[0]), i = t.map((l) => new Proxy({
8901
8901
  get(o) {
@@ -8940,7 +8940,7 @@ function Cl(e) {
8940
8940
  !se.done && Bn(i), se.count--, d(() => h.default), Bn();
8941
8941
  }), t = o;
8942
8942
  } else if (!t) {
8943
- const [o] = Oh(() => (s || (s = e())).then((d) => d.default));
8943
+ const [o] = Rh(() => (s || (s = e())).then((d) => d.default));
8944
8944
  t = o;
8945
8945
  }
8946
8946
  let l;
@@ -8954,24 +8954,24 @@ function Cl(e) {
8954
8954
  };
8955
8955
  return a.preload = () => s || ((s = e()).then((r) => t = () => r.default), s), a;
8956
8956
  }
8957
- var Hh = 0;
8958
- function sg() {
8959
- return se.context ? se.getNextContextId() : `cl-${Hh++}`;
8957
+ var Wh = 0;
8958
+ function ag() {
8959
+ return se.context ? se.getNextContextId() : `cl-${Wh++}`;
8960
8960
  }
8961
8961
  var kl = (e) => `Stale read from <${e}>.`;
8962
- function ag(e) {
8962
+ function rg(e) {
8963
8963
  const t = "fallback" in e && {
8964
8964
  fallback: () => e.fallback
8965
8965
  };
8966
- return Me(jh(() => e.each, e.children, t || void 0));
8966
+ return Me(zh(() => e.each, e.children, t || void 0));
8967
8967
  }
8968
- function rg(e) {
8968
+ function ig(e) {
8969
8969
  const t = "fallback" in e && {
8970
8970
  fallback: () => e.fallback
8971
8971
  };
8972
- return Me(zh(() => e.each, e.children, t || void 0));
8972
+ return Me(Vh(() => e.each, e.children, t || void 0));
8973
8973
  }
8974
- function ig(e) {
8974
+ function lg(e) {
8975
8975
  const t = e.keyed, s = Me(() => e.when, void 0, void 0), a = t ? s : Me(s, void 0, {
8976
8976
  equals: (r, i) => !r == !i
8977
8977
  });
@@ -8987,7 +8987,7 @@ function ig(e) {
8987
8987
  return e.fallback;
8988
8988
  }, void 0, void 0);
8989
8989
  }
8990
- function lg(e) {
8990
+ function og(e) {
8991
8991
  const t = xl(() => e.children), s = Me(() => {
8992
8992
  const a = t(), r = Array.isArray(a) ? a : [a];
8993
8993
  let i = () => {
@@ -9011,13 +9011,13 @@ function lg(e) {
9011
9011
  })) : o;
9012
9012
  }, void 0, void 0);
9013
9013
  }
9014
- function og(e) {
9014
+ function cg(e) {
9015
9015
  return e;
9016
9016
  }
9017
- var Wh = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], Qh = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...Wh]), Jh = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), Yh = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
9017
+ var Qh = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], Jh = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...Qh]), Yh = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), Xh = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
9018
9018
  className: "class",
9019
9019
  htmlFor: "for"
9020
- }), Xh = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
9020
+ }), Zh = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
9021
9021
  class: "className",
9022
9022
  novalidate: {
9023
9023
  $: "noValidate",
@@ -9046,11 +9046,11 @@ var Wh = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
9046
9046
  TEXTAREA: 1
9047
9047
  }
9048
9048
  });
9049
- function Zh(e, t) {
9050
- const s = Xh[e];
9049
+ function em(e, t) {
9050
+ const s = Zh[e];
9051
9051
  return typeof s == "object" ? s[t] ? s.$ : void 0 : s;
9052
9052
  }
9053
- var em = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), tm = /* @__PURE__ */ new Set([
9053
+ var tm = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), nm = /* @__PURE__ */ new Set([
9054
9054
  "altGlyph",
9055
9055
  "altGlyphDef",
9056
9056
  "altGlyphItem",
@@ -9128,11 +9128,11 @@ var em = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
9128
9128
  "use",
9129
9129
  "view",
9130
9130
  "vkern"
9131
- ]), nm = {
9131
+ ]), sm = {
9132
9132
  xlink: "http://www.w3.org/1999/xlink",
9133
9133
  xml: "http://www.w3.org/XML/1998/namespace"
9134
- }, cg = (e) => Me(() => e());
9135
- function sm(e, t, s) {
9134
+ }, dg = (e) => Me(() => e());
9135
+ function am(e, t, s) {
9136
9136
  let a = s.length, r = t.length, i = a, l = 0, o = 0, d = t[r - 1].nextSibling, h = null;
9137
9137
  for (; l < r || o < i; ) {
9138
9138
  if (t[l] === s[o]) {
@@ -9180,7 +9180,7 @@ function Pl(e, t, s, a = {}) {
9180
9180
  r(), t.textContent = "";
9181
9181
  };
9182
9182
  }
9183
- function dg(e, t, s, a) {
9183
+ function ug(e, t, s, a) {
9184
9184
  let r;
9185
9185
  const i = () => {
9186
9186
  const o = document.createElement("template");
@@ -9188,14 +9188,14 @@ function dg(e, t, s, a) {
9188
9188
  }, l = () => (r || (r = i())).cloneNode(!0);
9189
9189
  return l.cloneNode = l, l;
9190
9190
  }
9191
- function am(e, t = window.document) {
9191
+ function rm(e, t = window.document) {
9192
9192
  const s = t[jn] || (t[jn] = /* @__PURE__ */ new Set());
9193
9193
  for (let a = 0, r = e.length; a < r; a++) {
9194
9194
  const i = e[a];
9195
9195
  s.has(i) || (s.add(i), t.addEventListener(i, Il));
9196
9196
  }
9197
9197
  }
9198
- function ug(e = window.document) {
9198
+ function hg(e = window.document) {
9199
9199
  if (e[jn]) {
9200
9200
  for (let t of e[jn].keys()) e.removeEventListener(t, Il);
9201
9201
  delete e[jn];
@@ -9204,16 +9204,16 @@ function ug(e = window.document) {
9204
9204
  function qa(e, t, s) {
9205
9205
  Jt(e) || (s == null ? e.removeAttribute(t) : e.setAttribute(t, s));
9206
9206
  }
9207
- function rm(e, t, s, a) {
9207
+ function im(e, t, s, a) {
9208
9208
  Jt(e) || (a == null ? e.removeAttributeNS(t, s) : e.setAttributeNS(t, s, a));
9209
9209
  }
9210
- function im(e, t, s) {
9210
+ function lm(e, t, s) {
9211
9211
  Jt(e) || (s ? e.setAttribute(t, "") : e.removeAttribute(t));
9212
9212
  }
9213
- function lm(e, t) {
9213
+ function om(e, t) {
9214
9214
  Jt(e) || (t == null ? e.removeAttribute("class") : e.className = t);
9215
9215
  }
9216
- function om(e, t, s, a) {
9216
+ function cm(e, t, s, a) {
9217
9217
  if (a)
9218
9218
  Array.isArray(s) ? (e[`$$${t}`] = s[0], e[`$$${t}Data`] = s[1]) : e[`$$${t}`] = s;
9219
9219
  else if (Array.isArray(s)) {
@@ -9221,7 +9221,7 @@ function om(e, t, s, a) {
9221
9221
  e.addEventListener(t, s[0] = (i) => r.call(e, s[1], i));
9222
9222
  } else e.addEventListener(t, s, typeof s != "function" && s);
9223
9223
  }
9224
- function cm(e, t, s = {}) {
9224
+ function dm(e, t, s = {}) {
9225
9225
  const a = Object.keys(t || {}), r = Object.keys(s);
9226
9226
  let i, l;
9227
9227
  for (i = 0, l = r.length; i < l; i++) {
@@ -9234,7 +9234,7 @@ function cm(e, t, s = {}) {
9234
9234
  }
9235
9235
  return s;
9236
9236
  }
9237
- function dm(e, t, s) {
9237
+ function um(e, t, s) {
9238
9238
  if (!t) return s ? qa(e, "style") : t;
9239
9239
  const a = e.style;
9240
9240
  if (typeof t == "string") return a.cssText = t;
@@ -9246,18 +9246,18 @@ function dm(e, t, s) {
9246
9246
  r = t[i], r !== s[i] && (a.setProperty(i, r), s[i] = r);
9247
9247
  return s;
9248
9248
  }
9249
- function um(e, t = {}, s, a) {
9249
+ function hm(e, t = {}, s, a) {
9250
9250
  const r = {};
9251
- return a || Ht(() => r.children = Xn(e, t.children, r.children)), Ht(() => typeof t.ref == "function" && hm(t.ref, e)), Ht(() => mm(e, t, s, !0, r, !0)), r;
9251
+ return a || Ht(() => r.children = Xn(e, t.children, r.children)), Ht(() => typeof t.ref == "function" && mm(t.ref, e)), Ht(() => fm(e, t, s, !0, r, !0)), r;
9252
9252
  }
9253
- function hm(e, t, s) {
9253
+ function mm(e, t, s) {
9254
9254
  return qe(() => e(t, s));
9255
9255
  }
9256
9256
  function ja(e, t, s, a) {
9257
9257
  if (s !== void 0 && !a && (a = []), typeof t != "function") return Xn(e, t, a, s);
9258
9258
  Ht((r) => Xn(e, t(), r, s), a);
9259
9259
  }
9260
- function mm(e, t, s, a, r = {}, i = !1) {
9260
+ function fm(e, t, s, a, r = {}, i = !1) {
9261
9261
  t || (t = {});
9262
9262
  for (const l in r)
9263
9263
  if (!(l in t)) {
@@ -9271,14 +9271,14 @@ function mm(e, t, s, a, r = {}, i = !1) {
9271
9271
  r[l] = Gr(e, l, o, r[l], s, i, t);
9272
9272
  }
9273
9273
  }
9274
- function fm(e) {
9274
+ function gm(e) {
9275
9275
  let t, s;
9276
- return !Jt() || !(t = se.registry.get(s = pm())) ? e() : (se.completed && se.completed.add(t), se.registry.delete(s), t);
9276
+ return !Jt() || !(t = se.registry.get(s = ym())) ? e() : (se.completed && se.completed.add(t), se.registry.delete(s), t);
9277
9277
  }
9278
9278
  function Jt(e) {
9279
9279
  return !!se.context && !se.done && (!e || e.isConnected);
9280
9280
  }
9281
- function gm(e) {
9281
+ function pm(e) {
9282
9282
  return e.toLowerCase().replace(/-([a-z])/g, (t, s) => s.toUpperCase());
9283
9283
  }
9284
9284
  function Rr(e, t, s) {
@@ -9287,8 +9287,8 @@ function Rr(e, t, s) {
9287
9287
  }
9288
9288
  function Gr(e, t, s, a, r, i, l) {
9289
9289
  let o, d, h, u, m;
9290
- if (t === "style") return dm(e, s, a);
9291
- if (t === "classList") return cm(e, s, a);
9290
+ if (t === "style") return um(e, s, a);
9291
+ if (t === "classList") return dm(e, s, a);
9292
9292
  if (s === a) return a;
9293
9293
  if (t === "ref")
9294
9294
  i || s(e);
@@ -9299,24 +9299,24 @@ function Gr(e, t, s, a, r, i, l) {
9299
9299
  const y = t.slice(10);
9300
9300
  a && e.removeEventListener(y, a, !0), s && e.addEventListener(y, s, !0);
9301
9301
  } else if (t.slice(0, 2) === "on") {
9302
- const y = t.slice(2).toLowerCase(), p = em.has(y);
9302
+ const y = t.slice(2).toLowerCase(), p = tm.has(y);
9303
9303
  if (!p && a) {
9304
9304
  const g = Array.isArray(a) ? a[0] : a;
9305
9305
  e.removeEventListener(y, g);
9306
9306
  }
9307
- (p || s) && (om(e, y, s, p), p && am([y]));
9307
+ (p || s) && (cm(e, y, s, p), p && rm([y]));
9308
9308
  } else if (t.slice(0, 5) === "attr:")
9309
9309
  qa(e, t.slice(5), s);
9310
9310
  else if (t.slice(0, 5) === "bool:")
9311
- im(e, t.slice(5), s);
9312
- else if ((m = t.slice(0, 5) === "prop:") || (h = Jh.has(t)) || !r && ((u = Zh(t, e.tagName)) || (d = Qh.has(t))) || (o = e.nodeName.includes("-") || "is" in l)) {
9311
+ lm(e, t.slice(5), s);
9312
+ else if ((m = t.slice(0, 5) === "prop:") || (h = Yh.has(t)) || !r && ((u = em(t, e.tagName)) || (d = Jh.has(t))) || (o = e.nodeName.includes("-") || "is" in l)) {
9313
9313
  if (m)
9314
9314
  t = t.slice(5), d = !0;
9315
9315
  else if (Jt(e)) return s;
9316
- t === "class" || t === "className" ? lm(e, s) : o && !d && !h ? e[gm(t)] = s : e[u || t] = s;
9316
+ t === "class" || t === "className" ? om(e, s) : o && !d && !h ? e[pm(t)] = s : e[u || t] = s;
9317
9317
  } else {
9318
- const y = r && t.indexOf(":") > -1 && nm[t.split(":")[0]];
9319
- y ? rm(e, y, t, s) : qa(e, Yh[t] || t, s);
9318
+ const y = r && t.indexOf(":") > -1 && sm[t.split(":")[0]];
9319
+ y ? im(e, y, t, s) : qa(e, Xh[t] || t, s);
9320
9320
  }
9321
9321
  return s;
9322
9322
  }
@@ -9403,7 +9403,7 @@ function Xn(e, t, s, a, r) {
9403
9403
  }
9404
9404
  if (d.length === 0) {
9405
9405
  if (s = en(e, s, a), o) return s;
9406
- } else h ? s.length === 0 ? Ur(e, d, a) : sm(e, s, d) : (s && en(e), Ur(e, d));
9406
+ } else h ? s.length === 0 ? Ur(e, d, a) : am(e, s, d) : (s && en(e), Ur(e, d));
9407
9407
  s = d;
9408
9408
  } else if (t.nodeType) {
9409
9409
  if (i && t.parentNode) return s = o ? [t] : t;
@@ -9455,14 +9455,14 @@ function en(e, t, s, a) {
9455
9455
  } else e.insertBefore(r, s);
9456
9456
  return [r];
9457
9457
  }
9458
- function pm() {
9458
+ function ym() {
9459
9459
  return se.getNextContextId();
9460
9460
  }
9461
- var ym = "http://www.w3.org/2000/svg";
9461
+ var vm = "http://www.w3.org/2000/svg";
9462
9462
  function _l(e, t = !1) {
9463
- return t ? document.createElementNS(ym, e) : document.createElement(e);
9463
+ return t ? document.createElementNS(vm, e) : document.createElement(e);
9464
9464
  }
9465
- function hg(e) {
9465
+ function mg(e) {
9466
9466
  const {
9467
9467
  useShadow: t
9468
9468
  } = e, s = document.createTextNode(""), a = () => e.mount || document.body, r = Or();
@@ -9488,7 +9488,7 @@ function hg(e) {
9488
9488
  render: !l
9489
9489
  }), s;
9490
9490
  }
9491
- function vm(e, t) {
9491
+ function bm(e, t) {
9492
9492
  const s = Me(e);
9493
9493
  return Me(() => {
9494
9494
  const a = s();
@@ -9496,16 +9496,16 @@ function vm(e, t) {
9496
9496
  case "function":
9497
9497
  return qe(() => a(t));
9498
9498
  case "string":
9499
- const r = tm.has(a), i = se.context ? fm() : _l(a, r);
9500
- return um(i, t, r), i;
9499
+ const r = nm.has(a), i = se.context ? gm() : _l(a, r);
9500
+ return hm(i, t, r), i;
9501
9501
  }
9502
9502
  });
9503
9503
  }
9504
- function mg(e) {
9505
- const [, t] = Kh(e, ["component"]);
9506
- return vm(() => e.component, t);
9504
+ function fg(e) {
9505
+ const [, t] = Hh(e, ["component"]);
9506
+ return bm(() => e.component, t);
9507
9507
  }
9508
- var bm = class {
9508
+ var xm = class {
9509
9509
  constructor() {
9510
9510
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
9511
9511
  }
@@ -9523,7 +9523,7 @@ var bm = class {
9523
9523
  }
9524
9524
  }, Ll = class {
9525
9525
  constructor(e) {
9526
- this.generateIdentifier = e, this.kv = new bm();
9526
+ this.generateIdentifier = e, this.kv = new xm();
9527
9527
  }
9528
9528
  register(e, t) {
9529
9529
  this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
@@ -9537,7 +9537,7 @@ var bm = class {
9537
9537
  getValue(e) {
9538
9538
  return this.kv.getByKey(e);
9539
9539
  }
9540
- }, xm = class extends Ll {
9540
+ }, wm = class extends Ll {
9541
9541
  constructor() {
9542
9542
  super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
9543
9543
  }
@@ -9548,7 +9548,7 @@ var bm = class {
9548
9548
  return this.classToAllowedProps.get(e);
9549
9549
  }
9550
9550
  };
9551
- function wm(e) {
9551
+ function Nm(e) {
9552
9552
  if ("values" in Object)
9553
9553
  return Object.values(e);
9554
9554
  const t = [];
@@ -9556,8 +9556,8 @@ function wm(e) {
9556
9556
  e.hasOwnProperty(s) && t.push(e[s]);
9557
9557
  return t;
9558
9558
  }
9559
- function Nm(e, t) {
9560
- const s = wm(e);
9559
+ function Em(e, t) {
9560
+ const s = Nm(e);
9561
9561
  if ("find" in s)
9562
9562
  return s.find(t);
9563
9563
  const a = s;
@@ -9580,7 +9580,7 @@ function Br(e, t) {
9580
9580
  return a;
9581
9581
  }
9582
9582
  }
9583
- var Em = class {
9583
+ var Sm = class {
9584
9584
  constructor() {
9585
9585
  this.transfomers = {};
9586
9586
  }
@@ -9588,12 +9588,12 @@ var Em = class {
9588
9588
  this.transfomers[e.name] = e;
9589
9589
  }
9590
9590
  findApplicable(e) {
9591
- return Nm(this.transfomers, (t) => t.isApplicable(e));
9591
+ return Em(this.transfomers, (t) => t.isApplicable(e));
9592
9592
  }
9593
9593
  findByName(e) {
9594
9594
  return this.transfomers[e];
9595
9595
  }
9596
- }, Sm = (e) => Object.prototype.toString.call(e).slice(8, -1), Dl = (e) => typeof e > "u", Am = (e) => e === null, Zn = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Va = (e) => Zn(e) && Object.keys(e).length === 0, Ot = (e) => Array.isArray(e), Tm = (e) => typeof e == "string", Cm = (e) => typeof e == "number" && !isNaN(e), km = (e) => typeof e == "boolean", Pm = (e) => e instanceof RegExp, es = (e) => e instanceof Map, ts = (e) => e instanceof Set, Ol = (e) => Sm(e) === "Symbol", Im = (e) => e instanceof Date && !isNaN(e.valueOf()), _m = (e) => e instanceof Error, Mr = (e) => typeof e == "number" && isNaN(e), Lm = (e) => km(e) || Am(e) || Dl(e) || Cm(e) || Tm(e) || Ol(e), Dm = (e) => typeof e == "bigint", Om = (e) => e === 1 / 0 || e === -1 / 0, Rm = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Gm = (e) => e instanceof URL, Rl = (e) => e.replace(/\./g, "\\."), Ca = (e) => e.map(String).map(Rl).join("."), zn = (e) => {
9596
+ }, Am = (e) => Object.prototype.toString.call(e).slice(8, -1), Dl = (e) => typeof e > "u", Tm = (e) => e === null, Zn = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Va = (e) => Zn(e) && Object.keys(e).length === 0, Ot = (e) => Array.isArray(e), Cm = (e) => typeof e == "string", km = (e) => typeof e == "number" && !isNaN(e), Pm = (e) => typeof e == "boolean", Im = (e) => e instanceof RegExp, es = (e) => e instanceof Map, ts = (e) => e instanceof Set, Ol = (e) => Am(e) === "Symbol", _m = (e) => e instanceof Date && !isNaN(e.valueOf()), Lm = (e) => e instanceof Error, Mr = (e) => typeof e == "number" && isNaN(e), Dm = (e) => Pm(e) || Tm(e) || Dl(e) || km(e) || Cm(e) || Ol(e), Om = (e) => typeof e == "bigint", Rm = (e) => e === 1 / 0 || e === -1 / 0, Gm = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Um = (e) => e instanceof URL, Rl = (e) => e.replace(/\./g, "\\."), Ca = (e) => e.map(String).map(Rl).join("."), zn = (e) => {
9597
9597
  const t = [];
9598
9598
  let s = "";
9599
9599
  for (let r = 0; r < e.length; r++) {
@@ -9622,9 +9622,9 @@ function mt(e, t, s, a) {
9622
9622
  var Gl = [
9623
9623
  mt(Dl, "undefined", () => null, () => {
9624
9624
  }),
9625
- mt(Dm, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
9626
- mt(Im, "Date", (e) => e.toISOString(), (e) => new Date(e)),
9627
- mt(_m, "Error", (e, t) => {
9625
+ mt(Om, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
9626
+ mt(_m, "Date", (e) => e.toISOString(), (e) => new Date(e)),
9627
+ mt(Lm, "Error", (e, t) => {
9628
9628
  const s = {
9629
9629
  name: e.name,
9630
9630
  message: e.message
@@ -9638,7 +9638,7 @@ var Gl = [
9638
9638
  s[a] = e[a];
9639
9639
  }), s;
9640
9640
  }),
9641
- mt(Pm, "regexp", (e) => "" + e, (e) => {
9641
+ mt(Im, "regexp", (e) => "" + e, (e) => {
9642
9642
  const t = e.slice(1, e.lastIndexOf("/")), s = e.slice(e.lastIndexOf("/") + 1);
9643
9643
  return new RegExp(t, s);
9644
9644
  }),
@@ -9651,9 +9651,9 @@ var Gl = [
9651
9651
  (e) => new Set(e)
9652
9652
  ),
9653
9653
  mt(es, "map", (e) => [...e.entries()], (e) => new Map(e)),
9654
- mt((e) => Mr(e) || Om(e), "number", (e) => Mr(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
9654
+ mt((e) => Mr(e) || Rm(e), "number", (e) => Mr(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
9655
9655
  mt((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
9656
- mt(Gm, "URL", (e) => e.toString(), (e) => new URL(e))
9656
+ mt(Um, "URL", (e) => e.toString(), (e) => new URL(e))
9657
9657
  ];
9658
9658
  function ha(e, t, s, a) {
9659
9659
  return {
@@ -9668,7 +9668,7 @@ var Ul = ha((e, t) => Ol(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
9668
9668
  if (!a)
9669
9669
  throw new Error("Trying to deserialize unknown symbol");
9670
9670
  return a;
9671
- }), Um = [
9671
+ }), Bm = [
9672
9672
  Int8Array,
9673
9673
  Uint8Array,
9674
9674
  Int16Array,
@@ -9678,8 +9678,8 @@ var Ul = ha((e, t) => Ol(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
9678
9678
  Float32Array,
9679
9679
  Float64Array,
9680
9680
  Uint8ClampedArray
9681
- ].reduce((e, t) => (e[t.name] = t, e), {}), Bl = ha(Rm, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
9682
- const s = Um[t[1]];
9681
+ ].reduce((e, t) => (e[t.name] = t, e), {}), Bl = ha(Gm, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
9682
+ const s = Bm[t[1]];
9683
9683
  if (!s)
9684
9684
  throw new Error("Trying to deserialize unknown typed array");
9685
9685
  return new s(e);
@@ -9705,8 +9705,8 @@ var Fl = ha(Ml, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
9705
9705
  if (!a)
9706
9706
  throw new Error("Trying to deserialize unknown custom value");
9707
9707
  return a.deserialize(e);
9708
- }), Bm = [Fl, Ul, $l, Bl], Fr = (e, t) => {
9709
- const s = Br(Bm, (r) => r.isApplicable(e, t));
9708
+ }), Mm = [Fl, Ul, $l, Bl], Fr = (e, t) => {
9709
+ const s = Br(Mm, (r) => r.isApplicable(e, t));
9710
9710
  if (s)
9711
9711
  return {
9712
9712
  value: s.transform(e, t),
@@ -9722,7 +9722,7 @@ var Fl = ha(Ml, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
9722
9722
  Gl.forEach((e) => {
9723
9723
  ql[e.annotation] = e;
9724
9724
  });
9725
- var Mm = (e, t, s) => {
9725
+ var Fm = (e, t, s) => {
9726
9726
  if (Ot(t))
9727
9727
  switch (t[0]) {
9728
9728
  case "symbol":
@@ -9758,7 +9758,7 @@ function jl(e) {
9758
9758
  if (Gs(e, "constructor"))
9759
9759
  throw new Error("constructor is not allowed as a property");
9760
9760
  }
9761
- var Fm = (e, t) => {
9761
+ var $m = (e, t) => {
9762
9762
  jl(t);
9763
9763
  for (let s = 0; s < t.length; s++) {
9764
9764
  const a = t[s];
@@ -9839,14 +9839,14 @@ function Ha(e, t, s = []) {
9839
9839
  Ha(i, t, [...s, ...zn(l)]);
9840
9840
  }), t(a, s);
9841
9841
  }
9842
- function $m(e, t, s) {
9842
+ function qm(e, t, s) {
9843
9843
  return Ha(t, (a, r) => {
9844
- e = Ka(e, r, (i) => Mm(i, a, s));
9844
+ e = Ka(e, r, (i) => Fm(i, a, s));
9845
9845
  }), e;
9846
9846
  }
9847
- function qm(e, t) {
9847
+ function jm(e, t) {
9848
9848
  function s(a, r) {
9849
- const i = Fm(e, zn(r));
9849
+ const i = $m(e, zn(r));
9850
9850
  a.map(zn).forEach((l) => {
9851
9851
  e = Ka(e, l, () => i);
9852
9852
  });
@@ -9860,12 +9860,12 @@ function qm(e, t) {
9860
9860
  kn(t, s);
9861
9861
  return e;
9862
9862
  }
9863
- var jm = (e, t) => Zn(e) || Ot(e) || es(e) || ts(e) || Ml(e, t);
9864
- function zm(e, t, s) {
9863
+ var zm = (e, t) => Zn(e) || Ot(e) || es(e) || ts(e) || Ml(e, t);
9864
+ function Vm(e, t, s) {
9865
9865
  const a = s.get(e);
9866
9866
  a ? a.push(t) : s.set(e, [t]);
9867
9867
  }
9868
- function Vm(e, t) {
9868
+ function Km(e, t) {
9869
9869
  const s = {};
9870
9870
  let a;
9871
9871
  return e.forEach((r) => {
@@ -9877,16 +9877,16 @@ function Vm(e, t) {
9877
9877
  }), a ? Va(s) ? [a] : [a, s] : Va(s) ? void 0 : s;
9878
9878
  }
9879
9879
  var zl = (e, t, s, a, r = [], i = [], l = /* @__PURE__ */ new Map()) => {
9880
- const o = Lm(e);
9880
+ const o = Dm(e);
9881
9881
  if (!o) {
9882
- zm(e, r, t);
9882
+ Vm(e, r, t);
9883
9883
  const p = l.get(e);
9884
9884
  if (p)
9885
9885
  return a ? {
9886
9886
  transformedValue: null
9887
9887
  } : p;
9888
9888
  }
9889
- if (!jm(e, s)) {
9889
+ if (!zm(e, s)) {
9890
9890
  const p = Fr(e, s), g = p ? {
9891
9891
  transformedValue: p.value,
9892
9892
  annotations: [p.type]
@@ -9923,13 +9923,13 @@ function Vl(e) {
9923
9923
  function $r(e) {
9924
9924
  return Vl(e) === "Array";
9925
9925
  }
9926
- function Km(e) {
9926
+ function Hm(e) {
9927
9927
  if (Vl(e) !== "Object")
9928
9928
  return !1;
9929
9929
  const t = Object.getPrototypeOf(e);
9930
9930
  return !!t && t.constructor === Object && t === Object.prototype;
9931
9931
  }
9932
- function Hm(e, t, s, a, r) {
9932
+ function Wm(e, t, s, a, r) {
9933
9933
  const i = {}.propertyIsEnumerable.call(a, t) ? "enumerable" : "nonenumerable";
9934
9934
  i === "enumerable" && (e[t] = s), r && i === "nonenumerable" && Object.defineProperty(e, t, {
9935
9935
  value: s,
@@ -9941,14 +9941,14 @@ function Hm(e, t, s, a, r) {
9941
9941
  function Wa(e, t = {}) {
9942
9942
  if ($r(e))
9943
9943
  return e.map((r) => Wa(r, t));
9944
- if (!Km(e))
9944
+ if (!Hm(e))
9945
9945
  return e;
9946
9946
  const s = Object.getOwnPropertyNames(e), a = Object.getOwnPropertySymbols(e);
9947
9947
  return [...s, ...a].reduce((r, i) => {
9948
9948
  if ($r(t.props) && !t.props.includes(i))
9949
9949
  return r;
9950
9950
  const l = e[i], o = Wa(l, t);
9951
- return Hm(r, i, o, e, t.nonenumerable), r;
9951
+ return Wm(r, i, o, e, t.nonenumerable), r;
9952
9952
  }, {});
9953
9953
  }
9954
9954
  var Se = class {
@@ -9956,7 +9956,7 @@ var Se = class {
9956
9956
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
9957
9957
  */
9958
9958
  constructor({ dedupe: e = !1 } = {}) {
9959
- this.classRegistry = new xm(), this.symbolRegistry = new Ll((t) => t.description ?? ""), this.customTransformerRegistry = new Em(), this.allowedErrorProps = [], this.dedupe = e;
9959
+ this.classRegistry = new wm(), this.symbolRegistry = new Ll((t) => t.description ?? ""), this.customTransformerRegistry = new Sm(), this.allowedErrorProps = [], this.dedupe = e;
9960
9960
  }
9961
9961
  serialize(e) {
9962
9962
  const t = /* @__PURE__ */ new Map(), s = zl(e, t, this, this.dedupe), a = {
@@ -9966,7 +9966,7 @@ var Se = class {
9966
9966
  ...a.meta,
9967
9967
  values: s.annotations
9968
9968
  });
9969
- const r = Vm(t, this.dedupe);
9969
+ const r = Km(t, this.dedupe);
9970
9970
  return r && (a.meta = {
9971
9971
  ...a.meta,
9972
9972
  referentialEqualities: r
@@ -9975,7 +9975,7 @@ var Se = class {
9975
9975
  deserialize(e) {
9976
9976
  const { json: t, meta: s } = e;
9977
9977
  let a = Wa(t);
9978
- return s != null && s.values && (a = $m(a, s.values, this)), s != null && s.referentialEqualities && (a = qm(a, s.referentialEqualities)), a;
9978
+ return s != null && s.values && (a = qm(a, s.values, this)), s != null && s.referentialEqualities && (a = jm(a, s.referentialEqualities)), a;
9979
9979
  }
9980
9980
  stringify(e) {
9981
9981
  return JSON.stringify(this.serialize(e));
@@ -10008,44 +10008,44 @@ Se.registerClass = Se.defaultInstance.registerClass.bind(Se.defaultInstance);
10008
10008
  Se.registerSymbol = Se.defaultInstance.registerSymbol.bind(Se.defaultInstance);
10009
10009
  Se.registerCustom = Se.defaultInstance.registerCustom.bind(Se.defaultInstance);
10010
10010
  Se.allowErrorProps = Se.defaultInstance.allowErrorProps.bind(Se.defaultInstance);
10011
- var Wm = Se.serialize, fg = Se.stringify;
10012
- function gg(e) {
10011
+ var Qm = Se.serialize, gg = Se.stringify;
10012
+ function pg(e) {
10013
10013
  return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
10014
10014
  }
10015
- function pg(e, t) {
10015
+ function yg(e, t) {
10016
10016
  return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
10017
10017
  }
10018
- function yg({
10018
+ function vg({
10019
10019
  queryState: e,
10020
10020
  observerCount: t,
10021
10021
  isStale: s
10022
10022
  }) {
10023
10023
  return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : s ? "yellow" : "green" : "gray";
10024
10024
  }
10025
- function vg({
10025
+ function bg({
10026
10026
  status: e,
10027
10027
  isPaused: t
10028
10028
  }) {
10029
10029
  return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
10030
10030
  }
10031
- function bg(e) {
10031
+ function xg(e) {
10032
10032
  return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
10033
10033
  }
10034
- var xg = (e, t = !1) => {
10034
+ var wg = (e, t = !1) => {
10035
10035
  const {
10036
10036
  json: s
10037
- } = Wm(e);
10037
+ } = Qm(e);
10038
10038
  return JSON.stringify(s, null, t ? 2 : void 0);
10039
- }, Ps = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, Qm = (e, t) => e.queryHash.localeCompare(t.queryHash), Kl = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, Jm = (e, t) => Ps(e) === Ps(t) ? Kl(e, t) : Ps(e) > Ps(t) ? 1 : -1, wg = {
10040
- status: Jm,
10041
- "query hash": Qm,
10042
- "last updated": Kl
10043
- }, Is = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Hl = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Ym = (e, t) => Is(e) === Is(t) ? Hl(e, t) : Is(e) > Is(t) ? 1 : -1, Ng = {
10039
+ }, Ps = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, Jm = (e, t) => e.queryHash.localeCompare(t.queryHash), Kl = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, Ym = (e, t) => Ps(e) === Ps(t) ? Kl(e, t) : Ps(e) > Ps(t) ? 1 : -1, Ng = {
10044
10040
  status: Ym,
10041
+ "query hash": Jm,
10042
+ "last updated": Kl
10043
+ }, Is = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Hl = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Xm = (e, t) => Is(e) === Is(t) ? Hl(e, t) : Is(e) > Is(t) ? 1 : -1, Eg = {
10044
+ status: Xm,
10045
10045
  "last updated": Hl
10046
- }, Eg = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Sg = () => {
10046
+ }, Sg = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Ag = () => {
10047
10047
  const [e, t] = _e("dark");
10048
- return Rh(() => {
10048
+ return Gh(() => {
10049
10049
  const s = window.matchMedia("(prefers-color-scheme: dark)");
10050
10050
  t(s.matches ? "dark" : "light");
10051
10051
  const a = (r) => {
@@ -10117,7 +10117,7 @@ var xg = (e, t = !1) => {
10117
10117
  if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
10118
10118
  const a = document.createElement("style"), r = document.createTextNode("");
10119
10119
  a.appendChild(r), a.id = "_goober", a.setAttribute("nonce", e), t ? t.appendChild(a) : document.head.appendChild(a);
10120
- }, ln, ns, ss, as, qt, rs, on, cn, dn, un, hn, is, mn, ls, zr, Xm = (zr = class {
10120
+ }, ln, ns, ss, as, qt, rs, on, cn, dn, un, hn, is, mn, ls, zr, Zm = (zr = class {
10121
10121
  constructor(e) {
10122
10122
  we(this, ln);
10123
10123
  we(this, ns);
@@ -10169,7 +10169,7 @@ var xg = (e, t = !1) => {
10169
10169
  const t = Pl(() => {
10170
10170
  const s = this, [a] = te(this, cn), [r] = te(this, dn), [i] = te(this, un), [l] = te(this, hn), [o] = te(this, is), [d] = te(this, ln);
10171
10171
  let h;
10172
- return te(this, mn) ? h = te(this, mn) : (h = Cl(() => import("./LNWAZHJI-DZk8mvQq.js")), pe(this, mn, h)), Wl(te(this, rs), te(this, on)), Al(h, Tl({
10172
+ return te(this, mn) ? h = te(this, mn) : (h = Cl(() => import("./LNWAZHJI-gxdslGXA.js")), pe(this, mn, h)), Wl(te(this, rs), te(this, on)), Al(h, Tl({
10173
10173
  get queryFlavor() {
10174
10174
  return te(s, ss);
10175
10175
  },
@@ -10211,7 +10211,7 @@ var xg = (e, t = !1) => {
10211
10211
  throw new Error("Devtools is not mounted");
10212
10212
  (e = te(this, ls)) == null || e.call(this), pe(this, qt, !1);
10213
10213
  }
10214
- }, ln = new WeakMap(), ns = new WeakMap(), ss = new WeakMap(), as = new WeakMap(), qt = new WeakMap(), rs = new WeakMap(), on = new WeakMap(), cn = new WeakMap(), dn = new WeakMap(), un = new WeakMap(), hn = new WeakMap(), is = new WeakMap(), mn = new WeakMap(), ls = new WeakMap(), zr), fn, os, cs, ds, jt, us, gn, pn, yn, vn, bn, hs, xn, wn, ms, Vr, Zm = (Vr = class {
10214
+ }, ln = new WeakMap(), ns = new WeakMap(), ss = new WeakMap(), as = new WeakMap(), qt = new WeakMap(), rs = new WeakMap(), on = new WeakMap(), cn = new WeakMap(), dn = new WeakMap(), un = new WeakMap(), hn = new WeakMap(), is = new WeakMap(), mn = new WeakMap(), ls = new WeakMap(), zr), fn, os, cs, ds, jt, us, gn, pn, yn, vn, bn, hs, xn, wn, ms, Vr, ef = (Vr = class {
10215
10215
  constructor(e) {
10216
10216
  we(this, fn);
10217
10217
  we(this, os);
@@ -10268,7 +10268,7 @@ var xg = (e, t = !1) => {
10268
10268
  const t = Pl(() => {
10269
10269
  const s = this, [a] = te(this, pn), [r] = te(this, yn), [i] = te(this, vn), [l] = te(this, bn), [o] = te(this, hs), [d] = te(this, fn), [h] = te(this, xn);
10270
10270
  let u;
10271
- return te(this, wn) ? u = te(this, wn) : (u = Cl(() => import("./MWZ6AO7Z-dYlyg92K.js")), pe(this, wn, u)), Wl(te(this, us), te(this, gn)), Al(u, Tl({
10271
+ return te(this, wn) ? u = te(this, wn) : (u = Cl(() => import("./MWZ6AO7Z-CifzjTG8.js")), pe(this, wn, u)), Wl(te(this, us), te(this, gn)), Al(u, Tl({
10272
10272
  get queryFlavor() {
10273
10273
  return te(s, cs);
10274
10274
  },
@@ -10314,7 +10314,7 @@ var xg = (e, t = !1) => {
10314
10314
  (e = te(this, ms)) == null || e.call(this), pe(this, jt, !1);
10315
10315
  }
10316
10316
  }, fn = new WeakMap(), os = new WeakMap(), cs = new WeakMap(), ds = new WeakMap(), jt = new WeakMap(), us = new WeakMap(), gn = new WeakMap(), pn = new WeakMap(), yn = new WeakMap(), vn = new WeakMap(), bn = new WeakMap(), hs = new WeakMap(), xn = new WeakMap(), wn = new WeakMap(), ms = new WeakMap(), Vr);
10317
- function ef(e) {
10317
+ function tf(e) {
10318
10318
  const t = Pe(e.client), s = Ce.useRef(null), {
10319
10319
  buttonPosition: a,
10320
10320
  position: r,
@@ -10324,7 +10324,7 @@ function ef(e) {
10324
10324
  shadowDOMTarget: d,
10325
10325
  hideDisabledQueries: h
10326
10326
  } = e, [u] = Ce.useState(
10327
- new Xm({
10327
+ new Zm({
10328
10328
  client: t,
10329
10329
  queryFlavor: "React Query",
10330
10330
  version: "5",
@@ -10352,9 +10352,9 @@ function ef(e) {
10352
10352
  u.unmount();
10353
10353
  }), [u]), /* @__PURE__ */ n("div", { dir: "ltr", className: "tsqd-parent-container", ref: s });
10354
10354
  }
10355
- function tf(e) {
10355
+ function nf(e) {
10356
10356
  const t = Pe(e.client), s = Ce.useRef(null), { errorTypes: a, styleNonce: r, shadowDOMTarget: i, hideDisabledQueries: l } = e, [o] = Ce.useState(
10357
- new Zm({
10357
+ new ef({
10358
10358
  client: t,
10359
10359
  queryFlavor: "React Query",
10360
10360
  version: "5",
@@ -10387,11 +10387,11 @@ function tf(e) {
10387
10387
  }
10388
10388
  );
10389
10389
  }
10390
- var nf = process.env.NODE_ENV !== "development" ? function() {
10390
+ var sf = process.env.NODE_ENV !== "development" ? function() {
10391
10391
  return null;
10392
- } : ef;
10392
+ } : tf;
10393
10393
  process.env.NODE_ENV;
10394
- const sf = () => {
10394
+ const af = () => {
10395
10395
  Xt("dynamic-page-selector", {
10396
10396
  description: "Dynamic page selector"
10397
10397
  }), Xt("enable-add-page-dropdown", {
@@ -10405,14 +10405,14 @@ const sf = () => {
10405
10405
  }), Xt("enable-seo-meta-tab", {
10406
10406
  description: "Enable SEO Meta tab"
10407
10407
  });
10408
- }, af = () => {
10408
+ }, rf = () => {
10409
10409
  const e = ue(), t = Z();
10410
10410
  return De({
10411
10411
  queryKey: [U.GET_COLLECTIONS],
10412
10412
  initialData: [],
10413
10413
  queryFn: async () => t(e, { action: U.GET_COLLECTIONS })
10414
10414
  });
10415
- }, rf = () => {
10415
+ }, lf = () => {
10416
10416
  const { data: e } = We(), { data: t } = Gt(), { data: s } = St(), a = ue(), r = Z(), i = W(() => (s == null ? void 0 : s.fallbackLang) || "en", [s == null ? void 0 : s.fallbackLang]);
10417
10417
  return ke({
10418
10418
  mutationFn: async ({ block: l }) => r(a, {
@@ -10436,7 +10436,7 @@ const sf = () => {
10436
10436
  }
10437
10437
  })
10438
10438
  });
10439
- }, lf = () => {
10439
+ }, of = () => {
10440
10440
  const e = oa();
10441
10441
  return ae(
10442
10442
  ({ pageId: t }) => {
@@ -10444,11 +10444,11 @@ const sf = () => {
10444
10444
  },
10445
10445
  [e]
10446
10446
  );
10447
- }, of = xo(null), ka = {
10447
+ }, cf = xo(null), ka = {
10448
10448
  didCatch: !1,
10449
10449
  error: null
10450
10450
  };
10451
- class cf extends wo {
10451
+ class df extends wo {
10452
10452
  constructor(t) {
10453
10453
  super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ka;
10454
10454
  }
@@ -10481,7 +10481,7 @@ class cf extends wo {
10481
10481
  } = this.state, {
10482
10482
  resetKeys: r
10483
10483
  } = this.props;
10484
- if (a && s.error !== null && df(t.resetKeys, r)) {
10484
+ if (a && s.error !== null && uf(t.resetKeys, r)) {
10485
10485
  var i, l;
10486
10486
  (i = (l = this.props).onReset) === null || i === void 0 || i.call(l, {
10487
10487
  next: r,
@@ -10515,7 +10515,7 @@ class cf extends wo {
10515
10515
  else
10516
10516
  throw l;
10517
10517
  }
10518
- return vr(of.Provider, {
10518
+ return vr(cf.Provider, {
10519
10519
  value: {
10520
10520
  didCatch: i,
10521
10521
  error: l,
@@ -10524,11 +10524,11 @@ class cf extends wo {
10524
10524
  }, o);
10525
10525
  }
10526
10526
  }
10527
- function df() {
10527
+ function uf() {
10528
10528
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
10529
10529
  return e.length !== t.length || e.some((s, a) => !Object.is(s, t[a]));
10530
10530
  }
10531
- const uf = () => {
10531
+ const hf = () => {
10532
10532
  const e = ps(), t = Pe(), s = Z();
10533
10533
  return ke({
10534
10534
  mutationFn: async (a) => {
@@ -10554,7 +10554,7 @@ const uf = () => {
10554
10554
  H.error("Failed to upload asset");
10555
10555
  }
10556
10556
  });
10557
- }, hf = () => {
10557
+ }, mf = () => {
10558
10558
  const e = ps(), t = Pe(), s = Z();
10559
10559
  return ke({
10560
10560
  mutationFn: async (a) => s(e, {
@@ -10572,7 +10572,7 @@ const uf = () => {
10572
10572
  H.error("Failed to delete asset");
10573
10573
  }
10574
10574
  });
10575
- }, mf = () => {
10575
+ }, ff = () => {
10576
10576
  const e = ps(), t = Pe(), s = Z();
10577
10577
  return ke({
10578
10578
  mutationFn: async (a) => s(e, {
@@ -10590,7 +10590,7 @@ const uf = () => {
10590
10590
  H.error("Failed to update asset");
10591
10591
  }
10592
10592
  });
10593
- }, ff = (e = {}) => {
10593
+ }, gf = (e = {}) => {
10594
10594
  const t = ps(), s = Z(), { search: a, page: r = 1, limit: i = 30 } = e;
10595
10595
  return De({
10596
10596
  queryKey: [U.GET_ASSETS, a, r, i],
@@ -10608,7 +10608,7 @@ const uf = () => {
10608
10608
  staleTime: 1e3 * 60 * 5,
10609
10609
  retry: 1
10610
10610
  });
10611
- }, gf = (e) => {
10611
+ }, pf = (e) => {
10612
10612
  const t = ps(), s = Z();
10613
10613
  return De({
10614
10614
  queryKey: [U.GET_ASSET, e],
@@ -10620,7 +10620,7 @@ const uf = () => {
10620
10620
  retry: 1
10621
10621
  });
10622
10622
  };
10623
- function pf(e) {
10623
+ function yf(e) {
10624
10624
  const t = isNaN(e) ? 0 : typeof e == "number" ? e : parseInt(e);
10625
10625
  return t ? t < 1024 ? `${t.toFixed(2)} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(2)} KB` : `${(t / (1024 * 1024)).toFixed(2)} MB` : "0 B";
10626
10626
  }
@@ -10639,7 +10639,7 @@ function jr(e, t) {
10639
10639
  let s = e, a = t == null ? void 0 : t.description;
10640
10640
  return (!a || typeof a != "string") && (a = ""), (!s || typeof s != "string") && (s = ""), s !== a;
10641
10641
  }
10642
- const yf = ({
10642
+ const vf = ({
10643
10643
  assetId: e,
10644
10644
  onBack: t,
10645
10645
  onEdit: s,
@@ -10647,7 +10647,7 @@ const yf = ({
10647
10647
  isSaving: r
10648
10648
  }) => {
10649
10649
  var m, y, p;
10650
- const { data: i, isLoading: l, isError: o } = gf(e || ""), [d, h] = S(""), u = async (g, f) => {
10650
+ const { data: i, isLoading: l, isError: o } = pf(e || ""), [d, h] = S(""), u = async (g, f) => {
10651
10651
  try {
10652
10652
  await navigator.clipboard.writeText(g), H.success(`${f} copied to clipboard`);
10653
10653
  } catch (v) {
@@ -10738,7 +10738,7 @@ const yf = ({
10738
10738
  },
10739
10739
  {
10740
10740
  label: "Size",
10741
- value: pf(i.size)
10741
+ value: yf(i.size)
10742
10742
  },
10743
10743
  {
10744
10744
  label: "Dimensions",
@@ -10777,7 +10777,7 @@ const yf = ({
10777
10777
  size: "icon",
10778
10778
  className: "h-6 w-6",
10779
10779
  onClick: () => u(g.value, g.label),
10780
- children: /* @__PURE__ */ n(Ac, { className: "h-3 w-3" })
10780
+ children: /* @__PURE__ */ n(Tc, { className: "h-3 w-3" })
10781
10781
  }
10782
10782
  )
10783
10783
  ] })
@@ -10826,7 +10826,7 @@ const yf = ({
10826
10826
  ] })
10827
10827
  ] });
10828
10828
  };
10829
- function vf({
10829
+ function bf({
10830
10830
  currentPage: e,
10831
10831
  totalPages: t,
10832
10832
  onPageChange: s,
@@ -10932,7 +10932,7 @@ function vf({
10932
10932
  ] })
10933
10933
  ] });
10934
10934
  }
10935
- const bf = Hs.lazy(() => import("./image-editor-CzFST20j.js")), xf = 10 * 1024 * 1024, wf = ({
10935
+ const xf = Hs.lazy(() => import("./image-editor-CzFST20j.js")), wf = 10 * 1024 * 1024, Nf = ({
10936
10936
  isUpdatingAsset: e,
10937
10937
  allowedTypes: t,
10938
10938
  maxFileSize: s,
@@ -10974,11 +10974,11 @@ const bf = Hs.lazy(() => import("./image-editor-CzFST20j.js")), xf = 10 * 1024 *
10974
10974
  const f = [];
10975
10975
  let v = 0;
10976
10976
  return g.forEach((x) => {
10977
- x.size > xf ? v++ : f.push(x);
10977
+ x.size > wf ? v++ : f.push(x);
10978
10978
  }), v > 0 && H.error(
10979
10979
  `${v === 1 && g.length === 1 ? "File" : v + (v === 1 ? " file" : " files")} exceed the maximum size limit of 10MB.`
10980
10980
  ), Y(f) ? [] : h(f);
10981
- }, { getRootProps: m, getInputProps: y, isDragActive: p } = Rc({
10981
+ }, { getRootProps: m, getInputProps: y, isDragActive: p } = Gc({
10982
10982
  onDrop: u,
10983
10983
  accept: {
10984
10984
  "image/*": t.includes("image") ? [] : []
@@ -11017,7 +11017,7 @@ const bf = Hs.lazy(() => import("./image-editor-CzFST20j.js")), xf = 10 * 1024 *
11017
11017
  "div",
11018
11018
  {
11019
11019
  className: "flex items-center justify-center rounded-full border border-indigo-500 bg-indigo-100 p-2",
11020
- children: /* @__PURE__ */ n(kc, { className: "h-4 w-4 text-indigo-500" })
11020
+ children: /* @__PURE__ */ n(Pc, { className: "h-4 w-4 text-indigo-500" })
11021
11021
  }
11022
11022
  ),
11023
11023
  /* @__PURE__ */ c("div", { className: "text-left", children: [
@@ -11095,7 +11095,7 @@ function Ql({ close: e, onSelect: t, mode: s = "image", assetId: a }) {
11095
11095
  }, 300);
11096
11096
  return () => clearTimeout(_);
11097
11097
  }, [C]);
11098
- const { data: M, isLoading: q } = ff({
11098
+ const { data: M, isLoading: q } = gf({
11099
11099
  search: P.toLowerCase().trim(),
11100
11100
  page: G,
11101
11101
  limit: ee
@@ -11103,7 +11103,7 @@ function Ql({ close: e, onSelect: t, mode: s = "image", assetId: a }) {
11103
11103
  le(() => {
11104
11104
  q || re <= 0 || J((_) => _ > re ? re : _ < 1 ? 1 : _);
11105
11105
  }, [q, re]);
11106
- const Ae = (B == null ? void 0 : B.length) > 0, { mutate: Oe } = hf(), { mutateAsync: me, isPending: w } = uf(), { mutate: b, isPending: E } = mf(), R = ae(
11106
+ const Ae = (B == null ? void 0 : B.length) > 0, { mutate: Oe } = mf(), { mutateAsync: me, isPending: w } = hf(), { mutate: b, isPending: E } = ff(), R = ae(
11107
11107
  (_) => {
11108
11108
  const ne = Math.min(Math.max(1, _), Math.max(1, re));
11109
11109
  ne !== G && J(ne);
@@ -11163,7 +11163,7 @@ function Ql({ close: e, onSelect: t, mode: s = "image", assetId: a }) {
11163
11163
  /* @__PURE__ */ n("h1", { className: "text-lg font-medium", children: "Digital Asset Manager" }),
11164
11164
  x === "grid" ? /* @__PURE__ */ c(de, { children: [
11165
11165
  /* @__PURE__ */ n(
11166
- wf,
11166
+ Nf,
11167
11167
  {
11168
11168
  maxFileSize: 10,
11169
11169
  allowedTypes: l,
@@ -11227,7 +11227,7 @@ function Ql({ close: e, onSelect: t, mode: s = "image", assetId: a }) {
11227
11227
  /* @__PURE__ */ n("div", { className: "h-64 w-full animate-pulse rounded bg-gray-200" }),
11228
11228
  /* @__PURE__ */ n("div", { className: "h-64 w-full animate-pulse rounded bg-gray-200" })
11229
11229
  ] }) : !q && !Ae ? /* @__PURE__ */ c("div", { className: "flex h-full flex-col items-center justify-center rounded-lg border", children: [
11230
- /* @__PURE__ */ n("div", { className: "text-muted-foreground", children: /* @__PURE__ */ n(Tc, { className: "h-9 w-9 text-indigo-500" }) }),
11230
+ /* @__PURE__ */ n("div", { className: "text-muted-foreground", children: /* @__PURE__ */ n(Cc, { className: "h-9 w-9 text-indigo-500" }) }),
11231
11231
  /* @__PURE__ */ n("div", { className: "text-lg text-muted-foreground", children: "No assets found" }),
11232
11232
  /* @__PURE__ */ n("div", { className: "text-sm text-muted-foreground", children: P.length > 0 ? "No assets found for your search: " + P : "Start uploading assets to get started" }),
11233
11233
  /* @__PURE__ */ n("br", {})
@@ -11253,7 +11253,7 @@ function Ql({ close: e, onSelect: t, mode: s = "image", assetId: a }) {
11253
11253
  className: `h-full min-h-[80px] w-full object-contain ${D.some((ne) => ne.id === _.id) ? "" : "group-hover:blur group-hover:contrast-50"}`
11254
11254
  }
11255
11255
  ) : /* @__PURE__ */ c("div", { className: "flex h-full items-center justify-center", children: [
11256
- /* @__PURE__ */ n(Cc, { className: "h-12 w-12 text-muted-foreground" }),
11256
+ /* @__PURE__ */ n(kc, { className: "h-12 w-12 text-muted-foreground" }),
11257
11257
  _.thumbnailUrl && /* @__PURE__ */ n(
11258
11258
  "img",
11259
11259
  {
@@ -11340,8 +11340,8 @@ function Ql({ close: e, onSelect: t, mode: s = "image", assetId: a }) {
11340
11340
  },
11341
11341
  _.id
11342
11342
  )) }) }),
11343
- re > 1 && /* @__PURE__ */ n("div", { className: "absolute bottom-0 left-0 right-0 border-t bg-white p-4", children: /* @__PURE__ */ n(cf, { fallback: /* @__PURE__ */ n("div", { className: "text-red-500", children: "Error loading pagination" }), children: /* @__PURE__ */ n(
11344
- vf,
11343
+ re > 1 && /* @__PURE__ */ n("div", { className: "absolute bottom-0 left-0 right-0 border-t bg-white p-4", children: /* @__PURE__ */ n(df, { fallback: /* @__PURE__ */ n("div", { className: "text-red-500", children: "Error loading pagination" }), children: /* @__PURE__ */ n(
11344
+ bf,
11345
11345
  {
11346
11346
  currentPage: G,
11347
11347
  totalPages: re,
@@ -11352,7 +11352,7 @@ function Ql({ close: e, onSelect: t, mode: s = "image", assetId: a }) {
11352
11352
  ) }) })
11353
11353
  ] })
11354
11354
  ] }) : /* @__PURE__ */ n(
11355
- yf,
11355
+ vf,
11356
11356
  {
11357
11357
  assetId: o || a || "",
11358
11358
  onBack: () => {
@@ -11386,7 +11386,7 @@ function Ql({ close: e, onSelect: t, mode: s = "image", assetId: a }) {
11386
11386
  {
11387
11387
  fallback: /* @__PURE__ */ n("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ n(wt, { className: "h-8 w-8 animate-spin" }) }),
11388
11388
  children: /* @__PURE__ */ n(
11389
- bf,
11389
+ xf,
11390
11390
  {
11391
11391
  imageUrl: p.file,
11392
11392
  onSave: oe,
@@ -11413,7 +11413,7 @@ function Ql({ close: e, onSelect: t, mode: s = "image", assetId: a }) {
11413
11413
  ] }) })
11414
11414
  ] });
11415
11415
  }
11416
- const Nf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11416
+ const Ef = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11417
11417
  __proto__: null,
11418
11418
  default: Ql
11419
11419
  }, Symbol.toStringTag, { value: "Module" })), Qa = ({
@@ -11508,7 +11508,7 @@ const Nf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11508
11508
  ) })
11509
11509
  ] }) })
11510
11510
  ] });
11511
- }, Ef = ({ isActive: e, onClick: t }) => /* @__PURE__ */ n(
11511
+ }, Sf = ({ isActive: e, onClick: t }) => /* @__PURE__ */ n(
11512
11512
  T,
11513
11513
  {
11514
11514
  variant: e ? "default" : "ghost",
@@ -11516,7 +11516,7 @@ const Nf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11516
11516
  onClick: t,
11517
11517
  children: "Branding"
11518
11518
  }
11519
- ), Sf = () => {
11519
+ ), Af = () => {
11520
11520
  const [e, t] = S({
11521
11521
  logoUrl: "",
11522
11522
  logoId: "",
@@ -11581,7 +11581,7 @@ const Nf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11581
11581
  ) })
11582
11582
  ] })
11583
11583
  ] });
11584
- }, Af = ({ isActive: e, onClick: t }) => /* @__PURE__ */ n(T, { variant: e ? "default" : "ghost", className: "w-full justify-start text-left", onClick: t, children: "Contact & Social" }), Tf = () => {
11584
+ }, Tf = ({ isActive: e, onClick: t }) => /* @__PURE__ */ n(T, { variant: e ? "default" : "ghost", className: "w-full justify-start text-left", onClick: t, children: "Contact & Social" }), Cf = () => {
11585
11585
  const [e, t] = S({ contactEmail: "", contactPhone: "", contactAddress: "" }), [s, a] = S([]), [r, i] = S({ isOpen: !1, platform: "", url: "", customName: "" }), [l, o] = S(!1), d = [
11586
11586
  { value: "facebook", label: "Facebook" },
11587
11587
  { value: "twitter", label: "Twitter" },
@@ -11744,7 +11744,7 @@ const Nf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11744
11744
  /* @__PURE__ */ n("div", { className: "pt-3", children: /* @__PURE__ */ n(T, { onClick: p, disabled: !g || l, className: "w-full", children: l ? "Saving..." : "Save Contact & Social Settings" }) })
11745
11745
  ] })
11746
11746
  ] });
11747
- }, Cf = ({ isActive: e, onClick: t }) => /* @__PURE__ */ n(T, { variant: e ? "default" : "ghost", className: "w-full justify-start text-left", onClick: t, children: "Analytics & Tracking" }), kf = () => {
11747
+ }, kf = ({ isActive: e, onClick: t }) => /* @__PURE__ */ n(T, { variant: e ? "default" : "ghost", className: "w-full justify-start text-left", onClick: t, children: "Analytics & Tracking" }), Pf = () => {
11748
11748
  const [e, t] = S({
11749
11749
  googleAnalyticsId: "",
11750
11750
  googleTagManagerId: "",
@@ -11859,38 +11859,38 @@ const Nf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11859
11859
  /* @__PURE__ */ n("div", { className: "pt-3", children: /* @__PURE__ */ n(T, { onClick: m, disabled: !y || l, className: "w-full", children: l ? "Saving..." : "Save Settings" }) })
11860
11860
  ] })
11861
11861
  ] });
11862
- }, Pf = () => {
11862
+ }, If = () => {
11863
11863
  Ea("branding", {
11864
11864
  label: "Branding",
11865
- button: Ef,
11866
- panel: Sf
11865
+ button: Sf,
11866
+ panel: Af
11867
11867
  }), Ea("contact-social", {
11868
11868
  label: "Contact & Social",
11869
- button: Af,
11870
- panel: Tf
11869
+ button: Tf,
11870
+ panel: Cf
11871
11871
  }), Ea("analytics-tracking", {
11872
11872
  label: "Analytics & Tracking",
11873
- button: Cf,
11874
- panel: kf
11873
+ button: kf,
11874
+ panel: Pf
11875
11875
  });
11876
- }, If = No(() => Promise.resolve().then(() => Nf));
11877
- sf();
11878
- Gc();
11879
- Oo(Yu);
11880
- Ph();
11881
- Pf();
11882
- Ro(If);
11883
- Go(Ed);
11884
- const _f = (e) => {
11876
+ }, _f = No(() => Promise.resolve().then(() => Ef));
11877
+ af();
11878
+ Uc();
11879
+ Ro(Xu);
11880
+ Ih();
11881
+ If();
11882
+ Go(_f);
11883
+ Uo(Sd);
11884
+ const Lf = (e) => {
11885
11885
  const t = tt([]), [s] = He(), a = s.get("page"), { data: r } = We(), {
11886
11886
  data: i = {
11887
11887
  role: "",
11888
11888
  permissions: null
11889
11889
  }
11890
- } = nh();
11891
- th(), od();
11892
- const { data: l, isFetching: o } = Hi(), { blocks: d } = eh(l), { data: h } = Ge(), { mutateAsync: u } = Bi(), m = Xu(), { onSave: y } = sh(), { getPartialBlocks: p, getPartialBlockBlocks: g } = ah(), { aiContext: f, setAiContext: v } = tr(), { mutateAsync: x } = Ad(), [N, P] = S(!1), { data: L } = St(), C = Rt(), { data: I } = Wi(), { data: G } = af(), { mutateAsync: J } = rf(), ee = lf();
11893
- Qc(), le(() => {
11890
+ } = sh();
11891
+ nh(), cd();
11892
+ const { data: l, isFetching: o } = Hi(), { blocks: d } = th(l), { data: h } = Ge(), { mutateAsync: u } = Bi(), m = Zu(), { onSave: y } = ah(), { getPartialBlocks: p, getPartialBlockBlocks: g } = rh(), { aiContext: f, setAiContext: v } = tr(), { mutateAsync: x } = Td(), [N, P] = S(!1), { data: L } = St(), C = Rt(), { data: I } = Wi(), { data: G } = rf(), { mutateAsync: J } = lf(), ee = of();
11893
+ Jc(), le(() => {
11894
11894
  const q = () => {
11895
11895
  document.hidden ? P(!0) : P(!1);
11896
11896
  };
@@ -11905,7 +11905,7 @@ const _f = (e) => {
11905
11905
  ), M = W(() => $(L, "theme", {}) || {}, [L]);
11906
11906
  return /* @__PURE__ */ c(de, { children: [
11907
11907
  /* @__PURE__ */ n(
11908
- Uo,
11908
+ Bo,
11909
11909
  {
11910
11910
  gotoPage: ee,
11911
11911
  collections: G ?? [],
@@ -11948,23 +11948,23 @@ const _f = (e) => {
11948
11948
  }, Ae = [...q, re];
11949
11949
  return await y({ page: a, blocks: Ae, needTranslations: K }), t.current = Ae, Us(B, M) || await u({ settings: { theme: B } }), !0;
11950
11950
  },
11951
- themePanelComponent: Od,
11951
+ themePanelComponent: Rd,
11952
11952
  ...D
11953
11953
  }
11954
11954
  ),
11955
11955
  /* @__PURE__ */ c("div", { children: [
11956
- /* @__PURE__ */ n(hd, {}),
11957
- /* @__PURE__ */ n(md, {})
11956
+ /* @__PURE__ */ n(md, {}),
11957
+ /* @__PURE__ */ n(fd, {})
11958
11958
  ] })
11959
11959
  ] });
11960
- }, Lf = new Eo({
11960
+ }, Df = new Eo({
11961
11961
  defaultOptions: {
11962
11962
  queries: {
11963
11963
  refetchOnWindowFocus: !1,
11964
11964
  refetchOnReconnect: !1
11965
11965
  }
11966
11966
  }
11967
- }), Ag = (e) => {
11967
+ }), Tg = (e) => {
11968
11968
  const { isLoggedIn: t } = ot(), [, s] = Mi(), [a, r] = S(!1);
11969
11969
  return le(() => (s(
11970
11970
  fs(e, [
@@ -11982,11 +11982,11 @@ const _f = (e) => {
11982
11982
  r(!0);
11983
11983
  }, 200), () => {
11984
11984
  r(!1), s({});
11985
- }), [e, s]), a ? /* @__PURE__ */ c(So, { client: Lf, children: [
11986
- t ? /* @__PURE__ */ n(_f, { ...e }) : /* @__PURE__ */ n(lh, {}),
11987
- /* @__PURE__ */ n(nf, {})
11985
+ }), [e, s]), a ? /* @__PURE__ */ c(So, { client: Df, children: [
11986
+ t ? /* @__PURE__ */ n(Lf, { ...e }) : /* @__PURE__ */ n(oh, {}),
11987
+ /* @__PURE__ */ n(sf, {})
11988
11988
  ] }) : /* @__PURE__ */ n("div", {});
11989
- }, Tg = () => {
11989
+ }, Cg = () => {
11990
11990
  const e = ue(), t = Z(), { data: s } = Gt(), a = Pe();
11991
11991
  return ke({
11992
11992
  mutationFn: async (r) => {
@@ -12011,7 +12011,7 @@ const _f = (e) => {
12011
12011
  console.error("Failed to update metadata");
12012
12012
  }
12013
12013
  });
12014
- }, Cg = () => {
12014
+ }, kg = () => {
12015
12015
  const { logout: e } = ot(), { getAccessToken: t } = Gi();
12016
12016
  return ae(
12017
12017
  async ({
@@ -12051,77 +12051,77 @@ if (typeof window > "u")
12051
12051
  throw new Error("@chaibuilder/pages is not available on the server");
12052
12052
  export {
12053
12053
  gl as $,
12054
- bg as A,
12055
- xg as B,
12056
- Yf as C,
12057
- mg as D,
12058
- ug as E,
12059
- ag as F,
12054
+ xg as A,
12055
+ wg as B,
12056
+ Xf as C,
12057
+ fg as D,
12058
+ hg as E,
12059
+ rg as F,
12060
12060
  qe as G,
12061
- Lh as H,
12062
- Wm as I,
12063
- rg as J,
12061
+ Dh as H,
12062
+ Qm as I,
12063
+ ig as J,
12064
12064
  _s as K,
12065
- Eg as L,
12066
- pg as M,
12067
- gg as N,
12065
+ Sg as L,
12066
+ yg as M,
12067
+ pg as N,
12068
12068
  Kt as O,
12069
- hg as P,
12070
- om as Q,
12071
- fg as R,
12072
- ig as S,
12073
- og as T,
12074
- lg as U,
12069
+ mg as P,
12070
+ cm as Q,
12071
+ gg as R,
12072
+ lg as S,
12073
+ cg as T,
12074
+ og as U,
12075
12075
  Ls as V,
12076
- eg as W,
12077
- Ag as X,
12076
+ tg as W,
12077
+ Tg as X,
12078
12078
  It as Y,
12079
12079
  Gt as Z,
12080
12080
  Wi as _,
12081
12081
  Al as a,
12082
12082
  Rt as a0,
12083
- lf as a1,
12083
+ of as a1,
12084
12084
  Ge as a2,
12085
- Tg as a3,
12085
+ Cg as a3,
12086
12086
  lt as a4,
12087
12087
  ol as a5,
12088
12088
  Qa as a6,
12089
12089
  _r as a7,
12090
- Jf as a8,
12090
+ Yf as a8,
12091
12091
  Ea as a9,
12092
12092
  We as aa,
12093
12093
  pt as ab,
12094
12094
  On as ac,
12095
12095
  St as ad,
12096
12096
  ot as ae,
12097
- nh as af,
12098
- Cg as ag,
12097
+ sh as af,
12098
+ kg as ag,
12099
12099
  Z as ah,
12100
12100
  At as ai,
12101
- sd as aj,
12101
+ ad as aj,
12102
12102
  _e as b,
12103
12103
  Me as c,
12104
- am as d,
12104
+ rm as d,
12105
12105
  vl as e,
12106
12106
  Tl as f,
12107
- Sg as g,
12108
- Kh as h,
12109
- tg as i,
12107
+ Ag as g,
12108
+ Hh as h,
12109
+ ng as i,
12110
12110
  Ht as j,
12111
12111
  qa as k,
12112
- sg as l,
12113
- Ng as m,
12114
- cg as n,
12115
- Xf as o,
12112
+ ag as l,
12113
+ Eg as m,
12114
+ dg as n,
12115
+ Zf as o,
12116
12116
  Jn as p,
12117
- Rh as q,
12118
- hm as r,
12119
- wg as s,
12120
- dg as t,
12121
- ng as u,
12117
+ Gh as q,
12118
+ mm as r,
12119
+ Ng as s,
12120
+ ug as t,
12121
+ sg as u,
12122
12122
  ja as v,
12123
- lm as w,
12124
- yg as x,
12125
- vg as y,
12126
- um as z
12123
+ om as w,
12124
+ vg as x,
12125
+ bg as y,
12126
+ hm as z
12127
12127
  };