@chaibuilder/pages 0.16.24 → 0.16.26
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-UndKMj-X.cjs → 2AITGKQY-Be359164.cjs} +1 -1
- package/dist/{2AITGKQY-Ir_ZXu1s.js → 2AITGKQY-CoZaZMrf.js} +2 -2
- package/dist/{NCMVHL6D-B3xcD0Vz.js → NCMVHL6D-C2p_bwgN.js} +2 -2
- package/dist/{NCMVHL6D-taGMv4he.cjs → NCMVHL6D-CmKLw38-.cjs} +1 -1
- package/dist/{ZDWCUMSJ-Cot4ixKZ.cjs → ZDWCUMSJ-DDHOTUX8.cjs} +1 -1
- package/dist/{ZDWCUMSJ-B1vApR00.js → ZDWCUMSJ-DmZy2MGb.js} +1 -1
- package/dist/{active-in-another-tab-Kp8LaYW5.js → active-in-another-tab-At1yEu4g.js} +1 -1
- package/dist/{active-in-another-tab-DYU7aCUa.cjs → active-in-another-tab-B1PAoWFL.cjs} +1 -1
- package/dist/{add-new-language-page-CkyPkpzC.cjs → add-new-language-page-B7fKZbYT.cjs} +1 -1
- package/dist/{add-new-language-page-0J2KTKg6.js → add-new-language-page-BfPVFqO4.js} +2 -2
- package/dist/{add-new-page-DPtVHa8m.cjs → add-new-page-DBVt7xSO.cjs} +1 -1
- package/dist/{add-new-page-BjxHUGIo.js → add-new-page-GZdKxwCY.js} +1 -1
- package/dist/{ai-panel-content-CMfopU0G.js → ai-panel-content-CWw-2gPV.js} +2 -2
- package/dist/{ai-panel-content-nmbQV7rT.cjs → ai-panel-content-Cv67WLJd.cjs} +1 -1
- package/dist/{ai-panel-default-lang-7L9rURdC.js → ai-panel-default-lang-B1WScOB4.js} +3 -3
- package/dist/{ai-panel-default-lang-B5eNybL4.cjs → ai-panel-default-lang-BBk6sSyh.cjs} +2 -2
- package/dist/{ai-panel-other-lang-DLn89TFE.cjs → ai-panel-other-lang-BrVV9nKv.cjs} +1 -1
- package/dist/{ai-panel-other-lang-U5XRqxbF.js → ai-panel-other-lang-DgNon2GH.js} +3 -3
- package/dist/{ai-prompt-input-B24vn-LG.js → ai-prompt-input-B6KsNLgP.js} +2 -2
- package/dist/ai-prompt-input-DSmIbsS_.cjs +1 -0
- package/dist/{ai-translation-prompt-CB67Sqo9.cjs → ai-translation-prompt-BYTviKVU.cjs} +1 -1
- package/dist/{ai-translation-prompt-cym054ja.js → ai-translation-prompt-CfnXqyai.js} +1 -1
- package/dist/button-CMMN5Cp4.cjs +1 -0
- package/dist/button-CggatMM3.js +48 -0
- package/dist/{continue-editing-in-this-client-BYJaymOL.cjs → continue-editing-in-this-client--Fzos10u.cjs} +1 -1
- package/dist/{continue-editing-in-this-client-BDYiQrbE.js → continue-editing-in-this-client--RRixZUo.js} +1 -1
- package/dist/{delete-page-BXEQB0Si.cjs → delete-page-BOuq3v6x.cjs} +1 -1
- package/dist/{delete-page-CvSN4E4V.js → delete-page-CeJdK5hc.js} +1 -1
- package/dist/{digital-asset-manager-CF1Lyc5K.cjs → digital-asset-manager-BUEa7fSG.cjs} +1 -1
- package/dist/{digital-asset-manager-BxbX7ji1.js → digital-asset-manager-D6GbpYDo.js} +1 -1
- package/dist/{duplicate-page-BFnuk1nL.js → duplicate-page-C7FjAbqP.js} +2 -2
- package/dist/{duplicate-page-C32_9H41.cjs → duplicate-page-Ch9Fn-Gu.cjs} +1 -1
- package/dist/{dynamic-page-selector-CLxpglyO.cjs → dynamic-page-selector-CZNYCxbJ.cjs} +1 -1
- package/dist/{dynamic-page-selector-CSTuQhej.js → dynamic-page-selector-C_-ihnB7.js} +1 -1
- package/dist/{index-Bre43r-W.cjs → index-CJcS3b8n.cjs} +5 -5
- package/dist/{index-tgsBai_8.js → index-CtRx3Y3K.js} +1039 -1028
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -7
- package/dist/{json-diff-viewer-2gVCV5T-.js → json-diff-viewer-DX4sQltt.js} +1 -1
- package/dist/{json-diff-viewer-34Sqd4il.cjs → json-diff-viewer-DluaC8tY.cjs} +1 -1
- package/dist/{lang-panel-CXIcTGVk.cjs → lang-panel-DFe4DfU4.cjs} +1 -1
- package/dist/{lang-panel-Cj0axCpE.js → lang-panel-p7OYw-2c.js} +2 -2
- package/dist/{mark-as-template-DKBwTiMJ.cjs → mark-as-template-Biqpp8uM.cjs} +1 -1
- package/dist/{mark-as-template-1TuznHtx.js → mark-as-template-CuPKgc5N.js} +1 -1
- package/dist/{no-language-page-content-C265--no.js → no-language-page-content-B_zNVuVO.js} +1 -1
- package/dist/{no-language-page-content-B8udZsi2.cjs → no-language-page-content-oy4ZcH34.cjs} +1 -1
- package/dist/{no-language-page-dialog-CctilPnb.cjs → no-language-page-dialog-CTRG81hU.cjs} +1 -1
- package/dist/{no-language-page-dialog-DgaP74-Y.js → no-language-page-dialog-Q2rvsEP6.js} +2 -2
- package/dist/{page-creator-NkF29o0S.cjs → page-creator-CVrbjJa-.cjs} +1 -1
- package/dist/{page-creator-Cer7L7dg.js → page-creator-b6UTCFeu.js} +2 -2
- package/dist/{page-lock-0qEG4sLX.cjs → page-lock-DUwWdppB.cjs} +1 -1
- package/dist/{page-lock-DNrP3AhL.js → page-lock-Dl5CmUgk.js} +2 -2
- package/dist/{page-locked-dialog-B9p5gIGE.cjs → page-locked-dialog-DeUMR-pV.cjs} +1 -1
- package/dist/{page-locked-dialog-U5eDKeBc.js → page-locked-dialog-MJ3kA-oQ.js} +1 -1
- package/dist/page-manager-new-C3XuiDiM.cjs +1 -0
- package/dist/page-manager-new-C8PGR_4a.js +394 -0
- package/dist/{page-manager-search-and-filter-DKrQdcb0.cjs → page-manager-search-and-filter-BdfXZwwH.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-DDdYtDF7.js → page-manager-search-and-filter-DIz68YHL.js} +1 -1
- package/dist/{page-revisions-content-CoVYI0hI.js → page-revisions-content-BvYTXKgT.js} +2 -2
- package/dist/{page-revisions-content-NE8Y5DrC.cjs → page-revisions-content-CwrPL9kp.cjs} +1 -1
- package/dist/pages.css +1 -1
- package/dist/{publish-pages-content-KgbEbRVV.js → publish-pages-content-9VBFj6LH.js} +2 -2
- package/dist/{publish-pages-content-CCUKnVTH.cjs → publish-pages-content-DTPjR33T.cjs} +1 -1
- package/dist/{save-to-lib-CQmcDI5w.js → save-to-lib-Bkou78G6.js} +1 -1
- package/dist/{save-to-lib-C06RQn4k.cjs → save-to-lib-ByoB0FW5.cjs} +1 -1
- package/dist/selected-block-display-Auur5nl7.cjs +16 -0
- package/dist/selected-block-display-D1L4e4Cb.js +355 -0
- package/dist/{seo-panel-C-dqg-1A.js → seo-panel-KjxjFcdp.js} +16 -16
- package/dist/{seo-panel-hwJUoGfJ.cjs → seo-panel-Mjkh_Urn.cjs} +1 -1
- package/dist/{shared-json-ld-BP2l89h2.cjs → shared-json-ld-DYD7q8ST.cjs} +1 -1
- package/dist/{shared-json-ld-BUPafGh_.js → shared-json-ld-S9OIaOTA.js} +1 -1
- package/dist/{slug-input-91_G-ww1.cjs → slug-input-C0BtQs2w.cjs} +1 -1
- package/dist/{slug-input-hcJHNszn.js → slug-input-CUTtvZQ9.js} +1 -1
- package/dist/{take-over-request-Dw2P9U_Q.js → take-over-request-CXED2804.js} +1 -1
- package/dist/{take-over-request-kRGwkXvv.cjs → take-over-request-Dh9HVZPO.cjs} +1 -1
- package/dist/{theme-panel-footer-2qsvp4AM.js → theme-panel-footer-CftO53LS.js} +1 -1
- package/dist/{theme-panel-footer-DmO4-lci.cjs → theme-panel-footer-tdNtbqZs.cjs} +1 -1
- package/dist/{unmark-as-template-DbXx3l6p.js → unmark-as-template-Dp6S9dY3.js} +1 -1
- package/dist/{unmark-as-template-BBzZqNJt.cjs → unmark-as-template-DyUqAa9Z.cjs} +1 -1
- package/dist/{unpublish-page-BKQqPk_e.js → unpublish-page-c382vh74.js} +1 -1
- package/dist/{unpublish-page-CHYNjTFU.cjs → unpublish-page-ch791au1.cjs} +1 -1
- package/dist/{web-preview-BKoPv6AO.js → web-preview-DiOChE4E.js} +1 -1
- package/dist/{web-preview-D4KdtUYp.cjs → web-preview-cls5-Dlv.cjs} +1 -1
- package/package.json +3 -3
- package/dist/ai-prompt-input-6LzuYu5L.cjs +0 -1
- package/dist/page-manager-new-BL5S9ccS.cjs +0 -1
- package/dist/page-manager-new-DGaBkeJp.js +0 -354
- package/dist/selected-block-display-7n8S3vf1.js +0 -394
- package/dist/selected-block-display-DDC1_UC8.cjs +0 -16
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
var
|
|
1
|
+
var $n = (e) => {
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var A = (e, t, n) => (
|
|
4
|
+
var Qn = (e, t, n) => t.has(e) || $n("Cannot " + n);
|
|
5
|
+
var A = (e, t, n) => (Qn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), D = (e, t, n) => t.has(e) ? $n("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), G = (e, t, n, s) => (Qn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
6
6
|
import { jsxs as m, Fragment as ge, jsx as c } from "react/jsx-runtime";
|
|
7
|
-
import { get as H, reverse as
|
|
7
|
+
import { get as H, reverse as Ur, sortBy as Mr, find as ie, noop as As, groupBy as Br, values as Ts, first as Ss, minBy as _s, keyBy as Fr, map as Kt, isEmpty as Se, compact as Ps, each as Kr, upperCase as zn, filter as ws, includes as Vr, has as Yt, pick as Ln, keys as Hr, pickBy as qr, endsWith as $r, isArray as Qr, startCase as zr, isFunction as Wr, cloneDeep as jr, isEqual as Wn } from "lodash-es";
|
|
8
8
|
import * as Q from "react";
|
|
9
|
-
import
|
|
10
|
-
import { atom as Ee, useAtom as
|
|
11
|
-
import { useQuery as
|
|
12
|
-
import { useLanguages as
|
|
13
|
-
import { Tooltip as Jt, TooltipTrigger as Zt, Button as M, TooltipContent as Xt, Sheet as
|
|
14
|
-
import { LogsIcon as
|
|
9
|
+
import Yr, { useMemo as q, useCallback as z, useState as K, useEffect as ne, useRef as Ie, lazy as V, Suspense as X, createContext as Jr, Component as Zr, createElement as jn } from "react";
|
|
10
|
+
import { atom as Ee, useAtom as oe } from "jotai";
|
|
11
|
+
import { useQuery as re, useMutation as Y, useQueryClient as J, onlineManager as vs, QueryClient as Xr, QueryClientProvider as ea } from "@tanstack/react-query";
|
|
12
|
+
import { useLanguages as Pe, useSavePage as ke, useTranslation as we, mergeClasses as Vt, usePermissions as bs, PERMISSIONS as ta, useRightPanel as na, useChaiFeatureFlag as sa, useIsPageLoaded as ra, registerChaiLibrary as aa, getBlocksFromHTML as ia, registerChaiSidebarPanel as Gt, registerChaiFeatureFlag as an, registerChaiTopBar as oa, registerChaiMediaManager as la, registerChaiSaveToLibrary as ca, ChaiBuilderEditor as ua } from "@chaibuilder/sdk";
|
|
13
|
+
import { Tooltip as Jt, TooltipTrigger as Zt, Button as M, TooltipContent as Xt, Sheet as Is, SheetContent as Ls, SheetHeader as da, SheetTitle as fa, SheetDescription as ha, DropdownMenu as Nn, DropdownMenuTrigger as Cn, DropdownMenuContent as Gn, DropdownMenuItem as de, Separator as ga, TooltipProvider as Ns, SheetTrigger as ma, Skeleton as Dt, Dialog as Cs, HoverCard as Ea, HoverCardTrigger as pa, HoverCardContent as ya, AlertDialog as Aa, AlertDialogTrigger as Ta, AlertDialogContent as Sa, AlertDialogHeader as _a, AlertDialogTitle as Pa, AlertDialogDescription as wa, AlertDialogFooter as va, AlertDialogCancel as ba, AlertDialogAction as Ia, Popover as La, PopoverTrigger as Na, DialogContent as Ca, DialogHeader as Ga, DialogTitle as Da, Tabs as Oa, TabsList as xa, TabsTrigger as on, TabsContent as ln, Textarea as Yn, Alert as Ra, AlertDescription as ka } from "@chaibuilder/sdk/ui";
|
|
14
|
+
import { LogsIcon as Ua, Folder as Ma, Languages as Jn, ChevronDown as pn, Star as Ba, Plus as Gs, History as Fa, Play as Ka, Palette as Va, CheckCircle as Ha, Loader as Ht, Save as qa, Send as Zn, Rocket as Xn, CopyPlusIcon as $a, Pencil as Qa, Power as za, Trash as Wa, SquareLibrary as es, Hash as ja, File as Ya, MoreHorizontal as ts, ExternalLink as Ja, LanguagesIcon as Za, User as Xa, X as ns, Trash2 as ei, ImageIcon as ss, Code as ti, Eye as ni, Share2 as si, FileCode2 as ri, AlertTriangle as ai } from "lucide-react";
|
|
15
15
|
import { toast as k } from "sonner";
|
|
16
|
-
import { useRegisteredChaiBlocks as
|
|
17
|
-
import { loadWebBlocks as
|
|
18
|
-
const
|
|
16
|
+
import { useRegisteredChaiBlocks as ii, getDefaultBlockProps as oi } from "@chaibuilder/runtime";
|
|
17
|
+
import { loadWebBlocks as li } from "@chaibuilder/sdk/web-blocks";
|
|
18
|
+
const Ot = {
|
|
19
19
|
ab: "Abkhazian",
|
|
20
20
|
aa: "Afar",
|
|
21
21
|
af: "Afrikaans",
|
|
@@ -267,10 +267,10 @@ const Dt = {
|
|
|
267
267
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
268
268
|
GET_ASSETS: "GET_ASSETS",
|
|
269
269
|
GET_ASSET: "GET_ASSET"
|
|
270
|
-
},
|
|
271
|
-
const [n] =
|
|
270
|
+
}, ci = Ee({}), Dn = () => oe(ci), le = (e, t) => {
|
|
271
|
+
const [n] = Dn();
|
|
272
272
|
return q(() => H(n, e, t), [n, e, t]);
|
|
273
|
-
},
|
|
273
|
+
}, N = () => le("apiUrl", "/chai/api"), Ds = () => le("usersApiUrl", "/chai/users"), zc = () => le("assetsApiUrl", "/chai/assets"), Os = () => le("websocket", null), xs = async (e, t, n = {}) => await fetch(e, {
|
|
274
274
|
method: "POST",
|
|
275
275
|
headers: {
|
|
276
276
|
"Content-Type": "application/json",
|
|
@@ -281,14 +281,14 @@ const Dt = {
|
|
|
281
281
|
if (import.meta.vitest) {
|
|
282
282
|
const { it: e, expect: t } = import.meta.vitest;
|
|
283
283
|
e("should fetch API", async () => {
|
|
284
|
-
const n = await
|
|
284
|
+
const n = await xs("/v1/api/chai", {
|
|
285
285
|
action: "test"
|
|
286
286
|
});
|
|
287
287
|
t(n).toBeDefined();
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
|
-
const
|
|
291
|
-
const e =
|
|
290
|
+
const Wc = () => {
|
|
291
|
+
const e = b(), t = N();
|
|
292
292
|
return z(
|
|
293
293
|
async ({
|
|
294
294
|
body: n,
|
|
@@ -298,13 +298,13 @@ const qc = () => {
|
|
|
298
298
|
}) => e(r, n, s, a),
|
|
299
299
|
[e]
|
|
300
300
|
);
|
|
301
|
-
},
|
|
302
|
-
const e = le("onLogout"), t = le("getAccessToken"), n =
|
|
301
|
+
}, b = () => {
|
|
302
|
+
const e = le("onLogout"), t = le("getAccessToken"), n = N();
|
|
303
303
|
return z(
|
|
304
304
|
async (s = n, r, a = {}, i = !1) => {
|
|
305
305
|
const o = await t();
|
|
306
306
|
try {
|
|
307
|
-
const l = H(r, "action", "").toLowerCase(), d = await
|
|
307
|
+
const l = H(r, "action", "").toLowerCase(), d = await xs(s + (l ? `?action=${l}` : ""), r, {
|
|
308
308
|
...a,
|
|
309
309
|
Authorization: `Bearer ${o}`
|
|
310
310
|
});
|
|
@@ -329,7 +329,7 @@ const qc = () => {
|
|
|
329
329
|
[e, t]
|
|
330
330
|
);
|
|
331
331
|
};
|
|
332
|
-
function
|
|
332
|
+
function ve() {
|
|
333
333
|
const [e, t] = K(
|
|
334
334
|
new URLSearchParams(window.location.search)
|
|
335
335
|
);
|
|
@@ -343,8 +343,8 @@ function we() {
|
|
|
343
343
|
}, []), [e, t];
|
|
344
344
|
}
|
|
345
345
|
const Me = (e) => {
|
|
346
|
-
const t =
|
|
347
|
-
return
|
|
346
|
+
const t = N(), [n] = ve(), s = e ?? n.get("page"), r = b();
|
|
347
|
+
return re({
|
|
348
348
|
queryKey: [E.GET_LANGUAGE_PAGES, s],
|
|
349
349
|
staleTime: 1 / 0,
|
|
350
350
|
gcTime: 0,
|
|
@@ -355,25 +355,25 @@ const Me = (e) => {
|
|
|
355
355
|
action: E.GET_LANGUAGE_PAGES,
|
|
356
356
|
data: { id: s }
|
|
357
357
|
});
|
|
358
|
-
return
|
|
358
|
+
return Ur(Mr(a, "primaryPage"));
|
|
359
359
|
},
|
|
360
360
|
enabled: !!s
|
|
361
361
|
});
|
|
362
|
-
},
|
|
362
|
+
}, ui = Ee(
|
|
363
363
|
null
|
|
364
|
-
),
|
|
365
|
-
const [e] =
|
|
364
|
+
), Rs = () => oe(ui), On = () => {
|
|
365
|
+
const [e] = Rs();
|
|
366
366
|
return (e == null ? void 0 : e.slug) || "";
|
|
367
367
|
};
|
|
368
|
-
function
|
|
368
|
+
function di(e, t) {
|
|
369
369
|
const [n, s] = K(e);
|
|
370
370
|
return ne(() => {
|
|
371
371
|
const r = setTimeout(() => s(e), t);
|
|
372
372
|
return () => clearTimeout(r);
|
|
373
373
|
}, [e, t]), n;
|
|
374
374
|
}
|
|
375
|
-
const
|
|
376
|
-
const { selectedLang: n, fallbackLang: s } =
|
|
375
|
+
const fi = ({ query: e, uuid: t }) => {
|
|
376
|
+
const { selectedLang: n, fallbackLang: s } = Pe(), { data: r } = ce(), a = r == null ? void 0 : r.pageType, i = N(), o = b(), { data: l, isFetching: d } = re({
|
|
377
377
|
queryKey: [E.GET_DYNAMIC_PAGES, e, a, t],
|
|
378
378
|
staleTime: 60 * 60 * 1e3,
|
|
379
379
|
placeholderData: [],
|
|
@@ -384,13 +384,13 @@ const ui = ({ query: e, uuid: t }) => {
|
|
|
384
384
|
enabled: !!a
|
|
385
385
|
}), u = q(() => n === "" ? l.filter((f) => f.lang === "" || f.lang === s) : l.filter((f) => f.lang === n), [n, s, l]);
|
|
386
386
|
return { allLangPages: l, data: u, isFetching: d };
|
|
387
|
-
},
|
|
388
|
-
const { selectedLang: e, fallbackLang: t } =
|
|
387
|
+
}, hi = () => {
|
|
388
|
+
const { selectedLang: e, fallbackLang: t } = Pe(), [n, s] = Rs(), [r, a] = K(""), i = di(r, 500), { allLangPages: o, data: l, isFetching: d } = fi({ 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, T = h ? n == null ? void 0 : n.id : n == null ? void 0 : n.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, O = o.filter(
|
|
391
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
|
-
s(
|
|
393
|
+
s(O || n);
|
|
394
394
|
}, [n, e, o, s, t]);
|
|
395
395
|
return {
|
|
396
396
|
isFetching: d,
|
|
@@ -403,18 +403,18 @@ const ui = ({ query: e, uuid: t }) => {
|
|
|
403
403
|
updateSearchQuery: f,
|
|
404
404
|
onChangeLanguage: g
|
|
405
405
|
};
|
|
406
|
-
},
|
|
407
|
-
const [e] =
|
|
408
|
-
return { data: q(() => ({ ...
|
|
406
|
+
}, gi = Ee({ lastSaved: void 0 }), ks = () => oe(gi), ce = () => {
|
|
407
|
+
const [e] = ve(), t = e.get("page"), { data: n, isFetching: s } = Me();
|
|
408
|
+
return { data: q(() => ({ ...ie(n, { id: t }) || {} }), [n, t]), isFetching: s };
|
|
409
409
|
}, Ne = () => {
|
|
410
|
-
const [e] =
|
|
411
|
-
return { data: q(() =>
|
|
412
|
-
},
|
|
413
|
-
const { data: e } = Ne(), t =
|
|
410
|
+
const [e] = ve(), t = e.get("lang") ?? "", { data: n, isFetching: s } = Me();
|
|
411
|
+
return { data: q(() => ie(n, { lang: t }) || {}, [n, t]), isFetching: s };
|
|
412
|
+
}, mi = Ee({}), Ei = () => oe(mi), pi = () => {
|
|
413
|
+
const { data: e } = Ne(), t = On(), n = le("getLiveUrl", As), s = e == null ? void 0 : e.slug, r = n(s || "/");
|
|
414
414
|
return t ? r + t : r;
|
|
415
415
|
}, Be = () => {
|
|
416
|
-
const e =
|
|
417
|
-
return
|
|
416
|
+
const e = N(), t = b();
|
|
417
|
+
return re({
|
|
418
418
|
queryKey: [E.GET_WEBSITE_DRAFT_SETTINGS],
|
|
419
419
|
staleTime: 5 * 60 * 1e3,
|
|
420
420
|
placeholderData: {
|
|
@@ -430,7 +430,7 @@ const ui = ({ query: e, uuid: t }) => {
|
|
|
430
430
|
})
|
|
431
431
|
});
|
|
432
432
|
};
|
|
433
|
-
function
|
|
433
|
+
function Us(e, t, n = !1) {
|
|
434
434
|
const s = e.toString() ? `?${e.toString()}` : "/";
|
|
435
435
|
n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
436
436
|
}
|
|
@@ -457,7 +457,7 @@ const xn = Ee(null), Rn = () => {
|
|
|
457
457
|
FORCE_TAKE_OVER_REQUEST: "FORCE_TAKE_OVER_REQUEST",
|
|
458
458
|
CONTINUE_EDITING_IN_THIS_CLIENT: "CONTINUE_EDITING_IN_THIS_CLIENT",
|
|
459
459
|
CONTINUE_EDITING_IN_THIS_TAB_REQUEST: "CONTINUE_EDITING_IN_THIS_TAB_REQUEST"
|
|
460
|
-
},
|
|
460
|
+
}, yi = ["sync", "join", "leave"], Ai = [
|
|
461
461
|
se.FORCE_TAKE_OVER,
|
|
462
462
|
se.TAKE_OVER_REQUEST,
|
|
463
463
|
se.TAKE_OVER_APPROVED,
|
|
@@ -465,52 +465,52 @@ const xn = Ee(null), Rn = () => {
|
|
|
465
465
|
se.FORCE_TAKE_OVER_REQUEST,
|
|
466
466
|
se.CONTINUE_EDITING_IN_THIS_CLIENT,
|
|
467
467
|
se.CONTINUE_EDITING_IN_THIS_TAB_REQUEST
|
|
468
|
-
],
|
|
469
|
-
const t = {}, n =
|
|
468
|
+
], Ti = Ee({}), Ms = Ee(null), Si = Ee(te.CHECKING), _i = Ee({}), Pi = (e) => {
|
|
469
|
+
const t = {}, n = Br(Ts(e).map(Ss).filter(Boolean), "pageId");
|
|
470
470
|
return Object.entries(n).forEach(
|
|
471
|
-
([s, r]) => t[s] =
|
|
471
|
+
([s, r]) => t[s] = _s(r, "onlineAt")
|
|
472
472
|
), t;
|
|
473
|
-
},
|
|
474
|
-
const t =
|
|
473
|
+
}, wi = (e) => {
|
|
474
|
+
const t = _s(Ts(e).map(Ss).filter(Boolean), "onlineAt"), n = t == null ? void 0 : t.onlineAt;
|
|
475
475
|
return n ? n - 100 : +/* @__PURE__ */ new Date() - 1e3 * 60 * 60 * 4;
|
|
476
476
|
}, en = () => {
|
|
477
477
|
const { user: e } = Rn();
|
|
478
478
|
return e == null ? void 0 : e.id;
|
|
479
|
-
},
|
|
479
|
+
}, vi = () => {
|
|
480
480
|
const { data: e } = Be();
|
|
481
481
|
return `WEBSITE:${e == null ? void 0 : e.appKey}`;
|
|
482
|
-
},
|
|
482
|
+
}, Lt = () => {
|
|
483
483
|
const { data: e } = ce();
|
|
484
484
|
return e == null ? void 0 : e.id;
|
|
485
485
|
}, Ue = crypto.randomUUID();
|
|
486
486
|
let cn = null;
|
|
487
|
-
const
|
|
488
|
-
const [e, t] =
|
|
487
|
+
const Bs = () => {
|
|
488
|
+
const [e, t] = oe(Ti);
|
|
489
489
|
return { pageToUser: e, setPageToUser: t };
|
|
490
490
|
}, pe = () => {
|
|
491
|
-
const [e, t] =
|
|
491
|
+
const [e, t] = oe(Si), n = [te.LOCKED, te.ACTIVE_IN_ANOTHER_TAB].includes(e), s = [te.EDITING].includes(e);
|
|
492
492
|
return { pageStatus: e, setPageStatus: t, isLocked: n, isEditing: s };
|
|
493
|
-
},
|
|
494
|
-
const [e, t] =
|
|
493
|
+
}, Fs = () => {
|
|
494
|
+
const [e, t] = oe(_i);
|
|
495
495
|
return { pageLockMeta: e, setPageLockMeta: t };
|
|
496
|
-
},
|
|
497
|
-
const e =
|
|
496
|
+
}, bi = () => {
|
|
497
|
+
const e = Lt(), { pageToUser: t } = Bs();
|
|
498
498
|
return q(() => t[e], [t, e]);
|
|
499
499
|
}, kn = () => {
|
|
500
|
-
const e = Os(), { setPageStatus: t } = pe(), [n] =
|
|
500
|
+
const e = Os(), { setPageStatus: t } = pe(), [n] = oe(Ms);
|
|
501
501
|
return ne(() => {
|
|
502
502
|
if (clearTimeout(cn), !e)
|
|
503
503
|
return cn = setTimeout(() => {
|
|
504
504
|
e || t(te.EDITING);
|
|
505
505
|
}, 500), () => clearTimeout(cn);
|
|
506
506
|
}, [e, t]), n;
|
|
507
|
-
},
|
|
508
|
-
const e =
|
|
507
|
+
}, Ii = () => {
|
|
508
|
+
const e = Lt(), t = en(), n = kn(), { setPageToUser: s } = Bs(), { setPageStatus: r, pageStatus: a } = pe(), i = Ie(e);
|
|
509
509
|
return i.current = e, z(
|
|
510
510
|
(o) => {
|
|
511
511
|
const l = o || n;
|
|
512
512
|
if (!l) return [];
|
|
513
|
-
const d = l == null ? void 0 : l.presenceState(), u =
|
|
513
|
+
const d = l == null ? void 0 : l.presenceState(), u = Pi(d);
|
|
514
514
|
s(u);
|
|
515
515
|
const f = u[i.current];
|
|
516
516
|
if (!f)
|
|
@@ -525,8 +525,8 @@ const Ms = () => {
|
|
|
525
525
|
},
|
|
526
526
|
[n, s, r, t, a]
|
|
527
527
|
);
|
|
528
|
-
},
|
|
529
|
-
const e = en(), t =
|
|
528
|
+
}, Li = () => {
|
|
529
|
+
const e = en(), t = Lt(), n = kn(), s = bi(), { setPageLockMeta: r } = Fs(), a = Ie(t);
|
|
530
530
|
return a.current = t, z(
|
|
531
531
|
async (i, o) => {
|
|
532
532
|
if (!n) return;
|
|
@@ -535,8 +535,8 @@ const Ms = () => {
|
|
|
535
535
|
},
|
|
536
536
|
[n, e, s, r]
|
|
537
537
|
);
|
|
538
|
-
},
|
|
539
|
-
const e = en(), t =
|
|
538
|
+
}, Ni = () => {
|
|
539
|
+
const e = en(), t = Lt(), n = kn(), { setPageStatus: s } = pe(), { setPageLockMeta: r } = Fs(), a = Li(), i = Ie(t), { savePageAsync: o } = ke();
|
|
540
540
|
return i.current = t, z(
|
|
541
541
|
(l) => async ({ payload: d }) => {
|
|
542
542
|
const u = d || {};
|
|
@@ -557,7 +557,7 @@ const Ms = () => {
|
|
|
557
557
|
break;
|
|
558
558
|
}
|
|
559
559
|
case se.CONTINUE_EDITING_IN_THIS_CLIENT: {
|
|
560
|
-
const f =
|
|
560
|
+
const f = wi(n == null ? void 0 : n.presenceState());
|
|
561
561
|
s(te.CHECKING), await (n == null ? void 0 : n.track({ onlineAt: f, pageId: i.current, userId: e, clientId: Ue }));
|
|
562
562
|
break;
|
|
563
563
|
}
|
|
@@ -569,8 +569,8 @@ const Ms = () => {
|
|
|
569
569
|
},
|
|
570
570
|
[a, r, s, n, e, o]
|
|
571
571
|
);
|
|
572
|
-
},
|
|
573
|
-
const e = Os(), t = en(), n =
|
|
572
|
+
}, jc = () => {
|
|
573
|
+
const e = Os(), t = en(), n = Lt(), s = vi(), [r, a] = oe(Ms), i = Ni(), o = Ii(), l = Ie(i), d = Ie(o);
|
|
574
574
|
ne(() => {
|
|
575
575
|
l.current = i, d.current = o;
|
|
576
576
|
}, [i, o]), ne(() => {
|
|
@@ -585,11 +585,11 @@ const Ms = () => {
|
|
|
585
585
|
const u = e.channel(s, {
|
|
586
586
|
config: { presence: { key: Ue } }
|
|
587
587
|
});
|
|
588
|
-
return
|
|
588
|
+
return Ai.forEach((f) => {
|
|
589
589
|
u.on("broadcast", { event: f }, (g) => {
|
|
590
590
|
l.current(f)(g);
|
|
591
591
|
});
|
|
592
|
-
}),
|
|
592
|
+
}), yi.forEach((f) => {
|
|
593
593
|
u.on("presence", { event: f }, () => {
|
|
594
594
|
d.current(u);
|
|
595
595
|
});
|
|
@@ -612,42 +612,42 @@ const Ms = () => {
|
|
|
612
612
|
() => (e == null ? void 0 : e.fallbackLang) || "en",
|
|
613
613
|
[e]
|
|
614
614
|
);
|
|
615
|
-
},
|
|
616
|
-
const e =
|
|
617
|
-
return
|
|
615
|
+
}, Ks = () => {
|
|
616
|
+
const e = b(), t = N();
|
|
617
|
+
return re({
|
|
618
618
|
queryKey: [E.GET_WEBSITE_PAGES],
|
|
619
619
|
staleTime: 1e3 * 60 * 5,
|
|
620
620
|
queryFn: async () => e(t, { action: E.GET_WEBSITE_PAGES }) || [],
|
|
621
621
|
placeholderData: (n) => n || []
|
|
622
622
|
});
|
|
623
|
-
},
|
|
624
|
-
const t =
|
|
625
|
-
return
|
|
623
|
+
}, Yc = (e) => {
|
|
624
|
+
const t = b(), n = N(), s = Un();
|
|
625
|
+
return re({
|
|
626
626
|
queryKey: [E.GET_WEBSITE_PAGES, e, s],
|
|
627
627
|
staleTime: 1e3 * 60 * 5,
|
|
628
628
|
enabled: !!e,
|
|
629
629
|
queryFn: async () => {
|
|
630
630
|
if (s === e) return {};
|
|
631
631
|
const r = await t(n, { action: E.GET_WEBSITE_PAGES, data: { lang: e } }) || [];
|
|
632
|
-
return
|
|
632
|
+
return Fr(
|
|
633
633
|
Kt(r, (a) => ({ ...a, lang: e })),
|
|
634
634
|
"primaryPage"
|
|
635
635
|
);
|
|
636
636
|
},
|
|
637
637
|
placeholderData: (r) => r || {}
|
|
638
638
|
});
|
|
639
|
-
},
|
|
640
|
-
const { t } =
|
|
639
|
+
}, Ci = V(() => import("./page-manager-new-C8PGR_4a.js")), Vs = ({ children: e }) => {
|
|
640
|
+
const { t } = we(), [n, s] = ve(), r = n.get("page"), { data: a, isFetching: i } = ce(), { data: o, isFetching: l } = Ks(), [d, u] = K(!1), [f, g] = K(!0), { savePage: h } = ke(), p = !!r && !Se(a), { isLocked: T } = pe(), S = q(() => {
|
|
641
641
|
if (!o || l) return !1;
|
|
642
642
|
const v = o.find((U) => U.slug === "/");
|
|
643
643
|
return v == null ? void 0 : v.id;
|
|
644
644
|
}, [o, l]);
|
|
645
645
|
ne(() => {
|
|
646
|
-
if (l || !S || o.some((
|
|
646
|
+
if (l || !S || o.some((I) => I.id === r)) return;
|
|
647
647
|
const U = new URLSearchParams({ page: S });
|
|
648
|
-
|
|
648
|
+
Us(U, s), !l && o && g(!1);
|
|
649
649
|
}, [r, l, o, S, s]);
|
|
650
|
-
const
|
|
650
|
+
const O = !f && !r, y = !f && !i && Se(a), w = d || O || y;
|
|
651
651
|
return /* @__PURE__ */ m(ge, { children: [
|
|
652
652
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ c("div", { className: "relative", children: /* @__PURE__ */ m(Jt, { children: [
|
|
653
653
|
/* @__PURE__ */ c(
|
|
@@ -657,53 +657,53 @@ const Ms = () => {
|
|
|
657
657
|
onClick: () => {
|
|
658
658
|
T || h(), u(!0);
|
|
659
659
|
},
|
|
660
|
-
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(
|
|
660
|
+
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(Ua, { className: "h-4 w-4" }) }, "template-viewer")
|
|
661
661
|
}
|
|
662
662
|
),
|
|
663
663
|
/* @__PURE__ */ c(Xt, { side: "right", children: /* @__PURE__ */ c("p", { children: t("Open pages manager") }) })
|
|
664
664
|
] }) }) }),
|
|
665
|
-
/* @__PURE__ */ c(
|
|
666
|
-
|
|
665
|
+
/* @__PURE__ */ c(Is, { open: w, onOpenChange: (v) => !v && p && u(!1), children: /* @__PURE__ */ m(
|
|
666
|
+
Ls,
|
|
667
667
|
{
|
|
668
668
|
side: "left",
|
|
669
669
|
"aria-describedby": "pages-manager-description",
|
|
670
670
|
className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${p ? "" : "sheet-hide-close-btn"}`,
|
|
671
671
|
children: [
|
|
672
|
-
/* @__PURE__ */ m(
|
|
673
|
-
/* @__PURE__ */ m(
|
|
674
|
-
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(
|
|
672
|
+
/* @__PURE__ */ m(da, { className: "mb-3 px-4 pt-4", children: [
|
|
673
|
+
/* @__PURE__ */ m(fa, { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
674
|
+
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(Ma, { className: "h-4 w-4" }) }),
|
|
675
675
|
/* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
676
676
|
/* @__PURE__ */ c("span", { className: "text-sm font-semibold", children: t("Pages") }),
|
|
677
677
|
/* @__PURE__ */ c("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: t("Manage your site structure") })
|
|
678
678
|
] })
|
|
679
679
|
] }),
|
|
680
|
-
/* @__PURE__ */ c(
|
|
680
|
+
/* @__PURE__ */ c(ha, { className: "sr-only", children: t("Manage your site structure") })
|
|
681
681
|
] }),
|
|
682
|
-
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: w && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
682
|
+
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: w && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(Ci, { close: () => u(!1) }) }) })
|
|
683
683
|
]
|
|
684
684
|
}
|
|
685
685
|
) })
|
|
686
686
|
] });
|
|
687
|
-
},
|
|
687
|
+
}, Gi = V(() => import("./add-new-language-page-BfPVFqO4.js")), Di = () => {
|
|
688
688
|
const e = le("topLeftCorner", null);
|
|
689
|
-
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children:
|
|
690
|
-
},
|
|
689
|
+
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Yr.createElement(e, {}) }) : null;
|
|
690
|
+
}, Oi = ({
|
|
691
691
|
showAdd: e = !0,
|
|
692
692
|
variant: t = "ghost",
|
|
693
693
|
goToDefaultLang: n = !1
|
|
694
694
|
}) => {
|
|
695
|
-
const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } =
|
|
695
|
+
const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } = Pe(), o = Se(a) ? s : a, [, l] = ve(), { isLocked: d } = pe(), { t: u } = we();
|
|
696
696
|
ne(() => {
|
|
697
697
|
const y = new URLSearchParams(window.location.search), w = y.get("lang");
|
|
698
698
|
w && (r.includes(w) ? i(w) : (y.delete("lang"), l(y), i("")));
|
|
699
699
|
}, [r, l, i]);
|
|
700
|
-
const [, f] =
|
|
701
|
-
const y =
|
|
700
|
+
const [, f] = oe(xn), { data: g } = ce(), { data: h } = Be(), { data: p } = Me(), T = q(() => {
|
|
701
|
+
const y = Ps(
|
|
702
702
|
Kt(H(h, "languages"), (w) => {
|
|
703
|
-
const v =
|
|
703
|
+
const v = ie(p, { lang: w });
|
|
704
704
|
return {
|
|
705
705
|
key: w,
|
|
706
|
-
value: H(
|
|
706
|
+
value: H(Ot, w, w),
|
|
707
707
|
isLangPageAdded: !!v
|
|
708
708
|
};
|
|
709
709
|
})
|
|
@@ -711,7 +711,7 @@ const Ms = () => {
|
|
|
711
711
|
return [
|
|
712
712
|
{
|
|
713
713
|
key: s,
|
|
714
|
-
value: H(
|
|
714
|
+
value: H(Ot, s),
|
|
715
715
|
isLangPageAdded: !0
|
|
716
716
|
},
|
|
717
717
|
...y
|
|
@@ -722,23 +722,23 @@ const Ms = () => {
|
|
|
722
722
|
detail: {
|
|
723
723
|
fromLang: o,
|
|
724
724
|
toLang: y,
|
|
725
|
-
switchHandler: () =>
|
|
725
|
+
switchHandler: () => O(y)
|
|
726
726
|
}
|
|
727
727
|
});
|
|
728
728
|
window.dispatchEvent(v);
|
|
729
729
|
return;
|
|
730
730
|
}
|
|
731
|
-
|
|
732
|
-
},
|
|
731
|
+
O(y);
|
|
732
|
+
}, O = (y) => {
|
|
733
733
|
i(y);
|
|
734
734
|
const w = new URLSearchParams(window.location.search);
|
|
735
|
-
y === s ? w.delete("lang") : w.set("lang", y),
|
|
735
|
+
y === s ? w.delete("lang") : w.set("lang", y), Us(w, l);
|
|
736
736
|
};
|
|
737
|
-
return
|
|
738
|
-
/* @__PURE__ */ c(
|
|
739
|
-
H(
|
|
737
|
+
return Se(r) ? null : d ? /* @__PURE__ */ m(M, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
|
|
738
|
+
/* @__PURE__ */ c(Jn, { className: "h-4 w-4" }),
|
|
739
|
+
H(Ot, o, o),
|
|
740
740
|
/* @__PURE__ */ c(pn, { className: "h-4 w-4" })
|
|
741
|
-
] }) : n ? /* @__PURE__ */ c(M, { onClick: () =>
|
|
741
|
+
] }) : n ? /* @__PURE__ */ c(M, { onClick: () => O(s), variant: "link", size: "sm", children: u("Switch to default language") }) : /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ m(Nn, { children: [
|
|
742
742
|
/* @__PURE__ */ c(Cn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
|
|
743
743
|
M,
|
|
744
744
|
{
|
|
@@ -747,8 +747,8 @@ const Ms = () => {
|
|
|
747
747
|
size: "sm",
|
|
748
748
|
className: "ml-px h-max gap-2 py-1.5",
|
|
749
749
|
children: [
|
|
750
|
-
/* @__PURE__ */ c(
|
|
751
|
-
H(
|
|
750
|
+
/* @__PURE__ */ c(Jn, { className: "h-4 w-4" }),
|
|
751
|
+
H(Ot, o, o),
|
|
752
752
|
/* @__PURE__ */ c(pn, { className: "h-4 w-4" })
|
|
753
753
|
]
|
|
754
754
|
}
|
|
@@ -757,7 +757,7 @@ const Ms = () => {
|
|
|
757
757
|
Kt(
|
|
758
758
|
T.filter((y) => y.isLangPageAdded),
|
|
759
759
|
(y) => /* @__PURE__ */ m(
|
|
760
|
-
|
|
760
|
+
de,
|
|
761
761
|
{
|
|
762
762
|
className: Vt(
|
|
763
763
|
"flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
|
|
@@ -767,7 +767,7 @@ const Ms = () => {
|
|
|
767
767
|
children: [
|
|
768
768
|
/* @__PURE__ */ c("div", { className: "text-slate-600", children: y.value }),
|
|
769
769
|
y.key === s && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
|
|
770
|
-
/* @__PURE__ */ c(
|
|
770
|
+
/* @__PURE__ */ c(Ba, { fill: "orange", className: "h-2 w-2" }),
|
|
771
771
|
"Primary"
|
|
772
772
|
] })
|
|
773
773
|
]
|
|
@@ -775,8 +775,8 @@ const Ms = () => {
|
|
|
775
775
|
y.value
|
|
776
776
|
)
|
|
777
777
|
),
|
|
778
|
-
e && !
|
|
779
|
-
/* @__PURE__ */ c(
|
|
778
|
+
e && !Se(T.filter((y) => !y.isLangPageAdded)) && /* @__PURE__ */ m(ge, { children: [
|
|
779
|
+
/* @__PURE__ */ c(ga, {}),
|
|
780
780
|
/* @__PURE__ */ m(
|
|
781
781
|
M,
|
|
782
782
|
{
|
|
@@ -790,7 +790,7 @@ const Ms = () => {
|
|
|
790
790
|
},
|
|
791
791
|
className: "text-xs font-normal duration-200 hover:bg-slate-300 hover:text-slate-800",
|
|
792
792
|
children: [
|
|
793
|
-
/* @__PURE__ */ c(
|
|
793
|
+
/* @__PURE__ */ c(Gs, { className: "mr-1 h-3 w-3" }),
|
|
794
794
|
" Add Langauge"
|
|
795
795
|
]
|
|
796
796
|
}
|
|
@@ -799,13 +799,13 @@ const Ms = () => {
|
|
|
799
799
|
] })
|
|
800
800
|
] }) });
|
|
801
801
|
};
|
|
802
|
-
function
|
|
803
|
-
const [e, t] =
|
|
802
|
+
function xi() {
|
|
803
|
+
const [e, t] = oe(xn);
|
|
804
804
|
return /* @__PURE__ */ m("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
|
|
805
|
-
/* @__PURE__ */ c(
|
|
806
|
-
/* @__PURE__ */ c(
|
|
805
|
+
/* @__PURE__ */ c(Di, {}),
|
|
806
|
+
/* @__PURE__ */ c(Vs, {}),
|
|
807
807
|
e && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
808
|
-
|
|
808
|
+
Gi,
|
|
809
809
|
{
|
|
810
810
|
isOpen: !0,
|
|
811
811
|
id: e == null ? void 0 : e.id,
|
|
@@ -817,29 +817,29 @@ function Oi() {
|
|
|
817
817
|
) })
|
|
818
818
|
] });
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function Ri() {
|
|
821
821
|
return /* @__PURE__ */ c("div", { className: "mt-2 space-y-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ m("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
|
|
822
822
|
/* @__PURE__ */ m("div", { className: "flex-1 space-y-1", children: [
|
|
823
|
-
/* @__PURE__ */ c(
|
|
824
|
-
/* @__PURE__ */ c(
|
|
825
|
-
/* @__PURE__ */ c(
|
|
823
|
+
/* @__PURE__ */ c(Dt, { className: "h-4 w-3/4" }),
|
|
824
|
+
/* @__PURE__ */ c(Dt, { className: "h-3 w-1/2" }),
|
|
825
|
+
/* @__PURE__ */ c(Dt, { className: "mt-1 h-5 w-20" })
|
|
826
826
|
] }),
|
|
827
|
-
/* @__PURE__ */ c(
|
|
827
|
+
/* @__PURE__ */ c(Dt, { className: "h-8 w-8 rounded-full" })
|
|
828
828
|
] }, t)) });
|
|
829
829
|
}
|
|
830
|
-
const
|
|
831
|
-
function
|
|
830
|
+
const ki = Q.lazy(() => import("./page-revisions-content-BvYTXKgT.js"));
|
|
831
|
+
function Ui() {
|
|
832
832
|
const [e, t] = Q.useState(!1);
|
|
833
|
-
return /* @__PURE__ */ c(
|
|
834
|
-
/* @__PURE__ */ m(
|
|
835
|
-
/* @__PURE__ */ c(
|
|
833
|
+
return /* @__PURE__ */ c(Ns, { children: /* @__PURE__ */ m(Jt, { delayDuration: 0, children: [
|
|
834
|
+
/* @__PURE__ */ m(Is, { open: e, onOpenChange: t, children: [
|
|
835
|
+
/* @__PURE__ */ c(ma, { asChild: !0, children: /* @__PURE__ */ c(Zt, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
|
|
836
836
|
/* @__PURE__ */ m(M, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
|
|
837
|
-
/* @__PURE__ */ c(
|
|
837
|
+
/* @__PURE__ */ c(Fa, { className: "h-4 w-4" }),
|
|
838
838
|
/* @__PURE__ */ c("span", { className: "sr-only", children: "View revision history" })
|
|
839
839
|
] }),
|
|
840
840
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
841
841
|
] }) }) }),
|
|
842
|
-
/* @__PURE__ */ c(
|
|
842
|
+
/* @__PURE__ */ c(Ls, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(X, { fallback: /* @__PURE__ */ c(Ri, {}), children: /* @__PURE__ */ c(ki, { isOpen: e }) }) })
|
|
843
843
|
] }),
|
|
844
844
|
/* @__PURE__ */ c(Xt, { side: "bottom", children: /* @__PURE__ */ c("p", { children: "Revision history" }) })
|
|
845
845
|
] }) });
|
|
@@ -850,23 +850,23 @@ const un = ({
|
|
|
850
850
|
children: n,
|
|
851
851
|
fallback: s = null
|
|
852
852
|
}) => {
|
|
853
|
-
const { hasPermission: r } =
|
|
853
|
+
const { hasPermission: r } = bs();
|
|
854
854
|
return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
|
|
855
|
-
},
|
|
855
|
+
}, Mi = {
|
|
856
856
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
857
857
|
}, Ce = () => {
|
|
858
|
-
const e =
|
|
859
|
-
return
|
|
858
|
+
const e = N(), t = b();
|
|
859
|
+
return re({
|
|
860
860
|
queryKey: [E.GET_PAGE_TYPES],
|
|
861
861
|
staleTime: 1 / 0,
|
|
862
862
|
placeholderData: [],
|
|
863
863
|
queryFn: async () => t(e, { action: E.GET_PAGE_TYPES })
|
|
864
864
|
});
|
|
865
|
-
},
|
|
865
|
+
}, Bi = (e) => {
|
|
866
866
|
const { data: t } = Ce();
|
|
867
867
|
return q(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
|
|
868
|
-
},
|
|
869
|
-
const e =
|
|
868
|
+
}, Fi = () => {
|
|
869
|
+
const e = N(), t = b();
|
|
870
870
|
return Y({
|
|
871
871
|
mutationFn: async ({ pageType: n, query: s }) => {
|
|
872
872
|
try {
|
|
@@ -882,8 +882,8 @@ const un = ({
|
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
884
|
});
|
|
885
|
-
},
|
|
886
|
-
const e =
|
|
885
|
+
}, Jc = () => {
|
|
886
|
+
const e = N(), t = J(), n = b(), { data: s } = Ce();
|
|
887
887
|
return Y({
|
|
888
888
|
mutationFn: async (r) => await n(e, {
|
|
889
889
|
action: E.CREATE_PAGE,
|
|
@@ -898,18 +898,18 @@ const un = ({
|
|
|
898
898
|
})) : t.invalidateQueries({
|
|
899
899
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
900
900
|
});
|
|
901
|
-
const i = a.template ? `Page created from "${a.template.name}" template` : a.hasSlug === !1 ? "New " + ((o =
|
|
901
|
+
const i = a.template ? `Page created from "${a.template.name}" template` : a.hasSlug === !1 ? "New " + ((o = ie(s, { key: a.pageType })) == null ? void 0 : o.name) + " added successfully" : "New page added successfully";
|
|
902
902
|
k.success(i);
|
|
903
903
|
},
|
|
904
904
|
onError: (r, a) => {
|
|
905
|
-
const i =
|
|
905
|
+
const i = ie(s, { key: a.pageType });
|
|
906
906
|
k.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
907
|
-
description: H(
|
|
907
|
+
description: H(Mi, r.message, r.message)
|
|
908
908
|
});
|
|
909
909
|
}
|
|
910
910
|
});
|
|
911
|
-
},
|
|
912
|
-
const e =
|
|
911
|
+
}, Zc = () => {
|
|
912
|
+
const e = N(), t = J(), n = b(), { data: s } = Ne(), { data: r } = Ce();
|
|
913
913
|
return Y({
|
|
914
914
|
mutationFn: async (a) => await n(e, {
|
|
915
915
|
action: E.UPDATE_PAGE,
|
|
@@ -927,14 +927,14 @@ const un = ({
|
|
|
927
927
|
});
|
|
928
928
|
},
|
|
929
929
|
onError: (a, i) => {
|
|
930
|
-
const o =
|
|
930
|
+
const o = ie(r, { key: i.pageType });
|
|
931
931
|
k.error(`Failed to update ${o != null && o.hasSlug ? "page" : o.name}.`, {
|
|
932
932
|
description: a.message
|
|
933
933
|
});
|
|
934
934
|
}
|
|
935
935
|
});
|
|
936
|
-
},
|
|
937
|
-
const e =
|
|
936
|
+
}, Xc = () => {
|
|
937
|
+
const e = N(), t = J(), n = b(), { data: s } = Ce();
|
|
938
938
|
return Y({
|
|
939
939
|
mutationFn: async (r) => n(e, {
|
|
940
940
|
action: E.DELETE_PAGE,
|
|
@@ -956,14 +956,14 @@ const un = ({
|
|
|
956
956
|
});
|
|
957
957
|
},
|
|
958
958
|
onError: (r, a) => {
|
|
959
|
-
const i =
|
|
959
|
+
const i = ie(s, { key: a.pageType });
|
|
960
960
|
k.error(`Failed to delete ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
961
961
|
description: r.message
|
|
962
962
|
});
|
|
963
963
|
}
|
|
964
964
|
});
|
|
965
|
-
},
|
|
966
|
-
const e =
|
|
965
|
+
}, eu = () => {
|
|
966
|
+
const e = N(), t = J(), n = b(), { data: s } = Ce();
|
|
967
967
|
return Y({
|
|
968
968
|
mutationFn: async (r) => n(e, {
|
|
969
969
|
action: E.TAKE_OFFLINE,
|
|
@@ -975,20 +975,20 @@ const un = ({
|
|
|
975
975
|
}) : t.invalidateQueries({
|
|
976
976
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
977
977
|
});
|
|
978
|
-
const i =
|
|
978
|
+
const i = ie(s, { key: a.pageType });
|
|
979
979
|
k.success(
|
|
980
980
|
i != null && i.hasSlug ? "Page unpublished successfully." : "New " + i.name + " added successfully."
|
|
981
981
|
);
|
|
982
982
|
},
|
|
983
983
|
onError: (r, a) => {
|
|
984
|
-
const i =
|
|
984
|
+
const i = ie(s, { key: a.pageType });
|
|
985
985
|
k.error(`Failed to take offline ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
986
986
|
description: r.message
|
|
987
987
|
});
|
|
988
988
|
}
|
|
989
989
|
});
|
|
990
|
-
},
|
|
991
|
-
const e =
|
|
990
|
+
}, Hs = () => {
|
|
991
|
+
const e = N(), t = b(), n = J(), { data: s } = ce(), { savePageAsync: r } = ke();
|
|
992
992
|
return Y({
|
|
993
993
|
mutationFn: async ({ ids: a }) => (await r(), t(e, {
|
|
994
994
|
action: E.PUBLISH_CHANGES,
|
|
@@ -1007,8 +1007,8 @@ const un = ({
|
|
|
1007
1007
|
console.log("##", a), k.error("Failed to publish pages.");
|
|
1008
1008
|
}
|
|
1009
1009
|
});
|
|
1010
|
-
},
|
|
1011
|
-
const e =
|
|
1010
|
+
}, tu = () => {
|
|
1011
|
+
const e = N(), t = b(), n = J();
|
|
1012
1012
|
return Y({
|
|
1013
1013
|
mutationFn: async (s) => {
|
|
1014
1014
|
var r;
|
|
@@ -1032,8 +1032,8 @@ const un = ({
|
|
|
1032
1032
|
k.error("Failed to mark page as template.");
|
|
1033
1033
|
}
|
|
1034
1034
|
});
|
|
1035
|
-
},
|
|
1036
|
-
const e =
|
|
1035
|
+
}, nu = () => {
|
|
1036
|
+
const e = N(), t = b(), n = J();
|
|
1037
1037
|
return Y({
|
|
1038
1038
|
mutationFn: async (s) => t(e, {
|
|
1039
1039
|
action: E.UNMARK_AS_TEMPLATE,
|
|
@@ -1048,8 +1048,8 @@ const un = ({
|
|
|
1048
1048
|
k.error("Failed to unmark page as template.");
|
|
1049
1049
|
}
|
|
1050
1050
|
});
|
|
1051
|
-
},
|
|
1052
|
-
const e =
|
|
1051
|
+
}, su = () => {
|
|
1052
|
+
const e = N(), t = b(), n = J();
|
|
1053
1053
|
return Y({
|
|
1054
1054
|
mutationFn: async ({ id: s, slug: r }) => t(e, {
|
|
1055
1055
|
action: E.CHANGE_SLUG,
|
|
@@ -1066,17 +1066,17 @@ const un = ({
|
|
|
1066
1066
|
k.error("Failed to change slug");
|
|
1067
1067
|
}
|
|
1068
1068
|
});
|
|
1069
|
-
},
|
|
1070
|
-
function
|
|
1069
|
+
}, Ki = V(() => import("./publish-pages-content-9VBFj6LH.js"));
|
|
1070
|
+
function Vi({
|
|
1071
1071
|
showModal: e = !1,
|
|
1072
1072
|
onClose: t = () => console.log("Cancelled")
|
|
1073
1073
|
}) {
|
|
1074
|
-
const { mutate: n, isPending: s } =
|
|
1075
|
-
return /* @__PURE__ */ c(
|
|
1076
|
-
} : t, children: e && /* @__PURE__ */ c(X, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(
|
|
1074
|
+
const { mutate: n, isPending: s } = Hs();
|
|
1075
|
+
return /* @__PURE__ */ c(Cs, { open: e, onOpenChange: s ? () => {
|
|
1076
|
+
} : t, children: e && /* @__PURE__ */ c(X, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(Ki, { onClose: t, isPending: s, publishPage: n }) }) });
|
|
1077
1077
|
}
|
|
1078
|
-
const
|
|
1079
|
-
...
|
|
1078
|
+
const ue = {
|
|
1079
|
+
...ta,
|
|
1080
1080
|
//pages
|
|
1081
1081
|
ADD_PAGE: "add_page",
|
|
1082
1082
|
EDIT_PAGE: "edit_page",
|
|
@@ -1112,21 +1112,21 @@ const de = {
|
|
|
1112
1112
|
ADD_MEDIA: "add_media",
|
|
1113
1113
|
EDIT_MEDIA: "edit_media",
|
|
1114
1114
|
DELETE_MEDIA: "delete_media"
|
|
1115
|
-
},
|
|
1116
|
-
const { fallbackLang: t } =
|
|
1115
|
+
}, Hi = (e) => {
|
|
1116
|
+
const { fallbackLang: t } = Pe(), { data: n } = Be(), { data: s, isFetching: r } = Me(), a = q(() => {
|
|
1117
1117
|
const i = { [t]: !0 };
|
|
1118
|
-
return
|
|
1119
|
-
const l =
|
|
1118
|
+
return Kr(H(n, "languages"), (o) => {
|
|
1119
|
+
const l = ie(s, { lang: o });
|
|
1120
1120
|
i[o] = !!l;
|
|
1121
1121
|
}), i;
|
|
1122
1122
|
}, [t, s, n]);
|
|
1123
|
-
return r ||
|
|
1124
|
-
},
|
|
1123
|
+
return r || Se(e) || e && a[e];
|
|
1124
|
+
}, qi = {
|
|
1125
1125
|
particleCount: 350,
|
|
1126
1126
|
spread: 120,
|
|
1127
1127
|
origin: { y: 0.6 },
|
|
1128
1128
|
angle: 90
|
|
1129
|
-
},
|
|
1129
|
+
}, $i = {
|
|
1130
1130
|
TOP_RIGHT: {
|
|
1131
1131
|
angle: 225,
|
|
1132
1132
|
origin: { x: 0.9, y: 0 }
|
|
@@ -1135,14 +1135,14 @@ const de = {
|
|
|
1135
1135
|
angle: 100,
|
|
1136
1136
|
origin: { x: 0.9, y: 0.9 }
|
|
1137
1137
|
}
|
|
1138
|
-
},
|
|
1138
|
+
}, Qi = async () => {
|
|
1139
1139
|
const { default: e } = await import("./confetti.module-DCmCkDyV.js");
|
|
1140
1140
|
return e;
|
|
1141
1141
|
}, dn = (e) => {
|
|
1142
|
-
let t =
|
|
1142
|
+
let t = $i[e];
|
|
1143
1143
|
t || (t = {});
|
|
1144
|
-
const n = { ...
|
|
1145
|
-
|
|
1144
|
+
const n = { ...qi, ...t };
|
|
1145
|
+
Qi().then((s) => s(n));
|
|
1146
1146
|
};
|
|
1147
1147
|
function Mn({
|
|
1148
1148
|
children: e,
|
|
@@ -1151,13 +1151,13 @@ function Mn({
|
|
|
1151
1151
|
delayDuration: s = 700,
|
|
1152
1152
|
showTooltip: r = !0
|
|
1153
1153
|
}) {
|
|
1154
|
-
return r ? /* @__PURE__ */ c(
|
|
1154
|
+
return r ? /* @__PURE__ */ c(Ns, { children: /* @__PURE__ */ m(Jt, { delayDuration: s, children: [
|
|
1155
1155
|
/* @__PURE__ */ c(Zt, { asChild: !0, children: e }),
|
|
1156
1156
|
/* @__PURE__ */ c(Xt, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
|
|
1157
1157
|
] }) }) : e;
|
|
1158
1158
|
}
|
|
1159
|
-
const
|
|
1160
|
-
const { t: e } =
|
|
1159
|
+
const zi = V(() => import("./unpublish-page-c382vh74.js")), Wi = V(() => import("./translation-warning-modal-DalBhNQy.js")), ji = () => {
|
|
1160
|
+
const { t: e } = we(), { selectedLang: t, fallbackLang: n } = Pe(), s = le("getPreviewUrl", async (g) => g), [r, a] = K(""), { data: i } = ce(), { data: o } = Me(), { data: l } = Ce(), d = q(
|
|
1161
1161
|
() => {
|
|
1162
1162
|
var g;
|
|
1163
1163
|
return (g = o == null ? void 0 : o.find((h) => (h == null ? void 0 : h.lang) === t)) == null ? void 0 : g.slug;
|
|
@@ -1165,7 +1165,7 @@ const $i = V(() => import("./unpublish-page-BKQqPk_e.js")), Qi = V(() => import(
|
|
|
1165
1165
|
[t, o]
|
|
1166
1166
|
), u = z((g) => {
|
|
1167
1167
|
var h;
|
|
1168
|
-
return (h =
|
|
1168
|
+
return (h = ie(l, { key: g })) == null ? void 0 : h.hasSlug;
|
|
1169
1169
|
}, [l]), f = t === n ? "" : t;
|
|
1170
1170
|
return ne(() => {
|
|
1171
1171
|
(async () => {
|
|
@@ -1177,9 +1177,9 @@ const $i = V(() => import("./unpublish-page-BKQqPk_e.js")), Qi = V(() => import(
|
|
|
1177
1177
|
} else
|
|
1178
1178
|
a("");
|
|
1179
1179
|
})();
|
|
1180
|
-
}, [s, d, i == null ? void 0 : i.pageType, u, i == null ? void 0 : i.id, f]), /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ c(Mn, { 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(
|
|
1181
|
-
},
|
|
1182
|
-
const { t: e } =
|
|
1180
|
+
}, [s, d, i == null ? void 0 : i.pageType, u, i == null ? void 0 : i.id, f]), /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ c(Mn, { 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(Ka, { className: "h-4 w-4" }) }) }) }) });
|
|
1181
|
+
}, Yi = () => {
|
|
1182
|
+
const { t: e } = we(), [t, n] = na();
|
|
1183
1183
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1184
1184
|
/* @__PURE__ */ c(Mn, { content: e("Theme"), delayDuration: 0, children: /* @__PURE__ */ c(
|
|
1185
1185
|
M,
|
|
@@ -1188,13 +1188,13 @@ const $i = V(() => import("./unpublish-page-BKQqPk_e.js")), Qi = V(() => import(
|
|
|
1188
1188
|
size: "icon",
|
|
1189
1189
|
className: "gap-2",
|
|
1190
1190
|
onClick: () => n(t === "theme" ? "block" : "theme"),
|
|
1191
|
-
children: /* @__PURE__ */ c(
|
|
1191
|
+
children: /* @__PURE__ */ c(Va, { className: "h-4 w-4" })
|
|
1192
1192
|
}
|
|
1193
1193
|
) }),
|
|
1194
1194
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1195
1195
|
] });
|
|
1196
|
-
},
|
|
1197
|
-
const { t: e } =
|
|
1196
|
+
}, Ji = () => {
|
|
1197
|
+
const { t: e } = we(), [t, n] = K(!1), { isLocked: s } = pe(), { savePageAsync: r, saveState: a } = ke();
|
|
1198
1198
|
ne(() => {
|
|
1199
1199
|
const u = (f) => {
|
|
1200
1200
|
a === "UNSAVED" && (f.preventDefault(), f.returnValue = !1);
|
|
@@ -1210,7 +1210,7 @@ const $i = V(() => import("./unpublish-page-BKQqPk_e.js")), Qi = V(() => import(
|
|
|
1210
1210
|
case "UNSAVED":
|
|
1211
1211
|
return {
|
|
1212
1212
|
tooltipContent: e("Save draft"),
|
|
1213
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1213
|
+
buttonIcon: /* @__PURE__ */ c(qa, { className: "h-4 w-4" }),
|
|
1214
1214
|
buttonClass: "gap-x-1"
|
|
1215
1215
|
};
|
|
1216
1216
|
case "SAVING":
|
|
@@ -1222,7 +1222,7 @@ const $i = V(() => import("./unpublish-page-BKQqPk_e.js")), Qi = V(() => import(
|
|
|
1222
1222
|
case "SAVED":
|
|
1223
1223
|
return {
|
|
1224
1224
|
tooltipContent: e("Saved"),
|
|
1225
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1225
|
+
buttonIcon: /* @__PURE__ */ c(Ha, { className: "h-4 w-4" }),
|
|
1226
1226
|
buttonClass: "text-green-500 gap-x-1"
|
|
1227
1227
|
};
|
|
1228
1228
|
}
|
|
@@ -1232,8 +1232,8 @@ const $i = V(() => import("./unpublish-page-BKQqPk_e.js")), Qi = V(() => import(
|
|
|
1232
1232
|
" ",
|
|
1233
1233
|
d
|
|
1234
1234
|
] });
|
|
1235
|
-
},
|
|
1236
|
-
const { t: e } =
|
|
1235
|
+
}, Zi = () => {
|
|
1236
|
+
const { t: e } = we(), { selectedLang: t } = Pe(), { 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 } = Hs(), { needTranslations: S } = ke(), O = S(), { buttonText: y, buttonClassName: w, isPublished: v } = q(() => {
|
|
1237
1237
|
const P = h && (h == null ? void 0 : h.online);
|
|
1238
1238
|
return {
|
|
1239
1239
|
buttonClassName: P ? "hover:bg-green-600 bg-green-500" : "",
|
|
@@ -1241,16 +1241,16 @@ const $i = V(() => import("./unpublish-page-BKQqPk_e.js")), Qi = V(() => import(
|
|
|
1241
1241
|
buttonText: e(P ? "Published" : "Publish")
|
|
1242
1242
|
};
|
|
1243
1243
|
}, [h, e]), U = async () => {
|
|
1244
|
-
if (
|
|
1244
|
+
if (O) {
|
|
1245
1245
|
g(!0);
|
|
1246
1246
|
return;
|
|
1247
1247
|
}
|
|
1248
|
-
|
|
1249
|
-
},
|
|
1248
|
+
I();
|
|
1249
|
+
}, I = () => {
|
|
1250
1250
|
const P = [n == null ? void 0 : n.id, n == null ? void 0 : n.primaryPage];
|
|
1251
|
-
p({ ids:
|
|
1251
|
+
p({ ids: Ps(P) }, { onSuccess: () => dn("TOP_RIGHT") });
|
|
1252
1252
|
}, ye = () => {
|
|
1253
|
-
g(!1),
|
|
1253
|
+
g(!1), I();
|
|
1254
1254
|
}, Ae = async () => {
|
|
1255
1255
|
g(!1), await u();
|
|
1256
1256
|
}, B = q(() => Kt(s ?? [], "id"), [s]);
|
|
@@ -1270,18 +1270,18 @@ const $i = V(() => import("./unpublish-page-BKQqPk_e.js")), Qi = V(() => import(
|
|
|
1270
1270
|
"span",
|
|
1271
1271
|
{
|
|
1272
1272
|
className: `flex items-center transition-transform duration-300 ease-in-out ${i ? "-translate-y-10" : ""}`,
|
|
1273
|
-
children: v ? /* @__PURE__ */ c(
|
|
1273
|
+
children: v ? /* @__PURE__ */ c(Zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Xn, { className: "h-4 w-4" })
|
|
1274
1274
|
}
|
|
1275
1275
|
),
|
|
1276
1276
|
/* @__PURE__ */ c(
|
|
1277
1277
|
"span",
|
|
1278
1278
|
{
|
|
1279
1279
|
className: `absolute inset-0 left-3 flex items-center transition-transform duration-300 ease-in-out ${i ? "" : "translate-y-10"}`,
|
|
1280
|
-
children: v ? /* @__PURE__ */ c(
|
|
1280
|
+
children: v ? /* @__PURE__ */ c(Xn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Zn, { className: "h-4 w-4" })
|
|
1281
1281
|
}
|
|
1282
1282
|
),
|
|
1283
1283
|
/* @__PURE__ */ c("span", { children: y }),
|
|
1284
|
-
t ? `(${
|
|
1284
|
+
t ? `(${zn(t)})` : ""
|
|
1285
1285
|
]
|
|
1286
1286
|
}
|
|
1287
1287
|
),
|
|
@@ -1297,7 +1297,7 @@ const $i = V(() => import("./unpublish-page-BKQqPk_e.js")), Qi = V(() => import(
|
|
|
1297
1297
|
) }),
|
|
1298
1298
|
/* @__PURE__ */ m(Gn, { align: "end", className: "w-52", children: [
|
|
1299
1299
|
/* @__PURE__ */ m(
|
|
1300
|
-
|
|
1300
|
+
de,
|
|
1301
1301
|
{
|
|
1302
1302
|
disabled: T,
|
|
1303
1303
|
className: "cursor-pointer text-xs",
|
|
@@ -1309,7 +1309,7 @@ const $i = V(() => import("./unpublish-page-BKQqPk_e.js")), Qi = V(() => import(
|
|
|
1309
1309
|
}
|
|
1310
1310
|
),
|
|
1311
1311
|
!v && /* @__PURE__ */ m(
|
|
1312
|
-
|
|
1312
|
+
de,
|
|
1313
1313
|
{
|
|
1314
1314
|
disabled: T,
|
|
1315
1315
|
className: "cursor-pointer text-xs",
|
|
@@ -1320,22 +1320,22 @@ const $i = V(() => import("./unpublish-page-BKQqPk_e.js")), Qi = V(() => import(
|
|
|
1320
1320
|
]
|
|
1321
1321
|
}
|
|
1322
1322
|
),
|
|
1323
|
-
/* @__PURE__ */ m(
|
|
1323
|
+
/* @__PURE__ */ m(de, { onClick: () => a(!0), className: "cursor-pointer text-xs", children: [
|
|
1324
1324
|
e("Open"),
|
|
1325
1325
|
" publish menu"
|
|
1326
1326
|
] }),
|
|
1327
|
-
v && /* @__PURE__ */ m(
|
|
1327
|
+
v && /* @__PURE__ */ m(de, { onClick: () => d(n), className: "cursor-pointer text-xs", children: [
|
|
1328
1328
|
e("Unpublish"),
|
|
1329
1329
|
" page ",
|
|
1330
|
-
t ? `(${
|
|
1330
|
+
t ? `(${zn(t)})` : ""
|
|
1331
1331
|
] })
|
|
1332
1332
|
] })
|
|
1333
1333
|
] })
|
|
1334
1334
|
] }),
|
|
1335
|
-
/* @__PURE__ */ c(
|
|
1336
|
-
l && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1335
|
+
/* @__PURE__ */ c(Vi, { showModal: r, onClose: () => a(!1) }),
|
|
1336
|
+
l && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(zi, { page: l, onClose: () => d(null) }) }),
|
|
1337
1337
|
f && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1338
|
-
|
|
1338
|
+
Wi,
|
|
1339
1339
|
{
|
|
1340
1340
|
isOpen: f,
|
|
1341
1341
|
onClose: Ae,
|
|
@@ -1345,17 +1345,17 @@ const $i = V(() => import("./unpublish-page-BKQqPk_e.js")), Qi = V(() => import(
|
|
|
1345
1345
|
) })
|
|
1346
1346
|
] });
|
|
1347
1347
|
};
|
|
1348
|
-
function
|
|
1349
|
-
const { isLocked: e } = pe(), [t] =
|
|
1348
|
+
function Xi() {
|
|
1349
|
+
const { isLocked: e } = pe(), [t] = ve(), n = t.get("lang"), s = Hi(n);
|
|
1350
1350
|
return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1351
|
-
/* @__PURE__ */ c(
|
|
1352
|
-
/* @__PURE__ */ c(un, { permission:
|
|
1353
|
-
/* @__PURE__ */ c(
|
|
1354
|
-
/* @__PURE__ */ c(un, { permission:
|
|
1355
|
-
/* @__PURE__ */ c(un, { permission:
|
|
1351
|
+
/* @__PURE__ */ c(Ui, {}),
|
|
1352
|
+
/* @__PURE__ */ c(un, { permission: ue.EDIT_THEME, children: /* @__PURE__ */ c(Yi, {}) }),
|
|
1353
|
+
/* @__PURE__ */ c(ji, {}),
|
|
1354
|
+
/* @__PURE__ */ c(un, { permission: ue.SAVE_PAGE, children: /* @__PURE__ */ c(Ji, {}) }),
|
|
1355
|
+
/* @__PURE__ */ c(un, { permission: ue.PUBLISH_PAGE, children: /* @__PURE__ */ c(Zi, {}) })
|
|
1356
1356
|
] });
|
|
1357
1357
|
}
|
|
1358
|
-
const
|
|
1358
|
+
const eo = ({
|
|
1359
1359
|
page: e,
|
|
1360
1360
|
setDuplicatePage: t,
|
|
1361
1361
|
setAddEditPage: n,
|
|
@@ -1366,25 +1366,25 @@ const Zi = ({
|
|
|
1366
1366
|
children: o,
|
|
1367
1367
|
isLanguagePage: l
|
|
1368
1368
|
}) => {
|
|
1369
|
-
const { t: d } =
|
|
1370
|
-
return !u(
|
|
1369
|
+
const { t: d } = we(), { hasPermission: u } = bs(), { data: f } = Ce(), g = q(() => ie(f, { key: e.pageType }), [f, e.pageType]), h = q(() => !!e.isTemplate, [e.isTemplate]), p = q(() => !!(g != null && g.hasSlug), [g == null ? void 0 : g.hasSlug]);
|
|
1370
|
+
return !u(ue.EDIT_PAGE) && !u(ue.DELETE_PAGE) && !u(ue.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ m(Nn, { children: [
|
|
1371
1371
|
/* @__PURE__ */ c(Cn, { asChild: !0, onClick: (S) => S.stopPropagation(), children: o }),
|
|
1372
1372
|
/* @__PURE__ */ m(Gn, { align: "center", className: "text-sm", children: [
|
|
1373
|
-
u(
|
|
1374
|
-
|
|
1373
|
+
u(ue.ADD_PAGE) && !l && /* @__PURE__ */ m(
|
|
1374
|
+
de,
|
|
1375
1375
|
{
|
|
1376
1376
|
className: "flex cursor-pointer items-center gap-2",
|
|
1377
1377
|
onClick: (S) => {
|
|
1378
1378
|
S.stopPropagation(), t(e);
|
|
1379
1379
|
},
|
|
1380
1380
|
children: [
|
|
1381
|
-
/* @__PURE__ */ c(
|
|
1381
|
+
/* @__PURE__ */ c($a, { className: "size-3" }),
|
|
1382
1382
|
"Duplicate page"
|
|
1383
1383
|
]
|
|
1384
1384
|
}
|
|
1385
1385
|
),
|
|
1386
|
-
u(
|
|
1387
|
-
|
|
1386
|
+
u(ue.EDIT_PAGE) && /* @__PURE__ */ m(
|
|
1387
|
+
de,
|
|
1388
1388
|
{
|
|
1389
1389
|
className: "flex cursor-pointer items-center gap-2",
|
|
1390
1390
|
onClick: (S) => {
|
|
@@ -1394,84 +1394,84 @@ const Zi = ({
|
|
|
1394
1394
|
});
|
|
1395
1395
|
},
|
|
1396
1396
|
children: [
|
|
1397
|
-
/* @__PURE__ */ c(
|
|
1397
|
+
/* @__PURE__ */ c(Qa, { className: "size-3" }),
|
|
1398
1398
|
"Edit"
|
|
1399
1399
|
]
|
|
1400
1400
|
}
|
|
1401
1401
|
),
|
|
1402
|
-
(e == null ? void 0 : e.online) && u(
|
|
1403
|
-
|
|
1402
|
+
(e == null ? void 0 : e.online) && u(ue.UNPUBLISH_PAGE) && /* @__PURE__ */ m(
|
|
1403
|
+
de,
|
|
1404
1404
|
{
|
|
1405
1405
|
className: "flex cursor-pointer items-center gap-2",
|
|
1406
1406
|
onClick: (S) => {
|
|
1407
1407
|
S.stopPropagation(), s(e);
|
|
1408
1408
|
},
|
|
1409
1409
|
children: [
|
|
1410
|
-
/* @__PURE__ */ c(
|
|
1410
|
+
/* @__PURE__ */ c(za, { className: "size-3" }),
|
|
1411
1411
|
d("Unpublish")
|
|
1412
1412
|
]
|
|
1413
1413
|
}
|
|
1414
1414
|
),
|
|
1415
|
-
u(
|
|
1416
|
-
|
|
1415
|
+
u(ue.DELETE_PAGE) && /* @__PURE__ */ m(
|
|
1416
|
+
de,
|
|
1417
1417
|
{
|
|
1418
1418
|
className: "flex cursor-pointer items-center gap-2",
|
|
1419
1419
|
onClick: (S) => {
|
|
1420
1420
|
S.stopPropagation(), r(e);
|
|
1421
1421
|
},
|
|
1422
1422
|
children: [
|
|
1423
|
-
/* @__PURE__ */ c(
|
|
1423
|
+
/* @__PURE__ */ c(Wa, { className: "size-3" }),
|
|
1424
1424
|
d("Delete")
|
|
1425
1425
|
]
|
|
1426
1426
|
}
|
|
1427
1427
|
),
|
|
1428
|
-
u(
|
|
1429
|
-
|
|
1428
|
+
u(ue.MARK_AS_TEMPLATE) && p && !l && /* @__PURE__ */ c(ge, { children: h ? /* @__PURE__ */ m(
|
|
1429
|
+
de,
|
|
1430
1430
|
{
|
|
1431
1431
|
className: "flex cursor-pointer items-center gap-2",
|
|
1432
1432
|
onClick: (S) => {
|
|
1433
1433
|
S.stopPropagation(), i(e);
|
|
1434
1434
|
},
|
|
1435
1435
|
children: [
|
|
1436
|
-
/* @__PURE__ */ c(
|
|
1436
|
+
/* @__PURE__ */ c(es, { className: "size-3" }),
|
|
1437
1437
|
d("Unmark as template")
|
|
1438
1438
|
]
|
|
1439
1439
|
}
|
|
1440
1440
|
) : /* @__PURE__ */ m(
|
|
1441
|
-
|
|
1441
|
+
de,
|
|
1442
1442
|
{
|
|
1443
1443
|
className: "flex cursor-pointer items-center gap-2",
|
|
1444
1444
|
onClick: (S) => {
|
|
1445
1445
|
S.stopPropagation(), a(e);
|
|
1446
1446
|
},
|
|
1447
1447
|
children: [
|
|
1448
|
-
/* @__PURE__ */ c(
|
|
1448
|
+
/* @__PURE__ */ c(es, { className: "size-3" }),
|
|
1449
1449
|
d("Mark as template")
|
|
1450
1450
|
]
|
|
1451
1451
|
}
|
|
1452
1452
|
) })
|
|
1453
1453
|
] })
|
|
1454
1454
|
] });
|
|
1455
|
-
},
|
|
1456
|
-
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 } =
|
|
1455
|
+
}, to = V(() => import("./add-new-page-GZdKxwCY.js")), no = V(() => import("./delete-page-CeJdK5hc.js")), so = V(() => import("./duplicate-page-C7FjAbqP.js")), ro = V(() => import("./mark-as-template-CuPKgc5N.js")), ao = V(() => import("./unmark-as-template-Dp6S9dY3.js")), io = V(() => import("./unpublish-page-c382vh74.js")), oo = () => {
|
|
1456
|
+
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 } = Pe(), { data: S } = Me(), O = S == null ? void 0 : S.find((I) => I.lang === p), { isLocked: y } = pe(), w = !(g != null && g.slug), [, v] = oe(xn);
|
|
1457
1457
|
if (!g) return null;
|
|
1458
|
-
const U = (
|
|
1458
|
+
const U = (I) => {
|
|
1459
1459
|
p.length > 0 && p !== T ? v({
|
|
1460
1460
|
edit: !0,
|
|
1461
|
-
id:
|
|
1462
|
-
primaryPage:
|
|
1463
|
-
}) : f(
|
|
1461
|
+
id: I == null ? void 0 : I.id,
|
|
1462
|
+
primaryPage: I == null ? void 0 : I.primaryPage
|
|
1463
|
+
}) : f(I);
|
|
1464
1464
|
};
|
|
1465
1465
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1466
1466
|
/* @__PURE__ */ m("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
|
|
1467
|
-
/* @__PURE__ */ c(
|
|
1467
|
+
/* @__PURE__ */ c(Vs, { children: /* @__PURE__ */ c(
|
|
1468
1468
|
M,
|
|
1469
1469
|
{
|
|
1470
1470
|
className: "flex h-7 max-w-[200px] cursor-pointer items-center truncate rounded px-1 text-xs font-medium",
|
|
1471
1471
|
variant: "ghost",
|
|
1472
1472
|
children: h ? /* @__PURE__ */ c(Ht, { 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: [
|
|
1473
|
-
w ? /* @__PURE__ */ c(
|
|
1474
|
-
H(
|
|
1473
|
+
w ? /* @__PURE__ */ c(ja, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Ya, { className: "mr-1 h-4 w-4" }),
|
|
1474
|
+
H(O || g, "name") ?? ""
|
|
1475
1475
|
] })
|
|
1476
1476
|
}
|
|
1477
1477
|
) }),
|
|
@@ -1481,25 +1481,25 @@ const Zi = ({
|
|
|
1481
1481
|
variant: "ghost",
|
|
1482
1482
|
size: "icon",
|
|
1483
1483
|
className: "h-7 w-7 cursor-not-allowed rounded opacity-50 hover:bg-transparent",
|
|
1484
|
-
children: /* @__PURE__ */ c(
|
|
1484
|
+
children: /* @__PURE__ */ c(ts, { className: "h-4 w-4" })
|
|
1485
1485
|
}
|
|
1486
1486
|
) : /* @__PURE__ */ c(
|
|
1487
|
-
|
|
1487
|
+
eo,
|
|
1488
1488
|
{
|
|
1489
1489
|
page: g,
|
|
1490
|
-
setDuplicatePage: (
|
|
1491
|
-
setAddEditPage: (
|
|
1492
|
-
setUnpublishPage: (
|
|
1493
|
-
setDeletePage: (
|
|
1494
|
-
setMarkAsTemplate: (
|
|
1495
|
-
setUnmarkAsTemplate: (
|
|
1490
|
+
setDuplicatePage: (I) => d(I),
|
|
1491
|
+
setAddEditPage: (I) => U(I),
|
|
1492
|
+
setUnpublishPage: (I) => s(I),
|
|
1493
|
+
setDeletePage: (I) => t(I),
|
|
1494
|
+
setMarkAsTemplate: (I) => a(I),
|
|
1495
|
+
setUnmarkAsTemplate: (I) => o(I),
|
|
1496
1496
|
isLanguagePage: p.length > 0 && p !== T,
|
|
1497
|
-
children: /* @__PURE__ */ c(M, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c(
|
|
1497
|
+
children: /* @__PURE__ */ c(M, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c(ts, { className: "h-4 w-4" }) })
|
|
1498
1498
|
}
|
|
1499
1499
|
)
|
|
1500
1500
|
] }),
|
|
1501
1501
|
u && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1502
|
-
|
|
1502
|
+
to,
|
|
1503
1503
|
{
|
|
1504
1504
|
closePanel: () => f(null),
|
|
1505
1505
|
editPage: () => {
|
|
@@ -1508,12 +1508,12 @@ const Zi = ({
|
|
|
1508
1508
|
setAddEditPage: f
|
|
1509
1509
|
}
|
|
1510
1510
|
) }),
|
|
1511
|
-
e && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1512
|
-
n && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1513
|
-
r && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1514
|
-
i && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1511
|
+
e && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(no, { page: e, onClose: () => t(null) }) }),
|
|
1512
|
+
n && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(io, { page: n, onClose: () => s(null) }) }),
|
|
1513
|
+
r && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(ro, { page: r, onClose: () => a(null) }) }),
|
|
1514
|
+
i && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(ao, { page: i, onClose: () => o(null) }) }),
|
|
1515
1515
|
l && /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1516
|
-
|
|
1516
|
+
so,
|
|
1517
1517
|
{
|
|
1518
1518
|
page: l,
|
|
1519
1519
|
onClose: () => d(null),
|
|
@@ -1521,7 +1521,7 @@ const Zi = ({
|
|
|
1521
1521
|
}
|
|
1522
1522
|
) })
|
|
1523
1523
|
] });
|
|
1524
|
-
},
|
|
1524
|
+
}, qs = ({ children: e, className: t = "" }) => /* @__PURE__ */ c(
|
|
1525
1525
|
"div",
|
|
1526
1526
|
{
|
|
1527
1527
|
className: Vt(
|
|
@@ -1530,17 +1530,17 @@ const Zi = ({
|
|
|
1530
1530
|
),
|
|
1531
1531
|
children: e
|
|
1532
1532
|
}
|
|
1533
|
-
),
|
|
1533
|
+
), lo = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(qs, { 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: [
|
|
1534
1534
|
/* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
|
|
1535
1535
|
/* @__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" })
|
|
1536
|
-
] }) }),
|
|
1537
|
-
const { dynamicPage: e, allLangPages: t, isFetching: n } =
|
|
1536
|
+
] }) }), co = V(() => import("./dynamic-page-selector-C_-ihnB7.js")), uo = () => {
|
|
1537
|
+
const { dynamicPage: e, allLangPages: t, isFetching: n } = hi(), s = t.length > 0;
|
|
1538
1538
|
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1539
|
-
!e && /* @__PURE__ */ c(
|
|
1540
|
-
/* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
1539
|
+
!e && /* @__PURE__ */ c(lo, { hasDynamicPage: s }),
|
|
1540
|
+
/* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(co, {}) })
|
|
1541
1541
|
] });
|
|
1542
|
-
},
|
|
1543
|
-
const { data: e, isFetching: t } = Ne(), { data: n, isFetching: s } = ce(), r = H(n, "dynamic", !1), a =
|
|
1542
|
+
}, fo = () => {
|
|
1543
|
+
const { data: e, isFetching: t } = Ne(), { data: n, isFetching: s } = ce(), r = H(n, "dynamic", !1), a = On(), i = sa("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, d = pi(), u = t || s, g = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
|
|
1544
1544
|
return /* @__PURE__ */ m("div", { className: "relative flex items-center gap-x-1", children: [
|
|
1545
1545
|
/* @__PURE__ */ c(
|
|
1546
1546
|
"div",
|
|
@@ -1549,7 +1549,7 @@ const Zi = ({
|
|
|
1549
1549
|
"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",
|
|
1550
1550
|
u && "max-w-0 overflow-hidden opacity-0"
|
|
1551
1551
|
),
|
|
1552
|
-
children: /* @__PURE__ */ c(
|
|
1552
|
+
children: /* @__PURE__ */ c(oo, {})
|
|
1553
1553
|
}
|
|
1554
1554
|
),
|
|
1555
1555
|
/* @__PURE__ */ m(
|
|
@@ -1560,7 +1560,7 @@ const Zi = ({
|
|
|
1560
1560
|
u && "max-w-0 overflow-hidden opacity-0"
|
|
1561
1561
|
),
|
|
1562
1562
|
children: [
|
|
1563
|
-
/* @__PURE__ */ c(
|
|
1563
|
+
/* @__PURE__ */ c(Oi, {}),
|
|
1564
1564
|
/* @__PURE__ */ m("div", { className: "flex w-full items-center overflow-hidden", children: [
|
|
1565
1565
|
/* @__PURE__ */ c(
|
|
1566
1566
|
"div",
|
|
@@ -1572,19 +1572,19 @@ const Zi = ({
|
|
|
1572
1572
|
] }) : g
|
|
1573
1573
|
}
|
|
1574
1574
|
),
|
|
1575
|
-
!l && /* @__PURE__ */ c("a", { href: d, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c("div", { className: "ml-2 mr-px flex-shrink-0 rounded-sm p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300", children: /* @__PURE__ */ c(
|
|
1575
|
+
!l && /* @__PURE__ */ c("a", { href: d, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c("div", { className: "ml-2 mr-px flex-shrink-0 rounded-sm p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300", children: /* @__PURE__ */ c(Ja, { className: "h-4 w-4", strokeWidth: 1 }) }) })
|
|
1576
1576
|
] })
|
|
1577
1577
|
]
|
|
1578
1578
|
}
|
|
1579
1579
|
),
|
|
1580
|
-
r && i && /* @__PURE__ */ c(
|
|
1580
|
+
r && i && /* @__PURE__ */ c(uo, {})
|
|
1581
1581
|
] });
|
|
1582
|
-
},
|
|
1583
|
-
/* @__PURE__ */ c(
|
|
1584
|
-
/* @__PURE__ */ c(
|
|
1585
|
-
/* @__PURE__ */ c(
|
|
1586
|
-
] }),
|
|
1587
|
-
const e = J(), { data: t } =
|
|
1582
|
+
}, ho = () => /* @__PURE__ */ m("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
|
|
1583
|
+
/* @__PURE__ */ c(xi, {}),
|
|
1584
|
+
/* @__PURE__ */ c(fo, {}),
|
|
1585
|
+
/* @__PURE__ */ c(Xi, {})
|
|
1586
|
+
] }), $s = () => {
|
|
1587
|
+
const e = J(), { data: t } = re({
|
|
1588
1588
|
queryKey: [E.AI_CONTEXT],
|
|
1589
1589
|
initialData: "",
|
|
1590
1590
|
queryFn: () => "",
|
|
@@ -1596,8 +1596,8 @@ const Zi = ({
|
|
|
1596
1596
|
},
|
|
1597
1597
|
[e]
|
|
1598
1598
|
), aiContext: t };
|
|
1599
|
-
},
|
|
1600
|
-
const e =
|
|
1599
|
+
}, go = () => {
|
|
1600
|
+
const e = N(), { aiContext: t } = $s(), n = b();
|
|
1601
1601
|
return z(
|
|
1602
1602
|
async (s, r, a, i) => n(e, {
|
|
1603
1603
|
action: E.ASK_AI,
|
|
@@ -1605,37 +1605,37 @@ const Zi = ({
|
|
|
1605
1605
|
}),
|
|
1606
1606
|
[e, t, n]
|
|
1607
1607
|
);
|
|
1608
|
-
},
|
|
1608
|
+
}, mo = (e, t) => t.map((n) => {
|
|
1609
1609
|
if (Yt(e, n._type)) {
|
|
1610
|
-
const s =
|
|
1610
|
+
const s = oi(n._type);
|
|
1611
1611
|
return {
|
|
1612
1612
|
...s,
|
|
1613
1613
|
...Ln(n, [
|
|
1614
|
-
...
|
|
1614
|
+
...Hr(s),
|
|
1615
1615
|
"_type",
|
|
1616
1616
|
"_id",
|
|
1617
1617
|
"_name",
|
|
1618
1618
|
"_parent",
|
|
1619
1619
|
"_bindings"
|
|
1620
1620
|
]),
|
|
1621
|
-
...
|
|
1621
|
+
...qr(n, (r, a) => $r(a, "_attrs")),
|
|
1622
1622
|
...n
|
|
1623
1623
|
};
|
|
1624
1624
|
}
|
|
1625
1625
|
return n;
|
|
1626
|
-
}),
|
|
1627
|
-
const t =
|
|
1626
|
+
}), Eo = (e) => {
|
|
1627
|
+
const t = ii();
|
|
1628
1628
|
return q(() => {
|
|
1629
|
-
if (!e ||
|
|
1630
|
-
const n =
|
|
1629
|
+
if (!e || Se(e)) return { blocks: [] };
|
|
1630
|
+
const n = ws(
|
|
1631
1631
|
e,
|
|
1632
|
-
(s) => !
|
|
1632
|
+
(s) => !Vr(s == null ? void 0 : s._type, "@chai/")
|
|
1633
1633
|
);
|
|
1634
|
-
return { blocks:
|
|
1634
|
+
return { blocks: mo(t, n) };
|
|
1635
1635
|
}, [e, t]);
|
|
1636
|
-
},
|
|
1637
|
-
const [e] =
|
|
1638
|
-
return
|
|
1636
|
+
}, po = () => {
|
|
1637
|
+
const [e] = ve(), t = e.get("page"), n = N(), { setAiContext: s } = $s(), [, r] = ks(), [, a] = Ei(), [, i] = ra(), o = b();
|
|
1638
|
+
return re({
|
|
1639
1639
|
queryKey: [E.GET_DRAFT_PAGE, t],
|
|
1640
1640
|
staleTime: 1 / 0,
|
|
1641
1641
|
gcTime: 0,
|
|
@@ -1644,14 +1644,14 @@ const Zi = ({
|
|
|
1644
1644
|
const l = await o(n, {
|
|
1645
1645
|
action: E.GET_DRAFT_PAGE,
|
|
1646
1646
|
data: { id: t, draft: !0 }
|
|
1647
|
-
}), d = l.blocks ?? [], u =
|
|
1647
|
+
}), d = l.blocks ?? [], u = ie(d, { _type: "@chai/ai-context" });
|
|
1648
1648
|
return s(H(u, "_value", "") || ""), r((f) => ({ ...f, lastSaved: l.lastSaved })), a(H(l, "metadata", {})), setTimeout(() => i(!0), 500), d;
|
|
1649
1649
|
},
|
|
1650
1650
|
enabled: !!t
|
|
1651
1651
|
});
|
|
1652
|
-
},
|
|
1653
|
-
const { data: e } = ce(), { data: t } = Ne(), n =
|
|
1654
|
-
return
|
|
1652
|
+
}, yo = () => {
|
|
1653
|
+
const { data: e } = ce(), { data: t } = Ne(), n = N(), s = b(), r = Un(), a = On();
|
|
1654
|
+
return re({
|
|
1655
1655
|
queryKey: [E.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
|
|
1656
1656
|
staleTime: 1 / 0,
|
|
1657
1657
|
gcTime: 0,
|
|
@@ -1679,8 +1679,8 @@ const Zi = ({
|
|
|
1679
1679
|
}),
|
|
1680
1680
|
enabled: !!(e != null && e.pageType) && !!t.id
|
|
1681
1681
|
});
|
|
1682
|
-
},
|
|
1683
|
-
const e =
|
|
1682
|
+
}, Ao = () => {
|
|
1683
|
+
const e = N(), t = J(), n = b();
|
|
1684
1684
|
return Y({
|
|
1685
1685
|
mutationFn: async (s) => n(e, {
|
|
1686
1686
|
action: E.UPDATE_WEBSITE_SETTINGS,
|
|
@@ -1698,8 +1698,8 @@ const Zi = ({
|
|
|
1698
1698
|
});
|
|
1699
1699
|
}
|
|
1700
1700
|
});
|
|
1701
|
-
},
|
|
1702
|
-
const e =
|
|
1701
|
+
}, ru = () => {
|
|
1702
|
+
const e = N(), t = J(), n = b(), { selectedLang: s } = Pe();
|
|
1703
1703
|
return Y({
|
|
1704
1704
|
mutationFn: async (r) => n(e, { action: E.ADD_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1705
1705
|
onSuccess: () => {
|
|
@@ -1713,8 +1713,8 @@ const Zi = ({
|
|
|
1713
1713
|
});
|
|
1714
1714
|
}
|
|
1715
1715
|
});
|
|
1716
|
-
},
|
|
1717
|
-
const e =
|
|
1716
|
+
}, au = () => {
|
|
1717
|
+
const e = N(), t = J(), n = b(), { selectedLang: s } = Pe();
|
|
1718
1718
|
return Y({
|
|
1719
1719
|
mutationFn: async (r) => n(e, { action: E.UPDATE_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1720
1720
|
onSuccess: () => {
|
|
@@ -1728,8 +1728,8 @@ const Zi = ({
|
|
|
1728
1728
|
});
|
|
1729
1729
|
}
|
|
1730
1730
|
});
|
|
1731
|
-
},
|
|
1732
|
-
const e =
|
|
1731
|
+
}, iu = () => {
|
|
1732
|
+
const e = N(), t = J(), n = b();
|
|
1733
1733
|
return Y({
|
|
1734
1734
|
mutationFn: async (s) => n(e, { action: E.DELETE_GLOBAL_SCHEMA, data: { id: s } }),
|
|
1735
1735
|
onSuccess: () => {
|
|
@@ -1743,8 +1743,8 @@ const Zi = ({
|
|
|
1743
1743
|
});
|
|
1744
1744
|
}
|
|
1745
1745
|
});
|
|
1746
|
-
},
|
|
1747
|
-
const e =
|
|
1746
|
+
}, ou = () => {
|
|
1747
|
+
const e = N(), t = b();
|
|
1748
1748
|
return Y({
|
|
1749
1749
|
mutationFn: async (n) => t(e, { action: E.TOGGLE_PAGE_GLOBAL_SCHEMA, data: n }),
|
|
1750
1750
|
onError: (n) => {
|
|
@@ -1753,8 +1753,8 @@ const Zi = ({
|
|
|
1753
1753
|
});
|
|
1754
1754
|
}
|
|
1755
1755
|
});
|
|
1756
|
-
},
|
|
1757
|
-
const e =
|
|
1756
|
+
}, lu = () => {
|
|
1757
|
+
const e = N(), t = b();
|
|
1758
1758
|
return Y({
|
|
1759
1759
|
mutationFn: async (n) => t(e, { action: E.APPLY_SCHEMA_TO_ALL_PAGES, data: { schemaId: n } }),
|
|
1760
1760
|
onSuccess: (n) => {
|
|
@@ -1766,8 +1766,8 @@ const Zi = ({
|
|
|
1766
1766
|
});
|
|
1767
1767
|
}
|
|
1768
1768
|
});
|
|
1769
|
-
},
|
|
1770
|
-
const e =
|
|
1769
|
+
}, cu = () => {
|
|
1770
|
+
const e = N(), t = b();
|
|
1771
1771
|
return Y({
|
|
1772
1772
|
mutationFn: async (n) => t(e, { action: E.REMOVE_SCHEMA_FROM_ALL_PAGES, data: { schemaId: n } }),
|
|
1773
1773
|
onSuccess: (n) => {
|
|
@@ -1779,13 +1779,13 @@ const Zi = ({
|
|
|
1779
1779
|
});
|
|
1780
1780
|
}
|
|
1781
1781
|
});
|
|
1782
|
-
},
|
|
1782
|
+
}, rs = {
|
|
1783
1783
|
async getUILibraryBlock(e, t, n) {
|
|
1784
1784
|
const s = await t(n, {
|
|
1785
1785
|
action: "GET_LIBRARY_ITEM",
|
|
1786
1786
|
data: { id: e.id }
|
|
1787
1787
|
}), r = H(s, "html", ""), a = H(s, "blocks", []);
|
|
1788
|
-
return
|
|
1788
|
+
return Qr(a) ? a : ia(r);
|
|
1789
1789
|
},
|
|
1790
1790
|
async getUILibraryBlocks(e, t, n) {
|
|
1791
1791
|
try {
|
|
@@ -1799,9 +1799,9 @@ const Zi = ({
|
|
|
1799
1799
|
return console.error(s), [];
|
|
1800
1800
|
}
|
|
1801
1801
|
}
|
|
1802
|
-
},
|
|
1803
|
-
const e =
|
|
1804
|
-
return
|
|
1802
|
+
}, To = () => {
|
|
1803
|
+
const e = N(), t = b();
|
|
1804
|
+
return re({
|
|
1805
1805
|
queryKey: ["uiLibraries"],
|
|
1806
1806
|
staleTime: "static",
|
|
1807
1807
|
queryFn: async () => {
|
|
@@ -1809,18 +1809,18 @@ const Zi = ({
|
|
|
1809
1809
|
...r
|
|
1810
1810
|
}));
|
|
1811
1811
|
return s.forEach((r) => {
|
|
1812
|
-
|
|
1812
|
+
aa(r.id, {
|
|
1813
1813
|
name: r.isSiteLibrary ? r.name + " (Current Site) " : r.name,
|
|
1814
1814
|
description: r.description,
|
|
1815
|
-
getBlocksList: (a) =>
|
|
1816
|
-
getBlock: ({ block: a }) =>
|
|
1815
|
+
getBlocksList: (a) => rs.getUILibraryBlocks(a, t, e),
|
|
1816
|
+
getBlock: ({ block: a }) => rs.getUILibraryBlock(a, t, e)
|
|
1817
1817
|
});
|
|
1818
1818
|
}), s;
|
|
1819
1819
|
}
|
|
1820
1820
|
});
|
|
1821
|
-
},
|
|
1822
|
-
const e =
|
|
1823
|
-
return
|
|
1821
|
+
}, So = () => {
|
|
1822
|
+
const e = Ds(), t = b(), { user: n } = Rn(), s = n == null ? void 0 : n.id;
|
|
1823
|
+
return re({
|
|
1824
1824
|
queryKey: [E.GET_ROLE_AND_PERMISSIONS, s],
|
|
1825
1825
|
queryFn: () => t(e, {
|
|
1826
1826
|
action: E.GET_ROLE_AND_PERMISSIONS,
|
|
@@ -1829,8 +1829,8 @@ const Zi = ({
|
|
|
1829
1829
|
enabled: !!s,
|
|
1830
1830
|
staleTime: 1 / 0
|
|
1831
1831
|
});
|
|
1832
|
-
},
|
|
1833
|
-
const e =
|
|
1832
|
+
}, _o = () => {
|
|
1833
|
+
const e = N(), t = b(), [, n] = ks();
|
|
1834
1834
|
return { onSave: async ({
|
|
1835
1835
|
page: r,
|
|
1836
1836
|
blocks: a,
|
|
@@ -1849,15 +1849,15 @@ const Zi = ({
|
|
|
1849
1849
|
return console.error(o), new Error("Failed to save blocks");
|
|
1850
1850
|
}
|
|
1851
1851
|
} };
|
|
1852
|
-
},
|
|
1853
|
-
const { data: e } =
|
|
1852
|
+
}, Po = () => {
|
|
1853
|
+
const { data: e } = Ks(), t = N(), n = b();
|
|
1854
1854
|
return {
|
|
1855
1855
|
getPartialBlocks: z(async () => {
|
|
1856
1856
|
const s = {};
|
|
1857
1857
|
for (const r of e ?? [])
|
|
1858
|
-
|
|
1858
|
+
Se(r == null ? void 0 : r.slug) && (s[r.id] = {
|
|
1859
1859
|
type: r.pageType,
|
|
1860
|
-
name:
|
|
1860
|
+
name: zr(r.name ?? r.slug),
|
|
1861
1861
|
description: ""
|
|
1862
1862
|
});
|
|
1863
1863
|
return s;
|
|
@@ -1870,7 +1870,7 @@ const Zi = ({
|
|
|
1870
1870
|
action: "GET_DRAFT_PAGE",
|
|
1871
1871
|
data: { id: s, draft: !0, editor: !1 }
|
|
1872
1872
|
});
|
|
1873
|
-
return
|
|
1873
|
+
return ws(r.blocks, (a) => Yt(a, "_id"));
|
|
1874
1874
|
} catch (r) {
|
|
1875
1875
|
return console.error(r), [];
|
|
1876
1876
|
}
|
|
@@ -1878,7 +1878,7 @@ const Zi = ({
|
|
|
1878
1878
|
[n, t]
|
|
1879
1879
|
)
|
|
1880
1880
|
};
|
|
1881
|
-
},
|
|
1881
|
+
}, wo = V(() => import("./ai-panel-content-CWw-2gPV.js").then((e) => e.b)), Qs = "chai-chat-panel", vo = ({ 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: [
|
|
1882
1882
|
/* @__PURE__ */ c("title", { children: "ai" }),
|
|
1883
1883
|
/* @__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(
|
|
1884
1884
|
"path",
|
|
@@ -1887,25 +1887,25 @@ const Zi = ({
|
|
|
1887
1887
|
id: "Combined-Shape"
|
|
1888
1888
|
}
|
|
1889
1889
|
) }) })
|
|
1890
|
-
] }),
|
|
1891
|
-
id:
|
|
1890
|
+
] }), bo = ({ isActive: e, show: t }) => /* @__PURE__ */ c(M, { size: "icon", className: "p-0 [&_svg]:size-6", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(vo, { className: e ? "h-5 w-5 text-white" : "h-5 w-5 text-primary" }) }), Io = {
|
|
1891
|
+
id: Qs,
|
|
1892
1892
|
label: "AI Assistant",
|
|
1893
|
-
button:
|
|
1894
|
-
panel:
|
|
1893
|
+
button: bo,
|
|
1894
|
+
panel: wo,
|
|
1895
1895
|
position: "top"
|
|
1896
|
-
},
|
|
1896
|
+
}, Lo = V(() => import("./lang-panel-p7OYw-2c.js")), No = ({ isActive: e, show: t }) => {
|
|
1897
1897
|
const { data: n } = Be();
|
|
1898
|
-
return !Yt(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(
|
|
1899
|
-
},
|
|
1900
|
-
id:
|
|
1898
|
+
return !Yt(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(Za, { className: "h-4 w-4" }) });
|
|
1899
|
+
}, zs = "lang", Co = {
|
|
1900
|
+
id: zs,
|
|
1901
1901
|
label: "Languages",
|
|
1902
1902
|
position: "top",
|
|
1903
|
-
panel:
|
|
1904
|
-
button:
|
|
1903
|
+
panel: Lo,
|
|
1904
|
+
button: No,
|
|
1905
1905
|
view: "modal",
|
|
1906
1906
|
width: 400
|
|
1907
|
-
},
|
|
1908
|
-
const { data: n } = ce(), s =
|
|
1907
|
+
}, Go = V(() => import("./seo-panel-KjxjFcdp.js")), Ws = "seo", Do = ({ isActive: e, show: t }) => {
|
|
1908
|
+
const { data: n } = ce(), s = Bi(n == null ? void 0 : n.pageType);
|
|
1909
1909
|
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(
|
|
1910
1910
|
"svg",
|
|
1911
1911
|
{
|
|
@@ -1924,35 +1924,35 @@ const Zi = ({
|
|
|
1924
1924
|
]
|
|
1925
1925
|
}
|
|
1926
1926
|
) });
|
|
1927
|
-
},
|
|
1928
|
-
id:
|
|
1927
|
+
}, Oo = {
|
|
1928
|
+
id: Ws,
|
|
1929
1929
|
label: "SEO",
|
|
1930
|
-
panel:
|
|
1931
|
-
button:
|
|
1930
|
+
panel: Go,
|
|
1931
|
+
button: Do,
|
|
1932
1932
|
position: "top",
|
|
1933
1933
|
width: 600,
|
|
1934
1934
|
view: "modal"
|
|
1935
|
-
}, js = "user-info",
|
|
1936
|
-
const { t: e } =
|
|
1937
|
-
return t ? /* @__PURE__ */ m(
|
|
1938
|
-
/* @__PURE__ */ c(
|
|
1939
|
-
/* @__PURE__ */ m(
|
|
1935
|
+
}, js = "user-info", xo = () => {
|
|
1936
|
+
const { t: e } = we(), { user: t, logout: n } = Rn(), s = le("onLogout", As);
|
|
1937
|
+
return t ? /* @__PURE__ */ m(Ea, { children: [
|
|
1938
|
+
/* @__PURE__ */ c(pa, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(Xa, { className: "h-4 w-4" }) }) }),
|
|
1939
|
+
/* @__PURE__ */ m(ya, { className: "w-auto space-y-2 p-4", children: [
|
|
1940
1940
|
/* @__PURE__ */ c("div", { className: "text-sm font-medium", children: t.name ?? t.email }),
|
|
1941
1941
|
/* @__PURE__ */ c("div", { className: "text-xs text-muted-foreground", children: t.email }),
|
|
1942
|
-
/* @__PURE__ */ m(
|
|
1943
|
-
/* @__PURE__ */ c(
|
|
1944
|
-
/* @__PURE__ */ m(
|
|
1945
|
-
/* @__PURE__ */ m(
|
|
1946
|
-
/* @__PURE__ */ c(
|
|
1947
|
-
/* @__PURE__ */ c(
|
|
1942
|
+
/* @__PURE__ */ m(Aa, { children: [
|
|
1943
|
+
/* @__PURE__ */ c(Ta, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "outline", size: "sm", className: "w-full", children: e("Logout") }) }),
|
|
1944
|
+
/* @__PURE__ */ m(Sa, { children: [
|
|
1945
|
+
/* @__PURE__ */ m(_a, { children: [
|
|
1946
|
+
/* @__PURE__ */ c(Pa, { children: e("Are you sure you want to logout?") }),
|
|
1947
|
+
/* @__PURE__ */ c(wa, { children: e("You will be redirected to the login page.") })
|
|
1948
1948
|
] }),
|
|
1949
|
-
/* @__PURE__ */ m(
|
|
1950
|
-
/* @__PURE__ */ c(
|
|
1949
|
+
/* @__PURE__ */ m(va, { children: [
|
|
1950
|
+
/* @__PURE__ */ c(ba, { children: e("Cancel") }),
|
|
1951
1951
|
/* @__PURE__ */ c(
|
|
1952
|
-
|
|
1952
|
+
Ia,
|
|
1953
1953
|
{
|
|
1954
1954
|
onClick: () => {
|
|
1955
|
-
n(),
|
|
1955
|
+
n(), Wr(s) && s();
|
|
1956
1956
|
},
|
|
1957
1957
|
children: e("Logout")
|
|
1958
1958
|
}
|
|
@@ -1962,13 +1962,13 @@ const Zi = ({
|
|
|
1962
1962
|
] })
|
|
1963
1963
|
] })
|
|
1964
1964
|
] }) : null;
|
|
1965
|
-
},
|
|
1965
|
+
}, Ro = {
|
|
1966
1966
|
id: js,
|
|
1967
1967
|
label: "User Info",
|
|
1968
|
-
button:
|
|
1968
|
+
button: xo,
|
|
1969
1969
|
position: "bottom"
|
|
1970
|
-
},
|
|
1971
|
-
Gt(
|
|
1970
|
+
}, ko = () => {
|
|
1971
|
+
Gt(Ws, Oo), Gt(zs, Co), Gt(js, Ro), (localStorage.getItem("chai-feature-flags") ?? "").includes("enable-ai-chat-panel") && Gt(Qs, Io);
|
|
1972
1972
|
};
|
|
1973
1973
|
var _ = {
|
|
1974
1974
|
context: void 0,
|
|
@@ -1976,39 +1976,39 @@ var _ = {
|
|
|
1976
1976
|
effects: void 0,
|
|
1977
1977
|
done: !1,
|
|
1978
1978
|
getContextId() {
|
|
1979
|
-
return
|
|
1979
|
+
return as(this.context.count);
|
|
1980
1980
|
},
|
|
1981
1981
|
getNextContextId() {
|
|
1982
|
-
return
|
|
1982
|
+
return as(this.context.count++);
|
|
1983
1983
|
}
|
|
1984
1984
|
};
|
|
1985
|
-
function
|
|
1985
|
+
function as(e) {
|
|
1986
1986
|
const t = String(e), n = t.length - 1;
|
|
1987
1987
|
return _.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
|
|
1988
1988
|
}
|
|
1989
|
-
function
|
|
1989
|
+
function ot(e) {
|
|
1990
1990
|
_.context = e;
|
|
1991
1991
|
}
|
|
1992
|
-
var
|
|
1993
|
-
equals:
|
|
1994
|
-
},
|
|
1992
|
+
var Ys = !1, Uo = (e, t) => e === t, qt = Symbol("solid-proxy"), Js = typeof Proxy == "function", Zs = Symbol("solid-track"), $t = {
|
|
1993
|
+
equals: Uo
|
|
1994
|
+
}, Xs = ir, be = 1, Qt = 2, er = {
|
|
1995
1995
|
owned: null,
|
|
1996
1996
|
cleanups: null,
|
|
1997
1997
|
context: null,
|
|
1998
1998
|
owner: null
|
|
1999
|
-
}, fn = {},
|
|
1999
|
+
}, fn = {}, C = null, hn = null, Mo = null, x = null, ee = null, _e = null, tn = 0;
|
|
2000
2000
|
function xe(e, t) {
|
|
2001
|
-
const n = x, s =
|
|
2001
|
+
const n = x, s = C, r = e.length === 0, a = t === void 0 ? s : t, i = r ? er : {
|
|
2002
2002
|
owned: null,
|
|
2003
2003
|
cleanups: null,
|
|
2004
2004
|
context: a ? a.context : null,
|
|
2005
2005
|
owner: a
|
|
2006
|
-
}, o = r ? e : () => e(() => Z(() =>
|
|
2007
|
-
|
|
2006
|
+
}, o = r ? e : () => e(() => Z(() => dt(i)));
|
|
2007
|
+
C = i, x = null;
|
|
2008
2008
|
try {
|
|
2009
2009
|
return me(o, !0);
|
|
2010
2010
|
} finally {
|
|
2011
|
-
x = n,
|
|
2011
|
+
x = n, C = s;
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
2014
2014
|
function F(e, t) {
|
|
@@ -2018,82 +2018,82 @@ function F(e, t) {
|
|
|
2018
2018
|
observers: null,
|
|
2019
2019
|
observerSlots: null,
|
|
2020
2020
|
comparator: t.equals || void 0
|
|
2021
|
-
}, s = (r) => (typeof r == "function" && (r = r(n.value)),
|
|
2022
|
-
return [
|
|
2021
|
+
}, s = (r) => (typeof r == "function" && (r = r(n.value)), ar(n, r));
|
|
2022
|
+
return [rr.bind(n), s];
|
|
2023
2023
|
}
|
|
2024
|
-
function
|
|
2025
|
-
const s = nn(e, t, !0,
|
|
2026
|
-
|
|
2024
|
+
function Bo(e, t, n) {
|
|
2025
|
+
const s = nn(e, t, !0, be);
|
|
2026
|
+
it(s);
|
|
2027
2027
|
}
|
|
2028
2028
|
function Re(e, t, n) {
|
|
2029
|
-
const s = nn(e, t, !1,
|
|
2030
|
-
|
|
2029
|
+
const s = nn(e, t, !1, be);
|
|
2030
|
+
it(s);
|
|
2031
2031
|
}
|
|
2032
|
-
function
|
|
2033
|
-
|
|
2034
|
-
const s = nn(e, t, !1,
|
|
2035
|
-
(!n || !n.render) && (s.user = !0),
|
|
2032
|
+
function tr(e, t, n) {
|
|
2033
|
+
Xs = Wo;
|
|
2034
|
+
const s = nn(e, t, !1, be);
|
|
2035
|
+
(!n || !n.render) && (s.user = !0), _e ? _e.push(s) : it(s);
|
|
2036
2036
|
}
|
|
2037
|
-
function
|
|
2037
|
+
function j(e, t, n) {
|
|
2038
2038
|
n = n ? Object.assign({}, $t, n) : $t;
|
|
2039
2039
|
const s = nn(e, t, !0, 0);
|
|
2040
|
-
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0,
|
|
2040
|
+
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, it(s), rr.bind(s);
|
|
2041
2041
|
}
|
|
2042
|
-
function
|
|
2042
|
+
function Fo(e) {
|
|
2043
2043
|
return e && typeof e == "object" && "then" in e;
|
|
2044
2044
|
}
|
|
2045
|
-
function
|
|
2045
|
+
function Ko(e, t, n) {
|
|
2046
2046
|
let s, r, a;
|
|
2047
2047
|
s = !0, r = e, a = {};
|
|
2048
|
-
let i = null, o = fn, l = null, d = !1, u = "initialValue" in a, f = typeof s == "function" &&
|
|
2049
|
-
const g = /* @__PURE__ */ new Set(), [h, p] = (a.storage || F)(a.initialValue), [T, S] = F(void 0), [
|
|
2048
|
+
let i = null, o = fn, l = null, d = !1, u = "initialValue" in a, f = typeof s == "function" && j(s);
|
|
2049
|
+
const g = /* @__PURE__ */ new Set(), [h, p] = (a.storage || F)(a.initialValue), [T, S] = F(void 0), [O, y] = F(void 0, {
|
|
2050
2050
|
equals: !1
|
|
2051
2051
|
}), [w, v] = F(u ? "ready" : "unresolved");
|
|
2052
2052
|
_.context && (l = _.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : _.load && _.has(l) && (o = _.load(l)));
|
|
2053
|
-
function U(P,
|
|
2054
|
-
return i === P && (i = null, $ !== void 0 && (u = !0), (P === o ||
|
|
2055
|
-
value:
|
|
2056
|
-
})), o = fn,
|
|
2053
|
+
function U(P, L, W, $) {
|
|
2054
|
+
return i === P && (i = null, $ !== void 0 && (u = !0), (P === o || L === o) && a.onHydrated && queueMicrotask(() => a.onHydrated($, {
|
|
2055
|
+
value: L
|
|
2056
|
+
})), o = fn, I(L, W)), L;
|
|
2057
2057
|
}
|
|
2058
|
-
function
|
|
2058
|
+
function I(P, L) {
|
|
2059
2059
|
me(() => {
|
|
2060
|
-
|
|
2061
|
-
for (const
|
|
2060
|
+
L === void 0 && p(() => P), v(L !== void 0 ? "errored" : u ? "ready" : "unresolved"), S(L);
|
|
2061
|
+
for (const W of g.keys()) W.decrement();
|
|
2062
2062
|
g.clear();
|
|
2063
2063
|
}, !1);
|
|
2064
2064
|
}
|
|
2065
2065
|
function ye() {
|
|
2066
|
-
const P =
|
|
2067
|
-
if (
|
|
2068
|
-
return x && x.user,
|
|
2066
|
+
const P = $o, L = h(), W = T();
|
|
2067
|
+
if (W !== void 0 && !i) throw W;
|
|
2068
|
+
return x && x.user, L;
|
|
2069
2069
|
}
|
|
2070
2070
|
function Ae(P = !0) {
|
|
2071
2071
|
if (P !== !1 && d) return;
|
|
2072
2072
|
d = !1;
|
|
2073
|
-
const
|
|
2074
|
-
if (
|
|
2073
|
+
const L = f ? f() : s;
|
|
2074
|
+
if (L == null || L === !1) {
|
|
2075
2075
|
U(i, Z(h));
|
|
2076
2076
|
return;
|
|
2077
2077
|
}
|
|
2078
|
-
let
|
|
2078
|
+
let W;
|
|
2079
2079
|
const $ = o !== fn ? o : Z(() => {
|
|
2080
2080
|
try {
|
|
2081
|
-
return r(
|
|
2081
|
+
return r(L, {
|
|
2082
2082
|
value: h(),
|
|
2083
2083
|
refetching: P
|
|
2084
2084
|
});
|
|
2085
|
-
} catch (
|
|
2086
|
-
|
|
2085
|
+
} catch (fe) {
|
|
2086
|
+
W = fe;
|
|
2087
2087
|
}
|
|
2088
2088
|
});
|
|
2089
|
-
if (
|
|
2090
|
-
U(i, void 0, Bt(
|
|
2089
|
+
if (W !== void 0) {
|
|
2090
|
+
U(i, void 0, Bt(W), L);
|
|
2091
2091
|
return;
|
|
2092
|
-
} else if (!
|
|
2093
|
-
return U(i, $, void 0,
|
|
2094
|
-
return i = $, "v" in $ ? ($.s === 1 ? U(i, $.v, void 0,
|
|
2092
|
+
} else if (!Fo($))
|
|
2093
|
+
return U(i, $, void 0, L), $;
|
|
2094
|
+
return i = $, "v" in $ ? ($.s === 1 ? U(i, $.v, void 0, L) : U(i, void 0, Bt($.v), L), $) : (d = !0, queueMicrotask(() => d = !1), me(() => {
|
|
2095
2095
|
v(u ? "refreshing" : "pending"), y();
|
|
2096
|
-
}, !1), $.then((
|
|
2096
|
+
}, !1), $.then((fe) => U($, fe, void 0, L), (fe) => U($, void 0, Bt(fe), L)));
|
|
2097
2097
|
}
|
|
2098
2098
|
Object.defineProperties(ye, {
|
|
2099
2099
|
state: {
|
|
@@ -2117,13 +2117,13 @@ function Bo(e, t, n) {
|
|
|
2117
2117
|
}
|
|
2118
2118
|
}
|
|
2119
2119
|
});
|
|
2120
|
-
let B =
|
|
2121
|
-
return f ?
|
|
2122
|
-
refetch: (P) =>
|
|
2120
|
+
let B = C;
|
|
2121
|
+
return f ? Bo(() => (B = C, Ae(!1))) : Ae(!1), [ye, {
|
|
2122
|
+
refetch: (P) => nr(B, () => Ae(P)),
|
|
2123
2123
|
mutate: p
|
|
2124
2124
|
}];
|
|
2125
2125
|
}
|
|
2126
|
-
function
|
|
2126
|
+
function uu(e) {
|
|
2127
2127
|
return me(e, !1);
|
|
2128
2128
|
}
|
|
2129
2129
|
function Z(e) {
|
|
@@ -2136,7 +2136,7 @@ function Z(e) {
|
|
|
2136
2136
|
x = t;
|
|
2137
2137
|
}
|
|
2138
2138
|
}
|
|
2139
|
-
function
|
|
2139
|
+
function du(e, t, n) {
|
|
2140
2140
|
const s = Array.isArray(e);
|
|
2141
2141
|
let r, a = n && n.defer;
|
|
2142
2142
|
return (i) => {
|
|
@@ -2151,64 +2151,64 @@ function ou(e, t, n) {
|
|
|
2151
2151
|
return r = o, l;
|
|
2152
2152
|
};
|
|
2153
2153
|
}
|
|
2154
|
-
function
|
|
2155
|
-
|
|
2154
|
+
function Vo(e) {
|
|
2155
|
+
tr(() => Z(e));
|
|
2156
2156
|
}
|
|
2157
|
-
function
|
|
2158
|
-
return
|
|
2157
|
+
function ut(e) {
|
|
2158
|
+
return C === null || (C.cleanups === null ? C.cleanups = [e] : C.cleanups.push(e)), e;
|
|
2159
2159
|
}
|
|
2160
|
-
function
|
|
2161
|
-
return
|
|
2160
|
+
function is() {
|
|
2161
|
+
return C;
|
|
2162
2162
|
}
|
|
2163
|
-
function
|
|
2164
|
-
const n =
|
|
2165
|
-
|
|
2163
|
+
function nr(e, t) {
|
|
2164
|
+
const n = C, s = x;
|
|
2165
|
+
C = e, x = null;
|
|
2166
2166
|
try {
|
|
2167
2167
|
return me(t, !0);
|
|
2168
2168
|
} catch (r) {
|
|
2169
2169
|
Bn(r);
|
|
2170
2170
|
} finally {
|
|
2171
|
-
|
|
2171
|
+
C = n, x = s;
|
|
2172
2172
|
}
|
|
2173
2173
|
}
|
|
2174
|
-
function
|
|
2175
|
-
const t = x, n =
|
|
2174
|
+
function Ho(e) {
|
|
2175
|
+
const t = x, n = C;
|
|
2176
2176
|
return Promise.resolve().then(() => {
|
|
2177
|
-
x = t,
|
|
2177
|
+
x = t, C = n;
|
|
2178
2178
|
let s;
|
|
2179
|
-
return me(e, !1), x =
|
|
2179
|
+
return me(e, !1), x = C = null, s ? s.done : void 0;
|
|
2180
2180
|
});
|
|
2181
2181
|
}
|
|
2182
|
-
var [
|
|
2183
|
-
function
|
|
2184
|
-
return [
|
|
2182
|
+
var [qo, fu] = /* @__PURE__ */ F(!1);
|
|
2183
|
+
function hu() {
|
|
2184
|
+
return [qo, Ho];
|
|
2185
2185
|
}
|
|
2186
|
-
function
|
|
2186
|
+
function gu(e, t) {
|
|
2187
2187
|
const n = Symbol("context");
|
|
2188
2188
|
return {
|
|
2189
2189
|
id: n,
|
|
2190
|
-
Provider:
|
|
2190
|
+
Provider: jo(n),
|
|
2191
2191
|
defaultValue: e
|
|
2192
2192
|
};
|
|
2193
2193
|
}
|
|
2194
|
-
function
|
|
2194
|
+
function mu(e) {
|
|
2195
2195
|
let t;
|
|
2196
|
-
return
|
|
2196
|
+
return C && C.context && (t = C.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
2197
2197
|
}
|
|
2198
|
-
function
|
|
2199
|
-
const t =
|
|
2198
|
+
function sr(e) {
|
|
2199
|
+
const t = j(e), n = j(() => yn(t()));
|
|
2200
2200
|
return n.toArray = () => {
|
|
2201
2201
|
const s = n();
|
|
2202
2202
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
2203
2203
|
}, n;
|
|
2204
2204
|
}
|
|
2205
|
-
var
|
|
2206
|
-
function
|
|
2205
|
+
var $o;
|
|
2206
|
+
function rr() {
|
|
2207
2207
|
if (this.sources && this.state)
|
|
2208
|
-
if (this.state ===
|
|
2208
|
+
if (this.state === be) it(this);
|
|
2209
2209
|
else {
|
|
2210
2210
|
const e = ee;
|
|
2211
|
-
ee = null, me(() =>
|
|
2211
|
+
ee = null, me(() => Wt(this), !1), ee = e;
|
|
2212
2212
|
}
|
|
2213
2213
|
if (x) {
|
|
2214
2214
|
const e = this.observers ? this.observers.length : 0;
|
|
@@ -2216,37 +2216,37 @@ function sr() {
|
|
|
2216
2216
|
}
|
|
2217
2217
|
return this.value;
|
|
2218
2218
|
}
|
|
2219
|
-
function
|
|
2219
|
+
function ar(e, t, n) {
|
|
2220
2220
|
let s = e.value;
|
|
2221
2221
|
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && me(() => {
|
|
2222
2222
|
for (let r = 0; r < e.observers.length; r += 1) {
|
|
2223
2223
|
const a = e.observers[r], i = hn && hn.running;
|
|
2224
|
-
i && hn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) :
|
|
2224
|
+
i && hn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) : _e.push(a), a.observers && or(a)), i || (a.state = be);
|
|
2225
2225
|
}
|
|
2226
2226
|
if (ee.length > 1e6)
|
|
2227
2227
|
throw ee = [], new Error();
|
|
2228
2228
|
}, !1)), t;
|
|
2229
2229
|
}
|
|
2230
|
-
function
|
|
2230
|
+
function it(e) {
|
|
2231
2231
|
if (!e.fn) return;
|
|
2232
|
-
|
|
2232
|
+
dt(e);
|
|
2233
2233
|
const t = tn;
|
|
2234
|
-
|
|
2234
|
+
Qo(e, e.value, t);
|
|
2235
2235
|
}
|
|
2236
|
-
function
|
|
2236
|
+
function Qo(e, t, n) {
|
|
2237
2237
|
let s;
|
|
2238
|
-
const r =
|
|
2239
|
-
x =
|
|
2238
|
+
const r = C, a = x;
|
|
2239
|
+
x = C = e;
|
|
2240
2240
|
try {
|
|
2241
2241
|
s = e.fn(t);
|
|
2242
2242
|
} catch (i) {
|
|
2243
|
-
return e.pure && (e.state =
|
|
2243
|
+
return e.pure && (e.state = be, e.owned && e.owned.forEach(dt), e.owned = null), e.updatedAt = n + 1, Bn(i);
|
|
2244
2244
|
} finally {
|
|
2245
|
-
x = a,
|
|
2245
|
+
x = a, C = r;
|
|
2246
2246
|
}
|
|
2247
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ?
|
|
2247
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? ar(e, s) : e.value = s, e.updatedAt = n);
|
|
2248
2248
|
}
|
|
2249
|
-
function nn(e, t, n, s =
|
|
2249
|
+
function nn(e, t, n, s = be, r) {
|
|
2250
2250
|
const a = {
|
|
2251
2251
|
fn: e,
|
|
2252
2252
|
state: s,
|
|
@@ -2256,47 +2256,47 @@ function nn(e, t, n, s = ve, r) {
|
|
|
2256
2256
|
sourceSlots: null,
|
|
2257
2257
|
cleanups: null,
|
|
2258
2258
|
value: t,
|
|
2259
|
-
owner:
|
|
2260
|
-
context:
|
|
2259
|
+
owner: C,
|
|
2260
|
+
context: C ? C.context : null,
|
|
2261
2261
|
pure: n
|
|
2262
2262
|
};
|
|
2263
|
-
return
|
|
2263
|
+
return C === null || C !== er && (C.owned ? C.owned.push(a) : C.owned = [a]), a;
|
|
2264
2264
|
}
|
|
2265
2265
|
function zt(e) {
|
|
2266
2266
|
if (e.state === 0) return;
|
|
2267
|
-
if (e.state === Qt) return
|
|
2267
|
+
if (e.state === Qt) return Wt(e);
|
|
2268
2268
|
if (e.suspense && Z(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
2269
2269
|
const t = [e];
|
|
2270
2270
|
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < tn); )
|
|
2271
2271
|
e.state && t.push(e);
|
|
2272
2272
|
for (let n = t.length - 1; n >= 0; n--)
|
|
2273
|
-
if (e = t[n], e.state ===
|
|
2274
|
-
|
|
2273
|
+
if (e = t[n], e.state === be)
|
|
2274
|
+
it(e);
|
|
2275
2275
|
else if (e.state === Qt) {
|
|
2276
2276
|
const s = ee;
|
|
2277
|
-
ee = null, me(() =>
|
|
2277
|
+
ee = null, me(() => Wt(e, t[0]), !1), ee = s;
|
|
2278
2278
|
}
|
|
2279
2279
|
}
|
|
2280
2280
|
function me(e, t) {
|
|
2281
2281
|
if (ee) return e();
|
|
2282
2282
|
let n = !1;
|
|
2283
|
-
t || (ee = []),
|
|
2283
|
+
t || (ee = []), _e ? n = !0 : _e = [], tn++;
|
|
2284
2284
|
try {
|
|
2285
2285
|
const s = e();
|
|
2286
|
-
return
|
|
2286
|
+
return zo(n), s;
|
|
2287
2287
|
} catch (s) {
|
|
2288
|
-
n || (
|
|
2288
|
+
n || (_e = null), ee = null, Bn(s);
|
|
2289
2289
|
}
|
|
2290
2290
|
}
|
|
2291
|
-
function
|
|
2292
|
-
if (ee && (
|
|
2293
|
-
const t =
|
|
2294
|
-
|
|
2291
|
+
function zo(e) {
|
|
2292
|
+
if (ee && (ir(ee), ee = null), e) return;
|
|
2293
|
+
const t = _e;
|
|
2294
|
+
_e = null, t.length && me(() => Xs(t), !1);
|
|
2295
2295
|
}
|
|
2296
|
-
function
|
|
2296
|
+
function ir(e) {
|
|
2297
2297
|
for (let t = 0; t < e.length; t++) zt(e[t]);
|
|
2298
2298
|
}
|
|
2299
|
-
function
|
|
2299
|
+
function Wo(e) {
|
|
2300
2300
|
let t, n = 0;
|
|
2301
2301
|
for (t = 0; t < e.length; t++) {
|
|
2302
2302
|
const s = e[t];
|
|
@@ -2307,27 +2307,27 @@ function Qo(e) {
|
|
|
2307
2307
|
_.effects || (_.effects = []), _.effects.push(...e.slice(0, n));
|
|
2308
2308
|
return;
|
|
2309
2309
|
}
|
|
2310
|
-
|
|
2310
|
+
ot();
|
|
2311
2311
|
}
|
|
2312
2312
|
for (_.effects && (_.done || !_.count) && (e = [..._.effects, ...e], n += _.effects.length, delete _.effects), t = 0; t < n; t++) zt(e[t]);
|
|
2313
2313
|
}
|
|
2314
|
-
function
|
|
2314
|
+
function Wt(e, t) {
|
|
2315
2315
|
e.state = 0;
|
|
2316
2316
|
for (let n = 0; n < e.sources.length; n += 1) {
|
|
2317
2317
|
const s = e.sources[n];
|
|
2318
2318
|
if (s.sources) {
|
|
2319
2319
|
const r = s.state;
|
|
2320
|
-
r ===
|
|
2320
|
+
r === be ? s !== t && (!s.updatedAt || s.updatedAt < tn) && zt(s) : r === Qt && Wt(s, t);
|
|
2321
2321
|
}
|
|
2322
2322
|
}
|
|
2323
2323
|
}
|
|
2324
|
-
function
|
|
2324
|
+
function or(e) {
|
|
2325
2325
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
2326
2326
|
const n = e.observers[t];
|
|
2327
|
-
n.state || (n.state = Qt, n.pure ? ee.push(n) :
|
|
2327
|
+
n.state || (n.state = Qt, n.pure ? ee.push(n) : _e.push(n), n.observers && or(n));
|
|
2328
2328
|
}
|
|
2329
2329
|
}
|
|
2330
|
-
function
|
|
2330
|
+
function dt(e) {
|
|
2331
2331
|
let t;
|
|
2332
2332
|
if (e.sources)
|
|
2333
2333
|
for (; e.sources.length; ) {
|
|
@@ -2338,11 +2338,11 @@ function ft(e) {
|
|
|
2338
2338
|
}
|
|
2339
2339
|
}
|
|
2340
2340
|
if (e.tOwned) {
|
|
2341
|
-
for (t = e.tOwned.length - 1; t >= 0; t--)
|
|
2341
|
+
for (t = e.tOwned.length - 1; t >= 0; t--) dt(e.tOwned[t]);
|
|
2342
2342
|
delete e.tOwned;
|
|
2343
2343
|
}
|
|
2344
2344
|
if (e.owned) {
|
|
2345
|
-
for (t = e.owned.length - 1; t >= 0; t--)
|
|
2345
|
+
for (t = e.owned.length - 1; t >= 0; t--) dt(e.owned[t]);
|
|
2346
2346
|
e.owned = null;
|
|
2347
2347
|
}
|
|
2348
2348
|
if (e.cleanups) {
|
|
@@ -2356,7 +2356,7 @@ function Bt(e) {
|
|
|
2356
2356
|
cause: e
|
|
2357
2357
|
});
|
|
2358
2358
|
}
|
|
2359
|
-
function Bn(e, t =
|
|
2359
|
+
function Bn(e, t = C) {
|
|
2360
2360
|
throw Bt(e);
|
|
2361
2361
|
}
|
|
2362
2362
|
function yn(e) {
|
|
@@ -2371,41 +2371,41 @@ function yn(e) {
|
|
|
2371
2371
|
}
|
|
2372
2372
|
return e;
|
|
2373
2373
|
}
|
|
2374
|
-
function
|
|
2374
|
+
function jo(e, t) {
|
|
2375
2375
|
return function(s) {
|
|
2376
2376
|
let r;
|
|
2377
|
-
return Re(() => r = Z(() => (
|
|
2378
|
-
...
|
|
2377
|
+
return Re(() => r = Z(() => (C.context = {
|
|
2378
|
+
...C.context,
|
|
2379
2379
|
[e]: s.value
|
|
2380
|
-
},
|
|
2380
|
+
}, sr(() => s.children))), void 0), r;
|
|
2381
2381
|
};
|
|
2382
2382
|
}
|
|
2383
2383
|
var An = Symbol("fallback");
|
|
2384
|
-
function
|
|
2384
|
+
function jt(e) {
|
|
2385
2385
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
2386
2386
|
}
|
|
2387
|
-
function
|
|
2387
|
+
function Yo(e, t, n = {}) {
|
|
2388
2388
|
let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
|
|
2389
|
-
return
|
|
2389
|
+
return ut(() => jt(a)), () => {
|
|
2390
2390
|
let l = e() || [], d = l.length, u, f;
|
|
2391
|
-
return l[
|
|
2392
|
-
let h, p, T, S,
|
|
2391
|
+
return l[Zs], Z(() => {
|
|
2392
|
+
let h, p, T, S, O, y, w, v, U;
|
|
2393
2393
|
if (d === 0)
|
|
2394
|
-
i !== 0 && (
|
|
2394
|
+
i !== 0 && (jt(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [An], r[0] = xe((I) => (a[0] = I, n.fallback())), i = 1);
|
|
2395
2395
|
else if (i === 0) {
|
|
2396
2396
|
for (r = new Array(d), f = 0; f < d; f++)
|
|
2397
2397
|
s[f] = l[f], r[f] = xe(g);
|
|
2398
2398
|
i = d;
|
|
2399
2399
|
} else {
|
|
2400
|
-
for (T = new Array(d), S = new Array(d), o && (
|
|
2400
|
+
for (T = new Array(d), S = new Array(d), o && (O = new Array(d)), y = 0, w = Math.min(i, d); y < w && s[y] === l[y]; y++) ;
|
|
2401
2401
|
for (w = i - 1, v = d - 1; w >= y && v >= y && s[w] === l[v]; w--, v--)
|
|
2402
|
-
T[v] = r[w], S[v] = a[w], o && (
|
|
2402
|
+
T[v] = r[w], S[v] = a[w], o && (O[v] = o[w]);
|
|
2403
2403
|
for (h = /* @__PURE__ */ new Map(), p = new Array(v + 1), f = v; f >= y; f--)
|
|
2404
2404
|
U = l[f], u = h.get(U), p[f] = u === void 0 ? -1 : u, h.set(U, f);
|
|
2405
2405
|
for (u = y; u <= w; u++)
|
|
2406
|
-
U = s[u], f = h.get(U), f !== void 0 && f !== -1 ? (T[f] = r[u], S[f] = a[u], o && (
|
|
2406
|
+
U = s[u], f = h.get(U), f !== void 0 && f !== -1 ? (T[f] = r[u], S[f] = a[u], o && (O[f] = o[u]), f = p[f], h.set(U, f)) : a[u]();
|
|
2407
2407
|
for (f = y; f < d; f++)
|
|
2408
|
-
f in T ? (r[f] = T[f], a[f] = S[f], o && (o[f] =
|
|
2408
|
+
f in T ? (r[f] = T[f], a[f] = S[f], o && (o[f] = O[f], o[f](f))) : r[f] = xe(g);
|
|
2409
2409
|
r = r.slice(0, i = d), s = l.slice(0);
|
|
2410
2410
|
}
|
|
2411
2411
|
return r;
|
|
@@ -2419,13 +2419,13 @@ function jo(e, t, n = {}) {
|
|
|
2419
2419
|
}
|
|
2420
2420
|
};
|
|
2421
2421
|
}
|
|
2422
|
-
function
|
|
2422
|
+
function Jo(e, t, n = {}) {
|
|
2423
2423
|
let s = [], r = [], a = [], i = [], o = 0, l;
|
|
2424
|
-
return
|
|
2424
|
+
return ut(() => jt(a)), () => {
|
|
2425
2425
|
const d = e() || [], u = d.length;
|
|
2426
|
-
return d[
|
|
2426
|
+
return d[Zs], Z(() => {
|
|
2427
2427
|
if (u === 0)
|
|
2428
|
-
return o !== 0 && (
|
|
2428
|
+
return o !== 0 && (jt(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [An], r[0] = xe((g) => (a[0] = g, n.fallback())), o = 1), r;
|
|
2429
2429
|
for (s[0] === An && (a[0](), a = [], s = [], r = [], o = 0), l = 0; l < u; l++)
|
|
2430
2430
|
l < s.length && s[l] !== d[l] ? i[l](() => d[l]) : l >= s.length && (r[l] = xe(f));
|
|
2431
2431
|
for (; l < s.length; l++)
|
|
@@ -2439,7 +2439,7 @@ function Wo(e, t, n = {}) {
|
|
|
2439
2439
|
}
|
|
2440
2440
|
};
|
|
2441
2441
|
}
|
|
2442
|
-
function
|
|
2442
|
+
function lr(e, t) {
|
|
2443
2443
|
return Z(() => e(t || {}));
|
|
2444
2444
|
}
|
|
2445
2445
|
function xt() {
|
|
@@ -2472,19 +2472,19 @@ var Tn = {
|
|
|
2472
2472
|
function gn(e) {
|
|
2473
2473
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
2474
2474
|
}
|
|
2475
|
-
function
|
|
2475
|
+
function Zo() {
|
|
2476
2476
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
2477
2477
|
const n = this[e]();
|
|
2478
2478
|
if (n !== void 0) return n;
|
|
2479
2479
|
}
|
|
2480
2480
|
}
|
|
2481
|
-
function
|
|
2481
|
+
function cr(...e) {
|
|
2482
2482
|
let t = !1;
|
|
2483
2483
|
for (let i = 0; i < e.length; i++) {
|
|
2484
2484
|
const o = e[i];
|
|
2485
|
-
t = t || !!o && qt in o, e[i] = typeof o == "function" ? (t = !0,
|
|
2485
|
+
t = t || !!o && qt in o, e[i] = typeof o == "function" ? (t = !0, j(o)) : o;
|
|
2486
2486
|
}
|
|
2487
|
-
if (
|
|
2487
|
+
if (Js && t)
|
|
2488
2488
|
return new Proxy({
|
|
2489
2489
|
get(i) {
|
|
2490
2490
|
for (let o = e.length - 1; o >= 0; o--) {
|
|
@@ -2516,7 +2516,7 @@ function lr(...e) {
|
|
|
2516
2516
|
s[u] = f.get ? {
|
|
2517
2517
|
enumerable: !0,
|
|
2518
2518
|
configurable: !0,
|
|
2519
|
-
get:
|
|
2519
|
+
get: Zo.bind(n[u] = [f.get.bind(o)])
|
|
2520
2520
|
} : f.value !== void 0 ? f : void 0;
|
|
2521
2521
|
else {
|
|
2522
2522
|
const g = n[u];
|
|
@@ -2531,8 +2531,8 @@ function lr(...e) {
|
|
|
2531
2531
|
}
|
|
2532
2532
|
return r;
|
|
2533
2533
|
}
|
|
2534
|
-
function
|
|
2535
|
-
if (
|
|
2534
|
+
function Xo(e, ...t) {
|
|
2535
|
+
if (Js && qt in e) {
|
|
2536
2536
|
const r = new Set(t.length > 1 ? t.flat() : t[0]), a = t.map((i) => new Proxy({
|
|
2537
2537
|
get(o) {
|
|
2538
2538
|
return i.includes(o) ? e[o] : void 0;
|
|
@@ -2566,94 +2566,94 @@ function Jo(e, ...t) {
|
|
|
2566
2566
|
}
|
|
2567
2567
|
return [...s, n];
|
|
2568
2568
|
}
|
|
2569
|
-
function
|
|
2569
|
+
function ur(e) {
|
|
2570
2570
|
let t, n;
|
|
2571
2571
|
const s = (r) => {
|
|
2572
2572
|
const a = _.context;
|
|
2573
2573
|
if (a) {
|
|
2574
2574
|
const [o, l] = F();
|
|
2575
2575
|
_.count || (_.count = 0), _.count++, (n || (n = e())).then((d) => {
|
|
2576
|
-
!_.done &&
|
|
2576
|
+
!_.done && ot(a), _.count--, l(() => d.default), ot();
|
|
2577
2577
|
}), t = o;
|
|
2578
2578
|
} else if (!t) {
|
|
2579
|
-
const [o] =
|
|
2579
|
+
const [o] = Ko(() => (n || (n = e())).then((l) => l.default));
|
|
2580
2580
|
t = o;
|
|
2581
2581
|
}
|
|
2582
2582
|
let i;
|
|
2583
|
-
return
|
|
2583
|
+
return j(() => (i = t()) ? Z(() => {
|
|
2584
2584
|
if (!a || _.done) return i(r);
|
|
2585
2585
|
const o = _.context;
|
|
2586
|
-
|
|
2586
|
+
ot(a);
|
|
2587
2587
|
const l = i(r);
|
|
2588
|
-
return
|
|
2588
|
+
return ot(o), l;
|
|
2589
2589
|
}) : "");
|
|
2590
2590
|
};
|
|
2591
2591
|
return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
|
|
2592
2592
|
}
|
|
2593
|
-
var
|
|
2594
|
-
function
|
|
2595
|
-
return _.context ? _.getNextContextId() : `cl-${
|
|
2593
|
+
var el = 0;
|
|
2594
|
+
function Eu() {
|
|
2595
|
+
return _.context ? _.getNextContextId() : `cl-${el++}`;
|
|
2596
2596
|
}
|
|
2597
|
-
var
|
|
2598
|
-
function
|
|
2597
|
+
var dr = (e) => `Stale read from <${e}>.`;
|
|
2598
|
+
function pu(e) {
|
|
2599
2599
|
const t = "fallback" in e && {
|
|
2600
2600
|
fallback: () => e.fallback
|
|
2601
2601
|
};
|
|
2602
|
-
return
|
|
2602
|
+
return j(Yo(() => e.each, e.children, t || void 0));
|
|
2603
2603
|
}
|
|
2604
|
-
function
|
|
2604
|
+
function yu(e) {
|
|
2605
2605
|
const t = "fallback" in e && {
|
|
2606
2606
|
fallback: () => e.fallback
|
|
2607
2607
|
};
|
|
2608
|
-
return
|
|
2608
|
+
return j(Jo(() => e.each, e.children, t || void 0));
|
|
2609
2609
|
}
|
|
2610
|
-
function
|
|
2611
|
-
const t = e.keyed, n =
|
|
2610
|
+
function Au(e) {
|
|
2611
|
+
const t = e.keyed, n = j(() => e.when, void 0, void 0), s = t ? n : j(n, void 0, {
|
|
2612
2612
|
equals: (r, a) => !r == !a
|
|
2613
2613
|
});
|
|
2614
|
-
return
|
|
2614
|
+
return j(() => {
|
|
2615
2615
|
const r = s();
|
|
2616
2616
|
if (r) {
|
|
2617
2617
|
const a = e.children;
|
|
2618
2618
|
return typeof a == "function" && a.length > 0 ? Z(() => a(t ? r : () => {
|
|
2619
|
-
if (!Z(s)) throw
|
|
2619
|
+
if (!Z(s)) throw dr("Show");
|
|
2620
2620
|
return n();
|
|
2621
2621
|
})) : a;
|
|
2622
2622
|
}
|
|
2623
2623
|
return e.fallback;
|
|
2624
2624
|
}, void 0, void 0);
|
|
2625
2625
|
}
|
|
2626
|
-
function
|
|
2627
|
-
const t =
|
|
2626
|
+
function Tu(e) {
|
|
2627
|
+
const t = sr(() => e.children), n = j(() => {
|
|
2628
2628
|
const s = t(), r = Array.isArray(s) ? s : [s];
|
|
2629
2629
|
let a = () => {
|
|
2630
2630
|
};
|
|
2631
2631
|
for (let i = 0; i < r.length; i++) {
|
|
2632
|
-
const o = i, l = r[i], d = a, u =
|
|
2632
|
+
const o = i, l = r[i], d = a, u = j(() => d() ? void 0 : l.when, void 0, void 0), f = l.keyed ? u : j(u, void 0, {
|
|
2633
2633
|
equals: (g, h) => !g == !h
|
|
2634
2634
|
});
|
|
2635
2635
|
a = () => d() || (f() ? [o, u, l] : void 0);
|
|
2636
2636
|
}
|
|
2637
2637
|
return a;
|
|
2638
2638
|
});
|
|
2639
|
-
return
|
|
2639
|
+
return j(() => {
|
|
2640
2640
|
const s = n()();
|
|
2641
2641
|
if (!s) return e.fallback;
|
|
2642
2642
|
const [r, a, i] = s, o = i.children;
|
|
2643
2643
|
return typeof o == "function" && o.length > 0 ? Z(() => o(i.keyed ? a() : () => {
|
|
2644
2644
|
var d;
|
|
2645
|
-
if (((d = Z(n)()) == null ? void 0 : d[0]) !== r) throw
|
|
2645
|
+
if (((d = Z(n)()) == null ? void 0 : d[0]) !== r) throw dr("Match");
|
|
2646
2646
|
return a();
|
|
2647
2647
|
})) : o;
|
|
2648
2648
|
}, void 0, void 0);
|
|
2649
2649
|
}
|
|
2650
|
-
function
|
|
2650
|
+
function Su(e) {
|
|
2651
2651
|
return e;
|
|
2652
2652
|
}
|
|
2653
|
-
var
|
|
2653
|
+
var tl = ["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"], nl = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...tl]), sl = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), rl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2654
2654
|
className: "class",
|
|
2655
2655
|
htmlFor: "for"
|
|
2656
|
-
}),
|
|
2656
|
+
}), al = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2657
2657
|
class: "className",
|
|
2658
2658
|
novalidate: {
|
|
2659
2659
|
$: "noValidate",
|
|
@@ -2682,11 +2682,11 @@ var Xo = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
|
|
|
2682
2682
|
TEXTAREA: 1
|
|
2683
2683
|
}
|
|
2684
2684
|
});
|
|
2685
|
-
function
|
|
2686
|
-
const n =
|
|
2685
|
+
function il(e, t) {
|
|
2686
|
+
const n = al[e];
|
|
2687
2687
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
2688
2688
|
}
|
|
2689
|
-
var
|
|
2689
|
+
var ol = /* @__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"]), ll = /* @__PURE__ */ new Set([
|
|
2690
2690
|
"altGlyph",
|
|
2691
2691
|
"altGlyphDef",
|
|
2692
2692
|
"altGlyphItem",
|
|
@@ -2764,11 +2764,11 @@ var al = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
|
|
|
2764
2764
|
"use",
|
|
2765
2765
|
"view",
|
|
2766
2766
|
"vkern"
|
|
2767
|
-
]),
|
|
2767
|
+
]), cl = {
|
|
2768
2768
|
xlink: "http://www.w3.org/1999/xlink",
|
|
2769
2769
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
2770
|
-
},
|
|
2771
|
-
function
|
|
2770
|
+
}, _u = (e) => j(() => e());
|
|
2771
|
+
function ul(e, t, n) {
|
|
2772
2772
|
let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling, d = null;
|
|
2773
2773
|
for (; i < r || o < a; ) {
|
|
2774
2774
|
if (t[i] === n[o]) {
|
|
@@ -2807,8 +2807,8 @@ function ll(e, t, n) {
|
|
|
2807
2807
|
}
|
|
2808
2808
|
}
|
|
2809
2809
|
}
|
|
2810
|
-
var
|
|
2811
|
-
function
|
|
2810
|
+
var lt = "_$DX_DELEGATE";
|
|
2811
|
+
function fr(e, t, n, s = {}) {
|
|
2812
2812
|
let r;
|
|
2813
2813
|
return xe((a) => {
|
|
2814
2814
|
r = a, t === document ? e() : _n(t, e(), t.firstChild ? null : void 0, n);
|
|
@@ -2816,7 +2816,7 @@ function dr(e, t, n, s = {}) {
|
|
|
2816
2816
|
r(), t.textContent = "";
|
|
2817
2817
|
};
|
|
2818
2818
|
}
|
|
2819
|
-
function
|
|
2819
|
+
function Pu(e, t, n, s) {
|
|
2820
2820
|
let r;
|
|
2821
2821
|
const a = () => {
|
|
2822
2822
|
const o = document.createElement("template");
|
|
@@ -2824,32 +2824,32 @@ function Au(e, t, n, s) {
|
|
|
2824
2824
|
}, i = () => (r || (r = a())).cloneNode(!0);
|
|
2825
2825
|
return i.cloneNode = i, i;
|
|
2826
2826
|
}
|
|
2827
|
-
function
|
|
2828
|
-
const n = t[
|
|
2827
|
+
function dl(e, t = window.document) {
|
|
2828
|
+
const n = t[lt] || (t[lt] = /* @__PURE__ */ new Set());
|
|
2829
2829
|
for (let s = 0, r = e.length; s < r; s++) {
|
|
2830
2830
|
const a = e[s];
|
|
2831
|
-
n.has(a) || (n.add(a), t.addEventListener(a,
|
|
2831
|
+
n.has(a) || (n.add(a), t.addEventListener(a, hr));
|
|
2832
2832
|
}
|
|
2833
2833
|
}
|
|
2834
|
-
function
|
|
2835
|
-
if (e[
|
|
2836
|
-
for (let t of e[
|
|
2837
|
-
delete e[
|
|
2834
|
+
function wu(e = window.document) {
|
|
2835
|
+
if (e[lt]) {
|
|
2836
|
+
for (let t of e[lt].keys()) e.removeEventListener(t, hr);
|
|
2837
|
+
delete e[lt];
|
|
2838
2838
|
}
|
|
2839
2839
|
}
|
|
2840
2840
|
function Sn(e, t, n) {
|
|
2841
2841
|
Fe(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
2842
2842
|
}
|
|
2843
|
-
function
|
|
2843
|
+
function fl(e, t, n, s) {
|
|
2844
2844
|
Fe(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
|
|
2845
2845
|
}
|
|
2846
|
-
function
|
|
2846
|
+
function hl(e, t, n) {
|
|
2847
2847
|
Fe(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
2848
2848
|
}
|
|
2849
|
-
function
|
|
2849
|
+
function gl(e, t) {
|
|
2850
2850
|
Fe(e) || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
2851
2851
|
}
|
|
2852
|
-
function
|
|
2852
|
+
function ml(e, t, n, s) {
|
|
2853
2853
|
if (s)
|
|
2854
2854
|
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
2855
2855
|
else if (Array.isArray(n)) {
|
|
@@ -2857,20 +2857,20 @@ function hl(e, t, n, s) {
|
|
|
2857
2857
|
e.addEventListener(t, n[0] = (a) => r.call(e, n[1], a));
|
|
2858
2858
|
} else e.addEventListener(t, n, typeof n != "function" && n);
|
|
2859
2859
|
}
|
|
2860
|
-
function
|
|
2860
|
+
function El(e, t, n = {}) {
|
|
2861
2861
|
const s = Object.keys(t || {}), r = Object.keys(n);
|
|
2862
2862
|
let a, i;
|
|
2863
2863
|
for (a = 0, i = r.length; a < i; a++) {
|
|
2864
2864
|
const o = r[a];
|
|
2865
|
-
!o || o === "undefined" || t[o] || (
|
|
2865
|
+
!o || o === "undefined" || t[o] || (os(e, o, !1), delete n[o]);
|
|
2866
2866
|
}
|
|
2867
2867
|
for (a = 0, i = s.length; a < i; a++) {
|
|
2868
2868
|
const o = s[a], l = !!t[o];
|
|
2869
|
-
!o || o === "undefined" || n[o] === l || !l || (
|
|
2869
|
+
!o || o === "undefined" || n[o] === l || !l || (os(e, o, !0), n[o] = l);
|
|
2870
2870
|
}
|
|
2871
2871
|
return n;
|
|
2872
2872
|
}
|
|
2873
|
-
function
|
|
2873
|
+
function pl(e, t, n) {
|
|
2874
2874
|
if (!t) return n ? Sn(e, "style") : t;
|
|
2875
2875
|
const s = e.style;
|
|
2876
2876
|
if (typeof t == "string") return s.cssText = t;
|
|
@@ -2882,49 +2882,49 @@ function ml(e, t, n) {
|
|
|
2882
2882
|
r = t[a], r !== n[a] && (s.setProperty(a, r), n[a] = r);
|
|
2883
2883
|
return n;
|
|
2884
2884
|
}
|
|
2885
|
-
function
|
|
2885
|
+
function yl(e, t = {}, n, s) {
|
|
2886
2886
|
const r = {};
|
|
2887
|
-
return s || Re(() => r.children =
|
|
2887
|
+
return s || Re(() => r.children = ft(e, t.children, r.children)), Re(() => typeof t.ref == "function" && Al(t.ref, e)), Re(() => Tl(e, t, n, !0, r, !0)), r;
|
|
2888
2888
|
}
|
|
2889
|
-
function
|
|
2889
|
+
function Al(e, t, n) {
|
|
2890
2890
|
return Z(() => e(t, n));
|
|
2891
2891
|
}
|
|
2892
2892
|
function _n(e, t, n, s) {
|
|
2893
|
-
if (n !== void 0 && !s && (s = []), typeof t != "function") return
|
|
2894
|
-
Re((r) =>
|
|
2893
|
+
if (n !== void 0 && !s && (s = []), typeof t != "function") return ft(e, t, s, n);
|
|
2894
|
+
Re((r) => ft(e, t(), r, n), s);
|
|
2895
2895
|
}
|
|
2896
|
-
function
|
|
2896
|
+
function Tl(e, t, n, s, r = {}, a = !1) {
|
|
2897
2897
|
t || (t = {});
|
|
2898
2898
|
for (const i in r)
|
|
2899
2899
|
if (!(i in t)) {
|
|
2900
2900
|
if (i === "children") continue;
|
|
2901
|
-
r[i] =
|
|
2901
|
+
r[i] = ls(e, i, null, r[i], n, a, t);
|
|
2902
2902
|
}
|
|
2903
2903
|
for (const i in t) {
|
|
2904
2904
|
if (i === "children")
|
|
2905
2905
|
continue;
|
|
2906
2906
|
const o = t[i];
|
|
2907
|
-
r[i] =
|
|
2907
|
+
r[i] = ls(e, i, o, r[i], n, a, t);
|
|
2908
2908
|
}
|
|
2909
2909
|
}
|
|
2910
|
-
function
|
|
2910
|
+
function Sl(e) {
|
|
2911
2911
|
let t, n;
|
|
2912
|
-
return !Fe() || !(t = _.registry.get(n =
|
|
2912
|
+
return !Fe() || !(t = _.registry.get(n = Pl())) ? e() : (_.completed && _.completed.add(t), _.registry.delete(n), t);
|
|
2913
2913
|
}
|
|
2914
2914
|
function Fe(e) {
|
|
2915
2915
|
return !!_.context && !_.done && (!e || e.isConnected);
|
|
2916
2916
|
}
|
|
2917
|
-
function
|
|
2917
|
+
function _l(e) {
|
|
2918
2918
|
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
2919
2919
|
}
|
|
2920
|
-
function
|
|
2920
|
+
function os(e, t, n) {
|
|
2921
2921
|
const s = t.trim().split(/\s+/);
|
|
2922
2922
|
for (let r = 0, a = s.length; r < a; r++) e.classList.toggle(s[r], n);
|
|
2923
2923
|
}
|
|
2924
|
-
function
|
|
2924
|
+
function ls(e, t, n, s, r, a, i) {
|
|
2925
2925
|
let o, l, d, u, f;
|
|
2926
|
-
if (t === "style") return
|
|
2927
|
-
if (t === "classList") return
|
|
2926
|
+
if (t === "style") return pl(e, n, s);
|
|
2927
|
+
if (t === "classList") return El(e, n, s);
|
|
2928
2928
|
if (n === s) return s;
|
|
2929
2929
|
if (t === "ref")
|
|
2930
2930
|
a || n(e);
|
|
@@ -2935,28 +2935,28 @@ function os(e, t, n, s, r, a, i) {
|
|
|
2935
2935
|
const g = t.slice(10);
|
|
2936
2936
|
s && e.removeEventListener(g, s, !0), n && e.addEventListener(g, n, !0);
|
|
2937
2937
|
} else if (t.slice(0, 2) === "on") {
|
|
2938
|
-
const g = t.slice(2).toLowerCase(), h =
|
|
2938
|
+
const g = t.slice(2).toLowerCase(), h = ol.has(g);
|
|
2939
2939
|
if (!h && s) {
|
|
2940
2940
|
const p = Array.isArray(s) ? s[0] : s;
|
|
2941
2941
|
e.removeEventListener(g, p);
|
|
2942
2942
|
}
|
|
2943
|
-
(h || n) && (
|
|
2943
|
+
(h || n) && (ml(e, g, n, h), h && dl([g]));
|
|
2944
2944
|
} else if (t.slice(0, 5) === "attr:")
|
|
2945
2945
|
Sn(e, t.slice(5), n);
|
|
2946
2946
|
else if (t.slice(0, 5) === "bool:")
|
|
2947
|
-
|
|
2948
|
-
else if ((f = t.slice(0, 5) === "prop:") || (d =
|
|
2947
|
+
hl(e, t.slice(5), n);
|
|
2948
|
+
else if ((f = t.slice(0, 5) === "prop:") || (d = sl.has(t)) || !r && ((u = il(t, e.tagName)) || (l = nl.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
|
|
2949
2949
|
if (f)
|
|
2950
2950
|
t = t.slice(5), l = !0;
|
|
2951
2951
|
else if (Fe(e)) return n;
|
|
2952
|
-
t === "class" || t === "className" ?
|
|
2952
|
+
t === "class" || t === "className" ? gl(e, n) : o && !l && !d ? e[_l(t)] = n : e[u || t] = n;
|
|
2953
2953
|
} else {
|
|
2954
|
-
const g = r && t.indexOf(":") > -1 &&
|
|
2955
|
-
g ?
|
|
2954
|
+
const g = r && t.indexOf(":") > -1 && cl[t.split(":")[0]];
|
|
2955
|
+
g ? fl(e, g, t, n) : Sn(e, rl[t] || t, n);
|
|
2956
2956
|
}
|
|
2957
2957
|
return n;
|
|
2958
2958
|
}
|
|
2959
|
-
function
|
|
2959
|
+
function hr(e) {
|
|
2960
2960
|
if (_.registry && _.events && _.events.find(([l, d]) => d === e))
|
|
2961
2961
|
return;
|
|
2962
2962
|
let t = e.target;
|
|
@@ -2992,7 +2992,7 @@ function fr(e) {
|
|
|
2992
2992
|
} else o();
|
|
2993
2993
|
a(s);
|
|
2994
2994
|
}
|
|
2995
|
-
function
|
|
2995
|
+
function ft(e, t, n, s, r) {
|
|
2996
2996
|
const a = Fe(e);
|
|
2997
2997
|
if (a) {
|
|
2998
2998
|
!n && (n = [...e.childNodes]);
|
|
@@ -3011,23 +3011,23 @@ function ht(e, t, n, s, r) {
|
|
|
3011
3011
|
return n;
|
|
3012
3012
|
if (o) {
|
|
3013
3013
|
let l = n[0];
|
|
3014
|
-
l && l.nodeType === 3 ? l.data !== t && (l.data = t) : l = document.createTextNode(t), n =
|
|
3014
|
+
l && l.nodeType === 3 ? l.data !== t && (l.data = t) : l = document.createTextNode(t), n = Ve(e, n, s, l);
|
|
3015
3015
|
} else
|
|
3016
3016
|
n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
|
|
3017
3017
|
} else if (t == null || i === "boolean") {
|
|
3018
3018
|
if (a) return n;
|
|
3019
|
-
n =
|
|
3019
|
+
n = Ve(e, n, s);
|
|
3020
3020
|
} else {
|
|
3021
3021
|
if (i === "function")
|
|
3022
3022
|
return Re(() => {
|
|
3023
3023
|
let l = t();
|
|
3024
3024
|
for (; typeof l == "function"; ) l = l();
|
|
3025
|
-
n =
|
|
3025
|
+
n = ft(e, l, n, s);
|
|
3026
3026
|
}), () => n;
|
|
3027
3027
|
if (Array.isArray(t)) {
|
|
3028
3028
|
const l = [], d = n && Array.isArray(n);
|
|
3029
3029
|
if (Pn(l, t, n, r))
|
|
3030
|
-
return Re(() => n =
|
|
3030
|
+
return Re(() => n = ft(e, l, n, s, !0)), () => n;
|
|
3031
3031
|
if (a) {
|
|
3032
3032
|
if (!l.length) return n;
|
|
3033
3033
|
if (s === void 0) return n = [...e.childNodes];
|
|
@@ -3038,14 +3038,14 @@ function ht(e, t, n, s, r) {
|
|
|
3038
3038
|
return n = f;
|
|
3039
3039
|
}
|
|
3040
3040
|
if (l.length === 0) {
|
|
3041
|
-
if (n =
|
|
3042
|
-
} else d ? n.length === 0 ?
|
|
3041
|
+
if (n = Ve(e, n, s), o) return n;
|
|
3042
|
+
} else d ? n.length === 0 ? cs(e, l, s) : ul(e, n, l) : (n && Ve(e), cs(e, l));
|
|
3043
3043
|
n = l;
|
|
3044
3044
|
} else if (t.nodeType) {
|
|
3045
3045
|
if (a && t.parentNode) return n = o ? [t] : t;
|
|
3046
3046
|
if (Array.isArray(n)) {
|
|
3047
|
-
if (o) return n =
|
|
3048
|
-
|
|
3047
|
+
if (o) return n = Ve(e, n, s, t);
|
|
3048
|
+
Ve(e, n, null, t);
|
|
3049
3049
|
} else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
3050
3050
|
n = t;
|
|
3051
3051
|
}
|
|
@@ -3073,10 +3073,10 @@ function Pn(e, t, n, s) {
|
|
|
3073
3073
|
}
|
|
3074
3074
|
return r;
|
|
3075
3075
|
}
|
|
3076
|
-
function
|
|
3076
|
+
function cs(e, t, n = null) {
|
|
3077
3077
|
for (let s = 0, r = t.length; s < r; s++) e.insertBefore(t[s], n);
|
|
3078
3078
|
}
|
|
3079
|
-
function
|
|
3079
|
+
function Ve(e, t, n, s) {
|
|
3080
3080
|
if (n === void 0) return e.textContent = "";
|
|
3081
3081
|
const r = s || document.createTextNode("");
|
|
3082
3082
|
if (t.length) {
|
|
@@ -3091,26 +3091,26 @@ function Ke(e, t, n, s) {
|
|
|
3091
3091
|
} else e.insertBefore(r, n);
|
|
3092
3092
|
return [r];
|
|
3093
3093
|
}
|
|
3094
|
-
function
|
|
3094
|
+
function Pl() {
|
|
3095
3095
|
return _.getNextContextId();
|
|
3096
3096
|
}
|
|
3097
|
-
var
|
|
3098
|
-
function
|
|
3099
|
-
return t ? document.createElementNS(
|
|
3097
|
+
var wl = "http://www.w3.org/2000/svg";
|
|
3098
|
+
function gr(e, t = !1) {
|
|
3099
|
+
return t ? document.createElementNS(wl, e) : document.createElement(e);
|
|
3100
3100
|
}
|
|
3101
|
-
function
|
|
3101
|
+
function vu(e) {
|
|
3102
3102
|
const {
|
|
3103
3103
|
useShadow: t
|
|
3104
|
-
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r =
|
|
3104
|
+
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = is();
|
|
3105
3105
|
let a, i = !!_.context;
|
|
3106
|
-
return
|
|
3107
|
-
i && (
|
|
3106
|
+
return tr(() => {
|
|
3107
|
+
i && (is().user = i = !1), a || (a = nr(r, () => j(() => e.children)));
|
|
3108
3108
|
const o = s();
|
|
3109
3109
|
if (o instanceof HTMLHeadElement) {
|
|
3110
3110
|
const [l, d] = F(!1), u = () => d(!0);
|
|
3111
|
-
xe((f) => _n(o, () => l() ? f() : a(), null)),
|
|
3111
|
+
xe((f) => _n(o, () => l() ? f() : a(), null)), ut(u);
|
|
3112
3112
|
} else {
|
|
3113
|
-
const l =
|
|
3113
|
+
const l = gr(e.isSVG ? "g" : "div", e.isSVG), d = t && l.attachShadow ? l.attachShadow({
|
|
3114
3114
|
mode: "open"
|
|
3115
3115
|
}) : l;
|
|
3116
3116
|
Object.defineProperty(l, "_$host", {
|
|
@@ -3118,30 +3118,30 @@ function Su(e) {
|
|
|
3118
3118
|
return n.parentNode;
|
|
3119
3119
|
},
|
|
3120
3120
|
configurable: !0
|
|
3121
|
-
}), _n(d, a), o.appendChild(l), e.ref && e.ref(l),
|
|
3121
|
+
}), _n(d, a), o.appendChild(l), e.ref && e.ref(l), ut(() => o.removeChild(l));
|
|
3122
3122
|
}
|
|
3123
3123
|
}, void 0, {
|
|
3124
3124
|
render: !i
|
|
3125
3125
|
}), n;
|
|
3126
3126
|
}
|
|
3127
|
-
function
|
|
3128
|
-
const n =
|
|
3129
|
-
return
|
|
3127
|
+
function vl(e, t) {
|
|
3128
|
+
const n = j(e);
|
|
3129
|
+
return j(() => {
|
|
3130
3130
|
const s = n();
|
|
3131
3131
|
switch (typeof s) {
|
|
3132
3132
|
case "function":
|
|
3133
3133
|
return Z(() => s(t));
|
|
3134
3134
|
case "string":
|
|
3135
|
-
const r =
|
|
3136
|
-
return
|
|
3135
|
+
const r = ll.has(s), a = _.context ? Sl() : gr(s, r);
|
|
3136
|
+
return yl(a, t, r), a;
|
|
3137
3137
|
}
|
|
3138
3138
|
});
|
|
3139
3139
|
}
|
|
3140
|
-
function
|
|
3141
|
-
const [, t] =
|
|
3142
|
-
return
|
|
3140
|
+
function bu(e) {
|
|
3141
|
+
const [, t] = Xo(e, ["component"]);
|
|
3142
|
+
return vl(() => e.component, t);
|
|
3143
3143
|
}
|
|
3144
|
-
var
|
|
3144
|
+
var bl = class {
|
|
3145
3145
|
constructor() {
|
|
3146
3146
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
3147
3147
|
}
|
|
@@ -3157,9 +3157,9 @@ var wl = class {
|
|
|
3157
3157
|
clear() {
|
|
3158
3158
|
this.keyToValue.clear(), this.valueToKey.clear();
|
|
3159
3159
|
}
|
|
3160
|
-
},
|
|
3160
|
+
}, mr = class {
|
|
3161
3161
|
constructor(e) {
|
|
3162
|
-
this.generateIdentifier = e, this.kv = new
|
|
3162
|
+
this.generateIdentifier = e, this.kv = new bl();
|
|
3163
3163
|
}
|
|
3164
3164
|
register(e, t) {
|
|
3165
3165
|
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
@@ -3173,7 +3173,7 @@ var wl = class {
|
|
|
3173
3173
|
getValue(e) {
|
|
3174
3174
|
return this.kv.getByKey(e);
|
|
3175
3175
|
}
|
|
3176
|
-
},
|
|
3176
|
+
}, Il = class extends mr {
|
|
3177
3177
|
constructor() {
|
|
3178
3178
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
3179
3179
|
}
|
|
@@ -3184,7 +3184,7 @@ var wl = class {
|
|
|
3184
3184
|
return this.classToAllowedProps.get(e);
|
|
3185
3185
|
}
|
|
3186
3186
|
};
|
|
3187
|
-
function
|
|
3187
|
+
function Ll(e) {
|
|
3188
3188
|
if ("values" in Object)
|
|
3189
3189
|
return Object.values(e);
|
|
3190
3190
|
const t = [];
|
|
@@ -3192,8 +3192,8 @@ function bl(e) {
|
|
|
3192
3192
|
e.hasOwnProperty(n) && t.push(e[n]);
|
|
3193
3193
|
return t;
|
|
3194
3194
|
}
|
|
3195
|
-
function
|
|
3196
|
-
const n =
|
|
3195
|
+
function Nl(e, t) {
|
|
3196
|
+
const n = Ll(e);
|
|
3197
3197
|
if ("find" in n)
|
|
3198
3198
|
return n.find(t);
|
|
3199
3199
|
const s = n;
|
|
@@ -3203,20 +3203,20 @@ function Il(e, t) {
|
|
|
3203
3203
|
return a;
|
|
3204
3204
|
}
|
|
3205
3205
|
}
|
|
3206
|
-
function
|
|
3206
|
+
function at(e, t) {
|
|
3207
3207
|
Object.entries(e).forEach(([n, s]) => t(s, n));
|
|
3208
3208
|
}
|
|
3209
3209
|
function Ft(e, t) {
|
|
3210
3210
|
return e.indexOf(t) !== -1;
|
|
3211
3211
|
}
|
|
3212
|
-
function
|
|
3212
|
+
function us(e, t) {
|
|
3213
3213
|
for (let n = 0; n < e.length; n++) {
|
|
3214
3214
|
const s = e[n];
|
|
3215
3215
|
if (t(s))
|
|
3216
3216
|
return s;
|
|
3217
3217
|
}
|
|
3218
3218
|
}
|
|
3219
|
-
var
|
|
3219
|
+
var Cl = class {
|
|
3220
3220
|
constructor() {
|
|
3221
3221
|
this.transfomers = {};
|
|
3222
3222
|
}
|
|
@@ -3224,12 +3224,12 @@ var Ll = class {
|
|
|
3224
3224
|
this.transfomers[e.name] = e;
|
|
3225
3225
|
}
|
|
3226
3226
|
findApplicable(e) {
|
|
3227
|
-
return
|
|
3227
|
+
return Nl(this.transfomers, (t) => t.isApplicable(e));
|
|
3228
3228
|
}
|
|
3229
3229
|
findByName(e) {
|
|
3230
3230
|
return this.transfomers[e];
|
|
3231
3231
|
}
|
|
3232
|
-
},
|
|
3232
|
+
}, Gl = (e) => Object.prototype.toString.call(e).slice(8, -1), Er = (e) => typeof e > "u", Dl = (e) => e === null, ht = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, wn = (e) => ht(e) && Object.keys(e).length === 0, Le = (e) => Array.isArray(e), Ol = (e) => typeof e == "string", xl = (e) => typeof e == "number" && !isNaN(e), Rl = (e) => typeof e == "boolean", kl = (e) => e instanceof RegExp, gt = (e) => e instanceof Map, mt = (e) => e instanceof Set, pr = (e) => Gl(e) === "Symbol", Ul = (e) => e instanceof Date && !isNaN(e.valueOf()), Ml = (e) => e instanceof Error, ds = (e) => typeof e == "number" && isNaN(e), Bl = (e) => Rl(e) || Dl(e) || Er(e) || xl(e) || Ol(e) || pr(e), Fl = (e) => typeof e == "bigint", Kl = (e) => e === 1 / 0 || e === -1 / 0, Vl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Hl = (e) => e instanceof URL, yr = (e) => e.replace(/\./g, "\\."), mn = (e) => e.map(String).map(yr).join("."), ct = (e) => {
|
|
3233
3233
|
const t = [];
|
|
3234
3234
|
let n = "";
|
|
3235
3235
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -3255,12 +3255,12 @@ function he(e, t, n, s) {
|
|
|
3255
3255
|
untransform: s
|
|
3256
3256
|
};
|
|
3257
3257
|
}
|
|
3258
|
-
var
|
|
3259
|
-
he(
|
|
3258
|
+
var Ar = [
|
|
3259
|
+
he(Er, "undefined", () => null, () => {
|
|
3260
3260
|
}),
|
|
3261
|
-
he(
|
|
3262
|
-
he(
|
|
3263
|
-
he(
|
|
3261
|
+
he(Fl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
3262
|
+
he(Ul, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
3263
|
+
he(Ml, "Error", (e, t) => {
|
|
3264
3264
|
const n = {
|
|
3265
3265
|
name: e.name,
|
|
3266
3266
|
message: e.message
|
|
@@ -3274,22 +3274,22 @@ var yr = [
|
|
|
3274
3274
|
n[s] = e[s];
|
|
3275
3275
|
}), n;
|
|
3276
3276
|
}),
|
|
3277
|
-
he(
|
|
3277
|
+
he(kl, "regexp", (e) => "" + e, (e) => {
|
|
3278
3278
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
3279
3279
|
return new RegExp(t, n);
|
|
3280
3280
|
}),
|
|
3281
3281
|
he(
|
|
3282
|
-
|
|
3282
|
+
mt,
|
|
3283
3283
|
"set",
|
|
3284
3284
|
// (sets only exist in es6+)
|
|
3285
3285
|
// eslint-disable-next-line es5/no-es6-methods
|
|
3286
3286
|
(e) => [...e.values()],
|
|
3287
3287
|
(e) => new Set(e)
|
|
3288
3288
|
),
|
|
3289
|
-
he(
|
|
3290
|
-
he((e) =>
|
|
3289
|
+
he(gt, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
3290
|
+
he((e) => ds(e) || Kl(e), "number", (e) => ds(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
3291
3291
|
he((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
3292
|
-
he(
|
|
3292
|
+
he(Hl, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
3293
3293
|
];
|
|
3294
3294
|
function sn(e, t, n, s) {
|
|
3295
3295
|
return {
|
|
@@ -3299,12 +3299,12 @@ function sn(e, t, n, s) {
|
|
|
3299
3299
|
untransform: s
|
|
3300
3300
|
};
|
|
3301
3301
|
}
|
|
3302
|
-
var
|
|
3302
|
+
var Tr = sn((e, t) => pr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
|
|
3303
3303
|
const s = n.symbolRegistry.getValue(t[1]);
|
|
3304
3304
|
if (!s)
|
|
3305
3305
|
throw new Error("Trying to deserialize unknown symbol");
|
|
3306
3306
|
return s;
|
|
3307
|
-
}),
|
|
3307
|
+
}), ql = [
|
|
3308
3308
|
Int8Array,
|
|
3309
3309
|
Uint8Array,
|
|
3310
3310
|
Int16Array,
|
|
@@ -3314,16 +3314,16 @@ var Ar = sn((e, t) => Er(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
3314
3314
|
Float32Array,
|
|
3315
3315
|
Float64Array,
|
|
3316
3316
|
Uint8ClampedArray
|
|
3317
|
-
].reduce((e, t) => (e[t.name] = t, e), {}),
|
|
3318
|
-
const n =
|
|
3317
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), Sr = sn(Vl, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
3318
|
+
const n = ql[t[1]];
|
|
3319
3319
|
if (!n)
|
|
3320
3320
|
throw new Error("Trying to deserialize unknown typed array");
|
|
3321
3321
|
return new n(e);
|
|
3322
3322
|
});
|
|
3323
|
-
function
|
|
3323
|
+
function _r(e, t) {
|
|
3324
3324
|
return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
|
|
3325
3325
|
}
|
|
3326
|
-
var
|
|
3326
|
+
var Pr = sn(_r, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
|
|
3327
3327
|
const n = t.classRegistry.getAllowedProps(e.constructor);
|
|
3328
3328
|
if (!n)
|
|
3329
3329
|
return { ...e };
|
|
@@ -3336,49 +3336,49 @@ var _r = sn(Sr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
3336
3336
|
if (!s)
|
|
3337
3337
|
throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
|
|
3338
3338
|
return Object.assign(Object.create(s.prototype), e);
|
|
3339
|
-
}),
|
|
3339
|
+
}), wr = sn((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
|
|
3340
3340
|
const s = n.customTransformerRegistry.findByName(t[1]);
|
|
3341
3341
|
if (!s)
|
|
3342
3342
|
throw new Error("Trying to deserialize unknown custom value");
|
|
3343
3343
|
return s.deserialize(e);
|
|
3344
|
-
}),
|
|
3345
|
-
const n =
|
|
3344
|
+
}), $l = [Pr, Tr, wr, Sr], fs = (e, t) => {
|
|
3345
|
+
const n = us($l, (r) => r.isApplicable(e, t));
|
|
3346
3346
|
if (n)
|
|
3347
3347
|
return {
|
|
3348
3348
|
value: n.transform(e, t),
|
|
3349
3349
|
type: n.annotation(e, t)
|
|
3350
3350
|
};
|
|
3351
|
-
const s =
|
|
3351
|
+
const s = us(Ar, (r) => r.isApplicable(e, t));
|
|
3352
3352
|
if (s)
|
|
3353
3353
|
return {
|
|
3354
3354
|
value: s.transform(e, t),
|
|
3355
3355
|
type: s.annotation
|
|
3356
3356
|
};
|
|
3357
|
-
},
|
|
3358
|
-
|
|
3359
|
-
|
|
3357
|
+
}, vr = {};
|
|
3358
|
+
Ar.forEach((e) => {
|
|
3359
|
+
vr[e.annotation] = e;
|
|
3360
3360
|
});
|
|
3361
|
-
var
|
|
3361
|
+
var Ql = (e, t, n) => {
|
|
3362
3362
|
if (Le(t))
|
|
3363
3363
|
switch (t[0]) {
|
|
3364
3364
|
case "symbol":
|
|
3365
|
-
return
|
|
3365
|
+
return Tr.untransform(e, t, n);
|
|
3366
3366
|
case "class":
|
|
3367
|
-
return _r.untransform(e, t, n);
|
|
3368
|
-
case "custom":
|
|
3369
3367
|
return Pr.untransform(e, t, n);
|
|
3368
|
+
case "custom":
|
|
3369
|
+
return wr.untransform(e, t, n);
|
|
3370
3370
|
case "typed-array":
|
|
3371
|
-
return
|
|
3371
|
+
return Sr.untransform(e, t, n);
|
|
3372
3372
|
default:
|
|
3373
3373
|
throw new Error("Unknown transformation: " + t);
|
|
3374
3374
|
}
|
|
3375
3375
|
else {
|
|
3376
|
-
const s =
|
|
3376
|
+
const s = vr[t];
|
|
3377
3377
|
if (!s)
|
|
3378
3378
|
throw new Error("Unknown transformation: " + t);
|
|
3379
3379
|
return s.untransform(e, n);
|
|
3380
3380
|
}
|
|
3381
|
-
},
|
|
3381
|
+
}, He = (e, t) => {
|
|
3382
3382
|
if (t > e.size)
|
|
3383
3383
|
throw new Error("index out of bounds");
|
|
3384
3384
|
const n = e.keys();
|
|
@@ -3386,7 +3386,7 @@ var ql = (e, t, n) => {
|
|
|
3386
3386
|
n.next(), t--;
|
|
3387
3387
|
return n.next().value;
|
|
3388
3388
|
};
|
|
3389
|
-
function
|
|
3389
|
+
function br(e) {
|
|
3390
3390
|
if (Ft(e, "__proto__"))
|
|
3391
3391
|
throw new Error("__proto__ is not allowed as a property");
|
|
3392
3392
|
if (Ft(e, "prototype"))
|
|
@@ -3394,14 +3394,14 @@ function vr(e) {
|
|
|
3394
3394
|
if (Ft(e, "constructor"))
|
|
3395
3395
|
throw new Error("constructor is not allowed as a property");
|
|
3396
3396
|
}
|
|
3397
|
-
var
|
|
3398
|
-
|
|
3397
|
+
var zl = (e, t) => {
|
|
3398
|
+
br(t);
|
|
3399
3399
|
for (let n = 0; n < t.length; n++) {
|
|
3400
3400
|
const s = t[n];
|
|
3401
|
-
if (
|
|
3402
|
-
e =
|
|
3403
|
-
else if (
|
|
3404
|
-
const r = +s, a = +t[++n] == 0 ? "key" : "value", i =
|
|
3401
|
+
if (mt(e))
|
|
3402
|
+
e = He(e, +s);
|
|
3403
|
+
else if (gt(e)) {
|
|
3404
|
+
const r = +s, a = +t[++n] == 0 ? "key" : "value", i = He(e, r);
|
|
3405
3405
|
switch (a) {
|
|
3406
3406
|
case "key":
|
|
3407
3407
|
e = i;
|
|
@@ -3415,7 +3415,7 @@ var $l = (e, t) => {
|
|
|
3415
3415
|
}
|
|
3416
3416
|
return e;
|
|
3417
3417
|
}, vn = (e, t, n) => {
|
|
3418
|
-
if (
|
|
3418
|
+
if (br(t), t.length === 0)
|
|
3419
3419
|
return n(e);
|
|
3420
3420
|
let s = e;
|
|
3421
3421
|
for (let a = 0; a < t.length - 1; a++) {
|
|
@@ -3423,15 +3423,15 @@ var $l = (e, t) => {
|
|
|
3423
3423
|
if (Le(s)) {
|
|
3424
3424
|
const o = +i;
|
|
3425
3425
|
s = s[o];
|
|
3426
|
-
} else if (
|
|
3426
|
+
} else if (ht(s))
|
|
3427
3427
|
s = s[i];
|
|
3428
|
-
else if (
|
|
3428
|
+
else if (mt(s)) {
|
|
3429
3429
|
const o = +i;
|
|
3430
|
-
s =
|
|
3431
|
-
} else if (
|
|
3430
|
+
s = He(s, o);
|
|
3431
|
+
} else if (gt(s)) {
|
|
3432
3432
|
if (a === t.length - 2)
|
|
3433
3433
|
break;
|
|
3434
|
-
const l = +i, d = +t[++a] == 0 ? "key" : "value", u =
|
|
3434
|
+
const l = +i, d = +t[++a] == 0 ? "key" : "value", u = He(s, l);
|
|
3435
3435
|
switch (d) {
|
|
3436
3436
|
case "key":
|
|
3437
3437
|
s = u;
|
|
@@ -3443,12 +3443,12 @@ var $l = (e, t) => {
|
|
|
3443
3443
|
}
|
|
3444
3444
|
}
|
|
3445
3445
|
const r = t[t.length - 1];
|
|
3446
|
-
if (Le(s) ? s[+r] = n(s[+r]) :
|
|
3447
|
-
const a =
|
|
3446
|
+
if (Le(s) ? s[+r] = n(s[+r]) : ht(s) && (s[r] = n(s[r])), mt(s)) {
|
|
3447
|
+
const a = He(s, +r), i = n(a);
|
|
3448
3448
|
a !== i && (s.delete(a), s.add(i));
|
|
3449
3449
|
}
|
|
3450
|
-
if (
|
|
3451
|
-
const a = +t[t.length - 2], i =
|
|
3450
|
+
if (gt(s)) {
|
|
3451
|
+
const a = +t[t.length - 2], i = He(s, a);
|
|
3452
3452
|
switch (+r == 0 ? "key" : "value") {
|
|
3453
3453
|
case "key": {
|
|
3454
3454
|
const l = n(i);
|
|
@@ -3467,41 +3467,41 @@ function bn(e, t, n = []) {
|
|
|
3467
3467
|
if (!e)
|
|
3468
3468
|
return;
|
|
3469
3469
|
if (!Le(e)) {
|
|
3470
|
-
|
|
3470
|
+
at(e, (a, i) => bn(a, t, [...n, ...ct(i)]));
|
|
3471
3471
|
return;
|
|
3472
3472
|
}
|
|
3473
3473
|
const [s, r] = e;
|
|
3474
|
-
r &&
|
|
3475
|
-
bn(a, t, [...n, ...
|
|
3474
|
+
r && at(r, (a, i) => {
|
|
3475
|
+
bn(a, t, [...n, ...ct(i)]);
|
|
3476
3476
|
}), t(s, n);
|
|
3477
3477
|
}
|
|
3478
|
-
function
|
|
3478
|
+
function Wl(e, t, n) {
|
|
3479
3479
|
return bn(t, (s, r) => {
|
|
3480
|
-
e = vn(e, r, (a) =>
|
|
3480
|
+
e = vn(e, r, (a) => Ql(a, s, n));
|
|
3481
3481
|
}), e;
|
|
3482
3482
|
}
|
|
3483
|
-
function
|
|
3483
|
+
function jl(e, t) {
|
|
3484
3484
|
function n(s, r) {
|
|
3485
|
-
const a =
|
|
3486
|
-
s.map(
|
|
3485
|
+
const a = zl(e, ct(r));
|
|
3486
|
+
s.map(ct).forEach((i) => {
|
|
3487
3487
|
e = vn(e, i, () => a);
|
|
3488
3488
|
});
|
|
3489
3489
|
}
|
|
3490
3490
|
if (Le(t)) {
|
|
3491
3491
|
const [s, r] = t;
|
|
3492
3492
|
s.forEach((a) => {
|
|
3493
|
-
e = vn(e,
|
|
3494
|
-
}), r &&
|
|
3493
|
+
e = vn(e, ct(a), () => e);
|
|
3494
|
+
}), r && at(r, n);
|
|
3495
3495
|
} else
|
|
3496
|
-
|
|
3496
|
+
at(t, n);
|
|
3497
3497
|
return e;
|
|
3498
3498
|
}
|
|
3499
|
-
var
|
|
3500
|
-
function
|
|
3499
|
+
var Yl = (e, t) => ht(e) || Le(e) || gt(e) || mt(e) || _r(e, t);
|
|
3500
|
+
function Jl(e, t, n) {
|
|
3501
3501
|
const s = n.get(e);
|
|
3502
3502
|
s ? s.push(t) : n.set(e, [t]);
|
|
3503
3503
|
}
|
|
3504
|
-
function
|
|
3504
|
+
function Zl(e, t) {
|
|
3505
3505
|
const n = {};
|
|
3506
3506
|
let s;
|
|
3507
3507
|
return e.forEach((r) => {
|
|
@@ -3512,18 +3512,18 @@ function Yl(e, t) {
|
|
|
3512
3512
|
a.length === 0 ? s = i.map(mn) : n[mn(a)] = i.map(mn);
|
|
3513
3513
|
}), s ? wn(n) ? [s] : [s, n] : wn(n) ? void 0 : n;
|
|
3514
3514
|
}
|
|
3515
|
-
var
|
|
3516
|
-
const o =
|
|
3515
|
+
var Ir = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
3516
|
+
const o = Bl(e);
|
|
3517
3517
|
if (!o) {
|
|
3518
|
-
|
|
3518
|
+
Jl(e, r, t);
|
|
3519
3519
|
const h = i.get(e);
|
|
3520
3520
|
if (h)
|
|
3521
3521
|
return s ? {
|
|
3522
3522
|
transformedValue: null
|
|
3523
3523
|
} : h;
|
|
3524
3524
|
}
|
|
3525
|
-
if (!
|
|
3526
|
-
const h =
|
|
3525
|
+
if (!Yl(e, n)) {
|
|
3526
|
+
const h = fs(e, n), p = h ? {
|
|
3527
3527
|
transformedValue: h.value,
|
|
3528
3528
|
annotations: [h.type]
|
|
3529
3529
|
} : {
|
|
@@ -3535,13 +3535,13 @@ var br = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3535
3535
|
return {
|
|
3536
3536
|
transformedValue: null
|
|
3537
3537
|
};
|
|
3538
|
-
const l =
|
|
3539
|
-
|
|
3538
|
+
const l = fs(e, n), d = (l == null ? void 0 : l.value) ?? e, u = Le(d) ? [] : {}, f = {};
|
|
3539
|
+
at(d, (h, p) => {
|
|
3540
3540
|
if (p === "__proto__" || p === "constructor" || p === "prototype")
|
|
3541
3541
|
throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3542
|
-
const T =
|
|
3543
|
-
u[p] = T.transformedValue, Le(T.annotations) ? f[p] = T.annotations :
|
|
3544
|
-
f[
|
|
3542
|
+
const T = Ir(h, t, n, s, [...r, p], [...a, e], i);
|
|
3543
|
+
u[p] = T.transformedValue, Le(T.annotations) ? f[p] = T.annotations : ht(T.annotations) && at(T.annotations, (S, O) => {
|
|
3544
|
+
f[yr(p) + "." + O] = S;
|
|
3545
3545
|
});
|
|
3546
3546
|
});
|
|
3547
3547
|
const g = wn(f) ? {
|
|
@@ -3553,19 +3553,19 @@ var br = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3553
3553
|
};
|
|
3554
3554
|
return o || i.set(e, g), g;
|
|
3555
3555
|
};
|
|
3556
|
-
function
|
|
3556
|
+
function Lr(e) {
|
|
3557
3557
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
3558
3558
|
}
|
|
3559
|
-
function
|
|
3560
|
-
return
|
|
3559
|
+
function hs(e) {
|
|
3560
|
+
return Lr(e) === "Array";
|
|
3561
3561
|
}
|
|
3562
|
-
function
|
|
3563
|
-
if (
|
|
3562
|
+
function Xl(e) {
|
|
3563
|
+
if (Lr(e) !== "Object")
|
|
3564
3564
|
return !1;
|
|
3565
3565
|
const t = Object.getPrototypeOf(e);
|
|
3566
3566
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
3567
3567
|
}
|
|
3568
|
-
function
|
|
3568
|
+
function ec(e, t, n, s, r) {
|
|
3569
3569
|
const a = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
|
|
3570
3570
|
a === "enumerable" && (e[t] = n), r && a === "nonenumerable" && Object.defineProperty(e, t, {
|
|
3571
3571
|
value: n,
|
|
@@ -3575,16 +3575,16 @@ function Zl(e, t, n, s, r) {
|
|
|
3575
3575
|
});
|
|
3576
3576
|
}
|
|
3577
3577
|
function In(e, t = {}) {
|
|
3578
|
-
if (
|
|
3578
|
+
if (hs(e))
|
|
3579
3579
|
return e.map((r) => In(r, t));
|
|
3580
|
-
if (!
|
|
3580
|
+
if (!Xl(e))
|
|
3581
3581
|
return e;
|
|
3582
3582
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
3583
3583
|
return [...n, ...s].reduce((r, a) => {
|
|
3584
|
-
if (
|
|
3584
|
+
if (hs(t.props) && !t.props.includes(a))
|
|
3585
3585
|
return r;
|
|
3586
3586
|
const i = e[a], o = In(i, t);
|
|
3587
|
-
return
|
|
3587
|
+
return ec(r, a, o, e, t.nonenumerable), r;
|
|
3588
3588
|
}, {});
|
|
3589
3589
|
}
|
|
3590
3590
|
var R = class {
|
|
@@ -3592,17 +3592,17 @@ var R = class {
|
|
|
3592
3592
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
3593
3593
|
*/
|
|
3594
3594
|
constructor({ dedupe: e = !1 } = {}) {
|
|
3595
|
-
this.classRegistry = new
|
|
3595
|
+
this.classRegistry = new Il(), this.symbolRegistry = new mr((t) => t.description ?? ""), this.customTransformerRegistry = new Cl(), this.allowedErrorProps = [], this.dedupe = e;
|
|
3596
3596
|
}
|
|
3597
3597
|
serialize(e) {
|
|
3598
|
-
const t = /* @__PURE__ */ new Map(), n =
|
|
3598
|
+
const t = /* @__PURE__ */ new Map(), n = Ir(e, t, this, this.dedupe), s = {
|
|
3599
3599
|
json: n.transformedValue
|
|
3600
3600
|
};
|
|
3601
3601
|
n.annotations && (s.meta = {
|
|
3602
3602
|
...s.meta,
|
|
3603
3603
|
values: n.annotations
|
|
3604
3604
|
});
|
|
3605
|
-
const r =
|
|
3605
|
+
const r = Zl(t, this.dedupe);
|
|
3606
3606
|
return r && (s.meta = {
|
|
3607
3607
|
...s.meta,
|
|
3608
3608
|
referentialEqualities: r
|
|
@@ -3611,7 +3611,7 @@ var R = class {
|
|
|
3611
3611
|
deserialize(e) {
|
|
3612
3612
|
const { json: t, meta: n } = e;
|
|
3613
3613
|
let s = In(t);
|
|
3614
|
-
return n != null && n.values && (s =
|
|
3614
|
+
return n != null && n.values && (s = Wl(s, n.values, this)), n != null && n.referentialEqualities && (s = jl(s, n.referentialEqualities)), s;
|
|
3615
3615
|
}
|
|
3616
3616
|
stringify(e) {
|
|
3617
3617
|
return JSON.stringify(this.serialize(e));
|
|
@@ -3644,50 +3644,50 @@ R.registerClass = R.defaultInstance.registerClass.bind(R.defaultInstance);
|
|
|
3644
3644
|
R.registerSymbol = R.defaultInstance.registerSymbol.bind(R.defaultInstance);
|
|
3645
3645
|
R.registerCustom = R.defaultInstance.registerCustom.bind(R.defaultInstance);
|
|
3646
3646
|
R.allowErrorProps = R.defaultInstance.allowErrorProps.bind(R.defaultInstance);
|
|
3647
|
-
var
|
|
3648
|
-
function
|
|
3647
|
+
var tc = R.serialize, Iu = R.stringify;
|
|
3648
|
+
function Lu(e) {
|
|
3649
3649
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
3650
3650
|
}
|
|
3651
|
-
function
|
|
3651
|
+
function Nu(e, t) {
|
|
3652
3652
|
return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
3653
3653
|
}
|
|
3654
|
-
function
|
|
3654
|
+
function Cu({
|
|
3655
3655
|
queryState: e,
|
|
3656
3656
|
observerCount: t,
|
|
3657
3657
|
isStale: n
|
|
3658
3658
|
}) {
|
|
3659
3659
|
return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
|
|
3660
3660
|
}
|
|
3661
|
-
function
|
|
3661
|
+
function Gu({
|
|
3662
3662
|
status: e,
|
|
3663
3663
|
isPaused: t
|
|
3664
3664
|
}) {
|
|
3665
3665
|
return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
|
|
3666
3666
|
}
|
|
3667
|
-
function
|
|
3667
|
+
function Du(e) {
|
|
3668
3668
|
return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
|
|
3669
3669
|
}
|
|
3670
|
-
var
|
|
3670
|
+
var Ou = (e, t = !1) => {
|
|
3671
3671
|
const {
|
|
3672
3672
|
json: n
|
|
3673
|
-
} =
|
|
3673
|
+
} = tc(e);
|
|
3674
3674
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
3675
|
-
}, Rt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3,
|
|
3676
|
-
status:
|
|
3677
|
-
"query hash":
|
|
3678
|
-
"last updated": Lr
|
|
3679
|
-
}, kt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Nr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, nc = (e, t) => kt(e) === kt(t) ? Nr(e, t) : kt(e) > kt(t) ? 1 : -1, Gu = {
|
|
3680
|
-
status: nc,
|
|
3675
|
+
}, Rt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, nc = (e, t) => e.queryHash.localeCompare(t.queryHash), Nr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, sc = (e, t) => Rt(e) === Rt(t) ? Nr(e, t) : Rt(e) > Rt(t) ? 1 : -1, xu = {
|
|
3676
|
+
status: sc,
|
|
3677
|
+
"query hash": nc,
|
|
3681
3678
|
"last updated": Nr
|
|
3682
|
-
},
|
|
3679
|
+
}, kt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Cr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, rc = (e, t) => kt(e) === kt(t) ? Cr(e, t) : kt(e) > kt(t) ? 1 : -1, Ru = {
|
|
3680
|
+
status: rc,
|
|
3681
|
+
"last updated": Cr
|
|
3682
|
+
}, ku = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Uu = () => {
|
|
3683
3683
|
const [e, t] = F("dark");
|
|
3684
|
-
return
|
|
3684
|
+
return Vo(() => {
|
|
3685
3685
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3686
3686
|
t(n.matches ? "dark" : "light");
|
|
3687
3687
|
const s = (r) => {
|
|
3688
3688
|
t(r.matches ? "dark" : "light");
|
|
3689
3689
|
};
|
|
3690
|
-
n.addEventListener("change", s),
|
|
3690
|
+
n.addEventListener("change", s), ut(() => n.removeEventListener("change", s));
|
|
3691
3691
|
}), e;
|
|
3692
3692
|
}, Ut = (e, t, n) => {
|
|
3693
3693
|
if (t.length === 0)
|
|
@@ -3749,26 +3749,26 @@ var Nu = (e, t = !1) => {
|
|
|
3749
3749
|
return n[s] = Mt(n[s], r), n;
|
|
3750
3750
|
}
|
|
3751
3751
|
return e;
|
|
3752
|
-
},
|
|
3752
|
+
}, Gr = (e, t) => {
|
|
3753
3753
|
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
|
|
3754
3754
|
const s = document.createElement("style"), r = document.createTextNode("");
|
|
3755
3755
|
s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
3756
|
-
},
|
|
3756
|
+
}, qe, Et, pt, yt, De, At, $e, Qe, ze, We, je, Tt, Ye, St, ps, ac = (ps = class {
|
|
3757
3757
|
constructor(e) {
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3758
|
+
D(this, qe);
|
|
3759
|
+
D(this, Et);
|
|
3760
|
+
D(this, pt);
|
|
3761
|
+
D(this, yt);
|
|
3762
|
+
D(this, De, !1);
|
|
3763
|
+
D(this, At);
|
|
3764
|
+
D(this, $e);
|
|
3765
|
+
D(this, Qe);
|
|
3766
|
+
D(this, ze);
|
|
3767
|
+
D(this, We);
|
|
3768
|
+
D(this, je);
|
|
3769
|
+
D(this, Tt);
|
|
3770
|
+
D(this, Ye);
|
|
3771
|
+
D(this, St);
|
|
3772
3772
|
const {
|
|
3773
3773
|
client: t,
|
|
3774
3774
|
queryFlavor: n,
|
|
@@ -3782,41 +3782,41 @@ var Nu = (e, t = !1) => {
|
|
|
3782
3782
|
shadowDOMTarget: u,
|
|
3783
3783
|
hideDisabledQueries: f
|
|
3784
3784
|
} = e;
|
|
3785
|
-
G(this,
|
|
3785
|
+
G(this, qe, F(t)), G(this, pt, n), G(this, yt, s), G(this, Et, r), G(this, At, d), G(this, $e, u), G(this, Qe, F(a)), G(this, ze, F(i)), G(this, We, F(o)), G(this, je, F(l)), G(this, Tt, F(f));
|
|
3786
3786
|
}
|
|
3787
3787
|
setButtonPosition(e) {
|
|
3788
|
-
A(this,
|
|
3788
|
+
A(this, Qe)[1](e);
|
|
3789
3789
|
}
|
|
3790
3790
|
setPosition(e) {
|
|
3791
|
-
A(this,
|
|
3791
|
+
A(this, ze)[1](e);
|
|
3792
3792
|
}
|
|
3793
3793
|
setInitialIsOpen(e) {
|
|
3794
|
-
A(this,
|
|
3794
|
+
A(this, We)[1](e);
|
|
3795
3795
|
}
|
|
3796
3796
|
setErrorTypes(e) {
|
|
3797
3797
|
A(this, je)[1](e);
|
|
3798
3798
|
}
|
|
3799
3799
|
setClient(e) {
|
|
3800
|
-
A(this,
|
|
3800
|
+
A(this, qe)[1](e);
|
|
3801
3801
|
}
|
|
3802
3802
|
mount(e) {
|
|
3803
|
-
if (A(this,
|
|
3803
|
+
if (A(this, De))
|
|
3804
3804
|
throw new Error("Devtools is already mounted");
|
|
3805
|
-
const t =
|
|
3806
|
-
const n = this, [s] = A(this,
|
|
3805
|
+
const t = fr(() => {
|
|
3806
|
+
const n = this, [s] = A(this, Qe), [r] = A(this, ze), [a] = A(this, We), [i] = A(this, je), [o] = A(this, Tt), [l] = A(this, qe);
|
|
3807
3807
|
let d;
|
|
3808
|
-
return A(this,
|
|
3808
|
+
return A(this, Ye) ? d = A(this, Ye) : (d = ur(() => import("./NCMVHL6D-C2p_bwgN.js")), G(this, Ye, d)), Gr(A(this, At), A(this, $e)), lr(d, cr({
|
|
3809
3809
|
get queryFlavor() {
|
|
3810
|
-
return A(n,
|
|
3810
|
+
return A(n, pt);
|
|
3811
3811
|
},
|
|
3812
3812
|
get version() {
|
|
3813
|
-
return A(n,
|
|
3813
|
+
return A(n, yt);
|
|
3814
3814
|
},
|
|
3815
3815
|
get onlineManager() {
|
|
3816
|
-
return A(n,
|
|
3816
|
+
return A(n, Et);
|
|
3817
3817
|
},
|
|
3818
3818
|
get shadowDOMTarget() {
|
|
3819
|
-
return A(n,
|
|
3819
|
+
return A(n, $e);
|
|
3820
3820
|
}
|
|
3821
3821
|
}, {
|
|
3822
3822
|
get client() {
|
|
@@ -3839,31 +3839,31 @@ var Nu = (e, t = !1) => {
|
|
|
3839
3839
|
}
|
|
3840
3840
|
}));
|
|
3841
3841
|
}, e);
|
|
3842
|
-
G(this,
|
|
3842
|
+
G(this, De, !0), G(this, St, t);
|
|
3843
3843
|
}
|
|
3844
3844
|
unmount() {
|
|
3845
3845
|
var e;
|
|
3846
|
-
if (!A(this,
|
|
3846
|
+
if (!A(this, De))
|
|
3847
3847
|
throw new Error("Devtools is not mounted");
|
|
3848
|
-
(e = A(this,
|
|
3848
|
+
(e = A(this, St)) == null || e.call(this), G(this, De, !1);
|
|
3849
3849
|
}
|
|
3850
|
-
},
|
|
3850
|
+
}, qe = new WeakMap(), Et = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), De = new WeakMap(), At = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), ze = new WeakMap(), We = new WeakMap(), je = new WeakMap(), Tt = new WeakMap(), Ye = new WeakMap(), St = new WeakMap(), ps), Je, _t, Pt, wt, Oe, vt, Ze, Xe, et, tt, nt, bt, st, rt, It, ys, ic = (ys = class {
|
|
3851
3851
|
constructor(e) {
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3852
|
+
D(this, Je);
|
|
3853
|
+
D(this, _t);
|
|
3854
|
+
D(this, Pt);
|
|
3855
|
+
D(this, wt);
|
|
3856
|
+
D(this, Oe, !1);
|
|
3857
|
+
D(this, vt);
|
|
3858
|
+
D(this, Ze);
|
|
3859
|
+
D(this, Xe);
|
|
3860
|
+
D(this, et);
|
|
3861
|
+
D(this, tt);
|
|
3862
|
+
D(this, nt);
|
|
3863
|
+
D(this, bt);
|
|
3864
|
+
D(this, st);
|
|
3865
|
+
D(this, rt);
|
|
3866
|
+
D(this, It);
|
|
3867
3867
|
const {
|
|
3868
3868
|
client: t,
|
|
3869
3869
|
queryFlavor: n,
|
|
@@ -3878,44 +3878,44 @@ var Nu = (e, t = !1) => {
|
|
|
3878
3878
|
onClose: f,
|
|
3879
3879
|
hideDisabledQueries: g
|
|
3880
3880
|
} = e;
|
|
3881
|
-
G(this,
|
|
3881
|
+
G(this, Je, F(t)), G(this, Pt, n), G(this, wt, s), G(this, _t, r), G(this, vt, d), G(this, Ze, u), G(this, Xe, F(a)), G(this, et, F(i)), G(this, tt, F(o)), G(this, nt, F(l)), G(this, bt, F(g)), G(this, st, F(f));
|
|
3882
3882
|
}
|
|
3883
3883
|
setButtonPosition(e) {
|
|
3884
|
-
A(this,
|
|
3884
|
+
A(this, Xe)[1](e);
|
|
3885
3885
|
}
|
|
3886
3886
|
setPosition(e) {
|
|
3887
|
-
A(this,
|
|
3887
|
+
A(this, et)[1](e);
|
|
3888
3888
|
}
|
|
3889
3889
|
setInitialIsOpen(e) {
|
|
3890
|
-
A(this,
|
|
3890
|
+
A(this, tt)[1](e);
|
|
3891
3891
|
}
|
|
3892
3892
|
setErrorTypes(e) {
|
|
3893
|
-
A(this,
|
|
3893
|
+
A(this, nt)[1](e);
|
|
3894
3894
|
}
|
|
3895
3895
|
setClient(e) {
|
|
3896
|
-
A(this,
|
|
3896
|
+
A(this, Je)[1](e);
|
|
3897
3897
|
}
|
|
3898
3898
|
setOnClose(e) {
|
|
3899
|
-
A(this,
|
|
3899
|
+
A(this, st)[1](() => e);
|
|
3900
3900
|
}
|
|
3901
3901
|
mount(e) {
|
|
3902
|
-
if (A(this,
|
|
3902
|
+
if (A(this, Oe))
|
|
3903
3903
|
throw new Error("Devtools is already mounted");
|
|
3904
|
-
const t =
|
|
3905
|
-
const n = this, [s] = A(this,
|
|
3904
|
+
const t = fr(() => {
|
|
3905
|
+
const n = this, [s] = A(this, Xe), [r] = A(this, et), [a] = A(this, tt), [i] = A(this, nt), [o] = A(this, bt), [l] = A(this, Je), [d] = A(this, st);
|
|
3906
3906
|
let u;
|
|
3907
|
-
return A(this,
|
|
3907
|
+
return A(this, rt) ? u = A(this, rt) : (u = ur(() => import("./2AITGKQY-CoZaZMrf.js")), G(this, rt, u)), Gr(A(this, vt), A(this, Ze)), lr(u, cr({
|
|
3908
3908
|
get queryFlavor() {
|
|
3909
|
-
return A(n,
|
|
3909
|
+
return A(n, Pt);
|
|
3910
3910
|
},
|
|
3911
3911
|
get version() {
|
|
3912
|
-
return A(n,
|
|
3912
|
+
return A(n, wt);
|
|
3913
3913
|
},
|
|
3914
3914
|
get onlineManager() {
|
|
3915
|
-
return A(n,
|
|
3915
|
+
return A(n, _t);
|
|
3916
3916
|
},
|
|
3917
3917
|
get shadowDOMTarget() {
|
|
3918
|
-
return A(n,
|
|
3918
|
+
return A(n, Ze);
|
|
3919
3919
|
}
|
|
3920
3920
|
}, {
|
|
3921
3921
|
get client() {
|
|
@@ -3941,16 +3941,16 @@ var Nu = (e, t = !1) => {
|
|
|
3941
3941
|
}
|
|
3942
3942
|
}));
|
|
3943
3943
|
}, e);
|
|
3944
|
-
G(this,
|
|
3944
|
+
G(this, Oe, !0), G(this, It, t);
|
|
3945
3945
|
}
|
|
3946
3946
|
unmount() {
|
|
3947
3947
|
var e;
|
|
3948
|
-
if (!A(this,
|
|
3948
|
+
if (!A(this, Oe))
|
|
3949
3949
|
throw new Error("Devtools is not mounted");
|
|
3950
|
-
(e = A(this,
|
|
3950
|
+
(e = A(this, It)) == null || e.call(this), G(this, Oe, !1);
|
|
3951
3951
|
}
|
|
3952
|
-
},
|
|
3953
|
-
function
|
|
3952
|
+
}, Je = new WeakMap(), _t = new WeakMap(), Pt = new WeakMap(), wt = new WeakMap(), Oe = new WeakMap(), vt = new WeakMap(), Ze = new WeakMap(), Xe = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), nt = new WeakMap(), bt = new WeakMap(), st = new WeakMap(), rt = new WeakMap(), It = new WeakMap(), ys);
|
|
3953
|
+
function oc(e) {
|
|
3954
3954
|
const t = J(e.client), n = Q.useRef(null), {
|
|
3955
3955
|
buttonPosition: s,
|
|
3956
3956
|
position: r,
|
|
@@ -3960,11 +3960,11 @@ function ac(e) {
|
|
|
3960
3960
|
shadowDOMTarget: l,
|
|
3961
3961
|
hideDisabledQueries: d
|
|
3962
3962
|
} = e, [u] = Q.useState(
|
|
3963
|
-
new
|
|
3963
|
+
new ac({
|
|
3964
3964
|
client: t,
|
|
3965
3965
|
queryFlavor: "React Query",
|
|
3966
3966
|
version: "5",
|
|
3967
|
-
onlineManager:
|
|
3967
|
+
onlineManager: vs,
|
|
3968
3968
|
buttonPosition: s,
|
|
3969
3969
|
position: r,
|
|
3970
3970
|
initialIsOpen: a,
|
|
@@ -3988,13 +3988,13 @@ function ac(e) {
|
|
|
3988
3988
|
u.unmount();
|
|
3989
3989
|
}), [u]), /* @__PURE__ */ c("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
|
|
3990
3990
|
}
|
|
3991
|
-
function
|
|
3991
|
+
function lc(e) {
|
|
3992
3992
|
const t = J(e.client), n = Q.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: a, hideDisabledQueries: i } = e, [o] = Q.useState(
|
|
3993
|
-
new
|
|
3993
|
+
new ic({
|
|
3994
3994
|
client: t,
|
|
3995
3995
|
queryFlavor: "React Query",
|
|
3996
3996
|
version: "5",
|
|
3997
|
-
onlineManager:
|
|
3997
|
+
onlineManager: vs,
|
|
3998
3998
|
buttonPosition: "bottom-left",
|
|
3999
3999
|
position: "bottom",
|
|
4000
4000
|
initialIsOpen: !0,
|
|
@@ -4023,11 +4023,11 @@ function ic(e) {
|
|
|
4023
4023
|
}
|
|
4024
4024
|
);
|
|
4025
4025
|
}
|
|
4026
|
-
var
|
|
4026
|
+
var gs = process.env.NODE_ENV !== "development" ? function() {
|
|
4027
4027
|
return null;
|
|
4028
|
-
} :
|
|
4028
|
+
} : oc;
|
|
4029
4029
|
process.env.NODE_ENV;
|
|
4030
|
-
const
|
|
4030
|
+
const cc = Ee(""), uc = () => {
|
|
4031
4031
|
an("dynamic-page-selector", {
|
|
4032
4032
|
description: "Dynamic page selector"
|
|
4033
4033
|
}), an("enable-add-page-dropdown", {
|
|
@@ -4035,15 +4035,15 @@ const oc = Ee(""), lc = () => {
|
|
|
4035
4035
|
}), an("enable-ai-chat-panel", {
|
|
4036
4036
|
description: "Enable AI chat panel"
|
|
4037
4037
|
});
|
|
4038
|
-
},
|
|
4039
|
-
const e =
|
|
4040
|
-
return
|
|
4038
|
+
}, dc = () => {
|
|
4039
|
+
const e = N(), t = b();
|
|
4040
|
+
return re({
|
|
4041
4041
|
queryKey: [E.GET_COLLECTIONS],
|
|
4042
4042
|
staleTime: 1 / 0,
|
|
4043
4043
|
queryFn: async () => t(e, { action: E.GET_COLLECTIONS })
|
|
4044
4044
|
});
|
|
4045
|
-
},
|
|
4046
|
-
const { data: e } = ce(), { data: t } = Ne(), { data: n } = Be(), s =
|
|
4045
|
+
}, fc = () => {
|
|
4046
|
+
const { data: e } = ce(), { data: t } = Ne(), { data: n } = Be(), s = N(), r = b(), a = q(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]), i = Ie(/* @__PURE__ */ new Map());
|
|
4047
4047
|
return Y({
|
|
4048
4048
|
mutationFn: async ({ block: o }) => {
|
|
4049
4049
|
const l = o._id, d = (t == null ? void 0 : t.lang) || a, u = `${l}:${d}`;
|
|
@@ -4073,8 +4073,8 @@ const oc = Ee(""), lc = () => {
|
|
|
4073
4073
|
}), f;
|
|
4074
4074
|
}
|
|
4075
4075
|
});
|
|
4076
|
-
},
|
|
4077
|
-
const [, e] =
|
|
4076
|
+
}, hc = () => {
|
|
4077
|
+
const [, e] = ve();
|
|
4078
4078
|
return z(
|
|
4079
4079
|
(t, n) => {
|
|
4080
4080
|
const r = new URLSearchParams(window.location.search).get("lang"), a = new URLSearchParams({ page: t });
|
|
@@ -4082,55 +4082,66 @@ const oc = Ee(""), lc = () => {
|
|
|
4082
4082
|
},
|
|
4083
4083
|
[e]
|
|
4084
4084
|
);
|
|
4085
|
-
},
|
|
4086
|
-
const e =
|
|
4085
|
+
}, gc = () => {
|
|
4086
|
+
const e = hc();
|
|
4087
4087
|
return z(
|
|
4088
4088
|
({ pageId: t }) => {
|
|
4089
4089
|
e(t);
|
|
4090
4090
|
},
|
|
4091
4091
|
[e]
|
|
4092
4092
|
);
|
|
4093
|
-
},
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4093
|
+
}, mc = {
|
|
4094
|
+
SITE_WIDE_USAGE: "SITE_WIDE_USAGE"
|
|
4095
|
+
}, Ec = (e) => {
|
|
4096
|
+
const t = b(), n = N();
|
|
4097
|
+
return re({
|
|
4098
|
+
queryKey: [mc.SITE_WIDE_USAGE],
|
|
4099
|
+
queryFn: async () => e ? t(n, { action: "GET_SITE_WIDE_USAGE" }) : {},
|
|
4100
|
+
retry: !1
|
|
4101
|
+
});
|
|
4102
|
+
}, pc = V(() => import("./page-lock-Dl5CmUgk.js")), yc = V(() => import("./no-language-page-dialog-Q2rvsEP6.js")), Ac = V(() => import("./digital-asset-manager-D6GbpYDo.js")), Tc = V(() => import("./save-to-lib-Bkou78G6.js")), Sc = V(() => import("./theme-panel-footer-CftO53LS.js")), _c = V(() => import("./web-preview-DiOChE4E.js"));
|
|
4103
|
+
uc();
|
|
4104
|
+
li();
|
|
4105
|
+
oa(ho);
|
|
4106
|
+
ko();
|
|
4107
|
+
la(Ac);
|
|
4108
|
+
ca(Tc);
|
|
4109
|
+
const Pc = {
|
|
4101
4110
|
role: "",
|
|
4102
4111
|
permissions: null
|
|
4103
|
-
},
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4112
|
+
}, ms = (e) => {
|
|
4113
|
+
var Vn;
|
|
4114
|
+
const { data: t } = To(), n = Un(), { data: s = Pc, isFetching: r } = So(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: l } = dc(), { data: d, isFetching: u } = Be(), f = r || i || l || u, [g] = ve(), h = g.get("page"), { data: p } = ce(), { data: T, isFetching: S } = po(), { blocks: O } = Eo(T), { data: y, isFetching: w } = yo(), { pageStatus: v } = pe(), U = go(), { onSave: I } = _o(), { mutateAsync: ye } = fc(), { getPartialBlocks: Ae, getPartialBlockBlocks: B } = Po(), { mutateAsync: P } = Fi(), { mutateAsync: L } = Ao(), { data: W } = Ec(((Vn = e.flags) == null ? void 0 : Vn.designTokens) ?? !1), $ = gc(), [fe, Nt] = K(!1), Te = Ie([]), Ke = q(() => H(d, "theme", {}) || {}, [d]), Ge = v === te.EDITING, Dr = v === te.CHECKING, Fn = S || Dr || w;
|
|
4115
|
+
Te.current = O;
|
|
4116
|
+
const [Or] = oe(cc);
|
|
4107
4117
|
ne(() => {
|
|
4108
|
-
const
|
|
4109
|
-
document.hidden ?
|
|
4118
|
+
const ae = () => {
|
|
4119
|
+
document.hidden ? Nt(!0) : Nt(!1);
|
|
4110
4120
|
};
|
|
4111
|
-
return window.addEventListener("visibilitychange",
|
|
4121
|
+
return window.addEventListener("visibilitychange", ae), () => window.removeEventListener("visibilitychange", ae);
|
|
4112
4122
|
}, []);
|
|
4113
|
-
const
|
|
4114
|
-
const
|
|
4115
|
-
return s && (
|
|
4116
|
-
}, [s]), Kn = q(() => t == null ? void 0 : t.some((
|
|
4117
|
-
async (
|
|
4123
|
+
const xr = q(() => {
|
|
4124
|
+
const ae = {};
|
|
4125
|
+
return s && (ae.permissions = H(s, "permissions", null), ae.role = H(s, "role", "user")), ae;
|
|
4126
|
+
}, [s]), Kn = q(() => t == null ? void 0 : t.some((ae) => ae.isSiteLibrary), [t]), Rr = z(
|
|
4127
|
+
async (ae, Ct) => await P({ pageType: ae, query: Ct }),
|
|
4118
4128
|
[P]
|
|
4119
4129
|
);
|
|
4120
4130
|
return /* @__PURE__ */ m(ge, { children: [
|
|
4121
|
-
Fn && /* @__PURE__ */ c(
|
|
4122
|
-
|
|
4131
|
+
Fn && /* @__PURE__ */ c(qs, { 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"}` }) }),
|
|
4132
|
+
Or && /* @__PURE__ */ c(
|
|
4123
4133
|
X,
|
|
4124
4134
|
{
|
|
4125
4135
|
fallback: /* @__PURE__ */ c("div", { className: "absolute inset-0 z-[999999] flex min-h-screen w-screen items-center justify-center bg-gray-100", children: /* @__PURE__ */ c(Ht, { className: "h-6 w-6 animate-spin text-primary" }) }),
|
|
4126
|
-
children: /* @__PURE__ */ c(
|
|
4136
|
+
children: /* @__PURE__ */ c(_c, {})
|
|
4127
4137
|
}
|
|
4128
4138
|
),
|
|
4129
4139
|
/* @__PURE__ */ c(
|
|
4130
|
-
|
|
4140
|
+
ua,
|
|
4131
4141
|
{
|
|
4142
|
+
siteWideUsage: W ?? {},
|
|
4132
4143
|
flags: e.flags ? { ...e.flags, librarySite: Kn } : { librarySite: Kn },
|
|
4133
|
-
gotoPage:
|
|
4144
|
+
gotoPage: $,
|
|
4134
4145
|
collections: o ?? [],
|
|
4135
4146
|
getBlockAsyncProps: ye,
|
|
4136
4147
|
pageExternalData: y,
|
|
@@ -4144,32 +4155,32 @@ const Ac = {
|
|
|
4144
4155
|
translations: e.translations || {},
|
|
4145
4156
|
locale: e.locale || "en",
|
|
4146
4157
|
htmlDir: e.htmlDir || "ltr",
|
|
4147
|
-
autoSave:
|
|
4148
|
-
|
|
4158
|
+
autoSave: !fe && Ge && (e.autoSave ?? !0),
|
|
4159
|
+
autoSaveActionsCount: e.autoSaveActionsCount ?? 10,
|
|
4149
4160
|
onError: e.onError || console.error,
|
|
4150
4161
|
getPartialBlockBlocks: B,
|
|
4151
4162
|
getPartialBlocks: Ae,
|
|
4152
|
-
blocks: S ? [] :
|
|
4153
|
-
theme:
|
|
4163
|
+
blocks: S ? [] : O,
|
|
4164
|
+
theme: jr(Ke),
|
|
4154
4165
|
pageTypes: a,
|
|
4155
|
-
searchPageTypeItems:
|
|
4166
|
+
searchPageTypeItems: Rr,
|
|
4156
4167
|
askAiCallBack: U,
|
|
4157
|
-
onSave: async ({ blocks:
|
|
4168
|
+
onSave: async ({ blocks: ae, theme: Ct, needTranslations: kr, designTokens: Hn }) => {
|
|
4158
4169
|
if (!h) return !0;
|
|
4159
|
-
|
|
4160
|
-
const
|
|
4161
|
-
await
|
|
4170
|
+
Te.current = ae;
|
|
4171
|
+
const qn = [...ae];
|
|
4172
|
+
await I({ page: h, blocks: qn, needTranslations: kr }), Te.current = qn;
|
|
4162
4173
|
const rn = {};
|
|
4163
|
-
return
|
|
4174
|
+
return Wn(Ct, Ke) || (rn.theme = Ct), Wn(Hn, d == null ? void 0 : d.designTokens) || (rn.designTokens = Hn), await L({ settings: rn }), !0;
|
|
4164
4175
|
},
|
|
4165
|
-
themePanelComponent:
|
|
4166
|
-
...
|
|
4167
|
-
children: /* @__PURE__ */ c(
|
|
4176
|
+
themePanelComponent: Sc,
|
|
4177
|
+
...xr,
|
|
4178
|
+
children: /* @__PURE__ */ c(pc, { isFetchingPageData: Fn })
|
|
4168
4179
|
}
|
|
4169
4180
|
),
|
|
4170
|
-
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
|
|
4181
|
+
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(yc, {}) })
|
|
4171
4182
|
] });
|
|
4172
|
-
},
|
|
4183
|
+
}, wc = new Xr({
|
|
4173
4184
|
defaultOptions: {
|
|
4174
4185
|
queries: {
|
|
4175
4186
|
refetchOnWindowFocus: !1,
|
|
@@ -4177,8 +4188,8 @@ const Ac = {
|
|
|
4177
4188
|
refetchOnMount: !1
|
|
4178
4189
|
}
|
|
4179
4190
|
}
|
|
4180
|
-
}),
|
|
4181
|
-
const [, t] =
|
|
4191
|
+
}), Mu = (e) => {
|
|
4192
|
+
const [, t] = Dn(), [n, s] = K(!1);
|
|
4182
4193
|
return ne(() => (t(
|
|
4183
4194
|
Ln(e, [
|
|
4184
4195
|
"apiUrl",
|
|
@@ -4199,18 +4210,18 @@ const Ac = {
|
|
|
4199
4210
|
}, 200), () => {
|
|
4200
4211
|
s(!1), t({});
|
|
4201
4212
|
}), [e, t]), n ? H(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(ge, { children: [
|
|
4202
|
-
/* @__PURE__ */ c(
|
|
4203
|
-
/* @__PURE__ */ c(
|
|
4204
|
-
] }) : /* @__PURE__ */ m(
|
|
4205
|
-
/* @__PURE__ */ c(
|
|
4206
|
-
/* @__PURE__ */ c(
|
|
4213
|
+
/* @__PURE__ */ c(ms, { ...e }),
|
|
4214
|
+
/* @__PURE__ */ c(gs, {})
|
|
4215
|
+
] }) : /* @__PURE__ */ m(ea, { client: wc, children: [
|
|
4216
|
+
/* @__PURE__ */ c(ms, { ...e }),
|
|
4217
|
+
/* @__PURE__ */ c(gs, {})
|
|
4207
4218
|
] }) : /* @__PURE__ */ c("div", {});
|
|
4208
|
-
},
|
|
4209
|
-
function
|
|
4219
|
+
}, vc = Q.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
|
|
4220
|
+
function bc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
4210
4221
|
const [r, a] = Q.useState(!1);
|
|
4211
|
-
return /* @__PURE__ */ m(
|
|
4222
|
+
return /* @__PURE__ */ m(La, { open: r, onOpenChange: a, children: [
|
|
4212
4223
|
/* @__PURE__ */ m(Jt, { children: [
|
|
4213
|
-
/* @__PURE__ */ c(Zt, { asChild: !0, children: /* @__PURE__ */ c(
|
|
4224
|
+
/* @__PURE__ */ c(Zt, { asChild: !0, children: /* @__PURE__ */ c(Na, { asChild: !0, children: /* @__PURE__ */ c(
|
|
4214
4225
|
M,
|
|
4215
4226
|
{
|
|
4216
4227
|
size: "sm",
|
|
@@ -4234,7 +4245,7 @@ function _c({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4234
4245
|
/* @__PURE__ */ c(Xt, { children: "Add field" })
|
|
4235
4246
|
] }),
|
|
4236
4247
|
r && /* @__PURE__ */ c(Q.Suspense, { children: /* @__PURE__ */ c(
|
|
4237
|
-
|
|
4248
|
+
vc,
|
|
4238
4249
|
{
|
|
4239
4250
|
data: e,
|
|
4240
4251
|
onSelect: t,
|
|
@@ -4245,18 +4256,18 @@ function _c({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4245
4256
|
) })
|
|
4246
4257
|
] });
|
|
4247
4258
|
}
|
|
4248
|
-
const
|
|
4259
|
+
const Bu = () => {
|
|
4249
4260
|
const { savePageAsync: e } = ke(), t = J(), { isLocked: n } = pe();
|
|
4250
4261
|
return z(async () => {
|
|
4251
4262
|
n || await e(), t.invalidateQueries({ queryKey: [E.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [E.GET_BUILDER_PAGE_DATA] });
|
|
4252
4263
|
}, [e, t, n]);
|
|
4253
|
-
},
|
|
4264
|
+
}, Fu = () => {
|
|
4254
4265
|
const e = J();
|
|
4255
4266
|
return z(() => {
|
|
4256
4267
|
e.clear();
|
|
4257
4268
|
}, [e]);
|
|
4258
|
-
},
|
|
4259
|
-
const e =
|
|
4269
|
+
}, Ku = () => {
|
|
4270
|
+
const e = N(), t = b(), { data: n } = Ne(), s = J();
|
|
4260
4271
|
return Y({
|
|
4261
4272
|
mutationFn: async (r) => {
|
|
4262
4273
|
if (!(n != null && n.id))
|
|
@@ -4280,7 +4291,7 @@ const Ru = () => {
|
|
|
4280
4291
|
console.error("Failed to update metadata");
|
|
4281
4292
|
}
|
|
4282
4293
|
});
|
|
4283
|
-
},
|
|
4294
|
+
}, Ic = V(() => import("./digital-asset-manager-D6GbpYDo.js")), Vu = ({
|
|
4284
4295
|
assetId: e,
|
|
4285
4296
|
assetUrl: t,
|
|
4286
4297
|
onChange: n,
|
|
@@ -4288,7 +4299,7 @@ const Ru = () => {
|
|
|
4288
4299
|
placeholder: r = "Select an image",
|
|
4289
4300
|
disabled: a = !1
|
|
4290
4301
|
}) => {
|
|
4291
|
-
const { t: i } =
|
|
4302
|
+
const { t: i } = we(), [o, l] = K(!1), d = () => {
|
|
4292
4303
|
a || l(!0);
|
|
4293
4304
|
}, u = () => {
|
|
4294
4305
|
l(!1);
|
|
@@ -4319,7 +4330,7 @@ const Ru = () => {
|
|
|
4319
4330
|
className: "h-8 w-8 rounded-full bg-white text-red-500",
|
|
4320
4331
|
onClick: g,
|
|
4321
4332
|
disabled: a,
|
|
4322
|
-
children: h ? /* @__PURE__ */ c(
|
|
4333
|
+
children: h ? /* @__PURE__ */ c(ns, { className: "h-4 w-4" }) : /* @__PURE__ */ c(ei, { className: "h-4 w-4" })
|
|
4323
4334
|
}
|
|
4324
4335
|
),
|
|
4325
4336
|
!h && /* @__PURE__ */ c(
|
|
@@ -4331,7 +4342,7 @@ const Ru = () => {
|
|
|
4331
4342
|
className: "h-8 w-8 rounded-full bg-white/80 hover:bg-white/90",
|
|
4332
4343
|
onClick: d,
|
|
4333
4344
|
disabled: a,
|
|
4334
|
-
children: /* @__PURE__ */ c(
|
|
4345
|
+
children: /* @__PURE__ */ c(ss, { className: "h-4 w-4" })
|
|
4335
4346
|
}
|
|
4336
4347
|
)
|
|
4337
4348
|
] })
|
|
@@ -4341,14 +4352,14 @@ const Ru = () => {
|
|
|
4341
4352
|
className: `flex cursor-pointer items-center justify-center rounded-md border border-dashed p-6 ${a ? "cursor-not-allowed opacity-50" : "hover:border-gray-400"}`,
|
|
4342
4353
|
onClick: d,
|
|
4343
4354
|
children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center gap-2", children: [
|
|
4344
|
-
/* @__PURE__ */ c(
|
|
4355
|
+
/* @__PURE__ */ c(ss, { className: "h-10 w-10 text-gray-400" }),
|
|
4345
4356
|
/* @__PURE__ */ c("p", { className: "text-sm text-gray-500", children: r })
|
|
4346
4357
|
] })
|
|
4347
4358
|
}
|
|
4348
4359
|
),
|
|
4349
|
-
/* @__PURE__ */ c(
|
|
4350
|
-
/* @__PURE__ */ m(
|
|
4351
|
-
/* @__PURE__ */ c(
|
|
4360
|
+
/* @__PURE__ */ c(Cs, { open: o, onOpenChange: l, children: /* @__PURE__ */ m(Ca, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
|
|
4361
|
+
/* @__PURE__ */ m(Ga, { className: "hidden border-b px-4 py-2", children: [
|
|
4362
|
+
/* @__PURE__ */ c(Da, { children: i("Select Image") }),
|
|
4352
4363
|
/* @__PURE__ */ c(
|
|
4353
4364
|
M,
|
|
4354
4365
|
{
|
|
@@ -4357,12 +4368,12 @@ const Ru = () => {
|
|
|
4357
4368
|
size: "icon",
|
|
4358
4369
|
className: "absolute right-4 top-2",
|
|
4359
4370
|
onClick: u,
|
|
4360
|
-
children: /* @__PURE__ */ c(
|
|
4371
|
+
children: /* @__PURE__ */ c(ns, { className: "h-4 w-4" })
|
|
4361
4372
|
}
|
|
4362
4373
|
)
|
|
4363
4374
|
] }),
|
|
4364
4375
|
/* @__PURE__ */ c("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
4365
|
-
|
|
4376
|
+
Ic,
|
|
4366
4377
|
{
|
|
4367
4378
|
close: u,
|
|
4368
4379
|
onSelect: f,
|
|
@@ -4372,11 +4383,11 @@ const Ru = () => {
|
|
|
4372
4383
|
) }) })
|
|
4373
4384
|
] }) })
|
|
4374
4385
|
] });
|
|
4375
|
-
},
|
|
4386
|
+
}, Lc = Jr(null), En = {
|
|
4376
4387
|
didCatch: !1,
|
|
4377
4388
|
error: null
|
|
4378
4389
|
};
|
|
4379
|
-
class
|
|
4390
|
+
class Nc extends Zr {
|
|
4380
4391
|
constructor(t) {
|
|
4381
4392
|
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = En;
|
|
4382
4393
|
}
|
|
@@ -4409,7 +4420,7 @@ class vc extends Yr {
|
|
|
4409
4420
|
} = this.state, {
|
|
4410
4421
|
resetKeys: r
|
|
4411
4422
|
} = this.props;
|
|
4412
|
-
if (s && n.error !== null &&
|
|
4423
|
+
if (s && n.error !== null && Cc(t.resetKeys, r)) {
|
|
4413
4424
|
var a, i;
|
|
4414
4425
|
(a = (i = this.props).onReset) === null || a === void 0 || a.call(i, {
|
|
4415
4426
|
next: r,
|
|
@@ -4443,7 +4454,7 @@ class vc extends Yr {
|
|
|
4443
4454
|
else
|
|
4444
4455
|
throw i;
|
|
4445
4456
|
}
|
|
4446
|
-
return jn(
|
|
4457
|
+
return jn(Lc.Provider, {
|
|
4447
4458
|
value: {
|
|
4448
4459
|
didCatch: a,
|
|
4449
4460
|
error: i,
|
|
@@ -4452,11 +4463,11 @@ class vc extends Yr {
|
|
|
4452
4463
|
}, o);
|
|
4453
4464
|
}
|
|
4454
4465
|
}
|
|
4455
|
-
function
|
|
4466
|
+
function Cc() {
|
|
4456
4467
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
4457
4468
|
return e.length !== t.length || e.some((n, s) => !Object.is(n, t[s]));
|
|
4458
4469
|
}
|
|
4459
|
-
const
|
|
4470
|
+
const Gc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Es = (e) => {
|
|
4460
4471
|
if (!e.trim())
|
|
4461
4472
|
return { isValid: !1, parsed: null, placeholders: [], error: { message: "JSON is empty" } };
|
|
4462
4473
|
try {
|
|
@@ -4491,13 +4502,13 @@ const Ic = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ms = (e) => {
|
|
|
4491
4502
|
}
|
|
4492
4503
|
};
|
|
4493
4504
|
}
|
|
4494
|
-
},
|
|
4505
|
+
}, Dc = (e, t) => {
|
|
4495
4506
|
let s = JSON.stringify(e, null, 2);
|
|
4496
4507
|
return t.forEach(({ original: r }, a) => {
|
|
4497
|
-
const i = `"__placeholder_${a}__"`, o = new RegExp(
|
|
4508
|
+
const i = `"__placeholder_${a}__"`, o = new RegExp(Gc(i), "g");
|
|
4498
4509
|
s = s.replace(o, r);
|
|
4499
4510
|
}), s;
|
|
4500
|
-
},
|
|
4511
|
+
}, Oc = (e, t) => {
|
|
4501
4512
|
if (!e) return "";
|
|
4502
4513
|
let n = JSON.stringify(e, null, 2);
|
|
4503
4514
|
const s = /{{([^{}]+)}}/g;
|
|
@@ -4507,7 +4518,7 @@ const Ic = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ms = (e) => {
|
|
|
4507
4518
|
n = n.replace(r[0], i);
|
|
4508
4519
|
}
|
|
4509
4520
|
return n;
|
|
4510
|
-
},
|
|
4521
|
+
}, xc = V(() => import("./shared-json-ld-S9OIaOTA.js")), Hu = ({
|
|
4511
4522
|
value: e,
|
|
4512
4523
|
onChange: t,
|
|
4513
4524
|
disabled: n = !1,
|
|
@@ -4520,7 +4531,7 @@ const Ic = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ms = (e) => {
|
|
|
4520
4531
|
hasJsonLdForSelectedLang: d,
|
|
4521
4532
|
copyJsonLDFromDefaultPage: u
|
|
4522
4533
|
}) => {
|
|
4523
|
-
const [f, g] = K("edit"), [h, p] = K(null), [T, S] = K(""),
|
|
4534
|
+
const [f, g] = K("edit"), [h, p] = K(null), [T, S] = K(""), O = Ie(null), [y] = Dn(), w = i === "jsonLD" && H(y, "features.sharedJsonLD", !1), v = i === "jsonLD" && !d && !!u;
|
|
4524
4535
|
ne(() => {
|
|
4525
4536
|
e.trim() === "" && t("{}");
|
|
4526
4537
|
}, [e, t]);
|
|
@@ -4528,39 +4539,39 @@ const Ic = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ms = (e) => {
|
|
|
4528
4539
|
if (s) return;
|
|
4529
4540
|
const P = B.target.value;
|
|
4530
4541
|
t(P);
|
|
4531
|
-
},
|
|
4542
|
+
}, I = (B) => {
|
|
4532
4543
|
if (B.key === "Tab") {
|
|
4533
4544
|
B.preventDefault();
|
|
4534
|
-
const P = B.currentTarget,
|
|
4535
|
-
if (
|
|
4536
|
-
const
|
|
4545
|
+
const P = B.currentTarget, L = P.selectionStart, W = P.selectionEnd;
|
|
4546
|
+
if (L !== W) {
|
|
4547
|
+
const fe = e.substring(L, W).split(`
|
|
4537
4548
|
`);
|
|
4538
4549
|
if (B.shiftKey) {
|
|
4539
|
-
const
|
|
4540
|
-
`),
|
|
4541
|
-
t(
|
|
4542
|
-
P.selectionStart =
|
|
4550
|
+
const Te = fe.map((Ge) => Ge.startsWith(" ") ? Ge.substring(2) : Ge).join(`
|
|
4551
|
+
`), Ke = e.substring(0, L) + Te + e.substring(W);
|
|
4552
|
+
t(Ke), setTimeout(() => {
|
|
4553
|
+
P.selectionStart = L, P.selectionEnd = L + Te.length;
|
|
4543
4554
|
}, 0);
|
|
4544
4555
|
} else {
|
|
4545
|
-
const
|
|
4546
|
-
`),
|
|
4547
|
-
t(
|
|
4548
|
-
P.selectionStart =
|
|
4556
|
+
const Te = fe.map((Ge) => ` ${Ge}`).join(`
|
|
4557
|
+
`), Ke = e.substring(0, L) + Te + e.substring(W);
|
|
4558
|
+
t(Ke), setTimeout(() => {
|
|
4559
|
+
P.selectionStart = L, P.selectionEnd = L + Te.length;
|
|
4549
4560
|
}, 0);
|
|
4550
4561
|
}
|
|
4551
4562
|
} else {
|
|
4552
|
-
const $ = e.substring(0,
|
|
4563
|
+
const $ = e.substring(0, L) + " " + e.substring(W);
|
|
4553
4564
|
t($), setTimeout(() => {
|
|
4554
|
-
P.selectionStart = P.selectionEnd =
|
|
4565
|
+
P.selectionStart = P.selectionEnd = L + 2;
|
|
4555
4566
|
}, 0);
|
|
4556
4567
|
}
|
|
4557
4568
|
}
|
|
4558
4569
|
};
|
|
4559
4570
|
ne(() => {
|
|
4560
|
-
const B =
|
|
4571
|
+
const B = Es(e);
|
|
4561
4572
|
if (B.isValid)
|
|
4562
4573
|
if (p(null), B.parsed) {
|
|
4563
|
-
const P =
|
|
4574
|
+
const P = Oc(B.parsed, o);
|
|
4564
4575
|
S(P);
|
|
4565
4576
|
} else
|
|
4566
4577
|
S("");
|
|
@@ -4568,19 +4579,19 @@ const Ic = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ms = (e) => {
|
|
|
4568
4579
|
p(B.error), S("");
|
|
4569
4580
|
}, [e, o]);
|
|
4570
4581
|
const ye = () => {
|
|
4571
|
-
const B =
|
|
4582
|
+
const B = Es(e);
|
|
4572
4583
|
if (B.isValid && B.parsed) {
|
|
4573
|
-
const P =
|
|
4584
|
+
const P = Dc(B.parsed, B.placeholders);
|
|
4574
4585
|
t(P);
|
|
4575
4586
|
}
|
|
4576
4587
|
}, Ae = () => {
|
|
4577
|
-
h != null && h.position &&
|
|
4588
|
+
h != null && h.position && O.current && (O.current.focus(), O.current.setSelectionRange(h.position, h.position + 1));
|
|
4578
4589
|
};
|
|
4579
|
-
return /* @__PURE__ */ c(
|
|
4590
|
+
return /* @__PURE__ */ c(Nc, { fallback: /* @__PURE__ */ c("div", { children: "Some error" }), children: /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ m(Oa, { value: f, onValueChange: g, className: "w-full", children: [
|
|
4580
4591
|
/* @__PURE__ */ m("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
4581
|
-
/* @__PURE__ */ m(
|
|
4592
|
+
/* @__PURE__ */ m(xa, { className: "w-max", children: [
|
|
4582
4593
|
/* @__PURE__ */ m(on, { value: "edit", className: "flex items-center gap-1", children: [
|
|
4583
|
-
/* @__PURE__ */ c(
|
|
4594
|
+
/* @__PURE__ */ c(ti, { className: "h-4 w-4" }),
|
|
4584
4595
|
/* @__PURE__ */ c("span", { children: "Edit" })
|
|
4585
4596
|
] }),
|
|
4586
4597
|
/* @__PURE__ */ m(
|
|
@@ -4590,7 +4601,7 @@ const Ic = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ms = (e) => {
|
|
|
4590
4601
|
className: "flex items-center gap-1",
|
|
4591
4602
|
disabled: !e.trim() || h !== null || v,
|
|
4592
4603
|
children: [
|
|
4593
|
-
/* @__PURE__ */ c(
|
|
4604
|
+
/* @__PURE__ */ c(ni, { className: "h-4 w-4" }),
|
|
4594
4605
|
/* @__PURE__ */ c("span", { children: "Preview" })
|
|
4595
4606
|
]
|
|
4596
4607
|
}
|
|
@@ -4602,14 +4613,14 @@ const Ic = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ms = (e) => {
|
|
|
4602
4613
|
className: "flex items-center gap-1",
|
|
4603
4614
|
disabled: !e.trim() || h !== null,
|
|
4604
4615
|
children: [
|
|
4605
|
-
/* @__PURE__ */ c(
|
|
4616
|
+
/* @__PURE__ */ c(si, { className: "h-4 w-4" }),
|
|
4606
4617
|
/* @__PURE__ */ c("span", { children: "Shared" })
|
|
4607
4618
|
]
|
|
4608
4619
|
}
|
|
4609
4620
|
)
|
|
4610
4621
|
] }),
|
|
4611
4622
|
v ? null : f === "edit" && !s && /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ c(
|
|
4612
|
-
|
|
4623
|
+
bc,
|
|
4613
4624
|
{
|
|
4614
4625
|
dataType: "value",
|
|
4615
4626
|
data: o ?? {},
|
|
@@ -4627,24 +4638,24 @@ const Ic = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ms = (e) => {
|
|
|
4627
4638
|
onClick: ye,
|
|
4628
4639
|
className: "absolute right-1 top-1 h-6 w-6 p-1",
|
|
4629
4640
|
disabled: !e.trim() || n || h !== null,
|
|
4630
|
-
children: /* @__PURE__ */ c(
|
|
4641
|
+
children: /* @__PURE__ */ c(ri, {})
|
|
4631
4642
|
}
|
|
4632
4643
|
) }),
|
|
4633
4644
|
v ? /* @__PURE__ */ c("div", { className: "flex h-40 items-center justify-center rounded-md bg-black/20", children: /* @__PURE__ */ m("div", { className: "flex max-w-[400px] flex-col items-center gap-2 rounded-md bg-white p-4 shadow-lg", children: [
|
|
4634
4645
|
/* @__PURE__ */ c("div", { className: "max-w-xl text-center text-xs text-gray-500", children: "JSON-LD for is not added for selected language. JSON LD will be used from default language." }),
|
|
4635
4646
|
/* @__PURE__ */ m(M, { type: "button", variant: "default", size: "sm", onClick: u, children: [
|
|
4636
|
-
/* @__PURE__ */ c(
|
|
4647
|
+
/* @__PURE__ */ c(Gs, {}),
|
|
4637
4648
|
"Copy & Edit from default language"
|
|
4638
4649
|
] })
|
|
4639
4650
|
] }) }) : /* @__PURE__ */ c(
|
|
4640
|
-
|
|
4651
|
+
Yn,
|
|
4641
4652
|
{
|
|
4642
|
-
ref:
|
|
4653
|
+
ref: O,
|
|
4643
4654
|
id: i,
|
|
4644
4655
|
name: i,
|
|
4645
4656
|
className: `rounded-md border border-input text-xs ${h ? "border-red-500" : ""}`,
|
|
4646
4657
|
onChange: U,
|
|
4647
|
-
onKeyDown:
|
|
4658
|
+
onKeyDown: I,
|
|
4648
4659
|
value: e,
|
|
4649
4660
|
placeholder: r,
|
|
4650
4661
|
rows: a,
|
|
@@ -4652,9 +4663,9 @@ const Ic = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ms = (e) => {
|
|
|
4652
4663
|
readOnly: s
|
|
4653
4664
|
}
|
|
4654
4665
|
),
|
|
4655
|
-
h && /* @__PURE__ */ m(
|
|
4656
|
-
/* @__PURE__ */ c(
|
|
4657
|
-
/* @__PURE__ */ m(
|
|
4666
|
+
h && /* @__PURE__ */ m(Ra, { variant: "destructive", className: "mt-2", children: [
|
|
4667
|
+
/* @__PURE__ */ c(ai, { className: "h-4 w-4" }),
|
|
4668
|
+
/* @__PURE__ */ m(ka, { className: "flex flex-col", children: [
|
|
4658
4669
|
/* @__PURE__ */ c("span", { className: "font-medium", children: "Invalid JSON" }),
|
|
4659
4670
|
/* @__PURE__ */ c("span", { className: "text-sm", children: h.message }),
|
|
4660
4671
|
h.line && h.column && /* @__PURE__ */ m("span", { className: "text-sm", children: [
|
|
@@ -4678,14 +4689,14 @@ const Ic = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ms = (e) => {
|
|
|
4678
4689
|
] })
|
|
4679
4690
|
] }),
|
|
4680
4691
|
/* @__PURE__ */ m(ln, { value: "preview", className: "mt-0", children: [
|
|
4681
|
-
/* @__PURE__ */ c(
|
|
4692
|
+
/* @__PURE__ */ c(Yn, { rows: a, value: T, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
|
|
4682
4693
|
/* @__PURE__ */ c("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
|
|
4683
4694
|
] }),
|
|
4684
|
-
w && /* @__PURE__ */ c(ln, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
4695
|
+
w && /* @__PURE__ */ c(ln, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(xc, {}) }) })
|
|
4685
4696
|
] }) }) });
|
|
4686
|
-
},
|
|
4687
|
-
const t =
|
|
4688
|
-
return
|
|
4697
|
+
}, qu = (e) => {
|
|
4698
|
+
const t = Ds(), n = b();
|
|
4699
|
+
return re({
|
|
4689
4700
|
queryKey: [E.GET_CHAI_USER, e],
|
|
4690
4701
|
queryFn: async () => {
|
|
4691
4702
|
const r = await n(t, {
|
|
@@ -4694,130 +4705,130 @@ const Ic = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ms = (e) => {
|
|
|
4694
4705
|
});
|
|
4695
4706
|
return { ...r, name: r.name || r.email };
|
|
4696
4707
|
},
|
|
4697
|
-
enabled: !
|
|
4708
|
+
enabled: !Se(e),
|
|
4698
4709
|
staleTime: "static"
|
|
4699
4710
|
});
|
|
4700
4711
|
};
|
|
4701
4712
|
if (typeof window > "u")
|
|
4702
4713
|
throw new Error("@chaibuilder/pages is not available on the server");
|
|
4703
4714
|
export {
|
|
4704
|
-
|
|
4715
|
+
Cu as $,
|
|
4705
4716
|
E as A,
|
|
4706
|
-
|
|
4717
|
+
qs as B,
|
|
4707
4718
|
F as C,
|
|
4708
|
-
|
|
4719
|
+
dl as D,
|
|
4709
4720
|
se as E,
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4721
|
+
tr as F,
|
|
4722
|
+
cr as G,
|
|
4723
|
+
Xo as H,
|
|
4724
|
+
gu as I,
|
|
4725
|
+
mu as J,
|
|
4715
4726
|
Re as K,
|
|
4716
|
-
|
|
4727
|
+
Ot as L,
|
|
4717
4728
|
Sn as M,
|
|
4718
|
-
|
|
4719
|
-
|
|
4729
|
+
Eu as N,
|
|
4730
|
+
du as O,
|
|
4720
4731
|
te as P,
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4732
|
+
_u as Q,
|
|
4733
|
+
vu as R,
|
|
4734
|
+
Au as S,
|
|
4724
4735
|
Mn as T,
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4736
|
+
ut as U,
|
|
4737
|
+
bu as V,
|
|
4738
|
+
Pu as W,
|
|
4739
|
+
Vo as X,
|
|
4740
|
+
Al as Y,
|
|
4730
4741
|
_n as Z,
|
|
4731
|
-
|
|
4742
|
+
gl as _,
|
|
4732
4743
|
pe as a,
|
|
4733
4744
|
Rn as a$,
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4745
|
+
Gu as a0,
|
|
4746
|
+
yl as a1,
|
|
4747
|
+
Du as a2,
|
|
4748
|
+
Ou as a3,
|
|
4749
|
+
pu as a4,
|
|
4750
|
+
uu as a5,
|
|
4751
|
+
wu as a6,
|
|
4741
4752
|
Z as a7,
|
|
4742
|
-
|
|
4743
|
-
|
|
4753
|
+
Bo as a8,
|
|
4754
|
+
tc as a9,
|
|
4744
4755
|
en as aA,
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4756
|
+
Bs as aB,
|
|
4757
|
+
ru as aC,
|
|
4758
|
+
ou as aD,
|
|
4759
|
+
Hu as aE,
|
|
4760
|
+
Es as aF,
|
|
4761
|
+
au as aG,
|
|
4762
|
+
lu as aH,
|
|
4763
|
+
cu as aI,
|
|
4764
|
+
iu as aJ,
|
|
4765
|
+
yo as aK,
|
|
4766
|
+
Bi as aL,
|
|
4767
|
+
Dn as aM,
|
|
4768
|
+
Oi as aN,
|
|
4769
|
+
bc as aO,
|
|
4770
|
+
Vu as aP,
|
|
4771
|
+
zc as aQ,
|
|
4772
|
+
Nc as aR,
|
|
4773
|
+
eo as aS,
|
|
4774
|
+
Yc as aT,
|
|
4775
|
+
Us as aU,
|
|
4776
|
+
Mu as aV,
|
|
4766
4777
|
Ne as aW,
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
|
|
4771
|
-
|
|
4778
|
+
Fu as aX,
|
|
4779
|
+
gc as aY,
|
|
4780
|
+
Bu as aZ,
|
|
4781
|
+
Ku as a_,
|
|
4782
|
+
yu as aa,
|
|
4772
4783
|
Ut as ab,
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4784
|
+
ku as ac,
|
|
4785
|
+
Nu as ad,
|
|
4786
|
+
Lu as ae,
|
|
4787
|
+
Zs as af,
|
|
4777
4788
|
xe as ag,
|
|
4778
|
-
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4789
|
+
ml as ah,
|
|
4790
|
+
Iu as ai,
|
|
4791
|
+
Su as aj,
|
|
4792
|
+
Tu as ak,
|
|
4782
4793
|
Mt as al,
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4794
|
+
hu as am,
|
|
4795
|
+
Li as an,
|
|
4796
|
+
qu as ao,
|
|
4797
|
+
bi as ap,
|
|
4798
|
+
N as aq,
|
|
4799
|
+
b as ar,
|
|
4800
|
+
hc as as,
|
|
4801
|
+
Wc as at,
|
|
4802
|
+
su as au,
|
|
4792
4803
|
xn as av,
|
|
4793
4804
|
ce as aw,
|
|
4794
4805
|
un as ax,
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
+
ue as ay,
|
|
4807
|
+
ks as az,
|
|
4808
|
+
Fs as b,
|
|
4809
|
+
So as b0,
|
|
4810
|
+
ve as c,
|
|
4811
|
+
Hi as d,
|
|
4812
|
+
Hs as e,
|
|
4813
|
+
Ao as f,
|
|
4814
|
+
Ks as g,
|
|
4815
|
+
Jc as h,
|
|
4816
|
+
Zc as i,
|
|
4806
4817
|
Be as j,
|
|
4807
4818
|
Un as k,
|
|
4808
4819
|
Me as l,
|
|
4809
4820
|
Ce as m,
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4821
|
+
hi as n,
|
|
4822
|
+
eu as o,
|
|
4823
|
+
cc as p,
|
|
4824
|
+
Xc as q,
|
|
4825
|
+
tu as r,
|
|
4826
|
+
nu as s,
|
|
4816
4827
|
dn as t,
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4828
|
+
jc as u,
|
|
4829
|
+
Uu as v,
|
|
4830
|
+
j as w,
|
|
4831
|
+
lr as x,
|
|
4832
|
+
xu as y,
|
|
4833
|
+
Ru as z
|
|
4823
4834
|
};
|