@chaibuilder/pages 0.14.0 → 0.14.1
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-iyhQ7kgG.js → 2AITGKQY-Cti4x7QE.js} +2 -2
- package/dist/{2AITGKQY-BLi5HVHf.cjs → 2AITGKQY-PHs1xUsz.cjs} +1 -1
- package/dist/{NCMVHL6D-CKYg8-AM.cjs → NCMVHL6D-BChQ0wDN.cjs} +1 -1
- package/dist/{NCMVHL6D-PLvSyK5P.js → NCMVHL6D-fAWarBw8.js} +4 -4
- package/dist/{ZDWCUMSJ-BJZ_Yi-4.cjs → ZDWCUMSJ-CwWfQqyn.cjs} +1 -1
- package/dist/{ZDWCUMSJ-CuLkdxY-.js → ZDWCUMSJ-DRWuu_nE.js} +1 -1
- package/dist/{add-new-language-page-WM_Ve2vH.js → add-new-language-page-CcBqDtYv.js} +2 -2
- package/dist/{add-new-language-page--ah9yzN3.cjs → add-new-language-page-Dt9DWunK.cjs} +1 -1
- package/dist/{add-new-page-CnUo6xzd.cjs → add-new-page-BN3z9rSq.cjs} +1 -1
- package/dist/{add-new-page-Bs_NXM9x.js → add-new-page-CTUiEKzv.js} +1 -1
- package/dist/{delete-page-D8xhYESu.js → delete-page-8MnGZ_mz.js} +1 -1
- package/dist/{delete-page-Cf88UkqJ.cjs → delete-page-jELwTpGY.cjs} +1 -1
- package/dist/{digital-asset-manager-BAFTqxsM.js → digital-asset-manager-BJhwyEdT.js} +146 -146
- package/dist/{digital-asset-manager-D_lcprwY.cjs → digital-asset-manager-ZyQJP6AO.cjs} +1 -1
- package/dist/{duplicate-page-CqXTGmWt.js → duplicate-page-BGYZLkco.js} +28 -28
- package/dist/{duplicate-page-BX1gOez-.cjs → duplicate-page-BRjKFpBP.cjs} +1 -1
- package/dist/{dynamic-page-selector-9JIQrcq5.cjs → dynamic-page-selector-CR-ZpSJ8.cjs} +1 -1
- package/dist/{dynamic-page-selector-0TiUnfUg.js → dynamic-page-selector-CrbujoYg.js} +1 -1
- package/dist/{index-D7kegQ3M.js → index-Byi6-4u1.js} +992 -981
- package/dist/index-DSUpSpeI.cjs +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +8 -8
- package/dist/{json-diff-viewer-Be-PVOZN.cjs → json-diff-viewer-DKlC7yl6.cjs} +1 -1
- package/dist/{json-diff-viewer-C2GK_BDh.js → json-diff-viewer-De2bStRw.js} +6 -6
- package/dist/{lang-panel-CePltxo2.cjs → lang-panel-B3bC1gKq.cjs} +1 -1
- package/dist/{lang-panel-CPFS1ssC.js → lang-panel-G7RoMOP7.js} +2 -2
- package/dist/{mark-as-template-jdwcgRIB.js → mark-as-template-B1TpGPms.js} +1 -1
- package/dist/{mark-as-template-DeB23sWR.cjs → mark-as-template-OgR8I38n.cjs} +1 -1
- package/dist/{no-language-page-content-DUM4KxWu.js → no-language-page-content-CqH4FMNy.js} +1 -1
- package/dist/{no-language-page-content-Dsm2H3pc.cjs → no-language-page-content-iZo2ztXp.cjs} +1 -1
- package/dist/{page-creator-BjuYmKfc.js → page-creator-Chnj3W4j.js} +29 -29
- package/dist/{page-creator-DG0LwvL1.cjs → page-creator-DUXzx-zg.cjs} +1 -1
- package/dist/{page-lock-request-B9WPmFcd.cjs → page-lock-request-D3gmV8Yq.cjs} +1 -1
- package/dist/{page-lock-request-BceB1S-X.js → page-lock-request-Dc-JkLEZ.js} +3 -3
- package/dist/{page-locked-by-dialog-2MULM3jh.cjs → page-locked-by-dialog-B9pGi6zb.cjs} +1 -1
- package/dist/{page-locked-by-dialog-BEWfFLSc.js → page-locked-by-dialog-DC8UKy9e.js} +1 -1
- package/dist/{page-manager-new-BONZN4c5.cjs → page-manager-new-CFtYUNbS.cjs} +1 -1
- package/dist/{page-manager-new-DV6A9WFv.js → page-manager-new-DYYWpxWy.js} +28 -28
- package/dist/{page-manager-search-and-filter-DIiowi9F.js → page-manager-search-and-filter-B4xo9IJO.js} +2 -2
- package/dist/{page-manager-search-and-filter-3h4URMP_.cjs → page-manager-search-and-filter-DT9V9AoS.cjs} +1 -1
- package/dist/{page-revisions-content-CQbt25XX.cjs → page-revisions-content-BjIECUPY.cjs} +1 -1
- package/dist/{page-revisions-content-BIxeZeND.js → page-revisions-content-KJGhm9Pl.js} +7 -7
- package/dist/{publish-pages-content-CdKHrfys.js → publish-pages-content-BWLQZGjd.js} +45 -45
- package/dist/{publish-pages-content-im9dPOBM.cjs → publish-pages-content-CTduLNtg.cjs} +1 -1
- package/dist/{save-to-lib-DGII9CEP.js → save-to-lib-B07GbG4I.js} +23 -23
- package/dist/{save-to-lib-DOh-850u.cjs → save-to-lib-CsrSeusU.cjs} +1 -1
- package/dist/{seo-panel-Bxo4f-a_.js → seo-panel-B20DCgo0.js} +1 -1
- package/dist/{seo-panel-2VdpoGSg.cjs → seo-panel-QphuqXT2.cjs} +1 -1
- package/dist/{shared-json-ld-C1OewNgp.cjs → shared-json-ld-C_vIO-Qk.cjs} +1 -1
- package/dist/{shared-json-ld-gbnBFljN.js → shared-json-ld-CkOQRUEw.js} +1 -1
- package/dist/{slug-input-CfuQV97Z.cjs → slug-input-71BuN79c.cjs} +1 -1
- package/dist/{slug-input-BmcGmc_i.js → slug-input-rAe3mMkd.js} +1 -1
- package/dist/{theme-panel-footer-D3SwHqGR.js → theme-panel-footer-DFUfCqKP.js} +1 -1
- package/dist/{theme-panel-footer-FrY4U8zn.cjs → theme-panel-footer-DHRs6ag2.cjs} +1 -1
- package/dist/{unmark-as-template-CihtTMOb.cjs → unmark-as-template-Cx0CqrpM.cjs} +1 -1
- package/dist/{unmark-as-template-UwmCCn0u.js → unmark-as-template-_VyWoVNk.js} +1 -1
- package/dist/{unpublish-page-CNwIU6AS.js → unpublish-page-CuSJRr5c.js} +1 -1
- package/dist/{unpublish-page-DzLtZcNw.cjs → unpublish-page-D3NM8b3u.cjs} +1 -1
- package/dist/{use-page-expand-manager-B7JtHdg5.cjs → use-page-expand-manager-MjYZ3CDZ.cjs} +1 -1
- package/dist/{use-page-expand-manager-BCFQnVkT.js → use-page-expand-manager-_msrWd0a.js} +9 -9
- package/dist/web-preview-BL-vsgoa.js +73 -0
- package/dist/web-preview-CI3Vz7Yp.cjs +1 -0
- package/package.json +1 -1
- package/dist/index-LU0FTfeN.cjs +0 -5
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var
|
|
1
|
+
var kr = Object.defineProperty;
|
|
2
2
|
var qn = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var ve = (e, t, n) =>
|
|
5
|
+
var Dr = (e, t, n) => t in e ? kr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var ve = (e, t, n) => Dr(e, typeof t != "symbol" ? t + "" : t, n), Kn = (e, t, n) => t.has(e) || qn("Cannot " + n);
|
|
7
7
|
var _ = (e, t, n) => (Kn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), L = (e, t, n) => t.has(e) ? qn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), C = (e, t, n, s) => (Kn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
8
|
-
import { jsx as c, jsxs as
|
|
9
|
-
import { get as
|
|
8
|
+
import { jsx as c, jsxs as m, Fragment as he } from "react/jsx-runtime";
|
|
9
|
+
import { get as H, has as Y, reverse as Gr, sortBy as xr, each as Or, find as ae, isEmpty as me, groupBy as Rr, minBy as Ur, noop as As, keyBy as Br, map as Kt, compact as Ts, upperCase as Vn, filter as Ss, includes as Mr, pick as In, keys as Fr, pickBy as qr, endsWith as Kr, isArray as Vr, startCase as Hr, isFunction as $r, cloneDeep as Qr, isEqual as jr } from "lodash-es";
|
|
10
10
|
import * as j from "react";
|
|
11
|
-
import
|
|
12
|
-
import { atom as
|
|
13
|
-
import { useMutation as
|
|
14
|
-
import { useLanguages as Re, useSavePage as Oe, mergeClasses as
|
|
11
|
+
import zr, { useMemo as $, useCallback as q, useState as x, useEffect as re, useRef as ct, lazy as K, Suspense as V } from "react";
|
|
12
|
+
import { atom as pe, useAtom as te } from "jotai";
|
|
13
|
+
import { useMutation as se, useQuery as ie, useQueryClient as ee, onlineManager as _s, QueryClient as Wr, QueryClientProvider as Yr } from "@tanstack/react-query";
|
|
14
|
+
import { useLanguages as Re, useSavePage as Oe, mergeClasses as Vt, usePermissions as Ps, PERMISSIONS as Jr, useRightPanel as Xr, useChaiFeatureFlag as Zr, useIsPageLoaded as ea, registerChaiLibrary as ta, getBlocksFromHTML as na, registerChaiSidebarPanel as rn, registerChaiFeatureFlag as Hn, registerChaiTopBar as sa, registerChaiMediaManager as ra, registerChaiSaveToLibrary as aa, ChaiBuilderEditor as ia } from "@chaibuilder/sdk";
|
|
15
15
|
import { toast as z } from "sonner";
|
|
16
|
-
import { Tooltip as
|
|
17
|
-
import { LogsIcon as
|
|
18
|
-
import { useRegisteredChaiBlocks as
|
|
19
|
-
import { z as
|
|
20
|
-
import { loadWebBlocks as
|
|
16
|
+
import { Tooltip as Yt, TooltipTrigger as Jt, Button as M, TooltipContent as Xt, Sheet as ws, SheetContent as vs, SheetHeader as oa, SheetTitle as la, SheetDescription as ca, DropdownMenu as Nn, DropdownMenuTrigger as Cn, DropdownMenuContent as Ln, DropdownMenuItem as fe, Separator as ua, TooltipProvider as bs, SheetTrigger as da, Skeleton as Dt, Dialog as Is, Card as fa, CardHeader as ha, CardTitle as ga, CardDescription as ma, CardContent as Ea, Label as $n, Input as Qn, CardFooter as pa, HoverCard as ya, HoverCardTrigger as Aa, HoverCardContent as Ta, AlertDialog as Sa, AlertDialogTrigger as _a, AlertDialogContent as Pa, AlertDialogHeader as wa, AlertDialogTitle as va, AlertDialogDescription as ba, AlertDialogFooter as Ia, AlertDialogCancel as Na, AlertDialogAction as Ca, Popover as La, PopoverTrigger as ka, DialogContent as Da, DialogHeader as Ga, DialogTitle as xa, Tabs as Oa, TabsList as Ra, TabsTrigger as an, TabsContent as on, Textarea as jn, Alert as Ua, AlertDescription as Ba } from "@chaibuilder/sdk/ui";
|
|
17
|
+
import { LogsIcon as Ma, Folder as Fa, Languages as zn, ChevronDown as mn, Star as qa, Plus as Ns, History as Ka, Play as Va, Palette as Ha, CheckCircle as $a, Loader as ft, Save as Qa, Send as Wn, Rocket as Yn, CopyPlusIcon as ja, Pencil as za, Power as Wa, Trash as Ya, SquareLibrary as Jn, Globe as Ja, File as Xa, MoreHorizontal as Xn, ExternalLink as Za, EyeOff as ei, Eye as Cs, LanguagesIcon as ti, User as ni, X as Zn, Trash2 as si, ImageIcon as es, Code as ri, Share2 as ai, FileCode2 as ii, AlertTriangle as oi } from "lucide-react";
|
|
18
|
+
import { useRegisteredChaiBlocks as li, getDefaultBlockProps as ci } from "@chaibuilder/runtime";
|
|
19
|
+
import { z as Mt } from "zod";
|
|
20
|
+
import { loadWebBlocks as ui } from "@chaibuilder/sdk/web-blocks";
|
|
21
21
|
const y = {
|
|
22
22
|
GENERATE_SEO_FIELD: "GENERATE_SEO_FIELD",
|
|
23
23
|
UPDATE_PAGE_METADATA: "UPDATE_PAGE_METADATA",
|
|
@@ -75,32 +75,32 @@ const y = {
|
|
|
75
75
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
76
76
|
GET_ASSETS: "GET_ASSETS",
|
|
77
77
|
GET_ASSET: "GET_ASSET"
|
|
78
|
-
},
|
|
79
|
-
const [n] =
|
|
80
|
-
return $(() =>
|
|
81
|
-
}, B = () =>
|
|
82
|
-
let
|
|
78
|
+
}, di = pe({}), kn = () => te(di), ye = (e, t) => {
|
|
79
|
+
const [n] = kn();
|
|
80
|
+
return $(() => H(n, e, t), [n, e, t]);
|
|
81
|
+
}, B = () => ye("apiUrl", "/chai/api"), Zt = () => ye("usersApiUrl", "/chai/users"), Wc = () => ye("assetsApiUrl", "/chai/assets"), fi = () => ye("supabaseInstance", null);
|
|
82
|
+
let hi = 0;
|
|
83
83
|
function ts(e, t) {
|
|
84
|
-
const n = `atom${++
|
|
84
|
+
const n = `atom${++hi}`, s = {
|
|
85
85
|
toString() {
|
|
86
86
|
return n;
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
|
-
return typeof e == "function" ? s.read = e : (s.init = e, s.read =
|
|
89
|
+
return typeof e == "function" ? s.read = e : (s.init = e, s.read = gi, s.write = mi), t && (s.write = t), s;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function gi(e) {
|
|
92
92
|
return e(this);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function mi(e, t, n) {
|
|
95
95
|
return t(
|
|
96
96
|
this,
|
|
97
97
|
typeof n == "function" ? n(e(this)) : n
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const Ei = Symbol(
|
|
101
101
|
""
|
|
102
|
-
),
|
|
103
|
-
function
|
|
102
|
+
), Ls = (e) => typeof (e == null ? void 0 : e.then) == "function";
|
|
103
|
+
function pi(e = () => {
|
|
104
104
|
try {
|
|
105
105
|
return window.localStorage;
|
|
106
106
|
} catch {
|
|
@@ -122,8 +122,8 @@ function gi(e = () => {
|
|
|
122
122
|
s = E;
|
|
123
123
|
}
|
|
124
124
|
return r;
|
|
125
|
-
},
|
|
126
|
-
return
|
|
125
|
+
}, g = (d = (f = e()) == null ? void 0 : f.getItem(l)) != null ? d : null;
|
|
126
|
+
return Ls(g) ? g.then(h) : h(g);
|
|
127
127
|
},
|
|
128
128
|
setItem: (l, u) => {
|
|
129
129
|
var f;
|
|
@@ -137,13 +137,13 @@ function gi(e = () => {
|
|
|
137
137
|
return (u = e()) == null ? void 0 : u.removeItem(l);
|
|
138
138
|
}
|
|
139
139
|
}, i = (l) => (u, f, d) => l(u, (h) => {
|
|
140
|
-
let
|
|
140
|
+
let g;
|
|
141
141
|
try {
|
|
142
|
-
|
|
142
|
+
g = JSON.parse(h || "");
|
|
143
143
|
} catch {
|
|
144
|
-
|
|
144
|
+
g = d;
|
|
145
145
|
}
|
|
146
|
-
f(
|
|
146
|
+
f(g);
|
|
147
147
|
});
|
|
148
148
|
let o;
|
|
149
149
|
try {
|
|
@@ -162,8 +162,8 @@ function gi(e = () => {
|
|
|
162
162
|
};
|
|
163
163
|
}), o && (a.subscribe = i(o)), a;
|
|
164
164
|
}
|
|
165
|
-
const
|
|
166
|
-
function
|
|
165
|
+
const yi = pi();
|
|
166
|
+
function Ai(e, t, n = yi, s) {
|
|
167
167
|
const r = ts(
|
|
168
168
|
t
|
|
169
169
|
);
|
|
@@ -175,15 +175,15 @@ function Ei(e, t, n = mi, s) {
|
|
|
175
175
|
(i) => i(r),
|
|
176
176
|
(i, o, l) => {
|
|
177
177
|
const u = typeof l == "function" ? l(i(r)) : l;
|
|
178
|
-
return u ===
|
|
178
|
+
return u === Ei ? (o(r, t), n.removeItem(e)) : Ls(u) ? u.then((f) => (o(r, f), n.setItem(e, f))) : (o(r, u), n.setItem(e, u));
|
|
179
179
|
}
|
|
180
180
|
);
|
|
181
181
|
}
|
|
182
182
|
localStorage.removeItem("_chai_user");
|
|
183
183
|
localStorage.removeItem("__chai__user");
|
|
184
|
-
const
|
|
185
|
-
const [e, t] =
|
|
186
|
-
t(null), localStorage.removeItem(
|
|
184
|
+
const ks = "__logged_in_user", Ti = Ai(ks, null), Ae = () => {
|
|
185
|
+
const [e, t] = te(Ti), n = q(() => {
|
|
186
|
+
t(null), localStorage.removeItem(ks);
|
|
187
187
|
}, [t]);
|
|
188
188
|
return {
|
|
189
189
|
isLoggedIn: !!e,
|
|
@@ -209,8 +209,8 @@ if (import.meta.vitest) {
|
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
let qe = null;
|
|
212
|
-
function
|
|
213
|
-
const { user: e, setUser: t, logout: n } =
|
|
212
|
+
function Si() {
|
|
213
|
+
const { user: e, setUser: t, logout: n } = Ae(), s = Zt(), r = ye("getAccessToken", !1), a = async () => {
|
|
214
214
|
if (r === !1 && e && !(!Y(e, "expiresAt") || !Y(e, "accessToken") || !Y(e, "refreshToken")))
|
|
215
215
|
try {
|
|
216
216
|
const i = await en(s, {
|
|
@@ -232,7 +232,7 @@ function yi() {
|
|
|
232
232
|
n(), window.location.reload();
|
|
233
233
|
}
|
|
234
234
|
};
|
|
235
|
-
return
|
|
235
|
+
return se({
|
|
236
236
|
mutationFn: async () => {
|
|
237
237
|
if (qe)
|
|
238
238
|
return await qe;
|
|
@@ -247,20 +247,20 @@ function yi() {
|
|
|
247
247
|
}
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function _i() {
|
|
251
251
|
return qe;
|
|
252
252
|
}
|
|
253
|
-
const
|
|
254
|
-
const { user: e, setUser: t } =
|
|
253
|
+
const Ds = () => {
|
|
254
|
+
const { user: e, setUser: t } = Ae(), { mutateAsync: n } = Si(), s = 60, r = q(() => {
|
|
255
255
|
if (!(e != null && e.expiresAt)) return !1;
|
|
256
256
|
if (!e || !(e != null && e.refreshToken)) return !0;
|
|
257
257
|
const o = Math.floor(Date.now() / 1e3);
|
|
258
258
|
return e.expiresAt - o <= s;
|
|
259
|
-
}, [e]), i =
|
|
259
|
+
}, [e]), i = ye("getAccessToken", async () => {
|
|
260
260
|
if (!Y(e, "expiresAt") || !Y(e, "accessToken") || !Y(e, "refreshToken"))
|
|
261
261
|
return (e == null ? void 0 : e.accessToken) || "";
|
|
262
262
|
if (r()) {
|
|
263
|
-
const o =
|
|
263
|
+
const o = _i();
|
|
264
264
|
if (o) {
|
|
265
265
|
const u = await o;
|
|
266
266
|
return u && t(u), (u == null ? void 0 : u.accessToken) || "";
|
|
@@ -280,14 +280,14 @@ const ks = () => {
|
|
|
280
280
|
}, [i])
|
|
281
281
|
};
|
|
282
282
|
}, R = () => {
|
|
283
|
-
const { logout: e } =
|
|
283
|
+
const { logout: e } = Ae(), { getAccessToken: t } = Ds();
|
|
284
284
|
return q(
|
|
285
285
|
async (n, s, r = {}) => {
|
|
286
286
|
const a = await t();
|
|
287
287
|
if (!a)
|
|
288
288
|
return console.error("No auth token found"), null;
|
|
289
289
|
try {
|
|
290
|
-
const i =
|
|
290
|
+
const i = H(s, "action", "").toLowerCase(), o = await en(n + (i ? `?action=${i}` : ""), s, {
|
|
291
291
|
...r,
|
|
292
292
|
Authorization: `Bearer ${a}`
|
|
293
293
|
});
|
|
@@ -311,7 +311,7 @@ const ks = () => {
|
|
|
311
311
|
);
|
|
312
312
|
};
|
|
313
313
|
function le() {
|
|
314
|
-
const [e, t] =
|
|
314
|
+
const [e, t] = x(
|
|
315
315
|
new URLSearchParams(window.location.search)
|
|
316
316
|
);
|
|
317
317
|
return re(() => {
|
|
@@ -336,7 +336,7 @@ const Ue = (e) => {
|
|
|
336
336
|
action: y.GET_LANGUAGE_PAGES,
|
|
337
337
|
data: { id: s }
|
|
338
338
|
});
|
|
339
|
-
return
|
|
339
|
+
return Gr(xr(a, "primaryPage"));
|
|
340
340
|
},
|
|
341
341
|
enabled: !!s
|
|
342
342
|
});
|
|
@@ -356,17 +356,17 @@ const Ue = (e) => {
|
|
|
356
356
|
data: { draft: !0 }
|
|
357
357
|
})
|
|
358
358
|
});
|
|
359
|
-
},
|
|
359
|
+
}, Gs = (e) => {
|
|
360
360
|
const { fallbackLang: t } = Re(), { data: n } = Be(), { data: s, isFetching: r } = Ue(), a = $(() => {
|
|
361
361
|
const i = { [t]: !0 };
|
|
362
|
-
return
|
|
362
|
+
return Or(H(n, "languages"), (o) => {
|
|
363
363
|
const l = ae(s, { lang: o });
|
|
364
364
|
i[o] = !!l;
|
|
365
365
|
}), i;
|
|
366
366
|
}, [t, s, n]);
|
|
367
367
|
return r || me(e) || e && a[e];
|
|
368
368
|
};
|
|
369
|
-
class
|
|
369
|
+
class Pi {
|
|
370
370
|
constructor(t, n, s, r) {
|
|
371
371
|
ve(this, "channelId");
|
|
372
372
|
ve(this, "supabase");
|
|
@@ -410,10 +410,10 @@ class Ti {
|
|
|
410
410
|
return t.length > 0 ? t[0] : null;
|
|
411
411
|
}
|
|
412
412
|
getPageUserMapping() {
|
|
413
|
-
const t = this.getOnlineUsers({}), n =
|
|
413
|
+
const t = this.getOnlineUsers({}), n = Rr(t, "pageId"), s = {};
|
|
414
414
|
return Object.keys(n).forEach((r) => {
|
|
415
415
|
var i;
|
|
416
|
-
const a = (i =
|
|
416
|
+
const a = (i = Ur(n[r], "onlineAt")) == null ? void 0 : i.userId;
|
|
417
417
|
a !== this.userId && (s[r] = a);
|
|
418
418
|
}), s;
|
|
419
419
|
}
|
|
@@ -473,20 +473,20 @@ class Ti {
|
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
const
|
|
476
|
+
const wi = pe(
|
|
477
477
|
null
|
|
478
|
-
), xs = () =>
|
|
478
|
+
), xs = () => te(wi), Dn = () => {
|
|
479
479
|
const [e] = xs();
|
|
480
480
|
return (e == null ? void 0 : e.slug) || "";
|
|
481
481
|
};
|
|
482
|
-
function
|
|
483
|
-
const [n, s] =
|
|
482
|
+
function vi(e, t) {
|
|
483
|
+
const [n, s] = x(e);
|
|
484
484
|
return re(() => {
|
|
485
485
|
const r = setTimeout(() => s(e), t);
|
|
486
486
|
return () => clearTimeout(r);
|
|
487
487
|
}, [e, t]), n;
|
|
488
488
|
}
|
|
489
|
-
const
|
|
489
|
+
const bi = ({ query: e, uuid: t }) => {
|
|
490
490
|
const { selectedLang: n, fallbackLang: s } = Re(), { data: r } = oe(), a = r == null ? void 0 : r.pageType, i = B(), o = R(), { data: l, isFetching: u } = ie({
|
|
491
491
|
queryKey: [y.GET_DYNAMIC_PAGES, e, a, t],
|
|
492
492
|
staleTime: 60 * 60 * 1e3,
|
|
@@ -498,10 +498,10 @@ const Pi = ({ query: e, uuid: t }) => {
|
|
|
498
498
|
enabled: !!a
|
|
499
499
|
}), f = $(() => n === "" ? l.filter((d) => d.lang === "" || d.lang === s) : l.filter((d) => d.lang === n), [n, s, l]);
|
|
500
500
|
return { allLangPages: l, data: f, isFetching: u };
|
|
501
|
-
},
|
|
502
|
-
const { selectedLang: e, fallbackLang: t } = Re(), [n, s] = xs(), [r, a] =
|
|
501
|
+
}, Ii = () => {
|
|
502
|
+
const { selectedLang: e, fallbackLang: t } = Re(), [n, s] = xs(), [r, a] = x(""), i = vi(r, 500), { allLangPages: o, data: l, isFetching: u } = bi({ query: i }), f = q((g) => s(g), [s]), d = q((g) => a(g), [a]), h = q(() => {
|
|
503
503
|
if (!n) return;
|
|
504
|
-
const
|
|
504
|
+
const g = !(n != null && n.primaryPage), E = e.length === 0, S = g ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, p = o.filter(
|
|
505
505
|
(A) => (A == null ? void 0 : A.primaryPage) === S || A.id === S
|
|
506
506
|
).find((A) => E ? A.lang === e || A.lang === t : A.lang === e);
|
|
507
507
|
s(p || n);
|
|
@@ -517,16 +517,16 @@ const Pi = ({ query: e, uuid: t }) => {
|
|
|
517
517
|
updateSearchQuery: d,
|
|
518
518
|
onChangeLanguage: h
|
|
519
519
|
};
|
|
520
|
-
},
|
|
520
|
+
}, Ni = pe({ lastSaved: void 0 }), Gn = () => te(Ni), oe = () => {
|
|
521
521
|
const [e] = le(), t = e.get("page"), { data: n, isFetching: s } = Ue();
|
|
522
522
|
return { data: $(() => ({ ...ae(n, { id: t }) || {} }), [n, t]), isFetching: s };
|
|
523
523
|
}, Ie = () => {
|
|
524
524
|
const [e] = le(), t = e.get("lang") ?? "", { data: n, isFetching: s } = Ue();
|
|
525
525
|
return { data: $(() => ae(n, { lang: t }) || {}, [n, t]), isFetching: s };
|
|
526
|
-
},
|
|
527
|
-
const { data: e } = Ie(), t =
|
|
526
|
+
}, Ci = pe({}), Li = () => te(Ci), ki = () => {
|
|
527
|
+
const { data: e } = Ie(), t = Dn(), n = ye("getLiveUrl", As), s = e == null ? void 0 : e.slug, r = n(s || "/");
|
|
528
528
|
return t ? r + t : r;
|
|
529
|
-
},
|
|
529
|
+
}, Di = (e) => {
|
|
530
530
|
const t = Zt(), n = R();
|
|
531
531
|
return ie({
|
|
532
532
|
queryKey: [y.GET_CHAI_USER, e],
|
|
@@ -540,14 +540,14 @@ const Pi = ({ query: e, uuid: t }) => {
|
|
|
540
540
|
enabled: !me(e),
|
|
541
541
|
staleTime: "static"
|
|
542
542
|
});
|
|
543
|
-
},
|
|
543
|
+
}, Gi = pe({
|
|
544
544
|
status: "checking",
|
|
545
545
|
requestedBy: "",
|
|
546
546
|
isTakeOverRequested: !1,
|
|
547
547
|
requestingClientId: "",
|
|
548
548
|
isActiveInOtherTab: !1
|
|
549
|
-
}),
|
|
550
|
-
const [e] = le(), t = e.get("page"), [n, s] =
|
|
549
|
+
}), xi = pe(""), Oi = pe(null), xn = pe({}), Yc = () => te(xn), Ne = () => {
|
|
550
|
+
const [e] = le(), t = e.get("page"), [n, s] = te(Gi), [r, a] = te(Oi), [i, o] = te(xi), [l] = te(xn);
|
|
551
551
|
return {
|
|
552
552
|
pageLock: n,
|
|
553
553
|
pageToUser: l,
|
|
@@ -560,11 +560,11 @@ const Pi = ({ query: e, uuid: t }) => {
|
|
|
560
560
|
currentEditor: l[t || ""],
|
|
561
561
|
isLocked: t && n.status === "locked"
|
|
562
562
|
};
|
|
563
|
-
},
|
|
564
|
-
const e =
|
|
563
|
+
}, Ri = () => {
|
|
564
|
+
const e = fi(), { data: t } = oe(), { user: n } = Ae(), s = t == null ? void 0 : t.id, { data: r } = Be(), { pageLock: a, setPageLock: i, setLockingStatus: o, realtimeInstance: l, setRealtimeInstance: u } = Ne(), [, f] = te(xn), d = ct(!1), h = ct(a), g = ct(!1);
|
|
565
565
|
return re(() => {
|
|
566
|
-
if (n != null && n.id && e && !l && (r != null && r.appKey) && !
|
|
567
|
-
|
|
566
|
+
if (n != null && n.id && e && !l && (r != null && r.appKey) && !g.current) {
|
|
567
|
+
g.current = !0;
|
|
568
568
|
const E = async (T, p) => {
|
|
569
569
|
var A, w;
|
|
570
570
|
switch (T) {
|
|
@@ -645,7 +645,7 @@ const Pi = ({ query: e, uuid: t }) => {
|
|
|
645
645
|
});
|
|
646
646
|
break;
|
|
647
647
|
}
|
|
648
|
-
}, S = new
|
|
648
|
+
}, S = new Pi(
|
|
649
649
|
e,
|
|
650
650
|
r == null ? void 0 : r.appKey,
|
|
651
651
|
n == null ? void 0 : n.id,
|
|
@@ -667,8 +667,8 @@ const Pi = ({ query: e, uuid: t }) => {
|
|
|
667
667
|
}, o(""), i(h.current), l == null || l.leavePage());
|
|
668
668
|
};
|
|
669
669
|
}, [s, l]), a == null ? void 0 : a.status;
|
|
670
|
-
},
|
|
671
|
-
const { data: e } = oe(), { user: t } =
|
|
670
|
+
}, Ui = () => {
|
|
671
|
+
const { data: e } = oe(), { user: t } = Ae(), n = e == null ? void 0 : e.id, { pageLock: s, setPageLock: r, realtimeInstance: a } = Ne(), { savePageAsync: i } = Oe(), o = q(() => {
|
|
672
672
|
!a || !n || !(t != null && t.id) || (r({ ...s, isTakeOverRequested: !0 }), a == null || a.sendEvent("TAKE_OVER_REQUESTED"));
|
|
673
673
|
}, [a, n, t == null ? void 0 : t.id, r, s]), l = q(async () => {
|
|
674
674
|
!a || !n || !(t != null && t.id) || (await i(), a == null || a.sendEvent("TAKE_OVER_REQUEST_ACCEPTED", {
|
|
@@ -698,19 +698,19 @@ const Pi = ({ query: e, uuid: t }) => {
|
|
|
698
698
|
rejectTakeOver: u,
|
|
699
699
|
requestTakeOver: o
|
|
700
700
|
};
|
|
701
|
-
},
|
|
702
|
-
const { pageLock: t, requestTakeOver: n } =
|
|
701
|
+
}, Bi = K(() => import("./no-language-page-content-CqH4FMNy.js")), Mi = K(() => import("./page-locked-by-dialog-DC8UKy9e.js")), ln = K(() => import("./page-lock-request-Dc-JkLEZ.js")), Fi = ({ isFetchingPage: e }) => {
|
|
702
|
+
const { pageLock: t, requestTakeOver: n } = Ui(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ne(), { data: o, isFetching: l } = Di(s), [u] = le(), f = u.get("page"), [d] = Gn(), h = ee(), g = q(() => {
|
|
703
703
|
n();
|
|
704
704
|
}, [n]);
|
|
705
|
-
return !f || e || !i || (t == null ? void 0 : t.status) === "checking" ? null : t != null && t.requestedBy ? /* @__PURE__ */ c(
|
|
705
|
+
return !f || e || !i || (t == null ? void 0 : t.status) === "checking" ? null : t != null && t.requestedBy ? /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
706
706
|
ln,
|
|
707
707
|
{
|
|
708
|
-
lockingStatus:
|
|
708
|
+
lockingStatus: "",
|
|
709
709
|
onContinue: () => {
|
|
710
710
|
n();
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
|
-
) }) : (t == null ? void 0 : t.status) !== "locked" ? r === "take_over_request_accepted" || r === "can_edit_now" ? /* @__PURE__ */ c(
|
|
713
|
+
) }) : (t == null ? void 0 : t.status) !== "locked" ? r === "take_over_request_accepted" || r === "can_edit_now" ? /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
714
714
|
ln,
|
|
715
715
|
{
|
|
716
716
|
lockingStatus: r,
|
|
@@ -720,23 +720,23 @@ const Pi = ({ query: e, uuid: t }) => {
|
|
|
720
720
|
}), a("");
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
) }) : null : t != null && t.isActiveInOtherTab ? /* @__PURE__ */ c(
|
|
724
|
-
|
|
723
|
+
) }) : null : t != null && t.isActiveInOtherTab ? /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(ln, { lockingStatus: "page_is_active_in_other_tab", onContinue: n }) }) : /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
724
|
+
Mi,
|
|
725
725
|
{
|
|
726
726
|
...o,
|
|
727
727
|
isFetchingUserInfo: l,
|
|
728
728
|
name: (o == null ? void 0 : o.name) || "Unknown User",
|
|
729
729
|
email: (o == null ? void 0 : o.email) || "",
|
|
730
730
|
lastSaved: (d == null ? void 0 : d.lastSaved) || "",
|
|
731
|
-
onTakeOver:
|
|
731
|
+
onTakeOver: g,
|
|
732
732
|
realtimePageLockEnabled: i,
|
|
733
733
|
isRequestRejected: r === "take_over_request_rejected"
|
|
734
734
|
}
|
|
735
735
|
) });
|
|
736
|
-
},
|
|
736
|
+
}, qi = () => {
|
|
737
737
|
const [e] = le(), t = e.get("lang");
|
|
738
|
-
return
|
|
739
|
-
},
|
|
738
|
+
return Gs(t) ? null : /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Bi, {}) });
|
|
739
|
+
}, Gt = {
|
|
740
740
|
ab: "Abkhazian",
|
|
741
741
|
aa: "Afar",
|
|
742
742
|
af: "Afrikaans",
|
|
@@ -925,17 +925,17 @@ const Pi = ({ query: e, uuid: t }) => {
|
|
|
925
925
|
za: "Zhuang, Chuang",
|
|
926
926
|
zu: "Zulu"
|
|
927
927
|
};
|
|
928
|
-
function
|
|
928
|
+
function Os(e, t, n = !1) {
|
|
929
929
|
const s = e.toString() ? `?${e.toString()}` : "/";
|
|
930
930
|
n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
931
931
|
}
|
|
932
|
-
const
|
|
932
|
+
const On = pe(null), Rn = () => {
|
|
933
933
|
const { data: e } = Be();
|
|
934
934
|
return $(
|
|
935
935
|
() => (e == null ? void 0 : e.fallbackLang) || "en",
|
|
936
936
|
[e]
|
|
937
937
|
);
|
|
938
|
-
},
|
|
938
|
+
}, Rs = () => {
|
|
939
939
|
const e = R(), t = B();
|
|
940
940
|
return ie({
|
|
941
941
|
queryKey: [y.GET_WEBSITE_PAGES],
|
|
@@ -943,8 +943,8 @@ const Rn = _e(null), Un = () => {
|
|
|
943
943
|
queryFn: async () => e(t, { action: y.GET_WEBSITE_PAGES }) || [],
|
|
944
944
|
placeholderData: (n) => n || []
|
|
945
945
|
});
|
|
946
|
-
},
|
|
947
|
-
const t = R(), n = B(), s =
|
|
946
|
+
}, Jc = (e) => {
|
|
947
|
+
const t = R(), n = B(), s = Rn();
|
|
948
948
|
return ie({
|
|
949
949
|
queryKey: [y.GET_WEBSITE_PAGES, e, s],
|
|
950
950
|
staleTime: 1e3 * 60 * 5,
|
|
@@ -952,15 +952,15 @@ const Rn = _e(null), Un = () => {
|
|
|
952
952
|
queryFn: async () => {
|
|
953
953
|
if (s === e) return {};
|
|
954
954
|
const r = await t(n, { action: y.GET_WEBSITE_PAGES, data: { lang: e } }) || [];
|
|
955
|
-
return
|
|
956
|
-
|
|
955
|
+
return Br(
|
|
956
|
+
Kt(r, (a) => ({ ...a, lang: e })),
|
|
957
957
|
"primaryPage"
|
|
958
958
|
);
|
|
959
959
|
},
|
|
960
960
|
placeholderData: (r) => r || {}
|
|
961
961
|
});
|
|
962
|
-
},
|
|
963
|
-
const [t, n] = le(), s = t.get("page"), { data: r, isFetching: a } = oe(), { data: i, isFetching: o } =
|
|
962
|
+
}, Ki = K(() => import("./page-manager-new-DYYWpxWy.js")), Us = ({ children: e }) => {
|
|
963
|
+
const [t, n] = le(), s = t.get("page"), { data: r, isFetching: a } = oe(), { data: i, isFetching: o } = Rs(), [l, u] = x(!1), [f, d] = x(!0), { savePage: h } = Oe(), g = !!s && !me(r), E = $(() => {
|
|
964
964
|
if (!i || o) return !1;
|
|
965
965
|
const A = i.find((w) => w.slug === "/");
|
|
966
966
|
return A == null ? void 0 : A.id;
|
|
@@ -968,49 +968,49 @@ const Rn = _e(null), Un = () => {
|
|
|
968
968
|
re(() => {
|
|
969
969
|
if (o || !E || i.some((D) => D.id === s)) return;
|
|
970
970
|
const w = new URLSearchParams({ page: E });
|
|
971
|
-
|
|
971
|
+
Os(w, n), !o && i && d(!1);
|
|
972
972
|
}, [s, o, i, E, n]);
|
|
973
973
|
const S = !f && !s, T = !f && !a && me(r), p = l || S || T;
|
|
974
|
-
return /* @__PURE__ */
|
|
975
|
-
/* @__PURE__ */ c("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ c("div", { className: "relative", children: /* @__PURE__ */
|
|
974
|
+
return /* @__PURE__ */ m(he, { children: [
|
|
975
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ c("div", { className: "relative", children: /* @__PURE__ */ m(Yt, { children: [
|
|
976
976
|
/* @__PURE__ */ c(
|
|
977
|
-
|
|
977
|
+
Jt,
|
|
978
978
|
{
|
|
979
979
|
asChild: !0,
|
|
980
980
|
onClick: () => {
|
|
981
981
|
h(), u(!0);
|
|
982
982
|
},
|
|
983
|
-
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(
|
|
983
|
+
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(Ma, { className: "h-4 w-4" }) }, "template-viewer")
|
|
984
984
|
}
|
|
985
985
|
),
|
|
986
|
-
/* @__PURE__ */ c(
|
|
986
|
+
/* @__PURE__ */ c(Xt, { side: "right", children: /* @__PURE__ */ c("p", { children: "Open pages manager" }) })
|
|
987
987
|
] }) }) }),
|
|
988
|
-
/* @__PURE__ */ c(ws, { open: p, onOpenChange: (A) => !A &&
|
|
988
|
+
/* @__PURE__ */ c(ws, { open: p, onOpenChange: (A) => !A && g && u(!1), children: /* @__PURE__ */ m(
|
|
989
989
|
vs,
|
|
990
990
|
{
|
|
991
991
|
side: "left",
|
|
992
992
|
"aria-describedby": "pages-manager-description",
|
|
993
|
-
className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${
|
|
993
|
+
className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${g ? "" : "sheet-hide-close-btn"}`,
|
|
994
994
|
children: [
|
|
995
|
-
/* @__PURE__ */
|
|
996
|
-
/* @__PURE__ */
|
|
997
|
-
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(
|
|
998
|
-
/* @__PURE__ */
|
|
995
|
+
/* @__PURE__ */ m(oa, { className: "mb-3 px-4 pt-4", children: [
|
|
996
|
+
/* @__PURE__ */ m(la, { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
997
|
+
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(Fa, { className: "h-4 w-4" }) }),
|
|
998
|
+
/* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
999
999
|
/* @__PURE__ */ c("span", { className: "text-sm font-semibold", children: "Pages" }),
|
|
1000
1000
|
/* @__PURE__ */ c("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: "Manage your site structure" })
|
|
1001
1001
|
] })
|
|
1002
1002
|
] }),
|
|
1003
|
-
/* @__PURE__ */ c(
|
|
1003
|
+
/* @__PURE__ */ c(ca, { className: "sr-only", children: "Manage your site structure" })
|
|
1004
1004
|
] }),
|
|
1005
|
-
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: p && /* @__PURE__ */ c(
|
|
1005
|
+
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: p && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Ki, { close: () => u(!1) }) }) })
|
|
1006
1006
|
]
|
|
1007
1007
|
}
|
|
1008
1008
|
) })
|
|
1009
1009
|
] });
|
|
1010
|
-
},
|
|
1011
|
-
const e =
|
|
1012
|
-
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children:
|
|
1013
|
-
},
|
|
1010
|
+
}, Vi = K(() => import("./add-new-language-page-CcBqDtYv.js")), Hi = () => {
|
|
1011
|
+
const e = ye("topLeftCorner", null);
|
|
1012
|
+
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: zr.createElement(e, {}) }) : null;
|
|
1013
|
+
}, $i = ({
|
|
1014
1014
|
showAdd: e = !0,
|
|
1015
1015
|
variant: t = "ghost"
|
|
1016
1016
|
}) => {
|
|
@@ -1019,13 +1019,13 @@ const Rn = _e(null), Un = () => {
|
|
|
1019
1019
|
const T = new URLSearchParams(window.location.search), p = T.get("lang");
|
|
1020
1020
|
p && (s.includes(p) ? a(p) : (T.delete("lang"), o(T), a("")));
|
|
1021
1021
|
}, [s, o, a]);
|
|
1022
|
-
const [, u] =
|
|
1022
|
+
const [, u] = te(On), { data: f } = oe(), { data: d } = Be(), { data: h } = Ue(), g = $(() => {
|
|
1023
1023
|
const T = Ts(
|
|
1024
|
-
|
|
1024
|
+
Kt(H(d, "languages"), (p) => {
|
|
1025
1025
|
const A = ae(h, { lang: p });
|
|
1026
1026
|
return {
|
|
1027
1027
|
key: p,
|
|
1028
|
-
value:
|
|
1028
|
+
value: H(Gt, p, p),
|
|
1029
1029
|
isLangPageAdded: !!A
|
|
1030
1030
|
};
|
|
1031
1031
|
})
|
|
@@ -1033,7 +1033,7 @@ const Rn = _e(null), Un = () => {
|
|
|
1033
1033
|
return [
|
|
1034
1034
|
{
|
|
1035
1035
|
key: n,
|
|
1036
|
-
value:
|
|
1036
|
+
value: H(Gt, n),
|
|
1037
1037
|
isLangPageAdded: !0
|
|
1038
1038
|
},
|
|
1039
1039
|
...T
|
|
@@ -1054,14 +1054,14 @@ const Rn = _e(null), Un = () => {
|
|
|
1054
1054
|
}, S = (T) => {
|
|
1055
1055
|
a(T);
|
|
1056
1056
|
const p = new URLSearchParams(window.location.search);
|
|
1057
|
-
T === n ? p.delete("lang") : p.set("lang", T),
|
|
1057
|
+
T === n ? p.delete("lang") : p.set("lang", T), Os(p, o);
|
|
1058
1058
|
};
|
|
1059
|
-
return me(s) ? null : l ? /* @__PURE__ */
|
|
1059
|
+
return me(s) ? null : l ? /* @__PURE__ */ m(M, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
|
|
1060
1060
|
/* @__PURE__ */ c(zn, { className: "h-4 w-4" }),
|
|
1061
|
-
|
|
1061
|
+
H(Gt, i, i),
|
|
1062
1062
|
/* @__PURE__ */ c(mn, { className: "h-4 w-4" })
|
|
1063
|
-
] }) : /* @__PURE__ */ c(he, { children: /* @__PURE__ */
|
|
1064
|
-
/* @__PURE__ */ c(Cn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */
|
|
1063
|
+
] }) : /* @__PURE__ */ c(he, { children: /* @__PURE__ */ m(Nn, { children: [
|
|
1064
|
+
/* @__PURE__ */ c(Cn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
|
|
1065
1065
|
M,
|
|
1066
1066
|
{
|
|
1067
1067
|
disabled: !!l,
|
|
@@ -1070,26 +1070,26 @@ const Rn = _e(null), Un = () => {
|
|
|
1070
1070
|
className: "ml-px h-max gap-2 py-1.5",
|
|
1071
1071
|
children: [
|
|
1072
1072
|
/* @__PURE__ */ c(zn, { className: "h-4 w-4" }),
|
|
1073
|
-
|
|
1073
|
+
H(Gt, i, i),
|
|
1074
1074
|
/* @__PURE__ */ c(mn, { className: "h-4 w-4" })
|
|
1075
1075
|
]
|
|
1076
1076
|
}
|
|
1077
1077
|
) }),
|
|
1078
|
-
/* @__PURE__ */
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
(T) => /* @__PURE__ */
|
|
1078
|
+
/* @__PURE__ */ m(Ln, { className: "space-y-1 border-border", children: [
|
|
1079
|
+
Kt(
|
|
1080
|
+
g.filter((T) => T.isLangPageAdded),
|
|
1081
|
+
(T) => /* @__PURE__ */ m(
|
|
1082
1082
|
fe,
|
|
1083
1083
|
{
|
|
1084
|
-
className:
|
|
1084
|
+
className: Vt(
|
|
1085
1085
|
"flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
|
|
1086
1086
|
T.key === i && "!bg-gray-200 text-gray-700"
|
|
1087
1087
|
),
|
|
1088
1088
|
onClick: () => E(T.key),
|
|
1089
1089
|
children: [
|
|
1090
1090
|
/* @__PURE__ */ c("div", { className: "text-slate-600", children: T.value }),
|
|
1091
|
-
T.key === n && /* @__PURE__ */
|
|
1092
|
-
/* @__PURE__ */ c(
|
|
1091
|
+
T.key === n && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
|
|
1092
|
+
/* @__PURE__ */ c(qa, { fill: "orange", className: "h-2 w-2" }),
|
|
1093
1093
|
"Primary"
|
|
1094
1094
|
] })
|
|
1095
1095
|
]
|
|
@@ -1097,9 +1097,9 @@ const Rn = _e(null), Un = () => {
|
|
|
1097
1097
|
T.value
|
|
1098
1098
|
)
|
|
1099
1099
|
),
|
|
1100
|
-
e && !me(
|
|
1101
|
-
/* @__PURE__ */ c(
|
|
1102
|
-
/* @__PURE__ */
|
|
1100
|
+
e && !me(g.filter((T) => !T.isLangPageAdded)) && /* @__PURE__ */ m(he, { children: [
|
|
1101
|
+
/* @__PURE__ */ c(ua, {}),
|
|
1102
|
+
/* @__PURE__ */ m(
|
|
1103
1103
|
M,
|
|
1104
1104
|
{
|
|
1105
1105
|
size: "sm",
|
|
@@ -1121,13 +1121,13 @@ const Rn = _e(null), Un = () => {
|
|
|
1121
1121
|
] })
|
|
1122
1122
|
] }) });
|
|
1123
1123
|
};
|
|
1124
|
-
function
|
|
1125
|
-
const [e, t] =
|
|
1126
|
-
return /* @__PURE__ */
|
|
1127
|
-
/* @__PURE__ */ c(
|
|
1128
|
-
/* @__PURE__ */ c(
|
|
1129
|
-
e && /* @__PURE__ */ c(
|
|
1130
|
-
|
|
1124
|
+
function Qi() {
|
|
1125
|
+
const [e, t] = te(On);
|
|
1126
|
+
return /* @__PURE__ */ m("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
|
|
1127
|
+
/* @__PURE__ */ c(Hi, {}),
|
|
1128
|
+
/* @__PURE__ */ c(Us, {}),
|
|
1129
|
+
e && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1130
|
+
Vi,
|
|
1131
1131
|
{
|
|
1132
1132
|
isOpen: !0,
|
|
1133
1133
|
id: e == null ? void 0 : e.id,
|
|
@@ -1139,31 +1139,32 @@ function Vi() {
|
|
|
1139
1139
|
) })
|
|
1140
1140
|
] });
|
|
1141
1141
|
}
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
/* @__PURE__ */ c(
|
|
1147
|
-
/* @__PURE__ */ c(
|
|
1142
|
+
const Bs = pe("");
|
|
1143
|
+
function ji() {
|
|
1144
|
+
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: [
|
|
1145
|
+
/* @__PURE__ */ m("div", { className: "flex-1 space-y-1", children: [
|
|
1146
|
+
/* @__PURE__ */ c(Dt, { className: "h-4 w-3/4" }),
|
|
1147
|
+
/* @__PURE__ */ c(Dt, { className: "h-3 w-1/2" }),
|
|
1148
|
+
/* @__PURE__ */ c(Dt, { className: "mt-1 h-5 w-20" })
|
|
1148
1149
|
] }),
|
|
1149
|
-
/* @__PURE__ */ c(
|
|
1150
|
+
/* @__PURE__ */ c(Dt, { className: "h-8 w-8 rounded-full" })
|
|
1150
1151
|
] }, t)) });
|
|
1151
1152
|
}
|
|
1152
|
-
const
|
|
1153
|
-
function
|
|
1153
|
+
const zi = j.lazy(() => import("./page-revisions-content-KJGhm9Pl.js"));
|
|
1154
|
+
function Wi() {
|
|
1154
1155
|
const [e, t] = j.useState(!1);
|
|
1155
|
-
return /* @__PURE__ */ c(bs, { children: /* @__PURE__ */
|
|
1156
|
-
/* @__PURE__ */
|
|
1157
|
-
/* @__PURE__ */ c(
|
|
1158
|
-
/* @__PURE__ */
|
|
1159
|
-
/* @__PURE__ */ c(
|
|
1156
|
+
return /* @__PURE__ */ c(bs, { children: /* @__PURE__ */ m(Yt, { delayDuration: 0, children: [
|
|
1157
|
+
/* @__PURE__ */ m(ws, { open: e, onOpenChange: t, children: [
|
|
1158
|
+
/* @__PURE__ */ c(da, { asChild: !0, children: /* @__PURE__ */ c(Jt, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
|
|
1159
|
+
/* @__PURE__ */ m(M, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
|
|
1160
|
+
/* @__PURE__ */ c(Ka, { className: "h-4 w-4" }),
|
|
1160
1161
|
/* @__PURE__ */ c("span", { className: "sr-only", children: "View revision history" })
|
|
1161
1162
|
] }),
|
|
1162
1163
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1163
1164
|
] }) }) }),
|
|
1164
|
-
/* @__PURE__ */ c(vs, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(
|
|
1165
|
+
/* @__PURE__ */ c(vs, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c(ji, {}), children: /* @__PURE__ */ c(zi, { isOpen: e }) }) })
|
|
1165
1166
|
] }),
|
|
1166
|
-
/* @__PURE__ */ c(
|
|
1167
|
+
/* @__PURE__ */ c(Xt, { side: "bottom", children: /* @__PURE__ */ c("p", { children: "Revision history" }) })
|
|
1167
1168
|
] }) });
|
|
1168
1169
|
}
|
|
1169
1170
|
const cn = ({
|
|
@@ -1175,7 +1176,7 @@ const cn = ({
|
|
|
1175
1176
|
const { hasPermission: r } = Ps();
|
|
1176
1177
|
return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
|
|
1177
1178
|
}, X = {
|
|
1178
|
-
|
|
1179
|
+
TOGGLE_PREVIEW: "Toggle Preview",
|
|
1179
1180
|
THEME: "Theme",
|
|
1180
1181
|
SAVEDRAFT: "Save draft",
|
|
1181
1182
|
SAVING: "Saving",
|
|
@@ -1223,7 +1224,7 @@ const cn = ({
|
|
|
1223
1224
|
GLOBAL_BLOCK_PUBLISH_SUCCESS: "Global block published successfully.",
|
|
1224
1225
|
PAGES_PUBLISH_SUCCESS: "Your changes have been published successfully.",
|
|
1225
1226
|
SLUG_CHANGE_SUCCESS: "Slug changed successfully."
|
|
1226
|
-
},
|
|
1227
|
+
}, Yi = {
|
|
1227
1228
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
1228
1229
|
}, Ce = () => {
|
|
1229
1230
|
const e = B(), t = R();
|
|
@@ -1233,12 +1234,12 @@ const cn = ({
|
|
|
1233
1234
|
placeholderData: [],
|
|
1234
1235
|
queryFn: async () => t(e, { action: y.GET_PAGE_TYPES })
|
|
1235
1236
|
});
|
|
1236
|
-
},
|
|
1237
|
+
}, Ji = (e) => {
|
|
1237
1238
|
const { data: t } = Ce();
|
|
1238
1239
|
return $(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
|
|
1239
|
-
},
|
|
1240
|
+
}, Xi = () => {
|
|
1240
1241
|
const e = B(), t = R();
|
|
1241
|
-
return
|
|
1242
|
+
return se({
|
|
1242
1243
|
mutationFn: async ({ pageType: n, query: s }) => {
|
|
1243
1244
|
try {
|
|
1244
1245
|
return t(e, {
|
|
@@ -1253,9 +1254,9 @@ const cn = ({
|
|
|
1253
1254
|
}
|
|
1254
1255
|
}
|
|
1255
1256
|
});
|
|
1256
|
-
},
|
|
1257
|
+
}, Xc = () => {
|
|
1257
1258
|
const e = B(), t = ee(), n = R(), { data: s } = Ce();
|
|
1258
|
-
return
|
|
1259
|
+
return se({
|
|
1259
1260
|
mutationFn: async (r) => await n(e, {
|
|
1260
1261
|
action: y.CREATE_PAGE,
|
|
1261
1262
|
data: r
|
|
@@ -1275,13 +1276,13 @@ const cn = ({
|
|
|
1275
1276
|
onError: (r, a) => {
|
|
1276
1277
|
const i = ae(s, { key: a.pageType });
|
|
1277
1278
|
z.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1278
|
-
description:
|
|
1279
|
+
description: H(Yi, r.message, r.message)
|
|
1279
1280
|
});
|
|
1280
1281
|
}
|
|
1281
1282
|
});
|
|
1282
|
-
},
|
|
1283
|
+
}, Zc = () => {
|
|
1283
1284
|
const e = B(), t = ee(), n = R(), { data: s } = Ie(), { data: r } = Ce();
|
|
1284
|
-
return
|
|
1285
|
+
return se({
|
|
1285
1286
|
mutationFn: async (a) => await n(e, {
|
|
1286
1287
|
action: y.UPDATE_PAGE,
|
|
1287
1288
|
data: a
|
|
@@ -1304,9 +1305,9 @@ const cn = ({
|
|
|
1304
1305
|
});
|
|
1305
1306
|
}
|
|
1306
1307
|
});
|
|
1307
|
-
},
|
|
1308
|
+
}, eu = () => {
|
|
1308
1309
|
const e = B(), t = ee(), n = R(), { data: s } = Ce();
|
|
1309
|
-
return
|
|
1310
|
+
return se({
|
|
1310
1311
|
mutationFn: async (r) => n(e, {
|
|
1311
1312
|
action: y.DELETE_PAGE,
|
|
1312
1313
|
data: { id: r == null ? void 0 : r.id }
|
|
@@ -1333,9 +1334,9 @@ const cn = ({
|
|
|
1333
1334
|
});
|
|
1334
1335
|
}
|
|
1335
1336
|
});
|
|
1336
|
-
},
|
|
1337
|
+
}, tu = () => {
|
|
1337
1338
|
const e = B(), t = ee(), n = R(), { data: s } = Ce();
|
|
1338
|
-
return
|
|
1339
|
+
return se({
|
|
1339
1340
|
mutationFn: async (r) => n(e, {
|
|
1340
1341
|
action: y.TAKE_OFFLINE,
|
|
1341
1342
|
data: { id: r == null ? void 0 : r.id }
|
|
@@ -1358,9 +1359,9 @@ const cn = ({
|
|
|
1358
1359
|
});
|
|
1359
1360
|
}
|
|
1360
1361
|
});
|
|
1361
|
-
},
|
|
1362
|
+
}, Ms = () => {
|
|
1362
1363
|
const e = B(), t = R(), n = ee(), { data: s } = oe(), { savePageAsync: r } = Oe();
|
|
1363
|
-
return
|
|
1364
|
+
return se({
|
|
1364
1365
|
mutationFn: async ({ ids: a }) => (await r(), t(e, {
|
|
1365
1366
|
action: y.PUBLISH_CHANGES,
|
|
1366
1367
|
data: { ids: a }
|
|
@@ -1378,9 +1379,9 @@ const cn = ({
|
|
|
1378
1379
|
console.log("##", a), z.error("Failed to publish pages.");
|
|
1379
1380
|
}
|
|
1380
1381
|
});
|
|
1381
|
-
},
|
|
1382
|
+
}, nu = () => {
|
|
1382
1383
|
const e = B(), t = R(), n = ee();
|
|
1383
|
-
return
|
|
1384
|
+
return se({
|
|
1384
1385
|
mutationFn: async (s) => {
|
|
1385
1386
|
var r;
|
|
1386
1387
|
return t(e, {
|
|
@@ -1403,9 +1404,9 @@ const cn = ({
|
|
|
1403
1404
|
z.error("Failed to mark page as template.");
|
|
1404
1405
|
}
|
|
1405
1406
|
});
|
|
1406
|
-
},
|
|
1407
|
+
}, su = () => {
|
|
1407
1408
|
const e = B(), t = R(), n = ee();
|
|
1408
|
-
return
|
|
1409
|
+
return se({
|
|
1409
1410
|
mutationFn: async (s) => t(e, {
|
|
1410
1411
|
action: y.UNMARK_AS_TEMPLATE,
|
|
1411
1412
|
data: { id: s == null ? void 0 : s.id }
|
|
@@ -1419,9 +1420,9 @@ const cn = ({
|
|
|
1419
1420
|
z.error("Failed to unmark page as template.");
|
|
1420
1421
|
}
|
|
1421
1422
|
});
|
|
1422
|
-
},
|
|
1423
|
+
}, ru = () => {
|
|
1423
1424
|
const e = B(), t = R(), n = ee();
|
|
1424
|
-
return
|
|
1425
|
+
return se({
|
|
1425
1426
|
mutationFn: async ({ id: s, slug: r }) => t(e, {
|
|
1426
1427
|
action: y.CHANGE_SLUG,
|
|
1427
1428
|
data: { id: s, slug: r }
|
|
@@ -1437,17 +1438,17 @@ const cn = ({
|
|
|
1437
1438
|
z.error("Failed to change slug");
|
|
1438
1439
|
}
|
|
1439
1440
|
});
|
|
1440
|
-
},
|
|
1441
|
-
function
|
|
1441
|
+
}, Zi = K(() => import("./publish-pages-content-BWLQZGjd.js"));
|
|
1442
|
+
function eo({
|
|
1442
1443
|
showModal: e = !1,
|
|
1443
1444
|
onClose: t = () => console.log("Cancelled")
|
|
1444
1445
|
}) {
|
|
1445
|
-
const { mutate: n, isPending: s } =
|
|
1446
|
+
const { mutate: n, isPending: s } = Ms();
|
|
1446
1447
|
return /* @__PURE__ */ c(Is, { open: e, onOpenChange: s ? () => {
|
|
1447
|
-
} : t, children: e && /* @__PURE__ */ c(
|
|
1448
|
+
} : t, children: e && /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(Zi, { onClose: t, isPending: s, publishPage: n }) }) });
|
|
1448
1449
|
}
|
|
1449
1450
|
const de = {
|
|
1450
|
-
...
|
|
1451
|
+
...Jr,
|
|
1451
1452
|
//pages
|
|
1452
1453
|
ADD_PAGE: "add_page",
|
|
1453
1454
|
EDIT_PAGE: "edit_page",
|
|
@@ -1483,12 +1484,12 @@ const de = {
|
|
|
1483
1484
|
ADD_MEDIA: "add_media",
|
|
1484
1485
|
EDIT_MEDIA: "edit_media",
|
|
1485
1486
|
DELETE_MEDIA: "delete_media"
|
|
1486
|
-
},
|
|
1487
|
+
}, to = {
|
|
1487
1488
|
particleCount: 350,
|
|
1488
1489
|
spread: 120,
|
|
1489
1490
|
origin: { y: 0.6 },
|
|
1490
1491
|
angle: 90
|
|
1491
|
-
},
|
|
1492
|
+
}, no = {
|
|
1492
1493
|
TOP_RIGHT: {
|
|
1493
1494
|
angle: 225,
|
|
1494
1495
|
origin: { x: 0.9, y: 0 }
|
|
@@ -1497,70 +1498,70 @@ const de = {
|
|
|
1497
1498
|
angle: 100,
|
|
1498
1499
|
origin: { x: 0.9, y: 0.9 }
|
|
1499
1500
|
}
|
|
1500
|
-
},
|
|
1501
|
+
}, so = async () => {
|
|
1501
1502
|
const { default: e } = await import("./confetti.module-DCmCkDyV.js");
|
|
1502
1503
|
return e;
|
|
1503
1504
|
}, un = (e) => {
|
|
1504
|
-
let t =
|
|
1505
|
+
let t = no[e];
|
|
1505
1506
|
t || (t = {});
|
|
1506
|
-
const n = { ...
|
|
1507
|
-
|
|
1507
|
+
const n = { ...to, ...t };
|
|
1508
|
+
so().then((s) => s(n));
|
|
1508
1509
|
};
|
|
1509
|
-
function
|
|
1510
|
+
function Un({
|
|
1510
1511
|
children: e,
|
|
1511
1512
|
content: t,
|
|
1512
1513
|
side: n = "bottom",
|
|
1513
1514
|
delayDuration: s = 700,
|
|
1514
1515
|
showTooltip: r = !0
|
|
1515
1516
|
}) {
|
|
1516
|
-
return r ? /* @__PURE__ */ c(bs, { children: /* @__PURE__ */
|
|
1517
|
-
/* @__PURE__ */ c(
|
|
1518
|
-
/* @__PURE__ */ c(
|
|
1517
|
+
return r ? /* @__PURE__ */ c(bs, { children: /* @__PURE__ */ m(Yt, { delayDuration: s, children: [
|
|
1518
|
+
/* @__PURE__ */ c(Jt, { asChild: !0, children: e }),
|
|
1519
|
+
/* @__PURE__ */ c(Xt, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
|
|
1519
1520
|
] }) }) : e;
|
|
1520
1521
|
}
|
|
1521
|
-
const
|
|
1522
|
-
const { selectedLang: e, fallbackLang: t } = Re(), n =
|
|
1522
|
+
const ro = K(() => import("./unpublish-page-CuSJRr5c.js")), ao = K(() => import("./translation-warning-modal-DalBhNQy.js")), io = () => {
|
|
1523
|
+
const { selectedLang: e, fallbackLang: t } = Re(), n = ye("getPreviewUrl", async (g) => g), [, s] = te(Bs), [r, a] = x(""), { data: i } = oe(), { data: o } = Ue(), { data: l } = Ce(), u = $(
|
|
1523
1524
|
() => {
|
|
1524
|
-
var
|
|
1525
|
-
return (
|
|
1525
|
+
var g;
|
|
1526
|
+
return (g = o == null ? void 0 : o.find((E) => (E == null ? void 0 : E.lang) === e)) == null ? void 0 : g.slug;
|
|
1526
1527
|
},
|
|
1527
|
-
[e,
|
|
1528
|
-
),
|
|
1529
|
-
var
|
|
1530
|
-
return (
|
|
1531
|
-
}, [
|
|
1532
|
-
|
|
1528
|
+
[e, o]
|
|
1529
|
+
), f = q((g) => {
|
|
1530
|
+
var E;
|
|
1531
|
+
return (E = ae(l, { key: g })) == null ? void 0 : E.hasSlug;
|
|
1532
|
+
}, [l]), d = e === t ? "" : e;
|
|
1533
|
+
re(() => {
|
|
1533
1534
|
(async () => {
|
|
1534
1535
|
if (typeof n == "function") {
|
|
1535
|
-
const
|
|
1536
|
-
|
|
1536
|
+
const g = !f(i == null ? void 0 : i.pageType), E = await n(
|
|
1537
|
+
g ? `${d !== "" ? d + "/" : ""}${i == null ? void 0 : i.id}` : u || ""
|
|
1537
1538
|
);
|
|
1538
|
-
|
|
1539
|
+
a(E);
|
|
1539
1540
|
} else
|
|
1540
|
-
|
|
1541
|
+
a("");
|
|
1541
1542
|
})();
|
|
1542
|
-
}, [n,
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
},
|
|
1548
|
-
const [e, t] =
|
|
1549
|
-
return /* @__PURE__ */
|
|
1550
|
-
/* @__PURE__ */ c(
|
|
1543
|
+
}, [n, u, i == null ? void 0 : i.pageType, f, i == null ? void 0 : i.id, d]);
|
|
1544
|
+
const h = () => {
|
|
1545
|
+
s(r);
|
|
1546
|
+
};
|
|
1547
|
+
return /* @__PURE__ */ c(he, { children: /* @__PURE__ */ c(Un, { content: X.TOGGLE_PREVIEW, delayDuration: 0, children: /* @__PURE__ */ c(M, { variant: "ghost", size: "sm", className: "gap-2", onClick: h, children: /* @__PURE__ */ c(Va, { className: "h-4 w-4" }) }) }) });
|
|
1548
|
+
}, oo = () => {
|
|
1549
|
+
const [e, t] = Xr();
|
|
1550
|
+
return /* @__PURE__ */ m(he, { children: [
|
|
1551
|
+
/* @__PURE__ */ c(Un, { content: X.THEME, delayDuration: 0, children: /* @__PURE__ */ c(
|
|
1551
1552
|
M,
|
|
1552
1553
|
{
|
|
1553
1554
|
variant: e === "theme" ? "outline" : "ghost",
|
|
1554
1555
|
size: "icon",
|
|
1555
1556
|
className: "gap-2",
|
|
1556
1557
|
onClick: () => t(e === "theme" ? "block" : "theme"),
|
|
1557
|
-
children: /* @__PURE__ */ c(
|
|
1558
|
+
children: /* @__PURE__ */ c(Ha, { className: "h-4 w-4" })
|
|
1558
1559
|
}
|
|
1559
1560
|
) }),
|
|
1560
1561
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1561
1562
|
] });
|
|
1562
|
-
},
|
|
1563
|
-
const [e, t] =
|
|
1563
|
+
}, lo = () => {
|
|
1564
|
+
const [e, t] = x(!1), { isLocked: n } = Ne(), { savePageAsync: s, saveState: r } = Oe();
|
|
1564
1565
|
re(() => {
|
|
1565
1566
|
const u = (f) => {
|
|
1566
1567
|
r === "UNSAVED" && (f.preventDefault(), f.returnValue = !1);
|
|
@@ -1576,30 +1577,30 @@ const to = V(() => import("./unpublish-page-CNwIU6AS.js")), no = V(() => import(
|
|
|
1576
1577
|
case "UNSAVED":
|
|
1577
1578
|
return {
|
|
1578
1579
|
tooltipContent: X.SAVEDRAFT,
|
|
1579
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1580
|
+
buttonIcon: /* @__PURE__ */ c(Qa, { className: "h-4 w-4" }),
|
|
1580
1581
|
buttonClass: "gap-x-1"
|
|
1581
1582
|
};
|
|
1582
1583
|
case "SAVING":
|
|
1583
1584
|
return {
|
|
1584
1585
|
tooltipContent: X.SAVING,
|
|
1585
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1586
|
+
buttonIcon: /* @__PURE__ */ c(ft, { className: "h-4 w-4 animate-spin text-sky-700" }),
|
|
1586
1587
|
buttonClass: "gap-x-1"
|
|
1587
1588
|
};
|
|
1588
1589
|
case "SAVED":
|
|
1589
1590
|
return {
|
|
1590
1591
|
tooltipContent: X.SAVED,
|
|
1591
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1592
|
+
buttonIcon: /* @__PURE__ */ c($a, { className: "h-4 w-4" }),
|
|
1592
1593
|
buttonClass: "text-green-500 gap-x-1"
|
|
1593
1594
|
};
|
|
1594
1595
|
}
|
|
1595
1596
|
}, [r]);
|
|
1596
|
-
return n ? null : /* @__PURE__ */
|
|
1597
|
+
return n ? null : /* @__PURE__ */ m(M, { size: "sm", variant: "ghost", onClick: a, className: `${o} w-24 max-w-24`, children: [
|
|
1597
1598
|
i,
|
|
1598
1599
|
" ",
|
|
1599
1600
|
l
|
|
1600
1601
|
] });
|
|
1601
|
-
},
|
|
1602
|
-
const { selectedLang: e } = Re(), { data: t } = Ie(), { data: n } = Ue(), [s, r] =
|
|
1602
|
+
}, co = () => {
|
|
1603
|
+
const { selectedLang: e } = Re(), { data: t } = Ie(), { data: n } = Ue(), [s, r] = x(!1), [a, i] = x(!1), [o, l] = x(null), { savePageAsync: u } = Oe(), [f, d] = x(!1), { data: h } = oe(), { mutate: g, isPending: E } = Ms(), { needTranslations: S } = Oe(), T = S(), { buttonText: p, buttonClassName: A, isPublished: w } = $(() => {
|
|
1603
1604
|
const k = h && (h == null ? void 0 : h.online);
|
|
1604
1605
|
return {
|
|
1605
1606
|
buttonClassName: k ? "hover:bg-green-600 bg-green-500" : "",
|
|
@@ -1614,15 +1615,15 @@ const to = V(() => import("./unpublish-page-CNwIU6AS.js")), no = V(() => import(
|
|
|
1614
1615
|
U();
|
|
1615
1616
|
}, U = () => {
|
|
1616
1617
|
const k = [t == null ? void 0 : t.id, t == null ? void 0 : t.primaryPage];
|
|
1617
|
-
|
|
1618
|
+
g({ ids: Ts(k) }, { onSuccess: () => un("TOP_RIGHT") });
|
|
1618
1619
|
}, b = () => {
|
|
1619
1620
|
d(!1), U();
|
|
1620
|
-
},
|
|
1621
|
+
}, Te = async () => {
|
|
1621
1622
|
d(!1), await u();
|
|
1622
|
-
},
|
|
1623
|
-
return /* @__PURE__ */
|
|
1624
|
-
/* @__PURE__ */
|
|
1625
|
-
/* @__PURE__ */
|
|
1623
|
+
}, Se = $(() => Kt(n ?? [], "id"), [n]);
|
|
1624
|
+
return /* @__PURE__ */ m(he, { children: [
|
|
1625
|
+
/* @__PURE__ */ m("div", { className: "flex", children: [
|
|
1626
|
+
/* @__PURE__ */ m(
|
|
1626
1627
|
M,
|
|
1627
1628
|
{
|
|
1628
1629
|
size: "sm",
|
|
@@ -1651,7 +1652,7 @@ const to = V(() => import("./unpublish-page-CNwIU6AS.js")), no = V(() => import(
|
|
|
1651
1652
|
]
|
|
1652
1653
|
}
|
|
1653
1654
|
),
|
|
1654
|
-
/* @__PURE__ */
|
|
1655
|
+
/* @__PURE__ */ m(Nn, { children: [
|
|
1655
1656
|
/* @__PURE__ */ c(Cn, { asChild: !0, children: /* @__PURE__ */ c(
|
|
1656
1657
|
M,
|
|
1657
1658
|
{
|
|
@@ -1661,36 +1662,36 @@ const to = V(() => import("./unpublish-page-CNwIU6AS.js")), no = V(() => import(
|
|
|
1661
1662
|
children: /* @__PURE__ */ c(mn, { className: "h-4 w-4" })
|
|
1662
1663
|
}
|
|
1663
1664
|
) }),
|
|
1664
|
-
/* @__PURE__ */
|
|
1665
|
-
/* @__PURE__ */
|
|
1665
|
+
/* @__PURE__ */ m(Ln, { align: "end", className: "w-52", children: [
|
|
1666
|
+
/* @__PURE__ */ m(
|
|
1666
1667
|
fe,
|
|
1667
1668
|
{
|
|
1668
1669
|
disabled: E,
|
|
1669
1670
|
className: "cursor-pointer text-xs",
|
|
1670
|
-
onClick: () =>
|
|
1671
|
+
onClick: () => g({ ids: Se }, { onSuccess: () => un("TOP_RIGHT") }),
|
|
1671
1672
|
children: [
|
|
1672
1673
|
X.PUBLISH,
|
|
1673
1674
|
" with translation pages"
|
|
1674
1675
|
]
|
|
1675
1676
|
}
|
|
1676
1677
|
),
|
|
1677
|
-
!w && /* @__PURE__ */
|
|
1678
|
+
!w && /* @__PURE__ */ m(
|
|
1678
1679
|
fe,
|
|
1679
1680
|
{
|
|
1680
1681
|
disabled: E,
|
|
1681
1682
|
className: "cursor-pointer text-xs",
|
|
1682
|
-
onClick: () =>
|
|
1683
|
+
onClick: () => g({ ids: [h == null ? void 0 : h.id] }, { onSuccess: () => un("TOP_RIGHT") }),
|
|
1683
1684
|
children: [
|
|
1684
1685
|
X.PUBLISH,
|
|
1685
1686
|
" page"
|
|
1686
1687
|
]
|
|
1687
1688
|
}
|
|
1688
1689
|
),
|
|
1689
|
-
/* @__PURE__ */
|
|
1690
|
+
/* @__PURE__ */ m(fe, { onClick: () => r(!0), className: "cursor-pointer text-xs", children: [
|
|
1690
1691
|
X.OPEN,
|
|
1691
1692
|
" publish menu"
|
|
1692
1693
|
] }),
|
|
1693
|
-
w && /* @__PURE__ */
|
|
1694
|
+
w && /* @__PURE__ */ m(fe, { onClick: () => l(t), className: "cursor-pointer text-xs", children: [
|
|
1694
1695
|
X.UNPUBLISH,
|
|
1695
1696
|
" page ",
|
|
1696
1697
|
e ? `(${Vn(e)})` : ""
|
|
@@ -1698,30 +1699,30 @@ const to = V(() => import("./unpublish-page-CNwIU6AS.js")), no = V(() => import(
|
|
|
1698
1699
|
] })
|
|
1699
1700
|
] })
|
|
1700
1701
|
] }),
|
|
1701
|
-
/* @__PURE__ */ c(
|
|
1702
|
-
o && /* @__PURE__ */ c(
|
|
1703
|
-
f && /* @__PURE__ */ c(
|
|
1704
|
-
|
|
1702
|
+
/* @__PURE__ */ c(eo, { showModal: s, onClose: () => r(!1) }),
|
|
1703
|
+
o && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(ro, { page: o, onClose: () => l(null) }) }),
|
|
1704
|
+
f && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1705
|
+
ao,
|
|
1705
1706
|
{
|
|
1706
1707
|
isOpen: f,
|
|
1707
|
-
onClose:
|
|
1708
|
+
onClose: Te,
|
|
1708
1709
|
onContinue: b,
|
|
1709
1710
|
isPending: E
|
|
1710
1711
|
}
|
|
1711
1712
|
) })
|
|
1712
1713
|
] });
|
|
1713
1714
|
};
|
|
1714
|
-
function
|
|
1715
|
-
const { isLocked: e } = Ne(), [t] = le(), n = t.get("lang"), s =
|
|
1716
|
-
return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */
|
|
1717
|
-
/* @__PURE__ */ c(
|
|
1718
|
-
/* @__PURE__ */ c(cn, { permission: de.EDIT_THEME, children: /* @__PURE__ */ c(
|
|
1719
|
-
/* @__PURE__ */ c(
|
|
1720
|
-
/* @__PURE__ */ c(cn, { permission: de.SAVE_PAGE, children: /* @__PURE__ */ c(
|
|
1721
|
-
/* @__PURE__ */ c(cn, { permission: de.PUBLISH_PAGE, children: /* @__PURE__ */ c(
|
|
1715
|
+
function uo() {
|
|
1716
|
+
const { isLocked: e } = Ne(), [t] = le(), n = t.get("lang"), s = Gs(n);
|
|
1717
|
+
return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1718
|
+
/* @__PURE__ */ c(Wi, {}),
|
|
1719
|
+
/* @__PURE__ */ c(cn, { permission: de.EDIT_THEME, children: /* @__PURE__ */ c(oo, {}) }),
|
|
1720
|
+
/* @__PURE__ */ c(io, {}),
|
|
1721
|
+
/* @__PURE__ */ c(cn, { permission: de.SAVE_PAGE, children: /* @__PURE__ */ c(lo, {}) }),
|
|
1722
|
+
/* @__PURE__ */ c(cn, { permission: de.PUBLISH_PAGE, children: /* @__PURE__ */ c(co, {}) })
|
|
1722
1723
|
] });
|
|
1723
1724
|
}
|
|
1724
|
-
const
|
|
1725
|
+
const fo = ({
|
|
1725
1726
|
page: e,
|
|
1726
1727
|
setDuplicatePage: t,
|
|
1727
1728
|
setAddEditPage: n,
|
|
@@ -1732,11 +1733,11 @@ const lo = ({
|
|
|
1732
1733
|
children: o,
|
|
1733
1734
|
isLanguagePage: l
|
|
1734
1735
|
}) => {
|
|
1735
|
-
const { hasPermission: u } = Ps(), { data: f } = Ce(), d = $(() => ae(f, { key: e.pageType }), [f, e.pageType]), h = $(() => !!e.isTemplate, [e.isTemplate]),
|
|
1736
|
-
return !u(de.EDIT_PAGE) && !u(de.DELETE_PAGE) && !u(de.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */
|
|
1736
|
+
const { hasPermission: u } = Ps(), { data: f } = Ce(), d = $(() => ae(f, { key: e.pageType }), [f, e.pageType]), h = $(() => !!e.isTemplate, [e.isTemplate]), g = $(() => !!(d != null && d.hasSlug), [d == null ? void 0 : d.hasSlug]);
|
|
1737
|
+
return !u(de.EDIT_PAGE) && !u(de.DELETE_PAGE) && !u(de.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ m(Nn, { children: [
|
|
1737
1738
|
/* @__PURE__ */ c(Cn, { asChild: !0, onClick: (S) => S.stopPropagation(), children: o }),
|
|
1738
|
-
/* @__PURE__ */
|
|
1739
|
-
u(de.ADD_PAGE) && !l && /* @__PURE__ */
|
|
1739
|
+
/* @__PURE__ */ m(Ln, { align: "center", className: "text-sm", children: [
|
|
1740
|
+
u(de.ADD_PAGE) && !l && /* @__PURE__ */ m(
|
|
1740
1741
|
fe,
|
|
1741
1742
|
{
|
|
1742
1743
|
className: "flex cursor-pointer items-center gap-2",
|
|
@@ -1744,12 +1745,12 @@ const lo = ({
|
|
|
1744
1745
|
S.stopPropagation(), t(e);
|
|
1745
1746
|
},
|
|
1746
1747
|
children: [
|
|
1747
|
-
/* @__PURE__ */ c(
|
|
1748
|
+
/* @__PURE__ */ c(ja, { className: "size-3" }),
|
|
1748
1749
|
"Duplicate page"
|
|
1749
1750
|
]
|
|
1750
1751
|
}
|
|
1751
1752
|
),
|
|
1752
|
-
u(de.EDIT_PAGE) && /* @__PURE__ */
|
|
1753
|
+
u(de.EDIT_PAGE) && /* @__PURE__ */ m(
|
|
1753
1754
|
fe,
|
|
1754
1755
|
{
|
|
1755
1756
|
className: "flex cursor-pointer items-center gap-2",
|
|
@@ -1760,12 +1761,12 @@ const lo = ({
|
|
|
1760
1761
|
});
|
|
1761
1762
|
},
|
|
1762
1763
|
children: [
|
|
1763
|
-
/* @__PURE__ */ c(
|
|
1764
|
+
/* @__PURE__ */ c(za, { className: "size-3" }),
|
|
1764
1765
|
"Edit"
|
|
1765
1766
|
]
|
|
1766
1767
|
}
|
|
1767
1768
|
),
|
|
1768
|
-
(e == null ? void 0 : e.online) && u(de.UNPUBLISH_PAGE) && /* @__PURE__ */
|
|
1769
|
+
(e == null ? void 0 : e.online) && u(de.UNPUBLISH_PAGE) && /* @__PURE__ */ m(
|
|
1769
1770
|
fe,
|
|
1770
1771
|
{
|
|
1771
1772
|
className: "flex cursor-pointer items-center gap-2",
|
|
@@ -1773,12 +1774,12 @@ const lo = ({
|
|
|
1773
1774
|
S.stopPropagation(), s(e);
|
|
1774
1775
|
},
|
|
1775
1776
|
children: [
|
|
1776
|
-
/* @__PURE__ */ c(
|
|
1777
|
+
/* @__PURE__ */ c(Wa, { className: "size-3" }),
|
|
1777
1778
|
X.UNPUBLISH
|
|
1778
1779
|
]
|
|
1779
1780
|
}
|
|
1780
1781
|
),
|
|
1781
|
-
u(de.DELETE_PAGE) && /* @__PURE__ */
|
|
1782
|
+
u(de.DELETE_PAGE) && /* @__PURE__ */ m(
|
|
1782
1783
|
fe,
|
|
1783
1784
|
{
|
|
1784
1785
|
className: "flex cursor-pointer items-center gap-2",
|
|
@@ -1786,12 +1787,12 @@ const lo = ({
|
|
|
1786
1787
|
S.stopPropagation(), r(e);
|
|
1787
1788
|
},
|
|
1788
1789
|
children: [
|
|
1789
|
-
/* @__PURE__ */ c(
|
|
1790
|
+
/* @__PURE__ */ c(Ya, { className: "size-3" }),
|
|
1790
1791
|
X.DELETE
|
|
1791
1792
|
]
|
|
1792
1793
|
}
|
|
1793
1794
|
),
|
|
1794
|
-
u(de.MARK_AS_TEMPLATE) &&
|
|
1795
|
+
u(de.MARK_AS_TEMPLATE) && g && !l && /* @__PURE__ */ c(he, { children: h ? /* @__PURE__ */ m(
|
|
1795
1796
|
fe,
|
|
1796
1797
|
{
|
|
1797
1798
|
className: "flex cursor-pointer items-center gap-2",
|
|
@@ -1803,7 +1804,7 @@ const lo = ({
|
|
|
1803
1804
|
X.UNMARK_AS_TEMPLATE
|
|
1804
1805
|
]
|
|
1805
1806
|
}
|
|
1806
|
-
) : /* @__PURE__ */
|
|
1807
|
+
) : /* @__PURE__ */ m(
|
|
1807
1808
|
fe,
|
|
1808
1809
|
{
|
|
1809
1810
|
className: "flex cursor-pointer items-center gap-2",
|
|
@@ -1818,8 +1819,8 @@ const lo = ({
|
|
|
1818
1819
|
) })
|
|
1819
1820
|
] })
|
|
1820
1821
|
] });
|
|
1821
|
-
},
|
|
1822
|
-
const [e, t] =
|
|
1822
|
+
}, ho = K(() => import("./add-new-page-CTUiEKzv.js")), go = K(() => import("./delete-page-8MnGZ_mz.js")), mo = K(() => import("./duplicate-page-BGYZLkco.js")), Eo = K(() => import("./mark-as-template-B1TpGPms.js")), po = K(() => import("./unmark-as-template-_VyWoVNk.js")), yo = K(() => import("./unpublish-page-CuSJRr5c.js")), Ao = () => {
|
|
1823
|
+
const [e, t] = x(null), [n, s] = x(null), [r, a] = x(null), [i, o] = x(null), [l, u] = x(null), [f, d] = x(null), { data: h, isFetching: g } = Ie(), { selectedLang: E, fallbackLang: S } = Re(), { data: T } = Ue(), p = T == null ? void 0 : T.find((b) => b.lang === E), { isLocked: A } = Ne(), w = !(h != null && h.slug), [, D] = te(On);
|
|
1823
1824
|
if (!h) return null;
|
|
1824
1825
|
const U = (b) => {
|
|
1825
1826
|
E.length > 0 && E !== S ? D({
|
|
@@ -1828,16 +1829,16 @@ const lo = ({
|
|
|
1828
1829
|
primaryPage: b == null ? void 0 : b.primaryPage
|
|
1829
1830
|
}) : d(b);
|
|
1830
1831
|
};
|
|
1831
|
-
return /* @__PURE__ */
|
|
1832
|
-
/* @__PURE__ */
|
|
1833
|
-
/* @__PURE__ */ c(
|
|
1832
|
+
return /* @__PURE__ */ m(he, { children: [
|
|
1833
|
+
/* @__PURE__ */ m("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
|
|
1834
|
+
/* @__PURE__ */ c(Us, { children: /* @__PURE__ */ c(
|
|
1834
1835
|
M,
|
|
1835
1836
|
{
|
|
1836
1837
|
className: "flex h-7 max-w-[200px] cursor-pointer items-center truncate rounded px-1 text-xs font-medium",
|
|
1837
1838
|
variant: "ghost",
|
|
1838
|
-
children:
|
|
1839
|
-
w ? /* @__PURE__ */ c(
|
|
1840
|
-
|
|
1839
|
+
children: g ? /* @__PURE__ */ c(ft, { className: "h-4 w-4 animate-spin text-slate-400" }) : /* @__PURE__ */ m("span", { className: "flex w-full cursor-pointer items-end overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-xs font-medium", children: [
|
|
1840
|
+
w ? /* @__PURE__ */ c(Ja, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Xa, { className: "mr-1 h-4 w-4" }),
|
|
1841
|
+
H(p || h, "name") ?? ""
|
|
1841
1842
|
] })
|
|
1842
1843
|
}
|
|
1843
1844
|
) }),
|
|
@@ -1850,7 +1851,7 @@ const lo = ({
|
|
|
1850
1851
|
children: /* @__PURE__ */ c(Xn, { className: "h-4 w-4" })
|
|
1851
1852
|
}
|
|
1852
1853
|
) : /* @__PURE__ */ c(
|
|
1853
|
-
|
|
1854
|
+
fo,
|
|
1854
1855
|
{
|
|
1855
1856
|
page: h,
|
|
1856
1857
|
setDuplicatePage: (b) => u(b),
|
|
@@ -1864,8 +1865,8 @@ const lo = ({
|
|
|
1864
1865
|
}
|
|
1865
1866
|
)
|
|
1866
1867
|
] }),
|
|
1867
|
-
f && /* @__PURE__ */ c(
|
|
1868
|
-
|
|
1868
|
+
f && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1869
|
+
ho,
|
|
1869
1870
|
{
|
|
1870
1871
|
closePanel: () => d(null),
|
|
1871
1872
|
editPage: () => {
|
|
@@ -1874,12 +1875,12 @@ const lo = ({
|
|
|
1874
1875
|
setAddEditPage: d
|
|
1875
1876
|
}
|
|
1876
1877
|
) }),
|
|
1877
|
-
e && /* @__PURE__ */ c(
|
|
1878
|
-
n && /* @__PURE__ */ c(
|
|
1879
|
-
r && /* @__PURE__ */ c(
|
|
1880
|
-
i && /* @__PURE__ */ c(
|
|
1881
|
-
l && /* @__PURE__ */ c(
|
|
1882
|
-
|
|
1878
|
+
e && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(go, { page: e, onClose: () => t(null) }) }),
|
|
1879
|
+
n && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(yo, { page: n, onClose: () => s(null) }) }),
|
|
1880
|
+
r && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Eo, { page: r, onClose: () => a(null) }) }),
|
|
1881
|
+
i && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(po, { page: i, onClose: () => o(null) }) }),
|
|
1882
|
+
l && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1883
|
+
mo,
|
|
1883
1884
|
{
|
|
1884
1885
|
page: l,
|
|
1885
1886
|
onClose: () => u(null),
|
|
@@ -1887,69 +1888,69 @@ const lo = ({
|
|
|
1887
1888
|
}
|
|
1888
1889
|
) })
|
|
1889
1890
|
] });
|
|
1890
|
-
},
|
|
1891
|
+
}, Fs = ({ children: e, className: t = "" }) => /* @__PURE__ */ c(
|
|
1891
1892
|
"div",
|
|
1892
1893
|
{
|
|
1893
|
-
className:
|
|
1894
|
+
className: Vt(
|
|
1894
1895
|
"fixed bottom-0 left-0 right-0 top-[50px] z-[20] flex w-screen flex-col items-center justify-center bg-black/40 transition-all",
|
|
1895
1896
|
t
|
|
1896
1897
|
),
|
|
1897
1898
|
children: e
|
|
1898
1899
|
}
|
|
1899
|
-
),
|
|
1900
|
+
), To = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(Fs, { children: /* @__PURE__ */ m("div", { className: "flex min-w-[300px] max-w-[400px] flex-col items-center justify-center rounded-lg border bg-white p-4 shadow-lg", children: [
|
|
1900
1901
|
/* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
|
|
1901
1902
|
/* @__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" })
|
|
1902
|
-
] }) }),
|
|
1903
|
-
const { dynamicPage: e, allLangPages: t, isFetching: n } =
|
|
1904
|
-
return n ? null : /* @__PURE__ */
|
|
1905
|
-
!e && /* @__PURE__ */ c(
|
|
1906
|
-
/* @__PURE__ */ c(
|
|
1903
|
+
] }) }), So = K(() => import("./dynamic-page-selector-CrbujoYg.js")), _o = () => {
|
|
1904
|
+
const { dynamicPage: e, allLangPages: t, isFetching: n } = Ii(), s = t.length > 0;
|
|
1905
|
+
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1906
|
+
!e && /* @__PURE__ */ c(To, { hasDynamicPage: s }),
|
|
1907
|
+
/* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(So, {}) })
|
|
1907
1908
|
] });
|
|
1908
|
-
},
|
|
1909
|
-
const { data: e, isFetching: t } = Ie(), { data: n, isFetching: s } = oe(), r =
|
|
1910
|
-
return /* @__PURE__ */
|
|
1909
|
+
}, Po = () => {
|
|
1910
|
+
const { data: e, isFetching: t } = Ie(), { data: n, isFetching: s } = oe(), r = H(n, "dynamic", !1), a = Dn(), i = Zr("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, u = ki(), f = t || s, h = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
|
|
1911
|
+
return /* @__PURE__ */ m("div", { className: "relative flex items-center gap-x-1", children: [
|
|
1911
1912
|
/* @__PURE__ */ c(
|
|
1912
1913
|
"div",
|
|
1913
1914
|
{
|
|
1914
|
-
className:
|
|
1915
|
+
className: Vt(
|
|
1915
1916
|
"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",
|
|
1916
1917
|
f && "max-w-0 overflow-hidden opacity-0"
|
|
1917
1918
|
),
|
|
1918
|
-
children: /* @__PURE__ */ c(
|
|
1919
|
+
children: /* @__PURE__ */ c(Ao, {})
|
|
1919
1920
|
}
|
|
1920
1921
|
),
|
|
1921
|
-
/* @__PURE__ */
|
|
1922
|
+
/* @__PURE__ */ m(
|
|
1922
1923
|
"div",
|
|
1923
1924
|
{
|
|
1924
|
-
className:
|
|
1925
|
+
className: Vt(
|
|
1925
1926
|
"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" : ""),
|
|
1926
1927
|
f && "max-w-0 overflow-hidden opacity-0"
|
|
1927
1928
|
),
|
|
1928
1929
|
children: [
|
|
1929
|
-
/* @__PURE__ */ c(
|
|
1930
|
-
/* @__PURE__ */
|
|
1930
|
+
/* @__PURE__ */ c($i, {}),
|
|
1931
|
+
/* @__PURE__ */ m("div", { className: "flex w-full items-center overflow-hidden", children: [
|
|
1931
1932
|
/* @__PURE__ */ c(
|
|
1932
1933
|
"div",
|
|
1933
1934
|
{
|
|
1934
1935
|
className: `w-full max-w-[200px] overflow-hidden overflow-ellipsis whitespace-nowrap pl-1 text-xs ${l ? "italic text-gray-400" : "font-mono text-gray-500"}`,
|
|
1935
|
-
children: h === "/" ? /* @__PURE__ */
|
|
1936
|
+
children: h === "/" ? /* @__PURE__ */ m("span", { className: "text-gray-900", children: [
|
|
1936
1937
|
"/",
|
|
1937
1938
|
/* @__PURE__ */ c("span", { className: "text-[11px] font-light italic text-gray-400", children: "(Homepage)" })
|
|
1938
1939
|
] }) : h
|
|
1939
1940
|
}
|
|
1940
1941
|
),
|
|
1941
|
-
!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(
|
|
1942
|
+
!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(Za, { className: "h-4 w-4", strokeWidth: 1 }) }) })
|
|
1942
1943
|
] })
|
|
1943
1944
|
]
|
|
1944
1945
|
}
|
|
1945
1946
|
),
|
|
1946
|
-
r && i && /* @__PURE__ */ c(
|
|
1947
|
+
r && i && /* @__PURE__ */ c(_o, {})
|
|
1947
1948
|
] });
|
|
1948
|
-
},
|
|
1949
|
-
/* @__PURE__ */ c(
|
|
1950
|
-
/* @__PURE__ */ c(
|
|
1951
|
-
/* @__PURE__ */ c(
|
|
1952
|
-
] }),
|
|
1949
|
+
}, wo = () => /* @__PURE__ */ m("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
|
|
1950
|
+
/* @__PURE__ */ c(Qi, {}),
|
|
1951
|
+
/* @__PURE__ */ c(Po, {}),
|
|
1952
|
+
/* @__PURE__ */ c(uo, {})
|
|
1953
|
+
] }), qs = () => {
|
|
1953
1954
|
const e = ee(), { data: t } = ie({
|
|
1954
1955
|
queryKey: [y.AI_CONTEXT],
|
|
1955
1956
|
initialData: "",
|
|
@@ -1962,8 +1963,8 @@ const lo = ({
|
|
|
1962
1963
|
},
|
|
1963
1964
|
[e]
|
|
1964
1965
|
), aiContext: t };
|
|
1965
|
-
},
|
|
1966
|
-
const e = B(), { aiContext: t } =
|
|
1966
|
+
}, vo = () => {
|
|
1967
|
+
const e = B(), { aiContext: t } = qs(), n = R();
|
|
1967
1968
|
return q(
|
|
1968
1969
|
async (s, r, a, i) => n(e, {
|
|
1969
1970
|
action: y.ASK_AI,
|
|
@@ -1971,36 +1972,36 @@ const lo = ({
|
|
|
1971
1972
|
}),
|
|
1972
1973
|
[e, t, n]
|
|
1973
1974
|
);
|
|
1974
|
-
},
|
|
1975
|
+
}, bo = (e, t) => t.map((n) => {
|
|
1975
1976
|
if (Y(e, n._type)) {
|
|
1976
|
-
const s =
|
|
1977
|
+
const s = ci(n._type);
|
|
1977
1978
|
return {
|
|
1978
1979
|
...s,
|
|
1979
1980
|
...In(n, [
|
|
1980
|
-
...
|
|
1981
|
+
...Fr(s),
|
|
1981
1982
|
"_type",
|
|
1982
1983
|
"_id",
|
|
1983
1984
|
"_name",
|
|
1984
1985
|
"_parent",
|
|
1985
1986
|
"_bindings"
|
|
1986
1987
|
]),
|
|
1987
|
-
...
|
|
1988
|
+
...qr(n, (r, a) => Kr(a, "_attrs")),
|
|
1988
1989
|
...n
|
|
1989
1990
|
};
|
|
1990
1991
|
}
|
|
1991
1992
|
return n;
|
|
1992
|
-
}),
|
|
1993
|
-
const t =
|
|
1993
|
+
}), Io = (e) => {
|
|
1994
|
+
const t = li();
|
|
1994
1995
|
return $(() => {
|
|
1995
1996
|
if (!e || me(e)) return { blocks: [] };
|
|
1996
1997
|
const n = Ss(
|
|
1997
1998
|
e,
|
|
1998
|
-
(s) => !
|
|
1999
|
+
(s) => !Mr(s == null ? void 0 : s._type, "@chai/")
|
|
1999
2000
|
);
|
|
2000
|
-
return { blocks:
|
|
2001
|
+
return { blocks: bo(t, n) };
|
|
2001
2002
|
}, [e, t]);
|
|
2002
|
-
},
|
|
2003
|
-
const [e] = le(), t = e.get("page"), n = B(), { setAiContext: s } =
|
|
2003
|
+
}, No = () => {
|
|
2004
|
+
const [e] = le(), t = e.get("page"), n = B(), { setAiContext: s } = qs(), [, r] = Gn(), [, a] = Li(), [, i] = ea(), o = R();
|
|
2004
2005
|
return ie({
|
|
2005
2006
|
queryKey: [y.GET_DRAFT_PAGE, t],
|
|
2006
2007
|
staleTime: 1 / 0,
|
|
@@ -2011,12 +2012,12 @@ const lo = ({
|
|
|
2011
2012
|
action: y.GET_DRAFT_PAGE,
|
|
2012
2013
|
data: { id: t, draft: !0 }
|
|
2013
2014
|
}), u = l.blocks ?? [], f = ae(u, { _type: "@chai/ai-context" });
|
|
2014
|
-
return s(
|
|
2015
|
+
return s(H(f, "_value", "") || ""), r((d) => ({ ...d, lastSaved: l.lastSaved })), a(H(l, "metadata", {})), setTimeout(() => i(!0), 500), u;
|
|
2015
2016
|
},
|
|
2016
2017
|
enabled: !!t
|
|
2017
2018
|
});
|
|
2018
|
-
},
|
|
2019
|
-
const { data: e } = oe(), { data: t } = Ie(), n = B(), s = R(), r =
|
|
2019
|
+
}, Co = () => {
|
|
2020
|
+
const { data: e } = oe(), { data: t } = Ie(), n = B(), s = R(), r = Rn(), a = Dn();
|
|
2020
2021
|
return ie({
|
|
2021
2022
|
queryKey: [y.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
|
|
2022
2023
|
staleTime: 1 / 0,
|
|
@@ -2045,9 +2046,9 @@ const lo = ({
|
|
|
2045
2046
|
}),
|
|
2046
2047
|
enabled: !!(e != null && e.pageType) && !!t.id
|
|
2047
2048
|
});
|
|
2048
|
-
},
|
|
2049
|
+
}, Lo = () => {
|
|
2049
2050
|
const e = B(), t = ee(), n = R();
|
|
2050
|
-
return
|
|
2051
|
+
return se({
|
|
2051
2052
|
mutationFn: async (s) => n(e, {
|
|
2052
2053
|
action: y.UPDATE_WEBSITE_SETTINGS,
|
|
2053
2054
|
data: s
|
|
@@ -2064,9 +2065,9 @@ const lo = ({
|
|
|
2064
2065
|
});
|
|
2065
2066
|
}
|
|
2066
2067
|
});
|
|
2067
|
-
},
|
|
2068
|
+
}, au = () => {
|
|
2068
2069
|
const e = B(), t = ee(), n = R();
|
|
2069
|
-
return
|
|
2070
|
+
return se({
|
|
2070
2071
|
mutationFn: async (s) => n(e, { action: y.UPDATE_APP_SHARED_JSONLD, data: JSON.stringify(s) }),
|
|
2071
2072
|
onSuccess: () => {
|
|
2072
2073
|
t.invalidateQueries({
|
|
@@ -2084,8 +2085,8 @@ const lo = ({
|
|
|
2084
2085
|
const s = await t(n, {
|
|
2085
2086
|
action: "GET_LIBRARY_ITEM",
|
|
2086
2087
|
data: { id: e.id }
|
|
2087
|
-
}), r =
|
|
2088
|
-
return
|
|
2088
|
+
}), r = H(s, "html", ""), a = H(s, "blocks", []);
|
|
2089
|
+
return Vr(a) ? a : na(r);
|
|
2089
2090
|
},
|
|
2090
2091
|
async getUILibraryBlocks(e, t, n) {
|
|
2091
2092
|
try {
|
|
@@ -2099,7 +2100,7 @@ const lo = ({
|
|
|
2099
2100
|
return console.error(s), [];
|
|
2100
2101
|
}
|
|
2101
2102
|
}
|
|
2102
|
-
},
|
|
2103
|
+
}, ko = () => {
|
|
2103
2104
|
const e = B(), t = R();
|
|
2104
2105
|
return ie({
|
|
2105
2106
|
queryKey: ["uiLibraries"],
|
|
@@ -2109,7 +2110,7 @@ const lo = ({
|
|
|
2109
2110
|
...r
|
|
2110
2111
|
}));
|
|
2111
2112
|
return s.forEach((r) => {
|
|
2112
|
-
|
|
2113
|
+
ta(r.id, {
|
|
2113
2114
|
name: r.isSiteLibrary ? r.name + " (Current Site) " : r.name,
|
|
2114
2115
|
description: r.description,
|
|
2115
2116
|
getBlocksList: (a) => ns.getUILibraryBlocks(a, t, e),
|
|
@@ -2118,8 +2119,8 @@ const lo = ({
|
|
|
2118
2119
|
}), s;
|
|
2119
2120
|
}
|
|
2120
2121
|
});
|
|
2121
|
-
},
|
|
2122
|
-
const e = Zt(), t = R(), { user: n } =
|
|
2122
|
+
}, Do = () => {
|
|
2123
|
+
const e = Zt(), t = R(), { user: n } = Ae(), s = n == null ? void 0 : n.id;
|
|
2123
2124
|
return ie({
|
|
2124
2125
|
queryKey: [y.GET_ROLE_AND_PERMISSIONS, s],
|
|
2125
2126
|
queryFn: () => t(e, {
|
|
@@ -2129,7 +2130,7 @@ const lo = ({
|
|
|
2129
2130
|
enabled: !!s,
|
|
2130
2131
|
staleTime: 1 / 0
|
|
2131
2132
|
});
|
|
2132
|
-
},
|
|
2133
|
+
}, Go = () => {
|
|
2133
2134
|
const e = B(), t = R(), [, n] = Gn();
|
|
2134
2135
|
return { onSave: async ({
|
|
2135
2136
|
page: r,
|
|
@@ -2149,15 +2150,15 @@ const lo = ({
|
|
|
2149
2150
|
return console.error(o), new Error("Failed to save blocks");
|
|
2150
2151
|
}
|
|
2151
2152
|
} };
|
|
2152
|
-
},
|
|
2153
|
-
const { data: e } =
|
|
2153
|
+
}, xo = () => {
|
|
2154
|
+
const { data: e } = Rs(), t = B(), n = R();
|
|
2154
2155
|
return {
|
|
2155
2156
|
getPartialBlocks: q(async () => {
|
|
2156
2157
|
const s = {};
|
|
2157
2158
|
for (const r of e ?? [])
|
|
2158
2159
|
me(r == null ? void 0 : r.slug) && (s[r.id] = {
|
|
2159
2160
|
type: r.pageType,
|
|
2160
|
-
name:
|
|
2161
|
+
name: Hr(r.name ?? r.slug),
|
|
2161
2162
|
description: ""
|
|
2162
2163
|
});
|
|
2163
2164
|
return s;
|
|
@@ -2178,11 +2179,11 @@ const lo = ({
|
|
|
2178
2179
|
[n, t]
|
|
2179
2180
|
)
|
|
2180
2181
|
};
|
|
2181
|
-
}, ss =
|
|
2182
|
-
email:
|
|
2183
|
-
password:
|
|
2184
|
-
}),
|
|
2185
|
-
const { setUser: e, logout: t } =
|
|
2182
|
+
}, ss = Mt.object({
|
|
2183
|
+
email: Mt.string().email({ message: "Please enter a valid email address" }),
|
|
2184
|
+
password: Mt.string().min(6, { message: "Password must be at least 6 characters" })
|
|
2185
|
+
}), Oo = () => {
|
|
2186
|
+
const { setUser: e, logout: t } = Ae(), n = Zt(), [s, r] = x(""), [a, i] = x(""), [o, l] = x({}), [u, f] = x(!1), [d, h] = x(""), g = se({
|
|
2186
2187
|
mutationFn: async (T) => {
|
|
2187
2188
|
h("");
|
|
2188
2189
|
const p = await en(n, {
|
|
@@ -2214,9 +2215,9 @@ const lo = ({
|
|
|
2214
2215
|
const p = { email: s, password: a };
|
|
2215
2216
|
try {
|
|
2216
2217
|
const A = ss.parse(p);
|
|
2217
|
-
|
|
2218
|
+
g.mutate(A);
|
|
2218
2219
|
} catch (A) {
|
|
2219
|
-
if (A instanceof
|
|
2220
|
+
if (A instanceof Mt.ZodError) {
|
|
2220
2221
|
const w = A.issues.reduce((D, U) => {
|
|
2221
2222
|
const b = U.path[0];
|
|
2222
2223
|
return D[b] = U.message, D;
|
|
@@ -2225,13 +2226,13 @@ const lo = ({
|
|
|
2225
2226
|
}
|
|
2226
2227
|
}
|
|
2227
2228
|
}, S = ss.safeParse({ email: s, password: a }).success;
|
|
2228
|
-
return /* @__PURE__ */ c("div", { className: "flex min-h-screen items-center justify-center bg-slate-50", children: /* @__PURE__ */
|
|
2229
|
-
/* @__PURE__ */
|
|
2230
|
-
/* @__PURE__ */ c(
|
|
2231
|
-
/* @__PURE__ */ c(
|
|
2229
|
+
return /* @__PURE__ */ c("div", { className: "flex min-h-screen items-center justify-center bg-slate-50", children: /* @__PURE__ */ m(fa, { className: "w-full max-w-md", children: [
|
|
2230
|
+
/* @__PURE__ */ m(ha, { children: [
|
|
2231
|
+
/* @__PURE__ */ c(ga, { className: "text-2xl", children: "Sign in" }),
|
|
2232
|
+
/* @__PURE__ */ c(ma, { children: "Enter your credentials to sign in to visual builder" })
|
|
2232
2233
|
] }),
|
|
2233
|
-
/* @__PURE__ */ c(
|
|
2234
|
-
/* @__PURE__ */
|
|
2234
|
+
/* @__PURE__ */ c(Ea, { children: /* @__PURE__ */ m("form", { onSubmit: E, className: "space-y-4", children: [
|
|
2235
|
+
/* @__PURE__ */ m("div", { className: "space-y-1", children: [
|
|
2235
2236
|
/* @__PURE__ */ c($n, { htmlFor: "email", children: "Email" }),
|
|
2236
2237
|
/* @__PURE__ */ c(
|
|
2237
2238
|
Qn,
|
|
@@ -2246,9 +2247,9 @@ const lo = ({
|
|
|
2246
2247
|
),
|
|
2247
2248
|
o.email && /* @__PURE__ */ c("p", { className: "text-sm text-destructive", children: o.email })
|
|
2248
2249
|
] }),
|
|
2249
|
-
/* @__PURE__ */
|
|
2250
|
+
/* @__PURE__ */ m("div", { className: "space-y-1", children: [
|
|
2250
2251
|
/* @__PURE__ */ c($n, { htmlFor: "password", children: "Password" }),
|
|
2251
|
-
/* @__PURE__ */
|
|
2252
|
+
/* @__PURE__ */ m("div", { className: "relative", children: [
|
|
2252
2253
|
/* @__PURE__ */ c(
|
|
2253
2254
|
Qn,
|
|
2254
2255
|
{
|
|
@@ -2266,30 +2267,30 @@ const lo = ({
|
|
|
2266
2267
|
type: "button",
|
|
2267
2268
|
className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",
|
|
2268
2269
|
onClick: () => f(!u),
|
|
2269
|
-
children: u ? /* @__PURE__ */ c(
|
|
2270
|
+
children: u ? /* @__PURE__ */ c(ei, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Cs, { className: "h-4 w-4" })
|
|
2270
2271
|
}
|
|
2271
2272
|
)
|
|
2272
2273
|
] }),
|
|
2273
2274
|
o.password && /* @__PURE__ */ c("p", { className: "text-sm text-destructive", children: o.password })
|
|
2274
2275
|
] }),
|
|
2275
2276
|
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c("p", { className: "text-sm text-destructive", children: d }) }),
|
|
2276
|
-
/* @__PURE__ */ c(M, { type: "submit", className: "w-full", disabled: !S ||
|
|
2277
|
-
/* @__PURE__ */ c(
|
|
2277
|
+
/* @__PURE__ */ c(M, { type: "submit", className: "w-full", disabled: !S || g.isPending, children: g.isPending ? /* @__PURE__ */ m(he, { children: [
|
|
2278
|
+
/* @__PURE__ */ c(ft, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
2278
2279
|
"Logging in..."
|
|
2279
2280
|
] }) : "Login" })
|
|
2280
2281
|
] }) }),
|
|
2281
|
-
/* @__PURE__ */
|
|
2282
|
-
/* @__PURE__ */
|
|
2282
|
+
/* @__PURE__ */ m(pa, { className: "flex flex-col justify-center", children: [
|
|
2283
|
+
/* @__PURE__ */ m("p", { className: "text-sm text-muted-foreground", children: [
|
|
2283
2284
|
"Forgot your password?",
|
|
2284
2285
|
" ",
|
|
2285
2286
|
/* @__PURE__ */ c("a", { target: "_blank", href: "https://chaibuilder.com/forgot-password", className: "text-primary hover:underline", children: "Reset password" })
|
|
2286
2287
|
] }),
|
|
2287
2288
|
/* @__PURE__ */ c("br", {}),
|
|
2288
2289
|
/* @__PURE__ */ c("br", {}),
|
|
2289
|
-
/* @__PURE__ */
|
|
2290
|
+
/* @__PURE__ */ m("div", { className: "flex items-center gap-2 border-t px-10 pt-2", children: [
|
|
2290
2291
|
"Powered by",
|
|
2291
2292
|
" ",
|
|
2292
|
-
/* @__PURE__ */
|
|
2293
|
+
/* @__PURE__ */ m(
|
|
2293
2294
|
"a",
|
|
2294
2295
|
{
|
|
2295
2296
|
target: "_blank",
|
|
@@ -2312,26 +2313,26 @@ const lo = ({
|
|
|
2312
2313
|
] })
|
|
2313
2314
|
] }) });
|
|
2314
2315
|
};
|
|
2315
|
-
let En =
|
|
2316
|
-
const
|
|
2316
|
+
let En = Oo;
|
|
2317
|
+
const Ro = () => $(() => En, [En]), iu = (e) => {
|
|
2317
2318
|
En = e;
|
|
2318
2319
|
}, rs = () => {
|
|
2319
|
-
const e =
|
|
2320
|
-
return /* @__PURE__ */ c(
|
|
2321
|
-
},
|
|
2320
|
+
const e = Ro();
|
|
2321
|
+
return /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c("div", { children: "Loading..." }), children: /* @__PURE__ */ c(e, {}) });
|
|
2322
|
+
}, Uo = K(() => import("./lang-panel-G7RoMOP7.js")), Bo = ({ isActive: e, show: t }) => {
|
|
2322
2323
|
const { data: n } = Be();
|
|
2323
|
-
return !Y(n, "languages") || !
|
|
2324
|
-
},
|
|
2325
|
-
id:
|
|
2324
|
+
return !Y(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(ti, { className: "h-4 w-4" }) });
|
|
2325
|
+
}, Ks = "lang", Mo = {
|
|
2326
|
+
id: Ks,
|
|
2326
2327
|
label: "Languages",
|
|
2327
2328
|
position: "top",
|
|
2328
|
-
panel:
|
|
2329
|
-
button:
|
|
2329
|
+
panel: Uo,
|
|
2330
|
+
button: Bo,
|
|
2330
2331
|
view: "modal",
|
|
2331
2332
|
width: 400
|
|
2332
|
-
},
|
|
2333
|
-
const { data: n } = oe(), s =
|
|
2334
|
-
return !Y(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */
|
|
2333
|
+
}, Fo = K(() => import("./seo-panel-B20DCgo0.js")), Vs = "seo", qo = ({ isActive: e, show: t }) => {
|
|
2334
|
+
const { data: n } = oe(), s = Ji(n == null ? void 0 : n.pageType);
|
|
2335
|
+
return !Y(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
|
|
2335
2336
|
"svg",
|
|
2336
2337
|
{
|
|
2337
2338
|
stroke: "currentColor",
|
|
@@ -2349,35 +2350,35 @@ const xo = () => $(() => En, [En]), nu = (e) => {
|
|
|
2349
2350
|
]
|
|
2350
2351
|
}
|
|
2351
2352
|
) });
|
|
2352
|
-
},
|
|
2353
|
-
id:
|
|
2353
|
+
}, Ko = {
|
|
2354
|
+
id: Vs,
|
|
2354
2355
|
label: "SEO",
|
|
2355
|
-
panel:
|
|
2356
|
-
button:
|
|
2356
|
+
panel: Fo,
|
|
2357
|
+
button: qo,
|
|
2357
2358
|
position: "top",
|
|
2358
2359
|
width: 600,
|
|
2359
2360
|
view: "modal"
|
|
2360
|
-
},
|
|
2361
|
-
const { user: e, logout: t } =
|
|
2362
|
-
return e ? /* @__PURE__ */
|
|
2363
|
-
/* @__PURE__ */ c(
|
|
2364
|
-
/* @__PURE__ */
|
|
2361
|
+
}, Hs = "user-info", Vo = () => {
|
|
2362
|
+
const { user: e, logout: t } = Ae(), n = ye("onLogout", As);
|
|
2363
|
+
return e ? /* @__PURE__ */ m(ya, { children: [
|
|
2364
|
+
/* @__PURE__ */ c(Aa, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(ni, { className: "h-4 w-4" }) }) }),
|
|
2365
|
+
/* @__PURE__ */ m(Ta, { className: "w-auto space-y-2 p-4", children: [
|
|
2365
2366
|
/* @__PURE__ */ c("div", { className: "text-sm font-medium", children: e.name ?? e.email }),
|
|
2366
2367
|
/* @__PURE__ */ c("div", { className: "text-xs text-muted-foreground", children: e.email }),
|
|
2367
|
-
/* @__PURE__ */
|
|
2368
|
-
/* @__PURE__ */ c(
|
|
2369
|
-
/* @__PURE__ */
|
|
2370
|
-
/* @__PURE__ */
|
|
2371
|
-
/* @__PURE__ */ c(
|
|
2372
|
-
/* @__PURE__ */ c(
|
|
2368
|
+
/* @__PURE__ */ m(Sa, { children: [
|
|
2369
|
+
/* @__PURE__ */ c(_a, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "outline", size: "sm", className: "w-full", children: "Logout" }) }),
|
|
2370
|
+
/* @__PURE__ */ m(Pa, { children: [
|
|
2371
|
+
/* @__PURE__ */ m(wa, { children: [
|
|
2372
|
+
/* @__PURE__ */ c(va, { children: "Are you sure you want to logout?" }),
|
|
2373
|
+
/* @__PURE__ */ c(ba, { children: "You will be redirected to the login page." })
|
|
2373
2374
|
] }),
|
|
2374
|
-
/* @__PURE__ */
|
|
2375
|
-
/* @__PURE__ */ c(
|
|
2375
|
+
/* @__PURE__ */ m(Ia, { children: [
|
|
2376
|
+
/* @__PURE__ */ c(Na, { children: "Cancel" }),
|
|
2376
2377
|
/* @__PURE__ */ c(
|
|
2377
|
-
|
|
2378
|
+
Ca,
|
|
2378
2379
|
{
|
|
2379
2380
|
onClick: () => {
|
|
2380
|
-
t(),
|
|
2381
|
+
t(), $r(n) && n();
|
|
2381
2382
|
},
|
|
2382
2383
|
children: "Logout"
|
|
2383
2384
|
}
|
|
@@ -2387,13 +2388,13 @@ const xo = () => $(() => En, [En]), nu = (e) => {
|
|
|
2387
2388
|
] })
|
|
2388
2389
|
] })
|
|
2389
2390
|
] }) : null;
|
|
2390
|
-
},
|
|
2391
|
-
id:
|
|
2391
|
+
}, Ho = {
|
|
2392
|
+
id: Hs,
|
|
2392
2393
|
label: "User Info",
|
|
2393
|
-
button:
|
|
2394
|
+
button: Vo,
|
|
2394
2395
|
position: "bottom"
|
|
2395
|
-
},
|
|
2396
|
-
rn(
|
|
2396
|
+
}, $o = () => {
|
|
2397
|
+
rn(Vs, Ko), rn(Ks, Mo), rn(Hs, Ho);
|
|
2397
2398
|
};
|
|
2398
2399
|
var P = {
|
|
2399
2400
|
context: void 0,
|
|
@@ -2414,64 +2415,64 @@ function as(e) {
|
|
|
2414
2415
|
function lt(e) {
|
|
2415
2416
|
P.context = e;
|
|
2416
2417
|
}
|
|
2417
|
-
var
|
|
2418
|
-
equals:
|
|
2419
|
-
},
|
|
2418
|
+
var $s = !1, Qo = (e, t) => e === t, Ht = Symbol("solid-proxy"), Qs = typeof Proxy == "function", js = Symbol("solid-track"), $t = {
|
|
2419
|
+
equals: Qo
|
|
2420
|
+
}, zs = tr, Pe = 1, Qt = 2, Ws = {
|
|
2420
2421
|
owned: null,
|
|
2421
2422
|
cleanups: null,
|
|
2422
2423
|
context: null,
|
|
2423
2424
|
owner: null
|
|
2424
|
-
}, dn = {}, N = null, fn = null,
|
|
2425
|
-
function
|
|
2426
|
-
const n =
|
|
2425
|
+
}, dn = {}, N = null, fn = null, jo = null, G = null, ne = null, _e = null, tn = 0;
|
|
2426
|
+
function Ge(e, t) {
|
|
2427
|
+
const n = G, s = N, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Ws : {
|
|
2427
2428
|
owned: null,
|
|
2428
2429
|
cleanups: null,
|
|
2429
2430
|
context: a ? a.context : null,
|
|
2430
2431
|
owner: a
|
|
2431
|
-
}, o = r ? e : () => e(() => Z(() =>
|
|
2432
|
-
N = i,
|
|
2432
|
+
}, o = r ? e : () => e(() => Z(() => gt(i)));
|
|
2433
|
+
N = i, G = null;
|
|
2433
2434
|
try {
|
|
2434
2435
|
return Ee(o, !0);
|
|
2435
2436
|
} finally {
|
|
2436
|
-
|
|
2437
|
+
G = n, N = s;
|
|
2437
2438
|
}
|
|
2438
2439
|
}
|
|
2439
2440
|
function F(e, t) {
|
|
2440
|
-
t = t ? Object.assign({},
|
|
2441
|
+
t = t ? Object.assign({}, $t, t) : $t;
|
|
2441
2442
|
const n = {
|
|
2442
2443
|
value: e,
|
|
2443
2444
|
observers: null,
|
|
2444
2445
|
observerSlots: null,
|
|
2445
2446
|
comparator: t.equals || void 0
|
|
2446
|
-
}, s = (r) => (typeof r == "function" && (r = r(n.value)),
|
|
2447
|
-
return [
|
|
2447
|
+
}, s = (r) => (typeof r == "function" && (r = r(n.value)), er(n, r));
|
|
2448
|
+
return [Zs.bind(n), s];
|
|
2448
2449
|
}
|
|
2449
|
-
function
|
|
2450
|
+
function zo(e, t, n) {
|
|
2450
2451
|
const s = nn(e, t, !0, Pe);
|
|
2451
2452
|
at(s);
|
|
2452
2453
|
}
|
|
2453
|
-
function
|
|
2454
|
+
function xe(e, t, n) {
|
|
2454
2455
|
const s = nn(e, t, !1, Pe);
|
|
2455
2456
|
at(s);
|
|
2456
2457
|
}
|
|
2457
|
-
function
|
|
2458
|
-
|
|
2458
|
+
function Ys(e, t, n) {
|
|
2459
|
+
zs = sl;
|
|
2459
2460
|
const s = nn(e, t, !1, Pe);
|
|
2460
|
-
(!n || !n.render) && (s.user = !0),
|
|
2461
|
+
(!n || !n.render) && (s.user = !0), _e ? _e.push(s) : at(s);
|
|
2461
2462
|
}
|
|
2462
2463
|
function J(e, t, n) {
|
|
2463
|
-
n = n ? Object.assign({},
|
|
2464
|
+
n = n ? Object.assign({}, $t, n) : $t;
|
|
2464
2465
|
const s = nn(e, t, !0, 0);
|
|
2465
|
-
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, at(s),
|
|
2466
|
+
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, at(s), Zs.bind(s);
|
|
2466
2467
|
}
|
|
2467
|
-
function
|
|
2468
|
+
function Wo(e) {
|
|
2468
2469
|
return e && typeof e == "object" && "then" in e;
|
|
2469
2470
|
}
|
|
2470
|
-
function
|
|
2471
|
+
function Yo(e, t, n) {
|
|
2471
2472
|
let s, r, a;
|
|
2472
2473
|
s = !0, r = e, a = {};
|
|
2473
2474
|
let i = null, o = dn, l = null, u = !1, f = "initialValue" in a, d = typeof s == "function" && J(s);
|
|
2474
|
-
const h = /* @__PURE__ */ new Set(), [
|
|
2475
|
+
const h = /* @__PURE__ */ new Set(), [g, E] = (a.storage || F)(a.initialValue), [S, T] = F(void 0), [p, A] = F(void 0, {
|
|
2475
2476
|
equals: !1
|
|
2476
2477
|
}), [w, D] = F(f ? "ready" : "unresolved");
|
|
2477
2478
|
P.context && (l = P.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : P.load && P.has(l) && (o = P.load(l)));
|
|
@@ -2487,24 +2488,24 @@ function jo(e, t, n) {
|
|
|
2487
2488
|
h.clear();
|
|
2488
2489
|
}, !1);
|
|
2489
2490
|
}
|
|
2490
|
-
function
|
|
2491
|
-
const v =
|
|
2491
|
+
function Te() {
|
|
2492
|
+
const v = el, I = g(), W = S();
|
|
2492
2493
|
if (W !== void 0 && !i) throw W;
|
|
2493
|
-
return
|
|
2494
|
+
return G && G.user, I;
|
|
2494
2495
|
}
|
|
2495
|
-
function
|
|
2496
|
+
function Se(v = !0) {
|
|
2496
2497
|
if (v !== !1 && u) return;
|
|
2497
2498
|
u = !1;
|
|
2498
2499
|
const I = d ? d() : s;
|
|
2499
2500
|
if (I == null || I === !1) {
|
|
2500
|
-
U(i, Z(
|
|
2501
|
+
U(i, Z(g));
|
|
2501
2502
|
return;
|
|
2502
2503
|
}
|
|
2503
2504
|
let W;
|
|
2504
2505
|
const Q = o !== dn ? o : Z(() => {
|
|
2505
2506
|
try {
|
|
2506
2507
|
return r(I, {
|
|
2507
|
-
value:
|
|
2508
|
+
value: g(),
|
|
2508
2509
|
refetching: v
|
|
2509
2510
|
});
|
|
2510
2511
|
} catch (ce) {
|
|
@@ -2512,15 +2513,15 @@ function jo(e, t, n) {
|
|
|
2512
2513
|
}
|
|
2513
2514
|
});
|
|
2514
2515
|
if (W !== void 0) {
|
|
2515
|
-
U(i, void 0,
|
|
2516
|
+
U(i, void 0, Ft(W), I);
|
|
2516
2517
|
return;
|
|
2517
|
-
} else if (!
|
|
2518
|
+
} else if (!Wo(Q))
|
|
2518
2519
|
return U(i, Q, void 0, I), Q;
|
|
2519
|
-
return i = Q, "v" in Q ? (Q.s === 1 ? U(i, Q.v, void 0, I) : U(i, void 0,
|
|
2520
|
+
return i = Q, "v" in Q ? (Q.s === 1 ? U(i, Q.v, void 0, I) : U(i, void 0, Ft(Q.v), I), Q) : (u = !0, queueMicrotask(() => u = !1), Ee(() => {
|
|
2520
2521
|
D(f ? "refreshing" : "pending"), A();
|
|
2521
|
-
}, !1), Q.then((ce) => U(Q, ce, void 0, I), (ce) => U(Q, void 0,
|
|
2522
|
+
}, !1), Q.then((ce) => U(Q, ce, void 0, I), (ce) => U(Q, void 0, Ft(ce), I)));
|
|
2522
2523
|
}
|
|
2523
|
-
Object.defineProperties(
|
|
2524
|
+
Object.defineProperties(Te, {
|
|
2524
2525
|
state: {
|
|
2525
2526
|
get: () => w()
|
|
2526
2527
|
},
|
|
@@ -2535,33 +2536,33 @@ function jo(e, t, n) {
|
|
|
2535
2536
|
},
|
|
2536
2537
|
latest: {
|
|
2537
2538
|
get() {
|
|
2538
|
-
if (!f) return
|
|
2539
|
+
if (!f) return Te();
|
|
2539
2540
|
const v = S();
|
|
2540
2541
|
if (v && !i) throw v;
|
|
2541
|
-
return
|
|
2542
|
+
return g();
|
|
2542
2543
|
}
|
|
2543
2544
|
}
|
|
2544
2545
|
});
|
|
2545
2546
|
let k = N;
|
|
2546
|
-
return d ?
|
|
2547
|
-
refetch: (v) =>
|
|
2547
|
+
return d ? zo(() => (k = N, Se(!1))) : Se(!1), [Te, {
|
|
2548
|
+
refetch: (v) => Js(k, () => Se(v)),
|
|
2548
2549
|
mutate: E
|
|
2549
2550
|
}];
|
|
2550
2551
|
}
|
|
2551
|
-
function
|
|
2552
|
+
function ou(e) {
|
|
2552
2553
|
return Ee(e, !1);
|
|
2553
2554
|
}
|
|
2554
2555
|
function Z(e) {
|
|
2555
|
-
if (
|
|
2556
|
-
const t =
|
|
2557
|
-
|
|
2556
|
+
if (G === null) return e();
|
|
2557
|
+
const t = G;
|
|
2558
|
+
G = null;
|
|
2558
2559
|
try {
|
|
2559
2560
|
return e();
|
|
2560
2561
|
} finally {
|
|
2561
|
-
|
|
2562
|
+
G = t;
|
|
2562
2563
|
}
|
|
2563
2564
|
}
|
|
2564
|
-
function
|
|
2565
|
+
function lu(e, t, n) {
|
|
2565
2566
|
const s = Array.isArray(e);
|
|
2566
2567
|
let r, a = n && n.defer;
|
|
2567
2568
|
return (i) => {
|
|
@@ -2576,100 +2577,100 @@ function ru(e, t, n) {
|
|
|
2576
2577
|
return r = o, l;
|
|
2577
2578
|
};
|
|
2578
2579
|
}
|
|
2579
|
-
function
|
|
2580
|
-
|
|
2580
|
+
function Jo(e) {
|
|
2581
|
+
Ys(() => Z(e));
|
|
2581
2582
|
}
|
|
2582
|
-
function
|
|
2583
|
+
function ht(e) {
|
|
2583
2584
|
return N === null || (N.cleanups === null ? N.cleanups = [e] : N.cleanups.push(e)), e;
|
|
2584
2585
|
}
|
|
2585
2586
|
function is() {
|
|
2586
2587
|
return N;
|
|
2587
2588
|
}
|
|
2588
|
-
function
|
|
2589
|
-
const n = N, s =
|
|
2590
|
-
N = e,
|
|
2589
|
+
function Js(e, t) {
|
|
2590
|
+
const n = N, s = G;
|
|
2591
|
+
N = e, G = null;
|
|
2591
2592
|
try {
|
|
2592
2593
|
return Ee(t, !0);
|
|
2593
2594
|
} catch (r) {
|
|
2594
2595
|
Bn(r);
|
|
2595
2596
|
} finally {
|
|
2596
|
-
N = n,
|
|
2597
|
+
N = n, G = s;
|
|
2597
2598
|
}
|
|
2598
2599
|
}
|
|
2599
|
-
function
|
|
2600
|
-
const t =
|
|
2600
|
+
function Xo(e) {
|
|
2601
|
+
const t = G, n = N;
|
|
2601
2602
|
return Promise.resolve().then(() => {
|
|
2602
|
-
|
|
2603
|
+
G = t, N = n;
|
|
2603
2604
|
let s;
|
|
2604
|
-
return Ee(e, !1),
|
|
2605
|
+
return Ee(e, !1), G = N = null, s ? s.done : void 0;
|
|
2605
2606
|
});
|
|
2606
2607
|
}
|
|
2607
|
-
var [
|
|
2608
|
-
function
|
|
2609
|
-
return [
|
|
2608
|
+
var [Zo, cu] = /* @__PURE__ */ F(!1);
|
|
2609
|
+
function uu() {
|
|
2610
|
+
return [Zo, Xo];
|
|
2610
2611
|
}
|
|
2611
|
-
function
|
|
2612
|
+
function du(e, t) {
|
|
2612
2613
|
const n = Symbol("context");
|
|
2613
2614
|
return {
|
|
2614
2615
|
id: n,
|
|
2615
|
-
Provider:
|
|
2616
|
+
Provider: rl(n),
|
|
2616
2617
|
defaultValue: e
|
|
2617
2618
|
};
|
|
2618
2619
|
}
|
|
2619
|
-
function
|
|
2620
|
+
function fu(e) {
|
|
2620
2621
|
let t;
|
|
2621
2622
|
return N && N.context && (t = N.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
2622
2623
|
}
|
|
2623
|
-
function
|
|
2624
|
+
function Xs(e) {
|
|
2624
2625
|
const t = J(e), n = J(() => pn(t()));
|
|
2625
2626
|
return n.toArray = () => {
|
|
2626
2627
|
const s = n();
|
|
2627
2628
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
2628
2629
|
}, n;
|
|
2629
2630
|
}
|
|
2630
|
-
var
|
|
2631
|
-
function
|
|
2631
|
+
var el;
|
|
2632
|
+
function Zs() {
|
|
2632
2633
|
if (this.sources && this.state)
|
|
2633
2634
|
if (this.state === Pe) at(this);
|
|
2634
2635
|
else {
|
|
2635
|
-
const e =
|
|
2636
|
-
|
|
2636
|
+
const e = ne;
|
|
2637
|
+
ne = null, Ee(() => zt(this), !1), ne = e;
|
|
2637
2638
|
}
|
|
2638
|
-
if (
|
|
2639
|
+
if (G) {
|
|
2639
2640
|
const e = this.observers ? this.observers.length : 0;
|
|
2640
|
-
|
|
2641
|
+
G.sources ? (G.sources.push(this), G.sourceSlots.push(e)) : (G.sources = [this], G.sourceSlots = [e]), this.observers ? (this.observers.push(G), this.observerSlots.push(G.sources.length - 1)) : (this.observers = [G], this.observerSlots = [G.sources.length - 1]);
|
|
2641
2642
|
}
|
|
2642
2643
|
return this.value;
|
|
2643
2644
|
}
|
|
2644
|
-
function
|
|
2645
|
+
function er(e, t, n) {
|
|
2645
2646
|
let s = e.value;
|
|
2646
2647
|
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && Ee(() => {
|
|
2647
2648
|
for (let r = 0; r < e.observers.length; r += 1) {
|
|
2648
2649
|
const a = e.observers[r], i = fn && fn.running;
|
|
2649
|
-
i && fn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ?
|
|
2650
|
+
i && fn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ne.push(a) : _e.push(a), a.observers && nr(a)), i || (a.state = Pe);
|
|
2650
2651
|
}
|
|
2651
|
-
if (
|
|
2652
|
-
throw
|
|
2652
|
+
if (ne.length > 1e6)
|
|
2653
|
+
throw ne = [], new Error();
|
|
2653
2654
|
}, !1)), t;
|
|
2654
2655
|
}
|
|
2655
2656
|
function at(e) {
|
|
2656
2657
|
if (!e.fn) return;
|
|
2657
|
-
|
|
2658
|
+
gt(e);
|
|
2658
2659
|
const t = tn;
|
|
2659
|
-
|
|
2660
|
+
tl(e, e.value, t);
|
|
2660
2661
|
}
|
|
2661
|
-
function
|
|
2662
|
+
function tl(e, t, n) {
|
|
2662
2663
|
let s;
|
|
2663
|
-
const r = N, a =
|
|
2664
|
-
|
|
2664
|
+
const r = N, a = G;
|
|
2665
|
+
G = N = e;
|
|
2665
2666
|
try {
|
|
2666
2667
|
s = e.fn(t);
|
|
2667
2668
|
} catch (i) {
|
|
2668
|
-
return e.pure && (e.state = Pe, e.owned && e.owned.forEach(
|
|
2669
|
+
return e.pure && (e.state = Pe, e.owned && e.owned.forEach(gt), e.owned = null), e.updatedAt = n + 1, Bn(i);
|
|
2669
2670
|
} finally {
|
|
2670
|
-
|
|
2671
|
+
G = a, N = r;
|
|
2671
2672
|
}
|
|
2672
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ?
|
|
2673
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? er(e, s) : e.value = s, e.updatedAt = n);
|
|
2673
2674
|
}
|
|
2674
2675
|
function nn(e, t, n, s = Pe, r) {
|
|
2675
2676
|
const a = {
|
|
@@ -2685,11 +2686,11 @@ function nn(e, t, n, s = Pe, r) {
|
|
|
2685
2686
|
context: N ? N.context : null,
|
|
2686
2687
|
pure: n
|
|
2687
2688
|
};
|
|
2688
|
-
return N === null || N !==
|
|
2689
|
+
return N === null || N !== Ws && (N.owned ? N.owned.push(a) : N.owned = [a]), a;
|
|
2689
2690
|
}
|
|
2690
|
-
function
|
|
2691
|
+
function jt(e) {
|
|
2691
2692
|
if (e.state === 0) return;
|
|
2692
|
-
if (e.state ===
|
|
2693
|
+
if (e.state === Qt) return zt(e);
|
|
2693
2694
|
if (e.suspense && Z(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
2694
2695
|
const t = [e];
|
|
2695
2696
|
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < tn); )
|
|
@@ -2697,35 +2698,35 @@ function Qt(e) {
|
|
|
2697
2698
|
for (let n = t.length - 1; n >= 0; n--)
|
|
2698
2699
|
if (e = t[n], e.state === Pe)
|
|
2699
2700
|
at(e);
|
|
2700
|
-
else if (e.state ===
|
|
2701
|
-
const s =
|
|
2702
|
-
|
|
2701
|
+
else if (e.state === Qt) {
|
|
2702
|
+
const s = ne;
|
|
2703
|
+
ne = null, Ee(() => zt(e, t[0]), !1), ne = s;
|
|
2703
2704
|
}
|
|
2704
2705
|
}
|
|
2705
2706
|
function Ee(e, t) {
|
|
2706
|
-
if (
|
|
2707
|
+
if (ne) return e();
|
|
2707
2708
|
let n = !1;
|
|
2708
|
-
t || (
|
|
2709
|
+
t || (ne = []), _e ? n = !0 : _e = [], tn++;
|
|
2709
2710
|
try {
|
|
2710
2711
|
const s = e();
|
|
2711
|
-
return
|
|
2712
|
+
return nl(n), s;
|
|
2712
2713
|
} catch (s) {
|
|
2713
|
-
n || (
|
|
2714
|
+
n || (_e = null), ne = null, Bn(s);
|
|
2714
2715
|
}
|
|
2715
2716
|
}
|
|
2716
|
-
function
|
|
2717
|
-
if (
|
|
2718
|
-
const t =
|
|
2719
|
-
|
|
2717
|
+
function nl(e) {
|
|
2718
|
+
if (ne && (tr(ne), ne = null), e) return;
|
|
2719
|
+
const t = _e;
|
|
2720
|
+
_e = null, t.length && Ee(() => zs(t), !1);
|
|
2720
2721
|
}
|
|
2721
|
-
function
|
|
2722
|
-
for (let t = 0; t < e.length; t++)
|
|
2722
|
+
function tr(e) {
|
|
2723
|
+
for (let t = 0; t < e.length; t++) jt(e[t]);
|
|
2723
2724
|
}
|
|
2724
|
-
function
|
|
2725
|
+
function sl(e) {
|
|
2725
2726
|
let t, n = 0;
|
|
2726
2727
|
for (t = 0; t < e.length; t++) {
|
|
2727
2728
|
const s = e[t];
|
|
2728
|
-
s.user ? e[n++] = s :
|
|
2729
|
+
s.user ? e[n++] = s : jt(s);
|
|
2729
2730
|
}
|
|
2730
2731
|
if (P.context) {
|
|
2731
2732
|
if (P.count) {
|
|
@@ -2734,25 +2735,25 @@ function el(e) {
|
|
|
2734
2735
|
}
|
|
2735
2736
|
lt();
|
|
2736
2737
|
}
|
|
2737
|
-
for (P.effects && (P.done || !P.count) && (e = [...P.effects, ...e], n += P.effects.length, delete P.effects), t = 0; t < n; t++)
|
|
2738
|
+
for (P.effects && (P.done || !P.count) && (e = [...P.effects, ...e], n += P.effects.length, delete P.effects), t = 0; t < n; t++) jt(e[t]);
|
|
2738
2739
|
}
|
|
2739
|
-
function
|
|
2740
|
+
function zt(e, t) {
|
|
2740
2741
|
e.state = 0;
|
|
2741
2742
|
for (let n = 0; n < e.sources.length; n += 1) {
|
|
2742
2743
|
const s = e.sources[n];
|
|
2743
2744
|
if (s.sources) {
|
|
2744
2745
|
const r = s.state;
|
|
2745
|
-
r === Pe ? s !== t && (!s.updatedAt || s.updatedAt < tn) &&
|
|
2746
|
+
r === Pe ? s !== t && (!s.updatedAt || s.updatedAt < tn) && jt(s) : r === Qt && zt(s, t);
|
|
2746
2747
|
}
|
|
2747
2748
|
}
|
|
2748
2749
|
}
|
|
2749
|
-
function
|
|
2750
|
+
function nr(e) {
|
|
2750
2751
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
2751
2752
|
const n = e.observers[t];
|
|
2752
|
-
n.state || (n.state =
|
|
2753
|
+
n.state || (n.state = Qt, n.pure ? ne.push(n) : _e.push(n), n.observers && nr(n));
|
|
2753
2754
|
}
|
|
2754
2755
|
}
|
|
2755
|
-
function
|
|
2756
|
+
function gt(e) {
|
|
2756
2757
|
let t;
|
|
2757
2758
|
if (e.sources)
|
|
2758
2759
|
for (; e.sources.length; ) {
|
|
@@ -2763,11 +2764,11 @@ function ht(e) {
|
|
|
2763
2764
|
}
|
|
2764
2765
|
}
|
|
2765
2766
|
if (e.tOwned) {
|
|
2766
|
-
for (t = e.tOwned.length - 1; t >= 0; t--)
|
|
2767
|
+
for (t = e.tOwned.length - 1; t >= 0; t--) gt(e.tOwned[t]);
|
|
2767
2768
|
delete e.tOwned;
|
|
2768
2769
|
}
|
|
2769
2770
|
if (e.owned) {
|
|
2770
|
-
for (t = e.owned.length - 1; t >= 0; t--)
|
|
2771
|
+
for (t = e.owned.length - 1; t >= 0; t--) gt(e.owned[t]);
|
|
2771
2772
|
e.owned = null;
|
|
2772
2773
|
}
|
|
2773
2774
|
if (e.cleanups) {
|
|
@@ -2776,13 +2777,13 @@ function ht(e) {
|
|
|
2776
2777
|
}
|
|
2777
2778
|
e.state = 0;
|
|
2778
2779
|
}
|
|
2779
|
-
function
|
|
2780
|
+
function Ft(e) {
|
|
2780
2781
|
return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
|
|
2781
2782
|
cause: e
|
|
2782
2783
|
});
|
|
2783
2784
|
}
|
|
2784
2785
|
function Bn(e, t = N) {
|
|
2785
|
-
throw
|
|
2786
|
+
throw Ft(e);
|
|
2786
2787
|
}
|
|
2787
2788
|
function pn(e) {
|
|
2788
2789
|
if (typeof e == "function" && !e.length) return pn(e());
|
|
@@ -2796,47 +2797,47 @@ function pn(e) {
|
|
|
2796
2797
|
}
|
|
2797
2798
|
return e;
|
|
2798
2799
|
}
|
|
2799
|
-
function
|
|
2800
|
+
function rl(e, t) {
|
|
2800
2801
|
return function(s) {
|
|
2801
2802
|
let r;
|
|
2802
|
-
return
|
|
2803
|
+
return xe(() => r = Z(() => (N.context = {
|
|
2803
2804
|
...N.context,
|
|
2804
2805
|
[e]: s.value
|
|
2805
|
-
},
|
|
2806
|
+
}, Xs(() => s.children))), void 0), r;
|
|
2806
2807
|
};
|
|
2807
2808
|
}
|
|
2808
2809
|
var yn = Symbol("fallback");
|
|
2809
|
-
function
|
|
2810
|
+
function Wt(e) {
|
|
2810
2811
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
2811
2812
|
}
|
|
2812
|
-
function
|
|
2813
|
+
function al(e, t, n = {}) {
|
|
2813
2814
|
let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
|
|
2814
|
-
return
|
|
2815
|
+
return ht(() => Wt(a)), () => {
|
|
2815
2816
|
let l = e() || [], u = l.length, f, d;
|
|
2816
|
-
return l[
|
|
2817
|
-
let
|
|
2817
|
+
return l[js], Z(() => {
|
|
2818
|
+
let g, E, S, T, p, A, w, D, U;
|
|
2818
2819
|
if (u === 0)
|
|
2819
|
-
i !== 0 && (
|
|
2820
|
+
i !== 0 && (Wt(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [yn], r[0] = Ge((b) => (a[0] = b, n.fallback())), i = 1);
|
|
2820
2821
|
else if (i === 0) {
|
|
2821
2822
|
for (r = new Array(u), d = 0; d < u; d++)
|
|
2822
|
-
s[d] = l[d], r[d] =
|
|
2823
|
+
s[d] = l[d], r[d] = Ge(h);
|
|
2823
2824
|
i = u;
|
|
2824
2825
|
} else {
|
|
2825
2826
|
for (S = new Array(u), T = new Array(u), o && (p = new Array(u)), A = 0, w = Math.min(i, u); A < w && s[A] === l[A]; A++) ;
|
|
2826
2827
|
for (w = i - 1, D = u - 1; w >= A && D >= A && s[w] === l[D]; w--, D--)
|
|
2827
2828
|
S[D] = r[w], T[D] = a[w], o && (p[D] = o[w]);
|
|
2828
|
-
for (
|
|
2829
|
-
U = l[d], f =
|
|
2829
|
+
for (g = /* @__PURE__ */ new Map(), E = new Array(D + 1), d = D; d >= A; d--)
|
|
2830
|
+
U = l[d], f = g.get(U), E[d] = f === void 0 ? -1 : f, g.set(U, d);
|
|
2830
2831
|
for (f = A; f <= w; f++)
|
|
2831
|
-
U = s[f], d =
|
|
2832
|
+
U = s[f], d = g.get(U), d !== void 0 && d !== -1 ? (S[d] = r[f], T[d] = a[f], o && (p[d] = o[f]), d = E[d], g.set(U, d)) : a[f]();
|
|
2832
2833
|
for (d = A; d < u; d++)
|
|
2833
|
-
d in S ? (r[d] = S[d], a[d] = T[d], o && (o[d] = p[d], o[d](d))) : r[d] =
|
|
2834
|
+
d in S ? (r[d] = S[d], a[d] = T[d], o && (o[d] = p[d], o[d](d))) : r[d] = Ge(h);
|
|
2834
2835
|
r = r.slice(0, i = u), s = l.slice(0);
|
|
2835
2836
|
}
|
|
2836
2837
|
return r;
|
|
2837
2838
|
});
|
|
2838
|
-
function h(
|
|
2839
|
-
if (a[d] =
|
|
2839
|
+
function h(g) {
|
|
2840
|
+
if (a[d] = g, o) {
|
|
2840
2841
|
const [E, S] = F(d);
|
|
2841
2842
|
return o[d] = S, t(l[d], E);
|
|
2842
2843
|
}
|
|
@@ -2844,27 +2845,27 @@ function nl(e, t, n = {}) {
|
|
|
2844
2845
|
}
|
|
2845
2846
|
};
|
|
2846
2847
|
}
|
|
2847
|
-
function
|
|
2848
|
+
function il(e, t, n = {}) {
|
|
2848
2849
|
let s = [], r = [], a = [], i = [], o = 0, l;
|
|
2849
|
-
return
|
|
2850
|
+
return ht(() => Wt(a)), () => {
|
|
2850
2851
|
const u = e() || [], f = u.length;
|
|
2851
|
-
return u[
|
|
2852
|
+
return u[js], Z(() => {
|
|
2852
2853
|
if (f === 0)
|
|
2853
|
-
return o !== 0 && (
|
|
2854
|
+
return o !== 0 && (Wt(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [yn], r[0] = Ge((h) => (a[0] = h, n.fallback())), o = 1), r;
|
|
2854
2855
|
for (s[0] === yn && (a[0](), a = [], s = [], r = [], o = 0), l = 0; l < f; l++)
|
|
2855
|
-
l < s.length && s[l] !== u[l] ? i[l](() => u[l]) : l >= s.length && (r[l] =
|
|
2856
|
+
l < s.length && s[l] !== u[l] ? i[l](() => u[l]) : l >= s.length && (r[l] = Ge(d));
|
|
2856
2857
|
for (; l < s.length; l++)
|
|
2857
2858
|
a[l]();
|
|
2858
2859
|
return o = i.length = a.length = f, s = u.slice(0), r = r.slice(0, o);
|
|
2859
2860
|
});
|
|
2860
2861
|
function d(h) {
|
|
2861
2862
|
a[l] = h;
|
|
2862
|
-
const [
|
|
2863
|
-
return i[l] = E, t(
|
|
2863
|
+
const [g, E] = F(u[l]);
|
|
2864
|
+
return i[l] = E, t(g, l);
|
|
2864
2865
|
}
|
|
2865
2866
|
};
|
|
2866
2867
|
}
|
|
2867
|
-
function
|
|
2868
|
+
function sr(e, t) {
|
|
2868
2869
|
return Z(() => e(t || {}));
|
|
2869
2870
|
}
|
|
2870
2871
|
function xt() {
|
|
@@ -2872,10 +2873,10 @@ function xt() {
|
|
|
2872
2873
|
}
|
|
2873
2874
|
var An = {
|
|
2874
2875
|
get(e, t, n) {
|
|
2875
|
-
return t ===
|
|
2876
|
+
return t === Ht ? n : e.get(t);
|
|
2876
2877
|
},
|
|
2877
2878
|
has(e, t) {
|
|
2878
|
-
return t ===
|
|
2879
|
+
return t === Ht ? !0 : e.has(t);
|
|
2879
2880
|
},
|
|
2880
2881
|
set: xt,
|
|
2881
2882
|
deleteProperty: xt,
|
|
@@ -2897,19 +2898,19 @@ var An = {
|
|
|
2897
2898
|
function hn(e) {
|
|
2898
2899
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
2899
2900
|
}
|
|
2900
|
-
function
|
|
2901
|
+
function ol() {
|
|
2901
2902
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
2902
2903
|
const n = this[e]();
|
|
2903
2904
|
if (n !== void 0) return n;
|
|
2904
2905
|
}
|
|
2905
2906
|
}
|
|
2906
|
-
function
|
|
2907
|
+
function rr(...e) {
|
|
2907
2908
|
let t = !1;
|
|
2908
2909
|
for (let i = 0; i < e.length; i++) {
|
|
2909
2910
|
const o = e[i];
|
|
2910
|
-
t = t || !!o &&
|
|
2911
|
+
t = t || !!o && Ht in o, e[i] = typeof o == "function" ? (t = !0, J(o)) : o;
|
|
2911
2912
|
}
|
|
2912
|
-
if (
|
|
2913
|
+
if (Qs && t)
|
|
2913
2914
|
return new Proxy({
|
|
2914
2915
|
get(i) {
|
|
2915
2916
|
for (let o = e.length - 1; o >= 0; o--) {
|
|
@@ -2941,7 +2942,7 @@ function sr(...e) {
|
|
|
2941
2942
|
s[f] = d.get ? {
|
|
2942
2943
|
enumerable: !0,
|
|
2943
2944
|
configurable: !0,
|
|
2944
|
-
get:
|
|
2945
|
+
get: ol.bind(n[f] = [d.get.bind(o)])
|
|
2945
2946
|
} : d.value !== void 0 ? d : void 0;
|
|
2946
2947
|
else {
|
|
2947
2948
|
const h = n[f];
|
|
@@ -2956,8 +2957,8 @@ function sr(...e) {
|
|
|
2956
2957
|
}
|
|
2957
2958
|
return r;
|
|
2958
2959
|
}
|
|
2959
|
-
function
|
|
2960
|
-
if (
|
|
2960
|
+
function ll(e, ...t) {
|
|
2961
|
+
if (Qs && Ht in e) {
|
|
2961
2962
|
const r = new Set(t.length > 1 ? t.flat() : t[0]), a = t.map((i) => new Proxy({
|
|
2962
2963
|
get(o) {
|
|
2963
2964
|
return i.includes(o) ? e[o] : void 0;
|
|
@@ -2991,7 +2992,7 @@ function al(e, ...t) {
|
|
|
2991
2992
|
}
|
|
2992
2993
|
return [...s, n];
|
|
2993
2994
|
}
|
|
2994
|
-
function
|
|
2995
|
+
function ar(e) {
|
|
2995
2996
|
let t, n;
|
|
2996
2997
|
const s = (r) => {
|
|
2997
2998
|
const a = P.context;
|
|
@@ -3001,7 +3002,7 @@ function rr(e) {
|
|
|
3001
3002
|
!P.done && lt(a), P.count--, l(() => u.default), lt();
|
|
3002
3003
|
}), t = o;
|
|
3003
3004
|
} else if (!t) {
|
|
3004
|
-
const [o] =
|
|
3005
|
+
const [o] = Yo(() => (n || (n = e())).then((l) => l.default));
|
|
3005
3006
|
t = o;
|
|
3006
3007
|
}
|
|
3007
3008
|
let i;
|
|
@@ -3015,24 +3016,24 @@ function rr(e) {
|
|
|
3015
3016
|
};
|
|
3016
3017
|
return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
|
|
3017
3018
|
}
|
|
3018
|
-
var
|
|
3019
|
-
function
|
|
3020
|
-
return P.context ? P.getNextContextId() : `cl-${
|
|
3019
|
+
var cl = 0;
|
|
3020
|
+
function hu() {
|
|
3021
|
+
return P.context ? P.getNextContextId() : `cl-${cl++}`;
|
|
3021
3022
|
}
|
|
3022
|
-
var
|
|
3023
|
-
function
|
|
3023
|
+
var ir = (e) => `Stale read from <${e}>.`;
|
|
3024
|
+
function gu(e) {
|
|
3024
3025
|
const t = "fallback" in e && {
|
|
3025
3026
|
fallback: () => e.fallback
|
|
3026
3027
|
};
|
|
3027
|
-
return J(
|
|
3028
|
+
return J(al(() => e.each, e.children, t || void 0));
|
|
3028
3029
|
}
|
|
3029
|
-
function
|
|
3030
|
+
function mu(e) {
|
|
3030
3031
|
const t = "fallback" in e && {
|
|
3031
3032
|
fallback: () => e.fallback
|
|
3032
3033
|
};
|
|
3033
|
-
return J(
|
|
3034
|
+
return J(il(() => e.each, e.children, t || void 0));
|
|
3034
3035
|
}
|
|
3035
|
-
function
|
|
3036
|
+
function Eu(e) {
|
|
3036
3037
|
const t = e.keyed, n = J(() => e.when, void 0, void 0), s = t ? n : J(n, void 0, {
|
|
3037
3038
|
equals: (r, a) => !r == !a
|
|
3038
3039
|
});
|
|
@@ -3041,21 +3042,21 @@ function fu(e) {
|
|
|
3041
3042
|
if (r) {
|
|
3042
3043
|
const a = e.children;
|
|
3043
3044
|
return typeof a == "function" && a.length > 0 ? Z(() => a(t ? r : () => {
|
|
3044
|
-
if (!Z(s)) throw
|
|
3045
|
+
if (!Z(s)) throw ir("Show");
|
|
3045
3046
|
return n();
|
|
3046
3047
|
})) : a;
|
|
3047
3048
|
}
|
|
3048
3049
|
return e.fallback;
|
|
3049
3050
|
}, void 0, void 0);
|
|
3050
3051
|
}
|
|
3051
|
-
function
|
|
3052
|
-
const t =
|
|
3052
|
+
function pu(e) {
|
|
3053
|
+
const t = Xs(() => e.children), n = J(() => {
|
|
3053
3054
|
const s = t(), r = Array.isArray(s) ? s : [s];
|
|
3054
3055
|
let a = () => {
|
|
3055
3056
|
};
|
|
3056
3057
|
for (let i = 0; i < r.length; i++) {
|
|
3057
3058
|
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, {
|
|
3058
|
-
equals: (h,
|
|
3059
|
+
equals: (h, g) => !h == !g
|
|
3059
3060
|
});
|
|
3060
3061
|
a = () => u() || (d() ? [o, f, l] : void 0);
|
|
3061
3062
|
}
|
|
@@ -3067,18 +3068,18 @@ function hu(e) {
|
|
|
3067
3068
|
const [r, a, i] = s, o = i.children;
|
|
3068
3069
|
return typeof o == "function" && o.length > 0 ? Z(() => o(i.keyed ? a() : () => {
|
|
3069
3070
|
var u;
|
|
3070
|
-
if (((u = Z(n)()) == null ? void 0 : u[0]) !== r) throw
|
|
3071
|
+
if (((u = Z(n)()) == null ? void 0 : u[0]) !== r) throw ir("Match");
|
|
3071
3072
|
return a();
|
|
3072
3073
|
})) : o;
|
|
3073
3074
|
}, void 0, void 0);
|
|
3074
3075
|
}
|
|
3075
|
-
function
|
|
3076
|
+
function yu(e) {
|
|
3076
3077
|
return e;
|
|
3077
3078
|
}
|
|
3078
|
-
var
|
|
3079
|
+
var ul = ["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"], dl = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...ul]), fl = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), hl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
3079
3080
|
className: "class",
|
|
3080
3081
|
htmlFor: "for"
|
|
3081
|
-
}),
|
|
3082
|
+
}), gl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
3082
3083
|
class: "className",
|
|
3083
3084
|
novalidate: {
|
|
3084
3085
|
$: "noValidate",
|
|
@@ -3107,11 +3108,11 @@ var ol = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
|
|
|
3107
3108
|
TEXTAREA: 1
|
|
3108
3109
|
}
|
|
3109
3110
|
});
|
|
3110
|
-
function
|
|
3111
|
-
const n =
|
|
3111
|
+
function ml(e, t) {
|
|
3112
|
+
const n = gl[e];
|
|
3112
3113
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
3113
3114
|
}
|
|
3114
|
-
var
|
|
3115
|
+
var El = /* @__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"]), pl = /* @__PURE__ */ new Set([
|
|
3115
3116
|
"altGlyph",
|
|
3116
3117
|
"altGlyphDef",
|
|
3117
3118
|
"altGlyphItem",
|
|
@@ -3189,11 +3190,11 @@ var hl = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
|
|
|
3189
3190
|
"use",
|
|
3190
3191
|
"view",
|
|
3191
3192
|
"vkern"
|
|
3192
|
-
]),
|
|
3193
|
+
]), yl = {
|
|
3193
3194
|
xlink: "http://www.w3.org/1999/xlink",
|
|
3194
3195
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
3195
|
-
},
|
|
3196
|
-
function
|
|
3196
|
+
}, Au = (e) => J(() => e());
|
|
3197
|
+
function Al(e, t, n) {
|
|
3197
3198
|
let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling, u = null;
|
|
3198
3199
|
for (; i < r || o < a; ) {
|
|
3199
3200
|
if (t[i] === n[o]) {
|
|
@@ -3220,8 +3221,8 @@ function El(e, t, n) {
|
|
|
3220
3221
|
const f = u.get(t[i]);
|
|
3221
3222
|
if (f != null)
|
|
3222
3223
|
if (o < f && f < a) {
|
|
3223
|
-
let d = i, h = 1,
|
|
3224
|
-
for (; ++d < r && d < a && !((
|
|
3224
|
+
let d = i, h = 1, g;
|
|
3225
|
+
for (; ++d < r && d < a && !((g = u.get(t[d])) == null || g !== f + h); )
|
|
3225
3226
|
h++;
|
|
3226
3227
|
if (h > f - o) {
|
|
3227
3228
|
const E = t[i];
|
|
@@ -3233,15 +3234,15 @@ function El(e, t, n) {
|
|
|
3233
3234
|
}
|
|
3234
3235
|
}
|
|
3235
3236
|
var ut = "_$DX_DELEGATE";
|
|
3236
|
-
function
|
|
3237
|
+
function or(e, t, n, s = {}) {
|
|
3237
3238
|
let r;
|
|
3238
|
-
return
|
|
3239
|
+
return Ge((a) => {
|
|
3239
3240
|
r = a, t === document ? e() : Sn(t, e(), t.firstChild ? null : void 0, n);
|
|
3240
3241
|
}, s.owner), () => {
|
|
3241
3242
|
r(), t.textContent = "";
|
|
3242
3243
|
};
|
|
3243
3244
|
}
|
|
3244
|
-
function
|
|
3245
|
+
function Tu(e, t, n, s) {
|
|
3245
3246
|
let r;
|
|
3246
3247
|
const a = () => {
|
|
3247
3248
|
const o = document.createElement("template");
|
|
@@ -3249,32 +3250,32 @@ function Eu(e, t, n, s) {
|
|
|
3249
3250
|
}, i = () => (r || (r = a())).cloneNode(!0);
|
|
3250
3251
|
return i.cloneNode = i, i;
|
|
3251
3252
|
}
|
|
3252
|
-
function
|
|
3253
|
+
function Tl(e, t = window.document) {
|
|
3253
3254
|
const n = t[ut] || (t[ut] = /* @__PURE__ */ new Set());
|
|
3254
3255
|
for (let s = 0, r = e.length; s < r; s++) {
|
|
3255
3256
|
const a = e[s];
|
|
3256
|
-
n.has(a) || (n.add(a), t.addEventListener(a,
|
|
3257
|
+
n.has(a) || (n.add(a), t.addEventListener(a, lr));
|
|
3257
3258
|
}
|
|
3258
3259
|
}
|
|
3259
|
-
function
|
|
3260
|
+
function Su(e = window.document) {
|
|
3260
3261
|
if (e[ut]) {
|
|
3261
|
-
for (let t of e[ut].keys()) e.removeEventListener(t,
|
|
3262
|
+
for (let t of e[ut].keys()) e.removeEventListener(t, lr);
|
|
3262
3263
|
delete e[ut];
|
|
3263
3264
|
}
|
|
3264
3265
|
}
|
|
3265
3266
|
function Tn(e, t, n) {
|
|
3266
3267
|
Me(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
3267
3268
|
}
|
|
3268
|
-
function
|
|
3269
|
+
function Sl(e, t, n, s) {
|
|
3269
3270
|
Me(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
|
|
3270
3271
|
}
|
|
3271
|
-
function
|
|
3272
|
+
function _l(e, t, n) {
|
|
3272
3273
|
Me(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
3273
3274
|
}
|
|
3274
|
-
function
|
|
3275
|
+
function Pl(e, t) {
|
|
3275
3276
|
Me(e) || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
3276
3277
|
}
|
|
3277
|
-
function
|
|
3278
|
+
function wl(e, t, n, s) {
|
|
3278
3279
|
if (s)
|
|
3279
3280
|
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
3280
3281
|
else if (Array.isArray(n)) {
|
|
@@ -3282,7 +3283,7 @@ function Sl(e, t, n, s) {
|
|
|
3282
3283
|
e.addEventListener(t, n[0] = (a) => r.call(e, n[1], a));
|
|
3283
3284
|
} else e.addEventListener(t, n, typeof n != "function" && n);
|
|
3284
3285
|
}
|
|
3285
|
-
function
|
|
3286
|
+
function vl(e, t, n = {}) {
|
|
3286
3287
|
const s = Object.keys(t || {}), r = Object.keys(n);
|
|
3287
3288
|
let a, i;
|
|
3288
3289
|
for (a = 0, i = r.length; a < i; a++) {
|
|
@@ -3295,7 +3296,7 @@ function _l(e, t, n = {}) {
|
|
|
3295
3296
|
}
|
|
3296
3297
|
return n;
|
|
3297
3298
|
}
|
|
3298
|
-
function
|
|
3299
|
+
function bl(e, t, n) {
|
|
3299
3300
|
if (!t) return n ? Tn(e, "style") : t;
|
|
3300
3301
|
const s = e.style;
|
|
3301
3302
|
if (typeof t == "string") return s.cssText = t;
|
|
@@ -3307,18 +3308,18 @@ function Pl(e, t, n) {
|
|
|
3307
3308
|
r = t[a], r !== n[a] && (s.setProperty(a, r), n[a] = r);
|
|
3308
3309
|
return n;
|
|
3309
3310
|
}
|
|
3310
|
-
function
|
|
3311
|
+
function Il(e, t = {}, n, s) {
|
|
3311
3312
|
const r = {};
|
|
3312
|
-
return s ||
|
|
3313
|
+
return s || xe(() => r.children = mt(e, t.children, r.children)), xe(() => typeof t.ref == "function" && Nl(t.ref, e)), xe(() => Cl(e, t, n, !0, r, !0)), r;
|
|
3313
3314
|
}
|
|
3314
|
-
function
|
|
3315
|
+
function Nl(e, t, n) {
|
|
3315
3316
|
return Z(() => e(t, n));
|
|
3316
3317
|
}
|
|
3317
3318
|
function Sn(e, t, n, s) {
|
|
3318
|
-
if (n !== void 0 && !s && (s = []), typeof t != "function") return
|
|
3319
|
-
|
|
3319
|
+
if (n !== void 0 && !s && (s = []), typeof t != "function") return mt(e, t, s, n);
|
|
3320
|
+
xe((r) => mt(e, t(), r, n), s);
|
|
3320
3321
|
}
|
|
3321
|
-
function
|
|
3322
|
+
function Cl(e, t, n, s, r = {}, a = !1) {
|
|
3322
3323
|
t || (t = {});
|
|
3323
3324
|
for (const i in r)
|
|
3324
3325
|
if (!(i in t)) {
|
|
@@ -3332,14 +3333,14 @@ function bl(e, t, n, s, r = {}, a = !1) {
|
|
|
3332
3333
|
r[i] = ls(e, i, o, r[i], n, a, t);
|
|
3333
3334
|
}
|
|
3334
3335
|
}
|
|
3335
|
-
function
|
|
3336
|
+
function Ll(e) {
|
|
3336
3337
|
let t, n;
|
|
3337
|
-
return !Me() || !(t = P.registry.get(n =
|
|
3338
|
+
return !Me() || !(t = P.registry.get(n = Dl())) ? e() : (P.completed && P.completed.add(t), P.registry.delete(n), t);
|
|
3338
3339
|
}
|
|
3339
3340
|
function Me(e) {
|
|
3340
3341
|
return !!P.context && !P.done && (!e || e.isConnected);
|
|
3341
3342
|
}
|
|
3342
|
-
function
|
|
3343
|
+
function kl(e) {
|
|
3343
3344
|
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
3344
3345
|
}
|
|
3345
3346
|
function os(e, t, n) {
|
|
@@ -3348,8 +3349,8 @@ function os(e, t, n) {
|
|
|
3348
3349
|
}
|
|
3349
3350
|
function ls(e, t, n, s, r, a, i) {
|
|
3350
3351
|
let o, l, u, f, d;
|
|
3351
|
-
if (t === "style") return
|
|
3352
|
-
if (t === "classList") return
|
|
3352
|
+
if (t === "style") return bl(e, n, s);
|
|
3353
|
+
if (t === "classList") return vl(e, n, s);
|
|
3353
3354
|
if (n === s) return s;
|
|
3354
3355
|
if (t === "ref")
|
|
3355
3356
|
a || n(e);
|
|
@@ -3360,28 +3361,28 @@ function ls(e, t, n, s, r, a, i) {
|
|
|
3360
3361
|
const h = t.slice(10);
|
|
3361
3362
|
s && e.removeEventListener(h, s, !0), n && e.addEventListener(h, n, !0);
|
|
3362
3363
|
} else if (t.slice(0, 2) === "on") {
|
|
3363
|
-
const h = t.slice(2).toLowerCase(),
|
|
3364
|
-
if (!
|
|
3364
|
+
const h = t.slice(2).toLowerCase(), g = El.has(h);
|
|
3365
|
+
if (!g && s) {
|
|
3365
3366
|
const E = Array.isArray(s) ? s[0] : s;
|
|
3366
3367
|
e.removeEventListener(h, E);
|
|
3367
3368
|
}
|
|
3368
|
-
(
|
|
3369
|
+
(g || n) && (wl(e, h, n, g), g && Tl([h]));
|
|
3369
3370
|
} else if (t.slice(0, 5) === "attr:")
|
|
3370
3371
|
Tn(e, t.slice(5), n);
|
|
3371
3372
|
else if (t.slice(0, 5) === "bool:")
|
|
3372
|
-
|
|
3373
|
-
else if ((d = t.slice(0, 5) === "prop:") || (u =
|
|
3373
|
+
_l(e, t.slice(5), n);
|
|
3374
|
+
else if ((d = t.slice(0, 5) === "prop:") || (u = fl.has(t)) || !r && ((f = ml(t, e.tagName)) || (l = dl.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
|
|
3374
3375
|
if (d)
|
|
3375
3376
|
t = t.slice(5), l = !0;
|
|
3376
3377
|
else if (Me(e)) return n;
|
|
3377
|
-
t === "class" || t === "className" ?
|
|
3378
|
+
t === "class" || t === "className" ? Pl(e, n) : o && !l && !u ? e[kl(t)] = n : e[f || t] = n;
|
|
3378
3379
|
} else {
|
|
3379
|
-
const h = r && t.indexOf(":") > -1 &&
|
|
3380
|
-
h ?
|
|
3380
|
+
const h = r && t.indexOf(":") > -1 && yl[t.split(":")[0]];
|
|
3381
|
+
h ? Sl(e, h, t, n) : Tn(e, hl[t] || t, n);
|
|
3381
3382
|
}
|
|
3382
3383
|
return n;
|
|
3383
3384
|
}
|
|
3384
|
-
function
|
|
3385
|
+
function lr(e) {
|
|
3385
3386
|
if (P.registry && P.events && P.events.find(([l, u]) => u === e))
|
|
3386
3387
|
return;
|
|
3387
3388
|
let t = e.target;
|
|
@@ -3417,7 +3418,7 @@ function or(e) {
|
|
|
3417
3418
|
} else o();
|
|
3418
3419
|
a(s);
|
|
3419
3420
|
}
|
|
3420
|
-
function
|
|
3421
|
+
function mt(e, t, n, s, r) {
|
|
3421
3422
|
const a = Me(e);
|
|
3422
3423
|
if (a) {
|
|
3423
3424
|
!n && (n = [...e.childNodes]);
|
|
@@ -3444,15 +3445,15 @@ function gt(e, t, n, s, r) {
|
|
|
3444
3445
|
n = Fe(e, n, s);
|
|
3445
3446
|
} else {
|
|
3446
3447
|
if (i === "function")
|
|
3447
|
-
return
|
|
3448
|
+
return xe(() => {
|
|
3448
3449
|
let l = t();
|
|
3449
3450
|
for (; typeof l == "function"; ) l = l();
|
|
3450
|
-
n =
|
|
3451
|
+
n = mt(e, l, n, s);
|
|
3451
3452
|
}), () => n;
|
|
3452
3453
|
if (Array.isArray(t)) {
|
|
3453
3454
|
const l = [], u = n && Array.isArray(n);
|
|
3454
3455
|
if (_n(l, t, n, r))
|
|
3455
|
-
return
|
|
3456
|
+
return xe(() => n = mt(e, l, n, s, !0)), () => n;
|
|
3456
3457
|
if (a) {
|
|
3457
3458
|
if (!l.length) return n;
|
|
3458
3459
|
if (s === void 0) return n = [...e.childNodes];
|
|
@@ -3464,7 +3465,7 @@ function gt(e, t, n, s, r) {
|
|
|
3464
3465
|
}
|
|
3465
3466
|
if (l.length === 0) {
|
|
3466
3467
|
if (n = Fe(e, n, s), o) return n;
|
|
3467
|
-
} else u ? n.length === 0 ? cs(e, l, s) :
|
|
3468
|
+
} else u ? n.length === 0 ? cs(e, l, s) : Al(e, n, l) : (n && Fe(e), cs(e, l));
|
|
3468
3469
|
n = l;
|
|
3469
3470
|
} else if (t.nodeType) {
|
|
3470
3471
|
if (a && t.parentNode) return n = o ? [t] : t;
|
|
@@ -3516,26 +3517,26 @@ function Fe(e, t, n, s) {
|
|
|
3516
3517
|
} else e.insertBefore(r, n);
|
|
3517
3518
|
return [r];
|
|
3518
3519
|
}
|
|
3519
|
-
function
|
|
3520
|
+
function Dl() {
|
|
3520
3521
|
return P.getNextContextId();
|
|
3521
3522
|
}
|
|
3522
|
-
var
|
|
3523
|
-
function
|
|
3524
|
-
return t ? document.createElementNS(
|
|
3523
|
+
var Gl = "http://www.w3.org/2000/svg";
|
|
3524
|
+
function cr(e, t = !1) {
|
|
3525
|
+
return t ? document.createElementNS(Gl, e) : document.createElement(e);
|
|
3525
3526
|
}
|
|
3526
|
-
function
|
|
3527
|
+
function _u(e) {
|
|
3527
3528
|
const {
|
|
3528
3529
|
useShadow: t
|
|
3529
3530
|
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = is();
|
|
3530
3531
|
let a, i = !!P.context;
|
|
3531
|
-
return
|
|
3532
|
-
i && (is().user = i = !1), a || (a =
|
|
3532
|
+
return Ys(() => {
|
|
3533
|
+
i && (is().user = i = !1), a || (a = Js(r, () => J(() => e.children)));
|
|
3533
3534
|
const o = s();
|
|
3534
3535
|
if (o instanceof HTMLHeadElement) {
|
|
3535
3536
|
const [l, u] = F(!1), f = () => u(!0);
|
|
3536
|
-
|
|
3537
|
+
Ge((d) => Sn(o, () => l() ? d() : a(), null)), ht(f);
|
|
3537
3538
|
} else {
|
|
3538
|
-
const l =
|
|
3539
|
+
const l = cr(e.isSVG ? "g" : "div", e.isSVG), u = t && l.attachShadow ? l.attachShadow({
|
|
3539
3540
|
mode: "open"
|
|
3540
3541
|
}) : l;
|
|
3541
3542
|
Object.defineProperty(l, "_$host", {
|
|
@@ -3543,13 +3544,13 @@ function yu(e) {
|
|
|
3543
3544
|
return n.parentNode;
|
|
3544
3545
|
},
|
|
3545
3546
|
configurable: !0
|
|
3546
|
-
}), Sn(u, a), o.appendChild(l), e.ref && e.ref(l),
|
|
3547
|
+
}), Sn(u, a), o.appendChild(l), e.ref && e.ref(l), ht(() => o.removeChild(l));
|
|
3547
3548
|
}
|
|
3548
3549
|
}, void 0, {
|
|
3549
3550
|
render: !i
|
|
3550
3551
|
}), n;
|
|
3551
3552
|
}
|
|
3552
|
-
function
|
|
3553
|
+
function xl(e, t) {
|
|
3553
3554
|
const n = J(e);
|
|
3554
3555
|
return J(() => {
|
|
3555
3556
|
const s = n();
|
|
@@ -3557,16 +3558,16 @@ function kl(e, t) {
|
|
|
3557
3558
|
case "function":
|
|
3558
3559
|
return Z(() => s(t));
|
|
3559
3560
|
case "string":
|
|
3560
|
-
const r =
|
|
3561
|
-
return
|
|
3561
|
+
const r = pl.has(s), a = P.context ? Ll() : cr(s, r);
|
|
3562
|
+
return Il(a, t, r), a;
|
|
3562
3563
|
}
|
|
3563
3564
|
});
|
|
3564
3565
|
}
|
|
3565
|
-
function
|
|
3566
|
-
const [, t] =
|
|
3567
|
-
return
|
|
3566
|
+
function Pu(e) {
|
|
3567
|
+
const [, t] = ll(e, ["component"]);
|
|
3568
|
+
return xl(() => e.component, t);
|
|
3568
3569
|
}
|
|
3569
|
-
var
|
|
3570
|
+
var Ol = class {
|
|
3570
3571
|
constructor() {
|
|
3571
3572
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
3572
3573
|
}
|
|
@@ -3582,9 +3583,9 @@ var Dl = class {
|
|
|
3582
3583
|
clear() {
|
|
3583
3584
|
this.keyToValue.clear(), this.valueToKey.clear();
|
|
3584
3585
|
}
|
|
3585
|
-
},
|
|
3586
|
+
}, ur = class {
|
|
3586
3587
|
constructor(e) {
|
|
3587
|
-
this.generateIdentifier = e, this.kv = new
|
|
3588
|
+
this.generateIdentifier = e, this.kv = new Ol();
|
|
3588
3589
|
}
|
|
3589
3590
|
register(e, t) {
|
|
3590
3591
|
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
@@ -3598,7 +3599,7 @@ var Dl = class {
|
|
|
3598
3599
|
getValue(e) {
|
|
3599
3600
|
return this.kv.getByKey(e);
|
|
3600
3601
|
}
|
|
3601
|
-
},
|
|
3602
|
+
}, Rl = class extends ur {
|
|
3602
3603
|
constructor() {
|
|
3603
3604
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
3604
3605
|
}
|
|
@@ -3609,7 +3610,7 @@ var Dl = class {
|
|
|
3609
3610
|
return this.classToAllowedProps.get(e);
|
|
3610
3611
|
}
|
|
3611
3612
|
};
|
|
3612
|
-
function
|
|
3613
|
+
function Ul(e) {
|
|
3613
3614
|
if ("values" in Object)
|
|
3614
3615
|
return Object.values(e);
|
|
3615
3616
|
const t = [];
|
|
@@ -3617,8 +3618,8 @@ function Gl(e) {
|
|
|
3617
3618
|
e.hasOwnProperty(n) && t.push(e[n]);
|
|
3618
3619
|
return t;
|
|
3619
3620
|
}
|
|
3620
|
-
function
|
|
3621
|
-
const n =
|
|
3621
|
+
function Bl(e, t) {
|
|
3622
|
+
const n = Ul(e);
|
|
3622
3623
|
if ("find" in n)
|
|
3623
3624
|
return n.find(t);
|
|
3624
3625
|
const s = n;
|
|
@@ -3631,7 +3632,7 @@ function Ol(e, t) {
|
|
|
3631
3632
|
function rt(e, t) {
|
|
3632
3633
|
Object.entries(e).forEach(([n, s]) => t(s, n));
|
|
3633
3634
|
}
|
|
3634
|
-
function
|
|
3635
|
+
function qt(e, t) {
|
|
3635
3636
|
return e.indexOf(t) !== -1;
|
|
3636
3637
|
}
|
|
3637
3638
|
function us(e, t) {
|
|
@@ -3641,7 +3642,7 @@ function us(e, t) {
|
|
|
3641
3642
|
return s;
|
|
3642
3643
|
}
|
|
3643
3644
|
}
|
|
3644
|
-
var
|
|
3645
|
+
var Ml = class {
|
|
3645
3646
|
constructor() {
|
|
3646
3647
|
this.transfomers = {};
|
|
3647
3648
|
}
|
|
@@ -3649,12 +3650,12 @@ var Rl = class {
|
|
|
3649
3650
|
this.transfomers[e.name] = e;
|
|
3650
3651
|
}
|
|
3651
3652
|
findApplicable(e) {
|
|
3652
|
-
return
|
|
3653
|
+
return Bl(this.transfomers, (t) => t.isApplicable(e));
|
|
3653
3654
|
}
|
|
3654
3655
|
findByName(e) {
|
|
3655
3656
|
return this.transfomers[e];
|
|
3656
3657
|
}
|
|
3657
|
-
},
|
|
3658
|
+
}, Fl = (e) => Object.prototype.toString.call(e).slice(8, -1), dr = (e) => typeof e > "u", ql = (e) => e === null, Et = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Pn = (e) => Et(e) && Object.keys(e).length === 0, be = (e) => Array.isArray(e), Kl = (e) => typeof e == "string", Vl = (e) => typeof e == "number" && !isNaN(e), Hl = (e) => typeof e == "boolean", $l = (e) => e instanceof RegExp, pt = (e) => e instanceof Map, yt = (e) => e instanceof Set, fr = (e) => Fl(e) === "Symbol", Ql = (e) => e instanceof Date && !isNaN(e.valueOf()), jl = (e) => e instanceof Error, ds = (e) => typeof e == "number" && isNaN(e), zl = (e) => Hl(e) || ql(e) || dr(e) || Vl(e) || Kl(e) || fr(e), Wl = (e) => typeof e == "bigint", Yl = (e) => e === 1 / 0 || e === -1 / 0, Jl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Xl = (e) => e instanceof URL, hr = (e) => e.replace(/\./g, "\\."), gn = (e) => e.map(String).map(hr).join("."), dt = (e) => {
|
|
3658
3659
|
const t = [];
|
|
3659
3660
|
let n = "";
|
|
3660
3661
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -3680,12 +3681,12 @@ function ge(e, t, n, s) {
|
|
|
3680
3681
|
untransform: s
|
|
3681
3682
|
};
|
|
3682
3683
|
}
|
|
3683
|
-
var
|
|
3684
|
-
ge(
|
|
3684
|
+
var gr = [
|
|
3685
|
+
ge(dr, "undefined", () => null, () => {
|
|
3685
3686
|
}),
|
|
3686
|
-
ge(
|
|
3687
|
-
ge(
|
|
3688
|
-
ge(
|
|
3687
|
+
ge(Wl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
3688
|
+
ge(Ql, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
3689
|
+
ge(jl, "Error", (e, t) => {
|
|
3689
3690
|
const n = {
|
|
3690
3691
|
name: e.name,
|
|
3691
3692
|
message: e.message
|
|
@@ -3699,22 +3700,22 @@ var hr = [
|
|
|
3699
3700
|
n[s] = e[s];
|
|
3700
3701
|
}), n;
|
|
3701
3702
|
}),
|
|
3702
|
-
ge(
|
|
3703
|
+
ge($l, "regexp", (e) => "" + e, (e) => {
|
|
3703
3704
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
3704
3705
|
return new RegExp(t, n);
|
|
3705
3706
|
}),
|
|
3706
3707
|
ge(
|
|
3707
|
-
|
|
3708
|
+
yt,
|
|
3708
3709
|
"set",
|
|
3709
3710
|
// (sets only exist in es6+)
|
|
3710
3711
|
// eslint-disable-next-line es5/no-es6-methods
|
|
3711
3712
|
(e) => [...e.values()],
|
|
3712
3713
|
(e) => new Set(e)
|
|
3713
3714
|
),
|
|
3714
|
-
ge(
|
|
3715
|
-
ge((e) => ds(e) ||
|
|
3715
|
+
ge(pt, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
3716
|
+
ge((e) => ds(e) || Yl(e), "number", (e) => ds(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
3716
3717
|
ge((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
3717
|
-
ge(
|
|
3718
|
+
ge(Xl, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
3718
3719
|
];
|
|
3719
3720
|
function sn(e, t, n, s) {
|
|
3720
3721
|
return {
|
|
@@ -3724,12 +3725,12 @@ function sn(e, t, n, s) {
|
|
|
3724
3725
|
untransform: s
|
|
3725
3726
|
};
|
|
3726
3727
|
}
|
|
3727
|
-
var
|
|
3728
|
+
var mr = sn((e, t) => fr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
|
|
3728
3729
|
const s = n.symbolRegistry.getValue(t[1]);
|
|
3729
3730
|
if (!s)
|
|
3730
3731
|
throw new Error("Trying to deserialize unknown symbol");
|
|
3731
3732
|
return s;
|
|
3732
|
-
}),
|
|
3733
|
+
}), Zl = [
|
|
3733
3734
|
Int8Array,
|
|
3734
3735
|
Uint8Array,
|
|
3735
3736
|
Int16Array,
|
|
@@ -3739,16 +3740,16 @@ var gr = sn((e, t) => dr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
3739
3740
|
Float32Array,
|
|
3740
3741
|
Float64Array,
|
|
3741
3742
|
Uint8ClampedArray
|
|
3742
|
-
].reduce((e, t) => (e[t.name] = t, e), {}),
|
|
3743
|
-
const n =
|
|
3743
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), Er = sn(Jl, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
3744
|
+
const n = Zl[t[1]];
|
|
3744
3745
|
if (!n)
|
|
3745
3746
|
throw new Error("Trying to deserialize unknown typed array");
|
|
3746
3747
|
return new n(e);
|
|
3747
3748
|
});
|
|
3748
|
-
function
|
|
3749
|
+
function pr(e, t) {
|
|
3749
3750
|
return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
|
|
3750
3751
|
}
|
|
3751
|
-
var
|
|
3752
|
+
var yr = sn(pr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
|
|
3752
3753
|
const n = t.classRegistry.getAllowedProps(e.constructor);
|
|
3753
3754
|
if (!n)
|
|
3754
3755
|
return { ...e };
|
|
@@ -3761,44 +3762,44 @@ var pr = sn(Er, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
3761
3762
|
if (!s)
|
|
3762
3763
|
throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
|
|
3763
3764
|
return Object.assign(Object.create(s.prototype), e);
|
|
3764
|
-
}),
|
|
3765
|
+
}), Ar = sn((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
|
|
3765
3766
|
const s = n.customTransformerRegistry.findByName(t[1]);
|
|
3766
3767
|
if (!s)
|
|
3767
3768
|
throw new Error("Trying to deserialize unknown custom value");
|
|
3768
3769
|
return s.deserialize(e);
|
|
3769
|
-
}),
|
|
3770
|
-
const n = us(
|
|
3770
|
+
}), ec = [yr, mr, Ar, Er], fs = (e, t) => {
|
|
3771
|
+
const n = us(ec, (r) => r.isApplicable(e, t));
|
|
3771
3772
|
if (n)
|
|
3772
3773
|
return {
|
|
3773
3774
|
value: n.transform(e, t),
|
|
3774
3775
|
type: n.annotation(e, t)
|
|
3775
3776
|
};
|
|
3776
|
-
const s = us(
|
|
3777
|
+
const s = us(gr, (r) => r.isApplicable(e, t));
|
|
3777
3778
|
if (s)
|
|
3778
3779
|
return {
|
|
3779
3780
|
value: s.transform(e, t),
|
|
3780
3781
|
type: s.annotation
|
|
3781
3782
|
};
|
|
3782
|
-
},
|
|
3783
|
-
|
|
3784
|
-
|
|
3783
|
+
}, Tr = {};
|
|
3784
|
+
gr.forEach((e) => {
|
|
3785
|
+
Tr[e.annotation] = e;
|
|
3785
3786
|
});
|
|
3786
|
-
var
|
|
3787
|
+
var tc = (e, t, n) => {
|
|
3787
3788
|
if (be(t))
|
|
3788
3789
|
switch (t[0]) {
|
|
3789
3790
|
case "symbol":
|
|
3790
|
-
return
|
|
3791
|
+
return mr.untransform(e, t, n);
|
|
3791
3792
|
case "class":
|
|
3792
|
-
return pr.untransform(e, t, n);
|
|
3793
|
-
case "custom":
|
|
3794
3793
|
return yr.untransform(e, t, n);
|
|
3794
|
+
case "custom":
|
|
3795
|
+
return Ar.untransform(e, t, n);
|
|
3795
3796
|
case "typed-array":
|
|
3796
|
-
return
|
|
3797
|
+
return Er.untransform(e, t, n);
|
|
3797
3798
|
default:
|
|
3798
3799
|
throw new Error("Unknown transformation: " + t);
|
|
3799
3800
|
}
|
|
3800
3801
|
else {
|
|
3801
|
-
const s =
|
|
3802
|
+
const s = Tr[t];
|
|
3802
3803
|
if (!s)
|
|
3803
3804
|
throw new Error("Unknown transformation: " + t);
|
|
3804
3805
|
return s.untransform(e, n);
|
|
@@ -3811,21 +3812,21 @@ var Xl = (e, t, n) => {
|
|
|
3811
3812
|
n.next(), t--;
|
|
3812
3813
|
return n.next().value;
|
|
3813
3814
|
};
|
|
3814
|
-
function
|
|
3815
|
-
if (
|
|
3815
|
+
function Sr(e) {
|
|
3816
|
+
if (qt(e, "__proto__"))
|
|
3816
3817
|
throw new Error("__proto__ is not allowed as a property");
|
|
3817
|
-
if (
|
|
3818
|
+
if (qt(e, "prototype"))
|
|
3818
3819
|
throw new Error("prototype is not allowed as a property");
|
|
3819
|
-
if (
|
|
3820
|
+
if (qt(e, "constructor"))
|
|
3820
3821
|
throw new Error("constructor is not allowed as a property");
|
|
3821
3822
|
}
|
|
3822
|
-
var
|
|
3823
|
-
|
|
3823
|
+
var nc = (e, t) => {
|
|
3824
|
+
Sr(t);
|
|
3824
3825
|
for (let n = 0; n < t.length; n++) {
|
|
3825
3826
|
const s = t[n];
|
|
3826
|
-
if (
|
|
3827
|
+
if (yt(e))
|
|
3827
3828
|
e = Ke(e, +s);
|
|
3828
|
-
else if (
|
|
3829
|
+
else if (pt(e)) {
|
|
3829
3830
|
const r = +s, a = +t[++n] == 0 ? "key" : "value", i = Ke(e, r);
|
|
3830
3831
|
switch (a) {
|
|
3831
3832
|
case "key":
|
|
@@ -3840,7 +3841,7 @@ var Zl = (e, t) => {
|
|
|
3840
3841
|
}
|
|
3841
3842
|
return e;
|
|
3842
3843
|
}, wn = (e, t, n) => {
|
|
3843
|
-
if (
|
|
3844
|
+
if (Sr(t), t.length === 0)
|
|
3844
3845
|
return n(e);
|
|
3845
3846
|
let s = e;
|
|
3846
3847
|
for (let a = 0; a < t.length - 1; a++) {
|
|
@@ -3848,12 +3849,12 @@ var Zl = (e, t) => {
|
|
|
3848
3849
|
if (be(s)) {
|
|
3849
3850
|
const o = +i;
|
|
3850
3851
|
s = s[o];
|
|
3851
|
-
} else if (
|
|
3852
|
+
} else if (Et(s))
|
|
3852
3853
|
s = s[i];
|
|
3853
|
-
else if (
|
|
3854
|
+
else if (yt(s)) {
|
|
3854
3855
|
const o = +i;
|
|
3855
3856
|
s = Ke(s, o);
|
|
3856
|
-
} else if (
|
|
3857
|
+
} else if (pt(s)) {
|
|
3857
3858
|
if (a === t.length - 2)
|
|
3858
3859
|
break;
|
|
3859
3860
|
const l = +i, u = +t[++a] == 0 ? "key" : "value", f = Ke(s, l);
|
|
@@ -3868,11 +3869,11 @@ var Zl = (e, t) => {
|
|
|
3868
3869
|
}
|
|
3869
3870
|
}
|
|
3870
3871
|
const r = t[t.length - 1];
|
|
3871
|
-
if (be(s) ? s[+r] = n(s[+r]) :
|
|
3872
|
+
if (be(s) ? s[+r] = n(s[+r]) : Et(s) && (s[r] = n(s[r])), yt(s)) {
|
|
3872
3873
|
const a = Ke(s, +r), i = n(a);
|
|
3873
3874
|
a !== i && (s.delete(a), s.add(i));
|
|
3874
3875
|
}
|
|
3875
|
-
if (
|
|
3876
|
+
if (pt(s)) {
|
|
3876
3877
|
const a = +t[t.length - 2], i = Ke(s, a);
|
|
3877
3878
|
switch (+r == 0 ? "key" : "value") {
|
|
3878
3879
|
case "key": {
|
|
@@ -3900,14 +3901,14 @@ function vn(e, t, n = []) {
|
|
|
3900
3901
|
vn(a, t, [...n, ...dt(i)]);
|
|
3901
3902
|
}), t(s, n);
|
|
3902
3903
|
}
|
|
3903
|
-
function
|
|
3904
|
+
function sc(e, t, n) {
|
|
3904
3905
|
return vn(t, (s, r) => {
|
|
3905
|
-
e = wn(e, r, (a) =>
|
|
3906
|
+
e = wn(e, r, (a) => tc(a, s, n));
|
|
3906
3907
|
}), e;
|
|
3907
3908
|
}
|
|
3908
|
-
function
|
|
3909
|
+
function rc(e, t) {
|
|
3909
3910
|
function n(s, r) {
|
|
3910
|
-
const a =
|
|
3911
|
+
const a = nc(e, dt(r));
|
|
3911
3912
|
s.map(dt).forEach((i) => {
|
|
3912
3913
|
e = wn(e, i, () => a);
|
|
3913
3914
|
});
|
|
@@ -3921,12 +3922,12 @@ function tc(e, t) {
|
|
|
3921
3922
|
rt(t, n);
|
|
3922
3923
|
return e;
|
|
3923
3924
|
}
|
|
3924
|
-
var
|
|
3925
|
-
function
|
|
3925
|
+
var ac = (e, t) => Et(e) || be(e) || pt(e) || yt(e) || pr(e, t);
|
|
3926
|
+
function ic(e, t, n) {
|
|
3926
3927
|
const s = n.get(e);
|
|
3927
3928
|
s ? s.push(t) : n.set(e, [t]);
|
|
3928
3929
|
}
|
|
3929
|
-
function
|
|
3930
|
+
function oc(e, t) {
|
|
3930
3931
|
const n = {};
|
|
3931
3932
|
let s;
|
|
3932
3933
|
return e.forEach((r) => {
|
|
@@ -3937,36 +3938,36 @@ function rc(e, t) {
|
|
|
3937
3938
|
a.length === 0 ? s = i.map(gn) : n[gn(a)] = i.map(gn);
|
|
3938
3939
|
}), s ? Pn(n) ? [s] : [s, n] : Pn(n) ? void 0 : n;
|
|
3939
3940
|
}
|
|
3940
|
-
var
|
|
3941
|
-
const o =
|
|
3941
|
+
var _r = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
3942
|
+
const o = zl(e);
|
|
3942
3943
|
if (!o) {
|
|
3943
|
-
|
|
3944
|
-
const
|
|
3945
|
-
if (
|
|
3944
|
+
ic(e, r, t);
|
|
3945
|
+
const g = i.get(e);
|
|
3946
|
+
if (g)
|
|
3946
3947
|
return s ? {
|
|
3947
3948
|
transformedValue: null
|
|
3948
|
-
} :
|
|
3949
|
+
} : g;
|
|
3949
3950
|
}
|
|
3950
|
-
if (!
|
|
3951
|
-
const
|
|
3952
|
-
transformedValue:
|
|
3953
|
-
annotations: [
|
|
3951
|
+
if (!ac(e, n)) {
|
|
3952
|
+
const g = fs(e, n), E = g ? {
|
|
3953
|
+
transformedValue: g.value,
|
|
3954
|
+
annotations: [g.type]
|
|
3954
3955
|
} : {
|
|
3955
3956
|
transformedValue: e
|
|
3956
3957
|
};
|
|
3957
3958
|
return o || i.set(e, E), E;
|
|
3958
3959
|
}
|
|
3959
|
-
if (
|
|
3960
|
+
if (qt(a, e))
|
|
3960
3961
|
return {
|
|
3961
3962
|
transformedValue: null
|
|
3962
3963
|
};
|
|
3963
3964
|
const l = fs(e, n), u = (l == null ? void 0 : l.value) ?? e, f = be(u) ? [] : {}, d = {};
|
|
3964
|
-
rt(u, (
|
|
3965
|
+
rt(u, (g, E) => {
|
|
3965
3966
|
if (E === "__proto__" || E === "constructor" || E === "prototype")
|
|
3966
3967
|
throw new Error(`Detected property ${E}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3967
|
-
const S =
|
|
3968
|
-
f[E] = S.transformedValue, be(S.annotations) ? d[E] = S.annotations :
|
|
3969
|
-
d[
|
|
3968
|
+
const S = _r(g, t, n, s, [...r, E], [...a, e], i);
|
|
3969
|
+
f[E] = S.transformedValue, be(S.annotations) ? d[E] = S.annotations : Et(S.annotations) && rt(S.annotations, (T, p) => {
|
|
3970
|
+
d[hr(E) + "." + p] = T;
|
|
3970
3971
|
});
|
|
3971
3972
|
});
|
|
3972
3973
|
const h = Pn(d) ? {
|
|
@@ -3978,19 +3979,19 @@ var Sr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3978
3979
|
};
|
|
3979
3980
|
return o || i.set(e, h), h;
|
|
3980
3981
|
};
|
|
3981
|
-
function
|
|
3982
|
+
function Pr(e) {
|
|
3982
3983
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
3983
3984
|
}
|
|
3984
3985
|
function hs(e) {
|
|
3985
|
-
return
|
|
3986
|
+
return Pr(e) === "Array";
|
|
3986
3987
|
}
|
|
3987
|
-
function
|
|
3988
|
-
if (
|
|
3988
|
+
function lc(e) {
|
|
3989
|
+
if (Pr(e) !== "Object")
|
|
3989
3990
|
return !1;
|
|
3990
3991
|
const t = Object.getPrototypeOf(e);
|
|
3991
3992
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
3992
3993
|
}
|
|
3993
|
-
function
|
|
3994
|
+
function cc(e, t, n, s, r) {
|
|
3994
3995
|
const a = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
|
|
3995
3996
|
a === "enumerable" && (e[t] = n), r && a === "nonenumerable" && Object.defineProperty(e, t, {
|
|
3996
3997
|
value: n,
|
|
@@ -4002,14 +4003,14 @@ function ic(e, t, n, s, r) {
|
|
|
4002
4003
|
function bn(e, t = {}) {
|
|
4003
4004
|
if (hs(e))
|
|
4004
4005
|
return e.map((r) => bn(r, t));
|
|
4005
|
-
if (!
|
|
4006
|
+
if (!lc(e))
|
|
4006
4007
|
return e;
|
|
4007
4008
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
4008
4009
|
return [...n, ...s].reduce((r, a) => {
|
|
4009
4010
|
if (hs(t.props) && !t.props.includes(a))
|
|
4010
4011
|
return r;
|
|
4011
4012
|
const i = e[a], o = bn(i, t);
|
|
4012
|
-
return
|
|
4013
|
+
return cc(r, a, o, e, t.nonenumerable), r;
|
|
4013
4014
|
}, {});
|
|
4014
4015
|
}
|
|
4015
4016
|
var O = class {
|
|
@@ -4017,17 +4018,17 @@ var O = class {
|
|
|
4017
4018
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
4018
4019
|
*/
|
|
4019
4020
|
constructor({ dedupe: e = !1 } = {}) {
|
|
4020
|
-
this.classRegistry = new
|
|
4021
|
+
this.classRegistry = new Rl(), this.symbolRegistry = new ur((t) => t.description ?? ""), this.customTransformerRegistry = new Ml(), this.allowedErrorProps = [], this.dedupe = e;
|
|
4021
4022
|
}
|
|
4022
4023
|
serialize(e) {
|
|
4023
|
-
const t = /* @__PURE__ */ new Map(), n =
|
|
4024
|
+
const t = /* @__PURE__ */ new Map(), n = _r(e, t, this, this.dedupe), s = {
|
|
4024
4025
|
json: n.transformedValue
|
|
4025
4026
|
};
|
|
4026
4027
|
n.annotations && (s.meta = {
|
|
4027
4028
|
...s.meta,
|
|
4028
4029
|
values: n.annotations
|
|
4029
4030
|
});
|
|
4030
|
-
const r =
|
|
4031
|
+
const r = oc(t, this.dedupe);
|
|
4031
4032
|
return r && (s.meta = {
|
|
4032
4033
|
...s.meta,
|
|
4033
4034
|
referentialEqualities: r
|
|
@@ -4036,7 +4037,7 @@ var O = class {
|
|
|
4036
4037
|
deserialize(e) {
|
|
4037
4038
|
const { json: t, meta: n } = e;
|
|
4038
4039
|
let s = bn(t);
|
|
4039
|
-
return n != null && n.values && (s =
|
|
4040
|
+
return n != null && n.values && (s = sc(s, n.values, this)), n != null && n.referentialEqualities && (s = rc(s, n.referentialEqualities)), s;
|
|
4040
4041
|
}
|
|
4041
4042
|
stringify(e) {
|
|
4042
4043
|
return JSON.stringify(this.serialize(e));
|
|
@@ -4069,52 +4070,52 @@ O.registerClass = O.defaultInstance.registerClass.bind(O.defaultInstance);
|
|
|
4069
4070
|
O.registerSymbol = O.defaultInstance.registerSymbol.bind(O.defaultInstance);
|
|
4070
4071
|
O.registerCustom = O.defaultInstance.registerCustom.bind(O.defaultInstance);
|
|
4071
4072
|
O.allowErrorProps = O.defaultInstance.allowErrorProps.bind(O.defaultInstance);
|
|
4072
|
-
var
|
|
4073
|
-
function
|
|
4073
|
+
var uc = O.serialize, wu = O.stringify;
|
|
4074
|
+
function vu(e) {
|
|
4074
4075
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
4075
4076
|
}
|
|
4076
|
-
function
|
|
4077
|
+
function bu(e, t) {
|
|
4077
4078
|
return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
4078
4079
|
}
|
|
4079
|
-
function
|
|
4080
|
+
function Iu({
|
|
4080
4081
|
queryState: e,
|
|
4081
4082
|
observerCount: t,
|
|
4082
4083
|
isStale: n
|
|
4083
4084
|
}) {
|
|
4084
4085
|
return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
|
|
4085
4086
|
}
|
|
4086
|
-
function
|
|
4087
|
+
function Nu({
|
|
4087
4088
|
status: e,
|
|
4088
4089
|
isPaused: t
|
|
4089
4090
|
}) {
|
|
4090
4091
|
return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
|
|
4091
4092
|
}
|
|
4092
|
-
function
|
|
4093
|
+
function Cu(e) {
|
|
4093
4094
|
return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
|
|
4094
4095
|
}
|
|
4095
|
-
var
|
|
4096
|
+
var Lu = (e, t = !1) => {
|
|
4096
4097
|
const {
|
|
4097
4098
|
json: n
|
|
4098
|
-
} =
|
|
4099
|
+
} = uc(e);
|
|
4099
4100
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
4100
|
-
},
|
|
4101
|
-
status:
|
|
4102
|
-
"query hash":
|
|
4103
|
-
"last updated": Pr
|
|
4104
|
-
}, Ot = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, wr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, uc = (e, t) => Ot(e) === Ot(t) ? wr(e, t) : Ot(e) > Ot(t) ? 1 : -1, Nu = {
|
|
4105
|
-
status: uc,
|
|
4101
|
+
}, Ot = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, dc = (e, t) => e.queryHash.localeCompare(t.queryHash), wr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, fc = (e, t) => Ot(e) === Ot(t) ? wr(e, t) : Ot(e) > Ot(t) ? 1 : -1, ku = {
|
|
4102
|
+
status: fc,
|
|
4103
|
+
"query hash": dc,
|
|
4106
4104
|
"last updated": wr
|
|
4107
|
-
},
|
|
4105
|
+
}, Rt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, vr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, hc = (e, t) => Rt(e) === Rt(t) ? vr(e, t) : Rt(e) > Rt(t) ? 1 : -1, Du = {
|
|
4106
|
+
status: hc,
|
|
4107
|
+
"last updated": vr
|
|
4108
|
+
}, Gu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), xu = () => {
|
|
4108
4109
|
const [e, t] = F("dark");
|
|
4109
|
-
return
|
|
4110
|
+
return Jo(() => {
|
|
4110
4111
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
4111
4112
|
t(n.matches ? "dark" : "light");
|
|
4112
4113
|
const s = (r) => {
|
|
4113
4114
|
t(r.matches ? "dark" : "light");
|
|
4114
4115
|
};
|
|
4115
|
-
n.addEventListener("change", s),
|
|
4116
|
+
n.addEventListener("change", s), ht(() => n.removeEventListener("change", s));
|
|
4116
4117
|
}), e;
|
|
4117
|
-
},
|
|
4118
|
+
}, Ut = (e, t, n) => {
|
|
4118
4119
|
if (t.length === 0)
|
|
4119
4120
|
return n;
|
|
4120
4121
|
if (e instanceof Map) {
|
|
@@ -4122,10 +4123,10 @@ var bu = (e, t = !1) => {
|
|
|
4122
4123
|
if (t.length === 1)
|
|
4123
4124
|
return s.set(t[0], n), s;
|
|
4124
4125
|
const [r, ...a] = t;
|
|
4125
|
-
return s.set(r,
|
|
4126
|
+
return s.set(r, Ut(s.get(r), a, n)), s;
|
|
4126
4127
|
}
|
|
4127
4128
|
if (e instanceof Set) {
|
|
4128
|
-
const s =
|
|
4129
|
+
const s = Ut(Array.from(e), t, n);
|
|
4129
4130
|
return new Set(s);
|
|
4130
4131
|
}
|
|
4131
4132
|
if (Array.isArray(e)) {
|
|
@@ -4133,7 +4134,7 @@ var bu = (e, t = !1) => {
|
|
|
4133
4134
|
if (t.length === 1)
|
|
4134
4135
|
return s[t[0]] = n, s;
|
|
4135
4136
|
const [r, ...a] = t;
|
|
4136
|
-
return s[r] =
|
|
4137
|
+
return s[r] = Ut(s[r], a, n), s;
|
|
4137
4138
|
}
|
|
4138
4139
|
if (e instanceof Object) {
|
|
4139
4140
|
const s = {
|
|
@@ -4142,19 +4143,19 @@ var bu = (e, t = !1) => {
|
|
|
4142
4143
|
if (t.length === 1)
|
|
4143
4144
|
return s[t[0]] = n, s;
|
|
4144
4145
|
const [r, ...a] = t;
|
|
4145
|
-
return s[r] =
|
|
4146
|
+
return s[r] = Ut(s[r], a, n), s;
|
|
4146
4147
|
}
|
|
4147
4148
|
return e;
|
|
4148
|
-
},
|
|
4149
|
+
}, Bt = (e, t) => {
|
|
4149
4150
|
if (e instanceof Map) {
|
|
4150
4151
|
const n = new Map(e);
|
|
4151
4152
|
if (t.length === 1)
|
|
4152
4153
|
return n.delete(t[0]), n;
|
|
4153
4154
|
const [s, ...r] = t;
|
|
4154
|
-
return n.set(s,
|
|
4155
|
+
return n.set(s, Bt(n.get(s), r)), n;
|
|
4155
4156
|
}
|
|
4156
4157
|
if (e instanceof Set) {
|
|
4157
|
-
const n =
|
|
4158
|
+
const n = Bt(Array.from(e), t);
|
|
4158
4159
|
return new Set(n);
|
|
4159
4160
|
}
|
|
4160
4161
|
if (Array.isArray(e)) {
|
|
@@ -4162,7 +4163,7 @@ var bu = (e, t = !1) => {
|
|
|
4162
4163
|
if (t.length === 1)
|
|
4163
4164
|
return n.filter((a, i) => i.toString() !== t[0]);
|
|
4164
4165
|
const [s, ...r] = t;
|
|
4165
|
-
return n[s] =
|
|
4166
|
+
return n[s] = Bt(n[s], r), n;
|
|
4166
4167
|
}
|
|
4167
4168
|
if (e instanceof Object) {
|
|
4168
4169
|
const n = {
|
|
@@ -4171,29 +4172,29 @@ var bu = (e, t = !1) => {
|
|
|
4171
4172
|
if (t.length === 1)
|
|
4172
4173
|
return delete n[t[0]], n;
|
|
4173
4174
|
const [s, ...r] = t;
|
|
4174
|
-
return n[s] =
|
|
4175
|
+
return n[s] = Bt(n[s], r), n;
|
|
4175
4176
|
}
|
|
4176
4177
|
return e;
|
|
4177
|
-
},
|
|
4178
|
+
}, br = (e, t) => {
|
|
4178
4179
|
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
|
|
4179
4180
|
const s = document.createElement("style"), r = document.createTextNode("");
|
|
4180
4181
|
s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
4181
|
-
}, Ve,
|
|
4182
|
+
}, Ve, At, Tt, St, ke, _t, He, $e, Qe, je, ze, Pt, We, wt, ps, gc = (ps = class {
|
|
4182
4183
|
constructor(e) {
|
|
4183
4184
|
L(this, Ve);
|
|
4184
|
-
L(this, yt);
|
|
4185
4185
|
L(this, At);
|
|
4186
4186
|
L(this, Tt);
|
|
4187
|
-
L(this, ke, !1);
|
|
4188
4187
|
L(this, St);
|
|
4188
|
+
L(this, ke, !1);
|
|
4189
|
+
L(this, _t);
|
|
4189
4190
|
L(this, He);
|
|
4190
4191
|
L(this, $e);
|
|
4191
4192
|
L(this, Qe);
|
|
4192
4193
|
L(this, je);
|
|
4193
4194
|
L(this, ze);
|
|
4194
|
-
L(this, _t);
|
|
4195
|
-
L(this, We);
|
|
4196
4195
|
L(this, Pt);
|
|
4196
|
+
L(this, We);
|
|
4197
|
+
L(this, wt);
|
|
4197
4198
|
const {
|
|
4198
4199
|
client: t,
|
|
4199
4200
|
queryFlavor: n,
|
|
@@ -4207,7 +4208,7 @@ var bu = (e, t = !1) => {
|
|
|
4207
4208
|
shadowDOMTarget: f,
|
|
4208
4209
|
hideDisabledQueries: d
|
|
4209
4210
|
} = e;
|
|
4210
|
-
C(this, Ve, F(t)), C(this,
|
|
4211
|
+
C(this, Ve, F(t)), C(this, Tt, n), C(this, St, s), C(this, At, r), C(this, _t, u), C(this, He, f), C(this, $e, F(a)), C(this, Qe, F(i)), C(this, je, F(o)), C(this, ze, F(l)), C(this, Pt, F(d));
|
|
4211
4212
|
}
|
|
4212
4213
|
setButtonPosition(e) {
|
|
4213
4214
|
_(this, $e)[1](e);
|
|
@@ -4227,18 +4228,18 @@ var bu = (e, t = !1) => {
|
|
|
4227
4228
|
mount(e) {
|
|
4228
4229
|
if (_(this, ke))
|
|
4229
4230
|
throw new Error("Devtools is already mounted");
|
|
4230
|
-
const t =
|
|
4231
|
-
const n = this, [s] = _(this, $e), [r] = _(this, Qe), [a] = _(this, je), [i] = _(this, ze), [o] = _(this,
|
|
4231
|
+
const t = or(() => {
|
|
4232
|
+
const n = this, [s] = _(this, $e), [r] = _(this, Qe), [a] = _(this, je), [i] = _(this, ze), [o] = _(this, Pt), [l] = _(this, Ve);
|
|
4232
4233
|
let u;
|
|
4233
|
-
return _(this, We) ? u = _(this, We) : (u =
|
|
4234
|
+
return _(this, We) ? u = _(this, We) : (u = ar(() => import("./NCMVHL6D-fAWarBw8.js")), C(this, We, u)), br(_(this, _t), _(this, He)), sr(u, rr({
|
|
4234
4235
|
get queryFlavor() {
|
|
4235
|
-
return _(n,
|
|
4236
|
+
return _(n, Tt);
|
|
4236
4237
|
},
|
|
4237
4238
|
get version() {
|
|
4238
|
-
return _(n,
|
|
4239
|
+
return _(n, St);
|
|
4239
4240
|
},
|
|
4240
4241
|
get onlineManager() {
|
|
4241
|
-
return _(n,
|
|
4242
|
+
return _(n, At);
|
|
4242
4243
|
},
|
|
4243
4244
|
get shadowDOMTarget() {
|
|
4244
4245
|
return _(n, He);
|
|
@@ -4264,31 +4265,31 @@ var bu = (e, t = !1) => {
|
|
|
4264
4265
|
}
|
|
4265
4266
|
}));
|
|
4266
4267
|
}, e);
|
|
4267
|
-
C(this, ke, !0), C(this,
|
|
4268
|
+
C(this, ke, !0), C(this, wt, t);
|
|
4268
4269
|
}
|
|
4269
4270
|
unmount() {
|
|
4270
4271
|
var e;
|
|
4271
4272
|
if (!_(this, ke))
|
|
4272
4273
|
throw new Error("Devtools is not mounted");
|
|
4273
|
-
(e = _(this,
|
|
4274
|
+
(e = _(this, wt)) == null || e.call(this), C(this, ke, !1);
|
|
4274
4275
|
}
|
|
4275
|
-
}, Ve = new WeakMap(),
|
|
4276
|
+
}, Ve = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), St = new WeakMap(), ke = new WeakMap(), _t = new WeakMap(), He = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), je = new WeakMap(), ze = new WeakMap(), Pt = new WeakMap(), We = new WeakMap(), wt = new WeakMap(), ps), Ye, vt, bt, It, De, Nt, Je, Xe, Ze, et, tt, Ct, nt, st, Lt, ys, mc = (ys = class {
|
|
4276
4277
|
constructor(e) {
|
|
4277
4278
|
L(this, Ye);
|
|
4278
|
-
L(this, wt);
|
|
4279
4279
|
L(this, vt);
|
|
4280
4280
|
L(this, bt);
|
|
4281
|
-
L(this, De, !1);
|
|
4282
4281
|
L(this, It);
|
|
4282
|
+
L(this, De, !1);
|
|
4283
|
+
L(this, Nt);
|
|
4283
4284
|
L(this, Je);
|
|
4284
4285
|
L(this, Xe);
|
|
4285
4286
|
L(this, Ze);
|
|
4286
4287
|
L(this, et);
|
|
4287
4288
|
L(this, tt);
|
|
4288
|
-
L(this,
|
|
4289
|
+
L(this, Ct);
|
|
4289
4290
|
L(this, nt);
|
|
4290
4291
|
L(this, st);
|
|
4291
|
-
L(this,
|
|
4292
|
+
L(this, Lt);
|
|
4292
4293
|
const {
|
|
4293
4294
|
client: t,
|
|
4294
4295
|
queryFlavor: n,
|
|
@@ -4303,7 +4304,7 @@ var bu = (e, t = !1) => {
|
|
|
4303
4304
|
onClose: d,
|
|
4304
4305
|
hideDisabledQueries: h
|
|
4305
4306
|
} = e;
|
|
4306
|
-
C(this, Ye, F(t)), C(this,
|
|
4307
|
+
C(this, Ye, F(t)), C(this, bt, n), C(this, It, s), C(this, vt, r), C(this, Nt, u), C(this, Je, f), C(this, Xe, F(a)), C(this, Ze, F(i)), C(this, et, F(o)), C(this, tt, F(l)), C(this, Ct, F(h)), C(this, nt, F(d));
|
|
4307
4308
|
}
|
|
4308
4309
|
setButtonPosition(e) {
|
|
4309
4310
|
_(this, Xe)[1](e);
|
|
@@ -4326,18 +4327,18 @@ var bu = (e, t = !1) => {
|
|
|
4326
4327
|
mount(e) {
|
|
4327
4328
|
if (_(this, De))
|
|
4328
4329
|
throw new Error("Devtools is already mounted");
|
|
4329
|
-
const t =
|
|
4330
|
-
const n = this, [s] = _(this, Xe), [r] = _(this, Ze), [a] = _(this, et), [i] = _(this, tt), [o] = _(this,
|
|
4330
|
+
const t = or(() => {
|
|
4331
|
+
const n = this, [s] = _(this, Xe), [r] = _(this, Ze), [a] = _(this, et), [i] = _(this, tt), [o] = _(this, Ct), [l] = _(this, Ye), [u] = _(this, nt);
|
|
4331
4332
|
let f;
|
|
4332
|
-
return _(this, st) ? f = _(this, st) : (f =
|
|
4333
|
+
return _(this, st) ? f = _(this, st) : (f = ar(() => import("./2AITGKQY-Cti4x7QE.js")), C(this, st, f)), br(_(this, Nt), _(this, Je)), sr(f, rr({
|
|
4333
4334
|
get queryFlavor() {
|
|
4334
|
-
return _(n,
|
|
4335
|
+
return _(n, bt);
|
|
4335
4336
|
},
|
|
4336
4337
|
get version() {
|
|
4337
|
-
return _(n,
|
|
4338
|
+
return _(n, It);
|
|
4338
4339
|
},
|
|
4339
4340
|
get onlineManager() {
|
|
4340
|
-
return _(n,
|
|
4341
|
+
return _(n, vt);
|
|
4341
4342
|
},
|
|
4342
4343
|
get shadowDOMTarget() {
|
|
4343
4344
|
return _(n, Je);
|
|
@@ -4366,16 +4367,16 @@ var bu = (e, t = !1) => {
|
|
|
4366
4367
|
}
|
|
4367
4368
|
}));
|
|
4368
4369
|
}, e);
|
|
4369
|
-
C(this, De, !0), C(this,
|
|
4370
|
+
C(this, De, !0), C(this, Lt, t);
|
|
4370
4371
|
}
|
|
4371
4372
|
unmount() {
|
|
4372
4373
|
var e;
|
|
4373
4374
|
if (!_(this, De))
|
|
4374
4375
|
throw new Error("Devtools is not mounted");
|
|
4375
|
-
(e = _(this,
|
|
4376
|
+
(e = _(this, Lt)) == null || e.call(this), C(this, De, !1);
|
|
4376
4377
|
}
|
|
4377
|
-
}, Ye = new WeakMap(),
|
|
4378
|
-
function
|
|
4378
|
+
}, Ye = new WeakMap(), vt = new WeakMap(), bt = new WeakMap(), It = new WeakMap(), De = new WeakMap(), Nt = new WeakMap(), Je = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), Ct = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), Lt = new WeakMap(), ys);
|
|
4379
|
+
function Ec(e) {
|
|
4379
4380
|
const t = ee(e.client), n = j.useRef(null), {
|
|
4380
4381
|
buttonPosition: s,
|
|
4381
4382
|
position: r,
|
|
@@ -4385,7 +4386,7 @@ function hc(e) {
|
|
|
4385
4386
|
shadowDOMTarget: l,
|
|
4386
4387
|
hideDisabledQueries: u
|
|
4387
4388
|
} = e, [f] = j.useState(
|
|
4388
|
-
new
|
|
4389
|
+
new gc({
|
|
4389
4390
|
client: t,
|
|
4390
4391
|
queryFlavor: "React Query",
|
|
4391
4392
|
version: "5",
|
|
@@ -4413,9 +4414,9 @@ function hc(e) {
|
|
|
4413
4414
|
f.unmount();
|
|
4414
4415
|
}), [f]), /* @__PURE__ */ c("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
|
|
4415
4416
|
}
|
|
4416
|
-
function
|
|
4417
|
+
function pc(e) {
|
|
4417
4418
|
const t = ee(e.client), n = j.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: a, hideDisabledQueries: i } = e, [o] = j.useState(
|
|
4418
|
-
new
|
|
4419
|
+
new mc({
|
|
4419
4420
|
client: t,
|
|
4420
4421
|
queryFlavor: "React Query",
|
|
4421
4422
|
version: "5",
|
|
@@ -4450,24 +4451,24 @@ function gc(e) {
|
|
|
4450
4451
|
}
|
|
4451
4452
|
var gs = process.env.NODE_ENV !== "development" ? function() {
|
|
4452
4453
|
return null;
|
|
4453
|
-
} :
|
|
4454
|
+
} : Ec;
|
|
4454
4455
|
process.env.NODE_ENV;
|
|
4455
|
-
const
|
|
4456
|
+
const yc = () => {
|
|
4456
4457
|
Hn("dynamic-page-selector", {
|
|
4457
4458
|
description: "Dynamic page selector"
|
|
4458
4459
|
}), Hn("enable-add-page-dropdown", {
|
|
4459
4460
|
description: "Enable add page dropdown"
|
|
4460
4461
|
});
|
|
4461
|
-
},
|
|
4462
|
+
}, Ac = () => {
|
|
4462
4463
|
const e = B(), t = R();
|
|
4463
4464
|
return ie({
|
|
4464
4465
|
queryKey: [y.GET_COLLECTIONS],
|
|
4465
4466
|
staleTime: 1 / 0,
|
|
4466
4467
|
queryFn: async () => t(e, { action: y.GET_COLLECTIONS })
|
|
4467
4468
|
});
|
|
4468
|
-
},
|
|
4469
|
+
}, Tc = () => {
|
|
4469
4470
|
const { data: e } = oe(), { data: t } = Ie(), { data: n } = Be(), s = B(), r = R(), a = $(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]);
|
|
4470
|
-
return
|
|
4471
|
+
return se({
|
|
4471
4472
|
mutationFn: async ({ block: i }) => r(s, {
|
|
4472
4473
|
action: y.GET_BLOCK_ASYNC_PROPS,
|
|
4473
4474
|
data: {
|
|
@@ -4489,7 +4490,7 @@ const mc = () => {
|
|
|
4489
4490
|
}
|
|
4490
4491
|
})
|
|
4491
4492
|
});
|
|
4492
|
-
},
|
|
4493
|
+
}, Sc = () => {
|
|
4493
4494
|
const [, e] = le();
|
|
4494
4495
|
return q(
|
|
4495
4496
|
(t, n) => {
|
|
@@ -4498,51 +4499,60 @@ const mc = () => {
|
|
|
4498
4499
|
},
|
|
4499
4500
|
[e]
|
|
4500
4501
|
);
|
|
4501
|
-
},
|
|
4502
|
-
const e =
|
|
4502
|
+
}, _c = () => {
|
|
4503
|
+
const e = Sc();
|
|
4503
4504
|
return q(
|
|
4504
4505
|
({ pageId: t }) => {
|
|
4505
4506
|
e(t);
|
|
4506
4507
|
},
|
|
4507
4508
|
[e]
|
|
4508
4509
|
);
|
|
4509
|
-
},
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
const
|
|
4510
|
+
}, Pc = K(() => import("./digital-asset-manager-BJhwyEdT.js")), wc = K(() => import("./save-to-lib-B07GbG4I.js")), vc = K(() => import("./theme-panel-footer-DFUfCqKP.js")), bc = K(() => import("./web-preview-BL-vsgoa.js"));
|
|
4511
|
+
yc();
|
|
4512
|
+
ui();
|
|
4513
|
+
sa(wo);
|
|
4514
|
+
$o();
|
|
4515
|
+
ra(Pc);
|
|
4516
|
+
aa(wc);
|
|
4517
|
+
const Ic = {
|
|
4517
4518
|
role: "",
|
|
4518
4519
|
permissions: null
|
|
4519
4520
|
}, ms = (e) => {
|
|
4520
|
-
|
|
4521
|
-
const t =
|
|
4522
|
-
it.current = T
|
|
4521
|
+
ko(), Ri();
|
|
4522
|
+
const t = Rn(), { data: n = Ic, isFetching: s } = Do(), { data: r, isFetching: a } = Ce(), { data: i, isFetching: o } = Ac(), { data: l, isFetching: u } = Be(), f = s || a || o || u, [d] = le(), h = d.get("page"), { data: g } = oe(), { data: E, isFetching: S } = No(), { blocks: T } = Io(E), { lockingStatus: p, pageLock: A } = Ne(), { data: w, isFetching: D } = Co(), U = vo(), { onSave: b } = Go(), { mutateAsync: Te } = Tc(), { getPartialBlocks: Se, getPartialBlockBlocks: k } = xo(), { mutateAsync: v } = Xi(), { mutateAsync: I } = Lo(), W = _c(), [Q, ce] = x(!1), it = ct([]), we = $(() => H(l, "theme", {}) || {}, [l]), ot = me(p) && (A == null ? void 0 : A.status) === "editing", Le = (A == null ? void 0 : A.status) === "checking", Mn = S || Le || D;
|
|
4523
|
+
it.current = T;
|
|
4524
|
+
const [Ir] = te(Bs);
|
|
4525
|
+
re(() => {
|
|
4523
4526
|
const ue = () => {
|
|
4524
4527
|
document.hidden ? ce(!0) : ce(!1);
|
|
4525
4528
|
};
|
|
4526
4529
|
return window.addEventListener("visibilitychange", ue), () => window.removeEventListener("visibilitychange", ue);
|
|
4527
4530
|
}, []);
|
|
4528
|
-
const
|
|
4531
|
+
const Nr = $(() => {
|
|
4529
4532
|
const ue = {};
|
|
4530
|
-
return n && (ue.permissions =
|
|
4531
|
-
}, [n]),
|
|
4532
|
-
async (ue,
|
|
4533
|
+
return n && (ue.permissions = H(n, "permissions", null), ue.role = H(n, "role", "user")), ue;
|
|
4534
|
+
}, [n]), Cr = q(
|
|
4535
|
+
async (ue, kt) => await v({ pageType: ue, query: kt }),
|
|
4533
4536
|
[v]
|
|
4534
4537
|
);
|
|
4535
|
-
return /* @__PURE__ */
|
|
4536
|
-
Mn && /* @__PURE__ */ c(
|
|
4538
|
+
return /* @__PURE__ */ m(he, { children: [
|
|
4539
|
+
Mn && /* @__PURE__ */ c(Fs, { className: f ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ c(ft, { className: `animate-spin text-primary ${f ? "h-6 w-6" : "h-5 w-5"}` }) }),
|
|
4540
|
+
Ir && /* @__PURE__ */ c(
|
|
4541
|
+
V,
|
|
4542
|
+
{
|
|
4543
|
+
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(ft, { className: "h-6 w-6 animate-spin text-primary" }) }),
|
|
4544
|
+
children: /* @__PURE__ */ c(bc, {})
|
|
4545
|
+
}
|
|
4546
|
+
),
|
|
4537
4547
|
/* @__PURE__ */ c(
|
|
4538
|
-
|
|
4548
|
+
ia,
|
|
4539
4549
|
{
|
|
4540
4550
|
gotoPage: W,
|
|
4541
4551
|
collections: i ?? [],
|
|
4542
|
-
getBlockAsyncProps:
|
|
4552
|
+
getBlockAsyncProps: Te,
|
|
4543
4553
|
pageExternalData: w,
|
|
4544
4554
|
themePresets: e.themePresets ?? [],
|
|
4545
|
-
pageId:
|
|
4555
|
+
pageId: g == null ? void 0 : g.id,
|
|
4546
4556
|
loading: S,
|
|
4547
4557
|
fallbackLang: t,
|
|
4548
4558
|
languages: (l == null ? void 0 : l.languages) || [],
|
|
@@ -4554,36 +4564,36 @@ const Pc = {
|
|
|
4554
4564
|
autoSaveInterval: e.autoSaveInterval ?? 15,
|
|
4555
4565
|
onError: e.onError || console.error,
|
|
4556
4566
|
getPartialBlockBlocks: k,
|
|
4557
|
-
getPartialBlocks:
|
|
4567
|
+
getPartialBlocks: Se,
|
|
4558
4568
|
blocks: S ? [] : T,
|
|
4559
|
-
theme:
|
|
4569
|
+
theme: Qr(we),
|
|
4560
4570
|
pageTypes: r,
|
|
4561
|
-
searchPageTypeItems:
|
|
4571
|
+
searchPageTypeItems: Cr,
|
|
4562
4572
|
askAiCallBack: U,
|
|
4563
|
-
onSave: async ({ blocks: ue, theme:
|
|
4573
|
+
onSave: async ({ blocks: ue, theme: kt, needTranslations: Lr }) => {
|
|
4564
4574
|
if (!h) return !0;
|
|
4565
4575
|
it.current = ue;
|
|
4566
4576
|
const Fn = [...ue];
|
|
4567
|
-
return await b({ page: h, blocks: Fn, needTranslations:
|
|
4577
|
+
return await b({ page: h, blocks: Fn, needTranslations: Lr }), it.current = Fn, jr(kt, we) || await I({ settings: { theme: kt } }), !0;
|
|
4568
4578
|
},
|
|
4569
|
-
themePanelComponent:
|
|
4570
|
-
...
|
|
4579
|
+
themePanelComponent: vc,
|
|
4580
|
+
...Nr
|
|
4571
4581
|
}
|
|
4572
4582
|
),
|
|
4573
|
-
/* @__PURE__ */
|
|
4574
|
-
/* @__PURE__ */ c(
|
|
4575
|
-
/* @__PURE__ */ c(
|
|
4583
|
+
/* @__PURE__ */ m("div", { children: [
|
|
4584
|
+
/* @__PURE__ */ c(Fi, { isFetchingPage: Mn }),
|
|
4585
|
+
/* @__PURE__ */ c(qi, {})
|
|
4576
4586
|
] })
|
|
4577
4587
|
] });
|
|
4578
|
-
},
|
|
4588
|
+
}, Nc = new Wr({
|
|
4579
4589
|
defaultOptions: {
|
|
4580
4590
|
queries: {
|
|
4581
4591
|
refetchOnWindowFocus: !1,
|
|
4582
4592
|
refetchOnReconnect: !1
|
|
4583
4593
|
}
|
|
4584
4594
|
}
|
|
4585
|
-
}),
|
|
4586
|
-
const { isLoggedIn: t } =
|
|
4595
|
+
}), Ou = (e) => {
|
|
4596
|
+
const { isLoggedIn: t } = Ae(), [, n] = kn(), [s, r] = x(!1);
|
|
4587
4597
|
return re(() => (n(
|
|
4588
4598
|
In(e, [
|
|
4589
4599
|
"apiUrl",
|
|
@@ -4601,19 +4611,19 @@ const Pc = {
|
|
|
4601
4611
|
r(!0);
|
|
4602
4612
|
}, 200), () => {
|
|
4603
4613
|
r(!1), n({});
|
|
4604
|
-
}), [e, n]), s ?
|
|
4614
|
+
}), [e, n]), s ? H(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(he, { children: [
|
|
4605
4615
|
t ? /* @__PURE__ */ c(ms, { ...e }) : /* @__PURE__ */ c(rs, {}),
|
|
4606
4616
|
/* @__PURE__ */ c(gs, {})
|
|
4607
|
-
] }) : /* @__PURE__ */
|
|
4617
|
+
] }) : /* @__PURE__ */ m(Yr, { client: Nc, children: [
|
|
4608
4618
|
t ? /* @__PURE__ */ c(ms, { ...e }) : /* @__PURE__ */ c(rs, {}),
|
|
4609
4619
|
/* @__PURE__ */ c(gs, {})
|
|
4610
4620
|
] }) : /* @__PURE__ */ c("div", {});
|
|
4611
|
-
},
|
|
4612
|
-
function
|
|
4621
|
+
}, Cc = j.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
|
|
4622
|
+
function Lc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
4613
4623
|
const [r, a] = j.useState(!1);
|
|
4614
|
-
return /* @__PURE__ */
|
|
4615
|
-
/* @__PURE__ */
|
|
4616
|
-
/* @__PURE__ */ c(
|
|
4624
|
+
return /* @__PURE__ */ m(La, { open: r, onOpenChange: a, children: [
|
|
4625
|
+
/* @__PURE__ */ m(Yt, { children: [
|
|
4626
|
+
/* @__PURE__ */ c(Jt, { asChild: !0, children: /* @__PURE__ */ c(ka, { asChild: !0, children: /* @__PURE__ */ c(
|
|
4617
4627
|
M,
|
|
4618
4628
|
{
|
|
4619
4629
|
size: "sm",
|
|
@@ -4634,10 +4644,10 @@ function bc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4634
4644
|
) })
|
|
4635
4645
|
}
|
|
4636
4646
|
) }) }),
|
|
4637
|
-
/* @__PURE__ */ c(
|
|
4647
|
+
/* @__PURE__ */ c(Xt, { children: "Add field" })
|
|
4638
4648
|
] }),
|
|
4639
4649
|
r && /* @__PURE__ */ c(j.Suspense, { children: /* @__PURE__ */ c(
|
|
4640
|
-
|
|
4650
|
+
Cc,
|
|
4641
4651
|
{
|
|
4642
4652
|
data: e,
|
|
4643
4653
|
onSelect: t,
|
|
@@ -4648,19 +4658,19 @@ function bc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4648
4658
|
) })
|
|
4649
4659
|
] });
|
|
4650
4660
|
}
|
|
4651
|
-
const
|
|
4661
|
+
const Ru = () => {
|
|
4652
4662
|
const { savePageAsync: e } = Oe(), t = ee();
|
|
4653
4663
|
return q(async () => {
|
|
4654
4664
|
await e(), t.invalidateQueries({ queryKey: [y.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [y.GET_BUILDER_PAGE_DATA] });
|
|
4655
4665
|
}, [e, t]);
|
|
4656
|
-
},
|
|
4666
|
+
}, Uu = () => {
|
|
4657
4667
|
const e = ee();
|
|
4658
4668
|
return q(() => {
|
|
4659
4669
|
e.clear();
|
|
4660
4670
|
}, [e]);
|
|
4661
|
-
},
|
|
4671
|
+
}, Bu = () => {
|
|
4662
4672
|
const e = B(), t = R(), { data: n } = Ie(), s = ee();
|
|
4663
|
-
return
|
|
4673
|
+
return se({
|
|
4664
4674
|
mutationFn: async (r) => {
|
|
4665
4675
|
if (!(n != null && n.id))
|
|
4666
4676
|
throw new Error("No active page found");
|
|
@@ -4683,7 +4693,7 @@ const Du = () => {
|
|
|
4683
4693
|
console.error("Failed to update metadata");
|
|
4684
4694
|
}
|
|
4685
4695
|
});
|
|
4686
|
-
},
|
|
4696
|
+
}, kc = K(() => import("./digital-asset-manager-BJhwyEdT.js")), Mu = ({
|
|
4687
4697
|
assetId: e,
|
|
4688
4698
|
assetUrl: t,
|
|
4689
4699
|
onChange: n,
|
|
@@ -4691,18 +4701,18 @@ const Du = () => {
|
|
|
4691
4701
|
placeholder: r = "Select an image",
|
|
4692
4702
|
disabled: a = !1
|
|
4693
4703
|
}) => {
|
|
4694
|
-
const [i, o] =
|
|
4704
|
+
const [i, o] = x(!1), l = () => {
|
|
4695
4705
|
a || o(!0);
|
|
4696
4706
|
}, u = () => {
|
|
4697
4707
|
o(!1);
|
|
4698
|
-
}, f = (
|
|
4699
|
-
const E = Array.isArray(
|
|
4708
|
+
}, f = (g) => {
|
|
4709
|
+
const E = Array.isArray(g) ? g[0] : g;
|
|
4700
4710
|
E != null && E.url && n(In(E, ["url", "id"])), o(!1);
|
|
4701
4711
|
}, d = () => {
|
|
4702
4712
|
n({ url: "", id: "" });
|
|
4703
4713
|
}, h = (t == null ? void 0 : t.startsWith("{{")) && (t == null ? void 0 : t.endsWith("}}"));
|
|
4704
|
-
return /* @__PURE__ */
|
|
4705
|
-
t ? /* @__PURE__ */
|
|
4714
|
+
return /* @__PURE__ */ m("div", { className: `w-full ${s}`, children: [
|
|
4715
|
+
t ? /* @__PURE__ */ m("div", { className: "relative overflow-hidden rounded-md border", children: [
|
|
4706
4716
|
h ? /* @__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(
|
|
4707
4717
|
"img",
|
|
4708
4718
|
{
|
|
@@ -4712,7 +4722,7 @@ const Du = () => {
|
|
|
4712
4722
|
className: "h-auto max-h-[100px] w-full bg-gray-100 object-contain"
|
|
4713
4723
|
}
|
|
4714
4724
|
),
|
|
4715
|
-
/* @__PURE__ */
|
|
4725
|
+
/* @__PURE__ */ m("div", { className: "absolute right-2 top-2 flex gap-2", children: [
|
|
4716
4726
|
/* @__PURE__ */ c(
|
|
4717
4727
|
M,
|
|
4718
4728
|
{
|
|
@@ -4722,7 +4732,7 @@ const Du = () => {
|
|
|
4722
4732
|
className: "h-8 w-8 rounded-full bg-white text-red-500",
|
|
4723
4733
|
onClick: d,
|
|
4724
4734
|
disabled: a,
|
|
4725
|
-
children: h ? /* @__PURE__ */ c(Zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(
|
|
4735
|
+
children: h ? /* @__PURE__ */ c(Zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(si, { className: "h-4 w-4" })
|
|
4726
4736
|
}
|
|
4727
4737
|
),
|
|
4728
4738
|
!h && /* @__PURE__ */ c(
|
|
@@ -4743,15 +4753,15 @@ const Du = () => {
|
|
|
4743
4753
|
{
|
|
4744
4754
|
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"}`,
|
|
4745
4755
|
onClick: l,
|
|
4746
|
-
children: /* @__PURE__ */
|
|
4756
|
+
children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center gap-2", children: [
|
|
4747
4757
|
/* @__PURE__ */ c(es, { className: "h-10 w-10 text-gray-400" }),
|
|
4748
4758
|
/* @__PURE__ */ c("p", { className: "text-sm text-gray-500", children: r })
|
|
4749
4759
|
] })
|
|
4750
4760
|
}
|
|
4751
4761
|
),
|
|
4752
|
-
/* @__PURE__ */ c(Is, { open: i, onOpenChange: o, children: /* @__PURE__ */
|
|
4753
|
-
/* @__PURE__ */
|
|
4754
|
-
/* @__PURE__ */ c(
|
|
4762
|
+
/* @__PURE__ */ c(Is, { open: i, onOpenChange: o, children: /* @__PURE__ */ m(Da, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
|
|
4763
|
+
/* @__PURE__ */ m(Ga, { className: "hidden border-b px-4 py-2", children: [
|
|
4764
|
+
/* @__PURE__ */ c(xa, { children: "Select Image" }),
|
|
4755
4765
|
/* @__PURE__ */ c(
|
|
4756
4766
|
M,
|
|
4757
4767
|
{
|
|
@@ -4764,8 +4774,8 @@ const Du = () => {
|
|
|
4764
4774
|
}
|
|
4765
4775
|
)
|
|
4766
4776
|
] }),
|
|
4767
|
-
/* @__PURE__ */ c("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ c(
|
|
4768
|
-
|
|
4777
|
+
/* @__PURE__ */ c("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
4778
|
+
kc,
|
|
4769
4779
|
{
|
|
4770
4780
|
close: u,
|
|
4771
4781
|
onSelect: f,
|
|
@@ -4775,7 +4785,7 @@ const Du = () => {
|
|
|
4775
4785
|
) }) })
|
|
4776
4786
|
] }) })
|
|
4777
4787
|
] });
|
|
4778
|
-
},
|
|
4788
|
+
}, Dc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Es = (e) => {
|
|
4779
4789
|
if (!e.trim())
|
|
4780
4790
|
return { isValid: !1, parsed: null, placeholders: [], error: { message: "JSON is empty" } };
|
|
4781
4791
|
try {
|
|
@@ -4810,23 +4820,23 @@ const Du = () => {
|
|
|
4810
4820
|
}
|
|
4811
4821
|
};
|
|
4812
4822
|
}
|
|
4813
|
-
},
|
|
4823
|
+
}, Gc = (e, t) => {
|
|
4814
4824
|
let s = JSON.stringify(e, null, 2);
|
|
4815
4825
|
return t.forEach(({ original: r }, a) => {
|
|
4816
|
-
const i = `"__placeholder_${a}__"`, o = new RegExp(
|
|
4826
|
+
const i = `"__placeholder_${a}__"`, o = new RegExp(Dc(i), "g");
|
|
4817
4827
|
s = s.replace(o, r);
|
|
4818
4828
|
}), s;
|
|
4819
|
-
},
|
|
4829
|
+
}, xc = (e, t) => {
|
|
4820
4830
|
if (!e) return "";
|
|
4821
4831
|
let n = JSON.stringify(e, null, 2);
|
|
4822
4832
|
const s = /{{([^{}]+)}}/g;
|
|
4823
4833
|
let r;
|
|
4824
4834
|
for (; (r = s.exec(n)) !== null; ) {
|
|
4825
|
-
const a = r[1], i =
|
|
4835
|
+
const a = r[1], i = H(t, a, null);
|
|
4826
4836
|
n = n.replace(r[0], i);
|
|
4827
4837
|
}
|
|
4828
4838
|
return n;
|
|
4829
|
-
},
|
|
4839
|
+
}, Oc = K(() => import("./shared-json-ld-CkOQRUEw.js")), Fu = ({
|
|
4830
4840
|
value: e,
|
|
4831
4841
|
onChange: t,
|
|
4832
4842
|
disabled: n = !1,
|
|
@@ -4839,7 +4849,7 @@ const Du = () => {
|
|
|
4839
4849
|
hasJsonLdForSelectedLang: u,
|
|
4840
4850
|
copyJsonLDFromDefaultPage: f
|
|
4841
4851
|
}) => {
|
|
4842
|
-
const [d, h] =
|
|
4852
|
+
const [d, h] = x("edit"), [g, E] = x(null), [S, T] = x(""), p = ct(null), [A] = kn(), w = i === "jsonLD" && H(A, "features.sharedJsonLD", !1), D = i === "jsonLD" && !u && !!f;
|
|
4843
4853
|
re(() => {
|
|
4844
4854
|
e.trim() === "" && t("{}");
|
|
4845
4855
|
}, [e, t]);
|
|
@@ -4879,56 +4889,56 @@ const Du = () => {
|
|
|
4879
4889
|
const k = Es(e);
|
|
4880
4890
|
if (k.isValid)
|
|
4881
4891
|
if (E(null), k.parsed) {
|
|
4882
|
-
const v =
|
|
4892
|
+
const v = xc(k.parsed, o);
|
|
4883
4893
|
T(v);
|
|
4884
4894
|
} else
|
|
4885
4895
|
T("");
|
|
4886
4896
|
else
|
|
4887
4897
|
E(k.error), T("");
|
|
4888
4898
|
}, [e, o]);
|
|
4889
|
-
const
|
|
4899
|
+
const Te = () => {
|
|
4890
4900
|
const k = Es(e);
|
|
4891
4901
|
if (k.isValid && k.parsed) {
|
|
4892
|
-
const v =
|
|
4902
|
+
const v = Gc(k.parsed, k.placeholders);
|
|
4893
4903
|
t(v);
|
|
4894
4904
|
}
|
|
4895
|
-
},
|
|
4896
|
-
|
|
4905
|
+
}, Se = () => {
|
|
4906
|
+
g != null && g.position && p.current && (p.current.focus(), p.current.setSelectionRange(g.position, g.position + 1));
|
|
4897
4907
|
};
|
|
4898
|
-
return /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */
|
|
4899
|
-
/* @__PURE__ */
|
|
4900
|
-
/* @__PURE__ */
|
|
4901
|
-
/* @__PURE__ */
|
|
4902
|
-
/* @__PURE__ */ c(
|
|
4908
|
+
return /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ m(Oa, { value: d, onValueChange: h, className: "w-full", children: [
|
|
4909
|
+
/* @__PURE__ */ m("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
4910
|
+
/* @__PURE__ */ m(Ra, { className: "w-max", children: [
|
|
4911
|
+
/* @__PURE__ */ m(an, { value: "edit", className: "flex items-center gap-1", children: [
|
|
4912
|
+
/* @__PURE__ */ c(ri, { className: "h-4 w-4" }),
|
|
4903
4913
|
/* @__PURE__ */ c("span", { children: "Edit" })
|
|
4904
4914
|
] }),
|
|
4905
|
-
/* @__PURE__ */
|
|
4915
|
+
/* @__PURE__ */ m(
|
|
4906
4916
|
an,
|
|
4907
4917
|
{
|
|
4908
4918
|
value: "preview",
|
|
4909
4919
|
className: "flex items-center gap-1",
|
|
4910
|
-
disabled: !e.trim() ||
|
|
4920
|
+
disabled: !e.trim() || g !== null || D,
|
|
4911
4921
|
children: [
|
|
4912
|
-
/* @__PURE__ */ c(
|
|
4922
|
+
/* @__PURE__ */ c(Cs, { className: "h-4 w-4" }),
|
|
4913
4923
|
/* @__PURE__ */ c("span", { children: "Preview" })
|
|
4914
4924
|
]
|
|
4915
4925
|
}
|
|
4916
4926
|
),
|
|
4917
|
-
w && /* @__PURE__ */
|
|
4927
|
+
w && /* @__PURE__ */ m(
|
|
4918
4928
|
an,
|
|
4919
4929
|
{
|
|
4920
4930
|
value: "shared",
|
|
4921
4931
|
className: "flex items-center gap-1",
|
|
4922
|
-
disabled: !e.trim() ||
|
|
4932
|
+
disabled: !e.trim() || g !== null,
|
|
4923
4933
|
children: [
|
|
4924
|
-
/* @__PURE__ */ c(
|
|
4934
|
+
/* @__PURE__ */ c(ai, { className: "h-4 w-4" }),
|
|
4925
4935
|
/* @__PURE__ */ c("span", { children: "Shared" })
|
|
4926
4936
|
]
|
|
4927
4937
|
}
|
|
4928
4938
|
)
|
|
4929
4939
|
] }),
|
|
4930
4940
|
D ? null : d === "edit" && !s && /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ c(
|
|
4931
|
-
|
|
4941
|
+
Lc,
|
|
4932
4942
|
{
|
|
4933
4943
|
dataType: "value",
|
|
4934
4944
|
data: o ?? {},
|
|
@@ -4936,22 +4946,22 @@ const Du = () => {
|
|
|
4936
4946
|
}
|
|
4937
4947
|
) })
|
|
4938
4948
|
] }),
|
|
4939
|
-
/* @__PURE__ */
|
|
4940
|
-
!D && d === "edit" && /* @__PURE__ */ c(
|
|
4949
|
+
/* @__PURE__ */ m(on, { value: "edit", className: "relative mt-0", children: [
|
|
4950
|
+
!D && d === "edit" && /* @__PURE__ */ c(Un, { content: "Format JSON", side: "right", showTooltip: !n && !g, children: /* @__PURE__ */ c(
|
|
4941
4951
|
M,
|
|
4942
4952
|
{
|
|
4943
4953
|
type: "button",
|
|
4944
4954
|
variant: "outline",
|
|
4945
4955
|
size: "icon",
|
|
4946
|
-
onClick:
|
|
4956
|
+
onClick: Te,
|
|
4947
4957
|
className: "absolute right-1 top-1 h-6 w-6 p-1",
|
|
4948
|
-
disabled: !e.trim() || n ||
|
|
4949
|
-
children: /* @__PURE__ */ c(
|
|
4958
|
+
disabled: !e.trim() || n || g !== null,
|
|
4959
|
+
children: /* @__PURE__ */ c(ii, {})
|
|
4950
4960
|
}
|
|
4951
4961
|
) }),
|
|
4952
|
-
D ? /* @__PURE__ */ c("div", { className: "flex h-40 items-center justify-center rounded-md bg-black/20", children: /* @__PURE__ */
|
|
4962
|
+
D ? /* @__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: [
|
|
4953
4963
|
/* @__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." }),
|
|
4954
|
-
/* @__PURE__ */
|
|
4964
|
+
/* @__PURE__ */ m(M, { type: "button", variant: "default", size: "sm", onClick: f, children: [
|
|
4955
4965
|
/* @__PURE__ */ c(Ns, {}),
|
|
4956
4966
|
"Copy & Edit from default language"
|
|
4957
4967
|
] })
|
|
@@ -4961,7 +4971,7 @@ const Du = () => {
|
|
|
4961
4971
|
ref: p,
|
|
4962
4972
|
id: i,
|
|
4963
4973
|
name: i,
|
|
4964
|
-
className: `rounded-md border border-input text-xs ${
|
|
4974
|
+
className: `rounded-md border border-input text-xs ${g ? "border-red-500" : ""}`,
|
|
4965
4975
|
onChange: U,
|
|
4966
4976
|
onKeyDown: b,
|
|
4967
4977
|
value: e,
|
|
@@ -4971,16 +4981,16 @@ const Du = () => {
|
|
|
4971
4981
|
readOnly: s
|
|
4972
4982
|
}
|
|
4973
4983
|
),
|
|
4974
|
-
|
|
4975
|
-
/* @__PURE__ */ c(
|
|
4976
|
-
/* @__PURE__ */
|
|
4984
|
+
g && /* @__PURE__ */ m(Ua, { variant: "destructive", className: "mt-2", children: [
|
|
4985
|
+
/* @__PURE__ */ c(oi, { className: "h-4 w-4" }),
|
|
4986
|
+
/* @__PURE__ */ m(Ba, { className: "flex flex-col", children: [
|
|
4977
4987
|
/* @__PURE__ */ c("span", { className: "font-medium", children: "Invalid JSON" }),
|
|
4978
|
-
/* @__PURE__ */ c("span", { className: "text-sm", children:
|
|
4979
|
-
|
|
4988
|
+
/* @__PURE__ */ c("span", { className: "text-sm", children: g.message }),
|
|
4989
|
+
g.line && g.column && /* @__PURE__ */ m("span", { className: "text-sm", children: [
|
|
4980
4990
|
"Error at line ",
|
|
4981
|
-
|
|
4991
|
+
g.line,
|
|
4982
4992
|
", column ",
|
|
4983
|
-
|
|
4993
|
+
g.column
|
|
4984
4994
|
] }),
|
|
4985
4995
|
/* @__PURE__ */ c(
|
|
4986
4996
|
M,
|
|
@@ -4989,21 +4999,21 @@ const Du = () => {
|
|
|
4989
4999
|
variant: "link",
|
|
4990
5000
|
size: "sm",
|
|
4991
5001
|
className: "mt-1 h-auto self-start p-0 text-sm",
|
|
4992
|
-
onClick:
|
|
5002
|
+
onClick: Se,
|
|
4993
5003
|
children: "Show position"
|
|
4994
5004
|
}
|
|
4995
5005
|
)
|
|
4996
5006
|
] })
|
|
4997
5007
|
] })
|
|
4998
5008
|
] }),
|
|
4999
|
-
/* @__PURE__ */
|
|
5009
|
+
/* @__PURE__ */ m(on, { value: "preview", className: "mt-0", children: [
|
|
5000
5010
|
/* @__PURE__ */ c(jn, { rows: a, value: S, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
|
|
5001
5011
|
/* @__PURE__ */ c("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
|
|
5002
5012
|
] }),
|
|
5003
|
-
w && /* @__PURE__ */ c(on, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(
|
|
5013
|
+
w && /* @__PURE__ */ c(on, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Oc, {}) }) })
|
|
5004
5014
|
] }) });
|
|
5005
|
-
},
|
|
5006
|
-
const { logout: e } =
|
|
5015
|
+
}, qu = () => {
|
|
5016
|
+
const { logout: e } = Ae(), { getAccessToken: t } = Ds();
|
|
5007
5017
|
return q(
|
|
5008
5018
|
async ({
|
|
5009
5019
|
url: n,
|
|
@@ -5041,113 +5051,114 @@ const Du = () => {
|
|
|
5041
5051
|
if (typeof window > "u")
|
|
5042
5052
|
throw new Error("@chaibuilder/pages is not available on the server");
|
|
5043
5053
|
export {
|
|
5044
|
-
|
|
5054
|
+
Cu as $,
|
|
5045
5055
|
y as A,
|
|
5046
|
-
|
|
5056
|
+
Fs as B,
|
|
5047
5057
|
X as C,
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5058
|
+
Ys as D,
|
|
5059
|
+
rr as E,
|
|
5060
|
+
ll as F,
|
|
5061
|
+
du as G,
|
|
5062
|
+
fu as H,
|
|
5063
|
+
xe as I,
|
|
5064
|
+
Tn as J,
|
|
5065
|
+
hu as K,
|
|
5066
|
+
Gt as L,
|
|
5067
|
+
lu as M,
|
|
5068
|
+
Au as N,
|
|
5069
|
+
ht as O,
|
|
5070
|
+
_u as P,
|
|
5071
|
+
Pu as Q,
|
|
5072
|
+
Tu as R,
|
|
5073
|
+
Eu as S,
|
|
5074
|
+
Un as T,
|
|
5075
|
+
Jo as U,
|
|
5076
|
+
Nl as V,
|
|
5077
|
+
Sn as W,
|
|
5078
|
+
Pl as X,
|
|
5079
|
+
Iu as Y,
|
|
5080
|
+
Nu as Z,
|
|
5081
|
+
Il as _,
|
|
5082
|
+
Lo as a,
|
|
5083
|
+
Lu as a0,
|
|
5084
|
+
gu as a1,
|
|
5085
|
+
ou as a2,
|
|
5086
|
+
Su as a3,
|
|
5087
|
+
Z as a4,
|
|
5088
|
+
zo as a5,
|
|
5089
|
+
uc as a6,
|
|
5090
|
+
mu as a7,
|
|
5091
|
+
Ut as a8,
|
|
5092
|
+
Gu as a9,
|
|
5093
|
+
Jc as aA,
|
|
5094
|
+
Os as aB,
|
|
5095
|
+
Co as aC,
|
|
5096
|
+
Ji as aD,
|
|
5097
|
+
kn as aE,
|
|
5098
|
+
$i as aF,
|
|
5099
|
+
Lc as aG,
|
|
5100
|
+
Mu as aH,
|
|
5101
|
+
Fu as aI,
|
|
5102
|
+
Wc as aJ,
|
|
5103
|
+
Ou as aK,
|
|
5104
|
+
Ie as aL,
|
|
5105
|
+
Uu as aM,
|
|
5106
|
+
_c as aN,
|
|
5107
|
+
Ru as aO,
|
|
5108
|
+
iu as aP,
|
|
5109
|
+
Ae as aQ,
|
|
5110
|
+
Do as aR,
|
|
5111
|
+
qu as aS,
|
|
5112
|
+
Pi as aT,
|
|
5113
|
+
bu as aa,
|
|
5114
|
+
vu as ab,
|
|
5115
|
+
js as ac,
|
|
5116
|
+
Ge as ad,
|
|
5117
|
+
wl as ae,
|
|
5118
|
+
wu as af,
|
|
5119
|
+
yu as ag,
|
|
5120
|
+
pu as ah,
|
|
5121
|
+
Bt as ai,
|
|
5122
|
+
uu as aj,
|
|
5123
|
+
B as ak,
|
|
5124
|
+
R as al,
|
|
5125
|
+
oe as am,
|
|
5126
|
+
Bu as an,
|
|
5127
|
+
au as ao,
|
|
5128
|
+
Es as ap,
|
|
5129
|
+
Di as aq,
|
|
5130
|
+
Ui as ar,
|
|
5131
|
+
Sc as as,
|
|
5132
|
+
ru as at,
|
|
5133
|
+
On as au,
|
|
5134
|
+
cn as av,
|
|
5135
|
+
de as aw,
|
|
5136
|
+
Gn as ax,
|
|
5137
|
+
Yc as ay,
|
|
5138
|
+
fo as az,
|
|
5139
|
+
Rs as b,
|
|
5140
|
+
Xc as c,
|
|
5141
|
+
Zc as d,
|
|
5131
5142
|
Be as e,
|
|
5132
|
-
|
|
5143
|
+
Rn as f,
|
|
5133
5144
|
Ue as g,
|
|
5134
5145
|
Ce as h,
|
|
5135
5146
|
le as i,
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5147
|
+
Gs as j,
|
|
5148
|
+
Ii as k,
|
|
5149
|
+
tu as l,
|
|
5150
|
+
eu as m,
|
|
5151
|
+
nu as n,
|
|
5152
|
+
su as o,
|
|
5153
|
+
Bs as p,
|
|
5154
|
+
Ai as q,
|
|
5155
|
+
xu as r,
|
|
5156
|
+
J as s,
|
|
5146
5157
|
un as t,
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5158
|
+
Ms as u,
|
|
5159
|
+
sr as v,
|
|
5160
|
+
ku as w,
|
|
5161
|
+
Du as x,
|
|
5162
|
+
F as y,
|
|
5163
|
+
Tl as z
|
|
5153
5164
|
};
|