@janbox/storefront-builder 2.0.25 → 2.0.27

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 (104) hide show
  1. package/README.md +44 -0
  2. package/dist/components/composer/composer.d.ts +4 -0
  3. package/dist/components/composer/index.d.ts +1 -4
  4. package/dist/{index-C9gD44fK.js → composer-I1-nDI_3.js} +1 -1
  5. package/dist/editor/components/image-gallery-dialog.d.ts +9 -0
  6. package/dist/editor/components/image-source-selection.d.ts +3 -2
  7. package/dist/editor/components/index.d.ts +1 -0
  8. package/dist/editor/hooks/use-editor.d.ts +3 -0
  9. package/dist/editor/lib/index.d.ts +4 -1
  10. package/dist/editor/related/button/index.d.ts +1 -0
  11. package/dist/editor/related/image/index.d.ts +1 -0
  12. package/dist/editor/types/index.d.ts +11 -0
  13. package/dist/editor/ui/cascader/cascader.d.ts +41 -0
  14. package/dist/editor/ui/cascader/index.d.ts +1 -0
  15. package/dist/editor/ui/date-picker/date-picker.d.ts +7 -18
  16. package/dist/editor/ui/index.d.ts +1 -0
  17. package/dist/editor.js +1107 -966
  18. package/dist/hooks/use-toggle.d.ts +2 -0
  19. package/dist/index-BQy3TapM.js +4 -0
  20. package/dist/index.js +69 -70
  21. package/dist/lib/inline/index.d.ts +0 -1
  22. package/dist/style.css +1 -1
  23. package/dist/templates.js +80 -92
  24. package/dist/theme.js +109 -0
  25. package/dist/{toaster-CzSp838P.js → toaster-DzezW7No.js} +8937 -8753
  26. package/dist/utils/internal.d.ts +0 -0
  27. package/package.json +6 -5
  28. package/dist/index-CglXRxzd.js +0 -4
  29. /package/dist/{lib → editor/related}/accordion-group/accordion-group.inspector/accordion-group.inspector.d.ts +0 -0
  30. /package/dist/{lib → editor/related}/accordion-group/accordion-group.inspector/accordion-items-field.d.ts +0 -0
  31. /package/dist/{lib → editor/related}/accordion-group/accordion-group.inspector/expand-icon-field.d.ts +0 -0
  32. /package/dist/{lib → editor/related}/accordion-group/accordion-group.inspector/index.d.ts +0 -0
  33. /package/dist/{lib → editor/related}/accordion-group/accordion-group.inspector/open-mode-field.d.ts +0 -0
  34. /package/dist/{lib → editor/related}/box/box.inspector/box.inspector.d.ts +0 -0
  35. /package/dist/{lib → editor/related}/box/box.inspector/index.d.ts +0 -0
  36. /package/dist/{lib → editor/related}/button/button.inspector/button.inspector.d.ts +0 -0
  37. /package/dist/{lib → editor/related}/button/button.inspector/index.d.ts +0 -0
  38. /package/dist/{lib → editor/related}/button/button.inspector/link-field.d.ts +0 -0
  39. /package/dist/{lib → editor/related}/button/button.inspector/size-field.d.ts +0 -0
  40. /package/dist/{lib → editor/related}/button/button.inspector/variant-field.d.ts +0 -0
  41. /package/dist/{lib → editor/related}/cell/cell.inspector/cell.inspector.d.ts +0 -0
  42. /package/dist/{lib → editor/related}/cell/cell.inspector/col-span-field.d.ts +0 -0
  43. /package/dist/{lib → editor/related}/cell/cell.inspector/index.d.ts +0 -0
  44. /package/dist/{lib → editor/related}/container/container.inspector/container.inspector.d.ts +0 -0
  45. /package/dist/{lib → editor/related}/container/container.inspector/index.d.ts +0 -0
  46. /package/dist/{lib → editor/related}/count-up/count-up.inspector/count-up.inspector.d.ts +0 -0
  47. /package/dist/{lib → editor/related}/count-up/count-up.inspector/index.d.ts +0 -0
  48. /package/dist/{lib → editor/related}/countdown-timer/countdown-timer.inspector/caption-style-fields.d.ts +0 -0
  49. /package/dist/{lib → editor/related}/countdown-timer/countdown-timer.inspector/countdown-timer.inspector.d.ts +0 -0
  50. /package/dist/{lib → editor/related}/countdown-timer/countdown-timer.inspector/index.d.ts +0 -0
  51. /package/dist/{lib → editor/related}/countdown-timer/countdown-timer.inspector/time-style-fields.d.ts +0 -0
  52. /package/dist/{lib → editor/related}/countdown-timer/countdown-timer.inspector/unit-item-style-fields.d.ts +0 -0
  53. /package/dist/{lib → editor/related}/countdown-timer/countdown-timer.inspector/units-field.d.ts +0 -0
  54. /package/dist/{lib → editor/related}/flex-item/flex-item.inspector/auto-grow-field.d.ts +0 -0
  55. /package/dist/{lib → editor/related}/flex-item/flex-item.inspector/auto-shrink-field.d.ts +0 -0
  56. /package/dist/{lib → editor/related}/flex-item/flex-item.inspector/flex-item.inspector.d.ts +0 -0
  57. /package/dist/{lib → editor/related}/flex-item/flex-item.inspector/index.d.ts +0 -0
  58. /package/dist/{lib → editor/related}/flexbox/flexbox.inspector/direction-field.d.ts +0 -0
  59. /package/dist/{lib → editor/related}/flexbox/flexbox.inspector/flexbox.inspector.d.ts +0 -0
  60. /package/dist/{lib → editor/related}/flexbox/flexbox.inspector/index.d.ts +0 -0
  61. /package/dist/{lib → editor/related}/grid/grid.inspector/grid.inspector.d.ts +0 -0
  62. /package/dist/{lib → editor/related}/grid/grid.inspector/index.d.ts +0 -0
  63. /package/dist/{lib → editor/related}/heading/heading.inspector/heading.inspector.d.ts +0 -0
  64. /package/dist/{lib → editor/related}/heading/heading.inspector/index.d.ts +0 -0
  65. /package/dist/{lib → editor/related}/heading/heading.toolbar/heading.toolbar.d.ts +0 -0
  66. /package/dist/{lib → editor/related}/heading/heading.toolbar/index.d.ts +0 -0
  67. /package/dist/{lib → editor/related}/icon/icon.inspector/icon.inspector.d.ts +0 -0
  68. /package/dist/{lib → editor/related}/icon/icon.inspector/index.d.ts +0 -0
  69. /package/dist/{lib → editor/related}/image/image.inspector/alt-text-field.d.ts +0 -0
  70. /package/dist/{lib → editor/related}/image/image.inspector/image.inspector.d.ts +0 -0
  71. /package/dist/{lib → editor/related}/image/image.inspector/index.d.ts +0 -0
  72. /package/dist/{lib → editor/related}/image/image.inspector/preload-field.d.ts +0 -0
  73. /package/dist/{lib → editor/related}/image/image.inspector/proportion-field.d.ts +0 -0
  74. /package/dist/{lib → editor/related}/image/image.inspector/source-field.d.ts +0 -0
  75. /package/dist/{lib → editor/related}/inline/inline.inspector/index.d.ts +0 -0
  76. /package/dist/{lib → editor/related}/inline/inline.inspector/inline.inspector.d.ts +0 -0
  77. /package/dist/{lib → editor/related}/link/link.inspector/destination-field.d.ts +0 -0
  78. /package/dist/{lib → editor/related}/link/link.inspector/index.d.ts +0 -0
  79. /package/dist/{lib → editor/related}/link/link.inspector/link.inspector.d.ts +0 -0
  80. /package/dist/{lib → editor/related}/link/link.inspector/rel-field.d.ts +0 -0
  81. /package/dist/{lib → editor/related}/link/link.toolbar/index.d.ts +0 -0
  82. /package/dist/{lib → editor/related}/link/link.toolbar/link.toolbar.d.ts +0 -0
  83. /package/dist/{lib → editor/related}/marquee/marquee.inspector/index.d.ts +0 -0
  84. /package/dist/{lib → editor/related}/marquee/marquee.inspector/marquee.inspector.d.ts +0 -0
  85. /package/dist/{lib → editor/related}/marquee/marquee.inspector/play-state-field.d.ts +0 -0
  86. /package/dist/{lib → editor/related}/paragraph/paragraph.inspector/index.d.ts +0 -0
  87. /package/dist/{lib → editor/related}/paragraph/paragraph.inspector/paragraph.inspector.d.ts +0 -0
  88. /package/dist/{lib → editor/related}/paragraph/paragraph.toolbar/index.d.ts +0 -0
  89. /package/dist/{lib → editor/related}/paragraph/paragraph.toolbar/paragraph.toolbar.d.ts +0 -0
  90. /package/dist/{lib → editor/related}/rating/rating.inspector/index.d.ts +0 -0
  91. /package/dist/{lib → editor/related}/rating/rating.inspector/rating.inspector.d.ts +0 -0
  92. /package/dist/{lib → editor/related}/swiper/swiper.inspector/autoplay-delay-field.d.ts +0 -0
  93. /package/dist/{lib → editor/related}/swiper/swiper.inspector/autoplay-loop-field.d.ts +0 -0
  94. /package/dist/{lib → editor/related}/swiper/swiper.inspector/index.d.ts +0 -0
  95. /package/dist/{lib → editor/related}/swiper/swiper.inspector/slides-per-view-field.d.ts +0 -0
  96. /package/dist/{lib → editor/related}/swiper/swiper.inspector/swiper.inspector.d.ts +0 -0
  97. /package/dist/{lib → editor/related}/tabs/tabs.inspector/child-tabs-field.d.ts +0 -0
  98. /package/dist/{lib → editor/related}/tabs/tabs.inspector/default-active-field.d.ts +0 -0
  99. /package/dist/{lib → editor/related}/tabs/tabs.inspector/index.d.ts +0 -0
  100. /package/dist/{lib → editor/related}/tabs/tabs.inspector/tabs.inspector.d.ts +0 -0
  101. /package/dist/{lib → editor/related}/unordered-list/unordered-list.inspector/index.d.ts +0 -0
  102. /package/dist/{lib → editor/related}/unordered-list/unordered-list.inspector/unordered-list.inspector.d.ts +0 -0
  103. /package/dist/{lib → editor/related}/video/video.inspector/index.d.ts +0 -0
  104. /package/dist/{lib → editor/related}/video/video.inspector/video.inspector.d.ts +0 -0
package/dist/editor.js CHANGED
@@ -1,25 +1,23 @@
1
- import { jsx as n, jsxs as w, Fragment as Oe } from "@emotion/react/jsx-runtime";
2
- import { aB as gt, aC as ft, aD as bt, aE as f, aF as wt, aG as ce, aH as $, aI as fe, b as Ie, B as Me, a6 as kt, aJ as J, aK as He, aL as mt, aM as W, aN as I, aA as $e, az as Ct, aO as vt, aP as xt, aQ as yt, aR as Tt, aS as It, aT as Mt, aU as St, aV as _e, aW as Et, aX as Lt, aY as Wt, aZ as Nt, a_ as Rt, u as H, a$ as At, b0 as Dt, b1 as oe, m as Bt, i as Pt, G as jt, l as Se, p as Vt, F as Ee, t as Ft, Z as Ot, I as Ht, b2 as $t, s as _t, P as zt, b3 as ze, b4 as Gt, b5 as Ut, b6 as Zt, b7 as Yt, b8 as Xt, b9 as _, ba as Ge, bb as qt, bc as Jt, bd as ke, be as Kt, bf as Qt, bg as en, a5 as Ue, a1 as Ze, bh as Le, bi as tn, N as me, bj as nn, bk as rn, bl as on, a3 as sn, bm as We, bn as an } from "./toaster-CzSp838P.js";
3
- import { bo as So, bp as Eo, bq as Lo, br as Wo, bs as No, bt as Ro, bu as Ao, bv as Do, bw as Bo, bx as Po, by as jo, bz as Vo, bA as Fo, bB as Oo, bC as Ho, bD as $o, bE as _o, bF as zo, bG as Go, bH as Uo, bI as Zo, bJ as Yo, bK as Xo, bL as qo, bM as Jo, bN as Ko, bO as Qo, bP as es, bQ as ts, bR as ns, bS as rs, bT as os, bU as ss, bV as is, bW as as, bX as cs, bY as ls, bZ as ds, b_ as hs, b$ as us, c0 as ps, c1 as gs, c2 as fs, c3 as bs, c4 as ws, c5 as ks, c6 as ms, c7 as Cs, c8 as vs, c9 as xs, ca as ys, cb as Ts, W as Is, cc as Ms, cd as Ss, ce as Es, cf as Ls, cg as Ws } from "./toaster-CzSp838P.js";
4
- import { throttle as cn, isFunction as Ne, isNumber as se, isNil as ee, isEqual as ln } from "lodash-es";
5
- import { useImperativeHandle as dn, useMemo as hn, isValidElement as un, useState as P, useRef as G, useEffect as V, Fragment as ie, Suspense as pn, createElement as Ye, useCallback as gn } from "react";
1
+ import { jsxs as b, jsx as r, Fragment as ct } from "@emotion/react/jsx-runtime";
2
+ import { aA as zt, aB as I, aC as Pe, aD as we, ax as _t, aE as Gt, aF as U, b as Ye, B as Ze, a5 as Ut, aG as ae, aH as dt, aI as Yt, aJ as A, az as ht, ay as Zt, aK as Xt, aL as qt, aM as Jt, aN as Kt, aO as Qt, aP as er, aQ as tr, aR as rr, aS as nr, aT as or, aU as sr, aV as ir, u as G, aW as ar, aX as lr, aY as me, m as cr, i as dr, G as hr, l as Xe, p as ur, F as qe, t as pr, Y as gr, I as fr, aZ as br, s as wr, P as mr, a_ as ut, a$ as Be, b0 as kr, b1 as vr, b2 as Cr, b3 as xr, b4 as yr, b5 as X, b6 as pt, b7 as Tr, b8 as Sr, b9 as Ir, ba as Mr, bb as Er, a4 as gt, a0 as ft, bc as Je, bd as Lr, be as Rr, N as je, bf as Wr, bg as Nr, bh as Ar, a2 as Dr, bi as Ke, bj as Pr } from "./toaster-DzezW7No.js";
3
+ import { bk as Xo, bl as qo, bm as Jo, bn as Ko, bo as Qo, bp as es, bq as ts, br as rs, bs as ns, bt as os, bu as ss, bv as is, bw as as, bx as ls, by as cs, bz as ds, bA as hs, bB as us, bC as ps, bD as gs, bE as fs, bF as bs, bG as ws, bH as ms, bI as ks, bJ as vs, bK as Cs, bL as xs, bM as ys, bN as Ts, bO as Ss, bP as Is, bQ as Ms, bR as Es, bS as Ls, bT as Rs, bU as Ws, bV as Ns, bW as As, bX as Ds, bY as Ps, bZ as Bs, b_ as js, b$ as Vs, c0 as Os, c1 as Fs, c2 as $s, c3 as Hs, c4 as zs, c5 as _s, c6 as Gs, c7 as Us, c8 as Ys, c9 as Zs, ca as Xs, cb as qs, cc as Js, cd as Ks, W as Qs, ce as ei, cf as ti, cg as ri, ch as ni, ci as oi } from "./toaster-DzezW7No.js";
4
+ import { isNil as $, isUndefined as Br, throttle as jr, isFunction as Qe, isNumber as ke, isEqual as Vr } from "lodash-es";
5
+ import { useState as j, useCallback as oe, useMemo as et, Fragment as J, isValidElement as Or, useRef as K, useEffect as z, Suspense as Fr, createElement as bt } from "react";
6
6
  import "flat";
7
- import { FLOATING_Z_INDEX as Xe, ThemeProvider as fn, breakpoint as bn, createTheme as Re } from "@janbox/storefront-ui/theme";
8
- import "@janbox/storefront-ui/hooks";
9
- import { CacheProvider as wn, Global as kn, createElement as mn } from "@emotion/react";
10
- import { useFloatingParentNodeId as Cn, FloatingTree as vn, useFloating as le, autoUpdate as de, offset as qe, size as Je, flip as Ce, useClick as xn, useHover as Ke, useFocus as Qe, useDismiss as et, useRole as tt, useInteractions as nt, safePolygon as yn, FloatingPortal as he } from "@floating-ui/react";
7
+ import { FLOATING_Z_INDEX as We, ThemeProvider as $r, breakpoint as Hr, createTheme as tt } from "@janbox/storefront-ui/theme";
8
+ import { useControllableState as rt } from "@janbox/storefront-ui/hooks";
9
+ import { theme as c, palette as Ne, text as le } from "./theme.js";
10
+ import { CacheProvider as zr, Global as _r, createElement as Gr } from "@emotion/react";
11
+ import { useFloating as Ce, autoUpdate as xe, flip as Ve, offset as wt, size as mt, useClick as Ur, useDismiss as kt, useRole as vt, useInteractions as Ct, FloatingPortal as ce, useHover as Yr, safePolygon as Zr, useFocus as Xr } from "@floating-ui/react";
11
12
  import "react-colorful";
12
13
  import "overlayscrollbars-react";
13
14
  import "@tanstack/react-virtual";
14
- import Tn, { useFrame as ve } from "react-frame-component";
15
+ import qr, { useFrame as Oe } from "react-frame-component";
15
16
  import "react-dropzone";
16
- import "react-datepicker";
17
- import { a as rt, C as In } from "./index-C9gD44fK.js";
17
+ import { a as xt, C as Jr } from "./composer-I1-nDI_3.js";
18
18
  import "@janbox/storefront-ui/utils";
19
- import { useToggle as ot } from "usehooks-ts";
20
- import "@hello-pangea/dnd";
21
19
  import "@janbox/storefront-ui";
