@chaibuilder/sdk 1.2.22 → 1.2.24
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/AddBlocks-l1JENNvq.js +206 -0
- package/dist/AddBlocks-zPPKkeKs.cjs +1 -0
- package/dist/BrandingOptions-DkpqGARR.cjs +1 -0
- package/dist/{BrandingOptions-4961TxX2.js → BrandingOptions-udtH5yJs.js} +11 -10
- package/dist/CanvasArea-IqeMbtOf.js +951 -0
- package/dist/CanvasArea-plZTWifU.cjs +55 -0
- package/dist/{Class-MmCxz2Ay.cjs → Class-PoYusiA5.cjs} +1 -1
- package/dist/{Class-3k8xjeiM.js → Class-lGzsNBOK.js} +1 -1
- package/dist/CurrentPage-7_s9LtEJ.cjs +1 -0
- package/dist/{CurrentPage-oPZN6Gwj.js → CurrentPage-AA0XHYMU.js} +23 -24
- package/dist/ListTree-LAN7QmHQ.cjs +1 -0
- package/dist/ListTree-ZNEtds1d.js +309 -0
- package/dist/MODIFIERS-0g14w5RS.cjs +1 -0
- package/dist/{MODIFIERS-WQdaNvb8.js → MODIFIERS-dytZ-osO.js} +4 -8
- package/dist/PagesPanel-5qMZBatP.cjs +1 -0
- package/dist/{PagesPanel-pRKHw-AZ.js → PagesPanel-883P3_su.js} +9 -10
- package/dist/{ProjectPanel-iU6DY-Yp.js → ProjectPanel-Y8Qcmsn0.js} +11 -12
- package/dist/ProjectPanel-otQb9ceP.cjs +1 -0
- package/dist/STRINGS--j49GZJP.js +7 -0
- package/dist/STRINGS-gPz7CUOk.cjs +1 -0
- package/dist/Settings-Rt342VJ3.cjs +1 -0
- package/dist/{Settings-BhSrj-cE.js → Settings-pIePR1Id.js} +862 -865
- package/dist/{SidePanels-OLOUpKn4.js → SidePanels-NznSn5RN.js} +121 -125
- package/dist/SidePanels-PaQkgjLa.cjs +1 -0
- package/dist/Topbar-CqW7G360.cjs +1 -0
- package/dist/{Topbar-Ny9T-7Zb.js → Topbar-pWzBEOed.js} +39 -35
- package/dist/UnsplashImages-NGskB93R.cjs +1 -0
- package/dist/{UnsplashImages-Y8RGFVSh.js → UnsplashImages-qvwFbV-E.js} +17 -16
- package/dist/{UploadImages-dd8LfyFr.js → UploadImages-9NapgXBq.js} +12 -11
- package/dist/UploadImages-Oh7Glr9A.cjs +1 -0
- package/dist/{add-page-modal-Jni6CY1x.js → add-page-modal-4PiRJgX5.js} +11 -12
- package/dist/add-page-modal-4o2L_7T7.cjs +1 -0
- package/dist/confirm-alert-C4M9eF-o.cjs +1 -0
- package/dist/{confirm-alert-sc8RaWvD.js → confirm-alert-GUhZ_G8w.js} +7 -6
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +5 -3
- package/dist/core.js +48 -49
- package/dist/defaultTheme-7VqqhOcp.cjs +1 -0
- package/dist/{defaultTheme-gunU_Fe5.js → defaultTheme-D8B4-wHO.js} +1 -1
- package/dist/{delete-page-modal-0WiMZFxr.js → delete-page-modal-4l5-RhQB.js} +10 -11
- package/dist/delete-page-modal-Bek5bCf-.cjs +1 -0
- package/dist/email.cjs +1 -1
- package/dist/email.d.ts +3 -1
- package/dist/email.js +16 -16
- package/dist/{form-Nj6Kdn3g.js → form-STUz-6nE.js} +1 -1
- package/dist/{form-n1Q6u16z.cjs → form-lBQ_76Uw.cjs} +1 -1
- package/dist/html-to-json-efmv1pCj.cjs +1 -0
- package/dist/{html-to-json-C5sExaSD.js → html-to-json-ngX9ef2u.js} +31 -29
- package/dist/{index-IPJAbzzO.js → index-Gk6sASBd.js} +1242 -1213
- package/dist/{index-0bwkNnA0.cjs → index-dgm-fd8U.cjs} +42 -42
- package/dist/{index-UP_4awU9.js → index-gS-3liKK.js} +4479 -4484
- package/dist/index-h-hd6EvN.cjs +1 -0
- package/dist/index-oCYKBYyT.cjs +1 -0
- package/dist/{index-_VPpjzJu.js → index-xZWaF8AW.js} +118 -119
- package/dist/lib.cjs +3 -3
- package/dist/lib.js +17 -16
- package/dist/page-viewer-JlKEwACu.cjs +1 -0
- package/dist/{page-viewer-L1Dmgj-c.js → page-viewer-rCXavxpd.js} +15 -16
- package/dist/project-general-setting-2FGoUZ-z.cjs +1 -0
- package/dist/{project-general-setting-sUP7JqWK.js → project-general-setting-rmAVpDu9.js} +11 -12
- package/dist/project-seo-setting-mlxL_e2_.cjs +1 -0
- package/dist/{project-seo-setting-NNvAGt4T.js → project-seo-setting-pX34Qsym.js} +8 -7
- package/dist/render.cjs +1 -1
- package/dist/render.js +14 -13
- package/dist/single-page-detail-c6-wRWyN.cjs +1 -0
- package/dist/{single-page-detail-FXg_NebW.js → single-page-detail-rSQomrY5.js} +12 -13
- package/dist/studio.cjs +1 -1
- package/dist/studio.d.ts +3 -1
- package/dist/studio.js +8 -9
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +139 -138
- package/dist/web-blocks.cjs +6 -1
- package/dist/web-blocks.js +462 -354
- package/package.json +3 -5
- package/dist/AddBlocks-157fSrJX.cjs +0 -1
- package/dist/AddBlocks-WgpssWmQ.js +0 -223
- package/dist/BrandingOptions-nwXR9TMl.cjs +0 -1
- package/dist/CanvasArea-MajWGr9z.js +0 -908
- package/dist/CanvasArea-MmTlc5Vb.cjs +0 -55
- package/dist/CurrentPage-LpLr0lDI.cjs +0 -1
- package/dist/ListTree-dvxHTXs4.js +0 -167
- package/dist/ListTree-gTmusfso.cjs +0 -1
- package/dist/MODIFIERS-9EwxLM8V.cjs +0 -1
- package/dist/Outline-2OxsXs1-.js +0 -294
- package/dist/Outline-7CCnnzmK.cjs +0 -1
- package/dist/PagesPanel-8536oBWB.cjs +0 -1
- package/dist/ProjectPanel-oILsUWOH.cjs +0 -1
- package/dist/Settings-jHiYmt0y.cjs +0 -1
- package/dist/SidePanels-bcJJocSq.cjs +0 -1
- package/dist/Topbar-NMvzqQHW.cjs +0 -1
- package/dist/TypeIcon-ElNNPazl.cjs +0 -1
- package/dist/TypeIcon-qO96rNbV.js +0 -69
- package/dist/UnsplashImages-6tZv1q2_.cjs +0 -1
- package/dist/UploadImages-VLlVg9Ur.cjs +0 -1
- package/dist/add-page-modal-IsqDdK7X.cjs +0 -1
- package/dist/confirm-alert-f26zJ7Js.cjs +0 -1
- package/dist/defaultTheme-7Lk2zq60.cjs +0 -1
- package/dist/delete-page-modal-c3b-GCap.cjs +0 -1
- package/dist/html-to-json-FGufPv9R.cjs +0 -1
- package/dist/index-9PHdn80L.cjs +0 -1
- package/dist/index-nwAgi0aD.cjs +0 -1
- package/dist/page-viewer-TnxHhq7S.cjs +0 -1
- package/dist/project-general-setting-1Ot1RU43.cjs +0 -1
- package/dist/project-seo-setting-3-vBkx2v.cjs +0 -1
- package/dist/single-page-detail-btEKYXjE.cjs +0 -1
- package/dist/useAddBlockByDrop-V8xo-PNQ.js +0 -20
- package/dist/useAddBlockByDrop-qRHgy8_0.cjs +0 -1
|
@@ -1,43 +1,44 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { has as pe, get as
|
|
4
|
-
import { g as de, a as
|
|
5
|
-
import { getBlockComponent as
|
|
6
|
-
import { atom as w, useAtomValue as
|
|
7
|
-
import { a as
|
|
8
|
-
import { g as
|
|
9
|
-
import { useThrottledCallback as
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import tt, { createContext as Es, useContext as Os, useRef as xr, createElement as vr, useReducer as Ls, useEffect as Ae, useDebugValue as zs, useCallback as $, useMemo as Vs, useState as Ce, Suspense as yt } from "react";
|
|
3
|
+
import { memoize as Oe, has as pe, get as J, flatten as re, filter as E, isString as zt, find as oe, map as I, omit as st, each as ce, set as Se, includes as Y, isUndefined as wr, without as Vt, isEmpty as Be, forIn as $t, isObject as $s, first as ee, noop as qe, keys as Fs, startsWith as Ft, isNull as Ke, pick as wt, sortBy as Nt } from "lodash-es";
|
|
4
|
+
import { g as de, a as Us } from "./Functions-7jnEwJyw.js";
|
|
5
|
+
import { getBlockComponent as Le } from "@chaibuilder/runtime";
|
|
6
|
+
import { atom as w, useAtomValue as te, useAtom as O, useSetAtom as _e } from "jotai";
|
|
7
|
+
import { a as fe, I as Ut, S as Je } from "./STRINGS--j49GZJP.js";
|
|
8
|
+
import { g as Ws } from "./_commonjsHelpers-UyOWmZb0.js";
|
|
9
|
+
import { useThrottledCallback as Gs } from "@react-hookz/web";
|
|
10
|
+
import { B as Ye } from "./MODIFIERS-dytZ-osO.js";
|
|
11
|
+
import { a as d, c as Ie } from "./Class-lGzsNBOK.js";
|
|
12
|
+
import "react-i18next";
|
|
10
13
|
import { j as a } from "./jsx-runtime-WbnYoNE9.js";
|
|
11
|
-
import * as
|
|
14
|
+
import * as Wt from "@radix-ui/react-toggle";
|
|
12
15
|
import { cva as ge } from "class-variance-authority";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import * as
|
|
19
|
-
import * as
|
|
20
|
-
import * as Ft from "@radix-ui/react-label";
|
|
16
|
+
import * as Qe from "@radix-ui/react-switch";
|
|
17
|
+
import { Slot as Hs } from "@radix-ui/react-slot";
|
|
18
|
+
import * as me from "@radix-ui/react-accordion";
|
|
19
|
+
import { ChevronDownIcon as qs, Cross2Icon as ot, ChevronRightIcon as nt, CheckIcon as ze, DotFilledIcon as at, CaretSortIcon as Ks, MagnifyingGlassIcon as Js } from "@radix-ui/react-icons";
|
|
20
|
+
import * as H from "@radix-ui/react-alert-dialog";
|
|
21
|
+
import * as P from "@radix-ui/react-dialog";
|
|
22
|
+
import * as Gt from "@radix-ui/react-label";
|
|
21
23
|
import * as ue from "@radix-ui/react-scroll-area";
|
|
22
24
|
import * as be from "@radix-ui/react-tabs";
|
|
23
|
-
import * as
|
|
24
|
-
import * as
|
|
25
|
-
import * as
|
|
26
|
-
import * as
|
|
25
|
+
import * as ye from "@radix-ui/react-tooltip";
|
|
26
|
+
import * as je from "@radix-ui/react-popover";
|
|
27
|
+
import * as _ from "@radix-ui/react-menubar";
|
|
28
|
+
import * as Ve from "@radix-ui/react-hover-card";
|
|
27
29
|
import * as U from "@radix-ui/react-select";
|
|
28
|
-
import * as
|
|
29
|
-
import * as
|
|
30
|
-
import * as
|
|
30
|
+
import * as M from "@radix-ui/react-dropdown-menu";
|
|
31
|
+
import * as Ht from "@radix-ui/react-separator";
|
|
32
|
+
import * as Z from "@radix-ui/react-toast";
|
|
31
33
|
import { Command as Q } from "cmdk";
|
|
32
|
-
import * as
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const s = `atom${++Xs}`, o = {
|
|
34
|
+
import * as D from "@radix-ui/react-context-menu";
|
|
35
|
+
import Ys, { IconPickerItem as Qs } from "react-icons-picker";
|
|
36
|
+
import Xs from "react-dom";
|
|
37
|
+
import Zs from "react-quill";
|
|
38
|
+
var W = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
39
|
+
let eo = 0;
|
|
40
|
+
function ae(e, t) {
|
|
41
|
+
const s = `atom${++eo}`, o = {
|
|
41
42
|
toString: () => s
|
|
42
43
|
};
|
|
43
44
|
return typeof e == "function" ? o.read = e : (o.init = e, o.read = (n) => n(o), o.write = (n, i, r) => i(
|
|
@@ -45,272 +46,272 @@ function ne(e, t) {
|
|
|
45
46
|
typeof r == "function" ? r(n(o)) : r
|
|
46
47
|
)), t && (o.write = t), o;
|
|
47
48
|
}
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
}).finally(() =>
|
|
51
|
-
}, Nt = (e, t) => {
|
|
52
|
-
const s = De.get(e);
|
|
53
|
-
s && (De.delete(e), s(t));
|
|
49
|
+
const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new WeakMap(), to = (e, t) => {
|
|
50
|
+
Ee.set(e, t), e.catch(() => {
|
|
51
|
+
}).finally(() => Ee.delete(e));
|
|
54
52
|
}, kt = (e, t) => {
|
|
53
|
+
const s = Ee.get(e);
|
|
54
|
+
s && (Ee.delete(e), s(t));
|
|
55
|
+
}, St = (e, t) => {
|
|
55
56
|
e.status = "fulfilled", e.value = t;
|
|
56
57
|
}, jt = (e, t) => {
|
|
57
58
|
e.status = "rejected", e.reason = t;
|
|
58
|
-
},
|
|
59
|
+
}, so = (e) => typeof (e == null ? void 0 : e.then) == "function", Ne = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v), At = (e, t) => "e" in e && "e" in t && Object.is(e.e, t.e), xe = (e) => "v" in e && e.v instanceof Promise, oo = (e, t) => "v" in e && "v" in t && e.v.orig && e.v.orig === t.v.orig, Te = (e) => {
|
|
59
60
|
if ("e" in e)
|
|
60
61
|
throw e.e;
|
|
61
62
|
return e.v;
|
|
62
|
-
},
|
|
63
|
+
}, no = () => {
|
|
63
64
|
const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new Map();
|
|
64
65
|
let o, n, i;
|
|
65
|
-
(
|
|
66
|
+
(W ? "production" : void 0) !== "production" && (o = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set());
|
|
66
67
|
const r = (u) => e.get(u), c = (u, g) => {
|
|
67
|
-
(
|
|
68
|
-
const
|
|
69
|
-
if (e.set(u, g), s.has(u) || s.set(u,
|
|
68
|
+
(W ? "production" : void 0) !== "production" && Object.freeze(g);
|
|
69
|
+
const x = e.get(u);
|
|
70
|
+
if (e.set(u, g), s.has(u) || s.set(u, x), x && xe(x)) {
|
|
70
71
|
const b = "v" in g ? g.v instanceof Promise ? g.v : Promise.resolve(g.v) : Promise.reject(g.e);
|
|
71
|
-
|
|
72
|
+
kt(x.v, b);
|
|
72
73
|
}
|
|
73
|
-
}, p = (u, g,
|
|
74
|
+
}, p = (u, g, x) => {
|
|
74
75
|
const b = /* @__PURE__ */ new Map();
|
|
75
76
|
let y = !1;
|
|
76
|
-
|
|
77
|
-
!
|
|
77
|
+
x.forEach((h, k) => {
|
|
78
|
+
!h && k === u && (h = g), h ? (b.set(k, h), g.d.get(k) !== h && (y = !0)) : (W ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found");
|
|
78
79
|
}), (y || g.d.size !== b.size) && (g.d = b);
|
|
79
|
-
}, l = (u, g,
|
|
80
|
+
}, l = (u, g, x) => {
|
|
80
81
|
const b = r(u), y = {
|
|
81
82
|
d: (b == null ? void 0 : b.d) || /* @__PURE__ */ new Map(),
|
|
82
83
|
v: g
|
|
83
84
|
};
|
|
84
|
-
if (
|
|
85
|
+
if (x && p(u, y, x), b && Ne(b, y) && b.d === y.d)
|
|
85
86
|
return b;
|
|
86
|
-
if (b &&
|
|
87
|
+
if (b && xe(b) && xe(y) && oo(b, y)) {
|
|
87
88
|
if (b.d === y.d)
|
|
88
89
|
return b;
|
|
89
90
|
y.v = b.v;
|
|
90
91
|
}
|
|
91
92
|
return c(u, y), y;
|
|
92
|
-
},
|
|
93
|
-
if (
|
|
93
|
+
}, m = (u, g, x, b) => {
|
|
94
|
+
if (so(g)) {
|
|
94
95
|
let y;
|
|
95
|
-
const
|
|
96
|
+
const h = new Promise((k, z) => {
|
|
96
97
|
let A = !1;
|
|
97
98
|
g.then(
|
|
98
99
|
(R) => {
|
|
99
100
|
if (!A) {
|
|
100
101
|
A = !0;
|
|
101
|
-
const
|
|
102
|
+
const C = r(u), se = l(
|
|
102
103
|
u,
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
h,
|
|
105
|
+
x
|
|
105
106
|
);
|
|
106
|
-
|
|
107
|
+
St(h, R), k(R), (C == null ? void 0 : C.d) !== se.d && q(u, se, C == null ? void 0 : C.d);
|
|
107
108
|
}
|
|
108
109
|
},
|
|
109
110
|
(R) => {
|
|
110
111
|
if (!A) {
|
|
111
112
|
A = !0;
|
|
112
|
-
const
|
|
113
|
+
const C = r(u), se = l(
|
|
113
114
|
u,
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
h,
|
|
116
|
+
x
|
|
116
117
|
);
|
|
117
|
-
jt(
|
|
118
|
+
jt(h, R), z(R), (C == null ? void 0 : C.d) !== se.d && q(u, se, C == null ? void 0 : C.d);
|
|
118
119
|
}
|
|
119
120
|
}
|
|
120
121
|
), y = (R) => {
|
|
121
122
|
A || (A = !0, R.then(
|
|
122
|
-
(
|
|
123
|
-
(
|
|
123
|
+
(C) => St(h, C),
|
|
124
|
+
(C) => jt(h, C)
|
|
124
125
|
), k(R));
|
|
125
126
|
};
|
|
126
127
|
});
|
|
127
|
-
return
|
|
128
|
+
return h.orig = g, h.status = "pending", to(h, (k) => {
|
|
128
129
|
k && y(k), b == null || b();
|
|
129
|
-
}), l(u,
|
|
130
|
+
}), l(u, h, x);
|
|
130
131
|
}
|
|
131
|
-
return l(u, g,
|
|
132
|
-
}, N = (u, g,
|
|
132
|
+
return l(u, g, x);
|
|
133
|
+
}, N = (u, g, x) => {
|
|
133
134
|
const b = r(u), y = {
|
|
134
135
|
d: (b == null ? void 0 : b.d) || /* @__PURE__ */ new Map(),
|
|
135
136
|
e: g
|
|
136
137
|
};
|
|
137
|
-
return
|
|
138
|
-
},
|
|
138
|
+
return x && p(u, y, x), b && At(b, y) && b.d === y.d ? b : (c(u, y), y);
|
|
139
|
+
}, S = (u) => {
|
|
139
140
|
const g = r(u);
|
|
140
141
|
if (g && (g.d.forEach((A, R) => {
|
|
141
|
-
R !== u && !t.has(R) &&
|
|
142
|
+
R !== u && !t.has(R) && S(R);
|
|
142
143
|
}), Array.from(g.d).every(([A, R]) => {
|
|
143
|
-
const
|
|
144
|
-
return A === u ||
|
|
145
|
-
|
|
144
|
+
const C = r(A);
|
|
145
|
+
return A === u || C === R || // TODO This is a hack, we should find a better solution.
|
|
146
|
+
C && !xe(C) && Ne(C, R);
|
|
146
147
|
})))
|
|
147
148
|
return g;
|
|
148
|
-
const
|
|
149
|
+
const x = /* @__PURE__ */ new Map();
|
|
149
150
|
let b = !0;
|
|
150
151
|
const y = (A) => {
|
|
151
152
|
if (A === u) {
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
154
|
-
return
|
|
155
|
-
if (
|
|
156
|
-
return
|
|
153
|
+
const C = r(A);
|
|
154
|
+
if (C)
|
|
155
|
+
return x.set(A, C), Te(C);
|
|
156
|
+
if (Fe(A))
|
|
157
|
+
return x.set(A, void 0), A.init;
|
|
157
158
|
throw new Error("no atom init");
|
|
158
159
|
}
|
|
159
|
-
const R =
|
|
160
|
-
return
|
|
160
|
+
const R = S(A);
|
|
161
|
+
return x.set(A, R), Te(R);
|
|
161
162
|
};
|
|
162
|
-
let
|
|
163
|
-
const
|
|
163
|
+
let h, k;
|
|
164
|
+
const z = {
|
|
164
165
|
get signal() {
|
|
165
|
-
return
|
|
166
|
+
return h || (h = new AbortController()), h.signal;
|
|
166
167
|
},
|
|
167
168
|
get setSelf() {
|
|
168
|
-
return (
|
|
169
|
-
if ((
|
|
170
|
-
return
|
|
169
|
+
return (W ? "production" : void 0) !== "production" && !Ue(u) && console.warn("setSelf function cannot be used with read-only atom"), !k && Ue(u) && (k = (...A) => {
|
|
170
|
+
if ((W ? "production" : void 0) !== "production" && b && console.warn("setSelf function cannot be called in sync"), !b)
|
|
171
|
+
return G(u, ...A);
|
|
171
172
|
}), k;
|
|
172
173
|
}
|
|
173
174
|
};
|
|
174
175
|
try {
|
|
175
|
-
const A = u.read(y,
|
|
176
|
-
return
|
|
176
|
+
const A = u.read(y, z);
|
|
177
|
+
return m(
|
|
177
178
|
u,
|
|
178
179
|
A,
|
|
179
|
-
|
|
180
|
-
() =>
|
|
180
|
+
x,
|
|
181
|
+
() => h == null ? void 0 : h.abort()
|
|
181
182
|
);
|
|
182
183
|
} catch (A) {
|
|
183
|
-
return N(u, A,
|
|
184
|
+
return N(u, A, x);
|
|
184
185
|
} finally {
|
|
185
186
|
b = !1;
|
|
186
187
|
}
|
|
187
|
-
}, v = (u) => Te(
|
|
188
|
+
}, v = (u) => Te(S(u)), j = (u) => {
|
|
188
189
|
let g = t.get(u);
|
|
189
|
-
return g || (g =
|
|
190
|
-
}, L = (u, g) => !g.l.size && (!g.t.size || g.t.size === 1 && g.t.has(u)),
|
|
190
|
+
return g || (g = V(u)), g;
|
|
191
|
+
}, L = (u, g) => !g.l.size && (!g.t.size || g.t.size === 1 && g.t.has(u)), F = (u) => {
|
|
191
192
|
const g = t.get(u);
|
|
192
|
-
g && L(u, g) &&
|
|
193
|
-
},
|
|
194
|
-
const g = /* @__PURE__ */ new Map(),
|
|
195
|
-
const k = t.get(
|
|
196
|
-
k == null || k.t.forEach((
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
(g.get(
|
|
200
|
-
),
|
|
193
|
+
g && L(u, g) && X(u);
|
|
194
|
+
}, B = (u) => {
|
|
195
|
+
const g = /* @__PURE__ */ new Map(), x = /* @__PURE__ */ new WeakMap(), b = (h) => {
|
|
196
|
+
const k = t.get(h);
|
|
197
|
+
k == null || k.t.forEach((z) => {
|
|
198
|
+
z !== h && (g.set(
|
|
199
|
+
z,
|
|
200
|
+
(g.get(z) || /* @__PURE__ */ new Set()).add(h)
|
|
201
|
+
), x.set(z, (x.get(z) || 0) + 1), b(z));
|
|
201
202
|
});
|
|
202
203
|
};
|
|
203
204
|
b(u);
|
|
204
|
-
const y = (
|
|
205
|
-
const k = t.get(
|
|
206
|
-
k == null || k.t.forEach((
|
|
205
|
+
const y = (h) => {
|
|
206
|
+
const k = t.get(h);
|
|
207
|
+
k == null || k.t.forEach((z) => {
|
|
207
208
|
var A;
|
|
208
|
-
if (
|
|
209
|
-
let R =
|
|
210
|
-
if (R &&
|
|
211
|
-
let
|
|
212
|
-
if (
|
|
213
|
-
const
|
|
214
|
-
|
|
209
|
+
if (z !== h) {
|
|
210
|
+
let R = x.get(z);
|
|
211
|
+
if (R && x.set(z, --R), !R) {
|
|
212
|
+
let C = !!((A = g.get(z)) != null && A.size);
|
|
213
|
+
if (C) {
|
|
214
|
+
const se = r(z), Ds = S(z);
|
|
215
|
+
C = !se || !Ne(se, Ds);
|
|
215
216
|
}
|
|
216
|
-
|
|
217
|
+
C || g.forEach((se) => se.delete(z));
|
|
217
218
|
}
|
|
218
|
-
y(
|
|
219
|
+
y(z);
|
|
219
220
|
}
|
|
220
221
|
});
|
|
221
222
|
};
|
|
222
223
|
y(u);
|
|
223
|
-
},
|
|
224
|
-
let
|
|
225
|
-
const b = (k) => Te(
|
|
224
|
+
}, T = (u, ...g) => {
|
|
225
|
+
let x = !0;
|
|
226
|
+
const b = (k) => Te(S(k)), y = (k, ...z) => {
|
|
226
227
|
let A;
|
|
227
228
|
if (k === u) {
|
|
228
|
-
if (
|
|
229
|
+
if (!Fe(k))
|
|
229
230
|
throw new Error("atom not writable");
|
|
230
|
-
const R = r(k),
|
|
231
|
-
(!R || !
|
|
231
|
+
const R = r(k), C = m(k, z[0]);
|
|
232
|
+
(!R || !Ne(R, C)) && B(k);
|
|
232
233
|
} else
|
|
233
|
-
A =
|
|
234
|
-
if (!
|
|
235
|
-
const R =
|
|
236
|
-
(
|
|
237
|
-
(
|
|
234
|
+
A = T(k, ...z);
|
|
235
|
+
if (!x) {
|
|
236
|
+
const R = K();
|
|
237
|
+
(W ? "production" : void 0) !== "production" && n.forEach(
|
|
238
|
+
(C) => C({ type: "async-write", flushed: R })
|
|
238
239
|
);
|
|
239
240
|
}
|
|
240
241
|
return A;
|
|
241
|
-
},
|
|
242
|
-
return
|
|
243
|
-
},
|
|
244
|
-
const
|
|
245
|
-
return (
|
|
242
|
+
}, h = u.write(b, y, ...g);
|
|
243
|
+
return x = !1, h;
|
|
244
|
+
}, G = (u, ...g) => {
|
|
245
|
+
const x = T(u, ...g), b = K();
|
|
246
|
+
return (W ? "production" : void 0) !== "production" && n.forEach(
|
|
246
247
|
(y) => y({ type: "write", flushed: b })
|
|
247
|
-
),
|
|
248
|
-
},
|
|
249
|
-
const
|
|
248
|
+
), x;
|
|
249
|
+
}, V = (u, g) => {
|
|
250
|
+
const x = {
|
|
250
251
|
t: new Set(g && [g]),
|
|
251
252
|
l: /* @__PURE__ */ new Set()
|
|
252
253
|
};
|
|
253
|
-
if (t.set(u,
|
|
254
|
-
const
|
|
255
|
-
|
|
256
|
-
}),
|
|
257
|
-
const b = u.onMount((...y) =>
|
|
258
|
-
b && (
|
|
254
|
+
if (t.set(u, x), (W ? "production" : void 0) !== "production" && i.add(u), S(u).d.forEach((b, y) => {
|
|
255
|
+
const h = t.get(y);
|
|
256
|
+
h ? h.t.add(u) : y !== u && V(y, u);
|
|
257
|
+
}), S(u), Ue(u) && u.onMount) {
|
|
258
|
+
const b = u.onMount((...y) => G(u, ...y));
|
|
259
|
+
b && (x.u = b);
|
|
259
260
|
}
|
|
260
|
-
return
|
|
261
|
-
},
|
|
261
|
+
return x;
|
|
262
|
+
}, X = (u) => {
|
|
262
263
|
var g;
|
|
263
|
-
const
|
|
264
|
-
|
|
264
|
+
const x = (g = t.get(u)) == null ? void 0 : g.u;
|
|
265
|
+
x && x(), t.delete(u), (W ? "production" : void 0) !== "production" && i.delete(u);
|
|
265
266
|
const b = r(u);
|
|
266
|
-
b ? (
|
|
267
|
-
if (
|
|
268
|
-
const k = t.get(
|
|
269
|
-
k && (k.t.delete(u), L(
|
|
267
|
+
b ? (xe(b) && kt(b.v), b.d.forEach((y, h) => {
|
|
268
|
+
if (h !== u) {
|
|
269
|
+
const k = t.get(h);
|
|
270
|
+
k && (k.t.delete(u), L(h, k) && X(h));
|
|
270
271
|
}
|
|
271
|
-
})) : (
|
|
272
|
-
},
|
|
272
|
+
})) : (W ? "production" : void 0) !== "production" && console.warn("[Bug] could not find atom state to unmount", u);
|
|
273
|
+
}, q = (u, g, x) => {
|
|
273
274
|
const b = new Set(g.d.keys());
|
|
274
|
-
|
|
275
|
-
if (b.has(
|
|
276
|
-
b.delete(
|
|
275
|
+
x == null || x.forEach((y, h) => {
|
|
276
|
+
if (b.has(h)) {
|
|
277
|
+
b.delete(h);
|
|
277
278
|
return;
|
|
278
279
|
}
|
|
279
|
-
const k = t.get(
|
|
280
|
-
k && (k.t.delete(u), L(
|
|
280
|
+
const k = t.get(h);
|
|
281
|
+
k && (k.t.delete(u), L(h, k) && X(h));
|
|
281
282
|
}), b.forEach((y) => {
|
|
282
|
-
const
|
|
283
|
-
|
|
283
|
+
const h = t.get(y);
|
|
284
|
+
h ? h.t.add(u) : t.has(u) && V(y, u);
|
|
284
285
|
});
|
|
285
|
-
},
|
|
286
|
+
}, K = () => {
|
|
286
287
|
let u;
|
|
287
|
-
for ((
|
|
288
|
+
for ((W ? "production" : void 0) !== "production" && (u = /* @__PURE__ */ new Set()); s.size; ) {
|
|
288
289
|
const g = Array.from(s);
|
|
289
|
-
s.clear(), g.forEach(([
|
|
290
|
-
const y = r(
|
|
290
|
+
s.clear(), g.forEach(([x, b]) => {
|
|
291
|
+
const y = r(x);
|
|
291
292
|
if (y) {
|
|
292
|
-
y.d !== (b == null ? void 0 : b.d) &&
|
|
293
|
-
const
|
|
294
|
-
|
|
293
|
+
y.d !== (b == null ? void 0 : b.d) && q(x, y, b == null ? void 0 : b.d);
|
|
294
|
+
const h = t.get(x);
|
|
295
|
+
h && !// TODO This seems pretty hacky. Hope to fix it.
|
|
295
296
|
// Maybe we could `mountDependencies` in `setAtomState`?
|
|
296
|
-
(b && !
|
|
297
|
+
(b && !xe(b) && (Ne(b, y) || At(b, y))) && (h.l.forEach((k) => k()), (W ? "production" : void 0) !== "production" && u.add(x));
|
|
297
298
|
} else
|
|
298
|
-
(
|
|
299
|
+
(W ? "production" : void 0) !== "production" && console.warn("[Bug] no atom state to flush");
|
|
299
300
|
});
|
|
300
301
|
}
|
|
301
|
-
if ((
|
|
302
|
+
if ((W ? "production" : void 0) !== "production")
|
|
302
303
|
return o.forEach((g) => g("state")), u;
|
|
303
304
|
}, le = (u, g) => {
|
|
304
|
-
const
|
|
305
|
-
return y.add(g), (
|
|
306
|
-
(
|
|
305
|
+
const x = j(u), b = K(), y = x.l;
|
|
306
|
+
return y.add(g), (W ? "production" : void 0) !== "production" && (o.forEach((h) => h("sub")), n.forEach(
|
|
307
|
+
(h) => h({ type: "sub", flushed: b })
|
|
307
308
|
)), () => {
|
|
308
|
-
y.delete(g),
|
|
309
|
+
y.delete(g), F(u), (W ? "production" : void 0) !== "production" && (o.forEach((h) => h("unsub")), n.forEach((h) => h({ type: "unsub" })));
|
|
309
310
|
};
|
|
310
311
|
};
|
|
311
|
-
return (
|
|
312
|
+
return (W ? "production" : void 0) !== "production" ? {
|
|
312
313
|
get: v,
|
|
313
|
-
set:
|
|
314
|
+
set: G,
|
|
314
315
|
sub: le,
|
|
315
316
|
// store dev methods (these are tentative and subject to change without notice)
|
|
316
317
|
dev_subscribe_store: (u, g) => g !== 2 ? (console.warn(
|
|
@@ -324,27 +325,27 @@ const $e = (e) => "init" in e, Fe = (e) => !!e.write, De = /* @__PURE__ */ new W
|
|
|
324
325
|
dev_get_atom_state: (u) => e.get(u),
|
|
325
326
|
dev_get_mounted: (u) => t.get(u),
|
|
326
327
|
dev_restore_atoms: (u) => {
|
|
327
|
-
for (const [
|
|
328
|
-
|
|
329
|
-
const g =
|
|
328
|
+
for (const [x, b] of u)
|
|
329
|
+
Fe(x) && (m(x, b), B(x));
|
|
330
|
+
const g = K();
|
|
330
331
|
n.forEach(
|
|
331
|
-
(
|
|
332
|
+
(x) => x({ type: "restore", flushed: g })
|
|
332
333
|
);
|
|
333
334
|
}
|
|
334
335
|
} : {
|
|
335
336
|
get: v,
|
|
336
|
-
set:
|
|
337
|
+
set: G,
|
|
337
338
|
sub: le
|
|
338
339
|
};
|
|
339
340
|
};
|
|
340
|
-
let
|
|
341
|
-
const
|
|
342
|
-
var
|
|
343
|
-
const
|
|
344
|
-
const t =
|
|
345
|
-
return (e == null ? void 0 : e.store) || t ||
|
|
341
|
+
let We;
|
|
342
|
+
const ao = () => (We || (We = no()), We);
|
|
343
|
+
var ro = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
344
|
+
const io = Es(void 0), qt = (e) => {
|
|
345
|
+
const t = Os(io);
|
|
346
|
+
return (e == null ? void 0 : e.store) || t || ao();
|
|
346
347
|
};
|
|
347
|
-
const
|
|
348
|
+
const lo = (e) => typeof (e == null ? void 0 : e.then) == "function", co = tt.use || ((e) => {
|
|
348
349
|
if (e.status === "pending")
|
|
349
350
|
throw e;
|
|
350
351
|
if (e.status === "fulfilled")
|
|
@@ -358,11 +359,11 @@ const ro = (e) => typeof (e == null ? void 0 : e.then) == "function", io = et.us
|
|
|
358
359
|
}
|
|
359
360
|
), e);
|
|
360
361
|
});
|
|
361
|
-
function
|
|
362
|
-
const s =
|
|
362
|
+
function uo(e, t) {
|
|
363
|
+
const s = qt(t), [[o, n, i], r] = Ls(
|
|
363
364
|
(l) => {
|
|
364
|
-
const
|
|
365
|
-
return Object.is(l[0],
|
|
365
|
+
const m = s.get(e);
|
|
366
|
+
return Object.is(l[0], m) && l[1] === s && l[2] === e ? l : [m, s, e];
|
|
366
367
|
},
|
|
367
368
|
void 0,
|
|
368
369
|
() => [s.get(e), s, e]
|
|
@@ -379,86 +380,86 @@ function lo(e, t) {
|
|
|
379
380
|
r();
|
|
380
381
|
});
|
|
381
382
|
return r(), l;
|
|
382
|
-
}, [s, e, p]),
|
|
383
|
+
}, [s, e, p]), zs(c), lo(c) ? co(c) : c;
|
|
383
384
|
}
|
|
384
|
-
function
|
|
385
|
-
const s =
|
|
386
|
-
return
|
|
385
|
+
function fo(e, t) {
|
|
386
|
+
const s = qt(t);
|
|
387
|
+
return $(
|
|
387
388
|
(...n) => {
|
|
388
|
-
if ((
|
|
389
|
+
if ((ro ? "production" : void 0) !== "production" && !("write" in e))
|
|
389
390
|
throw new Error("not writable atom");
|
|
390
391
|
return s.set(e, ...n);
|
|
391
392
|
},
|
|
392
393
|
[s, e]
|
|
393
394
|
);
|
|
394
395
|
}
|
|
395
|
-
function
|
|
396
|
+
function zr(e, t) {
|
|
396
397
|
return [
|
|
397
|
-
|
|
398
|
+
uo(e, t),
|
|
398
399
|
// We do wrong type assertion here, which results in throwing an error.
|
|
399
|
-
|
|
400
|
+
fo(e, t)
|
|
400
401
|
];
|
|
401
402
|
}
|
|
402
|
-
var
|
|
403
|
-
const
|
|
404
|
-
const
|
|
405
|
-
const o =
|
|
406
|
-
return
|
|
407
|
-
},
|
|
408
|
-
function
|
|
409
|
-
return
|
|
403
|
+
var rt = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
404
|
+
const Kt = Symbol();
|
|
405
|
+
const Ct = (e, t, s) => (t.has(s) ? t : t.set(s, e())).get(s), mo = /* @__PURE__ */ new WeakMap(), po = (e, t, s) => {
|
|
406
|
+
const o = Ct(() => /* @__PURE__ */ new WeakMap(), mo, t);
|
|
407
|
+
return Ct(e, o, s);
|
|
408
|
+
}, go = {}, Bt = (e) => !!e.write, bo = (e) => typeof e == "function";
|
|
409
|
+
function ho(e, t) {
|
|
410
|
+
return po(
|
|
410
411
|
() => {
|
|
411
412
|
const s = /* @__PURE__ */ new WeakMap(), o = (r, c) => {
|
|
412
413
|
let p = s.get(r);
|
|
413
414
|
if (p)
|
|
414
415
|
return p;
|
|
415
|
-
const l = c && s.get(c),
|
|
416
|
-
return r.forEach((
|
|
417
|
-
const
|
|
418
|
-
N[v] =
|
|
419
|
-
const L = l && l.atomList[l.keyList.indexOf(
|
|
416
|
+
const l = c && s.get(c), m = [], N = [];
|
|
417
|
+
return r.forEach((S, v) => {
|
|
418
|
+
const j = t ? t(S) : v;
|
|
419
|
+
N[v] = j;
|
|
420
|
+
const L = l && l.atomList[l.keyList.indexOf(j)];
|
|
420
421
|
if (L) {
|
|
421
|
-
|
|
422
|
+
m[v] = L;
|
|
422
423
|
return;
|
|
423
424
|
}
|
|
424
|
-
const
|
|
425
|
-
const
|
|
426
|
-
if (
|
|
427
|
-
const
|
|
428
|
-
if (
|
|
429
|
-
return
|
|
425
|
+
const F = (T) => {
|
|
426
|
+
const G = T(n), V = T(e), q = o(V, G == null ? void 0 : G.arr).keyList.indexOf(j);
|
|
427
|
+
if (q < 0 || q >= V.length) {
|
|
428
|
+
const K = r[o(r).keyList.indexOf(j)];
|
|
429
|
+
if (K)
|
|
430
|
+
return K;
|
|
430
431
|
throw new Error("splitAtom: index out of bounds for read");
|
|
431
432
|
}
|
|
432
|
-
return
|
|
433
|
-
},
|
|
434
|
-
const
|
|
435
|
-
if (le < 0 || le >=
|
|
433
|
+
return V[q];
|
|
434
|
+
}, B = (T, G, V) => {
|
|
435
|
+
const X = T(n), q = T(e), le = o(q, X == null ? void 0 : X.arr).keyList.indexOf(j);
|
|
436
|
+
if (le < 0 || le >= q.length)
|
|
436
437
|
throw new Error("splitAtom: index out of bounds for write");
|
|
437
|
-
const u =
|
|
438
|
-
|
|
439
|
-
...
|
|
438
|
+
const u = bo(V) ? V(q[le]) : V;
|
|
439
|
+
G(e, [
|
|
440
|
+
...q.slice(0, le),
|
|
440
441
|
u,
|
|
441
|
-
...
|
|
442
|
+
...q.slice(le + 1)
|
|
442
443
|
]);
|
|
443
444
|
};
|
|
444
|
-
|
|
445
|
-
}), l && l.keyList.length === N.length && l.keyList.every((
|
|
446
|
-
}, n =
|
|
445
|
+
m[v] = Bt(e) ? ae(F, B) : ae(F);
|
|
446
|
+
}), l && l.keyList.length === N.length && l.keyList.every((S, v) => S === N[v]) ? p = l : p = { arr: r, atomList: m, keyList: N }, s.set(r, p), p;
|
|
447
|
+
}, n = ae((r) => {
|
|
447
448
|
const c = r(n), p = r(e);
|
|
448
449
|
return o(p, c == null ? void 0 : c.arr);
|
|
449
450
|
});
|
|
450
|
-
(
|
|
451
|
-
const i =
|
|
451
|
+
(rt ? "production" : void 0) !== "production" && (n.debugPrivate = !0), n.init = void 0;
|
|
452
|
+
const i = Bt(e) ? ae(
|
|
452
453
|
(r) => r(n).atomList,
|
|
453
454
|
(r, c, p) => {
|
|
454
455
|
switch (p.type) {
|
|
455
456
|
case "remove": {
|
|
456
457
|
const l = r(i).indexOf(p.atom);
|
|
457
458
|
if (l >= 0) {
|
|
458
|
-
const
|
|
459
|
+
const m = r(e);
|
|
459
460
|
c(e, [
|
|
460
|
-
...
|
|
461
|
-
...
|
|
461
|
+
...m.slice(0, l),
|
|
462
|
+
...m.slice(l + 1)
|
|
462
463
|
]);
|
|
463
464
|
}
|
|
464
465
|
break;
|
|
@@ -466,28 +467,28 @@ function go(e, t) {
|
|
|
466
467
|
case "insert": {
|
|
467
468
|
const l = p.before ? r(i).indexOf(p.before) : r(i).length;
|
|
468
469
|
if (l >= 0) {
|
|
469
|
-
const
|
|
470
|
+
const m = r(e);
|
|
470
471
|
c(e, [
|
|
471
|
-
...
|
|
472
|
+
...m.slice(0, l),
|
|
472
473
|
p.value,
|
|
473
|
-
...
|
|
474
|
+
...m.slice(l)
|
|
474
475
|
]);
|
|
475
476
|
}
|
|
476
477
|
break;
|
|
477
478
|
}
|
|
478
479
|
case "move": {
|
|
479
|
-
const l = r(i).indexOf(p.atom),
|
|
480
|
-
if (l >= 0 &&
|
|
480
|
+
const l = r(i).indexOf(p.atom), m = p.before ? r(i).indexOf(p.before) : r(i).length;
|
|
481
|
+
if (l >= 0 && m >= 0) {
|
|
481
482
|
const N = r(e);
|
|
482
|
-
l <
|
|
483
|
+
l < m ? c(e, [
|
|
483
484
|
...N.slice(0, l),
|
|
484
|
-
...N.slice(l + 1,
|
|
485
|
+
...N.slice(l + 1, m),
|
|
485
486
|
N[l],
|
|
486
|
-
...N.slice(
|
|
487
|
+
...N.slice(m)
|
|
487
488
|
]) : c(e, [
|
|
488
|
-
...N.slice(0,
|
|
489
|
+
...N.slice(0, m),
|
|
489
490
|
N[l],
|
|
490
|
-
...N.slice(
|
|
491
|
+
...N.slice(m, l),
|
|
491
492
|
...N.slice(l + 1)
|
|
492
493
|
]);
|
|
493
494
|
}
|
|
@@ -495,23 +496,23 @@ function go(e, t) {
|
|
|
495
496
|
}
|
|
496
497
|
}
|
|
497
498
|
}
|
|
498
|
-
) :
|
|
499
|
+
) : ae((r) => r(n).atomList);
|
|
499
500
|
return i;
|
|
500
501
|
},
|
|
501
502
|
e,
|
|
502
|
-
t ||
|
|
503
|
+
t || go
|
|
503
504
|
);
|
|
504
505
|
}
|
|
505
|
-
function
|
|
506
|
-
const t = Symbol(), s =
|
|
507
|
-
(
|
|
508
|
-
const o =
|
|
506
|
+
function Vr(e) {
|
|
507
|
+
const t = Symbol(), s = ae(t);
|
|
508
|
+
(rt ? "production" : void 0) !== "production" && (s.debugPrivate = !0);
|
|
509
|
+
const o = ae(
|
|
509
510
|
(n, i) => {
|
|
510
511
|
const r = n(s);
|
|
511
512
|
return r !== t ? r : e(n, i);
|
|
512
513
|
},
|
|
513
514
|
(n, i, r) => {
|
|
514
|
-
if (r ===
|
|
515
|
+
if (r === Kt)
|
|
515
516
|
i(s, t);
|
|
516
517
|
else if (typeof r == "function") {
|
|
517
518
|
const c = n(o);
|
|
@@ -522,24 +523,24 @@ function Or(e) {
|
|
|
522
523
|
);
|
|
523
524
|
return o;
|
|
524
525
|
}
|
|
525
|
-
const
|
|
526
|
-
function
|
|
526
|
+
const xo = (e) => typeof (e == null ? void 0 : e.then) == "function";
|
|
527
|
+
function vo(e) {
|
|
527
528
|
let t, s;
|
|
528
529
|
const o = {
|
|
529
530
|
getItem: (n, i) => {
|
|
530
531
|
var r, c;
|
|
531
|
-
const p = (
|
|
532
|
-
if (
|
|
532
|
+
const p = (m) => {
|
|
533
|
+
if (m = m || "", t !== m) {
|
|
533
534
|
try {
|
|
534
|
-
s = JSON.parse(
|
|
535
|
+
s = JSON.parse(m);
|
|
535
536
|
} catch {
|
|
536
537
|
return i;
|
|
537
538
|
}
|
|
538
|
-
t =
|
|
539
|
+
t = m;
|
|
539
540
|
}
|
|
540
541
|
return s;
|
|
541
542
|
}, l = (c = (r = e()) == null ? void 0 : r.getItem(n)) != null ? c : null;
|
|
542
|
-
return
|
|
543
|
+
return xo(l) ? l.then(p) : p(l);
|
|
543
544
|
},
|
|
544
545
|
setItem: (n, i) => {
|
|
545
546
|
var r;
|
|
@@ -570,59 +571,56 @@ function xo(e) {
|
|
|
570
571
|
};
|
|
571
572
|
}), o;
|
|
572
573
|
}
|
|
573
|
-
const
|
|
574
|
+
const yo = vo(
|
|
574
575
|
() => typeof window < "u" ? window.localStorage : void 0
|
|
575
576
|
);
|
|
576
|
-
function
|
|
577
|
-
const n = o == null ? void 0 : o.unstable_getOnInit, i =
|
|
577
|
+
function Re(e, t, s = yo, o) {
|
|
578
|
+
const n = o == null ? void 0 : o.unstable_getOnInit, i = ae(
|
|
578
579
|
n ? s.getItem(e, t) : t
|
|
579
580
|
);
|
|
580
|
-
return (
|
|
581
|
+
return (rt ? "production" : void 0) !== "production" && (i.debugPrivate = !0), i.onMount = (c) => {
|
|
581
582
|
n || c(s.getItem(e, t));
|
|
582
583
|
let p;
|
|
583
584
|
return s.subscribe && (p = s.subscribe(e, c, t)), p;
|
|
584
|
-
},
|
|
585
|
+
}, ae(
|
|
585
586
|
(c) => c(i),
|
|
586
587
|
(c, p, l) => {
|
|
587
|
-
const
|
|
588
|
-
return
|
|
588
|
+
const m = typeof l == "function" ? l(c(i)) : l;
|
|
589
|
+
return m === Kt ? (p(i, t), s.removeItem(e)) : m instanceof Promise ? m.then((N) => (p(i, N), s.setItem(e, N))) : (p(i, m), s.setItem(e, m));
|
|
589
590
|
}
|
|
590
591
|
);
|
|
591
592
|
}
|
|
592
|
-
const
|
|
593
|
-
|
|
594
|
-
const
|
|
595
|
-
|
|
596
|
-
const
|
|
597
|
-
const t = e.replace(
|
|
593
|
+
const Jt = w(null);
|
|
594
|
+
Jt.debugLabel = "chaiBuilderPropsAtom";
|
|
595
|
+
const wo = w({});
|
|
596
|
+
wo.debugLabel = "chaiExternalDataAtom";
|
|
597
|
+
const $r = () => !1, No = (e) => {
|
|
598
|
+
const t = e.replace(fe, "").split(",");
|
|
598
599
|
return { baseClasses: t[0], classes: t[1] };
|
|
599
|
-
},
|
|
600
|
+
}, _t = Oe((e, t) => {
|
|
600
601
|
if (!e)
|
|
601
602
|
return !0;
|
|
602
|
-
const s =
|
|
603
|
+
const s = Le(e);
|
|
603
604
|
return s && pe(s, "canAcceptBlock") ? s.canAcceptBlock(t) : !1;
|
|
604
|
-
},
|
|
605
|
-
const s =
|
|
605
|
+
}), ko = Oe((e, t) => {
|
|
606
|
+
const s = Le(t);
|
|
606
607
|
return s && pe(s, "canBeNested") ? s.canBeNested(e) : !0;
|
|
607
|
-
},
|
|
608
|
-
const t =
|
|
608
|
+
}), Fr = Oe((e) => {
|
|
609
|
+
const t = Le(e);
|
|
609
610
|
return t && pe(t, "canDuplicate") ? t.canDuplicate() : !0;
|
|
610
|
-
},
|
|
611
|
-
const t =
|
|
611
|
+
}), Ur = Oe((e) => {
|
|
612
|
+
const t = Le(e);
|
|
612
613
|
return t && pe(t, "canDelete") ? t.canDelete() : !0;
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
};
|
|
617
|
-
function qt(e, t, s) {
|
|
618
|
-
const o = D(e, (i) => i._parent === t), n = [];
|
|
614
|
+
});
|
|
615
|
+
function Yt(e, t, s) {
|
|
616
|
+
const o = E(e, (i) => i._parent === t), n = [];
|
|
619
617
|
for (let i = 0; i < o.length; i++) {
|
|
620
|
-
const r =
|
|
618
|
+
const r = Xt(o[i]);
|
|
621
619
|
if (Object.keys(r).length > 0 && Object.keys(r).forEach((c) => {
|
|
622
620
|
o[i][c] = `slot:${de()}`;
|
|
623
|
-
}),
|
|
621
|
+
}), E(e, { _parent: o[i]._id }).length > 0) {
|
|
624
622
|
const c = de();
|
|
625
|
-
n.push({ ...o[i], oldId: o[i]._id, _id: c, _parent: s }), n.push(
|
|
623
|
+
n.push({ ...o[i], oldId: o[i]._id, _id: c, _parent: s }), n.push(re(Yt(e, o[i]._id, c)));
|
|
626
624
|
} else
|
|
627
625
|
n.push({
|
|
628
626
|
...o[i],
|
|
@@ -631,9 +629,9 @@ function qt(e, t, s) {
|
|
|
631
629
|
_parent: s
|
|
632
630
|
});
|
|
633
631
|
}
|
|
634
|
-
return
|
|
632
|
+
return re(n);
|
|
635
633
|
}
|
|
636
|
-
function
|
|
634
|
+
function Qt(e) {
|
|
637
635
|
const t = {};
|
|
638
636
|
e.forEach((o) => {
|
|
639
637
|
t[o._id] = { ...o, children: [] };
|
|
@@ -647,90 +645,90 @@ function Kt(e) {
|
|
|
647
645
|
s.push(t[o._id]);
|
|
648
646
|
}), s;
|
|
649
647
|
}
|
|
650
|
-
const
|
|
648
|
+
const Xt = (e) => {
|
|
651
649
|
const t = {};
|
|
652
650
|
return Object.keys(e).forEach((s) => {
|
|
653
|
-
|
|
651
|
+
zt(e[s]) && e[s].startsWith("slot") && (t[s] = e[s].replace("slot:", ""));
|
|
654
652
|
}), t;
|
|
655
|
-
},
|
|
656
|
-
let o =
|
|
653
|
+
}, So = (e, t, s = null) => {
|
|
654
|
+
let o = oe(e, { _id: t });
|
|
657
655
|
o = { ...o, oldId: o._id, _id: de() }, s && (o = { ...o, _parent: s });
|
|
658
656
|
const n = [o];
|
|
659
|
-
|
|
660
|
-
const i =
|
|
661
|
-
return
|
|
662
|
-
const c = r, p =
|
|
657
|
+
E(e, { _parent: t }).length > 0 && n.push(re(Yt(e, t, o._id)));
|
|
658
|
+
const i = re(n);
|
|
659
|
+
return I(i, (r) => {
|
|
660
|
+
const c = r, p = Xt(c);
|
|
663
661
|
return Object.keys(p).length > 0 && Object.keys(p).forEach((l) => {
|
|
664
|
-
const
|
|
665
|
-
c[l] = `slot:${
|
|
666
|
-
}),
|
|
662
|
+
const m = oe(i, { oldId: p[l].replace("slot:", "") });
|
|
663
|
+
c[l] = `slot:${m._id}`;
|
|
664
|
+
}), st(c, ["global", "oldId"]);
|
|
667
665
|
});
|
|
668
666
|
};
|
|
669
|
-
const
|
|
670
|
-
|
|
671
|
-
const
|
|
672
|
-
const t = e(
|
|
673
|
-
return
|
|
667
|
+
const ie = w([]);
|
|
668
|
+
ie.debugLabel = "presentBlocksAtom";
|
|
669
|
+
const jo = w((e) => {
|
|
670
|
+
const t = e(ie);
|
|
671
|
+
return Qt([...t]);
|
|
674
672
|
});
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
const
|
|
678
|
-
|
|
679
|
-
const
|
|
680
|
-
|
|
681
|
-
const
|
|
682
|
-
|
|
683
|
-
const
|
|
684
|
-
|
|
685
|
-
const
|
|
686
|
-
const t = e(
|
|
687
|
-
return
|
|
673
|
+
jo.debugLabel = "treeDSBlocks";
|
|
674
|
+
ie.debugLabel = "presentBlocksAtom";
|
|
675
|
+
const it = ho(ie);
|
|
676
|
+
it.debugLabel = "pageBlocksAtomsAtom";
|
|
677
|
+
const Ao = w("");
|
|
678
|
+
Ao.debugLabel = "builderActivePageAtom";
|
|
679
|
+
const Co = w(-1);
|
|
680
|
+
Co.debugLabel = "destinationDropIndexAtom";
|
|
681
|
+
const Zt = w([]);
|
|
682
|
+
Zt.debugLabel = "buildingBlocksAtom";
|
|
683
|
+
const Bo = w((e) => {
|
|
684
|
+
const t = e(Zt);
|
|
685
|
+
return E(t, (s) => pe(s, "blockId"));
|
|
688
686
|
});
|
|
689
|
-
|
|
690
|
-
const
|
|
691
|
-
|
|
692
|
-
const
|
|
693
|
-
const t = e(
|
|
694
|
-
return
|
|
695
|
-
|
|
687
|
+
Bo.debugLabel = "globalBlocksAtom";
|
|
688
|
+
const lt = w([]);
|
|
689
|
+
lt.debugLabel = "selectedBlockIdsAtom";
|
|
690
|
+
const ct = w((e) => {
|
|
691
|
+
const t = e(ie), s = e(lt);
|
|
692
|
+
return I(
|
|
693
|
+
E(t, ({ _id: o }) => Y(s, o)),
|
|
696
694
|
(o) => ({ ...o })
|
|
697
695
|
);
|
|
698
696
|
});
|
|
699
|
-
|
|
700
|
-
const
|
|
701
|
-
const t = e(
|
|
697
|
+
ct.debugLabel = "selectedBlocksAtom";
|
|
698
|
+
const dt = w((e) => {
|
|
699
|
+
const t = e(ct);
|
|
702
700
|
return t.length === 0 ? null : t.length === 1 ? t[0] : {
|
|
703
701
|
type: "Multiple",
|
|
704
|
-
id:
|
|
702
|
+
id: I(t, "id")
|
|
705
703
|
};
|
|
706
704
|
});
|
|
707
|
-
|
|
708
|
-
const
|
|
709
|
-
const t = e(
|
|
710
|
-
return
|
|
705
|
+
dt.debugLabel = "selectedBlockAtom";
|
|
706
|
+
const _o = (e) => J(e, "parent", null), Ro = w((e) => {
|
|
707
|
+
const t = e(ct), s = I(t, _o);
|
|
708
|
+
return E(e(ie), (o) => Y(s, o._id));
|
|
711
709
|
});
|
|
712
|
-
|
|
713
|
-
const
|
|
714
|
-
|
|
715
|
-
const
|
|
716
|
-
|
|
717
|
-
const
|
|
718
|
-
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
const
|
|
722
|
-
flexChild:
|
|
723
|
-
gridChild:
|
|
724
|
-
}),
|
|
725
|
-
const
|
|
726
|
-
const [e, t] =
|
|
710
|
+
Ro.debugLabel = "selectedBlocksParentsAtom";
|
|
711
|
+
const es = w(() => !1);
|
|
712
|
+
es.debugLabel = "selectedBlockFlexChildAtom";
|
|
713
|
+
const ts = w(() => !1);
|
|
714
|
+
ts.debugLabel = "selectedBlockGridChildAtom";
|
|
715
|
+
const ut = w("");
|
|
716
|
+
ut.debugLabel = "styleStateAtom";
|
|
717
|
+
const ss = Re("styleBreakpoint", "xs");
|
|
718
|
+
ss.debugLabel = "styleBreakpointAtom";
|
|
719
|
+
const Wr = () => ({
|
|
720
|
+
flexChild: te(es),
|
|
721
|
+
gridChild: te(ts)
|
|
722
|
+
}), Gr = () => te(dt);
|
|
723
|
+
const $e = () => {
|
|
724
|
+
const [e, t] = O(lt), s = $(
|
|
727
725
|
(o) => {
|
|
728
|
-
t((n) => Y(n, o) ?
|
|
726
|
+
t((n) => Y(n, o) ? Vt(n, o) : [...n, o]);
|
|
729
727
|
},
|
|
730
728
|
[t]
|
|
731
729
|
);
|
|
732
730
|
return [e, t, s];
|
|
733
|
-
},
|
|
731
|
+
}, Rt = (e) => {
|
|
734
732
|
switch (e.type) {
|
|
735
733
|
case "singular":
|
|
736
734
|
return e.uiSchema;
|
|
@@ -741,7 +739,7 @@ const Ve = () => {
|
|
|
741
739
|
if (Y(["slot", "styles"], r.type))
|
|
742
740
|
return;
|
|
743
741
|
const c = i;
|
|
744
|
-
s[c] =
|
|
742
|
+
s[c] = Rt(r);
|
|
745
743
|
}), s;
|
|
746
744
|
case "list":
|
|
747
745
|
const { itemProperties: o } = e, n = {
|
|
@@ -752,12 +750,12 @@ const Ve = () => {
|
|
|
752
750
|
if (Y(["slot", "styles"], r.type))
|
|
753
751
|
return;
|
|
754
752
|
const c = i;
|
|
755
|
-
n.items[c] =
|
|
753
|
+
n.items[c] = Rt(r);
|
|
756
754
|
}), n;
|
|
757
755
|
default:
|
|
758
756
|
return {};
|
|
759
757
|
}
|
|
760
|
-
},
|
|
758
|
+
}, Pt = (e) => {
|
|
761
759
|
switch (e.type) {
|
|
762
760
|
case "singular":
|
|
763
761
|
return e.schema;
|
|
@@ -772,7 +770,7 @@ const Ve = () => {
|
|
|
772
770
|
if (Y(["slot", "styles"], p.type))
|
|
773
771
|
return;
|
|
774
772
|
const l = c;
|
|
775
|
-
o.properties[l] =
|
|
773
|
+
o.properties[l] = Pt(p);
|
|
776
774
|
}), o;
|
|
777
775
|
case "list":
|
|
778
776
|
const { itemProperties: n, title: i } = e, r = {
|
|
@@ -788,46 +786,46 @@ const Ve = () => {
|
|
|
788
786
|
if (Y(["slot", "styles"], p.type))
|
|
789
787
|
return;
|
|
790
788
|
const l = c;
|
|
791
|
-
r.items.properties[l] =
|
|
789
|
+
r.items.properties[l] = Pt(p), Se(r.items, "title", J(p, "itemTitle", `${i} item`));
|
|
792
790
|
}), r;
|
|
793
791
|
default:
|
|
794
792
|
return {};
|
|
795
793
|
}
|
|
796
|
-
},
|
|
794
|
+
}, os = (e) => {
|
|
797
795
|
if (!e)
|
|
798
796
|
return {};
|
|
799
797
|
const t = {};
|
|
800
798
|
return Object.keys(e).forEach((s) => {
|
|
801
|
-
t[s] =
|
|
799
|
+
t[s] = To(e[s]);
|
|
802
800
|
}), t;
|
|
803
|
-
},
|
|
804
|
-
if (
|
|
801
|
+
}, Po = (e) => {
|
|
802
|
+
if (Be(e.default))
|
|
805
803
|
return [];
|
|
806
804
|
const { itemProperties: t } = e;
|
|
807
|
-
return
|
|
805
|
+
return I(e.default, (s) => {
|
|
808
806
|
const o = { ...s };
|
|
809
|
-
return
|
|
810
|
-
pe(t, i) &&
|
|
807
|
+
return $t(s, (n, i) => {
|
|
808
|
+
pe(t, i) && J(t[i], "i18n", !1) && (o[i] = Ut);
|
|
811
809
|
}), o;
|
|
812
810
|
});
|
|
813
|
-
},
|
|
811
|
+
}, To = (e) => {
|
|
814
812
|
switch (e.type) {
|
|
815
813
|
case "styles":
|
|
816
814
|
return e.default;
|
|
817
815
|
case "slot":
|
|
818
|
-
return `${
|
|
816
|
+
return `${Je}${de()}`;
|
|
819
817
|
case "singular":
|
|
820
818
|
const { i18n: t, schema: s } = e;
|
|
821
|
-
return t ?
|
|
819
|
+
return t ? Ut : J(s, "default", "");
|
|
822
820
|
case "model":
|
|
823
|
-
return
|
|
821
|
+
return os(e.properties);
|
|
824
822
|
case "list":
|
|
825
|
-
return
|
|
823
|
+
return Po(e);
|
|
826
824
|
default:
|
|
827
825
|
return "";
|
|
828
826
|
}
|
|
829
827
|
};
|
|
830
|
-
var
|
|
828
|
+
var ft = { exports: {} }, Hr = ft.exports;
|
|
831
829
|
(function(e) {
|
|
832
830
|
(function() {
|
|
833
831
|
"use strict";
|
|
@@ -839,8 +837,8 @@ var ut = { exports: {} }, Wr = ut.exports;
|
|
|
839
837
|
}
|
|
840
838
|
let s = function() {
|
|
841
839
|
let o = [], n = -1, i = 0, r = !1, c;
|
|
842
|
-
function p(l,
|
|
843
|
-
return !l || typeof l[
|
|
840
|
+
function p(l, m) {
|
|
841
|
+
return !l || typeof l[m] != "function" ? this : (r = !0, l[m](), r = !1, this);
|
|
844
842
|
}
|
|
845
843
|
return {
|
|
846
844
|
/**
|
|
@@ -867,8 +865,8 @@ var ut = { exports: {} }, Wr = ut.exports;
|
|
|
867
865
|
let l = o[n];
|
|
868
866
|
if (!l)
|
|
869
867
|
return this;
|
|
870
|
-
const
|
|
871
|
-
for (; l.groupId ===
|
|
868
|
+
const m = l.groupId;
|
|
869
|
+
for (; l.groupId === m && (p(l, "undo"), n -= 1, l = o[n], !(!l || !l.groupId)); )
|
|
872
870
|
;
|
|
873
871
|
return c && c(), this;
|
|
874
872
|
},
|
|
@@ -879,8 +877,8 @@ var ut = { exports: {} }, Wr = ut.exports;
|
|
|
879
877
|
let l = o[n + 1];
|
|
880
878
|
if (!l)
|
|
881
879
|
return this;
|
|
882
|
-
const
|
|
883
|
-
for (; l.groupId ===
|
|
880
|
+
const m = l.groupId;
|
|
881
|
+
for (; l.groupId === m && (p(l, "redo"), n += 1, l = o[n + 1], !(!l || !l.groupId)); )
|
|
884
882
|
;
|
|
885
883
|
return c && c(), this;
|
|
886
884
|
},
|
|
@@ -911,7 +909,7 @@ var ut = { exports: {} }, Wr = ut.exports;
|
|
|
911
909
|
* @returns {array}
|
|
912
910
|
*/
|
|
913
911
|
getCommands: function(l) {
|
|
914
|
-
return l ? o.filter((
|
|
912
|
+
return l ? o.filter((m) => m.groupId === l) : o;
|
|
915
913
|
},
|
|
916
914
|
/**
|
|
917
915
|
* Returns the index of the actions list.
|
|
@@ -931,94 +929,93 @@ var ut = { exports: {} }, Wr = ut.exports;
|
|
|
931
929
|
};
|
|
932
930
|
e.exports ? e.exports = s : window.UndoManager = s;
|
|
933
931
|
})();
|
|
934
|
-
})(
|
|
935
|
-
var
|
|
936
|
-
const
|
|
937
|
-
const [e, t] =
|
|
932
|
+
})(ft);
|
|
933
|
+
var Io = ft.exports;
|
|
934
|
+
const Mo = /* @__PURE__ */ Ws(Io), Do = w(Ye), Eo = w(null), ns = () => {
|
|
935
|
+
const [e, t] = O(Do);
|
|
938
936
|
return [
|
|
939
|
-
|
|
937
|
+
$s(e) ? { ...Ye, ...e } : Ye,
|
|
940
938
|
t
|
|
941
939
|
];
|
|
942
|
-
},
|
|
943
|
-
function
|
|
944
|
-
return
|
|
940
|
+
}, qr = () => O(Eo), Oo = w(null), Lo = () => ({ currentPage: te(Oo) });
|
|
941
|
+
function zo(e) {
|
|
942
|
+
return Qt(e);
|
|
945
943
|
}
|
|
946
|
-
const mt = (e, t) =>
|
|
944
|
+
const mt = (e, t) => re(
|
|
947
945
|
e.map((s) => {
|
|
948
946
|
if (s = t ? { ...s, parent: t } : { ...s }, s.children) {
|
|
949
947
|
const o = [...s.children];
|
|
950
|
-
return delete s.children,
|
|
948
|
+
return delete s.children, re([s, ...mt(o, s._id)]);
|
|
951
949
|
}
|
|
952
950
|
return s;
|
|
953
951
|
})
|
|
954
952
|
);
|
|
955
|
-
function
|
|
953
|
+
function pt(e, t = !1) {
|
|
956
954
|
for (let s = 0; s < e.length; s++) {
|
|
957
955
|
const o = e[s];
|
|
958
956
|
o.global && !t ? e[s] = {
|
|
959
957
|
type: "GlobalBlock",
|
|
960
958
|
blockId: o.blockId,
|
|
961
|
-
_parent:
|
|
959
|
+
_parent: J(o, "parent", null),
|
|
962
960
|
_id: o._id
|
|
963
|
-
} : o.children && o.children.length &&
|
|
961
|
+
} : o.children && o.children.length && pt(o.children);
|
|
964
962
|
}
|
|
965
963
|
}
|
|
966
|
-
function
|
|
967
|
-
let t = [], s =
|
|
968
|
-
return s.length > 0 && (s =
|
|
969
|
-
t = [...t, ...
|
|
964
|
+
function as(e) {
|
|
965
|
+
let t = [], s = E(e, { type: "GlobalBlock" });
|
|
966
|
+
return s.length > 0 && (s = I(s, rs), ce(s, (o) => {
|
|
967
|
+
t = [...t, ...Vo(o)];
|
|
970
968
|
})), t;
|
|
971
969
|
}
|
|
972
|
-
function
|
|
970
|
+
function Vo(e) {
|
|
973
971
|
let t = [];
|
|
974
|
-
const s =
|
|
975
|
-
|
|
976
|
-
const o = [flatToNestedInstance.convert(
|
|
977
|
-
|
|
972
|
+
const s = J(ee(e), "parent", null);
|
|
973
|
+
Se(ee(e), "parent", null);
|
|
974
|
+
const o = [flatToNestedInstance.convert(is(e))];
|
|
975
|
+
pt(o, !0);
|
|
978
976
|
let n = mt(o, e[0]._id);
|
|
979
|
-
return n =
|
|
977
|
+
return n = Se(n, "0.parent", s), t = [...t, n, ...as(n)], t;
|
|
980
978
|
}
|
|
981
|
-
function
|
|
982
|
-
const t =
|
|
979
|
+
function rs(e) {
|
|
980
|
+
const t = oe(Xe, { _id: e._id });
|
|
983
981
|
if (!t)
|
|
984
982
|
return [];
|
|
985
|
-
const s = [t], o =
|
|
986
|
-
return o.length ?
|
|
983
|
+
const s = [t], o = E(Xe, { _parent: e._id });
|
|
984
|
+
return o.length ? re([...s, ...re(I(o, rs))]) : re(s);
|
|
987
985
|
}
|
|
988
|
-
const
|
|
989
|
-
let
|
|
990
|
-
function
|
|
991
|
-
|
|
992
|
-
const t =
|
|
993
|
-
|
|
994
|
-
const s = mt(t, null), o =
|
|
995
|
-
return ce(o, (i) =>
|
|
986
|
+
const is = (e) => JSON.parse(JSON.stringify(e));
|
|
987
|
+
let Xe = [];
|
|
988
|
+
function $o(e) {
|
|
989
|
+
Xe = e;
|
|
990
|
+
const t = zo(is(e));
|
|
991
|
+
pt(t);
|
|
992
|
+
const s = mt(t, null), o = as(s), n = {};
|
|
993
|
+
return ce(o, (i) => Se(n, ee(i).blockId, i)), [s, n];
|
|
996
994
|
}
|
|
997
|
-
const
|
|
998
|
-
const [e] =
|
|
999
|
-
return
|
|
1000
|
-
const o =
|
|
995
|
+
const Fo = () => {
|
|
996
|
+
const [e] = ns(), { currentPage: t } = Lo(), [s] = we();
|
|
997
|
+
return $(() => {
|
|
998
|
+
const o = I(
|
|
1001
999
|
s,
|
|
1002
|
-
(i) =>
|
|
1003
|
-
), [n = []] =
|
|
1000
|
+
(i) => st(i, ["expanded", "order", "title", "siblings", "tempClasses"])
|
|
1001
|
+
), [n = []] = $o(o);
|
|
1004
1002
|
return {
|
|
1005
1003
|
currentPage: t,
|
|
1006
1004
|
blocks: n
|
|
1007
1005
|
};
|
|
1008
1006
|
}, [e, t, s]);
|
|
1009
|
-
},
|
|
1010
|
-
const s =
|
|
1011
|
-
return
|
|
1012
|
-
},
|
|
1013
|
-
|
|
1014
|
-
const
|
|
1015
|
-
|
|
1016
|
-
const
|
|
1017
|
-
const [e, t] =
|
|
1018
|
-
}), o =
|
|
1019
|
-
}), n =
|
|
1020
|
-
|
|
1021
|
-
return { savePage: Us(
|
|
1007
|
+
}, ve = (e, t = void 0) => {
|
|
1008
|
+
const s = te(Jt);
|
|
1009
|
+
return J(s, e, t);
|
|
1010
|
+
}, ls = w([]);
|
|
1011
|
+
ls.debugLabel = "dataProvidersAtom";
|
|
1012
|
+
const Uo = () => O(ls), gt = w("SAVED");
|
|
1013
|
+
gt.debugLabel = "builderSaveStateAtom";
|
|
1014
|
+
const Kr = () => {
|
|
1015
|
+
const [e, t] = O(gt), s = ve("onSavePage", async (l) => {
|
|
1016
|
+
}), o = ve("onSave", async (l) => {
|
|
1017
|
+
}), n = ve("onSaveStateChange", qe), i = Fo(), [r] = Uo(), [c] = ns();
|
|
1018
|
+
return { savePage: Gs(
|
|
1022
1019
|
async () => {
|
|
1023
1020
|
t("SAVING"), n("SAVING");
|
|
1024
1021
|
const l = i();
|
|
@@ -1027,38 +1024,40 @@ const Hr = () => {
|
|
|
1027
1024
|
}, 100), !0;
|
|
1028
1025
|
},
|
|
1029
1026
|
[i, t, c, o, n],
|
|
1030
|
-
|
|
1027
|
+
3e3
|
|
1031
1028
|
// save only every 5 seconds
|
|
1032
|
-
),
|
|
1033
|
-
},
|
|
1034
|
-
|
|
1035
|
-
const
|
|
1036
|
-
const [, e] =
|
|
1037
|
-
return Ae(() => (
|
|
1038
|
-
|
|
1029
|
+
), saveState: e, setSaveState: t };
|
|
1030
|
+
}, ne = new Mo();
|
|
1031
|
+
ne.setLimit(50);
|
|
1032
|
+
const cs = () => {
|
|
1033
|
+
const [, e] = O(gt), t = ve("onSaveStateChange", qe);
|
|
1034
|
+
return Ae(() => (ne.setCallback(() => {
|
|
1035
|
+
e("UNSAVED"), t("UNSAVED");
|
|
1036
|
+
}), () => {
|
|
1037
|
+
ne.setCallback(qe);
|
|
1039
1038
|
}), []), {
|
|
1040
|
-
add:
|
|
1041
|
-
undo:
|
|
1042
|
-
redo:
|
|
1043
|
-
hasRedo:
|
|
1044
|
-
hasUndo:
|
|
1045
|
-
clear:
|
|
1039
|
+
add: ne.add,
|
|
1040
|
+
undo: ne.undo,
|
|
1041
|
+
redo: ne.redo,
|
|
1042
|
+
hasRedo: ne.hasRedo,
|
|
1043
|
+
hasUndo: ne.hasUndo,
|
|
1044
|
+
clear: ne.clear
|
|
1046
1045
|
};
|
|
1047
|
-
},
|
|
1048
|
-
const s = [], o =
|
|
1049
|
-
return
|
|
1050
|
-
},
|
|
1051
|
-
const [e] =
|
|
1052
|
-
return
|
|
1046
|
+
}, bt = (e, t) => {
|
|
1047
|
+
const s = [], o = E(e, (n) => Y(t, n._id) || Y(t, n._parent) ? (s.push(n._id), !1) : !0);
|
|
1048
|
+
return Be(s) ? o : bt(o, s);
|
|
1049
|
+
}, Jr = () => {
|
|
1050
|
+
const [e] = we(), [t, s] = $e(), { setNewBlocks: o } = he();
|
|
1051
|
+
return $(
|
|
1053
1052
|
(n) => {
|
|
1054
1053
|
var r;
|
|
1055
|
-
const i = ((r =
|
|
1056
|
-
o(
|
|
1054
|
+
const i = ((r = oe(e, { _id: n[0] })) == null ? void 0 : r._parent) || null;
|
|
1055
|
+
o(bt(e, n)), setTimeout(() => s(i ? [i] : []), 200);
|
|
1057
1056
|
},
|
|
1058
1057
|
[e, s, t]
|
|
1059
1058
|
);
|
|
1060
1059
|
};
|
|
1061
|
-
function
|
|
1060
|
+
function Wo(e, t, s, o) {
|
|
1062
1061
|
let n = e.filter((c) => !c._parent);
|
|
1063
1062
|
s && (n = e.filter((c) => c._parent === s));
|
|
1064
1063
|
const i = o !== void 0 ? o : n.length;
|
|
@@ -1073,19 +1072,36 @@ function Fo(e, t, s, o) {
|
|
|
1073
1072
|
}
|
|
1074
1073
|
return !s && o !== void 0 && o >= n.length && (r = e.length), [...e.slice(0, r), ...t, ...e.slice(r)];
|
|
1075
1074
|
}
|
|
1076
|
-
|
|
1075
|
+
function Tt(e) {
|
|
1076
|
+
const t = [], s = /* @__PURE__ */ new Map();
|
|
1077
|
+
e.forEach((n) => {
|
|
1078
|
+
s.set(n._id, n);
|
|
1079
|
+
});
|
|
1080
|
+
function o(n) {
|
|
1081
|
+
const i = s.get(n);
|
|
1082
|
+
t.includes(i) || (t.push(i), e.forEach((r) => {
|
|
1083
|
+
r._parent === n && o(r._id);
|
|
1084
|
+
}));
|
|
1085
|
+
}
|
|
1086
|
+
return e.forEach((n) => {
|
|
1087
|
+
n._parent || o(n._id);
|
|
1088
|
+
}), t;
|
|
1089
|
+
}
|
|
1090
|
+
const Go = (e, t, s, o) => {
|
|
1091
|
+
if (Be(t))
|
|
1092
|
+
return Tt(e);
|
|
1077
1093
|
function n(c, p) {
|
|
1078
1094
|
const l = c.filter((N) => N._parent === p);
|
|
1079
|
-
let
|
|
1095
|
+
let m = [...l];
|
|
1080
1096
|
return l.forEach((N) => {
|
|
1081
|
-
|
|
1082
|
-
}),
|
|
1097
|
+
m = m.concat(n(c, N._id));
|
|
1098
|
+
}), m;
|
|
1083
1099
|
}
|
|
1084
1100
|
const i = t.reduce((c, p) => {
|
|
1085
|
-
const l = e.find((
|
|
1101
|
+
const l = e.find((m) => m._id === p);
|
|
1086
1102
|
if (l) {
|
|
1087
|
-
const
|
|
1088
|
-
c.push(l, ...
|
|
1103
|
+
const m = n(e, p);
|
|
1104
|
+
c.push(l, ...m);
|
|
1089
1105
|
}
|
|
1090
1106
|
return c;
|
|
1091
1107
|
}, []);
|
|
@@ -1093,88 +1109,101 @@ const Uo = (e, t, s, o) => {
|
|
|
1093
1109
|
t.includes(c._id) && (c._parent = s);
|
|
1094
1110
|
});
|
|
1095
1111
|
let r;
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1112
|
+
if (!s)
|
|
1113
|
+
r = o;
|
|
1114
|
+
else {
|
|
1115
|
+
const c = e.findIndex((p) => p._id === s);
|
|
1116
|
+
if (c === -1)
|
|
1117
|
+
r = o;
|
|
1118
|
+
else {
|
|
1119
|
+
r = c + 1;
|
|
1120
|
+
let p = 0;
|
|
1121
|
+
for (; p < o && r < e.length; )
|
|
1122
|
+
e[r]._parent === s && p++, r++;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
return e.splice(r, 0, ...i), Tt(e);
|
|
1126
|
+
}, Ho = () => {
|
|
1127
|
+
const [, e] = we();
|
|
1099
1128
|
return {
|
|
1100
1129
|
setNewBlocks: (t) => {
|
|
1101
1130
|
e(t);
|
|
1102
1131
|
},
|
|
1103
1132
|
addBlocks: (t, s, o) => {
|
|
1104
|
-
e((n) =>
|
|
1133
|
+
e((n) => Wo(n, t, s, o));
|
|
1105
1134
|
},
|
|
1106
1135
|
removeBlocks: (t) => {
|
|
1107
|
-
e((s) =>
|
|
1136
|
+
e((s) => bt(s, t));
|
|
1108
1137
|
},
|
|
1109
1138
|
moveBlocks: (t, s, o) => {
|
|
1110
|
-
e((n) =>
|
|
1139
|
+
e((n) => Go(n, t, s, o));
|
|
1111
1140
|
},
|
|
1112
1141
|
updateBlocksProps: (t) => {
|
|
1113
1142
|
e((s) => {
|
|
1114
1143
|
const o = t.map((n) => n._id);
|
|
1115
1144
|
return s.map((n) => {
|
|
1116
1145
|
if (o.includes(n._id)) {
|
|
1117
|
-
const i =
|
|
1118
|
-
return { ...n, ...
|
|
1146
|
+
const i = oe(t, { _id: n._id });
|
|
1147
|
+
return { ...n, ...st(i, "_id") };
|
|
1119
1148
|
}
|
|
1120
1149
|
return n;
|
|
1121
1150
|
});
|
|
1122
1151
|
});
|
|
1123
1152
|
}
|
|
1124
1153
|
};
|
|
1125
|
-
},
|
|
1126
|
-
const { add: e } =
|
|
1154
|
+
}, we = () => O(ie), he = () => {
|
|
1155
|
+
const { add: e } = cs(), [t] = we(), {
|
|
1127
1156
|
setNewBlocks: s,
|
|
1128
1157
|
addBlocks: o,
|
|
1129
1158
|
removeBlocks: n,
|
|
1130
1159
|
moveBlocks: i,
|
|
1131
1160
|
updateBlocksProps: r
|
|
1132
|
-
} =
|
|
1161
|
+
} = Ho();
|
|
1133
1162
|
return {
|
|
1134
|
-
moveBlocks: (v,
|
|
1135
|
-
const
|
|
1136
|
-
const
|
|
1137
|
-
return { _id:
|
|
1138
|
-
});
|
|
1139
|
-
i(v,
|
|
1140
|
-
undo: () => ce(
|
|
1141
|
-
i([
|
|
1163
|
+
moveBlocks: (v, j, L) => {
|
|
1164
|
+
const F = I(v, (T) => {
|
|
1165
|
+
const V = t.find((K) => K._id === T)._parent || null, q = t.filter((K) => V ? K._parent === V : !K._parent).map((K) => K._id).indexOf(T);
|
|
1166
|
+
return { _id: T, oldParent: V, oldPosition: q };
|
|
1167
|
+
}), B = F.find(({ _id: T }) => T === v[0]);
|
|
1168
|
+
B && B.oldParent === j && B.oldPosition === L || (i(v, j, L), e({
|
|
1169
|
+
undo: () => ce(F, ({ _id: T, oldParent: G, oldPosition: V }) => {
|
|
1170
|
+
i([T], G, V);
|
|
1142
1171
|
}),
|
|
1143
|
-
redo: () => i(v,
|
|
1144
|
-
});
|
|
1172
|
+
redo: () => i(v, j, L)
|
|
1173
|
+
}));
|
|
1145
1174
|
},
|
|
1146
|
-
addBlocks: (v,
|
|
1147
|
-
o(v,
|
|
1148
|
-
undo: () => n(
|
|
1149
|
-
redo: () => o(v,
|
|
1175
|
+
addBlocks: (v, j, L) => {
|
|
1176
|
+
o(v, j, L), e({
|
|
1177
|
+
undo: () => n(I(v, "_id")),
|
|
1178
|
+
redo: () => o(v, j, L)
|
|
1150
1179
|
});
|
|
1151
1180
|
},
|
|
1152
1181
|
removeBlocks: (v) => {
|
|
1153
|
-
var
|
|
1154
|
-
const
|
|
1155
|
-
n(
|
|
1156
|
-
undo: () => o(v,
|
|
1157
|
-
redo: () => n(
|
|
1182
|
+
var B;
|
|
1183
|
+
const j = (B = ee(v)) == null ? void 0 : B._parent, F = t.filter((T) => j ? T._parent === j : !T._parent).indexOf(ee(v));
|
|
1184
|
+
n(I(v, "_id")), e({
|
|
1185
|
+
undo: () => o(v, j, F),
|
|
1186
|
+
redo: () => n(I(v, "_id"))
|
|
1158
1187
|
});
|
|
1159
1188
|
},
|
|
1160
|
-
updateBlocks: (v,
|
|
1161
|
-
let
|
|
1189
|
+
updateBlocks: (v, j, L) => {
|
|
1190
|
+
let F = [];
|
|
1162
1191
|
if (L)
|
|
1163
|
-
|
|
1192
|
+
F = I(v, (B) => ({ _id: B, ...L }));
|
|
1164
1193
|
else {
|
|
1165
|
-
const
|
|
1166
|
-
|
|
1167
|
-
const
|
|
1168
|
-
return ce(
|
|
1194
|
+
const B = Fs(j);
|
|
1195
|
+
F = I(v, (T) => {
|
|
1196
|
+
const G = t.find((X) => X._id === T), V = { _id: T };
|
|
1197
|
+
return ce(B, (X) => V[X] = G[X]), V;
|
|
1169
1198
|
});
|
|
1170
1199
|
}
|
|
1171
|
-
r(
|
|
1172
|
-
undo: () => r(
|
|
1173
|
-
redo: () => r(
|
|
1200
|
+
r(I(v, (B) => ({ _id: B, ...j }))), e({
|
|
1201
|
+
undo: () => r(F),
|
|
1202
|
+
redo: () => r(I(v, (B) => ({ _id: B, ...j })))
|
|
1174
1203
|
});
|
|
1175
1204
|
},
|
|
1176
|
-
updateBlocksRuntime: (v,
|
|
1177
|
-
r(
|
|
1205
|
+
updateBlocksRuntime: (v, j) => {
|
|
1206
|
+
r(I(v, (L) => ({ _id: L, ...j })));
|
|
1178
1207
|
},
|
|
1179
1208
|
setNewBlocks: (v) => {
|
|
1180
1209
|
s(v), e({
|
|
@@ -1183,7 +1212,7 @@ const Uo = (e, t, s, o) => {
|
|
|
1183
1212
|
});
|
|
1184
1213
|
}
|
|
1185
1214
|
};
|
|
1186
|
-
},
|
|
1215
|
+
}, qo = ge(
|
|
1187
1216
|
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
1188
1217
|
{
|
|
1189
1218
|
variants: {
|
|
@@ -1202,10 +1231,10 @@ const Uo = (e, t, s, o) => {
|
|
|
1202
1231
|
size: "default"
|
|
1203
1232
|
}
|
|
1204
1233
|
}
|
|
1205
|
-
),
|
|
1206
|
-
|
|
1207
|
-
const
|
|
1208
|
-
|
|
1234
|
+
), Ko = f.forwardRef(({ className: e, variant: t, size: s, ...o }, n) => /* @__PURE__ */ a.jsx(Wt.Root, { ref: n, className: d(qo({ variant: t, size: s, className: e })), ...o }));
|
|
1235
|
+
Ko.displayName = Wt.Root.displayName;
|
|
1236
|
+
const Jo = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1237
|
+
Qe.Root,
|
|
1209
1238
|
{
|
|
1210
1239
|
className: d(
|
|
1211
1240
|
"peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-slate-900 data-[state=unchecked]:bg-slate-200 dark:focus-visible:ring-slate-800 dark:focus-visible:ring-offset-slate-950 dark:data-[state=checked]:bg-slate-50 dark:data-[state=unchecked]:bg-slate-800",
|
|
@@ -1214,7 +1243,7 @@ const qo = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1214
1243
|
...t,
|
|
1215
1244
|
ref: s,
|
|
1216
1245
|
children: /* @__PURE__ */ a.jsx(
|
|
1217
|
-
|
|
1246
|
+
Qe.Thumb,
|
|
1218
1247
|
{
|
|
1219
1248
|
className: d(
|
|
1220
1249
|
"pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-slate-950"
|
|
@@ -1223,8 +1252,8 @@ const qo = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1223
1252
|
)
|
|
1224
1253
|
}
|
|
1225
1254
|
));
|
|
1226
|
-
|
|
1227
|
-
const
|
|
1255
|
+
Jo.displayName = Qe.Root.displayName;
|
|
1256
|
+
const ht = ge(
|
|
1228
1257
|
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
1229
1258
|
{
|
|
1230
1259
|
variants: {
|
|
@@ -1248,17 +1277,17 @@ const bt = ge(
|
|
|
1248
1277
|
size: "default"
|
|
1249
1278
|
}
|
|
1250
1279
|
}
|
|
1251
|
-
),
|
|
1280
|
+
), Yo = f.forwardRef(
|
|
1252
1281
|
({ className: e, variant: t, size: s, asChild: o = !1, ...n }, i) => {
|
|
1253
|
-
const r = o ?
|
|
1254
|
-
return /* @__PURE__ */ a.jsx(r, { className: d(
|
|
1282
|
+
const r = o ? Hs : "button";
|
|
1283
|
+
return /* @__PURE__ */ a.jsx(r, { className: d(ht({ variant: t, size: s, className: e })), ref: i, ...n });
|
|
1255
1284
|
}
|
|
1256
1285
|
);
|
|
1257
|
-
|
|
1258
|
-
const
|
|
1259
|
-
|
|
1260
|
-
const
|
|
1261
|
-
|
|
1286
|
+
Yo.displayName = "Button";
|
|
1287
|
+
const Yr = me.Root, Qo = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(me.Item, { ref: s, className: d("border-b", e), ...t }));
|
|
1288
|
+
Qo.displayName = "AccordionItem";
|
|
1289
|
+
const Xo = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsx(me.Header, { className: "flex", children: /* @__PURE__ */ a.jsxs(
|
|
1290
|
+
me.Trigger,
|
|
1262
1291
|
{
|
|
1263
1292
|
ref: o,
|
|
1264
1293
|
className: d(
|
|
@@ -1268,13 +1297,13 @@ const Yo = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1268
1297
|
...s,
|
|
1269
1298
|
children: [
|
|
1270
1299
|
t,
|
|
1271
|
-
/* @__PURE__ */ a.jsx(
|
|
1300
|
+
/* @__PURE__ */ a.jsx(qs, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
1272
1301
|
]
|
|
1273
1302
|
}
|
|
1274
1303
|
) }));
|
|
1275
|
-
|
|
1276
|
-
const
|
|
1277
|
-
|
|
1304
|
+
Xo.displayName = me.Trigger.displayName;
|
|
1305
|
+
const Zo = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1306
|
+
me.Content,
|
|
1278
1307
|
{
|
|
1279
1308
|
ref: o,
|
|
1280
1309
|
className: d(
|
|
@@ -1285,8 +1314,8 @@ const Qo = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1285
1314
|
children: /* @__PURE__ */ a.jsx("div", { className: "pb-4 pt-0", children: t })
|
|
1286
1315
|
}
|
|
1287
1316
|
));
|
|
1288
|
-
|
|
1289
|
-
const
|
|
1317
|
+
Zo.displayName = me.Content.displayName;
|
|
1318
|
+
const en = ge(
|
|
1290
1319
|
"relative w-full rounded-lg border px-4 py-3 text-sm [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
1291
1320
|
{
|
|
1292
1321
|
variants: {
|
|
@@ -1299,17 +1328,17 @@ const Xo = ge(
|
|
|
1299
1328
|
variant: "default"
|
|
1300
1329
|
}
|
|
1301
1330
|
}
|
|
1302
|
-
),
|
|
1303
|
-
|
|
1304
|
-
const
|
|
1331
|
+
), tn = f.forwardRef(({ className: e, variant: t, ...s }, o) => /* @__PURE__ */ a.jsx("div", { ref: o, role: "alert", className: d(en({ variant: t }), e), ...s }));
|
|
1332
|
+
tn.displayName = "Alert";
|
|
1333
|
+
const sn = f.forwardRef(
|
|
1305
1334
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("h5", { ref: s, className: d("mb-1 font-medium leading-none tracking-tight", e), ...t })
|
|
1306
1335
|
);
|
|
1307
|
-
|
|
1308
|
-
const
|
|
1336
|
+
sn.displayName = "AlertTitle";
|
|
1337
|
+
const on = f.forwardRef(
|
|
1309
1338
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("text-sm [&_p]:leading-relaxed", e), ...t })
|
|
1310
1339
|
);
|
|
1311
|
-
|
|
1312
|
-
const
|
|
1340
|
+
on.displayName = "AlertDescription";
|
|
1341
|
+
const nn = ge(
|
|
1313
1342
|
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
1314
1343
|
{
|
|
1315
1344
|
variants: {
|
|
@@ -1324,10 +1353,10 @@ const sn = ge(
|
|
|
1324
1353
|
variant: "default"
|
|
1325
1354
|
}
|
|
1326
1355
|
}
|
|
1327
|
-
),
|
|
1328
|
-
|
|
1329
|
-
const
|
|
1330
|
-
|
|
1356
|
+
), Qr = ({ className: e, variant: t, ...s }) => /* @__PURE__ */ a.jsx("div", { className: d(nn({ variant: t }), e), ...s }), Xr = H.Root, Zr = H.Trigger, ds = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(H.Portal, { className: d(e), ...t });
|
|
1357
|
+
ds.displayName = H.Portal.displayName;
|
|
1358
|
+
const us = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1359
|
+
H.Overlay,
|
|
1331
1360
|
{
|
|
1332
1361
|
className: d(
|
|
1333
1362
|
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
@@ -1337,11 +1366,11 @@ const ls = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1337
1366
|
ref: s
|
|
1338
1367
|
}
|
|
1339
1368
|
));
|
|
1340
|
-
|
|
1341
|
-
const
|
|
1342
|
-
/* @__PURE__ */ a.jsx(
|
|
1369
|
+
us.displayName = H.Overlay.displayName;
|
|
1370
|
+
const an = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs(ds, { children: [
|
|
1371
|
+
/* @__PURE__ */ a.jsx(us, {}),
|
|
1343
1372
|
/* @__PURE__ */ a.jsx(
|
|
1344
|
-
|
|
1373
|
+
H.Content,
|
|
1345
1374
|
{
|
|
1346
1375
|
ref: s,
|
|
1347
1376
|
className: d(
|
|
@@ -1352,30 +1381,30 @@ const on = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs(is
|
|
|
1352
1381
|
}
|
|
1353
1382
|
)
|
|
1354
1383
|
] }));
|
|
1355
|
-
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1358
|
-
const
|
|
1359
|
-
|
|
1360
|
-
const
|
|
1361
|
-
|
|
1362
|
-
const
|
|
1363
|
-
|
|
1364
|
-
const
|
|
1365
|
-
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1384
|
+
an.displayName = H.Content.displayName;
|
|
1385
|
+
const rn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
|
|
1386
|
+
rn.displayName = "AlertDialogHeader";
|
|
1387
|
+
const ln = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
1388
|
+
ln.displayName = "AlertDialogFooter";
|
|
1389
|
+
const cn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(H.Title, { ref: s, className: d("text-lg font-semibold", e), ...t }));
|
|
1390
|
+
cn.displayName = H.Title.displayName;
|
|
1391
|
+
const dn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(H.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
|
|
1392
|
+
dn.displayName = H.Description.displayName;
|
|
1393
|
+
const un = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(H.Action, { ref: s, className: d(ht(), e), ...t }));
|
|
1394
|
+
un.displayName = H.Action.displayName;
|
|
1395
|
+
const fn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1396
|
+
H.Cancel,
|
|
1368
1397
|
{
|
|
1369
1398
|
ref: s,
|
|
1370
|
-
className: d(
|
|
1399
|
+
className: d(ht({ variant: "outline" }), "mt-2 sm:mt-0", e),
|
|
1371
1400
|
...t
|
|
1372
1401
|
}
|
|
1373
1402
|
));
|
|
1374
|
-
|
|
1375
|
-
const
|
|
1376
|
-
|
|
1377
|
-
const
|
|
1378
|
-
|
|
1403
|
+
fn.displayName = H.Cancel.displayName;
|
|
1404
|
+
const fs = P.Root, mn = P.Trigger, ms = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(P.Portal, { className: d(e), ...t });
|
|
1405
|
+
ms.displayName = P.Portal.displayName;
|
|
1406
|
+
const ps = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1407
|
+
P.Overlay,
|
|
1379
1408
|
{
|
|
1380
1409
|
ref: s,
|
|
1381
1410
|
className: d(
|
|
@@ -1385,11 +1414,11 @@ const us = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1385
1414
|
...t
|
|
1386
1415
|
}
|
|
1387
1416
|
));
|
|
1388
|
-
|
|
1389
|
-
const xt =
|
|
1390
|
-
/* @__PURE__ */ a.jsx(
|
|
1417
|
+
ps.displayName = P.Overlay.displayName;
|
|
1418
|
+
const xt = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(ms, { children: [
|
|
1419
|
+
/* @__PURE__ */ a.jsx(ps, {}),
|
|
1391
1420
|
/* @__PURE__ */ a.jsxs(
|
|
1392
|
-
|
|
1421
|
+
P.Content,
|
|
1393
1422
|
{
|
|
1394
1423
|
ref: o,
|
|
1395
1424
|
className: d(
|
|
@@ -1399,53 +1428,53 @@ const xt = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1399
1428
|
...s,
|
|
1400
1429
|
children: [
|
|
1401
1430
|
t,
|
|
1402
|
-
/* @__PURE__ */ a.jsxs(
|
|
1403
|
-
/* @__PURE__ */ a.jsx(
|
|
1431
|
+
/* @__PURE__ */ a.jsxs(P.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
1432
|
+
/* @__PURE__ */ a.jsx(ot, { className: "h-4 w-4" }),
|
|
1404
1433
|
/* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
|
|
1405
1434
|
] })
|
|
1406
1435
|
]
|
|
1407
1436
|
}
|
|
1408
1437
|
)
|
|
1409
1438
|
] }));
|
|
1410
|
-
xt.displayName =
|
|
1411
|
-
const
|
|
1412
|
-
|
|
1413
|
-
const
|
|
1414
|
-
|
|
1415
|
-
const
|
|
1416
|
-
|
|
1439
|
+
xt.displayName = P.Content.displayName;
|
|
1440
|
+
const pn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-1.5 text-center sm:text-left", e), ...t });
|
|
1441
|
+
pn.displayName = "DialogHeader";
|
|
1442
|
+
const gn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
1443
|
+
gn.displayName = "DialogFooter";
|
|
1444
|
+
const bn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1445
|
+
P.Title,
|
|
1417
1446
|
{
|
|
1418
1447
|
ref: s,
|
|
1419
1448
|
className: d("text-lg font-semibold leading-none tracking-tight", e),
|
|
1420
1449
|
...t
|
|
1421
1450
|
}
|
|
1422
1451
|
));
|
|
1423
|
-
|
|
1424
|
-
const
|
|
1425
|
-
|
|
1426
|
-
const
|
|
1427
|
-
|
|
1428
|
-
const
|
|
1452
|
+
bn.displayName = P.Title.displayName;
|
|
1453
|
+
const hn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(P.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
|
|
1454
|
+
hn.displayName = P.Description.displayName;
|
|
1455
|
+
const xn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("rounded-xl border bg-card text-card-foreground shadow", e), ...t }));
|
|
1456
|
+
xn.displayName = "Card";
|
|
1457
|
+
const vn = f.forwardRef(
|
|
1429
1458
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("flex flex-col space-y-1.5 p-6", e), ...t })
|
|
1430
1459
|
);
|
|
1431
|
-
|
|
1432
|
-
const
|
|
1460
|
+
vn.displayName = "CardHeader";
|
|
1461
|
+
const yn = f.forwardRef(
|
|
1433
1462
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("h3", { ref: s, className: d("font-semibold leading-none tracking-tight", e), ...t })
|
|
1434
1463
|
);
|
|
1435
|
-
|
|
1436
|
-
const
|
|
1464
|
+
yn.displayName = "CardTitle";
|
|
1465
|
+
const wn = f.forwardRef(
|
|
1437
1466
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("p", { ref: s, className: d("text-sm text-muted-foreground", e), ...t })
|
|
1438
1467
|
);
|
|
1439
|
-
|
|
1440
|
-
const
|
|
1468
|
+
wn.displayName = "CardDescription";
|
|
1469
|
+
const Nn = f.forwardRef(
|
|
1441
1470
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("p-6 pt-0", e), ...t })
|
|
1442
1471
|
);
|
|
1443
|
-
|
|
1444
|
-
const
|
|
1472
|
+
Nn.displayName = "CardContent";
|
|
1473
|
+
const kn = f.forwardRef(
|
|
1445
1474
|
({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d(" flex items-center p-6 pt-0", e), ...t })
|
|
1446
1475
|
);
|
|
1447
|
-
|
|
1448
|
-
const
|
|
1476
|
+
kn.displayName = "CardFooter";
|
|
1477
|
+
const Sn = f.forwardRef(({ className: e, type: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1449
1478
|
"input",
|
|
1450
1479
|
{
|
|
1451
1480
|
type: t,
|
|
@@ -1457,10 +1486,10 @@ const Nn = m.forwardRef(({ className: e, type: t, ...s }, o) => /* @__PURE__ */
|
|
|
1457
1486
|
...s
|
|
1458
1487
|
}
|
|
1459
1488
|
));
|
|
1460
|
-
|
|
1461
|
-
const
|
|
1462
|
-
|
|
1463
|
-
const
|
|
1489
|
+
Sn.displayName = "Input";
|
|
1490
|
+
const jn = ge("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"), An = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Gt.Root, { ref: s, className: d(jn(), e), ...t }));
|
|
1491
|
+
An.displayName = Gt.Root.displayName;
|
|
1492
|
+
const Cn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1464
1493
|
"textarea",
|
|
1465
1494
|
{
|
|
1466
1495
|
className: d(
|
|
@@ -1471,14 +1500,14 @@ const Sn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1471
1500
|
...t
|
|
1472
1501
|
}
|
|
1473
1502
|
));
|
|
1474
|
-
|
|
1475
|
-
const
|
|
1503
|
+
Cn.displayName = "Textarea";
|
|
1504
|
+
const Bn = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(ue.Root, { ref: o, className: d("relative overflow-hidden", e), ...s, children: [
|
|
1476
1505
|
/* @__PURE__ */ a.jsx(ue.Viewport, { className: "h-full w-full rounded-[inherit]", children: t }),
|
|
1477
|
-
/* @__PURE__ */ a.jsx(
|
|
1506
|
+
/* @__PURE__ */ a.jsx(gs, {}),
|
|
1478
1507
|
/* @__PURE__ */ a.jsx(ue.Corner, {})
|
|
1479
1508
|
] }));
|
|
1480
|
-
|
|
1481
|
-
const
|
|
1509
|
+
Bn.displayName = ue.Root.displayName;
|
|
1510
|
+
const gs = f.forwardRef(({ className: e, orientation: t = "vertical", ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1482
1511
|
ue.ScrollAreaScrollbar,
|
|
1483
1512
|
{
|
|
1484
1513
|
ref: o,
|
|
@@ -1493,8 +1522,8 @@ const ms = m.forwardRef(({ className: e, orientation: t = "vertical", ...s }, o)
|
|
|
1493
1522
|
children: /* @__PURE__ */ a.jsx(ue.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1494
1523
|
}
|
|
1495
1524
|
));
|
|
1496
|
-
|
|
1497
|
-
const
|
|
1525
|
+
gs.displayName = ue.ScrollAreaScrollbar.displayName;
|
|
1526
|
+
const _n = be.Root, bs = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1498
1527
|
be.List,
|
|
1499
1528
|
{
|
|
1500
1529
|
ref: s,
|
|
@@ -1505,8 +1534,8 @@ const Cn = be.Root, fs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE_
|
|
|
1505
1534
|
...t
|
|
1506
1535
|
}
|
|
1507
1536
|
));
|
|
1508
|
-
|
|
1509
|
-
const
|
|
1537
|
+
bs.displayName = be.List.displayName;
|
|
1538
|
+
const Ze = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1510
1539
|
be.Trigger,
|
|
1511
1540
|
{
|
|
1512
1541
|
ref: s,
|
|
@@ -1517,8 +1546,8 @@ const Xe = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1517
1546
|
...t
|
|
1518
1547
|
}
|
|
1519
1548
|
));
|
|
1520
|
-
|
|
1521
|
-
const
|
|
1549
|
+
Ze.displayName = be.Trigger.displayName;
|
|
1550
|
+
const et = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1522
1551
|
be.Content,
|
|
1523
1552
|
{
|
|
1524
1553
|
ref: s,
|
|
@@ -1529,9 +1558,9 @@ const Ze = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1529
1558
|
...t
|
|
1530
1559
|
}
|
|
1531
1560
|
));
|
|
1532
|
-
|
|
1533
|
-
const
|
|
1534
|
-
|
|
1561
|
+
et.displayName = be.Content.displayName;
|
|
1562
|
+
const ei = ye.Portal, ti = ye.Provider, si = ye.Root, oi = ye.Trigger, Rn = f.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1563
|
+
ye.Content,
|
|
1535
1564
|
{
|
|
1536
1565
|
ref: o,
|
|
1537
1566
|
sideOffset: t,
|
|
@@ -1542,9 +1571,9 @@ const Xr = ve.Portal, Zr = ve.Provider, ei = ve.Root, ti = ve.Trigger, _n = m.fo
|
|
|
1542
1571
|
...s
|
|
1543
1572
|
}
|
|
1544
1573
|
));
|
|
1545
|
-
|
|
1546
|
-
const
|
|
1547
|
-
|
|
1574
|
+
Rn.displayName = ye.Content.displayName;
|
|
1575
|
+
const ni = je.Root, ai = je.Trigger, Pn = f.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...o }, n) => /* @__PURE__ */ a.jsx(je.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
1576
|
+
je.Content,
|
|
1548
1577
|
{
|
|
1549
1578
|
ref: n,
|
|
1550
1579
|
align: t,
|
|
@@ -1556,18 +1585,18 @@ const si = Se.Root, oi = Se.Trigger, Bn = m.forwardRef(({ className: e, align: t
|
|
|
1556
1585
|
...o
|
|
1557
1586
|
}
|
|
1558
1587
|
) }));
|
|
1559
|
-
|
|
1560
|
-
const
|
|
1561
|
-
|
|
1588
|
+
Pn.displayName = je.Content.displayName;
|
|
1589
|
+
const ri = _.Menu, ii = _.Group, li = _.Portal, ci = _.Sub, di = _.RadioGroup, Tn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1590
|
+
_.Root,
|
|
1562
1591
|
{
|
|
1563
1592
|
ref: s,
|
|
1564
1593
|
className: d("flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-sm", e),
|
|
1565
1594
|
...t
|
|
1566
1595
|
}
|
|
1567
1596
|
));
|
|
1568
|
-
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1597
|
+
Tn.displayName = _.Root.displayName;
|
|
1598
|
+
const In = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1599
|
+
_.Trigger,
|
|
1571
1600
|
{
|
|
1572
1601
|
ref: s,
|
|
1573
1602
|
className: d(
|
|
@@ -1577,9 +1606,9 @@ const Tn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1577
1606
|
...t
|
|
1578
1607
|
}
|
|
1579
1608
|
));
|
|
1580
|
-
|
|
1581
|
-
const
|
|
1582
|
-
|
|
1609
|
+
In.displayName = _.Trigger.displayName;
|
|
1610
|
+
const Mn = f.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
1611
|
+
_.SubTrigger,
|
|
1583
1612
|
{
|
|
1584
1613
|
ref: n,
|
|
1585
1614
|
className: d(
|
|
@@ -1590,13 +1619,13 @@ const Pn = m.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /*
|
|
|
1590
1619
|
...o,
|
|
1591
1620
|
children: [
|
|
1592
1621
|
s,
|
|
1593
|
-
/* @__PURE__ */ a.jsx(
|
|
1622
|
+
/* @__PURE__ */ a.jsx(nt, { className: "ml-auto h-4 w-4" })
|
|
1594
1623
|
]
|
|
1595
1624
|
}
|
|
1596
1625
|
));
|
|
1597
|
-
|
|
1598
|
-
const
|
|
1599
|
-
|
|
1626
|
+
Mn.displayName = _.SubTrigger.displayName;
|
|
1627
|
+
const Dn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1628
|
+
_.SubContent,
|
|
1600
1629
|
{
|
|
1601
1630
|
ref: s,
|
|
1602
1631
|
className: d(
|
|
@@ -1606,9 +1635,9 @@ const In = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1606
1635
|
...t
|
|
1607
1636
|
}
|
|
1608
1637
|
));
|
|
1609
|
-
|
|
1610
|
-
const
|
|
1611
|
-
|
|
1638
|
+
Dn.displayName = _.SubContent.displayName;
|
|
1639
|
+
const En = f.forwardRef(({ className: e, align: t = "start", alignOffset: s = -4, sideOffset: o = 8, ...n }, i) => /* @__PURE__ */ a.jsx(_.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
1640
|
+
_.Content,
|
|
1612
1641
|
{
|
|
1613
1642
|
ref: i,
|
|
1614
1643
|
align: t,
|
|
@@ -1621,9 +1650,9 @@ const Mn = m.forwardRef(({ className: e, align: t = "start", alignOffset: s = -4
|
|
|
1621
1650
|
...n
|
|
1622
1651
|
}
|
|
1623
1652
|
) }));
|
|
1624
|
-
|
|
1625
|
-
const
|
|
1626
|
-
|
|
1653
|
+
En.displayName = _.Content.displayName;
|
|
1654
|
+
const On = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1655
|
+
_.Item,
|
|
1627
1656
|
{
|
|
1628
1657
|
ref: o,
|
|
1629
1658
|
className: d(
|
|
@@ -1634,9 +1663,9 @@ const Dn = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */
|
|
|
1634
1663
|
...s
|
|
1635
1664
|
}
|
|
1636
1665
|
));
|
|
1637
|
-
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1666
|
+
On.displayName = _.Item.displayName;
|
|
1667
|
+
const Ln = f.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
1668
|
+
_.CheckboxItem,
|
|
1640
1669
|
{
|
|
1641
1670
|
ref: n,
|
|
1642
1671
|
className: d(
|
|
@@ -1646,14 +1675,14 @@ const En = m.forwardRef(({ className: e, children: t, checked: s, ...o }, n) =>
|
|
|
1646
1675
|
checked: s,
|
|
1647
1676
|
...o,
|
|
1648
1677
|
children: [
|
|
1649
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
1678
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(_.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
|
|
1650
1679
|
t
|
|
1651
1680
|
]
|
|
1652
1681
|
}
|
|
1653
1682
|
));
|
|
1654
|
-
|
|
1655
|
-
const
|
|
1656
|
-
|
|
1683
|
+
Ln.displayName = _.CheckboxItem.displayName;
|
|
1684
|
+
const zn = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
1685
|
+
_.RadioItem,
|
|
1657
1686
|
{
|
|
1658
1687
|
ref: o,
|
|
1659
1688
|
className: d(
|
|
@@ -1662,27 +1691,27 @@ const On = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1662
1691
|
),
|
|
1663
1692
|
...s,
|
|
1664
1693
|
children: [
|
|
1665
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
1694
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(_.ItemIndicator, { children: /* @__PURE__ */ a.jsx(at, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1666
1695
|
t
|
|
1667
1696
|
]
|
|
1668
1697
|
}
|
|
1669
1698
|
));
|
|
1670
|
-
|
|
1671
|
-
const
|
|
1672
|
-
|
|
1699
|
+
zn.displayName = _.RadioItem.displayName;
|
|
1700
|
+
const Vn = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1701
|
+
_.Label,
|
|
1673
1702
|
{
|
|
1674
1703
|
ref: o,
|
|
1675
1704
|
className: d("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
|
|
1676
1705
|
...s
|
|
1677
1706
|
}
|
|
1678
1707
|
));
|
|
1679
|
-
|
|
1680
|
-
const
|
|
1681
|
-
|
|
1682
|
-
const
|
|
1683
|
-
|
|
1684
|
-
const
|
|
1685
|
-
|
|
1708
|
+
Vn.displayName = _.Label.displayName;
|
|
1709
|
+
const $n = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(_.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
1710
|
+
$n.displayName = _.Separator.displayName;
|
|
1711
|
+
const Fn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
1712
|
+
Fn.displayname = "MenubarShortcut";
|
|
1713
|
+
const ui = Ve.Root, fi = Ve.Trigger, Un = f.forwardRef(({ className: e, align: t = "center", sideOffset: s = 4, ...o }, n) => /* @__PURE__ */ a.jsx(
|
|
1714
|
+
Ve.Content,
|
|
1686
1715
|
{
|
|
1687
1716
|
ref: n,
|
|
1688
1717
|
align: t,
|
|
@@ -1694,8 +1723,8 @@ const ci = ze.Root, di = ze.Trigger, $n = m.forwardRef(({ className: e, align: t
|
|
|
1694
1723
|
...o
|
|
1695
1724
|
}
|
|
1696
1725
|
));
|
|
1697
|
-
|
|
1698
|
-
const
|
|
1726
|
+
Un.displayName = Ve.Content.displayName;
|
|
1727
|
+
const mi = U.Root, pi = U.Group, gi = U.Value, Wn = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
1699
1728
|
U.Trigger,
|
|
1700
1729
|
{
|
|
1701
1730
|
ref: o,
|
|
@@ -1706,12 +1735,12 @@ const ui = U.Root, mi = U.Group, fi = U.Value, Fn = m.forwardRef(({ className: e
|
|
|
1706
1735
|
...s,
|
|
1707
1736
|
children: [
|
|
1708
1737
|
t,
|
|
1709
|
-
/* @__PURE__ */ a.jsx(U.Icon, { asChild: !0, children: /* @__PURE__ */ a.jsx(
|
|
1738
|
+
/* @__PURE__ */ a.jsx(U.Icon, { asChild: !0, children: /* @__PURE__ */ a.jsx(Ks, { className: "h-4 w-4 opacity-50" }) })
|
|
1710
1739
|
]
|
|
1711
1740
|
}
|
|
1712
1741
|
));
|
|
1713
|
-
|
|
1714
|
-
const
|
|
1742
|
+
Wn.displayName = U.Trigger.displayName;
|
|
1743
|
+
const Gn = f.forwardRef(({ className: e, children: t, position: s = "popper", ...o }, n) => /* @__PURE__ */ a.jsx(U.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
1715
1744
|
U.Content,
|
|
1716
1745
|
{
|
|
1717
1746
|
ref: n,
|
|
@@ -1734,10 +1763,10 @@ const Un = m.forwardRef(({ className: e, children: t, position: s = "popper", ..
|
|
|
1734
1763
|
)
|
|
1735
1764
|
}
|
|
1736
1765
|
) }));
|
|
1737
|
-
|
|
1738
|
-
const
|
|
1739
|
-
|
|
1740
|
-
const
|
|
1766
|
+
Gn.displayName = U.Content.displayName;
|
|
1767
|
+
const Hn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(U.Label, { ref: s, className: d("px-2 py-1.5 text-sm font-semibold", e), ...t }));
|
|
1768
|
+
Hn.displayName = U.Label.displayName;
|
|
1769
|
+
const qn = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
1741
1770
|
U.Item,
|
|
1742
1771
|
{
|
|
1743
1772
|
ref: o,
|
|
@@ -1747,18 +1776,18 @@ const Gn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1747
1776
|
),
|
|
1748
1777
|
...s,
|
|
1749
1778
|
children: [
|
|
1750
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(U.ItemIndicator, { children: /* @__PURE__ */ a.jsx(
|
|
1779
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(U.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
|
|
1751
1780
|
/* @__PURE__ */ a.jsx(U.ItemText, { children: t })
|
|
1752
1781
|
]
|
|
1753
1782
|
}
|
|
1754
1783
|
));
|
|
1755
|
-
|
|
1756
|
-
const
|
|
1757
|
-
|
|
1758
|
-
const
|
|
1759
|
-
|
|
1760
|
-
const
|
|
1761
|
-
|
|
1784
|
+
qn.displayName = U.Item.displayName;
|
|
1785
|
+
const Kn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(U.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
1786
|
+
Kn.displayName = U.Separator.displayName;
|
|
1787
|
+
const bi = P.Root, hi = P.Trigger, xi = P.Close, hs = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(P.Portal, { className: d(e), ...t });
|
|
1788
|
+
hs.displayName = P.Portal.displayName;
|
|
1789
|
+
const xs = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1790
|
+
P.Overlay,
|
|
1762
1791
|
{
|
|
1763
1792
|
className: d(
|
|
1764
1793
|
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
@@ -1768,8 +1797,8 @@ const gs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1768
1797
|
ref: s
|
|
1769
1798
|
}
|
|
1770
1799
|
));
|
|
1771
|
-
|
|
1772
|
-
const
|
|
1800
|
+
xs.displayName = P.Overlay.displayName;
|
|
1801
|
+
const Jn = ge(
|
|
1773
1802
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
1774
1803
|
{
|
|
1775
1804
|
variants: {
|
|
@@ -1784,29 +1813,29 @@ const qn = ge(
|
|
|
1784
1813
|
side: "right"
|
|
1785
1814
|
}
|
|
1786
1815
|
}
|
|
1787
|
-
),
|
|
1788
|
-
({ side: e = "right", className: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
1789
|
-
/* @__PURE__ */ a.jsx(
|
|
1790
|
-
/* @__PURE__ */ a.jsxs(
|
|
1816
|
+
), Yn = f.forwardRef(
|
|
1817
|
+
({ side: e = "right", className: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(hs, { children: [
|
|
1818
|
+
/* @__PURE__ */ a.jsx(xs, {}),
|
|
1819
|
+
/* @__PURE__ */ a.jsxs(P.Content, { ref: n, className: d(Jn({ side: e }), t), ...o, children: [
|
|
1791
1820
|
s,
|
|
1792
|
-
/* @__PURE__ */ a.jsxs(
|
|
1793
|
-
/* @__PURE__ */ a.jsx(
|
|
1821
|
+
/* @__PURE__ */ a.jsxs(P.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
1822
|
+
/* @__PURE__ */ a.jsx(ot, { className: "h-4 w-4" }),
|
|
1794
1823
|
/* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
|
|
1795
1824
|
] })
|
|
1796
1825
|
] })
|
|
1797
1826
|
] })
|
|
1798
1827
|
);
|
|
1799
|
-
|
|
1800
|
-
const
|
|
1801
|
-
|
|
1802
|
-
const
|
|
1803
|
-
|
|
1804
|
-
const
|
|
1805
|
-
|
|
1806
|
-
const
|
|
1807
|
-
|
|
1808
|
-
const
|
|
1809
|
-
|
|
1828
|
+
Yn.displayName = P.Content.displayName;
|
|
1829
|
+
const Qn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
|
|
1830
|
+
Qn.displayName = "SheetHeader";
|
|
1831
|
+
const Xn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
1832
|
+
Xn.displayName = "SheetFooter";
|
|
1833
|
+
const Zn = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(P.Title, { ref: s, className: d("text-lg font-semibold text-foreground", e), ...t }));
|
|
1834
|
+
Zn.displayName = P.Title.displayName;
|
|
1835
|
+
const ea = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(P.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
|
|
1836
|
+
ea.displayName = P.Description.displayName;
|
|
1837
|
+
const vi = M.Root, yi = M.Trigger, wi = M.Group, Ni = M.Portal, ki = M.Sub, Si = M.RadioGroup, ta = f.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
1838
|
+
M.SubTrigger,
|
|
1810
1839
|
{
|
|
1811
1840
|
ref: n,
|
|
1812
1841
|
className: d(
|
|
@@ -1817,13 +1846,13 @@ const xi = I.Root, hi = I.Trigger, vi = I.Group, yi = I.Portal, wi = I.Sub, Ni =
|
|
|
1817
1846
|
...o,
|
|
1818
1847
|
children: [
|
|
1819
1848
|
s,
|
|
1820
|
-
/* @__PURE__ */ a.jsx(
|
|
1849
|
+
/* @__PURE__ */ a.jsx(nt, { className: "ml-auto h-4 w-4" })
|
|
1821
1850
|
]
|
|
1822
1851
|
}
|
|
1823
1852
|
));
|
|
1824
|
-
|
|
1825
|
-
const
|
|
1826
|
-
|
|
1853
|
+
ta.displayName = M.SubTrigger.displayName;
|
|
1854
|
+
const sa = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1855
|
+
M.SubContent,
|
|
1827
1856
|
{
|
|
1828
1857
|
ref: s,
|
|
1829
1858
|
className: d(
|
|
@@ -1833,9 +1862,9 @@ const ea = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1833
1862
|
...t
|
|
1834
1863
|
}
|
|
1835
1864
|
));
|
|
1836
|
-
|
|
1837
|
-
const
|
|
1838
|
-
|
|
1865
|
+
sa.displayName = M.SubContent.displayName;
|
|
1866
|
+
const oa = f.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__PURE__ */ a.jsx(M.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
1867
|
+
M.Content,
|
|
1839
1868
|
{
|
|
1840
1869
|
ref: o,
|
|
1841
1870
|
sideOffset: t,
|
|
@@ -1847,9 +1876,9 @@ const ta = m.forwardRef(({ className: e, sideOffset: t = 4, ...s }, o) => /* @__
|
|
|
1847
1876
|
...s
|
|
1848
1877
|
}
|
|
1849
1878
|
) }));
|
|
1850
|
-
|
|
1851
|
-
const
|
|
1852
|
-
|
|
1879
|
+
oa.displayName = M.Content.displayName;
|
|
1880
|
+
const na = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1881
|
+
M.Item,
|
|
1853
1882
|
{
|
|
1854
1883
|
ref: o,
|
|
1855
1884
|
className: d(
|
|
@@ -1860,9 +1889,9 @@ const sa = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */
|
|
|
1860
1889
|
...s
|
|
1861
1890
|
}
|
|
1862
1891
|
));
|
|
1863
|
-
|
|
1864
|
-
const
|
|
1865
|
-
|
|
1892
|
+
na.displayName = M.Item.displayName;
|
|
1893
|
+
const aa = f.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
1894
|
+
M.CheckboxItem,
|
|
1866
1895
|
{
|
|
1867
1896
|
ref: n,
|
|
1868
1897
|
className: d(
|
|
@@ -1872,14 +1901,14 @@ const oa = m.forwardRef(({ className: e, children: t, checked: s, ...o }, n) =>
|
|
|
1872
1901
|
checked: s,
|
|
1873
1902
|
...o,
|
|
1874
1903
|
children: [
|
|
1875
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
1904
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(M.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
|
|
1876
1905
|
t
|
|
1877
1906
|
]
|
|
1878
1907
|
}
|
|
1879
1908
|
));
|
|
1880
|
-
|
|
1881
|
-
const
|
|
1882
|
-
|
|
1909
|
+
aa.displayName = M.CheckboxItem.displayName;
|
|
1910
|
+
const ra = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
1911
|
+
M.RadioItem,
|
|
1883
1912
|
{
|
|
1884
1913
|
ref: o,
|
|
1885
1914
|
className: d(
|
|
@@ -1888,27 +1917,27 @@ const na = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1888
1917
|
),
|
|
1889
1918
|
...s,
|
|
1890
1919
|
children: [
|
|
1891
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
1920
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(M.ItemIndicator, { children: /* @__PURE__ */ a.jsx(at, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1892
1921
|
t
|
|
1893
1922
|
]
|
|
1894
1923
|
}
|
|
1895
1924
|
));
|
|
1896
|
-
|
|
1897
|
-
const
|
|
1898
|
-
|
|
1925
|
+
ra.displayName = M.RadioItem.displayName;
|
|
1926
|
+
const ia = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1927
|
+
M.Label,
|
|
1899
1928
|
{
|
|
1900
1929
|
ref: o,
|
|
1901
1930
|
className: d("px-2 py-1.5 text-sm font-semibold", t && "pl-8", e),
|
|
1902
1931
|
...s
|
|
1903
1932
|
}
|
|
1904
1933
|
));
|
|
1905
|
-
|
|
1906
|
-
const
|
|
1907
|
-
|
|
1908
|
-
const
|
|
1909
|
-
|
|
1910
|
-
const
|
|
1911
|
-
|
|
1934
|
+
ia.displayName = M.Label.displayName;
|
|
1935
|
+
const la = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(M.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
1936
|
+
la.displayName = M.Separator.displayName;
|
|
1937
|
+
const ca = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest opacity-60", e), ...t });
|
|
1938
|
+
ca.displayName = "DropdownMenuShortcut";
|
|
1939
|
+
const da = f.forwardRef(({ className: e, orientation: t = "horizontal", decorative: s = !0, ...o }, n) => /* @__PURE__ */ a.jsx(
|
|
1940
|
+
Ht.Root,
|
|
1912
1941
|
{
|
|
1913
1942
|
ref: n,
|
|
1914
1943
|
decorative: s,
|
|
@@ -1917,28 +1946,28 @@ const la = m.forwardRef(({ className: e, orientation: t = "horizontal", decorati
|
|
|
1917
1946
|
...o
|
|
1918
1947
|
}
|
|
1919
1948
|
));
|
|
1920
|
-
|
|
1921
|
-
const
|
|
1922
|
-
let
|
|
1923
|
-
function
|
|
1924
|
-
return
|
|
1949
|
+
da.displayName = Ht.Root.displayName;
|
|
1950
|
+
const ua = 1, fa = 1e6;
|
|
1951
|
+
let Ge = 0;
|
|
1952
|
+
function ma() {
|
|
1953
|
+
return Ge = (Ge + 1) % Number.MAX_VALUE, Ge.toString();
|
|
1925
1954
|
}
|
|
1926
|
-
const
|
|
1927
|
-
if (
|
|
1955
|
+
const He = /* @__PURE__ */ new Map(), It = (e) => {
|
|
1956
|
+
if (He.has(e))
|
|
1928
1957
|
return;
|
|
1929
1958
|
const t = setTimeout(() => {
|
|
1930
|
-
|
|
1959
|
+
He.delete(e), ke({
|
|
1931
1960
|
type: "REMOVE_TOAST",
|
|
1932
1961
|
toastId: e
|
|
1933
1962
|
});
|
|
1934
|
-
},
|
|
1935
|
-
|
|
1936
|
-
},
|
|
1963
|
+
}, fa);
|
|
1964
|
+
He.set(e, t);
|
|
1965
|
+
}, pa = (e, t) => {
|
|
1937
1966
|
switch (t.type) {
|
|
1938
1967
|
case "ADD_TOAST":
|
|
1939
1968
|
return {
|
|
1940
1969
|
...e,
|
|
1941
|
-
toasts: [t.toast, ...e.toasts].slice(0,
|
|
1970
|
+
toasts: [t.toast, ...e.toasts].slice(0, ua)
|
|
1942
1971
|
};
|
|
1943
1972
|
case "UPDATE_TOAST":
|
|
1944
1973
|
return {
|
|
@@ -1947,8 +1976,8 @@ const Ge = /* @__PURE__ */ new Map(), Rt = (e) => {
|
|
|
1947
1976
|
};
|
|
1948
1977
|
case "DISMISS_TOAST": {
|
|
1949
1978
|
const { toastId: s } = t;
|
|
1950
|
-
return s ?
|
|
1951
|
-
|
|
1979
|
+
return s ? It(s) : e.toasts.forEach((o) => {
|
|
1980
|
+
It(o.id);
|
|
1952
1981
|
}), {
|
|
1953
1982
|
...e,
|
|
1954
1983
|
toasts: e.toasts.map(
|
|
@@ -1968,15 +1997,15 @@ const Ge = /* @__PURE__ */ new Map(), Rt = (e) => {
|
|
|
1968
1997
|
toasts: e.toasts.filter((s) => s.id !== t.toastId)
|
|
1969
1998
|
};
|
|
1970
1999
|
}
|
|
1971
|
-
},
|
|
1972
|
-
let
|
|
2000
|
+
}, Me = [];
|
|
2001
|
+
let De = { toasts: [] };
|
|
1973
2002
|
function ke(e) {
|
|
1974
|
-
|
|
1975
|
-
t(
|
|
2003
|
+
De = pa(De, e), Me.forEach((t) => {
|
|
2004
|
+
t(De);
|
|
1976
2005
|
});
|
|
1977
2006
|
}
|
|
1978
|
-
function
|
|
1979
|
-
const t =
|
|
2007
|
+
function ga({ ...e }) {
|
|
2008
|
+
const t = ma(), s = (n) => ke({
|
|
1980
2009
|
type: "UPDATE_TOAST",
|
|
1981
2010
|
toast: { ...n, id: t }
|
|
1982
2011
|
}), o = () => ke({ type: "DISMISS_TOAST", toastId: t });
|
|
@@ -1996,19 +2025,19 @@ function fa({ ...e }) {
|
|
|
1996
2025
|
update: s
|
|
1997
2026
|
};
|
|
1998
2027
|
}
|
|
1999
|
-
function
|
|
2000
|
-
const [e, t] =
|
|
2001
|
-
return
|
|
2002
|
-
const s =
|
|
2003
|
-
s > -1 &&
|
|
2028
|
+
function vs() {
|
|
2029
|
+
const [e, t] = f.useState(De);
|
|
2030
|
+
return f.useEffect(() => (Me.push(t), () => {
|
|
2031
|
+
const s = Me.indexOf(t);
|
|
2032
|
+
s > -1 && Me.splice(s, 1);
|
|
2004
2033
|
}), [e]), {
|
|
2005
2034
|
...e,
|
|
2006
|
-
toast:
|
|
2035
|
+
toast: ga,
|
|
2007
2036
|
dismiss: (s) => ke({ type: "DISMISS_TOAST", toastId: s })
|
|
2008
2037
|
};
|
|
2009
2038
|
}
|
|
2010
|
-
const
|
|
2011
|
-
|
|
2039
|
+
const ba = Z.Provider, ys = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2040
|
+
Z.Viewport,
|
|
2012
2041
|
{
|
|
2013
2042
|
ref: s,
|
|
2014
2043
|
className: d(
|
|
@@ -2018,8 +2047,8 @@ const pa = X.Provider, xs = m.forwardRef(({ className: e, ...t }, s) => /* @__PU
|
|
|
2018
2047
|
...t
|
|
2019
2048
|
}
|
|
2020
2049
|
));
|
|
2021
|
-
|
|
2022
|
-
const
|
|
2050
|
+
ys.displayName = Z.Viewport.displayName;
|
|
2051
|
+
const ha = ge(
|
|
2023
2052
|
"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
2024
2053
|
{
|
|
2025
2054
|
variants: {
|
|
@@ -2032,10 +2061,10 @@ const ga = ge(
|
|
|
2032
2061
|
variant: "default"
|
|
2033
2062
|
}
|
|
2034
2063
|
}
|
|
2035
|
-
),
|
|
2036
|
-
|
|
2037
|
-
const
|
|
2038
|
-
|
|
2064
|
+
), ws = f.forwardRef(({ className: e, variant: t, ...s }, o) => /* @__PURE__ */ a.jsx(Z.Root, { ref: o, className: d(ha({ variant: t }), e), ...s }));
|
|
2065
|
+
ws.displayName = Z.Root.displayName;
|
|
2066
|
+
const xa = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2067
|
+
Z.Action,
|
|
2039
2068
|
{
|
|
2040
2069
|
ref: s,
|
|
2041
2070
|
className: d(
|
|
@@ -2045,9 +2074,9 @@ const ba = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2045
2074
|
...t
|
|
2046
2075
|
}
|
|
2047
2076
|
));
|
|
2048
|
-
|
|
2049
|
-
const
|
|
2050
|
-
|
|
2077
|
+
xa.displayName = Z.Action.displayName;
|
|
2078
|
+
const Ns = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2079
|
+
Z.Close,
|
|
2051
2080
|
{
|
|
2052
2081
|
ref: s,
|
|
2053
2082
|
className: d(
|
|
@@ -2056,29 +2085,29 @@ const vs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2056
2085
|
),
|
|
2057
2086
|
"toast-close": "",
|
|
2058
2087
|
...t,
|
|
2059
|
-
children: /* @__PURE__ */ a.jsx(
|
|
2088
|
+
children: /* @__PURE__ */ a.jsx(ot, { className: "h-4 w-4" })
|
|
2060
2089
|
}
|
|
2061
2090
|
));
|
|
2062
|
-
|
|
2063
|
-
const
|
|
2064
|
-
|
|
2065
|
-
const
|
|
2066
|
-
|
|
2067
|
-
function
|
|
2068
|
-
const { toasts: e } =
|
|
2069
|
-
return /* @__PURE__ */ a.jsxs(
|
|
2070
|
-
e.map(({ id: t, title: s, description: o, action: n, ...i }) => /* @__PURE__ */ a.jsxs(
|
|
2091
|
+
Ns.displayName = Z.Close.displayName;
|
|
2092
|
+
const ks = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Z.Title, { ref: s, className: d("text-sm font-semibold [&+div]:text-xs", e), ...t }));
|
|
2093
|
+
ks.displayName = Z.Title.displayName;
|
|
2094
|
+
const Ss = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Z.Description, { ref: s, className: d("text-sm opacity-90", e), ...t }));
|
|
2095
|
+
Ss.displayName = Z.Description.displayName;
|
|
2096
|
+
function ji() {
|
|
2097
|
+
const { toasts: e } = vs();
|
|
2098
|
+
return /* @__PURE__ */ a.jsxs(ba, { children: [
|
|
2099
|
+
e.map(({ id: t, title: s, description: o, action: n, ...i }) => /* @__PURE__ */ a.jsxs(ws, { ...i, children: [
|
|
2071
2100
|
/* @__PURE__ */ a.jsxs("div", { className: "grid gap-1", children: [
|
|
2072
|
-
s && /* @__PURE__ */ a.jsx(
|
|
2073
|
-
o && /* @__PURE__ */ a.jsx(
|
|
2101
|
+
s && /* @__PURE__ */ a.jsx(ks, { children: s }),
|
|
2102
|
+
o && /* @__PURE__ */ a.jsx(Ss, { children: o })
|
|
2074
2103
|
] }),
|
|
2075
2104
|
n,
|
|
2076
|
-
/* @__PURE__ */ a.jsx(
|
|
2105
|
+
/* @__PURE__ */ a.jsx(Ns, {})
|
|
2077
2106
|
] }, t)),
|
|
2078
|
-
/* @__PURE__ */ a.jsx(
|
|
2107
|
+
/* @__PURE__ */ a.jsx(ys, {})
|
|
2079
2108
|
] });
|
|
2080
2109
|
}
|
|
2081
|
-
const
|
|
2110
|
+
const Ai = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("animate-pulse rounded-md bg-primary/10", e), ...t }), js = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2082
2111
|
Q,
|
|
2083
2112
|
{
|
|
2084
2113
|
ref: s,
|
|
@@ -2089,9 +2118,9 @@ const ji = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className:
|
|
|
2089
2118
|
...t
|
|
2090
2119
|
}
|
|
2091
2120
|
));
|
|
2092
|
-
|
|
2093
|
-
const
|
|
2094
|
-
/* @__PURE__ */ a.jsx(
|
|
2121
|
+
js.displayName = Q.displayName;
|
|
2122
|
+
const Ci = ({ children: e, ...t }) => /* @__PURE__ */ a.jsx(fs, { ...t, children: /* @__PURE__ */ a.jsx(xt, { className: "overflow-hidden p-0", children: /* @__PURE__ */ a.jsx(js, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), va = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
2123
|
+
/* @__PURE__ */ a.jsx(Js, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
2095
2124
|
/* @__PURE__ */ a.jsx(
|
|
2096
2125
|
Q.Input,
|
|
2097
2126
|
{
|
|
@@ -2104,8 +2133,8 @@ const Si = ({ children: e, ...t }) => /* @__PURE__ */ a.jsx(cs, { ...t, children
|
|
|
2104
2133
|
}
|
|
2105
2134
|
)
|
|
2106
2135
|
] }));
|
|
2107
|
-
|
|
2108
|
-
const
|
|
2136
|
+
va.displayName = Q.Input.displayName;
|
|
2137
|
+
const ya = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2109
2138
|
Q.List,
|
|
2110
2139
|
{
|
|
2111
2140
|
ref: s,
|
|
@@ -2113,10 +2142,10 @@ const ha = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2113
2142
|
...t
|
|
2114
2143
|
}
|
|
2115
2144
|
));
|
|
2116
|
-
|
|
2117
|
-
const
|
|
2118
|
-
|
|
2119
|
-
const
|
|
2145
|
+
ya.displayName = Q.List.displayName;
|
|
2146
|
+
const wa = f.forwardRef((e, t) => /* @__PURE__ */ a.jsx(Q.Empty, { ref: t, className: "py-6 text-center text-sm", ...e }));
|
|
2147
|
+
wa.displayName = Q.Empty.displayName;
|
|
2148
|
+
const Na = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2120
2149
|
Q.Group,
|
|
2121
2150
|
{
|
|
2122
2151
|
ref: s,
|
|
@@ -2127,10 +2156,10 @@ const ya = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2127
2156
|
...t
|
|
2128
2157
|
}
|
|
2129
2158
|
));
|
|
2130
|
-
|
|
2131
|
-
const
|
|
2132
|
-
|
|
2133
|
-
const
|
|
2159
|
+
Na.displayName = Q.Group.displayName;
|
|
2160
|
+
const ka = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Q.Separator, { ref: s, className: d("-mx-1 h-px bg-border", e), ...t }));
|
|
2161
|
+
ka.displayName = Q.Separator.displayName;
|
|
2162
|
+
const Sa = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2134
2163
|
Q.Item,
|
|
2135
2164
|
{
|
|
2136
2165
|
ref: s,
|
|
@@ -2141,11 +2170,11 @@ const Na = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2141
2170
|
...t
|
|
2142
2171
|
}
|
|
2143
2172
|
));
|
|
2144
|
-
|
|
2145
|
-
const
|
|
2146
|
-
|
|
2147
|
-
const
|
|
2148
|
-
|
|
2173
|
+
Sa.displayName = Q.Item.displayName;
|
|
2174
|
+
const ja = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
2175
|
+
ja.displayName = "CommandShortcut";
|
|
2176
|
+
const Bi = D.Root, _i = D.Trigger, Ri = D.Group, Pi = D.Portal, Ti = D.Sub, Ii = D.RadioGroup, Aa = f.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2177
|
+
D.SubTrigger,
|
|
2149
2178
|
{
|
|
2150
2179
|
ref: n,
|
|
2151
2180
|
className: d(
|
|
@@ -2156,13 +2185,13 @@ const Ai = M.Root, Ci = M.Trigger, _i = M.Group, Bi = M.Portal, Ri = M.Sub, Ti =
|
|
|
2156
2185
|
...o,
|
|
2157
2186
|
children: [
|
|
2158
2187
|
s,
|
|
2159
|
-
/* @__PURE__ */ a.jsx(
|
|
2188
|
+
/* @__PURE__ */ a.jsx(nt, { className: "ml-auto h-4 w-4" })
|
|
2160
2189
|
]
|
|
2161
2190
|
}
|
|
2162
2191
|
));
|
|
2163
|
-
|
|
2164
|
-
const
|
|
2165
|
-
|
|
2192
|
+
Aa.displayName = D.SubTrigger.displayName;
|
|
2193
|
+
const Ca = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2194
|
+
D.SubContent,
|
|
2166
2195
|
{
|
|
2167
2196
|
ref: s,
|
|
2168
2197
|
className: d(
|
|
@@ -2172,9 +2201,9 @@ const Sa = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2172
2201
|
...t
|
|
2173
2202
|
}
|
|
2174
2203
|
));
|
|
2175
|
-
|
|
2176
|
-
const
|
|
2177
|
-
|
|
2204
|
+
Ca.displayName = D.SubContent.displayName;
|
|
2205
|
+
const Ba = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(D.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
2206
|
+
D.Content,
|
|
2178
2207
|
{
|
|
2179
2208
|
ref: s,
|
|
2180
2209
|
className: d(
|
|
@@ -2184,9 +2213,9 @@ const Aa = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(M.P
|
|
|
2184
2213
|
...t
|
|
2185
2214
|
}
|
|
2186
2215
|
) }));
|
|
2187
|
-
|
|
2188
|
-
const
|
|
2189
|
-
|
|
2216
|
+
Ba.displayName = D.Content.displayName;
|
|
2217
|
+
const _a = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2218
|
+
D.Item,
|
|
2190
2219
|
{
|
|
2191
2220
|
ref: o,
|
|
2192
2221
|
className: d(
|
|
@@ -2197,9 +2226,9 @@ const Ca = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */
|
|
|
2197
2226
|
...s
|
|
2198
2227
|
}
|
|
2199
2228
|
));
|
|
2200
|
-
|
|
2201
|
-
const
|
|
2202
|
-
|
|
2229
|
+
_a.displayName = D.Item.displayName;
|
|
2230
|
+
const Ra = f.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2231
|
+
D.CheckboxItem,
|
|
2203
2232
|
{
|
|
2204
2233
|
ref: n,
|
|
2205
2234
|
className: d(
|
|
@@ -2209,14 +2238,14 @@ const _a = m.forwardRef(({ className: e, children: t, checked: s, ...o }, n) =>
|
|
|
2209
2238
|
checked: s,
|
|
2210
2239
|
...o,
|
|
2211
2240
|
children: [
|
|
2212
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
2241
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(D.ItemIndicator, { children: /* @__PURE__ */ a.jsx(ze, { className: "h-4 w-4" }) }) }),
|
|
2213
2242
|
t
|
|
2214
2243
|
]
|
|
2215
2244
|
}
|
|
2216
2245
|
));
|
|
2217
|
-
|
|
2218
|
-
const
|
|
2219
|
-
|
|
2246
|
+
Ra.displayName = D.CheckboxItem.displayName;
|
|
2247
|
+
const Pa = f.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
2248
|
+
D.RadioItem,
|
|
2220
2249
|
{
|
|
2221
2250
|
ref: o,
|
|
2222
2251
|
className: d(
|
|
@@ -2225,29 +2254,29 @@ const Ba = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
2225
2254
|
),
|
|
2226
2255
|
...s,
|
|
2227
2256
|
children: [
|
|
2228
|
-
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(
|
|
2257
|
+
/* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(D.ItemIndicator, { children: /* @__PURE__ */ a.jsx(at, { className: "h-4 w-4 fill-current" }) }) }),
|
|
2229
2258
|
t
|
|
2230
2259
|
]
|
|
2231
2260
|
}
|
|
2232
2261
|
));
|
|
2233
|
-
|
|
2234
|
-
const
|
|
2235
|
-
|
|
2262
|
+
Pa.displayName = D.RadioItem.displayName;
|
|
2263
|
+
const Ta = f.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2264
|
+
D.Label,
|
|
2236
2265
|
{
|
|
2237
2266
|
ref: o,
|
|
2238
2267
|
className: d("px-2 py-1.5 text-sm font-semibold text-foreground", t && "pl-8", e),
|
|
2239
2268
|
...s
|
|
2240
2269
|
}
|
|
2241
2270
|
));
|
|
2242
|
-
|
|
2243
|
-
const
|
|
2244
|
-
|
|
2245
|
-
const
|
|
2246
|
-
|
|
2247
|
-
const
|
|
2271
|
+
Ta.displayName = D.Label.displayName;
|
|
2272
|
+
const Ia = f.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(D.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-border", e), ...t }));
|
|
2273
|
+
Ia.displayName = D.Separator.displayName;
|
|
2274
|
+
const Ma = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("span", { className: d("ml-auto text-xs tracking-widest text-muted-foreground", e), ...t });
|
|
2275
|
+
Ma.displayName = "ContextMenuShortcut";
|
|
2276
|
+
const Da = (e) => {
|
|
2248
2277
|
try {
|
|
2249
2278
|
const t = document.getElementById("icon-picker-field"), s = document.createElement("div");
|
|
2250
|
-
|
|
2279
|
+
Xs.render(/* @__PURE__ */ a.jsx(Qs, { value: e }), s), t.appendChild(s), s.hidden = !0;
|
|
2251
2280
|
let o = s.innerHTML;
|
|
2252
2281
|
setTimeout(() => t.removeChild(s), 100);
|
|
2253
2282
|
const i = new DOMParser().parseFromString(o, "image/svg+xml"), r = i.querySelector("svg");
|
|
@@ -2255,10 +2284,10 @@ const Ia = (e) => {
|
|
|
2255
2284
|
} catch (t) {
|
|
2256
2285
|
return console.error(t), "";
|
|
2257
2286
|
}
|
|
2258
|
-
},
|
|
2287
|
+
}, Mi = ({ value: e, onChange: t }) => {
|
|
2259
2288
|
const s = (o) => {
|
|
2260
2289
|
t("<svg />");
|
|
2261
|
-
const n =
|
|
2290
|
+
const n = Da(o);
|
|
2262
2291
|
t(n);
|
|
2263
2292
|
};
|
|
2264
2293
|
return /* @__PURE__ */ a.jsxs("div", { className: "mt-1 flex h-20 items-center gap-x-2", id: "icon-picker-field", children: [
|
|
@@ -2273,7 +2302,7 @@ const Ia = (e) => {
|
|
|
2273
2302
|
}
|
|
2274
2303
|
),
|
|
2275
2304
|
/* @__PURE__ */ a.jsx(
|
|
2276
|
-
|
|
2305
|
+
Ys,
|
|
2277
2306
|
{
|
|
2278
2307
|
value: e ? "BiSolidGrid" : null,
|
|
2279
2308
|
onChange: s,
|
|
@@ -2309,7 +2338,7 @@ const Ia = (e) => {
|
|
|
2309
2338
|
}
|
|
2310
2339
|
)
|
|
2311
2340
|
] });
|
|
2312
|
-
},
|
|
2341
|
+
}, Ea = tt.lazy(() => import("./UnsplashImages-qvwFbV-E.js")), Oa = tt.lazy(() => import("./UploadImages-9NapgXBq.js")), As = ({
|
|
2313
2342
|
isModalView: e = !1,
|
|
2314
2343
|
onSelect: t = () => {
|
|
2315
2344
|
}
|
|
@@ -2317,29 +2346,29 @@ const Ia = (e) => {
|
|
|
2317
2346
|
const [s, o] = Ce("upload");
|
|
2318
2347
|
return /* @__PURE__ */ a.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
2319
2348
|
/* @__PURE__ */ a.jsx("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: /* @__PURE__ */ a.jsx("h1", { className: "px-1 font-semibold", children: e ? "Select or upload images" : "Images" }) }),
|
|
2320
|
-
/* @__PURE__ */ a.jsxs(
|
|
2321
|
-
/* @__PURE__ */ a.jsxs(
|
|
2322
|
-
/* @__PURE__ */ a.jsx(
|
|
2323
|
-
/* @__PURE__ */ a.jsx(
|
|
2349
|
+
/* @__PURE__ */ a.jsxs(_n, { value: s, onValueChange: (n) => o(n), className: "flex h-full w-full flex-col py-2", children: [
|
|
2350
|
+
/* @__PURE__ */ a.jsxs(bs, { className: "w-full", children: [
|
|
2351
|
+
/* @__PURE__ */ a.jsx(Ze, { value: "upload", className: "w-1/2", children: "Upload" }),
|
|
2352
|
+
/* @__PURE__ */ a.jsx(Ze, { value: "unsplash", className: "w-1/2", children: "Unsplash" })
|
|
2324
2353
|
] }),
|
|
2325
|
-
s === "unsplash" ? /* @__PURE__ */ a.jsx(
|
|
2354
|
+
s === "unsplash" ? /* @__PURE__ */ a.jsx(et, { value: "unsplash", className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ a.jsx(yt, { fallback: /* @__PURE__ */ a.jsx("div", { className: "h-64 w-full animate-pulse bg-gray-100" }), children: /* @__PURE__ */ a.jsx(Ea, { isModalView: e, onSelect: t }) }) }) : /* @__PURE__ */ a.jsx(et, { value: "upload", className: "flex h-full flex-col overflow-hidden", children: /* @__PURE__ */ a.jsx(yt, { fallback: /* @__PURE__ */ a.jsx("div", { className: "h-64 w-full animate-pulse bg-gray-100" }), children: /* @__PURE__ */ a.jsx(Oa, { isModalView: e, onSelect: t }) }) })
|
|
2326
2355
|
] })
|
|
2327
2356
|
] });
|
|
2328
|
-
},
|
|
2357
|
+
}, Di = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2329
2358
|
__proto__: null,
|
|
2330
|
-
default:
|
|
2331
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2359
|
+
default: As
|
|
2360
|
+
}, Symbol.toStringTag, { value: "Module" })), Mt = ({ children: e, onSelect: t }) => {
|
|
2332
2361
|
const [s, o] = Ce(!1), n = (...i) => {
|
|
2333
2362
|
t.call(void 0, ...i), o(!1);
|
|
2334
2363
|
};
|
|
2335
|
-
return /* @__PURE__ */ a.jsxs(
|
|
2336
|
-
/* @__PURE__ */ a.jsx(
|
|
2337
|
-
/* @__PURE__ */ a.jsx(xt, { className: "flex h-3/4 max-w-5xl", children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ a.jsx(
|
|
2364
|
+
return /* @__PURE__ */ a.jsxs(fs, { open: s, onOpenChange: (i) => o(i), children: [
|
|
2365
|
+
/* @__PURE__ */ a.jsx(mn, { asChild: !0, children: e }),
|
|
2366
|
+
/* @__PURE__ */ a.jsx(xt, { className: "flex h-3/4 max-w-5xl", children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ a.jsx(As, { isModalView: !0, onSelect: n }) }) })
|
|
2338
2367
|
] });
|
|
2339
|
-
},
|
|
2340
|
-
e ? /* @__PURE__ */ a.jsx("img", { src: e, className: "h-20 w-20 overflow-hidden rounded-md border object-cover", alt: "" }) : /* @__PURE__ */ a.jsx(
|
|
2368
|
+
}, Ei = ({ value: e, onChange: t, id: s, onBlur: o }) => /* @__PURE__ */ a.jsxs("div", { className: "mt-1.5 flex items-center gap-x-3", children: [
|
|
2369
|
+
e ? /* @__PURE__ */ a.jsx("img", { src: e, className: "h-20 w-20 overflow-hidden rounded-md border object-cover", alt: "" }) : /* @__PURE__ */ a.jsx(Mt, { onSelect: t, children: /* @__PURE__ */ a.jsx("div", { className: "h-20 w-20 cursor-pointer rounded-md border bg-[radial-gradient(#AAA,transparent_1px)] duration-300 [background-size:10px_10px] hover:border-gray-400" }) }),
|
|
2341
2370
|
/* @__PURE__ */ a.jsxs("div", { className: "flex w-3/5 flex-col", children: [
|
|
2342
|
-
/* @__PURE__ */ a.jsx(
|
|
2371
|
+
/* @__PURE__ */ a.jsx(Mt, { onSelect: t, children: /* @__PURE__ */ a.jsx("small", { className: "cursor-pointer rounded-full bg-gray-600 px-2 py-1 text-center text-xs text-white hover:bg-gray-500 dark:bg-gray-700", children: e || !Be(e) ? "Replace Image" : "Choose Image" }) }),
|
|
2343
2372
|
/* @__PURE__ */ a.jsx("small", { className: "-pl-4 pt-2 text-center text-xs text-gray-600", children: "OR" }),
|
|
2344
2373
|
/* @__PURE__ */ a.jsx(
|
|
2345
2374
|
"input",
|
|
@@ -2353,7 +2382,7 @@ const Ia = (e) => {
|
|
|
2353
2382
|
}
|
|
2354
2383
|
)
|
|
2355
2384
|
] })
|
|
2356
|
-
] }),
|
|
2385
|
+
] }), Oi = ({ id: e, placeholder: t, value: s, onChange: o, onBlur: n }) => {
|
|
2357
2386
|
const i = {
|
|
2358
2387
|
toolbar: [
|
|
2359
2388
|
["bold", "italic", "underline", "strike", "blockquote"],
|
|
@@ -2377,7 +2406,7 @@ const Ia = (e) => {
|
|
|
2377
2406
|
"image"
|
|
2378
2407
|
];
|
|
2379
2408
|
return typeof window > "u" ? null : /* @__PURE__ */ a.jsx(
|
|
2380
|
-
|
|
2409
|
+
Zs,
|
|
2381
2410
|
{
|
|
2382
2411
|
id: e,
|
|
2383
2412
|
value: s,
|
|
@@ -2389,8 +2418,8 @@ const Ia = (e) => {
|
|
|
2389
2418
|
className: "mt-1 rounded-md"
|
|
2390
2419
|
}
|
|
2391
2420
|
);
|
|
2392
|
-
},
|
|
2393
|
-
const [o, n] = Ce([]), i =
|
|
2421
|
+
}, Li = ({ schema: e, formData: t, onChange: s }) => {
|
|
2422
|
+
const [o, n] = Ce([]), i = ve("getPages", () => []), { type: r = "page", href: c = "", target: p = "self" } = t;
|
|
2394
2423
|
return Ae(() => {
|
|
2395
2424
|
(async () => {
|
|
2396
2425
|
const l = await i();
|
|
@@ -2415,7 +2444,7 @@ const Ia = (e) => {
|
|
|
2415
2444
|
onChange: (l) => s({ ...t, href: l.target.value }),
|
|
2416
2445
|
children: [
|
|
2417
2446
|
/* @__PURE__ */ a.jsx("option", { value: "", children: "Choose page" }),
|
|
2418
|
-
|
|
2447
|
+
I(o, (l) => /* @__PURE__ */ a.jsx("option", { value: l.slug, children: l.name }, l.uuid))
|
|
2419
2448
|
]
|
|
2420
2449
|
}
|
|
2421
2450
|
) : /* @__PURE__ */ a.jsx(
|
|
@@ -2442,50 +2471,50 @@ const Ia = (e) => {
|
|
|
2442
2471
|
] })
|
|
2443
2472
|
] })
|
|
2444
2473
|
] });
|
|
2445
|
-
},
|
|
2446
|
-
const [e] =
|
|
2474
|
+
}, zi = () => {
|
|
2475
|
+
const [e] = we(), [, t] = $e(), { addBlocks: s } = he(), { toast: o } = vs(), n = $(
|
|
2447
2476
|
(r, c, p) => {
|
|
2448
2477
|
var v;
|
|
2449
|
-
for (let
|
|
2450
|
-
const { _id: L } = r[
|
|
2451
|
-
r[
|
|
2452
|
-
const
|
|
2453
|
-
for (let
|
|
2454
|
-
|
|
2478
|
+
for (let j = 0; j < r.length; j++) {
|
|
2479
|
+
const { _id: L } = r[j];
|
|
2480
|
+
r[j]._id = de();
|
|
2481
|
+
const F = E(r, { _parent: L });
|
|
2482
|
+
for (let B = 0; B < F.length; B++)
|
|
2483
|
+
F[B]._parent = r[j]._id;
|
|
2455
2484
|
}
|
|
2456
|
-
const l =
|
|
2457
|
-
let
|
|
2458
|
-
return c && (
|
|
2485
|
+
const l = ee(r);
|
|
2486
|
+
let m, N;
|
|
2487
|
+
return c && (m = oe(e, { _id: c }), r[0]._parent = c, N = c), !(m ? _t(m._type, l._type) : !0) && m && (r[0]._parent = m._parent, N = m._parent), s(r, N, p), t([(v = ee(r)) == null ? void 0 : v._id]), ee(r);
|
|
2459
2488
|
},
|
|
2460
2489
|
[e, t]
|
|
2461
2490
|
);
|
|
2462
|
-
return { addCoreBlock:
|
|
2491
|
+
return { addCoreBlock: $(
|
|
2463
2492
|
(r, c, p) => {
|
|
2464
2493
|
if (pe(r, "blocks")) {
|
|
2465
|
-
const
|
|
2466
|
-
return n(
|
|
2494
|
+
const B = r.blocks;
|
|
2495
|
+
return n(B, c, p);
|
|
2467
2496
|
}
|
|
2468
|
-
const l = de(),
|
|
2469
|
-
|
|
2470
|
-
if (
|
|
2471
|
-
const
|
|
2497
|
+
const l = de(), m = os(r.props), N = [];
|
|
2498
|
+
$t(m, (B, T) => {
|
|
2499
|
+
if (Ft(B, Je)) {
|
|
2500
|
+
const G = B.replace(Je, "");
|
|
2472
2501
|
N.push({
|
|
2473
|
-
_id:
|
|
2502
|
+
_id: G,
|
|
2474
2503
|
_type: "Slot",
|
|
2475
2504
|
_parent: l,
|
|
2476
|
-
_name: r.props[
|
|
2477
|
-
_styles: r.props[
|
|
2478
|
-
_emptyStyles: r.props[
|
|
2505
|
+
_name: r.props[T].name,
|
|
2506
|
+
_styles: r.props[T].styles,
|
|
2507
|
+
_emptyStyles: r.props[T].emptyStyles
|
|
2479
2508
|
});
|
|
2480
2509
|
}
|
|
2481
2510
|
});
|
|
2482
|
-
const
|
|
2511
|
+
const S = {
|
|
2483
2512
|
_type: r.type,
|
|
2484
2513
|
_id: l,
|
|
2485
|
-
...
|
|
2514
|
+
...m
|
|
2486
2515
|
};
|
|
2487
|
-
let v,
|
|
2488
|
-
if (c && (v =
|
|
2516
|
+
let v, j;
|
|
2517
|
+
if (c && (v = oe(e, { _id: c }), S._parent = c, j = c), !ko(v == null ? void 0 : v._type, r.type)) {
|
|
2489
2518
|
o({
|
|
2490
2519
|
variant: "destructive",
|
|
2491
2520
|
title: "Error",
|
|
@@ -2493,30 +2522,30 @@ const Ia = (e) => {
|
|
|
2493
2522
|
}), t([]);
|
|
2494
2523
|
return;
|
|
2495
2524
|
}
|
|
2496
|
-
!(v ?
|
|
2497
|
-
const
|
|
2498
|
-
return s(
|
|
2525
|
+
!(v ? _t(v._type, r.type) : !0) && v && (S._parent = v._parent, j = v._parent);
|
|
2526
|
+
const F = [S, ...N];
|
|
2527
|
+
return s(F, j, p), t([S._id]), S;
|
|
2499
2528
|
},
|
|
2500
2529
|
[n, e, t]
|
|
2501
2530
|
), addPredefinedBlock: n };
|
|
2502
|
-
},
|
|
2531
|
+
}, Dt = {
|
|
2503
2532
|
xs: 420,
|
|
2504
2533
|
sm: 620,
|
|
2505
2534
|
md: 768,
|
|
2506
2535
|
lg: 1024,
|
|
2507
2536
|
xl: 1280,
|
|
2508
2537
|
"2xl": 1536
|
|
2509
|
-
},
|
|
2510
|
-
function
|
|
2538
|
+
}, Et = ["xs", "sm", "md", "lg", "xl", "2xl"];
|
|
2539
|
+
function La(e, t) {
|
|
2511
2540
|
if (t === null)
|
|
2512
2541
|
return "baseClasses";
|
|
2513
2542
|
const s = t.mq;
|
|
2514
2543
|
if (s === "xs" || t.dark || t.mod !== "")
|
|
2515
2544
|
return "classes";
|
|
2516
|
-
let o = "baseClasses", n =
|
|
2545
|
+
let o = "baseClasses", n = Et.indexOf(s);
|
|
2517
2546
|
for (; n > 0; ) {
|
|
2518
|
-
const i =
|
|
2519
|
-
if (
|
|
2547
|
+
const i = Et[n - 1];
|
|
2548
|
+
if (oe(e, {
|
|
2520
2549
|
mq: i,
|
|
2521
2550
|
property: t.property
|
|
2522
2551
|
})) {
|
|
@@ -2527,67 +2556,67 @@ function Ea(e, t) {
|
|
|
2527
2556
|
}
|
|
2528
2557
|
return o;
|
|
2529
2558
|
}
|
|
2530
|
-
const
|
|
2531
|
-
function
|
|
2559
|
+
const Ot = [];
|
|
2560
|
+
function za(e = "", t = "", s = []) {
|
|
2532
2561
|
e = e.trim().replace(/ +/g, "");
|
|
2533
|
-
let o =
|
|
2534
|
-
|
|
2535
|
-
(l) => !
|
|
2536
|
-
), n =
|
|
2537
|
-
n =
|
|
2562
|
+
let o = E(
|
|
2563
|
+
I(e.split(" "), Ie),
|
|
2564
|
+
(l) => !Ke(l)
|
|
2565
|
+
), n = E(I(t.split(" "), Ie), (l) => !Ke(l));
|
|
2566
|
+
n = E(
|
|
2538
2567
|
n,
|
|
2539
|
-
(l) => !Y(
|
|
2568
|
+
(l) => !Y(Ot, l.property)
|
|
2540
2569
|
);
|
|
2541
2570
|
const i = [], r = [];
|
|
2542
2571
|
ce(s, (l) => {
|
|
2543
|
-
const
|
|
2544
|
-
if (N && (o =
|
|
2572
|
+
const m = Ie(l), N = oe(o, wt(m, ["dark", "mq", "mod", "property"]));
|
|
2573
|
+
if (N && (o = E(
|
|
2545
2574
|
o,
|
|
2546
|
-
(
|
|
2547
|
-
)), i.push(
|
|
2548
|
-
const
|
|
2549
|
-
N && (n =
|
|
2575
|
+
(S) => S.fullCls !== (N == null ? void 0 : N.fullCls)
|
|
2576
|
+
)), i.push(m), m.mq === "xs" && !m.dark && m.mod === "" && (n = E(n, (S) => S.property !== m.property)), La(o, m) === "baseClasses" && !Y(Ot, m.property)) {
|
|
2577
|
+
const S = oe(n, wt(m, ["property"]));
|
|
2578
|
+
N && (n = E(
|
|
2550
2579
|
n,
|
|
2551
|
-
(v) => v.fullCls !== (
|
|
2580
|
+
(v) => v.fullCls !== (S == null ? void 0 : S.fullCls)
|
|
2552
2581
|
)), r.push({
|
|
2553
|
-
...
|
|
2554
|
-
fullCls:
|
|
2582
|
+
...m,
|
|
2583
|
+
fullCls: m.cls,
|
|
2555
2584
|
mq: "xs"
|
|
2556
2585
|
});
|
|
2557
2586
|
}
|
|
2558
2587
|
});
|
|
2559
|
-
const c =
|
|
2560
|
-
|
|
2588
|
+
const c = I(
|
|
2589
|
+
Nt([...o, ...i], (l) => Dt[l.mq]),
|
|
2561
2590
|
"fullCls"
|
|
2562
2591
|
).join(" ");
|
|
2563
|
-
return `${
|
|
2564
|
-
|
|
2592
|
+
return `${I(
|
|
2593
|
+
Nt([...n, ...r], (l) => Dt[l.mq]),
|
|
2565
2594
|
"fullCls"
|
|
2566
2595
|
).join(" ").trim()},${c.trim()}`.trim().replace(/ +/g, "");
|
|
2567
2596
|
}
|
|
2568
|
-
const
|
|
2569
|
-
|
|
2570
|
-
const
|
|
2571
|
-
const t = e.replace(
|
|
2597
|
+
const Pe = w([]);
|
|
2598
|
+
Pe.debugLabel = "selectedStylingBlocksAtom";
|
|
2599
|
+
const Va = () => O(Pe), $a = (e) => {
|
|
2600
|
+
const t = e.replace(fe, "").split(",");
|
|
2572
2601
|
return { baseClasses: t[0], classes: t[1] };
|
|
2573
|
-
},
|
|
2574
|
-
const n =
|
|
2575
|
-
e(
|
|
2602
|
+
}, Fa = w(null, (e, t, { blockIds: s, newClasses: o }) => {
|
|
2603
|
+
const n = E(
|
|
2604
|
+
e(it),
|
|
2576
2605
|
(r) => (
|
|
2577
2606
|
// @ts-ignore
|
|
2578
2607
|
s.includes(e(r)._id)
|
|
2579
2608
|
)
|
|
2580
|
-
), i =
|
|
2581
|
-
return
|
|
2582
|
-
const c = e(r), p =
|
|
2609
|
+
), i = ee(e(Pe));
|
|
2610
|
+
return I(n, (r) => {
|
|
2611
|
+
const c = e(r), p = J(c, i.prop, `${fe},`), { baseClasses: l, classes: m } = $a(p);
|
|
2583
2612
|
return {
|
|
2584
2613
|
ids: [c._id],
|
|
2585
|
-
props: { [i.prop]: `${
|
|
2614
|
+
props: { [i.prop]: `${fe}${za(m, l, o)}` }
|
|
2586
2615
|
};
|
|
2587
2616
|
});
|
|
2588
|
-
}),
|
|
2589
|
-
const e = _e(
|
|
2590
|
-
return
|
|
2617
|
+
}), Vi = () => {
|
|
2618
|
+
const e = _e(Fa), { updateBlocks: t, updateBlocksRuntime: s } = he();
|
|
2619
|
+
return $(
|
|
2591
2620
|
(o, n, i = !1) => {
|
|
2592
2621
|
const r = e({ blockIds: o, newClasses: n });
|
|
2593
2622
|
if (!i) {
|
|
@@ -2598,131 +2627,131 @@ const La = () => E(Re), za = (e) => {
|
|
|
2598
2627
|
},
|
|
2599
2628
|
[e]
|
|
2600
2629
|
);
|
|
2601
|
-
},
|
|
2602
|
-
const t = e(
|
|
2603
|
-
return
|
|
2604
|
-
}),
|
|
2605
|
-
const [e, t] =
|
|
2630
|
+
}, Ua = () => O(ss), Cs = Re("canvasWidth", 800), Bs = w((e) => {
|
|
2631
|
+
const t = e(Cs);
|
|
2632
|
+
return Us(t).toLowerCase();
|
|
2633
|
+
}), $i = () => {
|
|
2634
|
+
const [e, t] = O(Cs), s = te(Bs), [o, n] = Ua();
|
|
2606
2635
|
return Ae(() => {
|
|
2607
2636
|
o !== "xs" && n(s);
|
|
2608
2637
|
}, [s, o, n]), [e, s, t];
|
|
2609
|
-
},
|
|
2610
|
-
const [e, t] =
|
|
2638
|
+
}, Wa = Re("canvasZoom", 100), Fi = () => O(Wa), _s = w([]), Ga = () => {
|
|
2639
|
+
const [e, t] = O(_s), s = _e(vt), o = $(
|
|
2611
2640
|
(n) => {
|
|
2612
2641
|
t(n), s([]);
|
|
2613
2642
|
},
|
|
2614
2643
|
[t, s]
|
|
2615
2644
|
);
|
|
2616
2645
|
return [e, o];
|
|
2617
|
-
},
|
|
2618
|
-
const [e, t] =
|
|
2646
|
+
}, vt = w([]), Ui = () => {
|
|
2647
|
+
const [e, t] = O(vt), s = _e(_s), o = $(
|
|
2619
2648
|
(n) => {
|
|
2620
2649
|
t(n), s([]);
|
|
2621
2650
|
},
|
|
2622
2651
|
[t, s]
|
|
2623
2652
|
);
|
|
2624
2653
|
return [e, o];
|
|
2625
|
-
},
|
|
2626
|
-
const [e, t] =
|
|
2654
|
+
}, Rs = Re("darkMode", !1), Wi = () => {
|
|
2655
|
+
const [e, t] = O(Rs);
|
|
2627
2656
|
return [e, t];
|
|
2628
|
-
},
|
|
2629
|
-
const [e] =
|
|
2630
|
-
return
|
|
2657
|
+
}, Ha = () => {
|
|
2658
|
+
const [e] = we(), [, t] = $e(), { addBlocks: s } = he();
|
|
2659
|
+
return $(
|
|
2631
2660
|
(o, n = null) => {
|
|
2632
2661
|
const i = [];
|
|
2633
2662
|
ce(o, (r) => {
|
|
2634
|
-
const c = e.find((
|
|
2663
|
+
const c = e.find((S) => S._id === r);
|
|
2635
2664
|
n || (n = c._parent);
|
|
2636
|
-
const
|
|
2665
|
+
const m = E(
|
|
2637
2666
|
e,
|
|
2638
|
-
(
|
|
2639
|
-
).indexOf(c) + 1, N =
|
|
2640
|
-
s(N, n,
|
|
2667
|
+
(S) => zt(n) ? S._parent === n : !c._parent
|
|
2668
|
+
).indexOf(c) + 1, N = So(e, r, n);
|
|
2669
|
+
s(N, n, m), i.push(J(N, "0._id", ""));
|
|
2641
2670
|
}), t(i);
|
|
2642
2671
|
},
|
|
2643
2672
|
[e, t]
|
|
2644
2673
|
);
|
|
2645
|
-
},
|
|
2646
|
-
const [e, t] =
|
|
2674
|
+
}, qa = w([]), Gi = () => {
|
|
2675
|
+
const [e, t] = O(qa), s = $(
|
|
2647
2676
|
(o) => {
|
|
2648
|
-
t((n) => Y(n, o) ?
|
|
2677
|
+
t((n) => Y(n, o) ? Vt(n, o) : [...n, o]);
|
|
2649
2678
|
},
|
|
2650
2679
|
[t]
|
|
2651
2680
|
);
|
|
2652
2681
|
return [e, t, s];
|
|
2653
|
-
},
|
|
2654
|
-
const e =
|
|
2655
|
-
return
|
|
2682
|
+
}, Ka = w(""), Ja = () => O(Ka), Ya = () => {
|
|
2683
|
+
const e = te(ie);
|
|
2684
|
+
return $(
|
|
2656
2685
|
(t, s) => {
|
|
2657
|
-
const o =
|
|
2686
|
+
const o = I(e, (n) => (Y(t, J(n, "_id")) && Se(n, "_parent", s), n));
|
|
2658
2687
|
console.log("newBlocks", o);
|
|
2659
2688
|
},
|
|
2660
2689
|
[e]
|
|
2661
2690
|
);
|
|
2662
|
-
},
|
|
2691
|
+
}, Hi = () => {
|
|
2663
2692
|
console.warn("usePasteBlocks is not implemented");
|
|
2664
|
-
const e =
|
|
2693
|
+
const e = te(vt), [t, s] = Ga(), o = Ha(), n = Ya();
|
|
2665
2694
|
return {
|
|
2666
|
-
canPaste:
|
|
2695
|
+
canPaste: Vs(
|
|
2667
2696
|
() => t.length > 0 || e.length > 0,
|
|
2668
2697
|
[e, t]
|
|
2669
2698
|
),
|
|
2670
|
-
pasteBlocks:
|
|
2699
|
+
pasteBlocks: $(
|
|
2671
2700
|
(r) => {
|
|
2672
|
-
|
|
2701
|
+
Be(e) ? n(t, r) : o(e, r), s(() => []);
|
|
2673
2702
|
},
|
|
2674
2703
|
[t, e, o, n, s]
|
|
2675
2704
|
)
|
|
2676
2705
|
};
|
|
2677
|
-
},
|
|
2678
|
-
const [e, t] =
|
|
2706
|
+
}, Qa = w(!1), qi = () => {
|
|
2707
|
+
const [e, t] = O(Qa);
|
|
2679
2708
|
return [e, t];
|
|
2680
|
-
},
|
|
2681
|
-
const n =
|
|
2682
|
-
e(
|
|
2709
|
+
}, Xa = w(null, (e, t, { blockIds: s, fullClasses: o }) => {
|
|
2710
|
+
const n = ee(e(Pe)), i = E(
|
|
2711
|
+
e(it),
|
|
2683
2712
|
(r) => (
|
|
2684
2713
|
// @ts-ignore
|
|
2685
2714
|
s.includes(e(r)._id)
|
|
2686
2715
|
)
|
|
2687
2716
|
);
|
|
2688
|
-
return
|
|
2717
|
+
return I(i, (r) => {
|
|
2689
2718
|
const c = e(r), p = o;
|
|
2690
|
-
let { classes: l, baseClasses:
|
|
2719
|
+
let { classes: l, baseClasses: m } = No(J(c, n.prop, "styles:,"));
|
|
2691
2720
|
return ce(p, (N) => {
|
|
2692
|
-
const
|
|
2693
|
-
l = l.replace(
|
|
2694
|
-
const v =
|
|
2721
|
+
const S = new RegExp(`(^| )${N.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
|
|
2722
|
+
l = l.replace(S, " ").replace(/ +/g, " ").trim();
|
|
2723
|
+
const v = ee(N.split(":"));
|
|
2695
2724
|
Y(["2xl", "xl", "lg", "md", "sm"], v) && p.push(N.split(":").pop().trim());
|
|
2696
2725
|
}), ce(p, (N) => {
|
|
2697
|
-
const
|
|
2698
|
-
|
|
2726
|
+
const S = new RegExp(`(^| )${N.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
|
|
2727
|
+
m = m.replace(S, " ").replace(/ +/g, " ").trim();
|
|
2699
2728
|
}), {
|
|
2700
2729
|
ids: [c._id],
|
|
2701
2730
|
props: {
|
|
2702
|
-
[n.prop]: `${
|
|
2731
|
+
[n.prop]: `${fe}${m},${l}`
|
|
2703
2732
|
}
|
|
2704
2733
|
};
|
|
2705
2734
|
});
|
|
2706
|
-
}),
|
|
2707
|
-
const { updateBlocks: e } =
|
|
2708
|
-
return
|
|
2735
|
+
}), Ki = () => {
|
|
2736
|
+
const { updateBlocks: e } = he(), t = _e(Xa);
|
|
2737
|
+
return $(
|
|
2709
2738
|
(s, o) => {
|
|
2710
2739
|
const n = t({ blockIds: s, fullClasses: o });
|
|
2711
2740
|
e(s, n[0].props);
|
|
2712
2741
|
},
|
|
2713
2742
|
[t]
|
|
2714
2743
|
);
|
|
2715
|
-
},
|
|
2716
|
-
const t =
|
|
2717
|
-
if (!t || t.blockId !==
|
|
2744
|
+
}, Ps = w((e) => {
|
|
2745
|
+
const t = ee(e(Pe)), s = e(dt);
|
|
2746
|
+
if (!t || t.blockId !== J(s, "_id", null))
|
|
2718
2747
|
return [];
|
|
2719
|
-
const n =
|
|
2720
|
-
return
|
|
2721
|
-
}),
|
|
2722
|
-
const t = e(
|
|
2723
|
-
let i =
|
|
2724
|
-
return
|
|
2725
|
-
}),
|
|
2748
|
+
const n = J(s, t.prop, `${fe},`).replace(fe, "").split(",").join(" ");
|
|
2749
|
+
return E(I(n.trim().split(" "), Ie), (i) => !Ke(i));
|
|
2750
|
+
}), Ji = () => te(Ps), Lt = { xs: 0, sm: 1, md: 2, lg: 3, xl: 4, "2xl": 5 }, Za = w((e) => {
|
|
2751
|
+
const t = e(Bs), s = e(ut), o = e(Rs), n = er(t);
|
|
2752
|
+
let i = E(e(Ps), { mod: s });
|
|
2753
|
+
return Ft(s, "_") || (i = E(i, (r) => n.includes(r.mq))), i = i.sort((r, c) => Lt[r.mq] - Lt[c.mq]), o || (i = E(i, { dark: !1 })), i;
|
|
2754
|
+
}), er = (e) => {
|
|
2726
2755
|
let t = [];
|
|
2727
2756
|
switch (e) {
|
|
2728
2757
|
case "xs":
|
|
@@ -2748,37 +2777,37 @@ const La = () => E(Re), za = (e) => {
|
|
|
2748
2777
|
break;
|
|
2749
2778
|
}
|
|
2750
2779
|
return t;
|
|
2751
|
-
},
|
|
2752
|
-
const { updateBlocks: e } =
|
|
2753
|
-
return
|
|
2780
|
+
}, Yi = () => te(Za), Qi = () => O(ut), Xi = () => {
|
|
2781
|
+
const { updateBlocks: e } = he();
|
|
2782
|
+
return $(
|
|
2754
2783
|
(t, s, o) => {
|
|
2755
2784
|
e(t, s, o);
|
|
2756
2785
|
},
|
|
2757
2786
|
[e]
|
|
2758
2787
|
);
|
|
2759
|
-
},
|
|
2760
|
-
const { updateBlocksRuntime: e } =
|
|
2761
|
-
return
|
|
2788
|
+
}, Zi = () => {
|
|
2789
|
+
const { updateBlocksRuntime: e } = he();
|
|
2790
|
+
return $(
|
|
2762
2791
|
(t, s) => {
|
|
2763
2792
|
e(t, s);
|
|
2764
2793
|
},
|
|
2765
2794
|
[e]
|
|
2766
2795
|
);
|
|
2767
|
-
},
|
|
2796
|
+
}, Ts = {
|
|
2768
2797
|
name: "",
|
|
2769
2798
|
props: {},
|
|
2770
2799
|
modalProps: {},
|
|
2771
2800
|
backdropClose: !0
|
|
2772
|
-
},
|
|
2773
|
-
const [e, t] =
|
|
2801
|
+
}, tr = w(Ts), el = () => {
|
|
2802
|
+
const [e, t] = O(tr), s = $(
|
|
2774
2803
|
(n, i = {}, r = {}) => {
|
|
2775
2804
|
t({ name: n, props: i, modalProps: r });
|
|
2776
2805
|
},
|
|
2777
2806
|
[t]
|
|
2778
|
-
), o =
|
|
2807
|
+
), o = $(
|
|
2779
2808
|
(...n) => {
|
|
2780
|
-
|
|
2781
|
-
})(...n), t(
|
|
2809
|
+
J(e, "props.onClose", () => {
|
|
2810
|
+
})(...n), t(Ts);
|
|
2782
2811
|
},
|
|
2783
2812
|
[t, e]
|
|
2784
2813
|
);
|
|
@@ -2787,47 +2816,47 @@ const La = () => E(Re), za = (e) => {
|
|
|
2787
2816
|
openModal: s,
|
|
2788
2817
|
closeModal: o
|
|
2789
2818
|
};
|
|
2790
|
-
},
|
|
2791
|
-
|
|
2792
|
-
const
|
|
2793
|
-
|
|
2794
|
-
const
|
|
2795
|
-
|
|
2796
|
-
const
|
|
2797
|
-
|
|
2798
|
-
const
|
|
2799
|
-
|
|
2800
|
-
const
|
|
2801
|
-
|
|
2802
|
-
const
|
|
2803
|
-
|
|
2804
|
-
const
|
|
2805
|
-
|
|
2806
|
-
const
|
|
2807
|
-
|
|
2808
|
-
const
|
|
2809
|
-
|
|
2810
|
-
const lr = w("");
|
|
2811
|
-
lr.debugLabel = "inlineEditingActiveAtom";
|
|
2812
|
-
const cr = w(!1);
|
|
2813
|
-
cr.debugLabel = "draggingFlagAtom";
|
|
2819
|
+
}, tl = () => (console.warn("useAllBlocks is deprecated, use useBlocksStore() instead"), te(ie)), Is = w(!1);
|
|
2820
|
+
Is.debugLabel = "readOnlyModeAtom";
|
|
2821
|
+
const sr = w("online");
|
|
2822
|
+
sr.debugLabel = "networkModeAtom";
|
|
2823
|
+
const or = w(!1);
|
|
2824
|
+
or.debugLabel = "codeEditorOpenAtom";
|
|
2825
|
+
const nr = w(!1);
|
|
2826
|
+
nr.debugLabel = "editLayerNameAtom";
|
|
2827
|
+
const ar = w("");
|
|
2828
|
+
ar.debugLabel = "activeLanguageAtom";
|
|
2829
|
+
const rr = w("");
|
|
2830
|
+
rr.debugLabel = "primaryLanguageAtom";
|
|
2831
|
+
const ir = w(null);
|
|
2832
|
+
ir.debugLabel = "canvasIframeAtom";
|
|
2833
|
+
const lr = w("outline");
|
|
2834
|
+
lr.debugLabel = "activePanelAtom";
|
|
2835
|
+
const cr = w("");
|
|
2836
|
+
cr.debugLabel = "showPredefinedBlockCategoryAtom";
|
|
2837
|
+
const Ms = w({ undoCount: 0, redoCount: 0 });
|
|
2838
|
+
Ms.debugLabel = "historyStatesAtom";
|
|
2814
2839
|
const dr = w("");
|
|
2815
|
-
dr.debugLabel = "
|
|
2816
|
-
const
|
|
2817
|
-
|
|
2840
|
+
dr.debugLabel = "inlineEditingActiveAtom";
|
|
2841
|
+
const ur = w(!1);
|
|
2842
|
+
ur.debugLabel = "draggingFlagAtom";
|
|
2843
|
+
const fr = w("");
|
|
2844
|
+
fr.debugLabel = "draggedBlockIdAtom";
|
|
2845
|
+
const sl = () => te(Is), mr = w(""), pr = w(null), ol = () => O(mr), nl = () => O(pr), gr = Re("selectedBreakpoints", ["XS", "MD", "XL"]), al = () => {
|
|
2846
|
+
const [e, t] = O(gr);
|
|
2818
2847
|
return [e, t];
|
|
2819
|
-
},
|
|
2820
|
-
const e = _e(
|
|
2848
|
+
}, rl = () => {
|
|
2849
|
+
const e = _e(Ms), { clear: t } = cs(), [, s] = $e(), [, o] = Ja(), [, n] = Va();
|
|
2821
2850
|
return () => {
|
|
2822
2851
|
s([]), n([]), o(""), t(), e({ undoCount: 0, redoCount: 0 });
|
|
2823
2852
|
};
|
|
2824
|
-
},
|
|
2825
|
-
const [e, t] = Ce(!1), [s, o] =
|
|
2853
|
+
}, br = w([]), il = () => {
|
|
2854
|
+
const [e, t] = Ce(!1), [s, o] = O(br), n = ve("getUILibraryBlocks", () => []);
|
|
2826
2855
|
return Ae(() => {
|
|
2827
2856
|
(async () => s.length > 0 || (t(!0), o(await n()), t(!1)))();
|
|
2828
2857
|
}, []), { data: s, isLoading: e };
|
|
2829
|
-
},
|
|
2830
|
-
const [e, t] = Ce(null), s =
|
|
2858
|
+
}, ll = () => {
|
|
2859
|
+
const [e, t] = Ce(null), s = $(async (o) => {
|
|
2831
2860
|
if (!(navigator != null && navigator.clipboard))
|
|
2832
2861
|
return console.warn("Clipboard not supported"), !1;
|
|
2833
2862
|
try {
|
|
@@ -2839,213 +2868,213 @@ const el = () => ee(Rs), ur = w(""), mr = w(null), tl = () => E(ur), sl = () =>
|
|
|
2839
2868
|
return [e, s];
|
|
2840
2869
|
};
|
|
2841
2870
|
export {
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2871
|
+
Yi as $,
|
|
2872
|
+
Xr as A,
|
|
2873
|
+
Yo as B,
|
|
2874
|
+
gt as C,
|
|
2875
|
+
$r as D,
|
|
2876
|
+
we as E,
|
|
2877
|
+
ns as F,
|
|
2878
|
+
Jt as G,
|
|
2879
|
+
ls as H,
|
|
2880
|
+
ji as I,
|
|
2881
|
+
sl as J,
|
|
2882
|
+
el as K,
|
|
2883
|
+
zi as L,
|
|
2884
|
+
Vi as M,
|
|
2885
|
+
$i as N,
|
|
2886
|
+
Fi as O,
|
|
2887
|
+
Ui as P,
|
|
2888
|
+
ll as Q,
|
|
2889
|
+
Lo as R,
|
|
2890
|
+
Ai as S,
|
|
2891
|
+
ti as T,
|
|
2892
|
+
Ga as U,
|
|
2893
|
+
Wi as V,
|
|
2894
|
+
Fo as W,
|
|
2895
|
+
Gi as X,
|
|
2896
|
+
Ja as Y,
|
|
2897
|
+
Hi as Z,
|
|
2898
|
+
Ki as _,
|
|
2899
|
+
Zr as a,
|
|
2900
|
+
wa as a$,
|
|
2901
|
+
Ji as a0,
|
|
2902
|
+
Gr as a1,
|
|
2903
|
+
Ua as a2,
|
|
2904
|
+
il as a3,
|
|
2905
|
+
Qi as a4,
|
|
2906
|
+
Xi as a5,
|
|
2907
|
+
Zi as a6,
|
|
2908
|
+
Wr as a7,
|
|
2909
|
+
tl as a8,
|
|
2910
|
+
ol as a9,
|
|
2911
|
+
da as aA,
|
|
2912
|
+
An as aB,
|
|
2913
|
+
Jo as aC,
|
|
2914
|
+
ui as aD,
|
|
2915
|
+
fi as aE,
|
|
2916
|
+
Un as aF,
|
|
2917
|
+
vi as aG,
|
|
2918
|
+
yi as aH,
|
|
2919
|
+
oa as aI,
|
|
2920
|
+
ia as aJ,
|
|
2921
|
+
la as aK,
|
|
2922
|
+
aa as aL,
|
|
2923
|
+
he as aM,
|
|
2924
|
+
ur as aN,
|
|
2925
|
+
dr as aO,
|
|
2926
|
+
nr as aP,
|
|
2927
|
+
fr as aQ,
|
|
2928
|
+
Fr as aR,
|
|
2929
|
+
Ur as aS,
|
|
2930
|
+
sr as aT,
|
|
2931
|
+
ir as aU,
|
|
2932
|
+
ni as aV,
|
|
2933
|
+
ai as aW,
|
|
2934
|
+
Pn as aX,
|
|
2935
|
+
js as aY,
|
|
2936
|
+
va as aZ,
|
|
2937
|
+
ya as a_,
|
|
2938
|
+
nl as aa,
|
|
2939
|
+
al as ab,
|
|
2940
|
+
Va as ac,
|
|
2941
|
+
fs as ad,
|
|
2913
2942
|
xt as ae,
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
2943
|
+
pn as af,
|
|
2944
|
+
bn as ag,
|
|
2945
|
+
hn as ah,
|
|
2946
|
+
un as ai,
|
|
2947
|
+
mi as aj,
|
|
2948
|
+
Wn as ak,
|
|
2949
|
+
gi as al,
|
|
2950
|
+
Gn as am,
|
|
2951
|
+
qn as an,
|
|
2952
|
+
mn as ao,
|
|
2953
|
+
si as ap,
|
|
2954
|
+
oi as aq,
|
|
2955
|
+
Rn as ar,
|
|
2956
|
+
Qr as as,
|
|
2957
|
+
lr as at,
|
|
2958
|
+
_n as au,
|
|
2959
|
+
bs as av,
|
|
2960
|
+
Ze as aw,
|
|
2961
|
+
et as ax,
|
|
2962
|
+
pi as ay,
|
|
2963
|
+
Hn as az,
|
|
2964
|
+
an as b,
|
|
2965
|
+
Qn as b$,
|
|
2966
|
+
Na as b0,
|
|
2967
|
+
Sa as b1,
|
|
2968
|
+
gn as b2,
|
|
2969
|
+
Pt as b3,
|
|
2970
|
+
Rt as b4,
|
|
2971
|
+
Oi as b5,
|
|
2972
|
+
Mi as b6,
|
|
2973
|
+
Ei as b7,
|
|
2974
|
+
Li as b8,
|
|
2975
|
+
Yr as b9,
|
|
2976
|
+
qo as bA,
|
|
2977
|
+
ht as bB,
|
|
2978
|
+
on as bC,
|
|
2979
|
+
nn as bD,
|
|
2980
|
+
yn as bE,
|
|
2981
|
+
gs as bF,
|
|
2982
|
+
Tn as bG,
|
|
2983
|
+
ri as bH,
|
|
2984
|
+
In as bI,
|
|
2985
|
+
En as bJ,
|
|
2986
|
+
On as bK,
|
|
2987
|
+
$n as bL,
|
|
2988
|
+
Vn as bM,
|
|
2989
|
+
Ln as bN,
|
|
2990
|
+
di as bO,
|
|
2991
|
+
zn as bP,
|
|
2992
|
+
li as bQ,
|
|
2993
|
+
Dn as bR,
|
|
2994
|
+
Mn as bS,
|
|
2995
|
+
ii as bT,
|
|
2996
|
+
ci as bU,
|
|
2997
|
+
Fn as bV,
|
|
2998
|
+
Kn as bW,
|
|
2999
|
+
bi as bX,
|
|
3000
|
+
hi as bY,
|
|
3001
|
+
xi as bZ,
|
|
3002
|
+
Yn as b_,
|
|
3003
|
+
Qo as ba,
|
|
3004
|
+
Xo as bb,
|
|
3005
|
+
Zo as bc,
|
|
3006
|
+
Sn as bd,
|
|
3007
|
+
ei as be,
|
|
3008
|
+
Bn as bf,
|
|
3009
|
+
wi as bg,
|
|
3010
|
+
na as bh,
|
|
3011
|
+
ca as bi,
|
|
3012
|
+
xn as bj,
|
|
3013
|
+
vn as bk,
|
|
3014
|
+
wn as bl,
|
|
3015
|
+
Nn as bm,
|
|
3016
|
+
Cn as bn,
|
|
3017
|
+
kn as bo,
|
|
3018
|
+
tn as bp,
|
|
3019
|
+
sn as bq,
|
|
3020
|
+
cr as br,
|
|
3021
|
+
_a as bs,
|
|
3022
|
+
Ba as bt,
|
|
3023
|
+
Bi as bu,
|
|
3024
|
+
_i as bv,
|
|
3025
|
+
_t as bw,
|
|
3026
|
+
jo as bx,
|
|
3027
|
+
qr as by,
|
|
3028
|
+
Ko as bz,
|
|
3029
|
+
rn as c,
|
|
3030
|
+
Xn as c0,
|
|
3031
|
+
Zn as c1,
|
|
3032
|
+
ea as c2,
|
|
3033
|
+
ra as c3,
|
|
3034
|
+
Ni as c4,
|
|
3035
|
+
ki as c5,
|
|
3036
|
+
sa as c6,
|
|
3037
|
+
ta as c7,
|
|
3038
|
+
Si as c8,
|
|
3039
|
+
pa as c9,
|
|
3040
|
+
vs as ca,
|
|
3041
|
+
ga as cb,
|
|
3042
|
+
Ci as cc,
|
|
3043
|
+
ja as cd,
|
|
3044
|
+
ka as ce,
|
|
3045
|
+
Ra as cf,
|
|
3046
|
+
Pa as cg,
|
|
3047
|
+
Ta as ch,
|
|
3048
|
+
Ia as ci,
|
|
3049
|
+
Ma as cj,
|
|
3050
|
+
Ri as ck,
|
|
3051
|
+
Pi as cl,
|
|
3052
|
+
Ti as cm,
|
|
3053
|
+
Ca as cn,
|
|
3054
|
+
Aa as co,
|
|
3055
|
+
Ii as cp,
|
|
3056
|
+
Di as cq,
|
|
3057
|
+
cn as d,
|
|
3058
|
+
dn as e,
|
|
3059
|
+
ln as f,
|
|
3060
|
+
fn as g,
|
|
3061
|
+
ve as h,
|
|
3062
|
+
qt as i,
|
|
3063
|
+
zr as j,
|
|
3064
|
+
no as k,
|
|
3065
|
+
ae as l,
|
|
3066
|
+
fo as m,
|
|
3067
|
+
uo as n,
|
|
3068
|
+
Re as o,
|
|
3069
|
+
Vr as p,
|
|
3070
|
+
qi as q,
|
|
3071
|
+
$e as r,
|
|
3072
|
+
Jr as s,
|
|
3073
|
+
Ha as t,
|
|
3074
|
+
rl as u,
|
|
3075
|
+
cs as v,
|
|
3076
|
+
ie as w,
|
|
3077
|
+
wo as x,
|
|
3078
|
+
Uo as y,
|
|
3079
|
+
Kr as z
|
|
3051
3080
|
};
|