@chaibuilder/sdk 4.0.0-beta.31 → 4.0.0-beta.32
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/{2SSKDMRQ-BksFOLpD.cjs → 2SSKDMRQ-DfXKDvXk.cjs} +1 -1
- package/dist/{2SSKDMRQ-gmj-yWTy.js → 2SSKDMRQ-pPung-JB.js} +2 -2
- package/dist/{AP7HFJJL-kVgc0R61.js → AP7HFJJL-CEJuc_Ox.js} +1 -1
- package/dist/{AP7HFJJL-CO-deD_p.cjs → AP7HFJJL-PvPBwV6T.cjs} +1 -1
- package/dist/{WDYDFRGG-C9_E3QW0.js → WDYDFRGG-B3FrCE_j.js} +2 -2
- package/dist/{WDYDFRGG-KPpWFul_.cjs → WDYDFRGG-BPHlcLi5.cjs} +1 -1
- package/dist/{active-in-another-tab-1GoKTVcF.js → active-in-another-tab-C_Ma7oFU.js} +1 -1
- package/dist/{active-in-another-tab-iEd5fZD0.cjs → active-in-another-tab-WVYf-z5w.cjs} +1 -1
- package/dist/{add-new-language-page-Cq8R42Ro.cjs → add-new-language-page-CxW2Vuyr.cjs} +1 -1
- package/dist/{add-new-language-page-B3GUvWdP.js → add-new-language-page-DtsBO739.js} +1 -1
- package/dist/{add-new-page-DiHnECAR.cjs → add-new-page-BfKt72NF.cjs} +1 -1
- package/dist/{add-new-page-C5HlQfzy.js → add-new-page-DG38rI6S.js} +1 -1
- package/dist/{ai-panel-content-BPpawv4D.cjs → ai-panel-content-Dfo4jOVB.cjs} +1 -1
- package/dist/{ai-panel-content-tExD3yhH.js → ai-panel-content-dktE9CIO.js} +2 -2
- package/dist/{ai-panel-default-lang-DnYLHSaS.js → ai-panel-default-lang-BbUTXMbm.js} +1 -1
- package/dist/{ai-panel-default-lang-C6N4wUUF.cjs → ai-panel-default-lang-GQCtwlPs.cjs} +1 -1
- package/dist/{ai-panel-other-lang-D1pCJluY.js → ai-panel-other-lang-DIDS-mTi.js} +2 -2
- package/dist/{ai-panel-other-lang-C65lVVtZ.cjs → ai-panel-other-lang-nCUxwpLX.cjs} +1 -1
- package/dist/{ai-translation-prompt-DnwG2BmF.cjs → ai-translation-prompt-CJVcuWrs.cjs} +1 -1
- package/dist/{ai-translation-prompt-Dnn6i_t3.js → ai-translation-prompt-D87qk3C1.js} +1 -1
- package/dist/{change-password-modal-LKtYY-8V.cjs → change-password-modal-CVUa60pC.cjs} +1 -1
- package/dist/{change-password-modal-C0MMizgl.js → change-password-modal-PahNYs8x.js} +1 -1
- package/dist/{continue-editing-in-this-client-oxYWGWON.js → continue-editing-in-this-client-BYFOU3hH.js} +1 -1
- package/dist/{continue-editing-in-this-client-Dd6nKIvX.cjs → continue-editing-in-this-client-CW0f2LRk.cjs} +1 -1
- package/dist/{delete-page-LnzR01A8.js → delete-page-BDViv7Xm.js} +1 -1
- package/dist/{delete-page-D0tdn6VW.cjs → delete-page-CdByrw3j.cjs} +1 -1
- package/dist/digital-asset-manager-CxxhsToc.cjs +1 -0
- package/dist/{digital-asset-manager-DJhRhLGC.js → digital-asset-manager-PcYficIX.js} +3 -3
- package/dist/{duplicate-page-ChSp1TYN.cjs → duplicate-page-D2f3HvWX.cjs} +1 -1
- package/dist/{duplicate-page-CXzYy7vx.js → duplicate-page-DfEA148D.js} +1 -1
- package/dist/{dynamic-page-selector-r5IR9_7k.js → dynamic-page-selector-DB__KD2y.js} +1 -1
- package/dist/{dynamic-page-selector-btGtkyyv.cjs → dynamic-page-selector-Dz7D1Wdr.cjs} +1 -1
- package/dist/{image-compression-DsZ1oqpb.js → image-compression-DPFITwOL.js} +2 -2
- package/dist/image-compression-UaU7Bwqe.cjs +1 -0
- package/dist/index-Bzyv7mAh.cjs +5 -0
- package/dist/{index-DtMksfXx.js → index-IQefjAA0.js} +679 -668
- package/dist/{json-diff-viewer-BkrnLb3B.cjs → json-diff-viewer-BPqY25PU.cjs} +1 -1
- package/dist/{json-diff-viewer-D3N3w3Ax.js → json-diff-viewer-Ci2IbgDn.js} +1 -1
- package/dist/{lang-panel-BAaaP4Qc.js → lang-panel-DlAQr-y9.js} +2 -2
- package/dist/{lang-panel-BjDRrpwN.cjs → lang-panel-jebYHYGD.cjs} +1 -1
- package/dist/{mark-as-template-DNHYNjI9.js → mark-as-template-DOZL3umP.js} +1 -1
- package/dist/{mark-as-template-IYRjta97.cjs → mark-as-template-DS-tMllK.cjs} +1 -1
- package/dist/{no-language-page-content-C-ltY7bj.js → no-language-page-content-C8W0M_Fj.js} +1 -1
- package/dist/{no-language-page-content-8_J6y-cm.cjs → no-language-page-content-DWtEo657.cjs} +1 -1
- package/dist/{no-language-page-dialog-BOZZZzqx.cjs → no-language-page-dialog-FVXkSnfT.cjs} +1 -1
- package/dist/{no-language-page-dialog-D5NXpDHi.js → no-language-page-dialog-cpCZ9vES.js} +2 -2
- package/dist/{page-creator-BuHHnqiQ.js → page-creator-CFtxeW_t.js} +1 -1
- package/dist/{page-creator-wtbae2U7.cjs → page-creator-o6yRzsVf.cjs} +1 -1
- package/dist/{page-lock-DN4iJc-V.cjs → page-lock-BS_ErOIW.cjs} +1 -1
- package/dist/{page-lock-pPGlTxj7.js → page-lock-Cthbk6Pg.js} +2 -2
- package/dist/{page-locked-dialog-B_vdgv24.cjs → page-locked-dialog-BWXifuQ8.cjs} +1 -1
- package/dist/{page-locked-dialog-Bl-ojgIW.js → page-locked-dialog-D5hmaWqw.js} +1 -1
- package/dist/{page-manager-new-Bg8H6yrg.js → page-manager-new-Dl5YwsMm.js} +2 -2
- package/dist/{page-manager-new-5W5M9_ue.cjs → page-manager-new-DpSqBzeh.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-CyfO7O96.js → page-manager-search-and-filter-iFsFJhn4.js} +27 -26
- package/dist/{page-manager-search-and-filter-CDXunXNd.cjs → page-manager-search-and-filter-jDoLrCB7.cjs} +1 -1
- package/dist/{page-revisions-content-B-egQgoZ.js → page-revisions-content-C1IGUurW.js} +2 -2
- package/dist/{page-revisions-content-BKT8S9_g.cjs → page-revisions-content-CeBepZEw.cjs} +1 -1
- package/dist/pages.cjs +1 -1
- package/dist/pages.js +1 -1
- package/dist/{publish-pages-content-D2B_ScCQ.js → publish-pages-content-BpEoA1T6.js} +2 -2
- package/dist/{publish-pages-content-WJHTVYnx.cjs → publish-pages-content-PNsiaGI-.cjs} +1 -1
- package/dist/{save-to-lib-dT1NDd5w.js → save-to-lib-BERYhyxq.js} +2 -2
- package/dist/{save-to-lib-CiM0wiIr.cjs → save-to-lib-Bk59qO1r.cjs} +1 -1
- package/dist/sdk.css +1 -1
- package/dist/{selected-block-display-BQndDPcY.js → selected-block-display-C6NxfC0N.js} +1 -1
- package/dist/{selected-block-display-BgqcPsXI.cjs → selected-block-display-vFSCOnw8.cjs} +1 -1
- package/dist/{seo-panel-DXZvGYEM.cjs → seo-panel-0vlr_dBq.cjs} +1 -1
- package/dist/{seo-panel-Z93Zf_bz.js → seo-panel-COrEJZLA.js} +1 -1
- package/dist/{shared-json-ld-DwvUDGAS.cjs → shared-json-ld-C46hURIr.cjs} +1 -1
- package/dist/{shared-json-ld-Ct68RlWD.js → shared-json-ld-DnTuCBc3.js} +1 -1
- package/dist/supabase-actions.cjs +1 -1
- package/dist/supabase-actions.js +193 -195
- package/dist/{take-over-request-D6y2HcDr.cjs → take-over-request-6fliSr8w.cjs} +1 -1
- package/dist/{take-over-request-C6ngP1QR.js → take-over-request-DvmM5qTu.js} +1 -1
- package/dist/{theme-panel-footer-IgGj-_OA.cjs → theme-panel-footer-3ixmq107.cjs} +1 -1
- package/dist/{theme-panel-footer-CGZL2F7R.js → theme-panel-footer-BlsXRcEY.js} +1 -1
- package/dist/{unmark-as-template-DeeWUTco.js → unmark-as-template-Dn3klZKq.js} +1 -1
- package/dist/{unmark-as-template-f1dl_YTz.cjs → unmark-as-template-q1GblG-u.cjs} +1 -1
- package/dist/{unpublish-page-U_79Pwc0.js → unpublish-page-BbFZw0so.js} +1 -1
- package/dist/{unpublish-page-DEPFjGuu.cjs → unpublish-page-DMbcHmUV.cjs} +1 -1
- package/dist/{web-preview-CoT8r96b.js → web-preview-B2YGL26D.js} +1 -1
- package/dist/{web-preview-DTDoIE-c.cjs → web-preview-C6SLwtqv.cjs} +1 -1
- package/package.json +2 -7
- package/dist/digital-asset-manager-eCJHNSjj.cjs +0 -1
- package/dist/image-compression-DZ9WMmyn.cjs +0 -1
- package/dist/index-CAhDwfHE.cjs +0 -5
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Hr = Object.defineProperty;
|
|
2
2
|
var ns = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var An = (e, t, n) =>
|
|
5
|
+
var qr = (e, t, n) => t in e ? Hr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var An = (e, t, n) => qr(e, typeof t != "symbol" ? t + "" : t, n), ss = (e, t, n) => t.has(e) || ns("Cannot " + n);
|
|
7
7
|
var T = (e, t, n) => (ss(e, t, "read from private field"), n ? n.call(e) : t.get(e)), O = (e, t, n) => t.has(e) ? ns("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), L = (e, t, n, s) => (ss(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
8
8
|
import { jsxs as m, jsx as c, Fragment as Te } from "react/jsx-runtime";
|
|
9
|
-
import { d as Ne, aH as
|
|
10
|
-
import { B as M, h as
|
|
11
|
-
import { atom as _e, useAtom as Pe, useSetAtom as Hn, useAtomValue as
|
|
12
|
-
import { get as q, noop as un, reverse as
|
|
9
|
+
import { d as Ne, aH as $r, aw as ks, s as Bn, t as Fn, v as Kn, w as de, F as Ke, x as on, y as ln, z as cn, aI as xs, aJ as Rs, ac as Qr, ad as zr, aK as Wr, aL as jr, av as Ds, aM as Yr, ae as Kt, D as Vn, ag as Jr, aN as Zr, aO as Xr, $ as ea, aB as ta, aA as na, aC as sa, e as Us, a0 as ra, au as aa, a1 as ia, as as oa, a2 as la, a3 as ca, at as ua, a4 as da, a5 as fa, aP as ha, X as ga, Y as ma, f as Ea, g as pa, ax as ya, ay as Aa, az as Tn, aQ as Sn, T as rs } from "./index-DsQXiNA_.js";
|
|
10
|
+
import { B as M, h as Ta, j as Sa, v as Vt, e as as, m as _a, q as Pa, x as wa, D as ba, F as va } from "./register-chai-top-bar-D6GjnauV.js";
|
|
11
|
+
import { atom as _e, useAtom as Pe, useSetAtom as Hn, useAtomValue as Ia } from "jotai";
|
|
12
|
+
import { get as q, noop as un, reverse as Na, sortBy as Ca, find as oe, minBy as Ms, values as Bs, first as Fs, groupBy as La, keyBy as Ga, map as Jt, isEmpty as fe, compact as yt, each as Oa, filter as qn, uniq as ka, upperCase as is, includes as xa, isArray as Ra, has as $n, startCase as Da, isFunction as Ua, pick as Ks, cloneDeep as Ma, isEqual as os } from "lodash-es";
|
|
13
13
|
import * as z from "react";
|
|
14
|
-
import
|
|
15
|
-
import { useQuery as re, useMutation as X, useQueryClient as J, onlineManager as
|
|
16
|
-
import { CopyPlusIcon as
|
|
14
|
+
import Ba, { useMemo as W, useCallback as $, useState as R, useEffect as j, useRef as ce, Suspense as Y, lazy as F, startTransition as ls } from "react";
|
|
15
|
+
import { useQuery as re, useMutation as X, useQueryClient as J, onlineManager as Vs, QueryClient as Fa, QueryClientProvider as Ka } from "@tanstack/react-query";
|
|
16
|
+
import { CopyPlusIcon as Va, Pencil as Hs, Power as Ha, Trash as qa, SquareLibrary as cs, Folder as us, Loader as dt, Hash as $a, File as Qa, MoreHorizontal as ds, Languages as fs, ChevronDown as Nn, Star as za, Plus as qs, History as Wa, Palette as ja, Play as Ya, CheckCircle as Ja, Save as Za, Send as hs, Rocket as gs, ExternalLink as Xa, LanguagesIcon as ei, User as ti, X as ms, Trash2 as ni, ImageIcon as Es, Code as si, Eye as ri, Share2 as ai, FileCode2 as ii, AlertTriangle as oi } from "lucide-react";
|
|
17
17
|
import { useTranslation as Ce } from "react-i18next";
|
|
18
|
-
import { h as
|
|
18
|
+
import { h as li } from "./plugin-BSjgGgwo.js";
|
|
19
19
|
import { c as Zt } from "./common-functions-D2lMFR6K.js";
|
|
20
20
|
import { toast as U } from "sonner";
|
|
21
|
-
import { i as
|
|
22
|
-
import { g as
|
|
23
|
-
import { loadWebBlocks as
|
|
24
|
-
import { ErrorBoundary as
|
|
21
|
+
import { i as ci } from "./core-QlWEXm1d.js";
|
|
22
|
+
import { g as ui } from "./apply-binding-chfbBKi2.js";
|
|
23
|
+
import { loadWebBlocks as di } from "./web-blocks.js";
|
|
24
|
+
import { ErrorBoundary as fi } from "react-error-boundary";
|
|
25
25
|
const Xt = _e(null), p = {
|
|
26
26
|
GET_GLOBAL_JSONLD_ITEMS: "GET_GLOBAL_JSONLD_ITEMS",
|
|
27
27
|
GENERATE_SEO_FIELD: "GENERATE_SEO_FIELD",
|
|
@@ -86,17 +86,17 @@ const Xt = _e(null), p = {
|
|
|
86
86
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
87
87
|
GET_ASSETS: "GET_ASSETS",
|
|
88
88
|
GET_ASSET: "GET_ASSET"
|
|
89
|
-
},
|
|
89
|
+
}, hi = _e({}), dn = () => Pe(hi), he = (e, t) => {
|
|
90
90
|
const [n] = dn();
|
|
91
91
|
return W(() => q(n, e, t), [n, e, t]);
|
|
92
|
-
}, I = () => he("apiUrl", "/chai/api"),
|
|
92
|
+
}, I = () => he("apiUrl", "/chai/api"), $s = () => he("realtimeAdapter", null), Qs = async (e, t, n = {}) => await fetch(e, {
|
|
93
93
|
method: "POST",
|
|
94
94
|
headers: {
|
|
95
95
|
"Content-Type": "application/json",
|
|
96
96
|
...n
|
|
97
97
|
},
|
|
98
98
|
body: JSON.stringify(t)
|
|
99
|
-
}),
|
|
99
|
+
}), uu = () => {
|
|
100
100
|
const e = C(), t = I();
|
|
101
101
|
return $(
|
|
102
102
|
async ({
|
|
@@ -113,7 +113,7 @@ const Xt = _e(null), p = {
|
|
|
113
113
|
async (s = n, r, a = {}, i = !1) => {
|
|
114
114
|
const o = await t();
|
|
115
115
|
try {
|
|
116
|
-
const l = q(r, "action", "").toLowerCase(), u = await
|
|
116
|
+
const l = q(r, "action", "").toLowerCase(), u = await Qs(s + (l ? `?action=${l}` : ""), r, {
|
|
117
117
|
...a,
|
|
118
118
|
Authorization: `Bearer ${o}`
|
|
119
119
|
});
|
|
@@ -164,22 +164,22 @@ const Ve = (e) => {
|
|
|
164
164
|
action: p.GET_LANGUAGE_PAGES,
|
|
165
165
|
data: { id: s }
|
|
166
166
|
});
|
|
167
|
-
return
|
|
167
|
+
return Na(Ca(a, "primaryPage"));
|
|
168
168
|
},
|
|
169
169
|
enabled: !!s
|
|
170
170
|
});
|
|
171
|
-
},
|
|
172
|
-
const [e] =
|
|
171
|
+
}, gi = _e(null), zs = () => Pe(gi), Qn = () => {
|
|
172
|
+
const [e] = zs();
|
|
173
173
|
return (e == null ? void 0 : e.slug) || "";
|
|
174
174
|
};
|
|
175
|
-
function
|
|
175
|
+
function mi(e, t) {
|
|
176
176
|
const [n, s] = R(e);
|
|
177
177
|
return j(() => {
|
|
178
178
|
const r = setTimeout(() => s(e), t);
|
|
179
179
|
return () => clearTimeout(r);
|
|
180
180
|
}, [e, t]), n;
|
|
181
181
|
}
|
|
182
|
-
const
|
|
182
|
+
const Ei = ({ query: e, uuid: t }) => {
|
|
183
183
|
const { selectedLang: n, fallbackLang: s } = Ne(), { data: r } = ge(), a = r == null ? void 0 : r.pageType, i = I(), o = C(), { data: l, isFetching: u } = re({
|
|
184
184
|
queryKey: [p.GET_DYNAMIC_PAGES, e, a, t],
|
|
185
185
|
staleTime: 3600 * 1e3,
|
|
@@ -191,8 +191,8 @@ const pi = ({ query: e, uuid: t }) => {
|
|
|
191
191
|
enabled: !!a
|
|
192
192
|
}), d = W(() => n === "" ? l.filter((f) => f.lang === "" || f.lang === s) : l.filter((f) => f.lang === n), [n, s, l]);
|
|
193
193
|
return { allLangPages: l, data: d, isFetching: u };
|
|
194
|
-
},
|
|
195
|
-
const { selectedLang: e, fallbackLang: t } = Ne(), [n, s] =
|
|
194
|
+
}, pi = () => {
|
|
195
|
+
const { selectedLang: e, fallbackLang: t } = Ne(), [n, s] = zs(), [r, a] = R(""), i = mi(r, 500), { allLangPages: o, data: l, isFetching: u } = Ei({ query: i }), d = $((h) => s(h), [s]), f = $((h) => a(h), [a]), g = $(() => {
|
|
196
196
|
if (!n) return;
|
|
197
197
|
const h = !(n != null && n.primaryPage), y = e.length === 0, P = h ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, _ = o.filter(
|
|
198
198
|
(E) => (E == null ? void 0 : E.primaryPage) === P || E.id === P
|
|
@@ -210,17 +210,17 @@ const pi = ({ query: e, uuid: t }) => {
|
|
|
210
210
|
updateSearchQuery: f,
|
|
211
211
|
onChangeLanguage: g
|
|
212
212
|
};
|
|
213
|
-
},
|
|
213
|
+
}, yi = _e({ lastSaved: void 0 }), Ws = () => Pe(yi), ge = () => {
|
|
214
214
|
const [e] = Le(), t = e.get("page"), { data: n, isFetching: s } = Ve();
|
|
215
215
|
return { data: W(() => ({ ...oe(n, { id: t }) || {} }), [n, t]), isFetching: s };
|
|
216
216
|
}, xe = () => {
|
|
217
217
|
const [e] = Le(), t = e.get("lang") ?? "", { data: n, isFetching: s } = Ve();
|
|
218
218
|
return { data: W(() => oe(n, { lang: t }) || {}, [n, t]), isFetching: s };
|
|
219
|
-
},
|
|
219
|
+
}, Ai = _e({}), Ti = () => Pe(Ai), Si = () => {
|
|
220
220
|
const { data: e } = xe(), t = Qn(), n = he("getLiveUrl", un), s = e == null ? void 0 : e.slug, r = n(s || "/");
|
|
221
221
|
return t ? r + t : r;
|
|
222
222
|
}, ye = {
|
|
223
|
-
|
|
223
|
+
...$r,
|
|
224
224
|
//pages
|
|
225
225
|
ADD_PAGE: "add_page",
|
|
226
226
|
EDIT_PAGE: "edit_page",
|
|
@@ -243,10 +243,10 @@ const pi = ({ query: e, uuid: t }) => {
|
|
|
243
243
|
placeholderData: [],
|
|
244
244
|
queryFn: async () => t(e, { action: p.GET_PAGE_TYPES })
|
|
245
245
|
});
|
|
246
|
-
},
|
|
246
|
+
}, _i = (e) => {
|
|
247
247
|
const { data: t } = Re();
|
|
248
248
|
return W(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
|
|
249
|
-
},
|
|
249
|
+
}, Pi = () => {
|
|
250
250
|
const e = I(), t = C();
|
|
251
251
|
return X({
|
|
252
252
|
mutationFn: async ({ pageType: n, query: s }) => {
|
|
@@ -263,7 +263,7 @@ const pi = ({ query: e, uuid: t }) => {
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
});
|
|
266
|
-
},
|
|
266
|
+
}, wi = ({
|
|
267
267
|
page: e,
|
|
268
268
|
setDuplicatePage: t,
|
|
269
269
|
setAddEditPage: n,
|
|
@@ -274,7 +274,7 @@ const pi = ({ query: e, uuid: t }) => {
|
|
|
274
274
|
children: o,
|
|
275
275
|
isLanguagePage: l
|
|
276
276
|
}) => {
|
|
277
|
-
const { t: u } = Ce(), { hasPermission: d } =
|
|
277
|
+
const { t: u } = Ce(), { hasPermission: d } = ks(), { data: f } = Re(), g = W(() => oe(f, { key: e.pageType }), [f, e.pageType]), h = W(() => !!e.isTemplate, [e.isTemplate]), y = W(() => !!(g != null && g.hasSlug), [g == null ? void 0 : g.hasSlug]);
|
|
278
278
|
return !d(ye.EDIT_PAGE) && !d(ye.DELETE_PAGE) && !d(ye.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ m(Bn, { children: [
|
|
279
279
|
/* @__PURE__ */ c(Fn, { asChild: !0, onClick: (S) => S.stopPropagation(), children: o }),
|
|
280
280
|
/* @__PURE__ */ m(Kn, { align: "center", className: "text-sm", children: [
|
|
@@ -286,7 +286,7 @@ const pi = ({ query: e, uuid: t }) => {
|
|
|
286
286
|
S.stopPropagation(), t(e);
|
|
287
287
|
},
|
|
288
288
|
children: [
|
|
289
|
-
/* @__PURE__ */ c(
|
|
289
|
+
/* @__PURE__ */ c(Va, { className: "size-3" }),
|
|
290
290
|
"Duplicate page"
|
|
291
291
|
]
|
|
292
292
|
}
|
|
@@ -302,7 +302,7 @@ const pi = ({ query: e, uuid: t }) => {
|
|
|
302
302
|
});
|
|
303
303
|
},
|
|
304
304
|
children: [
|
|
305
|
-
/* @__PURE__ */ c(
|
|
305
|
+
/* @__PURE__ */ c(Hs, { className: "size-3" }),
|
|
306
306
|
"Edit"
|
|
307
307
|
]
|
|
308
308
|
}
|
|
@@ -315,7 +315,7 @@ const pi = ({ query: e, uuid: t }) => {
|
|
|
315
315
|
S.stopPropagation(), s(e);
|
|
316
316
|
},
|
|
317
317
|
children: [
|
|
318
|
-
/* @__PURE__ */ c(
|
|
318
|
+
/* @__PURE__ */ c(Ha, { className: "size-3" }),
|
|
319
319
|
u("Unpublish")
|
|
320
320
|
]
|
|
321
321
|
}
|
|
@@ -328,7 +328,7 @@ const pi = ({ query: e, uuid: t }) => {
|
|
|
328
328
|
S.stopPropagation(), r(e);
|
|
329
329
|
},
|
|
330
330
|
children: [
|
|
331
|
-
/* @__PURE__ */ c(
|
|
331
|
+
/* @__PURE__ */ c(qa, { className: "size-3" }),
|
|
332
332
|
u("Delete")
|
|
333
333
|
]
|
|
334
334
|
}
|
|
@@ -367,7 +367,7 @@ const pi = ({ query: e, uuid: t }) => {
|
|
|
367
367
|
staleTime: 300 * 1e3,
|
|
368
368
|
placeholderData: {
|
|
369
369
|
languages: [],
|
|
370
|
-
theme:
|
|
370
|
+
theme: li,
|
|
371
371
|
appKey: "",
|
|
372
372
|
fallbackLang: "",
|
|
373
373
|
settings: {},
|
|
@@ -401,7 +401,7 @@ const pi = ({ query: e, uuid: t }) => {
|
|
|
401
401
|
FORCE_TAKE_OVER_REQUEST: "FORCE_TAKE_OVER_REQUEST",
|
|
402
402
|
CONTINUE_EDITING_IN_THIS_CLIENT: "CONTINUE_EDITING_IN_THIS_CLIENT",
|
|
403
403
|
CONTINUE_EDITING_IN_THIS_TAB_REQUEST: "CONTINUE_EDITING_IN_THIS_TAB_REQUEST"
|
|
404
|
-
},
|
|
404
|
+
}, bi = ["sync", "join", "leave"], vi = [
|
|
405
405
|
ie.FORCE_TAKE_OVER,
|
|
406
406
|
ie.TAKE_OVER_REQUEST,
|
|
407
407
|
ie.TAKE_OVER_APPROVED,
|
|
@@ -409,18 +409,18 @@ const pi = ({ query: e, uuid: t }) => {
|
|
|
409
409
|
ie.FORCE_TAKE_OVER_REQUEST,
|
|
410
410
|
ie.CONTINUE_EDITING_IN_THIS_CLIENT,
|
|
411
411
|
ie.CONTINUE_EDITING_IN_THIS_TAB_REQUEST
|
|
412
|
-
],
|
|
413
|
-
const t = {}, n =
|
|
412
|
+
], Ii = _e({}), js = _e(null), Ni = _e(se.CHECKING), Ci = _e({}), Li = (e) => {
|
|
413
|
+
const t = {}, n = La(Bs(e).map(Fs).filter(Boolean), "pageId");
|
|
414
414
|
return Object.entries(n).forEach(
|
|
415
|
-
([s, r]) => t[s] =
|
|
415
|
+
([s, r]) => t[s] = Ms(r, "onlineAt")
|
|
416
416
|
), t;
|
|
417
|
-
},
|
|
418
|
-
const t =
|
|
417
|
+
}, Gi = (e) => {
|
|
418
|
+
const t = Ms(Bs(e).map(Fs).filter(Boolean), "onlineAt"), n = t == null ? void 0 : t.onlineAt;
|
|
419
419
|
return n ? n - 100 : +/* @__PURE__ */ new Date() - 1e3 * 60 * 60 * 4;
|
|
420
420
|
}, fn = () => {
|
|
421
421
|
const { user: e } = zn();
|
|
422
422
|
return e == null ? void 0 : e.id;
|
|
423
|
-
},
|
|
423
|
+
}, Oi = () => {
|
|
424
424
|
const { data: e } = He();
|
|
425
425
|
return `WEBSITE:${e == null ? void 0 : e.appKey}`;
|
|
426
426
|
}, Ut = () => {
|
|
@@ -428,35 +428,35 @@ const pi = ({ query: e, uuid: t }) => {
|
|
|
428
428
|
return e == null ? void 0 : e.id;
|
|
429
429
|
}, Oe = crypto.randomUUID();
|
|
430
430
|
let _n = null;
|
|
431
|
-
const gt = 10,
|
|
432
|
-
const [e, t] = Pe(
|
|
431
|
+
const gt = 10, ki = 1e3, xi = 2, Ri = 16e3, Ys = () => {
|
|
432
|
+
const [e, t] = Pe(Ii);
|
|
433
433
|
return { pageToUser: e, setPageToUser: t };
|
|
434
434
|
}, we = () => {
|
|
435
|
-
const [e, t] = Pe(
|
|
435
|
+
const [e, t] = Pe(Ni), n = [se.LOCKED, se.ACTIVE_IN_ANOTHER_TAB].includes(e), s = [se.EDITING].includes(e);
|
|
436
436
|
return { pageStatus: e, setPageStatus: t, isLocked: n, isEditing: s };
|
|
437
|
-
},
|
|
438
|
-
const [e, t] = Pe(
|
|
437
|
+
}, Js = () => {
|
|
438
|
+
const [e, t] = Pe(Ci);
|
|
439
439
|
return { pageLockMeta: e, setPageLockMeta: t };
|
|
440
|
-
},
|
|
441
|
-
const e = Ut(), { pageToUser: t } =
|
|
440
|
+
}, Di = () => {
|
|
441
|
+
const e = Ut(), { pageToUser: t } = Ys();
|
|
442
442
|
return W(() => t[e], [t, e]);
|
|
443
443
|
}, Wn = () => {
|
|
444
|
-
const e =
|
|
444
|
+
const e = $s(), { setPageStatus: t } = we(), [n] = Pe(js);
|
|
445
445
|
return j(() => {
|
|
446
446
|
if (clearTimeout(_n), !e)
|
|
447
447
|
return _n = setTimeout(() => {
|
|
448
448
|
e || t(se.EDITING);
|
|
449
449
|
}, 500), () => clearTimeout(_n);
|
|
450
450
|
}, [e, t]), n;
|
|
451
|
-
},
|
|
452
|
-
const e = Ut(), t = fn(), n = Wn(), { setPageToUser: s } =
|
|
451
|
+
}, Ui = () => {
|
|
452
|
+
const e = Ut(), t = fn(), n = Wn(), { setPageToUser: s } = Ys(), { setPageStatus: r, pageStatus: a } = we(), i = ce(e);
|
|
453
453
|
return j(() => {
|
|
454
454
|
i.current = e;
|
|
455
455
|
}, [e]), $(
|
|
456
456
|
(o) => {
|
|
457
457
|
const l = o || n;
|
|
458
458
|
if (!l) return [];
|
|
459
|
-
const u = l == null ? void 0 : l.presenceState(), d =
|
|
459
|
+
const u = l == null ? void 0 : l.presenceState(), d = Li(u);
|
|
460
460
|
s(d);
|
|
461
461
|
const f = d[i.current];
|
|
462
462
|
if (!f)
|
|
@@ -471,8 +471,8 @@ const gt = 10, xi = 1e3, Ri = 2, Di = 16e3, js = () => {
|
|
|
471
471
|
},
|
|
472
472
|
[n, s, r, t, a]
|
|
473
473
|
);
|
|
474
|
-
},
|
|
475
|
-
const e = fn(), t = Ut(), n = Wn(), s =
|
|
474
|
+
}, Mi = () => {
|
|
475
|
+
const e = fn(), t = Ut(), n = Wn(), s = Di(), { setPageLockMeta: r } = Js(), a = ce(t);
|
|
476
476
|
return j(() => {
|
|
477
477
|
a.current = t;
|
|
478
478
|
}, [t]), $(
|
|
@@ -483,8 +483,8 @@ const gt = 10, xi = 1e3, Ri = 2, Di = 16e3, js = () => {
|
|
|
483
483
|
},
|
|
484
484
|
[n, e, s, r]
|
|
485
485
|
);
|
|
486
|
-
},
|
|
487
|
-
const e = fn(), t = Ut(), n = Wn(), { setPageStatus: s } = we(), { setPageLockMeta: r } =
|
|
486
|
+
}, Bi = () => {
|
|
487
|
+
const e = fn(), t = Ut(), n = Wn(), { setPageStatus: s } = we(), { setPageLockMeta: r } = Js(), a = Mi(), i = ce(t), { savePageAsync: o } = Ke();
|
|
488
488
|
return j(() => {
|
|
489
489
|
i.current = t;
|
|
490
490
|
}, [t]), $(
|
|
@@ -507,7 +507,7 @@ const gt = 10, xi = 1e3, Ri = 2, Di = 16e3, js = () => {
|
|
|
507
507
|
break;
|
|
508
508
|
}
|
|
509
509
|
case ie.CONTINUE_EDITING_IN_THIS_CLIENT: {
|
|
510
|
-
const f =
|
|
510
|
+
const f = Gi(n == null ? void 0 : n.presenceState());
|
|
511
511
|
s(se.CHECKING), await (n == null ? void 0 : n.track({ onlineAt: f, pageId: i.current, userId: e, clientId: Oe }));
|
|
512
512
|
break;
|
|
513
513
|
}
|
|
@@ -519,18 +519,18 @@ const gt = 10, xi = 1e3, Ri = 2, Di = 16e3, js = () => {
|
|
|
519
519
|
},
|
|
520
520
|
[a, r, s, n, e, o]
|
|
521
521
|
);
|
|
522
|
-
},
|
|
523
|
-
const e =
|
|
522
|
+
}, du = () => {
|
|
523
|
+
const e = $s(), t = fn(), n = Ut(), s = Oi(), [r, a] = Pe(js), i = Bi(), o = Ui(), l = ce(i), u = ce(o), d = ce(null), f = ce(!1), g = ce(0), h = ce(r), y = ce(() => {
|
|
524
524
|
});
|
|
525
525
|
j(() => {
|
|
526
526
|
l.current = i, u.current = o, h.current = r;
|
|
527
527
|
}, [i, o, r]);
|
|
528
528
|
const P = $((_) => {
|
|
529
|
-
|
|
529
|
+
vi.forEach((E) => {
|
|
530
530
|
_.onBroadcast(E, (w) => {
|
|
531
531
|
l.current(E)(w);
|
|
532
532
|
});
|
|
533
|
-
}),
|
|
533
|
+
}), bi.forEach((E) => {
|
|
534
534
|
_.onPresence(E, () => {
|
|
535
535
|
u.current(_);
|
|
536
536
|
});
|
|
@@ -547,8 +547,8 @@ const gt = 10, xi = 1e3, Ri = 2, Di = 16e3, js = () => {
|
|
|
547
547
|
`Attempting to reconnect realtime channel (attempt ${g.current}/${gt})`
|
|
548
548
|
), d.current && (clearTimeout(d.current), d.current = null), h.current && (h.current.unsubscribe(), a(null), h.current = null);
|
|
549
549
|
const _ = Math.min(
|
|
550
|
-
|
|
551
|
-
|
|
550
|
+
ki * Math.pow(xi, g.current - 1),
|
|
551
|
+
Ri
|
|
552
552
|
);
|
|
553
553
|
d.current = setTimeout(() => {
|
|
554
554
|
const E = e.channel(s, {
|
|
@@ -612,7 +612,7 @@ const gt = 10, xi = 1e3, Ri = 2, Di = 16e3, js = () => {
|
|
|
612
612
|
queryFn: async () => e(t, { action: p.GET_WEBSITE_PAGES }) || [],
|
|
613
613
|
placeholderData: (n) => n || []
|
|
614
614
|
});
|
|
615
|
-
},
|
|
615
|
+
}, fu = (e) => {
|
|
616
616
|
const t = C(), n = I(), s = jn();
|
|
617
617
|
return re({
|
|
618
618
|
queryKey: [p.GET_WEBSITE_PAGES, e, s],
|
|
@@ -621,14 +621,14 @@ const gt = 10, xi = 1e3, Ri = 2, Di = 16e3, js = () => {
|
|
|
621
621
|
queryFn: async () => {
|
|
622
622
|
if (s === e) return {};
|
|
623
623
|
const r = await t(n, { action: p.GET_WEBSITE_PAGES, data: { lang: e } }) || [];
|
|
624
|
-
return
|
|
624
|
+
return Ga(
|
|
625
625
|
Jt(r, (a) => ({ ...a, lang: e })),
|
|
626
626
|
"primaryPage"
|
|
627
627
|
);
|
|
628
628
|
},
|
|
629
629
|
placeholderData: (r) => r || {}
|
|
630
630
|
});
|
|
631
|
-
},
|
|
631
|
+
}, Fi = F(() => import("./page-manager-new-Dl5YwsMm.js")), Zs = ({ children: e }) => {
|
|
632
632
|
const { t } = Ce(), [n] = Le(), s = n.get("page"), { data: r, isFetching: a } = ge(), { data: i, isFetching: o } = Yn(), [l, u] = R(!1), [d, f] = R(!0), { savePage: g } = Ke(), h = !!s && !fe(r), { isLocked: y } = we();
|
|
633
633
|
j(() => {
|
|
634
634
|
!o && i && f(!1);
|
|
@@ -643,34 +643,45 @@ const gt = 10, xi = 1e3, Ri = 2, Di = 16e3, js = () => {
|
|
|
643
643
|
onClick: () => {
|
|
644
644
|
y || g(), u(!0);
|
|
645
645
|
},
|
|
646
|
-
children: e || /* @__PURE__ */
|
|
646
|
+
children: e || /* @__PURE__ */ m(
|
|
647
|
+
M,
|
|
648
|
+
{
|
|
649
|
+
variant: "secondary",
|
|
650
|
+
className: "flex w-full items-center justify-center rounded-md p-2 pl-0",
|
|
651
|
+
children: [
|
|
652
|
+
/* @__PURE__ */ c(us, { className: "ml-2 h-10 w-10 fill-primary text-primary" }),
|
|
653
|
+
/* @__PURE__ */ c("div", { className: "flex flex-col items-start", children: /* @__PURE__ */ c("span", { className: "text-sm font-semibold", children: t("Pages") }) })
|
|
654
|
+
]
|
|
655
|
+
},
|
|
656
|
+
"template-viewer"
|
|
657
|
+
)
|
|
647
658
|
}
|
|
648
659
|
),
|
|
649
660
|
/* @__PURE__ */ c(cn, { side: "right", children: /* @__PURE__ */ c("p", { children: t("Open pages manager") }) })
|
|
650
661
|
] }) }) }),
|
|
651
|
-
/* @__PURE__ */ c(
|
|
652
|
-
|
|
662
|
+
/* @__PURE__ */ c(xs, { open: _, onOpenChange: (E) => !E && h && u(!1), children: /* @__PURE__ */ m(
|
|
663
|
+
Rs,
|
|
653
664
|
{
|
|
654
665
|
side: "left",
|
|
655
666
|
"aria-describedby": "pages-manager-description",
|
|
656
667
|
className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${h ? "" : "sheet-hide-close-btn"}`,
|
|
657
668
|
children: [
|
|
658
|
-
/* @__PURE__ */ m(
|
|
659
|
-
/* @__PURE__ */ m(
|
|
660
|
-
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(
|
|
669
|
+
/* @__PURE__ */ m(Qr, { className: "mb-3 px-4 pt-4", children: [
|
|
670
|
+
/* @__PURE__ */ m(zr, { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
671
|
+
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(us, { className: "h-4 w-4" }) }),
|
|
661
672
|
/* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
662
673
|
/* @__PURE__ */ c("span", { className: "text-sm font-semibold", children: t("Pages") }),
|
|
663
674
|
/* @__PURE__ */ c("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: t("Manage your site structure") })
|
|
664
675
|
] })
|
|
665
676
|
] }),
|
|
666
|
-
/* @__PURE__ */ c(
|
|
677
|
+
/* @__PURE__ */ c(Wr, { className: "sr-only", children: t("Manage your site structure") })
|
|
667
678
|
] }),
|
|
668
|
-
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: _ && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
679
|
+
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: _ && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(Fi, { close: () => u(!1) }) }) })
|
|
669
680
|
]
|
|
670
681
|
}
|
|
671
682
|
) })
|
|
672
683
|
] });
|
|
673
|
-
},
|
|
684
|
+
}, Ki = F(() => import("./add-new-page-DG38rI6S.js")), Vi = F(() => import("./delete-page-BDViv7Xm.js")), Hi = F(() => import("./duplicate-page-DfEA148D.js")), qi = F(() => import("./mark-as-template-DOZL3umP.js")), $i = F(() => import("./unmark-as-template-Dn3klZKq.js")), Qi = F(() => import("./unpublish-page-BbFZw0so.js")), zi = () => {
|
|
674
685
|
const [e, t] = R(null), [n, s] = R(null), [r, a] = R(null), [i, o] = R(null), [l, u] = R(null), [d, f] = R(null), { data: g, isFetching: h } = xe(), { selectedLang: y, fallbackLang: P } = Ne(), { data: S } = Ve(), _ = S == null ? void 0 : S.find((A) => A.lang === y), { isLocked: E } = we(), w = !(g != null && g.slug), k = Hn(Xt);
|
|
675
686
|
if (!g) return null;
|
|
676
687
|
const H = (A) => {
|
|
@@ -682,13 +693,13 @@ const gt = 10, xi = 1e3, Ri = 2, Di = 16e3, js = () => {
|
|
|
682
693
|
};
|
|
683
694
|
return /* @__PURE__ */ m(Te, { children: [
|
|
684
695
|
/* @__PURE__ */ m("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
|
|
685
|
-
/* @__PURE__ */ c(
|
|
696
|
+
/* @__PURE__ */ c(Zs, { children: /* @__PURE__ */ c(
|
|
686
697
|
M,
|
|
687
698
|
{
|
|
688
699
|
className: "flex h-7 max-w-[200px] cursor-pointer items-center truncate rounded px-1 text-xs font-medium",
|
|
689
700
|
variant: "ghost",
|
|
690
701
|
children: h ? /* @__PURE__ */ c(dt, { 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: [
|
|
691
|
-
w ? /* @__PURE__ */ c(
|
|
702
|
+
w ? /* @__PURE__ */ c($a, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Qa, { className: "mr-1 h-4 w-4" }),
|
|
692
703
|
q(_ || g, "name") ?? ""
|
|
693
704
|
] })
|
|
694
705
|
}
|
|
@@ -699,10 +710,10 @@ const gt = 10, xi = 1e3, Ri = 2, Di = 16e3, js = () => {
|
|
|
699
710
|
variant: "ghost",
|
|
700
711
|
size: "icon",
|
|
701
712
|
className: "h-7 w-7 cursor-not-allowed rounded opacity-50 hover:bg-transparent",
|
|
702
|
-
children: /* @__PURE__ */ c(
|
|
713
|
+
children: /* @__PURE__ */ c(ds, { className: "h-4 w-4" })
|
|
703
714
|
}
|
|
704
715
|
) : /* @__PURE__ */ c(
|
|
705
|
-
|
|
716
|
+
wi,
|
|
706
717
|
{
|
|
707
718
|
page: g,
|
|
708
719
|
setDuplicatePage: (A) => u(A),
|
|
@@ -712,12 +723,12 @@ const gt = 10, xi = 1e3, Ri = 2, Di = 16e3, js = () => {
|
|
|
712
723
|
setMarkAsTemplate: (A) => a(A),
|
|
713
724
|
setUnmarkAsTemplate: (A) => o(A),
|
|
714
725
|
isLanguagePage: y.length > 0 && y !== P,
|
|
715
|
-
children: /* @__PURE__ */ c(M, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c(
|
|
726
|
+
children: /* @__PURE__ */ c(M, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c(ds, { className: "h-4 w-4" }) })
|
|
716
727
|
}
|
|
717
728
|
)
|
|
718
729
|
] }),
|
|
719
730
|
d && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
720
|
-
|
|
731
|
+
Ki,
|
|
721
732
|
{
|
|
722
733
|
closePanel: () => f(null),
|
|
723
734
|
editPage: () => {
|
|
@@ -726,12 +737,12 @@ const gt = 10, xi = 1e3, Ri = 2, Di = 16e3, js = () => {
|
|
|
726
737
|
setAddEditPage: f
|
|
727
738
|
}
|
|
728
739
|
) }),
|
|
729
|
-
e && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
730
|
-
n && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
731
|
-
r && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
732
|
-
i && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
740
|
+
e && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(Vi, { page: e, onClose: () => t(null) }) }),
|
|
741
|
+
n && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(Qi, { page: n, onClose: () => s(null) }) }),
|
|
742
|
+
r && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(qi, { page: r, onClose: () => a(null) }) }),
|
|
743
|
+
i && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c($i, { page: i, onClose: () => o(null) }) }),
|
|
733
744
|
l && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
734
|
-
|
|
745
|
+
Hi,
|
|
735
746
|
{
|
|
736
747
|
page: l,
|
|
737
748
|
onClose: () => u(null),
|
|
@@ -748,7 +759,7 @@ const gt = 10, xi = 1e3, Ri = 2, Di = 16e3, js = () => {
|
|
|
748
759
|
),
|
|
749
760
|
children: e
|
|
750
761
|
}
|
|
751
|
-
),
|
|
762
|
+
), Wi = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(Jn, { 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: [
|
|
752
763
|
/* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
|
|
753
764
|
/* @__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" })
|
|
754
765
|
] }) }), Ht = {
|
|
@@ -940,14 +951,14 @@ const gt = 10, xi = 1e3, Ri = 2, Di = 16e3, js = () => {
|
|
|
940
951
|
za: "Zhuang, Chuang",
|
|
941
952
|
zu: "Zulu"
|
|
942
953
|
};
|
|
943
|
-
function
|
|
954
|
+
function ji(e, t, n = !1) {
|
|
944
955
|
const s = e.toString() ? `?${e.toString()}` : "/";
|
|
945
956
|
n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
946
957
|
}
|
|
947
|
-
const
|
|
958
|
+
const Yi = F(() => import("./add-new-language-page-DtsBO739.js")), Ji = () => {
|
|
948
959
|
const e = he("topLeftCorner", null);
|
|
949
|
-
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children:
|
|
950
|
-
},
|
|
960
|
+
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Ba.createElement(e, {}) }) : null;
|
|
961
|
+
}, Zi = ({
|
|
951
962
|
showAdd: e = !0,
|
|
952
963
|
variant: t = "ghost",
|
|
953
964
|
goToDefaultLang: n = !1
|
|
@@ -992,10 +1003,10 @@ const Ji = F(() => import("./add-new-language-page-B3GUvWdP.js")), Zi = () => {
|
|
|
992
1003
|
}, _ = (E) => {
|
|
993
1004
|
i(E);
|
|
994
1005
|
const w = new URLSearchParams(window.location.search);
|
|
995
|
-
E === s ? w.delete("lang") : w.set("lang", E),
|
|
1006
|
+
E === s ? w.delete("lang") : w.set("lang", E), ji(w, l);
|
|
996
1007
|
};
|
|
997
1008
|
return fe(r) ? null : u ? /* @__PURE__ */ m(M, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
|
|
998
|
-
/* @__PURE__ */ c(
|
|
1009
|
+
/* @__PURE__ */ c(fs, { className: "h-4 w-4" }),
|
|
999
1010
|
q(Ht, o, o),
|
|
1000
1011
|
/* @__PURE__ */ c(Nn, { className: "h-4 w-4" })
|
|
1001
1012
|
] }) : n ? /* @__PURE__ */ c(M, { onClick: () => _(s), variant: "link", size: "sm", children: d("Switch to default language") }) : /* @__PURE__ */ c(Te, { children: /* @__PURE__ */ m(Bn, { children: [
|
|
@@ -1007,7 +1018,7 @@ const Ji = F(() => import("./add-new-language-page-B3GUvWdP.js")), Zi = () => {
|
|
|
1007
1018
|
size: "sm",
|
|
1008
1019
|
className: "ml-px h-max gap-2 py-1.5",
|
|
1009
1020
|
children: [
|
|
1010
|
-
/* @__PURE__ */ c(
|
|
1021
|
+
/* @__PURE__ */ c(fs, { className: "h-4 w-4" }),
|
|
1011
1022
|
q(Ht, o, o),
|
|
1012
1023
|
/* @__PURE__ */ c(Nn, { className: "h-4 w-4" })
|
|
1013
1024
|
]
|
|
@@ -1027,7 +1038,7 @@ const Ji = F(() => import("./add-new-language-page-B3GUvWdP.js")), Zi = () => {
|
|
|
1027
1038
|
children: [
|
|
1028
1039
|
/* @__PURE__ */ c("div", { className: "text-slate-600", children: E.value }),
|
|
1029
1040
|
E.key === s && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
|
|
1030
|
-
/* @__PURE__ */ c(
|
|
1041
|
+
/* @__PURE__ */ c(za, { fill: "orange", className: "h-2 w-2" }),
|
|
1031
1042
|
"Primary"
|
|
1032
1043
|
] })
|
|
1033
1044
|
]
|
|
@@ -1036,7 +1047,7 @@ const Ji = F(() => import("./add-new-language-page-B3GUvWdP.js")), Zi = () => {
|
|
|
1036
1047
|
)
|
|
1037
1048
|
),
|
|
1038
1049
|
e && !fe(P.filter((E) => !E.isLangPageAdded)) && /* @__PURE__ */ m(Te, { children: [
|
|
1039
|
-
/* @__PURE__ */ c(
|
|
1050
|
+
/* @__PURE__ */ c(jr, {}),
|
|
1040
1051
|
/* @__PURE__ */ m(
|
|
1041
1052
|
M,
|
|
1042
1053
|
{
|
|
@@ -1050,7 +1061,7 @@ const Ji = F(() => import("./add-new-language-page-B3GUvWdP.js")), Zi = () => {
|
|
|
1050
1061
|
},
|
|
1051
1062
|
className: "text-xs font-normal duration-200 hover:bg-slate-300 hover:text-slate-800",
|
|
1052
1063
|
children: [
|
|
1053
|
-
/* @__PURE__ */ c(
|
|
1064
|
+
/* @__PURE__ */ c(qs, { className: "mr-1 h-3 w-3" }),
|
|
1054
1065
|
" Add Language"
|
|
1055
1066
|
]
|
|
1056
1067
|
}
|
|
@@ -1059,13 +1070,13 @@ const Ji = F(() => import("./add-new-language-page-B3GUvWdP.js")), Zi = () => {
|
|
|
1059
1070
|
] })
|
|
1060
1071
|
] }) });
|
|
1061
1072
|
};
|
|
1062
|
-
function
|
|
1063
|
-
const e =
|
|
1073
|
+
function Xi() {
|
|
1074
|
+
const e = Ia(Xt), t = Hn(Xt);
|
|
1064
1075
|
return /* @__PURE__ */ m("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
|
|
1065
|
-
/* @__PURE__ */ c(
|
|
1066
|
-
/* @__PURE__ */ c(
|
|
1076
|
+
/* @__PURE__ */ c(Ji, {}),
|
|
1077
|
+
/* @__PURE__ */ c(Zs, {}),
|
|
1067
1078
|
e && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
1068
|
-
|
|
1079
|
+
Yi,
|
|
1069
1080
|
{
|
|
1070
1081
|
isOpen: !0,
|
|
1071
1082
|
id: e == null ? void 0 : e.id,
|
|
@@ -1077,7 +1088,7 @@ function eo() {
|
|
|
1077
1088
|
) })
|
|
1078
1089
|
] });
|
|
1079
1090
|
}
|
|
1080
|
-
function
|
|
1091
|
+
function eo() {
|
|
1081
1092
|
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: [
|
|
1082
1093
|
/* @__PURE__ */ m("div", { className: "flex-1 space-y-1", children: [
|
|
1083
1094
|
/* @__PURE__ */ c(Kt, { className: "h-4 w-3/4" }),
|
|
@@ -1087,19 +1098,19 @@ function to() {
|
|
|
1087
1098
|
/* @__PURE__ */ c(Kt, { className: "h-8 w-8 rounded-full" })
|
|
1088
1099
|
] }, t)) });
|
|
1089
1100
|
}
|
|
1090
|
-
const
|
|
1091
|
-
function
|
|
1101
|
+
const to = z.lazy(() => import("./page-revisions-content-C1IGUurW.js"));
|
|
1102
|
+
function no() {
|
|
1092
1103
|
const [e, t] = z.useState(!1);
|
|
1093
|
-
return /* @__PURE__ */ c(
|
|
1094
|
-
/* @__PURE__ */ m(
|
|
1095
|
-
/* @__PURE__ */ c(
|
|
1104
|
+
return /* @__PURE__ */ c(Ds, { children: /* @__PURE__ */ m(on, { delayDuration: 0, children: [
|
|
1105
|
+
/* @__PURE__ */ m(xs, { open: e, onOpenChange: t, children: [
|
|
1106
|
+
/* @__PURE__ */ c(Yr, { asChild: !0, children: /* @__PURE__ */ c(ln, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
|
|
1096
1107
|
/* @__PURE__ */ m(M, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
|
|
1097
|
-
/* @__PURE__ */ c(
|
|
1108
|
+
/* @__PURE__ */ c(Wa, { className: "h-4 w-4" }),
|
|
1098
1109
|
/* @__PURE__ */ c("span", { className: "sr-only", children: "View revision history" })
|
|
1099
1110
|
] }),
|
|
1100
1111
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1101
1112
|
] }) }) }),
|
|
1102
|
-
/* @__PURE__ */ c(
|
|
1113
|
+
/* @__PURE__ */ c(Rs, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(Y, { fallback: /* @__PURE__ */ c(eo, {}), children: /* @__PURE__ */ c(to, { isOpen: e }) }) })
|
|
1103
1114
|
] }),
|
|
1104
1115
|
/* @__PURE__ */ c(cn, { side: "bottom", children: /* @__PURE__ */ c("p", { children: "Revision history" }) })
|
|
1105
1116
|
] }) });
|
|
@@ -1110,15 +1121,15 @@ const Pn = ({
|
|
|
1110
1121
|
children: n,
|
|
1111
1122
|
fallback: s = null
|
|
1112
1123
|
}) => {
|
|
1113
|
-
const { hasPermission: r } =
|
|
1124
|
+
const { hasPermission: r } = ks();
|
|
1114
1125
|
return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
|
|
1115
|
-
},
|
|
1126
|
+
}, so = {
|
|
1116
1127
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
1117
|
-
},
|
|
1128
|
+
}, Xs = () => {
|
|
1118
1129
|
var t;
|
|
1119
1130
|
const [e] = dn();
|
|
1120
1131
|
return ((t = e == null ? void 0 : e.flags) == null ? void 0 : t.revisions) ?? !1;
|
|
1121
|
-
},
|
|
1132
|
+
}, hu = () => {
|
|
1122
1133
|
const e = I(), t = J(), n = C(), { data: s } = Re();
|
|
1123
1134
|
return X({
|
|
1124
1135
|
mutationFn: async (r) => await n(e, {
|
|
@@ -1140,11 +1151,11 @@ const Pn = ({
|
|
|
1140
1151
|
onError: (r, a) => {
|
|
1141
1152
|
const i = oe(s, { key: a.pageType });
|
|
1142
1153
|
U.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1143
|
-
description: q(
|
|
1154
|
+
description: q(so, r.message, r.message)
|
|
1144
1155
|
});
|
|
1145
1156
|
}
|
|
1146
1157
|
});
|
|
1147
|
-
},
|
|
1158
|
+
}, gu = () => {
|
|
1148
1159
|
const e = I(), t = J(), n = C(), { data: s } = xe(), { data: r } = Re();
|
|
1149
1160
|
return X({
|
|
1150
1161
|
mutationFn: async (a) => await n(e, {
|
|
@@ -1169,7 +1180,7 @@ const Pn = ({
|
|
|
1169
1180
|
});
|
|
1170
1181
|
}
|
|
1171
1182
|
});
|
|
1172
|
-
},
|
|
1183
|
+
}, mu = () => {
|
|
1173
1184
|
const e = I(), t = J(), n = C(), { data: s } = Re();
|
|
1174
1185
|
return X({
|
|
1175
1186
|
mutationFn: async (r) => n(e, {
|
|
@@ -1198,7 +1209,7 @@ const Pn = ({
|
|
|
1198
1209
|
});
|
|
1199
1210
|
}
|
|
1200
1211
|
});
|
|
1201
|
-
},
|
|
1212
|
+
}, Eu = () => {
|
|
1202
1213
|
const e = I(), t = J(), n = C(), { data: s } = Re();
|
|
1203
1214
|
return X({
|
|
1204
1215
|
mutationFn: async (r) => n(e, {
|
|
@@ -1223,8 +1234,8 @@ const Pn = ({
|
|
|
1223
1234
|
});
|
|
1224
1235
|
}
|
|
1225
1236
|
});
|
|
1226
|
-
},
|
|
1227
|
-
const e = I(), t = C(), n = J(), { data: s } = ge(), { savePageAsync: r } = Ke(), a =
|
|
1237
|
+
}, er = () => {
|
|
1238
|
+
const e = I(), t = C(), n = J(), { data: s } = ge(), { savePageAsync: r } = Ke(), a = Xs();
|
|
1228
1239
|
return X({
|
|
1229
1240
|
mutationFn: async ({ ids: i }) => (await r(), t(e, {
|
|
1230
1241
|
action: p.PUBLISH_CHANGES,
|
|
@@ -1243,7 +1254,7 @@ const Pn = ({
|
|
|
1243
1254
|
console.log("##", i), U.error("Failed to publish pages.");
|
|
1244
1255
|
}
|
|
1245
1256
|
});
|
|
1246
|
-
},
|
|
1257
|
+
}, pu = () => {
|
|
1247
1258
|
const e = I(), t = C(), n = J();
|
|
1248
1259
|
return X({
|
|
1249
1260
|
mutationFn: async (s) => {
|
|
@@ -1268,7 +1279,7 @@ const Pn = ({
|
|
|
1268
1279
|
U.error("Failed to mark page as template.");
|
|
1269
1280
|
}
|
|
1270
1281
|
});
|
|
1271
|
-
},
|
|
1282
|
+
}, yu = () => {
|
|
1272
1283
|
const e = I(), t = C(), n = J();
|
|
1273
1284
|
return X({
|
|
1274
1285
|
mutationFn: async (s) => t(e, {
|
|
@@ -1284,7 +1295,7 @@ const Pn = ({
|
|
|
1284
1295
|
U.error("Failed to unmark page as template.");
|
|
1285
1296
|
}
|
|
1286
1297
|
});
|
|
1287
|
-
},
|
|
1298
|
+
}, Au = () => {
|
|
1288
1299
|
const e = I(), t = C(), n = J();
|
|
1289
1300
|
return X({
|
|
1290
1301
|
mutationFn: async ({ id: s, slug: r }) => t(e, {
|
|
@@ -1302,30 +1313,30 @@ const Pn = ({
|
|
|
1302
1313
|
U.error("Failed to change slug");
|
|
1303
1314
|
}
|
|
1304
1315
|
});
|
|
1305
|
-
},
|
|
1306
|
-
function
|
|
1316
|
+
}, ro = F(() => import("./publish-pages-content-BpEoA1T6.js"));
|
|
1317
|
+
function ao({
|
|
1307
1318
|
showModal: e = !1,
|
|
1308
1319
|
onClose: t = () => console.log("Cancelled")
|
|
1309
1320
|
}) {
|
|
1310
|
-
const { mutate: n, isPending: s } =
|
|
1321
|
+
const { mutate: n, isPending: s } = er();
|
|
1311
1322
|
return /* @__PURE__ */ c(Vn, { open: e, onOpenChange: s ? () => {
|
|
1312
|
-
} : t, children: e && /* @__PURE__ */ c(Y, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(
|
|
1323
|
+
} : t, children: e && /* @__PURE__ */ c(Y, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(ro, { onClose: t, isPending: s, publishPage: n }) }) });
|
|
1313
1324
|
}
|
|
1314
|
-
const
|
|
1325
|
+
const io = (e) => {
|
|
1315
1326
|
const { fallbackLang: t } = Ne(), { data: n } = He(), { data: s, isFetching: r } = Ve(), a = W(() => {
|
|
1316
1327
|
const i = { [t]: !0 };
|
|
1317
|
-
return
|
|
1328
|
+
return Oa(q(n, "languages"), (o) => {
|
|
1318
1329
|
const l = oe(s, { lang: o });
|
|
1319
1330
|
i[o] = !!l;
|
|
1320
1331
|
}), i;
|
|
1321
1332
|
}, [t, s, n]);
|
|
1322
1333
|
return r || fe(e) || e && a[e];
|
|
1323
|
-
},
|
|
1324
|
-
const [e] =
|
|
1334
|
+
}, oo = () => {
|
|
1335
|
+
const [e] = Jr(), { data: t } = Yn();
|
|
1325
1336
|
return $(() => {
|
|
1326
1337
|
if (!t)
|
|
1327
1338
|
return { ids: [], names: [], partialBlocksInfo: [] };
|
|
1328
|
-
const s = qn(e, (l) => l._type === "PartialBlock"), r =
|
|
1339
|
+
const s = qn(e, (l) => l._type === "PartialBlock"), r = ka(yt(s.map((l) => q(l, "partialBlockId", "")))), a = yt(
|
|
1329
1340
|
r.map((l) => {
|
|
1330
1341
|
const u = oe(t, { id: l });
|
|
1331
1342
|
if (!u) return null;
|
|
@@ -1346,12 +1357,12 @@ const oo = (e) => {
|
|
|
1346
1357
|
), i = a.map((l) => l.id), o = a.map((l) => l.name);
|
|
1347
1358
|
return { ids: i, names: o, partialBlocksInfo: a };
|
|
1348
1359
|
}, [e, t]);
|
|
1349
|
-
},
|
|
1360
|
+
}, lo = {
|
|
1350
1361
|
particleCount: 350,
|
|
1351
1362
|
spread: 120,
|
|
1352
1363
|
origin: { y: 0.6 },
|
|
1353
1364
|
angle: 90
|
|
1354
|
-
},
|
|
1365
|
+
}, co = {
|
|
1355
1366
|
TOP_RIGHT: {
|
|
1356
1367
|
angle: 225,
|
|
1357
1368
|
origin: { x: 0.9, y: 0 }
|
|
@@ -1360,14 +1371,14 @@ const oo = (e) => {
|
|
|
1360
1371
|
angle: 100,
|
|
1361
1372
|
origin: { x: 0.9, y: 0.9 }
|
|
1362
1373
|
}
|
|
1363
|
-
},
|
|
1374
|
+
}, uo = async () => {
|
|
1364
1375
|
const { default: e } = await import("canvas-confetti");
|
|
1365
1376
|
return e;
|
|
1366
|
-
},
|
|
1367
|
-
let t =
|
|
1377
|
+
}, ps = (e) => {
|
|
1378
|
+
let t = co[e];
|
|
1368
1379
|
t || (t = {});
|
|
1369
|
-
const n = { ...
|
|
1370
|
-
|
|
1380
|
+
const n = { ...lo, ...t };
|
|
1381
|
+
uo().then((s) => s(n));
|
|
1371
1382
|
};
|
|
1372
1383
|
function Zn({
|
|
1373
1384
|
children: e,
|
|
@@ -1376,16 +1387,16 @@ function Zn({
|
|
|
1376
1387
|
delayDuration: s = 700,
|
|
1377
1388
|
showTooltip: r = !0
|
|
1378
1389
|
}) {
|
|
1379
|
-
return r ? /* @__PURE__ */ c(
|
|
1390
|
+
return r ? /* @__PURE__ */ c(Ds, { children: /* @__PURE__ */ m(on, { delayDuration: s, children: [
|
|
1380
1391
|
/* @__PURE__ */ c(ln, { asChild: !0, children: e }),
|
|
1381
1392
|
/* @__PURE__ */ c(cn, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
|
|
1382
1393
|
] }) }) : e;
|
|
1383
1394
|
}
|
|
1384
|
-
const
|
|
1395
|
+
const fo = F(() => import("./unpublish-page-BbFZw0so.js")), ho = F(
|
|
1385
1396
|
() => import("./translation-warning-modal-kRcfrPgo.js")
|
|
1386
|
-
),
|
|
1397
|
+
), go = F(
|
|
1387
1398
|
() => import("./unpublished-partials-modal-Ts5ZhAK9.js")
|
|
1388
|
-
),
|
|
1399
|
+
), mo = F(() => import("./json-diff-viewer-Ci2IbgDn.js")), Eo = () => {
|
|
1389
1400
|
const { t: e } = Ce(), { selectedLang: t, fallbackLang: n } = Ne(), s = he("getPreviewUrl", async (g) => g), [r, a] = R(""), { data: i } = ge(), { data: o } = Ve(), { data: l } = Re(), u = W(
|
|
1390
1401
|
() => {
|
|
1391
1402
|
var g;
|
|
@@ -1406,9 +1417,9 @@ const ho = F(() => import("./unpublish-page-U_79Pwc0.js")), go = F(
|
|
|
1406
1417
|
} else
|
|
1407
1418
|
a("");
|
|
1408
1419
|
})();
|
|
1409
|
-
}, [s, u, i == null ? void 0 : i.pageType, d, i == null ? void 0 : i.id, f]), /* @__PURE__ */ c(Te, { children: /* @__PURE__ */ c(Zn, { content: e("Open preview in new tab"), delayDuration: 0, children: /* @__PURE__ */ c("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c(M, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ c(
|
|
1410
|
-
},
|
|
1411
|
-
const { t: e } = Ce(), [t, n] =
|
|
1420
|
+
}, [s, u, i == null ? void 0 : i.pageType, d, i == null ? void 0 : i.id, f]), /* @__PURE__ */ c(Te, { children: /* @__PURE__ */ c(Zn, { content: e("Open preview in new tab"), delayDuration: 0, children: /* @__PURE__ */ c("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c(M, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ c(Ya, { className: "h-4 w-4" }) }) }) }) });
|
|
1421
|
+
}, po = () => {
|
|
1422
|
+
const { t: e } = Ce(), [t, n] = Zr();
|
|
1412
1423
|
return /* @__PURE__ */ m(Te, { children: [
|
|
1413
1424
|
/* @__PURE__ */ c(Zn, { content: e("Theme"), delayDuration: 0, children: /* @__PURE__ */ c(
|
|
1414
1425
|
M,
|
|
@@ -1417,12 +1428,12 @@ const ho = F(() => import("./unpublish-page-U_79Pwc0.js")), go = F(
|
|
|
1417
1428
|
size: "icon",
|
|
1418
1429
|
className: "gap-2",
|
|
1419
1430
|
onClick: () => n(t === "theme" ? "block" : "theme"),
|
|
1420
|
-
children: /* @__PURE__ */ c(
|
|
1431
|
+
children: /* @__PURE__ */ c(ja, { className: "h-4 w-4" })
|
|
1421
1432
|
}
|
|
1422
1433
|
) }),
|
|
1423
1434
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1424
1435
|
] });
|
|
1425
|
-
},
|
|
1436
|
+
}, yo = () => {
|
|
1426
1437
|
const { t: e } = Ce(), [t, n] = R(!1), { isLocked: s } = we(), { savePageAsync: r, saveState: a } = Ke();
|
|
1427
1438
|
j(() => {
|
|
1428
1439
|
const d = (f) => {
|
|
@@ -1439,7 +1450,7 @@ const ho = F(() => import("./unpublish-page-U_79Pwc0.js")), go = F(
|
|
|
1439
1450
|
case "UNSAVED":
|
|
1440
1451
|
return {
|
|
1441
1452
|
tooltipContent: e("Save draft"),
|
|
1442
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1453
|
+
buttonIcon: /* @__PURE__ */ c(Za, { className: "h-4 w-4" }),
|
|
1443
1454
|
buttonClass: "gap-x-1"
|
|
1444
1455
|
};
|
|
1445
1456
|
case "SAVING":
|
|
@@ -1451,7 +1462,7 @@ const ho = F(() => import("./unpublish-page-U_79Pwc0.js")), go = F(
|
|
|
1451
1462
|
case "SAVED":
|
|
1452
1463
|
return {
|
|
1453
1464
|
tooltipContent: e("Saved"),
|
|
1454
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1465
|
+
buttonIcon: /* @__PURE__ */ c(Ja, { className: "h-4 w-4" }),
|
|
1455
1466
|
buttonClass: "text-green-500 gap-x-1"
|
|
1456
1467
|
};
|
|
1457
1468
|
}
|
|
@@ -1461,8 +1472,8 @@ const ho = F(() => import("./unpublish-page-U_79Pwc0.js")), go = F(
|
|
|
1461
1472
|
" ",
|
|
1462
1473
|
u
|
|
1463
1474
|
] });
|
|
1464
|
-
},
|
|
1465
|
-
const { t: e } = Ce(), { selectedLang: t } = Ne(), { data: n } = xe(), { data: s } = Ve(), r =
|
|
1475
|
+
}, Ao = () => {
|
|
1476
|
+
const { t: e } = Ce(), { selectedLang: t } = Ne(), { data: n } = xe(), { data: s } = Ve(), r = oo(), [a, i] = R(!1), [o, l] = R(!1), [u, d] = R(null), [f, g] = R(!1), { savePageAsync: h } = Ke(), [y, P] = R(!1), [S, _] = R(!1), [E, w] = R([]), [k, H] = R([]), { data: A } = ge(), { mutate: me, isPending: ae } = er(), { needTranslations: K } = Ke(), v = K(), { buttonText: N, buttonClassName: Q, isPublished: B, hasUnpublishedChanges: le } = W(() => {
|
|
1466
1477
|
const ue = A && (A == null ? void 0 : A.online), ve = !fe(A == null ? void 0 : A.changes);
|
|
1467
1478
|
let De = ue ? "hover:bg-green-600 bg-green-500" : "", te = e(ue ? "Published" : "Publish");
|
|
1468
1479
|
return ue && ve && (De = "hover:bg-blue-600 bg-blue-500", te = e("Publish")), {
|
|
@@ -1481,13 +1492,13 @@ const ho = F(() => import("./unpublish-page-U_79Pwc0.js")), go = F(
|
|
|
1481
1492
|
const ve = [n == null ? void 0 : n.id, n == null ? void 0 : n.primaryPage, ...Array.isArray(ue) ? ue : []];
|
|
1482
1493
|
me(
|
|
1483
1494
|
{ ids: yt(ve) },
|
|
1484
|
-
{ onSuccess: () =>
|
|
1495
|
+
{ onSuccess: () => ps("TOP_RIGHT") }
|
|
1485
1496
|
);
|
|
1486
1497
|
}, pe = $((ue) => {
|
|
1487
1498
|
const { ids: ve, partialBlocksInfo: De } = r();
|
|
1488
1499
|
ve.length > 0 ? (w(ve), H(De), _(!0)) : me(
|
|
1489
1500
|
{ ids: yt(ue) },
|
|
1490
|
-
{ onSuccess: () =>
|
|
1501
|
+
{ onSuccess: () => ps("TOP_RIGHT") }
|
|
1491
1502
|
);
|
|
1492
1503
|
}, [r, me]), be = () => {
|
|
1493
1504
|
_(!1), Ee(E), w([]), H([]);
|
|
@@ -1514,14 +1525,14 @@ const ho = F(() => import("./unpublish-page-U_79Pwc0.js")), go = F(
|
|
|
1514
1525
|
"span",
|
|
1515
1526
|
{
|
|
1516
1527
|
className: `flex items-center transition-transform duration-300 ease-in-out ${o ? "-translate-y-10" : ""}`,
|
|
1517
|
-
children: B ? le ? /* @__PURE__ */ c(
|
|
1528
|
+
children: B ? le ? /* @__PURE__ */ c(Hs, { className: "h-4 w-4" }) : /* @__PURE__ */ c(hs, { className: "h-4 w-4" }) : /* @__PURE__ */ c(gs, { className: "h-4 w-4" })
|
|
1518
1529
|
}
|
|
1519
1530
|
),
|
|
1520
1531
|
/* @__PURE__ */ c(
|
|
1521
1532
|
"span",
|
|
1522
1533
|
{
|
|
1523
1534
|
className: `absolute inset-0 left-3 flex items-center transition-transform duration-300 ease-in-out ${o ? "" : "translate-y-10"}`,
|
|
1524
|
-
children: B ? /* @__PURE__ */ c(
|
|
1535
|
+
children: B ? /* @__PURE__ */ c(gs, { className: "h-4 w-4" }) : /* @__PURE__ */ c(hs, { className: "h-4 w-4" })
|
|
1525
1536
|
}
|
|
1526
1537
|
),
|
|
1527
1538
|
/* @__PURE__ */ c("span", { children: N }),
|
|
@@ -1577,10 +1588,10 @@ const ho = F(() => import("./unpublish-page-U_79Pwc0.js")), go = F(
|
|
|
1577
1588
|
] })
|
|
1578
1589
|
] })
|
|
1579
1590
|
] }),
|
|
1580
|
-
/* @__PURE__ */ c(
|
|
1581
|
-
u && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
1591
|
+
/* @__PURE__ */ c(ao, { showModal: a, onClose: () => i(!1) }),
|
|
1592
|
+
u && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(fo, { page: u, onClose: () => d(null) }) }),
|
|
1582
1593
|
f && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
1583
|
-
|
|
1594
|
+
mo,
|
|
1584
1595
|
{
|
|
1585
1596
|
open: f,
|
|
1586
1597
|
onOpenChange: g,
|
|
@@ -1591,7 +1602,7 @@ const ho = F(() => import("./unpublish-page-U_79Pwc0.js")), go = F(
|
|
|
1591
1602
|
}
|
|
1592
1603
|
) }),
|
|
1593
1604
|
y && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
1594
|
-
|
|
1605
|
+
ho,
|
|
1595
1606
|
{
|
|
1596
1607
|
isOpen: y,
|
|
1597
1608
|
onClose: pn,
|
|
@@ -1600,7 +1611,7 @@ const ho = F(() => import("./unpublish-page-U_79Pwc0.js")), go = F(
|
|
|
1600
1611
|
}
|
|
1601
1612
|
) }),
|
|
1602
1613
|
S && /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
1603
|
-
|
|
1614
|
+
go,
|
|
1604
1615
|
{
|
|
1605
1616
|
isOpen: S,
|
|
1606
1617
|
onClose: En,
|
|
@@ -1611,24 +1622,24 @@ const ho = F(() => import("./unpublish-page-U_79Pwc0.js")), go = F(
|
|
|
1611
1622
|
) })
|
|
1612
1623
|
] });
|
|
1613
1624
|
};
|
|
1614
|
-
function
|
|
1615
|
-
const { isLocked: e } = we(), [t] = Le(), n = t.get("lang"), s =
|
|
1625
|
+
function To() {
|
|
1626
|
+
const { isLocked: e } = we(), [t] = Le(), n = t.get("lang"), s = io(n), r = Xs();
|
|
1616
1627
|
return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1617
|
-
r && /* @__PURE__ */ c(
|
|
1618
|
-
/* @__PURE__ */ c(Pn, { permission: ye.EDIT_THEME, children: /* @__PURE__ */ c(
|
|
1619
|
-
/* @__PURE__ */ c(
|
|
1620
|
-
/* @__PURE__ */ c(Pn, { permission: ye.SAVE_PAGE, children: /* @__PURE__ */ c(
|
|
1621
|
-
/* @__PURE__ */ c(Pn, { permission: ye.PUBLISH_PAGE, children: /* @__PURE__ */ c(
|
|
1628
|
+
r && /* @__PURE__ */ c(no, {}),
|
|
1629
|
+
/* @__PURE__ */ c(Pn, { permission: ye.EDIT_THEME, children: /* @__PURE__ */ c(po, {}) }),
|
|
1630
|
+
/* @__PURE__ */ c(Eo, {}),
|
|
1631
|
+
/* @__PURE__ */ c(Pn, { permission: ye.SAVE_PAGE, children: /* @__PURE__ */ c(yo, {}) }),
|
|
1632
|
+
/* @__PURE__ */ c(Pn, { permission: ye.PUBLISH_PAGE, children: /* @__PURE__ */ c(Ao, {}) })
|
|
1622
1633
|
] });
|
|
1623
1634
|
}
|
|
1624
|
-
const
|
|
1625
|
-
const { dynamicPage: e, allLangPages: t, isFetching: n } =
|
|
1635
|
+
const So = F(() => import("./dynamic-page-selector-DB__KD2y.js")), _o = () => {
|
|
1636
|
+
const { dynamicPage: e, allLangPages: t, isFetching: n } = pi(), s = t.length > 0;
|
|
1626
1637
|
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1627
|
-
!e && /* @__PURE__ */ c(
|
|
1628
|
-
/* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
1638
|
+
!e && /* @__PURE__ */ c(Wi, { hasDynamicPage: s }),
|
|
1639
|
+
/* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(So, {}) })
|
|
1629
1640
|
] });
|
|
1630
|
-
},
|
|
1631
|
-
const { data: e, isFetching: t } = xe(), { data: n, isFetching: s } = ge(), r = q(n, "dynamic", !1), a = Qn(), i =
|
|
1641
|
+
}, Po = () => {
|
|
1642
|
+
const { data: e, isFetching: t } = xe(), { data: n, isFetching: s } = ge(), r = q(n, "dynamic", !1), a = Qn(), i = Ta("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, u = Si(), d = t || s, g = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
|
|
1632
1643
|
return /* @__PURE__ */ m("div", { className: "relative flex items-center", children: [
|
|
1633
1644
|
/* @__PURE__ */ c(
|
|
1634
1645
|
"div",
|
|
@@ -1637,7 +1648,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1637
1648
|
"flex h-8 w-auto max-w-[600px] items-center rounded-l-md border border-r-0 border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800",
|
|
1638
1649
|
d && "max-w-0 overflow-hidden opacity-0"
|
|
1639
1650
|
),
|
|
1640
|
-
children: /* @__PURE__ */ c(
|
|
1651
|
+
children: /* @__PURE__ */ c(zi, {})
|
|
1641
1652
|
}
|
|
1642
1653
|
),
|
|
1643
1654
|
/* @__PURE__ */ m(
|
|
@@ -1648,7 +1659,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1648
1659
|
d && "max-w-0 overflow-hidden opacity-0"
|
|
1649
1660
|
),
|
|
1650
1661
|
children: [
|
|
1651
|
-
/* @__PURE__ */ c(
|
|
1662
|
+
/* @__PURE__ */ c(Zi, {}),
|
|
1652
1663
|
/* @__PURE__ */ m("div", { className: "flex w-full items-center overflow-hidden", children: [
|
|
1653
1664
|
/* @__PURE__ */ c(
|
|
1654
1665
|
"div",
|
|
@@ -1660,18 +1671,18 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1660
1671
|
] }) : g
|
|
1661
1672
|
}
|
|
1662
1673
|
),
|
|
1663
|
-
!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(
|
|
1674
|
+
!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(Xa, { className: "h-4 w-4", strokeWidth: 1 }) }) })
|
|
1664
1675
|
] })
|
|
1665
1676
|
]
|
|
1666
1677
|
}
|
|
1667
1678
|
),
|
|
1668
|
-
r && i && /* @__PURE__ */ c(
|
|
1679
|
+
r && i && /* @__PURE__ */ c(_o, {})
|
|
1669
1680
|
] });
|
|
1670
|
-
},
|
|
1671
|
-
/* @__PURE__ */ c("div", { className: "flex justify-start", children: /* @__PURE__ */ c(
|
|
1672
|
-
/* @__PURE__ */ c("div", { className: "flex justify-center", children: /* @__PURE__ */ c(
|
|
1673
|
-
/* @__PURE__ */ c("div", { className: "flex justify-end", children: /* @__PURE__ */ c(
|
|
1674
|
-
] }),
|
|
1681
|
+
}, wo = () => /* @__PURE__ */ m("div", { className: "grid h-full w-full grid-cols-3 items-center px-2", children: [
|
|
1682
|
+
/* @__PURE__ */ c("div", { className: "flex justify-start", children: /* @__PURE__ */ c(Xi, {}) }),
|
|
1683
|
+
/* @__PURE__ */ c("div", { className: "flex justify-center", children: /* @__PURE__ */ c(Po, {}) }),
|
|
1684
|
+
/* @__PURE__ */ c("div", { className: "flex justify-end", children: /* @__PURE__ */ c(To, {}) })
|
|
1685
|
+
] }), tr = () => {
|
|
1675
1686
|
const e = J(), { data: t } = re({
|
|
1676
1687
|
queryKey: [p.AI_CONTEXT],
|
|
1677
1688
|
initialData: "",
|
|
@@ -1684,8 +1695,8 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1684
1695
|
},
|
|
1685
1696
|
[e]
|
|
1686
1697
|
), aiContext: t };
|
|
1687
|
-
},
|
|
1688
|
-
const e = I(), { aiContext: t } =
|
|
1698
|
+
}, bo = () => {
|
|
1699
|
+
const e = I(), { aiContext: t } = tr(), n = C();
|
|
1689
1700
|
return $(
|
|
1690
1701
|
async (s, r, a, i) => n(e, {
|
|
1691
1702
|
action: p.ASK_AI,
|
|
@@ -1693,12 +1704,12 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1693
1704
|
}),
|
|
1694
1705
|
[e, t, n]
|
|
1695
1706
|
);
|
|
1696
|
-
},
|
|
1707
|
+
}, vo = (e) => W(() => {
|
|
1697
1708
|
if (!e || fe(e)) return { blocks: [] };
|
|
1698
|
-
const t = qn(e, (n) => !
|
|
1699
|
-
return { blocks:
|
|
1700
|
-
}, [e]),
|
|
1701
|
-
const [e] = Le(), t = e.get("page"), n = I(), { setAiContext: s } =
|
|
1709
|
+
const t = qn(e, (n) => !xa(n == null ? void 0 : n._type, "@chai/"));
|
|
1710
|
+
return { blocks: ci(t) };
|
|
1711
|
+
}, [e]), Io = () => {
|
|
1712
|
+
const [e] = Le(), t = e.get("page"), n = I(), { setAiContext: s } = tr(), [, r] = Ws(), [, a] = Ti(), [, i] = Xr(), o = C();
|
|
1702
1713
|
return re({
|
|
1703
1714
|
queryKey: [p.GET_DRAFT_PAGE, t],
|
|
1704
1715
|
staleTime: 1 / 0,
|
|
@@ -1713,7 +1724,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1713
1724
|
},
|
|
1714
1725
|
enabled: !!t
|
|
1715
1726
|
});
|
|
1716
|
-
},
|
|
1727
|
+
}, No = () => {
|
|
1717
1728
|
const { data: e } = ge(), { data: t } = xe(), n = I(), s = C(), r = jn(), a = Qn();
|
|
1718
1729
|
return re({
|
|
1719
1730
|
queryKey: [p.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
|
|
@@ -1743,7 +1754,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1743
1754
|
}),
|
|
1744
1755
|
enabled: !!(e != null && e.pageType) && !!t.id
|
|
1745
1756
|
});
|
|
1746
|
-
},
|
|
1757
|
+
}, Co = () => {
|
|
1747
1758
|
const e = I(), t = J(), n = C();
|
|
1748
1759
|
return X({
|
|
1749
1760
|
mutationFn: async (s) => n(e, {
|
|
@@ -1762,7 +1773,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1762
1773
|
});
|
|
1763
1774
|
}
|
|
1764
1775
|
});
|
|
1765
|
-
},
|
|
1776
|
+
}, Tu = () => {
|
|
1766
1777
|
const e = I(), t = J(), n = C(), { selectedLang: s } = Ne();
|
|
1767
1778
|
return X({
|
|
1768
1779
|
mutationFn: async (r) => n(e, { action: p.ADD_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
@@ -1777,7 +1788,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1777
1788
|
});
|
|
1778
1789
|
}
|
|
1779
1790
|
});
|
|
1780
|
-
},
|
|
1791
|
+
}, Su = () => {
|
|
1781
1792
|
const e = I(), t = J(), n = C(), { selectedLang: s } = Ne();
|
|
1782
1793
|
return X({
|
|
1783
1794
|
mutationFn: async (r) => n(e, { action: p.UPDATE_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
@@ -1792,7 +1803,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1792
1803
|
});
|
|
1793
1804
|
}
|
|
1794
1805
|
});
|
|
1795
|
-
},
|
|
1806
|
+
}, _u = () => {
|
|
1796
1807
|
const e = I(), t = J(), n = C();
|
|
1797
1808
|
return X({
|
|
1798
1809
|
mutationFn: async (s) => n(e, { action: p.DELETE_GLOBAL_SCHEMA, data: { id: s } }),
|
|
@@ -1807,7 +1818,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1807
1818
|
});
|
|
1808
1819
|
}
|
|
1809
1820
|
});
|
|
1810
|
-
},
|
|
1821
|
+
}, Pu = () => {
|
|
1811
1822
|
const e = I(), t = C();
|
|
1812
1823
|
return X({
|
|
1813
1824
|
mutationFn: async (n) => t(e, { action: p.TOGGLE_PAGE_GLOBAL_SCHEMA, data: n }),
|
|
@@ -1817,7 +1828,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1817
1828
|
});
|
|
1818
1829
|
}
|
|
1819
1830
|
});
|
|
1820
|
-
},
|
|
1831
|
+
}, wu = () => {
|
|
1821
1832
|
const e = I(), t = C();
|
|
1822
1833
|
return X({
|
|
1823
1834
|
mutationFn: async (n) => t(e, { action: p.APPLY_SCHEMA_TO_ALL_PAGES, data: { schemaId: n } }),
|
|
@@ -1830,7 +1841,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1830
1841
|
});
|
|
1831
1842
|
}
|
|
1832
1843
|
});
|
|
1833
|
-
},
|
|
1844
|
+
}, bu = () => {
|
|
1834
1845
|
const e = I(), t = C();
|
|
1835
1846
|
return X({
|
|
1836
1847
|
mutationFn: async (n) => t(e, { action: p.REMOVE_SCHEMA_FROM_ALL_PAGES, data: { schemaId: n } }),
|
|
@@ -1843,13 +1854,13 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1843
1854
|
});
|
|
1844
1855
|
}
|
|
1845
1856
|
});
|
|
1846
|
-
},
|
|
1857
|
+
}, ys = {
|
|
1847
1858
|
async getUILibraryBlock(e, t, n) {
|
|
1848
1859
|
const s = await t(n, {
|
|
1849
1860
|
action: "GET_LIBRARY_ITEM",
|
|
1850
1861
|
data: { id: e.id }
|
|
1851
1862
|
}), r = q(s, "html", ""), a = q(s, "blocks", []);
|
|
1852
|
-
return
|
|
1863
|
+
return Ra(a) ? a : ui(r);
|
|
1853
1864
|
},
|
|
1854
1865
|
async getUILibraryBlocks(e, t, n) {
|
|
1855
1866
|
return (await t(n, {
|
|
@@ -1859,7 +1870,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1859
1870
|
...r
|
|
1860
1871
|
}));
|
|
1861
1872
|
}
|
|
1862
|
-
},
|
|
1873
|
+
}, Lo = () => {
|
|
1863
1874
|
const e = I(), t = C();
|
|
1864
1875
|
return re({
|
|
1865
1876
|
queryKey: ["uiLibraries"],
|
|
@@ -1869,21 +1880,21 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1869
1880
|
...r
|
|
1870
1881
|
}));
|
|
1871
1882
|
return s.forEach((r) => {
|
|
1872
|
-
|
|
1883
|
+
Sa(r.id, {
|
|
1873
1884
|
name: r.isSiteLibrary ? r.name + " (Current Site) " : r.name,
|
|
1874
1885
|
description: r.description,
|
|
1875
|
-
getBlocksList: (a) =>
|
|
1876
|
-
getBlock: ({ block: a }) =>
|
|
1886
|
+
getBlocksList: (a) => ys.getUILibraryBlocks(a, t, e),
|
|
1887
|
+
getBlock: ({ block: a }) => ys.getUILibraryBlock(a, t, e)
|
|
1877
1888
|
});
|
|
1878
1889
|
}), s;
|
|
1879
1890
|
}
|
|
1880
1891
|
});
|
|
1881
|
-
},
|
|
1892
|
+
}, Go = (e = 300) => {
|
|
1882
1893
|
const t = he("onLogout", un), n = he("getAccessToken"), s = I();
|
|
1883
1894
|
return re({
|
|
1884
1895
|
queryKey: ["check-user-access"],
|
|
1885
1896
|
queryFn: async () => {
|
|
1886
|
-
const r = await n(), i = await
|
|
1897
|
+
const r = await n(), i = await Qs(
|
|
1887
1898
|
s + "?action=check_user_access",
|
|
1888
1899
|
{ action: "CHECK_USER_ACCESS" },
|
|
1889
1900
|
{ Authorization: `Bearer ${r}` }
|
|
@@ -1896,7 +1907,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1896
1907
|
refetchIntervalInBackground: !0,
|
|
1897
1908
|
retry: !1
|
|
1898
1909
|
});
|
|
1899
|
-
},
|
|
1910
|
+
}, Oo = () => {
|
|
1900
1911
|
const e = I(), t = C(), { user: n } = zn(), s = n == null ? void 0 : n.id;
|
|
1901
1912
|
return re({
|
|
1902
1913
|
queryKey: [p.GET_ROLE_AND_PERMISSIONS, s],
|
|
@@ -1907,8 +1918,8 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1907
1918
|
enabled: !!s,
|
|
1908
1919
|
staleTime: 1 / 0
|
|
1909
1920
|
});
|
|
1910
|
-
},
|
|
1911
|
-
const e = I(), t = C(), [, n] =
|
|
1921
|
+
}, ko = () => {
|
|
1922
|
+
const e = I(), t = C(), [, n] = Ws(), s = J();
|
|
1912
1923
|
return { onSave: async ({
|
|
1913
1924
|
page: a,
|
|
1914
1925
|
blocks: i,
|
|
@@ -1927,7 +1938,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1927
1938
|
return console.error(l), new Error("Failed to save blocks");
|
|
1928
1939
|
}
|
|
1929
1940
|
} };
|
|
1930
|
-
},
|
|
1941
|
+
}, xo = () => {
|
|
1931
1942
|
const { data: e } = Yn(), t = I(), n = C();
|
|
1932
1943
|
return {
|
|
1933
1944
|
getPartialBlocks: $(async () => {
|
|
@@ -1935,7 +1946,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1935
1946
|
for (const r of e ?? [])
|
|
1936
1947
|
fe(r == null ? void 0 : r.slug) && (s[r.id] = {
|
|
1937
1948
|
type: r.pageType,
|
|
1938
|
-
name:
|
|
1949
|
+
name: Da(r.name ?? r.slug),
|
|
1939
1950
|
description: ""
|
|
1940
1951
|
});
|
|
1941
1952
|
return s;
|
|
@@ -1956,7 +1967,7 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1956
1967
|
[n, t]
|
|
1957
1968
|
)
|
|
1958
1969
|
};
|
|
1959
|
-
},
|
|
1970
|
+
}, Ro = F(() => import("./ai-panel-content-dktE9CIO.js")), nr = "chai-chat-panel", Do = ({ className: e = "h-full w-full" }) => /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", version: "1.1", className: e, children: [
|
|
1960
1971
|
/* @__PURE__ */ c("title", { children: "ai" }),
|
|
1961
1972
|
/* @__PURE__ */ c("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ c("g", { id: "icon", fill: "currentColor", transform: "translate(64.000000, 64.000000)", children: /* @__PURE__ */ c(
|
|
1962
1973
|
"path",
|
|
@@ -1965,25 +1976,25 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
1965
1976
|
id: "Combined-Shape"
|
|
1966
1977
|
}
|
|
1967
1978
|
) }) })
|
|
1968
|
-
] }),
|
|
1969
|
-
id:
|
|
1979
|
+
] }), Uo = ({ isActive: e, show: t }) => ea("flags.ai", !1) ? /* @__PURE__ */ c(M, { size: "icon", className: "p-0 [&_svg]:size-6", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(Do, { className: e ? "h-5 w-5 text-white" : "h-5 w-5 text-primary" }) }) : null, Mo = {
|
|
1980
|
+
id: nr,
|
|
1970
1981
|
label: "AI Assistant",
|
|
1971
|
-
button:
|
|
1972
|
-
panel:
|
|
1982
|
+
button: Uo,
|
|
1983
|
+
panel: Ro,
|
|
1973
1984
|
position: "top"
|
|
1974
|
-
},
|
|
1985
|
+
}, Bo = F(() => import("./lang-panel-DlAQr-y9.js")), Fo = ({ isActive: e, show: t }) => {
|
|
1975
1986
|
const { data: n } = He();
|
|
1976
|
-
return !$n(n, "languages") || !q(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(
|
|
1977
|
-
},
|
|
1978
|
-
id:
|
|
1987
|
+
return !$n(n, "languages") || !q(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(ei, { className: "h-4 w-4" }) });
|
|
1988
|
+
}, sr = "lang", Ko = {
|
|
1989
|
+
id: sr,
|
|
1979
1990
|
label: "Languages",
|
|
1980
1991
|
position: "top",
|
|
1981
|
-
panel:
|
|
1982
|
-
button:
|
|
1992
|
+
panel: Bo,
|
|
1993
|
+
button: Fo,
|
|
1983
1994
|
view: "modal",
|
|
1984
1995
|
width: 400
|
|
1985
|
-
},
|
|
1986
|
-
const { data: n } = ge(), s =
|
|
1996
|
+
}, Vo = F(() => import("./seo-panel-COrEJZLA.js")), rr = "seo", Ho = ({ isActive: e, show: t }) => {
|
|
1997
|
+
const { data: n } = ge(), s = _i(n == null ? void 0 : n.pageType);
|
|
1987
1998
|
return !$n(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
|
|
1988
1999
|
"svg",
|
|
1989
2000
|
{
|
|
@@ -2002,45 +2013,45 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
2002
2013
|
]
|
|
2003
2014
|
}
|
|
2004
2015
|
) });
|
|
2005
|
-
},
|
|
2006
|
-
id:
|
|
2016
|
+
}, qo = {
|
|
2017
|
+
id: rr,
|
|
2007
2018
|
label: "SEO",
|
|
2008
|
-
panel:
|
|
2009
|
-
button:
|
|
2019
|
+
panel: Vo,
|
|
2020
|
+
button: Ho,
|
|
2010
2021
|
position: "top",
|
|
2011
2022
|
width: 600,
|
|
2012
2023
|
view: "modal"
|
|
2013
|
-
},
|
|
2014
|
-
() => import("./change-password-modal-
|
|
2015
|
-
),
|
|
2024
|
+
}, $o = F(
|
|
2025
|
+
() => import("./change-password-modal-PahNYs8x.js").then((e) => ({ default: e.ChangePasswordModal }))
|
|
2026
|
+
), ar = "user-info", Qo = () => {
|
|
2016
2027
|
const { t: e } = Ce(), { user: t, logout: n } = zn(), s = he("onLogout", un), [r, a] = R(!1);
|
|
2017
|
-
return t ? /* @__PURE__ */ m(
|
|
2018
|
-
/* @__PURE__ */ c(
|
|
2019
|
-
/* @__PURE__ */ m(
|
|
2028
|
+
return t ? /* @__PURE__ */ m(ta, { children: [
|
|
2029
|
+
/* @__PURE__ */ c(na, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(ti, { className: "h-4 w-4" }) }) }),
|
|
2030
|
+
/* @__PURE__ */ m(sa, { className: "w-auto space-y-2 p-4", children: [
|
|
2020
2031
|
/* @__PURE__ */ c("div", { className: "text-sm font-medium", children: t.name ?? t.email }),
|
|
2021
2032
|
/* @__PURE__ */ c("div", { className: "text-xs text-muted-foreground", children: t.email }),
|
|
2022
2033
|
/* @__PURE__ */ c(M, { variant: "outline", size: "sm", className: "w-full", onClick: () => a(!0), children: e("Change Password") }),
|
|
2023
2034
|
r && /* @__PURE__ */ c(
|
|
2024
2035
|
Y,
|
|
2025
2036
|
{
|
|
2026
|
-
fallback: /* @__PURE__ */ c(Vn, { open: r, onOpenChange: a, children: /* @__PURE__ */ c(
|
|
2027
|
-
children: /* @__PURE__ */ c(
|
|
2037
|
+
fallback: /* @__PURE__ */ c(Vn, { open: r, onOpenChange: a, children: /* @__PURE__ */ c(Us, { className: "sm:max-w-[425px]", children: /* @__PURE__ */ c("div", { className: "flex h-[340px] items-center justify-center", children: /* @__PURE__ */ c(dt, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) }) }),
|
|
2038
|
+
children: /* @__PURE__ */ c($o, { open: r, onOpenChange: a })
|
|
2028
2039
|
}
|
|
2029
2040
|
),
|
|
2030
|
-
/* @__PURE__ */ m(
|
|
2031
|
-
/* @__PURE__ */ c(
|
|
2032
|
-
/* @__PURE__ */ m(
|
|
2033
|
-
/* @__PURE__ */ m(
|
|
2034
|
-
/* @__PURE__ */ c(
|
|
2035
|
-
/* @__PURE__ */ c(
|
|
2041
|
+
/* @__PURE__ */ m(ra, { children: [
|
|
2042
|
+
/* @__PURE__ */ c(aa, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "outline", size: "sm", className: "w-full", children: e("Logout") }) }),
|
|
2043
|
+
/* @__PURE__ */ m(ia, { children: [
|
|
2044
|
+
/* @__PURE__ */ m(oa, { children: [
|
|
2045
|
+
/* @__PURE__ */ c(la, { children: e("Are you sure you want to logout?") }),
|
|
2046
|
+
/* @__PURE__ */ c(ca, { children: e("You will be redirected to the login page.") })
|
|
2036
2047
|
] }),
|
|
2037
|
-
/* @__PURE__ */ m(
|
|
2038
|
-
/* @__PURE__ */ c(
|
|
2048
|
+
/* @__PURE__ */ m(ua, { children: [
|
|
2049
|
+
/* @__PURE__ */ c(da, { children: e("Cancel") }),
|
|
2039
2050
|
/* @__PURE__ */ c(
|
|
2040
|
-
|
|
2051
|
+
fa,
|
|
2041
2052
|
{
|
|
2042
2053
|
onClick: () => {
|
|
2043
|
-
n(),
|
|
2054
|
+
n(), Ua(s) && s();
|
|
2044
2055
|
},
|
|
2045
2056
|
children: e("Logout")
|
|
2046
2057
|
}
|
|
@@ -2050,13 +2061,13 @@ const _o = F(() => import("./dynamic-page-selector-r5IR9_7k.js")), Po = () => {
|
|
|
2050
2061
|
] })
|
|
2051
2062
|
] })
|
|
2052
2063
|
] }) : null;
|
|
2053
|
-
},
|
|
2054
|
-
id:
|
|
2064
|
+
}, zo = {
|
|
2065
|
+
id: ar,
|
|
2055
2066
|
label: "User Info",
|
|
2056
|
-
button:
|
|
2067
|
+
button: Qo,
|
|
2057
2068
|
position: "bottom"
|
|
2058
|
-
},
|
|
2059
|
-
Vt(
|
|
2069
|
+
}, Wo = () => {
|
|
2070
|
+
Vt(rr, qo), Vt(sr, Ko), Vt(ar, zo), Vt(nr, Mo);
|
|
2060
2071
|
};
|
|
2061
2072
|
var b = {
|
|
2062
2073
|
context: void 0,
|
|
@@ -2064,29 +2075,29 @@ var b = {
|
|
|
2064
2075
|
effects: void 0,
|
|
2065
2076
|
done: !1,
|
|
2066
2077
|
getContextId() {
|
|
2067
|
-
return
|
|
2078
|
+
return As(this.context.count);
|
|
2068
2079
|
},
|
|
2069
2080
|
getNextContextId() {
|
|
2070
|
-
return
|
|
2081
|
+
return As(this.context.count++);
|
|
2071
2082
|
}
|
|
2072
2083
|
};
|
|
2073
|
-
function
|
|
2084
|
+
function As(e) {
|
|
2074
2085
|
const t = String(e), n = t.length - 1;
|
|
2075
2086
|
return b.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
|
|
2076
2087
|
}
|
|
2077
2088
|
function mt(e) {
|
|
2078
2089
|
b.context = e;
|
|
2079
2090
|
}
|
|
2080
|
-
var
|
|
2081
|
-
equals:
|
|
2082
|
-
},
|
|
2091
|
+
var ir = !1, jo = (e, t) => e === t, en = Symbol("solid-proxy"), or = typeof Proxy == "function", lr = Symbol("solid-track"), tn = {
|
|
2092
|
+
equals: jo
|
|
2093
|
+
}, cr = Er, Ge = 1, nn = 2, ur = {
|
|
2083
2094
|
owned: null,
|
|
2084
2095
|
cleanups: null,
|
|
2085
2096
|
context: null,
|
|
2086
2097
|
owner: null
|
|
2087
|
-
}, wn = {}, G = null, bn = null,
|
|
2098
|
+
}, wn = {}, G = null, bn = null, Yo = null, x = null, ne = null, Ie = null, hn = 0;
|
|
2088
2099
|
function Be(e, t) {
|
|
2089
|
-
const n = x, s = G, r = e.length === 0, a = t === void 0 ? s : t, i = r ?
|
|
2100
|
+
const n = x, s = G, r = e.length === 0, a = t === void 0 ? s : t, i = r ? ur : {
|
|
2090
2101
|
owned: null,
|
|
2091
2102
|
cleanups: null,
|
|
2092
2103
|
context: a ? a.context : null,
|
|
@@ -2106,10 +2117,10 @@ function V(e, t) {
|
|
|
2106
2117
|
observers: null,
|
|
2107
2118
|
observerSlots: null,
|
|
2108
2119
|
comparator: t.equals || void 0
|
|
2109
|
-
}, s = (r) => (typeof r == "function" && (r = r(n.value)),
|
|
2110
|
-
return [
|
|
2120
|
+
}, s = (r) => (typeof r == "function" && (r = r(n.value)), mr(n, r));
|
|
2121
|
+
return [gr.bind(n), s];
|
|
2111
2122
|
}
|
|
2112
|
-
function
|
|
2123
|
+
function Jo(e, t, n) {
|
|
2113
2124
|
const s = gn(e, t, !0, Ge);
|
|
2114
2125
|
ht(s);
|
|
2115
2126
|
}
|
|
@@ -2117,20 +2128,20 @@ function Fe(e, t, n) {
|
|
|
2117
2128
|
const s = gn(e, t, !1, Ge);
|
|
2118
2129
|
ht(s);
|
|
2119
2130
|
}
|
|
2120
|
-
function
|
|
2121
|
-
|
|
2131
|
+
function dr(e, t, n) {
|
|
2132
|
+
cr = il;
|
|
2122
2133
|
const s = gn(e, t, !1, Ge);
|
|
2123
2134
|
(!n || !n.render) && (s.user = !0), Ie ? Ie.push(s) : ht(s);
|
|
2124
2135
|
}
|
|
2125
2136
|
function Z(e, t, n) {
|
|
2126
2137
|
n = n ? Object.assign({}, tn, n) : tn;
|
|
2127
2138
|
const s = gn(e, t, !0, 0);
|
|
2128
|
-
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, ht(s),
|
|
2139
|
+
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, ht(s), gr.bind(s);
|
|
2129
2140
|
}
|
|
2130
|
-
function
|
|
2141
|
+
function Zo(e) {
|
|
2131
2142
|
return e && typeof e == "object" && "then" in e;
|
|
2132
2143
|
}
|
|
2133
|
-
function
|
|
2144
|
+
function Xo(e, t, n) {
|
|
2134
2145
|
let s, r, a;
|
|
2135
2146
|
s = !0, r = e, a = {};
|
|
2136
2147
|
let i = null, o = wn, l = null, u = !1, d = "initialValue" in a, f = typeof s == "function" && Z(s);
|
|
@@ -2151,7 +2162,7 @@ function el(e, t, n) {
|
|
|
2151
2162
|
}, !1);
|
|
2152
2163
|
}
|
|
2153
2164
|
function me() {
|
|
2154
|
-
const v =
|
|
2165
|
+
const v = sl, N = h(), Q = P();
|
|
2155
2166
|
if (Q !== void 0 && !i) throw Q;
|
|
2156
2167
|
return x && x.user, N;
|
|
2157
2168
|
}
|
|
@@ -2177,7 +2188,7 @@ function el(e, t, n) {
|
|
|
2177
2188
|
if (Q !== void 0) {
|
|
2178
2189
|
H(i, void 0, jt(Q), N);
|
|
2179
2190
|
return;
|
|
2180
|
-
} else if (!
|
|
2191
|
+
} else if (!Zo(B))
|
|
2181
2192
|
return H(i, B, void 0, N), B;
|
|
2182
2193
|
return i = B, "v" in B ? (B.s === 1 ? H(i, B.v, void 0, N) : H(i, void 0, jt(B.v), N), B) : (u = !0, queueMicrotask(() => u = !1), Se(() => {
|
|
2183
2194
|
k(d ? "refreshing" : "pending"), E();
|
|
@@ -2206,12 +2217,12 @@ function el(e, t, n) {
|
|
|
2206
2217
|
}
|
|
2207
2218
|
});
|
|
2208
2219
|
let K = G;
|
|
2209
|
-
return f ?
|
|
2210
|
-
refetch: (v) =>
|
|
2220
|
+
return f ? Jo(() => (K = G, ae(!1))) : ae(!1), [me, {
|
|
2221
|
+
refetch: (v) => fr(K, () => ae(v)),
|
|
2211
2222
|
mutate: y
|
|
2212
2223
|
}];
|
|
2213
2224
|
}
|
|
2214
|
-
function
|
|
2225
|
+
function vu(e) {
|
|
2215
2226
|
return Se(e, !1);
|
|
2216
2227
|
}
|
|
2217
2228
|
function ee(e) {
|
|
@@ -2224,7 +2235,7 @@ function ee(e) {
|
|
|
2224
2235
|
x = t;
|
|
2225
2236
|
}
|
|
2226
2237
|
}
|
|
2227
|
-
function
|
|
2238
|
+
function Iu(e, t, n) {
|
|
2228
2239
|
const s = Array.isArray(e);
|
|
2229
2240
|
let r, a = n && n.defer;
|
|
2230
2241
|
return (i) => {
|
|
@@ -2239,16 +2250,16 @@ function Nu(e, t, n) {
|
|
|
2239
2250
|
return r = o, l;
|
|
2240
2251
|
};
|
|
2241
2252
|
}
|
|
2242
|
-
function
|
|
2243
|
-
|
|
2253
|
+
function el(e) {
|
|
2254
|
+
dr(() => ee(e));
|
|
2244
2255
|
}
|
|
2245
2256
|
function At(e) {
|
|
2246
2257
|
return G === null || (G.cleanups === null ? G.cleanups = [e] : G.cleanups.push(e)), e;
|
|
2247
2258
|
}
|
|
2248
|
-
function
|
|
2259
|
+
function Ts() {
|
|
2249
2260
|
return G;
|
|
2250
2261
|
}
|
|
2251
|
-
function
|
|
2262
|
+
function fr(e, t) {
|
|
2252
2263
|
const n = G, s = x;
|
|
2253
2264
|
G = e, x = null;
|
|
2254
2265
|
try {
|
|
@@ -2259,7 +2270,7 @@ function dr(e, t) {
|
|
|
2259
2270
|
G = n, x = s;
|
|
2260
2271
|
}
|
|
2261
2272
|
}
|
|
2262
|
-
function
|
|
2273
|
+
function tl(e) {
|
|
2263
2274
|
const t = x, n = G;
|
|
2264
2275
|
return Promise.resolve().then(() => {
|
|
2265
2276
|
x = t, G = n;
|
|
@@ -2267,31 +2278,31 @@ function nl(e) {
|
|
|
2267
2278
|
return Se(e, !1), x = G = null, s ? s.done : void 0;
|
|
2268
2279
|
});
|
|
2269
2280
|
}
|
|
2270
|
-
var [
|
|
2271
|
-
function
|
|
2272
|
-
return [
|
|
2281
|
+
var [nl, Nu] = /* @__PURE__ */ V(!1);
|
|
2282
|
+
function Cu() {
|
|
2283
|
+
return [nl, tl];
|
|
2273
2284
|
}
|
|
2274
|
-
function
|
|
2285
|
+
function Lu(e, t) {
|
|
2275
2286
|
const n = Symbol("context");
|
|
2276
2287
|
return {
|
|
2277
2288
|
id: n,
|
|
2278
|
-
Provider:
|
|
2289
|
+
Provider: ol(n),
|
|
2279
2290
|
defaultValue: e
|
|
2280
2291
|
};
|
|
2281
2292
|
}
|
|
2282
|
-
function
|
|
2293
|
+
function Gu(e) {
|
|
2283
2294
|
let t;
|
|
2284
2295
|
return G && G.context && (t = G.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
2285
2296
|
}
|
|
2286
|
-
function
|
|
2297
|
+
function hr(e) {
|
|
2287
2298
|
const t = Z(e), n = Z(() => Cn(t()));
|
|
2288
2299
|
return n.toArray = () => {
|
|
2289
2300
|
const s = n();
|
|
2290
2301
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
2291
2302
|
}, n;
|
|
2292
2303
|
}
|
|
2293
|
-
var
|
|
2294
|
-
function
|
|
2304
|
+
var sl;
|
|
2305
|
+
function gr() {
|
|
2295
2306
|
if (this.sources && this.state)
|
|
2296
2307
|
if (this.state === Ge) ht(this);
|
|
2297
2308
|
else {
|
|
@@ -2304,12 +2315,12 @@ function hr() {
|
|
|
2304
2315
|
}
|
|
2305
2316
|
return this.value;
|
|
2306
2317
|
}
|
|
2307
|
-
function
|
|
2318
|
+
function mr(e, t, n) {
|
|
2308
2319
|
let s = e.value;
|
|
2309
2320
|
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && Se(() => {
|
|
2310
2321
|
for (let r = 0; r < e.observers.length; r += 1) {
|
|
2311
2322
|
const a = e.observers[r], i = bn && bn.running;
|
|
2312
|
-
i && bn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ne.push(a) : Ie.push(a), a.observers &&
|
|
2323
|
+
i && bn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ne.push(a) : Ie.push(a), a.observers && pr(a)), i || (a.state = Ge);
|
|
2313
2324
|
}
|
|
2314
2325
|
if (ne.length > 1e6)
|
|
2315
2326
|
throw ne = [], new Error();
|
|
@@ -2319,9 +2330,9 @@ function ht(e) {
|
|
|
2319
2330
|
if (!e.fn) return;
|
|
2320
2331
|
Tt(e);
|
|
2321
2332
|
const t = hn;
|
|
2322
|
-
|
|
2333
|
+
rl(e, e.value, t);
|
|
2323
2334
|
}
|
|
2324
|
-
function
|
|
2335
|
+
function rl(e, t, n) {
|
|
2325
2336
|
let s;
|
|
2326
2337
|
const r = G, a = x;
|
|
2327
2338
|
x = G = e;
|
|
@@ -2332,7 +2343,7 @@ function al(e, t, n) {
|
|
|
2332
2343
|
} finally {
|
|
2333
2344
|
x = a, G = r;
|
|
2334
2345
|
}
|
|
2335
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ?
|
|
2346
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? mr(e, s) : e.value = s, e.updatedAt = n);
|
|
2336
2347
|
}
|
|
2337
2348
|
function gn(e, t, n, s = Ge, r) {
|
|
2338
2349
|
const a = {
|
|
@@ -2348,7 +2359,7 @@ function gn(e, t, n, s = Ge, r) {
|
|
|
2348
2359
|
context: G ? G.context : null,
|
|
2349
2360
|
pure: n
|
|
2350
2361
|
};
|
|
2351
|
-
return G === null || G !==
|
|
2362
|
+
return G === null || G !== ur && (G.owned ? G.owned.push(a) : G.owned = [a]), a;
|
|
2352
2363
|
}
|
|
2353
2364
|
function sn(e) {
|
|
2354
2365
|
if (e.state === 0) return;
|
|
@@ -2371,20 +2382,20 @@ function Se(e, t) {
|
|
|
2371
2382
|
t || (ne = []), Ie ? n = !0 : Ie = [], hn++;
|
|
2372
2383
|
try {
|
|
2373
2384
|
const s = e();
|
|
2374
|
-
return
|
|
2385
|
+
return al(n), s;
|
|
2375
2386
|
} catch (s) {
|
|
2376
2387
|
n || (Ie = null), ne = null, Xn(s);
|
|
2377
2388
|
}
|
|
2378
2389
|
}
|
|
2379
|
-
function
|
|
2380
|
-
if (ne && (
|
|
2390
|
+
function al(e) {
|
|
2391
|
+
if (ne && (Er(ne), ne = null), e) return;
|
|
2381
2392
|
const t = Ie;
|
|
2382
|
-
Ie = null, t.length && Se(() =>
|
|
2393
|
+
Ie = null, t.length && Se(() => cr(t), !1);
|
|
2383
2394
|
}
|
|
2384
|
-
function
|
|
2395
|
+
function Er(e) {
|
|
2385
2396
|
for (let t = 0; t < e.length; t++) sn(e[t]);
|
|
2386
2397
|
}
|
|
2387
|
-
function
|
|
2398
|
+
function il(e) {
|
|
2388
2399
|
let t, n = 0;
|
|
2389
2400
|
for (t = 0; t < e.length; t++) {
|
|
2390
2401
|
const s = e[t];
|
|
@@ -2409,10 +2420,10 @@ function rn(e, t) {
|
|
|
2409
2420
|
}
|
|
2410
2421
|
}
|
|
2411
2422
|
}
|
|
2412
|
-
function
|
|
2423
|
+
function pr(e) {
|
|
2413
2424
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
2414
2425
|
const n = e.observers[t];
|
|
2415
|
-
n.state || (n.state = nn, n.pure ? ne.push(n) : Ie.push(n), n.observers &&
|
|
2426
|
+
n.state || (n.state = nn, n.pure ? ne.push(n) : Ie.push(n), n.observers && pr(n));
|
|
2416
2427
|
}
|
|
2417
2428
|
}
|
|
2418
2429
|
function Tt(e) {
|
|
@@ -2459,24 +2470,24 @@ function Cn(e) {
|
|
|
2459
2470
|
}
|
|
2460
2471
|
return e;
|
|
2461
2472
|
}
|
|
2462
|
-
function
|
|
2473
|
+
function ol(e, t) {
|
|
2463
2474
|
return function(s) {
|
|
2464
2475
|
let r;
|
|
2465
2476
|
return Fe(() => r = ee(() => (G.context = {
|
|
2466
2477
|
...G.context,
|
|
2467
2478
|
[e]: s.value
|
|
2468
|
-
},
|
|
2479
|
+
}, hr(() => s.children))), void 0), r;
|
|
2469
2480
|
};
|
|
2470
2481
|
}
|
|
2471
2482
|
var Ln = Symbol("fallback");
|
|
2472
2483
|
function an(e) {
|
|
2473
2484
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
2474
2485
|
}
|
|
2475
|
-
function
|
|
2486
|
+
function ll(e, t, n = {}) {
|
|
2476
2487
|
let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
|
|
2477
2488
|
return At(() => an(a)), () => {
|
|
2478
2489
|
let l = e() || [], u = l.length, d, f;
|
|
2479
|
-
return l[
|
|
2490
|
+
return l[lr], ee(() => {
|
|
2480
2491
|
let h, y, P, S, _, E, w, k, H;
|
|
2481
2492
|
if (u === 0)
|
|
2482
2493
|
i !== 0 && (an(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [Ln], r[0] = Be((A) => (a[0] = A, n.fallback())), i = 1);
|
|
@@ -2507,11 +2518,11 @@ function cl(e, t, n = {}) {
|
|
|
2507
2518
|
}
|
|
2508
2519
|
};
|
|
2509
2520
|
}
|
|
2510
|
-
function
|
|
2521
|
+
function cl(e, t, n = {}) {
|
|
2511
2522
|
let s = [], r = [], a = [], i = [], o = 0, l;
|
|
2512
2523
|
return At(() => an(a)), () => {
|
|
2513
2524
|
const u = e() || [], d = u.length;
|
|
2514
|
-
return u[
|
|
2525
|
+
return u[lr], ee(() => {
|
|
2515
2526
|
if (d === 0)
|
|
2516
2527
|
return o !== 0 && (an(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [Ln], r[0] = Be((g) => (a[0] = g, n.fallback())), o = 1), r;
|
|
2517
2528
|
for (s[0] === Ln && (a[0](), a = [], s = [], r = [], o = 0), l = 0; l < d; l++)
|
|
@@ -2527,7 +2538,7 @@ function ul(e, t, n = {}) {
|
|
|
2527
2538
|
}
|
|
2528
2539
|
};
|
|
2529
2540
|
}
|
|
2530
|
-
function
|
|
2541
|
+
function yr(e, t) {
|
|
2531
2542
|
return ee(() => e(t || {}));
|
|
2532
2543
|
}
|
|
2533
2544
|
function qt() {
|
|
@@ -2560,19 +2571,19 @@ var Gn = {
|
|
|
2560
2571
|
function vn(e) {
|
|
2561
2572
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
2562
2573
|
}
|
|
2563
|
-
function
|
|
2574
|
+
function ul() {
|
|
2564
2575
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
2565
2576
|
const n = this[e]();
|
|
2566
2577
|
if (n !== void 0) return n;
|
|
2567
2578
|
}
|
|
2568
2579
|
}
|
|
2569
|
-
function
|
|
2580
|
+
function Ar(...e) {
|
|
2570
2581
|
let t = !1;
|
|
2571
2582
|
for (let i = 0; i < e.length; i++) {
|
|
2572
2583
|
const o = e[i];
|
|
2573
2584
|
t = t || !!o && en in o, e[i] = typeof o == "function" ? (t = !0, Z(o)) : o;
|
|
2574
2585
|
}
|
|
2575
|
-
if (
|
|
2586
|
+
if (or && t)
|
|
2576
2587
|
return new Proxy({
|
|
2577
2588
|
get(i) {
|
|
2578
2589
|
for (let o = e.length - 1; o >= 0; o--) {
|
|
@@ -2604,7 +2615,7 @@ function yr(...e) {
|
|
|
2604
2615
|
s[d] = f.get ? {
|
|
2605
2616
|
enumerable: !0,
|
|
2606
2617
|
configurable: !0,
|
|
2607
|
-
get:
|
|
2618
|
+
get: ul.bind(n[d] = [f.get.bind(o)])
|
|
2608
2619
|
} : f.value !== void 0 ? f : void 0;
|
|
2609
2620
|
else {
|
|
2610
2621
|
const g = n[d];
|
|
@@ -2619,8 +2630,8 @@ function yr(...e) {
|
|
|
2619
2630
|
}
|
|
2620
2631
|
return r;
|
|
2621
2632
|
}
|
|
2622
|
-
function
|
|
2623
|
-
if (
|
|
2633
|
+
function dl(e, ...t) {
|
|
2634
|
+
if (or && en in e) {
|
|
2624
2635
|
const r = new Set(t.length > 1 ? t.flat() : t[0]), a = t.map((i) => new Proxy({
|
|
2625
2636
|
get(o) {
|
|
2626
2637
|
return i.includes(o) ? e[o] : void 0;
|
|
@@ -2654,7 +2665,7 @@ function fl(e, ...t) {
|
|
|
2654
2665
|
}
|
|
2655
2666
|
return [...s, n];
|
|
2656
2667
|
}
|
|
2657
|
-
function
|
|
2668
|
+
function Tr(e) {
|
|
2658
2669
|
let t, n;
|
|
2659
2670
|
const s = (r) => {
|
|
2660
2671
|
const a = b.context;
|
|
@@ -2664,7 +2675,7 @@ function Ar(e) {
|
|
|
2664
2675
|
!b.done && mt(a), b.count--, l(() => u.default), mt();
|
|
2665
2676
|
}), t = o;
|
|
2666
2677
|
} else if (!t) {
|
|
2667
|
-
const [o] =
|
|
2678
|
+
const [o] = Xo(() => (n || (n = e())).then((l) => l.default));
|
|
2668
2679
|
t = o;
|
|
2669
2680
|
}
|
|
2670
2681
|
let i;
|
|
@@ -2678,24 +2689,24 @@ function Ar(e) {
|
|
|
2678
2689
|
};
|
|
2679
2690
|
return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
|
|
2680
2691
|
}
|
|
2681
|
-
var
|
|
2682
|
-
function
|
|
2683
|
-
return b.context ? b.getNextContextId() : `cl-${
|
|
2692
|
+
var fl = 0;
|
|
2693
|
+
function Ou() {
|
|
2694
|
+
return b.context ? b.getNextContextId() : `cl-${fl++}`;
|
|
2684
2695
|
}
|
|
2685
|
-
var
|
|
2686
|
-
function
|
|
2696
|
+
var Sr = (e) => `Stale read from <${e}>.`;
|
|
2697
|
+
function ku(e) {
|
|
2687
2698
|
const t = "fallback" in e && {
|
|
2688
2699
|
fallback: () => e.fallback
|
|
2689
2700
|
};
|
|
2690
|
-
return Z(
|
|
2701
|
+
return Z(ll(() => e.each, e.children, t || void 0));
|
|
2691
2702
|
}
|
|
2692
|
-
function
|
|
2703
|
+
function xu(e) {
|
|
2693
2704
|
const t = "fallback" in e && {
|
|
2694
2705
|
fallback: () => e.fallback
|
|
2695
2706
|
};
|
|
2696
|
-
return Z(
|
|
2707
|
+
return Z(cl(() => e.each, e.children, t || void 0));
|
|
2697
2708
|
}
|
|
2698
|
-
function
|
|
2709
|
+
function Ru(e) {
|
|
2699
2710
|
const t = e.keyed, n = Z(() => e.when, void 0, void 0), s = t ? n : Z(n, void 0, {
|
|
2700
2711
|
equals: (r, a) => !r == !a
|
|
2701
2712
|
});
|
|
@@ -2704,15 +2715,15 @@ function Du(e) {
|
|
|
2704
2715
|
if (r) {
|
|
2705
2716
|
const a = e.children;
|
|
2706
2717
|
return typeof a == "function" && a.length > 0 ? ee(() => a(t ? r : () => {
|
|
2707
|
-
if (!ee(s)) throw
|
|
2718
|
+
if (!ee(s)) throw Sr("Show");
|
|
2708
2719
|
return n();
|
|
2709
2720
|
})) : a;
|
|
2710
2721
|
}
|
|
2711
2722
|
return e.fallback;
|
|
2712
2723
|
}, void 0, void 0);
|
|
2713
2724
|
}
|
|
2714
|
-
function
|
|
2715
|
-
const t =
|
|
2725
|
+
function Du(e) {
|
|
2726
|
+
const t = hr(() => e.children), n = Z(() => {
|
|
2716
2727
|
const s = t(), r = Array.isArray(s) ? s : [s];
|
|
2717
2728
|
let a = () => {
|
|
2718
2729
|
};
|
|
@@ -2730,18 +2741,18 @@ function Uu(e) {
|
|
|
2730
2741
|
const [r, a, i] = s, o = i.children;
|
|
2731
2742
|
return typeof o == "function" && o.length > 0 ? ee(() => o(i.keyed ? a() : () => {
|
|
2732
2743
|
var u;
|
|
2733
|
-
if (((u = ee(n)()) == null ? void 0 : u[0]) !== r) throw
|
|
2744
|
+
if (((u = ee(n)()) == null ? void 0 : u[0]) !== r) throw Sr("Match");
|
|
2734
2745
|
return a();
|
|
2735
2746
|
})) : o;
|
|
2736
2747
|
}, void 0, void 0);
|
|
2737
2748
|
}
|
|
2738
|
-
function
|
|
2749
|
+
function Uu(e) {
|
|
2739
2750
|
return e;
|
|
2740
2751
|
}
|
|
2741
|
-
var
|
|
2752
|
+
var hl = ["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"], gl = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...hl]), ml = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), El = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2742
2753
|
className: "class",
|
|
2743
2754
|
htmlFor: "for"
|
|
2744
|
-
}),
|
|
2755
|
+
}), pl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2745
2756
|
class: "className",
|
|
2746
2757
|
novalidate: {
|
|
2747
2758
|
$: "noValidate",
|
|
@@ -2770,11 +2781,11 @@ var gl = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
|
|
|
2770
2781
|
TEXTAREA: 1
|
|
2771
2782
|
}
|
|
2772
2783
|
});
|
|
2773
|
-
function
|
|
2774
|
-
const n =
|
|
2784
|
+
function yl(e, t) {
|
|
2785
|
+
const n = pl[e];
|
|
2775
2786
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
2776
2787
|
}
|
|
2777
|
-
var
|
|
2788
|
+
var Al = /* @__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"]), Tl = /* @__PURE__ */ new Set([
|
|
2778
2789
|
"altGlyph",
|
|
2779
2790
|
"altGlyphDef",
|
|
2780
2791
|
"altGlyphItem",
|
|
@@ -2852,11 +2863,11 @@ var Tl = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
|
|
|
2852
2863
|
"use",
|
|
2853
2864
|
"view",
|
|
2854
2865
|
"vkern"
|
|
2855
|
-
]),
|
|
2866
|
+
]), Sl = {
|
|
2856
2867
|
xlink: "http://www.w3.org/1999/xlink",
|
|
2857
2868
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
2858
|
-
},
|
|
2859
|
-
function
|
|
2869
|
+
}, Mu = (e) => Z(() => e());
|
|
2870
|
+
function _l(e, t, n) {
|
|
2860
2871
|
let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling, u = null;
|
|
2861
2872
|
for (; i < r || o < a; ) {
|
|
2862
2873
|
if (t[i] === n[o]) {
|
|
@@ -2896,7 +2907,7 @@ function Pl(e, t, n) {
|
|
|
2896
2907
|
}
|
|
2897
2908
|
}
|
|
2898
2909
|
var Et = "_$DX_DELEGATE";
|
|
2899
|
-
function
|
|
2910
|
+
function _r(e, t, n, s = {}) {
|
|
2900
2911
|
let r;
|
|
2901
2912
|
return Be((a) => {
|
|
2902
2913
|
r = a, t === document ? e() : kn(t, e(), t.firstChild ? null : void 0, n);
|
|
@@ -2904,7 +2915,7 @@ function Sr(e, t, n, s = {}) {
|
|
|
2904
2915
|
r(), t.textContent = "";
|
|
2905
2916
|
};
|
|
2906
2917
|
}
|
|
2907
|
-
function
|
|
2918
|
+
function Bu(e, t, n, s) {
|
|
2908
2919
|
let r;
|
|
2909
2920
|
const a = () => {
|
|
2910
2921
|
const o = document.createElement("template");
|
|
@@ -2912,32 +2923,32 @@ function Fu(e, t, n, s) {
|
|
|
2912
2923
|
}, i = () => (r || (r = a())).cloneNode(!0);
|
|
2913
2924
|
return i.cloneNode = i, i;
|
|
2914
2925
|
}
|
|
2915
|
-
function
|
|
2926
|
+
function Pl(e, t = window.document) {
|
|
2916
2927
|
const n = t[Et] || (t[Et] = /* @__PURE__ */ new Set());
|
|
2917
2928
|
for (let s = 0, r = e.length; s < r; s++) {
|
|
2918
2929
|
const a = e[s];
|
|
2919
|
-
n.has(a) || (n.add(a), t.addEventListener(a,
|
|
2930
|
+
n.has(a) || (n.add(a), t.addEventListener(a, Pr));
|
|
2920
2931
|
}
|
|
2921
2932
|
}
|
|
2922
|
-
function
|
|
2933
|
+
function Fu(e = window.document) {
|
|
2923
2934
|
if (e[Et]) {
|
|
2924
|
-
for (let t of e[Et].keys()) e.removeEventListener(t,
|
|
2935
|
+
for (let t of e[Et].keys()) e.removeEventListener(t, Pr);
|
|
2925
2936
|
delete e[Et];
|
|
2926
2937
|
}
|
|
2927
2938
|
}
|
|
2928
2939
|
function On(e, t, n) {
|
|
2929
2940
|
qe(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
2930
2941
|
}
|
|
2931
|
-
function
|
|
2942
|
+
function wl(e, t, n, s) {
|
|
2932
2943
|
qe(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
|
|
2933
2944
|
}
|
|
2934
|
-
function
|
|
2945
|
+
function bl(e, t, n) {
|
|
2935
2946
|
qe(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
2936
2947
|
}
|
|
2937
|
-
function
|
|
2948
|
+
function vl(e, t) {
|
|
2938
2949
|
qe(e) || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
2939
2950
|
}
|
|
2940
|
-
function
|
|
2951
|
+
function Il(e, t, n, s) {
|
|
2941
2952
|
if (s)
|
|
2942
2953
|
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
2943
2954
|
else if (Array.isArray(n)) {
|
|
@@ -2945,20 +2956,20 @@ function Nl(e, t, n, s) {
|
|
|
2945
2956
|
e.addEventListener(t, n[0] = (a) => r.call(e, n[1], a));
|
|
2946
2957
|
} else e.addEventListener(t, n, typeof n != "function" && n);
|
|
2947
2958
|
}
|
|
2948
|
-
function
|
|
2959
|
+
function Nl(e, t, n = {}) {
|
|
2949
2960
|
const s = Object.keys(t || {}), r = Object.keys(n);
|
|
2950
2961
|
let a, i;
|
|
2951
2962
|
for (a = 0, i = r.length; a < i; a++) {
|
|
2952
2963
|
const o = r[a];
|
|
2953
|
-
!o || o === "undefined" || t[o] || (
|
|
2964
|
+
!o || o === "undefined" || t[o] || (Ss(e, o, !1), delete n[o]);
|
|
2954
2965
|
}
|
|
2955
2966
|
for (a = 0, i = s.length; a < i; a++) {
|
|
2956
2967
|
const o = s[a], l = !!t[o];
|
|
2957
|
-
!o || o === "undefined" || n[o] === l || !l || (
|
|
2968
|
+
!o || o === "undefined" || n[o] === l || !l || (Ss(e, o, !0), n[o] = l);
|
|
2958
2969
|
}
|
|
2959
2970
|
return n;
|
|
2960
2971
|
}
|
|
2961
|
-
function
|
|
2972
|
+
function Cl(e, t, n) {
|
|
2962
2973
|
if (!t) return n ? On(e, "style") : t;
|
|
2963
2974
|
const s = e.style;
|
|
2964
2975
|
if (typeof t == "string") return s.cssText = t;
|
|
@@ -2970,49 +2981,49 @@ function Ll(e, t, n) {
|
|
|
2970
2981
|
r = t[a], r !== n[a] && (s.setProperty(a, r), n[a] = r);
|
|
2971
2982
|
return n;
|
|
2972
2983
|
}
|
|
2973
|
-
function
|
|
2984
|
+
function Ll(e, t = {}, n, s) {
|
|
2974
2985
|
const r = {};
|
|
2975
|
-
return s || Fe(() => r.children = St(e, t.children, r.children)), Fe(() => typeof t.ref == "function" &&
|
|
2986
|
+
return s || Fe(() => r.children = St(e, t.children, r.children)), Fe(() => typeof t.ref == "function" && Gl(t.ref, e)), Fe(() => Ol(e, t, n, !0, r, !0)), r;
|
|
2976
2987
|
}
|
|
2977
|
-
function
|
|
2988
|
+
function Gl(e, t, n) {
|
|
2978
2989
|
return ee(() => e(t, n));
|
|
2979
2990
|
}
|
|
2980
2991
|
function kn(e, t, n, s) {
|
|
2981
2992
|
if (n !== void 0 && !s && (s = []), typeof t != "function") return St(e, t, s, n);
|
|
2982
2993
|
Fe((r) => St(e, t(), r, n), s);
|
|
2983
2994
|
}
|
|
2984
|
-
function
|
|
2995
|
+
function Ol(e, t, n, s, r = {}, a = !1) {
|
|
2985
2996
|
t || (t = {});
|
|
2986
2997
|
for (const i in r)
|
|
2987
2998
|
if (!(i in t)) {
|
|
2988
2999
|
if (i === "children") continue;
|
|
2989
|
-
r[i] =
|
|
3000
|
+
r[i] = _s(e, i, null, r[i], n, a, t);
|
|
2990
3001
|
}
|
|
2991
3002
|
for (const i in t) {
|
|
2992
3003
|
if (i === "children")
|
|
2993
3004
|
continue;
|
|
2994
3005
|
const o = t[i];
|
|
2995
|
-
r[i] =
|
|
3006
|
+
r[i] = _s(e, i, o, r[i], n, a, t);
|
|
2996
3007
|
}
|
|
2997
3008
|
}
|
|
2998
|
-
function
|
|
3009
|
+
function kl(e) {
|
|
2999
3010
|
let t, n;
|
|
3000
|
-
return !qe() || !(t = b.registry.get(n =
|
|
3011
|
+
return !qe() || !(t = b.registry.get(n = Rl())) ? e() : (b.completed && b.completed.add(t), b.registry.delete(n), t);
|
|
3001
3012
|
}
|
|
3002
3013
|
function qe(e) {
|
|
3003
3014
|
return !!b.context && !b.done && (!e || e.isConnected);
|
|
3004
3015
|
}
|
|
3005
|
-
function
|
|
3016
|
+
function xl(e) {
|
|
3006
3017
|
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
3007
3018
|
}
|
|
3008
|
-
function
|
|
3019
|
+
function Ss(e, t, n) {
|
|
3009
3020
|
const s = t.trim().split(/\s+/);
|
|
3010
3021
|
for (let r = 0, a = s.length; r < a; r++) e.classList.toggle(s[r], n);
|
|
3011
3022
|
}
|
|
3012
|
-
function
|
|
3023
|
+
function _s(e, t, n, s, r, a, i) {
|
|
3013
3024
|
let o, l, u, d, f;
|
|
3014
|
-
if (t === "style") return
|
|
3015
|
-
if (t === "classList") return
|
|
3025
|
+
if (t === "style") return Cl(e, n, s);
|
|
3026
|
+
if (t === "classList") return Nl(e, n, s);
|
|
3016
3027
|
if (n === s) return s;
|
|
3017
3028
|
if (t === "ref")
|
|
3018
3029
|
a || n(e);
|
|
@@ -3023,28 +3034,28 @@ function Ss(e, t, n, s, r, a, i) {
|
|
|
3023
3034
|
const g = t.slice(10);
|
|
3024
3035
|
s && e.removeEventListener(g, s, !0), n && e.addEventListener(g, n, !0);
|
|
3025
3036
|
} else if (t.slice(0, 2) === "on") {
|
|
3026
|
-
const g = t.slice(2).toLowerCase(), h =
|
|
3037
|
+
const g = t.slice(2).toLowerCase(), h = Al.has(g);
|
|
3027
3038
|
if (!h && s) {
|
|
3028
3039
|
const y = Array.isArray(s) ? s[0] : s;
|
|
3029
3040
|
e.removeEventListener(g, y);
|
|
3030
3041
|
}
|
|
3031
|
-
(h || n) && (
|
|
3042
|
+
(h || n) && (Il(e, g, n, h), h && Pl([g]));
|
|
3032
3043
|
} else if (t.slice(0, 5) === "attr:")
|
|
3033
3044
|
On(e, t.slice(5), n);
|
|
3034
3045
|
else if (t.slice(0, 5) === "bool:")
|
|
3035
|
-
|
|
3036
|
-
else if ((f = t.slice(0, 5) === "prop:") || (u =
|
|
3046
|
+
bl(e, t.slice(5), n);
|
|
3047
|
+
else if ((f = t.slice(0, 5) === "prop:") || (u = ml.has(t)) || !r && ((d = yl(t, e.tagName)) || (l = gl.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
|
|
3037
3048
|
if (f)
|
|
3038
3049
|
t = t.slice(5), l = !0;
|
|
3039
3050
|
else if (qe(e)) return n;
|
|
3040
|
-
t === "class" || t === "className" ?
|
|
3051
|
+
t === "class" || t === "className" ? vl(e, n) : o && !l && !u ? e[xl(t)] = n : e[d || t] = n;
|
|
3041
3052
|
} else {
|
|
3042
|
-
const g = r && t.indexOf(":") > -1 &&
|
|
3043
|
-
g ?
|
|
3053
|
+
const g = r && t.indexOf(":") > -1 && Sl[t.split(":")[0]];
|
|
3054
|
+
g ? wl(e, g, t, n) : On(e, El[t] || t, n);
|
|
3044
3055
|
}
|
|
3045
3056
|
return n;
|
|
3046
3057
|
}
|
|
3047
|
-
function
|
|
3058
|
+
function Pr(e) {
|
|
3048
3059
|
if (b.registry && b.events && b.events.find(([l, u]) => u === e))
|
|
3049
3060
|
return;
|
|
3050
3061
|
let t = e.target;
|
|
@@ -3127,7 +3138,7 @@ function St(e, t, n, s, r) {
|
|
|
3127
3138
|
}
|
|
3128
3139
|
if (l.length === 0) {
|
|
3129
3140
|
if (n = Qe(e, n, s), o) return n;
|
|
3130
|
-
} else u ? n.length === 0 ?
|
|
3141
|
+
} else u ? n.length === 0 ? Ps(e, l, s) : _l(e, n, l) : (n && Qe(e), Ps(e, l));
|
|
3131
3142
|
n = l;
|
|
3132
3143
|
} else if (t.nodeType) {
|
|
3133
3144
|
if (a && t.parentNode) return n = o ? [t] : t;
|
|
@@ -3161,7 +3172,7 @@ function xn(e, t, n, s) {
|
|
|
3161
3172
|
}
|
|
3162
3173
|
return r;
|
|
3163
3174
|
}
|
|
3164
|
-
function
|
|
3175
|
+
function Ps(e, t, n = null) {
|
|
3165
3176
|
for (let s = 0, r = t.length; s < r; s++) e.insertBefore(t[s], n);
|
|
3166
3177
|
}
|
|
3167
3178
|
function Qe(e, t, n, s) {
|
|
@@ -3179,26 +3190,26 @@ function Qe(e, t, n, s) {
|
|
|
3179
3190
|
} else e.insertBefore(r, n);
|
|
3180
3191
|
return [r];
|
|
3181
3192
|
}
|
|
3182
|
-
function
|
|
3193
|
+
function Rl() {
|
|
3183
3194
|
return b.getNextContextId();
|
|
3184
3195
|
}
|
|
3185
|
-
var
|
|
3186
|
-
function
|
|
3187
|
-
return t ? document.createElementNS(
|
|
3196
|
+
var Dl = "http://www.w3.org/2000/svg";
|
|
3197
|
+
function wr(e, t = !1) {
|
|
3198
|
+
return t ? document.createElementNS(Dl, e) : document.createElement(e);
|
|
3188
3199
|
}
|
|
3189
|
-
function
|
|
3200
|
+
function Ku(e) {
|
|
3190
3201
|
const {
|
|
3191
3202
|
useShadow: t
|
|
3192
|
-
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r =
|
|
3203
|
+
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = Ts();
|
|
3193
3204
|
let a, i = !!b.context;
|
|
3194
|
-
return
|
|
3195
|
-
i && (
|
|
3205
|
+
return dr(() => {
|
|
3206
|
+
i && (Ts().user = i = !1), a || (a = fr(r, () => Z(() => e.children)));
|
|
3196
3207
|
const o = s();
|
|
3197
3208
|
if (o instanceof HTMLHeadElement) {
|
|
3198
3209
|
const [l, u] = V(!1), d = () => u(!0);
|
|
3199
3210
|
Be((f) => kn(o, () => l() ? f() : a(), null)), At(d);
|
|
3200
3211
|
} else {
|
|
3201
|
-
const l =
|
|
3212
|
+
const l = wr(e.isSVG ? "g" : "div", e.isSVG), u = t && l.attachShadow ? l.attachShadow({
|
|
3202
3213
|
mode: "open"
|
|
3203
3214
|
}) : l;
|
|
3204
3215
|
Object.defineProperty(l, "_$host", {
|
|
@@ -3212,7 +3223,7 @@ function Vu(e) {
|
|
|
3212
3223
|
render: !i
|
|
3213
3224
|
}), n;
|
|
3214
3225
|
}
|
|
3215
|
-
function
|
|
3226
|
+
function Ul(e, t) {
|
|
3216
3227
|
const n = Z(e);
|
|
3217
3228
|
return Z(() => {
|
|
3218
3229
|
const s = n();
|
|
@@ -3220,16 +3231,16 @@ function Ml(e, t) {
|
|
|
3220
3231
|
case "function":
|
|
3221
3232
|
return ee(() => s(t));
|
|
3222
3233
|
case "string":
|
|
3223
|
-
const r =
|
|
3224
|
-
return
|
|
3234
|
+
const r = Tl.has(s), a = b.context ? kl() : wr(s, r);
|
|
3235
|
+
return Ll(a, t, r), a;
|
|
3225
3236
|
}
|
|
3226
3237
|
});
|
|
3227
3238
|
}
|
|
3228
|
-
function
|
|
3229
|
-
const [, t] =
|
|
3230
|
-
return
|
|
3239
|
+
function Vu(e) {
|
|
3240
|
+
const [, t] = dl(e, ["component"]);
|
|
3241
|
+
return Ul(() => e.component, t);
|
|
3231
3242
|
}
|
|
3232
|
-
var
|
|
3243
|
+
var Ml = class {
|
|
3233
3244
|
constructor() {
|
|
3234
3245
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
3235
3246
|
}
|
|
@@ -3245,9 +3256,9 @@ var Bl = class {
|
|
|
3245
3256
|
clear() {
|
|
3246
3257
|
this.keyToValue.clear(), this.valueToKey.clear();
|
|
3247
3258
|
}
|
|
3248
|
-
},
|
|
3259
|
+
}, br = class {
|
|
3249
3260
|
constructor(e) {
|
|
3250
|
-
this.generateIdentifier = e, this.kv = new
|
|
3261
|
+
this.generateIdentifier = e, this.kv = new Ml();
|
|
3251
3262
|
}
|
|
3252
3263
|
register(e, t) {
|
|
3253
3264
|
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
@@ -3261,7 +3272,7 @@ var Bl = class {
|
|
|
3261
3272
|
getValue(e) {
|
|
3262
3273
|
return this.kv.getByKey(e);
|
|
3263
3274
|
}
|
|
3264
|
-
},
|
|
3275
|
+
}, Bl = class extends br {
|
|
3265
3276
|
constructor() {
|
|
3266
3277
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
3267
3278
|
}
|
|
@@ -3272,7 +3283,7 @@ var Bl = class {
|
|
|
3272
3283
|
return this.classToAllowedProps.get(e);
|
|
3273
3284
|
}
|
|
3274
3285
|
};
|
|
3275
|
-
function
|
|
3286
|
+
function Fl(e) {
|
|
3276
3287
|
if ("values" in Object)
|
|
3277
3288
|
return Object.values(e);
|
|
3278
3289
|
const t = [];
|
|
@@ -3280,8 +3291,8 @@ function Kl(e) {
|
|
|
3280
3291
|
e.hasOwnProperty(n) && t.push(e[n]);
|
|
3281
3292
|
return t;
|
|
3282
3293
|
}
|
|
3283
|
-
function
|
|
3284
|
-
const n =
|
|
3294
|
+
function Kl(e, t) {
|
|
3295
|
+
const n = Fl(e);
|
|
3285
3296
|
if ("find" in n)
|
|
3286
3297
|
return n.find(t);
|
|
3287
3298
|
const s = n;
|
|
@@ -3297,14 +3308,14 @@ function ft(e, t) {
|
|
|
3297
3308
|
function Yt(e, t) {
|
|
3298
3309
|
return e.indexOf(t) !== -1;
|
|
3299
3310
|
}
|
|
3300
|
-
function
|
|
3311
|
+
function ws(e, t) {
|
|
3301
3312
|
for (let n = 0; n < e.length; n++) {
|
|
3302
3313
|
const s = e[n];
|
|
3303
3314
|
if (t(s))
|
|
3304
3315
|
return s;
|
|
3305
3316
|
}
|
|
3306
3317
|
}
|
|
3307
|
-
var
|
|
3318
|
+
var Vl = class {
|
|
3308
3319
|
constructor() {
|
|
3309
3320
|
this.transfomers = {};
|
|
3310
3321
|
}
|
|
@@ -3312,12 +3323,12 @@ var Hl = class {
|
|
|
3312
3323
|
this.transfomers[e.name] = e;
|
|
3313
3324
|
}
|
|
3314
3325
|
findApplicable(e) {
|
|
3315
|
-
return
|
|
3326
|
+
return Kl(this.transfomers, (t) => t.isApplicable(e));
|
|
3316
3327
|
}
|
|
3317
3328
|
findByName(e) {
|
|
3318
3329
|
return this.transfomers[e];
|
|
3319
3330
|
}
|
|
3320
|
-
},
|
|
3331
|
+
}, Hl = (e) => Object.prototype.toString.call(e).slice(8, -1), vr = (e) => typeof e > "u", ql = (e) => e === null, _t = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Rn = (e) => _t(e) && Object.keys(e).length === 0, ke = (e) => Array.isArray(e), $l = (e) => typeof e == "string", Ql = (e) => typeof e == "number" && !isNaN(e), zl = (e) => typeof e == "boolean", Wl = (e) => e instanceof RegExp, Pt = (e) => e instanceof Map, wt = (e) => e instanceof Set, Ir = (e) => Hl(e) === "Symbol", jl = (e) => e instanceof Date && !isNaN(e.valueOf()), Yl = (e) => e instanceof Error, bs = (e) => typeof e == "number" && isNaN(e), Jl = (e) => zl(e) || ql(e) || vr(e) || Ql(e) || $l(e) || Ir(e), Zl = (e) => typeof e == "bigint", Xl = (e) => e === 1 / 0 || e === -1 / 0, ec = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), tc = (e) => e instanceof URL, Nr = (e) => e.replace(/\./g, "\\."), In = (e) => e.map(String).map(Nr).join("."), pt = (e) => {
|
|
3321
3332
|
const t = [];
|
|
3322
3333
|
let n = "";
|
|
3323
3334
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -3343,12 +3354,12 @@ function Ae(e, t, n, s) {
|
|
|
3343
3354
|
untransform: s
|
|
3344
3355
|
};
|
|
3345
3356
|
}
|
|
3346
|
-
var
|
|
3347
|
-
Ae(
|
|
3357
|
+
var Cr = [
|
|
3358
|
+
Ae(vr, "undefined", () => null, () => {
|
|
3348
3359
|
}),
|
|
3349
|
-
Ae(
|
|
3350
|
-
Ae(
|
|
3351
|
-
Ae(
|
|
3360
|
+
Ae(Zl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
3361
|
+
Ae(jl, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
3362
|
+
Ae(Yl, "Error", (e, t) => {
|
|
3352
3363
|
const n = {
|
|
3353
3364
|
name: e.name,
|
|
3354
3365
|
message: e.message
|
|
@@ -3362,7 +3373,7 @@ var Nr = [
|
|
|
3362
3373
|
n[s] = e[s];
|
|
3363
3374
|
}), n;
|
|
3364
3375
|
}),
|
|
3365
|
-
Ae(
|
|
3376
|
+
Ae(Wl, "regexp", (e) => "" + e, (e) => {
|
|
3366
3377
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
3367
3378
|
return new RegExp(t, n);
|
|
3368
3379
|
}),
|
|
@@ -3375,9 +3386,9 @@ var Nr = [
|
|
|
3375
3386
|
(e) => new Set(e)
|
|
3376
3387
|
),
|
|
3377
3388
|
Ae(Pt, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
3378
|
-
Ae((e) =>
|
|
3389
|
+
Ae((e) => bs(e) || Xl(e), "number", (e) => bs(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
3379
3390
|
Ae((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
3380
|
-
Ae(
|
|
3391
|
+
Ae(tc, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
3381
3392
|
];
|
|
3382
3393
|
function mn(e, t, n, s) {
|
|
3383
3394
|
return {
|
|
@@ -3387,12 +3398,12 @@ function mn(e, t, n, s) {
|
|
|
3387
3398
|
untransform: s
|
|
3388
3399
|
};
|
|
3389
3400
|
}
|
|
3390
|
-
var
|
|
3401
|
+
var Lr = mn((e, t) => Ir(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
|
|
3391
3402
|
const s = n.symbolRegistry.getValue(t[1]);
|
|
3392
3403
|
if (!s)
|
|
3393
3404
|
throw new Error("Trying to deserialize unknown symbol");
|
|
3394
3405
|
return s;
|
|
3395
|
-
}),
|
|
3406
|
+
}), nc = [
|
|
3396
3407
|
Int8Array,
|
|
3397
3408
|
Uint8Array,
|
|
3398
3409
|
Int16Array,
|
|
@@ -3402,16 +3413,16 @@ var Cr = mn((e, t) => vr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
3402
3413
|
Float32Array,
|
|
3403
3414
|
Float64Array,
|
|
3404
3415
|
Uint8ClampedArray
|
|
3405
|
-
].reduce((e, t) => (e[t.name] = t, e), {}),
|
|
3406
|
-
const n =
|
|
3416
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), Gr = mn(ec, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
3417
|
+
const n = nc[t[1]];
|
|
3407
3418
|
if (!n)
|
|
3408
3419
|
throw new Error("Trying to deserialize unknown typed array");
|
|
3409
3420
|
return new n(e);
|
|
3410
3421
|
});
|
|
3411
|
-
function
|
|
3422
|
+
function Or(e, t) {
|
|
3412
3423
|
return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
|
|
3413
3424
|
}
|
|
3414
|
-
var
|
|
3425
|
+
var kr = mn(Or, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
|
|
3415
3426
|
const n = t.classRegistry.getAllowedProps(e.constructor);
|
|
3416
3427
|
if (!n)
|
|
3417
3428
|
return { ...e };
|
|
@@ -3424,44 +3435,44 @@ var Or = mn(Gr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
3424
3435
|
if (!s)
|
|
3425
3436
|
throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
|
|
3426
3437
|
return Object.assign(Object.create(s.prototype), e);
|
|
3427
|
-
}),
|
|
3438
|
+
}), xr = mn((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) => {
|
|
3428
3439
|
const s = n.customTransformerRegistry.findByName(t[1]);
|
|
3429
3440
|
if (!s)
|
|
3430
3441
|
throw new Error("Trying to deserialize unknown custom value");
|
|
3431
3442
|
return s.deserialize(e);
|
|
3432
|
-
}),
|
|
3433
|
-
const n =
|
|
3443
|
+
}), sc = [kr, Lr, xr, Gr], vs = (e, t) => {
|
|
3444
|
+
const n = ws(sc, (r) => r.isApplicable(e, t));
|
|
3434
3445
|
if (n)
|
|
3435
3446
|
return {
|
|
3436
3447
|
value: n.transform(e, t),
|
|
3437
3448
|
type: n.annotation(e, t)
|
|
3438
3449
|
};
|
|
3439
|
-
const s =
|
|
3450
|
+
const s = ws(Cr, (r) => r.isApplicable(e, t));
|
|
3440
3451
|
if (s)
|
|
3441
3452
|
return {
|
|
3442
3453
|
value: s.transform(e, t),
|
|
3443
3454
|
type: s.annotation
|
|
3444
3455
|
};
|
|
3445
|
-
},
|
|
3446
|
-
|
|
3447
|
-
|
|
3456
|
+
}, Rr = {};
|
|
3457
|
+
Cr.forEach((e) => {
|
|
3458
|
+
Rr[e.annotation] = e;
|
|
3448
3459
|
});
|
|
3449
|
-
var
|
|
3460
|
+
var rc = (e, t, n) => {
|
|
3450
3461
|
if (ke(t))
|
|
3451
3462
|
switch (t[0]) {
|
|
3452
3463
|
case "symbol":
|
|
3453
|
-
return
|
|
3464
|
+
return Lr.untransform(e, t, n);
|
|
3454
3465
|
case "class":
|
|
3455
|
-
return Or.untransform(e, t, n);
|
|
3456
|
-
case "custom":
|
|
3457
3466
|
return kr.untransform(e, t, n);
|
|
3467
|
+
case "custom":
|
|
3468
|
+
return xr.untransform(e, t, n);
|
|
3458
3469
|
case "typed-array":
|
|
3459
|
-
return
|
|
3470
|
+
return Gr.untransform(e, t, n);
|
|
3460
3471
|
default:
|
|
3461
3472
|
throw new Error("Unknown transformation: " + t);
|
|
3462
3473
|
}
|
|
3463
3474
|
else {
|
|
3464
|
-
const s =
|
|
3475
|
+
const s = Rr[t];
|
|
3465
3476
|
if (!s)
|
|
3466
3477
|
throw new Error("Unknown transformation: " + t);
|
|
3467
3478
|
return s.untransform(e, n);
|
|
@@ -3474,7 +3485,7 @@ var ac = (e, t, n) => {
|
|
|
3474
3485
|
n.next(), t--;
|
|
3475
3486
|
return n.next().value;
|
|
3476
3487
|
};
|
|
3477
|
-
function
|
|
3488
|
+
function Dr(e) {
|
|
3478
3489
|
if (Yt(e, "__proto__"))
|
|
3479
3490
|
throw new Error("__proto__ is not allowed as a property");
|
|
3480
3491
|
if (Yt(e, "prototype"))
|
|
@@ -3482,8 +3493,8 @@ function Rr(e) {
|
|
|
3482
3493
|
if (Yt(e, "constructor"))
|
|
3483
3494
|
throw new Error("constructor is not allowed as a property");
|
|
3484
3495
|
}
|
|
3485
|
-
var
|
|
3486
|
-
|
|
3496
|
+
var ac = (e, t) => {
|
|
3497
|
+
Dr(t);
|
|
3487
3498
|
for (let n = 0; n < t.length; n++) {
|
|
3488
3499
|
const s = t[n];
|
|
3489
3500
|
if (wt(e))
|
|
@@ -3503,7 +3514,7 @@ var ic = (e, t) => {
|
|
|
3503
3514
|
}
|
|
3504
3515
|
return e;
|
|
3505
3516
|
}, Dn = (e, t, n) => {
|
|
3506
|
-
if (
|
|
3517
|
+
if (Dr(t), t.length === 0)
|
|
3507
3518
|
return n(e);
|
|
3508
3519
|
let s = e;
|
|
3509
3520
|
for (let a = 0; a < t.length - 1; a++) {
|
|
@@ -3563,14 +3574,14 @@ function Un(e, t, n = []) {
|
|
|
3563
3574
|
Un(a, t, [...n, ...pt(i)]);
|
|
3564
3575
|
}), t(s, n);
|
|
3565
3576
|
}
|
|
3566
|
-
function
|
|
3577
|
+
function ic(e, t, n) {
|
|
3567
3578
|
return Un(t, (s, r) => {
|
|
3568
|
-
e = Dn(e, r, (a) =>
|
|
3579
|
+
e = Dn(e, r, (a) => rc(a, s, n));
|
|
3569
3580
|
}), e;
|
|
3570
3581
|
}
|
|
3571
|
-
function
|
|
3582
|
+
function oc(e, t) {
|
|
3572
3583
|
function n(s, r) {
|
|
3573
|
-
const a =
|
|
3584
|
+
const a = ac(e, pt(r));
|
|
3574
3585
|
s.map(pt).forEach((i) => {
|
|
3575
3586
|
e = Dn(e, i, () => a);
|
|
3576
3587
|
});
|
|
@@ -3584,12 +3595,12 @@ function lc(e, t) {
|
|
|
3584
3595
|
ft(t, n);
|
|
3585
3596
|
return e;
|
|
3586
3597
|
}
|
|
3587
|
-
var
|
|
3588
|
-
function
|
|
3598
|
+
var lc = (e, t) => _t(e) || ke(e) || Pt(e) || wt(e) || Or(e, t);
|
|
3599
|
+
function cc(e, t, n) {
|
|
3589
3600
|
const s = n.get(e);
|
|
3590
3601
|
s ? s.push(t) : n.set(e, [t]);
|
|
3591
3602
|
}
|
|
3592
|
-
function
|
|
3603
|
+
function uc(e, t) {
|
|
3593
3604
|
const n = {};
|
|
3594
3605
|
let s;
|
|
3595
3606
|
return e.forEach((r) => {
|
|
@@ -3600,18 +3611,18 @@ function dc(e, t) {
|
|
|
3600
3611
|
a.length === 0 ? s = i.map(In) : n[In(a)] = i.map(In);
|
|
3601
3612
|
}), s ? Rn(n) ? [s] : [s, n] : Rn(n) ? void 0 : n;
|
|
3602
3613
|
}
|
|
3603
|
-
var
|
|
3604
|
-
const o =
|
|
3614
|
+
var Ur = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
3615
|
+
const o = Jl(e);
|
|
3605
3616
|
if (!o) {
|
|
3606
|
-
|
|
3617
|
+
cc(e, r, t);
|
|
3607
3618
|
const h = i.get(e);
|
|
3608
3619
|
if (h)
|
|
3609
3620
|
return s ? {
|
|
3610
3621
|
transformedValue: null
|
|
3611
3622
|
} : h;
|
|
3612
3623
|
}
|
|
3613
|
-
if (!
|
|
3614
|
-
const h =
|
|
3624
|
+
if (!lc(e, n)) {
|
|
3625
|
+
const h = vs(e, n), y = h ? {
|
|
3615
3626
|
transformedValue: h.value,
|
|
3616
3627
|
annotations: [h.type]
|
|
3617
3628
|
} : {
|
|
@@ -3623,13 +3634,13 @@ var Dr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3623
3634
|
return {
|
|
3624
3635
|
transformedValue: null
|
|
3625
3636
|
};
|
|
3626
|
-
const l =
|
|
3637
|
+
const l = vs(e, n), u = (l == null ? void 0 : l.value) ?? e, d = ke(u) ? [] : {}, f = {};
|
|
3627
3638
|
ft(u, (h, y) => {
|
|
3628
3639
|
if (y === "__proto__" || y === "constructor" || y === "prototype")
|
|
3629
3640
|
throw new Error(`Detected property ${y}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3630
|
-
const P =
|
|
3641
|
+
const P = Ur(h, t, n, s, [...r, y], [...a, e], i);
|
|
3631
3642
|
d[y] = P.transformedValue, ke(P.annotations) ? f[y] = P.annotations : _t(P.annotations) && ft(P.annotations, (S, _) => {
|
|
3632
|
-
f[
|
|
3643
|
+
f[Nr(y) + "." + _] = S;
|
|
3633
3644
|
});
|
|
3634
3645
|
});
|
|
3635
3646
|
const g = Rn(f) ? {
|
|
@@ -3641,19 +3652,19 @@ var Dr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3641
3652
|
};
|
|
3642
3653
|
return o || i.set(e, g), g;
|
|
3643
3654
|
};
|
|
3644
|
-
function
|
|
3655
|
+
function Mr(e) {
|
|
3645
3656
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
3646
3657
|
}
|
|
3647
|
-
function
|
|
3648
|
-
return
|
|
3658
|
+
function Is(e) {
|
|
3659
|
+
return Mr(e) === "Array";
|
|
3649
3660
|
}
|
|
3650
|
-
function
|
|
3651
|
-
if (
|
|
3661
|
+
function dc(e) {
|
|
3662
|
+
if (Mr(e) !== "Object")
|
|
3652
3663
|
return !1;
|
|
3653
3664
|
const t = Object.getPrototypeOf(e);
|
|
3654
3665
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
3655
3666
|
}
|
|
3656
|
-
function
|
|
3667
|
+
function fc(e, t, n, s, r) {
|
|
3657
3668
|
const a = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
|
|
3658
3669
|
a === "enumerable" && (e[t] = n), r && a === "nonenumerable" && Object.defineProperty(e, t, {
|
|
3659
3670
|
value: n,
|
|
@@ -3663,16 +3674,16 @@ function hc(e, t, n, s, r) {
|
|
|
3663
3674
|
});
|
|
3664
3675
|
}
|
|
3665
3676
|
function Mn(e, t = {}) {
|
|
3666
|
-
if (
|
|
3677
|
+
if (Is(e))
|
|
3667
3678
|
return e.map((r) => Mn(r, t));
|
|
3668
|
-
if (!
|
|
3679
|
+
if (!dc(e))
|
|
3669
3680
|
return e;
|
|
3670
3681
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
3671
3682
|
return [...n, ...s].reduce((r, a) => {
|
|
3672
|
-
if (
|
|
3683
|
+
if (Is(t.props) && !t.props.includes(a))
|
|
3673
3684
|
return r;
|
|
3674
3685
|
const i = e[a], o = Mn(i, t);
|
|
3675
|
-
return
|
|
3686
|
+
return fc(r, a, o, e, t.nonenumerable), r;
|
|
3676
3687
|
}, {});
|
|
3677
3688
|
}
|
|
3678
3689
|
var D = class {
|
|
@@ -3680,17 +3691,17 @@ var D = class {
|
|
|
3680
3691
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
3681
3692
|
*/
|
|
3682
3693
|
constructor({ dedupe: e = !1 } = {}) {
|
|
3683
|
-
this.classRegistry = new
|
|
3694
|
+
this.classRegistry = new Bl(), this.symbolRegistry = new br((t) => t.description ?? ""), this.customTransformerRegistry = new Vl(), this.allowedErrorProps = [], this.dedupe = e;
|
|
3684
3695
|
}
|
|
3685
3696
|
serialize(e) {
|
|
3686
|
-
const t = /* @__PURE__ */ new Map(), n =
|
|
3697
|
+
const t = /* @__PURE__ */ new Map(), n = Ur(e, t, this, this.dedupe), s = {
|
|
3687
3698
|
json: n.transformedValue
|
|
3688
3699
|
};
|
|
3689
3700
|
n.annotations && (s.meta = {
|
|
3690
3701
|
...s.meta,
|
|
3691
3702
|
values: n.annotations
|
|
3692
3703
|
});
|
|
3693
|
-
const r =
|
|
3704
|
+
const r = uc(t, this.dedupe);
|
|
3694
3705
|
return r && (s.meta = {
|
|
3695
3706
|
...s.meta,
|
|
3696
3707
|
referentialEqualities: r
|
|
@@ -3699,7 +3710,7 @@ var D = class {
|
|
|
3699
3710
|
deserialize(e) {
|
|
3700
3711
|
const { json: t, meta: n } = e;
|
|
3701
3712
|
let s = Mn(t);
|
|
3702
|
-
return n != null && n.values && (s =
|
|
3713
|
+
return n != null && n.values && (s = ic(s, n.values, this)), n != null && n.referentialEqualities && (s = oc(s, n.referentialEqualities)), s;
|
|
3703
3714
|
}
|
|
3704
3715
|
stringify(e) {
|
|
3705
3716
|
return JSON.stringify(this.serialize(e));
|
|
@@ -3732,44 +3743,44 @@ D.registerClass = D.defaultInstance.registerClass.bind(D.defaultInstance);
|
|
|
3732
3743
|
D.registerSymbol = D.defaultInstance.registerSymbol.bind(D.defaultInstance);
|
|
3733
3744
|
D.registerCustom = D.defaultInstance.registerCustom.bind(D.defaultInstance);
|
|
3734
3745
|
D.allowErrorProps = D.defaultInstance.allowErrorProps.bind(D.defaultInstance);
|
|
3735
|
-
var
|
|
3736
|
-
function
|
|
3746
|
+
var hc = D.serialize, Hu = D.stringify;
|
|
3747
|
+
function qu(e) {
|
|
3737
3748
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
3738
3749
|
}
|
|
3739
|
-
function
|
|
3750
|
+
function $u(e, t) {
|
|
3740
3751
|
return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
3741
3752
|
}
|
|
3742
|
-
function
|
|
3753
|
+
function Qu({
|
|
3743
3754
|
queryState: e,
|
|
3744
3755
|
observerCount: t,
|
|
3745
3756
|
isStale: n
|
|
3746
3757
|
}) {
|
|
3747
3758
|
return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
|
|
3748
3759
|
}
|
|
3749
|
-
function
|
|
3760
|
+
function zu({
|
|
3750
3761
|
status: e,
|
|
3751
3762
|
isPaused: t
|
|
3752
3763
|
}) {
|
|
3753
3764
|
return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
|
|
3754
3765
|
}
|
|
3755
|
-
function
|
|
3766
|
+
function Wu(e) {
|
|
3756
3767
|
return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
|
|
3757
3768
|
}
|
|
3758
|
-
var
|
|
3769
|
+
var ju = (e, t = !1) => {
|
|
3759
3770
|
const {
|
|
3760
3771
|
json: n
|
|
3761
|
-
} =
|
|
3772
|
+
} = hc(e);
|
|
3762
3773
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
3763
|
-
}, $t = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3,
|
|
3764
|
-
status:
|
|
3765
|
-
"query hash":
|
|
3766
|
-
"last updated": Mr
|
|
3767
|
-
}, Qt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Br = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, pc = (e, t) => Qt(e) === Qt(t) ? Br(e, t) : Qt(e) > Qt(t) ? 1 : -1, Zu = {
|
|
3768
|
-
status: pc,
|
|
3774
|
+
}, $t = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, gc = (e, t) => e.queryHash.localeCompare(t.queryHash), Br = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, mc = (e, t) => $t(e) === $t(t) ? Br(e, t) : $t(e) > $t(t) ? 1 : -1, Yu = {
|
|
3775
|
+
status: mc,
|
|
3776
|
+
"query hash": gc,
|
|
3769
3777
|
"last updated": Br
|
|
3770
|
-
},
|
|
3778
|
+
}, Qt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Fr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Ec = (e, t) => Qt(e) === Qt(t) ? Fr(e, t) : Qt(e) > Qt(t) ? 1 : -1, Ju = {
|
|
3779
|
+
status: Ec,
|
|
3780
|
+
"last updated": Fr
|
|
3781
|
+
}, Zu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Xu = () => {
|
|
3771
3782
|
const [e, t] = V("dark");
|
|
3772
|
-
return
|
|
3783
|
+
return el(() => {
|
|
3773
3784
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3774
3785
|
t(n.matches ? "dark" : "light");
|
|
3775
3786
|
const s = (r) => {
|
|
@@ -3837,11 +3848,11 @@ var Yu = (e, t = !1) => {
|
|
|
3837
3848
|
return n[s] = Wt(n[s], r), n;
|
|
3838
3849
|
}
|
|
3839
3850
|
return e;
|
|
3840
|
-
},
|
|
3851
|
+
}, Kr = (e, t) => {
|
|
3841
3852
|
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
|
|
3842
3853
|
const s = document.createElement("style"), r = document.createTextNode("");
|
|
3843
3854
|
s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
3844
|
-
}, We, bt, vt, It, Ue, Nt, je, Ye, Je, Ze, Xe, Ct, et, tt, Lt,
|
|
3855
|
+
}, We, bt, vt, It, Ue, Nt, je, Ye, Je, Ze, Xe, Ct, et, tt, Lt, Gs, pc = (Gs = class {
|
|
3845
3856
|
constructor(e) {
|
|
3846
3857
|
O(this, We);
|
|
3847
3858
|
O(this, bt);
|
|
@@ -3895,10 +3906,10 @@ var Yu = (e, t = !1) => {
|
|
|
3895
3906
|
mount(e) {
|
|
3896
3907
|
if (T(this, Ue))
|
|
3897
3908
|
throw new Error("Devtools is already mounted");
|
|
3898
|
-
const t =
|
|
3909
|
+
const t = _r(() => {
|
|
3899
3910
|
const n = this, [s] = T(this, Ye), [r] = T(this, Je), [a] = T(this, Ze), [i] = T(this, Xe), [o] = T(this, Ct), [l] = T(this, We), [u] = T(this, tt);
|
|
3900
3911
|
let d;
|
|
3901
|
-
return T(this, et) ? d = T(this, et) : (d =
|
|
3912
|
+
return T(this, et) ? d = T(this, et) : (d = Tr(() => import("./WDYDFRGG-B3FrCE_j.js")), L(this, et, d)), Kr(T(this, Nt), T(this, je)), yr(d, Ar({
|
|
3902
3913
|
get queryFlavor() {
|
|
3903
3914
|
return T(n, vt);
|
|
3904
3915
|
},
|
|
@@ -3943,7 +3954,7 @@ var Yu = (e, t = !1) => {
|
|
|
3943
3954
|
throw new Error("Devtools is not mounted");
|
|
3944
3955
|
(e = T(this, Lt)) == null || e.call(this), L(this, Ue, !1);
|
|
3945
3956
|
}
|
|
3946
|
-
}, We = new WeakMap(), bt = new WeakMap(), vt = new WeakMap(), It = new WeakMap(), Ue = new WeakMap(), Nt = new WeakMap(), je = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Ze = new WeakMap(), Xe = new WeakMap(), Ct = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), Lt = new WeakMap(),
|
|
3957
|
+
}, We = new WeakMap(), bt = new WeakMap(), vt = new WeakMap(), It = new WeakMap(), Ue = new WeakMap(), Nt = new WeakMap(), je = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Ze = new WeakMap(), Xe = new WeakMap(), Ct = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), Lt = new WeakMap(), Gs), nt, Gt, Ot, kt, Me, xt, st, rt, at, it, ot, Rt, lt, ct, ut, Dt, Os, yc = (Os = class {
|
|
3947
3958
|
constructor(e) {
|
|
3948
3959
|
O(this, nt);
|
|
3949
3960
|
O(this, Gt);
|
|
@@ -4002,10 +4013,10 @@ var Yu = (e, t = !1) => {
|
|
|
4002
4013
|
mount(e) {
|
|
4003
4014
|
if (T(this, Me))
|
|
4004
4015
|
throw new Error("Devtools is already mounted");
|
|
4005
|
-
const t =
|
|
4016
|
+
const t = _r(() => {
|
|
4006
4017
|
const n = this, [s] = T(this, rt), [r] = T(this, at), [a] = T(this, it), [i] = T(this, ot), [o] = T(this, Rt), [l] = T(this, nt), [u] = T(this, lt), [d] = T(this, ut);
|
|
4007
4018
|
let f;
|
|
4008
|
-
return T(this, ct) ? f = T(this, ct) : (f =
|
|
4019
|
+
return T(this, ct) ? f = T(this, ct) : (f = Tr(() => import("./2SSKDMRQ-pPung-JB.js")), L(this, ct, f)), Kr(T(this, xt), T(this, st)), yr(f, Ar({
|
|
4009
4020
|
get queryFlavor() {
|
|
4010
4021
|
return T(n, Ot);
|
|
4011
4022
|
},
|
|
@@ -4053,8 +4064,8 @@ var Yu = (e, t = !1) => {
|
|
|
4053
4064
|
throw new Error("Devtools is not mounted");
|
|
4054
4065
|
(e = T(this, Dt)) == null || e.call(this), L(this, Me, !1);
|
|
4055
4066
|
}
|
|
4056
|
-
}, nt = new WeakMap(), Gt = new WeakMap(), Ot = new WeakMap(), kt = new WeakMap(), Me = new WeakMap(), xt = new WeakMap(), st = new WeakMap(), rt = new WeakMap(), at = new WeakMap(), it = new WeakMap(), ot = new WeakMap(), Rt = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), ut = new WeakMap(), Dt = new WeakMap(),
|
|
4057
|
-
function
|
|
4067
|
+
}, nt = new WeakMap(), Gt = new WeakMap(), Ot = new WeakMap(), kt = new WeakMap(), Me = new WeakMap(), xt = new WeakMap(), st = new WeakMap(), rt = new WeakMap(), at = new WeakMap(), it = new WeakMap(), ot = new WeakMap(), Rt = new WeakMap(), lt = new WeakMap(), ct = new WeakMap(), ut = new WeakMap(), Dt = new WeakMap(), Os);
|
|
4068
|
+
function Ac(e) {
|
|
4058
4069
|
const t = J(e.client), n = z.useRef(null), {
|
|
4059
4070
|
buttonPosition: s,
|
|
4060
4071
|
position: r,
|
|
@@ -4065,11 +4076,11 @@ function Tc(e) {
|
|
|
4065
4076
|
hideDisabledQueries: u,
|
|
4066
4077
|
theme: d
|
|
4067
4078
|
} = e, [f] = z.useState(
|
|
4068
|
-
new
|
|
4079
|
+
new pc({
|
|
4069
4080
|
client: t,
|
|
4070
4081
|
queryFlavor: "React Query",
|
|
4071
4082
|
version: "5",
|
|
4072
|
-
onlineManager:
|
|
4083
|
+
onlineManager: Vs,
|
|
4073
4084
|
buttonPosition: s,
|
|
4074
4085
|
position: r,
|
|
4075
4086
|
initialIsOpen: a,
|
|
@@ -4096,7 +4107,7 @@ function Tc(e) {
|
|
|
4096
4107
|
f.unmount();
|
|
4097
4108
|
}), [f]), /* @__PURE__ */ c("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
|
|
4098
4109
|
}
|
|
4099
|
-
function
|
|
4110
|
+
function Tc(e) {
|
|
4100
4111
|
const t = J(e.client), n = z.useRef(null), {
|
|
4101
4112
|
errorTypes: s,
|
|
4102
4113
|
styleNonce: r,
|
|
@@ -4104,11 +4115,11 @@ function Sc(e) {
|
|
|
4104
4115
|
hideDisabledQueries: i,
|
|
4105
4116
|
theme: o
|
|
4106
4117
|
} = e, [l] = z.useState(
|
|
4107
|
-
new
|
|
4118
|
+
new yc({
|
|
4108
4119
|
client: t,
|
|
4109
4120
|
queryFlavor: "React Query",
|
|
4110
4121
|
version: "5",
|
|
4111
|
-
onlineManager:
|
|
4122
|
+
onlineManager: Vs,
|
|
4112
4123
|
buttonPosition: "bottom-left",
|
|
4113
4124
|
position: "bottom",
|
|
4114
4125
|
initialIsOpen: !0,
|
|
@@ -4140,24 +4151,24 @@ function Sc(e) {
|
|
|
4140
4151
|
}
|
|
4141
4152
|
);
|
|
4142
4153
|
}
|
|
4143
|
-
var
|
|
4154
|
+
var Ns = process.env.NODE_ENV !== "development" ? function() {
|
|
4144
4155
|
return null;
|
|
4145
|
-
} :
|
|
4156
|
+
} : Ac;
|
|
4146
4157
|
process.env.NODE_ENV;
|
|
4147
|
-
const
|
|
4158
|
+
const Sc = _e(""), _c = () => {
|
|
4148
4159
|
as("dynamic-page-selector", {
|
|
4149
4160
|
description: "Dynamic page selector"
|
|
4150
4161
|
}), as("enable-add-page-dropdown", {
|
|
4151
4162
|
description: "Enable add page dropdown"
|
|
4152
4163
|
});
|
|
4153
|
-
},
|
|
4164
|
+
}, Pc = () => {
|
|
4154
4165
|
const e = I(), t = C();
|
|
4155
4166
|
return re({
|
|
4156
4167
|
queryKey: [p.GET_COLLECTIONS],
|
|
4157
4168
|
staleTime: 1 / 0,
|
|
4158
4169
|
queryFn: async () => t(e, { action: p.GET_COLLECTIONS })
|
|
4159
4170
|
});
|
|
4160
|
-
},
|
|
4171
|
+
}, wc = () => {
|
|
4161
4172
|
const { data: e } = ge(), { data: t } = xe(), { data: n } = He(), s = I(), r = C(), a = W(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]), i = ce(/* @__PURE__ */ new Map());
|
|
4162
4173
|
return X({
|
|
4163
4174
|
mutationFn: async ({ block: o }) => {
|
|
@@ -4188,7 +4199,7 @@ const _c = _e(""), Pc = () => {
|
|
|
4188
4199
|
}), f;
|
|
4189
4200
|
}
|
|
4190
4201
|
});
|
|
4191
|
-
},
|
|
4202
|
+
}, bc = () => {
|
|
4192
4203
|
const [, e] = Le();
|
|
4193
4204
|
return $(
|
|
4194
4205
|
(t, n) => {
|
|
@@ -4197,43 +4208,43 @@ const _c = _e(""), Pc = () => {
|
|
|
4197
4208
|
},
|
|
4198
4209
|
[e]
|
|
4199
4210
|
);
|
|
4200
|
-
},
|
|
4201
|
-
const e =
|
|
4211
|
+
}, vc = () => {
|
|
4212
|
+
const e = bc();
|
|
4202
4213
|
return $(
|
|
4203
4214
|
({ pageId: t }) => {
|
|
4204
4215
|
e(t);
|
|
4205
4216
|
},
|
|
4206
4217
|
[e]
|
|
4207
4218
|
);
|
|
4208
|
-
},
|
|
4219
|
+
}, Ic = {
|
|
4209
4220
|
SITE_WIDE_USAGE: "SITE_WIDE_USAGE"
|
|
4210
|
-
},
|
|
4221
|
+
}, Nc = (e) => {
|
|
4211
4222
|
const t = C(), n = I();
|
|
4212
4223
|
return re({
|
|
4213
|
-
queryKey: [
|
|
4224
|
+
queryKey: [Ic.SITE_WIDE_USAGE],
|
|
4214
4225
|
queryFn: async () => e ? t(n, { action: "GET_SITE_WIDE_USAGE" }) : {},
|
|
4215
4226
|
retry: !1
|
|
4216
4227
|
});
|
|
4217
|
-
},
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
const
|
|
4228
|
+
}, Cc = F(() => import("./page-lock-Cthbk6Pg.js")), Lc = F(() => import("./no-language-page-dialog-cpCZ9vES.js")), Gc = F(() => import("./digital-asset-manager-PcYficIX.js")), Oc = F(() => import("./save-to-lib-BERYhyxq.js")), kc = F(() => import("./theme-panel-footer-BlsXRcEY.js")), xc = F(() => import("./web-preview-B2YGL26D.js"));
|
|
4229
|
+
_c();
|
|
4230
|
+
di();
|
|
4231
|
+
wa(wo);
|
|
4232
|
+
Wo();
|
|
4233
|
+
_a(Gc);
|
|
4234
|
+
Pa(Oc);
|
|
4235
|
+
const Rc = {
|
|
4225
4236
|
role: "",
|
|
4226
4237
|
permissions: null
|
|
4227
|
-
},
|
|
4228
|
-
const { isLoading: t } =
|
|
4229
|
-
return t ? /* @__PURE__ */ c(Jn, { className: "fixed inset-0 bg-white", children: /* @__PURE__ */ c(dt, { className: "h-6 w-6 animate-spin text-primary" }) }) : /* @__PURE__ */ c(
|
|
4230
|
-
},
|
|
4238
|
+
}, Cs = (e) => {
|
|
4239
|
+
const { isLoading: t } = Go();
|
|
4240
|
+
return t ? /* @__PURE__ */ c(Jn, { className: "fixed inset-0 bg-white", children: /* @__PURE__ */ c(dt, { className: "h-6 w-6 animate-spin text-primary" }) }) : /* @__PURE__ */ c(Dc, { ...e });
|
|
4241
|
+
}, Dc = (e) => {
|
|
4231
4242
|
var De;
|
|
4232
|
-
const { data: t } =
|
|
4243
|
+
const { data: t } = Lo(), n = jn(), { data: s = Rc, isFetching: r } = Oo(), { data: a, isFetching: i } = Re(), { data: o, isFetching: l } = Pc(), { data: u, isFetching: d } = He(), f = r || i || l || d, [g] = Le(), h = g.get("page"), { data: y } = ge(), { data: P, isFetching: S } = Io(), { blocks: _ } = vo(P), { data: E, isFetching: w } = No(), { pageStatus: k } = we(), H = bo(), { onSave: A } = ko(), { mutateAsync: me } = wc(), { getPartialBlocks: ae, getPartialBlockBlocks: K } = xo(), { mutateAsync: v } = Pi(), { mutateAsync: N } = Co(), { data: Q } = Nc(((De = e.flags) == null ? void 0 : De.designTokens) ?? !0), B = vc(), [le, $e] = R(!1), Ee = ce([]), pe = W(() => q(u, "theme", {}) || {}, [u]), be = k === se.EDITING, En = k === se.CHECKING, Mt = S || En || w;
|
|
4233
4244
|
j(() => {
|
|
4234
4245
|
Ee.current = _;
|
|
4235
4246
|
}, [_]);
|
|
4236
|
-
const [pn] = Pe(
|
|
4247
|
+
const [pn] = Pe(Sc);
|
|
4237
4248
|
j(() => {
|
|
4238
4249
|
const te = () => {
|
|
4239
4250
|
document.hidden ? $e(!0) : $e(!1);
|
|
@@ -4253,11 +4264,11 @@ const Dc = {
|
|
|
4253
4264
|
Y,
|
|
4254
4265
|
{
|
|
4255
4266
|
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(dt, { className: "h-6 w-6 animate-spin text-primary" }) }),
|
|
4256
|
-
children: /* @__PURE__ */ c(
|
|
4267
|
+
children: /* @__PURE__ */ c(xc, {})
|
|
4257
4268
|
}
|
|
4258
4269
|
),
|
|
4259
4270
|
/* @__PURE__ */ c(
|
|
4260
|
-
|
|
4271
|
+
ha,
|
|
4261
4272
|
{
|
|
4262
4273
|
siteWideUsage: Q ?? {},
|
|
4263
4274
|
flags: e.flags ? { ...e.flags, librarySite: ue } : { librarySite: ue },
|
|
@@ -4281,26 +4292,26 @@ const Dc = {
|
|
|
4281
4292
|
getPartialBlockBlocks: K,
|
|
4282
4293
|
getPartialBlocks: ae,
|
|
4283
4294
|
blocks: S ? [] : _,
|
|
4284
|
-
theme:
|
|
4295
|
+
theme: Ma(pe),
|
|
4285
4296
|
pageTypes: a,
|
|
4286
4297
|
searchPageTypeItems: ve,
|
|
4287
4298
|
askAiCallBack: H,
|
|
4288
|
-
onSave: async ({ blocks: te, theme: Bt, needTranslations:
|
|
4299
|
+
onSave: async ({ blocks: te, theme: Bt, needTranslations: Vr, designTokens: es }) => {
|
|
4289
4300
|
if (!h) return !0;
|
|
4290
4301
|
Ee.current = te;
|
|
4291
4302
|
const ts = [...te];
|
|
4292
|
-
await A({ page: h, blocks: ts, needTranslations:
|
|
4303
|
+
await A({ page: h, blocks: ts, needTranslations: Vr }), Ee.current = ts;
|
|
4293
4304
|
const Ft = {};
|
|
4294
4305
|
return os(Bt, pe) || (Ft.theme = Bt), os(es, u == null ? void 0 : u.designTokens) || (Ft.designTokens = es), fe(Ft) || await N({ settings: Ft }), !0;
|
|
4295
4306
|
},
|
|
4296
|
-
themePanelComponent:
|
|
4307
|
+
themePanelComponent: kc,
|
|
4297
4308
|
...yn,
|
|
4298
|
-
children: /* @__PURE__ */ c(
|
|
4309
|
+
children: /* @__PURE__ */ c(Cc, { isFetchingPageData: Mt })
|
|
4299
4310
|
}
|
|
4300
4311
|
),
|
|
4301
|
-
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
|
|
4312
|
+
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(Lc, {}) })
|
|
4302
4313
|
] });
|
|
4303
|
-
},
|
|
4314
|
+
}, Uc = new Fa({
|
|
4304
4315
|
defaultOptions: {
|
|
4305
4316
|
queries: {
|
|
4306
4317
|
refetchOnWindowFocus: !1,
|
|
@@ -4308,10 +4319,10 @@ const Dc = {
|
|
|
4308
4319
|
refetchOnMount: !1
|
|
4309
4320
|
}
|
|
4310
4321
|
}
|
|
4311
|
-
}),
|
|
4322
|
+
}), ed = (e) => {
|
|
4312
4323
|
const [, t] = dn(), [n, s] = R(!1);
|
|
4313
4324
|
return j(() => (t(
|
|
4314
|
-
|
|
4325
|
+
Ks(e, [
|
|
4315
4326
|
"apiUrl",
|
|
4316
4327
|
"usersApiUrl",
|
|
4317
4328
|
"assetsApiUrl",
|
|
@@ -4331,18 +4342,18 @@ const Dc = {
|
|
|
4331
4342
|
}, 200), () => {
|
|
4332
4343
|
s(!1), t({});
|
|
4333
4344
|
}), [e, t]), n ? q(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(Te, { children: [
|
|
4334
|
-
/* @__PURE__ */ c(
|
|
4335
|
-
/* @__PURE__ */ c(
|
|
4336
|
-
] }) : /* @__PURE__ */ m(
|
|
4337
|
-
/* @__PURE__ */ c(
|
|
4338
|
-
/* @__PURE__ */ c(
|
|
4345
|
+
/* @__PURE__ */ c(Cs, { ...e }),
|
|
4346
|
+
/* @__PURE__ */ c(Ns, {})
|
|
4347
|
+
] }) : /* @__PURE__ */ m(Ka, { client: Uc, children: [
|
|
4348
|
+
/* @__PURE__ */ c(Cs, { ...e }),
|
|
4349
|
+
/* @__PURE__ */ c(Ns, {})
|
|
4339
4350
|
] }) : /* @__PURE__ */ c("div", {});
|
|
4340
|
-
},
|
|
4341
|
-
function
|
|
4351
|
+
}, Mc = z.lazy(() => import("./nested-path-selector-content-Be-pbnVl.js"));
|
|
4352
|
+
function Bc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
4342
4353
|
const [r, a] = z.useState(!1);
|
|
4343
|
-
return /* @__PURE__ */ m(
|
|
4354
|
+
return /* @__PURE__ */ m(ga, { open: r, onOpenChange: a, children: [
|
|
4344
4355
|
/* @__PURE__ */ m(on, { children: [
|
|
4345
|
-
/* @__PURE__ */ c(ln, { asChild: !0, children: /* @__PURE__ */ c(
|
|
4356
|
+
/* @__PURE__ */ c(ln, { asChild: !0, children: /* @__PURE__ */ c(ma, { asChild: !0, children: /* @__PURE__ */ c(
|
|
4346
4357
|
M,
|
|
4347
4358
|
{
|
|
4348
4359
|
size: "sm",
|
|
@@ -4366,7 +4377,7 @@ function Fc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4366
4377
|
/* @__PURE__ */ c(cn, { children: "Add field" })
|
|
4367
4378
|
] }),
|
|
4368
4379
|
r && /* @__PURE__ */ c(z.Suspense, { children: /* @__PURE__ */ c(
|
|
4369
|
-
|
|
4380
|
+
Mc,
|
|
4370
4381
|
{
|
|
4371
4382
|
data: e,
|
|
4372
4383
|
onSelect: t,
|
|
@@ -4377,17 +4388,17 @@ function Fc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4377
4388
|
) })
|
|
4378
4389
|
] });
|
|
4379
4390
|
}
|
|
4380
|
-
const
|
|
4391
|
+
const td = () => {
|
|
4381
4392
|
const { savePageAsync: e } = Ke(), t = J(), { isLocked: n } = we();
|
|
4382
4393
|
return $(async () => {
|
|
4383
4394
|
n || await e(), t.invalidateQueries({ queryKey: [p.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [p.GET_BUILDER_PAGE_DATA] });
|
|
4384
4395
|
}, [e, t, n]);
|
|
4385
|
-
},
|
|
4396
|
+
}, nd = () => {
|
|
4386
4397
|
const e = J();
|
|
4387
4398
|
return $(() => {
|
|
4388
4399
|
e.clear();
|
|
4389
4400
|
}, [e]);
|
|
4390
|
-
},
|
|
4401
|
+
}, sd = () => {
|
|
4391
4402
|
const e = I(), t = C(), { data: n } = xe(), s = J();
|
|
4392
4403
|
return X({
|
|
4393
4404
|
mutationFn: async (r) => {
|
|
@@ -4412,7 +4423,7 @@ const nd = () => {
|
|
|
4412
4423
|
console.error("Failed to update metadata");
|
|
4413
4424
|
}
|
|
4414
4425
|
});
|
|
4415
|
-
},
|
|
4426
|
+
}, Fc = F(() => import("./digital-asset-manager-PcYficIX.js")), rd = ({
|
|
4416
4427
|
assetId: e,
|
|
4417
4428
|
assetUrl: t,
|
|
4418
4429
|
onChange: n,
|
|
@@ -4426,7 +4437,7 @@ const nd = () => {
|
|
|
4426
4437
|
l(!1);
|
|
4427
4438
|
}, f = (y) => {
|
|
4428
4439
|
const P = Array.isArray(y) ? y[0] : y;
|
|
4429
|
-
P != null && P.url && n(
|
|
4440
|
+
P != null && P.url && n(Ks(P, ["url", "id"])), l(!1);
|
|
4430
4441
|
}, g = () => {
|
|
4431
4442
|
n({ url: "", id: "" });
|
|
4432
4443
|
}, h = (t == null ? void 0 : t.startsWith("{{")) && (t == null ? void 0 : t.endsWith("}}"));
|
|
@@ -4451,7 +4462,7 @@ const nd = () => {
|
|
|
4451
4462
|
className: "h-8 w-8 rounded-full bg-white text-red-500",
|
|
4452
4463
|
onClick: g,
|
|
4453
4464
|
disabled: a,
|
|
4454
|
-
children: h ? /* @__PURE__ */ c(
|
|
4465
|
+
children: h ? /* @__PURE__ */ c(ms, { className: "h-4 w-4" }) : /* @__PURE__ */ c(ni, { className: "h-4 w-4" })
|
|
4455
4466
|
}
|
|
4456
4467
|
),
|
|
4457
4468
|
!h && /* @__PURE__ */ c(
|
|
@@ -4463,7 +4474,7 @@ const nd = () => {
|
|
|
4463
4474
|
className: "h-8 w-8 rounded-full bg-white/80 hover:bg-white/90",
|
|
4464
4475
|
onClick: u,
|
|
4465
4476
|
disabled: a,
|
|
4466
|
-
children: /* @__PURE__ */ c(
|
|
4477
|
+
children: /* @__PURE__ */ c(Es, { className: "h-4 w-4" })
|
|
4467
4478
|
}
|
|
4468
4479
|
)
|
|
4469
4480
|
] })
|
|
@@ -4473,14 +4484,14 @@ const nd = () => {
|
|
|
4473
4484
|
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"}`,
|
|
4474
4485
|
onClick: u,
|
|
4475
4486
|
children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center gap-2", children: [
|
|
4476
|
-
/* @__PURE__ */ c(
|
|
4487
|
+
/* @__PURE__ */ c(Es, { className: "h-10 w-10 text-gray-400" }),
|
|
4477
4488
|
/* @__PURE__ */ c("p", { className: "text-sm text-gray-500", children: r })
|
|
4478
4489
|
] })
|
|
4479
4490
|
}
|
|
4480
4491
|
),
|
|
4481
|
-
/* @__PURE__ */ c(Vn, { open: o, onOpenChange: l, children: /* @__PURE__ */ m(
|
|
4482
|
-
/* @__PURE__ */ m(
|
|
4483
|
-
/* @__PURE__ */ c(
|
|
4492
|
+
/* @__PURE__ */ c(Vn, { open: o, onOpenChange: l, children: /* @__PURE__ */ m(Us, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
|
|
4493
|
+
/* @__PURE__ */ m(Ea, { className: "hidden border-b px-4 py-2", children: [
|
|
4494
|
+
/* @__PURE__ */ c(pa, { children: i("Select Image") }),
|
|
4484
4495
|
/* @__PURE__ */ c(
|
|
4485
4496
|
M,
|
|
4486
4497
|
{
|
|
@@ -4489,12 +4500,12 @@ const nd = () => {
|
|
|
4489
4500
|
size: "icon",
|
|
4490
4501
|
className: "absolute right-4 top-2",
|
|
4491
4502
|
onClick: d,
|
|
4492
|
-
children: /* @__PURE__ */ c(
|
|
4503
|
+
children: /* @__PURE__ */ c(ms, { className: "h-4 w-4" })
|
|
4493
4504
|
}
|
|
4494
4505
|
)
|
|
4495
4506
|
] }),
|
|
4496
4507
|
/* @__PURE__ */ c("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
4497
|
-
|
|
4508
|
+
Fc,
|
|
4498
4509
|
{
|
|
4499
4510
|
close: d,
|
|
4500
4511
|
onSelect: f,
|
|
@@ -4504,7 +4515,7 @@ const nd = () => {
|
|
|
4504
4515
|
) }) })
|
|
4505
4516
|
] }) })
|
|
4506
4517
|
] });
|
|
4507
|
-
},
|
|
4518
|
+
}, Kc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Ls = (e) => {
|
|
4508
4519
|
if (!e.trim())
|
|
4509
4520
|
return { isValid: !1, parsed: null, placeholders: [], error: { message: "JSON is empty" } };
|
|
4510
4521
|
try {
|
|
@@ -4539,13 +4550,13 @@ const nd = () => {
|
|
|
4539
4550
|
}
|
|
4540
4551
|
};
|
|
4541
4552
|
}
|
|
4542
|
-
},
|
|
4553
|
+
}, Vc = (e, t) => {
|
|
4543
4554
|
let s = JSON.stringify(e, null, 2);
|
|
4544
4555
|
return t.forEach(({ original: r }, a) => {
|
|
4545
|
-
const i = `"__placeholder_${a}__"`, o = new RegExp(
|
|
4556
|
+
const i = `"__placeholder_${a}__"`, o = new RegExp(Kc(i), "g");
|
|
4546
4557
|
s = s.replace(o, r);
|
|
4547
4558
|
}), s;
|
|
4548
|
-
},
|
|
4559
|
+
}, Hc = (e, t) => {
|
|
4549
4560
|
if (!e) return "";
|
|
4550
4561
|
let n = JSON.stringify(e, null, 2);
|
|
4551
4562
|
const s = /{{([^{}]+)}}/g;
|
|
@@ -4555,7 +4566,7 @@ const nd = () => {
|
|
|
4555
4566
|
n = n.replace(r[0], i);
|
|
4556
4567
|
}
|
|
4557
4568
|
return n;
|
|
4558
|
-
},
|
|
4569
|
+
}, qc = F(() => import("./shared-json-ld-DnTuCBc3.js")), ad = ({
|
|
4559
4570
|
value: e,
|
|
4560
4571
|
onChange: t,
|
|
4561
4572
|
disabled: n = !1,
|
|
@@ -4605,10 +4616,10 @@ const nd = () => {
|
|
|
4605
4616
|
}
|
|
4606
4617
|
};
|
|
4607
4618
|
j(() => {
|
|
4608
|
-
const K =
|
|
4619
|
+
const K = Ls(e);
|
|
4609
4620
|
K.isValid ? ls(() => {
|
|
4610
4621
|
if (y(null), K.parsed) {
|
|
4611
|
-
const v =
|
|
4622
|
+
const v = Hc(K.parsed, o);
|
|
4612
4623
|
S(v);
|
|
4613
4624
|
} else
|
|
4614
4625
|
S("");
|
|
@@ -4617,19 +4628,19 @@ const nd = () => {
|
|
|
4617
4628
|
});
|
|
4618
4629
|
}, [e, o]);
|
|
4619
4630
|
const me = () => {
|
|
4620
|
-
const K =
|
|
4631
|
+
const K = Ls(e);
|
|
4621
4632
|
if (K.isValid && K.parsed) {
|
|
4622
|
-
const v =
|
|
4633
|
+
const v = Vc(K.parsed, K.placeholders);
|
|
4623
4634
|
t(v);
|
|
4624
4635
|
}
|
|
4625
4636
|
}, ae = () => {
|
|
4626
4637
|
h != null && h.position && _.current && (_.current.focus(), _.current.setSelectionRange(h.position, h.position + 1));
|
|
4627
4638
|
};
|
|
4628
|
-
return /* @__PURE__ */ c(
|
|
4639
|
+
return /* @__PURE__ */ c(fi, { fallback: /* @__PURE__ */ c("div", { children: "Some error" }), children: /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ m(ya, { value: f, onValueChange: g, className: "w-full", children: [
|
|
4629
4640
|
/* @__PURE__ */ m("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
4630
|
-
/* @__PURE__ */ m(
|
|
4641
|
+
/* @__PURE__ */ m(Aa, { className: "w-max", children: [
|
|
4631
4642
|
/* @__PURE__ */ m(Tn, { value: "edit", className: "flex items-center gap-1", children: [
|
|
4632
|
-
/* @__PURE__ */ c(
|
|
4643
|
+
/* @__PURE__ */ c(si, { className: "h-4 w-4" }),
|
|
4633
4644
|
/* @__PURE__ */ c("span", { children: "Edit" })
|
|
4634
4645
|
] }),
|
|
4635
4646
|
/* @__PURE__ */ m(
|
|
@@ -4639,7 +4650,7 @@ const nd = () => {
|
|
|
4639
4650
|
className: "flex items-center gap-1",
|
|
4640
4651
|
disabled: !e.trim() || h !== null || k,
|
|
4641
4652
|
children: [
|
|
4642
|
-
/* @__PURE__ */ c(
|
|
4653
|
+
/* @__PURE__ */ c(ri, { className: "h-4 w-4" }),
|
|
4643
4654
|
/* @__PURE__ */ c("span", { children: "Preview" })
|
|
4644
4655
|
]
|
|
4645
4656
|
}
|
|
@@ -4651,14 +4662,14 @@ const nd = () => {
|
|
|
4651
4662
|
className: "flex items-center gap-1",
|
|
4652
4663
|
disabled: !e.trim() || h !== null,
|
|
4653
4664
|
children: [
|
|
4654
|
-
/* @__PURE__ */ c(
|
|
4665
|
+
/* @__PURE__ */ c(ai, { className: "h-4 w-4" }),
|
|
4655
4666
|
/* @__PURE__ */ c("span", { children: "Shared" })
|
|
4656
4667
|
]
|
|
4657
4668
|
}
|
|
4658
4669
|
)
|
|
4659
4670
|
] }),
|
|
4660
4671
|
k ? null : f === "edit" && !s && /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ c(
|
|
4661
|
-
|
|
4672
|
+
Bc,
|
|
4662
4673
|
{
|
|
4663
4674
|
dataType: "value",
|
|
4664
4675
|
data: o ?? {},
|
|
@@ -4676,13 +4687,13 @@ const nd = () => {
|
|
|
4676
4687
|
onClick: me,
|
|
4677
4688
|
className: "absolute right-1 top-1 h-6 w-6 p-1",
|
|
4678
4689
|
disabled: !e.trim() || n || h !== null,
|
|
4679
|
-
children: /* @__PURE__ */ c(
|
|
4690
|
+
children: /* @__PURE__ */ c(ii, {})
|
|
4680
4691
|
}
|
|
4681
4692
|
) }),
|
|
4682
4693
|
k ? /* @__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: [
|
|
4683
4694
|
/* @__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." }),
|
|
4684
4695
|
/* @__PURE__ */ m(M, { type: "button", variant: "default", size: "sm", onClick: d, children: [
|
|
4685
|
-
/* @__PURE__ */ c(
|
|
4696
|
+
/* @__PURE__ */ c(qs, {}),
|
|
4686
4697
|
"Copy & Edit from default language"
|
|
4687
4698
|
] })
|
|
4688
4699
|
] }) }) : /* @__PURE__ */ c(
|
|
@@ -4701,9 +4712,9 @@ const nd = () => {
|
|
|
4701
4712
|
readOnly: s
|
|
4702
4713
|
}
|
|
4703
4714
|
),
|
|
4704
|
-
h && /* @__PURE__ */ m(
|
|
4705
|
-
/* @__PURE__ */ c(
|
|
4706
|
-
/* @__PURE__ */ m(
|
|
4715
|
+
h && /* @__PURE__ */ m(ba, { variant: "destructive", className: "mt-2", children: [
|
|
4716
|
+
/* @__PURE__ */ c(oi, { className: "h-4 w-4" }),
|
|
4717
|
+
/* @__PURE__ */ m(va, { className: "flex flex-col", children: [
|
|
4707
4718
|
/* @__PURE__ */ c("span", { className: "font-medium", children: "Invalid JSON" }),
|
|
4708
4719
|
/* @__PURE__ */ c("span", { className: "text-sm", children: h.message }),
|
|
4709
4720
|
h.line && h.column && /* @__PURE__ */ m("span", { className: "text-sm", children: [
|
|
@@ -4730,9 +4741,9 @@ const nd = () => {
|
|
|
4730
4741
|
/* @__PURE__ */ c(rs, { rows: a, value: P, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
|
|
4731
4742
|
/* @__PURE__ */ c("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
|
|
4732
4743
|
] }),
|
|
4733
|
-
w && /* @__PURE__ */ c(Sn, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(
|
|
4744
|
+
w && /* @__PURE__ */ c(Sn, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(Y, { children: /* @__PURE__ */ c(qc, {}) }) })
|
|
4734
4745
|
] }) }) });
|
|
4735
|
-
},
|
|
4746
|
+
}, id = (e) => {
|
|
4736
4747
|
const t = I(), n = C();
|
|
4737
4748
|
return re({
|
|
4738
4749
|
queryKey: [p.GET_CHAI_USER, e],
|
|
@@ -4747,7 +4758,7 @@ const nd = () => {
|
|
|
4747
4758
|
staleTime: "static"
|
|
4748
4759
|
});
|
|
4749
4760
|
};
|
|
4750
|
-
class
|
|
4761
|
+
class $c {
|
|
4751
4762
|
constructor(t) {
|
|
4752
4763
|
An(this, "channel");
|
|
4753
4764
|
this.channel = t;
|
|
@@ -4792,141 +4803,141 @@ class Qc {
|
|
|
4792
4803
|
return this.channel.presenceState();
|
|
4793
4804
|
}
|
|
4794
4805
|
}
|
|
4795
|
-
class
|
|
4806
|
+
class Qc {
|
|
4796
4807
|
constructor(t) {
|
|
4797
4808
|
An(this, "client");
|
|
4798
4809
|
this.client = t;
|
|
4799
4810
|
}
|
|
4800
4811
|
channel(t, n) {
|
|
4801
4812
|
const s = this.client.channel(t, n);
|
|
4802
|
-
return new
|
|
4813
|
+
return new $c(s);
|
|
4803
4814
|
}
|
|
4804
4815
|
}
|
|
4805
|
-
function
|
|
4806
|
-
return new
|
|
4816
|
+
function od(e) {
|
|
4817
|
+
return new Qc(e);
|
|
4807
4818
|
}
|
|
4808
4819
|
if (typeof window > "u")
|
|
4809
4820
|
throw new Error("@chaibuilder/pages is not available on the server");
|
|
4810
4821
|
export {
|
|
4811
|
-
|
|
4822
|
+
Ou as $,
|
|
4812
4823
|
p as A,
|
|
4813
4824
|
Jn as B,
|
|
4814
4825
|
V as C,
|
|
4815
|
-
|
|
4826
|
+
el as D,
|
|
4816
4827
|
ie as E,
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4828
|
+
dr as F,
|
|
4829
|
+
Ku as G,
|
|
4830
|
+
Mu as H,
|
|
4831
|
+
Bu as I,
|
|
4821
4832
|
kn as J,
|
|
4822
4833
|
Fe as K,
|
|
4823
4834
|
Ht as L,
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4835
|
+
vl as M,
|
|
4836
|
+
Fu as N,
|
|
4837
|
+
Pl as O,
|
|
4827
4838
|
se as P,
|
|
4828
|
-
|
|
4839
|
+
Gu as Q,
|
|
4829
4840
|
At as R,
|
|
4830
|
-
|
|
4841
|
+
Ru as S,
|
|
4831
4842
|
Zn as T,
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4843
|
+
Yu as U,
|
|
4844
|
+
Ju as V,
|
|
4845
|
+
Iu as W,
|
|
4835
4846
|
On as X,
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4847
|
+
$u as Y,
|
|
4848
|
+
Gl as Z,
|
|
4849
|
+
Zu as _,
|
|
4839
4850
|
we as a,
|
|
4840
4851
|
zn as a$,
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4852
|
+
vu as a0,
|
|
4853
|
+
qu as a1,
|
|
4854
|
+
zu as a2,
|
|
4855
|
+
Qu as a3,
|
|
4856
|
+
Wu as a4,
|
|
4857
|
+
ju as a5,
|
|
4858
|
+
ku as a6,
|
|
4848
4859
|
ee as a7,
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4860
|
+
lr as a8,
|
|
4861
|
+
Cu as a9,
|
|
4862
|
+
Ws as aA,
|
|
4852
4863
|
fn as aB,
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
+
Ys as aC,
|
|
4865
|
+
Tu as aD,
|
|
4866
|
+
Pu as aE,
|
|
4867
|
+
ad as aF,
|
|
4868
|
+
Ls as aG,
|
|
4869
|
+
Su as aH,
|
|
4870
|
+
wu as aI,
|
|
4871
|
+
bu as aJ,
|
|
4872
|
+
_u as aK,
|
|
4873
|
+
No as aL,
|
|
4874
|
+
_i as aM,
|
|
4864
4875
|
dn as aN,
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4876
|
+
Zi as aO,
|
|
4877
|
+
Bc as aP,
|
|
4878
|
+
rd as aQ,
|
|
4879
|
+
wi as aR,
|
|
4880
|
+
fu as aS,
|
|
4881
|
+
ji as aT,
|
|
4882
|
+
ed as aU,
|
|
4872
4883
|
xe as aV,
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4884
|
+
nd as aW,
|
|
4885
|
+
vc as aX,
|
|
4886
|
+
td as aY,
|
|
4887
|
+
sd as aZ,
|
|
4888
|
+
$s as a_,
|
|
4889
|
+
Ll as aa,
|
|
4890
|
+
Ar as ab,
|
|
4880
4891
|
Be as ac,
|
|
4881
|
-
|
|
4882
|
-
|
|
4892
|
+
hc as ad,
|
|
4893
|
+
xu as ae,
|
|
4883
4894
|
zt as af,
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4895
|
+
Il as ag,
|
|
4896
|
+
Hu as ah,
|
|
4897
|
+
Uu as ai,
|
|
4898
|
+
Du as aj,
|
|
4888
4899
|
Wt as ak,
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4900
|
+
dl as al,
|
|
4901
|
+
Vu as am,
|
|
4902
|
+
Jo as an,
|
|
4903
|
+
Mi as ao,
|
|
4904
|
+
id as ap,
|
|
4905
|
+
Di as aq,
|
|
4895
4906
|
I as ar,
|
|
4896
4907
|
C as as,
|
|
4897
|
-
|
|
4898
|
-
|
|
4908
|
+
bc as at,
|
|
4909
|
+
Au as au,
|
|
4899
4910
|
Xt as av,
|
|
4900
4911
|
ge as aw,
|
|
4901
4912
|
Pn as ax,
|
|
4902
4913
|
ye as ay,
|
|
4903
4914
|
he as az,
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4915
|
+
Js as b,
|
|
4916
|
+
Oo as b0,
|
|
4917
|
+
Qc as b1,
|
|
4918
|
+
od as b2,
|
|
4908
4919
|
Le as c,
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4920
|
+
io as d,
|
|
4921
|
+
er as e,
|
|
4922
|
+
Co as f,
|
|
4912
4923
|
Yn as g,
|
|
4913
|
-
|
|
4914
|
-
|
|
4924
|
+
hu as h,
|
|
4925
|
+
gu as i,
|
|
4915
4926
|
He as j,
|
|
4916
4927
|
jn as k,
|
|
4917
4928
|
Ve as l,
|
|
4918
4929
|
Re as m,
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4930
|
+
pi as n,
|
|
4931
|
+
mu as o,
|
|
4932
|
+
Sc as p,
|
|
4933
|
+
pu as q,
|
|
4934
|
+
yu as r,
|
|
4935
|
+
Eu as s,
|
|
4936
|
+
ps as t,
|
|
4937
|
+
du as u,
|
|
4938
|
+
uu as v,
|
|
4939
|
+
Xu as w,
|
|
4929
4940
|
Z as x,
|
|
4930
|
-
|
|
4931
|
-
|
|
4941
|
+
yr as y,
|
|
4942
|
+
Lu as z
|
|
4932
4943
|
};
|