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