@chaibuilder/pages 0.4.14 → 0.4.16
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.
- package/dist/{B4MFY5CR-CeGZGu8R.cjs → B4MFY5CR-BFhuj7MO.cjs} +1 -1
- package/dist/{B4MFY5CR-BAaAGAXs.js → B4MFY5CR-BG0CJbRg.js} +1 -1
- package/dist/{HO4MOOFI-C1bDs1HY.cjs → HO4MOOFI-BKZ0rHoD.cjs} +1 -1
- package/dist/{HO4MOOFI-CAG7BWJu.js → HO4MOOFI-Ds8uNsOs.js} +2 -2
- package/dist/{HUY7CZI3-BiyRQa11.js → HUY7CZI3-CoycOkLI.js} +2 -2
- package/dist/{HUY7CZI3-CZ6PS0vP.cjs → HUY7CZI3-DnUD8BzY.cjs} +1 -1
- package/dist/digital-asset-manager-D1P-iPRq.js +737 -0
- package/dist/digital-asset-manager-DK5idohB.cjs +1 -0
- package/dist/image-editor-BWLJT1mr.cjs +1 -0
- package/dist/image-editor-CzFST20j.js +104 -0
- package/dist/{index-HGE7qAuk.js → index-Ch0kaQDy.js} +358 -356
- package/dist/index-CwntNsgH.cjs +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/server.cjs +1 -1
- package/dist/server.d.ts +3 -1
- package/dist/server.js +120 -112
- package/package.json +1 -1
- package/dist/asset-metadata-editor-CyTBhS-V.js +0 -108
- package/dist/asset-metadata-editor-IRTgc3or.cjs +0 -1
- package/dist/digital-asset-manager-C_IzloX5.js +0 -496
- package/dist/digital-asset-manager-I67frLkV.cjs +0 -1
- package/dist/image-editor-By8RDHso.js +0 -102
- package/dist/image-editor-DHmv5L8S.cjs +0 -1
- package/dist/index-GG8u_jcv.cjs +0 -2
|
@@ -4,15 +4,15 @@ var Ls = (e) => {
|
|
|
4
4
|
var Ds = (e, t, n) => t.has(e) || Ls("Cannot " + n);
|
|
5
5
|
var B = (e, t, n) => (Ds(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ce = (e, t, n) => t.has(e) ? Ls("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), ie = (e, t, n, s) => (Ds(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
6
6
|
import { jsx as r, jsxs as u, Fragment as Ne } from "react/jsx-runtime";
|
|
7
|
-
import { has as Oe, get as le, isEmpty as ye, reverse as Ma, sortBy as Fa, each as qa, find as Ee, set as ja, startsWith as
|
|
7
|
+
import { has as Oe, get as le, isEmpty as ye, reverse as Ma, sortBy as Fa, each as qa, find as Ee, set as ja, startsWith as Ot, isEqual as is, map as je, toLower as Gt, trim as Ha, filter as Ie, startCase as Ft, groupBy as Ka, compact as Nn, includes as qt, concat as Js, endsWith as er, orderBy as mn, first as Va, uniq as za, debounce as $a, pick as tr, keys as Wa, pickBy as Ya, isArray as Qa, noop as Xa, isFunction as Za, cloneDeep as Ja, isString as Gs } from "lodash-es";
|
|
8
8
|
import * as ge from "react";
|
|
9
|
-
import nr, { useCallback as
|
|
9
|
+
import nr, { useCallback as Te, useMemo as W, useState as P, useEffect as Ae, useRef as dt, Suspense as ei, lazy as ti } from "react";
|
|
10
10
|
import { useAtom as Dn, atom as ls } from "jotai";
|
|
11
|
-
import { useQueryClient as
|
|
11
|
+
import { useQueryClient as xe, useQuery as Pe, useMutation as _e, onlineManager as sr, QueryClient as ni, QueryClientProvider as si } from "@tanstack/react-query";
|
|
12
12
|
import { toast as J } from "sonner";
|
|
13
|
-
import { useLanguages as ht, useUpdateBlocksPropsRealtime as rr, PERMISSIONS as ri, usePartailBlocksStore as ai, usePermissions as
|
|
14
|
-
import { Card as cs, CardHeader as us, CardTitle as ds, CardContent as hs, CardFooter as ms, Button as C, AlertDialog as ar, AlertDialogTrigger as ir, AlertDialogContent as lr, AlertDialogHeader as or, AlertDialogTitle as cr, AlertDialogDescription as ur, AlertDialogFooter as dr, AlertDialogCancel as hr, AlertDialogAction as mr, Popover as fr, PopoverTrigger as gr, PopoverContent as pr, Input as we, Label as re, Dialog as Ke, DialogContent as Ve, DialogHeader as ze, DialogTitle as $e, DialogDescription as Xe, Alert as yr, DialogFooter as tt, DropdownMenu as rn, DropdownMenuTrigger as an, DropdownMenuContent as ln, DropdownMenuItem as Ge, Textarea as
|
|
15
|
-
import { LockIcon as Nr, UserIcon as Bi, AlertTriangleIcon as Mi, Trash2 as Ar, Plus as ys, ImageIcon as
|
|
13
|
+
import { useLanguages as ht, useUpdateBlocksPropsRealtime as rr, PERMISSIONS as ri, usePartailBlocksStore as ai, usePermissions as Lt, useLibraryBlocks as ii, useTheme as li, useSavePage as os, mergeClasses as oi, useRightPanel as ci, useBlocksStore as ui, getBlocksFromHTML as di, useTranslation as hi, useSidebarActivePanel as mi, registerChaiSidebarPanel as $n, registerChaiTopBar as fi, registerChaiMediaManager as gi, registerChaiSaveToLibrary as pi, ChaiBuilderEditor as yi } from "@chaibuilder/sdk";
|
|
14
|
+
import { Card as cs, CardHeader as us, CardTitle as ds, CardContent as hs, CardFooter as ms, Button as C, AlertDialog as ar, AlertDialogTrigger as ir, AlertDialogContent as lr, AlertDialogHeader as or, AlertDialogTitle as cr, AlertDialogDescription as ur, AlertDialogFooter as dr, AlertDialogCancel as hr, AlertDialogAction as mr, Popover as fr, PopoverTrigger as gr, PopoverContent as pr, Input as we, Label as re, Dialog as Ke, DialogContent as Ve, DialogHeader as ze, DialogTitle as $e, DialogDescription as Xe, Alert as yr, DialogFooter as tt, DropdownMenu as rn, DropdownMenuTrigger as an, DropdownMenuContent as ln, DropdownMenuItem as Ge, Textarea as Rt, Select as vi, SelectTrigger as Ei, SelectValue as bi, SelectContent as wi, SelectItem as Si, Badge as qn, Sheet as vr, SheetContent as Er, SheetHeader as br, SheetTitle as wr, Separator as Ni, TooltipProvider as Sr, Tooltip as fs, SheetTrigger as Ai, TooltipTrigger as gs, ScrollArea as Ti, TooltipContent as ps, Skeleton as fn, DropdownMenuSeparator as xi, CardDescription as Ci, Command as Pi, CommandInput as _i, CommandList as Ii, CommandEmpty as ki, CommandGroup as Li, CommandItem as Rs, AlertDescription as Di, Accordion as Gi, AccordionItem as gn, AccordionTrigger as pn, AccordionContent as yn, HoverCard as Ri, HoverCardTrigger as Ui, HoverCardContent as Oi } from "@chaibuilder/sdk/ui";
|
|
15
|
+
import { LockIcon as Nr, UserIcon as Bi, AlertTriangleIcon as Mi, Trash2 as Ar, Plus as ys, ImageIcon as Tr, X as xr, AlertCircle as Cr, StarIcon as Fi, MoreHorizontal as vs, PencilIcon as qi, Power as Pr, TrashIcon as ji, Tag as Hi, File as on, Search as Ki, StarsIcon as Vi, Globe as zi, Pencil as $i, Trash as Es, SquareLibrary as Us, Logs as Wi, Loader as _r, Languages as Yi, ChevronDown as Ir, Star as Qi, History as Os, ArrowUpRight as Xi, Clock as Zi, Undo2 as kr, CloudOff as Ji, Edit as el, Save as Lr, GlobeIcon as tl, Eye as Dr, Palette as nl, CheckCircle as sl, Send as Bs, Rocket as Ms, Settings as rl, ExternalLink as al, EyeOff as il, Loader2 as Gr, LanguagesIcon as ll, DatabaseIcon as ol, ChevronLeft as cl, ChevronRight as ul, User as dl } from "lucide-react";
|
|
16
16
|
import { format as Gn, formatDistanceToNow as hl } from "date-fns";
|
|
17
17
|
import { useRegisteredChaiBlocks as ml, getDefaultBlockProps as fl } from "@chaibuilder/runtime";
|
|
18
18
|
import { z as An } from "zod";
|
|
@@ -251,8 +251,9 @@ const He = {
|
|
|
251
251
|
UPLOAD_ASSET: "UPLOAD_ASSET",
|
|
252
252
|
DELETE_ASSET: "DELETE_ASSET",
|
|
253
253
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
254
|
-
GET_ASSETS: "GET_ASSETS"
|
|
255
|
-
|
|
254
|
+
GET_ASSETS: "GET_ASSETS",
|
|
255
|
+
GET_ASSET: "GET_ASSET"
|
|
256
|
+
}, z = "chaibuilder";
|
|
256
257
|
let pl = 0;
|
|
257
258
|
function Fs(e, t) {
|
|
258
259
|
const n = `atom${++pl}`, s = {
|
|
@@ -359,7 +360,7 @@ const Rr = "__logged_in_user", Al = Nl(
|
|
|
359
360
|
Rr,
|
|
360
361
|
null
|
|
361
362
|
), nt = () => {
|
|
362
|
-
const [e, t] = Dn(Al), n =
|
|
363
|
+
const [e, t] = Dn(Al), n = Te(() => {
|
|
363
364
|
t(null), localStorage.removeItem(Rr);
|
|
364
365
|
}, [t]);
|
|
365
366
|
return {
|
|
@@ -369,7 +370,7 @@ const Rr = "__logged_in_user", Al = Nl(
|
|
|
369
370
|
logout: n
|
|
370
371
|
};
|
|
371
372
|
}, Ur = () => {
|
|
372
|
-
const { user: e, setUser: t, logout: n } = nt(), s = Rn(), a =
|
|
373
|
+
const { user: e, setUser: t, logout: n } = nt(), s = Rn(), a = xe();
|
|
373
374
|
return Pe({
|
|
374
375
|
queryKey: ["refresh_token"],
|
|
375
376
|
queryFn: async () => {
|
|
@@ -390,7 +391,7 @@ const Rr = "__logged_in_user", Al = Nl(
|
|
|
390
391
|
if (i.ok) {
|
|
391
392
|
const l = await i.json();
|
|
392
393
|
Oe(l, "id") && Oe(l, "email") && Oe(l, "accessToken") && Oe(l, "refreshToken") ? (t(l), a.invalidateQueries({
|
|
393
|
-
queryKey: [
|
|
394
|
+
queryKey: [z],
|
|
394
395
|
refetchType: "all"
|
|
395
396
|
})) : n();
|
|
396
397
|
} else
|
|
@@ -417,11 +418,11 @@ if (import.meta.vitest) {
|
|
|
417
418
|
});
|
|
418
419
|
}
|
|
419
420
|
const Ju = () => {
|
|
420
|
-
const { user: e } = nt(), t = st("onSessionExpired"), n =
|
|
421
|
+
const { user: e } = nt(), t = st("onSessionExpired"), n = W(
|
|
421
422
|
() => e == null ? void 0 : e.accessToken,
|
|
422
423
|
[e == null ? void 0 : e.accessToken]
|
|
423
424
|
);
|
|
424
|
-
return
|
|
425
|
+
return Te(
|
|
425
426
|
async (s, a, i = {}) => {
|
|
426
427
|
if (!n) {
|
|
427
428
|
console.log("no auth token");
|
|
@@ -449,11 +450,11 @@ const Ju = () => {
|
|
|
449
450
|
[n, t]
|
|
450
451
|
);
|
|
451
452
|
}, X = () => {
|
|
452
|
-
const { user: e } = nt(), t =
|
|
453
|
+
const { user: e } = nt(), t = W(
|
|
453
454
|
() => e == null ? void 0 : e.accessToken,
|
|
454
455
|
[e == null ? void 0 : e.accessToken]
|
|
455
456
|
), { refetch: n } = Ur();
|
|
456
|
-
return
|
|
457
|
+
return Te(
|
|
457
458
|
async (s, a, i = {}) => {
|
|
458
459
|
if (t)
|
|
459
460
|
try {
|
|
@@ -475,17 +476,17 @@ const Ju = () => {
|
|
|
475
476
|
[t, n]
|
|
476
477
|
);
|
|
477
478
|
}, Or = () => {
|
|
478
|
-
const e = ee(), t =
|
|
479
|
+
const e = ee(), t = xe(), n = X();
|
|
479
480
|
return _e({
|
|
480
481
|
mutationFn: async (s) => n(e, { action: I.RELEASE_LOCK, data: s }),
|
|
481
482
|
onSuccess: () => {
|
|
482
483
|
t.invalidateQueries({
|
|
483
|
-
queryKey: [
|
|
484
|
+
queryKey: [z, I.GET_DRAFT_PAGE]
|
|
484
485
|
});
|
|
485
486
|
}
|
|
486
487
|
});
|
|
487
488
|
}, Br = () => {
|
|
488
|
-
const e = ee(), t =
|
|
489
|
+
const e = ee(), t = xe(), n = X();
|
|
489
490
|
return _e({
|
|
490
491
|
mutationFn: async (s) => n(e, {
|
|
491
492
|
action: I.UPDATE_WEBSITE_SETTINGS,
|
|
@@ -494,7 +495,7 @@ const Ju = () => {
|
|
|
494
495
|
onSuccess: (s, a) => {
|
|
495
496
|
var i;
|
|
496
497
|
t.invalidateQueries({
|
|
497
|
-
queryKey: [
|
|
498
|
+
queryKey: [z, I.GET_WEBSITE_DRAFT_SETTINGS]
|
|
498
499
|
}), (i = a == null ? void 0 : a.settings) != null && i.theme || J.success("Website settings updated successfully.");
|
|
499
500
|
},
|
|
500
501
|
onError: (s) => {
|
|
@@ -503,13 +504,13 @@ const Ju = () => {
|
|
|
503
504
|
});
|
|
504
505
|
}
|
|
505
506
|
});
|
|
506
|
-
},
|
|
507
|
-
const e = ee(), t =
|
|
507
|
+
}, Tl = () => {
|
|
508
|
+
const e = ee(), t = xe(), n = X();
|
|
508
509
|
return _e({
|
|
509
510
|
mutationFn: async (s) => n(e, { action: I.UPDATE_WEBSITE_DATA, data: s }),
|
|
510
511
|
onSuccess: () => {
|
|
511
512
|
t.invalidateQueries({
|
|
512
|
-
queryKey: [
|
|
513
|
+
queryKey: [z, I.GET_WEBSITE_DATA]
|
|
513
514
|
}), J.success("Website data updated successfully.");
|
|
514
515
|
},
|
|
515
516
|
onError: (s) => {
|
|
@@ -532,21 +533,21 @@ function Ue() {
|
|
|
532
533
|
};
|
|
533
534
|
}, []), [e, t];
|
|
534
535
|
}
|
|
535
|
-
const
|
|
536
|
+
const xl = ls({}), Mr = () => Dn(xl), Cl = () => {
|
|
536
537
|
const [e] = Ue(), t = e.get("page"), n = dt(""), { mutate: s } = Or();
|
|
537
538
|
Ae(() => {
|
|
538
539
|
!ye(n.current) && t !== n.current && s({ id: n.current }), n.current = t;
|
|
539
540
|
}, [t, s, n]);
|
|
540
541
|
}, st = (e, t) => {
|
|
541
542
|
const [n] = Mr();
|
|
542
|
-
return
|
|
543
|
+
return W(
|
|
543
544
|
() => le(n, e, t),
|
|
544
545
|
[n, e, t]
|
|
545
546
|
);
|
|
546
547
|
}, ee = () => st("apiUrl", "/chai/api"), Rn = () => st("usersApiUrl", "/chai/users"), ed = () => st("assetsApiUrl", "/chai/assets"), cn = () => {
|
|
547
548
|
const e = ee(), [t] = Ue(), n = t.get("page"), s = X();
|
|
548
549
|
return Pe({
|
|
549
|
-
queryKey: [
|
|
550
|
+
queryKey: [z, I.GET_LANGUAGE_PAGES, n],
|
|
550
551
|
initialData: [],
|
|
551
552
|
queryFn: async () => {
|
|
552
553
|
if (!n) return null;
|
|
@@ -573,7 +574,7 @@ const Tl = ls({}), Mr = () => Dn(Tl), Cl = () => {
|
|
|
573
574
|
})
|
|
574
575
|
});
|
|
575
576
|
}, Fr = (e) => {
|
|
576
|
-
const { fallbackLang: t } = ht(), { data: n } = un(), { data: s, isFetching: a } = cn(), i =
|
|
577
|
+
const { fallbackLang: t } = ht(), { data: n } = un(), { data: s, isFetching: a } = cn(), i = W(() => {
|
|
577
578
|
const l = { [t]: !0 };
|
|
578
579
|
return qa(le(n, "languages"), (o) => {
|
|
579
580
|
const c = Ee(s, { lang: o });
|
|
@@ -582,34 +583,35 @@ const Tl = ls({}), Mr = () => Dn(Tl), Cl = () => {
|
|
|
582
583
|
}, [t, s, n]);
|
|
583
584
|
return a || ye(e) || e && i[e];
|
|
584
585
|
}, ws = () => {
|
|
585
|
-
const e =
|
|
586
|
-
queryKey: [
|
|
586
|
+
const e = xe(), { data: t } = Pe({
|
|
587
|
+
queryKey: [z, I.AI_CONTEXT],
|
|
587
588
|
initialData: "",
|
|
588
|
-
queryFn: () => ""
|
|
589
|
+
queryFn: () => "",
|
|
590
|
+
staleTime: 0
|
|
589
591
|
});
|
|
590
|
-
return { setAiContext:
|
|
592
|
+
return { setAiContext: Te(
|
|
591
593
|
(s) => {
|
|
592
|
-
e.setQueryData([I.AI_CONTEXT], s);
|
|
594
|
+
e.setQueryData([z, I.AI_CONTEXT], s);
|
|
593
595
|
},
|
|
594
596
|
[e]
|
|
595
597
|
), aiContext: t };
|
|
596
598
|
}, Un = () => {
|
|
597
599
|
const e = X(), t = ee();
|
|
598
600
|
return Pe({
|
|
599
|
-
queryKey: [
|
|
601
|
+
queryKey: [z, I.GET_WEBSITE_PAGES],
|
|
600
602
|
staleTime: 1e3 * 60 * 5,
|
|
601
603
|
queryFn: async () => e(t, { action: I.GET_WEBSITE_PAGES }) || []
|
|
602
604
|
});
|
|
603
605
|
}, Pl = ls({ lastSaved: void 0 }), Ss = () => Dn(Pl), Be = () => {
|
|
604
606
|
const [e] = Ue(), t = e.get("page"), { data: n, isFetching: s } = Un();
|
|
605
|
-
return { data:
|
|
607
|
+
return { data: W(
|
|
606
608
|
() => Ee(n, { id: t }) || {},
|
|
607
609
|
[n, t]
|
|
608
610
|
), isFetching: s };
|
|
609
611
|
}, dn = (e) => {
|
|
610
612
|
const t = Rn(), n = X();
|
|
611
613
|
return Pe({
|
|
612
|
-
queryKey: [
|
|
614
|
+
queryKey: [z, "chaiUserInfo", e],
|
|
613
615
|
queryFn: async () => await n(t, {
|
|
614
616
|
action: I.GET_CHAI_USER,
|
|
615
617
|
data: { userId: e }
|
|
@@ -618,7 +620,7 @@ const Tl = ls({}), Mr = () => Dn(Tl), Cl = () => {
|
|
|
618
620
|
});
|
|
619
621
|
}, _l = ls(void 0), hn = () => {
|
|
620
622
|
const [e] = Ue(), t = e.get("page"), { user: n } = nt(), [s, a] = Dn(_l);
|
|
621
|
-
return
|
|
623
|
+
return W(() => ({
|
|
622
624
|
isLocked: t && (n == null ? void 0 : n.id) !== s,
|
|
623
625
|
currentEditor: s,
|
|
624
626
|
setCurrentEditor: (i) => a(i)
|
|
@@ -626,7 +628,7 @@ const Tl = ls({}), Mr = () => Dn(Tl), Cl = () => {
|
|
|
626
628
|
}, qr = () => {
|
|
627
629
|
const [e] = Ue(), t = e.get("page"), n = ee(), { setAiContext: s } = ws(), { setCurrentEditor: a } = hn(), [, i] = Ss(), l = X();
|
|
628
630
|
return Pe({
|
|
629
|
-
queryKey: [
|
|
631
|
+
queryKey: [z, I.GET_DRAFT_PAGE, t],
|
|
630
632
|
staleTime: 1 / 0,
|
|
631
633
|
gcTime: 1 / 0,
|
|
632
634
|
queryFn: async () => {
|
|
@@ -647,7 +649,7 @@ const Tl = ls({}), Mr = () => Dn(Tl), Cl = () => {
|
|
|
647
649
|
}) => {
|
|
648
650
|
const n = ee(), s = X();
|
|
649
651
|
return Pe({
|
|
650
|
-
queryKey: [
|
|
652
|
+
queryKey: [z, I.GET_BUILDER_PAGE_DATA, e, t],
|
|
651
653
|
initialData: {},
|
|
652
654
|
queryFn: async () => s(n, {
|
|
653
655
|
action: I.GET_BUILDER_PAGE_DATA,
|
|
@@ -726,7 +728,7 @@ function Il({
|
|
|
726
728
|
] }) });
|
|
727
729
|
}
|
|
728
730
|
const kl = () => {
|
|
729
|
-
const { isLocked: e, currentEditor: t } = hn(), { data: n } = dn(t), [s] = Ue(), a = s.get("page"), { mutate: i } = Or(), { isFetching: l } = qr(), o =
|
|
731
|
+
const { isLocked: e, currentEditor: t } = hn(), { data: n } = dn(t), [s] = Ue(), a = s.get("page"), { mutate: i } = Or(), { isFetching: l } = qr(), o = Te(() => {
|
|
730
732
|
i({ id: a });
|
|
731
733
|
}, [a, i]);
|
|
732
734
|
return !e || l ? /* @__PURE__ */ r("div", { className: "" }) : /* @__PURE__ */ r(
|
|
@@ -791,7 +793,7 @@ const kl = () => {
|
|
|
791
793
|
}, Gl = (e) => {
|
|
792
794
|
const t = ee(), n = X();
|
|
793
795
|
return Pe({
|
|
794
|
-
queryKey: [
|
|
796
|
+
queryKey: [z, "uiBlockDetails", e],
|
|
795
797
|
enabled: !!e,
|
|
796
798
|
// Only run query if blockId is provided
|
|
797
799
|
queryFn: async () => {
|
|
@@ -935,12 +937,12 @@ const kl = () => {
|
|
|
935
937
|
}
|
|
936
938
|
);
|
|
937
939
|
}, Bl = () => {
|
|
938
|
-
const e = ee(), t = X(), n =
|
|
940
|
+
const e = ee(), t = X(), n = xe(), {
|
|
939
941
|
data: s = [],
|
|
940
942
|
isLoading: a,
|
|
941
943
|
error: i
|
|
942
944
|
} = Pe({
|
|
943
|
-
queryKey: [
|
|
945
|
+
queryKey: [z, "library-groups"],
|
|
944
946
|
queryFn: async () => {
|
|
945
947
|
try {
|
|
946
948
|
return await t(e, {
|
|
@@ -962,7 +964,7 @@ const kl = () => {
|
|
|
962
964
|
},
|
|
963
965
|
onSuccess: () => {
|
|
964
966
|
n.invalidateQueries({
|
|
965
|
-
queryKey: [
|
|
967
|
+
queryKey: [z, "library-groups"]
|
|
966
968
|
}), J.success("Group created successfully");
|
|
967
969
|
},
|
|
968
970
|
onError: (c) => {
|
|
@@ -1007,7 +1009,7 @@ const kl = () => {
|
|
|
1007
1009
|
{ id: "stats", name: "Stats" },
|
|
1008
1010
|
{ id: "team", name: "Team" },
|
|
1009
1011
|
{ id: "timeline", name: "Timeline" }
|
|
1010
|
-
]), f =
|
|
1012
|
+
]), f = W(
|
|
1011
1013
|
() => [
|
|
1012
1014
|
...o,
|
|
1013
1015
|
...c.filter(
|
|
@@ -1082,7 +1084,7 @@ const kl = () => {
|
|
|
1082
1084
|
)
|
|
1083
1085
|
] });
|
|
1084
1086
|
}, Fl = 1 * 1024 * 1024, ql = ({ value: e, onChange: t }) => {
|
|
1085
|
-
const [n, s] = P(!1), a = dt(null), i =
|
|
1087
|
+
const [n, s] = P(!1), a = dt(null), i = Te(
|
|
1086
1088
|
(c) => {
|
|
1087
1089
|
var f;
|
|
1088
1090
|
const d = (f = c.target.files) == null ? void 0 : f[0];
|
|
@@ -1135,7 +1137,7 @@ const kl = () => {
|
|
|
1135
1137
|
/* @__PURE__ */ r("div", { className: "animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" }),
|
|
1136
1138
|
"Uploading..."
|
|
1137
1139
|
] }) : /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
|
|
1138
|
-
/* @__PURE__ */ r(
|
|
1140
|
+
/* @__PURE__ */ r(Tr, { className: "h-4 w-4" }),
|
|
1139
1141
|
"Select image"
|
|
1140
1142
|
] })
|
|
1141
1143
|
}
|
|
@@ -1149,7 +1151,7 @@ const kl = () => {
|
|
|
1149
1151
|
onClick: () => {
|
|
1150
1152
|
t(""), a.current && (a.current.value = "");
|
|
1151
1153
|
},
|
|
1152
|
-
children: /* @__PURE__ */ r(
|
|
1154
|
+
children: /* @__PURE__ */ r(xr, { className: "h-4 w-4" })
|
|
1153
1155
|
}
|
|
1154
1156
|
)
|
|
1155
1157
|
] }),
|
|
@@ -1200,9 +1202,9 @@ const kl = () => {
|
|
|
1200
1202
|
EDIT_MEDIA: "edit_media",
|
|
1201
1203
|
DELETE_MEDIA: "delete_media"
|
|
1202
1204
|
}, jl = (e) => {
|
|
1203
|
-
const { blocks: t, close: n, blockId: s } = e, { getPartailBlocks: a } = ai(), i = t.find((N) => N._id === s), l = i == null ? void 0 : i._libBlockId, o = !!l, c =
|
|
1205
|
+
const { blocks: t, close: n, blockId: s } = e, { getPartailBlocks: a } = ai(), i = t.find((N) => N._id === s), l = i == null ? void 0 : i._libBlockId, o = !!l, c = W(() => t.some(
|
|
1204
1206
|
(N) => N._type === "PartialBlock" || N._type === "GlobalBlock"
|
|
1205
|
-
), [t]), d =
|
|
1207
|
+
), [t]), d = W(() => {
|
|
1206
1208
|
let N = [];
|
|
1207
1209
|
for (const L of t)
|
|
1208
1210
|
if (L._type === "PartialBlock" || L._type === "GlobalBlock") {
|
|
@@ -1211,7 +1213,7 @@ const kl = () => {
|
|
|
1211
1213
|
} else
|
|
1212
1214
|
N.push(L);
|
|
1213
1215
|
return N;
|
|
1214
|
-
}, [t, a]), [f, h] = P(""), [y, v] = P(""), [p, A] = P(""), [E,
|
|
1216
|
+
}, [t, a]), [f, h] = P(""), [y, v] = P(""), [p, A] = P(""), [E, T] = P(""), [D, S] = P({}), [w, _] = P(!1), [k, oe] = P(o), [te, G] = P(!1), { hasPermission: O } = Lt(), x = O(he.DELETE_LIBRARY_BLOCK), M = rr(), ne = () => {
|
|
1215
1217
|
M([s], { _libBlockId: void 0 }), J.success("Block delinked from library"), n();
|
|
1216
1218
|
}, {
|
|
1217
1219
|
data: me,
|
|
@@ -1221,7 +1223,7 @@ const kl = () => {
|
|
|
1221
1223
|
Ae(() => {
|
|
1222
1224
|
fe && o && (G(!0), oe(!1));
|
|
1223
1225
|
}, [fe, o]), Ae(() => {
|
|
1224
|
-
me && !Z && (h(me.name || ""), v(me.group || ""), A(me.description || ""),
|
|
1226
|
+
me && !Z && (h(me.name || ""), v(me.group || ""), A(me.description || ""), T(me.preview || ""), oe(!1));
|
|
1225
1227
|
}, [me, Z]), Ae(() => {
|
|
1226
1228
|
const N = f.trim().length >= 2, L = y.trim() !== "";
|
|
1227
1229
|
_(N && L && !c);
|
|
@@ -1229,14 +1231,14 @@ const kl = () => {
|
|
|
1229
1231
|
const K = () => {
|
|
1230
1232
|
const N = {};
|
|
1231
1233
|
return f.trim() ? f.length < 2 && (N.name = "Name must be at least 2 characters") : N.name = "Name is required", y || (N.group = "Group is required"), S(N), Object.keys(N).length === 0 && !c;
|
|
1232
|
-
}, { resetLibrary: pe } = ii({ id: "" }),
|
|
1234
|
+
}, { resetLibrary: pe } = ii({ id: "" }), $ = Dl(
|
|
1233
1235
|
(N) => {
|
|
1234
1236
|
o || M([s], { _libBlockId: N.id }), J.success(`Block ${o ? "updated" : "saved"} successfully`), pe(N.library), n();
|
|
1235
1237
|
}
|
|
1236
1238
|
), g = async (N) => {
|
|
1237
1239
|
if (N.preventDefault(), !K()) return;
|
|
1238
1240
|
const L = d.map((U) => (Oe(U, "_libBlockId") && delete U._libBlockId, U));
|
|
1239
|
-
|
|
1241
|
+
$.mutate({
|
|
1240
1242
|
name: f.trim(),
|
|
1241
1243
|
group: y,
|
|
1242
1244
|
blocks: L,
|
|
@@ -1246,7 +1248,7 @@ const kl = () => {
|
|
|
1246
1248
|
// Include id if in edit mode
|
|
1247
1249
|
...o ? { id: l } : {}
|
|
1248
1250
|
});
|
|
1249
|
-
}, m =
|
|
1251
|
+
}, m = $.isPending;
|
|
1250
1252
|
return k || Z ? /* @__PURE__ */ r("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ r("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" }) }) : te ? /* @__PURE__ */ u("div", { className: "p-6 space-y-4", children: [
|
|
1251
1253
|
/* @__PURE__ */ r("div", { className: "text-destructive font-medium", children: "Block Not Found" }),
|
|
1252
1254
|
/* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground", children: "This block could not be found on the server. It may have been deleted." }),
|
|
@@ -1311,11 +1313,11 @@ const kl = () => {
|
|
|
1311
1313
|
] }),
|
|
1312
1314
|
/* @__PURE__ */ u("div", { className: "space-y-2", children: [
|
|
1313
1315
|
/* @__PURE__ */ r(re, { htmlFor: "previewImage", children: "Preview Image (optional)" }),
|
|
1314
|
-
/* @__PURE__ */ r(ql, { value: E, onChange:
|
|
1316
|
+
/* @__PURE__ */ r(ql, { value: E, onChange: T }),
|
|
1315
1317
|
/* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground", children: "max 1mb" })
|
|
1316
1318
|
] }),
|
|
1317
1319
|
/* @__PURE__ */ u("div", { className: "flex justify-end gap-2 pt-2", children: [
|
|
1318
|
-
o &&
|
|
1320
|
+
o && x && /* @__PURE__ */ r(
|
|
1319
1321
|
Ol,
|
|
1320
1322
|
{
|
|
1321
1323
|
blockId: s,
|
|
@@ -1393,13 +1395,13 @@ const kl = () => {
|
|
|
1393
1395
|
}, De = () => {
|
|
1394
1396
|
const e = ee(), t = X();
|
|
1395
1397
|
return Pe({
|
|
1396
|
-
queryKey: [
|
|
1398
|
+
queryKey: [z, I.GET_PAGE_TYPES],
|
|
1397
1399
|
initialData: [],
|
|
1398
1400
|
queryFn: async () => t(e, { action: I.GET_PAGE_TYPES })
|
|
1399
1401
|
});
|
|
1400
1402
|
}, Kl = (e) => {
|
|
1401
1403
|
const { data: t } = De();
|
|
1402
|
-
return
|
|
1404
|
+
return W(
|
|
1403
1405
|
() => t == null ? void 0 : t.find((n) => n.key === e),
|
|
1404
1406
|
[t, e]
|
|
1405
1407
|
);
|
|
@@ -1421,7 +1423,7 @@ const kl = () => {
|
|
|
1421
1423
|
}
|
|
1422
1424
|
});
|
|
1423
1425
|
}, Hr = () => {
|
|
1424
|
-
const e = ee(), t =
|
|
1426
|
+
const e = ee(), t = xe(), n = X(), { data: s } = De();
|
|
1425
1427
|
return _e({
|
|
1426
1428
|
mutationFn: async (a) => (a.template && console.log("Creating page from template:", a.template), await n(e, {
|
|
1427
1429
|
action: I.CREATE_PAGE,
|
|
@@ -1431,12 +1433,12 @@ const kl = () => {
|
|
|
1431
1433
|
var o;
|
|
1432
1434
|
i && (i != null && i.primaryPage) ? t.invalidateQueries({
|
|
1433
1435
|
queryKey: [
|
|
1434
|
-
|
|
1436
|
+
z,
|
|
1435
1437
|
I.GET_LANGUAGE_PAGES,
|
|
1436
1438
|
i == null ? void 0 : i.primaryPage
|
|
1437
1439
|
]
|
|
1438
1440
|
}) : t.invalidateQueries({
|
|
1439
|
-
queryKey: [
|
|
1441
|
+
queryKey: [z, I.GET_WEBSITE_PAGES]
|
|
1440
1442
|
});
|
|
1441
1443
|
const l = i.template ? `Page created from "${i.template.name}" template` : i.hasSlug === !1 ? "New " + ((o = Ee(s, { key: i.pageType })) == null ? void 0 : o.name) + " added successfully" : "New page added successfully";
|
|
1442
1444
|
J.success(l);
|
|
@@ -1452,7 +1454,7 @@ const kl = () => {
|
|
|
1452
1454
|
}
|
|
1453
1455
|
});
|
|
1454
1456
|
}, Ns = () => {
|
|
1455
|
-
const e = ee(), t =
|
|
1457
|
+
const e = ee(), t = xe(), n = X(), { data: s } = De();
|
|
1456
1458
|
return _e({
|
|
1457
1459
|
mutationFn: async (a) => await n(e, {
|
|
1458
1460
|
action: I.UPDATE_PAGE,
|
|
@@ -1461,12 +1463,12 @@ const kl = () => {
|
|
|
1461
1463
|
onSuccess: (a, i) => {
|
|
1462
1464
|
i && (i != null && i.primaryPage || i != null && i.seo) ? t.invalidateQueries({
|
|
1463
1465
|
queryKey: [
|
|
1464
|
-
|
|
1466
|
+
z,
|
|
1465
1467
|
I.GET_LANGUAGE_PAGES,
|
|
1466
1468
|
i == null ? void 0 : i.primaryPage
|
|
1467
1469
|
]
|
|
1468
1470
|
}) : t.invalidateQueries({
|
|
1469
|
-
queryKey: [
|
|
1471
|
+
queryKey: [z, I.GET_WEBSITE_PAGES]
|
|
1470
1472
|
});
|
|
1471
1473
|
},
|
|
1472
1474
|
onError: (a, i) => {
|
|
@@ -1480,7 +1482,7 @@ const kl = () => {
|
|
|
1480
1482
|
}
|
|
1481
1483
|
});
|
|
1482
1484
|
}, zl = () => {
|
|
1483
|
-
const e = ee(), t =
|
|
1485
|
+
const e = ee(), t = xe(), n = X(), { data: s } = De();
|
|
1484
1486
|
return _e({
|
|
1485
1487
|
mutationFn: async (a) => n(e, {
|
|
1486
1488
|
action: I.DELETE_PAGE,
|
|
@@ -1495,12 +1497,12 @@ const kl = () => {
|
|
|
1495
1497
|
}
|
|
1496
1498
|
i && (i != null && i.primaryPage) ? t.invalidateQueries({
|
|
1497
1499
|
queryKey: [
|
|
1498
|
-
|
|
1500
|
+
z,
|
|
1499
1501
|
I.GET_LANGUAGE_PAGES,
|
|
1500
1502
|
i == null ? void 0 : i.primaryPage
|
|
1501
1503
|
]
|
|
1502
1504
|
}) : t.invalidateQueries({
|
|
1503
|
-
queryKey: [
|
|
1505
|
+
queryKey: [z, I.GET_WEBSITE_PAGES]
|
|
1504
1506
|
});
|
|
1505
1507
|
},
|
|
1506
1508
|
onError: (a, i) => {
|
|
@@ -1514,7 +1516,7 @@ const kl = () => {
|
|
|
1514
1516
|
}
|
|
1515
1517
|
});
|
|
1516
1518
|
}, $l = () => {
|
|
1517
|
-
const e = ee(), t =
|
|
1519
|
+
const e = ee(), t = xe(), n = X(), { data: s } = De();
|
|
1518
1520
|
return _e({
|
|
1519
1521
|
mutationFn: async (a) => n(e, {
|
|
1520
1522
|
action: I.TAKE_OFFLINE,
|
|
@@ -1523,12 +1525,12 @@ const kl = () => {
|
|
|
1523
1525
|
onSuccess: (a, i) => {
|
|
1524
1526
|
i && (i != null && i.primaryPage) ? t.invalidateQueries({
|
|
1525
1527
|
queryKey: [
|
|
1526
|
-
|
|
1528
|
+
z,
|
|
1527
1529
|
I.GET_LANGUAGE_PAGES,
|
|
1528
1530
|
i == null ? void 0 : i.primaryPage
|
|
1529
1531
|
]
|
|
1530
1532
|
}) : t.invalidateQueries({
|
|
1531
|
-
queryKey: [
|
|
1533
|
+
queryKey: [z, I.GET_WEBSITE_PAGES]
|
|
1532
1534
|
});
|
|
1533
1535
|
const l = Ee(s, { key: i.pageType });
|
|
1534
1536
|
J.success(
|
|
@@ -1546,7 +1548,7 @@ const kl = () => {
|
|
|
1546
1548
|
}
|
|
1547
1549
|
});
|
|
1548
1550
|
}, As = () => {
|
|
1549
|
-
const e = ee(), t = X(), n =
|
|
1551
|
+
const e = ee(), t = X(), n = xe(), { data: s } = Be();
|
|
1550
1552
|
return _e({
|
|
1551
1553
|
mutationFn: async ({ ids: a }) => t(e, {
|
|
1552
1554
|
action: I.PUBLISH_CHANGES,
|
|
@@ -1554,11 +1556,11 @@ const kl = () => {
|
|
|
1554
1556
|
}),
|
|
1555
1557
|
onSuccess: () => {
|
|
1556
1558
|
n.invalidateQueries({
|
|
1557
|
-
queryKey: [
|
|
1559
|
+
queryKey: [z, I.GET_CHANGES]
|
|
1558
1560
|
}), n.invalidateQueries({
|
|
1559
|
-
queryKey: [
|
|
1561
|
+
queryKey: [z, I.GET_WEBSITE_PAGES]
|
|
1560
1562
|
}), n.invalidateQueries({
|
|
1561
|
-
queryKey: [
|
|
1563
|
+
queryKey: [z, I.GET_LANGUAGE_PAGES, s == null ? void 0 : s.id]
|
|
1562
1564
|
});
|
|
1563
1565
|
},
|
|
1564
1566
|
onError: () => {
|
|
@@ -1566,7 +1568,7 @@ const kl = () => {
|
|
|
1566
1568
|
}
|
|
1567
1569
|
});
|
|
1568
1570
|
}, Wl = () => {
|
|
1569
|
-
const e = ee(), t = X(), n =
|
|
1571
|
+
const e = ee(), t = X(), n = xe();
|
|
1570
1572
|
return _e({
|
|
1571
1573
|
mutationFn: async (s) => {
|
|
1572
1574
|
var a;
|
|
@@ -1583,7 +1585,7 @@ const kl = () => {
|
|
|
1583
1585
|
},
|
|
1584
1586
|
onSuccess: () => {
|
|
1585
1587
|
n.invalidateQueries({
|
|
1586
|
-
queryKey: [
|
|
1588
|
+
queryKey: [z, I.GET_WEBSITE_PAGES]
|
|
1587
1589
|
}), J.success("Page marked as template successfully.");
|
|
1588
1590
|
},
|
|
1589
1591
|
onError: () => {
|
|
@@ -1591,7 +1593,7 @@ const kl = () => {
|
|
|
1591
1593
|
}
|
|
1592
1594
|
});
|
|
1593
1595
|
}, Yl = () => {
|
|
1594
|
-
const e = ee(), t = X(), n =
|
|
1596
|
+
const e = ee(), t = X(), n = xe();
|
|
1595
1597
|
return _e({
|
|
1596
1598
|
mutationFn: async (s) => t(e, {
|
|
1597
1599
|
action: I.UNMARK_AS_TEMPLATE,
|
|
@@ -1599,7 +1601,7 @@ const kl = () => {
|
|
|
1599
1601
|
}),
|
|
1600
1602
|
onSuccess: () => {
|
|
1601
1603
|
n.invalidateQueries({
|
|
1602
|
-
queryKey: [
|
|
1604
|
+
queryKey: [z, I.GET_WEBSITE_PAGES]
|
|
1603
1605
|
}), J.success("Page unmarked as template successfully.");
|
|
1604
1606
|
},
|
|
1605
1607
|
onError: () => {
|
|
@@ -1607,7 +1609,7 @@ const kl = () => {
|
|
|
1607
1609
|
}
|
|
1608
1610
|
});
|
|
1609
1611
|
}, Ql = () => {
|
|
1610
|
-
const e = ee(), t = X(), n =
|
|
1612
|
+
const e = ee(), t = X(), n = xe();
|
|
1611
1613
|
return _e({
|
|
1612
1614
|
mutationFn: async ({ id: s, slug: a }) => t(e, {
|
|
1613
1615
|
action: I.CHANGE_SLUG,
|
|
@@ -1615,9 +1617,9 @@ const kl = () => {
|
|
|
1615
1617
|
}),
|
|
1616
1618
|
onSuccess: (s, { primaryPage: a }) => {
|
|
1617
1619
|
J.success(q.SLUG_CHANGE_SUCCESS), a ? n.invalidateQueries({
|
|
1618
|
-
queryKey: [
|
|
1620
|
+
queryKey: [z, I.GET_LANGUAGE_PAGES, a]
|
|
1619
1621
|
}) : n.invalidateQueries({
|
|
1620
|
-
queryKey: [
|
|
1622
|
+
queryKey: [z, I.GET_WEBSITE_PAGES]
|
|
1621
1623
|
});
|
|
1622
1624
|
},
|
|
1623
1625
|
onError: () => {
|
|
@@ -1625,7 +1627,7 @@ const kl = () => {
|
|
|
1625
1627
|
}
|
|
1626
1628
|
});
|
|
1627
1629
|
};
|
|
1628
|
-
var
|
|
1630
|
+
var Ts = {};
|
|
1629
1631
|
(function e(t, n, s, a) {
|
|
1630
1632
|
var i = !!(t.Worker && t.Blob && t.Promise && t.OffscreenCanvas && t.OffscreenCanvasRenderingContext2D && t.HTMLCanvasElement && t.HTMLCanvasElement.prototype.transferControlToOffscreen && t.URL && t.URL.createObjectURL), l = typeof Path2D == "function" && typeof DOMMatrix == "function", o = function() {
|
|
1631
1633
|
if (!t.OffscreenCanvas)
|
|
@@ -1773,7 +1775,7 @@ var xs = {};
|
|
|
1773
1775
|
N
|
|
1774
1776
|
);
|
|
1775
1777
|
}
|
|
1776
|
-
function
|
|
1778
|
+
function T(g) {
|
|
1777
1779
|
return g < 0 ? 0 : Math.floor(g);
|
|
1778
1780
|
}
|
|
1779
1781
|
function D(g, m) {
|
|
@@ -1811,7 +1813,7 @@ var xs = {};
|
|
|
1811
1813
|
function O(g, m, N, L, U, j, V, R, b) {
|
|
1812
1814
|
g.save(), g.translate(m, N), g.rotate(j), g.scale(L, U), g.arc(0, 0, 1, V, R, b), g.restore();
|
|
1813
1815
|
}
|
|
1814
|
-
function
|
|
1816
|
+
function x(g) {
|
|
1815
1817
|
var m = g.angle * (Math.PI / 180), N = g.spread * (Math.PI / 180);
|
|
1816
1818
|
return {
|
|
1817
1819
|
x: g.x,
|
|
@@ -1903,9 +1905,9 @@ var xs = {};
|
|
|
1903
1905
|
function me(g, m) {
|
|
1904
1906
|
var N = !g, L = !!E(m || {}, "resize"), U = !1, j = E(m, "disableForReducedMotion", Boolean), V = i && !!E(m || {}, "useWorker"), R = V ? y() : null, b = N ? oe : te, H = g && R ? !!g.__confetti_initialized : !1, se = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, Q;
|
|
1905
1907
|
function ve(Y, be, Fe) {
|
|
1906
|
-
for (var qe = E(Y, "particleCount",
|
|
1908
|
+
for (var qe = E(Y, "particleCount", T), Ze = E(Y, "angle", Number), it = E(Y, "spread", Number), We = E(Y, "startVelocity", Number), ka = E(Y, "decay", Number), La = E(Y, "gravity", Number), Da = E(Y, "drift", Number), Ps = E(Y, "colors", w), Ga = E(Y, "ticks", Number), _s = E(Y, "shapes"), Ra = E(Y, "scalar"), Ua = !!E(Y, "flat"), Is = k(Y), ks = qe, Fn = [], Oa = g.width * Is.x, Ba = g.height * Is.y; ks--; )
|
|
1907
1909
|
Fn.push(
|
|
1908
|
-
|
|
1910
|
+
x({
|
|
1909
1911
|
x: Oa,
|
|
1910
1912
|
y: Ba,
|
|
1911
1913
|
angle: Ze,
|
|
@@ -2006,7 +2008,7 @@ var xs = {};
|
|
|
2006
2008
|
matrix: N
|
|
2007
2009
|
};
|
|
2008
2010
|
}
|
|
2009
|
-
function
|
|
2011
|
+
function $(g) {
|
|
2010
2012
|
var m, N = 1, L = "#000000", U = '"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';
|
|
2011
2013
|
typeof g == "string" ? m = g : (m = g.text, N = "scalar" in g ? g.scalar : N, U = "fontFamily" in g ? g.fontFamily : U, L = "color" in g ? g.color : L);
|
|
2012
2014
|
var j = 10 * N, V = "" + j + "px " + U, R = new OffscreenCanvas(j, j), b = R.getContext("2d");
|
|
@@ -2025,12 +2027,12 @@ var xs = {};
|
|
|
2025
2027
|
return fe().apply(this, arguments);
|
|
2026
2028
|
}, n.exports.reset = function() {
|
|
2027
2029
|
fe().reset();
|
|
2028
|
-
}, n.exports.create = me, n.exports.shapeFromPath = pe, n.exports.shapeFromText =
|
|
2030
|
+
}, n.exports.create = me, n.exports.shapeFromPath = pe, n.exports.shapeFromText = $;
|
|
2029
2031
|
})(/* @__PURE__ */ function() {
|
|
2030
2032
|
return typeof window < "u" ? window : typeof self < "u" ? self : this || {};
|
|
2031
|
-
}(),
|
|
2032
|
-
const Xl =
|
|
2033
|
-
|
|
2033
|
+
}(), Ts, !1);
|
|
2034
|
+
const Xl = Ts.exports;
|
|
2035
|
+
Ts.exports.create;
|
|
2034
2036
|
const Zl = {
|
|
2035
2037
|
particleCount: 350,
|
|
2036
2038
|
spread: 120,
|
|
@@ -2045,7 +2047,7 @@ const Zl = {
|
|
|
2045
2047
|
angle: 100,
|
|
2046
2048
|
origin: { x: 0.9, y: 0.9 }
|
|
2047
2049
|
}
|
|
2048
|
-
},
|
|
2050
|
+
}, xn = (e) => {
|
|
2049
2051
|
let t = Jl[e];
|
|
2050
2052
|
t || (t = {});
|
|
2051
2053
|
const n = { ...Zl, ...t };
|
|
@@ -2075,7 +2077,7 @@ const Zl = {
|
|
|
2075
2077
|
{ ids: ["THEME"] },
|
|
2076
2078
|
{
|
|
2077
2079
|
onSuccess: () => {
|
|
2078
|
-
|
|
2080
|
+
xn("BOTTOM_RIGHT");
|
|
2079
2081
|
}
|
|
2080
2082
|
}
|
|
2081
2083
|
);
|
|
@@ -2089,7 +2091,7 @@ const Zl = {
|
|
|
2089
2091
|
onClose: t
|
|
2090
2092
|
}) => {
|
|
2091
2093
|
const [n, s] = P(e.slug || ""), { mutate: a, isPending: i } = Ql(), { data: l } = De(), o = Ee(l, { key: e == null ? void 0 : e.pageType }), c = (f) => {
|
|
2092
|
-
if (f.preventDefault(), !(e != null && e.primaryPage) && Object.keys(He).some((v) => n === `/${v}` ||
|
|
2094
|
+
if (f.preventDefault(), !(e != null && e.primaryPage) && Object.keys(He).some((v) => n === `/${v}` || Ot(n, `/${v}/`))) {
|
|
2093
2095
|
J.error("Error", {
|
|
2094
2096
|
description: "Slugs cannot start with a language code for primary page"
|
|
2095
2097
|
});
|
|
@@ -2139,7 +2141,7 @@ const Zl = {
|
|
|
2139
2141
|
value: n,
|
|
2140
2142
|
onChange: (f) => {
|
|
2141
2143
|
const h = f.target.value;
|
|
2142
|
-
|
|
2144
|
+
Ot(h, `/${d}`) && s(h);
|
|
2143
2145
|
},
|
|
2144
2146
|
className: "col-span-3",
|
|
2145
2147
|
required: !0,
|
|
@@ -2154,7 +2156,7 @@ const Zl = {
|
|
|
2154
2156
|
C,
|
|
2155
2157
|
{
|
|
2156
2158
|
type: "submit",
|
|
2157
|
-
disabled: i || !
|
|
2159
|
+
disabled: i || !Ot(n, `/${d}`) || is(e == null ? void 0 : e.slug, n),
|
|
2158
2160
|
children: i ? "Changing..." : "Change Slug"
|
|
2159
2161
|
}
|
|
2160
2162
|
) })
|
|
@@ -2211,9 +2213,9 @@ const Me = ({
|
|
|
2211
2213
|
children: n,
|
|
2212
2214
|
fallback: s = null
|
|
2213
2215
|
}) => {
|
|
2214
|
-
const { hasPermission: a } =
|
|
2216
|
+
const { hasPermission: a } = Lt();
|
|
2215
2217
|
return e && !a(e) || t && !t.some((i) => a(i)) ? s : n;
|
|
2216
|
-
},
|
|
2218
|
+
}, xs = ({
|
|
2217
2219
|
page: e,
|
|
2218
2220
|
onClose: t
|
|
2219
2221
|
}) => {
|
|
@@ -2248,12 +2250,12 @@ const Me = ({
|
|
|
2248
2250
|
onClose: t,
|
|
2249
2251
|
languages: n
|
|
2250
2252
|
}) => {
|
|
2251
|
-
const { data: s } = Be(), { data: a } = De(), [i, l] = P(e.name || ""), [o, c] = P(e.edit ? e.lang : ""), [d, f] = P(e.edit ? e.slug : ""), { mutate: h, isPending: y } = Hr(), { mutate: v, isPending: p } = Ns(), A =
|
|
2253
|
+
const { data: s } = Be(), { data: a } = De(), [i, l] = P(e.name || ""), [o, c] = P(e.edit ? e.lang : ""), [d, f] = P(e.edit ? e.slug : ""), { mutate: h, isPending: y } = Hr(), { mutate: v, isPending: p } = Ns(), A = W(
|
|
2252
2254
|
() => a == null ? void 0 : a.find(
|
|
2253
2255
|
(S) => S.key === e.pageType
|
|
2254
2256
|
),
|
|
2255
2257
|
[a, e.pageType]
|
|
2256
|
-
), E = !(A != null && A.hasSlug),
|
|
2258
|
+
), E = !(A != null && A.hasSlug), T = y || p, D = (S) => {
|
|
2257
2259
|
S.preventDefault();
|
|
2258
2260
|
const w = {
|
|
2259
2261
|
name: i,
|
|
@@ -2317,7 +2319,7 @@ const Me = ({
|
|
|
2317
2319
|
value: d,
|
|
2318
2320
|
onChange: (S) => {
|
|
2319
2321
|
const w = S.target.value;
|
|
2320
|
-
|
|
2322
|
+
Ot(w, `/${o}`) && f(Gt(Ha(w)));
|
|
2321
2323
|
},
|
|
2322
2324
|
className: "col-span-3",
|
|
2323
2325
|
required: !0,
|
|
@@ -2333,8 +2335,8 @@ const Me = ({
|
|
|
2333
2335
|
C,
|
|
2334
2336
|
{
|
|
2335
2337
|
type: "submit",
|
|
2336
|
-
disabled:
|
|
2337
|
-
children:
|
|
2338
|
+
disabled: T || !i || !o || !E && !Ot(d, `/${o}`),
|
|
2339
|
+
children: T ? e.edit ? q.UPDATING : q.ADDING : e.edit ? q.UPDATE : q.ADD_NEW_LANGUAGE
|
|
2338
2340
|
}
|
|
2339
2341
|
) })
|
|
2340
2342
|
] })
|
|
@@ -2350,13 +2352,13 @@ const Me = ({
|
|
|
2350
2352
|
/* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
|
|
2351
2353
|
/* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" })
|
|
2352
2354
|
] }) : je(i, (E) => {
|
|
2353
|
-
const
|
|
2355
|
+
const T = E.lang, D = E.slug, S = !E.primaryPage;
|
|
2354
2356
|
return /* @__PURE__ */ u(Ne, { children: [
|
|
2355
2357
|
/* @__PURE__ */ u(
|
|
2356
2358
|
"li",
|
|
2357
2359
|
{
|
|
2358
|
-
className: `text-slate-500 w-full p-2 rounded cursor-pointer flex items-center justify-between ${
|
|
2359
|
-
onClick: () => a(
|
|
2360
|
+
className: `text-slate-500 w-full p-2 rounded cursor-pointer flex items-center justify-between ${T === n ? "bg-gray-200" : "hover:bg-gray-100"}`,
|
|
2361
|
+
onClick: () => a(T),
|
|
2360
2362
|
children: [
|
|
2361
2363
|
/* @__PURE__ */ u("div", { className: " flex-1 gap-x-3", children: [
|
|
2362
2364
|
/* @__PURE__ */ u(
|
|
@@ -2370,7 +2372,7 @@ const Me = ({
|
|
|
2370
2372
|
className: `w-2.5 h-2.5 rounded-full ${E.online ? "bg-green-300" : "bg-gray-300"}`
|
|
2371
2373
|
}
|
|
2372
2374
|
),
|
|
2373
|
-
le(He, S ? s :
|
|
2375
|
+
le(He, S ? s : T, T)
|
|
2374
2376
|
]
|
|
2375
2377
|
}
|
|
2376
2378
|
),
|
|
@@ -2521,7 +2523,7 @@ const Me = ({
|
|
|
2521
2523
|
),
|
|
2522
2524
|
c && /* @__PURE__ */ r(Kr, { page: c, onClose: () => d(null) }),
|
|
2523
2525
|
f && /* @__PURE__ */ r(
|
|
2524
|
-
|
|
2526
|
+
xs,
|
|
2525
2527
|
{
|
|
2526
2528
|
page: f,
|
|
2527
2529
|
onClose: () => h(null)
|
|
@@ -2543,7 +2545,7 @@ function so({
|
|
|
2543
2545
|
className: s = "w-full rounded-md border border-gray-300 px-3 py-2",
|
|
2544
2546
|
id: a = "parentPage"
|
|
2545
2547
|
}) {
|
|
2546
|
-
const i =
|
|
2548
|
+
const i = W(() => !e || e.length === 0 ? [] : e.filter((f) => !ye(f.slug)).filter((f) => f.slug !== "/").sort((f, h) => f.slug.localeCompare(h.slug)), [e]), l = (d) => Math.max(0, (d.match(/\//g) || []).length - 1), o = (d) => " ".repeat(d), c = (d) => {
|
|
2547
2549
|
if (d === "/") return "/";
|
|
2548
2550
|
const f = d.split("/").filter(Boolean);
|
|
2549
2551
|
return f.length <= 1 ? `/${f[0] || ""}` : `/${f[f.length - 1]}`;
|
|
@@ -2633,7 +2635,7 @@ const ao = ({
|
|
|
2633
2635
|
children: [
|
|
2634
2636
|
/* @__PURE__ */ r("option", { value: "", children: "No Template" }),
|
|
2635
2637
|
Object.entries(l).map(
|
|
2636
|
-
([o, c]) => /* @__PURE__ */ r("optgroup", { label: o, children: c.map((d) => /* @__PURE__ */ r("option", { value: d.id, children:
|
|
2638
|
+
([o, c]) => /* @__PURE__ */ r("optgroup", { label: o, children: c.map((d) => /* @__PURE__ */ r("option", { value: d.id, children: Ft(d.name) }, d.id)) }, o)
|
|
2637
2639
|
)
|
|
2638
2640
|
]
|
|
2639
2641
|
}
|
|
@@ -2653,13 +2655,13 @@ const ao = ({
|
|
|
2653
2655
|
}, io = () => {
|
|
2654
2656
|
const e = ee(), t = X();
|
|
2655
2657
|
return Pe({
|
|
2656
|
-
queryKey: [
|
|
2658
|
+
queryKey: [z, I.GET_LIBRARIES],
|
|
2657
2659
|
queryFn: async () => await t(e, { action: I.GET_LIBRARIES }) || []
|
|
2658
2660
|
});
|
|
2659
2661
|
}, lo = (e) => {
|
|
2660
2662
|
const t = ee(), n = X();
|
|
2661
2663
|
return Pe({
|
|
2662
|
-
queryKey: [
|
|
2664
|
+
queryKey: [z, I.GET_TEMPLATES_BY_TYPE, e],
|
|
2663
2665
|
enabled: !!e,
|
|
2664
2666
|
queryFn: async () => {
|
|
2665
2667
|
const s = await n(t, {
|
|
@@ -2670,14 +2672,14 @@ const ao = ({
|
|
|
2670
2672
|
}
|
|
2671
2673
|
});
|
|
2672
2674
|
}, oo = (e) => {
|
|
2673
|
-
const { data: t = [], isLoading: n } = lo(e), { data: s = [], isLoading: a } = io(), i =
|
|
2675
|
+
const { data: t = [], isLoading: n } = lo(e), { data: s = [], isLoading: a } = io(), i = W(() => n || a ? [] : t.map((o) => {
|
|
2674
2676
|
const c = Ee(s, { id: o.library });
|
|
2675
2677
|
return {
|
|
2676
2678
|
...o,
|
|
2677
2679
|
libraryName: (c == null ? void 0 : c.type) !== "shared" ? "Site Library" : (c == null ? void 0 : c.name) + " Library",
|
|
2678
2680
|
libraryType: c == null ? void 0 : c.type
|
|
2679
2681
|
};
|
|
2680
|
-
}), [t, s, n, a]), l =
|
|
2682
|
+
}), [t, s, n, a]), l = W(() => Ka(i, "libraryName"), [i]);
|
|
2681
2683
|
return {
|
|
2682
2684
|
data: i,
|
|
2683
2685
|
groupedData: l,
|
|
@@ -2685,7 +2687,7 @@ const ao = ({
|
|
|
2685
2687
|
};
|
|
2686
2688
|
}, zr = () => {
|
|
2687
2689
|
const [, e] = Ue();
|
|
2688
|
-
return
|
|
2690
|
+
return Te(
|
|
2689
2691
|
(t, n) => {
|
|
2690
2692
|
const a = new URLSearchParams(window.location.search).get("lang"), i = new URLSearchParams({ page: t });
|
|
2691
2693
|
a && i.set("lang", a), window.history.pushState({}, "", `?${i.toString()}`), e(i), window.dispatchEvent(new PopStateEvent("popstate")), n == null || n();
|
|
@@ -2702,18 +2704,18 @@ function co({
|
|
|
2702
2704
|
var V, R;
|
|
2703
2705
|
const a = zr(), i = !!(e != null && e.id), { data: l } = Un(), { mutate: o, isPending: c } = Hr(), { mutate: d, isPending: f } = Ns(), [h, y] = P(null), [v, p] = P(
|
|
2704
2706
|
(e == null ? void 0 : e.pageType) ?? "page"
|
|
2705
|
-
), { hasPermission: A } =
|
|
2707
|
+
), { hasPermission: A } = Lt(), E = A(he.CHANGE_PAGE_TYPE), [T, D] = P(!1), [S, w] = P(""), _ = W(() => {
|
|
2706
2708
|
const b = t.find(
|
|
2707
2709
|
(H) => H.key === v
|
|
2708
2710
|
);
|
|
2709
2711
|
return (b == null ? void 0 : b.hasSlug) === !1;
|
|
2710
2712
|
}, [v, t]), [k, oe] = P(
|
|
2711
2713
|
(e == null ? void 0 : e.parent) ?? ""
|
|
2712
|
-
), [te, G] = P((e == null ? void 0 : e.name) ?? ""), [O,
|
|
2714
|
+
), [te, G] = P((e == null ? void 0 : e.name) ?? ""), [O, x] = P(
|
|
2713
2715
|
(e == null ? void 0 : e.dynamic) ?? !1
|
|
2714
2716
|
), [M, ne] = P(
|
|
2715
2717
|
O ? "" : ((e == null ? void 0 : e.slug) ?? "").split("/").pop() || ""
|
|
2716
|
-
), [me, Z] = P(""), { data: fe, isLoading: K } = oo(v), pe = c || f,
|
|
2718
|
+
), [me, Z] = P(""), { data: fe, isLoading: K } = oo(v), pe = c || f, $ = t.find(
|
|
2717
2719
|
(b) => b.key === v
|
|
2718
2720
|
), g = (b) => {
|
|
2719
2721
|
if (i && v !== b) {
|
|
@@ -2722,9 +2724,9 @@ function co({
|
|
|
2722
2724
|
}
|
|
2723
2725
|
p(b);
|
|
2724
2726
|
}, m = () => {
|
|
2725
|
-
p(S), D(!1),
|
|
2727
|
+
p(S), D(!1), x(!1);
|
|
2726
2728
|
}, N = (b) => {
|
|
2727
|
-
|
|
2729
|
+
x(b), b && ne("");
|
|
2728
2730
|
}, L = (b) => {
|
|
2729
2731
|
if (oe(b), b && b !== "none") {
|
|
2730
2732
|
const H = l == null ? void 0 : l.find(
|
|
@@ -2748,9 +2750,9 @@ function co({
|
|
|
2748
2750
|
y("Slug must be empty when using dynamic slug");
|
|
2749
2751
|
return;
|
|
2750
2752
|
}
|
|
2751
|
-
if (!(
|
|
2753
|
+
if (!($ != null && $.hasSlug)) {
|
|
2752
2754
|
const H = {
|
|
2753
|
-
pageType:
|
|
2755
|
+
pageType: $ == null ? void 0 : $.key,
|
|
2754
2756
|
name: te,
|
|
2755
2757
|
slug: "",
|
|
2756
2758
|
hasSlug: !1
|
|
@@ -2760,7 +2762,7 @@ function co({
|
|
|
2760
2762
|
{ id: e == null ? void 0 : e.id, name: te },
|
|
2761
2763
|
{
|
|
2762
2764
|
onSuccess: () => {
|
|
2763
|
-
J.success((
|
|
2765
|
+
J.success(($ == null ? void 0 : $.name) + " updated successfully"), n();
|
|
2764
2766
|
}
|
|
2765
2767
|
}
|
|
2766
2768
|
);
|
|
@@ -2838,7 +2840,7 @@ function co({
|
|
|
2838
2840
|
});
|
|
2839
2841
|
}
|
|
2840
2842
|
};
|
|
2841
|
-
return
|
|
2843
|
+
return $ != null && $.hasSlug ? /* @__PURE__ */ u("form", { onSubmit: j, className: "w-full max-w-md mx-auto space-y-4", children: [
|
|
2842
2844
|
/* @__PURE__ */ u("div", { className: "space-y-0.5", children: [
|
|
2843
2845
|
/* @__PURE__ */ r(re, { htmlFor: "pageType", className: "text-sm", children: "Type" }),
|
|
2844
2846
|
/* @__PURE__ */ r(
|
|
@@ -2855,7 +2857,7 @@ function co({
|
|
|
2855
2857
|
] })
|
|
2856
2858
|
}
|
|
2857
2859
|
),
|
|
2858
|
-
|
|
2860
|
+
T && /* @__PURE__ */ u("div", { className: "mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-md", children: [
|
|
2859
2861
|
/* @__PURE__ */ r("p", { className: "text-sm text-yellow-800", children: "Changing the page type may impact the page data. Are you sure you want to proceed?" }),
|
|
2860
2862
|
/* @__PURE__ */ u("div", { className: "mt-2 flex gap-2", children: [
|
|
2861
2863
|
/* @__PURE__ */ r(
|
|
@@ -2879,7 +2881,7 @@ function co({
|
|
|
2879
2881
|
] })
|
|
2880
2882
|
] })
|
|
2881
2883
|
] }),
|
|
2882
|
-
!i && (
|
|
2884
|
+
!i && ($ == null ? void 0 : $.hasSlug) && fe.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-1", children: [
|
|
2883
2885
|
/* @__PURE__ */ r(re, { className: "text-sm mb-1 block", children: "Template" }),
|
|
2884
2886
|
/* @__PURE__ */ r(
|
|
2885
2887
|
ao,
|
|
@@ -2912,7 +2914,7 @@ function co({
|
|
|
2912
2914
|
}
|
|
2913
2915
|
)
|
|
2914
2916
|
] }),
|
|
2915
|
-
(
|
|
2917
|
+
($ == null ? void 0 : $.dynamicSegments) && k && k !== "none" && /* @__PURE__ */ u("div", { className: "space-y-2", children: [
|
|
2916
2918
|
/* @__PURE__ */ u("div", { className: "flex items-center space-x-2", children: [
|
|
2917
2919
|
/* @__PURE__ */ r(
|
|
2918
2920
|
"input",
|
|
@@ -2928,10 +2930,10 @@ function co({
|
|
|
2928
2930
|
] }),
|
|
2929
2931
|
O && /* @__PURE__ */ u("div", { className: "text-sm text-gray-500", children: [
|
|
2930
2932
|
"Pages will use pattern: ",
|
|
2931
|
-
|
|
2933
|
+
$ == null ? void 0 : $.dynamicSlug
|
|
2932
2934
|
] })
|
|
2933
2935
|
] }),
|
|
2934
|
-
(!(
|
|
2936
|
+
(!($ != null && $.dynamicSegments) || !O) && /* @__PURE__ */ u("div", { className: "space-y-0.5", children: [
|
|
2935
2937
|
/* @__PURE__ */ r(re, { htmlFor: "slug", className: "text-sm", children: "Slug" }),
|
|
2936
2938
|
/* @__PURE__ */ r(
|
|
2937
2939
|
ro,
|
|
@@ -2964,7 +2966,7 @@ function co({
|
|
|
2964
2966
|
children: /* @__PURE__ */ r("optgroup", { label: "Partials", children: t.filter((b) => b.hasSlug === !1).map((b) => /* @__PURE__ */ r("option", { value: b.key, children: b.name }, b.key)) })
|
|
2965
2967
|
}
|
|
2966
2968
|
),
|
|
2967
|
-
|
|
2969
|
+
T && /* @__PURE__ */ u("div", { className: "mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-md", children: [
|
|
2968
2970
|
/* @__PURE__ */ r("p", { className: "text-sm text-yellow-800", children: "Changing the page type may impact the page data. Are you sure you want to proceed?" }),
|
|
2969
2971
|
/* @__PURE__ */ u("div", { className: "mt-2 flex gap-2", children: [
|
|
2970
2972
|
/* @__PURE__ */ r(
|
|
@@ -3002,7 +3004,7 @@ function co({
|
|
|
3002
3004
|
}
|
|
3003
3005
|
)
|
|
3004
3006
|
] }),
|
|
3005
|
-
/* @__PURE__ */ r(C, { disabled: pe, type: "submit", className: "w-full", children: i ? pe ? "Updating..." : "Update " + (
|
|
3007
|
+
/* @__PURE__ */ r(C, { disabled: pe, type: "submit", className: "w-full", children: i ? pe ? "Updating..." : "Update " + ($ == null ? void 0 : $.name) : pe ? "Creating..." : "Create " + ($ == null ? void 0 : $.name) })
|
|
3006
3008
|
]
|
|
3007
3009
|
}
|
|
3008
3010
|
);
|
|
@@ -3037,7 +3039,7 @@ const uo = ({
|
|
|
3037
3039
|
}) => {
|
|
3038
3040
|
const [n, s] = P(!1), [a, i] = P(""), [l, o] = P(""), [c, d] = P(!1), f = dt(null), h = Wl(), { data: y } = De(), v = y == null ? void 0 : y.find(
|
|
3039
3041
|
(S) => S.key === e.pageType
|
|
3040
|
-
), p = (v == null ? void 0 : v.name) ||
|
|
3042
|
+
), p = (v == null ? void 0 : v.name) || Ft(e.pageType), A = Te(
|
|
3041
3043
|
(S) => {
|
|
3042
3044
|
var _;
|
|
3043
3045
|
const w = (_ = S.target.files) == null ? void 0 : _[0];
|
|
@@ -3064,7 +3066,7 @@ const uo = ({
|
|
|
3064
3066
|
[]
|
|
3065
3067
|
), E = () => {
|
|
3066
3068
|
o(""), f.current && (f.current.value = "");
|
|
3067
|
-
},
|
|
3069
|
+
}, T = () => {
|
|
3068
3070
|
var S;
|
|
3069
3071
|
(S = f.current) == null || S.click();
|
|
3070
3072
|
}, D = () => {
|
|
@@ -3100,7 +3102,7 @@ const uo = ({
|
|
|
3100
3102
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
3101
3103
|
/* @__PURE__ */ r(Hi, { className: "w-4 h-4 text-slate-500" }),
|
|
3102
3104
|
/* @__PURE__ */ r("span", { className: "font-medium text-slate-500", children: "Page Name:" }),
|
|
3103
|
-
/* @__PURE__ */ r("span", { className: "font-semibold", children:
|
|
3105
|
+
/* @__PURE__ */ r("span", { className: "font-semibold", children: Ft(e.name) })
|
|
3104
3106
|
] }),
|
|
3105
3107
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
3106
3108
|
/* @__PURE__ */ r(on, { className: "w-4 h-4 text-slate-500" }),
|
|
@@ -3111,7 +3113,7 @@ const uo = ({
|
|
|
3111
3113
|
/* @__PURE__ */ u("div", { children: [
|
|
3112
3114
|
/* @__PURE__ */ r(re, { htmlFor: "description", className: "text-xs font-medium", children: "Description (Optional)" }),
|
|
3113
3115
|
/* @__PURE__ */ r(
|
|
3114
|
-
|
|
3116
|
+
Rt,
|
|
3115
3117
|
{
|
|
3116
3118
|
id: "description",
|
|
3117
3119
|
placeholder: "Describe this template's purpose",
|
|
@@ -3141,14 +3143,14 @@ const uo = ({
|
|
|
3141
3143
|
{
|
|
3142
3144
|
type: "button",
|
|
3143
3145
|
variant: "outline",
|
|
3144
|
-
onClick:
|
|
3146
|
+
onClick: T,
|
|
3145
3147
|
disabled: c,
|
|
3146
3148
|
className: "w-full",
|
|
3147
3149
|
children: c ? /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
|
|
3148
3150
|
/* @__PURE__ */ r("div", { className: "animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" }),
|
|
3149
3151
|
"Uploading..."
|
|
3150
3152
|
] }) : /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
|
|
3151
|
-
/* @__PURE__ */ r(
|
|
3153
|
+
/* @__PURE__ */ r(Tr, { className: "h-4 w-4" }),
|
|
3152
3154
|
"Select image"
|
|
3153
3155
|
] })
|
|
3154
3156
|
}
|
|
@@ -3160,7 +3162,7 @@ const uo = ({
|
|
|
3160
3162
|
variant: "outline",
|
|
3161
3163
|
size: "icon",
|
|
3162
3164
|
onClick: E,
|
|
3163
|
-
children: /* @__PURE__ */ r(
|
|
3165
|
+
children: /* @__PURE__ */ r(xr, { className: "h-4 w-4" })
|
|
3164
3166
|
}
|
|
3165
3167
|
)
|
|
3166
3168
|
] }),
|
|
@@ -3246,10 +3248,10 @@ const uo = ({
|
|
|
3246
3248
|
setMarkAsTemplate: o,
|
|
3247
3249
|
setUnmarkAsTemplate: c
|
|
3248
3250
|
}) => {
|
|
3249
|
-
const d = zr(), { data: f } = De(), { hasPermission: h } =
|
|
3251
|
+
const d = zr(), { data: f } = De(), { hasPermission: h } = Lt(), y = W(
|
|
3250
3252
|
() => Ee(f, { key: t.pageType }),
|
|
3251
3253
|
[f, t.pageType]
|
|
3252
|
-
), v = le(t, "slug", "").replace(e, "") || "/", p = !h(he.EDIT_PAGE) && !h(he.DELETE_PAGE) && !h(he.UNPUBLISH_PAGE), A =
|
|
3254
|
+
), v = le(t, "slug", "").replace(e, "") || "/", p = !h(he.EDIT_PAGE) && !h(he.DELETE_PAGE) && !h(he.UNPUBLISH_PAGE), A = W(() => !!t.isTemplate, [t.isTemplate]), E = W(
|
|
3253
3255
|
() => !!(y != null && y.hasSlug),
|
|
3254
3256
|
[y == null ? void 0 : y.hasSlug]
|
|
3255
3257
|
);
|
|
@@ -3273,7 +3275,7 @@ const uo = ({
|
|
|
3273
3275
|
className: `w-2.5 h-2.5 rounded-full ${t.online ? "bg-green-300" : "bg-gray-300"}`
|
|
3274
3276
|
}
|
|
3275
3277
|
),
|
|
3276
|
-
/* @__PURE__ */ r("span", { className: "font-light leading-none truncate text-slate-800", children:
|
|
3278
|
+
/* @__PURE__ */ r("span", { className: "font-light leading-none truncate text-slate-800", children: t.name }),
|
|
3277
3279
|
y != null && y.hasSlug ? /* @__PURE__ */ u(
|
|
3278
3280
|
qn,
|
|
3279
3281
|
{
|
|
@@ -3302,14 +3304,14 @@ const uo = ({
|
|
|
3302
3304
|
)
|
|
3303
3305
|
] }),
|
|
3304
3306
|
/* @__PURE__ */ r("div", { className: "flex items-center space-x-4", children: !p && /* @__PURE__ */ u(rn, { children: [
|
|
3305
|
-
/* @__PURE__ */ r(an, { asChild: !0, onClick: (
|
|
3307
|
+
/* @__PURE__ */ r(an, { asChild: !0, onClick: (T) => T.stopPropagation(), children: /* @__PURE__ */ r(vs, { className: "h-4 w-4 hover:stroke-[3]" }) }),
|
|
3306
3308
|
/* @__PURE__ */ u(ln, { align: "end", className: "text-sm", children: [
|
|
3307
3309
|
h(he.EDIT_PAGE) && /* @__PURE__ */ u(
|
|
3308
3310
|
Ge,
|
|
3309
3311
|
{
|
|
3310
3312
|
className: "flex items-center gap-2 cursor-pointer",
|
|
3311
|
-
onClick: (
|
|
3312
|
-
|
|
3313
|
+
onClick: (T) => {
|
|
3314
|
+
T.stopPropagation(), l({
|
|
3313
3315
|
...t,
|
|
3314
3316
|
global: !(y != null && y.hasSlug)
|
|
3315
3317
|
});
|
|
@@ -3324,8 +3326,8 @@ const uo = ({
|
|
|
3324
3326
|
Ge,
|
|
3325
3327
|
{
|
|
3326
3328
|
className: "flex items-center gap-2 cursor-pointer",
|
|
3327
|
-
onClick: (
|
|
3328
|
-
|
|
3329
|
+
onClick: (T) => {
|
|
3330
|
+
T.stopPropagation(), a(t);
|
|
3329
3331
|
},
|
|
3330
3332
|
children: [
|
|
3331
3333
|
/* @__PURE__ */ r(Pr, { className: "size-3" }),
|
|
@@ -3337,8 +3339,8 @@ const uo = ({
|
|
|
3337
3339
|
Ge,
|
|
3338
3340
|
{
|
|
3339
3341
|
className: "flex items-center gap-2 cursor-pointer",
|
|
3340
|
-
onClick: (
|
|
3341
|
-
|
|
3342
|
+
onClick: (T) => {
|
|
3343
|
+
T.stopPropagation(), i(t);
|
|
3342
3344
|
},
|
|
3343
3345
|
children: [
|
|
3344
3346
|
/* @__PURE__ */ r(Es, { className: "size-3" }),
|
|
@@ -3350,8 +3352,8 @@ const uo = ({
|
|
|
3350
3352
|
Ge,
|
|
3351
3353
|
{
|
|
3352
3354
|
className: "flex items-center gap-2 cursor-pointer",
|
|
3353
|
-
onClick: (
|
|
3354
|
-
|
|
3355
|
+
onClick: (T) => {
|
|
3356
|
+
T.stopPropagation(), c(t);
|
|
3355
3357
|
},
|
|
3356
3358
|
children: [
|
|
3357
3359
|
/* @__PURE__ */ r(Us, { className: "size-3" }),
|
|
@@ -3362,8 +3364,8 @@ const uo = ({
|
|
|
3362
3364
|
Ge,
|
|
3363
3365
|
{
|
|
3364
3366
|
className: "flex items-center gap-2 cursor-pointer",
|
|
3365
|
-
onClick: (
|
|
3366
|
-
|
|
3367
|
+
onClick: (T) => {
|
|
3368
|
+
T.stopPropagation(), o(t);
|
|
3367
3369
|
},
|
|
3368
3370
|
children: [
|
|
3369
3371
|
/* @__PURE__ */ r(Us, { className: "size-3" }),
|
|
@@ -3377,41 +3379,41 @@ const uo = ({
|
|
|
3377
3379
|
}
|
|
3378
3380
|
);
|
|
3379
3381
|
}, go = ({ close: e }) => {
|
|
3380
|
-
const [, t] = P([]), [n, s] = P(""), [a, i] = P(null), [l, o] = P(null), [c, d] = P(null), [f, h] = P(null), [y, v] = P(null), { data: p, isFetching: A } = Un(), [E,
|
|
3381
|
-
(
|
|
3382
|
+
const [, t] = P([]), [n, s] = P(""), [a, i] = P(null), [l, o] = P(null), [c, d] = P(null), [f, h] = P(null), [y, v] = P(null), { data: p, isFetching: A } = Un(), [E, T] = P(""), { hasPermission: D } = Lt(), [S, w] = Ue(), _ = S.get("page"), { data: k } = De(), oe = Te(
|
|
3383
|
+
(x) => {
|
|
3382
3384
|
var M;
|
|
3383
|
-
return (M = Ee(k, { key:
|
|
3385
|
+
return (M = Ee(k, { key: x })) == null ? void 0 : M.hasSlug;
|
|
3384
3386
|
},
|
|
3385
3387
|
[k]
|
|
3386
3388
|
);
|
|
3387
3389
|
Ae(() => {
|
|
3388
3390
|
if (!ye(E)) return;
|
|
3389
|
-
const
|
|
3390
|
-
!ye(k) &&
|
|
3391
|
+
const x = sessionStorage.getItem("pageTypeFilter") || "all";
|
|
3392
|
+
!ye(k) && x && (Ee(k, { key: x }) ? T(x) : T("all"));
|
|
3391
3393
|
}, [k, E]);
|
|
3392
|
-
const te = (
|
|
3393
|
-
x
|
|
3394
|
-
}, G =
|
|
3395
|
-
(
|
|
3396
|
-
const ne = new URLSearchParams(window.location.search).get("lang"), me = new URLSearchParams({ page:
|
|
3394
|
+
const te = (x) => {
|
|
3395
|
+
T(x), sessionStorage.setItem("pageTypeFilter", x);
|
|
3396
|
+
}, G = Te(
|
|
3397
|
+
(x) => {
|
|
3398
|
+
const ne = new URLSearchParams(window.location.search).get("lang"), me = new URLSearchParams({ page: x });
|
|
3397
3399
|
ne && me.set("lang", ne), window.history.pushState({}, "", `?${me.toString()}`), w(me), window.dispatchEvent(new PopStateEvent("popstate")), e();
|
|
3398
3400
|
},
|
|
3399
3401
|
[w, e]
|
|
3400
3402
|
);
|
|
3401
3403
|
Ae(() => {
|
|
3402
3404
|
if (_ && !A) {
|
|
3403
|
-
const
|
|
3404
|
-
|
|
3405
|
+
const x = Ee(p, { id: _ });
|
|
3406
|
+
x && (x != null && x.pageType) ? t((M) => [...M, x == null ? void 0 : x.pageType]) : (window.history.replaceState(null, "", "/"), w(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate")));
|
|
3405
3407
|
}
|
|
3406
3408
|
}, [p, _, A, w]);
|
|
3407
|
-
const O =
|
|
3408
|
-
const
|
|
3409
|
-
Ie(p, (K) => ye(n) ? !0 : qt(
|
|
3409
|
+
const O = W(() => {
|
|
3410
|
+
const x = Nn(
|
|
3411
|
+
Ie(p, (K) => ye(n) ? !0 : qt(Gt(K == null ? void 0 : K.name), Gt(n)) || qt(Gt(K == null ? void 0 : K.slug), Gt(n)))
|
|
3410
3412
|
);
|
|
3411
3413
|
if (E !== "all")
|
|
3412
|
-
return Nn(Ie(
|
|
3414
|
+
return Nn(Ie(x, { pageType: E }));
|
|
3413
3415
|
const M = /* @__PURE__ */ new Map();
|
|
3414
|
-
|
|
3416
|
+
x.forEach((K) => {
|
|
3415
3417
|
M.set(K.id, { ...K, children: [] });
|
|
3416
3418
|
});
|
|
3417
3419
|
const ne = [], me = [];
|
|
@@ -3422,7 +3424,7 @@ const uo = ({
|
|
|
3422
3424
|
} else
|
|
3423
3425
|
me.push(K);
|
|
3424
3426
|
}), ne.sort((K, pe) => K.name.localeCompare(pe.name)), ne.forEach((K) => {
|
|
3425
|
-
K.children.sort((pe,
|
|
3427
|
+
K.children.sort((pe, $) => pe.name.localeCompare($.name));
|
|
3426
3428
|
});
|
|
3427
3429
|
const Z = Ie(
|
|
3428
3430
|
me,
|
|
@@ -3449,7 +3451,7 @@ const uo = ({
|
|
|
3449
3451
|
placeholder: "Search pages...",
|
|
3450
3452
|
className: "text-xs font-medium leading-none text-gray-700 pl-9 pr-24 placeholder:text-gray-400",
|
|
3451
3453
|
value: n,
|
|
3452
|
-
onChange: (
|
|
3454
|
+
onChange: (x) => s(x.target.value)
|
|
3453
3455
|
}
|
|
3454
3456
|
),
|
|
3455
3457
|
!ye(E) && /* @__PURE__ */ u(vi, { value: E, onValueChange: te, children: [
|
|
@@ -3462,21 +3464,21 @@ const uo = ({
|
|
|
3462
3464
|
),
|
|
3463
3465
|
/* @__PURE__ */ r(wi, { align: "end", children: je(
|
|
3464
3466
|
Js([{ key: "all", name: "All" }], k),
|
|
3465
|
-
(
|
|
3467
|
+
(x) => /* @__PURE__ */ r(Si, { value: le(x, "key"), children: le(x, "name") })
|
|
3466
3468
|
) })
|
|
3467
3469
|
] })
|
|
3468
3470
|
] }),
|
|
3469
|
-
A ? /* @__PURE__ */ r("div", { className: "space-y-2", children: je([...Array(5).keys()], (
|
|
3471
|
+
A ? /* @__PURE__ */ r("div", { className: "space-y-2", children: je([...Array(5).keys()], (x) => /* @__PURE__ */ r(
|
|
3470
3472
|
"div",
|
|
3471
3473
|
{
|
|
3472
3474
|
className: "w-full bg-gray-200 rounded h-9 animate-pulse"
|
|
3473
3475
|
},
|
|
3474
|
-
|
|
3476
|
+
x
|
|
3475
3477
|
)) }) : ye(O) ? /* @__PURE__ */ u("div", { className: "h-[70vh] flex flex-col gap-y-1 items-center justify-center text-slate-500 text-sm font-medium", children: [
|
|
3476
3478
|
/* @__PURE__ */ r(on, { className: "h-6 w-6 stroke-[1]" }),
|
|
3477
3479
|
"Empty List!",
|
|
3478
3480
|
/* @__PURE__ */ r("span", { className: "font-light", children: "Add new page to start" })
|
|
3479
|
-
] }) : /* @__PURE__ */ r("div", { className: "text-sm text-slate-700 space-y-2 h-[70vh] overflow-y-auto", children: je(O, (
|
|
3481
|
+
] }) : /* @__PURE__ */ r("div", { className: "text-sm text-slate-700 space-y-2 h-[70vh] overflow-y-auto", children: je(O, (x) => ye(x == null ? void 0 : x.children) ? /* @__PURE__ */ r(
|
|
3480
3482
|
jn,
|
|
3481
3483
|
{
|
|
3482
3484
|
closePanel: e,
|
|
@@ -3485,10 +3487,10 @@ const uo = ({
|
|
|
3485
3487
|
setAddEditPage: d,
|
|
3486
3488
|
setMarkAsTemplate: h,
|
|
3487
3489
|
setUnmarkAsTemplate: v,
|
|
3488
|
-
active: _ ===
|
|
3489
|
-
page:
|
|
3490
|
+
active: _ === x.id,
|
|
3491
|
+
page: x
|
|
3490
3492
|
},
|
|
3491
|
-
|
|
3493
|
+
x.id
|
|
3492
3494
|
) : /* @__PURE__ */ u("div", { className: "border-0", children: [
|
|
3493
3495
|
/* @__PURE__ */ r(
|
|
3494
3496
|
jn,
|
|
@@ -3499,16 +3501,16 @@ const uo = ({
|
|
|
3499
3501
|
setAddEditPage: d,
|
|
3500
3502
|
setMarkAsTemplate: h,
|
|
3501
3503
|
setUnmarkAsTemplate: v,
|
|
3502
|
-
active: _ ===
|
|
3503
|
-
page:
|
|
3504
|
+
active: _ === x.id,
|
|
3505
|
+
page: x
|
|
3504
3506
|
}
|
|
3505
3507
|
),
|
|
3506
|
-
/* @__PURE__ */ r("div", { className: "pt-2 pl-6 bg-white", children: je(le(
|
|
3508
|
+
/* @__PURE__ */ r("div", { className: "pt-2 pl-6 bg-white", children: je(le(x, "children", []), (M) => {
|
|
3507
3509
|
const ne = _ === le(M, "id");
|
|
3508
3510
|
return /* @__PURE__ */ r(
|
|
3509
3511
|
jn,
|
|
3510
3512
|
{
|
|
3511
|
-
parentSlug:
|
|
3513
|
+
parentSlug: x.slug,
|
|
3512
3514
|
closePanel: e,
|
|
3513
3515
|
setUnpublishPage: o,
|
|
3514
3516
|
setDeletePage: i,
|
|
@@ -3521,7 +3523,7 @@ const uo = ({
|
|
|
3521
3523
|
M.id
|
|
3522
3524
|
);
|
|
3523
3525
|
}) })
|
|
3524
|
-
] },
|
|
3526
|
+
] }, x.key)) })
|
|
3525
3527
|
] }),
|
|
3526
3528
|
D(he.ADD_PAGE) && /* @__PURE__ */ u(
|
|
3527
3529
|
C,
|
|
@@ -3551,7 +3553,7 @@ const uo = ({
|
|
|
3551
3553
|
),
|
|
3552
3554
|
a && /* @__PURE__ */ r(Kr, { page: a, onClose: () => i(null) }),
|
|
3553
3555
|
l && /* @__PURE__ */ r(
|
|
3554
|
-
|
|
3556
|
+
xs,
|
|
3555
3557
|
{
|
|
3556
3558
|
page: l,
|
|
3557
3559
|
onClose: () => o(null)
|
|
@@ -3590,7 +3592,7 @@ const uo = ({
|
|
|
3590
3592
|
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(Wi, { className: "h-4 w-4" }) }),
|
|
3591
3593
|
/* @__PURE__ */ u("span", { className: "truncate leading-tight flex items-center max-w-[200px]", children: [
|
|
3592
3594
|
/* @__PURE__ */ r("span", { className: "text-slate-600 pr-1 font-light", children: "Editing:" }),
|
|
3593
|
-
s ? /* @__PURE__ */ r(_r, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) :
|
|
3595
|
+
s ? /* @__PURE__ */ r(_r, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : Ft(le(n, "name")) ?? ""
|
|
3594
3596
|
] })
|
|
3595
3597
|
]
|
|
3596
3598
|
},
|
|
@@ -3627,7 +3629,7 @@ const uo = ({
|
|
|
3627
3629
|
const p = new URLSearchParams(window.location.search), A = p.get("lang");
|
|
3628
3630
|
A && (t.includes(A) ? s(A) : (p.delete("lang"), i(p), s("")));
|
|
3629
3631
|
}, [t, i, s]);
|
|
3630
|
-
const [l, o] = P(null), { data: c } = Be(), { data: d } = un(), { data: f, isFetching: h } = cn(), y =
|
|
3632
|
+
const [l, o] = P(null), { data: c } = Be(), { data: d } = un(), { data: f, isFetching: h } = cn(), y = W(() => {
|
|
3631
3633
|
const p = Nn(
|
|
3632
3634
|
je(le(d, "languages"), (A) => {
|
|
3633
3635
|
const E = Ee(f, { lang: A });
|
|
@@ -3650,8 +3652,8 @@ const uo = ({
|
|
|
3650
3652
|
s(p);
|
|
3651
3653
|
const A = new URLSearchParams(window.location.search);
|
|
3652
3654
|
p === e ? A.delete("lang") : A.set("lang", p);
|
|
3653
|
-
const E = A.toString(),
|
|
3654
|
-
window.history.pushState({}, "",
|
|
3655
|
+
const E = A.toString(), T = `${window.location.pathname}${E ? `?${E}` : ""}`;
|
|
3656
|
+
window.history.pushState({}, "", T), i(A), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
3655
3657
|
};
|
|
3656
3658
|
return ye(t) || h ? null : /* @__PURE__ */ u(Ne, { children: [
|
|
3657
3659
|
/* @__PURE__ */ u(rn, { children: [
|
|
@@ -3734,7 +3736,7 @@ function Eo() {
|
|
|
3734
3736
|
function bo(e) {
|
|
3735
3737
|
const t = ee(), n = X();
|
|
3736
3738
|
return Pe({
|
|
3737
|
-
queryKey: [
|
|
3739
|
+
queryKey: [z, "revisions", e],
|
|
3738
3740
|
queryFn: async () => await n(t, {
|
|
3739
3741
|
action: I.GET_PAGE_REVISIONS,
|
|
3740
3742
|
data: { pageId: e }
|
|
@@ -3745,7 +3747,7 @@ function bo(e) {
|
|
|
3745
3747
|
});
|
|
3746
3748
|
}
|
|
3747
3749
|
const wo = () => {
|
|
3748
|
-
const e = ee(), t = X(), n =
|
|
3750
|
+
const e = ee(), t = X(), n = xe();
|
|
3749
3751
|
return _e({
|
|
3750
3752
|
mutationFn: async (s) => await t(e, {
|
|
3751
3753
|
action: I.DELETE_PAGE_REVISION,
|
|
@@ -3753,12 +3755,12 @@ const wo = () => {
|
|
|
3753
3755
|
}),
|
|
3754
3756
|
onSuccess: () => {
|
|
3755
3757
|
n.invalidateQueries({
|
|
3756
|
-
queryKey: [
|
|
3758
|
+
queryKey: [z, "revisions"]
|
|
3757
3759
|
});
|
|
3758
3760
|
}
|
|
3759
3761
|
});
|
|
3760
3762
|
}, So = () => {
|
|
3761
|
-
const e = ee(), t = X(), n =
|
|
3763
|
+
const e = ee(), t = X(), n = xe();
|
|
3762
3764
|
return _e({
|
|
3763
3765
|
mutationFn: async ({
|
|
3764
3766
|
revisionId: s,
|
|
@@ -3769,7 +3771,7 @@ const wo = () => {
|
|
|
3769
3771
|
}),
|
|
3770
3772
|
onSuccess: () => {
|
|
3771
3773
|
n.invalidateQueries({
|
|
3772
|
-
queryKey: [
|
|
3774
|
+
queryKey: [z, "revisions"]
|
|
3773
3775
|
});
|
|
3774
3776
|
}
|
|
3775
3777
|
});
|
|
@@ -3803,13 +3805,13 @@ function Ao() {
|
|
|
3803
3805
|
isFetching: f,
|
|
3804
3806
|
error: h,
|
|
3805
3807
|
refetch: y
|
|
3806
|
-
} = bo(c == null ? void 0 : c.id), { mutate: v, isPending: p } = wo(), { mutate: A, isPending: E } = So(),
|
|
3808
|
+
} = bo(c == null ? void 0 : c.id), { mutate: v, isPending: p } = wo(), { mutate: A, isPending: E } = So(), T = xe(), D = (k) => {
|
|
3807
3809
|
n && A(
|
|
3808
3810
|
{ revisionId: n.uid, discardCurrent: k },
|
|
3809
3811
|
{
|
|
3810
3812
|
onSuccess: () => {
|
|
3811
|
-
i(!1), s(null),
|
|
3812
|
-
queryKey: [
|
|
3813
|
+
i(!1), s(null), T.invalidateQueries({
|
|
3814
|
+
queryKey: [z, I.GET_DRAFT_PAGE]
|
|
3813
3815
|
});
|
|
3814
3816
|
}
|
|
3815
3817
|
}
|
|
@@ -3852,10 +3854,10 @@ function Ao() {
|
|
|
3852
3854
|
)
|
|
3853
3855
|
] })
|
|
3854
3856
|
] }),
|
|
3855
|
-
/* @__PURE__ */ r(
|
|
3857
|
+
/* @__PURE__ */ r(Ti, { className: "h-[calc(100vh-6rem)] pr-2", children: f ? /* @__PURE__ */ r(To, {}) : h ? /* @__PURE__ */ r("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "Failed to load revisions. Please try again." }) : /* @__PURE__ */ u("div", { className: "mt-2 space-y-2", children: [
|
|
3856
3858
|
/* @__PURE__ */ r(No, {}),
|
|
3857
3859
|
d == null ? void 0 : d.map((k) => /* @__PURE__ */ r(
|
|
3858
|
-
|
|
3860
|
+
xo,
|
|
3859
3861
|
{
|
|
3860
3862
|
revision: k,
|
|
3861
3863
|
isLatest: k.uid === "current",
|
|
@@ -3891,7 +3893,7 @@ function Ao() {
|
|
|
3891
3893
|
)
|
|
3892
3894
|
] });
|
|
3893
3895
|
}
|
|
3894
|
-
function
|
|
3896
|
+
function To() {
|
|
3895
3897
|
return /* @__PURE__ */ r("div", { className: "space-y-2 mt-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ u("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
|
|
3896
3898
|
/* @__PURE__ */ u("div", { className: "flex-1 space-y-1", children: [
|
|
3897
3899
|
/* @__PURE__ */ r(fn, { className: "h-4 w-3/4" }),
|
|
@@ -3901,7 +3903,7 @@ function xo() {
|
|
|
3901
3903
|
/* @__PURE__ */ r(fn, { className: "h-8 w-8 rounded-full" })
|
|
3902
3904
|
] }, t)) });
|
|
3903
3905
|
}
|
|
3904
|
-
function
|
|
3906
|
+
function xo({
|
|
3905
3907
|
revision: e,
|
|
3906
3908
|
isLatest: t,
|
|
3907
3909
|
onRestore: n,
|
|
@@ -3966,7 +3968,7 @@ function Co({
|
|
|
3966
3968
|
/* @__PURE__ */ r("span", { children: "Restore this version" })
|
|
3967
3969
|
] }) }),
|
|
3968
3970
|
/* @__PURE__ */ r(Me, { permission: he.DELETE_REVISION, children: e.uid !== "current" && /* @__PURE__ */ u(Ne, { children: [
|
|
3969
|
-
/* @__PURE__ */ r(
|
|
3971
|
+
/* @__PURE__ */ r(xi, {}),
|
|
3970
3972
|
/* @__PURE__ */ u(
|
|
3971
3973
|
Ge,
|
|
3972
3974
|
{
|
|
@@ -4115,7 +4117,7 @@ function _o({
|
|
|
4115
4117
|
const Io = () => {
|
|
4116
4118
|
const e = ee(), t = X();
|
|
4117
4119
|
return Pe({
|
|
4118
|
-
queryKey: [
|
|
4120
|
+
queryKey: [z, I.GET_CHANGES],
|
|
4119
4121
|
queryFn: async () => t(e, { action: I.GET_CHANGES })
|
|
4120
4122
|
});
|
|
4121
4123
|
}, ko = ({ currentEditor: e }) => {
|
|
@@ -4126,24 +4128,24 @@ function Lo({
|
|
|
4126
4128
|
showModal: e = !1,
|
|
4127
4129
|
onClose: t = () => console.log("Cancelled")
|
|
4128
4130
|
}) {
|
|
4129
|
-
const [n, s] = P([]), { data: a, isFetching: i } = Io(), { data: l } = De(), o =
|
|
4131
|
+
const [n, s] = P([]), { data: a, isFetching: i } = Io(), { data: l } = De(), o = Te(
|
|
4130
4132
|
(w) => {
|
|
4131
4133
|
var _;
|
|
4132
4134
|
return (_ = Ee(l, { key: w })) == null ? void 0 : _.hasSlug;
|
|
4133
4135
|
},
|
|
4134
4136
|
[l]
|
|
4135
|
-
), c =
|
|
4137
|
+
), c = W(
|
|
4136
4138
|
() => Ie(l, (w) => !o(w.key)).map(
|
|
4137
4139
|
(w) => w.key
|
|
4138
4140
|
),
|
|
4139
4141
|
[o, l]
|
|
4140
|
-
), d =
|
|
4142
|
+
), d = W(
|
|
4141
4143
|
() => Ie(a, (w) => !c.includes(w.pageType)),
|
|
4142
4144
|
[a, c]
|
|
4143
|
-
), f =
|
|
4145
|
+
), f = W(
|
|
4144
4146
|
() => Ie(a, (w) => c.includes(w.pageType)),
|
|
4145
4147
|
[a, c]
|
|
4146
|
-
), h =
|
|
4148
|
+
), h = W(
|
|
4147
4149
|
() => Ee(a, { pageType: "theme", id: "THEME" }),
|
|
4148
4150
|
[a]
|
|
4149
4151
|
), { mutate: y, isPending: v } = As();
|
|
@@ -4157,12 +4159,12 @@ function Lo({
|
|
|
4157
4159
|
);
|
|
4158
4160
|
}, E = () => {
|
|
4159
4161
|
s(p ? [] : je(a, "id"));
|
|
4160
|
-
},
|
|
4162
|
+
}, T = () => {
|
|
4161
4163
|
y(
|
|
4162
4164
|
{ ids: za(n) },
|
|
4163
4165
|
{
|
|
4164
4166
|
onSuccess: () => {
|
|
4165
|
-
t(),
|
|
4167
|
+
t(), xn("CENTER_CENTER");
|
|
4166
4168
|
}
|
|
4167
4169
|
}
|
|
4168
4170
|
);
|
|
@@ -4170,7 +4172,7 @@ function Lo({
|
|
|
4170
4172
|
if (w === "theme") return "Theme";
|
|
4171
4173
|
const _ = Ee(l, { key: w });
|
|
4172
4174
|
return _ ? _ == null ? void 0 : _.name : w;
|
|
4173
|
-
}, S =
|
|
4175
|
+
}, S = W(() => {
|
|
4174
4176
|
const w = [
|
|
4175
4177
|
{ label: "Updated", top: "pt-2" },
|
|
4176
4178
|
...mn(Ie(d, { online: !0 }), "pageType"),
|
|
@@ -4293,7 +4295,7 @@ function Lo({
|
|
|
4293
4295
|
C,
|
|
4294
4296
|
{
|
|
4295
4297
|
disabled: v || i || ye(a),
|
|
4296
|
-
onClick:
|
|
4298
|
+
onClick: T,
|
|
4297
4299
|
children: v ? "Publishing..." : "Publish"
|
|
4298
4300
|
}
|
|
4299
4301
|
)
|
|
@@ -4312,7 +4314,7 @@ const Do = () => {
|
|
|
4312
4314
|
});
|
|
4313
4315
|
};
|
|
4314
4316
|
function Go({ onClose: e }) {
|
|
4315
|
-
const { data: t, isFetching: n } = Do(), { mutateAsync: s, isPending: a } =
|
|
4317
|
+
const { data: t, isFetching: n } = Do(), { mutateAsync: s, isPending: a } = Tl(), i = st("settingComponent", null), l = $a(async (o) => (await s({ data: o }), !0), 300);
|
|
4316
4318
|
return i ? /* @__PURE__ */ r(Ke, { open: !0, onOpenChange: e, children: /* @__PURE__ */ u(Ve, { className: "w-full", children: [
|
|
4317
4319
|
/* @__PURE__ */ r(ze, { children: /* @__PURE__ */ r($e, { children: "Website Settings" }) }),
|
|
4318
4320
|
n ? /* @__PURE__ */ u("div", { className: "w-full space-y-3 py-4", children: [
|
|
@@ -4341,13 +4343,13 @@ function $r({
|
|
|
4341
4343
|
] }) });
|
|
4342
4344
|
}
|
|
4343
4345
|
const Ro = () => {
|
|
4344
|
-
const { selectedLang: e } = ht(), t = st("getPreviewUrl", async (f) => f), [n, s] = P(""), { data: a, isFetching: i } = Be(), { data: l } = cn(), { data: o } = De(), c =
|
|
4346
|
+
const { selectedLang: e } = ht(), t = st("getPreviewUrl", async (f) => f), [n, s] = P(""), { data: a, isFetching: i } = Be(), { data: l } = cn(), { data: o } = De(), c = W(
|
|
4345
4347
|
() => {
|
|
4346
4348
|
var f;
|
|
4347
4349
|
return (f = l == null ? void 0 : l.find((h) => (h == null ? void 0 : h.lang) === e)) == null ? void 0 : f.slug;
|
|
4348
4350
|
},
|
|
4349
4351
|
[e, l]
|
|
4350
|
-
), d =
|
|
4352
|
+
), d = Te(
|
|
4351
4353
|
(f) => {
|
|
4352
4354
|
var h;
|
|
4353
4355
|
return (h = Ee(o, { key: f })) == null ? void 0 : h.hasSlug;
|
|
@@ -4392,16 +4394,16 @@ const Ro = () => {
|
|
|
4392
4394
|
window.removeEventListener("beforeunload", f);
|
|
4393
4395
|
};
|
|
4394
4396
|
}, [a]);
|
|
4395
|
-
const i =
|
|
4397
|
+
const i = Te(async () => {
|
|
4396
4398
|
t(!0), await s(!1);
|
|
4397
4399
|
}, [s]);
|
|
4398
4400
|
Ae(() => {
|
|
4399
4401
|
a === "SAVED" && t(!1);
|
|
4400
4402
|
}, [a]);
|
|
4401
|
-
const l =
|
|
4403
|
+
const l = W(() => {
|
|
4402
4404
|
if (a === "SAVED" || a === "UNSAVED") return a;
|
|
4403
4405
|
if (a === "SAVING") return e ? a : "SAVED";
|
|
4404
|
-
}, [e, a]), { buttonIcon: o, buttonClass: c, tooltipContent: d } =
|
|
4406
|
+
}, [e, a]), { buttonIcon: o, buttonClass: c, tooltipContent: d } = W(() => {
|
|
4405
4407
|
switch (l) {
|
|
4406
4408
|
case "UNSAVED":
|
|
4407
4409
|
return {
|
|
@@ -4438,7 +4440,7 @@ const Ro = () => {
|
|
|
4438
4440
|
}
|
|
4439
4441
|
);
|
|
4440
4442
|
}, Bo = () => {
|
|
4441
|
-
const [e, t] = P(!1), [n, s] = P(!1), [a, i] = P(null), { data: l } = Be(), { mutate: o, isPending: c } = As(), [d] = ui(), { buttonText: f, buttonClassName: h, isPublished: y } =
|
|
4443
|
+
const [e, t] = P(!1), [n, s] = P(!1), [a, i] = P(null), { data: l } = Be(), { mutate: o, isPending: c } = As(), [d] = ui(), { buttonText: f, buttonClassName: h, isPublished: y } = W(() => {
|
|
4442
4444
|
const p = l && (l == null ? void 0 : l.online);
|
|
4443
4445
|
return {
|
|
4444
4446
|
buttonClassName: p ? "hover:bg-green-600 bg-green-500" : "",
|
|
@@ -4454,10 +4456,10 @@ const Ro = () => {
|
|
|
4454
4456
|
size: "sm",
|
|
4455
4457
|
onClick: async () => {
|
|
4456
4458
|
var A, E;
|
|
4457
|
-
const p = ((E = (A = d == null ? void 0 : d.filter((
|
|
4459
|
+
const p = ((E = (A = d == null ? void 0 : d.filter((T) => (T == null ? void 0 : T._type) === "GlobalBlock")) == null ? void 0 : A.map((T) => T == null ? void 0 : T.globalBlock)) == null ? void 0 : E.filter((T) => typeof T == "string")) || [];
|
|
4458
4460
|
o(
|
|
4459
4461
|
{ ids: [l == null ? void 0 : l.id, ...p] },
|
|
4460
|
-
{ onSuccess: () =>
|
|
4462
|
+
{ onSuccess: () => xn("TOP_RIGHT") }
|
|
4461
4463
|
);
|
|
4462
4464
|
},
|
|
4463
4465
|
disabled: c || !(l != null && l.id),
|
|
@@ -4501,7 +4503,7 @@ const Ro = () => {
|
|
|
4501
4503
|
className: "text-xs cursor-pointer",
|
|
4502
4504
|
onClick: () => o(
|
|
4503
4505
|
{ ids: [l == null ? void 0 : l.id] },
|
|
4504
|
-
{ onSuccess: () =>
|
|
4506
|
+
{ onSuccess: () => xn("TOP_RIGHT") }
|
|
4505
4507
|
),
|
|
4506
4508
|
children: [
|
|
4507
4509
|
q.PUBLISH,
|
|
@@ -4536,7 +4538,7 @@ const Ro = () => {
|
|
|
4536
4538
|
] }),
|
|
4537
4539
|
/* @__PURE__ */ r(Lo, { showModal: e, onClose: () => t(!1) }),
|
|
4538
4540
|
a && /* @__PURE__ */ r(
|
|
4539
|
-
|
|
4541
|
+
xs,
|
|
4540
4542
|
{
|
|
4541
4543
|
page: a,
|
|
4542
4544
|
onClose: () => i(null)
|
|
@@ -4561,7 +4563,7 @@ const Ro = () => {
|
|
|
4561
4563
|
] }) : null;
|
|
4562
4564
|
}, Fo = () => {
|
|
4563
4565
|
const { data: e } = Be(), t = e && (e == null ? void 0 : e.online), { data: n } = De();
|
|
4564
|
-
return
|
|
4566
|
+
return Te(
|
|
4565
4567
|
(a) => {
|
|
4566
4568
|
var i;
|
|
4567
4569
|
return (i = Ee(n, { key: a })) == null ? void 0 : i.hasSlug;
|
|
@@ -4599,7 +4601,7 @@ const jo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4599
4601
|
/* @__PURE__ */ r(qo, {})
|
|
4600
4602
|
] }), Ho = () => {
|
|
4601
4603
|
const e = ee(), { aiContext: t } = ws(), n = X();
|
|
4602
|
-
return
|
|
4604
|
+
return Te(
|
|
4603
4605
|
async (s, a, i, l) => n(e, {
|
|
4604
4606
|
action: I.ASK_AI,
|
|
4605
4607
|
data: { type: s, prompt: a, blocks: i, context: t, lang: l }
|
|
@@ -4626,7 +4628,7 @@ const jo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4626
4628
|
return n;
|
|
4627
4629
|
}), Vo = (e) => {
|
|
4628
4630
|
const t = ml();
|
|
4629
|
-
return
|
|
4631
|
+
return W(() => {
|
|
4630
4632
|
if (!e || ye(e)) return { blocks: [] };
|
|
4631
4633
|
const n = Ie(
|
|
4632
4634
|
e,
|
|
@@ -4637,7 +4639,7 @@ const jo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4637
4639
|
}, zo = () => {
|
|
4638
4640
|
const e = ee(), t = X();
|
|
4639
4641
|
return Pe({
|
|
4640
|
-
queryKey: [
|
|
4642
|
+
queryKey: [z, "uiLibraries"],
|
|
4641
4643
|
initialData: [],
|
|
4642
4644
|
queryFn: async () => (await t(e, { action: "GET_LIBRARIES" })).map((s) => ({
|
|
4643
4645
|
...s
|
|
@@ -4646,7 +4648,7 @@ const jo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4646
4648
|
}, $o = () => {
|
|
4647
4649
|
const e = Rn(), t = X(), { user: n } = nt(), s = n == null ? void 0 : n.id;
|
|
4648
4650
|
return Pe({
|
|
4649
|
-
queryKey: [
|
|
4651
|
+
queryKey: [z, "permissions", s],
|
|
4650
4652
|
queryFn: () => t(e, {
|
|
4651
4653
|
action: I.GET_ROLE_AND_PERMISSIONS,
|
|
4652
4654
|
data: { userId: s }
|
|
@@ -4694,17 +4696,17 @@ const jo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4694
4696
|
}, Yo = () => {
|
|
4695
4697
|
const { data: e } = Un(), t = ee(), n = X();
|
|
4696
4698
|
return {
|
|
4697
|
-
getPartialBlocks:
|
|
4699
|
+
getPartialBlocks: Te(async () => {
|
|
4698
4700
|
const s = {};
|
|
4699
4701
|
for (const a of e ?? [])
|
|
4700
4702
|
ye(a == null ? void 0 : a.slug) && (s[a.id] = {
|
|
4701
4703
|
type: a.pageType,
|
|
4702
|
-
name:
|
|
4704
|
+
name: Ft(a.name ?? a.slug),
|
|
4703
4705
|
description: ""
|
|
4704
4706
|
});
|
|
4705
4707
|
return s;
|
|
4706
4708
|
}, [e]),
|
|
4707
|
-
getPartialBlockBlocks:
|
|
4709
|
+
getPartialBlockBlocks: Te(
|
|
4708
4710
|
async (s) => {
|
|
4709
4711
|
if (!s) return [];
|
|
4710
4712
|
try {
|
|
@@ -4727,15 +4729,15 @@ const jo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4727
4729
|
const { setUser: e, logout: t } = nt(), n = Rn(), [s, a] = P(""), [i, l] = P(""), [o, c] = P({}), [d, f] = P(!1), [h, y] = P(""), v = _e({
|
|
4728
4730
|
mutationFn: async (E) => {
|
|
4729
4731
|
y("");
|
|
4730
|
-
const
|
|
4732
|
+
const T = await bs(n, {
|
|
4731
4733
|
action: "LOGIN",
|
|
4732
4734
|
data: E
|
|
4733
4735
|
});
|
|
4734
|
-
if (!
|
|
4735
|
-
const S = await
|
|
4736
|
+
if (!T.ok) {
|
|
4737
|
+
const S = await T.json();
|
|
4736
4738
|
throw new Error(S.error || "Login failed");
|
|
4737
4739
|
}
|
|
4738
|
-
const D = await
|
|
4740
|
+
const D = await T.json();
|
|
4739
4741
|
if (Oe(D, "id") && Oe(D, "email") && Oe(D, "accessToken") && Oe(D, "refreshToken"))
|
|
4740
4742
|
e(D);
|
|
4741
4743
|
else
|
|
@@ -4753,9 +4755,9 @@ const jo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4753
4755
|
}
|
|
4754
4756
|
}), p = async (E) => {
|
|
4755
4757
|
E.preventDefault(), c({});
|
|
4756
|
-
const
|
|
4758
|
+
const T = { email: s, password: i };
|
|
4757
4759
|
try {
|
|
4758
|
-
const D = qs.parse(
|
|
4760
|
+
const D = qs.parse(T);
|
|
4759
4761
|
v.mutate(D);
|
|
4760
4762
|
} catch (D) {
|
|
4761
4763
|
if (D instanceof An.ZodError) {
|
|
@@ -4871,7 +4873,7 @@ const jo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4871
4873
|
] }) });
|
|
4872
4874
|
};
|
|
4873
4875
|
let Wn = Qo;
|
|
4874
|
-
const Xo = () =>
|
|
4876
|
+
const Xo = () => W(() => Wn, [Wn]), td = (e) => {
|
|
4875
4877
|
Wn = e;
|
|
4876
4878
|
}, Zo = () => {
|
|
4877
4879
|
const e = Xo();
|
|
@@ -4982,7 +4984,7 @@ function Je({
|
|
|
4982
4984
|
}
|
|
4983
4985
|
const tc = () => {
|
|
4984
4986
|
const { selectedLang: e } = ht(), { data: t, isFetching: n } = cn();
|
|
4985
|
-
return { data:
|
|
4987
|
+
return { data: W(() => Ee(t, { lang: e || "" }) || {}, [t, e]), isFetching: n };
|
|
4986
4988
|
}, nc = (e, t) => {
|
|
4987
4989
|
const n = e.selectionStart || 0, s = e.selectionEnd || 0, a = e.value, i = a.substring(0, n), l = a.substring(s);
|
|
4988
4990
|
let o = !1;
|
|
@@ -5020,7 +5022,7 @@ const tc = () => {
|
|
|
5020
5022
|
searchDescription: "",
|
|
5021
5023
|
jsonLD: "",
|
|
5022
5024
|
...d
|
|
5023
|
-
}), v = dt({ initial: h, updated: h }), p = t.length ? t : n, { mutate: A, isPending: E } = Ns(),
|
|
5025
|
+
}), v = dt({ initial: h, updated: h }), p = t.length ? t : n, { mutate: A, isPending: E } = Ns(), T = E, { hasPermission: D } = Lt(), S = D(he.EDIT_SEO);
|
|
5024
5026
|
Ae(() => {
|
|
5025
5027
|
!c && d && y({
|
|
5026
5028
|
title: "",
|
|
@@ -5059,26 +5061,26 @@ const tc = () => {
|
|
|
5059
5061
|
searchDescription: h.ogDescription
|
|
5060
5062
|
});
|
|
5061
5063
|
}, oe = (G, O) => {
|
|
5062
|
-
const
|
|
5063
|
-
if (
|
|
5064
|
+
const x = document.getElementById(O);
|
|
5065
|
+
if (x) {
|
|
5064
5066
|
const { value: M, newCursorPos: ne } = nc(
|
|
5065
|
-
|
|
5067
|
+
x,
|
|
5066
5068
|
G
|
|
5067
5069
|
);
|
|
5068
5070
|
f.current = {
|
|
5069
5071
|
id: O,
|
|
5070
5072
|
position: ne
|
|
5071
|
-
},
|
|
5073
|
+
}, x.tagName.toLowerCase() === "input" ? (x.value = M, y((fe) => ({
|
|
5072
5074
|
...fe,
|
|
5073
|
-
[
|
|
5074
|
-
})),
|
|
5075
|
+
[x.name]: M
|
|
5076
|
+
})), x.focus(), x.setSelectionRange(ne, ne), [0, 10, 50, 100, 200].forEach((fe) => {
|
|
5075
5077
|
setTimeout(() => {
|
|
5076
5078
|
const K = document.getElementById(O);
|
|
5077
5079
|
K && (K.focus(), K.setSelectionRange(ne, ne));
|
|
5078
5080
|
}, fe);
|
|
5079
5081
|
})) : (y((Z) => ({
|
|
5080
5082
|
...Z,
|
|
5081
|
-
[
|
|
5083
|
+
[x.name]: M
|
|
5082
5084
|
})), requestAnimationFrame(() => {
|
|
5083
5085
|
const Z = document.getElementById(
|
|
5084
5086
|
O
|
|
@@ -5138,7 +5140,7 @@ const tc = () => {
|
|
|
5138
5140
|
name: "title",
|
|
5139
5141
|
value: h.title,
|
|
5140
5142
|
onChange: te,
|
|
5141
|
-
disabled:
|
|
5143
|
+
disabled: T || !S,
|
|
5142
5144
|
placeholder: e("Enter SEO title"),
|
|
5143
5145
|
readOnly: !S
|
|
5144
5146
|
}
|
|
@@ -5156,14 +5158,14 @@ const tc = () => {
|
|
|
5156
5158
|
)
|
|
5157
5159
|
] }),
|
|
5158
5160
|
/* @__PURE__ */ r(
|
|
5159
|
-
|
|
5161
|
+
Rt,
|
|
5160
5162
|
{
|
|
5161
5163
|
id: "description",
|
|
5162
5164
|
name: "description",
|
|
5163
5165
|
rows: 5,
|
|
5164
5166
|
value: h.description,
|
|
5165
5167
|
onChange: te,
|
|
5166
|
-
disabled:
|
|
5168
|
+
disabled: T || !S,
|
|
5167
5169
|
placeholder: e("Enter SEO description"),
|
|
5168
5170
|
readOnly: !S
|
|
5169
5171
|
}
|
|
@@ -5189,7 +5191,7 @@ const tc = () => {
|
|
|
5189
5191
|
name: "canonicalUrl",
|
|
5190
5192
|
value: h.canonicalUrl,
|
|
5191
5193
|
onChange: te,
|
|
5192
|
-
disabled:
|
|
5194
|
+
disabled: T || !S,
|
|
5193
5195
|
placeholder: e("Enter Canonical URL"),
|
|
5194
5196
|
readOnly: !S
|
|
5195
5197
|
}
|
|
@@ -5205,7 +5207,7 @@ const tc = () => {
|
|
|
5205
5207
|
name: "noIndex",
|
|
5206
5208
|
checked: h.noIndex,
|
|
5207
5209
|
onChange: te,
|
|
5208
|
-
disabled:
|
|
5210
|
+
disabled: T || !S,
|
|
5209
5211
|
className: "w-4 h-4"
|
|
5210
5212
|
}
|
|
5211
5213
|
),
|
|
@@ -5225,7 +5227,7 @@ const tc = () => {
|
|
|
5225
5227
|
name: "noFollow",
|
|
5226
5228
|
checked: h.noFollow,
|
|
5227
5229
|
onChange: te,
|
|
5228
|
-
disabled:
|
|
5230
|
+
disabled: T || !S,
|
|
5229
5231
|
className: "w-4 h-4"
|
|
5230
5232
|
}
|
|
5231
5233
|
),
|
|
@@ -5271,7 +5273,7 @@ const tc = () => {
|
|
|
5271
5273
|
name: "ogTitle",
|
|
5272
5274
|
value: h.ogTitle,
|
|
5273
5275
|
onChange: te,
|
|
5274
|
-
disabled:
|
|
5276
|
+
disabled: T || !S,
|
|
5275
5277
|
placeholder: e("Enter OG title"),
|
|
5276
5278
|
readOnly: !S
|
|
5277
5279
|
}
|
|
@@ -5290,14 +5292,14 @@ const tc = () => {
|
|
|
5290
5292
|
)
|
|
5291
5293
|
] }),
|
|
5292
5294
|
/* @__PURE__ */ r(
|
|
5293
|
-
|
|
5295
|
+
Rt,
|
|
5294
5296
|
{
|
|
5295
5297
|
id: "ogDescription",
|
|
5296
5298
|
name: "ogDescription",
|
|
5297
5299
|
rows: 5,
|
|
5298
5300
|
value: h.ogDescription,
|
|
5299
5301
|
onChange: te,
|
|
5300
|
-
disabled:
|
|
5302
|
+
disabled: T || !S,
|
|
5301
5303
|
placeholder: e("Enter OG description"),
|
|
5302
5304
|
readOnly: !S
|
|
5303
5305
|
}
|
|
@@ -5323,7 +5325,7 @@ const tc = () => {
|
|
|
5323
5325
|
name: "ogImage",
|
|
5324
5326
|
value: h.ogImage,
|
|
5325
5327
|
onChange: te,
|
|
5326
|
-
disabled:
|
|
5328
|
+
disabled: T || !S,
|
|
5327
5329
|
placeholder: e("Enter OG image URL"),
|
|
5328
5330
|
readOnly: !S
|
|
5329
5331
|
}
|
|
@@ -5365,7 +5367,7 @@ const tc = () => {
|
|
|
5365
5367
|
name: "searchTitle",
|
|
5366
5368
|
value: h.searchTitle,
|
|
5367
5369
|
onChange: te,
|
|
5368
|
-
disabled:
|
|
5370
|
+
disabled: T || !S,
|
|
5369
5371
|
placeholder: e("Enter search title"),
|
|
5370
5372
|
readOnly: !S
|
|
5371
5373
|
}
|
|
@@ -5384,7 +5386,7 @@ const tc = () => {
|
|
|
5384
5386
|
)
|
|
5385
5387
|
] }),
|
|
5386
5388
|
/* @__PURE__ */ r(
|
|
5387
|
-
|
|
5389
|
+
Rt,
|
|
5388
5390
|
{
|
|
5389
5391
|
id: "searchDescription",
|
|
5390
5392
|
rows: 5,
|
|
@@ -5392,7 +5394,7 @@ const tc = () => {
|
|
|
5392
5394
|
value: h.searchDescription,
|
|
5393
5395
|
onChange: te,
|
|
5394
5396
|
placeholder: e("Enter search description"),
|
|
5395
|
-
disabled:
|
|
5397
|
+
disabled: T || !S,
|
|
5396
5398
|
readOnly: !S
|
|
5397
5399
|
}
|
|
5398
5400
|
)
|
|
@@ -5414,7 +5416,7 @@ const tc = () => {
|
|
|
5414
5416
|
)
|
|
5415
5417
|
] }),
|
|
5416
5418
|
/* @__PURE__ */ r(
|
|
5417
|
-
|
|
5419
|
+
Rt,
|
|
5418
5420
|
{
|
|
5419
5421
|
id: "jsonLD",
|
|
5420
5422
|
name: "jsonLD",
|
|
@@ -5422,7 +5424,7 @@ const tc = () => {
|
|
|
5422
5424
|
value: h.jsonLD,
|
|
5423
5425
|
onChange: te,
|
|
5424
5426
|
placeholder: e("Enter JSON-LD"),
|
|
5425
|
-
disabled:
|
|
5427
|
+
disabled: T || !S,
|
|
5426
5428
|
readOnly: !S
|
|
5427
5429
|
}
|
|
5428
5430
|
)
|
|
@@ -5436,7 +5438,7 @@ const tc = () => {
|
|
|
5436
5438
|
size: "lg",
|
|
5437
5439
|
variant: "default",
|
|
5438
5440
|
onClick: w,
|
|
5439
|
-
disabled: is(v.current.initial, h) ||
|
|
5441
|
+
disabled: is(v.current.initial, h) || T || !S,
|
|
5440
5442
|
children: e(E ? "Saving..." : "Save")
|
|
5441
5443
|
}
|
|
5442
5444
|
) })
|
|
@@ -5532,7 +5534,7 @@ function js(e) {
|
|
|
5532
5534
|
const t = String(e), n = t.length - 1;
|
|
5533
5535
|
return F.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
|
|
5534
5536
|
}
|
|
5535
|
-
function
|
|
5537
|
+
function Ut(e) {
|
|
5536
5538
|
F.context = e;
|
|
5537
5539
|
}
|
|
5538
5540
|
var cc = (e, t) => e === t, Cn = Symbol("solid-proxy"), Xr = typeof Proxy == "function", Zr = Symbol("solid-track"), Pn = {
|
|
@@ -5569,21 +5571,21 @@ function Se(e, t) {
|
|
|
5569
5571
|
}
|
|
5570
5572
|
function dc(e, t, n) {
|
|
5571
5573
|
const s = Bn(e, t, !0, rt);
|
|
5572
|
-
|
|
5574
|
+
Dt(s);
|
|
5573
5575
|
}
|
|
5574
5576
|
function ut(e, t, n) {
|
|
5575
5577
|
const s = Bn(e, t, !1, rt);
|
|
5576
|
-
|
|
5578
|
+
Dt(s);
|
|
5577
5579
|
}
|
|
5578
5580
|
function ta(e, t, n) {
|
|
5579
5581
|
Jr = wc;
|
|
5580
5582
|
const s = Bn(e, t, !1, rt);
|
|
5581
|
-
(!n || !n.render) && (s.user = !0), et ? et.push(s) :
|
|
5583
|
+
(!n || !n.render) && (s.user = !0), et ? et.push(s) : Dt(s);
|
|
5582
5584
|
}
|
|
5583
5585
|
function Re(e, t, n) {
|
|
5584
5586
|
n = n ? Object.assign({}, Pn, n) : Pn;
|
|
5585
5587
|
const s = Bn(e, t, !0, 0);
|
|
5586
|
-
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0,
|
|
5588
|
+
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, Dt(s), sa.bind(s);
|
|
5587
5589
|
}
|
|
5588
5590
|
function hc(e) {
|
|
5589
5591
|
return e && typeof e == "object" && "then" in e;
|
|
@@ -5592,29 +5594,29 @@ function mc(e, t, n) {
|
|
|
5592
5594
|
let s, a, i;
|
|
5593
5595
|
arguments.length === 1 ? (s = !0, a = e, i = {}) : (s = e, a = t, i = {});
|
|
5594
5596
|
let l = null, o = Hn, c = null, d = !1, f = "initialValue" in i, h = typeof s == "function" && Re(s);
|
|
5595
|
-
const y = /* @__PURE__ */ new Set(), [v, p] = (i.storage || Se)(i.initialValue), [A, E] = Se(void 0), [
|
|
5597
|
+
const y = /* @__PURE__ */ new Set(), [v, p] = (i.storage || Se)(i.initialValue), [A, E] = Se(void 0), [T, D] = Se(void 0, {
|
|
5596
5598
|
equals: !1
|
|
5597
5599
|
}), [S, w] = Se(f ? "ready" : "unresolved");
|
|
5598
5600
|
F.context && (c = F.getNextContextId(), i.ssrLoadFrom === "initial" ? o = i.initialValue : F.load && F.has(c) && (o = F.load(c)));
|
|
5599
|
-
function _(G, O,
|
|
5601
|
+
function _(G, O, x, M) {
|
|
5600
5602
|
return l === G && (l = null, M !== void 0 && (f = !0), (G === o || O === o) && i.onHydrated && queueMicrotask(
|
|
5601
5603
|
() => i.onHydrated(M, {
|
|
5602
5604
|
value: O
|
|
5603
5605
|
})
|
|
5604
|
-
), o = Hn, k(O,
|
|
5606
|
+
), o = Hn, k(O, x)), O;
|
|
5605
5607
|
}
|
|
5606
5608
|
function k(G, O) {
|
|
5607
5609
|
Qe(() => {
|
|
5608
5610
|
O === void 0 && p(() => G), w(O !== void 0 ? "errored" : f ? "ready" : "unresolved"), E(O);
|
|
5609
|
-
for (const
|
|
5610
|
-
|
|
5611
|
+
for (const x of y.keys())
|
|
5612
|
+
x.decrement();
|
|
5611
5613
|
y.clear();
|
|
5612
5614
|
}, !1);
|
|
5613
5615
|
}
|
|
5614
5616
|
function oe() {
|
|
5615
|
-
const G = vc, O = v(),
|
|
5616
|
-
if (
|
|
5617
|
-
throw
|
|
5617
|
+
const G = vc, O = v(), x = A();
|
|
5618
|
+
if (x !== void 0 && !l)
|
|
5619
|
+
throw x;
|
|
5618
5620
|
return ue && ue.user, O;
|
|
5619
5621
|
}
|
|
5620
5622
|
function te(G = !0) {
|
|
@@ -5626,18 +5628,18 @@ function mc(e, t, n) {
|
|
|
5626
5628
|
_(l, ke(v));
|
|
5627
5629
|
return;
|
|
5628
5630
|
}
|
|
5629
|
-
const
|
|
5631
|
+
const x = o !== Hn ? o : ke(
|
|
5630
5632
|
() => a(O, {
|
|
5631
5633
|
value: v(),
|
|
5632
5634
|
refetching: G
|
|
5633
5635
|
})
|
|
5634
5636
|
);
|
|
5635
|
-
return hc(
|
|
5637
|
+
return hc(x) ? (l = x, "value" in x ? (x.status === "success" ? _(l, x.value, void 0, O) : _(l, void 0, Yn(x.value), O), x) : (d = !0, queueMicrotask(() => d = !1), Qe(() => {
|
|
5636
5638
|
w(f ? "refreshing" : "pending"), D();
|
|
5637
|
-
}, !1),
|
|
5638
|
-
(M) => _(
|
|
5639
|
-
(M) => _(
|
|
5640
|
-
))) : (_(l,
|
|
5639
|
+
}, !1), x.then(
|
|
5640
|
+
(M) => _(x, M, void 0, O),
|
|
5641
|
+
(M) => _(x, void 0, Yn(M), O)
|
|
5642
|
+
))) : (_(l, x, void 0, O), x);
|
|
5641
5643
|
}
|
|
5642
5644
|
return Object.defineProperties(oe, {
|
|
5643
5645
|
state: {
|
|
@@ -5756,7 +5758,7 @@ var vc;
|
|
|
5756
5758
|
function sa() {
|
|
5757
5759
|
if (this.sources && this.state)
|
|
5758
5760
|
if (this.state === rt)
|
|
5759
|
-
|
|
5761
|
+
Dt(this);
|
|
5760
5762
|
else {
|
|
5761
5763
|
const e = Le;
|
|
5762
5764
|
Le = null, Qe(() => kn(this), !1), Le = e;
|
|
@@ -5778,7 +5780,7 @@ function ra(e, t, n) {
|
|
|
5778
5780
|
throw Le = [], new Error();
|
|
5779
5781
|
}, !1)), t;
|
|
5780
5782
|
}
|
|
5781
|
-
function
|
|
5783
|
+
function Dt(e) {
|
|
5782
5784
|
if (!e.fn)
|
|
5783
5785
|
return;
|
|
5784
5786
|
Ht(e);
|
|
@@ -5830,7 +5832,7 @@ function In(e) {
|
|
|
5830
5832
|
e.state && t.push(e);
|
|
5831
5833
|
for (let n = t.length - 1; n >= 0; n--)
|
|
5832
5834
|
if (e = t[n], e.state === rt)
|
|
5833
|
-
|
|
5835
|
+
Dt(e);
|
|
5834
5836
|
else if (e.state === _n) {
|
|
5835
5837
|
const s = Le;
|
|
5836
5838
|
Le = null, Qe(() => kn(e, t[0]), !1), Le = s;
|
|
@@ -5869,7 +5871,7 @@ function wc(e) {
|
|
|
5869
5871
|
F.effects || (F.effects = []), F.effects.push(...e.slice(0, n));
|
|
5870
5872
|
return;
|
|
5871
5873
|
}
|
|
5872
|
-
|
|
5874
|
+
Ut();
|
|
5873
5875
|
}
|
|
5874
5876
|
for (F.effects && (F.done || !F.count) && (e = [...F.effects, ...e], n += F.effects.length, delete F.effects), t = 0; t < n; t++)
|
|
5875
5877
|
In(e[t]);
|
|
@@ -5960,7 +5962,7 @@ function Nc(e, t, n = {}) {
|
|
|
5960
5962
|
return jt(() => Ln(i)), () => {
|
|
5961
5963
|
let c = e() || [], d = c.length, f, h;
|
|
5962
5964
|
return c[Zr], ke(() => {
|
|
5963
|
-
let v, p, A, E,
|
|
5965
|
+
let v, p, A, E, T, D, S, w, _;
|
|
5964
5966
|
if (d === 0)
|
|
5965
5967
|
l !== 0 && (Ln(i), i = [], s = [], a = [], l = 0, o && (o = [])), n.fallback && (s = [Xn], a[0] = ct((k) => (i[0] = k, n.fallback())), l = 1);
|
|
5966
5968
|
else if (l === 0) {
|
|
@@ -5968,16 +5970,16 @@ function Nc(e, t, n = {}) {
|
|
|
5968
5970
|
s[h] = c[h], a[h] = ct(y);
|
|
5969
5971
|
l = d;
|
|
5970
5972
|
} else {
|
|
5971
|
-
for (A = new Array(d), E = new Array(d), o && (
|
|
5973
|
+
for (A = new Array(d), E = new Array(d), o && (T = new Array(d)), D = 0, S = Math.min(l, d); D < S && s[D] === c[D]; D++)
|
|
5972
5974
|
;
|
|
5973
5975
|
for (S = l - 1, w = d - 1; S >= D && w >= D && s[S] === c[w]; S--, w--)
|
|
5974
|
-
A[w] = a[S], E[w] = i[S], o && (
|
|
5976
|
+
A[w] = a[S], E[w] = i[S], o && (T[w] = o[S]);
|
|
5975
5977
|
for (v = /* @__PURE__ */ new Map(), p = new Array(w + 1), h = w; h >= D; h--)
|
|
5976
5978
|
_ = c[h], f = v.get(_), p[h] = f === void 0 ? -1 : f, v.set(_, h);
|
|
5977
5979
|
for (f = D; f <= S; f++)
|
|
5978
|
-
_ = s[f], h = v.get(_), h !== void 0 && h !== -1 ? (A[h] = a[f], E[h] = i[f], o && (
|
|
5980
|
+
_ = s[f], h = v.get(_), h !== void 0 && h !== -1 ? (A[h] = a[f], E[h] = i[f], o && (T[h] = o[f]), h = p[h], v.set(_, h)) : i[f]();
|
|
5979
5981
|
for (h = D; h < d; h++)
|
|
5980
|
-
h in A ? (a[h] = A[h], i[h] = E[h], o && (o[h] =
|
|
5982
|
+
h in A ? (a[h] = A[h], i[h] = E[h], o && (o[h] = T[h], o[h](h))) : a[h] = ct(y);
|
|
5981
5983
|
a = a.slice(0, l = d), s = c.slice(0);
|
|
5982
5984
|
}
|
|
5983
5985
|
return a;
|
|
@@ -6044,7 +6046,7 @@ var Zn = {
|
|
|
6044
6046
|
function Vn(e) {
|
|
6045
6047
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
6046
6048
|
}
|
|
6047
|
-
function
|
|
6049
|
+
function Tc() {
|
|
6048
6050
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
6049
6051
|
const n = this[e]();
|
|
6050
6052
|
if (n !== void 0)
|
|
@@ -6097,7 +6099,7 @@ function oa(...e) {
|
|
|
6097
6099
|
s[f] = h.get ? {
|
|
6098
6100
|
enumerable: !0,
|
|
6099
6101
|
configurable: !0,
|
|
6100
|
-
get:
|
|
6102
|
+
get: Tc.bind(n[f] = [h.get.bind(o)])
|
|
6101
6103
|
} : h.value !== void 0 ? h : void 0;
|
|
6102
6104
|
else {
|
|
6103
6105
|
const y = n[f];
|
|
@@ -6112,7 +6114,7 @@ function oa(...e) {
|
|
|
6112
6114
|
}
|
|
6113
6115
|
return a;
|
|
6114
6116
|
}
|
|
6115
|
-
function
|
|
6117
|
+
function xc(e, ...t) {
|
|
6116
6118
|
if (Xr && Cn in e) {
|
|
6117
6119
|
const a = new Set(t.length > 1 ? t.flat() : t[0]), i = t.map((l) => new Proxy(
|
|
6118
6120
|
{
|
|
@@ -6162,7 +6164,7 @@ function ca(e) {
|
|
|
6162
6164
|
if (i) {
|
|
6163
6165
|
const [o, c] = Se();
|
|
6164
6166
|
F.count || (F.count = 0), F.count++, (n || (n = e())).then((d) => {
|
|
6165
|
-
!F.done &&
|
|
6167
|
+
!F.done && Ut(i), F.count--, c(() => d.default), Ut();
|
|
6166
6168
|
}), t = o;
|
|
6167
6169
|
} else if (!t) {
|
|
6168
6170
|
const [o] = mc(() => (n || (n = e())).then((c) => c.default));
|
|
@@ -6174,9 +6176,9 @@ function ca(e) {
|
|
|
6174
6176
|
if (!i || F.done)
|
|
6175
6177
|
return l(a);
|
|
6176
6178
|
const o = F.context;
|
|
6177
|
-
|
|
6179
|
+
Ut(i);
|
|
6178
6180
|
const c = l(a);
|
|
6179
|
-
return
|
|
6181
|
+
return Ut(o), c;
|
|
6180
6182
|
}) : ""
|
|
6181
6183
|
);
|
|
6182
6184
|
};
|
|
@@ -6487,7 +6489,7 @@ function Oc(e, t, n) {
|
|
|
6487
6489
|
}
|
|
6488
6490
|
}
|
|
6489
6491
|
}
|
|
6490
|
-
var
|
|
6492
|
+
var Bt = "_$DX_DELEGATE";
|
|
6491
6493
|
function da(e, t, n, s = {}) {
|
|
6492
6494
|
let a;
|
|
6493
6495
|
return ct((i) => {
|
|
@@ -6505,17 +6507,17 @@ function fd(e, t, n) {
|
|
|
6505
6507
|
return i.cloneNode = i, i;
|
|
6506
6508
|
}
|
|
6507
6509
|
function Bc(e, t = window.document) {
|
|
6508
|
-
const n = t[
|
|
6510
|
+
const n = t[Bt] || (t[Bt] = /* @__PURE__ */ new Set());
|
|
6509
6511
|
for (let s = 0, a = e.length; s < a; s++) {
|
|
6510
6512
|
const i = e[s];
|
|
6511
6513
|
n.has(i) || (n.add(i), t.addEventListener(i, ha));
|
|
6512
6514
|
}
|
|
6513
6515
|
}
|
|
6514
6516
|
function gd(e = window.document) {
|
|
6515
|
-
if (e[
|
|
6516
|
-
for (let t of e[
|
|
6517
|
+
if (e[Bt]) {
|
|
6518
|
+
for (let t of e[Bt].keys())
|
|
6517
6519
|
e.removeEventListener(t, ha);
|
|
6518
|
-
delete e[
|
|
6520
|
+
delete e[Bt];
|
|
6519
6521
|
}
|
|
6520
6522
|
}
|
|
6521
6523
|
function Jn(e, t, n) {
|
|
@@ -6844,7 +6846,7 @@ function pd(e) {
|
|
|
6844
6846
|
), n;
|
|
6845
6847
|
}
|
|
6846
6848
|
function yd(e) {
|
|
6847
|
-
const [t, n] =
|
|
6849
|
+
const [t, n] = xc(e, ["component"]), s = Re(() => t.component);
|
|
6848
6850
|
return Re(() => {
|
|
6849
6851
|
const a = s();
|
|
6850
6852
|
switch (typeof a) {
|
|
@@ -6918,10 +6920,10 @@ function tu(e, t) {
|
|
|
6918
6920
|
return i;
|
|
6919
6921
|
}
|
|
6920
6922
|
}
|
|
6921
|
-
function
|
|
6923
|
+
function kt(e, t) {
|
|
6922
6924
|
Object.entries(e).forEach(([n, s]) => t(s, n));
|
|
6923
6925
|
}
|
|
6924
|
-
function
|
|
6926
|
+
function Tn(e, t) {
|
|
6925
6927
|
return e.indexOf(t) !== -1;
|
|
6926
6928
|
}
|
|
6927
6929
|
function $s(e, t) {
|
|
@@ -6944,7 +6946,7 @@ var nu = class {
|
|
|
6944
6946
|
findByName(e) {
|
|
6945
6947
|
return this.transfomers[e];
|
|
6946
6948
|
}
|
|
6947
|
-
}, su = (e) => Object.prototype.toString.call(e).slice(8, -1), ga = (e) => typeof e > "u", ru = (e) => e === null, Vt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, ns = (e) => Vt(e) && Object.keys(e).length === 0, at = (e) => Array.isArray(e), au = (e) => typeof e == "string", iu = (e) => typeof e == "number" && !isNaN(e), lu = (e) => typeof e == "boolean", ou = (e) => e instanceof RegExp, zt = (e) => e instanceof Map, $t = (e) => e instanceof Set, pa = (e) => su(e) === "Symbol", cu = (e) => e instanceof Date && !isNaN(e.valueOf()), uu = (e) => e instanceof Error, Ws = (e) => typeof e == "number" && isNaN(e), du = (e) => lu(e) || ru(e) || ga(e) || iu(e) || au(e) || pa(e), hu = (e) => typeof e == "bigint", mu = (e) => e === 1 / 0 || e === -1 / 0, fu = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), gu = (e) => e instanceof URL, ya = (e) => e.replace(/\./g, "\\."), zn = (e) => e.map(String).map(ya).join("."),
|
|
6949
|
+
}, su = (e) => Object.prototype.toString.call(e).slice(8, -1), ga = (e) => typeof e > "u", ru = (e) => e === null, Vt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, ns = (e) => Vt(e) && Object.keys(e).length === 0, at = (e) => Array.isArray(e), au = (e) => typeof e == "string", iu = (e) => typeof e == "number" && !isNaN(e), lu = (e) => typeof e == "boolean", ou = (e) => e instanceof RegExp, zt = (e) => e instanceof Map, $t = (e) => e instanceof Set, pa = (e) => su(e) === "Symbol", cu = (e) => e instanceof Date && !isNaN(e.valueOf()), uu = (e) => e instanceof Error, Ws = (e) => typeof e == "number" && isNaN(e), du = (e) => lu(e) || ru(e) || ga(e) || iu(e) || au(e) || pa(e), hu = (e) => typeof e == "bigint", mu = (e) => e === 1 / 0 || e === -1 / 0, fu = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), gu = (e) => e instanceof URL, ya = (e) => e.replace(/\./g, "\\."), zn = (e) => e.map(String).map(ya).join("."), Mt = (e) => {
|
|
6948
6950
|
const t = [];
|
|
6949
6951
|
let n = "";
|
|
6950
6952
|
for (let a = 0; a < e.length; a++) {
|
|
@@ -7099,16 +7101,16 @@ var vu = (e, t, n) => {
|
|
|
7099
7101
|
n.next(), t--;
|
|
7100
7102
|
return n.next().value;
|
|
7101
7103
|
};
|
|
7102
|
-
function
|
|
7103
|
-
if (
|
|
7104
|
+
function Ta(e) {
|
|
7105
|
+
if (Tn(e, "__proto__"))
|
|
7104
7106
|
throw new Error("__proto__ is not allowed as a property");
|
|
7105
|
-
if (
|
|
7107
|
+
if (Tn(e, "prototype"))
|
|
7106
7108
|
throw new Error("prototype is not allowed as a property");
|
|
7107
|
-
if (
|
|
7109
|
+
if (Tn(e, "constructor"))
|
|
7108
7110
|
throw new Error("constructor is not allowed as a property");
|
|
7109
7111
|
}
|
|
7110
7112
|
var Eu = (e, t) => {
|
|
7111
|
-
|
|
7113
|
+
Ta(t);
|
|
7112
7114
|
for (let n = 0; n < t.length; n++) {
|
|
7113
7115
|
const s = t[n];
|
|
7114
7116
|
if ($t(e))
|
|
@@ -7128,7 +7130,7 @@ var Eu = (e, t) => {
|
|
|
7128
7130
|
}
|
|
7129
7131
|
return e;
|
|
7130
7132
|
}, ss = (e, t, n) => {
|
|
7131
|
-
if (
|
|
7133
|
+
if (Ta(t), t.length === 0)
|
|
7132
7134
|
return n(e);
|
|
7133
7135
|
let s = e;
|
|
7134
7136
|
for (let i = 0; i < t.length - 1; i++) {
|
|
@@ -7180,12 +7182,12 @@ function rs(e, t, n = []) {
|
|
|
7180
7182
|
if (!e)
|
|
7181
7183
|
return;
|
|
7182
7184
|
if (!at(e)) {
|
|
7183
|
-
|
|
7185
|
+
kt(e, (i, l) => rs(i, t, [...n, ...Mt(l)]));
|
|
7184
7186
|
return;
|
|
7185
7187
|
}
|
|
7186
7188
|
const [s, a] = e;
|
|
7187
|
-
a &&
|
|
7188
|
-
rs(i, t, [...n, ...
|
|
7189
|
+
a && kt(a, (i, l) => {
|
|
7190
|
+
rs(i, t, [...n, ...Mt(l)]);
|
|
7189
7191
|
}), t(s, n);
|
|
7190
7192
|
}
|
|
7191
7193
|
function bu(e, t, n) {
|
|
@@ -7195,18 +7197,18 @@ function bu(e, t, n) {
|
|
|
7195
7197
|
}
|
|
7196
7198
|
function wu(e, t) {
|
|
7197
7199
|
function n(s, a) {
|
|
7198
|
-
const i = Eu(e,
|
|
7199
|
-
s.map(
|
|
7200
|
+
const i = Eu(e, Mt(a));
|
|
7201
|
+
s.map(Mt).forEach((l) => {
|
|
7200
7202
|
e = ss(e, l, () => i);
|
|
7201
7203
|
});
|
|
7202
7204
|
}
|
|
7203
7205
|
if (at(t)) {
|
|
7204
7206
|
const [s, a] = t;
|
|
7205
7207
|
s.forEach((i) => {
|
|
7206
|
-
e = ss(e,
|
|
7207
|
-
}), a &&
|
|
7208
|
+
e = ss(e, Mt(i), () => e);
|
|
7209
|
+
}), a && kt(a, n);
|
|
7208
7210
|
} else
|
|
7209
|
-
|
|
7211
|
+
kt(t, n);
|
|
7210
7212
|
return e;
|
|
7211
7213
|
}
|
|
7212
7214
|
var Su = (e, t) => Vt(e) || at(e) || zt(e) || $t(e) || wa(e, t);
|
|
@@ -7225,7 +7227,7 @@ function Au(e, t) {
|
|
|
7225
7227
|
i.length === 0 ? s = l.map(zn) : n[zn(i)] = l.map(zn);
|
|
7226
7228
|
}), s ? ns(n) ? [s] : [s, n] : ns(n) ? void 0 : n;
|
|
7227
7229
|
}
|
|
7228
|
-
var
|
|
7230
|
+
var xa = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
|
|
7229
7231
|
const o = du(e);
|
|
7230
7232
|
if (!o) {
|
|
7231
7233
|
Nu(e, a, t);
|
|
@@ -7244,17 +7246,17 @@ var Ta = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
|
|
|
7244
7246
|
};
|
|
7245
7247
|
return o || l.set(e, p), p;
|
|
7246
7248
|
}
|
|
7247
|
-
if (
|
|
7249
|
+
if (Tn(i, e))
|
|
7248
7250
|
return {
|
|
7249
7251
|
transformedValue: null
|
|
7250
7252
|
};
|
|
7251
7253
|
const c = Ys(e, n), d = (c == null ? void 0 : c.value) ?? e, f = at(d) ? [] : {}, h = {};
|
|
7252
|
-
|
|
7254
|
+
kt(d, (v, p) => {
|
|
7253
7255
|
if (p === "__proto__" || p === "constructor" || p === "prototype")
|
|
7254
7256
|
throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
|
|
7255
|
-
const A =
|
|
7256
|
-
f[p] = A.transformedValue, at(A.annotations) ? h[p] = A.annotations : Vt(A.annotations) &&
|
|
7257
|
-
h[ya(p) + "." +
|
|
7257
|
+
const A = xa(v, t, n, s, [...a, p], [...i, e], l);
|
|
7258
|
+
f[p] = A.transformedValue, at(A.annotations) ? h[p] = A.annotations : Vt(A.annotations) && kt(A.annotations, (E, T) => {
|
|
7259
|
+
h[ya(p) + "." + T] = E;
|
|
7258
7260
|
});
|
|
7259
7261
|
});
|
|
7260
7262
|
const y = ns(h) ? {
|
|
@@ -7272,13 +7274,13 @@ function Ca(e) {
|
|
|
7272
7274
|
function Qs(e) {
|
|
7273
7275
|
return Ca(e) === "Array";
|
|
7274
7276
|
}
|
|
7275
|
-
function
|
|
7277
|
+
function Tu(e) {
|
|
7276
7278
|
if (Ca(e) !== "Object")
|
|
7277
7279
|
return !1;
|
|
7278
7280
|
const t = Object.getPrototypeOf(e);
|
|
7279
7281
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
7280
7282
|
}
|
|
7281
|
-
function
|
|
7283
|
+
function xu(e, t, n, s, a) {
|
|
7282
7284
|
const i = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
|
|
7283
7285
|
i === "enumerable" && (e[t] = n), a && i === "nonenumerable" && Object.defineProperty(e, t, {
|
|
7284
7286
|
value: n,
|
|
@@ -7290,14 +7292,14 @@ function Tu(e, t, n, s, a) {
|
|
|
7290
7292
|
function as(e, t = {}) {
|
|
7291
7293
|
if (Qs(e))
|
|
7292
7294
|
return e.map((a) => as(a, t));
|
|
7293
|
-
if (!
|
|
7295
|
+
if (!Tu(e))
|
|
7294
7296
|
return e;
|
|
7295
7297
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
7296
7298
|
return [...n, ...s].reduce((a, i) => {
|
|
7297
7299
|
if (Qs(t.props) && !t.props.includes(i))
|
|
7298
7300
|
return a;
|
|
7299
7301
|
const l = e[i], o = as(l, t);
|
|
7300
|
-
return
|
|
7302
|
+
return xu(a, i, o, e, t.nonenumerable), a;
|
|
7301
7303
|
}, {});
|
|
7302
7304
|
}
|
|
7303
7305
|
var de = class {
|
|
@@ -7308,7 +7310,7 @@ var de = class {
|
|
|
7308
7310
|
this.classRegistry = new Jc(), this.symbolRegistry = new fa((t) => t.description ?? ""), this.customTransformerRegistry = new nu(), this.allowedErrorProps = [], this.dedupe = e;
|
|
7309
7311
|
}
|
|
7310
7312
|
serialize(e) {
|
|
7311
|
-
const t = /* @__PURE__ */ new Map(), n =
|
|
7313
|
+
const t = /* @__PURE__ */ new Map(), n = xa(e, t, this, this.dedupe), s = {
|
|
7312
7314
|
json: n.transformedValue
|
|
7313
7315
|
};
|
|
7314
7316
|
n.annotations && (s.meta = {
|
|
@@ -7385,11 +7387,11 @@ var Ad = (e, t = !1) => {
|
|
|
7385
7387
|
json: n
|
|
7386
7388
|
} = Cu(e);
|
|
7387
7389
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
7388
|
-
}, En = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, Pu = (e, t) => e.queryHash.localeCompare(t.queryHash), Pa = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, _u = (e, t) => En(e) === En(t) ? Pa(e, t) : En(e) > En(t) ? 1 : -1,
|
|
7390
|
+
}, En = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, Pu = (e, t) => e.queryHash.localeCompare(t.queryHash), Pa = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, _u = (e, t) => En(e) === En(t) ? Pa(e, t) : En(e) > En(t) ? 1 : -1, Td = {
|
|
7389
7391
|
status: _u,
|
|
7390
7392
|
"query hash": Pu,
|
|
7391
7393
|
"last updated": Pa
|
|
7392
|
-
}, bn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, _a = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Iu = (e, t) => bn(e) === bn(t) ? _a(e, t) : bn(e) > bn(t) ? 1 : -1,
|
|
7394
|
+
}, bn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, _a = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Iu = (e, t) => bn(e) === bn(t) ? _a(e, t) : bn(e) > bn(t) ? 1 : -1, xd = {
|
|
7393
7395
|
status: Iu,
|
|
7394
7396
|
"last updated": _a
|
|
7395
7397
|
}, Cd = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Pd = () => {
|
|
@@ -7517,7 +7519,7 @@ var Ad = (e, t = !1) => {
|
|
|
7517
7519
|
const t = da(() => {
|
|
7518
7520
|
const n = this, [s] = B(this, vt), [a] = B(this, Et), [i] = B(this, bt), [l] = B(this, wt), [o] = B(this, pt);
|
|
7519
7521
|
let c;
|
|
7520
|
-
return B(this, St) ? c = B(this, St) : (c = ca(() => import("./HO4MOOFI-
|
|
7522
|
+
return B(this, St) ? c = B(this, St) : (c = ca(() => import("./HO4MOOFI-Ds8uNsOs.js")), ie(this, St, c)), Ia(B(this, Xt), B(this, yt)), la(c, oa({
|
|
7521
7523
|
get queryFlavor() {
|
|
7522
7524
|
return B(n, Yt);
|
|
7523
7525
|
},
|
|
@@ -7556,7 +7558,7 @@ var Ad = (e, t = !1) => {
|
|
|
7556
7558
|
throw new Error("Devtools is not mounted");
|
|
7557
7559
|
(e = B(this, Zt)) == null || e.call(this), ie(this, lt, !1);
|
|
7558
7560
|
}
|
|
7559
|
-
}, pt = new WeakMap(), Wt = new WeakMap(), Yt = new WeakMap(), Qt = new WeakMap(), lt = new WeakMap(), Xt = new WeakMap(), yt = new WeakMap(), vt = new WeakMap(), Et = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Zt = new WeakMap(), Xs), Nt, Jt, en, tn, ot, nn, At,
|
|
7561
|
+
}, pt = new WeakMap(), Wt = new WeakMap(), Yt = new WeakMap(), Qt = new WeakMap(), lt = new WeakMap(), Xt = new WeakMap(), yt = new WeakMap(), vt = new WeakMap(), Et = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), St = new WeakMap(), Zt = new WeakMap(), Xs), Nt, Jt, en, tn, ot, nn, At, Tt, xt, Ct, Pt, _t, It, sn, Zs, Lu = (Zs = class {
|
|
7560
7562
|
constructor(e) {
|
|
7561
7563
|
ce(this, Nt);
|
|
7562
7564
|
ce(this, Jt);
|
|
@@ -7565,8 +7567,8 @@ var Ad = (e, t = !1) => {
|
|
|
7565
7567
|
ce(this, ot, !1);
|
|
7566
7568
|
ce(this, nn);
|
|
7567
7569
|
ce(this, At);
|
|
7568
|
-
ce(this, xt);
|
|
7569
7570
|
ce(this, Tt);
|
|
7571
|
+
ce(this, xt);
|
|
7570
7572
|
ce(this, Ct);
|
|
7571
7573
|
ce(this, Pt);
|
|
7572
7574
|
ce(this, _t);
|
|
@@ -7585,13 +7587,13 @@ var Ad = (e, t = !1) => {
|
|
|
7585
7587
|
shadowDOMTarget: f,
|
|
7586
7588
|
onClose: h
|
|
7587
7589
|
} = e;
|
|
7588
|
-
ie(this, Nt, Se(t)), ie(this, en, n), ie(this, tn, s), ie(this, Jt, a), ie(this, nn, d), ie(this, At, f), ie(this,
|
|
7590
|
+
ie(this, Nt, Se(t)), ie(this, en, n), ie(this, tn, s), ie(this, Jt, a), ie(this, nn, d), ie(this, At, f), ie(this, Tt, Se(i)), ie(this, xt, Se(l)), ie(this, Ct, Se(o)), ie(this, Pt, Se(c)), ie(this, _t, Se(h));
|
|
7589
7591
|
}
|
|
7590
7592
|
setButtonPosition(e) {
|
|
7591
|
-
B(this,
|
|
7593
|
+
B(this, Tt)[1](e);
|
|
7592
7594
|
}
|
|
7593
7595
|
setPosition(e) {
|
|
7594
|
-
B(this,
|
|
7596
|
+
B(this, xt)[1](e);
|
|
7595
7597
|
}
|
|
7596
7598
|
setInitialIsOpen(e) {
|
|
7597
7599
|
B(this, Ct)[1](e);
|
|
@@ -7609,9 +7611,9 @@ var Ad = (e, t = !1) => {
|
|
|
7609
7611
|
if (B(this, ot))
|
|
7610
7612
|
throw new Error("Devtools is already mounted");
|
|
7611
7613
|
const t = da(() => {
|
|
7612
|
-
const n = this, [s] = B(this,
|
|
7614
|
+
const n = this, [s] = B(this, Tt), [a] = B(this, xt), [i] = B(this, Ct), [l] = B(this, Pt), [o] = B(this, Nt), [c] = B(this, _t);
|
|
7613
7615
|
let d;
|
|
7614
|
-
return B(this, It) ? d = B(this, It) : (d = ca(() => import("./HUY7CZI3-
|
|
7616
|
+
return B(this, It) ? d = B(this, It) : (d = ca(() => import("./HUY7CZI3-CoycOkLI.js")), ie(this, It, d)), Ia(B(this, nn), B(this, At)), la(d, oa({
|
|
7615
7617
|
get queryFlavor() {
|
|
7616
7618
|
return B(n, en);
|
|
7617
7619
|
},
|
|
@@ -7653,9 +7655,9 @@ var Ad = (e, t = !1) => {
|
|
|
7653
7655
|
throw new Error("Devtools is not mounted");
|
|
7654
7656
|
(e = B(this, sn)) == null || e.call(this), ie(this, ot, !1);
|
|
7655
7657
|
}
|
|
7656
|
-
}, Nt = new WeakMap(), Jt = new WeakMap(), en = new WeakMap(), tn = new WeakMap(), ot = new WeakMap(), nn = new WeakMap(), At = new WeakMap(),
|
|
7658
|
+
}, Nt = new WeakMap(), Jt = new WeakMap(), en = new WeakMap(), tn = new WeakMap(), ot = new WeakMap(), nn = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), xt = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), _t = new WeakMap(), It = new WeakMap(), sn = new WeakMap(), Zs);
|
|
7657
7659
|
function Du(e) {
|
|
7658
|
-
const t =
|
|
7660
|
+
const t = xe(e.client), n = ge.useRef(null), {
|
|
7659
7661
|
buttonPosition: s,
|
|
7660
7662
|
position: a,
|
|
7661
7663
|
initialIsOpen: i,
|
|
@@ -7691,7 +7693,7 @@ function Du(e) {
|
|
|
7691
7693
|
}), [d]), /* @__PURE__ */ r("div", { className: "tsqd-parent-container", ref: n });
|
|
7692
7694
|
}
|
|
7693
7695
|
function Gu(e) {
|
|
7694
|
-
const t =
|
|
7696
|
+
const t = xe(e.client), n = ge.useRef(null), { errorTypes: s, styleNonce: a, shadowDOMTarget: i } = e, [l] = ge.useState(
|
|
7695
7697
|
new Lu({
|
|
7696
7698
|
client: t,
|
|
7697
7699
|
queryFlavor: "React Query",
|
|
@@ -7729,7 +7731,7 @@ var Ru = process.env.NODE_ENV !== "development" ? function() {
|
|
|
7729
7731
|
} : Du;
|
|
7730
7732
|
process.env.NODE_ENV;
|
|
7731
7733
|
const Uu = ti(
|
|
7732
|
-
() => import("./digital-asset-manager-
|
|
7734
|
+
() => import("./digital-asset-manager-D1P-iPRq.js")
|
|
7733
7735
|
);
|
|
7734
7736
|
gl();
|
|
7735
7737
|
ac();
|
|
@@ -7743,7 +7745,7 @@ const Ou = (e) => {
|
|
|
7743
7745
|
role: "",
|
|
7744
7746
|
permissions: null
|
|
7745
7747
|
}
|
|
7746
|
-
} = $o(), { data: o } = zo(), { data: c, isFetching: d } = qr(), { blocks: f } = Vo(c), { data: h } = un(), { data: y } = De(), { mutateAsync: v } = Br(), p = Ho(), { getUILibraryBlock: A, getUILibraryBlocks: E, onSave:
|
|
7748
|
+
} = $o(), { data: o } = zo(), { data: c, isFetching: d } = qr(), { blocks: f } = Vo(c), { data: h } = un(), { data: y } = De(), { mutateAsync: v } = Br(), p = Ho(), { getUILibraryBlock: A, getUILibraryBlocks: E, onSave: T } = Wo(), { getPartialBlocks: D, getPartialBlockBlocks: S } = Yo(), { aiContext: w, setAiContext: _ } = ws(), { mutateAsync: k } = Vl(), [oe, te] = P(!1), G = W(
|
|
7747
7749
|
() => (h == null ? void 0 : h.fallbackLang) || "en",
|
|
7748
7750
|
[h]
|
|
7749
7751
|
), { data: O } = jr({
|
|
@@ -7756,13 +7758,13 @@ const Ou = (e) => {
|
|
|
7756
7758
|
};
|
|
7757
7759
|
return window.addEventListener("visibilitychange", Z), () => window.removeEventListener("visibilitychange", Z);
|
|
7758
7760
|
}, []), t.current = f;
|
|
7759
|
-
const
|
|
7761
|
+
const x = W(() => {
|
|
7760
7762
|
const Z = {};
|
|
7761
7763
|
return l && (Z.permissions = le(l, "permissions", null), Z.role = le(l, "role", "user")), Z;
|
|
7762
|
-
}, [l]), M =
|
|
7764
|
+
}, [l]), M = W(() => o, [o]), ne = Te(
|
|
7763
7765
|
async (Z, fe) => await k({ pageType: Z, query: fe }),
|
|
7764
7766
|
[k]
|
|
7765
|
-
), me =
|
|
7767
|
+
), me = W(
|
|
7766
7768
|
() => le(h, "theme", {}) || {},
|
|
7767
7769
|
[h]
|
|
7768
7770
|
);
|
|
@@ -7799,7 +7801,7 @@ const Ou = (e) => {
|
|
|
7799
7801
|
_type: "@chai/ai-context",
|
|
7800
7802
|
_value: Gs(Z) ? Z : ""
|
|
7801
7803
|
}, pe = [...fe, K];
|
|
7802
|
-
return await
|
|
7804
|
+
return await T({ page: s, blocks: pe }), _(Z), !0;
|
|
7803
7805
|
},
|
|
7804
7806
|
aiContext: w,
|
|
7805
7807
|
askAiCallBack: p,
|
|
@@ -7810,10 +7812,10 @@ const Ou = (e) => {
|
|
|
7810
7812
|
_type: "@chai/ai-context",
|
|
7811
7813
|
_value: Gs(w) ? w : ""
|
|
7812
7814
|
}, pe = [...Z, K];
|
|
7813
|
-
return await
|
|
7815
|
+
return await T({ page: s, blocks: pe }), t.current = pe, is(fe, me) || await v({ settings: { theme: fe } }), !0;
|
|
7814
7816
|
},
|
|
7815
7817
|
themePanelComponent: eo,
|
|
7816
|
-
...
|
|
7818
|
+
...x
|
|
7817
7819
|
}
|
|
7818
7820
|
),
|
|
7819
7821
|
/* @__PURE__ */ u("div", { children: [
|
|
@@ -7848,11 +7850,11 @@ const Ou = (e) => {
|
|
|
7848
7850
|
/* @__PURE__ */ r(Ru, {})
|
|
7849
7851
|
] }) : /* @__PURE__ */ r("div", {});
|
|
7850
7852
|
}, Id = () => {
|
|
7851
|
-
const { user: e } = nt(), t =
|
|
7853
|
+
const { user: e } = nt(), t = W(
|
|
7852
7854
|
() => e == null ? void 0 : e.accessToken,
|
|
7853
7855
|
[e == null ? void 0 : e.accessToken]
|
|
7854
7856
|
), { refetch: n } = Ur();
|
|
7855
|
-
return
|
|
7857
|
+
return Te(
|
|
7856
7858
|
async ({
|
|
7857
7859
|
url: s,
|
|
7858
7860
|
method: a = "GET",
|
|
@@ -7912,7 +7914,7 @@ export {
|
|
|
7912
7914
|
ed as W,
|
|
7913
7915
|
X,
|
|
7914
7916
|
I as Y,
|
|
7915
|
-
|
|
7917
|
+
z as Z,
|
|
7916
7918
|
_d as _,
|
|
7917
7919
|
la as a,
|
|
7918
7920
|
Me as a0,
|
|
@@ -7932,18 +7934,18 @@ export {
|
|
|
7932
7934
|
ta as e,
|
|
7933
7935
|
oa as f,
|
|
7934
7936
|
Pd as g,
|
|
7935
|
-
|
|
7937
|
+
xc as h,
|
|
7936
7938
|
id as i,
|
|
7937
7939
|
ut as j,
|
|
7938
7940
|
Jn as k,
|
|
7939
7941
|
od as l,
|
|
7940
|
-
|
|
7942
|
+
xd as m,
|
|
7941
7943
|
jt as n,
|
|
7942
7944
|
sd as o,
|
|
7943
7945
|
fc as p,
|
|
7944
7946
|
zc as q,
|
|
7945
7947
|
es as r,
|
|
7946
|
-
|
|
7948
|
+
Td as s,
|
|
7947
7949
|
fd as t,
|
|
7948
7950
|
ld as u,
|
|
7949
7951
|
qc as v,
|