@chaibuilder/pages 0.15.15 → 0.15.17
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-B0heZwO7.cjs → 2AITGKQY-CuxhppUA.cjs} +1 -1
- package/dist/{2AITGKQY-DdFbivb6.js → 2AITGKQY-JdTvsit7.js} +2 -2
- package/dist/{NCMVHL6D-C2sjzq5J.js → NCMVHL6D-CTrkJrNW.js} +2 -2
- package/dist/{NCMVHL6D-DNxzsLiV.cjs → NCMVHL6D-rzEn9a-Z.cjs} +1 -1
- package/dist/{ZDWCUMSJ-lm9aSFhu.js → ZDWCUMSJ-DIAJ5hj-.js} +1 -1
- package/dist/{ZDWCUMSJ-5pP-AHsx.cjs → ZDWCUMSJ-DZa1ZX5H.cjs} +1 -1
- package/dist/{add-new-language-page-Cb1X6iHP.js → add-new-language-page-3fFJlIi4.js} +2 -2
- package/dist/{add-new-language-page-NglCl30F.cjs → add-new-language-page-DPbVVRnt.cjs} +1 -1
- package/dist/{add-new-page-DLr99NII.js → add-new-page-C-DdGfOJ.js} +1 -1
- package/dist/{add-new-page-mxjdK7ia.cjs → add-new-page-CgsPADOI.cjs} +1 -1
- package/dist/{delete-page-CLee5S7S.js → delete-page-X6KE9Snl.js} +1 -1
- package/dist/{delete-page-De_BOwT0.cjs → delete-page-ftu1i43t.cjs} +1 -1
- package/dist/{digital-asset-manager-C6j4MUhE.js → digital-asset-manager-CWneIIcn.js} +1 -1
- package/dist/{digital-asset-manager-D8GdTF5B.cjs → digital-asset-manager-zEPka3BT.cjs} +1 -1
- package/dist/{duplicate-page-DQRyzlJS.js → duplicate-page-Bwp0RTTE.js} +2 -2
- package/dist/{duplicate-page-rjnt1Cab.cjs → duplicate-page-D-2tkgsd.cjs} +1 -1
- package/dist/{dynamic-page-selector-V5dW1vq-.cjs → dynamic-page-selector-DDyEyh7e.cjs} +1 -1
- package/dist/{dynamic-page-selector-CLIhp1-Z.js → dynamic-page-selector-Vl0aOeHK.js} +1 -1
- package/dist/{index-QkqgwYGF.js → index-DHfaX2M6.js} +1017 -1015
- package/dist/index-DOlBrCPx.cjs +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{json-diff-viewer-DmiSmWhO.js → json-diff-viewer-BCtaXLmG.js} +1 -1
- package/dist/{json-diff-viewer-ZEoYZwR4.cjs → json-diff-viewer-CM1kUeoR.cjs} +1 -1
- package/dist/{lang-panel-DV0KFSiS.js → lang-panel-CaOkz8d3.js} +2 -2
- package/dist/{lang-panel-DYW7FpHg.cjs → lang-panel-DNQEDZ5D.cjs} +1 -1
- package/dist/{mark-as-template-C2Hnv6Yo.cjs → mark-as-template-CD1bYgow.cjs} +1 -1
- package/dist/{mark-as-template-BuKRW4TC.js → mark-as-template-XIeQkqPw.js} +1 -1
- package/dist/{no-language-page-content-CbzJJ5V1.cjs → no-language-page-content-BHacGf6H.cjs} +1 -1
- package/dist/{no-language-page-content-BzkIHkKd.js → no-language-page-content-CtN5VB9K.js} +1 -1
- package/dist/{page-creator-Bm8RI-A1.cjs → page-creator-C7j6rkr2.cjs} +1 -1
- package/dist/{page-creator-CfARQp5P.js → page-creator-Ci3yqsDv.js} +2 -2
- package/dist/{page-lock-request-B-JqHU4x.js → page-lock-request-01G9AeVF.js} +1 -1
- package/dist/{page-lock-request-BeNY76tv.cjs → page-lock-request-BNS3-biN.cjs} +1 -1
- package/dist/{page-locked-by-dialog-BoR9dKc2.js → page-locked-by-dialog-BQV9X0UF.js} +1 -1
- package/dist/{page-locked-by-dialog-DoDvSmLK.cjs → page-locked-by-dialog-Cei-v0MT.cjs} +1 -1
- package/dist/{page-manager-new-BYPR7kTF.js → page-manager-new-DE_2H_ow.js} +2 -2
- package/dist/{page-manager-new-CLkNaFPu.cjs → page-manager-new-XGKr4mup.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-qbb-z4ls.js → page-manager-search-and-filter-B8zCpxug.js} +1 -1
- package/dist/{page-manager-search-and-filter-GL90NOmM.cjs → page-manager-search-and-filter-BDw2AYXn.cjs} +1 -1
- package/dist/{page-revisions-content-DRXJRbW7.cjs → page-revisions-content-BIdaOcUx.cjs} +1 -1
- package/dist/{page-revisions-content-D9Luz4aU.js → page-revisions-content-mih9gx3J.js} +2 -2
- package/dist/{publish-pages-content-Cu0DzmJj.cjs → publish-pages-content-1knN5SPM.cjs} +1 -1
- package/dist/{publish-pages-content-C9F29IPt.js → publish-pages-content-jYi-Q1Vl.js} +2 -2
- package/dist/{save-to-lib-Rcv9pkhE.cjs → save-to-lib-B56XAto8.cjs} +1 -1
- package/dist/{save-to-lib-j75aYapW.js → save-to-lib-CpFEdU_R.js} +1 -1
- package/dist/{seo-panel-CH6YxaSs.js → seo-panel-D3bp2i90.js} +1 -1
- package/dist/{seo-panel-Og15REBD.cjs → seo-panel-DRb3uTUp.cjs} +1 -1
- package/dist/{shared-json-ld-DDwAZ76n.js → shared-json-ld-C4Kjka5m.js} +1 -1
- package/dist/{shared-json-ld-DvzCrVrs.cjs → shared-json-ld-pNjN-zzY.cjs} +1 -1
- package/dist/{slug-input-CU1K4HWM.cjs → slug-input-BeepGXWz.cjs} +1 -1
- package/dist/{slug-input-DIzyGGSl.js → slug-input-CKIckRno.js} +1 -1
- package/dist/{theme-panel-footer-CV5sf8Ay.cjs → theme-panel-footer-B0NRCfkL.cjs} +1 -1
- package/dist/{theme-panel-footer-DYEvREC2.js → theme-panel-footer-DscF7mar.js} +1 -1
- package/dist/{unmark-as-template-3YVPsBXa.cjs → unmark-as-template-9-wHwCPl.cjs} +1 -1
- package/dist/{unmark-as-template-BZtRGHpb.js → unmark-as-template-Dezq0GEM.js} +1 -1
- package/dist/{unpublish-page-BucQ2Q3Z.js → unpublish-page-COPOrCk_.js} +1 -1
- package/dist/{unpublish-page-1p_vCHUh.cjs → unpublish-page-DU3jKAJ5.cjs} +1 -1
- package/dist/{web-preview-70yJppqF.cjs → web-preview-DBBTePPU.cjs} +1 -1
- package/dist/{web-preview-DRF3WCCD.js → web-preview-sSS97N-o.js} +1 -1
- package/package.json +3 -3
- package/dist/index-DLp6No33.cjs +0 -5
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _r = Object.defineProperty;
|
|
2
2
|
var Un = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var Pe = (e, t, n) =>
|
|
5
|
+
var Pr = (e, t, n) => t in e ? _r(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var Pe = (e, t, n) => Pr(e, typeof t != "symbol" ? t + "" : t, n), Bn = (e, t, n) => t.has(e) || Un("Cannot " + n);
|
|
7
7
|
var S = (e, t, n) => (Bn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), D = (e, t, n) => t.has(e) ? Un("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), k = (e, t, n, s) => (Bn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
8
8
|
import { jsx as c, jsxs as m, Fragment as ge } from "react/jsx-runtime";
|
|
9
|
-
import { get as V, reverse as
|
|
9
|
+
import { get as V, reverse as vr, sortBy as wr, each as br, find as re, isEmpty as he, groupBy as Ir, minBy as Cr, noop as ds, keyBy as Nr, map as Ut, compact as fs, upperCase as Mn, filter as hs, includes as Lr, has as $t, pick as Pn, keys as kr, pickBy as Or, endsWith as Dr, isArray as Gr, startCase as xr, isFunction as Rr, cloneDeep as Ur, isEqual as Br } from "lodash-es";
|
|
10
10
|
import * as z from "react";
|
|
11
|
-
import
|
|
11
|
+
import Mr, { useMemo as Q, useCallback as j, useState as q, useEffect as se, useRef as at, lazy as K, Suspense as H, createContext as Fr, Component as qr, createElement as Fn } from "react";
|
|
12
12
|
import { atom as Ee, useAtom as te } from "jotai";
|
|
13
|
-
import { useQuery as
|
|
14
|
-
import { useLanguages as
|
|
13
|
+
import { useQuery as ae, useQueryClient as W, useMutation as X, onlineManager as gs, QueryClient as Kr, QueryClientProvider as Vr } from "@tanstack/react-query";
|
|
14
|
+
import { useLanguages as Se, useSavePage as Ge, useTranslation as we, mergeClasses as Bt, usePermissions as ms, PERMISSIONS as Hr, useRightPanel as Qr, useChaiFeatureFlag as $r, useIsPageLoaded as jr, registerChaiLibrary as zr, getBlocksFromHTML as Wr, registerChaiSidebarPanel as en, registerChaiFeatureFlag as qn, registerChaiTopBar as Yr, registerChaiMediaManager as Jr, registerChaiSaveToLibrary as Xr, ChaiBuilderEditor as Zr } from "@chaibuilder/sdk";
|
|
15
15
|
import { toast as R } from "sonner";
|
|
16
|
-
import { Tooltip as jt, TooltipTrigger as zt, Button as M, TooltipContent as Wt, Sheet as Es, SheetContent as ps, SheetHeader as
|
|
17
|
-
import { LogsIcon as
|
|
18
|
-
import { useRegisteredChaiBlocks as
|
|
19
|
-
import { loadWebBlocks as
|
|
16
|
+
import { Tooltip as jt, TooltipTrigger as zt, Button as M, TooltipContent as Wt, Sheet as Es, SheetContent as ps, SheetHeader as ea, SheetTitle as ta, SheetDescription as na, DropdownMenu as vn, DropdownMenuTrigger as wn, DropdownMenuContent as bn, DropdownMenuItem as ue, Separator as sa, TooltipProvider as ys, SheetTrigger as ra, Skeleton as Ct, Dialog as As, HoverCard as aa, HoverCardTrigger as ia, HoverCardContent as oa, AlertDialog as la, AlertDialogTrigger as ca, AlertDialogContent as ua, AlertDialogHeader as da, AlertDialogTitle as fa, AlertDialogDescription as ha, AlertDialogFooter as ga, AlertDialogCancel as ma, AlertDialogAction as Ea, Popover as pa, PopoverTrigger as ya, DialogContent as Aa, DialogHeader as Ta, DialogTitle as Sa, Tabs as _a, TabsList as Pa, TabsTrigger as tn, TabsContent as nn, Textarea as Kn, Alert as va, AlertDescription as wa } from "@chaibuilder/sdk/ui";
|
|
17
|
+
import { LogsIcon as ba, Folder as Ia, Languages as Vn, ChevronDown as fn, Star as Ca, Plus as Ts, History as Na, Play as La, Palette as ka, CheckCircle as Oa, Loader as Mt, Save as Da, Send as Hn, Rocket as Qn, CopyPlusIcon as Ga, Pencil as xa, Power as Ra, Trash as Ua, SquareLibrary as $n, Hash as Ba, File as Ma, MoreHorizontal as jn, ExternalLink as Fa, LanguagesIcon as qa, User as Ka, X as zn, Trash2 as Va, ImageIcon as Wn, Code as Ha, Eye as Qa, Share2 as $a, FileCode2 as ja, AlertTriangle as za } from "lucide-react";
|
|
18
|
+
import { useRegisteredChaiBlocks as Wa, getDefaultBlockProps as Ya } from "@chaibuilder/runtime";
|
|
19
|
+
import { loadWebBlocks as Ja } from "@chaibuilder/sdk/web-blocks";
|
|
20
20
|
const E = {
|
|
21
21
|
GET_GLOBAL_JSONLD_ITEMS: "GET_GLOBAL_JSONLD_ITEMS",
|
|
22
22
|
GENERATE_SEO_FIELD: "GENERATE_SEO_FIELD",
|
|
@@ -81,10 +81,10 @@ const E = {
|
|
|
81
81
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
82
82
|
GET_ASSETS: "GET_ASSETS",
|
|
83
83
|
GET_ASSET: "GET_ASSET"
|
|
84
|
-
},
|
|
84
|
+
}, Xa = Ee({}), In = () => te(Xa), oe = (e, t) => {
|
|
85
85
|
const [n] = In();
|
|
86
|
-
return
|
|
87
|
-
}, N = () =>
|
|
86
|
+
return Q(() => V(n, e, t), [n, e, t]);
|
|
87
|
+
}, N = () => oe("apiUrl", "/chai/api"), Ss = () => oe("usersApiUrl", "/chai/users"), Ic = () => oe("assetsApiUrl", "/chai/assets"), Za = () => oe("websocket", null), _s = async (e, t, n = {}) => await fetch(e, {
|
|
88
88
|
method: "POST",
|
|
89
89
|
headers: {
|
|
90
90
|
"Content-Type": "application/json",
|
|
@@ -101,8 +101,8 @@ if (import.meta.vitest) {
|
|
|
101
101
|
t(n).toBeDefined();
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
const
|
|
105
|
-
const e =
|
|
104
|
+
const Cc = () => {
|
|
105
|
+
const e = I(), t = N();
|
|
106
106
|
return j(
|
|
107
107
|
async ({
|
|
108
108
|
body: n,
|
|
@@ -111,8 +111,8 @@ const bc = () => {
|
|
|
111
111
|
}) => e(r, n, s),
|
|
112
112
|
[e]
|
|
113
113
|
);
|
|
114
|
-
},
|
|
115
|
-
const e =
|
|
114
|
+
}, I = () => {
|
|
115
|
+
const e = oe("onLogout"), t = oe("getAccessToken"), n = N();
|
|
116
116
|
return j(
|
|
117
117
|
async (s = n, r, a = {}) => {
|
|
118
118
|
const i = await t();
|
|
@@ -126,12 +126,12 @@ const bc = () => {
|
|
|
126
126
|
if (l.status === 401)
|
|
127
127
|
return console.log("401 Response", l), e(), window.location.reload(), null;
|
|
128
128
|
if (!l.ok) {
|
|
129
|
-
const
|
|
130
|
-
throw console.error(`API Error (${l.status}):`,
|
|
129
|
+
const u = await l.json();
|
|
130
|
+
throw console.error(`API Error (${l.status}):`, u), {
|
|
131
131
|
status: l.status,
|
|
132
132
|
statusText: l.statusText,
|
|
133
|
-
...
|
|
134
|
-
message:
|
|
133
|
+
...u,
|
|
134
|
+
message: u.error || u.message || `Server error: ${l.status}`
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
137
|
return await l.json();
|
|
@@ -142,11 +142,11 @@ const bc = () => {
|
|
|
142
142
|
[e, t]
|
|
143
143
|
);
|
|
144
144
|
};
|
|
145
|
-
function
|
|
145
|
+
function le() {
|
|
146
146
|
const [e, t] = q(
|
|
147
147
|
new URLSearchParams(window.location.search)
|
|
148
148
|
);
|
|
149
|
-
return
|
|
149
|
+
return se(() => {
|
|
150
150
|
const n = () => {
|
|
151
151
|
t(new URLSearchParams(window.location.search));
|
|
152
152
|
};
|
|
@@ -156,8 +156,8 @@ function oe() {
|
|
|
156
156
|
}, []), [e, t];
|
|
157
157
|
}
|
|
158
158
|
const xe = (e) => {
|
|
159
|
-
const t = N(), [n] =
|
|
160
|
-
return
|
|
159
|
+
const t = N(), [n] = le(), s = e ?? n.get("page"), r = I();
|
|
160
|
+
return ae({
|
|
161
161
|
queryKey: [E.GET_LANGUAGE_PAGES, s],
|
|
162
162
|
staleTime: 1 / 0,
|
|
163
163
|
gcTime: 0,
|
|
@@ -168,13 +168,13 @@ const xe = (e) => {
|
|
|
168
168
|
action: E.GET_LANGUAGE_PAGES,
|
|
169
169
|
data: { id: s }
|
|
170
170
|
});
|
|
171
|
-
return
|
|
171
|
+
return vr(wr(a, "primaryPage"));
|
|
172
172
|
},
|
|
173
173
|
enabled: !!s
|
|
174
174
|
});
|
|
175
175
|
}, Re = () => {
|
|
176
|
-
const e = N(), t =
|
|
177
|
-
return
|
|
176
|
+
const e = N(), t = I();
|
|
177
|
+
return ae({
|
|
178
178
|
queryKey: [E.GET_WEBSITE_DRAFT_SETTINGS],
|
|
179
179
|
staleTime: 5 * 60 * 1e3,
|
|
180
180
|
placeholderData: {
|
|
@@ -189,16 +189,16 @@ const xe = (e) => {
|
|
|
189
189
|
})
|
|
190
190
|
});
|
|
191
191
|
}, Ps = (e) => {
|
|
192
|
-
const { fallbackLang: t } =
|
|
192
|
+
const { fallbackLang: t } = Se(), { data: n } = Re(), { data: s, isFetching: r } = xe(), a = Q(() => {
|
|
193
193
|
const i = { [t]: !0 };
|
|
194
|
-
return
|
|
195
|
-
const l =
|
|
194
|
+
return br(V(n, "languages"), (o) => {
|
|
195
|
+
const l = re(s, { lang: o });
|
|
196
196
|
i[o] = !!l;
|
|
197
197
|
}), i;
|
|
198
198
|
}, [t, s, n]);
|
|
199
199
|
return r || he(e) || e && a[e];
|
|
200
200
|
};
|
|
201
|
-
class
|
|
201
|
+
class ei {
|
|
202
202
|
constructor(t, n, s, r) {
|
|
203
203
|
Pe(this, "channelId");
|
|
204
204
|
Pe(this, "websocket");
|
|
@@ -207,25 +207,25 @@ class Xa {
|
|
|
207
207
|
Pe(this, "clientId", null);
|
|
208
208
|
Pe(this, "pageId", null);
|
|
209
209
|
Pe(this, "callback");
|
|
210
|
-
var a, i, o, l,
|
|
211
|
-
this.userId = s, this.websocket = t, this.clientId = this.getClientId(), this.channelId = `WEBSITE:${n}`, this.callback = r, this.channel = this.websocket.channel(this.channelId, { config: { presence: { key: this.clientId } } }), (
|
|
212
|
-
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC",
|
|
213
|
-
})) == null ? void 0 : i.on("presence", { event: "leave" }, (
|
|
214
|
-
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC",
|
|
215
|
-
})) == null ? void 0 : o.on("presence", { event: "join" }, (
|
|
216
|
-
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC",
|
|
210
|
+
var a, i, o, l, u, f;
|
|
211
|
+
this.userId = s, this.websocket = t, this.clientId = this.getClientId(), this.channelId = `WEBSITE:${n}`, this.callback = r, this.channel = this.websocket.channel(this.channelId, { config: { presence: { key: this.clientId } } }), (f = (u = (l = (o = (i = (a = this.channel) == null ? void 0 : a.on("presence", { event: "sync" }, (d) => {
|
|
212
|
+
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", d);
|
|
213
|
+
})) == null ? void 0 : i.on("presence", { event: "leave" }, (d) => {
|
|
214
|
+
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", d);
|
|
215
|
+
})) == null ? void 0 : o.on("presence", { event: "join" }, (d) => {
|
|
216
|
+
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", d);
|
|
217
217
|
})) == null ? void 0 : l.on(
|
|
218
218
|
"broadcast",
|
|
219
219
|
{ event: "TAKE_OVER_REQUESTED" },
|
|
220
|
-
({ payload:
|
|
221
|
-
)) == null ? void 0 :
|
|
220
|
+
({ payload: d }) => this.onReceiveEvent("TAKE_OVER_REQUESTED", d)
|
|
221
|
+
)) == null ? void 0 : u.on(
|
|
222
222
|
"broadcast",
|
|
223
223
|
{ event: "TAKE_OVER_REQUEST_ACCEPTED" },
|
|
224
|
-
({ payload:
|
|
225
|
-
)) == null ||
|
|
224
|
+
({ payload: d }) => this.onReceiveEvent("TAKE_OVER_REQUEST_ACCEPTED", d)
|
|
225
|
+
)) == null || f.on(
|
|
226
226
|
"broadcast",
|
|
227
227
|
{ event: "TAKE_OVER_REQUEST_REJECTED" },
|
|
228
|
-
({ payload:
|
|
228
|
+
({ payload: d }) => this.onReceiveEvent("TAKE_OVER_REQUEST_REJECTED", d)
|
|
229
229
|
).subscribe();
|
|
230
230
|
}
|
|
231
231
|
getClientId() {
|
|
@@ -242,10 +242,10 @@ class Xa {
|
|
|
242
242
|
return t.length > 0 ? t[0] : null;
|
|
243
243
|
}
|
|
244
244
|
getPageUserMapping() {
|
|
245
|
-
const t = this.getOnlineUsers({}), n =
|
|
245
|
+
const t = this.getOnlineUsers({}), n = Ir(t, "pageId"), s = {};
|
|
246
246
|
return Object.keys(n).forEach((r) => {
|
|
247
247
|
var i;
|
|
248
|
-
const a = (i =
|
|
248
|
+
const a = (i = Cr(n[r], "onlineAt")) == null ? void 0 : i.userId;
|
|
249
249
|
a !== this.userId && (s[r] = a);
|
|
250
250
|
}), s;
|
|
251
251
|
}
|
|
@@ -305,21 +305,21 @@ class Xa {
|
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
const
|
|
308
|
+
const ti = Ee(
|
|
309
309
|
null
|
|
310
|
-
), vs = () => te(
|
|
310
|
+
), vs = () => te(ti), Cn = () => {
|
|
311
311
|
const [e] = vs();
|
|
312
312
|
return (e == null ? void 0 : e.slug) || "";
|
|
313
313
|
};
|
|
314
|
-
function
|
|
314
|
+
function ni(e, t) {
|
|
315
315
|
const [n, s] = q(e);
|
|
316
|
-
return
|
|
316
|
+
return se(() => {
|
|
317
317
|
const r = setTimeout(() => s(e), t);
|
|
318
318
|
return () => clearTimeout(r);
|
|
319
319
|
}, [e, t]), n;
|
|
320
320
|
}
|
|
321
|
-
const
|
|
322
|
-
const { selectedLang: n, fallbackLang: s } =
|
|
321
|
+
const si = ({ query: e, uuid: t }) => {
|
|
322
|
+
const { selectedLang: n, fallbackLang: s } = Se(), { data: r } = ie(), a = r == null ? void 0 : r.pageType, i = N(), o = I(), { data: l, isFetching: u } = ae({
|
|
323
323
|
queryKey: [E.GET_DYNAMIC_PAGES, e, a, t],
|
|
324
324
|
staleTime: 60 * 60 * 1e3,
|
|
325
325
|
placeholderData: [],
|
|
@@ -328,46 +328,46 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
328
328
|
data: { query: e, pageType: a, uuid: t }
|
|
329
329
|
}) || [],
|
|
330
330
|
enabled: !!a
|
|
331
|
-
}),
|
|
332
|
-
return { allLangPages: l, data:
|
|
333
|
-
},
|
|
334
|
-
const { selectedLang: e, fallbackLang: t } =
|
|
331
|
+
}), f = Q(() => n === "" ? l.filter((d) => d.lang === "" || d.lang === s) : l.filter((d) => d.lang === n), [n, s, l]);
|
|
332
|
+
return { allLangPages: l, data: f, isFetching: u };
|
|
333
|
+
}, ri = () => {
|
|
334
|
+
const { selectedLang: e, fallbackLang: t } = Se(), [n, s] = vs(), [r, a] = q(""), i = ni(r, 500), { allLangPages: o, data: l, isFetching: u } = si({ query: i }), f = j((g) => s(g), [s]), d = j((g) => a(g), [a]), h = j(() => {
|
|
335
335
|
if (!n) return;
|
|
336
336
|
const g = !(n != null && n.primaryPage), A = e.length === 0, T = g ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, y = o.filter(
|
|
337
|
-
(
|
|
338
|
-
).find((
|
|
337
|
+
(P) => (P == null ? void 0 : P.primaryPage) === T || P.id === T
|
|
338
|
+
).find((P) => A ? P.lang === e || P.lang === t : P.lang === e);
|
|
339
339
|
s(y || n);
|
|
340
340
|
}, [n, e, o, s, t]);
|
|
341
341
|
return {
|
|
342
|
-
isFetching:
|
|
342
|
+
isFetching: u,
|
|
343
343
|
dynamicPage: n,
|
|
344
344
|
searchQuery: r,
|
|
345
345
|
selectedLang: e,
|
|
346
346
|
dynamicPages: l,
|
|
347
347
|
allLangPages: o,
|
|
348
|
-
updateDynamicPage:
|
|
349
|
-
updateSearchQuery:
|
|
348
|
+
updateDynamicPage: f,
|
|
349
|
+
updateSearchQuery: d,
|
|
350
350
|
onChangeLanguage: h
|
|
351
351
|
};
|
|
352
|
-
},
|
|
353
|
-
const [e] =
|
|
354
|
-
return { data:
|
|
352
|
+
}, ai = Ee({ lastSaved: void 0 }), Nn = () => te(ai), ie = () => {
|
|
353
|
+
const [e] = le(), t = e.get("page"), { data: n, isFetching: s } = xe();
|
|
354
|
+
return { data: Q(() => ({ ...re(n, { id: t }) || {} }), [n, t]), isFetching: s };
|
|
355
355
|
}, be = () => {
|
|
356
|
-
const [e] =
|
|
357
|
-
return { data:
|
|
358
|
-
},
|
|
359
|
-
const { data: e } = be(), t = Cn(), n =
|
|
356
|
+
const [e] = le(), t = e.get("lang") ?? "", { data: n, isFetching: s } = xe();
|
|
357
|
+
return { data: Q(() => re(n, { lang: t }) || {}, [n, t]), isFetching: s };
|
|
358
|
+
}, ii = Ee({}), oi = () => te(ii), li = () => {
|
|
359
|
+
const { data: e } = be(), t = Cn(), n = oe("getLiveUrl", ds), s = e == null ? void 0 : e.slug, r = n(s || "/");
|
|
360
360
|
return t ? r + t : r;
|
|
361
361
|
}, Yt = () => {
|
|
362
|
-
const e =
|
|
362
|
+
const e = oe("currentUser"), t = oe("onLogout");
|
|
363
363
|
return {
|
|
364
364
|
isLoggedIn: !!e,
|
|
365
365
|
user: e,
|
|
366
366
|
logout: t
|
|
367
367
|
};
|
|
368
|
-
},
|
|
369
|
-
const t = Ss(), n =
|
|
370
|
-
return
|
|
368
|
+
}, ci = (e) => {
|
|
369
|
+
const t = Ss(), n = I();
|
|
370
|
+
return ae({
|
|
371
371
|
queryKey: [E.GET_CHAI_USER, e],
|
|
372
372
|
queryFn: async () => {
|
|
373
373
|
const r = await n(t, {
|
|
@@ -379,14 +379,14 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
379
379
|
enabled: !he(e),
|
|
380
380
|
staleTime: "static"
|
|
381
381
|
});
|
|
382
|
-
},
|
|
382
|
+
}, ui = Ee({
|
|
383
383
|
status: "checking",
|
|
384
384
|
requestedBy: "",
|
|
385
385
|
isTakeOverRequested: !1,
|
|
386
386
|
requestingClientId: "",
|
|
387
387
|
isActiveInOtherTab: !1
|
|
388
|
-
}),
|
|
389
|
-
const [e] =
|
|
388
|
+
}), di = Ee(""), fi = Ee(null), Ln = Ee({}), Nc = () => te(Ln), Ie = () => {
|
|
389
|
+
const [e] = le(), t = e.get("page"), [n, s] = te(ui), [r, a] = te(fi), [i, o] = te(di), [l] = te(Ln);
|
|
390
390
|
return {
|
|
391
391
|
pageLock: n,
|
|
392
392
|
pageToUser: l,
|
|
@@ -399,13 +399,13 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
399
399
|
currentEditor: l[t || ""],
|
|
400
400
|
isLocked: t && n.status === "locked"
|
|
401
401
|
};
|
|
402
|
-
},
|
|
403
|
-
const e =
|
|
404
|
-
return
|
|
402
|
+
}, hi = () => {
|
|
403
|
+
const e = Za(), { data: t } = ie(), { user: n } = Yt(), s = t == null ? void 0 : t.id, { data: r } = Re(), { pageLock: a, setPageLock: i, setLockingStatus: o, realtimeInstance: l, setRealtimeInstance: u } = Ie(), [, f] = te(Ln), d = at(!1), h = at(a), g = at(!1);
|
|
404
|
+
return se(() => {
|
|
405
405
|
if (n != null && n.id && e && !l && (r != null && r.appKey) && !g.current) {
|
|
406
406
|
g.current = !0;
|
|
407
407
|
const A = async (p, y) => {
|
|
408
|
-
var
|
|
408
|
+
var P, w;
|
|
409
409
|
switch (p) {
|
|
410
410
|
/**
|
|
411
411
|
* When user joins
|
|
@@ -413,7 +413,7 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
413
413
|
* - Update page user mapping
|
|
414
414
|
*/
|
|
415
415
|
case "UPDATE_ONLINE_USERS":
|
|
416
|
-
|
|
416
|
+
f((y == null ? void 0 : y.pageToUser) || {});
|
|
417
417
|
break;
|
|
418
418
|
/**
|
|
419
419
|
* When page is locked
|
|
@@ -434,8 +434,8 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
434
434
|
* - User will be owner of this page
|
|
435
435
|
*/
|
|
436
436
|
case "USER_JOINED":
|
|
437
|
-
if (((
|
|
438
|
-
((
|
|
437
|
+
if (((P = h == null ? void 0 : h.current) == null ? void 0 : P.status) === "editing") return;
|
|
438
|
+
((w = h == null ? void 0 : h.current) == null ? void 0 : w.status) === "locked" && o("can_edit_now"), i({
|
|
439
439
|
...h == null ? void 0 : h.current,
|
|
440
440
|
requestedBy: "",
|
|
441
441
|
status: "editing",
|
|
@@ -484,20 +484,20 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
484
484
|
});
|
|
485
485
|
break;
|
|
486
486
|
}
|
|
487
|
-
}, T = new
|
|
487
|
+
}, T = new ei(
|
|
488
488
|
e,
|
|
489
489
|
r == null ? void 0 : r.appKey,
|
|
490
490
|
n == null ? void 0 : n.id,
|
|
491
491
|
A
|
|
492
492
|
);
|
|
493
|
-
|
|
493
|
+
u(T);
|
|
494
494
|
}
|
|
495
|
-
}, [
|
|
495
|
+
}, [u, e, r == null ? void 0 : r.appKey]), se(() => {
|
|
496
496
|
h.current = a;
|
|
497
|
-
}, [a]),
|
|
498
|
-
if (!(!l || !s || !(n != null && n.id) ||
|
|
499
|
-
return
|
|
500
|
-
l &&
|
|
497
|
+
}, [a]), se(() => {
|
|
498
|
+
if (!(!l || !s || !(n != null && n.id) || d.current))
|
|
499
|
+
return d.current = !0, l == null || l.joinPage(s), () => {
|
|
500
|
+
l && d.current && (d.current = !1, h.current = {
|
|
501
501
|
requestedBy: "",
|
|
502
502
|
status: "checking",
|
|
503
503
|
requestingClientId: "",
|
|
@@ -506,8 +506,8 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
506
506
|
}, o(""), i(h.current), l == null || l.leavePage());
|
|
507
507
|
};
|
|
508
508
|
}, [s, l]), a == null ? void 0 : a.status;
|
|
509
|
-
},
|
|
510
|
-
const { data: e } =
|
|
509
|
+
}, gi = () => {
|
|
510
|
+
const { data: e } = ie(), { user: t } = Yt(), n = e == null ? void 0 : e.id, { pageLock: s, setPageLock: r, realtimeInstance: a } = Ie(), { savePageAsync: i } = Ge(), o = j(() => {
|
|
511
511
|
!a || !n || !(t != null && t.id) || (r({ ...s, isTakeOverRequested: !0 }), a == null || a.sendEvent("TAKE_OVER_REQUESTED"));
|
|
512
512
|
}, [a, n, t == null ? void 0 : t.id, r, s]), l = j(async () => {
|
|
513
513
|
!a || !n || !(t != null && t.id) || (await i(), a == null || a.sendEvent("TAKE_OVER_REQUEST_ACCEPTED", {
|
|
@@ -519,7 +519,7 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
519
519
|
isActiveInOtherTab: !1,
|
|
520
520
|
isTakeOverRequested: !1
|
|
521
521
|
}));
|
|
522
|
-
}, [n, a, t == null ? void 0 : t.id, r, i, s]),
|
|
522
|
+
}, [n, a, t == null ? void 0 : t.id, r, i, s]), u = j(() => {
|
|
523
523
|
!a || !n || !(t != null && t.id) || (a == null || a.sendEvent("TAKE_OVER_REQUEST_REJECTED", {
|
|
524
524
|
requestingClientId: s == null ? void 0 : s.requestingClientId
|
|
525
525
|
}), r({
|
|
@@ -534,14 +534,14 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
534
534
|
return {
|
|
535
535
|
pageLock: s,
|
|
536
536
|
acceptTakeOver: l,
|
|
537
|
-
rejectTakeOver:
|
|
537
|
+
rejectTakeOver: u,
|
|
538
538
|
requestTakeOver: o
|
|
539
539
|
};
|
|
540
|
-
},
|
|
541
|
-
const { pageLock: t, requestTakeOver: n } =
|
|
540
|
+
}, mi = K(() => import("./no-language-page-content-CtN5VB9K.js")), Ei = K(() => import("./page-locked-by-dialog-BQV9X0UF.js")), sn = K(() => import("./page-lock-request-01G9AeVF.js")), pi = ({ isFetchingPage: e }) => {
|
|
541
|
+
const { pageLock: t, requestTakeOver: n } = gi(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ie(), { data: o, isFetching: l } = ci(s), [u] = le(), f = u.get("page"), [d] = Nn(), h = W(), g = j(() => {
|
|
542
542
|
n();
|
|
543
543
|
}, [n]);
|
|
544
|
-
return !
|
|
544
|
+
return !f || e || !i || (t == null ? void 0 : t.status) === "checking" ? null : t != null && t.requestedBy ? /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
545
545
|
sn,
|
|
546
546
|
{
|
|
547
547
|
lockingStatus: "",
|
|
@@ -560,21 +560,21 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
562
|
) }) : null : t != null && t.isActiveInOtherTab ? /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(sn, { lockingStatus: "page_is_active_in_other_tab", onContinue: n }) }) : /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
563
|
-
|
|
563
|
+
Ei,
|
|
564
564
|
{
|
|
565
565
|
...o,
|
|
566
566
|
isFetchingUserInfo: l,
|
|
567
567
|
name: (o == null ? void 0 : o.name) || "Unknown User",
|
|
568
568
|
email: (o == null ? void 0 : o.email) || "",
|
|
569
|
-
lastSaved: (
|
|
569
|
+
lastSaved: (d == null ? void 0 : d.lastSaved) || "",
|
|
570
570
|
onTakeOver: g,
|
|
571
571
|
realtimePageLockEnabled: i,
|
|
572
572
|
isRequestRejected: r === "take_over_request_rejected"
|
|
573
573
|
}
|
|
574
574
|
) });
|
|
575
|
-
},
|
|
576
|
-
const [e] =
|
|
577
|
-
return Ps(t) ? null : /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
575
|
+
}, yi = () => {
|
|
576
|
+
const [e] = le(), t = e.get("lang");
|
|
577
|
+
return Ps(t) ? null : /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(mi, {}) });
|
|
578
578
|
}, Nt = {
|
|
579
579
|
ab: "Abkhazian",
|
|
580
580
|
aa: "Afar",
|
|
@@ -770,46 +770,46 @@ function ws(e, t, n = !1) {
|
|
|
770
770
|
}
|
|
771
771
|
const kn = Ee(null), On = () => {
|
|
772
772
|
const { data: e } = Re();
|
|
773
|
-
return
|
|
773
|
+
return Q(
|
|
774
774
|
() => (e == null ? void 0 : e.fallbackLang) || "en",
|
|
775
775
|
[e]
|
|
776
776
|
);
|
|
777
777
|
}, bs = () => {
|
|
778
|
-
const e =
|
|
779
|
-
return
|
|
778
|
+
const e = I(), t = N();
|
|
779
|
+
return ae({
|
|
780
780
|
queryKey: [E.GET_WEBSITE_PAGES],
|
|
781
781
|
staleTime: 1e3 * 60 * 5,
|
|
782
782
|
queryFn: async () => e(t, { action: E.GET_WEBSITE_PAGES }) || [],
|
|
783
783
|
placeholderData: (n) => n || []
|
|
784
784
|
});
|
|
785
|
-
},
|
|
786
|
-
const t =
|
|
787
|
-
return
|
|
785
|
+
}, Lc = (e) => {
|
|
786
|
+
const t = I(), n = N(), s = On();
|
|
787
|
+
return ae({
|
|
788
788
|
queryKey: [E.GET_WEBSITE_PAGES, e, s],
|
|
789
789
|
staleTime: 1e3 * 60 * 5,
|
|
790
790
|
enabled: !!e,
|
|
791
791
|
queryFn: async () => {
|
|
792
792
|
if (s === e) return {};
|
|
793
793
|
const r = await t(n, { action: E.GET_WEBSITE_PAGES, data: { lang: e } }) || [];
|
|
794
|
-
return
|
|
794
|
+
return Nr(
|
|
795
795
|
Ut(r, (a) => ({ ...a, lang: e })),
|
|
796
796
|
"primaryPage"
|
|
797
797
|
);
|
|
798
798
|
},
|
|
799
799
|
placeholderData: (r) => r || {}
|
|
800
800
|
});
|
|
801
|
-
},
|
|
802
|
-
const { t } = we(), [n, s] =
|
|
801
|
+
}, Ai = K(() => import("./page-manager-new-DE_2H_ow.js")), Is = ({ children: e }) => {
|
|
802
|
+
const { t } = we(), [n, s] = le(), r = n.get("page"), { data: a, isFetching: i } = ie(), { data: o, isFetching: l } = bs(), [u, f] = q(!1), [d, h] = q(!0), { savePage: g } = Ge(), A = !!r && !he(a), T = Q(() => {
|
|
803
803
|
if (!o || l) return !1;
|
|
804
|
-
const
|
|
805
|
-
return
|
|
804
|
+
const w = o.find((O) => O.slug === "/");
|
|
805
|
+
return w == null ? void 0 : w.id;
|
|
806
806
|
}, [o, l]);
|
|
807
|
-
|
|
807
|
+
se(() => {
|
|
808
808
|
if (l || !T || o.some((B) => B.id === r)) return;
|
|
809
809
|
const O = new URLSearchParams({ page: T });
|
|
810
810
|
ws(O, s), !l && o && h(!1);
|
|
811
811
|
}, [r, l, o, T, s]);
|
|
812
|
-
const p = !
|
|
812
|
+
const p = !d && !r, y = !d && !i && he(a), P = u || p || y;
|
|
813
813
|
return /* @__PURE__ */ m(ge, { children: [
|
|
814
814
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ c("div", { className: "relative", children: /* @__PURE__ */ m(jt, { children: [
|
|
815
815
|
/* @__PURE__ */ c(
|
|
@@ -817,55 +817,55 @@ const kn = Ee(null), On = () => {
|
|
|
817
817
|
{
|
|
818
818
|
asChild: !0,
|
|
819
819
|
onClick: () => {
|
|
820
|
-
g(),
|
|
820
|
+
g(), f(!0);
|
|
821
821
|
},
|
|
822
|
-
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(
|
|
822
|
+
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(ba, { className: "h-4 w-4" }) }, "template-viewer")
|
|
823
823
|
}
|
|
824
824
|
),
|
|
825
825
|
/* @__PURE__ */ c(Wt, { side: "right", children: /* @__PURE__ */ c("p", { children: t("Open pages manager") }) })
|
|
826
826
|
] }) }) }),
|
|
827
|
-
/* @__PURE__ */ c(Es, { open:
|
|
827
|
+
/* @__PURE__ */ c(Es, { open: P, onOpenChange: (w) => !w && A && f(!1), children: /* @__PURE__ */ m(
|
|
828
828
|
ps,
|
|
829
829
|
{
|
|
830
830
|
side: "left",
|
|
831
831
|
"aria-describedby": "pages-manager-description",
|
|
832
832
|
className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${A ? "" : "sheet-hide-close-btn"}`,
|
|
833
833
|
children: [
|
|
834
|
-
/* @__PURE__ */ m(
|
|
835
|
-
/* @__PURE__ */ m(
|
|
836
|
-
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(
|
|
834
|
+
/* @__PURE__ */ m(ea, { className: "mb-3 px-4 pt-4", children: [
|
|
835
|
+
/* @__PURE__ */ m(ta, { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
836
|
+
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(Ia, { className: "h-4 w-4" }) }),
|
|
837
837
|
/* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
838
838
|
/* @__PURE__ */ c("span", { className: "text-sm font-semibold", children: t("Pages") }),
|
|
839
839
|
/* @__PURE__ */ c("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: t("Manage your site structure") })
|
|
840
840
|
] })
|
|
841
841
|
] }),
|
|
842
|
-
/* @__PURE__ */ c(
|
|
842
|
+
/* @__PURE__ */ c(na, { className: "sr-only", children: t("Manage your site structure") })
|
|
843
843
|
] }),
|
|
844
|
-
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children:
|
|
844
|
+
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: P && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(Ai, { close: () => f(!1) }) }) })
|
|
845
845
|
]
|
|
846
846
|
}
|
|
847
847
|
) })
|
|
848
848
|
] });
|
|
849
|
-
},
|
|
850
|
-
const e =
|
|
851
|
-
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children:
|
|
852
|
-
},
|
|
849
|
+
}, Ti = K(() => import("./add-new-language-page-3fFJlIi4.js")), Si = () => {
|
|
850
|
+
const e = oe("topLeftCorner", null);
|
|
851
|
+
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Mr.createElement(e, {}) }) : null;
|
|
852
|
+
}, _i = ({
|
|
853
853
|
showAdd: e = !0,
|
|
854
854
|
variant: t = "ghost"
|
|
855
855
|
}) => {
|
|
856
|
-
const { fallbackLang: n, languages: s, selectedLang: r, setSelectedLang: a } =
|
|
857
|
-
|
|
856
|
+
const { fallbackLang: n, languages: s, selectedLang: r, setSelectedLang: a } = Se(), i = he(r) ? n : r, [, o] = le(), { isLocked: l } = Ie();
|
|
857
|
+
se(() => {
|
|
858
858
|
const p = new URLSearchParams(window.location.search), y = p.get("lang");
|
|
859
859
|
y && (s.includes(y) ? a(y) : (p.delete("lang"), o(p), a("")));
|
|
860
860
|
}, [s, o, a]);
|
|
861
|
-
const [,
|
|
861
|
+
const [, u] = te(kn), { data: f } = ie(), { data: d } = Re(), { data: h } = xe(), g = Q(() => {
|
|
862
862
|
const p = fs(
|
|
863
|
-
Ut(V(
|
|
864
|
-
const
|
|
863
|
+
Ut(V(d, "languages"), (y) => {
|
|
864
|
+
const P = re(h, { lang: y });
|
|
865
865
|
return {
|
|
866
866
|
key: y,
|
|
867
867
|
value: V(Nt, y, y),
|
|
868
|
-
isLangPageAdded: !!
|
|
868
|
+
isLangPageAdded: !!P
|
|
869
869
|
};
|
|
870
870
|
})
|
|
871
871
|
).filter(Boolean);
|
|
@@ -877,16 +877,16 @@ const kn = Ee(null), On = () => {
|
|
|
877
877
|
},
|
|
878
878
|
...p
|
|
879
879
|
];
|
|
880
|
-
}, [n, h,
|
|
880
|
+
}, [n, h, d]), A = (p) => {
|
|
881
881
|
if (document.querySelector('[data-panel-id="seo"]')) {
|
|
882
|
-
const
|
|
882
|
+
const P = new CustomEvent("seo-language-switch-check", {
|
|
883
883
|
detail: {
|
|
884
884
|
fromLang: i,
|
|
885
885
|
toLang: p,
|
|
886
886
|
switchHandler: () => T(p)
|
|
887
887
|
}
|
|
888
888
|
});
|
|
889
|
-
window.dispatchEvent(
|
|
889
|
+
window.dispatchEvent(P);
|
|
890
890
|
return;
|
|
891
891
|
}
|
|
892
892
|
T(p);
|
|
@@ -918,7 +918,7 @@ const kn = Ee(null), On = () => {
|
|
|
918
918
|
Ut(
|
|
919
919
|
g.filter((p) => p.isLangPageAdded),
|
|
920
920
|
(p) => /* @__PURE__ */ m(
|
|
921
|
-
|
|
921
|
+
ue,
|
|
922
922
|
{
|
|
923
923
|
className: Bt(
|
|
924
924
|
"flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
|
|
@@ -928,7 +928,7 @@ const kn = Ee(null), On = () => {
|
|
|
928
928
|
children: [
|
|
929
929
|
/* @__PURE__ */ c("div", { className: "text-slate-600", children: p.value }),
|
|
930
930
|
p.key === n && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
|
|
931
|
-
/* @__PURE__ */ c(
|
|
931
|
+
/* @__PURE__ */ c(Ca, { fill: "orange", className: "h-2 w-2" }),
|
|
932
932
|
"Primary"
|
|
933
933
|
] })
|
|
934
934
|
]
|
|
@@ -937,16 +937,16 @@ const kn = Ee(null), On = () => {
|
|
|
937
937
|
)
|
|
938
938
|
),
|
|
939
939
|
e && !he(g.filter((p) => !p.isLangPageAdded)) && /* @__PURE__ */ m(ge, { children: [
|
|
940
|
-
/* @__PURE__ */ c(
|
|
940
|
+
/* @__PURE__ */ c(sa, {}),
|
|
941
941
|
/* @__PURE__ */ m(
|
|
942
942
|
M,
|
|
943
943
|
{
|
|
944
944
|
size: "sm",
|
|
945
945
|
variant: "ghost",
|
|
946
946
|
onClick: () => {
|
|
947
|
-
|
|
947
|
+
f && u({
|
|
948
948
|
edit: !1,
|
|
949
|
-
primaryPage:
|
|
949
|
+
primaryPage: f.id
|
|
950
950
|
});
|
|
951
951
|
},
|
|
952
952
|
className: "text-xs font-normal duration-200 hover:bg-slate-300 hover:text-slate-800",
|
|
@@ -960,13 +960,13 @@ const kn = Ee(null), On = () => {
|
|
|
960
960
|
] })
|
|
961
961
|
] }) });
|
|
962
962
|
};
|
|
963
|
-
function
|
|
963
|
+
function Pi() {
|
|
964
964
|
const [e, t] = te(kn);
|
|
965
965
|
return /* @__PURE__ */ m("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
|
|
966
|
-
/* @__PURE__ */ c(
|
|
966
|
+
/* @__PURE__ */ c(Si, {}),
|
|
967
967
|
/* @__PURE__ */ c(Is, {}),
|
|
968
968
|
e && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
969
|
-
|
|
969
|
+
Ti,
|
|
970
970
|
{
|
|
971
971
|
isOpen: !0,
|
|
972
972
|
id: e == null ? void 0 : e.id,
|
|
@@ -978,7 +978,7 @@ function Si() {
|
|
|
978
978
|
) })
|
|
979
979
|
] });
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function vi() {
|
|
982
982
|
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: [
|
|
983
983
|
/* @__PURE__ */ m("div", { className: "flex-1 space-y-1", children: [
|
|
984
984
|
/* @__PURE__ */ c(Ct, { className: "h-4 w-3/4" }),
|
|
@@ -988,19 +988,19 @@ function _i() {
|
|
|
988
988
|
/* @__PURE__ */ c(Ct, { className: "h-8 w-8 rounded-full" })
|
|
989
989
|
] }, t)) });
|
|
990
990
|
}
|
|
991
|
-
const
|
|
992
|
-
function
|
|
991
|
+
const wi = z.lazy(() => import("./page-revisions-content-mih9gx3J.js"));
|
|
992
|
+
function bi() {
|
|
993
993
|
const [e, t] = z.useState(!1);
|
|
994
994
|
return /* @__PURE__ */ c(ys, { children: /* @__PURE__ */ m(jt, { delayDuration: 0, children: [
|
|
995
995
|
/* @__PURE__ */ m(Es, { open: e, onOpenChange: t, children: [
|
|
996
|
-
/* @__PURE__ */ c(
|
|
996
|
+
/* @__PURE__ */ c(ra, { asChild: !0, children: /* @__PURE__ */ c(zt, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
|
|
997
997
|
/* @__PURE__ */ m(M, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
|
|
998
|
-
/* @__PURE__ */ c(
|
|
998
|
+
/* @__PURE__ */ c(Na, { className: "h-4 w-4" }),
|
|
999
999
|
/* @__PURE__ */ c("span", { className: "sr-only", children: "View revision history" })
|
|
1000
1000
|
] }),
|
|
1001
1001
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1002
1002
|
] }) }) }),
|
|
1003
|
-
/* @__PURE__ */ c(ps, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(H, { fallback: /* @__PURE__ */ c(
|
|
1003
|
+
/* @__PURE__ */ c(ps, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(H, { fallback: /* @__PURE__ */ c(vi, {}), children: /* @__PURE__ */ c(wi, { isOpen: e }) }) })
|
|
1004
1004
|
] }),
|
|
1005
1005
|
/* @__PURE__ */ c(Wt, { side: "bottom", children: /* @__PURE__ */ c("p", { children: "Revision history" }) })
|
|
1006
1006
|
] }) });
|
|
@@ -1013,21 +1013,21 @@ const rn = ({
|
|
|
1013
1013
|
}) => {
|
|
1014
1014
|
const { hasPermission: r } = ms();
|
|
1015
1015
|
return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
|
|
1016
|
-
},
|
|
1016
|
+
}, Ii = {
|
|
1017
1017
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
1018
1018
|
}, Ce = () => {
|
|
1019
|
-
const e = N(), t =
|
|
1020
|
-
return
|
|
1019
|
+
const e = N(), t = I();
|
|
1020
|
+
return ae({
|
|
1021
1021
|
queryKey: [E.GET_PAGE_TYPES],
|
|
1022
1022
|
staleTime: 1 / 0,
|
|
1023
1023
|
placeholderData: [],
|
|
1024
1024
|
queryFn: async () => t(e, { action: E.GET_PAGE_TYPES })
|
|
1025
1025
|
});
|
|
1026
|
-
},
|
|
1026
|
+
}, Ci = (e) => {
|
|
1027
1027
|
const { data: t } = Ce();
|
|
1028
|
-
return
|
|
1029
|
-
},
|
|
1030
|
-
const e = N(), t =
|
|
1028
|
+
return Q(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
|
|
1029
|
+
}, Ni = () => {
|
|
1030
|
+
const e = N(), t = I();
|
|
1031
1031
|
return X({
|
|
1032
1032
|
mutationFn: async ({ pageType: n, query: s }) => {
|
|
1033
1033
|
try {
|
|
@@ -1043,8 +1043,8 @@ const rn = ({
|
|
|
1043
1043
|
}
|
|
1044
1044
|
}
|
|
1045
1045
|
});
|
|
1046
|
-
},
|
|
1047
|
-
const e = N(), t = W(), n =
|
|
1046
|
+
}, kc = () => {
|
|
1047
|
+
const e = N(), t = W(), n = I(), { data: s } = Ce();
|
|
1048
1048
|
return X({
|
|
1049
1049
|
mutationFn: async (r) => await n(e, {
|
|
1050
1050
|
action: E.CREATE_PAGE,
|
|
@@ -1059,18 +1059,18 @@ const rn = ({
|
|
|
1059
1059
|
})) : t.invalidateQueries({
|
|
1060
1060
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1061
1061
|
});
|
|
1062
|
-
const i = a.template ? `Page created from "${a.template.name}" template` : a.hasSlug === !1 ? "New " + ((o =
|
|
1062
|
+
const i = a.template ? `Page created from "${a.template.name}" template` : a.hasSlug === !1 ? "New " + ((o = re(s, { key: a.pageType })) == null ? void 0 : o.name) + " added successfully" : "New page added successfully";
|
|
1063
1063
|
R.success(i);
|
|
1064
1064
|
},
|
|
1065
1065
|
onError: (r, a) => {
|
|
1066
|
-
const i =
|
|
1066
|
+
const i = re(s, { key: a.pageType });
|
|
1067
1067
|
R.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1068
|
-
description: V(
|
|
1068
|
+
description: V(Ii, r.message, r.message)
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
1071
|
});
|
|
1072
|
-
},
|
|
1073
|
-
const e = N(), t = W(), n =
|
|
1072
|
+
}, Oc = () => {
|
|
1073
|
+
const e = N(), t = W(), n = I(), { data: s } = be(), { data: r } = Ce();
|
|
1074
1074
|
return X({
|
|
1075
1075
|
mutationFn: async (a) => await n(e, {
|
|
1076
1076
|
action: E.UPDATE_PAGE,
|
|
@@ -1088,14 +1088,14 @@ const rn = ({
|
|
|
1088
1088
|
});
|
|
1089
1089
|
},
|
|
1090
1090
|
onError: (a, i) => {
|
|
1091
|
-
const o =
|
|
1091
|
+
const o = re(r, { key: i.pageType });
|
|
1092
1092
|
R.error(`Failed to update ${o != null && o.hasSlug ? "page" : o.name}.`, {
|
|
1093
1093
|
description: a.message
|
|
1094
1094
|
});
|
|
1095
1095
|
}
|
|
1096
1096
|
});
|
|
1097
|
-
},
|
|
1098
|
-
const e = N(), t = W(), n =
|
|
1097
|
+
}, Dc = () => {
|
|
1098
|
+
const e = N(), t = W(), n = I(), { data: s } = Ce();
|
|
1099
1099
|
return X({
|
|
1100
1100
|
mutationFn: async (r) => n(e, {
|
|
1101
1101
|
action: E.DELETE_PAGE,
|
|
@@ -1117,14 +1117,14 @@ const rn = ({
|
|
|
1117
1117
|
});
|
|
1118
1118
|
},
|
|
1119
1119
|
onError: (r, a) => {
|
|
1120
|
-
const i =
|
|
1120
|
+
const i = re(s, { key: a.pageType });
|
|
1121
1121
|
R.error(`Failed to delete ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1122
1122
|
description: r.message
|
|
1123
1123
|
});
|
|
1124
1124
|
}
|
|
1125
1125
|
});
|
|
1126
|
-
},
|
|
1127
|
-
const e = N(), t = W(), n =
|
|
1126
|
+
}, Gc = () => {
|
|
1127
|
+
const e = N(), t = W(), n = I(), { data: s } = Ce();
|
|
1128
1128
|
return X({
|
|
1129
1129
|
mutationFn: async (r) => n(e, {
|
|
1130
1130
|
action: E.TAKE_OFFLINE,
|
|
@@ -1136,20 +1136,20 @@ const rn = ({
|
|
|
1136
1136
|
}) : t.invalidateQueries({
|
|
1137
1137
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1138
1138
|
});
|
|
1139
|
-
const i =
|
|
1139
|
+
const i = re(s, { key: a.pageType });
|
|
1140
1140
|
R.success(
|
|
1141
1141
|
i != null && i.hasSlug ? "Page unpublished successfully." : "New " + i.name + " added successfully."
|
|
1142
1142
|
);
|
|
1143
1143
|
},
|
|
1144
1144
|
onError: (r, a) => {
|
|
1145
|
-
const i =
|
|
1145
|
+
const i = re(s, { key: a.pageType });
|
|
1146
1146
|
R.error(`Failed to take offline ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1147
1147
|
description: r.message
|
|
1148
1148
|
});
|
|
1149
1149
|
}
|
|
1150
1150
|
});
|
|
1151
1151
|
}, Cs = () => {
|
|
1152
|
-
const e = N(), t =
|
|
1152
|
+
const e = N(), t = I(), n = W(), { data: s } = ie(), { savePageAsync: r } = Ge();
|
|
1153
1153
|
return X({
|
|
1154
1154
|
mutationFn: async ({ ids: a }) => (await r(), t(e, {
|
|
1155
1155
|
action: E.PUBLISH_CHANGES,
|
|
@@ -1168,8 +1168,8 @@ const rn = ({
|
|
|
1168
1168
|
console.log("##", a), R.error("Failed to publish pages.");
|
|
1169
1169
|
}
|
|
1170
1170
|
});
|
|
1171
|
-
},
|
|
1172
|
-
const e = N(), t =
|
|
1171
|
+
}, xc = () => {
|
|
1172
|
+
const e = N(), t = I(), n = W();
|
|
1173
1173
|
return X({
|
|
1174
1174
|
mutationFn: async (s) => {
|
|
1175
1175
|
var r;
|
|
@@ -1193,8 +1193,8 @@ const rn = ({
|
|
|
1193
1193
|
R.error("Failed to mark page as template.");
|
|
1194
1194
|
}
|
|
1195
1195
|
});
|
|
1196
|
-
},
|
|
1197
|
-
const e = N(), t =
|
|
1196
|
+
}, Rc = () => {
|
|
1197
|
+
const e = N(), t = I(), n = W();
|
|
1198
1198
|
return X({
|
|
1199
1199
|
mutationFn: async (s) => t(e, {
|
|
1200
1200
|
action: E.UNMARK_AS_TEMPLATE,
|
|
@@ -1209,8 +1209,8 @@ const rn = ({
|
|
|
1209
1209
|
R.error("Failed to unmark page as template.");
|
|
1210
1210
|
}
|
|
1211
1211
|
});
|
|
1212
|
-
},
|
|
1213
|
-
const e = N(), t =
|
|
1212
|
+
}, Uc = () => {
|
|
1213
|
+
const e = N(), t = I(), n = W();
|
|
1214
1214
|
return X({
|
|
1215
1215
|
mutationFn: async ({ id: s, slug: r }) => t(e, {
|
|
1216
1216
|
action: E.CHANGE_SLUG,
|
|
@@ -1227,17 +1227,17 @@ const rn = ({
|
|
|
1227
1227
|
R.error("Failed to change slug");
|
|
1228
1228
|
}
|
|
1229
1229
|
});
|
|
1230
|
-
},
|
|
1231
|
-
function
|
|
1230
|
+
}, Li = K(() => import("./publish-pages-content-jYi-Q1Vl.js"));
|
|
1231
|
+
function ki({
|
|
1232
1232
|
showModal: e = !1,
|
|
1233
1233
|
onClose: t = () => console.log("Cancelled")
|
|
1234
1234
|
}) {
|
|
1235
1235
|
const { mutate: n, isPending: s } = Cs();
|
|
1236
1236
|
return /* @__PURE__ */ c(As, { open: e, onOpenChange: s ? () => {
|
|
1237
|
-
} : t, children: e && /* @__PURE__ */ c(H, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(
|
|
1237
|
+
} : t, children: e && /* @__PURE__ */ c(H, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(Li, { onClose: t, isPending: s, publishPage: n }) }) });
|
|
1238
1238
|
}
|
|
1239
|
-
const
|
|
1240
|
-
...
|
|
1239
|
+
const ce = {
|
|
1240
|
+
...Hr,
|
|
1241
1241
|
//pages
|
|
1242
1242
|
ADD_PAGE: "add_page",
|
|
1243
1243
|
EDIT_PAGE: "edit_page",
|
|
@@ -1273,12 +1273,12 @@ const ue = {
|
|
|
1273
1273
|
ADD_MEDIA: "add_media",
|
|
1274
1274
|
EDIT_MEDIA: "edit_media",
|
|
1275
1275
|
DELETE_MEDIA: "delete_media"
|
|
1276
|
-
},
|
|
1276
|
+
}, Oi = {
|
|
1277
1277
|
particleCount: 350,
|
|
1278
1278
|
spread: 120,
|
|
1279
1279
|
origin: { y: 0.6 },
|
|
1280
1280
|
angle: 90
|
|
1281
|
-
},
|
|
1281
|
+
}, Di = {
|
|
1282
1282
|
TOP_RIGHT: {
|
|
1283
1283
|
angle: 225,
|
|
1284
1284
|
origin: { x: 0.9, y: 0 }
|
|
@@ -1287,14 +1287,14 @@ const ue = {
|
|
|
1287
1287
|
angle: 100,
|
|
1288
1288
|
origin: { x: 0.9, y: 0.9 }
|
|
1289
1289
|
}
|
|
1290
|
-
},
|
|
1290
|
+
}, Gi = async () => {
|
|
1291
1291
|
const { default: e } = await import("./confetti.module-DCmCkDyV.js");
|
|
1292
1292
|
return e;
|
|
1293
1293
|
}, an = (e) => {
|
|
1294
|
-
let t =
|
|
1294
|
+
let t = Di[e];
|
|
1295
1295
|
t || (t = {});
|
|
1296
|
-
const n = { ...
|
|
1297
|
-
|
|
1296
|
+
const n = { ...Oi, ...t };
|
|
1297
|
+
Gi().then((s) => s(n));
|
|
1298
1298
|
};
|
|
1299
1299
|
function Dn({
|
|
1300
1300
|
children: e,
|
|
@@ -1308,30 +1308,30 @@ function Dn({
|
|
|
1308
1308
|
/* @__PURE__ */ c(Wt, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
|
|
1309
1309
|
] }) }) : e;
|
|
1310
1310
|
}
|
|
1311
|
-
const
|
|
1312
|
-
const { t: e } = we(), { selectedLang: t, fallbackLang: n } =
|
|
1311
|
+
const xi = K(() => import("./unpublish-page-COPOrCk_.js")), Ri = K(() => import("./translation-warning-modal-DalBhNQy.js")), Ui = () => {
|
|
1312
|
+
const { t: e } = we(), { selectedLang: t, fallbackLang: n } = Se(), s = oe("getPreviewUrl", async (h) => h), [r, a] = q(""), { data: i } = ie(), { data: o } = xe(), { data: l } = Ce(), u = Q(
|
|
1313
1313
|
() => {
|
|
1314
1314
|
var h;
|
|
1315
1315
|
return (h = o == null ? void 0 : o.find((g) => (g == null ? void 0 : g.lang) === t)) == null ? void 0 : h.slug;
|
|
1316
1316
|
},
|
|
1317
1317
|
[t, o]
|
|
1318
|
-
),
|
|
1318
|
+
), f = j((h) => {
|
|
1319
1319
|
var g;
|
|
1320
|
-
return (g =
|
|
1321
|
-
}, [l]),
|
|
1322
|
-
return
|
|
1320
|
+
return (g = re(l, { key: h })) == null ? void 0 : g.hasSlug;
|
|
1321
|
+
}, [l]), d = t === n ? "" : t;
|
|
1322
|
+
return se(() => {
|
|
1323
1323
|
(async () => {
|
|
1324
1324
|
if (typeof s == "function") {
|
|
1325
|
-
const h = !
|
|
1326
|
-
h ? `${
|
|
1325
|
+
const h = !f(i == null ? void 0 : i.pageType), g = await s(
|
|
1326
|
+
h ? `${d !== "" ? d + "/" : ""}${i == null ? void 0 : i.id}` : u || ""
|
|
1327
1327
|
);
|
|
1328
1328
|
a(g);
|
|
1329
1329
|
} else
|
|
1330
1330
|
a("");
|
|
1331
1331
|
})();
|
|
1332
|
-
}, [s,
|
|
1333
|
-
},
|
|
1334
|
-
const { t: e } = we(), [t, n] =
|
|
1332
|
+
}, [s, u, i == null ? void 0 : i.pageType, f, i == null ? void 0 : i.id, d]), /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ c(Dn, { 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(La, { className: "h-4 w-4" }) }) }) }) });
|
|
1333
|
+
}, Bi = () => {
|
|
1334
|
+
const { t: e } = we(), [t, n] = Qr();
|
|
1335
1335
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1336
1336
|
/* @__PURE__ */ c(Dn, { content: e("Theme"), delayDuration: 0, children: /* @__PURE__ */ c(
|
|
1337
1337
|
M,
|
|
@@ -1340,29 +1340,29 @@ const Di = K(() => import("./unpublish-page-BucQ2Q3Z.js")), Gi = K(() => import(
|
|
|
1340
1340
|
size: "icon",
|
|
1341
1341
|
className: "gap-2",
|
|
1342
1342
|
onClick: () => n(t === "theme" ? "block" : "theme"),
|
|
1343
|
-
children: /* @__PURE__ */ c(
|
|
1343
|
+
children: /* @__PURE__ */ c(ka, { className: "h-4 w-4" })
|
|
1344
1344
|
}
|
|
1345
1345
|
) }),
|
|
1346
1346
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1347
1347
|
] });
|
|
1348
|
-
},
|
|
1348
|
+
}, Mi = () => {
|
|
1349
1349
|
const { t: e } = we(), [t, n] = q(!1), { isLocked: s } = Ie(), { savePageAsync: r, saveState: a } = Ge();
|
|
1350
|
-
|
|
1351
|
-
const
|
|
1352
|
-
a === "UNSAVED" && (
|
|
1350
|
+
se(() => {
|
|
1351
|
+
const f = (d) => {
|
|
1352
|
+
a === "UNSAVED" && (d.preventDefault(), d.returnValue = !1);
|
|
1353
1353
|
};
|
|
1354
|
-
return a === "UNSAVED" && window.addEventListener("beforeunload",
|
|
1355
|
-
window.removeEventListener("beforeunload",
|
|
1354
|
+
return a === "UNSAVED" && window.addEventListener("beforeunload", f), () => {
|
|
1355
|
+
window.removeEventListener("beforeunload", f);
|
|
1356
1356
|
};
|
|
1357
1357
|
}, [a]);
|
|
1358
1358
|
const i = j(async () => {
|
|
1359
1359
|
t || (n(!0), await r(), n(!1));
|
|
1360
|
-
}, [r, t]), { buttonIcon: o, buttonClass: l, tooltipContent:
|
|
1360
|
+
}, [r, t]), { buttonIcon: o, buttonClass: l, tooltipContent: u } = Q(() => {
|
|
1361
1361
|
switch (a) {
|
|
1362
1362
|
case "UNSAVED":
|
|
1363
1363
|
return {
|
|
1364
1364
|
tooltipContent: e("Save draft"),
|
|
1365
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1365
|
+
buttonIcon: /* @__PURE__ */ c(Da, { className: "h-4 w-4" }),
|
|
1366
1366
|
buttonClass: "gap-x-1"
|
|
1367
1367
|
};
|
|
1368
1368
|
case "SAVING":
|
|
@@ -1374,7 +1374,7 @@ const Di = K(() => import("./unpublish-page-BucQ2Q3Z.js")), Gi = K(() => import(
|
|
|
1374
1374
|
case "SAVED":
|
|
1375
1375
|
return {
|
|
1376
1376
|
tooltipContent: e("Saved"),
|
|
1377
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1377
|
+
buttonIcon: /* @__PURE__ */ c(Oa, { className: "h-4 w-4" }),
|
|
1378
1378
|
buttonClass: "text-green-500 gap-x-1"
|
|
1379
1379
|
};
|
|
1380
1380
|
}
|
|
@@ -1382,10 +1382,10 @@ const Di = K(() => import("./unpublish-page-BucQ2Q3Z.js")), Gi = K(() => import(
|
|
|
1382
1382
|
return s ? null : /* @__PURE__ */ m(M, { size: "sm", variant: "ghost", onClick: i, className: `${l} w-24 max-w-24`, children: [
|
|
1383
1383
|
o,
|
|
1384
1384
|
" ",
|
|
1385
|
-
|
|
1385
|
+
u
|
|
1386
1386
|
] });
|
|
1387
|
-
},
|
|
1388
|
-
const { t: e } = we(), { selectedLang: t } =
|
|
1387
|
+
}, Fi = () => {
|
|
1388
|
+
const { t: e } = we(), { selectedLang: t } = Se(), { data: n } = be(), { data: s } = xe(), [r, a] = q(!1), [i, o] = q(!1), [l, u] = q(null), { savePageAsync: f } = Ge(), [d, h] = q(!1), { data: g } = ie(), { mutate: A, isPending: T } = Cs(), { needTranslations: p } = Ge(), y = p(), { buttonText: P, buttonClassName: w, isPublished: O } = Q(() => {
|
|
1389
1389
|
const v = g && (g == null ? void 0 : g.online);
|
|
1390
1390
|
return {
|
|
1391
1391
|
buttonClassName: v ? "hover:bg-green-600 bg-green-500" : "",
|
|
@@ -1404,8 +1404,8 @@ const Di = K(() => import("./unpublish-page-BucQ2Q3Z.js")), Gi = K(() => import(
|
|
|
1404
1404
|
}, pe = () => {
|
|
1405
1405
|
h(!1), L();
|
|
1406
1406
|
}, ye = async () => {
|
|
1407
|
-
h(!1), await
|
|
1408
|
-
}, U =
|
|
1407
|
+
h(!1), await f();
|
|
1408
|
+
}, U = Q(() => Ut(s ?? [], "id"), [s]);
|
|
1409
1409
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1410
1410
|
/* @__PURE__ */ m("div", { className: "flex", children: [
|
|
1411
1411
|
/* @__PURE__ */ m(
|
|
@@ -1414,7 +1414,7 @@ const Di = K(() => import("./unpublish-page-BucQ2Q3Z.js")), Gi = K(() => import(
|
|
|
1414
1414
|
size: "sm",
|
|
1415
1415
|
onClick: B,
|
|
1416
1416
|
disabled: T || !(g != null && g.id),
|
|
1417
|
-
className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${
|
|
1417
|
+
className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${w}`,
|
|
1418
1418
|
onMouseEnter: () => o(!0),
|
|
1419
1419
|
onMouseLeave: () => o(!1),
|
|
1420
1420
|
children: [
|
|
@@ -1432,7 +1432,7 @@ const Di = K(() => import("./unpublish-page-BucQ2Q3Z.js")), Gi = K(() => import(
|
|
|
1432
1432
|
children: O ? /* @__PURE__ */ c(Qn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Hn, { className: "h-4 w-4" })
|
|
1433
1433
|
}
|
|
1434
1434
|
),
|
|
1435
|
-
/* @__PURE__ */ c("span", { children:
|
|
1435
|
+
/* @__PURE__ */ c("span", { children: P }),
|
|
1436
1436
|
t ? `(${Mn(t)})` : ""
|
|
1437
1437
|
]
|
|
1438
1438
|
}
|
|
@@ -1443,13 +1443,13 @@ const Di = K(() => import("./unpublish-page-BucQ2Q3Z.js")), Gi = K(() => import(
|
|
|
1443
1443
|
{
|
|
1444
1444
|
size: "sm",
|
|
1445
1445
|
disabled: T || !(g != null && g.id),
|
|
1446
|
-
className: `rounded-l-none border-l border-white/50 px-2 text-white ${
|
|
1446
|
+
className: `rounded-l-none border-l border-white/50 px-2 text-white ${w}`,
|
|
1447
1447
|
children: /* @__PURE__ */ c(fn, { className: "h-4 w-4" })
|
|
1448
1448
|
}
|
|
1449
1449
|
) }),
|
|
1450
1450
|
/* @__PURE__ */ m(bn, { align: "end", className: "w-52", children: [
|
|
1451
1451
|
/* @__PURE__ */ m(
|
|
1452
|
-
|
|
1452
|
+
ue,
|
|
1453
1453
|
{
|
|
1454
1454
|
disabled: T,
|
|
1455
1455
|
className: "cursor-pointer text-xs",
|
|
@@ -1461,7 +1461,7 @@ const Di = K(() => import("./unpublish-page-BucQ2Q3Z.js")), Gi = K(() => import(
|
|
|
1461
1461
|
}
|
|
1462
1462
|
),
|
|
1463
1463
|
!O && /* @__PURE__ */ m(
|
|
1464
|
-
|
|
1464
|
+
ue,
|
|
1465
1465
|
{
|
|
1466
1466
|
disabled: T,
|
|
1467
1467
|
className: "cursor-pointer text-xs",
|
|
@@ -1472,11 +1472,11 @@ const Di = K(() => import("./unpublish-page-BucQ2Q3Z.js")), Gi = K(() => import(
|
|
|
1472
1472
|
]
|
|
1473
1473
|
}
|
|
1474
1474
|
),
|
|
1475
|
-
/* @__PURE__ */ m(
|
|
1475
|
+
/* @__PURE__ */ m(ue, { onClick: () => a(!0), className: "cursor-pointer text-xs", children: [
|
|
1476
1476
|
e("Open"),
|
|
1477
1477
|
" publish menu"
|
|
1478
1478
|
] }),
|
|
1479
|
-
O && /* @__PURE__ */ m(
|
|
1479
|
+
O && /* @__PURE__ */ m(ue, { onClick: () => u(n), className: "cursor-pointer text-xs", children: [
|
|
1480
1480
|
e("Unpublish"),
|
|
1481
1481
|
" page ",
|
|
1482
1482
|
t ? `(${Mn(t)})` : ""
|
|
@@ -1484,12 +1484,12 @@ const Di = K(() => import("./unpublish-page-BucQ2Q3Z.js")), Gi = K(() => import(
|
|
|
1484
1484
|
] })
|
|
1485
1485
|
] })
|
|
1486
1486
|
] }),
|
|
1487
|
-
/* @__PURE__ */ c(
|
|
1488
|
-
l && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1489
|
-
|
|
1490
|
-
|
|
1487
|
+
/* @__PURE__ */ c(ki, { showModal: r, onClose: () => a(!1) }),
|
|
1488
|
+
l && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(xi, { page: l, onClose: () => u(null) }) }),
|
|
1489
|
+
d && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1490
|
+
Ri,
|
|
1491
1491
|
{
|
|
1492
|
-
isOpen:
|
|
1492
|
+
isOpen: d,
|
|
1493
1493
|
onClose: ye,
|
|
1494
1494
|
onContinue: pe,
|
|
1495
1495
|
isPending: T
|
|
@@ -1497,17 +1497,17 @@ const Di = K(() => import("./unpublish-page-BucQ2Q3Z.js")), Gi = K(() => import(
|
|
|
1497
1497
|
) })
|
|
1498
1498
|
] });
|
|
1499
1499
|
};
|
|
1500
|
-
function
|
|
1501
|
-
const { isLocked: e } = Ie(), [t] =
|
|
1500
|
+
function qi() {
|
|
1501
|
+
const { isLocked: e } = Ie(), [t] = le(), n = t.get("lang"), s = Ps(n);
|
|
1502
1502
|
return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1503
|
-
/* @__PURE__ */ c(
|
|
1504
|
-
/* @__PURE__ */ c(rn, { permission:
|
|
1505
|
-
/* @__PURE__ */ c(
|
|
1506
|
-
/* @__PURE__ */ c(rn, { permission:
|
|
1507
|
-
/* @__PURE__ */ c(rn, { permission:
|
|
1503
|
+
/* @__PURE__ */ c(bi, {}),
|
|
1504
|
+
/* @__PURE__ */ c(rn, { permission: ce.EDIT_THEME, children: /* @__PURE__ */ c(Bi, {}) }),
|
|
1505
|
+
/* @__PURE__ */ c(Ui, {}),
|
|
1506
|
+
/* @__PURE__ */ c(rn, { permission: ce.SAVE_PAGE, children: /* @__PURE__ */ c(Mi, {}) }),
|
|
1507
|
+
/* @__PURE__ */ c(rn, { permission: ce.PUBLISH_PAGE, children: /* @__PURE__ */ c(Fi, {}) })
|
|
1508
1508
|
] });
|
|
1509
1509
|
}
|
|
1510
|
-
const
|
|
1510
|
+
const Ki = ({
|
|
1511
1511
|
page: e,
|
|
1512
1512
|
setDuplicatePage: t,
|
|
1513
1513
|
setAddEditPage: n,
|
|
@@ -1518,25 +1518,25 @@ const Fi = ({
|
|
|
1518
1518
|
children: o,
|
|
1519
1519
|
isLanguagePage: l
|
|
1520
1520
|
}) => {
|
|
1521
|
-
const { t:
|
|
1522
|
-
return !
|
|
1521
|
+
const { t: u } = we(), { hasPermission: f } = ms(), { data: d } = Ce(), h = Q(() => re(d, { key: e.pageType }), [d, e.pageType]), g = Q(() => !!e.isTemplate, [e.isTemplate]), A = Q(() => !!(h != null && h.hasSlug), [h == null ? void 0 : h.hasSlug]);
|
|
1522
|
+
return !f(ce.EDIT_PAGE) && !f(ce.DELETE_PAGE) && !f(ce.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ m(vn, { children: [
|
|
1523
1523
|
/* @__PURE__ */ c(wn, { asChild: !0, onClick: (p) => p.stopPropagation(), children: o }),
|
|
1524
1524
|
/* @__PURE__ */ m(bn, { align: "center", className: "text-sm", children: [
|
|
1525
|
-
|
|
1526
|
-
|
|
1525
|
+
f(ce.ADD_PAGE) && !l && /* @__PURE__ */ m(
|
|
1526
|
+
ue,
|
|
1527
1527
|
{
|
|
1528
1528
|
className: "flex cursor-pointer items-center gap-2",
|
|
1529
1529
|
onClick: (p) => {
|
|
1530
1530
|
p.stopPropagation(), t(e);
|
|
1531
1531
|
},
|
|
1532
1532
|
children: [
|
|
1533
|
-
/* @__PURE__ */ c(
|
|
1533
|
+
/* @__PURE__ */ c(Ga, { className: "size-3" }),
|
|
1534
1534
|
"Duplicate page"
|
|
1535
1535
|
]
|
|
1536
1536
|
}
|
|
1537
1537
|
),
|
|
1538
|
-
|
|
1539
|
-
|
|
1538
|
+
f(ce.EDIT_PAGE) && /* @__PURE__ */ m(
|
|
1539
|
+
ue,
|
|
1540
1540
|
{
|
|
1541
1541
|
className: "flex cursor-pointer items-center gap-2",
|
|
1542
1542
|
onClick: (p) => {
|
|
@@ -1546,39 +1546,39 @@ const Fi = ({
|
|
|
1546
1546
|
});
|
|
1547
1547
|
},
|
|
1548
1548
|
children: [
|
|
1549
|
-
/* @__PURE__ */ c(
|
|
1549
|
+
/* @__PURE__ */ c(xa, { className: "size-3" }),
|
|
1550
1550
|
"Edit"
|
|
1551
1551
|
]
|
|
1552
1552
|
}
|
|
1553
1553
|
),
|
|
1554
|
-
(e == null ? void 0 : e.online) &&
|
|
1555
|
-
|
|
1554
|
+
(e == null ? void 0 : e.online) && f(ce.UNPUBLISH_PAGE) && /* @__PURE__ */ m(
|
|
1555
|
+
ue,
|
|
1556
1556
|
{
|
|
1557
1557
|
className: "flex cursor-pointer items-center gap-2",
|
|
1558
1558
|
onClick: (p) => {
|
|
1559
1559
|
p.stopPropagation(), s(e);
|
|
1560
1560
|
},
|
|
1561
1561
|
children: [
|
|
1562
|
-
/* @__PURE__ */ c(
|
|
1563
|
-
|
|
1562
|
+
/* @__PURE__ */ c(Ra, { className: "size-3" }),
|
|
1563
|
+
u("Unpublish")
|
|
1564
1564
|
]
|
|
1565
1565
|
}
|
|
1566
1566
|
),
|
|
1567
|
-
|
|
1568
|
-
|
|
1567
|
+
f(ce.DELETE_PAGE) && /* @__PURE__ */ m(
|
|
1568
|
+
ue,
|
|
1569
1569
|
{
|
|
1570
1570
|
className: "flex cursor-pointer items-center gap-2",
|
|
1571
1571
|
onClick: (p) => {
|
|
1572
1572
|
p.stopPropagation(), r(e);
|
|
1573
1573
|
},
|
|
1574
1574
|
children: [
|
|
1575
|
-
/* @__PURE__ */ c(
|
|
1576
|
-
|
|
1575
|
+
/* @__PURE__ */ c(Ua, { className: "size-3" }),
|
|
1576
|
+
u("Delete")
|
|
1577
1577
|
]
|
|
1578
1578
|
}
|
|
1579
1579
|
),
|
|
1580
|
-
|
|
1581
|
-
|
|
1580
|
+
f(ce.MARK_AS_TEMPLATE) && A && !l && /* @__PURE__ */ c(ge, { children: g ? /* @__PURE__ */ m(
|
|
1581
|
+
ue,
|
|
1582
1582
|
{
|
|
1583
1583
|
className: "flex cursor-pointer items-center gap-2",
|
|
1584
1584
|
onClick: (p) => {
|
|
@@ -1586,11 +1586,11 @@ const Fi = ({
|
|
|
1586
1586
|
},
|
|
1587
1587
|
children: [
|
|
1588
1588
|
/* @__PURE__ */ c($n, { className: "size-3" }),
|
|
1589
|
-
|
|
1589
|
+
u("Unmark as template")
|
|
1590
1590
|
]
|
|
1591
1591
|
}
|
|
1592
1592
|
) : /* @__PURE__ */ m(
|
|
1593
|
-
|
|
1593
|
+
ue,
|
|
1594
1594
|
{
|
|
1595
1595
|
className: "flex cursor-pointer items-center gap-2",
|
|
1596
1596
|
onClick: (p) => {
|
|
@@ -1598,21 +1598,21 @@ const Fi = ({
|
|
|
1598
1598
|
},
|
|
1599
1599
|
children: [
|
|
1600
1600
|
/* @__PURE__ */ c($n, { className: "size-3" }),
|
|
1601
|
-
|
|
1601
|
+
u("Mark as template")
|
|
1602
1602
|
]
|
|
1603
1603
|
}
|
|
1604
1604
|
) })
|
|
1605
1605
|
] })
|
|
1606
1606
|
] });
|
|
1607
|
-
},
|
|
1608
|
-
const [e, t] = q(null), [n, s] = q(null), [r, a] = q(null), [i, o] = q(null), [l,
|
|
1607
|
+
}, Vi = K(() => import("./add-new-page-C-DdGfOJ.js")), Hi = K(() => import("./delete-page-X6KE9Snl.js")), Qi = K(() => import("./duplicate-page-Bwp0RTTE.js")), $i = K(() => import("./mark-as-template-XIeQkqPw.js")), ji = K(() => import("./unmark-as-template-Dezq0GEM.js")), zi = K(() => import("./unpublish-page-COPOrCk_.js")), Wi = () => {
|
|
1608
|
+
const [e, t] = q(null), [n, s] = q(null), [r, a] = q(null), [i, o] = q(null), [l, u] = q(null), [f, d] = q(null), { data: h, isFetching: g } = be(), { selectedLang: A, fallbackLang: T } = Se(), { data: p } = xe(), y = p == null ? void 0 : p.find((L) => L.lang === A), { isLocked: P } = Ie(), w = !(h != null && h.slug), [, O] = te(kn);
|
|
1609
1609
|
if (!h) return null;
|
|
1610
1610
|
const B = (L) => {
|
|
1611
1611
|
A.length > 0 && A !== T ? O({
|
|
1612
1612
|
edit: !0,
|
|
1613
1613
|
id: L == null ? void 0 : L.id,
|
|
1614
1614
|
primaryPage: L == null ? void 0 : L.primaryPage
|
|
1615
|
-
}) :
|
|
1615
|
+
}) : d(L);
|
|
1616
1616
|
};
|
|
1617
1617
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1618
1618
|
/* @__PURE__ */ m("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
|
|
@@ -1622,12 +1622,12 @@ const Fi = ({
|
|
|
1622
1622
|
className: "flex h-7 max-w-[200px] cursor-pointer items-center truncate rounded px-1 text-xs font-medium",
|
|
1623
1623
|
variant: "ghost",
|
|
1624
1624
|
children: g ? /* @__PURE__ */ c(Mt, { 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: [
|
|
1625
|
-
|
|
1625
|
+
w ? /* @__PURE__ */ c(Ba, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Ma, { className: "mr-1 h-4 w-4" }),
|
|
1626
1626
|
V(y || h, "name") ?? ""
|
|
1627
1627
|
] })
|
|
1628
1628
|
}
|
|
1629
1629
|
) }),
|
|
1630
|
-
|
|
1630
|
+
P ? /* @__PURE__ */ c(
|
|
1631
1631
|
M,
|
|
1632
1632
|
{
|
|
1633
1633
|
variant: "ghost",
|
|
@@ -1636,10 +1636,10 @@ const Fi = ({
|
|
|
1636
1636
|
children: /* @__PURE__ */ c(jn, { className: "h-4 w-4" })
|
|
1637
1637
|
}
|
|
1638
1638
|
) : /* @__PURE__ */ c(
|
|
1639
|
-
|
|
1639
|
+
Ki,
|
|
1640
1640
|
{
|
|
1641
1641
|
page: h,
|
|
1642
|
-
setDuplicatePage: (L) =>
|
|
1642
|
+
setDuplicatePage: (L) => u(L),
|
|
1643
1643
|
setAddEditPage: (L) => B(L),
|
|
1644
1644
|
setUnpublishPage: (L) => s(L),
|
|
1645
1645
|
setDeletePage: (L) => t(L),
|
|
@@ -1650,26 +1650,26 @@ const Fi = ({
|
|
|
1650
1650
|
}
|
|
1651
1651
|
)
|
|
1652
1652
|
] }),
|
|
1653
|
-
|
|
1654
|
-
|
|
1653
|
+
f && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1654
|
+
Vi,
|
|
1655
1655
|
{
|
|
1656
|
-
closePanel: () =>
|
|
1656
|
+
closePanel: () => d(null),
|
|
1657
1657
|
editPage: () => {
|
|
1658
1658
|
},
|
|
1659
|
-
addEditPage:
|
|
1660
|
-
setAddEditPage:
|
|
1659
|
+
addEditPage: f,
|
|
1660
|
+
setAddEditPage: d
|
|
1661
1661
|
}
|
|
1662
1662
|
) }),
|
|
1663
|
-
e && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1664
|
-
n && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1665
|
-
r && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1666
|
-
i && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1663
|
+
e && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(Hi, { page: e, onClose: () => t(null) }) }),
|
|
1664
|
+
n && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(zi, { page: n, onClose: () => s(null) }) }),
|
|
1665
|
+
r && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c($i, { page: r, onClose: () => a(null) }) }),
|
|
1666
|
+
i && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(ji, { page: i, onClose: () => o(null) }) }),
|
|
1667
1667
|
l && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1668
|
-
|
|
1668
|
+
Qi,
|
|
1669
1669
|
{
|
|
1670
1670
|
page: l,
|
|
1671
|
-
onClose: () =>
|
|
1672
|
-
closePanel: () =>
|
|
1671
|
+
onClose: () => u(null),
|
|
1672
|
+
closePanel: () => d(null)
|
|
1673
1673
|
}
|
|
1674
1674
|
) })
|
|
1675
1675
|
] });
|
|
@@ -1682,26 +1682,26 @@ const Fi = ({
|
|
|
1682
1682
|
),
|
|
1683
1683
|
children: e
|
|
1684
1684
|
}
|
|
1685
|
-
),
|
|
1685
|
+
), Yi = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(Ns, { 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: [
|
|
1686
1686
|
/* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
|
|
1687
1687
|
/* @__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" })
|
|
1688
|
-
] }) }),
|
|
1689
|
-
const { dynamicPage: e, allLangPages: t, isFetching: n } =
|
|
1688
|
+
] }) }), Ji = K(() => import("./dynamic-page-selector-Vl0aOeHK.js")), Xi = () => {
|
|
1689
|
+
const { dynamicPage: e, allLangPages: t, isFetching: n } = ri(), s = t.length > 0;
|
|
1690
1690
|
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1691
|
-
!e && /* @__PURE__ */ c(
|
|
1692
|
-
/* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1691
|
+
!e && /* @__PURE__ */ c(Yi, { hasDynamicPage: s }),
|
|
1692
|
+
/* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(Ji, {}) })
|
|
1693
1693
|
] });
|
|
1694
|
-
},
|
|
1695
|
-
const { data: e, isFetching: t } = be(), { data: n, isFetching: s } =
|
|
1694
|
+
}, Zi = () => {
|
|
1695
|
+
const { data: e, isFetching: t } = be(), { data: n, isFetching: s } = ie(), r = V(n, "dynamic", !1), a = Cn(), i = $r("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, u = li(), f = t || s, h = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
|
|
1696
1696
|
return /* @__PURE__ */ m("div", { className: "relative flex items-center gap-x-1", children: [
|
|
1697
1697
|
/* @__PURE__ */ c(
|
|
1698
1698
|
"div",
|
|
1699
1699
|
{
|
|
1700
1700
|
className: Bt(
|
|
1701
1701
|
"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",
|
|
1702
|
-
|
|
1702
|
+
f && "max-w-0 overflow-hidden opacity-0"
|
|
1703
1703
|
),
|
|
1704
|
-
children: /* @__PURE__ */ c(
|
|
1704
|
+
children: /* @__PURE__ */ c(Wi, {})
|
|
1705
1705
|
}
|
|
1706
1706
|
),
|
|
1707
1707
|
/* @__PURE__ */ m(
|
|
@@ -1709,10 +1709,10 @@ const Fi = ({
|
|
|
1709
1709
|
{
|
|
1710
1710
|
className: Bt(
|
|
1711
1711
|
"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" + (l ? " pr-2" : ""),
|
|
1712
|
-
|
|
1712
|
+
f && "max-w-0 overflow-hidden opacity-0"
|
|
1713
1713
|
),
|
|
1714
1714
|
children: [
|
|
1715
|
-
/* @__PURE__ */ c(
|
|
1715
|
+
/* @__PURE__ */ c(_i, {}),
|
|
1716
1716
|
/* @__PURE__ */ m("div", { className: "flex w-full items-center overflow-hidden", children: [
|
|
1717
1717
|
/* @__PURE__ */ c(
|
|
1718
1718
|
"div",
|
|
@@ -1724,19 +1724,19 @@ const Fi = ({
|
|
|
1724
1724
|
] }) : h
|
|
1725
1725
|
}
|
|
1726
1726
|
),
|
|
1727
|
-
!l && /* @__PURE__ */ c("a", { href:
|
|
1727
|
+
!l && /* @__PURE__ */ c("a", { href: u, 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(Fa, { className: "h-4 w-4", strokeWidth: 1 }) }) })
|
|
1728
1728
|
] })
|
|
1729
1729
|
]
|
|
1730
1730
|
}
|
|
1731
1731
|
),
|
|
1732
|
-
r && i && /* @__PURE__ */ c(
|
|
1732
|
+
r && i && /* @__PURE__ */ c(Xi, {})
|
|
1733
1733
|
] });
|
|
1734
|
-
},
|
|
1735
|
-
/* @__PURE__ */ c(
|
|
1736
|
-
/* @__PURE__ */ c(
|
|
1737
|
-
/* @__PURE__ */ c(
|
|
1734
|
+
}, eo = () => /* @__PURE__ */ m("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
|
|
1735
|
+
/* @__PURE__ */ c(Pi, {}),
|
|
1736
|
+
/* @__PURE__ */ c(Zi, {}),
|
|
1737
|
+
/* @__PURE__ */ c(qi, {})
|
|
1738
1738
|
] }), Ls = () => {
|
|
1739
|
-
const e = W(), { data: t } =
|
|
1739
|
+
const e = W(), { data: t } = ae({
|
|
1740
1740
|
queryKey: [E.AI_CONTEXT],
|
|
1741
1741
|
initialData: "",
|
|
1742
1742
|
queryFn: () => "",
|
|
@@ -1748,8 +1748,8 @@ const Fi = ({
|
|
|
1748
1748
|
},
|
|
1749
1749
|
[e]
|
|
1750
1750
|
), aiContext: t };
|
|
1751
|
-
},
|
|
1752
|
-
const e = N(), { aiContext: t } = Ls(), n =
|
|
1751
|
+
}, to = () => {
|
|
1752
|
+
const e = N(), { aiContext: t } = Ls(), n = I();
|
|
1753
1753
|
return j(
|
|
1754
1754
|
async (s, r, a, i) => n(e, {
|
|
1755
1755
|
action: E.ASK_AI,
|
|
@@ -1757,37 +1757,37 @@ const Fi = ({
|
|
|
1757
1757
|
}),
|
|
1758
1758
|
[e, t, n]
|
|
1759
1759
|
);
|
|
1760
|
-
},
|
|
1760
|
+
}, no = (e, t) => t.map((n) => {
|
|
1761
1761
|
if ($t(e, n._type)) {
|
|
1762
|
-
const s =
|
|
1762
|
+
const s = Ya(n._type);
|
|
1763
1763
|
return {
|
|
1764
1764
|
...s,
|
|
1765
1765
|
...Pn(n, [
|
|
1766
|
-
...
|
|
1766
|
+
...kr(s),
|
|
1767
1767
|
"_type",
|
|
1768
1768
|
"_id",
|
|
1769
1769
|
"_name",
|
|
1770
1770
|
"_parent",
|
|
1771
1771
|
"_bindings"
|
|
1772
1772
|
]),
|
|
1773
|
-
...
|
|
1773
|
+
...Or(n, (r, a) => Dr(a, "_attrs")),
|
|
1774
1774
|
...n
|
|
1775
1775
|
};
|
|
1776
1776
|
}
|
|
1777
1777
|
return n;
|
|
1778
|
-
}),
|
|
1779
|
-
const t =
|
|
1780
|
-
return
|
|
1778
|
+
}), so = (e) => {
|
|
1779
|
+
const t = Wa();
|
|
1780
|
+
return Q(() => {
|
|
1781
1781
|
if (!e || he(e)) return { blocks: [] };
|
|
1782
1782
|
const n = hs(
|
|
1783
1783
|
e,
|
|
1784
|
-
(s) => !
|
|
1784
|
+
(s) => !Lr(s == null ? void 0 : s._type, "@chai/")
|
|
1785
1785
|
);
|
|
1786
|
-
return { blocks:
|
|
1786
|
+
return { blocks: no(t, n) };
|
|
1787
1787
|
}, [e, t]);
|
|
1788
|
-
},
|
|
1789
|
-
const [e] =
|
|
1790
|
-
return
|
|
1788
|
+
}, ro = () => {
|
|
1789
|
+
const [e] = le(), t = e.get("page"), n = N(), { setAiContext: s } = Ls(), [, r] = Nn(), [, a] = oi(), [, i] = jr(), o = I();
|
|
1790
|
+
return ae({
|
|
1791
1791
|
queryKey: [E.GET_DRAFT_PAGE, t],
|
|
1792
1792
|
staleTime: 1 / 0,
|
|
1793
1793
|
gcTime: 0,
|
|
@@ -1796,14 +1796,14 @@ const Fi = ({
|
|
|
1796
1796
|
const l = await o(n, {
|
|
1797
1797
|
action: E.GET_DRAFT_PAGE,
|
|
1798
1798
|
data: { id: t, draft: !0 }
|
|
1799
|
-
}),
|
|
1800
|
-
return s(V(
|
|
1799
|
+
}), u = l.blocks ?? [], f = re(u, { _type: "@chai/ai-context" });
|
|
1800
|
+
return s(V(f, "_value", "") || ""), r((d) => ({ ...d, lastSaved: l.lastSaved })), a(V(l, "metadata", {})), setTimeout(() => i(!0), 500), u;
|
|
1801
1801
|
},
|
|
1802
1802
|
enabled: !!t
|
|
1803
1803
|
});
|
|
1804
|
-
},
|
|
1805
|
-
const { data: e } =
|
|
1806
|
-
return
|
|
1804
|
+
}, ao = () => {
|
|
1805
|
+
const { data: e } = ie(), { data: t } = be(), n = N(), s = I(), r = On(), a = Cn();
|
|
1806
|
+
return ae({
|
|
1807
1807
|
queryKey: [E.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
|
|
1808
1808
|
staleTime: 1 / 0,
|
|
1809
1809
|
gcTime: 0,
|
|
@@ -1831,8 +1831,8 @@ const Fi = ({
|
|
|
1831
1831
|
}),
|
|
1832
1832
|
enabled: !!(e != null && e.pageType) && !!t.id
|
|
1833
1833
|
});
|
|
1834
|
-
},
|
|
1835
|
-
const e = N(), t = W(), n =
|
|
1834
|
+
}, io = () => {
|
|
1835
|
+
const e = N(), t = W(), n = I();
|
|
1836
1836
|
return X({
|
|
1837
1837
|
mutationFn: async (s) => n(e, {
|
|
1838
1838
|
action: E.UPDATE_WEBSITE_SETTINGS,
|
|
@@ -1850,8 +1850,8 @@ const Fi = ({
|
|
|
1850
1850
|
});
|
|
1851
1851
|
}
|
|
1852
1852
|
});
|
|
1853
|
-
},
|
|
1854
|
-
const e = N(), t = W(), n =
|
|
1853
|
+
}, Bc = () => {
|
|
1854
|
+
const e = N(), t = W(), n = I(), { selectedLang: s } = Se();
|
|
1855
1855
|
return X({
|
|
1856
1856
|
mutationFn: async (r) => n(e, { action: E.ADD_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1857
1857
|
onSuccess: () => {
|
|
@@ -1865,8 +1865,8 @@ const Fi = ({
|
|
|
1865
1865
|
});
|
|
1866
1866
|
}
|
|
1867
1867
|
});
|
|
1868
|
-
},
|
|
1869
|
-
const e = N(), t = W(), n =
|
|
1868
|
+
}, Mc = () => {
|
|
1869
|
+
const e = N(), t = W(), n = I(), { selectedLang: s } = Se();
|
|
1870
1870
|
return X({
|
|
1871
1871
|
mutationFn: async (r) => n(e, { action: E.UPDATE_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1872
1872
|
onSuccess: () => {
|
|
@@ -1880,8 +1880,8 @@ const Fi = ({
|
|
|
1880
1880
|
});
|
|
1881
1881
|
}
|
|
1882
1882
|
});
|
|
1883
|
-
},
|
|
1884
|
-
const e = N(), t = W(), n =
|
|
1883
|
+
}, Fc = () => {
|
|
1884
|
+
const e = N(), t = W(), n = I();
|
|
1885
1885
|
return X({
|
|
1886
1886
|
mutationFn: async (s) => n(e, { action: E.DELETE_GLOBAL_SCHEMA, data: { id: s } }),
|
|
1887
1887
|
onSuccess: () => {
|
|
@@ -1895,8 +1895,8 @@ const Fi = ({
|
|
|
1895
1895
|
});
|
|
1896
1896
|
}
|
|
1897
1897
|
});
|
|
1898
|
-
},
|
|
1899
|
-
const e = N(), t =
|
|
1898
|
+
}, qc = () => {
|
|
1899
|
+
const e = N(), t = I();
|
|
1900
1900
|
return X({
|
|
1901
1901
|
mutationFn: async (n) => t(e, { action: E.TOGGLE_PAGE_GLOBAL_SCHEMA, data: n }),
|
|
1902
1902
|
onError: (n) => {
|
|
@@ -1905,8 +1905,8 @@ const Fi = ({
|
|
|
1905
1905
|
});
|
|
1906
1906
|
}
|
|
1907
1907
|
});
|
|
1908
|
-
},
|
|
1909
|
-
const e = N(), t =
|
|
1908
|
+
}, Kc = () => {
|
|
1909
|
+
const e = N(), t = I();
|
|
1910
1910
|
return X({
|
|
1911
1911
|
mutationFn: async (n) => t(e, { action: E.APPLY_SCHEMA_TO_ALL_PAGES, data: { schemaId: n } }),
|
|
1912
1912
|
onSuccess: (n) => {
|
|
@@ -1918,8 +1918,8 @@ const Fi = ({
|
|
|
1918
1918
|
});
|
|
1919
1919
|
}
|
|
1920
1920
|
});
|
|
1921
|
-
},
|
|
1922
|
-
const e = N(), t =
|
|
1921
|
+
}, Vc = () => {
|
|
1922
|
+
const e = N(), t = I();
|
|
1923
1923
|
return X({
|
|
1924
1924
|
mutationFn: async (n) => t(e, { action: E.REMOVE_SCHEMA_FROM_ALL_PAGES, data: { schemaId: n } }),
|
|
1925
1925
|
onSuccess: (n) => {
|
|
@@ -1937,7 +1937,7 @@ const Fi = ({
|
|
|
1937
1937
|
action: "GET_LIBRARY_ITEM",
|
|
1938
1938
|
data: { id: e.id }
|
|
1939
1939
|
}), r = V(s, "html", ""), a = V(s, "blocks", []);
|
|
1940
|
-
return
|
|
1940
|
+
return Gr(a) ? a : Wr(r);
|
|
1941
1941
|
},
|
|
1942
1942
|
async getUILibraryBlocks(e, t, n) {
|
|
1943
1943
|
try {
|
|
@@ -1951,9 +1951,9 @@ const Fi = ({
|
|
|
1951
1951
|
return console.error(s), [];
|
|
1952
1952
|
}
|
|
1953
1953
|
}
|
|
1954
|
-
},
|
|
1955
|
-
const e = N(), t =
|
|
1956
|
-
return
|
|
1954
|
+
}, oo = () => {
|
|
1955
|
+
const e = N(), t = I();
|
|
1956
|
+
return ae({
|
|
1957
1957
|
queryKey: ["uiLibraries"],
|
|
1958
1958
|
staleTime: "static",
|
|
1959
1959
|
queryFn: async () => {
|
|
@@ -1961,7 +1961,7 @@ const Fi = ({
|
|
|
1961
1961
|
...r
|
|
1962
1962
|
}));
|
|
1963
1963
|
return s.forEach((r) => {
|
|
1964
|
-
|
|
1964
|
+
zr(r.id, {
|
|
1965
1965
|
name: r.isSiteLibrary ? r.name + " (Current Site) " : r.name,
|
|
1966
1966
|
description: r.description,
|
|
1967
1967
|
getBlocksList: (a) => Yn.getUILibraryBlocks(a, t, e),
|
|
@@ -1970,9 +1970,9 @@ const Fi = ({
|
|
|
1970
1970
|
}), s;
|
|
1971
1971
|
}
|
|
1972
1972
|
});
|
|
1973
|
-
},
|
|
1974
|
-
const e = Ss(), t =
|
|
1975
|
-
return
|
|
1973
|
+
}, lo = () => {
|
|
1974
|
+
const e = Ss(), t = I(), { user: n } = Yt(), s = n == null ? void 0 : n.id;
|
|
1975
|
+
return ae({
|
|
1976
1976
|
queryKey: [E.GET_ROLE_AND_PERMISSIONS, s],
|
|
1977
1977
|
queryFn: () => t(e, {
|
|
1978
1978
|
action: E.GET_ROLE_AND_PERMISSIONS,
|
|
@@ -1981,8 +1981,8 @@ const Fi = ({
|
|
|
1981
1981
|
enabled: !!s,
|
|
1982
1982
|
staleTime: 1 / 0
|
|
1983
1983
|
});
|
|
1984
|
-
},
|
|
1985
|
-
const e = N(), t =
|
|
1984
|
+
}, co = () => {
|
|
1985
|
+
const e = N(), t = I(), [, n] = Nn();
|
|
1986
1986
|
return { onSave: async ({
|
|
1987
1987
|
page: r,
|
|
1988
1988
|
blocks: a,
|
|
@@ -2001,15 +2001,15 @@ const Fi = ({
|
|
|
2001
2001
|
return console.error(o), new Error("Failed to save blocks");
|
|
2002
2002
|
}
|
|
2003
2003
|
} };
|
|
2004
|
-
},
|
|
2005
|
-
const { data: e } = bs(), t = N(), n =
|
|
2004
|
+
}, uo = () => {
|
|
2005
|
+
const { data: e } = bs(), t = N(), n = I();
|
|
2006
2006
|
return {
|
|
2007
2007
|
getPartialBlocks: j(async () => {
|
|
2008
2008
|
const s = {};
|
|
2009
2009
|
for (const r of e ?? [])
|
|
2010
2010
|
he(r == null ? void 0 : r.slug) && (s[r.id] = {
|
|
2011
2011
|
type: r.pageType,
|
|
2012
|
-
name:
|
|
2012
|
+
name: xr(r.name ?? r.slug),
|
|
2013
2013
|
description: ""
|
|
2014
2014
|
});
|
|
2015
2015
|
return s;
|
|
@@ -2030,19 +2030,19 @@ const Fi = ({
|
|
|
2030
2030
|
[n, t]
|
|
2031
2031
|
)
|
|
2032
2032
|
};
|
|
2033
|
-
},
|
|
2033
|
+
}, fo = K(() => import("./lang-panel-CaOkz8d3.js")), ho = ({ isActive: e, show: t }) => {
|
|
2034
2034
|
const { data: n } = Re();
|
|
2035
|
-
return !$t(n, "languages") || !V(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(
|
|
2036
|
-
}, ks = "lang",
|
|
2035
|
+
return !$t(n, "languages") || !V(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(qa, { className: "h-4 w-4" }) });
|
|
2036
|
+
}, ks = "lang", go = {
|
|
2037
2037
|
id: ks,
|
|
2038
2038
|
label: "Languages",
|
|
2039
2039
|
position: "top",
|
|
2040
|
-
panel:
|
|
2041
|
-
button:
|
|
2040
|
+
panel: fo,
|
|
2041
|
+
button: ho,
|
|
2042
2042
|
view: "modal",
|
|
2043
2043
|
width: 400
|
|
2044
|
-
},
|
|
2045
|
-
const { data: n } =
|
|
2044
|
+
}, mo = K(() => import("./seo-panel-D3bp2i90.js")), Os = "seo", Eo = ({ isActive: e, show: t }) => {
|
|
2045
|
+
const { data: n } = ie(), s = Ci(n == null ? void 0 : n.pageType);
|
|
2046
2046
|
return !$t(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
|
|
2047
2047
|
"svg",
|
|
2048
2048
|
{
|
|
@@ -2061,35 +2061,35 @@ const Fi = ({
|
|
|
2061
2061
|
]
|
|
2062
2062
|
}
|
|
2063
2063
|
) });
|
|
2064
|
-
},
|
|
2064
|
+
}, po = {
|
|
2065
2065
|
id: Os,
|
|
2066
2066
|
label: "SEO",
|
|
2067
|
-
panel:
|
|
2068
|
-
button:
|
|
2067
|
+
panel: mo,
|
|
2068
|
+
button: Eo,
|
|
2069
2069
|
position: "top",
|
|
2070
2070
|
width: 600,
|
|
2071
2071
|
view: "modal"
|
|
2072
|
-
}, Ds = "user-info",
|
|
2073
|
-
const { t: e } = we(), { user: t, logout: n } = Yt(), s =
|
|
2074
|
-
return t ? /* @__PURE__ */ m(
|
|
2075
|
-
/* @__PURE__ */ c(
|
|
2076
|
-
/* @__PURE__ */ m(
|
|
2072
|
+
}, Ds = "user-info", yo = () => {
|
|
2073
|
+
const { t: e } = we(), { user: t, logout: n } = Yt(), s = oe("onLogout", ds);
|
|
2074
|
+
return t ? /* @__PURE__ */ m(aa, { children: [
|
|
2075
|
+
/* @__PURE__ */ c(ia, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(Ka, { className: "h-4 w-4" }) }) }),
|
|
2076
|
+
/* @__PURE__ */ m(oa, { className: "w-auto space-y-2 p-4", children: [
|
|
2077
2077
|
/* @__PURE__ */ c("div", { className: "text-sm font-medium", children: t.name ?? t.email }),
|
|
2078
2078
|
/* @__PURE__ */ c("div", { className: "text-xs text-muted-foreground", children: t.email }),
|
|
2079
|
-
/* @__PURE__ */ m(
|
|
2080
|
-
/* @__PURE__ */ c(
|
|
2081
|
-
/* @__PURE__ */ m(
|
|
2082
|
-
/* @__PURE__ */ m(
|
|
2083
|
-
/* @__PURE__ */ c(
|
|
2084
|
-
/* @__PURE__ */ c(
|
|
2079
|
+
/* @__PURE__ */ m(la, { children: [
|
|
2080
|
+
/* @__PURE__ */ c(ca, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "outline", size: "sm", className: "w-full", children: e("Logout") }) }),
|
|
2081
|
+
/* @__PURE__ */ m(ua, { children: [
|
|
2082
|
+
/* @__PURE__ */ m(da, { children: [
|
|
2083
|
+
/* @__PURE__ */ c(fa, { children: e("Are you sure you want to logout?") }),
|
|
2084
|
+
/* @__PURE__ */ c(ha, { children: e("You will be redirected to the login page.") })
|
|
2085
2085
|
] }),
|
|
2086
|
-
/* @__PURE__ */ m(
|
|
2087
|
-
/* @__PURE__ */ c(
|
|
2086
|
+
/* @__PURE__ */ m(ga, { children: [
|
|
2087
|
+
/* @__PURE__ */ c(ma, { children: e("Cancel") }),
|
|
2088
2088
|
/* @__PURE__ */ c(
|
|
2089
|
-
|
|
2089
|
+
Ea,
|
|
2090
2090
|
{
|
|
2091
2091
|
onClick: () => {
|
|
2092
|
-
n(),
|
|
2092
|
+
n(), Rr(s) && s();
|
|
2093
2093
|
},
|
|
2094
2094
|
children: e("Logout")
|
|
2095
2095
|
}
|
|
@@ -2099,15 +2099,15 @@ const Fi = ({
|
|
|
2099
2099
|
] })
|
|
2100
2100
|
] })
|
|
2101
2101
|
] }) : null;
|
|
2102
|
-
},
|
|
2102
|
+
}, Ao = {
|
|
2103
2103
|
id: Ds,
|
|
2104
2104
|
label: "User Info",
|
|
2105
|
-
button:
|
|
2105
|
+
button: yo,
|
|
2106
2106
|
position: "bottom"
|
|
2107
|
-
},
|
|
2108
|
-
en(Os,
|
|
2107
|
+
}, To = () => {
|
|
2108
|
+
en(Os, po), en(ks, go), en(Ds, Ao);
|
|
2109
2109
|
};
|
|
2110
|
-
var
|
|
2110
|
+
var _ = {
|
|
2111
2111
|
context: void 0,
|
|
2112
2112
|
registry: void 0,
|
|
2113
2113
|
effects: void 0,
|
|
@@ -2121,26 +2121,26 @@ var P = {
|
|
|
2121
2121
|
};
|
|
2122
2122
|
function Jn(e) {
|
|
2123
2123
|
const t = String(e), n = t.length - 1;
|
|
2124
|
-
return
|
|
2124
|
+
return _.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
|
|
2125
2125
|
}
|
|
2126
|
-
function
|
|
2127
|
-
|
|
2126
|
+
function rt(e) {
|
|
2127
|
+
_.context = e;
|
|
2128
2128
|
}
|
|
2129
|
-
var Gs = !1,
|
|
2130
|
-
equals:
|
|
2131
|
-
}, Us = Hs,
|
|
2129
|
+
var Gs = !1, So = (e, t) => e === t, Ft = Symbol("solid-proxy"), xs = typeof Proxy == "function", Rs = Symbol("solid-track"), qt = {
|
|
2130
|
+
equals: So
|
|
2131
|
+
}, Us = Hs, _e = 1, Kt = 2, Bs = {
|
|
2132
2132
|
owned: null,
|
|
2133
2133
|
cleanups: null,
|
|
2134
2134
|
context: null,
|
|
2135
2135
|
owner: null
|
|
2136
|
-
}, on = {}, C = null, ln = null,
|
|
2136
|
+
}, on = {}, C = null, ln = null, _o = null, G = null, ee = null, Te = null, Jt = 0;
|
|
2137
2137
|
function Oe(e, t) {
|
|
2138
2138
|
const n = G, s = C, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Bs : {
|
|
2139
2139
|
owned: null,
|
|
2140
2140
|
cleanups: null,
|
|
2141
2141
|
context: a ? a.context : null,
|
|
2142
2142
|
owner: a
|
|
2143
|
-
}, o = r ? e : () => e(() => Z(() =>
|
|
2143
|
+
}, o = r ? e : () => e(() => Z(() => ct(i)));
|
|
2144
2144
|
C = i, G = null;
|
|
2145
2145
|
try {
|
|
2146
2146
|
return me(o, !0);
|
|
@@ -2158,96 +2158,96 @@ function F(e, t) {
|
|
|
2158
2158
|
}, s = (r) => (typeof r == "function" && (r = r(n.value)), Vs(n, r));
|
|
2159
2159
|
return [Ks.bind(n), s];
|
|
2160
2160
|
}
|
|
2161
|
-
function
|
|
2162
|
-
const s = Xt(e, t, !0,
|
|
2163
|
-
|
|
2161
|
+
function Po(e, t, n) {
|
|
2162
|
+
const s = Xt(e, t, !0, _e);
|
|
2163
|
+
st(s);
|
|
2164
2164
|
}
|
|
2165
2165
|
function De(e, t, n) {
|
|
2166
|
-
const s = Xt(e, t, !1,
|
|
2167
|
-
|
|
2166
|
+
const s = Xt(e, t, !1, _e);
|
|
2167
|
+
st(s);
|
|
2168
2168
|
}
|
|
2169
2169
|
function Ms(e, t, n) {
|
|
2170
|
-
Us =
|
|
2171
|
-
const s = Xt(e, t, !1,
|
|
2172
|
-
(!n || !n.render) && (s.user = !0),
|
|
2170
|
+
Us = Oo;
|
|
2171
|
+
const s = Xt(e, t, !1, _e);
|
|
2172
|
+
(!n || !n.render) && (s.user = !0), Te ? Te.push(s) : st(s);
|
|
2173
2173
|
}
|
|
2174
2174
|
function J(e, t, n) {
|
|
2175
2175
|
n = n ? Object.assign({}, qt, n) : qt;
|
|
2176
2176
|
const s = Xt(e, t, !0, 0);
|
|
2177
|
-
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0,
|
|
2177
|
+
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, st(s), Ks.bind(s);
|
|
2178
2178
|
}
|
|
2179
|
-
function
|
|
2179
|
+
function vo(e) {
|
|
2180
2180
|
return e && typeof e == "object" && "then" in e;
|
|
2181
2181
|
}
|
|
2182
|
-
function
|
|
2182
|
+
function wo(e, t, n) {
|
|
2183
2183
|
let s, r, a;
|
|
2184
2184
|
s = !0, r = e, a = {};
|
|
2185
|
-
let i = null, o = on, l = null,
|
|
2186
|
-
const h = /* @__PURE__ */ new Set(), [g, A] = (a.storage || F)(a.initialValue), [T, p] = F(void 0), [y,
|
|
2185
|
+
let i = null, o = on, l = null, u = !1, f = "initialValue" in a, d = typeof s == "function" && J(s);
|
|
2186
|
+
const h = /* @__PURE__ */ new Set(), [g, A] = (a.storage || F)(a.initialValue), [T, p] = F(void 0), [y, P] = F(void 0, {
|
|
2187
2187
|
equals: !1
|
|
2188
|
-
}), [
|
|
2189
|
-
|
|
2190
|
-
function B(v,
|
|
2191
|
-
return i === v && (i = null,
|
|
2192
|
-
value:
|
|
2193
|
-
})), o = on, L(
|
|
2188
|
+
}), [w, O] = F(f ? "ready" : "unresolved");
|
|
2189
|
+
_.context && (l = _.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : _.load && _.has(l) && (o = _.load(l)));
|
|
2190
|
+
function B(v, b, Y, $) {
|
|
2191
|
+
return i === v && (i = null, $ !== void 0 && (f = !0), (v === o || b === o) && a.onHydrated && queueMicrotask(() => a.onHydrated($, {
|
|
2192
|
+
value: b
|
|
2193
|
+
})), o = on, L(b, Y)), b;
|
|
2194
2194
|
}
|
|
2195
|
-
function L(v,
|
|
2195
|
+
function L(v, b) {
|
|
2196
2196
|
me(() => {
|
|
2197
|
-
|
|
2197
|
+
b === void 0 && A(() => v), O(b !== void 0 ? "errored" : f ? "ready" : "unresolved"), p(b);
|
|
2198
2198
|
for (const Y of h.keys()) Y.decrement();
|
|
2199
2199
|
h.clear();
|
|
2200
2200
|
}, !1);
|
|
2201
2201
|
}
|
|
2202
2202
|
function pe() {
|
|
2203
|
-
const v =
|
|
2203
|
+
const v = No, b = g(), Y = T();
|
|
2204
2204
|
if (Y !== void 0 && !i) throw Y;
|
|
2205
|
-
return G && G.user,
|
|
2205
|
+
return G && G.user, b;
|
|
2206
2206
|
}
|
|
2207
2207
|
function ye(v = !0) {
|
|
2208
|
-
if (v !== !1 &&
|
|
2209
|
-
|
|
2210
|
-
const
|
|
2211
|
-
if (
|
|
2208
|
+
if (v !== !1 && u) return;
|
|
2209
|
+
u = !1;
|
|
2210
|
+
const b = d ? d() : s;
|
|
2211
|
+
if (b == null || b === !1) {
|
|
2212
2212
|
B(i, Z(g));
|
|
2213
2213
|
return;
|
|
2214
2214
|
}
|
|
2215
2215
|
let Y;
|
|
2216
|
-
const
|
|
2216
|
+
const $ = o !== on ? o : Z(() => {
|
|
2217
2217
|
try {
|
|
2218
|
-
return r(
|
|
2218
|
+
return r(b, {
|
|
2219
2219
|
value: g(),
|
|
2220
2220
|
refetching: v
|
|
2221
2221
|
});
|
|
2222
|
-
} catch (
|
|
2223
|
-
Y =
|
|
2222
|
+
} catch (de) {
|
|
2223
|
+
Y = de;
|
|
2224
2224
|
}
|
|
2225
2225
|
});
|
|
2226
2226
|
if (Y !== void 0) {
|
|
2227
|
-
B(i, void 0, xt(Y),
|
|
2227
|
+
B(i, void 0, xt(Y), b);
|
|
2228
2228
|
return;
|
|
2229
|
-
} else if (!
|
|
2230
|
-
return B(i,
|
|
2231
|
-
return i =
|
|
2232
|
-
O(
|
|
2233
|
-
}, !1),
|
|
2229
|
+
} else if (!vo($))
|
|
2230
|
+
return B(i, $, void 0, b), $;
|
|
2231
|
+
return i = $, "v" in $ ? ($.s === 1 ? B(i, $.v, void 0, b) : B(i, void 0, xt($.v), b), $) : (u = !0, queueMicrotask(() => u = !1), me(() => {
|
|
2232
|
+
O(f ? "refreshing" : "pending"), P();
|
|
2233
|
+
}, !1), $.then((de) => B($, de, void 0, b), (de) => B($, void 0, xt(de), b)));
|
|
2234
2234
|
}
|
|
2235
2235
|
Object.defineProperties(pe, {
|
|
2236
2236
|
state: {
|
|
2237
|
-
get: () =>
|
|
2237
|
+
get: () => w()
|
|
2238
2238
|
},
|
|
2239
2239
|
error: {
|
|
2240
2240
|
get: () => T()
|
|
2241
2241
|
},
|
|
2242
2242
|
loading: {
|
|
2243
2243
|
get() {
|
|
2244
|
-
const v =
|
|
2244
|
+
const v = w();
|
|
2245
2245
|
return v === "pending" || v === "refreshing";
|
|
2246
2246
|
}
|
|
2247
2247
|
},
|
|
2248
2248
|
latest: {
|
|
2249
2249
|
get() {
|
|
2250
|
-
if (!
|
|
2250
|
+
if (!f) return pe();
|
|
2251
2251
|
const v = T();
|
|
2252
2252
|
if (v && !i) throw v;
|
|
2253
2253
|
return g();
|
|
@@ -2255,12 +2255,12 @@ function Po(e, t, n) {
|
|
|
2255
2255
|
}
|
|
2256
2256
|
});
|
|
2257
2257
|
let U = C;
|
|
2258
|
-
return
|
|
2258
|
+
return d ? Po(() => (U = C, ye(!1))) : ye(!1), [pe, {
|
|
2259
2259
|
refetch: (v) => Fs(U, () => ye(v)),
|
|
2260
2260
|
mutate: A
|
|
2261
2261
|
}];
|
|
2262
2262
|
}
|
|
2263
|
-
function
|
|
2263
|
+
function Hc(e) {
|
|
2264
2264
|
return me(e, !1);
|
|
2265
2265
|
}
|
|
2266
2266
|
function Z(e) {
|
|
@@ -2273,14 +2273,14 @@ function Z(e) {
|
|
|
2273
2273
|
G = t;
|
|
2274
2274
|
}
|
|
2275
2275
|
}
|
|
2276
|
-
function
|
|
2276
|
+
function Qc(e, t, n) {
|
|
2277
2277
|
const s = Array.isArray(e);
|
|
2278
2278
|
let r, a = n && n.defer;
|
|
2279
2279
|
return (i) => {
|
|
2280
2280
|
let o;
|
|
2281
2281
|
if (s) {
|
|
2282
2282
|
o = Array(e.length);
|
|
2283
|
-
for (let
|
|
2283
|
+
for (let u = 0; u < e.length; u++) o[u] = e[u]();
|
|
2284
2284
|
} else o = e();
|
|
2285
2285
|
if (a)
|
|
2286
2286
|
return a = !1, i;
|
|
@@ -2288,10 +2288,10 @@ function Vc(e, t, n) {
|
|
|
2288
2288
|
return r = o, l;
|
|
2289
2289
|
};
|
|
2290
2290
|
}
|
|
2291
|
-
function
|
|
2291
|
+
function bo(e) {
|
|
2292
2292
|
Ms(() => Z(e));
|
|
2293
2293
|
}
|
|
2294
|
-
function
|
|
2294
|
+
function lt(e) {
|
|
2295
2295
|
return C === null || (C.cleanups === null ? C.cleanups = [e] : C.cleanups.push(e)), e;
|
|
2296
2296
|
}
|
|
2297
2297
|
function Xn() {
|
|
@@ -2308,7 +2308,7 @@ function Fs(e, t) {
|
|
|
2308
2308
|
C = n, G = s;
|
|
2309
2309
|
}
|
|
2310
2310
|
}
|
|
2311
|
-
function
|
|
2311
|
+
function Io(e) {
|
|
2312
2312
|
const t = G, n = C;
|
|
2313
2313
|
return Promise.resolve().then(() => {
|
|
2314
2314
|
G = t, C = n;
|
|
@@ -2316,19 +2316,19 @@ function wo(e) {
|
|
|
2316
2316
|
return me(e, !1), G = C = null, s ? s.done : void 0;
|
|
2317
2317
|
});
|
|
2318
2318
|
}
|
|
2319
|
-
var [
|
|
2320
|
-
function
|
|
2321
|
-
return [
|
|
2319
|
+
var [Co, $c] = /* @__PURE__ */ F(!1);
|
|
2320
|
+
function jc() {
|
|
2321
|
+
return [Co, Io];
|
|
2322
2322
|
}
|
|
2323
|
-
function
|
|
2323
|
+
function zc(e, t) {
|
|
2324
2324
|
const n = Symbol("context");
|
|
2325
2325
|
return {
|
|
2326
2326
|
id: n,
|
|
2327
|
-
Provider:
|
|
2327
|
+
Provider: Do(n),
|
|
2328
2328
|
defaultValue: e
|
|
2329
2329
|
};
|
|
2330
2330
|
}
|
|
2331
|
-
function
|
|
2331
|
+
function Wc(e) {
|
|
2332
2332
|
let t;
|
|
2333
2333
|
return C && C.context && (t = C.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
2334
2334
|
}
|
|
@@ -2339,10 +2339,10 @@ function qs(e) {
|
|
|
2339
2339
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
2340
2340
|
}, n;
|
|
2341
2341
|
}
|
|
2342
|
-
var
|
|
2342
|
+
var No;
|
|
2343
2343
|
function Ks() {
|
|
2344
2344
|
if (this.sources && this.state)
|
|
2345
|
-
if (this.state ===
|
|
2345
|
+
if (this.state === _e) st(this);
|
|
2346
2346
|
else {
|
|
2347
2347
|
const e = ee;
|
|
2348
2348
|
ee = null, me(() => Ht(this), !1), ee = e;
|
|
@@ -2358,32 +2358,32 @@ function Vs(e, t, n) {
|
|
|
2358
2358
|
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && me(() => {
|
|
2359
2359
|
for (let r = 0; r < e.observers.length; r += 1) {
|
|
2360
2360
|
const a = e.observers[r], i = ln && ln.running;
|
|
2361
|
-
i && ln.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) :
|
|
2361
|
+
i && ln.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) : Te.push(a), a.observers && Qs(a)), i || (a.state = _e);
|
|
2362
2362
|
}
|
|
2363
2363
|
if (ee.length > 1e6)
|
|
2364
2364
|
throw ee = [], new Error();
|
|
2365
2365
|
}, !1)), t;
|
|
2366
2366
|
}
|
|
2367
|
-
function
|
|
2367
|
+
function st(e) {
|
|
2368
2368
|
if (!e.fn) return;
|
|
2369
|
-
|
|
2369
|
+
ct(e);
|
|
2370
2370
|
const t = Jt;
|
|
2371
|
-
|
|
2371
|
+
Lo(e, e.value, t);
|
|
2372
2372
|
}
|
|
2373
|
-
function
|
|
2373
|
+
function Lo(e, t, n) {
|
|
2374
2374
|
let s;
|
|
2375
2375
|
const r = C, a = G;
|
|
2376
2376
|
G = C = e;
|
|
2377
2377
|
try {
|
|
2378
2378
|
s = e.fn(t);
|
|
2379
2379
|
} catch (i) {
|
|
2380
|
-
return e.pure && (e.state =
|
|
2380
|
+
return e.pure && (e.state = _e, e.owned && e.owned.forEach(ct), e.owned = null), e.updatedAt = n + 1, Gn(i);
|
|
2381
2381
|
} finally {
|
|
2382
2382
|
G = a, C = r;
|
|
2383
2383
|
}
|
|
2384
2384
|
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Vs(e, s) : e.value = s, e.updatedAt = n);
|
|
2385
2385
|
}
|
|
2386
|
-
function Xt(e, t, n, s =
|
|
2386
|
+
function Xt(e, t, n, s = _e, r) {
|
|
2387
2387
|
const a = {
|
|
2388
2388
|
fn: e,
|
|
2389
2389
|
state: s,
|
|
@@ -2407,8 +2407,8 @@ function Vt(e) {
|
|
|
2407
2407
|
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < Jt); )
|
|
2408
2408
|
e.state && t.push(e);
|
|
2409
2409
|
for (let n = t.length - 1; n >= 0; n--)
|
|
2410
|
-
if (e = t[n], e.state ===
|
|
2411
|
-
|
|
2410
|
+
if (e = t[n], e.state === _e)
|
|
2411
|
+
st(e);
|
|
2412
2412
|
else if (e.state === Kt) {
|
|
2413
2413
|
const s = ee;
|
|
2414
2414
|
ee = null, me(() => Ht(e, t[0]), !1), ee = s;
|
|
@@ -2417,36 +2417,36 @@ function Vt(e) {
|
|
|
2417
2417
|
function me(e, t) {
|
|
2418
2418
|
if (ee) return e();
|
|
2419
2419
|
let n = !1;
|
|
2420
|
-
t || (ee = []),
|
|
2420
|
+
t || (ee = []), Te ? n = !0 : Te = [], Jt++;
|
|
2421
2421
|
try {
|
|
2422
2422
|
const s = e();
|
|
2423
|
-
return
|
|
2423
|
+
return ko(n), s;
|
|
2424
2424
|
} catch (s) {
|
|
2425
|
-
n || (
|
|
2425
|
+
n || (Te = null), ee = null, Gn(s);
|
|
2426
2426
|
}
|
|
2427
2427
|
}
|
|
2428
|
-
function
|
|
2428
|
+
function ko(e) {
|
|
2429
2429
|
if (ee && (Hs(ee), ee = null), e) return;
|
|
2430
|
-
const t =
|
|
2431
|
-
|
|
2430
|
+
const t = Te;
|
|
2431
|
+
Te = null, t.length && me(() => Us(t), !1);
|
|
2432
2432
|
}
|
|
2433
2433
|
function Hs(e) {
|
|
2434
2434
|
for (let t = 0; t < e.length; t++) Vt(e[t]);
|
|
2435
2435
|
}
|
|
2436
|
-
function
|
|
2436
|
+
function Oo(e) {
|
|
2437
2437
|
let t, n = 0;
|
|
2438
2438
|
for (t = 0; t < e.length; t++) {
|
|
2439
2439
|
const s = e[t];
|
|
2440
2440
|
s.user ? e[n++] = s : Vt(s);
|
|
2441
2441
|
}
|
|
2442
|
-
if (
|
|
2443
|
-
if (
|
|
2444
|
-
|
|
2442
|
+
if (_.context) {
|
|
2443
|
+
if (_.count) {
|
|
2444
|
+
_.effects || (_.effects = []), _.effects.push(...e.slice(0, n));
|
|
2445
2445
|
return;
|
|
2446
2446
|
}
|
|
2447
|
-
|
|
2447
|
+
rt();
|
|
2448
2448
|
}
|
|
2449
|
-
for (
|
|
2449
|
+
for (_.effects && (_.done || !_.count) && (e = [..._.effects, ...e], n += _.effects.length, delete _.effects), t = 0; t < n; t++) Vt(e[t]);
|
|
2450
2450
|
}
|
|
2451
2451
|
function Ht(e, t) {
|
|
2452
2452
|
e.state = 0;
|
|
@@ -2454,17 +2454,17 @@ function Ht(e, t) {
|
|
|
2454
2454
|
const s = e.sources[n];
|
|
2455
2455
|
if (s.sources) {
|
|
2456
2456
|
const r = s.state;
|
|
2457
|
-
r ===
|
|
2457
|
+
r === _e ? s !== t && (!s.updatedAt || s.updatedAt < Jt) && Vt(s) : r === Kt && Ht(s, t);
|
|
2458
2458
|
}
|
|
2459
2459
|
}
|
|
2460
2460
|
}
|
|
2461
2461
|
function Qs(e) {
|
|
2462
2462
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
2463
2463
|
const n = e.observers[t];
|
|
2464
|
-
n.state || (n.state = Kt, n.pure ? ee.push(n) :
|
|
2464
|
+
n.state || (n.state = Kt, n.pure ? ee.push(n) : Te.push(n), n.observers && Qs(n));
|
|
2465
2465
|
}
|
|
2466
2466
|
}
|
|
2467
|
-
function
|
|
2467
|
+
function ct(e) {
|
|
2468
2468
|
let t;
|
|
2469
2469
|
if (e.sources)
|
|
2470
2470
|
for (; e.sources.length; ) {
|
|
@@ -2475,11 +2475,11 @@ function ut(e) {
|
|
|
2475
2475
|
}
|
|
2476
2476
|
}
|
|
2477
2477
|
if (e.tOwned) {
|
|
2478
|
-
for (t = e.tOwned.length - 1; t >= 0; t--)
|
|
2478
|
+
for (t = e.tOwned.length - 1; t >= 0; t--) ct(e.tOwned[t]);
|
|
2479
2479
|
delete e.tOwned;
|
|
2480
2480
|
}
|
|
2481
2481
|
if (e.owned) {
|
|
2482
|
-
for (t = e.owned.length - 1; t >= 0; t--)
|
|
2482
|
+
for (t = e.owned.length - 1; t >= 0; t--) ct(e.owned[t]);
|
|
2483
2483
|
e.owned = null;
|
|
2484
2484
|
}
|
|
2485
2485
|
if (e.cleanups) {
|
|
@@ -2508,7 +2508,7 @@ function hn(e) {
|
|
|
2508
2508
|
}
|
|
2509
2509
|
return e;
|
|
2510
2510
|
}
|
|
2511
|
-
function
|
|
2511
|
+
function Do(e, t) {
|
|
2512
2512
|
return function(s) {
|
|
2513
2513
|
let r;
|
|
2514
2514
|
return De(() => r = Z(() => (C.context = {
|
|
@@ -2521,57 +2521,57 @@ var gn = Symbol("fallback");
|
|
|
2521
2521
|
function Qt(e) {
|
|
2522
2522
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
2523
2523
|
}
|
|
2524
|
-
function
|
|
2524
|
+
function Go(e, t, n = {}) {
|
|
2525
2525
|
let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
|
|
2526
|
-
return
|
|
2527
|
-
let l = e() || [],
|
|
2526
|
+
return lt(() => Qt(a)), () => {
|
|
2527
|
+
let l = e() || [], u = l.length, f, d;
|
|
2528
2528
|
return l[Rs], Z(() => {
|
|
2529
|
-
let g, A, T, p, y,
|
|
2530
|
-
if (
|
|
2529
|
+
let g, A, T, p, y, P, w, O, B;
|
|
2530
|
+
if (u === 0)
|
|
2531
2531
|
i !== 0 && (Qt(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [gn], r[0] = Oe((L) => (a[0] = L, n.fallback())), i = 1);
|
|
2532
2532
|
else if (i === 0) {
|
|
2533
|
-
for (r = new Array(
|
|
2534
|
-
s[
|
|
2535
|
-
i =
|
|
2533
|
+
for (r = new Array(u), d = 0; d < u; d++)
|
|
2534
|
+
s[d] = l[d], r[d] = Oe(h);
|
|
2535
|
+
i = u;
|
|
2536
2536
|
} else {
|
|
2537
|
-
for (T = new Array(
|
|
2538
|
-
for (
|
|
2539
|
-
T[O] = r[
|
|
2540
|
-
for (g = /* @__PURE__ */ new Map(), A = new Array(O + 1),
|
|
2541
|
-
B = l[
|
|
2542
|
-
for (
|
|
2543
|
-
B = s[
|
|
2544
|
-
for (
|
|
2545
|
-
|
|
2546
|
-
r = r.slice(0, i =
|
|
2537
|
+
for (T = new Array(u), p = new Array(u), o && (y = new Array(u)), P = 0, w = Math.min(i, u); P < w && s[P] === l[P]; P++) ;
|
|
2538
|
+
for (w = i - 1, O = u - 1; w >= P && O >= P && s[w] === l[O]; w--, O--)
|
|
2539
|
+
T[O] = r[w], p[O] = a[w], o && (y[O] = o[w]);
|
|
2540
|
+
for (g = /* @__PURE__ */ new Map(), A = new Array(O + 1), d = O; d >= P; d--)
|
|
2541
|
+
B = l[d], f = g.get(B), A[d] = f === void 0 ? -1 : f, g.set(B, d);
|
|
2542
|
+
for (f = P; f <= w; f++)
|
|
2543
|
+
B = s[f], d = g.get(B), d !== void 0 && d !== -1 ? (T[d] = r[f], p[d] = a[f], o && (y[d] = o[f]), d = A[d], g.set(B, d)) : a[f]();
|
|
2544
|
+
for (d = P; d < u; d++)
|
|
2545
|
+
d in T ? (r[d] = T[d], a[d] = p[d], o && (o[d] = y[d], o[d](d))) : r[d] = Oe(h);
|
|
2546
|
+
r = r.slice(0, i = u), s = l.slice(0);
|
|
2547
2547
|
}
|
|
2548
2548
|
return r;
|
|
2549
2549
|
});
|
|
2550
2550
|
function h(g) {
|
|
2551
|
-
if (a[
|
|
2552
|
-
const [A, T] = F(
|
|
2553
|
-
return o[
|
|
2551
|
+
if (a[d] = g, o) {
|
|
2552
|
+
const [A, T] = F(d);
|
|
2553
|
+
return o[d] = T, t(l[d], A);
|
|
2554
2554
|
}
|
|
2555
|
-
return t(l[
|
|
2555
|
+
return t(l[d]);
|
|
2556
2556
|
}
|
|
2557
2557
|
};
|
|
2558
2558
|
}
|
|
2559
|
-
function
|
|
2559
|
+
function xo(e, t, n = {}) {
|
|
2560
2560
|
let s = [], r = [], a = [], i = [], o = 0, l;
|
|
2561
|
-
return
|
|
2562
|
-
const
|
|
2563
|
-
return
|
|
2564
|
-
if (
|
|
2561
|
+
return lt(() => Qt(a)), () => {
|
|
2562
|
+
const u = e() || [], f = u.length;
|
|
2563
|
+
return u[Rs], Z(() => {
|
|
2564
|
+
if (f === 0)
|
|
2565
2565
|
return o !== 0 && (Qt(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [gn], r[0] = Oe((h) => (a[0] = h, n.fallback())), o = 1), r;
|
|
2566
|
-
for (s[0] === gn && (a[0](), a = [], s = [], r = [], o = 0), l = 0; l <
|
|
2567
|
-
l < s.length && s[l] !==
|
|
2566
|
+
for (s[0] === gn && (a[0](), a = [], s = [], r = [], o = 0), l = 0; l < f; l++)
|
|
2567
|
+
l < s.length && s[l] !== u[l] ? i[l](() => u[l]) : l >= s.length && (r[l] = Oe(d));
|
|
2568
2568
|
for (; l < s.length; l++)
|
|
2569
2569
|
a[l]();
|
|
2570
|
-
return o = i.length = a.length =
|
|
2570
|
+
return o = i.length = a.length = f, s = u.slice(0), r = r.slice(0, o);
|
|
2571
2571
|
});
|
|
2572
|
-
function
|
|
2572
|
+
function d(h) {
|
|
2573
2573
|
a[l] = h;
|
|
2574
|
-
const [g, A] = F(
|
|
2574
|
+
const [g, A] = F(u[l]);
|
|
2575
2575
|
return i[l] = A, t(g, l);
|
|
2576
2576
|
}
|
|
2577
2577
|
};
|
|
@@ -2609,7 +2609,7 @@ var mn = {
|
|
|
2609
2609
|
function cn(e) {
|
|
2610
2610
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
2611
2611
|
}
|
|
2612
|
-
function
|
|
2612
|
+
function Ro() {
|
|
2613
2613
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
2614
2614
|
const n = this[e]();
|
|
2615
2615
|
if (n !== void 0) return n;
|
|
@@ -2645,19 +2645,19 @@ function js(...e) {
|
|
|
2645
2645
|
const o = e[i];
|
|
2646
2646
|
if (!o) continue;
|
|
2647
2647
|
const l = Object.getOwnPropertyNames(o);
|
|
2648
|
-
for (let
|
|
2649
|
-
const
|
|
2650
|
-
if (
|
|
2651
|
-
const
|
|
2652
|
-
if (!s[
|
|
2653
|
-
s[
|
|
2648
|
+
for (let u = l.length - 1; u >= 0; u--) {
|
|
2649
|
+
const f = l[u];
|
|
2650
|
+
if (f === "__proto__" || f === "constructor") continue;
|
|
2651
|
+
const d = Object.getOwnPropertyDescriptor(o, f);
|
|
2652
|
+
if (!s[f])
|
|
2653
|
+
s[f] = d.get ? {
|
|
2654
2654
|
enumerable: !0,
|
|
2655
2655
|
configurable: !0,
|
|
2656
|
-
get:
|
|
2657
|
-
} :
|
|
2656
|
+
get: Ro.bind(n[f] = [d.get.bind(o)])
|
|
2657
|
+
} : d.value !== void 0 ? d : void 0;
|
|
2658
2658
|
else {
|
|
2659
|
-
const h = n[
|
|
2660
|
-
h && (
|
|
2659
|
+
const h = n[f];
|
|
2660
|
+
h && (d.get ? h.push(d.get.bind(o)) : d.value !== void 0 && h.push(() => d.value));
|
|
2661
2661
|
}
|
|
2662
2662
|
}
|
|
2663
2663
|
}
|
|
@@ -2668,7 +2668,7 @@ function js(...e) {
|
|
|
2668
2668
|
}
|
|
2669
2669
|
return r;
|
|
2670
2670
|
}
|
|
2671
|
-
function
|
|
2671
|
+
function Uo(e, ...t) {
|
|
2672
2672
|
if (xs && Ft in e) {
|
|
2673
2673
|
const r = new Set(t.length > 1 ? t.flat() : t[0]), a = t.map((i) => new Proxy({
|
|
2674
2674
|
get(o) {
|
|
@@ -2697,8 +2697,8 @@ function xo(e, ...t) {
|
|
|
2697
2697
|
for (const r of Object.getOwnPropertyNames(e)) {
|
|
2698
2698
|
const a = Object.getOwnPropertyDescriptor(e, r), i = !a.get && !a.set && a.enumerable && a.writable && a.configurable;
|
|
2699
2699
|
let o = !1, l = 0;
|
|
2700
|
-
for (const
|
|
2701
|
-
|
|
2700
|
+
for (const u of t)
|
|
2701
|
+
u.includes(r) && (o = !0, i ? s[l][r] = a.value : Object.defineProperty(s[l], r, a)), ++l;
|
|
2702
2702
|
o || (i ? n[r] = a.value : Object.defineProperty(n, r, a));
|
|
2703
2703
|
}
|
|
2704
2704
|
return [...s, n];
|
|
@@ -2706,45 +2706,45 @@ function xo(e, ...t) {
|
|
|
2706
2706
|
function zs(e) {
|
|
2707
2707
|
let t, n;
|
|
2708
2708
|
const s = (r) => {
|
|
2709
|
-
const a =
|
|
2709
|
+
const a = _.context;
|
|
2710
2710
|
if (a) {
|
|
2711
2711
|
const [o, l] = F();
|
|
2712
|
-
|
|
2713
|
-
!
|
|
2712
|
+
_.count || (_.count = 0), _.count++, (n || (n = e())).then((u) => {
|
|
2713
|
+
!_.done && rt(a), _.count--, l(() => u.default), rt();
|
|
2714
2714
|
}), t = o;
|
|
2715
2715
|
} else if (!t) {
|
|
2716
|
-
const [o] =
|
|
2716
|
+
const [o] = wo(() => (n || (n = e())).then((l) => l.default));
|
|
2717
2717
|
t = o;
|
|
2718
2718
|
}
|
|
2719
2719
|
let i;
|
|
2720
2720
|
return J(() => (i = t()) ? Z(() => {
|
|
2721
|
-
if (!a ||
|
|
2722
|
-
const o =
|
|
2723
|
-
|
|
2721
|
+
if (!a || _.done) return i(r);
|
|
2722
|
+
const o = _.context;
|
|
2723
|
+
rt(a);
|
|
2724
2724
|
const l = i(r);
|
|
2725
|
-
return
|
|
2725
|
+
return rt(o), l;
|
|
2726
2726
|
}) : "");
|
|
2727
2727
|
};
|
|
2728
2728
|
return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
|
|
2729
2729
|
}
|
|
2730
|
-
var
|
|
2731
|
-
function
|
|
2732
|
-
return
|
|
2730
|
+
var Bo = 0;
|
|
2731
|
+
function Yc() {
|
|
2732
|
+
return _.context ? _.getNextContextId() : `cl-${Bo++}`;
|
|
2733
2733
|
}
|
|
2734
2734
|
var Ws = (e) => `Stale read from <${e}>.`;
|
|
2735
|
-
function
|
|
2735
|
+
function Jc(e) {
|
|
2736
2736
|
const t = "fallback" in e && {
|
|
2737
2737
|
fallback: () => e.fallback
|
|
2738
2738
|
};
|
|
2739
|
-
return J(
|
|
2739
|
+
return J(Go(() => e.each, e.children, t || void 0));
|
|
2740
2740
|
}
|
|
2741
|
-
function
|
|
2741
|
+
function Xc(e) {
|
|
2742
2742
|
const t = "fallback" in e && {
|
|
2743
2743
|
fallback: () => e.fallback
|
|
2744
2744
|
};
|
|
2745
|
-
return J(
|
|
2745
|
+
return J(xo(() => e.each, e.children, t || void 0));
|
|
2746
2746
|
}
|
|
2747
|
-
function
|
|
2747
|
+
function Zc(e) {
|
|
2748
2748
|
const t = e.keyed, n = J(() => e.when, void 0, void 0), s = t ? n : J(n, void 0, {
|
|
2749
2749
|
equals: (r, a) => !r == !a
|
|
2750
2750
|
});
|
|
@@ -2760,16 +2760,16 @@ function Jc(e) {
|
|
|
2760
2760
|
return e.fallback;
|
|
2761
2761
|
}, void 0, void 0);
|
|
2762
2762
|
}
|
|
2763
|
-
function
|
|
2763
|
+
function eu(e) {
|
|
2764
2764
|
const t = qs(() => e.children), n = J(() => {
|
|
2765
2765
|
const s = t(), r = Array.isArray(s) ? s : [s];
|
|
2766
2766
|
let a = () => {
|
|
2767
2767
|
};
|
|
2768
2768
|
for (let i = 0; i < r.length; i++) {
|
|
2769
|
-
const o = i, l = r[i],
|
|
2769
|
+
const o = i, l = r[i], u = a, f = J(() => u() ? void 0 : l.when, void 0, void 0), d = l.keyed ? f : J(f, void 0, {
|
|
2770
2770
|
equals: (h, g) => !h == !g
|
|
2771
2771
|
});
|
|
2772
|
-
a = () =>
|
|
2772
|
+
a = () => u() || (d() ? [o, f, l] : void 0);
|
|
2773
2773
|
}
|
|
2774
2774
|
return a;
|
|
2775
2775
|
});
|
|
@@ -2778,19 +2778,19 @@ function Xc(e) {
|
|
|
2778
2778
|
if (!s) return e.fallback;
|
|
2779
2779
|
const [r, a, i] = s, o = i.children;
|
|
2780
2780
|
return typeof o == "function" && o.length > 0 ? Z(() => o(i.keyed ? a() : () => {
|
|
2781
|
-
var
|
|
2782
|
-
if (((
|
|
2781
|
+
var u;
|
|
2782
|
+
if (((u = Z(n)()) == null ? void 0 : u[0]) !== r) throw Ws("Match");
|
|
2783
2783
|
return a();
|
|
2784
2784
|
})) : o;
|
|
2785
2785
|
}, void 0, void 0);
|
|
2786
2786
|
}
|
|
2787
|
-
function
|
|
2787
|
+
function tu(e) {
|
|
2788
2788
|
return e;
|
|
2789
2789
|
}
|
|
2790
|
-
var
|
|
2790
|
+
var Mo = ["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"], Fo = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...Mo]), qo = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), Ko = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2791
2791
|
className: "class",
|
|
2792
2792
|
htmlFor: "for"
|
|
2793
|
-
}),
|
|
2793
|
+
}), Vo = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2794
2794
|
class: "className",
|
|
2795
2795
|
novalidate: {
|
|
2796
2796
|
$: "noValidate",
|
|
@@ -2819,11 +2819,11 @@ var Uo = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
|
|
|
2819
2819
|
TEXTAREA: 1
|
|
2820
2820
|
}
|
|
2821
2821
|
});
|
|
2822
|
-
function
|
|
2823
|
-
const n =
|
|
2822
|
+
function Ho(e, t) {
|
|
2823
|
+
const n = Vo[e];
|
|
2824
2824
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
2825
2825
|
}
|
|
2826
|
-
var
|
|
2826
|
+
var Qo = /* @__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"]), $o = /* @__PURE__ */ new Set([
|
|
2827
2827
|
"altGlyph",
|
|
2828
2828
|
"altGlyphDef",
|
|
2829
2829
|
"altGlyphItem",
|
|
@@ -2901,12 +2901,12 @@ var Vo = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
|
|
|
2901
2901
|
"use",
|
|
2902
2902
|
"view",
|
|
2903
2903
|
"vkern"
|
|
2904
|
-
]),
|
|
2904
|
+
]), jo = {
|
|
2905
2905
|
xlink: "http://www.w3.org/1999/xlink",
|
|
2906
2906
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
2907
|
-
},
|
|
2908
|
-
function
|
|
2909
|
-
let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling,
|
|
2907
|
+
}, nu = (e) => J(() => e());
|
|
2908
|
+
function zo(e, t, n) {
|
|
2909
|
+
let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling, u = null;
|
|
2910
2910
|
for (; i < r || o < a; ) {
|
|
2911
2911
|
if (t[i] === n[o]) {
|
|
2912
2912
|
i++, o++;
|
|
@@ -2915,36 +2915,36 @@ function $o(e, t, n) {
|
|
|
2915
2915
|
for (; t[r - 1] === n[a - 1]; )
|
|
2916
2916
|
r--, a--;
|
|
2917
2917
|
if (r === i) {
|
|
2918
|
-
const
|
|
2919
|
-
for (; o < a; ) e.insertBefore(n[o++],
|
|
2918
|
+
const f = a < s ? o ? n[o - 1].nextSibling : n[a - o] : l;
|
|
2919
|
+
for (; o < a; ) e.insertBefore(n[o++], f);
|
|
2920
2920
|
} else if (a === o)
|
|
2921
2921
|
for (; i < r; )
|
|
2922
|
-
(!
|
|
2922
|
+
(!u || !u.has(t[i])) && t[i].remove(), i++;
|
|
2923
2923
|
else if (t[i] === n[a - 1] && n[o] === t[r - 1]) {
|
|
2924
|
-
const
|
|
2925
|
-
e.insertBefore(n[o++], t[i++].nextSibling), e.insertBefore(n[--a],
|
|
2924
|
+
const f = t[--r].nextSibling;
|
|
2925
|
+
e.insertBefore(n[o++], t[i++].nextSibling), e.insertBefore(n[--a], f), t[r] = n[a];
|
|
2926
2926
|
} else {
|
|
2927
|
-
if (!
|
|
2928
|
-
|
|
2929
|
-
let
|
|
2930
|
-
for (;
|
|
2927
|
+
if (!u) {
|
|
2928
|
+
u = /* @__PURE__ */ new Map();
|
|
2929
|
+
let d = o;
|
|
2930
|
+
for (; d < a; ) u.set(n[d], d++);
|
|
2931
2931
|
}
|
|
2932
|
-
const
|
|
2933
|
-
if (
|
|
2934
|
-
if (o <
|
|
2935
|
-
let
|
|
2936
|
-
for (; ++
|
|
2932
|
+
const f = u.get(t[i]);
|
|
2933
|
+
if (f != null)
|
|
2934
|
+
if (o < f && f < a) {
|
|
2935
|
+
let d = i, h = 1, g;
|
|
2936
|
+
for (; ++d < r && d < a && !((g = u.get(t[d])) == null || g !== f + h); )
|
|
2937
2937
|
h++;
|
|
2938
|
-
if (h >
|
|
2938
|
+
if (h > f - o) {
|
|
2939
2939
|
const A = t[i];
|
|
2940
|
-
for (; o <
|
|
2940
|
+
for (; o < f; ) e.insertBefore(n[o++], A);
|
|
2941
2941
|
} else e.replaceChild(n[o++], t[i++]);
|
|
2942
2942
|
} else i++;
|
|
2943
2943
|
else t[i++].remove();
|
|
2944
2944
|
}
|
|
2945
2945
|
}
|
|
2946
2946
|
}
|
|
2947
|
-
var
|
|
2947
|
+
var it = "_$DX_DELEGATE";
|
|
2948
2948
|
function Ys(e, t, n, s = {}) {
|
|
2949
2949
|
let r;
|
|
2950
2950
|
return Oe((a) => {
|
|
@@ -2953,7 +2953,7 @@ function Ys(e, t, n, s = {}) {
|
|
|
2953
2953
|
r(), t.textContent = "";
|
|
2954
2954
|
};
|
|
2955
2955
|
}
|
|
2956
|
-
function
|
|
2956
|
+
function su(e, t, n, s) {
|
|
2957
2957
|
let r;
|
|
2958
2958
|
const a = () => {
|
|
2959
2959
|
const o = document.createElement("template");
|
|
@@ -2961,32 +2961,32 @@ function tu(e, t, n, s) {
|
|
|
2961
2961
|
}, i = () => (r || (r = a())).cloneNode(!0);
|
|
2962
2962
|
return i.cloneNode = i, i;
|
|
2963
2963
|
}
|
|
2964
|
-
function
|
|
2965
|
-
const n = t[
|
|
2964
|
+
function Wo(e, t = window.document) {
|
|
2965
|
+
const n = t[it] || (t[it] = /* @__PURE__ */ new Set());
|
|
2966
2966
|
for (let s = 0, r = e.length; s < r; s++) {
|
|
2967
2967
|
const a = e[s];
|
|
2968
2968
|
n.has(a) || (n.add(a), t.addEventListener(a, Js));
|
|
2969
2969
|
}
|
|
2970
2970
|
}
|
|
2971
|
-
function
|
|
2972
|
-
if (e[
|
|
2973
|
-
for (let t of e[
|
|
2974
|
-
delete e[
|
|
2971
|
+
function ru(e = window.document) {
|
|
2972
|
+
if (e[it]) {
|
|
2973
|
+
for (let t of e[it].keys()) e.removeEventListener(t, Js);
|
|
2974
|
+
delete e[it];
|
|
2975
2975
|
}
|
|
2976
2976
|
}
|
|
2977
2977
|
function En(e, t, n) {
|
|
2978
2978
|
Ue(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
2979
2979
|
}
|
|
2980
|
-
function
|
|
2980
|
+
function Yo(e, t, n, s) {
|
|
2981
2981
|
Ue(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
|
|
2982
2982
|
}
|
|
2983
|
-
function
|
|
2983
|
+
function Jo(e, t, n) {
|
|
2984
2984
|
Ue(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
2985
2985
|
}
|
|
2986
|
-
function
|
|
2986
|
+
function Xo(e, t) {
|
|
2987
2987
|
Ue(e) || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
2988
2988
|
}
|
|
2989
|
-
function
|
|
2989
|
+
function Zo(e, t, n, s) {
|
|
2990
2990
|
if (s)
|
|
2991
2991
|
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
2992
2992
|
else if (Array.isArray(n)) {
|
|
@@ -2994,7 +2994,7 @@ function Jo(e, t, n, s) {
|
|
|
2994
2994
|
e.addEventListener(t, n[0] = (a) => r.call(e, n[1], a));
|
|
2995
2995
|
} else e.addEventListener(t, n, typeof n != "function" && n);
|
|
2996
2996
|
}
|
|
2997
|
-
function
|
|
2997
|
+
function el(e, t, n = {}) {
|
|
2998
2998
|
const s = Object.keys(t || {}), r = Object.keys(n);
|
|
2999
2999
|
let a, i;
|
|
3000
3000
|
for (a = 0, i = r.length; a < i; a++) {
|
|
@@ -3007,7 +3007,7 @@ function Xo(e, t, n = {}) {
|
|
|
3007
3007
|
}
|
|
3008
3008
|
return n;
|
|
3009
3009
|
}
|
|
3010
|
-
function
|
|
3010
|
+
function tl(e, t, n) {
|
|
3011
3011
|
if (!t) return n ? En(e, "style") : t;
|
|
3012
3012
|
const s = e.style;
|
|
3013
3013
|
if (typeof t == "string") return s.cssText = t;
|
|
@@ -3019,18 +3019,18 @@ function Zo(e, t, n) {
|
|
|
3019
3019
|
r = t[a], r !== n[a] && (s.setProperty(a, r), n[a] = r);
|
|
3020
3020
|
return n;
|
|
3021
3021
|
}
|
|
3022
|
-
function
|
|
3022
|
+
function nl(e, t = {}, n, s) {
|
|
3023
3023
|
const r = {};
|
|
3024
|
-
return s || De(() => r.children =
|
|
3024
|
+
return s || De(() => r.children = ut(e, t.children, r.children)), De(() => typeof t.ref == "function" && sl(t.ref, e)), De(() => rl(e, t, n, !0, r, !0)), r;
|
|
3025
3025
|
}
|
|
3026
|
-
function
|
|
3026
|
+
function sl(e, t, n) {
|
|
3027
3027
|
return Z(() => e(t, n));
|
|
3028
3028
|
}
|
|
3029
3029
|
function pn(e, t, n, s) {
|
|
3030
|
-
if (n !== void 0 && !s && (s = []), typeof t != "function") return
|
|
3031
|
-
De((r) =>
|
|
3030
|
+
if (n !== void 0 && !s && (s = []), typeof t != "function") return ut(e, t, s, n);
|
|
3031
|
+
De((r) => ut(e, t(), r, n), s);
|
|
3032
3032
|
}
|
|
3033
|
-
function
|
|
3033
|
+
function rl(e, t, n, s, r = {}, a = !1) {
|
|
3034
3034
|
t || (t = {});
|
|
3035
3035
|
for (const i in r)
|
|
3036
3036
|
if (!(i in t)) {
|
|
@@ -3044,14 +3044,14 @@ function nl(e, t, n, s, r = {}, a = !1) {
|
|
|
3044
3044
|
r[i] = es(e, i, o, r[i], n, a, t);
|
|
3045
3045
|
}
|
|
3046
3046
|
}
|
|
3047
|
-
function
|
|
3047
|
+
function al(e) {
|
|
3048
3048
|
let t, n;
|
|
3049
|
-
return !Ue() || !(t =
|
|
3049
|
+
return !Ue() || !(t = _.registry.get(n = ol())) ? e() : (_.completed && _.completed.add(t), _.registry.delete(n), t);
|
|
3050
3050
|
}
|
|
3051
3051
|
function Ue(e) {
|
|
3052
|
-
return !!
|
|
3052
|
+
return !!_.context && !_.done && (!e || e.isConnected);
|
|
3053
3053
|
}
|
|
3054
|
-
function
|
|
3054
|
+
function il(e) {
|
|
3055
3055
|
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
3056
3056
|
}
|
|
3057
3057
|
function Zn(e, t, n) {
|
|
@@ -3059,9 +3059,9 @@ function Zn(e, t, n) {
|
|
|
3059
3059
|
for (let r = 0, a = s.length; r < a; r++) e.classList.toggle(s[r], n);
|
|
3060
3060
|
}
|
|
3061
3061
|
function es(e, t, n, s, r, a, i) {
|
|
3062
|
-
let o, l, f, d
|
|
3063
|
-
if (t === "style") return
|
|
3064
|
-
if (t === "classList") return
|
|
3062
|
+
let o, l, u, f, d;
|
|
3063
|
+
if (t === "style") return tl(e, n, s);
|
|
3064
|
+
if (t === "classList") return el(e, n, s);
|
|
3065
3065
|
if (n === s) return s;
|
|
3066
3066
|
if (t === "ref")
|
|
3067
3067
|
a || n(e);
|
|
@@ -3072,29 +3072,29 @@ function es(e, t, n, s, r, a, i) {
|
|
|
3072
3072
|
const h = t.slice(10);
|
|
3073
3073
|
s && e.removeEventListener(h, s, !0), n && e.addEventListener(h, n, !0);
|
|
3074
3074
|
} else if (t.slice(0, 2) === "on") {
|
|
3075
|
-
const h = t.slice(2).toLowerCase(), g =
|
|
3075
|
+
const h = t.slice(2).toLowerCase(), g = Qo.has(h);
|
|
3076
3076
|
if (!g && s) {
|
|
3077
3077
|
const A = Array.isArray(s) ? s[0] : s;
|
|
3078
3078
|
e.removeEventListener(h, A);
|
|
3079
3079
|
}
|
|
3080
|
-
(g || n) && (
|
|
3080
|
+
(g || n) && (Zo(e, h, n, g), g && Wo([h]));
|
|
3081
3081
|
} else if (t.slice(0, 5) === "attr:")
|
|
3082
3082
|
En(e, t.slice(5), n);
|
|
3083
3083
|
else if (t.slice(0, 5) === "bool:")
|
|
3084
|
-
|
|
3085
|
-
else if ((
|
|
3086
|
-
if (
|
|
3084
|
+
Jo(e, t.slice(5), n);
|
|
3085
|
+
else if ((d = t.slice(0, 5) === "prop:") || (u = qo.has(t)) || !r && ((f = Ho(t, e.tagName)) || (l = Fo.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
|
|
3086
|
+
if (d)
|
|
3087
3087
|
t = t.slice(5), l = !0;
|
|
3088
3088
|
else if (Ue(e)) return n;
|
|
3089
|
-
t === "class" || t === "className" ?
|
|
3089
|
+
t === "class" || t === "className" ? Xo(e, n) : o && !l && !u ? e[il(t)] = n : e[f || t] = n;
|
|
3090
3090
|
} else {
|
|
3091
|
-
const h = r && t.indexOf(":") > -1 &&
|
|
3092
|
-
h ?
|
|
3091
|
+
const h = r && t.indexOf(":") > -1 && jo[t.split(":")[0]];
|
|
3092
|
+
h ? Yo(e, h, t, n) : En(e, Ko[t] || t, n);
|
|
3093
3093
|
}
|
|
3094
3094
|
return n;
|
|
3095
3095
|
}
|
|
3096
3096
|
function Js(e) {
|
|
3097
|
-
if (
|
|
3097
|
+
if (_.registry && _.events && _.events.find(([l, u]) => u === e))
|
|
3098
3098
|
return;
|
|
3099
3099
|
let t = e.target;
|
|
3100
3100
|
const n = `$$${e.type}`, s = e.target, r = e.currentTarget, a = (l) => Object.defineProperty(e, "target", {
|
|
@@ -3103,8 +3103,8 @@ function Js(e) {
|
|
|
3103
3103
|
}), i = () => {
|
|
3104
3104
|
const l = t[n];
|
|
3105
3105
|
if (l && !t.disabled) {
|
|
3106
|
-
const
|
|
3107
|
-
if (
|
|
3106
|
+
const u = t[`${n}Data`];
|
|
3107
|
+
if (u !== void 0 ? l.call(t, u, e) : l.call(t, e), e.cancelBubble) return;
|
|
3108
3108
|
}
|
|
3109
3109
|
return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && a(t.host), !0;
|
|
3110
3110
|
}, o = () => {
|
|
@@ -3115,10 +3115,10 @@ function Js(e) {
|
|
|
3115
3115
|
get() {
|
|
3116
3116
|
return t || document;
|
|
3117
3117
|
}
|
|
3118
|
-
}),
|
|
3118
|
+
}), _.registry && !_.done && (_.done = _$HY.done = !0), e.composedPath) {
|
|
3119
3119
|
const l = e.composedPath();
|
|
3120
3120
|
a(l[0]);
|
|
3121
|
-
for (let
|
|
3121
|
+
for (let u = 0; u < l.length - 2 && (t = l[u], !!i()); u++) {
|
|
3122
3122
|
if (t._$host) {
|
|
3123
3123
|
t = t._$host, o();
|
|
3124
3124
|
break;
|
|
@@ -3129,14 +3129,14 @@ function Js(e) {
|
|
|
3129
3129
|
} else o();
|
|
3130
3130
|
a(s);
|
|
3131
3131
|
}
|
|
3132
|
-
function
|
|
3132
|
+
function ut(e, t, n, s, r) {
|
|
3133
3133
|
const a = Ue(e);
|
|
3134
3134
|
if (a) {
|
|
3135
3135
|
!n && (n = [...e.childNodes]);
|
|
3136
3136
|
let l = [];
|
|
3137
|
-
for (let
|
|
3138
|
-
const
|
|
3139
|
-
|
|
3137
|
+
for (let u = 0; u < n.length; u++) {
|
|
3138
|
+
const f = n[u];
|
|
3139
|
+
f.nodeType === 8 && f.data.slice(0, 2) === "!$" ? f.remove() : l.push(f);
|
|
3140
3140
|
}
|
|
3141
3141
|
n = l;
|
|
3142
3142
|
}
|
|
@@ -3148,41 +3148,41 @@ function dt(e, t, n, s, r) {
|
|
|
3148
3148
|
return n;
|
|
3149
3149
|
if (o) {
|
|
3150
3150
|
let l = n[0];
|
|
3151
|
-
l && l.nodeType === 3 ? l.data !== t && (l.data = t) : l = document.createTextNode(t), n =
|
|
3151
|
+
l && l.nodeType === 3 ? l.data !== t && (l.data = t) : l = document.createTextNode(t), n = Me(e, n, s, l);
|
|
3152
3152
|
} else
|
|
3153
3153
|
n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
|
|
3154
3154
|
} else if (t == null || i === "boolean") {
|
|
3155
3155
|
if (a) return n;
|
|
3156
|
-
n =
|
|
3156
|
+
n = Me(e, n, s);
|
|
3157
3157
|
} else {
|
|
3158
3158
|
if (i === "function")
|
|
3159
3159
|
return De(() => {
|
|
3160
3160
|
let l = t();
|
|
3161
3161
|
for (; typeof l == "function"; ) l = l();
|
|
3162
|
-
n =
|
|
3162
|
+
n = ut(e, l, n, s);
|
|
3163
3163
|
}), () => n;
|
|
3164
3164
|
if (Array.isArray(t)) {
|
|
3165
|
-
const l = [],
|
|
3165
|
+
const l = [], u = n && Array.isArray(n);
|
|
3166
3166
|
if (yn(l, t, n, r))
|
|
3167
|
-
return De(() => n =
|
|
3167
|
+
return De(() => n = ut(e, l, n, s, !0)), () => n;
|
|
3168
3168
|
if (a) {
|
|
3169
3169
|
if (!l.length) return n;
|
|
3170
3170
|
if (s === void 0) return n = [...e.childNodes];
|
|
3171
|
-
let
|
|
3172
|
-
if (
|
|
3173
|
-
const
|
|
3174
|
-
for (; (
|
|
3175
|
-
return n =
|
|
3171
|
+
let f = l[0];
|
|
3172
|
+
if (f.parentNode !== e) return n;
|
|
3173
|
+
const d = [f];
|
|
3174
|
+
for (; (f = f.nextSibling) !== s; ) d.push(f);
|
|
3175
|
+
return n = d;
|
|
3176
3176
|
}
|
|
3177
3177
|
if (l.length === 0) {
|
|
3178
|
-
if (n =
|
|
3179
|
-
} else
|
|
3178
|
+
if (n = Me(e, n, s), o) return n;
|
|
3179
|
+
} else u ? n.length === 0 ? ts(e, l, s) : zo(e, n, l) : (n && Me(e), ts(e, l));
|
|
3180
3180
|
n = l;
|
|
3181
3181
|
} else if (t.nodeType) {
|
|
3182
3182
|
if (a && t.parentNode) return n = o ? [t] : t;
|
|
3183
3183
|
if (Array.isArray(n)) {
|
|
3184
|
-
if (o) return n =
|
|
3185
|
-
|
|
3184
|
+
if (o) return n = Me(e, n, s, t);
|
|
3185
|
+
Me(e, n, null, t);
|
|
3186
3186
|
} else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
3187
3187
|
n = t;
|
|
3188
3188
|
}
|
|
@@ -3192,20 +3192,20 @@ function dt(e, t, n, s, r) {
|
|
|
3192
3192
|
function yn(e, t, n, s) {
|
|
3193
3193
|
let r = !1;
|
|
3194
3194
|
for (let a = 0, i = t.length; a < i; a++) {
|
|
3195
|
-
let o = t[a], l = n && n[e.length],
|
|
3196
|
-
if (!(o == null || o === !0 || o === !1)) if ((
|
|
3195
|
+
let o = t[a], l = n && n[e.length], u;
|
|
3196
|
+
if (!(o == null || o === !0 || o === !1)) if ((u = typeof o) == "object" && o.nodeType)
|
|
3197
3197
|
e.push(o);
|
|
3198
3198
|
else if (Array.isArray(o))
|
|
3199
3199
|
r = yn(e, o, l) || r;
|
|
3200
|
-
else if (
|
|
3200
|
+
else if (u === "function")
|
|
3201
3201
|
if (s) {
|
|
3202
3202
|
for (; typeof o == "function"; ) o = o();
|
|
3203
3203
|
r = yn(e, Array.isArray(o) ? o : [o], Array.isArray(l) ? l : [l]) || r;
|
|
3204
3204
|
} else
|
|
3205
3205
|
e.push(o), r = !0;
|
|
3206
3206
|
else {
|
|
3207
|
-
const
|
|
3208
|
-
l && l.nodeType === 3 && l.data ===
|
|
3207
|
+
const f = String(o);
|
|
3208
|
+
l && l.nodeType === 3 && l.data === f ? e.push(l) : e.push(document.createTextNode(f));
|
|
3209
3209
|
}
|
|
3210
3210
|
}
|
|
3211
3211
|
return r;
|
|
@@ -3213,7 +3213,7 @@ function yn(e, t, n, s) {
|
|
|
3213
3213
|
function ts(e, t, n = null) {
|
|
3214
3214
|
for (let s = 0, r = t.length; s < r; s++) e.insertBefore(t[s], n);
|
|
3215
3215
|
}
|
|
3216
|
-
function
|
|
3216
|
+
function Me(e, t, n, s) {
|
|
3217
3217
|
if (n === void 0) return e.textContent = "";
|
|
3218
3218
|
const r = s || document.createTextNode("");
|
|
3219
3219
|
if (t.length) {
|
|
@@ -3228,26 +3228,26 @@ function Be(e, t, n, s) {
|
|
|
3228
3228
|
} else e.insertBefore(r, n);
|
|
3229
3229
|
return [r];
|
|
3230
3230
|
}
|
|
3231
|
-
function
|
|
3232
|
-
return
|
|
3231
|
+
function ol() {
|
|
3232
|
+
return _.getNextContextId();
|
|
3233
3233
|
}
|
|
3234
|
-
var
|
|
3234
|
+
var ll = "http://www.w3.org/2000/svg";
|
|
3235
3235
|
function Xs(e, t = !1) {
|
|
3236
|
-
return t ? document.createElementNS(
|
|
3236
|
+
return t ? document.createElementNS(ll, e) : document.createElement(e);
|
|
3237
3237
|
}
|
|
3238
|
-
function
|
|
3238
|
+
function au(e) {
|
|
3239
3239
|
const {
|
|
3240
3240
|
useShadow: t
|
|
3241
3241
|
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = Xn();
|
|
3242
|
-
let a, i = !!
|
|
3242
|
+
let a, i = !!_.context;
|
|
3243
3243
|
return Ms(() => {
|
|
3244
3244
|
i && (Xn().user = i = !1), a || (a = Fs(r, () => J(() => e.children)));
|
|
3245
3245
|
const o = s();
|
|
3246
3246
|
if (o instanceof HTMLHeadElement) {
|
|
3247
|
-
const [l,
|
|
3248
|
-
Oe((
|
|
3247
|
+
const [l, u] = F(!1), f = () => u(!0);
|
|
3248
|
+
Oe((d) => pn(o, () => l() ? d() : a(), null)), lt(f);
|
|
3249
3249
|
} else {
|
|
3250
|
-
const l = Xs(e.isSVG ? "g" : "div", e.isSVG),
|
|
3250
|
+
const l = Xs(e.isSVG ? "g" : "div", e.isSVG), u = t && l.attachShadow ? l.attachShadow({
|
|
3251
3251
|
mode: "open"
|
|
3252
3252
|
}) : l;
|
|
3253
3253
|
Object.defineProperty(l, "_$host", {
|
|
@@ -3255,13 +3255,13 @@ function su(e) {
|
|
|
3255
3255
|
return n.parentNode;
|
|
3256
3256
|
},
|
|
3257
3257
|
configurable: !0
|
|
3258
|
-
}), pn(
|
|
3258
|
+
}), pn(u, a), o.appendChild(l), e.ref && e.ref(l), lt(() => o.removeChild(l));
|
|
3259
3259
|
}
|
|
3260
3260
|
}, void 0, {
|
|
3261
3261
|
render: !i
|
|
3262
3262
|
}), n;
|
|
3263
3263
|
}
|
|
3264
|
-
function
|
|
3264
|
+
function cl(e, t) {
|
|
3265
3265
|
const n = J(e);
|
|
3266
3266
|
return J(() => {
|
|
3267
3267
|
const s = n();
|
|
@@ -3269,16 +3269,16 @@ function ol(e, t) {
|
|
|
3269
3269
|
case "function":
|
|
3270
3270
|
return Z(() => s(t));
|
|
3271
3271
|
case "string":
|
|
3272
|
-
const r =
|
|
3273
|
-
return
|
|
3272
|
+
const r = $o.has(s), a = _.context ? al() : Xs(s, r);
|
|
3273
|
+
return nl(a, t, r), a;
|
|
3274
3274
|
}
|
|
3275
3275
|
});
|
|
3276
3276
|
}
|
|
3277
|
-
function
|
|
3278
|
-
const [, t] =
|
|
3279
|
-
return
|
|
3277
|
+
function iu(e) {
|
|
3278
|
+
const [, t] = Uo(e, ["component"]);
|
|
3279
|
+
return cl(() => e.component, t);
|
|
3280
3280
|
}
|
|
3281
|
-
var
|
|
3281
|
+
var ul = class {
|
|
3282
3282
|
constructor() {
|
|
3283
3283
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
3284
3284
|
}
|
|
@@ -3296,7 +3296,7 @@ var ll = class {
|
|
|
3296
3296
|
}
|
|
3297
3297
|
}, Zs = class {
|
|
3298
3298
|
constructor(e) {
|
|
3299
|
-
this.generateIdentifier = e, this.kv = new
|
|
3299
|
+
this.generateIdentifier = e, this.kv = new ul();
|
|
3300
3300
|
}
|
|
3301
3301
|
register(e, t) {
|
|
3302
3302
|
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
@@ -3310,7 +3310,7 @@ var ll = class {
|
|
|
3310
3310
|
getValue(e) {
|
|
3311
3311
|
return this.kv.getByKey(e);
|
|
3312
3312
|
}
|
|
3313
|
-
},
|
|
3313
|
+
}, dl = class extends Zs {
|
|
3314
3314
|
constructor() {
|
|
3315
3315
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
3316
3316
|
}
|
|
@@ -3321,7 +3321,7 @@ var ll = class {
|
|
|
3321
3321
|
return this.classToAllowedProps.get(e);
|
|
3322
3322
|
}
|
|
3323
3323
|
};
|
|
3324
|
-
function
|
|
3324
|
+
function fl(e) {
|
|
3325
3325
|
if ("values" in Object)
|
|
3326
3326
|
return Object.values(e);
|
|
3327
3327
|
const t = [];
|
|
@@ -3329,8 +3329,8 @@ function ul(e) {
|
|
|
3329
3329
|
e.hasOwnProperty(n) && t.push(e[n]);
|
|
3330
3330
|
return t;
|
|
3331
3331
|
}
|
|
3332
|
-
function
|
|
3333
|
-
const n =
|
|
3332
|
+
function hl(e, t) {
|
|
3333
|
+
const n = fl(e);
|
|
3334
3334
|
if ("find" in n)
|
|
3335
3335
|
return n.find(t);
|
|
3336
3336
|
const s = n;
|
|
@@ -3340,7 +3340,7 @@ function dl(e, t) {
|
|
|
3340
3340
|
return a;
|
|
3341
3341
|
}
|
|
3342
3342
|
}
|
|
3343
|
-
function
|
|
3343
|
+
function nt(e, t) {
|
|
3344
3344
|
Object.entries(e).forEach(([n, s]) => t(s, n));
|
|
3345
3345
|
}
|
|
3346
3346
|
function Rt(e, t) {
|
|
@@ -3353,7 +3353,7 @@ function ns(e, t) {
|
|
|
3353
3353
|
return s;
|
|
3354
3354
|
}
|
|
3355
3355
|
}
|
|
3356
|
-
var
|
|
3356
|
+
var gl = class {
|
|
3357
3357
|
constructor() {
|
|
3358
3358
|
this.transfomers = {};
|
|
3359
3359
|
}
|
|
@@ -3361,12 +3361,12 @@ var fl = class {
|
|
|
3361
3361
|
this.transfomers[e.name] = e;
|
|
3362
3362
|
}
|
|
3363
3363
|
findApplicable(e) {
|
|
3364
|
-
return
|
|
3364
|
+
return hl(this.transfomers, (t) => t.isApplicable(e));
|
|
3365
3365
|
}
|
|
3366
3366
|
findByName(e) {
|
|
3367
3367
|
return this.transfomers[e];
|
|
3368
3368
|
}
|
|
3369
|
-
},
|
|
3369
|
+
}, ml = (e) => Object.prototype.toString.call(e).slice(8, -1), er = (e) => typeof e > "u", El = (e) => e === null, dt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, An = (e) => dt(e) && Object.keys(e).length === 0, ve = (e) => Array.isArray(e), pl = (e) => typeof e == "string", yl = (e) => typeof e == "number" && !isNaN(e), Al = (e) => typeof e == "boolean", Tl = (e) => e instanceof RegExp, ft = (e) => e instanceof Map, ht = (e) => e instanceof Set, tr = (e) => ml(e) === "Symbol", Sl = (e) => e instanceof Date && !isNaN(e.valueOf()), _l = (e) => e instanceof Error, ss = (e) => typeof e == "number" && isNaN(e), Pl = (e) => Al(e) || El(e) || er(e) || yl(e) || pl(e) || tr(e), vl = (e) => typeof e == "bigint", wl = (e) => e === 1 / 0 || e === -1 / 0, bl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Il = (e) => e instanceof URL, nr = (e) => e.replace(/\./g, "\\."), un = (e) => e.map(String).map(nr).join("."), ot = (e) => {
|
|
3370
3370
|
const t = [];
|
|
3371
3371
|
let n = "";
|
|
3372
3372
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -3395,9 +3395,9 @@ function fe(e, t, n, s) {
|
|
|
3395
3395
|
var sr = [
|
|
3396
3396
|
fe(er, "undefined", () => null, () => {
|
|
3397
3397
|
}),
|
|
3398
|
-
fe(
|
|
3399
|
-
fe(
|
|
3400
|
-
fe(
|
|
3398
|
+
fe(vl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
3399
|
+
fe(Sl, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
3400
|
+
fe(_l, "Error", (e, t) => {
|
|
3401
3401
|
const n = {
|
|
3402
3402
|
name: e.name,
|
|
3403
3403
|
message: e.message
|
|
@@ -3411,22 +3411,22 @@ var sr = [
|
|
|
3411
3411
|
n[s] = e[s];
|
|
3412
3412
|
}), n;
|
|
3413
3413
|
}),
|
|
3414
|
-
fe(
|
|
3414
|
+
fe(Tl, "regexp", (e) => "" + e, (e) => {
|
|
3415
3415
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
3416
3416
|
return new RegExp(t, n);
|
|
3417
3417
|
}),
|
|
3418
3418
|
fe(
|
|
3419
|
-
|
|
3419
|
+
ht,
|
|
3420
3420
|
"set",
|
|
3421
3421
|
// (sets only exist in es6+)
|
|
3422
3422
|
// eslint-disable-next-line es5/no-es6-methods
|
|
3423
3423
|
(e) => [...e.values()],
|
|
3424
3424
|
(e) => new Set(e)
|
|
3425
3425
|
),
|
|
3426
|
-
fe(
|
|
3427
|
-
fe((e) => ss(e) ||
|
|
3426
|
+
fe(ft, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
3427
|
+
fe((e) => ss(e) || wl(e), "number", (e) => ss(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
3428
3428
|
fe((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
3429
|
-
fe(
|
|
3429
|
+
fe(Il, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
3430
3430
|
];
|
|
3431
3431
|
function Zt(e, t, n, s) {
|
|
3432
3432
|
return {
|
|
@@ -3441,7 +3441,7 @@ var rr = Zt((e, t) => tr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
3441
3441
|
if (!s)
|
|
3442
3442
|
throw new Error("Trying to deserialize unknown symbol");
|
|
3443
3443
|
return s;
|
|
3444
|
-
}),
|
|
3444
|
+
}), Cl = [
|
|
3445
3445
|
Int8Array,
|
|
3446
3446
|
Uint8Array,
|
|
3447
3447
|
Int16Array,
|
|
@@ -3451,8 +3451,8 @@ var rr = Zt((e, t) => tr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
3451
3451
|
Float32Array,
|
|
3452
3452
|
Float64Array,
|
|
3453
3453
|
Uint8ClampedArray
|
|
3454
|
-
].reduce((e, t) => (e[t.name] = t, e), {}), ar = Zt(
|
|
3455
|
-
const n =
|
|
3454
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), ar = Zt(bl, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
3455
|
+
const n = Cl[t[1]];
|
|
3456
3456
|
if (!n)
|
|
3457
3457
|
throw new Error("Trying to deserialize unknown typed array");
|
|
3458
3458
|
return new n(e);
|
|
@@ -3478,8 +3478,8 @@ var or = Zt(ir, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
3478
3478
|
if (!s)
|
|
3479
3479
|
throw new Error("Trying to deserialize unknown custom value");
|
|
3480
3480
|
return s.deserialize(e);
|
|
3481
|
-
}),
|
|
3482
|
-
const n = ns(
|
|
3481
|
+
}), Nl = [or, rr, lr, ar], rs = (e, t) => {
|
|
3482
|
+
const n = ns(Nl, (r) => r.isApplicable(e, t));
|
|
3483
3483
|
if (n)
|
|
3484
3484
|
return {
|
|
3485
3485
|
value: n.transform(e, t),
|
|
@@ -3495,7 +3495,7 @@ var or = Zt(ir, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
3495
3495
|
sr.forEach((e) => {
|
|
3496
3496
|
cr[e.annotation] = e;
|
|
3497
3497
|
});
|
|
3498
|
-
var
|
|
3498
|
+
var Ll = (e, t, n) => {
|
|
3499
3499
|
if (ve(t))
|
|
3500
3500
|
switch (t[0]) {
|
|
3501
3501
|
case "symbol":
|
|
@@ -3515,7 +3515,7 @@ var Cl = (e, t, n) => {
|
|
|
3515
3515
|
throw new Error("Unknown transformation: " + t);
|
|
3516
3516
|
return s.untransform(e, n);
|
|
3517
3517
|
}
|
|
3518
|
-
},
|
|
3518
|
+
}, Fe = (e, t) => {
|
|
3519
3519
|
if (t > e.size)
|
|
3520
3520
|
throw new Error("index out of bounds");
|
|
3521
3521
|
const n = e.keys();
|
|
@@ -3531,14 +3531,14 @@ function ur(e) {
|
|
|
3531
3531
|
if (Rt(e, "constructor"))
|
|
3532
3532
|
throw new Error("constructor is not allowed as a property");
|
|
3533
3533
|
}
|
|
3534
|
-
var
|
|
3534
|
+
var kl = (e, t) => {
|
|
3535
3535
|
ur(t);
|
|
3536
3536
|
for (let n = 0; n < t.length; n++) {
|
|
3537
3537
|
const s = t[n];
|
|
3538
|
-
if (
|
|
3539
|
-
e =
|
|
3540
|
-
else if (
|
|
3541
|
-
const r = +s, a = +t[++n] == 0 ? "key" : "value", i =
|
|
3538
|
+
if (ht(e))
|
|
3539
|
+
e = Fe(e, +s);
|
|
3540
|
+
else if (ft(e)) {
|
|
3541
|
+
const r = +s, a = +t[++n] == 0 ? "key" : "value", i = Fe(e, r);
|
|
3542
3542
|
switch (a) {
|
|
3543
3543
|
case "key":
|
|
3544
3544
|
e = i;
|
|
@@ -3560,32 +3560,32 @@ var Nl = (e, t) => {
|
|
|
3560
3560
|
if (ve(s)) {
|
|
3561
3561
|
const o = +i;
|
|
3562
3562
|
s = s[o];
|
|
3563
|
-
} else if (
|
|
3563
|
+
} else if (dt(s))
|
|
3564
3564
|
s = s[i];
|
|
3565
|
-
else if (
|
|
3565
|
+
else if (ht(s)) {
|
|
3566
3566
|
const o = +i;
|
|
3567
|
-
s =
|
|
3568
|
-
} else if (
|
|
3567
|
+
s = Fe(s, o);
|
|
3568
|
+
} else if (ft(s)) {
|
|
3569
3569
|
if (a === t.length - 2)
|
|
3570
3570
|
break;
|
|
3571
|
-
const l = +i,
|
|
3572
|
-
switch (
|
|
3571
|
+
const l = +i, u = +t[++a] == 0 ? "key" : "value", f = Fe(s, l);
|
|
3572
|
+
switch (u) {
|
|
3573
3573
|
case "key":
|
|
3574
|
-
s =
|
|
3574
|
+
s = f;
|
|
3575
3575
|
break;
|
|
3576
3576
|
case "value":
|
|
3577
|
-
s = s.get(
|
|
3577
|
+
s = s.get(f);
|
|
3578
3578
|
break;
|
|
3579
3579
|
}
|
|
3580
3580
|
}
|
|
3581
3581
|
}
|
|
3582
3582
|
const r = t[t.length - 1];
|
|
3583
|
-
if (ve(s) ? s[+r] = n(s[+r]) :
|
|
3584
|
-
const a =
|
|
3583
|
+
if (ve(s) ? s[+r] = n(s[+r]) : dt(s) && (s[r] = n(s[r])), ht(s)) {
|
|
3584
|
+
const a = Fe(s, +r), i = n(a);
|
|
3585
3585
|
a !== i && (s.delete(a), s.add(i));
|
|
3586
3586
|
}
|
|
3587
|
-
if (
|
|
3588
|
-
const a = +t[t.length - 2], i =
|
|
3587
|
+
if (ft(s)) {
|
|
3588
|
+
const a = +t[t.length - 2], i = Fe(s, a);
|
|
3589
3589
|
switch (+r == 0 ? "key" : "value") {
|
|
3590
3590
|
case "key": {
|
|
3591
3591
|
const l = n(i);
|
|
@@ -3604,41 +3604,41 @@ function Sn(e, t, n = []) {
|
|
|
3604
3604
|
if (!e)
|
|
3605
3605
|
return;
|
|
3606
3606
|
if (!ve(e)) {
|
|
3607
|
-
|
|
3607
|
+
nt(e, (a, i) => Sn(a, t, [...n, ...ot(i)]));
|
|
3608
3608
|
return;
|
|
3609
3609
|
}
|
|
3610
3610
|
const [s, r] = e;
|
|
3611
|
-
r &&
|
|
3612
|
-
Sn(a, t, [...n, ...
|
|
3611
|
+
r && nt(r, (a, i) => {
|
|
3612
|
+
Sn(a, t, [...n, ...ot(i)]);
|
|
3613
3613
|
}), t(s, n);
|
|
3614
3614
|
}
|
|
3615
|
-
function
|
|
3615
|
+
function Ol(e, t, n) {
|
|
3616
3616
|
return Sn(t, (s, r) => {
|
|
3617
|
-
e = Tn(e, r, (a) =>
|
|
3617
|
+
e = Tn(e, r, (a) => Ll(a, s, n));
|
|
3618
3618
|
}), e;
|
|
3619
3619
|
}
|
|
3620
|
-
function
|
|
3620
|
+
function Dl(e, t) {
|
|
3621
3621
|
function n(s, r) {
|
|
3622
|
-
const a =
|
|
3623
|
-
s.map(
|
|
3622
|
+
const a = kl(e, ot(r));
|
|
3623
|
+
s.map(ot).forEach((i) => {
|
|
3624
3624
|
e = Tn(e, i, () => a);
|
|
3625
3625
|
});
|
|
3626
3626
|
}
|
|
3627
3627
|
if (ve(t)) {
|
|
3628
3628
|
const [s, r] = t;
|
|
3629
3629
|
s.forEach((a) => {
|
|
3630
|
-
e = Tn(e,
|
|
3631
|
-
}), r &&
|
|
3630
|
+
e = Tn(e, ot(a), () => e);
|
|
3631
|
+
}), r && nt(r, n);
|
|
3632
3632
|
} else
|
|
3633
|
-
|
|
3633
|
+
nt(t, n);
|
|
3634
3634
|
return e;
|
|
3635
3635
|
}
|
|
3636
|
-
var
|
|
3637
|
-
function
|
|
3636
|
+
var Gl = (e, t) => dt(e) || ve(e) || ft(e) || ht(e) || ir(e, t);
|
|
3637
|
+
function xl(e, t, n) {
|
|
3638
3638
|
const s = n.get(e);
|
|
3639
3639
|
s ? s.push(t) : n.set(e, [t]);
|
|
3640
3640
|
}
|
|
3641
|
-
function
|
|
3641
|
+
function Rl(e, t) {
|
|
3642
3642
|
const n = {};
|
|
3643
3643
|
let s;
|
|
3644
3644
|
return e.forEach((r) => {
|
|
@@ -3650,16 +3650,16 @@ function Gl(e, t) {
|
|
|
3650
3650
|
}), s ? An(n) ? [s] : [s, n] : An(n) ? void 0 : n;
|
|
3651
3651
|
}
|
|
3652
3652
|
var dr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
3653
|
-
const o =
|
|
3653
|
+
const o = Pl(e);
|
|
3654
3654
|
if (!o) {
|
|
3655
|
-
|
|
3655
|
+
xl(e, r, t);
|
|
3656
3656
|
const g = i.get(e);
|
|
3657
3657
|
if (g)
|
|
3658
3658
|
return s ? {
|
|
3659
3659
|
transformedValue: null
|
|
3660
3660
|
} : g;
|
|
3661
3661
|
}
|
|
3662
|
-
if (!
|
|
3662
|
+
if (!Gl(e, n)) {
|
|
3663
3663
|
const g = rs(e, n), A = g ? {
|
|
3664
3664
|
transformedValue: g.value,
|
|
3665
3665
|
annotations: [g.type]
|
|
@@ -3672,21 +3672,21 @@ var dr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3672
3672
|
return {
|
|
3673
3673
|
transformedValue: null
|
|
3674
3674
|
};
|
|
3675
|
-
const l = rs(e, n),
|
|
3676
|
-
|
|
3675
|
+
const l = rs(e, n), u = (l == null ? void 0 : l.value) ?? e, f = ve(u) ? [] : {}, d = {};
|
|
3676
|
+
nt(u, (g, A) => {
|
|
3677
3677
|
if (A === "__proto__" || A === "constructor" || A === "prototype")
|
|
3678
3678
|
throw new Error(`Detected property ${A}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3679
3679
|
const T = dr(g, t, n, s, [...r, A], [...a, e], i);
|
|
3680
|
-
|
|
3681
|
-
|
|
3680
|
+
f[A] = T.transformedValue, ve(T.annotations) ? d[A] = T.annotations : dt(T.annotations) && nt(T.annotations, (p, y) => {
|
|
3681
|
+
d[nr(A) + "." + y] = p;
|
|
3682
3682
|
});
|
|
3683
3683
|
});
|
|
3684
|
-
const h = An(
|
|
3685
|
-
transformedValue:
|
|
3684
|
+
const h = An(d) ? {
|
|
3685
|
+
transformedValue: f,
|
|
3686
3686
|
annotations: l ? [l.type] : void 0
|
|
3687
3687
|
} : {
|
|
3688
|
-
transformedValue:
|
|
3689
|
-
annotations: l ? [l.type,
|
|
3688
|
+
transformedValue: f,
|
|
3689
|
+
annotations: l ? [l.type, d] : d
|
|
3690
3690
|
};
|
|
3691
3691
|
return o || i.set(e, h), h;
|
|
3692
3692
|
};
|
|
@@ -3696,13 +3696,13 @@ function fr(e) {
|
|
|
3696
3696
|
function as(e) {
|
|
3697
3697
|
return fr(e) === "Array";
|
|
3698
3698
|
}
|
|
3699
|
-
function
|
|
3699
|
+
function Ul(e) {
|
|
3700
3700
|
if (fr(e) !== "Object")
|
|
3701
3701
|
return !1;
|
|
3702
3702
|
const t = Object.getPrototypeOf(e);
|
|
3703
3703
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
3704
3704
|
}
|
|
3705
|
-
function
|
|
3705
|
+
function Bl(e, t, n, s, r) {
|
|
3706
3706
|
const a = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
|
|
3707
3707
|
a === "enumerable" && (e[t] = n), r && a === "nonenumerable" && Object.defineProperty(e, t, {
|
|
3708
3708
|
value: n,
|
|
@@ -3714,14 +3714,14 @@ function Rl(e, t, n, s, r) {
|
|
|
3714
3714
|
function _n(e, t = {}) {
|
|
3715
3715
|
if (as(e))
|
|
3716
3716
|
return e.map((r) => _n(r, t));
|
|
3717
|
-
if (!
|
|
3717
|
+
if (!Ul(e))
|
|
3718
3718
|
return e;
|
|
3719
3719
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
3720
3720
|
return [...n, ...s].reduce((r, a) => {
|
|
3721
3721
|
if (as(t.props) && !t.props.includes(a))
|
|
3722
3722
|
return r;
|
|
3723
3723
|
const i = e[a], o = _n(i, t);
|
|
3724
|
-
return
|
|
3724
|
+
return Bl(r, a, o, e, t.nonenumerable), r;
|
|
3725
3725
|
}, {});
|
|
3726
3726
|
}
|
|
3727
3727
|
var x = class {
|
|
@@ -3729,7 +3729,7 @@ var x = class {
|
|
|
3729
3729
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
3730
3730
|
*/
|
|
3731
3731
|
constructor({ dedupe: e = !1 } = {}) {
|
|
3732
|
-
this.classRegistry = new
|
|
3732
|
+
this.classRegistry = new dl(), this.symbolRegistry = new Zs((t) => t.description ?? ""), this.customTransformerRegistry = new gl(), this.allowedErrorProps = [], this.dedupe = e;
|
|
3733
3733
|
}
|
|
3734
3734
|
serialize(e) {
|
|
3735
3735
|
const t = /* @__PURE__ */ new Map(), n = dr(e, t, this, this.dedupe), s = {
|
|
@@ -3739,7 +3739,7 @@ var x = class {
|
|
|
3739
3739
|
...s.meta,
|
|
3740
3740
|
values: n.annotations
|
|
3741
3741
|
});
|
|
3742
|
-
const r =
|
|
3742
|
+
const r = Rl(t, this.dedupe);
|
|
3743
3743
|
return r && (s.meta = {
|
|
3744
3744
|
...s.meta,
|
|
3745
3745
|
referentialEqualities: r
|
|
@@ -3748,7 +3748,7 @@ var x = class {
|
|
|
3748
3748
|
deserialize(e) {
|
|
3749
3749
|
const { json: t, meta: n } = e;
|
|
3750
3750
|
let s = _n(t);
|
|
3751
|
-
return n != null && n.values && (s =
|
|
3751
|
+
return n != null && n.values && (s = Ol(s, n.values, this)), n != null && n.referentialEqualities && (s = Dl(s, n.referentialEqualities)), s;
|
|
3752
3752
|
}
|
|
3753
3753
|
stringify(e) {
|
|
3754
3754
|
return JSON.stringify(this.serialize(e));
|
|
@@ -3781,50 +3781,50 @@ x.registerClass = x.defaultInstance.registerClass.bind(x.defaultInstance);
|
|
|
3781
3781
|
x.registerSymbol = x.defaultInstance.registerSymbol.bind(x.defaultInstance);
|
|
3782
3782
|
x.registerCustom = x.defaultInstance.registerCustom.bind(x.defaultInstance);
|
|
3783
3783
|
x.allowErrorProps = x.defaultInstance.allowErrorProps.bind(x.defaultInstance);
|
|
3784
|
-
var
|
|
3785
|
-
function
|
|
3784
|
+
var Ml = x.serialize, ou = x.stringify;
|
|
3785
|
+
function lu(e) {
|
|
3786
3786
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
3787
3787
|
}
|
|
3788
|
-
function
|
|
3788
|
+
function cu(e, t) {
|
|
3789
3789
|
return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
3790
3790
|
}
|
|
3791
|
-
function
|
|
3791
|
+
function uu({
|
|
3792
3792
|
queryState: e,
|
|
3793
3793
|
observerCount: t,
|
|
3794
3794
|
isStale: n
|
|
3795
3795
|
}) {
|
|
3796
3796
|
return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
|
|
3797
3797
|
}
|
|
3798
|
-
function
|
|
3798
|
+
function du({
|
|
3799
3799
|
status: e,
|
|
3800
3800
|
isPaused: t
|
|
3801
3801
|
}) {
|
|
3802
3802
|
return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
|
|
3803
3803
|
}
|
|
3804
|
-
function
|
|
3804
|
+
function fu(e) {
|
|
3805
3805
|
return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
|
|
3806
3806
|
}
|
|
3807
|
-
var
|
|
3807
|
+
var hu = (e, t = !1) => {
|
|
3808
3808
|
const {
|
|
3809
3809
|
json: n
|
|
3810
|
-
} =
|
|
3810
|
+
} = Ml(e);
|
|
3811
3811
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
3812
|
-
}, kt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3,
|
|
3813
|
-
status:
|
|
3814
|
-
"query hash":
|
|
3812
|
+
}, kt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, Fl = (e, t) => e.queryHash.localeCompare(t.queryHash), hr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, ql = (e, t) => kt(e) === kt(t) ? hr(e, t) : kt(e) > kt(t) ? 1 : -1, gu = {
|
|
3813
|
+
status: ql,
|
|
3814
|
+
"query hash": Fl,
|
|
3815
3815
|
"last updated": hr
|
|
3816
|
-
}, Ot = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, gr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1,
|
|
3817
|
-
status:
|
|
3816
|
+
}, Ot = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, gr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Kl = (e, t) => Ot(e) === Ot(t) ? gr(e, t) : Ot(e) > Ot(t) ? 1 : -1, mu = {
|
|
3817
|
+
status: Kl,
|
|
3818
3818
|
"last updated": gr
|
|
3819
|
-
},
|
|
3819
|
+
}, Eu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), pu = () => {
|
|
3820
3820
|
const [e, t] = F("dark");
|
|
3821
|
-
return
|
|
3821
|
+
return bo(() => {
|
|
3822
3822
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3823
3823
|
t(n.matches ? "dark" : "light");
|
|
3824
3824
|
const s = (r) => {
|
|
3825
3825
|
t(r.matches ? "dark" : "light");
|
|
3826
3826
|
};
|
|
3827
|
-
n.addEventListener("change", s),
|
|
3827
|
+
n.addEventListener("change", s), lt(() => n.removeEventListener("change", s));
|
|
3828
3828
|
}), e;
|
|
3829
3829
|
}, Dt = (e, t, n) => {
|
|
3830
3830
|
if (t.length === 0)
|
|
@@ -3890,22 +3890,22 @@ var du = (e, t = !1) => {
|
|
|
3890
3890
|
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
|
|
3891
3891
|
const s = document.createElement("style"), r = document.createTextNode("");
|
|
3892
3892
|
s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
3893
|
-
},
|
|
3893
|
+
}, qe, gt, mt, Et, Le, pt, Ke, Ve, He, Qe, $e, yt, je, At, cs, Vl = (cs = class {
|
|
3894
3894
|
constructor(e) {
|
|
3895
|
-
D(this,
|
|
3895
|
+
D(this, qe);
|
|
3896
|
+
D(this, gt);
|
|
3896
3897
|
D(this, mt);
|
|
3897
3898
|
D(this, Et);
|
|
3898
|
-
D(this, pt);
|
|
3899
3899
|
D(this, Le, !1);
|
|
3900
|
-
D(this,
|
|
3901
|
-
D(this, qe);
|
|
3900
|
+
D(this, pt);
|
|
3902
3901
|
D(this, Ke);
|
|
3903
3902
|
D(this, Ve);
|
|
3904
3903
|
D(this, He);
|
|
3905
3904
|
D(this, Qe);
|
|
3906
|
-
D(this, At);
|
|
3907
3905
|
D(this, $e);
|
|
3908
|
-
D(this,
|
|
3906
|
+
D(this, yt);
|
|
3907
|
+
D(this, je);
|
|
3908
|
+
D(this, At);
|
|
3909
3909
|
const {
|
|
3910
3910
|
client: t,
|
|
3911
3911
|
queryFlavor: n,
|
|
@@ -3915,45 +3915,45 @@ var du = (e, t = !1) => {
|
|
|
3915
3915
|
position: i,
|
|
3916
3916
|
initialIsOpen: o,
|
|
3917
3917
|
errorTypes: l,
|
|
3918
|
-
styleNonce:
|
|
3919
|
-
shadowDOMTarget:
|
|
3920
|
-
hideDisabledQueries:
|
|
3918
|
+
styleNonce: u,
|
|
3919
|
+
shadowDOMTarget: f,
|
|
3920
|
+
hideDisabledQueries: d
|
|
3921
3921
|
} = e;
|
|
3922
|
-
k(this,
|
|
3922
|
+
k(this, qe, F(t)), k(this, mt, n), k(this, Et, s), k(this, gt, r), k(this, pt, u), k(this, Ke, f), k(this, Ve, F(a)), k(this, He, F(i)), k(this, Qe, F(o)), k(this, $e, F(l)), k(this, yt, F(d));
|
|
3923
3923
|
}
|
|
3924
3924
|
setButtonPosition(e) {
|
|
3925
|
-
S(this,
|
|
3925
|
+
S(this, Ve)[1](e);
|
|
3926
3926
|
}
|
|
3927
3927
|
setPosition(e) {
|
|
3928
|
-
S(this,
|
|
3928
|
+
S(this, He)[1](e);
|
|
3929
3929
|
}
|
|
3930
3930
|
setInitialIsOpen(e) {
|
|
3931
|
-
S(this,
|
|
3931
|
+
S(this, Qe)[1](e);
|
|
3932
3932
|
}
|
|
3933
3933
|
setErrorTypes(e) {
|
|
3934
|
-
S(this,
|
|
3934
|
+
S(this, $e)[1](e);
|
|
3935
3935
|
}
|
|
3936
3936
|
setClient(e) {
|
|
3937
|
-
S(this,
|
|
3937
|
+
S(this, qe)[1](e);
|
|
3938
3938
|
}
|
|
3939
3939
|
mount(e) {
|
|
3940
3940
|
if (S(this, Le))
|
|
3941
3941
|
throw new Error("Devtools is already mounted");
|
|
3942
3942
|
const t = Ys(() => {
|
|
3943
|
-
const n = this, [s] = S(this,
|
|
3944
|
-
let
|
|
3945
|
-
return S(this,
|
|
3943
|
+
const n = this, [s] = S(this, Ve), [r] = S(this, He), [a] = S(this, Qe), [i] = S(this, $e), [o] = S(this, yt), [l] = S(this, qe);
|
|
3944
|
+
let u;
|
|
3945
|
+
return S(this, je) ? u = S(this, je) : (u = zs(() => import("./NCMVHL6D-CTrkJrNW.js")), k(this, je, u)), mr(S(this, pt), S(this, Ke)), $s(u, js({
|
|
3946
3946
|
get queryFlavor() {
|
|
3947
|
-
return S(n,
|
|
3947
|
+
return S(n, mt);
|
|
3948
3948
|
},
|
|
3949
3949
|
get version() {
|
|
3950
|
-
return S(n,
|
|
3950
|
+
return S(n, Et);
|
|
3951
3951
|
},
|
|
3952
3952
|
get onlineManager() {
|
|
3953
|
-
return S(n,
|
|
3953
|
+
return S(n, gt);
|
|
3954
3954
|
},
|
|
3955
3955
|
get shadowDOMTarget() {
|
|
3956
|
-
return S(n,
|
|
3956
|
+
return S(n, Ke);
|
|
3957
3957
|
}
|
|
3958
3958
|
}, {
|
|
3959
3959
|
get client() {
|
|
@@ -3976,31 +3976,31 @@ var du = (e, t = !1) => {
|
|
|
3976
3976
|
}
|
|
3977
3977
|
}));
|
|
3978
3978
|
}, e);
|
|
3979
|
-
k(this, Le, !0), k(this,
|
|
3979
|
+
k(this, Le, !0), k(this, At, t);
|
|
3980
3980
|
}
|
|
3981
3981
|
unmount() {
|
|
3982
3982
|
var e;
|
|
3983
3983
|
if (!S(this, Le))
|
|
3984
3984
|
throw new Error("Devtools is not mounted");
|
|
3985
|
-
(e = S(this,
|
|
3985
|
+
(e = S(this, At)) == null || e.call(this), k(this, Le, !1);
|
|
3986
3986
|
}
|
|
3987
|
-
},
|
|
3987
|
+
}, qe = new WeakMap(), gt = new WeakMap(), mt = new WeakMap(), Et = new WeakMap(), Le = new WeakMap(), pt = new WeakMap(), Ke = new WeakMap(), Ve = new WeakMap(), He = new WeakMap(), Qe = new WeakMap(), $e = new WeakMap(), yt = new WeakMap(), je = new WeakMap(), At = new WeakMap(), cs), ze, Tt, St, _t, ke, Pt, We, Ye, Je, Xe, Ze, vt, et, tt, wt, us, Hl = (us = class {
|
|
3988
3988
|
constructor(e) {
|
|
3989
|
-
D(this,
|
|
3989
|
+
D(this, ze);
|
|
3990
|
+
D(this, Tt);
|
|
3990
3991
|
D(this, St);
|
|
3991
3992
|
D(this, _t);
|
|
3992
|
-
D(this, Pt);
|
|
3993
3993
|
D(this, ke, !1);
|
|
3994
|
-
D(this,
|
|
3995
|
-
D(this, ze);
|
|
3994
|
+
D(this, Pt);
|
|
3996
3995
|
D(this, We);
|
|
3997
3996
|
D(this, Ye);
|
|
3998
3997
|
D(this, Je);
|
|
3999
3998
|
D(this, Xe);
|
|
4000
|
-
D(this, wt);
|
|
4001
3999
|
D(this, Ze);
|
|
4000
|
+
D(this, vt);
|
|
4002
4001
|
D(this, et);
|
|
4003
|
-
D(this,
|
|
4002
|
+
D(this, tt);
|
|
4003
|
+
D(this, wt);
|
|
4004
4004
|
const {
|
|
4005
4005
|
client: t,
|
|
4006
4006
|
queryFlavor: n,
|
|
@@ -4010,49 +4010,49 @@ var du = (e, t = !1) => {
|
|
|
4010
4010
|
position: i,
|
|
4011
4011
|
initialIsOpen: o,
|
|
4012
4012
|
errorTypes: l,
|
|
4013
|
-
styleNonce:
|
|
4014
|
-
shadowDOMTarget:
|
|
4015
|
-
onClose:
|
|
4013
|
+
styleNonce: u,
|
|
4014
|
+
shadowDOMTarget: f,
|
|
4015
|
+
onClose: d,
|
|
4016
4016
|
hideDisabledQueries: h
|
|
4017
4017
|
} = e;
|
|
4018
|
-
k(this,
|
|
4018
|
+
k(this, ze, F(t)), k(this, St, n), k(this, _t, s), k(this, Tt, r), k(this, Pt, u), k(this, We, f), k(this, Ye, F(a)), k(this, Je, F(i)), k(this, Xe, F(o)), k(this, Ze, F(l)), k(this, vt, F(h)), k(this, et, F(d));
|
|
4019
4019
|
}
|
|
4020
4020
|
setButtonPosition(e) {
|
|
4021
|
-
S(this,
|
|
4021
|
+
S(this, Ye)[1](e);
|
|
4022
4022
|
}
|
|
4023
4023
|
setPosition(e) {
|
|
4024
|
-
S(this,
|
|
4024
|
+
S(this, Je)[1](e);
|
|
4025
4025
|
}
|
|
4026
4026
|
setInitialIsOpen(e) {
|
|
4027
|
-
S(this,
|
|
4027
|
+
S(this, Xe)[1](e);
|
|
4028
4028
|
}
|
|
4029
4029
|
setErrorTypes(e) {
|
|
4030
|
-
S(this,
|
|
4030
|
+
S(this, Ze)[1](e);
|
|
4031
4031
|
}
|
|
4032
4032
|
setClient(e) {
|
|
4033
|
-
S(this,
|
|
4033
|
+
S(this, ze)[1](e);
|
|
4034
4034
|
}
|
|
4035
4035
|
setOnClose(e) {
|
|
4036
|
-
S(this,
|
|
4036
|
+
S(this, et)[1](() => e);
|
|
4037
4037
|
}
|
|
4038
4038
|
mount(e) {
|
|
4039
4039
|
if (S(this, ke))
|
|
4040
4040
|
throw new Error("Devtools is already mounted");
|
|
4041
4041
|
const t = Ys(() => {
|
|
4042
|
-
const n = this, [s] = S(this,
|
|
4043
|
-
let
|
|
4044
|
-
return S(this,
|
|
4042
|
+
const n = this, [s] = S(this, Ye), [r] = S(this, Je), [a] = S(this, Xe), [i] = S(this, Ze), [o] = S(this, vt), [l] = S(this, ze), [u] = S(this, et);
|
|
4043
|
+
let f;
|
|
4044
|
+
return S(this, tt) ? f = S(this, tt) : (f = zs(() => import("./2AITGKQY-JdTvsit7.js")), k(this, tt, f)), mr(S(this, Pt), S(this, We)), $s(f, js({
|
|
4045
4045
|
get queryFlavor() {
|
|
4046
|
-
return S(n,
|
|
4046
|
+
return S(n, St);
|
|
4047
4047
|
},
|
|
4048
4048
|
get version() {
|
|
4049
|
-
return S(n,
|
|
4049
|
+
return S(n, _t);
|
|
4050
4050
|
},
|
|
4051
4051
|
get onlineManager() {
|
|
4052
|
-
return S(n,
|
|
4052
|
+
return S(n, Tt);
|
|
4053
4053
|
},
|
|
4054
4054
|
get shadowDOMTarget() {
|
|
4055
|
-
return S(n,
|
|
4055
|
+
return S(n, We);
|
|
4056
4056
|
}
|
|
4057
4057
|
}, {
|
|
4058
4058
|
get client() {
|
|
@@ -4074,20 +4074,20 @@ var du = (e, t = !1) => {
|
|
|
4074
4074
|
return o();
|
|
4075
4075
|
},
|
|
4076
4076
|
get onClose() {
|
|
4077
|
-
return
|
|
4077
|
+
return u();
|
|
4078
4078
|
}
|
|
4079
4079
|
}));
|
|
4080
4080
|
}, e);
|
|
4081
|
-
k(this, ke, !0), k(this,
|
|
4081
|
+
k(this, ke, !0), k(this, wt, t);
|
|
4082
4082
|
}
|
|
4083
4083
|
unmount() {
|
|
4084
4084
|
var e;
|
|
4085
4085
|
if (!S(this, ke))
|
|
4086
4086
|
throw new Error("Devtools is not mounted");
|
|
4087
|
-
(e = S(this,
|
|
4087
|
+
(e = S(this, wt)) == null || e.call(this), k(this, ke, !1);
|
|
4088
4088
|
}
|
|
4089
|
-
},
|
|
4090
|
-
function
|
|
4089
|
+
}, ze = new WeakMap(), Tt = new WeakMap(), St = new WeakMap(), _t = new WeakMap(), ke = new WeakMap(), Pt = new WeakMap(), We = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), vt = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), us);
|
|
4090
|
+
function Ql(e) {
|
|
4091
4091
|
const t = W(e.client), n = z.useRef(null), {
|
|
4092
4092
|
buttonPosition: s,
|
|
4093
4093
|
position: r,
|
|
@@ -4095,9 +4095,9 @@ function Vl(e) {
|
|
|
4095
4095
|
errorTypes: i,
|
|
4096
4096
|
styleNonce: o,
|
|
4097
4097
|
shadowDOMTarget: l,
|
|
4098
|
-
hideDisabledQueries:
|
|
4099
|
-
} = e, [
|
|
4100
|
-
new
|
|
4098
|
+
hideDisabledQueries: u
|
|
4099
|
+
} = e, [f] = z.useState(
|
|
4100
|
+
new Vl({
|
|
4101
4101
|
client: t,
|
|
4102
4102
|
queryFlavor: "React Query",
|
|
4103
4103
|
version: "5",
|
|
@@ -4108,26 +4108,26 @@ function Vl(e) {
|
|
|
4108
4108
|
errorTypes: i,
|
|
4109
4109
|
styleNonce: o,
|
|
4110
4110
|
shadowDOMTarget: l,
|
|
4111
|
-
hideDisabledQueries:
|
|
4111
|
+
hideDisabledQueries: u
|
|
4112
4112
|
})
|
|
4113
4113
|
);
|
|
4114
4114
|
return z.useEffect(() => {
|
|
4115
|
-
|
|
4116
|
-
}, [t,
|
|
4117
|
-
s &&
|
|
4118
|
-
}, [s,
|
|
4119
|
-
r &&
|
|
4120
|
-
}, [r,
|
|
4121
|
-
|
|
4122
|
-
}, [a,
|
|
4123
|
-
|
|
4124
|
-
}, [i,
|
|
4125
|
-
|
|
4126
|
-
}), [
|
|
4115
|
+
f.setClient(t);
|
|
4116
|
+
}, [t, f]), z.useEffect(() => {
|
|
4117
|
+
s && f.setButtonPosition(s);
|
|
4118
|
+
}, [s, f]), z.useEffect(() => {
|
|
4119
|
+
r && f.setPosition(r);
|
|
4120
|
+
}, [r, f]), z.useEffect(() => {
|
|
4121
|
+
f.setInitialIsOpen(a || !1);
|
|
4122
|
+
}, [a, f]), z.useEffect(() => {
|
|
4123
|
+
f.setErrorTypes(i || []);
|
|
4124
|
+
}, [i, f]), z.useEffect(() => (n.current && f.mount(n.current), () => {
|
|
4125
|
+
f.unmount();
|
|
4126
|
+
}), [f]), /* @__PURE__ */ c("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
|
|
4127
4127
|
}
|
|
4128
|
-
function
|
|
4128
|
+
function $l(e) {
|
|
4129
4129
|
const t = W(e.client), n = z.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: a, hideDisabledQueries: i } = e, [o] = z.useState(
|
|
4130
|
-
new
|
|
4130
|
+
new Hl({
|
|
4131
4131
|
client: t,
|
|
4132
4132
|
queryFlavor: "React Query",
|
|
4133
4133
|
version: "5",
|
|
@@ -4162,23 +4162,23 @@ function Hl(e) {
|
|
|
4162
4162
|
}
|
|
4163
4163
|
var is = process.env.NODE_ENV !== "development" ? function() {
|
|
4164
4164
|
return null;
|
|
4165
|
-
} :
|
|
4165
|
+
} : Ql;
|
|
4166
4166
|
process.env.NODE_ENV;
|
|
4167
|
-
const
|
|
4167
|
+
const jl = Ee(""), zl = () => {
|
|
4168
4168
|
qn("dynamic-page-selector", {
|
|
4169
4169
|
description: "Dynamic page selector"
|
|
4170
4170
|
}), qn("enable-add-page-dropdown", {
|
|
4171
4171
|
description: "Enable add page dropdown"
|
|
4172
4172
|
});
|
|
4173
|
-
},
|
|
4174
|
-
const e = N(), t =
|
|
4175
|
-
return
|
|
4173
|
+
}, Wl = () => {
|
|
4174
|
+
const e = N(), t = I();
|
|
4175
|
+
return ae({
|
|
4176
4176
|
queryKey: [E.GET_COLLECTIONS],
|
|
4177
4177
|
staleTime: 1 / 0,
|
|
4178
4178
|
queryFn: async () => t(e, { action: E.GET_COLLECTIONS })
|
|
4179
4179
|
});
|
|
4180
|
-
},
|
|
4181
|
-
const { data: e } =
|
|
4180
|
+
}, Yl = () => {
|
|
4181
|
+
const { data: e } = ie(), { data: t } = be(), { data: n } = Re(), s = N(), r = I(), a = Q(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]);
|
|
4182
4182
|
return X({
|
|
4183
4183
|
mutationFn: async ({ block: i }) => r(s, {
|
|
4184
4184
|
action: E.GET_BLOCK_ASYNC_PROPS,
|
|
@@ -4201,8 +4201,8 @@ const Ql = Ee(""), $l = () => {
|
|
|
4201
4201
|
}
|
|
4202
4202
|
})
|
|
4203
4203
|
});
|
|
4204
|
-
},
|
|
4205
|
-
const [, e] =
|
|
4204
|
+
}, Jl = () => {
|
|
4205
|
+
const [, e] = le();
|
|
4206
4206
|
return j(
|
|
4207
4207
|
(t, n) => {
|
|
4208
4208
|
const r = new URLSearchParams(window.location.search).get("lang"), a = new URLSearchParams({ page: t });
|
|
@@ -4210,93 +4210,95 @@ const Ql = Ee(""), $l = () => {
|
|
|
4210
4210
|
},
|
|
4211
4211
|
[e]
|
|
4212
4212
|
);
|
|
4213
|
-
},
|
|
4214
|
-
const e =
|
|
4213
|
+
}, Xl = () => {
|
|
4214
|
+
const e = Jl();
|
|
4215
4215
|
return j(
|
|
4216
4216
|
({ pageId: t }) => {
|
|
4217
4217
|
e(t);
|
|
4218
4218
|
},
|
|
4219
4219
|
[e]
|
|
4220
4220
|
);
|
|
4221
|
-
},
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
const
|
|
4221
|
+
}, Zl = K(() => import("./digital-asset-manager-CWneIIcn.js")), ec = K(() => import("./save-to-lib-CpFEdU_R.js")), tc = K(() => import("./theme-panel-footer-DscF7mar.js")), nc = K(() => import("./web-preview-sSS97N-o.js"));
|
|
4222
|
+
zl();
|
|
4223
|
+
Ja();
|
|
4224
|
+
Yr(eo);
|
|
4225
|
+
To();
|
|
4226
|
+
Jr(Zl);
|
|
4227
|
+
Xr(ec);
|
|
4228
|
+
const sc = {
|
|
4229
4229
|
role: "",
|
|
4230
4230
|
permissions: null
|
|
4231
4231
|
}, os = (e) => {
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4232
|
+
const { data: t } = oo();
|
|
4233
|
+
hi();
|
|
4234
|
+
const n = On(), { data: s = sc, isFetching: r } = lo(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: l } = Wl(), { data: u, isFetching: f } = Re(), d = r || i || l || f, [h] = le(), g = h.get("page"), { data: A } = ie(), { data: T, isFetching: p } = ro(), { blocks: y } = so(T), { lockingStatus: P, pageLock: w } = Ie(), { data: O, isFetching: B } = ao(), L = to(), { onSave: pe } = co(), { mutateAsync: ye } = Yl(), { getPartialBlocks: U, getPartialBlockBlocks: v } = uo(), { mutateAsync: b } = Ni(), { mutateAsync: Y } = io(), $ = Xl(), [de, bt] = q(!1), Ae = at([]), Be = Q(() => V(u, "theme", {}) || {}, [u]), Ne = he(P) && (w == null ? void 0 : w.status) === "editing", Er = (w == null ? void 0 : w.status) === "checking", xn = p || Er || B;
|
|
4235
|
+
Ae.current = y;
|
|
4236
|
+
const [pr] = te(jl);
|
|
4237
|
+
se(() => {
|
|
4238
|
+
const ne = () => {
|
|
4239
|
+
document.hidden ? bt(!0) : bt(!1);
|
|
4239
4240
|
};
|
|
4240
|
-
return window.addEventListener("visibilitychange",
|
|
4241
|
+
return window.addEventListener("visibilitychange", ne), () => window.removeEventListener("visibilitychange", ne);
|
|
4241
4242
|
}, []);
|
|
4242
|
-
const
|
|
4243
|
-
const
|
|
4244
|
-
return
|
|
4245
|
-
}, [
|
|
4246
|
-
async (
|
|
4247
|
-
[
|
|
4243
|
+
const yr = Q(() => {
|
|
4244
|
+
const ne = {};
|
|
4245
|
+
return s && (ne.permissions = V(s, "permissions", null), ne.role = V(s, "role", "user")), ne;
|
|
4246
|
+
}, [s]), Ar = Q(() => t == null ? void 0 : t.some((ne) => ne.isSiteLibrary), [t]), Tr = j(
|
|
4247
|
+
async (ne, It) => await b({ pageType: ne, query: It }),
|
|
4248
|
+
[b]
|
|
4248
4249
|
);
|
|
4249
4250
|
return /* @__PURE__ */ m(ge, { children: [
|
|
4250
4251
|
xn && /* @__PURE__ */ c(Ns, { className: d ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ c(Mt, { className: `animate-spin text-primary ${d ? "h-6 w-6" : "h-5 w-5"}` }) }),
|
|
4251
|
-
|
|
4252
|
+
pr && /* @__PURE__ */ c(
|
|
4252
4253
|
H,
|
|
4253
4254
|
{
|
|
4254
4255
|
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(Mt, { className: "h-6 w-6 animate-spin text-primary" }) }),
|
|
4255
|
-
children: /* @__PURE__ */ c(
|
|
4256
|
+
children: /* @__PURE__ */ c(nc, {})
|
|
4256
4257
|
}
|
|
4257
4258
|
),
|
|
4258
4259
|
/* @__PURE__ */ c(
|
|
4259
|
-
|
|
4260
|
+
Zr,
|
|
4260
4261
|
{
|
|
4261
|
-
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4262
|
+
_tempProps: { librarySite: Ar },
|
|
4263
|
+
gotoPage: $,
|
|
4264
|
+
collections: o ?? [],
|
|
4265
|
+
getBlockAsyncProps: ye,
|
|
4266
|
+
pageExternalData: O,
|
|
4265
4267
|
themePresets: e.themePresets ?? [],
|
|
4266
|
-
pageId:
|
|
4267
|
-
loading:
|
|
4268
|
-
fallbackLang:
|
|
4269
|
-
languages: (
|
|
4270
|
-
brandingOptions: (
|
|
4268
|
+
pageId: A == null ? void 0 : A.id,
|
|
4269
|
+
loading: p,
|
|
4270
|
+
fallbackLang: n,
|
|
4271
|
+
languages: (u == null ? void 0 : u.languages) || [],
|
|
4272
|
+
brandingOptions: (u == null ? void 0 : u.theme) || {},
|
|
4271
4273
|
translations: e.translations || {},
|
|
4272
4274
|
locale: e.locale || "en",
|
|
4273
4275
|
htmlDir: e.htmlDir || "ltr",
|
|
4274
|
-
autoSave: !
|
|
4276
|
+
autoSave: !de && Ne && (e.autoSave ?? !0),
|
|
4275
4277
|
autoSaveInterval: e.autoSaveInterval ?? 15,
|
|
4276
4278
|
onError: e.onError || console.error,
|
|
4277
|
-
getPartialBlockBlocks:
|
|
4278
|
-
getPartialBlocks:
|
|
4279
|
-
blocks:
|
|
4280
|
-
theme:
|
|
4281
|
-
pageTypes:
|
|
4282
|
-
searchPageTypeItems:
|
|
4283
|
-
askAiCallBack:
|
|
4284
|
-
onSave: async ({ blocks:
|
|
4285
|
-
if (!
|
|
4286
|
-
|
|
4287
|
-
const Rn = [...
|
|
4288
|
-
return await
|
|
4279
|
+
getPartialBlockBlocks: v,
|
|
4280
|
+
getPartialBlocks: U,
|
|
4281
|
+
blocks: p ? [] : y,
|
|
4282
|
+
theme: Ur(Be),
|
|
4283
|
+
pageTypes: a,
|
|
4284
|
+
searchPageTypeItems: Tr,
|
|
4285
|
+
askAiCallBack: L,
|
|
4286
|
+
onSave: async ({ blocks: ne, theme: It, needTranslations: Sr }) => {
|
|
4287
|
+
if (!g) return !0;
|
|
4288
|
+
Ae.current = ne;
|
|
4289
|
+
const Rn = [...ne];
|
|
4290
|
+
return await pe({ page: g, blocks: Rn, needTranslations: Sr }), Ae.current = Rn, Br(It, Be) || await Y({ settings: { theme: It } }), !0;
|
|
4289
4291
|
},
|
|
4290
|
-
themePanelComponent:
|
|
4291
|
-
...
|
|
4292
|
+
themePanelComponent: tc,
|
|
4293
|
+
...yr
|
|
4292
4294
|
}
|
|
4293
4295
|
),
|
|
4294
4296
|
/* @__PURE__ */ m("div", { children: [
|
|
4295
|
-
/* @__PURE__ */ c(
|
|
4296
|
-
/* @__PURE__ */ c(
|
|
4297
|
+
/* @__PURE__ */ c(pi, { isFetchingPage: xn }),
|
|
4298
|
+
/* @__PURE__ */ c(yi, {})
|
|
4297
4299
|
] })
|
|
4298
4300
|
] });
|
|
4299
|
-
},
|
|
4301
|
+
}, rc = new Kr({
|
|
4300
4302
|
defaultOptions: {
|
|
4301
4303
|
queries: {
|
|
4302
4304
|
refetchOnWindowFocus: !1,
|
|
@@ -4304,9 +4306,9 @@ const tc = {
|
|
|
4304
4306
|
refetchOnMount: !1
|
|
4305
4307
|
}
|
|
4306
4308
|
}
|
|
4307
|
-
}),
|
|
4309
|
+
}), yu = (e) => {
|
|
4308
4310
|
const [, t] = In(), [n, s] = q(!1);
|
|
4309
|
-
return
|
|
4311
|
+
return se(() => (t(
|
|
4310
4312
|
Pn(e, [
|
|
4311
4313
|
"apiUrl",
|
|
4312
4314
|
"usersApiUrl",
|
|
@@ -4328,16 +4330,16 @@ const tc = {
|
|
|
4328
4330
|
}), [e, t]), n ? V(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(ge, { children: [
|
|
4329
4331
|
/* @__PURE__ */ c(os, { ...e }),
|
|
4330
4332
|
/* @__PURE__ */ c(is, {})
|
|
4331
|
-
] }) : /* @__PURE__ */ m(
|
|
4333
|
+
] }) : /* @__PURE__ */ m(Vr, { client: rc, children: [
|
|
4332
4334
|
/* @__PURE__ */ c(os, { ...e }),
|
|
4333
4335
|
/* @__PURE__ */ c(is, {})
|
|
4334
4336
|
] }) : /* @__PURE__ */ c("div", {});
|
|
4335
|
-
},
|
|
4336
|
-
function
|
|
4337
|
+
}, ac = z.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
|
|
4338
|
+
function ic({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
4337
4339
|
const [r, a] = z.useState(!1);
|
|
4338
|
-
return /* @__PURE__ */ m(
|
|
4340
|
+
return /* @__PURE__ */ m(pa, { open: r, onOpenChange: a, children: [
|
|
4339
4341
|
/* @__PURE__ */ m(jt, { children: [
|
|
4340
|
-
/* @__PURE__ */ c(zt, { asChild: !0, children: /* @__PURE__ */ c(
|
|
4342
|
+
/* @__PURE__ */ c(zt, { asChild: !0, children: /* @__PURE__ */ c(ya, { asChild: !0, children: /* @__PURE__ */ c(
|
|
4341
4343
|
M,
|
|
4342
4344
|
{
|
|
4343
4345
|
size: "sm",
|
|
@@ -4361,7 +4363,7 @@ function rc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4361
4363
|
/* @__PURE__ */ c(Wt, { children: "Add field" })
|
|
4362
4364
|
] }),
|
|
4363
4365
|
r && /* @__PURE__ */ c(z.Suspense, { children: /* @__PURE__ */ c(
|
|
4364
|
-
|
|
4366
|
+
ac,
|
|
4365
4367
|
{
|
|
4366
4368
|
data: e,
|
|
4367
4369
|
onSelect: t,
|
|
@@ -4372,18 +4374,18 @@ function rc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4372
4374
|
) })
|
|
4373
4375
|
] });
|
|
4374
4376
|
}
|
|
4375
|
-
const
|
|
4377
|
+
const Au = () => {
|
|
4376
4378
|
const { savePageAsync: e } = Ge(), t = W();
|
|
4377
4379
|
return j(async () => {
|
|
4378
4380
|
await e(), t.invalidateQueries({ queryKey: [E.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [E.GET_BUILDER_PAGE_DATA] });
|
|
4379
4381
|
}, [e, t]);
|
|
4380
|
-
},
|
|
4382
|
+
}, Tu = () => {
|
|
4381
4383
|
const e = W();
|
|
4382
4384
|
return j(() => {
|
|
4383
4385
|
e.clear();
|
|
4384
4386
|
}, [e]);
|
|
4385
|
-
},
|
|
4386
|
-
const e = N(), t =
|
|
4387
|
+
}, Su = () => {
|
|
4388
|
+
const e = N(), t = I(), { data: n } = be(), s = W();
|
|
4387
4389
|
return X({
|
|
4388
4390
|
mutationFn: async (r) => {
|
|
4389
4391
|
if (!(n != null && n.id))
|
|
@@ -4407,7 +4409,7 @@ const pu = () => {
|
|
|
4407
4409
|
console.error("Failed to update metadata");
|
|
4408
4410
|
}
|
|
4409
4411
|
});
|
|
4410
|
-
},
|
|
4412
|
+
}, oc = K(() => import("./digital-asset-manager-CWneIIcn.js")), _u = ({
|
|
4411
4413
|
assetId: e,
|
|
4412
4414
|
assetUrl: t,
|
|
4413
4415
|
onChange: n,
|
|
@@ -4415,11 +4417,11 @@ const pu = () => {
|
|
|
4415
4417
|
placeholder: r = "Select an image",
|
|
4416
4418
|
disabled: a = !1
|
|
4417
4419
|
}) => {
|
|
4418
|
-
const { t: i } = we(), [o, l] = q(!1),
|
|
4420
|
+
const { t: i } = we(), [o, l] = q(!1), u = () => {
|
|
4419
4421
|
a || l(!0);
|
|
4420
|
-
},
|
|
4422
|
+
}, f = () => {
|
|
4421
4423
|
l(!1);
|
|
4422
|
-
},
|
|
4424
|
+
}, d = (A) => {
|
|
4423
4425
|
const T = Array.isArray(A) ? A[0] : A;
|
|
4424
4426
|
T != null && T.url && n(Pn(T, ["url", "id"])), l(!1);
|
|
4425
4427
|
}, h = () => {
|
|
@@ -4430,7 +4432,7 @@ const pu = () => {
|
|
|
4430
4432
|
g ? /* @__PURE__ */ c("div", { className: "flex h-12 items-center bg-gray-100 px-4", children: /* @__PURE__ */ c("p", { className: "text-xs text-gray-500", children: t }) }) : /* @__PURE__ */ c(
|
|
4431
4433
|
"img",
|
|
4432
4434
|
{
|
|
4433
|
-
onClick:
|
|
4435
|
+
onClick: u,
|
|
4434
4436
|
src: t,
|
|
4435
4437
|
alt: i("Selected image"),
|
|
4436
4438
|
className: "h-auto max-h-[100px] w-full bg-gray-100 object-contain"
|
|
@@ -4446,7 +4448,7 @@ const pu = () => {
|
|
|
4446
4448
|
className: "h-8 w-8 rounded-full bg-white text-red-500",
|
|
4447
4449
|
onClick: h,
|
|
4448
4450
|
disabled: a,
|
|
4449
|
-
children: g ? /* @__PURE__ */ c(zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(
|
|
4451
|
+
children: g ? /* @__PURE__ */ c(zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Va, { className: "h-4 w-4" })
|
|
4450
4452
|
}
|
|
4451
4453
|
),
|
|
4452
4454
|
!g && /* @__PURE__ */ c(
|
|
@@ -4456,7 +4458,7 @@ const pu = () => {
|
|
|
4456
4458
|
variant: "outline",
|
|
4457
4459
|
size: "icon",
|
|
4458
4460
|
className: "h-8 w-8 rounded-full bg-white/80 hover:bg-white/90",
|
|
4459
|
-
onClick:
|
|
4461
|
+
onClick: u,
|
|
4460
4462
|
disabled: a,
|
|
4461
4463
|
children: /* @__PURE__ */ c(Wn, { className: "h-4 w-4" })
|
|
4462
4464
|
}
|
|
@@ -4466,16 +4468,16 @@ const pu = () => {
|
|
|
4466
4468
|
"div",
|
|
4467
4469
|
{
|
|
4468
4470
|
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"}`,
|
|
4469
|
-
onClick:
|
|
4471
|
+
onClick: u,
|
|
4470
4472
|
children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center gap-2", children: [
|
|
4471
4473
|
/* @__PURE__ */ c(Wn, { className: "h-10 w-10 text-gray-400" }),
|
|
4472
4474
|
/* @__PURE__ */ c("p", { className: "text-sm text-gray-500", children: r })
|
|
4473
4475
|
] })
|
|
4474
4476
|
}
|
|
4475
4477
|
),
|
|
4476
|
-
/* @__PURE__ */ c(As, { open: o, onOpenChange: l, children: /* @__PURE__ */ m(
|
|
4477
|
-
/* @__PURE__ */ m(
|
|
4478
|
-
/* @__PURE__ */ c(
|
|
4478
|
+
/* @__PURE__ */ c(As, { open: o, onOpenChange: l, children: /* @__PURE__ */ m(Aa, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
|
|
4479
|
+
/* @__PURE__ */ m(Ta, { className: "hidden border-b px-4 py-2", children: [
|
|
4480
|
+
/* @__PURE__ */ c(Sa, { children: i("Select Image") }),
|
|
4479
4481
|
/* @__PURE__ */ c(
|
|
4480
4482
|
M,
|
|
4481
4483
|
{
|
|
@@ -4483,27 +4485,27 @@ const pu = () => {
|
|
|
4483
4485
|
variant: "ghost",
|
|
4484
4486
|
size: "icon",
|
|
4485
4487
|
className: "absolute right-4 top-2",
|
|
4486
|
-
onClick:
|
|
4488
|
+
onClick: f,
|
|
4487
4489
|
children: /* @__PURE__ */ c(zn, { className: "h-4 w-4" })
|
|
4488
4490
|
}
|
|
4489
4491
|
)
|
|
4490
4492
|
] }),
|
|
4491
4493
|
/* @__PURE__ */ c("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
4492
|
-
|
|
4494
|
+
oc,
|
|
4493
4495
|
{
|
|
4494
|
-
close:
|
|
4495
|
-
onSelect:
|
|
4496
|
+
close: f,
|
|
4497
|
+
onSelect: d,
|
|
4496
4498
|
mode: "image",
|
|
4497
4499
|
assetId: e
|
|
4498
4500
|
}
|
|
4499
4501
|
) }) })
|
|
4500
4502
|
] }) })
|
|
4501
4503
|
] });
|
|
4502
|
-
},
|
|
4504
|
+
}, lc = Fr(null), dn = {
|
|
4503
4505
|
didCatch: !1,
|
|
4504
4506
|
error: null
|
|
4505
4507
|
};
|
|
4506
|
-
class
|
|
4508
|
+
class cc extends qr {
|
|
4507
4509
|
constructor(t) {
|
|
4508
4510
|
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = dn;
|
|
4509
4511
|
}
|
|
@@ -4536,7 +4538,7 @@ class oc extends Mr {
|
|
|
4536
4538
|
} = this.state, {
|
|
4537
4539
|
resetKeys: r
|
|
4538
4540
|
} = this.props;
|
|
4539
|
-
if (s && n.error !== null &&
|
|
4541
|
+
if (s && n.error !== null && uc(t.resetKeys, r)) {
|
|
4540
4542
|
var a, i;
|
|
4541
4543
|
(a = (i = this.props).onReset) === null || a === void 0 || a.call(i, {
|
|
4542
4544
|
next: r,
|
|
@@ -4570,7 +4572,7 @@ class oc extends Mr {
|
|
|
4570
4572
|
else
|
|
4571
4573
|
throw i;
|
|
4572
4574
|
}
|
|
4573
|
-
return Fn(
|
|
4575
|
+
return Fn(lc.Provider, {
|
|
4574
4576
|
value: {
|
|
4575
4577
|
didCatch: a,
|
|
4576
4578
|
error: i,
|
|
@@ -4579,11 +4581,11 @@ class oc extends Mr {
|
|
|
4579
4581
|
}, o);
|
|
4580
4582
|
}
|
|
4581
4583
|
}
|
|
4582
|
-
function
|
|
4584
|
+
function uc() {
|
|
4583
4585
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
4584
4586
|
return e.length !== t.length || e.some((n, s) => !Object.is(n, t[s]));
|
|
4585
4587
|
}
|
|
4586
|
-
const
|
|
4588
|
+
const dc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
4587
4589
|
if (!e.trim())
|
|
4588
4590
|
return { isValid: !1, parsed: null, placeholders: [], error: { message: "JSON is empty" } };
|
|
4589
4591
|
try {
|
|
@@ -4600,11 +4602,11 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4600
4602
|
return { isValid: !0, parsed: JSON.parse(s), error: null, placeholders: n };
|
|
4601
4603
|
} catch (a) {
|
|
4602
4604
|
const i = a, o = i.message.match(/position (\d+)/), l = o ? parseInt(o[1]) : void 0;
|
|
4603
|
-
let
|
|
4605
|
+
let u, f;
|
|
4604
4606
|
if (l !== void 0) {
|
|
4605
|
-
const
|
|
4607
|
+
const d = s.substring(0, l).split(`
|
|
4606
4608
|
`);
|
|
4607
|
-
|
|
4609
|
+
u = d.length, f = d[d.length - 1].length + 1;
|
|
4608
4610
|
}
|
|
4609
4611
|
return {
|
|
4610
4612
|
isValid: !1,
|
|
@@ -4612,19 +4614,19 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4612
4614
|
placeholders: n,
|
|
4613
4615
|
error: {
|
|
4614
4616
|
message: i.message,
|
|
4615
|
-
line:
|
|
4616
|
-
column:
|
|
4617
|
+
line: u,
|
|
4618
|
+
column: f,
|
|
4617
4619
|
position: l
|
|
4618
4620
|
}
|
|
4619
4621
|
};
|
|
4620
4622
|
}
|
|
4621
|
-
},
|
|
4623
|
+
}, fc = (e, t) => {
|
|
4622
4624
|
let s = JSON.stringify(e, null, 2);
|
|
4623
4625
|
return t.forEach(({ original: r }, a) => {
|
|
4624
|
-
const i = `"__placeholder_${a}__"`, o = new RegExp(
|
|
4626
|
+
const i = `"__placeholder_${a}__"`, o = new RegExp(dc(i), "g");
|
|
4625
4627
|
s = s.replace(o, r);
|
|
4626
4628
|
}), s;
|
|
4627
|
-
},
|
|
4629
|
+
}, hc = (e, t) => {
|
|
4628
4630
|
if (!e) return "";
|
|
4629
4631
|
let n = JSON.stringify(e, null, 2);
|
|
4630
4632
|
const s = /{{([^{}]+)}}/g;
|
|
@@ -4634,7 +4636,7 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4634
4636
|
n = n.replace(r[0], i);
|
|
4635
4637
|
}
|
|
4636
4638
|
return n;
|
|
4637
|
-
},
|
|
4639
|
+
}, gc = K(() => import("./shared-json-ld-C4Kjka5m.js")), Pu = ({
|
|
4638
4640
|
value: e,
|
|
4639
4641
|
onChange: t,
|
|
4640
4642
|
disabled: n = !1,
|
|
@@ -4644,11 +4646,11 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4644
4646
|
id: i = "json-input",
|
|
4645
4647
|
pageData: o = {},
|
|
4646
4648
|
handleFieldInsert: l,
|
|
4647
|
-
hasJsonLdForSelectedLang:
|
|
4648
|
-
copyJsonLDFromDefaultPage:
|
|
4649
|
+
hasJsonLdForSelectedLang: u,
|
|
4650
|
+
copyJsonLDFromDefaultPage: f
|
|
4649
4651
|
}) => {
|
|
4650
|
-
const [
|
|
4651
|
-
|
|
4652
|
+
const [d, h] = q("edit"), [g, A] = q(null), [T, p] = q(""), y = at(null), [P] = In(), w = i === "jsonLD" && V(P, "features.sharedJsonLD", !1), O = i === "jsonLD" && !u && !!f;
|
|
4653
|
+
se(() => {
|
|
4652
4654
|
e.trim() === "" && t("{}");
|
|
4653
4655
|
}, [e, t]);
|
|
4654
4656
|
const B = (U) => {
|
|
@@ -4658,36 +4660,36 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4658
4660
|
}, L = (U) => {
|
|
4659
4661
|
if (U.key === "Tab") {
|
|
4660
4662
|
U.preventDefault();
|
|
4661
|
-
const v = U.currentTarget,
|
|
4662
|
-
if (
|
|
4663
|
-
const
|
|
4663
|
+
const v = U.currentTarget, b = v.selectionStart, Y = v.selectionEnd;
|
|
4664
|
+
if (b !== Y) {
|
|
4665
|
+
const de = e.substring(b, Y).split(`
|
|
4664
4666
|
`);
|
|
4665
4667
|
if (U.shiftKey) {
|
|
4666
|
-
const
|
|
4667
|
-
`),
|
|
4668
|
-
t(
|
|
4669
|
-
v.selectionStart =
|
|
4668
|
+
const Ae = de.map((Ne) => Ne.startsWith(" ") ? Ne.substring(2) : Ne).join(`
|
|
4669
|
+
`), Be = e.substring(0, b) + Ae + e.substring(Y);
|
|
4670
|
+
t(Be), setTimeout(() => {
|
|
4671
|
+
v.selectionStart = b, v.selectionEnd = b + Ae.length;
|
|
4670
4672
|
}, 0);
|
|
4671
4673
|
} else {
|
|
4672
|
-
const
|
|
4673
|
-
`),
|
|
4674
|
-
t(
|
|
4675
|
-
v.selectionStart =
|
|
4674
|
+
const Ae = de.map((Ne) => ` ${Ne}`).join(`
|
|
4675
|
+
`), Be = e.substring(0, b) + Ae + e.substring(Y);
|
|
4676
|
+
t(Be), setTimeout(() => {
|
|
4677
|
+
v.selectionStart = b, v.selectionEnd = b + Ae.length;
|
|
4676
4678
|
}, 0);
|
|
4677
4679
|
}
|
|
4678
4680
|
} else {
|
|
4679
|
-
const
|
|
4680
|
-
t(
|
|
4681
|
-
v.selectionStart = v.selectionEnd =
|
|
4681
|
+
const $ = e.substring(0, b) + " " + e.substring(Y);
|
|
4682
|
+
t($), setTimeout(() => {
|
|
4683
|
+
v.selectionStart = v.selectionEnd = b + 2;
|
|
4682
4684
|
}, 0);
|
|
4683
4685
|
}
|
|
4684
4686
|
}
|
|
4685
4687
|
};
|
|
4686
|
-
|
|
4688
|
+
se(() => {
|
|
4687
4689
|
const U = ls(e);
|
|
4688
4690
|
if (U.isValid)
|
|
4689
4691
|
if (A(null), U.parsed) {
|
|
4690
|
-
const v =
|
|
4692
|
+
const v = hc(U.parsed, o);
|
|
4691
4693
|
p(v);
|
|
4692
4694
|
} else
|
|
4693
4695
|
p("");
|
|
@@ -4697,17 +4699,17 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4697
4699
|
const pe = () => {
|
|
4698
4700
|
const U = ls(e);
|
|
4699
4701
|
if (U.isValid && U.parsed) {
|
|
4700
|
-
const v =
|
|
4702
|
+
const v = fc(U.parsed, U.placeholders);
|
|
4701
4703
|
t(v);
|
|
4702
4704
|
}
|
|
4703
4705
|
}, ye = () => {
|
|
4704
4706
|
g != null && g.position && y.current && (y.current.focus(), y.current.setSelectionRange(g.position, g.position + 1));
|
|
4705
4707
|
};
|
|
4706
|
-
return /* @__PURE__ */ c(
|
|
4708
|
+
return /* @__PURE__ */ c(cc, { fallback: /* @__PURE__ */ c("div", { children: "Some error" }), children: /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ m(_a, { value: d, onValueChange: h, className: "w-full", children: [
|
|
4707
4709
|
/* @__PURE__ */ m("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
4708
|
-
/* @__PURE__ */ m(
|
|
4710
|
+
/* @__PURE__ */ m(Pa, { className: "w-max", children: [
|
|
4709
4711
|
/* @__PURE__ */ m(tn, { value: "edit", className: "flex items-center gap-1", children: [
|
|
4710
|
-
/* @__PURE__ */ c(
|
|
4712
|
+
/* @__PURE__ */ c(Ha, { className: "h-4 w-4" }),
|
|
4711
4713
|
/* @__PURE__ */ c("span", { children: "Edit" })
|
|
4712
4714
|
] }),
|
|
4713
4715
|
/* @__PURE__ */ m(
|
|
@@ -4717,26 +4719,26 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4717
4719
|
className: "flex items-center gap-1",
|
|
4718
4720
|
disabled: !e.trim() || g !== null || O,
|
|
4719
4721
|
children: [
|
|
4720
|
-
/* @__PURE__ */ c(
|
|
4722
|
+
/* @__PURE__ */ c(Qa, { className: "h-4 w-4" }),
|
|
4721
4723
|
/* @__PURE__ */ c("span", { children: "Preview" })
|
|
4722
4724
|
]
|
|
4723
4725
|
}
|
|
4724
4726
|
),
|
|
4725
|
-
|
|
4727
|
+
w && /* @__PURE__ */ m(
|
|
4726
4728
|
tn,
|
|
4727
4729
|
{
|
|
4728
4730
|
value: "shared",
|
|
4729
4731
|
className: "flex items-center gap-1",
|
|
4730
4732
|
disabled: !e.trim() || g !== null,
|
|
4731
4733
|
children: [
|
|
4732
|
-
/* @__PURE__ */ c(
|
|
4734
|
+
/* @__PURE__ */ c($a, { className: "h-4 w-4" }),
|
|
4733
4735
|
/* @__PURE__ */ c("span", { children: "Shared" })
|
|
4734
4736
|
]
|
|
4735
4737
|
}
|
|
4736
4738
|
)
|
|
4737
4739
|
] }),
|
|
4738
|
-
O ? null :
|
|
4739
|
-
|
|
4740
|
+
O ? null : d === "edit" && !s && /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ c(
|
|
4741
|
+
ic,
|
|
4740
4742
|
{
|
|
4741
4743
|
dataType: "value",
|
|
4742
4744
|
data: o ?? {},
|
|
@@ -4745,7 +4747,7 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4745
4747
|
) })
|
|
4746
4748
|
] }),
|
|
4747
4749
|
/* @__PURE__ */ m(nn, { value: "edit", className: "relative mt-0", children: [
|
|
4748
|
-
!O &&
|
|
4750
|
+
!O && d === "edit" && /* @__PURE__ */ c(Dn, { content: "Format JSON", side: "right", showTooltip: !n && !g, children: /* @__PURE__ */ c(
|
|
4749
4751
|
M,
|
|
4750
4752
|
{
|
|
4751
4753
|
type: "button",
|
|
@@ -4754,12 +4756,12 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4754
4756
|
onClick: pe,
|
|
4755
4757
|
className: "absolute right-1 top-1 h-6 w-6 p-1",
|
|
4756
4758
|
disabled: !e.trim() || n || g !== null,
|
|
4757
|
-
children: /* @__PURE__ */ c(
|
|
4759
|
+
children: /* @__PURE__ */ c(ja, {})
|
|
4758
4760
|
}
|
|
4759
4761
|
) }),
|
|
4760
4762
|
O ? /* @__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: [
|
|
4761
4763
|
/* @__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." }),
|
|
4762
|
-
/* @__PURE__ */ m(M, { type: "button", variant: "default", size: "sm", onClick:
|
|
4764
|
+
/* @__PURE__ */ m(M, { type: "button", variant: "default", size: "sm", onClick: f, children: [
|
|
4763
4765
|
/* @__PURE__ */ c(Ts, {}),
|
|
4764
4766
|
"Copy & Edit from default language"
|
|
4765
4767
|
] })
|
|
@@ -4779,9 +4781,9 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4779
4781
|
readOnly: s
|
|
4780
4782
|
}
|
|
4781
4783
|
),
|
|
4782
|
-
g && /* @__PURE__ */ m(
|
|
4783
|
-
/* @__PURE__ */ c(
|
|
4784
|
-
/* @__PURE__ */ m(
|
|
4784
|
+
g && /* @__PURE__ */ m(va, { variant: "destructive", className: "mt-2", children: [
|
|
4785
|
+
/* @__PURE__ */ c(za, { className: "h-4 w-4" }),
|
|
4786
|
+
/* @__PURE__ */ m(wa, { className: "flex flex-col", children: [
|
|
4785
4787
|
/* @__PURE__ */ c("span", { className: "font-medium", children: "Invalid JSON" }),
|
|
4786
4788
|
/* @__PURE__ */ c("span", { className: "text-sm", children: g.message }),
|
|
4787
4789
|
g.line && g.column && /* @__PURE__ */ m("span", { className: "text-sm", children: [
|
|
@@ -4808,123 +4810,123 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4808
4810
|
/* @__PURE__ */ c(Kn, { rows: a, value: T, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
|
|
4809
4811
|
/* @__PURE__ */ c("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
|
|
4810
4812
|
] }),
|
|
4811
|
-
|
|
4813
|
+
w && /* @__PURE__ */ c(nn, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(gc, {}) }) })
|
|
4812
4814
|
] }) }) });
|
|
4813
4815
|
};
|
|
4814
4816
|
if (typeof window > "u")
|
|
4815
4817
|
throw new Error("@chaibuilder/pages is not available on the server");
|
|
4816
4818
|
export {
|
|
4817
|
-
|
|
4819
|
+
Jc as $,
|
|
4818
4820
|
E as A,
|
|
4819
4821
|
Ns as B,
|
|
4820
4822
|
js as C,
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4823
|
+
Uo as D,
|
|
4824
|
+
zc as E,
|
|
4825
|
+
Wc as F,
|
|
4824
4826
|
De as G,
|
|
4825
4827
|
En as H,
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4828
|
+
Yc as I,
|
|
4829
|
+
Qc as J,
|
|
4830
|
+
nu as K,
|
|
4829
4831
|
Nt as L,
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4832
|
+
lt as M,
|
|
4833
|
+
iu as N,
|
|
4834
|
+
su as O,
|
|
4835
|
+
au as P,
|
|
4836
|
+
bo as Q,
|
|
4837
|
+
sl as R,
|
|
4838
|
+
Zc as S,
|
|
4837
4839
|
Dn as T,
|
|
4838
4840
|
pn as U,
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4841
|
+
Xo as V,
|
|
4842
|
+
uu as W,
|
|
4843
|
+
du as X,
|
|
4844
|
+
nl as Y,
|
|
4845
|
+
fu as Z,
|
|
4846
|
+
hu as _,
|
|
4847
|
+
io as a,
|
|
4848
|
+
Hc as a0,
|
|
4849
|
+
ru as a1,
|
|
4848
4850
|
Z as a2,
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4851
|
+
Po as a3,
|
|
4852
|
+
Ml as a4,
|
|
4853
|
+
Xc as a5,
|
|
4852
4854
|
Dt as a6,
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4855
|
+
Eu as a7,
|
|
4856
|
+
cu as a8,
|
|
4857
|
+
lu as a9,
|
|
4858
|
+
Vc as aA,
|
|
4859
|
+
Fc as aB,
|
|
4860
|
+
Ki as aC,
|
|
4861
|
+
Lc as aD,
|
|
4860
4862
|
ws as aE,
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
+
ao as aF,
|
|
4864
|
+
Ci as aG,
|
|
4863
4865
|
In as aH,
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4866
|
+
_i as aI,
|
|
4867
|
+
ic as aJ,
|
|
4868
|
+
_u as aK,
|
|
4869
|
+
Ic as aL,
|
|
4870
|
+
cc as aM,
|
|
4871
|
+
yu as aN,
|
|
4870
4872
|
be as aO,
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4873
|
+
Tu as aP,
|
|
4874
|
+
Xl as aQ,
|
|
4875
|
+
Au as aR,
|
|
4876
|
+
Su as aS,
|
|
4875
4877
|
Yt as aT,
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4878
|
+
lo as aU,
|
|
4879
|
+
Cc as aV,
|
|
4880
|
+
ei as aW,
|
|
4879
4881
|
Rs as aa,
|
|
4880
4882
|
Oe as ab,
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4883
|
+
Zo as ac,
|
|
4884
|
+
ou as ad,
|
|
4885
|
+
tu as ae,
|
|
4886
|
+
eu as af,
|
|
4885
4887
|
Gt as ag,
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4888
|
+
jc as ah,
|
|
4889
|
+
ci as ai,
|
|
4890
|
+
gi as aj,
|
|
4889
4891
|
N as ak,
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4892
|
+
I as al,
|
|
4893
|
+
Jl as am,
|
|
4894
|
+
Uc as an,
|
|
4893
4895
|
kn as ao,
|
|
4894
|
-
|
|
4896
|
+
ie as ap,
|
|
4895
4897
|
rn as aq,
|
|
4896
|
-
|
|
4898
|
+
ce as ar,
|
|
4897
4899
|
Nn as as,
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4900
|
+
Nc as at,
|
|
4901
|
+
Bc as au,
|
|
4902
|
+
qc as av,
|
|
4903
|
+
Pu as aw,
|
|
4902
4904
|
ls as ax,
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
+
Mc as ay,
|
|
4906
|
+
Kc as az,
|
|
4905
4907
|
bs as b,
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
+
kc as c,
|
|
4909
|
+
Oc as d,
|
|
4908
4910
|
Re as e,
|
|
4909
4911
|
On as f,
|
|
4910
4912
|
xe as g,
|
|
4911
4913
|
Ce as h,
|
|
4912
|
-
|
|
4914
|
+
le as i,
|
|
4913
4915
|
Ps as j,
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4916
|
+
ri as k,
|
|
4917
|
+
Gc as l,
|
|
4918
|
+
Dc as m,
|
|
4919
|
+
xc as n,
|
|
4920
|
+
Rc as o,
|
|
4921
|
+
jl as p,
|
|
4922
|
+
pu as q,
|
|
4921
4923
|
J as r,
|
|
4922
4924
|
$s as s,
|
|
4923
4925
|
an as t,
|
|
4924
4926
|
Cs as u,
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
+
gu as v,
|
|
4928
|
+
mu as w,
|
|
4927
4929
|
F as x,
|
|
4928
|
-
|
|
4930
|
+
Wo as y,
|
|
4929
4931
|
Ms as z
|
|
4930
4932
|
};
|