@chaibuilder/pages 0.4.9-beta.4 → 0.4.9-beta.6
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-CWm1-ws5.js → B4MFY5CR-CKuYBA61.js} +1 -1
- package/dist/{B4MFY5CR-BM1hdUqj.cjs → B4MFY5CR-DqDmqUc2.cjs} +1 -1
- package/dist/{HO4MOOFI-xwFJgXgx.js → HO4MOOFI-Be7ATNM5.js} +2 -2
- package/dist/{HO4MOOFI-CnRR2GBG.cjs → HO4MOOFI-Sba3R_Oh.cjs} +1 -1
- package/dist/{HUY7CZI3-BydHz5ev.cjs → HUY7CZI3-7dalD-9B.cjs} +1 -1
- package/dist/{HUY7CZI3-DTaJjjSa.js → HUY7CZI3-DjUkpQI6.js} +2 -2
- package/dist/{digital-asset-manager-ya1xEWdk.cjs → digital-asset-manager-DxVW1chU.cjs} +1 -1
- package/dist/{digital-asset-manager-2IyrrYZ6.js → digital-asset-manager-ZaGekAia.js} +1 -1
- package/dist/{index-DzHZPAjK.cjs → index-BDMDJ699.cjs} +2 -2
- package/dist/{index-BpwQFwgB.js → index-CCq5Jslo.js} +738 -735
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -4,19 +4,19 @@ var ks = (e) => {
|
|
|
4
4
|
var Ls = (e, t, n) => t.has(e) || ks("Cannot " + n);
|
|
5
5
|
var R = (e, t, n) => (Ls(e, t, "read from private field"), n ? n.call(e) : t.get(e)), re = (e, t, n) => t.has(e) ? ks("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), te = (e, t, n, s) => (Ls(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 we } from "react/jsx-runtime";
|
|
7
|
-
import {
|
|
8
|
-
import { useAtom as Dn, atom as ls } from "jotai";
|
|
7
|
+
import { get as ne, isEmpty as me, reverse as Ra, sortBy as Oa, each as Ba, find as ge, set as Ma, has as nn, startsWith as Rt, isEqual as is, map as Fe, toLower as Dt, trim as Fa, filter as Ce, startCase as It, groupBy as qa, compact as Nn, includes as Mt, concat as Zs, endsWith as Js, orderBy as mn, first as Ha, uniq as Ka, debounce as ja, pick as er, keys as Va, pickBy as $a, isArray as za, cloneDeep as Wa, isString as Ds } from "lodash-es";
|
|
9
8
|
import * as ue from "react";
|
|
10
|
-
import tr, {
|
|
11
|
-
import {
|
|
9
|
+
import tr, { useCallback as Pe, useMemo as z, useState as P, useEffect as Se, useRef as ut, Suspense as Ya, lazy as Qa } from "react";
|
|
10
|
+
import { useAtom as Dn, atom as ls } from "jotai";
|
|
11
|
+
import { useQueryClient as Ne, useQuery as Ae, useMutation as xe, onlineManager as nr, QueryClient as Xa, QueryClientProvider as Za } from "@tanstack/react-query";
|
|
12
12
|
import { toast as $ } from "sonner";
|
|
13
|
-
import { useLanguages as dt, useUpdateBlocksPropsRealtime as sr, PERMISSIONS as
|
|
14
|
-
import { Card as os, CardHeader as cs, CardTitle as us, CardContent as ds, CardFooter as hs, Button as _, 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 ve, Label as Z, Dialog as He, DialogContent as Ke, DialogHeader as
|
|
15
|
-
import { LockIcon as Nr, UserIcon as
|
|
16
|
-
import { format as Gn, formatDistanceToNow as
|
|
17
|
-
import { useRegisteredChaiBlocks as
|
|
13
|
+
import { useLanguages as dt, useUpdateBlocksPropsRealtime as sr, PERMISSIONS as Ja, usePartailBlocksStore as ei, usePermissions as sn, useLibraryBlocks as ti, useTheme as ni, mergeClasses as si, useSavePage as rr, useRightPanel as ri, useBlocksStore as ai, getBlocksFromHTML as ii, useTranslation as li, useSidebarActivePanel as oi, registerChaiSidebarPanel as zn, registerChaiTopBar as ci, registerChaiMediaManager as ui, registerChaiSaveToLibrary as di, ChaiBuilderEditor as hi } from "@chaibuilder/sdk";
|
|
14
|
+
import { Card as os, CardHeader as cs, CardTitle as us, CardContent as ds, CardFooter as hs, Button as _, 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 ve, Label as Z, Dialog as He, DialogContent as Ke, DialogHeader as je, DialogTitle as Ve, DialogDescription as Ye, Alert as yr, DialogFooter as et, DropdownMenu as rn, DropdownMenuTrigger as an, DropdownMenuContent as ln, DropdownMenuItem as De, Textarea as Gt, Select as mi, SelectTrigger as fi, SelectValue as gi, SelectContent as pi, SelectItem as yi, Badge as qn, Sheet as vr, SheetContent as Er, SheetHeader as br, SheetTitle as wr, Separator as vi, TooltipProvider as Sr, Tooltip as ms, SheetTrigger as Ei, TooltipTrigger as fs, ScrollArea as bi, TooltipContent as gs, Skeleton as fn, DropdownMenuSeparator as wi, CardDescription as Si, Command as Ni, CommandInput as Ai, CommandList as xi, CommandEmpty as Ti, CommandGroup as Ci, CommandItem as Gs, AlertDescription as Pi, Accordion as _i, AccordionItem as gn, AccordionTrigger as pn, AccordionContent as yn, HoverCard as Ii, HoverCardTrigger as ki, HoverCardContent as Li } from "@chaibuilder/sdk/ui";
|
|
15
|
+
import { LockIcon as Nr, UserIcon as Di, AlertTriangleIcon as Gi, Trash2 as Ar, Plus as ps, ImageIcon as xr, X as Tr, AlertCircle as Cr, StarIcon as Ui, MoreHorizontal as ys, PencilIcon as Ri, Power as Pr, TrashIcon as Oi, Tag as Bi, File as on, Search as Mi, StarsIcon as Fi, Globe as qi, Pencil as Hi, Trash as vs, SquareLibrary as Us, Logs as Ki, Loader as _r, Languages as ji, ChevronDown as Ir, Star as Vi, History as Rs, ArrowUpRight as $i, Clock as zi, Undo2 as kr, CloudOff as Wi, Edit as Yi, Save as Lr, GlobeIcon as Qi, Eye as Dr, Palette as Xi, CheckCircle as Zi, Send as Os, Rocket as Bs, Settings as Ji, ExternalLink as el, EyeOff as tl, Loader2 as Gr, LanguagesIcon as nl, DatabaseIcon as sl, ChevronLeft as rl, ChevronRight as al, User as il } from "lucide-react";
|
|
16
|
+
import { format as Gn, formatDistanceToNow as ll } from "date-fns";
|
|
17
|
+
import { useRegisteredChaiBlocks as ol, getDefaultBlockProps as cl } from "@chaibuilder/runtime";
|
|
18
18
|
import { z as An } from "zod";
|
|
19
|
-
import { loadWebBlocks as
|
|
19
|
+
import { loadWebBlocks as ul } from "@chaibuilder/sdk/web-blocks";
|
|
20
20
|
const qe = {
|
|
21
21
|
ab: "Abkhazian",
|
|
22
22
|
aa: "Afar",
|
|
@@ -252,29 +252,29 @@ const qe = {
|
|
|
252
252
|
DELETE_ASSET: "DELETE_ASSET",
|
|
253
253
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
254
254
|
GET_ASSETS: "GET_ASSETS"
|
|
255
|
-
},
|
|
256
|
-
let
|
|
255
|
+
}, j = "chaibuilder";
|
|
256
|
+
let dl = 0;
|
|
257
257
|
function Ms(e, t) {
|
|
258
|
-
const n = `atom${++
|
|
258
|
+
const n = `atom${++dl}`, s = {
|
|
259
259
|
toString() {
|
|
260
260
|
return n;
|
|
261
261
|
}
|
|
262
262
|
};
|
|
263
|
-
return typeof e == "function" ? s.read = e : (s.init = e, s.read =
|
|
263
|
+
return typeof e == "function" ? s.read = e : (s.init = e, s.read = hl, s.write = ml), t && (s.write = t), s;
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function hl(e) {
|
|
266
266
|
return e(this);
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function ml(e, t, n) {
|
|
269
269
|
return t(
|
|
270
270
|
this,
|
|
271
271
|
typeof n == "function" ? n(e(this)) : n
|
|
272
272
|
);
|
|
273
273
|
}
|
|
274
|
-
const
|
|
274
|
+
const fl = Symbol(
|
|
275
275
|
""
|
|
276
|
-
),
|
|
277
|
-
function
|
|
276
|
+
), gl = (e) => typeof (e == null ? void 0 : e.then) == "function";
|
|
277
|
+
function pl(e = () => {
|
|
278
278
|
try {
|
|
279
279
|
return window.localStorage;
|
|
280
280
|
} catch {
|
|
@@ -297,7 +297,7 @@ function vl(e = () => {
|
|
|
297
297
|
}
|
|
298
298
|
return a;
|
|
299
299
|
}, y = (d = (g = e()) == null ? void 0 : g.getItem(c)) != null ? d : null;
|
|
300
|
-
return
|
|
300
|
+
return gl(y) ? y.then(E) : E(y);
|
|
301
301
|
},
|
|
302
302
|
setItem: (c, h) => {
|
|
303
303
|
var g;
|
|
@@ -336,8 +336,8 @@ function vl(e = () => {
|
|
|
336
336
|
};
|
|
337
337
|
}), o && (i.subscribe = l(o)), i;
|
|
338
338
|
}
|
|
339
|
-
const
|
|
340
|
-
function
|
|
339
|
+
const yl = pl();
|
|
340
|
+
function vl(e, t, n = yl, s) {
|
|
341
341
|
const a = Ms(
|
|
342
342
|
t
|
|
343
343
|
);
|
|
@@ -349,22 +349,22 @@ function bl(e, t, n = El, s) {
|
|
|
349
349
|
(l) => l(a),
|
|
350
350
|
(l, o, c) => {
|
|
351
351
|
const h = typeof c == "function" ? c(l(a)) : c;
|
|
352
|
-
return h ===
|
|
352
|
+
return h === fl ? (o(a, t), n.removeItem(e)) : h instanceof Promise ? h.then((g) => (o(a, g), n.setItem(e, g))) : (o(a, h), n.setItem(e, h));
|
|
353
353
|
}
|
|
354
354
|
);
|
|
355
355
|
}
|
|
356
|
-
const
|
|
357
|
-
const [e, t] = Dn(
|
|
356
|
+
const El = vl("__chai__user", null), st = () => {
|
|
357
|
+
const [e, t] = Dn(El), n = Pe(() => {
|
|
358
|
+
t(null);
|
|
359
|
+
}, [t]);
|
|
358
360
|
return {
|
|
359
361
|
isLoggedIn: !!e,
|
|
360
362
|
user: e,
|
|
361
363
|
setUser: t,
|
|
362
|
-
logout:
|
|
363
|
-
t(null), Oa(n) && n();
|
|
364
|
-
}
|
|
364
|
+
logout: n
|
|
365
365
|
};
|
|
366
|
-
},
|
|
367
|
-
const { user: e, setUser: t, logout: n } =
|
|
366
|
+
}, bl = () => {
|
|
367
|
+
const { user: e, setUser: t, logout: n } = st(), s = Un(), a = Ne();
|
|
368
368
|
return Ae({
|
|
369
369
|
queryKey: ["refresh_token"],
|
|
370
370
|
queryFn: async () => {
|
|
@@ -385,7 +385,7 @@ const wl = bl("__chai_user", null), rt = () => {
|
|
|
385
385
|
if (i.ok) {
|
|
386
386
|
const l = await i.json();
|
|
387
387
|
t(l), a.invalidateQueries({
|
|
388
|
-
queryKey: [
|
|
388
|
+
queryKey: [j],
|
|
389
389
|
refetchType: "all"
|
|
390
390
|
});
|
|
391
391
|
} else
|
|
@@ -411,12 +411,12 @@ if (import.meta.vitest) {
|
|
|
411
411
|
t(n).toBeDefined();
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
|
-
const
|
|
415
|
-
const { user: e } =
|
|
414
|
+
const Wu = () => {
|
|
415
|
+
const { user: e } = st(), t = rt("onSessionExpired"), n = z(
|
|
416
416
|
() => e == null ? void 0 : e.accessToken,
|
|
417
417
|
[e == null ? void 0 : e.accessToken]
|
|
418
418
|
);
|
|
419
|
-
return
|
|
419
|
+
return Pe(
|
|
420
420
|
async (s, a, i = {}) => {
|
|
421
421
|
if (!n) {
|
|
422
422
|
console.log("no auth token");
|
|
@@ -443,12 +443,12 @@ const Qu = () => {
|
|
|
443
443
|
},
|
|
444
444
|
[n, t]
|
|
445
445
|
);
|
|
446
|
-
},
|
|
447
|
-
const { user: e } =
|
|
446
|
+
}, W = () => {
|
|
447
|
+
const { user: e } = st(), t = z(
|
|
448
448
|
() => e == null ? void 0 : e.accessToken,
|
|
449
449
|
[e == null ? void 0 : e.accessToken]
|
|
450
|
-
), { refetch: n } =
|
|
451
|
-
return
|
|
450
|
+
), { refetch: n } = bl();
|
|
451
|
+
return Pe(
|
|
452
452
|
async (s, a, i = {}) => {
|
|
453
453
|
if (t)
|
|
454
454
|
try {
|
|
@@ -470,17 +470,17 @@ const Qu = () => {
|
|
|
470
470
|
[t, n]
|
|
471
471
|
);
|
|
472
472
|
}, Ur = () => {
|
|
473
|
-
const e = X(), t = Ne(), n =
|
|
473
|
+
const e = X(), t = Ne(), n = W();
|
|
474
474
|
return xe({
|
|
475
475
|
mutationFn: async (s) => n(e, { action: I.RELEASE_LOCK, data: s }),
|
|
476
476
|
onSuccess: () => {
|
|
477
477
|
t.invalidateQueries({
|
|
478
|
-
queryKey: [
|
|
478
|
+
queryKey: [j, I.GET_DRAFT_PAGE]
|
|
479
479
|
});
|
|
480
480
|
}
|
|
481
481
|
});
|
|
482
482
|
}, Rr = () => {
|
|
483
|
-
const e = X(), t = Ne(), n =
|
|
483
|
+
const e = X(), t = Ne(), n = W();
|
|
484
484
|
return xe({
|
|
485
485
|
mutationFn: async (s) => n(e, {
|
|
486
486
|
action: I.UPDATE_WEBSITE_SETTINGS,
|
|
@@ -489,7 +489,7 @@ const Qu = () => {
|
|
|
489
489
|
onSuccess: (s, a) => {
|
|
490
490
|
var i;
|
|
491
491
|
t.invalidateQueries({
|
|
492
|
-
queryKey: [
|
|
492
|
+
queryKey: [j, I.GET_WEBSITE_DRAFT_SETTINGS]
|
|
493
493
|
}), (i = a == null ? void 0 : a.settings) != null && i.theme || $.success("Website settings updated successfully.");
|
|
494
494
|
},
|
|
495
495
|
onError: (s) => {
|
|
@@ -498,13 +498,13 @@ const Qu = () => {
|
|
|
498
498
|
});
|
|
499
499
|
}
|
|
500
500
|
});
|
|
501
|
-
},
|
|
502
|
-
const e = X(), t = Ne(), n =
|
|
501
|
+
}, wl = () => {
|
|
502
|
+
const e = X(), t = Ne(), n = W();
|
|
503
503
|
return xe({
|
|
504
504
|
mutationFn: async (s) => n(e, { action: I.UPDATE_WEBSITE_DATA, data: s }),
|
|
505
505
|
onSuccess: () => {
|
|
506
506
|
t.invalidateQueries({
|
|
507
|
-
queryKey: [
|
|
507
|
+
queryKey: [j, I.GET_WEBSITE_DATA]
|
|
508
508
|
}), $.success("Website data updated successfully.");
|
|
509
509
|
},
|
|
510
510
|
onError: (s) => {
|
|
@@ -527,18 +527,21 @@ function Ue() {
|
|
|
527
527
|
};
|
|
528
528
|
}, []), [e, t];
|
|
529
529
|
}
|
|
530
|
-
const
|
|
530
|
+
const Sl = ls({}), Or = () => Dn(Sl), Nl = () => {
|
|
531
531
|
const [e] = Ue(), t = e.get("page"), n = ut(""), { mutate: s } = Ur();
|
|
532
532
|
Se(() => {
|
|
533
533
|
!me(n.current) && t !== n.current && s({ id: n.current }), n.current = t;
|
|
534
534
|
}, [t, s, n]);
|
|
535
|
-
},
|
|
535
|
+
}, rt = (e, t) => {
|
|
536
536
|
const [n] = Or();
|
|
537
|
-
return
|
|
538
|
-
|
|
539
|
-
|
|
537
|
+
return z(
|
|
538
|
+
() => ne(n, e, t),
|
|
539
|
+
[n, e, t]
|
|
540
|
+
);
|
|
541
|
+
}, X = () => rt("apiUrl", "/chai/api"), Un = () => rt("usersApiUrl", "/chai/users"), Yu = () => rt("assetsApiUrl", "/chai/assets"), cn = () => {
|
|
542
|
+
const e = X(), [t] = Ue(), n = t.get("page"), s = W();
|
|
540
543
|
return Ae({
|
|
541
|
-
queryKey: [
|
|
544
|
+
queryKey: [j, I.GET_LANGUAGE_PAGES, n],
|
|
542
545
|
initialData: [],
|
|
543
546
|
queryFn: async () => {
|
|
544
547
|
if (!n) return null;
|
|
@@ -546,12 +549,12 @@ const Al = ls({}), Or = () => Dn(Al), xl = () => {
|
|
|
546
549
|
action: I.GET_LANGUAGE_PAGES,
|
|
547
550
|
data: { id: n }
|
|
548
551
|
});
|
|
549
|
-
return
|
|
552
|
+
return Ra(Oa(a, "primaryPage"));
|
|
550
553
|
},
|
|
551
554
|
enabled: !!n
|
|
552
555
|
});
|
|
553
556
|
}, un = () => {
|
|
554
|
-
const e = X(), t =
|
|
557
|
+
const e = X(), t = W();
|
|
555
558
|
return Ae({
|
|
556
559
|
queryKey: [I.GET_WEBSITE_DRAFT_SETTINGS],
|
|
557
560
|
initialData: {
|
|
@@ -565,9 +568,9 @@ const Al = ls({}), Or = () => Dn(Al), xl = () => {
|
|
|
565
568
|
})
|
|
566
569
|
});
|
|
567
570
|
}, Br = (e) => {
|
|
568
|
-
const { fallbackLang: t } = dt(), { data: n } = un(), { data: s, isFetching: a } = cn(), i =
|
|
571
|
+
const { fallbackLang: t } = dt(), { data: n } = un(), { data: s, isFetching: a } = cn(), i = z(() => {
|
|
569
572
|
const l = { [t]: !0 };
|
|
570
|
-
return
|
|
573
|
+
return Ba(ne(n, "languages"), (o) => {
|
|
571
574
|
const c = ge(s, { lang: o });
|
|
572
575
|
l[o] = !!c;
|
|
573
576
|
}), l;
|
|
@@ -579,46 +582,46 @@ const Al = ls({}), Or = () => Dn(Al), xl = () => {
|
|
|
579
582
|
initialData: "",
|
|
580
583
|
queryFn: () => ""
|
|
581
584
|
});
|
|
582
|
-
return { setAiContext:
|
|
585
|
+
return { setAiContext: Pe(
|
|
583
586
|
(s) => {
|
|
584
587
|
e.setQueryData([I.AI_CONTEXT], s);
|
|
585
588
|
},
|
|
586
589
|
[e]
|
|
587
590
|
), aiContext: t };
|
|
588
591
|
}, Rn = () => {
|
|
589
|
-
const e =
|
|
592
|
+
const e = W(), t = X();
|
|
590
593
|
return Ae({
|
|
591
|
-
queryKey: [
|
|
594
|
+
queryKey: [j, I.GET_WEBSITE_PAGES],
|
|
592
595
|
staleTime: 1e3 * 60 * 5,
|
|
593
596
|
queryFn: async () => e(t, { action: I.GET_WEBSITE_PAGES }) || []
|
|
594
597
|
});
|
|
595
|
-
},
|
|
598
|
+
}, Al = ls({ lastSaved: void 0 }), ws = () => Dn(Al), Re = () => {
|
|
596
599
|
const [e] = Ue(), t = e.get("page"), { data: n, isFetching: s } = Rn();
|
|
597
|
-
return { data:
|
|
600
|
+
return { data: z(
|
|
598
601
|
() => ge(n, { id: t }) || {},
|
|
599
602
|
[n, t]
|
|
600
603
|
), isFetching: s };
|
|
601
604
|
}, dn = (e) => {
|
|
602
|
-
const t = Un(), n =
|
|
605
|
+
const t = Un(), n = W();
|
|
603
606
|
return Ae({
|
|
604
|
-
queryKey: [
|
|
607
|
+
queryKey: [j, "chaiUserInfo", e],
|
|
605
608
|
queryFn: async () => await n(t, {
|
|
606
609
|
action: I.GET_CHAI_USER,
|
|
607
610
|
data: { userId: e }
|
|
608
611
|
}),
|
|
609
612
|
enabled: !!e && e !== "EXPIRED"
|
|
610
613
|
});
|
|
611
|
-
},
|
|
612
|
-
const [e] = Ue(), t = e.get("page"), { user: n } =
|
|
613
|
-
return
|
|
614
|
+
}, xl = ls(void 0), hn = () => {
|
|
615
|
+
const [e] = Ue(), t = e.get("page"), { user: n } = st(), [s, a] = Dn(xl);
|
|
616
|
+
return z(() => ({
|
|
614
617
|
isLocked: t && (n == null ? void 0 : n.id) !== s,
|
|
615
618
|
currentEditor: s,
|
|
616
619
|
setCurrentEditor: (i) => a(i)
|
|
617
620
|
}), [n == null ? void 0 : n.id, s, t, a]);
|
|
618
621
|
}, Mr = () => {
|
|
619
|
-
const [e] = Ue(), t = e.get("page"), n = X(), { setAiContext: s } = bs(), { setCurrentEditor: a } = hn(), [, i] = ws(), l =
|
|
622
|
+
const [e] = Ue(), t = e.get("page"), n = X(), { setAiContext: s } = bs(), { setCurrentEditor: a } = hn(), [, i] = ws(), l = W();
|
|
620
623
|
return Ae({
|
|
621
|
-
queryKey: [
|
|
624
|
+
queryKey: [j, I.GET_DRAFT_PAGE, t],
|
|
622
625
|
staleTime: 1 / 0,
|
|
623
626
|
gcTime: 1 / 0,
|
|
624
627
|
queryFn: async () => {
|
|
@@ -637,9 +640,9 @@ const Al = ls({}), Or = () => Dn(Al), xl = () => {
|
|
|
637
640
|
pageType: e,
|
|
638
641
|
lang: t
|
|
639
642
|
}) => {
|
|
640
|
-
const n = X(), s =
|
|
643
|
+
const n = X(), s = W();
|
|
641
644
|
return Ae({
|
|
642
|
-
queryKey: [
|
|
645
|
+
queryKey: [j, I.GET_BUILDER_PAGE_DATA, e, t],
|
|
643
646
|
initialData: {},
|
|
644
647
|
queryFn: async () => s(n, {
|
|
645
648
|
action: I.GET_BUILDER_PAGE_DATA,
|
|
@@ -648,7 +651,7 @@ const Al = ls({}), Or = () => Dn(Al), xl = () => {
|
|
|
648
651
|
enabled: !!e && !!t
|
|
649
652
|
});
|
|
650
653
|
};
|
|
651
|
-
function
|
|
654
|
+
function Tl({
|
|
652
655
|
avatar: e,
|
|
653
656
|
name: t,
|
|
654
657
|
email: n,
|
|
@@ -670,7 +673,7 @@ function Pl({
|
|
|
670
673
|
alt: t,
|
|
671
674
|
className: "w-12 h-12 border border-gray-300 rounded-full"
|
|
672
675
|
}
|
|
673
|
-
) : /* @__PURE__ */ r(
|
|
676
|
+
) : /* @__PURE__ */ r(Di, { className: "w-12 h-12 p-2 border border-gray-300 rounded-full" }),
|
|
674
677
|
/* @__PURE__ */ u("div", { className: "space-y-1", children: [
|
|
675
678
|
/* @__PURE__ */ r("h3", { className: "font-semibold", children: t }),
|
|
676
679
|
n && /* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground", children: n })
|
|
@@ -696,7 +699,7 @@ function Pl({
|
|
|
696
699
|
/* @__PURE__ */ r(cr, { children: "Are you sure you want to take over?" }),
|
|
697
700
|
/* @__PURE__ */ u(ur, { children: [
|
|
698
701
|
/* @__PURE__ */ u("span", { className: "flex items-center space-x-2 text-yellow-500", children: [
|
|
699
|
-
/* @__PURE__ */ r(
|
|
702
|
+
/* @__PURE__ */ r(Gi, { className: "w-5 h-5" }),
|
|
700
703
|
/* @__PURE__ */ r("span", { children: "This action might cause the other user to lose unsaved changes." })
|
|
701
704
|
] }),
|
|
702
705
|
/* @__PURE__ */ r("br", {}),
|
|
@@ -717,12 +720,12 @@ function Pl({
|
|
|
717
720
|
] }) })
|
|
718
721
|
] }) });
|
|
719
722
|
}
|
|
720
|
-
const
|
|
721
|
-
const { isLocked: e, currentEditor: t } = hn(), { data: n } = dn(t), [s] = Ue(), a = s.get("page"), { mutate: i } = Ur(), { isFetching: l } = Mr(), o =
|
|
723
|
+
const Cl = () => {
|
|
724
|
+
const { isLocked: e, currentEditor: t } = hn(), { data: n } = dn(t), [s] = Ue(), a = s.get("page"), { mutate: i } = Ur(), { isFetching: l } = Mr(), o = Pe(() => {
|
|
722
725
|
i({ id: a });
|
|
723
726
|
}, [a, i]);
|
|
724
727
|
return !e || l ? /* @__PURE__ */ r("div", { className: "" }) : /* @__PURE__ */ r(
|
|
725
|
-
|
|
728
|
+
Tl,
|
|
726
729
|
{
|
|
727
730
|
...n,
|
|
728
731
|
name: (n == null ? void 0 : n.name) || "Unknown User",
|
|
@@ -731,7 +734,7 @@ const _l = () => {
|
|
|
731
734
|
onTakeOver: o
|
|
732
735
|
}
|
|
733
736
|
);
|
|
734
|
-
},
|
|
737
|
+
}, Pl = () => {
|
|
735
738
|
const [e, t] = Ue(), n = e.get("lang"), s = Br(n), { setSelectedLang: a } = dt(), i = () => {
|
|
736
739
|
const o = new URLSearchParams(window.location.search);
|
|
737
740
|
o.delete("lang");
|
|
@@ -764,8 +767,8 @@ const _l = () => {
|
|
|
764
767
|
}
|
|
765
768
|
) })
|
|
766
769
|
] }) });
|
|
767
|
-
},
|
|
768
|
-
const t = X(), n =
|
|
770
|
+
}, _l = (e) => {
|
|
771
|
+
const t = X(), n = W();
|
|
769
772
|
return xe({
|
|
770
773
|
mutationFn: async (s) => n(t, {
|
|
771
774
|
action: I.UPSERT_LIBRARY_ITEM,
|
|
@@ -780,10 +783,10 @@ const _l = () => {
|
|
|
780
783
|
});
|
|
781
784
|
}
|
|
782
785
|
});
|
|
783
|
-
},
|
|
784
|
-
const t = X(), n =
|
|
786
|
+
}, Il = (e) => {
|
|
787
|
+
const t = X(), n = W();
|
|
785
788
|
return Ae({
|
|
786
|
-
queryKey: [
|
|
789
|
+
queryKey: [j, "uiBlockDetails", e],
|
|
787
790
|
enabled: !!e,
|
|
788
791
|
// Only run query if blockId is provided
|
|
789
792
|
queryFn: async () => {
|
|
@@ -801,8 +804,8 @@ const _l = () => {
|
|
|
801
804
|
},
|
|
802
805
|
retry: !1
|
|
803
806
|
});
|
|
804
|
-
},
|
|
805
|
-
const t = X(), n =
|
|
807
|
+
}, kl = (e) => {
|
|
808
|
+
const t = X(), n = W();
|
|
806
809
|
return xe({
|
|
807
810
|
mutationFn: async (s) => n(t, {
|
|
808
811
|
action: I.DELETE_LIBRARY_ITEM,
|
|
@@ -817,7 +820,7 @@ const _l = () => {
|
|
|
817
820
|
});
|
|
818
821
|
}
|
|
819
822
|
});
|
|
820
|
-
},
|
|
823
|
+
}, Ll = ({
|
|
821
824
|
blockId: e,
|
|
822
825
|
libBlockId: t,
|
|
823
826
|
isOpen: n,
|
|
@@ -825,7 +828,7 @@ const _l = () => {
|
|
|
825
828
|
blockName: a,
|
|
826
829
|
trigger: i
|
|
827
830
|
}) => {
|
|
828
|
-
const [l, o] = P(!1), c = sr(), h =
|
|
831
|
+
const [l, o] = P(!1), c = sr(), h = kl(() => {
|
|
829
832
|
c([e], { _libBlockId: void 0 }), $.success("Block deleted successfully"), o(!1), s();
|
|
830
833
|
});
|
|
831
834
|
return /* @__PURE__ */ u(fr, { open: n, onOpenChange: (E) => !E && s(), children: [
|
|
@@ -891,7 +894,7 @@ const _l = () => {
|
|
|
891
894
|
}
|
|
892
895
|
)
|
|
893
896
|
] });
|
|
894
|
-
},
|
|
897
|
+
}, Dl = ({
|
|
895
898
|
blockId: e,
|
|
896
899
|
libBlockId: t,
|
|
897
900
|
blockName: n,
|
|
@@ -901,7 +904,7 @@ const _l = () => {
|
|
|
901
904
|
}) => {
|
|
902
905
|
const [l, o] = P(!1);
|
|
903
906
|
return /* @__PURE__ */ r(
|
|
904
|
-
|
|
907
|
+
Ll,
|
|
905
908
|
{
|
|
906
909
|
blockId: e,
|
|
907
910
|
libBlockId: t,
|
|
@@ -926,13 +929,13 @@ const _l = () => {
|
|
|
926
929
|
)
|
|
927
930
|
}
|
|
928
931
|
);
|
|
929
|
-
},
|
|
930
|
-
const e = X(), t =
|
|
932
|
+
}, Gl = () => {
|
|
933
|
+
const e = X(), t = W(), n = Ne(), {
|
|
931
934
|
data: s = [],
|
|
932
935
|
isLoading: a,
|
|
933
936
|
error: i
|
|
934
937
|
} = Ae({
|
|
935
|
-
queryKey: [
|
|
938
|
+
queryKey: [j, "library-groups"],
|
|
936
939
|
queryFn: async () => {
|
|
937
940
|
try {
|
|
938
941
|
return await t(e, {
|
|
@@ -954,7 +957,7 @@ const _l = () => {
|
|
|
954
957
|
},
|
|
955
958
|
onSuccess: () => {
|
|
956
959
|
n.invalidateQueries({
|
|
957
|
-
queryKey: [
|
|
960
|
+
queryKey: [j, "library-groups"]
|
|
958
961
|
}), $.success("Group created successfully");
|
|
959
962
|
},
|
|
960
963
|
onError: (c) => {
|
|
@@ -970,8 +973,8 @@ const _l = () => {
|
|
|
970
973
|
createGroup: l,
|
|
971
974
|
isCreating: o
|
|
972
975
|
};
|
|
973
|
-
},
|
|
974
|
-
const [n, s] = P(!1), [a, i] = P(""), l = ut(null), { groups: o } =
|
|
976
|
+
}, Ul = ({ value: e, onChange: t }) => {
|
|
977
|
+
const [n, s] = P(!1), [a, i] = P(""), l = ut(null), { groups: o } = Gl(), [c, h] = P([
|
|
975
978
|
{ id: "hero", name: "Hero" },
|
|
976
979
|
{ id: "feature", name: "Feature" },
|
|
977
980
|
{ id: "footer", name: "Footer" },
|
|
@@ -999,7 +1002,7 @@ const _l = () => {
|
|
|
999
1002
|
{ id: "stats", name: "Stats" },
|
|
1000
1003
|
{ id: "team", name: "Team" },
|
|
1001
1004
|
{ id: "timeline", name: "Timeline" }
|
|
1002
|
-
]), g =
|
|
1005
|
+
]), g = z(
|
|
1003
1006
|
() => [
|
|
1004
1007
|
...o,
|
|
1005
1008
|
...c.filter(
|
|
@@ -1073,13 +1076,13 @@ const _l = () => {
|
|
|
1073
1076
|
}
|
|
1074
1077
|
)
|
|
1075
1078
|
] });
|
|
1076
|
-
},
|
|
1077
|
-
const [n, s] = P(!1), a = ut(null), i =
|
|
1079
|
+
}, Rl = 1 * 1024 * 1024, Ol = ({ value: e, onChange: t }) => {
|
|
1080
|
+
const [n, s] = P(!1), a = ut(null), i = Pe(
|
|
1078
1081
|
(c) => {
|
|
1079
1082
|
var g;
|
|
1080
1083
|
const h = (g = c.target.files) == null ? void 0 : g[0];
|
|
1081
1084
|
if (h) {
|
|
1082
|
-
if (h.size >
|
|
1085
|
+
if (h.size > Rl) {
|
|
1083
1086
|
$.error("File too large", {
|
|
1084
1087
|
description: `Maximum file size is 1mb. Selected file is ${(h.size / 1024 / 1024).toFixed(2)}MB.`
|
|
1085
1088
|
}), a.current && (a.current.value = "");
|
|
@@ -1155,7 +1158,7 @@ const _l = () => {
|
|
|
1155
1158
|
) })
|
|
1156
1159
|
] });
|
|
1157
1160
|
}, de = {
|
|
1158
|
-
...
|
|
1161
|
+
...Ja,
|
|
1159
1162
|
//pages
|
|
1160
1163
|
ADD_PAGE: "add_page",
|
|
1161
1164
|
EDIT_PAGE: "edit_page",
|
|
@@ -1190,15 +1193,15 @@ const _l = () => {
|
|
|
1190
1193
|
ADD_MEDIA: "add_media",
|
|
1191
1194
|
EDIT_MEDIA: "edit_media",
|
|
1192
1195
|
DELETE_MEDIA: "delete_media"
|
|
1193
|
-
},
|
|
1194
|
-
const { blocks: t, close: n, blockId: s } = e, { getPartailBlocks: a } =
|
|
1196
|
+
}, Bl = (e) => {
|
|
1197
|
+
const { blocks: t, close: n, blockId: s } = e, { getPartailBlocks: a } = ei(), i = t.find((N) => N._id === s), l = i == null ? void 0 : i._libBlockId, o = !!l, c = z(() => t.some(
|
|
1195
1198
|
(N) => N._type === "PartialBlock" || N._type === "GlobalBlock"
|
|
1196
|
-
), [t]), h =
|
|
1199
|
+
), [t]), h = z(() => {
|
|
1197
1200
|
let N = [];
|
|
1198
1201
|
for (const C of t)
|
|
1199
1202
|
if (C._type === "PartialBlock" || C._type === "GlobalBlock") {
|
|
1200
1203
|
const G = a(C.partialBlockId);
|
|
1201
|
-
|
|
1204
|
+
Ma(G, "0._parent", C._parent), N = [...N, ...G];
|
|
1202
1205
|
} else
|
|
1203
1206
|
N.push(C);
|
|
1204
1207
|
return N;
|
|
@@ -1206,21 +1209,21 @@ const _l = () => {
|
|
|
1206
1209
|
M([s], { _libBlockId: void 0 }), $.success("Block delinked from library"), n();
|
|
1207
1210
|
}, {
|
|
1208
1211
|
data: fe,
|
|
1209
|
-
isLoading:
|
|
1212
|
+
isLoading: Y,
|
|
1210
1213
|
isError: he
|
|
1211
|
-
} =
|
|
1214
|
+
} = Il(l);
|
|
1212
1215
|
Se(() => {
|
|
1213
1216
|
he && o && (k(!0), ee(!1));
|
|
1214
1217
|
}, [he, o]), Se(() => {
|
|
1215
|
-
fe && !
|
|
1216
|
-
}, [fe,
|
|
1218
|
+
fe && !Y && (d(fe.name || ""), y(fe.group || ""), S(fe.description || ""), x(fe.preview || ""), ee(!1));
|
|
1219
|
+
}, [fe, Y]), Se(() => {
|
|
1217
1220
|
const N = g.trim().length >= 2, C = E.trim() !== "";
|
|
1218
1221
|
T(N && C && !c);
|
|
1219
1222
|
}, [g, E, c]);
|
|
1220
1223
|
const F = () => {
|
|
1221
1224
|
const N = {};
|
|
1222
1225
|
return g.trim() ? g.length < 2 && (N.name = "Name must be at least 2 characters") : N.name = "Name is required", E || (N.group = "Group is required"), b(N), Object.keys(N).length === 0 && !c;
|
|
1223
|
-
}, { resetLibrary: be } =
|
|
1226
|
+
}, { resetLibrary: be } = ti({ id: "" }), Qe = _l(
|
|
1224
1227
|
(N) => {
|
|
1225
1228
|
o || M([s], { _libBlockId: N.id }), $.success(`Block ${o ? "updated" : "saved"} successfully`), be(N.library), n();
|
|
1226
1229
|
}
|
|
@@ -1238,7 +1241,7 @@ const _l = () => {
|
|
|
1238
1241
|
...o ? { id: l } : {}
|
|
1239
1242
|
});
|
|
1240
1243
|
}, m = Qe.isPending;
|
|
1241
|
-
return D ||
|
|
1244
|
+
return D || Y ? /* @__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" }) }) : le ? /* @__PURE__ */ u("div", { className: "p-6 space-y-4", children: [
|
|
1242
1245
|
/* @__PURE__ */ r("div", { className: "text-destructive font-medium", children: "Block Not Found" }),
|
|
1243
1246
|
/* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground", children: "This block could not be found on the server. It may have been deleted." }),
|
|
1244
1247
|
/* @__PURE__ */ u("div", { className: "flex justify-end gap-2 pt-4", children: [
|
|
@@ -1284,7 +1287,7 @@ const _l = () => {
|
|
|
1284
1287
|
children: "Group"
|
|
1285
1288
|
}
|
|
1286
1289
|
),
|
|
1287
|
-
/* @__PURE__ */ r(
|
|
1290
|
+
/* @__PURE__ */ r(Ul, { value: E, onChange: y }),
|
|
1288
1291
|
U.group && /* @__PURE__ */ r("p", { className: "text-xs text-destructive", children: U.group })
|
|
1289
1292
|
] }),
|
|
1290
1293
|
/* @__PURE__ */ u("div", { className: "space-y-2", children: [
|
|
@@ -1302,12 +1305,12 @@ const _l = () => {
|
|
|
1302
1305
|
] }),
|
|
1303
1306
|
/* @__PURE__ */ u("div", { className: "space-y-2", children: [
|
|
1304
1307
|
/* @__PURE__ */ r(Z, { htmlFor: "previewImage", children: "Preview Image (optional)" }),
|
|
1305
|
-
/* @__PURE__ */ r(
|
|
1308
|
+
/* @__PURE__ */ r(Ol, { value: v, onChange: x }),
|
|
1306
1309
|
/* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground", children: "max 1mb" })
|
|
1307
1310
|
] }),
|
|
1308
1311
|
/* @__PURE__ */ u("div", { className: "flex justify-end gap-2 pt-2", children: [
|
|
1309
1312
|
o && A && /* @__PURE__ */ r(
|
|
1310
|
-
|
|
1313
|
+
Dl,
|
|
1311
1314
|
{
|
|
1312
1315
|
blockId: s,
|
|
1313
1316
|
libBlockId: l,
|
|
@@ -1379,23 +1382,23 @@ const _l = () => {
|
|
|
1379
1382
|
GLOBAL_BLOCK_PUBLISH_SUCCESS: "Global block published successfully.",
|
|
1380
1383
|
PAGES_PUBLISH_SUCCESS: "Your changes have been published successfully.",
|
|
1381
1384
|
SLUG_CHANGE_SUCCESS: "Slug changed successfully."
|
|
1382
|
-
},
|
|
1385
|
+
}, Ml = {
|
|
1383
1386
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
1384
1387
|
}, ke = () => {
|
|
1385
|
-
const e = X(), t =
|
|
1388
|
+
const e = X(), t = W();
|
|
1386
1389
|
return Ae({
|
|
1387
|
-
queryKey: [
|
|
1390
|
+
queryKey: [j, I.GET_PAGE_TYPES],
|
|
1388
1391
|
initialData: [],
|
|
1389
1392
|
queryFn: async () => t(e, { action: I.GET_PAGE_TYPES })
|
|
1390
1393
|
});
|
|
1391
|
-
},
|
|
1394
|
+
}, Fl = (e) => {
|
|
1392
1395
|
const { data: t } = ke();
|
|
1393
|
-
return
|
|
1396
|
+
return z(
|
|
1394
1397
|
() => t == null ? void 0 : t.find((n) => n.key === e),
|
|
1395
1398
|
[t, e]
|
|
1396
1399
|
);
|
|
1397
|
-
},
|
|
1398
|
-
const e = X(), t =
|
|
1400
|
+
}, ql = () => {
|
|
1401
|
+
const e = X(), t = W();
|
|
1399
1402
|
return xe({
|
|
1400
1403
|
mutationFn: async ({ pageType: n, query: s }) => {
|
|
1401
1404
|
try {
|
|
@@ -1412,19 +1415,19 @@ const _l = () => {
|
|
|
1412
1415
|
}
|
|
1413
1416
|
});
|
|
1414
1417
|
}, qr = () => {
|
|
1415
|
-
const e = X(), t = Ne(), n =
|
|
1418
|
+
const e = X(), t = Ne(), n = W(), { data: s } = ke();
|
|
1416
1419
|
return xe({
|
|
1417
1420
|
mutationFn: async (a) => (a.template && console.log("Creating page from template:", a.template), n(e, { action: I.CREATE_PAGE, data: a })),
|
|
1418
1421
|
onSuccess: (a, i) => {
|
|
1419
1422
|
var o;
|
|
1420
1423
|
i && (i != null && i.primaryPage) ? t.invalidateQueries({
|
|
1421
1424
|
queryKey: [
|
|
1422
|
-
|
|
1425
|
+
j,
|
|
1423
1426
|
I.GET_LANGUAGE_PAGES,
|
|
1424
1427
|
i == null ? void 0 : i.primaryPage
|
|
1425
1428
|
]
|
|
1426
1429
|
}) : t.invalidateQueries({
|
|
1427
|
-
queryKey: [
|
|
1430
|
+
queryKey: [j, I.GET_WEBSITE_PAGES]
|
|
1428
1431
|
});
|
|
1429
1432
|
const l = i.template ? `Page created from "${i.template.name}" template` : i.hasSlug === !1 ? "New " + ((o = ge(s, { key: i.pageType })) == null ? void 0 : o.name) + " added successfully" : "New page added successfully";
|
|
1430
1433
|
$.success(l);
|
|
@@ -1434,13 +1437,13 @@ const _l = () => {
|
|
|
1434
1437
|
$.error(
|
|
1435
1438
|
`Failed to add new ${l != null && l.hasSlug ? "page" : l.name}.`,
|
|
1436
1439
|
{
|
|
1437
|
-
description: ne(
|
|
1440
|
+
description: ne(Ml, a.message, a.message)
|
|
1438
1441
|
}
|
|
1439
1442
|
);
|
|
1440
1443
|
}
|
|
1441
1444
|
});
|
|
1442
1445
|
}, Ss = () => {
|
|
1443
|
-
const e = X(), t = Ne(), n =
|
|
1446
|
+
const e = X(), t = Ne(), n = W(), { data: s } = ke();
|
|
1444
1447
|
return xe({
|
|
1445
1448
|
mutationFn: async (a) => await n(e, {
|
|
1446
1449
|
action: I.UPDATE_PAGE,
|
|
@@ -1449,12 +1452,12 @@ const _l = () => {
|
|
|
1449
1452
|
onSuccess: (a, i) => {
|
|
1450
1453
|
i && (i != null && i.primaryPage || i != null && i.seo) ? t.invalidateQueries({
|
|
1451
1454
|
queryKey: [
|
|
1452
|
-
|
|
1455
|
+
j,
|
|
1453
1456
|
I.GET_LANGUAGE_PAGES,
|
|
1454
1457
|
i == null ? void 0 : i.primaryPage
|
|
1455
1458
|
]
|
|
1456
1459
|
}) : t.invalidateQueries({
|
|
1457
|
-
queryKey: [
|
|
1460
|
+
queryKey: [j, I.GET_WEBSITE_PAGES]
|
|
1458
1461
|
});
|
|
1459
1462
|
},
|
|
1460
1463
|
onError: (a, i) => {
|
|
@@ -1467,8 +1470,8 @@ const _l = () => {
|
|
|
1467
1470
|
);
|
|
1468
1471
|
}
|
|
1469
1472
|
});
|
|
1470
|
-
},
|
|
1471
|
-
const e = X(), t = Ne(), n =
|
|
1473
|
+
}, Hl = () => {
|
|
1474
|
+
const e = X(), t = Ne(), n = W(), { data: s } = ke();
|
|
1472
1475
|
return xe({
|
|
1473
1476
|
mutationFn: async (a) => n(e, {
|
|
1474
1477
|
action: I.DELETE_PAGE,
|
|
@@ -1483,12 +1486,12 @@ const _l = () => {
|
|
|
1483
1486
|
}
|
|
1484
1487
|
i && (i != null && i.primaryPage) ? t.invalidateQueries({
|
|
1485
1488
|
queryKey: [
|
|
1486
|
-
|
|
1489
|
+
j,
|
|
1487
1490
|
I.GET_LANGUAGE_PAGES,
|
|
1488
1491
|
i == null ? void 0 : i.primaryPage
|
|
1489
1492
|
]
|
|
1490
1493
|
}) : t.invalidateQueries({
|
|
1491
|
-
queryKey: [
|
|
1494
|
+
queryKey: [j, I.GET_WEBSITE_PAGES]
|
|
1492
1495
|
});
|
|
1493
1496
|
},
|
|
1494
1497
|
onError: (a, i) => {
|
|
@@ -1501,8 +1504,8 @@ const _l = () => {
|
|
|
1501
1504
|
);
|
|
1502
1505
|
}
|
|
1503
1506
|
});
|
|
1504
|
-
},
|
|
1505
|
-
const e = X(), t = Ne(), n =
|
|
1507
|
+
}, Kl = () => {
|
|
1508
|
+
const e = X(), t = Ne(), n = W(), { data: s } = ke();
|
|
1506
1509
|
return xe({
|
|
1507
1510
|
mutationFn: async (a) => n(e, {
|
|
1508
1511
|
action: I.TAKE_OFFLINE,
|
|
@@ -1511,12 +1514,12 @@ const _l = () => {
|
|
|
1511
1514
|
onSuccess: (a, i) => {
|
|
1512
1515
|
i && (i != null && i.primaryPage) ? t.invalidateQueries({
|
|
1513
1516
|
queryKey: [
|
|
1514
|
-
|
|
1517
|
+
j,
|
|
1515
1518
|
I.GET_LANGUAGE_PAGES,
|
|
1516
1519
|
i == null ? void 0 : i.primaryPage
|
|
1517
1520
|
]
|
|
1518
1521
|
}) : t.invalidateQueries({
|
|
1519
|
-
queryKey: [
|
|
1522
|
+
queryKey: [j, I.GET_WEBSITE_PAGES]
|
|
1520
1523
|
});
|
|
1521
1524
|
const l = ge(s, { key: i.pageType });
|
|
1522
1525
|
$.success(
|
|
@@ -1534,7 +1537,7 @@ const _l = () => {
|
|
|
1534
1537
|
}
|
|
1535
1538
|
});
|
|
1536
1539
|
}, Ns = () => {
|
|
1537
|
-
const e = X(), t =
|
|
1540
|
+
const e = X(), t = W(), n = Ne(), { data: s } = Re();
|
|
1538
1541
|
return xe({
|
|
1539
1542
|
mutationFn: async ({ ids: a }) => t(e, {
|
|
1540
1543
|
action: I.PUBLISH_CHANGES,
|
|
@@ -1542,19 +1545,19 @@ const _l = () => {
|
|
|
1542
1545
|
}),
|
|
1543
1546
|
onSuccess: () => {
|
|
1544
1547
|
n.invalidateQueries({
|
|
1545
|
-
queryKey: [
|
|
1548
|
+
queryKey: [j, I.GET_CHANGES]
|
|
1546
1549
|
}), n.invalidateQueries({
|
|
1547
|
-
queryKey: [
|
|
1550
|
+
queryKey: [j, I.GET_WEBSITE_PAGES]
|
|
1548
1551
|
}), n.invalidateQueries({
|
|
1549
|
-
queryKey: [
|
|
1552
|
+
queryKey: [j, I.GET_LANGUAGE_PAGES, s == null ? void 0 : s.id]
|
|
1550
1553
|
});
|
|
1551
1554
|
},
|
|
1552
1555
|
onError: () => {
|
|
1553
1556
|
$.error("Failed to publish pages.");
|
|
1554
1557
|
}
|
|
1555
1558
|
});
|
|
1556
|
-
},
|
|
1557
|
-
const e = X(), t =
|
|
1559
|
+
}, jl = () => {
|
|
1560
|
+
const e = X(), t = W(), n = Ne();
|
|
1558
1561
|
return xe({
|
|
1559
1562
|
mutationFn: async (s) => {
|
|
1560
1563
|
var a;
|
|
@@ -1571,15 +1574,15 @@ const _l = () => {
|
|
|
1571
1574
|
},
|
|
1572
1575
|
onSuccess: () => {
|
|
1573
1576
|
n.invalidateQueries({
|
|
1574
|
-
queryKey: [
|
|
1577
|
+
queryKey: [j, I.GET_WEBSITE_PAGES]
|
|
1575
1578
|
}), $.success("Page marked as template successfully.");
|
|
1576
1579
|
},
|
|
1577
1580
|
onError: () => {
|
|
1578
1581
|
$.error("Failed to mark page as template.");
|
|
1579
1582
|
}
|
|
1580
1583
|
});
|
|
1581
|
-
},
|
|
1582
|
-
const e = X(), t =
|
|
1584
|
+
}, Vl = () => {
|
|
1585
|
+
const e = X(), t = W(), n = Ne();
|
|
1583
1586
|
return xe({
|
|
1584
1587
|
mutationFn: async (s) => t(e, {
|
|
1585
1588
|
action: I.UNMARK_AS_TEMPLATE,
|
|
@@ -1587,15 +1590,15 @@ const _l = () => {
|
|
|
1587
1590
|
}),
|
|
1588
1591
|
onSuccess: () => {
|
|
1589
1592
|
n.invalidateQueries({
|
|
1590
|
-
queryKey: [
|
|
1593
|
+
queryKey: [j, I.GET_WEBSITE_PAGES]
|
|
1591
1594
|
}), $.success("Page unmarked as template successfully.");
|
|
1592
1595
|
},
|
|
1593
1596
|
onError: () => {
|
|
1594
1597
|
$.error("Failed to unmark page as template.");
|
|
1595
1598
|
}
|
|
1596
1599
|
});
|
|
1597
|
-
},
|
|
1598
|
-
const e = X(), t =
|
|
1600
|
+
}, $l = () => {
|
|
1601
|
+
const e = X(), t = W(), n = Ne();
|
|
1599
1602
|
return xe({
|
|
1600
1603
|
mutationFn: async ({ id: s, slug: a }) => t(e, {
|
|
1601
1604
|
action: I.CHANGE_SLUG,
|
|
@@ -1603,9 +1606,9 @@ const _l = () => {
|
|
|
1603
1606
|
}),
|
|
1604
1607
|
onSuccess: (s, { primaryPage: a }) => {
|
|
1605
1608
|
$.success(B.SLUG_CHANGE_SUCCESS), a ? n.invalidateQueries({
|
|
1606
|
-
queryKey: [
|
|
1609
|
+
queryKey: [j, I.GET_LANGUAGE_PAGES, a]
|
|
1607
1610
|
}) : n.invalidateQueries({
|
|
1608
|
-
queryKey: [
|
|
1611
|
+
queryKey: [j, I.GET_WEBSITE_PAGES]
|
|
1609
1612
|
});
|
|
1610
1613
|
},
|
|
1611
1614
|
onError: () => {
|
|
@@ -1652,8 +1655,8 @@ var As = {};
|
|
|
1652
1655
|
var f = Math.floor(16.666666666666668), m, N, C = {}, G = 0;
|
|
1653
1656
|
return typeof requestAnimationFrame == "function" && typeof cancelAnimationFrame == "function" ? (m = function(H) {
|
|
1654
1657
|
var K = Math.random();
|
|
1655
|
-
return C[K] = requestAnimationFrame(function L(
|
|
1656
|
-
G ===
|
|
1658
|
+
return C[K] = requestAnimationFrame(function L(V) {
|
|
1659
|
+
G === V || G + f - 1 < V ? (G = V, delete C[K], H()) : C[K] = requestAnimationFrame(L);
|
|
1657
1660
|
}), K;
|
|
1658
1661
|
}, N = function(H) {
|
|
1659
1662
|
C[H] && cancelAnimationFrame(C[H]);
|
|
@@ -1669,9 +1672,9 @@ var As = {};
|
|
|
1669
1672
|
G.postMessage({ options: K || {}, callback: L });
|
|
1670
1673
|
}
|
|
1671
1674
|
G.init = function(L) {
|
|
1672
|
-
var
|
|
1673
|
-
G.postMessage({ canvas:
|
|
1674
|
-
}, G.fire = function(L,
|
|
1675
|
+
var V = L.transferControlToOffscreen();
|
|
1676
|
+
G.postMessage({ canvas: V }, [V]);
|
|
1677
|
+
}, G.fire = function(L, V, oe) {
|
|
1675
1678
|
if (m)
|
|
1676
1679
|
return H(L, null), m;
|
|
1677
1680
|
var pe = Math.random().toString(36).slice(2);
|
|
@@ -1796,8 +1799,8 @@ var As = {};
|
|
|
1796
1799
|
var m = document.createElement("canvas");
|
|
1797
1800
|
return m.style.position = "fixed", m.style.top = "0px", m.style.left = "0px", m.style.pointerEvents = "none", m.style.zIndex = f, m;
|
|
1798
1801
|
}
|
|
1799
|
-
function q(f, m, N, C, G, H, K, L,
|
|
1800
|
-
f.save(), f.translate(m, N), f.rotate(H), f.scale(C, G), f.arc(0, 0, 1, K, L,
|
|
1802
|
+
function q(f, m, N, C, G, H, K, L, V) {
|
|
1803
|
+
f.save(), f.translate(m, N), f.rotate(H), f.scale(C, G), f.arc(0, 0, 1, K, L, V), f.restore();
|
|
1801
1804
|
}
|
|
1802
1805
|
function A(f) {
|
|
1803
1806
|
var m = f.angle * (Math.PI / 180), N = f.spread * (Math.PI / 180);
|
|
@@ -1840,9 +1843,9 @@ var As = {};
|
|
|
1840
1843
|
Math.PI / 10 * m.wobble
|
|
1841
1844
|
));
|
|
1842
1845
|
else if (m.shape.type === "bitmap") {
|
|
1843
|
-
var L = Math.PI / 10 * m.wobble,
|
|
1844
|
-
Math.cos(L) *
|
|
1845
|
-
Math.sin(L) *
|
|
1846
|
+
var L = Math.PI / 10 * m.wobble, V = Math.abs(H - C) * 0.1, oe = Math.abs(K - G) * 0.1, pe = m.shape.bitmap.width * m.scalar, ce = m.shape.bitmap.height * m.scalar, ye = new DOMMatrix([
|
|
1847
|
+
Math.cos(L) * V,
|
|
1848
|
+
Math.sin(L) * V,
|
|
1846
1849
|
-Math.sin(L) * oe,
|
|
1847
1850
|
Math.cos(L) * oe,
|
|
1848
1851
|
m.x,
|
|
@@ -1866,16 +1869,16 @@ var As = {};
|
|
|
1866
1869
|
return f.closePath(), f.fill(), m.tick < m.totalTicks;
|
|
1867
1870
|
}
|
|
1868
1871
|
function se(f, m, N, C, G) {
|
|
1869
|
-
var H = m.slice(), K = f.getContext("2d"), L,
|
|
1872
|
+
var H = m.slice(), K = f.getContext("2d"), L, V, oe = h(function(pe) {
|
|
1870
1873
|
function ce() {
|
|
1871
|
-
L =
|
|
1874
|
+
L = V = null, K.clearRect(0, 0, C.width, C.height), g.clear(), G(), pe();
|
|
1872
1875
|
}
|
|
1873
1876
|
function ye() {
|
|
1874
1877
|
s && !(C.width === a.width && C.height === a.height) && (C.width = f.width = a.width, C.height = f.height = a.height), !C.width && !C.height && (N(f), C.width = f.width, C.height = f.height), K.clearRect(0, 0, C.width, C.height), H = H.filter(function(Te) {
|
|
1875
1878
|
return M(K, Te);
|
|
1876
1879
|
}), H.length ? L = d.frame(ye) : ce();
|
|
1877
1880
|
}
|
|
1878
|
-
L = d.frame(ye),
|
|
1881
|
+
L = d.frame(ye), V = ce;
|
|
1879
1882
|
});
|
|
1880
1883
|
return {
|
|
1881
1884
|
addFettis: function(pe) {
|
|
@@ -1884,12 +1887,12 @@ var As = {};
|
|
|
1884
1887
|
canvas: f,
|
|
1885
1888
|
promise: oe,
|
|
1886
1889
|
reset: function() {
|
|
1887
|
-
L && d.cancel(L),
|
|
1890
|
+
L && d.cancel(L), V && V();
|
|
1888
1891
|
}
|
|
1889
1892
|
};
|
|
1890
1893
|
}
|
|
1891
1894
|
function fe(f, m) {
|
|
1892
|
-
var N = !f, C = !!v(m || {}, "resize"), G = !1, H = v(m, "disableForReducedMotion", Boolean), K = i && !!v(m || {}, "useWorker"), L = K ? E() : null,
|
|
1895
|
+
var N = !f, C = !!v(m || {}, "resize"), G = !1, H = v(m, "disableForReducedMotion", Boolean), K = i && !!v(m || {}, "useWorker"), L = K ? E() : null, V = N ? ee : le, oe = f && L ? !!f.__confetti_initialized : !1, pe = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, ce;
|
|
1893
1896
|
function ye(Q, Le, Be) {
|
|
1894
1897
|
for (var Me = v(Q, "particleCount", x), Xe = v(Q, "angle", Number), at = v(Q, "spread", Number), $e = v(Q, "startVelocity", Number), Pa = v(Q, "decay", Number), _a = v(Q, "gravity", Number), Ia = v(Q, "drift", Number), Cs = v(Q, "colors", w), ka = v(Q, "ticks", Number), Ps = v(Q, "shapes"), La = v(Q, "scalar"), Da = !!v(Q, "flat"), _s = D(Q), Is = Me, Fn = [], Ga = f.width * _s.x, Ua = f.height * _s.y; Is--; )
|
|
1895
1898
|
Fn.push(
|
|
@@ -1909,7 +1912,7 @@ var As = {};
|
|
|
1909
1912
|
flat: Da
|
|
1910
1913
|
})
|
|
1911
1914
|
);
|
|
1912
|
-
return ce ? ce.addFettis(Fn) : (ce = se(f, Fn,
|
|
1915
|
+
return ce ? ce.addFettis(Fn) : (ce = se(f, Fn, V, Le, Be), ce.promise);
|
|
1913
1916
|
}
|
|
1914
1917
|
function Te(Q) {
|
|
1915
1918
|
var Le = H || v(Q, "disableForReducedMotion", Boolean), Be = v(Q, "zIndex", Number);
|
|
@@ -1917,7 +1920,7 @@ var As = {};
|
|
|
1917
1920
|
return h(function($e) {
|
|
1918
1921
|
$e();
|
|
1919
1922
|
});
|
|
1920
|
-
N && ce ? f = ce.canvas : N && !f && (f = k(Be), document.body.appendChild(f)), C && !oe &&
|
|
1923
|
+
N && ce ? f = ce.canvas : N && !f && (f = k(Be), document.body.appendChild(f)), C && !oe && V(f);
|
|
1921
1924
|
var Me = {
|
|
1922
1925
|
width: f.width,
|
|
1923
1926
|
height: f.height
|
|
@@ -1931,7 +1934,7 @@ var As = {};
|
|
|
1931
1934
|
return f.getBoundingClientRect();
|
|
1932
1935
|
}
|
|
1933
1936
|
};
|
|
1934
|
-
|
|
1937
|
+
V($e), L.postMessage({
|
|
1935
1938
|
resize: {
|
|
1936
1939
|
width: $e.width,
|
|
1937
1940
|
height: $e.height
|
|
@@ -1950,15 +1953,15 @@ var As = {};
|
|
|
1950
1953
|
L && L.reset(), ce && ce.reset();
|
|
1951
1954
|
}, Te;
|
|
1952
1955
|
}
|
|
1953
|
-
var
|
|
1956
|
+
var Y;
|
|
1954
1957
|
function he() {
|
|
1955
|
-
return
|
|
1958
|
+
return Y || (Y = fe(null, { useWorker: !0, resize: !0 })), Y;
|
|
1956
1959
|
}
|
|
1957
1960
|
function F(f, m, N, C, G, H, K) {
|
|
1958
|
-
var L = new Path2D(f),
|
|
1959
|
-
|
|
1961
|
+
var L = new Path2D(f), V = new Path2D();
|
|
1962
|
+
V.addPath(L, new DOMMatrix(m));
|
|
1960
1963
|
var oe = new Path2D();
|
|
1961
|
-
return oe.addPath(
|
|
1964
|
+
return oe.addPath(V, new DOMMatrix([
|
|
1962
1965
|
Math.cos(K) * G,
|
|
1963
1966
|
Math.sin(K) * G,
|
|
1964
1967
|
-Math.sin(K) * H,
|
|
@@ -1974,10 +1977,10 @@ var As = {};
|
|
|
1974
1977
|
typeof f == "string" ? m = f : (m = f.path, N = f.matrix);
|
|
1975
1978
|
var C = new Path2D(m), G = document.createElement("canvas"), H = G.getContext("2d");
|
|
1976
1979
|
if (!N) {
|
|
1977
|
-
for (var K = 1e3, L = K,
|
|
1980
|
+
for (var K = 1e3, L = K, V = K, oe = 0, pe = 0, ce, ye, Te = 0; Te < K; Te += 2)
|
|
1978
1981
|
for (var Q = 0; Q < K; Q += 2)
|
|
1979
|
-
H.isPointInPath(C, Te, Q, "nonzero") && (L = Math.min(L, Te),
|
|
1980
|
-
ce = oe - L, ye = pe -
|
|
1982
|
+
H.isPointInPath(C, Te, Q, "nonzero") && (L = Math.min(L, Te), V = Math.min(V, Q), oe = Math.max(oe, Te), pe = Math.max(pe, Q));
|
|
1983
|
+
ce = oe - L, ye = pe - V;
|
|
1981
1984
|
var Le = 10, Be = Math.min(Le / ce, Le / ye);
|
|
1982
1985
|
N = [
|
|
1983
1986
|
Be,
|
|
@@ -1985,7 +1988,7 @@ var As = {};
|
|
|
1985
1988
|
0,
|
|
1986
1989
|
Be,
|
|
1987
1990
|
-Math.round(ce / 2 + L) * Be,
|
|
1988
|
-
-Math.round(ye / 2 +
|
|
1991
|
+
-Math.round(ye / 2 + V) * Be
|
|
1989
1992
|
];
|
|
1990
1993
|
}
|
|
1991
1994
|
return {
|
|
@@ -1997,10 +2000,10 @@ var As = {};
|
|
|
1997
2000
|
function Qe(f) {
|
|
1998
2001
|
var m, N = 1, C = "#000000", G = '"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';
|
|
1999
2002
|
typeof f == "string" ? m = f : (m = f.text, N = "scalar" in f ? f.scalar : N, G = "fontFamily" in f ? f.fontFamily : G, C = "color" in f ? f.color : C);
|
|
2000
|
-
var H = 10 * N, K = "" + H + "px " + G, L = new OffscreenCanvas(H, H),
|
|
2001
|
-
|
|
2002
|
-
var oe =
|
|
2003
|
-
pe += ye + ye, ce += ye + ye, L = new OffscreenCanvas(pe, ce),
|
|
2003
|
+
var H = 10 * N, K = "" + H + "px " + G, L = new OffscreenCanvas(H, H), V = L.getContext("2d");
|
|
2004
|
+
V.font = K;
|
|
2005
|
+
var oe = V.measureText(m), pe = Math.ceil(oe.actualBoundingBoxRight + oe.actualBoundingBoxLeft), ce = Math.ceil(oe.actualBoundingBoxAscent + oe.actualBoundingBoxDescent), ye = 2, Te = oe.actualBoundingBoxLeft + ye, Q = oe.actualBoundingBoxAscent + ye;
|
|
2006
|
+
pe += ye + ye, ce += ye + ye, L = new OffscreenCanvas(pe, ce), V = L.getContext("2d"), V.font = K, V.fillStyle = C, V.fillText(m, Te, Q);
|
|
2004
2007
|
var Le = 1 / N;
|
|
2005
2008
|
return {
|
|
2006
2009
|
type: "bitmap",
|
|
@@ -2017,14 +2020,14 @@ var As = {};
|
|
|
2017
2020
|
})(/* @__PURE__ */ function() {
|
|
2018
2021
|
return typeof window < "u" ? window : typeof self < "u" ? self : this || {};
|
|
2019
2022
|
}(), As, !1);
|
|
2020
|
-
const
|
|
2023
|
+
const zl = As.exports;
|
|
2021
2024
|
As.exports.create;
|
|
2022
|
-
const
|
|
2025
|
+
const Wl = {
|
|
2023
2026
|
particleCount: 350,
|
|
2024
2027
|
spread: 120,
|
|
2025
2028
|
origin: { y: 0.6 },
|
|
2026
2029
|
angle: 90
|
|
2027
|
-
},
|
|
2030
|
+
}, Yl = {
|
|
2028
2031
|
TOP_RIGHT: {
|
|
2029
2032
|
angle: 225,
|
|
2030
2033
|
origin: { x: 0.9, y: 0 }
|
|
@@ -2034,12 +2037,12 @@ const Ql = {
|
|
|
2034
2037
|
origin: { x: 0.9, y: 0.9 }
|
|
2035
2038
|
}
|
|
2036
2039
|
}, Tn = (e) => {
|
|
2037
|
-
let t =
|
|
2040
|
+
let t = Yl[e];
|
|
2038
2041
|
t || (t = {});
|
|
2039
|
-
const n = { ...
|
|
2040
|
-
|
|
2041
|
-
},
|
|
2042
|
-
const [e] =
|
|
2042
|
+
const n = { ...Wl, ...t };
|
|
2043
|
+
zl(n);
|
|
2044
|
+
}, Ql = () => {
|
|
2045
|
+
const [e] = ni(), { mutate: t, isPending: n } = Ns(), { mutateAsync: s, isPending: a } = Rr();
|
|
2043
2046
|
return /* @__PURE__ */ u("div", { className: "bg-white py-3 flex items-center justify-center gap-x-3 border-t", children: [
|
|
2044
2047
|
/* @__PURE__ */ r(
|
|
2045
2048
|
_,
|
|
@@ -2072,11 +2075,11 @@ const Ql = {
|
|
|
2072
2075
|
}
|
|
2073
2076
|
)
|
|
2074
2077
|
] });
|
|
2075
|
-
},
|
|
2078
|
+
}, Xl = ({
|
|
2076
2079
|
page: e,
|
|
2077
2080
|
onClose: t
|
|
2078
2081
|
}) => {
|
|
2079
|
-
const [n, s] = P(e.slug || ""), { mutate: a, isPending: i } =
|
|
2082
|
+
const [n, s] = P(e.slug || ""), { mutate: a, isPending: i } = $l(), { data: l } = ke(), o = ge(l, { key: e == null ? void 0 : e.pageType }), c = (g) => {
|
|
2080
2083
|
if (g.preventDefault(), !(e != null && e.primaryPage) && Object.keys(qe).some((y) => n === `/${y}` || Rt(n, `/${y}/`))) {
|
|
2081
2084
|
$.error("Error", {
|
|
2082
2085
|
description: "Slugs cannot start with a language code for primary page"
|
|
@@ -2086,8 +2089,8 @@ const Ql = {
|
|
|
2086
2089
|
a({ ...e, slug: n }, { onSuccess: t });
|
|
2087
2090
|
}, h = (e == null ? void 0 : e.lang) || "";
|
|
2088
2091
|
return /* @__PURE__ */ r(He, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
|
|
2089
|
-
/* @__PURE__ */ u(
|
|
2090
|
-
/* @__PURE__ */ r(
|
|
2092
|
+
/* @__PURE__ */ u(je, { children: [
|
|
2093
|
+
/* @__PURE__ */ r(Ve, { children: "Change Slug" }),
|
|
2091
2094
|
/* @__PURE__ */ r(Ye, { className: "text-xs", children: /* @__PURE__ */ u(yr, { variant: "destructive", className: "mt-2", children: [
|
|
2092
2095
|
/* @__PURE__ */ r(Cr, { className: "h-4 w-4" }),
|
|
2093
2096
|
"Changing the slug may have impact on your SEO. Please proceed with caution."
|
|
@@ -2153,7 +2156,7 @@ function Hr({
|
|
|
2153
2156
|
page: e,
|
|
2154
2157
|
onClose: t
|
|
2155
2158
|
}) {
|
|
2156
|
-
const [, n] = Ue(), { mutate: s, isPending: a } =
|
|
2159
|
+
const [, n] = Ue(), { mutate: s, isPending: a } = Hl(), { data: i } = ke(), l = () => {
|
|
2157
2160
|
s(e, {
|
|
2158
2161
|
onSuccess: () => {
|
|
2159
2162
|
e != null && e.primaryPage || (window.history.replaceState(null, "", "/"), n(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate"))), t();
|
|
@@ -2163,8 +2166,8 @@ function Hr({
|
|
|
2163
2166
|
(c) => c.key === (e == null ? void 0 : e.pageType)
|
|
2164
2167
|
);
|
|
2165
2168
|
return /* @__PURE__ */ r(He, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
|
|
2166
|
-
/* @__PURE__ */ u(
|
|
2167
|
-
/* @__PURE__ */ r(
|
|
2169
|
+
/* @__PURE__ */ u(je, { children: [
|
|
2170
|
+
/* @__PURE__ */ r(Ve, { children: "Confirm Deletion" }),
|
|
2168
2171
|
/* @__PURE__ */ u(Ye, { className: "py-4 text-slate-500", children: [
|
|
2169
2172
|
/* @__PURE__ */ u("div", { children: [
|
|
2170
2173
|
"Are you sure you want to remove ",
|
|
@@ -2205,12 +2208,12 @@ const Oe = ({
|
|
|
2205
2208
|
page: e,
|
|
2206
2209
|
onClose: t
|
|
2207
2210
|
}) => {
|
|
2208
|
-
const { mutate: n, isPending: s } =
|
|
2211
|
+
const { mutate: n, isPending: s } = Kl(), a = async () => {
|
|
2209
2212
|
n(e, { onSuccess: t });
|
|
2210
2213
|
};
|
|
2211
2214
|
return /* @__PURE__ */ r(He, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
|
|
2212
|
-
/* @__PURE__ */ u(
|
|
2213
|
-
/* @__PURE__ */ r(
|
|
2215
|
+
/* @__PURE__ */ u(je, { children: [
|
|
2216
|
+
/* @__PURE__ */ r(Ve, { children: "Confirm action" }),
|
|
2214
2217
|
/* @__PURE__ */ u(Ye, { children: [
|
|
2215
2218
|
B.UNPUBLISH_MSG,
|
|
2216
2219
|
" ",
|
|
@@ -2236,7 +2239,7 @@ const Oe = ({
|
|
|
2236
2239
|
onClose: t,
|
|
2237
2240
|
languages: n
|
|
2238
2241
|
}) => {
|
|
2239
|
-
const { data: s } = Re(), { data: a } = ke(), [i, l] = P(e.name || ""), [o, c] = P(e.edit ? e.lang : ""), [h, g] = P(e.edit ? e.slug : ""), { mutate: d, isPending: E } = qr(), { mutate: y, isPending: p } = Ss(), S =
|
|
2242
|
+
const { data: s } = Re(), { data: a } = ke(), [i, l] = P(e.name || ""), [o, c] = P(e.edit ? e.lang : ""), [h, g] = P(e.edit ? e.slug : ""), { mutate: d, isPending: E } = qr(), { mutate: y, isPending: p } = Ss(), S = z(
|
|
2240
2243
|
() => a == null ? void 0 : a.find(
|
|
2241
2244
|
(b) => b.key === e.pageType
|
|
2242
2245
|
),
|
|
@@ -2253,8 +2256,8 @@ const Oe = ({
|
|
|
2253
2256
|
w.pageType = e.pageType, e.edit && (w.id = e == null ? void 0 : e.id), e.edit ? y(w, { onSuccess: t }) : d(w, { onSuccess: t });
|
|
2254
2257
|
};
|
|
2255
2258
|
return /* @__PURE__ */ r(He, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { className: "sm:max-w-[425px] text-slate-600", children: [
|
|
2256
|
-
/* @__PURE__ */ u(
|
|
2257
|
-
/* @__PURE__ */ r(
|
|
2259
|
+
/* @__PURE__ */ u(je, { children: [
|
|
2260
|
+
/* @__PURE__ */ r(Ve, { children: e.edit ? B.EDIT_LANGUAGE : B.ADD_NEW_LANGUAGE }),
|
|
2258
2261
|
/* @__PURE__ */ r(Ye, { className: "font-light", children: B.ENTER_LANGUAGE_DETAILS })
|
|
2259
2262
|
] }),
|
|
2260
2263
|
/* @__PURE__ */ u("form", { onSubmit: U, children: [
|
|
@@ -2305,7 +2308,7 @@ const Oe = ({
|
|
|
2305
2308
|
value: h,
|
|
2306
2309
|
onChange: (b) => {
|
|
2307
2310
|
const w = b.target.value;
|
|
2308
|
-
Rt(w, `/${o}`) && g(Dt(
|
|
2311
|
+
Rt(w, `/${o}`) && g(Dt(Fa(w)));
|
|
2309
2312
|
},
|
|
2310
2313
|
className: "col-span-3",
|
|
2311
2314
|
required: !0,
|
|
@@ -2327,7 +2330,7 @@ const Oe = ({
|
|
|
2327
2330
|
) })
|
|
2328
2331
|
] })
|
|
2329
2332
|
] }) });
|
|
2330
|
-
},
|
|
2333
|
+
}, Zl = () => {
|
|
2331
2334
|
const [e, t] = P(null), { selectedLang: n, fallbackLang: s, setSelectedLang: a } = dt(), { data: i, isFetching: l } = cn(), { data: o } = Re(), [c, h] = P(null), [g, d] = P(null), [E, y] = P(null), { data: p } = un(), S = Ce(
|
|
2332
2335
|
ne(p, "languages") || ["en"],
|
|
2333
2336
|
(v) => !ge(i, { lang: v }) && v !== ne(p, "fallbackLang")
|
|
@@ -2378,7 +2381,7 @@ const Oe = ({
|
|
|
2378
2381
|
] })
|
|
2379
2382
|
] }),
|
|
2380
2383
|
b ? /* @__PURE__ */ u("div", { className: "flex items-center text-[11px] text-orange-500 gap-x-1", children: [
|
|
2381
|
-
/* @__PURE__ */ r(
|
|
2384
|
+
/* @__PURE__ */ r(Ui, { fill: "orange", className: "w-3 h-3" }),
|
|
2382
2385
|
/* @__PURE__ */ r("b", { children: " Primary" })
|
|
2383
2386
|
] }) : /* @__PURE__ */ r("div", { className: "flex items-center gap-x-3", children: /* @__PURE__ */ r(
|
|
2384
2387
|
Oe,
|
|
@@ -2423,7 +2426,7 @@ const Oe = ({
|
|
|
2423
2426
|
T.stopPropagation(), t({ ...v, edit: !0 });
|
|
2424
2427
|
},
|
|
2425
2428
|
children: [
|
|
2426
|
-
/* @__PURE__ */ r(
|
|
2429
|
+
/* @__PURE__ */ r(Ri, { className: "size-3" }),
|
|
2427
2430
|
B.EDIT
|
|
2428
2431
|
]
|
|
2429
2432
|
}
|
|
@@ -2461,7 +2464,7 @@ const Oe = ({
|
|
|
2461
2464
|
T.stopPropagation(), h(v);
|
|
2462
2465
|
},
|
|
2463
2466
|
children: [
|
|
2464
|
-
/* @__PURE__ */ r(
|
|
2467
|
+
/* @__PURE__ */ r(Oi, { className: "size-3" }),
|
|
2465
2468
|
B.DELETE
|
|
2466
2469
|
]
|
|
2467
2470
|
}
|
|
@@ -2516,7 +2519,7 @@ const Oe = ({
|
|
|
2516
2519
|
}
|
|
2517
2520
|
),
|
|
2518
2521
|
E && /* @__PURE__ */ r(
|
|
2519
|
-
|
|
2522
|
+
Xl,
|
|
2520
2523
|
{
|
|
2521
2524
|
page: E,
|
|
2522
2525
|
onClose: () => y(null)
|
|
@@ -2524,14 +2527,14 @@ const Oe = ({
|
|
|
2524
2527
|
)
|
|
2525
2528
|
] });
|
|
2526
2529
|
};
|
|
2527
|
-
function
|
|
2530
|
+
function Jl({
|
|
2528
2531
|
pages: e,
|
|
2529
2532
|
selectedParentId: t,
|
|
2530
2533
|
onChange: n,
|
|
2531
2534
|
className: s = "w-full rounded-md border border-gray-300 px-3 py-2",
|
|
2532
2535
|
id: a = "parentPage"
|
|
2533
2536
|
}) {
|
|
2534
|
-
const i =
|
|
2537
|
+
const i = z(() => !e || e.length === 0 ? [] : e.filter((g) => !me(g.slug)).filter((g) => g.slug !== "/").sort((g, d) => g.slug.localeCompare(d.slug)), [e]), l = (h) => Math.max(0, (h.match(/\//g) || []).length - 1), o = (h) => " ".repeat(h), c = (h) => {
|
|
2535
2538
|
if (h === "/") return "/";
|
|
2536
2539
|
const g = h.split("/").filter(Boolean);
|
|
2537
2540
|
return g.length <= 1 ? `/${g[0] || ""}` : `/${g[g.length - 1]}`;
|
|
@@ -2563,7 +2566,7 @@ function to({
|
|
|
2563
2566
|
)
|
|
2564
2567
|
] });
|
|
2565
2568
|
}
|
|
2566
|
-
const
|
|
2569
|
+
const eo = ({
|
|
2567
2570
|
templates: e,
|
|
2568
2571
|
selectedTemplateId: t,
|
|
2569
2572
|
onSelectTemplate: n,
|
|
@@ -2611,16 +2614,16 @@ const no = ({
|
|
|
2611
2614
|
/* @__PURE__ */ r("div", { className: "p-2 text-xs text-gray-500 bg-gray-50 border-t", children: "Template preview" })
|
|
2612
2615
|
] })
|
|
2613
2616
|
] });
|
|
2614
|
-
},
|
|
2615
|
-
const e = X(), t =
|
|
2617
|
+
}, to = () => {
|
|
2618
|
+
const e = X(), t = W();
|
|
2616
2619
|
return Ae({
|
|
2617
|
-
queryKey: [
|
|
2620
|
+
queryKey: [j, I.GET_LIBRARIES],
|
|
2618
2621
|
queryFn: async () => await t(e, { action: I.GET_LIBRARIES }) || []
|
|
2619
2622
|
});
|
|
2620
|
-
},
|
|
2621
|
-
const t = X(), n =
|
|
2623
|
+
}, no = (e) => {
|
|
2624
|
+
const t = X(), n = W();
|
|
2622
2625
|
return Ae({
|
|
2623
|
-
queryKey: [
|
|
2626
|
+
queryKey: [j, I.GET_TEMPLATES_BY_TYPE, e],
|
|
2624
2627
|
enabled: !!e,
|
|
2625
2628
|
queryFn: async () => {
|
|
2626
2629
|
const s = await n(t, {
|
|
@@ -2630,22 +2633,22 @@ const no = ({
|
|
|
2630
2633
|
return (e ? Ce(s, { pageType: e }) : s) || [];
|
|
2631
2634
|
}
|
|
2632
2635
|
});
|
|
2633
|
-
},
|
|
2634
|
-
const { data: t = [], isLoading: n } =
|
|
2636
|
+
}, so = (e) => {
|
|
2637
|
+
const { data: t = [], isLoading: n } = no(e), { data: s = [], isLoading: a } = to(), i = z(() => n || a ? [] : t.map((o) => {
|
|
2635
2638
|
const c = ge(s, { id: o.library });
|
|
2636
2639
|
return {
|
|
2637
2640
|
...o,
|
|
2638
2641
|
libraryName: (c == null ? void 0 : c.type) !== "shared" ? "Site Library" : (c == null ? void 0 : c.name) + " Library",
|
|
2639
2642
|
libraryType: c == null ? void 0 : c.type
|
|
2640
2643
|
};
|
|
2641
|
-
}), [t, s, n, a]), l =
|
|
2644
|
+
}), [t, s, n, a]), l = z(() => qa(i, "libraryName"), [i]);
|
|
2642
2645
|
return {
|
|
2643
2646
|
data: i,
|
|
2644
2647
|
groupedData: l,
|
|
2645
2648
|
isLoading: n || a
|
|
2646
2649
|
};
|
|
2647
2650
|
};
|
|
2648
|
-
function
|
|
2651
|
+
function ro({
|
|
2649
2652
|
addEditPage: e,
|
|
2650
2653
|
additionalPageTypes: t = [],
|
|
2651
2654
|
close: n
|
|
@@ -2663,7 +2666,7 @@ function io({
|
|
|
2663
2666
|
(e == null ? void 0 : e.dynamic) ?? !1
|
|
2664
2667
|
), [T, D] = P(
|
|
2665
2668
|
b ? "" : ((e == null ? void 0 : e.slug) ?? "").split("/").pop() || ""
|
|
2666
|
-
), [ee, le] = P(""), { data: k, isLoading: q } =
|
|
2669
|
+
), [ee, le] = P(""), { data: k, isLoading: q } = so(d), A = l || c, M = t.find(
|
|
2667
2670
|
(f) => f.key === d
|
|
2668
2671
|
), se = (f) => {
|
|
2669
2672
|
E(f), v(""), D(""), w(!1), le(""), p(
|
|
@@ -2673,7 +2676,7 @@ function io({
|
|
|
2673
2676
|
);
|
|
2674
2677
|
}, fe = (f) => {
|
|
2675
2678
|
w(f), f && D("");
|
|
2676
|
-
},
|
|
2679
|
+
}, Y = (f) => {
|
|
2677
2680
|
if (v(f), f && f !== "none") {
|
|
2678
2681
|
const m = a == null ? void 0 : a.find(
|
|
2679
2682
|
(C) => C.id === f
|
|
@@ -2809,7 +2812,7 @@ function io({
|
|
|
2809
2812
|
!s && (y == null ? void 0 : y.hasSlug) && k.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-1", children: [
|
|
2810
2813
|
/* @__PURE__ */ r(Z, { className: "text-sm mb-1 block", children: "Template" }),
|
|
2811
2814
|
/* @__PURE__ */ r(
|
|
2812
|
-
|
|
2815
|
+
eo,
|
|
2813
2816
|
{
|
|
2814
2817
|
templates: k,
|
|
2815
2818
|
selectedTemplateId: ee,
|
|
@@ -2819,11 +2822,11 @@ function io({
|
|
|
2819
2822
|
)
|
|
2820
2823
|
] }),
|
|
2821
2824
|
/* @__PURE__ */ r(
|
|
2822
|
-
|
|
2825
|
+
Jl,
|
|
2823
2826
|
{
|
|
2824
2827
|
pages: a,
|
|
2825
2828
|
selectedParentId: S,
|
|
2826
|
-
onChange:
|
|
2829
|
+
onChange: Y
|
|
2827
2830
|
}
|
|
2828
2831
|
),
|
|
2829
2832
|
/* @__PURE__ */ u("div", { className: "space-y-0.5", children: [
|
|
@@ -2921,21 +2924,21 @@ function io({
|
|
|
2921
2924
|
}
|
|
2922
2925
|
);
|
|
2923
2926
|
}
|
|
2924
|
-
const
|
|
2927
|
+
const ao = ({
|
|
2925
2928
|
addEditPage: e,
|
|
2926
2929
|
setAddEditPage: t
|
|
2927
2930
|
}) => {
|
|
2928
2931
|
const { data: n } = ke(), s = !!(e != null && e.id);
|
|
2929
2932
|
return /* @__PURE__ */ r(He, { open: !!e, onOpenChange: () => t(void 0), children: /* @__PURE__ */ u(Ke, { className: "sm:max-w-[425px]", children: [
|
|
2930
|
-
/* @__PURE__ */ u(
|
|
2931
|
-
/* @__PURE__ */ u(
|
|
2933
|
+
/* @__PURE__ */ u(je, { children: [
|
|
2934
|
+
/* @__PURE__ */ u(Ve, { children: [
|
|
2932
2935
|
s ? "Edit" : "Add New",
|
|
2933
2936
|
" "
|
|
2934
2937
|
] }),
|
|
2935
2938
|
/* @__PURE__ */ r(Ye, { children: s ? "Update your page name" : "Enter details to create a new page" })
|
|
2936
2939
|
] }),
|
|
2937
2940
|
/* @__PURE__ */ r(
|
|
2938
|
-
|
|
2941
|
+
ro,
|
|
2939
2942
|
{
|
|
2940
2943
|
addEditPage: e,
|
|
2941
2944
|
close: () => t(void 0),
|
|
@@ -2943,18 +2946,18 @@ const lo = ({
|
|
|
2943
2946
|
}
|
|
2944
2947
|
)
|
|
2945
2948
|
] }) });
|
|
2946
|
-
},
|
|
2949
|
+
}, io = 1 * 1024 * 1024, lo = ({
|
|
2947
2950
|
page: e,
|
|
2948
2951
|
onClose: t
|
|
2949
2952
|
}) => {
|
|
2950
|
-
const [n, s] = P(!1), [a, i] = P(""), [l, o] = P(""), [c, h] = P(!1), g = ut(null), d =
|
|
2953
|
+
const [n, s] = P(!1), [a, i] = P(""), [l, o] = P(""), [c, h] = P(!1), g = ut(null), d = jl(), { data: E } = ke(), y = E == null ? void 0 : E.find(
|
|
2951
2954
|
(b) => b.key === e.pageType
|
|
2952
|
-
), p = (y == null ? void 0 : y.name) || It(e.pageType), S =
|
|
2955
|
+
), p = (y == null ? void 0 : y.name) || It(e.pageType), S = Pe(
|
|
2953
2956
|
(b) => {
|
|
2954
2957
|
var T;
|
|
2955
2958
|
const w = (T = b.target.files) == null ? void 0 : T[0];
|
|
2956
2959
|
if (w) {
|
|
2957
|
-
if (w.size >
|
|
2960
|
+
if (w.size > io) {
|
|
2958
2961
|
$.error("File too large", {
|
|
2959
2962
|
description: `Maximum file size is 1MB. Selected file is ${(w.size / 1024).toFixed(2)}KB.`
|
|
2960
2963
|
}), g.current && (g.current.value = "");
|
|
@@ -2999,8 +3002,8 @@ const lo = ({
|
|
|
2999
3002
|
);
|
|
3000
3003
|
};
|
|
3001
3004
|
return /* @__PURE__ */ r(He, { open: !0, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
|
|
3002
|
-
/* @__PURE__ */ u(
|
|
3003
|
-
/* @__PURE__ */ r(
|
|
3005
|
+
/* @__PURE__ */ u(je, { children: [
|
|
3006
|
+
/* @__PURE__ */ r(Ve, { children: "Mark as template" }),
|
|
3004
3007
|
/* @__PURE__ */ u(Ye, { className: "py-4 text-slate-500 space-y-1 text-xs", children: [
|
|
3005
3008
|
"Are you sure you want to mark this page as a template?",
|
|
3006
3009
|
/* @__PURE__ */ r("br", {}),
|
|
@@ -3010,7 +3013,7 @@ const lo = ({
|
|
|
3010
3013
|
/* @__PURE__ */ u("div", { className: "space-y-4 mb-4 text-xs", children: [
|
|
3011
3014
|
/* @__PURE__ */ u("div", { className: "p-4 border rounded bg-slate-50 space-y-3", children: [
|
|
3012
3015
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
3013
|
-
/* @__PURE__ */ r(
|
|
3016
|
+
/* @__PURE__ */ r(Bi, { className: "w-4 h-4 text-slate-500" }),
|
|
3014
3017
|
/* @__PURE__ */ r("span", { className: "font-medium text-slate-500", children: "Page Name:" }),
|
|
3015
3018
|
/* @__PURE__ */ r("span", { className: "font-semibold", children: It(e.name) })
|
|
3016
3019
|
] }),
|
|
@@ -3108,14 +3111,14 @@ const lo = ({
|
|
|
3108
3111
|
}
|
|
3109
3112
|
)
|
|
3110
3113
|
] }) });
|
|
3111
|
-
},
|
|
3114
|
+
}, oo = ({
|
|
3112
3115
|
page: e,
|
|
3113
3116
|
onClose: t
|
|
3114
3117
|
}) => {
|
|
3115
|
-
const [n, s] = P(!1), a =
|
|
3118
|
+
const [n, s] = P(!1), a = Vl();
|
|
3116
3119
|
return /* @__PURE__ */ r(He, { open: !0, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
|
|
3117
|
-
/* @__PURE__ */ u(
|
|
3118
|
-
/* @__PURE__ */ r(
|
|
3120
|
+
/* @__PURE__ */ u(je, { children: [
|
|
3121
|
+
/* @__PURE__ */ r(Ve, { children: "Unmark as template" }),
|
|
3119
3122
|
/* @__PURE__ */ r(Ye, { className: "py-4 text-slate-500 space-y-1 text-xs", children: "Are you sure you want to unmark this page as a template?" })
|
|
3120
3123
|
] }),
|
|
3121
3124
|
/* @__PURE__ */ u(
|
|
@@ -3158,10 +3161,10 @@ const lo = ({
|
|
|
3158
3161
|
setMarkAsTemplate: o,
|
|
3159
3162
|
setUnmarkAsTemplate: c
|
|
3160
3163
|
}) => {
|
|
3161
|
-
const { data: h } = ke(), { hasPermission: g } = sn(), d =
|
|
3164
|
+
const { data: h } = ke(), { hasPermission: g } = sn(), d = z(
|
|
3162
3165
|
() => ge(h, { key: t.pageType }),
|
|
3163
3166
|
[h, t.pageType]
|
|
3164
|
-
), E = ne(t, "slug", "").replace(e, "") || "/", y = !g(de.EDIT_PAGE) && !g(de.DELETE_PAGE) && !g(de.UNPUBLISH_PAGE), p =
|
|
3167
|
+
), E = ne(t, "slug", "").replace(e, "") || "/", y = !g(de.EDIT_PAGE) && !g(de.DELETE_PAGE) && !g(de.UNPUBLISH_PAGE), p = z(() => !!t.isTemplate, [t.isTemplate]), S = z(
|
|
3165
3168
|
() => !!(d != null && d.hasSlug),
|
|
3166
3169
|
[d == null ? void 0 : d.hasSlug]
|
|
3167
3170
|
);
|
|
@@ -3172,13 +3175,13 @@ const lo = ({
|
|
|
3172
3175
|
className: `rounded flex p-1.5 items-center justify-between leading-none duration-300 cursor-pointer px-3 py-1.5 ${n ? "bg-gray-200" : "hover:bg-gray-100"}`,
|
|
3173
3176
|
children: [
|
|
3174
3177
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-x-2", children: [
|
|
3175
|
-
t.dynamic ? /* @__PURE__ */ r("div", { className: "w-4 h-4 text-slate-500 stroke-[1]", children: /* @__PURE__ */ r(
|
|
3178
|
+
t.dynamic ? /* @__PURE__ */ r("div", { className: "w-4 h-4 text-slate-500 stroke-[1]", children: /* @__PURE__ */ r(Fi, { className: "w-4 h-4 text-yellow-400" }) }) : d != null && d.icon ? /* @__PURE__ */ r(
|
|
3176
3179
|
"div",
|
|
3177
3180
|
{
|
|
3178
3181
|
className: "w-4 h-4 text-slate-500 stroke-[1]",
|
|
3179
3182
|
dangerouslySetInnerHTML: { __html: d.icon }
|
|
3180
3183
|
}
|
|
3181
|
-
) : d != null && d.hasSlug ? /* @__PURE__ */ r(on, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ r(
|
|
3184
|
+
) : d != null && d.hasSlug ? /* @__PURE__ */ r(on, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ r(qi, { className: "w-4 h-4 text-slate-500 stroke-[1]" }),
|
|
3182
3185
|
/* @__PURE__ */ r(
|
|
3183
3186
|
"div",
|
|
3184
3187
|
{
|
|
@@ -3227,7 +3230,7 @@ const lo = ({
|
|
|
3227
3230
|
});
|
|
3228
3231
|
},
|
|
3229
3232
|
children: [
|
|
3230
|
-
/* @__PURE__ */ r(
|
|
3233
|
+
/* @__PURE__ */ r(Hi, { className: "size-3" }),
|
|
3231
3234
|
"Edit"
|
|
3232
3235
|
]
|
|
3233
3236
|
}
|
|
@@ -3288,8 +3291,8 @@ const lo = ({
|
|
|
3288
3291
|
]
|
|
3289
3292
|
}
|
|
3290
3293
|
);
|
|
3291
|
-
},
|
|
3292
|
-
const [, t] = P([]), [n, s] = P(""), [a, i] = P(null), [l, o] = P(null), [c, h] = P(null), [g, d] = P(null), [E, y] = P(null), { data: p, isFetching: S } = Rn(), [v, x] = P(""), { hasPermission: U } = sn(), [b, w] = Ue(), T = b.get("page"), { data: D } = ke(), ee =
|
|
3294
|
+
}, co = ({ close: e }) => {
|
|
3295
|
+
const [, t] = P([]), [n, s] = P(""), [a, i] = P(null), [l, o] = P(null), [c, h] = P(null), [g, d] = P(null), [E, y] = P(null), { data: p, isFetching: S } = Rn(), [v, x] = P(""), { hasPermission: U } = sn(), [b, w] = Ue(), T = b.get("page"), { data: D } = ke(), ee = Pe(
|
|
3293
3296
|
(A) => {
|
|
3294
3297
|
var M;
|
|
3295
3298
|
return (M = ge(D, { key: A })) == null ? void 0 : M.hasSlug;
|
|
@@ -3303,7 +3306,7 @@ const lo = ({
|
|
|
3303
3306
|
}, [D, v]);
|
|
3304
3307
|
const le = (A) => {
|
|
3305
3308
|
x(A), sessionStorage.setItem("pageTypeFilter", A);
|
|
3306
|
-
}, k =
|
|
3309
|
+
}, k = Pe(
|
|
3307
3310
|
(A) => {
|
|
3308
3311
|
const se = new URLSearchParams(window.location.search).get("lang"), fe = new URLSearchParams({ page: A });
|
|
3309
3312
|
se && fe.set("lang", se), window.history.pushState({}, "", `?${fe.toString()}`), w(fe), window.dispatchEvent(new PopStateEvent("popstate")), e();
|
|
@@ -3316,7 +3319,7 @@ const lo = ({
|
|
|
3316
3319
|
A && (A != null && A.pageType) ? t((M) => [...M, A == null ? void 0 : A.pageType]) : (window.history.replaceState(null, "", "/"), w(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate")));
|
|
3317
3320
|
}
|
|
3318
3321
|
}, [p, T, S, w]);
|
|
3319
|
-
const q =
|
|
3322
|
+
const q = z(() => {
|
|
3320
3323
|
const A = Nn(
|
|
3321
3324
|
Ce(p, (F) => me(n) ? !0 : Mt(Dt(F == null ? void 0 : F.name), Dt(n)) || Mt(Dt(F == null ? void 0 : F.slug), Dt(n)))
|
|
3322
3325
|
);
|
|
@@ -3336,20 +3339,20 @@ const lo = ({
|
|
|
3336
3339
|
}), se.sort((F, be) => F.name.localeCompare(be.name)), se.forEach((F) => {
|
|
3337
3340
|
F.children.sort((be, Qe) => be.name.localeCompare(Qe.name));
|
|
3338
3341
|
});
|
|
3339
|
-
const
|
|
3342
|
+
const Y = Ce(
|
|
3340
3343
|
fe,
|
|
3341
3344
|
(F) => !ee(F.pageType)
|
|
3342
3345
|
), he = Ce(
|
|
3343
3346
|
fe,
|
|
3344
3347
|
(F) => ee(F.pageType)
|
|
3345
3348
|
).sort((F, be) => F.name.localeCompare(be.name));
|
|
3346
|
-
return Nn([...he, ...
|
|
3349
|
+
return Nn([...he, ...Y, ...se]);
|
|
3347
3350
|
}, [p, ee, n, v]);
|
|
3348
3351
|
return /* @__PURE__ */ u("div", { className: "flex flex-col justify-between h-full", children: [
|
|
3349
3352
|
/* @__PURE__ */ u("div", { className: "flex flex-col h-full space-y-6", children: [
|
|
3350
3353
|
/* @__PURE__ */ u("div", { className: "relative flex item-center gap-x-4", children: [
|
|
3351
3354
|
/* @__PURE__ */ r(
|
|
3352
|
-
|
|
3355
|
+
Mi,
|
|
3353
3356
|
{
|
|
3354
3357
|
strokeWidth: 2.5,
|
|
3355
3358
|
className: "absolute left-3 top-2.5 h-4 w-4 text-gray-400"
|
|
@@ -3364,17 +3367,17 @@ const lo = ({
|
|
|
3364
3367
|
onChange: (A) => s(A.target.value)
|
|
3365
3368
|
}
|
|
3366
3369
|
),
|
|
3367
|
-
!me(v) && /* @__PURE__ */ u(
|
|
3370
|
+
!me(v) && /* @__PURE__ */ u(mi, { value: v, onValueChange: le, children: [
|
|
3368
3371
|
/* @__PURE__ */ r(
|
|
3369
|
-
|
|
3372
|
+
fi,
|
|
3370
3373
|
{
|
|
3371
3374
|
className: `${v === "all" ? "bg-gray-50 hover:bg-gray-100" : "bg-gray-100 hover:bg-gray-50"} min-w-[120px] h-max p-0 py-1 pl-2 pr-1 top-1.5 -mt-px absolute text-gray-600 right-1.5 w-max text-xs whitespace-nowrap ring-0 focus:ring-0 shadow-none`,
|
|
3372
|
-
children: /* @__PURE__ */ r(
|
|
3375
|
+
children: /* @__PURE__ */ r(gi, { placeholder: "Select page type" })
|
|
3373
3376
|
}
|
|
3374
3377
|
),
|
|
3375
|
-
/* @__PURE__ */ r(
|
|
3378
|
+
/* @__PURE__ */ r(pi, { align: "end", children: Fe(
|
|
3376
3379
|
Zs([{ key: "all", name: "All" }], D),
|
|
3377
|
-
(A) => /* @__PURE__ */ r(
|
|
3380
|
+
(A) => /* @__PURE__ */ r(yi, { value: ne(A, "key"), children: ne(A, "name") })
|
|
3378
3381
|
) })
|
|
3379
3382
|
] })
|
|
3380
3383
|
] }),
|
|
@@ -3453,7 +3456,7 @@ const lo = ({
|
|
|
3453
3456
|
}
|
|
3454
3457
|
),
|
|
3455
3458
|
c && /* @__PURE__ */ r(
|
|
3456
|
-
|
|
3459
|
+
ao,
|
|
3457
3460
|
{
|
|
3458
3461
|
editPage: k,
|
|
3459
3462
|
addEditPage: c,
|
|
@@ -3469,24 +3472,24 @@ const lo = ({
|
|
|
3469
3472
|
}
|
|
3470
3473
|
),
|
|
3471
3474
|
g && /* @__PURE__ */ r(
|
|
3472
|
-
|
|
3475
|
+
lo,
|
|
3473
3476
|
{
|
|
3474
3477
|
page: g,
|
|
3475
3478
|
onClose: () => d(null)
|
|
3476
3479
|
}
|
|
3477
3480
|
),
|
|
3478
3481
|
E && /* @__PURE__ */ r(
|
|
3479
|
-
|
|
3482
|
+
oo,
|
|
3480
3483
|
{
|
|
3481
3484
|
page: E,
|
|
3482
3485
|
onClose: () => y(null)
|
|
3483
3486
|
}
|
|
3484
3487
|
)
|
|
3485
3488
|
] });
|
|
3486
|
-
},
|
|
3487
|
-
const e =
|
|
3489
|
+
}, uo = () => {
|
|
3490
|
+
const e = rt("logo", null);
|
|
3488
3491
|
return e ? /* @__PURE__ */ r("div", { className: "w-full max-h-9 overflow-hidden pr-2", children: tr.createElement(e, {}) }) : null;
|
|
3489
|
-
},
|
|
3492
|
+
}, ho = () => {
|
|
3490
3493
|
const [e] = Ue(), t = e.get("page"), { data: n, isFetching: s } = Re(), [a, i] = P(!1), l = !!t && !me(n), o = !t || !s && me(n) || a;
|
|
3491
3494
|
return /* @__PURE__ */ u(we, { children: [
|
|
3492
3495
|
/* @__PURE__ */ u(
|
|
@@ -3496,7 +3499,7 @@ const lo = ({
|
|
|
3496
3499
|
className: "flex items-center w-full space-x-2 py-1",
|
|
3497
3500
|
onClick: () => i(!0),
|
|
3498
3501
|
children: [
|
|
3499
|
-
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
|
|
3502
|
+
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(Ki, { className: "h-4 w-4" }) }),
|
|
3500
3503
|
/* @__PURE__ */ u("span", { className: "truncate leading-tight flex items-center max-w-[200px]", children: [
|
|
3501
3504
|
/* @__PURE__ */ r("span", { className: "text-slate-600 pr-1 font-light", children: "Editing:" }),
|
|
3502
3505
|
s ? /* @__PURE__ */ r(_r, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : It(ne(n, "name")) ?? ""
|
|
@@ -3523,20 +3526,20 @@ const lo = ({
|
|
|
3523
3526
|
/* @__PURE__ */ r("span", { className: "text-xs text-muted-foreground", children: "Manage your site structure" })
|
|
3524
3527
|
] })
|
|
3525
3528
|
] }) }),
|
|
3526
|
-
/* @__PURE__ */ r("div", { className: "h-[calc(100vh-100px)] overflow-y-auto", children: /* @__PURE__ */ r(
|
|
3529
|
+
/* @__PURE__ */ r("div", { className: "h-[calc(100vh-100px)] overflow-y-auto", children: /* @__PURE__ */ r(co, { close: () => i(!1) }) })
|
|
3527
3530
|
]
|
|
3528
3531
|
}
|
|
3529
3532
|
)
|
|
3530
3533
|
}
|
|
3531
3534
|
)
|
|
3532
3535
|
] });
|
|
3533
|
-
},
|
|
3536
|
+
}, mo = () => {
|
|
3534
3537
|
const { fallbackLang: e, languages: t, selectedLang: n, setSelectedLang: s } = dt(), a = me(n) ? e : n, [, i] = Ue();
|
|
3535
3538
|
Se(() => {
|
|
3536
3539
|
const p = new URLSearchParams(window.location.search), S = p.get("lang");
|
|
3537
3540
|
S && (t.includes(S) ? s(S) : (p.delete("lang"), i(p), s("")));
|
|
3538
3541
|
}, [t, i, s]);
|
|
3539
|
-
const [l, o] = P(null), { data: c } = Re(), { data: h } = un(), { data: g, isFetching: d } = cn(), E =
|
|
3542
|
+
const [l, o] = P(null), { data: c } = Re(), { data: h } = un(), { data: g, isFetching: d } = cn(), E = z(() => {
|
|
3540
3543
|
const p = Nn(
|
|
3541
3544
|
Fe(ne(h, "languages"), (S) => {
|
|
3542
3545
|
const v = ge(g, { lang: S });
|
|
@@ -3565,7 +3568,7 @@ const lo = ({
|
|
|
3565
3568
|
return me(t) || d ? null : /* @__PURE__ */ u(we, { children: [
|
|
3566
3569
|
/* @__PURE__ */ u(rn, { children: [
|
|
3567
3570
|
/* @__PURE__ */ r(an, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ u(_, { variant: "ghost", size: "sm", className: "gap-2", children: [
|
|
3568
|
-
/* @__PURE__ */ r(
|
|
3571
|
+
/* @__PURE__ */ r(ji, { className: "w-4 h-4" }),
|
|
3569
3572
|
ne(qe, a, a),
|
|
3570
3573
|
/* @__PURE__ */ r(Ir, { className: "w-4 h-4" })
|
|
3571
3574
|
] }) }),
|
|
@@ -3575,7 +3578,7 @@ const lo = ({
|
|
|
3575
3578
|
(p) => /* @__PURE__ */ u(
|
|
3576
3579
|
De,
|
|
3577
3580
|
{
|
|
3578
|
-
className:
|
|
3581
|
+
className: si(
|
|
3579
3582
|
"flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
|
|
3580
3583
|
p.key === a && "!bg-gray-200 text-gray-700"
|
|
3581
3584
|
),
|
|
@@ -3587,7 +3590,7 @@ const lo = ({
|
|
|
3587
3590
|
{
|
|
3588
3591
|
className: "text-[9px] flex items-center gap-x-1 text-orange-500 leading-none",
|
|
3589
3592
|
children: [
|
|
3590
|
-
/* @__PURE__ */ r(
|
|
3593
|
+
/* @__PURE__ */ r(Vi, { fill: "orange", className: "w-2 h-2" }),
|
|
3591
3594
|
"Primary"
|
|
3592
3595
|
]
|
|
3593
3596
|
}
|
|
@@ -3598,7 +3601,7 @@ const lo = ({
|
|
|
3598
3601
|
)
|
|
3599
3602
|
),
|
|
3600
3603
|
!me(E.filter((p) => !p.isLangPageAdded)) && /* @__PURE__ */ u(we, { children: [
|
|
3601
|
-
/* @__PURE__ */ r(
|
|
3604
|
+
/* @__PURE__ */ r(vi, {}),
|
|
3602
3605
|
/* @__PURE__ */ u(
|
|
3603
3606
|
_,
|
|
3604
3607
|
{
|
|
@@ -3633,17 +3636,17 @@ const lo = ({
|
|
|
3633
3636
|
)
|
|
3634
3637
|
] });
|
|
3635
3638
|
};
|
|
3636
|
-
function
|
|
3639
|
+
function fo() {
|
|
3637
3640
|
return /* @__PURE__ */ u("div", { className: "flex relative z-10 items-center justify-end gap-1", children: [
|
|
3638
|
-
/* @__PURE__ */ r(
|
|
3639
|
-
/* @__PURE__ */ r(
|
|
3640
|
-
/* @__PURE__ */ r(
|
|
3641
|
+
/* @__PURE__ */ r(uo, {}),
|
|
3642
|
+
/* @__PURE__ */ r(ho, {}),
|
|
3643
|
+
/* @__PURE__ */ r(mo, {})
|
|
3641
3644
|
] });
|
|
3642
3645
|
}
|
|
3643
|
-
function
|
|
3644
|
-
const t = X(), n =
|
|
3646
|
+
function go(e) {
|
|
3647
|
+
const t = X(), n = W();
|
|
3645
3648
|
return Ae({
|
|
3646
|
-
queryKey: [
|
|
3649
|
+
queryKey: [j, "revisions", e],
|
|
3647
3650
|
queryFn: async () => await n(t, {
|
|
3648
3651
|
action: I.GET_PAGE_REVISIONS,
|
|
3649
3652
|
data: { pageId: e }
|
|
@@ -3653,8 +3656,8 @@ function yo(e) {
|
|
|
3653
3656
|
staleTime: 0
|
|
3654
3657
|
});
|
|
3655
3658
|
}
|
|
3656
|
-
const
|
|
3657
|
-
const e = X(), t =
|
|
3659
|
+
const po = () => {
|
|
3660
|
+
const e = X(), t = W(), n = Ne();
|
|
3658
3661
|
return xe({
|
|
3659
3662
|
mutationFn: async (s) => await t(e, {
|
|
3660
3663
|
action: I.DELETE_PAGE_REVISION,
|
|
@@ -3662,12 +3665,12 @@ const vo = () => {
|
|
|
3662
3665
|
}),
|
|
3663
3666
|
onSuccess: () => {
|
|
3664
3667
|
n.invalidateQueries({
|
|
3665
|
-
queryKey: [
|
|
3668
|
+
queryKey: [j, "revisions"]
|
|
3666
3669
|
});
|
|
3667
3670
|
}
|
|
3668
3671
|
});
|
|
3669
|
-
},
|
|
3670
|
-
const e = X(), t =
|
|
3672
|
+
}, yo = () => {
|
|
3673
|
+
const e = X(), t = W(), n = Ne();
|
|
3671
3674
|
return xe({
|
|
3672
3675
|
mutationFn: async ({
|
|
3673
3676
|
revisionId: s,
|
|
@@ -3678,25 +3681,25 @@ const vo = () => {
|
|
|
3678
3681
|
}),
|
|
3679
3682
|
onSuccess: () => {
|
|
3680
3683
|
n.invalidateQueries({
|
|
3681
|
-
queryKey: [
|
|
3684
|
+
queryKey: [j, "revisions"]
|
|
3682
3685
|
});
|
|
3683
3686
|
}
|
|
3684
3687
|
});
|
|
3685
3688
|
};
|
|
3686
|
-
function
|
|
3689
|
+
function vo() {
|
|
3687
3690
|
const { data: e } = Re(), { saveState: t } = rr(), [n] = ws();
|
|
3688
3691
|
return e ? /* @__PURE__ */ r("div", { className: "flex items-start gap-3 rounded-md border p-2 hover:bg-accent/50 bg-primary/5 mb-4", children: /* @__PURE__ */ u("div", { className: "flex-1 space-y-1", children: [
|
|
3689
3692
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ r("p", { className: "text-sm flex items-center gap-1 font-medium leading-none", children: /* @__PURE__ */ r("span", { className: "font-bold", children: "Currently editing" }) }) }),
|
|
3690
3693
|
/* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: !me(n.lastSaved) && /* @__PURE__ */ u("span", { children: [
|
|
3691
3694
|
"Last updated",
|
|
3692
3695
|
" ",
|
|
3693
|
-
|
|
3696
|
+
ll(new Date(n.lastSaved), {
|
|
3694
3697
|
addSuffix: !0
|
|
3695
3698
|
})
|
|
3696
3699
|
] }) }),
|
|
3697
3700
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-2 pt-0.5", children: [
|
|
3698
3701
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-amber-500/10 px-1.5 py-0.5 text-xs text-amber-600", children: [
|
|
3699
|
-
/* @__PURE__ */ r(
|
|
3702
|
+
/* @__PURE__ */ r(Yi, { className: "h-3 w-3" }),
|
|
3700
3703
|
/* @__PURE__ */ r("span", { children: "Draft" })
|
|
3701
3704
|
] }),
|
|
3702
3705
|
t === "UNSAVED" ? /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-red-500/10 px-1.5 py-0.5 text-xs text-red-600", children: [
|
|
@@ -3706,19 +3709,19 @@ function bo() {
|
|
|
3706
3709
|
] })
|
|
3707
3710
|
] }) }) : null;
|
|
3708
3711
|
}
|
|
3709
|
-
function
|
|
3712
|
+
function Eo() {
|
|
3710
3713
|
const [e, t] = ue.useState(!1), [n, s] = ue.useState(null), [a, i] = ue.useState(!1), [l, o] = ue.useState(!1), { data: c } = Re(), {
|
|
3711
3714
|
data: h,
|
|
3712
3715
|
isFetching: g,
|
|
3713
3716
|
error: d,
|
|
3714
3717
|
refetch: E
|
|
3715
|
-
} =
|
|
3718
|
+
} = go(c == null ? void 0 : c.id), { mutate: y, isPending: p } = po(), { mutate: S, isPending: v } = yo(), x = Ne(), U = (D) => {
|
|
3716
3719
|
n && S(
|
|
3717
3720
|
{ revisionId: n.uid, discardCurrent: D },
|
|
3718
3721
|
{
|
|
3719
3722
|
onSuccess: () => {
|
|
3720
3723
|
i(!1), s(null), x.invalidateQueries({
|
|
3721
|
-
queryKey: [
|
|
3724
|
+
queryKey: [j, I.GET_DRAFT_PAGE]
|
|
3722
3725
|
});
|
|
3723
3726
|
}
|
|
3724
3727
|
}
|
|
@@ -3739,7 +3742,7 @@ function wo() {
|
|
|
3739
3742
|
}, [e, E]), /* @__PURE__ */ u(we, { children: [
|
|
3740
3743
|
/* @__PURE__ */ r(Sr, { children: /* @__PURE__ */ u(ms, { children: [
|
|
3741
3744
|
/* @__PURE__ */ u(vr, { open: e, onOpenChange: t, children: [
|
|
3742
|
-
/* @__PURE__ */ r(
|
|
3745
|
+
/* @__PURE__ */ r(Ei, { asChild: !0, children: /* @__PURE__ */ r(fs, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
|
|
3743
3746
|
/* @__PURE__ */ u(_, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
|
|
3744
3747
|
/* @__PURE__ */ r(Rs, { className: "h-4 w-4" }),
|
|
3745
3748
|
/* @__PURE__ */ r("span", { className: "sr-only", children: "View revision history" })
|
|
@@ -3761,10 +3764,10 @@ function wo() {
|
|
|
3761
3764
|
)
|
|
3762
3765
|
] })
|
|
3763
3766
|
] }),
|
|
3764
|
-
/* @__PURE__ */ r(
|
|
3765
|
-
/* @__PURE__ */ r(
|
|
3767
|
+
/* @__PURE__ */ r(bi, { className: "h-[calc(100vh-6rem)] pr-2", children: g ? /* @__PURE__ */ r(bo, {}) : d ? /* @__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: [
|
|
3768
|
+
/* @__PURE__ */ r(vo, {}),
|
|
3766
3769
|
h == null ? void 0 : h.map((D) => /* @__PURE__ */ r(
|
|
3767
|
-
|
|
3770
|
+
wo,
|
|
3768
3771
|
{
|
|
3769
3772
|
revision: D,
|
|
3770
3773
|
isLatest: D.uid === "current",
|
|
@@ -3779,7 +3782,7 @@ function wo() {
|
|
|
3779
3782
|
/* @__PURE__ */ r(gs, { side: "bottom", children: /* @__PURE__ */ r("p", { children: "Revision history" }) })
|
|
3780
3783
|
] }) }),
|
|
3781
3784
|
/* @__PURE__ */ r(
|
|
3782
|
-
|
|
3785
|
+
No,
|
|
3783
3786
|
{
|
|
3784
3787
|
open: a,
|
|
3785
3788
|
onOpenChange: i,
|
|
@@ -3789,7 +3792,7 @@ function wo() {
|
|
|
3789
3792
|
}
|
|
3790
3793
|
),
|
|
3791
3794
|
/* @__PURE__ */ r(
|
|
3792
|
-
|
|
3795
|
+
Ao,
|
|
3793
3796
|
{
|
|
3794
3797
|
open: l,
|
|
3795
3798
|
onOpenChange: o,
|
|
@@ -3800,7 +3803,7 @@ function wo() {
|
|
|
3800
3803
|
)
|
|
3801
3804
|
] });
|
|
3802
3805
|
}
|
|
3803
|
-
function
|
|
3806
|
+
function bo() {
|
|
3804
3807
|
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: [
|
|
3805
3808
|
/* @__PURE__ */ u("div", { className: "flex-1 space-y-1", children: [
|
|
3806
3809
|
/* @__PURE__ */ r(fn, { className: "h-4 w-3/4" }),
|
|
@@ -3810,7 +3813,7 @@ function So() {
|
|
|
3810
3813
|
/* @__PURE__ */ r(fn, { className: "h-8 w-8 rounded-full" })
|
|
3811
3814
|
] }, t)) });
|
|
3812
3815
|
}
|
|
3813
|
-
function
|
|
3816
|
+
function wo({
|
|
3814
3817
|
revision: e,
|
|
3815
3818
|
isLatest: t,
|
|
3816
3819
|
onRestore: n,
|
|
@@ -3833,10 +3836,10 @@ function No({
|
|
|
3833
3836
|
] }) }),
|
|
3834
3837
|
/* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: /* @__PURE__ */ r("span", { children: Gn(e.createdAt, "MMM d, h:mm a") }) }),
|
|
3835
3838
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 pt-0.5", children: e.type === "published" ? /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-green-500/10 px-1.5 py-0.5 text-xs text-green-600", children: [
|
|
3836
|
-
/* @__PURE__ */ r(
|
|
3839
|
+
/* @__PURE__ */ r($i, { className: "h-3 w-3" }),
|
|
3837
3840
|
/* @__PURE__ */ r("span", { children: "Published" })
|
|
3838
3841
|
] }) : /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-amber-500/10 px-1.5 py-0.5 text-xs text-amber-600", children: [
|
|
3839
|
-
/* @__PURE__ */ r(
|
|
3842
|
+
/* @__PURE__ */ r(zi, { className: "h-3 w-3" }),
|
|
3840
3843
|
/* @__PURE__ */ r("span", { children: "Draft" })
|
|
3841
3844
|
] }) })
|
|
3842
3845
|
] }),
|
|
@@ -3848,7 +3851,7 @@ function No({
|
|
|
3848
3851
|
de.DELETE_REVISION
|
|
3849
3852
|
],
|
|
3850
3853
|
children: /* @__PURE__ */ r(
|
|
3851
|
-
|
|
3854
|
+
So,
|
|
3852
3855
|
{
|
|
3853
3856
|
revision: e,
|
|
3854
3857
|
onRestore: n,
|
|
@@ -3859,7 +3862,7 @@ function No({
|
|
|
3859
3862
|
)
|
|
3860
3863
|
] });
|
|
3861
3864
|
}
|
|
3862
|
-
function
|
|
3865
|
+
function So({
|
|
3863
3866
|
revision: e,
|
|
3864
3867
|
onRestore: t,
|
|
3865
3868
|
onDelete: n
|
|
@@ -3875,7 +3878,7 @@ function Ao({
|
|
|
3875
3878
|
/* @__PURE__ */ r("span", { children: "Restore this version" })
|
|
3876
3879
|
] }) }),
|
|
3877
3880
|
/* @__PURE__ */ r(Oe, { permission: de.DELETE_REVISION, children: e.uid !== "current" && /* @__PURE__ */ u(we, { children: [
|
|
3878
|
-
/* @__PURE__ */ r(
|
|
3881
|
+
/* @__PURE__ */ r(wi, {}),
|
|
3879
3882
|
/* @__PURE__ */ u(
|
|
3880
3883
|
De,
|
|
3881
3884
|
{
|
|
@@ -3891,7 +3894,7 @@ function Ao({
|
|
|
3891
3894
|
] })
|
|
3892
3895
|
] });
|
|
3893
3896
|
}
|
|
3894
|
-
function
|
|
3897
|
+
function No({
|
|
3895
3898
|
open: e,
|
|
3896
3899
|
onOpenChange: t,
|
|
3897
3900
|
revision: n,
|
|
@@ -3907,8 +3910,8 @@ function xo({
|
|
|
3907
3910
|
a || t(o);
|
|
3908
3911
|
},
|
|
3909
3912
|
children: /* @__PURE__ */ u(Ke, { className: "sm:max-w-md", children: [
|
|
3910
|
-
/* @__PURE__ */ u(
|
|
3911
|
-
/* @__PURE__ */ r(
|
|
3913
|
+
/* @__PURE__ */ u(je, { children: [
|
|
3914
|
+
/* @__PURE__ */ r(Ve, { children: "Restore Revision" }),
|
|
3912
3915
|
/* @__PURE__ */ u(Ye, { children: [
|
|
3913
3916
|
"You are about to restore to revision ",
|
|
3914
3917
|
n.uid.substring(0, 8),
|
|
@@ -3933,7 +3936,7 @@ function xo({
|
|
|
3933
3936
|
/* @__PURE__ */ r("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
|
|
3934
3937
|
"Saving as draft..."
|
|
3935
3938
|
] }) : /* @__PURE__ */ u(we, { children: [
|
|
3936
|
-
/* @__PURE__ */ r(
|
|
3939
|
+
/* @__PURE__ */ r(Wi, { className: "mr-2 h-4 w-4" }),
|
|
3937
3940
|
"Save as draft"
|
|
3938
3941
|
] })
|
|
3939
3942
|
}
|
|
@@ -3959,7 +3962,7 @@ function xo({
|
|
|
3959
3962
|
}
|
|
3960
3963
|
) : null;
|
|
3961
3964
|
}
|
|
3962
|
-
function
|
|
3965
|
+
function Ao({
|
|
3963
3966
|
open: e,
|
|
3964
3967
|
onOpenChange: t,
|
|
3965
3968
|
revision: n,
|
|
@@ -3975,8 +3978,8 @@ function To({
|
|
|
3975
3978
|
a || t(o);
|
|
3976
3979
|
},
|
|
3977
3980
|
children: /* @__PURE__ */ u(Ke, { className: "sm:max-w-md", children: [
|
|
3978
|
-
/* @__PURE__ */ u(
|
|
3979
|
-
/* @__PURE__ */ r(
|
|
3981
|
+
/* @__PURE__ */ u(je, { children: [
|
|
3982
|
+
/* @__PURE__ */ r(Ve, { children: "Delete Revision" }),
|
|
3980
3983
|
/* @__PURE__ */ u(Ye, { children: [
|
|
3981
3984
|
"You are about to delete revision ",
|
|
3982
3985
|
n.uid.substring(0, 8),
|
|
@@ -4021,38 +4024,38 @@ function To({
|
|
|
4021
4024
|
}
|
|
4022
4025
|
) : null;
|
|
4023
4026
|
}
|
|
4024
|
-
const
|
|
4025
|
-
const e = X(), t =
|
|
4027
|
+
const xo = () => {
|
|
4028
|
+
const e = X(), t = W();
|
|
4026
4029
|
return Ae({
|
|
4027
|
-
queryKey: [
|
|
4030
|
+
queryKey: [j, I.GET_CHANGES],
|
|
4028
4031
|
queryFn: async () => t(e, { action: I.GET_CHANGES })
|
|
4029
4032
|
});
|
|
4030
|
-
},
|
|
4033
|
+
}, To = ({ currentEditor: e }) => {
|
|
4031
4034
|
const { data: t } = dn(e);
|
|
4032
4035
|
return t == null ? void 0 : t.name;
|
|
4033
4036
|
};
|
|
4034
|
-
function
|
|
4037
|
+
function Co({
|
|
4035
4038
|
showModal: e = !1,
|
|
4036
4039
|
onClose: t = () => console.log("Cancelled")
|
|
4037
4040
|
}) {
|
|
4038
|
-
const [n, s] = P([]), { data: a, isFetching: i } =
|
|
4041
|
+
const [n, s] = P([]), { data: a, isFetching: i } = xo(), { data: l } = ke(), o = Pe(
|
|
4039
4042
|
(w) => {
|
|
4040
4043
|
var T;
|
|
4041
4044
|
return (T = ge(l, { key: w })) == null ? void 0 : T.hasSlug;
|
|
4042
4045
|
},
|
|
4043
4046
|
[l]
|
|
4044
|
-
), c =
|
|
4047
|
+
), c = z(
|
|
4045
4048
|
() => Ce(l, (w) => !o(w.key)).map(
|
|
4046
4049
|
(w) => w.key
|
|
4047
4050
|
),
|
|
4048
4051
|
[o, l]
|
|
4049
|
-
), h =
|
|
4052
|
+
), h = z(
|
|
4050
4053
|
() => Ce(a, (w) => !c.includes(w.pageType)),
|
|
4051
4054
|
[a, c]
|
|
4052
|
-
), g =
|
|
4055
|
+
), g = z(
|
|
4053
4056
|
() => Ce(a, (w) => c.includes(w.pageType)),
|
|
4054
4057
|
[a, c]
|
|
4055
|
-
), d =
|
|
4058
|
+
), d = z(
|
|
4056
4059
|
() => ge(a, { pageType: "theme", id: "THEME" }),
|
|
4057
4060
|
[a]
|
|
4058
4061
|
), { mutate: E, isPending: y } = Ns();
|
|
@@ -4068,7 +4071,7 @@ function _o({
|
|
|
4068
4071
|
s(p ? [] : Fe(a, "id"));
|
|
4069
4072
|
}, x = () => {
|
|
4070
4073
|
E(
|
|
4071
|
-
{ ids:
|
|
4074
|
+
{ ids: Ka(n) },
|
|
4072
4075
|
{
|
|
4073
4076
|
onSuccess: () => {
|
|
4074
4077
|
t(), Tn("CENTER_CENTER");
|
|
@@ -4079,7 +4082,7 @@ function _o({
|
|
|
4079
4082
|
if (w === "theme") return "Theme";
|
|
4080
4083
|
const T = ge(l, { key: w });
|
|
4081
4084
|
return T ? T == null ? void 0 : T.name : w;
|
|
4082
|
-
}, b =
|
|
4085
|
+
}, b = z(() => {
|
|
4083
4086
|
const w = [
|
|
4084
4087
|
{ label: "Updated", top: "pt-2" },
|
|
4085
4088
|
...mn(Ce(h, { online: !0 }), "pageType"),
|
|
@@ -4093,8 +4096,8 @@ function _o({
|
|
|
4093
4096
|
}, [h, g, d]);
|
|
4094
4097
|
return /* @__PURE__ */ r(He, { open: e, onOpenChange: y ? () => {
|
|
4095
4098
|
} : t, children: /* @__PURE__ */ u(Ke, { className: "max-w-4xl max-h-[80%] flex flex-col", children: [
|
|
4096
|
-
/* @__PURE__ */ u(
|
|
4097
|
-
/* @__PURE__ */ r(
|
|
4099
|
+
/* @__PURE__ */ u(je, { children: [
|
|
4100
|
+
/* @__PURE__ */ r(Ve, { children: "Publish changes" }),
|
|
4098
4101
|
/* @__PURE__ */ r(Ye, { className: "text-xs", children: "Select the pages you want to publish. Click publish when you're done." })
|
|
4099
4102
|
] }),
|
|
4100
4103
|
/* @__PURE__ */ r("div", { className: "relative h-full max-h-full -mx-4 overflow-y-auto no-scrollbar", children: i ? /* @__PURE__ */ u("div", { className: "px-1 space-y-2", children: [
|
|
@@ -4164,7 +4167,7 @@ function _o({
|
|
|
4164
4167
|
}
|
|
4165
4168
|
),
|
|
4166
4169
|
" ",
|
|
4167
|
-
o(w.pageType) ? /* @__PURE__ */ r(on, { className: "w-4 h-4" }) : /* @__PURE__ */ r(
|
|
4170
|
+
o(w.pageType) ? /* @__PURE__ */ r(on, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Qi, { className: "w-4 h-4" }),
|
|
4168
4171
|
w.name,
|
|
4169
4172
|
w.slug && /* @__PURE__ */ u("span", { className: "text-xs text-gray-500", children: [
|
|
4170
4173
|
"(",
|
|
@@ -4176,7 +4179,7 @@ function _o({
|
|
|
4176
4179
|
"-",
|
|
4177
4180
|
" ",
|
|
4178
4181
|
/* @__PURE__ */ r(
|
|
4179
|
-
|
|
4182
|
+
To,
|
|
4180
4183
|
{
|
|
4181
4184
|
currentEditor: w.currentEditor
|
|
4182
4185
|
}
|
|
@@ -4189,7 +4192,7 @@ function _o({
|
|
|
4189
4192
|
),
|
|
4190
4193
|
/* @__PURE__ */ r("td", { className: "px-2", children: w.lang }),
|
|
4191
4194
|
/* @__PURE__ */ r("td", { className: "px-2", children: U(w == null ? void 0 : w.pageType) }),
|
|
4192
|
-
/* @__PURE__ */ r("td", { className: "px-4 text-right", children:
|
|
4195
|
+
/* @__PURE__ */ r("td", { className: "px-4 text-right", children: Ha(w.changes) || "" })
|
|
4193
4196
|
]
|
|
4194
4197
|
},
|
|
4195
4198
|
w == null ? void 0 : w.id
|
|
@@ -4209,8 +4212,8 @@ function _o({
|
|
|
4209
4212
|
] })
|
|
4210
4213
|
] }) });
|
|
4211
4214
|
}
|
|
4212
|
-
const
|
|
4213
|
-
const e =
|
|
4215
|
+
const Po = () => {
|
|
4216
|
+
const e = W(), t = X();
|
|
4214
4217
|
return Ae({
|
|
4215
4218
|
queryKey: [I.GET_WEBSITE_DATA],
|
|
4216
4219
|
staleTime: 1e3 * 60 * 5,
|
|
@@ -4220,10 +4223,10 @@ const Io = () => {
|
|
|
4220
4223
|
})
|
|
4221
4224
|
});
|
|
4222
4225
|
};
|
|
4223
|
-
function
|
|
4224
|
-
const { data: t, isFetching: n } =
|
|
4226
|
+
function _o({ onClose: e }) {
|
|
4227
|
+
const { data: t, isFetching: n } = Po(), { mutateAsync: s, isPending: a } = wl(), i = rt("settingComponent", null), l = ja(async (o) => (await s({ data: o }), !0), 300);
|
|
4225
4228
|
return i ? /* @__PURE__ */ r(He, { open: !0, onOpenChange: e, children: /* @__PURE__ */ u(Ke, { className: "w-full", children: [
|
|
4226
|
-
/* @__PURE__ */ r(
|
|
4229
|
+
/* @__PURE__ */ r(je, { children: /* @__PURE__ */ r(Ve, { children: "Website Settings" }) }),
|
|
4227
4230
|
n ? /* @__PURE__ */ u("div", { className: "w-full space-y-3 py-4", children: [
|
|
4228
4231
|
/* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
|
|
4229
4232
|
/* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
|
|
@@ -4240,7 +4243,7 @@ function ko({ onClose: e }) {
|
|
|
4240
4243
|
}) })
|
|
4241
4244
|
] }) }) : null;
|
|
4242
4245
|
}
|
|
4243
|
-
function
|
|
4246
|
+
function jr({
|
|
4244
4247
|
children: e,
|
|
4245
4248
|
content: t
|
|
4246
4249
|
}) {
|
|
@@ -4249,14 +4252,14 @@ function Vr({
|
|
|
4249
4252
|
/* @__PURE__ */ r(gs, { side: "bottom", sideOffset: 10, children: /* @__PURE__ */ r("p", { children: t }) })
|
|
4250
4253
|
] }) });
|
|
4251
4254
|
}
|
|
4252
|
-
const
|
|
4253
|
-
const { selectedLang: e } = dt(), t =
|
|
4255
|
+
const Io = () => {
|
|
4256
|
+
const { selectedLang: e } = dt(), t = rt("getPreviewUrl", async (g) => g), [n, s] = P(""), { data: a, isFetching: i } = Re(), { data: l } = cn(), { data: o } = ke(), c = z(
|
|
4254
4257
|
() => {
|
|
4255
4258
|
var g;
|
|
4256
4259
|
return (g = l == null ? void 0 : l.find((d) => (d == null ? void 0 : d.lang) === e)) == null ? void 0 : g.slug;
|
|
4257
4260
|
},
|
|
4258
4261
|
[e, l]
|
|
4259
|
-
), h =
|
|
4262
|
+
), h = Pe(
|
|
4260
4263
|
(g) => {
|
|
4261
4264
|
var d;
|
|
4262
4265
|
return (d = ge(o, { key: g })) == null ? void 0 : d.hasSlug;
|
|
@@ -4276,22 +4279,22 @@ const Lo = () => {
|
|
|
4276
4279
|
" ",
|
|
4277
4280
|
B.PREVIEW
|
|
4278
4281
|
] }) }) });
|
|
4279
|
-
},
|
|
4280
|
-
const [e, t] =
|
|
4282
|
+
}, ko = () => {
|
|
4283
|
+
const [e, t] = ri();
|
|
4281
4284
|
return /* @__PURE__ */ u(we, { children: [
|
|
4282
|
-
/* @__PURE__ */ r(
|
|
4285
|
+
/* @__PURE__ */ r(jr, { content: B.THEME, children: /* @__PURE__ */ r(
|
|
4283
4286
|
_,
|
|
4284
4287
|
{
|
|
4285
4288
|
variant: e === "theme" ? "outline" : "ghost",
|
|
4286
4289
|
size: "icon",
|
|
4287
4290
|
className: "gap-2",
|
|
4288
4291
|
onClick: () => t(e === "theme" ? "block" : "theme"),
|
|
4289
|
-
children: /* @__PURE__ */ r(
|
|
4292
|
+
children: /* @__PURE__ */ r(Xi, { className: "w-4 h-4" })
|
|
4290
4293
|
}
|
|
4291
4294
|
) }),
|
|
4292
4295
|
/* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
|
|
4293
4296
|
] });
|
|
4294
|
-
},
|
|
4297
|
+
}, Lo = () => {
|
|
4295
4298
|
const [e, t] = P(!1), { isLocked: n } = hn(), { savePage: s, saveState: a } = rr();
|
|
4296
4299
|
Se(() => {
|
|
4297
4300
|
const g = (d) => {
|
|
@@ -4301,16 +4304,16 @@ const Lo = () => {
|
|
|
4301
4304
|
window.removeEventListener("beforeunload", g);
|
|
4302
4305
|
};
|
|
4303
4306
|
}, [a]);
|
|
4304
|
-
const i =
|
|
4307
|
+
const i = Pe(async () => {
|
|
4305
4308
|
t(!0), await s(!1);
|
|
4306
4309
|
}, [s]);
|
|
4307
4310
|
Se(() => {
|
|
4308
4311
|
a === "SAVED" && t(!1);
|
|
4309
4312
|
}, [a]);
|
|
4310
|
-
const l =
|
|
4313
|
+
const l = z(() => {
|
|
4311
4314
|
if (a === "SAVED" || a === "UNSAVED") return a;
|
|
4312
4315
|
if (a === "SAVING") return e ? a : "SAVED";
|
|
4313
|
-
}, [e, a]), { buttonIcon: o, buttonClass: c, tooltipContent: h } =
|
|
4316
|
+
}, [e, a]), { buttonIcon: o, buttonClass: c, tooltipContent: h } = z(() => {
|
|
4314
4317
|
switch (l) {
|
|
4315
4318
|
case "UNSAVED":
|
|
4316
4319
|
return {
|
|
@@ -4327,7 +4330,7 @@ const Lo = () => {
|
|
|
4327
4330
|
case "SAVED":
|
|
4328
4331
|
return {
|
|
4329
4332
|
tooltipContent: B.SAVED,
|
|
4330
|
-
buttonIcon: /* @__PURE__ */ r(
|
|
4333
|
+
buttonIcon: /* @__PURE__ */ r(Zi, { className: "w-4 h-4" }),
|
|
4331
4334
|
buttonClass: "text-green-500 flex items-center gap-x-1 leading-tight"
|
|
4332
4335
|
};
|
|
4333
4336
|
}
|
|
@@ -4346,8 +4349,8 @@ const Lo = () => {
|
|
|
4346
4349
|
]
|
|
4347
4350
|
}
|
|
4348
4351
|
);
|
|
4349
|
-
},
|
|
4350
|
-
const [e, t] = P(!1), [n, s] = P(!1), [a, i] = P(null), { data: l } = Re(), { mutate: o, isPending: c } = Ns(), [h] =
|
|
4352
|
+
}, Do = () => {
|
|
4353
|
+
const [e, t] = P(!1), [n, s] = P(!1), [a, i] = P(null), { data: l } = Re(), { mutate: o, isPending: c } = Ns(), [h] = ai(), { buttonText: g, buttonClassName: d, isPublished: E } = z(() => {
|
|
4351
4354
|
const p = l && (l == null ? void 0 : l.online);
|
|
4352
4355
|
return {
|
|
4353
4356
|
buttonClassName: p ? "hover:bg-green-600 bg-green-500" : "",
|
|
@@ -4443,7 +4446,7 @@ const Lo = () => {
|
|
|
4443
4446
|
] })
|
|
4444
4447
|
] })
|
|
4445
4448
|
] }),
|
|
4446
|
-
/* @__PURE__ */ r(
|
|
4449
|
+
/* @__PURE__ */ r(Co, { showModal: e, onClose: () => t(!1) }),
|
|
4447
4450
|
a && /* @__PURE__ */ r(
|
|
4448
4451
|
xs,
|
|
4449
4452
|
{
|
|
@@ -4452,25 +4455,25 @@ const Lo = () => {
|
|
|
4452
4455
|
}
|
|
4453
4456
|
)
|
|
4454
4457
|
] });
|
|
4455
|
-
},
|
|
4456
|
-
const e =
|
|
4458
|
+
}, Go = () => {
|
|
4459
|
+
const e = rt("settingComponent", null), [t, n] = P(!1);
|
|
4457
4460
|
return e ? /* @__PURE__ */ u(we, { children: [
|
|
4458
|
-
/* @__PURE__ */ r(
|
|
4461
|
+
/* @__PURE__ */ r(jr, { content: B.WEBSITEDATA, children: /* @__PURE__ */ r(
|
|
4459
4462
|
_,
|
|
4460
4463
|
{
|
|
4461
4464
|
variant: "ghost",
|
|
4462
4465
|
size: "icon",
|
|
4463
4466
|
className: "gap-2",
|
|
4464
4467
|
onClick: () => n(!0),
|
|
4465
|
-
children: /* @__PURE__ */ r(
|
|
4468
|
+
children: /* @__PURE__ */ r(Ji, { className: "w-4 h-4" })
|
|
4466
4469
|
}
|
|
4467
4470
|
) }),
|
|
4468
|
-
t && /* @__PURE__ */ r(
|
|
4471
|
+
t && /* @__PURE__ */ r(_o, { onClose: () => n(!1) }),
|
|
4469
4472
|
/* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
|
|
4470
4473
|
] }) : null;
|
|
4471
|
-
},
|
|
4474
|
+
}, Uo = () => {
|
|
4472
4475
|
const { data: e } = Re(), t = e && (e == null ? void 0 : e.online), { data: n } = ke();
|
|
4473
|
-
return
|
|
4476
|
+
return Pe(
|
|
4474
4477
|
(a) => {
|
|
4475
4478
|
var i;
|
|
4476
4479
|
return (i = ge(n, { key: a })) == null ? void 0 : i.hasSlug;
|
|
@@ -4485,91 +4488,91 @@ const Lo = () => {
|
|
|
4485
4488
|
size: "sm",
|
|
4486
4489
|
className: "flex items-center gap-1",
|
|
4487
4490
|
children: [
|
|
4488
|
-
/* @__PURE__ */ r(
|
|
4491
|
+
/* @__PURE__ */ r(el, { className: "w-4 h-4" }),
|
|
4489
4492
|
/* @__PURE__ */ r("span", { className: "hidden sm:inline", children: B.OPEN })
|
|
4490
4493
|
]
|
|
4491
4494
|
}
|
|
4492
4495
|
) : null;
|
|
4493
4496
|
};
|
|
4494
|
-
function
|
|
4497
|
+
function Ro() {
|
|
4495
4498
|
const { isLocked: e } = hn(), [t] = Ue(), n = t.get("lang"), s = Br(n);
|
|
4496
4499
|
return e || !s ? null : /* @__PURE__ */ u("div", { className: "flex items-center justify-end gap-1", children: [
|
|
4497
|
-
/* @__PURE__ */ r(
|
|
4498
|
-
/* @__PURE__ */ r(Oe, { permission: de.EDIT_THEME, children: /* @__PURE__ */ r(
|
|
4499
|
-
/* @__PURE__ */ r(Oe, { permission: de.EDIT_SETTINGS, children: /* @__PURE__ */ r(
|
|
4500
|
-
/* @__PURE__ */ r(
|
|
4501
|
-
/* @__PURE__ */ r(Oe, { permission: de.SAVE_PAGE, children: /* @__PURE__ */ r(
|
|
4502
|
-
/* @__PURE__ */ r(Oe, { permission: de.PUBLISH_PAGE, children: /* @__PURE__ */ r(
|
|
4503
|
-
/* @__PURE__ */ r(
|
|
4500
|
+
/* @__PURE__ */ r(Eo, {}),
|
|
4501
|
+
/* @__PURE__ */ r(Oe, { permission: de.EDIT_THEME, children: /* @__PURE__ */ r(ko, {}) }),
|
|
4502
|
+
/* @__PURE__ */ r(Oe, { permission: de.EDIT_SETTINGS, children: /* @__PURE__ */ r(Go, {}) }),
|
|
4503
|
+
/* @__PURE__ */ r(Io, {}),
|
|
4504
|
+
/* @__PURE__ */ r(Oe, { permission: de.SAVE_PAGE, children: /* @__PURE__ */ r(Lo, {}) }),
|
|
4505
|
+
/* @__PURE__ */ r(Oe, { permission: de.PUBLISH_PAGE, children: /* @__PURE__ */ r(Do, {}) }),
|
|
4506
|
+
/* @__PURE__ */ r(Uo, {})
|
|
4504
4507
|
] });
|
|
4505
4508
|
}
|
|
4506
|
-
const
|
|
4507
|
-
/* @__PURE__ */ r(
|
|
4508
|
-
/* @__PURE__ */ r(
|
|
4509
|
-
] }),
|
|
4510
|
-
const e = X(), { aiContext: t } = bs(), n =
|
|
4511
|
-
return
|
|
4509
|
+
const Oo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-center justify-between w-full", children: [
|
|
4510
|
+
/* @__PURE__ */ r(fo, {}),
|
|
4511
|
+
/* @__PURE__ */ r(Ro, {})
|
|
4512
|
+
] }), Bo = () => {
|
|
4513
|
+
const e = X(), { aiContext: t } = bs(), n = W();
|
|
4514
|
+
return Pe(
|
|
4512
4515
|
async (s, a, i, l) => n(e, {
|
|
4513
4516
|
action: I.ASK_AI,
|
|
4514
4517
|
data: { type: s, prompt: a, blocks: i, context: t, lang: l }
|
|
4515
4518
|
}),
|
|
4516
4519
|
[e, t, n]
|
|
4517
4520
|
);
|
|
4518
|
-
},
|
|
4521
|
+
}, Mo = (e, t) => t.map((n) => {
|
|
4519
4522
|
if (nn(e, n._type)) {
|
|
4520
|
-
const s =
|
|
4523
|
+
const s = cl(n._type);
|
|
4521
4524
|
return {
|
|
4522
4525
|
...s,
|
|
4523
4526
|
...er(n, [
|
|
4524
|
-
...
|
|
4527
|
+
...Va(s),
|
|
4525
4528
|
"_type",
|
|
4526
4529
|
"_id",
|
|
4527
4530
|
"_name",
|
|
4528
4531
|
"_parent",
|
|
4529
4532
|
"_bindings"
|
|
4530
4533
|
]),
|
|
4531
|
-
|
|
4534
|
+
...$a(n, (a, i) => Js(i, "_attrs")),
|
|
4532
4535
|
...n
|
|
4533
4536
|
};
|
|
4534
4537
|
}
|
|
4535
4538
|
return n;
|
|
4536
|
-
}),
|
|
4537
|
-
const t =
|
|
4538
|
-
return
|
|
4539
|
+
}), Fo = (e) => {
|
|
4540
|
+
const t = ol();
|
|
4541
|
+
return z(() => {
|
|
4539
4542
|
if (!e || me(e)) return { blocks: [] };
|
|
4540
4543
|
const n = Ce(
|
|
4541
4544
|
e,
|
|
4542
4545
|
(s) => !Mt(s == null ? void 0 : s._type, "@chai/")
|
|
4543
4546
|
);
|
|
4544
|
-
return { blocks:
|
|
4547
|
+
return { blocks: Mo(t, n) };
|
|
4545
4548
|
}, [e, t]);
|
|
4546
|
-
},
|
|
4547
|
-
const e = X(), t =
|
|
4549
|
+
}, qo = () => {
|
|
4550
|
+
const e = X(), t = W();
|
|
4548
4551
|
return Ae({
|
|
4549
|
-
queryKey: [
|
|
4552
|
+
queryKey: [j, "uiLibraries"],
|
|
4550
4553
|
initialData: [],
|
|
4551
4554
|
queryFn: async () => (await t(e, { action: "GET_LIBRARIES" })).map((s) => ({
|
|
4552
4555
|
...s
|
|
4553
4556
|
}))
|
|
4554
4557
|
});
|
|
4555
|
-
},
|
|
4556
|
-
const e = Un(), t =
|
|
4558
|
+
}, Ho = () => {
|
|
4559
|
+
const e = Un(), t = W(), { user: n } = st(), s = n == null ? void 0 : n.id;
|
|
4557
4560
|
return Ae({
|
|
4558
|
-
queryKey: [
|
|
4561
|
+
queryKey: [j, "permissions", s],
|
|
4559
4562
|
queryFn: () => t(e, {
|
|
4560
4563
|
action: I.GET_ROLE_AND_PERMISSIONS,
|
|
4561
4564
|
data: { userId: s }
|
|
4562
4565
|
}),
|
|
4563
4566
|
enabled: !!s
|
|
4564
4567
|
});
|
|
4565
|
-
},
|
|
4566
|
-
const e = X(), t =
|
|
4568
|
+
}, Ko = () => {
|
|
4569
|
+
const e = X(), t = W(), { setCurrentEditor: n } = hn(), [, s] = ws();
|
|
4567
4570
|
return { getUILibraryBlock: async (o, c) => {
|
|
4568
4571
|
const h = await t(e, {
|
|
4569
4572
|
action: "GET_LIBRARY_ITEM",
|
|
4570
4573
|
data: { id: c.id }
|
|
4571
4574
|
}), g = ne(h, "html", ""), d = ne(h, "blocks", []);
|
|
4572
|
-
return
|
|
4575
|
+
return za(d) ? d : ii(g);
|
|
4573
4576
|
}, getUILibraryBlocks: async (o) => {
|
|
4574
4577
|
try {
|
|
4575
4578
|
return (await t(e, {
|
|
@@ -4600,10 +4603,10 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4600
4603
|
return console.error(h), new Error("Failed to save blocks");
|
|
4601
4604
|
}
|
|
4602
4605
|
} };
|
|
4603
|
-
},
|
|
4604
|
-
const { data: e } = Rn(), t = X(), n =
|
|
4606
|
+
}, jo = () => {
|
|
4607
|
+
const { data: e } = Rn(), t = X(), n = W();
|
|
4605
4608
|
return {
|
|
4606
|
-
getPartialBlocks:
|
|
4609
|
+
getPartialBlocks: Pe(async () => {
|
|
4607
4610
|
const s = {};
|
|
4608
4611
|
for (const a of e ?? [])
|
|
4609
4612
|
me(a == null ? void 0 : a.slug) && (s[a.id] = {
|
|
@@ -4613,7 +4616,7 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4613
4616
|
});
|
|
4614
4617
|
return s;
|
|
4615
4618
|
}, [e]),
|
|
4616
|
-
getPartialBlockBlocks:
|
|
4619
|
+
getPartialBlockBlocks: Pe(
|
|
4617
4620
|
async (s) => {
|
|
4618
4621
|
if (!s) return [];
|
|
4619
4622
|
try {
|
|
@@ -4632,8 +4635,8 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4632
4635
|
}, Fs = An.object({
|
|
4633
4636
|
email: An.string().email({ message: "Please enter a valid email address" }),
|
|
4634
4637
|
password: An.string().min(6, { message: "Password must be at least 6 characters" })
|
|
4635
|
-
}),
|
|
4636
|
-
const { setUser: e } =
|
|
4638
|
+
}), Vo = () => {
|
|
4639
|
+
const { setUser: e } = st(), t = Un(), [n, s] = P(""), [a, i] = P(""), [l, o] = P({}), [c, h] = P(!1), [g, d] = P(""), E = xe({
|
|
4637
4640
|
mutationFn: async (S) => {
|
|
4638
4641
|
d("");
|
|
4639
4642
|
const v = await Es(t, {
|
|
@@ -4675,7 +4678,7 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4675
4678
|
return /* @__PURE__ */ r("div", { className: "flex justify-center items-center min-h-screen bg-slate-50", children: /* @__PURE__ */ u(os, { className: "w-full max-w-md", children: [
|
|
4676
4679
|
/* @__PURE__ */ u(cs, { children: [
|
|
4677
4680
|
/* @__PURE__ */ r(us, { className: "text-2xl", children: "Sign in" }),
|
|
4678
|
-
/* @__PURE__ */ r(
|
|
4681
|
+
/* @__PURE__ */ r(Si, { children: "Enter your credentials to sign in to visual builder" })
|
|
4679
4682
|
] }),
|
|
4680
4683
|
/* @__PURE__ */ r(ds, { children: /* @__PURE__ */ u("form", { onSubmit: y, className: "space-y-4", children: [
|
|
4681
4684
|
/* @__PURE__ */ u("div", { className: "space-y-1", children: [
|
|
@@ -4713,7 +4716,7 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4713
4716
|
type: "button",
|
|
4714
4717
|
className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",
|
|
4715
4718
|
onClick: () => h(!c),
|
|
4716
|
-
children: c ? /* @__PURE__ */ r(
|
|
4719
|
+
children: c ? /* @__PURE__ */ r(tl, { className: "h-4 w-4" }) : /* @__PURE__ */ r(Dr, { className: "h-4 w-4" })
|
|
4717
4720
|
}
|
|
4718
4721
|
)
|
|
4719
4722
|
] }),
|
|
@@ -4775,24 +4778,24 @@ const Mo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4775
4778
|
] })
|
|
4776
4779
|
] }) });
|
|
4777
4780
|
};
|
|
4778
|
-
let Wn =
|
|
4779
|
-
const
|
|
4781
|
+
let Wn = Vo;
|
|
4782
|
+
const $o = () => z(() => Wn, [Wn]), Qu = (e) => {
|
|
4780
4783
|
Wn = e;
|
|
4781
|
-
},
|
|
4782
|
-
const e =
|
|
4783
|
-
return /* @__PURE__ */ r(
|
|
4784
|
-
},
|
|
4784
|
+
}, zo = () => {
|
|
4785
|
+
const e = $o();
|
|
4786
|
+
return /* @__PURE__ */ r(Ya, { fallback: /* @__PURE__ */ r("div", { children: "Loading..." }), children: /* @__PURE__ */ r(e, {}) });
|
|
4787
|
+
}, Wo = ({
|
|
4785
4788
|
isActive: e,
|
|
4786
4789
|
show: t
|
|
4787
4790
|
}) => {
|
|
4788
4791
|
const { data: n } = un();
|
|
4789
|
-
return !nn(n, "languages") || !ne(n, "languages", []).length ? null : /* @__PURE__ */ r(_, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ r(
|
|
4790
|
-
},
|
|
4791
|
-
id:
|
|
4792
|
+
return !nn(n, "languages") || !ne(n, "languages", []).length ? null : /* @__PURE__ */ r(_, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ r(nl, { className: "w-4 h-4" }) });
|
|
4793
|
+
}, Vr = "lang", Yo = {
|
|
4794
|
+
id: Vr,
|
|
4792
4795
|
label: "Languages",
|
|
4793
4796
|
position: "top",
|
|
4794
|
-
panel:
|
|
4795
|
-
button:
|
|
4797
|
+
panel: Zl,
|
|
4798
|
+
button: Wo,
|
|
4796
4799
|
view: "modal",
|
|
4797
4800
|
width: 400
|
|
4798
4801
|
};
|
|
@@ -4833,23 +4836,23 @@ function Ze({
|
|
|
4833
4836
|
role: "combobox",
|
|
4834
4837
|
"aria-expanded": a,
|
|
4835
4838
|
disabled: s,
|
|
4836
|
-
children: /* @__PURE__ */ r(
|
|
4839
|
+
children: /* @__PURE__ */ r(sl, { className: "h-3 w-3" })
|
|
4837
4840
|
}
|
|
4838
4841
|
) }) }),
|
|
4839
4842
|
/* @__PURE__ */ r(gs, { children: "Add field" })
|
|
4840
4843
|
] }),
|
|
4841
|
-
/* @__PURE__ */ r(pr, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ u(
|
|
4842
|
-
/* @__PURE__ */ r(
|
|
4843
|
-
/* @__PURE__ */ u(
|
|
4844
|
-
/* @__PURE__ */ r(
|
|
4845
|
-
/* @__PURE__ */ u(
|
|
4844
|
+
/* @__PURE__ */ r(pr, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ u(Ni, { children: [
|
|
4845
|
+
/* @__PURE__ */ r(Ai, { className: "border-none", placeholder: "Search..." }),
|
|
4846
|
+
/* @__PURE__ */ u(xi, { children: [
|
|
4847
|
+
/* @__PURE__ */ r(Ti, { children: "No option found." }),
|
|
4848
|
+
/* @__PURE__ */ u(Ci, { children: [
|
|
4846
4849
|
l.length > 0 && /* @__PURE__ */ u(
|
|
4847
4850
|
Gs,
|
|
4848
4851
|
{
|
|
4849
4852
|
onSelect: E,
|
|
4850
4853
|
className: "flex items-center text-sm",
|
|
4851
4854
|
children: [
|
|
4852
|
-
/* @__PURE__ */ r(
|
|
4855
|
+
/* @__PURE__ */ r(rl, { className: "w-4 h-4 mr-2" }),
|
|
4853
4856
|
"Back"
|
|
4854
4857
|
]
|
|
4855
4858
|
}
|
|
@@ -4874,7 +4877,7 @@ function Ze({
|
|
|
4874
4877
|
children: "Select"
|
|
4875
4878
|
}
|
|
4876
4879
|
),
|
|
4877
|
-
(p.type === "object" || p.type === "array") && /* @__PURE__ */ r("div", { className: "p-1 rounded hover:bg-muted cursor-pointer", children: /* @__PURE__ */ r(
|
|
4880
|
+
(p.type === "object" || p.type === "array") && /* @__PURE__ */ r("div", { className: "p-1 rounded hover:bg-muted cursor-pointer", children: /* @__PURE__ */ r(al, { className: "w-4 h-4 opacity-50" }) })
|
|
4878
4881
|
] })
|
|
4879
4882
|
]
|
|
4880
4883
|
},
|
|
@@ -4885,10 +4888,10 @@ function Ze({
|
|
|
4885
4888
|
] }) })
|
|
4886
4889
|
] });
|
|
4887
4890
|
}
|
|
4888
|
-
const
|
|
4891
|
+
const Qo = () => {
|
|
4889
4892
|
const { selectedLang: e } = dt(), { data: t, isFetching: n } = cn();
|
|
4890
|
-
return { data:
|
|
4891
|
-
},
|
|
4893
|
+
return { data: z(() => ge(t, { lang: e || "" }) || {}, [t, e]), isFetching: n };
|
|
4894
|
+
}, Xo = (e, t) => {
|
|
4892
4895
|
const n = e.selectionStart || 0, s = e.selectionEnd || 0, a = e.value, i = a.substring(0, n), l = a.substring(s);
|
|
4893
4896
|
let o = !1;
|
|
4894
4897
|
if (n > 0 && i.length > 0) {
|
|
@@ -4907,10 +4910,10 @@ const Zo = () => {
|
|
|
4907
4910
|
newCursorPos: y
|
|
4908
4911
|
};
|
|
4909
4912
|
}, $r = () => {
|
|
4910
|
-
const { t: e } =
|
|
4913
|
+
const { t: e } = li(), { selectedLang: t, fallbackLang: n, languages: s } = dt(), [, a] = oi(), { data: i } = Re(), { data: l } = Fr({
|
|
4911
4914
|
lang: t || n,
|
|
4912
4915
|
pageType: i == null ? void 0 : i.pageType
|
|
4913
|
-
}), { data: o, isFetching: c } =
|
|
4916
|
+
}), { data: o, isFetching: c } = Qo(), h = o == null ? void 0 : o.seo, g = ut(
|
|
4914
4917
|
null
|
|
4915
4918
|
), [d, E] = P({
|
|
4916
4919
|
title: "",
|
|
@@ -4966,7 +4969,7 @@ const Zo = () => {
|
|
|
4966
4969
|
}, ee = (k, q) => {
|
|
4967
4970
|
const A = document.getElementById(q);
|
|
4968
4971
|
if (A) {
|
|
4969
|
-
const { value: M, newCursorPos: se } =
|
|
4972
|
+
const { value: M, newCursorPos: se } = Xo(
|
|
4970
4973
|
A,
|
|
4971
4974
|
k
|
|
4972
4975
|
);
|
|
@@ -4981,14 +4984,14 @@ const Zo = () => {
|
|
|
4981
4984
|
const F = document.getElementById(q);
|
|
4982
4985
|
F && (F.focus(), F.setSelectionRange(se, se));
|
|
4983
4986
|
}, he);
|
|
4984
|
-
})) : (E((
|
|
4985
|
-
...
|
|
4987
|
+
})) : (E((Y) => ({
|
|
4988
|
+
...Y,
|
|
4986
4989
|
[A.name]: M
|
|
4987
4990
|
})), requestAnimationFrame(() => {
|
|
4988
|
-
const
|
|
4991
|
+
const Y = document.getElementById(
|
|
4989
4992
|
q
|
|
4990
4993
|
);
|
|
4991
|
-
|
|
4994
|
+
Y && (Y.focus(), Y.setSelectionRange(se, se), setTimeout(() => {
|
|
4992
4995
|
const he = document.getElementById(
|
|
4993
4996
|
q
|
|
4994
4997
|
);
|
|
@@ -5004,7 +5007,7 @@ const Zo = () => {
|
|
|
5004
5007
|
E(q), y.current.updated = q;
|
|
5005
5008
|
};
|
|
5006
5009
|
return /* @__PURE__ */ u("div", { className: "relative h-full flex flex-col", children: [
|
|
5007
|
-
!b && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ r(yr, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ r(
|
|
5010
|
+
!b && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ r(yr, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ r(Pi, { children: e(
|
|
5008
5011
|
"You don't have permission to edit SEO settings. Contact your administrator for access."
|
|
5009
5012
|
) }) }) }),
|
|
5010
5013
|
/* @__PURE__ */ u("div", { className: "flex-grow overflow-y-auto no-scrollbar px-2", children: [
|
|
@@ -5019,7 +5022,7 @@ const Zo = () => {
|
|
|
5019
5022
|
")"
|
|
5020
5023
|
] })
|
|
5021
5024
|
] }),
|
|
5022
|
-
/* @__PURE__ */ r("form", { className: "space-y-8", children: /* @__PURE__ */ u(
|
|
5025
|
+
/* @__PURE__ */ r("form", { className: "space-y-8", children: /* @__PURE__ */ u(_i, { type: "multiple", defaultValue: ["page"], children: [
|
|
5023
5026
|
/* @__PURE__ */ u(gn, { value: "page", children: [
|
|
5024
5027
|
/* @__PURE__ */ r(pn, { className: "font-semibold text-slate-700", children: e("SEO") }),
|
|
5025
5028
|
/* @__PURE__ */ r(yn, { className: "pt-2", children: /* @__PURE__ */ u("div", { className: "space-y-4", children: [
|
|
@@ -5348,11 +5351,11 @@ const Zo = () => {
|
|
|
5348
5351
|
] });
|
|
5349
5352
|
};
|
|
5350
5353
|
$r.displayName = "SeoPanel";
|
|
5351
|
-
const zr = "seo",
|
|
5354
|
+
const zr = "seo", Zo = ({
|
|
5352
5355
|
isActive: e,
|
|
5353
5356
|
show: t
|
|
5354
5357
|
}) => {
|
|
5355
|
-
const { data: n } = Re(), s =
|
|
5358
|
+
const { data: n } = Re(), s = Fl(n == null ? void 0 : n.pageType);
|
|
5356
5359
|
return !nn(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ r(
|
|
5357
5360
|
_,
|
|
5358
5361
|
{
|
|
@@ -5375,21 +5378,21 @@ const zr = "seo", ec = ({
|
|
|
5375
5378
|
)
|
|
5376
5379
|
}
|
|
5377
5380
|
);
|
|
5378
|
-
},
|
|
5381
|
+
}, Jo = {
|
|
5379
5382
|
id: zr,
|
|
5380
5383
|
label: "SEO",
|
|
5381
5384
|
panel: $r,
|
|
5382
|
-
button:
|
|
5385
|
+
button: Zo,
|
|
5383
5386
|
position: "top",
|
|
5384
5387
|
view: "modal",
|
|
5385
5388
|
width: 600
|
|
5386
|
-
},
|
|
5387
|
-
zn(zr,
|
|
5388
|
-
},
|
|
5389
|
-
const { user: e, logout: t } =
|
|
5390
|
-
return e ? /* @__PURE__ */ u(
|
|
5391
|
-
/* @__PURE__ */ r(
|
|
5392
|
-
/* @__PURE__ */ u(
|
|
5389
|
+
}, ec = () => {
|
|
5390
|
+
zn(zr, Jo), zn(Vr, Yo);
|
|
5391
|
+
}, tc = "user-info", nc = () => {
|
|
5392
|
+
const { user: e, logout: t } = st();
|
|
5393
|
+
return e ? /* @__PURE__ */ u(Ii, { children: [
|
|
5394
|
+
/* @__PURE__ */ r(ki, { asChild: !0, children: /* @__PURE__ */ r(_, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ r(il, { className: "w-4 h-4" }) }) }),
|
|
5395
|
+
/* @__PURE__ */ u(Li, { className: "w-auto p-4 space-y-2", children: [
|
|
5393
5396
|
/* @__PURE__ */ r("div", { className: "text-sm font-medium", children: e.name ?? e.email }),
|
|
5394
5397
|
/* @__PURE__ */ r("div", { className: "text-xs text-muted-foreground", children: e.email }),
|
|
5395
5398
|
/* @__PURE__ */ u(ar, { children: [
|
|
@@ -5407,10 +5410,10 @@ const zr = "seo", ec = ({
|
|
|
5407
5410
|
] })
|
|
5408
5411
|
] })
|
|
5409
5412
|
] }) : null;
|
|
5410
|
-
},
|
|
5411
|
-
id:
|
|
5413
|
+
}, sc = {
|
|
5414
|
+
id: tc,
|
|
5412
5415
|
label: "User Info",
|
|
5413
|
-
button:
|
|
5416
|
+
button: nc,
|
|
5414
5417
|
position: "bottom"
|
|
5415
5418
|
};
|
|
5416
5419
|
var O = {
|
|
@@ -5432,21 +5435,21 @@ function qs(e) {
|
|
|
5432
5435
|
function Ut(e) {
|
|
5433
5436
|
O.context = e;
|
|
5434
5437
|
}
|
|
5435
|
-
var
|
|
5436
|
-
equals:
|
|
5437
|
-
}, Qr = na,
|
|
5438
|
+
var rc = (e, t) => e === t, Cn = Symbol("solid-proxy"), Wr = typeof Proxy == "function", Yr = Symbol("solid-track"), Pn = {
|
|
5439
|
+
equals: rc
|
|
5440
|
+
}, Qr = na, tt = 1, _n = 2, Xr = {
|
|
5438
5441
|
owned: null,
|
|
5439
5442
|
cleanups: null,
|
|
5440
5443
|
context: null,
|
|
5441
5444
|
owner: null
|
|
5442
|
-
}, Kn = {}, J = null,
|
|
5445
|
+
}, Kn = {}, J = null, jn = null, ac = null, ae = null, Ie = null, Je = null, On = 0;
|
|
5443
5446
|
function ot(e, t) {
|
|
5444
5447
|
const n = ae, s = J, a = e.length === 0, i = t === void 0 ? s : t, l = a ? Xr : {
|
|
5445
5448
|
owned: null,
|
|
5446
5449
|
cleanups: null,
|
|
5447
5450
|
context: i ? i.context : null,
|
|
5448
5451
|
owner: i
|
|
5449
|
-
}, o = a ? e : () => e(() =>
|
|
5452
|
+
}, o = a ? e : () => e(() => _e(() => qt(l)));
|
|
5450
5453
|
J = l, ae = null;
|
|
5451
5454
|
try {
|
|
5452
5455
|
return We(o, !0);
|
|
@@ -5464,17 +5467,17 @@ function Ee(e, t) {
|
|
|
5464
5467
|
}, s = (a) => (typeof a == "function" && (a = a(n.value)), ta(n, a));
|
|
5465
5468
|
return [ea.bind(n), s];
|
|
5466
5469
|
}
|
|
5467
|
-
function
|
|
5468
|
-
const s = Bn(e, t, !0,
|
|
5470
|
+
function ic(e, t, n) {
|
|
5471
|
+
const s = Bn(e, t, !0, tt);
|
|
5469
5472
|
Lt(s);
|
|
5470
5473
|
}
|
|
5471
5474
|
function ct(e, t, n) {
|
|
5472
|
-
const s = Bn(e, t, !1,
|
|
5475
|
+
const s = Bn(e, t, !1, tt);
|
|
5473
5476
|
Lt(s);
|
|
5474
5477
|
}
|
|
5475
5478
|
function Zr(e, t, n) {
|
|
5476
|
-
Qr =
|
|
5477
|
-
const s = Bn(e, t, !1,
|
|
5479
|
+
Qr = pc;
|
|
5480
|
+
const s = Bn(e, t, !1, tt);
|
|
5478
5481
|
(!n || !n.render) && (s.user = !0), Je ? Je.push(s) : Lt(s);
|
|
5479
5482
|
}
|
|
5480
5483
|
function Ge(e, t, n) {
|
|
@@ -5482,10 +5485,10 @@ function Ge(e, t, n) {
|
|
|
5482
5485
|
const s = Bn(e, t, !0, 0);
|
|
5483
5486
|
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, Lt(s), ea.bind(s);
|
|
5484
5487
|
}
|
|
5485
|
-
function
|
|
5488
|
+
function lc(e) {
|
|
5486
5489
|
return e && typeof e == "object" && "then" in e;
|
|
5487
5490
|
}
|
|
5488
|
-
function
|
|
5491
|
+
function oc(e, t, n) {
|
|
5489
5492
|
let s, a, i;
|
|
5490
5493
|
arguments.length === 1 ? (s = !0, a = e, i = {}) : (s = e, a = t, i = {});
|
|
5491
5494
|
let l = null, o = Kn, c = null, h = !1, g = "initialValue" in i, d = typeof s == "function" && Ge(s);
|
|
@@ -5509,7 +5512,7 @@ function uc(e, t, n) {
|
|
|
5509
5512
|
}, !1);
|
|
5510
5513
|
}
|
|
5511
5514
|
function ee() {
|
|
5512
|
-
const k =
|
|
5515
|
+
const k = mc, q = y(), A = S();
|
|
5513
5516
|
if (A !== void 0 && !l)
|
|
5514
5517
|
throw A;
|
|
5515
5518
|
return ae && ae.user, q;
|
|
@@ -5520,16 +5523,16 @@ function uc(e, t, n) {
|
|
|
5520
5523
|
h = !1;
|
|
5521
5524
|
const q = d ? d() : s;
|
|
5522
5525
|
if (q == null || q === !1) {
|
|
5523
|
-
T(l,
|
|
5526
|
+
T(l, _e(y));
|
|
5524
5527
|
return;
|
|
5525
5528
|
}
|
|
5526
|
-
const A = o !== Kn ? o :
|
|
5529
|
+
const A = o !== Kn ? o : _e(
|
|
5527
5530
|
() => a(q, {
|
|
5528
5531
|
value: y(),
|
|
5529
5532
|
refetching: k
|
|
5530
5533
|
})
|
|
5531
5534
|
);
|
|
5532
|
-
return
|
|
5535
|
+
return lc(A) ? (l = A, "value" in A ? (A.status === "success" ? T(l, A.value, void 0, q) : T(l, void 0, Yn(A.value), q), A) : (h = !0, queueMicrotask(() => h = !1), We(() => {
|
|
5533
5536
|
w(g ? "refreshing" : "pending"), U();
|
|
5534
5537
|
}, !1), A.then(
|
|
5535
5538
|
(M) => T(A, M, void 0, q),
|
|
@@ -5559,7 +5562,7 @@ function uc(e, t, n) {
|
|
|
5559
5562
|
return y();
|
|
5560
5563
|
}
|
|
5561
5564
|
}
|
|
5562
|
-
}), d ?
|
|
5565
|
+
}), d ? ic(() => le(!1)) : le(!1), [
|
|
5563
5566
|
ee,
|
|
5564
5567
|
{
|
|
5565
5568
|
refetch: le,
|
|
@@ -5567,10 +5570,10 @@ function uc(e, t, n) {
|
|
|
5567
5570
|
}
|
|
5568
5571
|
];
|
|
5569
5572
|
}
|
|
5570
|
-
function
|
|
5573
|
+
function Xu(e) {
|
|
5571
5574
|
return We(e, !1);
|
|
5572
5575
|
}
|
|
5573
|
-
function
|
|
5576
|
+
function _e(e) {
|
|
5574
5577
|
if (ae === null)
|
|
5575
5578
|
return e();
|
|
5576
5579
|
const t = ae;
|
|
@@ -5581,7 +5584,7 @@ function Pe(e) {
|
|
|
5581
5584
|
ae = t;
|
|
5582
5585
|
}
|
|
5583
5586
|
}
|
|
5584
|
-
function
|
|
5587
|
+
function Zu(e, t, n) {
|
|
5585
5588
|
const s = Array.isArray(e);
|
|
5586
5589
|
let a, i = n && n.defer;
|
|
5587
5590
|
return (l) => {
|
|
@@ -5594,12 +5597,12 @@ function ed(e, t, n) {
|
|
|
5594
5597
|
o = e();
|
|
5595
5598
|
if (i)
|
|
5596
5599
|
return i = !1, l;
|
|
5597
|
-
const c =
|
|
5600
|
+
const c = _e(() => t(o, a, l));
|
|
5598
5601
|
return a = o, c;
|
|
5599
5602
|
};
|
|
5600
5603
|
}
|
|
5601
|
-
function
|
|
5602
|
-
Zr(() =>
|
|
5604
|
+
function cc(e) {
|
|
5605
|
+
Zr(() => _e(e));
|
|
5603
5606
|
}
|
|
5604
5607
|
function Ft(e) {
|
|
5605
5608
|
return J === null || (J.cleanups === null ? J.cleanups = [e] : J.cleanups.push(e)), e;
|
|
@@ -5607,7 +5610,7 @@ function Ft(e) {
|
|
|
5607
5610
|
function Hs() {
|
|
5608
5611
|
return J;
|
|
5609
5612
|
}
|
|
5610
|
-
function
|
|
5613
|
+
function uc(e, t) {
|
|
5611
5614
|
const n = J, s = ae;
|
|
5612
5615
|
J = e, ae = null;
|
|
5613
5616
|
try {
|
|
@@ -5618,7 +5621,7 @@ function hc(e, t) {
|
|
|
5618
5621
|
J = n, ae = s;
|
|
5619
5622
|
}
|
|
5620
5623
|
}
|
|
5621
|
-
function
|
|
5624
|
+
function dc(e) {
|
|
5622
5625
|
const t = ae, n = J;
|
|
5623
5626
|
return Promise.resolve().then(() => {
|
|
5624
5627
|
ae = t, J = n;
|
|
@@ -5626,19 +5629,19 @@ function mc(e) {
|
|
|
5626
5629
|
return We(e, !1), ae = J = null, s ? s.done : void 0;
|
|
5627
5630
|
});
|
|
5628
5631
|
}
|
|
5629
|
-
var [
|
|
5630
|
-
function
|
|
5631
|
-
return [
|
|
5632
|
+
var [hc, Ju] = /* @__PURE__ */ Ee(!1);
|
|
5633
|
+
function ed() {
|
|
5634
|
+
return [hc, dc];
|
|
5632
5635
|
}
|
|
5633
|
-
function
|
|
5636
|
+
function td(e, t) {
|
|
5634
5637
|
const n = Symbol("context");
|
|
5635
5638
|
return {
|
|
5636
5639
|
id: n,
|
|
5637
|
-
Provider:
|
|
5640
|
+
Provider: yc(n),
|
|
5638
5641
|
defaultValue: e
|
|
5639
5642
|
};
|
|
5640
5643
|
}
|
|
5641
|
-
function
|
|
5644
|
+
function nd(e) {
|
|
5642
5645
|
let t;
|
|
5643
5646
|
return J && J.context && (t = J.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
5644
5647
|
}
|
|
@@ -5649,14 +5652,14 @@ function Jr(e) {
|
|
|
5649
5652
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
5650
5653
|
}, n;
|
|
5651
5654
|
}
|
|
5652
|
-
var
|
|
5655
|
+
var mc;
|
|
5653
5656
|
function ea() {
|
|
5654
5657
|
if (this.sources && this.state)
|
|
5655
|
-
if (this.state ===
|
|
5658
|
+
if (this.state === tt)
|
|
5656
5659
|
Lt(this);
|
|
5657
5660
|
else {
|
|
5658
|
-
const e =
|
|
5659
|
-
|
|
5661
|
+
const e = Ie;
|
|
5662
|
+
Ie = null, We(() => kn(this), !1), Ie = e;
|
|
5660
5663
|
}
|
|
5661
5664
|
if (ae) {
|
|
5662
5665
|
const e = this.observers ? this.observers.length : 0;
|
|
@@ -5668,11 +5671,11 @@ function ta(e, t, n) {
|
|
|
5668
5671
|
let s = e.value;
|
|
5669
5672
|
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && We(() => {
|
|
5670
5673
|
for (let a = 0; a < e.observers.length; a += 1) {
|
|
5671
|
-
const i = e.observers[a], l =
|
|
5672
|
-
l &&
|
|
5674
|
+
const i = e.observers[a], l = jn && jn.running;
|
|
5675
|
+
l && jn.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? Ie.push(i) : Je.push(i), i.observers && sa(i)), l || (i.state = tt);
|
|
5673
5676
|
}
|
|
5674
|
-
if (
|
|
5675
|
-
throw
|
|
5677
|
+
if (Ie.length > 1e6)
|
|
5678
|
+
throw Ie = [], new Error();
|
|
5676
5679
|
}, !1)), t;
|
|
5677
5680
|
}
|
|
5678
5681
|
function Lt(e) {
|
|
@@ -5680,26 +5683,26 @@ function Lt(e) {
|
|
|
5680
5683
|
return;
|
|
5681
5684
|
qt(e);
|
|
5682
5685
|
const t = On;
|
|
5683
|
-
|
|
5686
|
+
fc(
|
|
5684
5687
|
e,
|
|
5685
5688
|
e.value,
|
|
5686
5689
|
t
|
|
5687
5690
|
);
|
|
5688
5691
|
}
|
|
5689
|
-
function
|
|
5692
|
+
function fc(e, t, n) {
|
|
5690
5693
|
let s;
|
|
5691
5694
|
const a = J, i = ae;
|
|
5692
5695
|
ae = J = e;
|
|
5693
5696
|
try {
|
|
5694
5697
|
s = e.fn(t);
|
|
5695
5698
|
} catch (l) {
|
|
5696
|
-
return e.pure && (e.state =
|
|
5699
|
+
return e.pure && (e.state = tt, e.owned && e.owned.forEach(qt), e.owned = null), e.updatedAt = n + 1, Ts(l);
|
|
5697
5700
|
} finally {
|
|
5698
5701
|
ae = i, J = a;
|
|
5699
5702
|
}
|
|
5700
5703
|
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? ta(e, s) : e.value = s, e.updatedAt = n);
|
|
5701
5704
|
}
|
|
5702
|
-
function Bn(e, t, n, s =
|
|
5705
|
+
function Bn(e, t, n, s = tt, a) {
|
|
5703
5706
|
const i = {
|
|
5704
5707
|
fn: e,
|
|
5705
5708
|
state: s,
|
|
@@ -5720,33 +5723,33 @@ function In(e) {
|
|
|
5720
5723
|
return;
|
|
5721
5724
|
if (e.state === _n)
|
|
5722
5725
|
return kn(e);
|
|
5723
|
-
if (e.suspense &&
|
|
5726
|
+
if (e.suspense && _e(e.suspense.inFallback))
|
|
5724
5727
|
return e.suspense.effects.push(e);
|
|
5725
5728
|
const t = [e];
|
|
5726
5729
|
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < On); )
|
|
5727
5730
|
e.state && t.push(e);
|
|
5728
5731
|
for (let n = t.length - 1; n >= 0; n--)
|
|
5729
|
-
if (e = t[n], e.state ===
|
|
5732
|
+
if (e = t[n], e.state === tt)
|
|
5730
5733
|
Lt(e);
|
|
5731
5734
|
else if (e.state === _n) {
|
|
5732
|
-
const s =
|
|
5733
|
-
|
|
5735
|
+
const s = Ie;
|
|
5736
|
+
Ie = null, We(() => kn(e, t[0]), !1), Ie = s;
|
|
5734
5737
|
}
|
|
5735
5738
|
}
|
|
5736
5739
|
function We(e, t) {
|
|
5737
|
-
if (
|
|
5740
|
+
if (Ie)
|
|
5738
5741
|
return e();
|
|
5739
5742
|
let n = !1;
|
|
5740
|
-
t || (
|
|
5743
|
+
t || (Ie = []), Je ? n = !0 : Je = [], On++;
|
|
5741
5744
|
try {
|
|
5742
5745
|
const s = e();
|
|
5743
|
-
return
|
|
5746
|
+
return gc(n), s;
|
|
5744
5747
|
} catch (s) {
|
|
5745
|
-
n || (Je = null),
|
|
5748
|
+
n || (Je = null), Ie = null, Ts(s);
|
|
5746
5749
|
}
|
|
5747
5750
|
}
|
|
5748
|
-
function
|
|
5749
|
-
if (
|
|
5751
|
+
function gc(e) {
|
|
5752
|
+
if (Ie && (na(Ie), Ie = null), e)
|
|
5750
5753
|
return;
|
|
5751
5754
|
const t = Je;
|
|
5752
5755
|
Je = null, t.length && We(() => Qr(t), !1);
|
|
@@ -5755,7 +5758,7 @@ function na(e) {
|
|
|
5755
5758
|
for (let t = 0; t < e.length; t++)
|
|
5756
5759
|
In(e[t]);
|
|
5757
5760
|
}
|
|
5758
|
-
function
|
|
5761
|
+
function pc(e) {
|
|
5759
5762
|
let t, n = 0;
|
|
5760
5763
|
for (t = 0; t < e.length; t++) {
|
|
5761
5764
|
const s = e[t];
|
|
@@ -5777,14 +5780,14 @@ function kn(e, t) {
|
|
|
5777
5780
|
const s = e.sources[n];
|
|
5778
5781
|
if (s.sources) {
|
|
5779
5782
|
const a = s.state;
|
|
5780
|
-
a ===
|
|
5783
|
+
a === tt ? s !== t && (!s.updatedAt || s.updatedAt < On) && In(s) : a === _n && kn(s, t);
|
|
5781
5784
|
}
|
|
5782
5785
|
}
|
|
5783
5786
|
}
|
|
5784
5787
|
function sa(e) {
|
|
5785
5788
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
5786
5789
|
const n = e.observers[t];
|
|
5787
|
-
n.state || (n.state = _n, n.pure ?
|
|
5790
|
+
n.state || (n.state = _n, n.pure ? Ie.push(n) : Je.push(n), n.observers && sa(n));
|
|
5788
5791
|
}
|
|
5789
5792
|
}
|
|
5790
5793
|
function qt(e) {
|
|
@@ -5835,11 +5838,11 @@ function Qn(e) {
|
|
|
5835
5838
|
}
|
|
5836
5839
|
return e;
|
|
5837
5840
|
}
|
|
5838
|
-
function
|
|
5841
|
+
function yc(e, t) {
|
|
5839
5842
|
return function(s) {
|
|
5840
5843
|
let a;
|
|
5841
5844
|
return ct(
|
|
5842
|
-
() => a =
|
|
5845
|
+
() => a = _e(() => (J.context = {
|
|
5843
5846
|
...J.context,
|
|
5844
5847
|
[e]: s.value
|
|
5845
5848
|
}, Jr(() => s.children))),
|
|
@@ -5852,11 +5855,11 @@ function Ln(e) {
|
|
|
5852
5855
|
for (let t = 0; t < e.length; t++)
|
|
5853
5856
|
e[t]();
|
|
5854
5857
|
}
|
|
5855
|
-
function
|
|
5858
|
+
function vc(e, t, n = {}) {
|
|
5856
5859
|
let s = [], a = [], i = [], l = 0, o = t.length > 1 ? [] : null;
|
|
5857
5860
|
return Ft(() => Ln(i)), () => {
|
|
5858
5861
|
let c = e() || [], h = c.length, g, d;
|
|
5859
|
-
return c[Yr],
|
|
5862
|
+
return c[Yr], _e(() => {
|
|
5860
5863
|
let y, p, S, v, x, U, b, w, T;
|
|
5861
5864
|
if (h === 0)
|
|
5862
5865
|
l !== 0 && (Ln(i), i = [], s = [], a = [], l = 0, o && (o = [])), n.fallback && (s = [Xn], a[0] = ot((D) => (i[0] = D, n.fallback())), l = 1);
|
|
@@ -5888,11 +5891,11 @@ function bc(e, t, n = {}) {
|
|
|
5888
5891
|
}
|
|
5889
5892
|
};
|
|
5890
5893
|
}
|
|
5891
|
-
function
|
|
5894
|
+
function Ec(e, t, n = {}) {
|
|
5892
5895
|
let s = [], a = [], i = [], l = [], o = 0, c;
|
|
5893
5896
|
return Ft(() => Ln(i)), () => {
|
|
5894
5897
|
const h = e() || [], g = h.length;
|
|
5895
|
-
return h[Yr],
|
|
5898
|
+
return h[Yr], _e(() => {
|
|
5896
5899
|
if (g === 0)
|
|
5897
5900
|
return o !== 0 && (Ln(i), i = [], s = [], a = [], o = 0, l = []), n.fallback && (s = [Xn], a[0] = ot((E) => (i[0] = E, n.fallback())), o = 1), a;
|
|
5898
5901
|
for (s[0] === Xn && (i[0](), i = [], s = [], a = [], o = 0), c = 0; c < g; c++)
|
|
@@ -5909,7 +5912,7 @@ function wc(e, t, n = {}) {
|
|
|
5909
5912
|
};
|
|
5910
5913
|
}
|
|
5911
5914
|
function ra(e, t) {
|
|
5912
|
-
return
|
|
5915
|
+
return _e(() => e(t || {}));
|
|
5913
5916
|
}
|
|
5914
5917
|
function vn() {
|
|
5915
5918
|
return !0;
|
|
@@ -5938,10 +5941,10 @@ var Zn = {
|
|
|
5938
5941
|
return e.keys();
|
|
5939
5942
|
}
|
|
5940
5943
|
};
|
|
5941
|
-
function
|
|
5944
|
+
function Vn(e) {
|
|
5942
5945
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
5943
5946
|
}
|
|
5944
|
-
function
|
|
5947
|
+
function bc() {
|
|
5945
5948
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
5946
5949
|
const n = this[e]();
|
|
5947
5950
|
if (n !== void 0)
|
|
@@ -5959,21 +5962,21 @@ function aa(...e) {
|
|
|
5959
5962
|
{
|
|
5960
5963
|
get(l) {
|
|
5961
5964
|
for (let o = e.length - 1; o >= 0; o--) {
|
|
5962
|
-
const c =
|
|
5965
|
+
const c = Vn(e[o])[l];
|
|
5963
5966
|
if (c !== void 0)
|
|
5964
5967
|
return c;
|
|
5965
5968
|
}
|
|
5966
5969
|
},
|
|
5967
5970
|
has(l) {
|
|
5968
5971
|
for (let o = e.length - 1; o >= 0; o--)
|
|
5969
|
-
if (l in
|
|
5972
|
+
if (l in Vn(e[o]))
|
|
5970
5973
|
return !0;
|
|
5971
5974
|
return !1;
|
|
5972
5975
|
},
|
|
5973
5976
|
keys() {
|
|
5974
5977
|
const l = [];
|
|
5975
5978
|
for (let o = 0; o < e.length; o++)
|
|
5976
|
-
l.push(...Object.keys(
|
|
5979
|
+
l.push(...Object.keys(Vn(e[o])));
|
|
5977
5980
|
return [...new Set(l)];
|
|
5978
5981
|
}
|
|
5979
5982
|
},
|
|
@@ -5994,7 +5997,7 @@ function aa(...e) {
|
|
|
5994
5997
|
s[g] = d.get ? {
|
|
5995
5998
|
enumerable: !0,
|
|
5996
5999
|
configurable: !0,
|
|
5997
|
-
get:
|
|
6000
|
+
get: bc.bind(n[g] = [d.get.bind(o)])
|
|
5998
6001
|
} : d.value !== void 0 ? d : void 0;
|
|
5999
6002
|
else {
|
|
6000
6003
|
const E = n[g];
|
|
@@ -6009,7 +6012,7 @@ function aa(...e) {
|
|
|
6009
6012
|
}
|
|
6010
6013
|
return a;
|
|
6011
6014
|
}
|
|
6012
|
-
function
|
|
6015
|
+
function wc(e, ...t) {
|
|
6013
6016
|
if (Wr && Cn in e) {
|
|
6014
6017
|
const a = new Set(t.length > 1 ? t.flat() : t[0]), i = t.map((l) => new Proxy(
|
|
6015
6018
|
{
|
|
@@ -6062,12 +6065,12 @@ function ia(e) {
|
|
|
6062
6065
|
!O.done && Ut(i), O.count--, c(() => h.default), Ut();
|
|
6063
6066
|
}), t = o;
|
|
6064
6067
|
} else if (!t) {
|
|
6065
|
-
const [o] =
|
|
6068
|
+
const [o] = oc(() => (n || (n = e())).then((c) => c.default));
|
|
6066
6069
|
t = o;
|
|
6067
6070
|
}
|
|
6068
6071
|
let l;
|
|
6069
6072
|
return Ge(
|
|
6070
|
-
() => (l = t()) ?
|
|
6073
|
+
() => (l = t()) ? _e(() => {
|
|
6071
6074
|
if (!i || O.done)
|
|
6072
6075
|
return l(a);
|
|
6073
6076
|
const o = O.context;
|
|
@@ -6079,24 +6082,24 @@ function ia(e) {
|
|
|
6079
6082
|
};
|
|
6080
6083
|
return s.preload = () => n || ((n = e()).then((a) => t = () => a.default), n), s;
|
|
6081
6084
|
}
|
|
6082
|
-
var
|
|
6083
|
-
function
|
|
6084
|
-
return O.context ? O.getNextContextId() : `cl-${
|
|
6085
|
+
var Sc = 0;
|
|
6086
|
+
function sd() {
|
|
6087
|
+
return O.context ? O.getNextContextId() : `cl-${Sc++}`;
|
|
6085
6088
|
}
|
|
6086
6089
|
var la = (e) => `Stale read from <${e}>.`;
|
|
6087
|
-
function
|
|
6090
|
+
function rd(e) {
|
|
6088
6091
|
const t = "fallback" in e && {
|
|
6089
6092
|
fallback: () => e.fallback
|
|
6090
6093
|
};
|
|
6091
|
-
return Ge(
|
|
6094
|
+
return Ge(vc(() => e.each, e.children, t || void 0));
|
|
6092
6095
|
}
|
|
6093
|
-
function
|
|
6096
|
+
function ad(e) {
|
|
6094
6097
|
const t = "fallback" in e && {
|
|
6095
6098
|
fallback: () => e.fallback
|
|
6096
6099
|
};
|
|
6097
|
-
return Ge(
|
|
6100
|
+
return Ge(Ec(() => e.each, e.children, t || void 0));
|
|
6098
6101
|
}
|
|
6099
|
-
function
|
|
6102
|
+
function id(e) {
|
|
6100
6103
|
const t = e.keyed, n = Ge(() => e.when, void 0, {
|
|
6101
6104
|
equals: (s, a) => t ? s === a : !s == !a
|
|
6102
6105
|
});
|
|
@@ -6105,10 +6108,10 @@ function od(e) {
|
|
|
6105
6108
|
const s = n();
|
|
6106
6109
|
if (s) {
|
|
6107
6110
|
const a = e.children;
|
|
6108
|
-
return typeof a == "function" && a.length > 0 ?
|
|
6111
|
+
return typeof a == "function" && a.length > 0 ? _e(
|
|
6109
6112
|
() => a(
|
|
6110
6113
|
t ? s : () => {
|
|
6111
|
-
if (!
|
|
6114
|
+
if (!_e(n))
|
|
6112
6115
|
throw la("Show");
|
|
6113
6116
|
return e.when;
|
|
6114
6117
|
}
|
|
@@ -6121,7 +6124,7 @@ function od(e) {
|
|
|
6121
6124
|
void 0
|
|
6122
6125
|
);
|
|
6123
6126
|
}
|
|
6124
|
-
function
|
|
6127
|
+
function ld(e) {
|
|
6125
6128
|
let t = !1;
|
|
6126
6129
|
const n = (i, l) => (t ? i[1] === l[1] : !i[1] == !l[1]) && i[2] === l[2], s = Jr(() => e.children), a = Ge(
|
|
6127
6130
|
() => {
|
|
@@ -6145,10 +6148,10 @@ function cd(e) {
|
|
|
6145
6148
|
if (i < 0)
|
|
6146
6149
|
return e.fallback;
|
|
6147
6150
|
const c = o.children;
|
|
6148
|
-
return typeof c == "function" && c.length > 0 ?
|
|
6151
|
+
return typeof c == "function" && c.length > 0 ? _e(
|
|
6149
6152
|
() => c(
|
|
6150
6153
|
t ? l : () => {
|
|
6151
|
-
if (
|
|
6154
|
+
if (_e(a)[0] !== i)
|
|
6152
6155
|
throw la("Match");
|
|
6153
6156
|
return o.when;
|
|
6154
6157
|
}
|
|
@@ -6159,10 +6162,10 @@ function cd(e) {
|
|
|
6159
6162
|
void 0
|
|
6160
6163
|
);
|
|
6161
6164
|
}
|
|
6162
|
-
function
|
|
6165
|
+
function od(e) {
|
|
6163
6166
|
return e;
|
|
6164
6167
|
}
|
|
6165
|
-
var
|
|
6168
|
+
var Nc = [
|
|
6166
6169
|
"allowfullscreen",
|
|
6167
6170
|
"async",
|
|
6168
6171
|
"autofocus",
|
|
@@ -6188,7 +6191,7 @@ var xc = [
|
|
|
6188
6191
|
"reversed",
|
|
6189
6192
|
"seamless",
|
|
6190
6193
|
"selected"
|
|
6191
|
-
],
|
|
6194
|
+
], Ac = /* @__PURE__ */ new Set([
|
|
6192
6195
|
"className",
|
|
6193
6196
|
"value",
|
|
6194
6197
|
"readOnly",
|
|
@@ -6196,16 +6199,16 @@ var xc = [
|
|
|
6196
6199
|
"isMap",
|
|
6197
6200
|
"noModule",
|
|
6198
6201
|
"playsInline",
|
|
6199
|
-
...
|
|
6200
|
-
]),
|
|
6202
|
+
...Nc
|
|
6203
|
+
]), xc = /* @__PURE__ */ new Set([
|
|
6201
6204
|
"innerHTML",
|
|
6202
6205
|
"textContent",
|
|
6203
6206
|
"innerText",
|
|
6204
6207
|
"children"
|
|
6205
|
-
]),
|
|
6208
|
+
]), Tc = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
6206
6209
|
className: "class",
|
|
6207
6210
|
htmlFor: "for"
|
|
6208
|
-
}),
|
|
6211
|
+
}), Cc = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
6209
6212
|
class: "className",
|
|
6210
6213
|
formnovalidate: {
|
|
6211
6214
|
$: "formNoValidate",
|
|
@@ -6230,11 +6233,11 @@ var xc = [
|
|
|
6230
6233
|
TEXTAREA: 1
|
|
6231
6234
|
}
|
|
6232
6235
|
});
|
|
6233
|
-
function
|
|
6234
|
-
const n =
|
|
6236
|
+
function Pc(e, t) {
|
|
6237
|
+
const n = Cc[e];
|
|
6235
6238
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
6236
6239
|
}
|
|
6237
|
-
var
|
|
6240
|
+
var _c = /* @__PURE__ */ new Set([
|
|
6238
6241
|
"beforeinput",
|
|
6239
6242
|
"click",
|
|
6240
6243
|
"dblclick",
|
|
@@ -6257,7 +6260,7 @@ var kc = /* @__PURE__ */ new Set([
|
|
|
6257
6260
|
"touchend",
|
|
6258
6261
|
"touchmove",
|
|
6259
6262
|
"touchstart"
|
|
6260
|
-
]),
|
|
6263
|
+
]), Ic = /* @__PURE__ */ new Set([
|
|
6261
6264
|
"altGlyph",
|
|
6262
6265
|
"altGlyphDef",
|
|
6263
6266
|
"altGlyphItem",
|
|
@@ -6335,11 +6338,11 @@ var kc = /* @__PURE__ */ new Set([
|
|
|
6335
6338
|
"use",
|
|
6336
6339
|
"view",
|
|
6337
6340
|
"vkern"
|
|
6338
|
-
]),
|
|
6341
|
+
]), kc = {
|
|
6339
6342
|
xlink: "http://www.w3.org/1999/xlink",
|
|
6340
6343
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
6341
6344
|
};
|
|
6342
|
-
function
|
|
6345
|
+
function Lc(e, t, n) {
|
|
6343
6346
|
let s = n.length, a = t.length, i = s, l = 0, o = 0, c = t[a - 1].nextSibling, h = null;
|
|
6344
6347
|
for (; l < a || o < i; ) {
|
|
6345
6348
|
if (t[l] === n[o]) {
|
|
@@ -6393,7 +6396,7 @@ function oa(e, t, n, s = {}) {
|
|
|
6393
6396
|
a(), t.textContent = "";
|
|
6394
6397
|
};
|
|
6395
6398
|
}
|
|
6396
|
-
function
|
|
6399
|
+
function cd(e, t, n) {
|
|
6397
6400
|
let s;
|
|
6398
6401
|
const a = () => {
|
|
6399
6402
|
const l = document.createElement("template");
|
|
@@ -6401,14 +6404,14 @@ function dd(e, t, n) {
|
|
|
6401
6404
|
}, i = () => (s || (s = a())).cloneNode(!0);
|
|
6402
6405
|
return i.cloneNode = i, i;
|
|
6403
6406
|
}
|
|
6404
|
-
function
|
|
6407
|
+
function Dc(e, t = window.document) {
|
|
6405
6408
|
const n = t[Ot] || (t[Ot] = /* @__PURE__ */ new Set());
|
|
6406
6409
|
for (let s = 0, a = e.length; s < a; s++) {
|
|
6407
6410
|
const i = e[s];
|
|
6408
6411
|
n.has(i) || (n.add(i), t.addEventListener(i, ca));
|
|
6409
6412
|
}
|
|
6410
6413
|
}
|
|
6411
|
-
function
|
|
6414
|
+
function ud(e = window.document) {
|
|
6412
6415
|
if (e[Ot]) {
|
|
6413
6416
|
for (let t of e[Ot].keys())
|
|
6414
6417
|
e.removeEventListener(t, ca);
|
|
@@ -6418,16 +6421,16 @@ function hd(e = window.document) {
|
|
|
6418
6421
|
function Jn(e, t, n) {
|
|
6419
6422
|
ht(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
6420
6423
|
}
|
|
6421
|
-
function
|
|
6424
|
+
function Gc(e, t, n, s) {
|
|
6422
6425
|
ht(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
|
|
6423
6426
|
}
|
|
6424
|
-
function
|
|
6427
|
+
function Uc(e, t, n) {
|
|
6425
6428
|
ht(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
6426
6429
|
}
|
|
6427
|
-
function
|
|
6430
|
+
function Rc(e, t) {
|
|
6428
6431
|
ht(e) || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
6429
6432
|
}
|
|
6430
|
-
function
|
|
6433
|
+
function Oc(e, t, n, s) {
|
|
6431
6434
|
if (s)
|
|
6432
6435
|
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
6433
6436
|
else if (Array.isArray(n)) {
|
|
@@ -6436,7 +6439,7 @@ function Mc(e, t, n, s) {
|
|
|
6436
6439
|
} else
|
|
6437
6440
|
e.addEventListener(t, n, typeof n != "function" && n);
|
|
6438
6441
|
}
|
|
6439
|
-
function
|
|
6442
|
+
function Bc(e, t, n = {}) {
|
|
6440
6443
|
const s = Object.keys(t || {}), a = Object.keys(n);
|
|
6441
6444
|
let i, l;
|
|
6442
6445
|
for (i = 0, l = a.length; i < l; i++) {
|
|
@@ -6449,7 +6452,7 @@ function Fc(e, t, n = {}) {
|
|
|
6449
6452
|
}
|
|
6450
6453
|
return n;
|
|
6451
6454
|
}
|
|
6452
|
-
function
|
|
6455
|
+
function Mc(e, t, n) {
|
|
6453
6456
|
if (!t)
|
|
6454
6457
|
return n ? Jn(e, "style") : t;
|
|
6455
6458
|
const s = e.style;
|
|
@@ -6463,43 +6466,43 @@ function qc(e, t, n) {
|
|
|
6463
6466
|
a = t[i], a !== n[i] && (s.setProperty(i, a), n[i] = a);
|
|
6464
6467
|
return n;
|
|
6465
6468
|
}
|
|
6466
|
-
function
|
|
6469
|
+
function Fc(e, t = {}, n, s) {
|
|
6467
6470
|
const a = {};
|
|
6468
6471
|
return s || ct(
|
|
6469
6472
|
() => a.children = Ht(e, t.children, a.children)
|
|
6470
|
-
), ct(() => typeof t.ref == "function" &&
|
|
6473
|
+
), ct(() => typeof t.ref == "function" && qc(t.ref, e)), ct(() => Hc(e, t, n, !0, a, !0)), a;
|
|
6471
6474
|
}
|
|
6472
|
-
function
|
|
6473
|
-
return
|
|
6475
|
+
function qc(e, t, n) {
|
|
6476
|
+
return _e(() => e(t, n));
|
|
6474
6477
|
}
|
|
6475
6478
|
function es(e, t, n, s) {
|
|
6476
6479
|
if (n !== void 0 && !s && (s = []), typeof t != "function")
|
|
6477
6480
|
return Ht(e, t, s, n);
|
|
6478
6481
|
ct((a) => Ht(e, t(), a, n), s);
|
|
6479
6482
|
}
|
|
6480
|
-
function
|
|
6483
|
+
function Hc(e, t, n, s, a = {}, i = !1) {
|
|
6481
6484
|
t || (t = {});
|
|
6482
6485
|
for (const l in a)
|
|
6483
6486
|
if (!(l in t)) {
|
|
6484
6487
|
if (l === "children")
|
|
6485
6488
|
continue;
|
|
6486
|
-
a[l] =
|
|
6489
|
+
a[l] = js(e, l, null, a[l], n, i, t);
|
|
6487
6490
|
}
|
|
6488
6491
|
for (const l in t) {
|
|
6489
6492
|
if (l === "children")
|
|
6490
6493
|
continue;
|
|
6491
6494
|
const o = t[l];
|
|
6492
|
-
a[l] =
|
|
6495
|
+
a[l] = js(e, l, o, a[l], n, i, t);
|
|
6493
6496
|
}
|
|
6494
6497
|
}
|
|
6495
|
-
function
|
|
6498
|
+
function Kc(e) {
|
|
6496
6499
|
let t, n;
|
|
6497
|
-
return !ht() || !(t = O.registry.get(n =
|
|
6500
|
+
return !ht() || !(t = O.registry.get(n = Vc())) ? e() : (O.completed && O.completed.add(t), O.registry.delete(n), t);
|
|
6498
6501
|
}
|
|
6499
6502
|
function ht(e) {
|
|
6500
6503
|
return !!O.context && !O.done && (!e || e.isConnected);
|
|
6501
6504
|
}
|
|
6502
|
-
function
|
|
6505
|
+
function jc(e) {
|
|
6503
6506
|
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
6504
6507
|
}
|
|
6505
6508
|
function Ks(e, t, n) {
|
|
@@ -6507,12 +6510,12 @@ function Ks(e, t, n) {
|
|
|
6507
6510
|
for (let a = 0, i = s.length; a < i; a++)
|
|
6508
6511
|
e.classList.toggle(s[a], n);
|
|
6509
6512
|
}
|
|
6510
|
-
function
|
|
6513
|
+
function js(e, t, n, s, a, i, l) {
|
|
6511
6514
|
let o, c, h, g, d;
|
|
6512
6515
|
if (t === "style")
|
|
6513
|
-
return
|
|
6516
|
+
return Mc(e, n, s);
|
|
6514
6517
|
if (t === "classList")
|
|
6515
|
-
return
|
|
6518
|
+
return Bc(e, n, s);
|
|
6516
6519
|
if (n === s)
|
|
6517
6520
|
return s;
|
|
6518
6521
|
if (t === "ref")
|
|
@@ -6524,25 +6527,25 @@ function Vs(e, t, n, s, a, i, l) {
|
|
|
6524
6527
|
const E = t.slice(10);
|
|
6525
6528
|
s && e.removeEventListener(E, s, !0), n && e.addEventListener(E, n, !0);
|
|
6526
6529
|
} else if (t.slice(0, 2) === "on") {
|
|
6527
|
-
const E = t.slice(2).toLowerCase(), y =
|
|
6530
|
+
const E = t.slice(2).toLowerCase(), y = _c.has(E);
|
|
6528
6531
|
if (!y && s) {
|
|
6529
6532
|
const p = Array.isArray(s) ? s[0] : s;
|
|
6530
6533
|
e.removeEventListener(E, p);
|
|
6531
6534
|
}
|
|
6532
|
-
(y || n) && (
|
|
6535
|
+
(y || n) && (Oc(e, E, n, y), y && Dc([E]));
|
|
6533
6536
|
} else if (t.slice(0, 5) === "attr:")
|
|
6534
6537
|
Jn(e, t.slice(5), n);
|
|
6535
6538
|
else if (t.slice(0, 5) === "bool:")
|
|
6536
|
-
|
|
6537
|
-
else if ((d = t.slice(0, 5) === "prop:") || (h =
|
|
6539
|
+
Uc(e, t.slice(5), n);
|
|
6540
|
+
else if ((d = t.slice(0, 5) === "prop:") || (h = xc.has(t)) || !a && ((g = Pc(t, e.tagName)) || (c = Ac.has(t))) || (o = e.nodeName.includes("-") || "is" in l)) {
|
|
6538
6541
|
if (d)
|
|
6539
6542
|
t = t.slice(5), c = !0;
|
|
6540
6543
|
else if (ht(e))
|
|
6541
6544
|
return n;
|
|
6542
|
-
t === "class" || t === "className" ?
|
|
6545
|
+
t === "class" || t === "className" ? Rc(e, n) : o && !c && !h ? e[jc(t)] = n : e[g || t] = n;
|
|
6543
6546
|
} else {
|
|
6544
|
-
const E = a && t.indexOf(":") > -1 &&
|
|
6545
|
-
E ?
|
|
6547
|
+
const E = a && t.indexOf(":") > -1 && kc[t.split(":")[0]];
|
|
6548
|
+
E ? Gc(e, E, t, n) : Jn(e, Tc[t] || t, n);
|
|
6546
6549
|
}
|
|
6547
6550
|
return n;
|
|
6548
6551
|
}
|
|
@@ -6641,7 +6644,7 @@ function Ht(e, t, n, s, a) {
|
|
|
6641
6644
|
if (c.length === 0) {
|
|
6642
6645
|
if (n = mt(e, n, s), o)
|
|
6643
6646
|
return n;
|
|
6644
|
-
} else h ? n.length === 0 ?
|
|
6647
|
+
} else h ? n.length === 0 ? Vs(e, c, s) : Lc(e, n, c) : (n && mt(e), Vs(e, c));
|
|
6645
6648
|
n = c;
|
|
6646
6649
|
} else if (t.nodeType) {
|
|
6647
6650
|
if (i && t.parentNode)
|
|
@@ -6683,7 +6686,7 @@ function ts(e, t, n, s) {
|
|
|
6683
6686
|
}
|
|
6684
6687
|
return a;
|
|
6685
6688
|
}
|
|
6686
|
-
function
|
|
6689
|
+
function Vs(e, t, n = null) {
|
|
6687
6690
|
for (let s = 0, a = t.length; s < a; s++)
|
|
6688
6691
|
e.insertBefore(t[s], n);
|
|
6689
6692
|
}
|
|
@@ -6705,19 +6708,19 @@ function mt(e, t, n, s) {
|
|
|
6705
6708
|
e.insertBefore(a, n);
|
|
6706
6709
|
return [a];
|
|
6707
6710
|
}
|
|
6708
|
-
function
|
|
6711
|
+
function Vc() {
|
|
6709
6712
|
return O.getNextContextId();
|
|
6710
6713
|
}
|
|
6711
|
-
var
|
|
6714
|
+
var $c = "http://www.w3.org/2000/svg";
|
|
6712
6715
|
function ua(e, t = !1) {
|
|
6713
|
-
return t ? document.createElementNS(
|
|
6716
|
+
return t ? document.createElementNS($c, e) : document.createElement(e);
|
|
6714
6717
|
}
|
|
6715
|
-
function
|
|
6718
|
+
function dd(e) {
|
|
6716
6719
|
const { useShadow: t } = e, n = document.createTextNode(""), s = () => e.mount || document.body, a = Hs();
|
|
6717
6720
|
let i, l = !!O.context;
|
|
6718
6721
|
return Zr(
|
|
6719
6722
|
() => {
|
|
6720
|
-
l && (Hs().user = l = !1), i || (i =
|
|
6723
|
+
l && (Hs().user = l = !1), i || (i = uc(a, () => Ge(() => e.children)));
|
|
6721
6724
|
const o = s();
|
|
6722
6725
|
if (o instanceof HTMLHeadElement) {
|
|
6723
6726
|
const [c, h] = Ee(!1), g = () => h(!0);
|
|
@@ -6740,20 +6743,20 @@ function md(e) {
|
|
|
6740
6743
|
}
|
|
6741
6744
|
), n;
|
|
6742
6745
|
}
|
|
6743
|
-
function
|
|
6744
|
-
const [t, n] =
|
|
6746
|
+
function hd(e) {
|
|
6747
|
+
const [t, n] = wc(e, ["component"]), s = Ge(() => t.component);
|
|
6745
6748
|
return Ge(() => {
|
|
6746
6749
|
const a = s();
|
|
6747
6750
|
switch (typeof a) {
|
|
6748
6751
|
case "function":
|
|
6749
|
-
return
|
|
6752
|
+
return _e(() => a(n));
|
|
6750
6753
|
case "string":
|
|
6751
|
-
const i =
|
|
6752
|
-
return
|
|
6754
|
+
const i = Ic.has(a), l = O.context ? Kc() : ua(a, i);
|
|
6755
|
+
return Fc(l, n, i), l;
|
|
6753
6756
|
}
|
|
6754
6757
|
});
|
|
6755
6758
|
}
|
|
6756
|
-
var
|
|
6759
|
+
var zc = class {
|
|
6757
6760
|
constructor() {
|
|
6758
6761
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
6759
6762
|
}
|
|
@@ -6771,7 +6774,7 @@ var Yc = class {
|
|
|
6771
6774
|
}
|
|
6772
6775
|
}, da = class {
|
|
6773
6776
|
constructor(e) {
|
|
6774
|
-
this.generateIdentifier = e, this.kv = new
|
|
6777
|
+
this.generateIdentifier = e, this.kv = new zc();
|
|
6775
6778
|
}
|
|
6776
6779
|
register(e, t) {
|
|
6777
6780
|
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
@@ -6785,7 +6788,7 @@ var Yc = class {
|
|
|
6785
6788
|
getValue(e) {
|
|
6786
6789
|
return this.kv.getByKey(e);
|
|
6787
6790
|
}
|
|
6788
|
-
},
|
|
6791
|
+
}, Wc = class extends da {
|
|
6789
6792
|
constructor() {
|
|
6790
6793
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
6791
6794
|
}
|
|
@@ -6796,7 +6799,7 @@ var Yc = class {
|
|
|
6796
6799
|
return this.classToAllowedProps.get(e);
|
|
6797
6800
|
}
|
|
6798
6801
|
};
|
|
6799
|
-
function
|
|
6802
|
+
function Yc(e) {
|
|
6800
6803
|
if ("values" in Object)
|
|
6801
6804
|
return Object.values(e);
|
|
6802
6805
|
const t = [];
|
|
@@ -6804,8 +6807,8 @@ function Xc(e) {
|
|
|
6804
6807
|
e.hasOwnProperty(n) && t.push(e[n]);
|
|
6805
6808
|
return t;
|
|
6806
6809
|
}
|
|
6807
|
-
function
|
|
6808
|
-
const n =
|
|
6810
|
+
function Qc(e, t) {
|
|
6811
|
+
const n = Yc(e);
|
|
6809
6812
|
if ("find" in n)
|
|
6810
6813
|
return n.find(t);
|
|
6811
6814
|
const s = n;
|
|
@@ -6828,7 +6831,7 @@ function $s(e, t) {
|
|
|
6828
6831
|
return s;
|
|
6829
6832
|
}
|
|
6830
6833
|
}
|
|
6831
|
-
var
|
|
6834
|
+
var Xc = class {
|
|
6832
6835
|
constructor() {
|
|
6833
6836
|
this.transfomers = {};
|
|
6834
6837
|
}
|
|
@@ -6836,12 +6839,12 @@ var Jc = class {
|
|
|
6836
6839
|
this.transfomers[e.name] = e;
|
|
6837
6840
|
}
|
|
6838
6841
|
findApplicable(e) {
|
|
6839
|
-
return
|
|
6842
|
+
return Qc(this.transfomers, (t) => t.isApplicable(e));
|
|
6840
6843
|
}
|
|
6841
6844
|
findByName(e) {
|
|
6842
6845
|
return this.transfomers[e];
|
|
6843
6846
|
}
|
|
6844
|
-
},
|
|
6847
|
+
}, Zc = (e) => Object.prototype.toString.call(e).slice(8, -1), ha = (e) => typeof e > "u", Jc = (e) => e === null, Kt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, ns = (e) => Kt(e) && Object.keys(e).length === 0, nt = (e) => Array.isArray(e), eu = (e) => typeof e == "string", tu = (e) => typeof e == "number" && !isNaN(e), nu = (e) => typeof e == "boolean", su = (e) => e instanceof RegExp, jt = (e) => e instanceof Map, Vt = (e) => e instanceof Set, ma = (e) => Zc(e) === "Symbol", ru = (e) => e instanceof Date && !isNaN(e.valueOf()), au = (e) => e instanceof Error, zs = (e) => typeof e == "number" && isNaN(e), iu = (e) => nu(e) || Jc(e) || ha(e) || tu(e) || eu(e) || ma(e), lu = (e) => typeof e == "bigint", ou = (e) => e === 1 / 0 || e === -1 / 0, cu = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), uu = (e) => e instanceof URL, fa = (e) => e.replace(/\./g, "\\."), $n = (e) => e.map(String).map(fa).join("."), Bt = (e) => {
|
|
6845
6848
|
const t = [];
|
|
6846
6849
|
let n = "";
|
|
6847
6850
|
for (let a = 0; a < e.length; a++) {
|
|
@@ -6870,9 +6873,9 @@ function ze(e, t, n, s) {
|
|
|
6870
6873
|
var ga = [
|
|
6871
6874
|
ze(ha, "undefined", () => null, () => {
|
|
6872
6875
|
}),
|
|
6873
|
-
ze(
|
|
6874
|
-
ze(
|
|
6875
|
-
ze(
|
|
6876
|
+
ze(lu, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
6877
|
+
ze(ru, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
6878
|
+
ze(au, "Error", (e, t) => {
|
|
6876
6879
|
const n = {
|
|
6877
6880
|
name: e.name,
|
|
6878
6881
|
message: e.message
|
|
@@ -6886,22 +6889,22 @@ var ga = [
|
|
|
6886
6889
|
n[s] = e[s];
|
|
6887
6890
|
}), n;
|
|
6888
6891
|
}),
|
|
6889
|
-
ze(
|
|
6892
|
+
ze(su, "regexp", (e) => "" + e, (e) => {
|
|
6890
6893
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
6891
6894
|
return new RegExp(t, n);
|
|
6892
6895
|
}),
|
|
6893
6896
|
ze(
|
|
6894
|
-
|
|
6897
|
+
Vt,
|
|
6895
6898
|
"set",
|
|
6896
6899
|
// (sets only exist in es6+)
|
|
6897
6900
|
// eslint-disable-next-line es5/no-es6-methods
|
|
6898
6901
|
(e) => [...e.values()],
|
|
6899
6902
|
(e) => new Set(e)
|
|
6900
6903
|
),
|
|
6901
|
-
ze(
|
|
6902
|
-
ze((e) => zs(e) ||
|
|
6904
|
+
ze(jt, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
6905
|
+
ze((e) => zs(e) || ou(e), "number", (e) => zs(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
6903
6906
|
ze((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
6904
|
-
ze(
|
|
6907
|
+
ze(uu, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
6905
6908
|
];
|
|
6906
6909
|
function Mn(e, t, n, s) {
|
|
6907
6910
|
return {
|
|
@@ -6916,7 +6919,7 @@ var pa = Mn((e, t) => ma(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
6916
6919
|
if (!s)
|
|
6917
6920
|
throw new Error("Trying to deserialize unknown symbol");
|
|
6918
6921
|
return s;
|
|
6919
|
-
}),
|
|
6922
|
+
}), du = [
|
|
6920
6923
|
Int8Array,
|
|
6921
6924
|
Uint8Array,
|
|
6922
6925
|
Int16Array,
|
|
@@ -6926,8 +6929,8 @@ var pa = Mn((e, t) => ma(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
6926
6929
|
Float32Array,
|
|
6927
6930
|
Float64Array,
|
|
6928
6931
|
Uint8ClampedArray
|
|
6929
|
-
].reduce((e, t) => (e[t.name] = t, e), {}), ya = Mn(
|
|
6930
|
-
const n =
|
|
6932
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), ya = Mn(cu, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
6933
|
+
const n = du[t[1]];
|
|
6931
6934
|
if (!n)
|
|
6932
6935
|
throw new Error("Trying to deserialize unknown typed array");
|
|
6933
6936
|
return new n(e);
|
|
@@ -6953,8 +6956,8 @@ var Ea = Mn(va, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
6953
6956
|
if (!s)
|
|
6954
6957
|
throw new Error("Trying to deserialize unknown custom value");
|
|
6955
6958
|
return s.deserialize(e);
|
|
6956
|
-
}),
|
|
6957
|
-
const n = $s(
|
|
6959
|
+
}), hu = [Ea, pa, ba, ya], Ws = (e, t) => {
|
|
6960
|
+
const n = $s(hu, (a) => a.isApplicable(e, t));
|
|
6958
6961
|
if (n)
|
|
6959
6962
|
return {
|
|
6960
6963
|
value: n.transform(e, t),
|
|
@@ -6970,8 +6973,8 @@ var Ea = Mn(va, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
6970
6973
|
ga.forEach((e) => {
|
|
6971
6974
|
wa[e.annotation] = e;
|
|
6972
6975
|
});
|
|
6973
|
-
var
|
|
6974
|
-
if (
|
|
6976
|
+
var mu = (e, t, n) => {
|
|
6977
|
+
if (nt(t))
|
|
6975
6978
|
switch (t[0]) {
|
|
6976
6979
|
case "symbol":
|
|
6977
6980
|
return pa.untransform(e, t, n);
|
|
@@ -7004,13 +7007,13 @@ function Sa(e) {
|
|
|
7004
7007
|
if (xn(e, "constructor"))
|
|
7005
7008
|
throw new Error("constructor is not allowed as a property");
|
|
7006
7009
|
}
|
|
7007
|
-
var
|
|
7010
|
+
var fu = (e, t) => {
|
|
7008
7011
|
Sa(t);
|
|
7009
7012
|
for (let n = 0; n < t.length; n++) {
|
|
7010
7013
|
const s = t[n];
|
|
7011
|
-
if (
|
|
7014
|
+
if (Vt(e))
|
|
7012
7015
|
e = ft(e, +s);
|
|
7013
|
-
else if (
|
|
7016
|
+
else if (jt(e)) {
|
|
7014
7017
|
const a = +s, i = +t[++n] == 0 ? "key" : "value", l = ft(e, a);
|
|
7015
7018
|
switch (i) {
|
|
7016
7019
|
case "key":
|
|
@@ -7030,15 +7033,15 @@ var pu = (e, t) => {
|
|
|
7030
7033
|
let s = e;
|
|
7031
7034
|
for (let i = 0; i < t.length - 1; i++) {
|
|
7032
7035
|
const l = t[i];
|
|
7033
|
-
if (
|
|
7036
|
+
if (nt(s)) {
|
|
7034
7037
|
const o = +l;
|
|
7035
7038
|
s = s[o];
|
|
7036
7039
|
} else if (Kt(s))
|
|
7037
7040
|
s = s[l];
|
|
7038
|
-
else if (
|
|
7041
|
+
else if (Vt(s)) {
|
|
7039
7042
|
const o = +l;
|
|
7040
7043
|
s = ft(s, o);
|
|
7041
|
-
} else if (
|
|
7044
|
+
} else if (jt(s)) {
|
|
7042
7045
|
if (i === t.length - 2)
|
|
7043
7046
|
break;
|
|
7044
7047
|
const c = +l, h = +t[++i] == 0 ? "key" : "value", g = ft(s, c);
|
|
@@ -7053,11 +7056,11 @@ var pu = (e, t) => {
|
|
|
7053
7056
|
}
|
|
7054
7057
|
}
|
|
7055
7058
|
const a = t[t.length - 1];
|
|
7056
|
-
if (
|
|
7059
|
+
if (nt(s) ? s[+a] = n(s[+a]) : Kt(s) && (s[a] = n(s[a])), Vt(s)) {
|
|
7057
7060
|
const i = ft(s, +a), l = n(i);
|
|
7058
7061
|
i !== l && (s.delete(i), s.add(l));
|
|
7059
7062
|
}
|
|
7060
|
-
if (
|
|
7063
|
+
if (jt(s)) {
|
|
7061
7064
|
const i = +t[t.length - 2], l = ft(s, i);
|
|
7062
7065
|
switch (+a == 0 ? "key" : "value") {
|
|
7063
7066
|
case "key": {
|
|
@@ -7076,7 +7079,7 @@ var pu = (e, t) => {
|
|
|
7076
7079
|
function rs(e, t, n = []) {
|
|
7077
7080
|
if (!e)
|
|
7078
7081
|
return;
|
|
7079
|
-
if (!
|
|
7082
|
+
if (!nt(e)) {
|
|
7080
7083
|
kt(e, (i, l) => rs(i, t, [...n, ...Bt(l)]));
|
|
7081
7084
|
return;
|
|
7082
7085
|
}
|
|
@@ -7085,19 +7088,19 @@ function rs(e, t, n = []) {
|
|
|
7085
7088
|
rs(i, t, [...n, ...Bt(l)]);
|
|
7086
7089
|
}), t(s, n);
|
|
7087
7090
|
}
|
|
7088
|
-
function
|
|
7091
|
+
function gu(e, t, n) {
|
|
7089
7092
|
return rs(t, (s, a) => {
|
|
7090
|
-
e = ss(e, a, (i) =>
|
|
7093
|
+
e = ss(e, a, (i) => mu(i, s, n));
|
|
7091
7094
|
}), e;
|
|
7092
7095
|
}
|
|
7093
|
-
function
|
|
7096
|
+
function pu(e, t) {
|
|
7094
7097
|
function n(s, a) {
|
|
7095
|
-
const i =
|
|
7098
|
+
const i = fu(e, Bt(a));
|
|
7096
7099
|
s.map(Bt).forEach((l) => {
|
|
7097
7100
|
e = ss(e, l, () => i);
|
|
7098
7101
|
});
|
|
7099
7102
|
}
|
|
7100
|
-
if (
|
|
7103
|
+
if (nt(t)) {
|
|
7101
7104
|
const [s, a] = t;
|
|
7102
7105
|
s.forEach((i) => {
|
|
7103
7106
|
e = ss(e, Bt(i), () => e);
|
|
@@ -7106,12 +7109,12 @@ function vu(e, t) {
|
|
|
7106
7109
|
kt(t, n);
|
|
7107
7110
|
return e;
|
|
7108
7111
|
}
|
|
7109
|
-
var
|
|
7110
|
-
function
|
|
7112
|
+
var yu = (e, t) => Kt(e) || nt(e) || jt(e) || Vt(e) || va(e, t);
|
|
7113
|
+
function vu(e, t, n) {
|
|
7111
7114
|
const s = n.get(e);
|
|
7112
7115
|
s ? s.push(t) : n.set(e, [t]);
|
|
7113
7116
|
}
|
|
7114
|
-
function
|
|
7117
|
+
function Eu(e, t) {
|
|
7115
7118
|
const n = {};
|
|
7116
7119
|
let s;
|
|
7117
7120
|
return e.forEach((a) => {
|
|
@@ -7123,16 +7126,16 @@ function wu(e, t) {
|
|
|
7123
7126
|
}), s ? ns(n) ? [s] : [s, n] : ns(n) ? void 0 : n;
|
|
7124
7127
|
}
|
|
7125
7128
|
var Na = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
|
|
7126
|
-
const o =
|
|
7129
|
+
const o = iu(e);
|
|
7127
7130
|
if (!o) {
|
|
7128
|
-
|
|
7131
|
+
vu(e, a, t);
|
|
7129
7132
|
const y = l.get(e);
|
|
7130
7133
|
if (y)
|
|
7131
7134
|
return s ? {
|
|
7132
7135
|
transformedValue: null
|
|
7133
7136
|
} : y;
|
|
7134
7137
|
}
|
|
7135
|
-
if (!
|
|
7138
|
+
if (!yu(e, n)) {
|
|
7136
7139
|
const y = Ws(e, n), p = y ? {
|
|
7137
7140
|
transformedValue: y.value,
|
|
7138
7141
|
annotations: [y.type]
|
|
@@ -7145,12 +7148,12 @@ var Na = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
|
|
|
7145
7148
|
return {
|
|
7146
7149
|
transformedValue: null
|
|
7147
7150
|
};
|
|
7148
|
-
const c = Ws(e, n), h = (c == null ? void 0 : c.value) ?? e, g =
|
|
7151
|
+
const c = Ws(e, n), h = (c == null ? void 0 : c.value) ?? e, g = nt(h) ? [] : {}, d = {};
|
|
7149
7152
|
kt(h, (y, p) => {
|
|
7150
7153
|
if (p === "__proto__" || p === "constructor" || p === "prototype")
|
|
7151
7154
|
throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
|
|
7152
7155
|
const S = Na(y, t, n, s, [...a, p], [...i, e], l);
|
|
7153
|
-
g[p] = S.transformedValue,
|
|
7156
|
+
g[p] = S.transformedValue, nt(S.annotations) ? d[p] = S.annotations : Kt(S.annotations) && kt(S.annotations, (v, x) => {
|
|
7154
7157
|
d[fa(p) + "." + x] = v;
|
|
7155
7158
|
});
|
|
7156
7159
|
});
|
|
@@ -7169,13 +7172,13 @@ function Aa(e) {
|
|
|
7169
7172
|
function Ys(e) {
|
|
7170
7173
|
return Aa(e) === "Array";
|
|
7171
7174
|
}
|
|
7172
|
-
function
|
|
7175
|
+
function bu(e) {
|
|
7173
7176
|
if (Aa(e) !== "Object")
|
|
7174
7177
|
return !1;
|
|
7175
7178
|
const t = Object.getPrototypeOf(e);
|
|
7176
7179
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
7177
7180
|
}
|
|
7178
|
-
function
|
|
7181
|
+
function wu(e, t, n, s, a) {
|
|
7179
7182
|
const i = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
|
|
7180
7183
|
i === "enumerable" && (e[t] = n), a && i === "nonenumerable" && Object.defineProperty(e, t, {
|
|
7181
7184
|
value: n,
|
|
@@ -7187,14 +7190,14 @@ function Nu(e, t, n, s, a) {
|
|
|
7187
7190
|
function as(e, t = {}) {
|
|
7188
7191
|
if (Ys(e))
|
|
7189
7192
|
return e.map((a) => as(a, t));
|
|
7190
|
-
if (!
|
|
7193
|
+
if (!bu(e))
|
|
7191
7194
|
return e;
|
|
7192
7195
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
7193
7196
|
return [...n, ...s].reduce((a, i) => {
|
|
7194
7197
|
if (Ys(t.props) && !t.props.includes(i))
|
|
7195
7198
|
return a;
|
|
7196
7199
|
const l = e[i], o = as(l, t);
|
|
7197
|
-
return
|
|
7200
|
+
return wu(a, i, o, e, t.nonenumerable), a;
|
|
7198
7201
|
}, {});
|
|
7199
7202
|
}
|
|
7200
7203
|
var ie = class {
|
|
@@ -7202,7 +7205,7 @@ var ie = class {
|
|
|
7202
7205
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
7203
7206
|
*/
|
|
7204
7207
|
constructor({ dedupe: e = !1 } = {}) {
|
|
7205
|
-
this.classRegistry = new
|
|
7208
|
+
this.classRegistry = new Wc(), this.symbolRegistry = new da((t) => t.description ?? ""), this.customTransformerRegistry = new Xc(), this.allowedErrorProps = [], this.dedupe = e;
|
|
7206
7209
|
}
|
|
7207
7210
|
serialize(e) {
|
|
7208
7211
|
const t = /* @__PURE__ */ new Map(), n = Na(e, t, this, this.dedupe), s = {
|
|
@@ -7212,7 +7215,7 @@ var ie = class {
|
|
|
7212
7215
|
...s.meta,
|
|
7213
7216
|
values: n.annotations
|
|
7214
7217
|
});
|
|
7215
|
-
const a =
|
|
7218
|
+
const a = Eu(t, this.dedupe);
|
|
7216
7219
|
return a && (s.meta = {
|
|
7217
7220
|
...s.meta,
|
|
7218
7221
|
referentialEqualities: a
|
|
@@ -7221,7 +7224,7 @@ var ie = class {
|
|
|
7221
7224
|
deserialize(e) {
|
|
7222
7225
|
const { json: t, meta: n } = e;
|
|
7223
7226
|
let s = as(t);
|
|
7224
|
-
return n != null && n.values && (s =
|
|
7227
|
+
return n != null && n.values && (s = gu(s, n.values, this)), n != null && n.referentialEqualities && (s = pu(s, n.referentialEqualities)), s;
|
|
7225
7228
|
}
|
|
7226
7229
|
stringify(e) {
|
|
7227
7230
|
return JSON.stringify(this.serialize(e));
|
|
@@ -7254,44 +7257,44 @@ ie.registerClass = ie.defaultInstance.registerClass.bind(ie.defaultInstance);
|
|
|
7254
7257
|
ie.registerSymbol = ie.defaultInstance.registerSymbol.bind(ie.defaultInstance);
|
|
7255
7258
|
ie.registerCustom = ie.defaultInstance.registerCustom.bind(ie.defaultInstance);
|
|
7256
7259
|
ie.allowErrorProps = ie.defaultInstance.allowErrorProps.bind(ie.defaultInstance);
|
|
7257
|
-
var
|
|
7258
|
-
function
|
|
7260
|
+
var Su = ie.serialize, md = ie.stringify;
|
|
7261
|
+
function fd(e) {
|
|
7259
7262
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
7260
7263
|
}
|
|
7261
|
-
function
|
|
7264
|
+
function gd(e, t) {
|
|
7262
7265
|
return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
7263
7266
|
}
|
|
7264
|
-
function
|
|
7267
|
+
function pd({
|
|
7265
7268
|
queryState: e,
|
|
7266
7269
|
observerCount: t,
|
|
7267
7270
|
isStale: n
|
|
7268
7271
|
}) {
|
|
7269
7272
|
return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
|
|
7270
7273
|
}
|
|
7271
|
-
function
|
|
7274
|
+
function yd({
|
|
7272
7275
|
status: e,
|
|
7273
7276
|
isPaused: t
|
|
7274
7277
|
}) {
|
|
7275
7278
|
return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
|
|
7276
7279
|
}
|
|
7277
|
-
function
|
|
7280
|
+
function vd(e) {
|
|
7278
7281
|
return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
|
|
7279
7282
|
}
|
|
7280
|
-
var
|
|
7283
|
+
var Ed = (e, t = !1) => {
|
|
7281
7284
|
const {
|
|
7282
7285
|
json: n
|
|
7283
|
-
} =
|
|
7286
|
+
} = Su(e);
|
|
7284
7287
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
7285
|
-
}, En = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3,
|
|
7286
|
-
status:
|
|
7287
|
-
"query hash":
|
|
7288
|
+
}, En = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, Nu = (e, t) => e.queryHash.localeCompare(t.queryHash), xa = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, Au = (e, t) => En(e) === En(t) ? xa(e, t) : En(e) > En(t) ? 1 : -1, bd = {
|
|
7289
|
+
status: Au,
|
|
7290
|
+
"query hash": Nu,
|
|
7288
7291
|
"last updated": xa
|
|
7289
|
-
}, bn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Ta = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1,
|
|
7290
|
-
status:
|
|
7292
|
+
}, bn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Ta = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, xu = (e, t) => bn(e) === bn(t) ? Ta(e, t) : bn(e) > bn(t) ? 1 : -1, wd = {
|
|
7293
|
+
status: xu,
|
|
7291
7294
|
"last updated": Ta
|
|
7292
|
-
},
|
|
7295
|
+
}, Sd = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Nd = () => {
|
|
7293
7296
|
const [e, t] = Ee("dark");
|
|
7294
|
-
return
|
|
7297
|
+
return cc(() => {
|
|
7295
7298
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
7296
7299
|
t(n.matches ? "dark" : "light");
|
|
7297
7300
|
const s = (a) => {
|
|
@@ -7364,7 +7367,7 @@ var wd = (e, t = !1) => {
|
|
|
7364
7367
|
return;
|
|
7365
7368
|
const s = document.createElement("style"), a = document.createTextNode("");
|
|
7366
7369
|
s.appendChild(a), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
7367
|
-
}, gt, $t, zt, Wt, it, Yt, pt, yt, vt, Et, bt, wt, Qt, Qs,
|
|
7370
|
+
}, gt, $t, zt, Wt, it, Yt, pt, yt, vt, Et, bt, wt, Qt, Qs, Tu = (Qs = class {
|
|
7368
7371
|
constructor(e) {
|
|
7369
7372
|
re(this, gt);
|
|
7370
7373
|
re(this, $t);
|
|
@@ -7414,7 +7417,7 @@ var wd = (e, t = !1) => {
|
|
|
7414
7417
|
const t = oa(() => {
|
|
7415
7418
|
const n = this, [s] = R(this, yt), [a] = R(this, vt), [i] = R(this, Et), [l] = R(this, bt), [o] = R(this, gt);
|
|
7416
7419
|
let c;
|
|
7417
|
-
return R(this, wt) ? c = R(this, wt) : (c = ia(() => import("./HO4MOOFI-
|
|
7420
|
+
return R(this, wt) ? c = R(this, wt) : (c = ia(() => import("./HO4MOOFI-Be7ATNM5.js")), te(this, wt, c)), Ca(R(this, Yt), R(this, pt)), ra(c, aa({
|
|
7418
7421
|
get queryFlavor() {
|
|
7419
7422
|
return R(n, zt);
|
|
7420
7423
|
},
|
|
@@ -7453,7 +7456,7 @@ var wd = (e, t = !1) => {
|
|
|
7453
7456
|
throw new Error("Devtools is not mounted");
|
|
7454
7457
|
(e = R(this, Qt)) == null || e.call(this), te(this, it, !1);
|
|
7455
7458
|
}
|
|
7456
|
-
}, gt = new WeakMap(), $t = new WeakMap(), zt = new WeakMap(), Wt = new WeakMap(), it = new WeakMap(), Yt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), vt = new WeakMap(), Et = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), Qt = new WeakMap(), Qs), St, Xt, Zt, Jt, lt, en, Nt, At, xt, Tt, Ct, Pt, _t, tn, Xs,
|
|
7459
|
+
}, gt = new WeakMap(), $t = new WeakMap(), zt = new WeakMap(), Wt = new WeakMap(), it = new WeakMap(), Yt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), vt = new WeakMap(), Et = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), Qt = new WeakMap(), Qs), St, Xt, Zt, Jt, lt, en, Nt, At, xt, Tt, Ct, Pt, _t, tn, Xs, Cu = (Xs = class {
|
|
7457
7460
|
constructor(e) {
|
|
7458
7461
|
re(this, St);
|
|
7459
7462
|
re(this, Xt);
|
|
@@ -7508,7 +7511,7 @@ var wd = (e, t = !1) => {
|
|
|
7508
7511
|
const t = oa(() => {
|
|
7509
7512
|
const n = this, [s] = R(this, At), [a] = R(this, xt), [i] = R(this, Tt), [l] = R(this, Ct), [o] = R(this, St), [c] = R(this, Pt);
|
|
7510
7513
|
let h;
|
|
7511
|
-
return R(this, _t) ? h = R(this, _t) : (h = ia(() => import("./HUY7CZI3-
|
|
7514
|
+
return R(this, _t) ? h = R(this, _t) : (h = ia(() => import("./HUY7CZI3-DjUkpQI6.js")), te(this, _t, h)), Ca(R(this, en), R(this, Nt)), ra(h, aa({
|
|
7512
7515
|
get queryFlavor() {
|
|
7513
7516
|
return R(n, Zt);
|
|
7514
7517
|
},
|
|
@@ -7551,7 +7554,7 @@ var wd = (e, t = !1) => {
|
|
|
7551
7554
|
(e = R(this, tn)) == null || e.call(this), te(this, lt, !1);
|
|
7552
7555
|
}
|
|
7553
7556
|
}, St = new WeakMap(), Xt = new WeakMap(), Zt = new WeakMap(), Jt = new WeakMap(), lt = new WeakMap(), en = new WeakMap(), Nt = new WeakMap(), At = new WeakMap(), xt = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), _t = new WeakMap(), tn = new WeakMap(), Xs);
|
|
7554
|
-
function
|
|
7557
|
+
function Pu(e) {
|
|
7555
7558
|
const t = Ne(e.client), n = ue.useRef(null), {
|
|
7556
7559
|
buttonPosition: s,
|
|
7557
7560
|
position: a,
|
|
@@ -7560,7 +7563,7 @@ function Iu(e) {
|
|
|
7560
7563
|
styleNonce: o,
|
|
7561
7564
|
shadowDOMTarget: c
|
|
7562
7565
|
} = e, [h] = ue.useState(
|
|
7563
|
-
new
|
|
7566
|
+
new Tu({
|
|
7564
7567
|
client: t,
|
|
7565
7568
|
queryFlavor: "React Query",
|
|
7566
7569
|
version: "5",
|
|
@@ -7587,9 +7590,9 @@ function Iu(e) {
|
|
|
7587
7590
|
h.unmount();
|
|
7588
7591
|
}), [h]), /* @__PURE__ */ r("div", { className: "tsqd-parent-container", ref: n });
|
|
7589
7592
|
}
|
|
7590
|
-
function
|
|
7593
|
+
function _u(e) {
|
|
7591
7594
|
const t = Ne(e.client), n = ue.useRef(null), { errorTypes: s, styleNonce: a, shadowDOMTarget: i } = e, [l] = ue.useState(
|
|
7592
|
-
new
|
|
7595
|
+
new Cu({
|
|
7593
7596
|
client: t,
|
|
7594
7597
|
queryFlavor: "React Query",
|
|
7595
7598
|
version: "5",
|
|
@@ -7621,52 +7624,52 @@ function ku(e) {
|
|
|
7621
7624
|
}
|
|
7622
7625
|
);
|
|
7623
7626
|
}
|
|
7624
|
-
var
|
|
7627
|
+
var Iu = process.env.NODE_ENV !== "development" ? function() {
|
|
7625
7628
|
return null;
|
|
7626
|
-
} :
|
|
7629
|
+
} : Pu;
|
|
7627
7630
|
process.env.NODE_ENV;
|
|
7628
|
-
const
|
|
7629
|
-
() => import("./digital-asset-manager-
|
|
7631
|
+
const ku = Qa(
|
|
7632
|
+
() => import("./digital-asset-manager-ZaGekAia.js")
|
|
7630
7633
|
);
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
zn("user-info",
|
|
7637
|
-
const
|
|
7634
|
+
ul();
|
|
7635
|
+
ec();
|
|
7636
|
+
ci(Oo);
|
|
7637
|
+
ui(ku);
|
|
7638
|
+
di(Bl);
|
|
7639
|
+
zn("user-info", sc);
|
|
7640
|
+
const Lu = (e) => {
|
|
7638
7641
|
const t = ut([]), [n] = Ue(), s = n.get("page"), a = n.get("lang"), { data: i } = Re(), {
|
|
7639
7642
|
data: l = {
|
|
7640
7643
|
role: "",
|
|
7641
7644
|
permissions: null
|
|
7642
7645
|
}
|
|
7643
|
-
} =
|
|
7646
|
+
} = Ho(), { data: o } = qo(), { data: c, isFetching: h } = Mr(), { blocks: g } = Fo(c), { data: d } = un(), { data: E } = ke(), { mutateAsync: y } = Rr(), p = Bo(), { getUILibraryBlock: S, getUILibraryBlocks: v, onSave: x } = Ko(), { getPartialBlocks: U, getPartialBlockBlocks: b } = jo(), { aiContext: w, setAiContext: T } = bs(), { mutateAsync: D } = ql(), [ee, le] = P(!1), k = z(
|
|
7644
7647
|
() => (d == null ? void 0 : d.fallbackLang) || "en",
|
|
7645
7648
|
[d]
|
|
7646
7649
|
), { data: q } = Fr({
|
|
7647
7650
|
pageType: i == null ? void 0 : i.pageType,
|
|
7648
7651
|
lang: a || k
|
|
7649
7652
|
});
|
|
7650
|
-
|
|
7651
|
-
const
|
|
7653
|
+
Nl(), Se(() => {
|
|
7654
|
+
const Y = () => {
|
|
7652
7655
|
document.hidden ? le(!0) : le(!1);
|
|
7653
7656
|
};
|
|
7654
|
-
return window.addEventListener("visibilitychange",
|
|
7657
|
+
return window.addEventListener("visibilitychange", Y), () => window.removeEventListener("visibilitychange", Y);
|
|
7655
7658
|
}, []), t.current = g;
|
|
7656
|
-
const A =
|
|
7657
|
-
const
|
|
7658
|
-
return l && (
|
|
7659
|
-
}, [l]), M =
|
|
7660
|
-
async (
|
|
7659
|
+
const A = z(() => {
|
|
7660
|
+
const Y = {};
|
|
7661
|
+
return l && (Y.permissions = ne(l, "permissions", null), Y.role = ne(l, "role", "user")), Y;
|
|
7662
|
+
}, [l]), M = z(() => o, [o]), se = Pe(
|
|
7663
|
+
async (Y, he) => await D({ pageType: Y, query: he }),
|
|
7661
7664
|
[D]
|
|
7662
|
-
), fe =
|
|
7665
|
+
), fe = z(
|
|
7663
7666
|
() => ne(d, "theme", {}) || {},
|
|
7664
7667
|
[d]
|
|
7665
7668
|
);
|
|
7666
7669
|
return /* @__PURE__ */ u(we, { children: [
|
|
7667
7670
|
h && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-50 flex items-center justify-center w-screen h-screen bg-white/30", children: /* @__PURE__ */ r("div", { className: "flex items-center justify-center bg-white rounded-full size-10", children: /* @__PURE__ */ r(Gr, { className: "size-5 animate-spin" }) }) }),
|
|
7668
7671
|
/* @__PURE__ */ r(
|
|
7669
|
-
|
|
7672
|
+
hi,
|
|
7670
7673
|
{
|
|
7671
7674
|
pageExternalData: q,
|
|
7672
7675
|
themePresets: e.themePresets ?? [],
|
|
@@ -7684,49 +7687,49 @@ const Gu = (e) => {
|
|
|
7684
7687
|
getPartialBlockBlocks: b,
|
|
7685
7688
|
getPartialBlocks: U,
|
|
7686
7689
|
blocks: h ? [] : g,
|
|
7687
|
-
theme:
|
|
7690
|
+
theme: Wa(fe),
|
|
7688
7691
|
getUILibraryBlock: S,
|
|
7689
7692
|
getUILibraryBlocks: v,
|
|
7690
7693
|
uiLibraries: M,
|
|
7691
7694
|
pageTypes: E,
|
|
7692
7695
|
searchPageTypeItems: se,
|
|
7693
|
-
saveAiContextCallback: async (
|
|
7696
|
+
saveAiContextCallback: async (Y) => {
|
|
7694
7697
|
if (!s) return !0;
|
|
7695
7698
|
const he = t.current, F = {
|
|
7696
7699
|
_type: "@chai/ai-context",
|
|
7697
|
-
_value: Ds(
|
|
7700
|
+
_value: Ds(Y) ? Y : ""
|
|
7698
7701
|
}, be = [...he, F];
|
|
7699
|
-
return await x({ page: s, blocks: be }), T(
|
|
7702
|
+
return await x({ page: s, blocks: be }), T(Y), !0;
|
|
7700
7703
|
},
|
|
7701
7704
|
aiContext: w,
|
|
7702
7705
|
askAiCallBack: p,
|
|
7703
|
-
onSave: async ({ blocks:
|
|
7706
|
+
onSave: async ({ blocks: Y, theme: he }) => {
|
|
7704
7707
|
if (!s) return !0;
|
|
7705
|
-
t.current =
|
|
7708
|
+
t.current = Y;
|
|
7706
7709
|
const F = {
|
|
7707
7710
|
_type: "@chai/ai-context",
|
|
7708
7711
|
_value: Ds(w) ? w : ""
|
|
7709
|
-
}, be = [...
|
|
7712
|
+
}, be = [...Y, F];
|
|
7710
7713
|
return await x({ page: s, blocks: be }), t.current = be, is(he, fe) || await y({ settings: { theme: he } }), !0;
|
|
7711
7714
|
},
|
|
7712
|
-
themePanelComponent:
|
|
7715
|
+
themePanelComponent: Ql,
|
|
7713
7716
|
...A
|
|
7714
7717
|
}
|
|
7715
7718
|
),
|
|
7716
7719
|
/* @__PURE__ */ u("div", { children: [
|
|
7717
|
-
/* @__PURE__ */ r(
|
|
7718
|
-
/* @__PURE__ */ r(
|
|
7720
|
+
/* @__PURE__ */ r(Cl, {}),
|
|
7721
|
+
/* @__PURE__ */ r(Pl, {})
|
|
7719
7722
|
] })
|
|
7720
7723
|
] });
|
|
7721
|
-
},
|
|
7724
|
+
}, Du = new Xa({
|
|
7722
7725
|
defaultOptions: {
|
|
7723
7726
|
queries: {
|
|
7724
7727
|
refetchOnWindowFocus: !1,
|
|
7725
7728
|
refetchOnReconnect: !1
|
|
7726
7729
|
}
|
|
7727
7730
|
}
|
|
7728
|
-
}),
|
|
7729
|
-
const { isLoggedIn: t } =
|
|
7731
|
+
}), Ad = (e) => {
|
|
7732
|
+
const { isLoggedIn: t } = st(), [, n] = Or(), [s, a] = P(!1);
|
|
7730
7733
|
return Se(() => (n(
|
|
7731
7734
|
er(e, [
|
|
7732
7735
|
"apiUrl",
|
|
@@ -7740,76 +7743,76 @@ const Gu = (e) => {
|
|
|
7740
7743
|
a(!0);
|
|
7741
7744
|
}, 200), () => {
|
|
7742
7745
|
a(!1), n({});
|
|
7743
|
-
}), [e, n]), s ? /* @__PURE__ */ u(
|
|
7744
|
-
t ? /* @__PURE__ */ r(
|
|
7745
|
-
/* @__PURE__ */ r(
|
|
7746
|
+
}), [e, n]), s ? /* @__PURE__ */ u(Za, { client: Du, children: [
|
|
7747
|
+
t ? /* @__PURE__ */ r(Lu, { ...e }) : /* @__PURE__ */ r(zo, {}),
|
|
7748
|
+
/* @__PURE__ */ r(Iu, {})
|
|
7746
7749
|
] }) : /* @__PURE__ */ r("div", {});
|
|
7747
7750
|
};
|
|
7748
7751
|
if (typeof window > "u")
|
|
7749
7752
|
throw new Error("@chaibuilder/pages is not available on the server");
|
|
7750
7753
|
export {
|
|
7751
7754
|
Yr as $,
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7755
|
+
Ed as A,
|
|
7756
|
+
Xu as B,
|
|
7757
|
+
ud as C,
|
|
7758
|
+
hd as D,
|
|
7759
|
+
_e as E,
|
|
7760
|
+
rd as F,
|
|
7761
|
+
ic as G,
|
|
7762
|
+
Su as H,
|
|
7763
|
+
ad as I,
|
|
7761
7764
|
wn as J,
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
+
Sd as K,
|
|
7766
|
+
gd as L,
|
|
7767
|
+
fd as M,
|
|
7765
7768
|
ot as N,
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7769
|
+
Oc as O,
|
|
7770
|
+
dd as P,
|
|
7771
|
+
md as Q,
|
|
7772
|
+
od as R,
|
|
7773
|
+
id as S,
|
|
7774
|
+
ld as T,
|
|
7772
7775
|
Sn as U,
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
+
ed as V,
|
|
7777
|
+
Yu as W,
|
|
7778
|
+
W as X,
|
|
7776
7779
|
I as Y,
|
|
7777
|
-
|
|
7778
|
-
|
|
7780
|
+
j as Z,
|
|
7781
|
+
Ad as _,
|
|
7779
7782
|
ra as a,
|
|
7780
7783
|
Oe as a0,
|
|
7781
|
-
|
|
7784
|
+
Qu as a1,
|
|
7782
7785
|
Re as a2,
|
|
7783
7786
|
cn as a3,
|
|
7784
7787
|
Rn as a4,
|
|
7785
7788
|
un as a5,
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
+
st as a6,
|
|
7790
|
+
Ho as a7,
|
|
7791
|
+
Wu as a8,
|
|
7789
7792
|
dn as a9,
|
|
7790
7793
|
Ee as b,
|
|
7791
7794
|
Ge as c,
|
|
7792
|
-
|
|
7795
|
+
Dc as d,
|
|
7793
7796
|
Zr as e,
|
|
7794
7797
|
aa as f,
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
+
Nd as g,
|
|
7799
|
+
wc as h,
|
|
7800
|
+
td as i,
|
|
7798
7801
|
ct as j,
|
|
7799
7802
|
Jn as k,
|
|
7800
|
-
|
|
7801
|
-
|
|
7803
|
+
sd as l,
|
|
7804
|
+
wd as m,
|
|
7802
7805
|
Ft as n,
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
+
Zu as o,
|
|
7807
|
+
cc as p,
|
|
7808
|
+
qc as q,
|
|
7806
7809
|
es as r,
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7810
|
+
bd as s,
|
|
7811
|
+
cd as t,
|
|
7812
|
+
nd as u,
|
|
7813
|
+
Rc as v,
|
|
7814
|
+
pd as w,
|
|
7815
|
+
yd as x,
|
|
7816
|
+
Fc as y,
|
|
7817
|
+
vd as z
|
|
7815
7818
|
};
|