@chaibuilder/pages 0.17.11 → 0.17.13

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 (83) hide show
  1. package/dist/{2AITGKQY-DdlXCCch.js → 2AITGKQY-CTW1GUZ6.js} +2 -2
  2. package/dist/{2AITGKQY-BEWmpMeB.cjs → 2AITGKQY-DQ2D9uSu.cjs} +1 -1
  3. package/dist/{NCMVHL6D-al9EBNaz.js → NCMVHL6D-BBFHGOSz.js} +2 -2
  4. package/dist/{NCMVHL6D-B5s3it0O.cjs → NCMVHL6D-XKxnxPS-.cjs} +1 -1
  5. package/dist/{ZDWCUMSJ-DP7083KI.cjs → ZDWCUMSJ-B3mrFV8f.cjs} +1 -1
  6. package/dist/{ZDWCUMSJ-VYarDCOs.js → ZDWCUMSJ-DXZqnGeJ.js} +1 -1
  7. package/dist/{active-in-another-tab-CqlFNgyP.js → active-in-another-tab-CsKSt312.js} +1 -1
  8. package/dist/{active-in-another-tab-D-_6zWws.cjs → active-in-another-tab-w8dwwGg5.cjs} +1 -1
  9. package/dist/{add-new-language-page-D-EIH_KG.js → add-new-language-page-DGlI7gec.js} +2 -2
  10. package/dist/{add-new-language-page-f3pkbC8c.cjs → add-new-language-page-DiFPuJDr.cjs} +1 -1
  11. package/dist/{add-new-page-A7tqO7s9.cjs → add-new-page-CXnqvWJb.cjs} +1 -1
  12. package/dist/{add-new-page-DOPMVtXH.js → add-new-page-DLrGwmYr.js} +1 -1
  13. package/dist/{ai-panel-content-Cw7KS8Iz.js → ai-panel-content-CUjNtVa0.js} +2 -2
  14. package/dist/{ai-panel-content-CeFFzAeq.cjs → ai-panel-content-Dw8iWqxj.cjs} +1 -1
  15. package/dist/{ai-panel-default-lang-BZ_ljHv2.cjs → ai-panel-default-lang-6-NVqura.cjs} +2 -2
  16. package/dist/{ai-panel-default-lang-PCapbW1j.js → ai-panel-default-lang-BhtSW7S3.js} +3 -3
  17. package/dist/{ai-panel-other-lang-Dn2tKImG.js → ai-panel-other-lang-CzkMIdgx.js} +3 -3
  18. package/dist/{ai-panel-other-lang-DCrHNyXS.cjs → ai-panel-other-lang-D3Y8BAvU.cjs} +1 -1
  19. package/dist/{ai-prompt-input-jOFQ-8_t.js → ai-prompt-input-DcbdrmJx.js} +2 -2
  20. package/dist/{ai-prompt-input-9b6rLylJ.cjs → ai-prompt-input-Dlze8Ua5.cjs} +1 -1
  21. package/dist/{ai-translation-prompt-CS-mQOHq.js → ai-translation-prompt-DIN_0mbb.js} +1 -1
  22. package/dist/{ai-translation-prompt-hd5TMlql.cjs → ai-translation-prompt-tU-RaE15.cjs} +1 -1
  23. package/dist/{continue-editing-in-this-client-z0CVTX34.js → continue-editing-in-this-client-B4C_PNC2.js} +1 -1
  24. package/dist/{continue-editing-in-this-client-pFPMr4LR.cjs → continue-editing-in-this-client-N8_iumGL.cjs} +1 -1
  25. package/dist/{delete-page-BFTuNSlS.js → delete-page-B_FVSHzp.js} +1 -1
  26. package/dist/{delete-page-DL74lxYB.cjs → delete-page-DNgwmXp7.cjs} +1 -1
  27. package/dist/{digital-asset-manager-CcByfPoi.js → digital-asset-manager-BJxl1u4s.js} +1 -1
  28. package/dist/{digital-asset-manager-CaXVt3EZ.cjs → digital-asset-manager-DX44uzC7.cjs} +1 -1
  29. package/dist/{duplicate-page-D4CtwyEj.js → duplicate-page-CP14sxDs.js} +2 -2
  30. package/dist/{duplicate-page-CM63Brzc.cjs → duplicate-page-zLbzvK72.cjs} +1 -1
  31. package/dist/{dynamic-page-selector-Csz2pKB7.cjs → dynamic-page-selector-CafbgzxU.cjs} +1 -1
  32. package/dist/{dynamic-page-selector-B3LPjMt5.js → dynamic-page-selector-CyjVrx5y.js} +1 -1
  33. package/dist/{index-B4cxEof7.js → index-DZmfMrnV.js} +549 -541
  34. package/dist/index-DxEZAxNK.cjs +5 -0
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.js +1 -1
  37. package/dist/{json-diff-viewer-BxvfnruI.js → json-diff-viewer-CUVz40Zm.js} +1 -1
  38. package/dist/{json-diff-viewer-CP1CqGws.cjs → json-diff-viewer-Smyz2Ett.cjs} +1 -1
  39. package/dist/{lang-panel-RnkbDv6w.js → lang-panel-Bu5MBxrO.js} +2 -2
  40. package/dist/{lang-panel-4qcZ7r_d.cjs → lang-panel-BuODIvzP.cjs} +1 -1
  41. package/dist/{mark-as-template-4Ghoxl99.js → mark-as-template-Dm0Fuz9S.js} +1 -1
  42. package/dist/{mark-as-template-DmOCvlX1.cjs → mark-as-template-LCQzZnH0.cjs} +1 -1
  43. package/dist/{no-language-page-content-CfJSEyvP.js → no-language-page-content-ARfb4WtB.js} +1 -1
  44. package/dist/{no-language-page-content-CiES2hgx.cjs → no-language-page-content-DHYu1-w-.cjs} +1 -1
  45. package/dist/{no-language-page-dialog-CA0RvERK.cjs → no-language-page-dialog-DY_HU2ot.cjs} +1 -1
  46. package/dist/{no-language-page-dialog-CrMNN-NZ.js → no-language-page-dialog-Dm_STScI.js} +2 -2
  47. package/dist/{page-creator-Csa2adW4.js → page-creator-CXlcejhb.js} +2 -2
  48. package/dist/{page-creator-Svz4sAs8.cjs → page-creator-Cc_fwZqM.cjs} +1 -1
  49. package/dist/{page-lock-BJG3FOuQ.js → page-lock-CcF0mQXB.js} +2 -2
  50. package/dist/{page-lock-HtvnzoMt.cjs → page-lock-DleBeVnM.cjs} +1 -1
  51. package/dist/{page-locked-dialog-Bab2DfeD.cjs → page-locked-dialog-B0YjTDbJ.cjs} +1 -1
  52. package/dist/{page-locked-dialog-CJ5DSATy.js → page-locked-dialog-CLy-Np3f.js} +1 -1
  53. package/dist/{page-manager-new-CVaAIEJq.js → page-manager-new-BlciJew5.js} +2 -2
  54. package/dist/{page-manager-new-CBqk6pWg.cjs → page-manager-new-CALJOxtS.cjs} +1 -1
  55. package/dist/{page-manager-search-and-filter-CG2hW34n.cjs → page-manager-search-and-filter-C60ijiY6.cjs} +1 -1
  56. package/dist/{page-manager-search-and-filter-DOiUgdYA.js → page-manager-search-and-filter-TacsdCbN.js} +1 -1
  57. package/dist/{page-revisions-content-B6ttL983.js → page-revisions-content-CptvZ0I7.js} +2 -2
  58. package/dist/{page-revisions-content-DbW94Aqr.cjs → page-revisions-content-D0Y43w8k.cjs} +1 -1
  59. package/dist/pages.css +1 -1
  60. package/dist/{publish-pages-content-WfSGxj2n.js → publish-pages-content-CHoWif3L.js} +2 -2
  61. package/dist/{publish-pages-content-BG7hkOsG.cjs → publish-pages-content-CQh4h6Gz.cjs} +1 -1
  62. package/dist/{save-to-lib-BiBT_3-d.cjs → save-to-lib-DPAklJ5B.cjs} +1 -1
  63. package/dist/{save-to-lib-BVkEMHoE.js → save-to-lib-DRfgWTPi.js} +1 -1
  64. package/dist/{selected-block-display-BuDBDqZD.cjs → selected-block-display-C83S5h97.cjs} +1 -1
  65. package/dist/{selected-block-display-DQEXsFkX.js → selected-block-display-CmWv4Odg.js} +1 -1
  66. package/dist/{seo-panel-CY1S1tpO.js → seo-panel-Bkr8hgzx.js} +1 -1
  67. package/dist/{seo-panel-SF1denm-.cjs → seo-panel-DXHEWgVD.cjs} +1 -1
  68. package/dist/{shared-json-ld-DyCKYT2v.js → shared-json-ld-LcYrLsUt.js} +1 -1
  69. package/dist/{shared-json-ld-CPGLTTPM.cjs → shared-json-ld-icGDrgkf.cjs} +1 -1
  70. package/dist/{slug-input-DTA7BsMG.cjs → slug-input-Bj8wRK-k.cjs} +1 -1
  71. package/dist/{slug-input-D-DKPODe.js → slug-input-DHRxpbE0.js} +1 -1
  72. package/dist/{take-over-request-rGefOfEm.cjs → take-over-request-BqdWKkZB.cjs} +1 -1
  73. package/dist/{take-over-request-D1F_3xeM.js → take-over-request-C1kUxjoJ.js} +1 -1
  74. package/dist/{theme-panel-footer-Cdxm1r9y.js → theme-panel-footer-BFBECM7Q.js} +1 -1
  75. package/dist/{theme-panel-footer-CfVUCIQS.cjs → theme-panel-footer-CG_uqoPx.cjs} +1 -1
  76. package/dist/{unmark-as-template-BRCuiVct.cjs → unmark-as-template-DHhQTmVL.cjs} +1 -1
  77. package/dist/{unmark-as-template-DcHmjuVo.js → unmark-as-template-Dxolty3v.js} +1 -1
  78. package/dist/{unpublish-page-C0eahm0q.js → unpublish-page-Ck3frwqy.js} +1 -1
  79. package/dist/{unpublish-page-BXyhOIC8.cjs → unpublish-page-DsSyovWg.cjs} +1 -1
  80. package/dist/{web-preview-DTw3MNBm.js → web-preview-CyxFxzMN.js} +1 -1
  81. package/dist/{web-preview-BXxkLcVP.cjs → web-preview-ZtPmK7te.cjs} +1 -1
  82. package/package.json +3 -3
  83. package/dist/index-DLPsza7R.cjs +0 -5
@@ -9,12 +9,12 @@ import * as z from "react";
9
9
  import Jr, { useMemo as q, useCallback as $, useState as K, useEffect as ne, useRef as le, lazy as V, Suspense as X, createContext as Zr, Component as Xr, createElement as Yn } from "react";
10
10
  import { atom as ye, useAtom as oe } from "jotai";
11
11
  import { useQuery as re, useMutation as Y, useQueryClient as J, onlineManager as bs, QueryClient as ea, QueryClientProvider as ta } from "@tanstack/react-query";
