@chaibuilder/sdk 1.2.19 → 1.2.21

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