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