@chaibuilder/sdk 4.0.0-beta.6 → 4.0.0-beta.7
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/README.md +75 -50
- package/dist/{2SSKDMRQ-BIryEtW-.cjs → 2SSKDMRQ-DDOgISWg.cjs} +1 -1
- package/dist/{2SSKDMRQ-trME0kvt.js → 2SSKDMRQ-hL7THuKW.js} +2 -2
- package/dist/{AP7HFJJL-CAGB9iMp.js → AP7HFJJL-BsLQ13V_.js} +1 -1
- package/dist/{AP7HFJJL-5ZR38Hyh.cjs → AP7HFJJL-tcAhVllC.cjs} +1 -1
- package/dist/{IconPicker-Mu75ni5T.js → IconPicker-FLSVAZxx.js} +1 -1
- package/dist/{IconPicker-CQ-BgNNU.cjs → IconPicker-J1KLNrSB.cjs} +1 -1
- package/dist/{WDYDFRGG-n8sBZVFG.cjs → WDYDFRGG-BTj8AXV6.cjs} +1 -1
- package/dist/{WDYDFRGG-Cd4hRWj-.js → WDYDFRGG-Yi0eNS2V.js} +2 -2
- package/dist/{actions-registery-JdxhXhT6.cjs → actions-registery-CtQSSexG.cjs} +31 -31
- package/dist/{actions-registery-y_ENc8zj.js → actions-registery-DqrFhSMp.js} +2414 -2418
- package/dist/actions.cjs +1 -1
- package/dist/actions.d.ts +0 -34
- package/dist/actions.js +3 -3
- package/dist/{active-in-another-tab-CZLV-uAW.cjs → active-in-another-tab-BtAiatqq.cjs} +1 -1
- package/dist/{active-in-another-tab-Cb6tnX9u.js → active-in-another-tab-Dozn833d.js} +2 -2
- package/dist/{add-new-language-page-C3UzNV7W.cjs → add-new-language-page-9AMizlES.cjs} +1 -1
- package/dist/{add-new-language-page-BKcBaqZu.js → add-new-language-page-DD-CAoAQ.js} +3 -3
- package/dist/{add-new-page-mULv9r3z.cjs → add-new-page-BS9vPnFG.cjs} +1 -1
- package/dist/{add-new-page-pH3PwqJe.js → add-new-page-uZKCk9eB.js} +2 -2
- package/dist/{ai-panel-content-CNxN84pv.js → ai-panel-content-CK4XOkEh.js} +3 -3
- package/dist/{ai-panel-content-BPgRdgye.cjs → ai-panel-content-PovaKJaj.cjs} +1 -1
- package/dist/{ai-panel-default-lang-DhTPtPgD.cjs → ai-panel-default-lang-B37k5ADH.cjs} +2 -2
- package/dist/{ai-panel-default-lang-CYcHjk8U.js → ai-panel-default-lang-BtLjUl9d.js} +3 -3
- package/dist/{ai-panel-other-lang-CGNU3-FI.cjs → ai-panel-other-lang-CdQmASqv.cjs} +1 -1
- package/dist/{ai-panel-other-lang-D8Ofvj8F.js → ai-panel-other-lang-Dp1MNaLi.js} +3 -3
- package/dist/{ai-prompt-input-Ceuy5bs3.js → ai-prompt-input-BT-mEdTX.js} +1 -1
- package/dist/{ai-prompt-input-CUutJjlf.cjs → ai-prompt-input-Dtym4w8J.cjs} +1 -1
- package/dist/{ai-translation-prompt-CoCPLEed.cjs → ai-translation-prompt-B-lH7emI.cjs} +1 -1
- package/dist/{ai-translation-prompt-BiepZRcN.js → ai-translation-prompt-B17GK1QR.js} +1 -1
- package/dist/{code-editor-C1ewJzDJ.cjs → code-editor-CUeNiMzA.cjs} +1 -1
- package/dist/{code-editor-Z14ByBIv.js → code-editor-EZT2pMsU.js} +1 -1
- package/dist/{continue-editing-in-this-client-Byi6ER3L.js → continue-editing-in-this-client-CS7C6h9Q.js} +2 -2
- package/dist/{continue-editing-in-this-client-k9Ab5E63.cjs → continue-editing-in-this-client-DMZOc36k.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{css-import-modal--bSJR-_y.cjs → css-import-modal-kHB0ramf.cjs} +1 -1
- package/dist/{css-import-modal-De7Kvg5C.js → css-import-modal-s7t5gZQo.js} +1 -1
- package/dist/{delete-design-token-B97CnFDU.js → delete-design-token-C1smbx4E.js} +1 -1
- package/dist/{delete-design-token-C6s-ESB_.cjs → delete-design-token-Mbw_6sYI.cjs} +1 -1
- package/dist/{delete-page-Dnf97ZHP.js → delete-page-2GfBi8Iv.js} +2 -2
- package/dist/{delete-page-Djn97HiP.cjs → delete-page-B7J3t0FN.cjs} +1 -1
- package/dist/{design-token-usage-OTd93kS8.cjs → design-token-usage-BoGOULG8.cjs} +1 -1
- package/dist/{design-token-usage-B-SykAjD.js → design-token-usage-DyO3xM-F.js} +1 -1
- package/dist/{digital-asset-manager-b8gDuLnI.js → digital-asset-manager-Cz3Nlrzl.js} +3 -3
- package/dist/{digital-asset-manager-DHYRXaaq.cjs → digital-asset-manager-DDk2ucTE.cjs} +1 -1
- package/dist/{duplicate-page-Bdtpl7_R.js → duplicate-page-BwAY4Ssm.js} +3 -3
- package/dist/{duplicate-page-C4Ovp8Ff.cjs → duplicate-page-Dw3U4wTT.cjs} +1 -1
- package/dist/{dynamic-page-selector-B8DdnfrF.cjs → dynamic-page-selector-CvBFyX2F.cjs} +1 -1
- package/dist/{dynamic-page-selector-BVnIM1Rq.js → dynamic-page-selector-sViJuQlU.js} +2 -2
- package/dist/{image-editor-C2zOHeKv.cjs → image-editor-AIsccrqC.cjs} +1 -1
- package/dist/{image-editor-cckqPmk5.js → image-editor-BgGQuESa.js} +1 -1
- package/dist/{index-Bn0fFN58.js → index-B7eWP_hB.js} +522 -511
- package/dist/index-BwH1mRm_.cjs +5 -0
- package/dist/{index-CAhEmHYP.js → index-RYr8kQdI.js} +2132 -2130
- package/dist/{index-B0e71wJ1.cjs → index-xYnNKovy.cjs} +15 -15
- package/dist/{json-diff-viewer-D9DVIBz4.cjs → json-diff-viewer-B2A78udz.cjs} +1 -1
- package/dist/{json-diff-viewer-DNizzMnu.js → json-diff-viewer-Svw-kbhe.js} +2 -2
- package/dist/{lang-panel-C1dbn163.cjs → lang-panel-AmEkoWid.cjs} +1 -1
- package/dist/{lang-panel-DL_BtSRD.js → lang-panel-Bnc-9wkM.js} +3 -3
- package/dist/{manage-design-tokens-CXjYkarE.cjs → manage-design-tokens-B2fG80bi.cjs} +1 -1
- package/dist/{manage-design-tokens-xxMO_RYg.js → manage-design-tokens-BBkh1t4w.js} +2 -2
- package/dist/{mark-as-template-Ba2bmVd9.js → mark-as-template-0CPzZnk-.js} +2 -2
- package/dist/{mark-as-template-DF1KIMr0.cjs → mark-as-template-CE6tRoQy.cjs} +1 -1
- package/dist/{nested-path-selector-content-Cuk7NB-u.cjs → nested-path-selector-content-SmfjElr-.cjs} +1 -1
- package/dist/{nested-path-selector-content-Br1IWhK5.js → nested-path-selector-content-kGznHufl.js} +1 -1
- package/dist/{no-language-page-content-CxTp-LIM.cjs → no-language-page-content-B4bQLc4K.cjs} +1 -1
- package/dist/{no-language-page-content-9B2Fm-on.js → no-language-page-content-DXsAPDZd.js} +2 -2
- package/dist/{no-language-page-dialog-DynACvgV.cjs → no-language-page-dialog-BC8NHzK2.cjs} +1 -1
- package/dist/{no-language-page-dialog-CPlKMyb8.js → no-language-page-dialog-BpPqmw9a.js} +2 -2
- package/dist/{page-creator-Cbfv9N0P.cjs → page-creator-82qTbBj4.cjs} +1 -1
- package/dist/{page-creator-BtyJz2sx.js → page-creator-Bazn6yH4.js} +3 -3
- package/dist/{page-lock-CzsxrmN5.js → page-lock-CRFyqKZE.js} +2 -2
- package/dist/{page-lock-fRos9wRU.cjs → page-lock-D2iFZDUK.cjs} +1 -1
- package/dist/{page-locked-dialog-D2q9qkPk.js → page-locked-dialog-GKfQEOmk.js} +2 -2
- package/dist/{page-locked-dialog-D57d2gvn.cjs → page-locked-dialog-xLqvKzax.cjs} +1 -1
- package/dist/{page-manager-new-aE198gKS.cjs → page-manager-new-Bn2QKjbf.cjs} +1 -1
- package/dist/{page-manager-new-D6DVIx2S.js → page-manager-new-DItY2hjd.js} +3 -3
- package/dist/{page-manager-search-and-filter-CuZkQaZg.js → page-manager-search-and-filter-CPa8IXdd.js} +2 -2
- package/dist/{page-manager-search-and-filter-DGQEgKzy.cjs → page-manager-search-and-filter-Dc4ky-qV.cjs} +1 -1
- package/dist/{page-revisions-content-5rbicFbD.js → page-revisions-content-CH-PZK0O.js} +3 -3
- package/dist/{page-revisions-content-CefqOvKX.cjs → page-revisions-content-CcLFI4YK.cjs} +1 -1
- package/dist/pages.cjs +1 -1
- package/dist/pages.js +1 -1
- package/dist/{publish-pages-content-DBb8M3TG.cjs → publish-pages-content-BzJDObqr.cjs} +1 -1
- package/dist/{publish-pages-content-WeGk-YLC.js → publish-pages-content-CSJCFElu.js} +3 -3
- package/dist/{rte-widget-modal-J-_AytmK.js → rte-widget-modal-5T81P_hg.js} +1 -1
- package/dist/{rte-widget-modal-DBoPRXq-.cjs → rte-widget-modal-BfXcA7OP.cjs} +1 -1
- package/dist/{save-to-lib-0ysmXVbI.cjs → save-to-lib-DGAdSa-0.cjs} +1 -1
- package/dist/{save-to-lib-CQQxoovF.js → save-to-lib-MtWKSVeN.js} +2 -2
- package/dist/{selected-block-display-CgoXS8Hr.js → selected-block-display-CB1-hVR5.js} +2 -2
- package/dist/{selected-block-display-BWupQFoQ.cjs → selected-block-display-DLt_nMn9.cjs} +1 -1
- package/dist/{seo-panel-B798Myp_.js → seo-panel-CRzzw4FW.js} +2 -2
- package/dist/{seo-panel-BkFbXIL0.cjs → seo-panel-_kGXE9MC.cjs} +1 -1
- package/dist/{shared-json-ld-Clg_UEhd.js → shared-json-ld-CXukkDeS.js} +2 -2
- package/dist/{shared-json-ld-Cn3MCW6I.cjs → shared-json-ld-DoRgzDPC.cjs} +1 -1
- package/dist/{slug-input-hX5VaZpj.js → slug-input-CeEQ0zyv.js} +1 -1
- package/dist/{slug-input-BHyD8cxk.cjs → slug-input-Dp187Tiy.cjs} +1 -1
- package/dist/supabase-actions.cjs +1 -1
- package/dist/supabase-actions.d.ts +5 -0
- package/dist/supabase-actions.js +1 -1
- package/dist/{take-over-request-s1L5Yofb.js → take-over-request-C9J3_rev.js} +2 -2
- package/dist/{take-over-request-Dzczo20q.cjs → take-over-request-CXuakFBm.cjs} +1 -1
- package/dist/{theme-panel-footer-NTNCL0SW.cjs → theme-panel-footer-CWZ0qs13.cjs} +1 -1
- package/dist/{theme-panel-footer-sK6bYhEb.js → theme-panel-footer-DvwsyHNQ.js} +2 -2
- package/dist/{translation-warning-modal-BfM4HGck.cjs → translation-warning-modal-DEt_ExQp.cjs} +1 -1
- package/dist/{translation-warning-modal-Jadkcver.js → translation-warning-modal-_aBp5ZZQ.js} +1 -1
- package/dist/{unmark-as-template-CqkHI3gR.cjs → unmark-as-template-BYL5naYx.cjs} +1 -1
- package/dist/{unmark-as-template-D5b775eR.js → unmark-as-template-JN-cDUV_.js} +2 -2
- package/dist/{unpublish-page-BT5bCfs6.cjs → unpublish-page-B06iZEIO.cjs} +1 -1
- package/dist/{unpublish-page-DLLLgY43.js → unpublish-page-DqwBY2yI.js} +2 -2
- package/dist/{web-preview-C_yFwxEe.js → web-preview-h39D3TUh.js} +1 -1
- package/dist/{web-preview-DU1MgppY.cjs → web-preview-wRgRY3Tv.cjs} +1 -1
- package/package.json +22 -24
- package/dist/index-DKuwxj1x.cjs +0 -5
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
1
|
+
var zn = (e) => {
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var A = (e, t, n) => (
|
|
4
|
+
var Wn = (e, t, n) => t.has(e) || zn("Cannot " + n);
|
|
5
|
+
var A = (e, t, n) => (Wn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), O = (e, t, n) => t.has(e) ? zn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), C = (e, t, n, s) => (Wn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
6
6
|
import { jsxs as m, jsx as c, Fragment as he } from "react/jsx-runtime";
|
|
7
|
-
import { n as Pe, aj as Ur, ai as
|
|
8
|
-
import { B as M, h as da, j as fa, v as kt, e as
|
|
7
|
+
import { n as Pe, aj as Ur, ai as _s, r as Ln, s as Cn, t as Gn, v as ce, Q as Re, w as en, x as tn, y as nn, aB as Ps, aC as ws, a9 as Mr, aa as Br, aD as Fr, aE as Kr, ar as vs, aF as Vr, ab as Dt, D as Is, aG as Hr, aH as qr, aw as $r, av as Qr, ax as zr, E as Wr, F as jr, G as Yr, H as Jr, I as Zr, J as Xr, K as ea, M as ta, O as na, aI as sa, a6 as ra, a7 as aa, d as ia, e as oa, f as la, as as ca, at as ua, au as cn, aJ as un, T as jn } from "./index-RYr8kQdI.js";
|
|
8
|
+
import { B as M, h as da, j as fa, v as kt, e as Yn, m as ha, q as ga, x as ma, D as Ea, F as pa } from "./register-chai-top-bar-ESJHs5s-.js";
|
|
9
9
|
import { atom as Ee, useAtom as pe, useSetAtom as On, useAtomValue as ya } from "jotai";
|
|
10
|
-
import { get as H, reverse as Aa, sortBy as Ta, find as ie,
|
|
10
|
+
import { get as H, noop as xn, reverse as Aa, sortBy as Ta, find as ie, minBy as bs, values as Ns, first as Ls, groupBy as Sa, keyBy as _a, map as qt, isEmpty as fe, compact as Cs, each as Pa, upperCase as Jn, filter as Gs, includes as wa, has as sn, pickBy as va, pick as Dn, endsWith as Ia, keys as ba, isArray as Na, startCase as La, isFunction as Ca, cloneDeep as Ga, isEqual as Zn } from "lodash-es";
|
|
11
11
|
import * as $ from "react";
|
|
12
|
-
import Oa, { useMemo as q, useCallback as z, useState as K, useEffect as
|
|
12
|
+
import Oa, { useMemo as q, useCallback as z, useState as K, useEffect as ne, useRef as be, Suspense as X, lazy as V, startTransition as Xn } from "react";
|
|
13
13
|
import { useQuery as re, useMutation as Y, useQueryClient as J, onlineManager as Os, QueryClient as xa, QueryClientProvider as Da } from "@tanstack/react-query";
|
|
14
|
-
import { CopyPlusIcon as ka, Pencil as Ra, Power as Ua, Trash as Ma, SquareLibrary as
|
|
14
|
+
import { CopyPlusIcon as ka, Pencil as Ra, Power as Ua, Trash as Ma, SquareLibrary as es, LogsIcon as Ba, Folder as Fa, Loader as $t, Hash as Ka, File as Va, MoreHorizontal as ts, Languages as ns, ChevronDown as yn, Star as Ha, Plus as xs, History as qa, Palette as $a, Play as Qa, CheckCircle as za, Save as Wa, Send as ss, Rocket as rs, ExternalLink as ja, LanguagesIcon as Ya, User as Ja, X as as, Trash2 as Za, ImageIcon as is, Code as Xa, Eye as ei, Share2 as ti, FileCode2 as ni, AlertTriangle as si } from "lucide-react";
|
|
15
15
|
import { useTranslation as we } from "react-i18next";
|
|
16
16
|
import { c as Qt } from "./common-functions-D2lMFR6K.js";
|
|
17
17
|
import { toast as R } from "sonner";
|
|
@@ -49,7 +49,6 @@ const zt = Ee(null), E = {
|
|
|
49
49
|
GET_WEBSITE_DRAFT_SETTINGS: "GET_WEBSITE_DRAFT_SETTINGS",
|
|
50
50
|
AI_CONTEXT: "AI_CONTEXT",
|
|
51
51
|
GET_WEBSITE_DATA: "GET_WEBSITE_DATA",
|
|
52
|
-
UPDATE_WEBSITE_DATA: "UPDATE_WEBSITE_DATA",
|
|
53
52
|
GET_CHAI_USER: "GET_CHAI_USER",
|
|
54
53
|
GET_SEO_FIELDS: "GET_SEO_FIELDS",
|
|
55
54
|
GET_BUILDER_PAGE_DATA: "GET_BUILDER_PAGE_DATA",
|
|
@@ -83,18 +82,18 @@ const zt = Ee(null), E = {
|
|
|
83
82
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
84
83
|
GET_ASSETS: "GET_ASSETS",
|
|
85
84
|
GET_ASSET: "GET_ASSET"
|
|
86
|
-
}, ci = Ee({}),
|
|
87
|
-
const [n] =
|
|
85
|
+
}, ci = Ee({}), kn = () => pe(ci), ge = (e, t) => {
|
|
86
|
+
const [n] = kn();
|
|
88
87
|
return q(() => H(n, e, t), [n, e, t]);
|
|
89
|
-
},
|
|
88
|
+
}, I = () => ge("apiUrl", "/chai/api"), Ds = () => ge("websocket", null), ui = async (e, t, n = {}) => await fetch(e, {
|
|
90
89
|
method: "POST",
|
|
91
90
|
headers: {
|
|
92
91
|
"Content-Type": "application/json",
|
|
93
92
|
...n
|
|
94
93
|
},
|
|
95
94
|
body: JSON.stringify(t)
|
|
96
|
-
}),
|
|
97
|
-
const e =
|
|
95
|
+
}), Yc = () => {
|
|
96
|
+
const e = b(), t = I();
|
|
98
97
|
return z(
|
|
99
98
|
async ({
|
|
100
99
|
body: n,
|
|
@@ -104,8 +103,8 @@ const zt = Ee(null), E = {
|
|
|
104
103
|
}) => e(r, n, s, a),
|
|
105
104
|
[e]
|
|
106
105
|
);
|
|
107
|
-
},
|
|
108
|
-
const e = ge("onLogout"), t = ge("getAccessToken"), n =
|
|
106
|
+
}, b = () => {
|
|
107
|
+
const e = ge("onLogout", xn), t = ge("getAccessToken"), n = I();
|
|
109
108
|
return z(
|
|
110
109
|
async (s = n, r, a = {}, i = !1) => {
|
|
111
110
|
const o = await t();
|
|
@@ -117,7 +116,7 @@ const zt = Ee(null), E = {
|
|
|
117
116
|
if (i)
|
|
118
117
|
return f;
|
|
119
118
|
if (f.status === 401)
|
|
120
|
-
return console.log("401 Response", f), e(),
|
|
119
|
+
return console.log("401 Response", f), await e(), null;
|
|
121
120
|
if (!f.ok) {
|
|
122
121
|
const d = await f.json();
|
|
123
122
|
throw console.error(`API Error (${f.status}):`, d), {
|
|
@@ -139,7 +138,7 @@ function ve() {
|
|
|
139
138
|
const [e, t] = K(
|
|
140
139
|
new URLSearchParams(window.location.search)
|
|
141
140
|
);
|
|
142
|
-
return
|
|
141
|
+
return ne(() => {
|
|
143
142
|
const n = () => {
|
|
144
143
|
t(new URLSearchParams(window.location.search));
|
|
145
144
|
};
|
|
@@ -149,7 +148,7 @@ function ve() {
|
|
|
149
148
|
}, []), [e, t];
|
|
150
149
|
}
|
|
151
150
|
const Me = (e) => {
|
|
152
|
-
const t =
|
|
151
|
+
const t = I(), [n] = ve(), s = e ?? n.get("page"), r = b();
|
|
153
152
|
return re({
|
|
154
153
|
queryKey: [E.GET_LANGUAGE_PAGES, s],
|
|
155
154
|
staleTime: 1 / 0,
|
|
@@ -165,19 +164,19 @@ const Me = (e) => {
|
|
|
165
164
|
},
|
|
166
165
|
enabled: !!s
|
|
167
166
|
});
|
|
168
|
-
}, di = Ee(null), ks = () => pe(di),
|
|
167
|
+
}, di = Ee(null), ks = () => pe(di), Rn = () => {
|
|
169
168
|
const [e] = ks();
|
|
170
169
|
return (e == null ? void 0 : e.slug) || "";
|
|
171
170
|
};
|
|
172
171
|
function fi(e, t) {
|
|
173
172
|
const [n, s] = K(e);
|
|
174
|
-
return
|
|
173
|
+
return ne(() => {
|
|
175
174
|
const r = setTimeout(() => s(e), t);
|
|
176
175
|
return () => clearTimeout(r);
|
|
177
176
|
}, [e, t]), n;
|
|
178
177
|
}
|
|
179
178
|
const hi = ({ query: e, uuid: t }) => {
|
|
180
|
-
const { selectedLang: n, fallbackLang: s } = Pe(), { data: r } = oe(), a = r == null ? void 0 : r.pageType, i =
|
|
179
|
+
const { selectedLang: n, fallbackLang: s } = Pe(), { data: r } = oe(), a = r == null ? void 0 : r.pageType, i = I(), o = b(), { data: l, isFetching: f } = re({
|
|
181
180
|
queryKey: [E.GET_DYNAMIC_PAGES, e, a, t],
|
|
182
181
|
staleTime: 3600 * 1e3,
|
|
183
182
|
placeholderData: [],
|
|
@@ -214,7 +213,7 @@ const hi = ({ query: e, uuid: t }) => {
|
|
|
214
213
|
const [e] = ve(), t = e.get("lang") ?? "", { data: n, isFetching: s } = Me();
|
|
215
214
|
return { data: q(() => ie(n, { lang: t }) || {}, [n, t]), isFetching: s };
|
|
216
215
|
}, Ei = Ee({}), pi = () => pe(Ei), yi = () => {
|
|
217
|
-
const { data: e } = Le(), t =
|
|
216
|
+
const { data: e } = Le(), t = Rn(), n = ge("getLiveUrl", xn), s = e == null ? void 0 : e.slug, r = n(s || "/");
|
|
218
217
|
return t ? r + t : r;
|
|
219
218
|
}, le = {
|
|
220
219
|
...Ur,
|
|
@@ -233,7 +232,7 @@ const hi = ({ query: e, uuid: t }) => {
|
|
|
233
232
|
DELETE_REVISION: "delete_revision",
|
|
234
233
|
DELETE_LIBRARY_BLOCK: "delete_library_block"
|
|
235
234
|
}, Ce = () => {
|
|
236
|
-
const e =
|
|
235
|
+
const e = I(), t = b();
|
|
237
236
|
return re({
|
|
238
237
|
queryKey: [E.GET_PAGE_TYPES],
|
|
239
238
|
staleTime: 1 / 0,
|
|
@@ -244,7 +243,7 @@ const hi = ({ query: e, uuid: t }) => {
|
|
|
244
243
|
const { data: t } = Ce();
|
|
245
244
|
return q(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
|
|
246
245
|
}, Ti = () => {
|
|
247
|
-
const e =
|
|
246
|
+
const e = I(), t = b();
|
|
248
247
|
return Y({
|
|
249
248
|
mutationFn: async ({ pageType: n, query: s }) => {
|
|
250
249
|
try {
|
|
@@ -271,7 +270,7 @@ const hi = ({ query: e, uuid: t }) => {
|
|
|
271
270
|
children: o,
|
|
272
271
|
isLanguagePage: l
|
|
273
272
|
}) => {
|
|
274
|
-
const { t: f } = we(), { hasPermission: d } =
|
|
273
|
+
const { t: f } = we(), { hasPermission: d } = _s(), { data: u } = Ce(), g = q(() => ie(u, { key: e.pageType }), [u, e.pageType]), h = q(() => !!e.isTemplate, [e.isTemplate]), p = q(() => !!(g != null && g.hasSlug), [g == null ? void 0 : g.hasSlug]);
|
|
275
274
|
return !d(le.EDIT_PAGE) && !d(le.DELETE_PAGE) && !d(le.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ m(Ln, { children: [
|
|
276
275
|
/* @__PURE__ */ c(Cn, { asChild: !0, onClick: (S) => S.stopPropagation(), children: o }),
|
|
277
276
|
/* @__PURE__ */ m(Gn, { align: "center", className: "text-sm", children: [
|
|
@@ -338,7 +337,7 @@ const hi = ({ query: e, uuid: t }) => {
|
|
|
338
337
|
S.stopPropagation(), i(e);
|
|
339
338
|
},
|
|
340
339
|
children: [
|
|
341
|
-
/* @__PURE__ */ c(
|
|
340
|
+
/* @__PURE__ */ c(es, { className: "size-3" }),
|
|
342
341
|
f("Unmark as template")
|
|
343
342
|
]
|
|
344
343
|
}
|
|
@@ -350,7 +349,7 @@ const hi = ({ query: e, uuid: t }) => {
|
|
|
350
349
|
S.stopPropagation(), a(e);
|
|
351
350
|
},
|
|
352
351
|
children: [
|
|
353
|
-
/* @__PURE__ */ c(
|
|
352
|
+
/* @__PURE__ */ c(es, { className: "size-3" }),
|
|
354
353
|
f("Mark as template")
|
|
355
354
|
]
|
|
356
355
|
}
|
|
@@ -358,7 +357,7 @@ const hi = ({ query: e, uuid: t }) => {
|
|
|
358
357
|
] })
|
|
359
358
|
] });
|
|
360
359
|
}, Be = () => {
|
|
361
|
-
const e =
|
|
360
|
+
const e = I(), t = b();
|
|
362
361
|
return re({
|
|
363
362
|
queryKey: [E.GET_WEBSITE_DRAFT_SETTINGS],
|
|
364
363
|
staleTime: 300 * 1e3,
|
|
@@ -374,7 +373,7 @@ const hi = ({ query: e, uuid: t }) => {
|
|
|
374
373
|
data: { draft: !0 }
|
|
375
374
|
})
|
|
376
375
|
});
|
|
377
|
-
},
|
|
376
|
+
}, Un = () => {
|
|
378
377
|
const e = ge("currentUser"), t = ge("onLogout");
|
|
379
378
|
return {
|
|
380
379
|
isLoggedIn: !!e,
|
|
@@ -389,7 +388,7 @@ const hi = ({ query: e, uuid: t }) => {
|
|
|
389
388
|
ACTIVE_IN_ANOTHER_TAB: "ACTIVE_IN_ANOTHER_TAB",
|
|
390
389
|
FORCE_TAKE_OVER: "FORCE_TAKE_OVER",
|
|
391
390
|
CONNECTION_LOST: "CONNECTION_LOST"
|
|
392
|
-
},
|
|
391
|
+
}, se = {
|
|
393
392
|
FORCE_TAKE_OVER: "FORCE_TAKE_OVER",
|
|
394
393
|
TAKE_OVER_REQUEST: "TAKE_OVER_REQUEST",
|
|
395
394
|
TAKE_OVER_APPROVED: "TAKE_OVER_APPROVED",
|
|
@@ -398,23 +397,23 @@ const hi = ({ query: e, uuid: t }) => {
|
|
|
398
397
|
CONTINUE_EDITING_IN_THIS_CLIENT: "CONTINUE_EDITING_IN_THIS_CLIENT",
|
|
399
398
|
CONTINUE_EDITING_IN_THIS_TAB_REQUEST: "CONTINUE_EDITING_IN_THIS_TAB_REQUEST"
|
|
400
399
|
}, _i = ["sync", "join", "leave"], Pi = [
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
], wi = Ee({}), Us = Ee(null), vi = Ee(te.CHECKING),
|
|
400
|
+
se.FORCE_TAKE_OVER,
|
|
401
|
+
se.TAKE_OVER_REQUEST,
|
|
402
|
+
se.TAKE_OVER_APPROVED,
|
|
403
|
+
se.TAKE_OVER_REJECTED,
|
|
404
|
+
se.FORCE_TAKE_OVER_REQUEST,
|
|
405
|
+
se.CONTINUE_EDITING_IN_THIS_CLIENT,
|
|
406
|
+
se.CONTINUE_EDITING_IN_THIS_TAB_REQUEST
|
|
407
|
+
], wi = Ee({}), Us = Ee(null), vi = Ee(te.CHECKING), Ii = Ee({}), bi = (e) => {
|
|
409
408
|
const t = {}, n = Sa(Ns(e).map(Ls).filter(Boolean), "pageId");
|
|
410
409
|
return Object.entries(n).forEach(
|
|
411
|
-
([s, r]) => t[s] =
|
|
410
|
+
([s, r]) => t[s] = bs(r, "onlineAt")
|
|
412
411
|
), t;
|
|
413
412
|
}, Ni = (e) => {
|
|
414
|
-
const t =
|
|
413
|
+
const t = bs(Ns(e).map(Ls).filter(Boolean), "onlineAt"), n = t == null ? void 0 : t.onlineAt;
|
|
415
414
|
return n ? n - 100 : +/* @__PURE__ */ new Date() - 1e3 * 60 * 60 * 4;
|
|
416
415
|
}, rn = () => {
|
|
417
|
-
const { user: e } =
|
|
416
|
+
const { user: e } = Un();
|
|
418
417
|
return e == null ? void 0 : e.id;
|
|
419
418
|
}, Li = () => {
|
|
420
419
|
const { data: e } = Be();
|
|
@@ -431,26 +430,26 @@ const Ms = () => {
|
|
|
431
430
|
const [e, t] = pe(vi), n = [te.LOCKED, te.ACTIVE_IN_ANOTHER_TAB].includes(e), s = [te.EDITING].includes(e);
|
|
432
431
|
return { pageStatus: e, setPageStatus: t, isLocked: n, isEditing: s };
|
|
433
432
|
}, Bs = () => {
|
|
434
|
-
const [e, t] = pe(
|
|
433
|
+
const [e, t] = pe(Ii);
|
|
435
434
|
return { pageLockMeta: e, setPageLockMeta: t };
|
|
436
435
|
}, Ci = () => {
|
|
437
436
|
const e = Ct(), { pageToUser: t } = Ms();
|
|
438
437
|
return q(() => t[e], [t, e]);
|
|
439
|
-
},
|
|
438
|
+
}, Mn = () => {
|
|
440
439
|
const e = Ds(), { setPageStatus: t } = ye(), [n] = pe(Us);
|
|
441
|
-
return
|
|
440
|
+
return ne(() => {
|
|
442
441
|
if (clearTimeout(dn), !e)
|
|
443
442
|
return dn = setTimeout(() => {
|
|
444
443
|
e || t(te.EDITING);
|
|
445
444
|
}, 500), () => clearTimeout(dn);
|
|
446
445
|
}, [e, t]), n;
|
|
447
446
|
}, Gi = () => {
|
|
448
|
-
const e = Ct(), t = rn(), n =
|
|
447
|
+
const e = Ct(), t = rn(), n = Mn(), { setPageToUser: s } = Ms(), { setPageStatus: r, pageStatus: a } = ye(), i = be(e);
|
|
449
448
|
return i.current = e, z(
|
|
450
449
|
(o) => {
|
|
451
450
|
const l = o || n;
|
|
452
451
|
if (!l) return [];
|
|
453
|
-
const f = l == null ? void 0 : l.presenceState(), d =
|
|
452
|
+
const f = l == null ? void 0 : l.presenceState(), d = bi(f);
|
|
454
453
|
s(d);
|
|
455
454
|
const u = d[i.current];
|
|
456
455
|
if (!u)
|
|
@@ -466,7 +465,7 @@ const Ms = () => {
|
|
|
466
465
|
[n, s, r, t, a]
|
|
467
466
|
);
|
|
468
467
|
}, Oi = () => {
|
|
469
|
-
const e = rn(), t = Ct(), n =
|
|
468
|
+
const e = rn(), t = Ct(), n = Mn(), s = Ci(), { setPageLockMeta: r } = Bs(), a = be(t);
|
|
470
469
|
return a.current = t, z(
|
|
471
470
|
async (i, o) => {
|
|
472
471
|
if (!n) return;
|
|
@@ -476,44 +475,44 @@ const Ms = () => {
|
|
|
476
475
|
[n, e, s, r]
|
|
477
476
|
);
|
|
478
477
|
}, xi = () => {
|
|
479
|
-
const e = rn(), t = Ct(), n =
|
|
478
|
+
const e = rn(), t = Ct(), n = Mn(), { setPageStatus: s } = ye(), { setPageLockMeta: r } = Bs(), a = Oi(), i = be(t), { savePageAsync: o } = Re();
|
|
480
479
|
return i.current = t, z(
|
|
481
480
|
(l) => async ({ payload: f }) => {
|
|
482
481
|
const d = f || {};
|
|
483
482
|
if (!(!(d != null && d.pageId) || (d == null ? void 0 : d.pageId) !== i.current || (d == null ? void 0 : d.receiverClientId) !== Ue))
|
|
484
483
|
switch (r({}), l) {
|
|
485
|
-
case
|
|
486
|
-
case
|
|
484
|
+
case se.FORCE_TAKE_OVER_REQUEST:
|
|
485
|
+
case se.CONTINUE_EDITING_IN_THIS_TAB_REQUEST: {
|
|
487
486
|
try {
|
|
488
487
|
await o(!0);
|
|
489
488
|
} catch (u) {
|
|
490
489
|
console.error("Failed to save page before releasing lock:", u);
|
|
491
490
|
}
|
|
492
|
-
await a(
|
|
491
|
+
await a(se.CONTINUE_EDITING_IN_THIS_CLIENT, { requestingClientId: d == null ? void 0 : d.senderClientId }), setTimeout(() => r({ type: l }), 0);
|
|
493
492
|
break;
|
|
494
493
|
}
|
|
495
|
-
case
|
|
494
|
+
case se.TAKE_OVER_REQUEST: {
|
|
496
495
|
r({ requestingUserId: d == null ? void 0 : d.userId, requestingClientId: d == null ? void 0 : d.senderClientId }), s(te.TAKE_OVER_REQUESTED);
|
|
497
496
|
break;
|
|
498
497
|
}
|
|
499
|
-
case
|
|
498
|
+
case se.CONTINUE_EDITING_IN_THIS_CLIENT: {
|
|
500
499
|
const u = Ni(n == null ? void 0 : n.presenceState());
|
|
501
500
|
s(te.CHECKING), await (n == null ? void 0 : n.track({ onlineAt: u, pageId: i.current, userId: e, clientId: Ue }));
|
|
502
501
|
break;
|
|
503
502
|
}
|
|
504
|
-
case
|
|
505
|
-
r({ type:
|
|
503
|
+
case se.TAKE_OVER_REJECTED: {
|
|
504
|
+
r({ type: se.TAKE_OVER_REJECTED });
|
|
506
505
|
break;
|
|
507
506
|
}
|
|
508
507
|
}
|
|
509
508
|
},
|
|
510
509
|
[a, r, s, n, e, o]
|
|
511
510
|
);
|
|
512
|
-
},
|
|
513
|
-
const e = Ds(), t = rn(), n = Ct(), s = Li(), [r, a] = pe(Us), i = xi(), o = Gi(), l =
|
|
514
|
-
|
|
511
|
+
}, Jc = () => {
|
|
512
|
+
const e = Ds(), t = rn(), n = Ct(), s = Li(), [r, a] = pe(Us), i = xi(), o = Gi(), l = be(i), f = be(o);
|
|
513
|
+
ne(() => {
|
|
515
514
|
l.current = i, f.current = o;
|
|
516
|
-
}, [i, o]),
|
|
515
|
+
}, [i, o]), ne(() => {
|
|
517
516
|
if (!e || !t || !s || r && r.topic === s) return;
|
|
518
517
|
const d = e.channel(s, {
|
|
519
518
|
config: { presence: { key: Ue } }
|
|
@@ -531,7 +530,7 @@ const Ms = () => {
|
|
|
531
530
|
}), () => {
|
|
532
531
|
d.unsubscribe();
|
|
533
532
|
};
|
|
534
|
-
}, [e, t, s, a]),
|
|
533
|
+
}, [e, t, s, a]), ne(() => (r && n && t && r.track({
|
|
535
534
|
pageId: n,
|
|
536
535
|
userId: t,
|
|
537
536
|
clientId: Ue,
|
|
@@ -539,22 +538,22 @@ const Ms = () => {
|
|
|
539
538
|
}), () => {
|
|
540
539
|
r && n && r.untrack();
|
|
541
540
|
}), [r, n, t]);
|
|
542
|
-
},
|
|
541
|
+
}, Bn = () => {
|
|
543
542
|
const { data: e } = Be();
|
|
544
543
|
return q(
|
|
545
544
|
() => (e == null ? void 0 : e.fallbackLang) || "en",
|
|
546
545
|
[e]
|
|
547
546
|
);
|
|
548
547
|
}, Fs = () => {
|
|
549
|
-
const e =
|
|
548
|
+
const e = b(), t = I();
|
|
550
549
|
return re({
|
|
551
550
|
queryKey: [E.GET_WEBSITE_PAGES],
|
|
552
551
|
staleTime: 1e3 * 60 * 5,
|
|
553
552
|
queryFn: async () => e(t, { action: E.GET_WEBSITE_PAGES }) || [],
|
|
554
553
|
placeholderData: (n) => n || []
|
|
555
554
|
});
|
|
556
|
-
},
|
|
557
|
-
const t =
|
|
555
|
+
}, Zc = (e) => {
|
|
556
|
+
const t = b(), n = I(), s = Bn();
|
|
558
557
|
return re({
|
|
559
558
|
queryKey: [E.GET_WEBSITE_PAGES, e, s],
|
|
560
559
|
staleTime: 1e3 * 60 * 5,
|
|
@@ -574,13 +573,13 @@ function Ks(e, t, n = !1) {
|
|
|
574
573
|
const s = e.toString() ? `?${e.toString()}` : "/";
|
|
575
574
|
n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
576
575
|
}
|
|
577
|
-
const Di = V(() => import("./page-manager-new-
|
|
576
|
+
const Di = V(() => import("./page-manager-new-DItY2hjd.js")), Vs = ({ children: e }) => {
|
|
578
577
|
const { t } = we(), [n, s] = ve(), r = n.get("page"), { data: a, isFetching: i } = oe(), { data: o, isFetching: l } = Fs(), [f, d] = K(!1), [u, g] = K(!0), { savePage: h } = Re(), p = !!r && !fe(a), { isLocked: T } = ye(), S = q(() => {
|
|
579
578
|
if (!o || l) return !1;
|
|
580
579
|
const v = o.find((U) => U.slug === "/");
|
|
581
580
|
return v == null ? void 0 : v.id;
|
|
582
581
|
}, [o, l]);
|
|
583
|
-
|
|
582
|
+
ne(() => {
|
|
584
583
|
if (l || !S || o.some((N) => N.id === r)) return;
|
|
585
584
|
const U = new URLSearchParams({ page: S });
|
|
586
585
|
Ks(U, s), !l && o && g(!1);
|
|
@@ -600,8 +599,8 @@ const Di = V(() => import("./page-manager-new-D6DVIx2S.js")), Vs = ({ children:
|
|
|
600
599
|
),
|
|
601
600
|
/* @__PURE__ */ c(nn, { side: "right", children: /* @__PURE__ */ c("p", { children: t("Open pages manager") }) })
|
|
602
601
|
] }) }) }),
|
|
603
|
-
/* @__PURE__ */ c(
|
|
604
|
-
|
|
602
|
+
/* @__PURE__ */ c(Ps, { open: w, onOpenChange: (v) => !v && p && d(!1), children: /* @__PURE__ */ m(
|
|
603
|
+
ws,
|
|
605
604
|
{
|
|
606
605
|
side: "left",
|
|
607
606
|
"aria-describedby": "pages-manager-description",
|
|
@@ -622,7 +621,7 @@ const Di = V(() => import("./page-manager-new-D6DVIx2S.js")), Vs = ({ children:
|
|
|
622
621
|
}
|
|
623
622
|
) })
|
|
624
623
|
] });
|
|
625
|
-
}, ki = V(() => import("./add-new-page-
|
|
624
|
+
}, ki = V(() => import("./add-new-page-uZKCk9eB.js")), Ri = V(() => import("./delete-page-2GfBi8Iv.js")), Ui = V(() => import("./duplicate-page-BwAY4Ssm.js")), Mi = V(() => import("./mark-as-template-0CPzZnk-.js")), Bi = V(() => import("./unmark-as-template-JN-cDUV_.js")), Fi = V(() => import("./unpublish-page-DqwBY2yI.js")), Ki = () => {
|
|
626
625
|
const [e, t] = K(null), [n, s] = K(null), [r, a] = K(null), [i, o] = K(null), [l, f] = K(null), [d, u] = K(null), { data: g, isFetching: h } = Le(), { selectedLang: p, fallbackLang: T } = Pe(), { data: S } = Me(), x = S == null ? void 0 : S.find((N) => N.lang === p), { isLocked: y } = ye(), w = !(g != null && g.slug), v = On(zt);
|
|
627
626
|
if (!g) return null;
|
|
628
627
|
const U = (N) => {
|
|
@@ -651,7 +650,7 @@ const Di = V(() => import("./page-manager-new-D6DVIx2S.js")), Vs = ({ children:
|
|
|
651
650
|
variant: "ghost",
|
|
652
651
|
size: "icon",
|
|
653
652
|
className: "h-7 w-7 cursor-not-allowed rounded opacity-50 hover:bg-transparent",
|
|
654
|
-
children: /* @__PURE__ */ c(
|
|
653
|
+
children: /* @__PURE__ */ c(ts, { className: "h-4 w-4" })
|
|
655
654
|
}
|
|
656
655
|
) : /* @__PURE__ */ c(
|
|
657
656
|
Si,
|
|
@@ -664,7 +663,7 @@ const Di = V(() => import("./page-manager-new-D6DVIx2S.js")), Vs = ({ children:
|
|
|
664
663
|
setMarkAsTemplate: (N) => a(N),
|
|
665
664
|
setUnmarkAsTemplate: (N) => o(N),
|
|
666
665
|
isLanguagePage: p.length > 0 && p !== T,
|
|
667
|
-
children: /* @__PURE__ */ c(M, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c(
|
|
666
|
+
children: /* @__PURE__ */ c(M, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c(ts, { className: "h-4 w-4" }) })
|
|
668
667
|
}
|
|
669
668
|
)
|
|
670
669
|
] }),
|
|
@@ -891,7 +890,7 @@ const Di = V(() => import("./page-manager-new-D6DVIx2S.js")), Vs = ({ children:
|
|
|
891
890
|
yo: "Yoruba",
|
|
892
891
|
za: "Zhuang, Chuang",
|
|
893
892
|
zu: "Zulu"
|
|
894
|
-
}, Hi = V(() => import("./add-new-language-page-
|
|
893
|
+
}, Hi = V(() => import("./add-new-language-page-DD-CAoAQ.js")), qi = () => {
|
|
895
894
|
const e = ge("topLeftCorner", null);
|
|
896
895
|
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Oa.createElement(e, {}) }) : null;
|
|
897
896
|
}, $i = ({
|
|
@@ -900,7 +899,7 @@ const Di = V(() => import("./page-manager-new-D6DVIx2S.js")), Vs = ({ children:
|
|
|
900
899
|
goToDefaultLang: n = !1
|
|
901
900
|
}) => {
|
|
902
901
|
const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } = Pe(), o = fe(a) ? s : a, [, l] = ve(), { isLocked: f } = ye(), { t: d } = we();
|
|
903
|
-
|
|
902
|
+
ne(() => {
|
|
904
903
|
const y = new URLSearchParams(window.location.search), w = y.get("lang");
|
|
905
904
|
w && (r.includes(w) ? i(w) : (y.delete("lang"), l(y), i("")));
|
|
906
905
|
}, [r, l, i]);
|
|
@@ -942,7 +941,7 @@ const Di = V(() => import("./page-manager-new-D6DVIx2S.js")), Vs = ({ children:
|
|
|
942
941
|
y === s ? w.delete("lang") : w.set("lang", y), Ks(w, l);
|
|
943
942
|
};
|
|
944
943
|
return fe(r) ? null : f ? /* @__PURE__ */ m(M, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
|
|
945
|
-
/* @__PURE__ */ c(
|
|
944
|
+
/* @__PURE__ */ c(ns, { className: "h-4 w-4" }),
|
|
946
945
|
H(Rt, o, o),
|
|
947
946
|
/* @__PURE__ */ c(yn, { className: "h-4 w-4" })
|
|
948
947
|
] }) : n ? /* @__PURE__ */ c(M, { onClick: () => x(s), variant: "link", size: "sm", children: d("Switch to default language") }) : /* @__PURE__ */ c(he, { children: /* @__PURE__ */ m(Ln, { children: [
|
|
@@ -954,7 +953,7 @@ const Di = V(() => import("./page-manager-new-D6DVIx2S.js")), Vs = ({ children:
|
|
|
954
953
|
size: "sm",
|
|
955
954
|
className: "ml-px h-max gap-2 py-1.5",
|
|
956
955
|
children: [
|
|
957
|
-
/* @__PURE__ */ c(
|
|
956
|
+
/* @__PURE__ */ c(ns, { className: "h-4 w-4" }),
|
|
958
957
|
H(Rt, o, o),
|
|
959
958
|
/* @__PURE__ */ c(yn, { className: "h-4 w-4" })
|
|
960
959
|
]
|
|
@@ -1034,11 +1033,11 @@ function zi() {
|
|
|
1034
1033
|
/* @__PURE__ */ c(Dt, { className: "h-8 w-8 rounded-full" })
|
|
1035
1034
|
] }, t)) });
|
|
1036
1035
|
}
|
|
1037
|
-
const Wi = $.lazy(() => import("./page-revisions-content-
|
|
1036
|
+
const Wi = $.lazy(() => import("./page-revisions-content-CH-PZK0O.js"));
|
|
1038
1037
|
function ji() {
|
|
1039
1038
|
const [e, t] = $.useState(!1);
|
|
1040
|
-
return /* @__PURE__ */ c(
|
|
1041
|
-
/* @__PURE__ */ m(
|
|
1039
|
+
return /* @__PURE__ */ c(vs, { children: /* @__PURE__ */ m(en, { delayDuration: 0, children: [
|
|
1040
|
+
/* @__PURE__ */ m(Ps, { open: e, onOpenChange: t, children: [
|
|
1042
1041
|
/* @__PURE__ */ c(Vr, { asChild: !0, children: /* @__PURE__ */ c(tn, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
|
|
1043
1042
|
/* @__PURE__ */ m(M, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
|
|
1044
1043
|
/* @__PURE__ */ c(qa, { className: "h-4 w-4" }),
|
|
@@ -1046,7 +1045,7 @@ function ji() {
|
|
|
1046
1045
|
] }),
|
|
1047
1046
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1048
1047
|
] }) }) }),
|
|
1049
|
-
/* @__PURE__ */ c(
|
|
1048
|
+
/* @__PURE__ */ c(ws, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(X, { fallback: /* @__PURE__ */ c(zi, {}), children: /* @__PURE__ */ c(Wi, { isOpen: e }) }) })
|
|
1050
1049
|
] }),
|
|
1051
1050
|
/* @__PURE__ */ c(nn, { side: "bottom", children: /* @__PURE__ */ c("p", { children: "Revision history" }) })
|
|
1052
1051
|
] }) });
|
|
@@ -1057,12 +1056,12 @@ const fn = ({
|
|
|
1057
1056
|
children: n,
|
|
1058
1057
|
fallback: s = null
|
|
1059
1058
|
}) => {
|
|
1060
|
-
const { hasPermission: r } =
|
|
1059
|
+
const { hasPermission: r } = _s();
|
|
1061
1060
|
return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
|
|
1062
1061
|
}, Yi = {
|
|
1063
1062
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
1064
|
-
},
|
|
1065
|
-
const e =
|
|
1063
|
+
}, Xc = () => {
|
|
1064
|
+
const e = I(), t = J(), n = b(), { data: s } = Ce();
|
|
1066
1065
|
return Y({
|
|
1067
1066
|
mutationFn: async (r) => await n(e, {
|
|
1068
1067
|
action: E.CREATE_PAGE,
|
|
@@ -1087,8 +1086,8 @@ const fn = ({
|
|
|
1087
1086
|
});
|
|
1088
1087
|
}
|
|
1089
1088
|
});
|
|
1090
|
-
},
|
|
1091
|
-
const e =
|
|
1089
|
+
}, eu = () => {
|
|
1090
|
+
const e = I(), t = J(), n = b(), { data: s } = Le(), { data: r } = Ce();
|
|
1092
1091
|
return Y({
|
|
1093
1092
|
mutationFn: async (a) => await n(e, {
|
|
1094
1093
|
action: E.UPDATE_PAGE,
|
|
@@ -1112,8 +1111,8 @@ const fn = ({
|
|
|
1112
1111
|
});
|
|
1113
1112
|
}
|
|
1114
1113
|
});
|
|
1115
|
-
},
|
|
1116
|
-
const e =
|
|
1114
|
+
}, tu = () => {
|
|
1115
|
+
const e = I(), t = J(), n = b(), { data: s } = Ce();
|
|
1117
1116
|
return Y({
|
|
1118
1117
|
mutationFn: async (r) => n(e, {
|
|
1119
1118
|
action: E.DELETE_PAGE,
|
|
@@ -1141,8 +1140,8 @@ const fn = ({
|
|
|
1141
1140
|
});
|
|
1142
1141
|
}
|
|
1143
1142
|
});
|
|
1144
|
-
},
|
|
1145
|
-
const e =
|
|
1143
|
+
}, nu = () => {
|
|
1144
|
+
const e = I(), t = J(), n = b(), { data: s } = Ce();
|
|
1146
1145
|
return Y({
|
|
1147
1146
|
mutationFn: async (r) => n(e, {
|
|
1148
1147
|
action: E.TAKE_OFFLINE,
|
|
@@ -1167,7 +1166,7 @@ const fn = ({
|
|
|
1167
1166
|
}
|
|
1168
1167
|
});
|
|
1169
1168
|
}, qs = () => {
|
|
1170
|
-
const e =
|
|
1169
|
+
const e = I(), t = b(), n = J(), { data: s } = oe(), { savePageAsync: r } = Re();
|
|
1171
1170
|
return Y({
|
|
1172
1171
|
mutationFn: async ({ ids: a }) => (await r(), t(e, {
|
|
1173
1172
|
action: E.PUBLISH_CHANGES,
|
|
@@ -1186,8 +1185,8 @@ const fn = ({
|
|
|
1186
1185
|
console.log("##", a), R.error("Failed to publish pages.");
|
|
1187
1186
|
}
|
|
1188
1187
|
});
|
|
1189
|
-
},
|
|
1190
|
-
const e =
|
|
1188
|
+
}, su = () => {
|
|
1189
|
+
const e = I(), t = b(), n = J();
|
|
1191
1190
|
return Y({
|
|
1192
1191
|
mutationFn: async (s) => {
|
|
1193
1192
|
var r;
|
|
@@ -1211,8 +1210,8 @@ const fn = ({
|
|
|
1211
1210
|
R.error("Failed to mark page as template.");
|
|
1212
1211
|
}
|
|
1213
1212
|
});
|
|
1214
|
-
},
|
|
1215
|
-
const e =
|
|
1213
|
+
}, ru = () => {
|
|
1214
|
+
const e = I(), t = b(), n = J();
|
|
1216
1215
|
return Y({
|
|
1217
1216
|
mutationFn: async (s) => t(e, {
|
|
1218
1217
|
action: E.UNMARK_AS_TEMPLATE,
|
|
@@ -1227,8 +1226,8 @@ const fn = ({
|
|
|
1227
1226
|
R.error("Failed to unmark page as template.");
|
|
1228
1227
|
}
|
|
1229
1228
|
});
|
|
1230
|
-
},
|
|
1231
|
-
const e =
|
|
1229
|
+
}, au = () => {
|
|
1230
|
+
const e = I(), t = b(), n = J();
|
|
1232
1231
|
return Y({
|
|
1233
1232
|
mutationFn: async ({ id: s, slug: r }) => t(e, {
|
|
1234
1233
|
action: E.CHANGE_SLUG,
|
|
@@ -1245,13 +1244,13 @@ const fn = ({
|
|
|
1245
1244
|
R.error("Failed to change slug");
|
|
1246
1245
|
}
|
|
1247
1246
|
});
|
|
1248
|
-
}, Ji = V(() => import("./publish-pages-content-
|
|
1247
|
+
}, Ji = V(() => import("./publish-pages-content-CSJCFElu.js"));
|
|
1249
1248
|
function Zi({
|
|
1250
1249
|
showModal: e = !1,
|
|
1251
1250
|
onClose: t = () => console.log("Cancelled")
|
|
1252
1251
|
}) {
|
|
1253
1252
|
const { mutate: n, isPending: s } = qs();
|
|
1254
|
-
return /* @__PURE__ */ c(
|
|
1253
|
+
return /* @__PURE__ */ c(Is, { open: e, onOpenChange: s ? () => {
|
|
1255
1254
|
} : t, children: e && /* @__PURE__ */ c(X, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(Ji, { onClose: t, isPending: s, publishPage: n }) }) });
|
|
1256
1255
|
}
|
|
1257
1256
|
const Xi = (e) => {
|
|
@@ -1286,20 +1285,20 @@ const Xi = (e) => {
|
|
|
1286
1285
|
const n = { ...eo, ...t };
|
|
1287
1286
|
no().then((s) => s(n));
|
|
1288
1287
|
};
|
|
1289
|
-
function
|
|
1288
|
+
function Fn({
|
|
1290
1289
|
children: e,
|
|
1291
1290
|
content: t,
|
|
1292
1291
|
side: n = "bottom",
|
|
1293
1292
|
delayDuration: s = 700,
|
|
1294
1293
|
showTooltip: r = !0
|
|
1295
1294
|
}) {
|
|
1296
|
-
return r ? /* @__PURE__ */ c(
|
|
1295
|
+
return r ? /* @__PURE__ */ c(vs, { children: /* @__PURE__ */ m(en, { delayDuration: s, children: [
|
|
1297
1296
|
/* @__PURE__ */ c(tn, { asChild: !0, children: e }),
|
|
1298
1297
|
/* @__PURE__ */ c(nn, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
|
|
1299
1298
|
] }) }) : e;
|
|
1300
1299
|
}
|
|
1301
|
-
const so = V(() => import("./unpublish-page-
|
|
1302
|
-
() => import("./translation-warning-modal-
|
|
1300
|
+
const so = V(() => import("./unpublish-page-DqwBY2yI.js")), ro = V(
|
|
1301
|
+
() => import("./translation-warning-modal-_aBp5ZZQ.js")
|
|
1303
1302
|
), ao = () => {
|
|
1304
1303
|
const { t: e } = we(), { selectedLang: t, fallbackLang: n } = Pe(), s = ge("getPreviewUrl", async (g) => g), [r, a] = K(""), { data: i } = oe(), { data: o } = Me(), { data: l } = Ce(), f = q(
|
|
1305
1304
|
() => {
|
|
@@ -1311,7 +1310,7 @@ const so = V(() => import("./unpublish-page-DLLLgY43.js")), ro = V(
|
|
|
1311
1310
|
var h;
|
|
1312
1311
|
return (h = ie(l, { key: g })) == null ? void 0 : h.hasSlug;
|
|
1313
1312
|
}, [l]), u = t === n ? "" : t;
|
|
1314
|
-
return
|
|
1313
|
+
return ne(() => {
|
|
1315
1314
|
(async () => {
|
|
1316
1315
|
if (typeof s == "function") {
|
|
1317
1316
|
const g = !d(i == null ? void 0 : i.pageType), h = await s(
|
|
@@ -1321,11 +1320,11 @@ const so = V(() => import("./unpublish-page-DLLLgY43.js")), ro = V(
|
|
|
1321
1320
|
} else
|
|
1322
1321
|
a("");
|
|
1323
1322
|
})();
|
|
1324
|
-
}, [s, f, i == null ? void 0 : i.pageType, d, i == null ? void 0 : i.id, u]), /* @__PURE__ */ c(he, { children: /* @__PURE__ */ c(
|
|
1323
|
+
}, [s, f, i == null ? void 0 : i.pageType, d, i == null ? void 0 : i.id, u]), /* @__PURE__ */ c(he, { children: /* @__PURE__ */ c(Fn, { 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(Qa, { className: "h-4 w-4" }) }) }) }) });
|
|
1325
1324
|
}, io = () => {
|
|
1326
1325
|
const { t: e } = we(), [t, n] = Hr();
|
|
1327
1326
|
return /* @__PURE__ */ m(he, { children: [
|
|
1328
|
-
/* @__PURE__ */ c(
|
|
1327
|
+
/* @__PURE__ */ c(Fn, { content: e("Theme"), delayDuration: 0, children: /* @__PURE__ */ c(
|
|
1329
1328
|
M,
|
|
1330
1329
|
{
|
|
1331
1330
|
variant: t === "theme" ? "outline" : "ghost",
|
|
@@ -1339,7 +1338,7 @@ const so = V(() => import("./unpublish-page-DLLLgY43.js")), ro = V(
|
|
|
1339
1338
|
] });
|
|
1340
1339
|
}, oo = () => {
|
|
1341
1340
|
const { t: e } = we(), [t, n] = K(!1), { isLocked: s } = ye(), { savePageAsync: r, saveState: a } = Re();
|
|
1342
|
-
|
|
1341
|
+
ne(() => {
|
|
1343
1342
|
const d = (u) => {
|
|
1344
1343
|
a === "UNSAVED" && (u.preventDefault(), u.returnValue = !1);
|
|
1345
1344
|
};
|
|
@@ -1414,18 +1413,18 @@ const so = V(() => import("./unpublish-page-DLLLgY43.js")), ro = V(
|
|
|
1414
1413
|
"span",
|
|
1415
1414
|
{
|
|
1416
1415
|
className: `flex items-center transition-transform duration-300 ease-in-out ${i ? "-translate-y-10" : ""}`,
|
|
1417
|
-
children: v ? /* @__PURE__ */ c(
|
|
1416
|
+
children: v ? /* @__PURE__ */ c(ss, { className: "h-4 w-4" }) : /* @__PURE__ */ c(rs, { className: "h-4 w-4" })
|
|
1418
1417
|
}
|
|
1419
1418
|
),
|
|
1420
1419
|
/* @__PURE__ */ c(
|
|
1421
1420
|
"span",
|
|
1422
1421
|
{
|
|
1423
1422
|
className: `absolute inset-0 left-3 flex items-center transition-transform duration-300 ease-in-out ${i ? "" : "translate-y-10"}`,
|
|
1424
|
-
children: v ? /* @__PURE__ */ c(
|
|
1423
|
+
children: v ? /* @__PURE__ */ c(rs, { className: "h-4 w-4" }) : /* @__PURE__ */ c(ss, { className: "h-4 w-4" })
|
|
1425
1424
|
}
|
|
1426
1425
|
),
|
|
1427
1426
|
/* @__PURE__ */ c("span", { children: y }),
|
|
1428
|
-
t ? `(${
|
|
1427
|
+
t ? `(${Jn(t)})` : ""
|
|
1429
1428
|
]
|
|
1430
1429
|
}
|
|
1431
1430
|
),
|
|
@@ -1471,7 +1470,7 @@ const so = V(() => import("./unpublish-page-DLLLgY43.js")), ro = V(
|
|
|
1471
1470
|
v && /* @__PURE__ */ m(ce, { onClick: () => f(n), className: "cursor-pointer text-xs", children: [
|
|
1472
1471
|
e("Unpublish"),
|
|
1473
1472
|
" page ",
|
|
1474
|
-
t ? `(${
|
|
1473
|
+
t ? `(${Jn(t)})` : ""
|
|
1475
1474
|
] })
|
|
1476
1475
|
] })
|
|
1477
1476
|
] })
|
|
@@ -1499,14 +1498,14 @@ function co() {
|
|
|
1499
1498
|
/* @__PURE__ */ c(fn, { permission: le.PUBLISH_PAGE, children: /* @__PURE__ */ c(lo, {}) })
|
|
1500
1499
|
] });
|
|
1501
1500
|
}
|
|
1502
|
-
const uo = V(() => import("./dynamic-page-selector-
|
|
1501
|
+
const uo = V(() => import("./dynamic-page-selector-sViJuQlU.js")), fo = () => {
|
|
1503
1502
|
const { dynamicPage: e, allLangPages: t, isFetching: n } = gi(), s = t.length > 0;
|
|
1504
1503
|
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1505
1504
|
!e && /* @__PURE__ */ c(Vi, { hasDynamicPage: s }),
|
|
1506
1505
|
/* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(uo, {}) })
|
|
1507
1506
|
] });
|
|
1508
1507
|
}, ho = () => {
|
|
1509
|
-
const { data: e, isFetching: t } = Le(), { data: n, isFetching: s } = oe(), r = H(n, "dynamic", !1), a =
|
|
1508
|
+
const { data: e, isFetching: t } = Le(), { data: n, isFetching: s } = oe(), r = H(n, "dynamic", !1), a = Rn(), i = da("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, f = yi(), d = t || s, g = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
|
|
1510
1509
|
return /* @__PURE__ */ m("div", { className: "relative flex items-center gap-x-1", children: [
|
|
1511
1510
|
/* @__PURE__ */ c(
|
|
1512
1511
|
"div",
|
|
@@ -1563,7 +1562,7 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1563
1562
|
[e]
|
|
1564
1563
|
), aiContext: t };
|
|
1565
1564
|
}, mo = () => {
|
|
1566
|
-
const e =
|
|
1565
|
+
const e = I(), { aiContext: t } = $s(), n = b();
|
|
1567
1566
|
return z(
|
|
1568
1567
|
async (s, r, a, i) => n(e, {
|
|
1569
1568
|
action: E.ASK_AI,
|
|
@@ -1576,8 +1575,8 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1576
1575
|
const s = ai(n._type);
|
|
1577
1576
|
return {
|
|
1578
1577
|
...s,
|
|
1579
|
-
...
|
|
1580
|
-
...va(n, (r, a) =>
|
|
1578
|
+
...Dn(n, [...ba(s), "_type", "_id", "_name", "_parent", "_bindings"]),
|
|
1579
|
+
...va(n, (r, a) => Ia(a, "_attrs")),
|
|
1581
1580
|
...n
|
|
1582
1581
|
};
|
|
1583
1582
|
}
|
|
@@ -1590,7 +1589,7 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1590
1589
|
return { blocks: Eo(t, n) };
|
|
1591
1590
|
}, [e, t]);
|
|
1592
1591
|
}, yo = () => {
|
|
1593
|
-
const [e] = ve(), t = e.get("page"), n =
|
|
1592
|
+
const [e] = ve(), t = e.get("page"), n = I(), { setAiContext: s } = $s(), [, r] = Rs(), [, a] = pi(), [, i] = qr(), o = b();
|
|
1594
1593
|
return re({
|
|
1595
1594
|
queryKey: [E.GET_DRAFT_PAGE, t],
|
|
1596
1595
|
staleTime: 1 / 0,
|
|
@@ -1606,7 +1605,7 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1606
1605
|
enabled: !!t
|
|
1607
1606
|
});
|
|
1608
1607
|
}, Ao = () => {
|
|
1609
|
-
const { data: e } = oe(), { data: t } = Le(), n =
|
|
1608
|
+
const { data: e } = oe(), { data: t } = Le(), n = I(), s = b(), r = Bn(), a = Rn();
|
|
1610
1609
|
return re({
|
|
1611
1610
|
queryKey: [E.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
|
|
1612
1611
|
staleTime: 1 / 0,
|
|
@@ -1636,7 +1635,7 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1636
1635
|
enabled: !!(e != null && e.pageType) && !!t.id
|
|
1637
1636
|
});
|
|
1638
1637
|
}, To = () => {
|
|
1639
|
-
const e =
|
|
1638
|
+
const e = I(), t = J(), n = b();
|
|
1640
1639
|
return Y({
|
|
1641
1640
|
mutationFn: async (s) => n(e, {
|
|
1642
1641
|
action: E.UPDATE_WEBSITE_SETTINGS,
|
|
@@ -1654,8 +1653,8 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1654
1653
|
});
|
|
1655
1654
|
}
|
|
1656
1655
|
});
|
|
1657
|
-
},
|
|
1658
|
-
const e =
|
|
1656
|
+
}, iu = () => {
|
|
1657
|
+
const e = I(), t = J(), n = b(), { selectedLang: s } = Pe();
|
|
1659
1658
|
return Y({
|
|
1660
1659
|
mutationFn: async (r) => n(e, { action: E.ADD_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1661
1660
|
onSuccess: () => {
|
|
@@ -1669,8 +1668,8 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1669
1668
|
});
|
|
1670
1669
|
}
|
|
1671
1670
|
});
|
|
1672
|
-
},
|
|
1673
|
-
const e =
|
|
1671
|
+
}, ou = () => {
|
|
1672
|
+
const e = I(), t = J(), n = b(), { selectedLang: s } = Pe();
|
|
1674
1673
|
return Y({
|
|
1675
1674
|
mutationFn: async (r) => n(e, { action: E.UPDATE_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1676
1675
|
onSuccess: () => {
|
|
@@ -1684,8 +1683,8 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1684
1683
|
});
|
|
1685
1684
|
}
|
|
1686
1685
|
});
|
|
1687
|
-
},
|
|
1688
|
-
const e =
|
|
1686
|
+
}, lu = () => {
|
|
1687
|
+
const e = I(), t = J(), n = b();
|
|
1689
1688
|
return Y({
|
|
1690
1689
|
mutationFn: async (s) => n(e, { action: E.DELETE_GLOBAL_SCHEMA, data: { id: s } }),
|
|
1691
1690
|
onSuccess: () => {
|
|
@@ -1699,8 +1698,8 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1699
1698
|
});
|
|
1700
1699
|
}
|
|
1701
1700
|
});
|
|
1702
|
-
},
|
|
1703
|
-
const e =
|
|
1701
|
+
}, cu = () => {
|
|
1702
|
+
const e = I(), t = b();
|
|
1704
1703
|
return Y({
|
|
1705
1704
|
mutationFn: async (n) => t(e, { action: E.TOGGLE_PAGE_GLOBAL_SCHEMA, data: n }),
|
|
1706
1705
|
onError: (n) => {
|
|
@@ -1709,8 +1708,8 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1709
1708
|
});
|
|
1710
1709
|
}
|
|
1711
1710
|
});
|
|
1712
|
-
},
|
|
1713
|
-
const e =
|
|
1711
|
+
}, uu = () => {
|
|
1712
|
+
const e = I(), t = b();
|
|
1714
1713
|
return Y({
|
|
1715
1714
|
mutationFn: async (n) => t(e, { action: E.APPLY_SCHEMA_TO_ALL_PAGES, data: { schemaId: n } }),
|
|
1716
1715
|
onSuccess: (n) => {
|
|
@@ -1722,8 +1721,8 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1722
1721
|
});
|
|
1723
1722
|
}
|
|
1724
1723
|
});
|
|
1725
|
-
},
|
|
1726
|
-
const e =
|
|
1724
|
+
}, du = () => {
|
|
1725
|
+
const e = I(), t = b();
|
|
1727
1726
|
return Y({
|
|
1728
1727
|
mutationFn: async (n) => t(e, { action: E.REMOVE_SCHEMA_FROM_ALL_PAGES, data: { schemaId: n } }),
|
|
1729
1728
|
onSuccess: (n) => {
|
|
@@ -1735,7 +1734,7 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1735
1734
|
});
|
|
1736
1735
|
}
|
|
1737
1736
|
});
|
|
1738
|
-
},
|
|
1737
|
+
}, os = {
|
|
1739
1738
|
async getUILibraryBlock(e, t, n) {
|
|
1740
1739
|
const s = await t(n, {
|
|
1741
1740
|
action: "GET_LIBRARY_ITEM",
|
|
@@ -1756,7 +1755,7 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1756
1755
|
}
|
|
1757
1756
|
}
|
|
1758
1757
|
}, So = () => {
|
|
1759
|
-
const e =
|
|
1758
|
+
const e = I(), t = b();
|
|
1760
1759
|
return re({
|
|
1761
1760
|
queryKey: ["uiLibraries"],
|
|
1762
1761
|
staleTime: "static",
|
|
@@ -1768,14 +1767,24 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1768
1767
|
fa(r.id, {
|
|
1769
1768
|
name: r.isSiteLibrary ? r.name + " (Current Site) " : r.name,
|
|
1770
1769
|
description: r.description,
|
|
1771
|
-
getBlocksList: (a) =>
|
|
1772
|
-
getBlock: ({ block: a }) =>
|
|
1770
|
+
getBlocksList: (a) => os.getUILibraryBlocks(a, t, e),
|
|
1771
|
+
getBlock: ({ block: a }) => os.getUILibraryBlock(a, t, e)
|
|
1773
1772
|
});
|
|
1774
1773
|
}), s;
|
|
1775
1774
|
}
|
|
1776
1775
|
});
|
|
1777
|
-
}, _o = () => {
|
|
1778
|
-
const
|
|
1776
|
+
}, _o = (e = 300) => {
|
|
1777
|
+
const t = I(), n = b();
|
|
1778
|
+
ne(() => {
|
|
1779
|
+
const s = async () => {
|
|
1780
|
+
await n(t, { action: "CHECK_USER_ACCESS" });
|
|
1781
|
+
};
|
|
1782
|
+
s();
|
|
1783
|
+
const r = setInterval(s, e * 1e3);
|
|
1784
|
+
return () => clearInterval(r);
|
|
1785
|
+
}, [n, e, t]);
|
|
1786
|
+
}, Po = () => {
|
|
1787
|
+
const e = I(), t = b(), { user: n } = Un(), s = n == null ? void 0 : n.id;
|
|
1779
1788
|
return re({
|
|
1780
1789
|
queryKey: [E.GET_ROLE_AND_PERMISSIONS, s],
|
|
1781
1790
|
queryFn: () => t(e, {
|
|
@@ -1785,8 +1794,8 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1785
1794
|
enabled: !!s,
|
|
1786
1795
|
staleTime: 1 / 0
|
|
1787
1796
|
});
|
|
1788
|
-
},
|
|
1789
|
-
const e =
|
|
1797
|
+
}, wo = () => {
|
|
1798
|
+
const e = I(), t = b(), [, n] = Rs();
|
|
1790
1799
|
return { onSave: async ({
|
|
1791
1800
|
page: r,
|
|
1792
1801
|
blocks: a,
|
|
@@ -1805,8 +1814,8 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1805
1814
|
return console.error(o), new Error("Failed to save blocks");
|
|
1806
1815
|
}
|
|
1807
1816
|
} };
|
|
1808
|
-
},
|
|
1809
|
-
const { data: e } = Fs(), t =
|
|
1817
|
+
}, vo = () => {
|
|
1818
|
+
const { data: e } = Fs(), t = I(), n = b();
|
|
1810
1819
|
return {
|
|
1811
1820
|
getPartialBlocks: z(async () => {
|
|
1812
1821
|
const s = {};
|
|
@@ -1834,7 +1843,7 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1834
1843
|
[n, t]
|
|
1835
1844
|
)
|
|
1836
1845
|
};
|
|
1837
|
-
},
|
|
1846
|
+
}, Io = V(() => import("./ai-panel-content-CK4XOkEh.js")), Qs = "chai-chat-panel", bo = ({ 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: [
|
|
1838
1847
|
/* @__PURE__ */ c("title", { children: "ai" }),
|
|
1839
1848
|
/* @__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(
|
|
1840
1849
|
"path",
|
|
@@ -1843,24 +1852,24 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1843
1852
|
id: "Combined-Shape"
|
|
1844
1853
|
}
|
|
1845
1854
|
) }) })
|
|
1846
|
-
] }),
|
|
1855
|
+
] }), No = ({ isActive: e, show: t }) => /* @__PURE__ */ c(M, { size: "icon", className: "p-0 [&_svg]:size-6", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(bo, { className: e ? "h-5 w-5 text-white" : "h-5 w-5 text-primary" }) }), Lo = {
|
|
1847
1856
|
id: Qs,
|
|
1848
1857
|
label: "AI Assistant",
|
|
1849
|
-
button:
|
|
1850
|
-
panel:
|
|
1858
|
+
button: No,
|
|
1859
|
+
panel: Io,
|
|
1851
1860
|
position: "top"
|
|
1852
|
-
},
|
|
1861
|
+
}, Co = V(() => import("./lang-panel-Bnc-9wkM.js")), Go = ({ isActive: e, show: t }) => {
|
|
1853
1862
|
const { data: n } = Be();
|
|
1854
1863
|
return !sn(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(Ya, { className: "h-4 w-4" }) });
|
|
1855
|
-
}, zs = "lang",
|
|
1864
|
+
}, zs = "lang", Oo = {
|
|
1856
1865
|
id: zs,
|
|
1857
1866
|
label: "Languages",
|
|
1858
1867
|
position: "top",
|
|
1859
|
-
panel:
|
|
1860
|
-
button:
|
|
1868
|
+
panel: Co,
|
|
1869
|
+
button: Go,
|
|
1861
1870
|
view: "modal",
|
|
1862
1871
|
width: 400
|
|
1863
|
-
},
|
|
1872
|
+
}, xo = V(() => import("./seo-panel-CRzzw4FW.js")), Ws = "seo", Do = ({ isActive: e, show: t }) => {
|
|
1864
1873
|
const { data: n } = oe(), s = Ai(n == null ? void 0 : n.pageType);
|
|
1865
1874
|
return !sn(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
|
|
1866
1875
|
"svg",
|
|
@@ -1880,16 +1889,16 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1880
1889
|
]
|
|
1881
1890
|
}
|
|
1882
1891
|
) });
|
|
1883
|
-
},
|
|
1892
|
+
}, ko = {
|
|
1884
1893
|
id: Ws,
|
|
1885
1894
|
label: "SEO",
|
|
1886
|
-
panel:
|
|
1887
|
-
button:
|
|
1895
|
+
panel: xo,
|
|
1896
|
+
button: Do,
|
|
1888
1897
|
position: "top",
|
|
1889
1898
|
width: 600,
|
|
1890
1899
|
view: "modal"
|
|
1891
|
-
}, js = "user-info",
|
|
1892
|
-
const { t: e } = we(), { user: t, logout: n } =
|
|
1900
|
+
}, js = "user-info", Ro = () => {
|
|
1901
|
+
const { t: e } = we(), { user: t, logout: n } = Un(), s = ge("onLogout", xn);
|
|
1893
1902
|
return t ? /* @__PURE__ */ m($r, { children: [
|
|
1894
1903
|
/* @__PURE__ */ c(Qr, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(Ja, { className: "h-4 w-4" }) }) }),
|
|
1895
1904
|
/* @__PURE__ */ m(zr, { className: "w-auto space-y-2 p-4", children: [
|
|
@@ -1918,13 +1927,13 @@ const uo = V(() => import("./dynamic-page-selector-BVnIM1Rq.js")), fo = () => {
|
|
|
1918
1927
|
] })
|
|
1919
1928
|
] })
|
|
1920
1929
|
] }) : null;
|
|
1921
|
-
},
|
|
1930
|
+
}, Uo = {
|
|
1922
1931
|
id: js,
|
|
1923
1932
|
label: "User Info",
|
|
1924
|
-
button:
|
|
1933
|
+
button: Ro,
|
|
1925
1934
|
position: "bottom"
|
|
1926
|
-
},
|
|
1927
|
-
kt(Ws,
|
|
1935
|
+
}, Mo = () => {
|
|
1936
|
+
kt(Ws, ko), kt(zs, Oo), kt(js, Uo), kt(Qs, Lo);
|
|
1928
1937
|
};
|
|
1929
1938
|
var _ = {
|
|
1930
1939
|
context: void 0,
|
|
@@ -1932,27 +1941,27 @@ var _ = {
|
|
|
1932
1941
|
effects: void 0,
|
|
1933
1942
|
done: !1,
|
|
1934
1943
|
getContextId() {
|
|
1935
|
-
return
|
|
1944
|
+
return ls(this.context.count);
|
|
1936
1945
|
},
|
|
1937
1946
|
getNextContextId() {
|
|
1938
|
-
return
|
|
1947
|
+
return ls(this.context.count++);
|
|
1939
1948
|
}
|
|
1940
1949
|
};
|
|
1941
|
-
function
|
|
1950
|
+
function ls(e) {
|
|
1942
1951
|
const t = String(e), n = t.length - 1;
|
|
1943
1952
|
return _.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
|
|
1944
1953
|
}
|
|
1945
1954
|
function ct(e) {
|
|
1946
1955
|
_.context = e;
|
|
1947
1956
|
}
|
|
1948
|
-
var Ys = !1,
|
|
1949
|
-
equals:
|
|
1950
|
-
}, Xs = ir,
|
|
1957
|
+
var Ys = !1, Bo = (e, t) => e === t, Wt = Symbol("solid-proxy"), Js = typeof Proxy == "function", Zs = Symbol("solid-track"), jt = {
|
|
1958
|
+
equals: Bo
|
|
1959
|
+
}, Xs = ir, Ie = 1, Yt = 2, er = {
|
|
1951
1960
|
owned: null,
|
|
1952
1961
|
cleanups: null,
|
|
1953
1962
|
context: null,
|
|
1954
1963
|
owner: null
|
|
1955
|
-
}, gn = {}, G = null, mn = null,
|
|
1964
|
+
}, gn = {}, G = null, mn = null, Fo = null, D = null, ee = null, _e = null, an = 0;
|
|
1956
1965
|
function De(e, t) {
|
|
1957
1966
|
const n = D, s = G, r = e.length === 0, a = t === void 0 ? s : t, i = r ? er : {
|
|
1958
1967
|
owned: null,
|
|
@@ -1977,17 +1986,17 @@ function F(e, t) {
|
|
|
1977
1986
|
}, s = (r) => (typeof r == "function" && (r = r(n.value)), ar(n, r));
|
|
1978
1987
|
return [rr.bind(n), s];
|
|
1979
1988
|
}
|
|
1980
|
-
function
|
|
1981
|
-
const s = on(e, t, !0,
|
|
1989
|
+
function Ko(e, t, n) {
|
|
1990
|
+
const s = on(e, t, !0, Ie);
|
|
1982
1991
|
lt(s);
|
|
1983
1992
|
}
|
|
1984
1993
|
function ke(e, t, n) {
|
|
1985
|
-
const s = on(e, t, !1,
|
|
1994
|
+
const s = on(e, t, !1, Ie);
|
|
1986
1995
|
lt(s);
|
|
1987
1996
|
}
|
|
1988
1997
|
function tr(e, t, n) {
|
|
1989
|
-
Xs =
|
|
1990
|
-
const s = on(e, t, !1,
|
|
1998
|
+
Xs = Yo;
|
|
1999
|
+
const s = on(e, t, !1, Ie);
|
|
1991
2000
|
(!n || !n.render) && (s.user = !0), _e ? _e.push(s) : lt(s);
|
|
1992
2001
|
}
|
|
1993
2002
|
function j(e, t, n) {
|
|
@@ -1995,10 +2004,10 @@ function j(e, t, n) {
|
|
|
1995
2004
|
const s = on(e, t, !0, 0);
|
|
1996
2005
|
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, lt(s), rr.bind(s);
|
|
1997
2006
|
}
|
|
1998
|
-
function
|
|
2007
|
+
function Vo(e) {
|
|
1999
2008
|
return e && typeof e == "object" && "then" in e;
|
|
2000
2009
|
}
|
|
2001
|
-
function
|
|
2010
|
+
function Ho(e, t, n) {
|
|
2002
2011
|
let s, r, a;
|
|
2003
2012
|
s = !0, r = e, a = {};
|
|
2004
2013
|
let i = null, o = gn, l = null, f = !1, d = "initialValue" in a, u = typeof s == "function" && j(s);
|
|
@@ -2019,7 +2028,7 @@ function Vo(e, t, n) {
|
|
|
2019
2028
|
}, !1);
|
|
2020
2029
|
}
|
|
2021
2030
|
function Ae() {
|
|
2022
|
-
const P =
|
|
2031
|
+
const P = zo, L = h(), W = T();
|
|
2023
2032
|
if (W !== void 0 && !i) throw W;
|
|
2024
2033
|
return D && D.user, L;
|
|
2025
2034
|
}
|
|
@@ -2045,7 +2054,7 @@ function Vo(e, t, n) {
|
|
|
2045
2054
|
if (W !== void 0) {
|
|
2046
2055
|
U(i, void 0, Vt(W), L);
|
|
2047
2056
|
return;
|
|
2048
|
-
} else if (!
|
|
2057
|
+
} else if (!Vo(Q))
|
|
2049
2058
|
return U(i, Q, void 0, L), Q;
|
|
2050
2059
|
return i = Q, "v" in Q ? (Q.s === 1 ? U(i, Q.v, void 0, L) : U(i, void 0, Vt(Q.v), L), Q) : (f = !0, queueMicrotask(() => f = !1), me(() => {
|
|
2051
2060
|
v(d ? "refreshing" : "pending"), y();
|
|
@@ -2074,12 +2083,12 @@ function Vo(e, t, n) {
|
|
|
2074
2083
|
}
|
|
2075
2084
|
});
|
|
2076
2085
|
let B = G;
|
|
2077
|
-
return u ?
|
|
2086
|
+
return u ? Ko(() => (B = G, Te(!1))) : Te(!1), [Ae, {
|
|
2078
2087
|
refetch: (P) => nr(B, () => Te(P)),
|
|
2079
2088
|
mutate: p
|
|
2080
2089
|
}];
|
|
2081
2090
|
}
|
|
2082
|
-
function
|
|
2091
|
+
function fu(e) {
|
|
2083
2092
|
return me(e, !1);
|
|
2084
2093
|
}
|
|
2085
2094
|
function Z(e) {
|
|
@@ -2092,7 +2101,7 @@ function Z(e) {
|
|
|
2092
2101
|
D = t;
|
|
2093
2102
|
}
|
|
2094
2103
|
}
|
|
2095
|
-
function
|
|
2104
|
+
function hu(e, t, n) {
|
|
2096
2105
|
const s = Array.isArray(e);
|
|
2097
2106
|
let r, a = n && n.defer;
|
|
2098
2107
|
return (i) => {
|
|
@@ -2107,13 +2116,13 @@ function fu(e, t, n) {
|
|
|
2107
2116
|
return r = o, l;
|
|
2108
2117
|
};
|
|
2109
2118
|
}
|
|
2110
|
-
function
|
|
2119
|
+
function qo(e) {
|
|
2111
2120
|
tr(() => Z(e));
|
|
2112
2121
|
}
|
|
2113
2122
|
function ft(e) {
|
|
2114
2123
|
return G === null || (G.cleanups === null ? G.cleanups = [e] : G.cleanups.push(e)), e;
|
|
2115
2124
|
}
|
|
2116
|
-
function
|
|
2125
|
+
function cs() {
|
|
2117
2126
|
return G;
|
|
2118
2127
|
}
|
|
2119
2128
|
function nr(e, t) {
|
|
@@ -2122,12 +2131,12 @@ function nr(e, t) {
|
|
|
2122
2131
|
try {
|
|
2123
2132
|
return me(t, !0);
|
|
2124
2133
|
} catch (r) {
|
|
2125
|
-
|
|
2134
|
+
Kn(r);
|
|
2126
2135
|
} finally {
|
|
2127
2136
|
G = n, D = s;
|
|
2128
2137
|
}
|
|
2129
2138
|
}
|
|
2130
|
-
function
|
|
2139
|
+
function $o(e) {
|
|
2131
2140
|
const t = D, n = G;
|
|
2132
2141
|
return Promise.resolve().then(() => {
|
|
2133
2142
|
D = t, G = n;
|
|
@@ -2135,19 +2144,19 @@ function qo(e) {
|
|
|
2135
2144
|
return me(e, !1), D = G = null, s ? s.done : void 0;
|
|
2136
2145
|
});
|
|
2137
2146
|
}
|
|
2138
|
-
var [
|
|
2139
|
-
function
|
|
2140
|
-
return [$o
|
|
2147
|
+
var [Qo, gu] = /* @__PURE__ */ F(!1);
|
|
2148
|
+
function mu() {
|
|
2149
|
+
return [Qo, $o];
|
|
2141
2150
|
}
|
|
2142
|
-
function
|
|
2151
|
+
function Eu(e, t) {
|
|
2143
2152
|
const n = Symbol("context");
|
|
2144
2153
|
return {
|
|
2145
2154
|
id: n,
|
|
2146
|
-
Provider:
|
|
2155
|
+
Provider: Jo(n),
|
|
2147
2156
|
defaultValue: e
|
|
2148
2157
|
};
|
|
2149
2158
|
}
|
|
2150
|
-
function
|
|
2159
|
+
function pu(e) {
|
|
2151
2160
|
let t;
|
|
2152
2161
|
return G && G.context && (t = G.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
2153
2162
|
}
|
|
@@ -2158,10 +2167,10 @@ function sr(e) {
|
|
|
2158
2167
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
2159
2168
|
}, n;
|
|
2160
2169
|
}
|
|
2161
|
-
var
|
|
2170
|
+
var zo;
|
|
2162
2171
|
function rr() {
|
|
2163
2172
|
if (this.sources && this.state)
|
|
2164
|
-
if (this.state ===
|
|
2173
|
+
if (this.state === Ie) lt(this);
|
|
2165
2174
|
else {
|
|
2166
2175
|
const e = ee;
|
|
2167
2176
|
ee = null, me(() => Zt(this), !1), ee = e;
|
|
@@ -2177,7 +2186,7 @@ function ar(e, t, n) {
|
|
|
2177
2186
|
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && me(() => {
|
|
2178
2187
|
for (let r = 0; r < e.observers.length; r += 1) {
|
|
2179
2188
|
const a = e.observers[r], i = mn && mn.running;
|
|
2180
|
-
i && mn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) : _e.push(a), a.observers && or(a)), i || (a.state =
|
|
2189
|
+
i && mn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) : _e.push(a), a.observers && or(a)), i || (a.state = Ie);
|
|
2181
2190
|
}
|
|
2182
2191
|
if (ee.length > 1e6)
|
|
2183
2192
|
throw ee = [], new Error();
|
|
@@ -2187,22 +2196,22 @@ function lt(e) {
|
|
|
2187
2196
|
if (!e.fn) return;
|
|
2188
2197
|
ht(e);
|
|
2189
2198
|
const t = an;
|
|
2190
|
-
|
|
2199
|
+
Wo(e, e.value, t);
|
|
2191
2200
|
}
|
|
2192
|
-
function
|
|
2201
|
+
function Wo(e, t, n) {
|
|
2193
2202
|
let s;
|
|
2194
2203
|
const r = G, a = D;
|
|
2195
2204
|
D = G = e;
|
|
2196
2205
|
try {
|
|
2197
2206
|
s = e.fn(t);
|
|
2198
2207
|
} catch (i) {
|
|
2199
|
-
return e.pure && (e.state =
|
|
2208
|
+
return e.pure && (e.state = Ie, e.owned && e.owned.forEach(ht), e.owned = null), e.updatedAt = n + 1, Kn(i);
|
|
2200
2209
|
} finally {
|
|
2201
2210
|
D = a, G = r;
|
|
2202
2211
|
}
|
|
2203
2212
|
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? ar(e, s) : e.value = s, e.updatedAt = n);
|
|
2204
2213
|
}
|
|
2205
|
-
function on(e, t, n, s =
|
|
2214
|
+
function on(e, t, n, s = Ie, r) {
|
|
2206
2215
|
const a = {
|
|
2207
2216
|
fn: e,
|
|
2208
2217
|
state: s,
|
|
@@ -2226,7 +2235,7 @@ function Jt(e) {
|
|
|
2226
2235
|
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < an); )
|
|
2227
2236
|
e.state && t.push(e);
|
|
2228
2237
|
for (let n = t.length - 1; n >= 0; n--)
|
|
2229
|
-
if (e = t[n], e.state ===
|
|
2238
|
+
if (e = t[n], e.state === Ie)
|
|
2230
2239
|
lt(e);
|
|
2231
2240
|
else if (e.state === Yt) {
|
|
2232
2241
|
const s = ee;
|
|
@@ -2239,12 +2248,12 @@ function me(e, t) {
|
|
|
2239
2248
|
t || (ee = []), _e ? n = !0 : _e = [], an++;
|
|
2240
2249
|
try {
|
|
2241
2250
|
const s = e();
|
|
2242
|
-
return
|
|
2251
|
+
return jo(n), s;
|
|
2243
2252
|
} catch (s) {
|
|
2244
|
-
n || (_e = null), ee = null,
|
|
2253
|
+
n || (_e = null), ee = null, Kn(s);
|
|
2245
2254
|
}
|
|
2246
2255
|
}
|
|
2247
|
-
function
|
|
2256
|
+
function jo(e) {
|
|
2248
2257
|
if (ee && (ir(ee), ee = null), e) return;
|
|
2249
2258
|
const t = _e;
|
|
2250
2259
|
_e = null, t.length && me(() => Xs(t), !1);
|
|
@@ -2252,7 +2261,7 @@ function Wo(e) {
|
|
|
2252
2261
|
function ir(e) {
|
|
2253
2262
|
for (let t = 0; t < e.length; t++) Jt(e[t]);
|
|
2254
2263
|
}
|
|
2255
|
-
function
|
|
2264
|
+
function Yo(e) {
|
|
2256
2265
|
let t, n = 0;
|
|
2257
2266
|
for (t = 0; t < e.length; t++) {
|
|
2258
2267
|
const s = e[t];
|
|
@@ -2273,7 +2282,7 @@ function Zt(e, t) {
|
|
|
2273
2282
|
const s = e.sources[n];
|
|
2274
2283
|
if (s.sources) {
|
|
2275
2284
|
const r = s.state;
|
|
2276
|
-
r ===
|
|
2285
|
+
r === Ie ? s !== t && (!s.updatedAt || s.updatedAt < an) && Jt(s) : r === Yt && Zt(s, t);
|
|
2277
2286
|
}
|
|
2278
2287
|
}
|
|
2279
2288
|
}
|
|
@@ -2312,7 +2321,7 @@ function Vt(e) {
|
|
|
2312
2321
|
cause: e
|
|
2313
2322
|
});
|
|
2314
2323
|
}
|
|
2315
|
-
function
|
|
2324
|
+
function Kn(e, t = G) {
|
|
2316
2325
|
throw Vt(e);
|
|
2317
2326
|
}
|
|
2318
2327
|
function An(e) {
|
|
@@ -2327,7 +2336,7 @@ function An(e) {
|
|
|
2327
2336
|
}
|
|
2328
2337
|
return e;
|
|
2329
2338
|
}
|
|
2330
|
-
function
|
|
2339
|
+
function Jo(e, t) {
|
|
2331
2340
|
return function(s) {
|
|
2332
2341
|
let r;
|
|
2333
2342
|
return ke(() => r = Z(() => (G.context = {
|
|
@@ -2340,7 +2349,7 @@ var Tn = Symbol("fallback");
|
|
|
2340
2349
|
function Xt(e) {
|
|
2341
2350
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
2342
2351
|
}
|
|
2343
|
-
function
|
|
2352
|
+
function Zo(e, t, n = {}) {
|
|
2344
2353
|
let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
|
|
2345
2354
|
return ft(() => Xt(a)), () => {
|
|
2346
2355
|
let l = e() || [], f = l.length, d, u;
|
|
@@ -2375,7 +2384,7 @@ function Jo(e, t, n = {}) {
|
|
|
2375
2384
|
}
|
|
2376
2385
|
};
|
|
2377
2386
|
}
|
|
2378
|
-
function
|
|
2387
|
+
function Xo(e, t, n = {}) {
|
|
2379
2388
|
let s = [], r = [], a = [], i = [], o = 0, l;
|
|
2380
2389
|
return ft(() => Xt(a)), () => {
|
|
2381
2390
|
const f = e() || [], d = f.length;
|
|
@@ -2428,7 +2437,7 @@ var Sn = {
|
|
|
2428
2437
|
function En(e) {
|
|
2429
2438
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
2430
2439
|
}
|
|
2431
|
-
function
|
|
2440
|
+
function el() {
|
|
2432
2441
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
2433
2442
|
const n = this[e]();
|
|
2434
2443
|
if (n !== void 0) return n;
|
|
@@ -2472,7 +2481,7 @@ function cr(...e) {
|
|
|
2472
2481
|
s[d] = u.get ? {
|
|
2473
2482
|
enumerable: !0,
|
|
2474
2483
|
configurable: !0,
|
|
2475
|
-
get:
|
|
2484
|
+
get: el.bind(n[d] = [u.get.bind(o)])
|
|
2476
2485
|
} : u.value !== void 0 ? u : void 0;
|
|
2477
2486
|
else {
|
|
2478
2487
|
const g = n[d];
|
|
@@ -2487,7 +2496,7 @@ function cr(...e) {
|
|
|
2487
2496
|
}
|
|
2488
2497
|
return r;
|
|
2489
2498
|
}
|
|
2490
|
-
function
|
|
2499
|
+
function tl(e, ...t) {
|
|
2491
2500
|
if (Js && Wt in e) {
|
|
2492
2501
|
const r = new Set(t.length > 1 ? t.flat() : t[0]), a = t.map((i) => new Proxy({
|
|
2493
2502
|
get(o) {
|
|
@@ -2532,7 +2541,7 @@ function ur(e) {
|
|
|
2532
2541
|
!_.done && ct(a), _.count--, l(() => f.default), ct();
|
|
2533
2542
|
}), t = o;
|
|
2534
2543
|
} else if (!t) {
|
|
2535
|
-
const [o] =
|
|
2544
|
+
const [o] = Ho(() => (n || (n = e())).then((l) => l.default));
|
|
2536
2545
|
t = o;
|
|
2537
2546
|
}
|
|
2538
2547
|
let i;
|
|
@@ -2546,24 +2555,24 @@ function ur(e) {
|
|
|
2546
2555
|
};
|
|
2547
2556
|
return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
|
|
2548
2557
|
}
|
|
2549
|
-
var
|
|
2550
|
-
function
|
|
2551
|
-
return _.context ? _.getNextContextId() : `cl-${
|
|
2558
|
+
var nl = 0;
|
|
2559
|
+
function yu() {
|
|
2560
|
+
return _.context ? _.getNextContextId() : `cl-${nl++}`;
|
|
2552
2561
|
}
|
|
2553
2562
|
var dr = (e) => `Stale read from <${e}>.`;
|
|
2554
|
-
function
|
|
2563
|
+
function Au(e) {
|
|
2555
2564
|
const t = "fallback" in e && {
|
|
2556
2565
|
fallback: () => e.fallback
|
|
2557
2566
|
};
|
|
2558
|
-
return j(
|
|
2567
|
+
return j(Zo(() => e.each, e.children, t || void 0));
|
|
2559
2568
|
}
|
|
2560
|
-
function
|
|
2569
|
+
function Tu(e) {
|
|
2561
2570
|
const t = "fallback" in e && {
|
|
2562
2571
|
fallback: () => e.fallback
|
|
2563
2572
|
};
|
|
2564
|
-
return j(
|
|
2573
|
+
return j(Xo(() => e.each, e.children, t || void 0));
|
|
2565
2574
|
}
|
|
2566
|
-
function
|
|
2575
|
+
function Su(e) {
|
|
2567
2576
|
const t = e.keyed, n = j(() => e.when, void 0, void 0), s = t ? n : j(n, void 0, {
|
|
2568
2577
|
equals: (r, a) => !r == !a
|
|
2569
2578
|
});
|
|
@@ -2579,7 +2588,7 @@ function Tu(e) {
|
|
|
2579
2588
|
return e.fallback;
|
|
2580
2589
|
}, void 0, void 0);
|
|
2581
2590
|
}
|
|
2582
|
-
function
|
|
2591
|
+
function _u(e) {
|
|
2583
2592
|
const t = sr(() => e.children), n = j(() => {
|
|
2584
2593
|
const s = t(), r = Array.isArray(s) ? s : [s];
|
|
2585
2594
|
let a = () => {
|
|
@@ -2603,13 +2612,13 @@ function Su(e) {
|
|
|
2603
2612
|
})) : o;
|
|
2604
2613
|
}, void 0, void 0);
|
|
2605
2614
|
}
|
|
2606
|
-
function
|
|
2615
|
+
function Pu(e) {
|
|
2607
2616
|
return e;
|
|
2608
2617
|
}
|
|
2609
|
-
var
|
|
2618
|
+
var sl = ["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"], rl = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...sl]), al = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), il = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2610
2619
|
className: "class",
|
|
2611
2620
|
htmlFor: "for"
|
|
2612
|
-
}),
|
|
2621
|
+
}), ol = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2613
2622
|
class: "className",
|
|
2614
2623
|
novalidate: {
|
|
2615
2624
|
$: "noValidate",
|
|
@@ -2638,11 +2647,11 @@ var nl = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
|
|
|
2638
2647
|
TEXTAREA: 1
|
|
2639
2648
|
}
|
|
2640
2649
|
});
|
|
2641
|
-
function
|
|
2642
|
-
const n =
|
|
2650
|
+
function ll(e, t) {
|
|
2651
|
+
const n = ol[e];
|
|
2643
2652
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
2644
2653
|
}
|
|
2645
|
-
var
|
|
2654
|
+
var cl = /* @__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"]), ul = /* @__PURE__ */ new Set([
|
|
2646
2655
|
"altGlyph",
|
|
2647
2656
|
"altGlyphDef",
|
|
2648
2657
|
"altGlyphItem",
|
|
@@ -2720,11 +2729,11 @@ var ll = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
|
|
|
2720
2729
|
"use",
|
|
2721
2730
|
"view",
|
|
2722
2731
|
"vkern"
|
|
2723
|
-
]),
|
|
2732
|
+
]), dl = {
|
|
2724
2733
|
xlink: "http://www.w3.org/1999/xlink",
|
|
2725
2734
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
2726
|
-
},
|
|
2727
|
-
function
|
|
2735
|
+
}, wu = (e) => j(() => e());
|
|
2736
|
+
function fl(e, t, n) {
|
|
2728
2737
|
let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling, f = null;
|
|
2729
2738
|
for (; i < r || o < a; ) {
|
|
2730
2739
|
if (t[i] === n[o]) {
|
|
@@ -2772,7 +2781,7 @@ function fr(e, t, n, s = {}) {
|
|
|
2772
2781
|
r(), t.textContent = "";
|
|
2773
2782
|
};
|
|
2774
2783
|
}
|
|
2775
|
-
function
|
|
2784
|
+
function vu(e, t, n, s) {
|
|
2776
2785
|
let r;
|
|
2777
2786
|
const a = () => {
|
|
2778
2787
|
const o = document.createElement("template");
|
|
@@ -2780,14 +2789,14 @@ function wu(e, t, n, s) {
|
|
|
2780
2789
|
}, i = () => (r || (r = a())).cloneNode(!0);
|
|
2781
2790
|
return i.cloneNode = i, i;
|
|
2782
2791
|
}
|
|
2783
|
-
function
|
|
2792
|
+
function hl(e, t = window.document) {
|
|
2784
2793
|
const n = t[ut] || (t[ut] = /* @__PURE__ */ new Set());
|
|
2785
2794
|
for (let s = 0, r = e.length; s < r; s++) {
|
|
2786
2795
|
const a = e[s];
|
|
2787
2796
|
n.has(a) || (n.add(a), t.addEventListener(a, hr));
|
|
2788
2797
|
}
|
|
2789
2798
|
}
|
|
2790
|
-
function
|
|
2799
|
+
function Iu(e = window.document) {
|
|
2791
2800
|
if (e[ut]) {
|
|
2792
2801
|
for (let t of e[ut].keys()) e.removeEventListener(t, hr);
|
|
2793
2802
|
delete e[ut];
|
|
@@ -2796,16 +2805,16 @@ function vu(e = window.document) {
|
|
|
2796
2805
|
function _n(e, t, n) {
|
|
2797
2806
|
Fe(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
2798
2807
|
}
|
|
2799
|
-
function
|
|
2808
|
+
function gl(e, t, n, s) {
|
|
2800
2809
|
Fe(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
|
|
2801
2810
|
}
|
|
2802
|
-
function
|
|
2811
|
+
function ml(e, t, n) {
|
|
2803
2812
|
Fe(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
2804
2813
|
}
|
|
2805
|
-
function
|
|
2814
|
+
function El(e, t) {
|
|
2806
2815
|
Fe(e) || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
2807
2816
|
}
|
|
2808
|
-
function
|
|
2817
|
+
function pl(e, t, n, s) {
|
|
2809
2818
|
if (s)
|
|
2810
2819
|
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
2811
2820
|
else if (Array.isArray(n)) {
|
|
@@ -2813,20 +2822,20 @@ function El(e, t, n, s) {
|
|
|
2813
2822
|
e.addEventListener(t, n[0] = (a) => r.call(e, n[1], a));
|
|
2814
2823
|
} else e.addEventListener(t, n, typeof n != "function" && n);
|
|
2815
2824
|
}
|
|
2816
|
-
function
|
|
2825
|
+
function yl(e, t, n = {}) {
|
|
2817
2826
|
const s = Object.keys(t || {}), r = Object.keys(n);
|
|
2818
2827
|
let a, i;
|
|
2819
2828
|
for (a = 0, i = r.length; a < i; a++) {
|
|
2820
2829
|
const o = r[a];
|
|
2821
|
-
!o || o === "undefined" || t[o] || (
|
|
2830
|
+
!o || o === "undefined" || t[o] || (us(e, o, !1), delete n[o]);
|
|
2822
2831
|
}
|
|
2823
2832
|
for (a = 0, i = s.length; a < i; a++) {
|
|
2824
2833
|
const o = s[a], l = !!t[o];
|
|
2825
|
-
!o || o === "undefined" || n[o] === l || !l || (
|
|
2834
|
+
!o || o === "undefined" || n[o] === l || !l || (us(e, o, !0), n[o] = l);
|
|
2826
2835
|
}
|
|
2827
2836
|
return n;
|
|
2828
2837
|
}
|
|
2829
|
-
function
|
|
2838
|
+
function Al(e, t, n) {
|
|
2830
2839
|
if (!t) return n ? _n(e, "style") : t;
|
|
2831
2840
|
const s = e.style;
|
|
2832
2841
|
if (typeof t == "string") return s.cssText = t;
|
|
@@ -2838,49 +2847,49 @@ function yl(e, t, n) {
|
|
|
2838
2847
|
r = t[a], r !== n[a] && (s.setProperty(a, r), n[a] = r);
|
|
2839
2848
|
return n;
|
|
2840
2849
|
}
|
|
2841
|
-
function
|
|
2850
|
+
function Tl(e, t = {}, n, s) {
|
|
2842
2851
|
const r = {};
|
|
2843
|
-
return s || ke(() => r.children = gt(e, t.children, r.children)), ke(() => typeof t.ref == "function" &&
|
|
2852
|
+
return s || ke(() => r.children = gt(e, t.children, r.children)), ke(() => typeof t.ref == "function" && Sl(t.ref, e)), ke(() => _l(e, t, n, !0, r, !0)), r;
|
|
2844
2853
|
}
|
|
2845
|
-
function
|
|
2854
|
+
function Sl(e, t, n) {
|
|
2846
2855
|
return Z(() => e(t, n));
|
|
2847
2856
|
}
|
|
2848
2857
|
function Pn(e, t, n, s) {
|
|
2849
2858
|
if (n !== void 0 && !s && (s = []), typeof t != "function") return gt(e, t, s, n);
|
|
2850
2859
|
ke((r) => gt(e, t(), r, n), s);
|
|
2851
2860
|
}
|
|
2852
|
-
function
|
|
2861
|
+
function _l(e, t, n, s, r = {}, a = !1) {
|
|
2853
2862
|
t || (t = {});
|
|
2854
2863
|
for (const i in r)
|
|
2855
2864
|
if (!(i in t)) {
|
|
2856
2865
|
if (i === "children") continue;
|
|
2857
|
-
r[i] =
|
|
2866
|
+
r[i] = ds(e, i, null, r[i], n, a, t);
|
|
2858
2867
|
}
|
|
2859
2868
|
for (const i in t) {
|
|
2860
2869
|
if (i === "children")
|
|
2861
2870
|
continue;
|
|
2862
2871
|
const o = t[i];
|
|
2863
|
-
r[i] =
|
|
2872
|
+
r[i] = ds(e, i, o, r[i], n, a, t);
|
|
2864
2873
|
}
|
|
2865
2874
|
}
|
|
2866
|
-
function
|
|
2875
|
+
function Pl(e) {
|
|
2867
2876
|
let t, n;
|
|
2868
|
-
return !Fe() || !(t = _.registry.get(n =
|
|
2877
|
+
return !Fe() || !(t = _.registry.get(n = vl())) ? e() : (_.completed && _.completed.add(t), _.registry.delete(n), t);
|
|
2869
2878
|
}
|
|
2870
2879
|
function Fe(e) {
|
|
2871
2880
|
return !!_.context && !_.done && (!e || e.isConnected);
|
|
2872
2881
|
}
|
|
2873
|
-
function
|
|
2882
|
+
function wl(e) {
|
|
2874
2883
|
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
2875
2884
|
}
|
|
2876
|
-
function
|
|
2885
|
+
function us(e, t, n) {
|
|
2877
2886
|
const s = t.trim().split(/\s+/);
|
|
2878
2887
|
for (let r = 0, a = s.length; r < a; r++) e.classList.toggle(s[r], n);
|
|
2879
2888
|
}
|
|
2880
|
-
function
|
|
2889
|
+
function ds(e, t, n, s, r, a, i) {
|
|
2881
2890
|
let o, l, f, d, u;
|
|
2882
|
-
if (t === "style") return
|
|
2883
|
-
if (t === "classList") return
|
|
2891
|
+
if (t === "style") return Al(e, n, s);
|
|
2892
|
+
if (t === "classList") return yl(e, n, s);
|
|
2884
2893
|
if (n === s) return s;
|
|
2885
2894
|
if (t === "ref")
|
|
2886
2895
|
a || n(e);
|
|
@@ -2891,24 +2900,24 @@ function us(e, t, n, s, r, a, i) {
|
|
|
2891
2900
|
const g = t.slice(10);
|
|
2892
2901
|
s && e.removeEventListener(g, s, !0), n && e.addEventListener(g, n, !0);
|
|
2893
2902
|
} else if (t.slice(0, 2) === "on") {
|
|
2894
|
-
const g = t.slice(2).toLowerCase(), h =
|
|
2903
|
+
const g = t.slice(2).toLowerCase(), h = cl.has(g);
|
|
2895
2904
|
if (!h && s) {
|
|
2896
2905
|
const p = Array.isArray(s) ? s[0] : s;
|
|
2897
2906
|
e.removeEventListener(g, p);
|
|
2898
2907
|
}
|
|
2899
|
-
(h || n) && (
|
|
2908
|
+
(h || n) && (pl(e, g, n, h), h && hl([g]));
|
|
2900
2909
|
} else if (t.slice(0, 5) === "attr:")
|
|
2901
2910
|
_n(e, t.slice(5), n);
|
|
2902
2911
|
else if (t.slice(0, 5) === "bool:")
|
|
2903
|
-
|
|
2904
|
-
else if ((u = t.slice(0, 5) === "prop:") || (f =
|
|
2912
|
+
ml(e, t.slice(5), n);
|
|
2913
|
+
else if ((u = t.slice(0, 5) === "prop:") || (f = al.has(t)) || !r && ((d = ll(t, e.tagName)) || (l = rl.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
|
|
2905
2914
|
if (u)
|
|
2906
2915
|
t = t.slice(5), l = !0;
|
|
2907
2916
|
else if (Fe(e)) return n;
|
|
2908
|
-
t === "class" || t === "className" ?
|
|
2917
|
+
t === "class" || t === "className" ? El(e, n) : o && !l && !f ? e[wl(t)] = n : e[d || t] = n;
|
|
2909
2918
|
} else {
|
|
2910
|
-
const g = r && t.indexOf(":") > -1 &&
|
|
2911
|
-
g ?
|
|
2919
|
+
const g = r && t.indexOf(":") > -1 && dl[t.split(":")[0]];
|
|
2920
|
+
g ? gl(e, g, t, n) : _n(e, il[t] || t, n);
|
|
2912
2921
|
}
|
|
2913
2922
|
return n;
|
|
2914
2923
|
}
|
|
@@ -2995,7 +3004,7 @@ function gt(e, t, n, s, r) {
|
|
|
2995
3004
|
}
|
|
2996
3005
|
if (l.length === 0) {
|
|
2997
3006
|
if (n = Ve(e, n, s), o) return n;
|
|
2998
|
-
} else f ? n.length === 0 ?
|
|
3007
|
+
} else f ? n.length === 0 ? fs(e, l, s) : fl(e, n, l) : (n && Ve(e), fs(e, l));
|
|
2999
3008
|
n = l;
|
|
3000
3009
|
} else if (t.nodeType) {
|
|
3001
3010
|
if (a && t.parentNode) return n = o ? [t] : t;
|
|
@@ -3029,7 +3038,7 @@ function wn(e, t, n, s) {
|
|
|
3029
3038
|
}
|
|
3030
3039
|
return r;
|
|
3031
3040
|
}
|
|
3032
|
-
function
|
|
3041
|
+
function fs(e, t, n = null) {
|
|
3033
3042
|
for (let s = 0, r = t.length; s < r; s++) e.insertBefore(t[s], n);
|
|
3034
3043
|
}
|
|
3035
3044
|
function Ve(e, t, n, s) {
|
|
@@ -3047,20 +3056,20 @@ function Ve(e, t, n, s) {
|
|
|
3047
3056
|
} else e.insertBefore(r, n);
|
|
3048
3057
|
return [r];
|
|
3049
3058
|
}
|
|
3050
|
-
function
|
|
3059
|
+
function vl() {
|
|
3051
3060
|
return _.getNextContextId();
|
|
3052
3061
|
}
|
|
3053
|
-
var
|
|
3062
|
+
var Il = "http://www.w3.org/2000/svg";
|
|
3054
3063
|
function gr(e, t = !1) {
|
|
3055
|
-
return t ? document.createElementNS(
|
|
3064
|
+
return t ? document.createElementNS(Il, e) : document.createElement(e);
|
|
3056
3065
|
}
|
|
3057
3066
|
function bu(e) {
|
|
3058
3067
|
const {
|
|
3059
3068
|
useShadow: t
|
|
3060
|
-
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r =
|
|
3069
|
+
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = cs();
|
|
3061
3070
|
let a, i = !!_.context;
|
|
3062
3071
|
return tr(() => {
|
|
3063
|
-
i && (
|
|
3072
|
+
i && (cs().user = i = !1), a || (a = nr(r, () => j(() => e.children)));
|
|
3064
3073
|
const o = s();
|
|
3065
3074
|
if (o instanceof HTMLHeadElement) {
|
|
3066
3075
|
const [l, f] = F(!1), d = () => f(!0);
|
|
@@ -3088,16 +3097,16 @@ function bl(e, t) {
|
|
|
3088
3097
|
case "function":
|
|
3089
3098
|
return Z(() => s(t));
|
|
3090
3099
|
case "string":
|
|
3091
|
-
const r =
|
|
3092
|
-
return
|
|
3100
|
+
const r = ul.has(s), a = _.context ? Pl() : gr(s, r);
|
|
3101
|
+
return Tl(a, t, r), a;
|
|
3093
3102
|
}
|
|
3094
3103
|
});
|
|
3095
3104
|
}
|
|
3096
|
-
function
|
|
3097
|
-
const [, t] =
|
|
3105
|
+
function Nu(e) {
|
|
3106
|
+
const [, t] = tl(e, ["component"]);
|
|
3098
3107
|
return bl(() => e.component, t);
|
|
3099
3108
|
}
|
|
3100
|
-
var
|
|
3109
|
+
var Nl = class {
|
|
3101
3110
|
constructor() {
|
|
3102
3111
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
3103
3112
|
}
|
|
@@ -3115,7 +3124,7 @@ var Il = class {
|
|
|
3115
3124
|
}
|
|
3116
3125
|
}, mr = class {
|
|
3117
3126
|
constructor(e) {
|
|
3118
|
-
this.generateIdentifier = e, this.kv = new
|
|
3127
|
+
this.generateIdentifier = e, this.kv = new Nl();
|
|
3119
3128
|
}
|
|
3120
3129
|
register(e, t) {
|
|
3121
3130
|
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
@@ -3129,7 +3138,7 @@ var Il = class {
|
|
|
3129
3138
|
getValue(e) {
|
|
3130
3139
|
return this.kv.getByKey(e);
|
|
3131
3140
|
}
|
|
3132
|
-
},
|
|
3141
|
+
}, Ll = class extends mr {
|
|
3133
3142
|
constructor() {
|
|
3134
3143
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
3135
3144
|
}
|
|
@@ -3140,7 +3149,7 @@ var Il = class {
|
|
|
3140
3149
|
return this.classToAllowedProps.get(e);
|
|
3141
3150
|
}
|
|
3142
3151
|
};
|
|
3143
|
-
function
|
|
3152
|
+
function Cl(e) {
|
|
3144
3153
|
if ("values" in Object)
|
|
3145
3154
|
return Object.values(e);
|
|
3146
3155
|
const t = [];
|
|
@@ -3148,8 +3157,8 @@ function Ll(e) {
|
|
|
3148
3157
|
e.hasOwnProperty(n) && t.push(e[n]);
|
|
3149
3158
|
return t;
|
|
3150
3159
|
}
|
|
3151
|
-
function
|
|
3152
|
-
const n =
|
|
3160
|
+
function Gl(e, t) {
|
|
3161
|
+
const n = Cl(e);
|
|
3153
3162
|
if ("find" in n)
|
|
3154
3163
|
return n.find(t);
|
|
3155
3164
|
const s = n;
|
|
@@ -3165,14 +3174,14 @@ function ot(e, t) {
|
|
|
3165
3174
|
function Ht(e, t) {
|
|
3166
3175
|
return e.indexOf(t) !== -1;
|
|
3167
3176
|
}
|
|
3168
|
-
function
|
|
3177
|
+
function hs(e, t) {
|
|
3169
3178
|
for (let n = 0; n < e.length; n++) {
|
|
3170
3179
|
const s = e[n];
|
|
3171
3180
|
if (t(s))
|
|
3172
3181
|
return s;
|
|
3173
3182
|
}
|
|
3174
3183
|
}
|
|
3175
|
-
var
|
|
3184
|
+
var Ol = class {
|
|
3176
3185
|
constructor() {
|
|
3177
3186
|
this.transfomers = {};
|
|
3178
3187
|
}
|
|
@@ -3180,12 +3189,12 @@ var Gl = class {
|
|
|
3180
3189
|
this.transfomers[e.name] = e;
|
|
3181
3190
|
}
|
|
3182
3191
|
findApplicable(e) {
|
|
3183
|
-
return
|
|
3192
|
+
return Gl(this.transfomers, (t) => t.isApplicable(e));
|
|
3184
3193
|
}
|
|
3185
3194
|
findByName(e) {
|
|
3186
3195
|
return this.transfomers[e];
|
|
3187
3196
|
}
|
|
3188
|
-
},
|
|
3197
|
+
}, xl = (e) => Object.prototype.toString.call(e).slice(8, -1), Er = (e) => typeof e > "u", Dl = (e) => e === null, mt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, vn = (e) => mt(e) && Object.keys(e).length === 0, Ne = (e) => Array.isArray(e), kl = (e) => typeof e == "string", Rl = (e) => typeof e == "number" && !isNaN(e), Ul = (e) => typeof e == "boolean", Ml = (e) => e instanceof RegExp, Et = (e) => e instanceof Map, pt = (e) => e instanceof Set, pr = (e) => xl(e) === "Symbol", Bl = (e) => e instanceof Date && !isNaN(e.valueOf()), Fl = (e) => e instanceof Error, gs = (e) => typeof e == "number" && isNaN(e), Kl = (e) => Ul(e) || Dl(e) || Er(e) || Rl(e) || kl(e) || pr(e), Vl = (e) => typeof e == "bigint", Hl = (e) => e === 1 / 0 || e === -1 / 0, ql = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), $l = (e) => e instanceof URL, yr = (e) => e.replace(/\./g, "\\."), pn = (e) => e.map(String).map(yr).join("."), dt = (e) => {
|
|
3189
3198
|
const t = [];
|
|
3190
3199
|
let n = "";
|
|
3191
3200
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -3214,9 +3223,9 @@ function de(e, t, n, s) {
|
|
|
3214
3223
|
var Ar = [
|
|
3215
3224
|
de(Er, "undefined", () => null, () => {
|
|
3216
3225
|
}),
|
|
3217
|
-
de(
|
|
3218
|
-
de(
|
|
3219
|
-
de(
|
|
3226
|
+
de(Vl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
3227
|
+
de(Bl, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
3228
|
+
de(Fl, "Error", (e, t) => {
|
|
3220
3229
|
const n = {
|
|
3221
3230
|
name: e.name,
|
|
3222
3231
|
message: e.message
|
|
@@ -3230,7 +3239,7 @@ var Ar = [
|
|
|
3230
3239
|
n[s] = e[s];
|
|
3231
3240
|
}), n;
|
|
3232
3241
|
}),
|
|
3233
|
-
de(
|
|
3242
|
+
de(Ml, "regexp", (e) => "" + e, (e) => {
|
|
3234
3243
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
3235
3244
|
return new RegExp(t, n);
|
|
3236
3245
|
}),
|
|
@@ -3243,9 +3252,9 @@ var Ar = [
|
|
|
3243
3252
|
(e) => new Set(e)
|
|
3244
3253
|
),
|
|
3245
3254
|
de(Et, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
3246
|
-
de((e) =>
|
|
3255
|
+
de((e) => gs(e) || Hl(e), "number", (e) => gs(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
3247
3256
|
de((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
3248
|
-
de(
|
|
3257
|
+
de($l, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
3249
3258
|
];
|
|
3250
3259
|
function ln(e, t, n, s) {
|
|
3251
3260
|
return {
|
|
@@ -3260,7 +3269,7 @@ var Tr = ln((e, t) => pr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
3260
3269
|
if (!s)
|
|
3261
3270
|
throw new Error("Trying to deserialize unknown symbol");
|
|
3262
3271
|
return s;
|
|
3263
|
-
}),
|
|
3272
|
+
}), Ql = [
|
|
3264
3273
|
Int8Array,
|
|
3265
3274
|
Uint8Array,
|
|
3266
3275
|
Int16Array,
|
|
@@ -3270,8 +3279,8 @@ var Tr = ln((e, t) => pr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
3270
3279
|
Float32Array,
|
|
3271
3280
|
Float64Array,
|
|
3272
3281
|
Uint8ClampedArray
|
|
3273
|
-
].reduce((e, t) => (e[t.name] = t, e), {}), Sr = ln(
|
|
3274
|
-
const n =
|
|
3282
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), Sr = ln(ql, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
3283
|
+
const n = Ql[t[1]];
|
|
3275
3284
|
if (!n)
|
|
3276
3285
|
throw new Error("Trying to deserialize unknown typed array");
|
|
3277
3286
|
return new n(e);
|
|
@@ -3297,14 +3306,14 @@ var Pr = ln(_r, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
3297
3306
|
if (!s)
|
|
3298
3307
|
throw new Error("Trying to deserialize unknown custom value");
|
|
3299
3308
|
return s.deserialize(e);
|
|
3300
|
-
}),
|
|
3301
|
-
const n =
|
|
3309
|
+
}), zl = [Pr, Tr, wr, Sr], ms = (e, t) => {
|
|
3310
|
+
const n = hs(zl, (r) => r.isApplicable(e, t));
|
|
3302
3311
|
if (n)
|
|
3303
3312
|
return {
|
|
3304
3313
|
value: n.transform(e, t),
|
|
3305
3314
|
type: n.annotation(e, t)
|
|
3306
3315
|
};
|
|
3307
|
-
const s =
|
|
3316
|
+
const s = hs(Ar, (r) => r.isApplicable(e, t));
|
|
3308
3317
|
if (s)
|
|
3309
3318
|
return {
|
|
3310
3319
|
value: s.transform(e, t),
|
|
@@ -3314,7 +3323,7 @@ var Pr = ln(_r, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
3314
3323
|
Ar.forEach((e) => {
|
|
3315
3324
|
vr[e.annotation] = e;
|
|
3316
3325
|
});
|
|
3317
|
-
var
|
|
3326
|
+
var Wl = (e, t, n) => {
|
|
3318
3327
|
if (Ne(t))
|
|
3319
3328
|
switch (t[0]) {
|
|
3320
3329
|
case "symbol":
|
|
@@ -3342,7 +3351,7 @@ var zl = (e, t, n) => {
|
|
|
3342
3351
|
n.next(), t--;
|
|
3343
3352
|
return n.next().value;
|
|
3344
3353
|
};
|
|
3345
|
-
function
|
|
3354
|
+
function Ir(e) {
|
|
3346
3355
|
if (Ht(e, "__proto__"))
|
|
3347
3356
|
throw new Error("__proto__ is not allowed as a property");
|
|
3348
3357
|
if (Ht(e, "prototype"))
|
|
@@ -3350,8 +3359,8 @@ function br(e) {
|
|
|
3350
3359
|
if (Ht(e, "constructor"))
|
|
3351
3360
|
throw new Error("constructor is not allowed as a property");
|
|
3352
3361
|
}
|
|
3353
|
-
var
|
|
3354
|
-
|
|
3362
|
+
var jl = (e, t) => {
|
|
3363
|
+
Ir(t);
|
|
3355
3364
|
for (let n = 0; n < t.length; n++) {
|
|
3356
3365
|
const s = t[n];
|
|
3357
3366
|
if (pt(e))
|
|
@@ -3370,8 +3379,8 @@ var Wl = (e, t) => {
|
|
|
3370
3379
|
e = e[s];
|
|
3371
3380
|
}
|
|
3372
3381
|
return e;
|
|
3373
|
-
},
|
|
3374
|
-
if (
|
|
3382
|
+
}, In = (e, t, n) => {
|
|
3383
|
+
if (Ir(t), t.length === 0)
|
|
3375
3384
|
return n(e);
|
|
3376
3385
|
let s = e;
|
|
3377
3386
|
for (let a = 0; a < t.length - 1; a++) {
|
|
@@ -3419,45 +3428,45 @@ var Wl = (e, t) => {
|
|
|
3419
3428
|
}
|
|
3420
3429
|
return e;
|
|
3421
3430
|
};
|
|
3422
|
-
function
|
|
3431
|
+
function bn(e, t, n = []) {
|
|
3423
3432
|
if (!e)
|
|
3424
3433
|
return;
|
|
3425
3434
|
if (!Ne(e)) {
|
|
3426
|
-
ot(e, (a, i) =>
|
|
3435
|
+
ot(e, (a, i) => bn(a, t, [...n, ...dt(i)]));
|
|
3427
3436
|
return;
|
|
3428
3437
|
}
|
|
3429
3438
|
const [s, r] = e;
|
|
3430
3439
|
r && ot(r, (a, i) => {
|
|
3431
|
-
|
|
3440
|
+
bn(a, t, [...n, ...dt(i)]);
|
|
3432
3441
|
}), t(s, n);
|
|
3433
3442
|
}
|
|
3434
|
-
function
|
|
3435
|
-
return
|
|
3436
|
-
e =
|
|
3443
|
+
function Yl(e, t, n) {
|
|
3444
|
+
return bn(t, (s, r) => {
|
|
3445
|
+
e = In(e, r, (a) => Wl(a, s, n));
|
|
3437
3446
|
}), e;
|
|
3438
3447
|
}
|
|
3439
|
-
function
|
|
3448
|
+
function Jl(e, t) {
|
|
3440
3449
|
function n(s, r) {
|
|
3441
|
-
const a =
|
|
3450
|
+
const a = jl(e, dt(r));
|
|
3442
3451
|
s.map(dt).forEach((i) => {
|
|
3443
|
-
e =
|
|
3452
|
+
e = In(e, i, () => a);
|
|
3444
3453
|
});
|
|
3445
3454
|
}
|
|
3446
3455
|
if (Ne(t)) {
|
|
3447
3456
|
const [s, r] = t;
|
|
3448
3457
|
s.forEach((a) => {
|
|
3449
|
-
e =
|
|
3458
|
+
e = In(e, dt(a), () => e);
|
|
3450
3459
|
}), r && ot(r, n);
|
|
3451
3460
|
} else
|
|
3452
3461
|
ot(t, n);
|
|
3453
3462
|
return e;
|
|
3454
3463
|
}
|
|
3455
|
-
var
|
|
3456
|
-
function
|
|
3464
|
+
var Zl = (e, t) => mt(e) || Ne(e) || Et(e) || pt(e) || _r(e, t);
|
|
3465
|
+
function Xl(e, t, n) {
|
|
3457
3466
|
const s = n.get(e);
|
|
3458
3467
|
s ? s.push(t) : n.set(e, [t]);
|
|
3459
3468
|
}
|
|
3460
|
-
function
|
|
3469
|
+
function ec(e, t) {
|
|
3461
3470
|
const n = {};
|
|
3462
3471
|
let s;
|
|
3463
3472
|
return e.forEach((r) => {
|
|
@@ -3468,18 +3477,18 @@ function Xl(e, t) {
|
|
|
3468
3477
|
a.length === 0 ? s = i.map(pn) : n[pn(a)] = i.map(pn);
|
|
3469
3478
|
}), s ? vn(n) ? [s] : [s, n] : vn(n) ? void 0 : n;
|
|
3470
3479
|
}
|
|
3471
|
-
var
|
|
3472
|
-
const o =
|
|
3480
|
+
var br = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
3481
|
+
const o = Kl(e);
|
|
3473
3482
|
if (!o) {
|
|
3474
|
-
|
|
3483
|
+
Xl(e, r, t);
|
|
3475
3484
|
const h = i.get(e);
|
|
3476
3485
|
if (h)
|
|
3477
3486
|
return s ? {
|
|
3478
3487
|
transformedValue: null
|
|
3479
3488
|
} : h;
|
|
3480
3489
|
}
|
|
3481
|
-
if (!
|
|
3482
|
-
const h =
|
|
3490
|
+
if (!Zl(e, n)) {
|
|
3491
|
+
const h = ms(e, n), p = h ? {
|
|
3483
3492
|
transformedValue: h.value,
|
|
3484
3493
|
annotations: [h.type]
|
|
3485
3494
|
} : {
|
|
@@ -3491,11 +3500,11 @@ var Ir = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3491
3500
|
return {
|
|
3492
3501
|
transformedValue: null
|
|
3493
3502
|
};
|
|
3494
|
-
const l =
|
|
3503
|
+
const l = ms(e, n), f = (l == null ? void 0 : l.value) ?? e, d = Ne(f) ? [] : {}, u = {};
|
|
3495
3504
|
ot(f, (h, p) => {
|
|
3496
3505
|
if (p === "__proto__" || p === "constructor" || p === "prototype")
|
|
3497
3506
|
throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3498
|
-
const T =
|
|
3507
|
+
const T = br(h, t, n, s, [...r, p], [...a, e], i);
|
|
3499
3508
|
d[p] = T.transformedValue, Ne(T.annotations) ? u[p] = T.annotations : mt(T.annotations) && ot(T.annotations, (S, x) => {
|
|
3500
3509
|
u[yr(p) + "." + x] = S;
|
|
3501
3510
|
});
|
|
@@ -3512,16 +3521,16 @@ var Ir = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3512
3521
|
function Nr(e) {
|
|
3513
3522
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
3514
3523
|
}
|
|
3515
|
-
function
|
|
3524
|
+
function Es(e) {
|
|
3516
3525
|
return Nr(e) === "Array";
|
|
3517
3526
|
}
|
|
3518
|
-
function
|
|
3527
|
+
function tc(e) {
|
|
3519
3528
|
if (Nr(e) !== "Object")
|
|
3520
3529
|
return !1;
|
|
3521
3530
|
const t = Object.getPrototypeOf(e);
|
|
3522
3531
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
3523
3532
|
}
|
|
3524
|
-
function
|
|
3533
|
+
function nc(e, t, n, s, r) {
|
|
3525
3534
|
const a = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
|
|
3526
3535
|
a === "enumerable" && (e[t] = n), r && a === "nonenumerable" && Object.defineProperty(e, t, {
|
|
3527
3536
|
value: n,
|
|
@@ -3531,16 +3540,16 @@ function tc(e, t, n, s, r) {
|
|
|
3531
3540
|
});
|
|
3532
3541
|
}
|
|
3533
3542
|
function Nn(e, t = {}) {
|
|
3534
|
-
if (
|
|
3543
|
+
if (Es(e))
|
|
3535
3544
|
return e.map((r) => Nn(r, t));
|
|
3536
|
-
if (!
|
|
3545
|
+
if (!tc(e))
|
|
3537
3546
|
return e;
|
|
3538
3547
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
3539
3548
|
return [...n, ...s].reduce((r, a) => {
|
|
3540
|
-
if (
|
|
3549
|
+
if (Es(t.props) && !t.props.includes(a))
|
|
3541
3550
|
return r;
|
|
3542
3551
|
const i = e[a], o = Nn(i, t);
|
|
3543
|
-
return
|
|
3552
|
+
return nc(r, a, o, e, t.nonenumerable), r;
|
|
3544
3553
|
}, {});
|
|
3545
3554
|
}
|
|
3546
3555
|
var k = class {
|
|
@@ -3548,17 +3557,17 @@ var k = class {
|
|
|
3548
3557
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
3549
3558
|
*/
|
|
3550
3559
|
constructor({ dedupe: e = !1 } = {}) {
|
|
3551
|
-
this.classRegistry = new
|
|
3560
|
+
this.classRegistry = new Ll(), this.symbolRegistry = new mr((t) => t.description ?? ""), this.customTransformerRegistry = new Ol(), this.allowedErrorProps = [], this.dedupe = e;
|
|
3552
3561
|
}
|
|
3553
3562
|
serialize(e) {
|
|
3554
|
-
const t = /* @__PURE__ */ new Map(), n =
|
|
3563
|
+
const t = /* @__PURE__ */ new Map(), n = br(e, t, this, this.dedupe), s = {
|
|
3555
3564
|
json: n.transformedValue
|
|
3556
3565
|
};
|
|
3557
3566
|
n.annotations && (s.meta = {
|
|
3558
3567
|
...s.meta,
|
|
3559
3568
|
values: n.annotations
|
|
3560
3569
|
});
|
|
3561
|
-
const r =
|
|
3570
|
+
const r = ec(t, this.dedupe);
|
|
3562
3571
|
return r && (s.meta = {
|
|
3563
3572
|
...s.meta,
|
|
3564
3573
|
referentialEqualities: r
|
|
@@ -3567,7 +3576,7 @@ var k = class {
|
|
|
3567
3576
|
deserialize(e) {
|
|
3568
3577
|
const { json: t, meta: n } = e;
|
|
3569
3578
|
let s = Nn(t);
|
|
3570
|
-
return n != null && n.values && (s =
|
|
3579
|
+
return n != null && n.values && (s = Yl(s, n.values, this)), n != null && n.referentialEqualities && (s = Jl(s, n.referentialEqualities)), s;
|
|
3571
3580
|
}
|
|
3572
3581
|
stringify(e) {
|
|
3573
3582
|
return JSON.stringify(this.serialize(e));
|
|
@@ -3600,44 +3609,44 @@ k.registerClass = k.defaultInstance.registerClass.bind(k.defaultInstance);
|
|
|
3600
3609
|
k.registerSymbol = k.defaultInstance.registerSymbol.bind(k.defaultInstance);
|
|
3601
3610
|
k.registerCustom = k.defaultInstance.registerCustom.bind(k.defaultInstance);
|
|
3602
3611
|
k.allowErrorProps = k.defaultInstance.allowErrorProps.bind(k.defaultInstance);
|
|
3603
|
-
var
|
|
3604
|
-
function
|
|
3612
|
+
var sc = k.serialize, Lu = k.stringify;
|
|
3613
|
+
function Cu(e) {
|
|
3605
3614
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
3606
3615
|
}
|
|
3607
|
-
function
|
|
3616
|
+
function Gu(e, t) {
|
|
3608
3617
|
return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
3609
3618
|
}
|
|
3610
|
-
function
|
|
3619
|
+
function Ou({
|
|
3611
3620
|
queryState: e,
|
|
3612
3621
|
observerCount: t,
|
|
3613
3622
|
isStale: n
|
|
3614
3623
|
}) {
|
|
3615
3624
|
return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
|
|
3616
3625
|
}
|
|
3617
|
-
function
|
|
3626
|
+
function xu({
|
|
3618
3627
|
status: e,
|
|
3619
3628
|
isPaused: t
|
|
3620
3629
|
}) {
|
|
3621
3630
|
return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
|
|
3622
3631
|
}
|
|
3623
|
-
function
|
|
3632
|
+
function Du(e) {
|
|
3624
3633
|
return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
|
|
3625
3634
|
}
|
|
3626
|
-
var
|
|
3635
|
+
var ku = (e, t = !1) => {
|
|
3627
3636
|
const {
|
|
3628
3637
|
json: n
|
|
3629
|
-
} =
|
|
3638
|
+
} = sc(e);
|
|
3630
3639
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
3631
|
-
}, Mt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3,
|
|
3632
|
-
status: rc,
|
|
3633
|
-
"query hash": sc,
|
|
3634
|
-
"last updated": Lr
|
|
3635
|
-
}, Bt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Cr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, ac = (e, t) => Bt(e) === Bt(t) ? Cr(e, t) : Bt(e) > Bt(t) ? 1 : -1, Ru = {
|
|
3640
|
+
}, Mt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, rc = (e, t) => e.queryHash.localeCompare(t.queryHash), Lr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, ac = (e, t) => Mt(e) === Mt(t) ? Lr(e, t) : Mt(e) > Mt(t) ? 1 : -1, Ru = {
|
|
3636
3641
|
status: ac,
|
|
3642
|
+
"query hash": rc,
|
|
3643
|
+
"last updated": Lr
|
|
3644
|
+
}, Bt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Cr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, ic = (e, t) => Bt(e) === Bt(t) ? Cr(e, t) : Bt(e) > Bt(t) ? 1 : -1, Uu = {
|
|
3645
|
+
status: ic,
|
|
3637
3646
|
"last updated": Cr
|
|
3638
|
-
},
|
|
3647
|
+
}, Mu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Bu = () => {
|
|
3639
3648
|
const [e, t] = F("dark");
|
|
3640
|
-
return
|
|
3649
|
+
return qo(() => {
|
|
3641
3650
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3642
3651
|
t(n.matches ? "dark" : "light");
|
|
3643
3652
|
const s = (r) => {
|
|
@@ -3709,7 +3718,7 @@ var Du = (e, t = !1) => {
|
|
|
3709
3718
|
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
|
|
3710
3719
|
const s = document.createElement("style"), r = document.createTextNode("");
|
|
3711
3720
|
s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
3712
|
-
}, qe, yt, At, Tt, Oe, St, $e, Qe, ze, We, je, _t, Ye, Je, Pt,
|
|
3721
|
+
}, qe, yt, At, Tt, Oe, St, $e, Qe, ze, We, je, _t, Ye, Je, Pt, Ts, oc = (Ts = class {
|
|
3713
3722
|
constructor(e) {
|
|
3714
3723
|
O(this, qe);
|
|
3715
3724
|
O(this, yt);
|
|
@@ -3766,7 +3775,7 @@ var Du = (e, t = !1) => {
|
|
|
3766
3775
|
const t = fr(() => {
|
|
3767
3776
|
const n = this, [s] = A(this, Qe), [r] = A(this, ze), [a] = A(this, We), [i] = A(this, je), [o] = A(this, _t), [l] = A(this, qe), [f] = A(this, Je);
|
|
3768
3777
|
let d;
|
|
3769
|
-
return A(this, Ye) ? d = A(this, Ye) : (d = ur(() => import("./WDYDFRGG-
|
|
3778
|
+
return A(this, Ye) ? d = A(this, Ye) : (d = ur(() => import("./WDYDFRGG-Yi0eNS2V.js")), C(this, Ye, d)), Gr(A(this, St), A(this, $e)), lr(d, cr({
|
|
3770
3779
|
get queryFlavor() {
|
|
3771
3780
|
return A(n, At);
|
|
3772
3781
|
},
|
|
@@ -3811,14 +3820,14 @@ var Du = (e, t = !1) => {
|
|
|
3811
3820
|
throw new Error("Devtools is not mounted");
|
|
3812
3821
|
(e = A(this, Pt)) == null || e.call(this), C(this, Oe, !1);
|
|
3813
3822
|
}
|
|
3814
|
-
}, qe = new WeakMap(), yt = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), Oe = new WeakMap(), St = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), ze = new WeakMap(), We = new WeakMap(), je = new WeakMap(), _t = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Pt = new WeakMap(),
|
|
3823
|
+
}, qe = new WeakMap(), yt = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), Oe = new WeakMap(), St = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), ze = new WeakMap(), We = new WeakMap(), je = new WeakMap(), _t = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Pt = new WeakMap(), Ts), Ze, wt, vt, It, xe, bt, Xe, et, tt, nt, st, Nt, rt, at, it, Lt, Ss, lc = (Ss = class {
|
|
3815
3824
|
constructor(e) {
|
|
3816
3825
|
O(this, Ze);
|
|
3817
3826
|
O(this, wt);
|
|
3818
3827
|
O(this, vt);
|
|
3819
|
-
O(this, bt);
|
|
3820
|
-
O(this, xe, !1);
|
|
3821
3828
|
O(this, It);
|
|
3829
|
+
O(this, xe, !1);
|
|
3830
|
+
O(this, bt);
|
|
3822
3831
|
O(this, Xe);
|
|
3823
3832
|
O(this, et);
|
|
3824
3833
|
O(this, tt);
|
|
@@ -3844,7 +3853,7 @@ var Du = (e, t = !1) => {
|
|
|
3844
3853
|
hideDisabledQueries: g,
|
|
3845
3854
|
theme: h
|
|
3846
3855
|
} = e;
|
|
3847
|
-
C(this, Ze, F(t)), C(this, vt, n), C(this,
|
|
3856
|
+
C(this, Ze, F(t)), C(this, vt, n), C(this, It, s), C(this, wt, r), C(this, bt, f), C(this, Xe, d), C(this, et, F(a)), C(this, tt, F(i)), C(this, nt, F(o)), C(this, st, F(l)), C(this, Nt, F(g)), C(this, rt, F(u)), C(this, it, F(h));
|
|
3848
3857
|
}
|
|
3849
3858
|
setButtonPosition(e) {
|
|
3850
3859
|
A(this, et)[1](e);
|
|
@@ -3873,12 +3882,12 @@ var Du = (e, t = !1) => {
|
|
|
3873
3882
|
const t = fr(() => {
|
|
3874
3883
|
const n = this, [s] = A(this, et), [r] = A(this, tt), [a] = A(this, nt), [i] = A(this, st), [o] = A(this, Nt), [l] = A(this, Ze), [f] = A(this, rt), [d] = A(this, it);
|
|
3875
3884
|
let u;
|
|
3876
|
-
return A(this, at) ? u = A(this, at) : (u = ur(() => import("./2SSKDMRQ-
|
|
3885
|
+
return A(this, at) ? u = A(this, at) : (u = ur(() => import("./2SSKDMRQ-hL7THuKW.js")), C(this, at, u)), Gr(A(this, bt), A(this, Xe)), lr(u, cr({
|
|
3877
3886
|
get queryFlavor() {
|
|
3878
3887
|
return A(n, vt);
|
|
3879
3888
|
},
|
|
3880
3889
|
get version() {
|
|
3881
|
-
return A(n,
|
|
3890
|
+
return A(n, It);
|
|
3882
3891
|
},
|
|
3883
3892
|
get onlineManager() {
|
|
3884
3893
|
return A(n, wt);
|
|
@@ -3921,8 +3930,8 @@ var Du = (e, t = !1) => {
|
|
|
3921
3930
|
throw new Error("Devtools is not mounted");
|
|
3922
3931
|
(e = A(this, Lt)) == null || e.call(this), C(this, xe, !1);
|
|
3923
3932
|
}
|
|
3924
|
-
}, Ze = new WeakMap(), wt = new WeakMap(), vt = new WeakMap(),
|
|
3925
|
-
function
|
|
3933
|
+
}, Ze = new WeakMap(), wt = new WeakMap(), vt = new WeakMap(), It = new WeakMap(), xe = new WeakMap(), bt = new WeakMap(), Xe = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), Nt = new WeakMap(), rt = new WeakMap(), at = new WeakMap(), it = new WeakMap(), Lt = new WeakMap(), Ss);
|
|
3934
|
+
function cc(e) {
|
|
3926
3935
|
const t = J(e.client), n = $.useRef(null), {
|
|
3927
3936
|
buttonPosition: s,
|
|
3928
3937
|
position: r,
|
|
@@ -3933,7 +3942,7 @@ function lc(e) {
|
|
|
3933
3942
|
hideDisabledQueries: f,
|
|
3934
3943
|
theme: d
|
|
3935
3944
|
} = e, [u] = $.useState(
|
|
3936
|
-
new
|
|
3945
|
+
new oc({
|
|
3937
3946
|
client: t,
|
|
3938
3947
|
queryFlavor: "React Query",
|
|
3939
3948
|
version: "5",
|
|
@@ -3964,7 +3973,7 @@ function lc(e) {
|
|
|
3964
3973
|
u.unmount();
|
|
3965
3974
|
}), [u]), /* @__PURE__ */ c("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
|
|
3966
3975
|
}
|
|
3967
|
-
function
|
|
3976
|
+
function uc(e) {
|
|
3968
3977
|
const t = J(e.client), n = $.useRef(null), {
|
|
3969
3978
|
errorTypes: s,
|
|
3970
3979
|
styleNonce: r,
|
|
@@ -3972,7 +3981,7 @@ function cc(e) {
|
|
|
3972
3981
|
hideDisabledQueries: i,
|
|
3973
3982
|
theme: o
|
|
3974
3983
|
} = e, [l] = $.useState(
|
|
3975
|
-
new
|
|
3984
|
+
new lc({
|
|
3976
3985
|
client: t,
|
|
3977
3986
|
queryFlavor: "React Query",
|
|
3978
3987
|
version: "5",
|
|
@@ -4008,25 +4017,25 @@ function cc(e) {
|
|
|
4008
4017
|
}
|
|
4009
4018
|
);
|
|
4010
4019
|
}
|
|
4011
|
-
var
|
|
4020
|
+
var ps = process.env.NODE_ENV !== "development" ? function() {
|
|
4012
4021
|
return null;
|
|
4013
|
-
} :
|
|
4022
|
+
} : cc;
|
|
4014
4023
|
process.env.NODE_ENV;
|
|
4015
|
-
const
|
|
4016
|
-
|
|
4024
|
+
const dc = Ee(""), fc = () => {
|
|
4025
|
+
Yn("dynamic-page-selector", {
|
|
4017
4026
|
description: "Dynamic page selector"
|
|
4018
|
-
}),
|
|
4027
|
+
}), Yn("enable-add-page-dropdown", {
|
|
4019
4028
|
description: "Enable add page dropdown"
|
|
4020
4029
|
});
|
|
4021
|
-
},
|
|
4022
|
-
const e =
|
|
4030
|
+
}, hc = () => {
|
|
4031
|
+
const e = I(), t = b();
|
|
4023
4032
|
return re({
|
|
4024
4033
|
queryKey: [E.GET_COLLECTIONS],
|
|
4025
4034
|
staleTime: 1 / 0,
|
|
4026
4035
|
queryFn: async () => t(e, { action: E.GET_COLLECTIONS })
|
|
4027
4036
|
});
|
|
4028
|
-
},
|
|
4029
|
-
const { data: e } = oe(), { data: t } = Le(), { data: n } = Be(), s =
|
|
4037
|
+
}, gc = () => {
|
|
4038
|
+
const { data: e } = oe(), { data: t } = Le(), { data: n } = Be(), s = I(), r = b(), a = q(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]), i = be(/* @__PURE__ */ new Map());
|
|
4030
4039
|
return Y({
|
|
4031
4040
|
mutationFn: async ({ block: o }) => {
|
|
4032
4041
|
const l = o._id, f = (t == null ? void 0 : t.lang) || a, d = `${l}:${f}`;
|
|
@@ -4056,7 +4065,7 @@ const uc = Ee(""), dc = () => {
|
|
|
4056
4065
|
}), u;
|
|
4057
4066
|
}
|
|
4058
4067
|
});
|
|
4059
|
-
},
|
|
4068
|
+
}, mc = () => {
|
|
4060
4069
|
const [, e] = ve();
|
|
4061
4070
|
return z(
|
|
4062
4071
|
(t, n) => {
|
|
@@ -4065,41 +4074,43 @@ const uc = Ee(""), dc = () => {
|
|
|
4065
4074
|
},
|
|
4066
4075
|
[e]
|
|
4067
4076
|
);
|
|
4068
|
-
},
|
|
4069
|
-
const e =
|
|
4077
|
+
}, Ec = () => {
|
|
4078
|
+
const e = mc();
|
|
4070
4079
|
return z(
|
|
4071
4080
|
({ pageId: t }) => {
|
|
4072
4081
|
e(t);
|
|
4073
4082
|
},
|
|
4074
4083
|
[e]
|
|
4075
4084
|
);
|
|
4076
|
-
},
|
|
4085
|
+
}, pc = {
|
|
4077
4086
|
SITE_WIDE_USAGE: "SITE_WIDE_USAGE"
|
|
4078
|
-
},
|
|
4079
|
-
const t =
|
|
4087
|
+
}, yc = (e) => {
|
|
4088
|
+
const t = b(), n = I();
|
|
4080
4089
|
return re({
|
|
4081
|
-
queryKey: [
|
|
4090
|
+
queryKey: [pc.SITE_WIDE_USAGE],
|
|
4082
4091
|
queryFn: async () => e ? t(n, { action: "GET_SITE_WIDE_USAGE" }) : {},
|
|
4083
4092
|
retry: !1
|
|
4084
4093
|
});
|
|
4085
|
-
},
|
|
4086
|
-
() => import("./no-language-page-dialog-
|
|
4087
|
-
),
|
|
4088
|
-
|
|
4094
|
+
}, Ac = V(() => import("./page-lock-CRFyqKZE.js")), Tc = V(
|
|
4095
|
+
() => import("./no-language-page-dialog-BpPqmw9a.js")
|
|
4096
|
+
), Sc = V(() => import("./digital-asset-manager-Cz3Nlrzl.js")), _c = V(() => import("./save-to-lib-MtWKSVeN.js")), Pc = V(() => import("./theme-panel-footer-DvwsyHNQ.js")), wc = V(() => import("./web-preview-h39D3TUh.js"));
|
|
4097
|
+
fc();
|
|
4089
4098
|
oi();
|
|
4090
4099
|
ma(go);
|
|
4091
|
-
|
|
4092
|
-
ha(
|
|
4093
|
-
ga(
|
|
4094
|
-
const
|
|
4100
|
+
Mo();
|
|
4101
|
+
ha(Sc);
|
|
4102
|
+
ga(_c);
|
|
4103
|
+
const vc = {
|
|
4095
4104
|
role: "",
|
|
4096
4105
|
permissions: null
|
|
4097
|
-
},
|
|
4098
|
-
var
|
|
4099
|
-
const { data: t } = So(), n =
|
|
4106
|
+
}, ys = (e) => {
|
|
4107
|
+
var qn;
|
|
4108
|
+
const { data: t } = So(), n = Bn(), { data: s = vc, isFetching: r } = Po(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: l } = hc(), { data: f, isFetching: d } = Be(), u = r || i || l || d;
|
|
4109
|
+
_o();
|
|
4110
|
+
const [g] = ve(), h = g.get("page"), { data: p } = oe(), { data: T, isFetching: S } = yo(), { blocks: x } = po(T), { data: y, isFetching: w } = Ao(), { pageStatus: v } = ye(), U = mo(), { onSave: N } = wo(), { mutateAsync: Ae } = gc(), { getPartialBlocks: Te, getPartialBlockBlocks: B } = vo(), { mutateAsync: P } = Ti(), { mutateAsync: L } = To(), { data: W } = yc(((qn = e.flags) == null ? void 0 : qn.designTokens) ?? !1), Q = Ec(), [ue, Gt] = K(!1), Se = be([]), Ke = q(() => H(f, "theme", {}) || {}, [f]), Ge = v === te.EDITING, Or = v === te.CHECKING, Vn = S || Or || w;
|
|
4100
4111
|
Se.current = x;
|
|
4101
|
-
const [xr] = pe(
|
|
4102
|
-
|
|
4112
|
+
const [xr] = pe(dc);
|
|
4113
|
+
ne(() => {
|
|
4103
4114
|
const ae = () => {
|
|
4104
4115
|
document.hidden ? Gt(!0) : Gt(!1);
|
|
4105
4116
|
};
|
|
@@ -4108,24 +4119,24 @@ const wc = {
|
|
|
4108
4119
|
const Dr = q(() => {
|
|
4109
4120
|
const ae = {};
|
|
4110
4121
|
return s && (ae.permissions = H(s, "permissions", null), ae.role = H(s, "role", "user")), ae;
|
|
4111
|
-
}, [s]),
|
|
4122
|
+
}, [s]), Hn = q(() => t == null ? void 0 : t.some((ae) => ae.isSiteLibrary), [t]), kr = z(
|
|
4112
4123
|
async (ae, Ot) => await P({ pageType: ae, query: Ot }),
|
|
4113
4124
|
[P]
|
|
4114
4125
|
);
|
|
4115
4126
|
return /* @__PURE__ */ m(he, { children: [
|
|
4116
|
-
|
|
4127
|
+
Vn && /* @__PURE__ */ c(Hs, { className: u ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ c($t, { className: `animate-spin text-primary ${u ? "h-6 w-6" : "h-5 w-5"}` }) }),
|
|
4117
4128
|
xr && /* @__PURE__ */ c(
|
|
4118
4129
|
X,
|
|
4119
4130
|
{
|
|
4120
4131
|
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($t, { className: "h-6 w-6 animate-spin text-primary" }) }),
|
|
4121
|
-
children: /* @__PURE__ */ c(
|
|
4132
|
+
children: /* @__PURE__ */ c(wc, {})
|
|
4122
4133
|
}
|
|
4123
4134
|
),
|
|
4124
4135
|
/* @__PURE__ */ c(
|
|
4125
4136
|
sa,
|
|
4126
4137
|
{
|
|
4127
4138
|
siteWideUsage: W ?? {},
|
|
4128
|
-
flags: e.flags ? { ...e.flags, librarySite:
|
|
4139
|
+
flags: e.flags ? { ...e.flags, librarySite: Hn } : { librarySite: Hn },
|
|
4129
4140
|
gotoPage: Q,
|
|
4130
4141
|
collections: o ?? [],
|
|
4131
4142
|
getBlockAsyncProps: Ae,
|
|
@@ -4150,22 +4161,22 @@ const wc = {
|
|
|
4150
4161
|
pageTypes: a,
|
|
4151
4162
|
searchPageTypeItems: kr,
|
|
4152
4163
|
askAiCallBack: U,
|
|
4153
|
-
onSave: async ({ blocks: ae, theme: Ot, needTranslations: Rr, designTokens:
|
|
4164
|
+
onSave: async ({ blocks: ae, theme: Ot, needTranslations: Rr, designTokens: $n }) => {
|
|
4154
4165
|
if (!h) return !0;
|
|
4155
4166
|
Se.current = ae;
|
|
4156
|
-
const
|
|
4157
|
-
await N({ page: h, blocks:
|
|
4167
|
+
const Qn = [...ae];
|
|
4168
|
+
await N({ page: h, blocks: Qn, needTranslations: Rr }), Se.current = Qn;
|
|
4158
4169
|
const xt = {};
|
|
4159
|
-
return
|
|
4170
|
+
return Zn(Ot, Ke) || (xt.theme = Ot), Zn($n, f == null ? void 0 : f.designTokens) || (xt.designTokens = $n), fe(xt) || await L({ settings: xt }), !0;
|
|
4160
4171
|
},
|
|
4161
|
-
themePanelComponent:
|
|
4172
|
+
themePanelComponent: Pc,
|
|
4162
4173
|
...Dr,
|
|
4163
|
-
children: /* @__PURE__ */ c(
|
|
4174
|
+
children: /* @__PURE__ */ c(Ac, { isFetchingPageData: Vn })
|
|
4164
4175
|
}
|
|
4165
4176
|
),
|
|
4166
|
-
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
|
|
4177
|
+
/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(Tc, {}) })
|
|
4167
4178
|
] });
|
|
4168
|
-
},
|
|
4179
|
+
}, Ic = new xa({
|
|
4169
4180
|
defaultOptions: {
|
|
4170
4181
|
queries: {
|
|
4171
4182
|
refetchOnWindowFocus: !1,
|
|
@@ -4173,10 +4184,10 @@ const wc = {
|
|
|
4173
4184
|
refetchOnMount: !1
|
|
4174
4185
|
}
|
|
4175
4186
|
}
|
|
4176
|
-
}),
|
|
4177
|
-
const [, t] =
|
|
4178
|
-
return
|
|
4179
|
-
|
|
4187
|
+
}), Fu = (e) => {
|
|
4188
|
+
const [, t] = kn(), [n, s] = K(!1);
|
|
4189
|
+
return ne(() => (t(
|
|
4190
|
+
Dn(e, [
|
|
4180
4191
|
"apiUrl",
|
|
4181
4192
|
"usersApiUrl",
|
|
4182
4193
|
"assetsApiUrl",
|
|
@@ -4195,14 +4206,14 @@ const wc = {
|
|
|
4195
4206
|
}, 200), () => {
|
|
4196
4207
|
s(!1), t({});
|
|
4197
4208
|
}), [e, t]), n ? H(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(he, { children: [
|
|
4198
|
-
/* @__PURE__ */ c(
|
|
4199
|
-
/* @__PURE__ */ c(
|
|
4200
|
-
] }) : /* @__PURE__ */ m(Da, { client:
|
|
4201
|
-
/* @__PURE__ */ c(
|
|
4202
|
-
/* @__PURE__ */ c(
|
|
4209
|
+
/* @__PURE__ */ c(ys, { ...e }),
|
|
4210
|
+
/* @__PURE__ */ c(ps, {})
|
|
4211
|
+
] }) : /* @__PURE__ */ m(Da, { client: Ic, children: [
|
|
4212
|
+
/* @__PURE__ */ c(ys, { ...e }),
|
|
4213
|
+
/* @__PURE__ */ c(ps, {})
|
|
4203
4214
|
] }) : /* @__PURE__ */ c("div", {});
|
|
4204
|
-
}, bc = $.lazy(() => import("./nested-path-selector-content-
|
|
4205
|
-
function
|
|
4215
|
+
}, bc = $.lazy(() => import("./nested-path-selector-content-kGznHufl.js"));
|
|
4216
|
+
function Nc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
4206
4217
|
const [r, a] = $.useState(!1);
|
|
4207
4218
|
return /* @__PURE__ */ m(ra, { open: r, onOpenChange: a, children: [
|
|
4208
4219
|
/* @__PURE__ */ m(en, { children: [
|
|
@@ -4241,18 +4252,18 @@ function Ic({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4241
4252
|
) })
|
|
4242
4253
|
] });
|
|
4243
4254
|
}
|
|
4244
|
-
const
|
|
4255
|
+
const Ku = () => {
|
|
4245
4256
|
const { savePageAsync: e } = Re(), t = J(), { isLocked: n } = ye();
|
|
4246
4257
|
return z(async () => {
|
|
4247
4258
|
n || await e(), t.invalidateQueries({ queryKey: [E.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [E.GET_BUILDER_PAGE_DATA] });
|
|
4248
4259
|
}, [e, t, n]);
|
|
4249
|
-
},
|
|
4260
|
+
}, Vu = () => {
|
|
4250
4261
|
const e = J();
|
|
4251
4262
|
return z(() => {
|
|
4252
4263
|
e.clear();
|
|
4253
4264
|
}, [e]);
|
|
4254
|
-
},
|
|
4255
|
-
const e =
|
|
4265
|
+
}, Hu = () => {
|
|
4266
|
+
const e = I(), t = b(), { data: n } = Le(), s = J();
|
|
4256
4267
|
return Y({
|
|
4257
4268
|
mutationFn: async (r) => {
|
|
4258
4269
|
if (!(n != null && n.id))
|
|
@@ -4276,7 +4287,7 @@ const Fu = () => {
|
|
|
4276
4287
|
console.error("Failed to update metadata");
|
|
4277
4288
|
}
|
|
4278
4289
|
});
|
|
4279
|
-
},
|
|
4290
|
+
}, Lc = V(() => import("./digital-asset-manager-Cz3Nlrzl.js")), qu = ({
|
|
4280
4291
|
assetId: e,
|
|
4281
4292
|
assetUrl: t,
|
|
4282
4293
|
onChange: n,
|
|
@@ -4290,7 +4301,7 @@ const Fu = () => {
|
|
|
4290
4301
|
l(!1);
|
|
4291
4302
|
}, u = (p) => {
|
|
4292
4303
|
const T = Array.isArray(p) ? p[0] : p;
|
|
4293
|
-
T != null && T.url && n(
|
|
4304
|
+
T != null && T.url && n(Dn(T, ["url", "id"])), l(!1);
|
|
4294
4305
|
}, g = () => {
|
|
4295
4306
|
n({ url: "", id: "" });
|
|
4296
4307
|
}, h = (t == null ? void 0 : t.startsWith("{{")) && (t == null ? void 0 : t.endsWith("}}"));
|
|
@@ -4315,7 +4326,7 @@ const Fu = () => {
|
|
|
4315
4326
|
className: "h-8 w-8 rounded-full bg-white text-red-500",
|
|
4316
4327
|
onClick: g,
|
|
4317
4328
|
disabled: a,
|
|
4318
|
-
children: h ? /* @__PURE__ */ c(
|
|
4329
|
+
children: h ? /* @__PURE__ */ c(as, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Za, { className: "h-4 w-4" })
|
|
4319
4330
|
}
|
|
4320
4331
|
),
|
|
4321
4332
|
!h && /* @__PURE__ */ c(
|
|
@@ -4327,7 +4338,7 @@ const Fu = () => {
|
|
|
4327
4338
|
className: "h-8 w-8 rounded-full bg-white/80 hover:bg-white/90",
|
|
4328
4339
|
onClick: f,
|
|
4329
4340
|
disabled: a,
|
|
4330
|
-
children: /* @__PURE__ */ c(
|
|
4341
|
+
children: /* @__PURE__ */ c(is, { className: "h-4 w-4" })
|
|
4331
4342
|
}
|
|
4332
4343
|
)
|
|
4333
4344
|
] })
|
|
@@ -4337,12 +4348,12 @@ const Fu = () => {
|
|
|
4337
4348
|
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"}`,
|
|
4338
4349
|
onClick: f,
|
|
4339
4350
|
children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center gap-2", children: [
|
|
4340
|
-
/* @__PURE__ */ c(
|
|
4351
|
+
/* @__PURE__ */ c(is, { className: "h-10 w-10 text-gray-400" }),
|
|
4341
4352
|
/* @__PURE__ */ c("p", { className: "text-sm text-gray-500", children: r })
|
|
4342
4353
|
] })
|
|
4343
4354
|
}
|
|
4344
4355
|
),
|
|
4345
|
-
/* @__PURE__ */ c(
|
|
4356
|
+
/* @__PURE__ */ c(Is, { open: o, onOpenChange: l, children: /* @__PURE__ */ m(ia, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
|
|
4346
4357
|
/* @__PURE__ */ m(oa, { className: "hidden border-b px-4 py-2", children: [
|
|
4347
4358
|
/* @__PURE__ */ c(la, { children: i("Select Image") }),
|
|
4348
4359
|
/* @__PURE__ */ c(
|
|
@@ -4353,12 +4364,12 @@ const Fu = () => {
|
|
|
4353
4364
|
size: "icon",
|
|
4354
4365
|
className: "absolute right-4 top-2",
|
|
4355
4366
|
onClick: d,
|
|
4356
|
-
children: /* @__PURE__ */ c(
|
|
4367
|
+
children: /* @__PURE__ */ c(as, { className: "h-4 w-4" })
|
|
4357
4368
|
}
|
|
4358
4369
|
)
|
|
4359
4370
|
] }),
|
|
4360
4371
|
/* @__PURE__ */ c("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
4361
|
-
|
|
4372
|
+
Lc,
|
|
4362
4373
|
{
|
|
4363
4374
|
close: d,
|
|
4364
4375
|
onSelect: u,
|
|
@@ -4368,7 +4379,7 @@ const Fu = () => {
|
|
|
4368
4379
|
) }) })
|
|
4369
4380
|
] }) })
|
|
4370
4381
|
] });
|
|
4371
|
-
},
|
|
4382
|
+
}, Cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), As = (e) => {
|
|
4372
4383
|
if (!e.trim())
|
|
4373
4384
|
return { isValid: !1, parsed: null, placeholders: [], error: { message: "JSON is empty" } };
|
|
4374
4385
|
try {
|
|
@@ -4403,13 +4414,13 @@ const Fu = () => {
|
|
|
4403
4414
|
}
|
|
4404
4415
|
};
|
|
4405
4416
|
}
|
|
4406
|
-
},
|
|
4417
|
+
}, Gc = (e, t) => {
|
|
4407
4418
|
let s = JSON.stringify(e, null, 2);
|
|
4408
4419
|
return t.forEach(({ original: r }, a) => {
|
|
4409
|
-
const i = `"__placeholder_${a}__"`, o = new RegExp(
|
|
4420
|
+
const i = `"__placeholder_${a}__"`, o = new RegExp(Cc(i), "g");
|
|
4410
4421
|
s = s.replace(o, r);
|
|
4411
4422
|
}), s;
|
|
4412
|
-
},
|
|
4423
|
+
}, Oc = (e, t) => {
|
|
4413
4424
|
if (!e) return "";
|
|
4414
4425
|
let n = JSON.stringify(e, null, 2);
|
|
4415
4426
|
const s = /{{([^{}]+)}}/g;
|
|
@@ -4419,7 +4430,7 @@ const Fu = () => {
|
|
|
4419
4430
|
n = n.replace(r[0], i);
|
|
4420
4431
|
}
|
|
4421
4432
|
return n;
|
|
4422
|
-
},
|
|
4433
|
+
}, xc = V(() => import("./shared-json-ld-CXukkDeS.js")), $u = ({
|
|
4423
4434
|
value: e,
|
|
4424
4435
|
onChange: t,
|
|
4425
4436
|
disabled: n = !1,
|
|
@@ -4432,8 +4443,8 @@ const Fu = () => {
|
|
|
4432
4443
|
hasJsonLdForSelectedLang: f,
|
|
4433
4444
|
copyJsonLDFromDefaultPage: d
|
|
4434
4445
|
}) => {
|
|
4435
|
-
const [u, g] = K("edit"), [h, p] = K(null), [T, S] = K(""), x =
|
|
4436
|
-
|
|
4446
|
+
const [u, g] = K("edit"), [h, p] = K(null), [T, S] = K(""), x = be(null), [y] = kn(), w = i === "jsonLD" && H(y, "features.sharedJsonLD", !1), v = i === "jsonLD" && !f && !!d;
|
|
4447
|
+
ne(() => {
|
|
4437
4448
|
e.trim() === "" && t("{}");
|
|
4438
4449
|
}, [e, t]);
|
|
4439
4450
|
const U = (B) => {
|
|
@@ -4468,22 +4479,22 @@ const Fu = () => {
|
|
|
4468
4479
|
}
|
|
4469
4480
|
}
|
|
4470
4481
|
};
|
|
4471
|
-
|
|
4472
|
-
const B =
|
|
4473
|
-
B.isValid ?
|
|
4482
|
+
ne(() => {
|
|
4483
|
+
const B = As(e);
|
|
4484
|
+
B.isValid ? Xn(() => {
|
|
4474
4485
|
if (p(null), B.parsed) {
|
|
4475
|
-
const P =
|
|
4486
|
+
const P = Oc(B.parsed, o);
|
|
4476
4487
|
S(P);
|
|
4477
4488
|
} else
|
|
4478
4489
|
S("");
|
|
4479
|
-
}) :
|
|
4490
|
+
}) : Xn(() => {
|
|
4480
4491
|
p(B.error), S("");
|
|
4481
4492
|
});
|
|
4482
4493
|
}, [e, o]);
|
|
4483
4494
|
const Ae = () => {
|
|
4484
|
-
const B =
|
|
4495
|
+
const B = As(e);
|
|
4485
4496
|
if (B.isValid && B.parsed) {
|
|
4486
|
-
const P =
|
|
4497
|
+
const P = Gc(B.parsed, B.placeholders);
|
|
4487
4498
|
t(P);
|
|
4488
4499
|
}
|
|
4489
4500
|
}, Te = () => {
|
|
@@ -4522,7 +4533,7 @@ const Fu = () => {
|
|
|
4522
4533
|
)
|
|
4523
4534
|
] }),
|
|
4524
4535
|
v ? null : u === "edit" && !s && /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ c(
|
|
4525
|
-
|
|
4536
|
+
Nc,
|
|
4526
4537
|
{
|
|
4527
4538
|
dataType: "value",
|
|
4528
4539
|
data: o ?? {},
|
|
@@ -4531,7 +4542,7 @@ const Fu = () => {
|
|
|
4531
4542
|
) })
|
|
4532
4543
|
] }),
|
|
4533
4544
|
/* @__PURE__ */ m(un, { value: "edit", className: "relative mt-0", children: [
|
|
4534
|
-
!v && u === "edit" && /* @__PURE__ */ c(
|
|
4545
|
+
!v && u === "edit" && /* @__PURE__ */ c(Fn, { content: "Format JSON", side: "right", showTooltip: !n && !h, children: /* @__PURE__ */ c(
|
|
4535
4546
|
M,
|
|
4536
4547
|
{
|
|
4537
4548
|
type: "button",
|
|
@@ -4550,7 +4561,7 @@ const Fu = () => {
|
|
|
4550
4561
|
"Copy & Edit from default language"
|
|
4551
4562
|
] })
|
|
4552
4563
|
] }) }) : /* @__PURE__ */ c(
|
|
4553
|
-
|
|
4564
|
+
jn,
|
|
4554
4565
|
{
|
|
4555
4566
|
ref: x,
|
|
4556
4567
|
id: i,
|
|
@@ -4591,13 +4602,13 @@ const Fu = () => {
|
|
|
4591
4602
|
] })
|
|
4592
4603
|
] }),
|
|
4593
4604
|
/* @__PURE__ */ m(un, { value: "preview", className: "mt-0", children: [
|
|
4594
|
-
/* @__PURE__ */ c(
|
|
4605
|
+
/* @__PURE__ */ c(jn, { rows: a, value: T, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
|
|
4595
4606
|
/* @__PURE__ */ c("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
|
|
4596
4607
|
] }),
|
|
4597
|
-
w && /* @__PURE__ */ c(un, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(
|
|
4608
|
+
w && /* @__PURE__ */ c(un, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(xc, {}) }) })
|
|
4598
4609
|
] }) }) });
|
|
4599
|
-
},
|
|
4600
|
-
const t =
|
|
4610
|
+
}, Qu = (e) => {
|
|
4611
|
+
const t = I(), n = b();
|
|
4601
4612
|
return re({
|
|
4602
4613
|
queryKey: [E.GET_CHAI_USER, e],
|
|
4603
4614
|
queryFn: async () => {
|
|
@@ -4614,93 +4625,93 @@ const Fu = () => {
|
|
|
4614
4625
|
if (typeof window > "u")
|
|
4615
4626
|
throw new Error("@chaibuilder/pages is not available on the server");
|
|
4616
4627
|
export {
|
|
4617
|
-
|
|
4628
|
+
yu as $,
|
|
4618
4629
|
E as A,
|
|
4619
4630
|
Hs as B,
|
|
4620
4631
|
F as C,
|
|
4621
|
-
|
|
4622
|
-
|
|
4632
|
+
qo as D,
|
|
4633
|
+
se as E,
|
|
4623
4634
|
tr as F,
|
|
4624
4635
|
bu as G,
|
|
4625
|
-
|
|
4626
|
-
|
|
4636
|
+
wu as H,
|
|
4637
|
+
vu as I,
|
|
4627
4638
|
Pn as J,
|
|
4628
4639
|
ke as K,
|
|
4629
4640
|
Rt as L,
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4641
|
+
El as M,
|
|
4642
|
+
Iu as N,
|
|
4643
|
+
hl as O,
|
|
4633
4644
|
te as P,
|
|
4634
|
-
|
|
4645
|
+
pu as Q,
|
|
4635
4646
|
ft as R,
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4647
|
+
Su as S,
|
|
4648
|
+
Fn as T,
|
|
4649
|
+
Ru as U,
|
|
4650
|
+
Uu as V,
|
|
4651
|
+
hu as W,
|
|
4641
4652
|
_n as X,
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4653
|
+
Gu as Y,
|
|
4654
|
+
Sl as Z,
|
|
4655
|
+
Mu as _,
|
|
4645
4656
|
ye as a,
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4657
|
+
fu as a0,
|
|
4658
|
+
Cu as a1,
|
|
4659
|
+
xu as a2,
|
|
4660
|
+
Ou as a3,
|
|
4661
|
+
Du as a4,
|
|
4662
|
+
ku as a5,
|
|
4663
|
+
Au as a6,
|
|
4653
4664
|
Z as a7,
|
|
4654
4665
|
Zs as a8,
|
|
4655
|
-
|
|
4666
|
+
mu as a9,
|
|
4656
4667
|
rn as aA,
|
|
4657
4668
|
Ms as aB,
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4669
|
+
iu as aC,
|
|
4670
|
+
cu as aD,
|
|
4671
|
+
$u as aE,
|
|
4672
|
+
As as aF,
|
|
4673
|
+
ou as aG,
|
|
4674
|
+
uu as aH,
|
|
4675
|
+
du as aI,
|
|
4676
|
+
lu as aJ,
|
|
4666
4677
|
Ao as aK,
|
|
4667
4678
|
Ai as aL,
|
|
4668
|
-
|
|
4679
|
+
kn as aM,
|
|
4669
4680
|
$i as aN,
|
|
4670
|
-
|
|
4671
|
-
|
|
4681
|
+
Nc as aO,
|
|
4682
|
+
qu as aP,
|
|
4672
4683
|
Si as aQ,
|
|
4673
|
-
|
|
4684
|
+
Zc as aR,
|
|
4674
4685
|
Ks as aS,
|
|
4675
|
-
|
|
4686
|
+
Fu as aT,
|
|
4676
4687
|
Le as aU,
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4688
|
+
Vu as aV,
|
|
4689
|
+
Ec as aW,
|
|
4690
|
+
Ku as aX,
|
|
4691
|
+
Hu as aY,
|
|
4692
|
+
Un as aZ,
|
|
4693
|
+
Po as a_,
|
|
4694
|
+
Tl as aa,
|
|
4684
4695
|
cr as ab,
|
|
4685
4696
|
De as ac,
|
|
4686
|
-
|
|
4687
|
-
|
|
4697
|
+
sc as ad,
|
|
4698
|
+
Tu as ae,
|
|
4688
4699
|
Ft as af,
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4700
|
+
pl as ag,
|
|
4701
|
+
Lu as ah,
|
|
4702
|
+
Pu as ai,
|
|
4703
|
+
_u as aj,
|
|
4693
4704
|
Kt as ak,
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4705
|
+
tl as al,
|
|
4706
|
+
Nu as am,
|
|
4707
|
+
Ko as an,
|
|
4697
4708
|
Oi as ao,
|
|
4698
|
-
|
|
4709
|
+
Qu as ap,
|
|
4699
4710
|
Ci as aq,
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4711
|
+
I as ar,
|
|
4712
|
+
b as as,
|
|
4713
|
+
mc as at,
|
|
4714
|
+
au,
|
|
4704
4715
|
zt as av,
|
|
4705
4716
|
oe as aw,
|
|
4706
4717
|
fn as ax,
|
|
@@ -4712,23 +4723,23 @@ export {
|
|
|
4712
4723
|
qs as e,
|
|
4713
4724
|
To as f,
|
|
4714
4725
|
Fs as g,
|
|
4715
|
-
|
|
4716
|
-
|
|
4726
|
+
Xc as h,
|
|
4727
|
+
eu as i,
|
|
4717
4728
|
Be as j,
|
|
4718
|
-
|
|
4729
|
+
Bn as k,
|
|
4719
4730
|
Me as l,
|
|
4720
4731
|
Ce as m,
|
|
4721
4732
|
gi as n,
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4733
|
+
tu as o,
|
|
4734
|
+
dc as p,
|
|
4735
|
+
su as q,
|
|
4736
|
+
ru as r,
|
|
4737
|
+
nu as s,
|
|
4727
4738
|
hn as t,
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4739
|
+
Jc as u,
|
|
4740
|
+
Yc as v,
|
|
4741
|
+
Bu as w,
|
|
4731
4742
|
j as x,
|
|
4732
4743
|
lr as y,
|
|
4733
|
-
|
|
4744
|
+
Eu as z
|
|
4734
4745
|
};
|