@chaibuilder/pages 0.16.1 → 0.16.2
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/{2AITGKQY-CD9A6oc6.cjs → 2AITGKQY-8xBkB8Pv.cjs} +1 -1
- package/dist/{2AITGKQY-Z1XcJ6Q7.js → 2AITGKQY-DI5Po2Nc.js} +2 -2
- package/dist/{NCMVHL6D-CkpM-3og.cjs → NCMVHL6D-B4xqJIpr.cjs} +1 -1
- package/dist/{NCMVHL6D-DoK0XoIo.js → NCMVHL6D-kHUQxG8D.js} +2 -2
- package/dist/{ZDWCUMSJ-D32swpGV.cjs → ZDWCUMSJ-CjlhoCfQ.cjs} +1 -1
- package/dist/{ZDWCUMSJ-hGXNxbOK.js → ZDWCUMSJ-DRgY2Er1.js} +1 -1
- package/dist/{add-new-language-page-BZPoqdX-.js → add-new-language-page-DSB8ohdj.js} +2 -2
- package/dist/{add-new-language-page-D65TpIwK.cjs → add-new-language-page-noBKABVx.cjs} +1 -1
- package/dist/{add-new-page-DK25Y0zS.js → add-new-page-BYkFbQvH.js} +1 -1
- package/dist/{add-new-page-CQ0aj4RJ.cjs → add-new-page-CByS9KqS.cjs} +1 -1
- package/dist/ai-panel-content-BBnzp4fO.cjs +1 -0
- package/dist/ai-panel-content-DET3HjIR.js +54 -0
- package/dist/ai-panel-default-lang-BYfcAA8u.js +178 -0
- package/dist/ai-panel-default-lang-D-RS6z5I.cjs +1 -0
- package/dist/ai-panel-other-lang-BoD4FsoG.cjs +1 -0
- package/dist/{ai-panel-other-lang-CCyiE6ha.js → ai-panel-other-lang-TVjNYPRK.js} +76 -71
- package/dist/{ai-panel-quick-prompts-DeS7L1f0.cjs → ai-panel-quick-prompts-BGBdrdP7.cjs} +1 -1
- package/dist/{ai-panel-quick-prompts-Ds0Ndz7g.js → ai-panel-quick-prompts-BPrA9nvg.js} +1 -1
- package/dist/ai-prompt-input-DB1FpA_q.cjs +1 -0
- package/dist/ai-prompt-input-qegCvwnu.js +222 -0
- package/dist/{ai-translation-prompt-BiJ5B_an.js → ai-translation-prompt--HB1UAhC.js} +1 -1
- package/dist/{ai-translation-prompt-BUFjo_om.cjs → ai-translation-prompt-Bj-AM4xK.cjs} +1 -1
- package/dist/{delete-page-B95T2Prd.js → delete-page-C7xfkDN5.js} +1 -1
- package/dist/{delete-page-BSop1jNg.cjs → delete-page-DJLNpUxo.cjs} +1 -1
- package/dist/{digital-asset-manager-Bn58WzM6.cjs → digital-asset-manager-BblMbig0.cjs} +1 -1
- package/dist/{digital-asset-manager-BQNSwfKs.js → digital-asset-manager-INrgGoC0.js} +1 -1
- package/dist/{duplicate-page-CrzzObAj.js → duplicate-page-B8k4yZxa.js} +2 -2
- package/dist/{duplicate-page-BLxkSiug.cjs → duplicate-page-C9XewuHN.cjs} +1 -1
- package/dist/{dynamic-page-selector-D6wQnNfH.js → dynamic-page-selector-C7Vos5-l.js} +1 -1
- package/dist/{dynamic-page-selector-D8UZ63LW.cjs → dynamic-page-selector-CYYnEngT.cjs} +1 -1
- package/dist/index-CyHmr87X.cjs +5 -0
- package/dist/{index-yhKyIbgs.js → index-DRQI9rlW.js} +461 -452
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{json-diff-viewer-ISJS7lHK.js → json-diff-viewer-8vUwU0Sk.js} +1 -1
- package/dist/{json-diff-viewer-ZeJ3Rp2y.cjs → json-diff-viewer-DVskWjAL.cjs} +1 -1
- package/dist/{lang-panel-Bj11IL7k.js → lang-panel-B8SeKnwN.js} +2 -2
- package/dist/{lang-panel-DqN_J3vz.cjs → lang-panel-BeyCHr4u.cjs} +1 -1
- package/dist/{mark-as-template-CmCCMaQg.js → mark-as-template-CpNHtyfB.js} +1 -1
- package/dist/{mark-as-template-CcwAAdrd.cjs → mark-as-template-DTEF_hyN.cjs} +1 -1
- package/dist/{no-language-page-content-Cme-zo4R.js → no-language-page-content-BPiFDGJr.js} +1 -1
- package/dist/{no-language-page-content-BXm1k1Aa.cjs → no-language-page-content-DnAP2ICP.cjs} +1 -1
- package/dist/{page-creator-ByhjXyHP.cjs → page-creator-BawPgFIv.cjs} +1 -1
- package/dist/{page-creator-Zbv4d4H8.js → page-creator-BiDN-rLc.js} +2 -2
- package/dist/{page-lock-request-DDQJb8IA.js → page-lock-request-BVYclE6H.js} +1 -1
- package/dist/{page-lock-request-Cln-EE6Z.cjs → page-lock-request-wIw-W5qT.cjs} +1 -1
- package/dist/{page-locked-by-dialog-Csn56a3n.js → page-locked-by-dialog-CuHvd48D.js} +1 -1
- package/dist/{page-locked-by-dialog-BIXYITEu.cjs → page-locked-by-dialog-jZDY0omZ.cjs} +1 -1
- package/dist/{page-manager-new-BJaTBpih.cjs → page-manager-new-BmZlPcpL.cjs} +1 -1
- package/dist/{page-manager-new-BrRxZDfT.js → page-manager-new-kMwd9hkH.js} +2 -2
- package/dist/{page-manager-search-and-filter-_Hvk3bU3.js → page-manager-search-and-filter-BU-1wFbM.js} +1 -1
- package/dist/{page-manager-search-and-filter-Bk3PUjha.cjs → page-manager-search-and-filter-DMauRN5Y.cjs} +1 -1
- package/dist/{page-revisions-content-C_Ha3tFu.cjs → page-revisions-content-BH0Xy_k9.cjs} +1 -1
- package/dist/{page-revisions-content-B6fRCBX_.js → page-revisions-content-c32By7XR.js} +2 -2
- package/dist/{prompt-helper-DgI1lgGV.cjs → prompt-helper-BLBZjr5q.cjs} +1 -1
- package/dist/{prompt-helper-Csgu8Rfb.js → prompt-helper-Bh7WyDYo.js} +1 -1
- package/dist/{publish-pages-content-DQDNxwHD.cjs → publish-pages-content-B5UqPZy0.cjs} +1 -1
- package/dist/{publish-pages-content-CFEIxKQD.js → publish-pages-content-BB6l92oG.js} +2 -2
- package/dist/{save-to-lib-Bl22umTa.cjs → save-to-lib-DM1MzZTb.cjs} +1 -1
- package/dist/{save-to-lib-YyYkF6c6.js → save-to-lib-NvQZll63.js} +1 -1
- package/dist/{seo-panel-BZlMea1L.js → seo-panel-BsMBb5Ep.js} +1 -1
- package/dist/{seo-panel-BhxikAkG.cjs → seo-panel-C20m5SFc.cjs} +1 -1
- package/dist/server.cjs +8 -8
- package/dist/server.d.ts +1 -0
- package/dist/server.js +141 -141
- package/dist/{shared-json-ld-E4Ckwlbr.js → shared-json-ld-BVqIgANo.js} +1 -1
- package/dist/{shared-json-ld-BfkH76U3.cjs → shared-json-ld-CfWO90c0.cjs} +1 -1
- package/dist/{slug-input--VmQG0S1.cjs → slug-input-BewLv-d8.cjs} +1 -1
- package/dist/{slug-input-CKKkqGj4.js → slug-input-RCGUFL2T.js} +1 -1
- package/dist/{theme-panel-footer-CagxEZEO.cjs → theme-panel-footer-8oSQtfZ5.cjs} +1 -1
- package/dist/{theme-panel-footer-2ERfMsET.js → theme-panel-footer-BJB36k8A.js} +1 -1
- package/dist/{unmark-as-template-BJ5CTNAe.js → unmark-as-template-CGZ0CCI2.js} +1 -1
- package/dist/{unmark-as-template-CeWpo9wD.cjs → unmark-as-template-DLNmyum3.cjs} +1 -1
- package/dist/{unpublish-page-DmZSVxFj.cjs → unpublish-page-B_xQPGsZ.cjs} +1 -1
- package/dist/{unpublish-page-DvOWVBIf.js → unpublish-page-CEtpcrvc.js} +1 -1
- package/dist/{web-preview-DTkIggV7.js → web-preview-CCGkTRU3.js} +1 -1
- package/dist/{web-preview-DlSKpPUZ.cjs → web-preview-Cifi0bwK.cjs} +1 -1
- package/package.json +1 -1
- package/dist/ai-panel-content-BSGJqnTM.cjs +0 -1
- package/dist/ai-panel-content-DYRZnMgV.js +0 -52
- package/dist/ai-panel-default-lang-BOZrL5Xe.cjs +0 -1
- package/dist/ai-panel-default-lang-DZUqC79y.js +0 -173
- package/dist/ai-panel-other-lang-CNtlT5dM.cjs +0 -1
- package/dist/ai-prompt-input-Ch_PLEPN.js +0 -133
- package/dist/ai-prompt-input-Zg6lN1Lo.cjs +0 -1
- package/dist/index-W0r4o5Ro.cjs +0 -5
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
var Pr = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var Mn = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
5
|
var vr = (e, t, n) => t in e ? Pr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
-
var ve = (e, t, n) => vr(e, typeof t != "symbol" ? t + "" : t, n),
|
|
7
|
-
var _ = (e, t, n) => (
|
|
6
|
+
var ve = (e, t, n) => vr(e, typeof t != "symbol" ? t + "" : t, n), Bn = (e, t, n) => t.has(e) || Mn("Cannot " + n);
|
|
7
|
+
var _ = (e, t, n) => (Bn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), D = (e, t, n) => t.has(e) ? Mn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), O = (e, t, n, s) => (Bn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
8
8
|
import { jsx as l, jsxs as m, Fragment as ge } from "react/jsx-runtime";
|
|
9
|
-
import { get as V, reverse as wr, sortBy as br, each as Ir, find as re, isEmpty as he, groupBy as
|
|
10
|
-
import * as
|
|
11
|
-
import Fr, { useMemo as Q, useCallback as
|
|
9
|
+
import { get as V, reverse as wr, sortBy as br, each as Ir, find as re, isEmpty as he, groupBy as Lr, minBy as Cr, noop as ds, keyBy as Nr, map as Mt, compact as fs, upperCase as Fn, filter as hs, includes as kr, has as zt, pick as vn, keys as Or, pickBy as Dr, endsWith as xr, isArray as Gr, startCase as Rr, isFunction as Ur, cloneDeep as Mr, isEqual as Br } from "lodash-es";
|
|
10
|
+
import * as j from "react";
|
|
11
|
+
import Fr, { useMemo as Q, useCallback as z, useState as K, useEffect as se, useRef as at, lazy as F, Suspense as H, createContext as qr, Component as Kr, createElement as qn } from "react";
|
|
12
12
|
import { atom as Ee, useAtom as te } from "jotai";
|
|
13
|
-
import { useQuery as ae, useQueryClient as W, useMutation as
|
|
14
|
-
import { useLanguages as Se, useSavePage as
|
|
13
|
+
import { useQuery as ae, useQueryClient as W, useMutation as Z, onlineManager as gs, QueryClient as Vr, QueryClientProvider as Hr } from "@tanstack/react-query";
|
|
14
|
+
import { useLanguages as Se, useSavePage as xe, useTranslation as _e, mergeClasses as Bt, usePermissions as ms, PERMISSIONS as Qr, useRightPanel as $r, useChaiFeatureFlag as zr, useIsPageLoaded as jr, registerChaiLibrary as Wr, getBlocksFromHTML as Yr, registerChaiSidebarPanel as Lt, registerChaiFeatureFlag as tn, registerChaiTopBar as Jr, registerChaiMediaManager as Zr, registerChaiSaveToLibrary as Xr, ChaiBuilderEditor as ea } from "@chaibuilder/sdk";
|
|
15
15
|
import { toast as R } from "sonner";
|
|
16
|
-
import { Tooltip as
|
|
17
|
-
import { LogsIcon as Ia, Folder as
|
|
16
|
+
import { Tooltip as jt, TooltipTrigger as Wt, Button as U, TooltipContent as Yt, Sheet as Es, SheetContent as ps, SheetHeader as ta, SheetTitle as na, SheetDescription as sa, DropdownMenu as wn, DropdownMenuTrigger as bn, DropdownMenuContent as In, DropdownMenuItem as ue, Separator as ra, TooltipProvider as ys, SheetTrigger as aa, Skeleton as Ct, Dialog as As, HoverCard as ia, HoverCardTrigger as oa, HoverCardContent as la, AlertDialog as ca, AlertDialogTrigger as ua, AlertDialogContent as da, AlertDialogHeader as fa, AlertDialogTitle as ha, AlertDialogDescription as ga, AlertDialogFooter as ma, AlertDialogCancel as Ea, AlertDialogAction as pa, Popover as ya, PopoverTrigger as Aa, DialogContent as Ta, DialogHeader as Sa, DialogTitle as _a, Tabs as Pa, TabsList as va, TabsTrigger as nn, TabsContent as sn, Textarea as Kn, Alert as wa, AlertDescription as ba } from "@chaibuilder/sdk/ui";
|
|
17
|
+
import { LogsIcon as Ia, Folder as La, Languages as Vn, ChevronDown as hn, Star as Ca, Plus as Ts, History as Na, Play as ka, Palette as Oa, CheckCircle as Da, Loader as Ft, Save as xa, Send as Hn, Rocket as Qn, CopyPlusIcon as Ga, Pencil as Ra, Power as Ua, Trash as Ma, SquareLibrary as $n, Hash as Ba, File as Fa, MoreHorizontal as zn, ExternalLink as qa, LanguagesIcon as Ka, User as Va, X as jn, Trash2 as Ha, ImageIcon as Wn, Code as Qa, Eye as $a, Share2 as za, FileCode2 as ja, AlertTriangle as Wa } from "lucide-react";
|
|
18
18
|
import { useRegisteredChaiBlocks as Ya, getDefaultBlockProps as Ja } from "@chaibuilder/runtime";
|
|
19
|
-
import { loadWebBlocks as
|
|
19
|
+
import { loadWebBlocks as Za } from "@chaibuilder/sdk/web-blocks";
|
|
20
20
|
const E = {
|
|
21
21
|
GET_GLOBAL_JSONLD_ITEMS: "GET_GLOBAL_JSONLD_ITEMS",
|
|
22
22
|
GENERATE_SEO_FIELD: "GENERATE_SEO_FIELD",
|
|
@@ -81,10 +81,10 @@ const E = {
|
|
|
81
81
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
82
82
|
GET_ASSETS: "GET_ASSETS",
|
|
83
83
|
GET_ASSET: "GET_ASSET"
|
|
84
|
-
},
|
|
85
|
-
const [n] =
|
|
84
|
+
}, Xa = Ee({}), Ln = () => te(Xa), oe = (e, t) => {
|
|
85
|
+
const [n] = Ln();
|
|
86
86
|
return Q(() => V(n, e, t), [n, e, t]);
|
|
87
|
-
},
|
|
87
|
+
}, N = () => oe("apiUrl", "/chai/api"), Ss = () => oe("usersApiUrl", "/chai/users"), Oc = () => oe("assetsApiUrl", "/chai/assets"), ei = () => oe("websocket", null), _s = async (e, t, n = {}) => await fetch(e, {
|
|
88
88
|
method: "POST",
|
|
89
89
|
headers: {
|
|
90
90
|
"Content-Type": "application/json",
|
|
@@ -102,8 +102,8 @@ if (import.meta.vitest) {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
const Dc = () => {
|
|
105
|
-
const e =
|
|
106
|
-
return
|
|
105
|
+
const e = L(), t = N();
|
|
106
|
+
return z(
|
|
107
107
|
async ({
|
|
108
108
|
body: n,
|
|
109
109
|
headers: s = {},
|
|
@@ -112,9 +112,9 @@ const Dc = () => {
|
|
|
112
112
|
}) => e(r, n, s, a),
|
|
113
113
|
[e]
|
|
114
114
|
);
|
|
115
|
-
},
|
|
116
|
-
const e = oe("onLogout"), t = oe("getAccessToken"), n =
|
|
117
|
-
return
|
|
115
|
+
}, L = () => {
|
|
116
|
+
const e = oe("onLogout"), t = oe("getAccessToken"), n = N();
|
|
117
|
+
return z(
|
|
118
118
|
async (s = n, r, a = {}, i = !1) => {
|
|
119
119
|
const o = await t();
|
|
120
120
|
if (!o)
|
|
@@ -158,8 +158,8 @@ function le() {
|
|
|
158
158
|
};
|
|
159
159
|
}, []), [e, t];
|
|
160
160
|
}
|
|
161
|
-
const
|
|
162
|
-
const t =
|
|
161
|
+
const Ge = (e) => {
|
|
162
|
+
const t = N(), [n] = le(), s = e ?? n.get("page"), r = L();
|
|
163
163
|
return ae({
|
|
164
164
|
queryKey: [E.GET_LANGUAGE_PAGES, s],
|
|
165
165
|
staleTime: 1 / 0,
|
|
@@ -176,7 +176,7 @@ const xe = (e) => {
|
|
|
176
176
|
enabled: !!s
|
|
177
177
|
});
|
|
178
178
|
}, Re = () => {
|
|
179
|
-
const e =
|
|
179
|
+
const e = N(), t = L();
|
|
180
180
|
return ae({
|
|
181
181
|
queryKey: [E.GET_WEBSITE_DRAFT_SETTINGS],
|
|
182
182
|
staleTime: 5 * 60 * 1e3,
|
|
@@ -192,7 +192,7 @@ const xe = (e) => {
|
|
|
192
192
|
})
|
|
193
193
|
});
|
|
194
194
|
}, Ps = (e) => {
|
|
195
|
-
const { fallbackLang: t } = Se(), { data: n } = Re(), { data: s, isFetching: r } =
|
|
195
|
+
const { fallbackLang: t } = Se(), { data: n } = Re(), { data: s, isFetching: r } = Ge(), a = Q(() => {
|
|
196
196
|
const i = { [t]: !0 };
|
|
197
197
|
return Ir(V(n, "languages"), (o) => {
|
|
198
198
|
const c = re(s, { lang: o });
|
|
@@ -245,10 +245,10 @@ class ti {
|
|
|
245
245
|
return t.length > 0 ? t[0] : null;
|
|
246
246
|
}
|
|
247
247
|
getPageUserMapping() {
|
|
248
|
-
const t = this.getOnlineUsers({}), n =
|
|
248
|
+
const t = this.getOnlineUsers({}), n = Lr(t, "pageId"), s = {};
|
|
249
249
|
return Object.keys(n).forEach((r) => {
|
|
250
250
|
var i;
|
|
251
|
-
const a = (i =
|
|
251
|
+
const a = (i = Cr(n[r], "onlineAt")) == null ? void 0 : i.userId;
|
|
252
252
|
a !== this.userId && (s[r] = a);
|
|
253
253
|
}), s;
|
|
254
254
|
}
|
|
@@ -310,7 +310,7 @@ class ti {
|
|
|
310
310
|
}
|
|
311
311
|
const ni = Ee(
|
|
312
312
|
null
|
|
313
|
-
), vs = () => te(ni),
|
|
313
|
+
), vs = () => te(ni), Cn = () => {
|
|
314
314
|
const [e] = vs();
|
|
315
315
|
return (e == null ? void 0 : e.slug) || "";
|
|
316
316
|
};
|
|
@@ -322,7 +322,7 @@ function si(e, t) {
|
|
|
322
322
|
}, [e, t]), n;
|
|
323
323
|
}
|
|
324
324
|
const ri = ({ query: e, uuid: t }) => {
|
|
325
|
-
const { selectedLang: n, fallbackLang: s } = Se(), { data: r } = ie(), a = r == null ? void 0 : r.pageType, i =
|
|
325
|
+
const { selectedLang: n, fallbackLang: s } = Se(), { data: r } = ie(), a = r == null ? void 0 : r.pageType, i = N(), o = L(), { data: c, isFetching: u } = ae({
|
|
326
326
|
queryKey: [E.GET_DYNAMIC_PAGES, e, a, t],
|
|
327
327
|
staleTime: 60 * 60 * 1e3,
|
|
328
328
|
placeholderData: [],
|
|
@@ -334,7 +334,7 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
334
334
|
}), d = Q(() => n === "" ? c.filter((f) => f.lang === "" || f.lang === s) : c.filter((f) => f.lang === n), [n, s, c]);
|
|
335
335
|
return { allLangPages: c, data: d, isFetching: u };
|
|
336
336
|
}, ai = () => {
|
|
337
|
-
const { selectedLang: e, fallbackLang: t } = Se(), [n, s] = vs(), [r, a] = K(""), i = si(r, 500), { allLangPages: o, data: c, isFetching: u } = ri({ query: i }), d =
|
|
337
|
+
const { selectedLang: e, fallbackLang: t } = Se(), [n, s] = vs(), [r, a] = K(""), i = si(r, 500), { allLangPages: o, data: c, isFetching: u } = ri({ query: i }), d = z((g) => s(g), [s]), f = z((g) => a(g), [a]), h = z(() => {
|
|
338
338
|
if (!n) return;
|
|
339
339
|
const g = !(n != null && n.primaryPage), p = e.length === 0, S = g ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, T = o.filter(
|
|
340
340
|
(y) => (y == null ? void 0 : y.primaryPage) === S || y.id === S
|
|
@@ -352,14 +352,14 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
352
352
|
updateSearchQuery: f,
|
|
353
353
|
onChangeLanguage: h
|
|
354
354
|
};
|
|
355
|
-
}, ii = Ee({ lastSaved: void 0 }),
|
|
356
|
-
const [e] = le(), t = e.get("page"), { data: n, isFetching: s } =
|
|
355
|
+
}, ii = Ee({ lastSaved: void 0 }), Nn = () => te(ii), ie = () => {
|
|
356
|
+
const [e] = le(), t = e.get("page"), { data: n, isFetching: s } = Ge();
|
|
357
357
|
return { data: Q(() => ({ ...re(n, { id: t }) || {} }), [n, t]), isFetching: s };
|
|
358
358
|
}, be = () => {
|
|
359
|
-
const [e] = le(), t = e.get("lang") ?? "", { data: n, isFetching: s } =
|
|
359
|
+
const [e] = le(), t = e.get("lang") ?? "", { data: n, isFetching: s } = Ge();
|
|
360
360
|
return { data: Q(() => re(n, { lang: t }) || {}, [n, t]), isFetching: s };
|
|
361
361
|
}, oi = Ee({}), li = () => te(oi), ci = () => {
|
|
362
|
-
const { data: e } = be(), t =
|
|
362
|
+
const { data: e } = be(), t = Cn(), n = oe("getLiveUrl", ds), s = e == null ? void 0 : e.slug, r = n(s || "/");
|
|
363
363
|
return t ? r + t : r;
|
|
364
364
|
}, Jt = () => {
|
|
365
365
|
const e = oe("currentUser"), t = oe("onLogout");
|
|
@@ -369,7 +369,7 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
369
369
|
logout: t
|
|
370
370
|
};
|
|
371
371
|
}, ui = (e) => {
|
|
372
|
-
const t = Ss(), n =
|
|
372
|
+
const t = Ss(), n = L();
|
|
373
373
|
return ae({
|
|
374
374
|
queryKey: [E.GET_CHAI_USER, e],
|
|
375
375
|
queryFn: async () => {
|
|
@@ -388,7 +388,7 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
388
388
|
isTakeOverRequested: !1,
|
|
389
389
|
requestingClientId: "",
|
|
390
390
|
isActiveInOtherTab: !1
|
|
391
|
-
}), fi = Ee(""), hi = Ee(null), kn = Ee({}),
|
|
391
|
+
}), fi = Ee(""), hi = Ee(null), kn = Ee({}), xc = () => te(kn), Ie = () => {
|
|
392
392
|
const [e] = le(), t = e.get("page"), [n, s] = te(di), [r, a] = te(hi), [i, o] = te(fi), [c] = te(kn);
|
|
393
393
|
return {
|
|
394
394
|
pageLock: n,
|
|
@@ -510,9 +510,9 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
510
510
|
};
|
|
511
511
|
}, [s, c]), a == null ? void 0 : a.status;
|
|
512
512
|
}, mi = () => {
|
|
513
|
-
const { data: e } = ie(), { user: t } = Jt(), n = e == null ? void 0 : e.id, { pageLock: s, setPageLock: r, realtimeInstance: a } = Ie(), { savePageAsync: i } =
|
|
513
|
+
const { data: e } = ie(), { user: t } = Jt(), n = e == null ? void 0 : e.id, { pageLock: s, setPageLock: r, realtimeInstance: a } = Ie(), { savePageAsync: i } = xe(), o = z(() => {
|
|
514
514
|
!a || !n || !(t != null && t.id) || (r({ ...s, isTakeOverRequested: !0 }), a == null || a.sendEvent("TAKE_OVER_REQUESTED"));
|
|
515
|
-
}, [a, n, t == null ? void 0 : t.id, r, s]), c =
|
|
515
|
+
}, [a, n, t == null ? void 0 : t.id, r, s]), c = z(async () => {
|
|
516
516
|
!a || !n || !(t != null && t.id) || (await i(), a == null || a.sendEvent("TAKE_OVER_REQUEST_ACCEPTED", {
|
|
517
517
|
requestingClientId: s == null ? void 0 : s.requestingClientId
|
|
518
518
|
}), r({
|
|
@@ -522,7 +522,7 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
522
522
|
isActiveInOtherTab: !1,
|
|
523
523
|
isTakeOverRequested: !1
|
|
524
524
|
}));
|
|
525
|
-
}, [n, a, t == null ? void 0 : t.id, r, i, s]), u =
|
|
525
|
+
}, [n, a, t == null ? void 0 : t.id, r, i, s]), u = z(() => {
|
|
526
526
|
!a || !n || !(t != null && t.id) || (a == null || a.sendEvent("TAKE_OVER_REQUEST_REJECTED", {
|
|
527
527
|
requestingClientId: s == null ? void 0 : s.requestingClientId
|
|
528
528
|
}), r({
|
|
@@ -540,8 +540,8 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
540
540
|
rejectTakeOver: u,
|
|
541
541
|
requestTakeOver: o
|
|
542
542
|
};
|
|
543
|
-
}, Ei = F(() => import("./no-language-page-content-
|
|
544
|
-
const { pageLock: t, requestTakeOver: n } = mi(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ie(), { data: o, isFetching: c } = ui(s), [u] = le(), d = u.get("page"), [f] =
|
|
543
|
+
}, Ei = F(() => import("./no-language-page-content-BPiFDGJr.js")), pi = F(() => import("./page-locked-by-dialog-CuHvd48D.js")), rn = F(() => import("./page-lock-request-BVYclE6H.js")), yi = ({ isFetchingPage: e }) => {
|
|
544
|
+
const { pageLock: t, requestTakeOver: n } = mi(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ie(), { data: o, isFetching: c } = ui(s), [u] = le(), d = u.get("page"), [f] = Nn(), h = W(), g = z(() => {
|
|
545
545
|
n();
|
|
546
546
|
}, [n]);
|
|
547
547
|
return !d || e || !i || (t == null ? void 0 : t.status) === "checking" ? null : t != null && t.requestedBy ? /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
|
|
@@ -578,7 +578,7 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
578
578
|
}, Ai = () => {
|
|
579
579
|
const [e] = le(), t = e.get("lang");
|
|
580
580
|
return Ps(t) ? null : /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Ei, {}) });
|
|
581
|
-
},
|
|
581
|
+
}, Nt = {
|
|
582
582
|
ab: "Abkhazian",
|
|
583
583
|
aa: "Afar",
|
|
584
584
|
af: "Afrikaans",
|
|
@@ -778,15 +778,15 @@ const On = Ee(null), Dn = () => {
|
|
|
778
778
|
[e]
|
|
779
779
|
);
|
|
780
780
|
}, bs = () => {
|
|
781
|
-
const e =
|
|
781
|
+
const e = L(), t = N();
|
|
782
782
|
return ae({
|
|
783
783
|
queryKey: [E.GET_WEBSITE_PAGES],
|
|
784
784
|
staleTime: 1e3 * 60 * 5,
|
|
785
785
|
queryFn: async () => e(t, { action: E.GET_WEBSITE_PAGES }) || [],
|
|
786
786
|
placeholderData: (n) => n || []
|
|
787
787
|
});
|
|
788
|
-
},
|
|
789
|
-
const t =
|
|
788
|
+
}, Gc = (e) => {
|
|
789
|
+
const t = L(), n = N(), s = Dn();
|
|
790
790
|
return ae({
|
|
791
791
|
queryKey: [E.GET_WEBSITE_PAGES, e, s],
|
|
792
792
|
staleTime: 1e3 * 60 * 5,
|
|
@@ -794,27 +794,27 @@ const On = Ee(null), Dn = () => {
|
|
|
794
794
|
queryFn: async () => {
|
|
795
795
|
if (s === e) return {};
|
|
796
796
|
const r = await t(n, { action: E.GET_WEBSITE_PAGES, data: { lang: e } }) || [];
|
|
797
|
-
return
|
|
798
|
-
|
|
797
|
+
return Nr(
|
|
798
|
+
Mt(r, (a) => ({ ...a, lang: e })),
|
|
799
799
|
"primaryPage"
|
|
800
800
|
);
|
|
801
801
|
},
|
|
802
802
|
placeholderData: (r) => r || {}
|
|
803
803
|
});
|
|
804
|
-
}, Ti = F(() => import("./page-manager-new-
|
|
805
|
-
const { t } = _e(), [n, s] = le(), r = n.get("page"), { data: a, isFetching: i } = ie(), { data: o, isFetching: c } = bs(), [u, d] = K(!1), [f, h] = K(!0), { savePage: g } =
|
|
804
|
+
}, Ti = F(() => import("./page-manager-new-kMwd9hkH.js")), Is = ({ children: e }) => {
|
|
805
|
+
const { t } = _e(), [n, s] = le(), r = n.get("page"), { data: a, isFetching: i } = ie(), { data: o, isFetching: c } = bs(), [u, d] = K(!1), [f, h] = K(!0), { savePage: g } = xe(), p = !!r && !he(a), S = Q(() => {
|
|
806
806
|
if (!o || c) return !1;
|
|
807
807
|
const A = o.find((b) => b.slug === "/");
|
|
808
808
|
return A == null ? void 0 : A.id;
|
|
809
809
|
}, [o, c]);
|
|
810
810
|
se(() => {
|
|
811
|
-
if (c || !S || o.some((
|
|
811
|
+
if (c || !S || o.some((B) => B.id === r)) return;
|
|
812
812
|
const b = new URLSearchParams({ page: S });
|
|
813
813
|
ws(b, s), !c && o && h(!1);
|
|
814
814
|
}, [r, c, o, S, s]);
|
|
815
815
|
const P = !f && !r, T = !f && !i && he(a), y = u || P || T;
|
|
816
816
|
return /* @__PURE__ */ m(ge, { children: [
|
|
817
|
-
/* @__PURE__ */ l("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ l("div", { className: "relative", children: /* @__PURE__ */ m(
|
|
817
|
+
/* @__PURE__ */ l("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ l("div", { className: "relative", children: /* @__PURE__ */ m(jt, { children: [
|
|
818
818
|
/* @__PURE__ */ l(
|
|
819
819
|
Wt,
|
|
820
820
|
{
|
|
@@ -836,7 +836,7 @@ const On = Ee(null), Dn = () => {
|
|
|
836
836
|
children: [
|
|
837
837
|
/* @__PURE__ */ m(ta, { className: "mb-3 px-4 pt-4", children: [
|
|
838
838
|
/* @__PURE__ */ m(na, { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
839
|
-
/* @__PURE__ */ l("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ l(
|
|
839
|
+
/* @__PURE__ */ l("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ l(La, { className: "h-4 w-4" }) }),
|
|
840
840
|
/* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
841
841
|
/* @__PURE__ */ l("span", { className: "text-sm font-semibold", children: t("Pages") }),
|
|
842
842
|
/* @__PURE__ */ l("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: t("Manage your site structure") })
|
|
@@ -849,7 +849,7 @@ const On = Ee(null), Dn = () => {
|
|
|
849
849
|
}
|
|
850
850
|
) })
|
|
851
851
|
] });
|
|
852
|
-
}, Si = F(() => import("./add-new-language-page-
|
|
852
|
+
}, Si = F(() => import("./add-new-language-page-DSB8ohdj.js")), _i = () => {
|
|
853
853
|
const e = oe("topLeftCorner", null);
|
|
854
854
|
return e ? /* @__PURE__ */ l("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Fr.createElement(e, {}) }) : null;
|
|
855
855
|
}, Pi = ({
|
|
@@ -862,13 +862,13 @@ const On = Ee(null), Dn = () => {
|
|
|
862
862
|
const y = new URLSearchParams(window.location.search), A = y.get("lang");
|
|
863
863
|
A && (r.includes(A) ? i(A) : (y.delete("lang"), c(y), i("")));
|
|
864
864
|
}, [r, c, i]);
|
|
865
|
-
const [, f] = te(On), { data: h } = ie(), { data: g } = Re(), { data: p } =
|
|
865
|
+
const [, f] = te(On), { data: h } = ie(), { data: g } = Re(), { data: p } = Ge(), S = Q(() => {
|
|
866
866
|
const y = fs(
|
|
867
|
-
|
|
867
|
+
Mt(V(g, "languages"), (A) => {
|
|
868
868
|
const b = re(p, { lang: A });
|
|
869
869
|
return {
|
|
870
870
|
key: A,
|
|
871
|
-
value: V(
|
|
871
|
+
value: V(Nt, A, A),
|
|
872
872
|
isLangPageAdded: !!b
|
|
873
873
|
};
|
|
874
874
|
})
|
|
@@ -876,7 +876,7 @@ const On = Ee(null), Dn = () => {
|
|
|
876
876
|
return [
|
|
877
877
|
{
|
|
878
878
|
key: s,
|
|
879
|
-
value: V(
|
|
879
|
+
value: V(Nt, s),
|
|
880
880
|
isLangPageAdded: !0
|
|
881
881
|
},
|
|
882
882
|
...y
|
|
@@ -901,7 +901,7 @@ const On = Ee(null), Dn = () => {
|
|
|
901
901
|
};
|
|
902
902
|
return he(r) ? null : u ? /* @__PURE__ */ m(U, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
|
|
903
903
|
/* @__PURE__ */ l(Vn, { className: "h-4 w-4" }),
|
|
904
|
-
V(
|
|
904
|
+
V(Nt, o, o),
|
|
905
905
|
/* @__PURE__ */ l(hn, { className: "h-4 w-4" })
|
|
906
906
|
] }) : n ? /* @__PURE__ */ l(U, { onClick: () => T(s), variant: "link", size: "sm", children: d("Switch to default language") }) : /* @__PURE__ */ l(ge, { children: /* @__PURE__ */ m(wn, { children: [
|
|
907
907
|
/* @__PURE__ */ l(bn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
|
|
@@ -913,18 +913,18 @@ const On = Ee(null), Dn = () => {
|
|
|
913
913
|
className: "ml-px h-max gap-2 py-1.5",
|
|
914
914
|
children: [
|
|
915
915
|
/* @__PURE__ */ l(Vn, { className: "h-4 w-4" }),
|
|
916
|
-
V(
|
|
916
|
+
V(Nt, o, o),
|
|
917
917
|
/* @__PURE__ */ l(hn, { className: "h-4 w-4" })
|
|
918
918
|
]
|
|
919
919
|
}
|
|
920
920
|
) }),
|
|
921
921
|
/* @__PURE__ */ m(In, { className: "space-y-1 border-border", children: [
|
|
922
|
-
|
|
922
|
+
Mt(
|
|
923
923
|
S.filter((y) => y.isLangPageAdded),
|
|
924
924
|
(y) => /* @__PURE__ */ m(
|
|
925
925
|
ue,
|
|
926
926
|
{
|
|
927
|
-
className:
|
|
927
|
+
className: Bt(
|
|
928
928
|
"flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
|
|
929
929
|
y.key === o && "!bg-gray-200 text-gray-700"
|
|
930
930
|
),
|
|
@@ -932,7 +932,7 @@ const On = Ee(null), Dn = () => {
|
|
|
932
932
|
children: [
|
|
933
933
|
/* @__PURE__ */ l("div", { className: "text-slate-600", children: y.value }),
|
|
934
934
|
y.key === s && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
|
|
935
|
-
/* @__PURE__ */ l(
|
|
935
|
+
/* @__PURE__ */ l(Ca, { fill: "orange", className: "h-2 w-2" }),
|
|
936
936
|
"Primary"
|
|
937
937
|
] })
|
|
938
938
|
]
|
|
@@ -985,21 +985,21 @@ function vi() {
|
|
|
985
985
|
function wi() {
|
|
986
986
|
return /* @__PURE__ */ l("div", { className: "mt-2 space-y-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ m("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
|
|
987
987
|
/* @__PURE__ */ m("div", { className: "flex-1 space-y-1", children: [
|
|
988
|
-
/* @__PURE__ */ l(
|
|
989
|
-
/* @__PURE__ */ l(
|
|
990
|
-
/* @__PURE__ */ l(
|
|
988
|
+
/* @__PURE__ */ l(Ct, { className: "h-4 w-3/4" }),
|
|
989
|
+
/* @__PURE__ */ l(Ct, { className: "h-3 w-1/2" }),
|
|
990
|
+
/* @__PURE__ */ l(Ct, { className: "mt-1 h-5 w-20" })
|
|
991
991
|
] }),
|
|
992
|
-
/* @__PURE__ */ l(
|
|
992
|
+
/* @__PURE__ */ l(Ct, { className: "h-8 w-8 rounded-full" })
|
|
993
993
|
] }, t)) });
|
|
994
994
|
}
|
|
995
|
-
const bi =
|
|
995
|
+
const bi = j.lazy(() => import("./page-revisions-content-c32By7XR.js"));
|
|
996
996
|
function Ii() {
|
|
997
|
-
const [e, t] =
|
|
998
|
-
return /* @__PURE__ */ l(ys, { children: /* @__PURE__ */ m(
|
|
997
|
+
const [e, t] = j.useState(!1);
|
|
998
|
+
return /* @__PURE__ */ l(ys, { children: /* @__PURE__ */ m(jt, { delayDuration: 0, children: [
|
|
999
999
|
/* @__PURE__ */ m(Es, { open: e, onOpenChange: t, children: [
|
|
1000
1000
|
/* @__PURE__ */ l(aa, { asChild: !0, children: /* @__PURE__ */ l(Wt, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
|
|
1001
1001
|
/* @__PURE__ */ m(U, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
|
|
1002
|
-
/* @__PURE__ */ l(
|
|
1002
|
+
/* @__PURE__ */ l(Na, { className: "h-4 w-4" }),
|
|
1003
1003
|
/* @__PURE__ */ l("span", { className: "sr-only", children: "View revision history" })
|
|
1004
1004
|
] }),
|
|
1005
1005
|
/* @__PURE__ */ l("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
@@ -1017,22 +1017,22 @@ const an = ({
|
|
|
1017
1017
|
}) => {
|
|
1018
1018
|
const { hasPermission: r } = ms();
|
|
1019
1019
|
return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
|
|
1020
|
-
},
|
|
1020
|
+
}, Li = {
|
|
1021
1021
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
1022
|
-
},
|
|
1023
|
-
const e =
|
|
1022
|
+
}, Le = () => {
|
|
1023
|
+
const e = N(), t = L();
|
|
1024
1024
|
return ae({
|
|
1025
1025
|
queryKey: [E.GET_PAGE_TYPES],
|
|
1026
1026
|
staleTime: 1 / 0,
|
|
1027
1027
|
placeholderData: [],
|
|
1028
1028
|
queryFn: async () => t(e, { action: E.GET_PAGE_TYPES })
|
|
1029
1029
|
});
|
|
1030
|
-
},
|
|
1031
|
-
const { data: t } =
|
|
1030
|
+
}, Ci = (e) => {
|
|
1031
|
+
const { data: t } = Le();
|
|
1032
1032
|
return Q(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
|
|
1033
|
-
},
|
|
1034
|
-
const e =
|
|
1035
|
-
return
|
|
1033
|
+
}, Ni = () => {
|
|
1034
|
+
const e = N(), t = L();
|
|
1035
|
+
return Z({
|
|
1036
1036
|
mutationFn: async ({ pageType: n, query: s }) => {
|
|
1037
1037
|
try {
|
|
1038
1038
|
return t(e, {
|
|
@@ -1048,8 +1048,8 @@ const an = ({
|
|
|
1048
1048
|
}
|
|
1049
1049
|
});
|
|
1050
1050
|
}, Rc = () => {
|
|
1051
|
-
const e =
|
|
1052
|
-
return
|
|
1051
|
+
const e = N(), t = W(), n = L(), { data: s } = Le();
|
|
1052
|
+
return Z({
|
|
1053
1053
|
mutationFn: async (r) => await n(e, {
|
|
1054
1054
|
action: E.CREATE_PAGE,
|
|
1055
1055
|
data: r
|
|
@@ -1069,13 +1069,13 @@ const an = ({
|
|
|
1069
1069
|
onError: (r, a) => {
|
|
1070
1070
|
const i = re(s, { key: a.pageType });
|
|
1071
1071
|
R.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1072
|
-
description: V(
|
|
1072
|
+
description: V(Li, r.message, r.message)
|
|
1073
1073
|
});
|
|
1074
1074
|
}
|
|
1075
1075
|
});
|
|
1076
1076
|
}, Uc = () => {
|
|
1077
|
-
const e =
|
|
1078
|
-
return
|
|
1077
|
+
const e = N(), t = W(), n = L(), { data: s } = be(), { data: r } = Le();
|
|
1078
|
+
return Z({
|
|
1079
1079
|
mutationFn: async (a) => await n(e, {
|
|
1080
1080
|
action: E.UPDATE_PAGE,
|
|
1081
1081
|
data: a
|
|
@@ -1098,9 +1098,9 @@ const an = ({
|
|
|
1098
1098
|
});
|
|
1099
1099
|
}
|
|
1100
1100
|
});
|
|
1101
|
-
},
|
|
1102
|
-
const e =
|
|
1103
|
-
return
|
|
1101
|
+
}, Mc = () => {
|
|
1102
|
+
const e = N(), t = W(), n = L(), { data: s } = Le();
|
|
1103
|
+
return Z({
|
|
1104
1104
|
mutationFn: async (r) => n(e, {
|
|
1105
1105
|
action: E.DELETE_PAGE,
|
|
1106
1106
|
data: { id: r == null ? void 0 : r.id }
|
|
@@ -1127,9 +1127,9 @@ const an = ({
|
|
|
1127
1127
|
});
|
|
1128
1128
|
}
|
|
1129
1129
|
});
|
|
1130
|
-
},
|
|
1131
|
-
const e =
|
|
1132
|
-
return
|
|
1130
|
+
}, Bc = () => {
|
|
1131
|
+
const e = N(), t = W(), n = L(), { data: s } = Le();
|
|
1132
|
+
return Z({
|
|
1133
1133
|
mutationFn: async (r) => n(e, {
|
|
1134
1134
|
action: E.TAKE_OFFLINE,
|
|
1135
1135
|
data: { id: r == null ? void 0 : r.id }
|
|
@@ -1152,9 +1152,9 @@ const an = ({
|
|
|
1152
1152
|
});
|
|
1153
1153
|
}
|
|
1154
1154
|
});
|
|
1155
|
-
},
|
|
1156
|
-
const e =
|
|
1157
|
-
return
|
|
1155
|
+
}, Ls = () => {
|
|
1156
|
+
const e = N(), t = L(), n = W(), { data: s } = ie(), { savePageAsync: r } = xe();
|
|
1157
|
+
return Z({
|
|
1158
1158
|
mutationFn: async ({ ids: a }) => (await r(), t(e, {
|
|
1159
1159
|
action: E.PUBLISH_CHANGES,
|
|
1160
1160
|
data: { ids: a }
|
|
@@ -1173,8 +1173,8 @@ const an = ({
|
|
|
1173
1173
|
}
|
|
1174
1174
|
});
|
|
1175
1175
|
}, Fc = () => {
|
|
1176
|
-
const e =
|
|
1177
|
-
return
|
|
1176
|
+
const e = N(), t = L(), n = W();
|
|
1177
|
+
return Z({
|
|
1178
1178
|
mutationFn: async (s) => {
|
|
1179
1179
|
var r;
|
|
1180
1180
|
return t(e, {
|
|
@@ -1198,8 +1198,8 @@ const an = ({
|
|
|
1198
1198
|
}
|
|
1199
1199
|
});
|
|
1200
1200
|
}, qc = () => {
|
|
1201
|
-
const e =
|
|
1202
|
-
return
|
|
1201
|
+
const e = N(), t = L(), n = W();
|
|
1202
|
+
return Z({
|
|
1203
1203
|
mutationFn: async (s) => t(e, {
|
|
1204
1204
|
action: E.UNMARK_AS_TEMPLATE,
|
|
1205
1205
|
data: { id: s == null ? void 0 : s.id }
|
|
@@ -1214,8 +1214,8 @@ const an = ({
|
|
|
1214
1214
|
}
|
|
1215
1215
|
});
|
|
1216
1216
|
}, Kc = () => {
|
|
1217
|
-
const e =
|
|
1218
|
-
return
|
|
1217
|
+
const e = N(), t = L(), n = W();
|
|
1218
|
+
return Z({
|
|
1219
1219
|
mutationFn: async ({ id: s, slug: r }) => t(e, {
|
|
1220
1220
|
action: E.CHANGE_SLUG,
|
|
1221
1221
|
data: { id: s, slug: r }
|
|
@@ -1231,12 +1231,12 @@ const an = ({
|
|
|
1231
1231
|
R.error("Failed to change slug");
|
|
1232
1232
|
}
|
|
1233
1233
|
});
|
|
1234
|
-
}, ki = F(() => import("./publish-pages-content-
|
|
1234
|
+
}, ki = F(() => import("./publish-pages-content-BB6l92oG.js"));
|
|
1235
1235
|
function Oi({
|
|
1236
1236
|
showModal: e = !1,
|
|
1237
1237
|
onClose: t = () => console.log("Cancelled")
|
|
1238
1238
|
}) {
|
|
1239
|
-
const { mutate: n, isPending: s } =
|
|
1239
|
+
const { mutate: n, isPending: s } = Ls();
|
|
1240
1240
|
return /* @__PURE__ */ l(As, { open: e, onOpenChange: s ? () => {
|
|
1241
1241
|
} : t, children: e && /* @__PURE__ */ l(H, { fallback: /* @__PURE__ */ l("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ l(ki, { onClose: t, isPending: s, publishPage: n }) }) });
|
|
1242
1242
|
}
|
|
@@ -1282,7 +1282,7 @@ const ce = {
|
|
|
1282
1282
|
spread: 120,
|
|
1283
1283
|
origin: { y: 0.6 },
|
|
1284
1284
|
angle: 90
|
|
1285
|
-
},
|
|
1285
|
+
}, xi = {
|
|
1286
1286
|
TOP_RIGHT: {
|
|
1287
1287
|
angle: 225,
|
|
1288
1288
|
origin: { x: 0.9, y: 0 }
|
|
@@ -1291,35 +1291,35 @@ const ce = {
|
|
|
1291
1291
|
angle: 100,
|
|
1292
1292
|
origin: { x: 0.9, y: 0.9 }
|
|
1293
1293
|
}
|
|
1294
|
-
},
|
|
1294
|
+
}, Gi = async () => {
|
|
1295
1295
|
const { default: e } = await import("./confetti.module-DCmCkDyV.js");
|
|
1296
1296
|
return e;
|
|
1297
1297
|
}, on = (e) => {
|
|
1298
|
-
let t =
|
|
1298
|
+
let t = xi[e];
|
|
1299
1299
|
t || (t = {});
|
|
1300
1300
|
const n = { ...Di, ...t };
|
|
1301
|
-
|
|
1301
|
+
Gi().then((s) => s(n));
|
|
1302
1302
|
};
|
|
1303
|
-
function
|
|
1303
|
+
function xn({
|
|
1304
1304
|
children: e,
|
|
1305
1305
|
content: t,
|
|
1306
1306
|
side: n = "bottom",
|
|
1307
1307
|
delayDuration: s = 700,
|
|
1308
1308
|
showTooltip: r = !0
|
|
1309
1309
|
}) {
|
|
1310
|
-
return r ? /* @__PURE__ */ l(ys, { children: /* @__PURE__ */ m(
|
|
1310
|
+
return r ? /* @__PURE__ */ l(ys, { children: /* @__PURE__ */ m(jt, { delayDuration: s, children: [
|
|
1311
1311
|
/* @__PURE__ */ l(Wt, { asChild: !0, children: e }),
|
|
1312
1312
|
/* @__PURE__ */ l(Yt, { side: n, sideOffset: 10, children: /* @__PURE__ */ l("p", { children: t }) })
|
|
1313
1313
|
] }) }) : e;
|
|
1314
1314
|
}
|
|
1315
|
-
const Ri = F(() => import("./unpublish-page-
|
|
1316
|
-
const { t: e } = _e(), { selectedLang: t, fallbackLang: n } = Se(), s = oe("getPreviewUrl", async (h) => h), [r, a] = K(""), { data: i } = ie(), { data: o } =
|
|
1315
|
+
const Ri = F(() => import("./unpublish-page-CEtpcrvc.js")), Ui = F(() => import("./translation-warning-modal-DalBhNQy.js")), Mi = () => {
|
|
1316
|
+
const { t: e } = _e(), { selectedLang: t, fallbackLang: n } = Se(), s = oe("getPreviewUrl", async (h) => h), [r, a] = K(""), { data: i } = ie(), { data: o } = Ge(), { data: c } = Le(), u = Q(
|
|
1317
1317
|
() => {
|
|
1318
1318
|
var h;
|
|
1319
1319
|
return (h = o == null ? void 0 : o.find((g) => (g == null ? void 0 : g.lang) === t)) == null ? void 0 : h.slug;
|
|
1320
1320
|
},
|
|
1321
1321
|
[t, o]
|
|
1322
|
-
), d =
|
|
1322
|
+
), d = z((h) => {
|
|
1323
1323
|
var g;
|
|
1324
1324
|
return (g = re(c, { key: h })) == null ? void 0 : g.hasSlug;
|
|
1325
1325
|
}, [c]), f = t === n ? "" : t;
|
|
@@ -1333,11 +1333,11 @@ const Ri = F(() => import("./unpublish-page-DvOWVBIf.js")), Ui = F(() => import(
|
|
|
1333
1333
|
} else
|
|
1334
1334
|
a("");
|
|
1335
1335
|
})();
|
|
1336
|
-
}, [s, u, i == null ? void 0 : i.pageType, d, i == null ? void 0 : i.id, f]), /* @__PURE__ */ l(ge, { children: /* @__PURE__ */ l(
|
|
1337
|
-
},
|
|
1336
|
+
}, [s, u, i == null ? void 0 : i.pageType, d, i == null ? void 0 : i.id, f]), /* @__PURE__ */ l(ge, { children: /* @__PURE__ */ l(xn, { content: e("Open preview in new tab"), delayDuration: 0, children: /* @__PURE__ */ l("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ l(U, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ l(ka, { className: "h-4 w-4" }) }) }) }) });
|
|
1337
|
+
}, Bi = () => {
|
|
1338
1338
|
const { t: e } = _e(), [t, n] = $r();
|
|
1339
1339
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1340
|
-
/* @__PURE__ */ l(
|
|
1340
|
+
/* @__PURE__ */ l(xn, { content: e("Theme"), delayDuration: 0, children: /* @__PURE__ */ l(
|
|
1341
1341
|
U,
|
|
1342
1342
|
{
|
|
1343
1343
|
variant: t === "theme" ? "outline" : "ghost",
|
|
@@ -1350,7 +1350,7 @@ const Ri = F(() => import("./unpublish-page-DvOWVBIf.js")), Ui = F(() => import(
|
|
|
1350
1350
|
/* @__PURE__ */ l("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1351
1351
|
] });
|
|
1352
1352
|
}, Fi = () => {
|
|
1353
|
-
const { t: e } = _e(), [t, n] = K(!1), { isLocked: s } = Ie(), { savePageAsync: r, saveState: a } =
|
|
1353
|
+
const { t: e } = _e(), [t, n] = K(!1), { isLocked: s } = Ie(), { savePageAsync: r, saveState: a } = xe();
|
|
1354
1354
|
se(() => {
|
|
1355
1355
|
const d = (f) => {
|
|
1356
1356
|
a === "UNSAVED" && (f.preventDefault(), f.returnValue = !1);
|
|
@@ -1359,14 +1359,14 @@ const Ri = F(() => import("./unpublish-page-DvOWVBIf.js")), Ui = F(() => import(
|
|
|
1359
1359
|
window.removeEventListener("beforeunload", d);
|
|
1360
1360
|
};
|
|
1361
1361
|
}, [a]);
|
|
1362
|
-
const i =
|
|
1362
|
+
const i = z(async () => {
|
|
1363
1363
|
t || (n(!0), await r(), n(!1));
|
|
1364
1364
|
}, [r, t]), { buttonIcon: o, buttonClass: c, tooltipContent: u } = Q(() => {
|
|
1365
1365
|
switch (a) {
|
|
1366
1366
|
case "UNSAVED":
|
|
1367
1367
|
return {
|
|
1368
1368
|
tooltipContent: e("Save draft"),
|
|
1369
|
-
buttonIcon: /* @__PURE__ */ l(
|
|
1369
|
+
buttonIcon: /* @__PURE__ */ l(xa, { className: "h-4 w-4" }),
|
|
1370
1370
|
buttonClass: "gap-x-1"
|
|
1371
1371
|
};
|
|
1372
1372
|
case "SAVING":
|
|
@@ -1389,14 +1389,14 @@ const Ri = F(() => import("./unpublish-page-DvOWVBIf.js")), Ui = F(() => import(
|
|
|
1389
1389
|
u
|
|
1390
1390
|
] });
|
|
1391
1391
|
}, qi = () => {
|
|
1392
|
-
const { t: e } = _e(), { selectedLang: t } = Se(), { data: n } = be(), { data: s } =
|
|
1392
|
+
const { t: e } = _e(), { selectedLang: t } = Se(), { data: n } = be(), { data: s } = Ge(), [r, a] = K(!1), [i, o] = K(!1), [c, u] = K(null), { savePageAsync: d } = xe(), [f, h] = K(!1), { data: g } = ie(), { mutate: p, isPending: S } = Ls(), { needTranslations: P } = xe(), T = P(), { buttonText: y, buttonClassName: A, isPublished: b } = Q(() => {
|
|
1393
1393
|
const w = g && (g == null ? void 0 : g.online);
|
|
1394
1394
|
return {
|
|
1395
1395
|
buttonClassName: w ? "hover:bg-green-600 bg-green-500" : "",
|
|
1396
1396
|
isPublished: w,
|
|
1397
1397
|
buttonText: e(w ? "Published" : "Publish")
|
|
1398
1398
|
};
|
|
1399
|
-
}, [g, e]),
|
|
1399
|
+
}, [g, e]), B = async () => {
|
|
1400
1400
|
if (T) {
|
|
1401
1401
|
h(!0);
|
|
1402
1402
|
return;
|
|
@@ -1409,14 +1409,14 @@ const Ri = F(() => import("./unpublish-page-DvOWVBIf.js")), Ui = F(() => import(
|
|
|
1409
1409
|
h(!1), k();
|
|
1410
1410
|
}, ye = async () => {
|
|
1411
1411
|
h(!1), await d();
|
|
1412
|
-
},
|
|
1412
|
+
}, M = Q(() => Mt(s ?? [], "id"), [s]);
|
|
1413
1413
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1414
1414
|
/* @__PURE__ */ m("div", { className: "flex", children: [
|
|
1415
1415
|
/* @__PURE__ */ m(
|
|
1416
1416
|
U,
|
|
1417
1417
|
{
|
|
1418
1418
|
size: "sm",
|
|
1419
|
-
onClick:
|
|
1419
|
+
onClick: B,
|
|
1420
1420
|
disabled: S || !(g != null && g.id),
|
|
1421
1421
|
className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${A}`,
|
|
1422
1422
|
onMouseEnter: () => o(!0),
|
|
@@ -1457,7 +1457,7 @@ const Ri = F(() => import("./unpublish-page-DvOWVBIf.js")), Ui = F(() => import(
|
|
|
1457
1457
|
{
|
|
1458
1458
|
disabled: S,
|
|
1459
1459
|
className: "cursor-pointer text-xs",
|
|
1460
|
-
onClick: () => p({ ids:
|
|
1460
|
+
onClick: () => p({ ids: M }, { onSuccess: () => on("TOP_RIGHT") }),
|
|
1461
1461
|
children: [
|
|
1462
1462
|
e("Publish"),
|
|
1463
1463
|
" with translation pages"
|
|
@@ -1505,8 +1505,8 @@ function Ki() {
|
|
|
1505
1505
|
const { isLocked: e } = Ie(), [t] = le(), n = t.get("lang"), s = Ps(n);
|
|
1506
1506
|
return e || !s ? /* @__PURE__ */ l("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1507
1507
|
/* @__PURE__ */ l(Ii, {}),
|
|
1508
|
-
/* @__PURE__ */ l(an, { permission: ce.EDIT_THEME, children: /* @__PURE__ */ l(
|
|
1509
|
-
/* @__PURE__ */ l(
|
|
1508
|
+
/* @__PURE__ */ l(an, { permission: ce.EDIT_THEME, children: /* @__PURE__ */ l(Bi, {}) }),
|
|
1509
|
+
/* @__PURE__ */ l(Mi, {}),
|
|
1510
1510
|
/* @__PURE__ */ l(an, { permission: ce.SAVE_PAGE, children: /* @__PURE__ */ l(Fi, {}) }),
|
|
1511
1511
|
/* @__PURE__ */ l(an, { permission: ce.PUBLISH_PAGE, children: /* @__PURE__ */ l(qi, {}) })
|
|
1512
1512
|
] });
|
|
@@ -1522,7 +1522,7 @@ const Vi = ({
|
|
|
1522
1522
|
children: o,
|
|
1523
1523
|
isLanguagePage: c
|
|
1524
1524
|
}) => {
|
|
1525
|
-
const { t: u } = _e(), { hasPermission: d } = ms(), { data: f } =
|
|
1525
|
+
const { t: u } = _e(), { hasPermission: d } = ms(), { data: f } = Le(), h = Q(() => re(f, { key: e.pageType }), [f, e.pageType]), g = Q(() => !!e.isTemplate, [e.isTemplate]), p = Q(() => !!(h != null && h.hasSlug), [h == null ? void 0 : h.hasSlug]);
|
|
1526
1526
|
return !d(ce.EDIT_PAGE) && !d(ce.DELETE_PAGE) && !d(ce.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ m(wn, { children: [
|
|
1527
1527
|
/* @__PURE__ */ l(bn, { asChild: !0, onClick: (P) => P.stopPropagation(), children: o }),
|
|
1528
1528
|
/* @__PURE__ */ m(In, { align: "center", className: "text-sm", children: [
|
|
@@ -1534,7 +1534,7 @@ const Vi = ({
|
|
|
1534
1534
|
P.stopPropagation(), t(e);
|
|
1535
1535
|
},
|
|
1536
1536
|
children: [
|
|
1537
|
-
/* @__PURE__ */ l(
|
|
1537
|
+
/* @__PURE__ */ l(Ga, { className: "size-3" }),
|
|
1538
1538
|
"Duplicate page"
|
|
1539
1539
|
]
|
|
1540
1540
|
}
|
|
@@ -1576,7 +1576,7 @@ const Vi = ({
|
|
|
1576
1576
|
P.stopPropagation(), r(e);
|
|
1577
1577
|
},
|
|
1578
1578
|
children: [
|
|
1579
|
-
/* @__PURE__ */ l(
|
|
1579
|
+
/* @__PURE__ */ l(Ma, { className: "size-3" }),
|
|
1580
1580
|
u("Delete")
|
|
1581
1581
|
]
|
|
1582
1582
|
}
|
|
@@ -1608,10 +1608,10 @@ const Vi = ({
|
|
|
1608
1608
|
) })
|
|
1609
1609
|
] })
|
|
1610
1610
|
] });
|
|
1611
|
-
}, Hi = F(() => import("./add-new-page-
|
|
1612
|
-
const [e, t] = K(null), [n, s] = K(null), [r, a] = K(null), [i, o] = K(null), [c, u] = K(null), [d, f] = K(null), { data: h, isFetching: g } = be(), { selectedLang: p, fallbackLang: S } = Se(), { data: P } =
|
|
1611
|
+
}, Hi = F(() => import("./add-new-page-BYkFbQvH.js")), Qi = F(() => import("./delete-page-C7xfkDN5.js")), $i = F(() => import("./duplicate-page-B8k4yZxa.js")), zi = F(() => import("./mark-as-template-CpNHtyfB.js")), ji = F(() => import("./unmark-as-template-CGZ0CCI2.js")), Wi = F(() => import("./unpublish-page-CEtpcrvc.js")), Yi = () => {
|
|
1612
|
+
const [e, t] = K(null), [n, s] = K(null), [r, a] = K(null), [i, o] = K(null), [c, u] = K(null), [d, f] = K(null), { data: h, isFetching: g } = be(), { selectedLang: p, fallbackLang: S } = Se(), { data: P } = Ge(), T = P == null ? void 0 : P.find((k) => k.lang === p), { isLocked: y } = Ie(), A = !(h != null && h.slug), [, b] = te(On);
|
|
1613
1613
|
if (!h) return null;
|
|
1614
|
-
const
|
|
1614
|
+
const B = (k) => {
|
|
1615
1615
|
p.length > 0 && p !== S ? b({
|
|
1616
1616
|
edit: !0,
|
|
1617
1617
|
id: k == null ? void 0 : k.id,
|
|
@@ -1626,7 +1626,7 @@ const Vi = ({
|
|
|
1626
1626
|
className: "flex h-7 max-w-[200px] cursor-pointer items-center truncate rounded px-1 text-xs font-medium",
|
|
1627
1627
|
variant: "ghost",
|
|
1628
1628
|
children: g ? /* @__PURE__ */ l(Ft, { className: "h-4 w-4 animate-spin text-slate-400" }) : /* @__PURE__ */ m("span", { className: "flex w-full cursor-pointer items-end overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-xs font-medium", children: [
|
|
1629
|
-
A ? /* @__PURE__ */ l(
|
|
1629
|
+
A ? /* @__PURE__ */ l(Ba, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ l(Fa, { className: "mr-1 h-4 w-4" }),
|
|
1630
1630
|
V(T || h, "name") ?? ""
|
|
1631
1631
|
] })
|
|
1632
1632
|
}
|
|
@@ -1637,20 +1637,20 @@ const Vi = ({
|
|
|
1637
1637
|
variant: "ghost",
|
|
1638
1638
|
size: "icon",
|
|
1639
1639
|
className: "h-7 w-7 cursor-not-allowed rounded opacity-50 hover:bg-transparent",
|
|
1640
|
-
children: /* @__PURE__ */ l(
|
|
1640
|
+
children: /* @__PURE__ */ l(zn, { className: "h-4 w-4" })
|
|
1641
1641
|
}
|
|
1642
1642
|
) : /* @__PURE__ */ l(
|
|
1643
1643
|
Vi,
|
|
1644
1644
|
{
|
|
1645
1645
|
page: h,
|
|
1646
1646
|
setDuplicatePage: (k) => u(k),
|
|
1647
|
-
setAddEditPage: (k) =>
|
|
1647
|
+
setAddEditPage: (k) => B(k),
|
|
1648
1648
|
setUnpublishPage: (k) => s(k),
|
|
1649
1649
|
setDeletePage: (k) => t(k),
|
|
1650
1650
|
setMarkAsTemplate: (k) => a(k),
|
|
1651
1651
|
setUnmarkAsTemplate: (k) => o(k),
|
|
1652
1652
|
isLanguagePage: p.length > 0 && p !== S,
|
|
1653
|
-
children: /* @__PURE__ */ l(U, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ l(
|
|
1653
|
+
children: /* @__PURE__ */ l(U, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ l(zn, { className: "h-4 w-4" }) })
|
|
1654
1654
|
}
|
|
1655
1655
|
)
|
|
1656
1656
|
] }),
|
|
@@ -1666,8 +1666,8 @@ const Vi = ({
|
|
|
1666
1666
|
) }),
|
|
1667
1667
|
e && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Qi, { page: e, onClose: () => t(null) }) }),
|
|
1668
1668
|
n && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Wi, { page: n, onClose: () => s(null) }) }),
|
|
1669
|
-
r && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
|
|
1670
|
-
i && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
|
|
1669
|
+
r && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(zi, { page: r, onClose: () => a(null) }) }),
|
|
1670
|
+
i && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(ji, { page: i, onClose: () => o(null) }) }),
|
|
1671
1671
|
c && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
|
|
1672
1672
|
$i,
|
|
1673
1673
|
{
|
|
@@ -1677,31 +1677,31 @@ const Vi = ({
|
|
|
1677
1677
|
}
|
|
1678
1678
|
) })
|
|
1679
1679
|
] });
|
|
1680
|
-
},
|
|
1680
|
+
}, Cs = ({ children: e, className: t = "" }) => /* @__PURE__ */ l(
|
|
1681
1681
|
"div",
|
|
1682
1682
|
{
|
|
1683
|
-
className:
|
|
1683
|
+
className: Bt(
|
|
1684
1684
|
"fixed bottom-0 left-0 right-0 top-[50px] z-[20] flex w-screen flex-col items-center justify-center bg-black/40 transition-all",
|
|
1685
1685
|
t
|
|
1686
1686
|
),
|
|
1687
1687
|
children: e
|
|
1688
1688
|
}
|
|
1689
|
-
), Ji = ({ hasDynamicPage: e }) => /* @__PURE__ */ l(
|
|
1689
|
+
), Ji = ({ hasDynamicPage: e }) => /* @__PURE__ */ l(Cs, { children: /* @__PURE__ */ m("div", { className: "flex min-w-[300px] max-w-[400px] flex-col items-center justify-center rounded-lg border bg-white p-4 shadow-lg", children: [
|
|
1690
1690
|
/* @__PURE__ */ l("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
|
|
1691
1691
|
/* @__PURE__ */ l("p", { className: "pt-2 text-center text-sm font-light text-gray-600", children: e ? "Please select a page from the list in the top header. This will enable you to edit the page." : "Please add a new page" })
|
|
1692
|
-
] }) }),
|
|
1692
|
+
] }) }), Zi = F(() => import("./dynamic-page-selector-C7Vos5-l.js")), Xi = () => {
|
|
1693
1693
|
const { dynamicPage: e, allLangPages: t, isFetching: n } = ai(), s = t.length > 0;
|
|
1694
1694
|
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1695
1695
|
!e && /* @__PURE__ */ l(Ji, { hasDynamicPage: s }),
|
|
1696
|
-
/* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
|
|
1696
|
+
/* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Zi, {}) })
|
|
1697
1697
|
] });
|
|
1698
1698
|
}, eo = () => {
|
|
1699
|
-
const { data: e, isFetching: t } = be(), { data: n, isFetching: s } = ie(), r = V(n, "dynamic", !1), a =
|
|
1699
|
+
const { data: e, isFetching: t } = be(), { data: n, isFetching: s } = ie(), r = V(n, "dynamic", !1), a = Cn(), i = zr("dynamic-page-selector"), o = e == null ? void 0 : e.slug, c = !o, u = ci(), d = t || s, h = (c ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
|
|
1700
1700
|
return /* @__PURE__ */ m("div", { className: "relative flex items-center gap-x-1", children: [
|
|
1701
1701
|
/* @__PURE__ */ l(
|
|
1702
1702
|
"div",
|
|
1703
1703
|
{
|
|
1704
|
-
className:
|
|
1704
|
+
className: Bt(
|
|
1705
1705
|
"flex h-8 w-auto max-w-[600px] items-center rounded-md border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800",
|
|
1706
1706
|
d && "max-w-0 overflow-hidden opacity-0"
|
|
1707
1707
|
),
|
|
@@ -1711,7 +1711,7 @@ const Vi = ({
|
|
|
1711
1711
|
/* @__PURE__ */ m(
|
|
1712
1712
|
"div",
|
|
1713
1713
|
{
|
|
1714
|
-
className:
|
|
1714
|
+
className: Bt(
|
|
1715
1715
|
"flex h-8 w-auto max-w-[600px] items-center rounded-md border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800" + (c ? " pr-2" : ""),
|
|
1716
1716
|
d && "max-w-0 overflow-hidden opacity-0"
|
|
1717
1717
|
),
|
|
@@ -1733,28 +1733,28 @@ const Vi = ({
|
|
|
1733
1733
|
]
|
|
1734
1734
|
}
|
|
1735
1735
|
),
|
|
1736
|
-
r && i && /* @__PURE__ */ l(
|
|
1736
|
+
r && i && /* @__PURE__ */ l(Xi, {})
|
|
1737
1737
|
] });
|
|
1738
1738
|
}, to = () => /* @__PURE__ */ m("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
|
|
1739
1739
|
/* @__PURE__ */ l(vi, {}),
|
|
1740
1740
|
/* @__PURE__ */ l(eo, {}),
|
|
1741
1741
|
/* @__PURE__ */ l(Ki, {})
|
|
1742
|
-
] }),
|
|
1742
|
+
] }), Ns = () => {
|
|
1743
1743
|
const e = W(), { data: t } = ae({
|
|
1744
1744
|
queryKey: [E.AI_CONTEXT],
|
|
1745
1745
|
initialData: "",
|
|
1746
1746
|
queryFn: () => "",
|
|
1747
1747
|
staleTime: 0
|
|
1748
1748
|
});
|
|
1749
|
-
return { setAiContext:
|
|
1749
|
+
return { setAiContext: z(
|
|
1750
1750
|
(s) => {
|
|
1751
1751
|
e.setQueryData([E.AI_CONTEXT], s);
|
|
1752
1752
|
},
|
|
1753
1753
|
[e]
|
|
1754
1754
|
), aiContext: t };
|
|
1755
1755
|
}, no = () => {
|
|
1756
|
-
const e =
|
|
1757
|
-
return
|
|
1756
|
+
const e = N(), { aiContext: t } = Ns(), n = L();
|
|
1757
|
+
return z(
|
|
1758
1758
|
async (s, r, a, i) => n(e, {
|
|
1759
1759
|
action: E.ASK_AI,
|
|
1760
1760
|
data: { type: s, prompt: r, blocks: a, context: t, lang: i }
|
|
@@ -1762,7 +1762,7 @@ const Vi = ({
|
|
|
1762
1762
|
[e, t, n]
|
|
1763
1763
|
);
|
|
1764
1764
|
}, so = (e, t) => t.map((n) => {
|
|
1765
|
-
if (
|
|
1765
|
+
if (zt(e, n._type)) {
|
|
1766
1766
|
const s = Ja(n._type);
|
|
1767
1767
|
return {
|
|
1768
1768
|
...s,
|
|
@@ -1774,7 +1774,7 @@ const Vi = ({
|
|
|
1774
1774
|
"_parent",
|
|
1775
1775
|
"_bindings"
|
|
1776
1776
|
]),
|
|
1777
|
-
...Dr(n, (r, a) =>
|
|
1777
|
+
...Dr(n, (r, a) => xr(a, "_attrs")),
|
|
1778
1778
|
...n
|
|
1779
1779
|
};
|
|
1780
1780
|
}
|
|
@@ -1790,7 +1790,7 @@ const Vi = ({
|
|
|
1790
1790
|
return { blocks: so(t, n) };
|
|
1791
1791
|
}, [e, t]);
|
|
1792
1792
|
}, ao = () => {
|
|
1793
|
-
const [e] = le(), t = e.get("page"), n =
|
|
1793
|
+
const [e] = le(), t = e.get("page"), n = N(), { setAiContext: s } = Ns(), [, r] = Nn(), [, a] = li(), [, i] = jr(), o = L();
|
|
1794
1794
|
return ae({
|
|
1795
1795
|
queryKey: [E.GET_DRAFT_PAGE, t],
|
|
1796
1796
|
staleTime: 1 / 0,
|
|
@@ -1806,7 +1806,7 @@ const Vi = ({
|
|
|
1806
1806
|
enabled: !!t
|
|
1807
1807
|
});
|
|
1808
1808
|
}, io = () => {
|
|
1809
|
-
const { data: e } = ie(), { data: t } = be(), n =
|
|
1809
|
+
const { data: e } = ie(), { data: t } = be(), n = N(), s = L(), r = Dn(), a = Cn();
|
|
1810
1810
|
return ae({
|
|
1811
1811
|
queryKey: [E.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
|
|
1812
1812
|
staleTime: 1 / 0,
|
|
@@ -1836,8 +1836,8 @@ const Vi = ({
|
|
|
1836
1836
|
enabled: !!(e != null && e.pageType) && !!t.id
|
|
1837
1837
|
});
|
|
1838
1838
|
}, oo = () => {
|
|
1839
|
-
const e =
|
|
1840
|
-
return
|
|
1839
|
+
const e = N(), t = W(), n = L();
|
|
1840
|
+
return Z({
|
|
1841
1841
|
mutationFn: async (s) => n(e, {
|
|
1842
1842
|
action: E.UPDATE_WEBSITE_SETTINGS,
|
|
1843
1843
|
data: s
|
|
@@ -1855,8 +1855,8 @@ const Vi = ({
|
|
|
1855
1855
|
}
|
|
1856
1856
|
});
|
|
1857
1857
|
}, Vc = () => {
|
|
1858
|
-
const e =
|
|
1859
|
-
return
|
|
1858
|
+
const e = N(), t = W(), n = L(), { selectedLang: s } = Se();
|
|
1859
|
+
return Z({
|
|
1860
1860
|
mutationFn: async (r) => n(e, { action: E.ADD_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1861
1861
|
onSuccess: () => {
|
|
1862
1862
|
t.invalidateQueries({
|
|
@@ -1870,8 +1870,8 @@ const Vi = ({
|
|
|
1870
1870
|
}
|
|
1871
1871
|
});
|
|
1872
1872
|
}, Hc = () => {
|
|
1873
|
-
const e =
|
|
1874
|
-
return
|
|
1873
|
+
const e = N(), t = W(), n = L(), { selectedLang: s } = Se();
|
|
1874
|
+
return Z({
|
|
1875
1875
|
mutationFn: async (r) => n(e, { action: E.UPDATE_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1876
1876
|
onSuccess: () => {
|
|
1877
1877
|
t.invalidateQueries({
|
|
@@ -1885,8 +1885,8 @@ const Vi = ({
|
|
|
1885
1885
|
}
|
|
1886
1886
|
});
|
|
1887
1887
|
}, Qc = () => {
|
|
1888
|
-
const e =
|
|
1889
|
-
return
|
|
1888
|
+
const e = N(), t = W(), n = L();
|
|
1889
|
+
return Z({
|
|
1890
1890
|
mutationFn: async (s) => n(e, { action: E.DELETE_GLOBAL_SCHEMA, data: { id: s } }),
|
|
1891
1891
|
onSuccess: () => {
|
|
1892
1892
|
t.invalidateQueries({
|
|
@@ -1900,8 +1900,8 @@ const Vi = ({
|
|
|
1900
1900
|
}
|
|
1901
1901
|
});
|
|
1902
1902
|
}, $c = () => {
|
|
1903
|
-
const e =
|
|
1904
|
-
return
|
|
1903
|
+
const e = N(), t = L();
|
|
1904
|
+
return Z({
|
|
1905
1905
|
mutationFn: async (n) => t(e, { action: E.TOGGLE_PAGE_GLOBAL_SCHEMA, data: n }),
|
|
1906
1906
|
onError: (n) => {
|
|
1907
1907
|
R.error("Failed to toggle schema", {
|
|
@@ -1909,9 +1909,9 @@ const Vi = ({
|
|
|
1909
1909
|
});
|
|
1910
1910
|
}
|
|
1911
1911
|
});
|
|
1912
|
-
},
|
|
1913
|
-
const e =
|
|
1914
|
-
return
|
|
1912
|
+
}, zc = () => {
|
|
1913
|
+
const e = N(), t = L();
|
|
1914
|
+
return Z({
|
|
1915
1915
|
mutationFn: async (n) => t(e, { action: E.APPLY_SCHEMA_TO_ALL_PAGES, data: { schemaId: n } }),
|
|
1916
1916
|
onSuccess: (n) => {
|
|
1917
1917
|
R.success(`Schema applied to ${n.count} page(s)`);
|
|
@@ -1922,9 +1922,9 @@ const Vi = ({
|
|
|
1922
1922
|
});
|
|
1923
1923
|
}
|
|
1924
1924
|
});
|
|
1925
|
-
},
|
|
1926
|
-
const e =
|
|
1927
|
-
return
|
|
1925
|
+
}, jc = () => {
|
|
1926
|
+
const e = N(), t = L();
|
|
1927
|
+
return Z({
|
|
1928
1928
|
mutationFn: async (n) => t(e, { action: E.REMOVE_SCHEMA_FROM_ALL_PAGES, data: { schemaId: n } }),
|
|
1929
1929
|
onSuccess: (n) => {
|
|
1930
1930
|
R.success(`Schema removed from ${n.count} page(s)`);
|
|
@@ -1941,7 +1941,7 @@ const Vi = ({
|
|
|
1941
1941
|
action: "GET_LIBRARY_ITEM",
|
|
1942
1942
|
data: { id: e.id }
|
|
1943
1943
|
}), r = V(s, "html", ""), a = V(s, "blocks", []);
|
|
1944
|
-
return
|
|
1944
|
+
return Gr(a) ? a : Yr(r);
|
|
1945
1945
|
},
|
|
1946
1946
|
async getUILibraryBlocks(e, t, n) {
|
|
1947
1947
|
try {
|
|
@@ -1956,7 +1956,7 @@ const Vi = ({
|
|
|
1956
1956
|
}
|
|
1957
1957
|
}
|
|
1958
1958
|
}, lo = () => {
|
|
1959
|
-
const e =
|
|
1959
|
+
const e = N(), t = L();
|
|
1960
1960
|
return ae({
|
|
1961
1961
|
queryKey: ["uiLibraries"],
|
|
1962
1962
|
staleTime: "static",
|
|
@@ -1975,7 +1975,7 @@ const Vi = ({
|
|
|
1975
1975
|
}
|
|
1976
1976
|
});
|
|
1977
1977
|
}, co = () => {
|
|
1978
|
-
const e = Ss(), t =
|
|
1978
|
+
const e = Ss(), t = L(), { user: n } = Jt(), s = n == null ? void 0 : n.id;
|
|
1979
1979
|
return ae({
|
|
1980
1980
|
queryKey: [E.GET_ROLE_AND_PERMISSIONS, s],
|
|
1981
1981
|
queryFn: () => t(e, {
|
|
@@ -1986,7 +1986,7 @@ const Vi = ({
|
|
|
1986
1986
|
staleTime: 1 / 0
|
|
1987
1987
|
});
|
|
1988
1988
|
}, uo = () => {
|
|
1989
|
-
const e =
|
|
1989
|
+
const e = N(), t = L(), [, n] = Nn();
|
|
1990
1990
|
return { onSave: async ({
|
|
1991
1991
|
page: r,
|
|
1992
1992
|
blocks: a,
|
|
@@ -2006,9 +2006,9 @@ const Vi = ({
|
|
|
2006
2006
|
}
|
|
2007
2007
|
} };
|
|
2008
2008
|
}, fo = () => {
|
|
2009
|
-
const { data: e } = bs(), t =
|
|
2009
|
+
const { data: e } = bs(), t = N(), n = L();
|
|
2010
2010
|
return {
|
|
2011
|
-
getPartialBlocks:
|
|
2011
|
+
getPartialBlocks: z(async () => {
|
|
2012
2012
|
const s = {};
|
|
2013
2013
|
for (const r of e ?? [])
|
|
2014
2014
|
he(r == null ? void 0 : r.slug) && (s[r.id] = {
|
|
@@ -2018,7 +2018,7 @@ const Vi = ({
|
|
|
2018
2018
|
});
|
|
2019
2019
|
return s;
|
|
2020
2020
|
}, [e]),
|
|
2021
|
-
getPartialBlockBlocks:
|
|
2021
|
+
getPartialBlockBlocks: z(
|
|
2022
2022
|
async (s) => {
|
|
2023
2023
|
if (!s) return [];
|
|
2024
2024
|
try {
|
|
@@ -2026,7 +2026,7 @@ const Vi = ({
|
|
|
2026
2026
|
action: "GET_DRAFT_PAGE",
|
|
2027
2027
|
data: { id: s, draft: !0, editor: !1 }
|
|
2028
2028
|
});
|
|
2029
|
-
return hs(r.blocks, (a) =>
|
|
2029
|
+
return hs(r.blocks, (a) => zt(a, "_id"));
|
|
2030
2030
|
} catch (r) {
|
|
2031
2031
|
return console.error(r), [];
|
|
2032
2032
|
}
|
|
@@ -2034,15 +2034,24 @@ const Vi = ({
|
|
|
2034
2034
|
[n, t]
|
|
2035
2035
|
)
|
|
2036
2036
|
};
|
|
2037
|
-
}, ho = F(() => import("./ai-panel-content-
|
|
2037
|
+
}, ho = F(() => import("./ai-panel-content-DET3HjIR.js")), ks = "chai-chat-panel", go = ({ className: e = "h-full w-full" }) => /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", version: "1.1", className: e, children: [
|
|
2038
|
+
/* @__PURE__ */ l("title", { children: "ai" }),
|
|
2039
|
+
/* @__PURE__ */ l("g", { id: "Page-1", stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd", children: /* @__PURE__ */ l("g", { id: "icon", fill: "currentColor", transform: "translate(64.000000, 64.000000)", children: /* @__PURE__ */ l(
|
|
2040
|
+
"path",
|
|
2041
|
+
{
|
|
2042
|
+
d: "M320,64 L320,320 L64,320 L64,64 L320,64 Z M171.749388,128 L146.817842,128 L99.4840387,256 L121.976629,256 L130.913039,230.977 L187.575039,230.977 L196.319607,256 L220.167172,256 L171.749388,128 Z M260.093778,128 L237.691519,128 L237.691519,256 L260.093778,256 L260.093778,128 Z M159.094727,149.47526 L181.409039,213.333 L137.135039,213.333 L159.094727,149.47526 Z M341.333333,256 L384,256 L384,298.666667 L341.333333,298.666667 L341.333333,256 Z M85.3333333,341.333333 L128,341.333333 L128,384 L85.3333333,384 L85.3333333,341.333333 Z M170.666667,341.333333 L213.333333,341.333333 L213.333333,384 L170.666667,384 L170.666667,341.333333 Z M85.3333333,0 L128,0 L128,42.6666667 L85.3333333,42.6666667 L85.3333333,0 Z M256,341.333333 L298.666667,341.333333 L298.666667,384 L256,384 L256,341.333333 Z M170.666667,0 L213.333333,0 L213.333333,42.6666667 L170.666667,42.6666667 L170.666667,0 Z M256,0 L298.666667,0 L298.666667,42.6666667 L256,42.6666667 L256,0 Z M341.333333,170.666667 L384,170.666667 L384,213.333333 L341.333333,213.333333 L341.333333,170.666667 Z M0,256 L42.6666667,256 L42.6666667,298.666667 L0,298.666667 L0,256 Z M341.333333,85.3333333 L384,85.3333333 L384,128 L341.333333,128 L341.333333,85.3333333 Z M0,170.666667 L42.6666667,170.666667 L42.6666667,213.333333 L0,213.333333 L0,170.666667 Z M0,85.3333333 L42.6666667,85.3333333 L42.6666667,128 L0,128 L0,85.3333333 Z",
|
|
2043
|
+
id: "Combined-Shape"
|
|
2044
|
+
}
|
|
2045
|
+
) }) })
|
|
2046
|
+
] }), mo = ({ isActive: e, show: t }) => /* @__PURE__ */ l(U, { size: "icon", className: "p-0 [&_svg]:size-6", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ l(go, { className: e ? "h-5 w-5 text-white" : "h-5 w-5 text-primary" }) }), Eo = {
|
|
2038
2047
|
id: ks,
|
|
2039
2048
|
label: "AI Assistant",
|
|
2040
2049
|
button: mo,
|
|
2041
2050
|
panel: ho,
|
|
2042
2051
|
position: "top"
|
|
2043
|
-
}, po = F(() => import("./lang-panel-
|
|
2052
|
+
}, po = F(() => import("./lang-panel-B8SeKnwN.js")), yo = ({ isActive: e, show: t }) => {
|
|
2044
2053
|
const { data: n } = Re();
|
|
2045
|
-
return !
|
|
2054
|
+
return !zt(n, "languages") || !V(n, "languages", []).length ? null : /* @__PURE__ */ l(U, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ l(Ka, { className: "h-4 w-4" }) });
|
|
2046
2055
|
}, Os = "lang", Ao = {
|
|
2047
2056
|
id: Os,
|
|
2048
2057
|
label: "Languages",
|
|
@@ -2051,9 +2060,9 @@ const Vi = ({
|
|
|
2051
2060
|
button: yo,
|
|
2052
2061
|
view: "modal",
|
|
2053
2062
|
width: 400
|
|
2054
|
-
}, To = F(() => import("./seo-panel-
|
|
2055
|
-
const { data: n } = ie(), s =
|
|
2056
|
-
return !
|
|
2063
|
+
}, To = F(() => import("./seo-panel-BsMBb5Ep.js")), Ds = "seo", So = ({ isActive: e, show: t }) => {
|
|
2064
|
+
const { data: n } = ie(), s = Ci(n == null ? void 0 : n.pageType);
|
|
2065
|
+
return !zt(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ l(U, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
|
|
2057
2066
|
"svg",
|
|
2058
2067
|
{
|
|
2059
2068
|
stroke: "currentColor",
|
|
@@ -2079,7 +2088,7 @@ const Vi = ({
|
|
|
2079
2088
|
position: "top",
|
|
2080
2089
|
width: 600,
|
|
2081
2090
|
view: "modal"
|
|
2082
|
-
},
|
|
2091
|
+
}, xs = "user-info", Po = () => {
|
|
2083
2092
|
const { t: e } = _e(), { user: t, logout: n } = Jt(), s = oe("onLogout", ds);
|
|
2084
2093
|
return t ? /* @__PURE__ */ m(ia, { children: [
|
|
2085
2094
|
/* @__PURE__ */ l(oa, { asChild: !0, children: /* @__PURE__ */ l(U, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ l(Va, { className: "h-4 w-4" }) }) }),
|
|
@@ -2110,12 +2119,12 @@ const Vi = ({
|
|
|
2110
2119
|
] })
|
|
2111
2120
|
] }) : null;
|
|
2112
2121
|
}, vo = {
|
|
2113
|
-
id:
|
|
2122
|
+
id: xs,
|
|
2114
2123
|
label: "User Info",
|
|
2115
2124
|
button: Po,
|
|
2116
2125
|
position: "bottom"
|
|
2117
2126
|
}, wo = () => {
|
|
2118
|
-
|
|
2127
|
+
Lt(Ds, _o), Lt(Os, Ao), Lt(xs, vo), (localStorage.getItem("chai-feature-flags") ?? "").includes("enable-ai-chat-panel") && (console.log("enable-ai-chat-panel"), Lt(ks, Eo));
|
|
2119
2128
|
};
|
|
2120
2129
|
var v = {
|
|
2121
2130
|
context: void 0,
|
|
@@ -2136,26 +2145,26 @@ function Jn(e) {
|
|
|
2136
2145
|
function rt(e) {
|
|
2137
2146
|
v.context = e;
|
|
2138
2147
|
}
|
|
2139
|
-
var
|
|
2148
|
+
var Gs = !1, bo = (e, t) => e === t, qt = Symbol("solid-proxy"), Rs = typeof Proxy == "function", Us = Symbol("solid-track"), Kt = {
|
|
2140
2149
|
equals: bo
|
|
2141
|
-
},
|
|
2150
|
+
}, Ms = Qs, Pe = 1, Vt = 2, Bs = {
|
|
2142
2151
|
owned: null,
|
|
2143
2152
|
cleanups: null,
|
|
2144
2153
|
context: null,
|
|
2145
2154
|
owner: null
|
|
2146
|
-
}, ln = {},
|
|
2155
|
+
}, ln = {}, C = null, cn = null, Io = null, x = null, ee = null, Te = null, Zt = 0;
|
|
2147
2156
|
function Oe(e, t) {
|
|
2148
|
-
const n =
|
|
2157
|
+
const n = x, s = C, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Bs : {
|
|
2149
2158
|
owned: null,
|
|
2150
2159
|
cleanups: null,
|
|
2151
2160
|
context: a ? a.context : null,
|
|
2152
2161
|
owner: a
|
|
2153
|
-
}, o = r ? e : () => e(() =>
|
|
2154
|
-
|
|
2162
|
+
}, o = r ? e : () => e(() => X(() => ct(i)));
|
|
2163
|
+
C = i, x = null;
|
|
2155
2164
|
try {
|
|
2156
2165
|
return me(o, !0);
|
|
2157
2166
|
} finally {
|
|
2158
|
-
|
|
2167
|
+
x = n, C = s;
|
|
2159
2168
|
}
|
|
2160
2169
|
}
|
|
2161
2170
|
function q(e, t) {
|
|
@@ -2168,28 +2177,28 @@ function q(e, t) {
|
|
|
2168
2177
|
}, s = (r) => (typeof r == "function" && (r = r(n.value)), Hs(n, r));
|
|
2169
2178
|
return [Vs.bind(n), s];
|
|
2170
2179
|
}
|
|
2171
|
-
function
|
|
2172
|
-
const s =
|
|
2180
|
+
function Lo(e, t, n) {
|
|
2181
|
+
const s = Xt(e, t, !0, Pe);
|
|
2173
2182
|
st(s);
|
|
2174
2183
|
}
|
|
2175
2184
|
function De(e, t, n) {
|
|
2176
|
-
const s =
|
|
2185
|
+
const s = Xt(e, t, !1, Pe);
|
|
2177
2186
|
st(s);
|
|
2178
2187
|
}
|
|
2179
2188
|
function Fs(e, t, n) {
|
|
2180
|
-
|
|
2181
|
-
const s =
|
|
2189
|
+
Ms = Uo;
|
|
2190
|
+
const s = Xt(e, t, !1, Pe);
|
|
2182
2191
|
(!n || !n.render) && (s.user = !0), Te ? Te.push(s) : st(s);
|
|
2183
2192
|
}
|
|
2184
2193
|
function J(e, t, n) {
|
|
2185
2194
|
n = n ? Object.assign({}, Kt, n) : Kt;
|
|
2186
|
-
const s =
|
|
2195
|
+
const s = Xt(e, t, !0, 0);
|
|
2187
2196
|
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, st(s), Vs.bind(s);
|
|
2188
2197
|
}
|
|
2189
|
-
function
|
|
2198
|
+
function Co(e) {
|
|
2190
2199
|
return e && typeof e == "object" && "then" in e;
|
|
2191
2200
|
}
|
|
2192
|
-
function
|
|
2201
|
+
function No(e, t, n) {
|
|
2193
2202
|
let s, r, a;
|
|
2194
2203
|
s = !0, r = e, a = {};
|
|
2195
2204
|
let i = null, o = ln, c = null, u = !1, d = "initialValue" in a, f = typeof s == "function" && J(s);
|
|
@@ -2197,7 +2206,7 @@ function Lo(e, t, n) {
|
|
|
2197
2206
|
equals: !1
|
|
2198
2207
|
}), [A, b] = q(d ? "ready" : "unresolved");
|
|
2199
2208
|
v.context && (c = v.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : v.load && v.has(c) && (o = v.load(c)));
|
|
2200
|
-
function
|
|
2209
|
+
function B(w, I, Y, $) {
|
|
2201
2210
|
return i === w && (i = null, $ !== void 0 && (d = !0), (w === o || I === o) && a.onHydrated && queueMicrotask(() => a.onHydrated($, {
|
|
2202
2211
|
value: I
|
|
2203
2212
|
})), o = ln, k(I, Y)), I;
|
|
@@ -2210,20 +2219,20 @@ function Lo(e, t, n) {
|
|
|
2210
2219
|
}, !1);
|
|
2211
2220
|
}
|
|
2212
2221
|
function pe() {
|
|
2213
|
-
const w =
|
|
2222
|
+
const w = xo, I = g(), Y = S();
|
|
2214
2223
|
if (Y !== void 0 && !i) throw Y;
|
|
2215
|
-
return
|
|
2224
|
+
return x && x.user, I;
|
|
2216
2225
|
}
|
|
2217
2226
|
function ye(w = !0) {
|
|
2218
2227
|
if (w !== !1 && u) return;
|
|
2219
2228
|
u = !1;
|
|
2220
2229
|
const I = f ? f() : s;
|
|
2221
2230
|
if (I == null || I === !1) {
|
|
2222
|
-
|
|
2231
|
+
B(i, X(g));
|
|
2223
2232
|
return;
|
|
2224
2233
|
}
|
|
2225
2234
|
let Y;
|
|
2226
|
-
const $ = o !== ln ? o :
|
|
2235
|
+
const $ = o !== ln ? o : X(() => {
|
|
2227
2236
|
try {
|
|
2228
2237
|
return r(I, {
|
|
2229
2238
|
value: g(),
|
|
@@ -2234,13 +2243,13 @@ function Lo(e, t, n) {
|
|
|
2234
2243
|
}
|
|
2235
2244
|
});
|
|
2236
2245
|
if (Y !== void 0) {
|
|
2237
|
-
|
|
2246
|
+
B(i, void 0, Rt(Y), I);
|
|
2238
2247
|
return;
|
|
2239
|
-
} else if (!
|
|
2240
|
-
return
|
|
2241
|
-
return i = $, "v" in $ ? ($.s === 1 ?
|
|
2248
|
+
} else if (!Co($))
|
|
2249
|
+
return B(i, $, void 0, I), $;
|
|
2250
|
+
return i = $, "v" in $ ? ($.s === 1 ? B(i, $.v, void 0, I) : B(i, void 0, Rt($.v), I), $) : (u = !0, queueMicrotask(() => u = !1), me(() => {
|
|
2242
2251
|
b(d ? "refreshing" : "pending"), y();
|
|
2243
|
-
}, !1), $.then((de) =>
|
|
2252
|
+
}, !1), $.then((de) => B($, de, void 0, I), (de) => B($, void 0, Rt(de), I)));
|
|
2244
2253
|
}
|
|
2245
2254
|
Object.defineProperties(pe, {
|
|
2246
2255
|
state: {
|
|
@@ -2264,23 +2273,23 @@ function Lo(e, t, n) {
|
|
|
2264
2273
|
}
|
|
2265
2274
|
}
|
|
2266
2275
|
});
|
|
2267
|
-
let
|
|
2268
|
-
return f ?
|
|
2269
|
-
refetch: (w) => qs(
|
|
2276
|
+
let M = C;
|
|
2277
|
+
return f ? Lo(() => (M = C, ye(!1))) : ye(!1), [pe, {
|
|
2278
|
+
refetch: (w) => qs(M, () => ye(w)),
|
|
2270
2279
|
mutate: p
|
|
2271
2280
|
}];
|
|
2272
2281
|
}
|
|
2273
2282
|
function Wc(e) {
|
|
2274
2283
|
return me(e, !1);
|
|
2275
2284
|
}
|
|
2276
|
-
function
|
|
2277
|
-
if (
|
|
2278
|
-
const t =
|
|
2279
|
-
|
|
2285
|
+
function X(e) {
|
|
2286
|
+
if (x === null) return e();
|
|
2287
|
+
const t = x;
|
|
2288
|
+
x = null;
|
|
2280
2289
|
try {
|
|
2281
2290
|
return e();
|
|
2282
2291
|
} finally {
|
|
2283
|
-
|
|
2292
|
+
x = t;
|
|
2284
2293
|
}
|
|
2285
2294
|
}
|
|
2286
2295
|
function Yc(e, t, n) {
|
|
@@ -2294,53 +2303,53 @@ function Yc(e, t, n) {
|
|
|
2294
2303
|
} else o = e();
|
|
2295
2304
|
if (a)
|
|
2296
2305
|
return a = !1, i;
|
|
2297
|
-
const c =
|
|
2306
|
+
const c = X(() => t(o, r, i));
|
|
2298
2307
|
return r = o, c;
|
|
2299
2308
|
};
|
|
2300
2309
|
}
|
|
2301
2310
|
function ko(e) {
|
|
2302
|
-
Fs(() =>
|
|
2311
|
+
Fs(() => X(e));
|
|
2303
2312
|
}
|
|
2304
2313
|
function lt(e) {
|
|
2305
|
-
return
|
|
2314
|
+
return C === null || (C.cleanups === null ? C.cleanups = [e] : C.cleanups.push(e)), e;
|
|
2306
2315
|
}
|
|
2307
|
-
function
|
|
2308
|
-
return
|
|
2316
|
+
function Zn() {
|
|
2317
|
+
return C;
|
|
2309
2318
|
}
|
|
2310
2319
|
function qs(e, t) {
|
|
2311
|
-
const n =
|
|
2312
|
-
|
|
2320
|
+
const n = C, s = x;
|
|
2321
|
+
C = e, x = null;
|
|
2313
2322
|
try {
|
|
2314
2323
|
return me(t, !0);
|
|
2315
2324
|
} catch (r) {
|
|
2316
|
-
|
|
2325
|
+
Gn(r);
|
|
2317
2326
|
} finally {
|
|
2318
|
-
|
|
2327
|
+
C = n, x = s;
|
|
2319
2328
|
}
|
|
2320
2329
|
}
|
|
2321
2330
|
function Oo(e) {
|
|
2322
|
-
const t =
|
|
2331
|
+
const t = x, n = C;
|
|
2323
2332
|
return Promise.resolve().then(() => {
|
|
2324
|
-
|
|
2333
|
+
x = t, C = n;
|
|
2325
2334
|
let s;
|
|
2326
|
-
return me(e, !1),
|
|
2335
|
+
return me(e, !1), x = C = null, s ? s.done : void 0;
|
|
2327
2336
|
});
|
|
2328
2337
|
}
|
|
2329
2338
|
var [Do, Jc] = /* @__PURE__ */ q(!1);
|
|
2330
|
-
function
|
|
2339
|
+
function Zc() {
|
|
2331
2340
|
return [Do, Oo];
|
|
2332
2341
|
}
|
|
2333
|
-
function
|
|
2342
|
+
function Xc(e, t) {
|
|
2334
2343
|
const n = Symbol("context");
|
|
2335
2344
|
return {
|
|
2336
2345
|
id: n,
|
|
2337
|
-
Provider:
|
|
2346
|
+
Provider: Mo(n),
|
|
2338
2347
|
defaultValue: e
|
|
2339
2348
|
};
|
|
2340
2349
|
}
|
|
2341
2350
|
function eu(e) {
|
|
2342
2351
|
let t;
|
|
2343
|
-
return
|
|
2352
|
+
return C && C.context && (t = C.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
2344
2353
|
}
|
|
2345
2354
|
function Ks(e) {
|
|
2346
2355
|
const t = J(e), n = J(() => gn(t()));
|
|
@@ -2349,7 +2358,7 @@ function Ks(e) {
|
|
|
2349
2358
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
2350
2359
|
}, n;
|
|
2351
2360
|
}
|
|
2352
|
-
var
|
|
2361
|
+
var xo;
|
|
2353
2362
|
function Vs() {
|
|
2354
2363
|
if (this.sources && this.state)
|
|
2355
2364
|
if (this.state === Pe) st(this);
|
|
@@ -2357,9 +2366,9 @@ function Vs() {
|
|
|
2357
2366
|
const e = ee;
|
|
2358
2367
|
ee = null, me(() => Qt(this), !1), ee = e;
|
|
2359
2368
|
}
|
|
2360
|
-
if (
|
|
2369
|
+
if (x) {
|
|
2361
2370
|
const e = this.observers ? this.observers.length : 0;
|
|
2362
|
-
|
|
2371
|
+
x.sources ? (x.sources.push(this), x.sourceSlots.push(e)) : (x.sources = [this], x.sourceSlots = [e]), this.observers ? (this.observers.push(x), this.observerSlots.push(x.sources.length - 1)) : (this.observers = [x], this.observerSlots = [x.sources.length - 1]);
|
|
2363
2372
|
}
|
|
2364
2373
|
return this.value;
|
|
2365
2374
|
}
|
|
@@ -2377,23 +2386,23 @@ function Hs(e, t, n) {
|
|
|
2377
2386
|
function st(e) {
|
|
2378
2387
|
if (!e.fn) return;
|
|
2379
2388
|
ct(e);
|
|
2380
|
-
const t =
|
|
2381
|
-
|
|
2389
|
+
const t = Zt;
|
|
2390
|
+
Go(e, e.value, t);
|
|
2382
2391
|
}
|
|
2383
|
-
function
|
|
2392
|
+
function Go(e, t, n) {
|
|
2384
2393
|
let s;
|
|
2385
|
-
const r =
|
|
2386
|
-
|
|
2394
|
+
const r = C, a = x;
|
|
2395
|
+
x = C = e;
|
|
2387
2396
|
try {
|
|
2388
2397
|
s = e.fn(t);
|
|
2389
2398
|
} catch (i) {
|
|
2390
|
-
return e.pure && (e.state = Pe, e.owned && e.owned.forEach(ct), e.owned = null), e.updatedAt = n + 1,
|
|
2399
|
+
return e.pure && (e.state = Pe, e.owned && e.owned.forEach(ct), e.owned = null), e.updatedAt = n + 1, Gn(i);
|
|
2391
2400
|
} finally {
|
|
2392
|
-
|
|
2401
|
+
x = a, C = r;
|
|
2393
2402
|
}
|
|
2394
2403
|
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Hs(e, s) : e.value = s, e.updatedAt = n);
|
|
2395
2404
|
}
|
|
2396
|
-
function
|
|
2405
|
+
function Xt(e, t, n, s = Pe, r) {
|
|
2397
2406
|
const a = {
|
|
2398
2407
|
fn: e,
|
|
2399
2408
|
state: s,
|
|
@@ -2403,18 +2412,18 @@ function Zt(e, t, n, s = Pe, r) {
|
|
|
2403
2412
|
sourceSlots: null,
|
|
2404
2413
|
cleanups: null,
|
|
2405
2414
|
value: t,
|
|
2406
|
-
owner:
|
|
2407
|
-
context:
|
|
2415
|
+
owner: C,
|
|
2416
|
+
context: C ? C.context : null,
|
|
2408
2417
|
pure: n
|
|
2409
2418
|
};
|
|
2410
|
-
return
|
|
2419
|
+
return C === null || C !== Bs && (C.owned ? C.owned.push(a) : C.owned = [a]), a;
|
|
2411
2420
|
}
|
|
2412
2421
|
function Ht(e) {
|
|
2413
2422
|
if (e.state === 0) return;
|
|
2414
2423
|
if (e.state === Vt) return Qt(e);
|
|
2415
|
-
if (e.suspense &&
|
|
2424
|
+
if (e.suspense && X(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
2416
2425
|
const t = [e];
|
|
2417
|
-
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt <
|
|
2426
|
+
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < Zt); )
|
|
2418
2427
|
e.state && t.push(e);
|
|
2419
2428
|
for (let n = t.length - 1; n >= 0; n--)
|
|
2420
2429
|
if (e = t[n], e.state === Pe)
|
|
@@ -2427,18 +2436,18 @@ function Ht(e) {
|
|
|
2427
2436
|
function me(e, t) {
|
|
2428
2437
|
if (ee) return e();
|
|
2429
2438
|
let n = !1;
|
|
2430
|
-
t || (ee = []), Te ? n = !0 : Te = [],
|
|
2439
|
+
t || (ee = []), Te ? n = !0 : Te = [], Zt++;
|
|
2431
2440
|
try {
|
|
2432
2441
|
const s = e();
|
|
2433
2442
|
return Ro(n), s;
|
|
2434
2443
|
} catch (s) {
|
|
2435
|
-
n || (Te = null), ee = null,
|
|
2444
|
+
n || (Te = null), ee = null, Gn(s);
|
|
2436
2445
|
}
|
|
2437
2446
|
}
|
|
2438
2447
|
function Ro(e) {
|
|
2439
2448
|
if (ee && (Qs(ee), ee = null), e) return;
|
|
2440
2449
|
const t = Te;
|
|
2441
|
-
Te = null, t.length && me(() =>
|
|
2450
|
+
Te = null, t.length && me(() => Ms(t), !1);
|
|
2442
2451
|
}
|
|
2443
2452
|
function Qs(e) {
|
|
2444
2453
|
for (let t = 0; t < e.length; t++) Ht(e[t]);
|
|
@@ -2464,7 +2473,7 @@ function Qt(e, t) {
|
|
|
2464
2473
|
const s = e.sources[n];
|
|
2465
2474
|
if (s.sources) {
|
|
2466
2475
|
const r = s.state;
|
|
2467
|
-
r === Pe ? s !== t && (!s.updatedAt || s.updatedAt <
|
|
2476
|
+
r === Pe ? s !== t && (!s.updatedAt || s.updatedAt < Zt) && Ht(s) : r === Vt && Qt(s, t);
|
|
2468
2477
|
}
|
|
2469
2478
|
}
|
|
2470
2479
|
}
|
|
@@ -2503,7 +2512,7 @@ function Rt(e) {
|
|
|
2503
2512
|
cause: e
|
|
2504
2513
|
});
|
|
2505
2514
|
}
|
|
2506
|
-
function
|
|
2515
|
+
function Gn(e, t = C) {
|
|
2507
2516
|
throw Rt(e);
|
|
2508
2517
|
}
|
|
2509
2518
|
function gn(e) {
|
|
@@ -2518,11 +2527,11 @@ function gn(e) {
|
|
|
2518
2527
|
}
|
|
2519
2528
|
return e;
|
|
2520
2529
|
}
|
|
2521
|
-
function
|
|
2530
|
+
function Mo(e, t) {
|
|
2522
2531
|
return function(s) {
|
|
2523
2532
|
let r;
|
|
2524
|
-
return De(() => r =
|
|
2525
|
-
...
|
|
2533
|
+
return De(() => r = X(() => (C.context = {
|
|
2534
|
+
...C.context,
|
|
2526
2535
|
[e]: s.value
|
|
2527
2536
|
}, Ks(() => s.children))), void 0), r;
|
|
2528
2537
|
};
|
|
@@ -2531,12 +2540,12 @@ var mn = Symbol("fallback");
|
|
|
2531
2540
|
function $t(e) {
|
|
2532
2541
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
2533
2542
|
}
|
|
2534
|
-
function
|
|
2543
|
+
function Bo(e, t, n = {}) {
|
|
2535
2544
|
let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
|
|
2536
2545
|
return lt(() => $t(a)), () => {
|
|
2537
2546
|
let c = e() || [], u = c.length, d, f;
|
|
2538
|
-
return c[Us],
|
|
2539
|
-
let g, p, S, P, T, y, A, b,
|
|
2547
|
+
return c[Us], X(() => {
|
|
2548
|
+
let g, p, S, P, T, y, A, b, B;
|
|
2540
2549
|
if (u === 0)
|
|
2541
2550
|
i !== 0 && ($t(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [mn], r[0] = Oe((k) => (a[0] = k, n.fallback())), i = 1);
|
|
2542
2551
|
else if (i === 0) {
|
|
@@ -2548,9 +2557,9 @@ function Mo(e, t, n = {}) {
|
|
|
2548
2557
|
for (A = i - 1, b = u - 1; A >= y && b >= y && s[A] === c[b]; A--, b--)
|
|
2549
2558
|
S[b] = r[A], P[b] = a[A], o && (T[b] = o[A]);
|
|
2550
2559
|
for (g = /* @__PURE__ */ new Map(), p = new Array(b + 1), f = b; f >= y; f--)
|
|
2551
|
-
|
|
2560
|
+
B = c[f], d = g.get(B), p[f] = d === void 0 ? -1 : d, g.set(B, f);
|
|
2552
2561
|
for (d = y; d <= A; d++)
|
|
2553
|
-
|
|
2562
|
+
B = s[d], f = g.get(B), f !== void 0 && f !== -1 ? (S[f] = r[d], P[f] = a[d], o && (T[f] = o[d]), f = p[f], g.set(B, f)) : a[d]();
|
|
2554
2563
|
for (f = y; f < u; f++)
|
|
2555
2564
|
f in S ? (r[f] = S[f], a[f] = P[f], o && (o[f] = T[f], o[f](f))) : r[f] = Oe(h);
|
|
2556
2565
|
r = r.slice(0, i = u), s = c.slice(0);
|
|
@@ -2570,7 +2579,7 @@ function Fo(e, t, n = {}) {
|
|
|
2570
2579
|
let s = [], r = [], a = [], i = [], o = 0, c;
|
|
2571
2580
|
return lt(() => $t(a)), () => {
|
|
2572
2581
|
const u = e() || [], d = u.length;
|
|
2573
|
-
return u[Us],
|
|
2582
|
+
return u[Us], X(() => {
|
|
2574
2583
|
if (d === 0)
|
|
2575
2584
|
return o !== 0 && ($t(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [mn], r[0] = Oe((h) => (a[0] = h, n.fallback())), o = 1), r;
|
|
2576
2585
|
for (s[0] === mn && (a[0](), a = [], s = [], r = [], o = 0), c = 0; c < d; c++)
|
|
@@ -2586,8 +2595,8 @@ function Fo(e, t, n = {}) {
|
|
|
2586
2595
|
}
|
|
2587
2596
|
};
|
|
2588
2597
|
}
|
|
2589
|
-
function
|
|
2590
|
-
return
|
|
2598
|
+
function zs(e, t) {
|
|
2599
|
+
return X(() => e(t || {}));
|
|
2591
2600
|
}
|
|
2592
2601
|
function kt() {
|
|
2593
2602
|
return !0;
|
|
@@ -2625,7 +2634,7 @@ function qo() {
|
|
|
2625
2634
|
if (n !== void 0) return n;
|
|
2626
2635
|
}
|
|
2627
2636
|
}
|
|
2628
|
-
function
|
|
2637
|
+
function js(...e) {
|
|
2629
2638
|
let t = !1;
|
|
2630
2639
|
for (let i = 0; i < e.length; i++) {
|
|
2631
2640
|
const o = e[i];
|
|
@@ -2723,11 +2732,11 @@ function Ws(e) {
|
|
|
2723
2732
|
!v.done && rt(a), v.count--, c(() => u.default), rt();
|
|
2724
2733
|
}), t = o;
|
|
2725
2734
|
} else if (!t) {
|
|
2726
|
-
const [o] =
|
|
2735
|
+
const [o] = No(() => (n || (n = e())).then((c) => c.default));
|
|
2727
2736
|
t = o;
|
|
2728
2737
|
}
|
|
2729
2738
|
let i;
|
|
2730
|
-
return J(() => (i = t()) ?
|
|
2739
|
+
return J(() => (i = t()) ? X(() => {
|
|
2731
2740
|
if (!a || v.done) return i(r);
|
|
2732
2741
|
const o = v.context;
|
|
2733
2742
|
rt(a);
|
|
@@ -2746,7 +2755,7 @@ function nu(e) {
|
|
|
2746
2755
|
const t = "fallback" in e && {
|
|
2747
2756
|
fallback: () => e.fallback
|
|
2748
2757
|
};
|
|
2749
|
-
return J(
|
|
2758
|
+
return J(Bo(() => e.each, e.children, t || void 0));
|
|
2750
2759
|
}
|
|
2751
2760
|
function su(e) {
|
|
2752
2761
|
const t = "fallback" in e && {
|
|
@@ -2762,8 +2771,8 @@ function ru(e) {
|
|
|
2762
2771
|
const r = s();
|
|
2763
2772
|
if (r) {
|
|
2764
2773
|
const a = e.children;
|
|
2765
|
-
return typeof a == "function" && a.length > 0 ?
|
|
2766
|
-
if (!
|
|
2774
|
+
return typeof a == "function" && a.length > 0 ? X(() => a(t ? r : () => {
|
|
2775
|
+
if (!X(s)) throw Ys("Show");
|
|
2767
2776
|
return n();
|
|
2768
2777
|
})) : a;
|
|
2769
2778
|
}
|
|
@@ -2787,9 +2796,9 @@ function au(e) {
|
|
|
2787
2796
|
const s = n()();
|
|
2788
2797
|
if (!s) return e.fallback;
|
|
2789
2798
|
const [r, a, i] = s, o = i.children;
|
|
2790
|
-
return typeof o == "function" && o.length > 0 ?
|
|
2799
|
+
return typeof o == "function" && o.length > 0 ? X(() => o(i.keyed ? a() : () => {
|
|
2791
2800
|
var u;
|
|
2792
|
-
if (((u =
|
|
2801
|
+
if (((u = X(n)()) == null ? void 0 : u[0]) !== r) throw Ys("Match");
|
|
2793
2802
|
return a();
|
|
2794
2803
|
})) : o;
|
|
2795
2804
|
}, void 0, void 0);
|
|
@@ -2797,10 +2806,10 @@ function au(e) {
|
|
|
2797
2806
|
function iu(e) {
|
|
2798
2807
|
return e;
|
|
2799
2808
|
}
|
|
2800
|
-
var Ho = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], Qo = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...Ho]), $o = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]),
|
|
2809
|
+
var Ho = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], Qo = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...Ho]), $o = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), zo = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2801
2810
|
className: "class",
|
|
2802
2811
|
htmlFor: "for"
|
|
2803
|
-
}),
|
|
2812
|
+
}), jo = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2804
2813
|
class: "className",
|
|
2805
2814
|
novalidate: {
|
|
2806
2815
|
$: "noValidate",
|
|
@@ -2830,7 +2839,7 @@ var Ho = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
|
|
|
2830
2839
|
}
|
|
2831
2840
|
});
|
|
2832
2841
|
function Wo(e, t) {
|
|
2833
|
-
const n =
|
|
2842
|
+
const n = jo[e];
|
|
2834
2843
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
2835
2844
|
}
|
|
2836
2845
|
var Yo = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), Jo = /* @__PURE__ */ new Set([
|
|
@@ -2911,11 +2920,11 @@ var Yo = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
|
|
|
2911
2920
|
"use",
|
|
2912
2921
|
"view",
|
|
2913
2922
|
"vkern"
|
|
2914
|
-
]),
|
|
2923
|
+
]), Zo = {
|
|
2915
2924
|
xlink: "http://www.w3.org/1999/xlink",
|
|
2916
2925
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
2917
2926
|
}, ou = (e) => J(() => e());
|
|
2918
|
-
function
|
|
2927
|
+
function Xo(e, t, n) {
|
|
2919
2928
|
let s = n.length, r = t.length, a = s, i = 0, o = 0, c = t[r - 1].nextSibling, u = null;
|
|
2920
2929
|
for (; i < r || o < a; ) {
|
|
2921
2930
|
if (t[i] === n[o]) {
|
|
@@ -2975,12 +2984,12 @@ function el(e, t = window.document) {
|
|
|
2975
2984
|
const n = t[it] || (t[it] = /* @__PURE__ */ new Set());
|
|
2976
2985
|
for (let s = 0, r = e.length; s < r; s++) {
|
|
2977
2986
|
const a = e[s];
|
|
2978
|
-
n.has(a) || (n.add(a), t.addEventListener(a,
|
|
2987
|
+
n.has(a) || (n.add(a), t.addEventListener(a, Zs));
|
|
2979
2988
|
}
|
|
2980
2989
|
}
|
|
2981
2990
|
function cu(e = window.document) {
|
|
2982
2991
|
if (e[it]) {
|
|
2983
|
-
for (let t of e[it].keys()) e.removeEventListener(t,
|
|
2992
|
+
for (let t of e[it].keys()) e.removeEventListener(t, Zs);
|
|
2984
2993
|
delete e[it];
|
|
2985
2994
|
}
|
|
2986
2995
|
}
|
|
@@ -3009,11 +3018,11 @@ function al(e, t, n = {}) {
|
|
|
3009
3018
|
let a, i;
|
|
3010
3019
|
for (a = 0, i = r.length; a < i; a++) {
|
|
3011
3020
|
const o = r[a];
|
|
3012
|
-
!o || o === "undefined" || t[o] || (
|
|
3021
|
+
!o || o === "undefined" || t[o] || (Xn(e, o, !1), delete n[o]);
|
|
3013
3022
|
}
|
|
3014
3023
|
for (a = 0, i = s.length; a < i; a++) {
|
|
3015
3024
|
const o = s[a], c = !!t[o];
|
|
3016
|
-
!o || o === "undefined" || n[o] === c || !c || (
|
|
3025
|
+
!o || o === "undefined" || n[o] === c || !c || (Xn(e, o, !0), n[o] = c);
|
|
3017
3026
|
}
|
|
3018
3027
|
return n;
|
|
3019
3028
|
}
|
|
@@ -3034,7 +3043,7 @@ function ol(e, t = {}, n, s) {
|
|
|
3034
3043
|
return s || De(() => r.children = ut(e, t.children, r.children)), De(() => typeof t.ref == "function" && ll(t.ref, e)), De(() => cl(e, t, n, !0, r, !0)), r;
|
|
3035
3044
|
}
|
|
3036
3045
|
function ll(e, t, n) {
|
|
3037
|
-
return
|
|
3046
|
+
return X(() => e(t, n));
|
|
3038
3047
|
}
|
|
3039
3048
|
function yn(e, t, n, s) {
|
|
3040
3049
|
if (n !== void 0 && !s && (s = []), typeof t != "function") return ut(e, t, s, n);
|
|
@@ -3064,7 +3073,7 @@ function Ue(e) {
|
|
|
3064
3073
|
function dl(e) {
|
|
3065
3074
|
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
3066
3075
|
}
|
|
3067
|
-
function
|
|
3076
|
+
function Xn(e, t, n) {
|
|
3068
3077
|
const s = t.trim().split(/\s+/);
|
|
3069
3078
|
for (let r = 0, a = s.length; r < a; r++) e.classList.toggle(s[r], n);
|
|
3070
3079
|
}
|
|
@@ -3098,12 +3107,12 @@ function es(e, t, n, s, r, a, i) {
|
|
|
3098
3107
|
else if (Ue(e)) return n;
|
|
3099
3108
|
t === "class" || t === "className" ? sl(e, n) : o && !c && !u ? e[dl(t)] = n : e[d || t] = n;
|
|
3100
3109
|
} else {
|
|
3101
|
-
const h = r && t.indexOf(":") > -1 &&
|
|
3102
|
-
h ? tl(e, h, t, n) : pn(e,
|
|
3110
|
+
const h = r && t.indexOf(":") > -1 && Zo[t.split(":")[0]];
|
|
3111
|
+
h ? tl(e, h, t, n) : pn(e, zo[t] || t, n);
|
|
3103
3112
|
}
|
|
3104
3113
|
return n;
|
|
3105
3114
|
}
|
|
3106
|
-
function
|
|
3115
|
+
function Zs(e) {
|
|
3107
3116
|
if (v.registry && v.events && v.events.find(([c, u]) => u === e))
|
|
3108
3117
|
return;
|
|
3109
3118
|
let t = e.target;
|
|
@@ -3158,12 +3167,12 @@ function ut(e, t, n, s, r) {
|
|
|
3158
3167
|
return n;
|
|
3159
3168
|
if (o) {
|
|
3160
3169
|
let c = n[0];
|
|
3161
|
-
c && c.nodeType === 3 ? c.data !== t && (c.data = t) : c = document.createTextNode(t), n =
|
|
3170
|
+
c && c.nodeType === 3 ? c.data !== t && (c.data = t) : c = document.createTextNode(t), n = Be(e, n, s, c);
|
|
3162
3171
|
} else
|
|
3163
3172
|
n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
|
|
3164
3173
|
} else if (t == null || i === "boolean") {
|
|
3165
3174
|
if (a) return n;
|
|
3166
|
-
n =
|
|
3175
|
+
n = Be(e, n, s);
|
|
3167
3176
|
} else {
|
|
3168
3177
|
if (i === "function")
|
|
3169
3178
|
return De(() => {
|
|
@@ -3185,14 +3194,14 @@ function ut(e, t, n, s, r) {
|
|
|
3185
3194
|
return n = f;
|
|
3186
3195
|
}
|
|
3187
3196
|
if (c.length === 0) {
|
|
3188
|
-
if (n =
|
|
3189
|
-
} else u ? n.length === 0 ? ts(e, c, s) :
|
|
3197
|
+
if (n = Be(e, n, s), o) return n;
|
|
3198
|
+
} else u ? n.length === 0 ? ts(e, c, s) : Xo(e, n, c) : (n && Be(e), ts(e, c));
|
|
3190
3199
|
n = c;
|
|
3191
3200
|
} else if (t.nodeType) {
|
|
3192
3201
|
if (a && t.parentNode) return n = o ? [t] : t;
|
|
3193
3202
|
if (Array.isArray(n)) {
|
|
3194
|
-
if (o) return n =
|
|
3195
|
-
|
|
3203
|
+
if (o) return n = Be(e, n, s, t);
|
|
3204
|
+
Be(e, n, null, t);
|
|
3196
3205
|
} else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
3197
3206
|
n = t;
|
|
3198
3207
|
}
|
|
@@ -3223,7 +3232,7 @@ function An(e, t, n, s) {
|
|
|
3223
3232
|
function ts(e, t, n = null) {
|
|
3224
3233
|
for (let s = 0, r = t.length; s < r; s++) e.insertBefore(t[s], n);
|
|
3225
3234
|
}
|
|
3226
|
-
function
|
|
3235
|
+
function Be(e, t, n, s) {
|
|
3227
3236
|
if (n === void 0) return e.textContent = "";
|
|
3228
3237
|
const r = s || document.createTextNode("");
|
|
3229
3238
|
if (t.length) {
|
|
@@ -3242,22 +3251,22 @@ function fl() {
|
|
|
3242
3251
|
return v.getNextContextId();
|
|
3243
3252
|
}
|
|
3244
3253
|
var hl = "http://www.w3.org/2000/svg";
|
|
3245
|
-
function
|
|
3254
|
+
function Xs(e, t = !1) {
|
|
3246
3255
|
return t ? document.createElementNS(hl, e) : document.createElement(e);
|
|
3247
3256
|
}
|
|
3248
3257
|
function uu(e) {
|
|
3249
3258
|
const {
|
|
3250
3259
|
useShadow: t
|
|
3251
|
-
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r =
|
|
3260
|
+
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = Zn();
|
|
3252
3261
|
let a, i = !!v.context;
|
|
3253
3262
|
return Fs(() => {
|
|
3254
|
-
i && (
|
|
3263
|
+
i && (Zn().user = i = !1), a || (a = qs(r, () => J(() => e.children)));
|
|
3255
3264
|
const o = s();
|
|
3256
3265
|
if (o instanceof HTMLHeadElement) {
|
|
3257
3266
|
const [c, u] = q(!1), d = () => u(!0);
|
|
3258
3267
|
Oe((f) => yn(o, () => c() ? f() : a(), null)), lt(d);
|
|
3259
3268
|
} else {
|
|
3260
|
-
const c =
|
|
3269
|
+
const c = Xs(e.isSVG ? "g" : "div", e.isSVG), u = t && c.attachShadow ? c.attachShadow({
|
|
3261
3270
|
mode: "open"
|
|
3262
3271
|
}) : c;
|
|
3263
3272
|
Object.defineProperty(c, "_$host", {
|
|
@@ -3277,9 +3286,9 @@ function gl(e, t) {
|
|
|
3277
3286
|
const s = n();
|
|
3278
3287
|
switch (typeof s) {
|
|
3279
3288
|
case "function":
|
|
3280
|
-
return
|
|
3289
|
+
return X(() => s(t));
|
|
3281
3290
|
case "string":
|
|
3282
|
-
const r = Jo.has(s), a = v.context ? ul() :
|
|
3291
|
+
const r = Jo.has(s), a = v.context ? ul() : Xs(s, r);
|
|
3283
3292
|
return ol(a, t, r), a;
|
|
3284
3293
|
}
|
|
3285
3294
|
});
|
|
@@ -3376,7 +3385,7 @@ var Al = class {
|
|
|
3376
3385
|
findByName(e) {
|
|
3377
3386
|
return this.transfomers[e];
|
|
3378
3387
|
}
|
|
3379
|
-
}, Tl = (e) => Object.prototype.toString.call(e).slice(8, -1), tr = (e) => typeof e > "u", Sl = (e) => e === null, dt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Tn = (e) => dt(e) && Object.keys(e).length === 0, we = (e) => Array.isArray(e), _l = (e) => typeof e == "string", Pl = (e) => typeof e == "number" && !isNaN(e), vl = (e) => typeof e == "boolean", wl = (e) => e instanceof RegExp, ft = (e) => e instanceof Map, ht = (e) => e instanceof Set, nr = (e) => Tl(e) === "Symbol", bl = (e) => e instanceof Date && !isNaN(e.valueOf()), Il = (e) => e instanceof Error, ss = (e) => typeof e == "number" && isNaN(e),
|
|
3388
|
+
}, Tl = (e) => Object.prototype.toString.call(e).slice(8, -1), tr = (e) => typeof e > "u", Sl = (e) => e === null, dt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Tn = (e) => dt(e) && Object.keys(e).length === 0, we = (e) => Array.isArray(e), _l = (e) => typeof e == "string", Pl = (e) => typeof e == "number" && !isNaN(e), vl = (e) => typeof e == "boolean", wl = (e) => e instanceof RegExp, ft = (e) => e instanceof Map, ht = (e) => e instanceof Set, nr = (e) => Tl(e) === "Symbol", bl = (e) => e instanceof Date && !isNaN(e.valueOf()), Il = (e) => e instanceof Error, ss = (e) => typeof e == "number" && isNaN(e), Ll = (e) => vl(e) || Sl(e) || tr(e) || Pl(e) || _l(e) || nr(e), Cl = (e) => typeof e == "bigint", Nl = (e) => e === 1 / 0 || e === -1 / 0, kl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Ol = (e) => e instanceof URL, sr = (e) => e.replace(/\./g, "\\."), dn = (e) => e.map(String).map(sr).join("."), ot = (e) => {
|
|
3380
3389
|
const t = [];
|
|
3381
3390
|
let n = "";
|
|
3382
3391
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -3405,7 +3414,7 @@ function fe(e, t, n, s) {
|
|
|
3405
3414
|
var rr = [
|
|
3406
3415
|
fe(tr, "undefined", () => null, () => {
|
|
3407
3416
|
}),
|
|
3408
|
-
fe(
|
|
3417
|
+
fe(Cl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
3409
3418
|
fe(bl, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
3410
3419
|
fe(Il, "Error", (e, t) => {
|
|
3411
3420
|
const n = {
|
|
@@ -3434,7 +3443,7 @@ var rr = [
|
|
|
3434
3443
|
(e) => new Set(e)
|
|
3435
3444
|
),
|
|
3436
3445
|
fe(ft, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
3437
|
-
fe((e) => ss(e) ||
|
|
3446
|
+
fe((e) => ss(e) || Nl(e), "number", (e) => ss(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
3438
3447
|
fe((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
3439
3448
|
fe(Ol, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
3440
3449
|
];
|
|
@@ -3488,8 +3497,8 @@ var lr = en(or, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
3488
3497
|
if (!s)
|
|
3489
3498
|
throw new Error("Trying to deserialize unknown custom value");
|
|
3490
3499
|
return s.deserialize(e);
|
|
3491
|
-
}),
|
|
3492
|
-
const n = ns(
|
|
3500
|
+
}), xl = [lr, ar, cr, ir], rs = (e, t) => {
|
|
3501
|
+
const n = ns(xl, (r) => r.isApplicable(e, t));
|
|
3493
3502
|
if (n)
|
|
3494
3503
|
return {
|
|
3495
3504
|
value: n.transform(e, t),
|
|
@@ -3505,7 +3514,7 @@ var lr = en(or, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
3505
3514
|
rr.forEach((e) => {
|
|
3506
3515
|
ur[e.annotation] = e;
|
|
3507
3516
|
});
|
|
3508
|
-
var
|
|
3517
|
+
var Gl = (e, t, n) => {
|
|
3509
3518
|
if (we(t))
|
|
3510
3519
|
switch (t[0]) {
|
|
3511
3520
|
case "symbol":
|
|
@@ -3624,10 +3633,10 @@ function _n(e, t, n = []) {
|
|
|
3624
3633
|
}
|
|
3625
3634
|
function Ul(e, t, n) {
|
|
3626
3635
|
return _n(t, (s, r) => {
|
|
3627
|
-
e = Sn(e, r, (a) =>
|
|
3636
|
+
e = Sn(e, r, (a) => Gl(a, s, n));
|
|
3628
3637
|
}), e;
|
|
3629
3638
|
}
|
|
3630
|
-
function
|
|
3639
|
+
function Ml(e, t) {
|
|
3631
3640
|
function n(s, r) {
|
|
3632
3641
|
const a = Rl(e, ot(r));
|
|
3633
3642
|
s.map(ot).forEach((i) => {
|
|
@@ -3643,7 +3652,7 @@ function Bl(e, t) {
|
|
|
3643
3652
|
nt(t, n);
|
|
3644
3653
|
return e;
|
|
3645
3654
|
}
|
|
3646
|
-
var
|
|
3655
|
+
var Bl = (e, t) => dt(e) || we(e) || ft(e) || ht(e) || or(e, t);
|
|
3647
3656
|
function Fl(e, t, n) {
|
|
3648
3657
|
const s = n.get(e);
|
|
3649
3658
|
s ? s.push(t) : n.set(e, [t]);
|
|
@@ -3660,7 +3669,7 @@ function ql(e, t) {
|
|
|
3660
3669
|
}), s ? Tn(n) ? [s] : [s, n] : Tn(n) ? void 0 : n;
|
|
3661
3670
|
}
|
|
3662
3671
|
var fr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
3663
|
-
const o =
|
|
3672
|
+
const o = Ll(e);
|
|
3664
3673
|
if (!o) {
|
|
3665
3674
|
Fl(e, r, t);
|
|
3666
3675
|
const g = i.get(e);
|
|
@@ -3669,7 +3678,7 @@ var fr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3669
3678
|
transformedValue: null
|
|
3670
3679
|
} : g;
|
|
3671
3680
|
}
|
|
3672
|
-
if (!
|
|
3681
|
+
if (!Bl(e, n)) {
|
|
3673
3682
|
const g = rs(e, n), p = g ? {
|
|
3674
3683
|
transformedValue: g.value,
|
|
3675
3684
|
annotations: [g.type]
|
|
@@ -3734,7 +3743,7 @@ function Pn(e, t = {}) {
|
|
|
3734
3743
|
return Vl(r, a, o, e, t.nonenumerable), r;
|
|
3735
3744
|
}, {});
|
|
3736
3745
|
}
|
|
3737
|
-
var
|
|
3746
|
+
var G = class {
|
|
3738
3747
|
/**
|
|
3739
3748
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
3740
3749
|
*/
|
|
@@ -3758,7 +3767,7 @@ var x = class {
|
|
|
3758
3767
|
deserialize(e) {
|
|
3759
3768
|
const { json: t, meta: n } = e;
|
|
3760
3769
|
let s = Pn(t);
|
|
3761
|
-
return n != null && n.values && (s = Ul(s, n.values, this)), n != null && n.referentialEqualities && (s =
|
|
3770
|
+
return n != null && n.values && (s = Ul(s, n.values, this)), n != null && n.referentialEqualities && (s = Ml(s, n.referentialEqualities)), s;
|
|
3762
3771
|
}
|
|
3763
3772
|
stringify(e) {
|
|
3764
3773
|
return JSON.stringify(this.serialize(e));
|
|
@@ -3782,16 +3791,16 @@ var x = class {
|
|
|
3782
3791
|
this.allowedErrorProps.push(...e);
|
|
3783
3792
|
}
|
|
3784
3793
|
};
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
var Hl =
|
|
3794
|
+
G.defaultInstance = new G();
|
|
3795
|
+
G.serialize = G.defaultInstance.serialize.bind(G.defaultInstance);
|
|
3796
|
+
G.deserialize = G.defaultInstance.deserialize.bind(G.defaultInstance);
|
|
3797
|
+
G.stringify = G.defaultInstance.stringify.bind(G.defaultInstance);
|
|
3798
|
+
G.parse = G.defaultInstance.parse.bind(G.defaultInstance);
|
|
3799
|
+
G.registerClass = G.defaultInstance.registerClass.bind(G.defaultInstance);
|
|
3800
|
+
G.registerSymbol = G.defaultInstance.registerSymbol.bind(G.defaultInstance);
|
|
3801
|
+
G.registerCustom = G.defaultInstance.registerCustom.bind(G.defaultInstance);
|
|
3802
|
+
G.allowErrorProps = G.defaultInstance.allowErrorProps.bind(G.defaultInstance);
|
|
3803
|
+
var Hl = G.serialize, fu = G.stringify;
|
|
3795
3804
|
function hu(e) {
|
|
3796
3805
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
3797
3806
|
}
|
|
@@ -3823,8 +3832,8 @@ var yu = (e, t = !1) => {
|
|
|
3823
3832
|
status: $l,
|
|
3824
3833
|
"query hash": Ql,
|
|
3825
3834
|
"last updated": gr
|
|
3826
|
-
}, Dt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, mr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1,
|
|
3827
|
-
status:
|
|
3835
|
+
}, Dt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, mr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, zl = (e, t) => Dt(e) === Dt(t) ? mr(e, t) : Dt(e) > Dt(t) ? 1 : -1, Tu = {
|
|
3836
|
+
status: zl,
|
|
3828
3837
|
"last updated": mr
|
|
3829
3838
|
}, Su = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), _u = () => {
|
|
3830
3839
|
const [e, t] = q("dark");
|
|
@@ -3836,7 +3845,7 @@ var yu = (e, t = !1) => {
|
|
|
3836
3845
|
};
|
|
3837
3846
|
n.addEventListener("change", s), lt(() => n.removeEventListener("change", s));
|
|
3838
3847
|
}), e;
|
|
3839
|
-
},
|
|
3848
|
+
}, xt = (e, t, n) => {
|
|
3840
3849
|
if (t.length === 0)
|
|
3841
3850
|
return n;
|
|
3842
3851
|
if (e instanceof Map) {
|
|
@@ -3844,10 +3853,10 @@ var yu = (e, t = !1) => {
|
|
|
3844
3853
|
if (t.length === 1)
|
|
3845
3854
|
return s.set(t[0], n), s;
|
|
3846
3855
|
const [r, ...a] = t;
|
|
3847
|
-
return s.set(r,
|
|
3856
|
+
return s.set(r, xt(s.get(r), a, n)), s;
|
|
3848
3857
|
}
|
|
3849
3858
|
if (e instanceof Set) {
|
|
3850
|
-
const s =
|
|
3859
|
+
const s = xt(Array.from(e), t, n);
|
|
3851
3860
|
return new Set(s);
|
|
3852
3861
|
}
|
|
3853
3862
|
if (Array.isArray(e)) {
|
|
@@ -3855,7 +3864,7 @@ var yu = (e, t = !1) => {
|
|
|
3855
3864
|
if (t.length === 1)
|
|
3856
3865
|
return s[t[0]] = n, s;
|
|
3857
3866
|
const [r, ...a] = t;
|
|
3858
|
-
return s[r] =
|
|
3867
|
+
return s[r] = xt(s[r], a, n), s;
|
|
3859
3868
|
}
|
|
3860
3869
|
if (e instanceof Object) {
|
|
3861
3870
|
const s = {
|
|
@@ -3864,19 +3873,19 @@ var yu = (e, t = !1) => {
|
|
|
3864
3873
|
if (t.length === 1)
|
|
3865
3874
|
return s[t[0]] = n, s;
|
|
3866
3875
|
const [r, ...a] = t;
|
|
3867
|
-
return s[r] =
|
|
3876
|
+
return s[r] = xt(s[r], a, n), s;
|
|
3868
3877
|
}
|
|
3869
3878
|
return e;
|
|
3870
|
-
},
|
|
3879
|
+
}, Gt = (e, t) => {
|
|
3871
3880
|
if (e instanceof Map) {
|
|
3872
3881
|
const n = new Map(e);
|
|
3873
3882
|
if (t.length === 1)
|
|
3874
3883
|
return n.delete(t[0]), n;
|
|
3875
3884
|
const [s, ...r] = t;
|
|
3876
|
-
return n.set(s,
|
|
3885
|
+
return n.set(s, Gt(n.get(s), r)), n;
|
|
3877
3886
|
}
|
|
3878
3887
|
if (e instanceof Set) {
|
|
3879
|
-
const n =
|
|
3888
|
+
const n = Gt(Array.from(e), t);
|
|
3880
3889
|
return new Set(n);
|
|
3881
3890
|
}
|
|
3882
3891
|
if (Array.isArray(e)) {
|
|
@@ -3884,7 +3893,7 @@ var yu = (e, t = !1) => {
|
|
|
3884
3893
|
if (t.length === 1)
|
|
3885
3894
|
return n.filter((a, i) => i.toString() !== t[0]);
|
|
3886
3895
|
const [s, ...r] = t;
|
|
3887
|
-
return n[s] =
|
|
3896
|
+
return n[s] = Gt(n[s], r), n;
|
|
3888
3897
|
}
|
|
3889
3898
|
if (e instanceof Object) {
|
|
3890
3899
|
const n = {
|
|
@@ -3893,20 +3902,20 @@ var yu = (e, t = !1) => {
|
|
|
3893
3902
|
if (t.length === 1)
|
|
3894
3903
|
return delete n[t[0]], n;
|
|
3895
3904
|
const [s, ...r] = t;
|
|
3896
|
-
return n[s] =
|
|
3905
|
+
return n[s] = Gt(n[s], r), n;
|
|
3897
3906
|
}
|
|
3898
3907
|
return e;
|
|
3899
3908
|
}, Er = (e, t) => {
|
|
3900
3909
|
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
|
|
3901
3910
|
const s = document.createElement("style"), r = document.createTextNode("");
|
|
3902
3911
|
s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
3903
|
-
}, qe, gt, mt, Et,
|
|
3912
|
+
}, qe, gt, mt, Et, Ne, pt, Ke, Ve, He, Qe, $e, yt, ze, At, cs, jl = (cs = class {
|
|
3904
3913
|
constructor(e) {
|
|
3905
3914
|
D(this, qe);
|
|
3906
3915
|
D(this, gt);
|
|
3907
3916
|
D(this, mt);
|
|
3908
3917
|
D(this, Et);
|
|
3909
|
-
D(this,
|
|
3918
|
+
D(this, Ne, !1);
|
|
3910
3919
|
D(this, pt);
|
|
3911
3920
|
D(this, Ke);
|
|
3912
3921
|
D(this, Ve);
|
|
@@ -3914,7 +3923,7 @@ var yu = (e, t = !1) => {
|
|
|
3914
3923
|
D(this, Qe);
|
|
3915
3924
|
D(this, $e);
|
|
3916
3925
|
D(this, yt);
|
|
3917
|
-
D(this,
|
|
3926
|
+
D(this, ze);
|
|
3918
3927
|
D(this, At);
|
|
3919
3928
|
const {
|
|
3920
3929
|
client: t,
|
|
@@ -3947,12 +3956,12 @@ var yu = (e, t = !1) => {
|
|
|
3947
3956
|
_(this, qe)[1](e);
|
|
3948
3957
|
}
|
|
3949
3958
|
mount(e) {
|
|
3950
|
-
if (_(this,
|
|
3959
|
+
if (_(this, Ne))
|
|
3951
3960
|
throw new Error("Devtools is already mounted");
|
|
3952
3961
|
const t = Js(() => {
|
|
3953
3962
|
const n = this, [s] = _(this, Ve), [r] = _(this, He), [a] = _(this, Qe), [i] = _(this, $e), [o] = _(this, yt), [c] = _(this, qe);
|
|
3954
3963
|
let u;
|
|
3955
|
-
return _(this,
|
|
3964
|
+
return _(this, ze) ? u = _(this, ze) : (u = Ws(() => import("./NCMVHL6D-kHUQxG8D.js")), O(this, ze, u)), Er(_(this, pt), _(this, Ke)), zs(u, js({
|
|
3956
3965
|
get queryFlavor() {
|
|
3957
3966
|
return _(n, mt);
|
|
3958
3967
|
},
|
|
@@ -3986,17 +3995,17 @@ var yu = (e, t = !1) => {
|
|
|
3986
3995
|
}
|
|
3987
3996
|
}));
|
|
3988
3997
|
}, e);
|
|
3989
|
-
O(this,
|
|
3998
|
+
O(this, Ne, !0), O(this, At, t);
|
|
3990
3999
|
}
|
|
3991
4000
|
unmount() {
|
|
3992
4001
|
var e;
|
|
3993
|
-
if (!_(this,
|
|
4002
|
+
if (!_(this, Ne))
|
|
3994
4003
|
throw new Error("Devtools is not mounted");
|
|
3995
|
-
(e = _(this, At)) == null || e.call(this), O(this,
|
|
4004
|
+
(e = _(this, At)) == null || e.call(this), O(this, Ne, !1);
|
|
3996
4005
|
}
|
|
3997
|
-
}, qe = new WeakMap(), gt = new WeakMap(), mt = new WeakMap(), Et = new WeakMap(),
|
|
4006
|
+
}, qe = new WeakMap(), gt = new WeakMap(), mt = new WeakMap(), Et = new WeakMap(), Ne = new WeakMap(), pt = new WeakMap(), Ke = new WeakMap(), Ve = new WeakMap(), He = new WeakMap(), Qe = new WeakMap(), $e = new WeakMap(), yt = new WeakMap(), ze = new WeakMap(), At = new WeakMap(), cs), je, Tt, St, _t, ke, Pt, We, Ye, Je, Ze, Xe, vt, et, tt, wt, us, Wl = (us = class {
|
|
3998
4007
|
constructor(e) {
|
|
3999
|
-
D(this,
|
|
4008
|
+
D(this, je);
|
|
4000
4009
|
D(this, Tt);
|
|
4001
4010
|
D(this, St);
|
|
4002
4011
|
D(this, _t);
|
|
@@ -4005,8 +4014,8 @@ var yu = (e, t = !1) => {
|
|
|
4005
4014
|
D(this, We);
|
|
4006
4015
|
D(this, Ye);
|
|
4007
4016
|
D(this, Je);
|
|
4008
|
-
D(this, Xe);
|
|
4009
4017
|
D(this, Ze);
|
|
4018
|
+
D(this, Xe);
|
|
4010
4019
|
D(this, vt);
|
|
4011
4020
|
D(this, et);
|
|
4012
4021
|
D(this, tt);
|
|
@@ -4025,7 +4034,7 @@ var yu = (e, t = !1) => {
|
|
|
4025
4034
|
onClose: f,
|
|
4026
4035
|
hideDisabledQueries: h
|
|
4027
4036
|
} = e;
|
|
4028
|
-
O(this,
|
|
4037
|
+
O(this, je, q(t)), O(this, St, n), O(this, _t, s), O(this, Tt, r), O(this, Pt, u), O(this, We, d), O(this, Ye, q(a)), O(this, Je, q(i)), O(this, Ze, q(o)), O(this, Xe, q(c)), O(this, vt, q(h)), O(this, et, q(f));
|
|
4029
4038
|
}
|
|
4030
4039
|
setButtonPosition(e) {
|
|
4031
4040
|
_(this, Ye)[1](e);
|
|
@@ -4034,13 +4043,13 @@ var yu = (e, t = !1) => {
|
|
|
4034
4043
|
_(this, Je)[1](e);
|
|
4035
4044
|
}
|
|
4036
4045
|
setInitialIsOpen(e) {
|
|
4037
|
-
_(this,
|
|
4046
|
+
_(this, Ze)[1](e);
|
|
4038
4047
|
}
|
|
4039
4048
|
setErrorTypes(e) {
|
|
4040
|
-
_(this,
|
|
4049
|
+
_(this, Xe)[1](e);
|
|
4041
4050
|
}
|
|
4042
4051
|
setClient(e) {
|
|
4043
|
-
_(this,
|
|
4052
|
+
_(this, je)[1](e);
|
|
4044
4053
|
}
|
|
4045
4054
|
setOnClose(e) {
|
|
4046
4055
|
_(this, et)[1](() => e);
|
|
@@ -4049,9 +4058,9 @@ var yu = (e, t = !1) => {
|
|
|
4049
4058
|
if (_(this, ke))
|
|
4050
4059
|
throw new Error("Devtools is already mounted");
|
|
4051
4060
|
const t = Js(() => {
|
|
4052
|
-
const n = this, [s] = _(this, Ye), [r] = _(this, Je), [a] = _(this,
|
|
4061
|
+
const n = this, [s] = _(this, Ye), [r] = _(this, Je), [a] = _(this, Ze), [i] = _(this, Xe), [o] = _(this, vt), [c] = _(this, je), [u] = _(this, et);
|
|
4053
4062
|
let d;
|
|
4054
|
-
return _(this, tt) ? d = _(this, tt) : (d = Ws(() => import("./2AITGKQY-
|
|
4063
|
+
return _(this, tt) ? d = _(this, tt) : (d = Ws(() => import("./2AITGKQY-DI5Po2Nc.js")), O(this, tt, d)), Er(_(this, Pt), _(this, We)), zs(d, js({
|
|
4055
4064
|
get queryFlavor() {
|
|
4056
4065
|
return _(n, St);
|
|
4057
4066
|
},
|
|
@@ -4096,9 +4105,9 @@ var yu = (e, t = !1) => {
|
|
|
4096
4105
|
throw new Error("Devtools is not mounted");
|
|
4097
4106
|
(e = _(this, wt)) == null || e.call(this), O(this, ke, !1);
|
|
4098
4107
|
}
|
|
4099
|
-
},
|
|
4108
|
+
}, je = new WeakMap(), Tt = new WeakMap(), St = new WeakMap(), _t = new WeakMap(), ke = new WeakMap(), Pt = new WeakMap(), We = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Ze = new WeakMap(), Xe = new WeakMap(), vt = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), us);
|
|
4100
4109
|
function Yl(e) {
|
|
4101
|
-
const t = W(e.client), n =
|
|
4110
|
+
const t = W(e.client), n = j.useRef(null), {
|
|
4102
4111
|
buttonPosition: s,
|
|
4103
4112
|
position: r,
|
|
4104
4113
|
initialIsOpen: a,
|
|
@@ -4106,8 +4115,8 @@ function Yl(e) {
|
|
|
4106
4115
|
styleNonce: o,
|
|
4107
4116
|
shadowDOMTarget: c,
|
|
4108
4117
|
hideDisabledQueries: u
|
|
4109
|
-
} = e, [d] =
|
|
4110
|
-
new
|
|
4118
|
+
} = e, [d] = j.useState(
|
|
4119
|
+
new jl({
|
|
4111
4120
|
client: t,
|
|
4112
4121
|
queryFlavor: "React Query",
|
|
4113
4122
|
version: "5",
|
|
@@ -4121,22 +4130,22 @@ function Yl(e) {
|
|
|
4121
4130
|
hideDisabledQueries: u
|
|
4122
4131
|
})
|
|
4123
4132
|
);
|
|
4124
|
-
return
|
|
4133
|
+
return j.useEffect(() => {
|
|
4125
4134
|
d.setClient(t);
|
|
4126
|
-
}, [t, d]),
|
|
4135
|
+
}, [t, d]), j.useEffect(() => {
|
|
4127
4136
|
s && d.setButtonPosition(s);
|
|
4128
|
-
}, [s, d]),
|
|
4137
|
+
}, [s, d]), j.useEffect(() => {
|
|
4129
4138
|
r && d.setPosition(r);
|
|
4130
|
-
}, [r, d]),
|
|
4139
|
+
}, [r, d]), j.useEffect(() => {
|
|
4131
4140
|
d.setInitialIsOpen(a || !1);
|
|
4132
|
-
}, [a, d]),
|
|
4141
|
+
}, [a, d]), j.useEffect(() => {
|
|
4133
4142
|
d.setErrorTypes(i || []);
|
|
4134
|
-
}, [i, d]),
|
|
4143
|
+
}, [i, d]), j.useEffect(() => (n.current && d.mount(n.current), () => {
|
|
4135
4144
|
d.unmount();
|
|
4136
4145
|
}), [d]), /* @__PURE__ */ l("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
|
|
4137
4146
|
}
|
|
4138
4147
|
function Jl(e) {
|
|
4139
|
-
const t = W(e.client), n =
|
|
4148
|
+
const t = W(e.client), n = j.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: a, hideDisabledQueries: i } = e, [o] = j.useState(
|
|
4140
4149
|
new Wl({
|
|
4141
4150
|
client: t,
|
|
4142
4151
|
queryFlavor: "React Query",
|
|
@@ -4152,14 +4161,14 @@ function Jl(e) {
|
|
|
4152
4161
|
hideDisabledQueries: i
|
|
4153
4162
|
})
|
|
4154
4163
|
);
|
|
4155
|
-
return
|
|
4164
|
+
return j.useEffect(() => {
|
|
4156
4165
|
o.setClient(t);
|
|
4157
|
-
}, [t, o]),
|
|
4166
|
+
}, [t, o]), j.useEffect(() => {
|
|
4158
4167
|
o.setOnClose(e.onClose ?? (() => {
|
|
4159
4168
|
}));
|
|
4160
|
-
}, [e.onClose, o]),
|
|
4169
|
+
}, [e.onClose, o]), j.useEffect(() => {
|
|
4161
4170
|
o.setErrorTypes(s || []);
|
|
4162
|
-
}, [s, o]),
|
|
4171
|
+
}, [s, o]), j.useEffect(() => (n.current && o.mount(n.current), () => {
|
|
4163
4172
|
o.unmount();
|
|
4164
4173
|
}), [o]), /* @__PURE__ */ l(
|
|
4165
4174
|
"div",
|
|
@@ -4174,7 +4183,7 @@ var is = process.env.NODE_ENV !== "development" ? function() {
|
|
|
4174
4183
|
return null;
|
|
4175
4184
|
} : Yl;
|
|
4176
4185
|
process.env.NODE_ENV;
|
|
4177
|
-
const
|
|
4186
|
+
const Zl = Ee(""), Xl = () => {
|
|
4178
4187
|
tn("dynamic-page-selector", {
|
|
4179
4188
|
description: "Dynamic page selector"
|
|
4180
4189
|
}), tn("enable-add-page-dropdown", {
|
|
@@ -4183,15 +4192,15 @@ const Xl = Ee(""), Zl = () => {
|
|
|
4183
4192
|
description: "Enable AI chat panel"
|
|
4184
4193
|
});
|
|
4185
4194
|
}, ec = () => {
|
|
4186
|
-
const e =
|
|
4195
|
+
const e = N(), t = L();
|
|
4187
4196
|
return ae({
|
|
4188
4197
|
queryKey: [E.GET_COLLECTIONS],
|
|
4189
4198
|
staleTime: 1 / 0,
|
|
4190
4199
|
queryFn: async () => t(e, { action: E.GET_COLLECTIONS })
|
|
4191
4200
|
});
|
|
4192
4201
|
}, tc = () => {
|
|
4193
|
-
const { data: e } = ie(), { data: t } = be(), { data: n } = Re(), s =
|
|
4194
|
-
return
|
|
4202
|
+
const { data: e } = ie(), { data: t } = be(), { data: n } = Re(), s = N(), r = L(), a = Q(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]);
|
|
4203
|
+
return Z({
|
|
4195
4204
|
mutationFn: async ({ block: i }) => r(s, {
|
|
4196
4205
|
action: E.GET_BLOCK_ASYNC_PROPS,
|
|
4197
4206
|
data: {
|
|
@@ -4215,7 +4224,7 @@ const Xl = Ee(""), Zl = () => {
|
|
|
4215
4224
|
});
|
|
4216
4225
|
}, nc = () => {
|
|
4217
4226
|
const [, e] = le();
|
|
4218
|
-
return
|
|
4227
|
+
return z(
|
|
4219
4228
|
(t, n) => {
|
|
4220
4229
|
const r = new URLSearchParams(window.location.search).get("lang"), a = new URLSearchParams({ page: t });
|
|
4221
4230
|
r && a.set("lang", r), window.history.pushState({}, "", `?${a.toString()}`), e(a), window.dispatchEvent(new PopStateEvent("popstate")), n == null || n();
|
|
@@ -4224,28 +4233,28 @@ const Xl = Ee(""), Zl = () => {
|
|
|
4224
4233
|
);
|
|
4225
4234
|
}, sc = () => {
|
|
4226
4235
|
const e = nc();
|
|
4227
|
-
return
|
|
4236
|
+
return z(
|
|
4228
4237
|
({ pageId: t }) => {
|
|
4229
4238
|
e(t);
|
|
4230
4239
|
},
|
|
4231
4240
|
[e]
|
|
4232
4241
|
);
|
|
4233
|
-
}, rc = F(() => import("./digital-asset-manager-
|
|
4234
|
-
|
|
4235
|
-
|
|
4242
|
+
}, rc = F(() => import("./digital-asset-manager-INrgGoC0.js")), ac = F(() => import("./save-to-lib-NvQZll63.js")), ic = F(() => import("./theme-panel-footer-BJB36k8A.js")), oc = F(() => import("./web-preview-CCGkTRU3.js"));
|
|
4243
|
+
Xl();
|
|
4244
|
+
Za();
|
|
4236
4245
|
Jr(to);
|
|
4237
4246
|
wo();
|
|
4238
|
-
|
|
4239
|
-
|
|
4247
|
+
Zr(rc);
|
|
4248
|
+
Xr(ac);
|
|
4240
4249
|
const lc = {
|
|
4241
4250
|
role: "",
|
|
4242
4251
|
permissions: null
|
|
4243
4252
|
}, os = (e) => {
|
|
4244
4253
|
const { data: t } = lo();
|
|
4245
4254
|
gi();
|
|
4246
|
-
const n = Dn(), { data: s = lc, isFetching: r } = co(), { data: a, isFetching: i } =
|
|
4255
|
+
const n = Dn(), { data: s = lc, isFetching: r } = co(), { data: a, isFetching: i } = Le(), { data: o, isFetching: c } = ec(), { data: u, isFetching: d } = Re(), f = r || i || c || d, [h] = le(), g = h.get("page"), { data: p } = ie(), { data: S, isFetching: P } = ao(), { blocks: T } = ro(S), { lockingStatus: y, pageLock: A } = Ie(), { data: b, isFetching: B } = io(), k = no(), { onSave: pe } = uo(), { mutateAsync: ye } = tc(), { getPartialBlocks: M, getPartialBlockBlocks: w } = fo(), { mutateAsync: I } = Ni(), { mutateAsync: Y } = oo(), $ = sc(), [de, bt] = K(!1), Ae = at([]), Me = Q(() => V(u, "theme", {}) || {}, [u]), Ce = he(y) && (A == null ? void 0 : A.status) === "editing", pr = (A == null ? void 0 : A.status) === "checking", Rn = P || pr || B;
|
|
4247
4256
|
Ae.current = T;
|
|
4248
|
-
const [yr] = te(
|
|
4257
|
+
const [yr] = te(Zl);
|
|
4249
4258
|
se(() => {
|
|
4250
4259
|
const ne = () => {
|
|
4251
4260
|
document.hidden ? bt(!0) : bt(!1);
|
|
@@ -4255,12 +4264,12 @@ const lc = {
|
|
|
4255
4264
|
const Ar = Q(() => {
|
|
4256
4265
|
const ne = {};
|
|
4257
4266
|
return s && (ne.permissions = V(s, "permissions", null), ne.role = V(s, "role", "user")), ne;
|
|
4258
|
-
}, [s]), Tr = Q(() => t == null ? void 0 : t.some((ne) => ne.isSiteLibrary), [t]), Sr =
|
|
4267
|
+
}, [s]), Tr = Q(() => t == null ? void 0 : t.some((ne) => ne.isSiteLibrary), [t]), Sr = z(
|
|
4259
4268
|
async (ne, It) => await I({ pageType: ne, query: It }),
|
|
4260
4269
|
[I]
|
|
4261
4270
|
);
|
|
4262
4271
|
return /* @__PURE__ */ m(ge, { children: [
|
|
4263
|
-
Rn && /* @__PURE__ */ l(
|
|
4272
|
+
Rn && /* @__PURE__ */ l(Cs, { className: f ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ l(Ft, { className: `animate-spin text-primary ${f ? "h-6 w-6" : "h-5 w-5"}` }) }),
|
|
4264
4273
|
yr && /* @__PURE__ */ l(
|
|
4265
4274
|
H,
|
|
4266
4275
|
{
|
|
@@ -4285,13 +4294,13 @@ const lc = {
|
|
|
4285
4294
|
translations: e.translations || {},
|
|
4286
4295
|
locale: e.locale || "en",
|
|
4287
4296
|
htmlDir: e.htmlDir || "ltr",
|
|
4288
|
-
autoSave: !de &&
|
|
4297
|
+
autoSave: !de && Ce && (e.autoSave ?? !0),
|
|
4289
4298
|
autoSaveInterval: e.autoSaveInterval ?? 15,
|
|
4290
4299
|
onError: e.onError || console.error,
|
|
4291
4300
|
getPartialBlockBlocks: w,
|
|
4292
|
-
getPartialBlocks:
|
|
4301
|
+
getPartialBlocks: M,
|
|
4293
4302
|
blocks: P ? [] : T,
|
|
4294
|
-
theme:
|
|
4303
|
+
theme: Mr(Me),
|
|
4295
4304
|
pageTypes: a,
|
|
4296
4305
|
searchPageTypeItems: Sr,
|
|
4297
4306
|
askAiCallBack: k,
|
|
@@ -4299,7 +4308,7 @@ const lc = {
|
|
|
4299
4308
|
if (!g) return !0;
|
|
4300
4309
|
Ae.current = ne;
|
|
4301
4310
|
const Un = [...ne];
|
|
4302
|
-
return await pe({ page: g, blocks: Un, needTranslations: _r }), Ae.current = Un,
|
|
4311
|
+
return await pe({ page: g, blocks: Un, needTranslations: _r }), Ae.current = Un, Br(It, Me) || await Y({ settings: { theme: It } }), !0;
|
|
4303
4312
|
},
|
|
4304
4313
|
themePanelComponent: ic,
|
|
4305
4314
|
...Ar
|
|
@@ -4319,7 +4328,7 @@ const lc = {
|
|
|
4319
4328
|
}
|
|
4320
4329
|
}
|
|
4321
4330
|
}), Pu = (e) => {
|
|
4322
|
-
const [, t] =
|
|
4331
|
+
const [, t] = Ln(), [n, s] = K(!1);
|
|
4323
4332
|
return se(() => (t(
|
|
4324
4333
|
vn(e, [
|
|
4325
4334
|
"apiUrl",
|
|
@@ -4346,11 +4355,11 @@ const lc = {
|
|
|
4346
4355
|
/* @__PURE__ */ l(os, { ...e }),
|
|
4347
4356
|
/* @__PURE__ */ l(is, {})
|
|
4348
4357
|
] }) : /* @__PURE__ */ l("div", {});
|
|
4349
|
-
}, uc =
|
|
4358
|
+
}, uc = j.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
|
|
4350
4359
|
function dc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
4351
|
-
const [r, a] =
|
|
4360
|
+
const [r, a] = j.useState(!1);
|
|
4352
4361
|
return /* @__PURE__ */ m(ya, { open: r, onOpenChange: a, children: [
|
|
4353
|
-
/* @__PURE__ */ m(
|
|
4362
|
+
/* @__PURE__ */ m(jt, { children: [
|
|
4354
4363
|
/* @__PURE__ */ l(Wt, { asChild: !0, children: /* @__PURE__ */ l(Aa, { asChild: !0, children: /* @__PURE__ */ l(
|
|
4355
4364
|
U,
|
|
4356
4365
|
{
|
|
@@ -4374,7 +4383,7 @@ function dc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4374
4383
|
) }) }),
|
|
4375
4384
|
/* @__PURE__ */ l(Yt, { children: "Add field" })
|
|
4376
4385
|
] }),
|
|
4377
|
-
r && /* @__PURE__ */ l(
|
|
4386
|
+
r && /* @__PURE__ */ l(j.Suspense, { children: /* @__PURE__ */ l(
|
|
4378
4387
|
uc,
|
|
4379
4388
|
{
|
|
4380
4389
|
data: e,
|
|
@@ -4387,18 +4396,18 @@ function dc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4387
4396
|
] });
|
|
4388
4397
|
}
|
|
4389
4398
|
const vu = () => {
|
|
4390
|
-
const { savePageAsync: e } =
|
|
4391
|
-
return
|
|
4399
|
+
const { savePageAsync: e } = xe(), t = W();
|
|
4400
|
+
return z(async () => {
|
|
4392
4401
|
await e(), t.invalidateQueries({ queryKey: [E.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [E.GET_BUILDER_PAGE_DATA] });
|
|
4393
4402
|
}, [e, t]);
|
|
4394
4403
|
}, wu = () => {
|
|
4395
4404
|
const e = W();
|
|
4396
|
-
return
|
|
4405
|
+
return z(() => {
|
|
4397
4406
|
e.clear();
|
|
4398
4407
|
}, [e]);
|
|
4399
4408
|
}, bu = () => {
|
|
4400
|
-
const e =
|
|
4401
|
-
return
|
|
4409
|
+
const e = N(), t = L(), { data: n } = be(), s = W();
|
|
4410
|
+
return Z({
|
|
4402
4411
|
mutationFn: async (r) => {
|
|
4403
4412
|
if (!(n != null && n.id))
|
|
4404
4413
|
throw new Error("No active page found");
|
|
@@ -4421,7 +4430,7 @@ const vu = () => {
|
|
|
4421
4430
|
console.error("Failed to update metadata");
|
|
4422
4431
|
}
|
|
4423
4432
|
});
|
|
4424
|
-
}, fc = F(() => import("./digital-asset-manager-
|
|
4433
|
+
}, fc = F(() => import("./digital-asset-manager-INrgGoC0.js")), Iu = ({
|
|
4425
4434
|
assetId: e,
|
|
4426
4435
|
assetUrl: t,
|
|
4427
4436
|
onChange: n,
|
|
@@ -4460,7 +4469,7 @@ const vu = () => {
|
|
|
4460
4469
|
className: "h-8 w-8 rounded-full bg-white text-red-500",
|
|
4461
4470
|
onClick: h,
|
|
4462
4471
|
disabled: a,
|
|
4463
|
-
children: g ? /* @__PURE__ */ l(
|
|
4472
|
+
children: g ? /* @__PURE__ */ l(jn, { className: "h-4 w-4" }) : /* @__PURE__ */ l(Ha, { className: "h-4 w-4" })
|
|
4464
4473
|
}
|
|
4465
4474
|
),
|
|
4466
4475
|
!g && /* @__PURE__ */ l(
|
|
@@ -4498,7 +4507,7 @@ const vu = () => {
|
|
|
4498
4507
|
size: "icon",
|
|
4499
4508
|
className: "absolute right-4 top-2",
|
|
4500
4509
|
onClick: d,
|
|
4501
|
-
children: /* @__PURE__ */ l(
|
|
4510
|
+
children: /* @__PURE__ */ l(jn, { className: "h-4 w-4" })
|
|
4502
4511
|
}
|
|
4503
4512
|
)
|
|
4504
4513
|
] }),
|
|
@@ -4648,7 +4657,7 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4648
4657
|
n = n.replace(r[0], i);
|
|
4649
4658
|
}
|
|
4650
4659
|
return n;
|
|
4651
|
-
}, Ac = F(() => import("./shared-json-ld-
|
|
4660
|
+
}, Ac = F(() => import("./shared-json-ld-BVqIgANo.js")), Lu = ({
|
|
4652
4661
|
value: e,
|
|
4653
4662
|
onChange: t,
|
|
4654
4663
|
disabled: n = !1,
|
|
@@ -4661,31 +4670,31 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4661
4670
|
hasJsonLdForSelectedLang: u,
|
|
4662
4671
|
copyJsonLDFromDefaultPage: d
|
|
4663
4672
|
}) => {
|
|
4664
|
-
const [f, h] = K("edit"), [g, p] = K(null), [S, P] = K(""), T = at(null), [y] =
|
|
4673
|
+
const [f, h] = K("edit"), [g, p] = K(null), [S, P] = K(""), T = at(null), [y] = Ln(), A = i === "jsonLD" && V(y, "features.sharedJsonLD", !1), b = i === "jsonLD" && !u && !!d;
|
|
4665
4674
|
se(() => {
|
|
4666
4675
|
e.trim() === "" && t("{}");
|
|
4667
4676
|
}, [e, t]);
|
|
4668
|
-
const
|
|
4677
|
+
const B = (M) => {
|
|
4669
4678
|
if (s) return;
|
|
4670
|
-
const w =
|
|
4679
|
+
const w = M.target.value;
|
|
4671
4680
|
t(w);
|
|
4672
|
-
}, k = (
|
|
4673
|
-
if (
|
|
4674
|
-
|
|
4675
|
-
const w =
|
|
4681
|
+
}, k = (M) => {
|
|
4682
|
+
if (M.key === "Tab") {
|
|
4683
|
+
M.preventDefault();
|
|
4684
|
+
const w = M.currentTarget, I = w.selectionStart, Y = w.selectionEnd;
|
|
4676
4685
|
if (I !== Y) {
|
|
4677
4686
|
const de = e.substring(I, Y).split(`
|
|
4678
4687
|
`);
|
|
4679
|
-
if (
|
|
4680
|
-
const Ae = de.map((
|
|
4681
|
-
`),
|
|
4682
|
-
t(
|
|
4688
|
+
if (M.shiftKey) {
|
|
4689
|
+
const Ae = de.map((Ce) => Ce.startsWith(" ") ? Ce.substring(2) : Ce).join(`
|
|
4690
|
+
`), Me = e.substring(0, I) + Ae + e.substring(Y);
|
|
4691
|
+
t(Me), setTimeout(() => {
|
|
4683
4692
|
w.selectionStart = I, w.selectionEnd = I + Ae.length;
|
|
4684
4693
|
}, 0);
|
|
4685
4694
|
} else {
|
|
4686
|
-
const Ae = de.map((
|
|
4687
|
-
`),
|
|
4688
|
-
t(
|
|
4695
|
+
const Ae = de.map((Ce) => ` ${Ce}`).join(`
|
|
4696
|
+
`), Me = e.substring(0, I) + Ae + e.substring(Y);
|
|
4697
|
+
t(Me), setTimeout(() => {
|
|
4689
4698
|
w.selectionStart = I, w.selectionEnd = I + Ae.length;
|
|
4690
4699
|
}, 0);
|
|
4691
4700
|
}
|
|
@@ -4698,20 +4707,20 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4698
4707
|
}
|
|
4699
4708
|
};
|
|
4700
4709
|
se(() => {
|
|
4701
|
-
const
|
|
4702
|
-
if (
|
|
4703
|
-
if (p(null),
|
|
4704
|
-
const w = yc(
|
|
4710
|
+
const M = ls(e);
|
|
4711
|
+
if (M.isValid)
|
|
4712
|
+
if (p(null), M.parsed) {
|
|
4713
|
+
const w = yc(M.parsed, o);
|
|
4705
4714
|
P(w);
|
|
4706
4715
|
} else
|
|
4707
4716
|
P("");
|
|
4708
4717
|
else
|
|
4709
|
-
p(
|
|
4718
|
+
p(M.error), P("");
|
|
4710
4719
|
}, [e, o]);
|
|
4711
4720
|
const pe = () => {
|
|
4712
|
-
const
|
|
4713
|
-
if (
|
|
4714
|
-
const w = pc(
|
|
4721
|
+
const M = ls(e);
|
|
4722
|
+
if (M.isValid && M.parsed) {
|
|
4723
|
+
const w = pc(M.parsed, M.placeholders);
|
|
4715
4724
|
t(w);
|
|
4716
4725
|
}
|
|
4717
4726
|
}, ye = () => {
|
|
@@ -4743,7 +4752,7 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4743
4752
|
className: "flex items-center gap-1",
|
|
4744
4753
|
disabled: !e.trim() || g !== null,
|
|
4745
4754
|
children: [
|
|
4746
|
-
/* @__PURE__ */ l(
|
|
4755
|
+
/* @__PURE__ */ l(za, { className: "h-4 w-4" }),
|
|
4747
4756
|
/* @__PURE__ */ l("span", { children: "Shared" })
|
|
4748
4757
|
]
|
|
4749
4758
|
}
|
|
@@ -4754,12 +4763,12 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4754
4763
|
{
|
|
4755
4764
|
dataType: "value",
|
|
4756
4765
|
data: o ?? {},
|
|
4757
|
-
onSelect: (
|
|
4766
|
+
onSelect: (M) => c && c(M, i)
|
|
4758
4767
|
}
|
|
4759
4768
|
) })
|
|
4760
4769
|
] }),
|
|
4761
4770
|
/* @__PURE__ */ m(sn, { value: "edit", className: "relative mt-0", children: [
|
|
4762
|
-
!b && f === "edit" && /* @__PURE__ */ l(
|
|
4771
|
+
!b && f === "edit" && /* @__PURE__ */ l(xn, { content: "Format JSON", side: "right", showTooltip: !n && !g, children: /* @__PURE__ */ l(
|
|
4763
4772
|
U,
|
|
4764
4773
|
{
|
|
4765
4774
|
type: "button",
|
|
@@ -4768,7 +4777,7 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4768
4777
|
onClick: pe,
|
|
4769
4778
|
className: "absolute right-1 top-1 h-6 w-6 p-1",
|
|
4770
4779
|
disabled: !e.trim() || n || g !== null,
|
|
4771
|
-
children: /* @__PURE__ */ l(
|
|
4780
|
+
children: /* @__PURE__ */ l(ja, {})
|
|
4772
4781
|
}
|
|
4773
4782
|
) }),
|
|
4774
4783
|
b ? /* @__PURE__ */ l("div", { className: "flex h-40 items-center justify-center rounded-md bg-black/20", children: /* @__PURE__ */ m("div", { className: "flex max-w-[400px] flex-col items-center gap-2 rounded-md bg-white p-4 shadow-lg", children: [
|
|
@@ -4784,7 +4793,7 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4784
4793
|
id: i,
|
|
4785
4794
|
name: i,
|
|
4786
4795
|
className: `rounded-md border border-input text-xs ${g ? "border-red-500" : ""}`,
|
|
4787
|
-
onChange:
|
|
4796
|
+
onChange: B,
|
|
4788
4797
|
onKeyDown: k,
|
|
4789
4798
|
value: e,
|
|
4790
4799
|
placeholder: r,
|
|
@@ -4830,17 +4839,17 @@ if (typeof window > "u")
|
|
|
4830
4839
|
export {
|
|
4831
4840
|
yu as $,
|
|
4832
4841
|
E as A,
|
|
4833
|
-
|
|
4842
|
+
Cs as B,
|
|
4834
4843
|
Fs as C,
|
|
4835
|
-
|
|
4844
|
+
js as D,
|
|
4836
4845
|
Ko as E,
|
|
4837
|
-
|
|
4846
|
+
Xc as F,
|
|
4838
4847
|
eu as G,
|
|
4839
4848
|
De as H,
|
|
4840
4849
|
pn as I,
|
|
4841
4850
|
tu as J,
|
|
4842
4851
|
Yc as K,
|
|
4843
|
-
|
|
4852
|
+
Nt as L,
|
|
4844
4853
|
ou as M,
|
|
4845
4854
|
lt as N,
|
|
4846
4855
|
du as O,
|
|
@@ -4848,7 +4857,7 @@ export {
|
|
|
4848
4857
|
lu as Q,
|
|
4849
4858
|
ko as R,
|
|
4850
4859
|
ru as S,
|
|
4851
|
-
|
|
4860
|
+
xn as T,
|
|
4852
4861
|
ll as U,
|
|
4853
4862
|
yn as V,
|
|
4854
4863
|
sl as W,
|
|
@@ -4860,23 +4869,23 @@ export {
|
|
|
4860
4869
|
nu as a0,
|
|
4861
4870
|
Wc as a1,
|
|
4862
4871
|
cu as a2,
|
|
4863
|
-
|
|
4864
|
-
|
|
4872
|
+
X as a3,
|
|
4873
|
+
Lo as a4,
|
|
4865
4874
|
Hl as a5,
|
|
4866
4875
|
su as a6,
|
|
4867
|
-
|
|
4876
|
+
xt as a7,
|
|
4868
4877
|
Su as a8,
|
|
4869
4878
|
gu as a9,
|
|
4870
4879
|
Hc as aA,
|
|
4871
|
-
|
|
4872
|
-
|
|
4880
|
+
zc as aB,
|
|
4881
|
+
jc as aC,
|
|
4873
4882
|
Qc as aD,
|
|
4874
4883
|
Vi as aE,
|
|
4875
|
-
|
|
4884
|
+
Gc as aF,
|
|
4876
4885
|
ws as aG,
|
|
4877
4886
|
io as aH,
|
|
4878
|
-
|
|
4879
|
-
|
|
4887
|
+
Ci as aI,
|
|
4888
|
+
Ln as aJ,
|
|
4880
4889
|
dc as aK,
|
|
4881
4890
|
Iu as aL,
|
|
4882
4891
|
Oc as aM,
|
|
@@ -4897,46 +4906,46 @@ export {
|
|
|
4897
4906
|
fu as ae,
|
|
4898
4907
|
iu as af,
|
|
4899
4908
|
au as ag,
|
|
4900
|
-
|
|
4901
|
-
|
|
4909
|
+
Gt as ah,
|
|
4910
|
+
Zc as ai,
|
|
4902
4911
|
Pi as aj,
|
|
4903
4912
|
ui as ak,
|
|
4904
4913
|
mi as al,
|
|
4905
|
-
|
|
4906
|
-
|
|
4914
|
+
N as am,
|
|
4915
|
+
L as an,
|
|
4907
4916
|
nc as ao,
|
|
4908
4917
|
Kc as ap,
|
|
4909
4918
|
On as aq,
|
|
4910
4919
|
ie as ar,
|
|
4911
4920
|
an as as,
|
|
4912
4921
|
ce as at,
|
|
4913
|
-
|
|
4914
|
-
|
|
4922
|
+
Nn as au,
|
|
4923
|
+
xc as av,
|
|
4915
4924
|
Vc as aw,
|
|
4916
4925
|
$c as ax,
|
|
4917
|
-
|
|
4926
|
+
Lu as ay,
|
|
4918
4927
|
ls as az,
|
|
4919
4928
|
bs as b,
|
|
4920
4929
|
Rc as c,
|
|
4921
4930
|
Uc as d,
|
|
4922
4931
|
Re as e,
|
|
4923
4932
|
Dn as f,
|
|
4924
|
-
|
|
4925
|
-
|
|
4933
|
+
Ge as g,
|
|
4934
|
+
Le as h,
|
|
4926
4935
|
le as i,
|
|
4927
4936
|
Ps as j,
|
|
4928
4937
|
ai as k,
|
|
4929
|
-
|
|
4930
|
-
|
|
4938
|
+
Bc as l,
|
|
4939
|
+
Mc as m,
|
|
4931
4940
|
Fc as n,
|
|
4932
4941
|
qc as o,
|
|
4933
|
-
|
|
4942
|
+
Zl as p,
|
|
4934
4943
|
Dc as q,
|
|
4935
4944
|
_u as r,
|
|
4936
4945
|
J as s,
|
|
4937
4946
|
on as t,
|
|
4938
|
-
|
|
4939
|
-
|
|
4947
|
+
Ls as u,
|
|
4948
|
+
zs as v,
|
|
4940
4949
|
Au as w,
|
|
4941
4950
|
Tu as x,
|
|
4942
4951
|
q as y,
|