@chaibuilder/pages 0.1.0-beta.49 → 0.1.0-beta.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BMGNQTAT-GzapW-uv.js → BMGNQTAT-D23NAWmi.js} +2 -2
- package/dist/{BMGNQTAT-ztWu0zq1.cjs → BMGNQTAT-D2_DCbXI.cjs} +1 -1
- package/dist/{ChaiBuilderPages-EsXvhnMU.cjs → ChaiBuilderPages-BFO0dgE5.cjs} +2 -2
- package/dist/{ChaiBuilderPages-CI57F_om.js → ChaiBuilderPages-XvzqxYTv.js} +747 -746
- package/dist/{STCWXWCR-CLk5kpH4.js → STCWXWCR-KLNo0-G2.js} +1 -1
- package/dist/{STCWXWCR-ChSnEo0x.cjs → STCWXWCR-n6BNpLo9.cjs} +1 -1
- package/dist/{UODQIBEW-DAaXM-q3.cjs → UODQIBEW-BXDPzZUT.cjs} +1 -1
- package/dist/{UODQIBEW-BE0GW3Vn.js → UODQIBEW-CvRq3gUg.js} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -3,15 +3,15 @@ var ps = (e) => {
|
|
|
3
3
|
};
|
|
4
4
|
var vs = (e, t, n) => t.has(e) || ps("Cannot " + n);
|
|
5
5
|
var N = (e, t, n) => (vs(e, t, "read from private field"), n ? n.call(e) : t.get(e)), L = (e, t, n) => t.has(e) ? ps("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), I = (e, t, n, s) => (vs(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
6
|
-
import * as
|
|
6
|
+
import * as ie from "react";
|
|
7
7
|
import ln, { useCallback as Dt, useState as $, useEffect as Ce, useMemo as se, useRef as Ls } from "react";
|
|
8
|
-
import { useQueryClient as he, onlineManager as Us, useQuery as be, useMutation as we, QueryClient as
|
|
9
|
-
import { loadWebBlocks as
|
|
10
|
-
import { getBlocksFromHTML as
|
|
11
|
-
import { get as V, find as ye, isEmpty as Y, filter as de, includes as je, startCase as Se, reverse as
|
|
12
|
-
import { AlertCircle as
|
|
13
|
-
import { atom as
|
|
14
|
-
import { useToast as Te, Accordion as
|
|
8
|
+
import { useQueryClient as he, onlineManager as Us, useQuery as be, useMutation as we, QueryClient as ri, QueryClientProvider as ii } from "@tanstack/react-query";
|
|
9
|
+
import { loadWebBlocks as ai } from "@chaibuilder/sdk/web-blocks";
|
|
10
|
+
import { getBlocksFromHTML as oi, useLanguages as cn, useRightPanel as li, useSavePage as ci, mergeClasses as ui, ChaiBuilderEditor as di } from "@chaibuilder/sdk";
|
|
11
|
+
import { get as V, find as ye, isEmpty as Y, filter as de, includes as je, startCase as Se, reverse as fi, sortBy as hi, isEqual as Ke, startsWith as en, map as fe, toLower as yt, trim as gi, orderBy as xt, first as mi, concat as yi, uniq as xi, debounce as pi, groupBy as vi, compact as bi, pick as wi, isString as bs } from "lodash-es";
|
|
12
|
+
import { AlertCircle as Ei, StarIcon as ji, MoreHorizontal as Fs, PencilIcon as Si, Power as Bs, Link as Ms, TrashIcon as Ni, GlobeIcon as Ci, File as Xt, Eye as Ai, Palette as Ti, Check as ws, Loader as $s, Rocket as ki, Send as Pi, Settings as _i, Search as Oi, ChevronRight as Ri, ChevronDown as qs, Database as Ii, Folder as Gi, Plus as Tn, Globe as Di, Pencil as Li, Trash as Ui, Logs as Fi, Languages as Vs, Star as Bi } from "lucide-react";
|
|
13
|
+
import { atom as Mi, useAtom as $i } from "jotai";
|
|
14
|
+
import { useToast as Te, Accordion as qi, AccordionItem as qt, AccordionTrigger as Vt, AccordionContent as Kt, Label as Z, Input as le, Textarea as Wt, Button as W, Dialog as Ge, DialogContent as De, DialogHeader as Le, DialogTitle as Ue, DialogDescription as lt, Alert as Vi, DialogFooter as ct, DropdownMenu as Mn, DropdownMenuTrigger as $n, DropdownMenuContent as qn, DropdownMenuItem as pe, TooltipProvider as Ki, Tooltip as Wi, TooltipTrigger as zi, TooltipContent as Hi, Badge as Es, Sheet as Qi, SheetContent as Yi, Separator as Ji } from "@chaibuilder/sdk/ui";
|
|
15
15
|
var kn = { exports: {} }, gt = {};
|
|
16
16
|
/**
|
|
17
17
|
* @license React
|
|
@@ -23,16 +23,16 @@ var kn = { exports: {} }, gt = {};
|
|
|
23
23
|
* LICENSE file in the root directory of this source tree.
|
|
24
24
|
*/
|
|
25
25
|
var js;
|
|
26
|
-
function
|
|
26
|
+
function Xi() {
|
|
27
27
|
if (js) return gt;
|
|
28
28
|
js = 1;
|
|
29
|
-
var e = ln, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty,
|
|
29
|
+
var e = ln, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
30
30
|
function o(l, u, d) {
|
|
31
31
|
var h, f = {}, y = null, b = null;
|
|
32
32
|
d !== void 0 && (y = "" + d), u.key !== void 0 && (y = "" + u.key), u.ref !== void 0 && (b = u.ref);
|
|
33
|
-
for (h in u) s.call(u, h) && !
|
|
33
|
+
for (h in u) s.call(u, h) && !a.hasOwnProperty(h) && (f[h] = u[h]);
|
|
34
34
|
if (l && l.defaultProps) for (h in u = l.defaultProps, u) f[h] === void 0 && (f[h] = u[h]);
|
|
35
|
-
return { $$typeof: t, type: l, key: y, ref: b, props: f, _owner:
|
|
35
|
+
return { $$typeof: t, type: l, key: y, ref: b, props: f, _owner: i.current };
|
|
36
36
|
}
|
|
37
37
|
return gt.Fragment = n, gt.jsx = o, gt.jsxs = o, gt;
|
|
38
38
|
}
|
|
@@ -47,9 +47,9 @@ var mt = {};
|
|
|
47
47
|
* LICENSE file in the root directory of this source tree.
|
|
48
48
|
*/
|
|
49
49
|
var Ss;
|
|
50
|
-
function
|
|
50
|
+
function Zi() {
|
|
51
51
|
return Ss || (Ss = 1, process.env.NODE_ENV !== "production" && function() {
|
|
52
|
-
var e = ln, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"),
|
|
52
|
+
var e = ln, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), b = Symbol.for("react.offscreen"), E = Symbol.iterator, A = "@@iterator";
|
|
53
53
|
function w(c) {
|
|
54
54
|
if (c === null || typeof c != "object")
|
|
55
55
|
return null;
|
|
@@ -74,10 +74,10 @@ function Xa() {
|
|
|
74
74
|
M.unshift("Warning: " + m), Function.prototype.apply.call(console[c], console, M);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
var
|
|
77
|
+
var K = !1, O = !1, j = !1, G = !1, ce = !1, v;
|
|
78
78
|
v = Symbol.for("react.module.reference");
|
|
79
79
|
function D(c) {
|
|
80
|
-
return !!(typeof c == "string" || typeof c == "function" || c === s || c ===
|
|
80
|
+
return !!(typeof c == "string" || typeof c == "function" || c === s || c === a || ce || c === i || c === d || c === h || G || c === b || K || O || j || typeof c == "object" && c !== null && (c.$$typeof === y || c.$$typeof === f || c.$$typeof === o || c.$$typeof === l || c.$$typeof === u || // This needs to include all possible module reference object
|
|
81
81
|
// types supported by any Flight configuration anywhere since
|
|
82
82
|
// we don't know which Flight build this will end up being used
|
|
83
83
|
// with.
|
|
@@ -105,9 +105,9 @@ function Xa() {
|
|
|
105
105
|
return "Fragment";
|
|
106
106
|
case n:
|
|
107
107
|
return "Portal";
|
|
108
|
-
case i:
|
|
109
|
-
return "Profiler";
|
|
110
108
|
case a:
|
|
109
|
+
return "Profiler";
|
|
110
|
+
case i:
|
|
111
111
|
return "StrictMode";
|
|
112
112
|
case d:
|
|
113
113
|
return "Suspense";
|
|
@@ -326,13 +326,13 @@ function Xa() {
|
|
|
326
326
|
}
|
|
327
327
|
return "";
|
|
328
328
|
}
|
|
329
|
-
var ft = Object.prototype.hasOwnProperty,
|
|
329
|
+
var ft = Object.prototype.hasOwnProperty, is = {}, as = g.ReactDebugCurrentFrame;
|
|
330
330
|
function $t(c) {
|
|
331
331
|
if (c) {
|
|
332
332
|
var m = c._owner, p = Mt(c.type, c._source, m ? m.type : null);
|
|
333
|
-
|
|
333
|
+
as.setExtraStackFrame(p);
|
|
334
334
|
} else
|
|
335
|
-
|
|
335
|
+
as.setExtraStackFrame(null);
|
|
336
336
|
}
|
|
337
337
|
function Dr(c, m, p, S, R) {
|
|
338
338
|
{
|
|
@@ -349,7 +349,7 @@ function Xa() {
|
|
|
349
349
|
} catch (z) {
|
|
350
350
|
k = z;
|
|
351
351
|
}
|
|
352
|
-
k && !(k instanceof Error) && ($t(R), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", S || "React class", p, P, typeof k), $t(null)), k instanceof Error && !(k.message in
|
|
352
|
+
k && !(k instanceof Error) && ($t(R), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", S || "React class", p, P, typeof k), $t(null)), k instanceof Error && !(k.message in is) && (is[k.message] = !0, $t(R), x("Failed %s type: %s", p, k.message), $t(null));
|
|
353
353
|
}
|
|
354
354
|
}
|
|
355
355
|
}
|
|
@@ -614,17 +614,17 @@ Check the top-level render call using <` + p + ">.");
|
|
|
614
614
|
ms(ue, c);
|
|
615
615
|
}
|
|
616
616
|
if (ft.call(m, "key")) {
|
|
617
|
-
var Pe = ge(c), re = Object.keys(m).filter(function(
|
|
618
|
-
return
|
|
617
|
+
var Pe = ge(c), re = Object.keys(m).filter(function(si) {
|
|
618
|
+
return si !== "key";
|
|
619
619
|
}), jn = re.length > 0 ? "{key: someKey, " + re.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
620
620
|
if (!ys[Pe + jn]) {
|
|
621
|
-
var
|
|
621
|
+
var ni = re.length > 0 ? "{" + re.join(": ..., ") + ": ...}" : "{}";
|
|
622
622
|
x(`A props object containing a "key" prop is being spread into JSX:
|
|
623
623
|
let props = %s;
|
|
624
624
|
<%s {...props} />
|
|
625
625
|
React keys must be passed directly to JSX without using spread:
|
|
626
626
|
let props = %s;
|
|
627
|
-
<%s key={someKey} {...props} />`, jn, Pe,
|
|
627
|
+
<%s key={someKey} {...props} />`, jn, Pe, ni, Pe), ys[Pe + jn] = !0;
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
return c === s ? Jr(Q) : Yr(Q), Q;
|
|
@@ -636,11 +636,11 @@ React keys must be passed directly to JSX without using spread:
|
|
|
636
636
|
function Zr(c, m, p) {
|
|
637
637
|
return xs(c, m, p, !1);
|
|
638
638
|
}
|
|
639
|
-
var
|
|
640
|
-
mt.Fragment = s, mt.jsx =
|
|
639
|
+
var ei = Zr, ti = Xr;
|
|
640
|
+
mt.Fragment = s, mt.jsx = ei, mt.jsxs = ti;
|
|
641
641
|
}()), mt;
|
|
642
642
|
}
|
|
643
|
-
process.env.NODE_ENV === "production" ? kn.exports =
|
|
643
|
+
process.env.NODE_ENV === "production" ? kn.exports = Xi() : kn.exports = Zi();
|
|
644
644
|
var r = kn.exports, T = {
|
|
645
645
|
context: void 0,
|
|
646
646
|
registry: void 0,
|
|
@@ -658,21 +658,21 @@ function Ns(e) {
|
|
|
658
658
|
function pt(e) {
|
|
659
659
|
T.context = e;
|
|
660
660
|
}
|
|
661
|
-
var
|
|
662
|
-
equals:
|
|
661
|
+
var ea = (e, t) => e === t, tn = Symbol("solid-proxy"), Ks = Symbol("solid-track"), nn = {
|
|
662
|
+
equals: ea
|
|
663
663
|
}, Ws = Xs, Ee = 1, sn = 2, zs = {
|
|
664
664
|
owned: null,
|
|
665
665
|
cleanups: null,
|
|
666
666
|
context: null,
|
|
667
667
|
owner: null
|
|
668
|
-
}, Sn = {}, _ = null, Nn = null,
|
|
668
|
+
}, Sn = {}, _ = null, Nn = null, ta = null, U = null, te = null, ve = null, un = 0;
|
|
669
669
|
function Re(e, t) {
|
|
670
|
-
const n = U, s = _,
|
|
670
|
+
const n = U, s = _, i = e.length === 0, a = t === void 0 ? s : t, o = i ? zs : {
|
|
671
671
|
owned: null,
|
|
672
672
|
cleanups: null,
|
|
673
|
-
context:
|
|
674
|
-
owner:
|
|
675
|
-
}, l =
|
|
673
|
+
context: a ? a.context : null,
|
|
674
|
+
owner: a
|
|
675
|
+
}, l = i ? e : () => e(() => ee(() => fn(o)));
|
|
676
676
|
_ = o, U = null;
|
|
677
677
|
try {
|
|
678
678
|
return xe(l, !0);
|
|
@@ -687,7 +687,7 @@ function H(e, t) {
|
|
|
687
687
|
observers: null,
|
|
688
688
|
observerSlots: null,
|
|
689
689
|
comparator: t.equals || void 0
|
|
690
|
-
}, s = (
|
|
690
|
+
}, s = (i) => (typeof i == "function" && (i = i(n.value)), Js(n, i));
|
|
691
691
|
return [Ys.bind(n), s];
|
|
692
692
|
}
|
|
693
693
|
function Cs(e, t, n) {
|
|
@@ -699,45 +699,45 @@ function Ie(e, t, n) {
|
|
|
699
699
|
ut(s);
|
|
700
700
|
}
|
|
701
701
|
function Hs(e, t, n) {
|
|
702
|
-
Ws =
|
|
702
|
+
Ws = da;
|
|
703
703
|
const s = dn(e, t, !1, Ee);
|
|
704
704
|
(!n || !n.render) && (s.user = !0), ve ? ve.push(s) : ut(s);
|
|
705
705
|
}
|
|
706
|
-
function
|
|
706
|
+
function ae(e, t, n) {
|
|
707
707
|
n = n ? Object.assign({}, nn, n) : nn;
|
|
708
708
|
const s = dn(e, t, !0, 0);
|
|
709
709
|
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, ut(s), Ys.bind(s);
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function na(e) {
|
|
712
712
|
return e && typeof e == "object" && "then" in e;
|
|
713
713
|
}
|
|
714
|
-
function
|
|
715
|
-
let s,
|
|
716
|
-
arguments.length === 2 && typeof t == "object" || arguments.length === 1 ? (s = !0,
|
|
717
|
-
let o = null, l = Sn, u = null, d = !1, h = "initialValue" in
|
|
718
|
-
const y = /* @__PURE__ */ new Set(), [b, E] = (
|
|
714
|
+
function sa(e, t, n) {
|
|
715
|
+
let s, i, a;
|
|
716
|
+
arguments.length === 2 && typeof t == "object" || arguments.length === 1 ? (s = !0, i = e, a = {}) : (s = e, i = t, a = {});
|
|
717
|
+
let o = null, l = Sn, u = null, d = !1, h = "initialValue" in a, f = typeof s == "function" && ae(s);
|
|
718
|
+
const y = /* @__PURE__ */ new Set(), [b, E] = (a.storage || H)(a.initialValue), [A, w] = H(void 0), [g, x] = H(void 0, {
|
|
719
719
|
equals: !1
|
|
720
|
-
}), [B,
|
|
720
|
+
}), [B, K] = H(h ? "ready" : "unresolved");
|
|
721
721
|
if (T.context) {
|
|
722
722
|
u = T.getNextContextId();
|
|
723
723
|
let v;
|
|
724
|
-
|
|
724
|
+
a.ssrLoadFrom === "initial" ? l = a.initialValue : T.load && (v = T.load(u)) && (l = v);
|
|
725
725
|
}
|
|
726
726
|
function O(v, D, q, oe) {
|
|
727
|
-
return o === v && (o = null, oe !== void 0 && (h = !0), (v === l || D === l) &&
|
|
727
|
+
return o === v && (o = null, oe !== void 0 && (h = !0), (v === l || D === l) && a.onHydrated && queueMicrotask(() => a.onHydrated(oe, {
|
|
728
728
|
value: D
|
|
729
729
|
})), l = Sn, j(D, q)), D;
|
|
730
730
|
}
|
|
731
731
|
function j(v, D) {
|
|
732
732
|
xe(() => {
|
|
733
|
-
D === void 0 && E(() => v),
|
|
733
|
+
D === void 0 && E(() => v), K(D !== void 0 ? "errored" : h ? "ready" : "unresolved"), w(D);
|
|
734
734
|
for (const q of y.keys())
|
|
735
735
|
q.decrement();
|
|
736
736
|
y.clear();
|
|
737
737
|
}, !1);
|
|
738
738
|
}
|
|
739
739
|
function G() {
|
|
740
|
-
const v =
|
|
740
|
+
const v = la, D = b(), q = A();
|
|
741
741
|
if (q !== void 0 && !o)
|
|
742
742
|
throw q;
|
|
743
743
|
return U && !U.user && v && Cs(() => {
|
|
@@ -753,12 +753,12 @@ function ni(e, t, n) {
|
|
|
753
753
|
O(o, ee(b));
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
756
|
-
const q = l !== Sn ? l : ee(() =>
|
|
756
|
+
const q = l !== Sn ? l : ee(() => i(D, {
|
|
757
757
|
value: b(),
|
|
758
758
|
refetching: v
|
|
759
759
|
}));
|
|
760
|
-
return
|
|
761
|
-
|
|
760
|
+
return na(q) ? (o = q, "value" in q ? (q.status === "success" ? O(o, q.value, void 0, D) : O(o, void 0, Pn(q.value), D), q) : (d = !0, queueMicrotask(() => d = !1), xe(() => {
|
|
761
|
+
K(h ? "refreshing" : "pending"), x();
|
|
762
762
|
}, !1), q.then((oe) => O(q, oe, void 0, D), (oe) => O(q, void 0, Pn(oe), D)))) : (O(o, q, void 0, D), q);
|
|
763
763
|
}
|
|
764
764
|
return Object.defineProperties(G, {
|
|
@@ -789,7 +789,7 @@ function ni(e, t, n) {
|
|
|
789
789
|
mutate: E
|
|
790
790
|
}];
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function yl(e) {
|
|
793
793
|
return xe(e, !1);
|
|
794
794
|
}
|
|
795
795
|
function ee(e) {
|
|
@@ -803,9 +803,9 @@ function ee(e) {
|
|
|
803
803
|
U = t;
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function xl(e, t, n) {
|
|
807
807
|
const s = Array.isArray(e);
|
|
808
|
-
let
|
|
808
|
+
let i, a = n && n.defer;
|
|
809
809
|
return (o) => {
|
|
810
810
|
let l;
|
|
811
811
|
if (s) {
|
|
@@ -814,13 +814,13 @@ function yl(e, t, n) {
|
|
|
814
814
|
l[d] = e[d]();
|
|
815
815
|
} else
|
|
816
816
|
l = e();
|
|
817
|
-
if (
|
|
818
|
-
return
|
|
819
|
-
const u = ee(() => t(l,
|
|
820
|
-
return
|
|
817
|
+
if (a)
|
|
818
|
+
return a = !1, o;
|
|
819
|
+
const u = ee(() => t(l, i, o));
|
|
820
|
+
return i = l, u;
|
|
821
821
|
};
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function ra(e) {
|
|
824
824
|
Hs(() => ee(e));
|
|
825
825
|
}
|
|
826
826
|
function wt(e) {
|
|
@@ -829,18 +829,18 @@ function wt(e) {
|
|
|
829
829
|
function As() {
|
|
830
830
|
return _;
|
|
831
831
|
}
|
|
832
|
-
function
|
|
832
|
+
function ia(e, t) {
|
|
833
833
|
const n = _, s = U;
|
|
834
834
|
_ = e, U = null;
|
|
835
835
|
try {
|
|
836
836
|
return xe(t, !0);
|
|
837
|
-
} catch (
|
|
838
|
-
Vn(
|
|
837
|
+
} catch (i) {
|
|
838
|
+
Vn(i);
|
|
839
839
|
} finally {
|
|
840
840
|
_ = n, U = s;
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function aa(e) {
|
|
844
844
|
const t = U, n = _;
|
|
845
845
|
return Promise.resolve().then(() => {
|
|
846
846
|
U = t, _ = n;
|
|
@@ -848,30 +848,30 @@ function ai(e) {
|
|
|
848
848
|
return xe(e, !1), U = _ = null, s ? s.done : void 0;
|
|
849
849
|
});
|
|
850
850
|
}
|
|
851
|
-
var [
|
|
852
|
-
function
|
|
853
|
-
return [
|
|
851
|
+
var [oa, pl] = /* @__PURE__ */ H(!1);
|
|
852
|
+
function vl() {
|
|
853
|
+
return [oa, aa];
|
|
854
854
|
}
|
|
855
|
-
function
|
|
855
|
+
function bl(e, t) {
|
|
856
856
|
const n = Symbol("context");
|
|
857
857
|
return {
|
|
858
858
|
id: n,
|
|
859
|
-
Provider:
|
|
859
|
+
Provider: fa(n),
|
|
860
860
|
defaultValue: e
|
|
861
861
|
};
|
|
862
862
|
}
|
|
863
|
-
function
|
|
863
|
+
function wl(e) {
|
|
864
864
|
let t;
|
|
865
865
|
return _ && _.context && (t = _.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
866
866
|
}
|
|
867
867
|
function Qs(e) {
|
|
868
|
-
const t =
|
|
868
|
+
const t = ae(e), n = ae(() => _n(t()));
|
|
869
869
|
return n.toArray = () => {
|
|
870
870
|
const s = n();
|
|
871
871
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
872
872
|
}, n;
|
|
873
873
|
}
|
|
874
|
-
var
|
|
874
|
+
var la;
|
|
875
875
|
function Ys() {
|
|
876
876
|
if (this.sources && this.state)
|
|
877
877
|
if (this.state === Ee)
|
|
@@ -889,9 +889,9 @@ function Ys() {
|
|
|
889
889
|
function Js(e, t, n) {
|
|
890
890
|
let s = e.value;
|
|
891
891
|
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && xe(() => {
|
|
892
|
-
for (let
|
|
893
|
-
const
|
|
894
|
-
o && Nn.disposed.has(
|
|
892
|
+
for (let i = 0; i < e.observers.length; i += 1) {
|
|
893
|
+
const a = e.observers[i], o = Nn && Nn.running;
|
|
894
|
+
o && Nn.disposed.has(a), (o ? !a.tState : !a.state) && (a.pure ? te.push(a) : ve.push(a), a.observers && Zs(a)), o || (a.state = Ee);
|
|
895
895
|
}
|
|
896
896
|
if (te.length > 1e6)
|
|
897
897
|
throw te = [], new Error();
|
|
@@ -902,23 +902,23 @@ function ut(e) {
|
|
|
902
902
|
return;
|
|
903
903
|
fn(e);
|
|
904
904
|
const t = un;
|
|
905
|
-
|
|
905
|
+
ca(e, e.value, t);
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function ca(e, t, n) {
|
|
908
908
|
let s;
|
|
909
|
-
const
|
|
909
|
+
const i = _, a = U;
|
|
910
910
|
U = _ = e;
|
|
911
911
|
try {
|
|
912
912
|
s = e.fn(t);
|
|
913
913
|
} catch (o) {
|
|
914
914
|
return e.pure && (e.state = Ee, e.owned && e.owned.forEach(fn), e.owned = null), e.updatedAt = n + 1, Vn(o);
|
|
915
915
|
} finally {
|
|
916
|
-
U =
|
|
916
|
+
U = a, _ = i;
|
|
917
917
|
}
|
|
918
918
|
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Js(e, s) : e.value = s, e.updatedAt = n);
|
|
919
919
|
}
|
|
920
|
-
function dn(e, t, n, s = Ee,
|
|
921
|
-
const
|
|
920
|
+
function dn(e, t, n, s = Ee, i) {
|
|
921
|
+
const a = {
|
|
922
922
|
fn: e,
|
|
923
923
|
state: s,
|
|
924
924
|
updatedAt: null,
|
|
@@ -931,7 +931,7 @@ function dn(e, t, n, s = Ee, a) {
|
|
|
931
931
|
context: _ ? _.context : null,
|
|
932
932
|
pure: n
|
|
933
933
|
};
|
|
934
|
-
return _ === null || _ !== zs && (_.owned ? _.owned.push(
|
|
934
|
+
return _ === null || _ !== zs && (_.owned ? _.owned.push(a) : _.owned = [a]), a;
|
|
935
935
|
}
|
|
936
936
|
function rn(e) {
|
|
937
937
|
if (e.state === 0)
|
|
@@ -958,12 +958,12 @@ function xe(e, t) {
|
|
|
958
958
|
t || (te = []), ve ? n = !0 : ve = [], un++;
|
|
959
959
|
try {
|
|
960
960
|
const s = e();
|
|
961
|
-
return
|
|
961
|
+
return ua(n), s;
|
|
962
962
|
} catch (s) {
|
|
963
963
|
n || (ve = null), te = null, Vn(s);
|
|
964
964
|
}
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function ua(e) {
|
|
967
967
|
if (te && (Xs(te), te = null), e)
|
|
968
968
|
return;
|
|
969
969
|
const t = ve;
|
|
@@ -973,7 +973,7 @@ function Xs(e) {
|
|
|
973
973
|
for (let t = 0; t < e.length; t++)
|
|
974
974
|
rn(e[t]);
|
|
975
975
|
}
|
|
976
|
-
function
|
|
976
|
+
function da(e) {
|
|
977
977
|
let t, n = 0;
|
|
978
978
|
for (t = 0; t < e.length; t++) {
|
|
979
979
|
const s = e[t];
|
|
@@ -994,8 +994,8 @@ function an(e, t) {
|
|
|
994
994
|
for (let n = 0; n < e.sources.length; n += 1) {
|
|
995
995
|
const s = e.sources[n];
|
|
996
996
|
if (s.sources) {
|
|
997
|
-
const
|
|
998
|
-
|
|
997
|
+
const i = s.state;
|
|
998
|
+
i === Ee ? s !== t && (!s.updatedAt || s.updatedAt < un) && rn(s) : i === sn && an(s, t);
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
@@ -1009,10 +1009,10 @@ function fn(e) {
|
|
|
1009
1009
|
let t;
|
|
1010
1010
|
if (e.sources)
|
|
1011
1011
|
for (; e.sources.length; ) {
|
|
1012
|
-
const n = e.sources.pop(), s = e.sourceSlots.pop(),
|
|
1013
|
-
if (
|
|
1014
|
-
const
|
|
1015
|
-
s <
|
|
1012
|
+
const n = e.sources.pop(), s = e.sourceSlots.pop(), i = n.observers;
|
|
1013
|
+
if (i && i.length) {
|
|
1014
|
+
const a = i.pop(), o = n.observerSlots.pop();
|
|
1015
|
+
s < i.length && (a.sourceSlots[o] = s, i[s] = a, n.observerSlots[s] = o);
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
1018
|
if (e.owned) {
|
|
@@ -1048,13 +1048,13 @@ function _n(e) {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
return e;
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function fa(e, t) {
|
|
1052
1052
|
return function(s) {
|
|
1053
|
-
let
|
|
1054
|
-
return Ie(() =>
|
|
1053
|
+
let i;
|
|
1054
|
+
return Ie(() => i = ee(() => (_.context = {
|
|
1055
1055
|
..._.context,
|
|
1056
1056
|
[e]: s.value
|
|
1057
|
-
}, Qs(() => s.children))), void 0),
|
|
1057
|
+
}, Qs(() => s.children))), void 0), i;
|
|
1058
1058
|
};
|
|
1059
1059
|
}
|
|
1060
1060
|
var On = Symbol("fallback");
|
|
@@ -1062,35 +1062,35 @@ function on(e) {
|
|
|
1062
1062
|
for (let t = 0; t < e.length; t++)
|
|
1063
1063
|
e[t]();
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
let s = [],
|
|
1067
|
-
return wt(() => on(
|
|
1065
|
+
function ha(e, t, n = {}) {
|
|
1066
|
+
let s = [], i = [], a = [], o = 0, l = t.length > 1 ? [] : null;
|
|
1067
|
+
return wt(() => on(a)), () => {
|
|
1068
1068
|
let u = e() || [], d = u.length, h, f;
|
|
1069
1069
|
return u[Ks], ee(() => {
|
|
1070
|
-
let b, E, A, w, g, x, B,
|
|
1070
|
+
let b, E, A, w, g, x, B, K, O;
|
|
1071
1071
|
if (d === 0)
|
|
1072
|
-
o !== 0 && (on(
|
|
1072
|
+
o !== 0 && (on(a), a = [], s = [], i = [], o = 0, l && (l = [])), n.fallback && (s = [On], i[0] = Re((j) => (a[0] = j, n.fallback())), o = 1);
|
|
1073
1073
|
else if (o === 0) {
|
|
1074
|
-
for (
|
|
1075
|
-
s[f] = u[f],
|
|
1074
|
+
for (i = new Array(d), f = 0; f < d; f++)
|
|
1075
|
+
s[f] = u[f], i[f] = Re(y);
|
|
1076
1076
|
o = d;
|
|
1077
1077
|
} else {
|
|
1078
1078
|
for (A = new Array(d), w = new Array(d), l && (g = new Array(d)), x = 0, B = Math.min(o, d); x < B && s[x] === u[x]; x++)
|
|
1079
1079
|
;
|
|
1080
|
-
for (B = o - 1,
|
|
1081
|
-
A[
|
|
1082
|
-
for (b = /* @__PURE__ */ new Map(), E = new Array(
|
|
1080
|
+
for (B = o - 1, K = d - 1; B >= x && K >= x && s[B] === u[K]; B--, K--)
|
|
1081
|
+
A[K] = i[B], w[K] = a[B], l && (g[K] = l[B]);
|
|
1082
|
+
for (b = /* @__PURE__ */ new Map(), E = new Array(K + 1), f = K; f >= x; f--)
|
|
1083
1083
|
O = u[f], h = b.get(O), E[f] = h === void 0 ? -1 : h, b.set(O, f);
|
|
1084
1084
|
for (h = x; h <= B; h++)
|
|
1085
|
-
O = s[h], f = b.get(O), f !== void 0 && f !== -1 ? (A[f] =
|
|
1085
|
+
O = s[h], f = b.get(O), f !== void 0 && f !== -1 ? (A[f] = i[h], w[f] = a[h], l && (g[f] = l[h]), f = E[f], b.set(O, f)) : a[h]();
|
|
1086
1086
|
for (f = x; f < d; f++)
|
|
1087
|
-
f in A ? (
|
|
1088
|
-
|
|
1087
|
+
f in A ? (i[f] = A[f], a[f] = w[f], l && (l[f] = g[f], l[f](f))) : i[f] = Re(y);
|
|
1088
|
+
i = i.slice(0, o = d), s = u.slice(0);
|
|
1089
1089
|
}
|
|
1090
|
-
return
|
|
1090
|
+
return i;
|
|
1091
1091
|
});
|
|
1092
1092
|
function y(b) {
|
|
1093
|
-
if (
|
|
1093
|
+
if (a[f] = b, l) {
|
|
1094
1094
|
const [E, A] = H(f);
|
|
1095
1095
|
return l[f] = A, t(u[f], E);
|
|
1096
1096
|
}
|
|
@@ -1098,21 +1098,21 @@ function fi(e, t, n = {}) {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
};
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1102
|
-
let s = [],
|
|
1103
|
-
return wt(() => on(
|
|
1101
|
+
function ga(e, t, n = {}) {
|
|
1102
|
+
let s = [], i = [], a = [], o = [], l = 0, u;
|
|
1103
|
+
return wt(() => on(a)), () => {
|
|
1104
1104
|
const d = e() || [], h = d.length;
|
|
1105
1105
|
return d[Ks], ee(() => {
|
|
1106
1106
|
if (h === 0)
|
|
1107
|
-
return l !== 0 && (on(
|
|
1108
|
-
for (s[0] === On && (
|
|
1109
|
-
u < s.length && s[u] !== d[u] ? o[u](() => d[u]) : u >= s.length && (
|
|
1107
|
+
return l !== 0 && (on(a), a = [], s = [], i = [], l = 0, o = []), n.fallback && (s = [On], i[0] = Re((y) => (a[0] = y, n.fallback())), l = 1), i;
|
|
1108
|
+
for (s[0] === On && (a[0](), a = [], s = [], i = [], l = 0), u = 0; u < h; u++)
|
|
1109
|
+
u < s.length && s[u] !== d[u] ? o[u](() => d[u]) : u >= s.length && (i[u] = Re(f));
|
|
1110
1110
|
for (; u < s.length; u++)
|
|
1111
|
-
|
|
1112
|
-
return l = o.length =
|
|
1111
|
+
a[u]();
|
|
1112
|
+
return l = o.length = a.length = h, s = d.slice(0), i = i.slice(0, l);
|
|
1113
1113
|
});
|
|
1114
1114
|
function f(y) {
|
|
1115
|
-
|
|
1115
|
+
a[u] = y;
|
|
1116
1116
|
const [b, E] = H(d[u]);
|
|
1117
1117
|
return o[u] = E, t(b, u);
|
|
1118
1118
|
}
|
|
@@ -1151,7 +1151,7 @@ var Rn = {
|
|
|
1151
1151
|
function Cn(e) {
|
|
1152
1152
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
1153
1153
|
}
|
|
1154
|
-
function
|
|
1154
|
+
function ma() {
|
|
1155
1155
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
1156
1156
|
const n = this[e]();
|
|
1157
1157
|
if (n !== void 0)
|
|
@@ -1162,7 +1162,7 @@ function tr(...e) {
|
|
|
1162
1162
|
let t = !1;
|
|
1163
1163
|
for (let o = 0; o < e.length; o++) {
|
|
1164
1164
|
const l = e[o];
|
|
1165
|
-
t = t || !!l && tn in l, e[o] = typeof l == "function" ? (t = !0,
|
|
1165
|
+
t = t || !!l && tn in l, e[o] = typeof l == "function" ? (t = !0, ae(l)) : l;
|
|
1166
1166
|
}
|
|
1167
1167
|
if (t)
|
|
1168
1168
|
return new Proxy({
|
|
@@ -1201,7 +1201,7 @@ function tr(...e) {
|
|
|
1201
1201
|
s[h] = f.get ? {
|
|
1202
1202
|
enumerable: !0,
|
|
1203
1203
|
configurable: !0,
|
|
1204
|
-
get:
|
|
1204
|
+
get: ma.bind(n[h] = [f.get.bind(l)])
|
|
1205
1205
|
} : f.value !== void 0 ? f : void 0;
|
|
1206
1206
|
else {
|
|
1207
1207
|
const y = n[h];
|
|
@@ -1209,16 +1209,16 @@ function tr(...e) {
|
|
|
1209
1209
|
}
|
|
1210
1210
|
}
|
|
1211
1211
|
}
|
|
1212
|
-
const
|
|
1213
|
-
for (let o =
|
|
1214
|
-
const l =
|
|
1215
|
-
u && u.get ? Object.defineProperty(
|
|
1212
|
+
const i = {}, a = Object.keys(s);
|
|
1213
|
+
for (let o = a.length - 1; o >= 0; o--) {
|
|
1214
|
+
const l = a[o], u = s[l];
|
|
1215
|
+
u && u.get ? Object.defineProperty(i, l, u) : i[l] = u ? u.value : void 0;
|
|
1216
1216
|
}
|
|
1217
|
-
return
|
|
1217
|
+
return i;
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1219
|
+
function ya(e, ...t) {
|
|
1220
1220
|
if (tn in e) {
|
|
1221
|
-
const
|
|
1221
|
+
const i = new Set(t.length > 1 ? t.flat() : t[0]), a = t.map((o) => new Proxy({
|
|
1222
1222
|
get(l) {
|
|
1223
1223
|
return o.includes(l) ? e[l] : void 0;
|
|
1224
1224
|
},
|
|
@@ -1229,120 +1229,120 @@ function mi(e, ...t) {
|
|
|
1229
1229
|
return o.filter((l) => l in e);
|
|
1230
1230
|
}
|
|
1231
1231
|
}, Rn));
|
|
1232
|
-
return
|
|
1232
|
+
return a.push(new Proxy({
|
|
1233
1233
|
get(o) {
|
|
1234
|
-
return
|
|
1234
|
+
return i.has(o) ? void 0 : e[o];
|
|
1235
1235
|
},
|
|
1236
1236
|
has(o) {
|
|
1237
|
-
return
|
|
1237
|
+
return i.has(o) ? !1 : o in e;
|
|
1238
1238
|
},
|
|
1239
1239
|
keys() {
|
|
1240
|
-
return Object.keys(e).filter((o) => !
|
|
1240
|
+
return Object.keys(e).filter((o) => !i.has(o));
|
|
1241
1241
|
}
|
|
1242
|
-
}, Rn)),
|
|
1242
|
+
}, Rn)), a;
|
|
1243
1243
|
}
|
|
1244
1244
|
const n = {}, s = t.map(() => ({}));
|
|
1245
|
-
for (const
|
|
1246
|
-
const
|
|
1245
|
+
for (const i of Object.getOwnPropertyNames(e)) {
|
|
1246
|
+
const a = Object.getOwnPropertyDescriptor(e, i), o = !a.get && !a.set && a.enumerable && a.writable && a.configurable;
|
|
1247
1247
|
let l = !1, u = 0;
|
|
1248
1248
|
for (const d of t)
|
|
1249
|
-
d.includes(
|
|
1250
|
-
l || (o ? n[
|
|
1249
|
+
d.includes(i) && (l = !0, o ? s[u][i] = a.value : Object.defineProperty(s[u], i, a)), ++u;
|
|
1250
|
+
l || (o ? n[i] = a.value : Object.defineProperty(n, i, a));
|
|
1251
1251
|
}
|
|
1252
1252
|
return [...s, n];
|
|
1253
1253
|
}
|
|
1254
1254
|
function nr(e) {
|
|
1255
1255
|
let t, n;
|
|
1256
|
-
const s = (
|
|
1257
|
-
const
|
|
1258
|
-
if (
|
|
1256
|
+
const s = (i) => {
|
|
1257
|
+
const a = T.context;
|
|
1258
|
+
if (a) {
|
|
1259
1259
|
const [l, u] = H();
|
|
1260
1260
|
T.count || (T.count = 0), T.count++, (n || (n = e())).then((d) => {
|
|
1261
|
-
pt(
|
|
1261
|
+
pt(a), T.count--, u(() => d.default), pt();
|
|
1262
1262
|
}), t = l;
|
|
1263
1263
|
} else if (!t) {
|
|
1264
|
-
const [l] =
|
|
1264
|
+
const [l] = sa(() => (n || (n = e())).then((u) => u.default));
|
|
1265
1265
|
t = l;
|
|
1266
1266
|
}
|
|
1267
1267
|
let o;
|
|
1268
|
-
return
|
|
1269
|
-
if (!
|
|
1270
|
-
return o(
|
|
1268
|
+
return ae(() => (o = t()) && ee(() => {
|
|
1269
|
+
if (!a)
|
|
1270
|
+
return o(i);
|
|
1271
1271
|
const l = T.context;
|
|
1272
|
-
pt(
|
|
1273
|
-
const u = o(
|
|
1272
|
+
pt(a);
|
|
1273
|
+
const u = o(i);
|
|
1274
1274
|
return pt(l), u;
|
|
1275
1275
|
}));
|
|
1276
1276
|
};
|
|
1277
|
-
return s.preload = () => n || ((n = e()).then((
|
|
1277
|
+
return s.preload = () => n || ((n = e()).then((i) => t = () => i.default), n), s;
|
|
1278
1278
|
}
|
|
1279
|
-
var
|
|
1280
|
-
function
|
|
1281
|
-
return T.context ? T.getNextContextId() : `cl-${
|
|
1279
|
+
var xa = 0;
|
|
1280
|
+
function El() {
|
|
1281
|
+
return T.context ? T.getNextContextId() : `cl-${xa++}`;
|
|
1282
1282
|
}
|
|
1283
1283
|
var sr = (e) => `Stale read from <${e}>.`;
|
|
1284
|
-
function
|
|
1284
|
+
function jl(e) {
|
|
1285
1285
|
const t = "fallback" in e && {
|
|
1286
1286
|
fallback: () => e.fallback
|
|
1287
1287
|
};
|
|
1288
|
-
return
|
|
1288
|
+
return ae(ha(() => e.each, e.children, t || void 0));
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function Sl(e) {
|
|
1291
1291
|
const t = "fallback" in e && {
|
|
1292
1292
|
fallback: () => e.fallback
|
|
1293
1293
|
};
|
|
1294
|
-
return
|
|
1294
|
+
return ae(ga(() => e.each, e.children, t || void 0));
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1297
|
-
const t = e.keyed, n =
|
|
1298
|
-
equals: (s,
|
|
1296
|
+
function Nl(e) {
|
|
1297
|
+
const t = e.keyed, n = ae(() => e.when, void 0, {
|
|
1298
|
+
equals: (s, i) => t ? s === i : !s == !i
|
|
1299
1299
|
});
|
|
1300
|
-
return
|
|
1300
|
+
return ae(() => {
|
|
1301
1301
|
const s = n();
|
|
1302
1302
|
if (s) {
|
|
1303
|
-
const
|
|
1304
|
-
return typeof
|
|
1303
|
+
const i = e.children;
|
|
1304
|
+
return typeof i == "function" && i.length > 0 ? ee(() => i(t ? s : () => {
|
|
1305
1305
|
if (!ee(n))
|
|
1306
1306
|
throw sr("Show");
|
|
1307
1307
|
return e.when;
|
|
1308
|
-
})) :
|
|
1308
|
+
})) : i;
|
|
1309
1309
|
}
|
|
1310
1310
|
return e.fallback;
|
|
1311
1311
|
}, void 0, void 0);
|
|
1312
1312
|
}
|
|
1313
|
-
function
|
|
1313
|
+
function Cl(e) {
|
|
1314
1314
|
let t = !1;
|
|
1315
|
-
const n = (
|
|
1316
|
-
let
|
|
1317
|
-
Array.isArray(
|
|
1318
|
-
for (let o = 0; o <
|
|
1319
|
-
const l =
|
|
1315
|
+
const n = (a, o) => (t ? a[1] === o[1] : !a[1] == !o[1]) && a[2] === o[2], s = Qs(() => e.children), i = ae(() => {
|
|
1316
|
+
let a = s();
|
|
1317
|
+
Array.isArray(a) || (a = [a]);
|
|
1318
|
+
for (let o = 0; o < a.length; o++) {
|
|
1319
|
+
const l = a[o].when;
|
|
1320
1320
|
if (l)
|
|
1321
|
-
return t = !!
|
|
1321
|
+
return t = !!a[o].keyed, [o, l, a[o]];
|
|
1322
1322
|
}
|
|
1323
1323
|
return [-1];
|
|
1324
1324
|
}, void 0, {
|
|
1325
1325
|
equals: n
|
|
1326
1326
|
});
|
|
1327
|
-
return
|
|
1328
|
-
const [
|
|
1329
|
-
if (
|
|
1327
|
+
return ae(() => {
|
|
1328
|
+
const [a, o, l] = i();
|
|
1329
|
+
if (a < 0)
|
|
1330
1330
|
return e.fallback;
|
|
1331
1331
|
const u = l.children;
|
|
1332
1332
|
return typeof u == "function" && u.length > 0 ? ee(() => u(t ? o : () => {
|
|
1333
|
-
if (ee(
|
|
1333
|
+
if (ee(i)[0] !== a)
|
|
1334
1334
|
throw sr("Match");
|
|
1335
1335
|
return l.when;
|
|
1336
1336
|
})) : u;
|
|
1337
1337
|
}, void 0, void 0);
|
|
1338
1338
|
}
|
|
1339
|
-
function
|
|
1339
|
+
function Al(e) {
|
|
1340
1340
|
return e;
|
|
1341
1341
|
}
|
|
1342
|
-
var
|
|
1342
|
+
var pa = ["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"], va = /* @__PURE__ */ new Set(["className", "value", "readOnly", "formNoValidate", "isMap", "noModule", "playsInline", ...pa]), ba = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), wa = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
1343
1343
|
className: "class",
|
|
1344
1344
|
htmlFor: "for"
|
|
1345
|
-
}),
|
|
1345
|
+
}), Ea = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
1346
1346
|
class: "className",
|
|
1347
1347
|
formnovalidate: {
|
|
1348
1348
|
$: "formNoValidate",
|
|
@@ -1367,11 +1367,11 @@ var xi = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
|
|
|
1367
1367
|
TEXTAREA: 1
|
|
1368
1368
|
}
|
|
1369
1369
|
});
|
|
1370
|
-
function
|
|
1371
|
-
const n =
|
|
1370
|
+
function ja(e, t) {
|
|
1371
|
+
const n = Ea[e];
|
|
1372
1372
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
1373
1373
|
}
|
|
1374
|
-
var
|
|
1374
|
+
var Sa = /* @__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"]), Na = /* @__PURE__ */ new Set([
|
|
1375
1375
|
"altGlyph",
|
|
1376
1376
|
"altGlyphDef",
|
|
1377
1377
|
"altGlyphItem",
|
|
@@ -1449,41 +1449,41 @@ var ji = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
|
|
|
1449
1449
|
"use",
|
|
1450
1450
|
"view",
|
|
1451
1451
|
"vkern"
|
|
1452
|
-
]),
|
|
1452
|
+
]), Ca = {
|
|
1453
1453
|
xlink: "http://www.w3.org/1999/xlink",
|
|
1454
1454
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
1455
1455
|
};
|
|
1456
|
-
function
|
|
1457
|
-
let s = n.length,
|
|
1458
|
-
for (; o <
|
|
1456
|
+
function Aa(e, t, n) {
|
|
1457
|
+
let s = n.length, i = t.length, a = s, o = 0, l = 0, u = t[i - 1].nextSibling, d = null;
|
|
1458
|
+
for (; o < i || l < a; ) {
|
|
1459
1459
|
if (t[o] === n[l]) {
|
|
1460
1460
|
o++, l++;
|
|
1461
1461
|
continue;
|
|
1462
1462
|
}
|
|
1463
|
-
for (; t[
|
|
1464
|
-
|
|
1465
|
-
if (
|
|
1466
|
-
const h =
|
|
1467
|
-
for (; l <
|
|
1463
|
+
for (; t[i - 1] === n[a - 1]; )
|
|
1464
|
+
i--, a--;
|
|
1465
|
+
if (i === o) {
|
|
1466
|
+
const h = a < s ? l ? n[l - 1].nextSibling : n[a - l] : u;
|
|
1467
|
+
for (; l < a; )
|
|
1468
1468
|
e.insertBefore(n[l++], h);
|
|
1469
|
-
} else if (
|
|
1470
|
-
for (; o <
|
|
1469
|
+
} else if (a === l)
|
|
1470
|
+
for (; o < i; )
|
|
1471
1471
|
(!d || !d.has(t[o])) && t[o].remove(), o++;
|
|
1472
|
-
else if (t[o] === n[
|
|
1473
|
-
const h = t[--
|
|
1474
|
-
e.insertBefore(n[l++], t[o++].nextSibling), e.insertBefore(n[--
|
|
1472
|
+
else if (t[o] === n[a - 1] && n[l] === t[i - 1]) {
|
|
1473
|
+
const h = t[--i].nextSibling;
|
|
1474
|
+
e.insertBefore(n[l++], t[o++].nextSibling), e.insertBefore(n[--a], h), t[i] = n[a];
|
|
1475
1475
|
} else {
|
|
1476
1476
|
if (!d) {
|
|
1477
1477
|
d = /* @__PURE__ */ new Map();
|
|
1478
1478
|
let f = l;
|
|
1479
|
-
for (; f <
|
|
1479
|
+
for (; f < a; )
|
|
1480
1480
|
d.set(n[f], f++);
|
|
1481
1481
|
}
|
|
1482
1482
|
const h = d.get(t[o]);
|
|
1483
1483
|
if (h != null)
|
|
1484
|
-
if (l < h && h <
|
|
1484
|
+
if (l < h && h < a) {
|
|
1485
1485
|
let f = o, y = 1, b;
|
|
1486
|
-
for (; ++f <
|
|
1486
|
+
for (; ++f < i && f < a && !((b = d.get(t[f])) == null || b !== h + y); )
|
|
1487
1487
|
y++;
|
|
1488
1488
|
if (y > h - l) {
|
|
1489
1489
|
const E = t[o];
|
|
@@ -1500,129 +1500,129 @@ function Ci(e, t, n) {
|
|
|
1500
1500
|
}
|
|
1501
1501
|
var vt = "_$DX_DELEGATE";
|
|
1502
1502
|
function rr(e, t, n, s = {}) {
|
|
1503
|
-
let
|
|
1504
|
-
return Re((
|
|
1505
|
-
|
|
1503
|
+
let i;
|
|
1504
|
+
return Re((a) => {
|
|
1505
|
+
i = a, t === document ? e() : Gn(t, e(), t.firstChild ? null : void 0, n);
|
|
1506
1506
|
}, s.owner), () => {
|
|
1507
|
-
|
|
1507
|
+
i(), t.textContent = "";
|
|
1508
1508
|
};
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function Tl(e, t, n) {
|
|
1511
1511
|
let s;
|
|
1512
|
-
const
|
|
1512
|
+
const i = () => {
|
|
1513
1513
|
const o = document.createElement("template");
|
|
1514
1514
|
return o.innerHTML = e, o.content.firstChild;
|
|
1515
|
-
},
|
|
1516
|
-
return
|
|
1515
|
+
}, a = () => (s || (s = i())).cloneNode(!0);
|
|
1516
|
+
return a.cloneNode = a, a;
|
|
1517
1517
|
}
|
|
1518
|
-
function
|
|
1518
|
+
function Ta(e, t = window.document) {
|
|
1519
1519
|
const n = t[vt] || (t[vt] = /* @__PURE__ */ new Set());
|
|
1520
|
-
for (let s = 0,
|
|
1521
|
-
const
|
|
1522
|
-
n.has(
|
|
1520
|
+
for (let s = 0, i = e.length; s < i; s++) {
|
|
1521
|
+
const a = e[s];
|
|
1522
|
+
n.has(a) || (n.add(a), t.addEventListener(a, ir));
|
|
1523
1523
|
}
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1525
|
+
function kl(e = window.document) {
|
|
1526
1526
|
if (e[vt]) {
|
|
1527
1527
|
for (let t of e[vt].keys())
|
|
1528
|
-
e.removeEventListener(t,
|
|
1528
|
+
e.removeEventListener(t, ir);
|
|
1529
1529
|
delete e[vt];
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
1532
|
function In(e, t, n) {
|
|
1533
1533
|
T.context && e.isConnected || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function ka(e, t, n, s) {
|
|
1536
1536
|
T.context && e.isConnected || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function Pa(e, t) {
|
|
1539
1539
|
T.context && e.isConnected || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function _a(e, t, n, s) {
|
|
1542
1542
|
if (s)
|
|
1543
1543
|
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
1544
1544
|
else if (Array.isArray(n)) {
|
|
1545
|
-
const
|
|
1546
|
-
e.addEventListener(t, n[0] = (
|
|
1545
|
+
const i = n[0];
|
|
1546
|
+
e.addEventListener(t, n[0] = (a) => i.call(e, n[1], a));
|
|
1547
1547
|
} else
|
|
1548
1548
|
e.addEventListener(t, n);
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1551
|
-
const s = Object.keys(t || {}),
|
|
1552
|
-
let
|
|
1553
|
-
for (
|
|
1554
|
-
const l = a
|
|
1550
|
+
function Oa(e, t, n = {}) {
|
|
1551
|
+
const s = Object.keys(t || {}), i = Object.keys(n);
|
|
1552
|
+
let a, o;
|
|
1553
|
+
for (a = 0, o = i.length; a < o; a++) {
|
|
1554
|
+
const l = i[a];
|
|
1555
1555
|
!l || l === "undefined" || t[l] || (Ts(e, l, !1), delete n[l]);
|
|
1556
1556
|
}
|
|
1557
|
-
for (
|
|
1558
|
-
const l = s[
|
|
1557
|
+
for (a = 0, o = s.length; a < o; a++) {
|
|
1558
|
+
const l = s[a], u = !!t[l];
|
|
1559
1559
|
!l || l === "undefined" || n[l] === u || !u || (Ts(e, l, !0), n[l] = u);
|
|
1560
1560
|
}
|
|
1561
1561
|
return n;
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function Ra(e, t, n) {
|
|
1564
1564
|
if (!t)
|
|
1565
1565
|
return n ? In(e, "style") : t;
|
|
1566
1566
|
const s = e.style;
|
|
1567
1567
|
if (typeof t == "string")
|
|
1568
1568
|
return s.cssText = t;
|
|
1569
1569
|
typeof n == "string" && (s.cssText = n = void 0), n || (n = {}), t || (t = {});
|
|
1570
|
-
let
|
|
1571
|
-
for (
|
|
1572
|
-
t[
|
|
1573
|
-
for (
|
|
1574
|
-
|
|
1570
|
+
let i, a;
|
|
1571
|
+
for (a in n)
|
|
1572
|
+
t[a] == null && s.removeProperty(a), delete n[a];
|
|
1573
|
+
for (a in t)
|
|
1574
|
+
i = t[a], i !== n[a] && (s.setProperty(a, i), n[a] = i);
|
|
1575
1575
|
return n;
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1578
|
-
const
|
|
1579
|
-
return s || Ie(() =>
|
|
1577
|
+
function Ia(e, t = {}, n, s) {
|
|
1578
|
+
const i = {};
|
|
1579
|
+
return s || Ie(() => i.children = Et(e, t.children, i.children)), Ie(() => typeof t.ref == "function" && Ga(t.ref, e)), Ie(() => Da(e, t, n, !0, i, !0)), i;
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function Ga(e, t, n) {
|
|
1582
1582
|
return ee(() => e(t, n));
|
|
1583
1583
|
}
|
|
1584
1584
|
function Gn(e, t, n, s) {
|
|
1585
1585
|
if (n !== void 0 && !s && (s = []), typeof t != "function")
|
|
1586
1586
|
return Et(e, t, s, n);
|
|
1587
|
-
Ie((
|
|
1587
|
+
Ie((i) => Et(e, t(), i, n), s);
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function Da(e, t, n, s, i = {}, a = !1) {
|
|
1590
1590
|
t || (t = {});
|
|
1591
|
-
for (const o in
|
|
1591
|
+
for (const o in i)
|
|
1592
1592
|
if (!(o in t)) {
|
|
1593
1593
|
if (o === "children")
|
|
1594
1594
|
continue;
|
|
1595
|
-
|
|
1595
|
+
i[o] = ks(e, o, null, i[o], n, a);
|
|
1596
1596
|
}
|
|
1597
1597
|
for (const o in t) {
|
|
1598
1598
|
if (o === "children")
|
|
1599
1599
|
continue;
|
|
1600
1600
|
const l = t[o];
|
|
1601
|
-
|
|
1601
|
+
i[o] = ks(e, o, l, i[o], n, a);
|
|
1602
1602
|
}
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function La(e) {
|
|
1605
1605
|
let t, n;
|
|
1606
|
-
return !T.context || !(t = T.registry.get(n =
|
|
1606
|
+
return !T.context || !(t = T.registry.get(n = Fa())) ? e() : (T.completed && T.completed.add(t), T.registry.delete(n), t);
|
|
1607
1607
|
}
|
|
1608
|
-
function
|
|
1608
|
+
function Ua(e) {
|
|
1609
1609
|
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
1610
1610
|
}
|
|
1611
1611
|
function Ts(e, t, n) {
|
|
1612
1612
|
const s = t.trim().split(/\s+/);
|
|
1613
|
-
for (let
|
|
1614
|
-
e.classList.toggle(s[
|
|
1613
|
+
for (let i = 0, a = s.length; i < a; i++)
|
|
1614
|
+
e.classList.toggle(s[i], n);
|
|
1615
1615
|
}
|
|
1616
|
-
function ks(e, t, n, s,
|
|
1616
|
+
function ks(e, t, n, s, i, a) {
|
|
1617
1617
|
let o, l, u, d, h;
|
|
1618
1618
|
if (t === "style")
|
|
1619
|
-
return
|
|
1619
|
+
return Ra(e, n, s);
|
|
1620
1620
|
if (t === "classList")
|
|
1621
|
-
return
|
|
1621
|
+
return Oa(e, n, s);
|
|
1622
1622
|
if (n === s)
|
|
1623
1623
|
return s;
|
|
1624
1624
|
if (t === "ref")
|
|
1625
|
-
|
|
1625
|
+
a || n(e);
|
|
1626
1626
|
else if (t.slice(0, 3) === "on:") {
|
|
1627
1627
|
const f = t.slice(3);
|
|
1628
1628
|
s && e.removeEventListener(f, s), n && e.addEventListener(f, n);
|
|
@@ -1630,27 +1630,27 @@ function ks(e, t, n, s, a, i) {
|
|
|
1630
1630
|
const f = t.slice(10);
|
|
1631
1631
|
s && e.removeEventListener(f, s, !0), n && e.addEventListener(f, n, !0);
|
|
1632
1632
|
} else if (t.slice(0, 2) === "on") {
|
|
1633
|
-
const f = t.slice(2).toLowerCase(), y =
|
|
1633
|
+
const f = t.slice(2).toLowerCase(), y = Sa.has(f);
|
|
1634
1634
|
if (!y && s) {
|
|
1635
1635
|
const b = Array.isArray(s) ? s[0] : s;
|
|
1636
1636
|
e.removeEventListener(f, b);
|
|
1637
1637
|
}
|
|
1638
|
-
(y || n) && (
|
|
1638
|
+
(y || n) && (_a(e, f, n, y), y && Ta([f]));
|
|
1639
1639
|
} else if (t.slice(0, 5) === "attr:")
|
|
1640
1640
|
In(e, t.slice(5), n);
|
|
1641
|
-
else if ((h = t.slice(0, 5) === "prop:") || (u =
|
|
1641
|
+
else if ((h = t.slice(0, 5) === "prop:") || (u = ba.has(t)) || !i && ((d = ja(t, e.tagName)) || (l = va.has(t))) || (o = e.nodeName.includes("-"))) {
|
|
1642
1642
|
if (h)
|
|
1643
1643
|
t = t.slice(5), l = !0;
|
|
1644
1644
|
else if (T.context && e.isConnected)
|
|
1645
1645
|
return n;
|
|
1646
|
-
t === "class" || t === "className" ?
|
|
1646
|
+
t === "class" || t === "className" ? Pa(e, n) : o && !l && !u ? e[Ua(t)] = n : e[d || t] = n;
|
|
1647
1647
|
} else {
|
|
1648
|
-
const f =
|
|
1649
|
-
f ?
|
|
1648
|
+
const f = i && t.indexOf(":") > -1 && Ca[t.split(":")[0]];
|
|
1649
|
+
f ? ka(e, f, t, n) : In(e, wa[t] || t, n);
|
|
1650
1650
|
}
|
|
1651
1651
|
return n;
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1653
|
+
function ir(e) {
|
|
1654
1654
|
const t = `$$${e.type}`;
|
|
1655
1655
|
let n = e.composedPath && e.composedPath()[0] || e.target;
|
|
1656
1656
|
for (e.target !== n && Object.defineProperty(e, "target", {
|
|
@@ -1664,16 +1664,16 @@ function ar(e) {
|
|
|
1664
1664
|
}), T.registry && !T.done && (T.done = _$HY.done = !0); n; ) {
|
|
1665
1665
|
const s = n[t];
|
|
1666
1666
|
if (s && !n.disabled) {
|
|
1667
|
-
const
|
|
1668
|
-
if (
|
|
1667
|
+
const i = n[`${t}Data`];
|
|
1668
|
+
if (i !== void 0 ? s.call(n, i, e) : s.call(n, e), e.cancelBubble)
|
|
1669
1669
|
return;
|
|
1670
1670
|
}
|
|
1671
1671
|
n = n._$host || n.parentNode || n.host;
|
|
1672
1672
|
}
|
|
1673
1673
|
}
|
|
1674
|
-
function Et(e, t, n, s,
|
|
1675
|
-
const
|
|
1676
|
-
if (
|
|
1674
|
+
function Et(e, t, n, s, i) {
|
|
1675
|
+
const a = !!T.context && e.isConnected;
|
|
1676
|
+
if (a) {
|
|
1677
1677
|
!n && (n = [...e.childNodes]);
|
|
1678
1678
|
let u = [];
|
|
1679
1679
|
for (let d = 0; d < n.length; d++) {
|
|
@@ -1688,7 +1688,7 @@ function Et(e, t, n, s, a) {
|
|
|
1688
1688
|
return n;
|
|
1689
1689
|
const o = typeof t, l = s !== void 0;
|
|
1690
1690
|
if (e = l && n[0] && n[0].parentNode || e, o === "string" || o === "number") {
|
|
1691
|
-
if (
|
|
1691
|
+
if (a || o === "number" && (t = t.toString(), t === n))
|
|
1692
1692
|
return n;
|
|
1693
1693
|
if (l) {
|
|
1694
1694
|
let u = n[0];
|
|
@@ -1696,7 +1696,7 @@ function Et(e, t, n, s, a) {
|
|
|
1696
1696
|
} else
|
|
1697
1697
|
n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
|
|
1698
1698
|
} else if (t == null || o === "boolean") {
|
|
1699
|
-
if (
|
|
1699
|
+
if (a)
|
|
1700
1700
|
return n;
|
|
1701
1701
|
n = qe(e, n, s);
|
|
1702
1702
|
} else {
|
|
@@ -1709,9 +1709,9 @@ function Et(e, t, n, s, a) {
|
|
|
1709
1709
|
}), () => n;
|
|
1710
1710
|
if (Array.isArray(t)) {
|
|
1711
1711
|
const u = [], d = n && Array.isArray(n);
|
|
1712
|
-
if (Dn(u, t, n,
|
|
1712
|
+
if (Dn(u, t, n, i))
|
|
1713
1713
|
return Ie(() => n = Et(e, u, n, s, !0)), () => n;
|
|
1714
|
-
if (
|
|
1714
|
+
if (a) {
|
|
1715
1715
|
if (!u.length)
|
|
1716
1716
|
return n;
|
|
1717
1717
|
if (s === void 0)
|
|
@@ -1724,10 +1724,10 @@ function Et(e, t, n, s, a) {
|
|
|
1724
1724
|
if (u.length === 0) {
|
|
1725
1725
|
if (n = qe(e, n, s), l)
|
|
1726
1726
|
return n;
|
|
1727
|
-
} else d ? n.length === 0 ? Ps(e, u, s) :
|
|
1727
|
+
} else d ? n.length === 0 ? Ps(e, u, s) : Aa(e, n, u) : (n && qe(e), Ps(e, u));
|
|
1728
1728
|
n = u;
|
|
1729
1729
|
} else if (t.nodeType) {
|
|
1730
|
-
if (
|
|
1730
|
+
if (a && t.parentNode)
|
|
1731
1731
|
return n = l ? [t] : t;
|
|
1732
1732
|
if (Array.isArray(n)) {
|
|
1733
1733
|
if (l)
|
|
@@ -1740,70 +1740,70 @@ function Et(e, t, n, s, a) {
|
|
|
1740
1740
|
return n;
|
|
1741
1741
|
}
|
|
1742
1742
|
function Dn(e, t, n, s) {
|
|
1743
|
-
let
|
|
1744
|
-
for (let
|
|
1745
|
-
let l = t[
|
|
1743
|
+
let i = !1;
|
|
1744
|
+
for (let a = 0, o = t.length; a < o; a++) {
|
|
1745
|
+
let l = t[a], u = n && n[e.length], d;
|
|
1746
1746
|
if (!(l == null || l === !0 || l === !1))
|
|
1747
1747
|
if ((d = typeof l) == "object" && l.nodeType)
|
|
1748
1748
|
e.push(l);
|
|
1749
1749
|
else if (Array.isArray(l))
|
|
1750
|
-
|
|
1750
|
+
i = Dn(e, l, u) || i;
|
|
1751
1751
|
else if (d === "function")
|
|
1752
1752
|
if (s) {
|
|
1753
1753
|
for (; typeof l == "function"; )
|
|
1754
1754
|
l = l();
|
|
1755
|
-
|
|
1755
|
+
i = Dn(e, Array.isArray(l) ? l : [l], Array.isArray(u) ? u : [u]) || i;
|
|
1756
1756
|
} else
|
|
1757
|
-
e.push(l),
|
|
1757
|
+
e.push(l), i = !0;
|
|
1758
1758
|
else {
|
|
1759
1759
|
const h = String(l);
|
|
1760
1760
|
u && u.nodeType === 3 && u.data === h ? e.push(u) : e.push(document.createTextNode(h));
|
|
1761
1761
|
}
|
|
1762
1762
|
}
|
|
1763
|
-
return
|
|
1763
|
+
return i;
|
|
1764
1764
|
}
|
|
1765
1765
|
function Ps(e, t, n = null) {
|
|
1766
|
-
for (let s = 0,
|
|
1766
|
+
for (let s = 0, i = t.length; s < i; s++)
|
|
1767
1767
|
e.insertBefore(t[s], n);
|
|
1768
1768
|
}
|
|
1769
1769
|
function qe(e, t, n, s) {
|
|
1770
1770
|
if (n === void 0)
|
|
1771
1771
|
return e.textContent = "";
|
|
1772
|
-
const
|
|
1772
|
+
const i = s || document.createTextNode("");
|
|
1773
1773
|
if (t.length) {
|
|
1774
|
-
let
|
|
1774
|
+
let a = !1;
|
|
1775
1775
|
for (let o = t.length - 1; o >= 0; o--) {
|
|
1776
1776
|
const l = t[o];
|
|
1777
|
-
if (
|
|
1777
|
+
if (i !== l) {
|
|
1778
1778
|
const u = l.parentNode === e;
|
|
1779
|
-
!
|
|
1779
|
+
!a && !o ? u ? e.replaceChild(i, l) : e.insertBefore(i, n) : u && l.remove();
|
|
1780
1780
|
} else
|
|
1781
|
-
|
|
1781
|
+
a = !0;
|
|
1782
1782
|
}
|
|
1783
1783
|
} else
|
|
1784
|
-
e.insertBefore(
|
|
1785
|
-
return [
|
|
1784
|
+
e.insertBefore(i, n);
|
|
1785
|
+
return [i];
|
|
1786
1786
|
}
|
|
1787
|
-
function
|
|
1787
|
+
function Fa() {
|
|
1788
1788
|
return T.getNextContextId();
|
|
1789
1789
|
}
|
|
1790
|
-
var
|
|
1791
|
-
function
|
|
1792
|
-
return t ? document.createElementNS(
|
|
1790
|
+
var Ba = "http://www.w3.org/2000/svg";
|
|
1791
|
+
function ar(e, t = !1) {
|
|
1792
|
+
return t ? document.createElementNS(Ba, e) : document.createElement(e);
|
|
1793
1793
|
}
|
|
1794
|
-
function
|
|
1794
|
+
function Pl(e) {
|
|
1795
1795
|
const {
|
|
1796
1796
|
useShadow: t
|
|
1797
|
-
} = e, n = document.createTextNode(""), s = () => e.mount || document.body,
|
|
1798
|
-
let
|
|
1797
|
+
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, i = As();
|
|
1798
|
+
let a, o = !!T.context;
|
|
1799
1799
|
return Hs(() => {
|
|
1800
|
-
o && (As().user = o = !1),
|
|
1800
|
+
o && (As().user = o = !1), a || (a = ia(i, () => ae(() => e.children)));
|
|
1801
1801
|
const l = s();
|
|
1802
1802
|
if (l instanceof HTMLHeadElement) {
|
|
1803
1803
|
const [u, d] = H(!1), h = () => d(!0);
|
|
1804
|
-
Re((f) => Gn(l, () => u() ? f() :
|
|
1804
|
+
Re((f) => Gn(l, () => u() ? f() : a(), null)), wt(h);
|
|
1805
1805
|
} else {
|
|
1806
|
-
const u =
|
|
1806
|
+
const u = ar(e.isSVG ? "g" : "div", e.isSVG), d = t && u.attachShadow ? u.attachShadow({
|
|
1807
1807
|
mode: "open"
|
|
1808
1808
|
}) : u;
|
|
1809
1809
|
Object.defineProperty(u, "_$host", {
|
|
@@ -1811,26 +1811,26 @@ function kl(e) {
|
|
|
1811
1811
|
return n.parentNode;
|
|
1812
1812
|
},
|
|
1813
1813
|
configurable: !0
|
|
1814
|
-
}), Gn(d,
|
|
1814
|
+
}), Gn(d, a), l.appendChild(u), e.ref && e.ref(u), wt(() => l.removeChild(u));
|
|
1815
1815
|
}
|
|
1816
1816
|
}, void 0, {
|
|
1817
1817
|
render: !o
|
|
1818
1818
|
}), n;
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1821
|
-
const [t, n] =
|
|
1822
|
-
return
|
|
1823
|
-
const
|
|
1824
|
-
switch (typeof
|
|
1820
|
+
function _l(e) {
|
|
1821
|
+
const [t, n] = ya(e, ["component"]), s = ae(() => t.component);
|
|
1822
|
+
return ae(() => {
|
|
1823
|
+
const i = s();
|
|
1824
|
+
switch (typeof i) {
|
|
1825
1825
|
case "function":
|
|
1826
|
-
return ee(() =>
|
|
1826
|
+
return ee(() => i(n));
|
|
1827
1827
|
case "string":
|
|
1828
|
-
const
|
|
1829
|
-
return
|
|
1828
|
+
const a = Na.has(i), o = T.context ? La() : ar(i, a);
|
|
1829
|
+
return Ia(o, n, a), o;
|
|
1830
1830
|
}
|
|
1831
1831
|
});
|
|
1832
1832
|
}
|
|
1833
|
-
var
|
|
1833
|
+
var Ma = class {
|
|
1834
1834
|
constructor() {
|
|
1835
1835
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
1836
1836
|
}
|
|
@@ -1848,7 +1848,7 @@ var Bi = class {
|
|
|
1848
1848
|
}
|
|
1849
1849
|
}, or = class {
|
|
1850
1850
|
constructor(e) {
|
|
1851
|
-
this.generateIdentifier = e, this.kv = new
|
|
1851
|
+
this.generateIdentifier = e, this.kv = new Ma();
|
|
1852
1852
|
}
|
|
1853
1853
|
register(e, t) {
|
|
1854
1854
|
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
@@ -1862,7 +1862,7 @@ var Bi = class {
|
|
|
1862
1862
|
getValue(e) {
|
|
1863
1863
|
return this.kv.getByKey(e);
|
|
1864
1864
|
}
|
|
1865
|
-
},
|
|
1865
|
+
}, $a = class extends or {
|
|
1866
1866
|
constructor() {
|
|
1867
1867
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
1868
1868
|
}
|
|
@@ -1873,7 +1873,7 @@ var Bi = class {
|
|
|
1873
1873
|
return this.classToAllowedProps.get(e);
|
|
1874
1874
|
}
|
|
1875
1875
|
};
|
|
1876
|
-
function
|
|
1876
|
+
function qa(e) {
|
|
1877
1877
|
if ("values" in Object)
|
|
1878
1878
|
return Object.values(e);
|
|
1879
1879
|
const t = [];
|
|
@@ -1881,15 +1881,15 @@ function $i(e) {
|
|
|
1881
1881
|
e.hasOwnProperty(n) && t.push(e[n]);
|
|
1882
1882
|
return t;
|
|
1883
1883
|
}
|
|
1884
|
-
function
|
|
1885
|
-
const n =
|
|
1884
|
+
function Va(e, t) {
|
|
1885
|
+
const n = qa(e);
|
|
1886
1886
|
if ("find" in n)
|
|
1887
1887
|
return n.find(t);
|
|
1888
1888
|
const s = n;
|
|
1889
|
-
for (let
|
|
1890
|
-
const
|
|
1891
|
-
if (t(
|
|
1892
|
-
return
|
|
1889
|
+
for (let i = 0; i < s.length; i++) {
|
|
1890
|
+
const a = s[i];
|
|
1891
|
+
if (t(a))
|
|
1892
|
+
return a;
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
function ot(e, t) {
|
|
@@ -1905,7 +1905,7 @@ function _s(e, t) {
|
|
|
1905
1905
|
return s;
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
|
-
var
|
|
1908
|
+
var Ka = class {
|
|
1909
1909
|
constructor() {
|
|
1910
1910
|
this.transfomers = {};
|
|
1911
1911
|
}
|
|
@@ -1913,25 +1913,25 @@ var Vi = class {
|
|
|
1913
1913
|
this.transfomers[e.name] = e;
|
|
1914
1914
|
}
|
|
1915
1915
|
findApplicable(e) {
|
|
1916
|
-
return
|
|
1916
|
+
return Va(this.transfomers, (t) => t.isApplicable(e));
|
|
1917
1917
|
}
|
|
1918
1918
|
findByName(e) {
|
|
1919
1919
|
return this.transfomers[e];
|
|
1920
1920
|
}
|
|
1921
|
-
},
|
|
1921
|
+
}, Wa = (e) => Object.prototype.toString.call(e).slice(8, -1), lr = (e) => typeof e > "u", za = (e) => e === null, jt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Ln = (e) => jt(e) && Object.keys(e).length === 0, Ae = (e) => Array.isArray(e), Ha = (e) => typeof e == "string", Qa = (e) => typeof e == "number" && !isNaN(e), Ya = (e) => typeof e == "boolean", Ja = (e) => e instanceof RegExp, St = (e) => e instanceof Map, Nt = (e) => e instanceof Set, cr = (e) => Wa(e) === "Symbol", Xa = (e) => e instanceof Date && !isNaN(e.valueOf()), Za = (e) => e instanceof Error, Os = (e) => typeof e == "number" && isNaN(e), eo = (e) => Ya(e) || za(e) || lr(e) || Qa(e) || Ha(e) || cr(e), to = (e) => typeof e == "bigint", no = (e) => e === 1 / 0 || e === -1 / 0, so = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), ro = (e) => e instanceof URL, ur = (e) => e.replace(/\./g, "\\."), An = (e) => e.map(String).map(ur).join("."), bt = (e) => {
|
|
1922
1922
|
const t = [];
|
|
1923
1923
|
let n = "";
|
|
1924
|
-
for (let
|
|
1925
|
-
let
|
|
1926
|
-
if (
|
|
1927
|
-
n += ".",
|
|
1924
|
+
for (let i = 0; i < e.length; i++) {
|
|
1925
|
+
let a = e.charAt(i);
|
|
1926
|
+
if (a === "\\" && e.charAt(i + 1) === ".") {
|
|
1927
|
+
n += ".", i++;
|
|
1928
1928
|
continue;
|
|
1929
1929
|
}
|
|
1930
|
-
if (
|
|
1930
|
+
if (a === ".") {
|
|
1931
1931
|
t.push(n), n = "";
|
|
1932
1932
|
continue;
|
|
1933
1933
|
}
|
|
1934
|
-
n +=
|
|
1934
|
+
n += a;
|
|
1935
1935
|
}
|
|
1936
1936
|
const s = n;
|
|
1937
1937
|
return t.push(s), t;
|
|
@@ -1947,9 +1947,9 @@ function me(e, t, n, s) {
|
|
|
1947
1947
|
var dr = [
|
|
1948
1948
|
me(lr, "undefined", () => null, () => {
|
|
1949
1949
|
}),
|
|
1950
|
-
me(
|
|
1951
|
-
me(
|
|
1952
|
-
me(
|
|
1950
|
+
me(to, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
1951
|
+
me(Xa, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
1952
|
+
me(Za, "Error", (e, t) => {
|
|
1953
1953
|
const n = {
|
|
1954
1954
|
name: e.name,
|
|
1955
1955
|
message: e.message
|
|
@@ -1963,7 +1963,7 @@ var dr = [
|
|
|
1963
1963
|
n[s] = e[s];
|
|
1964
1964
|
}), n;
|
|
1965
1965
|
}),
|
|
1966
|
-
me(
|
|
1966
|
+
me(Ja, "regexp", (e) => "" + e, (e) => {
|
|
1967
1967
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
1968
1968
|
return new RegExp(t, n);
|
|
1969
1969
|
}),
|
|
@@ -1976,9 +1976,9 @@ var dr = [
|
|
|
1976
1976
|
(e) => new Set(e)
|
|
1977
1977
|
),
|
|
1978
1978
|
me(St, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
1979
|
-
me((e) => Os(e) ||
|
|
1979
|
+
me((e) => Os(e) || no(e), "number", (e) => Os(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
1980
1980
|
me((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
1981
|
-
me(
|
|
1981
|
+
me(ro, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
1982
1982
|
];
|
|
1983
1983
|
function hn(e, t, n, s) {
|
|
1984
1984
|
return {
|
|
@@ -1993,7 +1993,7 @@ var fr = hn((e, t) => cr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
1993
1993
|
if (!s)
|
|
1994
1994
|
throw new Error("Trying to deserialize unknown symbol");
|
|
1995
1995
|
return s;
|
|
1996
|
-
}),
|
|
1996
|
+
}), io = [
|
|
1997
1997
|
Int8Array,
|
|
1998
1998
|
Uint8Array,
|
|
1999
1999
|
Int16Array,
|
|
@@ -2003,8 +2003,8 @@ var fr = hn((e, t) => cr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
2003
2003
|
Float32Array,
|
|
2004
2004
|
Float64Array,
|
|
2005
2005
|
Uint8ClampedArray
|
|
2006
|
-
].reduce((e, t) => (e[t.name] = t, e), {}), hr = hn(
|
|
2007
|
-
const n =
|
|
2006
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), hr = hn(so, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
2007
|
+
const n = io[t[1]];
|
|
2008
2008
|
if (!n)
|
|
2009
2009
|
throw new Error("Trying to deserialize unknown typed array");
|
|
2010
2010
|
return new n(e);
|
|
@@ -2017,8 +2017,8 @@ var mr = hn(gr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
2017
2017
|
if (!n)
|
|
2018
2018
|
return { ...e };
|
|
2019
2019
|
const s = {};
|
|
2020
|
-
return n.forEach((
|
|
2021
|
-
s[
|
|
2020
|
+
return n.forEach((i) => {
|
|
2021
|
+
s[i] = e[i];
|
|
2022
2022
|
}), s;
|
|
2023
2023
|
}, (e, t, n) => {
|
|
2024
2024
|
const s = n.classRegistry.getValue(t[1]);
|
|
@@ -2031,13 +2031,13 @@ var mr = hn(gr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
2031
2031
|
throw new Error("Trying to deserialize unknown custom value");
|
|
2032
2032
|
return s.deserialize(e);
|
|
2033
2033
|
}), ao = [mr, fr, yr, hr], Rs = (e, t) => {
|
|
2034
|
-
const n = _s(ao, (
|
|
2034
|
+
const n = _s(ao, (i) => i.isApplicable(e, t));
|
|
2035
2035
|
if (n)
|
|
2036
2036
|
return {
|
|
2037
2037
|
value: n.transform(e, t),
|
|
2038
2038
|
type: n.annotation(e, t)
|
|
2039
2039
|
};
|
|
2040
|
-
const s = _s(dr, (
|
|
2040
|
+
const s = _s(dr, (i) => i.isApplicable(e, t));
|
|
2041
2041
|
if (s)
|
|
2042
2042
|
return {
|
|
2043
2043
|
value: s.transform(e, t),
|
|
@@ -2047,7 +2047,7 @@ var mr = hn(gr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
2047
2047
|
dr.forEach((e) => {
|
|
2048
2048
|
xr[e.annotation] = e;
|
|
2049
2049
|
});
|
|
2050
|
-
var
|
|
2050
|
+
var oo = (e, t, n) => {
|
|
2051
2051
|
if (Ae(t))
|
|
2052
2052
|
switch (t[0]) {
|
|
2053
2053
|
case "symbol":
|
|
@@ -2081,15 +2081,15 @@ function pr(e) {
|
|
|
2081
2081
|
if (Zt(e, "constructor"))
|
|
2082
2082
|
throw new Error("constructor is not allowed as a property");
|
|
2083
2083
|
}
|
|
2084
|
-
var
|
|
2084
|
+
var lo = (e, t) => {
|
|
2085
2085
|
pr(t);
|
|
2086
2086
|
for (let n = 0; n < t.length; n++) {
|
|
2087
2087
|
const s = t[n];
|
|
2088
2088
|
if (Nt(e))
|
|
2089
2089
|
e = Ve(e, +s);
|
|
2090
2090
|
else if (St(e)) {
|
|
2091
|
-
const
|
|
2092
|
-
switch (
|
|
2091
|
+
const i = +s, a = +t[++n] == 0 ? "key" : "value", o = Ve(e, i);
|
|
2092
|
+
switch (a) {
|
|
2093
2093
|
case "key":
|
|
2094
2094
|
e = o;
|
|
2095
2095
|
break;
|
|
@@ -2105,8 +2105,8 @@ var oo = (e, t) => {
|
|
|
2105
2105
|
if (pr(t), t.length === 0)
|
|
2106
2106
|
return n(e);
|
|
2107
2107
|
let s = e;
|
|
2108
|
-
for (let
|
|
2109
|
-
const o = t[
|
|
2108
|
+
for (let a = 0; a < t.length - 1; a++) {
|
|
2109
|
+
const o = t[a];
|
|
2110
2110
|
if (Ae(s)) {
|
|
2111
2111
|
const l = +o;
|
|
2112
2112
|
s = s[l];
|
|
@@ -2116,9 +2116,9 @@ var oo = (e, t) => {
|
|
|
2116
2116
|
const l = +o;
|
|
2117
2117
|
s = Ve(s, l);
|
|
2118
2118
|
} else if (St(s)) {
|
|
2119
|
-
if (
|
|
2119
|
+
if (a === t.length - 2)
|
|
2120
2120
|
break;
|
|
2121
|
-
const u = +o, d = +t[++
|
|
2121
|
+
const u = +o, d = +t[++a] == 0 ? "key" : "value", h = Ve(s, u);
|
|
2122
2122
|
switch (d) {
|
|
2123
2123
|
case "key":
|
|
2124
2124
|
s = h;
|
|
@@ -2129,14 +2129,14 @@ var oo = (e, t) => {
|
|
|
2129
2129
|
}
|
|
2130
2130
|
}
|
|
2131
2131
|
}
|
|
2132
|
-
const
|
|
2133
|
-
if (Ae(s) ? s[+
|
|
2134
|
-
const
|
|
2135
|
-
|
|
2132
|
+
const i = t[t.length - 1];
|
|
2133
|
+
if (Ae(s) ? s[+i] = n(s[+i]) : jt(s) && (s[i] = n(s[i])), Nt(s)) {
|
|
2134
|
+
const a = Ve(s, +i), o = n(a);
|
|
2135
|
+
a !== o && (s.delete(a), s.add(o));
|
|
2136
2136
|
}
|
|
2137
2137
|
if (St(s)) {
|
|
2138
|
-
const
|
|
2139
|
-
switch (+
|
|
2138
|
+
const a = +t[t.length - 2], o = Ve(s, a);
|
|
2139
|
+
switch (+i == 0 ? "key" : "value") {
|
|
2140
2140
|
case "key": {
|
|
2141
2141
|
const u = n(o);
|
|
2142
2142
|
s.set(u, s.get(o)), u !== o && s.delete(o);
|
|
@@ -2154,62 +2154,62 @@ function Fn(e, t, n = []) {
|
|
|
2154
2154
|
if (!e)
|
|
2155
2155
|
return;
|
|
2156
2156
|
if (!Ae(e)) {
|
|
2157
|
-
ot(e, (
|
|
2157
|
+
ot(e, (a, o) => Fn(a, t, [...n, ...bt(o)]));
|
|
2158
2158
|
return;
|
|
2159
2159
|
}
|
|
2160
|
-
const [s,
|
|
2161
|
-
|
|
2162
|
-
Fn(
|
|
2160
|
+
const [s, i] = e;
|
|
2161
|
+
i && ot(i, (a, o) => {
|
|
2162
|
+
Fn(a, t, [...n, ...bt(o)]);
|
|
2163
2163
|
}), t(s, n);
|
|
2164
2164
|
}
|
|
2165
|
-
function
|
|
2166
|
-
return Fn(t, (s,
|
|
2167
|
-
e = Un(e,
|
|
2165
|
+
function co(e, t, n) {
|
|
2166
|
+
return Fn(t, (s, i) => {
|
|
2167
|
+
e = Un(e, i, (a) => oo(a, s, n));
|
|
2168
2168
|
}), e;
|
|
2169
2169
|
}
|
|
2170
|
-
function
|
|
2171
|
-
function n(s,
|
|
2172
|
-
const
|
|
2170
|
+
function uo(e, t) {
|
|
2171
|
+
function n(s, i) {
|
|
2172
|
+
const a = lo(e, bt(i));
|
|
2173
2173
|
s.map(bt).forEach((o) => {
|
|
2174
|
-
e = Un(e, o, () =>
|
|
2174
|
+
e = Un(e, o, () => a);
|
|
2175
2175
|
});
|
|
2176
2176
|
}
|
|
2177
2177
|
if (Ae(t)) {
|
|
2178
|
-
const [s,
|
|
2179
|
-
s.forEach((
|
|
2180
|
-
e = Un(e, bt(
|
|
2181
|
-
}),
|
|
2178
|
+
const [s, i] = t;
|
|
2179
|
+
s.forEach((a) => {
|
|
2180
|
+
e = Un(e, bt(a), () => e);
|
|
2181
|
+
}), i && ot(i, n);
|
|
2182
2182
|
} else
|
|
2183
2183
|
ot(t, n);
|
|
2184
2184
|
return e;
|
|
2185
2185
|
}
|
|
2186
|
-
var
|
|
2187
|
-
function
|
|
2186
|
+
var fo = (e, t) => jt(e) || Ae(e) || St(e) || Nt(e) || gr(e, t);
|
|
2187
|
+
function ho(e, t, n) {
|
|
2188
2188
|
const s = n.get(e);
|
|
2189
2189
|
s ? s.push(t) : n.set(e, [t]);
|
|
2190
2190
|
}
|
|
2191
|
-
function
|
|
2191
|
+
function go(e, t) {
|
|
2192
2192
|
const n = {};
|
|
2193
2193
|
let s;
|
|
2194
|
-
return e.forEach((
|
|
2195
|
-
if (
|
|
2194
|
+
return e.forEach((i) => {
|
|
2195
|
+
if (i.length <= 1)
|
|
2196
2196
|
return;
|
|
2197
|
-
t || (
|
|
2198
|
-
const [
|
|
2199
|
-
|
|
2197
|
+
t || (i = i.map((l) => l.map(String)).sort((l, u) => l.length - u.length));
|
|
2198
|
+
const [a, ...o] = i;
|
|
2199
|
+
a.length === 0 ? s = o.map(An) : n[An(a)] = o.map(An);
|
|
2200
2200
|
}), s ? Ln(n) ? [s] : [s, n] : Ln(n) ? void 0 : n;
|
|
2201
2201
|
}
|
|
2202
|
-
var vr = (e, t, n, s,
|
|
2203
|
-
const l =
|
|
2202
|
+
var vr = (e, t, n, s, i = [], a = [], o = /* @__PURE__ */ new Map()) => {
|
|
2203
|
+
const l = eo(e);
|
|
2204
2204
|
if (!l) {
|
|
2205
|
-
|
|
2205
|
+
ho(e, i, t);
|
|
2206
2206
|
const b = o.get(e);
|
|
2207
2207
|
if (b)
|
|
2208
2208
|
return s ? {
|
|
2209
2209
|
transformedValue: null
|
|
2210
2210
|
} : b;
|
|
2211
2211
|
}
|
|
2212
|
-
if (!
|
|
2212
|
+
if (!fo(e, n)) {
|
|
2213
2213
|
const b = Rs(e, n), E = b ? {
|
|
2214
2214
|
transformedValue: b.value,
|
|
2215
2215
|
annotations: [b.type]
|
|
@@ -2218,7 +2218,7 @@ var vr = (e, t, n, s, a = [], i = [], o = /* @__PURE__ */ new Map()) => {
|
|
|
2218
2218
|
};
|
|
2219
2219
|
return l || o.set(e, E), E;
|
|
2220
2220
|
}
|
|
2221
|
-
if (Zt(
|
|
2221
|
+
if (Zt(a, e))
|
|
2222
2222
|
return {
|
|
2223
2223
|
transformedValue: null
|
|
2224
2224
|
};
|
|
@@ -2226,7 +2226,7 @@ var vr = (e, t, n, s, a = [], i = [], o = /* @__PURE__ */ new Map()) => {
|
|
|
2226
2226
|
ot(d, (b, E) => {
|
|
2227
2227
|
if (E === "__proto__" || E === "constructor" || E === "prototype")
|
|
2228
2228
|
throw new Error(`Detected property ${E}. This is a prototype pollution risk, please remove it from your object.`);
|
|
2229
|
-
const A = vr(b, t, n, s, [...
|
|
2229
|
+
const A = vr(b, t, n, s, [...i, E], [...a, e], o);
|
|
2230
2230
|
h[E] = A.transformedValue, Ae(A.annotations) ? f[E] = A.annotations : jt(A.annotations) && ot(A.annotations, (w, g) => {
|
|
2231
2231
|
f[ur(E) + "." + g] = w;
|
|
2232
2232
|
});
|
|
@@ -2246,15 +2246,15 @@ function br(e) {
|
|
|
2246
2246
|
function Is(e) {
|
|
2247
2247
|
return br(e) === "Array";
|
|
2248
2248
|
}
|
|
2249
|
-
function
|
|
2249
|
+
function mo(e) {
|
|
2250
2250
|
if (br(e) !== "Object")
|
|
2251
2251
|
return !1;
|
|
2252
2252
|
const t = Object.getPrototypeOf(e);
|
|
2253
2253
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
2254
2254
|
}
|
|
2255
|
-
function
|
|
2256
|
-
const
|
|
2257
|
-
|
|
2255
|
+
function yo(e, t, n, s, i) {
|
|
2256
|
+
const a = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
|
|
2257
|
+
a === "enumerable" && (e[t] = n), i && a === "nonenumerable" && Object.defineProperty(e, t, {
|
|
2258
2258
|
value: n,
|
|
2259
2259
|
enumerable: !1,
|
|
2260
2260
|
writable: !0,
|
|
@@ -2263,15 +2263,15 @@ function mo(e, t, n, s, a) {
|
|
|
2263
2263
|
}
|
|
2264
2264
|
function Bn(e, t = {}) {
|
|
2265
2265
|
if (Is(e))
|
|
2266
|
-
return e.map((
|
|
2267
|
-
if (!
|
|
2266
|
+
return e.map((i) => Bn(i, t));
|
|
2267
|
+
if (!mo(e))
|
|
2268
2268
|
return e;
|
|
2269
2269
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
2270
|
-
return [...n, ...s].reduce((
|
|
2271
|
-
if (Is(t.props) && !t.props.includes(
|
|
2272
|
-
return
|
|
2273
|
-
const o = e[
|
|
2274
|
-
return
|
|
2270
|
+
return [...n, ...s].reduce((i, a) => {
|
|
2271
|
+
if (Is(t.props) && !t.props.includes(a))
|
|
2272
|
+
return i;
|
|
2273
|
+
const o = e[a], l = Bn(o, t);
|
|
2274
|
+
return yo(i, a, l, e, t.nonenumerable), i;
|
|
2275
2275
|
}, {});
|
|
2276
2276
|
}
|
|
2277
2277
|
var F = class {
|
|
@@ -2279,7 +2279,7 @@ var F = class {
|
|
|
2279
2279
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
2280
2280
|
*/
|
|
2281
2281
|
constructor({ dedupe: e = !1 } = {}) {
|
|
2282
|
-
this.classRegistry = new
|
|
2282
|
+
this.classRegistry = new $a(), this.symbolRegistry = new or((t) => t.description ?? ""), this.customTransformerRegistry = new Ka(), this.allowedErrorProps = [], this.dedupe = e;
|
|
2283
2283
|
}
|
|
2284
2284
|
serialize(e) {
|
|
2285
2285
|
const t = /* @__PURE__ */ new Map(), n = vr(e, t, this, this.dedupe), s = {
|
|
@@ -2289,16 +2289,16 @@ var F = class {
|
|
|
2289
2289
|
...s.meta,
|
|
2290
2290
|
values: n.annotations
|
|
2291
2291
|
});
|
|
2292
|
-
const
|
|
2293
|
-
return
|
|
2292
|
+
const i = go(t, this.dedupe);
|
|
2293
|
+
return i && (s.meta = {
|
|
2294
2294
|
...s.meta,
|
|
2295
|
-
referentialEqualities:
|
|
2295
|
+
referentialEqualities: i
|
|
2296
2296
|
}), s;
|
|
2297
2297
|
}
|
|
2298
2298
|
deserialize(e) {
|
|
2299
2299
|
const { json: t, meta: n } = e;
|
|
2300
2300
|
let s = Bn(t);
|
|
2301
|
-
return n != null && n.values && (s =
|
|
2301
|
+
return n != null && n.values && (s = co(s, n.values, this)), n != null && n.referentialEqualities && (s = uo(s, n.referentialEqualities)), s;
|
|
2302
2302
|
}
|
|
2303
2303
|
stringify(e) {
|
|
2304
2304
|
return JSON.stringify(this.serialize(e));
|
|
@@ -2331,48 +2331,48 @@ F.registerClass = F.defaultInstance.registerClass.bind(F.defaultInstance);
|
|
|
2331
2331
|
F.registerSymbol = F.defaultInstance.registerSymbol.bind(F.defaultInstance);
|
|
2332
2332
|
F.registerCustom = F.defaultInstance.registerCustom.bind(F.defaultInstance);
|
|
2333
2333
|
F.allowErrorProps = F.defaultInstance.allowErrorProps.bind(F.defaultInstance);
|
|
2334
|
-
var
|
|
2335
|
-
function
|
|
2334
|
+
var xo = F.serialize, Ol = F.stringify;
|
|
2335
|
+
function Rl(e) {
|
|
2336
2336
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
2337
2337
|
}
|
|
2338
|
-
function
|
|
2338
|
+
function Il(e, t) {
|
|
2339
2339
|
return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
2340
2340
|
}
|
|
2341
|
-
function
|
|
2341
|
+
function Gl({
|
|
2342
2342
|
queryState: e,
|
|
2343
2343
|
observerCount: t,
|
|
2344
2344
|
isStale: n
|
|
2345
2345
|
}) {
|
|
2346
2346
|
return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
|
|
2347
2347
|
}
|
|
2348
|
-
function
|
|
2348
|
+
function Dl({
|
|
2349
2349
|
status: e,
|
|
2350
2350
|
isPaused: t
|
|
2351
2351
|
}) {
|
|
2352
2352
|
return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
|
|
2353
2353
|
}
|
|
2354
|
-
function
|
|
2354
|
+
function Ll(e) {
|
|
2355
2355
|
return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
|
|
2356
2356
|
}
|
|
2357
|
-
var
|
|
2357
|
+
var Ul = (e, t = !1) => {
|
|
2358
2358
|
const {
|
|
2359
2359
|
json: n
|
|
2360
|
-
} =
|
|
2360
|
+
} = xo(e);
|
|
2361
2361
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
2362
|
-
}, Ht = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3,
|
|
2363
|
-
status: po,
|
|
2364
|
-
"query hash": xo,
|
|
2365
|
-
"last updated": wr
|
|
2366
|
-
}, Qt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Er = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, vo = (e, t) => Qt(e) === Qt(t) ? Er(e, t) : Qt(e) > Qt(t) ? 1 : -1, Fl = {
|
|
2362
|
+
}, Ht = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, po = (e, t) => e.queryHash.localeCompare(t.queryHash), wr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, vo = (e, t) => Ht(e) === Ht(t) ? wr(e, t) : Ht(e) > Ht(t) ? 1 : -1, Fl = {
|
|
2367
2363
|
status: vo,
|
|
2364
|
+
"query hash": po,
|
|
2365
|
+
"last updated": wr
|
|
2366
|
+
}, Qt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Er = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, bo = (e, t) => Qt(e) === Qt(t) ? Er(e, t) : Qt(e) > Qt(t) ? 1 : -1, Bl = {
|
|
2367
|
+
status: bo,
|
|
2368
2368
|
"last updated": Er
|
|
2369
|
-
},
|
|
2369
|
+
}, Ml = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), $l = () => {
|
|
2370
2370
|
const [e, t] = H("dark");
|
|
2371
|
-
return
|
|
2371
|
+
return ra(() => {
|
|
2372
2372
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2373
2373
|
t(n.matches ? "dark" : "light");
|
|
2374
|
-
const s = (
|
|
2375
|
-
t(
|
|
2374
|
+
const s = (i) => {
|
|
2375
|
+
t(i.matches ? "dark" : "light");
|
|
2376
2376
|
};
|
|
2377
2377
|
n.addEventListener("change", s), wt(() => n.removeEventListener("change", s));
|
|
2378
2378
|
}), e;
|
|
@@ -2383,8 +2383,8 @@ var Ll = (e, t = !1) => {
|
|
|
2383
2383
|
const s = new Map(e);
|
|
2384
2384
|
if (t.length === 1)
|
|
2385
2385
|
return s.set(t[0], n), s;
|
|
2386
|
-
const [
|
|
2387
|
-
return s.set(
|
|
2386
|
+
const [i, ...a] = t;
|
|
2387
|
+
return s.set(i, Yt(s.get(i), a, n)), s;
|
|
2388
2388
|
}
|
|
2389
2389
|
if (e instanceof Set) {
|
|
2390
2390
|
const s = Yt(Array.from(e), t, n);
|
|
@@ -2394,8 +2394,8 @@ var Ll = (e, t = !1) => {
|
|
|
2394
2394
|
const s = [...e];
|
|
2395
2395
|
if (t.length === 1)
|
|
2396
2396
|
return s[t[0]] = n, s;
|
|
2397
|
-
const [
|
|
2398
|
-
return s[
|
|
2397
|
+
const [i, ...a] = t;
|
|
2398
|
+
return s[i] = Yt(s[i], a, n), s;
|
|
2399
2399
|
}
|
|
2400
2400
|
if (e instanceof Object) {
|
|
2401
2401
|
const s = {
|
|
@@ -2403,8 +2403,8 @@ var Ll = (e, t = !1) => {
|
|
|
2403
2403
|
};
|
|
2404
2404
|
if (t.length === 1)
|
|
2405
2405
|
return s[t[0]] = n, s;
|
|
2406
|
-
const [
|
|
2407
|
-
return s[
|
|
2406
|
+
const [i, ...a] = t;
|
|
2407
|
+
return s[i] = Yt(s[i], a, n), s;
|
|
2408
2408
|
}
|
|
2409
2409
|
return e;
|
|
2410
2410
|
}, Jt = (e, t) => {
|
|
@@ -2412,8 +2412,8 @@ var Ll = (e, t = !1) => {
|
|
|
2412
2412
|
const n = new Map(e);
|
|
2413
2413
|
if (t.length === 1)
|
|
2414
2414
|
return n.delete(t[0]), n;
|
|
2415
|
-
const [s, ...
|
|
2416
|
-
return n.set(s, Jt(n.get(s),
|
|
2415
|
+
const [s, ...i] = t;
|
|
2416
|
+
return n.set(s, Jt(n.get(s), i)), n;
|
|
2417
2417
|
}
|
|
2418
2418
|
if (e instanceof Set) {
|
|
2419
2419
|
const n = Jt(Array.from(e), t);
|
|
@@ -2422,9 +2422,9 @@ var Ll = (e, t = !1) => {
|
|
|
2422
2422
|
if (Array.isArray(e)) {
|
|
2423
2423
|
const n = [...e];
|
|
2424
2424
|
if (t.length === 1)
|
|
2425
|
-
return n.filter((
|
|
2426
|
-
const [s, ...
|
|
2427
|
-
return n[s] = Jt(n[s],
|
|
2425
|
+
return n.filter((a, o) => o.toString() !== t[0]);
|
|
2426
|
+
const [s, ...i] = t;
|
|
2427
|
+
return n[s] = Jt(n[s], i), n;
|
|
2428
2428
|
}
|
|
2429
2429
|
if (e instanceof Object) {
|
|
2430
2430
|
const n = {
|
|
@@ -2432,16 +2432,16 @@ var Ll = (e, t = !1) => {
|
|
|
2432
2432
|
};
|
|
2433
2433
|
if (t.length === 1)
|
|
2434
2434
|
return delete n[t[0]], n;
|
|
2435
|
-
const [s, ...
|
|
2436
|
-
return n[s] = Jt(n[s],
|
|
2435
|
+
const [s, ...i] = t;
|
|
2436
|
+
return n[s] = Jt(n[s], i), n;
|
|
2437
2437
|
}
|
|
2438
2438
|
return e;
|
|
2439
2439
|
}, jr = (e, t) => {
|
|
2440
2440
|
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober")))
|
|
2441
2441
|
return;
|
|
2442
|
-
const s = document.createElement("style"),
|
|
2443
|
-
s.appendChild(
|
|
2444
|
-
}, We, Ct, At, Tt, _e, kt, ze, He, Qe, Ye, Je, Xe, Pt, Gs,
|
|
2442
|
+
const s = document.createElement("style"), i = document.createTextNode("");
|
|
2443
|
+
s.appendChild(i), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
2444
|
+
}, We, Ct, At, Tt, _e, kt, ze, He, Qe, Ye, Je, Xe, Pt, Gs, wo = (Gs = class {
|
|
2445
2445
|
constructor(e) {
|
|
2446
2446
|
L(this, We);
|
|
2447
2447
|
L(this, Ct);
|
|
@@ -2460,15 +2460,15 @@ var Ll = (e, t = !1) => {
|
|
|
2460
2460
|
client: t,
|
|
2461
2461
|
queryFlavor: n,
|
|
2462
2462
|
version: s,
|
|
2463
|
-
onlineManager:
|
|
2464
|
-
buttonPosition:
|
|
2463
|
+
onlineManager: i,
|
|
2464
|
+
buttonPosition: a,
|
|
2465
2465
|
position: o,
|
|
2466
2466
|
initialIsOpen: l,
|
|
2467
2467
|
errorTypes: u,
|
|
2468
2468
|
styleNonce: d,
|
|
2469
2469
|
shadowDOMTarget: h
|
|
2470
2470
|
} = e;
|
|
2471
|
-
I(this, We, H(t)), I(this, At, n), I(this, Tt, s), I(this, Ct,
|
|
2471
|
+
I(this, We, H(t)), I(this, At, n), I(this, Tt, s), I(this, Ct, i), I(this, kt, d), I(this, ze, h), I(this, He, H(a)), I(this, Qe, H(o)), I(this, Ye, H(l)), I(this, Je, H(u));
|
|
2472
2472
|
}
|
|
2473
2473
|
setButtonPosition(e) {
|
|
2474
2474
|
N(this, He)[1](e);
|
|
@@ -2489,9 +2489,9 @@ var Ll = (e, t = !1) => {
|
|
|
2489
2489
|
if (N(this, _e))
|
|
2490
2490
|
throw new Error("Devtools is already mounted");
|
|
2491
2491
|
const t = rr(() => {
|
|
2492
|
-
const n = this, [s] = N(this, He), [
|
|
2492
|
+
const n = this, [s] = N(this, He), [i] = N(this, Qe), [a] = N(this, Ye), [o] = N(this, Je), [l] = N(this, We);
|
|
2493
2493
|
let u;
|
|
2494
|
-
return N(this, Xe) ? u = N(this, Xe) : (u = nr(() => import("./BMGNQTAT-
|
|
2494
|
+
return N(this, Xe) ? u = N(this, Xe) : (u = nr(() => import("./BMGNQTAT-D23NAWmi.js")), I(this, Xe, u)), jr(N(this, kt), N(this, ze)), er(u, tr({
|
|
2495
2495
|
get queryFlavor() {
|
|
2496
2496
|
return N(n, At);
|
|
2497
2497
|
},
|
|
@@ -2512,10 +2512,10 @@ var Ll = (e, t = !1) => {
|
|
|
2512
2512
|
return s();
|
|
2513
2513
|
},
|
|
2514
2514
|
get position() {
|
|
2515
|
-
return
|
|
2515
|
+
return i();
|
|
2516
2516
|
},
|
|
2517
2517
|
get initialIsOpen() {
|
|
2518
|
-
return
|
|
2518
|
+
return a();
|
|
2519
2519
|
},
|
|
2520
2520
|
get errorTypes() {
|
|
2521
2521
|
return o();
|
|
@@ -2530,7 +2530,7 @@ var Ll = (e, t = !1) => {
|
|
|
2530
2530
|
throw new Error("Devtools is not mounted");
|
|
2531
2531
|
(e = N(this, Pt)) == null || e.call(this), I(this, _e, !1);
|
|
2532
2532
|
}
|
|
2533
|
-
}, We = new WeakMap(), Ct = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), _e = new WeakMap(), kt = new WeakMap(), ze = new WeakMap(), He = new WeakMap(), Qe = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Xe = new WeakMap(), Pt = new WeakMap(), Gs), Ze, _t, Ot, Rt, Oe, It, et, tt, nt, st, rt,
|
|
2533
|
+
}, We = new WeakMap(), Ct = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), _e = new WeakMap(), kt = new WeakMap(), ze = new WeakMap(), He = new WeakMap(), Qe = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Xe = new WeakMap(), Pt = new WeakMap(), Gs), Ze, _t, Ot, Rt, Oe, It, et, tt, nt, st, rt, it, at, Gt, Ds, Eo = (Ds = class {
|
|
2534
2534
|
constructor(e) {
|
|
2535
2535
|
L(this, Ze);
|
|
2536
2536
|
L(this, _t);
|
|
@@ -2543,15 +2543,15 @@ var Ll = (e, t = !1) => {
|
|
|
2543
2543
|
L(this, nt);
|
|
2544
2544
|
L(this, st);
|
|
2545
2545
|
L(this, rt);
|
|
2546
|
-
L(this, at);
|
|
2547
2546
|
L(this, it);
|
|
2547
|
+
L(this, at);
|
|
2548
2548
|
L(this, Gt);
|
|
2549
2549
|
const {
|
|
2550
2550
|
client: t,
|
|
2551
2551
|
queryFlavor: n,
|
|
2552
2552
|
version: s,
|
|
2553
|
-
onlineManager:
|
|
2554
|
-
buttonPosition:
|
|
2553
|
+
onlineManager: i,
|
|
2554
|
+
buttonPosition: a,
|
|
2555
2555
|
position: o,
|
|
2556
2556
|
initialIsOpen: l,
|
|
2557
2557
|
errorTypes: u,
|
|
@@ -2559,7 +2559,7 @@ var Ll = (e, t = !1) => {
|
|
|
2559
2559
|
shadowDOMTarget: h,
|
|
2560
2560
|
onClose: f
|
|
2561
2561
|
} = e;
|
|
2562
|
-
I(this, Ze, H(t)), I(this, Ot, n), I(this, Rt, s), I(this, _t,
|
|
2562
|
+
I(this, Ze, H(t)), I(this, Ot, n), I(this, Rt, s), I(this, _t, i), I(this, It, d), I(this, et, h), I(this, tt, H(a)), I(this, nt, H(o)), I(this, st, H(l)), I(this, rt, H(u)), I(this, it, H(f));
|
|
2563
2563
|
}
|
|
2564
2564
|
setButtonPosition(e) {
|
|
2565
2565
|
N(this, tt)[1](e);
|
|
@@ -2577,15 +2577,15 @@ var Ll = (e, t = !1) => {
|
|
|
2577
2577
|
N(this, Ze)[1](e);
|
|
2578
2578
|
}
|
|
2579
2579
|
setOnClose(e) {
|
|
2580
|
-
N(this,
|
|
2580
|
+
N(this, it)[1](() => e);
|
|
2581
2581
|
}
|
|
2582
2582
|
mount(e) {
|
|
2583
2583
|
if (N(this, Oe))
|
|
2584
2584
|
throw new Error("Devtools is already mounted");
|
|
2585
2585
|
const t = rr(() => {
|
|
2586
|
-
const n = this, [s] = N(this, tt), [
|
|
2586
|
+
const n = this, [s] = N(this, tt), [i] = N(this, nt), [a] = N(this, st), [o] = N(this, rt), [l] = N(this, Ze), [u] = N(this, it);
|
|
2587
2587
|
let d;
|
|
2588
|
-
return N(this,
|
|
2588
|
+
return N(this, at) ? d = N(this, at) : (d = nr(() => import("./UODQIBEW-CvRq3gUg.js")), I(this, at, d)), jr(N(this, It), N(this, et)), er(d, tr({
|
|
2589
2589
|
get queryFlavor() {
|
|
2590
2590
|
return N(n, Ot);
|
|
2591
2591
|
},
|
|
@@ -2606,10 +2606,10 @@ var Ll = (e, t = !1) => {
|
|
|
2606
2606
|
return s();
|
|
2607
2607
|
},
|
|
2608
2608
|
get position() {
|
|
2609
|
-
return
|
|
2609
|
+
return i();
|
|
2610
2610
|
},
|
|
2611
2611
|
get initialIsOpen() {
|
|
2612
|
-
return
|
|
2612
|
+
return a();
|
|
2613
2613
|
},
|
|
2614
2614
|
get errorTypes() {
|
|
2615
2615
|
return o();
|
|
@@ -2627,46 +2627,46 @@ var Ll = (e, t = !1) => {
|
|
|
2627
2627
|
throw new Error("Devtools is not mounted");
|
|
2628
2628
|
(e = N(this, Gt)) == null || e.call(this), I(this, Oe, !1);
|
|
2629
2629
|
}
|
|
2630
|
-
}, Ze = new WeakMap(), _t = new WeakMap(), Ot = new WeakMap(), Rt = new WeakMap(), Oe = new WeakMap(), It = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), rt = new WeakMap(),
|
|
2631
|
-
function
|
|
2632
|
-
const t = he(e.client), n =
|
|
2630
|
+
}, Ze = new WeakMap(), _t = new WeakMap(), Ot = new WeakMap(), Rt = new WeakMap(), Oe = new WeakMap(), It = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), rt = new WeakMap(), it = new WeakMap(), at = new WeakMap(), Gt = new WeakMap(), Ds);
|
|
2631
|
+
function jo(e) {
|
|
2632
|
+
const t = he(e.client), n = ie.useRef(null), {
|
|
2633
2633
|
buttonPosition: s,
|
|
2634
|
-
position:
|
|
2635
|
-
initialIsOpen:
|
|
2634
|
+
position: i,
|
|
2635
|
+
initialIsOpen: a,
|
|
2636
2636
|
errorTypes: o,
|
|
2637
2637
|
styleNonce: l,
|
|
2638
2638
|
shadowDOMTarget: u
|
|
2639
|
-
} = e, [d] =
|
|
2640
|
-
new
|
|
2639
|
+
} = e, [d] = ie.useState(
|
|
2640
|
+
new wo({
|
|
2641
2641
|
client: t,
|
|
2642
2642
|
queryFlavor: "React Query",
|
|
2643
2643
|
version: "5",
|
|
2644
2644
|
onlineManager: Us,
|
|
2645
2645
|
buttonPosition: s,
|
|
2646
|
-
position:
|
|
2647
|
-
initialIsOpen:
|
|
2646
|
+
position: i,
|
|
2647
|
+
initialIsOpen: a,
|
|
2648
2648
|
errorTypes: o,
|
|
2649
2649
|
styleNonce: l,
|
|
2650
2650
|
shadowDOMTarget: u
|
|
2651
2651
|
})
|
|
2652
2652
|
);
|
|
2653
|
-
return
|
|
2653
|
+
return ie.useEffect(() => {
|
|
2654
2654
|
d.setClient(t);
|
|
2655
|
-
}, [t, d]),
|
|
2655
|
+
}, [t, d]), ie.useEffect(() => {
|
|
2656
2656
|
s && d.setButtonPosition(s);
|
|
2657
|
-
}, [s, d]),
|
|
2658
|
-
|
|
2659
|
-
}, [
|
|
2660
|
-
d.setInitialIsOpen(
|
|
2661
|
-
}, [
|
|
2657
|
+
}, [s, d]), ie.useEffect(() => {
|
|
2658
|
+
i && d.setPosition(i);
|
|
2659
|
+
}, [i, d]), ie.useEffect(() => {
|
|
2660
|
+
d.setInitialIsOpen(a || !1);
|
|
2661
|
+
}, [a, d]), ie.useEffect(() => {
|
|
2662
2662
|
d.setErrorTypes(o || []);
|
|
2663
|
-
}, [o, d]),
|
|
2663
|
+
}, [o, d]), ie.useEffect(() => (n.current && d.mount(n.current), () => {
|
|
2664
2664
|
d.unmount();
|
|
2665
2665
|
}), [d]), /* @__PURE__ */ r.jsx("div", { className: "tsqd-parent-container", ref: n });
|
|
2666
2666
|
}
|
|
2667
|
-
function
|
|
2668
|
-
const t = he(e.client), n =
|
|
2669
|
-
new
|
|
2667
|
+
function So(e) {
|
|
2668
|
+
const t = he(e.client), n = ie.useRef(null), { errorTypes: s, styleNonce: i, shadowDOMTarget: a } = e, [o] = ie.useState(
|
|
2669
|
+
new Eo({
|
|
2670
2670
|
client: t,
|
|
2671
2671
|
queryFlavor: "React Query",
|
|
2672
2672
|
version: "5",
|
|
@@ -2675,19 +2675,19 @@ function jo(e) {
|
|
|
2675
2675
|
position: "bottom",
|
|
2676
2676
|
initialIsOpen: !0,
|
|
2677
2677
|
errorTypes: s,
|
|
2678
|
-
styleNonce:
|
|
2679
|
-
shadowDOMTarget:
|
|
2678
|
+
styleNonce: i,
|
|
2679
|
+
shadowDOMTarget: a,
|
|
2680
2680
|
onClose: e.onClose
|
|
2681
2681
|
})
|
|
2682
2682
|
);
|
|
2683
|
-
return
|
|
2683
|
+
return ie.useEffect(() => {
|
|
2684
2684
|
o.setClient(t);
|
|
2685
|
-
}, [t, o]),
|
|
2685
|
+
}, [t, o]), ie.useEffect(() => {
|
|
2686
2686
|
o.setOnClose(e.onClose ?? (() => {
|
|
2687
2687
|
}));
|
|
2688
|
-
}, [e.onClose, o]),
|
|
2688
|
+
}, [e.onClose, o]), ie.useEffect(() => {
|
|
2689
2689
|
o.setErrorTypes(s || []);
|
|
2690
|
-
}, [s, o]),
|
|
2690
|
+
}, [s, o]), ie.useEffect(() => (n.current && o.mount(n.current), () => {
|
|
2691
2691
|
o.unmount();
|
|
2692
2692
|
}), [o]), /* @__PURE__ */ r.jsx(
|
|
2693
2693
|
"div",
|
|
@@ -2698,11 +2698,11 @@ function jo(e) {
|
|
|
2698
2698
|
}
|
|
2699
2699
|
);
|
|
2700
2700
|
}
|
|
2701
|
-
var
|
|
2701
|
+
var No = process.env.NODE_ENV !== "development" ? function() {
|
|
2702
2702
|
return null;
|
|
2703
|
-
} :
|
|
2703
|
+
} : jo;
|
|
2704
2704
|
process.env.NODE_ENV;
|
|
2705
|
-
const
|
|
2705
|
+
const Co = Mi({}), Sr = () => $i(Co), Lt = (e, t) => {
|
|
2706
2706
|
const [n] = Sr();
|
|
2707
2707
|
return V(n, e, t);
|
|
2708
2708
|
}, J = () => Lt("apiUrl", "/chai/api"), C = {
|
|
@@ -2747,39 +2747,39 @@ const No = Ba({}), Sr = () => Ma(No), Lt = (e, t) => {
|
|
|
2747
2747
|
if (s != null && s.error || n.status === 400 || !n.ok)
|
|
2748
2748
|
throw new Error((s == null ? void 0 : s.error) || "Something went wrong.");
|
|
2749
2749
|
return s;
|
|
2750
|
-
},
|
|
2750
|
+
}, Ao = () => {
|
|
2751
2751
|
const e = J(), { aiContext: t } = Kn();
|
|
2752
2752
|
return Dt(
|
|
2753
|
-
async (n, s,
|
|
2753
|
+
async (n, s, i, a) => X(e, {
|
|
2754
2754
|
action: C.ASK_AI,
|
|
2755
|
-
data: { type: n, prompt: s, blocks:
|
|
2755
|
+
data: { type: n, prompt: s, blocks: i, context: t, lang: a }
|
|
2756
2756
|
}),
|
|
2757
2757
|
[e, t]
|
|
2758
2758
|
);
|
|
2759
|
-
},
|
|
2759
|
+
}, To = () => {
|
|
2760
2760
|
const e = J();
|
|
2761
|
-
return { getUILibraryBlock: async (
|
|
2761
|
+
return { getUILibraryBlock: async (i, a) => {
|
|
2762
2762
|
const u = (await (await fetch(
|
|
2763
|
-
|
|
2763
|
+
i.url + (a.path ? "/blocks/" + a.path : "/" + a.uuid + ".html")
|
|
2764
2764
|
)).text()).replace(/---([\s\S]*?)---/g, "");
|
|
2765
|
-
return
|
|
2766
|
-
}, getUILibraryBlocks: async (
|
|
2765
|
+
return oi(`${u}`);
|
|
2766
|
+
}, getUILibraryBlocks: async (i) => {
|
|
2767
2767
|
try {
|
|
2768
|
-
return (await (await fetch(
|
|
2768
|
+
return (await (await fetch(i.url + "/blocks.json")).json()).map((l) => ({
|
|
2769
2769
|
...l,
|
|
2770
|
-
preview:
|
|
2770
|
+
preview: i.url.replace("chaiblocks", "") + l.preview
|
|
2771
2771
|
}));
|
|
2772
|
-
} catch (
|
|
2773
|
-
return console.error(
|
|
2772
|
+
} catch (a) {
|
|
2773
|
+
return console.error(a), [];
|
|
2774
2774
|
}
|
|
2775
2775
|
}, onSave: async ({
|
|
2776
|
-
page:
|
|
2777
|
-
blocks:
|
|
2776
|
+
page: i,
|
|
2777
|
+
blocks: a
|
|
2778
2778
|
}) => {
|
|
2779
2779
|
try {
|
|
2780
2780
|
return await X(e, {
|
|
2781
2781
|
action: "UPDATE_PAGE",
|
|
2782
|
-
data: { id:
|
|
2782
|
+
data: { id: i, blocks: a }
|
|
2783
2783
|
});
|
|
2784
2784
|
} catch {
|
|
2785
2785
|
return new Error("Failed to save blocks");
|
|
@@ -2812,7 +2812,7 @@ const Wn = () => {
|
|
|
2812
2812
|
() => ye(n, { id: t }) || {},
|
|
2813
2813
|
[n, t]
|
|
2814
2814
|
), isFetching: s };
|
|
2815
|
-
},
|
|
2815
|
+
}, ko = () => be({
|
|
2816
2816
|
queryKey: ["uiLibraries"],
|
|
2817
2817
|
initialData: [],
|
|
2818
2818
|
queryFn: async () => [
|
|
@@ -2827,21 +2827,21 @@ const Wn = () => {
|
|
|
2827
2827
|
url: "https://chaibuilder.com/chaiblocks"
|
|
2828
2828
|
}
|
|
2829
2829
|
]
|
|
2830
|
-
}),
|
|
2830
|
+
}), Po = () => {
|
|
2831
2831
|
const [e] = Fe(), t = e.get("page"), n = J(), { setAiContext: s } = Kn();
|
|
2832
2832
|
return be({
|
|
2833
2833
|
queryKey: [C.GET_PAGE, t],
|
|
2834
2834
|
initialData: [],
|
|
2835
2835
|
queryFn: async () => {
|
|
2836
|
-
const
|
|
2836
|
+
const a = (await X(n, {
|
|
2837
2837
|
action: C.GET_PAGE,
|
|
2838
2838
|
data: { id: t, draft: !0 }
|
|
2839
|
-
})).blocks ?? [], o = ye(
|
|
2840
|
-
return s(V(o, "_value", "") || ""),
|
|
2839
|
+
})).blocks ?? [], o = ye(a, { _type: "@chai/ai-context" });
|
|
2840
|
+
return s(V(o, "_value", "") || ""), a;
|
|
2841
2841
|
},
|
|
2842
2842
|
enabled: !!t
|
|
2843
2843
|
});
|
|
2844
|
-
},
|
|
2844
|
+
}, _o = (e) => se(() => {
|
|
2845
2845
|
if (!e || Y(e))
|
|
2846
2846
|
return {
|
|
2847
2847
|
blocks: [],
|
|
@@ -2849,7 +2849,7 @@ const Wn = () => {
|
|
|
2849
2849
|
};
|
|
2850
2850
|
const t = ye(e, { _type: "@chai/theme" }), n = V(t, "_value", {}) || {}, s = de(
|
|
2851
2851
|
e,
|
|
2852
|
-
(
|
|
2852
|
+
(i) => !je(i == null ? void 0 : i._type, "@chai/")
|
|
2853
2853
|
);
|
|
2854
2854
|
return { theme: n, blocks: s };
|
|
2855
2855
|
}, [e]), zn = () => {
|
|
@@ -2866,7 +2866,7 @@ const Wn = () => {
|
|
|
2866
2866
|
data: { draft: !0 }
|
|
2867
2867
|
})
|
|
2868
2868
|
});
|
|
2869
|
-
},
|
|
2869
|
+
}, Oo = () => {
|
|
2870
2870
|
const { data: e } = Wn(), t = J();
|
|
2871
2871
|
return {
|
|
2872
2872
|
getGlobalBlocks: async () => {
|
|
@@ -2883,18 +2883,18 @@ const Wn = () => {
|
|
|
2883
2883
|
data: { id: n, draft: !0 }
|
|
2884
2884
|
})).blocks : []
|
|
2885
2885
|
};
|
|
2886
|
-
},
|
|
2886
|
+
}, Ro = () => {
|
|
2887
2887
|
const e = J(), t = he(), { toast: n } = Te();
|
|
2888
2888
|
return we({
|
|
2889
2889
|
mutationFn: async (s) => X(e, {
|
|
2890
2890
|
action: C.UPDATE_WEBSITE_SETTINGS,
|
|
2891
2891
|
data: s
|
|
2892
2892
|
}),
|
|
2893
|
-
onSuccess: (s,
|
|
2894
|
-
var
|
|
2893
|
+
onSuccess: (s, i) => {
|
|
2894
|
+
var a;
|
|
2895
2895
|
t.invalidateQueries({
|
|
2896
2896
|
queryKey: [C.GET_WEBSITE_SETTINGS]
|
|
2897
|
-
}), (
|
|
2897
|
+
}), (a = i == null ? void 0 : i.settings) != null && a.theme || n({ title: "Website settings updated successfully." });
|
|
2898
2898
|
},
|
|
2899
2899
|
onError: (s) => {
|
|
2900
2900
|
n({
|
|
@@ -2904,7 +2904,7 @@ const Wn = () => {
|
|
|
2904
2904
|
});
|
|
2905
2905
|
}
|
|
2906
2906
|
});
|
|
2907
|
-
},
|
|
2907
|
+
}, Io = () => {
|
|
2908
2908
|
const e = J(), t = he(), { toast: n } = Te();
|
|
2909
2909
|
return we({
|
|
2910
2910
|
mutationFn: async (s) => X(e, { action: C.UPDATE_WEBSITE_DATA, data: s }),
|
|
@@ -2928,7 +2928,7 @@ const Wn = () => {
|
|
|
2928
2928
|
initialData: [],
|
|
2929
2929
|
queryFn: async () => X(e, { action: C.GET_COLLECTIONS })
|
|
2930
2930
|
});
|
|
2931
|
-
},
|
|
2931
|
+
}, Go = () => {
|
|
2932
2932
|
const e = J();
|
|
2933
2933
|
return we({
|
|
2934
2934
|
mutationFn: async ({ collection: t, query: n }) => {
|
|
@@ -3133,26 +3133,26 @@ const Wn = () => {
|
|
|
3133
3133
|
yo: "Yoruba",
|
|
3134
3134
|
za: "Zhuang, Chuang",
|
|
3135
3135
|
zu: "Zulu"
|
|
3136
|
-
},
|
|
3136
|
+
}, Do = {
|
|
3137
3137
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
3138
3138
|
}, Nr = () => {
|
|
3139
3139
|
const e = J(), t = he(), { toast: n } = Te();
|
|
3140
3140
|
return we({
|
|
3141
3141
|
mutationFn: async (s) => X(e, { action: C.CREATE_PAGE, data: s }),
|
|
3142
|
-
onSuccess: (s,
|
|
3143
|
-
|
|
3144
|
-
queryKey: [C.GET_LANGUAGE_PAGES,
|
|
3142
|
+
onSuccess: (s, i) => {
|
|
3143
|
+
i && (i != null && i.primaryPage) ? t.invalidateQueries({
|
|
3144
|
+
queryKey: [C.GET_LANGUAGE_PAGES, i == null ? void 0 : i.primaryPage]
|
|
3145
3145
|
}) : t.invalidateQueries({
|
|
3146
3146
|
queryKey: [C.GET_PROJECT_PAGES]
|
|
3147
3147
|
}), n({
|
|
3148
|
-
title: `New ${
|
|
3148
|
+
title: `New ${i.collection === "global" ? "global block" : "page"} added successfully.`
|
|
3149
3149
|
});
|
|
3150
3150
|
},
|
|
3151
|
-
onError: (s,
|
|
3151
|
+
onError: (s, i) => {
|
|
3152
3152
|
n({
|
|
3153
3153
|
variant: "destructive",
|
|
3154
|
-
title: `Failed to add new ${
|
|
3155
|
-
description: V(
|
|
3154
|
+
title: `Failed to add new ${i.collection === "global" ? "global block" : "page"}.`,
|
|
3155
|
+
description: V(Do, s.message, s.message)
|
|
3156
3156
|
});
|
|
3157
3157
|
}
|
|
3158
3158
|
});
|
|
@@ -3163,79 +3163,79 @@ const Wn = () => {
|
|
|
3163
3163
|
action: C.UPDATE_PAGE,
|
|
3164
3164
|
data: s
|
|
3165
3165
|
}),
|
|
3166
|
-
onSuccess: (s,
|
|
3167
|
-
|
|
3168
|
-
queryKey: [C.GET_LANGUAGE_PAGES,
|
|
3166
|
+
onSuccess: (s, i) => {
|
|
3167
|
+
i && (i != null && i.primaryPage || i != null && i.seo) ? t.invalidateQueries({
|
|
3168
|
+
queryKey: [C.GET_LANGUAGE_PAGES, i == null ? void 0 : i.primaryPage]
|
|
3169
3169
|
}) : t.invalidateQueries({
|
|
3170
3170
|
queryKey: [C.GET_PROJECT_PAGES]
|
|
3171
|
-
}),
|
|
3171
|
+
}), i != null && i.seo ? n({
|
|
3172
3172
|
title: "SEO Settings updated successfully."
|
|
3173
3173
|
}) : n({
|
|
3174
|
-
title: `${
|
|
3174
|
+
title: `${i.collection === "global" ? "Global block" : "Page"} updated successfully.`
|
|
3175
3175
|
});
|
|
3176
3176
|
},
|
|
3177
|
-
onError: (s,
|
|
3177
|
+
onError: (s, i) => {
|
|
3178
3178
|
n({
|
|
3179
3179
|
variant: "destructive",
|
|
3180
|
-
title: `Failed to update ${
|
|
3180
|
+
title: `Failed to update ${i.collection === "global" ? "global block" : "page"}.`,
|
|
3181
3181
|
description: s.message
|
|
3182
3182
|
});
|
|
3183
3183
|
}
|
|
3184
3184
|
});
|
|
3185
|
-
},
|
|
3185
|
+
}, Lo = () => {
|
|
3186
3186
|
const e = J(), t = he(), { toast: n } = Te();
|
|
3187
3187
|
return we({
|
|
3188
3188
|
mutationFn: async (s) => X(e, {
|
|
3189
3189
|
action: C.DELETE_PAGE,
|
|
3190
3190
|
data: { id: s == null ? void 0 : s.id }
|
|
3191
3191
|
}),
|
|
3192
|
-
onSuccess: (s,
|
|
3193
|
-
|
|
3194
|
-
queryKey: [C.GET_LANGUAGE_PAGES,
|
|
3192
|
+
onSuccess: (s, i) => {
|
|
3193
|
+
i && (i != null && i.primaryPage) ? t.invalidateQueries({
|
|
3194
|
+
queryKey: [C.GET_LANGUAGE_PAGES, i == null ? void 0 : i.primaryPage]
|
|
3195
3195
|
}) : t.invalidateQueries({
|
|
3196
3196
|
queryKey: [C.GET_PROJECT_PAGES]
|
|
3197
3197
|
}), n({
|
|
3198
|
-
title: `${
|
|
3198
|
+
title: `${i.collection === "global" ? "Global block" : "Page"} deleted successfully.`
|
|
3199
3199
|
});
|
|
3200
3200
|
},
|
|
3201
|
-
onError: (s,
|
|
3201
|
+
onError: (s, i) => {
|
|
3202
3202
|
n({
|
|
3203
3203
|
variant: "destructive",
|
|
3204
|
-
title: `Failed to delete ${
|
|
3204
|
+
title: `Failed to delete ${i.collection === "global" ? "global block" : "page"}.`,
|
|
3205
3205
|
description: s.message
|
|
3206
3206
|
});
|
|
3207
3207
|
}
|
|
3208
3208
|
});
|
|
3209
|
-
},
|
|
3209
|
+
}, Uo = () => {
|
|
3210
3210
|
const e = J(), t = he(), { toast: n } = Te();
|
|
3211
3211
|
return we({
|
|
3212
3212
|
mutationFn: async (s) => X(e, {
|
|
3213
3213
|
action: C.TAKE_OFFLINE,
|
|
3214
3214
|
data: { id: s == null ? void 0 : s.id }
|
|
3215
3215
|
}),
|
|
3216
|
-
onSuccess: (s,
|
|
3217
|
-
|
|
3218
|
-
queryKey: [C.GET_LANGUAGE_PAGES,
|
|
3216
|
+
onSuccess: (s, i) => {
|
|
3217
|
+
i && (i != null && i.primaryPage) ? t.invalidateQueries({
|
|
3218
|
+
queryKey: [C.GET_LANGUAGE_PAGES, i == null ? void 0 : i.primaryPage]
|
|
3219
3219
|
}) : t.invalidateQueries({
|
|
3220
3220
|
queryKey: [C.GET_PROJECT_PAGES]
|
|
3221
3221
|
}), n({
|
|
3222
|
-
title: `${
|
|
3222
|
+
title: `${i.collection === "global" ? "Global block" : "Page"} taken offline successfully.`
|
|
3223
3223
|
});
|
|
3224
3224
|
},
|
|
3225
|
-
onError: (s,
|
|
3225
|
+
onError: (s, i) => {
|
|
3226
3226
|
n({
|
|
3227
3227
|
variant: "destructive",
|
|
3228
|
-
title: `Failed to take offline ${
|
|
3228
|
+
title: `Failed to take offline ${i.collection === "global" ? "global block" : "page"}.`,
|
|
3229
3229
|
description: s.message
|
|
3230
3230
|
});
|
|
3231
3231
|
}
|
|
3232
3232
|
});
|
|
3233
|
-
},
|
|
3233
|
+
}, Fo = () => {
|
|
3234
3234
|
const e = J(), { toast: t } = Te(), n = he(), { data: s } = Be();
|
|
3235
3235
|
return we({
|
|
3236
|
-
mutationFn: async ({ ids:
|
|
3236
|
+
mutationFn: async ({ ids: i }) => X(e, {
|
|
3237
3237
|
action: C.PUBLISH_CHANGES,
|
|
3238
|
-
data: { ids:
|
|
3238
|
+
data: { ids: i }
|
|
3239
3239
|
}),
|
|
3240
3240
|
onSuccess: () => {
|
|
3241
3241
|
t({ title: "Your changes have been published successfully." }), n.invalidateQueries({ queryKey: [C.GET_CHANGES] }), n.invalidateQueries({ queryKey: [C.GET_PROJECT_PAGES] }), n.invalidateQueries({
|
|
@@ -3246,16 +3246,16 @@ const Wn = () => {
|
|
|
3246
3246
|
t({ title: "Failed to publish pages.", variant: "destructive" });
|
|
3247
3247
|
}
|
|
3248
3248
|
});
|
|
3249
|
-
},
|
|
3249
|
+
}, Bo = () => {
|
|
3250
3250
|
const e = J(), { toast: t } = Te(), n = he();
|
|
3251
3251
|
return we({
|
|
3252
|
-
mutationFn: async ({ id: s, slug:
|
|
3252
|
+
mutationFn: async ({ id: s, slug: i }) => X(e, {
|
|
3253
3253
|
action: C.CHANGE_SLUG,
|
|
3254
|
-
data: { id: s, slug:
|
|
3254
|
+
data: { id: s, slug: i }
|
|
3255
3255
|
}),
|
|
3256
|
-
onSuccess: (s, { primaryPage:
|
|
3257
|
-
t({ title: "Slug changed successfully." }),
|
|
3258
|
-
queryKey: [C.GET_LANGUAGE_PAGES,
|
|
3256
|
+
onSuccess: (s, { primaryPage: i }) => {
|
|
3257
|
+
t({ title: "Slug changed successfully." }), i ? n.invalidateQueries({
|
|
3258
|
+
queryKey: [C.GET_LANGUAGE_PAGES, i]
|
|
3259
3259
|
}) : n.invalidateQueries({
|
|
3260
3260
|
queryKey: [C.GET_PROJECT_PAGES]
|
|
3261
3261
|
});
|
|
@@ -3275,14 +3275,14 @@ const Wn = () => {
|
|
|
3275
3275
|
action: C.GET_LANGUAGE_PAGES,
|
|
3276
3276
|
data: { id: n }
|
|
3277
3277
|
});
|
|
3278
|
-
return
|
|
3278
|
+
return fi(hi(s, "primaryPage"));
|
|
3279
3279
|
}
|
|
3280
3280
|
});
|
|
3281
|
-
},
|
|
3281
|
+
}, Mo = () => {
|
|
3282
3282
|
const { selectedLang: e } = cn(), { data: t, isFetching: n } = Qn();
|
|
3283
3283
|
return { data: se(() => ye(t, { lang: e || "" }) || {}, [t, e]), isFetching: n };
|
|
3284
3284
|
}, Cr = () => {
|
|
3285
|
-
const { data: e, isFetching: t } =
|
|
3285
|
+
const { data: e, isFetching: t } = Mo(), n = e == null ? void 0 : e.seo, [s, i] = $({
|
|
3286
3286
|
title: "",
|
|
3287
3287
|
description: "",
|
|
3288
3288
|
cononicalUrl: "",
|
|
@@ -3295,9 +3295,9 @@ const Wn = () => {
|
|
|
3295
3295
|
searchDescription: "",
|
|
3296
3296
|
jsonLD: "",
|
|
3297
3297
|
...n
|
|
3298
|
-
}),
|
|
3298
|
+
}), a = Ls({ initial: s, updated: s }), { selectedLang: o, fallbackLang: l, languages: u } = cn(), d = o.length ? o : l, { mutate: h, isPending: f } = Hn(), y = f;
|
|
3299
3299
|
Ce(() => {
|
|
3300
|
-
!t && n &&
|
|
3300
|
+
!t && n && i({
|
|
3301
3301
|
title: "",
|
|
3302
3302
|
description: "",
|
|
3303
3303
|
cononicalUrl: "",
|
|
@@ -3313,15 +3313,15 @@ const Wn = () => {
|
|
|
3313
3313
|
});
|
|
3314
3314
|
}, [t, n]);
|
|
3315
3315
|
const b = async () => {
|
|
3316
|
-
h({ id: e == null ? void 0 : e.id, seo: s }),
|
|
3316
|
+
h({ id: e == null ? void 0 : e.id, seo: s }), a.current.initial = s, a.current.updated = s;
|
|
3317
3317
|
}, E = () => {
|
|
3318
|
-
|
|
3318
|
+
i({
|
|
3319
3319
|
...s,
|
|
3320
3320
|
ogTitle: s.title,
|
|
3321
3321
|
ogDescription: s.description
|
|
3322
3322
|
});
|
|
3323
3323
|
}, A = () => {
|
|
3324
|
-
|
|
3324
|
+
i({
|
|
3325
3325
|
...s,
|
|
3326
3326
|
searchTitle: s.ogTitle,
|
|
3327
3327
|
searchDescription: s.ogDescription
|
|
@@ -3331,7 +3331,7 @@ const Wn = () => {
|
|
|
3331
3331
|
...s,
|
|
3332
3332
|
[g.target.name]: g.target.name === "noIndex" || g.target.name === "noFollow" ? g.target.checked : g.target.value
|
|
3333
3333
|
};
|
|
3334
|
-
|
|
3334
|
+
i(x), a.current.updated = x;
|
|
3335
3335
|
};
|
|
3336
3336
|
return /* @__PURE__ */ r.jsxs("div", { className: "relative pb-40", children: [
|
|
3337
3337
|
/* @__PURE__ */ r.jsxs("div", { className: "text-xs bg-gray-100 p-2 rounded-md text-left", children: [
|
|
@@ -3344,7 +3344,7 @@ const Wn = () => {
|
|
|
3344
3344
|
")"
|
|
3345
3345
|
] })
|
|
3346
3346
|
] }),
|
|
3347
|
-
/* @__PURE__ */ r.jsx("form", { className: "space-y-8", children: /* @__PURE__ */ r.jsxs(
|
|
3347
|
+
/* @__PURE__ */ r.jsx("form", { className: "space-y-8", children: /* @__PURE__ */ r.jsxs(qi, { type: "multiple", defaultValue: ["page"], children: [
|
|
3348
3348
|
/* @__PURE__ */ r.jsxs(qt, { value: "page", children: [
|
|
3349
3349
|
/* @__PURE__ */ r.jsx(Vt, { className: "text-slate-700 font-semibold", children: "SEO" }),
|
|
3350
3350
|
/* @__PURE__ */ r.jsx(Kt, { className: "pt-2", children: /* @__PURE__ */ r.jsxs("div", { className: "space-y-4", children: [
|
|
@@ -3438,7 +3438,7 @@ const Wn = () => {
|
|
|
3438
3438
|
/* @__PURE__ */ r.jsx(Vt, { className: "text-slate-700 font-bold", children: "OG" }),
|
|
3439
3439
|
/* @__PURE__ */ r.jsx(Kt, { children: /* @__PURE__ */ r.jsxs("div", { className: "space-y-4", children: [
|
|
3440
3440
|
/* @__PURE__ */ r.jsx("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ r.jsx(
|
|
3441
|
-
|
|
3441
|
+
W,
|
|
3442
3442
|
{
|
|
3443
3443
|
type: "button",
|
|
3444
3444
|
variant: "outline",
|
|
@@ -3500,7 +3500,7 @@ const Wn = () => {
|
|
|
3500
3500
|
/* @__PURE__ */ r.jsx(Vt, { className: "text-slate-700 font-bold", children: "SEARCH" }),
|
|
3501
3501
|
/* @__PURE__ */ r.jsx(Kt, { children: /* @__PURE__ */ r.jsxs("div", { className: "space-y-4", children: [
|
|
3502
3502
|
/* @__PURE__ */ r.jsx("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ r.jsx(
|
|
3503
|
-
|
|
3503
|
+
W,
|
|
3504
3504
|
{
|
|
3505
3505
|
type: "button",
|
|
3506
3506
|
variant: "outline",
|
|
@@ -3557,12 +3557,12 @@ const Wn = () => {
|
|
|
3557
3557
|
] })
|
|
3558
3558
|
] }) }),
|
|
3559
3559
|
/* @__PURE__ */ r.jsx("div", { className: "w-full flex items-center justify-end mt-4", children: /* @__PURE__ */ r.jsx(
|
|
3560
|
-
|
|
3560
|
+
W,
|
|
3561
3561
|
{
|
|
3562
3562
|
size: "lg",
|
|
3563
3563
|
variant: "default",
|
|
3564
3564
|
onClick: b,
|
|
3565
|
-
disabled: Ke(
|
|
3565
|
+
disabled: Ke(a.current.initial, s) || y,
|
|
3566
3566
|
children: f ? "Saving..." : "Save"
|
|
3567
3567
|
}
|
|
3568
3568
|
) })
|
|
@@ -3573,14 +3573,14 @@ const Ar = ({
|
|
|
3573
3573
|
page: e,
|
|
3574
3574
|
onClose: t
|
|
3575
3575
|
}) => {
|
|
3576
|
-
const [n, s] = $(e.slug || ""), { mutate:
|
|
3577
|
-
h.preventDefault(),
|
|
3576
|
+
const [n, s] = $(e.slug || ""), { mutate: i, isPending: a } = Bo(), { data: o } = Ut(), l = ye(o, { key: e == null ? void 0 : e.collection }), u = (h) => {
|
|
3577
|
+
h.preventDefault(), i({ ...e, slug: n }, { onSuccess: t });
|
|
3578
3578
|
}, d = (e == null ? void 0 : e.lang) || "";
|
|
3579
3579
|
return /* @__PURE__ */ r.jsx(Ge, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ r.jsxs(De, { children: [
|
|
3580
3580
|
/* @__PURE__ */ r.jsxs(Le, { children: [
|
|
3581
3581
|
/* @__PURE__ */ r.jsx(Ue, { children: "Change Slug" }),
|
|
3582
|
-
/* @__PURE__ */ r.jsx(lt, { className: "text-xs", children: /* @__PURE__ */ r.jsxs(
|
|
3583
|
-
/* @__PURE__ */ r.jsx(
|
|
3582
|
+
/* @__PURE__ */ r.jsx(lt, { className: "text-xs", children: /* @__PURE__ */ r.jsxs(Vi, { variant: "destructive", className: "mt-2", children: [
|
|
3583
|
+
/* @__PURE__ */ r.jsx(Ei, { className: "h-4 w-4" }),
|
|
3584
3584
|
"Changing the slug may have impact on your SEO. Please proceed with caution."
|
|
3585
3585
|
] }) })
|
|
3586
3586
|
] }),
|
|
@@ -3630,11 +3630,11 @@ const Ar = ({
|
|
|
3630
3630
|
] })
|
|
3631
3631
|
] }),
|
|
3632
3632
|
/* @__PURE__ */ r.jsx(ct, { children: /* @__PURE__ */ r.jsx(
|
|
3633
|
-
|
|
3633
|
+
W,
|
|
3634
3634
|
{
|
|
3635
3635
|
type: "submit",
|
|
3636
|
-
disabled:
|
|
3637
|
-
children:
|
|
3636
|
+
disabled: a || !en(n, `/${d}`) || Ke(e == null ? void 0 : e.slug, n),
|
|
3637
|
+
children: a ? "Changing..." : "Change Slug"
|
|
3638
3638
|
}
|
|
3639
3639
|
) })
|
|
3640
3640
|
] })
|
|
@@ -3644,7 +3644,7 @@ function Tr({
|
|
|
3644
3644
|
page: e,
|
|
3645
3645
|
onClose: t
|
|
3646
3646
|
}) {
|
|
3647
|
-
const [, n] = Fe(), { mutate: s, isPending:
|
|
3647
|
+
const [, n] = Fe(), { mutate: s, isPending: i } = Lo(), a = () => {
|
|
3648
3648
|
s(e, {
|
|
3649
3649
|
onSuccess: () => {
|
|
3650
3650
|
e != null && e.primaryPage || (window.history.replaceState(null, "", "/"), n(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate"))), t();
|
|
@@ -3669,14 +3669,14 @@ function Tr({
|
|
|
3669
3669
|
] })
|
|
3670
3670
|
] }),
|
|
3671
3671
|
/* @__PURE__ */ r.jsxs(ct, { children: [
|
|
3672
|
-
/* @__PURE__ */ r.jsx(
|
|
3672
|
+
/* @__PURE__ */ r.jsx(W, { variant: "outline", onClick: t, children: "Cancel" }),
|
|
3673
3673
|
/* @__PURE__ */ r.jsx(
|
|
3674
|
-
|
|
3674
|
+
W,
|
|
3675
3675
|
{
|
|
3676
3676
|
variant: "destructive",
|
|
3677
|
-
disabled:
|
|
3678
|
-
onClick:
|
|
3679
|
-
children:
|
|
3677
|
+
disabled: i,
|
|
3678
|
+
onClick: a,
|
|
3679
|
+
children: i ? "Deleting..." : "Delete"
|
|
3680
3680
|
}
|
|
3681
3681
|
)
|
|
3682
3682
|
] })
|
|
@@ -3686,7 +3686,7 @@ const kr = ({
|
|
|
3686
3686
|
page: e,
|
|
3687
3687
|
onClose: t
|
|
3688
3688
|
}) => {
|
|
3689
|
-
const { mutate: n, isPending: s } =
|
|
3689
|
+
const { mutate: n, isPending: s } = Uo(), i = async () => {
|
|
3690
3690
|
n(e, { onSuccess: t });
|
|
3691
3691
|
};
|
|
3692
3692
|
return /* @__PURE__ */ r.jsx(Ge, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ r.jsxs(De, { children: [
|
|
@@ -3700,13 +3700,13 @@ const kr = ({
|
|
|
3700
3700
|
] })
|
|
3701
3701
|
] }),
|
|
3702
3702
|
/* @__PURE__ */ r.jsxs(ct, { children: [
|
|
3703
|
-
/* @__PURE__ */ r.jsx(
|
|
3703
|
+
/* @__PURE__ */ r.jsx(W, { variant: "outline", onClick: t, children: "Cancel" }),
|
|
3704
3704
|
/* @__PURE__ */ r.jsx(
|
|
3705
|
-
|
|
3705
|
+
W,
|
|
3706
3706
|
{
|
|
3707
3707
|
variant: "destructive",
|
|
3708
3708
|
disabled: s,
|
|
3709
|
-
onClick:
|
|
3709
|
+
onClick: i,
|
|
3710
3710
|
children: s ? "Updating..." : "Take offline"
|
|
3711
3711
|
}
|
|
3712
3712
|
)
|
|
@@ -3717,10 +3717,10 @@ const kr = ({
|
|
|
3717
3717
|
onClose: t,
|
|
3718
3718
|
languages: n
|
|
3719
3719
|
}) => {
|
|
3720
|
-
const { data: s } = Be(), [
|
|
3720
|
+
const { data: s } = Be(), [i, a] = $(e.name || ""), [o, l] = $(e.edit ? e.lang : ""), [u, d] = $(e.edit ? e.slug : ""), { mutate: h, isPending: f } = Nr(), { mutate: y, isPending: b } = Hn(), E = (e == null ? void 0 : e.collection) === "global", A = f || b, w = (g) => {
|
|
3721
3721
|
g.preventDefault();
|
|
3722
3722
|
const x = {
|
|
3723
|
-
name:
|
|
3723
|
+
name: i,
|
|
3724
3724
|
lang: o,
|
|
3725
3725
|
primaryPage: s == null ? void 0 : s.id,
|
|
3726
3726
|
slug: u,
|
|
@@ -3760,8 +3760,8 @@ const kr = ({
|
|
|
3760
3760
|
le,
|
|
3761
3761
|
{
|
|
3762
3762
|
id: "name",
|
|
3763
|
-
value:
|
|
3764
|
-
onChange: (g) =>
|
|
3763
|
+
value: i,
|
|
3764
|
+
onChange: (g) => a(g.target.value),
|
|
3765
3765
|
className: "col-span-3",
|
|
3766
3766
|
required: !0,
|
|
3767
3767
|
placeholder: "Enter page name"
|
|
@@ -3781,7 +3781,7 @@ const kr = ({
|
|
|
3781
3781
|
value: u,
|
|
3782
3782
|
onChange: (g) => {
|
|
3783
3783
|
const x = g.target.value;
|
|
3784
|
-
en(x, `/${o}`) && d(yt(
|
|
3784
|
+
en(x, `/${o}`) && d(yt(gi(x)));
|
|
3785
3785
|
},
|
|
3786
3786
|
className: "col-span-3",
|
|
3787
3787
|
required: !0,
|
|
@@ -3794,33 +3794,33 @@ const kr = ({
|
|
|
3794
3794
|
] })
|
|
3795
3795
|
] }),
|
|
3796
3796
|
/* @__PURE__ */ r.jsx(ct, { children: /* @__PURE__ */ r.jsx(
|
|
3797
|
-
|
|
3797
|
+
W,
|
|
3798
3798
|
{
|
|
3799
3799
|
type: "submit",
|
|
3800
|
-
disabled: A || !
|
|
3800
|
+
disabled: A || !i || !o || !E && !en(u, `/${o}`),
|
|
3801
3801
|
children: A ? e.edit ? "Updating..." : "Adding..." : e.edit ? "Update" : "Add new language"
|
|
3802
3802
|
}
|
|
3803
3803
|
) })
|
|
3804
3804
|
] })
|
|
3805
3805
|
] }) });
|
|
3806
|
-
},
|
|
3807
|
-
const [e, t] = $(null), { selectedLang: n, fallbackLang: s, setSelectedLang:
|
|
3806
|
+
}, $o = () => {
|
|
3807
|
+
const [e, t] = $(null), { selectedLang: n, fallbackLang: s, setSelectedLang: i } = cn(), { data: a, isFetching: o } = Qn(), { data: l } = Be(), [u, d] = $(null), [h, f] = $(null), [y, b] = $(null), { data: E } = zn(), A = de(
|
|
3808
3808
|
V(E, "languages") || ["en"],
|
|
3809
|
-
(w) => !ye(
|
|
3809
|
+
(w) => !ye(a, { lang: w }) && w !== V(E, "fallbackLang")
|
|
3810
3810
|
);
|
|
3811
3811
|
return /* @__PURE__ */ r.jsxs("div", { className: "space-y-4 pt-2", children: [
|
|
3812
3812
|
/* @__PURE__ */ r.jsx("ul", { className: "space-y-2 mt-4", children: o ? /* @__PURE__ */ r.jsxs("div", { className: "w-full space-y-3 py-4", children: [
|
|
3813
3813
|
/* @__PURE__ */ r.jsx("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
|
|
3814
3814
|
/* @__PURE__ */ r.jsx("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
|
|
3815
3815
|
/* @__PURE__ */ r.jsx("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" })
|
|
3816
|
-
] }) : fe(
|
|
3817
|
-
const g = w.lang, x = w.slug, B = !w.primaryPage,
|
|
3816
|
+
] }) : fe(a, (w) => {
|
|
3817
|
+
const g = w.lang, x = w.slug, B = !w.primaryPage, K = g === n;
|
|
3818
3818
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3819
3819
|
/* @__PURE__ */ r.jsxs(
|
|
3820
3820
|
"li",
|
|
3821
3821
|
{
|
|
3822
|
-
className: `text-slate-500 w-full p-2 rounded cursor-pointer flex items-center justify-between ${
|
|
3823
|
-
onClick: () =>
|
|
3822
|
+
className: `text-slate-500 w-full p-2 rounded cursor-pointer flex items-center justify-between ${K ? "bg-gray-200" : "hover:bg-gray-100"}`,
|
|
3823
|
+
onClick: () => i(g),
|
|
3824
3824
|
children: [
|
|
3825
3825
|
/* @__PURE__ */ r.jsxs("div", { className: " flex-1 gap-x-3", children: [
|
|
3826
3826
|
/* @__PURE__ */ r.jsxs(
|
|
@@ -3854,7 +3854,7 @@ const kr = ({
|
|
|
3854
3854
|
] })
|
|
3855
3855
|
] }),
|
|
3856
3856
|
B ? /* @__PURE__ */ r.jsxs("div", { className: "flex items-center text-[11px] text-orange-500 gap-x-1", children: [
|
|
3857
|
-
/* @__PURE__ */ r.jsx(
|
|
3857
|
+
/* @__PURE__ */ r.jsx(ji, { fill: "orange", className: "w-3 h-3" }),
|
|
3858
3858
|
/* @__PURE__ */ r.jsx("b", { children: " Primary" })
|
|
3859
3859
|
] }) : /* @__PURE__ */ r.jsx("div", { className: "flex items-center gap-x-3", children: /* @__PURE__ */ r.jsxs(Mn, { children: [
|
|
3860
3860
|
/* @__PURE__ */ r.jsx(
|
|
@@ -3863,7 +3863,7 @@ const kr = ({
|
|
|
3863
3863
|
asChild: !0,
|
|
3864
3864
|
onClick: (O) => O.stopPropagation(),
|
|
3865
3865
|
children: /* @__PURE__ */ r.jsx(
|
|
3866
|
-
|
|
3866
|
+
W,
|
|
3867
3867
|
{
|
|
3868
3868
|
variant: "ghost",
|
|
3869
3869
|
size: "sm",
|
|
@@ -3882,7 +3882,7 @@ const kr = ({
|
|
|
3882
3882
|
O.stopPropagation(), t({ ...w, edit: !0 });
|
|
3883
3883
|
},
|
|
3884
3884
|
children: [
|
|
3885
|
-
/* @__PURE__ */ r.jsx(
|
|
3885
|
+
/* @__PURE__ */ r.jsx(Si, { className: "size-3" }),
|
|
3886
3886
|
"Edit"
|
|
3887
3887
|
]
|
|
3888
3888
|
}
|
|
@@ -3921,7 +3921,7 @@ const kr = ({
|
|
|
3921
3921
|
O.stopPropagation(), d(w);
|
|
3922
3922
|
},
|
|
3923
3923
|
children: [
|
|
3924
|
-
/* @__PURE__ */ r.jsx(
|
|
3924
|
+
/* @__PURE__ */ r.jsx(Ni, { className: "size-3" }),
|
|
3925
3925
|
"Delete"
|
|
3926
3926
|
]
|
|
3927
3927
|
}
|
|
@@ -3936,7 +3936,7 @@ const kr = ({
|
|
|
3936
3936
|
] });
|
|
3937
3937
|
}) }),
|
|
3938
3938
|
/* @__PURE__ */ r.jsx("div", { className: "flex justify-center w-full", children: /* @__PURE__ */ r.jsx(
|
|
3939
|
-
|
|
3939
|
+
W,
|
|
3940
3940
|
{
|
|
3941
3941
|
variant: "default",
|
|
3942
3942
|
size: "sm",
|
|
@@ -3977,17 +3977,17 @@ const kr = ({
|
|
|
3977
3977
|
}
|
|
3978
3978
|
)
|
|
3979
3979
|
] });
|
|
3980
|
-
},
|
|
3980
|
+
}, qo = () => {
|
|
3981
3981
|
const e = J();
|
|
3982
3982
|
return be({
|
|
3983
3983
|
queryKey: [C.GET_CHANGES],
|
|
3984
3984
|
queryFn: async () => X(e, { action: C.GET_CHANGES })
|
|
3985
3985
|
});
|
|
3986
3986
|
};
|
|
3987
|
-
function
|
|
3987
|
+
function Vo({
|
|
3988
3988
|
onClose: e = () => console.log("Cancelled")
|
|
3989
3989
|
}) {
|
|
3990
|
-
const [t, n] = $([]), { data: s, isFetching:
|
|
3990
|
+
const [t, n] = $([]), { data: s, isFetching: i } = qo(), { data: a } = Ut(), o = se(
|
|
3991
3991
|
() => de(s, (g) => g.collection !== "global"),
|
|
3992
3992
|
[s]
|
|
3993
3993
|
), l = se(
|
|
@@ -3996,30 +3996,30 @@ function qo({
|
|
|
3996
3996
|
), u = se(
|
|
3997
3997
|
() => ye(s, { collection: "theme", id: "THEME" }),
|
|
3998
3998
|
[s]
|
|
3999
|
-
), { mutate: d, isPending: h } =
|
|
3999
|
+
), { mutate: d, isPending: h } = Fo();
|
|
4000
4000
|
Ce(() => {
|
|
4001
4001
|
const g = fe(de(s, { online: !0 }), "id");
|
|
4002
4002
|
u && g.push(u == null ? void 0 : u.id), n(g);
|
|
4003
4003
|
}, [s, u]);
|
|
4004
4004
|
const f = t.length === (s == null ? void 0 : s.length), y = (g) => {
|
|
4005
4005
|
n(
|
|
4006
|
-
(x) => je(x, g) ? de(x, (B) => B !== g) :
|
|
4006
|
+
(x) => je(x, g) ? de(x, (B) => B !== g) : yi(x, g)
|
|
4007
4007
|
);
|
|
4008
4008
|
}, b = () => {
|
|
4009
4009
|
n(f ? [] : fe(s, "id"));
|
|
4010
4010
|
}, E = () => {
|
|
4011
|
-
d({ ids: t }, { onSuccess: e });
|
|
4011
|
+
d({ ids: xi(t) }, { onSuccess: e });
|
|
4012
4012
|
}, A = (g) => {
|
|
4013
4013
|
if (g === "global") return "Global Block";
|
|
4014
4014
|
if (g === "theme") return "Theme";
|
|
4015
|
-
const x = ye(
|
|
4015
|
+
const x = ye(a, { key: g });
|
|
4016
4016
|
return x ? x == null ? void 0 : x.name : g;
|
|
4017
4017
|
}, w = se(() => {
|
|
4018
4018
|
const g = [
|
|
4019
4019
|
{ label: "Updated Pages & Global Blocks", top: "pt-2" },
|
|
4020
4020
|
...xt(de(o, { online: !0 }), "collection"),
|
|
4021
4021
|
...xt(de(l, { online: !0 }), "collection")
|
|
4022
|
-
], x = [
|
|
4022
|
+
].filter((K) => K.collection !== "theme"), x = [
|
|
4023
4023
|
{ label: "Offline Pages & Global Blocks", top: "pt-6" },
|
|
4024
4024
|
...xt(de(o, { online: !1 }), "collection"),
|
|
4025
4025
|
...xt(de(l, { online: !1 }), "collection")
|
|
@@ -4032,7 +4032,7 @@ function qo({
|
|
|
4032
4032
|
/* @__PURE__ */ r.jsx(Ue, { children: "Publish changes" }),
|
|
4033
4033
|
/* @__PURE__ */ r.jsx(lt, { className: "text-xs", children: "Select the pages you want to publish. Click publish when you're done." })
|
|
4034
4034
|
] }),
|
|
4035
|
-
/* @__PURE__ */ r.jsx("div", { className: "relative -mx-4 h-full overflow-y-auto max-h-full no-scrollbar", children:
|
|
4035
|
+
/* @__PURE__ */ r.jsx("div", { className: "relative -mx-4 h-full overflow-y-auto max-h-full no-scrollbar", children: i ? /* @__PURE__ */ r.jsxs("div", { className: "space-y-2 px-1", children: [
|
|
4036
4036
|
/* @__PURE__ */ r.jsx("div", { className: "bg-gray-200 h-6 w-full rounded animate-pulse mt-2" }),
|
|
4037
4037
|
/* @__PURE__ */ r.jsx("div", { className: "bg-gray-200 h-6 w-full rounded animate-pulse" }),
|
|
4038
4038
|
/* @__PURE__ */ r.jsx("div", { className: "bg-gray-200 h-6 w-full rounded animate-pulse" }),
|
|
@@ -4099,7 +4099,7 @@ function qo({
|
|
|
4099
4099
|
}
|
|
4100
4100
|
),
|
|
4101
4101
|
" ",
|
|
4102
|
-
g.collection === "global" ? /* @__PURE__ */ r.jsx(
|
|
4102
|
+
g.collection === "global" ? /* @__PURE__ */ r.jsx(Ci, { className: "h-4 w-4" }) : /* @__PURE__ */ r.jsx(Xt, { className: "h-4 w-4" }),
|
|
4103
4103
|
g.name,
|
|
4104
4104
|
g.slug && /* @__PURE__ */ r.jsxs("span", { className: "text-xs text-gray-500", children: [
|
|
4105
4105
|
"(",
|
|
@@ -4109,8 +4109,9 @@ function qo({
|
|
|
4109
4109
|
]
|
|
4110
4110
|
}
|
|
4111
4111
|
),
|
|
4112
|
+
/* @__PURE__ */ r.jsx("td", { className: "px-2", children: g.lang }),
|
|
4112
4113
|
/* @__PURE__ */ r.jsx("td", { className: "px-2", children: A(g == null ? void 0 : g.collection) }),
|
|
4113
|
-
/* @__PURE__ */ r.jsx("td", { className: "px-4 text-right", children:
|
|
4114
|
+
/* @__PURE__ */ r.jsx("td", { className: "px-4 text-right", children: mi(g.changes) || "" })
|
|
4114
4115
|
]
|
|
4115
4116
|
},
|
|
4116
4117
|
g == null ? void 0 : g.id
|
|
@@ -4118,11 +4119,11 @@ function qo({
|
|
|
4118
4119
|
) })
|
|
4119
4120
|
] }) }),
|
|
4120
4121
|
/* @__PURE__ */ r.jsxs(ct, { className: "mt-10", children: [
|
|
4121
|
-
/* @__PURE__ */ r.jsx(
|
|
4122
|
+
/* @__PURE__ */ r.jsx(W, { disabled: h, variant: "outline", onClick: e, children: "Cancel" }),
|
|
4122
4123
|
/* @__PURE__ */ r.jsx(
|
|
4123
|
-
|
|
4124
|
+
W,
|
|
4124
4125
|
{
|
|
4125
|
-
disabled: h ||
|
|
4126
|
+
disabled: h || i || Y(s),
|
|
4126
4127
|
onClick: E,
|
|
4127
4128
|
children: h ? "Publishing..." : "Publish"
|
|
4128
4129
|
}
|
|
@@ -4130,7 +4131,7 @@ function qo({
|
|
|
4130
4131
|
] })
|
|
4131
4132
|
] }) });
|
|
4132
4133
|
}
|
|
4133
|
-
const
|
|
4134
|
+
const Ko = () => {
|
|
4134
4135
|
const e = J();
|
|
4135
4136
|
return be({
|
|
4136
4137
|
queryKey: [C.GET_WEBSITE_DATA],
|
|
@@ -4141,9 +4142,9 @@ const Vo = () => {
|
|
|
4141
4142
|
})
|
|
4142
4143
|
});
|
|
4143
4144
|
};
|
|
4144
|
-
function
|
|
4145
|
-
const { data: t, isFetching: n } =
|
|
4146
|
-
return
|
|
4145
|
+
function Wo({ onClose: e }) {
|
|
4146
|
+
const { data: t, isFetching: n } = Ko(), { mutateAsync: s, isPending: i } = Io(), a = Lt("settingComponent", null), o = pi(async (l) => (await s({ data: l }), !0), 300);
|
|
4147
|
+
return a ? /* @__PURE__ */ r.jsx(Ge, { open: !0, onOpenChange: e, children: /* @__PURE__ */ r.jsxs(De, { className: "w-full", children: [
|
|
4147
4148
|
/* @__PURE__ */ r.jsx(Le, { children: /* @__PURE__ */ r.jsx(Ue, { children: "Website Settings" }) }),
|
|
4148
4149
|
n ? /* @__PURE__ */ r.jsxs("div", { className: "w-full space-y-3 py-4", children: [
|
|
4149
4150
|
/* @__PURE__ */ r.jsx("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
|
|
@@ -4152,11 +4153,11 @@ function Ko({ onClose: e }) {
|
|
|
4152
4153
|
/* @__PURE__ */ r.jsx("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
|
|
4153
4154
|
/* @__PURE__ */ r.jsx("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
|
|
4154
4155
|
/* @__PURE__ */ r.jsx("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" })
|
|
4155
|
-
] }) : /* @__PURE__ */ r.jsx("div", { children: ln.createElement(
|
|
4156
|
+
] }) : /* @__PURE__ */ r.jsx("div", { children: ln.createElement(a, {
|
|
4156
4157
|
data: t || {},
|
|
4157
|
-
onSave:
|
|
4158
|
+
onSave: i ? () => {
|
|
4158
4159
|
} : o,
|
|
4159
|
-
cancel:
|
|
4160
|
+
cancel: i ? () => {
|
|
4160
4161
|
} : e
|
|
4161
4162
|
}) })
|
|
4162
4163
|
] }) }) : null;
|
|
@@ -4165,42 +4166,42 @@ function gn({
|
|
|
4165
4166
|
children: e,
|
|
4166
4167
|
content: t
|
|
4167
4168
|
}) {
|
|
4168
|
-
return /* @__PURE__ */ r.jsx(
|
|
4169
|
-
/* @__PURE__ */ r.jsx(
|
|
4170
|
-
/* @__PURE__ */ r.jsx(
|
|
4169
|
+
return /* @__PURE__ */ r.jsx(Ki, { children: /* @__PURE__ */ r.jsxs(Wi, { children: [
|
|
4170
|
+
/* @__PURE__ */ r.jsx(zi, { asChild: !0, children: e }),
|
|
4171
|
+
/* @__PURE__ */ r.jsx(Hi, { side: "bottom", sideOffset: 10, children: /* @__PURE__ */ r.jsx("p", { children: t }) })
|
|
4171
4172
|
] }) });
|
|
4172
4173
|
}
|
|
4173
|
-
const
|
|
4174
|
-
const e = Lt("getPreviewUrl", async (o) => o), [t, n] = $(""), { data: s, isFetching:
|
|
4174
|
+
const zo = () => {
|
|
4175
|
+
const e = Lt("getPreviewUrl", async (o) => o), [t, n] = $(""), { data: s, isFetching: i } = Be(), a = se(() => s == null ? void 0 : s.slug, [s == null ? void 0 : s.slug]);
|
|
4175
4176
|
return Ce(() => {
|
|
4176
4177
|
(async () => {
|
|
4177
|
-
if (
|
|
4178
|
-
const o = await e(
|
|
4178
|
+
if (a && typeof e == "function") {
|
|
4179
|
+
const o = await e(a || "");
|
|
4179
4180
|
n(o);
|
|
4180
4181
|
} else
|
|
4181
4182
|
n("");
|
|
4182
4183
|
})();
|
|
4183
|
-
}, [e,
|
|
4184
|
-
/* @__PURE__ */ r.jsx(gn, { content: "Preview", children: /* @__PURE__ */ r.jsx("a", { href: t, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ r.jsx(
|
|
4184
|
+
}, [e, a]), !t || (s == null ? void 0 : s.collection) === "global" || i ? null : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4185
|
+
/* @__PURE__ */ r.jsx(gn, { content: "Preview", children: /* @__PURE__ */ r.jsx("a", { href: t, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ r.jsx(W, { variant: "ghost", size: "icon", className: "gap-2", children: /* @__PURE__ */ r.jsx(Ai, { className: "w-4 h-4" }) }) }) }),
|
|
4185
4186
|
/* @__PURE__ */ r.jsx("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
|
|
4186
4187
|
] });
|
|
4187
|
-
},
|
|
4188
|
-
const [e, t] =
|
|
4188
|
+
}, Ho = () => {
|
|
4189
|
+
const [e, t] = li();
|
|
4189
4190
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4190
4191
|
/* @__PURE__ */ r.jsx(gn, { content: "Theme", children: /* @__PURE__ */ r.jsx(
|
|
4191
|
-
|
|
4192
|
+
W,
|
|
4192
4193
|
{
|
|
4193
4194
|
variant: e === "theme" ? "outline" : "ghost",
|
|
4194
4195
|
size: "icon",
|
|
4195
4196
|
className: "gap-2",
|
|
4196
4197
|
onClick: () => t(e === "theme" ? "block" : "theme"),
|
|
4197
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4198
|
+
children: /* @__PURE__ */ r.jsx(Ti, { className: "w-4 h-4" })
|
|
4198
4199
|
}
|
|
4199
4200
|
) }),
|
|
4200
4201
|
/* @__PURE__ */ r.jsx("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
|
|
4201
4202
|
] });
|
|
4202
|
-
},
|
|
4203
|
-
const [e, t] = $(!1), { savePage: n, saveState: s } =
|
|
4203
|
+
}, Qo = () => {
|
|
4204
|
+
const [e, t] = $(!1), { savePage: n, saveState: s } = ci();
|
|
4204
4205
|
Ce(() => {
|
|
4205
4206
|
const d = (h) => {
|
|
4206
4207
|
s === "UNSAVED" && (h.preventDefault(), h.returnValue = !1);
|
|
@@ -4209,17 +4210,17 @@ const Wo = () => {
|
|
|
4209
4210
|
window.removeEventListener("beforeunload", d);
|
|
4210
4211
|
};
|
|
4211
4212
|
}, [s]);
|
|
4212
|
-
const
|
|
4213
|
+
const i = Dt(async () => {
|
|
4213
4214
|
t(!0), await n(!1);
|
|
4214
4215
|
}, [n]);
|
|
4215
4216
|
Ce(() => {
|
|
4216
4217
|
s === "SAVED" && t(!1);
|
|
4217
4218
|
}, [s]);
|
|
4218
|
-
const
|
|
4219
|
+
const a = se(() => {
|
|
4219
4220
|
if (s === "SAVED" || s === "UNSAVED") return s;
|
|
4220
4221
|
if (s === "SAVING") return e ? s : "SAVED";
|
|
4221
4222
|
}, [e, s]), { buttonIcon: o, buttonClass: l, tooltipContent: u } = se(() => {
|
|
4222
|
-
switch (
|
|
4223
|
+
switch (a) {
|
|
4223
4224
|
case "UNSAVED":
|
|
4224
4225
|
return {
|
|
4225
4226
|
tooltipContent: "Save changes",
|
|
@@ -4245,22 +4246,22 @@ const Wo = () => {
|
|
|
4245
4246
|
buttonClass: "bg-green-500 text-white hover:bg-green-600 hover:text-white focus:ring-green-400"
|
|
4246
4247
|
};
|
|
4247
4248
|
}
|
|
4248
|
-
}, [
|
|
4249
|
+
}, [a]);
|
|
4249
4250
|
return /* @__PURE__ */ r.jsx(gn, { content: u, children: /* @__PURE__ */ r.jsx(
|
|
4250
4251
|
"button",
|
|
4251
4252
|
{
|
|
4252
4253
|
className: `w-7 h-7 mx-3 flex items-center justify-center p-2 rounded-full shadow-sm transition-all duration-200 ease-in-out active:scale-95 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-opacity-50 ${l}`,
|
|
4253
|
-
onClick:
|
|
4254
|
-
disabled:
|
|
4254
|
+
onClick: i,
|
|
4255
|
+
disabled: a === "SAVING",
|
|
4255
4256
|
"aria-label": u,
|
|
4256
4257
|
children: o
|
|
4257
4258
|
}
|
|
4258
4259
|
) });
|
|
4259
|
-
},
|
|
4260
|
+
}, Yo = () => {
|
|
4260
4261
|
const [e, t] = $(!1), [n, s] = $(!1);
|
|
4261
4262
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4262
4263
|
/* @__PURE__ */ r.jsxs(
|
|
4263
|
-
|
|
4264
|
+
W,
|
|
4264
4265
|
{
|
|
4265
4266
|
size: "sm",
|
|
4266
4267
|
className: "relative overflow-hidden transition-all duration-300 ease-in-out from-blue-500 to-purple-600 hover:from-blue-600 hover:to-purple-700 text-white font-semibold shadow-md",
|
|
@@ -4273,61 +4274,61 @@ const Wo = () => {
|
|
|
4273
4274
|
"span",
|
|
4274
4275
|
{
|
|
4275
4276
|
className: `flex items-center gap-2 transition-transform duration-300 ease-in-out ${n ? "-translate-y-10" : ""}`,
|
|
4276
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4277
|
+
children: /* @__PURE__ */ r.jsx(ki, { className: "w-4 h-4 mr-2" })
|
|
4277
4278
|
}
|
|
4278
4279
|
),
|
|
4279
4280
|
/* @__PURE__ */ r.jsx(
|
|
4280
4281
|
"span",
|
|
4281
4282
|
{
|
|
4282
4283
|
className: `absolute inset-0 flex items-center left-3 transition-transform duration-300 ease-in-out ${n ? "" : "translate-y-10"}`,
|
|
4283
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4284
|
+
children: /* @__PURE__ */ r.jsx(Pi, { className: "w-4 h-4 mr-2" })
|
|
4284
4285
|
}
|
|
4285
4286
|
),
|
|
4286
4287
|
"Publish"
|
|
4287
4288
|
]
|
|
4288
4289
|
}
|
|
4289
4290
|
),
|
|
4290
|
-
e && /* @__PURE__ */ r.jsx(
|
|
4291
|
+
e && /* @__PURE__ */ r.jsx(Vo, { onClose: () => t(!1) })
|
|
4291
4292
|
] });
|
|
4292
|
-
},
|
|
4293
|
+
}, Jo = () => {
|
|
4293
4294
|
const e = Lt("settingComponent", null), [t, n] = $(!1);
|
|
4294
4295
|
return e ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4295
4296
|
/* @__PURE__ */ r.jsx(gn, { content: "Website data", children: /* @__PURE__ */ r.jsx(
|
|
4296
|
-
|
|
4297
|
+
W,
|
|
4297
4298
|
{
|
|
4298
4299
|
variant: "ghost",
|
|
4299
4300
|
size: "icon",
|
|
4300
4301
|
className: "gap-2",
|
|
4301
4302
|
onClick: () => n(!0),
|
|
4302
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4303
|
+
children: /* @__PURE__ */ r.jsx(_i, { className: "w-4 h-4" })
|
|
4303
4304
|
}
|
|
4304
4305
|
) }),
|
|
4305
4306
|
/* @__PURE__ */ r.jsx("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" }),
|
|
4306
|
-
t && /* @__PURE__ */ r.jsx(
|
|
4307
|
+
t && /* @__PURE__ */ r.jsx(Wo, { onClose: () => n(!1) })
|
|
4307
4308
|
] }) : null;
|
|
4308
4309
|
};
|
|
4309
|
-
function
|
|
4310
|
+
function Xo() {
|
|
4310
4311
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-end gap-1", children: [
|
|
4311
|
-
/* @__PURE__ */ r.jsx(
|
|
4312
|
-
/* @__PURE__ */ r.jsx(Wo, {}),
|
|
4312
|
+
/* @__PURE__ */ r.jsx(Jo, {}),
|
|
4313
4313
|
/* @__PURE__ */ r.jsx(zo, {}),
|
|
4314
|
+
/* @__PURE__ */ r.jsx(Ho, {}),
|
|
4314
4315
|
/* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4315
|
-
/* @__PURE__ */ r.jsx(
|
|
4316
|
-
/* @__PURE__ */ r.jsx(
|
|
4316
|
+
/* @__PURE__ */ r.jsx(Qo, {}),
|
|
4317
|
+
/* @__PURE__ */ r.jsx(Yo, {})
|
|
4317
4318
|
] })
|
|
4318
4319
|
] });
|
|
4319
4320
|
}
|
|
4320
|
-
const
|
|
4321
|
+
const Zo = ({
|
|
4321
4322
|
editPage: e,
|
|
4322
4323
|
addEditPage: t,
|
|
4323
4324
|
setAddEditPage: n
|
|
4324
4325
|
}) => {
|
|
4325
|
-
const s = t.id, [
|
|
4326
|
+
const s = t.id, [i, a] = $(s && t.name || ""), [o, l] = $(s && t.slug || ""), [u, d] = $(
|
|
4326
4327
|
s || !Y(t == null ? void 0 : t.collection) ? (t == null ? void 0 : t.collection) || "" : "page"
|
|
4327
4328
|
), { data: h = [] } = Ut(), { mutate: f, isPending: y } = Nr(), { mutate: b, isPending: E } = Hn(), A = y || E, w = (g) => {
|
|
4328
4329
|
g.preventDefault(), s ? b(
|
|
4329
4330
|
{
|
|
4330
|
-
name:
|
|
4331
|
+
name: i,
|
|
4331
4332
|
slug: o,
|
|
4332
4333
|
id: t.id,
|
|
4333
4334
|
collection: t.global ? "global" : u
|
|
@@ -4339,7 +4340,7 @@ const Xo = ({
|
|
|
4339
4340
|
}
|
|
4340
4341
|
) : f(
|
|
4341
4342
|
{
|
|
4342
|
-
name:
|
|
4343
|
+
name: i,
|
|
4343
4344
|
slug: o,
|
|
4344
4345
|
collection: t.global ? "global" : u
|
|
4345
4346
|
},
|
|
@@ -4384,9 +4385,9 @@ const Xo = ({
|
|
|
4384
4385
|
le,
|
|
4385
4386
|
{
|
|
4386
4387
|
id: "name",
|
|
4387
|
-
value:
|
|
4388
|
+
value: i,
|
|
4388
4389
|
placeholder: `Enter ${t.global ? "global block" : "page"} name`,
|
|
4389
|
-
onChange: (g) =>
|
|
4390
|
+
onChange: (g) => a(g.target.value),
|
|
4390
4391
|
className: "col-span-3",
|
|
4391
4392
|
required: !0
|
|
4392
4393
|
}
|
|
@@ -4418,22 +4419,22 @@ const Xo = ({
|
|
|
4418
4419
|
] }) })
|
|
4419
4420
|
] }),
|
|
4420
4421
|
/* @__PURE__ */ r.jsx(ct, { children: /* @__PURE__ */ r.jsx(
|
|
4421
|
-
|
|
4422
|
+
W,
|
|
4422
4423
|
{
|
|
4423
4424
|
type: "submit",
|
|
4424
|
-
disabled: A || !
|
|
4425
|
+
disabled: A || !i || !t.global && !o.startsWith("/") || Ke(t.name, i) && Ke(t.slug, o) && Ke(t.pageType, u),
|
|
4425
4426
|
children: A ? s ? "Updating..." : "Adding..." : t.global ? `${s ? "Update" : "Add"} global block` : `${s ? "Update" : "Add"} Page`
|
|
4426
4427
|
}
|
|
4427
4428
|
) })
|
|
4428
4429
|
] })
|
|
4429
4430
|
] }) });
|
|
4430
|
-
},
|
|
4431
|
-
const [t, n] = $([]), [s,
|
|
4431
|
+
}, el = ({ close: e }) => {
|
|
4432
|
+
const [t, n] = $([]), [s, i] = $(""), [a, o] = $(null), [l, u] = $(null), [d, h] = $(null), [f, y] = $(null), { data: b } = Ut(), { data: E, isFetching: A } = Wn(), [w, g] = Fe(), x = w.get("page"), B = Dt(
|
|
4432
4433
|
(j) => {
|
|
4433
4434
|
window.history.pushState({}, "", `?page=${j}`), g(new URLSearchParams({ page: j })), window.dispatchEvent(new PopStateEvent("popstate")), e();
|
|
4434
4435
|
},
|
|
4435
4436
|
[e, g]
|
|
4436
|
-
),
|
|
4437
|
+
), K = (j) => {
|
|
4437
4438
|
je(t, j) ? n(de(t, (G) => G !== j)) : n([...t, j]);
|
|
4438
4439
|
};
|
|
4439
4440
|
Ce(() => {
|
|
@@ -4445,7 +4446,7 @@ const Xo = ({
|
|
|
4445
4446
|
const O = se(() => {
|
|
4446
4447
|
const j = de(E, (v) => Y(s) ? !0 : je(yt(v == null ? void 0 : v.name), yt(s)) || je(yt(v == null ? void 0 : v.slug), yt(s)));
|
|
4447
4448
|
Y(s) || n(fe(j, "collection"));
|
|
4448
|
-
const G =
|
|
4449
|
+
const G = vi(j, "collection"), ce = [
|
|
4449
4450
|
{ key: "page", name: "Pages" },
|
|
4450
4451
|
{ key: "global", name: "Global Block" },
|
|
4451
4452
|
...b.filter((v) => v.key !== "page")
|
|
@@ -4466,7 +4467,7 @@ const Xo = ({
|
|
|
4466
4467
|
] }),
|
|
4467
4468
|
/* @__PURE__ */ r.jsxs("div", { className: "relative flex item-center gap-x-4", children: [
|
|
4468
4469
|
/* @__PURE__ */ r.jsx(
|
|
4469
|
-
|
|
4470
|
+
Oi,
|
|
4470
4471
|
{
|
|
4471
4472
|
strokeWidth: 2.5,
|
|
4472
4473
|
className: "absolute left-3 top-2.5 h-4 w-4 text-gray-400"
|
|
@@ -4478,7 +4479,7 @@ const Xo = ({
|
|
|
4478
4479
|
placeholder: "Search pages...",
|
|
4479
4480
|
className: "pl-9 text-xs font-medium placeholder:text-gray-400 leading-none text-gray-700",
|
|
4480
4481
|
value: s,
|
|
4481
|
-
onChange: (j) =>
|
|
4482
|
+
onChange: (j) => i(j.target.value)
|
|
4482
4483
|
}
|
|
4483
4484
|
)
|
|
4484
4485
|
] }),
|
|
@@ -4497,10 +4498,10 @@ const Xo = ({
|
|
|
4497
4498
|
"div",
|
|
4498
4499
|
{
|
|
4499
4500
|
className: "group font-medium flex items-center leading-none gap-x-2 cursor-pointer hover:bg-slate-100 rounded duration-200 p-1.5",
|
|
4500
|
-
onClick: () =>
|
|
4501
|
+
onClick: () => K(j.key),
|
|
4501
4502
|
children: [
|
|
4502
|
-
je(t, j.key) ? /* @__PURE__ */ r.jsx(qs, { className: "w-4 h-4 text-slate-400 ease-in transition-all" }) : /* @__PURE__ */ r.jsx(
|
|
4503
|
-
["page", "global"].includes(j.key) ? /* @__PURE__ */ r.jsx(
|
|
4503
|
+
je(t, j.key) ? /* @__PURE__ */ r.jsx(qs, { className: "w-4 h-4 text-slate-400 ease-in transition-all" }) : /* @__PURE__ */ r.jsx(Ri, { className: "w-4 h-4 text-slate-400 ease-in" }),
|
|
4504
|
+
["page", "global"].includes(j.key) ? /* @__PURE__ */ r.jsx(Gi, { className: "w-4 h-4" }) : /* @__PURE__ */ r.jsx(Ii, { className: "w-4 h-4" }),
|
|
4504
4505
|
/* @__PURE__ */ r.jsx("span", { className: "leading-none", children: Se(j.name) || "Uncategorized" }),
|
|
4505
4506
|
/* @__PURE__ */ r.jsx(
|
|
4506
4507
|
Es,
|
|
@@ -4511,7 +4512,7 @@ const Xo = ({
|
|
|
4511
4512
|
}
|
|
4512
4513
|
),
|
|
4513
4514
|
/* @__PURE__ */ r.jsxs(
|
|
4514
|
-
|
|
4515
|
+
W,
|
|
4515
4516
|
{
|
|
4516
4517
|
variant: "ghost",
|
|
4517
4518
|
size: "sm",
|
|
@@ -4548,7 +4549,7 @@ const Xo = ({
|
|
|
4548
4549
|
className: `rounded flex items-center justify-between leading-none duration-300 cursor-pointer px-3 py-1.5 ${ce ? "bg-gray-200" : "hover:bg-gray-100"}`,
|
|
4549
4550
|
children: [
|
|
4550
4551
|
/* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
4551
|
-
j.key === "global" ? /* @__PURE__ */ r.jsx(
|
|
4552
|
+
j.key === "global" ? /* @__PURE__ */ r.jsx(Di, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ r.jsx(Xt, { className: "w-4 h-4 text-slate-500 stroke-[1]" }),
|
|
4552
4553
|
/* @__PURE__ */ r.jsx(
|
|
4553
4554
|
"div",
|
|
4554
4555
|
{
|
|
@@ -4591,7 +4592,7 @@ const Xo = ({
|
|
|
4591
4592
|
});
|
|
4592
4593
|
},
|
|
4593
4594
|
children: [
|
|
4594
|
-
/* @__PURE__ */ r.jsx(
|
|
4595
|
+
/* @__PURE__ */ r.jsx(Li, { className: "size-3" }),
|
|
4595
4596
|
"Edit"
|
|
4596
4597
|
]
|
|
4597
4598
|
}
|
|
@@ -4630,7 +4631,7 @@ const Xo = ({
|
|
|
4630
4631
|
v.stopPropagation(), o(G);
|
|
4631
4632
|
},
|
|
4632
4633
|
children: [
|
|
4633
|
-
/* @__PURE__ */ r.jsx(
|
|
4634
|
+
/* @__PURE__ */ r.jsx(Ui, { className: "size-3" }),
|
|
4634
4635
|
"Delete"
|
|
4635
4636
|
]
|
|
4636
4637
|
}
|
|
@@ -4647,7 +4648,7 @@ const Xo = ({
|
|
|
4647
4648
|
] }, j.key)) })
|
|
4648
4649
|
] }),
|
|
4649
4650
|
/* @__PURE__ */ r.jsxs(
|
|
4650
|
-
|
|
4651
|
+
W,
|
|
4651
4652
|
{
|
|
4652
4653
|
className: "text-sm flex gap-x-2",
|
|
4653
4654
|
onClick: () => {
|
|
@@ -4664,14 +4665,14 @@ const Xo = ({
|
|
|
4664
4665
|
}
|
|
4665
4666
|
),
|
|
4666
4667
|
f && /* @__PURE__ */ r.jsx(
|
|
4667
|
-
|
|
4668
|
+
Zo,
|
|
4668
4669
|
{
|
|
4669
4670
|
editPage: B,
|
|
4670
4671
|
addEditPage: f,
|
|
4671
4672
|
setAddEditPage: y
|
|
4672
4673
|
}
|
|
4673
4674
|
),
|
|
4674
|
-
|
|
4675
|
+
a && /* @__PURE__ */ r.jsx(Tr, { page: a, onClose: () => o(null) }),
|
|
4675
4676
|
l && /* @__PURE__ */ r.jsx(
|
|
4676
4677
|
kr,
|
|
4677
4678
|
{
|
|
@@ -4687,20 +4688,20 @@ const Xo = ({
|
|
|
4687
4688
|
}
|
|
4688
4689
|
)
|
|
4689
4690
|
] });
|
|
4690
|
-
},
|
|
4691
|
+
}, tl = () => {
|
|
4691
4692
|
const e = Lt("logo", null);
|
|
4692
4693
|
return e ? /* @__PURE__ */ r.jsx("div", { className: "w-full max-h-9 overflow-hidden pr-2", children: ln.createElement(e, {}) }) : null;
|
|
4693
|
-
},
|
|
4694
|
-
const [e] = Fe(), t = e.get("page"), { data: n, isFetching: s } = Be(), [
|
|
4694
|
+
}, nl = () => {
|
|
4695
|
+
const [e] = Fe(), t = e.get("page"), { data: n, isFetching: s } = Be(), [i, a] = $(!1), o = !!t && !Y(n), l = !t || !s && Y(n) || i;
|
|
4695
4696
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4696
4697
|
/* @__PURE__ */ r.jsxs(
|
|
4697
|
-
|
|
4698
|
+
W,
|
|
4698
4699
|
{
|
|
4699
4700
|
variant: "secondary",
|
|
4700
4701
|
className: "flex items-center w-full space-x-2 py-1",
|
|
4701
|
-
onClick: () =>
|
|
4702
|
+
onClick: () => a(!0),
|
|
4702
4703
|
children: [
|
|
4703
|
-
/* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(
|
|
4704
|
+
/* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(Fi, { className: "h-4 w-4" }) }),
|
|
4704
4705
|
/* @__PURE__ */ r.jsxs("span", { className: "truncate leading-tight flex items-center max-w-[200px]", children: [
|
|
4705
4706
|
/* @__PURE__ */ r.jsx("span", { className: "text-slate-600 pr-1 font-light", children: "Editing:" }),
|
|
4706
4707
|
s ? /* @__PURE__ */ r.jsx($s, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : Se(V(n, "name")) ?? ""
|
|
@@ -4710,24 +4711,24 @@ const Xo = ({
|
|
|
4710
4711
|
"template-viewer"
|
|
4711
4712
|
),
|
|
4712
4713
|
/* @__PURE__ */ r.jsx(
|
|
4713
|
-
|
|
4714
|
+
Qi,
|
|
4714
4715
|
{
|
|
4715
4716
|
open: l,
|
|
4716
|
-
onOpenChange: (u) => !u && o &&
|
|
4717
|
+
onOpenChange: (u) => !u && o && a(!1),
|
|
4717
4718
|
children: /* @__PURE__ */ r.jsx(
|
|
4718
|
-
|
|
4719
|
+
Yi,
|
|
4719
4720
|
{
|
|
4720
4721
|
side: "left",
|
|
4721
4722
|
className: `!max-w-screen-sm border-border w-full ${o ? "" : "sheet-hide-close-btn"}`,
|
|
4722
|
-
children: /* @__PURE__ */ r.jsx(
|
|
4723
|
+
children: /* @__PURE__ */ r.jsx(el, { close: () => a(!1) })
|
|
4723
4724
|
}
|
|
4724
4725
|
)
|
|
4725
4726
|
}
|
|
4726
4727
|
)
|
|
4727
4728
|
] });
|
|
4728
|
-
},
|
|
4729
|
-
const { fallbackLang: e, languages: t, selectedLang: n, setSelectedLang: s } = cn(),
|
|
4730
|
-
const y =
|
|
4729
|
+
}, sl = () => {
|
|
4730
|
+
const { fallbackLang: e, languages: t, selectedLang: n, setSelectedLang: s } = cn(), i = Y(n) ? e : n, [a, o] = $(null), { data: l } = Be(), { data: u } = zn(), { data: d, isFetching: h } = Qn(), f = se(() => {
|
|
4731
|
+
const y = bi(
|
|
4731
4732
|
fe(V(u, "languages"), (b) => {
|
|
4732
4733
|
const E = ye(d, { lang: b });
|
|
4733
4734
|
return {
|
|
@@ -4748,9 +4749,9 @@ const Xo = ({
|
|
|
4748
4749
|
}, [d, u]);
|
|
4749
4750
|
return Y(t) || h ? null : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4750
4751
|
/* @__PURE__ */ r.jsxs(Mn, { children: [
|
|
4751
|
-
/* @__PURE__ */ r.jsx($n, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ r.jsxs(
|
|
4752
|
+
/* @__PURE__ */ r.jsx($n, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ r.jsxs(W, { variant: "ghost", size: "sm", className: "gap-2", children: [
|
|
4752
4753
|
/* @__PURE__ */ r.jsx(Vs, { className: "w-4 h-4" }),
|
|
4753
|
-
V(Ne,
|
|
4754
|
+
V(Ne, i, i),
|
|
4754
4755
|
/* @__PURE__ */ r.jsx(qs, { className: "w-4 h-4" })
|
|
4755
4756
|
] }) }),
|
|
4756
4757
|
/* @__PURE__ */ r.jsxs(qn, { className: "border-border space-y-1", children: [
|
|
@@ -4759,9 +4760,9 @@ const Xo = ({
|
|
|
4759
4760
|
(y) => /* @__PURE__ */ r.jsxs(
|
|
4760
4761
|
pe,
|
|
4761
4762
|
{
|
|
4762
|
-
className:
|
|
4763
|
+
className: ui(
|
|
4763
4764
|
"flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
|
|
4764
|
-
y.key ===
|
|
4765
|
+
y.key === i && "!bg-gray-200 text-gray-700"
|
|
4765
4766
|
),
|
|
4766
4767
|
onClick: () => s(y.key),
|
|
4767
4768
|
children: [
|
|
@@ -4771,7 +4772,7 @@ const Xo = ({
|
|
|
4771
4772
|
{
|
|
4772
4773
|
className: "text-[9px] flex items-center gap-x-1 text-orange-500 leading-none",
|
|
4773
4774
|
children: [
|
|
4774
|
-
/* @__PURE__ */ r.jsx(
|
|
4775
|
+
/* @__PURE__ */ r.jsx(Bi, { fill: "orange", className: "w-2 h-2" }),
|
|
4775
4776
|
"Primary"
|
|
4776
4777
|
]
|
|
4777
4778
|
}
|
|
@@ -4782,9 +4783,9 @@ const Xo = ({
|
|
|
4782
4783
|
)
|
|
4783
4784
|
),
|
|
4784
4785
|
!Y(f.filter((y) => !y.isLangPageAdded)) && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4785
|
-
/* @__PURE__ */ r.jsx(
|
|
4786
|
+
/* @__PURE__ */ r.jsx(Ji, {}),
|
|
4786
4787
|
/* @__PURE__ */ r.jsxs(
|
|
4787
|
-
|
|
4788
|
+
W,
|
|
4788
4789
|
{
|
|
4789
4790
|
size: "sm",
|
|
4790
4791
|
variant: "ghost",
|
|
@@ -4807,36 +4808,36 @@ const Xo = ({
|
|
|
4807
4808
|
] })
|
|
4808
4809
|
] })
|
|
4809
4810
|
] }),
|
|
4810
|
-
|
|
4811
|
+
a && /* @__PURE__ */ r.jsx(
|
|
4811
4812
|
Pr,
|
|
4812
4813
|
{
|
|
4813
4814
|
languages: t,
|
|
4814
|
-
langProps:
|
|
4815
|
+
langProps: a,
|
|
4815
4816
|
onClose: () => o(null)
|
|
4816
4817
|
}
|
|
4817
4818
|
)
|
|
4818
4819
|
] });
|
|
4819
4820
|
};
|
|
4820
|
-
function
|
|
4821
|
+
function rl() {
|
|
4821
4822
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center justify-end gap-1", children: [
|
|
4822
|
-
/* @__PURE__ */ r.jsx(el, {}),
|
|
4823
4823
|
/* @__PURE__ */ r.jsx(tl, {}),
|
|
4824
|
-
/* @__PURE__ */ r.jsx(nl, {})
|
|
4824
|
+
/* @__PURE__ */ r.jsx(nl, {}),
|
|
4825
|
+
/* @__PURE__ */ r.jsx(sl, {})
|
|
4825
4826
|
] });
|
|
4826
4827
|
}
|
|
4827
|
-
|
|
4828
|
-
const
|
|
4829
|
-
const t = Ls([]), [n] = Fe(), s = n.get("page"), { data:
|
|
4828
|
+
ai();
|
|
4829
|
+
const il = (e) => {
|
|
4830
|
+
const t = Ls([]), [n] = Fe(), s = n.get("page"), { data: i } = Be(), { data: a } = ko(), { data: o, isFetching: l } = Po(), { blocks: u } = _o(o), { data: d } = zn(), { data: h } = Ut(), { mutateAsync: f } = Ro(), y = Ao(), { getUILibraryBlock: b, getUILibraryBlocks: E, onSave: A } = To(), { getGlobalBlocks: w, getGlobalBlockBlocks: g } = Oo(), { aiContext: x, setAiContext: B } = Kn(), { mutateAsync: K } = Go();
|
|
4830
4831
|
t.current = u;
|
|
4831
4832
|
const O = se(() => {
|
|
4832
4833
|
const v = {};
|
|
4833
4834
|
return e.mediaManagerComponent && (v.mediaManagerComponent = e.mediaManagerComponent), v;
|
|
4834
|
-
}, [e.mediaManagerComponent]), j = se(() => Array.isArray(e == null ? void 0 : e.uiLibraries) ? [...
|
|
4835
|
-
async (v, D) => await
|
|
4836
|
-
[
|
|
4835
|
+
}, [e.mediaManagerComponent]), j = se(() => Array.isArray(e == null ? void 0 : e.uiLibraries) ? [...a, ...e == null ? void 0 : e.uiLibraries] : a, [a, e == null ? void 0 : e.uiLibraries]), G = Dt(
|
|
4836
|
+
async (v, D) => await K({ collection: v, query: D }),
|
|
4837
|
+
[K]
|
|
4837
4838
|
), ce = se(() => V(d, "theme", {}), [d]);
|
|
4838
4839
|
return /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsx(
|
|
4839
|
-
|
|
4840
|
+
di,
|
|
4840
4841
|
{
|
|
4841
4842
|
loading: l,
|
|
4842
4843
|
fallbackLang: d.fallbackLang || "en",
|
|
@@ -4877,12 +4878,12 @@ const rl = (e) => {
|
|
|
4877
4878
|
return await A({ page: s, blocks: oe }), t.current = v, !0;
|
|
4878
4879
|
},
|
|
4879
4880
|
topBarComponents: {
|
|
4880
|
-
left: [
|
|
4881
|
-
right: [
|
|
4881
|
+
left: [rl],
|
|
4882
|
+
right: [Xo]
|
|
4882
4883
|
},
|
|
4883
4884
|
sideBarComponents: {
|
|
4884
4885
|
top: [
|
|
4885
|
-
...(
|
|
4886
|
+
...(i == null ? void 0 : i.collection) !== "global" ? [
|
|
4886
4887
|
{
|
|
4887
4888
|
label: "SEO Setting",
|
|
4888
4889
|
component: Cr,
|
|
@@ -4904,8 +4905,8 @@ const rl = (e) => {
|
|
|
4904
4905
|
] : [],
|
|
4905
4906
|
...Y(d == null ? void 0 : d.languages) ? [] : [
|
|
4906
4907
|
{
|
|
4907
|
-
label: `Language ${(
|
|
4908
|
-
component:
|
|
4908
|
+
label: `Language ${(i == null ? void 0 : i.collection) === "global" ? "" : "page"}`,
|
|
4909
|
+
component: $o,
|
|
4909
4910
|
icon: /* @__PURE__ */ r.jsx(Vs, { className: "w-5 h-5 stroke-[2]" })
|
|
4910
4911
|
}
|
|
4911
4912
|
]
|
|
@@ -4914,68 +4915,68 @@ const rl = (e) => {
|
|
|
4914
4915
|
...O
|
|
4915
4916
|
}
|
|
4916
4917
|
) });
|
|
4917
|
-
}, al = new
|
|
4918
|
+
}, al = new ri({
|
|
4918
4919
|
defaultOptions: { queries: { refetchOnWindowFocus: !1 } }
|
|
4919
|
-
}),
|
|
4920
|
+
}), ql = (e) => {
|
|
4920
4921
|
const [, t] = Sr();
|
|
4921
4922
|
return Ce(() => {
|
|
4922
4923
|
t(
|
|
4923
|
-
|
|
4924
|
+
wi(e, ["apiUrl", "getPreviewUrl", "logo", "settingComponent"])
|
|
4924
4925
|
);
|
|
4925
|
-
}, [e, t]), /* @__PURE__ */ r.jsxs(
|
|
4926
|
-
/* @__PURE__ */ r.jsx(
|
|
4927
|
-
/* @__PURE__ */ r.jsx(
|
|
4926
|
+
}, [e, t]), /* @__PURE__ */ r.jsxs(ii, { client: al, children: [
|
|
4927
|
+
/* @__PURE__ */ r.jsx(il, { ...e }),
|
|
4928
|
+
/* @__PURE__ */ r.jsx(No, {})
|
|
4928
4929
|
] });
|
|
4929
4930
|
};
|
|
4930
4931
|
export {
|
|
4931
4932
|
Ks as $,
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4933
|
+
Ul as A,
|
|
4934
|
+
yl as B,
|
|
4935
|
+
kl as C,
|
|
4936
|
+
_l as D,
|
|
4936
4937
|
ee as E,
|
|
4937
|
-
|
|
4938
|
+
jl as F,
|
|
4938
4939
|
Cs as G,
|
|
4939
|
-
|
|
4940
|
-
|
|
4940
|
+
xo as H,
|
|
4941
|
+
Sl as I,
|
|
4941
4942
|
Yt as J,
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4943
|
+
Ml as K,
|
|
4944
|
+
Il as L,
|
|
4945
|
+
Rl as M,
|
|
4945
4946
|
Re as N,
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4947
|
+
_a as O,
|
|
4948
|
+
Pl as P,
|
|
4949
|
+
Ol as Q,
|
|
4950
|
+
Al as R,
|
|
4951
|
+
Nl as S,
|
|
4952
|
+
Cl as T,
|
|
4952
4953
|
Jt as U,
|
|
4953
|
-
|
|
4954
|
-
|
|
4954
|
+
vl as V,
|
|
4955
|
+
ql as W,
|
|
4955
4956
|
er as a,
|
|
4956
4957
|
H as b,
|
|
4957
|
-
|
|
4958
|
-
|
|
4958
|
+
ae as c,
|
|
4959
|
+
Ta as d,
|
|
4959
4960
|
Hs as e,
|
|
4960
4961
|
tr as f,
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4962
|
+
$l as g,
|
|
4963
|
+
ya as h,
|
|
4964
|
+
bl as i,
|
|
4964
4965
|
Ie as j,
|
|
4965
4966
|
In as k,
|
|
4966
|
-
|
|
4967
|
-
|
|
4967
|
+
El as l,
|
|
4968
|
+
Bl as m,
|
|
4968
4969
|
wt as n,
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4970
|
+
xl as o,
|
|
4971
|
+
ra as p,
|
|
4972
|
+
Ga as q,
|
|
4972
4973
|
Gn as r,
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4974
|
+
Fl as s,
|
|
4975
|
+
Tl as t,
|
|
4976
|
+
wl as u,
|
|
4977
|
+
Pa as v,
|
|
4978
|
+
Gl as w,
|
|
4979
|
+
Dl as x,
|
|
4980
|
+
Ia as y,
|
|
4981
|
+
Ll as z
|
|
4981
4982
|
};
|