@chaibuilder/pages 0.4.5 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,22 @@
1
- var Is = (e) => {
1
+ var ks = (e) => {
2
2
  throw TypeError(e);
3
3
  };
4
- var ks = (e, t, n) => t.has(e) || Is("Cannot " + n);
5
- var R = (e, t, n) => (ks(e, t, "read from private field"), n ? n.call(e) : t.get(e)), se = (e, t, n) => t.has(e) ? Is("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), ee = (e, t, n, s) => (ks(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
4
+ var Ls = (e, t, n) => t.has(e) || ks("Cannot " + n);
5
+ var R = (e, t, n) => (Ls(e, t, "read from private field"), n ? n.call(e) : t.get(e)), se = (e, t, n) => t.has(e) ? ks("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), ee = (e, t, n, s) => (Ls(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
6
6
  import { jsx as r, jsxs as u, Fragment as be } from "react/jsx-runtime";
7
- import { get as te, isEmpty as me, reverse as Ua, sortBy as Ra, each as Oa, find as fe, set as Ba, has as nn, startsWith as Rt, isEqual as as, map as Fe, toLower as Dt, trim as Ma, filter as Te, startCase as It, groupBy as Fa, compact as Nn, includes as Mt, concat as Xs, endsWith as Zs, orderBy as mn, first as qa, uniq as Ha, debounce as Ka, pick as Js, keys as Va, pickBy as ja, isArray as $a, cloneDeep as za, isString as Ls } from "lodash-es";
8
- import { useAtom as Dn, atom as is } from "jotai";
7
+ import { get as te, isEmpty as me, reverse as Ra, sortBy as Oa, each as Ba, find as fe, set as Ma, has as nn, startsWith as Rt, isEqual as is, map as Fe, toLower as Dt, trim as Fa, filter as Te, startCase as It, groupBy as qa, compact as Nn, includes as Mt, concat as Zs, endsWith as Js, orderBy as mn, first as Ha, uniq as Ka, debounce as Va, pick as er, keys as ja, pickBy as $a, isArray as za, cloneDeep as Wa, isString as Ds } from "lodash-es";
8
+ import { useAtom as Dn, atom as ls } from "jotai";
9
9
  import * as ce from "react";
10
- import er, { useMemo as Y, useCallback as _e, useState as P, useEffect as we, useRef as ct, lazy as Wa } from "react";
11
- import { useQueryClient as Se, useQuery as Ne, useMutation as Ae, onlineManager as tr, QueryClient as Ya, QueryClientProvider as Qa } from "@tanstack/react-query";
10
+ import tr, { useMemo as W, useCallback as _e, useState as P, useEffect as we, useRef as ct, Suspense as Ya, lazy as Qa } from "react";
11
+ import { useQueryClient as Se, useQuery as Ne, useMutation as Ae, onlineManager as nr, QueryClient as Xa, QueryClientProvider as Za } from "@tanstack/react-query";
12
12
  import { toast as j } from "sonner";
13
- import { useLanguages as ut, useUpdateBlocksPropsRealtime as nr, PERMISSIONS as Xa, usePartailBlocksStore as Za, usePermissions as sn, useLibraryBlocks as Ja, useTheme as ei, mergeClasses as ti, useSavePage as sr, useRightPanel as ni, useBlocksStore as si, getBlocksFromHTML as ri, useTranslation as ai, useSidebarActivePanel as ii, registerChaiSidebarPanel as zn, registerChaiTopBar as li, registerChaiMediaManager as oi, registerChaiSaveToLibrary as ci, ChaiBuilderEditor as ui } from "@chaibuilder/sdk";
14
- import { Card as ls, CardHeader as os, CardTitle as cs, CardContent as us, CardFooter as ds, Button as _, AlertDialog as rr, AlertDialogTrigger as ar, AlertDialogContent as ir, AlertDialogHeader as lr, AlertDialogTitle as or, AlertDialogDescription as cr, AlertDialogFooter as ur, AlertDialogCancel as dr, AlertDialogAction as hr, Popover as mr, PopoverTrigger as fr, PopoverContent as gr, Input as ye, Label as X, Dialog as He, DialogContent as Ke, DialogHeader as Ve, DialogTitle as je, DialogDescription as Ye, Alert as pr, DialogFooter as et, DropdownMenu as rn, DropdownMenuTrigger as an, DropdownMenuContent as ln, DropdownMenuItem as De, Textarea as Gt, Select as di, SelectTrigger as hi, SelectValue as mi, SelectContent as fi, SelectItem as gi, Badge as qn, Sheet as yr, SheetContent as vr, SheetHeader as Er, SheetTitle as br, Separator as pi, TooltipProvider as wr, Tooltip as hs, SheetTrigger as yi, TooltipTrigger as ms, ScrollArea as vi, TooltipContent as fs, Skeleton as fn, DropdownMenuSeparator as Ei, CardDescription as bi, Command as wi, CommandInput as Si, CommandList as Ni, CommandEmpty as Ai, CommandGroup as xi, CommandItem as Ds, AlertDescription as Ti, Accordion as Ci, AccordionItem as gn, AccordionTrigger as pn, AccordionContent as yn, HoverCard as Pi, HoverCardTrigger as _i, HoverCardContent as Ii } from "@chaibuilder/sdk/ui";
15
- import { LockIcon as Sr, UserIcon as ki, AlertTriangleIcon as Li, Trash2 as Nr, Plus as gs, ImageIcon as Ar, X as xr, AlertCircle as Tr, StarIcon as Di, MoreHorizontal as ps, PencilIcon as Gi, Power as Cr, TrashIcon as Ui, Tag as Ri, File as on, Search as Oi, StarsIcon as Bi, Globe as Mi, Pencil as Fi, Trash as ys, SquareLibrary as Gs, Logs as qi, Loader as Pr, Languages as Hi, ChevronDown as _r, Star as Ki, History as Us, ArrowUpRight as Vi, Clock as ji, Undo2 as Ir, CloudOff as $i, Edit as zi, Save as kr, GlobeIcon as Wi, Eye as Lr, Palette as Yi, CheckCircle as Qi, Send as Rs, Rocket as Os, Settings as Xi, ExternalLink as Zi, EyeOff as Ji, Loader2 as Dr, LanguagesIcon as el, DatabaseIcon as tl, ChevronLeft as nl, ChevronRight as sl, User as rl } from "lucide-react";
16
- import { format as Gn, formatDistanceToNow as al } from "date-fns";
17
- import { useRegisteredChaiBlocks as il, getDefaultBlockProps as ll } from "@chaibuilder/runtime";
13
+ import { useLanguages as ut, useUpdateBlocksPropsRealtime as sr, PERMISSIONS as Ja, usePartailBlocksStore as ei, usePermissions as sn, useLibraryBlocks as ti, useTheme as ni, mergeClasses as si, useSavePage as rr, useRightPanel as ri, useBlocksStore as ai, getBlocksFromHTML as ii, useTranslation as li, useSidebarActivePanel as oi, registerChaiSidebarPanel as zn, registerChaiTopBar as ci, registerChaiMediaManager as ui, registerChaiSaveToLibrary as di, ChaiBuilderEditor as hi } from "@chaibuilder/sdk";
14
+ import { Card as os, CardHeader as cs, CardTitle as us, CardContent as ds, CardFooter as hs, Button as _, AlertDialog as ar, AlertDialogTrigger as ir, AlertDialogContent as lr, AlertDialogHeader as or, AlertDialogTitle as cr, AlertDialogDescription as ur, AlertDialogFooter as dr, AlertDialogCancel as hr, AlertDialogAction as mr, Popover as fr, PopoverTrigger as gr, PopoverContent as pr, Input as ye, Label as X, Dialog as He, DialogContent as Ke, DialogHeader as Ve, DialogTitle as je, DialogDescription as Ye, Alert as yr, DialogFooter as et, DropdownMenu as rn, DropdownMenuTrigger as an, DropdownMenuContent as ln, DropdownMenuItem as De, Textarea as Gt, Select as mi, SelectTrigger as fi, SelectValue as gi, SelectContent as pi, SelectItem as yi, Badge as qn, Sheet as vr, SheetContent as Er, SheetHeader as br, SheetTitle as wr, Separator as vi, TooltipProvider as Sr, Tooltip as ms, SheetTrigger as Ei, TooltipTrigger as fs, ScrollArea as bi, TooltipContent as gs, Skeleton as fn, DropdownMenuSeparator as wi, CardDescription as Si, Command as Ni, CommandInput as Ai, CommandList as xi, CommandEmpty as Ti, CommandGroup as Ci, CommandItem as Gs, AlertDescription as Pi, Accordion as _i, AccordionItem as gn, AccordionTrigger as pn, AccordionContent as yn, HoverCard as Ii, HoverCardTrigger as ki, HoverCardContent as Li } from "@chaibuilder/sdk/ui";
15
+ import { LockIcon as Nr, UserIcon as Di, AlertTriangleIcon as Gi, Trash2 as Ar, Plus as ps, ImageIcon as xr, X as Tr, AlertCircle as Cr, StarIcon as Ui, MoreHorizontal as ys, PencilIcon as Ri, Power as Pr, TrashIcon as Oi, Tag as Bi, File as on, Search as Mi, StarsIcon as Fi, Globe as qi, Pencil as Hi, Trash as vs, SquareLibrary as Us, Logs as Ki, Loader as _r, Languages as Vi, ChevronDown as Ir, Star as ji, History as Rs, ArrowUpRight as $i, Clock as zi, Undo2 as kr, CloudOff as Wi, Edit as Yi, Save as Lr, GlobeIcon as Qi, Eye as Dr, Palette as Xi, CheckCircle as Zi, Send as Os, Rocket as Bs, Settings as Ji, ExternalLink as el, EyeOff as tl, Loader2 as Gr, LanguagesIcon as nl, DatabaseIcon as sl, ChevronLeft as rl, ChevronRight as al, User as il } from "lucide-react";
16
+ import { format as Gn, formatDistanceToNow as ll } from "date-fns";
17
+ import { useRegisteredChaiBlocks as ol, getDefaultBlockProps as cl } from "@chaibuilder/runtime";
18
18
  import { z as An } from "zod";
19
- import { loadWebBlocks as ol } from "@chaibuilder/sdk/web-blocks";
19
+ import { loadWebBlocks as ul } from "@chaibuilder/sdk/web-blocks";
20
20
  const qe = {
21
21
  ab: "Abkhazian",
22
22
  aa: "Afar",
@@ -252,7 +252,7 @@ const qe = {
252
252
  DELETE_ASSET: "DELETE_ASSET",
253
253
  UPDATE_ASSET: "UPDATE_ASSET",
254
254
  GET_ASSETS: "GET_ASSETS"
255
- }, ke = "chaibuilder", vs = async (e, t, n = {}) => await fetch(e, {
255
+ }, ke = "chaibuilder", Es = async (e, t, n = {}) => await fetch(e, {
256
256
  method: "POST",
257
257
  headers: {
258
258
  "Content-Type": "application/json",
@@ -263,34 +263,34 @@ const qe = {
263
263
  if (import.meta.vitest) {
264
264
  const { it: e, expect: t } = import.meta.vitest;
265
265
  e("should fetch API", async () => {
266
- const n = await vs("/v1/api/chai", {
266
+ const n = await Es("/v1/api/chai", {
267
267
  action: "test"
268
268
  });
269
269
  t(n).toBeDefined();
270
270
  });
271
271
  }
272
- let cl = 0;
273
- function Bs(e, t) {
274
- const n = `atom${++cl}`, s = {
272
+ let dl = 0;
273
+ function Ms(e, t) {
274
+ const n = `atom${++dl}`, s = {
275
275
  toString() {
276
276
  return n;
277
277
  }
278
278
  };
279
- return typeof e == "function" ? s.read = e : (s.init = e, s.read = ul, s.write = dl), t && (s.write = t), s;
279
+ return typeof e == "function" ? s.read = e : (s.init = e, s.read = hl, s.write = ml), t && (s.write = t), s;
280
280
  }
281
- function ul(e) {
281
+ function hl(e) {
282
282
  return e(this);
283
283
  }
284
- function dl(e, t, n) {
284
+ function ml(e, t, n) {
285
285
  return t(
286
286
  this,
287
287
  typeof n == "function" ? n(e(this)) : n
288
288
  );
289
289
  }
290
- const hl = Symbol(
290
+ const fl = Symbol(
291
291
  ""
292
- ), ml = (e) => typeof (e == null ? void 0 : e.then) == "function";
293
- function fl(e = () => {
292
+ ), gl = (e) => typeof (e == null ? void 0 : e.then) == "function";
293
+ function pl(e = () => {
294
294
  try {
295
295
  return window.localStorage;
296
296
  } catch {
@@ -313,7 +313,7 @@ function fl(e = () => {
313
313
  }
314
314
  return a;
315
315
  }, y = (d = (g = e()) == null ? void 0 : g.getItem(c)) != null ? d : null;
316
- return ml(y) ? y.then(w) : w(y);
316
+ return gl(y) ? y.then(w) : w(y);
317
317
  },
318
318
  setItem: (c, h) => {
319
319
  var g;
@@ -352,25 +352,25 @@ function fl(e = () => {
352
352
  };
353
353
  }), o && (i.subscribe = l(o)), i;
354
354
  }
355
- const gl = fl();
356
- function pl(e, t, n = gl, s) {
357
- const a = Bs(
355
+ const yl = pl();
356
+ function vl(e, t, n = yl, s) {
357
+ const a = Ms(
358
358
  t
359
359
  );
360
360
  return a.onMount = (l) => {
361
361
  l(n.getItem(e, t));
362
362
  let o;
363
363
  return n.subscribe && (o = n.subscribe(e, l, t)), o;
364
- }, Bs(
364
+ }, Ms(
365
365
  (l) => l(a),
366
366
  (l, o, c) => {
367
367
  const h = typeof c == "function" ? c(l(a)) : c;
368
- return h === hl ? (o(a, t), n.removeItem(e)) : h instanceof Promise ? h.then((g) => (o(a, g), n.setItem(e, g))) : (o(a, h), n.setItem(e, h));
368
+ return h === fl ? (o(a, t), n.removeItem(e)) : h instanceof Promise ? h.then((g) => (o(a, g), n.setItem(e, g))) : (o(a, h), n.setItem(e, h));
369
369
  }
370
370
  );
371
371
  }
372
- const yl = pl("__chai_user", null), st = () => {
373
- const [e, t] = Dn(yl);
372
+ const El = vl("__chai_user", null), st = () => {
373
+ const [e, t] = Dn(El);
374
374
  return {
375
375
  isLoggedIn: !!e,
376
376
  user: e,
@@ -379,7 +379,7 @@ const yl = pl("__chai_user", null), st = () => {
379
379
  t(null);
380
380
  }
381
381
  };
382
- }, vl = () => {
382
+ }, bl = () => {
383
383
  const { user: e, setUser: t, logout: n } = st(), s = Un(), a = Se();
384
384
  return Ne({
385
385
  queryKey: ["refresh_token"],
@@ -410,8 +410,8 @@ const yl = pl("__chai_user", null), st = () => {
410
410
  retry: !1,
411
411
  enabled: !1
412
412
  });
413
- }, ju = () => {
414
- const { user: e } = st(), t = dt("onSessionExpired"), n = Y(
413
+ }, Wu = () => {
414
+ const { user: e } = st(), t = dt("onSessionExpired"), n = W(
415
415
  () => e == null ? void 0 : e.accessToken,
416
416
  [e == null ? void 0 : e.accessToken]
417
417
  );
@@ -443,15 +443,15 @@ const yl = pl("__chai_user", null), st = () => {
443
443
  [n, t]
444
444
  );
445
445
  }, $ = () => {
446
- const { user: e } = st(), t = Y(
446
+ const { user: e } = st(), t = W(
447
447
  () => e == null ? void 0 : e.accessToken,
448
448
  [e == null ? void 0 : e.accessToken]
449
- ), { refetch: n } = vl();
449
+ ), { refetch: n } = bl();
450
450
  return _e(
451
451
  async (s, a, i = {}) => {
452
452
  if (t)
453
453
  try {
454
- const l = te(a, "action", "").toLowerCase(), o = await vs(
454
+ const l = te(a, "action", "").toLowerCase(), o = await Es(
455
455
  s + (l ? `?action=${l}` : ""),
456
456
  a,
457
457
  {
@@ -468,7 +468,7 @@ const yl = pl("__chai_user", null), st = () => {
468
468
  },
469
469
  [t, n]
470
470
  );
471
- }, Gr = () => {
471
+ }, Ur = () => {
472
472
  const e = Q(), t = Se(), n = $();
473
473
  return Ae({
474
474
  mutationFn: async (s) => n(e, { action: I.RELEASE_LOCK, data: s }),
@@ -478,7 +478,7 @@ const yl = pl("__chai_user", null), st = () => {
478
478
  });
479
479
  }
480
480
  });
481
- }, Ur = () => {
481
+ }, Rr = () => {
482
482
  const e = Q(), t = Se(), n = $();
483
483
  return Ae({
484
484
  mutationFn: async (s) => n(e, {
@@ -497,7 +497,7 @@ const yl = pl("__chai_user", null), st = () => {
497
497
  });
498
498
  }
499
499
  });
500
- }, El = () => {
500
+ }, wl = () => {
501
501
  const e = Q(), t = Se(), n = $();
502
502
  return Ae({
503
503
  mutationFn: async (s) => n(e, { action: I.UPDATE_WEBSITE_DATA, data: s }),
@@ -526,13 +526,13 @@ function Ue() {
526
526
  };
527
527
  }, []), [e, t];
528
528
  }
529
- const bl = is({}), Rr = () => Dn(bl), wl = () => {
530
- const [e] = Ue(), t = e.get("page"), n = ct(""), { mutate: s } = Gr();
529
+ const Sl = ls({}), Or = () => Dn(Sl), Nl = () => {
530
+ const [e] = Ue(), t = e.get("page"), n = ct(""), { mutate: s } = Ur();
531
531
  we(() => {
532
532
  !me(n.current) && t !== n.current && s({ id: n.current }), n.current = t;
533
533
  }, [t, s, n]);
534
534
  }, dt = (e, t) => {
535
- const [n] = Rr();
535
+ const [n] = Or();
536
536
  return te(n, e, t);
537
537
  }, Q = () => dt("apiUrl", "/chai/api"), Un = () => dt("usersApiUrl", "/chai/users"), cn = () => {
538
538
  const e = Q(), [t] = Ue(), n = t.get("page"), s = $();
@@ -545,7 +545,7 @@ const bl = is({}), Rr = () => Dn(bl), wl = () => {
545
545
  action: I.GET_LANGUAGE_PAGES,
546
546
  data: { id: n }
547
547
  });
548
- return Ua(Ra(a, "primaryPage"));
548
+ return Ra(Oa(a, "primaryPage"));
549
549
  },
550
550
  enabled: !!n
551
551
  });
@@ -563,16 +563,16 @@ const bl = is({}), Rr = () => Dn(bl), wl = () => {
563
563
  data: { draft: !0 }
564
564
  })
565
565
  });
566
- }, Or = (e) => {
567
- const { fallbackLang: t } = ut(), { data: n } = un(), { data: s, isFetching: a } = cn(), i = Y(() => {
566
+ }, Br = (e) => {
567
+ const { fallbackLang: t } = ut(), { data: n } = un(), { data: s, isFetching: a } = cn(), i = W(() => {
568
568
  const l = { [t]: !0 };
569
- return Oa(te(n, "languages"), (o) => {
569
+ return Ba(te(n, "languages"), (o) => {
570
570
  const c = fe(s, { lang: o });
571
571
  l[o] = !!c;
572
572
  }), l;
573
573
  }, [t, s, n]);
574
574
  return a || me(e) || e && i[e];
575
- }, Es = () => {
575
+ }, bs = () => {
576
576
  const e = Se(), { data: t } = Ne({
577
577
  queryKey: ["chaibuilder", I.AI_CONTEXT],
578
578
  initialData: "",
@@ -591,9 +591,9 @@ const bl = is({}), Rr = () => Dn(bl), wl = () => {
591
591
  staleTime: 1e3 * 60 * 5,
592
592
  queryFn: async () => e(t, { action: I.GET_WEBSITE_PAGES }) || []
593
593
  });
594
- }, Sl = is({ lastSaved: void 0 }), bs = () => Dn(Sl), Re = () => {
594
+ }, Al = ls({ lastSaved: void 0 }), ws = () => Dn(Al), Re = () => {
595
595
  const [e] = Ue(), t = e.get("page"), { data: n, isFetching: s } = Rn();
596
- return { data: Y(
596
+ return { data: W(
597
597
  () => fe(n, { id: t }) || {},
598
598
  [n, t]
599
599
  ), isFetching: s };
@@ -607,15 +607,15 @@ const bl = is({}), Rr = () => Dn(bl), wl = () => {
607
607
  }),
608
608
  enabled: !!e && e !== "EXPIRED"
609
609
  });
610
- }, Nl = is(void 0), hn = () => {
611
- const [e] = Ue(), t = e.get("page"), { user: n } = st(), [s, a] = Dn(Nl);
612
- return Y(() => ({
610
+ }, xl = ls(void 0), hn = () => {
611
+ const [e] = Ue(), t = e.get("page"), { user: n } = st(), [s, a] = Dn(xl);
612
+ return W(() => ({
613
613
  isLocked: t && (n == null ? void 0 : n.id) !== s,
614
614
  currentEditor: s,
615
615
  setCurrentEditor: (i) => a(i)
616
616
  }), [n == null ? void 0 : n.id, s, t, a]);
617
- }, Br = () => {
618
- const [e] = Ue(), t = e.get("page"), n = Q(), { setAiContext: s } = Es(), { setCurrentEditor: a } = hn(), [, i] = bs(), l = $();
617
+ }, Mr = () => {
618
+ const [e] = Ue(), t = e.get("page"), n = Q(), { setAiContext: s } = bs(), { setCurrentEditor: a } = hn(), [, i] = ws(), l = $();
619
619
  return Ne({
620
620
  queryKey: [ke, I.GET_DRAFT_PAGE, t],
621
621
  staleTime: 1 / 0,
@@ -632,7 +632,7 @@ const bl = is({}), Rr = () => Dn(bl), wl = () => {
632
632
  },
633
633
  enabled: !!t
634
634
  });
635
- }, Mr = ({
635
+ }, Fr = ({
636
636
  pageType: e,
637
637
  lang: t
638
638
  }) => {
@@ -647,7 +647,7 @@ const bl = is({}), Rr = () => Dn(bl), wl = () => {
647
647
  enabled: !!e && !!t
648
648
  });
649
649
  };
650
- function Al({
650
+ function Tl({
651
651
  avatar: e,
652
652
  name: t,
653
653
  email: n,
@@ -655,12 +655,12 @@ function Al({
655
655
  currentEditor: a
656
656
  }) {
657
657
  const [i, l] = P(!1);
658
- return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(ls, { className: "w-full max-w-md mx-auto", children: [
659
- /* @__PURE__ */ r(os, { className: "space-y-1", children: /* @__PURE__ */ u(cs, { className: "flex items-center gap-2 text-2xl", children: [
660
- /* @__PURE__ */ r(Sr, { className: "w-6 h-6 text-yellow-500" }),
658
+ return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(os, { className: "w-full max-w-md mx-auto", children: [
659
+ /* @__PURE__ */ r(cs, { className: "space-y-1", children: /* @__PURE__ */ u(us, { className: "flex items-center gap-2 text-2xl", children: [
660
+ /* @__PURE__ */ r(Nr, { className: "w-6 h-6 text-yellow-500" }),
661
661
  a === "EXPIRED" ? "Editing access timed out" : "Page locked for editing"
662
662
  ] }) }),
663
- /* @__PURE__ */ r(us, { className: "grid gap-4", children: a === "EXPIRED" ? /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("p", { children: "Your editing access has been paused due to inactivity. Please refresh the page to continue" }) }) : /* @__PURE__ */ u("div", { children: [
663
+ /* @__PURE__ */ r(ds, { className: "grid gap-4", children: a === "EXPIRED" ? /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("p", { children: "Your editing access has been paused due to inactivity. Please refresh the page to continue" }) }) : /* @__PURE__ */ u("div", { children: [
664
664
  /* @__PURE__ */ u("div", { className: "flex items-center space-x-4", children: [
665
665
  e ? /* @__PURE__ */ r(
666
666
  "img",
@@ -669,7 +669,7 @@ function Al({
669
669
  alt: t,
670
670
  className: "w-12 h-12 border border-gray-300 rounded-full"
671
671
  }
672
- ) : /* @__PURE__ */ r(ki, { className: "w-12 h-12 p-2 border border-gray-300 rounded-full" }),
672
+ ) : /* @__PURE__ */ r(Di, { className: "w-12 h-12 p-2 border border-gray-300 rounded-full" }),
673
673
  /* @__PURE__ */ u("div", { className: "space-y-1", children: [
674
674
  /* @__PURE__ */ r("h3", { className: "font-semibold", children: t }),
675
675
  n && /* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground", children: n })
@@ -677,7 +677,7 @@ function Al({
677
677
  ] }),
678
678
  /* @__PURE__ */ r("div", { className: "text-sm mt-4", children: /* @__PURE__ */ r("p", { children: "This user is currently editing the page. You cannot make changes." }) })
679
679
  ] }) }),
680
- /* @__PURE__ */ r(ds, { children: a === "EXPIRED" ? /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
680
+ /* @__PURE__ */ r(hs, { children: a === "EXPIRED" ? /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
681
681
  _,
682
682
  {
683
683
  className: "w-full",
@@ -685,17 +685,17 @@ function Al({
685
685
  variant: "destructive",
686
686
  children: "Refresh"
687
687
  }
688
- ) }) : /* @__PURE__ */ u(rr, { open: i, onOpenChange: l, children: [
689
- /* @__PURE__ */ r(ar, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex flex-col items-center", children: [
688
+ ) }) : /* @__PURE__ */ u(ar, { open: i, onOpenChange: l, children: [
689
+ /* @__PURE__ */ r(ir, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex flex-col items-center", children: [
690
690
  /* @__PURE__ */ r(_, { className: "w-full", variant: "destructive", children: "Take Over" }),
691
691
  /* @__PURE__ */ r("p", { className: "mt-2 text-xs text-muted-foreground", children: "If you need to edit, you can take over the lock, but be aware that the other user might lose unsaved changes." })
692
692
  ] }) }),
693
- /* @__PURE__ */ u(ir, { className: "z-[99]", children: [
694
- /* @__PURE__ */ u(lr, { children: [
695
- /* @__PURE__ */ r(or, { children: "Are you sure you want to take over?" }),
696
- /* @__PURE__ */ u(cr, { children: [
693
+ /* @__PURE__ */ u(lr, { className: "z-[99]", children: [
694
+ /* @__PURE__ */ u(or, { children: [
695
+ /* @__PURE__ */ r(cr, { children: "Are you sure you want to take over?" }),
696
+ /* @__PURE__ */ u(ur, { children: [
697
697
  /* @__PURE__ */ u("span", { className: "flex items-center space-x-2 text-yellow-500", children: [
698
- /* @__PURE__ */ r(Li, { className: "w-5 h-5" }),
698
+ /* @__PURE__ */ r(Gi, { className: "w-5 h-5" }),
699
699
  /* @__PURE__ */ r("span", { children: "This action might cause the other user to lose unsaved changes." })
700
700
  ] }),
701
701
  /* @__PURE__ */ r("br", {}),
@@ -706,9 +706,9 @@ function Al({
706
706
  ] })
707
707
  ] })
708
708
  ] }),
709
- /* @__PURE__ */ u(ur, { children: [
710
- /* @__PURE__ */ r(dr, { children: "Cancel" }),
711
- /* @__PURE__ */ r(hr, { onClick: () => {
709
+ /* @__PURE__ */ u(dr, { children: [
710
+ /* @__PURE__ */ r(hr, { children: "Cancel" }),
711
+ /* @__PURE__ */ r(mr, { onClick: () => {
712
712
  l(!1), s();
713
713
  }, children: "Yes, Take Over" })
714
714
  ] })
@@ -716,12 +716,12 @@ function Al({
716
716
  ] }) })
717
717
  ] }) });
718
718
  }
719
- const xl = () => {
720
- const { isLocked: e, currentEditor: t } = hn(), { data: n } = dn(t), [s] = Ue(), a = s.get("page"), { mutate: i } = Gr(), { isFetching: l } = Br(), o = _e(() => {
719
+ const Cl = () => {
720
+ const { isLocked: e, currentEditor: t } = hn(), { data: n } = dn(t), [s] = Ue(), a = s.get("page"), { mutate: i } = Ur(), { isFetching: l } = Mr(), o = _e(() => {
721
721
  i({ id: a });
722
722
  }, [a, i]);
723
723
  return !e || l ? /* @__PURE__ */ r("div", { className: "" }) : /* @__PURE__ */ r(
724
- Al,
724
+ Tl,
725
725
  {
726
726
  ...n,
727
727
  name: (n == null ? void 0 : n.name) || "Unknown User",
@@ -730,8 +730,8 @@ const xl = () => {
730
730
  onTakeOver: o
731
731
  }
732
732
  );
733
- }, Tl = () => {
734
- const [e, t] = Ue(), n = e.get("lang"), s = Or(n), { setSelectedLang: a } = ut(), i = () => {
733
+ }, Pl = () => {
734
+ const [e, t] = Ue(), n = e.get("lang"), s = Br(n), { setSelectedLang: a } = ut(), i = () => {
735
735
  const o = new URLSearchParams(window.location.search);
736
736
  o.delete("lang");
737
737
  const c = o.toString(), h = `${window.location.pathname}${c ? `?${c}` : ""}`;
@@ -739,21 +739,21 @@ const xl = () => {
739
739
  };
740
740
  if (s) return null;
741
741
  const l = te(qe, n);
742
- return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(ls, { className: "w-full max-w-md mx-auto", children: [
743
- /* @__PURE__ */ r(os, { className: "space-y-1", children: /* @__PURE__ */ u(cs, { className: "flex items-center gap-2 text-2xl", children: [
744
- /* @__PURE__ */ r(Sr, { className: "w-6 h-6 text-yellow-500" }),
742
+ return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(os, { className: "w-full max-w-md mx-auto", children: [
743
+ /* @__PURE__ */ r(cs, { className: "space-y-1", children: /* @__PURE__ */ u(us, { className: "flex items-center gap-2 text-2xl", children: [
744
+ /* @__PURE__ */ r(Nr, { className: "w-6 h-6 text-yellow-500" }),
745
745
  'Page missing for "',
746
746
  l,
747
747
  '" language.'
748
748
  ] }) }),
749
- /* @__PURE__ */ r(us, { className: "grid gap-4", children: /* @__PURE__ */ u("div", { children: [
749
+ /* @__PURE__ */ r(ds, { className: "grid gap-4", children: /* @__PURE__ */ u("div", { children: [
750
750
  'Page is not available in the "',
751
751
  l,
752
752
  '" language. Either create the page in the "',
753
753
  l,
754
754
  '" language or switch to the base language.'
755
755
  ] }) }),
756
- /* @__PURE__ */ r(ds, { children: /* @__PURE__ */ r(
756
+ /* @__PURE__ */ r(hs, { children: /* @__PURE__ */ r(
757
757
  _,
758
758
  {
759
759
  onClick: i,
@@ -763,7 +763,7 @@ const xl = () => {
763
763
  }
764
764
  ) })
765
765
  ] }) });
766
- }, Cl = (e) => {
766
+ }, _l = (e) => {
767
767
  const t = Q(), n = $();
768
768
  return Ae({
769
769
  mutationFn: async (s) => n(t, {
@@ -779,7 +779,7 @@ const xl = () => {
779
779
  });
780
780
  }
781
781
  });
782
- }, Pl = (e) => {
782
+ }, Il = (e) => {
783
783
  const t = Q(), n = $();
784
784
  return Ne({
785
785
  queryKey: [ke, "uiBlockDetails", e],
@@ -800,7 +800,7 @@ const xl = () => {
800
800
  },
801
801
  retry: !1
802
802
  });
803
- }, _l = (e) => {
803
+ }, kl = (e) => {
804
804
  const t = Q(), n = $();
805
805
  return Ae({
806
806
  mutationFn: async (s) => n(t, {
@@ -816,7 +816,7 @@ const xl = () => {
816
816
  });
817
817
  }
818
818
  });
819
- }, Il = ({
819
+ }, Ll = ({
820
820
  blockId: e,
821
821
  libBlockId: t,
822
822
  isOpen: n,
@@ -824,11 +824,11 @@ const xl = () => {
824
824
  blockName: a,
825
825
  trigger: i
826
826
  }) => {
827
- const [l, o] = P(!1), c = nr(), h = _l(() => {
827
+ const [l, o] = P(!1), c = sr(), h = kl(() => {
828
828
  c([e], { _libBlockId: void 0 }), j.success("Block deleted successfully"), o(!1), s();
829
829
  });
830
- return /* @__PURE__ */ u(mr, { open: n, onOpenChange: (w) => !w && s(), children: [
831
- /* @__PURE__ */ r(fr, { asChild: !0, children: i || /* @__PURE__ */ u(
830
+ return /* @__PURE__ */ u(fr, { open: n, onOpenChange: (w) => !w && s(), children: [
831
+ /* @__PURE__ */ r(gr, { asChild: !0, children: i || /* @__PURE__ */ u(
832
832
  _,
833
833
  {
834
834
  type: "button",
@@ -837,13 +837,13 @@ const xl = () => {
837
837
  onClick: (w) => w.preventDefault(),
838
838
  disabled: l,
839
839
  children: [
840
- /* @__PURE__ */ r(Nr, { className: "h-4 w-4 mr-2" }),
840
+ /* @__PURE__ */ r(Ar, { className: "h-4 w-4 mr-2" }),
841
841
  "Delete"
842
842
  ]
843
843
  }
844
844
  ) }),
845
845
  /* @__PURE__ */ r(
846
- gr,
846
+ pr,
847
847
  {
848
848
  className: "w-72 p-4 z-[9999]",
849
849
  sideOffset: 5,
@@ -890,7 +890,7 @@ const xl = () => {
890
890
  }
891
891
  )
892
892
  ] });
893
- }, kl = ({
893
+ }, Dl = ({
894
894
  blockId: e,
895
895
  libBlockId: t,
896
896
  blockName: n,
@@ -900,7 +900,7 @@ const xl = () => {
900
900
  }) => {
901
901
  const [l, o] = P(!1);
902
902
  return /* @__PURE__ */ r(
903
- Il,
903
+ Ll,
904
904
  {
905
905
  blockId: e,
906
906
  libBlockId: t,
@@ -918,14 +918,14 @@ const xl = () => {
918
918
  className: a,
919
919
  onClick: () => o(!0),
920
920
  children: [
921
- /* @__PURE__ */ r(Nr, { className: "h-4 w-4 mr-2" }),
921
+ /* @__PURE__ */ r(Ar, { className: "h-4 w-4 mr-2" }),
922
922
  "Delete"
923
923
  ]
924
924
  }
925
925
  )
926
926
  }
927
927
  );
928
- }, Ll = () => {
928
+ }, Gl = () => {
929
929
  const e = Q(), t = $(), n = Se(), {
930
930
  data: s = [],
931
931
  isLoading: a,
@@ -967,8 +967,8 @@ const xl = () => {
967
967
  createGroup: l,
968
968
  isCreating: o
969
969
  };
970
- }, Dl = ({ value: e, onChange: t }) => {
971
- const [n, s] = P(!1), [a, i] = P(""), l = ct(null), { groups: o } = Ll(), [c, h] = P([
970
+ }, Ul = ({ value: e, onChange: t }) => {
971
+ const [n, s] = P(!1), [a, i] = P(""), l = ct(null), { groups: o } = Gl(), [c, h] = P([
972
972
  { id: "hero", name: "Hero" },
973
973
  { id: "feature", name: "Feature" },
974
974
  { id: "footer", name: "Footer" },
@@ -996,7 +996,7 @@ const xl = () => {
996
996
  { id: "stats", name: "Stats" },
997
997
  { id: "team", name: "Team" },
998
998
  { id: "timeline", name: "Timeline" }
999
- ]), g = Y(
999
+ ]), g = W(
1000
1000
  () => [
1001
1001
  ...o,
1002
1002
  ...c.filter(
@@ -1066,17 +1066,17 @@ const xl = () => {
1066
1066
  size: "icon",
1067
1067
  variant: "outline",
1068
1068
  onClick: () => s(!0),
1069
- children: /* @__PURE__ */ r(gs, { className: "h-4 w-4" })
1069
+ children: /* @__PURE__ */ r(ps, { className: "h-4 w-4" })
1070
1070
  }
1071
1071
  )
1072
1072
  ] });
1073
- }, Gl = 1 * 1024 * 1024, Ul = ({ value: e, onChange: t }) => {
1073
+ }, Rl = 1 * 1024 * 1024, Ol = ({ value: e, onChange: t }) => {
1074
1074
  const [n, s] = P(!1), a = ct(null), i = _e(
1075
1075
  (c) => {
1076
1076
  var g;
1077
1077
  const h = (g = c.target.files) == null ? void 0 : g[0];
1078
1078
  if (h) {
1079
- if (h.size > Gl) {
1079
+ if (h.size > Rl) {
1080
1080
  j.error("File too large", {
1081
1081
  description: `Maximum file size is 1mb. Selected file is ${(h.size / 1024 / 1024).toFixed(2)}MB.`
1082
1082
  }), a.current && (a.current.value = "");
@@ -1124,7 +1124,7 @@ const xl = () => {
1124
1124
  /* @__PURE__ */ r("div", { className: "animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" }),
1125
1125
  "Uploading..."
1126
1126
  ] }) : /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
1127
- /* @__PURE__ */ r(Ar, { className: "h-4 w-4" }),
1127
+ /* @__PURE__ */ r(xr, { className: "h-4 w-4" }),
1128
1128
  "Select image"
1129
1129
  ] })
1130
1130
  }
@@ -1138,7 +1138,7 @@ const xl = () => {
1138
1138
  onClick: () => {
1139
1139
  t(""), a.current && (a.current.value = "");
1140
1140
  },
1141
- children: /* @__PURE__ */ r(xr, { className: "h-4 w-4" })
1141
+ children: /* @__PURE__ */ r(Tr, { className: "h-4 w-4" })
1142
1142
  }
1143
1143
  )
1144
1144
  ] }),
@@ -1152,7 +1152,7 @@ const xl = () => {
1152
1152
  ) })
1153
1153
  ] });
1154
1154
  }, ue = {
1155
- ...Xa,
1155
+ ...Ja,
1156
1156
  //pages
1157
1157
  ADD_PAGE: "add_page",
1158
1158
  EDIT_PAGE: "edit_page",
@@ -1187,25 +1187,25 @@ const xl = () => {
1187
1187
  ADD_MEDIA: "add_media",
1188
1188
  EDIT_MEDIA: "edit_media",
1189
1189
  DELETE_MEDIA: "delete_media"
1190
- }, Rl = (e) => {
1191
- const { blocks: t, close: n, blockId: s } = e, { getPartailBlocks: a } = Za(), i = t.find((N) => N._id === s), l = i == null ? void 0 : i._libBlockId, o = !!l, c = Y(() => t.some(
1190
+ }, Bl = (e) => {
1191
+ const { blocks: t, close: n, blockId: s } = e, { getPartailBlocks: a } = ei(), i = t.find((N) => N._id === s), l = i == null ? void 0 : i._libBlockId, o = !!l, c = W(() => t.some(
1192
1192
  (N) => N._type === "PartialBlock" || N._type === "GlobalBlock"
1193
- ), [t]), h = Y(() => {
1193
+ ), [t]), h = W(() => {
1194
1194
  let N = [];
1195
1195
  for (const C of t)
1196
1196
  if (C._type === "PartialBlock" || C._type === "GlobalBlock") {
1197
1197
  const D = a(C.partialBlockId);
1198
- Ba(D, "0._parent", C._parent), N = [...N, ...D];
1198
+ Ma(D, "0._parent", C._parent), N = [...N, ...D];
1199
1199
  } else
1200
1200
  N.push(C);
1201
1201
  return N;
1202
- }, [t, a]), [g, d] = P(""), [w, y] = P(""), [p, S] = P(""), [v, x] = P(""), [G, E] = P({}), [b, T] = P(!1), [U, J] = P(o), [ie, k] = P(!1), { hasPermission: q } = sn(), A = q(ue.DELETE_LIBRARY_BLOCK), M = nr(), ne = () => {
1202
+ }, [t, a]), [g, d] = P(""), [w, y] = P(""), [p, S] = P(""), [v, x] = P(""), [G, E] = P({}), [b, T] = P(!1), [U, J] = P(o), [ie, k] = P(!1), { hasPermission: q } = sn(), A = q(ue.DELETE_LIBRARY_BLOCK), M = sr(), ne = () => {
1203
1203
  M([s], { _libBlockId: void 0 }), j.success("Block delinked from library"), n();
1204
1204
  }, {
1205
1205
  data: he,
1206
1206
  isLoading: z,
1207
1207
  isError: de
1208
- } = Pl(l);
1208
+ } = Il(l);
1209
1209
  we(() => {
1210
1210
  de && o && (k(!0), J(!1));
1211
1211
  }, [de, o]), we(() => {
@@ -1217,7 +1217,7 @@ const xl = () => {
1217
1217
  const F = () => {
1218
1218
  const N = {};
1219
1219
  return g.trim() ? g.length < 2 && (N.name = "Name must be at least 2 characters") : N.name = "Name is required", w || (N.group = "Group is required"), E(N), Object.keys(N).length === 0 && !c;
1220
- }, { resetLibrary: Ee } = Ja({ id: "" }), Qe = Cl(
1220
+ }, { resetLibrary: Ee } = ti({ id: "" }), Qe = _l(
1221
1221
  (N) => {
1222
1222
  o || M([s], { _libBlockId: N.id }), j.success(`Block ${o ? "updated" : "saved"} successfully`), Ee(N.library), n();
1223
1223
  }
@@ -1244,7 +1244,7 @@ const xl = () => {
1244
1244
  ] })
1245
1245
  ] }) : /* @__PURE__ */ u("div", { children: [
1246
1246
  c && /* @__PURE__ */ u("div", { className: "mb-4 p-3 border border-destructive/50 bg-destructive/10 text-destructive rounded-md flex items-start gap-2", children: [
1247
- /* @__PURE__ */ r(Tr, { className: "h-5 w-5 flex-shrink-0 mt-0.5" }),
1247
+ /* @__PURE__ */ r(Cr, { className: "h-5 w-5 flex-shrink-0 mt-0.5" }),
1248
1248
  /* @__PURE__ */ u("div", { children: [
1249
1249
  /* @__PURE__ */ r("p", { className: "font-medium", children: "Partial Blocks Detected" }),
1250
1250
  /* @__PURE__ */ r("p", { className: "text-xs mt-1", children: "This block contains one or more Partial Blocks. Partial blocks will be merged into the library block" })
@@ -1281,7 +1281,7 @@ const xl = () => {
1281
1281
  children: "Group"
1282
1282
  }
1283
1283
  ),
1284
- /* @__PURE__ */ r(Dl, { value: w, onChange: y }),
1284
+ /* @__PURE__ */ r(Ul, { value: w, onChange: y }),
1285
1285
  G.group && /* @__PURE__ */ r("p", { className: "text-xs text-destructive", children: G.group })
1286
1286
  ] }),
1287
1287
  /* @__PURE__ */ u("div", { className: "space-y-2", children: [
@@ -1299,12 +1299,12 @@ const xl = () => {
1299
1299
  ] }),
1300
1300
  /* @__PURE__ */ u("div", { className: "space-y-2", children: [
1301
1301
  /* @__PURE__ */ r(X, { htmlFor: "previewImage", children: "Preview Image (optional)" }),
1302
- /* @__PURE__ */ r(Ul, { value: v, onChange: x }),
1302
+ /* @__PURE__ */ r(Ol, { value: v, onChange: x }),
1303
1303
  /* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground", children: "max 1mb" })
1304
1304
  ] }),
1305
1305
  /* @__PURE__ */ u("div", { className: "flex justify-end gap-2 pt-2", children: [
1306
1306
  o && A && /* @__PURE__ */ r(
1307
- kl,
1307
+ Dl,
1308
1308
  {
1309
1309
  blockId: s,
1310
1310
  libBlockId: l,
@@ -1376,7 +1376,7 @@ const xl = () => {
1376
1376
  GLOBAL_BLOCK_PUBLISH_SUCCESS: "Global block published successfully.",
1377
1377
  PAGES_PUBLISH_SUCCESS: "Your changes have been published successfully.",
1378
1378
  SLUG_CHANGE_SUCCESS: "Slug changed successfully."
1379
- }, Ol = {
1379
+ }, Ml = {
1380
1380
  SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
1381
1381
  }, Ie = () => {
1382
1382
  const e = Q(), t = $();
@@ -1385,13 +1385,13 @@ const xl = () => {
1385
1385
  initialData: [],
1386
1386
  queryFn: async () => t(e, { action: I.GET_PAGE_TYPES })
1387
1387
  });
1388
- }, Bl = (e) => {
1388
+ }, Fl = (e) => {
1389
1389
  const { data: t } = Ie();
1390
- return Y(
1390
+ return W(
1391
1391
  () => t == null ? void 0 : t.find((n) => n.key === e),
1392
1392
  [t, e]
1393
1393
  );
1394
- }, Ml = () => {
1394
+ }, ql = () => {
1395
1395
  const e = Q(), t = $();
1396
1396
  return Ae({
1397
1397
  mutationFn: async ({ pageType: n, query: s }) => {
@@ -1408,7 +1408,7 @@ const xl = () => {
1408
1408
  }
1409
1409
  }
1410
1410
  });
1411
- }, Fr = () => {
1411
+ }, qr = () => {
1412
1412
  const e = Q(), t = Se(), n = $(), { data: s } = Ie();
1413
1413
  return Ae({
1414
1414
  mutationFn: async (a) => (a.template && console.log("Creating page from template:", a.template), n(e, { action: I.CREATE_PAGE, data: a })),
@@ -1427,12 +1427,12 @@ const xl = () => {
1427
1427
  j.error(
1428
1428
  `Failed to add new ${l != null && l.hasSlug ? "page" : l.name}.`,
1429
1429
  {
1430
- description: te(Ol, a.message, a.message)
1430
+ description: te(Ml, a.message, a.message)
1431
1431
  }
1432
1432
  );
1433
1433
  }
1434
1434
  });
1435
- }, ws = () => {
1435
+ }, Ss = () => {
1436
1436
  const e = Q(), t = Se(), n = $(), { data: s } = Ie();
1437
1437
  return Ae({
1438
1438
  mutationFn: async (a) => await n(e, {
@@ -1456,7 +1456,7 @@ const xl = () => {
1456
1456
  );
1457
1457
  }
1458
1458
  });
1459
- }, Fl = () => {
1459
+ }, Hl = () => {
1460
1460
  const e = Q(), t = Se(), n = $(), { data: s } = Ie();
1461
1461
  return Ae({
1462
1462
  mutationFn: async (a) => n(e, {
@@ -1486,7 +1486,7 @@ const xl = () => {
1486
1486
  );
1487
1487
  }
1488
1488
  });
1489
- }, ql = () => {
1489
+ }, Kl = () => {
1490
1490
  const e = Q(), t = Se(), n = $(), { data: s } = Ie();
1491
1491
  return Ae({
1492
1492
  mutationFn: async (a) => n(e, {
@@ -1514,7 +1514,7 @@ const xl = () => {
1514
1514
  );
1515
1515
  }
1516
1516
  });
1517
- }, Ss = () => {
1517
+ }, Ns = () => {
1518
1518
  const e = Q(), t = $(), n = Se(), { data: s } = Re();
1519
1519
  return Ae({
1520
1520
  mutationFn: async ({ ids: a }) => t(e, {
@@ -1530,7 +1530,7 @@ const xl = () => {
1530
1530
  j.error("Failed to publish pages.");
1531
1531
  }
1532
1532
  });
1533
- }, Hl = () => {
1533
+ }, Vl = () => {
1534
1534
  const e = Q(), t = $(), n = Se();
1535
1535
  return Ae({
1536
1536
  mutationFn: async (s) => {
@@ -1553,7 +1553,7 @@ const xl = () => {
1553
1553
  j.error("Failed to mark page as template.");
1554
1554
  }
1555
1555
  });
1556
- }, Kl = () => {
1556
+ }, jl = () => {
1557
1557
  const e = Q(), t = $(), n = Se();
1558
1558
  return Ae({
1559
1559
  mutationFn: async (s) => t(e, {
@@ -1567,7 +1567,7 @@ const xl = () => {
1567
1567
  j.error("Failed to unmark page as template.");
1568
1568
  }
1569
1569
  });
1570
- }, Vl = () => {
1570
+ }, $l = () => {
1571
1571
  const e = Q(), t = $(), n = Se();
1572
1572
  return Ae({
1573
1573
  mutationFn: async ({ id: s, slug: a }) => t(e, {
@@ -1586,7 +1586,7 @@ const xl = () => {
1586
1586
  }
1587
1587
  });
1588
1588
  };
1589
- var Ns = {};
1589
+ var As = {};
1590
1590
  (function e(t, n, s, a) {
1591
1591
  var i = !!(t.Worker && t.Blob && t.Promise && t.OffscreenCanvas && t.OffscreenCanvasRenderingContext2D && t.HTMLCanvasElement && t.HTMLCanvasElement.prototype.transferControlToOffscreen && t.URL && t.URL.createObjectURL), l = typeof Path2D == "function" && typeof DOMMatrix == "function", o = function() {
1592
1592
  if (!t.OffscreenCanvas)
@@ -1832,8 +1832,8 @@ var Ns = {};
1832
1832
  } else if (m.shape === "circle")
1833
1833
  f.ellipse ? f.ellipse(m.x, m.y, Math.abs(H - C) * m.ovalScalar, Math.abs(K - D) * m.ovalScalar, Math.PI / 10 * m.wobble, 0, 2 * Math.PI) : q(f, m.x, m.y, Math.abs(H - C) * m.ovalScalar, Math.abs(K - D) * m.ovalScalar, Math.PI / 10 * m.wobble, 0, 2 * Math.PI);
1834
1834
  else if (m.shape === "star")
1835
- for (var W = Math.PI / 2 * 3, Le = 4 * m.scalar, Be = 8 * m.scalar, Me = m.x, Xe = m.y, rt = 5, $e = Math.PI / rt; rt--; )
1836
- Me = m.x + Math.cos(W) * Be, Xe = m.y + Math.sin(W) * Be, f.lineTo(Me, Xe), W += $e, Me = m.x + Math.cos(W) * Le, Xe = m.y + Math.sin(W) * Le, f.lineTo(Me, Xe), W += $e;
1835
+ for (var Y = Math.PI / 2 * 3, Le = 4 * m.scalar, Be = 8 * m.scalar, Me = m.x, Xe = m.y, rt = 5, $e = Math.PI / rt; rt--; )
1836
+ Me = m.x + Math.cos(Y) * Be, Xe = m.y + Math.sin(Y) * Be, f.lineTo(Me, Xe), Y += $e, Me = m.x + Math.cos(Y) * Le, Xe = m.y + Math.sin(Y) * Le, f.lineTo(Me, Xe), Y += $e;
1837
1837
  else
1838
1838
  f.moveTo(Math.floor(m.x), Math.floor(m.y)), f.lineTo(Math.floor(m.wobbleX), Math.floor(D)), f.lineTo(Math.floor(H), Math.floor(K)), f.lineTo(Math.floor(C), Math.floor(m.wobbleY));
1839
1839
  return f.closePath(), f.fill(), m.tick < m.totalTicks;
@@ -1863,29 +1863,29 @@ var Ns = {};
1863
1863
  }
1864
1864
  function he(f, m) {
1865
1865
  var N = !f, C = !!v(m || {}, "resize"), D = !1, H = v(m, "disableForReducedMotion", Boolean), K = i && !!v(m || {}, "useWorker"), L = K ? w() : null, V = N ? J : ie, le = f && L ? !!f.__confetti_initialized : !1, ge = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, oe;
1866
- function pe(W, Le, Be) {
1867
- for (var Me = v(W, "particleCount", x), Xe = v(W, "angle", Number), rt = v(W, "spread", Number), $e = v(W, "startVelocity", Number), Ca = v(W, "decay", Number), Pa = v(W, "gravity", Number), _a = v(W, "drift", Number), Ts = v(W, "colors", b), Ia = v(W, "ticks", Number), Cs = v(W, "shapes"), ka = v(W, "scalar"), La = !!v(W, "flat"), Ps = U(W), _s = Me, Fn = [], Da = f.width * Ps.x, Ga = f.height * Ps.y; _s--; )
1866
+ function pe(Y, Le, Be) {
1867
+ for (var Me = v(Y, "particleCount", x), Xe = v(Y, "angle", Number), rt = v(Y, "spread", Number), $e = v(Y, "startVelocity", Number), Pa = v(Y, "decay", Number), _a = v(Y, "gravity", Number), Ia = v(Y, "drift", Number), Cs = v(Y, "colors", b), ka = v(Y, "ticks", Number), Ps = v(Y, "shapes"), La = v(Y, "scalar"), Da = !!v(Y, "flat"), _s = U(Y), Is = Me, Fn = [], Ga = f.width * _s.x, Ua = f.height * _s.y; Is--; )
1868
1868
  Fn.push(
1869
1869
  A({
1870
- x: Da,
1871
- y: Ga,
1870
+ x: Ga,
1871
+ y: Ua,
1872
1872
  angle: Xe,
1873
1873
  spread: rt,
1874
1874
  startVelocity: $e,
1875
- color: Ts[_s % Ts.length],
1876
- shape: Cs[G(0, Cs.length)],
1877
- ticks: Ia,
1878
- decay: Ca,
1879
- gravity: Pa,
1880
- drift: _a,
1881
- scalar: ka,
1882
- flat: La
1875
+ color: Cs[Is % Cs.length],
1876
+ shape: Ps[G(0, Ps.length)],
1877
+ ticks: ka,
1878
+ decay: Pa,
1879
+ gravity: _a,
1880
+ drift: Ia,
1881
+ scalar: La,
1882
+ flat: Da
1883
1883
  })
1884
1884
  );
1885
1885
  return oe ? oe.addFettis(Fn) : (oe = ne(f, Fn, V, Le, Be), oe.promise);
1886
1886
  }
1887
- function xe(W) {
1888
- var Le = H || v(W, "disableForReducedMotion", Boolean), Be = v(W, "zIndex", Number);
1887
+ function xe(Y) {
1888
+ var Le = H || v(Y, "disableForReducedMotion", Boolean), Be = v(Y, "zIndex", Number);
1889
1889
  if (Le && ge)
1890
1890
  return h(function($e) {
1891
1891
  $e();
@@ -1917,7 +1917,7 @@ var Ns = {};
1917
1917
  function rt() {
1918
1918
  oe = null, C && (D = !1, t.removeEventListener("resize", Xe)), N && f && (document.body.contains(f) && document.body.removeChild(f), f = null, le = !1);
1919
1919
  }
1920
- return C && !D && (D = !0, t.addEventListener("resize", Xe, !1)), L ? L.fire(W, Me, rt) : pe(W, Me, rt);
1920
+ return C && !D && (D = !0, t.addEventListener("resize", Xe, !1)), L ? L.fire(Y, Me, rt) : pe(Y, Me, rt);
1921
1921
  }
1922
1922
  return xe.reset = function() {
1923
1923
  L && L.reset(), oe && oe.reset();
@@ -1948,8 +1948,8 @@ var Ns = {};
1948
1948
  var C = new Path2D(m), D = document.createElement("canvas"), H = D.getContext("2d");
1949
1949
  if (!N) {
1950
1950
  for (var K = 1e3, L = K, V = K, le = 0, ge = 0, oe, pe, xe = 0; xe < K; xe += 2)
1951
- for (var W = 0; W < K; W += 2)
1952
- H.isPointInPath(C, xe, W, "nonzero") && (L = Math.min(L, xe), V = Math.min(V, W), le = Math.max(le, xe), ge = Math.max(ge, W));
1951
+ for (var Y = 0; Y < K; Y += 2)
1952
+ H.isPointInPath(C, xe, Y, "nonzero") && (L = Math.min(L, xe), V = Math.min(V, Y), le = Math.max(le, xe), ge = Math.max(ge, Y));
1953
1953
  oe = le - L, pe = ge - V;
1954
1954
  var Le = 10, Be = Math.min(Le / oe, Le / pe);
1955
1955
  N = [
@@ -1972,8 +1972,8 @@ var Ns = {};
1972
1972
  typeof f == "string" ? m = f : (m = f.text, N = "scalar" in f ? f.scalar : N, D = "fontFamily" in f ? f.fontFamily : D, C = "color" in f ? f.color : C);
1973
1973
  var H = 10 * N, K = "" + H + "px " + D, L = new OffscreenCanvas(H, H), V = L.getContext("2d");
1974
1974
  V.font = K;
1975
- var le = V.measureText(m), ge = Math.ceil(le.actualBoundingBoxRight + le.actualBoundingBoxLeft), oe = Math.ceil(le.actualBoundingBoxAscent + le.actualBoundingBoxDescent), pe = 2, xe = le.actualBoundingBoxLeft + pe, W = le.actualBoundingBoxAscent + pe;
1976
- ge += pe + pe, oe += pe + pe, L = new OffscreenCanvas(ge, oe), V = L.getContext("2d"), V.font = K, V.fillStyle = C, V.fillText(m, xe, W);
1975
+ var le = V.measureText(m), ge = Math.ceil(le.actualBoundingBoxRight + le.actualBoundingBoxLeft), oe = Math.ceil(le.actualBoundingBoxAscent + le.actualBoundingBoxDescent), pe = 2, xe = le.actualBoundingBoxLeft + pe, Y = le.actualBoundingBoxAscent + pe;
1976
+ ge += pe + pe, oe += pe + pe, L = new OffscreenCanvas(ge, oe), V = L.getContext("2d"), V.font = K, V.fillStyle = C, V.fillText(m, xe, Y);
1977
1977
  var Le = 1 / N;
1978
1978
  return {
1979
1979
  type: "bitmap",
@@ -1989,15 +1989,15 @@ var Ns = {};
1989
1989
  }, n.exports.create = he, n.exports.shapeFromPath = Ee, n.exports.shapeFromText = Qe;
1990
1990
  })(/* @__PURE__ */ function() {
1991
1991
  return typeof window < "u" ? window : typeof self < "u" ? self : this || {};
1992
- }(), Ns, !1);
1993
- const jl = Ns.exports;
1994
- Ns.exports.create;
1995
- const $l = {
1992
+ }(), As, !1);
1993
+ const zl = As.exports;
1994
+ As.exports.create;
1995
+ const Wl = {
1996
1996
  particleCount: 350,
1997
1997
  spread: 120,
1998
1998
  origin: { y: 0.6 },
1999
1999
  angle: 90
2000
- }, zl = {
2000
+ }, Yl = {
2001
2001
  TOP_RIGHT: {
2002
2002
  angle: 225,
2003
2003
  origin: { x: 0.9, y: 0 }
@@ -2007,12 +2007,12 @@ const $l = {
2007
2007
  origin: { x: 0.9, y: 0.9 }
2008
2008
  }
2009
2009
  }, Tn = (e) => {
2010
- let t = zl[e];
2010
+ let t = Yl[e];
2011
2011
  t || (t = {});
2012
- const n = { ...$l, ...t };
2013
- jl(n);
2014
- }, Wl = () => {
2015
- const [e] = ei(), { mutate: t, isPending: n } = Ss(), { mutateAsync: s, isPending: a } = Ur();
2012
+ const n = { ...Wl, ...t };
2013
+ zl(n);
2014
+ }, Ql = () => {
2015
+ const [e] = ni(), { mutate: t, isPending: n } = Ns(), { mutateAsync: s, isPending: a } = Rr();
2016
2016
  return /* @__PURE__ */ u("div", { className: "bg-white py-3 flex items-center justify-center gap-x-3 border-t", children: [
2017
2017
  /* @__PURE__ */ r(
2018
2018
  _,
@@ -2045,11 +2045,11 @@ const $l = {
2045
2045
  }
2046
2046
  )
2047
2047
  ] });
2048
- }, Yl = ({
2048
+ }, Xl = ({
2049
2049
  page: e,
2050
2050
  onClose: t
2051
2051
  }) => {
2052
- const [n, s] = P(e.slug || ""), { mutate: a, isPending: i } = Vl(), { data: l } = Ie(), o = fe(l, { key: e == null ? void 0 : e.pageType }), c = (g) => {
2052
+ const [n, s] = P(e.slug || ""), { mutate: a, isPending: i } = $l(), { data: l } = Ie(), o = fe(l, { key: e == null ? void 0 : e.pageType }), c = (g) => {
2053
2053
  if (g.preventDefault(), !(e != null && e.primaryPage) && Object.keys(qe).some((y) => n === `/${y}` || Rt(n, `/${y}/`))) {
2054
2054
  j.error("Error", {
2055
2055
  description: "Slugs cannot start with a language code for primary page"
@@ -2061,8 +2061,8 @@ const $l = {
2061
2061
  return /* @__PURE__ */ r(He, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
2062
2062
  /* @__PURE__ */ u(Ve, { children: [
2063
2063
  /* @__PURE__ */ r(je, { children: "Change Slug" }),
2064
- /* @__PURE__ */ r(Ye, { className: "text-xs", children: /* @__PURE__ */ u(pr, { variant: "destructive", className: "mt-2", children: [
2065
- /* @__PURE__ */ r(Tr, { className: "h-4 w-4" }),
2064
+ /* @__PURE__ */ r(Ye, { className: "text-xs", children: /* @__PURE__ */ u(yr, { variant: "destructive", className: "mt-2", children: [
2065
+ /* @__PURE__ */ r(Cr, { className: "h-4 w-4" }),
2066
2066
  "Changing the slug may have impact on your SEO. Please proceed with caution."
2067
2067
  ] }) })
2068
2068
  ] }),
@@ -2115,18 +2115,18 @@ const $l = {
2115
2115
  _,
2116
2116
  {
2117
2117
  type: "submit",
2118
- disabled: i || !Rt(n, `/${h}`) || as(e == null ? void 0 : e.slug, n),
2118
+ disabled: i || !Rt(n, `/${h}`) || is(e == null ? void 0 : e.slug, n),
2119
2119
  children: i ? "Changing..." : "Change Slug"
2120
2120
  }
2121
2121
  ) })
2122
2122
  ] })
2123
2123
  ] }) });
2124
2124
  };
2125
- function qr({
2125
+ function Hr({
2126
2126
  page: e,
2127
2127
  onClose: t
2128
2128
  }) {
2129
- const [, n] = Ue(), { mutate: s, isPending: a } = Fl(), { data: i } = Ie(), l = () => {
2129
+ const [, n] = Ue(), { mutate: s, isPending: a } = Hl(), { data: i } = Ie(), l = () => {
2130
2130
  s(e, {
2131
2131
  onSuccess: () => {
2132
2132
  e != null && e.primaryPage || (window.history.replaceState(null, "", "/"), n(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate"))), t();
@@ -2174,11 +2174,11 @@ const Oe = ({
2174
2174
  }) => {
2175
2175
  const { hasPermission: a } = sn();
2176
2176
  return e && !a(e) || t && !t.some((i) => a(i)) ? s : n;
2177
- }, As = ({
2177
+ }, xs = ({
2178
2178
  page: e,
2179
2179
  onClose: t
2180
2180
  }) => {
2181
- const { mutate: n, isPending: s } = ql(), a = async () => {
2181
+ const { mutate: n, isPending: s } = Kl(), a = async () => {
2182
2182
  n(e, { onSuccess: t });
2183
2183
  };
2184
2184
  return /* @__PURE__ */ r(He, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
@@ -2204,12 +2204,12 @@ const Oe = ({
2204
2204
  )
2205
2205
  ] })
2206
2206
  ] }) });
2207
- }, Hr = ({
2207
+ }, Kr = ({
2208
2208
  langProps: e,
2209
2209
  onClose: t,
2210
2210
  languages: n
2211
2211
  }) => {
2212
- const { data: s } = Re(), { data: a } = Ie(), [i, l] = P(e.name || ""), [o, c] = P(e.edit ? e.lang : ""), [h, g] = P(e.edit ? e.slug : ""), { mutate: d, isPending: w } = Fr(), { mutate: y, isPending: p } = ws(), S = Y(
2212
+ const { data: s } = Re(), { data: a } = Ie(), [i, l] = P(e.name || ""), [o, c] = P(e.edit ? e.lang : ""), [h, g] = P(e.edit ? e.slug : ""), { mutate: d, isPending: w } = qr(), { mutate: y, isPending: p } = Ss(), S = W(
2213
2213
  () => a == null ? void 0 : a.find(
2214
2214
  (E) => E.key === e.pageType
2215
2215
  ),
@@ -2278,7 +2278,7 @@ const Oe = ({
2278
2278
  value: h,
2279
2279
  onChange: (E) => {
2280
2280
  const b = E.target.value;
2281
- Rt(b, `/${o}`) && g(Dt(Ma(b)));
2281
+ Rt(b, `/${o}`) && g(Dt(Fa(b)));
2282
2282
  },
2283
2283
  className: "col-span-3",
2284
2284
  required: !0,
@@ -2300,7 +2300,7 @@ const Oe = ({
2300
2300
  ) })
2301
2301
  ] })
2302
2302
  ] }) });
2303
- }, Ql = () => {
2303
+ }, Zl = () => {
2304
2304
  const [e, t] = P(null), { selectedLang: n, fallbackLang: s, setSelectedLang: a } = ut(), { data: i, isFetching: l } = cn(), { data: o } = Re(), [c, h] = P(null), [g, d] = P(null), [w, y] = P(null), { data: p } = un(), S = Te(
2305
2305
  te(p, "languages") || ["en"],
2306
2306
  (v) => !fe(i, { lang: v }) && v !== te(p, "fallbackLang")
@@ -2351,7 +2351,7 @@ const Oe = ({
2351
2351
  ] })
2352
2352
  ] }),
2353
2353
  E ? /* @__PURE__ */ u("div", { className: "flex items-center text-[11px] text-orange-500 gap-x-1", children: [
2354
- /* @__PURE__ */ r(Di, { fill: "orange", className: "w-3 h-3" }),
2354
+ /* @__PURE__ */ r(Ui, { fill: "orange", className: "w-3 h-3" }),
2355
2355
  /* @__PURE__ */ r("b", { children: " Primary" })
2356
2356
  ] }) : /* @__PURE__ */ r("div", { className: "flex items-center gap-x-3", children: /* @__PURE__ */ r(
2357
2357
  Oe,
@@ -2373,7 +2373,7 @@ const Oe = ({
2373
2373
  variant: "ghost",
2374
2374
  size: "sm",
2375
2375
  className: "h-8 w-8 p-0",
2376
- children: /* @__PURE__ */ r(ps, { className: "h-4 w-4" })
2376
+ children: /* @__PURE__ */ r(ys, { className: "h-4 w-4" })
2377
2377
  }
2378
2378
  )
2379
2379
  }
@@ -2396,7 +2396,7 @@ const Oe = ({
2396
2396
  T.stopPropagation(), t({ ...v, edit: !0 });
2397
2397
  },
2398
2398
  children: [
2399
- /* @__PURE__ */ r(Gi, { className: "size-3" }),
2399
+ /* @__PURE__ */ r(Ri, { className: "size-3" }),
2400
2400
  B.EDIT
2401
2401
  ]
2402
2402
  }
@@ -2415,7 +2415,7 @@ const Oe = ({
2415
2415
  T.stopPropagation(), d(v);
2416
2416
  },
2417
2417
  children: [
2418
- /* @__PURE__ */ r(Cr, { className: "size-3" }),
2418
+ /* @__PURE__ */ r(Pr, { className: "size-3" }),
2419
2419
  B.UNPUBLISH
2420
2420
  ]
2421
2421
  }
@@ -2434,7 +2434,7 @@ const Oe = ({
2434
2434
  T.stopPropagation(), h(v);
2435
2435
  },
2436
2436
  children: [
2437
- /* @__PURE__ */ r(Ui, { className: "size-3" }),
2437
+ /* @__PURE__ */ r(Oi, { className: "size-3" }),
2438
2438
  B.DELETE
2439
2439
  ]
2440
2440
  }
@@ -2473,23 +2473,23 @@ const Oe = ({
2473
2473
  }
2474
2474
  ) }) }),
2475
2475
  e && /* @__PURE__ */ r(
2476
- Hr,
2476
+ Kr,
2477
2477
  {
2478
2478
  languages: S,
2479
2479
  langProps: e,
2480
2480
  onClose: () => t(null)
2481
2481
  }
2482
2482
  ),
2483
- c && /* @__PURE__ */ r(qr, { page: c, onClose: () => h(null) }),
2483
+ c && /* @__PURE__ */ r(Hr, { page: c, onClose: () => h(null) }),
2484
2484
  g && /* @__PURE__ */ r(
2485
- As,
2485
+ xs,
2486
2486
  {
2487
2487
  page: g,
2488
2488
  onClose: () => d(null)
2489
2489
  }
2490
2490
  ),
2491
2491
  w && /* @__PURE__ */ r(
2492
- Yl,
2492
+ Xl,
2493
2493
  {
2494
2494
  page: w,
2495
2495
  onClose: () => y(null)
@@ -2497,14 +2497,14 @@ const Oe = ({
2497
2497
  )
2498
2498
  ] });
2499
2499
  };
2500
- function Xl({
2500
+ function Jl({
2501
2501
  pages: e,
2502
2502
  selectedParentId: t,
2503
2503
  onChange: n,
2504
2504
  className: s = "w-full rounded-md border border-gray-300 px-3 py-2",
2505
2505
  id: a = "parentPage"
2506
2506
  }) {
2507
- const i = Y(() => !e || e.length === 0 ? [] : e.filter((g) => !me(g.slug)).filter((g) => g.slug !== "/").sort((g, d) => g.slug.localeCompare(d.slug)), [e]), l = (h) => Math.max(0, (h.match(/\//g) || []).length - 1), o = (h) => "    ".repeat(h), c = (h) => {
2507
+ const i = W(() => !e || e.length === 0 ? [] : e.filter((g) => !me(g.slug)).filter((g) => g.slug !== "/").sort((g, d) => g.slug.localeCompare(d.slug)), [e]), l = (h) => Math.max(0, (h.match(/\//g) || []).length - 1), o = (h) => "    ".repeat(h), c = (h) => {
2508
2508
  if (h === "/") return "/";
2509
2509
  const g = h.split("/").filter(Boolean);
2510
2510
  return g.length <= 1 ? `/${g[0] || ""}` : `/${g[g.length - 1]}`;
@@ -2536,7 +2536,7 @@ function Xl({
2536
2536
  )
2537
2537
  ] });
2538
2538
  }
2539
- const Zl = ({
2539
+ const eo = ({
2540
2540
  templates: e,
2541
2541
  selectedTemplateId: t,
2542
2542
  onSelectTemplate: n,
@@ -2584,13 +2584,13 @@ const Zl = ({
2584
2584
  /* @__PURE__ */ r("div", { className: "p-2 text-xs text-gray-500 bg-gray-50 border-t", children: "Template preview" })
2585
2585
  ] })
2586
2586
  ] });
2587
- }, Jl = () => {
2587
+ }, to = () => {
2588
2588
  const e = Q(), t = $();
2589
2589
  return Ne({
2590
2590
  queryKey: [ke, I.GET_LIBRARIES],
2591
2591
  queryFn: async () => await t(e, { action: I.GET_LIBRARIES }) || []
2592
2592
  });
2593
- }, eo = (e) => {
2593
+ }, no = (e) => {
2594
2594
  const t = Q(), n = $();
2595
2595
  return Ne({
2596
2596
  queryKey: [ke, I.GET_TEMPLATES_BY_TYPE, e],
@@ -2603,28 +2603,28 @@ const Zl = ({
2603
2603
  return (e ? Te(s, { pageType: e }) : s) || [];
2604
2604
  }
2605
2605
  });
2606
- }, to = (e) => {
2607
- const { data: t = [], isLoading: n } = eo(e), { data: s = [], isLoading: a } = Jl(), i = Y(() => n || a ? [] : t.map((o) => {
2606
+ }, so = (e) => {
2607
+ const { data: t = [], isLoading: n } = no(e), { data: s = [], isLoading: a } = to(), i = W(() => n || a ? [] : t.map((o) => {
2608
2608
  const c = fe(s, { id: o.library });
2609
2609
  return {
2610
2610
  ...o,
2611
2611
  libraryName: (c == null ? void 0 : c.type) !== "shared" ? "Site Library" : (c == null ? void 0 : c.name) + " Library",
2612
2612
  libraryType: c == null ? void 0 : c.type
2613
2613
  };
2614
- }), [t, s, n, a]), l = Y(() => Fa(i, "libraryName"), [i]);
2614
+ }), [t, s, n, a]), l = W(() => qa(i, "libraryName"), [i]);
2615
2615
  return {
2616
2616
  data: i,
2617
2617
  groupedData: l,
2618
2618
  isLoading: n || a
2619
2619
  };
2620
2620
  };
2621
- function no({
2621
+ function ro({
2622
2622
  addEditPage: e,
2623
2623
  additionalPageTypes: t = [],
2624
2624
  close: n
2625
2625
  }) {
2626
2626
  var Ee, Qe;
2627
- const s = !!(e != null && e.id), { data: a } = Rn(), { mutate: i, isPending: l } = Fr(), { mutate: o, isPending: c } = ws(), [h, g] = P(null), [d, w] = P(
2627
+ const s = !!(e != null && e.id), { data: a } = Rn(), { mutate: i, isPending: l } = qr(), { mutate: o, isPending: c } = Ss(), [h, g] = P(null), [d, w] = P(
2628
2628
  (e == null ? void 0 : e.pageType) ?? "page"
2629
2629
  ), [y, p] = P(
2630
2630
  t.find(
@@ -2636,7 +2636,7 @@ function no({
2636
2636
  ((e == null ? void 0 : e.slug) ?? "").split("/").pop() || ""
2637
2637
  ), [T, U] = P(
2638
2638
  (e == null ? void 0 : e.dynamic) ?? !1
2639
- ), [J, ie] = P(""), { data: k, isLoading: q } = to(d), A = l || c, M = t.find(
2639
+ ), [J, ie] = P(""), { data: k, isLoading: q } = so(d), A = l || c, M = t.find(
2640
2640
  (f) => f.key === d
2641
2641
  ), ne = (f) => {
2642
2642
  w(f), v(""), b(""), U(!1), ie(""), p(
@@ -2782,7 +2782,7 @@ function no({
2782
2782
  !s && (y == null ? void 0 : y.hasSlug) && k.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-1", children: [
2783
2783
  /* @__PURE__ */ r(X, { className: "text-sm mb-1 block", children: "Template" }),
2784
2784
  /* @__PURE__ */ r(
2785
- Zl,
2785
+ eo,
2786
2786
  {
2787
2787
  templates: k,
2788
2788
  selectedTemplateId: J,
@@ -2792,7 +2792,7 @@ function no({
2792
2792
  )
2793
2793
  ] }),
2794
2794
  /* @__PURE__ */ r(
2795
- Xl,
2795
+ Jl,
2796
2796
  {
2797
2797
  pages: a,
2798
2798
  selectedParentId: S,
@@ -2894,7 +2894,7 @@ function no({
2894
2894
  }
2895
2895
  );
2896
2896
  }
2897
- const so = ({
2897
+ const ao = ({
2898
2898
  addEditPage: e,
2899
2899
  setAddEditPage: t
2900
2900
  }) => {
@@ -2908,7 +2908,7 @@ const so = ({
2908
2908
  /* @__PURE__ */ r(Ye, { children: s ? "Update your page name" : "Enter details to create a new page" })
2909
2909
  ] }),
2910
2910
  /* @__PURE__ */ r(
2911
- no,
2911
+ ro,
2912
2912
  {
2913
2913
  addEditPage: e,
2914
2914
  close: () => t(void 0),
@@ -2916,18 +2916,18 @@ const so = ({
2916
2916
  }
2917
2917
  )
2918
2918
  ] }) });
2919
- }, ro = 1 * 1024 * 1024, ao = ({
2919
+ }, io = 1 * 1024 * 1024, lo = ({
2920
2920
  page: e,
2921
2921
  onClose: t
2922
2922
  }) => {
2923
- const [n, s] = P(!1), [a, i] = P(""), [l, o] = P(""), [c, h] = P(!1), g = ct(null), d = Hl(), { data: w } = Ie(), y = w == null ? void 0 : w.find(
2923
+ const [n, s] = P(!1), [a, i] = P(""), [l, o] = P(""), [c, h] = P(!1), g = ct(null), d = Vl(), { data: w } = Ie(), y = w == null ? void 0 : w.find(
2924
2924
  (E) => E.key === e.pageType
2925
2925
  ), p = (y == null ? void 0 : y.name) || It(e.pageType), S = _e(
2926
2926
  (E) => {
2927
2927
  var T;
2928
2928
  const b = (T = E.target.files) == null ? void 0 : T[0];
2929
2929
  if (b) {
2930
- if (b.size > ro) {
2930
+ if (b.size > io) {
2931
2931
  j.error("File too large", {
2932
2932
  description: `Maximum file size is 1MB. Selected file is ${(b.size / 1024).toFixed(2)}KB.`
2933
2933
  }), g.current && (g.current.value = "");
@@ -2983,7 +2983,7 @@ const so = ({
2983
2983
  /* @__PURE__ */ u("div", { className: "space-y-4 mb-4 text-xs", children: [
2984
2984
  /* @__PURE__ */ u("div", { className: "p-4 border rounded bg-slate-50 space-y-3", children: [
2985
2985
  /* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
2986
- /* @__PURE__ */ r(Ri, { className: "w-4 h-4 text-slate-500" }),
2986
+ /* @__PURE__ */ r(Bi, { className: "w-4 h-4 text-slate-500" }),
2987
2987
  /* @__PURE__ */ r("span", { className: "font-medium text-slate-500", children: "Page Name:" }),
2988
2988
  /* @__PURE__ */ r("span", { className: "font-semibold", children: It(e.name) })
2989
2989
  ] }),
@@ -3033,7 +3033,7 @@ const so = ({
3033
3033
  /* @__PURE__ */ r("div", { className: "animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" }),
3034
3034
  "Uploading..."
3035
3035
  ] }) : /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
3036
- /* @__PURE__ */ r(Ar, { className: "h-4 w-4" }),
3036
+ /* @__PURE__ */ r(xr, { className: "h-4 w-4" }),
3037
3037
  "Select image"
3038
3038
  ] })
3039
3039
  }
@@ -3045,7 +3045,7 @@ const so = ({
3045
3045
  variant: "outline",
3046
3046
  size: "icon",
3047
3047
  onClick: v,
3048
- children: /* @__PURE__ */ r(xr, { className: "h-4 w-4" })
3048
+ children: /* @__PURE__ */ r(Tr, { className: "h-4 w-4" })
3049
3049
  }
3050
3050
  )
3051
3051
  ] }),
@@ -3081,11 +3081,11 @@ const so = ({
3081
3081
  }
3082
3082
  )
3083
3083
  ] }) });
3084
- }, io = ({
3084
+ }, oo = ({
3085
3085
  page: e,
3086
3086
  onClose: t
3087
3087
  }) => {
3088
- const [n, s] = P(!1), a = Kl();
3088
+ const [n, s] = P(!1), a = jl();
3089
3089
  return /* @__PURE__ */ r(He, { open: !0, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
3090
3090
  /* @__PURE__ */ u(Ve, { children: [
3091
3091
  /* @__PURE__ */ r(je, { children: "Unmark as template" }),
@@ -3131,10 +3131,10 @@ const so = ({
3131
3131
  setMarkAsTemplate: o,
3132
3132
  setUnmarkAsTemplate: c
3133
3133
  }) => {
3134
- const { data: h } = Ie(), { hasPermission: g } = sn(), d = Y(
3134
+ const { data: h } = Ie(), { hasPermission: g } = sn(), d = W(
3135
3135
  () => fe(h, { key: t.pageType }),
3136
3136
  [h, t.pageType]
3137
- ), w = te(t, "slug", "").replace(e, "") || "/", y = !g(ue.EDIT_PAGE) && !g(ue.DELETE_PAGE) && !g(ue.UNPUBLISH_PAGE), p = Y(() => !!t.isTemplate, [t.isTemplate]), S = Y(
3137
+ ), w = te(t, "slug", "").replace(e, "") || "/", y = !g(ue.EDIT_PAGE) && !g(ue.DELETE_PAGE) && !g(ue.UNPUBLISH_PAGE), p = W(() => !!t.isTemplate, [t.isTemplate]), S = W(
3138
3138
  () => !!(d != null && d.hasSlug),
3139
3139
  [d == null ? void 0 : d.hasSlug]
3140
3140
  );
@@ -3145,13 +3145,13 @@ const so = ({
3145
3145
  className: `rounded flex p-1.5 items-center justify-between leading-none duration-300 cursor-pointer px-3 py-1.5 ${n ? "bg-gray-200" : "hover:bg-gray-100"}`,
3146
3146
  children: [
3147
3147
  /* @__PURE__ */ u("div", { className: "flex items-center gap-x-2", children: [
3148
- t.dynamic ? /* @__PURE__ */ r("div", { className: "w-4 h-4 text-slate-500 stroke-[1]", children: /* @__PURE__ */ r(Bi, { className: "w-4 h-4 text-yellow-400" }) }) : d != null && d.icon ? /* @__PURE__ */ r(
3148
+ t.dynamic ? /* @__PURE__ */ r("div", { className: "w-4 h-4 text-slate-500 stroke-[1]", children: /* @__PURE__ */ r(Fi, { className: "w-4 h-4 text-yellow-400" }) }) : d != null && d.icon ? /* @__PURE__ */ r(
3149
3149
  "div",
3150
3150
  {
3151
3151
  className: "w-4 h-4 text-slate-500 stroke-[1]",
3152
3152
  dangerouslySetInnerHTML: { __html: d.icon }
3153
3153
  }
3154
- ) : d != null && d.hasSlug ? /* @__PURE__ */ r(on, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ r(Mi, { className: "w-4 h-4 text-slate-500 stroke-[1]" }),
3154
+ ) : d != null && d.hasSlug ? /* @__PURE__ */ r(on, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ r(qi, { className: "w-4 h-4 text-slate-500 stroke-[1]" }),
3155
3155
  /* @__PURE__ */ r(
3156
3156
  "div",
3157
3157
  {
@@ -3166,7 +3166,7 @@ const so = ({
3166
3166
  className: `ml-2 text-xs max-w-full leading-tight py-px font-normal rounded-full text-gray-400 border ${n ? "border-gray-300" : "border-gray-200"}`,
3167
3167
  children: [
3168
3168
  w,
3169
- t.dynamic && /* @__PURE__ */ r("span", { className: "text-xs font-light leading-none text-slate-500", children: Zs(w, "/") ? `${d == null ? void 0 : d.dynamicSlug}` : `/${d == null ? void 0 : d.dynamicSlug}` })
3169
+ t.dynamic && /* @__PURE__ */ r("span", { className: "text-xs font-light leading-none text-slate-500", children: Js(w, "/") ? `${d == null ? void 0 : d.dynamicSlug}` : `/${d == null ? void 0 : d.dynamicSlug}` })
3170
3170
  ]
3171
3171
  }
3172
3172
  ) : /* @__PURE__ */ r(
@@ -3187,7 +3187,7 @@ const so = ({
3187
3187
  )
3188
3188
  ] }),
3189
3189
  /* @__PURE__ */ r("div", { className: "flex items-center space-x-4", children: !y && /* @__PURE__ */ u(rn, { children: [
3190
- /* @__PURE__ */ r(an, { asChild: !0, onClick: (v) => v.stopPropagation(), children: /* @__PURE__ */ r(ps, { className: "h-4 w-4 hover:stroke-[3]" }) }),
3190
+ /* @__PURE__ */ r(an, { asChild: !0, onClick: (v) => v.stopPropagation(), children: /* @__PURE__ */ r(ys, { className: "h-4 w-4 hover:stroke-[3]" }) }),
3191
3191
  /* @__PURE__ */ u(ln, { align: "end", className: "text-sm", children: [
3192
3192
  g(ue.EDIT_PAGE) && /* @__PURE__ */ u(
3193
3193
  De,
@@ -3200,7 +3200,7 @@ const so = ({
3200
3200
  });
3201
3201
  },
3202
3202
  children: [
3203
- /* @__PURE__ */ r(Fi, { className: "size-3" }),
3203
+ /* @__PURE__ */ r(Hi, { className: "size-3" }),
3204
3204
  "Edit"
3205
3205
  ]
3206
3206
  }
@@ -3213,7 +3213,7 @@ const so = ({
3213
3213
  v.stopPropagation(), a(t);
3214
3214
  },
3215
3215
  children: [
3216
- /* @__PURE__ */ r(Cr, { className: "size-3" }),
3216
+ /* @__PURE__ */ r(Pr, { className: "size-3" }),
3217
3217
  B.UNPUBLISH
3218
3218
  ]
3219
3219
  }
@@ -3226,7 +3226,7 @@ const so = ({
3226
3226
  v.stopPropagation(), i(t);
3227
3227
  },
3228
3228
  children: [
3229
- /* @__PURE__ */ r(ys, { className: "size-3" }),
3229
+ /* @__PURE__ */ r(vs, { className: "size-3" }),
3230
3230
  B.DELETE
3231
3231
  ]
3232
3232
  }
@@ -3239,7 +3239,7 @@ const so = ({
3239
3239
  v.stopPropagation(), c(t);
3240
3240
  },
3241
3241
  children: [
3242
- /* @__PURE__ */ r(Gs, { className: "size-3" }),
3242
+ /* @__PURE__ */ r(Us, { className: "size-3" }),
3243
3243
  B.UNMARK_AS_TEMPLATE
3244
3244
  ]
3245
3245
  }
@@ -3251,7 +3251,7 @@ const so = ({
3251
3251
  v.stopPropagation(), o(t);
3252
3252
  },
3253
3253
  children: [
3254
- /* @__PURE__ */ r(Gs, { className: "size-3" }),
3254
+ /* @__PURE__ */ r(Us, { className: "size-3" }),
3255
3255
  B.MARK_AS_TEMPLATE
3256
3256
  ]
3257
3257
  }
@@ -3261,7 +3261,7 @@ const so = ({
3261
3261
  ]
3262
3262
  }
3263
3263
  );
3264
- }, lo = ({ close: e }) => {
3264
+ }, co = ({ close: e }) => {
3265
3265
  const [, t] = P([]), [n, s] = P(""), [a, i] = P(null), [l, o] = P(null), [c, h] = P(null), [g, d] = P(null), [w, y] = P(null), { data: p, isFetching: S } = Rn(), [v, x] = P(""), { hasPermission: G } = sn(), [E, b] = Ue(), T = E.get("page"), { data: U } = Ie(), J = _e(
3266
3266
  (A) => {
3267
3267
  var M;
@@ -3289,7 +3289,7 @@ const so = ({
3289
3289
  A && (A != null && A.pageType) ? t((M) => [...M, A == null ? void 0 : A.pageType]) : (window.history.replaceState(null, "", "/"), b(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate")));
3290
3290
  }
3291
3291
  }, [p, T, S, b]);
3292
- const q = Y(() => {
3292
+ const q = W(() => {
3293
3293
  const A = Nn(
3294
3294
  Te(p, (F) => me(n) ? !0 : Mt(Dt(F == null ? void 0 : F.name), Dt(n)) || Mt(Dt(F == null ? void 0 : F.slug), Dt(n)))
3295
3295
  );
@@ -3322,7 +3322,7 @@ const so = ({
3322
3322
  /* @__PURE__ */ u("div", { className: "flex flex-col h-full space-y-6", children: [
3323
3323
  /* @__PURE__ */ u("div", { className: "relative flex item-center gap-x-4", children: [
3324
3324
  /* @__PURE__ */ r(
3325
- Oi,
3325
+ Mi,
3326
3326
  {
3327
3327
  strokeWidth: 2.5,
3328
3328
  className: "absolute left-3 top-2.5 h-4 w-4 text-gray-400"
@@ -3337,17 +3337,17 @@ const so = ({
3337
3337
  onChange: (A) => s(A.target.value)
3338
3338
  }
3339
3339
  ),
3340
- !me(v) && /* @__PURE__ */ u(di, { value: v, onValueChange: ie, children: [
3340
+ !me(v) && /* @__PURE__ */ u(mi, { value: v, onValueChange: ie, children: [
3341
3341
  /* @__PURE__ */ r(
3342
- hi,
3342
+ fi,
3343
3343
  {
3344
3344
  className: `${v === "all" ? "bg-gray-50 hover:bg-gray-100" : "bg-gray-100 hover:bg-gray-50"} min-w-[120px] h-max p-0 py-1 pl-2 pr-1 top-1.5 -mt-px absolute text-gray-600 right-1.5 w-max text-xs whitespace-nowrap ring-0 focus:ring-0 shadow-none`,
3345
- children: /* @__PURE__ */ r(mi, { placeholder: "Select page type" })
3345
+ children: /* @__PURE__ */ r(gi, { placeholder: "Select page type" })
3346
3346
  }
3347
3347
  ),
3348
- /* @__PURE__ */ r(fi, { align: "end", children: Fe(
3349
- Xs([{ key: "all", name: "All" }], U),
3350
- (A) => /* @__PURE__ */ r(gi, { value: te(A, "key"), children: te(A, "name") })
3348
+ /* @__PURE__ */ r(pi, { align: "end", children: Fe(
3349
+ Zs([{ key: "all", name: "All" }], U),
3350
+ (A) => /* @__PURE__ */ r(yi, { value: te(A, "key"), children: te(A, "name") })
3351
3351
  ) })
3352
3352
  ] })
3353
3353
  ] }),
@@ -3420,46 +3420,46 @@ const so = ({
3420
3420
  });
3421
3421
  },
3422
3422
  children: [
3423
- /* @__PURE__ */ r(gs, { className: "w-4 h-4" }),
3423
+ /* @__PURE__ */ r(ps, { className: "w-4 h-4" }),
3424
3424
  " Add New"
3425
3425
  ]
3426
3426
  }
3427
3427
  ),
3428
3428
  c && /* @__PURE__ */ r(
3429
- so,
3429
+ ao,
3430
3430
  {
3431
3431
  editPage: k,
3432
3432
  addEditPage: c,
3433
3433
  setAddEditPage: h
3434
3434
  }
3435
3435
  ),
3436
- a && /* @__PURE__ */ r(qr, { page: a, onClose: () => i(null) }),
3436
+ a && /* @__PURE__ */ r(Hr, { page: a, onClose: () => i(null) }),
3437
3437
  l && /* @__PURE__ */ r(
3438
- As,
3438
+ xs,
3439
3439
  {
3440
3440
  page: l,
3441
3441
  onClose: () => o(null)
3442
3442
  }
3443
3443
  ),
3444
3444
  g && /* @__PURE__ */ r(
3445
- ao,
3445
+ lo,
3446
3446
  {
3447
3447
  page: g,
3448
3448
  onClose: () => d(null)
3449
3449
  }
3450
3450
  ),
3451
3451
  w && /* @__PURE__ */ r(
3452
- io,
3452
+ oo,
3453
3453
  {
3454
3454
  page: w,
3455
3455
  onClose: () => y(null)
3456
3456
  }
3457
3457
  )
3458
3458
  ] });
3459
- }, oo = () => {
3459
+ }, uo = () => {
3460
3460
  const e = dt("logo", null);
3461
- return e ? /* @__PURE__ */ r("div", { className: "w-full max-h-9 overflow-hidden pr-2", children: er.createElement(e, {}) }) : null;
3462
- }, co = () => {
3461
+ return e ? /* @__PURE__ */ r("div", { className: "w-full max-h-9 overflow-hidden pr-2", children: tr.createElement(e, {}) }) : null;
3462
+ }, ho = () => {
3463
3463
  const [e] = Ue(), t = e.get("page"), { data: n, isFetching: s } = Re(), [a, i] = P(!1), l = !!t && !me(n), o = !t || !s && me(n) || a;
3464
3464
  return /* @__PURE__ */ u(be, { children: [
3465
3465
  /* @__PURE__ */ u(
@@ -3469,47 +3469,47 @@ const so = ({
3469
3469
  className: "flex items-center w-full space-x-2 py-1",
3470
3470
  onClick: () => i(!0),
3471
3471
  children: [
3472
- /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(qi, { className: "h-4 w-4" }) }),
3472
+ /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(Ki, { className: "h-4 w-4" }) }),
3473
3473
  /* @__PURE__ */ u("span", { className: "truncate leading-tight flex items-center max-w-[200px]", children: [
3474
3474
  /* @__PURE__ */ r("span", { className: "text-slate-600 pr-1 font-light", children: "Editing:" }),
3475
- s ? /* @__PURE__ */ r(Pr, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : It(te(n, "name")) ?? ""
3475
+ s ? /* @__PURE__ */ r(_r, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : It(te(n, "name")) ?? ""
3476
3476
  ] })
3477
3477
  ]
3478
3478
  },
3479
3479
  "template-viewer"
3480
3480
  ),
3481
3481
  /* @__PURE__ */ r(
3482
- yr,
3482
+ vr,
3483
3483
  {
3484
3484
  open: o,
3485
3485
  onOpenChange: (c) => !c && l && i(!1),
3486
3486
  children: /* @__PURE__ */ u(
3487
- vr,
3487
+ Er,
3488
3488
  {
3489
3489
  side: "left",
3490
3490
  className: `!max-w-screen-md z-50 border-border w-full ${l ? "" : "sheet-hide-close-btn"}`,
3491
3491
  children: [
3492
- /* @__PURE__ */ r(Er, { className: "mb-3", children: /* @__PURE__ */ u(br, { className: "text-sm flex items-center gap-2 font-semibold", children: [
3492
+ /* @__PURE__ */ r(br, { className: "mb-3", children: /* @__PURE__ */ u(wr, { className: "text-sm flex items-center gap-2 font-semibold", children: [
3493
3493
  /* @__PURE__ */ r("div", { className: "p-2 rounded-md bg-primary text-primary-foreground", children: /* @__PURE__ */ r(on, { className: "w-6 h-6" }) }),
3494
3494
  /* @__PURE__ */ u("div", { className: "flex flex-col", children: [
3495
3495
  /* @__PURE__ */ r("span", { className: "text-sm font-semibold", children: "Pages" }),
3496
3496
  /* @__PURE__ */ r("span", { className: "text-xs text-muted-foreground", children: "Manage your site structure" })
3497
3497
  ] })
3498
3498
  ] }) }),
3499
- /* @__PURE__ */ r("div", { className: "h-[calc(100vh-100px)] overflow-y-auto", children: /* @__PURE__ */ r(lo, { close: () => i(!1) }) })
3499
+ /* @__PURE__ */ r("div", { className: "h-[calc(100vh-100px)] overflow-y-auto", children: /* @__PURE__ */ r(co, { close: () => i(!1) }) })
3500
3500
  ]
3501
3501
  }
3502
3502
  )
3503
3503
  }
3504
3504
  )
3505
3505
  ] });
3506
- }, uo = () => {
3506
+ }, mo = () => {
3507
3507
  const { fallbackLang: e, languages: t, selectedLang: n, setSelectedLang: s } = ut(), a = me(n) ? e : n, [, i] = Ue();
3508
3508
  we(() => {
3509
3509
  const p = new URLSearchParams(window.location.search), S = p.get("lang");
3510
3510
  S && (t.includes(S) ? s(S) : (p.delete("lang"), i(p), s("")));
3511
3511
  }, [t, i, s]);
3512
- const [l, o] = P(null), { data: c } = Re(), { data: h } = un(), { data: g, isFetching: d } = cn(), w = Y(() => {
3512
+ const [l, o] = P(null), { data: c } = Re(), { data: h } = un(), { data: g, isFetching: d } = cn(), w = W(() => {
3513
3513
  const p = Nn(
3514
3514
  Fe(te(h, "languages"), (S) => {
3515
3515
  const v = fe(g, { lang: S });
@@ -3538,9 +3538,9 @@ const so = ({
3538
3538
  return me(t) || d ? null : /* @__PURE__ */ u(be, { children: [
3539
3539
  /* @__PURE__ */ u(rn, { children: [
3540
3540
  /* @__PURE__ */ r(an, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ u(_, { variant: "ghost", size: "sm", className: "gap-2", children: [
3541
- /* @__PURE__ */ r(Hi, { className: "w-4 h-4" }),
3541
+ /* @__PURE__ */ r(Vi, { className: "w-4 h-4" }),
3542
3542
  te(qe, a, a),
3543
- /* @__PURE__ */ r(_r, { className: "w-4 h-4" })
3543
+ /* @__PURE__ */ r(Ir, { className: "w-4 h-4" })
3544
3544
  ] }) }),
3545
3545
  /* @__PURE__ */ u(ln, { className: "border-border space-y-1", children: [
3546
3546
  Fe(
@@ -3548,7 +3548,7 @@ const so = ({
3548
3548
  (p) => /* @__PURE__ */ u(
3549
3549
  De,
3550
3550
  {
3551
- className: ti(
3551
+ className: si(
3552
3552
  "flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
3553
3553
  p.key === a && "!bg-gray-200 text-gray-700"
3554
3554
  ),
@@ -3560,7 +3560,7 @@ const so = ({
3560
3560
  {
3561
3561
  className: "text-[9px] flex items-center gap-x-1 text-orange-500 leading-none",
3562
3562
  children: [
3563
- /* @__PURE__ */ r(Ki, { fill: "orange", className: "w-2 h-2" }),
3563
+ /* @__PURE__ */ r(ji, { fill: "orange", className: "w-2 h-2" }),
3564
3564
  "Primary"
3565
3565
  ]
3566
3566
  }
@@ -3571,7 +3571,7 @@ const so = ({
3571
3571
  )
3572
3572
  ),
3573
3573
  !me(w.filter((p) => !p.isLangPageAdded)) && /* @__PURE__ */ u(be, { children: [
3574
- /* @__PURE__ */ r(pi, {}),
3574
+ /* @__PURE__ */ r(vi, {}),
3575
3575
  /* @__PURE__ */ u(
3576
3576
  _,
3577
3577
  {
@@ -3588,7 +3588,7 @@ const so = ({
3588
3588
  },
3589
3589
  className: "hover:bg-slate-300 duration-200 font-normal text-xs hover:text-slate-800",
3590
3590
  children: [
3591
- /* @__PURE__ */ r(gs, { className: "w-3 h-3 mr-1" }),
3591
+ /* @__PURE__ */ r(ps, { className: "w-3 h-3 mr-1" }),
3592
3592
  " Add Langauge"
3593
3593
  ]
3594
3594
  }
@@ -3597,7 +3597,7 @@ const so = ({
3597
3597
  ] })
3598
3598
  ] }),
3599
3599
  l && /* @__PURE__ */ r(
3600
- Hr,
3600
+ Kr,
3601
3601
  {
3602
3602
  languages: t,
3603
3603
  langProps: l,
@@ -3606,14 +3606,14 @@ const so = ({
3606
3606
  )
3607
3607
  ] });
3608
3608
  };
3609
- function ho() {
3609
+ function fo() {
3610
3610
  return /* @__PURE__ */ u("div", { className: "flex relative z-10 items-center justify-end gap-1", children: [
3611
- /* @__PURE__ */ r(oo, {}),
3612
- /* @__PURE__ */ r(co, {}),
3613
- /* @__PURE__ */ r(uo, {})
3611
+ /* @__PURE__ */ r(uo, {}),
3612
+ /* @__PURE__ */ r(ho, {}),
3613
+ /* @__PURE__ */ r(mo, {})
3614
3614
  ] });
3615
3615
  }
3616
- function mo(e) {
3616
+ function go(e) {
3617
3617
  const t = Q(), n = $();
3618
3618
  return Ne({
3619
3619
  queryKey: [ke, "revisions", e],
@@ -3626,7 +3626,7 @@ function mo(e) {
3626
3626
  staleTime: 0
3627
3627
  });
3628
3628
  }
3629
- const fo = () => {
3629
+ const po = () => {
3630
3630
  const e = Q(), t = $(), n = Se();
3631
3631
  return Ae({
3632
3632
  mutationFn: async (s) => await t(e, {
@@ -3637,7 +3637,7 @@ const fo = () => {
3637
3637
  n.invalidateQueries({ queryKey: ["revisions"] });
3638
3638
  }
3639
3639
  });
3640
- }, go = () => {
3640
+ }, yo = () => {
3641
3641
  const e = Q(), t = $(), n = Se();
3642
3642
  return Ae({
3643
3643
  mutationFn: async ({
@@ -3652,36 +3652,36 @@ const fo = () => {
3652
3652
  }
3653
3653
  });
3654
3654
  };
3655
- function po() {
3656
- const { data: e } = Re(), { saveState: t } = sr(), [n] = bs();
3655
+ function vo() {
3656
+ const { data: e } = Re(), { saveState: t } = rr(), [n] = ws();
3657
3657
  return e ? /* @__PURE__ */ r("div", { className: "flex items-start gap-3 rounded-md border p-2 hover:bg-accent/50 bg-primary/5 mb-4", children: /* @__PURE__ */ u("div", { className: "flex-1 space-y-1", children: [
3658
3658
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ r("p", { className: "text-sm flex items-center gap-1 font-medium leading-none", children: /* @__PURE__ */ r("span", { className: "font-bold", children: "Currently editing" }) }) }),
3659
3659
  /* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: !me(n.lastSaved) && /* @__PURE__ */ u("span", { children: [
3660
3660
  "Last updated",
3661
3661
  " ",
3662
- al(new Date(n.lastSaved), {
3662
+ ll(new Date(n.lastSaved), {
3663
3663
  addSuffix: !0
3664
3664
  })
3665
3665
  ] }) }),
3666
3666
  /* @__PURE__ */ u("div", { className: "flex items-center gap-2 pt-0.5", children: [
3667
3667
  /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-amber-500/10 px-1.5 py-0.5 text-xs text-amber-600", children: [
3668
- /* @__PURE__ */ r(zi, { className: "h-3 w-3" }),
3668
+ /* @__PURE__ */ r(Yi, { className: "h-3 w-3" }),
3669
3669
  /* @__PURE__ */ r("span", { children: "Draft" })
3670
3670
  ] }),
3671
3671
  t === "UNSAVED" ? /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-red-500/10 px-1.5 py-0.5 text-xs text-red-600", children: [
3672
- /* @__PURE__ */ r(kr, { className: "h-3 w-3" }),
3672
+ /* @__PURE__ */ r(Lr, { className: "h-3 w-3" }),
3673
3673
  /* @__PURE__ */ r("span", { children: " Unsaved changes" })
3674
3674
  ] }) : null
3675
3675
  ] })
3676
3676
  ] }) }) : null;
3677
3677
  }
3678
- function yo() {
3678
+ function Eo() {
3679
3679
  const [e, t] = ce.useState(!1), [n, s] = ce.useState(null), [a, i] = ce.useState(!1), [l, o] = ce.useState(!1), { data: c } = Re(), {
3680
3680
  data: h,
3681
3681
  isFetching: g,
3682
3682
  error: d,
3683
3683
  refetch: w
3684
- } = mo(c == null ? void 0 : c.id), { mutate: y, isPending: p } = fo(), { mutate: S, isPending: v } = go(), x = Se(), G = (U) => {
3684
+ } = go(c == null ? void 0 : c.id), { mutate: y, isPending: p } = po(), { mutate: S, isPending: v } = yo(), x = Se(), G = (U) => {
3685
3685
  n && S(
3686
3686
  { revisionId: n.uid, discardCurrent: U },
3687
3687
  {
@@ -3704,19 +3704,19 @@ function yo() {
3704
3704
  return we(() => {
3705
3705
  e && w();
3706
3706
  }, [e, w]), /* @__PURE__ */ u(be, { children: [
3707
- /* @__PURE__ */ r(wr, { children: /* @__PURE__ */ u(hs, { children: [
3708
- /* @__PURE__ */ u(yr, { open: e, onOpenChange: t, children: [
3709
- /* @__PURE__ */ r(yi, { asChild: !0, children: /* @__PURE__ */ r(ms, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
3707
+ /* @__PURE__ */ r(Sr, { children: /* @__PURE__ */ u(ms, { children: [
3708
+ /* @__PURE__ */ u(vr, { open: e, onOpenChange: t, children: [
3709
+ /* @__PURE__ */ r(Ei, { asChild: !0, children: /* @__PURE__ */ r(fs, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
3710
3710
  /* @__PURE__ */ u(_, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
3711
- /* @__PURE__ */ r(Us, { className: "h-4 w-4" }),
3711
+ /* @__PURE__ */ r(Rs, { className: "h-4 w-4" }),
3712
3712
  /* @__PURE__ */ r("span", { className: "sr-only", children: "View revision history" })
3713
3713
  ] }),
3714
3714
  /* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
3715
3715
  ] }) }) }),
3716
- /* @__PURE__ */ u(vr, { className: "sm:max-w-md p-4", children: [
3717
- /* @__PURE__ */ u(Er, { className: "pb-2", children: [
3718
- /* @__PURE__ */ u(br, { className: "flex items-center gap-2", children: [
3719
- /* @__PURE__ */ r(Us, { className: "h-5 w-5" }),
3716
+ /* @__PURE__ */ u(Er, { className: "sm:max-w-md p-4", children: [
3717
+ /* @__PURE__ */ u(br, { className: "pb-2", children: [
3718
+ /* @__PURE__ */ u(wr, { className: "flex items-center gap-2", children: [
3719
+ /* @__PURE__ */ r(Rs, { className: "h-5 w-5" }),
3720
3720
  "Revision History"
3721
3721
  ] }),
3722
3722
  (c == null ? void 0 : c.createdAt) && /* @__PURE__ */ u("p", { className: "text-xs text-muted-foreground mt-1", children: [
@@ -3728,10 +3728,10 @@ function yo() {
3728
3728
  )
3729
3729
  ] })
3730
3730
  ] }),
3731
- /* @__PURE__ */ r(vi, { className: "h-[calc(100vh-6rem)] pr-2", children: g ? /* @__PURE__ */ r(vo, {}) : d ? /* @__PURE__ */ r("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "Failed to load revisions. Please try again." }) : /* @__PURE__ */ u("div", { className: "mt-2 space-y-2", children: [
3732
- /* @__PURE__ */ r(po, {}),
3731
+ /* @__PURE__ */ r(bi, { className: "h-[calc(100vh-6rem)] pr-2", children: g ? /* @__PURE__ */ r(bo, {}) : d ? /* @__PURE__ */ r("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "Failed to load revisions. Please try again." }) : /* @__PURE__ */ u("div", { className: "mt-2 space-y-2", children: [
3732
+ /* @__PURE__ */ r(vo, {}),
3733
3733
  h == null ? void 0 : h.map((U) => /* @__PURE__ */ r(
3734
- Eo,
3734
+ wo,
3735
3735
  {
3736
3736
  revision: U,
3737
3737
  isLatest: U.uid === "current",
@@ -3743,10 +3743,10 @@ function yo() {
3743
3743
  ] }) })
3744
3744
  ] })
3745
3745
  ] }),
3746
- /* @__PURE__ */ r(fs, { side: "bottom", children: /* @__PURE__ */ r("p", { children: "Revision history" }) })
3746
+ /* @__PURE__ */ r(gs, { side: "bottom", children: /* @__PURE__ */ r("p", { children: "Revision history" }) })
3747
3747
  ] }) }),
3748
3748
  /* @__PURE__ */ r(
3749
- wo,
3749
+ No,
3750
3750
  {
3751
3751
  open: a,
3752
3752
  onOpenChange: i,
@@ -3756,7 +3756,7 @@ function yo() {
3756
3756
  }
3757
3757
  ),
3758
3758
  /* @__PURE__ */ r(
3759
- So,
3759
+ Ao,
3760
3760
  {
3761
3761
  open: l,
3762
3762
  onOpenChange: o,
@@ -3767,7 +3767,7 @@ function yo() {
3767
3767
  )
3768
3768
  ] });
3769
3769
  }
3770
- function vo() {
3770
+ function bo() {
3771
3771
  return /* @__PURE__ */ r("div", { className: "space-y-2 mt-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ u("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
3772
3772
  /* @__PURE__ */ u("div", { className: "flex-1 space-y-1", children: [
3773
3773
  /* @__PURE__ */ r(fn, { className: "h-4 w-3/4" }),
@@ -3777,7 +3777,7 @@ function vo() {
3777
3777
  /* @__PURE__ */ r(fn, { className: "h-8 w-8 rounded-full" })
3778
3778
  ] }, t)) });
3779
3779
  }
3780
- function Eo({
3780
+ function wo({
3781
3781
  revision: e,
3782
3782
  isLatest: t,
3783
3783
  onRestore: n,
@@ -3800,10 +3800,10 @@ function Eo({
3800
3800
  ] }) }),
3801
3801
  /* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: /* @__PURE__ */ r("span", { children: Gn(e.createdAt, "MMM d, h:mm a") }) }),
3802
3802
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2 pt-0.5", children: e.type === "published" ? /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-green-500/10 px-1.5 py-0.5 text-xs text-green-600", children: [
3803
- /* @__PURE__ */ r(Vi, { className: "h-3 w-3" }),
3803
+ /* @__PURE__ */ r($i, { className: "h-3 w-3" }),
3804
3804
  /* @__PURE__ */ r("span", { children: "Published" })
3805
3805
  ] }) : /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-amber-500/10 px-1.5 py-0.5 text-xs text-amber-600", children: [
3806
- /* @__PURE__ */ r(ji, { className: "h-3 w-3" }),
3806
+ /* @__PURE__ */ r(zi, { className: "h-3 w-3" }),
3807
3807
  /* @__PURE__ */ r("span", { children: "Draft" })
3808
3808
  ] }) })
3809
3809
  ] }),
@@ -3815,7 +3815,7 @@ function Eo({
3815
3815
  ue.DELETE_REVISION
3816
3816
  ],
3817
3817
  children: /* @__PURE__ */ r(
3818
- bo,
3818
+ So,
3819
3819
  {
3820
3820
  revision: e,
3821
3821
  onRestore: n,
@@ -3826,30 +3826,30 @@ function Eo({
3826
3826
  )
3827
3827
  ] });
3828
3828
  }
3829
- function bo({
3829
+ function So({
3830
3830
  revision: e,
3831
3831
  onRestore: t,
3832
3832
  onDelete: n
3833
3833
  }) {
3834
3834
  return /* @__PURE__ */ u(rn, { children: [
3835
3835
  /* @__PURE__ */ r(an, { asChild: !0, children: /* @__PURE__ */ u(_, { variant: "ghost", size: "icon", className: "h-7 w-7 -mr-1", children: [
3836
- /* @__PURE__ */ r(ps, { className: "h-4 w-4" }),
3836
+ /* @__PURE__ */ r(ys, { className: "h-4 w-4" }),
3837
3837
  /* @__PURE__ */ r("span", { className: "sr-only", children: "More options" })
3838
3838
  ] }) }),
3839
3839
  /* @__PURE__ */ u(ln, { align: "end", className: "text-xs", children: [
3840
3840
  /* @__PURE__ */ r(Oe, { permission: ue.RESTORE_REVISION, children: /* @__PURE__ */ u(De, { onClick: t, className: "cursor-pointer", children: [
3841
- /* @__PURE__ */ r(Ir, { className: "mr-2 h-4 w-4" }),
3841
+ /* @__PURE__ */ r(kr, { className: "mr-2 h-4 w-4" }),
3842
3842
  /* @__PURE__ */ r("span", { children: "Restore this version" })
3843
3843
  ] }) }),
3844
3844
  /* @__PURE__ */ r(Oe, { permission: ue.DELETE_REVISION, children: e.uid !== "current" && /* @__PURE__ */ u(be, { children: [
3845
- /* @__PURE__ */ r(Ei, {}),
3845
+ /* @__PURE__ */ r(wi, {}),
3846
3846
  /* @__PURE__ */ u(
3847
3847
  De,
3848
3848
  {
3849
3849
  onClick: n,
3850
3850
  className: "cursor-pointer text-destructive",
3851
3851
  children: [
3852
- /* @__PURE__ */ r(ys, { className: "mr-2 h-4 w-4" }),
3852
+ /* @__PURE__ */ r(vs, { className: "mr-2 h-4 w-4" }),
3853
3853
  /* @__PURE__ */ r("span", { children: "Delete this version" })
3854
3854
  ]
3855
3855
  }
@@ -3858,7 +3858,7 @@ function bo({
3858
3858
  ] })
3859
3859
  ] });
3860
3860
  }
3861
- function wo({
3861
+ function No({
3862
3862
  open: e,
3863
3863
  onOpenChange: t,
3864
3864
  revision: n,
@@ -3900,7 +3900,7 @@ function wo({
3900
3900
  /* @__PURE__ */ r("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
3901
3901
  "Saving as draft..."
3902
3902
  ] }) : /* @__PURE__ */ u(be, { children: [
3903
- /* @__PURE__ */ r($i, { className: "mr-2 h-4 w-4" }),
3903
+ /* @__PURE__ */ r(Wi, { className: "mr-2 h-4 w-4" }),
3904
3904
  "Save as draft"
3905
3905
  ] })
3906
3906
  }
@@ -3916,7 +3916,7 @@ function wo({
3916
3916
  /* @__PURE__ */ r("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
3917
3917
  "Discarding current..."
3918
3918
  ] }) : /* @__PURE__ */ u(be, { children: [
3919
- /* @__PURE__ */ r(Ir, { className: "mr-2 h-4 w-4" }),
3919
+ /* @__PURE__ */ r(kr, { className: "mr-2 h-4 w-4" }),
3920
3920
  "Discard current"
3921
3921
  ] })
3922
3922
  }
@@ -3926,7 +3926,7 @@ function wo({
3926
3926
  }
3927
3927
  ) : null;
3928
3928
  }
3929
- function So({
3929
+ function Ao({
3930
3930
  open: e,
3931
3931
  onOpenChange: t,
3932
3932
  revision: n,
@@ -3978,7 +3978,7 @@ function So({
3978
3978
  /* @__PURE__ */ r("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
3979
3979
  "Deleting..."
3980
3980
  ] }) : /* @__PURE__ */ u(be, { children: [
3981
- /* @__PURE__ */ r(ys, { className: "mr-2 h-4 w-4" }),
3981
+ /* @__PURE__ */ r(vs, { className: "mr-2 h-4 w-4" }),
3982
3982
  "Delete Revision"
3983
3983
  ] })
3984
3984
  }
@@ -3988,54 +3988,54 @@ function So({
3988
3988
  }
3989
3989
  ) : null;
3990
3990
  }
3991
- const No = () => {
3991
+ const xo = () => {
3992
3992
  const e = Q(), t = $();
3993
3993
  return Ne({
3994
3994
  queryKey: [ke, I.GET_CHANGES],
3995
3995
  queryFn: async () => t(e, { action: I.GET_CHANGES })
3996
3996
  });
3997
- }, Ao = ({ currentEditor: e }) => {
3997
+ }, To = ({ currentEditor: e }) => {
3998
3998
  const { data: t } = dn(e);
3999
3999
  return t == null ? void 0 : t.name;
4000
4000
  };
4001
- function xo({
4001
+ function Co({
4002
4002
  showModal: e = !1,
4003
4003
  onClose: t = () => console.log("Cancelled")
4004
4004
  }) {
4005
- const [n, s] = P([]), { data: a, isFetching: i } = No(), { data: l } = Ie(), o = _e(
4005
+ const [n, s] = P([]), { data: a, isFetching: i } = xo(), { data: l } = Ie(), o = _e(
4006
4006
  (b) => {
4007
4007
  var T;
4008
4008
  return (T = fe(l, { key: b })) == null ? void 0 : T.hasSlug;
4009
4009
  },
4010
4010
  [l]
4011
- ), c = Y(
4011
+ ), c = W(
4012
4012
  () => Te(l, (b) => !o(b.key)).map(
4013
4013
  (b) => b.key
4014
4014
  ),
4015
4015
  [o, l]
4016
- ), h = Y(
4016
+ ), h = W(
4017
4017
  () => Te(a, (b) => !c.includes(b.pageType)),
4018
4018
  [a, c]
4019
- ), g = Y(
4019
+ ), g = W(
4020
4020
  () => Te(a, (b) => c.includes(b.pageType)),
4021
4021
  [a, c]
4022
- ), d = Y(
4022
+ ), d = W(
4023
4023
  () => fe(a, { pageType: "theme", id: "THEME" }),
4024
4024
  [a]
4025
- ), { mutate: w, isPending: y } = Ss();
4025
+ ), { mutate: w, isPending: y } = Ns();
4026
4026
  we(() => {
4027
4027
  const b = Fe(Te(a, { online: !0 }), "id");
4028
4028
  d && b.push(d == null ? void 0 : d.id), s(b);
4029
4029
  }, [a, d]);
4030
4030
  const p = n.length === (a == null ? void 0 : a.length), S = (b) => {
4031
4031
  s(
4032
- (T) => Mt(T, b) ? Te(T, (U) => U !== b) : Xs(T, b)
4032
+ (T) => Mt(T, b) ? Te(T, (U) => U !== b) : Zs(T, b)
4033
4033
  );
4034
4034
  }, v = () => {
4035
4035
  s(p ? [] : Fe(a, "id"));
4036
4036
  }, x = () => {
4037
4037
  w(
4038
- { ids: Ha(n) },
4038
+ { ids: Ka(n) },
4039
4039
  {
4040
4040
  onSuccess: () => {
4041
4041
  t(), Tn("CENTER_CENTER");
@@ -4046,7 +4046,7 @@ function xo({
4046
4046
  if (b === "theme") return "Theme";
4047
4047
  const T = fe(l, { key: b });
4048
4048
  return T ? T == null ? void 0 : T.name : b;
4049
- }, E = Y(() => {
4049
+ }, E = W(() => {
4050
4050
  const b = [
4051
4051
  { label: "Updated", top: "pt-2" },
4052
4052
  ...mn(Te(h, { online: !0 }), "pageType"),
@@ -4131,7 +4131,7 @@ function xo({
4131
4131
  }
4132
4132
  ),
4133
4133
  " ",
4134
- o(b.pageType) ? /* @__PURE__ */ r(on, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Wi, { className: "w-4 h-4" }),
4134
+ o(b.pageType) ? /* @__PURE__ */ r(on, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Qi, { className: "w-4 h-4" }),
4135
4135
  b.name,
4136
4136
  b.slug && /* @__PURE__ */ u("span", { className: "text-xs text-gray-500", children: [
4137
4137
  "(",
@@ -4143,7 +4143,7 @@ function xo({
4143
4143
  "-",
4144
4144
  " ",
4145
4145
  /* @__PURE__ */ r(
4146
- Ao,
4146
+ To,
4147
4147
  {
4148
4148
  currentEditor: b.currentEditor
4149
4149
  }
@@ -4156,7 +4156,7 @@ function xo({
4156
4156
  ),
4157
4157
  /* @__PURE__ */ r("td", { className: "px-2", children: b.lang }),
4158
4158
  /* @__PURE__ */ r("td", { className: "px-2", children: G(b == null ? void 0 : b.pageType) }),
4159
- /* @__PURE__ */ r("td", { className: "px-4 text-right", children: qa(b.changes) || "" })
4159
+ /* @__PURE__ */ r("td", { className: "px-4 text-right", children: Ha(b.changes) || "" })
4160
4160
  ]
4161
4161
  },
4162
4162
  b == null ? void 0 : b.id
@@ -4176,7 +4176,7 @@ function xo({
4176
4176
  ] })
4177
4177
  ] }) });
4178
4178
  }
4179
- const To = () => {
4179
+ const Po = () => {
4180
4180
  const e = $(), t = Q();
4181
4181
  return Ne({
4182
4182
  queryKey: [I.GET_WEBSITE_DATA],
@@ -4187,8 +4187,8 @@ const To = () => {
4187
4187
  })
4188
4188
  });
4189
4189
  };
4190
- function Co({ onClose: e }) {
4191
- const { data: t, isFetching: n } = To(), { mutateAsync: s, isPending: a } = El(), i = dt("settingComponent", null), l = Ka(async (o) => (await s({ data: o }), !0), 300);
4190
+ function _o({ onClose: e }) {
4191
+ const { data: t, isFetching: n } = Po(), { mutateAsync: s, isPending: a } = wl(), i = dt("settingComponent", null), l = Va(async (o) => (await s({ data: o }), !0), 300);
4192
4192
  return i ? /* @__PURE__ */ r(He, { open: !0, onOpenChange: e, children: /* @__PURE__ */ u(Ke, { className: "w-full", children: [
4193
4193
  /* @__PURE__ */ r(Ve, { children: /* @__PURE__ */ r(je, { children: "Website Settings" }) }),
4194
4194
  n ? /* @__PURE__ */ u("div", { className: "w-full space-y-3 py-4", children: [
@@ -4198,7 +4198,7 @@ function Co({ onClose: e }) {
4198
4198
  /* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
4199
4199
  /* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
4200
4200
  /* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" })
4201
- ] }) : /* @__PURE__ */ r("div", { children: er.createElement(i, {
4201
+ ] }) : /* @__PURE__ */ r("div", { children: tr.createElement(i, {
4202
4202
  data: t || {},
4203
4203
  onSave: a ? () => {
4204
4204
  } : l,
@@ -4207,17 +4207,17 @@ function Co({ onClose: e }) {
4207
4207
  }) })
4208
4208
  ] }) }) : null;
4209
4209
  }
4210
- function Kr({
4210
+ function Vr({
4211
4211
  children: e,
4212
4212
  content: t
4213
4213
  }) {
4214
- return /* @__PURE__ */ r(wr, { children: /* @__PURE__ */ u(hs, { children: [
4215
- /* @__PURE__ */ r(ms, { asChild: !0, children: e }),
4216
- /* @__PURE__ */ r(fs, { side: "bottom", sideOffset: 10, children: /* @__PURE__ */ r("p", { children: t }) })
4214
+ return /* @__PURE__ */ r(Sr, { children: /* @__PURE__ */ u(ms, { children: [
4215
+ /* @__PURE__ */ r(fs, { asChild: !0, children: e }),
4216
+ /* @__PURE__ */ r(gs, { side: "bottom", sideOffset: 10, children: /* @__PURE__ */ r("p", { children: t }) })
4217
4217
  ] }) });
4218
4218
  }
4219
- const Po = () => {
4220
- const { selectedLang: e } = ut(), t = dt("getPreviewUrl", async (g) => g), [n, s] = P(""), { data: a, isFetching: i } = Re(), { data: l } = cn(), { data: o } = Ie(), c = Y(
4219
+ const Io = () => {
4220
+ const { selectedLang: e } = ut(), t = dt("getPreviewUrl", async (g) => g), [n, s] = P(""), { data: a, isFetching: i } = Re(), { data: l } = cn(), { data: o } = Ie(), c = W(
4221
4221
  () => {
4222
4222
  var g;
4223
4223
  return (g = l == null ? void 0 : l.find((d) => (d == null ? void 0 : d.lang) === e)) == null ? void 0 : g.slug;
@@ -4239,27 +4239,27 @@ const Po = () => {
4239
4239
  s("");
4240
4240
  })();
4241
4241
  }, [t, c]), !n || !h(a == null ? void 0 : a.pageType) || i ? null : /* @__PURE__ */ r(be, { children: /* @__PURE__ */ r("a", { href: n, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ u(_, { variant: "ghost", size: "sm", className: "gap-2", children: [
4242
- /* @__PURE__ */ r(Lr, { className: "w-4 h-4" }),
4242
+ /* @__PURE__ */ r(Dr, { className: "w-4 h-4" }),
4243
4243
  " ",
4244
4244
  B.PREVIEW
4245
4245
  ] }) }) });
4246
- }, _o = () => {
4247
- const [e, t] = ni();
4246
+ }, ko = () => {
4247
+ const [e, t] = ri();
4248
4248
  return /* @__PURE__ */ u(be, { children: [
4249
- /* @__PURE__ */ r(Kr, { content: B.THEME, children: /* @__PURE__ */ r(
4249
+ /* @__PURE__ */ r(Vr, { content: B.THEME, children: /* @__PURE__ */ r(
4250
4250
  _,
4251
4251
  {
4252
4252
  variant: e === "theme" ? "outline" : "ghost",
4253
4253
  size: "icon",
4254
4254
  className: "gap-2",
4255
4255
  onClick: () => t(e === "theme" ? "block" : "theme"),
4256
- children: /* @__PURE__ */ r(Yi, { className: "w-4 h-4" })
4256
+ children: /* @__PURE__ */ r(Xi, { className: "w-4 h-4" })
4257
4257
  }
4258
4258
  ) }),
4259
4259
  /* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
4260
4260
  ] });
4261
- }, Io = () => {
4262
- const [e, t] = P(!1), { isLocked: n } = hn(), { savePage: s, saveState: a } = sr();
4261
+ }, Lo = () => {
4262
+ const [e, t] = P(!1), { isLocked: n } = hn(), { savePage: s, saveState: a } = rr();
4263
4263
  we(() => {
4264
4264
  const g = (d) => {
4265
4265
  a === "UNSAVED" && (d.preventDefault(), d.returnValue = !1);
@@ -4274,27 +4274,27 @@ const Po = () => {
4274
4274
  we(() => {
4275
4275
  a === "SAVED" && t(!1);
4276
4276
  }, [a]);
4277
- const l = Y(() => {
4277
+ const l = W(() => {
4278
4278
  if (a === "SAVED" || a === "UNSAVED") return a;
4279
4279
  if (a === "SAVING") return e ? a : "SAVED";
4280
- }, [e, a]), { buttonIcon: o, buttonClass: c, tooltipContent: h } = Y(() => {
4280
+ }, [e, a]), { buttonIcon: o, buttonClass: c, tooltipContent: h } = W(() => {
4281
4281
  switch (l) {
4282
4282
  case "UNSAVED":
4283
4283
  return {
4284
4284
  tooltipContent: B.SAVEDRAFT,
4285
- buttonIcon: /* @__PURE__ */ r(kr, { className: "w-4 h-4" }),
4285
+ buttonIcon: /* @__PURE__ */ r(Lr, { className: "w-4 h-4" }),
4286
4286
  buttonClass: "flex items-center gap-x-1 leading-tight"
4287
4287
  };
4288
4288
  case "SAVING":
4289
4289
  return {
4290
4290
  tooltipContent: B.SAVING,
4291
- buttonIcon: /* @__PURE__ */ r(Pr, { className: "w-4 h-4 animate-spin" }),
4291
+ buttonIcon: /* @__PURE__ */ r(_r, { className: "w-4 h-4 animate-spin" }),
4292
4292
  buttonClass: "flex items-center gap-x-1 leading-tight"
4293
4293
  };
4294
4294
  case "SAVED":
4295
4295
  return {
4296
4296
  tooltipContent: B.SAVED,
4297
- buttonIcon: /* @__PURE__ */ r(Qi, { className: "w-4 h-4" }),
4297
+ buttonIcon: /* @__PURE__ */ r(Zi, { className: "w-4 h-4" }),
4298
4298
  buttonClass: "text-green-500 flex items-center gap-x-1 leading-tight"
4299
4299
  };
4300
4300
  }
@@ -4313,8 +4313,8 @@ const Po = () => {
4313
4313
  ]
4314
4314
  }
4315
4315
  );
4316
- }, ko = () => {
4317
- const [e, t] = P(!1), [n, s] = P(!1), [a, i] = P(null), { data: l } = Re(), { mutate: o, isPending: c } = Ss(), [h] = si(), { buttonText: g, buttonClassName: d, isPublished: w } = Y(() => {
4316
+ }, Do = () => {
4317
+ const [e, t] = P(!1), [n, s] = P(!1), [a, i] = P(null), { data: l } = Re(), { mutate: o, isPending: c } = Ns(), [h] = ai(), { buttonText: g, buttonClassName: d, isPublished: w } = W(() => {
4318
4318
  const p = l && (l == null ? void 0 : l.online);
4319
4319
  return {
4320
4320
  buttonClassName: p ? "hover:bg-green-600 bg-green-500" : "",
@@ -4345,14 +4345,14 @@ const Po = () => {
4345
4345
  "span",
4346
4346
  {
4347
4347
  className: `flex items-center transition-transform duration-300 ease-in-out ${n ? "-translate-y-10" : ""}`,
4348
- children: w ? /* @__PURE__ */ r(Rs, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Os, { className: "w-4 h-4" })
4348
+ children: w ? /* @__PURE__ */ r(Os, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Bs, { className: "w-4 h-4" })
4349
4349
  }
4350
4350
  ),
4351
4351
  /* @__PURE__ */ r(
4352
4352
  "span",
4353
4353
  {
4354
4354
  className: `absolute inset-0 flex items-center left-3 transition-transform duration-300 ease-in-out ${n ? "" : "translate-y-10"}`,
4355
- children: w ? /* @__PURE__ */ r(Os, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Rs, { className: "w-4 h-4" })
4355
+ children: w ? /* @__PURE__ */ r(Bs, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Os, { className: "w-4 h-4" })
4356
4356
  }
4357
4357
  ),
4358
4358
  /* @__PURE__ */ r("span", { children: g })
@@ -4366,7 +4366,7 @@ const Po = () => {
4366
4366
  size: "sm",
4367
4367
  disabled: c || !(l != null && l.id),
4368
4368
  className: `px-2 text-white border-l border-white/50 rounded-l-none ${d}`,
4369
- children: /* @__PURE__ */ r(_r, { className: "w-4 h-4" })
4369
+ children: /* @__PURE__ */ r(Ir, { className: "w-4 h-4" })
4370
4370
  }
4371
4371
  ) }),
4372
4372
  /* @__PURE__ */ u(ln, { align: "end", className: "w-36", children: [
@@ -4410,32 +4410,32 @@ const Po = () => {
4410
4410
  ] })
4411
4411
  ] })
4412
4412
  ] }),
4413
- /* @__PURE__ */ r(xo, { showModal: e, onClose: () => t(!1) }),
4413
+ /* @__PURE__ */ r(Co, { showModal: e, onClose: () => t(!1) }),
4414
4414
  a && /* @__PURE__ */ r(
4415
- As,
4415
+ xs,
4416
4416
  {
4417
4417
  page: a,
4418
4418
  onClose: () => i(null)
4419
4419
  }
4420
4420
  )
4421
4421
  ] });
4422
- }, Lo = () => {
4422
+ }, Go = () => {
4423
4423
  const e = dt("settingComponent", null), [t, n] = P(!1);
4424
4424
  return e ? /* @__PURE__ */ u(be, { children: [
4425
- /* @__PURE__ */ r(Kr, { content: B.WEBSITEDATA, children: /* @__PURE__ */ r(
4425
+ /* @__PURE__ */ r(Vr, { content: B.WEBSITEDATA, children: /* @__PURE__ */ r(
4426
4426
  _,
4427
4427
  {
4428
4428
  variant: "ghost",
4429
4429
  size: "icon",
4430
4430
  className: "gap-2",
4431
4431
  onClick: () => n(!0),
4432
- children: /* @__PURE__ */ r(Xi, { className: "w-4 h-4" })
4432
+ children: /* @__PURE__ */ r(Ji, { className: "w-4 h-4" })
4433
4433
  }
4434
4434
  ) }),
4435
- t && /* @__PURE__ */ r(Co, { onClose: () => n(!1) }),
4435
+ t && /* @__PURE__ */ r(_o, { onClose: () => n(!1) }),
4436
4436
  /* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
4437
4437
  ] }) : null;
4438
- }, Do = () => {
4438
+ }, Uo = () => {
4439
4439
  const { data: e } = Re(), t = e && (e == null ? void 0 : e.online), { data: n } = Ie();
4440
4440
  return _e(
4441
4441
  (a) => {
@@ -4452,29 +4452,29 @@ const Po = () => {
4452
4452
  size: "sm",
4453
4453
  className: "flex items-center gap-1",
4454
4454
  children: [
4455
- /* @__PURE__ */ r(Zi, { className: "w-4 h-4" }),
4455
+ /* @__PURE__ */ r(el, { className: "w-4 h-4" }),
4456
4456
  /* @__PURE__ */ r("span", { className: "hidden sm:inline", children: B.OPEN })
4457
4457
  ]
4458
4458
  }
4459
4459
  ) : null;
4460
4460
  };
4461
- function Go() {
4462
- const { isLocked: e } = hn(), [t] = Ue(), n = t.get("lang"), s = Or(n);
4461
+ function Ro() {
4462
+ const { isLocked: e } = hn(), [t] = Ue(), n = t.get("lang"), s = Br(n);
4463
4463
  return e || !s ? null : /* @__PURE__ */ u("div", { className: "flex items-center justify-end gap-1", children: [
4464
- /* @__PURE__ */ r(yo, {}),
4465
- /* @__PURE__ */ r(Oe, { permission: ue.EDIT_THEME, children: /* @__PURE__ */ r(_o, {}) }),
4466
- /* @__PURE__ */ r(Oe, { permission: ue.EDIT_SETTINGS, children: /* @__PURE__ */ r(Lo, {}) }),
4467
- /* @__PURE__ */ r(Po, {}),
4468
- /* @__PURE__ */ r(Oe, { permission: ue.SAVE_PAGE, children: /* @__PURE__ */ r(Io, {}) }),
4469
- /* @__PURE__ */ r(Oe, { permission: ue.PUBLISH_PAGE, children: /* @__PURE__ */ r(ko, {}) }),
4470
- /* @__PURE__ */ r(Do, {})
4464
+ /* @__PURE__ */ r(Eo, {}),
4465
+ /* @__PURE__ */ r(Oe, { permission: ue.EDIT_THEME, children: /* @__PURE__ */ r(ko, {}) }),
4466
+ /* @__PURE__ */ r(Oe, { permission: ue.EDIT_SETTINGS, children: /* @__PURE__ */ r(Go, {}) }),
4467
+ /* @__PURE__ */ r(Io, {}),
4468
+ /* @__PURE__ */ r(Oe, { permission: ue.SAVE_PAGE, children: /* @__PURE__ */ r(Lo, {}) }),
4469
+ /* @__PURE__ */ r(Oe, { permission: ue.PUBLISH_PAGE, children: /* @__PURE__ */ r(Do, {}) }),
4470
+ /* @__PURE__ */ r(Uo, {})
4471
4471
  ] });
4472
4472
  }
4473
- const Uo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-center justify-between w-full", children: [
4474
- /* @__PURE__ */ r(ho, {}),
4475
- /* @__PURE__ */ r(Go, {})
4476
- ] }), Ro = () => {
4477
- const e = Q(), { aiContext: t } = Es(), n = $();
4473
+ const Oo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-center justify-between w-full", children: [
4474
+ /* @__PURE__ */ r(fo, {}),
4475
+ /* @__PURE__ */ r(Ro, {})
4476
+ ] }), Bo = () => {
4477
+ const e = Q(), { aiContext: t } = bs(), n = $();
4478
4478
  return _e(
4479
4479
  async (s, a, i, l) => n(e, {
4480
4480
  action: I.ASK_AI,
@@ -4482,35 +4482,35 @@ const Uo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4482
4482
  }),
4483
4483
  [e, t, n]
4484
4484
  );
4485
- }, Oo = (e, t) => t.map((n) => {
4485
+ }, Mo = (e, t) => t.map((n) => {
4486
4486
  if (nn(e, n._type)) {
4487
- const s = ll(n._type);
4487
+ const s = cl(n._type);
4488
4488
  return {
4489
4489
  ...s,
4490
- ...Js(n, [
4491
- ...Va(s),
4490
+ ...er(n, [
4491
+ ...ja(s),
4492
4492
  "_type",
4493
4493
  "_id",
4494
4494
  "_name",
4495
4495
  "_parent",
4496
4496
  "_bindings"
4497
4497
  ]),
4498
- ...ja(n, (a, i) => Zs(i, "_attrs")),
4498
+ ...$a(n, (a, i) => Js(i, "_attrs")),
4499
4499
  ...n
4500
4500
  };
4501
4501
  }
4502
4502
  return n;
4503
- }), Bo = (e) => {
4504
- const t = il();
4505
- return Y(() => {
4503
+ }), Fo = (e) => {
4504
+ const t = ol();
4505
+ return W(() => {
4506
4506
  if (!e || me(e)) return { blocks: [] };
4507
4507
  const n = Te(
4508
4508
  e,
4509
4509
  (s) => !Mt(s == null ? void 0 : s._type, "@chai/")
4510
4510
  );
4511
- return { blocks: Oo(t, n) };
4511
+ return { blocks: Mo(t, n) };
4512
4512
  }, [e, t]);
4513
- }, Mo = () => {
4513
+ }, qo = () => {
4514
4514
  const e = Q(), t = $();
4515
4515
  return Ne({
4516
4516
  queryKey: [ke, "uiLibraries"],
@@ -4519,7 +4519,7 @@ const Uo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4519
4519
  ...s
4520
4520
  }))
4521
4521
  });
4522
- }, Fo = () => {
4522
+ }, Ho = () => {
4523
4523
  const e = Un(), t = $(), { user: n } = st(), s = n == null ? void 0 : n.id;
4524
4524
  return Ne({
4525
4525
  queryKey: [ke, "permissions", s],
@@ -4529,14 +4529,14 @@ const Uo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4529
4529
  }),
4530
4530
  enabled: !!s
4531
4531
  });
4532
- }, qo = () => {
4533
- const e = Q(), t = $(), { setCurrentEditor: n } = hn(), [, s] = bs();
4532
+ }, Ko = () => {
4533
+ const e = Q(), t = $(), { setCurrentEditor: n } = hn(), [, s] = ws();
4534
4534
  return { getUILibraryBlock: async (o, c) => {
4535
4535
  const h = await t(e, {
4536
4536
  action: "GET_LIBRARY_ITEM",
4537
4537
  data: { id: c.id }
4538
4538
  }), g = te(h, "html", ""), d = te(h, "blocks", []);
4539
- return $a(d) ? d : ri(g);
4539
+ return za(d) ? d : ii(g);
4540
4540
  }, getUILibraryBlocks: async (o) => {
4541
4541
  try {
4542
4542
  return (await t(e, {
@@ -4567,7 +4567,7 @@ const Uo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4567
4567
  return console.error(h), new Error("Failed to save blocks");
4568
4568
  }
4569
4569
  } };
4570
- }, Ho = () => {
4570
+ }, Vo = () => {
4571
4571
  const { data: e } = Rn(), t = Q(), n = $();
4572
4572
  return {
4573
4573
  getPartialBlocks: _e(async () => {
@@ -4596,16 +4596,16 @@ const Uo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4596
4596
  [n, t]
4597
4597
  )
4598
4598
  };
4599
- }, Ms = An.object({
4599
+ }, Fs = An.object({
4600
4600
  email: An.string().email({ message: "Please enter a valid email address" }),
4601
4601
  password: An.string().min(6, { message: "Password must be at least 6 characters" })
4602
- }), Ko = ({
4602
+ }), jo = ({
4603
4603
  onLoginSuccess: e
4604
4604
  }) => {
4605
4605
  const t = Un(), [n, s] = P(""), [a, i] = P(""), [l, o] = P({}), [c, h] = P(!1), [g, d] = P(""), w = Ae({
4606
4606
  mutationFn: async (S) => {
4607
4607
  d("");
4608
- const v = await vs(t, {
4608
+ const v = await Es(t, {
4609
4609
  action: "LOGIN",
4610
4610
  data: S
4611
4611
  });
@@ -4629,7 +4629,7 @@ const Uo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4629
4629
  S.preventDefault(), o({});
4630
4630
  const v = { email: n, password: a };
4631
4631
  try {
4632
- const x = Ms.parse(v);
4632
+ const x = Fs.parse(v);
4633
4633
  w.mutate(x);
4634
4634
  } catch (x) {
4635
4635
  if (x instanceof An.ZodError) {
@@ -4640,13 +4640,13 @@ const Uo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4640
4640
  o(G);
4641
4641
  }
4642
4642
  }
4643
- }, p = Ms.safeParse({ email: n, password: a }).success;
4644
- return /* @__PURE__ */ r("div", { className: "flex justify-center items-center min-h-screen bg-slate-50", children: /* @__PURE__ */ u(ls, { className: "w-full max-w-md", children: [
4645
- /* @__PURE__ */ u(os, { children: [
4646
- /* @__PURE__ */ r(cs, { className: "text-2xl", children: "Sign in" }),
4647
- /* @__PURE__ */ r(bi, { children: "Enter your credentials to sign in to visual builder" })
4643
+ }, p = Fs.safeParse({ email: n, password: a }).success;
4644
+ return /* @__PURE__ */ r("div", { className: "flex justify-center items-center min-h-screen bg-slate-50", children: /* @__PURE__ */ u(os, { className: "w-full max-w-md", children: [
4645
+ /* @__PURE__ */ u(cs, { children: [
4646
+ /* @__PURE__ */ r(us, { className: "text-2xl", children: "Sign in" }),
4647
+ /* @__PURE__ */ r(Si, { children: "Enter your credentials to sign in to visual builder" })
4648
4648
  ] }),
4649
- /* @__PURE__ */ r(us, { children: /* @__PURE__ */ u("form", { onSubmit: y, className: "space-y-4", children: [
4649
+ /* @__PURE__ */ r(ds, { children: /* @__PURE__ */ u("form", { onSubmit: y, className: "space-y-4", children: [
4650
4650
  /* @__PURE__ */ u("div", { className: "space-y-1", children: [
4651
4651
  /* @__PURE__ */ r(X, { htmlFor: "email", children: "Email" }),
4652
4652
  /* @__PURE__ */ r(
@@ -4682,7 +4682,7 @@ const Uo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4682
4682
  type: "button",
4683
4683
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",
4684
4684
  onClick: () => h(!c),
4685
- children: c ? /* @__PURE__ */ r(Ji, { className: "h-4 w-4" }) : /* @__PURE__ */ r(Lr, { className: "h-4 w-4" })
4685
+ children: c ? /* @__PURE__ */ r(tl, { className: "h-4 w-4" }) : /* @__PURE__ */ r(Dr, { className: "h-4 w-4" })
4686
4686
  }
4687
4687
  )
4688
4688
  ] }),
@@ -4696,13 +4696,13 @@ const Uo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4696
4696
  className: "w-full",
4697
4697
  disabled: !p || w.isPending,
4698
4698
  children: w.isPending ? /* @__PURE__ */ u(be, { children: [
4699
- /* @__PURE__ */ r(Dr, { className: "mr-2 h-4 w-4 animate-spin" }),
4699
+ /* @__PURE__ */ r(Gr, { className: "mr-2 h-4 w-4 animate-spin" }),
4700
4700
  "Logging in..."
4701
4701
  ] }) : "Login"
4702
4702
  }
4703
4703
  )
4704
4704
  ] }) }),
4705
- /* @__PURE__ */ u(ds, { className: "flex flex-col justify-center", children: [
4705
+ /* @__PURE__ */ u(hs, { className: "flex flex-col justify-center", children: [
4706
4706
  /* @__PURE__ */ u("p", { className: "text-sm text-muted-foreground", children: [
4707
4707
  "Forgot your password?",
4708
4708
  " ",
@@ -4743,28 +4743,32 @@ const Uo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
4743
4743
  ] })
4744
4744
  ] })
4745
4745
  ] }) });
4746
- }, Vo = () => {
4747
- const { setUser: e } = st();
4748
- return /* @__PURE__ */ r(
4749
- Ko,
4746
+ };
4747
+ let Wn = jo;
4748
+ const $o = () => W(() => Wn, [Wn]), Yu = (e) => {
4749
+ Wn = e;
4750
+ }, zo = () => {
4751
+ const { setUser: e } = st(), t = $o();
4752
+ return /* @__PURE__ */ r(Ya, { fallback: /* @__PURE__ */ r("div", { children: "Loading..." }), children: /* @__PURE__ */ r(
4753
+ t,
4750
4754
  {
4751
- onLoginSuccess: (t) => {
4752
- e(t);
4755
+ onLoginSuccess: (n) => {
4756
+ e(n);
4753
4757
  }
4754
4758
  }
4755
- );
4756
- }, jo = ({
4759
+ ) });
4760
+ }, Wo = ({
4757
4761
  isActive: e,
4758
4762
  show: t
4759
4763
  }) => {
4760
4764
  const { data: n } = un();
4761
- return !nn(n, "languages") || !te(n, "languages", []).length ? null : /* @__PURE__ */ r(_, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ r(el, { className: "w-4 h-4" }) });
4762
- }, Vr = "lang", $o = {
4763
- id: Vr,
4765
+ return !nn(n, "languages") || !te(n, "languages", []).length ? null : /* @__PURE__ */ r(_, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ r(nl, { className: "w-4 h-4" }) });
4766
+ }, jr = "lang", Yo = {
4767
+ id: jr,
4764
4768
  label: "Languages",
4765
4769
  position: "top",
4766
- panel: Ql,
4767
- button: jo,
4770
+ panel: Zl,
4771
+ button: Wo,
4768
4772
  view: "modal",
4769
4773
  width: 400
4770
4774
  };
@@ -4794,9 +4798,9 @@ function Ze({
4794
4798
  value: S,
4795
4799
  type: g(S)
4796
4800
  })).filter((p) => n === "value" ? p.type === "value" || p.type === "object" : n === "array" ? p.type === "array" || p.type === "object" : n === "object" ? p.type === "object" : !0), [c, n]);
4797
- return /* @__PURE__ */ u(mr, { open: a, onOpenChange: i, children: [
4798
- /* @__PURE__ */ u(hs, { children: [
4799
- /* @__PURE__ */ r(ms, { asChild: !0, children: /* @__PURE__ */ r(fr, { asChild: !0, children: /* @__PURE__ */ r(
4801
+ return /* @__PURE__ */ u(fr, { open: a, onOpenChange: i, children: [
4802
+ /* @__PURE__ */ u(ms, { children: [
4803
+ /* @__PURE__ */ r(fs, { asChild: !0, children: /* @__PURE__ */ r(gr, { asChild: !0, children: /* @__PURE__ */ r(
4800
4804
  _,
4801
4805
  {
4802
4806
  size: "sm",
@@ -4805,29 +4809,29 @@ function Ze({
4805
4809
  role: "combobox",
4806
4810
  "aria-expanded": a,
4807
4811
  disabled: s,
4808
- children: /* @__PURE__ */ r(tl, { className: "h-3 w-3" })
4812
+ children: /* @__PURE__ */ r(sl, { className: "h-3 w-3" })
4809
4813
  }
4810
4814
  ) }) }),
4811
- /* @__PURE__ */ r(fs, { children: "Add field" })
4815
+ /* @__PURE__ */ r(gs, { children: "Add field" })
4812
4816
  ] }),
4813
- /* @__PURE__ */ r(gr, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ u(wi, { children: [
4814
- /* @__PURE__ */ r(Si, { className: "border-none", placeholder: "Search..." }),
4815
- /* @__PURE__ */ u(Ni, { children: [
4816
- /* @__PURE__ */ r(Ai, { children: "No option found." }),
4817
- /* @__PURE__ */ u(xi, { children: [
4817
+ /* @__PURE__ */ r(pr, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ u(Ni, { children: [
4818
+ /* @__PURE__ */ r(Ai, { className: "border-none", placeholder: "Search..." }),
4819
+ /* @__PURE__ */ u(xi, { children: [
4820
+ /* @__PURE__ */ r(Ti, { children: "No option found." }),
4821
+ /* @__PURE__ */ u(Ci, { children: [
4818
4822
  l.length > 0 && /* @__PURE__ */ u(
4819
- Ds,
4823
+ Gs,
4820
4824
  {
4821
4825
  onSelect: w,
4822
4826
  className: "flex items-center text-sm",
4823
4827
  children: [
4824
- /* @__PURE__ */ r(nl, { className: "w-4 h-4 mr-2" }),
4828
+ /* @__PURE__ */ r(rl, { className: "w-4 h-4 mr-2" }),
4825
4829
  "Back"
4826
4830
  ]
4827
4831
  }
4828
4832
  ),
4829
4833
  y.map((p) => /* @__PURE__ */ u(
4830
- Ds,
4834
+ Gs,
4831
4835
  {
4832
4836
  onSelect: () => d(p),
4833
4837
  className: "flex items-center justify-between",
@@ -4846,7 +4850,7 @@ function Ze({
4846
4850
  children: "Select"
4847
4851
  }
4848
4852
  ),
4849
- (p.type === "object" || p.type === "array") && /* @__PURE__ */ r("div", { className: "p-1 rounded hover:bg-muted cursor-pointer", children: /* @__PURE__ */ r(sl, { className: "w-4 h-4 opacity-50" }) })
4853
+ (p.type === "object" || p.type === "array") && /* @__PURE__ */ r("div", { className: "p-1 rounded hover:bg-muted cursor-pointer", children: /* @__PURE__ */ r(al, { className: "w-4 h-4 opacity-50" }) })
4850
4854
  ] })
4851
4855
  ]
4852
4856
  },
@@ -4857,10 +4861,10 @@ function Ze({
4857
4861
  ] }) })
4858
4862
  ] });
4859
4863
  }
4860
- const zo = () => {
4864
+ const Qo = () => {
4861
4865
  const { selectedLang: e } = ut(), { data: t, isFetching: n } = cn();
4862
- return { data: Y(() => fe(t, { lang: e || "" }) || {}, [t, e]), isFetching: n };
4863
- }, Wo = (e, t) => {
4866
+ return { data: W(() => fe(t, { lang: e || "" }) || {}, [t, e]), isFetching: n };
4867
+ }, Xo = (e, t) => {
4864
4868
  const n = e.selectionStart || 0, s = e.selectionEnd || 0, a = e.value, i = a.substring(0, n), l = a.substring(s);
4865
4869
  let o = !1;
4866
4870
  if (n > 0 && i.length > 0) {
@@ -4878,11 +4882,11 @@ const zo = () => {
4878
4882
  value: w,
4879
4883
  newCursorPos: y
4880
4884
  };
4881
- }, jr = () => {
4882
- const { t: e } = ai(), { selectedLang: t, fallbackLang: n, languages: s } = ut(), [, a] = ii(), { data: i } = Re(), { data: l } = Mr({
4885
+ }, $r = () => {
4886
+ const { t: e } = li(), { selectedLang: t, fallbackLang: n, languages: s } = ut(), [, a] = oi(), { data: i } = Re(), { data: l } = Fr({
4883
4887
  lang: t || n,
4884
4888
  pageType: i == null ? void 0 : i.pageType
4885
- }), { data: o, isFetching: c } = zo(), h = o == null ? void 0 : o.seo, g = ct(
4889
+ }), { data: o, isFetching: c } = Qo(), h = o == null ? void 0 : o.seo, g = ct(
4886
4890
  null
4887
4891
  ), [d, w] = P({
4888
4892
  title: "",
@@ -4897,7 +4901,7 @@ const zo = () => {
4897
4901
  searchDescription: "",
4898
4902
  jsonLD: "",
4899
4903
  ...h
4900
- }), y = ct({ initial: d, updated: d }), p = t.length ? t : n, { mutate: S, isPending: v } = ws(), x = v, { hasPermission: G } = sn(), E = G(ue.EDIT_SEO);
4904
+ }), y = ct({ initial: d, updated: d }), p = t.length ? t : n, { mutate: S, isPending: v } = Ss(), x = v, { hasPermission: G } = sn(), E = G(ue.EDIT_SEO);
4901
4905
  we(() => {
4902
4906
  !c && h && w({
4903
4907
  title: "",
@@ -4938,7 +4942,7 @@ const zo = () => {
4938
4942
  }, J = (k, q) => {
4939
4943
  const A = document.getElementById(q);
4940
4944
  if (A) {
4941
- const { value: M, newCursorPos: ne } = Wo(
4945
+ const { value: M, newCursorPos: ne } = Xo(
4942
4946
  A,
4943
4947
  k
4944
4948
  );
@@ -4976,7 +4980,7 @@ const zo = () => {
4976
4980
  w(q), y.current.updated = q;
4977
4981
  };
4978
4982
  return /* @__PURE__ */ u("div", { className: "relative h-full flex flex-col", children: [
4979
- !E && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ r(pr, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ r(Ti, { children: e(
4983
+ !E && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ r(yr, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ r(Pi, { children: e(
4980
4984
  "You don't have permission to edit SEO settings. Contact your administrator for access."
4981
4985
  ) }) }) }),
4982
4986
  /* @__PURE__ */ u("div", { className: "flex-grow overflow-y-auto no-scrollbar px-2", children: [
@@ -4991,7 +4995,7 @@ const zo = () => {
4991
4995
  ")"
4992
4996
  ] })
4993
4997
  ] }),
4994
- /* @__PURE__ */ r("form", { className: "space-y-8", children: /* @__PURE__ */ u(Ci, { type: "multiple", defaultValue: ["page"], children: [
4998
+ /* @__PURE__ */ r("form", { className: "space-y-8", children: /* @__PURE__ */ u(_i, { type: "multiple", defaultValue: ["page"], children: [
4995
4999
  /* @__PURE__ */ u(gn, { value: "page", children: [
4996
5000
  /* @__PURE__ */ r(pn, { className: "font-semibold text-slate-700", children: e("SEO") }),
4997
5001
  /* @__PURE__ */ r(yn, { className: "pt-2", children: /* @__PURE__ */ u("div", { className: "space-y-4", children: [
@@ -5313,18 +5317,18 @@ const zo = () => {
5313
5317
  size: "lg",
5314
5318
  variant: "default",
5315
5319
  onClick: b,
5316
- disabled: as(y.current.initial, d) || x || !E,
5320
+ disabled: is(y.current.initial, d) || x || !E,
5317
5321
  children: e(v ? "Saving..." : "Save")
5318
5322
  }
5319
5323
  ) })
5320
5324
  ] });
5321
5325
  };
5322
- jr.displayName = "SeoPanel";
5323
- const $r = "seo", Yo = ({
5326
+ $r.displayName = "SeoPanel";
5327
+ const zr = "seo", Zo = ({
5324
5328
  isActive: e,
5325
5329
  show: t
5326
5330
  }) => {
5327
- const { data: n } = Re(), s = Bl(n == null ? void 0 : n.pageType);
5331
+ const { data: n } = Re(), s = Fl(n == null ? void 0 : n.pageType);
5328
5332
  return !nn(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ r(
5329
5333
  _,
5330
5334
  {
@@ -5347,42 +5351,42 @@ const $r = "seo", Yo = ({
5347
5351
  )
5348
5352
  }
5349
5353
  );
5350
- }, Qo = {
5351
- id: $r,
5354
+ }, Jo = {
5355
+ id: zr,
5352
5356
  label: "SEO",
5353
- panel: jr,
5354
- button: Yo,
5357
+ panel: $r,
5358
+ button: Zo,
5355
5359
  position: "top",
5356
5360
  view: "modal",
5357
5361
  width: 600
5358
- }, Xo = () => {
5359
- zn($r, Qo), zn(Vr, $o);
5360
- }, Zo = "user-info", Jo = () => {
5362
+ }, ec = () => {
5363
+ zn(zr, Jo), zn(jr, Yo);
5364
+ }, tc = "user-info", nc = () => {
5361
5365
  const { user: e, logout: t } = st();
5362
- return e ? /* @__PURE__ */ u(Pi, { children: [
5363
- /* @__PURE__ */ r(_i, { asChild: !0, children: /* @__PURE__ */ r(_, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ r(rl, { className: "w-4 h-4" }) }) }),
5364
- /* @__PURE__ */ u(Ii, { className: "w-auto p-4 space-y-2", children: [
5366
+ return e ? /* @__PURE__ */ u(Ii, { children: [
5367
+ /* @__PURE__ */ r(ki, { asChild: !0, children: /* @__PURE__ */ r(_, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ r(il, { className: "w-4 h-4" }) }) }),
5368
+ /* @__PURE__ */ u(Li, { className: "w-auto p-4 space-y-2", children: [
5365
5369
  /* @__PURE__ */ r("div", { className: "text-sm font-medium", children: e.name ?? e.email }),
5366
5370
  /* @__PURE__ */ r("div", { className: "text-xs text-muted-foreground", children: e.email }),
5367
- /* @__PURE__ */ u(rr, { children: [
5368
- /* @__PURE__ */ r(ar, { asChild: !0, children: /* @__PURE__ */ r(_, { variant: "outline", size: "sm", className: "w-full", children: "Logout" }) }),
5369
- /* @__PURE__ */ u(ir, { children: [
5370
- /* @__PURE__ */ u(lr, { children: [
5371
- /* @__PURE__ */ r(or, { children: "Are you sure you want to logout?" }),
5372
- /* @__PURE__ */ r(cr, { children: "You will be redirected to the login page." })
5371
+ /* @__PURE__ */ u(ar, { children: [
5372
+ /* @__PURE__ */ r(ir, { asChild: !0, children: /* @__PURE__ */ r(_, { variant: "outline", size: "sm", className: "w-full", children: "Logout" }) }),
5373
+ /* @__PURE__ */ u(lr, { children: [
5374
+ /* @__PURE__ */ u(or, { children: [
5375
+ /* @__PURE__ */ r(cr, { children: "Are you sure you want to logout?" }),
5376
+ /* @__PURE__ */ r(ur, { children: "You will be redirected to the login page." })
5373
5377
  ] }),
5374
- /* @__PURE__ */ u(ur, { children: [
5375
- /* @__PURE__ */ r(dr, { children: "Cancel" }),
5376
- /* @__PURE__ */ r(hr, { onClick: () => t(), children: "Logout" })
5378
+ /* @__PURE__ */ u(dr, { children: [
5379
+ /* @__PURE__ */ r(hr, { children: "Cancel" }),
5380
+ /* @__PURE__ */ r(mr, { onClick: () => t(), children: "Logout" })
5377
5381
  ] })
5378
5382
  ] })
5379
5383
  ] })
5380
5384
  ] })
5381
5385
  ] }) : null;
5382
- }, ec = {
5383
- id: Zo,
5386
+ }, sc = {
5387
+ id: tc,
5384
5388
  label: "User Info",
5385
- button: Jo,
5389
+ button: nc,
5386
5390
  position: "bottom"
5387
5391
  };
5388
5392
  var O = {
@@ -5391,29 +5395,29 @@ var O = {
5391
5395
  effects: void 0,
5392
5396
  done: !1,
5393
5397
  getContextId() {
5394
- return Fs(this.context.count);
5398
+ return qs(this.context.count);
5395
5399
  },
5396
5400
  getNextContextId() {
5397
- return Fs(this.context.count++);
5401
+ return qs(this.context.count++);
5398
5402
  }
5399
5403
  };
5400
- function Fs(e) {
5404
+ function qs(e) {
5401
5405
  const t = String(e), n = t.length - 1;
5402
5406
  return O.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
5403
5407
  }
5404
5408
  function Ut(e) {
5405
5409
  O.context = e;
5406
5410
  }
5407
- var tc = (e, t) => e === t, Cn = Symbol("solid-proxy"), zr = typeof Proxy == "function", Wr = Symbol("solid-track"), Pn = {
5408
- equals: tc
5409
- }, Yr = ta, tt = 1, _n = 2, Qr = {
5411
+ var rc = (e, t) => e === t, Cn = Symbol("solid-proxy"), Wr = typeof Proxy == "function", Yr = Symbol("solid-track"), Pn = {
5412
+ equals: rc
5413
+ }, Qr = na, tt = 1, _n = 2, Xr = {
5410
5414
  owned: null,
5411
5415
  cleanups: null,
5412
5416
  context: null,
5413
5417
  owner: null
5414
- }, Kn = {}, Z = null, Vn = null, nc = null, re = null, Pe = null, Je = null, On = 0;
5418
+ }, Kn = {}, Z = null, Vn = null, ac = null, re = null, Pe = null, Je = null, On = 0;
5415
5419
  function lt(e, t) {
5416
- const n = re, s = Z, a = e.length === 0, i = t === void 0 ? s : t, l = a ? Qr : {
5420
+ const n = re, s = Z, a = e.length === 0, i = t === void 0 ? s : t, l = a ? Xr : {
5417
5421
  owned: null,
5418
5422
  cleanups: null,
5419
5423
  context: i ? i.context : null,
@@ -5433,10 +5437,10 @@ function ve(e, t) {
5433
5437
  observers: null,
5434
5438
  observerSlots: null,
5435
5439
  comparator: t.equals || void 0
5436
- }, s = (a) => (typeof a == "function" && (a = a(n.value)), ea(n, a));
5437
- return [Jr.bind(n), s];
5440
+ }, s = (a) => (typeof a == "function" && (a = a(n.value)), ta(n, a));
5441
+ return [ea.bind(n), s];
5438
5442
  }
5439
- function sc(e, t, n) {
5443
+ function ic(e, t, n) {
5440
5444
  const s = Bn(e, t, !0, tt);
5441
5445
  Lt(s);
5442
5446
  }
@@ -5444,20 +5448,20 @@ function ot(e, t, n) {
5444
5448
  const s = Bn(e, t, !1, tt);
5445
5449
  Lt(s);
5446
5450
  }
5447
- function Xr(e, t, n) {
5448
- Yr = mc;
5451
+ function Zr(e, t, n) {
5452
+ Qr = pc;
5449
5453
  const s = Bn(e, t, !1, tt);
5450
5454
  (!n || !n.render) && (s.user = !0), Je ? Je.push(s) : Lt(s);
5451
5455
  }
5452
5456
  function Ge(e, t, n) {
5453
5457
  n = n ? Object.assign({}, Pn, n) : Pn;
5454
5458
  const s = Bn(e, t, !0, 0);
5455
- return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, Lt(s), Jr.bind(s);
5459
+ return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, Lt(s), ea.bind(s);
5456
5460
  }
5457
- function rc(e) {
5461
+ function lc(e) {
5458
5462
  return e && typeof e == "object" && "then" in e;
5459
5463
  }
5460
- function ac(e, t, n) {
5464
+ function oc(e, t, n) {
5461
5465
  let s, a, i;
5462
5466
  arguments.length === 1 ? (s = !0, a = e, i = {}) : (s = e, a = t, i = {});
5463
5467
  let l = null, o = Kn, c = null, h = !1, g = "initialValue" in i, d = typeof s == "function" && Ge(s);
@@ -5481,7 +5485,7 @@ function ac(e, t, n) {
5481
5485
  }, !1);
5482
5486
  }
5483
5487
  function J() {
5484
- const k = uc, q = y(), A = S();
5488
+ const k = mc, q = y(), A = S();
5485
5489
  if (A !== void 0 && !l)
5486
5490
  throw A;
5487
5491
  return re && re.user, q;
@@ -5501,11 +5505,11 @@ function ac(e, t, n) {
5501
5505
  refetching: k
5502
5506
  })
5503
5507
  );
5504
- return rc(A) ? (l = A, "value" in A ? (A.status === "success" ? T(l, A.value, void 0, q) : T(l, void 0, Wn(A.value), q), A) : (h = !0, queueMicrotask(() => h = !1), We(() => {
5508
+ return lc(A) ? (l = A, "value" in A ? (A.status === "success" ? T(l, A.value, void 0, q) : T(l, void 0, Yn(A.value), q), A) : (h = !0, queueMicrotask(() => h = !1), We(() => {
5505
5509
  b(g ? "refreshing" : "pending"), G();
5506
5510
  }, !1), A.then(
5507
5511
  (M) => T(A, M, void 0, q),
5508
- (M) => T(A, void 0, Wn(M), q)
5512
+ (M) => T(A, void 0, Yn(M), q)
5509
5513
  ))) : (T(l, A, void 0, q), A);
5510
5514
  }
5511
5515
  return Object.defineProperties(J, {
@@ -5531,7 +5535,7 @@ function ac(e, t, n) {
5531
5535
  return y();
5532
5536
  }
5533
5537
  }
5534
- }), d ? sc(() => ie(!1)) : ie(!1), [
5538
+ }), d ? ic(() => ie(!1)) : ie(!1), [
5535
5539
  J,
5536
5540
  {
5537
5541
  refetch: ie,
@@ -5539,7 +5543,7 @@ function ac(e, t, n) {
5539
5543
  }
5540
5544
  ];
5541
5545
  }
5542
- function $u(e) {
5546
+ function Qu(e) {
5543
5547
  return We(e, !1);
5544
5548
  }
5545
5549
  function Ce(e) {
@@ -5553,7 +5557,7 @@ function Ce(e) {
5553
5557
  re = t;
5554
5558
  }
5555
5559
  }
5556
- function zu(e, t, n) {
5560
+ function Xu(e, t, n) {
5557
5561
  const s = Array.isArray(e);
5558
5562
  let a, i = n && n.defer;
5559
5563
  return (l) => {
@@ -5570,27 +5574,27 @@ function zu(e, t, n) {
5570
5574
  return a = o, c;
5571
5575
  };
5572
5576
  }
5573
- function ic(e) {
5574
- Xr(() => Ce(e));
5577
+ function cc(e) {
5578
+ Zr(() => Ce(e));
5575
5579
  }
5576
5580
  function Ft(e) {
5577
5581
  return Z === null || (Z.cleanups === null ? Z.cleanups = [e] : Z.cleanups.push(e)), e;
5578
5582
  }
5579
- function qs() {
5583
+ function Hs() {
5580
5584
  return Z;
5581
5585
  }
5582
- function lc(e, t) {
5586
+ function uc(e, t) {
5583
5587
  const n = Z, s = re;
5584
5588
  Z = e, re = null;
5585
5589
  try {
5586
5590
  return We(t, !0);
5587
5591
  } catch (a) {
5588
- xs(a);
5592
+ Ts(a);
5589
5593
  } finally {
5590
5594
  Z = n, re = s;
5591
5595
  }
5592
5596
  }
5593
- function oc(e) {
5597
+ function dc(e) {
5594
5598
  const t = re, n = Z;
5595
5599
  return Promise.resolve().then(() => {
5596
5600
  re = t, Z = n;
@@ -5598,31 +5602,31 @@ function oc(e) {
5598
5602
  return We(e, !1), re = Z = null, s ? s.done : void 0;
5599
5603
  });
5600
5604
  }
5601
- var [cc, Wu] = /* @__PURE__ */ ve(!1);
5602
- function Yu() {
5603
- return [cc, oc];
5605
+ var [hc, Zu] = /* @__PURE__ */ ve(!1);
5606
+ function Ju() {
5607
+ return [hc, dc];
5604
5608
  }
5605
- function Qu(e, t) {
5609
+ function ed(e, t) {
5606
5610
  const n = Symbol("context");
5607
5611
  return {
5608
5612
  id: n,
5609
- Provider: fc(n),
5613
+ Provider: yc(n),
5610
5614
  defaultValue: e
5611
5615
  };
5612
5616
  }
5613
- function Xu(e) {
5617
+ function td(e) {
5614
5618
  let t;
5615
5619
  return Z && Z.context && (t = Z.context[e.id]) !== void 0 ? t : e.defaultValue;
5616
5620
  }
5617
- function Zr(e) {
5618
- const t = Ge(e), n = Ge(() => Yn(t()));
5621
+ function Jr(e) {
5622
+ const t = Ge(e), n = Ge(() => Qn(t()));
5619
5623
  return n.toArray = () => {
5620
5624
  const s = n();
5621
5625
  return Array.isArray(s) ? s : s != null ? [s] : [];
5622
5626
  }, n;
5623
5627
  }
5624
- var uc;
5625
- function Jr() {
5628
+ var mc;
5629
+ function ea() {
5626
5630
  if (this.sources && this.state)
5627
5631
  if (this.state === tt)
5628
5632
  Lt(this);
@@ -5636,12 +5640,12 @@ function Jr() {
5636
5640
  }
5637
5641
  return this.value;
5638
5642
  }
5639
- function ea(e, t, n) {
5643
+ function ta(e, t, n) {
5640
5644
  let s = e.value;
5641
5645
  return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && We(() => {
5642
5646
  for (let a = 0; a < e.observers.length; a += 1) {
5643
5647
  const i = e.observers[a], l = Vn && Vn.running;
5644
- l && Vn.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? Pe.push(i) : Je.push(i), i.observers && na(i)), l || (i.state = tt);
5648
+ l && Vn.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? Pe.push(i) : Je.push(i), i.observers && sa(i)), l || (i.state = tt);
5645
5649
  }
5646
5650
  if (Pe.length > 1e6)
5647
5651
  throw Pe = [], new Error();
@@ -5652,24 +5656,24 @@ function Lt(e) {
5652
5656
  return;
5653
5657
  qt(e);
5654
5658
  const t = On;
5655
- dc(
5659
+ fc(
5656
5660
  e,
5657
5661
  e.value,
5658
5662
  t
5659
5663
  );
5660
5664
  }
5661
- function dc(e, t, n) {
5665
+ function fc(e, t, n) {
5662
5666
  let s;
5663
5667
  const a = Z, i = re;
5664
5668
  re = Z = e;
5665
5669
  try {
5666
5670
  s = e.fn(t);
5667
5671
  } catch (l) {
5668
- return e.pure && (e.state = tt, e.owned && e.owned.forEach(qt), e.owned = null), e.updatedAt = n + 1, xs(l);
5672
+ return e.pure && (e.state = tt, e.owned && e.owned.forEach(qt), e.owned = null), e.updatedAt = n + 1, Ts(l);
5669
5673
  } finally {
5670
5674
  re = i, Z = a;
5671
5675
  }
5672
- (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? ea(e, s) : e.value = s, e.updatedAt = n);
5676
+ (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? ta(e, s) : e.value = s, e.updatedAt = n);
5673
5677
  }
5674
5678
  function Bn(e, t, n, s = tt, a) {
5675
5679
  const i = {
@@ -5685,7 +5689,7 @@ function Bn(e, t, n, s = tt, a) {
5685
5689
  context: Z ? Z.context : null,
5686
5690
  pure: n
5687
5691
  };
5688
- return Z === null || Z !== Qr && (Z.owned ? Z.owned.push(i) : Z.owned = [i]), i;
5692
+ return Z === null || Z !== Xr && (Z.owned ? Z.owned.push(i) : Z.owned = [i]), i;
5689
5693
  }
5690
5694
  function In(e) {
5691
5695
  if (e.state === 0)
@@ -5712,22 +5716,22 @@ function We(e, t) {
5712
5716
  t || (Pe = []), Je ? n = !0 : Je = [], On++;
5713
5717
  try {
5714
5718
  const s = e();
5715
- return hc(n), s;
5719
+ return gc(n), s;
5716
5720
  } catch (s) {
5717
- n || (Je = null), Pe = null, xs(s);
5721
+ n || (Je = null), Pe = null, Ts(s);
5718
5722
  }
5719
5723
  }
5720
- function hc(e) {
5721
- if (Pe && (ta(Pe), Pe = null), e)
5724
+ function gc(e) {
5725
+ if (Pe && (na(Pe), Pe = null), e)
5722
5726
  return;
5723
5727
  const t = Je;
5724
- Je = null, t.length && We(() => Yr(t), !1);
5728
+ Je = null, t.length && We(() => Qr(t), !1);
5725
5729
  }
5726
- function ta(e) {
5730
+ function na(e) {
5727
5731
  for (let t = 0; t < e.length; t++)
5728
5732
  In(e[t]);
5729
5733
  }
5730
- function mc(e) {
5734
+ function pc(e) {
5731
5735
  let t, n = 0;
5732
5736
  for (t = 0; t < e.length; t++) {
5733
5737
  const s = e[t];
@@ -5753,10 +5757,10 @@ function kn(e, t) {
5753
5757
  }
5754
5758
  }
5755
5759
  }
5756
- function na(e) {
5760
+ function sa(e) {
5757
5761
  for (let t = 0; t < e.observers.length; t += 1) {
5758
5762
  const n = e.observers[t];
5759
- n.state || (n.state = _n, n.pure ? Pe.push(n) : Je.push(n), n.observers && na(n));
5763
+ n.state || (n.state = _n, n.pure ? Pe.push(n) : Je.push(n), n.observers && sa(n));
5760
5764
  }
5761
5765
  }
5762
5766
  function qt(e) {
@@ -5786,52 +5790,52 @@ function qt(e) {
5786
5790
  }
5787
5791
  e.state = 0;
5788
5792
  }
5789
- function Wn(e) {
5793
+ function Yn(e) {
5790
5794
  return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
5791
5795
  cause: e
5792
5796
  });
5793
5797
  }
5794
- function xs(e, t = Z) {
5795
- throw Wn(e);
5798
+ function Ts(e, t = Z) {
5799
+ throw Yn(e);
5796
5800
  }
5797
- function Yn(e) {
5801
+ function Qn(e) {
5798
5802
  if (typeof e == "function" && !e.length)
5799
- return Yn(e());
5803
+ return Qn(e());
5800
5804
  if (Array.isArray(e)) {
5801
5805
  const t = [];
5802
5806
  for (let n = 0; n < e.length; n++) {
5803
- const s = Yn(e[n]);
5807
+ const s = Qn(e[n]);
5804
5808
  Array.isArray(s) ? t.push.apply(t, s) : t.push(s);
5805
5809
  }
5806
5810
  return t;
5807
5811
  }
5808
5812
  return e;
5809
5813
  }
5810
- function fc(e, t) {
5814
+ function yc(e, t) {
5811
5815
  return function(s) {
5812
5816
  let a;
5813
5817
  return ot(
5814
5818
  () => a = Ce(() => (Z.context = {
5815
5819
  ...Z.context,
5816
5820
  [e]: s.value
5817
- }, Zr(() => s.children))),
5821
+ }, Jr(() => s.children))),
5818
5822
  void 0
5819
5823
  ), a;
5820
5824
  };
5821
5825
  }
5822
- var Qn = Symbol("fallback");
5826
+ var Xn = Symbol("fallback");
5823
5827
  function Ln(e) {
5824
5828
  for (let t = 0; t < e.length; t++)
5825
5829
  e[t]();
5826
5830
  }
5827
- function gc(e, t, n = {}) {
5831
+ function vc(e, t, n = {}) {
5828
5832
  let s = [], a = [], i = [], l = 0, o = t.length > 1 ? [] : null;
5829
5833
  return Ft(() => Ln(i)), () => {
5830
5834
  let c = e() || [], h = c.length, g, d;
5831
- return c[Wr], Ce(() => {
5835
+ return c[Yr], Ce(() => {
5832
5836
  let y, p, S, v, x, G, E, b, T;
5833
5837
  if (h === 0)
5834
- l !== 0 && (Ln(i), i = [], s = [], a = [], l = 0, o && (o = [])), n.fallback && (s = [Qn], a[0] = lt((U) => (i[0] = U, n.fallback())), l = 1);
5838
+ l !== 0 && (Ln(i), i = [], s = [], a = [], l = 0, o && (o = [])), n.fallback && (s = [Xn], a[0] = lt((U) => (i[0] = U, n.fallback())), l = 1);
5835
5839
  else if (l === 0) {
5836
5840
  for (a = new Array(h), d = 0; d < h; d++)
5837
5841
  s[d] = c[d], a[d] = lt(w);
@@ -5860,14 +5864,14 @@ function gc(e, t, n = {}) {
5860
5864
  }
5861
5865
  };
5862
5866
  }
5863
- function pc(e, t, n = {}) {
5867
+ function Ec(e, t, n = {}) {
5864
5868
  let s = [], a = [], i = [], l = [], o = 0, c;
5865
5869
  return Ft(() => Ln(i)), () => {
5866
5870
  const h = e() || [], g = h.length;
5867
- return h[Wr], Ce(() => {
5871
+ return h[Yr], Ce(() => {
5868
5872
  if (g === 0)
5869
- return o !== 0 && (Ln(i), i = [], s = [], a = [], o = 0, l = []), n.fallback && (s = [Qn], a[0] = lt((w) => (i[0] = w, n.fallback())), o = 1), a;
5870
- for (s[0] === Qn && (i[0](), i = [], s = [], a = [], o = 0), c = 0; c < g; c++)
5873
+ return o !== 0 && (Ln(i), i = [], s = [], a = [], o = 0, l = []), n.fallback && (s = [Xn], a[0] = lt((w) => (i[0] = w, n.fallback())), o = 1), a;
5874
+ for (s[0] === Xn && (i[0](), i = [], s = [], a = [], o = 0), c = 0; c < g; c++)
5871
5875
  c < s.length && s[c] !== h[c] ? l[c](() => h[c]) : c >= s.length && (a[c] = lt(d));
5872
5876
  for (; c < s.length; c++)
5873
5877
  i[c]();
@@ -5880,13 +5884,13 @@ function pc(e, t, n = {}) {
5880
5884
  }
5881
5885
  };
5882
5886
  }
5883
- function sa(e, t) {
5887
+ function ra(e, t) {
5884
5888
  return Ce(() => e(t || {}));
5885
5889
  }
5886
5890
  function vn() {
5887
5891
  return !0;
5888
5892
  }
5889
- var Xn = {
5893
+ var Zn = {
5890
5894
  get(e, t, n) {
5891
5895
  return t === Cn ? n : e.get(t);
5892
5896
  },
@@ -5913,20 +5917,20 @@ var Xn = {
5913
5917
  function jn(e) {
5914
5918
  return (e = typeof e == "function" ? e() : e) ? e : {};
5915
5919
  }
5916
- function yc() {
5920
+ function bc() {
5917
5921
  for (let e = 0, t = this.length; e < t; ++e) {
5918
5922
  const n = this[e]();
5919
5923
  if (n !== void 0)
5920
5924
  return n;
5921
5925
  }
5922
5926
  }
5923
- function ra(...e) {
5927
+ function aa(...e) {
5924
5928
  let t = !1;
5925
5929
  for (let l = 0; l < e.length; l++) {
5926
5930
  const o = e[l];
5927
5931
  t = t || !!o && Cn in o, e[l] = typeof o == "function" ? (t = !0, Ge(o)) : o;
5928
5932
  }
5929
- if (zr && t)
5933
+ if (Wr && t)
5930
5934
  return new Proxy(
5931
5935
  {
5932
5936
  get(l) {
@@ -5949,7 +5953,7 @@ function ra(...e) {
5949
5953
  return [...new Set(l)];
5950
5954
  }
5951
5955
  },
5952
- Xn
5956
+ Zn
5953
5957
  );
5954
5958
  const n = {}, s = /* @__PURE__ */ Object.create(null);
5955
5959
  for (let l = e.length - 1; l >= 0; l--) {
@@ -5966,7 +5970,7 @@ function ra(...e) {
5966
5970
  s[g] = d.get ? {
5967
5971
  enumerable: !0,
5968
5972
  configurable: !0,
5969
- get: yc.bind(n[g] = [d.get.bind(o)])
5973
+ get: bc.bind(n[g] = [d.get.bind(o)])
5970
5974
  } : d.value !== void 0 ? d : void 0;
5971
5975
  else {
5972
5976
  const w = n[g];
@@ -5981,8 +5985,8 @@ function ra(...e) {
5981
5985
  }
5982
5986
  return a;
5983
5987
  }
5984
- function vc(e, ...t) {
5985
- if (zr && Cn in e) {
5988
+ function wc(e, ...t) {
5989
+ if (Wr && Cn in e) {
5986
5990
  const a = new Set(t.length > 1 ? t.flat() : t[0]), i = t.map((l) => new Proxy(
5987
5991
  {
5988
5992
  get(o) {
@@ -5995,7 +5999,7 @@ function vc(e, ...t) {
5995
5999
  return l.filter((o) => o in e);
5996
6000
  }
5997
6001
  },
5998
- Xn
6002
+ Zn
5999
6003
  ));
6000
6004
  return i.push(
6001
6005
  new Proxy(
@@ -6010,7 +6014,7 @@ function vc(e, ...t) {
6010
6014
  return Object.keys(e).filter((l) => !a.has(l));
6011
6015
  }
6012
6016
  },
6013
- Xn
6017
+ Zn
6014
6018
  )
6015
6019
  ), i;
6016
6020
  }
@@ -6024,7 +6028,7 @@ function vc(e, ...t) {
6024
6028
  }
6025
6029
  return [...s, n];
6026
6030
  }
6027
- function aa(e) {
6031
+ function ia(e) {
6028
6032
  let t, n;
6029
6033
  const s = (a) => {
6030
6034
  const i = O.context;
@@ -6034,7 +6038,7 @@ function aa(e) {
6034
6038
  !O.done && Ut(i), O.count--, c(() => h.default), Ut();
6035
6039
  }), t = o;
6036
6040
  } else if (!t) {
6037
- const [o] = ac(() => (n || (n = e())).then((c) => c.default));
6041
+ const [o] = oc(() => (n || (n = e())).then((c) => c.default));
6038
6042
  t = o;
6039
6043
  }
6040
6044
  let l;
@@ -6051,24 +6055,24 @@ function aa(e) {
6051
6055
  };
6052
6056
  return s.preload = () => n || ((n = e()).then((a) => t = () => a.default), n), s;
6053
6057
  }
6054
- var Ec = 0;
6055
- function Zu() {
6056
- return O.context ? O.getNextContextId() : `cl-${Ec++}`;
6058
+ var Sc = 0;
6059
+ function nd() {
6060
+ return O.context ? O.getNextContextId() : `cl-${Sc++}`;
6057
6061
  }
6058
- var ia = (e) => `Stale read from <${e}>.`;
6059
- function Ju(e) {
6062
+ var la = (e) => `Stale read from <${e}>.`;
6063
+ function sd(e) {
6060
6064
  const t = "fallback" in e && {
6061
6065
  fallback: () => e.fallback
6062
6066
  };
6063
- return Ge(gc(() => e.each, e.children, t || void 0));
6067
+ return Ge(vc(() => e.each, e.children, t || void 0));
6064
6068
  }
6065
- function ed(e) {
6069
+ function rd(e) {
6066
6070
  const t = "fallback" in e && {
6067
6071
  fallback: () => e.fallback
6068
6072
  };
6069
- return Ge(pc(() => e.each, e.children, t || void 0));
6073
+ return Ge(Ec(() => e.each, e.children, t || void 0));
6070
6074
  }
6071
- function td(e) {
6075
+ function ad(e) {
6072
6076
  const t = e.keyed, n = Ge(() => e.when, void 0, {
6073
6077
  equals: (s, a) => t ? s === a : !s == !a
6074
6078
  });
@@ -6081,7 +6085,7 @@ function td(e) {
6081
6085
  () => a(
6082
6086
  t ? s : () => {
6083
6087
  if (!Ce(n))
6084
- throw ia("Show");
6088
+ throw la("Show");
6085
6089
  return e.when;
6086
6090
  }
6087
6091
  )
@@ -6093,9 +6097,9 @@ function td(e) {
6093
6097
  void 0
6094
6098
  );
6095
6099
  }
6096
- function nd(e) {
6100
+ function id(e) {
6097
6101
  let t = !1;
6098
- const n = (i, l) => (t ? i[1] === l[1] : !i[1] == !l[1]) && i[2] === l[2], s = Zr(() => e.children), a = Ge(
6102
+ const n = (i, l) => (t ? i[1] === l[1] : !i[1] == !l[1]) && i[2] === l[2], s = Jr(() => e.children), a = Ge(
6099
6103
  () => {
6100
6104
  let i = s();
6101
6105
  Array.isArray(i) || (i = [i]);
@@ -6121,7 +6125,7 @@ function nd(e) {
6121
6125
  () => c(
6122
6126
  t ? l : () => {
6123
6127
  if (Ce(a)[0] !== i)
6124
- throw ia("Match");
6128
+ throw la("Match");
6125
6129
  return o.when;
6126
6130
  }
6127
6131
  )
@@ -6131,10 +6135,10 @@ function nd(e) {
6131
6135
  void 0
6132
6136
  );
6133
6137
  }
6134
- function sd(e) {
6138
+ function ld(e) {
6135
6139
  return e;
6136
6140
  }
6137
- var bc = [
6141
+ var Nc = [
6138
6142
  "allowfullscreen",
6139
6143
  "async",
6140
6144
  "autofocus",
@@ -6160,7 +6164,7 @@ var bc = [
6160
6164
  "reversed",
6161
6165
  "seamless",
6162
6166
  "selected"
6163
- ], wc = /* @__PURE__ */ new Set([
6167
+ ], Ac = /* @__PURE__ */ new Set([
6164
6168
  "className",
6165
6169
  "value",
6166
6170
  "readOnly",
@@ -6168,16 +6172,16 @@ var bc = [
6168
6172
  "isMap",
6169
6173
  "noModule",
6170
6174
  "playsInline",
6171
- ...bc
6172
- ]), Sc = /* @__PURE__ */ new Set([
6175
+ ...Nc
6176
+ ]), xc = /* @__PURE__ */ new Set([
6173
6177
  "innerHTML",
6174
6178
  "textContent",
6175
6179
  "innerText",
6176
6180
  "children"
6177
- ]), Nc = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
6181
+ ]), Tc = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
6178
6182
  className: "class",
6179
6183
  htmlFor: "for"
6180
- }), Ac = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
6184
+ }), Cc = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
6181
6185
  class: "className",
6182
6186
  formnovalidate: {
6183
6187
  $: "formNoValidate",
@@ -6202,11 +6206,11 @@ var bc = [
6202
6206
  TEXTAREA: 1
6203
6207
  }
6204
6208
  });
6205
- function xc(e, t) {
6206
- const n = Ac[e];
6209
+ function Pc(e, t) {
6210
+ const n = Cc[e];
6207
6211
  return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
6208
6212
  }
6209
- var Tc = /* @__PURE__ */ new Set([
6213
+ var _c = /* @__PURE__ */ new Set([
6210
6214
  "beforeinput",
6211
6215
  "click",
6212
6216
  "dblclick",
@@ -6229,7 +6233,7 @@ var Tc = /* @__PURE__ */ new Set([
6229
6233
  "touchend",
6230
6234
  "touchmove",
6231
6235
  "touchstart"
6232
- ]), Cc = /* @__PURE__ */ new Set([
6236
+ ]), Ic = /* @__PURE__ */ new Set([
6233
6237
  "altGlyph",
6234
6238
  "altGlyphDef",
6235
6239
  "altGlyphItem",
@@ -6307,11 +6311,11 @@ var Tc = /* @__PURE__ */ new Set([
6307
6311
  "use",
6308
6312
  "view",
6309
6313
  "vkern"
6310
- ]), Pc = {
6314
+ ]), kc = {
6311
6315
  xlink: "http://www.w3.org/1999/xlink",
6312
6316
  xml: "http://www.w3.org/XML/1998/namespace"
6313
6317
  };
6314
- function _c(e, t, n) {
6318
+ function Lc(e, t, n) {
6315
6319
  let s = n.length, a = t.length, i = s, l = 0, o = 0, c = t[a - 1].nextSibling, h = null;
6316
6320
  for (; l < a || o < i; ) {
6317
6321
  if (t[l] === n[o]) {
@@ -6357,15 +6361,15 @@ function _c(e, t, n) {
6357
6361
  }
6358
6362
  }
6359
6363
  var Ot = "_$DX_DELEGATE";
6360
- function la(e, t, n, s = {}) {
6364
+ function oa(e, t, n, s = {}) {
6361
6365
  let a;
6362
6366
  return lt((i) => {
6363
- a = i, t === document ? e() : Jn(t, e(), t.firstChild ? null : void 0, n);
6367
+ a = i, t === document ? e() : es(t, e(), t.firstChild ? null : void 0, n);
6364
6368
  }, s.owner), () => {
6365
6369
  a(), t.textContent = "";
6366
6370
  };
6367
6371
  }
6368
- function rd(e, t, n) {
6372
+ function od(e, t, n) {
6369
6373
  let s;
6370
6374
  const a = () => {
6371
6375
  const l = document.createElement("template");
@@ -6373,33 +6377,33 @@ function rd(e, t, n) {
6373
6377
  }, i = () => (s || (s = a())).cloneNode(!0);
6374
6378
  return i.cloneNode = i, i;
6375
6379
  }
6376
- function Ic(e, t = window.document) {
6380
+ function Dc(e, t = window.document) {
6377
6381
  const n = t[Ot] || (t[Ot] = /* @__PURE__ */ new Set());
6378
6382
  for (let s = 0, a = e.length; s < a; s++) {
6379
6383
  const i = e[s];
6380
- n.has(i) || (n.add(i), t.addEventListener(i, oa));
6384
+ n.has(i) || (n.add(i), t.addEventListener(i, ca));
6381
6385
  }
6382
6386
  }
6383
- function ad(e = window.document) {
6387
+ function cd(e = window.document) {
6384
6388
  if (e[Ot]) {
6385
6389
  for (let t of e[Ot].keys())
6386
- e.removeEventListener(t, oa);
6390
+ e.removeEventListener(t, ca);
6387
6391
  delete e[Ot];
6388
6392
  }
6389
6393
  }
6390
- function Zn(e, t, n) {
6394
+ function Jn(e, t, n) {
6391
6395
  ht(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
6392
6396
  }
6393
- function kc(e, t, n, s) {
6397
+ function Gc(e, t, n, s) {
6394
6398
  ht(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
6395
6399
  }
6396
- function Lc(e, t, n) {
6400
+ function Uc(e, t, n) {
6397
6401
  ht(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
6398
6402
  }
6399
- function Dc(e, t) {
6403
+ function Rc(e, t) {
6400
6404
  ht(e) || (t == null ? e.removeAttribute("class") : e.className = t);
6401
6405
  }
6402
- function Gc(e, t, n, s) {
6406
+ function Oc(e, t, n, s) {
6403
6407
  if (s)
6404
6408
  Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
6405
6409
  else if (Array.isArray(n)) {
@@ -6408,22 +6412,22 @@ function Gc(e, t, n, s) {
6408
6412
  } else
6409
6413
  e.addEventListener(t, n, typeof n != "function" && n);
6410
6414
  }
6411
- function Uc(e, t, n = {}) {
6415
+ function Bc(e, t, n = {}) {
6412
6416
  const s = Object.keys(t || {}), a = Object.keys(n);
6413
6417
  let i, l;
6414
6418
  for (i = 0, l = a.length; i < l; i++) {
6415
6419
  const o = a[i];
6416
- !o || o === "undefined" || t[o] || (Hs(e, o, !1), delete n[o]);
6420
+ !o || o === "undefined" || t[o] || (Ks(e, o, !1), delete n[o]);
6417
6421
  }
6418
6422
  for (i = 0, l = s.length; i < l; i++) {
6419
6423
  const o = s[i], c = !!t[o];
6420
- !o || o === "undefined" || n[o] === c || !c || (Hs(e, o, !0), n[o] = c);
6424
+ !o || o === "undefined" || n[o] === c || !c || (Ks(e, o, !0), n[o] = c);
6421
6425
  }
6422
6426
  return n;
6423
6427
  }
6424
- function Rc(e, t, n) {
6428
+ function Mc(e, t, n) {
6425
6429
  if (!t)
6426
- return n ? Zn(e, "style") : t;
6430
+ return n ? Jn(e, "style") : t;
6427
6431
  const s = e.style;
6428
6432
  if (typeof t == "string")
6429
6433
  return s.cssText = t;
@@ -6435,56 +6439,56 @@ function Rc(e, t, n) {
6435
6439
  a = t[i], a !== n[i] && (s.setProperty(i, a), n[i] = a);
6436
6440
  return n;
6437
6441
  }
6438
- function Oc(e, t = {}, n, s) {
6442
+ function Fc(e, t = {}, n, s) {
6439
6443
  const a = {};
6440
6444
  return s || ot(
6441
6445
  () => a.children = Ht(e, t.children, a.children)
6442
- ), ot(() => typeof t.ref == "function" && Bc(t.ref, e)), ot(() => Mc(e, t, n, !0, a, !0)), a;
6446
+ ), ot(() => typeof t.ref == "function" && qc(t.ref, e)), ot(() => Hc(e, t, n, !0, a, !0)), a;
6443
6447
  }
6444
- function Bc(e, t, n) {
6448
+ function qc(e, t, n) {
6445
6449
  return Ce(() => e(t, n));
6446
6450
  }
6447
- function Jn(e, t, n, s) {
6451
+ function es(e, t, n, s) {
6448
6452
  if (n !== void 0 && !s && (s = []), typeof t != "function")
6449
6453
  return Ht(e, t, s, n);
6450
6454
  ot((a) => Ht(e, t(), a, n), s);
6451
6455
  }
6452
- function Mc(e, t, n, s, a = {}, i = !1) {
6456
+ function Hc(e, t, n, s, a = {}, i = !1) {
6453
6457
  t || (t = {});
6454
6458
  for (const l in a)
6455
6459
  if (!(l in t)) {
6456
6460
  if (l === "children")
6457
6461
  continue;
6458
- a[l] = Ks(e, l, null, a[l], n, i, t);
6462
+ a[l] = Vs(e, l, null, a[l], n, i, t);
6459
6463
  }
6460
6464
  for (const l in t) {
6461
6465
  if (l === "children")
6462
6466
  continue;
6463
6467
  const o = t[l];
6464
- a[l] = Ks(e, l, o, a[l], n, i, t);
6468
+ a[l] = Vs(e, l, o, a[l], n, i, t);
6465
6469
  }
6466
6470
  }
6467
- function Fc(e) {
6471
+ function Kc(e) {
6468
6472
  let t, n;
6469
- return !ht() || !(t = O.registry.get(n = Hc())) ? e() : (O.completed && O.completed.add(t), O.registry.delete(n), t);
6473
+ return !ht() || !(t = O.registry.get(n = jc())) ? e() : (O.completed && O.completed.add(t), O.registry.delete(n), t);
6470
6474
  }
6471
6475
  function ht(e) {
6472
6476
  return !!O.context && !O.done && (!e || e.isConnected);
6473
6477
  }
6474
- function qc(e) {
6478
+ function Vc(e) {
6475
6479
  return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
6476
6480
  }
6477
- function Hs(e, t, n) {
6481
+ function Ks(e, t, n) {
6478
6482
  const s = t.trim().split(/\s+/);
6479
6483
  for (let a = 0, i = s.length; a < i; a++)
6480
6484
  e.classList.toggle(s[a], n);
6481
6485
  }
6482
- function Ks(e, t, n, s, a, i, l) {
6486
+ function Vs(e, t, n, s, a, i, l) {
6483
6487
  let o, c, h, g, d;
6484
6488
  if (t === "style")
6485
- return Rc(e, n, s);
6489
+ return Mc(e, n, s);
6486
6490
  if (t === "classList")
6487
- return Uc(e, n, s);
6491
+ return Bc(e, n, s);
6488
6492
  if (n === s)
6489
6493
  return s;
6490
6494
  if (t === "ref")
@@ -6496,29 +6500,29 @@ function Ks(e, t, n, s, a, i, l) {
6496
6500
  const w = t.slice(10);
6497
6501
  s && e.removeEventListener(w, s, !0), n && e.addEventListener(w, n, !0);
6498
6502
  } else if (t.slice(0, 2) === "on") {
6499
- const w = t.slice(2).toLowerCase(), y = Tc.has(w);
6503
+ const w = t.slice(2).toLowerCase(), y = _c.has(w);
6500
6504
  if (!y && s) {
6501
6505
  const p = Array.isArray(s) ? s[0] : s;
6502
6506
  e.removeEventListener(w, p);
6503
6507
  }
6504
- (y || n) && (Gc(e, w, n, y), y && Ic([w]));
6508
+ (y || n) && (Oc(e, w, n, y), y && Dc([w]));
6505
6509
  } else if (t.slice(0, 5) === "attr:")
6506
- Zn(e, t.slice(5), n);
6510
+ Jn(e, t.slice(5), n);
6507
6511
  else if (t.slice(0, 5) === "bool:")
6508
- Lc(e, t.slice(5), n);
6509
- else if ((d = t.slice(0, 5) === "prop:") || (h = Sc.has(t)) || !a && ((g = xc(t, e.tagName)) || (c = wc.has(t))) || (o = e.nodeName.includes("-") || "is" in l)) {
6512
+ Uc(e, t.slice(5), n);
6513
+ else if ((d = t.slice(0, 5) === "prop:") || (h = xc.has(t)) || !a && ((g = Pc(t, e.tagName)) || (c = Ac.has(t))) || (o = e.nodeName.includes("-") || "is" in l)) {
6510
6514
  if (d)
6511
6515
  t = t.slice(5), c = !0;
6512
6516
  else if (ht(e))
6513
6517
  return n;
6514
- t === "class" || t === "className" ? Dc(e, n) : o && !c && !h ? e[qc(t)] = n : e[g || t] = n;
6518
+ t === "class" || t === "className" ? Rc(e, n) : o && !c && !h ? e[Vc(t)] = n : e[g || t] = n;
6515
6519
  } else {
6516
- const w = a && t.indexOf(":") > -1 && Pc[t.split(":")[0]];
6517
- w ? kc(e, w, t, n) : Zn(e, Nc[t] || t, n);
6520
+ const w = a && t.indexOf(":") > -1 && kc[t.split(":")[0]];
6521
+ w ? Gc(e, w, t, n) : Jn(e, Tc[t] || t, n);
6518
6522
  }
6519
6523
  return n;
6520
6524
  }
6521
- function oa(e) {
6525
+ function ca(e) {
6522
6526
  if (O.registry && O.events && O.events.find(([c, h]) => h === e))
6523
6527
  return;
6524
6528
  let t = e.target;
@@ -6595,7 +6599,7 @@ function Ht(e, t, n, s, a) {
6595
6599
  }), () => n;
6596
6600
  if (Array.isArray(t)) {
6597
6601
  const c = [], h = n && Array.isArray(n);
6598
- if (es(c, t, n, a))
6602
+ if (ts(c, t, n, a))
6599
6603
  return ot(() => n = Ht(e, c, n, s, !0)), () => n;
6600
6604
  if (i) {
6601
6605
  if (!c.length)
@@ -6613,7 +6617,7 @@ function Ht(e, t, n, s, a) {
6613
6617
  if (c.length === 0) {
6614
6618
  if (n = mt(e, n, s), o)
6615
6619
  return n;
6616
- } else h ? n.length === 0 ? Vs(e, c, s) : _c(e, n, c) : (n && mt(e), Vs(e, c));
6620
+ } else h ? n.length === 0 ? js(e, c, s) : Lc(e, n, c) : (n && mt(e), js(e, c));
6617
6621
  n = c;
6618
6622
  } else if (t.nodeType) {
6619
6623
  if (i && t.parentNode)
@@ -6628,7 +6632,7 @@ function Ht(e, t, n, s, a) {
6628
6632
  }
6629
6633
  return n;
6630
6634
  }
6631
- function es(e, t, n, s) {
6635
+ function ts(e, t, n, s) {
6632
6636
  let a = !1;
6633
6637
  for (let i = 0, l = t.length; i < l; i++) {
6634
6638
  let o = t[i], c = n && n[e.length], h;
@@ -6636,12 +6640,12 @@ function es(e, t, n, s) {
6636
6640
  if ((h = typeof o) == "object" && o.nodeType)
6637
6641
  e.push(o);
6638
6642
  else if (Array.isArray(o))
6639
- a = es(e, o, c) || a;
6643
+ a = ts(e, o, c) || a;
6640
6644
  else if (h === "function")
6641
6645
  if (s) {
6642
6646
  for (; typeof o == "function"; )
6643
6647
  o = o();
6644
- a = es(
6648
+ a = ts(
6645
6649
  e,
6646
6650
  Array.isArray(o) ? o : [o],
6647
6651
  Array.isArray(c) ? c : [c]
@@ -6655,7 +6659,7 @@ function es(e, t, n, s) {
6655
6659
  }
6656
6660
  return a;
6657
6661
  }
6658
- function Vs(e, t, n = null) {
6662
+ function js(e, t, n = null) {
6659
6663
  for (let s = 0, a = t.length; s < a; s++)
6660
6664
  e.insertBefore(t[s], n);
6661
6665
  }
@@ -6677,25 +6681,25 @@ function mt(e, t, n, s) {
6677
6681
  e.insertBefore(a, n);
6678
6682
  return [a];
6679
6683
  }
6680
- function Hc() {
6684
+ function jc() {
6681
6685
  return O.getNextContextId();
6682
6686
  }
6683
- var Kc = "http://www.w3.org/2000/svg";
6684
- function ca(e, t = !1) {
6685
- return t ? document.createElementNS(Kc, e) : document.createElement(e);
6687
+ var $c = "http://www.w3.org/2000/svg";
6688
+ function ua(e, t = !1) {
6689
+ return t ? document.createElementNS($c, e) : document.createElement(e);
6686
6690
  }
6687
- function id(e) {
6688
- const { useShadow: t } = e, n = document.createTextNode(""), s = () => e.mount || document.body, a = qs();
6691
+ function ud(e) {
6692
+ const { useShadow: t } = e, n = document.createTextNode(""), s = () => e.mount || document.body, a = Hs();
6689
6693
  let i, l = !!O.context;
6690
- return Xr(
6694
+ return Zr(
6691
6695
  () => {
6692
- l && (qs().user = l = !1), i || (i = lc(a, () => Ge(() => e.children)));
6696
+ l && (Hs().user = l = !1), i || (i = uc(a, () => Ge(() => e.children)));
6693
6697
  const o = s();
6694
6698
  if (o instanceof HTMLHeadElement) {
6695
6699
  const [c, h] = ve(!1), g = () => h(!0);
6696
- lt((d) => Jn(o, () => c() ? d() : i(), null)), Ft(g);
6700
+ lt((d) => es(o, () => c() ? d() : i(), null)), Ft(g);
6697
6701
  } else {
6698
- const c = ca(e.isSVG ? "g" : "div", e.isSVG), h = t && c.attachShadow ? c.attachShadow({
6702
+ const c = ua(e.isSVG ? "g" : "div", e.isSVG), h = t && c.attachShadow ? c.attachShadow({
6699
6703
  mode: "open"
6700
6704
  }) : c;
6701
6705
  Object.defineProperty(c, "_$host", {
@@ -6703,7 +6707,7 @@ function id(e) {
6703
6707
  return n.parentNode;
6704
6708
  },
6705
6709
  configurable: !0
6706
- }), Jn(h, i), o.appendChild(c), e.ref && e.ref(c), Ft(() => o.removeChild(c));
6710
+ }), es(h, i), o.appendChild(c), e.ref && e.ref(c), Ft(() => o.removeChild(c));
6707
6711
  }
6708
6712
  },
6709
6713
  void 0,
@@ -6712,20 +6716,20 @@ function id(e) {
6712
6716
  }
6713
6717
  ), n;
6714
6718
  }
6715
- function ld(e) {
6716
- const [t, n] = vc(e, ["component"]), s = Ge(() => t.component);
6719
+ function dd(e) {
6720
+ const [t, n] = wc(e, ["component"]), s = Ge(() => t.component);
6717
6721
  return Ge(() => {
6718
6722
  const a = s();
6719
6723
  switch (typeof a) {
6720
6724
  case "function":
6721
6725
  return Ce(() => a(n));
6722
6726
  case "string":
6723
- const i = Cc.has(a), l = O.context ? Fc() : ca(a, i);
6724
- return Oc(l, n, i), l;
6727
+ const i = Ic.has(a), l = O.context ? Kc() : ua(a, i);
6728
+ return Fc(l, n, i), l;
6725
6729
  }
6726
6730
  });
6727
6731
  }
6728
- var Vc = class {
6732
+ var zc = class {
6729
6733
  constructor() {
6730
6734
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
6731
6735
  }
@@ -6741,9 +6745,9 @@ var Vc = class {
6741
6745
  clear() {
6742
6746
  this.keyToValue.clear(), this.valueToKey.clear();
6743
6747
  }
6744
- }, ua = class {
6748
+ }, da = class {
6745
6749
  constructor(e) {
6746
- this.generateIdentifier = e, this.kv = new Vc();
6750
+ this.generateIdentifier = e, this.kv = new zc();
6747
6751
  }
6748
6752
  register(e, t) {
6749
6753
  this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
@@ -6757,7 +6761,7 @@ var Vc = class {
6757
6761
  getValue(e) {
6758
6762
  return this.kv.getByKey(e);
6759
6763
  }
6760
- }, jc = class extends ua {
6764
+ }, Wc = class extends da {
6761
6765
  constructor() {
6762
6766
  super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
6763
6767
  }
@@ -6768,7 +6772,7 @@ var Vc = class {
6768
6772
  return this.classToAllowedProps.get(e);
6769
6773
  }
6770
6774
  };
6771
- function $c(e) {
6775
+ function Yc(e) {
6772
6776
  if ("values" in Object)
6773
6777
  return Object.values(e);
6774
6778
  const t = [];
@@ -6776,8 +6780,8 @@ function $c(e) {
6776
6780
  e.hasOwnProperty(n) && t.push(e[n]);
6777
6781
  return t;
6778
6782
  }
6779
- function zc(e, t) {
6780
- const n = $c(e);
6783
+ function Qc(e, t) {
6784
+ const n = Yc(e);
6781
6785
  if ("find" in n)
6782
6786
  return n.find(t);
6783
6787
  const s = n;
@@ -6793,14 +6797,14 @@ function kt(e, t) {
6793
6797
  function xn(e, t) {
6794
6798
  return e.indexOf(t) !== -1;
6795
6799
  }
6796
- function js(e, t) {
6800
+ function $s(e, t) {
6797
6801
  for (let n = 0; n < e.length; n++) {
6798
6802
  const s = e[n];
6799
6803
  if (t(s))
6800
6804
  return s;
6801
6805
  }
6802
6806
  }
6803
- var Wc = class {
6807
+ var Xc = class {
6804
6808
  constructor() {
6805
6809
  this.transfomers = {};
6806
6810
  }
@@ -6808,12 +6812,12 @@ var Wc = class {
6808
6812
  this.transfomers[e.name] = e;
6809
6813
  }
6810
6814
  findApplicable(e) {
6811
- return zc(this.transfomers, (t) => t.isApplicable(e));
6815
+ return Qc(this.transfomers, (t) => t.isApplicable(e));
6812
6816
  }
6813
6817
  findByName(e) {
6814
6818
  return this.transfomers[e];
6815
6819
  }
6816
- }, Yc = (e) => Object.prototype.toString.call(e).slice(8, -1), da = (e) => typeof e > "u", Qc = (e) => e === null, Kt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, ts = (e) => Kt(e) && Object.keys(e).length === 0, nt = (e) => Array.isArray(e), Xc = (e) => typeof e == "string", Zc = (e) => typeof e == "number" && !isNaN(e), Jc = (e) => typeof e == "boolean", eu = (e) => e instanceof RegExp, Vt = (e) => e instanceof Map, jt = (e) => e instanceof Set, ha = (e) => Yc(e) === "Symbol", tu = (e) => e instanceof Date && !isNaN(e.valueOf()), nu = (e) => e instanceof Error, $s = (e) => typeof e == "number" && isNaN(e), su = (e) => Jc(e) || Qc(e) || da(e) || Zc(e) || Xc(e) || ha(e), ru = (e) => typeof e == "bigint", au = (e) => e === 1 / 0 || e === -1 / 0, iu = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), lu = (e) => e instanceof URL, ma = (e) => e.replace(/\./g, "\\."), $n = (e) => e.map(String).map(ma).join("."), Bt = (e) => {
6820
+ }, Zc = (e) => Object.prototype.toString.call(e).slice(8, -1), ha = (e) => typeof e > "u", Jc = (e) => e === null, Kt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, ns = (e) => Kt(e) && Object.keys(e).length === 0, nt = (e) => Array.isArray(e), eu = (e) => typeof e == "string", tu = (e) => typeof e == "number" && !isNaN(e), nu = (e) => typeof e == "boolean", su = (e) => e instanceof RegExp, Vt = (e) => e instanceof Map, jt = (e) => e instanceof Set, ma = (e) => Zc(e) === "Symbol", ru = (e) => e instanceof Date && !isNaN(e.valueOf()), au = (e) => e instanceof Error, zs = (e) => typeof e == "number" && isNaN(e), iu = (e) => nu(e) || Jc(e) || ha(e) || tu(e) || eu(e) || ma(e), lu = (e) => typeof e == "bigint", ou = (e) => e === 1 / 0 || e === -1 / 0, cu = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), uu = (e) => e instanceof URL, fa = (e) => e.replace(/\./g, "\\."), $n = (e) => e.map(String).map(fa).join("."), Bt = (e) => {
6817
6821
  const t = [];
6818
6822
  let n = "";
6819
6823
  for (let a = 0; a < e.length; a++) {
@@ -6839,12 +6843,12 @@ function ze(e, t, n, s) {
6839
6843
  untransform: s
6840
6844
  };
6841
6845
  }
6842
- var fa = [
6843
- ze(da, "undefined", () => null, () => {
6846
+ var ga = [
6847
+ ze(ha, "undefined", () => null, () => {
6844
6848
  }),
6845
- ze(ru, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
6846
- ze(tu, "Date", (e) => e.toISOString(), (e) => new Date(e)),
6847
- ze(nu, "Error", (e, t) => {
6849
+ ze(lu, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
6850
+ ze(ru, "Date", (e) => e.toISOString(), (e) => new Date(e)),
6851
+ ze(au, "Error", (e, t) => {
6848
6852
  const n = {
6849
6853
  name: e.name,
6850
6854
  message: e.message
@@ -6858,7 +6862,7 @@ var fa = [
6858
6862
  n[s] = e[s];
6859
6863
  }), n;
6860
6864
  }),
6861
- ze(eu, "regexp", (e) => "" + e, (e) => {
6865
+ ze(su, "regexp", (e) => "" + e, (e) => {
6862
6866
  const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
6863
6867
  return new RegExp(t, n);
6864
6868
  }),
@@ -6871,9 +6875,9 @@ var fa = [
6871
6875
  (e) => new Set(e)
6872
6876
  ),
6873
6877
  ze(Vt, "map", (e) => [...e.entries()], (e) => new Map(e)),
6874
- ze((e) => $s(e) || au(e), "number", (e) => $s(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
6878
+ ze((e) => zs(e) || ou(e), "number", (e) => zs(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
6875
6879
  ze((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
6876
- ze(lu, "URL", (e) => e.toString(), (e) => new URL(e))
6880
+ ze(uu, "URL", (e) => e.toString(), (e) => new URL(e))
6877
6881
  ];
6878
6882
  function Mn(e, t, n, s) {
6879
6883
  return {
@@ -6883,12 +6887,12 @@ function Mn(e, t, n, s) {
6883
6887
  untransform: s
6884
6888
  };
6885
6889
  }
6886
- var ga = Mn((e, t) => ha(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
6890
+ var pa = Mn((e, t) => ma(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
6887
6891
  const s = n.symbolRegistry.getValue(t[1]);
6888
6892
  if (!s)
6889
6893
  throw new Error("Trying to deserialize unknown symbol");
6890
6894
  return s;
6891
- }), ou = [
6895
+ }), du = [
6892
6896
  Int8Array,
6893
6897
  Uint8Array,
6894
6898
  Int16Array,
@@ -6898,16 +6902,16 @@ var ga = Mn((e, t) => ha(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
6898
6902
  Float32Array,
6899
6903
  Float64Array,
6900
6904
  Uint8ClampedArray
6901
- ].reduce((e, t) => (e[t.name] = t, e), {}), pa = Mn(iu, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
6902
- const n = ou[t[1]];
6905
+ ].reduce((e, t) => (e[t.name] = t, e), {}), ya = Mn(cu, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
6906
+ const n = du[t[1]];
6903
6907
  if (!n)
6904
6908
  throw new Error("Trying to deserialize unknown typed array");
6905
6909
  return new n(e);
6906
6910
  });
6907
- function ya(e, t) {
6911
+ function va(e, t) {
6908
6912
  return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
6909
6913
  }
6910
- var va = Mn(ya, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
6914
+ var Ea = Mn(va, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
6911
6915
  const n = t.classRegistry.getAllowedProps(e.constructor);
6912
6916
  if (!n)
6913
6917
  return { ...e };
@@ -6920,44 +6924,44 @@ var va = Mn(ya, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
6920
6924
  if (!s)
6921
6925
  throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");
6922
6926
  return Object.assign(Object.create(s.prototype), e);
6923
- }), Ea = Mn((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
6927
+ }), ba = Mn((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
6924
6928
  const s = n.customTransformerRegistry.findByName(t[1]);
6925
6929
  if (!s)
6926
6930
  throw new Error("Trying to deserialize unknown custom value");
6927
6931
  return s.deserialize(e);
6928
- }), cu = [va, ga, Ea, pa], zs = (e, t) => {
6929
- const n = js(cu, (a) => a.isApplicable(e, t));
6932
+ }), hu = [Ea, pa, ba, ya], Ws = (e, t) => {
6933
+ const n = $s(hu, (a) => a.isApplicable(e, t));
6930
6934
  if (n)
6931
6935
  return {
6932
6936
  value: n.transform(e, t),
6933
6937
  type: n.annotation(e, t)
6934
6938
  };
6935
- const s = js(fa, (a) => a.isApplicable(e, t));
6939
+ const s = $s(ga, (a) => a.isApplicable(e, t));
6936
6940
  if (s)
6937
6941
  return {
6938
6942
  value: s.transform(e, t),
6939
6943
  type: s.annotation
6940
6944
  };
6941
- }, ba = {};
6942
- fa.forEach((e) => {
6943
- ba[e.annotation] = e;
6945
+ }, wa = {};
6946
+ ga.forEach((e) => {
6947
+ wa[e.annotation] = e;
6944
6948
  });
6945
- var uu = (e, t, n) => {
6949
+ var mu = (e, t, n) => {
6946
6950
  if (nt(t))
6947
6951
  switch (t[0]) {
6948
6952
  case "symbol":
6949
- return ga.untransform(e, t, n);
6953
+ return pa.untransform(e, t, n);
6950
6954
  case "class":
6951
- return va.untransform(e, t, n);
6952
- case "custom":
6953
6955
  return Ea.untransform(e, t, n);
6956
+ case "custom":
6957
+ return ba.untransform(e, t, n);
6954
6958
  case "typed-array":
6955
- return pa.untransform(e, t, n);
6959
+ return ya.untransform(e, t, n);
6956
6960
  default:
6957
6961
  throw new Error("Unknown transformation: " + t);
6958
6962
  }
6959
6963
  else {
6960
- const s = ba[t];
6964
+ const s = wa[t];
6961
6965
  if (!s)
6962
6966
  throw new Error("Unknown transformation: " + t);
6963
6967
  return s.untransform(e, n);
@@ -6968,7 +6972,7 @@ var uu = (e, t, n) => {
6968
6972
  n.next(), t--;
6969
6973
  return n.next().value;
6970
6974
  };
6971
- function wa(e) {
6975
+ function Sa(e) {
6972
6976
  if (xn(e, "__proto__"))
6973
6977
  throw new Error("__proto__ is not allowed as a property");
6974
6978
  if (xn(e, "prototype"))
@@ -6976,8 +6980,8 @@ function wa(e) {
6976
6980
  if (xn(e, "constructor"))
6977
6981
  throw new Error("constructor is not allowed as a property");
6978
6982
  }
6979
- var du = (e, t) => {
6980
- wa(t);
6983
+ var fu = (e, t) => {
6984
+ Sa(t);
6981
6985
  for (let n = 0; n < t.length; n++) {
6982
6986
  const s = t[n];
6983
6987
  if (jt(e))
@@ -6996,8 +7000,8 @@ var du = (e, t) => {
6996
7000
  e = e[s];
6997
7001
  }
6998
7002
  return e;
6999
- }, ns = (e, t, n) => {
7000
- if (wa(t), t.length === 0)
7003
+ }, ss = (e, t, n) => {
7004
+ if (Sa(t), t.length === 0)
7001
7005
  return n(e);
7002
7006
  let s = e;
7003
7007
  for (let i = 0; i < t.length - 1; i++) {
@@ -7045,45 +7049,45 @@ var du = (e, t) => {
7045
7049
  }
7046
7050
  return e;
7047
7051
  };
7048
- function ss(e, t, n = []) {
7052
+ function rs(e, t, n = []) {
7049
7053
  if (!e)
7050
7054
  return;
7051
7055
  if (!nt(e)) {
7052
- kt(e, (i, l) => ss(i, t, [...n, ...Bt(l)]));
7056
+ kt(e, (i, l) => rs(i, t, [...n, ...Bt(l)]));
7053
7057
  return;
7054
7058
  }
7055
7059
  const [s, a] = e;
7056
7060
  a && kt(a, (i, l) => {
7057
- ss(i, t, [...n, ...Bt(l)]);
7061
+ rs(i, t, [...n, ...Bt(l)]);
7058
7062
  }), t(s, n);
7059
7063
  }
7060
- function hu(e, t, n) {
7061
- return ss(t, (s, a) => {
7062
- e = ns(e, a, (i) => uu(i, s, n));
7064
+ function gu(e, t, n) {
7065
+ return rs(t, (s, a) => {
7066
+ e = ss(e, a, (i) => mu(i, s, n));
7063
7067
  }), e;
7064
7068
  }
7065
- function mu(e, t) {
7069
+ function pu(e, t) {
7066
7070
  function n(s, a) {
7067
- const i = du(e, Bt(a));
7071
+ const i = fu(e, Bt(a));
7068
7072
  s.map(Bt).forEach((l) => {
7069
- e = ns(e, l, () => i);
7073
+ e = ss(e, l, () => i);
7070
7074
  });
7071
7075
  }
7072
7076
  if (nt(t)) {
7073
7077
  const [s, a] = t;
7074
7078
  s.forEach((i) => {
7075
- e = ns(e, Bt(i), () => e);
7079
+ e = ss(e, Bt(i), () => e);
7076
7080
  }), a && kt(a, n);
7077
7081
  } else
7078
7082
  kt(t, n);
7079
7083
  return e;
7080
7084
  }
7081
- var fu = (e, t) => Kt(e) || nt(e) || Vt(e) || jt(e) || ya(e, t);
7082
- function gu(e, t, n) {
7085
+ var yu = (e, t) => Kt(e) || nt(e) || Vt(e) || jt(e) || va(e, t);
7086
+ function vu(e, t, n) {
7083
7087
  const s = n.get(e);
7084
7088
  s ? s.push(t) : n.set(e, [t]);
7085
7089
  }
7086
- function pu(e, t) {
7090
+ function Eu(e, t) {
7087
7091
  const n = {};
7088
7092
  let s;
7089
7093
  return e.forEach((a) => {
@@ -7092,20 +7096,20 @@ function pu(e, t) {
7092
7096
  t || (a = a.map((o) => o.map(String)).sort((o, c) => o.length - c.length));
7093
7097
  const [i, ...l] = a;
7094
7098
  i.length === 0 ? s = l.map($n) : n[$n(i)] = l.map($n);
7095
- }), s ? ts(n) ? [s] : [s, n] : ts(n) ? void 0 : n;
7099
+ }), s ? ns(n) ? [s] : [s, n] : ns(n) ? void 0 : n;
7096
7100
  }
7097
- var Sa = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7098
- const o = su(e);
7101
+ var Na = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7102
+ const o = iu(e);
7099
7103
  if (!o) {
7100
- gu(e, a, t);
7104
+ vu(e, a, t);
7101
7105
  const y = l.get(e);
7102
7106
  if (y)
7103
7107
  return s ? {
7104
7108
  transformedValue: null
7105
7109
  } : y;
7106
7110
  }
7107
- if (!fu(e, n)) {
7108
- const y = zs(e, n), p = y ? {
7111
+ if (!yu(e, n)) {
7112
+ const y = Ws(e, n), p = y ? {
7109
7113
  transformedValue: y.value,
7110
7114
  annotations: [y.type]
7111
7115
  } : {
@@ -7117,16 +7121,16 @@ var Sa = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7117
7121
  return {
7118
7122
  transformedValue: null
7119
7123
  };
7120
- const c = zs(e, n), h = (c == null ? void 0 : c.value) ?? e, g = nt(h) ? [] : {}, d = {};
7124
+ const c = Ws(e, n), h = (c == null ? void 0 : c.value) ?? e, g = nt(h) ? [] : {}, d = {};
7121
7125
  kt(h, (y, p) => {
7122
7126
  if (p === "__proto__" || p === "constructor" || p === "prototype")
7123
7127
  throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
7124
- const S = Sa(y, t, n, s, [...a, p], [...i, e], l);
7128
+ const S = Na(y, t, n, s, [...a, p], [...i, e], l);
7125
7129
  g[p] = S.transformedValue, nt(S.annotations) ? d[p] = S.annotations : Kt(S.annotations) && kt(S.annotations, (v, x) => {
7126
- d[ma(p) + "." + x] = v;
7130
+ d[fa(p) + "." + x] = v;
7127
7131
  });
7128
7132
  });
7129
- const w = ts(d) ? {
7133
+ const w = ns(d) ? {
7130
7134
  transformedValue: g,
7131
7135
  annotations: c ? [c.type] : void 0
7132
7136
  } : {
@@ -7135,19 +7139,19 @@ var Sa = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
7135
7139
  };
7136
7140
  return o || l.set(e, w), w;
7137
7141
  };
7138
- function Na(e) {
7142
+ function Aa(e) {
7139
7143
  return Object.prototype.toString.call(e).slice(8, -1);
7140
7144
  }
7141
- function Ws(e) {
7142
- return Na(e) === "Array";
7145
+ function Ys(e) {
7146
+ return Aa(e) === "Array";
7143
7147
  }
7144
- function yu(e) {
7145
- if (Na(e) !== "Object")
7148
+ function bu(e) {
7149
+ if (Aa(e) !== "Object")
7146
7150
  return !1;
7147
7151
  const t = Object.getPrototypeOf(e);
7148
7152
  return !!t && t.constructor === Object && t === Object.prototype;
7149
7153
  }
7150
- function vu(e, t, n, s, a) {
7154
+ function wu(e, t, n, s, a) {
7151
7155
  const i = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
7152
7156
  i === "enumerable" && (e[t] = n), a && i === "nonenumerable" && Object.defineProperty(e, t, {
7153
7157
  value: n,
@@ -7156,17 +7160,17 @@ function vu(e, t, n, s, a) {
7156
7160
  configurable: !0
7157
7161
  });
7158
7162
  }
7159
- function rs(e, t = {}) {
7160
- if (Ws(e))
7161
- return e.map((a) => rs(a, t));
7162
- if (!yu(e))
7163
+ function as(e, t = {}) {
7164
+ if (Ys(e))
7165
+ return e.map((a) => as(a, t));
7166
+ if (!bu(e))
7163
7167
  return e;
7164
7168
  const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
7165
7169
  return [...n, ...s].reduce((a, i) => {
7166
- if (Ws(t.props) && !t.props.includes(i))
7170
+ if (Ys(t.props) && !t.props.includes(i))
7167
7171
  return a;
7168
- const l = e[i], o = rs(l, t);
7169
- return vu(a, i, o, e, t.nonenumerable), a;
7172
+ const l = e[i], o = as(l, t);
7173
+ return wu(a, i, o, e, t.nonenumerable), a;
7170
7174
  }, {});
7171
7175
  }
7172
7176
  var ae = class {
@@ -7174,17 +7178,17 @@ var ae = class {
7174
7178
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
7175
7179
  */
7176
7180
  constructor({ dedupe: e = !1 } = {}) {
7177
- this.classRegistry = new jc(), this.symbolRegistry = new ua((t) => t.description ?? ""), this.customTransformerRegistry = new Wc(), this.allowedErrorProps = [], this.dedupe = e;
7181
+ this.classRegistry = new Wc(), this.symbolRegistry = new da((t) => t.description ?? ""), this.customTransformerRegistry = new Xc(), this.allowedErrorProps = [], this.dedupe = e;
7178
7182
  }
7179
7183
  serialize(e) {
7180
- const t = /* @__PURE__ */ new Map(), n = Sa(e, t, this, this.dedupe), s = {
7184
+ const t = /* @__PURE__ */ new Map(), n = Na(e, t, this, this.dedupe), s = {
7181
7185
  json: n.transformedValue
7182
7186
  };
7183
7187
  n.annotations && (s.meta = {
7184
7188
  ...s.meta,
7185
7189
  values: n.annotations
7186
7190
  });
7187
- const a = pu(t, this.dedupe);
7191
+ const a = Eu(t, this.dedupe);
7188
7192
  return a && (s.meta = {
7189
7193
  ...s.meta,
7190
7194
  referentialEqualities: a
@@ -7192,8 +7196,8 @@ var ae = class {
7192
7196
  }
7193
7197
  deserialize(e) {
7194
7198
  const { json: t, meta: n } = e;
7195
- let s = rs(t);
7196
- return n != null && n.values && (s = hu(s, n.values, this)), n != null && n.referentialEqualities && (s = mu(s, n.referentialEqualities)), s;
7199
+ let s = as(t);
7200
+ return n != null && n.values && (s = gu(s, n.values, this)), n != null && n.referentialEqualities && (s = pu(s, n.referentialEqualities)), s;
7197
7201
  }
7198
7202
  stringify(e) {
7199
7203
  return JSON.stringify(this.serialize(e));
@@ -7226,44 +7230,44 @@ ae.registerClass = ae.defaultInstance.registerClass.bind(ae.defaultInstance);
7226
7230
  ae.registerSymbol = ae.defaultInstance.registerSymbol.bind(ae.defaultInstance);
7227
7231
  ae.registerCustom = ae.defaultInstance.registerCustom.bind(ae.defaultInstance);
7228
7232
  ae.allowErrorProps = ae.defaultInstance.allowErrorProps.bind(ae.defaultInstance);
7229
- var Eu = ae.serialize, od = ae.stringify;
7230
- function cd(e) {
7233
+ var Su = ae.serialize, hd = ae.stringify;
7234
+ function md(e) {
7231
7235
  return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
7232
7236
  }
7233
- function ud(e, t) {
7237
+ function fd(e, t) {
7234
7238
  return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
7235
7239
  }
7236
- function dd({
7240
+ function gd({
7237
7241
  queryState: e,
7238
7242
  observerCount: t,
7239
7243
  isStale: n
7240
7244
  }) {
7241
7245
  return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
7242
7246
  }
7243
- function hd({
7247
+ function pd({
7244
7248
  status: e,
7245
7249
  isPaused: t
7246
7250
  }) {
7247
7251
  return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
7248
7252
  }
7249
- function md(e) {
7253
+ function yd(e) {
7250
7254
  return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
7251
7255
  }
7252
- var fd = (e, t = !1) => {
7256
+ var vd = (e, t = !1) => {
7253
7257
  const {
7254
7258
  json: n
7255
- } = Eu(e);
7259
+ } = Su(e);
7256
7260
  return JSON.stringify(n, null, t ? 2 : void 0);
7257
- }, En = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, bu = (e, t) => e.queryHash.localeCompare(t.queryHash), Aa = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, wu = (e, t) => En(e) === En(t) ? Aa(e, t) : En(e) > En(t) ? 1 : -1, gd = {
7258
- status: wu,
7259
- "query hash": bu,
7260
- "last updated": Aa
7261
- }, bn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, xa = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Su = (e, t) => bn(e) === bn(t) ? xa(e, t) : bn(e) > bn(t) ? 1 : -1, pd = {
7262
- status: Su,
7261
+ }, En = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, Nu = (e, t) => e.queryHash.localeCompare(t.queryHash), xa = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, Au = (e, t) => En(e) === En(t) ? xa(e, t) : En(e) > En(t) ? 1 : -1, Ed = {
7262
+ status: Au,
7263
+ "query hash": Nu,
7263
7264
  "last updated": xa
7264
- }, yd = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), vd = () => {
7265
+ }, bn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Ta = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, xu = (e, t) => bn(e) === bn(t) ? Ta(e, t) : bn(e) > bn(t) ? 1 : -1, bd = {
7266
+ status: xu,
7267
+ "last updated": Ta
7268
+ }, wd = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Sd = () => {
7265
7269
  const [e, t] = ve("dark");
7266
- return ic(() => {
7270
+ return cc(() => {
7267
7271
  const n = window.matchMedia("(prefers-color-scheme: dark)");
7268
7272
  t(n.matches ? "dark" : "light");
7269
7273
  const s = (a) => {
@@ -7331,12 +7335,12 @@ var fd = (e, t = !1) => {
7331
7335
  return n[s] = Sn(n[s], a), n;
7332
7336
  }
7333
7337
  return e;
7334
- }, Ta = (e, t) => {
7338
+ }, Ca = (e, t) => {
7335
7339
  if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober")))
7336
7340
  return;
7337
7341
  const s = document.createElement("style"), a = document.createTextNode("");
7338
7342
  s.appendChild(a), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
7339
- }, gt, $t, zt, Wt, at, Yt, pt, yt, vt, Et, bt, wt, Qt, Ys, Nu = (Ys = class {
7343
+ }, gt, $t, zt, Wt, at, Yt, pt, yt, vt, Et, bt, wt, Qt, Qs, Tu = (Qs = class {
7340
7344
  constructor(e) {
7341
7345
  se(this, gt);
7342
7346
  se(this, $t);
@@ -7383,10 +7387,10 @@ var fd = (e, t = !1) => {
7383
7387
  mount(e) {
7384
7388
  if (R(this, at))
7385
7389
  throw new Error("Devtools is already mounted");
7386
- const t = la(() => {
7390
+ const t = oa(() => {
7387
7391
  const n = this, [s] = R(this, yt), [a] = R(this, vt), [i] = R(this, Et), [l] = R(this, bt), [o] = R(this, gt);
7388
7392
  let c;
7389
- return R(this, wt) ? c = R(this, wt) : (c = aa(() => import("./HO4MOOFI-B0re9LoG.js")), ee(this, wt, c)), Ta(R(this, Yt), R(this, pt)), sa(c, ra({
7393
+ return R(this, wt) ? c = R(this, wt) : (c = ia(() => import("./HO4MOOFI-CRSNiC7G.js")), ee(this, wt, c)), Ca(R(this, Yt), R(this, pt)), ra(c, aa({
7390
7394
  get queryFlavor() {
7391
7395
  return R(n, zt);
7392
7396
  },
@@ -7425,7 +7429,7 @@ var fd = (e, t = !1) => {
7425
7429
  throw new Error("Devtools is not mounted");
7426
7430
  (e = R(this, Qt)) == null || e.call(this), ee(this, at, !1);
7427
7431
  }
7428
- }, gt = new WeakMap(), $t = new WeakMap(), zt = new WeakMap(), Wt = new WeakMap(), at = new WeakMap(), Yt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), vt = new WeakMap(), Et = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), Qt = new WeakMap(), Ys), St, Xt, Zt, Jt, it, en, Nt, At, xt, Tt, Ct, Pt, _t, tn, Qs, Au = (Qs = class {
7432
+ }, gt = new WeakMap(), $t = new WeakMap(), zt = new WeakMap(), Wt = new WeakMap(), at = new WeakMap(), Yt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), vt = new WeakMap(), Et = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), Qt = new WeakMap(), Qs), St, Xt, Zt, Jt, it, en, Nt, At, xt, Tt, Ct, Pt, _t, tn, Xs, Cu = (Xs = class {
7429
7433
  constructor(e) {
7430
7434
  se(this, St);
7431
7435
  se(this, Xt);
@@ -7477,10 +7481,10 @@ var fd = (e, t = !1) => {
7477
7481
  mount(e) {
7478
7482
  if (R(this, it))
7479
7483
  throw new Error("Devtools is already mounted");
7480
- const t = la(() => {
7484
+ const t = oa(() => {
7481
7485
  const n = this, [s] = R(this, At), [a] = R(this, xt), [i] = R(this, Tt), [l] = R(this, Ct), [o] = R(this, St), [c] = R(this, Pt);
7482
7486
  let h;
7483
- return R(this, _t) ? h = R(this, _t) : (h = aa(() => import("./HUY7CZI3-Bhnn9mlN.js")), ee(this, _t, h)), Ta(R(this, en), R(this, Nt)), sa(h, ra({
7487
+ return R(this, _t) ? h = R(this, _t) : (h = ia(() => import("./HUY7CZI3-DfVfYgpJ.js")), ee(this, _t, h)), Ca(R(this, en), R(this, Nt)), ra(h, aa({
7484
7488
  get queryFlavor() {
7485
7489
  return R(n, Zt);
7486
7490
  },
@@ -7522,8 +7526,8 @@ var fd = (e, t = !1) => {
7522
7526
  throw new Error("Devtools is not mounted");
7523
7527
  (e = R(this, tn)) == null || e.call(this), ee(this, it, !1);
7524
7528
  }
7525
- }, St = new WeakMap(), Xt = new WeakMap(), Zt = new WeakMap(), Jt = new WeakMap(), it = new WeakMap(), en = new WeakMap(), Nt = new WeakMap(), At = new WeakMap(), xt = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), _t = new WeakMap(), tn = new WeakMap(), Qs);
7526
- function xu(e) {
7529
+ }, St = new WeakMap(), Xt = new WeakMap(), Zt = new WeakMap(), Jt = new WeakMap(), it = new WeakMap(), en = new WeakMap(), Nt = new WeakMap(), At = new WeakMap(), xt = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), _t = new WeakMap(), tn = new WeakMap(), Xs);
7530
+ function Pu(e) {
7527
7531
  const t = Se(e.client), n = ce.useRef(null), {
7528
7532
  buttonPosition: s,
7529
7533
  position: a,
@@ -7532,11 +7536,11 @@ function xu(e) {
7532
7536
  styleNonce: o,
7533
7537
  shadowDOMTarget: c
7534
7538
  } = e, [h] = ce.useState(
7535
- new Nu({
7539
+ new Tu({
7536
7540
  client: t,
7537
7541
  queryFlavor: "React Query",
7538
7542
  version: "5",
7539
- onlineManager: tr,
7543
+ onlineManager: nr,
7540
7544
  buttonPosition: s,
7541
7545
  position: a,
7542
7546
  initialIsOpen: i,
@@ -7559,13 +7563,13 @@ function xu(e) {
7559
7563
  h.unmount();
7560
7564
  }), [h]), /* @__PURE__ */ r("div", { className: "tsqd-parent-container", ref: n });
7561
7565
  }
7562
- function Tu(e) {
7566
+ function _u(e) {
7563
7567
  const t = Se(e.client), n = ce.useRef(null), { errorTypes: s, styleNonce: a, shadowDOMTarget: i } = e, [l] = ce.useState(
7564
- new Au({
7568
+ new Cu({
7565
7569
  client: t,
7566
7570
  queryFlavor: "React Query",
7567
7571
  version: "5",
7568
- onlineManager: tr,
7572
+ onlineManager: nr,
7569
7573
  buttonPosition: "bottom-left",
7570
7574
  position: "bottom",
7571
7575
  initialIsOpen: !0,
@@ -7593,52 +7597,52 @@ function Tu(e) {
7593
7597
  }
7594
7598
  );
7595
7599
  }
7596
- var Cu = process.env.NODE_ENV !== "development" ? function() {
7600
+ var Iu = process.env.NODE_ENV !== "development" ? function() {
7597
7601
  return null;
7598
- } : xu;
7602
+ } : Pu;
7599
7603
  process.env.NODE_ENV;
7600
- const Pu = Wa(
7601
- () => import("./digital-asset-manager-BZ6Gatq3.js")
7604
+ const ku = Qa(
7605
+ () => import("./digital-asset-manager-DS4mu-dP.js")
7602
7606
  );
7603
- ol();
7604
- Xo();
7605
- li(Uo);
7606
- oi(Pu);
7607
- ci(Rl);
7608
- zn("user-info", ec);
7609
- const _u = (e) => {
7607
+ ul();
7608
+ ec();
7609
+ ci(Oo);
7610
+ ui(ku);
7611
+ di(Bl);
7612
+ zn("user-info", sc);
7613
+ const Lu = (e) => {
7610
7614
  const t = ct([]), [n] = Ue(), s = n.get("page"), a = n.get("lang"), { data: i } = Re(), {
7611
7615
  data: l = {
7612
7616
  role: "",
7613
7617
  permissions: null
7614
7618
  }
7615
- } = Fo(), { data: o } = Mo(), { data: c, isFetching: h } = Br(), { blocks: g } = Bo(c), { data: d } = un(), { data: w } = Ie(), { mutateAsync: y } = Ur(), p = Ro(), { getUILibraryBlock: S, getUILibraryBlocks: v, onSave: x } = qo(), { getPartialBlocks: G, getPartialBlockBlocks: E } = Ho(), { aiContext: b, setAiContext: T } = Es(), { mutateAsync: U } = Ml(), [J, ie] = P(!1), k = Y(
7619
+ } = Ho(), { data: o } = qo(), { data: c, isFetching: h } = Mr(), { blocks: g } = Fo(c), { data: d } = un(), { data: w } = Ie(), { mutateAsync: y } = Rr(), p = Bo(), { getUILibraryBlock: S, getUILibraryBlocks: v, onSave: x } = Ko(), { getPartialBlocks: G, getPartialBlockBlocks: E } = Vo(), { aiContext: b, setAiContext: T } = bs(), { mutateAsync: U } = ql(), [J, ie] = P(!1), k = W(
7616
7620
  () => (d == null ? void 0 : d.fallbackLang) || "en",
7617
7621
  [d]
7618
- ), { data: q } = Mr({
7622
+ ), { data: q } = Fr({
7619
7623
  pageType: i == null ? void 0 : i.pageType,
7620
7624
  lang: a || k
7621
7625
  });
7622
- wl(), we(() => {
7626
+ Nl(), we(() => {
7623
7627
  const z = () => {
7624
7628
  document.hidden ? ie(!0) : ie(!1);
7625
7629
  };
7626
7630
  return window.addEventListener("visibilitychange", z), () => window.removeEventListener("visibilitychange", z);
7627
7631
  }, []), t.current = g;
7628
- const A = Y(() => {
7632
+ const A = W(() => {
7629
7633
  const z = {};
7630
7634
  return l && (z.permissions = te(l, "permissions", null), z.role = te(l, "role", "user")), z;
7631
- }, [l]), M = Y(() => o, [o]), ne = _e(
7635
+ }, [l]), M = W(() => o, [o]), ne = _e(
7632
7636
  async (z, de) => await U({ pageType: z, query: de }),
7633
7637
  [U]
7634
- ), he = Y(
7638
+ ), he = W(
7635
7639
  () => te(d, "theme", {}) || {},
7636
7640
  [d]
7637
7641
  );
7638
7642
  return /* @__PURE__ */ u(be, { children: [
7639
- h && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-50 flex items-center justify-center w-screen h-screen bg-white/30", children: /* @__PURE__ */ r("div", { className: "flex items-center justify-center bg-white rounded-full size-10", children: /* @__PURE__ */ r(Dr, { className: "size-5 animate-spin" }) }) }),
7643
+ h && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-50 flex items-center justify-center w-screen h-screen bg-white/30", children: /* @__PURE__ */ r("div", { className: "flex items-center justify-center bg-white rounded-full size-10", children: /* @__PURE__ */ r(Gr, { className: "size-5 animate-spin" }) }) }),
7640
7644
  /* @__PURE__ */ r(
7641
- ui,
7645
+ hi,
7642
7646
  {
7643
7647
  pageExternalData: q,
7644
7648
  themePresets: e.themePresets ?? [],
@@ -7656,7 +7660,7 @@ const _u = (e) => {
7656
7660
  getPartialBlockBlocks: E,
7657
7661
  getPartialBlocks: G,
7658
7662
  blocks: h ? [] : g,
7659
- theme: za(he),
7663
+ theme: Wa(he),
7660
7664
  getUILibraryBlock: S,
7661
7665
  getUILibraryBlocks: v,
7662
7666
  uiLibraries: M,
@@ -7666,7 +7670,7 @@ const _u = (e) => {
7666
7670
  if (!s) return !0;
7667
7671
  const de = t.current, F = {
7668
7672
  _type: "@chai/ai-context",
7669
- _value: Ls(z) ? z : ""
7673
+ _value: Ds(z) ? z : ""
7670
7674
  }, Ee = [...de, F];
7671
7675
  return await x({ page: s, blocks: Ee }), T(z), !0;
7672
7676
  },
@@ -7677,30 +7681,30 @@ const _u = (e) => {
7677
7681
  t.current = z;
7678
7682
  const F = {
7679
7683
  _type: "@chai/ai-context",
7680
- _value: Ls(b) ? b : ""
7684
+ _value: Ds(b) ? b : ""
7681
7685
  }, Ee = [...z, F];
7682
- return await x({ page: s, blocks: Ee }), t.current = Ee, as(de, he) || await y({ settings: { theme: de } }), !0;
7686
+ return await x({ page: s, blocks: Ee }), t.current = Ee, is(de, he) || await y({ settings: { theme: de } }), !0;
7683
7687
  },
7684
- themePanelComponent: Wl,
7688
+ themePanelComponent: Ql,
7685
7689
  ...A
7686
7690
  }
7687
7691
  ),
7688
7692
  /* @__PURE__ */ u("div", { children: [
7689
- /* @__PURE__ */ r(xl, {}),
7690
- /* @__PURE__ */ r(Tl, {})
7693
+ /* @__PURE__ */ r(Cl, {}),
7694
+ /* @__PURE__ */ r(Pl, {})
7691
7695
  ] })
7692
7696
  ] });
7693
- }, Iu = new Ya({
7697
+ }, Du = new Xa({
7694
7698
  defaultOptions: {
7695
7699
  queries: {
7696
7700
  refetchOnWindowFocus: !1,
7697
7701
  refetchOnReconnect: !1
7698
7702
  }
7699
7703
  }
7700
- }), Ed = (e) => {
7701
- const { isLoggedIn: t } = st(), [, n] = Rr(), [s, a] = P(!1);
7704
+ }), Nd = (e) => {
7705
+ const { isLoggedIn: t } = st(), [, n] = Or(), [s, a] = P(!1);
7702
7706
  return we(() => (n(
7703
- Js(e, [
7707
+ er(e, [
7704
7708
  "apiUrl",
7705
7709
  "usersApiUrl",
7706
7710
  "getPreviewUrl",
@@ -7714,75 +7718,74 @@ const _u = (e) => {
7714
7718
  a(!0);
7715
7719
  }, 200), () => {
7716
7720
  a(!1), n({});
7717
- }), [e, n]), s ? /* @__PURE__ */ u(Qa, { client: Iu, children: [
7718
- t ? /* @__PURE__ */ r(_u, { ...e }) : /* @__PURE__ */ r(Vo, {}),
7719
- /* @__PURE__ */ r(Cu, {})
7721
+ }), [e, n]), s ? /* @__PURE__ */ u(Za, { client: Du, children: [
7722
+ t ? /* @__PURE__ */ r(Lu, { ...e }) : /* @__PURE__ */ r(zo, {}),
7723
+ /* @__PURE__ */ r(Iu, {})
7720
7724
  ] }) : /* @__PURE__ */ r("div", {});
7721
- }, bd = (e) => {
7722
7725
  };
7723
7726
  if (typeof window > "u")
7724
7727
  throw new Error("@chaibuilder/pages is not available on the server");
7725
7728
  export {
7726
- Wr as $,
7727
- fd as A,
7728
- $u as B,
7729
- ad as C,
7730
- ld as D,
7729
+ Yr as $,
7730
+ vd as A,
7731
+ Qu as B,
7732
+ cd as C,
7733
+ dd as D,
7731
7734
  Ce as E,
7732
- Ju as F,
7733
- sc as G,
7734
- Eu as H,
7735
- ed as I,
7735
+ sd as F,
7736
+ ic as G,
7737
+ Su as H,
7738
+ rd as I,
7736
7739
  wn as J,
7737
- yd as K,
7738
- ud as L,
7739
- cd as M,
7740
+ wd as K,
7741
+ fd as L,
7742
+ md as M,
7740
7743
  lt as N,
7741
- Gc as O,
7742
- id as P,
7743
- od as Q,
7744
- sd as R,
7745
- td as S,
7746
- nd as T,
7744
+ Oc as O,
7745
+ ud as P,
7746
+ hd as Q,
7747
+ ld as R,
7748
+ ad as S,
7749
+ id as T,
7747
7750
  Sn as U,
7748
- Yu as V,
7751
+ Ju as V,
7749
7752
  Q as W,
7750
7753
  $ as X,
7751
7754
  I as Y,
7752
- Ed as Z,
7755
+ Nd as Z,
7753
7756
  Oe as _,
7754
- sa as a,
7755
- bd as a0,
7757
+ ra as a,
7758
+ Yu as a0,
7756
7759
  Re as a1,
7757
7760
  cn as a2,
7758
7761
  Rn as a3,
7759
7762
  un as a4,
7760
- Fo as a5,
7761
- ju as a6,
7763
+ Ho as a5,
7764
+ Wu as a6,
7762
7765
  dn as a7,
7763
7766
  ve as b,
7764
7767
  Ge as c,
7765
- Ic as d,
7766
- Xr as e,
7767
- ra as f,
7768
- vd as g,
7769
- vc as h,
7770
- Qu as i,
7768
+ Dc as d,
7769
+ Zr as e,
7770
+ aa as f,
7771
+ Sd as g,
7772
+ wc as h,
7773
+ ed as i,
7771
7774
  ot as j,
7772
- Zn as k,
7773
- Zu as l,
7774
- pd as m,
7775
+ Jn as k,
7776
+ nd as l,
7777
+ bd as m,
7775
7778
  Ft as n,
7776
- zu as o,
7777
- ic as p,
7778
- Bc as q,
7779
- Jn as r,
7780
- gd as s,
7781
- rd as t,
7782
- Xu as u,
7783
- Dc as v,
7784
- dd as w,
7785
- hd as x,
7786
- Oc as y,
7787
- md as z
7779
+ Xu as o,
7780
+ cc as p,
7781
+ qc as q,
7782
+ es as r,
7783
+ Ed as s,
7784
+ od as t,
7785
+ td as u,
7786
+ Rc as v,
7787
+ gd as w,
7788
+ pd as x,
7789
+ Fc as y,
7790
+ yd as z
7788
7791
  };