@chaibuilder/pages 0.16.17 → 0.16.19
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-DhZ3CIAd.cjs → 2AITGKQY-BH_4lP5P.cjs} +1 -1
- package/dist/{2AITGKQY-BS9f-jSI.js → 2AITGKQY-BuWtti7-.js} +2 -2
- package/dist/{NCMVHL6D-tLp-yfh7.cjs → NCMVHL6D-CfRPe-3L.cjs} +1 -1
- package/dist/{NCMVHL6D-Bhn1i9Td.js → NCMVHL6D-DbC9VYfW.js} +2 -2
- package/dist/{ZDWCUMSJ-DnUbZaON.cjs → ZDWCUMSJ-BxhCnC2U.cjs} +1 -1
- package/dist/{ZDWCUMSJ-Cyfoak0s.js → ZDWCUMSJ-CE0Md3aC.js} +1 -1
- package/dist/{active-in-another-tab-CE6mPlAF.js → active-in-another-tab-C4o8FQXv.js} +1 -1
- package/dist/{active-in-another-tab-DPmHAOnz.cjs → active-in-another-tab-SSCyhy2-.cjs} +1 -1
- package/dist/{add-new-language-page-CfjQxseQ.js → add-new-language-page-BCu4Npk2.js} +2 -2
- package/dist/{add-new-language-page-C_cqrchc.cjs → add-new-language-page-DUkVmwsT.cjs} +1 -1
- package/dist/{add-new-page-Cz73obNf.cjs → add-new-page-BDpRUueB.cjs} +1 -1
- package/dist/{add-new-page-DrqKQSBZ.js → add-new-page-D1pc9kLA.js} +1 -1
- package/dist/{ai-panel-content-CwzT_8_2.cjs → ai-panel-content-Bq3BC1Dm.cjs} +1 -1
- package/dist/{ai-panel-content-D0WeLOfT.js → ai-panel-content-Dg6P7vk7.js} +2 -2
- package/dist/{ai-panel-default-lang-BFo0lvIA.js → ai-panel-default-lang-BxYd_6VF.js} +3 -3
- package/dist/{ai-panel-default-lang-BWE3xU7D.cjs → ai-panel-default-lang-C0X_Srso.cjs} +2 -2
- package/dist/{ai-panel-other-lang-mtv23TJX.cjs → ai-panel-other-lang-BOu1wJ5J.cjs} +1 -1
- package/dist/{ai-panel-other-lang-DMk1Fjnx.js → ai-panel-other-lang-CBAP_iX-.js} +3 -3
- package/dist/{ai-prompt-input-BsZtecyO.js → ai-prompt-input-CiZCB6jc.js} +2 -2
- package/dist/{ai-prompt-input-DuEk6ni6.cjs → ai-prompt-input-bqLGbsQ2.cjs} +1 -1
- package/dist/{ai-translation-prompt-XxU4clD3.cjs → ai-translation-prompt-Cas13J-r.cjs} +1 -1
- package/dist/{ai-translation-prompt-5zkH9z1O.js → ai-translation-prompt-D3XU5z3f.js} +1 -1
- package/dist/{continue-editing-in-this-client-BAJLU5V9.js → continue-editing-in-this-client-DIpi2ZSi.js} +1 -1
- package/dist/{continue-editing-in-this-client-DAPO-FaB.cjs → continue-editing-in-this-client-DbHzW_zt.cjs} +1 -1
- package/dist/{delete-page-Dz7E_Gln.js → delete-page-CODOstkw.js} +1 -1
- package/dist/{delete-page-CstA2FGa.cjs → delete-page-DPHNAOC6.cjs} +1 -1
- package/dist/{digital-asset-manager-Id4p005p.cjs → digital-asset-manager-BllbsemN.cjs} +1 -1
- package/dist/{digital-asset-manager-D52Jj1Gh.js → digital-asset-manager-BuYVjKfQ.js} +1 -1
- package/dist/{duplicate-page-DwW4tzGq.cjs → duplicate-page-Dc6_UBNZ.cjs} +1 -1
- package/dist/{duplicate-page-LxJbVeQX.js → duplicate-page-DfH67AsW.js} +2 -2
- package/dist/{dynamic-page-selector-6BmMIsBj.js → dynamic-page-selector-C2UK6qGj.js} +1 -1
- package/dist/{dynamic-page-selector-CIBjgfhU.cjs → dynamic-page-selector-Dd8Orls1.cjs} +1 -1
- package/dist/index--Lu_Q_nO.cjs +5 -0
- package/dist/{index-zBK_xIhc.js → index-B_T6ZeA4.js} +184 -184
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{json-diff-viewer-DugqhV-o.cjs → json-diff-viewer-1IHmR_Nt.cjs} +1 -1
- package/dist/{json-diff-viewer-C5tv7nua.js → json-diff-viewer-D8uyTokS.js} +1 -1
- package/dist/{lang-panel-rpel3ady.cjs → lang-panel-D-Pbw2bR.cjs} +1 -1
- package/dist/{lang-panel-Cq1HkfIL.js → lang-panel-d7376A7w.js} +2 -2
- package/dist/{mark-as-template-DHcvdwtH.js → mark-as-template-Bx-MAB5M.js} +1 -1
- package/dist/{mark-as-template-DIItdNWI.cjs → mark-as-template-DHFkkBvV.cjs} +1 -1
- package/dist/{no-language-page-content-BFRBPe6H.cjs → no-language-page-content-DkK7mBnG.cjs} +1 -1
- package/dist/{no-language-page-content-DA6iLaZm.js → no-language-page-content-if-qlxZz.js} +1 -1
- package/dist/{no-language-page-dialog-Bp0hhhWQ.cjs → no-language-page-dialog-49fBehZo.cjs} +1 -1
- package/dist/{no-language-page-dialog-CgeVcFEJ.js → no-language-page-dialog-CCLWQP1E.js} +2 -2
- package/dist/{page-creator-B1-9ivVp.js → page-creator-DRDoy3nM.js} +2 -2
- package/dist/{page-creator-DPr6rEPU.cjs → page-creator-DlJXKAhw.cjs} +1 -1
- package/dist/{page-lock-bteeVlGf.cjs → page-lock-DOnPhjGp.cjs} +1 -1
- package/dist/{page-lock-Kt_How1V.js → page-lock-pwxPivz-.js} +2 -2
- package/dist/{page-locked-dialog-DHskFACu.js → page-locked-dialog-238NohyB.js} +1 -1
- package/dist/{page-locked-dialog-CcmOfDpE.cjs → page-locked-dialog-DKn93bBu.cjs} +1 -1
- package/dist/{page-manager-new-B8wYCKP9.cjs → page-manager-new-Ch0UNJM1.cjs} +1 -1
- package/dist/{page-manager-new-DlyDlsLT.js → page-manager-new-hEQwUorR.js} +2 -2
- package/dist/{page-manager-search-and-filter-DXIX1wnh.cjs → page-manager-search-and-filter-4JatGyBT.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-CJH8kViJ.js → page-manager-search-and-filter-B86rQEO4.js} +1 -1
- package/dist/{page-revisions-content-BEKm2IRj.cjs → page-revisions-content-ChOACVs4.cjs} +1 -1
- package/dist/{page-revisions-content-Do3_ATby.js → page-revisions-content-V9S1rPUy.js} +2 -2
- package/dist/{publish-pages-content-tmYxmeSk.cjs → publish-pages-content-CXKknMnI.cjs} +1 -1
- package/dist/{publish-pages-content-CfIH4-uW.js → publish-pages-content-GKnG7R5W.js} +2 -2
- package/dist/{save-to-lib-DVUkBZb8.js → save-to-lib-BO3WEr-u.js} +1 -1
- package/dist/{save-to-lib-H2XwOH8O.cjs → save-to-lib-BderZ0Qz.cjs} +1 -1
- package/dist/{selected-block-display-BlnYcH8f.js → selected-block-display-DAe0XQgw.js} +1 -1
- package/dist/{selected-block-display-bCgnhTf4.cjs → selected-block-display-yB5bvo9w.cjs} +1 -1
- package/dist/{seo-panel-uLBliADi.cjs → seo-panel-C2WY1dTf.cjs} +1 -1
- package/dist/{seo-panel-DO9e9dzR.js → seo-panel-DuC3gQQy.js} +1 -1
- package/dist/{shared-json-ld-BwEzPasW.cjs → shared-json-ld-ChfktUpf.cjs} +1 -1
- package/dist/{shared-json-ld-DFwVZaJ7.js → shared-json-ld-DMpCm3M4.js} +1 -1
- package/dist/{slug-input-CiuBvodc.js → slug-input-CO6AGAQD.js} +1 -1
- package/dist/{slug-input-B2GUrPyZ.cjs → slug-input-CrjrFrxP.cjs} +1 -1
- package/dist/{take-over-request-D9aGP8wJ.js → take-over-request-Du7grW5x.js} +1 -1
- package/dist/{take-over-request-Dm4emE8Q.cjs → take-over-request-mNydSSFX.cjs} +1 -1
- package/dist/{theme-panel-footer-DMV_nX6m.js → theme-panel-footer-CSC6DpWO.js} +1 -1
- package/dist/{theme-panel-footer--fgczfnN.cjs → theme-panel-footer-eZ1bbLzq.cjs} +1 -1
- package/dist/{unmark-as-template-D6lWcLbq.cjs → unmark-as-template-DzU6-XK7.cjs} +1 -1
- package/dist/{unmark-as-template-CBksW8B6.js → unmark-as-template-dEb6wFT9.js} +1 -1
- package/dist/{unpublish-page-my8VTao9.js → unpublish-page-CxAB3-Cj.js} +1 -1
- package/dist/{unpublish-page-B8_HpJ5N.cjs → unpublish-page-DGd2Kktq.cjs} +1 -1
- package/dist/{web-preview-DQpJA364.cjs → web-preview-B6G0vdiq.cjs} +1 -1
- package/dist/{web-preview-32tyIOuK.js → web-preview-yBF4EXzm.js} +1 -1
- package/package.json +1 -1
- package/dist/index-GczdtTmR.cjs +0 -5
|
@@ -2,12 +2,12 @@ var Vn = (e) => {
|
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
4
|
var Hn = (e, t, n) => t.has(e) || Vn("Cannot " + n);
|
|
5
|
-
var
|
|
6
|
-
import { jsxs as m, Fragment as
|
|
5
|
+
var A = (e, t, n) => (Hn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), O = (e, t, n) => t.has(e) ? Vn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), G = (e, t, n, s) => (Hn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
6
|
+
import { jsxs as m, Fragment as ge, jsx as c } from "react/jsx-runtime";
|
|
7
7
|
import { get as H, reverse as Or, sortBy as Dr, find as ae, noop as ms, groupBy as xr, values as Es, first as ps, minBy as ys, keyBy as Rr, map as Kt, isEmpty as Te, compact as As, each as kr, upperCase as qn, filter as Ts, includes as Ur, has as Yt, pick as In, keys as Mr, pickBy as Br, endsWith as Fr, isArray as Kr, startCase as Vr, isFunction as Hr, cloneDeep as qr, isEqual as $r } from "lodash-es";
|
|
8
8
|
import * as Q from "react";
|
|
9
|
-
import Qr, { useMemo as q, useCallback as z, useState as
|
|
10
|
-
import { atom as
|
|
9
|
+
import Qr, { useMemo as q, useCallback as z, useState as K, useEffect as ne, useRef as Ie, lazy as V, Suspense as X, createContext as zr, Component as jr, createElement as $n } from "react";
|
|
10
|
+
import { atom as Ee, useAtom as ie } from "jotai";
|
|
11
11
|
import { useQuery as oe, useMutation as Y, useQueryClient as J, onlineManager as Ss, QueryClient as Wr, QueryClientProvider as Yr } from "@tanstack/react-query";
|
|
12
12
|
import { useLanguages as _e, useSavePage as ke, useTranslation as Pe, mergeClasses as Vt, usePermissions as _s, PERMISSIONS as Jr, useRightPanel as Zr, useChaiFeatureFlag as Xr, useIsPageLoaded as ea, registerChaiLibrary as ta, getBlocksFromHTML as na, registerChaiSidebarPanel as Gt, registerChaiFeatureFlag as rn, registerChaiTopBar as sa, registerChaiMediaManager as ra, registerChaiSaveToLibrary as aa, ChaiBuilderEditor as ia } from "@chaibuilder/sdk";
|
|
13
13
|
import { Tooltip as Jt, TooltipTrigger as Zt, Button as M, TooltipContent as Xt, Sheet as Ps, SheetContent as ws, SheetHeader as oa, SheetTitle as la, SheetDescription as ca, DropdownMenu as Ln, DropdownMenuTrigger as Nn, DropdownMenuContent as Cn, DropdownMenuItem as fe, Separator as ua, TooltipProvider as vs, SheetTrigger as da, Skeleton as Ot, Dialog as bs, HoverCard as fa, HoverCardTrigger as ha, HoverCardContent as ga, AlertDialog as ma, AlertDialogTrigger as Ea, AlertDialogContent as pa, AlertDialogHeader as ya, AlertDialogTitle as Aa, AlertDialogDescription as Ta, AlertDialogFooter as Sa, AlertDialogCancel as _a, AlertDialogAction as Pa, Popover as wa, PopoverTrigger as va, DialogContent as ba, DialogHeader as Ia, DialogTitle as La, Tabs as Na, TabsList as Ca, TabsTrigger as an, TabsContent as on, Textarea as Qn, Alert as Ga, AlertDescription as Oa } from "@chaibuilder/sdk/ui";
|
|
@@ -267,7 +267,7 @@ const Dt = {
|
|
|
267
267
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
268
268
|
GET_ASSETS: "GET_ASSETS",
|
|
269
269
|
GET_ASSET: "GET_ASSET"
|
|
270
|
-
}, ai =
|
|
270
|
+
}, ai = Ee({}), Gn = () => ie(ai), le = (e, t) => {
|
|
271
271
|
const [n] = Gn();
|
|
272
272
|
return q(() => H(n, e, t), [n, e, t]);
|
|
273
273
|
}, C = () => le("apiUrl", "/chai/api"), Ls = () => le("usersApiUrl", "/chai/users"), Kc = () => le("assetsApiUrl", "/chai/assets"), Ns = () => le("websocket", null), Cs = async (e, t, n = {}) => await fetch(e, {
|
|
@@ -330,7 +330,7 @@ const Vc = () => {
|
|
|
330
330
|
);
|
|
331
331
|
};
|
|
332
332
|
function we() {
|
|
333
|
-
const [e, t] =
|
|
333
|
+
const [e, t] = K(
|
|
334
334
|
new URLSearchParams(window.location.search)
|
|
335
335
|
);
|
|
336
336
|
return ne(() => {
|
|
@@ -359,14 +359,14 @@ const Me = (e) => {
|
|
|
359
359
|
},
|
|
360
360
|
enabled: !!s
|
|
361
361
|
});
|
|
362
|
-
}, ii =
|
|
362
|
+
}, ii = Ee(
|
|
363
363
|
null
|
|
364
364
|
), Gs = () => ie(ii), On = () => {
|
|
365
365
|
const [e] = Gs();
|
|
366
366
|
return (e == null ? void 0 : e.slug) || "";
|
|
367
367
|
};
|
|
368
368
|
function oi(e, t) {
|
|
369
|
-
const [n, s] =
|
|
369
|
+
const [n, s] = K(e);
|
|
370
370
|
return ne(() => {
|
|
371
371
|
const r = setTimeout(() => s(e), t);
|
|
372
372
|
return () => clearTimeout(r);
|
|
@@ -385,10 +385,10 @@ const li = ({ query: e, uuid: t }) => {
|
|
|
385
385
|
}), u = q(() => n === "" ? l.filter((f) => f.lang === "" || f.lang === s) : l.filter((f) => f.lang === n), [n, s, l]);
|
|
386
386
|
return { allLangPages: l, data: u, isFetching: d };
|
|
387
387
|
}, ci = () => {
|
|
388
|
-
const { selectedLang: e, fallbackLang: t } = _e(), [n, s] = Gs(), [r, a] =
|
|
388
|
+
const { selectedLang: e, fallbackLang: t } = _e(), [n, s] = Gs(), [r, a] = K(""), i = oi(r, 500), { allLangPages: o, data: l, isFetching: d } = li({ query: i }), u = z((h) => s(h), [s]), f = z((h) => a(h), [a]), g = z(() => {
|
|
389
389
|
if (!n) return;
|
|
390
|
-
const h = !(n != null && n.primaryPage), p = e.length === 0,
|
|
391
|
-
(y) => (y == null ? void 0 : y.primaryPage) ===
|
|
390
|
+
const h = !(n != null && n.primaryPage), p = e.length === 0, T = h ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, D = o.filter(
|
|
391
|
+
(y) => (y == null ? void 0 : y.primaryPage) === T || y.id === T
|
|
392
392
|
).find((y) => p ? y.lang === e || y.lang === t : y.lang === e);
|
|
393
393
|
s(D || n);
|
|
394
394
|
}, [n, e, o, s, t]);
|
|
@@ -403,13 +403,13 @@ const li = ({ query: e, uuid: t }) => {
|
|
|
403
403
|
updateSearchQuery: f,
|
|
404
404
|
onChangeLanguage: g
|
|
405
405
|
};
|
|
406
|
-
}, ui =
|
|
406
|
+
}, ui = Ee({ lastSaved: void 0 }), Os = () => ie(ui), ce = () => {
|
|
407
407
|
const [e] = we(), t = e.get("page"), { data: n, isFetching: s } = Me();
|
|
408
408
|
return { data: q(() => ({ ...ae(n, { id: t }) || {} }), [n, t]), isFetching: s };
|
|
409
409
|
}, Ne = () => {
|
|
410
410
|
const [e] = we(), t = e.get("lang") ?? "", { data: n, isFetching: s } = Me();
|
|
411
411
|
return { data: q(() => ae(n, { lang: t }) || {}, [n, t]), isFetching: s };
|
|
412
|
-
}, di =
|
|
412
|
+
}, di = Ee({}), fi = () => ie(di), hi = () => {
|
|
413
413
|
const { data: e } = Ne(), t = On(), n = le("getLiveUrl", ms), s = e == null ? void 0 : e.slug, r = n(s || "/");
|
|
414
414
|
return t ? r + t : r;
|
|
415
415
|
}, Be = () => {
|
|
@@ -433,14 +433,14 @@ function Ds(e, t, n = !1) {
|
|
|
433
433
|
const s = e.toString() ? `?${e.toString()}` : "/";
|
|
434
434
|
n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
435
435
|
}
|
|
436
|
-
const Dn =
|
|
436
|
+
const Dn = Ee(null), xn = () => {
|
|
437
437
|
const e = le("currentUser"), t = le("onLogout");
|
|
438
438
|
return {
|
|
439
439
|
isLoggedIn: !!e,
|
|
440
440
|
user: e,
|
|
441
441
|
logout: t
|
|
442
442
|
};
|
|
443
|
-
},
|
|
443
|
+
}, te = {
|
|
444
444
|
LOCKED: "LOCKED",
|
|
445
445
|
EDITING: "EDITING",
|
|
446
446
|
CHECKING: "CHECKING",
|
|
@@ -464,7 +464,7 @@ const Dn = pe(null), xn = () => {
|
|
|
464
464
|
se.FORCE_TAKE_OVER_REQUEST,
|
|
465
465
|
se.CONTINUE_EDITING_IN_THIS_CLIENT,
|
|
466
466
|
se.CONTINUE_EDITING_IN_THIS_TAB_REQUEST
|
|
467
|
-
], Ei =
|
|
467
|
+
], Ei = Ee({}), xs = Ee(null), pi = Ee(te.CHECKING), yi = Ee({}), Ai = (e) => {
|
|
468
468
|
const t = {}, n = xr(Es(e).map(ps).filter(Boolean), "pageId");
|
|
469
469
|
return Object.entries(n).forEach(
|
|
470
470
|
([s, r]) => t[s] = ys(r, "onlineAt")
|
|
@@ -486,8 +486,8 @@ let ln = null;
|
|
|
486
486
|
const Rs = () => {
|
|
487
487
|
const [e, t] = ie(Ei);
|
|
488
488
|
return { pageToUser: e, setPageToUser: t };
|
|
489
|
-
},
|
|
490
|
-
const [e, t] = ie(pi), n = [
|
|
489
|
+
}, pe = () => {
|
|
490
|
+
const [e, t] = ie(pi), n = [te.LOCKED, te.ACTIVE_IN_ANOTHER_TAB].includes(e), s = [te.EDITING].includes(e);
|
|
491
491
|
return { pageStatus: e, setPageStatus: t, isLocked: n, isEditing: s };
|
|
492
492
|
}, ks = () => {
|
|
493
493
|
const [e, t] = ie(yi);
|
|
@@ -496,15 +496,15 @@ const Rs = () => {
|
|
|
496
496
|
const e = Nt(), { pageToUser: t } = Rs();
|
|
497
497
|
return q(() => t[e], [t, e]);
|
|
498
498
|
}, Rn = () => {
|
|
499
|
-
const e = Ns(), { setPageStatus: t } =
|
|
499
|
+
const e = Ns(), { setPageStatus: t } = pe(), [n] = ie(xs);
|
|
500
500
|
return ne(() => {
|
|
501
501
|
if (clearTimeout(ln), !e)
|
|
502
502
|
return ln = setTimeout(() => {
|
|
503
|
-
e || t(
|
|
503
|
+
e || t(te.EDITING);
|
|
504
504
|
}, 500), () => clearTimeout(ln);
|
|
505
505
|
}, [e, t]), n;
|
|
506
506
|
}, Pi = () => {
|
|
507
|
-
const e = Nt(), t = en(), n = Rn(), { setPageToUser: s } = Rs(), { setPageStatus: r, pageStatus: a } =
|
|
507
|
+
const e = Nt(), t = en(), n = Rn(), { setPageToUser: s } = Rs(), { setPageStatus: r, pageStatus: a } = pe(), i = Ie(e);
|
|
508
508
|
return i.current = e, z(
|
|
509
509
|
(o) => {
|
|
510
510
|
const l = o || n;
|
|
@@ -513,14 +513,14 @@ const Rs = () => {
|
|
|
513
513
|
s(u);
|
|
514
514
|
const f = u[i.current];
|
|
515
515
|
if (!f)
|
|
516
|
-
r(
|
|
516
|
+
r(te.CHECKING);
|
|
517
517
|
else if (!t)
|
|
518
|
-
r(
|
|
518
|
+
r(te.CHECKING);
|
|
519
519
|
else if (f.userId === t && f.clientId === Ue) {
|
|
520
|
-
if (a ===
|
|
520
|
+
if (a === te.TAKE_OVER_REQUESTED)
|
|
521
521
|
return;
|
|
522
|
-
r(
|
|
523
|
-
} else f.userId === t && f.clientId !== Ue ? r(
|
|
522
|
+
r(te.EDITING);
|
|
523
|
+
} else f.userId === t && f.clientId !== Ue ? r(te.ACTIVE_IN_ANOTHER_TAB) : r(te.LOCKED);
|
|
524
524
|
},
|
|
525
525
|
[n, s, r, t, a]
|
|
526
526
|
);
|
|
@@ -535,7 +535,7 @@ const Rs = () => {
|
|
|
535
535
|
[n, e, s, r]
|
|
536
536
|
);
|
|
537
537
|
}, vi = () => {
|
|
538
|
-
const e = en(), t = Nt(), n = Rn(), { setPageStatus: s } =
|
|
538
|
+
const e = en(), t = Nt(), n = Rn(), { setPageStatus: s } = pe(), { setPageLockMeta: r } = ks(), a = wi(), i = Ie(t), { savePageAsync: o } = ke();
|
|
539
539
|
return i.current = t, z(
|
|
540
540
|
(l) => async ({ payload: d }) => {
|
|
541
541
|
const u = d || {};
|
|
@@ -552,12 +552,12 @@ const Rs = () => {
|
|
|
552
552
|
break;
|
|
553
553
|
}
|
|
554
554
|
case se.TAKE_OVER_REQUEST: {
|
|
555
|
-
r({ requestingUserId: u == null ? void 0 : u.userId, requestingClientId: u == null ? void 0 : u.senderClientId }), s(
|
|
555
|
+
r({ requestingUserId: u == null ? void 0 : u.userId, requestingClientId: u == null ? void 0 : u.senderClientId }), s(te.TAKE_OVER_REQUESTED);
|
|
556
556
|
break;
|
|
557
557
|
}
|
|
558
558
|
case se.CONTINUE_EDITING_IN_THIS_CLIENT: {
|
|
559
559
|
const f = Ti(n == null ? void 0 : n.presenceState());
|
|
560
|
-
s(
|
|
560
|
+
s(te.CHECKING), await (n == null ? void 0 : n.track({ onlineAt: f, pageId: i.current, userId: e, clientId: Ue }));
|
|
561
561
|
break;
|
|
562
562
|
}
|
|
563
563
|
case se.TAKE_OVER_REJECTED: {
|
|
@@ -569,35 +569,35 @@ const Rs = () => {
|
|
|
569
569
|
[a, r, s, n, e, o]
|
|
570
570
|
);
|
|
571
571
|
}, Hc = () => {
|
|
572
|
-
const e = Ns(), t = en(), n = Nt(), s = Si(), [r, a] = ie(xs),
|
|
572
|
+
const e = Ns(), t = en(), n = Nt(), s = Si(), [r, a] = ie(xs), i = vi(), o = Pi(), l = Ie(i), d = Ie(o);
|
|
573
573
|
ne(() => {
|
|
574
|
-
|
|
575
|
-
}, [
|
|
576
|
-
const
|
|
577
|
-
document.visibilityState === "visible" &&
|
|
574
|
+
l.current = i, d.current = o;
|
|
575
|
+
}, [i, o]), ne(() => {
|
|
576
|
+
const u = () => {
|
|
577
|
+
document.visibilityState === "visible" && r && r.subscribe();
|
|
578
578
|
};
|
|
579
|
-
return document.addEventListener("visibilitychange",
|
|
580
|
-
document.removeEventListener("visibilitychange",
|
|
579
|
+
return document.addEventListener("visibilitychange", u), () => {
|
|
580
|
+
document.removeEventListener("visibilitychange", u);
|
|
581
581
|
};
|
|
582
|
-
}, []), ne(() => {
|
|
582
|
+
}, [r]), ne(() => {
|
|
583
583
|
if (!e || !t || !s || r && r.topic === s) return;
|
|
584
|
-
const
|
|
584
|
+
const u = e.channel(s, {
|
|
585
585
|
config: { presence: { key: Ue } }
|
|
586
586
|
});
|
|
587
|
-
return mi.forEach((
|
|
588
|
-
|
|
589
|
-
|
|
587
|
+
return mi.forEach((f) => {
|
|
588
|
+
u.on("broadcast", { event: f }, (g) => {
|
|
589
|
+
l.current(f)(g);
|
|
590
590
|
});
|
|
591
|
-
}), gi.forEach((
|
|
592
|
-
|
|
593
|
-
|
|
591
|
+
}), gi.forEach((f) => {
|
|
592
|
+
u.on("presence", { event: f }, () => {
|
|
593
|
+
d.current(u);
|
|
594
594
|
});
|
|
595
|
-
}),
|
|
596
|
-
|
|
595
|
+
}), u.subscribe(async (f) => {
|
|
596
|
+
f === "SUBSCRIBED" ? a(u) : (f === "CHANNEL_ERROR" || f === "TIMED_OUT") && console.log("Realtime connection failed", f);
|
|
597
597
|
}), () => {
|
|
598
|
-
|
|
598
|
+
u.unsubscribe();
|
|
599
599
|
};
|
|
600
|
-
}, [e, t, s, a
|
|
600
|
+
}, [e, t, s, a]), ne(() => (r && n && t && r.track({
|
|
601
601
|
pageId: n,
|
|
602
602
|
userId: t,
|
|
603
603
|
clientId: Ue,
|
|
@@ -635,8 +635,8 @@ const Rs = () => {
|
|
|
635
635
|
},
|
|
636
636
|
placeholderData: (r) => r || {}
|
|
637
637
|
});
|
|
638
|
-
}, bi = V(() => import("./page-manager-new-
|
|
639
|
-
const { t } = Pe(), [n, s] = we(), r = n.get("page"), { data: a, isFetching: i } = ce(), { data: o, isFetching: l } = Us(), [d, u] =
|
|
638
|
+
}, bi = V(() => import("./page-manager-new-hEQwUorR.js")), Ms = ({ children: e }) => {
|
|
639
|
+
const { t } = Pe(), [n, s] = we(), r = n.get("page"), { data: a, isFetching: i } = ce(), { data: o, isFetching: l } = Us(), [d, u] = K(!1), [f, g] = K(!0), { savePage: h } = ke(), p = !!r && !Te(a), { isLocked: T } = pe(), S = q(() => {
|
|
640
640
|
if (!o || l) return !1;
|
|
641
641
|
const v = o.find((U) => U.slug === "/");
|
|
642
642
|
return v == null ? void 0 : v.id;
|
|
@@ -647,14 +647,14 @@ const Rs = () => {
|
|
|
647
647
|
Ds(U, s), !l && o && g(!1);
|
|
648
648
|
}, [r, l, o, S, s]);
|
|
649
649
|
const D = !f && !r, y = !f && !i && Te(a), w = d || D || y;
|
|
650
|
-
return /* @__PURE__ */ m(
|
|
650
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
651
651
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ c("div", { className: "relative", children: /* @__PURE__ */ m(Jt, { children: [
|
|
652
652
|
/* @__PURE__ */ c(
|
|
653
653
|
Zt,
|
|
654
654
|
{
|
|
655
655
|
asChild: !0,
|
|
656
656
|
onClick: () => {
|
|
657
|
-
|
|
657
|
+
T || h(), u(!0);
|
|
658
658
|
},
|
|
659
659
|
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(Da, { className: "h-4 w-4" }) }, "template-viewer")
|
|
660
660
|
}
|
|
@@ -683,7 +683,7 @@ const Rs = () => {
|
|
|
683
683
|
}
|
|
684
684
|
) })
|
|
685
685
|
] });
|
|
686
|
-
}, Ii = V(() => import("./add-new-language-page-
|
|
686
|
+
}, Ii = V(() => import("./add-new-language-page-BCu4Npk2.js")), Li = () => {
|
|
687
687
|
const e = le("topLeftCorner", null);
|
|
688
688
|
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Qr.createElement(e, {}) }) : null;
|
|
689
689
|
}, Ni = ({
|
|
@@ -691,12 +691,12 @@ const Rs = () => {
|
|
|
691
691
|
variant: t = "ghost",
|
|
692
692
|
goToDefaultLang: n = !1
|
|
693
693
|
}) => {
|
|
694
|
-
const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } = _e(), o = Te(a) ? s : a, [, l] = we(), { isLocked: d } =
|
|
694
|
+
const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } = _e(), o = Te(a) ? s : a, [, l] = we(), { isLocked: d } = pe(), { t: u } = Pe();
|
|
695
695
|
ne(() => {
|
|
696
696
|
const y = new URLSearchParams(window.location.search), w = y.get("lang");
|
|
697
697
|
w && (r.includes(w) ? i(w) : (y.delete("lang"), l(y), i("")));
|
|
698
698
|
}, [r, l, i]);
|
|
699
|
-
const [, f] = ie(Dn), { data: g } = ce(), { data: h } = Be(), { data: p } = Me(),
|
|
699
|
+
const [, f] = ie(Dn), { data: g } = ce(), { data: h } = Be(), { data: p } = Me(), T = q(() => {
|
|
700
700
|
const y = As(
|
|
701
701
|
Kt(H(h, "languages"), (w) => {
|
|
702
702
|
const v = ae(p, { lang: w });
|
|
@@ -737,7 +737,7 @@ const Rs = () => {
|
|
|
737
737
|
/* @__PURE__ */ c(zn, { className: "h-4 w-4" }),
|
|
738
738
|
H(Dt, o, o),
|
|
739
739
|
/* @__PURE__ */ c(En, { className: "h-4 w-4" })
|
|
740
|
-
] }) : n ? /* @__PURE__ */ c(M, { onClick: () => D(s), variant: "link", size: "sm", children: u("Switch to default language") }) : /* @__PURE__ */ c(
|
|
740
|
+
] }) : n ? /* @__PURE__ */ c(M, { onClick: () => D(s), variant: "link", size: "sm", children: u("Switch to default language") }) : /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ m(Ln, { children: [
|
|
741
741
|
/* @__PURE__ */ c(Nn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
|
|
742
742
|
M,
|
|
743
743
|
{
|
|
@@ -754,7 +754,7 @@ const Rs = () => {
|
|
|
754
754
|
) }),
|
|
755
755
|
/* @__PURE__ */ m(Cn, { className: "space-y-1 border-border", children: [
|
|
756
756
|
Kt(
|
|
757
|
-
|
|
757
|
+
T.filter((y) => y.isLangPageAdded),
|
|
758
758
|
(y) => /* @__PURE__ */ m(
|
|
759
759
|
fe,
|
|
760
760
|
{
|
|
@@ -774,7 +774,7 @@ const Rs = () => {
|
|
|
774
774
|
y.value
|
|
775
775
|
)
|
|
776
776
|
),
|
|
777
|
-
e && !Te(
|
|
777
|
+
e && !Te(T.filter((y) => !y.isLangPageAdded)) && /* @__PURE__ */ m(ge, { children: [
|
|
778
778
|
/* @__PURE__ */ c(ua, {}),
|
|
779
779
|
/* @__PURE__ */ m(
|
|
780
780
|
M,
|
|
@@ -826,7 +826,7 @@ function Gi() {
|
|
|
826
826
|
/* @__PURE__ */ c(Ot, { className: "h-8 w-8 rounded-full" })
|
|
827
827
|
] }, t)) });
|
|
828
828
|
}
|
|
829
|
-
const Oi = Q.lazy(() => import("./page-revisions-content-
|
|
829
|
+
const Oi = Q.lazy(() => import("./page-revisions-content-V9S1rPUy.js"));
|
|
830
830
|
function Di() {
|
|
831
831
|
const [e, t] = Q.useState(!1);
|
|
832
832
|
return /* @__PURE__ */ c(vs, { children: /* @__PURE__ */ m(Jt, { delayDuration: 0, children: [
|
|
@@ -1065,7 +1065,7 @@ const cn = ({
|
|
|
1065
1065
|
k.error("Failed to change slug");
|
|
1066
1066
|
}
|
|
1067
1067
|
});
|
|
1068
|
-
}, Ui = V(() => import("./publish-pages-content-
|
|
1068
|
+
}, Ui = V(() => import("./publish-pages-content-GKnG7R5W.js"));
|
|
1069
1069
|
function Mi({
|
|
1070
1070
|
showModal: e = !1,
|
|
1071
1071
|
onClose: t = () => console.log("Cancelled")
|
|
@@ -1155,8 +1155,8 @@ function Un({
|
|
|
1155
1155
|
/* @__PURE__ */ c(Xt, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
|
|
1156
1156
|
] }) }) : e;
|
|
1157
1157
|
}
|
|
1158
|
-
const Hi = V(() => import("./unpublish-page-
|
|
1159
|
-
const { t: e } = Pe(), { selectedLang: t, fallbackLang: n } = _e(), s = le("getPreviewUrl", async (g) => g), [r, a] =
|
|
1158
|
+
const Hi = V(() => import("./unpublish-page-CxAB3-Cj.js")), qi = V(() => import("./translation-warning-modal-DalBhNQy.js")), $i = () => {
|
|
1159
|
+
const { t: e } = Pe(), { selectedLang: t, fallbackLang: n } = _e(), s = le("getPreviewUrl", async (g) => g), [r, a] = K(""), { data: i } = ce(), { data: o } = Me(), { data: l } = Ce(), d = q(
|
|
1160
1160
|
() => {
|
|
1161
1161
|
var g;
|
|
1162
1162
|
return (g = o == null ? void 0 : o.find((h) => (h == null ? void 0 : h.lang) === t)) == null ? void 0 : g.slug;
|
|
@@ -1176,10 +1176,10 @@ const Hi = V(() => import("./unpublish-page-my8VTao9.js")), qi = V(() => import(
|
|
|
1176
1176
|
} else
|
|
1177
1177
|
a("");
|
|
1178
1178
|
})();
|
|
1179
|
-
}, [s, d, i == null ? void 0 : i.pageType, u, i == null ? void 0 : i.id, f]), /* @__PURE__ */ c(
|
|
1179
|
+
}, [s, d, i == null ? void 0 : i.pageType, u, i == null ? void 0 : i.id, f]), /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ c(Un, { content: e("Open preview in new tab"), delayDuration: 0, children: /* @__PURE__ */ c("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c(M, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ c(Ua, { className: "h-4 w-4" }) }) }) }) });
|
|
1180
1180
|
}, Qi = () => {
|
|
1181
1181
|
const { t: e } = Pe(), [t, n] = Zr();
|
|
1182
|
-
return /* @__PURE__ */ m(
|
|
1182
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
1183
1183
|
/* @__PURE__ */ c(Un, { content: e("Theme"), delayDuration: 0, children: /* @__PURE__ */ c(
|
|
1184
1184
|
M,
|
|
1185
1185
|
{
|
|
@@ -1193,7 +1193,7 @@ const Hi = V(() => import("./unpublish-page-my8VTao9.js")), qi = V(() => import(
|
|
|
1193
1193
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1194
1194
|
] });
|
|
1195
1195
|
}, zi = () => {
|
|
1196
|
-
const { t: e } = Pe(), [t, n] =
|
|
1196
|
+
const { t: e } = Pe(), [t, n] = K(!1), { isLocked: s } = pe(), { savePageAsync: r, saveState: a } = ke();
|
|
1197
1197
|
ne(() => {
|
|
1198
1198
|
const u = (f) => {
|
|
1199
1199
|
a === "UNSAVED" && (f.preventDefault(), f.returnValue = !1);
|
|
@@ -1232,7 +1232,7 @@ const Hi = V(() => import("./unpublish-page-my8VTao9.js")), qi = V(() => import(
|
|
|
1232
1232
|
d
|
|
1233
1233
|
] });
|
|
1234
1234
|
}, ji = () => {
|
|
1235
|
-
const { t: e } = Pe(), { selectedLang: t } = _e(), { data: n } = Ne(), { data: s } = Me(), [r, a] =
|
|
1235
|
+
const { t: e } = Pe(), { selectedLang: t } = _e(), { data: n } = Ne(), { data: s } = Me(), [r, a] = K(!1), [i, o] = K(!1), [l, d] = K(null), { savePageAsync: u } = ke(), [f, g] = K(!1), { data: h } = ce(), { mutate: p, isPending: T } = Bs(), { needTranslations: S } = ke(), D = S(), { buttonText: y, buttonClassName: w, isPublished: v } = q(() => {
|
|
1236
1236
|
const P = h && (h == null ? void 0 : h.online);
|
|
1237
1237
|
return {
|
|
1238
1238
|
buttonClassName: P ? "hover:bg-green-600 bg-green-500" : "",
|
|
@@ -1253,14 +1253,14 @@ const Hi = V(() => import("./unpublish-page-my8VTao9.js")), qi = V(() => import(
|
|
|
1253
1253
|
}, Ae = async () => {
|
|
1254
1254
|
g(!1), await u();
|
|
1255
1255
|
}, B = q(() => Kt(s ?? [], "id"), [s]);
|
|
1256
|
-
return /* @__PURE__ */ m(
|
|
1256
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
1257
1257
|
/* @__PURE__ */ m("div", { className: "flex", children: [
|
|
1258
1258
|
/* @__PURE__ */ m(
|
|
1259
1259
|
M,
|
|
1260
1260
|
{
|
|
1261
1261
|
size: "sm",
|
|
1262
1262
|
onClick: U,
|
|
1263
|
-
disabled:
|
|
1263
|
+
disabled: T || !(h != null && h.id),
|
|
1264
1264
|
className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${w}`,
|
|
1265
1265
|
onMouseEnter: () => o(!0),
|
|
1266
1266
|
onMouseLeave: () => o(!1),
|
|
@@ -1289,7 +1289,7 @@ const Hi = V(() => import("./unpublish-page-my8VTao9.js")), qi = V(() => import(
|
|
|
1289
1289
|
M,
|
|
1290
1290
|
{
|
|
1291
1291
|
size: "sm",
|
|
1292
|
-
disabled:
|
|
1292
|
+
disabled: T || !(h != null && h.id),
|
|
1293
1293
|
className: `rounded-l-none border-l border-white/50 px-2 text-white ${w}`,
|
|
1294
1294
|
children: /* @__PURE__ */ c(En, { className: "h-4 w-4" })
|
|
1295
1295
|
}
|
|
@@ -1298,7 +1298,7 @@ const Hi = V(() => import("./unpublish-page-my8VTao9.js")), qi = V(() => import(
|
|
|
1298
1298
|
/* @__PURE__ */ m(
|
|
1299
1299
|
fe,
|
|
1300
1300
|
{
|
|
1301
|
-
disabled:
|
|
1301
|
+
disabled: T,
|
|
1302
1302
|
className: "cursor-pointer text-xs",
|
|
1303
1303
|
onClick: () => p({ ids: B }, { onSuccess: () => un("TOP_RIGHT") }),
|
|
1304
1304
|
children: [
|
|
@@ -1310,7 +1310,7 @@ const Hi = V(() => import("./unpublish-page-my8VTao9.js")), qi = V(() => import(
|
|
|
1310
1310
|
!v && /* @__PURE__ */ m(
|
|
1311
1311
|
fe,
|
|
1312
1312
|
{
|
|
1313
|
-
disabled:
|
|
1313
|
+
disabled: T,
|
|
1314
1314
|
className: "cursor-pointer text-xs",
|
|
1315
1315
|
onClick: () => p({ ids: [h == null ? void 0 : h.id] }, { onSuccess: () => un("TOP_RIGHT") }),
|
|
1316
1316
|
children: [
|
|
@@ -1339,13 +1339,13 @@ const Hi = V(() => import("./unpublish-page-my8VTao9.js")), qi = V(() => import(
|
|
|
1339
1339
|
isOpen: f,
|
|
1340
1340
|
onClose: Ae,
|
|
1341
1341
|
onContinue: ye,
|
|
1342
|
-
isPending:
|
|
1342
|
+
isPending: T
|
|
1343
1343
|
}
|
|
1344
1344
|
) })
|
|
1345
1345
|
] });
|
|
1346
1346
|
};
|
|
1347
1347
|
function Wi() {
|
|
1348
|
-
const { isLocked: e } =
|
|
1348
|
+
const { isLocked: e } = pe(), [t] = we(), n = t.get("lang"), s = Bi(n);
|
|
1349
1349
|
return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1350
1350
|
/* @__PURE__ */ c(Di, {}),
|
|
1351
1351
|
/* @__PURE__ */ c(cn, { permission: de.EDIT_THEME, children: /* @__PURE__ */ c(Qi, {}) }),
|
|
@@ -1424,7 +1424,7 @@ const Yi = ({
|
|
|
1424
1424
|
]
|
|
1425
1425
|
}
|
|
1426
1426
|
),
|
|
1427
|
-
u(de.MARK_AS_TEMPLATE) && p && !l && /* @__PURE__ */ c(
|
|
1427
|
+
u(de.MARK_AS_TEMPLATE) && p && !l && /* @__PURE__ */ c(ge, { children: h ? /* @__PURE__ */ m(
|
|
1428
1428
|
fe,
|
|
1429
1429
|
{
|
|
1430
1430
|
className: "flex cursor-pointer items-center gap-2",
|
|
@@ -1451,17 +1451,17 @@ const Yi = ({
|
|
|
1451
1451
|
) })
|
|
1452
1452
|
] })
|
|
1453
1453
|
] });
|
|
1454
|
-
}, Ji = V(() => import("./add-new-page-
|
|
1455
|
-
const [e, t] =
|
|
1454
|
+
}, Ji = V(() => import("./add-new-page-D1pc9kLA.js")), Zi = V(() => import("./delete-page-CODOstkw.js")), Xi = V(() => import("./duplicate-page-DfH67AsW.js")), eo = V(() => import("./mark-as-template-Bx-MAB5M.js")), to = V(() => import("./unmark-as-template-dEb6wFT9.js")), no = V(() => import("./unpublish-page-CxAB3-Cj.js")), so = () => {
|
|
1455
|
+
const [e, t] = K(null), [n, s] = K(null), [r, a] = K(null), [i, o] = K(null), [l, d] = K(null), [u, f] = K(null), { data: g, isFetching: h } = Ne(), { selectedLang: p, fallbackLang: T } = _e(), { data: S } = Me(), D = S == null ? void 0 : S.find((b) => b.lang === p), { isLocked: y } = pe(), w = !(g != null && g.slug), [, v] = ie(Dn);
|
|
1456
1456
|
if (!g) return null;
|
|
1457
1457
|
const U = (b) => {
|
|
1458
|
-
p.length > 0 && p !==
|
|
1458
|
+
p.length > 0 && p !== T ? v({
|
|
1459
1459
|
edit: !0,
|
|
1460
1460
|
id: b == null ? void 0 : b.id,
|
|
1461
1461
|
primaryPage: b == null ? void 0 : b.primaryPage
|
|
1462
1462
|
}) : f(b);
|
|
1463
1463
|
};
|
|
1464
|
-
return /* @__PURE__ */ m(
|
|
1464
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
1465
1465
|
/* @__PURE__ */ m("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
|
|
1466
1466
|
/* @__PURE__ */ c(Ms, { children: /* @__PURE__ */ c(
|
|
1467
1467
|
M,
|
|
@@ -1492,7 +1492,7 @@ const Yi = ({
|
|
|
1492
1492
|
setDeletePage: (b) => t(b),
|
|
1493
1493
|
setMarkAsTemplate: (b) => a(b),
|
|
1494
1494
|
setUnmarkAsTemplate: (b) => o(b),
|
|
1495
|
-
isLanguagePage: p.length > 0 && p !==
|
|
1495
|
+
isLanguagePage: p.length > 0 && p !== T,
|
|
1496
1496
|
children: /* @__PURE__ */ c(M, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c(Jn, { className: "h-4 w-4" }) })
|
|
1497
1497
|
}
|
|
1498
1498
|
)
|
|
@@ -1532,7 +1532,7 @@ const Yi = ({
|
|
|
1532
1532
|
), ro = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(Fs, { 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: [
|
|
1533
1533
|
/* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
|
|
1534
1534
|
/* @__PURE__ */ c("p", { className: "pt-2 text-center text-sm font-light text-gray-600", children: e ? "Please select a page from the list in the top header. This will enable you to edit the page." : "Please add a new page" })
|
|
1535
|
-
] }) }), ao = V(() => import("./dynamic-page-selector-
|
|
1535
|
+
] }) }), ao = V(() => import("./dynamic-page-selector-C2UK6qGj.js")), io = () => {
|
|
1536
1536
|
const { dynamicPage: e, allLangPages: t, isFetching: n } = ci(), s = t.length > 0;
|
|
1537
1537
|
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1538
1538
|
!e && /* @__PURE__ */ c(ro, { hasDynamicPage: s }),
|
|
@@ -1877,7 +1877,7 @@ const Yi = ({
|
|
|
1877
1877
|
[n, t]
|
|
1878
1878
|
)
|
|
1879
1879
|
};
|
|
1880
|
-
}, To = V(() => import("./ai-panel-content-
|
|
1880
|
+
}, To = V(() => import("./ai-panel-content-Dg6P7vk7.js").then((e) => e.b)), Vs = "chai-chat-panel", So = ({ 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: [
|
|
1881
1881
|
/* @__PURE__ */ c("title", { children: "ai" }),
|
|
1882
1882
|
/* @__PURE__ */ c("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ c("g", { id: "icon", fill: "currentColor", transform: "translate(64.000000, 64.000000)", children: /* @__PURE__ */ c(
|
|
1883
1883
|
"path",
|
|
@@ -1892,7 +1892,7 @@ const Yi = ({
|
|
|
1892
1892
|
button: _o,
|
|
1893
1893
|
panel: To,
|
|
1894
1894
|
position: "top"
|
|
1895
|
-
}, wo = V(() => import("./lang-panel-
|
|
1895
|
+
}, wo = V(() => import("./lang-panel-d7376A7w.js")), vo = ({ isActive: e, show: t }) => {
|
|
1896
1896
|
const { data: n } = Be();
|
|
1897
1897
|
return !Yt(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(ja, { className: "h-4 w-4" }) });
|
|
1898
1898
|
}, Hs = "lang", bo = {
|
|
@@ -1903,7 +1903,7 @@ const Yi = ({
|
|
|
1903
1903
|
button: vo,
|
|
1904
1904
|
view: "modal",
|
|
1905
1905
|
width: 400
|
|
1906
|
-
}, Io = V(() => import("./seo-panel-
|
|
1906
|
+
}, Io = V(() => import("./seo-panel-DuC3gQQy.js")), qs = "seo", Lo = ({ isActive: e, show: t }) => {
|
|
1907
1907
|
const { data: n } = ce(), s = Ri(n == null ? void 0 : n.pageType);
|
|
1908
1908
|
return !Yt(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
|
|
1909
1909
|
"svg",
|
|
@@ -1995,7 +1995,7 @@ var Qs = !1, Do = (e, t) => e === t, qt = Symbol("solid-proxy"), zs = typeof Pro
|
|
|
1995
1995
|
cleanups: null,
|
|
1996
1996
|
context: null,
|
|
1997
1997
|
owner: null
|
|
1998
|
-
}, dn = {}, N = null, fn = null, xo = null, x = null,
|
|
1998
|
+
}, dn = {}, N = null, fn = null, xo = null, x = null, ee = null, Se = null, tn = 0;
|
|
1999
1999
|
function xe(e, t) {
|
|
2000
2000
|
const n = x, s = N, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Ys : {
|
|
2001
2001
|
owned: null,
|
|
@@ -2005,12 +2005,12 @@ function xe(e, t) {
|
|
|
2005
2005
|
}, o = r ? e : () => e(() => Z(() => ft(i)));
|
|
2006
2006
|
N = i, x = null;
|
|
2007
2007
|
try {
|
|
2008
|
-
return
|
|
2008
|
+
return me(o, !0);
|
|
2009
2009
|
} finally {
|
|
2010
2010
|
x = n, N = s;
|
|
2011
2011
|
}
|
|
2012
2012
|
}
|
|
2013
|
-
function
|
|
2013
|
+
function F(e, t) {
|
|
2014
2014
|
t = t ? Object.assign({}, $t, t) : $t;
|
|
2015
2015
|
const n = {
|
|
2016
2016
|
value: e,
|
|
@@ -2045,9 +2045,9 @@ function Uo(e, t, n) {
|
|
|
2045
2045
|
let s, r, a;
|
|
2046
2046
|
s = !0, r = e, a = {};
|
|
2047
2047
|
let i = null, o = dn, l = null, d = !1, u = "initialValue" in a, f = typeof s == "function" && W(s);
|
|
2048
|
-
const g = /* @__PURE__ */ new Set(), [h, p] = (a.storage ||
|
|
2048
|
+
const g = /* @__PURE__ */ new Set(), [h, p] = (a.storage || F)(a.initialValue), [T, S] = F(void 0), [D, y] = F(void 0, {
|
|
2049
2049
|
equals: !1
|
|
2050
|
-
}), [w, v] =
|
|
2050
|
+
}), [w, v] = F(u ? "ready" : "unresolved");
|
|
2051
2051
|
_.context && (l = _.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : _.load && _.has(l) && (o = _.load(l)));
|
|
2052
2052
|
function U(P, I, j, $) {
|
|
2053
2053
|
return i === P && (i = null, $ !== void 0 && (u = !0), (P === o || I === o) && a.onHydrated && queueMicrotask(() => a.onHydrated($, {
|
|
@@ -2055,14 +2055,14 @@ function Uo(e, t, n) {
|
|
|
2055
2055
|
})), o = dn, b(I, j)), I;
|
|
2056
2056
|
}
|
|
2057
2057
|
function b(P, I) {
|
|
2058
|
-
|
|
2058
|
+
me(() => {
|
|
2059
2059
|
I === void 0 && p(() => P), v(I !== void 0 ? "errored" : u ? "ready" : "unresolved"), S(I);
|
|
2060
2060
|
for (const j of g.keys()) j.decrement();
|
|
2061
2061
|
g.clear();
|
|
2062
2062
|
}, !1);
|
|
2063
2063
|
}
|
|
2064
2064
|
function ye() {
|
|
2065
|
-
const P = Ko, I = h(), j =
|
|
2065
|
+
const P = Ko, I = h(), j = T();
|
|
2066
2066
|
if (j !== void 0 && !i) throw j;
|
|
2067
2067
|
return x && x.user, I;
|
|
2068
2068
|
}
|
|
@@ -2090,7 +2090,7 @@ function Uo(e, t, n) {
|
|
|
2090
2090
|
return;
|
|
2091
2091
|
} else if (!ko($))
|
|
2092
2092
|
return U(i, $, void 0, I), $;
|
|
2093
|
-
return i = $, "v" in $ ? ($.s === 1 ? U(i, $.v, void 0, I) : U(i, void 0, Bt($.v), I), $) : (d = !0, queueMicrotask(() => d = !1),
|
|
2093
|
+
return i = $, "v" in $ ? ($.s === 1 ? U(i, $.v, void 0, I) : U(i, void 0, Bt($.v), I), $) : (d = !0, queueMicrotask(() => d = !1), me(() => {
|
|
2094
2094
|
v(u ? "refreshing" : "pending"), y();
|
|
2095
2095
|
}, !1), $.then((ue) => U($, ue, void 0, I), (ue) => U($, void 0, Bt(ue), I)));
|
|
2096
2096
|
}
|
|
@@ -2099,7 +2099,7 @@ function Uo(e, t, n) {
|
|
|
2099
2099
|
get: () => w()
|
|
2100
2100
|
},
|
|
2101
2101
|
error: {
|
|
2102
|
-
get: () =>
|
|
2102
|
+
get: () => T()
|
|
2103
2103
|
},
|
|
2104
2104
|
loading: {
|
|
2105
2105
|
get() {
|
|
@@ -2110,7 +2110,7 @@ function Uo(e, t, n) {
|
|
|
2110
2110
|
latest: {
|
|
2111
2111
|
get() {
|
|
2112
2112
|
if (!u) return ye();
|
|
2113
|
-
const P =
|
|
2113
|
+
const P = T();
|
|
2114
2114
|
if (P && !i) throw P;
|
|
2115
2115
|
return h();
|
|
2116
2116
|
}
|
|
@@ -2123,7 +2123,7 @@ function Uo(e, t, n) {
|
|
|
2123
2123
|
}];
|
|
2124
2124
|
}
|
|
2125
2125
|
function ru(e) {
|
|
2126
|
-
return
|
|
2126
|
+
return me(e, !1);
|
|
2127
2127
|
}
|
|
2128
2128
|
function Z(e) {
|
|
2129
2129
|
if (x === null) return e();
|
|
@@ -2163,7 +2163,7 @@ function Zs(e, t) {
|
|
|
2163
2163
|
const n = N, s = x;
|
|
2164
2164
|
N = e, x = null;
|
|
2165
2165
|
try {
|
|
2166
|
-
return
|
|
2166
|
+
return me(t, !0);
|
|
2167
2167
|
} catch (r) {
|
|
2168
2168
|
Mn(r);
|
|
2169
2169
|
} finally {
|
|
@@ -2175,10 +2175,10 @@ function Bo(e) {
|
|
|
2175
2175
|
return Promise.resolve().then(() => {
|
|
2176
2176
|
x = t, N = n;
|
|
2177
2177
|
let s;
|
|
2178
|
-
return
|
|
2178
|
+
return me(e, !1), x = N = null, s ? s.done : void 0;
|
|
2179
2179
|
});
|
|
2180
2180
|
}
|
|
2181
|
-
var [Fo, iu] = /* @__PURE__ */
|
|
2181
|
+
var [Fo, iu] = /* @__PURE__ */ F(!1);
|
|
2182
2182
|
function ou() {
|
|
2183
2183
|
return [Fo, Bo];
|
|
2184
2184
|
}
|
|
@@ -2206,8 +2206,8 @@ function er() {
|
|
|
2206
2206
|
if (this.sources && this.state)
|
|
2207
2207
|
if (this.state === ve) at(this);
|
|
2208
2208
|
else {
|
|
2209
|
-
const e =
|
|
2210
|
-
|
|
2209
|
+
const e = ee;
|
|
2210
|
+
ee = null, me(() => jt(this), !1), ee = e;
|
|
2211
2211
|
}
|
|
2212
2212
|
if (x) {
|
|
2213
2213
|
const e = this.observers ? this.observers.length : 0;
|
|
@@ -2217,13 +2217,13 @@ function er() {
|
|
|
2217
2217
|
}
|
|
2218
2218
|
function tr(e, t, n) {
|
|
2219
2219
|
let s = e.value;
|
|
2220
|
-
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length &&
|
|
2220
|
+
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && me(() => {
|
|
2221
2221
|
for (let r = 0; r < e.observers.length; r += 1) {
|
|
2222
2222
|
const a = e.observers[r], i = fn && fn.running;
|
|
2223
|
-
i && fn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ?
|
|
2223
|
+
i && fn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) : Se.push(a), a.observers && sr(a)), i || (a.state = ve);
|
|
2224
2224
|
}
|
|
2225
|
-
if (
|
|
2226
|
-
throw
|
|
2225
|
+
if (ee.length > 1e6)
|
|
2226
|
+
throw ee = [], new Error();
|
|
2227
2227
|
}, !1)), t;
|
|
2228
2228
|
}
|
|
2229
2229
|
function at(e) {
|
|
@@ -2272,25 +2272,25 @@ function zt(e) {
|
|
|
2272
2272
|
if (e = t[n], e.state === ve)
|
|
2273
2273
|
at(e);
|
|
2274
2274
|
else if (e.state === Qt) {
|
|
2275
|
-
const s =
|
|
2276
|
-
|
|
2275
|
+
const s = ee;
|
|
2276
|
+
ee = null, me(() => jt(e, t[0]), !1), ee = s;
|
|
2277
2277
|
}
|
|
2278
2278
|
}
|
|
2279
|
-
function
|
|
2280
|
-
if (
|
|
2279
|
+
function me(e, t) {
|
|
2280
|
+
if (ee) return e();
|
|
2281
2281
|
let n = !1;
|
|
2282
|
-
t || (
|
|
2282
|
+
t || (ee = []), Se ? n = !0 : Se = [], tn++;
|
|
2283
2283
|
try {
|
|
2284
2284
|
const s = e();
|
|
2285
2285
|
return Ho(n), s;
|
|
2286
2286
|
} catch (s) {
|
|
2287
|
-
n || (Se = null),
|
|
2287
|
+
n || (Se = null), ee = null, Mn(s);
|
|
2288
2288
|
}
|
|
2289
2289
|
}
|
|
2290
2290
|
function Ho(e) {
|
|
2291
|
-
if (
|
|
2291
|
+
if (ee && (nr(ee), ee = null), e) return;
|
|
2292
2292
|
const t = Se;
|
|
2293
|
-
Se = null, t.length &&
|
|
2293
|
+
Se = null, t.length && me(() => Ws(t), !1);
|
|
2294
2294
|
}
|
|
2295
2295
|
function nr(e) {
|
|
2296
2296
|
for (let t = 0; t < e.length; t++) zt(e[t]);
|
|
@@ -2323,7 +2323,7 @@ function jt(e, t) {
|
|
|
2323
2323
|
function sr(e) {
|
|
2324
2324
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
2325
2325
|
const n = e.observers[t];
|
|
2326
|
-
n.state || (n.state = Qt, n.pure ?
|
|
2326
|
+
n.state || (n.state = Qt, n.pure ? ee.push(n) : Se.push(n), n.observers && sr(n));
|
|
2327
2327
|
}
|
|
2328
2328
|
}
|
|
2329
2329
|
function ft(e) {
|
|
@@ -2388,7 +2388,7 @@ function Qo(e, t, n = {}) {
|
|
|
2388
2388
|
return dt(() => Wt(a)), () => {
|
|
2389
2389
|
let l = e() || [], d = l.length, u, f;
|
|
2390
2390
|
return l[js], Z(() => {
|
|
2391
|
-
let h, p,
|
|
2391
|
+
let h, p, T, S, D, y, w, v, U;
|
|
2392
2392
|
if (d === 0)
|
|
2393
2393
|
i !== 0 && (Wt(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [yn], r[0] = xe((b) => (a[0] = b, n.fallback())), i = 1);
|
|
2394
2394
|
else if (i === 0) {
|
|
@@ -2396,23 +2396,23 @@ function Qo(e, t, n = {}) {
|
|
|
2396
2396
|
s[f] = l[f], r[f] = xe(g);
|
|
2397
2397
|
i = d;
|
|
2398
2398
|
} else {
|
|
2399
|
-
for (
|
|
2399
|
+
for (T = new Array(d), S = new Array(d), o && (D = new Array(d)), y = 0, w = Math.min(i, d); y < w && s[y] === l[y]; y++) ;
|
|
2400
2400
|
for (w = i - 1, v = d - 1; w >= y && v >= y && s[w] === l[v]; w--, v--)
|
|
2401
|
-
|
|
2401
|
+
T[v] = r[w], S[v] = a[w], o && (D[v] = o[w]);
|
|
2402
2402
|
for (h = /* @__PURE__ */ new Map(), p = new Array(v + 1), f = v; f >= y; f--)
|
|
2403
2403
|
U = l[f], u = h.get(U), p[f] = u === void 0 ? -1 : u, h.set(U, f);
|
|
2404
2404
|
for (u = y; u <= w; u++)
|
|
2405
|
-
U = s[u], f = h.get(U), f !== void 0 && f !== -1 ? (
|
|
2405
|
+
U = s[u], f = h.get(U), f !== void 0 && f !== -1 ? (T[f] = r[u], S[f] = a[u], o && (D[f] = o[u]), f = p[f], h.set(U, f)) : a[u]();
|
|
2406
2406
|
for (f = y; f < d; f++)
|
|
2407
|
-
f in
|
|
2407
|
+
f in T ? (r[f] = T[f], a[f] = S[f], o && (o[f] = D[f], o[f](f))) : r[f] = xe(g);
|
|
2408
2408
|
r = r.slice(0, i = d), s = l.slice(0);
|
|
2409
2409
|
}
|
|
2410
2410
|
return r;
|
|
2411
2411
|
});
|
|
2412
2412
|
function g(h) {
|
|
2413
2413
|
if (a[f] = h, o) {
|
|
2414
|
-
const [p,
|
|
2415
|
-
return o[f] =
|
|
2414
|
+
const [p, T] = F(f);
|
|
2415
|
+
return o[f] = T, t(l[f], p);
|
|
2416
2416
|
}
|
|
2417
2417
|
return t(l[f]);
|
|
2418
2418
|
}
|
|
@@ -2433,7 +2433,7 @@ function zo(e, t, n = {}) {
|
|
|
2433
2433
|
});
|
|
2434
2434
|
function f(g) {
|
|
2435
2435
|
a[l] = g;
|
|
2436
|
-
const [h, p] =
|
|
2436
|
+
const [h, p] = F(d[l]);
|
|
2437
2437
|
return i[l] = p, t(h, l);
|
|
2438
2438
|
}
|
|
2439
2439
|
};
|
|
@@ -2570,7 +2570,7 @@ function ir(e) {
|
|
|
2570
2570
|
const s = (r) => {
|
|
2571
2571
|
const a = _.context;
|
|
2572
2572
|
if (a) {
|
|
2573
|
-
const [o, l] =
|
|
2573
|
+
const [o, l] = F();
|
|
2574
2574
|
_.count || (_.count = 0), _.count++, (n || (n = e())).then((d) => {
|
|
2575
2575
|
!_.done && lt(a), _.count--, l(() => d.default), lt();
|
|
2576
2576
|
}), t = o;
|
|
@@ -3106,7 +3106,7 @@ function Au(e) {
|
|
|
3106
3106
|
i && (ns().user = i = !1), a || (a = Zs(r, () => W(() => e.children)));
|
|
3107
3107
|
const o = s();
|
|
3108
3108
|
if (o instanceof HTMLHeadElement) {
|
|
3109
|
-
const [l, d] =
|
|
3109
|
+
const [l, d] = F(!1), u = () => d(!0);
|
|
3110
3110
|
xe((f) => Sn(o, () => l() ? f() : a(), null)), dt(u);
|
|
3111
3111
|
} else {
|
|
3112
3112
|
const l = ur(e.isSVG ? "g" : "div", e.isSVG), d = t && l.attachShadow ? l.attachShadow({
|
|
@@ -3246,7 +3246,7 @@ var bl = class {
|
|
|
3246
3246
|
const s = n;
|
|
3247
3247
|
return t.push(s), t;
|
|
3248
3248
|
};
|
|
3249
|
-
function
|
|
3249
|
+
function he(e, t, n, s) {
|
|
3250
3250
|
return {
|
|
3251
3251
|
isApplicable: e,
|
|
3252
3252
|
annotation: t,
|
|
@@ -3255,11 +3255,11 @@ function ge(e, t, n, s) {
|
|
|
3255
3255
|
};
|
|
3256
3256
|
}
|
|
3257
3257
|
var mr = [
|
|
3258
|
-
|
|
3258
|
+
he(fr, "undefined", () => null, () => {
|
|
3259
3259
|
}),
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3260
|
+
he(kl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
3261
|
+
he(Dl, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
3262
|
+
he(xl, "Error", (e, t) => {
|
|
3263
3263
|
const n = {
|
|
3264
3264
|
name: e.name,
|
|
3265
3265
|
message: e.message
|
|
@@ -3273,11 +3273,11 @@ var mr = [
|
|
|
3273
3273
|
n[s] = e[s];
|
|
3274
3274
|
}), n;
|
|
3275
3275
|
}),
|
|
3276
|
-
|
|
3276
|
+
he(Ol, "regexp", (e) => "" + e, (e) => {
|
|
3277
3277
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
3278
3278
|
return new RegExp(t, n);
|
|
3279
3279
|
}),
|
|
3280
|
-
|
|
3280
|
+
he(
|
|
3281
3281
|
Et,
|
|
3282
3282
|
"set",
|
|
3283
3283
|
// (sets only exist in es6+)
|
|
@@ -3285,10 +3285,10 @@ var mr = [
|
|
|
3285
3285
|
(e) => [...e.values()],
|
|
3286
3286
|
(e) => new Set(e)
|
|
3287
3287
|
),
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3288
|
+
he(mt, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
3289
|
+
he((e) => os(e) || Ul(e), "number", (e) => os(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
3290
|
+
he((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
3291
|
+
he(Bl, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
3292
3292
|
];
|
|
3293
3293
|
function sn(e, t, n, s) {
|
|
3294
3294
|
return {
|
|
@@ -3538,8 +3538,8 @@ var Pr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3538
3538
|
rt(d, (h, p) => {
|
|
3539
3539
|
if (p === "__proto__" || p === "constructor" || p === "prototype")
|
|
3540
3540
|
throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3541
|
-
const
|
|
3542
|
-
u[p] =
|
|
3541
|
+
const T = Pr(h, t, n, s, [...r, p], [...a, e], i);
|
|
3542
|
+
u[p] = T.transformedValue, Le(T.annotations) ? f[p] = T.annotations : gt(T.annotations) && rt(T.annotations, (S, D) => {
|
|
3543
3543
|
f[gr(p) + "." + D] = S;
|
|
3544
3544
|
});
|
|
3545
3545
|
});
|
|
@@ -3679,7 +3679,7 @@ var Iu = (e, t = !1) => {
|
|
|
3679
3679
|
status: ec,
|
|
3680
3680
|
"last updated": br
|
|
3681
3681
|
}, Cu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Gu = () => {
|
|
3682
|
-
const [e, t] =
|
|
3682
|
+
const [e, t] = F("dark");
|
|
3683
3683
|
return Mo(() => {
|
|
3684
3684
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3685
3685
|
t(n.matches ? "dark" : "light");
|
|
@@ -3781,41 +3781,41 @@ var Iu = (e, t = !1) => {
|
|
|
3781
3781
|
shadowDOMTarget: u,
|
|
3782
3782
|
hideDisabledQueries: f
|
|
3783
3783
|
} = e;
|
|
3784
|
-
G(this, He,
|
|
3784
|
+
G(this, He, F(t)), G(this, yt, n), G(this, At, s), G(this, pt, r), G(this, Tt, d), G(this, qe, u), G(this, $e, F(a)), G(this, Qe, F(i)), G(this, ze, F(o)), G(this, je, F(l)), G(this, St, F(f));
|
|
3785
3785
|
}
|
|
3786
3786
|
setButtonPosition(e) {
|
|
3787
|
-
|
|
3787
|
+
A(this, $e)[1](e);
|
|
3788
3788
|
}
|
|
3789
3789
|
setPosition(e) {
|
|
3790
|
-
|
|
3790
|
+
A(this, Qe)[1](e);
|
|
3791
3791
|
}
|
|
3792
3792
|
setInitialIsOpen(e) {
|
|
3793
|
-
|
|
3793
|
+
A(this, ze)[1](e);
|
|
3794
3794
|
}
|
|
3795
3795
|
setErrorTypes(e) {
|
|
3796
|
-
|
|
3796
|
+
A(this, je)[1](e);
|
|
3797
3797
|
}
|
|
3798
3798
|
setClient(e) {
|
|
3799
|
-
|
|
3799
|
+
A(this, He)[1](e);
|
|
3800
3800
|
}
|
|
3801
3801
|
mount(e) {
|
|
3802
|
-
if (
|
|
3802
|
+
if (A(this, Oe))
|
|
3803
3803
|
throw new Error("Devtools is already mounted");
|
|
3804
3804
|
const t = lr(() => {
|
|
3805
|
-
const n = this, [s] =
|
|
3805
|
+
const n = this, [s] = A(this, $e), [r] = A(this, Qe), [a] = A(this, ze), [i] = A(this, je), [o] = A(this, St), [l] = A(this, He);
|
|
3806
3806
|
let d;
|
|
3807
|
-
return
|
|
3807
|
+
return A(this, We) ? d = A(this, We) : (d = ir(() => import("./NCMVHL6D-DbC9VYfW.js")), G(this, We, d)), Ir(A(this, Tt), A(this, qe)), rr(d, ar({
|
|
3808
3808
|
get queryFlavor() {
|
|
3809
|
-
return
|
|
3809
|
+
return A(n, yt);
|
|
3810
3810
|
},
|
|
3811
3811
|
get version() {
|
|
3812
|
-
return
|
|
3812
|
+
return A(n, At);
|
|
3813
3813
|
},
|
|
3814
3814
|
get onlineManager() {
|
|
3815
|
-
return
|
|
3815
|
+
return A(n, pt);
|
|
3816
3816
|
},
|
|
3817
3817
|
get shadowDOMTarget() {
|
|
3818
|
-
return
|
|
3818
|
+
return A(n, qe);
|
|
3819
3819
|
}
|
|
3820
3820
|
}, {
|
|
3821
3821
|
get client() {
|
|
@@ -3842,9 +3842,9 @@ var Iu = (e, t = !1) => {
|
|
|
3842
3842
|
}
|
|
3843
3843
|
unmount() {
|
|
3844
3844
|
var e;
|
|
3845
|
-
if (!
|
|
3845
|
+
if (!A(this, Oe))
|
|
3846
3846
|
throw new Error("Devtools is not mounted");
|
|
3847
|
-
(e =
|
|
3847
|
+
(e = A(this, _t)) == null || e.call(this), G(this, Oe, !1);
|
|
3848
3848
|
}
|
|
3849
3849
|
}, He = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), At = new WeakMap(), Oe = new WeakMap(), Tt = new WeakMap(), qe = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), ze = new WeakMap(), je = new WeakMap(), St = new WeakMap(), We = new WeakMap(), _t = new WeakMap(), hs), Ye, Pt, wt, vt, De, bt, Je, Ze, Xe, et, tt, It, nt, st, Lt, gs, nc = (gs = class {
|
|
3850
3850
|
constructor(e) {
|
|
@@ -3877,44 +3877,44 @@ var Iu = (e, t = !1) => {
|
|
|
3877
3877
|
onClose: f,
|
|
3878
3878
|
hideDisabledQueries: g
|
|
3879
3879
|
} = e;
|
|
3880
|
-
G(this, Ye,
|
|
3880
|
+
G(this, Ye, F(t)), G(this, wt, n), G(this, vt, s), G(this, Pt, r), G(this, bt, d), G(this, Je, u), G(this, Ze, F(a)), G(this, Xe, F(i)), G(this, et, F(o)), G(this, tt, F(l)), G(this, It, F(g)), G(this, nt, F(f));
|
|
3881
3881
|
}
|
|
3882
3882
|
setButtonPosition(e) {
|
|
3883
|
-
|
|
3883
|
+
A(this, Ze)[1](e);
|
|
3884
3884
|
}
|
|
3885
3885
|
setPosition(e) {
|
|
3886
|
-
|
|
3886
|
+
A(this, Xe)[1](e);
|
|
3887
3887
|
}
|
|
3888
3888
|
setInitialIsOpen(e) {
|
|
3889
|
-
|
|
3889
|
+
A(this, et)[1](e);
|
|
3890
3890
|
}
|
|
3891
3891
|
setErrorTypes(e) {
|
|
3892
|
-
|
|
3892
|
+
A(this, tt)[1](e);
|
|
3893
3893
|
}
|
|
3894
3894
|
setClient(e) {
|
|
3895
|
-
|
|
3895
|
+
A(this, Ye)[1](e);
|
|
3896
3896
|
}
|
|
3897
3897
|
setOnClose(e) {
|
|
3898
|
-
|
|
3898
|
+
A(this, nt)[1](() => e);
|
|
3899
3899
|
}
|
|
3900
3900
|
mount(e) {
|
|
3901
|
-
if (
|
|
3901
|
+
if (A(this, De))
|
|
3902
3902
|
throw new Error("Devtools is already mounted");
|
|
3903
3903
|
const t = lr(() => {
|
|
3904
|
-
const n = this, [s] =
|
|
3904
|
+
const n = this, [s] = A(this, Ze), [r] = A(this, Xe), [a] = A(this, et), [i] = A(this, tt), [o] = A(this, It), [l] = A(this, Ye), [d] = A(this, nt);
|
|
3905
3905
|
let u;
|
|
3906
|
-
return
|
|
3906
|
+
return A(this, st) ? u = A(this, st) : (u = ir(() => import("./2AITGKQY-BuWtti7-.js")), G(this, st, u)), Ir(A(this, bt), A(this, Je)), rr(u, ar({
|
|
3907
3907
|
get queryFlavor() {
|
|
3908
|
-
return
|
|
3908
|
+
return A(n, wt);
|
|
3909
3909
|
},
|
|
3910
3910
|
get version() {
|
|
3911
|
-
return
|
|
3911
|
+
return A(n, vt);
|
|
3912
3912
|
},
|
|
3913
3913
|
get onlineManager() {
|
|
3914
|
-
return
|
|
3914
|
+
return A(n, Pt);
|
|
3915
3915
|
},
|
|
3916
3916
|
get shadowDOMTarget() {
|
|
3917
|
-
return
|
|
3917
|
+
return A(n, Je);
|
|
3918
3918
|
}
|
|
3919
3919
|
}, {
|
|
3920
3920
|
get client() {
|
|
@@ -3944,9 +3944,9 @@ var Iu = (e, t = !1) => {
|
|
|
3944
3944
|
}
|
|
3945
3945
|
unmount() {
|
|
3946
3946
|
var e;
|
|
3947
|
-
if (!
|
|
3947
|
+
if (!A(this, De))
|
|
3948
3948
|
throw new Error("Devtools is not mounted");
|
|
3949
|
-
(e =
|
|
3949
|
+
(e = A(this, Lt)) == null || e.call(this), G(this, De, !1);
|
|
3950
3950
|
}
|
|
3951
3951
|
}, Ye = new WeakMap(), Pt = new WeakMap(), wt = new WeakMap(), vt = new WeakMap(), De = new WeakMap(), bt = new WeakMap(), Je = new WeakMap(), Ze = new WeakMap(), Xe = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), It = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), Lt = new WeakMap(), gs);
|
|
3952
3952
|
function sc(e) {
|
|
@@ -4026,7 +4026,7 @@ var us = process.env.NODE_ENV !== "development" ? function() {
|
|
|
4026
4026
|
return null;
|
|
4027
4027
|
} : sc;
|
|
4028
4028
|
process.env.NODE_ENV;
|
|
4029
|
-
const ac =
|
|
4029
|
+
const ac = Ee(""), ic = () => {
|
|
4030
4030
|
rn("dynamic-page-selector", {
|
|
4031
4031
|
description: "Dynamic page selector"
|
|
4032
4032
|
}), rn("enable-add-page-dropdown", {
|
|
@@ -4089,7 +4089,7 @@ const ac = pe(""), ic = () => {
|
|
|
4089
4089
|
},
|
|
4090
4090
|
[e]
|
|
4091
4091
|
);
|
|
4092
|
-
}, dc = V(() => import("./page-lock-
|
|
4092
|
+
}, dc = V(() => import("./page-lock-pwxPivz-.js")), fc = V(() => import("./no-language-page-dialog-CCLWQP1E.js")), hc = V(() => import("./digital-asset-manager-BuYVjKfQ.js")), gc = V(() => import("./save-to-lib-BO3WEr-u.js")), mc = V(() => import("./theme-panel-footer-CSC6DpWO.js")), Ec = V(() => import("./web-preview-yBF4EXzm.js"));
|
|
4093
4093
|
ic();
|
|
4094
4094
|
ri();
|
|
4095
4095
|
sa(lo);
|
|
@@ -4100,7 +4100,7 @@ const pc = {
|
|
|
4100
4100
|
role: "",
|
|
4101
4101
|
permissions: null
|
|
4102
4102
|
}, ds = (e) => {
|
|
4103
|
-
const { data: t } = Eo(), n = kn(), { data: s = pc, isFetching: r } = po(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: l } = oc(), { data: d, isFetching: u } = Be(), f = r || i || l || u, [g] = we(), h = g.get("page"), { data: p } = ce(), { data:
|
|
4103
|
+
const { data: t } = Eo(), n = kn(), { data: s = pc, isFetching: r } = po(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: l } = oc(), { data: d, isFetching: u } = Be(), f = r || i || l || u, [g] = we(), h = g.get("page"), { data: p } = ce(), { data: T, isFetching: S } = ho(), { blocks: D } = fo(T), { data: y, isFetching: w } = go(), { pageStatus: v } = pe(), U = co(), { onSave: b } = yo(), { mutateAsync: ye } = lc(), { getPartialBlocks: Ae, getPartialBlockBlocks: B } = Ao(), { mutateAsync: P } = ki(), { mutateAsync: I } = mo(), j = uc(), [$, ue] = K(!1), it = Ie([]), be = q(() => H(d, "theme", {}) || {}, [d]), ot = v === te.EDITING, Ge = v === te.CHECKING, Bn = S || Ge || w;
|
|
4104
4104
|
it.current = D;
|
|
4105
4105
|
const [Lr] = ie(ac);
|
|
4106
4106
|
ne(() => {
|
|
@@ -4116,7 +4116,7 @@ const pc = {
|
|
|
4116
4116
|
async (re, Ct) => await P({ pageType: re, query: Ct }),
|
|
4117
4117
|
[P]
|
|
4118
4118
|
);
|
|
4119
|
-
return /* @__PURE__ */ m(
|
|
4119
|
+
return /* @__PURE__ */ m(ge, { children: [
|
|
4120
4120
|
Bn && /* @__PURE__ */ c(Fs, { className: f ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ c(Ht, { className: `animate-spin text-primary ${f ? "h-6 w-6" : "h-5 w-5"}` }) }),
|
|
4121
4121
|
Lr && /* @__PURE__ */ c(
|
|
4122
4122
|
X,
|
|
@@ -4174,7 +4174,7 @@ const pc = {
|
|
|
4174
4174
|
}
|
|
4175
4175
|
}
|
|
4176
4176
|
}), Ou = (e) => {
|
|
4177
|
-
const [, t] = Gn(), [n, s] =
|
|
4177
|
+
const [, t] = Gn(), [n, s] = K(!1);
|
|
4178
4178
|
return ne(() => (t(
|
|
4179
4179
|
In(e, [
|
|
4180
4180
|
"apiUrl",
|
|
@@ -4194,7 +4194,7 @@ const pc = {
|
|
|
4194
4194
|
s(!0);
|
|
4195
4195
|
}, 200), () => {
|
|
4196
4196
|
s(!1), t({});
|
|
4197
|
-
}), [e, t]), n ? H(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(
|
|
4197
|
+
}), [e, t]), n ? H(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(ge, { children: [
|
|
4198
4198
|
/* @__PURE__ */ c(ds, { ...e }),
|
|
4199
4199
|
/* @__PURE__ */ c(us, {})
|
|
4200
4200
|
] }) : /* @__PURE__ */ m(Yr, { client: yc, children: [
|
|
@@ -4242,7 +4242,7 @@ function Tc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4242
4242
|
] });
|
|
4243
4243
|
}
|
|
4244
4244
|
const Du = () => {
|
|
4245
|
-
const { savePageAsync: e } = ke(), t = J(), { isLocked: n } =
|
|
4245
|
+
const { savePageAsync: e } = ke(), t = J(), { isLocked: n } = pe();
|
|
4246
4246
|
return z(async () => {
|
|
4247
4247
|
n || await e(), t.invalidateQueries({ queryKey: [E.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [E.GET_BUILDER_PAGE_DATA] });
|
|
4248
4248
|
}, [e, t, n]);
|
|
@@ -4276,7 +4276,7 @@ const Du = () => {
|
|
|
4276
4276
|
console.error("Failed to update metadata");
|
|
4277
4277
|
}
|
|
4278
4278
|
});
|
|
4279
|
-
}, Sc = V(() => import("./digital-asset-manager-
|
|
4279
|
+
}, Sc = V(() => import("./digital-asset-manager-BuYVjKfQ.js")), ku = ({
|
|
4280
4280
|
assetId: e,
|
|
4281
4281
|
assetUrl: t,
|
|
4282
4282
|
onChange: n,
|
|
@@ -4284,13 +4284,13 @@ const Du = () => {
|
|
|
4284
4284
|
placeholder: r = "Select an image",
|
|
4285
4285
|
disabled: a = !1
|
|
4286
4286
|
}) => {
|
|
4287
|
-
const { t: i } = Pe(), [o, l] =
|
|
4287
|
+
const { t: i } = Pe(), [o, l] = K(!1), d = () => {
|
|
4288
4288
|
a || l(!0);
|
|
4289
4289
|
}, u = () => {
|
|
4290
4290
|
l(!1);
|
|
4291
4291
|
}, f = (p) => {
|
|
4292
|
-
const
|
|
4293
|
-
|
|
4292
|
+
const T = Array.isArray(p) ? p[0] : p;
|
|
4293
|
+
T != null && T.url && n(In(T, ["url", "id"])), l(!1);
|
|
4294
4294
|
}, g = () => {
|
|
4295
4295
|
n({ url: "", id: "" });
|
|
4296
4296
|
}, h = (t == null ? void 0 : t.startsWith("{{")) && (t == null ? void 0 : t.endsWith("}}"));
|
|
@@ -4503,7 +4503,7 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4503
4503
|
n = n.replace(r[0], i);
|
|
4504
4504
|
}
|
|
4505
4505
|
return n;
|
|
4506
|
-
}, Lc = V(() => import("./shared-json-ld-
|
|
4506
|
+
}, Lc = V(() => import("./shared-json-ld-DMpCm3M4.js")), Uu = ({
|
|
4507
4507
|
value: e,
|
|
4508
4508
|
onChange: t,
|
|
4509
4509
|
disabled: n = !1,
|
|
@@ -4516,7 +4516,7 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4516
4516
|
hasJsonLdForSelectedLang: d,
|
|
4517
4517
|
copyJsonLDFromDefaultPage: u
|
|
4518
4518
|
}) => {
|
|
4519
|
-
const [f, g] =
|
|
4519
|
+
const [f, g] = K("edit"), [h, p] = K(null), [T, S] = K(""), D = Ie(null), [y] = Gn(), w = i === "jsonLD" && H(y, "features.sharedJsonLD", !1), v = i === "jsonLD" && !d && !!u;
|
|
4520
4520
|
ne(() => {
|
|
4521
4521
|
e.trim() === "" && t("{}");
|
|
4522
4522
|
}, [e, t]);
|
|
@@ -4674,7 +4674,7 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4674
4674
|
] })
|
|
4675
4675
|
] }),
|
|
4676
4676
|
/* @__PURE__ */ m(on, { value: "preview", className: "mt-0", children: [
|
|
4677
|
-
/* @__PURE__ */ c(Qn, { rows: a, value:
|
|
4677
|
+
/* @__PURE__ */ c(Qn, { rows: a, value: T, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
|
|
4678
4678
|
/* @__PURE__ */ c("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
|
|
4679
4679
|
] }),
|
|
4680
4680
|
w && /* @__PURE__ */ c(on, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(Lc, {}) }) })
|
|
@@ -4700,7 +4700,7 @@ export {
|
|
|
4700
4700
|
wu as $,
|
|
4701
4701
|
E as A,
|
|
4702
4702
|
Fs as B,
|
|
4703
|
-
|
|
4703
|
+
F as C,
|
|
4704
4704
|
ol as D,
|
|
4705
4705
|
se as E,
|
|
4706
4706
|
Js as F,
|
|
@@ -4713,7 +4713,7 @@ export {
|
|
|
4713
4713
|
Tn as M,
|
|
4714
4714
|
uu as N,
|
|
4715
4715
|
au as O,
|
|
4716
|
-
|
|
4716
|
+
te as P,
|
|
4717
4717
|
Eu as Q,
|
|
4718
4718
|
Au as R,
|
|
4719
4719
|
hu as S,
|
|
@@ -4725,7 +4725,7 @@ export {
|
|
|
4725
4725
|
ml as Y,
|
|
4726
4726
|
Sn as Z,
|
|
4727
4727
|
ul as _,
|
|
4728
|
-
|
|
4728
|
+
pe as a,
|
|
4729
4729
|
xn as a$,
|
|
4730
4730
|
vu as a0,
|
|
4731
4731
|
gl as a1,
|