@chaibuilder/pages 0.12.2 → 0.12.3

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.
@@ -6,20 +6,20 @@ var Kl = (e, t, n) => t in e ? Vl(e, t, { enumerable: !0, configurable: !0, writ
6
6
  var Ct = (e, t, n) => Kl(e, typeof t != "symbol" ? t + "" : t, n), ua = (e, t, n) => t.has(e) || da("Cannot " + n);
7
7
  var X = (e, t, n) => (ua(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ve = (e, t, n) => t.has(e) ? da("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), ge = (e, t, n, r) => (ua(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
8
8
  import { jsx as s, jsxs as c, Fragment as ue } from "react/jsx-runtime";
9
- import { has as Ie, get as K, isEmpty as le, reverse as Wl, sortBy as Hl, each as Ql, find as xe, noop as ja, groupBy as za, minBy as Jl, set as pt, keyBy as zr, map as et, filter as Se, startsWith as en, uniq as Sr, union as Yl, flatMap as Ar, includes as xt, compact as qs, uniqBy as Xl, mapValues as Va, startCase as $t, toLower as Gt, isObject as mr, pick as os, initial as Zl, replace as eo, isString as Tr, trim as to, isArray as Ka, isPlainObject as no, orderBy as Ns, first as Wa, concat as so, debounce as ro, upperCase as ha, keys as ao, pickBy as io, endsWith as lo, isEqual as Ls, isFunction as oo, merge as co, cloneDeep as uo } from "lodash-es";
9
+ import { has as Ie, get as K, isEmpty as le, reverse as Wl, sortBy as Hl, each as Ql, find as xe, noop as ja, groupBy as za, minBy as Jl, set as pt, keyBy as zr, map as et, filter as Se, startsWith as tn, uniq as Sr, union as Yl, flatMap as Ar, includes as xt, compact as qs, uniqBy as Xl, mapValues as Va, startCase as $t, toLower as Gt, isObject as mr, pick as os, initial as Zl, replace as eo, isString as Tr, trim as to, isArray as Ka, isPlainObject as no, orderBy as Ns, first as Wa, concat as so, debounce as ro, upperCase as ha, keys as ao, pickBy as io, endsWith as lo, isEqual as Ls, isFunction as oo, merge as co, cloneDeep as uo } from "lodash-es";
10
10
  import * as Te from "react";
11
11
  import $s, { useCallback as de, useState as E, useEffect as ae, useRef as rt, useMemo as H, Suspense as Ha, createContext as ho, Component as mo, createElement as ma, lazy as fo } from "react";
12
12
  import { useAtom as Ue, atom as vt } from "jotai";
13
- import { useMutation as ke, useQueryClient as _e, useQuery as Oe, onlineManager as Qa, QueryClient as go, QueryClientProvider as po } from "@tanstack/react-query";
13
+ import { useMutation as ke, useQueryClient as Pe, useQuery as Oe, onlineManager as Qa, QueryClient as go, QueryClientProvider as po } from "@tanstack/react-query";
14
14
  import { toast as V } from "sonner";
15
- import { useLanguages as Ge, useSavePage as Nt, useIsPageLoaded as yo, useUpdateBlocksPropsRealtime as Ja, PERMISSIONS as vo, usePartailBlocksStore as bo, usePermissions as cs, useLibraryBlocks as xo, useTheme as No, useSidebarActivePanel as Vr, useChaiFeatureFlag as ds, mergeClasses as Mn, useRightPanel as wo, registerChaiLibrary as Eo, getBlocksFromHTML as So, useBuilderProp as Ao, useTranslation as To, registerChaiSidebarPanel as fr, registerChaiFeatureFlag as gr, registerChaiTopBar as Co, registerChaiMediaManager as ko, registerChaiSaveToLibrary as _o, ChaiBuilderEditor as Po } from "@chaibuilder/sdk";
16
- import { Card as js, CardHeader as zs, CardTitle as Vs, CardContent as Ks, CardFooter as Ws, Button as S, Skeleton as Ut, AlertDialog as Ya, AlertDialogTrigger as Xa, AlertDialogContent as Za, AlertDialogHeader as ei, AlertDialogTitle as ti, AlertDialogDescription as ni, AlertDialogFooter as si, AlertDialogCancel as ri, AlertDialogAction as ai, Popover as vn, PopoverTrigger as bn, PopoverContent as xn, Input as be, Label as ce, Dialog as qe, DialogContent as $e, DialogHeader as je, DialogTitle as ze, DialogDescription as Ye, Alert as Sn, DialogFooter as ht, Tooltip as tt, TooltipTrigger as nt, TooltipContent as st, Select as Io, SelectTrigger as Lo, SelectContent as Do, SelectItem as pr, TooltipProvider as Mt, DropdownMenu as An, DropdownMenuTrigger as Tn, DropdownMenuContent as Cn, DropdownMenuItem as Be, CommandList as ii, Command as Bn, CommandEmpty as Fn, CommandGroup as _t, CommandItem as gt, Textarea as Nn, Separator as Oo, Sheet as Kr, SheetContent as Wr, SheetHeader as Hr, SheetTitle as Qr, SheetDescription as li, Switch as Cr, ScrollArea as ks, SheetTrigger as Ro, DropdownMenuSeparator as Go, CardDescription as Uo, CommandInput as Mo, Tabs as oi, TabsList as ci, TabsTrigger as In, TabsContent as Ln, AlertDescription as di, HoverCard as Bo, HoverCardTrigger as Fo, HoverCardContent as qo } from "@chaibuilder/sdk/ui";
15
+ import { useLanguages as Ge, useSavePage as Nt, useIsPageLoaded as yo, useUpdateBlocksPropsRealtime as Ja, PERMISSIONS as vo, usePartailBlocksStore as bo, usePermissions as cs, useLibraryBlocks as xo, useTheme as No, useSidebarActivePanel as Vr, useChaiFeatureFlag as ds, mergeClasses as Mn, useRightPanel as wo, registerChaiLibrary as Eo, getBlocksFromHTML as So, useBuilderProp as Ao, useTranslation as To, registerChaiSidebarPanel as fr, registerChaiFeatureFlag as gr, registerChaiTopBar as Co, registerChaiMediaManager as ko, registerChaiSaveToLibrary as Po, ChaiBuilderEditor as _o } from "@chaibuilder/sdk";
16
+ import { Card as js, CardHeader as zs, CardTitle as Vs, CardContent as Ks, CardFooter as Ws, Button as S, Skeleton as Ut, AlertDialog as Ya, AlertDialogTrigger as Xa, AlertDialogContent as Za, AlertDialogHeader as ei, AlertDialogTitle as ti, AlertDialogDescription as ni, AlertDialogFooter as si, AlertDialogCancel as ri, AlertDialogAction as ai, Popover as bn, PopoverTrigger as xn, PopoverContent as Nn, Input as be, Label as ce, Dialog as qe, DialogContent as $e, DialogHeader as je, DialogTitle as ze, DialogDescription as Ye, Alert as An, DialogFooter as ht, Tooltip as tt, TooltipTrigger as nt, TooltipContent as st, Select as Io, SelectTrigger as Lo, SelectContent as Do, SelectItem as pr, TooltipProvider as Mt, DropdownMenu as Tn, DropdownMenuTrigger as Cn, DropdownMenuContent as kn, DropdownMenuItem as Be, CommandList as ii, Command as Bn, CommandEmpty as Fn, CommandGroup as Pt, CommandItem as gt, Textarea as wn, Separator as Oo, Sheet as Kr, SheetContent as Wr, SheetHeader as Hr, SheetTitle as Qr, SheetDescription as li, Switch as Cr, ScrollArea as ks, SheetTrigger as Ro, DropdownMenuSeparator as Go, CardDescription as Uo, CommandInput as Mo, Tabs as oi, TabsList as ci, TabsTrigger as Ln, TabsContent as Dn, AlertDescription as di, HoverCard as Bo, HoverCardTrigger as Fo, HoverCardContent as qo } from "@chaibuilder/sdk/ui";
17
17
  import { formatDistanceToNow as ui, formatDate as $o, format as Hs } from "date-fns";
18
- import { LockIcon as jo, LockKeyhole as zo, UserIcon as Vo, Info as Ko, KeyIcon as Wo, AlertTriangleIcon as Ho, Loader as wt, TableIcon as Qo, CheckCircle as hi, Target as Jo, Edit as qn, Check as it, X as wn, Trash2 as Qs, Plus as Js, ImageIcon as $n, AlertCircle as Ys, Star as mi, FilterXIcon as Yo, Filter as Xo, ListFilter as Zo, Search as Kt, ChevronsUpDown as ec, ChevronsDownUp as tc, RefreshCw as nc, CopyPlusIcon as sc, Pencil as fi, Power as gi, Trash as Jr, SquareLibrary as fa, NotepadText as rc, MoreHorizontal as jn, Lock as pi, ChevronRight as Yr, StarsIcon as ac, Globe as yi, File as us, ChevronDown as Pt, Tag as ic, Languages as ga, LogsIcon as lc, Folder as vi, FileJson as kr, Copy as Ds, History as oc, Eye as Xs, Undo2 as bi, CloudOff as cc, Rocket as _r, Save as xi, GlobeIcon as dc, Palette as uc, Send as pa, Settings as hc, ExternalLink as mc, EyeOff as fc, Loader2 as Ni, StarIcon as gc, PencilIcon as pc, TrashIcon as yc, LanguagesIcon as vc, DatabaseIcon as bc, ChevronLeft as Xr, Sparkles as xc, Code as Nc, AlertTriangle as wi, User as wc, Link as Ec, Archive as Sc, Film as Ac, Upload as Tc } from "lucide-react";
18
+ import { LockIcon as jo, LockKeyhole as zo, UserIcon as Vo, Info as Ko, KeyIcon as Wo, AlertTriangleIcon as Ho, Loader as wt, TableIcon as Qo, CheckCircle as hi, Target as Jo, Edit as qn, Check as it, X as En, Trash2 as Qs, Plus as Js, ImageIcon as $n, AlertCircle as Ys, Star as mi, FilterXIcon as Yo, Filter as Xo, ListFilter as Zo, Search as Wt, ChevronsUpDown as ec, ChevronsDownUp as tc, RefreshCw as nc, CopyPlusIcon as sc, Pencil as fi, Power as gi, Trash as Jr, SquareLibrary as fa, NotepadText as rc, MoreHorizontal as jn, Lock as pi, ChevronRight as Yr, StarsIcon as ac, Globe as yi, File as us, ChevronDown as _t, Tag as ic, Languages as ga, LogsIcon as lc, Folder as vi, FileJson as kr, Copy as Ds, History as oc, Eye as Xs, Undo2 as bi, CloudOff as cc, Rocket as Pr, Save as xi, GlobeIcon as dc, Palette as uc, Send as pa, Settings as hc, ExternalLink as mc, EyeOff as fc, Loader2 as Ni, StarIcon as gc, PencilIcon as pc, TrashIcon as yc, LanguagesIcon as vc, DatabaseIcon as bc, ChevronLeft as Xr, Sparkles as xc, Code as Nc, AlertTriangle as wi, User as wc, Link as Ec, Archive as Sc, Film as Ac, Upload as Tc } from "lucide-react";
19
19
  import Cc from "compressorjs";
20
- import { parseDiff as kc, Diff as _c, Hunk as Pc } from "react-diff-view";
20
+ import { parseDiff as kc, Diff as Pc, Hunk as _c } from "react-diff-view";
21
21
  import { useRegisteredChaiBlocks as Ic, getDefaultBlockProps as Lc } from "@chaibuilder/runtime";
22
- import { z as _s } from "zod";
22
+ import { z as Ps } from "zod";
23
23
  import { useDropzone as Dc } from "react-dropzone";
24
24
  import { loadWebBlocks as Oc } from "@chaibuilder/sdk/web-blocks";
25
25
  const De = {
@@ -396,7 +396,7 @@ if (import.meta.vitest) {
396
396
  t(n).toBeDefined();
397
397
  });
398
398
  }
399
- let Xt = null;
399
+ let Zt = null;
400
400
  function jc() {
401
401
  const { user: e, setUser: t, logout: n } = mt(), r = er(), a = ot("getAccessToken", !1), i = async () => {
402
402
  if (a === !1 && e && !(!Ie(e, "expiresAt") || !Ie(e, "accessToken") || !Ie(e, "refreshToken")))
@@ -422,13 +422,13 @@ function jc() {
422
422
  };
423
423
  return ke({
424
424
  mutationFn: async () => {
425
- if (Xt)
426
- return await Xt;
427
- Xt = i();
425
+ if (Zt)
426
+ return await Zt;
427
+ Zt = i();
428
428
  try {
429
- return await Xt;
429
+ return await Zt;
430
430
  } finally {
431
- Xt = null;
431
+ Zt = null;
432
432
  }
433
433
  },
434
434
  onSuccess: () => {
@@ -436,7 +436,7 @@ function jc() {
436
436
  });
437
437
  }
438
438
  function zc() {
439
- return Xt;
439
+ return Zt;
440
440
  }
441
441
  const Ai = () => {
442
442
  const { user: e, setUser: t } = mt(), { mutateAsync: n } = jc(), r = 60, a = de(() => {
@@ -498,7 +498,7 @@ const Ai = () => {
498
498
  [e, t]
499
499
  );
500
500
  }, Ti = () => {
501
- const e = ie(), t = _e(), n = Y();
501
+ const e = ie(), t = Pe(), n = Y();
502
502
  return ke({
503
503
  mutationFn: async (r) => n(e, { action: O.RELEASE_LOCK, data: r }),
504
504
  onSuccess: () => {
@@ -508,7 +508,7 @@ const Ai = () => {
508
508
  }
509
509
  });
510
510
  }, Ci = () => {
511
- const e = ie(), t = _e(), n = Y();
511
+ const e = ie(), t = Pe(), n = Y();
512
512
  return ke({
513
513
  mutationFn: async (r) => n(e, {
514
514
  action: O.UPDATE_WEBSITE_SETTINGS,
@@ -527,7 +527,7 @@ const Ai = () => {
527
527
  }
528
528
  });
529
529
  }, Vc = () => {
530
- const e = ie(), t = _e(), n = Y();
530
+ const e = ie(), t = Pe(), n = Y();
531
531
  return ke({
532
532
  mutationFn: async (r) => n(e, { action: O.UPDATE_WEBSITE_DATA, data: r }),
533
533
  onSuccess: () => {
@@ -592,7 +592,7 @@ const Kc = vt({}), ki = () => Ue(Kc), Wc = () => {
592
592
  data: { draft: !0 }
593
593
  })
594
594
  });
595
- }, _i = (e) => {
595
+ }, Pi = (e) => {
596
596
  const { fallbackLang: t } = Ge(), { data: n } = Et(), { data: r, isFetching: a } = ut(), i = H(() => {
597
597
  const o = { [t]: !0 };
598
598
  return Ql(K(n, "languages"), (l) => {
@@ -602,7 +602,7 @@ const Kc = vt({}), ki = () => Ue(Kc), Wc = () => {
602
602
  }, [t, r, n]);
603
603
  return a || le(e) || e && i[e];
604
604
  }, Zr = () => {
605
- const e = _e(), { data: t } = Oe({
605
+ const e = Pe(), { data: t } = Oe({
606
606
  queryKey: [O.AI_CONTEXT],
607
607
  initialData: "",
608
608
  queryFn: () => "",
@@ -616,8 +616,8 @@ const Kc = vt({}), ki = () => Ue(Kc), Wc = () => {
616
616
  ), aiContext: t };
617
617
  }, Qc = vt(
618
618
  null
619
- ), Pi = () => Ue(Qc), ea = () => {
620
- const [e] = Pi();
619
+ ), _i = () => Ue(Qc), ea = () => {
620
+ const [e] = _i();
621
621
  return (e == null ? void 0 : e.slug) || "";
622
622
  };
623
623
  function Jc(e, t) {
@@ -639,11 +639,11 @@ const Yc = ({ query: e, uuid: t }) => {
639
639
  }), u = H(() => n === "" ? d.filter((m) => m.lang === "" || m.lang === r) : d.filter((m) => m.lang === n), [n, r, d]);
640
640
  return { allLangPages: d, data: u, isFetching: h };
641
641
  }, Ii = () => {
642
- const { selectedLang: e, fallbackLang: t } = Ge(), [n, r] = Pi(), [a, i] = E(""), o = Jc(a, 500), { allLangPages: l, data: d, isFetching: h } = Yc({ query: o }), u = de((p) => r(p), [r]), m = de((p) => i(p), [i]), v = de(() => {
642
+ const { selectedLang: e, fallbackLang: t } = Ge(), [n, r] = _i(), [a, i] = E(""), o = Jc(a, 500), { allLangPages: l, data: d, isFetching: h } = Yc({ query: o }), u = de((p) => r(p), [r]), m = de((p) => i(p), [i]), v = de(() => {
643
643
  if (!n) return;
644
644
  const p = !(n != null && n.primaryPage), y = e.length === 0, g = p ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, b = l.filter(
645
- (w) => (w == null ? void 0 : w.primaryPage) === g || w.id === g
646
- ).find((w) => y ? w.lang === e || w.lang === t : w.lang === e);
645
+ (N) => (N == null ? void 0 : N.primaryPage) === g || N.id === g
646
+ ).find((N) => y ? N.lang === e || N.lang === t : N.lang === e);
647
647
  r(b || n);
648
648
  }, [n, e, l, r, t]);
649
649
  return {
@@ -826,7 +826,7 @@ const Dt = (e) => {
826
826
  if (n != null && n.id && e && !d && (a != null && a.appKey) && !p.current) {
827
827
  p.current = !0;
828
828
  const y = async (x, b) => {
829
- var w, _;
829
+ var N, k;
830
830
  switch (x) {
831
831
  /**
832
832
  * When user joins
@@ -855,8 +855,8 @@ const Dt = (e) => {
855
855
  * - User will be owner of this page
856
856
  */
857
857
  case "USER_JOINED":
858
- if (((w = v == null ? void 0 : v.current) == null ? void 0 : w.status) === "editing") return;
859
- ((_ = v == null ? void 0 : v.current) == null ? void 0 : _.status) === "locked" && l("can_edit_now"), o({
858
+ if (((N = v == null ? void 0 : v.current) == null ? void 0 : N.status) === "editing") return;
859
+ ((k = v == null ? void 0 : v.current) == null ? void 0 : k.status) === "locked" && l("can_edit_now"), o({
860
860
  ...v == null ? void 0 : v.current,
861
861
  requestedBy: "",
862
862
  status: "editing",
@@ -1156,13 +1156,13 @@ const ws = ({
1156
1156
  }
1157
1157
  ),
1158
1158
  !o && /* @__PURE__ */ c(S, { variant: "outline", onClick: h, children: [
1159
- /* @__PURE__ */ s(wn, { className: "h-5 w-5" }),
1159
+ /* @__PURE__ */ s(En, { className: "h-5 w-5" }),
1160
1160
  " Reject"
1161
1161
  ] })
1162
1162
  ] })
1163
1163
  ] }) });
1164
1164
  }, cd = () => {
1165
- const { pageLock: e, requestTakeOver: t } = Oi(), { isLocked: n, currentEditor: r, lockingStatus: a, setLockingStatus: i, realtimePageLockEnabled: o } = St(), { data: l, isFetching: d } = Dt(r), [h] = He(), u = h.get("page"), { mutate: m } = Ti(), { isFetching: v } = Ri(), [p] = tr(), y = _e(), g = de(() => {
1165
+ const { pageLock: e, requestTakeOver: t } = Oi(), { isLocked: n, currentEditor: r, lockingStatus: a, setLockingStatus: i, realtimePageLockEnabled: o } = St(), { data: l, isFetching: d } = Dt(r), [h] = He(), u = h.get("page"), { mutate: m } = Ti(), { isFetching: v } = Ri(), [p] = tr(), y = Pe(), g = de(() => {
1166
1166
  o ? t() : m({ id: u });
1167
1167
  }, [u, m, t, o]);
1168
1168
  return u ? o && (e == null ? void 0 : e.status) === "checking" ? /* @__PURE__ */ s(ws, { isChecking: !0, lockingStatus: "", onContinue: () => {
@@ -1191,7 +1191,7 @@ const ws = ({
1191
1191
  }
1192
1192
  ) : null;
1193
1193
  }, dd = () => {
1194
- const [e, t] = He(), n = e.get("lang"), r = _i(n), { setSelectedLang: a } = Ge(), i = () => {
1194
+ const [e, t] = He(), n = e.get("lang"), r = Pi(n), { setSelectedLang: a } = Ge(), i = () => {
1195
1195
  const l = new URLSearchParams(window.location.search);
1196
1196
  l.delete("lang");
1197
1197
  const d = l.toString(), h = `${window.location.pathname}${d ? `?${d}` : ""}`;
@@ -1277,8 +1277,8 @@ const ws = ({
1277
1277
  const [o, l] = E(!1), d = Ja(), h = md(() => {
1278
1278
  d([e], { _libBlockId: void 0 }), V.success("Block deleted successfully"), l(!1), r();
1279
1279
  });
1280
- return /* @__PURE__ */ c(vn, { open: n, onOpenChange: (v) => !v && r(), children: [
1281
- /* @__PURE__ */ s(bn, { asChild: !0, children: i || /* @__PURE__ */ c(
1280
+ return /* @__PURE__ */ c(bn, { open: n, onOpenChange: (v) => !v && r(), children: [
1281
+ /* @__PURE__ */ s(xn, { asChild: !0, children: i || /* @__PURE__ */ c(
1282
1282
  S,
1283
1283
  {
1284
1284
  type: "button",
@@ -1293,7 +1293,7 @@ const ws = ({
1293
1293
  }
1294
1294
  ) }),
1295
1295
  /* @__PURE__ */ s(
1296
- xn,
1296
+ Nn,
1297
1297
  {
1298
1298
  className: "w-72 p-4 z-[9999]",
1299
1299
  sideOffset: 5,
@@ -1376,7 +1376,7 @@ const ws = ({
1376
1376
  }
1377
1377
  );
1378
1378
  }, pd = () => {
1379
- const e = ie(), t = Y(), n = _e(), {
1379
+ const e = ie(), t = Y(), n = Pe(), {
1380
1380
  data: r = [],
1381
1381
  isLoading: a,
1382
1382
  error: i
@@ -1523,7 +1523,7 @@ const ws = ({
1523
1523
  )
1524
1524
  ] });
1525
1525
  }, va = 3 * 1024 * 1024, vd = 10 * 1024 * 1024;
1526
- function Pr(e) {
1526
+ function _r(e) {
1527
1527
  const t = isNaN(e) ? 0 : typeof e == "number" ? e : parseInt(e);
1528
1528
  return t ? t < 1024 ? `${t.toFixed(2)} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(2)} KB` : `${(t / (1024 * 1024)).toFixed(2)} MB` : "0 B";
1529
1529
  }
@@ -1547,7 +1547,7 @@ function Mi(e) {
1547
1547
  },
1548
1548
  error(r) {
1549
1549
  V.error(
1550
- `Failed to compress image. Image size is ${Pr(e.size)}, which exceeds the maximum allowed size of ${Pr(vd)}.`
1550
+ `Failed to compress image. Image size is ${_r(e.size)}, which exceeds the maximum allowed size of ${_r(vd)}.`
1551
1551
  ), n(r);
1552
1552
  }
1553
1553
  });
@@ -1590,7 +1590,7 @@ const bd = ({ value: e, onChange: t }) => {
1590
1590
  ] }) }),
1591
1591
  e && /* @__PURE__ */ s(S, { type: "button", variant: "outline", size: "icon", onClick: () => {
1592
1592
  t(""), a.current && (a.current.value = "");
1593
- }, children: /* @__PURE__ */ s(wn, { className: "h-4 w-4" }) })
1593
+ }, children: /* @__PURE__ */ s(En, { className: "h-4 w-4" }) })
1594
1594
  ] }),
1595
1595
  e && /* @__PURE__ */ s("div", { className: "aspect-video h-[200px] max-h-[200px] overflow-hidden rounded-md border", children: /* @__PURE__ */ s("img", { src: e, alt: "Preview", className: "h-full w-full object-contain" }) })
1596
1596
  ] });
@@ -1643,7 +1643,7 @@ const bd = ({ value: e, onChange: t }) => {
1643
1643
  } else
1644
1644
  C.push(U);
1645
1645
  return C;
1646
- }, [t, a]), [u, m] = E(""), [v, p] = E(""), [y, g] = E(""), [x, b] = E(""), [w, _] = E({}), [I, L] = E(!1), [A, j] = E(l), [Z, $] = E(!1), { hasPermission: P } = cs(), R = P(Ce.DELETE_LIBRARY_BLOCK), q = Ja(), D = () => {
1646
+ }, [t, a]), [u, m] = E(""), [v, p] = E(""), [y, g] = E(""), [x, b] = E(""), [N, k] = E({}), [I, L] = E(!1), [A, j] = E(l), [Z, $] = E(!1), { hasPermission: _ } = cs(), R = _(Ce.DELETE_LIBRARY_BLOCK), q = Ja(), D = () => {
1647
1647
  q([r], { _libBlockId: void 0 }), V.success("Block delinked from library"), n();
1648
1648
  }, {
1649
1649
  data: te,
@@ -1660,12 +1660,12 @@ const bd = ({ value: e, onChange: t }) => {
1660
1660
  }, [u, v]);
1661
1661
  const Ae = () => {
1662
1662
  const C = {};
1663
- return u.trim() ? u.length < 2 && (C.name = "Name must be at least 2 characters") : C.name = "Name is required", v || (C.group = "Group is required"), _(C), Object.keys(C).length === 0;
1664
- }, { resetLibrary: Pe } = xo({ id: "" }), he = ud(
1663
+ return u.trim() ? u.length < 2 && (C.name = "Name must be at least 2 characters") : C.name = "Name is required", v || (C.group = "Group is required"), k(C), Object.keys(C).length === 0;
1664
+ }, { resetLibrary: _e } = xo({ id: "" }), he = ud(
1665
1665
  (C) => {
1666
- l || q([r], { _libBlockId: C.id }), V.success(`Block ${l ? "updated" : "saved"} successfully`), Pe(C.library), n();
1666
+ l || q([r], { _libBlockId: C.id }), V.success(`Block ${l ? "updated" : "saved"} successfully`), _e(C.library), n();
1667
1667
  }
1668
- ), N = async (C) => {
1668
+ ), w = async (C) => {
1669
1669
  if (C.preventDefault(), !Ae()) return;
1670
1670
  const U = h.map((F) => (Ie(F, "_libBlockId") && delete F._libBlockId, F));
1671
1671
  he.mutate({
@@ -1694,13 +1694,13 @@ const bd = ({ value: e, onChange: t }) => {
1694
1694
  /* @__PURE__ */ s("p", { className: "text-xs mt-1", children: "This block contains one or more Partial Blocks. Partial blocks will be merged into the library block" })
1695
1695
  ] })
1696
1696
  ] }),
1697
- /* @__PURE__ */ c("form", { onSubmit: N, className: "space-y-4", children: [
1697
+ /* @__PURE__ */ c("form", { onSubmit: w, className: "space-y-4", children: [
1698
1698
  /* @__PURE__ */ c("div", { className: "space-y-2", children: [
1699
1699
  /* @__PURE__ */ s(
1700
1700
  ce,
1701
1701
  {
1702
1702
  htmlFor: "name",
1703
- className: w.name ? "text-destructive" : "",
1703
+ className: N.name ? "text-destructive" : "",
1704
1704
  children: "Name"
1705
1705
  }
1706
1706
  ),
@@ -1711,22 +1711,22 @@ const bd = ({ value: e, onChange: t }) => {
1711
1711
  placeholder: "Enter block name",
1712
1712
  value: u,
1713
1713
  onChange: (C) => m(C.target.value),
1714
- className: w.name ? "border-destructive" : ""
1714
+ className: N.name ? "border-destructive" : ""
1715
1715
  }
1716
1716
  ),
1717
- w.name && /* @__PURE__ */ s("p", { className: "text-xs text-destructive", children: w.name })
1717
+ N.name && /* @__PURE__ */ s("p", { className: "text-xs text-destructive", children: N.name })
1718
1718
  ] }),
1719
1719
  /* @__PURE__ */ c("div", { className: "space-y-2", children: [
1720
1720
  /* @__PURE__ */ s(
1721
1721
  ce,
1722
1722
  {
1723
1723
  htmlFor: "group",
1724
- className: w.group ? "text-destructive" : "",
1724
+ className: N.group ? "text-destructive" : "",
1725
1725
  children: "Group"
1726
1726
  }
1727
1727
  ),
1728
1728
  /* @__PURE__ */ s(yd, { value: v, onChange: p }),
1729
- w.group && /* @__PURE__ */ s("p", { className: "text-xs text-destructive", children: w.group })
1729
+ N.group && /* @__PURE__ */ s("p", { className: "text-xs text-destructive", children: N.group })
1730
1730
  ] }),
1731
1731
  /* @__PURE__ */ c("div", { className: "space-y-2", children: [
1732
1732
  /* @__PURE__ */ s(ce, { htmlFor: "description", children: "Description (optional)" }),
@@ -1849,7 +1849,7 @@ const bd = ({ value: e, onChange: t }) => {
1849
1849
  }
1850
1850
  });
1851
1851
  }, Fi = () => {
1852
- const e = ie(), t = _e(), n = Y(), { data: r } = Ke();
1852
+ const e = ie(), t = Pe(), n = Y(), { data: r } = Ke();
1853
1853
  return ke({
1854
1854
  mutationFn: async (a) => await n(e, {
1855
1855
  action: O.CREATE_PAGE,
@@ -1875,7 +1875,7 @@ const bd = ({ value: e, onChange: t }) => {
1875
1875
  }
1876
1876
  });
1877
1877
  }, na = () => {
1878
- const e = ie(), t = _e(), n = Y(), { data: r } = Lt(), { data: a } = Ke();
1878
+ const e = ie(), t = Pe(), n = Y(), { data: r } = Lt(), { data: a } = Ke();
1879
1879
  return ke({
1880
1880
  mutationFn: async (i) => await n(e, {
1881
1881
  action: O.UPDATE_PAGE,
@@ -1900,7 +1900,7 @@ const bd = ({ value: e, onChange: t }) => {
1900
1900
  }
1901
1901
  });
1902
1902
  }, Ed = () => {
1903
- const e = ie(), t = _e(), n = Y(), { data: r } = Ke();
1903
+ const e = ie(), t = Pe(), n = Y(), { data: r } = Ke();
1904
1904
  return ke({
1905
1905
  mutationFn: async (a) => n(e, {
1906
1906
  action: O.DELETE_PAGE,
@@ -1929,7 +1929,7 @@ const bd = ({ value: e, onChange: t }) => {
1929
1929
  }
1930
1930
  });
1931
1931
  }, Sd = () => {
1932
- const e = ie(), t = _e(), n = Y(), { data: r } = Ke();
1932
+ const e = ie(), t = Pe(), n = Y(), { data: r } = Ke();
1933
1933
  return ke({
1934
1934
  mutationFn: async (a) => n(e, {
1935
1935
  action: O.TAKE_OFFLINE,
@@ -1954,7 +1954,7 @@ const bd = ({ value: e, onChange: t }) => {
1954
1954
  }
1955
1955
  });
1956
1956
  }, sa = () => {
1957
- const e = ie(), t = Y(), n = _e(), { data: r } = Ve(), { savePageAsync: a } = Nt();
1957
+ const e = ie(), t = Y(), n = Pe(), { data: r } = Ve(), { savePageAsync: a } = Nt();
1958
1958
  return ke({
1959
1959
  mutationFn: async ({ ids: i }) => (await a(), t(e, {
1960
1960
  action: O.PUBLISH_CHANGES,
@@ -1974,7 +1974,7 @@ const bd = ({ value: e, onChange: t }) => {
1974
1974
  }
1975
1975
  });
1976
1976
  }, Ad = () => {
1977
- const e = ie(), t = Y(), n = _e();
1977
+ const e = ie(), t = Y(), n = Pe();
1978
1978
  return ke({
1979
1979
  mutationFn: async (r) => {
1980
1980
  var a;
@@ -1999,7 +1999,7 @@ const bd = ({ value: e, onChange: t }) => {
1999
1999
  }
2000
2000
  });
2001
2001
  }, Td = () => {
2002
- const e = ie(), t = Y(), n = _e();
2002
+ const e = ie(), t = Y(), n = Pe();
2003
2003
  return ke({
2004
2004
  mutationFn: async (r) => t(e, {
2005
2005
  action: O.UNMARK_AS_TEMPLATE,
@@ -2015,7 +2015,7 @@ const bd = ({ value: e, onChange: t }) => {
2015
2015
  }
2016
2016
  });
2017
2017
  }, Cd = () => {
2018
- const e = ie(), t = Y(), n = _e();
2018
+ const e = ie(), t = Y(), n = Pe();
2019
2019
  return ke({
2020
2020
  mutationFn: async ({ id: r, slug: a }) => t(e, {
2021
2021
  action: O.CHANGE_SLUG,
@@ -2038,9 +2038,9 @@ var ra = {};
2038
2038
  var i = !!(t.Worker && t.Blob && t.Promise && t.OffscreenCanvas && t.OffscreenCanvasRenderingContext2D && t.HTMLCanvasElement && t.HTMLCanvasElement.prototype.transferControlToOffscreen && t.URL && t.URL.createObjectURL), o = typeof Path2D == "function" && typeof DOMMatrix == "function", l = function() {
2039
2039
  if (!t.OffscreenCanvas)
2040
2040
  return !1;
2041
- var N = new OffscreenCanvas(1, 1), f = N.getContext("2d");
2041
+ var w = new OffscreenCanvas(1, 1), f = w.getContext("2d");
2042
2042
  f.fillRect(0, 0, 1, 1);
2043
- var C = N.transferToImageBitmap();
2043
+ var C = w.transferToImageBitmap();
2044
2044
  try {
2045
2045
  f.createPattern(C, "no-repeat");
2046
2046
  } catch {
@@ -2050,14 +2050,14 @@ var ra = {};
2050
2050
  }();
2051
2051
  function d() {
2052
2052
  }
2053
- function h(N) {
2053
+ function h(w) {
2054
2054
  var f = n.exports.Promise, C = f !== void 0 ? f : t.Promise;
2055
- return typeof C == "function" ? new C(N) : (N(d, d), null);
2055
+ return typeof C == "function" ? new C(w) : (w(d, d), null);
2056
2056
  }
2057
- var u = /* @__PURE__ */ function(N, f) {
2057
+ var u = /* @__PURE__ */ function(w, f) {
2058
2058
  return {
2059
2059
  transform: function(C) {
2060
- if (N)
2060
+ if (w)
2061
2061
  return C;
2062
2062
  if (f.has(C))
2063
2063
  return f.get(C);
@@ -2069,21 +2069,21 @@ var ra = {};
2069
2069
  }
2070
2070
  };
2071
2071
  }(l, /* @__PURE__ */ new Map()), m = function() {
2072
- var N = Math.floor(16.666666666666668), f, C, U = {}, F = 0;
2072
+ var w = Math.floor(16.666666666666668), f, C, U = {}, F = 0;
2073
2073
  return typeof requestAnimationFrame == "function" && typeof cancelAnimationFrame == "function" ? (f = function(G) {
2074
2074
  var M = Math.random();
2075
2075
  return U[M] = requestAnimationFrame(function B(Q) {
2076
- F === Q || F + N - 1 < Q ? (F = Q, delete U[M], G()) : U[M] = requestAnimationFrame(B);
2076
+ F === Q || F + w - 1 < Q ? (F = Q, delete U[M], G()) : U[M] = requestAnimationFrame(B);
2077
2077
  }), M;
2078
2078
  }, C = function(G) {
2079
2079
  U[G] && cancelAnimationFrame(U[G]);
2080
2080
  }) : (f = function(G) {
2081
- return setTimeout(G, N);
2081
+ return setTimeout(G, w);
2082
2082
  }, C = function(G) {
2083
2083
  return clearTimeout(G);
2084
2084
  }), { frame: f, cancel: C };
2085
2085
  }(), v = /* @__PURE__ */ function() {
2086
- var N, f, C = {};
2086
+ var w, f, C = {};
2087
2087
  function U(F) {
2088
2088
  function G(M, B) {
2089
2089
  F.postMessage({ options: M || {}, callback: B });
@@ -2108,8 +2108,8 @@ var ra = {};
2108
2108
  };
2109
2109
  }
2110
2110
  return function() {
2111
- if (N)
2112
- return N;
2111
+ if (w)
2112
+ return w;
2113
2113
  if (!r && i) {
2114
2114
  var F = [
2115
2115
  "var CONFETTI, SIZE = {}, module = {};",
@@ -2135,13 +2135,13 @@ var ra = {};
2135
2135
  ].join(`
2136
2136
  `);
2137
2137
  try {
2138
- N = new Worker(URL.createObjectURL(new Blob([F])));
2138
+ w = new Worker(URL.createObjectURL(new Blob([F])));
2139
2139
  } catch (G) {
2140
2140
  return typeof console !== void 0 && typeof console.warn == "function" && console.warn("🎊 Could not load worker", G), null;
2141
2141
  }
2142
- U(N);
2142
+ U(w);
2143
2143
  }
2144
- return N;
2144
+ return w;
2145
2145
  };
2146
2146
  }(), p = {
2147
2147
  particleCount: 50,
@@ -2169,88 +2169,88 @@ var ra = {};
2169
2169
  disableForReducedMotion: !1,
2170
2170
  scalar: 1
2171
2171
  };
2172
- function y(N, f) {
2173
- return f ? f(N) : N;
2172
+ function y(w, f) {
2173
+ return f ? f(w) : w;
2174
2174
  }
2175
- function g(N) {
2176
- return N != null;
2175
+ function g(w) {
2176
+ return w != null;
2177
2177
  }
2178
- function x(N, f, C) {
2178
+ function x(w, f, C) {
2179
2179
  return y(
2180
- N && g(N[f]) ? N[f] : p[f],
2180
+ w && g(w[f]) ? w[f] : p[f],
2181
2181
  C
2182
2182
  );
2183
2183
  }
2184
- function b(N) {
2185
- return N < 0 ? 0 : Math.floor(N);
2184
+ function b(w) {
2185
+ return w < 0 ? 0 : Math.floor(w);
2186
2186
  }
2187
- function w(N, f) {
2188
- return Math.floor(Math.random() * (f - N)) + N;
2187
+ function N(w, f) {
2188
+ return Math.floor(Math.random() * (f - w)) + w;
2189
2189
  }
2190
- function _(N) {
2191
- return parseInt(N, 16);
2190
+ function k(w) {
2191
+ return parseInt(w, 16);
2192
2192
  }
2193
- function I(N) {
2194
- return N.map(L);
2193
+ function I(w) {
2194
+ return w.map(L);
2195
2195
  }
2196
- function L(N) {
2197
- var f = String(N).replace(/[^0-9a-f]/gi, "");
2196
+ function L(w) {
2197
+ var f = String(w).replace(/[^0-9a-f]/gi, "");
2198
2198
  return f.length < 6 && (f = f[0] + f[0] + f[1] + f[1] + f[2] + f[2]), {
2199
- r: _(f.substring(0, 2)),
2200
- g: _(f.substring(2, 4)),
2201
- b: _(f.substring(4, 6))
2199
+ r: k(f.substring(0, 2)),
2200
+ g: k(f.substring(2, 4)),
2201
+ b: k(f.substring(4, 6))
2202
2202
  };
2203
2203
  }
2204
- function A(N) {
2205
- var f = x(N, "origin", Object);
2204
+ function A(w) {
2205
+ var f = x(w, "origin", Object);
2206
2206
  return f.x = x(f, "x", Number), f.y = x(f, "y", Number), f;
2207
2207
  }
2208
- function j(N) {
2209
- N.width = document.documentElement.clientWidth, N.height = document.documentElement.clientHeight;
2208
+ function j(w) {
2209
+ w.width = document.documentElement.clientWidth, w.height = document.documentElement.clientHeight;
2210
2210
  }
2211
- function Z(N) {
2212
- var f = N.getBoundingClientRect();
2213
- N.width = f.width, N.height = f.height;
2211
+ function Z(w) {
2212
+ var f = w.getBoundingClientRect();
2213
+ w.width = f.width, w.height = f.height;
2214
2214
  }
2215
- function $(N) {
2215
+ function $(w) {
2216
2216
  var f = document.createElement("canvas");
2217
- return f.style.position = "fixed", f.style.top = "0px", f.style.left = "0px", f.style.pointerEvents = "none", f.style.zIndex = N, f;
2217
+ return f.style.position = "fixed", f.style.top = "0px", f.style.left = "0px", f.style.pointerEvents = "none", f.style.zIndex = w, f;
2218
2218
  }
2219
- function P(N, f, C, U, F, G, M, B, Q) {
2220
- N.save(), N.translate(f, C), N.rotate(G), N.scale(U, F), N.arc(0, 0, 1, M, B, Q), N.restore();
2219
+ function _(w, f, C, U, F, G, M, B, Q) {
2220
+ w.save(), w.translate(f, C), w.rotate(G), w.scale(U, F), w.arc(0, 0, 1, M, B, Q), w.restore();
2221
2221
  }
2222
- function R(N) {
2223
- var f = N.angle * (Math.PI / 180), C = N.spread * (Math.PI / 180);
2222
+ function R(w) {
2223
+ var f = w.angle * (Math.PI / 180), C = w.spread * (Math.PI / 180);
2224
2224
  return {
2225
- x: N.x,
2226
- y: N.y,
2225
+ x: w.x,
2226
+ y: w.y,
2227
2227
  wobble: Math.random() * 10,
2228
2228
  wobbleSpeed: Math.min(0.11, Math.random() * 0.1 + 0.05),
2229
- velocity: N.startVelocity * 0.5 + Math.random() * N.startVelocity,
2229
+ velocity: w.startVelocity * 0.5 + Math.random() * w.startVelocity,
2230
2230
  angle2D: -f + (0.5 * C - Math.random() * C),
2231
2231
  tiltAngle: (Math.random() * (0.75 - 0.25) + 0.25) * Math.PI,
2232
- color: N.color,
2233
- shape: N.shape,
2232
+ color: w.color,
2233
+ shape: w.shape,
2234
2234
  tick: 0,
2235
- totalTicks: N.ticks,
2236
- decay: N.decay,
2237
- drift: N.drift,
2235
+ totalTicks: w.ticks,
2236
+ decay: w.decay,
2237
+ drift: w.drift,
2238
2238
  random: Math.random() + 2,
2239
2239
  tiltSin: 0,
2240
2240
  tiltCos: 0,
2241
2241
  wobbleX: 0,
2242
2242
  wobbleY: 0,
2243
- gravity: N.gravity * 3,
2243
+ gravity: w.gravity * 3,
2244
2244
  ovalScalar: 0.6,
2245
- scalar: N.scalar,
2246
- flat: N.flat
2245
+ scalar: w.scalar,
2246
+ flat: w.flat
2247
2247
  };
2248
2248
  }
2249
- function q(N, f) {
2249
+ function q(w, f) {
2250
2250
  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);
2251
2251
  var C = f.tick++ / f.totalTicks, U = f.x + f.random * f.tiltCos, F = f.y + f.random * f.tiltSin, G = f.wobbleX + f.random * f.tiltCos, M = f.wobbleY + f.random * f.tiltSin;
2252
- if (N.fillStyle = "rgba(" + f.color.r + ", " + f.color.g + ", " + f.color.b + ", " + (1 - C) + ")", N.beginPath(), o && f.shape.type === "path" && typeof f.shape.path == "string" && Array.isArray(f.shape.matrix))
2253
- N.fill(Ae(
2252
+ if (w.fillStyle = "rgba(" + f.color.r + ", " + f.color.g + ", " + f.color.b + ", " + (1 - C) + ")", w.beginPath(), o && f.shape.type === "path" && typeof f.shape.path == "string" && Array.isArray(f.shape.matrix))
2253
+ w.fill(Ae(
2254
2254
  f.shape.path,
2255
2255
  f.shape.matrix,
2256
2256
  f.x,
@@ -2269,29 +2269,29 @@ var ra = {};
2269
2269
  f.y
2270
2270
  ]);
2271
2271
  ye.multiplySelf(new DOMMatrix(f.shape.matrix));
2272
- var Ne = N.createPattern(u.transform(f.shape.bitmap), "no-repeat");
2273
- Ne.setTransform(ye), N.globalAlpha = 1 - C, N.fillStyle = Ne, N.fillRect(
2272
+ var Ne = w.createPattern(u.transform(f.shape.bitmap), "no-repeat");
2273
+ Ne.setTransform(ye), w.globalAlpha = 1 - C, w.fillStyle = Ne, w.fillRect(
2274
2274
  f.x - z / 2,
2275
2275
  f.y - se / 2,
2276
2276
  z,
2277
2277
  se
2278
- ), N.globalAlpha = 1;
2278
+ ), w.globalAlpha = 1;
2279
2279
  } else if (f.shape === "circle")
2280
- N.ellipse ? N.ellipse(f.x, f.y, Math.abs(G - U) * f.ovalScalar, Math.abs(M - F) * f.ovalScalar, Math.PI / 10 * f.wobble, 0, 2 * Math.PI) : P(N, f.x, f.y, Math.abs(G - U) * f.ovalScalar, Math.abs(M - F) * f.ovalScalar, Math.PI / 10 * f.wobble, 0, 2 * Math.PI);
2280
+ w.ellipse ? w.ellipse(f.x, f.y, Math.abs(G - U) * f.ovalScalar, Math.abs(M - F) * f.ovalScalar, Math.PI / 10 * f.wobble, 0, 2 * Math.PI) : _(w, f.x, f.y, Math.abs(G - U) * f.ovalScalar, Math.abs(M - F) * f.ovalScalar, Math.PI / 10 * f.wobble, 0, 2 * Math.PI);
2281
2281
  else if (f.shape === "star")
2282
- for (var k = Math.PI / 2 * 3, ee = 4 * f.scalar, Re = 8 * f.scalar, Xe = f.x, J = f.y, Qe = 5, Ze = Math.PI / Qe; Qe--; )
2283
- Xe = f.x + Math.cos(k) * Re, J = f.y + Math.sin(k) * Re, N.lineTo(Xe, J), k += Ze, Xe = f.x + Math.cos(k) * ee, J = f.y + Math.sin(k) * ee, N.lineTo(Xe, J), k += Ze;
2282
+ for (var P = Math.PI / 2 * 3, ee = 4 * f.scalar, Re = 8 * f.scalar, Xe = f.x, J = f.y, Qe = 5, Ze = Math.PI / Qe; Qe--; )
2283
+ Xe = f.x + Math.cos(P) * Re, J = f.y + Math.sin(P) * Re, w.lineTo(Xe, J), P += Ze, Xe = f.x + Math.cos(P) * ee, J = f.y + Math.sin(P) * ee, w.lineTo(Xe, J), P += Ze;
2284
2284
  else
2285
- N.moveTo(Math.floor(f.x), Math.floor(f.y)), N.lineTo(Math.floor(f.wobbleX), Math.floor(F)), N.lineTo(Math.floor(G), Math.floor(M)), N.lineTo(Math.floor(U), Math.floor(f.wobbleY));
2286
- return N.closePath(), N.fill(), f.tick < f.totalTicks;
2285
+ w.moveTo(Math.floor(f.x), Math.floor(f.y)), w.lineTo(Math.floor(f.wobbleX), Math.floor(F)), w.lineTo(Math.floor(G), Math.floor(M)), w.lineTo(Math.floor(U), Math.floor(f.wobbleY));
2286
+ return w.closePath(), w.fill(), f.tick < f.totalTicks;
2287
2287
  }
2288
- function D(N, f, C, U, F) {
2289
- var G = f.slice(), M = N.getContext("2d"), B, Q, oe = h(function(z) {
2288
+ function D(w, f, C, U, F) {
2289
+ var G = f.slice(), M = w.getContext("2d"), B, Q, oe = h(function(z) {
2290
2290
  function se() {
2291
2291
  B = Q = null, M.clearRect(0, 0, U.width, U.height), u.clear(), F(), z();
2292
2292
  }
2293
2293
  function ye() {
2294
- r && !(U.width === a.width && U.height === a.height) && (U.width = N.width = a.width, U.height = N.height = a.height), !U.width && !U.height && (C(N), U.width = N.width, U.height = N.height), M.clearRect(0, 0, U.width, U.height), G = G.filter(function(Ne) {
2294
+ r && !(U.width === a.width && U.height === a.height) && (U.width = w.width = a.width, U.height = w.height = a.height), !U.width && !U.height && (C(w), U.width = w.width, U.height = w.height), M.clearRect(0, 0, U.width, U.height), G = G.filter(function(Ne) {
2295
2295
  return q(M, Ne);
2296
2296
  }), G.length ? B = m.frame(ye) : se();
2297
2297
  }
@@ -2301,17 +2301,17 @@ var ra = {};
2301
2301
  addFettis: function(z) {
2302
2302
  return G = G.concat(z), oe;
2303
2303
  },
2304
- canvas: N,
2304
+ canvas: w,
2305
2305
  promise: oe,
2306
2306
  reset: function() {
2307
2307
  B && m.cancel(B), Q && Q();
2308
2308
  }
2309
2309
  };
2310
2310
  }
2311
- function te(N, f) {
2312
- var C = !N, U = !!x(f || {}, "resize"), F = !1, G = x(f, "disableForReducedMotion", Boolean), M = i && !!x(f || {}, "useWorker"), B = M ? v() : null, Q = C ? j : Z, oe = N && B ? !!N.__confetti_initialized : !1, z = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, se;
2313
- function ye(k, ee, Re) {
2314
- for (var Xe = x(k, "particleCount", b), J = x(k, "angle", Number), Qe = x(k, "spread", Number), Ze = x(k, "startVelocity", Number), lr = x(k, "decay", Number), or = x(k, "gravity", Number), cr = x(k, "drift", Number), ps = x(k, "colors", I), dr = x(k, "ticks", Number), ys = x(k, "shapes"), ur = x(k, "scalar"), hr = !!x(k, "flat"), _n = A(k), Qt = Xe, Tt = [], vs = N.width * _n.x, bs = N.height * _n.y; Qt--; )
2311
+ function te(w, f) {
2312
+ var C = !w, U = !!x(f || {}, "resize"), F = !1, G = x(f, "disableForReducedMotion", Boolean), M = i && !!x(f || {}, "useWorker"), B = M ? v() : null, Q = C ? j : Z, oe = w && B ? !!w.__confetti_initialized : !1, z = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, se;
2313
+ function ye(P, ee, Re) {
2314
+ for (var Xe = x(P, "particleCount", b), J = x(P, "angle", Number), Qe = x(P, "spread", Number), Ze = x(P, "startVelocity", Number), lr = x(P, "decay", Number), or = x(P, "gravity", Number), cr = x(P, "drift", Number), ps = x(P, "colors", I), dr = x(P, "ticks", Number), ys = x(P, "shapes"), ur = x(P, "scalar"), hr = !!x(P, "flat"), _n = A(P), Jt = Xe, Tt = [], vs = w.width * _n.x, bs = w.height * _n.y; Jt--; )
2315
2315
  Tt.push(
2316
2316
  R({
2317
2317
  x: vs,
@@ -2319,8 +2319,8 @@ var ra = {};
2319
2319
  angle: J,
2320
2320
  spread: Qe,
2321
2321
  startVelocity: Ze,
2322
- color: ps[Qt % ps.length],
2323
- shape: ys[w(0, ys.length)],
2322
+ color: ps[Jt % ps.length],
2323
+ shape: ys[N(0, ys.length)],
2324
2324
  ticks: dr,
2325
2325
  decay: lr,
2326
2326
  gravity: or,
@@ -2329,26 +2329,26 @@ var ra = {};
2329
2329
  flat: hr
2330
2330
  })
2331
2331
  );
2332
- return se ? se.addFettis(Tt) : (se = D(N, Tt, Q, ee, Re), se.promise);
2332
+ return se ? se.addFettis(Tt) : (se = D(w, Tt, Q, ee, Re), se.promise);
2333
2333
  }
2334
- function Ne(k) {
2335
- var ee = G || x(k, "disableForReducedMotion", Boolean), Re = x(k, "zIndex", Number);
2334
+ function Ne(P) {
2335
+ var ee = G || x(P, "disableForReducedMotion", Boolean), Re = x(P, "zIndex", Number);
2336
2336
  if (ee && z)
2337
2337
  return h(function(Ze) {
2338
2338
  Ze();
2339
2339
  });
2340
- C && se ? N = se.canvas : C && !N && (N = $(Re), document.body.appendChild(N)), U && !oe && Q(N);
2340
+ C && se ? w = se.canvas : C && !w && (w = $(Re), document.body.appendChild(w)), U && !oe && Q(w);
2341
2341
  var Xe = {
2342
- width: N.width,
2343
- height: N.height
2342
+ width: w.width,
2343
+ height: w.height
2344
2344
  };
2345
- B && !oe && B.init(N), oe = !0, B && (N.__confetti_initialized = !0);
2345
+ B && !oe && B.init(w), oe = !0, B && (w.__confetti_initialized = !0);
2346
2346
  function J() {
2347
2347
  if (B) {
2348
2348
  var Ze = {
2349
2349
  getBoundingClientRect: function() {
2350
2350
  if (!C)
2351
- return N.getBoundingClientRect();
2351
+ return w.getBoundingClientRect();
2352
2352
  }
2353
2353
  };
2354
2354
  Q(Ze), B.postMessage({
@@ -2362,9 +2362,9 @@ var ra = {};
2362
2362
  Xe.width = Xe.height = null;
2363
2363
  }
2364
2364
  function Qe() {
2365
- se = null, U && (F = !1, t.removeEventListener("resize", J)), C && N && (document.body.contains(N) && document.body.removeChild(N), N = null, oe = !1);
2365
+ se = null, U && (F = !1, t.removeEventListener("resize", J)), C && w && (document.body.contains(w) && document.body.removeChild(w), w = null, oe = !1);
2366
2366
  }
2367
- return U && !F && (F = !0, t.addEventListener("resize", J, !1)), B ? B.fire(k, Xe, Qe) : ye(k, Xe, Qe);
2367
+ return U && !F && (F = !0, t.addEventListener("resize", J, !1)), B ? B.fire(P, Xe, Qe) : ye(P, Xe, Qe);
2368
2368
  }
2369
2369
  return Ne.reset = function() {
2370
2370
  B && B.reset(), se && se.reset();
@@ -2374,8 +2374,8 @@ var ra = {};
2374
2374
  function pe() {
2375
2375
  return W || (W = te(null, { useWorker: !0, resize: !0 })), W;
2376
2376
  }
2377
- function Ae(N, f, C, U, F, G, M) {
2378
- var B = new Path2D(N), Q = new Path2D();
2377
+ function Ae(w, f, C, U, F, G, M) {
2378
+ var B = new Path2D(w), Q = new Path2D();
2379
2379
  Q.addPath(B, new DOMMatrix(f));
2380
2380
  var oe = new Path2D();
2381
2381
  return oe.addPath(Q, new DOMMatrix([
@@ -2387,16 +2387,16 @@ var ra = {};
2387
2387
  U
2388
2388
  ])), oe;
2389
2389
  }
2390
- function Pe(N) {
2390
+ function _e(w) {
2391
2391
  if (!o)
2392
2392
  throw new Error("path confetti are not supported in this browser");
2393
2393
  var f, C;
2394
- typeof N == "string" ? f = N : (f = N.path, C = N.matrix);
2394
+ typeof w == "string" ? f = w : (f = w.path, C = w.matrix);
2395
2395
  var U = new Path2D(f), F = document.createElement("canvas"), G = F.getContext("2d");
2396
2396
  if (!C) {
2397
2397
  for (var M = 1e3, B = M, Q = M, oe = 0, z = 0, se, ye, Ne = 0; Ne < M; Ne += 2)
2398
- for (var k = 0; k < M; k += 2)
2399
- G.isPointInPath(U, Ne, k, "nonzero") && (B = Math.min(B, Ne), Q = Math.min(Q, k), oe = Math.max(oe, Ne), z = Math.max(z, k));
2398
+ for (var P = 0; P < M; P += 2)
2399
+ G.isPointInPath(U, Ne, P, "nonzero") && (B = Math.min(B, Ne), Q = Math.min(Q, P), oe = Math.max(oe, Ne), z = Math.max(z, P));
2400
2400
  se = oe - B, ye = z - Q;
2401
2401
  var ee = 10, Re = Math.min(ee / se, ee / ye);
2402
2402
  C = [
@@ -2414,13 +2414,13 @@ var ra = {};
2414
2414
  matrix: C
2415
2415
  };
2416
2416
  }
2417
- function he(N) {
2417
+ function he(w) {
2418
2418
  var f, C = 1, U = "#000000", F = '"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';
2419
- typeof N == "string" ? f = N : (f = N.text, C = "scalar" in N ? N.scalar : C, F = "fontFamily" in N ? N.fontFamily : F, U = "color" in N ? N.color : U);
2419
+ typeof w == "string" ? f = w : (f = w.text, C = "scalar" in w ? w.scalar : C, F = "fontFamily" in w ? w.fontFamily : F, U = "color" in w ? w.color : U);
2420
2420
  var G = 10 * C, M = "" + G + "px " + F, B = new OffscreenCanvas(G, G), Q = B.getContext("2d");
2421
2421
  Q.font = M;
2422
- var oe = Q.measureText(f), z = Math.ceil(oe.actualBoundingBoxRight + oe.actualBoundingBoxLeft), se = Math.ceil(oe.actualBoundingBoxAscent + oe.actualBoundingBoxDescent), ye = 2, Ne = oe.actualBoundingBoxLeft + ye, k = oe.actualBoundingBoxAscent + ye;
2423
- z += ye + ye, se += ye + ye, B = new OffscreenCanvas(z, se), Q = B.getContext("2d"), Q.font = M, Q.fillStyle = U, Q.fillText(f, Ne, k);
2422
+ var oe = Q.measureText(f), z = Math.ceil(oe.actualBoundingBoxRight + oe.actualBoundingBoxLeft), se = Math.ceil(oe.actualBoundingBoxAscent + oe.actualBoundingBoxDescent), ye = 2, Ne = oe.actualBoundingBoxLeft + ye, P = oe.actualBoundingBoxAscent + ye;
2423
+ z += ye + ye, se += ye + ye, B = new OffscreenCanvas(z, se), Q = B.getContext("2d"), Q.font = M, Q.fillStyle = U, Q.fillText(f, Ne, P);
2424
2424
  var ee = 1 / C;
2425
2425
  return {
2426
2426
  type: "bitmap",
@@ -2433,18 +2433,18 @@ var ra = {};
2433
2433
  return pe().apply(this, arguments);
2434
2434
  }, n.exports.reset = function() {
2435
2435
  pe().reset();
2436
- }, n.exports.create = te, n.exports.shapeFromPath = Pe, n.exports.shapeFromText = he;
2436
+ }, n.exports.create = te, n.exports.shapeFromPath = _e, n.exports.shapeFromText = he;
2437
2437
  })(/* @__PURE__ */ function() {
2438
2438
  return typeof window < "u" ? window : typeof self < "u" ? self : this || {};
2439
2439
  }(), ra, !1);
2440
2440
  const kd = ra.exports;
2441
2441
  ra.exports.create;
2442
- const _d = {
2442
+ const Pd = {
2443
2443
  particleCount: 350,
2444
2444
  spread: 120,
2445
2445
  origin: { y: 0.6 },
2446
2446
  angle: 90
2447
- }, Pd = {
2447
+ }, _d = {
2448
2448
  TOP_RIGHT: {
2449
2449
  angle: 225,
2450
2450
  origin: { x: 0.9, y: 0 }
@@ -2453,10 +2453,10 @@ const _d = {
2453
2453
  angle: 100,
2454
2454
  origin: { x: 0.9, y: 0.9 }
2455
2455
  }
2456
- }, Dn = (e) => {
2457
- let t = Pd[e];
2456
+ }, On = (e) => {
2457
+ let t = _d[e];
2458
2458
  t || (t = {});
2459
- const n = { ..._d, ...t };
2459
+ const n = { ...Pd, ...t };
2460
2460
  kd(n);
2461
2461
  }, Id = () => {
2462
2462
  const [e] = No(), { mutate: t, isPending: n } = sa(), { mutateAsync: r, isPending: a } = Ci();
@@ -2469,7 +2469,7 @@ const _d = {
2469
2469
  { ids: ["THEME"] },
2470
2470
  {
2471
2471
  onSuccess: () => {
2472
- Dn("BOTTOM_RIGHT");
2472
+ On("BOTTOM_RIGHT");
2473
2473
  }
2474
2474
  }
2475
2475
  );
@@ -2500,7 +2500,7 @@ const _d = {
2500
2500
  placeholderData: (a) => a || {}
2501
2501
  });
2502
2502
  };
2503
- function On(e, t, n = !1) {
2503
+ function jt(e, t, n = !1) {
2504
2504
  const r = e.toString() ? `?${e.toString()}` : "/";
2505
2505
  n ? window.history.replaceState(null, "", r) : window.history.pushState({}, "", r), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
2506
2506
  }
@@ -2510,7 +2510,7 @@ const gs = vt(null), Dd = (e) => {
2510
2510
  if (t <= 0) return { base: e, extension: null };
2511
2511
  const n = e.substring(t);
2512
2512
  return { base: e.substring(0, t), extension: n };
2513
- }, Wt = (e) => {
2513
+ }, Ht = (e) => {
2514
2514
  if (!e) return e;
2515
2515
  const { base: t } = Dd(e);
2516
2516
  return t;
@@ -2536,8 +2536,8 @@ function Od(e, t) {
2536
2536
  }
2537
2537
  return { initSlug: r, prefix: a };
2538
2538
  }
2539
- const Rd = (e) => e && Wt(e), ba = (e, t) => {
2540
- const n = Wt(e || "");
2539
+ const Rd = (e) => e && Ht(e), ba = (e, t) => {
2540
+ const n = Ht(e || "");
2541
2541
  return !n || n === "/" ? `/${t}` : `${n}/${t}`;
2542
2542
  };
2543
2543
  function aa({
@@ -2598,7 +2598,7 @@ const qi = ({
2598
2598
  disabled: e || !n.length,
2599
2599
  onChange: (l) => {
2600
2600
  const d = l.target.value;
2601
- a(d), !e && (en(r, o == null ? void 0 : o.name) || r.length === 0) && i(`${o == null ? void 0 : o.name} - ${De[d]}`);
2601
+ a(d), !e && (tn(r, o == null ? void 0 : o.name) || r.length === 0) && i(`${o == null ? void 0 : o.name} - ${De[d]}`);
2602
2602
  },
2603
2603
  className: "col-span-3 flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
2604
2604
  children: [
@@ -2656,7 +2656,7 @@ const qi = ({
2656
2656
  ] })
2657
2657
  ] }),
2658
2658
  /* @__PURE__ */ s(ce, { htmlFor: "slug", children: re.SLUG }),
2659
- e ? /* @__PURE__ */ s(Sn, { variant: "default", className: "p-2 text-xs font-medium italic text-muted-foreground", children: "This page will use dynamic slug as defined in primary page" }) : /* @__PURE__ */ s(
2659
+ e ? /* @__PURE__ */ s(An, { variant: "default", className: "p-2 text-xs font-medium italic text-muted-foreground", children: "This page will use dynamic slug as defined in primary page" }) : /* @__PURE__ */ s(
2660
2660
  aa,
2661
2661
  {
2662
2662
  disabled: !r || !d,
@@ -2692,7 +2692,7 @@ const qi = ({
2692
2692
  l.some(
2693
2693
  (y) => (a ? y.id !== i : !0) && y.parent === (o == null ? void 0 : o.id) && y.lang === n
2694
2694
  ) && /* @__PURE__ */ s("p", { className: "mt-2 text-xs text-red-500", children: "A page for this language already exists." })
2695
- ] }) : n && /* @__PURE__ */ s(Sn, { variant: "destructive", children: /* @__PURE__ */ c("p", { className: "mx-auto w-5/6 text-center", children: [
2695
+ ] }) : n && /* @__PURE__ */ s(An, { variant: "destructive", children: /* @__PURE__ */ c("p", { className: "mx-auto w-5/6 text-center", children: [
2696
2696
  "You need to create the ",
2697
2697
  /* @__PURE__ */ s("span", { className: "font-medium", children: De[n] }),
2698
2698
  " page in the parent to add here."
@@ -2776,8 +2776,8 @@ const qi = ({
2776
2776
  parentSlug: g,
2777
2777
  slug: x,
2778
2778
  setSlug: b,
2779
- isSlugValid: w,
2780
- setIsSlugValid: _,
2779
+ isSlugValid: N,
2780
+ setIsSlugValid: k,
2781
2781
  getSlug: I,
2782
2782
  isPending: L,
2783
2783
  id: A,
@@ -2800,7 +2800,7 @@ const qi = ({
2800
2800
  isHomePage: y,
2801
2801
  useLanguagePrefix: v,
2802
2802
  slug: x,
2803
- isSlugValid: w,
2803
+ isSlugValid: N,
2804
2804
  isPending: L
2805
2805
  }
2806
2806
  ) : /* @__PURE__ */ c("form", { onSubmit: t, children: [
@@ -2840,8 +2840,8 @@ const qi = ({
2840
2840
  parentHasSelectedLanguagePage: h,
2841
2841
  slug: x,
2842
2842
  setSlug: b,
2843
- isSlugValid: w,
2844
- setIsSlugValid: _,
2843
+ isSlugValid: N,
2844
+ setIsSlugValid: k,
2845
2845
  getSlug: I
2846
2846
  }
2847
2847
  )
@@ -2860,7 +2860,7 @@ const qi = ({
2860
2860
  isNonSlugPageType: u,
2861
2861
  isHomePage: y,
2862
2862
  useLanguagePrefix: v,
2863
- isSlugValid: w,
2863
+ isSlugValid: N,
2864
2864
  isPending: L
2865
2865
  }
2866
2866
  )
@@ -2872,28 +2872,28 @@ const qi = ({
2872
2872
  edit: a = !1,
2873
2873
  preselectedLang: i
2874
2874
  }) => {
2875
- const { data: o = [] } = fs(), l = H(() => o.find((z) => z.id === r), [o, r]), [d, h] = E(""), [u, m] = E(""), [v, p] = E(""), [y, g] = E(!0), [x, b] = E(!0), { mutate: w, isPending: _ } = Fi(), { mutate: I, isPending: L } = na(), A = _ || L, { data: j, isFetching: Z } = Et(), $ = Ot(), { data: P, isFetching: R } = ut(r), { data: q = [], isFetching: D } = ut(
2875
+ const { data: o = [] } = fs(), l = H(() => o.find((z) => z.id === r), [o, r]), [d, h] = E(""), [u, m] = E(""), [v, p] = E(""), [y, g] = E(!0), [x, b] = E(!0), { mutate: N, isPending: k } = Fi(), { mutate: I, isPending: L } = na(), A = k || L, { data: j, isFetching: Z } = Et(), $ = Ot(), { data: _, isFetching: R } = ut(r), { data: q = [], isFetching: D } = ut(
2876
2876
  l == null ? void 0 : l.parent
2877
- ), { data: te = [], isFetching: W } = Ke(), { setSelectedLang: pe } = Ge(), [, Ae] = He(), [, Pe] = Vr(), he = Z || R || D || W, N = H(() => Se(j == null ? void 0 : j.languages, (z) => !xe(P, { lang: z })), [j, P]), f = H(
2877
+ ), { data: te = [], isFetching: W } = Ke(), { setSelectedLang: pe } = Ge(), [, Ae] = He(), [, _e] = Vr(), he = Z || R || D || W, w = H(() => Se(j == null ? void 0 : j.languages, (z) => !xe(_, { lang: z })), [j, _]), f = H(
2878
2878
  () => te.find((z) => z.key === (l == null ? void 0 : l.pageType)),
2879
2879
  [te, l == null ? void 0 : l.pageType]
2880
2880
  ), C = !(f != null && f.hasSlug), U = (l == null ? void 0 : l.slug) === "/";
2881
2881
  ae(() => {
2882
2882
  if (!a && l && i && (m(i), h(`${l.name} - ${De[i]}`)), !a || !l) return;
2883
- const z = P == null ? void 0 : P.find((k) => k.id === e);
2883
+ const z = _ == null ? void 0 : _.find((P) => P.id === e);
2884
2884
  if (!z) return;
2885
2885
  h(z.name), m(z.lang);
2886
2886
  const se = z.slug || "", { initSlug: ye, prefix: Ne } = Od(se, l);
2887
2887
  p(ye), b(Ne);
2888
- }, [a, e, P, l, i]), ae(() => {
2888
+ }, [a, e, _, l, i]), ae(() => {
2889
2889
  if (i)
2890
2890
  m(i);
2891
- else if ((N == null ? void 0 : N.length) === 1 && !a) {
2892
- const z = N[0];
2891
+ else if ((w == null ? void 0 : w.length) === 1 && !a) {
2892
+ const z = w[0];
2893
2893
  if (!z || !De[z]) return;
2894
2894
  m(z), (!d || d === (l == null ? void 0 : l.name)) && h(`${l == null ? void 0 : l.name} - ${De[z]}`);
2895
2895
  }
2896
- }, [i, N, a, d, l]);
2896
+ }, [i, w, a, d, l]);
2897
2897
  const { parentSlug: F, isRootPage: G } = H(() => {
2898
2898
  if (U || !u)
2899
2899
  return { parentSlug: void 0, isRootPage: !(l != null && l.parent) };
@@ -2906,7 +2906,7 @@ const qi = ({
2906
2906
  return { parentSlug: z == null ? void 0 : z.slug, isRootPage: !1 };
2907
2907
  }, [l == null ? void 0 : l.parent, q, x, u, U]), M = H(() => G ? !0 : !!(q != null && q.some((z) => (z == null ? void 0 : z.lang) === u)), [u, q, G]), B = () => {
2908
2908
  let z = "";
2909
- return G ? z = `/${x ? [u, v].filter(Boolean).join("/") : v}` : z = `${Wt(F)}/${v}`, z.replace(/\/{2,}/g, "/").replace(/\/$/, "");
2909
+ return G ? z = `/${x ? [u, v].filter(Boolean).join("/") : v}` : z = `${Ht(F)}/${v}`, z.replace(/\/{2,}/g, "/").replace(/\/$/, "");
2910
2910
  }, Q = (z) => {
2911
2911
  const se = new URLSearchParams(window.location.search);
2912
2912
  $ && z === $ ? se.delete("lang") : se.set("lang", z), Ae(se), window.dispatchEvent(new PopStateEvent("popstate"));
@@ -2920,9 +2920,9 @@ const qi = ({
2920
2920
  pageType: l == null ? void 0 : l.pageType,
2921
2921
  ...a && { id: e }
2922
2922
  }, ye = () => {
2923
- !a && u && (pe(u), Q(u)), Pe("outline"), n();
2923
+ !a && u && (pe(u), Q(u)), _e("outline"), n();
2924
2924
  };
2925
- a ? I(se, { onSuccess: ye }) : w(se, { onSuccess: ye });
2925
+ a ? I(se, { onSuccess: ye }) : N(se, { onSuccess: ye });
2926
2926
  };
2927
2927
  return /* @__PURE__ */ s(qe, { open: t, onOpenChange: n, children: /* @__PURE__ */ c($e, { className: "text-slate-600 sm:max-w-[425px]", children: [
2928
2928
  /* @__PURE__ */ c(je, { children: [
@@ -2938,7 +2938,7 @@ const qi = ({
2938
2938
  onSubmit: oe,
2939
2939
  edit: a,
2940
2940
  lang: u,
2941
- languages: N,
2941
+ languages: w,
2942
2942
  name: d,
2943
2943
  setLang: m,
2944
2944
  setName: h,
@@ -3127,7 +3127,7 @@ const qi = ({
3127
3127
  ),
3128
3128
  /* @__PURE__ */ c(Do, { children: [
3129
3129
  /* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white pb-2", children: /* @__PURE__ */ c("div", { className: "relative", children: [
3130
- /* @__PURE__ */ s(Kt, { strokeWidth: 2, className: "absolute left-2 top-2.5 h-3.5 w-3.5 text-gray-400" }),
3130
+ /* @__PURE__ */ s(Wt, { strokeWidth: 2, className: "absolute left-2 top-2.5 h-3.5 w-3.5 text-gray-400" }),
3131
3131
  /* @__PURE__ */ s(
3132
3132
  be,
3133
3133
  {
@@ -3164,7 +3164,7 @@ const qi = ({
3164
3164
  }, Wd = ({ search: e, setSearch: t }) => /* @__PURE__ */ c("div", { className: "relative flex h-9 flex-1 items-center gap-2 rounded-md border px-2.5", children: [
3165
3165
  /* @__PURE__ */ s("label", { htmlFor: "page-search-input", className: "sr-only", children: "Search Pages" }),
3166
3166
  /* @__PURE__ */ s(
3167
- Kt,
3167
+ Wt,
3168
3168
  {
3169
3169
  className: `${e ? "fill-sky-50 text-sky-500" : ""} pointer-events-none h-4 w-4 text-muted-foreground`,
3170
3170
  "aria-hidden": "true"
@@ -3220,7 +3220,7 @@ const qi = ({
3220
3220
  a
3221
3221
  )) });
3222
3222
  }, Na = () => {
3223
- const e = _e();
3223
+ const e = Pe();
3224
3224
  return /* @__PURE__ */ c(tt, { children: [
3225
3225
  /* @__PURE__ */ s(nt, { asChild: !0, children: /* @__PURE__ */ s(
3226
3226
  S,
@@ -3288,7 +3288,7 @@ const qi = ({
3288
3288
  ] }) : /* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-2" })
3289
3289
  ] });
3290
3290
  };
3291
- function jt({
3291
+ function zt({
3292
3292
  children: e,
3293
3293
  content: t,
3294
3294
  side: n = "bottom",
@@ -3312,9 +3312,9 @@ const Wi = ({
3312
3312
  isLanguagePage: d
3313
3313
  }) => {
3314
3314
  const { hasPermission: h } = cs(), { data: u } = Ke(), m = H(() => xe(u, { key: e.pageType }), [u, e.pageType]), v = H(() => !!e.isTemplate, [e.isTemplate]), p = H(() => !!(m != null && m.hasSlug), [m == null ? void 0 : m.hasSlug]);
3315
- return !h(Ce.EDIT_PAGE) && !h(Ce.DELETE_PAGE) && !h(Ce.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ c(An, { children: [
3316
- /* @__PURE__ */ s(Tn, { asChild: !0, onClick: (g) => g.stopPropagation(), children: l }),
3317
- /* @__PURE__ */ c(Cn, { align: "center", className: "text-sm", children: [
3315
+ return !h(Ce.EDIT_PAGE) && !h(Ce.DELETE_PAGE) && !h(Ce.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ c(Tn, { children: [
3316
+ /* @__PURE__ */ s(Cn, { asChild: !0, onClick: (g) => g.stopPropagation(), children: l }),
3317
+ /* @__PURE__ */ c(kn, { align: "center", className: "text-sm", children: [
3318
3318
  h(Ce.ADD_PAGE) && !d && /* @__PURE__ */ c(
3319
3319
  Be,
3320
3320
  {
@@ -3436,11 +3436,11 @@ const Wi = ({
3436
3436
  let g = K(a, e == null ? void 0 : e.id);
3437
3437
  g = K(g, "lang") === i ? g : null;
3438
3438
  const x = i === d || !!g, b = (g == null ? void 0 : g.name) || (e == null ? void 0 : e.name) || "No name";
3439
- let w = (g == null ? void 0 : g.slug) || (e == null ? void 0 : e.slug) || "";
3440
- const _ = w + (e != null && e.dynamic ? `/${m == null ? void 0 : m.dynamicSlug}` : "") + (e != null && e.dynamicSlugCustom ? `${e.dynamicSlugCustom}` : "");
3441
- if (w.startsWith("/") && !o) {
3442
- const L = w.split("/").pop();
3443
- w = w.endsWith(L) && e.dynamic ? "" : `/${L}`;
3439
+ let N = (g == null ? void 0 : g.slug) || (e == null ? void 0 : e.slug) || "";
3440
+ const k = N + (e != null && e.dynamic ? `/${m == null ? void 0 : m.dynamicSlug}` : "") + (e != null && e.dynamicSlugCustom ? `${e.dynamicSlugCustom}` : "");
3441
+ if (N.startsWith("/") && !o) {
3442
+ const L = N.split("/").pop();
3443
+ N = N.endsWith(L) && e.dynamic ? "" : `/${L}`;
3444
3444
  }
3445
3445
  const I = H(() => {
3446
3446
  const L = "flex h-7 min-w-0 flex-1 cursor-pointer select-none items-center gap-x-1.5 rounded px-px text-xs duration-300 border-[1px]", A = `${h ? "border-primary/30 bg-primary/5" : "border-transparent hover:border-gray-200 hover:bg-gray-100"}`;
@@ -3456,16 +3456,16 @@ const Wi = ({
3456
3456
  /* @__PURE__ */ s(Jd, { page: e }),
3457
3457
  !e.isPartialGroup && /* @__PURE__ */ s(Xd, { isOnline: g ? g.online : e.online }),
3458
3458
  /* @__PURE__ */ s(Yd, { page: e, pageType: m }),
3459
- /* @__PURE__ */ s(jt, { content: b, side: "top", showTooltip: b.length > 35, children: /* @__PURE__ */ s("span", { className: "max-w-[40%] truncate font-medium text-black", children: b }) }),
3460
- (w || e.dynamic) && /* @__PURE__ */ s(jt, { content: _, side: "top", showTooltip: !0, children: /* @__PURE__ */ c("span", { className: "max-w-[40%] truncate font-mono text-xs text-muted-foreground", children: [
3461
- w,
3459
+ /* @__PURE__ */ s(zt, { content: b, side: "top", showTooltip: b.length > 35, children: /* @__PURE__ */ s("span", { className: "max-w-[40%] truncate font-medium text-black", children: b }) }),
3460
+ (N || e.dynamic) && /* @__PURE__ */ s(zt, { content: k, side: "top", showTooltip: !0, children: /* @__PURE__ */ c("span", { className: "max-w-[40%] truncate font-mono text-xs text-muted-foreground", children: [
3461
+ N,
3462
3462
  e.dynamic && (m == null ? void 0 : m.dynamicSlug) && /* @__PURE__ */ c("span", { className: "text-xs text-gray-500", children: [
3463
3463
  "/",
3464
3464
  m == null ? void 0 : m.dynamicSlug,
3465
3465
  e.dynamicSlugCustom
3466
3466
  ] })
3467
3467
  ] }) }),
3468
- u && /* @__PURE__ */ s(jt, { content: "Template", side: "top", children: /* @__PURE__ */ s("span", { className: "text-blue-500", children: /* @__PURE__ */ s(rc, { size: 16 }) }) }),
3468
+ u && /* @__PURE__ */ s(zt, { content: "Template", side: "top", children: /* @__PURE__ */ s("span", { className: "text-blue-500", children: /* @__PURE__ */ s(rc, { size: 16 }) }) }),
3469
3469
  !e.isPartialGroup && x && !y ? /* @__PURE__ */ s("div", { className: "duration absolute right-0.5 top-[3px]", children: /* @__PURE__ */ s(
3470
3470
  Wi,
3471
3471
  {
@@ -3565,10 +3565,10 @@ function eu({
3565
3565
  h(L), t(I);
3566
3566
  return;
3567
3567
  }
3568
- const x = y.substring(r.length).replace(/\//g, "").replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-_.]/g, "-").replace(/-+/g, "-").replace(/^-+/, "").toLowerCase(), b = (x.match(/\./g) || []).length, w = b <= 1;
3569
- b > 1 ? o("Invalid slug. Only one dot (.) is allowed in the slug") : o(null), a && a(w);
3570
- const _ = r + x;
3571
- h(_), t(x);
3568
+ const x = y.substring(r.length).replace(/\//g, "").replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-_.]/g, "-").replace(/-+/g, "-").replace(/^-+/, "").toLowerCase(), b = (x.match(/\./g) || []).length, N = b <= 1;
3569
+ b > 1 ? o("Invalid slug. Only one dot (.) is allowed in the slug") : o(null), a && a(N);
3570
+ const k = r + x;
3571
+ h(k), t(x);
3572
3572
  }, m = () => {
3573
3573
  if (l.current) {
3574
3574
  const p = l.current;
@@ -3624,29 +3624,29 @@ function tu({
3624
3624
  }) {
3625
3625
  const [o, l] = E(!1), [d, h] = E(""), u = ds("enable-add-page-dropdown");
3626
3626
  u || (r = "w-full rounded-md border border-gray-300 px-3 py-2");
3627
- const m = H(() => !e || e.length === 0 ? [] : e.filter((w) => !le(w.slug)).filter((w) => w.slug !== "/").sort((w, _) => w.slug.localeCompare(_.slug)), [e]), v = H(() => {
3627
+ const m = H(() => !e || e.length === 0 ? [] : e.filter((N) => !le(N.slug)).filter((N) => N.slug !== "/").sort((N, k) => N.slug.localeCompare(k.slug)), [e]), v = H(() => {
3628
3628
  if (!d.trim()) return m;
3629
3629
  const b = d.toLowerCase();
3630
3630
  return m.filter(
3631
- (w) => w.name.toLowerCase().includes(b) || w.slug.toLowerCase().includes(b)
3631
+ (N) => N.name.toLowerCase().includes(b) || N.slug.toLowerCase().includes(b)
3632
3632
  );
3633
3633
  }, [m, d]), p = (b) => Math.max(0, (b.match(/\//g) || []).length - 1), y = (b) => "    ".repeat(b), g = (b) => {
3634
3634
  if (b === "/") return "/";
3635
- const w = b.split("/").filter(Boolean);
3636
- if (w.length <= 1) {
3637
- const _ = w[0] || "";
3638
- return `/${Wt(_)}`;
3635
+ const N = b.split("/").filter(Boolean);
3636
+ if (N.length <= 1) {
3637
+ const k = N[0] || "";
3638
+ return `/${Ht(k)}`;
3639
3639
  }
3640
- return `/${Wt(w[w.length - 1])}`;
3640
+ return `/${Ht(N[N.length - 1])}`;
3641
3641
  }, x = () => {
3642
3642
  if (!t || t === "none") return "None";
3643
- const b = m.find((w) => w.id === t);
3643
+ const b = m.find((N) => N.id === t);
3644
3644
  return b ? `${b.name} (${g(b.slug)})` : "None";
3645
3645
  };
3646
3646
  return /* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
3647
3647
  /* @__PURE__ */ s(ce, { htmlFor: a, className: "text-sm", children: "Parent" }),
3648
- u ? /* @__PURE__ */ c(vn, { open: o, onOpenChange: l, children: [
3649
- /* @__PURE__ */ s(bn, { asChild: !0, children: /* @__PURE__ */ c(
3648
+ u ? /* @__PURE__ */ c(bn, { open: o, onOpenChange: l, children: [
3649
+ /* @__PURE__ */ s(xn, { asChild: !0, children: /* @__PURE__ */ c(
3650
3650
  S,
3651
3651
  {
3652
3652
  id: a,
@@ -3656,13 +3656,13 @@ function tu({
3656
3656
  "data-testid": "parent-page-selector",
3657
3657
  children: [
3658
3658
  x(),
3659
- /* @__PURE__ */ s(Pt, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
3659
+ /* @__PURE__ */ s(_t, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
3660
3660
  ]
3661
3661
  }
3662
3662
  ) }),
3663
- /* @__PURE__ */ s(xn, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ c(Bn, { shouldFilter: !1, children: [
3663
+ /* @__PURE__ */ s(Nn, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ c(Bn, { shouldFilter: !1, children: [
3664
3664
  /* @__PURE__ */ s("div", { className: "relative border-none py-2", children: /* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */ c("div", { className: "relative", children: [
3665
- /* @__PURE__ */ s(Kt, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
3665
+ /* @__PURE__ */ s(Wt, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
3666
3666
  /* @__PURE__ */ s(
3667
3667
  be,
3668
3668
  {
@@ -3675,7 +3675,7 @@ function tu({
3675
3675
  ] }) }) }),
3676
3676
  /* @__PURE__ */ c(Os, { className: "max-h-[300px] overflow-y-auto", children: [
3677
3677
  /* @__PURE__ */ s(Fn, { children: "No pages found." }),
3678
- /* @__PURE__ */ c(_t, { children: [
3678
+ /* @__PURE__ */ c(Pt, { children: [
3679
3679
  /* @__PURE__ */ c(
3680
3680
  gt,
3681
3681
  {
@@ -3691,12 +3691,12 @@ function tu({
3691
3691
  }
3692
3692
  ),
3693
3693
  v.map((b) => {
3694
- const w = y(p(b.slug)), _ = g(b.slug), I = /* @__PURE__ */ c("span", { className: "flex items-center text-sm", children: [
3695
- w,
3694
+ const N = y(p(b.slug)), k = g(b.slug), I = /* @__PURE__ */ c("span", { className: "flex items-center text-sm", children: [
3695
+ N,
3696
3696
  b.name,
3697
3697
  /* @__PURE__ */ c("span", { className: "text-xs text-gray-500", children: [
3698
3698
  " (",
3699
- _,
3699
+ k,
3700
3700
  ")"
3701
3701
  ] })
3702
3702
  ] });
@@ -3738,9 +3738,9 @@ function tu({
3738
3738
  children: [
3739
3739
  /* @__PURE__ */ s("option", { value: "none", children: "None" }),
3740
3740
  m.map((b) => {
3741
- const w = p(b.slug), _ = w > 0 ? y(w) : "", I = g(b.slug);
3741
+ const N = p(b.slug), k = N > 0 ? y(N) : "", I = g(b.slug);
3742
3742
  return (i == null ? void 0 : i.id) === b.id || b.slug.startsWith(i == null ? void 0 : i.slug) ? null : /* @__PURE__ */ c("option", { value: b.id, children: [
3743
- _,
3743
+ k,
3744
3744
  b.name,
3745
3745
  " (",
3746
3746
  I,
@@ -3776,22 +3776,22 @@ const nu = (...e) => e.filter(Boolean).join(" "), su = ({
3776
3776
  });
3777
3777
  const v = Object.entries(m).reduce(
3778
3778
  (g, [x, b]) => {
3779
- const w = b.filter(
3780
- (_) => _.name.toLowerCase().includes(d.toLowerCase()) || x.toLowerCase().includes(d.toLowerCase())
3779
+ const N = b.filter(
3780
+ (k) => k.name.toLowerCase().includes(d.toLowerCase()) || x.toLowerCase().includes(d.toLowerCase())
3781
3781
  );
3782
- return w.length > 0 && (g[x] = w), g;
3782
+ return N.length > 0 && (g[x] = N), g;
3783
3783
  },
3784
3784
  {}
3785
3785
  ), p = e.find((g) => g.id === t), y = p ? $t(p.name) : "No Template";
3786
3786
  return /* @__PURE__ */ c("div", { className: "space-y-4", children: [
3787
- u ? /* @__PURE__ */ c(vn, { open: o, onOpenChange: l, children: [
3788
- /* @__PURE__ */ s(bn, { asChild: !0, children: /* @__PURE__ */ c(S, { variant: "outline", role: "combobox", className: "w-full justify-between", children: [
3787
+ u ? /* @__PURE__ */ c(bn, { open: o, onOpenChange: l, children: [
3788
+ /* @__PURE__ */ s(xn, { asChild: !0, children: /* @__PURE__ */ c(S, { variant: "outline", role: "combobox", className: "w-full justify-between", children: [
3789
3789
  y,
3790
- /* @__PURE__ */ s(Pt, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
3790
+ /* @__PURE__ */ s(_t, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
3791
3791
  ] }) }),
3792
- /* @__PURE__ */ s(xn, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ c(Bn, { shouldFilter: !1, children: [
3792
+ /* @__PURE__ */ s(Nn, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ c(Bn, { shouldFilter: !1, children: [
3793
3793
  /* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */ c("div", { className: "relative", children: [
3794
- /* @__PURE__ */ s(Kt, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
3794
+ /* @__PURE__ */ s(Wt, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
3795
3795
  /* @__PURE__ */ s(
3796
3796
  be,
3797
3797
  {
@@ -3804,7 +3804,7 @@ const nu = (...e) => e.filter(Boolean).join(" "), su = ({
3804
3804
  ] }) }),
3805
3805
  /* @__PURE__ */ c(Os, { className: "max-h-[300px] overflow-y-auto", children: [
3806
3806
  /* @__PURE__ */ s(Fn, { children: "No templates found." }),
3807
- Object.entries(v).map(([g, x]) => /* @__PURE__ */ s(_t, { heading: g, children: x.map((b) => /* @__PURE__ */ c(
3807
+ Object.entries(v).map(([g, x]) => /* @__PURE__ */ s(Pt, { heading: g, children: x.map((b) => /* @__PURE__ */ c(
3808
3808
  gt,
3809
3809
  {
3810
3810
  value: b.id,
@@ -3888,7 +3888,7 @@ const nu = (...e) => e.filter(Boolean).join(" "), su = ({
3888
3888
  },
3889
3889
  [e]
3890
3890
  );
3891
- }, tn = (e, t) => {
3891
+ }, nn = (e, t) => {
3892
3892
  const n = {
3893
3893
  seo: {
3894
3894
  keyword: "",
@@ -3914,7 +3914,7 @@ const nu = (...e) => e.filter(Boolean).join(" "), su = ({
3914
3914
  if (import.meta.vitest) {
3915
3915
  const { it: e, expect: t } = import.meta.vitest;
3916
3916
  e("should return default values", () => {
3917
- const n = tn(
3917
+ const n = nn(
3918
3918
  {
3919
3919
  defaultSeo: {
3920
3920
  keyword: "",
@@ -3952,19 +3952,19 @@ if (import.meta.vitest) {
3952
3952
  const Rt = (...e) => e.filter(Boolean).join(" ");
3953
3953
  function lu({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel: r }) {
3954
3954
  var vs, bs;
3955
- const a = la(), i = !!(e != null && e.id), { data: o } = fs(), { mutate: l, isPending: d } = Fi(), { mutate: h, isPending: u } = na(), [m, v] = E(null), [p, y] = E(!0), [g, x] = E((e == null ? void 0 : e.pageType) ?? "page"), { hasPermission: b } = cs(), w = b(Ce.CHANGE_PAGE_TYPE), [_, I] = E(!1), [L, A] = E(""), { selectedLang: j, fallbackLang: Z } = Ge(), $ = j || Z, [P, R] = E(""), [q, D] = E(!1), te = H(() => {
3955
+ const a = la(), i = !!(e != null && e.id), { data: o } = fs(), { mutate: l, isPending: d } = Fi(), { mutate: h, isPending: u } = na(), [m, v] = E(null), [p, y] = E(!0), [g, x] = E((e == null ? void 0 : e.pageType) ?? "page"), { hasPermission: b } = cs(), N = b(Ce.CHANGE_PAGE_TYPE), [k, I] = E(!1), [L, A] = E(""), { selectedLang: j, fallbackLang: Z } = Ge(), $ = j || Z, [_, R] = E(""), [q, D] = E(!1), te = H(() => {
3956
3956
  const T = t.find((me) => me.key === g);
3957
3957
  return (T == null ? void 0 : T.hasSlug) === !1;
3958
- }, [g, t]), [W, pe] = E((e == null ? void 0 : e.parent) ?? ""), [Ae, Pe] = E((e == null ? void 0 : e.name) ?? ""), [he, N] = E((e == null ? void 0 : e.dynamic) ?? !1), [f, C] = E(he ? "" : ((e == null ? void 0 : e.slug) ?? "").split("/").pop() || ""), [U, F] = E((e == null ? void 0 : e.dynamicSlugCustom) ?? ""), [G, M] = E(!0), [B, Q] = E(!1), [oe, z] = E(""), { data: se, isLoading: ye } = iu(g), Ne = d || u, k = ds("enable-add-page-dropdown"), ee = H(() => !i || !(e != null && e.id) || !o ? null : o.find((T) => T.id === e.id), [i, e == null ? void 0 : e.id, o]), Re = (ee == null ? void 0 : ee.online) || !1, Xe = H(() => !i || !(e != null && e.id) || !o ? !1 : o.some((T) => T.parent === e.id), [i, e == null ? void 0 : e.id, o]), J = t.find((T) => T.key === g), Qe = (T) => {
3958
+ }, [g, t]), [W, pe] = E((e == null ? void 0 : e.parent) ?? ""), [Ae, _e] = E((e == null ? void 0 : e.name) ?? ""), [he, w] = E((e == null ? void 0 : e.dynamic) ?? !1), [f, C] = E(he ? "" : ((e == null ? void 0 : e.slug) ?? "").split("/").pop() || ""), [U, F] = E((e == null ? void 0 : e.dynamicSlugCustom) ?? ""), [G, M] = E(!0), [B, Q] = E(!1), [oe, z] = E(""), { data: se, isLoading: ye } = iu(g), Ne = d || u, P = ds("enable-add-page-dropdown"), ee = H(() => !i || !(e != null && e.id) || !o ? null : o.find((T) => T.id === e.id), [i, e == null ? void 0 : e.id, o]), Re = (ee == null ? void 0 : ee.online) || !1, Xe = H(() => !i || !(e != null && e.id) || !o ? !1 : o.some((T) => T.parent === e.id), [i, e == null ? void 0 : e.id, o]), J = t.find((T) => T.key === g), Qe = (T) => {
3959
3959
  if (i && g !== T) {
3960
3960
  A(T), I(!0), R(""), D(!1);
3961
3961
  return;
3962
3962
  }
3963
3963
  x(T), R(""), D(!1);
3964
3964
  }, Ze = () => {
3965
- x(L), I(!1), N(!1);
3965
+ x(L), I(!1), w(!1);
3966
3966
  }, lr = (T) => {
3967
- N(T), T ? C("") : F("");
3967
+ w(T), T ? C("") : F("");
3968
3968
  }, or = (T) => {
3969
3969
  if (pe(T), T && T !== "none") {
3970
3970
  const me = o == null ? void 0 : o.find((Je) => Je.id === T), ct = (me == null ? void 0 : me.slug) || "";
@@ -3999,10 +3999,10 @@ function lu({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
3999
3999
  }, ys = (T, me) => {
4000
4000
  if (!T.trim() && !he)
4001
4001
  return v("Child page slug is required"), !1;
4002
- const ct = Wt(me), Je = ba(ct, T);
4002
+ const ct = Ht(me), Je = ba(ct, T);
4003
4003
  return Object.keys(De).some((xs) => Je === `/${xs}` || (Je == null ? void 0 : Je.startsWith(`/${xs}/`))) ? (v("Slugs cannot start with a language code for primary page"), !1) : !0;
4004
4004
  }, ur = (T, me) => {
4005
- const ct = Wt(me), Je = ba(ct, T), at = {
4005
+ const ct = Ht(me), Je = ba(ct, T), at = {
4006
4006
  pageType: g,
4007
4007
  name: Ae,
4008
4008
  slug: Je.replace(/\/$/, ""),
@@ -4028,7 +4028,7 @@ function lu({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
4028
4028
  } else {
4029
4029
  const dt = xe(t, { key: g });
4030
4030
  dt != null && dt.trackingDefault && (at.tracking = dt.trackingDefault);
4031
- const { seo: xs, jsonLD: jl } = tn(dt, $);
4031
+ const { seo: xs, jsonLD: jl } = nn(dt, $);
4032
4032
  pt(at, "seo", xs), pt(at, "jsonLD", jl), l(at, {
4033
4033
  onSuccess: (zl) => {
4034
4034
  n(), a(zl.page.id, r);
@@ -4056,7 +4056,7 @@ function lu({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
4056
4056
  else {
4057
4057
  const me = xe(t, { key: g });
4058
4058
  me != null && me.trackingDefault && (T.tracking = me.trackingDefault);
4059
- const { seo: ct, jsonLD: Je } = tn(me, $);
4059
+ const { seo: ct, jsonLD: Je } = nn(me, $);
4060
4060
  pt(T, "seo", ct), pt(T, "jsonLD", Je), l(T, {
4061
4061
  onSuccess: (at) => {
4062
4062
  var dt;
@@ -4078,49 +4078,49 @@ function lu({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
4078
4078
  } else
4079
4079
  hr();
4080
4080
  }
4081
- }, { pagesType: Qt, partialsType: Tt } = H(() => {
4082
- const T = (me) => P ? me.name.toLowerCase().includes(P.toLowerCase()) || me.key.toLowerCase().includes(P.toLowerCase()) : !0;
4081
+ }, { pagesType: Jt, partialsType: Tt } = H(() => {
4082
+ const T = (me) => _ ? me.name.toLowerCase().includes(_.toLowerCase()) || me.key.toLowerCase().includes(_.toLowerCase()) : !0;
4083
4083
  return {
4084
4084
  pagesType: t.filter((me) => me.hasSlug !== !1 && T(me)),
4085
4085
  partialsType: t.filter((me) => me.hasSlug === !1 && T(me))
4086
4086
  };
4087
- }, [t, P]);
4087
+ }, [t, _]);
4088
4088
  return J != null && J.hasSlug ? /* @__PURE__ */ c("form", { onSubmit: _n, className: "mx-auto w-full max-w-md space-y-4", children: [
4089
4089
  /* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
4090
4090
  /* @__PURE__ */ s(ce, { htmlFor: "pageType", className: "text-sm", children: "Type" }),
4091
- k ? /* @__PURE__ */ c(vn, { open: q, onOpenChange: D, children: [
4092
- /* @__PURE__ */ s(bn, { asChild: !0, children: /* @__PURE__ */ c(
4091
+ P ? /* @__PURE__ */ c(bn, { open: q, onOpenChange: D, children: [
4092
+ /* @__PURE__ */ s(xn, { asChild: !0, children: /* @__PURE__ */ c(
4093
4093
  S,
4094
4094
  {
4095
4095
  variant: "outline",
4096
4096
  role: "combobox",
4097
- disabled: i && !w,
4097
+ disabled: i && !N,
4098
4098
  className: Rt(
4099
4099
  "w-full justify-between",
4100
- i && !w ? "cursor-not-allowed text-gray-500" : ""
4100
+ i && !N ? "cursor-not-allowed text-gray-500" : ""
4101
4101
  ),
4102
4102
  children: [
4103
4103
  (J == null ? void 0 : J.name) || "Select page type",
4104
- /* @__PURE__ */ s(Pt, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
4104
+ /* @__PURE__ */ s(_t, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
4105
4105
  ]
4106
4106
  }
4107
4107
  ) }),
4108
- /* @__PURE__ */ s(xn, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ c(Bn, { shouldFilter: !1, children: [
4108
+ /* @__PURE__ */ s(Nn, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ c(Bn, { shouldFilter: !1, children: [
4109
4109
  /* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */ c("div", { className: "relative", children: [
4110
- /* @__PURE__ */ s(Kt, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
4110
+ /* @__PURE__ */ s(Wt, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
4111
4111
  /* @__PURE__ */ s(
4112
4112
  be,
4113
4113
  {
4114
4114
  placeholder: "Search page types...",
4115
4115
  className: "h-8 pl-8 text-xs",
4116
- value: P,
4116
+ value: _,
4117
4117
  onChange: (T) => R(T.target.value)
4118
4118
  }
4119
4119
  )
4120
4120
  ] }) }),
4121
4121
  /* @__PURE__ */ c(Os, { className: "overflow-y-auto", children: [
4122
4122
  /* @__PURE__ */ s(Fn, { children: "No page type found." }),
4123
- i ? te ? /* @__PURE__ */ s(_t, { heading: "Partials", children: Tt.map((T) => /* @__PURE__ */ c(
4123
+ i ? te ? /* @__PURE__ */ s(Pt, { heading: "Partials", children: Tt.map((T) => /* @__PURE__ */ c(
4124
4124
  gt,
4125
4125
  {
4126
4126
  value: T.key,
@@ -4137,7 +4137,7 @@ function lu({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
4137
4137
  ]
4138
4138
  },
4139
4139
  T.key
4140
- )) }) : /* @__PURE__ */ s(_t, { heading: "Pages", children: Qt.map((T) => /* @__PURE__ */ c(
4140
+ )) }) : /* @__PURE__ */ s(Pt, { heading: "Pages", children: Jt.map((T) => /* @__PURE__ */ c(
4141
4141
  gt,
4142
4142
  {
4143
4143
  value: T.key,
@@ -4155,7 +4155,7 @@ function lu({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
4155
4155
  },
4156
4156
  T.key
4157
4157
  )) }) : /* @__PURE__ */ c(ue, { children: [
4158
- Qt.length > 0 && /* @__PURE__ */ s(_t, { heading: "Pages", children: Qt.map((T) => /* @__PURE__ */ c(
4158
+ Jt.length > 0 && /* @__PURE__ */ s(Pt, { heading: "Pages", children: Jt.map((T) => /* @__PURE__ */ c(
4159
4159
  gt,
4160
4160
  {
4161
4161
  value: T.key,
@@ -4173,7 +4173,7 @@ function lu({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
4173
4173
  },
4174
4174
  T.key
4175
4175
  )) }),
4176
- Tt.length > 0 && /* @__PURE__ */ s(_t, { heading: "Partials", children: Tt.map((T) => /* @__PURE__ */ c(
4176
+ Tt.length > 0 && /* @__PURE__ */ s(Pt, { heading: "Partials", children: Tt.map((T) => /* @__PURE__ */ c(
4177
4177
  gt,
4178
4178
  {
4179
4179
  value: T.key,
@@ -4199,16 +4199,16 @@ function lu({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
4199
4199
  {
4200
4200
  id: "pageType",
4201
4201
  value: g,
4202
- disabled: i && !w,
4202
+ disabled: i && !N,
4203
4203
  onChange: (T) => Qe(T.target.value),
4204
- className: `w-full rounded-md border border-gray-300 px-3 py-2 ${i && !w ? "cursor-not-allowed text-gray-500" : ""}`,
4204
+ className: `w-full rounded-md border border-gray-300 px-3 py-2 ${i && !N ? "cursor-not-allowed text-gray-500" : ""}`,
4205
4205
  children: i ? te ? /* @__PURE__ */ s("optgroup", { label: "Partials", children: t.filter((T) => T.hasSlug === !1).map((T) => /* @__PURE__ */ s("option", { value: T.key, children: T.name }, T.key)) }) : /* @__PURE__ */ s("optgroup", { label: "Pages", children: t.filter((T) => T.hasSlug !== !1).map((T) => /* @__PURE__ */ s("option", { value: T.key, children: T.name }, T.key)) }) : /* @__PURE__ */ c(ue, { children: [
4206
4206
  /* @__PURE__ */ s("optgroup", { label: "Pages", children: t.filter((T) => T.hasSlug !== !1).map((T) => /* @__PURE__ */ s("option", { value: T.key, children: T.name }, T.key)) }),
4207
4207
  /* @__PURE__ */ s("optgroup", { label: "Partials", children: t.filter((T) => T.hasSlug === !1).map((T) => /* @__PURE__ */ s("option", { value: T.key, children: T.name }, T.key)) })
4208
4208
  ] })
4209
4209
  }
4210
4210
  ),
4211
- _ && /* @__PURE__ */ c("div", { className: "mt-2 rounded-md border border-yellow-200 bg-yellow-50 p-3", children: [
4211
+ k && /* @__PURE__ */ c("div", { className: "mt-2 rounded-md border border-yellow-200 bg-yellow-50 p-3", children: [
4212
4212
  /* @__PURE__ */ s("p", { className: "text-sm text-yellow-800", children: "Changing the page type may impact the page data. Are you sure you want to proceed?" }),
4213
4213
  /* @__PURE__ */ c("div", { className: "mt-2 flex gap-2", children: [
4214
4214
  /* @__PURE__ */ s(S, { variant: "outline", size: "sm", onClick: () => I(!1), children: "Cancel" }),
@@ -4244,7 +4244,7 @@ function lu({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
4244
4244
  {
4245
4245
  id: "name",
4246
4246
  value: Ae,
4247
- onChange: (T) => Pe(T.target.value),
4247
+ onChange: (T) => _e(T.target.value),
4248
4248
  required: !0,
4249
4249
  "aria-required": "true",
4250
4250
  placeholder: "Enter page name"
@@ -4321,39 +4321,39 @@ function lu({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
4321
4321
  ] }) : /* @__PURE__ */ c("form", { onSubmit: _n, className: "mx-auto w-full max-w-md space-y-4", children: [
4322
4322
  /* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
4323
4323
  /* @__PURE__ */ s(ce, { htmlFor: "pageType", className: "text-sm", children: "Type" }),
4324
- k ? /* @__PURE__ */ c(vn, { open: q, onOpenChange: D, children: [
4325
- /* @__PURE__ */ s(bn, { asChild: !0, children: /* @__PURE__ */ c(
4324
+ P ? /* @__PURE__ */ c(bn, { open: q, onOpenChange: D, children: [
4325
+ /* @__PURE__ */ s(xn, { asChild: !0, children: /* @__PURE__ */ c(
4326
4326
  S,
4327
4327
  {
4328
4328
  variant: "outline",
4329
4329
  role: "combobox",
4330
- disabled: i && !w,
4330
+ disabled: i && !N,
4331
4331
  className: Rt(
4332
4332
  "w-full justify-between",
4333
- i && !w ? "cursor-not-allowed text-gray-500" : ""
4333
+ i && !N ? "cursor-not-allowed text-gray-500" : ""
4334
4334
  ),
4335
4335
  children: [
4336
4336
  (J == null ? void 0 : J.name) || "Select page type",
4337
- /* @__PURE__ */ s(Pt, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
4337
+ /* @__PURE__ */ s(_t, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
4338
4338
  ]
4339
4339
  }
4340
4340
  ) }),
4341
- /* @__PURE__ */ s(xn, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ c(Bn, { shouldFilter: !1, children: [
4341
+ /* @__PURE__ */ s(Nn, { className: "w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ c(Bn, { shouldFilter: !1, children: [
4342
4342
  /* @__PURE__ */ s("div", { className: "sticky top-0 z-10 bg-white px-3 py-2", children: /* @__PURE__ */ c("div", { className: "relative", children: [
4343
- /* @__PURE__ */ s(Kt, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
4343
+ /* @__PURE__ */ s(Wt, { strokeWidth: 2, className: "absolute left-2 top-2 h-4 w-4 text-gray-400" }),
4344
4344
  /* @__PURE__ */ s(
4345
4345
  be,
4346
4346
  {
4347
4347
  placeholder: "Search page types...",
4348
4348
  className: "h-8 pl-8 text-xs",
4349
- value: P,
4349
+ value: _,
4350
4350
  onChange: (T) => R(T.target.value)
4351
4351
  }
4352
4352
  )
4353
4353
  ] }) }),
4354
4354
  /* @__PURE__ */ c(Os, { className: "max-h-[200px] overflow-y-auto", children: [
4355
4355
  /* @__PURE__ */ s(Fn, { children: "No page type found." }),
4356
- /* @__PURE__ */ s(_t, { heading: "Partials", children: Tt.map((T) => /* @__PURE__ */ c(
4356
+ /* @__PURE__ */ s(Pt, { heading: "Partials", children: Tt.map((T) => /* @__PURE__ */ c(
4357
4357
  gt,
4358
4358
  {
4359
4359
  value: T.key,
@@ -4375,13 +4375,13 @@ function lu({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
4375
4375
  {
4376
4376
  id: "pageType",
4377
4377
  value: g,
4378
- disabled: i && !w,
4378
+ disabled: i && !N,
4379
4379
  onChange: (T) => Qe(T.target.value),
4380
- className: `w-full rounded-md border border-gray-300 px-3 py-2 ${i && !w ? "cursor-not-allowed text-gray-500" : ""}`,
4380
+ className: `w-full rounded-md border border-gray-300 px-3 py-2 ${i && !N ? "cursor-not-allowed text-gray-500" : ""}`,
4381
4381
  children: /* @__PURE__ */ s("optgroup", { label: "Partials", children: t.filter((T) => T.hasSlug === !1).map((T) => /* @__PURE__ */ s("option", { value: T.key, children: T.name }, T.key)) })
4382
4382
  }
4383
4383
  ),
4384
- _ && /* @__PURE__ */ c("div", { className: "mt-2 rounded-md border border-yellow-200 bg-yellow-50 p-3", children: [
4384
+ k && /* @__PURE__ */ c("div", { className: "mt-2 rounded-md border border-yellow-200 bg-yellow-50 p-3", children: [
4385
4385
  /* @__PURE__ */ s("p", { className: "text-sm text-yellow-800", children: "Changing the page type may impact the page data. Are you sure you want to proceed?" }),
4386
4386
  /* @__PURE__ */ c("div", { className: "mt-2 flex gap-2", children: [
4387
4387
  /* @__PURE__ */ s(S, { variant: "outline", size: "sm", onClick: () => I(!1), children: "Cancel" }),
@@ -4392,7 +4392,7 @@ function lu({ addEditPage: e, additionalPageTypes: t = [], close: n, closePanel:
4392
4392
  ] }),
4393
4393
  /* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
4394
4394
  /* @__PURE__ */ s(ce, { htmlFor: "name", className: "text-sm", children: "Name" }),
4395
- /* @__PURE__ */ s(be, { id: "name", value: Ae, onChange: (T) => Pe(T.target.value), required: !0, "aria-required": "true" })
4395
+ /* @__PURE__ */ s(be, { id: "name", value: Ae, onChange: (T) => _e(T.target.value), required: !0, "aria-required": "true" })
4396
4396
  ] }),
4397
4397
  /* @__PURE__ */ s(S, { disabled: Ne, type: "submit", className: "w-full", children: i ? Ne ? "Updating..." : "Update " + (J == null ? void 0 : J.name) : Ne ? "Creating..." : "Create " + (J == null ? void 0 : J.name) })
4398
4398
  ] });
@@ -4467,7 +4467,7 @@ function oa({
4467
4467
  ] }) });
4468
4468
  }
4469
4469
  const ou = () => {
4470
- const e = ie(), t = _e(), n = Y();
4470
+ const e = ie(), t = Pe(), n = Y();
4471
4471
  return ke({
4472
4472
  mutationFn: async ({ pageId: r, name: a, slug: i }) => {
4473
4473
  const o = {
@@ -4508,23 +4508,23 @@ const ou = () => {
4508
4508
  return;
4509
4509
  }
4510
4510
  o(null), g(!0);
4511
- const w = {
4511
+ const N = {
4512
4512
  pageId: e.id,
4513
4513
  name: l
4514
4514
  };
4515
- u || (w.slug = `${p}/${m}`), r(
4516
- w,
4515
+ u || (N.slug = `${p}/${m}`), r(
4516
+ N,
4517
4517
  {
4518
- onSuccess: (_) => {
4519
- g(!1), t(), h(_.id, n);
4518
+ onSuccess: (k) => {
4519
+ g(!1), t(), h(k.id, n);
4520
4520
  },
4521
- onError: (_) => {
4522
- g(!1), _.code === "SLUG_EXISTS" ? o(
4521
+ onError: (k) => {
4522
+ g(!1), k.code === "SLUG_EXISTS" ? o(
4523
4523
  "A page with this slug already exists. Please choose a different slug."
4524
- ) : _.code === "INVALID_SLUG" ? o(
4524
+ ) : k.code === "INVALID_SLUG" ? o(
4525
4525
  "The slug format is invalid. Please use only lowercase letters, numbers, and hyphens."
4526
- ) : _.code === "PERMISSION_DENIED" ? o("You don't have permission to duplicate this page.") : o(
4527
- _.message || "Failed to duplicate page. Please try again later."
4526
+ ) : k.code === "PERMISSION_DENIED" ? o("You don't have permission to duplicate this page.") : o(
4527
+ k.message || "Failed to duplicate page. Please try again later."
4528
4528
  );
4529
4529
  }
4530
4530
  }
@@ -4582,7 +4582,7 @@ const ou = () => {
4582
4582
  }
4583
4583
  )
4584
4584
  ] }),
4585
- i && /* @__PURE__ */ c(Sn, { variant: "destructive", className: "py-2", children: [
4585
+ i && /* @__PURE__ */ c(An, { variant: "destructive", className: "py-2", children: [
4586
4586
  /* @__PURE__ */ s(Ys, { className: "h-4 w-4" }),
4587
4587
  /* @__PURE__ */ s("span", { className: "text-sm", children: i })
4588
4588
  ] }),
@@ -4613,11 +4613,11 @@ const ou = () => {
4613
4613
  onClose: t
4614
4614
  }) => {
4615
4615
  const [n, r] = E(!1), [a, i] = E(""), [o, l] = E(""), [d, h] = E(!1), u = rt(null), m = Ad(), { data: v } = Ke(), p = v == null ? void 0 : v.find(
4616
- (_) => _.key === e.pageType
4616
+ (k) => k.key === e.pageType
4617
4617
  ), y = (p == null ? void 0 : p.name) || $t(e.pageType), g = de(
4618
- (_) => {
4618
+ (k) => {
4619
4619
  var L;
4620
- const I = (L = _.target.files) == null ? void 0 : L[0];
4620
+ const I = (L = k.target.files) == null ? void 0 : L[0];
4621
4621
  if (I) {
4622
4622
  if (I.size > cu) {
4623
4623
  V.error("File too large", {
@@ -4642,9 +4642,9 @@ const ou = () => {
4642
4642
  ), x = () => {
4643
4643
  l(""), u.current && (u.current.value = "");
4644
4644
  }, b = () => {
4645
- var _;
4646
- (_ = u.current) == null || _.click();
4647
- }, w = () => {
4645
+ var k;
4646
+ (k = u.current) == null || k.click();
4647
+ }, N = () => {
4648
4648
  r(!0), m.mutate(
4649
4649
  {
4650
4650
  page: e,
@@ -4688,13 +4688,13 @@ const ou = () => {
4688
4688
  /* @__PURE__ */ c("div", { children: [
4689
4689
  /* @__PURE__ */ s(ce, { htmlFor: "description", className: "text-xs font-medium", children: "Description (Optional)" }),
4690
4690
  /* @__PURE__ */ s(
4691
- Nn,
4691
+ wn,
4692
4692
  {
4693
4693
  id: "description",
4694
4694
  placeholder: "Describe this template's purpose",
4695
4695
  className: "text-xs resize-none h-24 mt-1",
4696
4696
  value: a,
4697
- onChange: (_) => i(_.target.value)
4697
+ onChange: (k) => i(k.target.value)
4698
4698
  }
4699
4699
  )
4700
4700
  ] }),
@@ -4737,7 +4737,7 @@ const ou = () => {
4737
4737
  variant: "outline",
4738
4738
  size: "icon",
4739
4739
  onClick: x,
4740
- children: /* @__PURE__ */ s(wn, { className: "h-4 w-4" })
4740
+ children: /* @__PURE__ */ s(En, { className: "h-4 w-4" })
4741
4741
  }
4742
4742
  )
4743
4743
  ] }),
@@ -4762,13 +4762,13 @@ const ou = () => {
4762
4762
  S,
4763
4763
  {
4764
4764
  variant: "outline",
4765
- onClick: (_) => {
4766
- _.stopPropagation(), t();
4765
+ onClick: (k) => {
4766
+ k.stopPropagation(), t();
4767
4767
  },
4768
4768
  children: "Cancel"
4769
4769
  }
4770
4770
  ),
4771
- /* @__PURE__ */ s(S, { variant: "default", disabled: n, onClick: w, children: "Mark as template" })
4771
+ /* @__PURE__ */ s(S, { variant: "default", disabled: n, onClick: N, children: "Mark as template" })
4772
4772
  ]
4773
4773
  }
4774
4774
  )
@@ -4843,13 +4843,13 @@ const ou = () => {
4843
4843
  ] })
4844
4844
  ] }) });
4845
4845
  }, Zi = ({ close: e }) => {
4846
- const { languages: t, setSelectedLang: n } = Ge(), { data: r } = Ke(), { data: a, isFetching: i } = fs(), [o, l] = He(), { updateForSelectedPage: d, expandPagesOnSearch: h } = nr(null), u = Ot(), m = o.get("page"), [v, p] = E(""), [y, g] = E(null), [x, b] = E(null), [w, _] = E(null), [I, L] = E(null), [A, j] = E(""), [Z, $] = E(null), [P, R] = E(null), [q, D] = E(u), [te, W] = E(!1), [, pe] = Ue(gs), Ae = te && q !== u, { data: Pe, isFetching: he } = Ld(q), N = de(
4846
+ const { languages: t, setSelectedLang: n } = Ge(), { data: r } = Ke(), { data: a, isFetching: i } = fs(), [o, l] = He(), { updateForSelectedPage: d, expandPagesOnSearch: h } = nr(null), u = Ot(), m = o.get("page"), [v, p] = E(""), [y, g] = E(null), [x, b] = E(null), [N, k] = E(null), [I, L] = E(null), [A, j] = E(""), [Z, $] = E(null), [_, R] = E(null), [q, D] = E(u), [te, W] = E(!1), [, pe] = Ue(gs), Ae = te && q !== u, { data: _e, isFetching: he } = Ld(q), w = de(
4847
4847
  (G) => {
4848
4848
  var M;
4849
4849
  return (M = xe(r, { key: G })) == null ? void 0 : M.hasSlug;
4850
4850
  },
4851
4851
  [r]
4852
- ), f = H(() => a ? Ae ? Se(a, (G) => !(Pe != null && Pe[G.id])) : Vd(a, v, A, N) : [], [a, N, v, A, Pe, Ae]);
4852
+ ), f = H(() => a ? Ae ? Se(a, (G) => !(_e != null && _e[G.id])) : Vd(a, v, A, w) : [], [a, w, v, A, _e, Ae]);
4853
4853
  ae(() => {
4854
4854
  n(u);
4855
4855
  }, [u, n]), ae(() => {
@@ -4861,9 +4861,9 @@ const ou = () => {
4861
4861
  const M = xe(a, { slug: "/" });
4862
4862
  if (M) {
4863
4863
  const B = new URLSearchParams({ page: M.id });
4864
- On(B, l);
4864
+ jt(B, l);
4865
4865
  } else
4866
- On(new URLSearchParams({}), l, !0);
4866
+ jt(new URLSearchParams({}), l, !0);
4867
4867
  }
4868
4868
  }, [a, m, i, l]), ae(() => {
4869
4869
  m && !i && !le(f) && d(f, m);
@@ -4873,7 +4873,7 @@ const ou = () => {
4873
4873
  const { setSelectedLang: C } = Ge(), U = de(
4874
4874
  (G) => {
4875
4875
  const M = new URLSearchParams({ page: G });
4876
- q !== u ? (M.set("lang", q), C(q)) : C(""), On(M, l), e();
4876
+ q !== u ? (M.set("lang", q), C(q)) : C(""), jt(M, l), e();
4877
4877
  },
4878
4878
  [e, l, C, q, u]
4879
4879
  ), F = (G, M) => {
@@ -4897,7 +4897,7 @@ const ou = () => {
4897
4897
  g(M);
4898
4898
  break;
4899
4899
  case "unpublish":
4900
- _(M);
4900
+ k(M);
4901
4901
  break;
4902
4902
  case "markAsTemplate":
4903
4903
  L(M);
@@ -4947,7 +4947,7 @@ const ou = () => {
4947
4947
  pageTypes: r,
4948
4948
  currentPage: m || "",
4949
4949
  onClickAction: F,
4950
- languagePages: Pe,
4950
+ languagePages: _e,
4951
4951
  selectedLanguage: q,
4952
4952
  showUntranslatedPages: Ae
4953
4953
  }
@@ -4963,9 +4963,9 @@ const ou = () => {
4963
4963
  }
4964
4964
  ),
4965
4965
  y && /* @__PURE__ */ s(oa, { page: y, onClose: () => g(null) }),
4966
- w && /* @__PURE__ */ s(sr, { page: w, onClose: () => _(null) }),
4966
+ N && /* @__PURE__ */ s(sr, { page: N, onClose: () => k(null) }),
4967
4967
  I && /* @__PURE__ */ s(Yi, { page: I, onClose: () => L(null) }),
4968
- P && /* @__PURE__ */ s(Xi, { page: P, onClose: () => R(null) }),
4968
+ _ && /* @__PURE__ */ s(Xi, { page: _, onClose: () => R(null) }),
4969
4969
  Z && /* @__PURE__ */ s(Ji, { page: Z, onClose: () => $(null), closePanel: e })
4970
4970
  ] });
4971
4971
  }, du = () => {
@@ -4974,13 +4974,23 @@ const ou = () => {
4974
4974
  }, uu = () => {
4975
4975
  const [e, t] = He(), n = e.get("page"), { data: r, isFetching: a } = Ve(), { data: i, isFetching: o } = fs(), [l, d] = E(!1), [h, u] = E(!0), { savePage: m } = Nt(), v = !!n && !le(r), p = H(() => !i || o ? !1 : i.some((b) => b.slug === "/"), [i, o]);
4976
4976
  ae(() => {
4977
+ const b = !n || !i || o || i.some((N) => N.id === n);
4977
4978
  if (!n && !o && i && p) {
4978
- const b = i.find((w) => w.slug === "/");
4979
- if (b) {
4980
- const w = new URLSearchParams({ page: b.id });
4981
- On(w, t);
4979
+ const N = i.find((k) => k.slug === "/");
4980
+ if (N) {
4981
+ const k = new URLSearchParams({ page: N.id });
4982
+ jt(k, t);
4982
4983
  }
4983
4984
  }
4985
+ if (n && !o && i && !b)
4986
+ if (p) {
4987
+ const N = i.find((k) => k.slug === "/");
4988
+ if (N) {
4989
+ const k = new URLSearchParams({ page: N.id });
4990
+ jt(k, t);
4991
+ }
4992
+ } else
4993
+ jt(new URLSearchParams({}), t, !0);
4984
4994
  !o && i && u(!1);
4985
4995
  }, [n, o, i, p, t]);
4986
4996
  const y = !h && !n && !p, g = !h && !a && le(r) && !p, x = l || y || g;
@@ -5040,11 +5050,11 @@ const ou = () => {
5040
5050
  const [, h] = Ue(gs), { data: u } = Ve(), { data: m } = Et(), { data: v } = ut(), p = H(() => {
5041
5051
  const x = qs(
5042
5052
  et(K(m, "languages"), (b) => {
5043
- const w = xe(v, { lang: b });
5053
+ const N = xe(v, { lang: b });
5044
5054
  return {
5045
5055
  key: b,
5046
5056
  value: K(De, b, b),
5047
- isLangPageAdded: !!w
5057
+ isLangPageAdded: !!N
5048
5058
  };
5049
5059
  })
5050
5060
  ).filter(Boolean);
@@ -5058,28 +5068,28 @@ const ou = () => {
5058
5068
  ];
5059
5069
  }, [n, v, m]), y = (x) => {
5060
5070
  if (document.querySelector('[data-panel-id="seo"]')) {
5061
- const w = new CustomEvent("seo-language-switch-check", {
5071
+ const N = new CustomEvent("seo-language-switch-check", {
5062
5072
  detail: {
5063
5073
  fromLang: o,
5064
5074
  toLang: x,
5065
5075
  switchHandler: () => g(x)
5066
5076
  }
5067
5077
  });
5068
- window.dispatchEvent(w);
5078
+ window.dispatchEvent(N);
5069
5079
  return;
5070
5080
  }
5071
5081
  g(x);
5072
5082
  }, g = (x) => {
5073
5083
  i(x);
5074
5084
  const b = new URLSearchParams(window.location.search);
5075
- x === n ? b.delete("lang") : b.set("lang", x), On(b, l);
5085
+ x === n ? b.delete("lang") : b.set("lang", x), jt(b, l);
5076
5086
  };
5077
5087
  return le(r) ? null : d ? /* @__PURE__ */ c(S, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
5078
5088
  /* @__PURE__ */ s(ga, { className: "h-4 w-4" }),
5079
5089
  K(De, o, o),
5080
- /* @__PURE__ */ s(Pt, { className: "h-4 w-4" })
5081
- ] }) : /* @__PURE__ */ s(ue, { children: /* @__PURE__ */ c(An, { children: [
5082
- /* @__PURE__ */ s(Tn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ c(
5090
+ /* @__PURE__ */ s(_t, { className: "h-4 w-4" })
5091
+ ] }) : /* @__PURE__ */ s(ue, { children: /* @__PURE__ */ c(Tn, { children: [
5092
+ /* @__PURE__ */ s(Cn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ c(
5083
5093
  S,
5084
5094
  {
5085
5095
  disabled: !!d,
@@ -5089,11 +5099,11 @@ const ou = () => {
5089
5099
  children: [
5090
5100
  /* @__PURE__ */ s(ga, { className: "h-4 w-4" }),
5091
5101
  K(De, o, o),
5092
- /* @__PURE__ */ s(Pt, { className: "h-4 w-4" })
5102
+ /* @__PURE__ */ s(_t, { className: "h-4 w-4" })
5093
5103
  ]
5094
5104
  }
5095
5105
  ) }),
5096
- /* @__PURE__ */ c(Cn, { className: "space-y-1 border-border", children: [
5106
+ /* @__PURE__ */ c(kn, { className: "space-y-1 border-border", children: [
5097
5107
  et(
5098
5108
  p.filter((x) => x.isLangPageAdded),
5099
5109
  (x) => /* @__PURE__ */ c(
@@ -5252,7 +5262,7 @@ function gu(e, t, n = "data.json") {
5252
5262
  function Rn(e, t = !0, n = !1) {
5253
5263
  if (Tr(e)) {
5254
5264
  const r = to(e);
5255
- if (en(r, "{") || en(r, "[") || t && (r === "true" || r === "false" || r === "null" || /^-?\d+(\.\d+)?([eE][+-]?\d+)?$/.test(r)))
5265
+ if (tn(r, "{") || tn(r, "[") || t && (r === "true" || r === "false" || r === "null" || /^-?\d+(\.\d+)?([eE][+-]?\d+)?$/.test(r)))
5256
5266
  try {
5257
5267
  const i = JSON.parse(r);
5258
5268
  return Rn(i, t, n);
@@ -5284,16 +5294,16 @@ const pu = (e) => {
5284
5294
  function vu({ open: e, compare: t, onOpenChange: n }) {
5285
5295
  const r = t[0], a = t[1], [i, o] = E(null), [l, d] = E("split"), [h, u] = E(!1), [m, v] = E("blocks"), { data: p, isLoading: y } = mu(r, a), { leftData: g, rightData: x, options: b } = H(() => {
5286
5296
  var R, q;
5287
- const A = (R = p == null ? void 0 : p.version1) == null ? void 0 : R[m], j = (q = p == null ? void 0 : p.version2) == null ? void 0 : q[m], Z = Rn(A), $ = Rn(j), P = yu(p == null ? void 0 : p.version1, p == null ? void 0 : p.version2);
5288
- return { leftData: Z, rightData: $, options: P };
5289
- }, [p, m]), w = H(() => !g || !x ? "" : gu(g, x), [g, x]), _ = H(() => {
5290
- if (!w) return [];
5297
+ const A = (R = p == null ? void 0 : p.version1) == null ? void 0 : R[m], j = (q = p == null ? void 0 : p.version2) == null ? void 0 : q[m], Z = Rn(A), $ = Rn(j), _ = yu(p == null ? void 0 : p.version1, p == null ? void 0 : p.version2);
5298
+ return { leftData: Z, rightData: $, options: _ };
5299
+ }, [p, m]), N = H(() => !g || !x ? "" : gu(g, x), [g, x]), k = H(() => {
5300
+ if (!N) return [];
5291
5301
  try {
5292
- return kc(w);
5302
+ return kc(N);
5293
5303
  } catch (A) {
5294
5304
  return console.error("Failed to parse diff:", A), [];
5295
5305
  }
5296
- }, [w]), I = async (A, j) => {
5306
+ }, [N]), I = async (A, j) => {
5297
5307
  try {
5298
5308
  await navigator.clipboard.writeText(JSON.stringify(A, null, 2)), o(j), setTimeout(() => o(null), 2e3);
5299
5309
  } catch (Z) {
@@ -5354,17 +5364,17 @@ function vu({ open: e, compare: t, onOpenChange: n }) {
5354
5364
  ] }) }),
5355
5365
  /* @__PURE__ */ s(ks, { className: "flex-1 rounded-lg bg-slate-50 p-3 dark:bg-slate-900", children: /* @__PURE__ */ s("pre", { className: "whitespace-pre-wrap font-mono text-xs", children: L(x) }) })
5356
5366
  ] })
5357
- ] }) : /* @__PURE__ */ s(ks, { className: "h-full overflow-y-auto rounded-lg border bg-slate-50 text-xs dark:bg-slate-900", children: _.length === 0 ? /* @__PURE__ */ s("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ c("div", { className: "text-center text-muted-foreground", children: [
5367
+ ] }) : /* @__PURE__ */ s(ks, { className: "h-full overflow-y-auto rounded-lg border bg-slate-50 text-xs dark:bg-slate-900", children: k.length === 0 ? /* @__PURE__ */ s("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ c("div", { className: "text-center text-muted-foreground", children: [
5358
5368
  /* @__PURE__ */ s(kr, { className: "mx-auto mb-2 h-8 w-8 opacity-50" }),
5359
5369
  /* @__PURE__ */ s("p", { children: "No differences found or unable to parse diff" })
5360
- ] }) }) : /* @__PURE__ */ s("div", { children: _.map((A, j) => /* @__PURE__ */ s("div", { className: "mb-4", children: /* @__PURE__ */ s(
5361
- _c,
5370
+ ] }) }) : /* @__PURE__ */ s("div", { children: k.map((A, j) => /* @__PURE__ */ s("div", { className: "mb-4", children: /* @__PURE__ */ s(
5371
+ Pc,
5362
5372
  {
5363
5373
  viewType: l,
5364
5374
  diffType: A.type,
5365
5375
  hunks: A.hunks,
5366
5376
  className: "rounded-lg text-xs",
5367
- children: (Z) => Z.map(($, P) => /* @__PURE__ */ s(Pc, { hunk: $ }, P))
5377
+ children: (Z) => Z.map(($, _) => /* @__PURE__ */ s(_c, { hunk: $ }, _))
5368
5378
  }
5369
5379
  ) }, j)) }) })
5370
5380
  ] }) })
@@ -5393,7 +5403,7 @@ function bu(e) {
5393
5403
  });
5394
5404
  }
5395
5405
  const xu = () => {
5396
- const e = ie(), t = Y(), n = _e();
5406
+ const e = ie(), t = Y(), n = Pe();
5397
5407
  return ke({
5398
5408
  mutationFn: async (r) => await t(e, {
5399
5409
  action: O.DELETE_PAGE_REVISION,
@@ -5406,7 +5416,7 @@ const xu = () => {
5406
5416
  }
5407
5417
  });
5408
5418
  }, Nu = () => {
5409
- const e = ie(), t = Y(), n = _e();
5419
+ const e = ie(), t = Y(), n = Pe();
5410
5420
  return ke({
5411
5421
  mutationFn: async ({ revisionId: r, discardCurrent: a }) => await t(e, {
5412
5422
  action: O.RESTORE_PAGE_REVISION,
@@ -5431,7 +5441,7 @@ const xu = () => {
5431
5441
  ] }),
5432
5442
  /* @__PURE__ */ s("span", { className: "text-[11px] leading-tight", children: "Live" })
5433
5443
  ] }) : e === "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: [
5434
- /* @__PURE__ */ s(_r, { className: "h-3 w-3" }),
5444
+ /* @__PURE__ */ s(Pr, { className: "h-3 w-3" }),
5435
5445
  /* @__PURE__ */ s("span", { className: "text-[11px] leading-tight", children: "Published" })
5436
5446
  ] }) : e === "unsaved" ? /* @__PURE__ */ c("div", { className: "flex items-center gap-1 rounded-full bg-red-500/10 px-1.5 py-0.5 text-xs text-red-600", children: [
5437
5447
  /* @__PURE__ */ s(xi, { className: "h-3 w-3" }),
@@ -5476,20 +5486,20 @@ function wu({ compare: e, setCompare: t, isComparisonEnabled: n }) {
5476
5486
  }
5477
5487
  function Eu() {
5478
5488
  var D, te;
5479
- const [e, t] = Te.useState([]), [n, r] = Te.useState(!1), [a, i] = Te.useState(null), [o, l] = Te.useState(!1), [d, h] = Te.useState(!1), { data: u } = Ve(), { data: m, isFetching: v, error: p, refetch: y } = bu(u == null ? void 0 : u.id), { mutate: g, isPending: x } = xu(), { mutate: b, isPending: w } = Nu(), _ = _e(), I = Li(), L = ds("enable-page-revisions-compare"), { selectedLang: A, fallbackLang: j } = Ge(), Z = A || j;
5489
+ const [e, t] = Te.useState([]), [n, r] = Te.useState(!1), [a, i] = Te.useState(null), [o, l] = Te.useState(!1), [d, h] = Te.useState(!1), { data: u } = Ve(), { data: m, isFetching: v, error: p, refetch: y } = bu(u == null ? void 0 : u.id), { mutate: g, isPending: x } = xu(), { mutate: b, isPending: N } = Nu(), k = Pe(), I = Li(), L = ds("enable-page-revisions-compare"), { selectedLang: A, fallbackLang: j } = Ge(), Z = A || j;
5480
5490
  ae(() => t([]), [u == null ? void 0 : u.id]);
5481
5491
  const $ = (W) => {
5482
5492
  a && b(
5483
5493
  { revisionId: a.uid, discardCurrent: W },
5484
5494
  {
5485
5495
  onSuccess: () => {
5486
- l(!1), i(null), _.invalidateQueries({
5496
+ l(!1), i(null), k.invalidateQueries({
5487
5497
  queryKey: [O.GET_DRAFT_PAGE]
5488
5498
  });
5489
5499
  }
5490
5500
  }
5491
5501
  );
5492
- }, P = (W) => {
5502
+ }, _ = (W) => {
5493
5503
  i(W), l(!0);
5494
5504
  }, R = (W) => {
5495
5505
  i(W), h(!0);
@@ -5541,7 +5551,7 @@ function Eu() {
5541
5551
  pageId: u == null ? void 0 : u.id,
5542
5552
  revision: W,
5543
5553
  isLatest: !0,
5544
- onRestore: () => P(W),
5554
+ onRestore: () => _(W),
5545
5555
  onDelete: () => R(W),
5546
5556
  revisionNumber: pe,
5547
5557
  compare: e,
@@ -5558,7 +5568,7 @@ function Eu() {
5558
5568
  pageId: u == null ? void 0 : u.id,
5559
5569
  revision: W,
5560
5570
  isLatest: W.uid === "current",
5561
- onRestore: () => P(W),
5571
+ onRestore: () => _(W),
5562
5572
  onDelete: () => R(W),
5563
5573
  revisionNumber: pe + 1,
5564
5574
  compare: e,
@@ -5580,7 +5590,7 @@ function Eu() {
5580
5590
  onOpenChange: l,
5581
5591
  revision: a,
5582
5592
  onRestore: $,
5583
- isRestoring: w
5593
+ isRestoring: N
5584
5594
  }
5585
5595
  ),
5586
5596
  /* @__PURE__ */ s(
@@ -5683,7 +5693,7 @@ function Au({ compare: e, setCompare: t, pageId: n }) {
5683
5693
  style: { lineHeight: 1 },
5684
5694
  onClick: () => t(e.filter((h) => h.uid !== d.uid)),
5685
5695
  "aria-label": "Remove selection 1",
5686
- children: /* @__PURE__ */ s(wn, { className: "h-3 w-3" })
5696
+ children: /* @__PURE__ */ s(En, { className: "h-3 w-3" })
5687
5697
  }
5688
5698
  )
5689
5699
  ] });
@@ -5739,12 +5749,12 @@ function tl({ checked: e, disabled: t, onChange: n, label: r = "Compare" }) {
5739
5749
  ] }) });
5740
5750
  }
5741
5751
  function Tu({ revision: e, onRestore: t, onDelete: n }) {
5742
- return /* @__PURE__ */ c(An, { children: [
5743
- /* @__PURE__ */ s(Tn, { asChild: !0, children: /* @__PURE__ */ c(S, { variant: "ghost", size: "icon", className: "h-5 w-5", children: [
5752
+ return /* @__PURE__ */ c(Tn, { children: [
5753
+ /* @__PURE__ */ s(Cn, { asChild: !0, children: /* @__PURE__ */ c(S, { variant: "ghost", size: "icon", className: "h-5 w-5", children: [
5744
5754
  /* @__PURE__ */ s(jn, { className: "h-4 w-4" }),
5745
5755
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
5746
5756
  ] }) }),
5747
- /* @__PURE__ */ c(Cn, { align: "end", className: "text-xs", children: [
5757
+ /* @__PURE__ */ c(kn, { align: "end", className: "text-xs", children: [
5748
5758
  /* @__PURE__ */ s(lt, { permission: Ce.RESTORE_REVISION, children: /* @__PURE__ */ c(Be, { onClick: t, className: "cursor-pointer text-sm", children: [
5749
5759
  /* @__PURE__ */ s(bi, { className: "mr-2 h-4 w-4" }),
5750
5760
  /* @__PURE__ */ s("span", { children: "Restore this version" })
@@ -5851,13 +5861,13 @@ function ku({
5851
5861
  }
5852
5862
  ) : null;
5853
5863
  }
5854
- const _u = () => {
5864
+ const Pu = () => {
5855
5865
  const e = ie(), t = Y();
5856
5866
  return Oe({
5857
5867
  queryKey: [O.GET_CHANGES],
5858
5868
  queryFn: async () => t(e, { action: O.GET_CHANGES })
5859
5869
  });
5860
- }, Pu = ({ page: e, selectedPages: t, handleCheckboxChange: n, getPageType: r, hasSlug: a, currentOwnerId: i }) => {
5870
+ }, _u = ({ page: e, selectedPages: t, handleCheckboxChange: n, getPageType: r, hasSlug: a, currentOwnerId: i }) => {
5861
5871
  const { data: o } = Dt(i), l = o == null ? void 0 : o.name;
5862
5872
  return /* @__PURE__ */ c("tr", { className: "group relative border-b last:border-b-0 hover:bg-gray-50", children: [
5863
5873
  /* @__PURE__ */ c(
@@ -5879,8 +5889,8 @@ const _u = () => {
5879
5889
  ),
5880
5890
  " ",
5881
5891
  a(e.pageType) ? /* @__PURE__ */ s(us, { className: "h-4 w-4" }) : /* @__PURE__ */ s(dc, { className: "h-4 w-4" }),
5882
- /* @__PURE__ */ s(jt, { content: e.name, side: "top", showTooltip: e.name.length > 25, children: /* @__PURE__ */ s("span", { className: "max-w-[200px] truncate font-medium text-black", children: e.name }) }),
5883
- e.slug && /* @__PURE__ */ s(jt, { content: e.slug, side: "top", showTooltip: e.slug.length > 25, children: /* @__PURE__ */ s("span", { className: "max-w-[200px] truncate font-mono text-xs text-muted-foreground", children: e.slug }) })
5892
+ /* @__PURE__ */ s(zt, { content: e.name, side: "top", showTooltip: e.name.length > 25, children: /* @__PURE__ */ s("span", { className: "max-w-[200px] truncate font-medium text-black", children: e.name }) }),
5893
+ e.slug && /* @__PURE__ */ s(zt, { content: e.slug, side: "top", showTooltip: e.slug.length > 25, children: /* @__PURE__ */ s("span", { className: "max-w-[200px] truncate font-mono text-xs text-muted-foreground", children: e.slug }) })
5884
5894
  ]
5885
5895
  }
5886
5896
  ),
@@ -5898,48 +5908,48 @@ function Iu({
5898
5908
  showModal: e = !1,
5899
5909
  onClose: t = () => console.log("Cancelled")
5900
5910
  }) {
5901
- const [n] = Di(), [r, a] = E([]), i = Ot(), [o, l] = E(i), { data: d, isFetching: h } = _u(), { data: u } = Ke(), m = de((P) => {
5911
+ const [n] = Di(), [r, a] = E([]), i = Ot(), [o, l] = E(i), { data: d, isFetching: h } = Pu(), { data: u } = Ke(), m = de((_) => {
5902
5912
  var R;
5903
- return (R = xe(u, { key: P })) == null ? void 0 : R.hasSlug;
5913
+ return (R = xe(u, { key: _ })) == null ? void 0 : R.hasSlug;
5904
5914
  }, [u]), v = H(
5905
- () => Se(u, (P) => !m(P.key)).map((P) => P.key),
5915
+ () => Se(u, (_) => !m(_.key)).map((_) => _.key),
5906
5916
  [m, u]
5907
5917
  ), y = Sr(et(d, "lang")).filter(Boolean), g = H(
5908
- () => Se(d, (P) => P.pageType === "theme" ? !1 : o === i ? P.lang === o || P.lang === "" : P.lang === o),
5918
+ () => Se(d, (_) => _.pageType === "theme" ? !1 : o === i ? _.lang === o || _.lang === "" : _.lang === o),
5909
5919
  [d, o, i]
5910
5920
  ), x = H(
5911
- () => Se(g, (P) => !v.includes(P.pageType)),
5921
+ () => Se(g, (_) => !v.includes(_.pageType)),
5912
5922
  [g, v]
5913
5923
  ), b = H(
5914
- () => Se(g, (P) => v.includes(P.pageType)),
5924
+ () => Se(g, (_) => v.includes(_.pageType)),
5915
5925
  [g, v]
5916
- ), { mutate: w, isPending: _ } = sa();
5926
+ ), { mutate: N, isPending: k } = sa();
5917
5927
  ae(() => {
5918
- const P = et(Se(g, { online: !0 }), "id");
5919
- a(P);
5928
+ const _ = et(Se(g, { online: !0 }), "id");
5929
+ a(_);
5920
5930
  }, [g]), ae(() => {
5921
- const P = Object.keys(n);
5922
- a((R) => Se(R, (q) => !xt(P, q)));
5931
+ const _ = Object.keys(n);
5932
+ a((R) => Se(R, (q) => !xt(_, q)));
5923
5933
  }, [n]);
5924
- const I = r.length === (g == null ? void 0 : g.length), L = (P) => {
5925
- a((R) => xt(R, P) ? Se(R, (q) => q !== P) : so(R, P));
5934
+ const I = r.length === (g == null ? void 0 : g.length), L = (_) => {
5935
+ a((R) => xt(R, _) ? Se(R, (q) => q !== _) : so(R, _));
5926
5936
  }, A = () => {
5927
5937
  a(I ? [] : et(g, "id"));
5928
5938
  }, j = () => {
5929
- w(
5939
+ N(
5930
5940
  { ids: Sr(r) },
5931
5941
  {
5932
5942
  onSuccess: () => {
5933
- t(), Dn("CENTER_CENTER"), l(i);
5943
+ t(), On("CENTER_CENTER"), l(i);
5934
5944
  }
5935
5945
  }
5936
5946
  );
5937
- }, Z = (P) => {
5938
- if (P === "theme") return "Theme";
5939
- const R = xe(u, { key: P });
5940
- return R ? R == null ? void 0 : R.name : P;
5947
+ }, Z = (_) => {
5948
+ if (_ === "theme") return "Theme";
5949
+ const R = xe(u, { key: _ });
5950
+ return R ? R == null ? void 0 : R.name : _;
5941
5951
  }, $ = H(() => {
5942
- const P = [
5952
+ const _ = [
5943
5953
  { label: "Updated", top: "pt-2" },
5944
5954
  ...Ns(Se(x, { online: !0 }), "pageType"),
5945
5955
  ...Ns(Se(b, { online: !0 }), "pageType")
@@ -5948,9 +5958,9 @@ function Iu({
5948
5958
  ...Ns(Se(x, { online: !1 }), "pageType"),
5949
5959
  ...Ns(Se(b, { online: !1 }), "pageType")
5950
5960
  ];
5951
- return [...P, ...R];
5961
+ return [..._, ...R];
5952
5962
  }, [x, b]);
5953
- return /* @__PURE__ */ s(qe, { open: e, onOpenChange: _ ? () => {
5963
+ return /* @__PURE__ */ s(qe, { open: e, onOpenChange: k ? () => {
5954
5964
  } : t, children: /* @__PURE__ */ c($e, { className: "flex max-h-[80%] max-w-4xl flex-col", children: [
5955
5965
  /* @__PURE__ */ c(je, { children: [
5956
5966
  /* @__PURE__ */ s(ze, { children: "Publish changes" }),
@@ -5976,8 +5986,8 @@ function Iu({
5976
5986
  "input",
5977
5987
  {
5978
5988
  checked: I,
5979
- onClick: (P) => {
5980
- P.stopPropagation(), A();
5989
+ onClick: (_) => {
5990
+ _.stopPropagation(), A();
5981
5991
  },
5982
5992
  type: "checkbox",
5983
5993
  className: "mt-1 cursor-pointer rounded focus:outline-none focus:ring-0"
@@ -5990,18 +6000,18 @@ function Iu({
5990
6000
  ] }) }),
5991
6001
  /* @__PURE__ */ s("tbody", { children: et(
5992
6002
  $,
5993
- (P) => P.label ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ c("td", { colSpan: 3, className: `relative px-6 py-2 text-xs font-medium text-gray-800 ${P.top}`, children: [
6003
+ (_) => _.label ? /* @__PURE__ */ s("tr", { children: /* @__PURE__ */ c("td", { colSpan: 3, className: `relative px-6 py-2 text-xs font-medium text-gray-800 ${_.top}`, children: [
5994
6004
  /* @__PURE__ */ s("div", { className: "absolute inset-0 left-6 flex items-center", children: /* @__PURE__ */ s("div", { className: "order-gray-300 w-full" }) }),
5995
- /* @__PURE__ */ s("div", { className: "relative flex justify-start", children: /* @__PURE__ */ s("span", { className: "bg-gray-50 pr-2", children: P.label }) })
6005
+ /* @__PURE__ */ s("div", { className: "relative flex justify-start", children: /* @__PURE__ */ s("span", { className: "bg-gray-50 pr-2", children: _.label }) })
5996
6006
  ] }) }, "separator") : /* @__PURE__ */ s(
5997
- Pu,
6007
+ _u,
5998
6008
  {
5999
- page: P,
6009
+ page: _,
6000
6010
  selectedPages: r,
6001
6011
  handleCheckboxChange: L,
6002
6012
  getPageType: Z,
6003
6013
  hasSlug: m,
6004
- currentOwnerId: n[(P == null ? void 0 : P.primaryPage) || (P == null ? void 0 : P.id)]
6014
+ currentOwnerId: n[(_ == null ? void 0 : _.primaryPage) || (_ == null ? void 0 : _.id)]
6005
6015
  }
6006
6016
  )
6007
6017
  ) })
@@ -6013,8 +6023,8 @@ function Iu({
6013
6023
  r.length !== 1 ? "s" : "",
6014
6024
  " Selected"
6015
6025
  ] }),
6016
- /* @__PURE__ */ s(S, { disabled: _, variant: "outline", onClick: t, children: "Cancel" }),
6017
- /* @__PURE__ */ s(S, { disabled: _ || h || le(r), onClick: j, children: _ ? "Publishing..." : "Publish Selected" })
6026
+ /* @__PURE__ */ s(S, { disabled: k, variant: "outline", onClick: t, children: "Cancel" }),
6027
+ /* @__PURE__ */ s(S, { disabled: k || h || le(r), onClick: j, children: k ? "Publishing..." : "Publish Selected" })
6018
6028
  ] })
6019
6029
  ] }) });
6020
6030
  }
@@ -6113,7 +6123,7 @@ const Ru = () => {
6113
6123
  }, Gu = () => {
6114
6124
  const [e, t] = wo();
6115
6125
  return /* @__PURE__ */ c(ue, { children: [
6116
- /* @__PURE__ */ s(jt, { content: re.THEME, children: /* @__PURE__ */ s(
6126
+ /* @__PURE__ */ s(zt, { content: re.THEME, children: /* @__PURE__ */ s(
6117
6127
  S,
6118
6128
  {
6119
6129
  variant: e === "theme" ? "outline" : "ghost",
@@ -6165,7 +6175,7 @@ const Ru = () => {
6165
6175
  d
6166
6176
  ] });
6167
6177
  }, Mu = () => {
6168
- const { selectedLang: e } = Ge(), { data: t } = Lt(), { data: n } = ut(), [r, a] = E(!1), [i, o] = E(!1), [l, d] = E(null), { savePageAsync: h } = Nt(), [u, m] = E(!1), { data: v } = Ve(), { mutate: p, isPending: y } = sa(), { needTranslations: g } = Nt(), x = g(), { buttonText: b, buttonClassName: w, isPublished: _ } = H(() => {
6178
+ const { selectedLang: e } = Ge(), { data: t } = Lt(), { data: n } = ut(), [r, a] = E(!1), [i, o] = E(!1), [l, d] = E(null), { savePageAsync: h } = Nt(), [u, m] = E(!1), { data: v } = Ve(), { mutate: p, isPending: y } = sa(), { needTranslations: g } = Nt(), x = g(), { buttonText: b, buttonClassName: N, isPublished: k } = H(() => {
6169
6179
  const $ = v && (v == null ? void 0 : v.online);
6170
6180
  return {
6171
6181
  buttonClassName: $ ? "hover:bg-green-600 bg-green-500" : "",
@@ -6180,7 +6190,7 @@ const Ru = () => {
6180
6190
  L();
6181
6191
  }, L = () => {
6182
6192
  const $ = [t == null ? void 0 : t.id, t == null ? void 0 : t.primaryPage];
6183
- p({ ids: qs($) }, { onSuccess: () => Dn("TOP_RIGHT") });
6193
+ p({ ids: qs($) }, { onSuccess: () => On("TOP_RIGHT") });
6184
6194
  }, A = () => {
6185
6195
  m(!1), L();
6186
6196
  }, j = async () => {
@@ -6194,7 +6204,7 @@ const Ru = () => {
6194
6204
  size: "sm",
6195
6205
  onClick: I,
6196
6206
  disabled: y || !(v != null && v.id),
6197
- className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${w}`,
6207
+ className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${N}`,
6198
6208
  onMouseEnter: () => o(!0),
6199
6209
  onMouseLeave: () => o(!1),
6200
6210
  children: [
@@ -6202,14 +6212,14 @@ const Ru = () => {
6202
6212
  "span",
6203
6213
  {
6204
6214
  className: `flex items-center transition-transform duration-300 ease-in-out ${i ? "-translate-y-10" : ""}`,
6205
- children: _ ? /* @__PURE__ */ s(pa, { className: "h-4 w-4" }) : /* @__PURE__ */ s(_r, { className: "h-4 w-4" })
6215
+ children: k ? /* @__PURE__ */ s(pa, { className: "h-4 w-4" }) : /* @__PURE__ */ s(Pr, { className: "h-4 w-4" })
6206
6216
  }
6207
6217
  ),
6208
6218
  /* @__PURE__ */ s(
6209
6219
  "span",
6210
6220
  {
6211
6221
  className: `absolute inset-0 left-3 flex items-center transition-transform duration-300 ease-in-out ${i ? "" : "translate-y-10"}`,
6212
- children: _ ? /* @__PURE__ */ s(_r, { className: "h-4 w-4" }) : /* @__PURE__ */ s(pa, { className: "h-4 w-4" })
6222
+ children: k ? /* @__PURE__ */ s(Pr, { className: "h-4 w-4" }) : /* @__PURE__ */ s(pa, { className: "h-4 w-4" })
6213
6223
  }
6214
6224
  ),
6215
6225
  /* @__PURE__ */ s("span", { children: b }),
@@ -6217,35 +6227,35 @@ const Ru = () => {
6217
6227
  ]
6218
6228
  }
6219
6229
  ),
6220
- /* @__PURE__ */ c(An, { children: [
6221
- /* @__PURE__ */ s(Tn, { asChild: !0, children: /* @__PURE__ */ s(
6230
+ /* @__PURE__ */ c(Tn, { children: [
6231
+ /* @__PURE__ */ s(Cn, { asChild: !0, children: /* @__PURE__ */ s(
6222
6232
  S,
6223
6233
  {
6224
6234
  size: "sm",
6225
6235
  disabled: y || !(v != null && v.id),
6226
- className: `rounded-l-none border-l border-white/50 px-2 text-white ${w}`,
6227
- children: /* @__PURE__ */ s(Pt, { className: "h-4 w-4" })
6236
+ className: `rounded-l-none border-l border-white/50 px-2 text-white ${N}`,
6237
+ children: /* @__PURE__ */ s(_t, { className: "h-4 w-4" })
6228
6238
  }
6229
6239
  ) }),
6230
- /* @__PURE__ */ c(Cn, { align: "end", className: "w-52", children: [
6240
+ /* @__PURE__ */ c(kn, { align: "end", className: "w-52", children: [
6231
6241
  /* @__PURE__ */ c(
6232
6242
  Be,
6233
6243
  {
6234
6244
  disabled: y,
6235
6245
  className: "cursor-pointer text-xs",
6236
- onClick: () => p({ ids: Z }, { onSuccess: () => Dn("TOP_RIGHT") }),
6246
+ onClick: () => p({ ids: Z }, { onSuccess: () => On("TOP_RIGHT") }),
6237
6247
  children: [
6238
6248
  re.PUBLISH,
6239
6249
  " with translation pages"
6240
6250
  ]
6241
6251
  }
6242
6252
  ),
6243
- !_ && /* @__PURE__ */ c(
6253
+ !k && /* @__PURE__ */ c(
6244
6254
  Be,
6245
6255
  {
6246
6256
  disabled: y,
6247
6257
  className: "cursor-pointer text-xs",
6248
- onClick: () => p({ ids: [v == null ? void 0 : v.id] }, { onSuccess: () => Dn("TOP_RIGHT") }),
6258
+ onClick: () => p({ ids: [v == null ? void 0 : v.id] }, { onSuccess: () => On("TOP_RIGHT") }),
6249
6259
  children: [
6250
6260
  re.PUBLISH,
6251
6261
  " page"
@@ -6256,7 +6266,7 @@ const Ru = () => {
6256
6266
  re.OPEN,
6257
6267
  " publish menu"
6258
6268
  ] }),
6259
- _ && /* @__PURE__ */ c(Be, { onClick: () => d(t), className: "cursor-pointer text-xs", children: [
6269
+ k && /* @__PURE__ */ c(Be, { onClick: () => d(t), className: "cursor-pointer text-xs", children: [
6260
6270
  re.UNPUBLISH,
6261
6271
  " page ",
6262
6272
  e ? `(${ha(e)})` : ""
@@ -6279,13 +6289,13 @@ const Ru = () => {
6279
6289
  }, Bu = () => {
6280
6290
  const e = ot("settingComponent", null), [t, n] = E(!1);
6281
6291
  return e ? /* @__PURE__ */ c(ue, { children: [
6282
- /* @__PURE__ */ s(jt, { content: re.WEBSITEDATA, children: /* @__PURE__ */ s(S, { variant: "ghost", size: "icon", className: "gap-2", onClick: () => n(!0), children: /* @__PURE__ */ s(hc, { className: "h-4 w-4" }) }) }),
6292
+ /* @__PURE__ */ s(zt, { content: re.WEBSITEDATA, children: /* @__PURE__ */ s(S, { variant: "ghost", size: "icon", className: "gap-2", onClick: () => n(!0), children: /* @__PURE__ */ s(hc, { className: "h-4 w-4" }) }) }),
6283
6293
  t && /* @__PURE__ */ s(Ou, { onClose: () => n(!1) }),
6284
6294
  /* @__PURE__ */ s("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
6285
6295
  ] }) : null;
6286
6296
  };
6287
6297
  function Fu() {
6288
- const { isLocked: e } = St(), [t] = He(), n = t.get("lang"), r = _i(n);
6298
+ const { isLocked: e } = St(), [t] = He(), n = t.get("lang"), r = Pi(n);
6289
6299
  return e || !r ? /* @__PURE__ */ s("div", {}) : /* @__PURE__ */ c("div", { className: "flex items-center justify-end gap-1", children: [
6290
6300
  /* @__PURE__ */ s(Eu, {}),
6291
6301
  /* @__PURE__ */ s(lt, { permission: Ce.EDIT_THEME, children: /* @__PURE__ */ s(Gu, {}) }),
@@ -6318,19 +6328,19 @@ const qu = ({
6318
6328
  dynamicPages: a
6319
6329
  }) => {
6320
6330
  const { selectedLang: i, fallbackLang: o } = Ge(), l = (i == null ? void 0 : i.length) === 0;
6321
- return /* @__PURE__ */ c(An, { children: [
6322
- /* @__PURE__ */ s(Tn, { asChild: !0, children: /* @__PURE__ */ c(
6331
+ return /* @__PURE__ */ c(Tn, { children: [
6332
+ /* @__PURE__ */ s(Cn, { asChild: !0, children: /* @__PURE__ */ c(
6323
6333
  S,
6324
6334
  {
6325
6335
  variant: "ghost",
6326
6336
  className: "w-max focus:outline-none focus:ring-0 border-[0px] rounded-md py-1 text-sm h-max border border-gray-200 hover:bg-gray-100 pl-4",
6327
6337
  children: [
6328
6338
  e ? K(e, "name") : "Select Page",
6329
- /* @__PURE__ */ s(Pt, { className: "ml-2 h-4 w-4" })
6339
+ /* @__PURE__ */ s(_t, { className: "ml-2 h-4 w-4" })
6330
6340
  ]
6331
6341
  }
6332
6342
  ) }),
6333
- /* @__PURE__ */ c(Cn, { className: "w-96 divide-y shadow-xl p-0 max-h-[75vh]", children: [
6343
+ /* @__PURE__ */ c(kn, { className: "w-96 divide-y shadow-xl p-0 max-h-[75vh]", children: [
6334
6344
  /* @__PURE__ */ s("div", { className: "p-1.5 bg-gray-50/30", children: /* @__PURE__ */ s(qu, { isDefaultLang: l, searchQuery: n, setSearchQuery: r }) }),
6335
6345
  (a == null ? void 0 : a.length) === 0 ? /* @__PURE__ */ s("div", { className: "h-24 text-xs flex items-center justify-center", children: "No pages found" }) : a == null ? void 0 : a.map((d) => /* @__PURE__ */ s(
6336
6346
  Be,
@@ -6371,7 +6381,7 @@ const qu = ({
6371
6381
  }
6372
6382
  ) });
6373
6383
  }, zu = () => {
6374
- const [e, t] = E(null), [n, r] = E(null), [a, i] = E(null), [o, l] = E(null), [d, h] = E(null), [u, m] = E(null), [v, p] = E(!1), { data: y, isFetching: g } = Lt(), { selectedLang: x, fallbackLang: b } = Ge(), { data: w } = ut(), _ = w == null ? void 0 : w.find(($) => $.lang === x), { isLocked: I } = St(), L = !(y != null && y.slug), [, A] = Ue(gs), { savePage: j } = Nt();
6384
+ const [e, t] = E(null), [n, r] = E(null), [a, i] = E(null), [o, l] = E(null), [d, h] = E(null), [u, m] = E(null), [v, p] = E(!1), { data: y, isFetching: g } = Lt(), { selectedLang: x, fallbackLang: b } = Ge(), { data: N } = ut(), k = N == null ? void 0 : N.find(($) => $.lang === x), { isLocked: I } = St(), L = !(y != null && y.slug), [, A] = Ue(gs), { savePage: j } = Nt();
6375
6385
  if (!y) return null;
6376
6386
  const Z = ($) => {
6377
6387
  x.length > 0 && x !== b ? A({
@@ -6392,7 +6402,7 @@ const qu = ({
6392
6402
  },
6393
6403
  children: g ? /* @__PURE__ */ s(wt, { className: "h-4 w-4 animate-spin text-slate-400" }) : /* @__PURE__ */ c("span", { className: "flex w-full cursor-pointer items-end overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-xs font-medium", children: [
6394
6404
  L ? /* @__PURE__ */ s(yi, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ s(us, { className: "mr-1 h-4 w-4" }),
6395
- K(_ || y, "name") ?? ""
6405
+ K(k || y, "name") ?? ""
6396
6406
  ] })
6397
6407
  }
6398
6408
  ),
@@ -6648,9 +6658,9 @@ const qu = ({
6648
6658
  [n, t]
6649
6659
  )
6650
6660
  };
6651
- }, Aa = _s.object({
6652
- email: _s.string().email({ message: "Please enter a valid email address" }),
6653
- password: _s.string().min(6, { message: "Password must be at least 6 characters" })
6661
+ }, Aa = Ps.object({
6662
+ email: Ps.string().email({ message: "Please enter a valid email address" }),
6663
+ password: Ps.string().min(6, { message: "Password must be at least 6 characters" })
6654
6664
  }), th = () => {
6655
6665
  const { setUser: e, logout: t } = mt(), n = er(), [r, a] = E(""), [i, o] = E(""), [l, d] = E({}), [h, u] = E(!1), [m, v] = E(""), p = ke({
6656
6666
  mutationFn: async (x) => {
@@ -6660,15 +6670,15 @@ const qu = ({
6660
6670
  data: x
6661
6671
  });
6662
6672
  if (!b.ok) {
6663
- const _ = await b.json();
6664
- throw new Error(_.error || "Login failed");
6673
+ const k = await b.json();
6674
+ throw new Error(k.error || "Login failed");
6665
6675
  }
6666
- const w = await b.json();
6667
- if (Ie(w, "id") && Ie(w, "email") && Ie(w, "accessToken") && Ie(w, "refreshToken"))
6668
- e(w);
6676
+ const N = await b.json();
6677
+ if (Ie(N, "id") && Ie(N, "email") && Ie(N, "accessToken") && Ie(N, "refreshToken"))
6678
+ e(N);
6669
6679
  else
6670
6680
  throw t(), new Error("Something went wrong. Please try again.");
6671
- return w;
6681
+ return N;
6672
6682
  },
6673
6683
  onSuccess: () => {
6674
6684
  d({}), v("");
@@ -6683,15 +6693,15 @@ const qu = ({
6683
6693
  x.preventDefault(), d({});
6684
6694
  const b = { email: r, password: i };
6685
6695
  try {
6686
- const w = Aa.parse(b);
6687
- p.mutate(w);
6688
- } catch (w) {
6689
- if (w instanceof _s.ZodError) {
6690
- const _ = w.issues.reduce((I, L) => {
6696
+ const N = Aa.parse(b);
6697
+ p.mutate(N);
6698
+ } catch (N) {
6699
+ if (N instanceof Ps.ZodError) {
6700
+ const k = N.issues.reduce((I, L) => {
6691
6701
  const A = L.path[0];
6692
6702
  return I[A] = L.message, I;
6693
6703
  }, {});
6694
- d(_);
6704
+ d(k);
6695
6705
  }
6696
6706
  }
6697
6707
  }, g = Aa.safeParse({ email: r, password: i }).success;
@@ -6793,7 +6803,7 @@ const nh = () => H(() => Lr, [Lr]), Ff = (e) => {
6793
6803
  onClose: t
6794
6804
  }) => {
6795
6805
  const [n, r] = E(e.slug || ""), { mutate: a, isPending: i } = Cd(), { data: o } = Ke(), l = xe(o, { key: e == null ? void 0 : e.pageType }), d = (u) => {
6796
- if (u.preventDefault(), !(e != null && e.primaryPage) && Object.keys(De).some((p) => n === `/${p}` || en(n, `/${p}/`))) {
6806
+ if (u.preventDefault(), !(e != null && e.primaryPage) && Object.keys(De).some((p) => n === `/${p}` || tn(n, `/${p}/`))) {
6797
6807
  V.error("Error", {
6798
6808
  description: "Slugs cannot start with a language code for primary page"
6799
6809
  });
@@ -6804,7 +6814,7 @@ const nh = () => H(() => Lr, [Lr]), Ff = (e) => {
6804
6814
  return /* @__PURE__ */ s(qe, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ c($e, { children: [
6805
6815
  /* @__PURE__ */ c(je, { children: [
6806
6816
  /* @__PURE__ */ s(ze, { children: "Change Slug" }),
6807
- /* @__PURE__ */ s(Ye, { className: "text-xs", children: /* @__PURE__ */ c(Sn, { variant: "destructive", className: "mt-2", children: [
6817
+ /* @__PURE__ */ s(Ye, { className: "text-xs", children: /* @__PURE__ */ c(An, { variant: "destructive", className: "mt-2", children: [
6808
6818
  /* @__PURE__ */ s(Ys, { className: "h-4 w-4" }),
6809
6819
  "Changing the slug may have impact on your SEO. Please proceed with caution."
6810
6820
  ] }) })
@@ -6843,7 +6853,7 @@ const nh = () => H(() => Lr, [Lr]), Ff = (e) => {
6843
6853
  value: n,
6844
6854
  onChange: (u) => {
6845
6855
  const m = u.target.value;
6846
- en(m, `/${h}`) && r(m);
6856
+ tn(m, `/${h}`) && r(m);
6847
6857
  },
6848
6858
  className: "col-span-3",
6849
6859
  required: !0,
@@ -6858,7 +6868,7 @@ const nh = () => H(() => Lr, [Lr]), Ff = (e) => {
6858
6868
  S,
6859
6869
  {
6860
6870
  type: "submit",
6861
- disabled: i || !en(n, `/${h}`) || Ls(e == null ? void 0 : e.slug, n),
6871
+ disabled: i || !tn(n, `/${h}`) || Ls(e == null ? void 0 : e.slug, n),
6862
6872
  children: i ? "Changing..." : "Change Slug"
6863
6873
  }
6864
6874
  ) })
@@ -6866,7 +6876,7 @@ const nh = () => H(() => Lr, [Lr]), Ff = (e) => {
6866
6876
  ] }) });
6867
6877
  }, ah = () => {
6868
6878
  const [, e] = Ue(gs), { selectedLang: t, fallbackLang: n, setSelectedLang: r } = Ge(), { data: a, isFetching: i } = ut(), { data: o } = Ve(), { data: l } = Ke(), d = H(() => {
6869
- const b = l == null ? void 0 : l.find((w) => w.key === (o == null ? void 0 : o.pageType));
6879
+ const b = l == null ? void 0 : l.find((N) => N.key === (o == null ? void 0 : o.pageType));
6870
6880
  return o != null && o.dynamic ? b == null ? void 0 : b.dynamicSlug : "";
6871
6881
  }, [l, o == null ? void 0 : o.pageType, o == null ? void 0 : o.dynamic]), [h, u] = E(null), [m, v] = E(null), [p, y] = E(null), { data: g } = Et(), x = Se(
6872
6882
  K(g, "languages") || ["en"],
@@ -6878,23 +6888,23 @@ const nh = () => H(() => Lr, [Lr]), Ff = (e) => {
6878
6888
  /* @__PURE__ */ s("div", { className: "h-8 w-full animate-pulse rounded bg-gray-300" }),
6879
6889
  /* @__PURE__ */ s("div", { className: "h-8 w-full animate-pulse rounded bg-gray-300" })
6880
6890
  ] }) : et(a, (b) => {
6881
- const w = b.lang, _ = b.slug, I = !b.primaryPage;
6891
+ const N = b.lang, k = b.slug, I = !b.primaryPage;
6882
6892
  return /* @__PURE__ */ c(ue, { children: [
6883
6893
  /* @__PURE__ */ c(
6884
6894
  "li",
6885
6895
  {
6886
- className: `flex w-full cursor-pointer items-center justify-between rounded p-2 text-slate-500 ${w === t ? "bg-gray-200" : "hover:bg-gray-100"}`,
6887
- onClick: () => r(w),
6896
+ className: `flex w-full cursor-pointer items-center justify-between rounded p-2 text-slate-500 ${N === t ? "bg-gray-200" : "hover:bg-gray-100"}`,
6897
+ onClick: () => r(N),
6888
6898
  children: [
6889
6899
  /* @__PURE__ */ c("div", { className: "flex-1 gap-x-3", children: [
6890
6900
  /* @__PURE__ */ c("div", { className: "flex items-center gap-x-2 text-[13px] text-slate-800", children: [
6891
6901
  /* @__PURE__ */ s("div", { className: `h-2.5 w-2.5 rounded-full ${b.online ? "bg-green-300" : "bg-gray-300"}` }),
6892
- K(De, I ? n : w, w)
6902
+ K(De, I ? n : N, N)
6893
6903
  ] }),
6894
6904
  /* @__PURE__ */ c("div", { children: [
6895
- _ && /* @__PURE__ */ c("div", { className: "text-[11px] font-light text-slate-600", children: [
6905
+ k && /* @__PURE__ */ c("div", { className: "text-[11px] font-light text-slate-600", children: [
6896
6906
  "Slug: ",
6897
- /* @__PURE__ */ s("b", { className: "font-mono font-medium", children: d ? `${_}/${d}` : _ })
6907
+ /* @__PURE__ */ s("b", { className: "font-mono font-medium", children: d ? `${k}/${d}` : k })
6898
6908
  ] }),
6899
6909
  /* @__PURE__ */ c("div", { className: "text-[11px] font-light text-slate-600", children: [
6900
6910
  "Name:",
@@ -6917,9 +6927,9 @@ const nh = () => H(() => Lr, [Lr]), Ff = (e) => {
6917
6927
  Ce.DELETE_PAGE,
6918
6928
  Ce.UNPUBLISH_PAGE
6919
6929
  ],
6920
- children: /* @__PURE__ */ c(An, { children: [
6921
- /* @__PURE__ */ s(Tn, { asChild: !0, onClick: (A) => A.stopPropagation(), children: /* @__PURE__ */ s(S, { variant: "ghost", size: "sm", className: "h-8 w-8 p-0", children: /* @__PURE__ */ s(jn, { className: "h-4 w-4" }) }) }),
6922
- /* @__PURE__ */ c(Cn, { align: "end", className: "z-[9999] text-sm", children: [
6930
+ children: /* @__PURE__ */ c(Tn, { children: [
6931
+ /* @__PURE__ */ s(Cn, { asChild: !0, onClick: (A) => A.stopPropagation(), children: /* @__PURE__ */ s(S, { variant: "ghost", size: "sm", className: "h-8 w-8 p-0", children: /* @__PURE__ */ s(jn, { className: "h-4 w-4" }) }) }),
6932
+ /* @__PURE__ */ c(kn, { align: "end", className: "z-[9999] text-sm", children: [
6923
6933
  /* @__PURE__ */ s(lt, { permissions: [Ce.EDIT_PAGE], children: /* @__PURE__ */ c(
6924
6934
  Be,
6925
6935
  {
@@ -7034,9 +7044,9 @@ function kt({
7034
7044
  value: g,
7035
7045
  type: u(g)
7036
7046
  })).filter((y) => n === "value" ? y.type === "value" || y.type === "object" : n === "array" ? y.type === "array" || y.type === "object" : n === "object" ? y.type === "object" : !0), [d, n]);
7037
- return /* @__PURE__ */ c(vn, { open: a, onOpenChange: i, children: [
7047
+ return /* @__PURE__ */ c(bn, { open: a, onOpenChange: i, children: [
7038
7048
  /* @__PURE__ */ c(tt, { children: [
7039
- /* @__PURE__ */ s(nt, { asChild: !0, children: /* @__PURE__ */ s(bn, { asChild: !0, children: /* @__PURE__ */ s(
7049
+ /* @__PURE__ */ s(nt, { asChild: !0, children: /* @__PURE__ */ s(xn, { asChild: !0, children: /* @__PURE__ */ s(
7040
7050
  S,
7041
7051
  {
7042
7052
  size: "sm",
@@ -7050,7 +7060,7 @@ function kt({
7050
7060
  ) }) }),
7051
7061
  /* @__PURE__ */ s(st, { children: "Add field" })
7052
7062
  ] }),
7053
- /* @__PURE__ */ s(xn, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ c(Bn, { children: [
7063
+ /* @__PURE__ */ s(Nn, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ c(Bn, { children: [
7054
7064
  /* @__PURE__ */ s(Mo, { className: "border-none", placeholder: "Search..." }),
7055
7065
  /* @__PURE__ */ c(
7056
7066
  ii,
@@ -7066,7 +7076,7 @@ function kt({
7066
7076
  },
7067
7077
  children: [
7068
7078
  /* @__PURE__ */ s(Fn, { children: "No option found." }),
7069
- /* @__PURE__ */ c(_t, { children: [
7079
+ /* @__PURE__ */ c(Pt, { children: [
7070
7080
  o.length > 0 && /* @__PURE__ */ c(
7071
7081
  gt,
7072
7082
  {
@@ -7133,7 +7143,7 @@ const oh = () => {
7133
7143
  /<p>Partial block. Double click to edit.<\/p>/,
7134
7144
  ""
7135
7145
  );
7136
- }, Jt = ({
7146
+ }, Yt = ({
7137
7147
  keyword: e,
7138
7148
  onComplete: t,
7139
7149
  field: n
@@ -7307,24 +7317,24 @@ const oh = () => {
7307
7317
  else
7308
7318
  v(I.error), y("");
7309
7319
  }, [e, l]);
7310
- const w = () => {
7320
+ const N = () => {
7311
7321
  const I = Ta(e);
7312
7322
  if (I.isValid && I.parsed) {
7313
7323
  const L = hh(I.parsed, I.placeholders);
7314
7324
  t(L);
7315
7325
  }
7316
- }, _ = () => {
7326
+ }, k = () => {
7317
7327
  m != null && m.position && g.current && (g.current.focus(), g.current.setSelectionRange(m.position, m.position + 1));
7318
7328
  };
7319
7329
  return /* @__PURE__ */ s("div", { className: "space-y-2", children: /* @__PURE__ */ c(oi, { value: h, onValueChange: u, className: "w-full", children: [
7320
7330
  /* @__PURE__ */ c("div", { className: "mb-2 flex items-center justify-between", children: [
7321
7331
  /* @__PURE__ */ c(ci, { className: "grid w-[200px] grid-cols-2", children: [
7322
- /* @__PURE__ */ c(In, { value: "edit", className: "flex items-center gap-1", children: [
7332
+ /* @__PURE__ */ c(Ln, { value: "edit", className: "flex items-center gap-1", children: [
7323
7333
  /* @__PURE__ */ s(Nc, { className: "h-4 w-4" }),
7324
7334
  /* @__PURE__ */ s("span", { children: "Edit" })
7325
7335
  ] }),
7326
7336
  /* @__PURE__ */ c(
7327
- In,
7337
+ Ln,
7328
7338
  {
7329
7339
  value: "preview",
7330
7340
  className: "flex items-center gap-1",
@@ -7351,16 +7361,16 @@ const oh = () => {
7351
7361
  type: "button",
7352
7362
  variant: "outline",
7353
7363
  size: "sm",
7354
- onClick: w,
7364
+ onClick: N,
7355
7365
  disabled: !e.trim() || n || m !== null,
7356
7366
  children: "Format"
7357
7367
  }
7358
7368
  )
7359
7369
  ] })
7360
7370
  ] }),
7361
- /* @__PURE__ */ c(Ln, { value: "edit", className: "mt-0", children: [
7371
+ /* @__PURE__ */ c(Dn, { value: "edit", className: "mt-0", children: [
7362
7372
  /* @__PURE__ */ s(
7363
- Nn,
7373
+ wn,
7364
7374
  {
7365
7375
  ref: g,
7366
7376
  id: o,
@@ -7375,7 +7385,7 @@ const oh = () => {
7375
7385
  readOnly: r
7376
7386
  }
7377
7387
  ),
7378
- m && /* @__PURE__ */ c(Sn, { variant: "destructive", className: "mt-2", children: [
7388
+ m && /* @__PURE__ */ c(An, { variant: "destructive", className: "mt-2", children: [
7379
7389
  /* @__PURE__ */ s(wi, { className: "h-4 w-4" }),
7380
7390
  /* @__PURE__ */ c(di, { className: "flex flex-col", children: [
7381
7391
  /* @__PURE__ */ s("span", { className: "font-medium", children: "Invalid JSON" }),
@@ -7393,15 +7403,15 @@ const oh = () => {
7393
7403
  variant: "link",
7394
7404
  size: "sm",
7395
7405
  className: "mt-1 h-auto self-start p-0 text-sm",
7396
- onClick: _,
7406
+ onClick: k,
7397
7407
  children: "Show position"
7398
7408
  }
7399
7409
  )
7400
7410
  ] })
7401
7411
  ] })
7402
7412
  ] }),
7403
- /* @__PURE__ */ c(Ln, { value: "preview", className: "mt-0", children: [
7404
- /* @__PURE__ */ s(Nn, { rows: i, value: p, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
7413
+ /* @__PURE__ */ c(Dn, { value: "preview", className: "mt-0", children: [
7414
+ /* @__PURE__ */ s(wn, { rows: i, value: p, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
7405
7415
  /* @__PURE__ */ s("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
7406
7416
  ] })
7407
7417
  ] }) });
@@ -7420,7 +7430,7 @@ const oh = () => {
7420
7430
  newCursorPos: h
7421
7431
  };
7422
7432
  }, sl = () => {
7423
- const { t: e } = To(), [, t] = Vr(), { data: n } = Ve(), { data: r } = Gi(), { data: a, isFetching: i } = oh(), o = a == null ? void 0 : a.seo, l = rt(null), d = n == null ? void 0 : n.id, h = n == null ? void 0 : n.pageType, u = Bi(h), { selectedLang: m, fallbackLang: v } = Ge(), p = m || v, [y, g] = E(!1), [x, b] = E(!1), [w, _] = E(!1), [I, L] = E(null), [A, j] = E({
7433
+ const { t: e } = To(), [, t] = Vr(), { data: n } = Ve(), { data: r } = Gi(), { data: a, isFetching: i } = oh(), o = a == null ? void 0 : a.seo, l = rt(null), d = n == null ? void 0 : n.id, h = n == null ? void 0 : n.pageType, u = Bi(h), { selectedLang: m, fallbackLang: v } = Ge(), p = m || v, [y, g] = E(!1), [x, b] = E(!1), [N, k] = E(!1), [I, L] = E(null), [A, j] = E({
7424
7434
  keyword: "",
7425
7435
  title: "",
7426
7436
  description: "",
@@ -7436,7 +7446,7 @@ const oh = () => {
7436
7446
  jsonLD: "{}",
7437
7447
  metaOther: "{}",
7438
7448
  ...o
7439
- }), Z = rt({}), { mutate: $, isPending: P } = na(), R = P || y || x, { hasPermission: q } = cs(), D = q(Ce.EDIT_SEO);
7449
+ }), Z = rt({}), { mutate: $, isPending: _ } = na(), R = _ || y || x, { hasPermission: q } = cs(), D = q(Ce.EDIT_SEO);
7440
7450
  ae(() => {
7441
7451
  if (!i && o && d) {
7442
7452
  const f = {
@@ -7461,7 +7471,7 @@ const oh = () => {
7461
7471
  }, [i, o, p, d]), ae(() => {
7462
7472
  const f = (C) => {
7463
7473
  const { fromLang: U, toLang: F, switchHandler: G } = C.detail, M = Z.current[p];
7464
- (M ? !Ls(M, A) : !1) ? (L({ fromLang: U, toLang: F, switchHandler: G }), _(!0)) : G();
7474
+ (M ? !Ls(M, A) : !1) ? (L({ fromLang: U, toLang: F, switchHandler: G }), k(!0)) : G();
7465
7475
  };
7466
7476
  return window.addEventListener("seo-language-switch-check", f), () => {
7467
7477
  window.removeEventListener("seo-language-switch-check", f);
@@ -7471,7 +7481,7 @@ const oh = () => {
7471
7481
  if (!(!u || !p))
7472
7482
  try {
7473
7483
  g(!0);
7474
- const f = tn(u, p), C = {
7484
+ const f = nn(u, p), C = {
7475
7485
  ...A,
7476
7486
  keyword: K(f, "seo.keyword", ""),
7477
7487
  title: K(f, "seo.title", ""),
@@ -7493,7 +7503,7 @@ const oh = () => {
7493
7503
  if (!(!u || !p))
7494
7504
  try {
7495
7505
  b(!0);
7496
- const f = tn(u, p), C = {
7506
+ const f = nn(u, p), C = {
7497
7507
  ...A,
7498
7508
  jsonLD: K(f, "seo.jsonLD", "")
7499
7509
  };
@@ -7507,7 +7517,7 @@ const oh = () => {
7507
7517
  if (!(!u || !p))
7508
7518
  try {
7509
7519
  g(!0);
7510
- const f = tn(u, p), C = {
7520
+ const f = nn(u, p), C = {
7511
7521
  ...A,
7512
7522
  ogTitle: K(f, "seo.ogTitle", ""),
7513
7523
  ogDescription: K(f, "seo.ogDescription", ""),
@@ -7530,7 +7540,7 @@ const oh = () => {
7530
7540
  }
7531
7541
  }
7532
7542
  );
7533
- }, Pe = (f, C) => {
7543
+ }, _e = (f, C) => {
7534
7544
  const U = document.getElementById(C);
7535
7545
  if (U) {
7536
7546
  const { value: F, newCursorPos: G } = fh(U, f);
@@ -7562,7 +7572,7 @@ const oh = () => {
7562
7572
  [f.target.name]: f.target.name === "noIndex" || f.target.name === "noFollow" ? f.target.checked : f.target.value
7563
7573
  };
7564
7574
  j(C);
7565
- }, N = (f) => (C) => {
7575
+ }, w = (f) => (C) => {
7566
7576
  le(C.fieldValue) || he({
7567
7577
  target: {
7568
7578
  name: f,
@@ -7576,7 +7586,7 @@ const oh = () => {
7576
7586
  );
7577
7587
  };
7578
7588
  return /* @__PURE__ */ c("div", { className: "relative flex h-full flex-col", "data-panel-id": "seo", children: [
7579
- !D && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center backdrop-blur-sm", children: /* @__PURE__ */ s(Sn, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ s(di, { children: e("You don't have permission to edit SEO settings. Contact your administrator for access.") }) }) }),
7589
+ !D && /* @__PURE__ */ s("div", { className: "absolute inset-0 z-10 flex items-center justify-center backdrop-blur-sm", children: /* @__PURE__ */ s(An, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ s(di, { children: e("You don't have permission to edit SEO settings. Contact your administrator for access.") }) }) }),
7580
7590
  /* @__PURE__ */ c("div", { className: "no-scrollbar flex-grow overflow-y-auto px-2 pb-20", children: [
7581
7591
  /* @__PURE__ */ c("div", { className: "mb-4 flex w-full items-center justify-between rounded-md bg-gray-100 px-2 py-1 text-left text-sm", children: [
7582
7592
  /* @__PURE__ */ c("span", { children: [
@@ -7587,11 +7597,11 @@ const oh = () => {
7587
7597
  ] }),
7588
7598
  /* @__PURE__ */ s("form", { className: "space-y-8", children: /* @__PURE__ */ c(oi, { defaultValue: "seo", className: "w-full", children: [
7589
7599
  /* @__PURE__ */ c(ci, { className: "mb-4 grid w-full grid-cols-3", children: [
7590
- /* @__PURE__ */ s(In, { value: "seo", children: e("SEO") }),
7591
- /* @__PURE__ */ s(In, { value: "opengraph", children: e("Meta Tags") }),
7592
- /* @__PURE__ */ s(In, { value: "jsonld", children: e("JSON-LD") })
7600
+ /* @__PURE__ */ s(Ln, { value: "seo", children: e("SEO") }),
7601
+ /* @__PURE__ */ s(Ln, { value: "opengraph", children: e("Meta Tags") }),
7602
+ /* @__PURE__ */ s(Ln, { value: "jsonld", children: e("JSON-LD") })
7593
7603
  ] }),
7594
- /* @__PURE__ */ s(Ln, { value: "seo", children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
7604
+ /* @__PURE__ */ s(Dn, { value: "seo", children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
7595
7605
  D && /* @__PURE__ */ s("div", { className: "mb-4 flex justify-end", children: /* @__PURE__ */ s(
7596
7606
  S,
7597
7607
  {
@@ -7611,7 +7621,7 @@ const oh = () => {
7611
7621
  {
7612
7622
  dataType: "value",
7613
7623
  data: r ?? {},
7614
- onSelect: (f) => Pe(f, "keyword")
7624
+ onSelect: (f) => _e(f, "keyword")
7615
7625
  }
7616
7626
  )
7617
7627
  ] }),
@@ -7633,13 +7643,13 @@ const oh = () => {
7633
7643
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
7634
7644
  /* @__PURE__ */ s(ce, { className: "text-xs", htmlFor: "title", children: e("SEO Title") }),
7635
7645
  /* @__PURE__ */ c("div", { className: "flex items-center justify-end gap-2", children: [
7636
- /* @__PURE__ */ s(Jt, { keyword: A.keyword, onComplete: N("title"), field: "title" }),
7646
+ /* @__PURE__ */ s(Yt, { keyword: A.keyword, onComplete: w("title"), field: "title" }),
7637
7647
  D && /* @__PURE__ */ s(
7638
7648
  kt,
7639
7649
  {
7640
7650
  dataType: "value",
7641
7651
  data: r ?? {},
7642
- onSelect: (f) => Pe(f, "title")
7652
+ onSelect: (f) => _e(f, "title")
7643
7653
  }
7644
7654
  )
7645
7655
  ] })
@@ -7663,10 +7673,10 @@ const oh = () => {
7663
7673
  /* @__PURE__ */ s(ce, { className: "text-xs", htmlFor: "description", children: e("SEO Description") }),
7664
7674
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
7665
7675
  /* @__PURE__ */ s(
7666
- Jt,
7676
+ Yt,
7667
7677
  {
7668
7678
  keyword: A.keyword,
7669
- onComplete: N("description"),
7679
+ onComplete: w("description"),
7670
7680
  field: "description"
7671
7681
  }
7672
7682
  ),
@@ -7674,13 +7684,13 @@ const oh = () => {
7674
7684
  kt,
7675
7685
  {
7676
7686
  data: r ?? {},
7677
- onSelect: (f) => Pe(f, "description")
7687
+ onSelect: (f) => _e(f, "description")
7678
7688
  }
7679
7689
  )
7680
7690
  ] })
7681
7691
  ] }),
7682
7692
  /* @__PURE__ */ s(
7683
- Nn,
7693
+ wn,
7684
7694
  {
7685
7695
  id: "description",
7686
7696
  name: "description",
@@ -7701,7 +7711,7 @@ const oh = () => {
7701
7711
  {
7702
7712
  dataType: "value",
7703
7713
  data: r ?? {},
7704
- onSelect: (f) => Pe(f, "canonicalUrl")
7714
+ onSelect: (f) => _e(f, "canonicalUrl")
7705
7715
  }
7706
7716
  )
7707
7717
  ] }),
@@ -7756,7 +7766,7 @@ const oh = () => {
7756
7766
  /* @__PURE__ */ s("p", { className: "text-[10px] font-light leading-4 text-gray-400", children: e("Check this if you don't want search engines to follow links on this page.") })
7757
7767
  ] })
7758
7768
  ] }) }),
7759
- /* @__PURE__ */ s(Ln, { value: "opengraph", children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
7769
+ /* @__PURE__ */ s(Dn, { value: "opengraph", children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
7760
7770
  D && /* @__PURE__ */ s("div", { className: "mb-4 flex justify-end", children: /* @__PURE__ */ s(
7761
7771
  S,
7762
7772
  {
@@ -7776,10 +7786,10 @@ const oh = () => {
7776
7786
  /* @__PURE__ */ s(ce, { className: "text-xs", htmlFor: "ogTitle", children: e("OG Title") }),
7777
7787
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
7778
7788
  /* @__PURE__ */ s(
7779
- Jt,
7789
+ Yt,
7780
7790
  {
7781
7791
  keyword: A.keyword,
7782
- onComplete: N("ogTitle"),
7792
+ onComplete: w("ogTitle"),
7783
7793
  field: "ogTitle"
7784
7794
  }
7785
7795
  ),
@@ -7788,7 +7798,7 @@ const oh = () => {
7788
7798
  {
7789
7799
  dataType: "value",
7790
7800
  data: r ?? {},
7791
- onSelect: (f) => Pe(f, "ogTitle")
7801
+ onSelect: (f) => _e(f, "ogTitle")
7792
7802
  }
7793
7803
  )
7794
7804
  ] })
@@ -7812,10 +7822,10 @@ const oh = () => {
7812
7822
  /* @__PURE__ */ s(ce, { className: "text-xs", htmlFor: "ogDescription", children: e("OG Description") }),
7813
7823
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
7814
7824
  /* @__PURE__ */ s(
7815
- Jt,
7825
+ Yt,
7816
7826
  {
7817
7827
  keyword: A.keyword,
7818
- onComplete: N("ogDescription"),
7828
+ onComplete: w("ogDescription"),
7819
7829
  field: "ogDescription"
7820
7830
  }
7821
7831
  ),
@@ -7824,13 +7834,13 @@ const oh = () => {
7824
7834
  {
7825
7835
  dataType: "value",
7826
7836
  data: r ?? {},
7827
- onSelect: (f) => Pe(f, "ogDescription")
7837
+ onSelect: (f) => _e(f, "ogDescription")
7828
7838
  }
7829
7839
  )
7830
7840
  ] })
7831
7841
  ] }),
7832
7842
  /* @__PURE__ */ s(
7833
- Nn,
7843
+ wn,
7834
7844
  {
7835
7845
  id: "ogDescription",
7836
7846
  name: "ogDescription",
@@ -7883,10 +7893,10 @@ const oh = () => {
7883
7893
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
7884
7894
  /* @__PURE__ */ s(ce, { className: "text-xs", htmlFor: "metaOther", children: e("Meta Tags") }),
7885
7895
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ s(
7886
- Jt,
7896
+ Yt,
7887
7897
  {
7888
7898
  keyword: A.keyword,
7889
- onComplete: N("metaOther"),
7899
+ onComplete: w("metaOther"),
7890
7900
  field: "metaOther"
7891
7901
  }
7892
7902
  ) })
@@ -7906,14 +7916,14 @@ const oh = () => {
7906
7916
  readOnly: !D,
7907
7917
  pageData: r || {},
7908
7918
  rows: 8,
7909
- handleFieldInsert: Pe
7919
+ handleFieldInsert: _e
7910
7920
  }
7911
7921
  )
7912
7922
  ] })
7913
7923
  ] })
7914
7924
  ] })
7915
7925
  ] }) }),
7916
- /* @__PURE__ */ s(Ln, { value: "jsonld", children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
7926
+ /* @__PURE__ */ s(Dn, { value: "jsonld", children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
7917
7927
  D && /* @__PURE__ */ s("div", { className: "mb-4 flex justify-end", children: /* @__PURE__ */ s(
7918
7928
  S,
7919
7929
  {
@@ -7928,7 +7938,7 @@ const oh = () => {
7928
7938
  /* @__PURE__ */ c("div", { className: "space-y-1", children: [
7929
7939
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
7930
7940
  /* @__PURE__ */ s(ce, { className: "text-xs", htmlFor: "jsonLD", children: e("JSON-LD") }),
7931
- /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ s(Jt, { keyword: A.keyword, onComplete: N("jsonLD"), field: "jsonLD" }) })
7941
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ s(Yt, { keyword: A.keyword, onComplete: w("jsonLD"), field: "jsonLD" }) })
7932
7942
  ] }),
7933
7943
  /* @__PURE__ */ s("div", { className: "hidden", children: JSON.stringify(r) }),
7934
7944
  /* @__PURE__ */ s(
@@ -7944,7 +7954,7 @@ const oh = () => {
7944
7954
  readOnly: !D,
7945
7955
  pageData: r || {},
7946
7956
  rows: 12,
7947
- handleFieldInsert: Pe
7957
+ handleFieldInsert: _e
7948
7958
  }
7949
7959
  )
7950
7960
  ] })
@@ -7959,7 +7969,7 @@ const oh = () => {
7959
7969
  {
7960
7970
  onClick: Ae,
7961
7971
  disabled: !ka(A == null ? void 0 : A.jsonLD) || (Z.current[p] ? Ls(Z.current[p], A) : !1) || R || !D,
7962
- children: e(P ? "Saving..." : "Save")
7972
+ children: e(_ ? "Saving..." : "Save")
7963
7973
  }
7964
7974
  ),
7965
7975
  /* @__PURE__ */ s(
@@ -7976,20 +7986,20 @@ const oh = () => {
7976
7986
  /* @__PURE__ */ s(
7977
7987
  dh,
7978
7988
  {
7979
- isOpen: w,
7989
+ isOpen: N,
7980
7990
  onClose: () => {
7981
- _(!1), L(null);
7991
+ k(!1), L(null);
7982
7992
  },
7983
7993
  onSave: async () => {
7984
- I && (await Ae(), I.switchHandler(), _(!1), L(null));
7994
+ I && (await Ae(), I.switchHandler(), k(!1), L(null));
7985
7995
  },
7986
7996
  onDiscard: () => {
7987
7997
  if (I) {
7988
7998
  const f = Z.current[p];
7989
- f && j(f), I.switchHandler(), _(!1), L(null);
7999
+ f && j(f), I.switchHandler(), k(!1), L(null);
7990
8000
  }
7991
8001
  },
7992
- isSaving: P,
8002
+ isSaving: _,
7993
8003
  fromLanguage: (I == null ? void 0 : I.fromLang) || p,
7994
8004
  toLanguage: (I == null ? void 0 : I.toLang) || ""
7995
8005
  }
@@ -8071,17 +8081,17 @@ var ne = {
8071
8081
  effects: void 0,
8072
8082
  done: !1,
8073
8083
  getContextId() {
8074
- return _a(this.context.count);
8084
+ return Pa(this.context.count);
8075
8085
  },
8076
8086
  getNextContextId() {
8077
- return _a(this.context.count++);
8087
+ return Pa(this.context.count++);
8078
8088
  }
8079
8089
  };
8080
- function _a(e) {
8090
+ function Pa(e) {
8081
8091
  const t = String(e), n = t.length - 1;
8082
8092
  return ne.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
8083
8093
  }
8084
- function Pn(e) {
8094
+ function In(e) {
8085
8095
  ne.context = e;
8086
8096
  }
8087
8097
  var il = !1, xh = (e, t) => e === t, Rs = Symbol("solid-proxy"), ll = typeof Proxy == "function", ol = Symbol("solid-track"), Gs = {
@@ -8092,7 +8102,7 @@ var il = !1, xh = (e, t) => e === t, Rs = Symbol("solid-proxy"), ll = typeof Pro
8092
8102
  context: null,
8093
8103
  owner: null
8094
8104
  }, vr = {}, fe = null, br = null, Nh = null, we = null, We = null, bt = null, rr = 0;
8095
- function zt(e, t) {
8105
+ function Vt(e, t) {
8096
8106
  const n = we, r = fe, a = e.length === 0, i = t === void 0 ? r : t, o = a ? dl : {
8097
8107
  owned: null,
8098
8108
  cleanups: null,
@@ -8118,21 +8128,21 @@ function Le(e, t) {
8118
8128
  }
8119
8129
  function wh(e, t, n) {
8120
8130
  const r = ar(e, t, !0, At);
8121
- kn(r);
8131
+ Pn(r);
8122
8132
  }
8123
- function Vt(e, t, n) {
8133
+ function Kt(e, t, n) {
8124
8134
  const r = ar(e, t, !1, At);
8125
- kn(r);
8135
+ Pn(r);
8126
8136
  }
8127
8137
  function ul(e, t, n) {
8128
8138
  cl = Ih;
8129
8139
  const r = ar(e, t, !1, At);
8130
- (!n || !n.render) && (r.user = !0), bt ? bt.push(r) : kn(r);
8140
+ (!n || !n.render) && (r.user = !0), bt ? bt.push(r) : Pn(r);
8131
8141
  }
8132
8142
  function Me(e, t, n) {
8133
8143
  n = n ? Object.assign({}, Gs, n) : Gs;
8134
8144
  const r = ar(e, t, !0, 0);
8135
- return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, kn(r), fl.bind(r);
8145
+ return r.observers = null, r.observerSlots = null, r.comparator = n.equals || void 0, Pn(r), fl.bind(r);
8136
8146
  }
8137
8147
  function Eh(e) {
8138
8148
  return e && typeof e == "object" && "then" in e;
@@ -8141,29 +8151,29 @@ function Sh(e, t, n) {
8141
8151
  let r, a, i;
8142
8152
  r = !0, a = e, i = {};
8143
8153
  let o = null, l = vr, d = null, h = !1, u = "initialValue" in i, m = typeof r == "function" && Me(r);
8144
- const v = /* @__PURE__ */ new Set(), [p, y] = (i.storage || Le)(i.initialValue), [g, x] = Le(void 0), [b, w] = Le(void 0, {
8154
+ const v = /* @__PURE__ */ new Set(), [p, y] = (i.storage || Le)(i.initialValue), [g, x] = Le(void 0), [b, N] = Le(void 0, {
8145
8155
  equals: !1
8146
- }), [_, I] = Le(u ? "ready" : "unresolved");
8156
+ }), [k, I] = Le(u ? "ready" : "unresolved");
8147
8157
  ne.context && (d = ne.getNextContextId(), i.ssrLoadFrom === "initial" ? l = i.initialValue : ne.load && ne.has(d) && (l = ne.load(d)));
8148
- function L(P, R, q, D) {
8149
- return o === P && (o = null, D !== void 0 && (u = !0), (P === l || R === l) && i.onHydrated && queueMicrotask(() => i.onHydrated(D, {
8158
+ function L(_, R, q, D) {
8159
+ return o === _ && (o = null, D !== void 0 && (u = !0), (_ === l || R === l) && i.onHydrated && queueMicrotask(() => i.onHydrated(D, {
8150
8160
  value: R
8151
8161
  })), l = vr, A(R, q)), R;
8152
8162
  }
8153
- function A(P, R) {
8163
+ function A(_, R) {
8154
8164
  yt(() => {
8155
- R === void 0 && y(() => P), I(R !== void 0 ? "errored" : u ? "ready" : "unresolved"), x(R);
8165
+ R === void 0 && y(() => _), I(R !== void 0 ? "errored" : u ? "ready" : "unresolved"), x(R);
8156
8166
  for (const q of v.keys()) q.decrement();
8157
8167
  v.clear();
8158
8168
  }, !1);
8159
8169
  }
8160
8170
  function j() {
8161
- const P = kh, R = p(), q = g();
8171
+ const _ = kh, R = p(), q = g();
8162
8172
  if (q !== void 0 && !o) throw q;
8163
8173
  return we && we.user, R;
8164
8174
  }
8165
- function Z(P = !0) {
8166
- if (P !== !1 && h) return;
8175
+ function Z(_ = !0) {
8176
+ if (_ !== !1 && h) return;
8167
8177
  h = !1;
8168
8178
  const R = m ? m() : r;
8169
8179
  if (R == null || R === !1) {
@@ -8175,46 +8185,46 @@ function Sh(e, t, n) {
8175
8185
  try {
8176
8186
  return a(R, {
8177
8187
  value: p(),
8178
- refetching: P
8188
+ refetching: _
8179
8189
  });
8180
8190
  } catch (te) {
8181
8191
  q = te;
8182
8192
  }
8183
8193
  });
8184
8194
  if (q !== void 0) {
8185
- L(o, void 0, Ps(q), R);
8195
+ L(o, void 0, _s(q), R);
8186
8196
  return;
8187
8197
  } else if (!Eh(D))
8188
8198
  return L(o, D, void 0, R), D;
8189
- return o = D, "v" in D ? (D.s === 1 ? L(o, D.v, void 0, R) : L(o, void 0, Ps(D.v), R), D) : (h = !0, queueMicrotask(() => h = !1), yt(() => {
8190
- I(u ? "refreshing" : "pending"), w();
8191
- }, !1), D.then((te) => L(D, te, void 0, R), (te) => L(D, void 0, Ps(te), R)));
8199
+ return o = D, "v" in D ? (D.s === 1 ? L(o, D.v, void 0, R) : L(o, void 0, _s(D.v), R), D) : (h = !0, queueMicrotask(() => h = !1), yt(() => {
8200
+ I(u ? "refreshing" : "pending"), N();
8201
+ }, !1), D.then((te) => L(D, te, void 0, R), (te) => L(D, void 0, _s(te), R)));
8192
8202
  }
8193
8203
  Object.defineProperties(j, {
8194
8204
  state: {
8195
- get: () => _()
8205
+ get: () => k()
8196
8206
  },
8197
8207
  error: {
8198
8208
  get: () => g()
8199
8209
  },
8200
8210
  loading: {
8201
8211
  get() {
8202
- const P = _();
8203
- return P === "pending" || P === "refreshing";
8212
+ const _ = k();
8213
+ return _ === "pending" || _ === "refreshing";
8204
8214
  }
8205
8215
  },
8206
8216
  latest: {
8207
8217
  get() {
8208
8218
  if (!u) return j();
8209
- const P = g();
8210
- if (P && !o) throw P;
8219
+ const _ = g();
8220
+ if (_ && !o) throw _;
8211
8221
  return p();
8212
8222
  }
8213
8223
  }
8214
8224
  });
8215
8225
  let $ = fe;
8216
8226
  return m ? wh(() => ($ = fe, Z(!1))) : Z(!1), [j, {
8217
- refetch: (P) => hl($, () => Z(P)),
8227
+ refetch: (_) => hl($, () => Z(_)),
8218
8228
  mutate: y
8219
8229
  }];
8220
8230
  }
@@ -8252,7 +8262,7 @@ function Ah(e) {
8252
8262
  function zn(e) {
8253
8263
  return fe === null || (fe.cleanups === null ? fe.cleanups = [e] : fe.cleanups.push(e)), e;
8254
8264
  }
8255
- function Pa() {
8265
+ function _a() {
8256
8266
  return fe;
8257
8267
  }
8258
8268
  function hl(e, t) {
@@ -8300,7 +8310,7 @@ function ml(e) {
8300
8310
  var kh;
8301
8311
  function fl() {
8302
8312
  if (this.sources && this.state)
8303
- if (this.state === At) kn(this);
8313
+ if (this.state === At) Pn(this);
8304
8314
  else {
8305
8315
  const e = We;
8306
8316
  We = null, yt(() => Bs(this), !1), We = e;
@@ -8322,13 +8332,13 @@ function gl(e, t, n) {
8322
8332
  throw We = [], new Error();
8323
8333
  }, !1)), t;
8324
8334
  }
8325
- function kn(e) {
8335
+ function Pn(e) {
8326
8336
  if (!e.fn) return;
8327
8337
  Vn(e);
8328
8338
  const t = rr;
8329
- _h(e, e.value, t);
8339
+ Ph(e, e.value, t);
8330
8340
  }
8331
- function _h(e, t, n) {
8341
+ function Ph(e, t, n) {
8332
8342
  let r;
8333
8343
  const a = fe, i = we;
8334
8344
  we = fe = e;
@@ -8366,7 +8376,7 @@ function Ms(e) {
8366
8376
  e.state && t.push(e);
8367
8377
  for (let n = t.length - 1; n >= 0; n--)
8368
8378
  if (e = t[n], e.state === At)
8369
- kn(e);
8379
+ Pn(e);
8370
8380
  else if (e.state === Us) {
8371
8381
  const r = We;
8372
8382
  We = null, yt(() => Bs(e, t[0]), !1), We = r;
@@ -8378,12 +8388,12 @@ function yt(e, t) {
8378
8388
  t || (We = []), bt ? n = !0 : bt = [], rr++;
8379
8389
  try {
8380
8390
  const r = e();
8381
- return Ph(n), r;
8391
+ return _h(n), r;
8382
8392
  } catch (r) {
8383
8393
  n || (bt = null), We = null, ca(r);
8384
8394
  }
8385
8395
  }
8386
- function Ph(e) {
8396
+ function _h(e) {
8387
8397
  if (We && (pl(We), We = null), e) return;
8388
8398
  const t = bt;
8389
8399
  bt = null, t.length && yt(() => cl(t), !1);
@@ -8402,7 +8412,7 @@ function Ih(e) {
8402
8412
  ne.effects || (ne.effects = []), ne.effects.push(...e.slice(0, n));
8403
8413
  return;
8404
8414
  }
8405
- Pn();
8415
+ In();
8406
8416
  }
8407
8417
  for (ne.effects && (ne.done || !ne.count) && (e = [...ne.effects, ...e], n += ne.effects.length, delete ne.effects), t = 0; t < n; t++) Ms(e[t]);
8408
8418
  }
@@ -8446,13 +8456,13 @@ function Vn(e) {
8446
8456
  }
8447
8457
  e.state = 0;
8448
8458
  }
8449
- function Ps(e) {
8459
+ function _s(e) {
8450
8460
  return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
8451
8461
  cause: e
8452
8462
  });
8453
8463
  }
8454
8464
  function ca(e, t = fe) {
8455
- throw Ps(e);
8465
+ throw _s(e);
8456
8466
  }
8457
8467
  function Dr(e) {
8458
8468
  if (typeof e == "function" && !e.length) return Dr(e());
@@ -8469,7 +8479,7 @@ function Dr(e) {
8469
8479
  function Lh(e, t) {
8470
8480
  return function(r) {
8471
8481
  let a;
8472
- return Vt(() => a = Fe(() => (fe.context = {
8482
+ return Kt(() => a = Fe(() => (fe.context = {
8473
8483
  ...fe.context,
8474
8484
  [e]: r.value
8475
8485
  }, ml(() => r.children))), void 0), a;
@@ -8484,23 +8494,23 @@ function Dh(e, t, n = {}) {
8484
8494
  return zn(() => Fs(i)), () => {
8485
8495
  let d = e() || [], h = d.length, u, m;
8486
8496
  return d[ol], Fe(() => {
8487
- let p, y, g, x, b, w, _, I, L;
8497
+ let p, y, g, x, b, N, k, I, L;
8488
8498
  if (h === 0)
8489
- o !== 0 && (Fs(i), i = [], r = [], a = [], o = 0, l && (l = [])), n.fallback && (r = [Or], a[0] = zt((A) => (i[0] = A, n.fallback())), o = 1);
8499
+ o !== 0 && (Fs(i), i = [], r = [], a = [], o = 0, l && (l = [])), n.fallback && (r = [Or], a[0] = Vt((A) => (i[0] = A, n.fallback())), o = 1);
8490
8500
  else if (o === 0) {
8491
8501
  for (a = new Array(h), m = 0; m < h; m++)
8492
- r[m] = d[m], a[m] = zt(v);
8502
+ r[m] = d[m], a[m] = Vt(v);
8493
8503
  o = h;
8494
8504
  } else {
8495
- for (g = new Array(h), x = new Array(h), l && (b = new Array(h)), w = 0, _ = Math.min(o, h); w < _ && r[w] === d[w]; w++) ;
8496
- for (_ = o - 1, I = h - 1; _ >= w && I >= w && r[_] === d[I]; _--, I--)
8497
- g[I] = a[_], x[I] = i[_], l && (b[I] = l[_]);
8498
- for (p = /* @__PURE__ */ new Map(), y = new Array(I + 1), m = I; m >= w; m--)
8505
+ for (g = new Array(h), x = new Array(h), l && (b = new Array(h)), N = 0, k = Math.min(o, h); N < k && r[N] === d[N]; N++) ;
8506
+ for (k = o - 1, I = h - 1; k >= N && I >= N && r[k] === d[I]; k--, I--)
8507
+ g[I] = a[k], x[I] = i[k], l && (b[I] = l[k]);
8508
+ for (p = /* @__PURE__ */ new Map(), y = new Array(I + 1), m = I; m >= N; m--)
8499
8509
  L = d[m], u = p.get(L), y[m] = u === void 0 ? -1 : u, p.set(L, m);
8500
- for (u = w; u <= _; u++)
8510
+ for (u = N; u <= k; u++)
8501
8511
  L = r[u], m = p.get(L), m !== void 0 && m !== -1 ? (g[m] = a[u], x[m] = i[u], l && (b[m] = l[u]), m = y[m], p.set(L, m)) : i[u]();
8502
- for (m = w; m < h; m++)
8503
- m in g ? (a[m] = g[m], i[m] = x[m], l && (l[m] = b[m], l[m](m))) : a[m] = zt(v);
8512
+ for (m = N; m < h; m++)
8513
+ m in g ? (a[m] = g[m], i[m] = x[m], l && (l[m] = b[m], l[m](m))) : a[m] = Vt(v);
8504
8514
  a = a.slice(0, o = h), r = d.slice(0);
8505
8515
  }
8506
8516
  return a;
@@ -8520,9 +8530,9 @@ function Oh(e, t, n = {}) {
8520
8530
  const h = e() || [], u = h.length;
8521
8531
  return h[ol], Fe(() => {
8522
8532
  if (u === 0)
8523
- return l !== 0 && (Fs(i), i = [], r = [], a = [], l = 0, o = []), n.fallback && (r = [Or], a[0] = zt((v) => (i[0] = v, n.fallback())), l = 1), a;
8533
+ return l !== 0 && (Fs(i), i = [], r = [], a = [], l = 0, o = []), n.fallback && (r = [Or], a[0] = Vt((v) => (i[0] = v, n.fallback())), l = 1), a;
8524
8534
  for (r[0] === Or && (i[0](), i = [], r = [], a = [], l = 0), d = 0; d < u; d++)
8525
- d < r.length && r[d] !== h[d] ? o[d](() => h[d]) : d >= r.length && (a[d] = zt(m));
8535
+ d < r.length && r[d] !== h[d] ? o[d](() => h[d]) : d >= r.length && (a[d] = Vt(m));
8526
8536
  for (; d < r.length; d++)
8527
8537
  i[d]();
8528
8538
  return l = o.length = i.length = u, r = h.slice(0), a = a.slice(0, l);
@@ -8668,7 +8678,7 @@ function xl(e) {
8668
8678
  if (i) {
8669
8679
  const [l, d] = Le();
8670
8680
  ne.count || (ne.count = 0), ne.count++, (n || (n = e())).then((h) => {
8671
- !ne.done && Pn(i), ne.count--, d(() => h.default), Pn();
8681
+ !ne.done && In(i), ne.count--, d(() => h.default), In();
8672
8682
  }), t = l;
8673
8683
  } else if (!t) {
8674
8684
  const [l] = Sh(() => (n || (n = e())).then((d) => d.default));
@@ -8678,9 +8688,9 @@ function xl(e) {
8678
8688
  return Me(() => (o = t()) ? Fe(() => {
8679
8689
  if (!i || ne.done) return o(a);
8680
8690
  const l = ne.context;
8681
- Pn(i);
8691
+ In(i);
8682
8692
  const d = o(a);
8683
- return Pn(l), d;
8693
+ return In(l), d;
8684
8694
  }) : "");
8685
8695
  };
8686
8696
  return r.preload = () => n || ((n = e()).then((a) => t = () => a.default), n), r;
@@ -8905,7 +8915,7 @@ function Wh(e, t, n) {
8905
8915
  var Gn = "_$DX_DELEGATE";
8906
8916
  function wl(e, t, n, r = {}) {
8907
8917
  let a;
8908
- return zt((i) => {
8918
+ return Vt((i) => {
8909
8919
  a = i, t === document ? e() : Ur(t, e(), t.firstChild ? null : void 0, n);
8910
8920
  }, r.owner), () => {
8911
8921
  a(), t.textContent = "";
@@ -8933,16 +8943,16 @@ function tg(e = window.document) {
8933
8943
  }
8934
8944
  }
8935
8945
  function Gr(e, t, n) {
8936
- Ht(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
8946
+ Qt(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
8937
8947
  }
8938
8948
  function Qh(e, t, n, r) {
8939
- Ht(e) || (r == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, r));
8949
+ Qt(e) || (r == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, r));
8940
8950
  }
8941
8951
  function Jh(e, t, n) {
8942
- Ht(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
8952
+ Qt(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
8943
8953
  }
8944
8954
  function Yh(e, t) {
8945
- Ht(e) || (t == null ? e.removeAttribute("class") : e.className = t);
8955
+ Qt(e) || (t == null ? e.removeAttribute("class") : e.className = t);
8946
8956
  }
8947
8957
  function Xh(e, t, n, r) {
8948
8958
  if (r)
@@ -8979,14 +8989,14 @@ function em(e, t, n) {
8979
8989
  }
8980
8990
  function tm(e, t = {}, n, r) {
8981
8991
  const a = {};
8982
- return r || Vt(() => a.children = Kn(e, t.children, a.children)), Vt(() => typeof t.ref == "function" && nm(t.ref, e)), Vt(() => sm(e, t, n, !0, a, !0)), a;
8992
+ return r || Kt(() => a.children = Kn(e, t.children, a.children)), Kt(() => typeof t.ref == "function" && nm(t.ref, e)), Kt(() => sm(e, t, n, !0, a, !0)), a;
8983
8993
  }
8984
8994
  function nm(e, t, n) {
8985
8995
  return Fe(() => e(t, n));
8986
8996
  }
8987
8997
  function Ur(e, t, n, r) {
8988
8998
  if (n !== void 0 && !r && (r = []), typeof t != "function") return Kn(e, t, r, n);
8989
- Vt((a) => Kn(e, t(), a, n), r);
8999
+ Kt((a) => Kn(e, t(), a, n), r);
8990
9000
  }
8991
9001
  function sm(e, t, n, r, a = {}, i = !1) {
8992
9002
  t || (t = {});
@@ -9004,9 +9014,9 @@ function sm(e, t, n, r, a = {}, i = !1) {
9004
9014
  }
9005
9015
  function rm(e) {
9006
9016
  let t, n;
9007
- return !Ht() || !(t = ne.registry.get(n = im())) ? e() : (ne.completed && ne.completed.add(t), ne.registry.delete(n), t);
9017
+ return !Qt() || !(t = ne.registry.get(n = im())) ? e() : (ne.completed && ne.completed.add(t), ne.registry.delete(n), t);
9008
9018
  }
9009
- function Ht(e) {
9019
+ function Qt(e) {
9010
9020
  return !!ne.context && !ne.done && (!e || e.isConnected);
9011
9021
  }
9012
9022
  function am(e) {
@@ -9043,7 +9053,7 @@ function La(e, t, n, r, a, i, o) {
9043
9053
  else if ((m = t.slice(0, 5) === "prop:") || (h = Fh.has(t)) || !a && ((u = jh(t, e.tagName)) || (d = Bh.has(t))) || (l = e.nodeName.includes("-") || "is" in o)) {
9044
9054
  if (m)
9045
9055
  t = t.slice(5), d = !0;
9046
- else if (Ht(e)) return n;
9056
+ else if (Qt(e)) return n;
9047
9057
  t === "class" || t === "className" ? Yh(e, n) : l && !d && !h ? e[am(t)] = n : e[u || t] = n;
9048
9058
  } else {
9049
9059
  const v = a && t.indexOf(":") > -1 && Kh[t.split(":")[0]];
@@ -9088,7 +9098,7 @@ function El(e) {
9088
9098
  i(r);
9089
9099
  }
9090
9100
  function Kn(e, t, n, r, a) {
9091
- const i = Ht(e);
9101
+ const i = Qt(e);
9092
9102
  if (i) {
9093
9103
  !n && (n = [...e.childNodes]);
9094
9104
  let d = [];
@@ -9106,15 +9116,15 @@ function Kn(e, t, n, r, a) {
9106
9116
  return n;
9107
9117
  if (l) {
9108
9118
  let d = n[0];
9109
- d && d.nodeType === 3 ? d.data !== t && (d.data = t) : d = document.createTextNode(t), n = Yt(e, n, r, d);
9119
+ d && d.nodeType === 3 ? d.data !== t && (d.data = t) : d = document.createTextNode(t), n = Xt(e, n, r, d);
9110
9120
  } else
9111
9121
  n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
9112
9122
  } else if (t == null || o === "boolean") {
9113
9123
  if (i) return n;
9114
- n = Yt(e, n, r);
9124
+ n = Xt(e, n, r);
9115
9125
  } else {
9116
9126
  if (o === "function")
9117
- return Vt(() => {
9127
+ return Kt(() => {
9118
9128
  let d = t();
9119
9129
  for (; typeof d == "function"; ) d = d();
9120
9130
  n = Kn(e, d, n, r);
@@ -9122,7 +9132,7 @@ function Kn(e, t, n, r, a) {
9122
9132
  if (Array.isArray(t)) {
9123
9133
  const d = [], h = n && Array.isArray(n);
9124
9134
  if (Mr(d, t, n, a))
9125
- return Vt(() => n = Kn(e, d, n, r, !0)), () => n;
9135
+ return Kt(() => n = Kn(e, d, n, r, !0)), () => n;
9126
9136
  if (i) {
9127
9137
  if (!d.length) return n;
9128
9138
  if (r === void 0) return n = [...e.childNodes];
@@ -9133,14 +9143,14 @@ function Kn(e, t, n, r, a) {
9133
9143
  return n = m;
9134
9144
  }
9135
9145
  if (d.length === 0) {
9136
- if (n = Yt(e, n, r), l) return n;
9137
- } else h ? n.length === 0 ? Da(e, d, r) : Wh(e, n, d) : (n && Yt(e), Da(e, d));
9146
+ if (n = Xt(e, n, r), l) return n;
9147
+ } else h ? n.length === 0 ? Da(e, d, r) : Wh(e, n, d) : (n && Xt(e), Da(e, d));
9138
9148
  n = d;
9139
9149
  } else if (t.nodeType) {
9140
9150
  if (i && t.parentNode) return n = l ? [t] : t;
9141
9151
  if (Array.isArray(n)) {
9142
- if (l) return n = Yt(e, n, r, t);
9143
- Yt(e, n, null, t);
9152
+ if (l) return n = Xt(e, n, r, t);
9153
+ Xt(e, n, null, t);
9144
9154
  } else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
9145
9155
  n = t;
9146
9156
  }
@@ -9171,7 +9181,7 @@ function Mr(e, t, n, r) {
9171
9181
  function Da(e, t, n = null) {
9172
9182
  for (let r = 0, a = t.length; r < a; r++) e.insertBefore(t[r], n);
9173
9183
  }
9174
- function Yt(e, t, n, r) {
9184
+ function Xt(e, t, n, r) {
9175
9185
  if (n === void 0) return e.textContent = "";
9176
9186
  const a = r || document.createTextNode("");
9177
9187
  if (t.length) {
@@ -9196,14 +9206,14 @@ function Sl(e, t = !1) {
9196
9206
  function ng(e) {
9197
9207
  const {
9198
9208
  useShadow: t
9199
- } = e, n = document.createTextNode(""), r = () => e.mount || document.body, a = Pa();
9209
+ } = e, n = document.createTextNode(""), r = () => e.mount || document.body, a = _a();
9200
9210
  let i, o = !!ne.context;
9201
9211
  return ul(() => {
9202
- o && (Pa().user = o = !1), i || (i = hl(a, () => Me(() => e.children)));
9212
+ o && (_a().user = o = !1), i || (i = hl(a, () => Me(() => e.children)));
9203
9213
  const l = r();
9204
9214
  if (l instanceof HTMLHeadElement) {
9205
9215
  const [d, h] = Le(!1), u = () => h(!0);
9206
- zt((m) => Ur(l, () => d() ? m() : i(), null)), zn(u);
9216
+ Vt((m) => Ur(l, () => d() ? m() : i(), null)), zn(u);
9207
9217
  } else {
9208
9218
  const d = Sl(e.isSVG ? "g" : "div", e.isSVG), h = t && d.attachShadow ? d.attachShadow({
9209
9219
  mode: "open"
@@ -9298,7 +9308,7 @@ function hm(e, t) {
9298
9308
  return i;
9299
9309
  }
9300
9310
  }
9301
- function En(e, t) {
9311
+ function Sn(e, t) {
9302
9312
  Object.entries(e).forEach(([n, r]) => t(r, n));
9303
9313
  }
9304
9314
  function Is(e, t) {
@@ -9350,7 +9360,7 @@ function ft(e, t, n, r) {
9350
9360
  untransform: r
9351
9361
  };
9352
9362
  }
9353
- var _l = [
9363
+ var Pl = [
9354
9364
  ft(Tl, "undefined", () => null, () => {
9355
9365
  }),
9356
9366
  ft(Em, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
@@ -9394,7 +9404,7 @@ function ir(e, t, n, r) {
9394
9404
  untransform: r
9395
9405
  };
9396
9406
  }
9397
- var Pl = ir((e, t) => Cl(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
9407
+ var _l = ir((e, t) => Cl(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
9398
9408
  const r = n.symbolRegistry.getValue(t[1]);
9399
9409
  if (!r)
9400
9410
  throw new Error("Trying to deserialize unknown symbol");
@@ -9436,28 +9446,28 @@ var Dl = ir(Ll, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
9436
9446
  if (!r)
9437
9447
  throw new Error("Trying to deserialize unknown custom value");
9438
9448
  return r.deserialize(e);
9439
- }), km = [Dl, Pl, Ol, Il], Ga = (e, t) => {
9449
+ }), km = [Dl, _l, Ol, Il], Ga = (e, t) => {
9440
9450
  const n = Oa(km, (a) => a.isApplicable(e, t));
9441
9451
  if (n)
9442
9452
  return {
9443
9453
  value: n.transform(e, t),
9444
9454
  type: n.annotation(e, t)
9445
9455
  };
9446
- const r = Oa(_l, (a) => a.isApplicable(e, t));
9456
+ const r = Oa(Pl, (a) => a.isApplicable(e, t));
9447
9457
  if (r)
9448
9458
  return {
9449
9459
  value: r.transform(e, t),
9450
9460
  type: r.annotation
9451
9461
  };
9452
9462
  }, Rl = {};
9453
- _l.forEach((e) => {
9463
+ Pl.forEach((e) => {
9454
9464
  Rl[e.annotation] = e;
9455
9465
  });
9456
- var _m = (e, t, n) => {
9466
+ var Pm = (e, t, n) => {
9457
9467
  if (It(t))
9458
9468
  switch (t[0]) {
9459
9469
  case "symbol":
9460
- return Pl.untransform(e, t, n);
9470
+ return _l.untransform(e, t, n);
9461
9471
  case "class":
9462
9472
  return Dl.untransform(e, t, n);
9463
9473
  case "custom":
@@ -9473,7 +9483,7 @@ var _m = (e, t, n) => {
9473
9483
  throw new Error("Unknown transformation: " + t);
9474
9484
  return r.untransform(e, n);
9475
9485
  }
9476
- }, Zt = (e, t) => {
9486
+ }, en = (e, t) => {
9477
9487
  if (t > e.size)
9478
9488
  throw new Error("index out of bounds");
9479
9489
  const n = e.keys();
@@ -9489,14 +9499,14 @@ function Gl(e) {
9489
9499
  if (Is(e, "constructor"))
9490
9500
  throw new Error("constructor is not allowed as a property");
9491
9501
  }
9492
- var Pm = (e, t) => {
9502
+ var _m = (e, t) => {
9493
9503
  Gl(t);
9494
9504
  for (let n = 0; n < t.length; n++) {
9495
9505
  const r = t[n];
9496
9506
  if (Qn(e))
9497
- e = Zt(e, +r);
9507
+ e = en(e, +r);
9498
9508
  else if (Hn(e)) {
9499
- const a = +r, i = +t[++n] == 0 ? "key" : "value", o = Zt(e, a);
9509
+ const a = +r, i = +t[++n] == 0 ? "key" : "value", o = en(e, a);
9500
9510
  switch (i) {
9501
9511
  case "key":
9502
9512
  e = o;
@@ -9522,11 +9532,11 @@ var Pm = (e, t) => {
9522
9532
  r = r[o];
9523
9533
  else if (Qn(r)) {
9524
9534
  const l = +o;
9525
- r = Zt(r, l);
9535
+ r = en(r, l);
9526
9536
  } else if (Hn(r)) {
9527
9537
  if (i === t.length - 2)
9528
9538
  break;
9529
- const d = +o, h = +t[++i] == 0 ? "key" : "value", u = Zt(r, d);
9539
+ const d = +o, h = +t[++i] == 0 ? "key" : "value", u = en(r, d);
9530
9540
  switch (h) {
9531
9541
  case "key":
9532
9542
  r = u;
@@ -9539,11 +9549,11 @@ var Pm = (e, t) => {
9539
9549
  }
9540
9550
  const a = t[t.length - 1];
9541
9551
  if (It(r) ? r[+a] = n(r[+a]) : Wn(r) && (r[a] = n(r[a])), Qn(r)) {
9542
- const i = Zt(r, +a), o = n(i);
9552
+ const i = en(r, +a), o = n(i);
9543
9553
  i !== o && (r.delete(i), r.add(o));
9544
9554
  }
9545
9555
  if (Hn(r)) {
9546
- const i = +t[t.length - 2], o = Zt(r, i);
9556
+ const i = +t[t.length - 2], o = en(r, i);
9547
9557
  switch (+a == 0 ? "key" : "value") {
9548
9558
  case "key": {
9549
9559
  const d = n(o);
@@ -9562,22 +9572,22 @@ function qr(e, t, n = []) {
9562
9572
  if (!e)
9563
9573
  return;
9564
9574
  if (!It(e)) {
9565
- En(e, (i, o) => qr(i, t, [...n, ...Un(o)]));
9575
+ Sn(e, (i, o) => qr(i, t, [...n, ...Un(o)]));
9566
9576
  return;
9567
9577
  }
9568
9578
  const [r, a] = e;
9569
- a && En(a, (i, o) => {
9579
+ a && Sn(a, (i, o) => {
9570
9580
  qr(i, t, [...n, ...Un(o)]);
9571
9581
  }), t(r, n);
9572
9582
  }
9573
9583
  function Im(e, t, n) {
9574
9584
  return qr(t, (r, a) => {
9575
- e = Fr(e, a, (i) => _m(i, r, n));
9585
+ e = Fr(e, a, (i) => Pm(i, r, n));
9576
9586
  }), e;
9577
9587
  }
9578
9588
  function Lm(e, t) {
9579
9589
  function n(r, a) {
9580
- const i = Pm(e, Un(a));
9590
+ const i = _m(e, Un(a));
9581
9591
  r.map(Un).forEach((o) => {
9582
9592
  e = Fr(e, o, () => i);
9583
9593
  });
@@ -9586,9 +9596,9 @@ function Lm(e, t) {
9586
9596
  const [r, a] = t;
9587
9597
  r.forEach((i) => {
9588
9598
  e = Fr(e, Un(i), () => e);
9589
- }), a && En(a, n);
9599
+ }), a && Sn(a, n);
9590
9600
  } else
9591
- En(t, n);
9601
+ Sn(t, n);
9592
9602
  return e;
9593
9603
  }
9594
9604
  var Dm = (e, t) => Wn(e) || It(e) || Hn(e) || Qn(e) || Ll(e, t);
@@ -9631,11 +9641,11 @@ var Ul = (e, t, n, r, a = [], i = [], o = /* @__PURE__ */ new Map()) => {
9631
9641
  transformedValue: null
9632
9642
  };
9633
9643
  const d = Ga(e, n), h = (d == null ? void 0 : d.value) ?? e, u = It(h) ? [] : {}, m = {};
9634
- En(h, (p, y) => {
9644
+ Sn(h, (p, y) => {
9635
9645
  if (y === "__proto__" || y === "constructor" || y === "prototype")
9636
9646
  throw new Error(`Detected property ${y}. This is a prototype pollution risk, please remove it from your object.`);
9637
9647
  const g = Ul(p, t, n, r, [...a, y], [...i, e], o);
9638
- u[y] = g.transformedValue, It(g.annotations) ? m[y] = g.annotations : Wn(g.annotations) && En(g.annotations, (x, b) => {
9648
+ u[y] = g.transformedValue, It(g.annotations) ? m[y] = g.annotations : Wn(g.annotations) && Sn(g.annotations, (x, b) => {
9639
9649
  m[kl(y) + "." + b] = x;
9640
9650
  });
9641
9651
  });
@@ -9848,21 +9858,21 @@ var dg = (e, t = !1) => {
9848
9858
  if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
9849
9859
  const r = document.createElement("style"), a = document.createTextNode("");
9850
9860
  r.appendChild(a), r.id = "_goober", r.setAttribute("nonce", e), t ? t.appendChild(r) : document.head.appendChild(r);
9851
- }, nn, Jn, Yn, Xn, Ft, Zn, sn, rn, an, ln, on, es, cn, ts, qa, $m = (qa = class {
9861
+ }, sn, Jn, Yn, Xn, Ft, Zn, rn, an, ln, on, cn, es, dn, ts, qa, $m = (qa = class {
9852
9862
  constructor(e) {
9853
- ve(this, nn);
9863
+ ve(this, sn);
9854
9864
  ve(this, Jn);
9855
9865
  ve(this, Yn);
9856
9866
  ve(this, Xn);
9857
9867
  ve(this, Ft, !1);
9858
9868
  ve(this, Zn);
9859
- ve(this, sn);
9860
9869
  ve(this, rn);
9861
9870
  ve(this, an);
9862
9871
  ve(this, ln);
9863
9872
  ve(this, on);
9864
- ve(this, es);
9865
9873
  ve(this, cn);
9874
+ ve(this, es);
9875
+ ve(this, dn);
9866
9876
  ve(this, ts);
9867
9877
  const {
9868
9878
  client: t,
@@ -9877,30 +9887,30 @@ var dg = (e, t = !1) => {
9877
9887
  shadowDOMTarget: u,
9878
9888
  hideDisabledQueries: m
9879
9889
  } = e;
9880
- ge(this, nn, Le(t)), ge(this, Yn, n), ge(this, Xn, r), ge(this, Jn, a), ge(this, Zn, h), ge(this, sn, u), ge(this, rn, Le(i)), ge(this, an, Le(o)), ge(this, ln, Le(l)), ge(this, on, Le(d)), ge(this, es, Le(m));
9890
+ ge(this, sn, Le(t)), ge(this, Yn, n), ge(this, Xn, r), ge(this, Jn, a), ge(this, Zn, h), ge(this, rn, u), ge(this, an, Le(i)), ge(this, ln, Le(o)), ge(this, on, Le(l)), ge(this, cn, Le(d)), ge(this, es, Le(m));
9881
9891
  }
9882
9892
  setButtonPosition(e) {
9883
- X(this, rn)[1](e);
9893
+ X(this, an)[1](e);
9884
9894
  }
9885
9895
  setPosition(e) {
9886
- X(this, an)[1](e);
9896
+ X(this, ln)[1](e);
9887
9897
  }
9888
9898
  setInitialIsOpen(e) {
9889
- X(this, ln)[1](e);
9899
+ X(this, on)[1](e);
9890
9900
  }
9891
9901
  setErrorTypes(e) {
9892
- X(this, on)[1](e);
9902
+ X(this, cn)[1](e);
9893
9903
  }
9894
9904
  setClient(e) {
9895
- X(this, nn)[1](e);
9905
+ X(this, sn)[1](e);
9896
9906
  }
9897
9907
  mount(e) {
9898
9908
  if (X(this, Ft))
9899
9909
  throw new Error("Devtools is already mounted");
9900
9910
  const t = wl(() => {
9901
- const n = this, [r] = X(this, rn), [a] = X(this, an), [i] = X(this, ln), [o] = X(this, on), [l] = X(this, es), [d] = X(this, nn);
9911
+ const n = this, [r] = X(this, an), [a] = X(this, ln), [i] = X(this, on), [o] = X(this, cn), [l] = X(this, es), [d] = X(this, sn);
9902
9912
  let h;
9903
- return X(this, cn) ? h = X(this, cn) : (h = xl(() => import("./LNWAZHJI-BUt4hyZE.js")), ge(this, cn, h)), ql(X(this, Zn), X(this, sn)), vl(h, bl({
9913
+ return X(this, dn) ? h = X(this, dn) : (h = xl(() => import("./LNWAZHJI-Qhu_sge9.js")), ge(this, dn, h)), ql(X(this, Zn), X(this, rn)), vl(h, bl({
9904
9914
  get queryFlavor() {
9905
9915
  return X(n, Yn);
9906
9916
  },
@@ -9911,7 +9921,7 @@ var dg = (e, t = !1) => {
9911
9921
  return X(n, Jn);
9912
9922
  },
9913
9923
  get shadowDOMTarget() {
9914
- return X(n, sn);
9924
+ return X(n, rn);
9915
9925
  }
9916
9926
  }, {
9917
9927
  get client() {
@@ -9942,22 +9952,22 @@ var dg = (e, t = !1) => {
9942
9952
  throw new Error("Devtools is not mounted");
9943
9953
  (e = X(this, ts)) == null || e.call(this), ge(this, Ft, !1);
9944
9954
  }
9945
- }, nn = new WeakMap(), Jn = new WeakMap(), Yn = new WeakMap(), Xn = new WeakMap(), Ft = new WeakMap(), Zn = new WeakMap(), sn = new WeakMap(), rn = new WeakMap(), an = new WeakMap(), ln = new WeakMap(), on = new WeakMap(), es = new WeakMap(), cn = new WeakMap(), ts = new WeakMap(), qa), dn, ns, ss, rs, qt, as, un, hn, mn, fn, gn, is, pn, yn, ls, $a, jm = ($a = class {
9955
+ }, sn = new WeakMap(), Jn = new WeakMap(), Yn = new WeakMap(), Xn = new WeakMap(), Ft = new WeakMap(), Zn = new WeakMap(), rn = new WeakMap(), an = new WeakMap(), ln = new WeakMap(), on = new WeakMap(), cn = new WeakMap(), es = new WeakMap(), dn = new WeakMap(), ts = new WeakMap(), qa), un, ns, ss, rs, qt, as, hn, mn, fn, gn, pn, is, yn, vn, ls, $a, jm = ($a = class {
9946
9956
  constructor(e) {
9947
- ve(this, dn);
9957
+ ve(this, un);
9948
9958
  ve(this, ns);
9949
9959
  ve(this, ss);
9950
9960
  ve(this, rs);
9951
9961
  ve(this, qt, !1);
9952
9962
  ve(this, as);
9953
- ve(this, un);
9954
9963
  ve(this, hn);
9955
9964
  ve(this, mn);
9956
9965
  ve(this, fn);
9957
9966
  ve(this, gn);
9958
- ve(this, is);
9959
9967
  ve(this, pn);
9968
+ ve(this, is);
9960
9969
  ve(this, yn);
9970
+ ve(this, vn);
9961
9971
  ve(this, ls);
9962
9972
  const {
9963
9973
  client: t,
@@ -9973,33 +9983,33 @@ var dg = (e, t = !1) => {
9973
9983
  onClose: m,
9974
9984
  hideDisabledQueries: v
9975
9985
  } = e;
9976
- ge(this, dn, Le(t)), ge(this, ss, n), ge(this, rs, r), ge(this, ns, a), ge(this, as, h), ge(this, un, u), ge(this, hn, Le(i)), ge(this, mn, Le(o)), ge(this, fn, Le(l)), ge(this, gn, Le(d)), ge(this, is, Le(v)), ge(this, pn, Le(m));
9986
+ ge(this, un, Le(t)), ge(this, ss, n), ge(this, rs, r), ge(this, ns, a), ge(this, as, h), ge(this, hn, u), ge(this, mn, Le(i)), ge(this, fn, Le(o)), ge(this, gn, Le(l)), ge(this, pn, Le(d)), ge(this, is, Le(v)), ge(this, yn, Le(m));
9977
9987
  }
9978
9988
  setButtonPosition(e) {
9979
- X(this, hn)[1](e);
9989
+ X(this, mn)[1](e);
9980
9990
  }
9981
9991
  setPosition(e) {
9982
- X(this, mn)[1](e);
9992
+ X(this, fn)[1](e);
9983
9993
  }
9984
9994
  setInitialIsOpen(e) {
9985
- X(this, fn)[1](e);
9995
+ X(this, gn)[1](e);
9986
9996
  }
9987
9997
  setErrorTypes(e) {
9988
- X(this, gn)[1](e);
9998
+ X(this, pn)[1](e);
9989
9999
  }
9990
10000
  setClient(e) {
9991
- X(this, dn)[1](e);
10001
+ X(this, un)[1](e);
9992
10002
  }
9993
10003
  setOnClose(e) {
9994
- X(this, pn)[1](() => e);
10004
+ X(this, yn)[1](() => e);
9995
10005
  }
9996
10006
  mount(e) {
9997
10007
  if (X(this, qt))
9998
10008
  throw new Error("Devtools is already mounted");
9999
10009
  const t = wl(() => {
10000
- const n = this, [r] = X(this, hn), [a] = X(this, mn), [i] = X(this, fn), [o] = X(this, gn), [l] = X(this, is), [d] = X(this, dn), [h] = X(this, pn);
10010
+ const n = this, [r] = X(this, mn), [a] = X(this, fn), [i] = X(this, gn), [o] = X(this, pn), [l] = X(this, is), [d] = X(this, un), [h] = X(this, yn);
10001
10011
  let u;
10002
- return X(this, yn) ? u = X(this, yn) : (u = xl(() => import("./MWZ6AO7Z-Qt7VdqKC.js")), ge(this, yn, u)), ql(X(this, as), X(this, un)), vl(u, bl({
10012
+ return X(this, vn) ? u = X(this, vn) : (u = xl(() => import("./MWZ6AO7Z-B7NOe6Lf.js")), ge(this, vn, u)), ql(X(this, as), X(this, hn)), vl(u, bl({
10003
10013
  get queryFlavor() {
10004
10014
  return X(n, ss);
10005
10015
  },
@@ -10010,7 +10020,7 @@ var dg = (e, t = !1) => {
10010
10020
  return X(n, ns);
10011
10021
  },
10012
10022
  get shadowDOMTarget() {
10013
- return X(n, un);
10023
+ return X(n, hn);
10014
10024
  }
10015
10025
  }, {
10016
10026
  get client() {
@@ -10044,9 +10054,9 @@ var dg = (e, t = !1) => {
10044
10054
  throw new Error("Devtools is not mounted");
10045
10055
  (e = X(this, ls)) == null || e.call(this), ge(this, qt, !1);
10046
10056
  }
10047
- }, dn = new WeakMap(), ns = new WeakMap(), ss = new WeakMap(), rs = new WeakMap(), qt = new WeakMap(), as = new WeakMap(), un = new WeakMap(), hn = new WeakMap(), mn = new WeakMap(), fn = new WeakMap(), gn = new WeakMap(), is = new WeakMap(), pn = new WeakMap(), yn = new WeakMap(), ls = new WeakMap(), $a);
10057
+ }, un = new WeakMap(), ns = new WeakMap(), ss = new WeakMap(), rs = new WeakMap(), qt = new WeakMap(), as = new WeakMap(), hn = new WeakMap(), mn = new WeakMap(), fn = new WeakMap(), gn = new WeakMap(), pn = new WeakMap(), is = new WeakMap(), yn = new WeakMap(), vn = new WeakMap(), ls = new WeakMap(), $a);
10048
10058
  function zm(e) {
10049
- const t = _e(e.client), n = Te.useRef(null), {
10059
+ const t = Pe(e.client), n = Te.useRef(null), {
10050
10060
  buttonPosition: r,
10051
10061
  position: a,
10052
10062
  initialIsOpen: i,
@@ -10084,7 +10094,7 @@ function zm(e) {
10084
10094
  }), [u]), /* @__PURE__ */ s("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
10085
10095
  }
10086
10096
  function Vm(e) {
10087
- const t = _e(e.client), n = Te.useRef(null), { errorTypes: r, styleNonce: a, shadowDOMTarget: i, hideDisabledQueries: o } = e, [l] = Te.useState(
10097
+ const t = Pe(e.client), n = Te.useRef(null), { errorTypes: r, styleNonce: a, shadowDOMTarget: i, hideDisabledQueries: o } = e, [l] = Te.useState(
10088
10098
  new jm({
10089
10099
  client: t,
10090
10100
  queryFlavor: "React Query",
@@ -10256,7 +10266,7 @@ function Zm() {
10256
10266
  return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
10257
10267
  }
10258
10268
  const ef = () => {
10259
- const e = hs(), t = _e(), n = Y();
10269
+ const e = hs(), t = Pe(), n = Y();
10260
10270
  return ke({
10261
10271
  mutationFn: async (r) => {
10262
10272
  const a = r.map(async (o) => n(e, {
@@ -10282,7 +10292,7 @@ const ef = () => {
10282
10292
  }
10283
10293
  });
10284
10294
  }, tf = () => {
10285
- const e = hs(), t = _e(), n = Y();
10295
+ const e = hs(), t = Pe(), n = Y();
10286
10296
  return ke({
10287
10297
  mutationFn: async (r) => n(e, {
10288
10298
  action: O.DELETE_ASSET,
@@ -10300,7 +10310,7 @@ const ef = () => {
10300
10310
  }
10301
10311
  });
10302
10312
  }, nf = () => {
10303
- const e = hs(), t = _e(), n = Y();
10313
+ const e = hs(), t = Pe(), n = Y();
10304
10314
  return ke({
10305
10315
  mutationFn: async (r) => n(e, {
10306
10316
  action: O.UPDATE_ASSET,
@@ -10332,8 +10342,8 @@ function sf({
10332
10342
  x - g + 1 < r && (g === 1 ? x = Math.min(t, g + r - 1) : x === t && (g = Math.max(1, x - r + 1)));
10333
10343
  const b = [];
10334
10344
  g > 1 && (b.push(1), g > 2 && b.push("..."));
10335
- for (let w = g; w <= x; w++)
10336
- b.push(w);
10345
+ for (let N = g; N <= x; N++)
10346
+ b.push(N);
10337
10347
  return x < t && (x < t - 1 && b.push("..."), b.push(t)), b;
10338
10348
  }, [e, t, r]), h = (y) => {
10339
10349
  y !== e && y >= 1 && y <= t && (n(y), l(String(y)));
@@ -10631,7 +10641,7 @@ const of = ({
10631
10641
  /* @__PURE__ */ c("div", { className: "grid gap-3 border rounded-md pt-2 bg-gray-100 relative", children: [
10632
10642
  /* @__PURE__ */ s(ce, { className: "w-full text-center", children: "Description" }),
10633
10643
  /* @__PURE__ */ s(
10634
- Nn,
10644
+ wn,
10635
10645
  {
10636
10646
  id: "description",
10637
10647
  value: d,
@@ -10671,17 +10681,17 @@ const of = ({
10671
10681
  async (p) => {
10672
10682
  try {
10673
10683
  const y = p;
10674
- if (!y.every((w) => w.type.startsWith("image/")))
10684
+ if (!y.every((N) => N.type.startsWith("image/")))
10675
10685
  return V.error("Invalid file type. Please upload a valid file."), Promise.reject(new Error("Invalid file type"));
10676
- const g = y.map(async (w) => {
10677
- let _ = w;
10678
- return w.type.startsWith("image/") && (_ = await Mi(w)), new Promise((I, L) => {
10686
+ const g = y.map(async (N) => {
10687
+ let k = N;
10688
+ return N.type.startsWith("image/") && (k = await Mi(N)), new Promise((I, L) => {
10679
10689
  const A = new FileReader();
10680
- A.readAsDataURL(_), A.onload = async () => {
10690
+ A.readAsDataURL(k), A.onload = async () => {
10681
10691
  I({
10682
10692
  file: A.result,
10683
10693
  folderId: void 0,
10684
- name: w.name,
10694
+ name: N.name,
10685
10695
  optimize: i
10686
10696
  });
10687
10697
  }, A.onerror = () => L(null);
@@ -10799,44 +10809,44 @@ const of = ({
10799
10809
  );
10800
10810
  };
10801
10811
  function $l({ close: e, onSelect: t, mode: n = "image", assetId: r }) {
10802
- const o = H(() => [n], [n]), [l, d] = E(null), [h, u] = E(null), [m, v] = E(null), [p, y] = E({ show: !1, file: "" }), [g, x] = E(!1), [b, w] = E(r ? "details" : "grid"), [_, I] = E(""), [L, A] = E(""), [j, Z] = E(1), [$] = E(30), [P, R] = E([]);
10812
+ const o = H(() => [n], [n]), [l, d] = E(null), [h, u] = E(null), [m, v] = E(null), [p, y] = E({ show: !1, file: "" }), [g, x] = E(!1), [b, N] = E(r ? "details" : "grid"), [k, I] = E(""), [L, A] = E(""), [j, Z] = E(1), [$] = E(30), [_, R] = E([]);
10803
10813
  ae(() => {
10804
- r && (d(r), w("details"));
10814
+ r && (d(r), N("details"));
10805
10815
  }, [r]), ae(() => {
10806
- const k = setTimeout(() => {
10816
+ const P = setTimeout(() => {
10807
10817
  I(L), Z(1);
10808
10818
  }, 300);
10809
- return () => clearTimeout(k);
10819
+ return () => clearTimeout(P);
10810
10820
  }, [L]);
10811
10821
  const { data: q, isLoading: D } = rf({
10812
- search: _.toLowerCase().trim(),
10822
+ search: k.toLowerCase().trim(),
10813
10823
  page: j,
10814
10824
  limit: $
10815
10825
  }), te = (q == null ? void 0 : q.assets) || [], W = (q == null ? void 0 : q.total) || 0, pe = Math.ceil(W / $);
10816
10826
  ae(() => {
10817
- D || pe <= 0 || Z((k) => k > pe ? pe : k < 1 ? 1 : k);
10827
+ D || pe <= 0 || Z((P) => P > pe ? pe : P < 1 ? 1 : P);
10818
10828
  }, [D, pe]);
10819
- const Ae = (te == null ? void 0 : te.length) > 0, { mutate: Pe } = tf(), { mutateAsync: he, isPending: N } = ef(), { mutate: f, isPending: C } = nf(), U = de(
10820
- (k) => {
10821
- const ee = Math.min(Math.max(1, k), Math.max(1, pe));
10829
+ const Ae = (te == null ? void 0 : te.length) > 0, { mutate: _e } = tf(), { mutateAsync: he, isPending: w } = ef(), { mutate: f, isPending: C } = nf(), U = de(
10830
+ (P) => {
10831
+ const ee = Math.min(Math.max(1, P), Math.max(1, pe));
10822
10832
  ee !== j && Z(ee);
10823
10833
  },
10824
10834
  [pe, j]
10825
- ), F = (k) => {
10826
- A(k.target.value);
10835
+ ), F = (P) => {
10836
+ A(P.target.value);
10827
10837
  }, G = de(
10828
- (k) => {
10829
- R((ee) => xe(ee, { id: k.id }) ? [] : [k]);
10838
+ (P) => {
10839
+ R((ee) => xe(ee, { id: P.id }) ? [] : [P]);
10830
10840
  },
10831
10841
  [!1]
10832
10842
  ), M = de(() => {
10833
10843
  R([]);
10834
- }, []), B = (k) => {
10835
- (k == null ? void 0 : k.length) !== 0 && (t(os(Wa(k || P), ["id", "url", "width", "height", "description"])), e());
10836
- }, Q = async (k) => {
10837
- u(k);
10844
+ }, []), B = (P) => {
10845
+ (P == null ? void 0 : P.length) !== 0 && (t(os(Wa(P || _), ["id", "url", "width", "height", "description"])), e());
10846
+ }, Q = async (P) => {
10847
+ u(P);
10838
10848
  }, oe = async () => {
10839
- h && (v(h == null ? void 0 : h.id), await Pe(h.id, {
10849
+ h && (v(h == null ? void 0 : h.id), await _e(h.id, {
10840
10850
  onSuccess: () => {
10841
10851
  v(null), u(null);
10842
10852
  },
@@ -10844,30 +10854,30 @@ function $l({ close: e, onSelect: t, mode: n = "image", assetId: r }) {
10844
10854
  v(null);
10845
10855
  }
10846
10856
  }), u(null));
10847
- }, z = (k) => {
10848
- d(k.id), w("details");
10849
- }, se = async (k, ee) => {
10857
+ }, z = (P) => {
10858
+ d(P.id), N("details");
10859
+ }, se = async (P, ee) => {
10850
10860
  try {
10851
10861
  const Re = localStorage.getItem("chai_optimize_images") !== "false";
10852
10862
  ee ? (await he([
10853
10863
  {
10854
- file: k,
10864
+ file: P,
10855
10865
  folderId: void 0,
10856
10866
  name: p.name || "",
10857
10867
  optimize: Re
10858
10868
  }
10859
10869
  ]), y({ show: !1, file: "" })) : (await f({
10860
10870
  id: p.id || "",
10861
- file: k
10871
+ file: P
10862
10872
  }), y({ show: !1, file: "" }));
10863
10873
  } catch (Re) {
10864
10874
  console.error("Error saving edited image:", Re);
10865
10875
  }
10866
- }, ye = de((k) => {
10867
- R([k]);
10876
+ }, ye = de((P) => {
10877
+ R([P]);
10868
10878
  }, []), Ne = de(
10869
- (k) => {
10870
- U(k);
10879
+ (P) => {
10880
+ U(P);
10871
10881
  },
10872
10882
  [U]
10873
10883
  );
@@ -10882,7 +10892,7 @@ function $l({ close: e, onSelect: t, mode: n = "image", assetId: r }) {
10882
10892
  allowedTypes: o,
10883
10893
  uploadAssets: he,
10884
10894
  isUpdatingAsset: C,
10885
- isUploadingAsset: N,
10895
+ isUploadingAsset: w,
10886
10896
  onUploaded: ye
10887
10897
  }
10888
10898
  ),
@@ -10890,7 +10900,7 @@ function $l({ close: e, onSelect: t, mode: n = "image", assetId: r }) {
10890
10900
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between gap-3", children: [
10891
10901
  /* @__PURE__ */ c("div", { className: "relative w-1/2", children: [
10892
10902
  /* @__PURE__ */ s(
10893
- Kt,
10903
+ Wt,
10894
10904
  {
10895
10905
  strokeWidth: 3,
10896
10906
  className: `absolute left-2 top-2.5 h-4 w-4 text-muted-foreground ${L.length > 0 ? "text-indigo-800" : ""}`
@@ -10906,8 +10916,8 @@ function $l({ close: e, onSelect: t, mode: n = "image", assetId: r }) {
10906
10916
  }
10907
10917
  )
10908
10918
  ] }),
10909
- P.length > 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
10910
- P.length > 0 && /* @__PURE__ */ s(ue, { children: /* @__PURE__ */ s(
10919
+ _.length > 0 ? /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
10920
+ _.length > 0 && /* @__PURE__ */ s(ue, { children: /* @__PURE__ */ s(
10911
10921
  S,
10912
10922
  {
10913
10923
  variant: "outline",
@@ -10921,8 +10931,8 @@ function $l({ close: e, onSelect: t, mode: n = "image", assetId: r }) {
10921
10931
  S,
10922
10932
  {
10923
10933
  size: "sm",
10924
- onClick: () => B(P),
10925
- disabled: P.length === 0,
10934
+ onClick: () => B(_),
10935
+ disabled: _.length === 0,
10926
10936
  children: "Select Asset"
10927
10937
  }
10928
10938
  )
@@ -10942,46 +10952,46 @@ function $l({ close: e, onSelect: t, mode: n = "image", assetId: r }) {
10942
10952
  ] }) : !D && !Ae ? /* @__PURE__ */ c("div", { className: "flex h-full flex-col items-center justify-center rounded-lg border", children: [
10943
10953
  /* @__PURE__ */ s("div", { className: "text-muted-foreground", children: /* @__PURE__ */ s(Sc, { className: "h-9 w-9 text-indigo-500" }) }),
10944
10954
  /* @__PURE__ */ s("div", { className: "text-lg text-muted-foreground", children: "No assets found" }),
10945
- /* @__PURE__ */ s("div", { className: "text-sm text-muted-foreground", children: _.length > 0 ? "No assets found for your search: " + _ : "Start uploading assets to get started" }),
10955
+ /* @__PURE__ */ s("div", { className: "text-sm text-muted-foreground", children: k.length > 0 ? "No assets found for your search: " + k : "Start uploading assets to get started" }),
10946
10956
  /* @__PURE__ */ s("br", {})
10947
- ] }) : /* @__PURE__ */ s("div", { className: "flex flex-wrap gap-3 p-1", children: te == null ? void 0 : te.map((k) => /* @__PURE__ */ c(
10957
+ ] }) : /* @__PURE__ */ s("div", { className: "flex flex-wrap gap-3 p-1", children: te == null ? void 0 : te.map((P) => /* @__PURE__ */ c(
10948
10958
  "div",
10949
10959
  {
10950
10960
  className: Mn(
10951
10961
  "group relative flex max-h-[180px] max-w-[180px] cursor-pointer flex-col justify-between overflow-hidden rounded-lg border-2 transition-all",
10952
- P.some((ee) => ee.id === k.id) ? "border-blue-500" : "hover:border-black/90",
10953
- m && (h == null ? void 0 : h.id) === k.id ? "pointer-events-none opacity-50" : "",
10954
- m === k.id ? "pointer-events-none opacity-50" : ""
10962
+ _.some((ee) => ee.id === P.id) ? "border-blue-500" : "hover:border-black/90",
10963
+ m && (h == null ? void 0 : h.id) === P.id ? "pointer-events-none opacity-50" : "",
10964
+ m === P.id ? "pointer-events-none opacity-50" : ""
10955
10965
  ),
10956
- onClick: () => G(k),
10957
- onDoubleClick: () => B([k]),
10966
+ onClick: () => G(P),
10967
+ onDoubleClick: () => B([P]),
10958
10968
  children: [
10959
10969
  /* @__PURE__ */ c("div", { className: "aspect-square relative overflow-hidden", children: [
10960
- m === k.id ? /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ s(wt, { className: "h-8 w-8 animate-spin text-white" }) }) : null,
10961
- k.type === "image" ? /* @__PURE__ */ s(
10970
+ m === P.id ? /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ s(wt, { className: "h-8 w-8 animate-spin text-white" }) }) : null,
10971
+ P.type === "image" ? /* @__PURE__ */ s(
10962
10972
  "img",
10963
10973
  {
10964
- src: `${k.thumbnailUrl || "/placeholder.svg"}?v=${(k == null ? void 0 : k.updatedAt) || k.createdAt}`,
10965
- alt: k.name,
10966
- className: `h-full min-h-[80px] w-full object-contain ${P.some((ee) => ee.id === k.id) ? "" : "group-hover:blur group-hover:contrast-50"}`
10974
+ src: `${P.thumbnailUrl || "/placeholder.svg"}?v=${(P == null ? void 0 : P.updatedAt) || P.createdAt}`,
10975
+ alt: P.name,
10976
+ className: `h-full min-h-[80px] w-full object-contain ${_.some((ee) => ee.id === P.id) ? "" : "group-hover:blur group-hover:contrast-50"}`
10967
10977
  }
10968
10978
  ) : /* @__PURE__ */ c("div", { className: "flex h-full items-center justify-center", children: [
10969
10979
  /* @__PURE__ */ s(Ac, { className: "h-12 w-12 text-muted-foreground" }),
10970
- k.thumbnailUrl && /* @__PURE__ */ s(
10980
+ P.thumbnailUrl && /* @__PURE__ */ s(
10971
10981
  "img",
10972
10982
  {
10973
- src: `${k.thumbnailUrl || "/placeholder.svg"}?v=${(k == null ? void 0 : k.updatedAt) || k.createdAt}`,
10974
- alt: k.name,
10983
+ src: `${P.thumbnailUrl || "/placeholder.svg"}?v=${(P == null ? void 0 : P.updatedAt) || P.createdAt}`,
10984
+ alt: P.name,
10975
10985
  className: "absolute inset-0 h-full w-full object-cover"
10976
10986
  }
10977
10987
  )
10978
10988
  ] })
10979
10989
  ] }),
10980
10990
  /* @__PURE__ */ c("div", { className: "flex items-end justify-between border-t-[1px] border-black/10 bg-white px-2 py-1", children: [
10981
- /* @__PURE__ */ s("div", { className: "truncate text-xs leading-tight", title: k.name, children: k.name }),
10982
- /* @__PURE__ */ s("div", { className: "flex items-center justify-between whitespace-nowrap text-[9px] font-light text-muted-foreground", children: /* @__PURE__ */ s("span", { children: Pr((k == null ? void 0 : k.size) || 0) }) })
10991
+ /* @__PURE__ */ s("div", { className: "truncate text-xs leading-tight", title: P.name, children: P.name }),
10992
+ /* @__PURE__ */ s("div", { className: "flex items-center justify-between whitespace-nowrap text-[9px] font-light text-muted-foreground", children: /* @__PURE__ */ s("span", { children: _r((P == null ? void 0 : P.size) || 0) }) })
10983
10993
  ] }),
10984
- !P.some((ee) => ee.id === k.id) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center opacity-0 transition-opacity group-hover:opacity-100", children: /* @__PURE__ */ c("div", { className: "grid grid-cols-4 gap-2 p-2", children: [
10994
+ !_.some((ee) => ee.id === P.id) && /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center opacity-0 transition-opacity group-hover:opacity-100", children: /* @__PURE__ */ c("div", { className: "grid grid-cols-4 gap-2 p-2", children: [
10985
10995
  /* @__PURE__ */ s(Mt, { children: /* @__PURE__ */ c(tt, { children: [
10986
10996
  /* @__PURE__ */ s(nt, { asChild: !0, children: /* @__PURE__ */ s(
10987
10997
  S,
@@ -10990,7 +11000,7 @@ function $l({ close: e, onSelect: t, mode: n = "image", assetId: r }) {
10990
11000
  size: "icon",
10991
11001
  className: "h-8 w-8 rounded-full",
10992
11002
  onClick: (ee) => {
10993
- ee.stopPropagation(), z(k);
11003
+ ee.stopPropagation(), z(P);
10994
11004
  },
10995
11005
  children: /* @__PURE__ */ s($n, { className: "h-4 w-4" })
10996
11006
  }
@@ -11005,7 +11015,7 @@ function $l({ close: e, onSelect: t, mode: n = "image", assetId: r }) {
11005
11015
  size: "icon",
11006
11016
  className: "h-8 w-8 rounded-full",
11007
11017
  onClick: (ee) => {
11008
- ee.stopPropagation(), navigator.clipboard.writeText(k.url), V.success("Asset URL copied to clipboard");
11018
+ ee.stopPropagation(), navigator.clipboard.writeText(P.url), V.success("Asset URL copied to clipboard");
11009
11019
  },
11010
11020
  children: /* @__PURE__ */ s(Ds, { className: "h-4 w-4" })
11011
11021
  }
@@ -11021,10 +11031,10 @@ function $l({ close: e, onSelect: t, mode: n = "image", assetId: r }) {
11021
11031
  className: "h-8 w-8 rounded-full",
11022
11032
  onClick: (ee) => {
11023
11033
  ee.stopPropagation(), y({
11024
- id: k.id,
11034
+ id: P.id,
11025
11035
  show: !0,
11026
- file: k.url,
11027
- name: k.name
11036
+ file: P.url,
11037
+ name: P.name
11028
11038
  });
11029
11039
  },
11030
11040
  children: /* @__PURE__ */ s(qn, { className: "h-4 w-4" })
@@ -11040,7 +11050,7 @@ function $l({ close: e, onSelect: t, mode: n = "image", assetId: r }) {
11040
11050
  size: "icon",
11041
11051
  className: "h-8 w-8 rounded-full",
11042
11052
  onClick: (ee) => {
11043
- ee.stopPropagation(), Q(k);
11053
+ ee.stopPropagation(), Q(P);
11044
11054
  },
11045
11055
  children: /* @__PURE__ */ s(Qs, { className: "h-4 w-4" })
11046
11056
  }
@@ -11048,10 +11058,10 @@ function $l({ close: e, onSelect: t, mode: n = "image", assetId: r }) {
11048
11058
  /* @__PURE__ */ s(st, { children: /* @__PURE__ */ s("p", { children: "Delete Asset" }) })
11049
11059
  ] }) })
11050
11060
  ] }) }),
11051
- P.some((ee) => ee.id === k.id) && /* @__PURE__ */ s("div", { className: "absolute right-1 top-1 h-max rounded-full border border-white bg-blue-500 p-1", children: /* @__PURE__ */ s(it, { className: "h-3 w-3 text-white", strokeWidth: 5 }) })
11061
+ _.some((ee) => ee.id === P.id) && /* @__PURE__ */ s("div", { className: "absolute right-1 top-1 h-max rounded-full border border-white bg-blue-500 p-1", children: /* @__PURE__ */ s(it, { className: "h-3 w-3 text-white", strokeWidth: 5 }) })
11052
11062
  ]
11053
11063
  },
11054
- k.id
11064
+ P.id
11055
11065
  )) }) }),
11056
11066
  pe > 1 && /* @__PURE__ */ s("div", { className: "absolute bottom-0 left-0 right-0 border-t bg-white p-4", children: /* @__PURE__ */ s(Xm, { fallback: /* @__PURE__ */ s("div", { className: "text-red-500", children: "Error loading pagination" }), children: /* @__PURE__ */ s(
11057
11067
  sf,
@@ -11069,22 +11079,22 @@ function $l({ close: e, onSelect: t, mode: n = "image", assetId: r }) {
11069
11079
  {
11070
11080
  assetId: l || r || "",
11071
11081
  onBack: () => {
11072
- w("grid"), d(null);
11082
+ N("grid"), d(null);
11073
11083
  },
11074
- onEdit: (k) => {
11084
+ onEdit: (P) => {
11075
11085
  y({
11076
- id: k.id,
11086
+ id: P.id,
11077
11087
  show: !0,
11078
- file: k.url,
11079
- name: k.name
11088
+ file: P.url,
11089
+ name: P.name
11080
11090
  });
11081
11091
  },
11082
- onSave: async (k) => {
11092
+ onSave: async (P) => {
11083
11093
  if (l) {
11084
11094
  x(!0);
11085
11095
  try {
11086
11096
  const ee = te.find((Re) => Re.id === l);
11087
- ee && await f(co(ee, { description: k }));
11097
+ ee && await f(co(ee, { description: P }));
11088
11098
  } finally {
11089
11099
  x(!1);
11090
11100
  }
@@ -11168,7 +11178,7 @@ const hf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11168
11178
  className: "h-8 w-8 rounded-full bg-white text-red-500",
11169
11179
  onClick: m,
11170
11180
  disabled: i,
11171
- children: v ? /* @__PURE__ */ s(wn, { className: "h-4 w-4" }) : /* @__PURE__ */ s(Qs, { className: "h-4 w-4" })
11181
+ children: v ? /* @__PURE__ */ s(En, { className: "h-4 w-4" }) : /* @__PURE__ */ s(Qs, { className: "h-4 w-4" })
11172
11182
  }
11173
11183
  ),
11174
11184
  !v && /* @__PURE__ */ s(
@@ -11206,7 +11216,7 @@ const hf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11206
11216
  size: "icon",
11207
11217
  className: "absolute right-4 top-2",
11208
11218
  onClick: h,
11209
- children: /* @__PURE__ */ s(wn, { className: "h-4 w-4" })
11219
+ children: /* @__PURE__ */ s(En, { className: "h-4 w-4" })
11210
11220
  }
11211
11221
  )
11212
11222
  ] }),
@@ -11305,9 +11315,9 @@ const hf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11305
11315
  ], h = (g) => t((x) => ({ ...x, [g.target.name]: g.target.value })), u = () => {
11306
11316
  const { platform: g, url: x, customName: b } = a;
11307
11317
  if (!x.trim() || !g) return;
11308
- const w = g === "other" ? b : g;
11309
- w.trim() && (r((_) => [..._, { platform: w, url: x, isCustom: g === "other" }]), i({ isOpen: !1, platform: "", url: "", customName: "" }));
11310
- }, m = (g) => r((x) => x.filter((b, w) => w !== g)), v = () => i({ isOpen: !1, platform: "", url: "", customName: "" }), p = () => {
11318
+ const N = g === "other" ? b : g;
11319
+ N.trim() && (r((k) => [...k, { platform: N, url: x, isCustom: g === "other" }]), i({ isOpen: !1, platform: "", url: "", customName: "" }));
11320
+ }, m = (g) => r((x) => x.filter((b, N) => N !== g)), v = () => i({ isOpen: !1, platform: "", url: "", customName: "" }), p = () => {
11311
11321
  l(!0);
11312
11322
  const g = {};
11313
11323
  n.forEach((b) => {
@@ -11593,7 +11603,7 @@ Co(Wu);
11593
11603
  bh();
11594
11604
  bf();
11595
11605
  ko(xf);
11596
- _o(xd);
11606
+ Po(xd);
11597
11607
  const Nf = (e) => {
11598
11608
  const t = rt([]), [n] = He(), r = n.get("page"), { data: a } = Ve(), {
11599
11609
  data: i = {
@@ -11602,14 +11612,14 @@ const Nf = (e) => {
11602
11612
  }
11603
11613
  } = Xu();
11604
11614
  Yu(), id();
11605
- const { data: o, isFetching: l } = Ri(), { blocks: d } = Ju(o), { data: h } = Ke(), { mutateAsync: u } = Ci(), m = Hu(), { onSave: v } = Zu(), { getPartialBlocks: p, getPartialBlockBlocks: y } = eh(), { aiContext: g, setAiContext: x } = Zr(), { mutateAsync: b } = wd(), [w, _] = E(!1), { data: I } = Et(), L = Ot(), { data: A } = Gi(), { data: j } = Hm(), { mutateAsync: Z } = Qm(), $ = Jm();
11615
+ const { data: o, isFetching: l } = Ri(), { blocks: d } = Ju(o), { data: h } = Ke(), { mutateAsync: u } = Ci(), m = Hu(), { onSave: v } = Zu(), { getPartialBlocks: p, getPartialBlockBlocks: y } = eh(), { aiContext: g, setAiContext: x } = Zr(), { mutateAsync: b } = wd(), [N, k] = E(!1), { data: I } = Et(), L = Ot(), { data: A } = Gi(), { data: j } = Hm(), { mutateAsync: Z } = Qm(), $ = Jm();
11606
11616
  Wc(), ae(() => {
11607
11617
  const D = () => {
11608
- document.hidden ? _(!0) : _(!1);
11618
+ document.hidden ? k(!0) : k(!1);
11609
11619
  };
11610
11620
  return window.addEventListener("visibilitychange", D), () => window.removeEventListener("visibilitychange", D);
11611
11621
  }, []), t.current = d;
11612
- const P = H(() => {
11622
+ const _ = H(() => {
11613
11623
  const D = {};
11614
11624
  return i && (D.permissions = K(i, "permissions", null), D.role = K(i, "role", "user")), D;
11615
11625
  }, [i]), R = de(
@@ -11618,7 +11628,7 @@ const Nf = (e) => {
11618
11628
  ), q = H(() => K(I, "theme", {}) || {}, [I]);
11619
11629
  return /* @__PURE__ */ c(ue, { children: [
11620
11630
  /* @__PURE__ */ s(
11621
- Po,
11631
+ _o,
11622
11632
  {
11623
11633
  gotoPage: $,
11624
11634
  collections: j ?? [],
@@ -11633,7 +11643,7 @@ const Nf = (e) => {
11633
11643
  translations: e.translations || {},
11634
11644
  locale: e.locale || "en",
11635
11645
  htmlDir: e.htmlDir || "ltr",
11636
- autoSaveSupport: !w && (e.autoSaveSupport ?? !0),
11646
+ autoSaveSupport: !N && (e.autoSaveSupport ?? !0),
11637
11647
  autoSaveInterval: e.autoSaveInterval ?? 15,
11638
11648
  onError: e.onError || console.error,
11639
11649
  getPartialBlockBlocks: y,
@@ -11662,7 +11672,7 @@ const Nf = (e) => {
11662
11672
  return await v({ page: r, blocks: Ae, needTranslations: W }), t.current = Ae, Ls(te, q) || await u({ settings: { theme: te } }), !0;
11663
11673
  },
11664
11674
  themePanelComponent: Id,
11665
- ...P
11675
+ ..._
11666
11676
  }
11667
11677
  ),
11668
11678
  /* @__PURE__ */ c("div", { children: [
@@ -11700,7 +11710,7 @@ const Nf = (e) => {
11700
11710
  /* @__PURE__ */ s(Km, {})
11701
11711
  ] }) : /* @__PURE__ */ s("div", {});
11702
11712
  }, pg = () => {
11703
- const { savePageAsync: e } = Nt(), t = _e();
11713
+ const { savePageAsync: e } = Nt(), t = Pe();
11704
11714
  return de(async () => {
11705
11715
  await e(), t.invalidateQueries({
11706
11716
  queryKey: [O.GET_DRAFT_PAGE]
@@ -11709,7 +11719,7 @@ const Nf = (e) => {
11709
11719
  });
11710
11720
  }, [e, t]);
11711
11721
  }, yg = () => {
11712
- const e = ie(), t = Y(), { data: n } = Lt(), r = _e();
11722
+ const e = ie(), t = Y(), { data: n } = Lt(), r = Pe();
11713
11723
  return ke({
11714
11724
  mutationFn: async (a) => {
11715
11725
  if (!(n != null && n.id))
@@ -11787,7 +11797,7 @@ export {
11787
11797
  mg as L,
11788
11798
  ig as M,
11789
11799
  ag as N,
11790
- zt as O,
11800
+ Vt as O,
11791
11801
  ng as P,
11792
11802
  Xh as Q,
11793
11803
  rg as R,
@@ -11830,7 +11840,7 @@ export {
11830
11840
  fg as g,
11831
11841
  Gh as h,
11832
11842
  Vf as i,
11833
- Vt as j,
11843
+ Kt as j,
11834
11844
  Gr as k,
11835
11845
  Wf as l,
11836
11846
  hg as m,