22
- class Mn {
20
+ class Kr {
23
21
  constructor() {
24
22
  this.componentControls = /* @__PURE__ */ new Set();
25
23
  }
@@ -47,128 +45,270 @@ class Mn {
47
45
  * @public
48
46
  */
49
47
  start(t, o) {
50
- this.componentControls.forEach((r) => {
51
- r.start(t.nativeEvent || t, o);
48
+ this.componentControls.forEach((n) => {
49
+ n.start(t.nativeEvent || t, o);
52
50
  });
53
51
  }
54
52
  }
55
- const Sn = () => new Mn();
56
- function En() {
57
- return gt(Sn);
53
+ const Qr = () => new Kr();
54
+ function en() {
55
+ return zt(Qr);
58
56
  }
59
- const Ln = (e) => Cn() ? /* @__PURE__ */ n(Ae, { ...e }) : /* @__PURE__ */ n(vn, { children: /* @__PURE__ */ n(Ae, { ...e }) }), Ae = ({
60
- open: e,
61
- placement: t = "bottom",
62
- onOpenChange: o,
63
- dismissProps: r = {
64
- enabled: !1
65
- },
66
- children: i,
67
- clickProps: s = {
68
- enabled: !1
69
- },
70
- focusProps: l = {
71
- enabled: !1
72
- },
73
- hoverProps: a = {
74
- enabled: !1
75
- },
76
- elements: d,
77
- offsetOptions: k = 4,
78
- sizeOptions: h,
79
- autoUpdateOptions: u,
80
- ref: c
81
- }) => {
82
- const p = le({
83
- open: e,
84
- onOpenChange: o,
85
- placement: t,
86
- middleware: [qe(k), Je(h), Ce()],
87
- whileElementsMounted: (...A) => de(...A, u),
88
- elements: d
89
- });
90
- dn(c, () => p, [p]);
91
- const { context: b } = p, g = xn(b, s), x = Ke(b, a), m = Qe(b, l), T = et(b, r), S = tt(b), F = nt([g, T, S, x, m]), j = hn(
92
- () => ({
93
- ...p,
94
- ...F
95
- }),
96
- [p, F]
97
- );
98
- return /* @__PURE__ */ n(ft.Provider, { value: j, children: i });
99
- }, go = ({ width: e = 600, children: t, ...o }) => /* @__PURE__ */ n(
100
- Ln,
101
- {
102
- dismissProps: {
103
- enabled: !0
57
+ const jo = (e) => {
58
+ const {
59
+ innerRef: t,
60
+ placement: o = "bottom-start",
61
+ contentWidth: n,
62
+ visible: i,
63
+ onOpenChange: s,
64
+ dissmiss: d,
65
+ defaultValue: l,
66
+ value: h,
67
+ options: f,
68
+ onChange: u,
69
+ expandTrigger: p = "click",
70
+ changeOnSelect: a = !1,
71
+ placeholder: w,
72
+ allowClear: m = !1,
73
+ displayRender: g,
74
+ separator: y = "/",
75
+ prefix: v,
76
+ suffix: M,
77
+ size: R = "32",
78
+ columnWidth: Y = 180,
79
+ columnMaxHeight: F = 240,
80
+ emptyText: B = "No options",
81
+ ...T
82
+ } = e, [he, Ie] = rt({
83
+ defaultValue: !1,
84
+ value: i
85
+ }), [Z, ue] = rt({
86
+ defaultValue: l,
87
+ value: h ?? void 0
88
+ }), [te, Me] = j([]), Ee = oe((k) => $(k.children) || k.children.length === 0, []), re = et(() => {
89
+ if ($(Z) || Z.length === 0) return [];
90
+ const k = [];
91
+ let S = f;
92
+ for (const E of Z) {
93
+ const H = S?.find((Re) => Re.value === E);
94
+ if ($(H)) break;
95
+ k.push(H), S = H.children;
96
+ }
97
+ return k;
98
+ }, [Z, f]), ze = et(() => {
99
+ const k = [f];
100
+ for (const S of te) {
101
+ if ($(S.children) || S.children.length === 0) break;
102
+ k.push(S.children);
103
+ }
104
+ return k;
105
+ }, [f, te]), _e = oe(
106
+ (k) => {
107
+ const S = k.map((E) => E.value);
108
+ ue(S), u?.(S, k), Ie(!1);
104
109
  },
105
- ...o,
106
- children: /* @__PURE__ */ w(
107
- bt,
110
+ [u, ue, Ie]
111
+ ), Nt = oe(
112
+ (k) => {
113
+ k.stopPropagation(), ue([]), Me([]), u?.([], []);
114
+ },
115
+ [u, ue]
116
+ ), At = oe(
117
+ (k, S) => {
118
+ if (k.disabled) return;
119
+ const E = [...te.slice(0, S), k];
120
+ Me(E), (Ee(k) || a) && _e(E);
121
+ },
122
+ [te, a, _e, Ee]
123
+ ), Dt = (k, S, E) => {
124
+ !k && !E || (k && Me(re), Ie(k), s?.(k, S, E));
125
+ }, { refs: Ge, floatingStyles: Pt, context: Le } = Ce({
126
+ open: he,
127
+ onOpenChange: Dt,
128
+ placement: o,
129
+ middleware: [
130
+ Ve(),
131
+ wt(4),
132
+ mt({
133
+ apply({ elements: k }) {
134
+ const { width: S } = k.reference.getBoundingClientRect(), E = n === "fit-parent" ? S : n, H = {
135
+ zIndex: We
136
+ };
137
+ Br(E) || (H.minWidth = `${E}px`), Object.assign(k.floating.style, H);
138
+ }
139
+ })
140
+ ],
141
+ whileElementsMounted: xe
142
+ }), Bt = Ur(Le), jt = kt(Le, d), Vt = vt(Le), { getReferenceProps: Ot, getFloatingProps: Ft } = Ct([Bt, jt, Vt]), $t = () => {
143
+ if (re.length === 0)
144
+ return /* @__PURE__ */ r("span", { css: { color: c.palette.white["3s"] }, children: w });
145
+ const k = re.map((S) => S.label);
146
+ return g ? g(k, re) : k.map((S, E) => /* @__PURE__ */ b(J, { children: [
147
+ E > 0 && /* @__PURE__ */ b("span", { css: { color: c.palette.white["3s"] }, children: [
148
+ " ",
149
+ y,
150
+ " "
151
+ ] }),
152
+ S
153
+ ] }, E));
154
+ }, Ht = ({ option: k, columnIndex: S }) => {
155
+ const E = Ee(k), H = te[S]?.value === k.value, Re = !$(Z) && Z[S] === k.value && (E || a), Ue = () => At(k, S);
156
+ return /* @__PURE__ */ b(
157
+ "div",
158
+ {
159
+ "aria-hidden": !0,
160
+ onClick: Ue,
161
+ onMouseEnter: p === "hover" && !E && !k.disabled ? Ue : void 0,
162
+ css: [
163
+ {
164
+ padding: 8,
165
+ display: "flex",
166
+ alignItems: "center",
167
+ gap: 8,
168
+ borderRadius: 8,
169
+ cursor: k.disabled ? "not-allowed" : "pointer",
170
+ opacity: k.disabled ? 0.4 : 1,
171
+ ":hover": k.disabled ? void 0 : { backgroundColor: c.palette.white["1s"] }
172
+ },
173
+ H && { backgroundColor: c.palette.black["7s"] }
174
+ ],
175
+ children: [
176
+ /* @__PURE__ */ r("div", { css: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: k.label }),
177
+ Re && /* @__PURE__ */ r(I, { size: 16, source: _t }),
178
+ !E && /* @__PURE__ */ r(I, { size: 16, source: we, css: { transform: "rotate(-90deg)", flexShrink: 0 } })
179
+ ]
180
+ }
181
+ );
182
+ };
183
+ return /* @__PURE__ */ b(J, { children: [
184
+ /* @__PURE__ */ b(
185
+ "button",
108
186
  {
109
- floatingOverlayProps: {
110
- disabled: !1,
111
- lockScroll: !0,
112
- style: {
113
- zIndex: Xe,
114
- display: "grid",
115
- placeItems: "center",
116
- padding: 20
187
+ css: [
188
+ {
189
+ ...c.text.xs,
190
+ height: Number(R),
191
+ display: "inline-flex",
192
+ position: "relative",
193
+ paddingInline: 8,
194
+ borderRadius: 8,
195
+ overflow: "hidden",
196
+ alignItems: "center",
197
+ gap: 8,
198
+ backgroundColor: c.palette.white["1s"],
199
+ color: c.palette.white["6s"],
200
+ "&::after": {
201
+ content: '""',
202
+ position: "absolute",
203
+ inset: 0,
204
+ pointerEvents: "none",
205
+ borderRadius: 8,
206
+ borderWidth: 1,
207
+ borderStyle: "solid",
208
+ borderColor: "transparent"
209
+ }
210
+ },
211
+ he && {
212
+ backgroundColor: c.palette.black["7s"],
213
+ "&::after": {
214
+ content: '""',
215
+ position: "absolute",
216
+ inset: 0,
217
+ pointerEvents: "none",
218
+ borderRadius: 8,
219
+ borderWidth: 1,
220
+ borderStyle: "solid",
221
+ borderColor: c.palette.white["1s"]
222
+ }
117
223
  }
118
- },
119
- css: { display: "flex", overflow: "hidden", flexDirection: "column", maxWidth: "100%", maxHeight: "100%" },
224
+ ],
225
+ ...T,
226
+ ...Ot(),
227
+ ref: Ge.setReference,
120
228
  children: [
121
- /* @__PURE__ */ n(
122
- "div",
229
+ v,
230
+ /* @__PURE__ */ r("div", { css: { flex: 1, textAlign: "left", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: $t() }),
231
+ M ?? (m && re.length > 0 ? /* @__PURE__ */ r(
232
+ "span",
123
233
  {
234
+ role: "button",
235
+ "aria-label": "Clear",
236
+ tabIndex: -1,
237
+ onClick: Nt,
124
238
  css: {
125
- backdropFilter: "blur(2px)",
126
- position: "fixed",
127
- inset: 0,
128
- pointerEvents: "none",
129
- backgroundColor: "rgba(0, 0, 0, 0.4)"
130
- }
239
+ display: "inline-flex",
240
+ flexShrink: 0,
241
+ cursor: "pointer",
242
+ color: c.palette.white["3s"],
243
+ ":hover": { color: c.palette.white["6s"] }
244
+ },
245
+ children: /* @__PURE__ */ r(I, { source: Pe, size: 16 })
131
246
  }
132
- ),
133
- /* @__PURE__ */ n(
134
- "div",
247
+ ) : /* @__PURE__ */ r(
248
+ I,
135
249
  {
136
- css: {
137
- width: e,
138
- display: "flex",
139
- position: "relative",
140
- paddingBlock: 8,
141
- flexDirection: "column",
142
- overflow: "hidden",
143
- borderRadius: 8,
144
- backgroundColor: f.palette.ink["6s"],
145
- maxWidth: "100%",
146
- color: "white"
147
- },
148
- children: t
250
+ source: we,
251
+ css: [{ transition: "transform" }, he && { transform: "rotate(-180deg)" }],
252
+ size: 16
149
253
  }
150
- )
254
+ ))
151
255
  ]
152
256
  }
153
- )
154
- }
155
- ), fo = () => wt(), bo = ({ ref: e, ...t }) => /* @__PURE__ */ n(
156
- ce,
157
- {
158
- css: { paddingBlock: 12, paddingInline: 20, flex: 1, overflow: "auto", ...f.text.xs },
159
- ...t,
160
- ref: e
161
- }
162
- ), wo = ({ required: e, children: t, ...o }) => /* @__PURE__ */ w("div", { css: { marginBottom: 6, display: "flex", width: "fit-content" }, ...o, children: [
163
- un(t) ? t : /* @__PURE__ */ n("label", { children: t }),
164
- e && /* @__PURE__ */ n("span", { css: { color: f.palette.red["6s"] }, children: " *" })
165
- ] }), ko = () => {
166
- const [e, t] = P(0), [o, r] = P(!1), i = G(null), s = (k, h) => {
257
+ ),
258
+ he && /* @__PURE__ */ r(ce, { root: document.body, children: /* @__PURE__ */ r(
259
+ "div",
260
+ {
261
+ ref: Ge.setFloating,
262
+ css: { borderRadius: 8, backgroundColor: c.palette.ink["6s"] },
263
+ style: {
264
+ ...Pt,
265
+ zIndex: We
266
+ },
267
+ ...Ft(),
268
+ children: /* @__PURE__ */ r(
269
+ "div",
270
+ {
271
+ ref: t,
272
+ css: {
273
+ display: "flex",
274
+ padding: 4,
275
+ borderRadius: 8,
276
+ backgroundColor: c.palette.white["1s"],
277
+ color: c.palette.white["6s"],
278
+ ":focus-visible": { outlineStyle: "none" },
279
+ ...c.text.xs
280
+ },
281
+ children: ze.map((k, S) => /* @__PURE__ */ r(
282
+ "div",
283
+ {
284
+ css: {
285
+ width: Y,
286
+ maxHeight: F,
287
+ overflowY: "auto",
288
+ paddingInline: 4,
289
+ borderRightWidth: S < ze.length - 1 ? 1 : 0,
290
+ borderRightStyle: "solid",
291
+ borderRightColor: c.palette.white["1s"]
292
+ },
293
+ children: k.length === 0 ? /* @__PURE__ */ r("div", { css: { padding: 8, color: c.palette.white["3s"] }, children: B }) : k.map((E) => /* @__PURE__ */ r(Ht, { option: E, columnIndex: S }, String(E.value)))
294
+ },
295
+ S
296
+ ))
297
+ }
298
+ )
299
+ }
300
+ ) })
301
+ ] });
302
+ }, Vo = () => Gt(), Oo = ({ required: e, children: t, ...o }) => /* @__PURE__ */ b("div", { css: { marginBottom: 6, display: "flex", width: "fit-content" }, ...o, children: [
303
+ Or(t) ? t : /* @__PURE__ */ r("label", { children: t }),
304
+ e && /* @__PURE__ */ r("span", { css: { color: c.palette.red["6s"] }, children: " *" })
305
+ ] }), Fo = () => {
306
+ const [e, t] = j(0), [o, n] = j(!1), i = K(null), s = (f, u) => {
167
307
  if (!i.current) return 0;
168
- const u = i.current.getBoundingClientRect(), c = u.left + u.width / 2, p = u.top + u.height / 2, b = k - c, g = h - p;
169
- return (Math.atan2(g, b) * (180 / Math.PI) + 360) % 360;
308
+ const p = i.current.getBoundingClientRect(), a = p.left + p.width / 2, w = p.top + p.height / 2, m = f - a, g = u - w;
309
+ return (Math.atan2(g, m) * (180 / Math.PI) + 360) % 360;
170
310
  };
171
- return /* @__PURE__ */ w(
311
+ return /* @__PURE__ */ b(
172
312
  "div",
173
313
  {
174
314
  style: {
@@ -176,37 +316,37 @@ const Ln = (e) => Cn() ? /* @__PURE__ */ n(Ae, { ...e }) : /* @__PURE__ */ n(vn,
176
316
  marginTop: "50px",
177
317
  userSelect: "none"
178
318
  },
179
- onMouseMove: (k) => {
319
+ onMouseMove: (f) => {
180
320
  if (o) {
181
- const h = s(k.clientX, k.clientY);
182
- t(Math.round(h));
321
+ const u = s(f.clientX, f.clientY);
322
+ t(Math.round(u));
183
323
  }
184
324
  },
185
325
  onMouseUp: () => {
186
- r(!1);
326
+ n(!1);
187
327
  },
188
328
  children: [
189
- /* @__PURE__ */ w("h3", { children: [
329
+ /* @__PURE__ */ b("h3", { children: [
190
330
  "Chọn độ: ",
191
331
  e,
192
332
  "°"
193
333
  ] }),
194
- /* @__PURE__ */ w(
334
+ /* @__PURE__ */ b(
195
335
  "svg",
196
336
  {
197
337
  ref: i,
198
338
  width: "200",
199
339
  height: "200",
200
340
  viewBox: "0 0 200 200",
201
- onMouseDown: (k) => {
202
- r(!0);
203
- const h = s(k.clientX, k.clientY);
204
- t(Math.round(h));
341
+ onMouseDown: (f) => {
342
+ n(!0);
343
+ const u = s(f.clientX, f.clientY);
344
+ t(Math.round(u));
205
345
  },
206
346
  style: { cursor: "grab" },
207
347
  children: [
208
- /* @__PURE__ */ n("circle", { cx: "100", cy: "100", r: "90", fill: "#EAEAEA", stroke: "#CCC", strokeWidth: "2" }),
209
- /* @__PURE__ */ n(
348
+ /* @__PURE__ */ r("circle", { cx: "100", cy: "100", r: "90", fill: "#EAEAEA", stroke: "#CCC", strokeWidth: "2" }),
349
+ /* @__PURE__ */ r(
210
350
  "line",
211
351
  {
212
352
  x1: "100",
@@ -217,7 +357,7 @@ const Ln = (e) => Cn() ? /* @__PURE__ */ n(Ae, { ...e }) : /* @__PURE__ */ n(vn,
217
357
  strokeWidth: "2"
218
358
  }
219
359
  ),
220
- /* @__PURE__ */ n(
360
+ /* @__PURE__ */ r(
221
361
  "circle",
222
362
  {
223
363
  cx: 100 + 90 * Math.cos((e - 90) * (Math.PI / 180)),
@@ -234,106 +374,106 @@ const Ln = (e) => Cn() ? /* @__PURE__ */ n(Ae, { ...e }) : /* @__PURE__ */ n(vn,
234
374
  }
235
375
  );
236
376
  };
237
- function Wn(e) {
377
+ function tn(e) {
238
378
  if (e.sheet)
239
379
  return e.sheet;
240
380
  for (var t = 0; t < document.styleSheets.length; t++)
241
381
  if (document.styleSheets[t].ownerNode === e)
242
382
  return document.styleSheets[t];
243
383
  }
244
- function Nn(e) {
384
+ function rn(e) {
245
385
  var t = document.createElement("style");
246
386
  return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
247
387
  }
248
- var Rn = /* @__PURE__ */ (function() {
388
+ var nn = /* @__PURE__ */ (function() {
249
389
  function e(o) {
250
- var r = this;
390
+ var n = this;
251
391
  this._insertTag = function(i) {
252
392
  var s;
253
- r.tags.length === 0 ? r.insertionPoint ? s = r.insertionPoint.nextSibling : r.prepend ? s = r.container.firstChild : s = r.before : s = r.tags[r.tags.length - 1].nextSibling, r.container.insertBefore(i, s), r.tags.push(i);
393
+ n.tags.length === 0 ? n.insertionPoint ? s = n.insertionPoint.nextSibling : n.prepend ? s = n.container.firstChild : s = n.before : s = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(i, s), n.tags.push(i);
254
394
  }, this.isSpeedy = o.speedy === void 0 ? !0 : o.speedy, this.tags = [], this.ctr = 0, this.nonce = o.nonce, this.key = o.key, this.container = o.container, this.prepend = o.prepend, this.insertionPoint = o.insertionPoint, this.before = null;
255
395
  }
256
396
  var t = e.prototype;
257
- return t.hydrate = function(r) {
258
- r.forEach(this._insertTag);
259
- }, t.insert = function(r) {
260
- this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Nn(this));
397
+ return t.hydrate = function(n) {
398
+ n.forEach(this._insertTag);
399
+ }, t.insert = function(n) {
400
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(rn(this));
261
401
  var i = this.tags[this.tags.length - 1];
262
402
  if (this.isSpeedy) {
263
- var s = Wn(i);
403
+ var s = tn(i);
264
404
  try {
265
- s.insertRule(r, s.cssRules.length);
405
+ s.insertRule(n, s.cssRules.length);
266
406
  } catch {
267
407
  }
268
408
  } else
269
- i.appendChild(document.createTextNode(r));
409
+ i.appendChild(document.createTextNode(n));
270
410
  this.ctr++;
271
411
  }, t.flush = function() {
272
- this.tags.forEach(function(r) {
412
+ this.tags.forEach(function(n) {
273
413
  var i;
274
- return (i = r.parentNode) == null ? void 0 : i.removeChild(r);
414
+ return (i = n.parentNode) == null ? void 0 : i.removeChild(n);
275
415
  }), this.tags = [], this.ctr = 0;
276
416
  }, e;
277
- })(), L = "-ms-", ae = "-moz-", C = "-webkit-", st = "comm", xe = "rule", ye = "decl", An = "@import", it = "@keyframes", Dn = "@layer", Bn = Math.abs, ue = String.fromCharCode, Pn = Object.assign;
278
- function jn(e, t) {
279
- return E(e, 0) ^ 45 ? (((t << 2 ^ E(e, 0)) << 2 ^ E(e, 1)) << 2 ^ E(e, 2)) << 2 ^ E(e, 3) : 0;
417
+ })(), N = "-ms-", ve = "-moz-", C = "-webkit-", yt = "comm", Fe = "rule", $e = "decl", on = "@import", Tt = "@keyframes", sn = "@layer", an = Math.abs, ye = String.fromCharCode, ln = Object.assign;
418
+ function cn(e, t) {
419
+ return W(e, 0) ^ 45 ? (((t << 2 ^ W(e, 0)) << 2 ^ W(e, 1)) << 2 ^ W(e, 2)) << 2 ^ W(e, 3) : 0;
280
420
  }
281
- function at(e) {
421
+ function St(e) {
282
422
  return e.trim();
283
423
  }
284
- function Vn(e, t) {
424
+ function dn(e, t) {
285
425
  return (e = t.exec(e)) ? e[0] : e;
286
426
  }
287
- function v(e, t, o) {
427
+ function x(e, t, o) {
288
428
  return e.replace(t, o);
289
429
  }
290
- function be(e, t) {
430
+ function Ae(e, t) {
291
431
  return e.indexOf(t);
292
432
  }
293
- function E(e, t) {
433
+ function W(e, t) {
294
434
  return e.charCodeAt(t) | 0;
295
435
  }
296
- function X(e, t, o) {
436
+ function se(e, t, o) {
297
437
  return e.slice(t, o);
298
438
  }
299
- function D(e) {
439
+ function V(e) {
300
440
  return e.length;
301
441
  }
302
- function Te(e) {
442
+ function He(e) {
303
443
  return e.length;
304
444
  }
305
- function Q(e, t) {
445
+ function pe(e, t) {
306
446
  return t.push(e), e;
307
447
  }
308
- function Fn(e, t) {
448
+ function hn(e, t) {
309
449
  return e.map(t).join("");
310
450
  }
311
- var pe = 1, U = 1, ct = 0, N = 0, M = 0, Z = "";
312
- function ge(e, t, o, r, i, s, l) {
313
- return { value: e, root: t, parent: o, type: r, props: i, children: s, line: pe, column: U, length: l, return: "" };
451
+ var Te = 1, Q = 1, It = 0, D = 0, L = 0, ee = "";
452
+ function Se(e, t, o, n, i, s, d) {
453
+ return { value: e, root: t, parent: o, type: n, props: i, children: s, line: Te, column: Q, length: d, return: "" };
314
454
  }
315
- function Y(e, t) {
316
- return Pn(ge("", null, null, "", null, null, 0), e, { length: -e.length }, t);
455
+ function ne(e, t) {
456
+ return ln(Se("", null, null, "", null, null, 0), e, { length: -e.length }, t);
317
457
  }
318
- function On() {
319
- return M;
458
+ function un() {
459
+ return L;
320
460
  }
321
- function Hn() {
322
- return M = N > 0 ? E(Z, --N) : 0, U--, M === 10 && (U = 1, pe--), M;
461
+ function pn() {
462
+ return L = D > 0 ? W(ee, --D) : 0, Q--, L === 10 && (Q = 1, Te--), L;
323
463
  }
324
- function R() {
325
- return M = N < ct ? E(Z, N++) : 0, U++, M === 10 && (U = 1, pe++), M;
464
+ function P() {
465
+ return L = D < It ? W(ee, D++) : 0, Q++, L === 10 && (Q = 1, Te++), L;
326
466
  }
327
- function B() {
328
- return E(Z, N);
467
+ function O() {
468
+ return W(ee, D);
329
469
  }
330
- function te() {
331
- return N;
470
+ function ge() {
471
+ return D;
332
472
  }
333
- function K(e, t) {
334
- return X(Z, e, t);
473
+ function de(e, t) {
474
+ return se(ee, e, t);
335
475
  }
336
- function q(e) {
476
+ function ie(e) {
337
477
  switch (e) {
338
478
  // \0 \t \n \r \s whitespace token
339
479
  case 0:
@@ -371,254 +511,254 @@ function q(e) {
371
511
  }
372
512
  return 0;
373
513
  }
374
- function lt(e) {
375
- return pe = U = 1, ct = D(Z = e), N = 0, [];
514
+ function Mt(e) {
515
+ return Te = Q = 1, It = V(ee = e), D = 0, [];
376
516
  }
377
- function dt(e) {
378
- return Z = "", e;
517
+ function Et(e) {
518
+ return ee = "", e;
379
519
  }
380
- function ne(e) {
381
- return at(K(N - 1, we(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
520
+ function fe(e) {
521
+ return St(de(D - 1, De(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
382
522
  }
383
- function $n(e) {
384
- for (; (M = B()) && M < 33; )
385
- R();
386
- return q(e) > 2 || q(M) > 3 ? "" : " ";
523
+ function gn(e) {
524
+ for (; (L = O()) && L < 33; )
525
+ P();
526
+ return ie(e) > 2 || ie(L) > 3 ? "" : " ";
387
527
  }
388
- function _n(e, t) {
389
- for (; --t && R() && !(M < 48 || M > 102 || M > 57 && M < 65 || M > 70 && M < 97); )
528
+ function fn(e, t) {
529
+ for (; --t && P() && !(L < 48 || L > 102 || L > 57 && L < 65 || L > 70 && L < 97); )
390
530
  ;
391
- return K(e, te() + (t < 6 && B() == 32 && R() == 32));
531
+ return de(e, ge() + (t < 6 && O() == 32 && P() == 32));
392
532
  }
393
- function we(e) {
394
- for (; R(); )
395
- switch (M) {
533
+ function De(e) {
534
+ for (; P(); )
535
+ switch (L) {
396
536
  // ] ) " '
397
537
  case e:
398
- return N;
538
+ return D;
399
539
  // " '
400
540
  case 34:
401
541
  case 39:
402
- e !== 34 && e !== 39 && we(M);
542
+ e !== 34 && e !== 39 && De(L);
403
543
  break;
404
544
  // (
405
545
  case 40:
406
- e === 41 && we(e);
546
+ e === 41 && De(e);
407
547
  break;
408
548
  // \
409
549
  case 92:
410
- R();
550
+ P();
411
551
  break;
412
552
  }
413
- return N;
553
+ return D;
414
554
  }
415
- function zn(e, t) {
416
- for (; R() && e + M !== 57; )
417
- if (e + M === 84 && B() === 47)
555
+ function bn(e, t) {
556
+ for (; P() && e + L !== 57; )
557
+ if (e + L === 84 && O() === 47)
418
558
  break;
419
- return "/*" + K(t, N - 1) + "*" + ue(e === 47 ? e : R());
559
+ return "/*" + de(t, D - 1) + "*" + ye(e === 47 ? e : P());
420
560
  }
421
- function Gn(e) {
422
- for (; !q(B()); )
423
- R();
424
- return K(e, N);
561
+ function wn(e) {
562
+ for (; !ie(O()); )
563
+ P();
564
+ return de(e, D);
425
565
  }
426
- function Un(e) {
427
- return dt(re("", null, null, null, [""], e = lt(e), 0, [0], e));
566
+ function mn(e) {
567
+ return Et(be("", null, null, null, [""], e = Mt(e), 0, [0], e));
428
568
  }
429
- function re(e, t, o, r, i, s, l, a, d) {
430
- for (var k = 0, h = 0, u = l, c = 0, p = 0, b = 0, g = 1, x = 1, m = 1, T = 0, S = "", F = i, j = s, A = r, y = S; x; )
431
- switch (b = T, T = R()) {
569
+ function be(e, t, o, n, i, s, d, l, h) {
570
+ for (var f = 0, u = 0, p = d, a = 0, w = 0, m = 0, g = 1, y = 1, v = 1, M = 0, R = "", Y = i, F = s, B = n, T = R; y; )
571
+ switch (m = M, M = P()) {
432
572
  // (
433
573
  case 40:
434
- if (b != 108 && E(y, u - 1) == 58) {
435
- be(y += v(ne(T), "&", "&\f"), "&\f") != -1 && (m = -1);
574
+ if (m != 108 && W(T, p - 1) == 58) {
575
+ Ae(T += x(fe(M), "&", "&\f"), "&\f") != -1 && (v = -1);
436
576
  break;
437
577
  }
438
578
  // " ' [
439
579
  case 34:
440
580
  case 39:
441
581
  case 91:
442
- y += ne(T);
582
+ T += fe(M);
443
583
  break;
444
584
  // \t \n \r \s
445
585
  case 9:
446
586
  case 10:
447
587
  case 13:
448
588
  case 32:
449
- y += $n(b);
589
+ T += gn(m);
450
590
  break;
451
591
  // \
452
592
  case 92:
453
- y += _n(te() - 1, 7);
593
+ T += fn(ge() - 1, 7);
454
594
  continue;
455
595
  // /
456
596
  case 47:
457
- switch (B()) {
597
+ switch (O()) {
458
598
  case 42:
459
599
  case 47:
460
- Q(Zn(zn(R(), te()), t, o), d);
600
+ pe(kn(bn(P(), ge()), t, o), h);
461
601
  break;
462
602
  default:
463
- y += "/";
603
+ T += "/";
464
604
  }
465
605
  break;
466
606
  // {
467
607
  case 123 * g:
468
- a[k++] = D(y) * m;
608
+ l[f++] = V(T) * v;
469
609
  // } ; \0
470
610
  case 125 * g:
471
611
  case 59:
472
612
  case 0:
473
- switch (T) {
613
+ switch (M) {
474
614
  // \0 }
475
615
  case 0:
476
616
  case 125:
477
- x = 0;
617
+ y = 0;
478
618
  // ;
479
- case 59 + h:
480
- m == -1 && (y = v(y, /\f/g, "")), p > 0 && D(y) - u && Q(p > 32 ? Be(y + ";", r, o, u - 1) : Be(v(y, " ", "") + ";", r, o, u - 2), d);
619
+ case 59 + u:
620
+ v == -1 && (T = x(T, /\f/g, "")), w > 0 && V(T) - p && pe(w > 32 ? ot(T + ";", n, o, p - 1) : ot(x(T, " ", "") + ";", n, o, p - 2), h);
481
621
  break;
482
622
  // @ ;
483
623
  case 59:
484
- y += ";";
624
+ T += ";";
485
625
  // { rule/at-rule
486
626
  default:
487
- if (Q(A = De(y, t, o, k, h, i, a, S, F = [], j = [], u), s), T === 123)
488
- if (h === 0)
489
- re(y, t, A, A, F, s, u, a, j);
627
+ if (pe(B = nt(T, t, o, f, u, i, l, R, Y = [], F = [], p), s), M === 123)
628
+ if (u === 0)
629
+ be(T, t, B, B, Y, s, p, l, F);
490
630
  else
491
- switch (c === 99 && E(y, 3) === 110 ? 100 : c) {
631
+ switch (a === 99 && W(T, 3) === 110 ? 100 : a) {
492
632
  // d l m s
493
633
  case 100:
494
634
  case 108:
495
635
  case 109:
496
636
  case 115:
497
- re(e, A, A, r && Q(De(e, A, A, 0, 0, i, a, S, i, F = [], u), j), i, j, u, a, r ? F : j);
637
+ be(e, B, B, n && pe(nt(e, B, B, 0, 0, i, l, R, i, Y = [], p), F), i, F, p, l, n ? Y : F);
498
638
  break;
499
639
  default:
500
- re(y, A, A, A, [""], j, 0, a, j);
640
+ be(T, B, B, B, [""], F, 0, l, F);
501
641
  }
502
642
  }
503
- k = h = p = 0, g = m = 1, S = y = "", u = l;
643
+ f = u = w = 0, g = v = 1, R = T = "", p = d;
504
644
  break;
505
645
  // :
506
646
  case 58:
507
- u = 1 + D(y), p = b;
647
+ p = 1 + V(T), w = m;
508
648
  default:
509
649
  if (g < 1) {
510
- if (T == 123)
650
+ if (M == 123)
511
651
  --g;
512
- else if (T == 125 && g++ == 0 && Hn() == 125)
652
+ else if (M == 125 && g++ == 0 && pn() == 125)
513
653
  continue;
514
654
  }
515
- switch (y += ue(T), T * g) {
655
+ switch (T += ye(M), M * g) {
516
656
  // &
517
657
  case 38:
518
- m = h > 0 ? 1 : (y += "\f", -1);
658
+ v = u > 0 ? 1 : (T += "\f", -1);
519
659
  break;
520
660
  // ,
521
661
  case 44:
522
- a[k++] = (D(y) - 1) * m, m = 1;
662
+ l[f++] = (V(T) - 1) * v, v = 1;
523
663
  break;
524
664
  // @
525
665
  case 64:
526
- B() === 45 && (y += ne(R())), c = B(), h = u = D(S = y += Gn(te())), T++;
666
+ O() === 45 && (T += fe(P())), a = O(), u = p = V(R = T += wn(ge())), M++;
527
667
  break;
528
668
  // -
529
669
  case 45:
530
- b === 45 && D(y) == 2 && (g = 0);
670
+ m === 45 && V(T) == 2 && (g = 0);
531
671
  }
532
672
  }
533
673
  return s;
534
674
  }
535
- function De(e, t, o, r, i, s, l, a, d, k, h) {
536
- for (var u = i - 1, c = i === 0 ? s : [""], p = Te(c), b = 0, g = 0, x = 0; b < r; ++b)
537
- for (var m = 0, T = X(e, u + 1, u = Bn(g = l[b])), S = e; m < p; ++m)
538
- (S = at(g > 0 ? c[m] + " " + T : v(T, /&\f/g, c[m]))) && (d[x++] = S);
539
- return ge(e, t, o, i === 0 ? xe : a, d, k, h);
675
+ function nt(e, t, o, n, i, s, d, l, h, f, u) {
676
+ for (var p = i - 1, a = i === 0 ? s : [""], w = He(a), m = 0, g = 0, y = 0; m < n; ++m)
677
+ for (var v = 0, M = se(e, p + 1, p = an(g = d[m])), R = e; v < w; ++v)
678
+ (R = St(g > 0 ? a[v] + " " + M : x(M, /&\f/g, a[v]))) && (h[y++] = R);
679
+ return Se(e, t, o, i === 0 ? Fe : l, h, f, u);
540
680
  }
541
- function Zn(e, t, o) {
542
- return ge(e, t, o, st, ue(On()), X(e, 2, -2), 0);
681
+ function kn(e, t, o) {
682
+ return Se(e, t, o, yt, ye(un()), se(e, 2, -2), 0);
543
683
  }
544
- function Be(e, t, o, r) {
545
- return ge(e, t, o, ye, X(e, 0, r), X(e, r + 1, -1), r);
684
+ function ot(e, t, o, n) {
685
+ return Se(e, t, o, $e, se(e, 0, n), se(e, n + 1, -1), n);
546
686
  }
547
- function z(e, t) {
548
- for (var o = "", r = Te(e), i = 0; i < r; i++)
687
+ function q(e, t) {
688
+ for (var o = "", n = He(e), i = 0; i < n; i++)
549
689
  o += t(e[i], i, e, t) || "";
550
690
  return o;
551
691
  }
552
- function Yn(e, t, o, r) {
692
+ function vn(e, t, o, n) {
553
693
  switch (e.type) {
554
- case Dn:
694
+ case sn:
555
695
  if (e.children.length) break;
556
- case An:
557
- case ye:
696
+ case on:
697
+ case $e:
558
698
  return e.return = e.return || e.value;
559
- case st:
699
+ case yt:
560
700
  return "";
561
- case it:
562
- return e.return = e.value + "{" + z(e.children, r) + "}";
563
- case xe:
701
+ case Tt:
702
+ return e.return = e.value + "{" + q(e.children, n) + "}";
703
+ case Fe:
564
704
  e.value = e.props.join(",");
565
705
  }
566
- return D(o = z(e.children, r)) ? e.return = e.value + "{" + o + "}" : "";
706
+ return V(o = q(e.children, n)) ? e.return = e.value + "{" + o + "}" : "";
567
707
  }
568
- function Xn(e) {
569
- var t = Te(e);
570
- return function(o, r, i, s) {
571
- for (var l = "", a = 0; a < t; a++)
572
- l += e[a](o, r, i, s) || "";
573
- return l;
708
+ function Cn(e) {
709
+ var t = He(e);
710
+ return function(o, n, i, s) {
711
+ for (var d = "", l = 0; l < t; l++)
712
+ d += e[l](o, n, i, s) || "";
713
+ return d;
574
714
  };
575
715
  }
576
- function qn(e) {
716
+ function xn(e) {
577
717
  return function(t) {
578
718
  t.root || (t = t.return) && e(t);
579
719
  };
580
720
  }
581
- var Jn = function(t, o, r) {
582
- for (var i = 0, s = 0; i = s, s = B(), i === 38 && s === 12 && (o[r] = 1), !q(s); )
583
- R();
584
- return K(t, N);
585
- }, Kn = function(t, o) {
586
- var r = -1, i = 44;
721
+ var yn = function(t, o, n) {
722
+ for (var i = 0, s = 0; i = s, s = O(), i === 38 && s === 12 && (o[n] = 1), !ie(s); )
723
+ P();
724
+ return de(t, D);
725
+ }, Tn = function(t, o) {
726
+ var n = -1, i = 44;
587
727
  do
588
- switch (q(i)) {
728
+ switch (ie(i)) {
589
729
  case 0:
590
- i === 38 && B() === 12 && (o[r] = 1), t[r] += Jn(N - 1, o, r);
730
+ i === 38 && O() === 12 && (o[n] = 1), t[n] += yn(D - 1, o, n);
591
731
  break;
592
732
  case 2:
593
- t[r] += ne(i);
733
+ t[n] += fe(i);
594
734
  break;
595
735
  case 4:
596
736
  if (i === 44) {
597
- t[++r] = B() === 58 ? "&\f" : "", o[r] = t[r].length;
737
+ t[++n] = O() === 58 ? "&\f" : "", o[n] = t[n].length;
598
738
  break;
599
739
  }
600
740
  // fallthrough
601
741
  default:
602
- t[r] += ue(i);
742
+ t[n] += ye(i);
603
743
  }
604
- while (i = R());
744
+ while (i = P());
605
745
  return t;
606
- }, Qn = function(t, o) {
607
- return dt(Kn(lt(t), o));
608
- }, Pe = /* @__PURE__ */ new WeakMap(), er = function(t) {
746
+ }, Sn = function(t, o) {
747
+ return Et(Tn(Mt(t), o));
748
+ }, st = /* @__PURE__ */ new WeakMap(), In = function(t) {
609
749
  if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
610
750
  // negative .length indicates that this rule has been already prefixed
611
751
  t.length < 1)) {
612
- for (var o = t.value, r = t.parent, i = t.column === r.column && t.line === r.line; r.type !== "rule"; )
613
- if (r = r.parent, !r) return;
614
- if (!(t.props.length === 1 && o.charCodeAt(0) !== 58 && !Pe.get(r)) && !i) {
615
- Pe.set(t, !0);
616
- for (var s = [], l = Qn(o, s), a = r.props, d = 0, k = 0; d < l.length; d++)
617
- for (var h = 0; h < a.length; h++, k++)
618
- t.props[k] = s[d] ? l[d].replace(/&\f/g, a[h]) : a[h] + " " + l[d];
752
+ for (var o = t.value, n = t.parent, i = t.column === n.column && t.line === n.line; n.type !== "rule"; )
753
+ if (n = n.parent, !n) return;
754
+ if (!(t.props.length === 1 && o.charCodeAt(0) !== 58 && !st.get(n)) && !i) {
755
+ st.set(t, !0);
756
+ for (var s = [], d = Sn(o, s), l = n.props, h = 0, f = 0; h < d.length; h++)
757
+ for (var u = 0; u < l.length; u++, f++)
758
+ t.props[f] = s[h] ? d[h].replace(/&\f/g, l[u]) : l[u] + " " + d[h];
619
759
  }
620
760
  }
621
- }, tr = function(t) {
761
+ }, Mn = function(t) {
622
762
  if (t.type === "decl") {
623
763
  var o = t.value;
624
764
  // charcode for l
@@ -626,8 +766,8 @@ var Jn = function(t, o, r) {
626
766
  o.charCodeAt(2) === 98 && (t.return = "", t.value = "");
627
767
  }
628
768
  };
629
- function ht(e, t) {
630
- switch (jn(e, t)) {
769
+ function Lt(e, t) {
770
+ switch (cn(e, t)) {
631
771
  // color-adjust
632
772
  case 5103:
633
773
  return C + "print-" + e + e;
@@ -667,51 +807,51 @@ function ht(e, t) {
667
807
  case 4810:
668
808
  case 6968:
669
809
  case 2756:
670
- return C + e + ae + e + L + e + e;
810
+ return C + e + ve + e + N + e + e;
671
811
  // flex, flex-direction
672
812
  case 6828:
673
813
  case 4268:
674
- return C + e + L + e + e;
814
+ return C + e + N + e + e;
675
815
  // order
676
816
  case 6165:
677
- return C + e + L + "flex-" + e + e;
817
+ return C + e + N + "flex-" + e + e;
678
818
  // align-items
679
819
  case 5187:
680
- return C + e + v(e, /(\w+).+(:[^]+)/, C + "box-$1$2" + L + "flex-$1$2") + e;
820
+ return C + e + x(e, /(\w+).+(:[^]+)/, C + "box-$1$2" + N + "flex-$1$2") + e;
681
821
  // align-self
682
822
  case 5443:
683
- return C + e + L + "flex-item-" + v(e, /flex-|-self/, "") + e;
823
+ return C + e + N + "flex-item-" + x(e, /flex-|-self/, "") + e;
684
824
  // align-content
685
825
  case 4675:
686
- return C + e + L + "flex-line-pack" + v(e, /align-content|flex-|-self/, "") + e;
826
+ return C + e + N + "flex-line-pack" + x(e, /align-content|flex-|-self/, "") + e;
687
827
  // flex-shrink
688
828
  case 5548:
689
- return C + e + L + v(e, "shrink", "negative") + e;
829
+ return C + e + N + x(e, "shrink", "negative") + e;
690
830
  // flex-basis
691
831
  case 5292:
692
- return C + e + L + v(e, "basis", "preferred-size") + e;
832
+ return C + e + N + x(e, "basis", "preferred-size") + e;
693
833
  // flex-grow
694
834
  case 6060:
695
- return C + "box-" + v(e, "-grow", "") + C + e + L + v(e, "grow", "positive") + e;
835
+ return C + "box-" + x(e, "-grow", "") + C + e + N + x(e, "grow", "positive") + e;
696
836
  // transition
697
837
  case 4554:
698
- return C + v(e, /([^-])(transform)/g, "$1" + C + "$2") + e;
838
+ return C + x(e, /([^-])(transform)/g, "$1" + C + "$2") + e;
699
839
  // cursor
700
840
  case 6187:
701
- return v(v(v(e, /(zoom-|grab)/, C + "$1"), /(image-set)/, C + "$1"), e, "") + e;
841
+ return x(x(x(e, /(zoom-|grab)/, C + "$1"), /(image-set)/, C + "$1"), e, "") + e;
702
842
  // background, background-image
703
843
  case 5495:
704
844
  case 3959:
705
- return v(e, /(image-set\([^]*)/, C + "$1$`$1");
845
+ return x(e, /(image-set\([^]*)/, C + "$1$`$1");
706
846
  // justify-content
707
847
  case 4968:
708
- return v(v(e, /(.+:)(flex-)?(.*)/, C + "box-pack:$3" + L + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + C + e + e;
848
+ return x(x(e, /(.+:)(flex-)?(.*)/, C + "box-pack:$3" + N + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + C + e + e;
709
849
  // (margin|padding)-inline-(start|end)
710
850
  case 4095:
711
851
  case 3583:
712
852
  case 4068:
713
853
  case 2532:
714
- return v(e, /(.+)-inline(.+)/, C + "$1$2") + e;
854
+ return x(e, /(.+)-inline(.+)/, C + "$1$2") + e;
715
855
  // (min|max)?(width|height|inline-size|block-size)
716
856
  case 8116:
717
857
  case 7059:
@@ -725,116 +865,116 @@ function ht(e, t) {
725
865
  case 5789:
726
866
  case 5021:
727
867
  case 4765:
728
- if (D(e) - 1 - t > 6) switch (E(e, t + 1)) {
868
+ if (V(e) - 1 - t > 6) switch (W(e, t + 1)) {
729
869
  // (m)ax-content, (m)in-content
730
870
  case 109:
731
- if (E(e, t + 4) !== 45) break;
871
+ if (W(e, t + 4) !== 45) break;
732
872
  // (f)ill-available, (f)it-content
733
873
  case 102:
734
- return v(e, /(.+:)(.+)-([^]+)/, "$1" + C + "$2-$3$1" + ae + (E(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
874
+ return x(e, /(.+:)(.+)-([^]+)/, "$1" + C + "$2-$3$1" + ve + (W(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
735
875
  // (s)tretch
736
876
  case 115:
737
- return ~be(e, "stretch") ? ht(v(e, "stretch", "fill-available"), t) + e : e;
877
+ return ~Ae(e, "stretch") ? Lt(x(e, "stretch", "fill-available"), t) + e : e;
738
878
  }
739
879
  break;
740
880
  // position: sticky
741
881
  case 4949:
742
- if (E(e, t + 1) !== 115) break;
882
+ if (W(e, t + 1) !== 115) break;
743
883
  // display: (flex|inline-flex)
744
884
  case 6444:
745
- switch (E(e, D(e) - 3 - (~be(e, "!important") && 10))) {
885
+ switch (W(e, V(e) - 3 - (~Ae(e, "!important") && 10))) {
746
886
  // stic(k)y
747
887
  case 107:
748
- return v(e, ":", ":" + C) + e;
888
+ return x(e, ":", ":" + C) + e;
749
889
  // (inline-)?fl(e)x
750
890
  case 101:
751
- return v(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + C + (E(e, 14) === 45 ? "inline-" : "") + "box$3$1" + C + "$2$3$1" + L + "$2box$3") + e;
891
+ return x(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + C + (W(e, 14) === 45 ? "inline-" : "") + "box$3$1" + C + "$2$3$1" + N + "$2box$3") + e;
752
892
  }
753
893
  break;
754
894
  // writing-mode
755
895
  case 5936:
756
- switch (E(e, t + 11)) {
896
+ switch (W(e, t + 11)) {
757
897
  // vertical-l(r)
758
898
  case 114:
759
- return C + e + L + v(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
899
+ return C + e + N + x(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
760
900
  // vertical-r(l)
761
901
  case 108:
762
- return C + e + L + v(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
902
+ return C + e + N + x(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
763
903
  // horizontal(-)tb
764
904
  case 45:
765
- return C + e + L + v(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
905
+ return C + e + N + x(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
766
906
  }
767
- return C + e + L + e + e;
907
+ return C + e + N + e + e;
768
908
  }
769
909
  return e;
770
910
  }
771
- var nr = function(t, o, r, i) {
911
+ var En = function(t, o, n, i) {
772
912
  if (t.length > -1 && !t.return) switch (t.type) {
773
- case ye:
774
- t.return = ht(t.value, t.length);
913
+ case $e:
914
+ t.return = Lt(t.value, t.length);
775
915
  break;
776
- case it:
777
- return z([Y(t, {
778
- value: v(t.value, "@", "@" + C)
916
+ case Tt:
917
+ return q([ne(t, {
918
+ value: x(t.value, "@", "@" + C)
779
919
  })], i);
780
- case xe:
781
- if (t.length) return Fn(t.props, function(s) {
782
- switch (Vn(s, /(::plac\w+|:read-\w+)/)) {
920
+ case Fe:
921
+ if (t.length) return hn(t.props, function(s) {
922
+ switch (dn(s, /(::plac\w+|:read-\w+)/)) {
783
923
  // :read-(only|write)
784
924
  case ":read-only":
785
925
  case ":read-write":
786
- return z([Y(t, {
787
- props: [v(s, /:(read-\w+)/, ":" + ae + "$1")]
926
+ return q([ne(t, {
927
+ props: [x(s, /:(read-\w+)/, ":" + ve + "$1")]
788
928
  })], i);
789
929
  // :placeholder
790
930
  case "::placeholder":
791
- return z([Y(t, {
792
- props: [v(s, /:(plac\w+)/, ":" + C + "input-$1")]
793
- }), Y(t, {
794
- props: [v(s, /:(plac\w+)/, ":" + ae + "$1")]
795
- }), Y(t, {
796
- props: [v(s, /:(plac\w+)/, L + "input-$1")]
931
+ return q([ne(t, {
932
+ props: [x(s, /:(plac\w+)/, ":" + C + "input-$1")]
933
+ }), ne(t, {
934
+ props: [x(s, /:(plac\w+)/, ":" + ve + "$1")]
935
+ }), ne(t, {
936
+ props: [x(s, /:(plac\w+)/, N + "input-$1")]
797
937
  })], i);
798
938
  }
799
939
  return "";
800
940
  });
801
941
  }
802
- }, rr = [nr], or = function(t) {
942
+ }, Ln = [En], Rn = function(t) {
803
943
  var o = t.key;
804
944
  if (o === "css") {
805
- var r = document.querySelectorAll("style[data-emotion]:not([data-s])");
806
- Array.prototype.forEach.call(r, function(g) {
807
- var x = g.getAttribute("data-emotion");
808
- x.indexOf(" ") !== -1 && (document.head.appendChild(g), g.setAttribute("data-s", ""));
945
+ var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
946
+ Array.prototype.forEach.call(n, function(g) {
947
+ var y = g.getAttribute("data-emotion");
948
+ y.indexOf(" ") !== -1 && (document.head.appendChild(g), g.setAttribute("data-s", ""));
809
949
  });
810
950
  }
811
- var i = t.stylisPlugins || rr, s = {}, l, a = [];
812
- l = t.container || document.head, Array.prototype.forEach.call(
951
+ var i = t.stylisPlugins || Ln, s = {}, d, l = [];
952
+ d = t.container || document.head, Array.prototype.forEach.call(
813
953
  // this means we will ignore elements which don't have a space in them which
814
954
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
815
955
  document.querySelectorAll('style[data-emotion^="' + o + ' "]'),
816
956
  function(g) {
817
- for (var x = g.getAttribute("data-emotion").split(" "), m = 1; m < x.length; m++)
818
- s[x[m]] = !0;
819
- a.push(g);
957
+ for (var y = g.getAttribute("data-emotion").split(" "), v = 1; v < y.length; v++)
958
+ s[y[v]] = !0;
959
+ l.push(g);
820
960
  }
821
961
  );
822
- var d, k = [er, tr];
962
+ var h, f = [In, Mn];
823
963
  {
824
- var h, u = [Yn, qn(function(g) {
825
- h.insert(g);
826
- })], c = Xn(k.concat(i, u)), p = function(x) {
827
- return z(Un(x), c);
964
+ var u, p = [vn, xn(function(g) {
965
+ u.insert(g);
966
+ })], a = Cn(f.concat(i, p)), w = function(y) {
967
+ return q(mn(y), a);
828
968
  };
829
- d = function(x, m, T, S) {
830
- h = T, p(x ? x + "{" + m.styles + "}" : m.styles), S && (b.inserted[m.name] = !0);
969
+ h = function(y, v, M, R) {
970
+ u = M, w(y ? y + "{" + v.styles + "}" : v.styles), R && (m.inserted[v.name] = !0);
831
971
  };
832
972
  }
833
- var b = {
973
+ var m = {
834
974
  key: o,
835
- sheet: new Rn({
975
+ sheet: new nn({
836
976
  key: o,
837
- container: l,
977
+ container: d,
838
978
  nonce: t.nonce,
839
979
  speedy: t.speedy,
840
980
  prepend: t.prepend,
@@ -843,68 +983,68 @@ var nr = function(t, o, r, i) {
843
983
  nonce: t.nonce,
844
984
  inserted: s,
845
985
  registered: {},
846
- insert: d
986
+ insert: h
847
987
  };
848
- return b.sheet.hydrate(a), b;
988
+ return m.sheet.hydrate(l), m;
849
989
  };
850
- const ut = ({ children: e, viewport: t, containerProps: o }) => {
851
- const r = G(null), { theme: i } = $(), [s, l] = P({
990
+ const Rt = ({ children: e, viewport: t, containerProps: o }) => {
991
+ const n = K(null), { theme: i } = U(), [s, d] = j({
852
992
  width: 0,
853
993
  height: 0
854
994
  });
855
- V(() => {
856
- const b = cn((x) => {
857
- const m = x.at(0)?.target;
858
- if (!m) return;
859
- const { width: T, height: S } = m.getBoundingClientRect();
860
- l(() => ({
861
- width: T,
862
- height: S
995
+ z(() => {
996
+ const m = jr((y) => {
997
+ const v = y.at(0)?.target;
998
+ if (!v) return;
999
+ const { width: M, height: R } = v.getBoundingClientRect();
1000
+ d(() => ({
1001
+ width: M,
1002
+ height: R
863
1003
  }));
864
- }, 200), g = new ResizeObserver(b);
865
- return r.current && g.observe(r.current), () => g.disconnect();
1004
+ }, 200), g = new ResizeObserver(m);
1005
+ return n.current && g.observe(n.current), () => g.disconnect();
866
1006
  }, []);
867
- const a = Ne(t?.width) ? t.width(s.width) : t?.width, d = Ne(t?.height) ? t.height(s.height) : t?.height, k = se(a) ? s.width / a : 1, h = se(d) ? s.height / d : 1, u = Math.min(k, h, 1), c = (d ?? s.height / u) || 0, p = (a ?? s.width / u) || 0;
868
- return /* @__PURE__ */ n("div", { ...o, css: { padding: 8, width: "100%", height: "100%", backgroundColor: fe.ink["1s"] }, children: /* @__PURE__ */ n("div", { css: { position: "relative", overflow: "hidden", width: "100%", height: "100%" }, ref: r, children: /* @__PURE__ */ n(
1007
+ const l = Qe(t?.width) ? t.width(s.width) : t?.width, h = Qe(t?.height) ? t.height(s.height) : t?.height, f = ke(l) ? s.width / l : 1, u = ke(h) ? s.height / h : 1, p = Math.min(f, u, 1), a = (h ?? s.height / p) || 0, w = (l ?? s.width / p) || 0;
1008
+ return /* @__PURE__ */ r("div", { ...o, css: { padding: 8, width: "100%", height: "100%", backgroundColor: Ne.ink["1s"] }, children: /* @__PURE__ */ r("div", { css: { position: "relative", overflow: "hidden", width: "100%", height: "100%" }, ref: n, children: /* @__PURE__ */ r(
869
1009
  "div",
870
1010
  {
871
1011
  style: {
872
- transform: `scale(${u})`,
873
- width: p,
874
- height: c,
875
- marginLeft: (s.width - p) / 2,
876
- marginTop: (s.height - c) / 2
1012
+ transform: `scale(${p})`,
1013
+ width: w,
1014
+ height: a,
1015
+ marginLeft: (s.width - w) / 2,
1016
+ marginTop: (s.height - a) / 2
877
1017
  },
878
1018
  css: { position: "absolute" },
879
- children: /* @__PURE__ */ n(
880
- Tn,
1019
+ children: /* @__PURE__ */ r(
1020
+ qr,
881
1021
  {
882
1022
  sandbox: "allow-same-origin allow-scripts allow-popups allow-presentation",
883
1023
  allow: "autoplay; encrypted-media",
884
- width: a ?? "100%",
885
- height: d ?? "100%",
886
- children: /* @__PURE__ */ n(sr, { theme: i, children: e })
1024
+ width: l ?? "100%",
1025
+ height: h ?? "100%",
1026
+ children: /* @__PURE__ */ r(Wn, { theme: i, children: e })
887
1027
  }
888
1028
  )
889
1029
  }
890
1030
  ) }) });
891
- }, sr = ({ children: e, theme: t }) => {
892
- const { document: o, window: r } = ve(), [i, s] = P(!1), l = G(window.customElements.define.bind(window.customElements));
893
- V(() => {
894
- const d = l.current;
895
- return r && (window.customElements.define = function(k, h, u) {
896
- window.customElements.get(k) || r.customElements.define(k, h, u), d(k, h, u);
1031
+ }, Wn = ({ children: e, theme: t }) => {
1032
+ const { document: o, window: n } = Oe(), [i, s] = j(!1), d = K(window.customElements.define.bind(window.customElements));
1033
+ z(() => {
1034
+ const h = d.current;
1035
+ return n && (window.customElements.define = function(f, u, p) {
1036
+ window.customElements.get(f) || n.customElements.define(f, u, p), h(f, u, p);
897
1037
  }), o?.head.replaceWith(document.head.cloneNode(!0)), s(!0), () => {
898
- window.customElements.define = d;
1038
+ window.customElements.define = h;
899
1039
  };
900
- }, [o, r]);
901
- const a = or({
1040
+ }, [o, n]);
1041
+ const l = Rn({
902
1042
  key: "css",
903
1043
  container: o?.head
904
1044
  });
905
- return i ? /* @__PURE__ */ n(Oe, { children: /* @__PURE__ */ w(wn, { value: a, children: [
906
- /* @__PURE__ */ n(
907
- kn,
1045
+ return i ? /* @__PURE__ */ r(ct, { children: /* @__PURE__ */ b(zr, { value: l, children: [
1046
+ /* @__PURE__ */ r(
1047
+ _r,
908
1048
  {
909
1049
  styles: {
910
1050
  ".frame-content": {
@@ -913,23 +1053,23 @@ const ut = ({ children: e, viewport: t, containerProps: o }) => {
913
1053
  minHeight: "100vh",
914
1054
  justifyContent: "center"
915
1055
  },
916
- [`& *[${Ie.DATA_NODE_DROP_TARGET}=${Me.True}]`]: {
1056
+ [`& *[${Ye.DATA_NODE_DROP_TARGET}=${Ze.True}]`]: {
917
1057
  outlineWidth: 1,
918
1058
  outlineStyle: "solid",
919
1059
  outlineOffset: -1,
920
1060
  outlineColor: "green"
921
1061
  },
922
- [`& *[${Ie.DATA_NODE_DROP_TARGET_ERROR}=${Me.True}]`]: {
1062
+ [`& *[${Ye.DATA_NODE_DROP_TARGET_ERROR}=${Ze.True}]`]: {
923
1063
  outlineColor: "red"
924
1064
  }
925
1065
  }
926
1066
  }
927
1067
  ),
928
- /* @__PURE__ */ n(fn, { root: o?.body, theme: t, children: e })
1068
+ /* @__PURE__ */ r($r, { root: o?.body, theme: t, children: e })
929
1069
  ] }) }) : null;
930
1070
  };
931
- var O = /* @__PURE__ */ ((e) => (e[e.Pixels = 0] = "Pixels", e[e.Unitless = 1] = "Unitless", e))(O || {});
932
- const ir = [
1071
+ var _ = /* @__PURE__ */ ((e) => (e[e.Pixels = 0] = "Pixels", e[e.Unitless = 1] = "Unitless", e))(_ || {});
1072
+ const Nn = [
933
1073
  {
934
1074
  label: "Pixels",
935
1075
  value: 0
@@ -940,55 +1080,55 @@ const ir = [
940
1080
  value: 1
941
1081
  /* Unitless */
942
1082
  }
943
- ], mo = ({ name: e, responsive: t = !0, value: o, onChange: r }) => {
944
- const i = se(o?.lineHeight) ? O.Unitless : O.Pixels, s = i === O.Unitless ? 0.1 : 1, l = kt(o?.lineHeight, "float"), a = ({ unit: c, value: p }) => {
945
- if (ee(p)) {
946
- r?.({
947
- lineHeight: c === O.Unitless ? 1 : p
1083
+ ], $o = ({ name: e, responsive: t = !0, value: o, onChange: n }) => {
1084
+ const i = ke(o?.lineHeight) ? _.Unitless : _.Pixels, s = i === _.Unitless ? 0.1 : 1, d = Ut(o?.lineHeight, "float"), l = ({ unit: a, value: w }) => {
1085
+ if ($(w)) {
1086
+ n?.({
1087
+ lineHeight: a === _.Unitless ? 1 : w
948
1088
  });
949
1089
  return;
950
1090
  }
951
- r?.({
952
- lineHeight: c === O.Unitless ? Number(p.toFixed(1)) : `${p}px`
1091
+ n?.({
1092
+ lineHeight: a === _.Unitless ? Number(w.toFixed(1)) : `${w}px`
953
1093
  });
954
- }, d = (c) => {
955
- a({ unit: Number(c.target.value) });
956
- }, k = (c) => {
957
- const p = isNaN(c.target.valueAsNumber) ? void 0 : c.target.valueAsNumber;
958
- a({ unit: i, value: p });
959
- }, h = (c) => {
960
- c.stopPropagation(), !ee(l) && a({ unit: i, value: Math.max(l + s, 0) });
961
- }, u = (c) => {
962
- c.stopPropagation(), !ee(l) && a({ unit: i, value: Math.max(l - s, 0) });
1094
+ }, h = (a) => {
1095
+ l({ unit: Number(a.target.value) });
1096
+ }, f = (a) => {
1097
+ const w = isNaN(a.target.valueAsNumber) ? void 0 : a.target.valueAsNumber;
1098
+ l({ unit: i, value: w });
1099
+ }, u = (a) => {
1100
+ a.stopPropagation(), !$(d) && l({ unit: i, value: Math.max(d + s, 0) });
1101
+ }, p = (a) => {
1102
+ a.stopPropagation(), !$(d) && l({ unit: i, value: Math.max(d - s, 0) });
963
1103
  };
964
- return /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", gap: 8 }, children: [
965
- /* @__PURE__ */ n(J, { responsive: t, name: e ?? "Line height", children: /* @__PURE__ */ n("div", { css: { display: "flex", alignItems: "center", gap: 4 }, children: ir.map((c) => /* @__PURE__ */ n(
966
- He,
1104
+ return /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", gap: 8 }, children: [
1105
+ /* @__PURE__ */ r(ae, { responsive: t, name: e ?? "Line height", children: /* @__PURE__ */ r("div", { css: { display: "flex", alignItems: "center", gap: 4 }, children: Nn.map((a) => /* @__PURE__ */ r(
1106
+ dt,
967
1107
  {
968
- onChange: d,
969
- checked: c.value === i,
970
- value: c.value,
1108
+ onChange: h,
1109
+ checked: a.value === i,
1110
+ value: a.value,
971
1111
  name: "toolbar-line-height",
972
- children: c.label
1112
+ children: a.label
973
1113
  },
974
- c.value
1114
+ a.value
975
1115
  )) }) }),
976
- /* @__PURE__ */ n("div", { css: { display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ n("div", { css: { width: "50%" }, children: /* @__PURE__ */ n(
977
- mt,
1116
+ /* @__PURE__ */ r("div", { css: { display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ r("div", { css: { width: "50%" }, children: /* @__PURE__ */ r(
1117
+ Yt,
978
1118
  {
979
1119
  fractionDigits: 1,
980
- type: i === O.Unitless ? "decimal" : "integer",
981
- value: l ?? "",
982
- onChange: k,
983
- prefix: /* @__PURE__ */ n(W, { disabled: se(l) && l <= 0, onClick: u, children: /* @__PURE__ */ n(I, { source: Ct }) }),
984
- suffix: /* @__PURE__ */ n(W, { onClick: h, children: /* @__PURE__ */ n(I, { source: $e }) }),
1120
+ type: i === _.Unitless ? "decimal" : "integer",
1121
+ value: d ?? "",
1122
+ onChange: f,
1123
+ prefix: /* @__PURE__ */ r(A, { disabled: ke(d) && d <= 0, onClick: p, children: /* @__PURE__ */ r(I, { source: Zt }) }),
1124
+ suffix: /* @__PURE__ */ r(A, { onClick: u, children: /* @__PURE__ */ r(I, { source: ht }) }),
985
1125
  mode: "onBlur",
986
1126
  css: { textAlign: "center" },
987
1127
  placeholder: "normal"
988
1128
  }
989
1129
  ) }) })
990
1130
  ] });
991
- }, je = [
1131
+ }, it = [
992
1132
  {
993
1133
  label: "Block",
994
1134
  value: "block"
@@ -1017,18 +1157,18 @@ const ir = [
1017
1157
  label: "Inline Grid",
1018
1158
  value: "inline-grid"
1019
1159
  }
1020
- ], Co = ({
1160
+ ], Ho = ({
1021
1161
  name: e,
1022
1162
  responsive: t = !1,
1023
1163
  availableDisplays: o,
1024
- onChange: r,
1164
+ onChange: n,
1025
1165
  value: i
1026
1166
  }) => {
1027
- const s = ee(o) ? je : je.filter((a) => o.includes(a.value)), l = (a) => {
1028
- r?.({ display: a });
1167
+ const s = $(o) ? it : it.filter((l) => o.includes(l.value)), d = (l) => {
1168
+ n?.({ display: l });
1029
1169
  };
1030
- return /* @__PURE__ */ n(J, { name: e ?? "Display", responsive: t, children: /* @__PURE__ */ n(
1031
- vt,
1170
+ return /* @__PURE__ */ r(ae, { name: e ?? "Display", responsive: t, children: /* @__PURE__ */ r(
1171
+ Xt,
1032
1172
  {
1033
1173
  css: {
1034
1174
  width: "50%"
@@ -1037,10 +1177,10 @@ const ir = [
1037
1177
  placeholder: "default",
1038
1178
  options: s,
1039
1179
  value: i?.display ?? null,
1040
- onChange: l
1180
+ onChange: d
1041
1181
  }
1042
1182
  ) });
1043
- }, vo = ({ value: e, onChange: t, name: o, responsive: r = !1 }) => {
1183
+ }, zo = ({ value: e, onChange: t, name: o, responsive: n = !1 }) => {
1044
1184
  const i = {
1045
1185
  flexBasis: e?.flexBasis ?? "auto",
1046
1186
  flexGrow: e?.flexGrow ?? 0,
@@ -1064,28 +1204,28 @@ const ir = [
1064
1204
  flexShrink: 1
1065
1205
  }
1066
1206
  }
1067
- ], l = s.find((d) => ln(d.rawValue, i))?.value, a = (d) => {
1068
- const k = s.find((h) => h.value === Number(d.target.value));
1069
- k && t?.(k.rawValue);
1207
+ ], d = s.find((h) => Vr(h.rawValue, i))?.value, l = (h) => {
1208
+ const f = s.find((u) => u.value === Number(h.target.value));
1209
+ f && t?.(f.rawValue);
1070
1210
  };
1071
- return /* @__PURE__ */ n(J, { name: o ?? "Content", responsive: r, children: /* @__PURE__ */ n("div", { css: { display: "inline-flex", alignItems: "center", gap: 8 }, children: s.map((d) => /* @__PURE__ */ n(
1072
- He,
1211
+ return /* @__PURE__ */ r(ae, { name: o ?? "Content", responsive: n, children: /* @__PURE__ */ r("div", { css: { display: "inline-flex", alignItems: "center", gap: 8 }, children: s.map((h) => /* @__PURE__ */ r(
1212
+ dt,
1073
1213
  {
1074
- checked: d.value === l,
1075
- value: d.value,
1076
- onChange: a,
1077
- children: d.label
1214
+ checked: h.value === d,
1215
+ value: h.value,
1216
+ onChange: l,
1217
+ children: h.label
1078
1218
  },
1079
- d.value
1219
+ h.value
1080
1220
  )) }) });
1081
- }, xo = ({ name: e, value: t, onChange: o, responsive: r = !0 }) => {
1082
- const i = G(null), s = (l) => {
1221
+ }, _o = ({ name: e, value: t, onChange: o, responsive: n = !0 }) => {
1222
+ const i = K(null), s = (d) => {
1083
1223
  o?.({
1084
- minWidth: l
1224
+ minWidth: d
1085
1225
  });
1086
1226
  };
1087
- return /* @__PURE__ */ n(J, { name: e ?? "Min width", responsive: r, children: /* @__PURE__ */ n("div", { css: { position: "relative", width: "50%" }, children: /* @__PURE__ */ n(
1088
- xt,
1227
+ return /* @__PURE__ */ r(ae, { name: e ?? "Min width", responsive: n, children: /* @__PURE__ */ r("div", { css: { position: "relative", width: "50%" }, children: /* @__PURE__ */ r(
1228
+ qt,
1089
1229
  {
1090
1230
  fullWidth: !0,
1091
1231
  wrapRef: i,
@@ -1097,20 +1237,20 @@ const ir = [
1097
1237
  }
1098
1238
  }
1099
1239
  ) }) });
1100
- }, yo = ({ value: e, onChange: t }) => {
1101
- const [o, r] = P(!1), i = (l) => {
1102
- t?.({ ...e, sizeVariant: l });
1103
- }, s = (l) => {
1240
+ }, Go = ({ value: e, onChange: t }) => {
1241
+ const [o, n] = j(!1), i = (d) => {
1242
+ t?.({ ...e, sizeVariant: d });
1243
+ }, s = (d) => {
1104
1244
  t?.({
1105
1245
  ...e,
1106
1246
  css: {
1107
1247
  ...e?.css,
1108
- ...l
1248
+ ...d
1109
1249
  }
1110
1250
  });
1111
1251
  };
1112
- return /* @__PURE__ */ n(J, { name: "Text style", children: /* @__PURE__ */ w(yt, { open: o, onOpenChange: r, placement: "right", children: [
1113
- /* @__PURE__ */ n(Tt, { children: /* @__PURE__ */ w(
1252
+ return /* @__PURE__ */ r(ae, { name: "Text style", children: /* @__PURE__ */ b(Jt, { open: o, onOpenChange: n, placement: "right", children: [
1253
+ /* @__PURE__ */ r(Kt, { children: /* @__PURE__ */ b(
1114
1254
  "button",
1115
1255
  {
1116
1256
  css: [
@@ -1123,31 +1263,31 @@ const ir = [
1123
1263
  textAlign: "left",
1124
1264
  width: "50%",
1125
1265
  height: 32,
1126
- backgroundColor: f.palette.white["1s"],
1266
+ backgroundColor: c.palette.white["1s"],
1127
1267
  overflow: "hidden",
1128
1268
  textOverflow: "ellipsis",
1129
1269
  whiteSpace: "nowrap",
1130
- ...f.text.xs
1270
+ ...c.text.xs
1131
1271
  },
1132
- o && { backgroundColor: f.palette.black["7s"] }
1272
+ o && { backgroundColor: c.palette.black["7s"] }
1133
1273
  ],
1134
1274
  children: [
1135
- /* @__PURE__ */ n(I, { css: { color: "white" }, source: It }),
1136
- /* @__PURE__ */ n("span", { children: "Auto" })
1275
+ /* @__PURE__ */ r(I, { css: { color: "white" }, source: Qt }),
1276
+ /* @__PURE__ */ r("span", { children: "Auto" })
1137
1277
  ]
1138
1278
  }
1139
1279
  ) }),
1140
- /* @__PURE__ */ n(Mt, { children: /* @__PURE__ */ w("div", { style: { width: 280 }, children: [
1141
- /* @__PURE__ */ w("div", { css: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 8 }, children: [
1142
- /* @__PURE__ */ n("div", { css: { fontWeight: 500 }, children: "Text style" }),
1143
- /* @__PURE__ */ n(St, { children: /* @__PURE__ */ n(W, { children: /* @__PURE__ */ n(I, { source: _e }) }) })
1280
+ /* @__PURE__ */ r(er, { children: /* @__PURE__ */ b("div", { style: { width: 280 }, children: [
1281
+ /* @__PURE__ */ b("div", { css: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 8 }, children: [
1282
+ /* @__PURE__ */ r("div", { css: { fontWeight: 500 }, children: "Text style" }),
1283
+ /* @__PURE__ */ r(tr, { children: /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(I, { source: Pe }) }) })
1144
1284
  ] }),
1145
- /* @__PURE__ */ n("hr", { css: { marginBlock: 8, borderColor: f.palette.white["1s"] } }),
1146
- /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", gap: 12 }, children: [
1147
- /* @__PURE__ */ n(Et, { value: e?.sizeVariant, onChange: i }),
1148
- /* @__PURE__ */ n(Lt, { value: { color: e?.css?.color }, onChange: s }),
1149
- /* @__PURE__ */ n(
1150
- Wt,
1285
+ /* @__PURE__ */ r("hr", { css: { marginBlock: 8, borderColor: c.palette.white["1s"] } }),
1286
+ /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", gap: 12 }, children: [
1287
+ /* @__PURE__ */ r(rr, { value: e?.sizeVariant, onChange: i }),
1288
+ /* @__PURE__ */ r(nr, { value: { color: e?.css?.color }, onChange: s }),
1289
+ /* @__PURE__ */ r(
1290
+ or,
1151
1291
  {
1152
1292
  name: "Style",
1153
1293
  value: {
@@ -1158,9 +1298,9 @@ const ir = [
1158
1298
  onChange: s
1159
1299
  }
1160
1300
  ),
1161
- /* @__PURE__ */ n(Nt, { value: { fontWeight: e?.css?.fontWeight }, onChange: s }),
1162
- /* @__PURE__ */ n(
1163
- Rt,
1301
+ /* @__PURE__ */ r(sr, { value: { fontWeight: e?.css?.fontWeight }, onChange: s }),
1302
+ /* @__PURE__ */ r(
1303
+ ir,
1164
1304
  {
1165
1305
  value: {
1166
1306
  textTransform: e?.css?.textTransform
@@ -1171,11 +1311,11 @@ const ir = [
1171
1311
  ] })
1172
1312
  ] }) })
1173
1313
  ] }) });
1174
- }, Ve = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1314
+ }, at = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1175
1315
  <path d="M8 5L5 8L8 11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1176
1316
  <path d="M5 8H14C17.314 8 20 10.462 20 13.5V13.5C20 16.538 17.314 19 14 19H6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1177
1317
  </svg>
1178
- `, ar = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1318
+ `, An = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1179
1319
  <path d="M12 19.0004C11.158 19.0004 10.315 18.8224 9.496 18.5054" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1180
1320
  <path d="M20.882 12.4678C18.99 15.9668 15.495 18.9998 12 18.9998" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1181
1321
  <path d="M19.079 8.9209C19.77 9.7299 20.384 10.6119 20.882 11.5329C21.039 11.8239 21.039 12.1769 20.882 12.4679" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
@@ -1183,34 +1323,34 @@ const ir = [
1183
1323
  <path d="M9.77299 14.2271C8.54299 12.9971 8.54299 11.0021 9.77299 9.77211C11.003 8.54211 12.998 8.54211 14.228 9.77211" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1184
1324
  <path d="M17.044 6.956C15.497 5.759 13.748 5 12 5C8.50499 5 5.00999 8.033 3.11799 11.533C2.96099 11.824 2.96099 12.177 3.11799 12.468C4.06399 14.217 5.40999 15.849 6.95599 17.045" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1185
1325
  </svg>
1186
- `, cr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1326
+ `, Dn = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1187
1327
  <path fill-rule="evenodd" clip-rule="evenodd" d="M3.11799 12.467C2.96099 12.176 2.96099 11.823 3.11799 11.532C5.00999 8.033 8.50499 5 12 5C15.495 5 18.99 8.033 20.882 11.533C21.039 11.824 21.039 12.177 20.882 12.468C18.99 15.967 15.495 19 12 19C8.50499 19 5.00999 15.967 3.11799 12.467Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1188
1328
  <path d="M14.1213 9.87868C15.2929 11.0502 15.2929 12.9497 14.1213 14.1213C12.9497 15.2929 11.0502 15.2929 9.87866 14.1213C8.70709 12.9497 8.70709 11.0502 9.87866 9.87868C11.0502 8.70711 12.9497 8.70711 14.1213 9.87868" stroke="currentColor" stroke-width="1.4286" stroke-linecap="round" stroke-linejoin="round"/>
1189
1329
  </svg>
1190
- `, lr = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><path d="M9.75 3C8.50736 3 7.5 4.00736 7.5 5.25C7.5 5.66421 7.83579 6 8.25 6C8.66421 6 9 5.66421 9 5.25C9 4.83579 9.33579 4.5 9.75 4.5H13.75C14.1642 4.5 14.5 4.83579 14.5 5.25V14.75C14.5 15.1642 14.1642 15.5 13.75 15.5H9.75C9.33579 15.5 9 15.1642 9 14.75C9 14.3358 8.66421 14 8.25 14C7.83579 14 7.5 14.3358 7.5 14.75C7.5 15.9926 8.50736 17 9.75 17H13.75C14.9926 17 16 15.9926 16 14.75V5.25C16 4.00736 14.9926 3 13.75 3H9.75Z" fill="currentColor"></path><path d="M12.25 10.75C12.6642 10.75 13 10.4142 13 10C13 9.58579 12.6642 9.25 12.25 9.25L6.56066 9.25L7.53033 8.28033C7.82322 7.98744 7.82322 7.51256 7.53033 7.21967C7.23744 6.92678 6.76256 6.92678 6.46967 7.21967L4.21967 9.46967C4.07902 9.61032 4 9.80109 4 10C4 10.1989 4.07902 10.3897 4.21967 10.5303L6.46967 12.7803C6.76256 13.0732 7.23744 13.0732 7.53033 12.7803C7.82322 12.4874 7.82322 12.0126 7.53033 11.7197L6.56066 10.75H12.25Z" fill="currentColor"></path></svg>', dr = ({ actions: e }) => {
1191
- const { mode: t, screen: o, setState: r, handlers: i } = $(), [s, l] = P(!1), {
1192
- actions: { history: a, selectNode: d },
1193
- canRedo: k,
1194
- canUndo: h,
1195
- query: u
1196
- } = H((x, m) => ({
1197
- enabled: x.options.enabled,
1198
- canUndo: m.history.canUndo(),
1199
- canRedo: m.history.canRedo()
1200
- })), c = (x) => {
1201
- r({ screen: x });
1202
- }, p = () => {
1203
- r({ mode: t === "full" ? "compact" : "full" });
1204
- }, b = () => {
1330
+ `, Pn = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><path d="M9.75 3C8.50736 3 7.5 4.00736 7.5 5.25C7.5 5.66421 7.83579 6 8.25 6C8.66421 6 9 5.66421 9 5.25C9 4.83579 9.33579 4.5 9.75 4.5H13.75C14.1642 4.5 14.5 4.83579 14.5 5.25V14.75C14.5 15.1642 14.1642 15.5 13.75 15.5H9.75C9.33579 15.5 9 15.1642 9 14.75C9 14.3358 8.66421 14 8.25 14C7.83579 14 7.5 14.3358 7.5 14.75C7.5 15.9926 8.50736 17 9.75 17H13.75C14.9926 17 16 15.9926 16 14.75V5.25C16 4.00736 14.9926 3 13.75 3H9.75Z" fill="currentColor"></path><path d="M12.25 10.75C12.6642 10.75 13 10.4142 13 10C13 9.58579 12.6642 9.25 12.25 9.25L6.56066 9.25L7.53033 8.28033C7.82322 7.98744 7.82322 7.51256 7.53033 7.21967C7.23744 6.92678 6.76256 6.92678 6.46967 7.21967L4.21967 9.46967C4.07902 9.61032 4 9.80109 4 10C4 10.1989 4.07902 10.3897 4.21967 10.5303L6.46967 12.7803C6.76256 13.0732 7.23744 13.0732 7.53033 12.7803C7.82322 12.4874 7.82322 12.0126 7.53033 11.7197L6.56066 10.75H12.25Z" fill="currentColor"></path></svg>', Bn = ({ actions: e }) => {
1331
+ const { mode: t, screen: o, setState: n, handlers: i } = U(), [s, d] = j(!1), {
1332
+ actions: { history: l, selectNode: h },
1333
+ canRedo: f,
1334
+ canUndo: u,
1335
+ query: p
1336
+ } = G((y, v) => ({
1337
+ enabled: y.options.enabled,
1338
+ canUndo: v.history.canUndo(),
1339
+ canRedo: v.history.canRedo()
1340
+ })), a = (y) => {
1341
+ n({ screen: y });
1342
+ }, w = () => {
1343
+ n({ mode: t === "full" ? "compact" : "full" });
1344
+ }, m = () => {
1205
1345
  i.close();
1206
1346
  }, g = async () => {
1207
1347
  try {
1208
- l(!0), d(), await i.submit(u.getSerializedNodes());
1348
+ d(!0), h(), await i.submit(p.getSerializedNodes());
1209
1349
  } finally {
1210
- l(!1);
1350
+ d(!1);
1211
1351
  }
1212
1352
  };
1213
- return /* @__PURE__ */ w(
1353
+ return /* @__PURE__ */ b(
1214
1354
  "div",
1215
1355
  {
1216
1356
  css: {
@@ -1219,15 +1359,15 @@ const ir = [
1219
1359
  alignItems: "center",
1220
1360
  gap: 16,
1221
1361
  justifyContent: "space-between",
1222
- backgroundColor: f.palette.ink["6s"],
1223
- color: f.palette.white["6s"],
1224
- ...f.text.sm
1362
+ backgroundColor: c.palette.ink["6s"],
1363
+ color: c.palette.white["6s"],
1364
+ ...c.text.sm
1225
1365
  },
1226
1366
  children: [
1227
- /* @__PURE__ */ w("div", { css: { display: "flex", alignItems: "center", gap: 12 }, children: [
1228
- /* @__PURE__ */ n(W, { size: "32", onClick: b, children: /* @__PURE__ */ n(I, { source: lr }) }),
1229
- /* @__PURE__ */ n(At, { onSelectionChange: c, value: o, children: Dt.map(({ icon: x, size: m, name: T }) => /* @__PURE__ */ n(W, { tooltip: { content: T }, value: m, children: /* @__PURE__ */ n(I, { source: x }) }, m)) }),
1230
- /* @__PURE__ */ w(
1367
+ /* @__PURE__ */ b("div", { css: { display: "flex", alignItems: "center", gap: 12 }, children: [
1368
+ /* @__PURE__ */ r(A, { size: "32", onClick: m, children: /* @__PURE__ */ r(I, { source: Pn }) }),
1369
+ /* @__PURE__ */ r(ar, { onSelectionChange: a, value: o, children: lr.map(({ icon: y, size: v, name: M }) => /* @__PURE__ */ r(A, { tooltip: { content: M }, value: v, children: /* @__PURE__ */ r(I, { source: y }) }, v)) }),
1370
+ /* @__PURE__ */ b(
1231
1371
  "div",
1232
1372
  {
1233
1373
  css: {
@@ -1236,15 +1376,15 @@ const ir = [
1236
1376
  alignItems: "center",
1237
1377
  gap: 8,
1238
1378
  borderRadius: 8,
1239
- backgroundColor: f.palette.white["1s"]
1379
+ backgroundColor: c.palette.white["1s"]
1240
1380
  },
1241
1381
  children: [
1242
- /* @__PURE__ */ n(W, { onClick: a.undo, disabled: !h, children: /* @__PURE__ */ n(I, { source: Ve }) }),
1243
- /* @__PURE__ */ n(W, { onClick: a.redo, disabled: !k, children: /* @__PURE__ */ n(I, { source: Ve, css: { transform: "rotate(180deg)" } }) })
1382
+ /* @__PURE__ */ r(A, { onClick: l.undo, disabled: !u, children: /* @__PURE__ */ r(I, { source: at }) }),
1383
+ /* @__PURE__ */ r(A, { onClick: l.redo, disabled: !f, children: /* @__PURE__ */ r(I, { source: at, css: { transform: "rotate(180deg)" } }) })
1244
1384
  ]
1245
1385
  }
1246
1386
  ),
1247
- /* @__PURE__ */ n(
1387
+ /* @__PURE__ */ r(
1248
1388
  "div",
1249
1389
  {
1250
1390
  css: {
@@ -1253,58 +1393,58 @@ const ir = [
1253
1393
  alignItems: "center",
1254
1394
  gap: 8,
1255
1395
  borderRadius: 8,
1256
- backgroundColor: f.palette.white["1s"]
1396
+ backgroundColor: c.palette.white["1s"]
1257
1397
  },
1258
- children: /* @__PURE__ */ n(W, { onClick: p, children: /* @__PURE__ */ n(I, { source: t === "full" ? cr : ar }) })
1398
+ children: /* @__PURE__ */ r(A, { onClick: w, children: /* @__PURE__ */ r(I, { source: t === "full" ? Dn : An }) })
1259
1399
  }
1260
1400
  ),
1261
1401
  e
1262
1402
  ] }),
1263
- /* @__PURE__ */ n("div", { css: { display: "flex", alignItems: "center", gap: 12 }, children: /* @__PURE__ */ n(oe, { isLoading: s, onClick: g, children: "Save" }) })
1403
+ /* @__PURE__ */ r("div", { css: { display: "flex", alignItems: "center", gap: 12 }, children: /* @__PURE__ */ r(me, { isLoading: s, onClick: g, children: "Save" }) })
1264
1404
  ]
1265
1405
  }
1266
1406
  );
1267
- }, hr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1407
+ }, jn = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1268
1408
  <path d="M20 19.9997L16.3763 16.376" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1269
1409
  <path d="M4 11.25C4 15.2541 7.24594 18.5 11.25 18.5C15.2541 18.5 18.5 15.2541 18.5 11.25C18.5 7.24594 15.2541 4 11.25 4V4C7.24606 4.00029 4.00029 7.24606 4 11.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1270
1410
  </svg>
1271
- `, ur = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1411
+ `, Vn = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1272
1412
  <path d="M15 6L9 12L15 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1273
1413
  </svg>
1274
- `, pr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1414
+ `, On = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1275
1415
  <rect x="3.00024" y="3" width="17.9997" height="17.9997" rx="2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1276
1416
  <path d="M13.5 20.9998V12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1277
1417
  <path d="M9.50011 11.9998V3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1278
1418
  <path d="M20.9999 12H3.00024" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1279
1419
  </svg>
1280
- `, gr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1420
+ `, Fn = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1281
1421
  <rect x="3" y="3" width="18" height="18" rx="2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1282
1422
  <path d="M3 12H21" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1283
1423
  <path d="M12 21V3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1284
1424
  </svg>
1285
- `, Fe = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1425
+ `, lt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1286
1426
  <path d="M3 6V18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1287
1427
  <path d="M21 6V18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1288
1428
  <path d="M6 21H18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1289
1429
  <path d="M6 3H18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1290
1430
  </svg>
1291
- `, fr = {
1431
+ `, $n = {
1292
1432
  name: "Layout",
1293
1433
  templates: [
1294
1434
  {
1295
1435
  name: "Container",
1296
- template: /* @__PURE__ */ n(Bt, {}),
1297
- icon: { source: Fe, height: 32 }
1436
+ template: /* @__PURE__ */ r(cr, {}),
1437
+ icon: { source: lt, height: 32 }
1298
1438
  },
1299
1439
  {
1300
1440
  name: "Block",
1301
- template: /* @__PURE__ */ n(Pt, {}),
1302
- icon: { source: Fe, height: 32 }
1441
+ template: /* @__PURE__ */ r(dr, {}),
1442
+ icon: { source: lt, height: 32 }
1303
1443
  },
1304
1444
  {
1305
1445
  name: "Grid",
1306
- template: /* @__PURE__ */ w(
1307
- jt,
1446
+ template: /* @__PURE__ */ b(
1447
+ hr,
1308
1448
  {
1309
1449
  cols: 2,
1310
1450
  sx: {
@@ -1315,26 +1455,26 @@ const ir = [
1315
1455
  paddingBottom: 16
1316
1456
  },
1317
1457
  children: [
1318
- /* @__PURE__ */ n(Se, {}),
1319
- /* @__PURE__ */ n(Se, {})
1458
+ /* @__PURE__ */ r(Xe, {}),
1459
+ /* @__PURE__ */ r(Xe, {})
1320
1460
  ]
1321
1461
  }
1322
1462
  ),
1323
- icon: { source: gr, height: 32 }
1463
+ icon: { source: Fn, height: 32 }
1324
1464
  },
1325
1465
  {
1326
1466
  name: "Flex",
1327
- template: /* @__PURE__ */ w(Vt, { sx: { columnGap: 8, rowGap: 8, paddingTop: 16, paddingBottom: 16 }, children: [
1328
- /* @__PURE__ */ n(
1329
- Ee,
1467
+ template: /* @__PURE__ */ b(ur, { sx: { columnGap: 8, rowGap: 8, paddingTop: 16, paddingBottom: 16 }, children: [
1468
+ /* @__PURE__ */ r(
1469
+ qe,
1330
1470
  {
1331
1471
  sx: {
1332
1472
  width: "40%"
1333
1473
  }
1334
1474
  }
1335
1475
  ),
1336
- /* @__PURE__ */ n(
1337
- Ee,
1476
+ /* @__PURE__ */ r(
1477
+ qe,
1338
1478
  {
1339
1479
  sx: {
1340
1480
  width: "60%"
@@ -1342,10 +1482,10 @@ const ir = [
1342
1482
  }
1343
1483
  )
1344
1484
  ] }),
1345
- icon: { source: pr, height: 32 }
1485
+ icon: { source: On, height: 32 }
1346
1486
  }
1347
1487
  ]
1348
- }, br = `<svg height="24" width="24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" xml:space="preserve">
1488
+ }, Hn = `<svg height="24" width="24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" xml:space="preserve">
1349
1489
  <style type="text/css">
1350
1490
  .st0{fill:currentColor;}
1351
1491
  </style>
@@ -1374,31 +1514,31 @@ const ir = [
1374
1514
  c4.709,14.802,17.357,22.204,33.644,22.204c16.286,0,28.668-8.204,33.374-22.881c1.617-5.111,2.29-12.645,2.29-20.716v-0.95
1375
1515
  C372.362,303.664,369.538,300.836,364.556,300.836z"/>
1376
1516
  </g>
1377
- </svg>`, wr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1517
+ </svg>`, zn = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1378
1518
  <path d="M20.64 15.3735L16.5187 11.2522C16.1434 10.8769 15.5357 10.8769 15.1613 11.2522L11.04 15.3735" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1379
1519
  <path fill-rule="evenodd" clip-rule="evenodd" d="M17.76 20.1736H6.24C4.64928 20.1736 3.36 18.8843 3.36 17.2936V5.77355C3.36 4.18283 4.64928 2.89355 6.24 2.89355H17.76C19.3507 2.89355 20.64 4.18283 20.64 5.77355V17.2936C20.64 18.8843 19.3507 20.1736 17.76 20.1736Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1380
1520
  <path d="M15.84 20.1734L9.79872 14.1321C9.42336 13.7567 8.81568 13.7567 8.44128 14.1321L3.78816 18.7852" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1381
1521
  <path d="M9.37456 8.39927C9.51515 8.53986 9.51515 8.7678 9.37456 8.90839C9.23397 9.04898 9.00603 9.04898 8.86544 8.90839C8.72485 8.7678 8.72485 8.53986 8.86544 8.39927C9.00603 8.25868 9.23397 8.25868 9.37456 8.39927" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1382
1522
  </svg>
1383
- `, kr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1523
+ `, _n = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1384
1524
  <path fill-rule="evenodd" clip-rule="evenodd" d="M10.2939 12L14.6229 9.5L10.2939 7V12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1385
1525
  <path fill-rule="evenodd" clip-rule="evenodd" d="M19.889 3.38867H4.111C3.497 3.38867 3 3.88567 3 4.49967V14.4997C3 15.1137 3.497 15.6107 4.111 15.6107H19.889C20.503 15.6107 21 15.1137 21 14.4997V4.49967C21 3.88567 20.503 3.38867 19.889 3.38867Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1386
1526
  <path d="M8.56066 18.9393C9.14645 19.5251 9.14645 20.4749 8.56066 21.0607C7.97487 21.6464 7.02513 21.6464 6.43934 21.0607C5.85355 20.4749 5.85355 19.5251 6.43934 18.9393C7.02513 18.3536 7.97487 18.3536 8.56066 18.9393" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1387
1527
  <path d="M21 20H9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1388
1528
  <path d="M3 20H6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1389
1529
  </svg>
1390
- `, mr = {
1530
+ `, Gn = {
1391
1531
  name: "Media",
1392
1532
  templates: [
1393
1533
  {
1394
1534
  name: "Image",
1395
- template: /* @__PURE__ */ n(Ft, { src: "https://ucarecdn.com/ee6d5074-1640-4cc7-8933-47c8589c3dee/-/format/auto/" }),
1396
- icon: { source: wr, height: 32 }
1535
+ template: /* @__PURE__ */ r(pr, { src: "https://ucarecdn.com/ee6d5074-1640-4cc7-8933-47c8589c3dee/-/format/auto/" }),
1536
+ icon: { source: zn, height: 32 }
1397
1537
  },
1398
1538
  {
1399
1539
  name: "Video",
1400
- template: /* @__PURE__ */ n(
1401
- Ot,
1540
+ template: /* @__PURE__ */ r(
1541
+ gr,
1402
1542
  {
1403
1543
  sx: {
1404
1544
  aspectRatio: "16 / 9"
@@ -1406,87 +1546,87 @@ const ir = [
1406
1546
  src: "https://cdn.shopify.com/videos/c/o/v/2cd3deb506b54b009063f7270ab5cf2e.mp4"
1407
1547
  }
1408
1548
  ),
1409
- icon: { source: kr, height: 32 }
1549
+ icon: { source: _n, height: 32 }
1410
1550
  },
1411
1551
  {
1412
1552
  name: "Icon",
1413
- template: /* @__PURE__ */ n(Ht, { source: $t }),
1414
- icon: { source: br, height: 32 }
1553
+ template: /* @__PURE__ */ r(fr, { source: br }),
1554
+ icon: { source: Hn, height: 32 }
1415
1555
  }
1416
1556
  ]
1417
- }, Cr = `<svg fill="currentColor" width="24" height="24" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
1557
+ }, Un = `<svg fill="currentColor" width="24" height="24" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
1418
1558
  <title>h</title>
1419
1559
  <path d="M25.264 3.993h-0.928c-0.442 0-0.8 0.358-0.801 0.8v9.952h-15.038v-9.952c-0-0.442-0.358-0.8-0.8-0.8h-0.928c-0.442 0-0.8 0.358-0.8 0.8v22.4c0 0.442 0.358 0.8 0.8 0.801h0.928c0.442-0.001 0.8-0.359 0.8-0.801v0-9.952h15.038v9.952c0.001 0.442 0.359 0.8 0.801 0.801h0.928c0.442-0.001 0.8-0.359 0.801-0.801v-22.4c-0.001-0.442-0.359-0.8-0.801-0.8h-0z"/>
1420
1560
  </svg>
1421
- `, vr = `<svg fill="currentColor" width="24" height="24" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
1561
+ `, Yn = `<svg fill="currentColor" width="24" height="24" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
1422
1562
  <title>p</title>
1423
1563
  <path d="M24.223 6.397c-1.592-1.495-3.741-2.413-6.104-2.413-0.137 0-0.274 0.003-0.41 0.009l0.019-0.001h-8.416c-0.442 0-0.8 0.358-0.8 0.8v22.4c0 0.442 0.358 0.8 0.8 0.801h0.928c0.442-0.001 0.8-0.359 0.8-0.801v0-6.561h6.688c0.117 0.005 0.253 0.009 0.391 0.009 2.363 0 4.512-0.918 6.108-2.417l-0.005 0.004c1.521-1.457 2.466-3.504 2.466-5.772 0-0.050-0-0.101-0.001-0.151l0 0.008c0.001-0.042 0.001-0.093 0.001-0.143 0-2.268-0.945-4.316-2.463-5.771l-0.003-0.003zM11.040 6.521h6.624c0.12-0.008 0.259-0.012 0.4-0.012 1.678 0 3.208 0.636 4.361 1.68l-0.006-0.005c1.054 0.998 1.709 2.407 1.709 3.969 0 0.056-0.001 0.112-0.003 0.168l0-0.008c0.001 0.047 0.002 0.101 0.002 0.156 0 1.569-0.656 2.985-1.709 3.988l-0.002 0.002c-1.145 1.047-2.676 1.689-4.357 1.689-0.14 0-0.278-0.004-0.416-0.013l0.019 0.001h-6.624z"/>
1424
1564
  </svg>
1425
- `, xr = {
1565
+ `, Zn = {
1426
1566
  name: "Text",
1427
1567
  templates: [
1428
1568
  {
1429
1569
  name: "Heading",
1430
- template: /* @__PURE__ */ n(_t, { as: "h2", sizeVariant: "4xl", md: { sizeVariant: "5xl" }, children: "Your heading text goes here" }),
1431
- icon: { source: Cr, height: 32 }
1570
+ template: /* @__PURE__ */ r(wr, { as: "h2", sizeVariant: "4xl", md: { sizeVariant: "5xl" }, children: "Your heading text goes here" }),
1571
+ icon: { source: Un, height: 32 }
1432
1572
  },
1433
1573
  {
1434
1574
  name: "Paragraph",
1435
- template: /* @__PURE__ */ n(zt, { children: "Replace this text with your content" }),
1436
- icon: { source: vr, height: 32 }
1575
+ template: /* @__PURE__ */ r(mr, { children: "Replace this text with your content" }),
1576
+ icon: { source: Yn, height: 32 }
1437
1577
  }
1438
1578
  ]
1439
- }, yr = [
1440
- fr,
1441
- xr,
1442
- mr,
1443
- Gt,
1444
- Ut,
1445
- Zt,
1446
- Yt
1447
- ], Tr = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>', Ir = {
1579
+ }, Xn = [
1580
+ $n,
1581
+ Zn,
1582
+ Gn,
1583
+ kr,
1584
+ vr,
1585
+ Cr,
1586
+ xr
1587
+ ], qn = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>', Jn = {
1448
1588
  name: "Basics",
1449
- icon: { source: Tr },
1450
- renderer: () => /* @__PURE__ */ n(Sr, { elementGroups: yr })
1451
- }, Mr = ({ groups: e }) => {
1452
- const t = [Ir, ...e ?? []];
1453
- return /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", height: "100%" }, children: [
1454
- /* @__PURE__ */ n("div", { css: { display: "flex", padding: 8, alignItems: "center", gap: 12 }, children: /* @__PURE__ */ n(ze, { fullWidth: !0, placeholder: "Search...", prefix: /* @__PURE__ */ n(I, { source: hr }) }) }),
1455
- /* @__PURE__ */ n(
1456
- ce,
1589
+ icon: { source: qn },
1590
+ renderer: () => /* @__PURE__ */ r(Qn, { elementGroups: Xn })
1591
+ }, Kn = ({ groups: e }) => {
1592
+ const t = [Jn, ...e ?? []];
1593
+ return /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", height: "100%" }, children: [
1594
+ /* @__PURE__ */ r("div", { css: { display: "flex", padding: 8, alignItems: "center", gap: 12 }, children: /* @__PURE__ */ r(ut, { fullWidth: !0, placeholder: "Search...", prefix: /* @__PURE__ */ r(I, { source: jn }) }) }),
1595
+ /* @__PURE__ */ r(
1596
+ Be,
1457
1597
  {
1458
1598
  css: {
1459
1599
  paddingBlock: 8,
1460
1600
  borderTopWidth: 1,
1461
1601
  borderTopStyle: "solid",
1462
- borderColor: f.palette.white["1s"],
1602
+ borderColor: c.palette.white["1s"],
1463
1603
  flex: 1
1464
1604
  },
1465
- children: t.map((o, r) => /* @__PURE__ */ n(Lr, { group: o }, r))
1605
+ children: t.map((o, n) => /* @__PURE__ */ r(to, { group: o }, n))
1466
1606
  }
1467
1607
  )
1468
1608
  ] });
1469
- }, Sr = ({ elementGroups: e }) => /* @__PURE__ */ n("div", { css: { display: "flex", flexDirection: "column", gap: 8 }, children: e.map((t, o) => /* @__PURE__ */ n(Er, { group: t }, o)) }), Er = ({ group: e }) => {
1470
- const [t, o] = ot(!0), { actions: r, connectors: i } = H();
1471
- return /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", ...f.text.sm }, children: [
1472
- /* @__PURE__ */ n(oe, { onClick: o, css: { paddingInline: 0, backgroundColor: "transparent" }, children: /* @__PURE__ */ w(
1609
+ }, Qn = ({ elementGroups: e }) => /* @__PURE__ */ r("div", { css: { display: "flex", flexDirection: "column", gap: 8 }, children: e.map((t, o) => /* @__PURE__ */ r(eo, { group: t }, o)) }), eo = ({ group: e }) => {
1610
+ const [t, o] = pt(!0), { actions: n, connectors: i } = G();
1611
+ return /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", ...c.text.sm }, children: [
1612
+ /* @__PURE__ */ r(me, { onClick: o, css: { paddingInline: 0, backgroundColor: "transparent" }, children: /* @__PURE__ */ b(
1473
1613
  "div",
1474
1614
  {
1475
- css: { display: "flex", alignItems: "center", justifyContent: "space-between", flex: 1, ...f.text.sm },
1615
+ css: { display: "flex", alignItems: "center", justifyContent: "space-between", flex: 1, ...c.text.sm },
1476
1616
  children: [
1477
1617
  e.name,
1478
- /* @__PURE__ */ n(
1618
+ /* @__PURE__ */ r(
1479
1619
  I,
1480
1620
  {
1481
- source: Ge,
1621
+ source: we,
1482
1622
  css: [{ transition: "transform" }, !t && { transform: "rotate(180deg)" }]
1483
1623
  }
1484
1624
  )
1485
1625
  ]
1486
1626
  }
1487
1627
  ) }),
1488
- /* @__PURE__ */ n(qt, { open: t, children: /* @__PURE__ */ n("div", { css: { display: "grid", paddingBlock: 8, gap: 16, gridTemplateColumns: "repeat(2, minmax(0, 1fr))" }, children: e.templates?.map((s, l) => /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", gap: 4 }, children: [
1489
- /* @__PURE__ */ n(
1628
+ /* @__PURE__ */ r(Tr, { open: t, children: /* @__PURE__ */ r("div", { css: { display: "grid", paddingBlock: 8, gap: 16, gridTemplateColumns: "repeat(2, minmax(0, 1fr))" }, children: e.templates?.map((s, d) => /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", gap: 4 }, children: [
1629
+ /* @__PURE__ */ r(
1490
1630
  "div",
1491
1631
  {
1492
1632
  css: {
@@ -1494,8 +1634,8 @@ const ir = [
1494
1634
  display: "flex",
1495
1635
  padding: 4,
1496
1636
  borderRadius: 8,
1497
- backgroundColor: f.palette.ink["6s"],
1498
- color: f.palette.white["5s"],
1637
+ backgroundColor: c.palette.ink["6s"],
1638
+ color: c.palette.white["5s"],
1499
1639
  pointerEvents: "auto",
1500
1640
  overflow: "hidden",
1501
1641
  flexDirection: "column",
@@ -1511,47 +1651,47 @@ const ir = [
1511
1651
  content: '""',
1512
1652
  position: "absolute",
1513
1653
  inset: 0,
1514
- backgroundColor: f.palette.white["1s"]
1654
+ backgroundColor: c.palette.white["1s"]
1515
1655
  }
1516
1656
  },
1517
- ref: (a) => {
1518
- a && i.create(a, s.template, {
1519
- onCreate(d) {
1520
- (typeof s.autoFocus == "function" ? s.autoFocus(d) : s.autoFocus) && r.selectNode(d.rootNodeId), s.onCreate?.(d);
1657
+ ref: (l) => {
1658
+ l && i.create(l, s.template, {
1659
+ onCreate(h) {
1660
+ (typeof s.autoFocus == "function" ? s.autoFocus(h) : s.autoFocus) && n.selectNode(h.rootNodeId), s.onCreate?.(h);
1521
1661
  }
1522
1662
  });
1523
1663
  },
1524
- children: s.icon && /* @__PURE__ */ n(Jt, { width: void 0, height: void 0, ...s.icon })
1664
+ children: s.icon && /* @__PURE__ */ r(Sr, { width: void 0, height: void 0, ...s.icon })
1525
1665
  }
1526
1666
  ),
1527
- /* @__PURE__ */ n("p", { css: { marginInline: "auto", textAlign: "center", ...ke.xs }, children: s.name })
1528
- ] }, l)) }) })
1667
+ /* @__PURE__ */ r("p", { css: { marginInline: "auto", textAlign: "center", ...le.xs }, children: s.name })
1668
+ ] }, d)) }) })
1529
1669
  ] });
1530
- }, Lr = ({ group: e }) => {
1531
- const [t, o] = P(!1), { refs: r, floatingStyles: i, context: s } = le({
1670
+ }, to = ({ group: e }) => {
1671
+ const [t, o] = j(!1), { refs: n, floatingStyles: i, context: s } = Ce({
1532
1672
  open: t,
1533
1673
  onOpenChange: o,
1534
1674
  placement: "right-start",
1535
1675
  middleware: [
1536
- Ce(),
1537
- Je({
1538
- apply({ elements: p }) {
1539
- const b = {
1540
- zIndex: `${Xe}`,
1541
- height: `${p.reference.getBoundingClientRect().height}px`
1676
+ Ve(),
1677
+ mt({
1678
+ apply({ elements: w }) {
1679
+ const m = {
1680
+ zIndex: `${We}`,
1681
+ height: `${w.reference.getBoundingClientRect().height}px`
1542
1682
  };
1543
- Object.assign(p.floating.style, b);
1683
+ Object.assign(w.floating.style, m);
1544
1684
  }
1545
1685
  })
1546
1686
  ],
1547
- whileElementsMounted: de
1687
+ whileElementsMounted: xe
1548
1688
  });
1549
- V(() => {
1550
- r.setPositionReference(document.querySelector("aside"));
1551
- }, [r]);
1552
- const l = Ke(s, { move: !1, handleClose: yn() }), a = Qe(s), d = et(s), k = tt(s), { getReferenceProps: h, getFloatingProps: u } = nt([l, a, d, k]), c = e.renderer;
1553
- return /* @__PURE__ */ w(ie, { children: [
1554
- /* @__PURE__ */ w(
1689
+ z(() => {
1690
+ n.setPositionReference(document.querySelector("aside"));
1691
+ }, [n]);
1692
+ const d = Yr(s, { move: !1, handleClose: Zr() }), l = Xr(s), h = kt(s), f = vt(s), { getReferenceProps: u, getFloatingProps: p } = Ct([d, l, h, f]), a = e.renderer;
1693
+ return /* @__PURE__ */ b(J, { children: [
1694
+ /* @__PURE__ */ b(
1555
1695
  "button",
1556
1696
  {
1557
1697
  css: {
@@ -1562,74 +1702,76 @@ const ir = [
1562
1702
  borderRadius: 8,
1563
1703
  textAlign: "left",
1564
1704
  width: "100%",
1565
- color: f.palette.white["5s"],
1566
- "&:hover": {
1567
- color: f.palette.white["6s"],
1568
- backgroundColor: f.palette.white["1s"],
1705
+ color: t ? c.palette.white["6s"] : c.palette.white["5s"],
1706
+ backgroundColor: t ? c.palette.white["1s"] : void 0,
1707
+ ":hover": {
1708
+ color: c.palette.white["6s"],
1709
+ backgroundColor: c.palette.white["1s"],
1569
1710
  fontWeight: 500
1570
1711
  }
1571
1712
  },
1572
- ...h(),
1573
- ref: r.setReference,
1713
+ ...u(),
1714
+ ref: n.setReference,
1574
1715
  children: [
1575
- e.icon && /* @__PURE__ */ n("div", { css: { padding: 6, borderRadius: 8, backgroundColor: f.palette.white["1s"] }, children: /* @__PURE__ */ n(I, { ...e.icon }) }),
1576
- /* @__PURE__ */ n(
1716
+ e.icon && /* @__PURE__ */ r("div", { css: { padding: 6, borderRadius: 8, backgroundColor: c.palette.white["1s"] }, children: /* @__PURE__ */ r(I, { ...e.icon }) }),
1717
+ /* @__PURE__ */ r(
1577
1718
  "span",
1578
1719
  {
1579
1720
  css: {
1580
1721
  overflow: "hidden",
1581
1722
  textOverflow: "ellipsis",
1582
1723
  whiteSpace: "nowrap",
1583
- flex: 1
1724
+ flex: 1,
1725
+ ...le.sm
1584
1726
  },
1585
1727
  children: e.name
1586
1728
  }
1587
1729
  ),
1588
- /* @__PURE__ */ n(I, { css: { transform: "rotate(180deg)" }, source: ur })
1730
+ /* @__PURE__ */ r(I, { css: { transform: "rotate(180deg)" }, source: Vn })
1589
1731
  ]
1590
1732
  }
1591
1733
  ),
1592
- t && /* @__PURE__ */ n(he, { children: /* @__PURE__ */ n("div", { style: i, ...u(), ref: r.setFloating, children: /* @__PURE__ */ w(
1734
+ t && /* @__PURE__ */ r(ce, { children: /* @__PURE__ */ r("div", { style: i, ...p(), ref: n.setFloating, children: /* @__PURE__ */ b(
1593
1735
  "div",
1594
1736
  {
1595
1737
  css: {
1596
1738
  display: "flex",
1597
1739
  flexDirection: "column",
1598
1740
  height: "100%",
1599
- backgroundColor: f.palette.ink["6s"],
1600
- color: f.palette.white["6s"],
1741
+ backgroundColor: c.palette.ink["6s"],
1742
+ color: c.palette.white["6s"],
1601
1743
  borderLeftWidth: 1,
1602
1744
  borderLeftStyle: "solid",
1603
1745
  borderTopWidth: 1,
1604
1746
  borderTopStyle: "solid",
1605
- borderColor: f.palette.white["2s"],
1606
- ...f.text.sm
1747
+ borderColor: c.palette.white["2s"],
1748
+ ...c.text.sm
1607
1749
  },
1608
1750
  children: [
1609
- /* @__PURE__ */ n("div", { css: { display: "flex", paddingInline: 8, alignItems: "center", height: 48 }, children: /* @__PURE__ */ n("h6", { css: { fontWeight: 500 }, children: e.name }) }),
1610
- /* @__PURE__ */ n(ce, { css: { paddingInline: 12, flex: 1 }, children: c ? /* @__PURE__ */ n(c, {}) : /* @__PURE__ */ n("div", { css: { display: "flex", flexDirection: "column", gap: 16 }, children: e.templates?.map((p, b) => /* @__PURE__ */ mn(Wr, { ...p, key: b })) }) })
1751
+ /* @__PURE__ */ r("div", { css: { display: "flex", paddingInline: 8, alignItems: "center", height: 48 }, children: /* @__PURE__ */ r("h6", { css: { fontWeight: 500 }, children: e.name }) }),
1752
+ /* @__PURE__ */ r(Be, { css: { paddingInline: 12, flex: 1 }, children: a ? /* @__PURE__ */ r(a, {}) : /* @__PURE__ */ r("div", { css: { display: "flex", flexDirection: "column", gap: 16 }, children: e.templates?.map((w, m) => /* @__PURE__ */ Gr(ro, { ...w, key: m })) }) })
1611
1753
  ]
1612
1754
  }
1613
1755
  ) }) })
1614
1756
  ] });
1615
- }, Wr = ({ template: e, autoFocus: t = !0, onCreate: o }) => {
1616
- const [, r] = P(!1), i = $(), { actions: s, connectors: l, resolver: a, query: d } = H((h) => ({
1617
- resolver: h.options.resolver
1618
- })), k = P(() => {
1619
- const h = typeof e == "function" ? e() : e;
1620
- let u;
1621
- "rootNodeId" in h ? u = h : u = d.parseReactElement(h).toNodeTree();
1622
- const { rootNodeId: c, nodes: p } = u, b = {};
1623
- return Object.entries(p).forEach(([g, x]) => {
1624
- const m = Xt(x.data, a), T = g === c ? _ : g;
1625
- b[T] = {
1626
- ...m,
1627
- parent: m.parent === c ? _ : m.parent,
1628
- nodes: m.nodes?.map((S) => S === c ? _ : S)
1757
+ }, ro = ({ template: e, autoFocus: t = !0, onCreate: o }) => {
1758
+ const [, n] = j(!1), i = U(), { actions: s, connectors: d, resolver: l, query: h } = G((u) => ({
1759
+ resolver: u.options.resolver
1760
+ })), f = j(() => {
1761
+ const u = typeof e == "function" ? e() : e;
1762
+ let p;
1763
+ "rootNodeId" in u ? p = u : p = h.parseReactElement(u).toNodeTree();
1764
+ const { rootNodeId: a, nodes: w } = p, m = {};
1765
+ return Object.entries(w).forEach(([g, y]) => {
1766
+ const v = yr(y.data, l), M = g === a ? X : g;
1767
+ m[M] = {
1768
+ ...v,
1769
+ parent: v.parent === a ? X : v.parent,
1770
+ nodes: v.nodes?.map((R) => R === a ? X : R)
1629
1771
  };
1630
- }), b;
1772
+ }), m;
1631
1773
  })[0];
1632
- return /* @__PURE__ */ n(
1774
+ return /* @__PURE__ */ r(
1633
1775
  "div",
1634
1776
  {
1635
1777
  css: {
@@ -1638,18 +1780,18 @@ const ir = [
1638
1780
  cursor: "grab",
1639
1781
  borderStyle: "solid",
1640
1782
  borderWidth: 1,
1641
- borderColor: f.palette.white["1s"]
1783
+ borderColor: c.palette.white["1s"]
1642
1784
  },
1643
- ref: (h) => {
1644
- h && l.create(h, e, {
1645
- onCreate(u) {
1646
- (typeof t == "function" ? t(u) : t) && s.selectNode(u.rootNodeId), o?.(u);
1785
+ ref: (u) => {
1786
+ u && d.create(u, e, {
1787
+ onCreate(p) {
1788
+ (typeof t == "function" ? t(p) : t) && s.selectNode(p.rootNodeId), o?.(p);
1647
1789
  }
1648
1790
  });
1649
1791
  },
1650
- onDragStart: () => r(!0),
1651
- onDragEnd: () => r(!1),
1652
- children: /* @__PURE__ */ n(
1792
+ onDragStart: () => n(!0),
1793
+ onDragEnd: () => n(!1),
1794
+ children: /* @__PURE__ */ r(
1653
1795
  "div",
1654
1796
  {
1655
1797
  css: {
@@ -1660,23 +1802,23 @@ const ir = [
1660
1802
  width: 240,
1661
1803
  aspectRatio: "16 / 9"
1662
1804
  },
1663
- children: /* @__PURE__ */ n("div", { css: { position: "absolute", inset: 0 }, children: /* @__PURE__ */ n(
1664
- ut,
1805
+ children: /* @__PURE__ */ r("div", { css: { position: "absolute", inset: 0 }, children: /* @__PURE__ */ r(
1806
+ Rt,
1665
1807
  {
1666
1808
  containerProps: {
1667
1809
  style: {
1668
1810
  backgroundColor: i.theme.palette.background.default
1669
1811
  }
1670
1812
  },
1671
- viewport: { width: bn.md.minWidth },
1672
- children: /* @__PURE__ */ n(rt, { resolver: a, children: /* @__PURE__ */ n(In, { data: k }) })
1813
+ viewport: { width: Hr.md.minWidth },
1814
+ children: /* @__PURE__ */ r(xt, { resolver: l, children: /* @__PURE__ */ r(Jr, { data: f }) })
1673
1815
  }
1674
1816
  ) })
1675
1817
  }
1676
1818
  )
1677
1819
  }
1678
1820
  );
1679
- }, Nr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1821
+ }, no = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1680
1822
  <path d="M12.5 2H9.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1681
1823
  <path d="M2 9.5V12.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1682
1824
  <path d="M10.257 16.6214L7.075 13.4394C6.489 12.8534 6.489 11.9034 7.075 11.3184V11.3184C7.661 10.7324 8.611 10.7324 9.196 11.3184" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
@@ -1687,56 +1829,56 @@ const ir = [
1687
1829
  <path d="M2 17V18C2 19.105 2.895 20 4 20H5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1688
1830
  <path d="M20 5V4C20 2.895 19.105 2 18 2H17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1689
1831
  </svg>
1690
- `, Rr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1832
+ `, oo = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1691
1833
  <circle cx="6.49771" cy="5.49762" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1692
1834
  <circle cx="6.49771" cy="18.503" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1693
1835
  <path d="M6.49771 7.99854V16.0019" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1694
1836
  <circle cx="17.5023" cy="13.0006" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1695
1837
  <path d="M6.49771 7.99854V7.99854C6.49771 10.7611 8.73722 13.0006 11.4998 13.0006H15.0013" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1696
1838
  </svg>
1697
- `, Ar = (e) => {
1698
- const { query: t, actions: o } = H(), {
1699
- id: r,
1839
+ `, so = (e) => {
1840
+ const { query: t, actions: o } = G(), {
1841
+ id: n,
1700
1842
  expanded: i,
1701
1843
  actions: s,
1702
- displayName: l,
1703
- children: a,
1704
- depth: d
1705
- } = en((p) => ({
1706
- expanded: p.expanded,
1707
- displayName: Ze(t.node(p.id).get())
1708
- })), { selected: k, selectable: h } = H((p, b) => {
1709
- const g = b.node(r).get();
1844
+ displayName: d,
1845
+ children: l,
1846
+ depth: h
1847
+ } = Er((w) => ({
1848
+ expanded: w.expanded,
1849
+ displayName: ft(t.node(w.id).get())
1850
+ })), { selected: f, selectable: u } = G((w, m) => {
1851
+ const g = m.node(n).get();
1710
1852
  return {
1711
- selected: b.getEvent("selected").contains(r),
1853
+ selected: m.getEvent("selected").contains(n),
1712
1854
  nodeDOM: g.dom,
1713
- selectable: Ue(g)
1855
+ selectable: gt(g)
1714
1856
  };
1715
1857
  });
1716
- V(() => {
1717
- r === _ && s.setExpandedState(!0);
1718
- }, [s, r]), V(() => {
1719
- if (a.length === 0) return;
1720
- a.some((b) => {
1858
+ z(() => {
1859
+ n === X && s.setExpandedState(!0);
1860
+ }, [s, n]), z(() => {
1861
+ if (l.length === 0) return;
1862
+ l.some((m) => {
1721
1863
  const g = t.getEvent("selected").all();
1722
- return g.includes(b) ? !0 : t.node(b).descendants(!0).some((m) => g.includes(m));
1864
+ return g.includes(m) ? !0 : t.node(m).descendants(!0).some((v) => g.includes(v));
1723
1865
  }) && s.setExpandedState(!0);
1724
- }, [a, s, t]);
1725
- const u = () => {
1726
- o.selectNode(r);
1727
- }, c = (p) => {
1728
- p.stopPropagation(), s.toggleLayer();
1866
+ }, [l, s, t]);
1867
+ const p = () => {
1868
+ o.selectNode(n);
1869
+ }, a = (w) => {
1870
+ w.stopPropagation(), s.toggleLayer();
1729
1871
  };
1730
- return /* @__PURE__ */ w(
1872
+ return /* @__PURE__ */ b(
1731
1873
  "div",
1732
1874
  {
1733
1875
  children: [
1734
- /* @__PURE__ */ w(
1876
+ /* @__PURE__ */ b(
1735
1877
  "div",
1736
1878
  {
1737
- onClick: u,
1879
+ onClick: p,
1738
1880
  style: {
1739
- paddingLeft: Math.max(0, d - 1) * 16
1881
+ paddingLeft: Math.max(0, h - 1) * 16
1740
1882
  },
1741
1883
  css: [
1742
1884
  {
@@ -1747,17 +1889,17 @@ const ir = [
1747
1889
  gap: 2,
1748
1890
  borderWidth: 1,
1749
1891
  borderStyle: "solid",
1750
- borderColor: f.palette.white["1s"],
1892
+ borderColor: c.palette.white["1s"],
1751
1893
  cursor: "pointer",
1752
1894
  borderRadius: 4,
1753
- "&:hover": { backgroundColor: f.palette.white["1s"] }
1895
+ "&:hover": { backgroundColor: c.palette.white["1s"] }
1754
1896
  },
1755
- !h && { pointerEvents: "none" },
1756
- k && { backgroundColor: f.palette.black["7s"] },
1757
- r === _ && { display: "none" }
1897
+ !u && { pointerEvents: "none" },
1898
+ f && { backgroundColor: c.palette.black["7s"] },
1899
+ n === X && { display: "none" }
1758
1900
  ],
1759
1901
  children: [
1760
- a.length ? /* @__PURE__ */ n(W, { css: { pointerEvents: "auto" }, onClick: c, children: /* @__PURE__ */ n(
1902
+ l.length ? /* @__PURE__ */ r(A, { css: { pointerEvents: "auto" }, onClick: a, children: /* @__PURE__ */ r(
1761
1903
  I,
1762
1904
  {
1763
1905
  css: [
@@ -1765,10 +1907,10 @@ const ir = [
1765
1907
  i && { transform: "rotate(0deg)" }
1766
1908
  ],
1767
1909
  size: 16,
1768
- source: Ge
1910
+ source: we
1769
1911
  }
1770
- ) }) : /* @__PURE__ */ n("div", { css: { padding: 4 }, children: /* @__PURE__ */ n(I, { size: 16, source: Rr }) }),
1771
- /* @__PURE__ */ n(
1912
+ ) }) : /* @__PURE__ */ r("div", { css: { padding: 4 }, children: /* @__PURE__ */ r(I, { size: 16, source: oo }) }),
1913
+ /* @__PURE__ */ r(
1772
1914
  "span",
1773
1915
  {
1774
1916
  css: [
@@ -1777,17 +1919,17 @@ const ir = [
1777
1919
  textOverflow: "ellipsis",
1778
1920
  whiteSpace: "nowrap",
1779
1921
  flex: 1,
1780
- ...ke.xs
1922
+ ...le.xs
1781
1923
  },
1782
- !h && { color: f.palette.white["3s"] }
1924
+ !u && { color: c.palette.white["3s"] }
1783
1925
  ],
1784
- children: l
1926
+ children: d
1785
1927
  }
1786
1928
  )
1787
1929
  ]
1788
1930
  }
1789
1931
  ),
1790
- /* @__PURE__ */ n(
1932
+ /* @__PURE__ */ r(
1791
1933
  "div",
1792
1934
  {
1793
1935
  css: {
@@ -1805,12 +1947,12 @@ const ir = [
1805
1947
  ]
1806
1948
  }
1807
1949
  );
1808
- }, Dr = ({ onClose: e }) => {
1809
- const t = En(), o = (r) => {
1810
- t.start(r);
1950
+ }, io = ({ onClose: e }) => {
1951
+ const t = en(), o = (n) => {
1952
+ t.start(n);
1811
1953
  };
1812
- return /* @__PURE__ */ n(he, { children: /* @__PURE__ */ w(
1813
- Kt.div,
1954
+ return /* @__PURE__ */ r(ce, { children: /* @__PURE__ */ b(
1955
+ Ir.div,
1814
1956
  {
1815
1957
  drag: !0,
1816
1958
  dragControls: t,
@@ -1821,14 +1963,14 @@ const ir = [
1821
1963
  display: "flex",
1822
1964
  flexDirection: "column",
1823
1965
  borderRadius: 6,
1824
- backgroundColor: f.palette.ink["6s"],
1966
+ backgroundColor: c.palette.ink["6s"],
1825
1967
  borderWidth: 1,
1826
1968
  borderStyle: "solid",
1827
- borderColor: f.palette.white["2s"],
1969
+ borderColor: c.palette.white["2s"],
1828
1970
  color: "white"
1829
1971
  },
1830
1972
  children: [
1831
- /* @__PURE__ */ w(
1973
+ /* @__PURE__ */ b(
1832
1974
  "div",
1833
1975
  {
1834
1976
  onPointerDown: o,
@@ -1841,24 +1983,24 @@ const ir = [
1841
1983
  cursor: "grab"
1842
1984
  },
1843
1985
  children: [
1844
- /* @__PURE__ */ w("div", { css: { display: "flex", alignItems: "center", gap: 8 }, children: [
1845
- /* @__PURE__ */ n(I, { source: Nr }),
1846
- /* @__PURE__ */ n(
1986
+ /* @__PURE__ */ b("div", { css: { display: "flex", alignItems: "center", gap: 8 }, children: [
1987
+ /* @__PURE__ */ r(I, { source: no }),
1988
+ /* @__PURE__ */ r(
1847
1989
  "p",
1848
1990
  {
1849
1991
  css: {
1850
- ...f.text.sm,
1992
+ ...c.text.sm,
1851
1993
  fontWeight: 500
1852
1994
  },
1853
1995
  children: "Layers"
1854
1996
  }
1855
1997
  )
1856
1998
  ] }),
1857
- /* @__PURE__ */ n(W, { onClick: e, children: /* @__PURE__ */ n(I, { source: _e }) })
1999
+ /* @__PURE__ */ r(A, { onClick: e, children: /* @__PURE__ */ r(I, { source: Pe }) })
1858
2000
  ]
1859
2001
  }
1860
2002
  ),
1861
- /* @__PURE__ */ n(
2003
+ /* @__PURE__ */ r(
1862
2004
  "div",
1863
2005
  {
1864
2006
  css: {
@@ -1866,16 +2008,16 @@ const ir = [
1866
2008
  overflow: "auto",
1867
2009
  borderTopWidth: 1,
1868
2010
  borderTopStyle: "solid",
1869
- borderColor: f.palette.white["1s"],
2011
+ borderColor: c.palette.white["1s"],
1870
2012
  flex: 1
1871
2013
  },
1872
- children: /* @__PURE__ */ n(Qt, { renderLayer: Ar })
2014
+ children: /* @__PURE__ */ r(Mr, { renderLayer: so })
1873
2015
  }
1874
2016
  )
1875
2017
  ]
1876
2018
  }
1877
2019
  ) });
1878
- }, pt = {
2020
+ }, Wt = {
1879
2021
  primary: "Primary",
1880
2022
  secondary: "Secondary",
1881
2023
  red: "Red",
@@ -1885,83 +2027,83 @@ const ir = [
1885
2027
  blue: "Blue",
1886
2028
  neutral: "Neutral",
1887
2029
  violet: "Violet"
1888
- }, Br = ["primary", "secondary"], Pr = Object.keys(pt), jr = [100, 200, 300, 400, 500, 600, 700, 800], Vr = () => {
1889
- const e = $(), t = !!e.handlers.saveTheme, o = e.theme.palette, r = G(e.theme), i = G(!1);
1890
- V(() => {
1891
- const c = r.current;
2030
+ }, ao = ["primary", "secondary"], lo = Object.keys(Wt), co = [100, 200, 300, 400, 500, 600, 700, 800], ho = () => {
2031
+ const e = U(), t = !!e.handlers.saveTheme, o = e.theme.palette, n = K(e.theme), i = K(!1);
2032
+ z(() => {
2033
+ const a = n.current;
1892
2034
  return () => {
1893
- i.current || e.setState({ theme: c });
2035
+ i.current || e.setState({ theme: a });
1894
2036
  };
1895
2037
  }, []);
1896
- const s = (c) => o[c], l = (c, p) => {
1897
- const b = s(c), g = {
2038
+ const s = (a) => o[a], d = (a, w) => {
2039
+ const m = s(a), g = {
1898
2040
  palette: {
1899
2041
  background: o.background,
1900
2042
  border: o.border,
1901
2043
  surface: o.surface,
1902
- [c]: { main: p, contrast: b.contrast }
2044
+ [a]: { main: w, contrast: m.contrast }
1903
2045
  }
1904
2046
  };
1905
- e.setState({ theme: Re(g) });
1906
- }, a = (c, p) => {
1907
- const b = s(c), g = {
2047
+ e.setState({ theme: tt(g) });
2048
+ }, l = (a, w) => {
2049
+ const m = s(a), g = {
1908
2050
  palette: {
1909
2051
  background: o.background,
1910
2052
  border: o.border,
1911
2053
  surface: o.surface,
1912
- [c]: { main: b[600], contrast: p }
2054
+ [a]: { main: m[600], contrast: w }
1913
2055
  }
1914
2056
  };
1915
- e.setState({ theme: Re(g) });
1916
- }, [d, k] = P(!1), h = async () => {
1917
- k(!0);
2057
+ e.setState({ theme: tt(g) });
2058
+ }, [h, f] = j(!1), u = async () => {
2059
+ f(!0);
1918
2060
  try {
1919
2061
  await e.handlers.saveTheme?.(e.theme), i.current = !0;
1920
2062
  } finally {
1921
- k(!1);
2063
+ f(!1);
1922
2064
  }
1923
- }, u = () => {
1924
- e.setState({ theme: r.current, action: void 0 });
2065
+ }, p = () => {
2066
+ e.setState({ theme: n.current, action: void 0 });
1925
2067
  };
1926
- return /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", height: "100%" }, children: [
1927
- /* @__PURE__ */ n("div", { css: { display: "flex", padding: 8, alignItems: "center" }, children: /* @__PURE__ */ n("h6", { css: { fontWeight: 500 }, children: "Palette" }) }),
1928
- /* @__PURE__ */ n(
1929
- ce,
2068
+ return /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", height: "100%" }, children: [
2069
+ /* @__PURE__ */ r("div", { css: { display: "flex", padding: 8, alignItems: "center" }, children: /* @__PURE__ */ r("h6", { css: { fontWeight: 500 }, children: "Palette" }) }),
2070
+ /* @__PURE__ */ r(
2071
+ Be,
1930
2072
  {
1931
2073
  css: {
1932
2074
  paddingInline: 8,
1933
2075
  paddingBlock: 8,
1934
2076
  borderTopWidth: 1,
1935
2077
  borderTopStyle: "solid",
1936
- borderColor: f.palette.white["1s"],
2078
+ borderColor: c.palette.white["1s"],
1937
2079
  flex: 1
1938
2080
  },
1939
- children: /* @__PURE__ */ n("div", { css: { display: "flex", flexDirection: "column", gap: 12 }, children: Pr.map((c) => {
1940
- const p = s(c), b = Br.includes(c);
1941
- return /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", gap: 4 }, children: [
1942
- /* @__PURE__ */ n("p", { css: { ...ke.xs, color: f.palette.white["4s"] }, children: pt[c] }),
1943
- /* @__PURE__ */ w("div", { css: { display: "flex", alignItems: "center", gap: 8 }, children: [
1944
- t && b && /* @__PURE__ */ w("div", { css: { display: "flex", gap: 4 }, children: [
1945
- /* @__PURE__ */ n(
1946
- Le,
2081
+ children: /* @__PURE__ */ r("div", { css: { display: "flex", flexDirection: "column", gap: 12 }, children: lo.map((a) => {
2082
+ const w = s(a), m = ao.includes(a);
2083
+ return /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", gap: 4 }, children: [
2084
+ /* @__PURE__ */ r("p", { css: { ...le.xs, color: c.palette.white["4s"] }, children: Wt[a] }),
2085
+ /* @__PURE__ */ b("div", { css: { display: "flex", alignItems: "center", gap: 8 }, children: [
2086
+ t && m && /* @__PURE__ */ b("div", { css: { display: "flex", gap: 4 }, children: [
2087
+ /* @__PURE__ */ r(
2088
+ Je,
1947
2089
  {
1948
2090
  hidePalette: !0,
1949
- color: p[600],
1950
- onChange: (g) => l(c, g),
2091
+ color: w[600],
2092
+ onChange: (g) => d(a, g),
1951
2093
  placement: "right-start"
1952
2094
  }
1953
2095
  ),
1954
- /* @__PURE__ */ n(
1955
- Le,
2096
+ /* @__PURE__ */ r(
2097
+ Je,
1956
2098
  {
1957
2099
  hidePalette: !0,
1958
- color: p.contrast,
1959
- onChange: (g) => a(c, g),
2100
+ color: w.contrast,
2101
+ onChange: (g) => l(a, g),
1960
2102
  placement: "right-start"
1961
2103
  }
1962
2104
  )
1963
2105
  ] }),
1964
- /* @__PURE__ */ n(
2106
+ /* @__PURE__ */ r(
1965
2107
  "div",
1966
2108
  {
1967
2109
  css: {
@@ -1969,7 +2111,7 @@ const ir = [
1969
2111
  gap: 4,
1970
2112
  flex: 1
1971
2113
  },
1972
- children: jr.map((g) => /* @__PURE__ */ n(
2114
+ children: co.map((g) => /* @__PURE__ */ r(
1973
2115
  "div",
1974
2116
  {
1975
2117
  css: {
@@ -1979,14 +2121,14 @@ const ir = [
1979
2121
  padding: 1,
1980
2122
  borderWidth: 1,
1981
2123
  borderStyle: "solid",
1982
- borderColor: f.palette.white["3s"]
2124
+ borderColor: c.palette.white["3s"]
1983
2125
  },
1984
- title: `${c}.${g}`,
1985
- children: /* @__PURE__ */ n(
2126
+ title: `${a}.${g}`,
2127
+ children: /* @__PURE__ */ r(
1986
2128
  "div",
1987
2129
  {
1988
2130
  css: { width: "100%", height: "100%", borderRadius: 1 },
1989
- style: { backgroundColor: p[g] }
2131
+ style: { backgroundColor: w[g] }
1990
2132
  }
1991
2133
  )
1992
2134
  },
@@ -1995,11 +2137,11 @@ const ir = [
1995
2137
  }
1996
2138
  )
1997
2139
  ] })
1998
- ] }, c);
2140
+ ] }, a);
1999
2141
  }) })
2000
2142
  }
2001
2143
  ),
2002
- t && /* @__PURE__ */ w(
2144
+ t && /* @__PURE__ */ b(
2003
2145
  "div",
2004
2146
  {
2005
2147
  css: {
@@ -2008,111 +2150,105 @@ const ir = [
2008
2150
  padding: 8,
2009
2151
  borderTopWidth: 1,
2010
2152
  borderTopStyle: "solid",
2011
- borderColor: f.palette.white["1s"]
2153
+ borderColor: c.palette.white["1s"]
2012
2154
  },
2013
2155
  children: [
2014
- /* @__PURE__ */ n(oe, { variant: "text", onClick: u, disabled: d, css: { flex: 1 }, children: "Cancel" }),
2015
- /* @__PURE__ */ n(oe, { onClick: h, isLoading: d, css: { flex: 1 }, children: d ? "Saving..." : "Save" })
2156
+ /* @__PURE__ */ r(me, { variant: "text", onClick: p, disabled: h, css: { flex: 1 }, children: "Cancel" }),
2157
+ /* @__PURE__ */ r(me, { onClick: u, isLoading: h, css: { flex: 1 }, children: h ? "Saving..." : "Save" })
2016
2158
  ]
2017
2159
  }
2018
2160
  )
2019
2161
  ] });
2020
- }, Fr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2162
+ }, uo = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2021
2163
  <path fill-rule="evenodd" clip-rule="evenodd" d="M3 7.024L11.987 11.049L21 7.024L12.013 3L3 7.024Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2022
2164
  <path d="M15.436 14.484L21 16.976L11.987 21L3 16.976L8.564 14.491" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2023
2165
  <path d="M15.436 9.50903L21 12L11.987 16.024L3 12L8.564 9.51603" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2024
2166
  </svg>
2025
- `, Or = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2026
- <path d="M5 12H19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2027
- <path d="M10 7L5 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2028
- <path d="M10 17L5 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2029
- </svg>
2030
- `, Hr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2167
+ `, po = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2031
2168
  <path fill-rule="evenodd" clip-rule="evenodd" d="M20.221 4.29206V4.29206C19.438 3.50906 18.183 3.46806 17.35 4.19606L9.31298 11.2281C8.44198 11.9901 8.39798 13.3291 9.21598 14.1471L10.365 15.2961C11.183 16.1141 12.523 16.0691 13.284 15.1991L20.316 7.16206C21.045 6.33006 21.003 5.07506 20.221 4.29206V4.29206Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2032
2169
  <path d="M10.87 9.87012L14.65 13.6501" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2033
2170
  <path fill-rule="evenodd" clip-rule="evenodd" d="M3.59903 20.3231H7.30203C10.287 20.3231 11.782 16.7141 9.67103 14.6031V14.6031C8.11903 13.0511 5.48303 13.6221 4.71303 15.6771L3.19103 19.7351C3.08503 20.0201 3.29503 20.3231 3.59903 20.3231Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2034
2171
  </svg>
2035
- `, $r = ({ insert: e }) => {
2036
- const [t, o] = ot(!1), { action: r = "insert", setState: i } = $(), { actions: s, isDeletable: l, focusedNode: a } = H((u, c) => {
2037
- const p = c.getEvent("selected").first(), b = p ? c.node(p) : null;
2172
+ `, go = ({ insert: e }) => {
2173
+ const [t, o] = pt(!1), { action: n = "insert", setState: i } = U(), { actions: s, isDeletable: d, focusedNode: l } = G((p, a) => {
2174
+ const w = a.getEvent("selected").first(), m = w ? a.node(w) : null;
2038
2175
  return {
2039
- enabled: u.options.enabled,
2040
- isDeletable: !!(b?.isDeletable() && (b.get().data.custom?.deletable ?? !0)),
2041
- focusedNode: b?.get()
2176
+ enabled: p.options.enabled,
2177
+ isDeletable: !!(m?.isDeletable() && (m.get().data.custom?.deletable ?? !0)),
2178
+ focusedNode: m?.get()
2042
2179
  };
2043
- }), d = () => {
2180
+ }), h = () => {
2044
2181
  s.selectNode();
2045
- }, k = (u) => {
2046
- s.delete(u.currentTarget.value);
2047
- }, h = (u) => {
2048
- const c = u.currentTarget.value;
2049
- c === "layers" ? o() : (d(), i({ action: c }));
2182
+ }, f = (p) => {
2183
+ s.delete(p.currentTarget.value);
2184
+ }, u = (p) => {
2185
+ const a = p.currentTarget.value;
2186
+ a === "layers" ? o() : (h(), i({ action: a }));
2050
2187
  };
2051
- return /* @__PURE__ */ w(ie, { children: [
2052
- /* @__PURE__ */ w(
2188
+ return /* @__PURE__ */ b(J, { children: [
2189
+ /* @__PURE__ */ b(
2053
2190
  "aside",
2054
2191
  {
2055
2192
  css: {
2056
2193
  display: "flex",
2057
2194
  position: "relative",
2058
2195
  alignItems: "stretch",
2059
- backgroundColor: f.palette.ink["6s"],
2060
- color: f.palette.white["6s"],
2196
+ backgroundColor: c.palette.ink["6s"],
2197
+ color: c.palette.white["6s"],
2061
2198
  borderTopWidth: 1,
2062
2199
  borderTopStyle: "solid",
2063
- borderColor: f.palette.white["2s"],
2064
- ...f.text.sm
2200
+ borderColor: c.palette.white["2s"]
2065
2201
  },
2066
2202
  children: [
2067
- /* @__PURE__ */ w("div", { css: { display: "flex", paddingInline: 4, flexDirection: "column", gap: 4 }, children: [
2068
- !!e && /* @__PURE__ */ w(Oe, { children: [
2069
- /* @__PURE__ */ n(
2070
- W,
2203
+ /* @__PURE__ */ b("div", { css: { display: "flex", paddingInline: 4, flexDirection: "column", gap: 4 }, children: [
2204
+ !!e && /* @__PURE__ */ b(ct, { children: [
2205
+ /* @__PURE__ */ r(
2206
+ A,
2071
2207
  {
2072
2208
  tooltip: {
2073
2209
  content: "Insert",
2074
2210
  placement: "right"
2075
2211
  },
2076
- onClick: h,
2212
+ onClick: u,
2077
2213
  value: "insert",
2078
2214
  css: { position: "relative" },
2079
2215
  size: "32",
2080
- children: /* @__PURE__ */ n(I, { source: $e })
2216
+ children: /* @__PURE__ */ r(I, { source: ht })
2081
2217
  }
2082
2218
  ),
2083
- /* @__PURE__ */ n("hr", { css: { borderColor: f.palette.white["2s"] } })
2219
+ /* @__PURE__ */ r("hr", { css: { borderColor: c.palette.white["2s"] } })
2084
2220
  ] }),
2085
- /* @__PURE__ */ n(
2086
- W,
2221
+ /* @__PURE__ */ r(
2222
+ A,
2087
2223
  {
2088
2224
  tooltip: {
2089
2225
  content: "Layers",
2090
2226
  placement: "right"
2091
2227
  },
2092
- onClick: h,
2228
+ onClick: u,
2093
2229
  value: "layers",
2094
2230
  css: { position: "relative" },
2095
2231
  size: "32",
2096
- children: /* @__PURE__ */ n(I, { source: Fr })
2232
+ children: /* @__PURE__ */ r(I, { source: uo })
2097
2233
  }
2098
2234
  ),
2099
- /* @__PURE__ */ n("hr", { css: { borderColor: f.palette.white["2s"] } }),
2100
- /* @__PURE__ */ n(
2101
- W,
2235
+ /* @__PURE__ */ r("hr", { css: { borderColor: c.palette.white["2s"] } }),
2236
+ /* @__PURE__ */ r(
2237
+ A,
2102
2238
  {
2103
2239
  tooltip: {
2104
2240
  content: "Theme",
2105
2241
  placement: "right"
2106
2242
  },
2107
- onClick: h,
2243
+ onClick: u,
2108
2244
  value: "theme",
2109
2245
  css: { position: "relative" },
2110
2246
  size: "32",
2111
- children: /* @__PURE__ */ n(I, { source: Hr })
2247
+ children: /* @__PURE__ */ r(I, { source: po })
2112
2248
  }
2113
2249
  )
2114
2250
  ] }),
2115
- /* @__PURE__ */ w(
2251
+ /* @__PURE__ */ b(
2116
2252
  "div",
2117
2253
  {
2118
2254
  css: {
@@ -2123,18 +2259,18 @@ const ir = [
2123
2259
  width: 288,
2124
2260
  borderLeftWidth: 1,
2125
2261
  borderLeftStyle: "solid",
2126
- borderColor: f.palette.white["1s"]
2262
+ borderColor: c.palette.white["1s"]
2127
2263
  },
2128
2264
  children: [
2129
- r === "theme" && /* @__PURE__ */ n("div", { css: { overflow: "auto", flex: 1 }, children: /* @__PURE__ */ n(Vr, {}) }),
2130
- r !== "theme" && !a?.related.inspector && /* @__PURE__ */ n("div", { css: { overflow: "auto", flex: 1 }, children: r === "insert" && !!e && /* @__PURE__ */ n(Mr, { groups: e.groups }) }),
2131
- r !== "theme" && !!a?.related?.inspector && /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", overflow: "hidden", flex: 1 }, children: [
2132
- /* @__PURE__ */ w("div", { css: { display: "flex", paddingInline: 8, paddingBlock: 8, alignItems: "center", gap: 8 }, children: [
2133
- /* @__PURE__ */ n(W, { onClick: d, children: /* @__PURE__ */ n(I, { source: Or }) }),
2134
- /* @__PURE__ */ n("div", { css: { overflow: "hidden", flex: 1 }, children: /* @__PURE__ */ n(ze, { fullWidth: !0, value: Ze(a), size: "32" }) }),
2135
- l && /* @__PURE__ */ n(W, { value: a.id, onClick: k, children: /* @__PURE__ */ n(I, { css: { color: f.palette.red["4s"] }, source: tn }) })
2265
+ n === "theme" && /* @__PURE__ */ r("div", { css: { overflow: "auto", flex: 1 }, children: /* @__PURE__ */ r(ho, {}) }),
2266
+ n !== "theme" && !l?.related.inspector && /* @__PURE__ */ r("div", { css: { overflow: "auto", flex: 1 }, children: n === "insert" && !!e && /* @__PURE__ */ r(Kn, { groups: e.groups }) }),
2267
+ n !== "theme" && !!l?.related?.inspector && /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", overflow: "hidden", flex: 1 }, children: [
2268
+ /* @__PURE__ */ b("div", { css: { display: "flex", paddingInline: 8, paddingBlock: 8, alignItems: "center", gap: 8 }, children: [
2269
+ /* @__PURE__ */ r(A, { onClick: h, children: /* @__PURE__ */ r(I, { source: Lr }) }),
2270
+ /* @__PURE__ */ r("div", { css: { overflow: "hidden", flex: 1 }, children: /* @__PURE__ */ r(ut, { fullWidth: !0, value: ft(l), size: "32" }) }),
2271
+ d && /* @__PURE__ */ r(A, { value: l.id, onClick: f, children: /* @__PURE__ */ r(I, { css: { color: c.palette.red["4s"] }, source: Rr }) })
2136
2272
  ] }),
2137
- /* @__PURE__ */ n(
2273
+ /* @__PURE__ */ r(
2138
2274
  "div",
2139
2275
  {
2140
2276
  css: {
@@ -2142,9 +2278,9 @@ const ir = [
2142
2278
  flex: 1,
2143
2279
  borderTopWidth: 1,
2144
2280
  borderTopStyle: "solid",
2145
- borderColor: f.palette.white["1s"]
2281
+ borderColor: c.palette.white["1s"]
2146
2282
  },
2147
- children: /* @__PURE__ */ n(pn, { fallback: null, children: Ye(a.related.inspector) })
2283
+ children: /* @__PURE__ */ r(Fr, { fallback: null, children: bt(l.related.inspector) })
2148
2284
  }
2149
2285
  )
2150
2286
  ] })
@@ -2154,20 +2290,20 @@ const ir = [
2154
2290
  ]
2155
2291
  }
2156
2292
  ),
2157
- t && /* @__PURE__ */ n(Dr, { onClose: o })
2293
+ t && /* @__PURE__ */ r(io, { onClose: o })
2158
2294
  ] });
2159
- }, _r = () => {
2160
- const { dom: e } = me((s) => ({
2295
+ }, fo = () => {
2296
+ const { dom: e } = je((s) => ({
2161
2297
  dom: s.dom
2162
- })), { document: t } = ve(), { floatingStyles: o, refs: r } = le({
2298
+ })), { document: t } = Oe(), { floatingStyles: o, refs: n } = Ce({
2163
2299
  open: !0,
2164
2300
  strategy: "fixed",
2165
2301
  placement: "bottom-start",
2166
2302
  middleware: [
2167
2303
  {
2168
2304
  name: "overlay",
2169
- fn({ rects: s, elements: l }) {
2170
- return Object.assign(l.floating.style, {
2305
+ fn({ rects: s, elements: d }) {
2306
+ return Object.assign(d.floating.style, {
2171
2307
  width: `${s.reference.width}px`,
2172
2308
  height: `${s.reference.height}px`
2173
2309
  }), {
@@ -2177,13 +2313,13 @@ const ir = [
2177
2313
  }
2178
2314
  }
2179
2315
  ],
2180
- whileElementsMounted: de
2316
+ whileElementsMounted: xe
2181
2317
  });
2182
- V(() => {
2183
- r.setReference(e);
2184
- }, [e, r]);
2185
- const i = gn((s) => r.setFloating(s), [r]);
2186
- return e ? /* @__PURE__ */ n(he, { root: t?.body, children: /* @__PURE__ */ n(
2318
+ z(() => {
2319
+ n.setReference(e);
2320
+ }, [e, n]);
2321
+ const i = oe((s) => n.setFloating(s), [n]);
2322
+ return e ? /* @__PURE__ */ r(ce, { root: t?.body, children: /* @__PURE__ */ r(
2187
2323
  "div",
2188
2324
  {
2189
2325
  ref: i,
@@ -2193,49 +2329,49 @@ const ir = [
2193
2329
  zIndex: 9999,
2194
2330
  borderWidth: 1,
2195
2331
  borderStyle: "dashed",
2196
- borderColor: f.palette.ink["6s"]
2332
+ borderColor: c.palette.ink["6s"]
2197
2333
  }
2198
2334
  }
2199
2335
  ) }) : null;
2200
- }, zr = ({ render: e }) => {
2201
- const { id: t, toolbar: o } = me((s) => ({
2202
- toolbar: sn(s).toolbar
2203
- })), { mode: r } = $(), { isActiveSelectable: i } = H((s, l) => {
2204
- const a = l.getEvent("selected").contains(t) && t !== _, d = a ? Ue(l.node(t).get()) : !1;
2205
- return { isActiveSelectable: a && d };
2336
+ }, bo = ({ render: e }) => {
2337
+ const { id: t, toolbar: o } = je((s) => ({
2338
+ toolbar: Dr(s).toolbar
2339
+ })), { mode: n } = U(), { isActiveSelectable: i } = G((s, d) => {
2340
+ const l = d.getEvent("selected").contains(t) && t !== X, h = l ? gt(d.node(t).get()) : !1;
2341
+ return { isActiveSelectable: l && h };
2206
2342
  });
2207
- return /* @__PURE__ */ w(ie, { children: [
2208
- i && r === "full" && /* @__PURE__ */ w(ie, { children: [
2209
- /* @__PURE__ */ n(Gr, { children: o ? Ye(o) : /* @__PURE__ */ n(Ur, {}) }),
2210
- /* @__PURE__ */ n(_r, {})
2343
+ return /* @__PURE__ */ b(J, { children: [
2344
+ i && n === "full" && /* @__PURE__ */ b(J, { children: [
2345
+ /* @__PURE__ */ r(wo, { children: o ? bt(o) : /* @__PURE__ */ r(mo, {}) }),
2346
+ /* @__PURE__ */ r(fo, {})
2211
2347
  ] }),
2212
2348
  e
2213
2349
  ] });
2214
- }, Gr = ({ children: e }) => {
2215
- const { dom: t } = me((s) => ({ dom: s.dom })), { document: o } = ve(), { floatingStyles: r, refs: i } = le({
2350
+ }, wo = ({ children: e }) => {
2351
+ const { dom: t } = je((s) => ({ dom: s.dom })), { document: o } = Oe(), { floatingStyles: n, refs: i } = Ce({
2216
2352
  open: !0,
2217
2353
  placement: "bottom-start",
2218
- middleware: [Ce(), qe(4)],
2219
- whileElementsMounted: de
2354
+ middleware: [Ve(), wt(4)],
2355
+ whileElementsMounted: xe
2220
2356
  });
2221
- return V(() => {
2357
+ return z(() => {
2222
2358
  i.setReference(t);
2223
- }, [t, i]), t ? /* @__PURE__ */ n(he, { root: o?.body, children: /* @__PURE__ */ n(
2359
+ }, [t, i]), t ? /* @__PURE__ */ r(ce, { root: o?.body, children: /* @__PURE__ */ r(
2224
2360
  "div",
2225
2361
  {
2226
2362
  css: {
2227
2363
  paddingBlock: 4,
2228
2364
  paddingInline: 6,
2229
- backgroundColor: f.palette.ink["6s"],
2230
- color: f.palette.white["6s"],
2365
+ backgroundColor: c.palette.ink["6s"],
2366
+ color: c.palette.white["6s"],
2231
2367
  borderRadius: 4
2232
2368
  },
2233
2369
  ref: i.setFloating,
2234
- style: r,
2370
+ style: n,
2235
2371
  children: e
2236
2372
  }
2237
2373
  ) }) : null;
2238
- }, Ur = () => /* @__PURE__ */ w(
2374
+ }, mo = () => /* @__PURE__ */ b(
2239
2375
  "div",
2240
2376
  {
2241
2377
  css: {
@@ -2244,29 +2380,31 @@ const ir = [
2244
2380
  gap: 4
2245
2381
  },
2246
2382
  children: [
2247
- /* @__PURE__ */ n(nn, {}),
2248
- /* @__PURE__ */ n(rn, {}),
2249
- /* @__PURE__ */ n(on, {})
2383
+ /* @__PURE__ */ r(Wr, {}),
2384
+ /* @__PURE__ */ r(Nr, {}),
2385
+ /* @__PURE__ */ r(Ar, {})
2250
2386
  ]
2251
2387
  }
2252
- ), To = ({
2388
+ ), Uo = ({
2253
2389
  theme: e,
2254
2390
  insert: t,
2255
2391
  resolver: o,
2256
- handlers: r,
2392
+ handlers: n,
2257
2393
  variableDefinitions: i,
2258
2394
  headerActions: s,
2395
+ resources: d,
2259
2396
  children: l
2260
2397
  }) => {
2261
- const { screen: a } = $({
2398
+ const { screen: h } = U({
2262
2399
  theme: e,
2263
- handlers: r,
2400
+ handlers: n,
2264
2401
  mode: "full",
2265
2402
  screen: "xs",
2266
- variableDefinitions: i
2403
+ variableDefinitions: i,
2404
+ resources: d
2267
2405
  });
2268
- return /* @__PURE__ */ w(rt, { enabled: !0, onRender: zr, resolver: o, children: [
2269
- /* @__PURE__ */ w(
2406
+ return /* @__PURE__ */ b(xt, { enabled: !0, onRender: bo, resolver: o, children: [
2407
+ /* @__PURE__ */ b(
2270
2408
  "div",
2271
2409
  {
2272
2410
  css: {
@@ -2274,18 +2412,19 @@ const ir = [
2274
2412
  flexDirection: "column",
2275
2413
  width: "100vw",
2276
2414
  height: "100vh",
2277
- backgroundColor: fe.ink["6s"],
2278
- color: fe.white["6s"]
2415
+ backgroundColor: Ne.ink["6s"],
2416
+ color: Ne.white["6s"],
2417
+ ...le.xs
2279
2418
  },
2280
2419
  children: [
2281
- /* @__PURE__ */ n(dr, { actions: s }),
2282
- /* @__PURE__ */ w("div", { css: { display: "flex", overflow: "hidden", flex: 1 }, children: [
2283
- /* @__PURE__ */ n($r, { insert: t }),
2284
- /* @__PURE__ */ n(
2285
- ut,
2420
+ /* @__PURE__ */ r(Bn, { actions: s }),
2421
+ /* @__PURE__ */ b("div", { css: { display: "flex", overflow: "hidden", flex: 1 }, children: [
2422
+ /* @__PURE__ */ r(go, { insert: t }),
2423
+ /* @__PURE__ */ r(
2424
+ Rt,
2286
2425
  {
2287
2426
  viewport: {
2288
- width: (d) => a === "lg" ? Math.max(d, We[a]) : We[a]
2427
+ width: (f) => h === "lg" ? Math.max(f, Ke[h]) : Ke[h]
2289
2428
  },
2290
2429
  children: l
2291
2430
  }
@@ -2294,109 +2433,111 @@ const ir = [
2294
2433
  ]
2295
2434
  }
2296
2435
  ),
2297
- /* @__PURE__ */ n(an, {})
2436
+ /* @__PURE__ */ r(Pr, {})
2298
2437
  ] });
2299
2438
  };
2300
2439
  export {
2301
- So as AspectRatioToolbar,
2302
- Eo as BackgroundToolbar,
2303
- Lo as BorderRadiusToolbar,
2304
- Wo as BorderToolbar,
2305
- No as ChildNodesToolbar,
2306
- Ro as ColorPickerContent,
2307
- Le as ColorPickerPopover,
2308
- Ao as ColorPreview,
2309
- Lt as ColorToolbar,
2310
- Do as ColorVariantToolbar,
2311
- Bo as ColumnGapToolbar,
2312
- Nt as CssFontWeightToolbar,
2313
- xt as CssSizeInput,
2314
- Po as CssTextAlignToolbar,
2315
- jo as CssWidthToolbar,
2316
- ko as DegreePicker,
2317
- Co as DisplayToolbar,
2318
- To as Editor,
2319
- Vo as FlexAlignItemsToolbar,
2320
- vo as FlexToolbar,
2321
- Fo as FlexWrapToolbar,
2322
- Oo as FontSizeToolbar,
2323
- ut as FramePreview,
2324
- Ho as GridAlignItemsToolbar,
2325
- $o as HeightToolbar,
2326
- _o as HtmlAnchorTargetToolbar,
2327
- zo as ImageSourceSelection,
2328
- Go as InsertInlineToolbar,
2329
- Uo as InsertLinkToolbar,
2330
- Zo as JustifyContentToolbar,
2331
- Yo as JustifyItemsToolbar,
2332
- mo as LineHeightToolbar,
2333
- Xo as MarginToolbar,
2334
- xo as MinWidthToolbar,
2335
- on as NodeDeleteToolbar,
2336
- nn as NodeDragToolbar,
2337
- rn as NodeNameToolbar,
2338
- qo as NumberField,
2339
- Jo as NumberFieldMixOptions,
2340
- Ko as ObjectFitToolbar,
2341
- Qo as OrderToolbar,
2342
- es as PaddingToolbar,
2343
- ts as RowGapToolbar,
2344
- ns as SvgSourceToolbar,
2345
- rs as TagNameToolbar,
2346
- Et as TextSizeVariantToolbar,
2347
- yo as TextStyleGroupToolbar,
2348
- Wt as TextStyleToolbar,
2349
- Rt as TextTransformToolbar,
2350
- J as ToolbarField,
2351
- os as ToolbarGroup,
2352
- ss as VisibilityToolbar,
2353
- oe as WbButton,
2354
- At as WbButtonGroup,
2355
- qt as WbCollapse,
2356
- is as WbColorPicker,
2357
- as as WbDatePicker,
2358
- go as WbDialog,
2359
- bo as WbDialogBody,
2360
- cs as WbDialogClose,
2361
- ls as WbDialogFooter,
2362
- ds as WbDialogHeader,
2363
- hs as WbDropzone,
2364
- Ln as WbFloating,
2365
- us as WbFloatingClose,
2366
- bt as WbFloatingContent,
2367
- ft as WbFloatingContext,
2368
- wo as WbFormLabel,
2440
+ Xo as AspectRatioToolbar,
2441
+ qo as BackgroundToolbar,
2442
+ Jo as BorderRadiusToolbar,
2443
+ Ko as BorderToolbar,
2444
+ Qo as ChildNodesToolbar,
2445
+ es as ColorPickerContent,
2446
+ Je as ColorPickerPopover,
2447
+ ts as ColorPreview,
2448
+ nr as ColorToolbar,
2449
+ rs as ColorVariantToolbar,
2450
+ ns as ColumnGapToolbar,
2451
+ sr as CssFontWeightToolbar,
2452
+ qt as CssSizeInput,
2453
+ os as CssTextAlignToolbar,
2454
+ ss as CssWidthToolbar,
2455
+ Fo as DegreePicker,
2456
+ Ho as DisplayToolbar,
2457
+ Uo as Editor,
2458
+ is as FlexAlignItemsToolbar,
2459
+ zo as FlexToolbar,
2460
+ as as FlexWrapToolbar,
2461
+ ls as FontSizeToolbar,
2462
+ Rt as FramePreview,
2463
+ cs as GridAlignItemsToolbar,
2464
+ ds as HeightToolbar,
2465
+ hs as HtmlAnchorTargetToolbar,
2466
+ us as ImageGalleryDialog,
2467
+ ps as ImageSourceSelection,
2468
+ gs as InsertInlineToolbar,
2469
+ fs as InsertLinkToolbar,
2470
+ bs as JustifyContentToolbar,
2471
+ ws as JustifyItemsToolbar,
2472
+ $o as LineHeightToolbar,
2473
+ ms as MarginToolbar,
2474
+ _o as MinWidthToolbar,
2475
+ Ar as NodeDeleteToolbar,
2476
+ Wr as NodeDragToolbar,
2477
+ Nr as NodeNameToolbar,
2478
+ ks as NumberField,
2479
+ vs as NumberFieldMixOptions,
2480
+ Cs as ObjectFitToolbar,
2481
+ xs as OrderToolbar,
2482
+ ys as PaddingToolbar,
2483
+ Ts as RowGapToolbar,
2484
+ Ss as SvgSourceToolbar,
2485
+ Is as TagNameToolbar,
2486
+ rr as TextSizeVariantToolbar,
2487
+ Go as TextStyleGroupToolbar,
2488
+ or as TextStyleToolbar,
2489
+ ir as TextTransformToolbar,
2490
+ ae as ToolbarField,
2491
+ Ms as ToolbarGroup,
2492
+ Es as VisibilityToolbar,
2493
+ me as WbButton,
2494
+ ar as WbButtonGroup,
2495
+ jo as WbCascader,
2496
+ Tr as WbCollapse,
2497
+ Ls as WbColorPicker,
2498
+ Rs as WbDatePicker,
2499
+ Ws as WbDialog,
2500
+ Ns as WbDialogBody,
2501
+ As as WbDialogClose,
2502
+ Ds as WbDialogFooter,
2503
+ Ps as WbDialogHeader,
2504
+ Bs as WbDropzone,
2505
+ js as WbFloating,
2506
+ Vs as WbFloatingClose,
2507
+ Os as WbFloatingContent,
2508
+ Fs as WbFloatingContext,
2509
+ Oo as WbFormLabel,
2369
2510
  I as WbIcon,
2370
- W as WbIconButton,
2371
- ze as WbInput,
2372
- mt as WbInputNumber,
2373
- ps as WbLoadingOverlay,
2374
- gs as WbMenu,
2375
- fs as WbMenuItem,
2376
- bs as WbMenuList,
2377
- ws as WbMenuTrigger,
2378
- yt as WbPopover,
2379
- St as WbPopoverClose,
2380
- Mt as WbPopoverContent,
2381
- Tt as WbPopoverTrigger,
2382
- He as WbRadioButton,
2383
- ce as WbScrollView,
2384
- vt as WbSelect,
2385
- Jt as WbSvgLoader,
2386
- ks as WbSwitch,
2387
- ms as WbTab,
2388
- Cs as WbTabContent,
2389
- vs as WbTabList,
2390
- xs as WbTabPanel,
2391
- ys as WbTabs,
2392
- Ts as WbTextarea,
2393
- Is as WbTooltip,
2394
- Ms as WbVirtualizedList,
2395
- Ss as pushToast,
2396
- Es as textSizeVariantOptions,
2397
- fo as useDialogContext,
2398
- $ as useEditor,
2399
- Ls as useEditorResponsive,
2400
- Ws as useInlineEditable,
2401
- wt as useWbFloatingContext
2511
+ A as WbIconButton,
2512
+ ut as WbInput,
2513
+ Yt as WbInputNumber,
2514
+ $s as WbLoadingOverlay,
2515
+ Hs as WbMenu,
2516
+ zs as WbMenuItem,
2517
+ _s as WbMenuList,
2518
+ Gs as WbMenuTrigger,
2519
+ Jt as WbPopover,
2520
+ tr as WbPopoverClose,
2521
+ er as WbPopoverContent,
2522
+ Kt as WbPopoverTrigger,
2523
+ dt as WbRadioButton,
2524
+ Be as WbScrollView,
2525
+ Xt as WbSelect,
2526
+ Sr as WbSvgLoader,
2527
+ Us as WbSwitch,
2528
+ Ys as WbTab,
2529
+ Zs as WbTabContent,
2530
+ Xs as WbTabList,
2531
+ qs as WbTabPanel,
2532
+ Js as WbTabs,
2533
+ Ks as WbTextarea,
2534
+ Qs as WbTooltip,
2535
+ ei as WbVirtualizedList,
2536
+ ti as pushToast,
2537
+ ri as textSizeVariantOptions,
2538
+ Vo as useDialogContext,
2539
+ U as useEditor,
2540
+ ni as useEditorResponsive,
2541
+ oi as useInlineEditable,
2542
+ Gt as useWbFloatingContext
2402
2543
  };