12
- import { useLanguages as we, useSavePage as Ue, useTranslation as ve, mergeClasses as qt, usePermissions as Is, PERMISSIONS as na, useRightPanel as sa, useChaiFeatureFlag as ra, useIsPageLoaded as aa, registerChaiLibrary as ia, getBlocksFromHTML as oa, registerChaiSidebarPanel as Dt, registerChaiFeatureFlag as on, registerChaiTopBar as la, registerChaiMediaManager as ca, registerChaiSaveToLibrary as ua, ChaiBuilderEditor as da } from "@chaibuilder/sdk";
13
- import { Tooltip as Xt, TooltipTrigger as en, Button as M, TooltipContent as tn, Sheet as Ls, SheetContent as Ns, SheetHeader as fa, SheetTitle as ha, SheetDescription as ga, DropdownMenu as Cn, DropdownMenuTrigger as Gn, DropdownMenuContent as On, DropdownMenuItem as fe, Separator as ma, TooltipProvider as Cs, SheetTrigger as Ea, Skeleton as Rt, Dialog as Gs, HoverCard as pa, HoverCardTrigger as ya, HoverCardContent as Aa, AlertDialog as Ta, AlertDialogTrigger as Sa, AlertDialogContent as _a, AlertDialogHeader as Pa, AlertDialogTitle as wa, AlertDialogDescription as va, AlertDialogFooter as ba, AlertDialogCancel as Ia, AlertDialogAction as La, Popover as Na, PopoverTrigger as Ca, DialogContent as Ga, DialogHeader as Oa, DialogTitle as Da, Tabs as Ra, TabsList as xa, TabsTrigger as ln, TabsContent as cn, Textarea as Jn, Alert as ka, AlertDescription as Ua } from "@chaibuilder/sdk/ui";
14
- import { LogsIcon as Ma, Folder as Ba, Languages as Zn, ChevronDown as yn, Star as Fa, Plus as Os, History as Ka, Play as Va, Palette as Ha, CheckCircle as qa, Loader as $t, Save as $a, Send as Xn, Rocket as es, CopyPlusIcon as Qa, Pencil as za, Power as Wa, Trash as ja, SquareLibrary as ts, Hash as Ya, File as Ja, MoreHorizontal as ns, ExternalLink as Za, LanguagesIcon as Xa, User as ei, X as ss, Trash2 as ti, ImageIcon as rs, Code as ni, Eye as si, Share2 as ri, FileCode2 as ai, AlertTriangle as ii } from "lucide-react";
15
- import { toast as k } from "sonner";
16
- import { useRegisteredChaiBlocks as oi, getDefaultBlockProps as li } from "@chaibuilder/runtime";
17
- import { loadWebBlocks as ci } from "@chaibuilder/sdk/web-blocks";
12
+ import { useLanguages as we, useSavePage as Ue, useTranslation as ve, mergeClasses as qt, usePermissions as Is, useBlocksStore as na, PERMISSIONS as sa, useRightPanel as ra, useChaiFeatureFlag as aa, useIsPageLoaded as ia, registerChaiLibrary as oa, getBlocksFromHTML as la, registerChaiSidebarPanel as Dt, registerChaiFeatureFlag as on, registerChaiTopBar as ca, registerChaiMediaManager as ua, registerChaiSaveToLibrary as da, ChaiBuilderEditor as fa } from "@chaibuilder/sdk";
13
+ import { Tooltip as Xt, TooltipTrigger as en, Button as M, TooltipContent as tn, Sheet as Ls, SheetContent as Ns, SheetHeader as ha, SheetTitle as ga, SheetDescription as ma, DropdownMenu as Cn, DropdownMenuTrigger as Gn, DropdownMenuContent as On, DropdownMenuItem as fe, Separator as Ea, TooltipProvider as Cs, SheetTrigger as pa, Skeleton as Rt, Dialog as Gs, HoverCard as ya, HoverCardTrigger as Aa, HoverCardContent as Ta, AlertDialog as Sa, AlertDialogTrigger as _a, AlertDialogContent as Pa, AlertDialogHeader as wa, AlertDialogTitle as va, AlertDialogDescription as ba, AlertDialogFooter as Ia, AlertDialogCancel as La, AlertDialogAction as Na, Popover as Ca, PopoverTrigger as Ga, DialogContent as Oa, DialogHeader as Da, DialogTitle as Ra, Tabs as xa, TabsList as ka, TabsTrigger as ln, TabsContent as cn, Textarea as Jn, Alert as Ua, AlertDescription as Ma } from "@chaibuilder/sdk/ui";
14
+ import { LogsIcon as Ba, Folder as Fa, Languages as Zn, ChevronDown as yn, Star as Ka, Plus as Os, History as Va, Play as Ha, Palette as qa, CheckCircle as $a, Loader as $t, Save as Qa, Send as Xn, Rocket as es, CopyPlusIcon as za, Pencil as Wa, Power as ja, Trash as Ya, SquareLibrary as ts, Hash as Ja, File as Za, MoreHorizontal as ns, ExternalLink as Xa, LanguagesIcon as ei, User as ti, X as ss, Trash2 as ni, ImageIcon as rs, Code as si, Eye as ri, Share2 as ai, FileCode2 as ii, AlertTriangle as oi } from "lucide-react";
15
+ import { toast as R } from "sonner";
16
+ import { useRegisteredChaiBlocks as li, getDefaultBlockProps as ci } from "@chaibuilder/runtime";
17
+ import { loadWebBlocks as ui } from "@chaibuilder/sdk/web-blocks";
18
18
  const xt = {
19
19
  ab: "Abkhazian",
20
20
  aa: "Afar",
@@ -267,10 +267,10 @@ const xt = {
267
267
  UPDATE_ASSET: "UPDATE_ASSET",
268
268
  GET_ASSETS: "GET_ASSETS",
269
269
  GET_ASSET: "GET_ASSET"
270
- }, ui = ye({}), Dn = () => oe(ui), ce = (e, t) => {
270
+ }, di = ye({}), Dn = () => oe(di), ce = (e, t) => {
271
271
  const [n] = Dn();
272
272
  return q(() => H(n, e, t), [n, e, t]);
273
- }, C = () => ce("apiUrl", "/chai/api"), Ds = () => ce("usersApiUrl", "/chai/users"), Xc = () => ce("assetsApiUrl", "/chai/assets"), Rs = () => ce("websocket", null), xs = async (e, t, n = {}) => await fetch(e, {
273
+ }, C = () => ce("apiUrl", "/chai/api"), Ds = () => ce("usersApiUrl", "/chai/users"), eu = () => ce("assetsApiUrl", "/chai/assets"), Rs = () => ce("websocket", null), xs = async (e, t, n = {}) => await fetch(e, {
274
274
  method: "POST",
275
275
  headers: {
276
276
  "Content-Type": "application/json",
@@ -287,7 +287,7 @@ if (import.meta.vitest) {
287
287
  t(n).toBeDefined();
288
288
  });
289
289
  }
290
- const eu = () => {
290
+ const tu = () => {
291
291
  const e = I(), t = C();
292
292
  return $(
293
293
  async ({
@@ -359,20 +359,20 @@ const Me = (e) => {
359
359
  },
360
360
  enabled: !!s
361
361
  });
362
- }, di = ye(
362
+ }, fi = ye(
363
363
  null
364
- ), ks = () => oe(di), Rn = () => {
364
+ ), ks = () => oe(fi), Rn = () => {
365
365
  const [e] = ks();
366
366
  return (e == null ? void 0 : e.slug) || "";
367
367
  };
368
- function fi(e, t) {
368
+ function hi(e, t) {
369
369
  const [n, s] = K(e);
370
370
  return ne(() => {
371
371
  const r = setTimeout(() => s(e), t);
372
372
  return () => clearTimeout(r);
373
373
  }, [e, t]), n;
374
374
  }
375
- const hi = ({ query: e, uuid: t }) => {
375
+ const gi = ({ query: e, uuid: t }) => {
376
376
  const { selectedLang: n, fallbackLang: s } = we(), { data: r } = ue(), a = r == null ? void 0 : r.pageType, i = C(), o = I(), { data: l, isFetching: d } = re({
377
377
  queryKey: [E.GET_DYNAMIC_PAGES, e, a, t],
378
378
  staleTime: 60 * 60 * 1e3,
@@ -384,8 +384,8 @@ const hi = ({ query: e, uuid: t }) => {
384
384
  enabled: !!a
385
385
  }), u = q(() => n === "" ? l.filter((f) => f.lang === "" || f.lang === s) : l.filter((f) => f.lang === n), [n, s, l]);
386
386
  return { allLangPages: l, data: u, isFetching: d };
387
- }, gi = () => {
388
- const { selectedLang: e, fallbackLang: t } = we(), [n, s] = ks(), [r, a] = K(""), i = fi(r, 500), { allLangPages: o, data: l, isFetching: d } = hi({ query: i }), u = $((h) => s(h), [s]), f = $((h) => a(h), [a]), g = $(() => {
387
+ }, mi = () => {
388
+ const { selectedLang: e, fallbackLang: t } = we(), [n, s] = ks(), [r, a] = K(""), i = hi(r, 500), { allLangPages: o, data: l, isFetching: d } = gi({ query: i }), u = $((h) => s(h), [s]), f = $((h) => a(h), [a]), g = $(() => {
389
389
  if (!n) return;
390
390
  const h = !(n != null && n.primaryPage), y = e.length === 0, T = h ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, S = o.filter(
391
391
  (p) => (p == null ? void 0 : p.primaryPage) === T || p.id === T
@@ -403,13 +403,13 @@ const hi = ({ query: e, uuid: t }) => {
403
403
  updateSearchQuery: f,
404
404
  onChangeLanguage: g
405
405
  };
406
- }, mi = ye({ lastSaved: void 0 }), Us = () => oe(mi), ue = () => {
406
+ }, Ei = ye({ lastSaved: void 0 }), Us = () => oe(Ei), ue = () => {
407
407
  const [e] = be(), t = e.get("page"), { data: n, isFetching: s } = Me();
408
408
  return { data: q(() => ({ ...ie(n, { id: t }) || {} }), [n, t]), isFetching: s };
409
409
  }, Ce = () => {
410
410
  const [e] = be(), t = e.get("lang") ?? "", { data: n, isFetching: s } = Me();
411
411
  return { data: q(() => ie(n, { lang: t }) || {}, [n, t]), isFetching: s };
412
- }, Ei = ye({}), pi = () => oe(Ei), yi = () => {
412
+ }, pi = ye({}), yi = () => oe(pi), Ai = () => {
413
413
  const { data: e } = Ce(), t = Rn(), n = ce("getLiveUrl", Ts), s = e == null ? void 0 : e.slug, r = n(s || "/");
414
414
  return t ? r + t : r;
415
415
  }, Be = () => {
@@ -434,11 +434,11 @@ function Ms(e, t, n = !1) {
434
434
  const s = e.toString() ? `?${e.toString()}` : "/";
435
435
  n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
436
436
  }
437
- const xn = ye(null), Ai = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
438
- let Ti = (e = 21) => {
437
+ const xn = ye(null), Ti = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
438
+ let Si = (e = 21) => {
439
439
  let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
440
440
  for (; e--; )
441
- t += Ai[n[e] & 63];
441
+ t += Ti[n[e] & 63];
442
442
  return t;
443
443
  };
444
444
  const kn = () => {
@@ -464,7 +464,7 @@ const kn = () => {
464
464
  FORCE_TAKE_OVER_REQUEST: "FORCE_TAKE_OVER_REQUEST",
465
465
  CONTINUE_EDITING_IN_THIS_CLIENT: "CONTINUE_EDITING_IN_THIS_CLIENT",
466
466
  CONTINUE_EDITING_IN_THIS_TAB_REQUEST: "CONTINUE_EDITING_IN_THIS_TAB_REQUEST"
467
- }, Si = ["sync", "join", "leave"], _i = [
467
+ }, _i = ["sync", "join", "leave"], Pi = [
468
468
  se.FORCE_TAKE_OVER,
469
469
  se.TAKE_OVER_REQUEST,
470
470
  se.TAKE_OVER_APPROVED,
@@ -472,35 +472,35 @@ const kn = () => {
472
472
  se.FORCE_TAKE_OVER_REQUEST,
473
473
  se.CONTINUE_EDITING_IN_THIS_CLIENT,
474
474
  se.CONTINUE_EDITING_IN_THIS_TAB_REQUEST
475
- ], Pi = ye({}), Bs = ye(null), wi = ye(te.CHECKING), vi = ye({}), bi = (e) => {
475
+ ], wi = ye({}), Bs = ye(null), vi = ye(te.CHECKING), bi = ye({}), Ii = (e) => {
476
476
  const t = {}, n = Fr(Ss(e).map(_s).filter(Boolean), "pageId");
477
477
  return Object.entries(n).forEach(
478
478
  ([s, r]) => t[s] = Ps(r, "onlineAt")
479
479
  ), t;
480
- }, Ii = (e) => {
480
+ }, Li = (e) => {
481
481
  const t = Ps(Ss(e).map(_s).filter(Boolean), "onlineAt"), n = t == null ? void 0 : t.onlineAt;
482
482
  return n ? n - 100 : +/* @__PURE__ */ new Date() - 1e3 * 60 * 60 * 4;
483
483
  }, nn = () => {
484
484
  const { user: e } = kn();
485
485
  return e == null ? void 0 : e.id;
486
- }, Li = () => {
486
+ }, Ni = () => {
487
487
  const { data: e } = Be();
488
488
  return `WEBSITE:${e == null ? void 0 : e.appKey}`;
489
489
  }, Nt = () => {
490
490
  const { data: e } = ue();
491
491
  return e == null ? void 0 : e.id;
492
- }, Le = Ti(24);
492
+ }, Le = Si(24);
493
493
  let un = null;
494
- const ot = 10, Ni = 1e3, Ci = 2, Gi = 16e3, Fs = () => {
495
- const [e, t] = oe(Pi);
494
+ const ot = 10, Ci = 1e3, Gi = 2, Oi = 16e3, Fs = () => {
495
+ const [e, t] = oe(wi);
496
496
  return { pageToUser: e, setPageToUser: t };
497
497
  }, Ae = () => {
498
- const [e, t] = oe(wi), n = [te.LOCKED, te.ACTIVE_IN_ANOTHER_TAB].includes(e), s = [te.EDITING].includes(e);
498
+ const [e, t] = oe(vi), n = [te.LOCKED, te.ACTIVE_IN_ANOTHER_TAB].includes(e), s = [te.EDITING].includes(e);
499
499
  return { pageStatus: e, setPageStatus: t, isLocked: n, isEditing: s };
500
500
  }, Ks = () => {
501
- const [e, t] = oe(vi);
501
+ const [e, t] = oe(bi);
502
502
  return { pageLockMeta: e, setPageLockMeta: t };
503
- }, Oi = () => {
503
+ }, Di = () => {
504
504
  const e = Nt(), { pageToUser: t } = Fs();
505
505
  return q(() => t[e], [t, e]);
506
506
  }, Un = () => {
@@ -511,13 +511,13 @@ const ot = 10, Ni = 1e3, Ci = 2, Gi = 16e3, Fs = () => {
511
511
  e || t(te.EDITING);
512
512
  }, 500), () => clearTimeout(un);
513
513
  }, [e, t]), n;
514
- }, Di = () => {
514
+ }, Ri = () => {
515
515
  const e = Nt(), t = nn(), n = Un(), { setPageToUser: s } = Fs(), { setPageStatus: r, pageStatus: a } = Ae(), i = le(e);
516
516
  return i.current = e, $(
517
517
  (o) => {
518
518
  const l = o || n;
519
519
  if (!l) return [];
520
- const d = l == null ? void 0 : l.presenceState(), u = bi(d);
520
+ const d = l == null ? void 0 : l.presenceState(), u = Ii(d);
521
521
  s(u);
522
522
  const f = u[i.current];
523
523
  if (!f)
@@ -532,8 +532,8 @@ const ot = 10, Ni = 1e3, Ci = 2, Gi = 16e3, Fs = () => {
532
532
  },
533
533
  [n, s, r, t, a]
534
534
  );
535
- }, Ri = () => {
536
- const e = nn(), t = Nt(), n = Un(), s = Oi(), { setPageLockMeta: r } = Ks(), a = le(t);
535
+ }, xi = () => {
536
+ const e = nn(), t = Nt(), n = Un(), s = Di(), { setPageLockMeta: r } = Ks(), a = le(t);
537
537
  return a.current = t, $(
538
538
  async (i, o) => {
539
539
  if (!n) return;
@@ -542,8 +542,8 @@ const ot = 10, Ni = 1e3, Ci = 2, Gi = 16e3, Fs = () => {
542
542
  },
543
543
  [n, e, s, r]
544
544
  );
545
- }, xi = () => {
546
- const e = nn(), t = Nt(), n = Un(), { setPageStatus: s } = Ae(), { setPageLockMeta: r } = Ks(), a = Ri(), i = le(t), { savePageAsync: o } = Ue();
545
+ }, ki = () => {
546
+ const e = nn(), t = Nt(), n = Un(), { setPageStatus: s } = Ae(), { setPageLockMeta: r } = Ks(), a = xi(), i = le(t), { savePageAsync: o } = Ue();
547
547
  return i.current = t, $(
548
548
  (l) => async ({ payload: d }) => {
549
549
  const u = d || {};
@@ -564,7 +564,7 @@ const ot = 10, Ni = 1e3, Ci = 2, Gi = 16e3, Fs = () => {
564
564
  break;
565
565
  }
566
566
  case se.CONTINUE_EDITING_IN_THIS_CLIENT: {
567
- const f = Ii(n == null ? void 0 : n.presenceState());
567
+ const f = Li(n == null ? void 0 : n.presenceState());
568
568
  s(te.CHECKING), await (n == null ? void 0 : n.track({ onlineAt: f, pageId: i.current, userId: e, clientId: Le }));
569
569
  break;
570
570
  }
@@ -576,17 +576,17 @@ const ot = 10, Ni = 1e3, Ci = 2, Gi = 16e3, Fs = () => {
576
576
  },
577
577
  [a, r, s, n, e, o]
578
578
  );
579
- }, tu = () => {
580
- const e = Rs(), t = nn(), n = Nt(), s = Li(), [r, a] = oe(Bs), i = xi(), o = Di(), l = le(i), d = le(o), u = le(null), f = le(!1), g = le(0), h = le(r);
579
+ }, nu = () => {
580
+ const e = Rs(), t = nn(), n = Nt(), s = Ni(), [r, a] = oe(Bs), i = ki(), o = Ri(), l = le(i), d = le(o), u = le(null), f = le(!1), g = le(0), h = le(r);
581
581
  ne(() => {
582
582
  l.current = i, d.current = o, h.current = r;
583
583
  }, [i, o, r]);
584
584
  const y = $((A) => {
585
- _i.forEach((S) => {
585
+ Pi.forEach((S) => {
586
586
  A.on("broadcast", { event: S }, (p) => {
587
587
  l.current(S)(p);
588
588
  });
589
- }), Si.forEach((S) => {
589
+ }), _i.forEach((S) => {
590
590
  A.on("presence", { event: S }, () => {
591
591
  d.current(A);
592
592
  });
@@ -603,8 +603,8 @@ const ot = 10, Ni = 1e3, Ci = 2, Gi = 16e3, Fs = () => {
603
603
  `Attempting to reconnect realtime channel (attempt ${g.current}/${ot})`
604
604
  ), u.current && (clearTimeout(u.current), u.current = null), h.current && (e.removeChannel(h.current), a(null), h.current = null);
605
605
  const A = Math.min(
606
- Ni * Math.pow(Ci, g.current - 1),
607
- Gi
606
+ Ci * Math.pow(Gi, g.current - 1),
607
+ Oi
608
608
  );
609
609
  u.current = setTimeout(() => {
610
610
  const S = e.channel(s, {
@@ -673,7 +673,7 @@ const ot = 10, Ni = 1e3, Ci = 2, Gi = 16e3, Fs = () => {
673
673
  queryFn: async () => e(t, { action: E.GET_WEBSITE_PAGES }) || [],
674
674
  placeholderData: (n) => n || []
675
675
  });
676
- }, nu = (e) => {
676
+ }, su = (e) => {
677
677
  const t = I(), n = C(), s = Mn();
678
678
  return re({
679
679
  queryKey: [E.GET_WEBSITE_PAGES, e, s],
@@ -689,7 +689,7 @@ const ot = 10, Ni = 1e3, Ci = 2, Gi = 16e3, Fs = () => {
689
689
  },
690
690
  placeholderData: (r) => r || {}
691
691
  });
692
- }, ki = V(() => import("./page-manager-new-CVaAIEJq.js")), Hs = ({ children: e }) => {
692
+ }, Ui = V(() => import("./page-manager-new-BlciJew5.js")), Hs = ({ children: e }) => {
693
693
  const { t } = ve(), [n, s] = be(), r = n.get("page"), { data: a, isFetching: i } = ue(), { data: o, isFetching: l } = Vs(), [d, u] = K(!1), [f, g] = K(!0), { savePage: h } = Ue(), y = !!r && !me(a), { isLocked: T } = Ae(), A = q(() => {
694
694
  if (!o || l) return !1;
695
695
  const b = o.find((U) => U.slug === "/");
@@ -710,7 +710,7 @@ const ot = 10, Ni = 1e3, Ci = 2, Gi = 16e3, Fs = () => {
710
710
  onClick: () => {
711
711
  T || h(), u(!0);
712
712
  },
713
- children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(Ma, { className: "h-4 w-4" }) }, "template-viewer")
713
+ children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(Ba, { className: "h-4 w-4" }) }, "template-viewer")
714
714
  }
715
715
  ),
716
716
  /* @__PURE__ */ c(tn, { side: "right", children: /* @__PURE__ */ c("p", { children: t("Open pages manager") }) })
@@ -722,25 +722,25 @@ const ot = 10, Ni = 1e3, Ci = 2, Gi = 16e3, Fs = () => {
722
722
  "aria-describedby": "pages-manager-description",
723
723
  className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${y ? "" : "sheet-hide-close-btn"}`,
724
724
  children: [
725
- /* @__PURE__ */ m(fa, { className: "mb-3 px-4 pt-4", children: [
726
- /* @__PURE__ */ m(ha, { className: "flex items-center gap-2 text-sm font-semibold", children: [
727
- /* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(Ba, { className: "h-4 w-4" }) }),
725
+ /* @__PURE__ */ m(ha, { className: "mb-3 px-4 pt-4", children: [
726
+ /* @__PURE__ */ m(ga, { className: "flex items-center gap-2 text-sm font-semibold", children: [
727
+ /* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(Fa, { className: "h-4 w-4" }) }),
728
728
  /* @__PURE__ */ m("div", { className: "flex flex-col", children: [
729
729
  /* @__PURE__ */ c("span", { className: "text-sm font-semibold", children: t("Pages") }),
730
730
  /* @__PURE__ */ c("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: t("Manage your site structure") })
731
731
  ] })
732
732
  ] }),
733
- /* @__PURE__ */ c(ga, { className: "sr-only", children: t("Manage your site structure") })
733
+ /* @__PURE__ */ c(ma, { className: "sr-only", children: t("Manage your site structure") })
734
734
  ] }),
735
- /* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: v && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(ki, { close: () => u(!1) }) }) })
735
+ /* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: v && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(Ui, { close: () => u(!1) }) }) })
736
736
  ]
737
737
  }
738
738
  ) })
739
739
  ] });
740
- }, Ui = V(() => import("./add-new-language-page-D-EIH_KG.js")), Mi = () => {
740
+ }, Mi = V(() => import("./add-new-language-page-DGlI7gec.js")), Bi = () => {
741
741
  const e = ce("topLeftCorner", null);
742
742
  return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Jr.createElement(e, {}) }) : null;
743
- }, Bi = ({
743
+ }, Fi = ({
744
744
  showAdd: e = !0,
745
745
  variant: t = "ghost",
746
746
  goToDefaultLang: n = !1
@@ -820,7 +820,7 @@ const ot = 10, Ni = 1e3, Ci = 2, Gi = 16e3, Fs = () => {
820
820
  children: [
821
821
  /* @__PURE__ */ c("div", { className: "text-slate-600", children: p.value }),
822
822
  p.key === s && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
823
- /* @__PURE__ */ c(Fa, { fill: "orange", className: "h-2 w-2" }),
823
+ /* @__PURE__ */ c(Ka, { fill: "orange", className: "h-2 w-2" }),
824
824
  "Primary"
825
825
  ] })
826
826
  ]
@@ -829,7 +829,7 @@ const ot = 10, Ni = 1e3, Ci = 2, Gi = 16e3, Fs = () => {
829
829
  )
830
830
  ),
831
831
  e && !me(T.filter((p) => !p.isLangPageAdded)) && /* @__PURE__ */ m(Ee, { children: [
832
- /* @__PURE__ */ c(ma, {}),
832
+ /* @__PURE__ */ c(Ea, {}),
833
833
  /* @__PURE__ */ m(
834
834
  M,
835
835
  {
@@ -852,13 +852,13 @@ const ot = 10, Ni = 1e3, Ci = 2, Gi = 16e3, Fs = () => {
852
852
  ] })
853
853
  ] }) });
854
854
  };
855
- function Fi() {
855
+ function Ki() {
856
856
  const [e, t] = oe(xn);
857
857
  return /* @__PURE__ */ m("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
858
- /* @__PURE__ */ c(Mi, {}),
858
+ /* @__PURE__ */ c(Bi, {}),
859
859
  /* @__PURE__ */ c(Hs, {}),
860
860
  e && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
861
- Ui,
861
+ Mi,
862
862
  {
863
863
  isOpen: !0,
864
864
  id: e == null ? void 0 : e.id,
@@ -870,7 +870,7 @@ function Fi() {
870
870
  ) })
871
871
  ] });
872
872
  }
873
- function Ki() {
873
+ function Vi() {
874
874
  return /* @__PURE__ */ c("div", { className: "mt-2 space-y-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ m("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
875
875
  /* @__PURE__ */ m("div", { className: "flex-1 space-y-1", children: [
876
876
  /* @__PURE__ */ c(Rt, { className: "h-4 w-3/4" }),
@@ -880,19 +880,19 @@ function Ki() {
880
880
  /* @__PURE__ */ c(Rt, { className: "h-8 w-8 rounded-full" })
881
881
  ] }, t)) });
882
882
  }
883
- const Vi = z.lazy(() => import("./page-revisions-content-B6ttL983.js"));
884
- function Hi() {
883
+ const Hi = z.lazy(() => import("./page-revisions-content-CptvZ0I7.js"));
884
+ function qi() {
885
885
  const [e, t] = z.useState(!1);
886
886
  return /* @__PURE__ */ c(Cs, { children: /* @__PURE__ */ m(Xt, { delayDuration: 0, children: [
887
887
  /* @__PURE__ */ m(Ls, { open: e, onOpenChange: t, children: [
888
- /* @__PURE__ */ c(Ea, { asChild: !0, children: /* @__PURE__ */ c(en, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
888
+ /* @__PURE__ */ c(pa, { asChild: !0, children: /* @__PURE__ */ c(en, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
889
889
  /* @__PURE__ */ m(M, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
890
- /* @__PURE__ */ c(Ka, { className: "h-4 w-4" }),
890
+ /* @__PURE__ */ c(Va, { className: "h-4 w-4" }),
891
891
  /* @__PURE__ */ c("span", { className: "sr-only", children: "View revision history" })
892
892
  ] }),
893
893
  /* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
894
894
  ] }) }) }),
895
- /* @__PURE__ */ c(Ns, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(X, { fallback: /* @__PURE__ */ c(Ki, {}), children: /* @__PURE__ */ c(Vi, { isOpen: e }) }) })
895
+ /* @__PURE__ */ c(Ns, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(X, { fallback: /* @__PURE__ */ c(Vi, {}), children: /* @__PURE__ */ c(Hi, { isOpen: e }) }) })
896
896
  ] }),
897
897
  /* @__PURE__ */ c(tn, { side: "bottom", children: /* @__PURE__ */ c("p", { children: "Revision history" }) })
898
898
  ] }) });
@@ -905,7 +905,7 @@ const dn = ({
905
905
  }) => {
906
906
  const { hasPermission: r } = Is();
907
907
  return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
908
- }, qi = {
908
+ }, $i = {
909
909
  SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
910
910
  }, Ge = () => {
911
911
  const e = C(), t = I();
@@ -915,10 +915,10 @@ const dn = ({
915
915
  placeholderData: [],
916
916
  queryFn: async () => t(e, { action: E.GET_PAGE_TYPES })
917
917
  });
918
- }, $i = (e) => {
918
+ }, Qi = (e) => {
919
919
  const { data: t } = Ge();
920
920
  return q(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
921
- }, Qi = () => {
921
+ }, zi = () => {
922
922
  const e = C(), t = I();
923
923
  return Y({
924
924
  mutationFn: async ({ pageType: n, query: s }) => {
@@ -935,7 +935,7 @@ const dn = ({
935
935
  }
936
936
  }
937
937
  });
938
- }, su = () => {
938
+ }, ru = () => {
939
939
  const e = C(), t = J(), n = I(), { data: s } = Ge();
940
940
  return Y({
941
941
  mutationFn: async (r) => await n(e, {
@@ -952,16 +952,16 @@ const dn = ({
952
952
  queryKey: [E.GET_WEBSITE_PAGES]
953
953
  });
954
954
  const i = a.template ? `Page created from "${a.template.name}" template` : a.hasSlug === !1 ? "New " + ((o = ie(s, { key: a.pageType })) == null ? void 0 : o.name) + " added successfully" : "New page added successfully";
955
- k.success(i);
955
+ R.success(i);
956
956
  },
957
957
  onError: (r, a) => {
958
958
  const i = ie(s, { key: a.pageType });
959
- k.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
960
- description: H(qi, r.message, r.message)
959
+ R.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
960
+ description: H($i, r.message, r.message)
961
961
  });
962
962
  }
963
963
  });
964
- }, ru = () => {
964
+ }, au = () => {
965
965
  const e = C(), t = J(), n = I(), { data: s } = Ce(), { data: r } = Ge();
966
966
  return Y({
967
967
  mutationFn: async (a) => await n(e, {
@@ -981,12 +981,12 @@ const dn = ({
981
981
  },
982
982
  onError: (a, i) => {
983
983
  const o = ie(r, { key: i.pageType });
984
- k.error(`Failed to update ${o != null && o.hasSlug ? "page" : o.name}.`, {
984
+ R.error(`Failed to update ${o != null && o.hasSlug ? "page" : o.name}.`, {
985
985
  description: a.message
986
986
  });
987
987
  }
988
988
  });
989
- }, au = () => {
989
+ }, iu = () => {
990
990
  const e = C(), t = J(), n = I(), { data: s } = Ge();
991
991
  return Y({
992
992
  mutationFn: async (r) => n(e, {
@@ -995,7 +995,7 @@ const dn = ({
995
995
  }),
996
996
  onSuccess: (r, a) => {
997
997
  if (r.code === "PAGE_LOCKED") {
998
- k.error("Delete not allowed", {
998
+ R.error("Delete not allowed", {
999
999
  description: "Page is currently being edited by another user."
1000
1000
  });
1001
1001
  return;
@@ -1010,12 +1010,12 @@ const dn = ({
1010
1010
  },
1011
1011
  onError: (r, a) => {
1012
1012
  const i = ie(s, { key: a.pageType });
1013
- k.error(`Failed to delete ${i != null && i.hasSlug ? "page" : i.name}.`, {
1013
+ R.error(`Failed to delete ${i != null && i.hasSlug ? "page" : i.name}.`, {
1014
1014
  description: r.message
1015
1015
  });
1016
1016
  }
1017
1017
  });
1018
- }, iu = () => {
1018
+ }, ou = () => {
1019
1019
  const e = C(), t = J(), n = I(), { data: s } = Ge();
1020
1020
  return Y({
1021
1021
  mutationFn: async (r) => n(e, {
@@ -1029,24 +1029,28 @@ const dn = ({
1029
1029
  queryKey: [E.GET_WEBSITE_PAGES]
1030
1030
  });
1031
1031
  const i = ie(s, { key: a.pageType });
1032
- k.success(
1032
+ R.success(
1033
1033
  i != null && i.hasSlug ? "Page unpublished successfully." : "New " + i.name + " added successfully."
1034
1034
  );
1035
1035
  },
1036
1036
  onError: (r, a) => {
1037
1037
  const i = ie(s, { key: a.pageType });
1038
- k.error(`Failed to take offline ${i != null && i.hasSlug ? "page" : i.name}.`, {
1038
+ R.error(`Failed to take offline ${i != null && i.hasSlug ? "page" : i.name}.`, {
1039
1039
  description: r.message
1040
1040
  });
1041
1041
  }
1042
1042
  });
1043
1043
  }, qs = () => {
1044
- const e = C(), t = I(), n = J(), { data: s } = ue(), { savePageAsync: r } = Ue();
1044
+ const e = C(), t = I(), n = J(), { data: s } = ue(), { savePageAsync: r } = Ue(), [a] = na();
1045
1045
  return Y({
1046
- mutationFn: async ({ ids: a }) => (await r(), t(e, {
1047
- action: E.PUBLISH_CHANGES,
1048
- data: { ids: a }
1049
- })),
1046
+ mutationFn: async ({ ids: i }) => {
1047
+ if (a.length === 0)
1048
+ throw new Error("Empty page cannot be published");
1049
+ return await r(), t(e, {
1050
+ action: E.PUBLISH_CHANGES,
1051
+ data: { ids: i }
1052
+ });
1053
+ },
1050
1054
  onSuccess: () => {
1051
1055
  n.invalidateQueries({
1052
1056
  queryKey: [E.GET_CHANGES]
@@ -1056,11 +1060,11 @@ const dn = ({
1056
1060
  queryKey: [E.GET_LANGUAGE_PAGES, s == null ? void 0 : s.id]
1057
1061
  });
1058
1062
  },
1059
- onError: (a) => {
1060
- console.log("##", a), k.error("Failed to publish pages.");
1063
+ onError: (i) => {
1064
+ console.log("##", i), R.error(i.message);
1061
1065
  }
1062
1066
  });
1063
- }, ou = () => {
1067
+ }, lu = () => {
1064
1068
  const e = C(), t = I(), n = J();
1065
1069
  return Y({
1066
1070
  mutationFn: async (s) => {
@@ -1079,13 +1083,13 @@ const dn = ({
1079
1083
  onSuccess: () => {
1080
1084
  n.invalidateQueries({
1081
1085
  queryKey: [E.GET_WEBSITE_PAGES]
1082
- }), k.success("Page marked as template successfully.");
1086
+ }), R.success("Page marked as template successfully.");
1083
1087
  },
1084
1088
  onError: () => {
1085
- k.error("Failed to mark page as template.");
1089
+ R.error("Failed to mark page as template.");
1086
1090
  }
1087
1091
  });
1088
- }, lu = () => {
1092
+ }, cu = () => {
1089
1093
  const e = C(), t = I(), n = J();
1090
1094
  return Y({
1091
1095
  mutationFn: async (s) => t(e, {
@@ -1095,13 +1099,13 @@ const dn = ({
1095
1099
  onSuccess: () => {
1096
1100
  n.invalidateQueries({
1097
1101
  queryKey: [E.GET_WEBSITE_PAGES]
1098
- }), k.success("Page unmarked as template successfully.");
1102
+ }), R.success("Page unmarked as template successfully.");
1099
1103
  },
1100
1104
  onError: () => {
1101
- k.error("Failed to unmark page as template.");
1105
+ R.error("Failed to unmark page as template.");
1102
1106
  }
1103
1107
  });
1104
- }, cu = () => {
1108
+ }, uu = () => {
1105
1109
  const e = C(), t = I(), n = J();
1106
1110
  return Y({
1107
1111
  mutationFn: async ({ id: s, slug: r }) => t(e, {
@@ -1109,27 +1113,27 @@ const dn = ({
1109
1113
  data: { id: s, slug: r }
1110
1114
  }),
1111
1115
  onSuccess: (s, { primaryPage: r }) => {
1112
- k.success("Slug changed successfully."), r ? n.invalidateQueries({
1116
+ R.success("Slug changed successfully."), r ? n.invalidateQueries({
1113
1117
  queryKey: [E.GET_LANGUAGE_PAGES, r]
1114
1118
  }) : n.invalidateQueries({
1115
1119
  queryKey: [E.GET_WEBSITE_PAGES]
1116
1120
  });
1117
1121
  },
1118
1122
  onError: () => {
1119
- k.error("Failed to change slug");
1123
+ R.error("Failed to change slug");
1120
1124
  }
1121
1125
  });
1122
- }, zi = V(() => import("./publish-pages-content-WfSGxj2n.js"));
1123
- function Wi({
1126
+ }, Wi = V(() => import("./publish-pages-content-CHoWif3L.js"));
1127
+ function ji({
1124
1128
  showModal: e = !1,
1125
1129
  onClose: t = () => console.log("Cancelled")
1126
1130
  }) {
1127
1131
  const { mutate: n, isPending: s } = qs();
1128
1132
  return /* @__PURE__ */ c(Gs, { open: e, onOpenChange: s ? () => {
1129
- } : t, children: e && /* @__PURE__ */ c(X, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(zi, { onClose: t, isPending: s, publishPage: n }) }) });
1133
+ } : t, children: e && /* @__PURE__ */ c(X, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(Wi, { onClose: t, isPending: s, publishPage: n }) }) });
1130
1134
  }
1131
1135
  const de = {
1132
- ...na,
1136
+ ...sa,
1133
1137
  //pages
1134
1138
  ADD_PAGE: "add_page",
1135
1139
  EDIT_PAGE: "edit_page",
@@ -1165,7 +1169,7 @@ const de = {
1165
1169
  ADD_MEDIA: "add_media",
1166
1170
  EDIT_MEDIA: "edit_media",
1167
1171
  DELETE_MEDIA: "delete_media"
1168
- }, ji = (e) => {
1172
+ }, Yi = (e) => {
1169
1173
  const { fallbackLang: t } = we(), { data: n } = Be(), { data: s, isFetching: r } = Me(), a = q(() => {
1170
1174
  const i = { [t]: !0 };
1171
1175
  return Vr(H(n, "languages"), (o) => {
@@ -1174,12 +1178,12 @@ const de = {
1174
1178
  }), i;
1175
1179
  }, [t, s, n]);
1176
1180
  return r || me(e) || e && a[e];
1177
- }, Yi = {
1181
+ }, Ji = {
1178
1182
  particleCount: 350,
1179
1183
  spread: 120,
1180
1184
  origin: { y: 0.6 },
1181
1185
  angle: 90
1182
- }, Ji = {
1186
+ }, Zi = {
1183
1187
  TOP_RIGHT: {
1184
1188
  angle: 225,
1185
1189
  origin: { x: 0.9, y: 0 }
@@ -1188,14 +1192,14 @@ const de = {
1188
1192
  angle: 100,
1189
1193
  origin: { x: 0.9, y: 0.9 }
1190
1194
  }
1191
- }, Zi = async () => {
1195
+ }, Xi = async () => {
1192
1196
  const { default: e } = await import("./confetti.module-DCmCkDyV.js");
1193
1197
  return e;
1194
1198
  }, fn = (e) => {
1195
- let t = Ji[e];
1199
+ let t = Zi[e];
1196
1200
  t || (t = {});
1197
- const n = { ...Yi, ...t };
1198
- Zi().then((s) => s(n));
1201
+ const n = { ...Ji, ...t };
1202
+ Xi().then((s) => s(n));
1199
1203
  };
1200
1204
  function Bn({
1201
1205
  children: e,
@@ -1209,7 +1213,7 @@ function Bn({
1209
1213
  /* @__PURE__ */ c(tn, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
1210
1214
  ] }) }) : e;
1211
1215
  }
1212
- const Xi = V(() => import("./unpublish-page-C0eahm0q.js")), eo = V(() => import("./translation-warning-modal-DalBhNQy.js")), to = () => {
1216
+ const eo = V(() => import("./unpublish-page-Ck3frwqy.js")), to = V(() => import("./translation-warning-modal-DalBhNQy.js")), no = () => {
1213
1217
  const { t: e } = ve(), { selectedLang: t, fallbackLang: n } = we(), s = ce("getPreviewUrl", async (g) => g), [r, a] = K(""), { data: i } = ue(), { data: o } = Me(), { data: l } = Ge(), d = q(
1214
1218
  () => {
1215
1219
  var g;
@@ -1230,9 +1234,9 @@ const Xi = V(() => import("./unpublish-page-C0eahm0q.js")), eo = V(() => import(
1230
1234
  } else
1231
1235
  a("");
1232
1236
  })();
1233
- }, [s, d, i == null ? void 0 : i.pageType, u, i == null ? void 0 : i.id, f]), /* @__PURE__ */ c(Ee, { children: /* @__PURE__ */ c(Bn, { content: e("Open preview in new tab"), delayDuration: 0, children: /* @__PURE__ */ c("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c(M, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ c(Va, { className: "h-4 w-4" }) }) }) }) });
1234
- }, no = () => {
1235
- const { t: e } = ve(), [t, n] = sa();
1237
+ }, [s, d, i == null ? void 0 : i.pageType, u, i == null ? void 0 : i.id, f]), /* @__PURE__ */ c(Ee, { children: /* @__PURE__ */ c(Bn, { content: e("Open preview in new tab"), delayDuration: 0, children: /* @__PURE__ */ c("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c(M, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ c(Ha, { className: "h-4 w-4" }) }) }) }) });
1238
+ }, so = () => {
1239
+ const { t: e } = ve(), [t, n] = ra();
1236
1240
  return /* @__PURE__ */ m(Ee, { children: [
1237
1241
  /* @__PURE__ */ c(Bn, { content: e("Theme"), delayDuration: 0, children: /* @__PURE__ */ c(
1238
1242
  M,
@@ -1241,12 +1245,12 @@ const Xi = V(() => import("./unpublish-page-C0eahm0q.js")), eo = V(() => import(
1241
1245
  size: "icon",
1242
1246
  className: "gap-2",
1243
1247
  onClick: () => n(t === "theme" ? "block" : "theme"),
1244
- children: /* @__PURE__ */ c(Ha, { className: "h-4 w-4" })
1248
+ children: /* @__PURE__ */ c(qa, { className: "h-4 w-4" })
1245
1249
  }
1246
1250
  ) }),
1247
1251
  /* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
1248
1252
  ] });
1249
- }, so = () => {
1253
+ }, ro = () => {
1250
1254
  const { t: e } = ve(), [t, n] = K(!1), { isLocked: s } = Ae(), { savePageAsync: r, saveState: a } = Ue();
1251
1255
  ne(() => {
1252
1256
  const u = (f) => {
@@ -1263,7 +1267,7 @@ const Xi = V(() => import("./unpublish-page-C0eahm0q.js")), eo = V(() => import(
1263
1267
  case "UNSAVED":
1264
1268
  return {
1265
1269
  tooltipContent: e("Save draft"),
1266
- buttonIcon: /* @__PURE__ */ c($a, { className: "h-4 w-4" }),
1270
+ buttonIcon: /* @__PURE__ */ c(Qa, { className: "h-4 w-4" }),
1267
1271
  buttonClass: "gap-x-1"
1268
1272
  };
1269
1273
  case "SAVING":
@@ -1275,7 +1279,7 @@ const Xi = V(() => import("./unpublish-page-C0eahm0q.js")), eo = V(() => import(
1275
1279
  case "SAVED":
1276
1280
  return {
1277
1281
  tooltipContent: e("Saved"),
1278
- buttonIcon: /* @__PURE__ */ c(qa, { className: "h-4 w-4" }),
1282
+ buttonIcon: /* @__PURE__ */ c($a, { className: "h-4 w-4" }),
1279
1283
  buttonClass: "text-green-500 gap-x-1"
1280
1284
  };
1281
1285
  }
@@ -1285,7 +1289,7 @@ const Xi = V(() => import("./unpublish-page-C0eahm0q.js")), eo = V(() => import(
1285
1289
  " ",
1286
1290
  d
1287
1291
  ] });
1288
- }, ro = () => {
1292
+ }, ao = () => {
1289
1293
  const { t: e } = ve(), { selectedLang: t } = we(), { data: n } = Ce(), { data: s } = Me(), [r, a] = K(!1), [i, o] = K(!1), [l, d] = K(null), { savePageAsync: u } = Ue(), [f, g] = K(!1), { data: h } = ue(), { mutate: y, isPending: T } = qs(), { needTranslations: A } = Ue(), S = A(), { buttonText: p, buttonClassName: v, isPublished: b } = q(() => {
1290
1294
  const w = h && (h == null ? void 0 : h.online);
1291
1295
  return {
@@ -1385,10 +1389,10 @@ const Xi = V(() => import("./unpublish-page-C0eahm0q.js")), eo = V(() => import(
1385
1389
  ] })
1386
1390
  ] })
1387
1391
  ] }),
1388
- /* @__PURE__ */ c(Wi, { showModal: r, onClose: () => a(!1) }),
1389
- l && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(Xi, { page: l, onClose: () => d(null) }) }),
1392
+ /* @__PURE__ */ c(ji, { showModal: r, onClose: () => a(!1) }),
1393
+ l && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(eo, { page: l, onClose: () => d(null) }) }),
1390
1394
  f && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
1391
- eo,
1395
+ to,
1392
1396
  {
1393
1397
  isOpen: f,
1394
1398
  onClose: Se,
@@ -1398,17 +1402,17 @@ const Xi = V(() => import("./unpublish-page-C0eahm0q.js")), eo = V(() => import(
1398
1402
  ) })
1399
1403
  ] });
1400
1404
  };
1401
- function ao() {
1402
- const { isLocked: e } = Ae(), [t] = be(), n = t.get("lang"), s = ji(n);
1405
+ function io() {
1406
+ const { isLocked: e } = Ae(), [t] = be(), n = t.get("lang"), s = Yi(n);
1403
1407
  return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
1404
- /* @__PURE__ */ c(Hi, {}),
1405
- /* @__PURE__ */ c(dn, { permission: de.EDIT_THEME, children: /* @__PURE__ */ c(no, {}) }),
1406
- /* @__PURE__ */ c(to, {}),
1407
- /* @__PURE__ */ c(dn, { permission: de.SAVE_PAGE, children: /* @__PURE__ */ c(so, {}) }),
1408
- /* @__PURE__ */ c(dn, { permission: de.PUBLISH_PAGE, children: /* @__PURE__ */ c(ro, {}) })
1408
+ /* @__PURE__ */ c(qi, {}),
1409
+ /* @__PURE__ */ c(dn, { permission: de.EDIT_THEME, children: /* @__PURE__ */ c(so, {}) }),
1410
+ /* @__PURE__ */ c(no, {}),
1411
+ /* @__PURE__ */ c(dn, { permission: de.SAVE_PAGE, children: /* @__PURE__ */ c(ro, {}) }),
1412
+ /* @__PURE__ */ c(dn, { permission: de.PUBLISH_PAGE, children: /* @__PURE__ */ c(ao, {}) })
1409
1413
  ] });
1410
1414
  }
1411
- const io = ({
1415
+ const oo = ({
1412
1416
  page: e,
1413
1417
  setDuplicatePage: t,
1414
1418
  setAddEditPage: n,
@@ -1431,7 +1435,7 @@ const io = ({
1431
1435
  A.stopPropagation(), t(e);
1432
1436
  },
1433
1437
  children: [
1434
- /* @__PURE__ */ c(Qa, { className: "size-3" }),
1438
+ /* @__PURE__ */ c(za, { className: "size-3" }),
1435
1439
  "Duplicate page"
1436
1440
  ]
1437
1441
  }
@@ -1447,7 +1451,7 @@ const io = ({
1447
1451
  });
1448
1452
  },
1449
1453
  children: [
1450
- /* @__PURE__ */ c(za, { className: "size-3" }),
1454
+ /* @__PURE__ */ c(Wa, { className: "size-3" }),
1451
1455
  "Edit"
1452
1456
  ]
1453
1457
  }
@@ -1460,7 +1464,7 @@ const io = ({
1460
1464
  A.stopPropagation(), s(e);
1461
1465
  },
1462
1466
  children: [
1463
- /* @__PURE__ */ c(Wa, { className: "size-3" }),
1467
+ /* @__PURE__ */ c(ja, { className: "size-3" }),
1464
1468
  d("Unpublish")
1465
1469
  ]
1466
1470
  }
@@ -1473,7 +1477,7 @@ const io = ({
1473
1477
  A.stopPropagation(), r(e);
1474
1478
  },
1475
1479
  children: [
1476
- /* @__PURE__ */ c(ja, { className: "size-3" }),
1480
+ /* @__PURE__ */ c(Ya, { className: "size-3" }),
1477
1481
  d("Delete")
1478
1482
  ]
1479
1483
  }
@@ -1505,7 +1509,7 @@ const io = ({
1505
1509
  ) })
1506
1510
  ] })
1507
1511
  ] });
1508
- }, oo = V(() => import("./add-new-page-DOPMVtXH.js")), lo = V(() => import("./delete-page-BFTuNSlS.js")), co = V(() => import("./duplicate-page-D4CtwyEj.js")), uo = V(() => import("./mark-as-template-4Ghoxl99.js")), fo = V(() => import("./unmark-as-template-DcHmjuVo.js")), ho = V(() => import("./unpublish-page-C0eahm0q.js")), go = () => {
1512
+ }, lo = V(() => import("./add-new-page-DLrGwmYr.js")), co = V(() => import("./delete-page-B_FVSHzp.js")), uo = V(() => import("./duplicate-page-CP14sxDs.js")), fo = V(() => import("./mark-as-template-Dm0Fuz9S.js")), ho = V(() => import("./unmark-as-template-Dxolty3v.js")), go = V(() => import("./unpublish-page-Ck3frwqy.js")), mo = () => {
1509
1513
  const [e, t] = K(null), [n, s] = K(null), [r, a] = K(null), [i, o] = K(null), [l, d] = K(null), [u, f] = K(null), { data: g, isFetching: h } = Ce(), { selectedLang: y, fallbackLang: T } = we(), { data: A } = Me(), S = A == null ? void 0 : A.find((L) => L.lang === y), { isLocked: p } = Ae(), v = !(g != null && g.slug), [, b] = oe(xn);
1510
1514
  if (!g) return null;
1511
1515
  const U = (L) => {
@@ -1523,7 +1527,7 @@ const io = ({
1523
1527
  className: "flex h-7 max-w-[200px] cursor-pointer items-center truncate rounded px-1 text-xs font-medium",
1524
1528
  variant: "ghost",
1525
1529
  children: h ? /* @__PURE__ */ c($t, { className: "h-4 w-4 animate-spin text-slate-400" }) : /* @__PURE__ */ m("span", { className: "flex w-full cursor-pointer items-end overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-xs font-medium", children: [
1526
- v ? /* @__PURE__ */ c(Ya, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Ja, { className: "mr-1 h-4 w-4" }),
1530
+ v ? /* @__PURE__ */ c(Ja, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Za, { className: "mr-1 h-4 w-4" }),
1527
1531
  H(S || g, "name") ?? ""
1528
1532
  ] })
1529
1533
  }
@@ -1537,7 +1541,7 @@ const io = ({
1537
1541
  children: /* @__PURE__ */ c(ns, { className: "h-4 w-4" })
1538
1542
  }
1539
1543
  ) : /* @__PURE__ */ c(
1540
- io,
1544
+ oo,
1541
1545
  {
1542
1546
  page: g,
1543
1547
  setDuplicatePage: (L) => d(L),
@@ -1552,7 +1556,7 @@ const io = ({
1552
1556
  )
1553
1557
  ] }),
1554
1558
  u && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
1555
- oo,
1559
+ lo,
1556
1560
  {
1557
1561
  closePanel: () => f(null),
1558
1562
  editPage: () => {
@@ -1561,12 +1565,12 @@ const io = ({
1561
1565
  setAddEditPage: f
1562
1566
  }
1563
1567
  ) }),
1564
- e && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(lo, { page: e, onClose: () => t(null) }) }),
1565
- n && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(ho, { page: n, onClose: () => s(null) }) }),
1566
- r && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(uo, { page: r, onClose: () => a(null) }) }),
1567
- i && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(fo, { page: i, onClose: () => o(null) }) }),
1568
+ e && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(co, { page: e, onClose: () => t(null) }) }),
1569
+ n && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(go, { page: n, onClose: () => s(null) }) }),
1570
+ r && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(fo, { page: r, onClose: () => a(null) }) }),
1571
+ i && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(ho, { page: i, onClose: () => o(null) }) }),
1568
1572
  l && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
1569
- co,
1573
+ uo,
1570
1574
  {
1571
1575
  page: l,
1572
1576
  onClose: () => d(null),
@@ -1583,17 +1587,17 @@ const io = ({
1583
1587
  ),
1584
1588
  children: e
1585
1589
  }
1586
- ), mo = ({ hasDynamicPage: e }) => /* @__PURE__ */ c($s, { children: /* @__PURE__ */ m("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: [
1590
+ ), Eo = ({ hasDynamicPage: e }) => /* @__PURE__ */ c($s, { children: /* @__PURE__ */ m("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: [
1587
1591
  /* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
1588
1592
  /* @__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" })
1589
- ] }) }), Eo = V(() => import("./dynamic-page-selector-B3LPjMt5.js")), po = () => {
1590
- const { dynamicPage: e, allLangPages: t, isFetching: n } = gi(), s = t.length > 0;
1593
+ ] }) }), po = V(() => import("./dynamic-page-selector-CyjVrx5y.js")), yo = () => {
1594
+ const { dynamicPage: e, allLangPages: t, isFetching: n } = mi(), s = t.length > 0;
1591
1595
  return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
1592
- !e && /* @__PURE__ */ c(mo, { hasDynamicPage: s }),
1593
- /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(Eo, {}) })
1596
+ !e && /* @__PURE__ */ c(Eo, { hasDynamicPage: s }),
1597
+ /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(po, {}) })
1594
1598
  ] });
1595
- }, yo = () => {
1596
- const { data: e, isFetching: t } = Ce(), { data: n, isFetching: s } = ue(), r = H(n, "dynamic", !1), a = Rn(), i = ra("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, d = yi(), u = t || s, g = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
1599
+ }, Ao = () => {
1600
+ const { data: e, isFetching: t } = Ce(), { data: n, isFetching: s } = ue(), r = H(n, "dynamic", !1), a = Rn(), i = aa("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, d = Ai(), u = t || s, g = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
1597
1601
  return /* @__PURE__ */ m("div", { className: "relative flex items-center gap-x-1", children: [
1598
1602
  /* @__PURE__ */ c(
1599
1603
  "div",
@@ -1602,7 +1606,7 @@ const io = ({
1602
1606
  "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",
1603
1607
  u && "max-w-0 overflow-hidden opacity-0"
1604
1608
  ),
1605
- children: /* @__PURE__ */ c(go, {})
1609
+ children: /* @__PURE__ */ c(mo, {})
1606
1610
  }
1607
1611
  ),
1608
1612
  /* @__PURE__ */ m(
@@ -1613,7 +1617,7 @@ const io = ({
1613
1617
  u && "max-w-0 overflow-hidden opacity-0"
1614
1618
  ),
1615
1619
  children: [
1616
- /* @__PURE__ */ c(Bi, {}),
1620
+ /* @__PURE__ */ c(Fi, {}),
1617
1621
  /* @__PURE__ */ m("div", { className: "flex w-full items-center overflow-hidden", children: [
1618
1622
  /* @__PURE__ */ c(
1619
1623
  "div",
@@ -1625,17 +1629,17 @@ const io = ({
1625
1629
  ] }) : g
1626
1630
  }
1627
1631
  ),
1628
- !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(Za, { className: "h-4 w-4", strokeWidth: 1 }) }) })
1632
+ !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(Xa, { className: "h-4 w-4", strokeWidth: 1 }) }) })
1629
1633
  ] })
1630
1634
  ]
1631
1635
  }
1632
1636
  ),
1633
- r && i && /* @__PURE__ */ c(po, {})
1637
+ r && i && /* @__PURE__ */ c(yo, {})
1634
1638
  ] });
1635
- }, Ao = () => /* @__PURE__ */ m("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
1636
- /* @__PURE__ */ c(Fi, {}),
1637
- /* @__PURE__ */ c(yo, {}),
1638
- /* @__PURE__ */ c(ao, {})
1639
+ }, To = () => /* @__PURE__ */ m("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
1640
+ /* @__PURE__ */ c(Ki, {}),
1641
+ /* @__PURE__ */ c(Ao, {}),
1642
+ /* @__PURE__ */ c(io, {})
1639
1643
  ] }), Qs = () => {
1640
1644
  const e = J(), { data: t } = re({
1641
1645
  queryKey: [E.AI_CONTEXT],
@@ -1649,7 +1653,7 @@ const io = ({
1649
1653
  },
1650
1654
  [e]
1651
1655
  ), aiContext: t };
1652
- }, To = () => {
1656
+ }, So = () => {
1653
1657
  const e = C(), { aiContext: t } = Qs(), n = I();
1654
1658
  return $(
1655
1659
  async (s, r, a, i) => n(e, {
@@ -1658,9 +1662,9 @@ const io = ({
1658
1662
  }),
1659
1663
  [e, t, n]
1660
1664
  );
1661
- }, So = (e, t) => t.map((n) => {
1665
+ }, _o = (e, t) => t.map((n) => {
1662
1666
  if (Zt(e, n._type)) {
1663
- const s = li(n._type);
1667
+ const s = ci(n._type);
1664
1668
  return {
1665
1669
  ...s,
1666
1670
  ...Nn(n, [
@@ -1676,18 +1680,18 @@ const io = ({
1676
1680
  };
1677
1681
  }
1678
1682
  return n;
1679
- }), _o = (e) => {
1680
- const t = oi();
1683
+ }), Po = (e) => {
1684
+ const t = li();
1681
1685
  return q(() => {
1682
1686
  if (!e || me(e)) return { blocks: [] };
1683
1687
  const n = vs(
1684
1688
  e,
1685
1689
  (s) => !Hr(s == null ? void 0 : s._type, "@chai/")
1686
1690
  );
1687
- return { blocks: So(t, n) };
1691
+ return { blocks: _o(t, n) };
1688
1692
  }, [e, t]);
1689
- }, Po = () => {
1690
- const [e] = be(), t = e.get("page"), n = C(), { setAiContext: s } = Qs(), [, r] = Us(), [, a] = pi(), [, i] = aa(), o = I();
1693
+ }, wo = () => {
1694
+ const [e] = be(), t = e.get("page"), n = C(), { setAiContext: s } = Qs(), [, r] = Us(), [, a] = yi(), [, i] = ia(), o = I();
1691
1695
  return re({
1692
1696
  queryKey: [E.GET_DRAFT_PAGE, t],
1693
1697
  staleTime: 1 / 0,
@@ -1702,7 +1706,7 @@ const io = ({
1702
1706
  },
1703
1707
  enabled: !!t
1704
1708
  });
1705
- }, wo = () => {
1709
+ }, vo = () => {
1706
1710
  const { data: e } = ue(), { data: t } = Ce(), n = C(), s = I(), r = Mn(), a = Rn();
1707
1711
  return re({
1708
1712
  queryKey: [E.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
@@ -1732,7 +1736,7 @@ const io = ({
1732
1736
  }),
1733
1737
  enabled: !!(e != null && e.pageType) && !!t.id
1734
1738
  });
1735
- }, vo = () => {
1739
+ }, bo = () => {
1736
1740
  const e = C(), t = J(), n = I();
1737
1741
  return Y({
1738
1742
  mutationFn: async (s) => n(e, {
@@ -1743,91 +1747,91 @@ const io = ({
1743
1747
  var a;
1744
1748
  t.invalidateQueries({
1745
1749
  queryKey: [E.GET_WEBSITE_DRAFT_SETTINGS]
1746
- }), (a = r == null ? void 0 : r.settings) != null && a.theme || k.success("Website settings updated successfully.");
1750
+ }), (a = r == null ? void 0 : r.settings) != null && a.theme || R.success("Website settings updated successfully.");
1747
1751
  },
1748
1752
  onError: (s) => {
1749
- k.error("Failed to update website settings", {
1753
+ R.error("Failed to update website settings", {
1750
1754
  description: s.message
1751
1755
  });
1752
1756
  }
1753
1757
  });
1754
- }, uu = () => {
1758
+ }, du = () => {
1755
1759
  const e = C(), t = J(), n = I(), { selectedLang: s } = we();
1756
1760
  return Y({
1757
1761
  mutationFn: async (r) => n(e, { action: E.ADD_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
1758
1762
  onSuccess: () => {
1759
1763
  t.invalidateQueries({
1760
1764
  queryKey: [E.GET_GLOBAL_JSONLD_ITEMS]
1761
- }), k.success("Schema added successfully.");
1765
+ }), R.success("Schema added successfully.");
1762
1766
  },
1763
1767
  onError: (r) => {
1764
- k.error("Failed to add schema", {
1768
+ R.error("Failed to add schema", {
1765
1769
  description: r.message
1766
1770
  });
1767
1771
  }
1768
1772
  });
1769
- }, du = () => {
1773
+ }, fu = () => {
1770
1774
  const e = C(), t = J(), n = I(), { selectedLang: s } = we();
1771
1775
  return Y({
1772
1776
  mutationFn: async (r) => n(e, { action: E.UPDATE_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
1773
1777
  onSuccess: () => {
1774
1778
  t.invalidateQueries({
1775
1779
  queryKey: [E.GET_GLOBAL_JSONLD_ITEMS]
1776
- }), k.success("Schema updated successfully.");
1780
+ }), R.success("Schema updated successfully.");
1777
1781
  },
1778
1782
  onError: (r) => {
1779
- k.error("Failed to update schema", {
1783
+ R.error("Failed to update schema", {
1780
1784
  description: r.message
1781
1785
  });
1782
1786
  }
1783
1787
  });
1784
- }, fu = () => {
1788
+ }, hu = () => {
1785
1789
  const e = C(), t = J(), n = I();
1786
1790
  return Y({
1787
1791
  mutationFn: async (s) => n(e, { action: E.DELETE_GLOBAL_SCHEMA, data: { id: s } }),
1788
1792
  onSuccess: () => {
1789
1793
  t.invalidateQueries({
1790
1794
  queryKey: [E.GET_GLOBAL_JSONLD_ITEMS]
1791
- }), k.success("Schema deleted successfully.");
1795
+ }), R.success("Schema deleted successfully.");
1792
1796
  },
1793
1797
  onError: (s) => {
1794
- k.error("Failed to delete schema", {
1798
+ R.error("Failed to delete schema", {
1795
1799
  description: s.message
1796
1800
  });
1797
1801
  }
1798
1802
  });
1799
- }, hu = () => {
1803
+ }, gu = () => {
1800
1804
  const e = C(), t = I();
1801
1805
  return Y({
1802
1806
  mutationFn: async (n) => t(e, { action: E.TOGGLE_PAGE_GLOBAL_SCHEMA, data: n }),
1803
1807
  onError: (n) => {
1804
- k.error("Failed to toggle schema", {
1808
+ R.error("Failed to toggle schema", {
1805
1809
  description: n.message
1806
1810
  });
1807
1811
  }
1808
1812
  });
1809
- }, gu = () => {
1813
+ }, mu = () => {
1810
1814
  const e = C(), t = I();
1811
1815
  return Y({
1812
1816
  mutationFn: async (n) => t(e, { action: E.APPLY_SCHEMA_TO_ALL_PAGES, data: { schemaId: n } }),
1813
1817
  onSuccess: (n) => {
1814
- k.success(`Schema applied to ${n.count} page(s)`);
1818
+ R.success(`Schema applied to ${n.count} page(s)`);
1815
1819
  },
1816
1820
  onError: (n) => {
1817
- k.error("Failed to apply schema to all pages", {
1821
+ R.error("Failed to apply schema to all pages", {
1818
1822
  description: n.message
1819
1823
  });
1820
1824
  }
1821
1825
  });
1822
- }, mu = () => {
1826
+ }, Eu = () => {
1823
1827
  const e = C(), t = I();
1824
1828
  return Y({
1825
1829
  mutationFn: async (n) => t(e, { action: E.REMOVE_SCHEMA_FROM_ALL_PAGES, data: { schemaId: n } }),
1826
1830
  onSuccess: (n) => {
1827
- k.success(`Schema removed from ${n.count} page(s)`);
1831
+ R.success(`Schema removed from ${n.count} page(s)`);
1828
1832
  },
1829
1833
  onError: (n) => {
1830
- k.error("Failed to remove schema from all pages", {
1834
+ R.error("Failed to remove schema from all pages", {
1831
1835
  description: n.message
1832
1836
  });
1833
1837
  }
@@ -1838,7 +1842,7 @@ const io = ({
1838
1842
  action: "GET_LIBRARY_ITEM",
1839
1843
  data: { id: e.id }
1840
1844
  }), r = H(s, "html", ""), a = H(s, "blocks", []);
1841
- return zr(a) ? a : oa(r);
1845
+ return zr(a) ? a : la(r);
1842
1846
  },
1843
1847
  async getUILibraryBlocks(e, t, n) {
1844
1848
  try {
@@ -1852,7 +1856,7 @@ const io = ({
1852
1856
  return console.error(s), [];
1853
1857
  }
1854
1858
  }
1855
- }, bo = () => {
1859
+ }, Io = () => {
1856
1860
  const e = C(), t = I();
1857
1861
  return re({
1858
1862
  queryKey: ["uiLibraries"],
@@ -1862,7 +1866,7 @@ const io = ({
1862
1866
  ...r
1863
1867
  }));
1864
1868
  return s.forEach((r) => {
1865
- ia(r.id, {
1869
+ oa(r.id, {
1866
1870
  name: r.isSiteLibrary ? r.name + " (Current Site) " : r.name,
1867
1871
  description: r.description,
1868
1872
  getBlocksList: (a) => as.getUILibraryBlocks(a, t, e),
@@ -1871,7 +1875,7 @@ const io = ({
1871
1875
  }), s;
1872
1876
  }
1873
1877
  });
1874
- }, Io = () => {
1878
+ }, Lo = () => {
1875
1879
  const e = Ds(), t = I(), { user: n } = kn(), s = n == null ? void 0 : n.id;
1876
1880
  return re({
1877
1881
  queryKey: [E.GET_ROLE_AND_PERMISSIONS, s],
@@ -1882,13 +1886,17 @@ const io = ({
1882
1886
  enabled: !!s,
1883
1887
  staleTime: 1 / 0
1884
1888
  });
1885
- }, Lo = () => {
1889
+ }, No = () => {
1886
1890
  const e = C(), t = I(), [, n] = Us();
1887
1891
  return { onSave: async ({
1888
1892
  page: r,
1889
1893
  blocks: a,
1890
1894
  needTranslations: i
1891
1895
  }) => {
1896
+ if (!a || a.length === 0) {
1897
+ R.warning("Page is empty");
1898
+ return;
1899
+ }
1892
1900
  try {
1893
1901
  const o = await t(e, {
1894
1902
  action: "UPDATE_PAGE",
@@ -1899,10 +1907,10 @@ const io = ({
1899
1907
  lastSaved: (/* @__PURE__ */ new Date()).toISOString()
1900
1908
  })), o);
1901
1909
  } catch (o) {
1902
- return console.error(o), new Error("Failed to save blocks");
1910
+ return console.error(o), R.error("Failed to save blocks"), new Error("Failed to save blocks");
1903
1911
  }
1904
1912
  } };
1905
- }, No = () => {
1913
+ }, Co = () => {
1906
1914
  const { data: e } = Vs(), t = C(), n = I();
1907
1915
  return {
1908
1916
  getPartialBlocks: $(async () => {
@@ -1931,7 +1939,7 @@ const io = ({
1931
1939
  [n, t]
1932
1940
  )
1933
1941
  };
1934
- }, Co = V(() => import("./ai-panel-content-Cw7KS8Iz.js").then((e) => e.b)), zs = "chai-chat-panel", Go = ({ className: e = "h-full w-full" }) => /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", version: "1.1", className: e, children: [
1942
+ }, Go = V(() => import("./ai-panel-content-CUjNtVa0.js").then((e) => e.b)), zs = "chai-chat-panel", Oo = ({ className: e = "h-full w-full" }) => /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", version: "1.1", className: e, children: [
1935
1943
  /* @__PURE__ */ c("title", { children: "ai" }),
1936
1944
  /* @__PURE__ */ c("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ c("g", { id: "icon", fill: "currentColor", transform: "translate(64.000000, 64.000000)", children: /* @__PURE__ */ c(
1937
1945
  "path",
@@ -1940,25 +1948,25 @@ const io = ({
1940
1948
  id: "Combined-Shape"
1941
1949
  }
1942
1950
  ) }) })
1943
- ] }), Oo = ({ isActive: e, show: t }) => /* @__PURE__ */ c(M, { size: "icon", className: "p-0 [&_svg]:size-6", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(Go, { className: e ? "h-5 w-5 text-white" : "h-5 w-5 text-primary" }) }), Do = {
1951
+ ] }), Do = ({ isActive: e, show: t }) => /* @__PURE__ */ c(M, { size: "icon", className: "p-0 [&_svg]:size-6", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(Oo, { className: e ? "h-5 w-5 text-white" : "h-5 w-5 text-primary" }) }), Ro = {
1944
1952
  id: zs,
1945
1953
  label: "AI Assistant",
1946
- button: Oo,
1947
- panel: Co,
1954
+ button: Do,
1955
+ panel: Go,
1948
1956
  position: "top"
1949
- }, Ro = V(() => import("./lang-panel-RnkbDv6w.js")), xo = ({ isActive: e, show: t }) => {
1957
+ }, xo = V(() => import("./lang-panel-Bu5MBxrO.js")), ko = ({ isActive: e, show: t }) => {
1950
1958
  const { data: n } = Be();
1951
- return !Zt(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(Xa, { className: "h-4 w-4" }) });
1952
- }, Ws = "lang", ko = {
1959
+ return !Zt(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(ei, { className: "h-4 w-4" }) });
1960
+ }, Ws = "lang", Uo = {
1953
1961
  id: Ws,
1954
1962
  label: "Languages",
1955
1963
  position: "top",
1956
- panel: Ro,
1957
- button: xo,
1964
+ panel: xo,
1965
+ button: ko,
1958
1966
  view: "modal",
1959
1967
  width: 400
1960
- }, Uo = V(() => import("./seo-panel-CY1S1tpO.js")), js = "seo", Mo = ({ isActive: e, show: t }) => {
1961
- const { data: n } = ue(), s = $i(n == null ? void 0 : n.pageType);
1968
+ }, Mo = V(() => import("./seo-panel-Bkr8hgzx.js")), js = "seo", Bo = ({ isActive: e, show: t }) => {
1969
+ const { data: n } = ue(), s = Qi(n == null ? void 0 : n.pageType);
1962
1970
  return !Zt(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
1963
1971
  "svg",
1964
1972
  {
@@ -1977,32 +1985,32 @@ const io = ({
1977
1985
  ]
1978
1986
  }
1979
1987
  ) });
1980
- }, Bo = {
1988
+ }, Fo = {
1981
1989
  id: js,
1982
1990
  label: "SEO",
1983
- panel: Uo,
1984
- button: Mo,
1991
+ panel: Mo,
1992
+ button: Bo,
1985
1993
  position: "top",
1986
1994
  width: 600,
1987
1995
  view: "modal"
1988
- }, Ys = "user-info", Fo = () => {
1996
+ }, Ys = "user-info", Ko = () => {
1989
1997
  const { t: e } = ve(), { user: t, logout: n } = kn(), s = ce("onLogout", Ts);
1990
- return t ? /* @__PURE__ */ m(pa, { children: [
1991
- /* @__PURE__ */ c(ya, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(ei, { className: "h-4 w-4" }) }) }),
1992
- /* @__PURE__ */ m(Aa, { className: "w-auto space-y-2 p-4", children: [
1998
+ return t ? /* @__PURE__ */ m(ya, { children: [
1999
+ /* @__PURE__ */ c(Aa, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(ti, { className: "h-4 w-4" }) }) }),
2000
+ /* @__PURE__ */ m(Ta, { className: "w-auto space-y-2 p-4", children: [
1993
2001
  /* @__PURE__ */ c("div", { className: "text-sm font-medium", children: t.name ?? t.email }),
1994
2002
  /* @__PURE__ */ c("div", { className: "text-xs text-muted-foreground", children: t.email }),
1995
- /* @__PURE__ */ m(Ta, { children: [
1996
- /* @__PURE__ */ c(Sa, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "outline", size: "sm", className: "w-full", children: e("Logout") }) }),
1997
- /* @__PURE__ */ m(_a, { children: [
1998
- /* @__PURE__ */ m(Pa, { children: [
1999
- /* @__PURE__ */ c(wa, { children: e("Are you sure you want to logout?") }),
2000
- /* @__PURE__ */ c(va, { children: e("You will be redirected to the login page.") })
2003
+ /* @__PURE__ */ m(Sa, { children: [
2004
+ /* @__PURE__ */ c(_a, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "outline", size: "sm", className: "w-full", children: e("Logout") }) }),
2005
+ /* @__PURE__ */ m(Pa, { children: [
2006
+ /* @__PURE__ */ m(wa, { children: [
2007
+ /* @__PURE__ */ c(va, { children: e("Are you sure you want to logout?") }),
2008
+ /* @__PURE__ */ c(ba, { children: e("You will be redirected to the login page.") })
2001
2009
  ] }),
2002
- /* @__PURE__ */ m(ba, { children: [
2003
- /* @__PURE__ */ c(Ia, { children: e("Cancel") }),
2010
+ /* @__PURE__ */ m(Ia, { children: [
2011
+ /* @__PURE__ */ c(La, { children: e("Cancel") }),
2004
2012
  /* @__PURE__ */ c(
2005
- La,
2013
+ Na,
2006
2014
  {
2007
2015
  onClick: () => {
2008
2016
  n(), jr(s) && s();
@@ -2015,13 +2023,13 @@ const io = ({
2015
2023
  ] })
2016
2024
  ] })
2017
2025
  ] }) : null;
2018
- }, Ko = {
2026
+ }, Vo = {
2019
2027
  id: Ys,
2020
2028
  label: "User Info",
2021
- button: Fo,
2029
+ button: Ko,
2022
2030
  position: "bottom"
2023
- }, Vo = () => {
2024
- Dt(js, Bo), Dt(Ws, ko), Dt(Ys, Ko), (localStorage.getItem("chai-feature-flags") ?? "").includes("enable-ai-chat-panel") && Dt(zs, Do);
2031
+ }, Ho = () => {
2032
+ Dt(js, Fo), Dt(Ws, Uo), Dt(Ys, Vo), (localStorage.getItem("chai-feature-flags") ?? "").includes("enable-ai-chat-panel") && Dt(zs, Ro);
2025
2033
  };
2026
2034
  var P = {
2027
2035
  context: void 0,
@@ -2042,26 +2050,26 @@ function is(e) {
2042
2050
  function lt(e) {
2043
2051
  P.context = e;
2044
2052
  }
2045
- var Js = !1, Ho = (e, t) => e === t, Qt = Symbol("solid-proxy"), Zs = typeof Proxy == "function", Xs = Symbol("solid-track"), zt = {
2046
- equals: Ho
2053
+ var Js = !1, qo = (e, t) => e === t, Qt = Symbol("solid-proxy"), Zs = typeof Proxy == "function", Xs = Symbol("solid-track"), zt = {
2054
+ equals: qo
2047
2055
  }, er = or, Ie = 1, Wt = 2, tr = {
2048
2056
  owned: null,
2049
2057
  cleanups: null,
2050
2058
  context: null,
2051
2059
  owner: null
2052
- }, hn = {}, G = null, gn = null, qo = null, R = null, ee = null, Pe = null, sn = 0;
2060
+ }, hn = {}, G = null, gn = null, $o = null, x = null, ee = null, Pe = null, sn = 0;
2053
2061
  function xe(e, t) {
2054
- const n = R, s = G, r = e.length === 0, a = t === void 0 ? s : t, i = r ? tr : {
2062
+ const n = x, s = G, r = e.length === 0, a = t === void 0 ? s : t, i = r ? tr : {
2055
2063
  owned: null,
2056
2064
  cleanups: null,
2057
2065
  context: a ? a.context : null,
2058
2066
  owner: a
2059
2067
  }, o = r ? e : () => e(() => Z(() => ft(i)));
2060
- G = i, R = null;
2068
+ G = i, x = null;
2061
2069
  try {
2062
2070
  return pe(o, !0);
2063
2071
  } finally {
2064
- R = n, G = s;
2072
+ x = n, G = s;
2065
2073
  }
2066
2074
  }
2067
2075
  function F(e, t) {
@@ -2074,7 +2082,7 @@ function F(e, t) {
2074
2082
  }, s = (r) => (typeof r == "function" && (r = r(n.value)), ir(n, r));
2075
2083
  return [ar.bind(n), s];
2076
2084
  }
2077
- function $o(e, t, n) {
2085
+ function Qo(e, t, n) {
2078
2086
  const s = rn(e, t, !0, Ie);
2079
2087
  it(s);
2080
2088
  }
@@ -2083,7 +2091,7 @@ function ke(e, t, n) {
2083
2091
  it(s);
2084
2092
  }
2085
2093
  function nr(e, t, n) {
2086
- er = el;
2094
+ er = tl;
2087
2095
  const s = rn(e, t, !1, Ie);
2088
2096
  (!n || !n.render) && (s.user = !0), Pe ? Pe.push(s) : it(s);
2089
2097
  }
@@ -2092,10 +2100,10 @@ function j(e, t, n) {
2092
2100
  const s = rn(e, t, !0, 0);
2093
2101
  return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, it(s), ar.bind(s);
2094
2102
  }
2095
- function Qo(e) {
2103
+ function zo(e) {
2096
2104
  return e && typeof e == "object" && "then" in e;
2097
2105
  }
2098
- function zo(e, t, n) {
2106
+ function Wo(e, t, n) {
2099
2107
  let s, r, a;
2100
2108
  s = !0, r = e, a = {};
2101
2109
  let i = null, o = hn, l = null, d = !1, u = "initialValue" in a, f = typeof s == "function" && j(s);
@@ -2116,9 +2124,9 @@ function zo(e, t, n) {
2116
2124
  }, !1);
2117
2125
  }
2118
2126
  function Te() {
2119
- const w = Jo, N = h(), W = T();
2127
+ const w = Zo, N = h(), W = T();
2120
2128
  if (W !== void 0 && !i) throw W;
2121
- return R && R.user, N;
2129
+ return x && x.user, N;
2122
2130
  }
2123
2131
  function Se(w = !0) {
2124
2132
  if (w !== !1 && d) return;
@@ -2142,7 +2150,7 @@ function zo(e, t, n) {
2142
2150
  if (W !== void 0) {
2143
2151
  U(i, void 0, Kt(W), N);
2144
2152
  return;
2145
- } else if (!Qo(Q))
2153
+ } else if (!zo(Q))
2146
2154
  return U(i, Q, void 0, N), Q;
2147
2155
  return i = Q, "v" in Q ? (Q.s === 1 ? U(i, Q.v, void 0, N) : U(i, void 0, Kt(Q.v), N), Q) : (d = !0, queueMicrotask(() => d = !1), pe(() => {
2148
2156
  b(u ? "refreshing" : "pending"), p();
@@ -2171,25 +2179,25 @@ function zo(e, t, n) {
2171
2179
  }
2172
2180
  });
2173
2181
  let B = G;
2174
- return f ? $o(() => (B = G, Se(!1))) : Se(!1), [Te, {
2182
+ return f ? Qo(() => (B = G, Se(!1))) : Se(!1), [Te, {
2175
2183
  refetch: (w) => sr(B, () => Se(w)),
2176
2184
  mutate: y
2177
2185
  }];
2178
2186
  }
2179
- function Eu(e) {
2187
+ function pu(e) {
2180
2188
  return pe(e, !1);
2181
2189
  }
2182
2190
  function Z(e) {
2183
- if (R === null) return e();
2184
- const t = R;
2185
- R = null;
2191
+ if (x === null) return e();
2192
+ const t = x;
2193
+ x = null;
2186
2194
  try {
2187
2195
  return e();
2188
2196
  } finally {
2189
- R = t;
2197
+ x = t;
2190
2198
  }
2191
2199
  }
2192
- function pu(e, t, n) {
2200
+ function yu(e, t, n) {
2193
2201
  const s = Array.isArray(e);
2194
2202
  let r, a = n && n.defer;
2195
2203
  return (i) => {
@@ -2204,7 +2212,7 @@ function pu(e, t, n) {
2204
2212
  return r = o, l;
2205
2213
  };
2206
2214
  }
2207
- function Wo(e) {
2215
+ function jo(e) {
2208
2216
  nr(() => Z(e));
2209
2217
  }
2210
2218
  function dt(e) {
@@ -2214,37 +2222,37 @@ function os() {
2214
2222
  return G;
2215
2223
  }
2216
2224
  function sr(e, t) {
2217
- const n = G, s = R;
2218
- G = e, R = null;
2225
+ const n = G, s = x;
2226
+ G = e, x = null;
2219
2227
  try {
2220
2228
  return pe(t, !0);
2221
2229
  } catch (r) {
2222
2230
  Fn(r);
2223
2231
  } finally {
2224
- G = n, R = s;
2232
+ G = n, x = s;
2225
2233
  }
2226
2234
  }
2227
- function jo(e) {
2228
- const t = R, n = G;
2235
+ function Yo(e) {
2236
+ const t = x, n = G;
2229
2237
  return Promise.resolve().then(() => {
2230
- R = t, G = n;
2238
+ x = t, G = n;
2231
2239
  let s;
2232
- return pe(e, !1), R = G = null, s ? s.done : void 0;
2240
+ return pe(e, !1), x = G = null, s ? s.done : void 0;
2233
2241
  });
2234
2242
  }
2235
- var [Yo, yu] = /* @__PURE__ */ F(!1);
2236
- function Au() {
2237
- return [Yo, jo];
2243
+ var [Jo, Au] = /* @__PURE__ */ F(!1);
2244
+ function Tu() {
2245
+ return [Jo, Yo];
2238
2246
  }
2239
- function Tu(e, t) {
2247
+ function Su(e, t) {
2240
2248
  const n = Symbol("context");
2241
2249
  return {
2242
2250
  id: n,
2243
- Provider: tl(n),
2251
+ Provider: nl(n),
2244
2252
  defaultValue: e
2245
2253
  };
2246
2254
  }
2247
- function Su(e) {
2255
+ function _u(e) {
2248
2256
  let t;
2249
2257
  return G && G.context && (t = G.context[e.id]) !== void 0 ? t : e.defaultValue;
2250
2258
  }
@@ -2255,7 +2263,7 @@ function rr(e) {
2255
2263
  return Array.isArray(s) ? s : s != null ? [s] : [];
2256
2264
  }, n;
2257
2265
  }
2258
- var Jo;
2266
+ var Zo;
2259
2267
  function ar() {
2260
2268
  if (this.sources && this.state)
2261
2269
  if (this.state === Ie) it(this);
@@ -2263,9 +2271,9 @@ function ar() {
2263
2271
  const e = ee;
2264
2272
  ee = null, pe(() => Yt(this), !1), ee = e;
2265
2273
  }
2266
- if (R) {
2274
+ if (x) {
2267
2275
  const e = this.observers ? this.observers.length : 0;
2268
- R.sources ? (R.sources.push(this), R.sourceSlots.push(e)) : (R.sources = [this], R.sourceSlots = [e]), this.observers ? (this.observers.push(R), this.observerSlots.push(R.sources.length - 1)) : (this.observers = [R], this.observerSlots = [R.sources.length - 1]);
2276
+ x.sources ? (x.sources.push(this), x.sourceSlots.push(e)) : (x.sources = [this], x.sourceSlots = [e]), this.observers ? (this.observers.push(x), this.observerSlots.push(x.sources.length - 1)) : (this.observers = [x], this.observerSlots = [x.sources.length - 1]);
2269
2277
  }
2270
2278
  return this.value;
2271
2279
  }
@@ -2284,18 +2292,18 @@ function it(e) {
2284
2292
  if (!e.fn) return;
2285
2293
  ft(e);
2286
2294
  const t = sn;
2287
- Zo(e, e.value, t);
2295
+ Xo(e, e.value, t);
2288
2296
  }
2289
- function Zo(e, t, n) {
2297
+ function Xo(e, t, n) {
2290
2298
  let s;
2291
- const r = G, a = R;
2292
- R = G = e;
2299
+ const r = G, a = x;
2300
+ x = G = e;
2293
2301
  try {
2294
2302
  s = e.fn(t);
2295
2303
  } catch (i) {
2296
2304
  return e.pure && (e.state = Ie, e.owned && e.owned.forEach(ft), e.owned = null), e.updatedAt = n + 1, Fn(i);
2297
2305
  } finally {
2298
- R = a, G = r;
2306
+ x = a, G = r;
2299
2307
  }
2300
2308
  (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? ir(e, s) : e.value = s, e.updatedAt = n);
2301
2309
  }
@@ -2336,12 +2344,12 @@ function pe(e, t) {
2336
2344
  t || (ee = []), Pe ? n = !0 : Pe = [], sn++;
2337
2345
  try {
2338
2346
  const s = e();
2339
- return Xo(n), s;
2347
+ return el(n), s;
2340
2348
  } catch (s) {
2341
2349
  n || (Pe = null), ee = null, Fn(s);
2342
2350
  }
2343
2351
  }
2344
- function Xo(e) {
2352
+ function el(e) {
2345
2353
  if (ee && (or(ee), ee = null), e) return;
2346
2354
  const t = Pe;
2347
2355
  Pe = null, t.length && pe(() => er(t), !1);
@@ -2349,7 +2357,7 @@ function Xo(e) {
2349
2357
  function or(e) {
2350
2358
  for (let t = 0; t < e.length; t++) jt(e[t]);
2351
2359
  }
2352
- function el(e) {
2360
+ function tl(e) {
2353
2361
  let t, n = 0;
2354
2362
  for (t = 0; t < e.length; t++) {
2355
2363
  const s = e[t];
@@ -2424,7 +2432,7 @@ function An(e) {
2424
2432
  }
2425
2433
  return e;
2426
2434
  }
2427
- function tl(e, t) {
2435
+ function nl(e, t) {
2428
2436
  return function(s) {
2429
2437
  let r;
2430
2438
  return ke(() => r = Z(() => (G.context = {
@@ -2437,7 +2445,7 @@ var Tn = Symbol("fallback");
2437
2445
  function Jt(e) {
2438
2446
  for (let t = 0; t < e.length; t++) e[t]();
2439
2447
  }
2440
- function nl(e, t, n = {}) {
2448
+ function sl(e, t, n = {}) {
2441
2449
  let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
2442
2450
  return dt(() => Jt(a)), () => {
2443
2451
  let l = e() || [], d = l.length, u, f;
@@ -2472,7 +2480,7 @@ function nl(e, t, n = {}) {
2472
2480
  }
2473
2481
  };
2474
2482
  }
2475
- function sl(e, t, n = {}) {
2483
+ function rl(e, t, n = {}) {
2476
2484
  let s = [], r = [], a = [], i = [], o = 0, l;
2477
2485
  return dt(() => Jt(a)), () => {
2478
2486
  const d = e() || [], u = d.length;
@@ -2525,7 +2533,7 @@ var Sn = {
2525
2533
  function mn(e) {
2526
2534
  return (e = typeof e == "function" ? e() : e) ? e : {};
2527
2535
  }
2528
- function rl() {
2536
+ function al() {
2529
2537
  for (let e = 0, t = this.length; e < t; ++e) {
2530
2538
  const n = this[e]();
2531
2539
  if (n !== void 0) return n;
@@ -2569,7 +2577,7 @@ function ur(...e) {
2569
2577
  s[u] = f.get ? {
2570
2578
  enumerable: !0,
2571
2579
  configurable: !0,
2572
- get: rl.bind(n[u] = [f.get.bind(o)])
2580
+ get: al.bind(n[u] = [f.get.bind(o)])
2573
2581
  } : f.value !== void 0 ? f : void 0;
2574
2582
  else {
2575
2583
  const g = n[u];
@@ -2584,7 +2592,7 @@ function ur(...e) {
2584
2592
  }
2585
2593
  return r;
2586
2594
  }
2587
- function al(e, ...t) {
2595
+ function il(e, ...t) {
2588
2596
  if (Zs && Qt in e) {
2589
2597
  const r = new Set(t.length > 1 ? t.flat() : t[0]), a = t.map((i) => new Proxy({
2590
2598
  get(o) {
@@ -2629,7 +2637,7 @@ function dr(e) {
2629
2637
  !P.done && lt(a), P.count--, l(() => d.default), lt();
2630
2638
  }), t = o;
2631
2639
  } else if (!t) {
2632
- const [o] = zo(() => (n || (n = e())).then((l) => l.default));
2640
+ const [o] = Wo(() => (n || (n = e())).then((l) => l.default));
2633
2641
  t = o;
2634
2642
  }
2635
2643
  let i;
@@ -2643,24 +2651,24 @@ function dr(e) {
2643
2651
  };
2644
2652
  return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
2645
2653
  }
2646
- var il = 0;
2647
- function _u() {
2648
- return P.context ? P.getNextContextId() : `cl-${il++}`;
2654
+ var ol = 0;
2655
+ function Pu() {
2656
+ return P.context ? P.getNextContextId() : `cl-${ol++}`;
2649
2657
  }
2650
2658
  var fr = (e) => `Stale read from <${e}>.`;
2651
- function Pu(e) {
2659
+ function wu(e) {
2652
2660
  const t = "fallback" in e && {
2653
2661
  fallback: () => e.fallback
2654
2662
  };
2655
- return j(nl(() => e.each, e.children, t || void 0));
2663
+ return j(sl(() => e.each, e.children, t || void 0));
2656
2664
  }
2657
- function wu(e) {
2665
+ function vu(e) {
2658
2666
  const t = "fallback" in e && {
2659
2667
  fallback: () => e.fallback
2660
2668
  };
2661
- return j(sl(() => e.each, e.children, t || void 0));
2669
+ return j(rl(() => e.each, e.children, t || void 0));
2662
2670
  }
2663
- function vu(e) {
2671
+ function bu(e) {
2664
2672
  const t = e.keyed, n = j(() => e.when, void 0, void 0), s = t ? n : j(n, void 0, {
2665
2673
  equals: (r, a) => !r == !a
2666
2674
  });
@@ -2676,7 +2684,7 @@ function vu(e) {
2676
2684
  return e.fallback;
2677
2685
  }, void 0, void 0);
2678
2686
  }
2679
- function bu(e) {
2687
+ function Iu(e) {
2680
2688
  const t = rr(() => e.children), n = j(() => {
2681
2689
  const s = t(), r = Array.isArray(s) ? s : [s];
2682
2690
  let a = () => {
@@ -2700,13 +2708,13 @@ function bu(e) {
2700
2708
  })) : o;
2701
2709
  }, void 0, void 0);
2702
2710
  }
2703
- function Iu(e) {
2711
+ function Lu(e) {
2704
2712
  return e;
2705
2713
  }
2706
- var ol = ["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"], ll = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...ol]), cl = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), ul = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
2714
+ var ll = ["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"], cl = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...ll]), ul = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), dl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
2707
2715
  className: "class",
2708
2716
  htmlFor: "for"
2709
- }), dl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
2717
+ }), fl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
2710
2718
  class: "className",
2711
2719
  novalidate: {
2712
2720
  $: "noValidate",
@@ -2735,11 +2743,11 @@ var ol = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
2735
2743
  TEXTAREA: 1
2736
2744
  }
2737
2745
  });
2738
- function fl(e, t) {
2739
- const n = dl[e];
2746
+ function hl(e, t) {
2747
+ const n = fl[e];
2740
2748
  return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
2741
2749
  }
2742
- var hl = /* @__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"]), gl = /* @__PURE__ */ new Set([
2750
+ var gl = /* @__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"]), ml = /* @__PURE__ */ new Set([
2743
2751
  "altGlyph",
2744
2752
  "altGlyphDef",
2745
2753
  "altGlyphItem",
@@ -2817,11 +2825,11 @@ var hl = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
2817
2825
  "use",
2818
2826
  "view",
2819
2827
  "vkern"
2820
- ]), ml = {
2828
+ ]), El = {
2821
2829
  xlink: "http://www.w3.org/1999/xlink",
2822
2830
  xml: "http://www.w3.org/XML/1998/namespace"
2823
- }, Lu = (e) => j(() => e());
2824
- function El(e, t, n) {
2831
+ }, Nu = (e) => j(() => e());
2832
+ function pl(e, t, n) {
2825
2833
  let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling, d = null;
2826
2834
  for (; i < r || o < a; ) {
2827
2835
  if (t[i] === n[o]) {
@@ -2869,7 +2877,7 @@ function hr(e, t, n, s = {}) {
2869
2877
  r(), t.textContent = "";
2870
2878
  };
2871
2879
  }
2872
- function Nu(e, t, n, s) {
2880
+ function Cu(e, t, n, s) {
2873
2881
  let r;
2874
2882
  const a = () => {
2875
2883
  const o = document.createElement("template");
@@ -2877,14 +2885,14 @@ function Nu(e, t, n, s) {
2877
2885
  }, i = () => (r || (r = a())).cloneNode(!0);
2878
2886
  return i.cloneNode = i, i;
2879
2887
  }
2880
- function pl(e, t = window.document) {
2888
+ function yl(e, t = window.document) {
2881
2889
  const n = t[ct] || (t[ct] = /* @__PURE__ */ new Set());
2882
2890
  for (let s = 0, r = e.length; s < r; s++) {
2883
2891
  const a = e[s];
2884
2892
  n.has(a) || (n.add(a), t.addEventListener(a, gr));
2885
2893
  }
2886
2894
  }
2887
- function Cu(e = window.document) {
2895
+ function Gu(e = window.document) {
2888
2896
  if (e[ct]) {
2889
2897
  for (let t of e[ct].keys()) e.removeEventListener(t, gr);
2890
2898
  delete e[ct];
@@ -2893,16 +2901,16 @@ function Cu(e = window.document) {
2893
2901
  function _n(e, t, n) {
2894
2902
  Fe(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
2895
2903
  }
2896
- function yl(e, t, n, s) {
2904
+ function Al(e, t, n, s) {
2897
2905
  Fe(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
2898
2906
  }
2899
- function Al(e, t, n) {
2907
+ function Tl(e, t, n) {
2900
2908
  Fe(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
2901
2909
  }
2902
- function Tl(e, t) {
2910
+ function Sl(e, t) {
2903
2911
  Fe(e) || (t == null ? e.removeAttribute("class") : e.className = t);
2904
2912
  }
2905
- function Sl(e, t, n, s) {
2913
+ function _l(e, t, n, s) {
2906
2914
  if (s)
2907
2915
  Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
2908
2916
  else if (Array.isArray(n)) {
@@ -2910,7 +2918,7 @@ function Sl(e, t, n, s) {
2910
2918
  e.addEventListener(t, n[0] = (a) => r.call(e, n[1], a));
2911
2919
  } else e.addEventListener(t, n, typeof n != "function" && n);
2912
2920
  }
2913
- function _l(e, t, n = {}) {
2921
+ function Pl(e, t, n = {}) {
2914
2922
  const s = Object.keys(t || {}), r = Object.keys(n);
2915
2923
  let a, i;
2916
2924
  for (a = 0, i = r.length; a < i; a++) {
@@ -2923,7 +2931,7 @@ function _l(e, t, n = {}) {
2923
2931
  }
2924
2932
  return n;
2925
2933
  }
2926
- function Pl(e, t, n) {
2934
+ function wl(e, t, n) {
2927
2935
  if (!t) return n ? _n(e, "style") : t;
2928
2936
  const s = e.style;
2929
2937
  if (typeof t == "string") return s.cssText = t;
@@ -2935,18 +2943,18 @@ function Pl(e, t, n) {
2935
2943
  r = t[a], r !== n[a] && (s.setProperty(a, r), n[a] = r);
2936
2944
  return n;
2937
2945
  }
2938
- function wl(e, t = {}, n, s) {
2946
+ function vl(e, t = {}, n, s) {
2939
2947
  const r = {};
2940
- return s || ke(() => r.children = ht(e, t.children, r.children)), ke(() => typeof t.ref == "function" && vl(t.ref, e)), ke(() => bl(e, t, n, !0, r, !0)), r;
2948
+ return s || ke(() => r.children = ht(e, t.children, r.children)), ke(() => typeof t.ref == "function" && bl(t.ref, e)), ke(() => Il(e, t, n, !0, r, !0)), r;
2941
2949
  }
2942
- function vl(e, t, n) {
2950
+ function bl(e, t, n) {
2943
2951
  return Z(() => e(t, n));
2944
2952
  }
2945
2953
  function Pn(e, t, n, s) {
2946
2954
  if (n !== void 0 && !s && (s = []), typeof t != "function") return ht(e, t, s, n);
2947
2955
  ke((r) => ht(e, t(), r, n), s);
2948
2956
  }
2949
- function bl(e, t, n, s, r = {}, a = !1) {
2957
+ function Il(e, t, n, s, r = {}, a = !1) {
2950
2958
  t || (t = {});
2951
2959
  for (const i in r)
2952
2960
  if (!(i in t)) {
@@ -2960,14 +2968,14 @@ function bl(e, t, n, s, r = {}, a = !1) {
2960
2968
  r[i] = cs(e, i, o, r[i], n, a, t);
2961
2969
  }
2962
2970
  }
2963
- function Il(e) {
2971
+ function Ll(e) {
2964
2972
  let t, n;
2965
- return !Fe() || !(t = P.registry.get(n = Nl())) ? e() : (P.completed && P.completed.add(t), P.registry.delete(n), t);
2973
+ return !Fe() || !(t = P.registry.get(n = Cl())) ? e() : (P.completed && P.completed.add(t), P.registry.delete(n), t);
2966
2974
  }
2967
2975
  function Fe(e) {
2968
2976
  return !!P.context && !P.done && (!e || e.isConnected);
2969
2977
  }
2970
- function Ll(e) {
2978
+ function Nl(e) {
2971
2979
  return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
2972
2980
  }
2973
2981
  function ls(e, t, n) {
@@ -2976,8 +2984,8 @@ function ls(e, t, n) {
2976
2984
  }
2977
2985
  function cs(e, t, n, s, r, a, i) {
2978
2986
  let o, l, d, u, f;
2979
- if (t === "style") return Pl(e, n, s);
2980
- if (t === "classList") return _l(e, n, s);
2987
+ if (t === "style") return wl(e, n, s);
2988
+ if (t === "classList") return Pl(e, n, s);
2981
2989
  if (n === s) return s;
2982
2990
  if (t === "ref")
2983
2991
  a || n(e);
@@ -2988,24 +2996,24 @@ function cs(e, t, n, s, r, a, i) {
2988
2996
  const g = t.slice(10);
2989
2997
  s && e.removeEventListener(g, s, !0), n && e.addEventListener(g, n, !0);
2990
2998
  } else if (t.slice(0, 2) === "on") {
2991
- const g = t.slice(2).toLowerCase(), h = hl.has(g);
2999
+ const g = t.slice(2).toLowerCase(), h = gl.has(g);
2992
3000
  if (!h && s) {
2993
3001
  const y = Array.isArray(s) ? s[0] : s;
2994
3002
  e.removeEventListener(g, y);
2995
3003
  }
2996
- (h || n) && (Sl(e, g, n, h), h && pl([g]));
3004
+ (h || n) && (_l(e, g, n, h), h && yl([g]));
2997
3005
  } else if (t.slice(0, 5) === "attr:")
2998
3006
  _n(e, t.slice(5), n);
2999
3007
  else if (t.slice(0, 5) === "bool:")
3000
- Al(e, t.slice(5), n);
3001
- else if ((f = t.slice(0, 5) === "prop:") || (d = cl.has(t)) || !r && ((u = fl(t, e.tagName)) || (l = ll.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
3008
+ Tl(e, t.slice(5), n);
3009
+ else if ((f = t.slice(0, 5) === "prop:") || (d = ul.has(t)) || !r && ((u = hl(t, e.tagName)) || (l = cl.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
3002
3010
  if (f)
3003
3011
  t = t.slice(5), l = !0;
3004
3012
  else if (Fe(e)) return n;
3005
- t === "class" || t === "className" ? Tl(e, n) : o && !l && !d ? e[Ll(t)] = n : e[u || t] = n;
3013
+ t === "class" || t === "className" ? Sl(e, n) : o && !l && !d ? e[Nl(t)] = n : e[u || t] = n;
3006
3014
  } else {
3007
- const g = r && t.indexOf(":") > -1 && ml[t.split(":")[0]];
3008
- g ? yl(e, g, t, n) : _n(e, ul[t] || t, n);
3015
+ const g = r && t.indexOf(":") > -1 && El[t.split(":")[0]];
3016
+ g ? Al(e, g, t, n) : _n(e, dl[t] || t, n);
3009
3017
  }
3010
3018
  return n;
3011
3019
  }
@@ -3092,7 +3100,7 @@ function ht(e, t, n, s, r) {
3092
3100
  }
3093
3101
  if (l.length === 0) {
3094
3102
  if (n = Ve(e, n, s), o) return n;
3095
- } else d ? n.length === 0 ? us(e, l, s) : El(e, n, l) : (n && Ve(e), us(e, l));
3103
+ } else d ? n.length === 0 ? us(e, l, s) : pl(e, n, l) : (n && Ve(e), us(e, l));
3096
3104
  n = l;
3097
3105
  } else if (t.nodeType) {
3098
3106
  if (a && t.parentNode) return n = o ? [t] : t;
@@ -3144,14 +3152,14 @@ function Ve(e, t, n, s) {
3144
3152
  } else e.insertBefore(r, n);
3145
3153
  return [r];
3146
3154
  }
3147
- function Nl() {
3155
+ function Cl() {
3148
3156
  return P.getNextContextId();
3149
3157
  }
3150
- var Cl = "http://www.w3.org/2000/svg";
3158
+ var Gl = "http://www.w3.org/2000/svg";
3151
3159
  function mr(e, t = !1) {
3152
- return t ? document.createElementNS(Cl, e) : document.createElement(e);
3160
+ return t ? document.createElementNS(Gl, e) : document.createElement(e);
3153
3161
  }
3154
- function Gu(e) {
3162
+ function Ou(e) {
3155
3163
  const {
3156
3164
  useShadow: t
3157
3165
  } = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = os();
@@ -3177,7 +3185,7 @@ function Gu(e) {
3177
3185
  render: !i
3178
3186
  }), n;
3179
3187
  }
3180
- function Gl(e, t) {
3188
+ function Ol(e, t) {
3181
3189
  const n = j(e);
3182
3190
  return j(() => {
3183
3191
  const s = n();
@@ -3185,16 +3193,16 @@ function Gl(e, t) {
3185
3193
  case "function":
3186
3194
  return Z(() => s(t));
3187
3195
  case "string":
3188
- const r = gl.has(s), a = P.context ? Il() : mr(s, r);
3189
- return wl(a, t, r), a;
3196
+ const r = ml.has(s), a = P.context ? Ll() : mr(s, r);
3197
+ return vl(a, t, r), a;
3190
3198
  }
3191
3199
  });
3192
3200
  }
3193
- function Ou(e) {
3194
- const [, t] = al(e, ["component"]);
3195
- return Gl(() => e.component, t);
3201
+ function Du(e) {
3202
+ const [, t] = il(e, ["component"]);
3203
+ return Ol(() => e.component, t);
3196
3204
  }
3197
- var Ol = class {
3205
+ var Dl = class {
3198
3206
  constructor() {
3199
3207
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
3200
3208
  }
@@ -3212,7 +3220,7 @@ var Ol = class {
3212
3220
  }
3213
3221
  }, Er = class {
3214
3222
  constructor(e) {
3215
- this.generateIdentifier = e, this.kv = new Ol();
3223
+ this.generateIdentifier = e, this.kv = new Dl();
3216
3224
  }
3217
3225
  register(e, t) {
3218
3226
  this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
@@ -3226,7 +3234,7 @@ var Ol = class {
3226
3234
  getValue(e) {
3227
3235
  return this.kv.getByKey(e);
3228
3236
  }
3229
- }, Dl = class extends Er {
3237
+ }, Rl = class extends Er {
3230
3238
  constructor() {
3231
3239
  super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
3232
3240
  }
@@ -3237,7 +3245,7 @@ var Ol = class {
3237
3245
  return this.classToAllowedProps.get(e);
3238
3246
  }
3239
3247
  };
3240
- function Rl(e) {
3248
+ function xl(e) {
3241
3249
  if ("values" in Object)
3242
3250
  return Object.values(e);
3243
3251
  const t = [];
@@ -3245,8 +3253,8 @@ function Rl(e) {
3245
3253
  e.hasOwnProperty(n) && t.push(e[n]);
3246
3254
  return t;
3247
3255
  }
3248
- function xl(e, t) {
3249
- const n = Rl(e);
3256
+ function kl(e, t) {
3257
+ const n = xl(e);
3250
3258
  if ("find" in n)
3251
3259
  return n.find(t);
3252
3260
  const s = n;
@@ -3269,7 +3277,7 @@ function ds(e, t) {
3269
3277
  return s;
3270
3278
  }
3271
3279
  }
3272
- var kl = class {
3280
+ var Ul = class {
3273
3281
  constructor() {
3274
3282
  this.transfomers = {};
3275
3283
  }
@@ -3277,12 +3285,12 @@ var kl = class {
3277
3285
  this.transfomers[e.name] = e;
3278
3286
  }
3279
3287
  findApplicable(e) {
3280
- return xl(this.transfomers, (t) => t.isApplicable(e));
3288
+ return kl(this.transfomers, (t) => t.isApplicable(e));
3281
3289
  }
3282
3290
  findByName(e) {
3283
3291
  return this.transfomers[e];
3284
3292
  }
3285
- }, Ul = (e) => Object.prototype.toString.call(e).slice(8, -1), pr = (e) => typeof e > "u", Ml = (e) => e === null, gt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, vn = (e) => gt(e) && Object.keys(e).length === 0, Ne = (e) => Array.isArray(e), Bl = (e) => typeof e == "string", Fl = (e) => typeof e == "number" && !isNaN(e), Kl = (e) => typeof e == "boolean", Vl = (e) => e instanceof RegExp, mt = (e) => e instanceof Map, Et = (e) => e instanceof Set, yr = (e) => Ul(e) === "Symbol", Hl = (e) => e instanceof Date && !isNaN(e.valueOf()), ql = (e) => e instanceof Error, fs = (e) => typeof e == "number" && isNaN(e), $l = (e) => Kl(e) || Ml(e) || pr(e) || Fl(e) || Bl(e) || yr(e), Ql = (e) => typeof e == "bigint", zl = (e) => e === 1 / 0 || e === -1 / 0, Wl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), jl = (e) => e instanceof URL, Ar = (e) => e.replace(/\./g, "\\."), En = (e) => e.map(String).map(Ar).join("."), ut = (e) => {
3293
+ }, Ml = (e) => Object.prototype.toString.call(e).slice(8, -1), pr = (e) => typeof e > "u", Bl = (e) => e === null, gt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, vn = (e) => gt(e) && Object.keys(e).length === 0, Ne = (e) => Array.isArray(e), Fl = (e) => typeof e == "string", Kl = (e) => typeof e == "number" && !isNaN(e), Vl = (e) => typeof e == "boolean", Hl = (e) => e instanceof RegExp, mt = (e) => e instanceof Map, Et = (e) => e instanceof Set, yr = (e) => Ml(e) === "Symbol", ql = (e) => e instanceof Date && !isNaN(e.valueOf()), $l = (e) => e instanceof Error, fs = (e) => typeof e == "number" && isNaN(e), Ql = (e) => Vl(e) || Bl(e) || pr(e) || Kl(e) || Fl(e) || yr(e), zl = (e) => typeof e == "bigint", Wl = (e) => e === 1 / 0 || e === -1 / 0, jl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Yl = (e) => e instanceof URL, Ar = (e) => e.replace(/\./g, "\\."), En = (e) => e.map(String).map(Ar).join("."), ut = (e) => {
3286
3294
  const t = [];
3287
3295
  let n = "";
3288
3296
  for (let r = 0; r < e.length; r++) {
@@ -3311,9 +3319,9 @@ function ge(e, t, n, s) {
3311
3319
  var Tr = [
3312
3320
  ge(pr, "undefined", () => null, () => {
3313
3321
  }),
3314
- ge(Ql, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
3315
- ge(Hl, "Date", (e) => e.toISOString(), (e) => new Date(e)),
3316
- ge(ql, "Error", (e, t) => {
3322
+ ge(zl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
3323
+ ge(ql, "Date", (e) => e.toISOString(), (e) => new Date(e)),
3324
+ ge($l, "Error", (e, t) => {
3317
3325
  const n = {
3318
3326
  name: e.name,
3319
3327
  message: e.message
@@ -3327,7 +3335,7 @@ var Tr = [
3327
3335
  n[s] = e[s];
3328
3336
  }), n;
3329
3337
  }),
3330
- ge(Vl, "regexp", (e) => "" + e, (e) => {
3338
+ ge(Hl, "regexp", (e) => "" + e, (e) => {
3331
3339
  const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
3332
3340
  return new RegExp(t, n);
3333
3341
  }),
@@ -3340,9 +3348,9 @@ var Tr = [
3340
3348
  (e) => new Set(e)
3341
3349
  ),
3342
3350
  ge(mt, "map", (e) => [...e.entries()], (e) => new Map(e)),
3343
- ge((e) => fs(e) || zl(e), "number", (e) => fs(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
3351
+ ge((e) => fs(e) || Wl(e), "number", (e) => fs(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
3344
3352
  ge((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
3345
- ge(jl, "URL", (e) => e.toString(), (e) => new URL(e))
3353
+ ge(Yl, "URL", (e) => e.toString(), (e) => new URL(e))
3346
3354
  ];
3347
3355
  function an(e, t, n, s) {
3348
3356
  return {
@@ -3357,7 +3365,7 @@ var Sr = an((e, t) => yr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
3357
3365
  if (!s)
3358
3366
  throw new Error("Trying to deserialize unknown symbol");
3359
3367
  return s;
3360
- }), Yl = [
3368
+ }), Jl = [
3361
3369
  Int8Array,
3362
3370
  Uint8Array,
3363
3371
  Int16Array,
@@ -3367,8 +3375,8 @@ var Sr = an((e, t) => yr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
3367
3375
  Float32Array,
3368
3376
  Float64Array,
3369
3377
  Uint8ClampedArray
3370
- ].reduce((e, t) => (e[t.name] = t, e), {}), _r = an(Wl, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
3371
- const n = Yl[t[1]];
3378
+ ].reduce((e, t) => (e[t.name] = t, e), {}), _r = an(jl, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
3379
+ const n = Jl[t[1]];
3372
3380
  if (!n)
3373
3381
  throw new Error("Trying to deserialize unknown typed array");
3374
3382
  return new n(e);
@@ -3394,8 +3402,8 @@ var wr = an(Pr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
3394
3402
  if (!s)
3395
3403
  throw new Error("Trying to deserialize unknown custom value");
3396
3404
  return s.deserialize(e);
3397
- }), Jl = [wr, Sr, vr, _r], hs = (e, t) => {
3398
- const n = ds(Jl, (r) => r.isApplicable(e, t));
3405
+ }), Zl = [wr, Sr, vr, _r], hs = (e, t) => {
3406
+ const n = ds(Zl, (r) => r.isApplicable(e, t));
3399
3407
  if (n)
3400
3408
  return {
3401
3409
  value: n.transform(e, t),
@@ -3411,7 +3419,7 @@ var wr = an(Pr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
3411
3419
  Tr.forEach((e) => {
3412
3420
  br[e.annotation] = e;
3413
3421
  });
3414
- var Zl = (e, t, n) => {
3422
+ var Xl = (e, t, n) => {
3415
3423
  if (Ne(t))
3416
3424
  switch (t[0]) {
3417
3425
  case "symbol":
@@ -3447,7 +3455,7 @@ function Ir(e) {
3447
3455
  if (Vt(e, "constructor"))
3448
3456
  throw new Error("constructor is not allowed as a property");
3449
3457
  }
3450
- var Xl = (e, t) => {
3458
+ var ec = (e, t) => {
3451
3459
  Ir(t);
3452
3460
  for (let n = 0; n < t.length; n++) {
3453
3461
  const s = t[n];
@@ -3528,14 +3536,14 @@ function In(e, t, n = []) {
3528
3536
  In(a, t, [...n, ...ut(i)]);
3529
3537
  }), t(s, n);
3530
3538
  }
3531
- function ec(e, t, n) {
3539
+ function tc(e, t, n) {
3532
3540
  return In(t, (s, r) => {
3533
- e = bn(e, r, (a) => Zl(a, s, n));
3541
+ e = bn(e, r, (a) => Xl(a, s, n));
3534
3542
  }), e;
3535
3543
  }
3536
- function tc(e, t) {
3544
+ function nc(e, t) {
3537
3545
  function n(s, r) {
3538
- const a = Xl(e, ut(r));
3546
+ const a = ec(e, ut(r));
3539
3547
  s.map(ut).forEach((i) => {
3540
3548
  e = bn(e, i, () => a);
3541
3549
  });
@@ -3549,12 +3557,12 @@ function tc(e, t) {
3549
3557
  at(t, n);
3550
3558
  return e;
3551
3559
  }
3552
- var nc = (e, t) => gt(e) || Ne(e) || mt(e) || Et(e) || Pr(e, t);
3553
- function sc(e, t, n) {
3560
+ var sc = (e, t) => gt(e) || Ne(e) || mt(e) || Et(e) || Pr(e, t);
3561
+ function rc(e, t, n) {
3554
3562
  const s = n.get(e);
3555
3563
  s ? s.push(t) : n.set(e, [t]);
3556
3564
  }
3557
- function rc(e, t) {
3565
+ function ac(e, t) {
3558
3566
  const n = {};
3559
3567
  let s;
3560
3568
  return e.forEach((r) => {
@@ -3566,16 +3574,16 @@ function rc(e, t) {
3566
3574
  }), s ? vn(n) ? [s] : [s, n] : vn(n) ? void 0 : n;
3567
3575
  }
3568
3576
  var Lr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
3569
- const o = $l(e);
3577
+ const o = Ql(e);
3570
3578
  if (!o) {
3571
- sc(e, r, t);
3579
+ rc(e, r, t);
3572
3580
  const h = i.get(e);
3573
3581
  if (h)
3574
3582
  return s ? {
3575
3583
  transformedValue: null
3576
3584
  } : h;
3577
3585
  }
3578
- if (!nc(e, n)) {
3586
+ if (!sc(e, n)) {
3579
3587
  const h = hs(e, n), y = h ? {
3580
3588
  transformedValue: h.value,
3581
3589
  annotations: [h.type]
@@ -3612,13 +3620,13 @@ function Nr(e) {
3612
3620
  function gs(e) {
3613
3621
  return Nr(e) === "Array";
3614
3622
  }
3615
- function ac(e) {
3623
+ function ic(e) {
3616
3624
  if (Nr(e) !== "Object")
3617
3625
  return !1;
3618
3626
  const t = Object.getPrototypeOf(e);
3619
3627
  return !!t && t.constructor === Object && t === Object.prototype;
3620
3628
  }
3621
- function ic(e, t, n, s, r) {
3629
+ function oc(e, t, n, s, r) {
3622
3630
  const a = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
3623
3631
  a === "enumerable" && (e[t] = n), r && a === "nonenumerable" && Object.defineProperty(e, t, {
3624
3632
  value: n,
@@ -3630,22 +3638,22 @@ function ic(e, t, n, s, r) {
3630
3638
  function Ln(e, t = {}) {
3631
3639
  if (gs(e))
3632
3640
  return e.map((r) => Ln(r, t));
3633
- if (!ac(e))
3641
+ if (!ic(e))
3634
3642
  return e;
3635
3643
  const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
3636
3644
  return [...n, ...s].reduce((r, a) => {
3637
3645
  if (gs(t.props) && !t.props.includes(a))
3638
3646
  return r;
3639
3647
  const i = e[a], o = Ln(i, t);
3640
- return ic(r, a, o, e, t.nonenumerable), r;
3648
+ return oc(r, a, o, e, t.nonenumerable), r;
3641
3649
  }, {});
3642
3650
  }
3643
- var x = class {
3651
+ var k = class {
3644
3652
  /**
3645
3653
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
3646
3654
  */
3647
3655
  constructor({ dedupe: e = !1 } = {}) {
3648
- this.classRegistry = new Dl(), this.symbolRegistry = new Er((t) => t.description ?? ""), this.customTransformerRegistry = new kl(), this.allowedErrorProps = [], this.dedupe = e;
3656
+ this.classRegistry = new Rl(), this.symbolRegistry = new Er((t) => t.description ?? ""), this.customTransformerRegistry = new Ul(), this.allowedErrorProps = [], this.dedupe = e;
3649
3657
  }
3650
3658
  serialize(e) {
3651
3659
  const t = /* @__PURE__ */ new Map(), n = Lr(e, t, this, this.dedupe), s = {
@@ -3655,7 +3663,7 @@ var x = class {
3655
3663
  ...s.meta,
3656
3664
  values: n.annotations
3657
3665
  });
3658
- const r = rc(t, this.dedupe);
3666
+ const r = ac(t, this.dedupe);
3659
3667
  return r && (s.meta = {
3660
3668
  ...s.meta,
3661
3669
  referentialEqualities: r
@@ -3664,7 +3672,7 @@ var x = class {
3664
3672
  deserialize(e) {
3665
3673
  const { json: t, meta: n } = e;
3666
3674
  let s = Ln(t);
3667
- return n != null && n.values && (s = ec(s, n.values, this)), n != null && n.referentialEqualities && (s = tc(s, n.referentialEqualities)), s;
3675
+ return n != null && n.values && (s = tc(s, n.values, this)), n != null && n.referentialEqualities && (s = nc(s, n.referentialEqualities)), s;
3668
3676
  }
3669
3677
  stringify(e) {
3670
3678
  return JSON.stringify(this.serialize(e));
@@ -3688,53 +3696,53 @@ var x = class {
3688
3696
  this.allowedErrorProps.push(...e);
3689
3697
  }
3690
3698
  };
3691
- x.defaultInstance = new x();
3692
- x.serialize = x.defaultInstance.serialize.bind(x.defaultInstance);
3693
- x.deserialize = x.defaultInstance.deserialize.bind(x.defaultInstance);
3694
- x.stringify = x.defaultInstance.stringify.bind(x.defaultInstance);
3695
- x.parse = x.defaultInstance.parse.bind(x.defaultInstance);
3696
- x.registerClass = x.defaultInstance.registerClass.bind(x.defaultInstance);
3697
- x.registerSymbol = x.defaultInstance.registerSymbol.bind(x.defaultInstance);
3698
- x.registerCustom = x.defaultInstance.registerCustom.bind(x.defaultInstance);
3699
- x.allowErrorProps = x.defaultInstance.allowErrorProps.bind(x.defaultInstance);
3700
- var oc = x.serialize, Du = x.stringify;
3701
- function Ru(e) {
3699
+ k.defaultInstance = new k();
3700
+ k.serialize = k.defaultInstance.serialize.bind(k.defaultInstance);
3701
+ k.deserialize = k.defaultInstance.deserialize.bind(k.defaultInstance);
3702
+ k.stringify = k.defaultInstance.stringify.bind(k.defaultInstance);
3703
+ k.parse = k.defaultInstance.parse.bind(k.defaultInstance);
3704
+ k.registerClass = k.defaultInstance.registerClass.bind(k.defaultInstance);
3705
+ k.registerSymbol = k.defaultInstance.registerSymbol.bind(k.defaultInstance);
3706
+ k.registerCustom = k.defaultInstance.registerCustom.bind(k.defaultInstance);
3707
+ k.allowErrorProps = k.defaultInstance.allowErrorProps.bind(k.defaultInstance);
3708
+ var lc = k.serialize, Ru = k.stringify;
3709
+ function xu(e) {
3702
3710
  return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
3703
3711
  }
3704
- function xu(e, t) {
3712
+ function ku(e, t) {
3705
3713
  return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
3706
3714
  }
3707
- function ku({
3715
+ function Uu({
3708
3716
  queryState: e,
3709
3717
  observerCount: t,
3710
3718
  isStale: n
3711
3719
  }) {
3712
3720
  return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
3713
3721
  }
3714
- function Uu({
3722
+ function Mu({
3715
3723
  status: e,
3716
3724
  isPaused: t
3717
3725
  }) {
3718
3726
  return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
3719
3727
  }
3720
- function Mu(e) {
3728
+ function Bu(e) {
3721
3729
  return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
3722
3730
  }
3723
- var Bu = (e, t = !1) => {
3731
+ var Fu = (e, t = !1) => {
3724
3732
  const {
3725
3733
  json: n
3726
- } = oc(e);
3734
+ } = lc(e);
3727
3735
  return JSON.stringify(n, null, t ? 2 : void 0);
3728
- }, Ut = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, lc = (e, t) => e.queryHash.localeCompare(t.queryHash), Cr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, cc = (e, t) => Ut(e) === Ut(t) ? Cr(e, t) : Ut(e) > Ut(t) ? 1 : -1, Fu = {
3729
- status: cc,
3730
- "query hash": lc,
3731
- "last updated": Cr
3732
- }, Mt = (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, uc = (e, t) => Mt(e) === Mt(t) ? Gr(e, t) : Mt(e) > Mt(t) ? 1 : -1, Ku = {
3736
+ }, Ut = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, cc = (e, t) => e.queryHash.localeCompare(t.queryHash), Cr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, uc = (e, t) => Ut(e) === Ut(t) ? Cr(e, t) : Ut(e) > Ut(t) ? 1 : -1, Ku = {
3733
3737
  status: uc,
3738
+ "query hash": cc,
3739
+ "last updated": Cr
3740
+ }, Mt = (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, dc = (e, t) => Mt(e) === Mt(t) ? Gr(e, t) : Mt(e) > Mt(t) ? 1 : -1, Vu = {
3741
+ status: dc,
3734
3742
  "last updated": Gr
3735
- }, Vu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Hu = () => {
3743
+ }, Hu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), qu = () => {
3736
3744
  const [e, t] = F("dark");
3737
- return Wo(() => {
3745
+ return jo(() => {
3738
3746
  const n = window.matchMedia("(prefers-color-scheme: dark)");
3739
3747
  t(n.matches ? "dark" : "light");
3740
3748
  const s = (r) => {
@@ -3806,7 +3814,7 @@ var Bu = (e, t = !1) => {
3806
3814
  if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
3807
3815
  const s = document.createElement("style"), r = document.createTextNode("");
3808
3816
  s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
3809
- }, qe, pt, yt, At, De, Tt, $e, Qe, ze, We, je, St, Ye, _t, ys, dc = (ys = class {
3817
+ }, qe, pt, yt, At, De, Tt, $e, Qe, ze, We, je, St, Ye, _t, ys, fc = (ys = class {
3810
3818
  constructor(e) {
3811
3819
  D(this, qe);
3812
3820
  D(this, pt);
@@ -3858,7 +3866,7 @@ var Bu = (e, t = !1) => {
3858
3866
  const t = hr(() => {
3859
3867
  const n = this, [s] = _(this, Qe), [r] = _(this, ze), [a] = _(this, We), [i] = _(this, je), [o] = _(this, St), [l] = _(this, qe);
3860
3868
  let d;
3861
- return _(this, Ye) ? d = _(this, Ye) : (d = dr(() => import("./NCMVHL6D-al9EBNaz.js")), O(this, Ye, d)), Or(_(this, Tt), _(this, $e)), cr(d, ur({
3869
+ return _(this, Ye) ? d = _(this, Ye) : (d = dr(() => import("./NCMVHL6D-BBFHGOSz.js")), O(this, Ye, d)), Or(_(this, Tt), _(this, $e)), cr(d, ur({
3862
3870
  get queryFlavor() {
3863
3871
  return _(n, yt);
3864
3872
  },
@@ -3900,7 +3908,7 @@ var Bu = (e, t = !1) => {
3900
3908
  throw new Error("Devtools is not mounted");
3901
3909
  (e = _(this, _t)) == null || e.call(this), O(this, De, !1);
3902
3910
  }
3903
- }, qe = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), At = new WeakMap(), De = new WeakMap(), Tt = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), ze = new WeakMap(), We = new WeakMap(), je = new WeakMap(), St = new WeakMap(), Ye = new WeakMap(), _t = new WeakMap(), ys), Je, Pt, wt, vt, Re, bt, Ze, Xe, et, tt, nt, It, st, rt, Lt, As, fc = (As = class {
3911
+ }, qe = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), At = new WeakMap(), De = new WeakMap(), Tt = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), ze = new WeakMap(), We = new WeakMap(), je = new WeakMap(), St = new WeakMap(), Ye = new WeakMap(), _t = new WeakMap(), ys), Je, Pt, wt, vt, Re, bt, Ze, Xe, et, tt, nt, It, st, rt, Lt, As, hc = (As = class {
3904
3912
  constructor(e) {
3905
3913
  D(this, Je);
3906
3914
  D(this, Pt);
@@ -3957,7 +3965,7 @@ var Bu = (e, t = !1) => {
3957
3965
  const t = hr(() => {
3958
3966
  const n = this, [s] = _(this, Xe), [r] = _(this, et), [a] = _(this, tt), [i] = _(this, nt), [o] = _(this, It), [l] = _(this, Je), [d] = _(this, st);
3959
3967
  let u;
3960
- return _(this, rt) ? u = _(this, rt) : (u = dr(() => import("./2AITGKQY-DdlXCCch.js")), O(this, rt, u)), Or(_(this, bt), _(this, Ze)), cr(u, ur({
3968
+ return _(this, rt) ? u = _(this, rt) : (u = dr(() => import("./2AITGKQY-CTW1GUZ6.js")), O(this, rt, u)), Or(_(this, bt), _(this, Ze)), cr(u, ur({
3961
3969
  get queryFlavor() {
3962
3970
  return _(n, wt);
3963
3971
  },
@@ -4003,7 +4011,7 @@ var Bu = (e, t = !1) => {
4003
4011
  (e = _(this, Lt)) == null || e.call(this), O(this, Re, !1);
4004
4012
  }
4005
4013
  }, Je = new WeakMap(), Pt = new WeakMap(), wt = new WeakMap(), vt = new WeakMap(), Re = new WeakMap(), bt = new WeakMap(), Ze = new WeakMap(), Xe = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), nt = new WeakMap(), It = new WeakMap(), st = new WeakMap(), rt = new WeakMap(), Lt = new WeakMap(), As);
4006
- function hc(e) {
4014
+ function gc(e) {
4007
4015
  const t = J(e.client), n = z.useRef(null), {
4008
4016
  buttonPosition: s,
4009
4017
  position: r,
@@ -4013,7 +4021,7 @@ function hc(e) {
4013
4021
  shadowDOMTarget: l,
4014
4022
  hideDisabledQueries: d
4015
4023
  } = e, [u] = z.useState(
4016
- new dc({
4024
+ new fc({
4017
4025
  client: t,
4018
4026
  queryFlavor: "React Query",
4019
4027
  version: "5",
@@ -4041,9 +4049,9 @@ function hc(e) {
4041
4049
  u.unmount();
4042
4050
  }), [u]), /* @__PURE__ */ c("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
4043
4051
  }
4044
- function gc(e) {
4052
+ function mc(e) {
4045
4053
  const t = J(e.client), n = z.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: a, hideDisabledQueries: i } = e, [o] = z.useState(
4046
- new fc({
4054
+ new hc({
4047
4055
  client: t,
4048
4056
  queryFlavor: "React Query",
4049
4057
  version: "5",
@@ -4078,9 +4086,9 @@ function gc(e) {
4078
4086
  }
4079
4087
  var ms = process.env.NODE_ENV !== "development" ? function() {
4080
4088
  return null;
4081
- } : hc;
4089
+ } : gc;
4082
4090
  process.env.NODE_ENV;
4083
- const mc = ye(""), Ec = () => {
4091
+ const Ec = ye(""), pc = () => {
4084
4092
  on("dynamic-page-selector", {
4085
4093
  description: "Dynamic page selector"
4086
4094
  }), on("enable-add-page-dropdown", {
@@ -4088,14 +4096,14 @@ const mc = ye(""), Ec = () => {
4088
4096
  }), on("enable-ai-chat-panel", {
4089
4097
  description: "Enable AI chat panel"
4090
4098
  });
4091
- }, pc = () => {
4099
+ }, yc = () => {
4092
4100
  const e = C(), t = I();
4093
4101
  return re({
4094
4102
  queryKey: [E.GET_COLLECTIONS],
4095
4103
  staleTime: 1 / 0,
4096
4104
  queryFn: async () => t(e, { action: E.GET_COLLECTIONS })
4097
4105
  });
4098
- }, yc = () => {
4106
+ }, Ac = () => {
4099
4107
  const { data: e } = ue(), { data: t } = Ce(), { data: n } = Be(), s = C(), r = I(), a = q(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]), i = le(/* @__PURE__ */ new Map());
4100
4108
  return Y({
4101
4109
  mutationFn: async ({ block: o }) => {
@@ -4126,7 +4134,7 @@ const mc = ye(""), Ec = () => {
4126
4134
  }), f;
4127
4135
  }
4128
4136
  });
4129
- }, Ac = () => {
4137
+ }, Tc = () => {
4130
4138
  const [, e] = be();
4131
4139
  return $(
4132
4140
  (t, n) => {
@@ -4135,38 +4143,38 @@ const mc = ye(""), Ec = () => {
4135
4143
  },
4136
4144
  [e]
4137
4145
  );
4138
- }, Tc = () => {
4139
- const e = Ac();
4146
+ }, Sc = () => {
4147
+ const e = Tc();
4140
4148
  return $(
4141
4149
  ({ pageId: t }) => {
4142
4150
  e(t);
4143
4151
  },
4144
4152
  [e]
4145
4153
  );
4146
- }, Sc = {
4154
+ }, _c = {
4147
4155
  SITE_WIDE_USAGE: "SITE_WIDE_USAGE"
4148
- }, _c = (e) => {
4156
+ }, Pc = (e) => {
4149
4157
  const t = I(), n = C();
4150
4158
  return re({
4151
- queryKey: [Sc.SITE_WIDE_USAGE],
4159
+ queryKey: [_c.SITE_WIDE_USAGE],
4152
4160
  queryFn: async () => e ? t(n, { action: "GET_SITE_WIDE_USAGE" }) : {},
4153
4161
  retry: !1
4154
4162
  });
4155
- }, Pc = V(() => import("./page-lock-BJG3FOuQ.js")), wc = V(() => import("./no-language-page-dialog-CrMNN-NZ.js")), vc = V(() => import("./digital-asset-manager-CcByfPoi.js")), bc = V(() => import("./save-to-lib-BVkEMHoE.js")), Ic = V(() => import("./theme-panel-footer-Cdxm1r9y.js")), Lc = V(() => import("./web-preview-DTw3MNBm.js"));
4156
- Ec();
4157
- ci();
4158
- la(Ao);
4159
- Vo();
4160
- ca(vc);
4163
+ }, wc = V(() => import("./page-lock-CcF0mQXB.js")), vc = V(() => import("./no-language-page-dialog-Dm_STScI.js")), bc = V(() => import("./digital-asset-manager-BJxl1u4s.js")), Ic = V(() => import("./save-to-lib-DRfgWTPi.js")), Lc = V(() => import("./theme-panel-footer-BFBECM7Q.js")), Nc = V(() => import("./web-preview-CyxFxzMN.js"));
4164
+ pc();
4165
+ ui();
4166
+ ca(To);
4167
+ Ho();
4161
4168
  ua(bc);
4162
- const Nc = {
4169
+ da(Ic);
4170
+ const Cc = {
4163
4171
  role: "",
4164
4172
  permissions: null
4165
4173
  }, Es = (e) => {
4166
4174
  var Hn;
4167
- const { data: t } = bo(), n = Mn(), { data: s = Nc, isFetching: r } = Io(), { data: a, isFetching: i } = Ge(), { data: o, isFetching: l } = pc(), { data: d, isFetching: u } = Be(), f = r || i || l || u, [g] = be(), h = g.get("page"), { data: y } = ue(), { data: T, isFetching: A } = Po(), { blocks: S } = _o(T), { data: p, isFetching: v } = wo(), { pageStatus: b } = Ae(), U = To(), { onSave: L } = Lo(), { mutateAsync: Te } = yc(), { getPartialBlocks: Se, getPartialBlockBlocks: B } = No(), { mutateAsync: w } = Qi(), { mutateAsync: N } = vo(), { data: W } = _c(((Hn = e.flags) == null ? void 0 : Hn.designTokens) ?? !1), Q = Tc(), [he, Ct] = K(!1), _e = le([]), Ke = q(() => H(d, "theme", {}) || {}, [d]), Oe = b === te.EDITING, Dr = b === te.CHECKING, Kn = A || Dr || v;
4175
+ const { data: t } = Io(), n = Mn(), { data: s = Cc, isFetching: r } = Lo(), { data: a, isFetching: i } = Ge(), { data: o, isFetching: l } = yc(), { data: d, isFetching: u } = Be(), f = r || i || l || u, [g] = be(), h = g.get("page"), { data: y } = ue(), { data: T, isFetching: A } = wo(), { blocks: S } = Po(T), { data: p, isFetching: v } = vo(), { pageStatus: b } = Ae(), U = So(), { onSave: L } = No(), { mutateAsync: Te } = Ac(), { getPartialBlocks: Se, getPartialBlockBlocks: B } = Co(), { mutateAsync: w } = zi(), { mutateAsync: N } = bo(), { data: W } = Pc(((Hn = e.flags) == null ? void 0 : Hn.designTokens) ?? !1), Q = Sc(), [he, Ct] = K(!1), _e = le([]), Ke = q(() => H(d, "theme", {}) || {}, [d]), Oe = b === te.EDITING, Dr = b === te.CHECKING, Kn = A || Dr || v;
4168
4176
  _e.current = S;
4169
- const [Rr] = oe(mc);
4177
+ const [Rr] = oe(Ec);
4170
4178
  ne(() => {
4171
4179
  const ae = () => {
4172
4180
  document.hidden ? Ct(!0) : Ct(!1);
@@ -4186,11 +4194,11 @@ const Nc = {
4186
4194
  X,
4187
4195
  {
4188
4196
  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($t, { className: "h-6 w-6 animate-spin text-primary" }) }),
4189
- children: /* @__PURE__ */ c(Lc, {})
4197
+ children: /* @__PURE__ */ c(Nc, {})
4190
4198
  }
4191
4199
  ),
4192
4200
  /* @__PURE__ */ c(
4193
- da,
4201
+ fa,
4194
4202
  {
4195
4203
  siteWideUsage: W ?? {},
4196
4204
  flags: e.flags ? { ...e.flags, librarySite: Vn } : { librarySite: Vn },
@@ -4224,16 +4232,16 @@ const Nc = {
4224
4232
  const $n = [...ae];
4225
4233
  await L({ page: h, blocks: $n, needTranslations: Ur }), _e.current = $n;
4226
4234
  const Ot = {};
4227
- return jn(Gt, Ke) || (Ot.theme = Gt), jn(qn, d == null ? void 0 : d.designTokens) || (Ot.designTokens = qn), me(Ot) || await N({ settings: Ot }), !0;
4235
+ return jn(Gt, Ke) || (Ot.theme = Gt), d != null && d.designTokens && !jn(qn, d == null ? void 0 : d.designTokens) && (Ot.designTokens = qn), me(Ot) || await N({ settings: Ot }), !0;
4228
4236
  },
4229
- themePanelComponent: Ic,
4237
+ themePanelComponent: Lc,
4230
4238
  ...xr,
4231
- children: /* @__PURE__ */ c(Pc, { isFetchingPageData: Kn })
4239
+ children: /* @__PURE__ */ c(wc, { isFetchingPageData: Kn })
4232
4240
  }
4233
4241
  ),
4234
- /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(wc, {}) })
4242
+ /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(vc, {}) })
4235
4243
  ] });
4236
- }, Cc = new ea({
4244
+ }, Gc = new ea({
4237
4245
  defaultOptions: {
4238
4246
  queries: {
4239
4247
  refetchOnWindowFocus: !1,
@@ -4241,7 +4249,7 @@ const Nc = {
4241
4249
  refetchOnMount: !1
4242
4250
  }
4243
4251
  }
4244
- }), qu = (e) => {
4252
+ }), $u = (e) => {
4245
4253
  const [, t] = Dn(), [n, s] = K(!1);
4246
4254
  return ne(() => (t(
4247
4255
  Nn(e, [
@@ -4265,16 +4273,16 @@ const Nc = {
4265
4273
  }), [e, t]), n ? H(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(Ee, { children: [
4266
4274
  /* @__PURE__ */ c(Es, { ...e }),
4267
4275
  /* @__PURE__ */ c(ms, {})
4268
- ] }) : /* @__PURE__ */ m(ta, { client: Cc, children: [
4276
+ ] }) : /* @__PURE__ */ m(ta, { client: Gc, children: [
4269
4277
  /* @__PURE__ */ c(Es, { ...e }),
4270
4278
  /* @__PURE__ */ c(ms, {})
4271
4279
  ] }) : /* @__PURE__ */ c("div", {});
4272
- }, Gc = z.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
4273
- function Oc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4280
+ }, Oc = z.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
4281
+ function Dc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4274
4282
  const [r, a] = z.useState(!1);
4275
- return /* @__PURE__ */ m(Na, { open: r, onOpenChange: a, children: [
4283
+ return /* @__PURE__ */ m(Ca, { open: r, onOpenChange: a, children: [
4276
4284
  /* @__PURE__ */ m(Xt, { children: [
4277
- /* @__PURE__ */ c(en, { asChild: !0, children: /* @__PURE__ */ c(Ca, { asChild: !0, children: /* @__PURE__ */ c(
4285
+ /* @__PURE__ */ c(en, { asChild: !0, children: /* @__PURE__ */ c(Ga, { asChild: !0, children: /* @__PURE__ */ c(
4278
4286
  M,
4279
4287
  {
4280
4288
  size: "sm",
@@ -4298,7 +4306,7 @@ function Oc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4298
4306
  /* @__PURE__ */ c(tn, { children: "Add field" })
4299
4307
  ] }),
4300
4308
  r && /* @__PURE__ */ c(z.Suspense, { children: /* @__PURE__ */ c(
4301
- Gc,
4309
+ Oc,
4302
4310
  {
4303
4311
  data: e,
4304
4312
  onSelect: t,
@@ -4309,17 +4317,17 @@ function Oc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4309
4317
  ) })
4310
4318
  ] });
4311
4319
  }
4312
- const $u = () => {
4320
+ const Qu = () => {
4313
4321
  const { savePageAsync: e } = Ue(), t = J(), { isLocked: n } = Ae();
4314
4322
  return $(async () => {
4315
4323
  n || await e(), t.invalidateQueries({ queryKey: [E.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [E.GET_BUILDER_PAGE_DATA] });
4316
4324
  }, [e, t, n]);
4317
- }, Qu = () => {
4325
+ }, zu = () => {
4318
4326
  const e = J();
4319
4327
  return $(() => {
4320
4328
  e.clear();
4321
4329
  }, [e]);
4322
- }, zu = () => {
4330
+ }, Wu = () => {
4323
4331
  const e = C(), t = I(), { data: n } = Ce(), s = J();
4324
4332
  return Y({
4325
4333
  mutationFn: async (r) => {
@@ -4344,7 +4352,7 @@ const $u = () => {
4344
4352
  console.error("Failed to update metadata");
4345
4353
  }
4346
4354
  });
4347
- }, Dc = V(() => import("./digital-asset-manager-CcByfPoi.js")), Wu = ({
4355
+ }, Rc = V(() => import("./digital-asset-manager-BJxl1u4s.js")), ju = ({
4348
4356
  assetId: e,
4349
4357
  assetUrl: t,
4350
4358
  onChange: n,
@@ -4383,7 +4391,7 @@ const $u = () => {
4383
4391
  className: "h-8 w-8 rounded-full bg-white text-red-500",
4384
4392
  onClick: g,
4385
4393
  disabled: a,
4386
- children: h ? /* @__PURE__ */ c(ss, { className: "h-4 w-4" }) : /* @__PURE__ */ c(ti, { className: "h-4 w-4" })
4394
+ children: h ? /* @__PURE__ */ c(ss, { className: "h-4 w-4" }) : /* @__PURE__ */ c(ni, { className: "h-4 w-4" })
4387
4395
  }
4388
4396
  ),
4389
4397
  !h && /* @__PURE__ */ c(
@@ -4410,9 +4418,9 @@ const $u = () => {
4410
4418
  ] })
4411
4419
  }
4412
4420
  ),
4413
- /* @__PURE__ */ c(Gs, { open: o, onOpenChange: l, children: /* @__PURE__ */ m(Ga, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
4414
- /* @__PURE__ */ m(Oa, { className: "hidden border-b px-4 py-2", children: [
4415
- /* @__PURE__ */ c(Da, { children: i("Select Image") }),
4421
+ /* @__PURE__ */ c(Gs, { open: o, onOpenChange: l, children: /* @__PURE__ */ m(Oa, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
4422
+ /* @__PURE__ */ m(Da, { className: "hidden border-b px-4 py-2", children: [
4423
+ /* @__PURE__ */ c(Ra, { children: i("Select Image") }),
4416
4424
  /* @__PURE__ */ c(
4417
4425
  M,
4418
4426
  {
@@ -4426,7 +4434,7 @@ const $u = () => {
4426
4434
  )
4427
4435
  ] }),
4428
4436
  /* @__PURE__ */ c("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
4429
- Dc,
4437
+ Rc,
4430
4438
  {
4431
4439
  close: u,
4432
4440
  onSelect: f,
@@ -4436,11 +4444,11 @@ const $u = () => {
4436
4444
  ) }) })
4437
4445
  ] }) })
4438
4446
  ] });
4439
- }, Rc = Zr(null), pn = {
4447
+ }, xc = Zr(null), pn = {
4440
4448
  didCatch: !1,
4441
4449
  error: null
4442
4450
  };
4443
- class xc extends Xr {
4451
+ class kc extends Xr {
4444
4452
  constructor(t) {
4445
4453
  super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = pn;
4446
4454
  }
@@ -4473,7 +4481,7 @@ class xc extends Xr {
4473
4481
  } = this.state, {
4474
4482
  resetKeys: r
4475
4483
  } = this.props;
4476
- if (s && n.error !== null && kc(t.resetKeys, r)) {
4484
+ if (s && n.error !== null && Uc(t.resetKeys, r)) {
4477
4485
  var a, i;
4478
4486
  (a = (i = this.props).onReset) === null || a === void 0 || a.call(i, {
4479
4487
  next: r,
@@ -4507,7 +4515,7 @@ class xc extends Xr {
4507
4515
  else
4508
4516
  throw i;
4509
4517
  }
4510
- return Yn(Rc.Provider, {
4518
+ return Yn(xc.Provider, {
4511
4519
  value: {
4512
4520
  didCatch: a,
4513
4521
  error: i,
@@ -4516,11 +4524,11 @@ class xc extends Xr {
4516
4524
  }, o);
4517
4525
  }
4518
4526
  }
4519
- function kc() {
4527
+ function Uc() {
4520
4528
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
4521
4529
  return e.length !== t.length || e.some((n, s) => !Object.is(n, t[s]));
4522
4530
  }
4523
- const Uc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ps = (e) => {
4531
+ const Mc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ps = (e) => {
4524
4532
  if (!e.trim())
4525
4533
  return { isValid: !1, parsed: null, placeholders: [], error: { message: "JSON is empty" } };
4526
4534
  try {
@@ -4555,13 +4563,13 @@ const Uc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ps = (e) => {
4555
4563
  }
4556
4564
  };
4557
4565
  }
4558
- }, Mc = (e, t) => {
4566
+ }, Bc = (e, t) => {
4559
4567
  let s = JSON.stringify(e, null, 2);
4560
4568
  return t.forEach(({ original: r }, a) => {
4561
- const i = `"__placeholder_${a}__"`, o = new RegExp(Uc(i), "g");
4569
+ const i = `"__placeholder_${a}__"`, o = new RegExp(Mc(i), "g");
4562
4570
  s = s.replace(o, r);
4563
4571
  }), s;
4564
- }, Bc = (e, t) => {
4572
+ }, Fc = (e, t) => {
4565
4573
  if (!e) return "";
4566
4574
  let n = JSON.stringify(e, null, 2);
4567
4575
  const s = /{{([^{}]+)}}/g;
@@ -4571,7 +4579,7 @@ const Uc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ps = (e) => {
4571
4579
  n = n.replace(r[0], i);
4572
4580
  }
4573
4581
  return n;
4574
- }, Fc = V(() => import("./shared-json-ld-DyCKYT2v.js")), ju = ({
4582
+ }, Kc = V(() => import("./shared-json-ld-LcYrLsUt.js")), Yu = ({
4575
4583
  value: e,
4576
4584
  onChange: t,
4577
4585
  disabled: n = !1,
@@ -4624,7 +4632,7 @@ const Uc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ps = (e) => {
4624
4632
  const B = ps(e);
4625
4633
  if (B.isValid)
4626
4634
  if (y(null), B.parsed) {
4627
- const w = Bc(B.parsed, o);
4635
+ const w = Fc(B.parsed, o);
4628
4636
  A(w);
4629
4637
  } else
4630
4638
  A("");
@@ -4634,17 +4642,17 @@ const Uc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ps = (e) => {
4634
4642
  const Te = () => {
4635
4643
  const B = ps(e);
4636
4644
  if (B.isValid && B.parsed) {
4637
- const w = Mc(B.parsed, B.placeholders);
4645
+ const w = Bc(B.parsed, B.placeholders);
4638
4646
  t(w);
4639
4647
  }
4640
4648
  }, Se = () => {
4641
4649
  h != null && h.position && S.current && (S.current.focus(), S.current.setSelectionRange(h.position, h.position + 1));
4642
4650
  };
4643
- return /* @__PURE__ */ c(xc, { fallback: /* @__PURE__ */ c("div", { children: "Some error" }), children: /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ m(Ra, { value: f, onValueChange: g, className: "w-full", children: [
4651
+ return /* @__PURE__ */ c(kc, { fallback: /* @__PURE__ */ c("div", { children: "Some error" }), children: /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ m(xa, { value: f, onValueChange: g, className: "w-full", children: [
4644
4652
  /* @__PURE__ */ m("div", { className: "mb-2 flex items-center justify-between", children: [
4645
- /* @__PURE__ */ m(xa, { className: "w-max", children: [
4653
+ /* @__PURE__ */ m(ka, { className: "w-max", children: [
4646
4654
  /* @__PURE__ */ m(ln, { value: "edit", className: "flex items-center gap-1", children: [
4647
- /* @__PURE__ */ c(ni, { className: "h-4 w-4" }),
4655
+ /* @__PURE__ */ c(si, { className: "h-4 w-4" }),
4648
4656
  /* @__PURE__ */ c("span", { children: "Edit" })
4649
4657
  ] }),
4650
4658
  /* @__PURE__ */ m(
@@ -4654,7 +4662,7 @@ const Uc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ps = (e) => {
4654
4662
  className: "flex items-center gap-1",
4655
4663
  disabled: !e.trim() || h !== null || b,
4656
4664
  children: [
4657
- /* @__PURE__ */ c(si, { className: "h-4 w-4" }),
4665
+ /* @__PURE__ */ c(ri, { className: "h-4 w-4" }),
4658
4666
  /* @__PURE__ */ c("span", { children: "Preview" })
4659
4667
  ]
4660
4668
  }
@@ -4666,14 +4674,14 @@ const Uc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ps = (e) => {
4666
4674
  className: "flex items-center gap-1",
4667
4675
  disabled: !e.trim() || h !== null,
4668
4676
  children: [
4669
- /* @__PURE__ */ c(ri, { className: "h-4 w-4" }),
4677
+ /* @__PURE__ */ c(ai, { className: "h-4 w-4" }),
4670
4678
  /* @__PURE__ */ c("span", { children: "Shared" })
4671
4679
  ]
4672
4680
  }
4673
4681
  )
4674
4682
  ] }),
4675
4683
  b ? null : f === "edit" && !s && /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ c(
4676
- Oc,
4684
+ Dc,
4677
4685
  {
4678
4686
  dataType: "value",
4679
4687
  data: o ?? {},
@@ -4691,7 +4699,7 @@ const Uc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ps = (e) => {
4691
4699
  onClick: Te,
4692
4700
  className: "absolute right-1 top-1 h-6 w-6 p-1",
4693
4701
  disabled: !e.trim() || n || h !== null,
4694
- children: /* @__PURE__ */ c(ai, {})
4702
+ children: /* @__PURE__ */ c(ii, {})
4695
4703
  }
4696
4704
  ) }),
4697
4705
  b ? /* @__PURE__ */ c("div", { className: "flex h-40 items-center justify-center rounded-md bg-black/20", children: /* @__PURE__ */ m("div", { className: "flex max-w-[400px] flex-col items-center gap-2 rounded-md bg-white p-4 shadow-lg", children: [
@@ -4716,9 +4724,9 @@ const Uc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ps = (e) => {
4716
4724
  readOnly: s
4717
4725
  }
4718
4726
  ),
4719
- h && /* @__PURE__ */ m(ka, { variant: "destructive", className: "mt-2", children: [
4720
- /* @__PURE__ */ c(ii, { className: "h-4 w-4" }),
4721
- /* @__PURE__ */ m(Ua, { className: "flex flex-col", children: [
4727
+ h && /* @__PURE__ */ m(Ua, { variant: "destructive", className: "mt-2", children: [
4728
+ /* @__PURE__ */ c(oi, { className: "h-4 w-4" }),
4729
+ /* @__PURE__ */ m(Ma, { className: "flex flex-col", children: [
4722
4730
  /* @__PURE__ */ c("span", { className: "font-medium", children: "Invalid JSON" }),
4723
4731
  /* @__PURE__ */ c("span", { className: "text-sm", children: h.message }),
4724
4732
  h.line && h.column && /* @__PURE__ */ m("span", { className: "text-sm", children: [
@@ -4745,9 +4753,9 @@ const Uc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ps = (e) => {
4745
4753
  /* @__PURE__ */ c(Jn, { rows: a, value: T, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
4746
4754
  /* @__PURE__ */ c("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
4747
4755
  ] }),
4748
- v && /* @__PURE__ */ c(cn, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(Fc, {}) }) })
4756
+ v && /* @__PURE__ */ c(cn, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(Kc, {}) }) })
4749
4757
  ] }) }) });
4750
- }, Yu = (e) => {
4758
+ }, Ju = (e) => {
4751
4759
  const t = Ds(), n = I();
4752
4760
  return re({
4753
4761
  queryKey: [E.GET_CHAI_USER, e],
@@ -4765,94 +4773,94 @@ const Uc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ps = (e) => {
4765
4773
  if (typeof window > "u")
4766
4774
  throw new Error("@chaibuilder/pages is not available on the server");
4767
4775
  export {
4768
- ku as $,
4776
+ Uu as $,
4769
4777
  E as A,
4770
4778
  $s as B,
4771
4779
  F as C,
4772
- pl as D,
4780
+ yl as D,
4773
4781
  se as E,
4774
4782
  nr as F,
4775
4783
  ur as G,
4776
- al as H,
4777
- Tu as I,
4778
- Su as J,
4784
+ il as H,
4785
+ Su as I,
4786
+ _u as J,
4779
4787
  ke as K,
4780
4788
  xt as L,
4781
4789
  _n as M,
4782
- _u as N,
4783
- pu as O,
4790
+ Pu as N,
4791
+ yu as O,
4784
4792
  te as P,
4785
- Lu as Q,
4786
- Gu as R,
4787
- vu as S,
4793
+ Nu as Q,
4794
+ Ou as R,
4795
+ bu as S,
4788
4796
  Bn as T,
4789
4797
  dt as U,
4790
- Ou as V,
4791
- Nu as W,
4792
- Wo as X,
4793
- vl as Y,
4798
+ Du as V,
4799
+ Cu as W,
4800
+ jo as X,
4801
+ bl as Y,
4794
4802
  Pn as Z,
4795
- Tl as _,
4803
+ Sl as _,
4796
4804
  Ae as a,
4797
- zu as a$,
4798
- Uu as a0,
4799
- wl as a1,
4800
- Mu as a2,
4801
- Bu as a3,
4802
- Pu as a4,
4803
- Eu as a5,
4804
- Cu as a6,
4805
+ Wu as a$,
4806
+ Mu as a0,
4807
+ vl as a1,
4808
+ Bu as a2,
4809
+ Fu as a3,
4810
+ wu as a4,
4811
+ pu as a5,
4812
+ Gu as a6,
4805
4813
  Z as a7,
4806
- $o as a8,
4807
- oc as a9,
4814
+ Qo as a8,
4815
+ lc as a9,
4808
4816
  nn as aA,
4809
4817
  Fs as aB,
4810
- uu as aC,
4811
- hu as aD,
4812
- ju as aE,
4818
+ du as aC,
4819
+ gu as aD,
4820
+ Yu as aE,
4813
4821
  ps as aF,
4814
- du as aG,
4815
- gu as aH,
4816
- mu as aI,
4817
- fu as aJ,
4818
- Xc as aK,
4819
- xc as aL,
4820
- wo as aM,
4821
- $i as aN,
4822
+ fu as aG,
4823
+ mu as aH,
4824
+ Eu as aI,
4825
+ hu as aJ,
4826
+ eu as aK,
4827
+ kc as aL,
4828
+ vo as aM,
4829
+ Qi as aN,
4822
4830
  Dn as aO,
4823
- Bi as aP,
4824
- Oc as aQ,
4825
- Wu as aR,
4826
- io as aS,
4827
- nu as aT,
4831
+ Fi as aP,
4832
+ Dc as aQ,
4833
+ ju as aR,
4834
+ oo as aS,
4835
+ su as aT,
4828
4836
  Ms as aU,
4829
- Ti as aV,
4830
- qu as aW,
4837
+ Si as aV,
4838
+ $u as aW,
4831
4839
  Ce as aX,
4832
- Qu as aY,
4833
- Tc as aZ,
4834
- $u as a_,
4835
- wu as aa,
4840
+ zu as aY,
4841
+ Sc as aZ,
4842
+ Qu as a_,
4843
+ vu as aa,
4836
4844
  Bt as ab,
4837
- Vu as ac,
4838
- xu as ad,
4839
- Ru as ae,
4845
+ Hu as ac,
4846
+ ku as ad,
4847
+ xu as ae,
4840
4848
  Xs as af,
4841
4849
  xe as ag,
4842
- Sl as ah,
4843
- Du as ai,
4844
- Iu as aj,
4845
- bu as ak,
4850
+ _l as ah,
4851
+ Ru as ai,
4852
+ Lu as aj,
4853
+ Iu as ak,
4846
4854
  Ft as al,
4847
- Au as am,
4848
- Ri as an,
4849
- Yu as ao,
4850
- Oi as ap,
4855
+ Tu as am,
4856
+ xi as an,
4857
+ Ju as ao,
4858
+ Di as ap,
4851
4859
  C as aq,
4852
4860
  I as ar,
4853
- Ac as as,
4854
- eu as at,
4855
- cu as au,
4861
+ Tc as as,
4862
+ tu as at,
4863
+ uu as au,
4856
4864
  xn as av,
4857
4865
  ue as aw,
4858
4866
  dn as ax,
@@ -4860,29 +4868,29 @@ export {
4860
4868
  Us as az,
4861
4869
  Ks as b,
4862
4870
  kn as b0,
4863
- Io as b1,
4871
+ Lo as b1,
4864
4872
  be as c,
4865
- ji as d,
4873
+ Yi as d,
4866
4874
  qs as e,
4867
- vo as f,
4875
+ bo as f,
4868
4876
  Vs as g,
4869
- su as h,
4870
- ru as i,
4877
+ ru as h,
4878
+ au as i,
4871
4879
  Be as j,
4872
4880
  Mn as k,
4873
4881
  Me as l,
4874
4882
  Ge as m,
4875
- gi as n,
4876
- iu as o,
4877
- mc as p,
4878
- au as q,
4879
- ou as r,
4880
- lu as s,
4883
+ mi as n,
4884
+ ou as o,
4885
+ Ec as p,
4886
+ iu as q,
4887
+ lu as r,
4888
+ cu as s,
4881
4889
  fn as t,
4882
- tu as u,
4883
- Hu as v,
4890
+ nu as u,
4891
+ qu as v,
4884
4892
  j as w,
4885
4893
  cr as x,
4886
- Fu as y,
4887
- Ku as z
4894
+ Ku as y,
4895
+ Vu as z
4888
4896
  };