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