@chaibuilder/pages 0.6.6 → 0.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,16 +4,16 @@ var rr = (e) => {
4
4
  var ar = (e, t, n) => t.has(e) || rr("Cannot " + n);
5
5
  var K = (e, t, n) => (ar(e, t, "read from private field"), n ? n.call(e) : t.get(e)), be = (e, t, n) => t.has(e) ? rr("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), pe = (e, t, n, s) => (ar(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
6
6
  import { jsx as r, jsxs as c, Fragment as ye } from "react/jsx-runtime";
7
- import { get as ae, isEmpty as H, reverse as xi, sortBy as Ai, each as Ti, find as ve, set as Ci, has as Ge, startsWith as Bn, isEqual as Ls, map as Xe, filter as ke, startCase as Wt, groupBy as Pi, initial as _i, includes as ft, uniq as Lr, union as ki, flatMap as Ii, compact as Ds, uniqBy as Li, keyBy as Dr, mapValues as Di, toLower as Et, endsWith as Gr, orderBy as Pn, first as Ur, concat as Gi, debounce as Ui, upperCase as ir, pick as Hn, keys as Oi, pickBy as Ri, isArray as Bi, merge as Mi, noop as Fi, isFunction as ji, cloneDeep as $i, isString as lr } from "lodash-es";
7
+ import { get as ae, isEmpty as H, reverse as xi, sortBy as Ai, each as Ti, find as ve, set as Ci, has as Ge, startsWith as Bn, isEqual as Ds, map as Xe, filter as ke, startCase as Wt, groupBy as Pi, initial as _i, includes as ft, uniq as Lr, union as ki, flatMap as Ii, compact as Hn, uniqBy as Li, keyBy as Dr, mapValues as Di, toLower as Et, endsWith as Gr, orderBy as Pn, first as Ur, concat as Gi, debounce as Ui, upperCase as ir, pick as Wn, keys as Oi, pickBy as Ri, isArray as Bi, merge as Mi, noop as Fi, isFunction as ji, cloneDeep as $i, isString as lr } from "lodash-es";
8
8
  import * as Ae from "react";
9
- import Wn, { useCallback as ce, useMemo as X, useState as S, useEffect as me, useRef as ct, Suspense as Or, lazy as zi } from "react";
10
- import { useAtom as Qt, atom as Yn } from "jotai";
9
+ import Yn, { useCallback as ce, useMemo as X, useState as S, useEffect as me, useRef as ct, Suspense as Or, lazy as zi } from "react";
10
+ import { useAtom as Qt, atom as Qn } from "jotai";
11
11
  import { useQueryClient as Te, useMutation as Ce, useQuery as De, onlineManager as Rr, QueryClient as qi, QueryClientProvider as Vi } from "@tanstack/react-query";
12
12
  import { toast as z, Toaster as Ki } from "sonner";
13
- import { useLanguages as Je, useUpdateBlocksPropsRealtime as Br, PERMISSIONS as Hi, usePartailBlocksStore as Wi, usePermissions as Xt, useLibraryBlocks as Yi, useTheme as Qi, useSidebarActivePanel as Qn, useSavePage as Gs, mergeClasses as Us, useRightPanel as Xi, registerChaiLibrary as Zi, getBlocksFromHTML as Ji, useBuilderProp as el, useTranslation as tl, registerChaiSidebarPanel as hs, registerChaiTopBar as nl, registerChaiMediaManager as sl, registerChaiSaveToLibrary as rl, ChaiBuilderEditor as al } from "@chaibuilder/sdk";
14
- import { Card as Os, CardHeader as Rs, CardTitle as Bs, CardContent as Ms, CardFooter as Fs, Button as T, AlertDialog as Mr, AlertDialogTrigger as Fr, AlertDialogContent as jr, AlertDialogHeader as $r, AlertDialogTitle as zr, AlertDialogDescription as qr, AlertDialogFooter as Vr, AlertDialogCancel as Kr, AlertDialogAction as Hr, Popover as Wr, PopoverTrigger as Yr, PopoverContent as Qr, Input as _e, Label as re, Dialog as Ke, DialogContent as He, DialogHeader as We, DialogTitle as Ye, DialogDescription as et, Alert as Xn, DialogFooter as st, DropdownMenu as Nn, DropdownMenuTrigger as Sn, DropdownMenuContent as xn, DropdownMenuItem as $e, Textarea as It, Tooltip as at, TooltipTrigger as it, TooltipContent as lt, Select as il, SelectTrigger as ll, SelectValue as ol, SelectContent as cl, SelectItem as ms, Badge as fs, Sheet as Xr, SheetContent as Zr, SheetHeader as Jr, SheetTitle as ea, SheetDescription as dl, Separator as ul, TooltipProvider as wt, SheetTrigger as hl, ScrollArea as ml, Skeleton as _n, DropdownMenuSeparator as fl, CardDescription as gl, Command as pl, CommandInput as yl, CommandList as vl, CommandEmpty as bl, CommandGroup as El, CommandItem as or, Switch as wl, AlertDescription as Nl, Accordion as Sl, AccordionItem as kn, AccordionTrigger as In, AccordionContent as Ln, HoverCard as xl, HoverCardTrigger as Al, HoverCardContent as Tl } from "@chaibuilder/sdk/ui";
15
- import { formatDistanceToNow as ta, format as Zn } from "date-fns";
16
- import { LockIcon as js, UserIcon as Cl, AlertTriangleIcon as Pl, Trash2 as Jn, Plus as $s, ImageIcon as rn, X as zs, AlertCircle as es, StarIcon as _l, MoreHorizontal as ts, PencilIcon as kl, Power as na, TrashIcon as Il, Tag as Ll, File as An, CopyPlusIcon as Dl, Pencil as sa, Trash as qs, SquareLibrary as cr, Search as ra, ChevronRight as aa, StarsIcon as Gl, Globe as Ul, Logs as Ol, Loader as Tt, Languages as Rl, ChevronDown as ia, Star as Bl, History as dr, ArrowUpRight as Ml, Clock as Fl, Undo2 as la, CloudOff as jl, Edit as oa, Save as ca, GlobeIcon as $l, Eye as da, Palette as zl, CheckCircle as ql, Send as ur, Rocket as hr, Settings as Vl, ExternalLink as Kl, EyeOff as Hl, Loader2 as Vs, LanguagesIcon as Wl, DatabaseIcon as Yl, ChevronLeft as ua, Copy as ha, Link as Ql, Archive as Xl, Film as Zl, Check as Jl, Upload as eo, AlertTriangle as to, Sparkle as no, User as so } from "lucide-react";
13
+ import { useLanguages as Je, useUpdateBlocksPropsRealtime as Br, PERMISSIONS as Hi, usePartailBlocksStore as Wi, usePermissions as Xt, useLibraryBlocks as Yi, useTheme as Qi, useSidebarActivePanel as Xn, useSavePage as Gs, mergeClasses as Us, useRightPanel as Xi, registerChaiLibrary as Zi, getBlocksFromHTML as Ji, useBuilderProp as el, useTranslation as tl, registerChaiSidebarPanel as ms, registerChaiTopBar as nl, registerChaiMediaManager as sl, registerChaiSaveToLibrary as rl, ChaiBuilderEditor as al } from "@chaibuilder/sdk";
14
+ import { Card as Os, CardHeader as Rs, CardTitle as Bs, CardContent as Ms, CardFooter as Fs, Button as T, AlertDialog as Mr, AlertDialogTrigger as Fr, AlertDialogContent as jr, AlertDialogHeader as $r, AlertDialogTitle as zr, AlertDialogDescription as qr, AlertDialogFooter as Vr, AlertDialogCancel as Kr, AlertDialogAction as Hr, Popover as Wr, PopoverTrigger as Yr, PopoverContent as Qr, Input as _e, Label as re, Dialog as Ke, DialogContent as He, DialogHeader as We, DialogTitle as Ye, DialogDescription as et, Alert as Zn, DialogFooter as st, DropdownMenu as Nn, DropdownMenuTrigger as Sn, DropdownMenuContent as xn, DropdownMenuItem as $e, Textarea as It, Tooltip as at, TooltipTrigger as it, TooltipContent as lt, Select as il, SelectTrigger as ll, SelectValue as ol, SelectContent as cl, SelectItem as fs, Badge as gs, Sheet as Xr, SheetContent as Zr, SheetHeader as Jr, SheetTitle as ea, SheetDescription as dl, Separator as ul, TooltipProvider as wt, SheetTrigger as hl, ScrollArea as ml, Skeleton as _n, DropdownMenuSeparator as fl, CardDescription as gl, Command as pl, CommandInput as yl, CommandList as vl, CommandEmpty as bl, CommandGroup as El, CommandItem as or, Switch as wl, AlertDescription as Nl, Accordion as Sl, AccordionItem as kn, AccordionTrigger as In, AccordionContent as Ln, HoverCard as xl, HoverCardTrigger as Al, HoverCardContent as Tl } from "@chaibuilder/sdk/ui";
15
+ import { formatDistanceToNow as ta, format as Jn } from "date-fns";
16
+ import { LockIcon as js, UserIcon as Cl, AlertTriangleIcon as Pl, Trash2 as es, Plus as $s, ImageIcon as rn, X as zs, AlertCircle as ts, StarIcon as _l, MoreHorizontal as ns, PencilIcon as kl, Power as na, TrashIcon as Il, Tag as Ll, File as An, CopyPlusIcon as Dl, Pencil as sa, Trash as qs, SquareLibrary as cr, Search as ra, ChevronRight as aa, StarsIcon as Gl, Globe as Ul, Logs as Ol, Loader as Tt, Languages as Rl, ChevronDown as ia, Star as Bl, History as dr, ArrowUpRight as Ml, Clock as Fl, Undo2 as la, CloudOff as jl, Edit as oa, Save as ca, GlobeIcon as $l, Eye as da, Palette as zl, CheckCircle as ql, Send as ur, Rocket as hr, Settings as Vl, ExternalLink as Kl, EyeOff as Hl, Loader2 as Vs, LanguagesIcon as Wl, DatabaseIcon as Yl, ChevronLeft as ua, Copy as ha, Link as Ql, Archive as Xl, Film as Zl, Check as Jl, Upload as eo, AlertTriangle as to, Sparkle as no, User as so } from "lucide-react";
17
17
  import { useRegisteredChaiBlocks as ro, getDefaultBlockProps as ao } from "@chaibuilder/runtime";
18
18
  import { z as Mn } from "zod";
19
19
  import { useDropzone as io } from "react-dropzone";
@@ -379,7 +379,7 @@ const fa = "__logged_in_user", po = ma(
379
379
  setUser: t,
380
380
  logout: n
381
381
  };
382
- }, ns = async (e, t, n = {}) => await fetch(e, {
382
+ }, ss = async (e, t, n = {}) => await fetch(e, {
383
383
  method: "POST",
384
384
  headers: {
385
385
  "Content-Type": "application/json",
@@ -390,7 +390,7 @@ const fa = "__logged_in_user", po = ma(
390
390
  if (import.meta.vitest) {
391
391
  const { it: e, expect: t } = import.meta.vitest;
392
392
  e("should fetch API", async () => {
393
- const n = await ns("/v1/api/chai", {
393
+ const n = await ss("/v1/api/chai", {
394
394
  action: "test"
395
395
  });
396
396
  t(n).toBeDefined();
@@ -403,7 +403,7 @@ const W = () => {
403
403
  if (!s)
404
404
  return null;
405
405
  try {
406
- const o = ae(a, "action", "").toLowerCase(), d = await ns(
406
+ const o = ae(a, "action", "").toLowerCase(), d = await ss(
407
407
  i + (o ? `?action=${o}` : ""),
408
408
  a,
409
409
  { ...l, Authorization: `Bearer ${s}` }
@@ -486,7 +486,7 @@ function qe() {
486
486
  };
487
487
  }, []), [e, t];
488
488
  }
489
- const vo = Yn({}), ya = () => Qt(vo), bo = () => {
489
+ const vo = Qn({}), ya = () => Qt(vo), bo = () => {
490
490
  const [e] = qe(), t = e.get("page"), n = ct(""), { mutate: s } = ga();
491
491
  me(() => {
492
492
  !H(n.current) && t !== n.current && s({ id: n.current }), n.current = t;
@@ -497,7 +497,7 @@ const vo = Yn({}), ya = () => Qt(vo), bo = () => {
497
497
  () => ae(n, e, t),
498
498
  [n, e, t]
499
499
  );
500
- }, ie = () => ut("apiUrl", "/chai/api"), ss = () => ut("usersApiUrl", "/chai/users"), Tn = () => ut("assetsApiUrl", "/chai/assets"), yt = (e) => {
500
+ }, ie = () => ut("apiUrl", "/chai/api"), rs = () => ut("usersApiUrl", "/chai/users"), Tn = () => ut("assetsApiUrl", "/chai/assets"), yt = (e) => {
501
501
  const t = ie(), [n] = qe(), s = e ?? n.get("page"), i = W();
502
502
  return De({
503
503
  queryKey: [$, _.GET_LANGUAGE_PAGES, s],
@@ -548,7 +548,7 @@ const vo = Yn({}), ya = () => Qt(vo), bo = () => {
548
548
  },
549
549
  [e]
550
550
  ), aiContext: t };
551
- }, rs = () => {
551
+ }, as = () => {
552
552
  const e = W(), t = ie();
553
553
  return De({
554
554
  queryKey: [$, _.GET_WEBSITE_PAGES],
@@ -556,20 +556,20 @@ const vo = Yn({}), ya = () => Qt(vo), bo = () => {
556
556
  queryFn: async () => e(t, { action: _.GET_WEBSITE_PAGES }) || [],
557
557
  placeholderData: (n) => n
558
558
  });
559
- }, Eo = Yn({ lastSaved: void 0 }), as = () => Qt(Eo), Qe = () => {
560
- const [e] = qe(), t = e.get("page"), [n] = ba(), { data: s, isFetching: i } = rs();
559
+ }, Eo = Qn({ lastSaved: void 0 }), is = () => Qt(Eo), Qe = () => {
560
+ const [e] = qe(), t = e.get("page"), [n] = ba(), { data: s, isFetching: i } = as();
561
561
  return { data: X(
562
562
  () => ({ ...ve(s, { id: t }) || {}, metadata: n }),
563
563
  [s, t, n]
564
564
  ), isFetching: i };
565
- }, is = () => {
565
+ }, ls = () => {
566
566
  const [e] = qe(), t = e.get("lang") ?? "", { data: n, isFetching: s } = yt();
567
567
  return { data: X(
568
568
  () => ve(n, { lang: t }) || {},
569
569
  [n, t]
570
570
  ), isFetching: s };
571
- }, wo = Yn({}), ba = () => Qt(wo), Zt = (e) => {
572
- const t = ss(), n = W();
571
+ }, wo = Qn({}), ba = () => Qt(wo), Zt = (e) => {
572
+ const t = rs(), n = W();
573
573
  return De({
574
574
  queryKey: [$, "chaiUserInfo", e],
575
575
  queryFn: async () => await n(t, {
@@ -578,7 +578,7 @@ const vo = Yn({}), ya = () => Qt(vo), bo = () => {
578
578
  }),
579
579
  enabled: !H(e)
580
580
  });
581
- }, No = Yn(void 0), Cn = () => {
581
+ }, No = Qn(void 0), Cn = () => {
582
582
  const [e] = qe(), t = e.get("page"), { user: n } = dt(), [s, i] = Qt(No);
583
583
  return X(() => ({
584
584
  isLocked: t && (n == null ? void 0 : n.id) !== s,
@@ -592,7 +592,7 @@ const vo = Yn({}), ya = () => Qt(vo), bo = () => {
592
592
  [e]
593
593
  );
594
594
  }, wa = () => {
595
- const [e] = qe(), t = e.get("page"), n = ie(), { setAiContext: s } = Ks(), { setCurrentEditor: i } = Cn(), [, a] = as(), [, l] = ba(), o = W();
595
+ const [e] = qe(), t = e.get("page"), n = ie(), { setAiContext: s } = Ks(), { setCurrentEditor: i } = Cn(), [, a] = is(), [, l] = ba(), o = W();
596
596
  return De({
597
597
  queryKey: [$, _.GET_DRAFT_PAGE, t],
598
598
  staleTime: 1 / 0,
@@ -610,7 +610,7 @@ const vo = Yn({}), ya = () => Qt(vo), bo = () => {
610
610
  enabled: !!t
611
611
  });
612
612
  }, Na = () => {
613
- const { data: e } = Qe(), { data: t } = is(), n = ie(), s = W(), i = Ea();
613
+ const { data: e } = Qe(), { data: t } = ls(), n = ie(), s = W(), i = Ea();
614
614
  return De({
615
615
  queryKey: [$, _.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id],
616
616
  initialData: {},
@@ -707,7 +707,7 @@ function So({
707
707
  ] }) });
708
708
  }
709
709
  const xo = () => {
710
- const { isLocked: e, currentEditor: t } = Cn(), { data: n } = Zt(t), [s] = qe(), i = s.get("page"), { mutate: a } = ga(), { isFetching: l } = wa(), [o] = as(), d = ce(() => {
710
+ const { isLocked: e, currentEditor: t } = Cn(), { data: n } = Zt(t), [s] = qe(), i = s.get("page"), { mutate: a } = ga(), { isFetching: l } = wa(), [o] = is(), d = ce(() => {
711
711
  a({ id: i });
712
712
  }, [i, a]);
713
713
  return !e || l ? /* @__PURE__ */ r("div", { className: "" }) : /* @__PURE__ */ r(
@@ -827,7 +827,7 @@ const xo = () => {
827
827
  onClick: (v) => v.preventDefault(),
828
828
  disabled: l,
829
829
  children: [
830
- /* @__PURE__ */ r(Jn, { className: "h-4 w-4 mr-2" }),
830
+ /* @__PURE__ */ r(es, { className: "h-4 w-4 mr-2" }),
831
831
  "Delete"
832
832
  ]
833
833
  }
@@ -908,7 +908,7 @@ const xo = () => {
908
908
  className: i,
909
909
  onClick: () => o(!0),
910
910
  children: [
911
- /* @__PURE__ */ r(Jn, { className: "h-4 w-4 mr-2" }),
911
+ /* @__PURE__ */ r(es, { className: "h-4 w-4 mr-2" }),
912
912
  "Delete"
913
913
  ]
914
914
  }
@@ -1185,14 +1185,14 @@ const xo = () => {
1185
1185
  (A) => A._type === "PartialBlock" || A._type === "GlobalBlock"
1186
1186
  ), [t]), u = X(() => {
1187
1187
  let A = [];
1188
- for (const L of t)
1189
- if (L._type === "PartialBlock" || L._type === "GlobalBlock") {
1190
- let R = i(L.partialBlockId);
1191
- L._parent && (R == null ? void 0 : R.length) > 0 && (R = R.map((C) => (H(C._parent) && Ci(C, "_parent", L._parent), C))), A = [...A, ...R];
1188
+ for (const D of t)
1189
+ if (D._type === "PartialBlock" || D._type === "GlobalBlock") {
1190
+ let R = i(D.partialBlockId);
1191
+ D._parent && (R == null ? void 0 : R.length) > 0 && (R = R.map((C) => (H(C._parent) && Ci(C, "_parent", D._parent), C))), A = [...A, ...R];
1192
1192
  } else
1193
- A.push(L);
1193
+ A.push(D);
1194
1194
  return A;
1195
- }, [t, i]), [h, m] = S(""), [v, p] = S(""), [g, E] = S(""), [b, G] = S(""), [N, D] = S({}), [w, k] = S(!1), [B, q] = S(o), [ne, U] = S(!1), { hasPermission: I } = Xt(), M = I(Ne.DELETE_LIBRARY_BLOCK), j = Br(), V = () => {
1195
+ }, [t, i]), [h, m] = S(""), [v, p] = S(""), [g, E] = S(""), [b, L] = S(""), [N, G] = S({}), [w, k] = S(!1), [B, q] = S(o), [ne, U] = S(!1), { hasPermission: I } = Xt(), M = I(Ne.DELETE_LIBRARY_BLOCK), j = Br(), V = () => {
1196
1196
  j([s], { _libBlockId: void 0 }), z.success("Block delinked from library"), n();
1197
1197
  }, {
1198
1198
  data: Y,
@@ -1202,25 +1202,25 @@ const xo = () => {
1202
1202
  me(() => {
1203
1203
  Z && o && (U(!0), q(!1));
1204
1204
  }, [Z, o]), me(() => {
1205
- Y && !de && (m(Y.name || ""), p(Y.group || ""), E(Y.description || ""), G(Y.preview || ""), q(!1));
1205
+ Y && !de && (m(Y.name || ""), p(Y.group || ""), E(Y.description || ""), L(Y.preview || ""), q(!1));
1206
1206
  }, [Y, de]), me(() => {
1207
- const A = h.trim().length >= 2, L = v.trim() !== "";
1208
- k(A && L);
1207
+ const A = h.trim().length >= 2, D = v.trim() !== "";
1208
+ k(A && D);
1209
1209
  }, [h, v]);
1210
1210
  const O = () => {
1211
1211
  const A = {};
1212
- return h.trim() ? h.length < 2 && (A.name = "Name must be at least 2 characters") : A.name = "Name is required", v || (A.group = "Group is required"), D(A), Object.keys(A).length === 0;
1212
+ return h.trim() ? h.length < 2 && (A.name = "Name must be at least 2 characters") : A.name = "Name is required", v || (A.group = "Group is required"), G(A), Object.keys(A).length === 0;
1213
1213
  }, { resetLibrary: Pe } = Yi({ id: "" }), J = To(
1214
1214
  (A) => {
1215
1215
  o || j([s], { _libBlockId: A.id }), z.success(`Block ${o ? "updated" : "saved"} successfully`), Pe(A.library), n();
1216
1216
  }
1217
1217
  ), y = async (A) => {
1218
1218
  if (A.preventDefault(), !O()) return;
1219
- const L = u.map((R) => (Ge(R, "_libBlockId") && delete R._libBlockId, R));
1219
+ const D = u.map((R) => (Ge(R, "_libBlockId") && delete R._libBlockId, R));
1220
1220
  J.mutate({
1221
1221
  name: h.trim(),
1222
1222
  group: v,
1223
- blocks: L,
1223
+ blocks: D,
1224
1224
  description: g.trim(),
1225
1225
  // Only include previewImage if it exists and is a base64 image
1226
1226
  ...b && b.startsWith("data:") ? { previewImage: b } : {},
@@ -1237,7 +1237,7 @@ const xo = () => {
1237
1237
  ] })
1238
1238
  ] }) : /* @__PURE__ */ c("div", { children: [
1239
1239
  d && /* @__PURE__ */ c("div", { className: "mb-4 p-3 border border-destructive/50 bg-destructive/10 text-destructive rounded-md flex items-start gap-2", children: [
1240
- /* @__PURE__ */ r(es, { className: "h-5 w-5 flex-shrink-0 mt-0.5" }),
1240
+ /* @__PURE__ */ r(ts, { className: "h-5 w-5 flex-shrink-0 mt-0.5" }),
1241
1241
  /* @__PURE__ */ c("div", { children: [
1242
1242
  /* @__PURE__ */ r("p", { className: "font-medium", children: "Partial Blocks Detected" }),
1243
1243
  /* @__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" })
@@ -1292,7 +1292,7 @@ const xo = () => {
1292
1292
  ] }),
1293
1293
  /* @__PURE__ */ c("div", { className: "space-y-2", children: [
1294
1294
  /* @__PURE__ */ r(re, { htmlFor: "previewImage", children: "Preview Image (optional)" }),
1295
- /* @__PURE__ */ r(Go, { value: b, onChange: G })
1295
+ /* @__PURE__ */ r(Go, { value: b, onChange: L })
1296
1296
  ] }),
1297
1297
  /* @__PURE__ */ c("div", { className: "flex justify-end gap-2 pt-2", children: [
1298
1298
  o && M && /* @__PURE__ */ r(
@@ -1633,22 +1633,22 @@ var Ys = {};
1633
1633
  return A;
1634
1634
  if (f.has(A))
1635
1635
  return f.get(A);
1636
- var L = new OffscreenCanvas(A.width, A.height), R = L.getContext("2d");
1637
- return R.drawImage(A, 0, 0), f.set(A, L), L;
1636
+ var D = new OffscreenCanvas(A.width, A.height), R = D.getContext("2d");
1637
+ return R.drawImage(A, 0, 0), f.set(A, D), D;
1638
1638
  },
1639
1639
  clear: function() {
1640
1640
  f.clear();
1641
1641
  }
1642
1642
  };
1643
1643
  }(o, /* @__PURE__ */ new Map()), m = function() {
1644
- var y = Math.floor(16.666666666666668), f, A, L = {}, R = 0;
1644
+ var y = Math.floor(16.666666666666668), f, A, D = {}, R = 0;
1645
1645
  return typeof requestAnimationFrame == "function" && typeof cancelAnimationFrame == "function" ? (f = function(C) {
1646
1646
  var te = Math.random();
1647
- return L[te] = requestAnimationFrame(function F(se) {
1648
- R === se || R + y - 1 < se ? (R = se, delete L[te], C()) : L[te] = requestAnimationFrame(F);
1647
+ return D[te] = requestAnimationFrame(function F(se) {
1648
+ R === se || R + y - 1 < se ? (R = se, delete D[te], C()) : D[te] = requestAnimationFrame(F);
1649
1649
  }), te;
1650
1650
  }, A = function(C) {
1651
- L[C] && cancelAnimationFrame(L[C]);
1651
+ D[C] && cancelAnimationFrame(D[C]);
1652
1652
  }) : (f = function(C) {
1653
1653
  return setTimeout(C, y);
1654
1654
  }, A = function(C) {
@@ -1656,7 +1656,7 @@ var Ys = {};
1656
1656
  }), { frame: f, cancel: A };
1657
1657
  }(), v = /* @__PURE__ */ function() {
1658
1658
  var y, f, A = {};
1659
- function L(R) {
1659
+ function D(R) {
1660
1660
  function C(te, F) {
1661
1661
  R.postMessage({ options: te || {}, callback: F });
1662
1662
  }
@@ -1711,7 +1711,7 @@ var Ys = {};
1711
1711
  } catch (C) {
1712
1712
  return typeof console !== void 0 && typeof console.warn == "function" && console.warn("🎊 Could not load worker", C), null;
1713
1713
  }
1714
- L(y);
1714
+ D(y);
1715
1715
  }
1716
1716
  return y;
1717
1717
  };
@@ -1753,13 +1753,13 @@ var Ys = {};
1753
1753
  A
1754
1754
  );
1755
1755
  }
1756
- function G(y) {
1756
+ function L(y) {
1757
1757
  return y < 0 ? 0 : Math.floor(y);
1758
1758
  }
1759
1759
  function N(y, f) {
1760
1760
  return Math.floor(Math.random() * (f - y)) + y;
1761
1761
  }
1762
- function D(y) {
1762
+ function G(y) {
1763
1763
  return parseInt(y, 16);
1764
1764
  }
1765
1765
  function w(y) {
@@ -1768,9 +1768,9 @@ var Ys = {};
1768
1768
  function k(y) {
1769
1769
  var f = String(y).replace(/[^0-9a-f]/gi, "");
1770
1770
  return f.length < 6 && (f = f[0] + f[0] + f[1] + f[1] + f[2] + f[2]), {
1771
- r: D(f.substring(0, 2)),
1772
- g: D(f.substring(2, 4)),
1773
- b: D(f.substring(4, 6))
1771
+ r: G(f.substring(0, 2)),
1772
+ g: G(f.substring(2, 4)),
1773
+ b: G(f.substring(4, 6))
1774
1774
  };
1775
1775
  }
1776
1776
  function B(y) {
@@ -1788,8 +1788,8 @@ var Ys = {};
1788
1788
  var f = document.createElement("canvas");
1789
1789
  return f.style.position = "fixed", f.style.top = "0px", f.style.left = "0px", f.style.pointerEvents = "none", f.style.zIndex = y, f;
1790
1790
  }
1791
- function I(y, f, A, L, R, C, te, F, se) {
1792
- y.save(), y.translate(f, A), y.rotate(C), y.scale(L, R), y.arc(0, 0, 1, te, F, se), y.restore();
1791
+ function I(y, f, A, D, R, C, te, F, se) {
1792
+ y.save(), y.translate(f, A), y.rotate(C), y.scale(D, R), y.arc(0, 0, 1, te, F, se), y.restore();
1793
1793
  }
1794
1794
  function M(y) {
1795
1795
  var f = y.angle * (Math.PI / 180), A = y.spread * (Math.PI / 180);
@@ -1820,19 +1820,19 @@ var Ys = {};
1820
1820
  }
1821
1821
  function j(y, f) {
1822
1822
  f.x += Math.cos(f.angle2D) * f.velocity + f.drift, f.y += Math.sin(f.angle2D) * f.velocity + f.gravity, f.velocity *= f.decay, f.flat ? (f.wobble = 0, f.wobbleX = f.x + 10 * f.scalar, f.wobbleY = f.y + 10 * f.scalar, f.tiltSin = 0, f.tiltCos = 0, f.random = 1) : (f.wobble += f.wobbleSpeed, f.wobbleX = f.x + 10 * f.scalar * Math.cos(f.wobble), f.wobbleY = f.y + 10 * f.scalar * Math.sin(f.wobble), f.tiltAngle += 0.1, f.tiltSin = Math.sin(f.tiltAngle), f.tiltCos = Math.cos(f.tiltAngle), f.random = Math.random() + 2);
1823
- var A = f.tick++ / f.totalTicks, L = f.x + f.random * f.tiltCos, R = f.y + f.random * f.tiltSin, C = f.wobbleX + f.random * f.tiltCos, te = f.wobbleY + f.random * f.tiltSin;
1823
+ var A = f.tick++ / f.totalTicks, D = f.x + f.random * f.tiltCos, R = f.y + f.random * f.tiltSin, C = f.wobbleX + f.random * f.tiltCos, te = f.wobbleY + f.random * f.tiltSin;
1824
1824
  if (y.fillStyle = "rgba(" + f.color.r + ", " + f.color.g + ", " + f.color.b + ", " + (1 - A) + ")", y.beginPath(), l && f.shape.type === "path" && typeof f.shape.path == "string" && Array.isArray(f.shape.matrix))
1825
1825
  y.fill(O(
1826
1826
  f.shape.path,
1827
1827
  f.shape.matrix,
1828
1828
  f.x,
1829
1829
  f.y,
1830
- Math.abs(C - L) * 0.1,
1830
+ Math.abs(C - D) * 0.1,
1831
1831
  Math.abs(te - R) * 0.1,
1832
1832
  Math.PI / 10 * f.wobble
1833
1833
  ));
1834
1834
  else if (f.shape.type === "bitmap") {
1835
- var F = Math.PI / 10 * f.wobble, se = Math.abs(C - L) * 0.1, fe = Math.abs(te - R) * 0.1, Se = f.shape.bitmap.width * f.scalar, ge = f.shape.bitmap.height * f.scalar, xe = new DOMMatrix([
1835
+ var F = Math.PI / 10 * f.wobble, se = Math.abs(C - D) * 0.1, fe = Math.abs(te - R) * 0.1, Se = f.shape.bitmap.width * f.scalar, ge = f.shape.bitmap.height * f.scalar, xe = new DOMMatrix([
1836
1836
  Math.cos(F) * se,
1837
1837
  Math.sin(F) * se,
1838
1838
  -Math.sin(F) * fe,
@@ -1849,21 +1849,21 @@ var Ys = {};
1849
1849
  ge
1850
1850
  ), y.globalAlpha = 1;
1851
1851
  } else if (f.shape === "circle")
1852
- y.ellipse ? y.ellipse(f.x, f.y, Math.abs(C - L) * f.ovalScalar, Math.abs(te - R) * f.ovalScalar, Math.PI / 10 * f.wobble, 0, 2 * Math.PI) : I(y, f.x, f.y, Math.abs(C - L) * f.ovalScalar, Math.abs(te - R) * f.ovalScalar, Math.PI / 10 * f.wobble, 0, 2 * Math.PI);
1852
+ y.ellipse ? y.ellipse(f.x, f.y, Math.abs(C - D) * f.ovalScalar, Math.abs(te - R) * f.ovalScalar, Math.PI / 10 * f.wobble, 0, 2 * Math.PI) : I(y, f.x, f.y, Math.abs(C - D) * f.ovalScalar, Math.abs(te - R) * f.ovalScalar, Math.PI / 10 * f.wobble, 0, 2 * Math.PI);
1853
1853
  else if (f.shape === "star")
1854
1854
  for (var le = Math.PI / 2 * 3, Ue = 4 * f.scalar, Me = 8 * f.scalar, P = f.x, oe = f.y, x = 5, ue = Math.PI / x; x--; )
1855
1855
  P = f.x + Math.cos(le) * Me, oe = f.y + Math.sin(le) * Me, y.lineTo(P, oe), le += ue, P = f.x + Math.cos(le) * Ue, oe = f.y + Math.sin(le) * Ue, y.lineTo(P, oe), le += ue;
1856
1856
  else
1857
- y.moveTo(Math.floor(f.x), Math.floor(f.y)), y.lineTo(Math.floor(f.wobbleX), Math.floor(R)), y.lineTo(Math.floor(C), Math.floor(te)), y.lineTo(Math.floor(L), Math.floor(f.wobbleY));
1857
+ y.moveTo(Math.floor(f.x), Math.floor(f.y)), y.lineTo(Math.floor(f.wobbleX), Math.floor(R)), y.lineTo(Math.floor(C), Math.floor(te)), y.lineTo(Math.floor(D), Math.floor(f.wobbleY));
1858
1858
  return y.closePath(), y.fill(), f.tick < f.totalTicks;
1859
1859
  }
1860
- function V(y, f, A, L, R) {
1860
+ function V(y, f, A, D, R) {
1861
1861
  var C = f.slice(), te = y.getContext("2d"), F, se, fe = u(function(Se) {
1862
1862
  function ge() {
1863
- F = se = null, te.clearRect(0, 0, L.width, L.height), h.clear(), R(), Se();
1863
+ F = se = null, te.clearRect(0, 0, D.width, D.height), h.clear(), R(), Se();
1864
1864
  }
1865
1865
  function xe() {
1866
- s && !(L.width === i.width && L.height === i.height) && (L.width = y.width = i.width, L.height = y.height = i.height), !L.width && !L.height && (A(y), L.width = y.width, L.height = y.height), te.clearRect(0, 0, L.width, L.height), C = C.filter(function(Ie) {
1866
+ s && !(D.width === i.width && D.height === i.height) && (D.width = y.width = i.width, D.height = y.height = i.height), !D.width && !D.height && (A(y), D.width = y.width, D.height = y.height), te.clearRect(0, 0, D.width, D.height), C = C.filter(function(Ie) {
1867
1867
  return j(te, Ie);
1868
1868
  }), C.length ? F = m.frame(xe) : ge();
1869
1869
  }
@@ -1881,10 +1881,10 @@ var Ys = {};
1881
1881
  };
1882
1882
  }
1883
1883
  function Y(y, f) {
1884
- var A = !y, L = !!b(f || {}, "resize"), R = !1, C = b(f, "disableForReducedMotion", Boolean), te = a && !!b(f || {}, "useWorker"), F = te ? v() : null, se = A ? q : ne, fe = y && F ? !!y.__confetti_initialized : !1, Se = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, ge;
1884
+ var A = !y, D = !!b(f || {}, "resize"), R = !1, C = b(f, "disableForReducedMotion", Boolean), te = a && !!b(f || {}, "useWorker"), F = te ? v() : null, se = A ? q : ne, fe = y && F ? !!y.__confetti_initialized : !1, Se = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, ge;
1885
1885
  function xe(le, Ue, Me) {
1886
- for (var P = b(le, "particleCount", G), oe = b(le, "angle", Number), x = b(le, "spread", Number), ue = b(le, "startVelocity", Number), Fe = b(le, "decay", Number), Oe = b(le, "gravity", Number), vt = b(le, "drift", Number), mt = b(le, "colors", w), _t = b(le, "ticks", Number), tr = b(le, "shapes"), Ei = b(le, "scalar"), wi = !!b(le, "flat"), nr = B(le), sr = P, us = [], Ni = y.width * nr.x, Si = y.height * nr.y; sr--; )
1887
- us.push(
1886
+ for (var P = b(le, "particleCount", L), oe = b(le, "angle", Number), x = b(le, "spread", Number), ue = b(le, "startVelocity", Number), Fe = b(le, "decay", Number), Oe = b(le, "gravity", Number), vt = b(le, "drift", Number), mt = b(le, "colors", w), _t = b(le, "ticks", Number), tr = b(le, "shapes"), Ei = b(le, "scalar"), wi = !!b(le, "flat"), nr = B(le), sr = P, hs = [], Ni = y.width * nr.x, Si = y.height * nr.y; sr--; )
1887
+ hs.push(
1888
1888
  M({
1889
1889
  x: Ni,
1890
1890
  y: Si,
@@ -1901,7 +1901,7 @@ var Ys = {};
1901
1901
  flat: wi
1902
1902
  })
1903
1903
  );
1904
- return ge ? ge.addFettis(us) : (ge = V(y, us, se, Ue, Me), ge.promise);
1904
+ return ge ? ge.addFettis(hs) : (ge = V(y, hs, se, Ue, Me), ge.promise);
1905
1905
  }
1906
1906
  function Ie(le) {
1907
1907
  var Ue = C || b(le, "disableForReducedMotion", Boolean), Me = b(le, "zIndex", Number);
@@ -1909,7 +1909,7 @@ var Ys = {};
1909
1909
  return u(function(ue) {
1910
1910
  ue();
1911
1911
  });
1912
- A && ge ? y = ge.canvas : A && !y && (y = U(Me), document.body.appendChild(y)), L && !fe && se(y);
1912
+ A && ge ? y = ge.canvas : A && !y && (y = U(Me), document.body.appendChild(y)), D && !fe && se(y);
1913
1913
  var P = {
1914
1914
  width: y.width,
1915
1915
  height: y.height
@@ -1934,9 +1934,9 @@ var Ys = {};
1934
1934
  P.width = P.height = null;
1935
1935
  }
1936
1936
  function x() {
1937
- ge = null, L && (R = !1, t.removeEventListener("resize", oe)), A && y && (document.body.contains(y) && document.body.removeChild(y), y = null, fe = !1);
1937
+ ge = null, D && (R = !1, t.removeEventListener("resize", oe)), A && y && (document.body.contains(y) && document.body.removeChild(y), y = null, fe = !1);
1938
1938
  }
1939
- return L && !R && (R = !0, t.addEventListener("resize", oe, !1)), F ? F.fire(le, P, x) : xe(le, P, x);
1939
+ return D && !R && (R = !0, t.addEventListener("resize", oe, !1)), F ? F.fire(le, P, x) : xe(le, P, x);
1940
1940
  }
1941
1941
  return Ie.reset = function() {
1942
1942
  F && F.reset(), ge && ge.reset();
@@ -1946,7 +1946,7 @@ var Ys = {};
1946
1946
  function Z() {
1947
1947
  return de || (de = Y(null, { useWorker: !0, resize: !0 })), de;
1948
1948
  }
1949
- function O(y, f, A, L, R, C, te) {
1949
+ function O(y, f, A, D, R, C, te) {
1950
1950
  var F = new Path2D(y), se = new Path2D();
1951
1951
  se.addPath(F, new DOMMatrix(f));
1952
1952
  var fe = new Path2D();
@@ -1956,7 +1956,7 @@ var Ys = {};
1956
1956
  -Math.sin(te) * C,
1957
1957
  Math.cos(te) * C,
1958
1958
  A,
1959
- L
1959
+ D
1960
1960
  ])), fe;
1961
1961
  }
1962
1962
  function Pe(y) {
@@ -1964,11 +1964,11 @@ var Ys = {};
1964
1964
  throw new Error("path confetti are not supported in this browser");
1965
1965
  var f, A;
1966
1966
  typeof y == "string" ? f = y : (f = y.path, A = y.matrix);
1967
- var L = new Path2D(f), R = document.createElement("canvas"), C = R.getContext("2d");
1967
+ var D = new Path2D(f), R = document.createElement("canvas"), C = R.getContext("2d");
1968
1968
  if (!A) {
1969
1969
  for (var te = 1e3, F = te, se = te, fe = 0, Se = 0, ge, xe, Ie = 0; Ie < te; Ie += 2)
1970
1970
  for (var le = 0; le < te; le += 2)
1971
- C.isPointInPath(L, Ie, le, "nonzero") && (F = Math.min(F, Ie), se = Math.min(se, le), fe = Math.max(fe, Ie), Se = Math.max(Se, le));
1971
+ C.isPointInPath(D, Ie, le, "nonzero") && (F = Math.min(F, Ie), se = Math.min(se, le), fe = Math.max(fe, Ie), Se = Math.max(Se, le));
1972
1972
  ge = fe - F, xe = Se - se;
1973
1973
  var Ue = 10, Me = Math.min(Ue / ge, Ue / xe);
1974
1974
  A = [
@@ -1987,12 +1987,12 @@ var Ys = {};
1987
1987
  };
1988
1988
  }
1989
1989
  function J(y) {
1990
- var f, A = 1, L = "#000000", R = '"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';
1991
- typeof y == "string" ? f = y : (f = y.text, A = "scalar" in y ? y.scalar : A, R = "fontFamily" in y ? y.fontFamily : R, L = "color" in y ? y.color : L);
1990
+ var f, A = 1, D = "#000000", R = '"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';
1991
+ typeof y == "string" ? f = y : (f = y.text, A = "scalar" in y ? y.scalar : A, R = "fontFamily" in y ? y.fontFamily : R, D = "color" in y ? y.color : D);
1992
1992
  var C = 10 * A, te = "" + C + "px " + R, F = new OffscreenCanvas(C, C), se = F.getContext("2d");
1993
1993
  se.font = te;
1994
1994
  var fe = se.measureText(f), Se = Math.ceil(fe.actualBoundingBoxRight + fe.actualBoundingBoxLeft), ge = Math.ceil(fe.actualBoundingBoxAscent + fe.actualBoundingBoxDescent), xe = 2, Ie = fe.actualBoundingBoxLeft + xe, le = fe.actualBoundingBoxAscent + xe;
1995
- Se += xe + xe, ge += xe + xe, F = new OffscreenCanvas(Se, ge), se = F.getContext("2d"), se.font = te, se.fillStyle = L, se.fillText(f, Ie, le);
1995
+ Se += xe + xe, ge += xe + xe, F = new OffscreenCanvas(Se, ge), se = F.getContext("2d"), se.font = te, se.fillStyle = D, se.fillText(f, Ie, le);
1996
1996
  var Ue = 1 / A;
1997
1997
  return {
1998
1998
  type: "bitmap",
@@ -2080,8 +2080,8 @@ const Vo = {
2080
2080
  return /* @__PURE__ */ r(Ke, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ c(He, { children: [
2081
2081
  /* @__PURE__ */ c(We, { children: [
2082
2082
  /* @__PURE__ */ r(Ye, { children: "Change Slug" }),
2083
- /* @__PURE__ */ r(et, { className: "text-xs", children: /* @__PURE__ */ c(Xn, { variant: "destructive", className: "mt-2", children: [
2084
- /* @__PURE__ */ r(es, { className: "h-4 w-4" }),
2083
+ /* @__PURE__ */ r(et, { className: "text-xs", children: /* @__PURE__ */ c(Zn, { variant: "destructive", className: "mt-2", children: [
2084
+ /* @__PURE__ */ r(ts, { className: "h-4 w-4" }),
2085
2085
  "Changing the slug may have impact on your SEO. Please proceed with caution."
2086
2086
  ] }) })
2087
2087
  ] }),
@@ -2134,7 +2134,7 @@ const Vo = {
2134
2134
  T,
2135
2135
  {
2136
2136
  type: "submit",
2137
- disabled: a || !Bn(n, `/${u}`) || Ls(e == null ? void 0 : e.slug, n),
2137
+ disabled: a || !Bn(n, `/${u}`) || Ds(e == null ? void 0 : e.slug, n),
2138
2138
  children: a ? "Changing..." : "Change Slug"
2139
2139
  }
2140
2140
  ) })
@@ -2145,7 +2145,7 @@ function Qs({
2145
2145
  page: e,
2146
2146
  onClose: t
2147
2147
  }) {
2148
- const [, n] = qe(), { mutate: s, isPending: i } = Mo(), { data: a } = Be(), { setSelectedLang: l, fallbackLang: o } = Je(), [, d] = Qn(), u = () => {
2148
+ const [, n] = qe(), { mutate: s, isPending: i } = Mo(), { data: a } = Be(), { setSelectedLang: l, fallbackLang: o } = Je(), [, d] = Xn(), u = () => {
2149
2149
  i || s(e, {
2150
2150
  onSuccess: () => {
2151
2151
  e != null && e.primaryPage ? (window.history.replaceState({}, "", `/?page=${e.primaryPage}`), n(new URLSearchParams({ page: e.primaryPage }))) : (window.history.replaceState({}, "", "/"), n(new URLSearchParams())), window.dispatchEvent(new PopStateEvent("popstate")), l(o), d("outline"), t();
@@ -2193,7 +2193,7 @@ const Ze = ({
2193
2193
  }) => {
2194
2194
  const { hasPermission: i } = Xt();
2195
2195
  return e && !i(e) || t && !t.some((a) => i(a)) ? s : n;
2196
- }, ls = ({
2196
+ }, os = ({
2197
2197
  page: e,
2198
2198
  onClose: t
2199
2199
  }) => {
@@ -2285,7 +2285,7 @@ const xa = ({
2285
2285
  onClose: t,
2286
2286
  languages: n
2287
2287
  }) => {
2288
- const { data: s } = Qe(), { data: i } = Be(), [a, l] = S(e.name || ""), [o, d] = S(e.edit ? e.lang : ""), [u, h] = S(e.edit ? e.slug : ""), [m, v] = S(!0), [p, g] = S(!0), { mutate: E, isPending: b } = Sa(), { mutate: G, isPending: N } = Hs(), { data: D } = yt(s == null ? void 0 : s.parent), { setSelectedLang: w, fallbackLang: k } = Je(), [, B] = qe(), [, q] = Qn(), ne = X(
2288
+ const { data: s } = Qe(), { data: i } = Be(), [a, l] = S(e.name || ""), [o, d] = S(e.edit ? e.lang : ""), [u, h] = S(e.edit ? e.slug : ""), [m, v] = S(!0), [p, g] = S(!0), { mutate: E, isPending: b } = Sa(), { mutate: L, isPending: N } = Hs(), { data: G } = yt(s == null ? void 0 : s.parent), { setSelectedLang: w, fallbackLang: k } = Je(), [, B] = qe(), [, q] = Xn(), ne = X(
2289
2289
  () => i == null ? void 0 : i.find(
2290
2290
  (J) => J.key === e.pageType
2291
2291
  ),
@@ -2298,13 +2298,13 @@ const xa = ({
2298
2298
  parentSlug: p ? `/${o}` : void 0,
2299
2299
  isRootPage: !(s != null && s.parent)
2300
2300
  };
2301
- const J = D == null ? void 0 : D.find(
2301
+ const J = G == null ? void 0 : G.find(
2302
2302
  (y) => y.lang === o
2303
2303
  );
2304
2304
  return { parentSlug: J == null ? void 0 : J.slug, isRootPage: !1 };
2305
2305
  }, [
2306
2306
  s == null ? void 0 : s.parent,
2307
- D,
2307
+ G,
2308
2308
  p,
2309
2309
  o,
2310
2310
  I
@@ -2313,34 +2313,34 @@ const xa = ({
2313
2313
  if (!e.edit) return;
2314
2314
  const y = (e.slug || "").split("/").filter(Boolean);
2315
2315
  let f = "";
2316
- const A = (L) => g(L);
2316
+ const A = (D) => g(D);
2317
2317
  if (I) {
2318
- const L = y.pop() || "";
2319
- if (je[L])
2318
+ const D = y.pop() || "";
2319
+ if (je[D])
2320
2320
  A(!0);
2321
2321
  else {
2322
- f = L;
2322
+ f = D;
2323
2323
  const R = y.pop() || "";
2324
2324
  A(!!je[R]);
2325
2325
  }
2326
2326
  } else if (V) {
2327
2327
  if (y.length) {
2328
2328
  f = y.pop() || "";
2329
- const L = y.pop() || "";
2330
- A(!!je[L]);
2329
+ const D = y.pop() || "";
2330
+ A(!!je[D]);
2331
2331
  }
2332
2332
  } else
2333
2333
  y.length && (f = y.pop() || "");
2334
2334
  h(f);
2335
2335
  }, [e, I, V]);
2336
- const Y = X(() => V ? !0 : !!(D != null && D.find((J) => (J == null ? void 0 : J.lang) === o)), [o, D, V]), de = () => {
2336
+ const Y = X(() => V ? !0 : !!(G != null && G.find((J) => (J == null ? void 0 : J.lang) === o)), [o, G, V]), de = () => {
2337
2337
  let J = "";
2338
2338
  return V ? J = `/${p ? [o, u].filter(Boolean).join("/") : u}` : J = `${gt(j)}/${u}`, J.replace(/\/{2,}/g, "/");
2339
2339
  }, Z = (J, y) => {
2340
2340
  const f = new URLSearchParams(window.location.search);
2341
2341
  y && J === y ? f.delete("lang") : f.set("lang", J);
2342
- const A = f.toString(), L = `${window.location.pathname}${A ? `?${A}` : ""}`;
2343
- window.history.pushState({}, "", L), B(f), window.dispatchEvent(new PopStateEvent("popstate"));
2342
+ const A = f.toString(), D = `${window.location.pathname}${A ? `?${A}` : ""}`;
2343
+ window.history.pushState({}, "", D), B(f), window.dispatchEvent(new PopStateEvent("popstate"));
2344
2344
  }, O = (J) => {
2345
2345
  J.preventDefault();
2346
2346
  const y = {
@@ -2351,7 +2351,7 @@ const xa = ({
2351
2351
  pageType: s == null ? void 0 : s.pageType,
2352
2352
  tracking: {}
2353
2353
  };
2354
- y.pageType = e.pageType, e.edit && (y.id = e == null ? void 0 : e.id), e.edit ? G(y, { onSuccess: t }) : E(y, {
2354
+ y.pageType = e.pageType, e.edit && (y.id = e == null ? void 0 : e.id), e.edit ? L(y, { onSuccess: t }) : E(y, {
2355
2355
  onSuccess: () => {
2356
2356
  o && (w(o), Z(o, k)), q("outline"), t();
2357
2357
  }
@@ -2444,7 +2444,7 @@ const xa = ({
2444
2444
  )
2445
2445
  ] }) })
2446
2446
  ] }),
2447
- /* @__PURE__ */ r(st, { children: Y ? /* @__PURE__ */ r(T, { type: "submit", disabled: Pe, children: M ? e.edit ? ee.UPDATING : ee.ADDING : e.edit ? ee.UPDATE : ee.ADD_NEW_LANGUAGE }) : o && /* @__PURE__ */ r(Xn, { variant: "destructive", children: /* @__PURE__ */ c("p", { className: "text-center w-5/6 mx-auto", children: [
2447
+ /* @__PURE__ */ r(st, { children: Y ? /* @__PURE__ */ r(T, { type: "submit", disabled: Pe, children: M ? e.edit ? ee.UPDATING : ee.ADDING : e.edit ? ee.UPDATE : ee.ADD_NEW_LANGUAGE }) : o && /* @__PURE__ */ r(Zn, { variant: "destructive", children: /* @__PURE__ */ c("p", { className: "text-center w-5/6 mx-auto", children: [
2448
2448
  "You need to create the",
2449
2449
  " ",
2450
2450
  /* @__PURE__ */ r("span", { className: "font-medium", children: je[o] }),
@@ -2463,13 +2463,13 @@ const xa = ({
2463
2463
  /* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
2464
2464
  /* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" })
2465
2465
  ] }) : Xe(a, (b) => {
2466
- const G = b.lang, N = b.slug, D = !b.primaryPage;
2466
+ const L = b.lang, N = b.slug, G = !b.primaryPage;
2467
2467
  return /* @__PURE__ */ c(ye, { children: [
2468
2468
  /* @__PURE__ */ c(
2469
2469
  "li",
2470
2470
  {
2471
- className: `text-slate-500 w-full p-2 rounded cursor-pointer flex items-center justify-between ${G === n ? "bg-gray-200" : "hover:bg-gray-100"}`,
2472
- onClick: () => i(G),
2471
+ className: `text-slate-500 w-full p-2 rounded cursor-pointer flex items-center justify-between ${L === n ? "bg-gray-200" : "hover:bg-gray-100"}`,
2472
+ onClick: () => i(L),
2473
2473
  children: [
2474
2474
  /* @__PURE__ */ c("div", { className: " flex-1 gap-x-3", children: [
2475
2475
  /* @__PURE__ */ c(
@@ -2483,7 +2483,7 @@ const xa = ({
2483
2483
  className: `w-2.5 h-2.5 rounded-full ${b.online ? "bg-green-300" : "bg-gray-300"}`
2484
2484
  }
2485
2485
  ),
2486
- ae(je, D ? s : G, G)
2486
+ ae(je, G ? s : L, L)
2487
2487
  ]
2488
2488
  }
2489
2489
  ),
@@ -2502,7 +2502,7 @@ const xa = ({
2502
2502
  ] })
2503
2503
  ] })
2504
2504
  ] }),
2505
- D ? /* @__PURE__ */ c("div", { className: "flex items-center text-[11px] text-orange-500 gap-x-1", children: [
2505
+ G ? /* @__PURE__ */ c("div", { className: "flex items-center text-[11px] text-orange-500 gap-x-1", children: [
2506
2506
  /* @__PURE__ */ r(_l, { fill: "orange", className: "w-3 h-3" }),
2507
2507
  /* @__PURE__ */ r("b", { children: " Primary" })
2508
2508
  ] }) : /* @__PURE__ */ r("div", { className: "flex items-center gap-x-3", children: /* @__PURE__ */ r(
@@ -2525,7 +2525,7 @@ const xa = ({
2525
2525
  variant: "ghost",
2526
2526
  size: "sm",
2527
2527
  className: "h-8 w-8 p-0",
2528
- children: /* @__PURE__ */ r(ts, { className: "h-4 w-4" })
2528
+ children: /* @__PURE__ */ r(ns, { className: "h-4 w-4" })
2529
2529
  }
2530
2530
  )
2531
2531
  }
@@ -2634,7 +2634,7 @@ const xa = ({
2634
2634
  ),
2635
2635
  d && /* @__PURE__ */ r(Qs, { page: d, onClose: () => u(null) }),
2636
2636
  h && /* @__PURE__ */ r(
2637
- ls,
2637
+ os,
2638
2638
  {
2639
2639
  page: h,
2640
2640
  onClose: () => m(null)
@@ -2667,10 +2667,10 @@ function Zo({
2667
2667
  u(k), t(w);
2668
2668
  return;
2669
2669
  }
2670
- const b = g.substring(s.length).replace(/\//g, "").replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-_.]/g, "-").replace(/-+/g, "-").replace(/^-+/, "").toLowerCase(), G = (b.match(/\./g) || []).length, N = G <= 1;
2671
- G > 1 ? l("Invalid slug. Only one dot (.) is allowed in the slug") : l(null), i && i(N);
2672
- const D = s + b;
2673
- u(D), t(b);
2670
+ const b = g.substring(s.length).replace(/\//g, "").replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-_.]/g, "-").replace(/-+/g, "-").replace(/^-+/, "").toLowerCase(), L = (b.match(/\./g) || []).length, N = L <= 1;
2671
+ L > 1 ? l("Invalid slug. Only one dot (.) is allowed in the slug") : l(null), i && i(N);
2672
+ const G = s + b;
2673
+ u(G), t(b);
2674
2674
  }, m = () => {
2675
2675
  if (o.current) {
2676
2676
  const p = o.current;
@@ -2848,9 +2848,9 @@ function rc({
2848
2848
  closePanel: s
2849
2849
  }) {
2850
2850
  var P, oe;
2851
- const i = Zs(), a = !!(e != null && e.id), { data: l } = rs(), { mutate: o, isPending: d } = Sa(), { mutate: u, isPending: h } = Hs(), [m, v] = S(null), [p, g] = S(!0), [E, b] = S(
2851
+ const i = Zs(), a = !!(e != null && e.id), { data: l } = as(), { mutate: o, isPending: d } = Sa(), { mutate: u, isPending: h } = Hs(), [m, v] = S(null), [p, g] = S(!0), [E, b] = S(
2852
2852
  (e == null ? void 0 : e.pageType) ?? "page"
2853
- ), { hasPermission: G } = Xt(), N = G(Ne.CHANGE_PAGE_TYPE), [D, w] = S(!1), [k, B] = S(""), q = X(() => {
2853
+ ), { hasPermission: L } = Xt(), N = L(Ne.CHANGE_PAGE_TYPE), [G, w] = S(!1), [k, B] = S(""), q = X(() => {
2854
2854
  const x = t.find(
2855
2855
  (ue) => ue.key === E
2856
2856
  );
@@ -2863,7 +2863,7 @@ function rc({
2863
2863
  j ? "" : ((e == null ? void 0 : e.slug) ?? "").split("/").pop() || ""
2864
2864
  ), [Z, O] = S(
2865
2865
  (e == null ? void 0 : e.dynamicSlugCustom) ?? ""
2866
- ), [Pe, J] = S(!0), [y, f] = S(""), { data: A, isLoading: L } = sc(E), R = d || h, C = t.find(
2866
+ ), [Pe, J] = S(!0), [y, f] = S(""), { data: A, isLoading: D } = sc(E), R = d || h, C = t.find(
2867
2867
  (x) => x.key === E
2868
2868
  ), te = (x) => {
2869
2869
  if (a && E !== x) {
@@ -3007,7 +3007,7 @@ function rc({
3007
3007
  children: /* @__PURE__ */ r("optgroup", { label: "Partials", children: t.filter((x) => x.hasSlug === !1).map((x) => /* @__PURE__ */ r("option", { value: x.key, children: x.name }, x.key)) })
3008
3008
  }
3009
3009
  ),
3010
- D && /* @__PURE__ */ c("div", { className: "mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-md", children: [
3010
+ G && /* @__PURE__ */ c("div", { className: "mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-md", children: [
3011
3011
  /* @__PURE__ */ r("p", { className: "text-sm text-yellow-800", children: "Changing the page type may impact the page data. Are you sure you want to proceed?" }),
3012
3012
  /* @__PURE__ */ c("div", { className: "mt-2 flex gap-2", children: [
3013
3013
  /* @__PURE__ */ r(
@@ -3065,7 +3065,7 @@ function rc({
3065
3065
  ] })
3066
3066
  }
3067
3067
  ),
3068
- D && /* @__PURE__ */ c("div", { className: "mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-md", children: [
3068
+ G && /* @__PURE__ */ c("div", { className: "mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-md", children: [
3069
3069
  /* @__PURE__ */ r("p", { className: "text-sm text-yellow-800", children: "Changing the page type may impact the page data. Are you sure you want to proceed?" }),
3070
3070
  /* @__PURE__ */ c("div", { className: "mt-2 flex gap-2", children: [
3071
3071
  /* @__PURE__ */ r(
@@ -3097,7 +3097,7 @@ function rc({
3097
3097
  templates: A,
3098
3098
  selectedTemplateId: y,
3099
3099
  onSelectTemplate: Se,
3100
- isLoading: L
3100
+ isLoading: D
3101
3101
  }
3102
3102
  )
3103
3103
  ] }),
@@ -3253,13 +3253,13 @@ const Aa = ({
3253
3253
  onSuccess: () => {
3254
3254
  p(!1), t();
3255
3255
  },
3256
- onError: (G) => {
3257
- p(!1), G.code === "SLUG_EXISTS" ? a(
3256
+ onError: (L) => {
3257
+ p(!1), L.code === "SLUG_EXISTS" ? a(
3258
3258
  "A page with this slug already exists. Please choose a different slug."
3259
- ) : G.code === "INVALID_SLUG" ? a(
3259
+ ) : L.code === "INVALID_SLUG" ? a(
3260
3260
  "The slug format is invalid. Please use only lowercase letters, numbers, and hyphens."
3261
- ) : G.code === "PERMISSION_DENIED" ? a("You don't have permission to duplicate this page.") : a(
3262
- G.message || "Failed to duplicate page. Please try again later."
3261
+ ) : L.code === "PERMISSION_DENIED" ? a("You don't have permission to duplicate this page.") : a(
3262
+ L.message || "Failed to duplicate page. Please try again later."
3263
3263
  );
3264
3264
  }
3265
3265
  }
@@ -3317,8 +3317,8 @@ const Aa = ({
3317
3317
  }
3318
3318
  )
3319
3319
  ] }),
3320
- i && /* @__PURE__ */ c(Xn, { variant: "destructive", className: "py-2", children: [
3321
- /* @__PURE__ */ r(es, { className: "h-4 w-4" }),
3320
+ i && /* @__PURE__ */ c(Zn, { variant: "destructive", className: "py-2", children: [
3321
+ /* @__PURE__ */ r(ts, { className: "h-4 w-4" }),
3322
3322
  /* @__PURE__ */ r("span", { className: "text-sm", children: i })
3323
3323
  ] }),
3324
3324
  /* @__PURE__ */ c("div", { className: "flex justify-end gap-2", children: [
@@ -3348,11 +3348,11 @@ const Aa = ({
3348
3348
  onClose: t
3349
3349
  }) => {
3350
3350
  const [n, s] = S(!1), [i, a] = S(""), [l, o] = S(""), [d, u] = S(!1), h = ct(null), m = jo(), { data: v } = Be(), p = v == null ? void 0 : v.find(
3351
- (D) => D.key === e.pageType
3351
+ (G) => G.key === e.pageType
3352
3352
  ), g = (p == null ? void 0 : p.name) || Wt(e.pageType), E = ce(
3353
- (D) => {
3353
+ (G) => {
3354
3354
  var k;
3355
- const w = (k = D.target.files) == null ? void 0 : k[0];
3355
+ const w = (k = G.target.files) == null ? void 0 : k[0];
3356
3356
  if (w) {
3357
3357
  if (w.size > ic) {
3358
3358
  z.error("File too large", {
@@ -3376,9 +3376,9 @@ const Aa = ({
3376
3376
  []
3377
3377
  ), b = () => {
3378
3378
  o(""), h.current && (h.current.value = "");
3379
- }, G = () => {
3380
- var D;
3381
- (D = h.current) == null || D.click();
3379
+ }, L = () => {
3380
+ var G;
3381
+ (G = h.current) == null || G.click();
3382
3382
  }, N = () => {
3383
3383
  s(!0), m.mutate(
3384
3384
  {
@@ -3429,7 +3429,7 @@ const Aa = ({
3429
3429
  placeholder: "Describe this template's purpose",
3430
3430
  className: "text-xs resize-none h-24 mt-1",
3431
3431
  value: i,
3432
- onChange: (D) => a(D.target.value)
3432
+ onChange: (G) => a(G.target.value)
3433
3433
  }
3434
3434
  )
3435
3435
  ] }),
@@ -3453,7 +3453,7 @@ const Aa = ({
3453
3453
  {
3454
3454
  type: "button",
3455
3455
  variant: "outline",
3456
- onClick: G,
3456
+ onClick: L,
3457
3457
  disabled: d,
3458
3458
  className: "w-full",
3459
3459
  children: d ? /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
@@ -3497,8 +3497,8 @@ const Aa = ({
3497
3497
  T,
3498
3498
  {
3499
3499
  variant: "outline",
3500
- onClick: (D) => {
3501
- D.stopPropagation(), t();
3500
+ onClick: (G) => {
3501
+ G.stopPropagation(), t();
3502
3502
  },
3503
3503
  children: "Cancel"
3504
3504
  }
@@ -3714,7 +3714,7 @@ const Aa = ({
3714
3714
  expandedPages: t,
3715
3715
  expandPagesOnSearch: l
3716
3716
  };
3717
- }, gr = (e, t) => !e || !Array.isArray(e) ? [] : H(t) ? e : Ds(
3717
+ }, gr = (e, t) => !e || !Array.isArray(e) ? [] : H(t) ? e : Hn(
3718
3718
  ke(e, (n) => {
3719
3719
  const s = Et(t);
3720
3720
  return ft(Et((n == null ? void 0 : n.name) || ""), s) || ft(Et((n == null ? void 0 : n.slug) || ""), s);
@@ -3726,12 +3726,12 @@ const Aa = ({
3726
3726
  for (; a.parent && s[a.parent]; )
3727
3727
  n.add(a.parent), a = s[a.parent];
3728
3728
  }), Array.from(n).map((i) => s[i]);
3729
- }, bs = (e, t, n) => H(t) ? e : e.map((s) => {
3729
+ }, Es = (e, t, n) => H(t) ? e : e.map((s) => {
3730
3730
  if (!n(s.pageType))
3731
3731
  return {
3732
3732
  ...s,
3733
3733
  shouldExpandOnSearch: !0,
3734
- children: s.children ? bs(s.children, t, n) : []
3734
+ children: s.children ? Es(s.children, t, n) : []
3735
3735
  };
3736
3736
  const i = s.children && s.children.some(
3737
3737
  (a) => ft(Et(a.name || ""), Et(t)) || ft(Et(a.slug || ""), Et(t))
@@ -3739,7 +3739,7 @@ const Aa = ({
3739
3739
  return {
3740
3740
  ...s,
3741
3741
  shouldExpandOnSearch: i,
3742
- children: s.children ? bs(s.children, t, n) : []
3742
+ children: s.children ? Es(s.children, t, n) : []
3743
3743
  };
3744
3744
  }), uc = (e) => {
3745
3745
  if (!e || !e.length) return [];
@@ -3759,13 +3759,13 @@ const Aa = ({
3759
3759
  })), hc = (e, t, n, s) => {
3760
3760
  if (!e || !e.length) return [];
3761
3761
  let i = e;
3762
- if (n !== "all" && (i = Ds(ke(e, { pageType: n }))), H(t))
3762
+ if (n !== "all" && (i = Hn(ke(e, { pageType: n }))), H(t))
3763
3763
  i = gr(i, t);
3764
3764
  else {
3765
3765
  const h = gr(i, t), m = dc(e, h);
3766
3766
  i = Li([...h, ...m], "id");
3767
3767
  }
3768
- const a = La(uc(i)), l = bs(a, t, s), o = ke(l, (h) => s(h.pageType)).sort((h, m) => (h.name || "").localeCompare(m.name || "")), d = Dr(
3768
+ const a = La(uc(i)), l = Es(a, t, s), o = ke(l, (h) => s(h.pageType)).sort((h, m) => (h.name || "").localeCompare(m.name || "")), d = Dr(
3769
3769
  ke(l, (h) => !s(h.pageType)),
3770
3770
  "pageType"
3771
3771
  ), u = Object.values(
@@ -3801,13 +3801,13 @@ const Aa = ({
3801
3801
  isExpanded: m,
3802
3802
  onToggleExpand: v
3803
3803
  }) => {
3804
- const p = Zs(), { data: g } = Be(), [, E] = Qn(), b = X(
3804
+ const p = Zs(), { data: g } = Be(), [, E] = Xn(), b = X(
3805
3805
  () => ve(g, { key: t.pageType }),
3806
3806
  [g, t.pageType]
3807
- ), G = X(() => {
3807
+ ), L = X(() => {
3808
3808
  const k = ae(t, "slug", ""), B = e ? gt(e) : "", q = B ? k.replace(B, "") : k;
3809
3809
  return q || "/";
3810
- }, [t, e]), N = X(() => !!t.isTemplate, [t.isTemplate]), D = ce(() => {
3810
+ }, [t, e]), N = X(() => !!t.isTemplate, [t.isTemplate]), G = ce(() => {
3811
3811
  E("outline"), p(ae(t, "id"), s);
3812
3812
  }, [p, s, t, E]), w = ce(
3813
3813
  (k) => {
@@ -3818,7 +3818,7 @@ const Aa = ({
3818
3818
  return /* @__PURE__ */ c(
3819
3819
  "div",
3820
3820
  {
3821
- onClick: D,
3821
+ onClick: G,
3822
3822
  className: `rounded flex p-1.5 items-center justify-between leading-none cursor-pointer px-3 py-1.5 ${n ? "bg-gray-200" : "hover:bg-gray-100"}`,
3823
3823
  children: [
3824
3824
  /* @__PURE__ */ c("div", { className: "flex items-center gap-x-2", children: [
@@ -3852,20 +3852,20 @@ const Aa = ({
3852
3852
  ),
3853
3853
  /* @__PURE__ */ r("span", { className: "font-light leading-none truncate text-slate-800", children: t.name }),
3854
3854
  b != null && b.hasSlug ? /* @__PURE__ */ c(
3855
- fs,
3855
+ gs,
3856
3856
  {
3857
3857
  variant: "outline",
3858
3858
  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"}`,
3859
3859
  children: [
3860
- G,
3860
+ L,
3861
3861
  t.dynamic && /* @__PURE__ */ c("span", { className: "text-xs font-light leading-none text-slate-500", children: [
3862
- Gr(G, "/") ? `${b == null ? void 0 : b.dynamicSlug}` : `/${b == null ? void 0 : b.dynamicSlug}`,
3862
+ Gr(L, "/") ? `${b == null ? void 0 : b.dynamicSlug}` : `/${b == null ? void 0 : b.dynamicSlug}`,
3863
3863
  t.dynamicSlugCustom
3864
3864
  ] })
3865
3865
  ]
3866
3866
  }
3867
3867
  ) : t.isPartialGroup ? null : /* @__PURE__ */ r(
3868
- fs,
3868
+ gs,
3869
3869
  {
3870
3870
  variant: "outline",
3871
3871
  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"}`,
@@ -3873,7 +3873,7 @@ const Aa = ({
3873
3873
  }
3874
3874
  ),
3875
3875
  N && /* @__PURE__ */ r(
3876
- fs,
3876
+ gs,
3877
3877
  {
3878
3878
  variant: "outline",
3879
3879
  className: "ml-2 text-xs py-0 font-normal text-blue-500 border border-blue-200 bg-blue-50",
@@ -3894,7 +3894,7 @@ const Aa = ({
3894
3894
  setMarkAsTemplate: o,
3895
3895
  setUnmarkAsTemplate: d,
3896
3896
  children: /* @__PURE__ */ r("div", { className: "p-0.5 m-0 hover:bg-white rounded duration-100 cursor-pointer", children: /* @__PURE__ */ r(
3897
- ts,
3897
+ ns,
3898
3898
  {
3899
3899
  className: "w-4 h-4",
3900
3900
  onClick: (k) => k.stopPropagation()
@@ -3910,7 +3910,7 @@ const Aa = ({
3910
3910
  close: e,
3911
3911
  isOpen: t
3912
3912
  }) => {
3913
- const [, n] = S([]), [s, i] = S(null), [a, l] = S(""), [o, d] = S(null), [u, h] = S(null), [m, v] = S(null), [p, g] = S(null), [E, b] = S(null), { data: G, isFetching: N, refetch: D } = rs(), [w, k] = S(""), { hasPermission: B } = Xt(), { updateForSelectedPage: q, expandPagesOnSearch: ne } = Ia(null), [U, I] = qe(), M = U.get("page"), { data: j } = Be(), V = ce(
3913
+ const [, n] = S([]), [s, i] = S(null), [a, l] = S(""), [o, d] = S(null), [u, h] = S(null), [m, v] = S(null), [p, g] = S(null), [E, b] = S(null), { data: L, isFetching: N, refetch: G } = as(), [w, k] = S(""), { hasPermission: B } = Xt(), { updateForSelectedPage: q, expandPagesOnSearch: ne } = Ia(null), [U, I] = qe(), M = U.get("page"), { data: j } = Be(), V = ce(
3914
3914
  (O) => {
3915
3915
  var Pe;
3916
3916
  return (Pe = ve(j, { key: O })) == null ? void 0 : Pe.hasSlug;
@@ -3918,8 +3918,8 @@ const Aa = ({
3918
3918
  [j]
3919
3919
  );
3920
3920
  me(() => {
3921
- t && D();
3922
- }, [t, D]), me(() => {
3921
+ t && G();
3922
+ }, [t, G]), me(() => {
3923
3923
  if (!H(w)) return;
3924
3924
  const O = sessionStorage.getItem("pageTypeFilter") || "all";
3925
3925
  !H(j) && O && (ve(j, { key: O }) ? k(O) : k("all"));
@@ -3935,11 +3935,11 @@ const Aa = ({
3935
3935
  );
3936
3936
  me(() => {
3937
3937
  if (M && !N) {
3938
- const O = ve(G, { id: M });
3938
+ const O = ve(L, { id: M });
3939
3939
  O && (O != null && O.pageType) ? n((Pe) => [...Pe, O == null ? void 0 : O.pageType]) : (window.history.replaceState(null, "", "/"), I(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate")));
3940
3940
  }
3941
- }, [G, M, N, I]);
3942
- const Z = X(() => G ? hc(G, a, w, V) : [], [G, a, w, V]);
3941
+ }, [L, M, N, I]);
3942
+ const Z = X(() => L ? hc(L, a, w, V) : [], [L, a, w, V]);
3943
3943
  return me(() => {
3944
3944
  M && !N && !H(Z) && q(Z, M);
3945
3945
  }, [M, N, Z, q]), me(() => {
@@ -3972,7 +3972,7 @@ const Aa = ({
3972
3972
  }
3973
3973
  ),
3974
3974
  /* @__PURE__ */ c(cl, { align: "end", children: [
3975
- /* @__PURE__ */ r(ms, { value: "all", children: "All" }, "all"),
3975
+ /* @__PURE__ */ r(fs, { value: "all", children: "All" }, "all"),
3976
3976
  !H(
3977
3977
  ke(j, (O) => O.hasSlug)
3978
3978
  ) && /* @__PURE__ */ c(ye, { children: [
@@ -3984,7 +3984,7 @@ const Aa = ({
3984
3984
  (O, Pe) => ae(O, "name", "").localeCompare(ae(Pe, "name", ""))
3985
3985
  ),
3986
3986
  (O) => /* @__PURE__ */ r(
3987
- ms,
3987
+ fs,
3988
3988
  {
3989
3989
  value: ae(O, "key"),
3990
3990
  children: ae(O, "name")
@@ -4004,7 +4004,7 @@ const Aa = ({
4004
4004
  (O, Pe) => ae(O, "name", "").localeCompare(ae(Pe, "name", ""))
4005
4005
  ),
4006
4006
  (O) => /* @__PURE__ */ r(
4007
- ms,
4007
+ fs,
4008
4008
  {
4009
4009
  value: ae(O, "key"),
4010
4010
  children: ae(O, "name")
@@ -4071,7 +4071,7 @@ const Aa = ({
4071
4071
  ),
4072
4072
  o && /* @__PURE__ */ r(Qs, { page: o, onClose: () => d(null) }),
4073
4073
  u && /* @__PURE__ */ r(
4074
- ls,
4074
+ os,
4075
4075
  {
4076
4076
  page: u,
4077
4077
  onClose: () => h(null)
@@ -4164,7 +4164,7 @@ const Aa = ({
4164
4164
  setMarkAsTemplate: (p) => l(p),
4165
4165
  setUnmarkAsTemplate: (p) => d(p),
4166
4166
  children: /* @__PURE__ */ r("div", { className: "p-0 m-0 w-6 h-6 p-1 absolute right-2 top-1/2 -translate-y-1/2 hover:bg-gray-200 rounded duration-100 cursor-pointer", children: /* @__PURE__ */ r(
4167
- ts,
4167
+ ns,
4168
4168
  {
4169
4169
  className: "w-4 h-4",
4170
4170
  onClick: (p) => p.stopPropagation()
@@ -4190,7 +4190,7 @@ const Aa = ({
4190
4190
  }
4191
4191
  ),
4192
4192
  s && /* @__PURE__ */ r(
4193
- ls,
4193
+ os,
4194
4194
  {
4195
4195
  page: s,
4196
4196
  onClose: () => i(null)
@@ -4220,7 +4220,7 @@ const Aa = ({
4220
4220
  ] }) : null;
4221
4221
  }, yc = () => {
4222
4222
  const e = ut("logo", null);
4223
- return e ? /* @__PURE__ */ r("div", { className: "w-full max-h-9 overflow-hidden pr-2", children: Wn.createElement(e, {}) }) : null;
4223
+ return e ? /* @__PURE__ */ r("div", { className: "w-full max-h-9 overflow-hidden pr-2", children: Yn.createElement(e, {}) }) : null;
4224
4224
  }, vc = () => {
4225
4225
  const [e] = qe(), t = e.get("page"), { data: n, isFetching: s } = Qe(), [i, a] = S(!1), { savePage: l } = Gs(), o = !!t && !H(n), d = !t || !s && H(n) || i;
4226
4226
  return /* @__PURE__ */ c(ye, { children: [
@@ -4289,7 +4289,7 @@ const Aa = ({
4289
4289
  E && (t.includes(E) ? s(E) : (g.delete("lang"), a(g), s("")));
4290
4290
  }, [t, a, s]);
4291
4291
  const [l, o] = S(null), { data: d } = Qe(), { data: u } = Ct(), { data: h, isFetching: m } = yt(), v = X(() => {
4292
- const g = Ds(
4292
+ const g = Hn(
4293
4293
  Xe(ae(u, "languages"), (E) => {
4294
4294
  const b = ve(h, { lang: E });
4295
4295
  return {
@@ -4311,8 +4311,8 @@ const Aa = ({
4311
4311
  s(g);
4312
4312
  const E = new URLSearchParams(window.location.search);
4313
4313
  g === e ? E.delete("lang") : E.set("lang", g);
4314
- const b = E.toString(), G = `${window.location.pathname}${b ? `?${b}` : ""}`;
4315
- window.history.pushState({}, "", G), a(E), window.dispatchEvent(new PopStateEvent("popstate"));
4314
+ const b = E.toString(), L = `${window.location.pathname}${b ? `?${b}` : ""}`;
4315
+ window.history.pushState({}, "", L), a(E), window.dispatchEvent(new PopStateEvent("popstate"));
4316
4316
  };
4317
4317
  return H(t) || m ? null : /* @__PURE__ */ c(ye, { children: [
4318
4318
  /* @__PURE__ */ c(Nn, { children: [
@@ -4436,7 +4436,7 @@ const Nc = () => {
4436
4436
  });
4437
4437
  };
4438
4438
  function xc() {
4439
- const { data: e } = Qe(), { saveState: t } = Gs(), [n] = as();
4439
+ const { data: e } = Qe(), { saveState: t } = Gs(), [n] = is();
4440
4440
  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__ */ c("div", { className: "flex-1 space-y-1", children: [
4441
4441
  /* @__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" }) }) }),
4442
4442
  /* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: !H(n.lastSaved) && /* @__PURE__ */ c("span", { children: [
@@ -4464,18 +4464,18 @@ function Ac() {
4464
4464
  isFetching: h,
4465
4465
  error: m,
4466
4466
  refetch: v
4467
- } = wc(d == null ? void 0 : d.id), { mutate: p, isPending: g } = Nc(), { mutate: E, isPending: b } = Sc(), G = Te(), N = (B) => {
4467
+ } = wc(d == null ? void 0 : d.id), { mutate: p, isPending: g } = Nc(), { mutate: E, isPending: b } = Sc(), L = Te(), N = (B) => {
4468
4468
  n && E(
4469
4469
  { revisionId: n.uid, discardCurrent: B },
4470
4470
  {
4471
4471
  onSuccess: () => {
4472
- a(!1), s(null), G.invalidateQueries({
4472
+ a(!1), s(null), L.invalidateQueries({
4473
4473
  queryKey: [$, _.GET_DRAFT_PAGE]
4474
4474
  });
4475
4475
  }
4476
4476
  }
4477
4477
  );
4478
- }, D = (B) => {
4478
+ }, G = (B) => {
4479
4479
  s(B), a(!0);
4480
4480
  }, w = (B) => {
4481
4481
  s(B), o(!0);
@@ -4507,7 +4507,7 @@ function Ac() {
4507
4507
  (d == null ? void 0 : d.createdAt) && /* @__PURE__ */ c("p", { className: "text-xs text-muted-foreground mt-1", children: [
4508
4508
  "Page created on",
4509
4509
  " ",
4510
- Zn(
4510
+ Jn(
4511
4511
  new Date(d.createdAt),
4512
4512
  "MMM d, yyyy 'at' h:mm a"
4513
4513
  )
@@ -4520,7 +4520,7 @@ function Ac() {
4520
4520
  {
4521
4521
  revision: B,
4522
4522
  isLatest: B.uid === "current",
4523
- onRestore: () => D(B),
4523
+ onRestore: () => G(B),
4524
4524
  onDelete: () => w(B)
4525
4525
  },
4526
4526
  B.uid
@@ -4583,7 +4583,7 @@ function Cc({
4583
4583
  "Live"
4584
4584
  ] })
4585
4585
  ] }) }),
4586
- /* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: /* @__PURE__ */ r("span", { children: Zn(e.createdAt, "MMM d, h:mm a") }) }),
4586
+ /* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: /* @__PURE__ */ r("span", { children: Jn(e.createdAt, "MMM d, h:mm a") }) }),
4587
4587
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2 pt-0.5", children: e.type === "published" ? /* @__PURE__ */ c("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: [
4588
4588
  /* @__PURE__ */ r(Ml, { className: "h-3 w-3" }),
4589
4589
  /* @__PURE__ */ r("span", { children: "Published" })
@@ -4618,7 +4618,7 @@ function Pc({
4618
4618
  }) {
4619
4619
  return /* @__PURE__ */ c(Nn, { children: [
4620
4620
  /* @__PURE__ */ r(Sn, { asChild: !0, children: /* @__PURE__ */ c(T, { variant: "ghost", size: "icon", className: "h-7 w-7 -mr-1", children: [
4621
- /* @__PURE__ */ r(ts, { className: "h-4 w-4" }),
4621
+ /* @__PURE__ */ r(ns, { className: "h-4 w-4" }),
4622
4622
  /* @__PURE__ */ r("span", { className: "sr-only", children: "More options" })
4623
4623
  ] }) }),
4624
4624
  /* @__PURE__ */ c(xn, { align: "end", className: "text-xs", children: [
@@ -4666,7 +4666,7 @@ function _c({
4666
4666
  n.uid.substring(0, 8),
4667
4667
  " ",
4668
4668
  "from ",
4669
- Zn(n.createdAt, "MMM d, yyyy 'at' h:mm a"),
4669
+ Jn(n.createdAt, "MMM d, yyyy 'at' h:mm a"),
4670
4670
  " by",
4671
4671
  " ",
4672
4672
  l
@@ -4734,7 +4734,7 @@ function kc({
4734
4734
  n.uid.substring(0, 8),
4735
4735
  " from",
4736
4736
  " ",
4737
- Zn(n.createdAt, "MMM d, yyyy 'at' h:mm a"),
4737
+ Jn(n.createdAt, "MMM d, yyyy 'at' h:mm a"),
4738
4738
  " by",
4739
4739
  " ",
4740
4740
  l
@@ -4818,7 +4818,7 @@ function Dc({
4818
4818
  );
4819
4819
  }, b = () => {
4820
4820
  s(g ? [] : Xe(i, "id"));
4821
- }, G = () => {
4821
+ }, L = () => {
4822
4822
  v(
4823
4823
  { ids: Lr(n) },
4824
4824
  {
@@ -4831,7 +4831,7 @@ function Dc({
4831
4831
  if (w === "theme") return "Theme";
4832
4832
  const k = ve(l, { key: w });
4833
4833
  return k ? k == null ? void 0 : k.name : w;
4834
- }, D = X(() => {
4834
+ }, G = X(() => {
4835
4835
  const w = [
4836
4836
  { label: "Updated", top: "pt-2" },
4837
4837
  ...Pn(ke(u, { online: !0 }), "pageType"),
@@ -4882,7 +4882,7 @@ function Dc({
4882
4882
  /* @__PURE__ */ r("th", { scope: "col", className: "px-4 py-3 w-[150px] text-right", children: "Status" })
4883
4883
  ] }) }),
4884
4884
  /* @__PURE__ */ r("tbody", { children: Xe(
4885
- D,
4885
+ G,
4886
4886
  (w) => w.label ? /* @__PURE__ */ r("tr", { children: /* @__PURE__ */ c(
4887
4887
  "td",
4888
4888
  {
@@ -4954,7 +4954,7 @@ function Dc({
4954
4954
  T,
4955
4955
  {
4956
4956
  disabled: p || a || H(i),
4957
- onClick: G,
4957
+ onClick: L,
4958
4958
  children: p ? "Publishing..." : "Publish"
4959
4959
  }
4960
4960
  )
@@ -4983,7 +4983,7 @@ function Uc({ onClose: e }) {
4983
4983
  /* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
4984
4984
  /* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
4985
4985
  /* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" })
4986
- ] }) : /* @__PURE__ */ r("div", { children: Wn.createElement(a, {
4986
+ ] }) : /* @__PURE__ */ r("div", { children: Yn.createElement(a, {
4987
4987
  data: t || {},
4988
4988
  onSave: i ? () => {
4989
4989
  } : l,
@@ -5111,16 +5111,17 @@ const Oc = () => {
5111
5111
  }
5112
5112
  );
5113
5113
  }, Mc = () => {
5114
- const { selectedLang: e } = Je(), { data: t } = is(), { data: n } = yt(), [s, i] = S(!1), [a, l] = S(!1), [o, d] = S(null), { data: u } = Qe(), { mutate: h, isPending: m } = Ws(), { buttonText: v, buttonClassName: p, isPublished: g } = X(() => {
5115
- const G = u && (u == null ? void 0 : u.online);
5114
+ const { selectedLang: e } = Je(), { data: t } = ls(), { data: n } = yt(), [s, i] = S(!1), [a, l] = S(!1), [o, d] = S(null), { data: u } = Qe(), { mutate: h, isPending: m } = Ws(), { buttonText: v, buttonClassName: p, isPublished: g } = X(() => {
5115
+ const L = u && (u == null ? void 0 : u.online);
5116
5116
  return {
5117
- buttonClassName: G ? "hover:bg-green-600 bg-green-500" : "",
5118
- isPublished: G,
5119
- buttonText: G ? ee.PUBLISHED : ee.PUBLISH
5117
+ buttonClassName: L ? "hover:bg-green-600 bg-green-500" : "",
5118
+ isPublished: L,
5119
+ buttonText: L ? ee.PUBLISHED : ee.PUBLISH
5120
5120
  };
5121
5121
  }, [u]), E = async () => {
5122
+ const L = [t == null ? void 0 : t.id, t == null ? void 0 : t.primaryPage];
5122
5123
  h(
5123
- { ids: [t == null ? void 0 : t.id] },
5124
+ { ids: Hn(L) },
5124
5125
  { onSuccess: () => tn("TOP_RIGHT") }
5125
5126
  );
5126
5127
  }, b = X(() => Xe(n ?? [], "id"), [n]);
@@ -5224,7 +5225,7 @@ const Oc = () => {
5224
5225
  ] }),
5225
5226
  /* @__PURE__ */ r(Dc, { showModal: s, onClose: () => i(!1) }),
5226
5227
  o && /* @__PURE__ */ r(
5227
- ls,
5228
+ os,
5228
5229
  {
5229
5230
  page: o,
5230
5231
  onClose: () => d(null)
@@ -5316,7 +5317,7 @@ const zc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5316
5317
  const s = ao(n._type);
5317
5318
  return {
5318
5319
  ...s,
5319
- ...Hn(n, [
5320
+ ...Wn(n, [
5320
5321
  ...Oi(s),
5321
5322
  "_type",
5322
5323
  "_id",
@@ -5387,7 +5388,7 @@ const zc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5387
5388
  }
5388
5389
  });
5389
5390
  }, Wc = () => {
5390
- const e = ss(), t = W(), { user: n } = dt(), s = n == null ? void 0 : n.id;
5391
+ const e = rs(), t = W(), { user: n } = dt(), s = n == null ? void 0 : n.id;
5391
5392
  return De({
5392
5393
  queryKey: [$, "permissions", s],
5393
5394
  queryFn: () => t(e, {
@@ -5397,7 +5398,7 @@ const zc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5397
5398
  enabled: !!s
5398
5399
  });
5399
5400
  }, Yc = () => {
5400
- const e = ie(), t = W(), { setCurrentEditor: n } = Cn(), [, s] = as();
5401
+ const e = ie(), t = W(), { setCurrentEditor: n } = Cn(), [, s] = is();
5401
5402
  return { onSave: async ({
5402
5403
  page: a,
5403
5404
  blocks: l
@@ -5416,7 +5417,7 @@ const zc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5416
5417
  }
5417
5418
  } };
5418
5419
  }, Qc = () => {
5419
- const { data: e } = rs(), t = ie(), n = W();
5420
+ const { data: e } = as(), t = ie(), n = W();
5420
5421
  return {
5421
5422
  getPartialBlocks: ce(async () => {
5422
5423
  const s = {};
@@ -5448,18 +5449,18 @@ const zc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5448
5449
  email: Mn.string().email({ message: "Please enter a valid email address" }),
5449
5450
  password: Mn.string().min(6, { message: "Password must be at least 6 characters" })
5450
5451
  }), Xc = () => {
5451
- const { setUser: e, logout: t } = dt(), n = ss(), [s, i] = S(""), [a, l] = S(""), [o, d] = S({}), [u, h] = S(!1), [m, v] = S(""), p = Ce({
5452
+ const { setUser: e, logout: t } = dt(), n = rs(), [s, i] = S(""), [a, l] = S(""), [o, d] = S({}), [u, h] = S(!1), [m, v] = S(""), p = Ce({
5452
5453
  mutationFn: async (b) => {
5453
5454
  v("");
5454
- const G = await ns(n, {
5455
+ const L = await ss(n, {
5455
5456
  action: "LOGIN",
5456
5457
  data: b
5457
5458
  });
5458
- if (!G.ok) {
5459
- const D = await G.json();
5460
- throw new Error(D.error || "Login failed");
5459
+ if (!L.ok) {
5460
+ const G = await L.json();
5461
+ throw new Error(G.error || "Login failed");
5461
5462
  }
5462
- const N = await G.json();
5463
+ const N = await L.json();
5463
5464
  if (Ge(N, "id") && Ge(N, "email") && Ge(N, "accessToken") && Ge(N, "refreshToken"))
5464
5465
  e(N);
5465
5466
  else
@@ -5477,17 +5478,17 @@ const zc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5477
5478
  }
5478
5479
  }), g = async (b) => {
5479
5480
  b.preventDefault(), d({});
5480
- const G = { email: s, password: a };
5481
+ const L = { email: s, password: a };
5481
5482
  try {
5482
- const N = yr.parse(G);
5483
+ const N = yr.parse(L);
5483
5484
  p.mutate(N);
5484
5485
  } catch (N) {
5485
5486
  if (N instanceof Mn.ZodError) {
5486
- const D = N.errors.reduce((w, k) => {
5487
+ const G = N.errors.reduce((w, k) => {
5487
5488
  const B = k.path[0];
5488
5489
  return w[B] = k.message, w;
5489
5490
  }, {});
5490
- d(D);
5491
+ d(G);
5491
5492
  }
5492
5493
  }
5493
5494
  }, E = yr.safeParse({ email: s, password: a }).success;
@@ -5594,9 +5595,9 @@ const zc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5594
5595
  ] })
5595
5596
  ] }) });
5596
5597
  };
5597
- let Es = Xc;
5598
- const Zc = () => X(() => Es, [Es]), bh = (e) => {
5599
- Es = e;
5598
+ let ws = Xc;
5599
+ const Zc = () => X(() => ws, [ws]), bh = (e) => {
5600
+ ws = e;
5600
5601
  }, Jc = () => {
5601
5602
  const e = Zc();
5602
5603
  return /* @__PURE__ */ r(Or, { fallback: /* @__PURE__ */ r("div", { children: "Loading..." }), children: /* @__PURE__ */ r(e, {}) });
@@ -5843,10 +5844,10 @@ const od = ({
5843
5844
  });
5844
5845
  }
5845
5846
  };
5846
- return Wn.useEffect(() => {
5847
+ return Yn.useEffect(() => {
5847
5848
  a != null && a.description && u(a.description);
5848
5849
  }, [a]), l ? /* @__PURE__ */ r("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ r(Tt, { className: "h-8 w-8 animate-spin" }) }) : o || !(a != null && a.id) ? /* @__PURE__ */ r("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ c("div", { className: "text-center max-w-md mx-auto p-6", children: [
5849
- /* @__PURE__ */ r("div", { className: "flex justify-center mb-4", children: /* @__PURE__ */ r(es, { className: "h-12 w-12 text-gray-400" }) }),
5850
+ /* @__PURE__ */ r("div", { className: "flex justify-center mb-4", children: /* @__PURE__ */ r(ts, { className: "h-12 w-12 text-gray-400" }) }),
5850
5851
  /* @__PURE__ */ r("h3", { className: "text-lg font-medium text-gray-900 mb-2", children: "No Asset Found" }),
5851
5852
  /* @__PURE__ */ r("p", { className: "text-sm text-gray-500 mb-6", children: o ? "There was an error loading the asset. Please try again later." : "The asset you're looking for doesn't exist or has been removed." }),
5852
5853
  /* @__PURE__ */ c("div", { className: "flex justify-center gap-4", children: [
@@ -6012,7 +6013,7 @@ const od = ({
6012
6013
  ] })
6013
6014
  ] })
6014
6015
  ] });
6015
- }, cd = Wn.lazy(() => import("./image-editor-CzFST20j.js"));
6016
+ }, cd = Yn.lazy(() => import("./image-editor-CzFST20j.js"));
6016
6017
  function dd(e) {
6017
6018
  const t = isNaN(e) ? 0 : typeof e == "number" ? e : parseInt(e);
6018
6019
  return t ? t < 1024 ? `${t.toFixed(2)} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(2)} KB` : `${(t / (1024 * 1024)).toFixed(2)} MB` : "0 B";
@@ -6034,11 +6035,11 @@ const ud = ({
6034
6035
  }, [l]);
6035
6036
  const d = e || i, u = ce(
6036
6037
  async (p) => new Promise((g, E) => {
6037
- const b = p[0], G = new FileReader();
6038
- G.readAsDataURL(b), G.onload = async () => {
6038
+ const b = p[0], L = new FileReader();
6039
+ L.readAsDataURL(b), L.onload = async () => {
6039
6040
  s(
6040
6041
  {
6041
- file: G.result,
6042
+ file: L.result,
6042
6043
  folderId: void 0,
6043
6044
  name: b.name,
6044
6045
  optimize: l
@@ -6052,7 +6053,7 @@ const ud = ({
6052
6053
  }
6053
6054
  }
6054
6055
  );
6055
- }, G.onerror = (N) => E(N);
6056
+ }, L.onerror = (N) => E(N);
6056
6057
  }),
6057
6058
  [s, l, a]
6058
6059
  ), { getRootProps: h, getInputProps: m, isDragActive: v } = io({
@@ -6195,9 +6196,9 @@ function Oa({
6195
6196
  mode: n = "image",
6196
6197
  assetId: s
6197
6198
  }) {
6198
- const l = X(() => [n], [n]), [o, d] = S(null), [u, h] = S(null), [m, v] = S(null), [p, g] = S({ show: !1, file: "" }), [E, b] = S(!1), [G, N] = S(
6199
+ const l = X(() => [n], [n]), [o, d] = S(null), [u, h] = S(null), [m, v] = S(null), [p, g] = S({ show: !1, file: "" }), [E, b] = S(!1), [L, N] = S(
6199
6200
  s ? "details" : "grid"
6200
- ), [D, w] = S(""), [k, B] = S(""), [q, ne] = S(1), [U] = S(30), [I, M] = S([]);
6201
+ ), [G, w] = S(""), [k, B] = S(""), [q, ne] = S(1), [U] = S(30), [I, M] = S([]);
6201
6202
  me(() => {
6202
6203
  s && (d(s), N("details"));
6203
6204
  }, [s]), me(() => {
@@ -6207,10 +6208,10 @@ function Oa({
6207
6208
  return () => clearTimeout(P);
6208
6209
  }, [k]);
6209
6210
  const { data: j, isLoading: V } = ad({
6210
- search: D.toLowerCase().trim(),
6211
+ search: G.toLowerCase().trim(),
6211
6212
  page: q,
6212
6213
  limit: U
6213
- }), Y = (j == null ? void 0 : j.assets) || [], de = (j == null ? void 0 : j.total) || 0, Z = Math.ceil(de / U), O = q < Z, Pe = q > 1, J = (Y == null ? void 0 : Y.length) > 0, { mutate: y } = sd(), { mutate: f, isPending: A } = nd(), { mutate: L, isPending: R } = rd(), C = ce(
6214
+ }), Y = (j == null ? void 0 : j.assets) || [], de = (j == null ? void 0 : j.total) || 0, Z = Math.ceil(de / U), O = q < Z, Pe = q > 1, J = (Y == null ? void 0 : Y.length) > 0, { mutate: y } = sd(), { mutate: f, isPending: A } = nd(), { mutate: D, isPending: R } = rd(), C = ce(
6214
6215
  (P) => {
6215
6216
  P >= 1 && P <= Z && ne(P);
6216
6217
  },
@@ -6230,7 +6231,7 @@ function Oa({
6230
6231
  M([]);
6231
6232
  }, []), ge = (P) => {
6232
6233
  (P == null ? void 0 : P.length) !== 0 && (t(
6233
- Hn(Ur(P || I), [
6234
+ Wn(Ur(P || I), [
6234
6235
  "id",
6235
6236
  "url",
6236
6237
  "width",
@@ -6259,7 +6260,7 @@ function Oa({
6259
6260
  folderId: void 0,
6260
6261
  name: p.name || "",
6261
6262
  optimize: x
6262
- }), g({ show: !1, file: "" })) : (await L({
6263
+ }), g({ show: !1, file: "" })) : (await D({
6263
6264
  id: p.id || "",
6264
6265
  file: P
6265
6266
  }), g({ show: !1, file: "" }));
@@ -6272,7 +6273,7 @@ function Oa({
6272
6273
  return /* @__PURE__ */ c(ye, { children: [
6273
6274
  /* @__PURE__ */ c("div", { className: "max-w-[1232px] max-h-[1232px] w-[80vw] h-[80vh] space-y-4 flex flex-col", children: [
6274
6275
  /* @__PURE__ */ r("h1", { className: "text-lg font-medium", children: "Digital Asset Manager" }),
6275
- G === "grid" ? /* @__PURE__ */ c(ye, { children: [
6276
+ L === "grid" ? /* @__PURE__ */ c(ye, { children: [
6276
6277
  /* @__PURE__ */ r(
6277
6278
  ud,
6278
6279
  {
@@ -6340,7 +6341,7 @@ function Oa({
6340
6341
  ] }) : !V && !J ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center h-full border rounded-lg", children: [
6341
6342
  /* @__PURE__ */ r("div", { className: "text-muted-foreground", children: /* @__PURE__ */ r(Xl, { className: "h-9 w-9 text-indigo-500" }) }),
6342
6343
  /* @__PURE__ */ r("div", { className: "text-muted-foreground text-lg", children: "No assets found" }),
6343
- /* @__PURE__ */ r("div", { className: "text-muted-foreground text-sm", children: D.length > 0 ? "No assets found for your search: " + D : "Start uploading assets to get started" }),
6344
+ /* @__PURE__ */ r("div", { className: "text-muted-foreground text-sm", children: G.length > 0 ? "No assets found for your search: " + G : "Start uploading assets to get started" }),
6344
6345
  /* @__PURE__ */ r("br", {})
6345
6346
  ] }) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-3 p-1", children: Y == null ? void 0 : Y.map((P) => /* @__PURE__ */ c(
6346
6347
  "div",
@@ -6451,7 +6452,7 @@ function Oa({
6451
6452
  onClick: (oe) => {
6452
6453
  oe.stopPropagation(), xe(P);
6453
6454
  },
6454
- children: /* @__PURE__ */ r(Jn, { className: "h-4 w-4" })
6455
+ children: /* @__PURE__ */ r(es, { className: "h-4 w-4" })
6455
6456
  }
6456
6457
  ) }),
6457
6458
  /* @__PURE__ */ r(lt, { children: /* @__PURE__ */ r("p", { children: "Delete Asset" }) })
@@ -6536,7 +6537,7 @@ function Oa({
6536
6537
  b(!0);
6537
6538
  try {
6538
6539
  const oe = Y.find((x) => x.id === o);
6539
- oe && await L(Mi(oe, { description: P }));
6540
+ oe && await D(Mi(oe, { description: P }));
6540
6541
  } finally {
6541
6542
  b(!1);
6542
6543
  }
@@ -6603,7 +6604,7 @@ const hd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6603
6604
  }, h = (v) => {
6604
6605
  const p = Array.isArray(v) ? v[0] : v;
6605
6606
  p != null && p.url && n(
6606
- Hn(p, ["url", "id"])
6607
+ Wn(p, ["url", "id"])
6607
6608
  ), o(!1);
6608
6609
  }, m = () => {
6609
6610
  n({ url: "", id: "" });
@@ -6629,7 +6630,7 @@ const hd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6629
6630
  className: "h-8 w-8 rounded-full bg-white/80 text-red-500 hover:bg-white/90",
6630
6631
  onClick: m,
6631
6632
  disabled: a,
6632
- children: /* @__PURE__ */ r(Jn, { className: "h-4 w-4" })
6633
+ children: /* @__PURE__ */ r(es, { className: "h-4 w-4" })
6633
6634
  }
6634
6635
  ),
6635
6636
  /* @__PURE__ */ r(
@@ -6769,7 +6770,7 @@ const hd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6769
6770
  newCursorPos: p
6770
6771
  };
6771
6772
  }, Ra = () => {
6772
- const { t: e } = tl(), { selectedLang: t, fallbackLang: n, languages: s } = Je(), [, i] = Qn(), { data: a } = Na(), { data: l, isFetching: o } = fd(), d = l == null ? void 0 : l.seo, u = ct(
6773
+ const { t: e } = tl(), { selectedLang: t, fallbackLang: n, languages: s } = Je(), [, i] = Xn(), { data: a } = Na(), { data: l, isFetching: o } = fd(), d = l == null ? void 0 : l.seo, u = ct(
6773
6774
  null
6774
6775
  ), [h, m] = S({
6775
6776
  keyword: "",
@@ -6786,7 +6787,7 @@ const hd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6786
6787
  searchDescription: "",
6787
6788
  jsonLD: "",
6788
6789
  ...d
6789
- }), v = ct({ initial: h, updated: h }), p = t.length ? t : n, { mutate: g, isPending: E } = Hs(), b = E, { hasPermission: G } = Xt(), N = G(Ne.EDIT_SEO);
6790
+ }), v = ct({ initial: h, updated: h }), p = t.length ? t : n, { mutate: g, isPending: E } = Hs(), b = E, { hasPermission: L } = Xt(), N = L(Ne.EDIT_SEO);
6790
6791
  me(() => {
6791
6792
  !o && d && m({
6792
6793
  title: "",
@@ -6803,7 +6804,7 @@ const hd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6803
6804
  ...d
6804
6805
  });
6805
6806
  }, [o, d]);
6806
- const D = async () => {
6807
+ const G = async () => {
6807
6808
  g(
6808
6809
  { id: l == null ? void 0 : l.id, seo: h },
6809
6810
  {
@@ -6877,7 +6878,7 @@ const hd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6877
6878
  );
6878
6879
  };
6879
6880
  return /* @__PURE__ */ c("div", { className: "relative h-full flex flex-col", children: [
6880
- !N && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ r(Xn, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ r(Nl, { children: e(
6881
+ !N && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ r(Zn, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ r(Nl, { children: e(
6881
6882
  "You don't have permission to edit SEO settings. Contact your administrator for access."
6882
6883
  ) }) }) }),
6883
6884
  /* @__PURE__ */ c("div", { className: "flex-grow overflow-y-auto no-scrollbar px-2", children: [
@@ -7306,8 +7307,8 @@ const hd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7306
7307
  {
7307
7308
  size: "lg",
7308
7309
  variant: "default",
7309
- onClick: D,
7310
- disabled: !Er(h == null ? void 0 : h.jsonLD) || Ls(v.current.initial, h) || b || !N,
7310
+ onClick: G,
7311
+ disabled: !Er(h == null ? void 0 : h.jsonLD) || Ds(v.current.initial, h) || b || !N,
7311
7312
  children: e(E ? "Saving..." : "Save")
7312
7313
  }
7313
7314
  )
@@ -7386,7 +7387,7 @@ const Ba = "seo", yd = ({
7386
7387
  button: Ed,
7387
7388
  position: "bottom"
7388
7389
  }, Nd = () => {
7389
- hs(Ba, vd), hs(Ua, td), hs("user-info", wd);
7390
+ ms(Ba, vd), ms(Ua, td), ms("user-info", wd);
7390
7391
  };
7391
7392
  var Q = {
7392
7393
  context: void 0,
@@ -7414,7 +7415,7 @@ var Sd = (e, t) => e === t, jn = Symbol("solid-proxy"), Ma = typeof Proxy == "fu
7414
7415
  cleanups: null,
7415
7416
  context: null,
7416
7417
  owner: null
7417
- }, gs = {}, he = null, ps = null, xd = null, Ee = null, ze = null, ot = null, os = 0;
7418
+ }, ps = {}, he = null, ys = null, xd = null, Ee = null, ze = null, ot = null, cs = 0;
7418
7419
  function xt(e, t) {
7419
7420
  const n = Ee, s = he, i = e.length === 0, a = t === void 0 ? s : t, l = i ? $a : {
7420
7421
  owned: null,
@@ -7440,21 +7441,21 @@ function Le(e, t) {
7440
7441
  return [Va.bind(n), s];
7441
7442
  }
7442
7443
  function Ad(e, t, n) {
7443
- const s = cs(e, t, !0, ht);
7444
+ const s = ds(e, t, !0, ht);
7444
7445
  Jt(s);
7445
7446
  }
7446
7447
  function At(e, t, n) {
7447
- const s = cs(e, t, !1, ht);
7448
+ const s = ds(e, t, !1, ht);
7448
7449
  Jt(s);
7449
7450
  }
7450
7451
  function za(e, t, n) {
7451
7452
  ja = Ud;
7452
- const s = cs(e, t, !1, ht);
7453
+ const s = ds(e, t, !1, ht);
7453
7454
  (!n || !n.render) && (s.user = !0), ot ? ot.push(s) : Jt(s);
7454
7455
  }
7455
7456
  function Ve(e, t, n) {
7456
7457
  n = n ? Object.assign({}, $n, n) : $n;
7457
- const s = cs(e, t, !0, 0);
7458
+ const s = ds(e, t, !0, 0);
7458
7459
  return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, Jt(s), Va.bind(s);
7459
7460
  }
7460
7461
  function Td(e) {
@@ -7463,17 +7464,17 @@ function Td(e) {
7463
7464
  function Cd(e, t, n) {
7464
7465
  let s, i, a;
7465
7466
  arguments.length === 1 ? (s = !0, i = e, a = {}) : (s = e, i = t, a = {});
7466
- let l = null, o = gs, d = null, u = !1, h = "initialValue" in a, m = typeof s == "function" && Ve(s);
7467
- const v = /* @__PURE__ */ new Set(), [p, g] = (a.storage || Le)(a.initialValue), [E, b] = Le(void 0), [G, N] = Le(void 0, {
7467
+ let l = null, o = ps, d = null, u = !1, h = "initialValue" in a, m = typeof s == "function" && Ve(s);
7468
+ const v = /* @__PURE__ */ new Set(), [p, g] = (a.storage || Le)(a.initialValue), [E, b] = Le(void 0), [L, N] = Le(void 0, {
7468
7469
  equals: !1
7469
- }), [D, w] = Le(h ? "ready" : "unresolved");
7470
+ }), [G, w] = Le(h ? "ready" : "unresolved");
7470
7471
  Q.context && (d = Q.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : Q.load && Q.has(d) && (o = Q.load(d)));
7471
7472
  function k(U, I, M, j) {
7472
7473
  return l === U && (l = null, j !== void 0 && (h = !0), (U === o || I === o) && a.onHydrated && queueMicrotask(
7473
7474
  () => a.onHydrated(j, {
7474
7475
  value: I
7475
7476
  })
7476
- ), o = gs, B(I, M)), I;
7477
+ ), o = ps, B(I, M)), I;
7477
7478
  }
7478
7479
  function B(U, I) {
7479
7480
  nt(() => {
@@ -7498,29 +7499,29 @@ function Cd(e, t, n) {
7498
7499
  k(l, Re(p));
7499
7500
  return;
7500
7501
  }
7501
- const M = o !== gs ? o : Re(
7502
+ const M = o !== ps ? o : Re(
7502
7503
  () => i(I, {
7503
7504
  value: p(),
7504
7505
  refetching: U
7505
7506
  })
7506
7507
  );
7507
- return Td(M) ? (l = M, "value" in M ? (M.status === "success" ? k(l, M.value, void 0, I) : k(l, void 0, ws(M.value), I), M) : (u = !0, queueMicrotask(() => u = !1), nt(() => {
7508
+ return Td(M) ? (l = M, "value" in M ? (M.status === "success" ? k(l, M.value, void 0, I) : k(l, void 0, Ns(M.value), I), M) : (u = !0, queueMicrotask(() => u = !1), nt(() => {
7508
7509
  w(h ? "refreshing" : "pending"), N();
7509
7510
  }, !1), M.then(
7510
7511
  (j) => k(M, j, void 0, I),
7511
- (j) => k(M, void 0, ws(j), I)
7512
+ (j) => k(M, void 0, Ns(j), I)
7512
7513
  ))) : (k(l, M, void 0, I), M);
7513
7514
  }
7514
7515
  return Object.defineProperties(q, {
7515
7516
  state: {
7516
- get: () => D()
7517
+ get: () => G()
7517
7518
  },
7518
7519
  error: {
7519
7520
  get: () => E()
7520
7521
  },
7521
7522
  loading: {
7522
7523
  get() {
7523
- const U = D();
7524
+ const U = G();
7524
7525
  return U === "pending" || U === "refreshing";
7525
7526
  }
7526
7527
  },
@@ -7618,7 +7619,7 @@ function Ah(e) {
7618
7619
  return he && he.context && (t = he.context[e.id]) !== void 0 ? t : e.defaultValue;
7619
7620
  }
7620
7621
  function qa(e) {
7621
- const t = Ve(e), n = Ve(() => Ns(t()));
7622
+ const t = Ve(e), n = Ve(() => Ss(t()));
7622
7623
  return n.toArray = () => {
7623
7624
  const s = n();
7624
7625
  return Array.isArray(s) ? s : s != null ? [s] : [];
@@ -7643,8 +7644,8 @@ function Ka(e, t, n) {
7643
7644
  let s = e.value;
7644
7645
  return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && nt(() => {
7645
7646
  for (let i = 0; i < e.observers.length; i += 1) {
7646
- const a = e.observers[i], l = ps && ps.running;
7647
- l && ps.disposed.has(a), (l ? !a.tState : !a.state) && (a.pure ? ze.push(a) : ot.push(a), a.observers && Wa(a)), l || (a.state = ht);
7647
+ const a = e.observers[i], l = ys && ys.running;
7648
+ l && ys.disposed.has(a), (l ? !a.tState : !a.state) && (a.pure ? ze.push(a) : ot.push(a), a.observers && Wa(a)), l || (a.state = ht);
7648
7649
  }
7649
7650
  if (ze.length > 1e6)
7650
7651
  throw ze = [], new Error();
@@ -7654,7 +7655,7 @@ function Jt(e) {
7654
7655
  if (!e.fn)
7655
7656
  return;
7656
7657
  ln(e);
7657
- const t = os;
7658
+ const t = cs;
7658
7659
  Dd(
7659
7660
  e,
7660
7661
  e.value,
@@ -7674,7 +7675,7 @@ function Dd(e, t, n) {
7674
7675
  }
7675
7676
  (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Ka(e, s) : e.value = s, e.updatedAt = n);
7676
7677
  }
7677
- function cs(e, t, n, s = ht, i) {
7678
+ function ds(e, t, n, s = ht, i) {
7678
7679
  const a = {
7679
7680
  fn: e,
7680
7681
  state: s,
@@ -7698,7 +7699,7 @@ function qn(e) {
7698
7699
  if (e.suspense && Re(e.suspense.inFallback))
7699
7700
  return e.suspense.effects.push(e);
7700
7701
  const t = [e];
7701
- for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < os); )
7702
+ for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < cs); )
7702
7703
  e.state && t.push(e);
7703
7704
  for (let n = t.length - 1; n >= 0; n--)
7704
7705
  if (e = t[n], e.state === ht)
@@ -7712,7 +7713,7 @@ function nt(e, t) {
7712
7713
  if (ze)
7713
7714
  return e();
7714
7715
  let n = !1;
7715
- t || (ze = []), ot ? n = !0 : ot = [], os++;
7716
+ t || (ze = []), ot ? n = !0 : ot = [], cs++;
7716
7717
  try {
7717
7718
  const s = e();
7718
7719
  return Gd(n), s;
@@ -7752,7 +7753,7 @@ function Vn(e, t) {
7752
7753
  const s = e.sources[n];
7753
7754
  if (s.sources) {
7754
7755
  const i = s.state;
7755
- i === ht ? s !== t && (!s.updatedAt || s.updatedAt < os) && qn(s) : i === zn && Vn(s, t);
7756
+ i === ht ? s !== t && (!s.updatedAt || s.updatedAt < cs) && qn(s) : i === zn && Vn(s, t);
7756
7757
  }
7757
7758
  }
7758
7759
  }
@@ -7789,21 +7790,21 @@ function ln(e) {
7789
7790
  }
7790
7791
  e.state = 0;
7791
7792
  }
7792
- function ws(e) {
7793
+ function Ns(e) {
7793
7794
  return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
7794
7795
  cause: e
7795
7796
  });
7796
7797
  }
7797
7798
  function er(e, t = he) {
7798
- throw ws(e);
7799
+ throw Ns(e);
7799
7800
  }
7800
- function Ns(e) {
7801
+ function Ss(e) {
7801
7802
  if (typeof e == "function" && !e.length)
7802
- return Ns(e());
7803
+ return Ss(e());
7803
7804
  if (Array.isArray(e)) {
7804
7805
  const t = [];
7805
7806
  for (let n = 0; n < e.length; n++) {
7806
- const s = Ns(e[n]);
7807
+ const s = Ss(e[n]);
7807
7808
  Array.isArray(s) ? t.push.apply(t, s) : t.push(s);
7808
7809
  }
7809
7810
  return t;
@@ -7822,7 +7823,7 @@ function Od(e, t) {
7822
7823
  ), i;
7823
7824
  };
7824
7825
  }
7825
- var Ss = Symbol("fallback");
7826
+ var xs = Symbol("fallback");
7826
7827
  function Kn(e) {
7827
7828
  for (let t = 0; t < e.length; t++)
7828
7829
  e[t]();
@@ -7832,24 +7833,24 @@ function Rd(e, t, n = {}) {
7832
7833
  return an(() => Kn(a)), () => {
7833
7834
  let d = e() || [], u = d.length, h, m;
7834
7835
  return d[Fa], Re(() => {
7835
- let p, g, E, b, G, N, D, w, k;
7836
+ let p, g, E, b, L, N, G, w, k;
7836
7837
  if (u === 0)
7837
- l !== 0 && (Kn(a), a = [], s = [], i = [], l = 0, o && (o = [])), n.fallback && (s = [Ss], i[0] = xt((B) => (a[0] = B, n.fallback())), l = 1);
7838
+ l !== 0 && (Kn(a), a = [], s = [], i = [], l = 0, o && (o = [])), n.fallback && (s = [xs], i[0] = xt((B) => (a[0] = B, n.fallback())), l = 1);
7838
7839
  else if (l === 0) {
7839
7840
  for (i = new Array(u), m = 0; m < u; m++)
7840
7841
  s[m] = d[m], i[m] = xt(v);
7841
7842
  l = u;
7842
7843
  } else {
7843
- for (E = new Array(u), b = new Array(u), o && (G = new Array(u)), N = 0, D = Math.min(l, u); N < D && s[N] === d[N]; N++)
7844
+ for (E = new Array(u), b = new Array(u), o && (L = new Array(u)), N = 0, G = Math.min(l, u); N < G && s[N] === d[N]; N++)
7844
7845
  ;
7845
- for (D = l - 1, w = u - 1; D >= N && w >= N && s[D] === d[w]; D--, w--)
7846
- E[w] = i[D], b[w] = a[D], o && (G[w] = o[D]);
7846
+ for (G = l - 1, w = u - 1; G >= N && w >= N && s[G] === d[w]; G--, w--)
7847
+ E[w] = i[G], b[w] = a[G], o && (L[w] = o[G]);
7847
7848
  for (p = /* @__PURE__ */ new Map(), g = new Array(w + 1), m = w; m >= N; m--)
7848
7849
  k = d[m], h = p.get(k), g[m] = h === void 0 ? -1 : h, p.set(k, m);
7849
- for (h = N; h <= D; h++)
7850
- k = s[h], m = p.get(k), m !== void 0 && m !== -1 ? (E[m] = i[h], b[m] = a[h], o && (G[m] = o[h]), m = g[m], p.set(k, m)) : a[h]();
7850
+ for (h = N; h <= G; h++)
7851
+ k = s[h], m = p.get(k), m !== void 0 && m !== -1 ? (E[m] = i[h], b[m] = a[h], o && (L[m] = o[h]), m = g[m], p.set(k, m)) : a[h]();
7851
7852
  for (m = N; m < u; m++)
7852
- m in E ? (i[m] = E[m], a[m] = b[m], o && (o[m] = G[m], o[m](m))) : i[m] = xt(v);
7853
+ m in E ? (i[m] = E[m], a[m] = b[m], o && (o[m] = L[m], o[m](m))) : i[m] = xt(v);
7853
7854
  i = i.slice(0, l = u), s = d.slice(0);
7854
7855
  }
7855
7856
  return i;
@@ -7869,8 +7870,8 @@ function Bd(e, t, n = {}) {
7869
7870
  const u = e() || [], h = u.length;
7870
7871
  return u[Fa], Re(() => {
7871
7872
  if (h === 0)
7872
- return o !== 0 && (Kn(a), a = [], s = [], i = [], o = 0, l = []), n.fallback && (s = [Ss], i[0] = xt((v) => (a[0] = v, n.fallback())), o = 1), i;
7873
- for (s[0] === Ss && (a[0](), a = [], s = [], i = [], o = 0), d = 0; d < h; d++)
7873
+ return o !== 0 && (Kn(a), a = [], s = [], i = [], o = 0, l = []), n.fallback && (s = [xs], i[0] = xt((v) => (a[0] = v, n.fallback())), o = 1), i;
7874
+ for (s[0] === xs && (a[0](), a = [], s = [], i = [], o = 0), d = 0; d < h; d++)
7874
7875
  d < s.length && s[d] !== u[d] ? l[d](() => u[d]) : d >= s.length && (i[d] = xt(m));
7875
7876
  for (; d < s.length; d++)
7876
7877
  a[d]();
@@ -7889,7 +7890,7 @@ function Ya(e, t) {
7889
7890
  function Dn() {
7890
7891
  return !0;
7891
7892
  }
7892
- var xs = {
7893
+ var As = {
7893
7894
  get(e, t, n) {
7894
7895
  return t === jn ? n : e.get(t);
7895
7896
  },
@@ -7913,7 +7914,7 @@ var xs = {
7913
7914
  return e.keys();
7914
7915
  }
7915
7916
  };
7916
- function ys(e) {
7917
+ function vs(e) {
7917
7918
  return (e = typeof e == "function" ? e() : e) ? e : {};
7918
7919
  }
7919
7920
  function Md() {
@@ -7934,25 +7935,25 @@ function Qa(...e) {
7934
7935
  {
7935
7936
  get(l) {
7936
7937
  for (let o = e.length - 1; o >= 0; o--) {
7937
- const d = ys(e[o])[l];
7938
+ const d = vs(e[o])[l];
7938
7939
  if (d !== void 0)
7939
7940
  return d;
7940
7941
  }
7941
7942
  },
7942
7943
  has(l) {
7943
7944
  for (let o = e.length - 1; o >= 0; o--)
7944
- if (l in ys(e[o]))
7945
+ if (l in vs(e[o]))
7945
7946
  return !0;
7946
7947
  return !1;
7947
7948
  },
7948
7949
  keys() {
7949
7950
  const l = [];
7950
7951
  for (let o = 0; o < e.length; o++)
7951
- l.push(...Object.keys(ys(e[o])));
7952
+ l.push(...Object.keys(vs(e[o])));
7952
7953
  return [...new Set(l)];
7953
7954
  }
7954
7955
  },
7955
- xs
7956
+ As
7956
7957
  );
7957
7958
  const n = {}, s = /* @__PURE__ */ Object.create(null);
7958
7959
  for (let l = e.length - 1; l >= 0; l--) {
@@ -7998,7 +7999,7 @@ function Fd(e, ...t) {
7998
7999
  return l.filter((o) => o in e);
7999
8000
  }
8000
8001
  },
8001
- xs
8002
+ As
8002
8003
  ));
8003
8004
  return a.push(
8004
8005
  new Proxy(
@@ -8013,7 +8014,7 @@ function Fd(e, ...t) {
8013
8014
  return Object.keys(e).filter((l) => !i.has(l));
8014
8015
  }
8015
8016
  },
8016
- xs
8017
+ As
8017
8018
  )
8018
8019
  ), a;
8019
8020
  }
@@ -8363,7 +8364,7 @@ var nn = "_$DX_DELEGATE";
8363
8364
  function Ja(e, t, n, s = {}) {
8364
8365
  let i;
8365
8366
  return xt((a) => {
8366
- i = a, t === document ? e() : Ts(t, e(), t.firstChild ? null : void 0, n);
8367
+ i = a, t === document ? e() : Cs(t, e(), t.firstChild ? null : void 0, n);
8367
8368
  }, s.owner), () => {
8368
8369
  i(), t.textContent = "";
8369
8370
  };
@@ -8390,7 +8391,7 @@ function Dh(e = window.document) {
8390
8391
  delete e[nn];
8391
8392
  }
8392
8393
  }
8393
- function As(e, t, n) {
8394
+ function Ts(e, t, n) {
8394
8395
  Pt(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
8395
8396
  }
8396
8397
  function Jd(e, t, n, s) {
@@ -8426,7 +8427,7 @@ function su(e, t, n = {}) {
8426
8427
  }
8427
8428
  function ru(e, t, n) {
8428
8429
  if (!t)
8429
- return n ? As(e, "style") : t;
8430
+ return n ? Ts(e, "style") : t;
8430
8431
  const s = e.style;
8431
8432
  if (typeof t == "string")
8432
8433
  return s.cssText = t;
@@ -8447,7 +8448,7 @@ function au(e, t = {}, n, s) {
8447
8448
  function iu(e, t, n) {
8448
8449
  return Re(() => e(t, n));
8449
8450
  }
8450
- function Ts(e, t, n, s) {
8451
+ function Cs(e, t, n, s) {
8451
8452
  if (n !== void 0 && !s && (s = []), typeof t != "function")
8452
8453
  return on(e, t, s, n);
8453
8454
  At((i) => on(e, t(), i, n), s);
@@ -8506,7 +8507,7 @@ function xr(e, t, n, s, i, a, l) {
8506
8507
  }
8507
8508
  (p || n) && (nu(e, v, n, p), p && Zd([v]));
8508
8509
  } else if (t.slice(0, 5) === "attr:")
8509
- As(e, t.slice(5), n);
8510
+ Ts(e, t.slice(5), n);
8510
8511
  else if (t.slice(0, 5) === "bool:")
8511
8512
  eu(e, t.slice(5), n);
8512
8513
  else if ((m = t.slice(0, 5) === "prop:") || (u = qd.has(t)) || !i && ((h = Hd(t, e.tagName)) || (d = zd.has(t))) || (o = e.nodeName.includes("-") || "is" in l)) {
@@ -8517,7 +8518,7 @@ function xr(e, t, n, s, i, a, l) {
8517
8518
  t === "class" || t === "className" ? tu(e, n) : o && !d && !u ? e[cu(t)] = n : e[h || t] = n;
8518
8519
  } else {
8519
8520
  const v = i && t.indexOf(":") > -1 && Qd[t.split(":")[0]];
8520
- v ? Jd(e, v, t, n) : As(e, Vd[t] || t, n);
8521
+ v ? Jd(e, v, t, n) : Ts(e, Vd[t] || t, n);
8521
8522
  }
8522
8523
  return n;
8523
8524
  }
@@ -8598,7 +8599,7 @@ function on(e, t, n, s, i) {
8598
8599
  }), () => n;
8599
8600
  if (Array.isArray(t)) {
8600
8601
  const d = [], u = n && Array.isArray(n);
8601
- if (Cs(d, t, n, i))
8602
+ if (Ps(d, t, n, i))
8602
8603
  return At(() => n = on(e, d, n, s, !0)), () => n;
8603
8604
  if (a) {
8604
8605
  if (!d.length)
@@ -8631,7 +8632,7 @@ function on(e, t, n, s, i) {
8631
8632
  }
8632
8633
  return n;
8633
8634
  }
8634
- function Cs(e, t, n, s) {
8635
+ function Ps(e, t, n, s) {
8635
8636
  let i = !1;
8636
8637
  for (let a = 0, l = t.length; a < l; a++) {
8637
8638
  let o = t[a], d = n && n[e.length], u;
@@ -8639,12 +8640,12 @@ function Cs(e, t, n, s) {
8639
8640
  if ((u = typeof o) == "object" && o.nodeType)
8640
8641
  e.push(o);
8641
8642
  else if (Array.isArray(o))
8642
- i = Cs(e, o, d) || i;
8643
+ i = Ps(e, o, d) || i;
8643
8644
  else if (u === "function")
8644
8645
  if (s) {
8645
8646
  for (; typeof o == "function"; )
8646
8647
  o = o();
8647
- i = Cs(
8648
+ i = Ps(
8648
8649
  e,
8649
8650
  Array.isArray(o) ? o : [o],
8650
8651
  Array.isArray(d) ? d : [d]
@@ -8696,7 +8697,7 @@ function Gh(e) {
8696
8697
  const o = s();
8697
8698
  if (o instanceof HTMLHeadElement) {
8698
8699
  const [d, u] = Le(!1), h = () => u(!0);
8699
- xt((m) => Ts(o, () => d() ? m() : a(), null)), an(h);
8700
+ xt((m) => Cs(o, () => d() ? m() : a(), null)), an(h);
8700
8701
  } else {
8701
8702
  const d = ti(e.isSVG ? "g" : "div", e.isSVG), u = t && d.attachShadow ? d.attachShadow({
8702
8703
  mode: "open"
@@ -8706,7 +8707,7 @@ function Gh(e) {
8706
8707
  return n.parentNode;
8707
8708
  },
8708
8709
  configurable: !0
8709
- }), Ts(u, a), o.appendChild(d), e.ref && e.ref(d), an(() => o.removeChild(d));
8710
+ }), Cs(u, a), o.appendChild(d), e.ref && e.ref(d), an(() => o.removeChild(d));
8710
8711
  }
8711
8712
  },
8712
8713
  void 0,
@@ -8816,7 +8817,7 @@ var pu = class {
8816
8817
  findByName(e) {
8817
8818
  return this.transfomers[e];
8818
8819
  }
8819
- }, yu = (e) => Object.prototype.toString.call(e).slice(8, -1), si = (e) => typeof e > "u", vu = (e) => e === null, cn = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Ps = (e) => cn(e) && Object.keys(e).length === 0, pt = (e) => Array.isArray(e), bu = (e) => typeof e == "string", Eu = (e) => typeof e == "number" && !isNaN(e), wu = (e) => typeof e == "boolean", Nu = (e) => e instanceof RegExp, dn = (e) => e instanceof Map, un = (e) => e instanceof Set, ri = (e) => yu(e) === "Symbol", Su = (e) => e instanceof Date && !isNaN(e.valueOf()), xu = (e) => e instanceof Error, Cr = (e) => typeof e == "number" && isNaN(e), Au = (e) => wu(e) || vu(e) || si(e) || Eu(e) || bu(e) || ri(e), Tu = (e) => typeof e == "bigint", Cu = (e) => e === 1 / 0 || e === -1 / 0, Pu = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), _u = (e) => e instanceof URL, ai = (e) => e.replace(/\./g, "\\."), vs = (e) => e.map(String).map(ai).join("."), sn = (e) => {
8820
+ }, yu = (e) => Object.prototype.toString.call(e).slice(8, -1), si = (e) => typeof e > "u", vu = (e) => e === null, cn = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, _s = (e) => cn(e) && Object.keys(e).length === 0, pt = (e) => Array.isArray(e), bu = (e) => typeof e == "string", Eu = (e) => typeof e == "number" && !isNaN(e), wu = (e) => typeof e == "boolean", Nu = (e) => e instanceof RegExp, dn = (e) => e instanceof Map, un = (e) => e instanceof Set, ri = (e) => yu(e) === "Symbol", Su = (e) => e instanceof Date && !isNaN(e.valueOf()), xu = (e) => e instanceof Error, Cr = (e) => typeof e == "number" && isNaN(e), Au = (e) => wu(e) || vu(e) || si(e) || Eu(e) || bu(e) || ri(e), Tu = (e) => typeof e == "bigint", Cu = (e) => e === 1 / 0 || e === -1 / 0, Pu = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), _u = (e) => e instanceof URL, ai = (e) => e.replace(/\./g, "\\."), bs = (e) => e.map(String).map(ai).join("."), sn = (e) => {
8820
8821
  const t = [];
8821
8822
  let n = "";
8822
8823
  for (let i = 0; i < e.length; i++) {
@@ -8878,7 +8879,7 @@ var ii = [
8878
8879
  tt((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
8879
8880
  tt(_u, "URL", (e) => e.toString(), (e) => new URL(e))
8880
8881
  ];
8881
- function ds(e, t, n, s) {
8882
+ function us(e, t, n, s) {
8882
8883
  return {
8883
8884
  isApplicable: e,
8884
8885
  annotation: t,
@@ -8886,7 +8887,7 @@ function ds(e, t, n, s) {
8886
8887
  untransform: s
8887
8888
  };
8888
8889
  }
8889
- var li = ds((e, t) => ri(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
8890
+ var li = us((e, t) => ri(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
8890
8891
  const s = n.symbolRegistry.getValue(t[1]);
8891
8892
  if (!s)
8892
8893
  throw new Error("Trying to deserialize unknown symbol");
@@ -8901,7 +8902,7 @@ var li = ds((e, t) => ri(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
8901
8902
  Float32Array,
8902
8903
  Float64Array,
8903
8904
  Uint8ClampedArray
8904
- ].reduce((e, t) => (e[t.name] = t, e), {}), oi = ds(Pu, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
8905
+ ].reduce((e, t) => (e[t.name] = t, e), {}), oi = us(Pu, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
8905
8906
  const n = ku[t[1]];
8906
8907
  if (!n)
8907
8908
  throw new Error("Trying to deserialize unknown typed array");
@@ -8910,7 +8911,7 @@ var li = ds((e, t) => ri(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
8910
8911
  function ci(e, t) {
8911
8912
  return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
8912
8913
  }
8913
- var di = ds(ci, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
8914
+ var di = us(ci, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
8914
8915
  const n = t.classRegistry.getAllowedProps(e.constructor);
8915
8916
  if (!n)
8916
8917
  return { ...e };
@@ -8923,7 +8924,7 @@ var di = ds(ci, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
8923
8924
  if (!s)
8924
8925
  throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");
8925
8926
  return Object.assign(Object.create(s.prototype), e);
8926
- }), ui = ds((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) => {
8927
+ }), ui = us((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) => {
8927
8928
  const s = n.customTransformerRegistry.findByName(t[1]);
8928
8929
  if (!s)
8929
8930
  throw new Error("Trying to deserialize unknown custom value");
@@ -8999,7 +9000,7 @@ var Du = (e, t) => {
8999
9000
  e = e[s];
9000
9001
  }
9001
9002
  return e;
9002
- }, _s = (e, t, n) => {
9003
+ }, ks = (e, t, n) => {
9003
9004
  if (mi(t), t.length === 0)
9004
9005
  return n(e);
9005
9006
  let s = e;
@@ -9048,34 +9049,34 @@ var Du = (e, t) => {
9048
9049
  }
9049
9050
  return e;
9050
9051
  };
9051
- function ks(e, t, n = []) {
9052
+ function Is(e, t, n = []) {
9052
9053
  if (!e)
9053
9054
  return;
9054
9055
  if (!pt(e)) {
9055
- Yt(e, (a, l) => ks(a, t, [...n, ...sn(l)]));
9056
+ Yt(e, (a, l) => Is(a, t, [...n, ...sn(l)]));
9056
9057
  return;
9057
9058
  }
9058
9059
  const [s, i] = e;
9059
9060
  i && Yt(i, (a, l) => {
9060
- ks(a, t, [...n, ...sn(l)]);
9061
+ Is(a, t, [...n, ...sn(l)]);
9061
9062
  }), t(s, n);
9062
9063
  }
9063
9064
  function Gu(e, t, n) {
9064
- return ks(t, (s, i) => {
9065
- e = _s(e, i, (a) => Lu(a, s, n));
9065
+ return Is(t, (s, i) => {
9066
+ e = ks(e, i, (a) => Lu(a, s, n));
9066
9067
  }), e;
9067
9068
  }
9068
9069
  function Uu(e, t) {
9069
9070
  function n(s, i) {
9070
9071
  const a = Du(e, sn(i));
9071
9072
  s.map(sn).forEach((l) => {
9072
- e = _s(e, l, () => a);
9073
+ e = ks(e, l, () => a);
9073
9074
  });
9074
9075
  }
9075
9076
  if (pt(t)) {
9076
9077
  const [s, i] = t;
9077
9078
  s.forEach((a) => {
9078
- e = _s(e, sn(a), () => e);
9079
+ e = ks(e, sn(a), () => e);
9079
9080
  }), i && Yt(i, n);
9080
9081
  } else
9081
9082
  Yt(t, n);
@@ -9094,8 +9095,8 @@ function Bu(e, t) {
9094
9095
  return;
9095
9096
  t || (i = i.map((o) => o.map(String)).sort((o, d) => o.length - d.length));
9096
9097
  const [a, ...l] = i;
9097
- a.length === 0 ? s = l.map(vs) : n[vs(a)] = l.map(vs);
9098
- }), s ? Ps(n) ? [s] : [s, n] : Ps(n) ? void 0 : n;
9098
+ a.length === 0 ? s = l.map(bs) : n[bs(a)] = l.map(bs);
9099
+ }), s ? _s(n) ? [s] : [s, n] : _s(n) ? void 0 : n;
9099
9100
  }
9100
9101
  var fi = (e, t, n, s, i = [], a = [], l = /* @__PURE__ */ new Map()) => {
9101
9102
  const o = Au(e);
@@ -9125,11 +9126,11 @@ var fi = (e, t, n, s, i = [], a = [], l = /* @__PURE__ */ new Map()) => {
9125
9126
  if (g === "__proto__" || g === "constructor" || g === "prototype")
9126
9127
  throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);
9127
9128
  const E = fi(p, t, n, s, [...i, g], [...a, e], l);
9128
- h[g] = E.transformedValue, pt(E.annotations) ? m[g] = E.annotations : cn(E.annotations) && Yt(E.annotations, (b, G) => {
9129
- m[ai(g) + "." + G] = b;
9129
+ h[g] = E.transformedValue, pt(E.annotations) ? m[g] = E.annotations : cn(E.annotations) && Yt(E.annotations, (b, L) => {
9130
+ m[ai(g) + "." + L] = b;
9130
9131
  });
9131
9132
  });
9132
- const v = Ps(m) ? {
9133
+ const v = _s(m) ? {
9133
9134
  transformedValue: h,
9134
9135
  annotations: d ? [d.type] : void 0
9135
9136
  } : {
@@ -9159,16 +9160,16 @@ function Fu(e, t, n, s, i) {
9159
9160
  configurable: !0
9160
9161
  });
9161
9162
  }
9162
- function Is(e, t = {}) {
9163
+ function Ls(e, t = {}) {
9163
9164
  if (_r(e))
9164
- return e.map((i) => Is(i, t));
9165
+ return e.map((i) => Ls(i, t));
9165
9166
  if (!Mu(e))
9166
9167
  return e;
9167
9168
  const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
9168
9169
  return [...n, ...s].reduce((i, a) => {
9169
9170
  if (_r(t.props) && !t.props.includes(a))
9170
9171
  return i;
9171
- const l = e[a], o = Is(l, t);
9172
+ const l = e[a], o = Ls(l, t);
9172
9173
  return Fu(i, a, o, e, t.nonenumerable), i;
9173
9174
  }, {});
9174
9175
  }
@@ -9195,7 +9196,7 @@ var we = class {
9195
9196
  }
9196
9197
  deserialize(e) {
9197
9198
  const { json: t, meta: n } = e;
9198
- let s = Is(t);
9199
+ let s = Ls(t);
9199
9200
  return n != null && n.values && (s = Gu(s, n.values, this)), n != null && n.referentialEqualities && (s = Uu(s, n.referentialEqualities)), s;
9200
9201
  }
9201
9202
  stringify(e) {
@@ -9389,7 +9390,7 @@ var $h = (e, t = !1) => {
9389
9390
  const t = Ja(() => {
9390
9391
  const n = this, [s] = K(this, Ut), [i] = K(this, Ot), [a] = K(this, Rt), [l] = K(this, Bt), [o] = K(this, Dt);
9391
9392
  let d;
9392
- return K(this, Mt) ? d = K(this, Mt) : (d = Xa(() => import("./HO4MOOFI-DzlENaBW.js")), pe(this, Mt, d)), vi(K(this, gn), K(this, Gt)), Ya(d, Qa({
9393
+ return K(this, Mt) ? d = K(this, Mt) : (d = Xa(() => import("./HO4MOOFI-DvgRvhlF.js")), pe(this, Mt, d)), vi(K(this, gn), K(this, Gt)), Ya(d, Qa({
9393
9394
  get queryFlavor() {
9394
9395
  return K(n, mn);
9395
9396
  },
@@ -9483,7 +9484,7 @@ var $h = (e, t = !1) => {
9483
9484
  const t = Ja(() => {
9484
9485
  const n = this, [s] = K(this, $t), [i] = K(this, zt), [a] = K(this, qt), [l] = K(this, Vt), [o] = K(this, Ft), [d] = K(this, Kt);
9485
9486
  let u;
9486
- return K(this, Ht) ? u = K(this, Ht) : (u = Xa(() => import("./HUY7CZI3-CyISM9XL.js")), pe(this, Ht, u)), vi(K(this, En), K(this, jt)), Ya(u, Qa({
9487
+ return K(this, Ht) ? u = K(this, Ht) : (u = Xa(() => import("./HUY7CZI3-B1Krp-dm.js")), pe(this, Ht, u)), vi(K(this, En), K(this, jt)), Ya(u, Qa({
9487
9488
  get queryFlavor() {
9488
9489
  return K(n, vn);
9489
9490
  },
@@ -9608,7 +9609,7 @@ const Qu = () => {
9608
9609
  queryFn: async () => t(e, { action: _.GET_COLLECTIONS })
9609
9610
  });
9610
9611
  }, Xu = () => {
9611
- const { data: e } = Qe(), { data: t } = is(), { data: n } = Ct(), s = ie(), i = W(), a = X(
9612
+ const { data: e } = Qe(), { data: t } = ls(), { data: n } = Ct(), s = ie(), i = W(), a = X(
9612
9613
  () => (n == null ? void 0 : n.fallbackLang) || "en",
9613
9614
  [n == null ? void 0 : n.fallbackLang]
9614
9615
  );
@@ -9650,10 +9651,10 @@ function eh() {
9650
9651
  logout: n,
9651
9652
  isLoggedIn: s,
9652
9653
  isSessionExpired: i
9653
- } = dt(), a = ss(), l = ct(null), o = ce(async () => {
9654
+ } = dt(), a = rs(), l = ct(null), o = ce(async () => {
9654
9655
  if (!(!Ge(e, "accessToken") || !Ge(e, "refreshToken")))
9655
9656
  try {
9656
- const d = await ns(a, {
9657
+ const d = await ss(a, {
9657
9658
  action: "REFRESH_TOKEN",
9658
9659
  data: {
9659
9660
  refreshToken: e.refreshToken,
@@ -9708,10 +9709,10 @@ const nh = (e) => {
9708
9709
  }
9709
9710
  } = Wc();
9710
9711
  Hc();
9711
- const { data: l, isFetching: o } = wa(), { blocks: d } = Kc(l), { data: u } = Be(), { mutateAsync: h } = pa(), m = qc(), { onSave: v } = Yc(), { getPartialBlocks: p, getPartialBlockBlocks: g } = Qc(), { aiContext: E, setAiContext: b } = Ks(), { mutateAsync: G } = Bo(), [N, D] = S(!1), { data: w } = Ct(), k = Ea(), { data: B } = Na(), { data: q } = Qu(), { mutateAsync: ne } = Xu(), U = Zu();
9712
+ const { data: l, isFetching: o } = wa(), { blocks: d } = Kc(l), { data: u } = Be(), { mutateAsync: h } = pa(), m = qc(), { onSave: v } = Yc(), { getPartialBlocks: p, getPartialBlockBlocks: g } = Qc(), { aiContext: E, setAiContext: b } = Ks(), { mutateAsync: L } = Bo(), [N, G] = S(!1), { data: w } = Ct(), k = Ea(), { data: B } = Na(), { data: q } = Qu(), { mutateAsync: ne } = Xu(), U = Zu();
9712
9713
  bo(), me(() => {
9713
9714
  const V = () => {
9714
- document.hidden ? D(!0) : D(!1);
9715
+ document.hidden ? G(!0) : G(!1);
9715
9716
  };
9716
9717
  return window.addEventListener("visibilitychange", V), () => window.removeEventListener("visibilitychange", V);
9717
9718
  }, []), t.current = d;
@@ -9719,8 +9720,8 @@ const nh = (e) => {
9719
9720
  const V = {};
9720
9721
  return a && (V.permissions = ae(a, "permissions", null), V.role = ae(a, "role", "user")), V;
9721
9722
  }, [a]), M = ce(
9722
- async (V, Y) => await G({ pageType: V, query: Y }),
9723
- [G]
9723
+ async (V, Y) => await L({ pageType: V, query: Y }),
9724
+ [L]
9724
9725
  ), j = X(
9725
9726
  () => ae(w, "theme", {}) || {},
9726
9727
  [w]
@@ -9769,7 +9770,7 @@ const nh = (e) => {
9769
9770
  _type: "@chai/ai-context",
9770
9771
  _value: lr(E) ? E : ""
9771
9772
  }, Z = [...V, de];
9772
- return await v({ page: s, blocks: Z }), t.current = Z, Ls(Y, j) || await h({ settings: { theme: Y } }), !0;
9773
+ return await v({ page: s, blocks: Z }), t.current = Z, Ds(Y, j) || await h({ settings: { theme: Y } }), !0;
9773
9774
  },
9774
9775
  themePanelComponent: Ho,
9775
9776
  ...I
@@ -9791,7 +9792,7 @@ const nh = (e) => {
9791
9792
  eh();
9792
9793
  const { isLoggedIn: t, isSessionExpired: n } = dt(), [, s] = ya(), [i, a] = S(!1);
9793
9794
  return me(() => (s(
9794
- Hn(e, [
9795
+ Wn(e, [
9795
9796
  "apiUrl",
9796
9797
  "usersApiUrl",
9797
9798
  "assetsApiUrl",
@@ -9810,7 +9811,7 @@ const nh = (e) => {
9810
9811
  /* @__PURE__ */ r(Ki, { richColors: !0 })
9811
9812
  ] }) : /* @__PURE__ */ r("div", {});
9812
9813
  }, Wh = () => {
9813
- const e = ie(), t = W(), { data: n } = is(), s = Te();
9814
+ const e = ie(), t = W(), { data: n } = ls(), s = Te();
9814
9815
  return Ce({
9815
9816
  mutationFn: async (i) => {
9816
9817
  if (!(n != null && n.id))
@@ -9897,7 +9898,7 @@ export {
9897
9898
  Sh as V,
9898
9899
  Hh as W,
9899
9900
  rt as X,
9900
- is as Y,
9901
+ ls as Y,
9901
9902
  Na as Z,
9902
9903
  Ea as _,
9903
9904
  Ya as a,
@@ -9909,7 +9910,7 @@ export {
9909
9910
  bh as a5,
9910
9911
  Qe as a6,
9911
9912
  yt as a7,
9912
- rs as a8,
9913
+ as as a8,
9913
9914
  Ct as a9,
9914
9915
  dt as aa,
9915
9916
  Wc as ab,
@@ -9925,14 +9926,14 @@ export {
9925
9926
  Fd as h,
9926
9927
  xh as i,
9927
9928
  At as j,
9928
- As as k,
9929
+ Ts as k,
9929
9930
  Th as l,
9930
9931
  qh as m,
9931
9932
  an as n,
9932
9933
  wh as o,
9933
9934
  Pd as p,
9934
9935
  iu as q,
9935
- Ts as r,
9936
+ Cs as r,
9936
9937
  zh as s,
9937
9938
  Lh as t,
9938
9939
  Ah as u,