@chaibuilder/pages 0.15.3 → 0.15.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/{2AITGKQY-o6FgGSqg.cjs → 2AITGKQY-D4uLyw6-.cjs} +1 -1
  2. package/dist/{2AITGKQY-DhC0sF1x.js → 2AITGKQY-DYwNjBFe.js} +2 -2
  3. package/dist/{NCMVHL6D-BPM6RHYa.cjs → NCMVHL6D-C-L7-X3f.cjs} +1 -1
  4. package/dist/{NCMVHL6D-D7HU3akD.js → NCMVHL6D-DVB60g_2.js} +2 -2
  5. package/dist/{ZDWCUMSJ-NVCxv9uE.cjs → ZDWCUMSJ-BORULBXb.cjs} +1 -1
  6. package/dist/{ZDWCUMSJ-Cr1v3giV.js → ZDWCUMSJ-Dp6ML_tn.js} +1 -1
  7. package/dist/{add-new-language-page-D3PSLiUv.cjs → add-new-language-page-D4VPifNs.cjs} +1 -1
  8. package/dist/{add-new-language-page-8q4Ku3eg.js → add-new-language-page-DENCjC_f.js} +2 -2
  9. package/dist/{add-new-page-YpzILOYq.cjs → add-new-page-BuK6We-q.cjs} +1 -1
  10. package/dist/{add-new-page-BpvpSM4X.js → add-new-page-CD-9ppdS.js} +1 -1
  11. package/dist/{delete-page-w64MO7db.cjs → delete-page-B-TP6nJ7.cjs} +1 -1
  12. package/dist/{delete-page-CXRJjJ4o.js → delete-page-CatRlDfx.js} +1 -1
  13. package/dist/digital-asset-manager-DL2nAqUC.cjs +1 -0
  14. package/dist/digital-asset-manager-KakxBkBC.js +917 -0
  15. package/dist/{duplicate-page-DB_c7V2t.cjs → duplicate-page-D4Oiy71Q.cjs} +1 -1
  16. package/dist/{duplicate-page-CSQs2MOp.js → duplicate-page-DEmh0df0.js} +2 -2
  17. package/dist/{dynamic-page-selector-DTk4oull.js → dynamic-page-selector-8g1-84iW.js} +1 -1
  18. package/dist/{dynamic-page-selector-CF9nb6i_.cjs → dynamic-page-selector-Cz6zWaKo.cjs} +1 -1
  19. package/dist/index-Blg1T7nL.cjs +5 -0
  20. package/dist/{index-BuXZJnGo.js → index-zaGKeGBW.js} +850 -765
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +6 -6
  23. package/dist/{json-diff-viewer-oyxMD3Hc.js → json-diff-viewer-BF0qFBif.js} +1 -1
  24. package/dist/{json-diff-viewer-zBoPBSd3.cjs → json-diff-viewer-c3ft4c4A.cjs} +1 -1
  25. package/dist/{lang-panel-B_HcsPPo.js → lang-panel-D1FKTNui.js} +2 -2
  26. package/dist/{lang-panel-D2YUMeJZ.cjs → lang-panel-ExS97Zgk.cjs} +1 -1
  27. package/dist/{mark-as-template-C4wH4UKf.cjs → mark-as-template-CcnkROAU.cjs} +1 -1
  28. package/dist/{mark-as-template-CPEPYXg7.js → mark-as-template-v-I05xcZ.js} +1 -1
  29. package/dist/{no-language-page-content-CVyOpT9h.js → no-language-page-content-Bm5CcsUo.js} +1 -1
  30. package/dist/{no-language-page-content-ECt0SxFX.cjs → no-language-page-content-Ddz2hnYs.cjs} +1 -1
  31. package/dist/{page-creator-y6kl3nw5.js → page-creator-Crc5BzeB.js} +2 -2
  32. package/dist/{page-creator-BG2hc82u.cjs → page-creator-CsZpQ7Gy.cjs} +1 -1
  33. package/dist/{page-lock-request-fGZbOFTp.cjs → page-lock-request-Dx6OrOwM.cjs} +1 -1
  34. package/dist/{page-lock-request-DC62b588.js → page-lock-request-WKfG7Sd3.js} +1 -1
  35. package/dist/{page-locked-by-dialog-BIC-c0Jl.cjs → page-locked-by-dialog-BvdAXZPw.cjs} +1 -1
  36. package/dist/{page-locked-by-dialog-D-vXaoga.js → page-locked-by-dialog-jy3lYV3l.js} +1 -1
  37. package/dist/{page-manager-new-Cto2r7Va.js → page-manager-new-CNHlSwfe.js} +66 -66
  38. package/dist/page-manager-new-CUlpwqpH.cjs +1 -0
  39. package/dist/{page-manager-search-and-filter-sVnGlF46.js → page-manager-search-and-filter-CuAn82Db.js} +1 -1
  40. package/dist/{page-manager-search-and-filter-z2b4sgvb.cjs → page-manager-search-and-filter-eFsGtm5W.cjs} +1 -1
  41. package/dist/{page-revisions-content-BaTqBnko.js → page-revisions-content-PRgwV04S.js} +2 -2
  42. package/dist/{page-revisions-content-Tb3T6zvU.cjs → page-revisions-content-dSFvGFEO.cjs} +1 -1
  43. package/dist/{publish-pages-content-C9CgEWo0.js → publish-pages-content-C24iBibw.js} +2 -2
  44. package/dist/{publish-pages-content-BGkEZ3GK.cjs → publish-pages-content-akIgltlm.cjs} +1 -1
  45. package/dist/{save-to-lib-DNK4GPNw.cjs → save-to-lib-C3H1ZPb-.cjs} +1 -1
  46. package/dist/{save-to-lib-DGtyTG6H.js → save-to-lib-DSPvtFSd.js} +1 -1
  47. package/dist/{seo-panel-CrK7z4bR.cjs → seo-panel-Ce6aTIyt.cjs} +1 -1
  48. package/dist/{seo-panel-DESVAQM5.js → seo-panel-rZ8s88c0.js} +17 -17
  49. package/dist/server.cjs +1 -1
  50. package/dist/server.js +96 -96
  51. package/dist/shared-json-ld-DMYOwp6B.js +565 -0
  52. package/dist/shared-json-ld-hCiviuBf.cjs +1 -0
  53. package/dist/{slug-input-DMYhARDW.cjs → slug-input-BN8eQgxP.cjs} +1 -1
  54. package/dist/{slug-input-DfAsMPg8.js → slug-input-Dhzaobv6.js} +1 -1
  55. package/dist/{theme-panel-footer-Bj2yHtxO.cjs → theme-panel-footer-0GrdOHO_.cjs} +1 -1
  56. package/dist/{theme-panel-footer-RrxiDGoD.js → theme-panel-footer-BzEy5bsg.js} +1 -1
  57. package/dist/{unmark-as-template-C8hTjRVk.cjs → unmark-as-template-DXEs6foh.cjs} +1 -1
  58. package/dist/{unmark-as-template-BjetSrYF.js → unmark-as-template-Dsiyocm9.js} +1 -1
  59. package/dist/{unpublish-page-gtGfNOAq.cjs → unpublish-page-c1mqQEa_.cjs} +1 -1
  60. package/dist/{unpublish-page-BTPEVAkv.js → unpublish-page-yGyz2jiw.js} +1 -1
  61. package/dist/{web-preview-DNgPjdgZ.js → web-preview-BEyjKFDL.js} +1 -1
  62. package/dist/{web-preview-BcULgiw_.cjs → web-preview-TTKtpSUi.cjs} +1 -1
  63. package/package.json +2 -3
  64. package/dist/digital-asset-manager-B2m5T22s.js +0 -1001
  65. package/dist/digital-asset-manager-BGyKKd_6.cjs +0 -1
  66. package/dist/index-Cds1vIhw.cjs +0 -5
  67. package/dist/page-manager-new-CUfjlMed.cjs +0 -1
  68. package/dist/shared-json-ld-BMfQzOWc.js +0 -650
  69. package/dist/shared-json-ld-_ozYsSHn.cjs +0 -1
@@ -1,22 +1,22 @@
1
- var Ar = Object.defineProperty;
2
- var Rn = (e) => {
1
+ var Tr = Object.defineProperty;
2
+ var Un = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var yr = (e, t, n) => t in e ? Ar(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
- var we = (e, t, n) => yr(e, typeof t != "symbol" ? t + "" : t, n), Un = (e, t, n) => t.has(e) || Rn("Cannot " + n);
7
- var _ = (e, t, n) => (Un(e, t, "read from private field"), n ? n.call(e) : t.get(e)), D = (e, t, n) => t.has(e) ? Rn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), N = (e, t, n, s) => (Un(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
5
+ var Sr = (e, t, n) => t in e ? Tr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
+ var we = (e, t, n) => Sr(e, typeof t != "symbol" ? t + "" : t, n), Bn = (e, t, n) => t.has(e) || Un("Cannot " + n);
7
+ var _ = (e, t, n) => (Bn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), D = (e, t, n) => t.has(e) ? Un("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), N = (e, t, n, s) => (Bn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
8
8
  import { jsx as c, jsxs as g, Fragment as Ee } from "react/jsx-runtime";
9
- import { get as H, reverse as Tr, sortBy as Sr, each as _r, find as re, isEmpty as ge, groupBy as Pr, minBy as wr, noop as cs, keyBy as vr, map as Bt, compact as us, upperCase as Bn, filter as ds, includes as br, has as jt, pick as _n, keys as Ir, pickBy as Cr, endsWith as Nr, isArray as Lr, startCase as Gr, isFunction as Dr, cloneDeep as Or, isEqual as kr } from "lodash-es";
9
+ import { get as H, reverse as _r, sortBy as Pr, each as wr, find as re, isEmpty as ge, groupBy as vr, minBy as br, noop as ds, keyBy as Ir, map as Bt, compact as fs, upperCase as Mn, filter as hs, includes as Cr, has as jt, pick as Pn, keys as Nr, pickBy as Lr, endsWith as Gr, isArray as Dr, startCase as Or, isFunction as kr, cloneDeep as xr, isEqual as Rr } from "lodash-es";
10
10
  import * as W from "react";
11
- import xr, { useMemo as j, useCallback as $, useState as q, useEffect as se, useRef as it, lazy as K, Suspense as V } from "react";
11
+ import Ur, { useMemo as j, useCallback as Q, useState as q, useEffect as se, useRef as it, lazy as K, Suspense as V, createContext as Br, Component as Mr, createElement as Fn } from "react";
12
12
  import { atom as pe, useAtom as ne } from "jotai";
13
- import { useQuery as ie, useQueryClient as z, useMutation as X, onlineManager as fs, QueryClient as Rr, QueryClientProvider as Ur } from "@tanstack/react-query";
14
- import { useLanguages as Se, useSavePage as ke, mergeClasses as Mt, usePermissions as hs, PERMISSIONS as Br, useRightPanel as Mr, useChaiFeatureFlag as Fr, useIsPageLoaded as qr, registerChaiLibrary as Kr, getBlocksFromHTML as Hr, registerChaiSidebarPanel as en, registerChaiFeatureFlag as Mn, registerChaiTopBar as Vr, registerChaiMediaManager as $r, registerChaiSaveToLibrary as Qr, ChaiBuilderEditor as jr } from "@chaibuilder/sdk";
13
+ import { useQuery as ie, useQueryClient as z, useMutation as X, onlineManager as gs, QueryClient as Fr, QueryClientProvider as qr } from "@tanstack/react-query";
14
+ import { useLanguages as Se, useSavePage as ke, mergeClasses as Mt, usePermissions as Es, PERMISSIONS as Kr, useRightPanel as Hr, useChaiFeatureFlag as Vr, useIsPageLoaded as Qr, registerChaiLibrary as $r, getBlocksFromHTML as jr, registerChaiSidebarPanel as en, registerChaiFeatureFlag as qn, registerChaiTopBar as Wr, registerChaiMediaManager as zr, registerChaiSaveToLibrary as Yr, ChaiBuilderEditor as Jr } from "@chaibuilder/sdk";
15
15
  import { toast as R } from "sonner";
16
- import { Tooltip as Wt, TooltipTrigger as zt, Button as B, TooltipContent as Yt, Sheet as gs, SheetContent as Es, SheetHeader as Wr, SheetTitle as zr, SheetDescription as Yr, DropdownMenu as Pn, DropdownMenuTrigger as wn, DropdownMenuContent as vn, DropdownMenuItem as fe, Separator as Jr, TooltipProvider as ms, SheetTrigger as Xr, Skeleton as Nt, Dialog as ps, HoverCard as Zr, HoverCardTrigger as ea, HoverCardContent as ta, AlertDialog as na, AlertDialogTrigger as sa, AlertDialogContent as ra, AlertDialogHeader as aa, AlertDialogTitle as ia, AlertDialogDescription as oa, AlertDialogFooter as la, AlertDialogCancel as ca, AlertDialogAction as ua, Popover as da, PopoverTrigger as fa, DialogContent as ha, DialogHeader as ga, DialogTitle as Ea, Tabs as ma, TabsList as pa, TabsTrigger as tn, TabsContent as nn, Textarea as Fn, Alert as Aa, AlertDescription as ya } from "@chaibuilder/sdk/ui";
17
- import { LogsIcon as Ta, Folder as Sa, Languages as qn, ChevronDown as dn, Star as _a, Plus as As, History as Pa, Play as wa, Palette as va, CheckCircle as ba, Loader as Ft, Save as Ia, Send as Kn, Rocket as Hn, CopyPlusIcon as Ca, Pencil as Na, Power as La, Trash as Ga, SquareLibrary as Vn, Globe as Da, File as Oa, MoreHorizontal as $n, ExternalLink as ka, LanguagesIcon as xa, User as Ra, X as Qn, Trash2 as Ua, ImageIcon as jn, Code as Ba, Eye as Ma, Share2 as Fa, FileCode2 as qa, AlertTriangle as Ka } from "lucide-react";
18
- import { useRegisteredChaiBlocks as Ha, getDefaultBlockProps as Va } from "@chaibuilder/runtime";
19
- import { loadWebBlocks as $a } from "@chaibuilder/sdk/web-blocks";
16
+ import { Tooltip as Wt, TooltipTrigger as zt, Button as B, TooltipContent as Yt, Sheet as ms, SheetContent as ps, SheetHeader as Xr, SheetTitle as Zr, SheetDescription as ea, DropdownMenu as wn, DropdownMenuTrigger as vn, DropdownMenuContent as bn, DropdownMenuItem as fe, Separator as ta, TooltipProvider as As, SheetTrigger as na, Skeleton as Nt, Dialog as ys, HoverCard as sa, HoverCardTrigger as ra, HoverCardContent as aa, AlertDialog as ia, AlertDialogTrigger as oa, AlertDialogContent as la, AlertDialogHeader as ca, AlertDialogTitle as ua, AlertDialogDescription as da, AlertDialogFooter as fa, AlertDialogCancel as ha, AlertDialogAction as ga, Popover as Ea, PopoverTrigger as ma, DialogContent as pa, DialogHeader as Aa, DialogTitle as ya, Tabs as Ta, TabsList as Sa, TabsTrigger as tn, TabsContent as nn, Textarea as Kn, Alert as _a, AlertDescription as Pa } from "@chaibuilder/sdk/ui";
17
+ import { LogsIcon as wa, Folder as va, Languages as Hn, ChevronDown as fn, Star as ba, Plus as Ts, History as Ia, Play as Ca, Palette as Na, CheckCircle as La, Loader as Ft, Save as Ga, Send as Vn, Rocket as Qn, CopyPlusIcon as Da, Pencil as Oa, Power as ka, Trash as xa, SquareLibrary as $n, Hash as Ra, File as Ua, MoreHorizontal as jn, ExternalLink as Ba, LanguagesIcon as Ma, User as Fa, X as Wn, Trash2 as qa, ImageIcon as zn, Code as Ka, Eye as Ha, Share2 as Va, FileCode2 as Qa, AlertTriangle as $a } from "lucide-react";
18
+ import { useRegisteredChaiBlocks as ja, getDefaultBlockProps as Wa } from "@chaibuilder/runtime";
19
+ import { loadWebBlocks as za } from "@chaibuilder/sdk/web-blocks";
20
20
  const m = {
21
21
  GET_GLOBAL_JSONLD_ITEMS: "GET_GLOBAL_JSONLD_ITEMS",
22
22
  GENERATE_SEO_FIELD: "GENERATE_SEO_FIELD",
@@ -81,10 +81,10 @@ const m = {
81
81
  UPDATE_ASSET: "UPDATE_ASSET",
82
82
  GET_ASSETS: "GET_ASSETS",
83
83
  GET_ASSET: "GET_ASSET"
84
- }, Qa = pe({}), bn = () => ne(Qa), ae = (e, t) => {
85
- const [n] = bn();
84
+ }, Ya = pe({}), In = () => ne(Ya), ae = (e, t) => {
85
+ const [n] = In();
86
86
  return j(() => H(n, e, t), [n, e, t]);
87
- }, G = () => ae("apiUrl", "/chai/api"), ys = () => ae("usersApiUrl", "/chai/users"), yc = () => ae("assetsApiUrl", "/chai/assets"), ja = () => ae("websocket", null), Ts = async (e, t, n = {}) => await fetch(e, {
87
+ }, G = () => ae("apiUrl", "/chai/api"), Ss = () => ae("usersApiUrl", "/chai/users"), bc = () => ae("assetsApiUrl", "/chai/assets"), Ja = () => ae("websocket", null), _s = async (e, t, n = {}) => await fetch(e, {
88
88
  method: "POST",
89
89
  headers: {
90
90
  "Content-Type": "application/json",
@@ -95,7 +95,7 @@ const m = {
95
95
  if (import.meta.vitest) {
96
96
  const { it: e, expect: t } = import.meta.vitest;
97
97
  e("should fetch API", async () => {
98
- const n = await Ts("/v1/api/chai", {
98
+ const n = await _s("/v1/api/chai", {
99
99
  action: "test"
100
100
  });
101
101
  t(n).toBeDefined();
@@ -103,13 +103,13 @@ if (import.meta.vitest) {
103
103
  }
104
104
  const I = () => {
105
105
  const e = ae("onLogout"), t = ae("getAccessToken");
106
- return $(
106
+ return Q(
107
107
  async (n, s, r = {}) => {
108
108
  const a = await t();
109
109
  if (!a)
110
110
  return console.error("No auth token found"), null;
111
111
  try {
112
- const i = H(s, "action", "").toLowerCase(), o = await Ts(n + (i ? `?action=${i}` : ""), s, {
112
+ const i = H(s, "action", "").toLowerCase(), o = await _s(n + (i ? `?action=${i}` : ""), s, {
113
113
  ...r,
114
114
  Authorization: `Bearer ${a}`
115
115
  });
@@ -158,7 +158,7 @@ const xe = (e) => {
158
158
  action: m.GET_LANGUAGE_PAGES,
159
159
  data: { id: s }
160
160
  });
161
- return Tr(Sr(a, "primaryPage"));
161
+ return _r(Pr(a, "primaryPage"));
162
162
  },
163
163
  enabled: !!s
164
164
  });
@@ -178,17 +178,17 @@ const xe = (e) => {
178
178
  data: { draft: !0 }
179
179
  })
180
180
  });
181
- }, Ss = (e) => {
181
+ }, Ps = (e) => {
182
182
  const { fallbackLang: t } = Se(), { data: n } = Re(), { data: s, isFetching: r } = xe(), a = j(() => {
183
183
  const i = { [t]: !0 };
184
- return _r(H(n, "languages"), (o) => {
184
+ return wr(H(n, "languages"), (o) => {
185
185
  const l = re(s, { lang: o });
186
186
  i[o] = !!l;
187
187
  }), i;
188
188
  }, [t, s, n]);
189
189
  return r || ge(e) || e && a[e];
190
190
  };
191
- class Wa {
191
+ class Xa {
192
192
  constructor(t, n, s, r) {
193
193
  we(this, "channelId");
194
194
  we(this, "websocket");
@@ -232,10 +232,10 @@ class Wa {
232
232
  return t.length > 0 ? t[0] : null;
233
233
  }
234
234
  getPageUserMapping() {
235
- const t = this.getOnlineUsers({}), n = Pr(t, "pageId"), s = {};
235
+ const t = this.getOnlineUsers({}), n = vr(t, "pageId"), s = {};
236
236
  return Object.keys(n).forEach((r) => {
237
237
  var i;
238
- const a = (i = wr(n[r], "onlineAt")) == null ? void 0 : i.userId;
238
+ const a = (i = br(n[r], "onlineAt")) == null ? void 0 : i.userId;
239
239
  a !== this.userId && (s[r] = a);
240
240
  }), s;
241
241
  }
@@ -295,20 +295,20 @@ class Wa {
295
295
  }
296
296
  }
297
297
  }
298
- const za = pe(
298
+ const Za = pe(
299
299
  null
300
- ), _s = () => ne(za), In = () => {
301
- const [e] = _s();
300
+ ), ws = () => ne(Za), Cn = () => {
301
+ const [e] = ws();
302
302
  return (e == null ? void 0 : e.slug) || "";
303
303
  };
304
- function Ya(e, t) {
304
+ function ei(e, t) {
305
305
  const [n, s] = q(e);
306
306
  return se(() => {
307
307
  const r = setTimeout(() => s(e), t);
308
308
  return () => clearTimeout(r);
309
309
  }, [e, t]), n;
310
310
  }
311
- const Ja = ({ query: e, uuid: t }) => {
311
+ const ti = ({ query: e, uuid: t }) => {
312
312
  const { selectedLang: n, fallbackLang: s } = Se(), { data: r } = oe(), a = r == null ? void 0 : r.pageType, i = G(), o = I(), { data: l, isFetching: d } = ie({
313
313
  queryKey: [m.GET_DYNAMIC_PAGES, e, a, t],
314
314
  staleTime: 60 * 60 * 1e3,
@@ -320,8 +320,8 @@ const Ja = ({ query: e, uuid: t }) => {
320
320
  enabled: !!a
321
321
  }), f = j(() => n === "" ? l.filter((u) => u.lang === "" || u.lang === s) : l.filter((u) => u.lang === n), [n, s, l]);
322
322
  return { allLangPages: l, data: f, isFetching: d };
323
- }, Xa = () => {
324
- const { selectedLang: e, fallbackLang: t } = Se(), [n, s] = _s(), [r, a] = q(""), i = Ya(r, 500), { allLangPages: o, data: l, isFetching: d } = Ja({ query: i }), f = $((E) => s(E), [s]), u = $((E) => a(E), [a]), h = $(() => {
323
+ }, ni = () => {
324
+ const { selectedLang: e, fallbackLang: t } = Se(), [n, s] = ws(), [r, a] = q(""), i = ei(r, 500), { allLangPages: o, data: l, isFetching: d } = ti({ query: i }), f = Q((E) => s(E), [s]), u = Q((E) => a(E), [a]), h = Q(() => {
325
325
  if (!n) return;
326
326
  const E = !(n != null && n.primaryPage), A = e.length === 0, y = E ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, p = o.filter(
327
327
  (S) => (S == null ? void 0 : S.primaryPage) === y || S.id === y
@@ -339,14 +339,14 @@ const Ja = ({ query: e, uuid: t }) => {
339
339
  updateSearchQuery: u,
340
340
  onChangeLanguage: h
341
341
  };
342
- }, Za = pe({ lastSaved: void 0 }), Cn = () => ne(Za), oe = () => {
342
+ }, si = pe({ lastSaved: void 0 }), Nn = () => ne(si), oe = () => {
343
343
  const [e] = le(), t = e.get("page"), { data: n, isFetching: s } = xe();
344
344
  return { data: j(() => ({ ...re(n, { id: t }) || {} }), [n, t]), isFetching: s };
345
345
  }, be = () => {
346
346
  const [e] = le(), t = e.get("lang") ?? "", { data: n, isFetching: s } = xe();
347
347
  return { data: j(() => re(n, { lang: t }) || {}, [n, t]), isFetching: s };
348
- }, ei = pe({}), ti = () => ne(ei), ni = () => {
349
- const { data: e } = be(), t = In(), n = ae("getLiveUrl", cs), s = e == null ? void 0 : e.slug, r = n(s || "/");
348
+ }, ri = pe({}), ai = () => ne(ri), ii = () => {
349
+ const { data: e } = be(), t = Cn(), n = ae("getLiveUrl", ds), s = e == null ? void 0 : e.slug, r = n(s || "/");
350
350
  return t ? r + t : r;
351
351
  }, It = () => {
352
352
  const e = ae("currentUser"), t = ae("onLogout");
@@ -355,8 +355,8 @@ const Ja = ({ query: e, uuid: t }) => {
355
355
  user: e,
356
356
  logout: t
357
357
  };
358
- }, si = (e) => {
359
- const t = ys(), n = I();
358
+ }, oi = (e) => {
359
+ const t = Ss(), n = I();
360
360
  return ie({
361
361
  queryKey: [m.GET_CHAI_USER, e],
362
362
  queryFn: async () => {
@@ -369,14 +369,14 @@ const Ja = ({ query: e, uuid: t }) => {
369
369
  enabled: !ge(e),
370
370
  staleTime: "static"
371
371
  });
372
- }, ri = pe({
372
+ }, li = pe({
373
373
  status: "checking",
374
374
  requestedBy: "",
375
375
  isTakeOverRequested: !1,
376
376
  requestingClientId: "",
377
377
  isActiveInOtherTab: !1
378
- }), ai = pe(""), ii = pe(null), Nn = pe({}), Tc = () => ne(Nn), Ie = () => {
379
- const [e] = le(), t = e.get("page"), [n, s] = ne(ri), [r, a] = ne(ii), [i, o] = ne(ai), [l] = ne(Nn);
378
+ }), ci = pe(""), ui = pe(null), Ln = pe({}), Ic = () => ne(Ln), Ie = () => {
379
+ const [e] = le(), t = e.get("page"), [n, s] = ne(li), [r, a] = ne(ui), [i, o] = ne(ci), [l] = ne(Ln);
380
380
  return {
381
381
  pageLock: n,
382
382
  pageToUser: l,
@@ -389,8 +389,8 @@ const Ja = ({ query: e, uuid: t }) => {
389
389
  currentEditor: l[t || ""],
390
390
  isLocked: t && n.status === "locked"
391
391
  };
392
- }, oi = () => {
393
- const e = ja(), { data: t } = oe(), { user: n } = It(), s = t == null ? void 0 : t.id, { data: r } = Re(), { pageLock: a, setPageLock: i, setLockingStatus: o, realtimeInstance: l, setRealtimeInstance: d } = Ie(), [, f] = ne(Nn), u = it(!1), h = it(a), E = it(!1);
392
+ }, di = () => {
393
+ const e = Ja(), { data: t } = oe(), { user: n } = It(), s = t == null ? void 0 : t.id, { data: r } = Re(), { pageLock: a, setPageLock: i, setLockingStatus: o, realtimeInstance: l, setRealtimeInstance: d } = Ie(), [, f] = ne(Ln), u = it(!1), h = it(a), E = it(!1);
394
394
  return se(() => {
395
395
  if (n != null && n.id && e && !l && (r != null && r.appKey) && !E.current) {
396
396
  E.current = !0;
@@ -474,7 +474,7 @@ const Ja = ({ query: e, uuid: t }) => {
474
474
  });
475
475
  break;
476
476
  }
477
- }, y = new Wa(
477
+ }, y = new Xa(
478
478
  e,
479
479
  r == null ? void 0 : r.appKey,
480
480
  n == null ? void 0 : n.id,
@@ -496,10 +496,10 @@ const Ja = ({ query: e, uuid: t }) => {
496
496
  }, o(""), i(h.current), l == null || l.leavePage());
497
497
  };
498
498
  }, [s, l]), a == null ? void 0 : a.status;
499
- }, li = () => {
500
- const { data: e } = oe(), { user: t } = It(), n = e == null ? void 0 : e.id, { pageLock: s, setPageLock: r, realtimeInstance: a } = Ie(), { savePageAsync: i } = ke(), o = $(() => {
499
+ }, fi = () => {
500
+ const { data: e } = oe(), { user: t } = It(), n = e == null ? void 0 : e.id, { pageLock: s, setPageLock: r, realtimeInstance: a } = Ie(), { savePageAsync: i } = ke(), o = Q(() => {
501
501
  !a || !n || !(t != null && t.id) || (r({ ...s, isTakeOverRequested: !0 }), a == null || a.sendEvent("TAKE_OVER_REQUESTED"));
502
- }, [a, n, t == null ? void 0 : t.id, r, s]), l = $(async () => {
502
+ }, [a, n, t == null ? void 0 : t.id, r, s]), l = Q(async () => {
503
503
  !a || !n || !(t != null && t.id) || (await i(), a == null || a.sendEvent("TAKE_OVER_REQUEST_ACCEPTED", {
504
504
  requestingClientId: s == null ? void 0 : s.requestingClientId
505
505
  }), r({
@@ -509,7 +509,7 @@ const Ja = ({ query: e, uuid: t }) => {
509
509
  isActiveInOtherTab: !1,
510
510
  isTakeOverRequested: !1
511
511
  }));
512
- }, [n, a, t == null ? void 0 : t.id, r, i, s]), d = $(() => {
512
+ }, [n, a, t == null ? void 0 : t.id, r, i, s]), d = Q(() => {
513
513
  !a || !n || !(t != null && t.id) || (a == null || a.sendEvent("TAKE_OVER_REQUEST_REJECTED", {
514
514
  requestingClientId: s == null ? void 0 : s.requestingClientId
515
515
  }), r({
@@ -527,8 +527,8 @@ const Ja = ({ query: e, uuid: t }) => {
527
527
  rejectTakeOver: d,
528
528
  requestTakeOver: o
529
529
  };
530
- }, ci = K(() => import("./no-language-page-content-CVyOpT9h.js")), ui = K(() => import("./page-locked-by-dialog-D-vXaoga.js")), sn = K(() => import("./page-lock-request-DC62b588.js")), di = ({ isFetchingPage: e }) => {
531
- const { pageLock: t, requestTakeOver: n } = li(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ie(), { data: o, isFetching: l } = si(s), [d] = le(), f = d.get("page"), [u] = Cn(), h = z(), E = $(() => {
530
+ }, hi = K(() => import("./no-language-page-content-Bm5CcsUo.js")), gi = K(() => import("./page-locked-by-dialog-jy3lYV3l.js")), sn = K(() => import("./page-lock-request-WKfG7Sd3.js")), Ei = ({ isFetchingPage: e }) => {
531
+ const { pageLock: t, requestTakeOver: n } = fi(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ie(), { data: o, isFetching: l } = oi(s), [d] = le(), f = d.get("page"), [u] = Nn(), h = z(), E = Q(() => {
532
532
  n();
533
533
  }, [n]);
534
534
  return !f || e || !i || (t == null ? void 0 : t.status) === "checking" ? null : t != null && t.requestedBy ? /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
@@ -550,7 +550,7 @@ const Ja = ({ query: e, uuid: t }) => {
550
550
  }
551
551
  }
552
552
  ) }) : null : t != null && t.isActiveInOtherTab ? /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(sn, { lockingStatus: "page_is_active_in_other_tab", onContinue: n }) }) : /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
553
- ui,
553
+ gi,
554
554
  {
555
555
  ...o,
556
556
  isFetchingUserInfo: l,
@@ -562,9 +562,9 @@ const Ja = ({ query: e, uuid: t }) => {
562
562
  isRequestRejected: r === "take_over_request_rejected"
563
563
  }
564
564
  ) });
565
- }, fi = () => {
565
+ }, mi = () => {
566
566
  const [e] = le(), t = e.get("lang");
567
- return Ss(t) ? null : /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(ci, {}) });
567
+ return Ps(t) ? null : /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(hi, {}) });
568
568
  }, Lt = {
569
569
  ab: "Abkhazian",
570
570
  aa: "Afar",
@@ -754,17 +754,17 @@ const Ja = ({ query: e, uuid: t }) => {
754
754
  za: "Zhuang, Chuang",
755
755
  zu: "Zulu"
756
756
  };
757
- function Ps(e, t, n = !1) {
757
+ function vs(e, t, n = !1) {
758
758
  const s = e.toString() ? `?${e.toString()}` : "/";
759
759
  n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
760
760
  }
761
- const Ln = pe(null), Gn = () => {
761
+ const Gn = pe(null), Dn = () => {
762
762
  const { data: e } = Re();
763
763
  return j(
764
764
  () => (e == null ? void 0 : e.fallbackLang) || "en",
765
765
  [e]
766
766
  );
767
- }, ws = () => {
767
+ }, bs = () => {
768
768
  const e = I(), t = G();
769
769
  return ie({
770
770
  queryKey: [m.GET_WEBSITE_PAGES],
@@ -772,8 +772,8 @@ const Ln = pe(null), Gn = () => {
772
772
  queryFn: async () => e(t, { action: m.GET_WEBSITE_PAGES }) || [],
773
773
  placeholderData: (n) => n || []
774
774
  });
775
- }, Sc = (e) => {
776
- const t = I(), n = G(), s = Gn();
775
+ }, Cc = (e) => {
776
+ const t = I(), n = G(), s = Dn();
777
777
  return ie({
778
778
  queryKey: [m.GET_WEBSITE_PAGES, e, s],
779
779
  staleTime: 1e3 * 60 * 5,
@@ -781,15 +781,15 @@ const Ln = pe(null), Gn = () => {
781
781
  queryFn: async () => {
782
782
  if (s === e) return {};
783
783
  const r = await t(n, { action: m.GET_WEBSITE_PAGES, data: { lang: e } }) || [];
784
- return vr(
784
+ return Ir(
785
785
  Bt(r, (a) => ({ ...a, lang: e })),
786
786
  "primaryPage"
787
787
  );
788
788
  },
789
789
  placeholderData: (r) => r || {}
790
790
  });
791
- }, hi = K(() => import("./page-manager-new-Cto2r7Va.js")), vs = ({ children: e }) => {
792
- const [t, n] = le(), s = t.get("page"), { data: r, isFetching: a } = oe(), { data: i, isFetching: o } = ws(), [l, d] = q(!1), [f, u] = q(!0), { savePage: h } = ke(), E = !!s && !ge(r), A = j(() => {
791
+ }, pi = K(() => import("./page-manager-new-CNHlSwfe.js")), Is = ({ children: e }) => {
792
+ const [t, n] = le(), s = t.get("page"), { data: r, isFetching: a } = oe(), { data: i, isFetching: o } = bs(), [l, d] = q(!1), [f, u] = q(!0), { savePage: h } = ke(), E = !!s && !ge(r), A = j(() => {
793
793
  if (!i || o) return !1;
794
794
  const S = i.find((C) => C.slug === "/");
795
795
  return S == null ? void 0 : S.id;
@@ -797,7 +797,7 @@ const Ln = pe(null), Gn = () => {
797
797
  se(() => {
798
798
  if (o || !A || i.some((U) => U.id === s)) return;
799
799
  const C = new URLSearchParams({ page: A });
800
- Ps(C, n), !o && i && u(!1);
800
+ vs(C, n), !o && i && u(!1);
801
801
  }, [s, o, i, A, n]);
802
802
  const y = !f && !s, T = !f && !a && ge(r), p = l || y || T;
803
803
  return /* @__PURE__ */ g(Ee, { children: [
@@ -809,37 +809,37 @@ const Ln = pe(null), Gn = () => {
809
809
  onClick: () => {
810
810
  h(), d(!0);
811
811
  },
812
- children: e || /* @__PURE__ */ c(B, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(Ta, { className: "h-4 w-4" }) }, "template-viewer")
812
+ children: e || /* @__PURE__ */ c(B, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(wa, { className: "h-4 w-4" }) }, "template-viewer")
813
813
  }
814
814
  ),
815
815
  /* @__PURE__ */ c(Yt, { side: "right", children: /* @__PURE__ */ c("p", { children: "Open pages manager" }) })
816
816
  ] }) }) }),
817
- /* @__PURE__ */ c(gs, { open: p, onOpenChange: (S) => !S && E && d(!1), children: /* @__PURE__ */ g(
818
- Es,
817
+ /* @__PURE__ */ c(ms, { open: p, onOpenChange: (S) => !S && E && d(!1), children: /* @__PURE__ */ g(
818
+ ps,
819
819
  {
820
820
  side: "left",
821
821
  "aria-describedby": "pages-manager-description",
822
822
  className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${E ? "" : "sheet-hide-close-btn"}`,
823
823
  children: [
824
- /* @__PURE__ */ g(Wr, { className: "mb-3 px-4 pt-4", children: [
825
- /* @__PURE__ */ g(zr, { className: "flex items-center gap-2 text-sm font-semibold", children: [
826
- /* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(Sa, { className: "h-4 w-4" }) }),
824
+ /* @__PURE__ */ g(Xr, { className: "mb-3 px-4 pt-4", children: [
825
+ /* @__PURE__ */ g(Zr, { className: "flex items-center gap-2 text-sm font-semibold", children: [
826
+ /* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(va, { className: "h-4 w-4" }) }),
827
827
  /* @__PURE__ */ g("div", { className: "flex flex-col", children: [
828
828
  /* @__PURE__ */ c("span", { className: "text-sm font-semibold", children: "Pages" }),
829
829
  /* @__PURE__ */ c("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: "Manage your site structure" })
830
830
  ] })
831
831
  ] }),
832
- /* @__PURE__ */ c(Yr, { className: "sr-only", children: "Manage your site structure" })
832
+ /* @__PURE__ */ c(ea, { className: "sr-only", children: "Manage your site structure" })
833
833
  ] }),
834
- /* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: p && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(hi, { close: () => d(!1) }) }) })
834
+ /* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: p && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(pi, { close: () => d(!1) }) }) })
835
835
  ]
836
836
  }
837
837
  ) })
838
838
  ] });
839
- }, gi = K(() => import("./add-new-language-page-8q4Ku3eg.js")), Ei = () => {
839
+ }, Ai = K(() => import("./add-new-language-page-DENCjC_f.js")), yi = () => {
840
840
  const e = ae("topLeftCorner", null);
841
- return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: xr.createElement(e, {}) }) : null;
842
- }, mi = ({
841
+ return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Ur.createElement(e, {}) }) : null;
842
+ }, Ti = ({
843
843
  showAdd: e = !0,
844
844
  variant: t = "ghost"
845
845
  }) => {
@@ -848,8 +848,8 @@ const Ln = pe(null), Gn = () => {
848
848
  const T = new URLSearchParams(window.location.search), p = T.get("lang");
849
849
  p && (s.includes(p) ? a(p) : (T.delete("lang"), o(T), a("")));
850
850
  }, [s, o, a]);
851
- const [, d] = ne(Ln), { data: f } = oe(), { data: u } = Re(), { data: h } = xe(), E = j(() => {
852
- const T = us(
851
+ const [, d] = ne(Gn), { data: f } = oe(), { data: u } = Re(), { data: h } = xe(), E = j(() => {
852
+ const T = fs(
853
853
  Bt(H(u, "languages"), (p) => {
854
854
  const S = re(h, { lang: p });
855
855
  return {
@@ -883,14 +883,14 @@ const Ln = pe(null), Gn = () => {
883
883
  }, y = (T) => {
884
884
  a(T);
885
885
  const p = new URLSearchParams(window.location.search);
886
- T === n ? p.delete("lang") : p.set("lang", T), Ps(p, o);
886
+ T === n ? p.delete("lang") : p.set("lang", T), vs(p, o);
887
887
  };
888
888
  return ge(s) ? null : l ? /* @__PURE__ */ g(B, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
889
- /* @__PURE__ */ c(qn, { className: "h-4 w-4" }),
889
+ /* @__PURE__ */ c(Hn, { className: "h-4 w-4" }),
890
890
  H(Lt, i, i),
891
- /* @__PURE__ */ c(dn, { className: "h-4 w-4" })
892
- ] }) : /* @__PURE__ */ c(Ee, { children: /* @__PURE__ */ g(Pn, { children: [
893
- /* @__PURE__ */ c(wn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ g(
891
+ /* @__PURE__ */ c(fn, { className: "h-4 w-4" })
892
+ ] }) : /* @__PURE__ */ c(Ee, { children: /* @__PURE__ */ g(wn, { children: [
893
+ /* @__PURE__ */ c(vn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ g(
894
894
  B,
895
895
  {
896
896
  disabled: !!l,
@@ -898,13 +898,13 @@ const Ln = pe(null), Gn = () => {
898
898
  size: "sm",
899
899
  className: "ml-px h-max gap-2 py-1.5",
900
900
  children: [
901
- /* @__PURE__ */ c(qn, { className: "h-4 w-4" }),
901
+ /* @__PURE__ */ c(Hn, { className: "h-4 w-4" }),
902
902
  H(Lt, i, i),
903
- /* @__PURE__ */ c(dn, { className: "h-4 w-4" })
903
+ /* @__PURE__ */ c(fn, { className: "h-4 w-4" })
904
904
  ]
905
905
  }
906
906
  ) }),
907
- /* @__PURE__ */ g(vn, { className: "space-y-1 border-border", children: [
907
+ /* @__PURE__ */ g(bn, { className: "space-y-1 border-border", children: [
908
908
  Bt(
909
909
  E.filter((T) => T.isLangPageAdded),
910
910
  (T) => /* @__PURE__ */ g(
@@ -918,7 +918,7 @@ const Ln = pe(null), Gn = () => {
918
918
  children: [
919
919
  /* @__PURE__ */ c("div", { className: "text-slate-600", children: T.value }),
920
920
  T.key === n && /* @__PURE__ */ g("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
921
- /* @__PURE__ */ c(_a, { fill: "orange", className: "h-2 w-2" }),
921
+ /* @__PURE__ */ c(ba, { fill: "orange", className: "h-2 w-2" }),
922
922
  "Primary"
923
923
  ] })
924
924
  ]
@@ -927,7 +927,7 @@ const Ln = pe(null), Gn = () => {
927
927
  )
928
928
  ),
929
929
  e && !ge(E.filter((T) => !T.isLangPageAdded)) && /* @__PURE__ */ g(Ee, { children: [
930
- /* @__PURE__ */ c(Jr, {}),
930
+ /* @__PURE__ */ c(ta, {}),
931
931
  /* @__PURE__ */ g(
932
932
  B,
933
933
  {
@@ -941,7 +941,7 @@ const Ln = pe(null), Gn = () => {
941
941
  },
942
942
  className: "text-xs font-normal duration-200 hover:bg-slate-300 hover:text-slate-800",
943
943
  children: [
944
- /* @__PURE__ */ c(As, { className: "mr-1 h-3 w-3" }),
944
+ /* @__PURE__ */ c(Ts, { className: "mr-1 h-3 w-3" }),
945
945
  " Add Langauge"
946
946
  ]
947
947
  }
@@ -950,13 +950,13 @@ const Ln = pe(null), Gn = () => {
950
950
  ] })
951
951
  ] }) });
952
952
  };
953
- function pi() {
954
- const [e, t] = ne(Ln);
953
+ function Si() {
954
+ const [e, t] = ne(Gn);
955
955
  return /* @__PURE__ */ g("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
956
- /* @__PURE__ */ c(Ei, {}),
957
- /* @__PURE__ */ c(vs, {}),
956
+ /* @__PURE__ */ c(yi, {}),
957
+ /* @__PURE__ */ c(Is, {}),
958
958
  e && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
959
- gi,
959
+ Ai,
960
960
  {
961
961
  isOpen: !0,
962
962
  id: e == null ? void 0 : e.id,
@@ -968,7 +968,7 @@ function pi() {
968
968
  ) })
969
969
  ] });
970
970
  }
971
- function Ai() {
971
+ function _i() {
972
972
  return /* @__PURE__ */ c("div", { className: "mt-2 space-y-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ g("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
973
973
  /* @__PURE__ */ g("div", { className: "flex-1 space-y-1", children: [
974
974
  /* @__PURE__ */ c(Nt, { className: "h-4 w-3/4" }),
@@ -978,19 +978,19 @@ function Ai() {
978
978
  /* @__PURE__ */ c(Nt, { className: "h-8 w-8 rounded-full" })
979
979
  ] }, t)) });
980
980
  }
981
- const yi = W.lazy(() => import("./page-revisions-content-BaTqBnko.js"));
982
- function Ti() {
981
+ const Pi = W.lazy(() => import("./page-revisions-content-PRgwV04S.js"));
982
+ function wi() {
983
983
  const [e, t] = W.useState(!1);
984
- return /* @__PURE__ */ c(ms, { children: /* @__PURE__ */ g(Wt, { delayDuration: 0, children: [
985
- /* @__PURE__ */ g(gs, { open: e, onOpenChange: t, children: [
986
- /* @__PURE__ */ c(Xr, { asChild: !0, children: /* @__PURE__ */ c(zt, { asChild: !0, children: /* @__PURE__ */ g("span", { className: "flex items-center gap-2", children: [
984
+ return /* @__PURE__ */ c(As, { children: /* @__PURE__ */ g(Wt, { delayDuration: 0, children: [
985
+ /* @__PURE__ */ g(ms, { open: e, onOpenChange: t, children: [
986
+ /* @__PURE__ */ c(na, { asChild: !0, children: /* @__PURE__ */ c(zt, { asChild: !0, children: /* @__PURE__ */ g("span", { className: "flex items-center gap-2", children: [
987
987
  /* @__PURE__ */ g(B, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
988
- /* @__PURE__ */ c(Pa, { className: "h-4 w-4" }),
988
+ /* @__PURE__ */ c(Ia, { className: "h-4 w-4" }),
989
989
  /* @__PURE__ */ c("span", { className: "sr-only", children: "View revision history" })
990
990
  ] }),
991
991
  /* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
992
992
  ] }) }) }),
993
- /* @__PURE__ */ c(Es, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c(Ai, {}), children: /* @__PURE__ */ c(yi, { isOpen: e }) }) })
993
+ /* @__PURE__ */ c(ps, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c(_i, {}), children: /* @__PURE__ */ c(Pi, { isOpen: e }) }) })
994
994
  ] }),
995
995
  /* @__PURE__ */ c(Yt, { side: "bottom", children: /* @__PURE__ */ c("p", { children: "Revision history" }) })
996
996
  ] }) });
@@ -1001,7 +1001,7 @@ const rn = ({
1001
1001
  children: n,
1002
1002
  fallback: s = null
1003
1003
  }) => {
1004
- const { hasPermission: r } = hs();
1004
+ const { hasPermission: r } = Es();
1005
1005
  return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
1006
1006
  }, Z = {
1007
1007
  TOGGLE_PREVIEW: "Toggle Preview",
@@ -1053,7 +1053,7 @@ const rn = ({
1053
1053
  GLOBAL_BLOCK_PUBLISH_SUCCESS: "Global block published successfully.",
1054
1054
  PAGES_PUBLISH_SUCCESS: "Your changes have been published successfully.",
1055
1055
  SLUG_CHANGE_SUCCESS: "Slug changed successfully."
1056
- }, Si = {
1056
+ }, vi = {
1057
1057
  SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
1058
1058
  }, Ce = () => {
1059
1059
  const e = G(), t = I();
@@ -1063,10 +1063,10 @@ const rn = ({
1063
1063
  placeholderData: [],
1064
1064
  queryFn: async () => t(e, { action: m.GET_PAGE_TYPES })
1065
1065
  });
1066
- }, _i = (e) => {
1066
+ }, bi = (e) => {
1067
1067
  const { data: t } = Ce();
1068
1068
  return j(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
1069
- }, Pi = () => {
1069
+ }, Ii = () => {
1070
1070
  const e = G(), t = I();
1071
1071
  return X({
1072
1072
  mutationFn: async ({ pageType: n, query: s }) => {
@@ -1083,7 +1083,7 @@ const rn = ({
1083
1083
  }
1084
1084
  }
1085
1085
  });
1086
- }, _c = () => {
1086
+ }, Nc = () => {
1087
1087
  const e = G(), t = z(), n = I(), { data: s } = Ce();
1088
1088
  return X({
1089
1089
  mutationFn: async (r) => await n(e, {
@@ -1105,11 +1105,11 @@ const rn = ({
1105
1105
  onError: (r, a) => {
1106
1106
  const i = re(s, { key: a.pageType });
1107
1107
  R.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
1108
- description: H(Si, r.message, r.message)
1108
+ description: H(vi, r.message, r.message)
1109
1109
  });
1110
1110
  }
1111
1111
  });
1112
- }, Pc = () => {
1112
+ }, Lc = () => {
1113
1113
  const e = G(), t = z(), n = I(), { data: s } = be(), { data: r } = Ce();
1114
1114
  return X({
1115
1115
  mutationFn: async (a) => await n(e, {
@@ -1134,7 +1134,7 @@ const rn = ({
1134
1134
  });
1135
1135
  }
1136
1136
  });
1137
- }, wc = () => {
1137
+ }, Gc = () => {
1138
1138
  const e = G(), t = z(), n = I(), { data: s } = Ce();
1139
1139
  return X({
1140
1140
  mutationFn: async (r) => n(e, {
@@ -1163,7 +1163,7 @@ const rn = ({
1163
1163
  });
1164
1164
  }
1165
1165
  });
1166
- }, vc = () => {
1166
+ }, Dc = () => {
1167
1167
  const e = G(), t = z(), n = I(), { data: s } = Ce();
1168
1168
  return X({
1169
1169
  mutationFn: async (r) => n(e, {
@@ -1188,7 +1188,7 @@ const rn = ({
1188
1188
  });
1189
1189
  }
1190
1190
  });
1191
- }, bs = () => {
1191
+ }, Cs = () => {
1192
1192
  const e = G(), t = I(), n = z(), { data: s } = oe(), { savePageAsync: r } = ke();
1193
1193
  return X({
1194
1194
  mutationFn: async ({ ids: a }) => (await r(), t(e, {
@@ -1208,7 +1208,7 @@ const rn = ({
1208
1208
  console.log("##", a), R.error("Failed to publish pages.");
1209
1209
  }
1210
1210
  });
1211
- }, bc = () => {
1211
+ }, Oc = () => {
1212
1212
  const e = G(), t = I(), n = z();
1213
1213
  return X({
1214
1214
  mutationFn: async (s) => {
@@ -1233,7 +1233,7 @@ const rn = ({
1233
1233
  R.error("Failed to mark page as template.");
1234
1234
  }
1235
1235
  });
1236
- }, Ic = () => {
1236
+ }, kc = () => {
1237
1237
  const e = G(), t = I(), n = z();
1238
1238
  return X({
1239
1239
  mutationFn: async (s) => t(e, {
@@ -1249,7 +1249,7 @@ const rn = ({
1249
1249
  R.error("Failed to unmark page as template.");
1250
1250
  }
1251
1251
  });
1252
- }, Cc = () => {
1252
+ }, xc = () => {
1253
1253
  const e = G(), t = I(), n = z();
1254
1254
  return X({
1255
1255
  mutationFn: async ({ id: s, slug: r }) => t(e, {
@@ -1267,17 +1267,17 @@ const rn = ({
1267
1267
  R.error("Failed to change slug");
1268
1268
  }
1269
1269
  });
1270
- }, wi = K(() => import("./publish-pages-content-C9CgEWo0.js"));
1271
- function vi({
1270
+ }, Ci = K(() => import("./publish-pages-content-C24iBibw.js"));
1271
+ function Ni({
1272
1272
  showModal: e = !1,
1273
1273
  onClose: t = () => console.log("Cancelled")
1274
1274
  }) {
1275
- const { mutate: n, isPending: s } = bs();
1276
- return /* @__PURE__ */ c(ps, { open: e, onOpenChange: s ? () => {
1277
- } : t, children: e && /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(wi, { onClose: t, isPending: s, publishPage: n }) }) });
1275
+ const { mutate: n, isPending: s } = Cs();
1276
+ return /* @__PURE__ */ c(ys, { open: e, onOpenChange: s ? () => {
1277
+ } : t, children: e && /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(Ci, { onClose: t, isPending: s, publishPage: n }) }) });
1278
1278
  }
1279
1279
  const de = {
1280
- ...Br,
1280
+ ...Kr,
1281
1281
  //pages
1282
1282
  ADD_PAGE: "add_page",
1283
1283
  EDIT_PAGE: "edit_page",
@@ -1313,12 +1313,12 @@ const de = {
1313
1313
  ADD_MEDIA: "add_media",
1314
1314
  EDIT_MEDIA: "edit_media",
1315
1315
  DELETE_MEDIA: "delete_media"
1316
- }, bi = {
1316
+ }, Li = {
1317
1317
  particleCount: 350,
1318
1318
  spread: 120,
1319
1319
  origin: { y: 0.6 },
1320
1320
  angle: 90
1321
- }, Ii = {
1321
+ }, Gi = {
1322
1322
  TOP_RIGHT: {
1323
1323
  angle: 225,
1324
1324
  origin: { x: 0.9, y: 0 }
@@ -1327,35 +1327,35 @@ const de = {
1327
1327
  angle: 100,
1328
1328
  origin: { x: 0.9, y: 0.9 }
1329
1329
  }
1330
- }, Ci = async () => {
1330
+ }, Di = async () => {
1331
1331
  const { default: e } = await import("./confetti.module-DCmCkDyV.js");
1332
1332
  return e;
1333
1333
  }, an = (e) => {
1334
- let t = Ii[e];
1334
+ let t = Gi[e];
1335
1335
  t || (t = {});
1336
- const n = { ...bi, ...t };
1337
- Ci().then((s) => s(n));
1336
+ const n = { ...Li, ...t };
1337
+ Di().then((s) => s(n));
1338
1338
  };
1339
- function Dn({
1339
+ function On({
1340
1340
  children: e,
1341
1341
  content: t,
1342
1342
  side: n = "bottom",
1343
1343
  delayDuration: s = 700,
1344
1344
  showTooltip: r = !0
1345
1345
  }) {
1346
- return r ? /* @__PURE__ */ c(ms, { children: /* @__PURE__ */ g(Wt, { delayDuration: s, children: [
1346
+ return r ? /* @__PURE__ */ c(As, { children: /* @__PURE__ */ g(Wt, { delayDuration: s, children: [
1347
1347
  /* @__PURE__ */ c(zt, { asChild: !0, children: e }),
1348
1348
  /* @__PURE__ */ c(Yt, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
1349
1349
  ] }) }) : e;
1350
1350
  }
1351
- const Ni = K(() => import("./unpublish-page-BTPEVAkv.js")), Li = K(() => import("./translation-warning-modal-DalBhNQy.js")), Gi = () => {
1351
+ const Oi = K(() => import("./unpublish-page-yGyz2jiw.js")), ki = K(() => import("./translation-warning-modal-DalBhNQy.js")), xi = () => {
1352
1352
  const { selectedLang: e, fallbackLang: t } = Se(), n = ae("getPreviewUrl", async (u) => u), [s, r] = q(""), { data: a } = oe(), { data: i } = xe(), { data: o } = Ce(), l = j(
1353
1353
  () => {
1354
1354
  var u;
1355
1355
  return (u = i == null ? void 0 : i.find((h) => (h == null ? void 0 : h.lang) === e)) == null ? void 0 : u.slug;
1356
1356
  },
1357
1357
  [e, i]
1358
- ), d = $((u) => {
1358
+ ), d = Q((u) => {
1359
1359
  var h;
1360
1360
  return (h = re(o, { key: u })) == null ? void 0 : h.hasSlug;
1361
1361
  }, [o]), f = e === t ? "" : e;
@@ -1369,23 +1369,23 @@ const Ni = K(() => import("./unpublish-page-BTPEVAkv.js")), Li = K(() => import(
1369
1369
  } else
1370
1370
  r("");
1371
1371
  })();
1372
- }, [n, l, a == null ? void 0 : a.pageType, d, a == null ? void 0 : a.id, f]), /* @__PURE__ */ c(Ee, { children: /* @__PURE__ */ c(Dn, { content: Z.OPEN_PREVIEW_IN_NEW_TAB, delayDuration: 0, children: /* @__PURE__ */ c("a", { href: s, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c(B, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ c(wa, { className: "h-4 w-4" }) }) }) }) });
1373
- }, Di = () => {
1374
- const [e, t] = Mr();
1372
+ }, [n, l, a == null ? void 0 : a.pageType, d, a == null ? void 0 : a.id, f]), /* @__PURE__ */ c(Ee, { children: /* @__PURE__ */ c(On, { content: Z.OPEN_PREVIEW_IN_NEW_TAB, delayDuration: 0, children: /* @__PURE__ */ c("a", { href: s, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c(B, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ c(Ca, { className: "h-4 w-4" }) }) }) }) });
1373
+ }, Ri = () => {
1374
+ const [e, t] = Hr();
1375
1375
  return /* @__PURE__ */ g(Ee, { children: [
1376
- /* @__PURE__ */ c(Dn, { content: Z.THEME, delayDuration: 0, children: /* @__PURE__ */ c(
1376
+ /* @__PURE__ */ c(On, { content: Z.THEME, delayDuration: 0, children: /* @__PURE__ */ c(
1377
1377
  B,
1378
1378
  {
1379
1379
  variant: e === "theme" ? "outline" : "ghost",
1380
1380
  size: "icon",
1381
1381
  className: "gap-2",
1382
1382
  onClick: () => t(e === "theme" ? "block" : "theme"),
1383
- children: /* @__PURE__ */ c(va, { className: "h-4 w-4" })
1383
+ children: /* @__PURE__ */ c(Na, { className: "h-4 w-4" })
1384
1384
  }
1385
1385
  ) }),
1386
1386
  /* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
1387
1387
  ] });
1388
- }, Oi = () => {
1388
+ }, Ui = () => {
1389
1389
  const [e, t] = q(!1), { isLocked: n } = Ie(), { savePageAsync: s, saveState: r } = ke();
1390
1390
  se(() => {
1391
1391
  const d = (f) => {
@@ -1395,14 +1395,14 @@ const Ni = K(() => import("./unpublish-page-BTPEVAkv.js")), Li = K(() => import(
1395
1395
  window.removeEventListener("beforeunload", d);
1396
1396
  };
1397
1397
  }, [r]);
1398
- const a = $(async () => {
1398
+ const a = Q(async () => {
1399
1399
  e || (t(!0), await s(), t(!1));
1400
1400
  }, [s, e]), { buttonIcon: i, buttonClass: o, tooltipContent: l } = j(() => {
1401
1401
  switch (r) {
1402
1402
  case "UNSAVED":
1403
1403
  return {
1404
1404
  tooltipContent: Z.SAVEDRAFT,
1405
- buttonIcon: /* @__PURE__ */ c(Ia, { className: "h-4 w-4" }),
1405
+ buttonIcon: /* @__PURE__ */ c(Ga, { className: "h-4 w-4" }),
1406
1406
  buttonClass: "gap-x-1"
1407
1407
  };
1408
1408
  case "SAVING":
@@ -1414,7 +1414,7 @@ const Ni = K(() => import("./unpublish-page-BTPEVAkv.js")), Li = K(() => import(
1414
1414
  case "SAVED":
1415
1415
  return {
1416
1416
  tooltipContent: Z.SAVED,
1417
- buttonIcon: /* @__PURE__ */ c(ba, { className: "h-4 w-4" }),
1417
+ buttonIcon: /* @__PURE__ */ c(La, { className: "h-4 w-4" }),
1418
1418
  buttonClass: "text-green-500 gap-x-1"
1419
1419
  };
1420
1420
  }
@@ -1424,8 +1424,8 @@ const Ni = K(() => import("./unpublish-page-BTPEVAkv.js")), Li = K(() => import(
1424
1424
  " ",
1425
1425
  l
1426
1426
  ] });
1427
- }, ki = () => {
1428
- const { selectedLang: e } = Se(), { data: t } = be(), { data: n } = xe(), [s, r] = q(!1), [a, i] = q(!1), [o, l] = q(null), { savePageAsync: d } = ke(), [f, u] = q(!1), { data: h } = oe(), { mutate: E, isPending: A } = bs(), { needTranslations: y } = ke(), T = y(), { buttonText: p, buttonClassName: S, isPublished: C } = j(() => {
1427
+ }, Bi = () => {
1428
+ const { selectedLang: e } = Se(), { data: t } = be(), { data: n } = xe(), [s, r] = q(!1), [a, i] = q(!1), [o, l] = q(null), { savePageAsync: d } = ke(), [f, u] = q(!1), { data: h } = oe(), { mutate: E, isPending: A } = Cs(), { needTranslations: y } = ke(), T = y(), { buttonText: p, buttonClassName: S, isPublished: C } = j(() => {
1429
1429
  const O = h && (h == null ? void 0 : h.online);
1430
1430
  return {
1431
1431
  buttonClassName: O ? "hover:bg-green-600 bg-green-500" : "",
@@ -1440,7 +1440,7 @@ const Ni = K(() => import("./unpublish-page-BTPEVAkv.js")), Li = K(() => import(
1440
1440
  M();
1441
1441
  }, M = () => {
1442
1442
  const O = [t == null ? void 0 : t.id, t == null ? void 0 : t.primaryPage];
1443
- E({ ids: us(O) }, { onSuccess: () => an("TOP_RIGHT") });
1443
+ E({ ids: fs(O) }, { onSuccess: () => an("TOP_RIGHT") });
1444
1444
  }, L = () => {
1445
1445
  u(!1), M();
1446
1446
  }, Ae = async () => {
@@ -1462,32 +1462,32 @@ const Ni = K(() => import("./unpublish-page-BTPEVAkv.js")), Li = K(() => import(
1462
1462
  "span",
1463
1463
  {
1464
1464
  className: `flex items-center transition-transform duration-300 ease-in-out ${a ? "-translate-y-10" : ""}`,
1465
- children: C ? /* @__PURE__ */ c(Kn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Hn, { className: "h-4 w-4" })
1465
+ children: C ? /* @__PURE__ */ c(Vn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Qn, { className: "h-4 w-4" })
1466
1466
  }
1467
1467
  ),
1468
1468
  /* @__PURE__ */ c(
1469
1469
  "span",
1470
1470
  {
1471
1471
  className: `absolute inset-0 left-3 flex items-center transition-transform duration-300 ease-in-out ${a ? "" : "translate-y-10"}`,
1472
- children: C ? /* @__PURE__ */ c(Hn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Kn, { className: "h-4 w-4" })
1472
+ children: C ? /* @__PURE__ */ c(Qn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Vn, { className: "h-4 w-4" })
1473
1473
  }
1474
1474
  ),
1475
1475
  /* @__PURE__ */ c("span", { children: p }),
1476
- e ? `(${Bn(e)})` : ""
1476
+ e ? `(${Mn(e)})` : ""
1477
1477
  ]
1478
1478
  }
1479
1479
  ),
1480
- /* @__PURE__ */ g(Pn, { children: [
1481
- /* @__PURE__ */ c(wn, { asChild: !0, children: /* @__PURE__ */ c(
1480
+ /* @__PURE__ */ g(wn, { children: [
1481
+ /* @__PURE__ */ c(vn, { asChild: !0, children: /* @__PURE__ */ c(
1482
1482
  B,
1483
1483
  {
1484
1484
  size: "sm",
1485
1485
  disabled: A || !(h != null && h.id),
1486
1486
  className: `rounded-l-none border-l border-white/50 px-2 text-white ${S}`,
1487
- children: /* @__PURE__ */ c(dn, { className: "h-4 w-4" })
1487
+ children: /* @__PURE__ */ c(fn, { className: "h-4 w-4" })
1488
1488
  }
1489
1489
  ) }),
1490
- /* @__PURE__ */ g(vn, { align: "end", className: "w-52", children: [
1490
+ /* @__PURE__ */ g(bn, { align: "end", className: "w-52", children: [
1491
1491
  /* @__PURE__ */ g(
1492
1492
  fe,
1493
1493
  {
@@ -1519,15 +1519,15 @@ const Ni = K(() => import("./unpublish-page-BTPEVAkv.js")), Li = K(() => import(
1519
1519
  C && /* @__PURE__ */ g(fe, { onClick: () => l(t), className: "cursor-pointer text-xs", children: [
1520
1520
  Z.UNPUBLISH,
1521
1521
  " page ",
1522
- e ? `(${Bn(e)})` : ""
1522
+ e ? `(${Mn(e)})` : ""
1523
1523
  ] })
1524
1524
  ] })
1525
1525
  ] })
1526
1526
  ] }),
1527
- /* @__PURE__ */ c(vi, { showModal: s, onClose: () => r(!1) }),
1528
- o && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Ni, { page: o, onClose: () => l(null) }) }),
1527
+ /* @__PURE__ */ c(Ni, { showModal: s, onClose: () => r(!1) }),
1528
+ o && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Oi, { page: o, onClose: () => l(null) }) }),
1529
1529
  f && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
1530
- Li,
1530
+ ki,
1531
1531
  {
1532
1532
  isOpen: f,
1533
1533
  onClose: Ae,
@@ -1537,17 +1537,17 @@ const Ni = K(() => import("./unpublish-page-BTPEVAkv.js")), Li = K(() => import(
1537
1537
  ) })
1538
1538
  ] });
1539
1539
  };
1540
- function xi() {
1541
- const { isLocked: e } = Ie(), [t] = le(), n = t.get("lang"), s = Ss(n);
1540
+ function Mi() {
1541
+ const { isLocked: e } = Ie(), [t] = le(), n = t.get("lang"), s = Ps(n);
1542
1542
  return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ g("div", { className: "flex items-center justify-end gap-1", children: [
1543
- /* @__PURE__ */ c(Ti, {}),
1544
- /* @__PURE__ */ c(rn, { permission: de.EDIT_THEME, children: /* @__PURE__ */ c(Di, {}) }),
1545
- /* @__PURE__ */ c(Gi, {}),
1546
- /* @__PURE__ */ c(rn, { permission: de.SAVE_PAGE, children: /* @__PURE__ */ c(Oi, {}) }),
1547
- /* @__PURE__ */ c(rn, { permission: de.PUBLISH_PAGE, children: /* @__PURE__ */ c(ki, {}) })
1543
+ /* @__PURE__ */ c(wi, {}),
1544
+ /* @__PURE__ */ c(rn, { permission: de.EDIT_THEME, children: /* @__PURE__ */ c(Ri, {}) }),
1545
+ /* @__PURE__ */ c(xi, {}),
1546
+ /* @__PURE__ */ c(rn, { permission: de.SAVE_PAGE, children: /* @__PURE__ */ c(Ui, {}) }),
1547
+ /* @__PURE__ */ c(rn, { permission: de.PUBLISH_PAGE, children: /* @__PURE__ */ c(Bi, {}) })
1548
1548
  ] });
1549
1549
  }
1550
- const Ri = ({
1550
+ const Fi = ({
1551
1551
  page: e,
1552
1552
  setDuplicatePage: t,
1553
1553
  setAddEditPage: n,
@@ -1558,10 +1558,10 @@ const Ri = ({
1558
1558
  children: o,
1559
1559
  isLanguagePage: l
1560
1560
  }) => {
1561
- const { hasPermission: d } = hs(), { data: f } = Ce(), u = j(() => re(f, { key: e.pageType }), [f, e.pageType]), h = j(() => !!e.isTemplate, [e.isTemplate]), E = j(() => !!(u != null && u.hasSlug), [u == null ? void 0 : u.hasSlug]);
1562
- return !d(de.EDIT_PAGE) && !d(de.DELETE_PAGE) && !d(de.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ g(Pn, { children: [
1563
- /* @__PURE__ */ c(wn, { asChild: !0, onClick: (y) => y.stopPropagation(), children: o }),
1564
- /* @__PURE__ */ g(vn, { align: "center", className: "text-sm", children: [
1561
+ const { hasPermission: d } = Es(), { data: f } = Ce(), u = j(() => re(f, { key: e.pageType }), [f, e.pageType]), h = j(() => !!e.isTemplate, [e.isTemplate]), E = j(() => !!(u != null && u.hasSlug), [u == null ? void 0 : u.hasSlug]);
1562
+ return !d(de.EDIT_PAGE) && !d(de.DELETE_PAGE) && !d(de.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ g(wn, { children: [
1563
+ /* @__PURE__ */ c(vn, { asChild: !0, onClick: (y) => y.stopPropagation(), children: o }),
1564
+ /* @__PURE__ */ g(bn, { align: "center", className: "text-sm", children: [
1565
1565
  d(de.ADD_PAGE) && !l && /* @__PURE__ */ g(
1566
1566
  fe,
1567
1567
  {
@@ -1570,7 +1570,7 @@ const Ri = ({
1570
1570
  y.stopPropagation(), t(e);
1571
1571
  },
1572
1572
  children: [
1573
- /* @__PURE__ */ c(Ca, { className: "size-3" }),
1573
+ /* @__PURE__ */ c(Da, { className: "size-3" }),
1574
1574
  "Duplicate page"
1575
1575
  ]
1576
1576
  }
@@ -1586,7 +1586,7 @@ const Ri = ({
1586
1586
  });
1587
1587
  },
1588
1588
  children: [
1589
- /* @__PURE__ */ c(Na, { className: "size-3" }),
1589
+ /* @__PURE__ */ c(Oa, { className: "size-3" }),
1590
1590
  "Edit"
1591
1591
  ]
1592
1592
  }
@@ -1599,7 +1599,7 @@ const Ri = ({
1599
1599
  y.stopPropagation(), s(e);
1600
1600
  },
1601
1601
  children: [
1602
- /* @__PURE__ */ c(La, { className: "size-3" }),
1602
+ /* @__PURE__ */ c(ka, { className: "size-3" }),
1603
1603
  Z.UNPUBLISH
1604
1604
  ]
1605
1605
  }
@@ -1612,7 +1612,7 @@ const Ri = ({
1612
1612
  y.stopPropagation(), r(e);
1613
1613
  },
1614
1614
  children: [
1615
- /* @__PURE__ */ c(Ga, { className: "size-3" }),
1615
+ /* @__PURE__ */ c(xa, { className: "size-3" }),
1616
1616
  Z.DELETE
1617
1617
  ]
1618
1618
  }
@@ -1625,7 +1625,7 @@ const Ri = ({
1625
1625
  y.stopPropagation(), i(e);
1626
1626
  },
1627
1627
  children: [
1628
- /* @__PURE__ */ c(Vn, { className: "size-3" }),
1628
+ /* @__PURE__ */ c($n, { className: "size-3" }),
1629
1629
  Z.UNMARK_AS_TEMPLATE
1630
1630
  ]
1631
1631
  }
@@ -1637,15 +1637,15 @@ const Ri = ({
1637
1637
  y.stopPropagation(), a(e);
1638
1638
  },
1639
1639
  children: [
1640
- /* @__PURE__ */ c(Vn, { className: "size-3" }),
1640
+ /* @__PURE__ */ c($n, { className: "size-3" }),
1641
1641
  Z.MARK_AS_TEMPLATE
1642
1642
  ]
1643
1643
  }
1644
1644
  ) })
1645
1645
  ] })
1646
1646
  ] });
1647
- }, Ui = K(() => import("./add-new-page-BpvpSM4X.js")), Bi = K(() => import("./delete-page-CXRJjJ4o.js")), Mi = K(() => import("./duplicate-page-CSQs2MOp.js")), Fi = K(() => import("./mark-as-template-CPEPYXg7.js")), qi = K(() => import("./unmark-as-template-BjetSrYF.js")), Ki = K(() => import("./unpublish-page-BTPEVAkv.js")), Hi = () => {
1648
- const [e, t] = q(null), [n, s] = q(null), [r, a] = q(null), [i, o] = q(null), [l, d] = q(null), [f, u] = q(null), { data: h, isFetching: E } = be(), { selectedLang: A, fallbackLang: y } = Se(), { data: T } = xe(), p = T == null ? void 0 : T.find((L) => L.lang === A), { isLocked: S } = Ie(), C = !(h != null && h.slug), [, U] = ne(Ln);
1647
+ }, qi = K(() => import("./add-new-page-CD-9ppdS.js")), Ki = K(() => import("./delete-page-CatRlDfx.js")), Hi = K(() => import("./duplicate-page-DEmh0df0.js")), Vi = K(() => import("./mark-as-template-v-I05xcZ.js")), Qi = K(() => import("./unmark-as-template-Dsiyocm9.js")), $i = K(() => import("./unpublish-page-yGyz2jiw.js")), ji = () => {
1648
+ const [e, t] = q(null), [n, s] = q(null), [r, a] = q(null), [i, o] = q(null), [l, d] = q(null), [f, u] = q(null), { data: h, isFetching: E } = be(), { selectedLang: A, fallbackLang: y } = Se(), { data: T } = xe(), p = T == null ? void 0 : T.find((L) => L.lang === A), { isLocked: S } = Ie(), C = !(h != null && h.slug), [, U] = ne(Gn);
1649
1649
  if (!h) return null;
1650
1650
  const M = (L) => {
1651
1651
  A.length > 0 && A !== y ? U({
@@ -1656,13 +1656,13 @@ const Ri = ({
1656
1656
  };
1657
1657
  return /* @__PURE__ */ g(Ee, { children: [
1658
1658
  /* @__PURE__ */ g("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
1659
- /* @__PURE__ */ c(vs, { children: /* @__PURE__ */ c(
1659
+ /* @__PURE__ */ c(Is, { children: /* @__PURE__ */ c(
1660
1660
  B,
1661
1661
  {
1662
1662
  className: "flex h-7 max-w-[200px] cursor-pointer items-center truncate rounded px-1 text-xs font-medium",
1663
1663
  variant: "ghost",
1664
1664
  children: E ? /* @__PURE__ */ c(Ft, { className: "h-4 w-4 animate-spin text-slate-400" }) : /* @__PURE__ */ g("span", { className: "flex w-full cursor-pointer items-end overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-xs font-medium", children: [
1665
- C ? /* @__PURE__ */ c(Da, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Oa, { className: "mr-1 h-4 w-4" }),
1665
+ C ? /* @__PURE__ */ c(Ra, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Ua, { className: "mr-1 h-4 w-4" }),
1666
1666
  H(p || h, "name") ?? ""
1667
1667
  ] })
1668
1668
  }
@@ -1673,10 +1673,10 @@ const Ri = ({
1673
1673
  variant: "ghost",
1674
1674
  size: "icon",
1675
1675
  className: "h-7 w-7 cursor-not-allowed rounded opacity-50 hover:bg-transparent",
1676
- children: /* @__PURE__ */ c($n, { className: "h-4 w-4" })
1676
+ children: /* @__PURE__ */ c(jn, { className: "h-4 w-4" })
1677
1677
  }
1678
1678
  ) : /* @__PURE__ */ c(
1679
- Ri,
1679
+ Fi,
1680
1680
  {
1681
1681
  page: h,
1682
1682
  setDuplicatePage: (L) => d(L),
@@ -1686,12 +1686,12 @@ const Ri = ({
1686
1686
  setMarkAsTemplate: (L) => a(L),
1687
1687
  setUnmarkAsTemplate: (L) => o(L),
1688
1688
  isLanguagePage: A.length > 0 && A !== y,
1689
- children: /* @__PURE__ */ c(B, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c($n, { className: "h-4 w-4" }) })
1689
+ children: /* @__PURE__ */ c(B, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c(jn, { className: "h-4 w-4" }) })
1690
1690
  }
1691
1691
  )
1692
1692
  ] }),
1693
1693
  f && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
1694
- Ui,
1694
+ qi,
1695
1695
  {
1696
1696
  closePanel: () => u(null),
1697
1697
  editPage: () => {
@@ -1700,12 +1700,12 @@ const Ri = ({
1700
1700
  setAddEditPage: u
1701
1701
  }
1702
1702
  ) }),
1703
- e && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Bi, { page: e, onClose: () => t(null) }) }),
1704
- n && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Ki, { page: n, onClose: () => s(null) }) }),
1705
- r && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Fi, { page: r, onClose: () => a(null) }) }),
1706
- i && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(qi, { page: i, onClose: () => o(null) }) }),
1703
+ e && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Ki, { page: e, onClose: () => t(null) }) }),
1704
+ n && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c($i, { page: n, onClose: () => s(null) }) }),
1705
+ r && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Vi, { page: r, onClose: () => a(null) }) }),
1706
+ i && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Qi, { page: i, onClose: () => o(null) }) }),
1707
1707
  l && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
1708
- Mi,
1708
+ Hi,
1709
1709
  {
1710
1710
  page: l,
1711
1711
  onClose: () => d(null),
@@ -1713,7 +1713,7 @@ const Ri = ({
1713
1713
  }
1714
1714
  ) })
1715
1715
  ] });
1716
- }, Is = ({ children: e, className: t = "" }) => /* @__PURE__ */ c(
1716
+ }, Ns = ({ children: e, className: t = "" }) => /* @__PURE__ */ c(
1717
1717
  "div",
1718
1718
  {
1719
1719
  className: Mt(
@@ -1722,17 +1722,17 @@ const Ri = ({
1722
1722
  ),
1723
1723
  children: e
1724
1724
  }
1725
- ), Vi = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(Is, { children: /* @__PURE__ */ g("div", { className: "flex min-w-[300px] max-w-[400px] flex-col items-center justify-center rounded-lg border bg-white p-4 shadow-lg", children: [
1725
+ ), Wi = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(Ns, { children: /* @__PURE__ */ g("div", { className: "flex min-w-[300px] max-w-[400px] flex-col items-center justify-center rounded-lg border bg-white p-4 shadow-lg", children: [
1726
1726
  /* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
1727
1727
  /* @__PURE__ */ c("p", { className: "pt-2 text-center text-sm font-light text-gray-600", children: e ? "Please select a page from the list in the top header. This will enable you to edit the page." : "Please add a new page" })
1728
- ] }) }), $i = K(() => import("./dynamic-page-selector-DTk4oull.js")), Qi = () => {
1729
- const { dynamicPage: e, allLangPages: t, isFetching: n } = Xa(), s = t.length > 0;
1728
+ ] }) }), zi = K(() => import("./dynamic-page-selector-8g1-84iW.js")), Yi = () => {
1729
+ const { dynamicPage: e, allLangPages: t, isFetching: n } = ni(), s = t.length > 0;
1730
1730
  return n ? null : /* @__PURE__ */ g("div", { className: "relative", children: [
1731
- !e && /* @__PURE__ */ c(Vi, { hasDynamicPage: s }),
1732
- /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c($i, {}) })
1731
+ !e && /* @__PURE__ */ c(Wi, { hasDynamicPage: s }),
1732
+ /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(zi, {}) })
1733
1733
  ] });
1734
- }, ji = () => {
1735
- const { data: e, isFetching: t } = be(), { data: n, isFetching: s } = oe(), r = H(n, "dynamic", !1), a = In(), i = Fr("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, d = ni(), f = t || s, h = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
1734
+ }, Ji = () => {
1735
+ const { data: e, isFetching: t } = be(), { data: n, isFetching: s } = oe(), r = H(n, "dynamic", !1), a = Cn(), i = Vr("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, d = ii(), f = t || s, h = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
1736
1736
  return /* @__PURE__ */ g("div", { className: "relative flex items-center gap-x-1", children: [
1737
1737
  /* @__PURE__ */ c(
1738
1738
  "div",
@@ -1741,7 +1741,7 @@ const Ri = ({
1741
1741
  "flex h-8 w-auto max-w-[600px] items-center rounded-md border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800",
1742
1742
  f && "max-w-0 overflow-hidden opacity-0"
1743
1743
  ),
1744
- children: /* @__PURE__ */ c(Hi, {})
1744
+ children: /* @__PURE__ */ c(ji, {})
1745
1745
  }
1746
1746
  ),
1747
1747
  /* @__PURE__ */ g(
@@ -1752,7 +1752,7 @@ const Ri = ({
1752
1752
  f && "max-w-0 overflow-hidden opacity-0"
1753
1753
  ),
1754
1754
  children: [
1755
- /* @__PURE__ */ c(mi, {}),
1755
+ /* @__PURE__ */ c(Ti, {}),
1756
1756
  /* @__PURE__ */ g("div", { className: "flex w-full items-center overflow-hidden", children: [
1757
1757
  /* @__PURE__ */ c(
1758
1758
  "div",
@@ -1764,69 +1764,69 @@ const Ri = ({
1764
1764
  ] }) : h
1765
1765
  }
1766
1766
  ),
1767
- !l && /* @__PURE__ */ c("a", { href: d, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c("div", { className: "ml-2 mr-px flex-shrink-0 rounded-sm p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300", children: /* @__PURE__ */ c(ka, { className: "h-4 w-4", strokeWidth: 1 }) }) })
1767
+ !l && /* @__PURE__ */ c("a", { href: d, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c("div", { className: "ml-2 mr-px flex-shrink-0 rounded-sm p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300", children: /* @__PURE__ */ c(Ba, { className: "h-4 w-4", strokeWidth: 1 }) }) })
1768
1768
  ] })
1769
1769
  ]
1770
1770
  }
1771
1771
  ),
1772
- r && i && /* @__PURE__ */ c(Qi, {})
1772
+ r && i && /* @__PURE__ */ c(Yi, {})
1773
1773
  ] });
1774
- }, Wi = () => /* @__PURE__ */ g("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
1775
- /* @__PURE__ */ c(pi, {}),
1776
- /* @__PURE__ */ c(ji, {}),
1777
- /* @__PURE__ */ c(xi, {})
1778
- ] }), Cs = () => {
1774
+ }, Xi = () => /* @__PURE__ */ g("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
1775
+ /* @__PURE__ */ c(Si, {}),
1776
+ /* @__PURE__ */ c(Ji, {}),
1777
+ /* @__PURE__ */ c(Mi, {})
1778
+ ] }), Ls = () => {
1779
1779
  const e = z(), { data: t } = ie({
1780
1780
  queryKey: [m.AI_CONTEXT],
1781
1781
  initialData: "",
1782
1782
  queryFn: () => "",
1783
1783
  staleTime: 0
1784
1784
  });
1785
- return { setAiContext: $(
1785
+ return { setAiContext: Q(
1786
1786
  (s) => {
1787
1787
  e.setQueryData([m.AI_CONTEXT], s);
1788
1788
  },
1789
1789
  [e]
1790
1790
  ), aiContext: t };
1791
- }, zi = () => {
1792
- const e = G(), { aiContext: t } = Cs(), n = I();
1793
- return $(
1791
+ }, Zi = () => {
1792
+ const e = G(), { aiContext: t } = Ls(), n = I();
1793
+ return Q(
1794
1794
  async (s, r, a, i) => n(e, {
1795
1795
  action: m.ASK_AI,
1796
1796
  data: { type: s, prompt: r, blocks: a, context: t, lang: i }
1797
1797
  }),
1798
1798
  [e, t, n]
1799
1799
  );
1800
- }, Yi = (e, t) => t.map((n) => {
1800
+ }, eo = (e, t) => t.map((n) => {
1801
1801
  if (jt(e, n._type)) {
1802
- const s = Va(n._type);
1802
+ const s = Wa(n._type);
1803
1803
  return {
1804
1804
  ...s,
1805
- ..._n(n, [
1806
- ...Ir(s),
1805
+ ...Pn(n, [
1806
+ ...Nr(s),
1807
1807
  "_type",
1808
1808
  "_id",
1809
1809
  "_name",
1810
1810
  "_parent",
1811
1811
  "_bindings"
1812
1812
  ]),
1813
- ...Cr(n, (r, a) => Nr(a, "_attrs")),
1813
+ ...Lr(n, (r, a) => Gr(a, "_attrs")),
1814
1814
  ...n
1815
1815
  };
1816
1816
  }
1817
1817
  return n;
1818
- }), Ji = (e) => {
1819
- const t = Ha();
1818
+ }), to = (e) => {
1819
+ const t = ja();
1820
1820
  return j(() => {
1821
1821
  if (!e || ge(e)) return { blocks: [] };
1822
- const n = ds(
1822
+ const n = hs(
1823
1823
  e,
1824
- (s) => !br(s == null ? void 0 : s._type, "@chai/")
1824
+ (s) => !Cr(s == null ? void 0 : s._type, "@chai/")
1825
1825
  );
1826
- return { blocks: Yi(t, n) };
1826
+ return { blocks: eo(t, n) };
1827
1827
  }, [e, t]);
1828
- }, Xi = () => {
1829
- const [e] = le(), t = e.get("page"), n = G(), { setAiContext: s } = Cs(), [, r] = Cn(), [, a] = ti(), [, i] = qr(), o = I();
1828
+ }, no = () => {
1829
+ const [e] = le(), t = e.get("page"), n = G(), { setAiContext: s } = Ls(), [, r] = Nn(), [, a] = ai(), [, i] = Qr(), o = I();
1830
1830
  return ie({
1831
1831
  queryKey: [m.GET_DRAFT_PAGE, t],
1832
1832
  staleTime: 1 / 0,
@@ -1841,8 +1841,8 @@ const Ri = ({
1841
1841
  },
1842
1842
  enabled: !!t
1843
1843
  });
1844
- }, Zi = () => {
1845
- const { data: e } = oe(), { data: t } = be(), n = G(), s = I(), r = Gn(), a = In();
1844
+ }, so = () => {
1845
+ const { data: e } = oe(), { data: t } = be(), n = G(), s = I(), r = Dn(), a = Cn();
1846
1846
  return ie({
1847
1847
  queryKey: [m.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
1848
1848
  staleTime: 1 / 0,
@@ -1871,7 +1871,7 @@ const Ri = ({
1871
1871
  }),
1872
1872
  enabled: !!(e != null && e.pageType) && !!t.id
1873
1873
  });
1874
- }, eo = () => {
1874
+ }, ro = () => {
1875
1875
  const e = G(), t = z(), n = I();
1876
1876
  return X({
1877
1877
  mutationFn: async (s) => n(e, {
@@ -1890,7 +1890,7 @@ const Ri = ({
1890
1890
  });
1891
1891
  }
1892
1892
  });
1893
- }, Nc = () => {
1893
+ }, Rc = () => {
1894
1894
  const e = G(), t = z(), n = I(), { selectedLang: s } = Se();
1895
1895
  return X({
1896
1896
  mutationFn: async (r) => n(e, { action: m.ADD_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
@@ -1905,7 +1905,7 @@ const Ri = ({
1905
1905
  });
1906
1906
  }
1907
1907
  });
1908
- }, Lc = () => {
1908
+ }, Uc = () => {
1909
1909
  const e = G(), t = z(), n = I(), { selectedLang: s } = Se();
1910
1910
  return X({
1911
1911
  mutationFn: async (r) => n(e, { action: m.UPDATE_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
@@ -1920,7 +1920,7 @@ const Ri = ({
1920
1920
  });
1921
1921
  }
1922
1922
  });
1923
- }, Gc = () => {
1923
+ }, Bc = () => {
1924
1924
  const e = G(), t = z(), n = I();
1925
1925
  return X({
1926
1926
  mutationFn: async (s) => n(e, { action: m.DELETE_GLOBAL_SCHEMA, data: { id: s } }),
@@ -1935,7 +1935,7 @@ const Ri = ({
1935
1935
  });
1936
1936
  }
1937
1937
  });
1938
- }, Dc = () => {
1938
+ }, Mc = () => {
1939
1939
  const e = G(), t = I();
1940
1940
  return X({
1941
1941
  mutationFn: async (n) => t(e, { action: m.TOGGLE_PAGE_GLOBAL_SCHEMA, data: n }),
@@ -1945,7 +1945,7 @@ const Ri = ({
1945
1945
  });
1946
1946
  }
1947
1947
  });
1948
- }, Oc = () => {
1948
+ }, Fc = () => {
1949
1949
  const e = G(), t = I();
1950
1950
  return X({
1951
1951
  mutationFn: async (n) => t(e, { action: m.APPLY_SCHEMA_TO_ALL_PAGES, data: { schemaId: n } }),
@@ -1958,7 +1958,7 @@ const Ri = ({
1958
1958
  });
1959
1959
  }
1960
1960
  });
1961
- }, kc = () => {
1961
+ }, qc = () => {
1962
1962
  const e = G(), t = I();
1963
1963
  return X({
1964
1964
  mutationFn: async (n) => t(e, { action: m.REMOVE_SCHEMA_FROM_ALL_PAGES, data: { schemaId: n } }),
@@ -1971,13 +1971,13 @@ const Ri = ({
1971
1971
  });
1972
1972
  }
1973
1973
  });
1974
- }, Wn = {
1974
+ }, Yn = {
1975
1975
  async getUILibraryBlock(e, t, n) {
1976
1976
  const s = await t(n, {
1977
1977
  action: "GET_LIBRARY_ITEM",
1978
1978
  data: { id: e.id }
1979
1979
  }), r = H(s, "html", ""), a = H(s, "blocks", []);
1980
- return Lr(a) ? a : Hr(r);
1980
+ return Dr(a) ? a : jr(r);
1981
1981
  },
1982
1982
  async getUILibraryBlocks(e, t, n) {
1983
1983
  try {
@@ -1991,7 +1991,7 @@ const Ri = ({
1991
1991
  return console.error(s), [];
1992
1992
  }
1993
1993
  }
1994
- }, to = () => {
1994
+ }, ao = () => {
1995
1995
  const e = G(), t = I();
1996
1996
  return ie({
1997
1997
  queryKey: ["uiLibraries"],
@@ -2001,17 +2001,17 @@ const Ri = ({
2001
2001
  ...r
2002
2002
  }));
2003
2003
  return s.forEach((r) => {
2004
- Kr(r.id, {
2004
+ $r(r.id, {
2005
2005
  name: r.isSiteLibrary ? r.name + " (Current Site) " : r.name,
2006
2006
  description: r.description,
2007
- getBlocksList: (a) => Wn.getUILibraryBlocks(a, t, e),
2008
- getBlock: ({ block: a }) => Wn.getUILibraryBlock(a, t, e)
2007
+ getBlocksList: (a) => Yn.getUILibraryBlocks(a, t, e),
2008
+ getBlock: ({ block: a }) => Yn.getUILibraryBlock(a, t, e)
2009
2009
  });
2010
2010
  }), s;
2011
2011
  }
2012
2012
  });
2013
- }, no = () => {
2014
- const e = ys(), t = I(), { user: n } = It(), s = n == null ? void 0 : n.id;
2013
+ }, io = () => {
2014
+ const e = Ss(), t = I(), { user: n } = It(), s = n == null ? void 0 : n.id;
2015
2015
  return ie({
2016
2016
  queryKey: [m.GET_ROLE_AND_PERMISSIONS, s],
2017
2017
  queryFn: () => t(e, {
@@ -2021,8 +2021,8 @@ const Ri = ({
2021
2021
  enabled: !!s,
2022
2022
  staleTime: 1 / 0
2023
2023
  });
2024
- }, so = () => {
2025
- const e = G(), t = I(), [, n] = Cn();
2024
+ }, oo = () => {
2025
+ const e = G(), t = I(), [, n] = Nn();
2026
2026
  return { onSave: async ({
2027
2027
  page: r,
2028
2028
  blocks: a,
@@ -2041,20 +2041,20 @@ const Ri = ({
2041
2041
  return console.error(o), new Error("Failed to save blocks");
2042
2042
  }
2043
2043
  } };
2044
- }, ro = () => {
2045
- const { data: e } = ws(), t = G(), n = I();
2044
+ }, lo = () => {
2045
+ const { data: e } = bs(), t = G(), n = I();
2046
2046
  return {
2047
- getPartialBlocks: $(async () => {
2047
+ getPartialBlocks: Q(async () => {
2048
2048
  const s = {};
2049
2049
  for (const r of e ?? [])
2050
2050
  ge(r == null ? void 0 : r.slug) && (s[r.id] = {
2051
2051
  type: r.pageType,
2052
- name: Gr(r.name ?? r.slug),
2052
+ name: Or(r.name ?? r.slug),
2053
2053
  description: ""
2054
2054
  });
2055
2055
  return s;
2056
2056
  }, [e]),
2057
- getPartialBlockBlocks: $(
2057
+ getPartialBlockBlocks: Q(
2058
2058
  async (s) => {
2059
2059
  if (!s) return [];
2060
2060
  try {
@@ -2062,7 +2062,7 @@ const Ri = ({
2062
2062
  action: "GET_DRAFT_PAGE",
2063
2063
  data: { id: s, draft: !0, editor: !1 }
2064
2064
  });
2065
- return ds(r.blocks, (a) => jt(a, "_id"));
2065
+ return hs(r.blocks, (a) => jt(a, "_id"));
2066
2066
  } catch (r) {
2067
2067
  return console.error(r), [];
2068
2068
  }
@@ -2070,19 +2070,19 @@ const Ri = ({
2070
2070
  [n, t]
2071
2071
  )
2072
2072
  };
2073
- }, ao = K(() => import("./lang-panel-B_HcsPPo.js")), io = ({ isActive: e, show: t }) => {
2073
+ }, co = K(() => import("./lang-panel-D1FKTNui.js")), uo = ({ isActive: e, show: t }) => {
2074
2074
  const { data: n } = Re();
2075
- return !jt(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(B, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(xa, { className: "h-4 w-4" }) });
2076
- }, Ns = "lang", oo = {
2077
- id: Ns,
2075
+ return !jt(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(B, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(Ma, { className: "h-4 w-4" }) });
2076
+ }, Gs = "lang", fo = {
2077
+ id: Gs,
2078
2078
  label: "Languages",
2079
2079
  position: "top",
2080
- panel: ao,
2081
- button: io,
2080
+ panel: co,
2081
+ button: uo,
2082
2082
  view: "modal",
2083
2083
  width: 400
2084
- }, lo = K(() => import("./seo-panel-DESVAQM5.js")), Ls = "seo", co = ({ isActive: e, show: t }) => {
2085
- const { data: n } = oe(), s = _i(n == null ? void 0 : n.pageType);
2084
+ }, ho = K(() => import("./seo-panel-rZ8s88c0.js")), Ds = "seo", go = ({ isActive: e, show: t }) => {
2085
+ const { data: n } = oe(), s = bi(n == null ? void 0 : n.pageType);
2086
2086
  return !jt(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(B, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ g(
2087
2087
  "svg",
2088
2088
  {
@@ -2101,35 +2101,35 @@ const Ri = ({
2101
2101
  ]
2102
2102
  }
2103
2103
  ) });
2104
- }, uo = {
2105
- id: Ls,
2104
+ }, Eo = {
2105
+ id: Ds,
2106
2106
  label: "SEO",
2107
- panel: lo,
2108
- button: co,
2107
+ panel: ho,
2108
+ button: go,
2109
2109
  position: "top",
2110
2110
  width: 600,
2111
2111
  view: "modal"
2112
- }, Gs = "user-info", fo = () => {
2113
- const { user: e, logout: t } = It(), n = ae("onLogout", cs);
2114
- return e ? /* @__PURE__ */ g(Zr, { children: [
2115
- /* @__PURE__ */ c(ea, { asChild: !0, children: /* @__PURE__ */ c(B, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(Ra, { className: "h-4 w-4" }) }) }),
2116
- /* @__PURE__ */ g(ta, { className: "w-auto space-y-2 p-4", children: [
2112
+ }, Os = "user-info", mo = () => {
2113
+ const { user: e, logout: t } = It(), n = ae("onLogout", ds);
2114
+ return e ? /* @__PURE__ */ g(sa, { children: [
2115
+ /* @__PURE__ */ c(ra, { asChild: !0, children: /* @__PURE__ */ c(B, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(Fa, { className: "h-4 w-4" }) }) }),
2116
+ /* @__PURE__ */ g(aa, { className: "w-auto space-y-2 p-4", children: [
2117
2117
  /* @__PURE__ */ c("div", { className: "text-sm font-medium", children: e.name ?? e.email }),
2118
2118
  /* @__PURE__ */ c("div", { className: "text-xs text-muted-foreground", children: e.email }),
2119
- /* @__PURE__ */ g(na, { children: [
2120
- /* @__PURE__ */ c(sa, { asChild: !0, children: /* @__PURE__ */ c(B, { variant: "outline", size: "sm", className: "w-full", children: "Logout" }) }),
2121
- /* @__PURE__ */ g(ra, { children: [
2122
- /* @__PURE__ */ g(aa, { children: [
2123
- /* @__PURE__ */ c(ia, { children: "Are you sure you want to logout?" }),
2124
- /* @__PURE__ */ c(oa, { children: "You will be redirected to the login page." })
2119
+ /* @__PURE__ */ g(ia, { children: [
2120
+ /* @__PURE__ */ c(oa, { asChild: !0, children: /* @__PURE__ */ c(B, { variant: "outline", size: "sm", className: "w-full", children: "Logout" }) }),
2121
+ /* @__PURE__ */ g(la, { children: [
2122
+ /* @__PURE__ */ g(ca, { children: [
2123
+ /* @__PURE__ */ c(ua, { children: "Are you sure you want to logout?" }),
2124
+ /* @__PURE__ */ c(da, { children: "You will be redirected to the login page." })
2125
2125
  ] }),
2126
- /* @__PURE__ */ g(la, { children: [
2127
- /* @__PURE__ */ c(ca, { children: "Cancel" }),
2126
+ /* @__PURE__ */ g(fa, { children: [
2127
+ /* @__PURE__ */ c(ha, { children: "Cancel" }),
2128
2128
  /* @__PURE__ */ c(
2129
- ua,
2129
+ ga,
2130
2130
  {
2131
2131
  onClick: () => {
2132
- t(), Dr(n) && n();
2132
+ t(), kr(n) && n();
2133
2133
  },
2134
2134
  children: "Logout"
2135
2135
  }
@@ -2139,13 +2139,13 @@ const Ri = ({
2139
2139
  ] })
2140
2140
  ] })
2141
2141
  ] }) : null;
2142
- }, ho = {
2143
- id: Gs,
2142
+ }, po = {
2143
+ id: Os,
2144
2144
  label: "User Info",
2145
- button: fo,
2145
+ button: mo,
2146
2146
  position: "bottom"
2147
- }, go = () => {
2148
- en(Ls, uo), en(Ns, oo), en(Gs, ho);
2147
+ }, Ao = () => {
2148
+ en(Ds, Eo), en(Gs, fo), en(Os, po);
2149
2149
  };
2150
2150
  var P = {
2151
2151
  context: void 0,
@@ -2153,29 +2153,29 @@ var P = {
2153
2153
  effects: void 0,
2154
2154
  done: !1,
2155
2155
  getContextId() {
2156
- return zn(this.context.count);
2156
+ return Jn(this.context.count);
2157
2157
  },
2158
2158
  getNextContextId() {
2159
- return zn(this.context.count++);
2159
+ return Jn(this.context.count++);
2160
2160
  }
2161
2161
  };
2162
- function zn(e) {
2162
+ function Jn(e) {
2163
2163
  const t = String(e), n = t.length - 1;
2164
2164
  return P.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
2165
2165
  }
2166
2166
  function at(e) {
2167
2167
  P.context = e;
2168
2168
  }
2169
- var Ds = !1, Eo = (e, t) => e === t, qt = Symbol("solid-proxy"), Os = typeof Proxy == "function", ks = Symbol("solid-track"), Kt = {
2170
- equals: Eo
2171
- }, xs = Ks, _e = 1, Ht = 2, Rs = {
2169
+ var ks = !1, yo = (e, t) => e === t, qt = Symbol("solid-proxy"), xs = typeof Proxy == "function", Rs = Symbol("solid-track"), Kt = {
2170
+ equals: yo
2171
+ }, Us = Vs, _e = 1, Ht = 2, Bs = {
2172
2172
  owned: null,
2173
2173
  cleanups: null,
2174
2174
  context: null,
2175
2175
  owner: null
2176
- }, on = {}, b = null, ln = null, mo = null, k = null, te = null, Te = null, Jt = 0;
2176
+ }, on = {}, b = null, ln = null, To = null, k = null, te = null, Te = null, Jt = 0;
2177
2177
  function De(e, t) {
2178
- const n = k, s = b, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Rs : {
2178
+ const n = k, s = b, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Bs : {
2179
2179
  owned: null,
2180
2180
  cleanups: null,
2181
2181
  context: a ? a.context : null,
@@ -2195,10 +2195,10 @@ function F(e, t) {
2195
2195
  observers: null,
2196
2196
  observerSlots: null,
2197
2197
  comparator: t.equals || void 0
2198
- }, s = (r) => (typeof r == "function" && (r = r(n.value)), qs(n, r));
2199
- return [Fs.bind(n), s];
2198
+ }, s = (r) => (typeof r == "function" && (r = r(n.value)), Hs(n, r));
2199
+ return [Ks.bind(n), s];
2200
2200
  }
2201
- function po(e, t, n) {
2201
+ function So(e, t, n) {
2202
2202
  const s = Xt(e, t, !0, _e);
2203
2203
  nt(s);
2204
2204
  }
@@ -2206,20 +2206,20 @@ function Oe(e, t, n) {
2206
2206
  const s = Xt(e, t, !1, _e);
2207
2207
  nt(s);
2208
2208
  }
2209
- function Us(e, t, n) {
2210
- xs = bo;
2209
+ function Ms(e, t, n) {
2210
+ Us = Lo;
2211
2211
  const s = Xt(e, t, !1, _e);
2212
2212
  (!n || !n.render) && (s.user = !0), Te ? Te.push(s) : nt(s);
2213
2213
  }
2214
2214
  function J(e, t, n) {
2215
2215
  n = n ? Object.assign({}, Kt, n) : Kt;
2216
2216
  const s = Xt(e, t, !0, 0);
2217
- return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, nt(s), Fs.bind(s);
2217
+ return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, nt(s), Ks.bind(s);
2218
2218
  }
2219
- function Ao(e) {
2219
+ function _o(e) {
2220
2220
  return e && typeof e == "object" && "then" in e;
2221
2221
  }
2222
- function yo(e, t, n) {
2222
+ function Po(e, t, n) {
2223
2223
  let s, r, a;
2224
2224
  s = !0, r = e, a = {};
2225
2225
  let i = null, o = on, l = null, d = !1, f = "initialValue" in a, u = typeof s == "function" && J(s);
@@ -2227,8 +2227,8 @@ function yo(e, t, n) {
2227
2227
  equals: !1
2228
2228
  }), [C, U] = F(f ? "ready" : "unresolved");
2229
2229
  P.context && (l = P.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : P.load && P.has(l) && (o = P.load(l)));
2230
- function M(w, v, Y, Q) {
2231
- return i === w && (i = null, Q !== void 0 && (f = !0), (w === o || v === o) && a.onHydrated && queueMicrotask(() => a.onHydrated(Q, {
2230
+ function M(w, v, Y, $) {
2231
+ return i === w && (i = null, $ !== void 0 && (f = !0), (w === o || v === o) && a.onHydrated && queueMicrotask(() => a.onHydrated($, {
2232
2232
  value: v
2233
2233
  })), o = on, L(v, Y)), v;
2234
2234
  }
@@ -2240,7 +2240,7 @@ function yo(e, t, n) {
2240
2240
  }, !1);
2241
2241
  }
2242
2242
  function Ae() {
2243
- const w = Po, v = E(), Y = y();
2243
+ const w = Io, v = E(), Y = y();
2244
2244
  if (Y !== void 0 && !i) throw Y;
2245
2245
  return k && k.user, v;
2246
2246
  }
@@ -2253,7 +2253,7 @@ function yo(e, t, n) {
2253
2253
  return;
2254
2254
  }
2255
2255
  let Y;
2256
- const Q = o !== on ? o : ee(() => {
2256
+ const $ = o !== on ? o : ee(() => {
2257
2257
  try {
2258
2258
  return r(v, {
2259
2259
  value: E(),
@@ -2266,11 +2266,11 @@ function yo(e, t, n) {
2266
2266
  if (Y !== void 0) {
2267
2267
  M(i, void 0, Rt(Y), v);
2268
2268
  return;
2269
- } else if (!Ao(Q))
2270
- return M(i, Q, void 0, v), Q;
2271
- return i = Q, "v" in Q ? (Q.s === 1 ? M(i, Q.v, void 0, v) : M(i, void 0, Rt(Q.v), v), Q) : (d = !0, queueMicrotask(() => d = !1), me(() => {
2269
+ } else if (!_o($))
2270
+ return M(i, $, void 0, v), $;
2271
+ return i = $, "v" in $ ? ($.s === 1 ? M(i, $.v, void 0, v) : M(i, void 0, Rt($.v), v), $) : (d = !0, queueMicrotask(() => d = !1), me(() => {
2272
2272
  U(f ? "refreshing" : "pending"), S();
2273
- }, !1), Q.then((ce) => M(Q, ce, void 0, v), (ce) => M(Q, void 0, Rt(ce), v)));
2273
+ }, !1), $.then((ce) => M($, ce, void 0, v), (ce) => M($, void 0, Rt(ce), v)));
2274
2274
  }
2275
2275
  Object.defineProperties(Ae, {
2276
2276
  state: {
@@ -2295,12 +2295,12 @@ function yo(e, t, n) {
2295
2295
  }
2296
2296
  });
2297
2297
  let O = b;
2298
- return u ? po(() => (O = b, ye(!1))) : ye(!1), [Ae, {
2299
- refetch: (w) => Bs(O, () => ye(w)),
2298
+ return u ? So(() => (O = b, ye(!1))) : ye(!1), [Ae, {
2299
+ refetch: (w) => Fs(O, () => ye(w)),
2300
2300
  mutate: A
2301
2301
  }];
2302
2302
  }
2303
- function xc(e) {
2303
+ function Kc(e) {
2304
2304
  return me(e, !1);
2305
2305
  }
2306
2306
  function ee(e) {
@@ -2313,7 +2313,7 @@ function ee(e) {
2313
2313
  k = t;
2314
2314
  }
2315
2315
  }
2316
- function Rc(e, t, n) {
2316
+ function Hc(e, t, n) {
2317
2317
  const s = Array.isArray(e);
2318
2318
  let r, a = n && n.defer;
2319
2319
  return (i) => {
@@ -2328,27 +2328,27 @@ function Rc(e, t, n) {
2328
2328
  return r = o, l;
2329
2329
  };
2330
2330
  }
2331
- function To(e) {
2332
- Us(() => ee(e));
2331
+ function wo(e) {
2332
+ Ms(() => ee(e));
2333
2333
  }
2334
2334
  function ct(e) {
2335
2335
  return b === null || (b.cleanups === null ? b.cleanups = [e] : b.cleanups.push(e)), e;
2336
2336
  }
2337
- function Yn() {
2337
+ function Xn() {
2338
2338
  return b;
2339
2339
  }
2340
- function Bs(e, t) {
2340
+ function Fs(e, t) {
2341
2341
  const n = b, s = k;
2342
2342
  b = e, k = null;
2343
2343
  try {
2344
2344
  return me(t, !0);
2345
2345
  } catch (r) {
2346
- On(r);
2346
+ kn(r);
2347
2347
  } finally {
2348
2348
  b = n, k = s;
2349
2349
  }
2350
2350
  }
2351
- function So(e) {
2351
+ function vo(e) {
2352
2352
  const t = k, n = b;
2353
2353
  return Promise.resolve().then(() => {
2354
2354
  k = t, b = n;
@@ -2356,36 +2356,36 @@ function So(e) {
2356
2356
  return me(e, !1), k = b = null, s ? s.done : void 0;
2357
2357
  });
2358
2358
  }
2359
- var [_o, Uc] = /* @__PURE__ */ F(!1);
2360
- function Bc() {
2361
- return [_o, So];
2359
+ var [bo, Vc] = /* @__PURE__ */ F(!1);
2360
+ function Qc() {
2361
+ return [bo, vo];
2362
2362
  }
2363
- function Mc(e, t) {
2363
+ function $c(e, t) {
2364
2364
  const n = Symbol("context");
2365
2365
  return {
2366
2366
  id: n,
2367
- Provider: Io(n),
2367
+ Provider: Go(n),
2368
2368
  defaultValue: e
2369
2369
  };
2370
2370
  }
2371
- function Fc(e) {
2371
+ function jc(e) {
2372
2372
  let t;
2373
2373
  return b && b.context && (t = b.context[e.id]) !== void 0 ? t : e.defaultValue;
2374
2374
  }
2375
- function Ms(e) {
2376
- const t = J(e), n = J(() => fn(t()));
2375
+ function qs(e) {
2376
+ const t = J(e), n = J(() => hn(t()));
2377
2377
  return n.toArray = () => {
2378
2378
  const s = n();
2379
2379
  return Array.isArray(s) ? s : s != null ? [s] : [];
2380
2380
  }, n;
2381
2381
  }
2382
- var Po;
2383
- function Fs() {
2382
+ var Io;
2383
+ function Ks() {
2384
2384
  if (this.sources && this.state)
2385
2385
  if (this.state === _e) nt(this);
2386
2386
  else {
2387
2387
  const e = te;
2388
- te = null, me(() => $t(this), !1), te = e;
2388
+ te = null, me(() => Qt(this), !1), te = e;
2389
2389
  }
2390
2390
  if (k) {
2391
2391
  const e = this.observers ? this.observers.length : 0;
@@ -2393,12 +2393,12 @@ function Fs() {
2393
2393
  }
2394
2394
  return this.value;
2395
2395
  }
2396
- function qs(e, t, n) {
2396
+ function Hs(e, t, n) {
2397
2397
  let s = e.value;
2398
2398
  return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && me(() => {
2399
2399
  for (let r = 0; r < e.observers.length; r += 1) {
2400
2400
  const a = e.observers[r], i = ln && ln.running;
2401
- i && ln.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? te.push(a) : Te.push(a), a.observers && Hs(a)), i || (a.state = _e);
2401
+ i && ln.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? te.push(a) : Te.push(a), a.observers && Qs(a)), i || (a.state = _e);
2402
2402
  }
2403
2403
  if (te.length > 1e6)
2404
2404
  throw te = [], new Error();
@@ -2408,20 +2408,20 @@ function nt(e) {
2408
2408
  if (!e.fn) return;
2409
2409
  ut(e);
2410
2410
  const t = Jt;
2411
- wo(e, e.value, t);
2411
+ Co(e, e.value, t);
2412
2412
  }
2413
- function wo(e, t, n) {
2413
+ function Co(e, t, n) {
2414
2414
  let s;
2415
2415
  const r = b, a = k;
2416
2416
  k = b = e;
2417
2417
  try {
2418
2418
  s = e.fn(t);
2419
2419
  } catch (i) {
2420
- return e.pure && (e.state = _e, e.owned && e.owned.forEach(ut), e.owned = null), e.updatedAt = n + 1, On(i);
2420
+ return e.pure && (e.state = _e, e.owned && e.owned.forEach(ut), e.owned = null), e.updatedAt = n + 1, kn(i);
2421
2421
  } finally {
2422
2422
  k = a, b = r;
2423
2423
  }
2424
- (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? qs(e, s) : e.value = s, e.updatedAt = n);
2424
+ (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Hs(e, s) : e.value = s, e.updatedAt = n);
2425
2425
  }
2426
2426
  function Xt(e, t, n, s = _e, r) {
2427
2427
  const a = {
@@ -2437,11 +2437,11 @@ function Xt(e, t, n, s = _e, r) {
2437
2437
  context: b ? b.context : null,
2438
2438
  pure: n
2439
2439
  };
2440
- return b === null || b !== Rs && (b.owned ? b.owned.push(a) : b.owned = [a]), a;
2440
+ return b === null || b !== Bs && (b.owned ? b.owned.push(a) : b.owned = [a]), a;
2441
2441
  }
2442
2442
  function Vt(e) {
2443
2443
  if (e.state === 0) return;
2444
- if (e.state === Ht) return $t(e);
2444
+ if (e.state === Ht) return Qt(e);
2445
2445
  if (e.suspense && ee(e.suspense.inFallback)) return e.suspense.effects.push(e);
2446
2446
  const t = [e];
2447
2447
  for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < Jt); )
@@ -2451,7 +2451,7 @@ function Vt(e) {
2451
2451
  nt(e);
2452
2452
  else if (e.state === Ht) {
2453
2453
  const s = te;
2454
- te = null, me(() => $t(e, t[0]), !1), te = s;
2454
+ te = null, me(() => Qt(e, t[0]), !1), te = s;
2455
2455
  }
2456
2456
  }
2457
2457
  function me(e, t) {
@@ -2460,20 +2460,20 @@ function me(e, t) {
2460
2460
  t || (te = []), Te ? n = !0 : Te = [], Jt++;
2461
2461
  try {
2462
2462
  const s = e();
2463
- return vo(n), s;
2463
+ return No(n), s;
2464
2464
  } catch (s) {
2465
- n || (Te = null), te = null, On(s);
2465
+ n || (Te = null), te = null, kn(s);
2466
2466
  }
2467
2467
  }
2468
- function vo(e) {
2469
- if (te && (Ks(te), te = null), e) return;
2468
+ function No(e) {
2469
+ if (te && (Vs(te), te = null), e) return;
2470
2470
  const t = Te;
2471
- Te = null, t.length && me(() => xs(t), !1);
2471
+ Te = null, t.length && me(() => Us(t), !1);
2472
2472
  }
2473
- function Ks(e) {
2473
+ function Vs(e) {
2474
2474
  for (let t = 0; t < e.length; t++) Vt(e[t]);
2475
2475
  }
2476
- function bo(e) {
2476
+ function Lo(e) {
2477
2477
  let t, n = 0;
2478
2478
  for (t = 0; t < e.length; t++) {
2479
2479
  const s = e[t];
@@ -2488,20 +2488,20 @@ function bo(e) {
2488
2488
  }
2489
2489
  for (P.effects && (P.done || !P.count) && (e = [...P.effects, ...e], n += P.effects.length, delete P.effects), t = 0; t < n; t++) Vt(e[t]);
2490
2490
  }
2491
- function $t(e, t) {
2491
+ function Qt(e, t) {
2492
2492
  e.state = 0;
2493
2493
  for (let n = 0; n < e.sources.length; n += 1) {
2494
2494
  const s = e.sources[n];
2495
2495
  if (s.sources) {
2496
2496
  const r = s.state;
2497
- r === _e ? s !== t && (!s.updatedAt || s.updatedAt < Jt) && Vt(s) : r === Ht && $t(s, t);
2497
+ r === _e ? s !== t && (!s.updatedAt || s.updatedAt < Jt) && Vt(s) : r === Ht && Qt(s, t);
2498
2498
  }
2499
2499
  }
2500
2500
  }
2501
- function Hs(e) {
2501
+ function Qs(e) {
2502
2502
  for (let t = 0; t < e.observers.length; t += 1) {
2503
2503
  const n = e.observers[t];
2504
- n.state || (n.state = Ht, n.pure ? te.push(n) : Te.push(n), n.observers && Hs(n));
2504
+ n.state || (n.state = Ht, n.pure ? te.push(n) : Te.push(n), n.observers && Qs(n));
2505
2505
  }
2506
2506
  }
2507
2507
  function ut(e) {
@@ -2533,42 +2533,42 @@ function Rt(e) {
2533
2533
  cause: e
2534
2534
  });
2535
2535
  }
2536
- function On(e, t = b) {
2536
+ function kn(e, t = b) {
2537
2537
  throw Rt(e);
2538
2538
  }
2539
- function fn(e) {
2540
- if (typeof e == "function" && !e.length) return fn(e());
2539
+ function hn(e) {
2540
+ if (typeof e == "function" && !e.length) return hn(e());
2541
2541
  if (Array.isArray(e)) {
2542
2542
  const t = [];
2543
2543
  for (let n = 0; n < e.length; n++) {
2544
- const s = fn(e[n]);
2544
+ const s = hn(e[n]);
2545
2545
  Array.isArray(s) ? t.push.apply(t, s) : t.push(s);
2546
2546
  }
2547
2547
  return t;
2548
2548
  }
2549
2549
  return e;
2550
2550
  }
2551
- function Io(e, t) {
2551
+ function Go(e, t) {
2552
2552
  return function(s) {
2553
2553
  let r;
2554
2554
  return Oe(() => r = ee(() => (b.context = {
2555
2555
  ...b.context,
2556
2556
  [e]: s.value
2557
- }, Ms(() => s.children))), void 0), r;
2557
+ }, qs(() => s.children))), void 0), r;
2558
2558
  };
2559
2559
  }
2560
- var hn = Symbol("fallback");
2561
- function Qt(e) {
2560
+ var gn = Symbol("fallback");
2561
+ function $t(e) {
2562
2562
  for (let t = 0; t < e.length; t++) e[t]();
2563
2563
  }
2564
- function Co(e, t, n = {}) {
2564
+ function Do(e, t, n = {}) {
2565
2565
  let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
2566
- return ct(() => Qt(a)), () => {
2566
+ return ct(() => $t(a)), () => {
2567
2567
  let l = e() || [], d = l.length, f, u;
2568
- return l[ks], ee(() => {
2568
+ return l[Rs], ee(() => {
2569
2569
  let E, A, y, T, p, S, C, U, M;
2570
2570
  if (d === 0)
2571
- i !== 0 && (Qt(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [hn], r[0] = De((L) => (a[0] = L, n.fallback())), i = 1);
2571
+ i !== 0 && ($t(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [gn], r[0] = De((L) => (a[0] = L, n.fallback())), i = 1);
2572
2572
  else if (i === 0) {
2573
2573
  for (r = new Array(d), u = 0; u < d; u++)
2574
2574
  s[u] = l[u], r[u] = De(h);
@@ -2596,14 +2596,14 @@ function Co(e, t, n = {}) {
2596
2596
  }
2597
2597
  };
2598
2598
  }
2599
- function No(e, t, n = {}) {
2599
+ function Oo(e, t, n = {}) {
2600
2600
  let s = [], r = [], a = [], i = [], o = 0, l;
2601
- return ct(() => Qt(a)), () => {
2601
+ return ct(() => $t(a)), () => {
2602
2602
  const d = e() || [], f = d.length;
2603
- return d[ks], ee(() => {
2603
+ return d[Rs], ee(() => {
2604
2604
  if (f === 0)
2605
- return o !== 0 && (Qt(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [hn], r[0] = De((h) => (a[0] = h, n.fallback())), o = 1), r;
2606
- for (s[0] === hn && (a[0](), a = [], s = [], r = [], o = 0), l = 0; l < f; l++)
2605
+ return o !== 0 && ($t(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [gn], r[0] = De((h) => (a[0] = h, n.fallback())), o = 1), r;
2606
+ for (s[0] === gn && (a[0](), a = [], s = [], r = [], o = 0), l = 0; l < f; l++)
2607
2607
  l < s.length && s[l] !== d[l] ? i[l](() => d[l]) : l >= s.length && (r[l] = De(u));
2608
2608
  for (; l < s.length; l++)
2609
2609
  a[l]();
@@ -2616,13 +2616,13 @@ function No(e, t, n = {}) {
2616
2616
  }
2617
2617
  };
2618
2618
  }
2619
- function Vs(e, t) {
2619
+ function $s(e, t) {
2620
2620
  return ee(() => e(t || {}));
2621
2621
  }
2622
2622
  function Gt() {
2623
2623
  return !0;
2624
2624
  }
2625
- var gn = {
2625
+ var En = {
2626
2626
  get(e, t, n) {
2627
2627
  return t === qt ? n : e.get(t);
2628
2628
  },
@@ -2649,19 +2649,19 @@ var gn = {
2649
2649
  function cn(e) {
2650
2650
  return (e = typeof e == "function" ? e() : e) ? e : {};
2651
2651
  }
2652
- function Lo() {
2652
+ function ko() {
2653
2653
  for (let e = 0, t = this.length; e < t; ++e) {
2654
2654
  const n = this[e]();
2655
2655
  if (n !== void 0) return n;
2656
2656
  }
2657
2657
  }
2658
- function $s(...e) {
2658
+ function js(...e) {
2659
2659
  let t = !1;
2660
2660
  for (let i = 0; i < e.length; i++) {
2661
2661
  const o = e[i];
2662
2662
  t = t || !!o && qt in o, e[i] = typeof o == "function" ? (t = !0, J(o)) : o;
2663
2663
  }
2664
- if (Os && t)
2664
+ if (xs && t)
2665
2665
  return new Proxy({
2666
2666
  get(i) {
2667
2667
  for (let o = e.length - 1; o >= 0; o--) {
@@ -2679,7 +2679,7 @@ function $s(...e) {
2679
2679
  for (let o = 0; o < e.length; o++) i.push(...Object.keys(cn(e[o])));
2680
2680
  return [...new Set(i)];
2681
2681
  }
2682
- }, gn);
2682
+ }, En);
2683
2683
  const n = {}, s = /* @__PURE__ */ Object.create(null);
2684
2684
  for (let i = e.length - 1; i >= 0; i--) {
2685
2685
  const o = e[i];
@@ -2693,7 +2693,7 @@ function $s(...e) {
2693
2693
  s[f] = u.get ? {
2694
2694
  enumerable: !0,
2695
2695
  configurable: !0,
2696
- get: Lo.bind(n[f] = [u.get.bind(o)])
2696
+ get: ko.bind(n[f] = [u.get.bind(o)])
2697
2697
  } : u.value !== void 0 ? u : void 0;
2698
2698
  else {
2699
2699
  const h = n[f];
@@ -2708,8 +2708,8 @@ function $s(...e) {
2708
2708
  }
2709
2709
  return r;
2710
2710
  }
2711
- function Go(e, ...t) {
2712
- if (Os && qt in e) {
2711
+ function xo(e, ...t) {
2712
+ if (xs && qt in e) {
2713
2713
  const r = new Set(t.length > 1 ? t.flat() : t[0]), a = t.map((i) => new Proxy({
2714
2714
  get(o) {
2715
2715
  return i.includes(o) ? e[o] : void 0;
@@ -2720,7 +2720,7 @@ function Go(e, ...t) {
2720
2720
  keys() {
2721
2721
  return i.filter((o) => o in e);
2722
2722
  }
2723
- }, gn));
2723
+ }, En));
2724
2724
  return a.push(new Proxy({
2725
2725
  get(i) {
2726
2726
  return r.has(i) ? void 0 : e[i];
@@ -2731,7 +2731,7 @@ function Go(e, ...t) {
2731
2731
  keys() {
2732
2732
  return Object.keys(e).filter((i) => !r.has(i));
2733
2733
  }
2734
- }, gn)), a;
2734
+ }, En)), a;
2735
2735
  }
2736
2736
  const n = {}, s = t.map(() => ({}));
2737
2737
  for (const r of Object.getOwnPropertyNames(e)) {
@@ -2743,7 +2743,7 @@ function Go(e, ...t) {
2743
2743
  }
2744
2744
  return [...s, n];
2745
2745
  }
2746
- function Qs(e) {
2746
+ function Ws(e) {
2747
2747
  let t, n;
2748
2748
  const s = (r) => {
2749
2749
  const a = P.context;
@@ -2753,7 +2753,7 @@ function Qs(e) {
2753
2753
  !P.done && at(a), P.count--, l(() => d.default), at();
2754
2754
  }), t = o;
2755
2755
  } else if (!t) {
2756
- const [o] = yo(() => (n || (n = e())).then((l) => l.default));
2756
+ const [o] = Po(() => (n || (n = e())).then((l) => l.default));
2757
2757
  t = o;
2758
2758
  }
2759
2759
  let i;
@@ -2767,24 +2767,24 @@ function Qs(e) {
2767
2767
  };
2768
2768
  return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
2769
2769
  }
2770
- var Do = 0;
2771
- function qc() {
2772
- return P.context ? P.getNextContextId() : `cl-${Do++}`;
2770
+ var Ro = 0;
2771
+ function Wc() {
2772
+ return P.context ? P.getNextContextId() : `cl-${Ro++}`;
2773
2773
  }
2774
- var js = (e) => `Stale read from <${e}>.`;
2775
- function Kc(e) {
2774
+ var zs = (e) => `Stale read from <${e}>.`;
2775
+ function zc(e) {
2776
2776
  const t = "fallback" in e && {
2777
2777
  fallback: () => e.fallback
2778
2778
  };
2779
- return J(Co(() => e.each, e.children, t || void 0));
2779
+ return J(Do(() => e.each, e.children, t || void 0));
2780
2780
  }
2781
- function Hc(e) {
2781
+ function Yc(e) {
2782
2782
  const t = "fallback" in e && {
2783
2783
  fallback: () => e.fallback
2784
2784
  };
2785
- return J(No(() => e.each, e.children, t || void 0));
2785
+ return J(Oo(() => e.each, e.children, t || void 0));
2786
2786
  }
2787
- function Vc(e) {
2787
+ function Jc(e) {
2788
2788
  const t = e.keyed, n = J(() => e.when, void 0, void 0), s = t ? n : J(n, void 0, {
2789
2789
  equals: (r, a) => !r == !a
2790
2790
  });
@@ -2793,15 +2793,15 @@ function Vc(e) {
2793
2793
  if (r) {
2794
2794
  const a = e.children;
2795
2795
  return typeof a == "function" && a.length > 0 ? ee(() => a(t ? r : () => {
2796
- if (!ee(s)) throw js("Show");
2796
+ if (!ee(s)) throw zs("Show");
2797
2797
  return n();
2798
2798
  })) : a;
2799
2799
  }
2800
2800
  return e.fallback;
2801
2801
  }, void 0, void 0);
2802
2802
  }
2803
- function $c(e) {
2804
- const t = Ms(() => e.children), n = J(() => {
2803
+ function Xc(e) {
2804
+ const t = qs(() => e.children), n = J(() => {
2805
2805
  const s = t(), r = Array.isArray(s) ? s : [s];
2806
2806
  let a = () => {
2807
2807
  };
@@ -2819,18 +2819,18 @@ function $c(e) {
2819
2819
  const [r, a, i] = s, o = i.children;
2820
2820
  return typeof o == "function" && o.length > 0 ? ee(() => o(i.keyed ? a() : () => {
2821
2821
  var d;
2822
- if (((d = ee(n)()) == null ? void 0 : d[0]) !== r) throw js("Match");
2822
+ if (((d = ee(n)()) == null ? void 0 : d[0]) !== r) throw zs("Match");
2823
2823
  return a();
2824
2824
  })) : o;
2825
2825
  }, void 0, void 0);
2826
2826
  }
2827
- function Qc(e) {
2827
+ function Zc(e) {
2828
2828
  return e;
2829
2829
  }
2830
- var Oo = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], ko = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...Oo]), xo = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), Ro = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
2830
+ var Uo = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], Bo = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...Uo]), Mo = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), Fo = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
2831
2831
  className: "class",
2832
2832
  htmlFor: "for"
2833
- }), Uo = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
2833
+ }), qo = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
2834
2834
  class: "className",
2835
2835
  novalidate: {
2836
2836
  $: "noValidate",
@@ -2859,11 +2859,11 @@ var Oo = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
2859
2859
  TEXTAREA: 1
2860
2860
  }
2861
2861
  });
2862
- function Bo(e, t) {
2863
- const n = Uo[e];
2862
+ function Ko(e, t) {
2863
+ const n = qo[e];
2864
2864
  return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
2865
2865
  }
2866
- var Mo = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), Fo = /* @__PURE__ */ new Set([
2866
+ var Ho = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), Vo = /* @__PURE__ */ new Set([
2867
2867
  "altGlyph",
2868
2868
  "altGlyphDef",
2869
2869
  "altGlyphItem",
@@ -2941,11 +2941,11 @@ var Mo = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
2941
2941
  "use",
2942
2942
  "view",
2943
2943
  "vkern"
2944
- ]), qo = {
2944
+ ]), Qo = {
2945
2945
  xlink: "http://www.w3.org/1999/xlink",
2946
2946
  xml: "http://www.w3.org/XML/1998/namespace"
2947
- }, jc = (e) => J(() => e());
2948
- function Ko(e, t, n) {
2947
+ }, eu = (e) => J(() => e());
2948
+ function $o(e, t, n) {
2949
2949
  let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling, d = null;
2950
2950
  for (; i < r || o < a; ) {
2951
2951
  if (t[i] === n[o]) {
@@ -2985,15 +2985,15 @@ function Ko(e, t, n) {
2985
2985
  }
2986
2986
  }
2987
2987
  var ot = "_$DX_DELEGATE";
2988
- function Ws(e, t, n, s = {}) {
2988
+ function Ys(e, t, n, s = {}) {
2989
2989
  let r;
2990
2990
  return De((a) => {
2991
- r = a, t === document ? e() : mn(t, e(), t.firstChild ? null : void 0, n);
2991
+ r = a, t === document ? e() : pn(t, e(), t.firstChild ? null : void 0, n);
2992
2992
  }, s.owner), () => {
2993
2993
  r(), t.textContent = "";
2994
2994
  };
2995
2995
  }
2996
- function Wc(e, t, n, s) {
2996
+ function tu(e, t, n, s) {
2997
2997
  let r;
2998
2998
  const a = () => {
2999
2999
  const o = document.createElement("template");
@@ -3001,32 +3001,32 @@ function Wc(e, t, n, s) {
3001
3001
  }, i = () => (r || (r = a())).cloneNode(!0);
3002
3002
  return i.cloneNode = i, i;
3003
3003
  }
3004
- function Ho(e, t = window.document) {
3004
+ function jo(e, t = window.document) {
3005
3005
  const n = t[ot] || (t[ot] = /* @__PURE__ */ new Set());
3006
3006
  for (let s = 0, r = e.length; s < r; s++) {
3007
3007
  const a = e[s];
3008
- n.has(a) || (n.add(a), t.addEventListener(a, zs));
3008
+ n.has(a) || (n.add(a), t.addEventListener(a, Js));
3009
3009
  }
3010
3010
  }
3011
- function zc(e = window.document) {
3011
+ function nu(e = window.document) {
3012
3012
  if (e[ot]) {
3013
- for (let t of e[ot].keys()) e.removeEventListener(t, zs);
3013
+ for (let t of e[ot].keys()) e.removeEventListener(t, Js);
3014
3014
  delete e[ot];
3015
3015
  }
3016
3016
  }
3017
- function En(e, t, n) {
3017
+ function mn(e, t, n) {
3018
3018
  Ue(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
3019
3019
  }
3020
- function Vo(e, t, n, s) {
3020
+ function Wo(e, t, n, s) {
3021
3021
  Ue(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
3022
3022
  }
3023
- function $o(e, t, n) {
3023
+ function zo(e, t, n) {
3024
3024
  Ue(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
3025
3025
  }
3026
- function Qo(e, t) {
3026
+ function Yo(e, t) {
3027
3027
  Ue(e) || (t == null ? e.removeAttribute("class") : e.className = t);
3028
3028
  }
3029
- function jo(e, t, n, s) {
3029
+ function Jo(e, t, n, s) {
3030
3030
  if (s)
3031
3031
  Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
3032
3032
  else if (Array.isArray(n)) {
@@ -3034,21 +3034,21 @@ function jo(e, t, n, s) {
3034
3034
  e.addEventListener(t, n[0] = (a) => r.call(e, n[1], a));
3035
3035
  } else e.addEventListener(t, n, typeof n != "function" && n);
3036
3036
  }
3037
- function Wo(e, t, n = {}) {
3037
+ function Xo(e, t, n = {}) {
3038
3038
  const s = Object.keys(t || {}), r = Object.keys(n);
3039
3039
  let a, i;
3040
3040
  for (a = 0, i = r.length; a < i; a++) {
3041
3041
  const o = r[a];
3042
- !o || o === "undefined" || t[o] || (Jn(e, o, !1), delete n[o]);
3042
+ !o || o === "undefined" || t[o] || (Zn(e, o, !1), delete n[o]);
3043
3043
  }
3044
3044
  for (a = 0, i = s.length; a < i; a++) {
3045
3045
  const o = s[a], l = !!t[o];
3046
- !o || o === "undefined" || n[o] === l || !l || (Jn(e, o, !0), n[o] = l);
3046
+ !o || o === "undefined" || n[o] === l || !l || (Zn(e, o, !0), n[o] = l);
3047
3047
  }
3048
3048
  return n;
3049
3049
  }
3050
- function zo(e, t, n) {
3051
- if (!t) return n ? En(e, "style") : t;
3050
+ function Zo(e, t, n) {
3051
+ if (!t) return n ? mn(e, "style") : t;
3052
3052
  const s = e.style;
3053
3053
  if (typeof t == "string") return s.cssText = t;
3054
3054
  typeof n == "string" && (s.cssText = n = void 0), n || (n = {}), t || (t = {});
@@ -3059,49 +3059,49 @@ function zo(e, t, n) {
3059
3059
  r = t[a], r !== n[a] && (s.setProperty(a, r), n[a] = r);
3060
3060
  return n;
3061
3061
  }
3062
- function Yo(e, t = {}, n, s) {
3062
+ function el(e, t = {}, n, s) {
3063
3063
  const r = {};
3064
- return s || Oe(() => r.children = dt(e, t.children, r.children)), Oe(() => typeof t.ref == "function" && Jo(t.ref, e)), Oe(() => Xo(e, t, n, !0, r, !0)), r;
3064
+ return s || Oe(() => r.children = dt(e, t.children, r.children)), Oe(() => typeof t.ref == "function" && tl(t.ref, e)), Oe(() => nl(e, t, n, !0, r, !0)), r;
3065
3065
  }
3066
- function Jo(e, t, n) {
3066
+ function tl(e, t, n) {
3067
3067
  return ee(() => e(t, n));
3068
3068
  }
3069
- function mn(e, t, n, s) {
3069
+ function pn(e, t, n, s) {
3070
3070
  if (n !== void 0 && !s && (s = []), typeof t != "function") return dt(e, t, s, n);
3071
3071
  Oe((r) => dt(e, t(), r, n), s);
3072
3072
  }
3073
- function Xo(e, t, n, s, r = {}, a = !1) {
3073
+ function nl(e, t, n, s, r = {}, a = !1) {
3074
3074
  t || (t = {});
3075
3075
  for (const i in r)
3076
3076
  if (!(i in t)) {
3077
3077
  if (i === "children") continue;
3078
- r[i] = Xn(e, i, null, r[i], n, a, t);
3078
+ r[i] = es(e, i, null, r[i], n, a, t);
3079
3079
  }
3080
3080
  for (const i in t) {
3081
3081
  if (i === "children")
3082
3082
  continue;
3083
3083
  const o = t[i];
3084
- r[i] = Xn(e, i, o, r[i], n, a, t);
3084
+ r[i] = es(e, i, o, r[i], n, a, t);
3085
3085
  }
3086
3086
  }
3087
- function Zo(e) {
3087
+ function sl(e) {
3088
3088
  let t, n;
3089
- return !Ue() || !(t = P.registry.get(n = tl())) ? e() : (P.completed && P.completed.add(t), P.registry.delete(n), t);
3089
+ return !Ue() || !(t = P.registry.get(n = al())) ? e() : (P.completed && P.completed.add(t), P.registry.delete(n), t);
3090
3090
  }
3091
3091
  function Ue(e) {
3092
3092
  return !!P.context && !P.done && (!e || e.isConnected);
3093
3093
  }
3094
- function el(e) {
3094
+ function rl(e) {
3095
3095
  return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
3096
3096
  }
3097
- function Jn(e, t, n) {
3097
+ function Zn(e, t, n) {
3098
3098
  const s = t.trim().split(/\s+/);
3099
3099
  for (let r = 0, a = s.length; r < a; r++) e.classList.toggle(s[r], n);
3100
3100
  }
3101
- function Xn(e, t, n, s, r, a, i) {
3101
+ function es(e, t, n, s, r, a, i) {
3102
3102
  let o, l, d, f, u;
3103
- if (t === "style") return zo(e, n, s);
3104
- if (t === "classList") return Wo(e, n, s);
3103
+ if (t === "style") return Zo(e, n, s);
3104
+ if (t === "classList") return Xo(e, n, s);
3105
3105
  if (n === s) return s;
3106
3106
  if (t === "ref")
3107
3107
  a || n(e);
@@ -3112,28 +3112,28 @@ function Xn(e, t, n, s, r, a, i) {
3112
3112
  const h = t.slice(10);
3113
3113
  s && e.removeEventListener(h, s, !0), n && e.addEventListener(h, n, !0);
3114
3114
  } else if (t.slice(0, 2) === "on") {
3115
- const h = t.slice(2).toLowerCase(), E = Mo.has(h);
3115
+ const h = t.slice(2).toLowerCase(), E = Ho.has(h);
3116
3116
  if (!E && s) {
3117
3117
  const A = Array.isArray(s) ? s[0] : s;
3118
3118
  e.removeEventListener(h, A);
3119
3119
  }
3120
- (E || n) && (jo(e, h, n, E), E && Ho([h]));
3120
+ (E || n) && (Jo(e, h, n, E), E && jo([h]));
3121
3121
  } else if (t.slice(0, 5) === "attr:")
3122
- En(e, t.slice(5), n);
3122
+ mn(e, t.slice(5), n);
3123
3123
  else if (t.slice(0, 5) === "bool:")
3124
- $o(e, t.slice(5), n);
3125
- else if ((u = t.slice(0, 5) === "prop:") || (d = xo.has(t)) || !r && ((f = Bo(t, e.tagName)) || (l = ko.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
3124
+ zo(e, t.slice(5), n);
3125
+ else if ((u = t.slice(0, 5) === "prop:") || (d = Mo.has(t)) || !r && ((f = Ko(t, e.tagName)) || (l = Bo.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
3126
3126
  if (u)
3127
3127
  t = t.slice(5), l = !0;
3128
3128
  else if (Ue(e)) return n;
3129
- t === "class" || t === "className" ? Qo(e, n) : o && !l && !d ? e[el(t)] = n : e[f || t] = n;
3129
+ t === "class" || t === "className" ? Yo(e, n) : o && !l && !d ? e[rl(t)] = n : e[f || t] = n;
3130
3130
  } else {
3131
- const h = r && t.indexOf(":") > -1 && qo[t.split(":")[0]];
3132
- h ? Vo(e, h, t, n) : En(e, Ro[t] || t, n);
3131
+ const h = r && t.indexOf(":") > -1 && Qo[t.split(":")[0]];
3132
+ h ? Wo(e, h, t, n) : mn(e, Fo[t] || t, n);
3133
3133
  }
3134
3134
  return n;
3135
3135
  }
3136
- function zs(e) {
3136
+ function Js(e) {
3137
3137
  if (P.registry && P.events && P.events.find(([l, d]) => d === e))
3138
3138
  return;
3139
3139
  let t = e.target;
@@ -3203,7 +3203,7 @@ function dt(e, t, n, s, r) {
3203
3203
  }), () => n;
3204
3204
  if (Array.isArray(t)) {
3205
3205
  const l = [], d = n && Array.isArray(n);
3206
- if (pn(l, t, n, r))
3206
+ if (An(l, t, n, r))
3207
3207
  return Oe(() => n = dt(e, l, n, s, !0)), () => n;
3208
3208
  if (a) {
3209
3209
  if (!l.length) return n;
@@ -3216,7 +3216,7 @@ function dt(e, t, n, s, r) {
3216
3216
  }
3217
3217
  if (l.length === 0) {
3218
3218
  if (n = Be(e, n, s), o) return n;
3219
- } else d ? n.length === 0 ? Zn(e, l, s) : Ko(e, n, l) : (n && Be(e), Zn(e, l));
3219
+ } else d ? n.length === 0 ? ts(e, l, s) : $o(e, n, l) : (n && Be(e), ts(e, l));
3220
3220
  n = l;
3221
3221
  } else if (t.nodeType) {
3222
3222
  if (a && t.parentNode) return n = o ? [t] : t;
@@ -3229,18 +3229,18 @@ function dt(e, t, n, s, r) {
3229
3229
  }
3230
3230
  return n;
3231
3231
  }
3232
- function pn(e, t, n, s) {
3232
+ function An(e, t, n, s) {
3233
3233
  let r = !1;
3234
3234
  for (let a = 0, i = t.length; a < i; a++) {
3235
3235
  let o = t[a], l = n && n[e.length], d;
3236
3236
  if (!(o == null || o === !0 || o === !1)) if ((d = typeof o) == "object" && o.nodeType)
3237
3237
  e.push(o);
3238
3238
  else if (Array.isArray(o))
3239
- r = pn(e, o, l) || r;
3239
+ r = An(e, o, l) || r;
3240
3240
  else if (d === "function")
3241
3241
  if (s) {
3242
3242
  for (; typeof o == "function"; ) o = o();
3243
- r = pn(e, Array.isArray(o) ? o : [o], Array.isArray(l) ? l : [l]) || r;
3243
+ r = An(e, Array.isArray(o) ? o : [o], Array.isArray(l) ? l : [l]) || r;
3244
3244
  } else
3245
3245
  e.push(o), r = !0;
3246
3246
  else {
@@ -3250,7 +3250,7 @@ function pn(e, t, n, s) {
3250
3250
  }
3251
3251
  return r;
3252
3252
  }
3253
- function Zn(e, t, n = null) {
3253
+ function ts(e, t, n = null) {
3254
3254
  for (let s = 0, r = t.length; s < r; s++) e.insertBefore(t[s], n);
3255
3255
  }
3256
3256
  function Be(e, t, n, s) {
@@ -3268,26 +3268,26 @@ function Be(e, t, n, s) {
3268
3268
  } else e.insertBefore(r, n);
3269
3269
  return [r];
3270
3270
  }
3271
- function tl() {
3271
+ function al() {
3272
3272
  return P.getNextContextId();
3273
3273
  }
3274
- var nl = "http://www.w3.org/2000/svg";
3275
- function Ys(e, t = !1) {
3276
- return t ? document.createElementNS(nl, e) : document.createElement(e);
3274
+ var il = "http://www.w3.org/2000/svg";
3275
+ function Xs(e, t = !1) {
3276
+ return t ? document.createElementNS(il, e) : document.createElement(e);
3277
3277
  }
3278
- function Yc(e) {
3278
+ function su(e) {
3279
3279
  const {
3280
3280
  useShadow: t
3281
- } = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = Yn();
3281
+ } = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = Xn();
3282
3282
  let a, i = !!P.context;
3283
- return Us(() => {
3284
- i && (Yn().user = i = !1), a || (a = Bs(r, () => J(() => e.children)));
3283
+ return Ms(() => {
3284
+ i && (Xn().user = i = !1), a || (a = Fs(r, () => J(() => e.children)));
3285
3285
  const o = s();
3286
3286
  if (o instanceof HTMLHeadElement) {
3287
3287
  const [l, d] = F(!1), f = () => d(!0);
3288
- De((u) => mn(o, () => l() ? u() : a(), null)), ct(f);
3288
+ De((u) => pn(o, () => l() ? u() : a(), null)), ct(f);
3289
3289
  } else {
3290
- const l = Ys(e.isSVG ? "g" : "div", e.isSVG), d = t && l.attachShadow ? l.attachShadow({
3290
+ const l = Xs(e.isSVG ? "g" : "div", e.isSVG), d = t && l.attachShadow ? l.attachShadow({
3291
3291
  mode: "open"
3292
3292
  }) : l;
3293
3293
  Object.defineProperty(l, "_$host", {
@@ -3295,13 +3295,13 @@ function Yc(e) {
3295
3295
  return n.parentNode;
3296
3296
  },
3297
3297
  configurable: !0
3298
- }), mn(d, a), o.appendChild(l), e.ref && e.ref(l), ct(() => o.removeChild(l));
3298
+ }), pn(d, a), o.appendChild(l), e.ref && e.ref(l), ct(() => o.removeChild(l));
3299
3299
  }
3300
3300
  }, void 0, {
3301
3301
  render: !i
3302
3302
  }), n;
3303
3303
  }
3304
- function sl(e, t) {
3304
+ function ol(e, t) {
3305
3305
  const n = J(e);
3306
3306
  return J(() => {
3307
3307
  const s = n();
@@ -3309,16 +3309,16 @@ function sl(e, t) {
3309
3309
  case "function":
3310
3310
  return ee(() => s(t));
3311
3311
  case "string":
3312
- const r = Fo.has(s), a = P.context ? Zo() : Ys(s, r);
3313
- return Yo(a, t, r), a;
3312
+ const r = Vo.has(s), a = P.context ? sl() : Xs(s, r);
3313
+ return el(a, t, r), a;
3314
3314
  }
3315
3315
  });
3316
3316
  }
3317
- function Jc(e) {
3318
- const [, t] = Go(e, ["component"]);
3319
- return sl(() => e.component, t);
3317
+ function ru(e) {
3318
+ const [, t] = xo(e, ["component"]);
3319
+ return ol(() => e.component, t);
3320
3320
  }
3321
- var rl = class {
3321
+ var ll = class {
3322
3322
  constructor() {
3323
3323
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
3324
3324
  }
@@ -3334,9 +3334,9 @@ var rl = class {
3334
3334
  clear() {
3335
3335
  this.keyToValue.clear(), this.valueToKey.clear();
3336
3336
  }
3337
- }, Js = class {
3337
+ }, Zs = class {
3338
3338
  constructor(e) {
3339
- this.generateIdentifier = e, this.kv = new rl();
3339
+ this.generateIdentifier = e, this.kv = new ll();
3340
3340
  }
3341
3341
  register(e, t) {
3342
3342
  this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
@@ -3350,7 +3350,7 @@ var rl = class {
3350
3350
  getValue(e) {
3351
3351
  return this.kv.getByKey(e);
3352
3352
  }
3353
- }, al = class extends Js {
3353
+ }, cl = class extends Zs {
3354
3354
  constructor() {
3355
3355
  super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
3356
3356
  }
@@ -3361,7 +3361,7 @@ var rl = class {
3361
3361
  return this.classToAllowedProps.get(e);
3362
3362
  }
3363
3363
  };
3364
- function il(e) {
3364
+ function ul(e) {
3365
3365
  if ("values" in Object)
3366
3366
  return Object.values(e);
3367
3367
  const t = [];
@@ -3369,8 +3369,8 @@ function il(e) {
3369
3369
  e.hasOwnProperty(n) && t.push(e[n]);
3370
3370
  return t;
3371
3371
  }
3372
- function ol(e, t) {
3373
- const n = il(e);
3372
+ function dl(e, t) {
3373
+ const n = ul(e);
3374
3374
  if ("find" in n)
3375
3375
  return n.find(t);
3376
3376
  const s = n;
@@ -3386,14 +3386,14 @@ function tt(e, t) {
3386
3386
  function Ut(e, t) {
3387
3387
  return e.indexOf(t) !== -1;
3388
3388
  }
3389
- function es(e, t) {
3389
+ function ns(e, t) {
3390
3390
  for (let n = 0; n < e.length; n++) {
3391
3391
  const s = e[n];
3392
3392
  if (t(s))
3393
3393
  return s;
3394
3394
  }
3395
3395
  }
3396
- var ll = class {
3396
+ var fl = class {
3397
3397
  constructor() {
3398
3398
  this.transfomers = {};
3399
3399
  }
@@ -3401,12 +3401,12 @@ var ll = class {
3401
3401
  this.transfomers[e.name] = e;
3402
3402
  }
3403
3403
  findApplicable(e) {
3404
- return ol(this.transfomers, (t) => t.isApplicable(e));
3404
+ return dl(this.transfomers, (t) => t.isApplicable(e));
3405
3405
  }
3406
3406
  findByName(e) {
3407
3407
  return this.transfomers[e];
3408
3408
  }
3409
- }, cl = (e) => Object.prototype.toString.call(e).slice(8, -1), Xs = (e) => typeof e > "u", ul = (e) => e === null, ft = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, An = (e) => ft(e) && Object.keys(e).length === 0, ve = (e) => Array.isArray(e), dl = (e) => typeof e == "string", fl = (e) => typeof e == "number" && !isNaN(e), hl = (e) => typeof e == "boolean", gl = (e) => e instanceof RegExp, ht = (e) => e instanceof Map, gt = (e) => e instanceof Set, Zs = (e) => cl(e) === "Symbol", El = (e) => e instanceof Date && !isNaN(e.valueOf()), ml = (e) => e instanceof Error, ts = (e) => typeof e == "number" && isNaN(e), pl = (e) => hl(e) || ul(e) || Xs(e) || fl(e) || dl(e) || Zs(e), Al = (e) => typeof e == "bigint", yl = (e) => e === 1 / 0 || e === -1 / 0, Tl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Sl = (e) => e instanceof URL, er = (e) => e.replace(/\./g, "\\."), un = (e) => e.map(String).map(er).join("."), lt = (e) => {
3409
+ }, hl = (e) => Object.prototype.toString.call(e).slice(8, -1), er = (e) => typeof e > "u", gl = (e) => e === null, ft = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, yn = (e) => ft(e) && Object.keys(e).length === 0, ve = (e) => Array.isArray(e), El = (e) => typeof e == "string", ml = (e) => typeof e == "number" && !isNaN(e), pl = (e) => typeof e == "boolean", Al = (e) => e instanceof RegExp, ht = (e) => e instanceof Map, gt = (e) => e instanceof Set, tr = (e) => hl(e) === "Symbol", yl = (e) => e instanceof Date && !isNaN(e.valueOf()), Tl = (e) => e instanceof Error, ss = (e) => typeof e == "number" && isNaN(e), Sl = (e) => pl(e) || gl(e) || er(e) || ml(e) || El(e) || tr(e), _l = (e) => typeof e == "bigint", Pl = (e) => e === 1 / 0 || e === -1 / 0, wl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), vl = (e) => e instanceof URL, nr = (e) => e.replace(/\./g, "\\."), un = (e) => e.map(String).map(nr).join("."), lt = (e) => {
3410
3410
  const t = [];
3411
3411
  let n = "";
3412
3412
  for (let r = 0; r < e.length; r++) {
@@ -3432,12 +3432,12 @@ function he(e, t, n, s) {
3432
3432
  untransform: s
3433
3433
  };
3434
3434
  }
3435
- var tr = [
3436
- he(Xs, "undefined", () => null, () => {
3435
+ var sr = [
3436
+ he(er, "undefined", () => null, () => {
3437
3437
  }),
3438
- he(Al, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
3439
- he(El, "Date", (e) => e.toISOString(), (e) => new Date(e)),
3440
- he(ml, "Error", (e, t) => {
3438
+ he(_l, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
3439
+ he(yl, "Date", (e) => e.toISOString(), (e) => new Date(e)),
3440
+ he(Tl, "Error", (e, t) => {
3441
3441
  const n = {
3442
3442
  name: e.name,
3443
3443
  message: e.message
@@ -3451,7 +3451,7 @@ var tr = [
3451
3451
  n[s] = e[s];
3452
3452
  }), n;
3453
3453
  }),
3454
- he(gl, "regexp", (e) => "" + e, (e) => {
3454
+ he(Al, "regexp", (e) => "" + e, (e) => {
3455
3455
  const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
3456
3456
  return new RegExp(t, n);
3457
3457
  }),
@@ -3464,9 +3464,9 @@ var tr = [
3464
3464
  (e) => new Set(e)
3465
3465
  ),
3466
3466
  he(ht, "map", (e) => [...e.entries()], (e) => new Map(e)),
3467
- he((e) => ts(e) || yl(e), "number", (e) => ts(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
3467
+ he((e) => ss(e) || Pl(e), "number", (e) => ss(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
3468
3468
  he((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
3469
- he(Sl, "URL", (e) => e.toString(), (e) => new URL(e))
3469
+ he(vl, "URL", (e) => e.toString(), (e) => new URL(e))
3470
3470
  ];
3471
3471
  function Zt(e, t, n, s) {
3472
3472
  return {
@@ -3476,12 +3476,12 @@ function Zt(e, t, n, s) {
3476
3476
  untransform: s
3477
3477
  };
3478
3478
  }
3479
- var nr = Zt((e, t) => Zs(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
3479
+ var rr = Zt((e, t) => tr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
3480
3480
  const s = n.symbolRegistry.getValue(t[1]);
3481
3481
  if (!s)
3482
3482
  throw new Error("Trying to deserialize unknown symbol");
3483
3483
  return s;
3484
- }), _l = [
3484
+ }), bl = [
3485
3485
  Int8Array,
3486
3486
  Uint8Array,
3487
3487
  Int16Array,
@@ -3491,16 +3491,16 @@ var nr = Zt((e, t) => Zs(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
3491
3491
  Float32Array,
3492
3492
  Float64Array,
3493
3493
  Uint8ClampedArray
3494
- ].reduce((e, t) => (e[t.name] = t, e), {}), sr = Zt(Tl, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
3495
- const n = _l[t[1]];
3494
+ ].reduce((e, t) => (e[t.name] = t, e), {}), ar = Zt(wl, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
3495
+ const n = bl[t[1]];
3496
3496
  if (!n)
3497
3497
  throw new Error("Trying to deserialize unknown typed array");
3498
3498
  return new n(e);
3499
3499
  });
3500
- function rr(e, t) {
3500
+ function ir(e, t) {
3501
3501
  return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
3502
3502
  }
3503
- var ar = Zt(rr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
3503
+ var or = Zt(ir, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
3504
3504
  const n = t.classRegistry.getAllowedProps(e.constructor);
3505
3505
  if (!n)
3506
3506
  return { ...e };
@@ -3513,44 +3513,44 @@ var ar = Zt(rr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
3513
3513
  if (!s)
3514
3514
  throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
3515
3515
  return Object.assign(Object.create(s.prototype), e);
3516
- }), ir = Zt((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
3516
+ }), lr = Zt((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
3517
3517
  const s = n.customTransformerRegistry.findByName(t[1]);
3518
3518
  if (!s)
3519
3519
  throw new Error("Trying to deserialize unknown custom value");
3520
3520
  return s.deserialize(e);
3521
- }), Pl = [ar, nr, ir, sr], ns = (e, t) => {
3522
- const n = es(Pl, (r) => r.isApplicable(e, t));
3521
+ }), Il = [or, rr, lr, ar], rs = (e, t) => {
3522
+ const n = ns(Il, (r) => r.isApplicable(e, t));
3523
3523
  if (n)
3524
3524
  return {
3525
3525
  value: n.transform(e, t),
3526
3526
  type: n.annotation(e, t)
3527
3527
  };
3528
- const s = es(tr, (r) => r.isApplicable(e, t));
3528
+ const s = ns(sr, (r) => r.isApplicable(e, t));
3529
3529
  if (s)
3530
3530
  return {
3531
3531
  value: s.transform(e, t),
3532
3532
  type: s.annotation
3533
3533
  };
3534
- }, or = {};
3535
- tr.forEach((e) => {
3536
- or[e.annotation] = e;
3534
+ }, cr = {};
3535
+ sr.forEach((e) => {
3536
+ cr[e.annotation] = e;
3537
3537
  });
3538
- var wl = (e, t, n) => {
3538
+ var Cl = (e, t, n) => {
3539
3539
  if (ve(t))
3540
3540
  switch (t[0]) {
3541
3541
  case "symbol":
3542
- return nr.untransform(e, t, n);
3542
+ return rr.untransform(e, t, n);
3543
3543
  case "class":
3544
- return ar.untransform(e, t, n);
3544
+ return or.untransform(e, t, n);
3545
3545
  case "custom":
3546
- return ir.untransform(e, t, n);
3546
+ return lr.untransform(e, t, n);
3547
3547
  case "typed-array":
3548
- return sr.untransform(e, t, n);
3548
+ return ar.untransform(e, t, n);
3549
3549
  default:
3550
3550
  throw new Error("Unknown transformation: " + t);
3551
3551
  }
3552
3552
  else {
3553
- const s = or[t];
3553
+ const s = cr[t];
3554
3554
  if (!s)
3555
3555
  throw new Error("Unknown transformation: " + t);
3556
3556
  return s.untransform(e, n);
@@ -3563,7 +3563,7 @@ var wl = (e, t, n) => {
3563
3563
  n.next(), t--;
3564
3564
  return n.next().value;
3565
3565
  };
3566
- function lr(e) {
3566
+ function ur(e) {
3567
3567
  if (Ut(e, "__proto__"))
3568
3568
  throw new Error("__proto__ is not allowed as a property");
3569
3569
  if (Ut(e, "prototype"))
@@ -3571,8 +3571,8 @@ function lr(e) {
3571
3571
  if (Ut(e, "constructor"))
3572
3572
  throw new Error("constructor is not allowed as a property");
3573
3573
  }
3574
- var vl = (e, t) => {
3575
- lr(t);
3574
+ var Nl = (e, t) => {
3575
+ ur(t);
3576
3576
  for (let n = 0; n < t.length; n++) {
3577
3577
  const s = t[n];
3578
3578
  if (gt(e))
@@ -3591,8 +3591,8 @@ var vl = (e, t) => {
3591
3591
  e = e[s];
3592
3592
  }
3593
3593
  return e;
3594
- }, yn = (e, t, n) => {
3595
- if (lr(t), t.length === 0)
3594
+ }, Tn = (e, t, n) => {
3595
+ if (ur(t), t.length === 0)
3596
3596
  return n(e);
3597
3597
  let s = e;
3598
3598
  for (let a = 0; a < t.length - 1; a++) {
@@ -3640,45 +3640,45 @@ var vl = (e, t) => {
3640
3640
  }
3641
3641
  return e;
3642
3642
  };
3643
- function Tn(e, t, n = []) {
3643
+ function Sn(e, t, n = []) {
3644
3644
  if (!e)
3645
3645
  return;
3646
3646
  if (!ve(e)) {
3647
- tt(e, (a, i) => Tn(a, t, [...n, ...lt(i)]));
3647
+ tt(e, (a, i) => Sn(a, t, [...n, ...lt(i)]));
3648
3648
  return;
3649
3649
  }
3650
3650
  const [s, r] = e;
3651
3651
  r && tt(r, (a, i) => {
3652
- Tn(a, t, [...n, ...lt(i)]);
3652
+ Sn(a, t, [...n, ...lt(i)]);
3653
3653
  }), t(s, n);
3654
3654
  }
3655
- function bl(e, t, n) {
3656
- return Tn(t, (s, r) => {
3657
- e = yn(e, r, (a) => wl(a, s, n));
3655
+ function Ll(e, t, n) {
3656
+ return Sn(t, (s, r) => {
3657
+ e = Tn(e, r, (a) => Cl(a, s, n));
3658
3658
  }), e;
3659
3659
  }
3660
- function Il(e, t) {
3660
+ function Gl(e, t) {
3661
3661
  function n(s, r) {
3662
- const a = vl(e, lt(r));
3662
+ const a = Nl(e, lt(r));
3663
3663
  s.map(lt).forEach((i) => {
3664
- e = yn(e, i, () => a);
3664
+ e = Tn(e, i, () => a);
3665
3665
  });
3666
3666
  }
3667
3667
  if (ve(t)) {
3668
3668
  const [s, r] = t;
3669
3669
  s.forEach((a) => {
3670
- e = yn(e, lt(a), () => e);
3670
+ e = Tn(e, lt(a), () => e);
3671
3671
  }), r && tt(r, n);
3672
3672
  } else
3673
3673
  tt(t, n);
3674
3674
  return e;
3675
3675
  }
3676
- var Cl = (e, t) => ft(e) || ve(e) || ht(e) || gt(e) || rr(e, t);
3677
- function Nl(e, t, n) {
3676
+ var Dl = (e, t) => ft(e) || ve(e) || ht(e) || gt(e) || ir(e, t);
3677
+ function Ol(e, t, n) {
3678
3678
  const s = n.get(e);
3679
3679
  s ? s.push(t) : n.set(e, [t]);
3680
3680
  }
3681
- function Ll(e, t) {
3681
+ function kl(e, t) {
3682
3682
  const n = {};
3683
3683
  let s;
3684
3684
  return e.forEach((r) => {
@@ -3687,20 +3687,20 @@ function Ll(e, t) {
3687
3687
  t || (r = r.map((o) => o.map(String)).sort((o, l) => o.length - l.length));
3688
3688
  const [a, ...i] = r;
3689
3689
  a.length === 0 ? s = i.map(un) : n[un(a)] = i.map(un);
3690
- }), s ? An(n) ? [s] : [s, n] : An(n) ? void 0 : n;
3690
+ }), s ? yn(n) ? [s] : [s, n] : yn(n) ? void 0 : n;
3691
3691
  }
3692
- var cr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
3693
- const o = pl(e);
3692
+ var dr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
3693
+ const o = Sl(e);
3694
3694
  if (!o) {
3695
- Nl(e, r, t);
3695
+ Ol(e, r, t);
3696
3696
  const E = i.get(e);
3697
3697
  if (E)
3698
3698
  return s ? {
3699
3699
  transformedValue: null
3700
3700
  } : E;
3701
3701
  }
3702
- if (!Cl(e, n)) {
3703
- const E = ns(e, n), A = E ? {
3702
+ if (!Dl(e, n)) {
3703
+ const E = rs(e, n), A = E ? {
3704
3704
  transformedValue: E.value,
3705
3705
  annotations: [E.type]
3706
3706
  } : {
@@ -3712,16 +3712,16 @@ var cr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
3712
3712
  return {
3713
3713
  transformedValue: null
3714
3714
  };
3715
- const l = ns(e, n), d = (l == null ? void 0 : l.value) ?? e, f = ve(d) ? [] : {}, u = {};
3715
+ const l = rs(e, n), d = (l == null ? void 0 : l.value) ?? e, f = ve(d) ? [] : {}, u = {};
3716
3716
  tt(d, (E, A) => {
3717
3717
  if (A === "__proto__" || A === "constructor" || A === "prototype")
3718
3718
  throw new Error(`Detected property ${A}. This is a prototype pollution risk, please remove it from your object.`);
3719
- const y = cr(E, t, n, s, [...r, A], [...a, e], i);
3719
+ const y = dr(E, t, n, s, [...r, A], [...a, e], i);
3720
3720
  f[A] = y.transformedValue, ve(y.annotations) ? u[A] = y.annotations : ft(y.annotations) && tt(y.annotations, (T, p) => {
3721
- u[er(A) + "." + p] = T;
3721
+ u[nr(A) + "." + p] = T;
3722
3722
  });
3723
3723
  });
3724
- const h = An(u) ? {
3724
+ const h = yn(u) ? {
3725
3725
  transformedValue: f,
3726
3726
  annotations: l ? [l.type] : void 0
3727
3727
  } : {
@@ -3730,19 +3730,19 @@ var cr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
3730
3730
  };
3731
3731
  return o || i.set(e, h), h;
3732
3732
  };
3733
- function ur(e) {
3733
+ function fr(e) {
3734
3734
  return Object.prototype.toString.call(e).slice(8, -1);
3735
3735
  }
3736
- function ss(e) {
3737
- return ur(e) === "Array";
3736
+ function as(e) {
3737
+ return fr(e) === "Array";
3738
3738
  }
3739
- function Gl(e) {
3740
- if (ur(e) !== "Object")
3739
+ function xl(e) {
3740
+ if (fr(e) !== "Object")
3741
3741
  return !1;
3742
3742
  const t = Object.getPrototypeOf(e);
3743
3743
  return !!t && t.constructor === Object && t === Object.prototype;
3744
3744
  }
3745
- function Dl(e, t, n, s, r) {
3745
+ function Rl(e, t, n, s, r) {
3746
3746
  const a = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
3747
3747
  a === "enumerable" && (e[t] = n), r && a === "nonenumerable" && Object.defineProperty(e, t, {
3748
3748
  value: n,
@@ -3751,17 +3751,17 @@ function Dl(e, t, n, s, r) {
3751
3751
  configurable: !0
3752
3752
  });
3753
3753
  }
3754
- function Sn(e, t = {}) {
3755
- if (ss(e))
3756
- return e.map((r) => Sn(r, t));
3757
- if (!Gl(e))
3754
+ function _n(e, t = {}) {
3755
+ if (as(e))
3756
+ return e.map((r) => _n(r, t));
3757
+ if (!xl(e))
3758
3758
  return e;
3759
3759
  const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
3760
3760
  return [...n, ...s].reduce((r, a) => {
3761
- if (ss(t.props) && !t.props.includes(a))
3761
+ if (as(t.props) && !t.props.includes(a))
3762
3762
  return r;
3763
- const i = e[a], o = Sn(i, t);
3764
- return Dl(r, a, o, e, t.nonenumerable), r;
3763
+ const i = e[a], o = _n(i, t);
3764
+ return Rl(r, a, o, e, t.nonenumerable), r;
3765
3765
  }, {});
3766
3766
  }
3767
3767
  var x = class {
@@ -3769,17 +3769,17 @@ var x = class {
3769
3769
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
3770
3770
  */
3771
3771
  constructor({ dedupe: e = !1 } = {}) {
3772
- this.classRegistry = new al(), this.symbolRegistry = new Js((t) => t.description ?? ""), this.customTransformerRegistry = new ll(), this.allowedErrorProps = [], this.dedupe = e;
3772
+ this.classRegistry = new cl(), this.symbolRegistry = new Zs((t) => t.description ?? ""), this.customTransformerRegistry = new fl(), this.allowedErrorProps = [], this.dedupe = e;
3773
3773
  }
3774
3774
  serialize(e) {
3775
- const t = /* @__PURE__ */ new Map(), n = cr(e, t, this, this.dedupe), s = {
3775
+ const t = /* @__PURE__ */ new Map(), n = dr(e, t, this, this.dedupe), s = {
3776
3776
  json: n.transformedValue
3777
3777
  };
3778
3778
  n.annotations && (s.meta = {
3779
3779
  ...s.meta,
3780
3780
  values: n.annotations
3781
3781
  });
3782
- const r = Ll(t, this.dedupe);
3782
+ const r = kl(t, this.dedupe);
3783
3783
  return r && (s.meta = {
3784
3784
  ...s.meta,
3785
3785
  referentialEqualities: r
@@ -3787,8 +3787,8 @@ var x = class {
3787
3787
  }
3788
3788
  deserialize(e) {
3789
3789
  const { json: t, meta: n } = e;
3790
- let s = Sn(t);
3791
- return n != null && n.values && (s = bl(s, n.values, this)), n != null && n.referentialEqualities && (s = Il(s, n.referentialEqualities)), s;
3790
+ let s = _n(t);
3791
+ return n != null && n.values && (s = Ll(s, n.values, this)), n != null && n.referentialEqualities && (s = Gl(s, n.referentialEqualities)), s;
3792
3792
  }
3793
3793
  stringify(e) {
3794
3794
  return JSON.stringify(this.serialize(e));
@@ -3821,44 +3821,44 @@ x.registerClass = x.defaultInstance.registerClass.bind(x.defaultInstance);
3821
3821
  x.registerSymbol = x.defaultInstance.registerSymbol.bind(x.defaultInstance);
3822
3822
  x.registerCustom = x.defaultInstance.registerCustom.bind(x.defaultInstance);
3823
3823
  x.allowErrorProps = x.defaultInstance.allowErrorProps.bind(x.defaultInstance);
3824
- var Ol = x.serialize, Xc = x.stringify;
3825
- function Zc(e) {
3824
+ var Ul = x.serialize, au = x.stringify;
3825
+ function iu(e) {
3826
3826
  return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
3827
3827
  }
3828
- function eu(e, t) {
3828
+ function ou(e, t) {
3829
3829
  return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
3830
3830
  }
3831
- function tu({
3831
+ function lu({
3832
3832
  queryState: e,
3833
3833
  observerCount: t,
3834
3834
  isStale: n
3835
3835
  }) {
3836
3836
  return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
3837
3837
  }
3838
- function nu({
3838
+ function cu({
3839
3839
  status: e,
3840
3840
  isPaused: t
3841
3841
  }) {
3842
3842
  return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
3843
3843
  }
3844
- function su(e) {
3844
+ function uu(e) {
3845
3845
  return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
3846
3846
  }
3847
- var ru = (e, t = !1) => {
3847
+ var du = (e, t = !1) => {
3848
3848
  const {
3849
3849
  json: n
3850
- } = Ol(e);
3850
+ } = Ul(e);
3851
3851
  return JSON.stringify(n, null, t ? 2 : void 0);
3852
- }, Dt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, kl = (e, t) => e.queryHash.localeCompare(t.queryHash), dr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, xl = (e, t) => Dt(e) === Dt(t) ? dr(e, t) : Dt(e) > Dt(t) ? 1 : -1, au = {
3853
- status: xl,
3854
- "query hash": kl,
3855
- "last updated": dr
3856
- }, Ot = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, fr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Rl = (e, t) => Ot(e) === Ot(t) ? fr(e, t) : Ot(e) > Ot(t) ? 1 : -1, iu = {
3857
- status: Rl,
3858
- "last updated": fr
3859
- }, ou = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), lu = () => {
3852
+ }, Dt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, Bl = (e, t) => e.queryHash.localeCompare(t.queryHash), hr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, Ml = (e, t) => Dt(e) === Dt(t) ? hr(e, t) : Dt(e) > Dt(t) ? 1 : -1, fu = {
3853
+ status: Ml,
3854
+ "query hash": Bl,
3855
+ "last updated": hr
3856
+ }, Ot = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, gr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Fl = (e, t) => Ot(e) === Ot(t) ? gr(e, t) : Ot(e) > Ot(t) ? 1 : -1, hu = {
3857
+ status: Fl,
3858
+ "last updated": gr
3859
+ }, gu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Eu = () => {
3860
3860
  const [e, t] = F("dark");
3861
- return To(() => {
3861
+ return wo(() => {
3862
3862
  const n = window.matchMedia("(prefers-color-scheme: dark)");
3863
3863
  t(n.matches ? "dark" : "light");
3864
3864
  const s = (r) => {
@@ -3926,11 +3926,11 @@ var ru = (e, t = !1) => {
3926
3926
  return n[s] = xt(n[s], r), n;
3927
3927
  }
3928
3928
  return e;
3929
- }, hr = (e, t) => {
3929
+ }, Er = (e, t) => {
3930
3930
  if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
3931
3931
  const s = document.createElement("style"), r = document.createTextNode("");
3932
3932
  s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
3933
- }, Fe, Et, mt, pt, Le, At, qe, Ke, He, Ve, $e, yt, Qe, Tt, os, Ul = (os = class {
3933
+ }, Fe, Et, mt, pt, Le, At, qe, Ke, He, Ve, Qe, yt, $e, Tt, cs, ql = (cs = class {
3934
3934
  constructor(e) {
3935
3935
  D(this, Fe);
3936
3936
  D(this, Et);
@@ -3942,9 +3942,9 @@ var ru = (e, t = !1) => {
3942
3942
  D(this, Ke);
3943
3943
  D(this, He);
3944
3944
  D(this, Ve);
3945
- D(this, $e);
3946
- D(this, yt);
3947
3945
  D(this, Qe);
3946
+ D(this, yt);
3947
+ D(this, $e);
3948
3948
  D(this, Tt);
3949
3949
  const {
3950
3950
  client: t,
@@ -3959,7 +3959,7 @@ var ru = (e, t = !1) => {
3959
3959
  shadowDOMTarget: f,
3960
3960
  hideDisabledQueries: u
3961
3961
  } = e;
3962
- N(this, Fe, F(t)), N(this, mt, n), N(this, pt, s), N(this, Et, r), N(this, At, d), N(this, qe, f), N(this, Ke, F(a)), N(this, He, F(i)), N(this, Ve, F(o)), N(this, $e, F(l)), N(this, yt, F(u));
3962
+ N(this, Fe, F(t)), N(this, mt, n), N(this, pt, s), N(this, Et, r), N(this, At, d), N(this, qe, f), N(this, Ke, F(a)), N(this, He, F(i)), N(this, Ve, F(o)), N(this, Qe, F(l)), N(this, yt, F(u));
3963
3963
  }
3964
3964
  setButtonPosition(e) {
3965
3965
  _(this, Ke)[1](e);
@@ -3971,7 +3971,7 @@ var ru = (e, t = !1) => {
3971
3971
  _(this, Ve)[1](e);
3972
3972
  }
3973
3973
  setErrorTypes(e) {
3974
- _(this, $e)[1](e);
3974
+ _(this, Qe)[1](e);
3975
3975
  }
3976
3976
  setClient(e) {
3977
3977
  _(this, Fe)[1](e);
@@ -3979,10 +3979,10 @@ var ru = (e, t = !1) => {
3979
3979
  mount(e) {
3980
3980
  if (_(this, Le))
3981
3981
  throw new Error("Devtools is already mounted");
3982
- const t = Ws(() => {
3983
- const n = this, [s] = _(this, Ke), [r] = _(this, He), [a] = _(this, Ve), [i] = _(this, $e), [o] = _(this, yt), [l] = _(this, Fe);
3982
+ const t = Ys(() => {
3983
+ const n = this, [s] = _(this, Ke), [r] = _(this, He), [a] = _(this, Ve), [i] = _(this, Qe), [o] = _(this, yt), [l] = _(this, Fe);
3984
3984
  let d;
3985
- return _(this, Qe) ? d = _(this, Qe) : (d = Qs(() => import("./NCMVHL6D-D7HU3akD.js")), N(this, Qe, d)), hr(_(this, At), _(this, qe)), Vs(d, $s({
3985
+ return _(this, $e) ? d = _(this, $e) : (d = Ws(() => import("./NCMVHL6D-DVB60g_2.js")), N(this, $e, d)), Er(_(this, At), _(this, qe)), $s(d, js({
3986
3986
  get queryFlavor() {
3987
3987
  return _(n, mt);
3988
3988
  },
@@ -4024,7 +4024,7 @@ var ru = (e, t = !1) => {
4024
4024
  throw new Error("Devtools is not mounted");
4025
4025
  (e = _(this, Tt)) == null || e.call(this), N(this, Le, !1);
4026
4026
  }
4027
- }, Fe = new WeakMap(), Et = new WeakMap(), mt = new WeakMap(), pt = new WeakMap(), Le = new WeakMap(), At = new WeakMap(), qe = new WeakMap(), Ke = new WeakMap(), He = new WeakMap(), Ve = new WeakMap(), $e = new WeakMap(), yt = new WeakMap(), Qe = new WeakMap(), Tt = new WeakMap(), os), je, St, _t, Pt, Ge, wt, We, ze, Ye, Je, Xe, vt, Ze, et, bt, ls, Bl = (ls = class {
4027
+ }, Fe = new WeakMap(), Et = new WeakMap(), mt = new WeakMap(), pt = new WeakMap(), Le = new WeakMap(), At = new WeakMap(), qe = new WeakMap(), Ke = new WeakMap(), He = new WeakMap(), Ve = new WeakMap(), Qe = new WeakMap(), yt = new WeakMap(), $e = new WeakMap(), Tt = new WeakMap(), cs), je, St, _t, Pt, Ge, wt, We, ze, Ye, Je, Xe, vt, Ze, et, bt, us, Kl = (us = class {
4028
4028
  constructor(e) {
4029
4029
  D(this, je);
4030
4030
  D(this, St);
@@ -4078,10 +4078,10 @@ var ru = (e, t = !1) => {
4078
4078
  mount(e) {
4079
4079
  if (_(this, Ge))
4080
4080
  throw new Error("Devtools is already mounted");
4081
- const t = Ws(() => {
4081
+ const t = Ys(() => {
4082
4082
  const n = this, [s] = _(this, ze), [r] = _(this, Ye), [a] = _(this, Je), [i] = _(this, Xe), [o] = _(this, vt), [l] = _(this, je), [d] = _(this, Ze);
4083
4083
  let f;
4084
- return _(this, et) ? f = _(this, et) : (f = Qs(() => import("./2AITGKQY-DhC0sF1x.js")), N(this, et, f)), hr(_(this, wt), _(this, We)), Vs(f, $s({
4084
+ return _(this, et) ? f = _(this, et) : (f = Ws(() => import("./2AITGKQY-DYwNjBFe.js")), N(this, et, f)), Er(_(this, wt), _(this, We)), $s(f, js({
4085
4085
  get queryFlavor() {
4086
4086
  return _(n, _t);
4087
4087
  },
@@ -4126,8 +4126,8 @@ var ru = (e, t = !1) => {
4126
4126
  throw new Error("Devtools is not mounted");
4127
4127
  (e = _(this, bt)) == null || e.call(this), N(this, Ge, !1);
4128
4128
  }
4129
- }, je = new WeakMap(), St = new WeakMap(), _t = new WeakMap(), Pt = new WeakMap(), Ge = new WeakMap(), wt = new WeakMap(), We = new WeakMap(), ze = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Xe = new WeakMap(), vt = new WeakMap(), Ze = new WeakMap(), et = new WeakMap(), bt = new WeakMap(), ls);
4130
- function Ml(e) {
4129
+ }, je = new WeakMap(), St = new WeakMap(), _t = new WeakMap(), Pt = new WeakMap(), Ge = new WeakMap(), wt = new WeakMap(), We = new WeakMap(), ze = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Xe = new WeakMap(), vt = new WeakMap(), Ze = new WeakMap(), et = new WeakMap(), bt = new WeakMap(), us);
4130
+ function Hl(e) {
4131
4131
  const t = z(e.client), n = W.useRef(null), {
4132
4132
  buttonPosition: s,
4133
4133
  position: r,
@@ -4137,11 +4137,11 @@ function Ml(e) {
4137
4137
  shadowDOMTarget: l,
4138
4138
  hideDisabledQueries: d
4139
4139
  } = e, [f] = W.useState(
4140
- new Ul({
4140
+ new ql({
4141
4141
  client: t,
4142
4142
  queryFlavor: "React Query",
4143
4143
  version: "5",
4144
- onlineManager: fs,
4144
+ onlineManager: gs,
4145
4145
  buttonPosition: s,
4146
4146
  position: r,
4147
4147
  initialIsOpen: a,
@@ -4165,13 +4165,13 @@ function Ml(e) {
4165
4165
  f.unmount();
4166
4166
  }), [f]), /* @__PURE__ */ c("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
4167
4167
  }
4168
- function Fl(e) {
4168
+ function Vl(e) {
4169
4169
  const t = z(e.client), n = W.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: a, hideDisabledQueries: i } = e, [o] = W.useState(
4170
- new Bl({
4170
+ new Kl({
4171
4171
  client: t,
4172
4172
  queryFlavor: "React Query",
4173
4173
  version: "5",
4174
- onlineManager: fs,
4174
+ onlineManager: gs,
4175
4175
  buttonPosition: "bottom-left",
4176
4176
  position: "bottom",
4177
4177
  initialIsOpen: !0,
@@ -4200,24 +4200,24 @@ function Fl(e) {
4200
4200
  }
4201
4201
  );
4202
4202
  }
4203
- var rs = process.env.NODE_ENV !== "development" ? function() {
4203
+ var is = process.env.NODE_ENV !== "development" ? function() {
4204
4204
  return null;
4205
- } : Ml;
4205
+ } : Hl;
4206
4206
  process.env.NODE_ENV;
4207
- const ql = pe(""), Kl = () => {
4208
- Mn("dynamic-page-selector", {
4207
+ const Ql = pe(""), $l = () => {
4208
+ qn("dynamic-page-selector", {
4209
4209
  description: "Dynamic page selector"
4210
- }), Mn("enable-add-page-dropdown", {
4210
+ }), qn("enable-add-page-dropdown", {
4211
4211
  description: "Enable add page dropdown"
4212
4212
  });
4213
- }, Hl = () => {
4213
+ }, jl = () => {
4214
4214
  const e = G(), t = I();
4215
4215
  return ie({
4216
4216
  queryKey: [m.GET_COLLECTIONS],
4217
4217
  staleTime: 1 / 0,
4218
4218
  queryFn: async () => t(e, { action: m.GET_COLLECTIONS })
4219
4219
  });
4220
- }, Vl = () => {
4220
+ }, Wl = () => {
4221
4221
  const { data: e } = oe(), { data: t } = be(), { data: n } = Re(), s = G(), r = I(), a = j(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]);
4222
4222
  return X({
4223
4223
  mutationFn: async ({ block: i }) => r(s, {
@@ -4241,62 +4241,62 @@ const ql = pe(""), Kl = () => {
4241
4241
  }
4242
4242
  })
4243
4243
  });
4244
- }, $l = () => {
4244
+ }, zl = () => {
4245
4245
  const [, e] = le();
4246
- return $(
4246
+ return Q(
4247
4247
  (t, n) => {
4248
4248
  const r = new URLSearchParams(window.location.search).get("lang"), a = new URLSearchParams({ page: t });
4249
4249
  r && a.set("lang", r), window.history.pushState({}, "", `?${a.toString()}`), e(a), window.dispatchEvent(new PopStateEvent("popstate")), n == null || n();
4250
4250
  },
4251
4251
  [e]
4252
4252
  );
4253
- }, Ql = () => {
4254
- const e = $l();
4255
- return $(
4253
+ }, Yl = () => {
4254
+ const e = zl();
4255
+ return Q(
4256
4256
  ({ pageId: t }) => {
4257
4257
  e(t);
4258
4258
  },
4259
4259
  [e]
4260
4260
  );
4261
- }, jl = K(() => import("./digital-asset-manager-B2m5T22s.js")), Wl = K(() => import("./save-to-lib-DGtyTG6H.js")), zl = K(() => import("./theme-panel-footer-RrxiDGoD.js")), Yl = K(() => import("./web-preview-DNgPjdgZ.js"));
4262
- Kl();
4263
- $a();
4264
- Vr(Wi);
4265
- go();
4266
- $r(jl);
4267
- Qr(Wl);
4268
- const Jl = {
4261
+ }, Jl = K(() => import("./digital-asset-manager-KakxBkBC.js")), Xl = K(() => import("./save-to-lib-DSPvtFSd.js")), Zl = K(() => import("./theme-panel-footer-BzEy5bsg.js")), ec = K(() => import("./web-preview-BEyjKFDL.js"));
4262
+ $l();
4263
+ za();
4264
+ Wr(Xi);
4265
+ Ao();
4266
+ zr(Jl);
4267
+ Yr(Xl);
4268
+ const tc = {
4269
4269
  role: "",
4270
4270
  permissions: null
4271
- }, as = (e) => {
4272
- to(), oi();
4273
- const t = Gn(), { data: n = Jl, isFetching: s } = no(), { data: r, isFetching: a } = Ce(), { data: i, isFetching: o } = Hl(), { data: l, isFetching: d } = Re(), f = s || a || o || d, [u] = le(), h = u.get("page"), { data: E } = oe(), { data: A, isFetching: y } = Xi(), { blocks: T } = Ji(A), { lockingStatus: p, pageLock: S } = Ie(), { data: C, isFetching: U } = Zi(), M = zi(), { onSave: L } = so(), { mutateAsync: Ae } = Vl(), { getPartialBlocks: ye, getPartialBlockBlocks: O } = ro(), { mutateAsync: w } = Pi(), { mutateAsync: v } = eo(), Y = Ql(), [Q, ce] = q(!1), st = it([]), Pe = j(() => H(l, "theme", {}) || {}, [l]), rt = ge(p) && (S == null ? void 0 : S.status) === "editing", Ne = (S == null ? void 0 : S.status) === "checking", kn = y || Ne || U;
4271
+ }, os = (e) => {
4272
+ ao(), di();
4273
+ const t = Dn(), { data: n = tc, isFetching: s } = io(), { data: r, isFetching: a } = Ce(), { data: i, isFetching: o } = jl(), { data: l, isFetching: d } = Re(), f = s || a || o || d, [u] = le(), h = u.get("page"), { data: E } = oe(), { data: A, isFetching: y } = no(), { blocks: T } = to(A), { lockingStatus: p, pageLock: S } = Ie(), { data: C, isFetching: U } = so(), M = Zi(), { onSave: L } = oo(), { mutateAsync: Ae } = Wl(), { getPartialBlocks: ye, getPartialBlockBlocks: O } = lo(), { mutateAsync: w } = Ii(), { mutateAsync: v } = ro(), Y = Yl(), [$, ce] = q(!1), st = it([]), Pe = j(() => H(l, "theme", {}) || {}, [l]), rt = ge(p) && (S == null ? void 0 : S.status) === "editing", Ne = (S == null ? void 0 : S.status) === "checking", xn = y || Ne || U;
4274
4274
  st.current = T;
4275
- const [gr] = ne(ql);
4275
+ const [mr] = ne(Ql);
4276
4276
  se(() => {
4277
4277
  const ue = () => {
4278
4278
  document.hidden ? ce(!0) : ce(!1);
4279
4279
  };
4280
4280
  return window.addEventListener("visibilitychange", ue), () => window.removeEventListener("visibilitychange", ue);
4281
4281
  }, []);
4282
- const Er = j(() => {
4282
+ const pr = j(() => {
4283
4283
  const ue = {};
4284
4284
  return n && (ue.permissions = H(n, "permissions", null), ue.role = H(n, "role", "user")), ue;
4285
- }, [n]), mr = $(
4285
+ }, [n]), Ar = Q(
4286
4286
  async (ue, Ct) => await w({ pageType: ue, query: Ct }),
4287
4287
  [w]
4288
4288
  );
4289
4289
  return /* @__PURE__ */ g(Ee, { children: [
4290
- kn && /* @__PURE__ */ c(Is, { className: f ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ c(Ft, { className: `animate-spin text-primary ${f ? "h-6 w-6" : "h-5 w-5"}` }) }),
4291
- gr && /* @__PURE__ */ c(
4290
+ xn && /* @__PURE__ */ c(Ns, { className: f ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ c(Ft, { className: `animate-spin text-primary ${f ? "h-6 w-6" : "h-5 w-5"}` }) }),
4291
+ mr && /* @__PURE__ */ c(
4292
4292
  V,
4293
4293
  {
4294
4294
  fallback: /* @__PURE__ */ c("div", { className: "absolute inset-0 z-[999999] flex min-h-screen w-screen items-center justify-center bg-gray-100", children: /* @__PURE__ */ c(Ft, { className: "h-6 w-6 animate-spin text-primary" }) }),
4295
- children: /* @__PURE__ */ c(Yl, {})
4295
+ children: /* @__PURE__ */ c(ec, {})
4296
4296
  }
4297
4297
  ),
4298
4298
  /* @__PURE__ */ c(
4299
- jr,
4299
+ Jr,
4300
4300
  {
4301
4301
  gotoPage: Y,
4302
4302
  collections: i ?? [],
@@ -4311,32 +4311,32 @@ const Jl = {
4311
4311
  translations: e.translations || {},
4312
4312
  locale: e.locale || "en",
4313
4313
  htmlDir: e.htmlDir || "ltr",
4314
- autoSave: !Q && rt && (e.autoSave ?? !0),
4314
+ autoSave: !$ && rt && (e.autoSave ?? !0),
4315
4315
  autoSaveInterval: e.autoSaveInterval ?? 15,
4316
4316
  onError: e.onError || console.error,
4317
4317
  getPartialBlockBlocks: O,
4318
4318
  getPartialBlocks: ye,
4319
4319
  blocks: y ? [] : T,
4320
- theme: Or(Pe),
4320
+ theme: xr(Pe),
4321
4321
  pageTypes: r,
4322
- searchPageTypeItems: mr,
4322
+ searchPageTypeItems: Ar,
4323
4323
  askAiCallBack: M,
4324
- onSave: async ({ blocks: ue, theme: Ct, needTranslations: pr }) => {
4324
+ onSave: async ({ blocks: ue, theme: Ct, needTranslations: yr }) => {
4325
4325
  if (!h) return !0;
4326
4326
  st.current = ue;
4327
- const xn = [...ue];
4328
- return await L({ page: h, blocks: xn, needTranslations: pr }), st.current = xn, kr(Ct, Pe) || await v({ settings: { theme: Ct } }), !0;
4327
+ const Rn = [...ue];
4328
+ return await L({ page: h, blocks: Rn, needTranslations: yr }), st.current = Rn, Rr(Ct, Pe) || await v({ settings: { theme: Ct } }), !0;
4329
4329
  },
4330
- themePanelComponent: zl,
4331
- ...Er
4330
+ themePanelComponent: Zl,
4331
+ ...pr
4332
4332
  }
4333
4333
  ),
4334
4334
  /* @__PURE__ */ g("div", { children: [
4335
- /* @__PURE__ */ c(di, { isFetchingPage: kn }),
4336
- /* @__PURE__ */ c(fi, {})
4335
+ /* @__PURE__ */ c(Ei, { isFetchingPage: xn }),
4336
+ /* @__PURE__ */ c(mi, {})
4337
4337
  ] })
4338
4338
  ] });
4339
- }, Xl = new Rr({
4339
+ }, nc = new Fr({
4340
4340
  defaultOptions: {
4341
4341
  queries: {
4342
4342
  refetchOnWindowFocus: !1,
@@ -4344,10 +4344,10 @@ const Jl = {
4344
4344
  refetchOnMount: !1
4345
4345
  }
4346
4346
  }
4347
- }), cu = (e) => {
4348
- const [, t] = bn(), [n, s] = q(!1);
4347
+ }), mu = (e) => {
4348
+ const [, t] = In(), [n, s] = q(!1);
4349
4349
  return se(() => (t(
4350
- _n(e, [
4350
+ Pn(e, [
4351
4351
  "apiUrl",
4352
4352
  "usersApiUrl",
4353
4353
  "assetsApiUrl",
@@ -4366,18 +4366,18 @@ const Jl = {
4366
4366
  }, 200), () => {
4367
4367
  s(!1), t({});
4368
4368
  }), [e, t]), n ? H(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ g(Ee, { children: [
4369
- /* @__PURE__ */ c(as, { ...e }),
4370
- /* @__PURE__ */ c(rs, {})
4371
- ] }) : /* @__PURE__ */ g(Ur, { client: Xl, children: [
4372
- /* @__PURE__ */ c(as, { ...e }),
4373
- /* @__PURE__ */ c(rs, {})
4369
+ /* @__PURE__ */ c(os, { ...e }),
4370
+ /* @__PURE__ */ c(is, {})
4371
+ ] }) : /* @__PURE__ */ g(qr, { client: nc, children: [
4372
+ /* @__PURE__ */ c(os, { ...e }),
4373
+ /* @__PURE__ */ c(is, {})
4374
4374
  ] }) : /* @__PURE__ */ c("div", {});
4375
- }, Zl = W.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
4376
- function ec({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4375
+ }, sc = W.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
4376
+ function rc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4377
4377
  const [r, a] = W.useState(!1);
4378
- return /* @__PURE__ */ g(da, { open: r, onOpenChange: a, children: [
4378
+ return /* @__PURE__ */ g(Ea, { open: r, onOpenChange: a, children: [
4379
4379
  /* @__PURE__ */ g(Wt, { children: [
4380
- /* @__PURE__ */ c(zt, { asChild: !0, children: /* @__PURE__ */ c(fa, { asChild: !0, children: /* @__PURE__ */ c(
4380
+ /* @__PURE__ */ c(zt, { asChild: !0, children: /* @__PURE__ */ c(ma, { asChild: !0, children: /* @__PURE__ */ c(
4381
4381
  B,
4382
4382
  {
4383
4383
  size: "sm",
@@ -4401,7 +4401,7 @@ function ec({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4401
4401
  /* @__PURE__ */ c(Yt, { children: "Add field" })
4402
4402
  ] }),
4403
4403
  r && /* @__PURE__ */ c(W.Suspense, { children: /* @__PURE__ */ c(
4404
- Zl,
4404
+ sc,
4405
4405
  {
4406
4406
  data: e,
4407
4407
  onSelect: t,
@@ -4412,17 +4412,17 @@ function ec({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4412
4412
  ) })
4413
4413
  ] });
4414
4414
  }
4415
- const uu = () => {
4415
+ const pu = () => {
4416
4416
  const { savePageAsync: e } = ke(), t = z();
4417
- return $(async () => {
4417
+ return Q(async () => {
4418
4418
  await e(), t.invalidateQueries({ queryKey: [m.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [m.GET_BUILDER_PAGE_DATA] });
4419
4419
  }, [e, t]);
4420
- }, du = () => {
4420
+ }, Au = () => {
4421
4421
  const e = z();
4422
- return $(() => {
4422
+ return Q(() => {
4423
4423
  e.clear();
4424
4424
  }, [e]);
4425
- }, fu = () => {
4425
+ }, yu = () => {
4426
4426
  const e = G(), t = I(), { data: n } = be(), s = z();
4427
4427
  return X({
4428
4428
  mutationFn: async (r) => {
@@ -4447,7 +4447,7 @@ const uu = () => {
4447
4447
  console.error("Failed to update metadata");
4448
4448
  }
4449
4449
  });
4450
- }, tc = K(() => import("./digital-asset-manager-B2m5T22s.js")), hu = ({
4450
+ }, ac = K(() => import("./digital-asset-manager-KakxBkBC.js")), Tu = ({
4451
4451
  assetId: e,
4452
4452
  assetUrl: t,
4453
4453
  onChange: n,
@@ -4461,7 +4461,7 @@ const uu = () => {
4461
4461
  o(!1);
4462
4462
  }, f = (E) => {
4463
4463
  const A = Array.isArray(E) ? E[0] : E;
4464
- A != null && A.url && n(_n(A, ["url", "id"])), o(!1);
4464
+ A != null && A.url && n(Pn(A, ["url", "id"])), o(!1);
4465
4465
  }, u = () => {
4466
4466
  n({ url: "", id: "" });
4467
4467
  }, h = (t == null ? void 0 : t.startsWith("{{")) && (t == null ? void 0 : t.endsWith("}}"));
@@ -4486,7 +4486,7 @@ const uu = () => {
4486
4486
  className: "h-8 w-8 rounded-full bg-white text-red-500",
4487
4487
  onClick: u,
4488
4488
  disabled: a,
4489
- children: h ? /* @__PURE__ */ c(Qn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Ua, { className: "h-4 w-4" })
4489
+ children: h ? /* @__PURE__ */ c(Wn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(qa, { className: "h-4 w-4" })
4490
4490
  }
4491
4491
  ),
4492
4492
  !h && /* @__PURE__ */ c(
@@ -4498,7 +4498,7 @@ const uu = () => {
4498
4498
  className: "h-8 w-8 rounded-full bg-white/80 hover:bg-white/90",
4499
4499
  onClick: l,
4500
4500
  disabled: a,
4501
- children: /* @__PURE__ */ c(jn, { className: "h-4 w-4" })
4501
+ children: /* @__PURE__ */ c(zn, { className: "h-4 w-4" })
4502
4502
  }
4503
4503
  )
4504
4504
  ] })
@@ -4508,14 +4508,14 @@ const uu = () => {
4508
4508
  className: `flex cursor-pointer items-center justify-center rounded-md border border-dashed p-6 ${a ? "cursor-not-allowed opacity-50" : "hover:border-gray-400"}`,
4509
4509
  onClick: l,
4510
4510
  children: /* @__PURE__ */ g("div", { className: "flex flex-col items-center gap-2", children: [
4511
- /* @__PURE__ */ c(jn, { className: "h-10 w-10 text-gray-400" }),
4511
+ /* @__PURE__ */ c(zn, { className: "h-10 w-10 text-gray-400" }),
4512
4512
  /* @__PURE__ */ c("p", { className: "text-sm text-gray-500", children: r })
4513
4513
  ] })
4514
4514
  }
4515
4515
  ),
4516
- /* @__PURE__ */ c(ps, { open: i, onOpenChange: o, children: /* @__PURE__ */ g(ha, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
4517
- /* @__PURE__ */ g(ga, { className: "hidden border-b px-4 py-2", children: [
4518
- /* @__PURE__ */ c(Ea, { children: "Select Image" }),
4516
+ /* @__PURE__ */ c(ys, { open: i, onOpenChange: o, children: /* @__PURE__ */ g(pa, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
4517
+ /* @__PURE__ */ g(Aa, { className: "hidden border-b px-4 py-2", children: [
4518
+ /* @__PURE__ */ c(ya, { children: "Select Image" }),
4519
4519
  /* @__PURE__ */ c(
4520
4520
  B,
4521
4521
  {
@@ -4524,12 +4524,12 @@ const uu = () => {
4524
4524
  size: "icon",
4525
4525
  className: "absolute right-4 top-2",
4526
4526
  onClick: d,
4527
- children: /* @__PURE__ */ c(Qn, { className: "h-4 w-4" })
4527
+ children: /* @__PURE__ */ c(Wn, { className: "h-4 w-4" })
4528
4528
  }
4529
4529
  )
4530
4530
  ] }),
4531
4531
  /* @__PURE__ */ c("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
4532
- tc,
4532
+ ac,
4533
4533
  {
4534
4534
  close: d,
4535
4535
  onSelect: f,
@@ -4539,7 +4539,91 @@ const uu = () => {
4539
4539
  ) }) })
4540
4540
  ] }) })
4541
4541
  ] });
4542
- }, nc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), is = (e) => {
4542
+ }, ic = Br(null), dn = {
4543
+ didCatch: !1,
4544
+ error: null
4545
+ };
4546
+ class oc extends Mr {
4547
+ constructor(t) {
4548
+ super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = dn;
4549
+ }
4550
+ static getDerivedStateFromError(t) {
4551
+ return {
4552
+ didCatch: !0,
4553
+ error: t
4554
+ };
4555
+ }
4556
+ resetErrorBoundary() {
4557
+ const {
4558
+ error: t
4559
+ } = this.state;
4560
+ if (t !== null) {
4561
+ for (var n, s, r = arguments.length, a = new Array(r), i = 0; i < r; i++)
4562
+ a[i] = arguments[i];
4563
+ (n = (s = this.props).onReset) === null || n === void 0 || n.call(s, {
4564
+ args: a,
4565
+ reason: "imperative-api"
4566
+ }), this.setState(dn);
4567
+ }
4568
+ }
4569
+ componentDidCatch(t, n) {
4570
+ var s, r;
4571
+ (s = (r = this.props).onError) === null || s === void 0 || s.call(r, t, n);
4572
+ }
4573
+ componentDidUpdate(t, n) {
4574
+ const {
4575
+ didCatch: s
4576
+ } = this.state, {
4577
+ resetKeys: r
4578
+ } = this.props;
4579
+ if (s && n.error !== null && lc(t.resetKeys, r)) {
4580
+ var a, i;
4581
+ (a = (i = this.props).onReset) === null || a === void 0 || a.call(i, {
4582
+ next: r,
4583
+ prev: t.resetKeys,
4584
+ reason: "keys"
4585
+ }), this.setState(dn);
4586
+ }
4587
+ }
4588
+ render() {
4589
+ const {
4590
+ children: t,
4591
+ fallbackRender: n,
4592
+ FallbackComponent: s,
4593
+ fallback: r
4594
+ } = this.props, {
4595
+ didCatch: a,
4596
+ error: i
4597
+ } = this.state;
4598
+ let o = t;
4599
+ if (a) {
4600
+ const l = {
4601
+ error: i,
4602
+ resetErrorBoundary: this.resetErrorBoundary
4603
+ };
4604
+ if (typeof n == "function")
4605
+ o = n(l);
4606
+ else if (s)
4607
+ o = Fn(s, l);
4608
+ else if (r !== void 0)
4609
+ o = r;
4610
+ else
4611
+ throw i;
4612
+ }
4613
+ return Fn(ic.Provider, {
4614
+ value: {
4615
+ didCatch: a,
4616
+ error: i,
4617
+ resetErrorBoundary: this.resetErrorBoundary
4618
+ }
4619
+ }, o);
4620
+ }
4621
+ }
4622
+ function lc() {
4623
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
4624
+ return e.length !== t.length || e.some((n, s) => !Object.is(n, t[s]));
4625
+ }
4626
+ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
4543
4627
  if (!e.trim())
4544
4628
  return { isValid: !1, parsed: null, placeholders: [], error: { message: "JSON is empty" } };
4545
4629
  try {
@@ -4574,13 +4658,13 @@ const uu = () => {
4574
4658
  }
4575
4659
  };
4576
4660
  }
4577
- }, sc = (e, t) => {
4661
+ }, uc = (e, t) => {
4578
4662
  let s = JSON.stringify(e, null, 2);
4579
4663
  return t.forEach(({ original: r }, a) => {
4580
- const i = `"__placeholder_${a}__"`, o = new RegExp(nc(i), "g");
4664
+ const i = `"__placeholder_${a}__"`, o = new RegExp(cc(i), "g");
4581
4665
  s = s.replace(o, r);
4582
4666
  }), s;
4583
- }, rc = (e, t) => {
4667
+ }, dc = (e, t) => {
4584
4668
  if (!e) return "";
4585
4669
  let n = JSON.stringify(e, null, 2);
4586
4670
  const s = /{{([^{}]+)}}/g;
@@ -4590,7 +4674,7 @@ const uu = () => {
4590
4674
  n = n.replace(r[0], i);
4591
4675
  }
4592
4676
  return n;
4593
- }, ac = K(() => import("./shared-json-ld-BMfQzOWc.js")), gu = ({
4677
+ }, fc = K(() => import("./shared-json-ld-DMYOwp6B.js")), Su = ({
4594
4678
  value: e,
4595
4679
  onChange: t,
4596
4680
  disabled: n = !1,
@@ -4603,7 +4687,7 @@ const uu = () => {
4603
4687
  hasJsonLdForSelectedLang: d,
4604
4688
  copyJsonLDFromDefaultPage: f
4605
4689
  }) => {
4606
- const [u, h] = q("edit"), [E, A] = q(null), [y, T] = q(""), p = it(null), [S] = bn(), C = i === "jsonLD" && H(S, "features.sharedJsonLD", !1), U = i === "jsonLD" && !d && !!f;
4690
+ const [u, h] = q("edit"), [E, A] = q(null), [y, T] = q(""), p = it(null), [S] = In(), C = i === "jsonLD" && H(S, "features.sharedJsonLD", !1), U = i === "jsonLD" && !d && !!f;
4607
4691
  se(() => {
4608
4692
  e.trim() === "" && t("{}");
4609
4693
  }, [e, t]);
@@ -4632,18 +4716,18 @@ const uu = () => {
4632
4716
  }, 0);
4633
4717
  }
4634
4718
  } else {
4635
- const Q = e.substring(0, v) + " " + e.substring(Y);
4636
- t(Q), setTimeout(() => {
4719
+ const $ = e.substring(0, v) + " " + e.substring(Y);
4720
+ t($), setTimeout(() => {
4637
4721
  w.selectionStart = w.selectionEnd = v + 2;
4638
4722
  }, 0);
4639
4723
  }
4640
4724
  }
4641
4725
  };
4642
4726
  se(() => {
4643
- const O = is(e);
4727
+ const O = ls(e);
4644
4728
  if (O.isValid)
4645
4729
  if (A(null), O.parsed) {
4646
- const w = rc(O.parsed, o);
4730
+ const w = dc(O.parsed, o);
4647
4731
  T(w);
4648
4732
  } else
4649
4733
  T("");
@@ -4651,19 +4735,19 @@ const uu = () => {
4651
4735
  A(O.error), T("");
4652
4736
  }, [e, o]);
4653
4737
  const Ae = () => {
4654
- const O = is(e);
4738
+ const O = ls(e);
4655
4739
  if (O.isValid && O.parsed) {
4656
- const w = sc(O.parsed, O.placeholders);
4740
+ const w = uc(O.parsed, O.placeholders);
4657
4741
  t(w);
4658
4742
  }
4659
4743
  }, ye = () => {
4660
4744
  E != null && E.position && p.current && (p.current.focus(), p.current.setSelectionRange(E.position, E.position + 1));
4661
4745
  };
4662
- return /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ g(ma, { value: u, onValueChange: h, className: "w-full", children: [
4746
+ return /* @__PURE__ */ c(oc, { fallback: /* @__PURE__ */ c("div", { children: "Some error" }), children: /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ g(Ta, { value: u, onValueChange: h, className: "w-full", children: [
4663
4747
  /* @__PURE__ */ g("div", { className: "mb-2 flex items-center justify-between", children: [
4664
- /* @__PURE__ */ g(pa, { className: "w-max", children: [
4748
+ /* @__PURE__ */ g(Sa, { className: "w-max", children: [
4665
4749
  /* @__PURE__ */ g(tn, { value: "edit", className: "flex items-center gap-1", children: [
4666
- /* @__PURE__ */ c(Ba, { className: "h-4 w-4" }),
4750
+ /* @__PURE__ */ c(Ka, { className: "h-4 w-4" }),
4667
4751
  /* @__PURE__ */ c("span", { children: "Edit" })
4668
4752
  ] }),
4669
4753
  /* @__PURE__ */ g(
@@ -4673,7 +4757,7 @@ const uu = () => {
4673
4757
  className: "flex items-center gap-1",
4674
4758
  disabled: !e.trim() || E !== null || U,
4675
4759
  children: [
4676
- /* @__PURE__ */ c(Ma, { className: "h-4 w-4" }),
4760
+ /* @__PURE__ */ c(Ha, { className: "h-4 w-4" }),
4677
4761
  /* @__PURE__ */ c("span", { children: "Preview" })
4678
4762
  ]
4679
4763
  }
@@ -4685,14 +4769,14 @@ const uu = () => {
4685
4769
  className: "flex items-center gap-1",
4686
4770
  disabled: !e.trim() || E !== null,
4687
4771
  children: [
4688
- /* @__PURE__ */ c(Fa, { className: "h-4 w-4" }),
4772
+ /* @__PURE__ */ c(Va, { className: "h-4 w-4" }),
4689
4773
  /* @__PURE__ */ c("span", { children: "Shared" })
4690
4774
  ]
4691
4775
  }
4692
4776
  )
4693
4777
  ] }),
4694
4778
  U ? null : u === "edit" && !s && /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ c(
4695
- ec,
4779
+ rc,
4696
4780
  {
4697
4781
  dataType: "value",
4698
4782
  data: o ?? {},
@@ -4701,7 +4785,7 @@ const uu = () => {
4701
4785
  ) })
4702
4786
  ] }),
4703
4787
  /* @__PURE__ */ g(nn, { value: "edit", className: "relative mt-0", children: [
4704
- !U && u === "edit" && /* @__PURE__ */ c(Dn, { content: "Format JSON", side: "right", showTooltip: !n && !E, children: /* @__PURE__ */ c(
4788
+ !U && u === "edit" && /* @__PURE__ */ c(On, { content: "Format JSON", side: "right", showTooltip: !n && !E, children: /* @__PURE__ */ c(
4705
4789
  B,
4706
4790
  {
4707
4791
  type: "button",
@@ -4710,17 +4794,17 @@ const uu = () => {
4710
4794
  onClick: Ae,
4711
4795
  className: "absolute right-1 top-1 h-6 w-6 p-1",
4712
4796
  disabled: !e.trim() || n || E !== null,
4713
- children: /* @__PURE__ */ c(qa, {})
4797
+ children: /* @__PURE__ */ c(Qa, {})
4714
4798
  }
4715
4799
  ) }),
4716
4800
  U ? /* @__PURE__ */ c("div", { className: "flex h-40 items-center justify-center rounded-md bg-black/20", children: /* @__PURE__ */ g("div", { className: "flex max-w-[400px] flex-col items-center gap-2 rounded-md bg-white p-4 shadow-lg", children: [
4717
4801
  /* @__PURE__ */ c("div", { className: "max-w-xl text-center text-xs text-gray-500", children: "JSON-LD for is not added for selected language. JSON LD will be used from default language." }),
4718
4802
  /* @__PURE__ */ g(B, { type: "button", variant: "default", size: "sm", onClick: f, children: [
4719
- /* @__PURE__ */ c(As, {}),
4803
+ /* @__PURE__ */ c(Ts, {}),
4720
4804
  "Copy & Edit from default language"
4721
4805
  ] })
4722
4806
  ] }) }) : /* @__PURE__ */ c(
4723
- Fn,
4807
+ Kn,
4724
4808
  {
4725
4809
  ref: p,
4726
4810
  id: i,
@@ -4735,9 +4819,9 @@ const uu = () => {
4735
4819
  readOnly: s
4736
4820
  }
4737
4821
  ),
4738
- E && /* @__PURE__ */ g(Aa, { variant: "destructive", className: "mt-2", children: [
4739
- /* @__PURE__ */ c(Ka, { className: "h-4 w-4" }),
4740
- /* @__PURE__ */ g(ya, { className: "flex flex-col", children: [
4822
+ E && /* @__PURE__ */ g(_a, { variant: "destructive", className: "mt-2", children: [
4823
+ /* @__PURE__ */ c($a, { className: "h-4 w-4" }),
4824
+ /* @__PURE__ */ g(Pa, { className: "flex flex-col", children: [
4741
4825
  /* @__PURE__ */ c("span", { className: "font-medium", children: "Invalid JSON" }),
4742
4826
  /* @__PURE__ */ c("span", { className: "text-sm", children: E.message }),
4743
4827
  E.line && E.column && /* @__PURE__ */ g("span", { className: "text-sm", children: [
@@ -4761,15 +4845,15 @@ const uu = () => {
4761
4845
  ] })
4762
4846
  ] }),
4763
4847
  /* @__PURE__ */ g(nn, { value: "preview", className: "mt-0", children: [
4764
- /* @__PURE__ */ c(Fn, { rows: a, value: y, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
4848
+ /* @__PURE__ */ c(Kn, { rows: a, value: y, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
4765
4849
  /* @__PURE__ */ c("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
4766
4850
  ] }),
4767
- C && /* @__PURE__ */ c(nn, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(ac, {}) }) })
4768
- ] }) });
4769
- }, ic = () => {
4851
+ C && /* @__PURE__ */ c(nn, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(fc, {}) }) })
4852
+ ] }) }) });
4853
+ }, hc = () => {
4770
4854
  const e = ae("getAccessToken");
4771
4855
  return {
4772
- getAccessToken: $(async () => {
4856
+ getAccessToken: Q(async () => {
4773
4857
  try {
4774
4858
  return await e();
4775
4859
  } catch {
@@ -4777,9 +4861,9 @@ const uu = () => {
4777
4861
  }
4778
4862
  }, [e])
4779
4863
  };
4780
- }, Eu = () => {
4781
- const { logout: e } = It(), { getAccessToken: t } = ic();
4782
- return $(
4864
+ }, _u = () => {
4865
+ const { logout: e } = It(), { getAccessToken: t } = hc();
4866
+ return Q(
4783
4867
  async ({
4784
4868
  url: n,
4785
4869
  method: s = "GET",
@@ -4816,117 +4900,118 @@ const uu = () => {
4816
4900
  if (typeof window > "u")
4817
4901
  throw new Error("@chaibuilder/pages is not available on the server");
4818
4902
  export {
4819
- ru as $,
4903
+ du as $,
4820
4904
  m as A,
4821
- Is as B,
4905
+ Ns as B,
4822
4906
  Z as C,
4823
- $s as D,
4824
- Go as E,
4825
- Mc as F,
4826
- Fc as G,
4907
+ js as D,
4908
+ xo as E,
4909
+ $c as F,
4910
+ jc as G,
4827
4911
  Oe as H,
4828
- En as I,
4829
- qc as J,
4830
- Rc as K,
4912
+ mn as I,
4913
+ Wc as J,
4914
+ Hc as K,
4831
4915
  Lt as L,
4832
- jc as M,
4916
+ eu as M,
4833
4917
  ct as N,
4834
- Jc as O,
4835
- Yc as P,
4836
- Wc as Q,
4837
- To as R,
4838
- Vc as S,
4839
- Dn as T,
4840
- Jo as U,
4841
- mn as V,
4842
- Qo as W,
4843
- tu as X,
4844
- nu as Y,
4845
- Yo as Z,
4846
- su as _,
4847
- eo as a,
4848
- Kc as a0,
4849
- xc as a1,
4850
- zc as a2,
4918
+ ru as O,
4919
+ su as P,
4920
+ tu as Q,
4921
+ wo as R,
4922
+ Jc as S,
4923
+ On as T,
4924
+ tl as U,
4925
+ pn as V,
4926
+ Yo as W,
4927
+ lu as X,
4928
+ cu as Y,
4929
+ el as Z,
4930
+ uu as _,
4931
+ ro as a,
4932
+ zc as a0,
4933
+ Kc as a1,
4934
+ nu as a2,
4851
4935
  ee as a3,
4852
- po as a4,
4853
- Ol as a5,
4854
- Hc as a6,
4936
+ So as a4,
4937
+ Ul as a5,
4938
+ Yc as a6,
4855
4939
  kt as a7,
4856
- ou as a8,
4857
- eu as a9,
4858
- kc as aA,
4859
- Gc as aB,
4860
- Ri as aC,
4861
- Sc as aD,
4862
- Ps as aE,
4863
- Zi as aF,
4864
- _i as aG,
4865
- bn as aH,
4866
- mi as aI,
4867
- ec as aJ,
4868
- hu as aK,
4869
- gu as aL,
4870
- yc as aM,
4871
- cu as aN,
4872
- be as aO,
4873
- du as aP,
4874
- Ql as aQ,
4875
- uu as aR,
4876
- fu as aS,
4877
- It as aT,
4878
- no as aU,
4879
- Eu as aV,
4880
- Wa as aW,
4881
- Zc as aa,
4882
- ks as ab,
4940
+ gu as a8,
4941
+ ou as a9,
4942
+ Fc as aA,
4943
+ qc as aB,
4944
+ Bc as aC,
4945
+ Fi as aD,
4946
+ Cc as aE,
4947
+ vs as aF,
4948
+ so as aG,
4949
+ bi as aH,
4950
+ In as aI,
4951
+ Ti as aJ,
4952
+ rc as aK,
4953
+ Tu as aL,
4954
+ bc as aM,
4955
+ oc as aN,
4956
+ mu as aO,
4957
+ be as aP,
4958
+ Au as aQ,
4959
+ Yl as aR,
4960
+ pu as aS,
4961
+ yu as aT,
4962
+ It as aU,
4963
+ io as aV,
4964
+ _u as aW,
4965
+ Xa as aX,
4966
+ iu as aa,
4967
+ Rs as ab,
4883
4968
  De as ac,
4884
- jo as ad,
4885
- Xc as ae,
4886
- Qc as af,
4887
- $c as ag,
4969
+ Jo as ad,
4970
+ au as ae,
4971
+ Zc as af,
4972
+ Xc as ag,
4888
4973
  xt as ah,
4889
- Bc as ai,
4890
- si as aj,
4891
- li as ak,
4974
+ Qc as ai,
4975
+ oi as aj,
4976
+ fi as ak,
4892
4977
  G as al,
4893
4978
  I as am,
4894
- $l as an,
4895
- Cc as ao,
4896
- Ln as ap,
4979
+ zl as an,
4980
+ xc as ao,
4981
+ Gn as ap,
4897
4982
  oe as aq,
4898
4983
  rn as ar,
4899
4984
  de as as,
4900
- Cn as at,
4901
- Tc as au,
4902
- Nc as av,
4903
- Dc as aw,
4904
- is as ax,
4905
- Lc as ay,
4906
- Oc as az,
4907
- ws as b,
4908
- _c as c,
4909
- Pc as d,
4985
+ Nn as at,
4986
+ Ic as au,
4987
+ Rc as av,
4988
+ Mc as aw,
4989
+ Su as ax,
4990
+ ls as ay,
4991
+ Uc as az,
4992
+ bs as b,
4993
+ Nc as c,
4994
+ Lc as d,
4910
4995
  Re as e,
4911
- Gn as f,
4996
+ Dn as f,
4912
4997
  xe as g,
4913
4998
  Ce as h,
4914
4999
  le as i,
4915
- Ss as j,
4916
- Xa as k,
4917
- vc as l,
4918
- wc as m,
4919
- bc as n,
4920
- Ic as o,
4921
- ql as p,
4922
- lu as q,
5000
+ Ps as j,
5001
+ ni as k,
5002
+ Dc as l,
5003
+ Gc as m,
5004
+ Oc as n,
5005
+ kc as o,
5006
+ Ql as p,
5007
+ Eu as q,
4923
5008
  J as r,
4924
- Vs as s,
5009
+ $s as s,
4925
5010
  an as t,
4926
- bs as u,
4927
- au as v,
4928
- iu as w,
5011
+ Cs as u,
5012
+ fu as v,
5013
+ hu as w,
4929
5014
  F as x,
4930
- Ho as y,
4931
- Us as z
5015
+ jo as y,
5016
+ Ms as z
4932
5017
  };