@janbox/storefront-builder 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/editor.js CHANGED
@@ -1,305 +1,18 @@
1
- import { b as E, g as x, a as e, c as b, d as ie, j as i, N as R, B as z, F as _, e as le, f as ae, u as C, W as ce, h as de, i as $, k as we, P as he } from "./countdown-timer.node-CTPWHLr7.js";
2
- import { a as ue, b as A, c as S, D as pe, d as me, W as p, e as k, f as ge, g as fe, h as G, i as U, j as ke, k as be, l as F, m as ve, n as D, o as H, F as Ce, A as q, p as xe, C as Z, q as Q, r as Ne, s as ye, T as Le, t as V, R as Se } from "./index-CY7cmOMU.js";
3
- import { v as Ft } from "./index-CY7cmOMU.js";
4
- import je from "mitt";
5
- import { createContext as X, useRef as K, useState as j, useEffect as N, createElement as Y, Fragment as L, Suspense as Ee } from "react";
6
- import { useToggle as J } from "usehooks-ts";
7
- import { Global as ee, CacheProvider as Me, createElement as De } from "@emotion/react";
8
- import { useFloating as We, autoUpdate as Ae, flip as Ie, size as Re, useHover as ze, safePolygon as Fe, useFocus as He, useDismiss as Ve, useRole as Te, useInteractions as Pe, FloatingPortal as te } from "@floating-ui/react";
9
- import { flatten as Be } from "flat";
10
- import { flatMap as Oe, throttle as _e, isFunction as T, isNumber as P } from "lodash-es";
11
- import $e, { useFrame as Ge } from "react-frame-component";
12
- import { Layers as Ue, useLayer as qe } from "@craftjs/layers";
13
- import { useNode as Ze, ROOT_NODE as W } from "@craftjs/core";
14
- const oe = "en", Qe = X(oe), M = (s, t = !0) => {
15
- const r = `--text-${s}--{{property}}`, o = t ? `var(${r})` : r;
16
- return {
17
- fontSize: o.replace("{{property}}", "font-size"),
18
- lineHeight: o.replace("{{property}}", "line-height")
19
- };
20
- }, Xe = X(null), Ke = ({ theme: s, children: t, locale: r = oe }) => /* @__PURE__ */ E.jsxs(Xe.Provider, { value: s, children: [
21
- /* @__PURE__ */ E.jsx(ee, { styles: Ye(s) }),
22
- /* @__PURE__ */ E.jsx(Qe.Provider, { value: r, children: t })
23
- ] }), Ye = ({ palette: s, typography: t }) => {
24
- const r = Be(s), o = Object.fromEntries(
25
- Object.keys(r).map((n) => [x(n, !1), r[n]])
26
- ), w = Object.fromEntries(
27
- Oe(
28
- Object.keys(t).map((n) => {
29
- const d = M(n, !1), { fontSize: l, lineHeight: a } = t[n];
30
- return [
31
- [d.fontSize, l],
32
- [d.lineHeight, a]
33
- ];
34
- })
35
- )
36
- );
37
- return {
38
- // ─── Reset / Preflight ───────────────────────────────────────────────────
39
- // 1. Prevent padding and border from affecting element width.
40
- // 2. Allow adding a border to an element by just adding a border-width.
41
- "*, ::before, ::after": {
42
- boxSizing: "border-box",
43
- // 1
44
- borderWidth: 0,
45
- // 2
46
- borderStyle: "solid",
47
- // 2
48
- borderColor: x("border.default")
49
- },
50
- // 1. Use a consistent sensible line-height in all browsers.
51
- // 2. Prevent adjustments of font size after orientation changes in iOS.
52
- // 3. Use a more readable tab size.
53
- // 4. Use the user's configured `sans` font-family by default.
54
- // 5. Use the user's configured `sans` font-feature-settings by default.
55
- // 6. Use the user's configured `sans` font-variation-settings by default.
56
- // 7. Disable tap highlights on iOS
57
- "html, :host": {
58
- lineHeight: 1.5,
59
- // 1
60
- WebkitTextSizeAdjust: "100%",
61
- // 2
62
- MozTabSize: 4,
63
- // 3
64
- tabSize: 4,
65
- // 3
66
- fontFamily: 'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
67
- // 4
68
- fontFeatureSettings: "normal",
69
- // 5
70
- fontVariationSettings: "normal",
71
- // 6
72
- WebkitTapHighlightColor: "transparent"
73
- // 7
74
- },
75
- // 1. Remove the margin in all browsers.
76
- // 2. Inherit line-height from `html` — overridden below by app-level typography.
77
- body: {
78
- margin: 0,
79
- // 1
80
- // ─── App-level styles ───────────────────────────────────────────
81
- display: "flex",
82
- flexDirection: "column",
83
- minHeight: "100dvh",
84
- color: x("neutral.600"),
85
- backgroundColor: x("background.default"),
86
- fontSize: M("sm").fontSize,
87
- lineHeight: M("sm").lineHeight
88
- },
89
- // 1. Add the correct height in Firefox.
90
- // 2. Correct the inheritance of border color in Firefox.
91
- // 3. Ensure horizontal rules are visible by default.
92
- hr: {
93
- height: 0,
94
- // 1
95
- color: "inherit",
96
- // 2
97
- borderTopWidth: "1px"
98
- // 3
99
- },
100
- // Add the correct text decoration in Chrome, Edge, and Safari.
101
- "abbr:where([title])": {
102
- textDecoration: "underline dotted"
103
- },
104
- // Remove the default font size and weight for headings.
105
- "h1, h2, h3, h4, h5, h6": {
106
- fontSize: "inherit",
107
- fontWeight: "inherit"
108
- },
109
- // Reset links to optimize for opt-in styling instead of opt-out.
110
- a: {
111
- color: "inherit",
112
- textDecoration: "inherit"
113
- },
114
- // Add the correct font weight in Edge and Safari.
115
- "b, strong": {
116
- fontWeight: "bolder"
117
- },
118
- // 1. Use the user's configured `mono` font-family by default.
119
- // 2. Use the user's configured `mono` font-feature-settings by default.
120
- // 3. Use the user's configured `mono` font-variation-settings by default.
121
- // 4. Correct the odd `em` font sizing in all browsers.
122
- "code, kbd, samp, pre": {
123
- fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
124
- // 1
125
- fontFeatureSettings: "normal",
126
- // 2
127
- fontVariationSettings: "normal",
128
- // 3
129
- fontSize: "1em"
130
- // 4
131
- },
132
- // Add the correct font size in all browsers.
133
- small: {
134
- fontSize: "80%"
135
- },
136
- // Prevent `sub` and `sup` elements from affecting the line height in all browsers.
137
- "sub, sup": {
138
- fontSize: "75%",
139
- lineHeight: 0,
140
- position: "relative",
141
- verticalAlign: "baseline"
142
- },
143
- sub: {
144
- bottom: "-0.25em"
145
- },
146
- sup: {
147
- top: "-0.5em"
148
- },
149
- // 1. Remove text indentation from table contents in Chrome and Safari.
150
- // 2. Correct table border color inheritance in all Chrome and Safari.
151
- // 3. Remove gaps between table borders by default.
152
- table: {
153
- textIndent: 0,
154
- // 1
155
- borderColor: "inherit",
156
- // 2
157
- borderCollapse: "collapse"
158
- // 3
159
- },
160
- // 1. Change the font styles in all browsers.
161
- // 2. Remove the margin in Firefox and Safari.
162
- // 3. Remove default padding in all browsers.
163
- "button, input, optgroup, select, textarea": {
164
- fontFamily: "inherit",
165
- // 1
166
- fontFeatureSettings: "inherit",
167
- // 1
168
- fontVariationSettings: "inherit",
169
- // 1
170
- fontSize: "100%",
171
- // 1
172
- fontWeight: "inherit",
173
- // 1
174
- lineHeight: "inherit",
175
- // 1
176
- letterSpacing: "inherit",
177
- // 1
178
- color: "inherit",
179
- // 1
180
- margin: 0,
181
- // 2
182
- padding: 0
183
- // 3
184
- },
185
- // Remove the inheritance of text transform in Edge and Firefox.
186
- "button, select": {
187
- textTransform: "none"
188
- },
189
- // 1. Correct the inability to style clickable types in iOS and Safari.
190
- // 2. Remove default button styles.
191
- "button, input:where([type='button']), input:where([type='reset']), input:where([type='submit'])": {
192
- WebkitAppearance: "button",
193
- // 1
194
- backgroundColor: "transparent",
195
- // 2
196
- backgroundImage: "none"
197
- // 2
198
- },
199
- // Use the modern Firefox focus style for all focusable elements.
200
- ":-moz-focusring": {
201
- outline: "auto"
202
- },
203
- // Remove the additional `:invalid` styles in Firefox.
204
- ":-moz-ui-invalid": {
205
- boxShadow: "none"
206
- },
207
- // Add the correct vertical alignment in Chrome and Firefox.
208
- progress: {
209
- verticalAlign: "baseline"
210
- },
211
- // Correct the cursor style of increment and decrement buttons in Safari.
212
- "::-webkit-inner-spin-button, ::-webkit-outer-spin-button": {
213
- height: "auto"
214
- },
215
- // 1. Correct the odd appearance in Chrome and Safari.
216
- // 2. Correct the outline style in Safari.
217
- "[type='search']": {
218
- WebkitAppearance: "textfield",
219
- // 1
220
- outlineOffset: "-2px"
221
- // 2
222
- },
223
- // Remove the inner padding in Chrome and Safari on macOS.
224
- "::-webkit-search-decoration": {
225
- WebkitAppearance: "none"
226
- },
227
- // 1. Correct the inability to style clickable types in iOS and Safari.
228
- // 2. Change font properties to `inherit` in Safari.
229
- "::-webkit-file-upload-button": {
230
- WebkitAppearance: "button",
231
- // 1
232
- font: "inherit"
233
- // 2
234
- },
235
- // Add the correct display in Chrome and Safari.
236
- summary: {
237
- display: "list-item"
238
- },
239
- // Removes the default spacing and border for appropriate elements.
240
- "blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre": {
241
- margin: 0
242
- },
243
- fieldset: {
244
- margin: 0,
245
- padding: 0
246
- },
247
- legend: {
248
- padding: 0
249
- },
250
- "ol, ul, menu": {
251
- listStyle: "none",
252
- margin: 0,
253
- padding: 0
254
- },
255
- // Reset default styling for dialogs.
256
- dialog: {
257
- padding: 0
258
- },
259
- // Prevent resizing textareas horizontally by default.
260
- textarea: {
261
- resize: "vertical"
262
- },
263
- // 1. Reset the default placeholder opacity in Firefox.
264
- // 2. Set the default placeholder color to gray 400.
265
- "input::placeholder, textarea::placeholder": {
266
- opacity: 1,
267
- // 1
268
- color: x("neutral.400")
269
- },
270
- // Set the default cursor for buttons.
271
- "button, [role='button']": {
272
- cursor: "pointer"
273
- },
274
- // Make sure disabled buttons don't get the pointer cursor.
275
- ":disabled": {
276
- cursor: "default"
277
- },
278
- // 1. Make replaced elements `display: block` by default.
279
- // 2. Add `vertical-align: middle` to align replaced elements more sensibly by default.
280
- "img, svg, video, canvas, audio, iframe, embed, object": {
281
- display: "block",
282
- // 1
283
- verticalAlign: "middle"
284
- // 2
285
- },
286
- // Constrain images and videos to the parent width and preserve their intrinsic aspect ratio.
287
- "img, video": {
288
- maxWidth: "100%",
289
- height: "auto"
290
- },
291
- // Make elements with the HTML hidden attribute stay hidden by default.
292
- "[hidden]:where(:not([hidden='until-found']))": {
293
- display: "none"
294
- },
295
- // ─── CSS Variables ───────────────────────────────────────────────────────
296
- ":root": {
297
- ...o,
298
- ...w
299
- }
300
- };
301
- };
302
- class Je {
1
+ import { jsx as n, Fragment as Ne, jsxs as p } from "@emotion/react/jsx-runtime";
2
+ import { u as _e, a as ae, b as J, D as ze, c as Ge, W as j, d as E, e as qe, f as Ue, g as Le, h as Ee, i as Ze, j as Qe, k as we, l as Ye, m as ue, n as se, A as Se, o as Ke, C as Me, p as $e, q as Xe, r as Je, T as et, s as fe, R as tt } from "./index-DrJkOkbq.js";
3
+ import { t as zr } from "./index-DrJkOkbq.js";
4
+ import rt from "mitt";
5
+ import { c as I, N as pe, B as ge, g as nt, a as st, u as W, W as ot, b as Re, i as it, P as ct } from "./countdown-timer.node-CAsCNVin.js";
6
+ import { useRef as je, useState as ee, useEffect as V, createElement as Ae, Fragment as K, Suspense as at } from "react";
7
+ import { useToggle as De } from "usehooks-ts";
8
+ import { CacheProvider as lt, Global as dt, createElement as ht } from "@emotion/react";
9
+ import { useFloating as wt, autoUpdate as ut, flip as ft, size as pt, useHover as gt, safePolygon as mt, useFocus as kt, useDismiss as vt, useRole as bt, useInteractions as Ct, FloatingPortal as Ie } from "@floating-ui/react";
10
+ import { ThemeProvider as xt, FLOATING_Z_INDEX as yt, breakpoint as Nt } from "@janbox/storefront-ui/theme";
11
+ import { throttle as Lt, isFunction as me, isNumber as ke } from "lodash-es";
12
+ import Et, { useFrame as St } from "react-frame-component";
13
+ import { Layers as Mt, useLayer as $t } from "@craftjs/layers";
14
+ import { useNode as Rt, ROOT_NODE as oe } from "@craftjs/core";
15
+ class jt {
303
16
  constructor() {
304
17
  this.componentControls = /* @__PURE__ */ new Set();
305
18
  }
@@ -326,74 +39,687 @@ class Je {
326
39
  *
327
40
  * @public
328
41
  */
329
- start(t, r) {
330
- this.componentControls.forEach((o) => {
331
- o.start(t.nativeEvent || t, r);
42
+ start(t, s) {
43
+ this.componentControls.forEach((r) => {
44
+ r.start(t.nativeEvent || t, s);
332
45
  });
333
46
  }
334
47
  }
335
- const et = () => new Je();
336
- function tt() {
337
- return ue(et);
48
+ const At = () => new jt();
49
+ function Dt() {
50
+ return _e(At);
51
+ }
52
+ function It(e) {
53
+ if (e.sheet)
54
+ return e.sheet;
55
+ for (var t = 0; t < document.styleSheets.length; t++)
56
+ if (document.styleSheets[t].ownerNode === e)
57
+ return document.styleSheets[t];
58
+ }
59
+ function Pt(e) {
60
+ var t = document.createElement("style");
61
+ 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;
62
+ }
63
+ var Tt = /* @__PURE__ */ (function() {
64
+ function e(s) {
65
+ var r = this;
66
+ this._insertTag = function(i) {
67
+ var o;
68
+ r.tags.length === 0 ? r.insertionPoint ? o = r.insertionPoint.nextSibling : r.prepend ? o = r.container.firstChild : o = r.before : o = r.tags[r.tags.length - 1].nextSibling, r.container.insertBefore(i, o), r.tags.push(i);
69
+ }, this.isSpeedy = s.speedy === void 0 ? !0 : s.speedy, this.tags = [], this.ctr = 0, this.nonce = s.nonce, this.key = s.key, this.container = s.container, this.prepend = s.prepend, this.insertionPoint = s.insertionPoint, this.before = null;
70
+ }
71
+ var t = e.prototype;
72
+ return t.hydrate = function(r) {
73
+ r.forEach(this._insertTag);
74
+ }, t.insert = function(r) {
75
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Pt(this));
76
+ var i = this.tags[this.tags.length - 1];
77
+ if (this.isSpeedy) {
78
+ var o = It(i);
79
+ try {
80
+ o.insertRule(r, o.cssRules.length);
81
+ } catch {
82
+ }
83
+ } else
84
+ i.appendChild(document.createTextNode(r));
85
+ this.ctr++;
86
+ }, t.flush = function() {
87
+ this.tags.forEach(function(r) {
88
+ var i;
89
+ return (i = r.parentNode) == null ? void 0 : i.removeChild(r);
90
+ }), this.tags = [], this.ctr = 0;
91
+ }, e;
92
+ })(), S = "-ms-", X = "-moz-", u = "-webkit-", Pe = "comm", le = "rule", de = "decl", Wt = "@import", Te = "@keyframes", Bt = "@layer", Ot = Math.abs, te = String.fromCharCode, Ft = Object.assign;
93
+ function Ht(e, t) {
94
+ return L(e, 0) ^ 45 ? (((t << 2 ^ L(e, 0)) << 2 ^ L(e, 1)) << 2 ^ L(e, 2)) << 2 ^ L(e, 3) : 0;
95
+ }
96
+ function We(e) {
97
+ return e.trim();
98
+ }
99
+ function Vt(e, t) {
100
+ return (e = t.exec(e)) ? e[0] : e;
101
+ }
102
+ function f(e, t, s) {
103
+ return e.replace(t, s);
104
+ }
105
+ function ie(e, t) {
106
+ return e.indexOf(t);
107
+ }
108
+ function L(e, t) {
109
+ return e.charCodeAt(t) | 0;
110
+ }
111
+ function _(e, t, s) {
112
+ return e.slice(t, s);
113
+ }
114
+ function D(e) {
115
+ return e.length;
116
+ }
117
+ function he(e) {
118
+ return e.length;
119
+ }
120
+ function U(e, t) {
121
+ return t.push(e), e;
122
+ }
123
+ function _t(e, t) {
124
+ return e.map(t).join("");
125
+ }
126
+ var re = 1, O = 1, Be = 0, M = 0, x = 0, F = "";
127
+ function ne(e, t, s, r, i, o, d) {
128
+ return { value: e, root: t, parent: s, type: r, props: i, children: o, line: re, column: O, length: d, return: "" };
129
+ }
130
+ function H(e, t) {
131
+ return Ft(ne("", null, null, "", null, null, 0), e, { length: -e.length }, t);
132
+ }
133
+ function zt() {
134
+ return x;
135
+ }
136
+ function Gt() {
137
+ return x = M > 0 ? L(F, --M) : 0, O--, x === 10 && (O = 1, re--), x;
138
+ }
139
+ function $() {
140
+ return x = M < Be ? L(F, M++) : 0, O++, x === 10 && (O = 1, re++), x;
141
+ }
142
+ function P() {
143
+ return L(F, M);
144
+ }
145
+ function Z() {
146
+ return M;
147
+ }
148
+ function G(e, t) {
149
+ return _(F, e, t);
150
+ }
151
+ function z(e) {
152
+ switch (e) {
153
+ // \0 \t \n \r \s whitespace token
154
+ case 0:
155
+ case 9:
156
+ case 10:
157
+ case 13:
158
+ case 32:
159
+ return 5;
160
+ // ! + , / > @ ~ isolate token
161
+ case 33:
162
+ case 43:
163
+ case 44:
164
+ case 47:
165
+ case 62:
166
+ case 64:
167
+ case 126:
168
+ // ; { } breakpoint token
169
+ case 59:
170
+ case 123:
171
+ case 125:
172
+ return 4;
173
+ // : accompanied token
174
+ case 58:
175
+ return 3;
176
+ // " ' ( [ opening delimit token
177
+ case 34:
178
+ case 39:
179
+ case 40:
180
+ case 91:
181
+ return 2;
182
+ // ) ] closing delimit token
183
+ case 41:
184
+ case 93:
185
+ return 1;
186
+ }
187
+ return 0;
188
+ }
189
+ function Oe(e) {
190
+ return re = O = 1, Be = D(F = e), M = 0, [];
191
+ }
192
+ function Fe(e) {
193
+ return F = "", e;
194
+ }
195
+ function Q(e) {
196
+ return We(G(M - 1, ce(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
197
+ }
198
+ function qt(e) {
199
+ for (; (x = P()) && x < 33; )
200
+ $();
201
+ return z(e) > 2 || z(x) > 3 ? "" : " ";
202
+ }
203
+ function Ut(e, t) {
204
+ for (; --t && $() && !(x < 48 || x > 102 || x > 57 && x < 65 || x > 70 && x < 97); )
205
+ ;
206
+ return G(e, Z() + (t < 6 && P() == 32 && $() == 32));
207
+ }
208
+ function ce(e) {
209
+ for (; $(); )
210
+ switch (x) {
211
+ // ] ) " '
212
+ case e:
213
+ return M;
214
+ // " '
215
+ case 34:
216
+ case 39:
217
+ e !== 34 && e !== 39 && ce(x);
218
+ break;
219
+ // (
220
+ case 40:
221
+ e === 41 && ce(e);
222
+ break;
223
+ // \
224
+ case 92:
225
+ $();
226
+ break;
227
+ }
228
+ return M;
229
+ }
230
+ function Zt(e, t) {
231
+ for (; $() && e + x !== 57; )
232
+ if (e + x === 84 && P() === 47)
233
+ break;
234
+ return "/*" + G(t, M - 1) + "*" + te(e === 47 ? e : $());
235
+ }
236
+ function Qt(e) {
237
+ for (; !z(P()); )
238
+ $();
239
+ return G(e, M);
240
+ }
241
+ function Yt(e) {
242
+ return Fe(Y("", null, null, null, [""], e = Oe(e), 0, [0], e));
243
+ }
244
+ function Y(e, t, s, r, i, o, d, c, a) {
245
+ for (var g = 0, h = 0, l = d, m = 0, k = 0, v = 0, w = 1, N = 1, b = 1, y = 0, R = "", q = i, T = o, A = r, C = R; N; )
246
+ switch (v = y, y = $()) {
247
+ // (
248
+ case 40:
249
+ if (v != 108 && L(C, l - 1) == 58) {
250
+ ie(C += f(Q(y), "&", "&\f"), "&\f") != -1 && (b = -1);
251
+ break;
252
+ }
253
+ // " ' [
254
+ case 34:
255
+ case 39:
256
+ case 91:
257
+ C += Q(y);
258
+ break;
259
+ // \t \n \r \s
260
+ case 9:
261
+ case 10:
262
+ case 13:
263
+ case 32:
264
+ C += qt(v);
265
+ break;
266
+ // \
267
+ case 92:
268
+ C += Ut(Z() - 1, 7);
269
+ continue;
270
+ // /
271
+ case 47:
272
+ switch (P()) {
273
+ case 42:
274
+ case 47:
275
+ U(Kt(Zt($(), Z()), t, s), a);
276
+ break;
277
+ default:
278
+ C += "/";
279
+ }
280
+ break;
281
+ // {
282
+ case 123 * w:
283
+ c[g++] = D(C) * b;
284
+ // } ; \0
285
+ case 125 * w:
286
+ case 59:
287
+ case 0:
288
+ switch (y) {
289
+ // \0 }
290
+ case 0:
291
+ case 125:
292
+ N = 0;
293
+ // ;
294
+ case 59 + h:
295
+ b == -1 && (C = f(C, /\f/g, "")), k > 0 && D(C) - l && U(k > 32 ? be(C + ";", r, s, l - 1) : be(f(C, " ", "") + ";", r, s, l - 2), a);
296
+ break;
297
+ // @ ;
298
+ case 59:
299
+ C += ";";
300
+ // { rule/at-rule
301
+ default:
302
+ if (U(A = ve(C, t, s, g, h, i, c, R, q = [], T = [], l), o), y === 123)
303
+ if (h === 0)
304
+ Y(C, t, A, A, q, o, l, c, T);
305
+ else
306
+ switch (m === 99 && L(C, 3) === 110 ? 100 : m) {
307
+ // d l m s
308
+ case 100:
309
+ case 108:
310
+ case 109:
311
+ case 115:
312
+ Y(e, A, A, r && U(ve(e, A, A, 0, 0, i, c, R, i, q = [], l), T), i, T, l, c, r ? q : T);
313
+ break;
314
+ default:
315
+ Y(C, A, A, A, [""], T, 0, c, T);
316
+ }
317
+ }
318
+ g = h = k = 0, w = b = 1, R = C = "", l = d;
319
+ break;
320
+ // :
321
+ case 58:
322
+ l = 1 + D(C), k = v;
323
+ default:
324
+ if (w < 1) {
325
+ if (y == 123)
326
+ --w;
327
+ else if (y == 125 && w++ == 0 && Gt() == 125)
328
+ continue;
329
+ }
330
+ switch (C += te(y), y * w) {
331
+ // &
332
+ case 38:
333
+ b = h > 0 ? 1 : (C += "\f", -1);
334
+ break;
335
+ // ,
336
+ case 44:
337
+ c[g++] = (D(C) - 1) * b, b = 1;
338
+ break;
339
+ // @
340
+ case 64:
341
+ P() === 45 && (C += Q($())), m = P(), h = l = D(R = C += Qt(Z())), y++;
342
+ break;
343
+ // -
344
+ case 45:
345
+ v === 45 && D(C) == 2 && (w = 0);
346
+ }
347
+ }
348
+ return o;
349
+ }
350
+ function ve(e, t, s, r, i, o, d, c, a, g, h) {
351
+ for (var l = i - 1, m = i === 0 ? o : [""], k = he(m), v = 0, w = 0, N = 0; v < r; ++v)
352
+ for (var b = 0, y = _(e, l + 1, l = Ot(w = d[v])), R = e; b < k; ++b)
353
+ (R = We(w > 0 ? m[b] + " " + y : f(y, /&\f/g, m[b]))) && (a[N++] = R);
354
+ return ne(e, t, s, i === 0 ? le : c, a, g, h);
355
+ }
356
+ function Kt(e, t, s) {
357
+ return ne(e, t, s, Pe, te(zt()), _(e, 2, -2), 0);
358
+ }
359
+ function be(e, t, s, r) {
360
+ return ne(e, t, s, de, _(e, 0, r), _(e, r + 1, -1), r);
338
361
  }
339
- const ne = ({ children: s, viewport: t, containerProps: r }) => {
340
- const o = K(null), [{ theme: w }] = A(), [n, d] = j({
362
+ function B(e, t) {
363
+ for (var s = "", r = he(e), i = 0; i < r; i++)
364
+ s += t(e[i], i, e, t) || "";
365
+ return s;
366
+ }
367
+ function Xt(e, t, s, r) {
368
+ switch (e.type) {
369
+ case Bt:
370
+ if (e.children.length) break;
371
+ case Wt:
372
+ case de:
373
+ return e.return = e.return || e.value;
374
+ case Pe:
375
+ return "";
376
+ case Te:
377
+ return e.return = e.value + "{" + B(e.children, r) + "}";
378
+ case le:
379
+ e.value = e.props.join(",");
380
+ }
381
+ return D(s = B(e.children, r)) ? e.return = e.value + "{" + s + "}" : "";
382
+ }
383
+ function Jt(e) {
384
+ var t = he(e);
385
+ return function(s, r, i, o) {
386
+ for (var d = "", c = 0; c < t; c++)
387
+ d += e[c](s, r, i, o) || "";
388
+ return d;
389
+ };
390
+ }
391
+ function er(e) {
392
+ return function(t) {
393
+ t.root || (t = t.return) && e(t);
394
+ };
395
+ }
396
+ var tr = function(t, s, r) {
397
+ for (var i = 0, o = 0; i = o, o = P(), i === 38 && o === 12 && (s[r] = 1), !z(o); )
398
+ $();
399
+ return G(t, M);
400
+ }, rr = function(t, s) {
401
+ var r = -1, i = 44;
402
+ do
403
+ switch (z(i)) {
404
+ case 0:
405
+ i === 38 && P() === 12 && (s[r] = 1), t[r] += tr(M - 1, s, r);
406
+ break;
407
+ case 2:
408
+ t[r] += Q(i);
409
+ break;
410
+ case 4:
411
+ if (i === 44) {
412
+ t[++r] = P() === 58 ? "&\f" : "", s[r] = t[r].length;
413
+ break;
414
+ }
415
+ // fallthrough
416
+ default:
417
+ t[r] += te(i);
418
+ }
419
+ while (i = $());
420
+ return t;
421
+ }, nr = function(t, s) {
422
+ return Fe(rr(Oe(t), s));
423
+ }, Ce = /* @__PURE__ */ new WeakMap(), sr = function(t) {
424
+ if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
425
+ // negative .length indicates that this rule has been already prefixed
426
+ t.length < 1)) {
427
+ for (var s = t.value, r = t.parent, i = t.column === r.column && t.line === r.line; r.type !== "rule"; )
428
+ if (r = r.parent, !r) return;
429
+ if (!(t.props.length === 1 && s.charCodeAt(0) !== 58 && !Ce.get(r)) && !i) {
430
+ Ce.set(t, !0);
431
+ for (var o = [], d = nr(s, o), c = r.props, a = 0, g = 0; a < d.length; a++)
432
+ for (var h = 0; h < c.length; h++, g++)
433
+ t.props[g] = o[a] ? d[a].replace(/&\f/g, c[h]) : c[h] + " " + d[a];
434
+ }
435
+ }
436
+ }, or = function(t) {
437
+ if (t.type === "decl") {
438
+ var s = t.value;
439
+ // charcode for l
440
+ s.charCodeAt(0) === 108 && // charcode for b
441
+ s.charCodeAt(2) === 98 && (t.return = "", t.value = "");
442
+ }
443
+ };
444
+ function He(e, t) {
445
+ switch (Ht(e, t)) {
446
+ // color-adjust
447
+ case 5103:
448
+ return u + "print-" + e + e;
449
+ // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
450
+ case 5737:
451
+ case 4201:
452
+ case 3177:
453
+ case 3433:
454
+ case 1641:
455
+ case 4457:
456
+ case 2921:
457
+ // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
458
+ case 5572:
459
+ case 6356:
460
+ case 5844:
461
+ case 3191:
462
+ case 6645:
463
+ case 3005:
464
+ // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
465
+ case 6391:
466
+ case 5879:
467
+ case 5623:
468
+ case 6135:
469
+ case 4599:
470
+ case 4855:
471
+ // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
472
+ case 4215:
473
+ case 6389:
474
+ case 5109:
475
+ case 5365:
476
+ case 5621:
477
+ case 3829:
478
+ return u + e + e;
479
+ // appearance, user-select, transform, hyphens, text-size-adjust
480
+ case 5349:
481
+ case 4246:
482
+ case 4810:
483
+ case 6968:
484
+ case 2756:
485
+ return u + e + X + e + S + e + e;
486
+ // flex, flex-direction
487
+ case 6828:
488
+ case 4268:
489
+ return u + e + S + e + e;
490
+ // order
491
+ case 6165:
492
+ return u + e + S + "flex-" + e + e;
493
+ // align-items
494
+ case 5187:
495
+ return u + e + f(e, /(\w+).+(:[^]+)/, u + "box-$1$2" + S + "flex-$1$2") + e;
496
+ // align-self
497
+ case 5443:
498
+ return u + e + S + "flex-item-" + f(e, /flex-|-self/, "") + e;
499
+ // align-content
500
+ case 4675:
501
+ return u + e + S + "flex-line-pack" + f(e, /align-content|flex-|-self/, "") + e;
502
+ // flex-shrink
503
+ case 5548:
504
+ return u + e + S + f(e, "shrink", "negative") + e;
505
+ // flex-basis
506
+ case 5292:
507
+ return u + e + S + f(e, "basis", "preferred-size") + e;
508
+ // flex-grow
509
+ case 6060:
510
+ return u + "box-" + f(e, "-grow", "") + u + e + S + f(e, "grow", "positive") + e;
511
+ // transition
512
+ case 4554:
513
+ return u + f(e, /([^-])(transform)/g, "$1" + u + "$2") + e;
514
+ // cursor
515
+ case 6187:
516
+ return f(f(f(e, /(zoom-|grab)/, u + "$1"), /(image-set)/, u + "$1"), e, "") + e;
517
+ // background, background-image
518
+ case 5495:
519
+ case 3959:
520
+ return f(e, /(image-set\([^]*)/, u + "$1$`$1");
521
+ // justify-content
522
+ case 4968:
523
+ return f(f(e, /(.+:)(flex-)?(.*)/, u + "box-pack:$3" + S + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + u + e + e;
524
+ // (margin|padding)-inline-(start|end)
525
+ case 4095:
526
+ case 3583:
527
+ case 4068:
528
+ case 2532:
529
+ return f(e, /(.+)-inline(.+)/, u + "$1$2") + e;
530
+ // (min|max)?(width|height|inline-size|block-size)
531
+ case 8116:
532
+ case 7059:
533
+ case 5753:
534
+ case 5535:
535
+ case 5445:
536
+ case 5701:
537
+ case 4933:
538
+ case 4677:
539
+ case 5533:
540
+ case 5789:
541
+ case 5021:
542
+ case 4765:
543
+ if (D(e) - 1 - t > 6) switch (L(e, t + 1)) {
544
+ // (m)ax-content, (m)in-content
545
+ case 109:
546
+ if (L(e, t + 4) !== 45) break;
547
+ // (f)ill-available, (f)it-content
548
+ case 102:
549
+ return f(e, /(.+:)(.+)-([^]+)/, "$1" + u + "$2-$3$1" + X + (L(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
550
+ // (s)tretch
551
+ case 115:
552
+ return ~ie(e, "stretch") ? He(f(e, "stretch", "fill-available"), t) + e : e;
553
+ }
554
+ break;
555
+ // position: sticky
556
+ case 4949:
557
+ if (L(e, t + 1) !== 115) break;
558
+ // display: (flex|inline-flex)
559
+ case 6444:
560
+ switch (L(e, D(e) - 3 - (~ie(e, "!important") && 10))) {
561
+ // stic(k)y
562
+ case 107:
563
+ return f(e, ":", ":" + u) + e;
564
+ // (inline-)?fl(e)x
565
+ case 101:
566
+ return f(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + u + (L(e, 14) === 45 ? "inline-" : "") + "box$3$1" + u + "$2$3$1" + S + "$2box$3") + e;
567
+ }
568
+ break;
569
+ // writing-mode
570
+ case 5936:
571
+ switch (L(e, t + 11)) {
572
+ // vertical-l(r)
573
+ case 114:
574
+ return u + e + S + f(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
575
+ // vertical-r(l)
576
+ case 108:
577
+ return u + e + S + f(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
578
+ // horizontal(-)tb
579
+ case 45:
580
+ return u + e + S + f(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
581
+ }
582
+ return u + e + S + e + e;
583
+ }
584
+ return e;
585
+ }
586
+ var ir = function(t, s, r, i) {
587
+ if (t.length > -1 && !t.return) switch (t.type) {
588
+ case de:
589
+ t.return = He(t.value, t.length);
590
+ break;
591
+ case Te:
592
+ return B([H(t, {
593
+ value: f(t.value, "@", "@" + u)
594
+ })], i);
595
+ case le:
596
+ if (t.length) return _t(t.props, function(o) {
597
+ switch (Vt(o, /(::plac\w+|:read-\w+)/)) {
598
+ // :read-(only|write)
599
+ case ":read-only":
600
+ case ":read-write":
601
+ return B([H(t, {
602
+ props: [f(o, /:(read-\w+)/, ":" + X + "$1")]
603
+ })], i);
604
+ // :placeholder
605
+ case "::placeholder":
606
+ return B([H(t, {
607
+ props: [f(o, /:(plac\w+)/, ":" + u + "input-$1")]
608
+ }), H(t, {
609
+ props: [f(o, /:(plac\w+)/, ":" + X + "$1")]
610
+ }), H(t, {
611
+ props: [f(o, /:(plac\w+)/, S + "input-$1")]
612
+ })], i);
613
+ }
614
+ return "";
615
+ });
616
+ }
617
+ }, cr = [ir], ar = function(t) {
618
+ var s = t.key;
619
+ if (s === "css") {
620
+ var r = document.querySelectorAll("style[data-emotion]:not([data-s])");
621
+ Array.prototype.forEach.call(r, function(w) {
622
+ var N = w.getAttribute("data-emotion");
623
+ N.indexOf(" ") !== -1 && (document.head.appendChild(w), w.setAttribute("data-s", ""));
624
+ });
625
+ }
626
+ var i = t.stylisPlugins || cr, o = {}, d, c = [];
627
+ d = t.container || document.head, Array.prototype.forEach.call(
628
+ // this means we will ignore elements which don't have a space in them which
629
+ // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
630
+ document.querySelectorAll('style[data-emotion^="' + s + ' "]'),
631
+ function(w) {
632
+ for (var N = w.getAttribute("data-emotion").split(" "), b = 1; b < N.length; b++)
633
+ o[N[b]] = !0;
634
+ c.push(w);
635
+ }
636
+ );
637
+ var a, g = [sr, or];
638
+ {
639
+ var h, l = [Xt, er(function(w) {
640
+ h.insert(w);
641
+ })], m = Jt(g.concat(i, l)), k = function(N) {
642
+ return B(Yt(N), m);
643
+ };
644
+ a = function(N, b, y, R) {
645
+ h = y, k(N ? N + "{" + b.styles + "}" : b.styles), R && (v.inserted[b.name] = !0);
646
+ };
647
+ }
648
+ var v = {
649
+ key: s,
650
+ sheet: new Tt({
651
+ key: s,
652
+ container: d,
653
+ nonce: t.nonce,
654
+ speedy: t.speedy,
655
+ prepend: t.prepend,
656
+ insertionPoint: t.insertionPoint
657
+ }),
658
+ nonce: t.nonce,
659
+ inserted: o,
660
+ registered: {},
661
+ insert: a
662
+ };
663
+ return v.sheet.hydrate(c), v;
664
+ };
665
+ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
666
+ const r = je(null), [{ theme: i }] = ae(), [o, d] = ee({
341
667
  width: 0,
342
668
  height: 0
343
669
  });
344
- N(() => {
345
- const f = _e((I) => {
346
- const y = I.at(0)?.target;
347
- if (!y) return;
348
- const { width: re, height: se } = y.getBoundingClientRect();
670
+ V(() => {
671
+ const v = Lt((N) => {
672
+ const b = N.at(0)?.target;
673
+ if (!b) return;
674
+ const { width: y, height: R } = b.getBoundingClientRect();
349
675
  d(() => ({
350
- width: re,
351
- height: se
676
+ width: y,
677
+ height: R
352
678
  }));
353
- }, 200), v = new ResizeObserver(f);
354
- return o.current && v.observe(o.current), () => v.disconnect();
679
+ }, 200), w = new ResizeObserver(v);
680
+ return r.current && w.observe(r.current), () => w.disconnect();
355
681
  }, []);
356
- const l = T(t?.width) ? t.width(n.width) : t?.width, a = T(t?.height) ? t.height(n.height) : t?.height, u = P(l) ? n.width / l : 1, h = P(a) ? n.height / a : 1, c = Math.min(u, h, 1), g = (a ?? n.height / c) || 0, m = (l ?? n.width / c) || 0;
357
- return /* @__PURE__ */ e("div", { ...r, className: b("tw:w-full tw:h-full tw:p-2 tw:bg-ic-ink-1s", r?.className), children: /* @__PURE__ */ e("div", { className: b("tw:w-full tw:h-full tw:overflow-hidden tw:relative"), ref: o, children: /* @__PURE__ */ e(
682
+ const c = me(t?.width) ? t.width(o.width) : t?.width, a = me(t?.height) ? t.height(o.height) : t?.height, g = ke(c) ? o.width / c : 1, h = ke(a) ? o.height / a : 1, l = Math.min(g, h, 1), m = (a ?? o.height / l) || 0, k = (c ?? o.width / l) || 0;
683
+ return /* @__PURE__ */ n("div", { ...s, className: I("tw:w-full tw:h-full tw:p-2 tw:bg-ic-ink-1s", s?.className), children: /* @__PURE__ */ n("div", { className: I("tw:w-full tw:h-full tw:overflow-hidden tw:relative"), ref: r, children: /* @__PURE__ */ n(
358
684
  "div",
359
685
  {
360
686
  style: {
361
- transform: `scale(${c})`,
362
- width: m,
363
- height: g,
364
- marginLeft: (n.width - m) / 2,
365
- marginTop: (n.height - g) / 2
687
+ transform: `scale(${l})`,
688
+ width: k,
689
+ height: m,
690
+ marginLeft: (o.width - k) / 2,
691
+ marginTop: (o.height - m) / 2
366
692
  },
367
693
  className: "tw:absolute",
368
- children: /* @__PURE__ */ e(
369
- $e,
694
+ children: /* @__PURE__ */ n(
695
+ Et,
370
696
  {
371
697
  sandbox: "allow-same-origin allow-scripts allow-popups allow-presentation",
372
698
  allow: "autoplay; encrypted-media",
373
- width: l ?? "100%",
699
+ width: c ?? "100%",
374
700
  height: a ?? "100%",
375
- children: /* @__PURE__ */ e(ot, { theme: w, children: s })
701
+ children: /* @__PURE__ */ n(lr, { theme: i, children: e })
376
702
  }
377
703
  )
378
704
  }
379
705
  ) }) });
380
- }, ot = ({ children: s, theme: t }) => {
381
- const { document: r, window: o } = Ge(), [w, n] = j(!1), d = K(window.customElements.define.bind(window.customElements));
382
- N(() => {
706
+ }, lr = ({ children: e, theme: t }) => {
707
+ const { document: s, window: r } = St(), [i, o] = ee(!1), d = je(window.customElements.define.bind(window.customElements));
708
+ V(() => {
383
709
  const a = d.current;
384
- return o && (window.customElements.define = function(u, h, c) {
385
- window.customElements.get(u) || o.customElements.define(u, h, c), a(u, h, c);
386
- }), r?.head.replaceWith(document.head.cloneNode(!0)), n(!0), () => {
710
+ return r && (window.customElements.define = function(g, h, l) {
711
+ window.customElements.get(g) || r.customElements.define(g, h, l), a(g, h, l);
712
+ }), s?.head.replaceWith(document.head.cloneNode(!0)), o(!0), () => {
387
713
  window.customElements.define = a;
388
714
  };
389
- }, [r, o]);
390
- const l = ie({
715
+ }, [s, r]);
716
+ const c = ar({
391
717
  key: "css",
392
- container: r?.head
718
+ container: s?.head
393
719
  });
394
- return w ? /* @__PURE__ */ e(_, { children: /* @__PURE__ */ i(Me, { value: l, children: [
395
- /* @__PURE__ */ e(
396
- ee,
720
+ return i ? /* @__PURE__ */ n(Ne, { children: /* @__PURE__ */ p(lt, { value: c, children: [
721
+ /* @__PURE__ */ n(
722
+ dt,
397
723
  {
398
724
  styles: {
399
725
  ".frame-content": {
@@ -402,41 +728,41 @@ const ne = ({ children: s, viewport: t, containerProps: r }) => {
402
728
  minHeight: "100vh",
403
729
  justifyContent: "center"
404
730
  },
405
- [`& *[${R.DATA_NODE_DROP_TARGET}=${z.True}]`]: {
731
+ [`& *[${pe.DATA_NODE_DROP_TARGET}=${ge.True}]`]: {
406
732
  outlineWidth: 1,
407
733
  outlineStyle: "solid",
408
734
  outlineOffset: -1,
409
735
  outlineColor: "green"
410
736
  },
411
- [`& *[${R.DATA_NODE_DROP_TARGET_ERROR}=${z.True}]`]: {
737
+ [`& *[${pe.DATA_NODE_DROP_TARGET_ERROR}=${ge.True}]`]: {
412
738
  outlineColor: "red"
413
739
  }
414
740
  }
415
741
  }
416
742
  ),
417
- /* @__PURE__ */ e(Ke, { theme: t, children: s })
743
+ /* @__PURE__ */ n(xt, { theme: t, children: e })
418
744
  ] }) }) : null;
419
- }, nt = ({ render: s }) => {
420
- const { id: t, renderer: r } = Ze((n) => ({
421
- resolvedId: ae(n),
422
- renderer: le(n).renderer
745
+ }, dr = ({ render: e }) => {
746
+ const { id: t, renderer: s } = Rt((o) => ({
747
+ resolvedId: st(o),
748
+ renderer: nt(o).renderer
423
749
  })), {
424
- queryParams: { mode: o }
425
- } = S(), { isActive: w } = C((n, d) => ({
426
- isActive: d.getEvent("selected").contains(t) && t !== W
750
+ queryParams: { mode: r }
751
+ } = J(), { isActive: i } = W((o, d) => ({
752
+ isActive: d.getEvent("selected").contains(t) && t !== oe
427
753
  }));
428
- return r ? Y(r, { render: s }) : /* @__PURE__ */ i(L, { children: [
429
- w && o === "full" && /* @__PURE__ */ i(L, { children: [
430
- /* @__PURE__ */ e(pe, {}),
431
- /* @__PURE__ */ e(me, {})
754
+ return s ? Ae(s, { render: e }) : /* @__PURE__ */ p(K, { children: [
755
+ i && r === "full" && /* @__PURE__ */ p(K, { children: [
756
+ /* @__PURE__ */ n(ze, {}),
757
+ /* @__PURE__ */ n(Ge, {})
432
758
  ] }),
433
- s
759
+ e
434
760
  ] });
435
- }, B = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
761
+ }, xe = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
436
762
  <path d="M8 5L5 8L8 11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
437
763
  <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"/>
438
764
  </svg>
439
- `, rt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
765
+ `, hr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
440
766
  <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"/>
441
767
  <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"/>
442
768
  <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"/>
@@ -444,182 +770,182 @@ const ne = ({ children: s, viewport: t, containerProps: r }) => {
444
770
  <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"/>
445
771
  <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"/>
446
772
  </svg>
447
- `, st = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
773
+ `, wr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
448
774
  <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"/>
449
775
  <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"/>
450
776
  </svg>
451
- `, it = '<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>', O = je(), lt = () => {
777
+ `, ur = '<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>', ye = rt(), fr = () => {
452
778
  const {
453
- queryParams: { mode: s, screen: t },
454
- setQueryParams: r
455
- } = S(), { actions: o, canRedo: w, canUndo: n } = C((h, c) => ({
779
+ queryParams: { mode: e, screen: t },
780
+ setQueryParams: s
781
+ } = J(), { actions: r, canRedo: i, canUndo: o } = W((h, l) => ({
456
782
  enabled: h.options.enabled,
457
- canUndo: c.history.canUndo(),
458
- canRedo: c.history.canRedo()
783
+ canUndo: l.history.canUndo(),
784
+ canRedo: l.history.canRedo()
459
785
  })), d = (h) => {
460
- r({
786
+ s({
461
787
  screen: h
462
788
  });
463
- }, l = () => {
464
- r({ mode: s === "full" ? "compact" : "full" });
789
+ }, c = () => {
790
+ s({ mode: e === "full" ? "compact" : "full" });
465
791
  }, a = () => {
466
- O.emit("close");
467
- }, u = () => {
468
- o.selectNode(), O.emit("submit");
792
+ ye.emit("close");
793
+ }, g = () => {
794
+ r.selectNode(), ye.emit("submit");
469
795
  };
470
- return /* @__PURE__ */ i(
796
+ return /* @__PURE__ */ p(
471
797
  "div",
472
798
  {
473
- className: b(
799
+ className: I(
474
800
  "tw:flex tw:items-center tw:gap-4 tw:p-2 tw:justify-between tw:bg-ic-ink-6s tw:text-ic-white-6s tw:text-sm"
475
801
  ),
476
802
  children: [
477
- /* @__PURE__ */ i("div", { className: "tw:flex tw:items-center tw:gap-3", children: [
478
- /* @__PURE__ */ e(k, { size: "32", onClick: a, children: /* @__PURE__ */ e(p, { source: it }) }),
479
- /* @__PURE__ */ e(fe, { onSelectionChange: d, value: t, children: ge.map(({ icon: h, size: c }) => /* @__PURE__ */ e(k, { value: c, children: /* @__PURE__ */ e(p, { source: h }) }, c)) }),
480
- /* @__PURE__ */ i("div", { className: "tw:p-1 tw:flex tw:items-center tw:gap-2 tw:bg-ic-white-1s tw:rounded-lg", children: [
481
- /* @__PURE__ */ e(k, { onClick: o.history.undo, disabled: !n, children: /* @__PURE__ */ e(p, { source: B }) }),
482
- /* @__PURE__ */ e(k, { onClick: o.history.redo, disabled: !w, children: /* @__PURE__ */ e(p, { source: B, className: "tw:rotate-180" }) })
803
+ /* @__PURE__ */ p("div", { className: "tw:flex tw:items-center tw:gap-3", children: [
804
+ /* @__PURE__ */ n(j, { size: "32", onClick: a, children: /* @__PURE__ */ n(E, { source: ur }) }),
805
+ /* @__PURE__ */ n(qe, { onSelectionChange: d, value: t, children: Ue.map(({ icon: h, size: l }) => /* @__PURE__ */ n(j, { value: l, children: /* @__PURE__ */ n(E, { source: h }) }, l)) }),
806
+ /* @__PURE__ */ p("div", { className: "tw:p-1 tw:flex tw:items-center tw:gap-2 tw:bg-ic-white-1s tw:rounded-lg", children: [
807
+ /* @__PURE__ */ n(j, { onClick: r.history.undo, disabled: !o, children: /* @__PURE__ */ n(E, { source: xe }) }),
808
+ /* @__PURE__ */ n(j, { onClick: r.history.redo, disabled: !i, children: /* @__PURE__ */ n(E, { source: xe, className: "tw:rotate-180" }) })
483
809
  ] }),
484
- /* @__PURE__ */ e("div", { className: "tw:p-1 tw:flex tw:items-center tw:gap-2 tw:bg-ic-white-1s tw:rounded-lg", children: /* @__PURE__ */ e(k, { onClick: l, children: /* @__PURE__ */ e(p, { source: s === "full" ? st : rt }) }) })
810
+ /* @__PURE__ */ n("div", { className: "tw:p-1 tw:flex tw:items-center tw:gap-2 tw:bg-ic-white-1s tw:rounded-lg", children: /* @__PURE__ */ n(j, { onClick: c, children: /* @__PURE__ */ n(E, { source: e === "full" ? wr : hr }) }) })
485
811
  ] }),
486
- /* @__PURE__ */ e("div", { className: "tw:flex tw:items-center tw:gap-3", children: /* @__PURE__ */ e(G, { onClick: u, children: "Save" }) })
812
+ /* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:gap-3", children: /* @__PURE__ */ n(Le, { onClick: g, children: "Save" }) })
487
813
  ]
488
814
  }
489
815
  );
490
- }, at = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
816
+ }, pr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
491
817
  <path d="M20 19.9997L16.3763 16.376" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
492
818
  <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"/>
493
819
  </svg>
494
- `, ct = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
820
+ `, gr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
495
821
  <path d="M15 6L9 12L15 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
496
822
  </svg>
497
- `, dt = ({ elements: s, sections: t }) => /* @__PURE__ */ i("div", { className: "tw:flex tw:flex-col tw:h-full", children: [
498
- /* @__PURE__ */ e("div", { className: "tw:flex tw:items-center tw:p-2 tw:gap-3", children: /* @__PURE__ */ e(U, { fullWidth: !0, placeholder: "Search...", prefix: /* @__PURE__ */ e(p, { source: at }) }) }),
499
- /* @__PURE__ */ i(ke, { defaultIndex: 1, className: "tw:flex-1 tw:overflow-hidden tw:border-t tw:border-ic-white-1s", children: [
500
- /* @__PURE__ */ i(be, { children: [
501
- /* @__PURE__ */ e(F, { className: "tw:flex-1", children: "Sections" }),
502
- /* @__PURE__ */ e(F, { className: "tw:flex-1", children: "Elements" })
823
+ `, mr = ({ elements: e, sections: t }) => /* @__PURE__ */ p("div", { className: "tw:flex tw:flex-col tw:h-full", children: [
824
+ /* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:p-2 tw:gap-3", children: /* @__PURE__ */ n(Ee, { fullWidth: !0, placeholder: "Search...", prefix: /* @__PURE__ */ n(E, { source: pr }) }) }),
825
+ /* @__PURE__ */ p(Ze, { defaultIndex: 1, className: "tw:flex-1 tw:overflow-hidden tw:border-t tw:border-ic-white-1s", children: [
826
+ /* @__PURE__ */ p(Qe, { children: [
827
+ /* @__PURE__ */ n(we, { className: "tw:flex-1", children: "Sections" }),
828
+ /* @__PURE__ */ n(we, { className: "tw:flex-1", children: "Elements" })
503
829
  ] }),
504
- /* @__PURE__ */ i(ve, { className: "tw:flex-1 tw:overflow-hidden", children: [
505
- /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(D, { className: "tw:h-full tw:py-2", children: t.map((r, o) => /* @__PURE__ */ e(ht, { group: r }, o)) }) }),
506
- /* @__PURE__ */ e(H, { className: "tw:h-full tw:overflow-hidden", children: /* @__PURE__ */ e(D, { className: "tw:h-full tw:py-2", children: s.map((r, o) => /* @__PURE__ */ e(wt, { group: r }, o)) }) })
830
+ /* @__PURE__ */ p(Ye, { className: "tw:flex-1 tw:overflow-hidden", children: [
831
+ /* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(se, { className: "tw:h-full tw:py-2", children: t.map((s, r) => /* @__PURE__ */ n(vr, { group: s }, r)) }) }),
832
+ /* @__PURE__ */ n(ue, { className: "tw:h-full tw:overflow-hidden", children: /* @__PURE__ */ n(se, { className: "tw:h-full tw:py-2", children: e.map((s, r) => /* @__PURE__ */ n(kr, { group: s }, r)) }) })
507
833
  ] })
508
834
  ] })
509
- ] }), wt = ({ group: s }) => {
510
- const [t, r] = J(!0), { actions: o, connectors: w } = C();
511
- return /* @__PURE__ */ i("div", { className: "tw:flex tw:flex-col tw:text-sm", children: [
512
- /* @__PURE__ */ e(G, { onClick: r, className: "tw:bg-transparent", children: /* @__PURE__ */ i("div", { className: "tw:flex tw:items-center tw:justify-between tw:flex-1 tw:text-sm", children: [
513
- s.name,
514
- /* @__PURE__ */ e(
515
- p,
835
+ ] }), kr = ({ group: e }) => {
836
+ const [t, s] = De(!0), { actions: r, connectors: i } = W();
837
+ return /* @__PURE__ */ p("div", { className: "tw:flex tw:flex-col tw:text-sm", children: [
838
+ /* @__PURE__ */ n(Le, { onClick: s, className: "tw:bg-transparent", children: /* @__PURE__ */ p("div", { className: "tw:flex tw:items-center tw:justify-between tw:flex-1 tw:text-sm", children: [
839
+ e.name,
840
+ /* @__PURE__ */ n(
841
+ E,
516
842
  {
517
- source: q,
518
- className: b("tw:transition-transform", {
843
+ source: Se,
844
+ className: I("tw:transition-transform", {
519
845
  "tw:rotate-180": !t
520
846
  })
521
847
  }
522
848
  )
523
849
  ] }) }),
524
- /* @__PURE__ */ e(xe, { open: t, children: /* @__PURE__ */ e("div", { className: "tw:px-4 tw:py-2 tw:grid tw:grid-cols-2 tw:gap-4", children: s.elements.map((n, d) => /* @__PURE__ */ i("div", { className: "tw:space-y-1", children: [
525
- /* @__PURE__ */ e(
850
+ /* @__PURE__ */ n(Ke, { open: t, children: /* @__PURE__ */ n("div", { className: "tw:px-4 tw:py-2 tw:grid tw:grid-cols-2 tw:gap-4", children: e.elements.map((o, d) => /* @__PURE__ */ p("div", { className: "tw:space-y-1", children: [
851
+ /* @__PURE__ */ n(
526
852
  "div",
527
853
  {
528
- className: b(
854
+ className: I(
529
855
  "tw:bg-ic-ink-6s tw:relative tw:transition-transform tw:rounded-lg tw:hover:scale-105 tw:pointer-events-auto tw:aspect-video tw:overflow-hidden",
530
856
  "tw:cursor-grabbing tw:flex tw:flex-col tw:gap-1 tw:items-center tw:justify-center tw:p-1 tw:opacity-100 tw:text-ic-white-5s",
531
857
  "tw:after:absolute tw:after:inset-0 tw:after:content-empty tw:after:bg-ic-white-1s"
532
858
  ),
533
- ref: (l) => {
534
- l && w.create(l, n.template, {
859
+ ref: (c) => {
860
+ c && i.create(c, o.template, {
535
861
  onCreate(a) {
536
- (typeof n.autoFocus == "function" ? n.autoFocus(a) : n.autoFocus) && o.selectNode(a.rootNodeId), n.onCreate?.(a);
862
+ (typeof o.autoFocus == "function" ? o.autoFocus(a) : o.autoFocus) && r.selectNode(a.rootNodeId), o.onCreate?.(a);
537
863
  }
538
864
  });
539
865
  },
540
- children: /* @__PURE__ */ e(ce, { width: void 0, height: void 0, ...n.icon })
866
+ children: /* @__PURE__ */ n(ot, { width: void 0, height: void 0, ...o.icon })
541
867
  }
542
868
  ),
543
- /* @__PURE__ */ e("p", { className: "tw:text-xs tw:mx-auto tw:text-center", children: n.name })
869
+ /* @__PURE__ */ n("p", { className: "tw:text-xs tw:mx-auto tw:text-center", children: o.name })
544
870
  ] }, d)) }) })
545
871
  ] });
546
- }, ht = ({ group: s }) => {
547
- const [t, r] = j(!1), { refs: o, floatingStyles: w, context: n } = We({
872
+ }, vr = ({ group: e }) => {
873
+ const [t, s] = ee(!1), { refs: r, floatingStyles: i, context: o } = wt({
548
874
  open: t,
549
- onOpenChange: r,
875
+ onOpenChange: s,
550
876
  placement: "right-start",
551
877
  middleware: [
552
- Ie(),
553
- Re({
554
- apply({ elements: g }) {
555
- const m = {
556
- zIndex: `${Ce}`,
557
- height: `${g.reference.getBoundingClientRect().height}px`
878
+ ft(),
879
+ pt({
880
+ apply({ elements: m }) {
881
+ const k = {
882
+ zIndex: `${yt}`,
883
+ height: `${m.reference.getBoundingClientRect().height}px`
558
884
  };
559
- Object.assign(g.floating.style, m);
885
+ Object.assign(m.floating.style, k);
560
886
  }
561
887
  })
562
888
  ],
563
- whileElementsMounted: Ae
889
+ whileElementsMounted: ut
564
890
  });
565
- N(() => {
566
- o.setPositionReference(document.querySelector("aside"));
567
- }, [o]);
568
- const d = ze(n, { move: !1, handleClose: Fe() }), l = He(n), a = Ve(n), u = Te(n), { getReferenceProps: h, getFloatingProps: c } = Pe([d, l, a, u]);
569
- return /* @__PURE__ */ i(L, { children: [
570
- /* @__PURE__ */ i(
891
+ V(() => {
892
+ r.setPositionReference(document.querySelector("aside"));
893
+ }, [r]);
894
+ const d = gt(o, { move: !1, handleClose: mt() }), c = kt(o), a = vt(o), g = bt(o), { getReferenceProps: h, getFloatingProps: l } = Ct([d, c, a, g]);
895
+ return /* @__PURE__ */ p(K, { children: [
896
+ /* @__PURE__ */ p(
571
897
  "button",
572
898
  {
573
- className: b(
899
+ className: I(
574
900
  "tw:w-full tw:text-left tw:flex tw:items-center tw:text-ic-white-5s tw:gap-2 tw:p-2 tw:rounded-lg",
575
901
  "tw:hover:text-ic-white-6s tw:hover:bg-ic-white-1s tw:hover:font-medium"
576
902
  ),
577
903
  ...h(),
578
- ref: o.setReference,
904
+ ref: r.setReference,
579
905
  children: [
580
- /* @__PURE__ */ e("div", { className: "tw:bg-ic-white-1s tw:p-1.5 tw:rounded-lg", children: /* @__PURE__ */ e(p, { ...s.icon }) }),
581
- /* @__PURE__ */ e("span", { className: "tw:flex-1 tw:truncate", children: s.name }),
582
- /* @__PURE__ */ e(p, { className: "tw:rotate-180", source: ct })
906
+ /* @__PURE__ */ n("div", { className: "tw:bg-ic-white-1s tw:p-1.5 tw:rounded-lg", children: /* @__PURE__ */ n(E, { ...e.icon }) }),
907
+ /* @__PURE__ */ n("span", { className: "tw:flex-1 tw:truncate", children: e.name }),
908
+ /* @__PURE__ */ n(E, { className: "tw:rotate-180", source: gr })
583
909
  ]
584
910
  }
585
911
  ),
586
- t && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e("div", { style: w, ...c(), ref: o.setFloating, children: /* @__PURE__ */ i("div", { className: "tw:h-full tw:flex tw:flex-col tw:border-l tw:border-t tw:border-ic-white-2s tw:bg-ic-ink-6s tw:text-ic-white-6s tw:text-sm", children: [
587
- /* @__PURE__ */ e("div", { className: "tw:h-12 tw:px-2 tw:flex tw:items-center", children: /* @__PURE__ */ e("h6", { className: "tw:font-medium", children: s.name }) }),
588
- /* @__PURE__ */ e(D, { className: "tw:flex-1 tw:px-3", children: /* @__PURE__ */ e("div", { className: "tw:flex tw:flex-col tw:gap-4", children: s.sections.map((g, m) => /* @__PURE__ */ De(ut, { ...g, key: m })) }) })
912
+ t && /* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n("div", { style: i, ...l(), ref: r.setFloating, children: /* @__PURE__ */ p("div", { className: "tw:h-full tw:flex tw:flex-col tw:border-l tw:border-t tw:border-ic-white-2s tw:bg-ic-ink-6s tw:text-ic-white-6s tw:text-sm", children: [
913
+ /* @__PURE__ */ n("div", { className: "tw:h-12 tw:px-2 tw:flex tw:items-center", children: /* @__PURE__ */ n("h6", { className: "tw:font-medium", children: e.name }) }),
914
+ /* @__PURE__ */ n(se, { className: "tw:flex-1 tw:px-3", children: /* @__PURE__ */ n("div", { className: "tw:flex tw:flex-col tw:gap-4", children: e.sections.map((m, k) => /* @__PURE__ */ ht(br, { ...m, key: k })) }) })
589
915
  ] }) }) })
590
916
  ] });
591
- }, ut = ({ template: s, autoFocus: t = !0, onCreate: r }) => {
592
- const [, o] = j(!1), [w] = A(), { actions: n, connectors: d, resolver: l } = C((a) => ({
917
+ }, br = ({ template: e, autoFocus: t = !0, onCreate: s }) => {
918
+ const [, r] = ee(!1), [i] = ae(), { actions: o, connectors: d, resolver: c } = W((a) => ({
593
919
  resolver: a.options.resolver
594
920
  }));
595
- return /* @__PURE__ */ e(
921
+ return /* @__PURE__ */ n(
596
922
  "div",
597
923
  {
598
924
  className: "tw:cursor-grab tw:border tw:border-ic-white-1s tw:rounded-lg tw:overflow-hidden",
599
925
  ref: (a) => {
600
- a && d.create(a, s, {
601
- onCreate(u) {
602
- t && n.selectNode(u.rootNodeId), r?.(u);
926
+ a && d.create(a, e, {
927
+ onCreate(g) {
928
+ t && o.selectNode(g.rootNodeId), s?.(g);
603
929
  }
604
930
  });
605
931
  },
606
- onDragStart: () => o(!0),
607
- onDragEnd: () => o(!1),
608
- children: /* @__PURE__ */ e("div", { className: "tw:relative tw:aspect-video tw:rounded-lg tw:overflow-hidden tw:w-60 tw:pointer-events-none", children: /* @__PURE__ */ e("div", { className: "tw:absolute tw:inset-0", children: /* @__PURE__ */ e(
609
- ne,
932
+ onDragStart: () => r(!0),
933
+ onDragEnd: () => r(!1),
934
+ children: /* @__PURE__ */ n("div", { className: "tw:relative tw:aspect-video tw:rounded-lg tw:overflow-hidden tw:w-60 tw:pointer-events-none", children: /* @__PURE__ */ n("div", { className: "tw:absolute tw:inset-0", children: /* @__PURE__ */ n(
935
+ Ve,
610
936
  {
611
937
  containerProps: {
612
938
  style: {
613
- backgroundColor: w.theme.palette.background.default
939
+ backgroundColor: i.theme.palette.background.default
614
940
  }
615
941
  },
616
- viewport: { width: de.md.minWidth },
617
- children: /* @__PURE__ */ e(Z, { resolver: l, children: /* @__PURE__ */ e(Q, {}) })
942
+ viewport: { width: Nt.md.minWidth },
943
+ children: /* @__PURE__ */ n(Me, { resolver: c, children: /* @__PURE__ */ n($e, {}) })
618
944
  }
619
945
  ) }) })
620
946
  }
621
947
  );
622
- }, pt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
948
+ }, Cr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
623
949
  <path d="M12.5 2H9.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
624
950
  <path d="M2 9.5V12.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
625
951
  <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"/>
@@ -630,81 +956,81 @@ const ne = ({ children: s, viewport: t, containerProps: r }) => {
630
956
  <path d="M2 17V18C2 19.105 2.895 20 4 20H5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
631
957
  <path d="M20 5V4C20 2.895 19.105 2 18 2H17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
632
958
  </svg>
633
- `, mt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
959
+ `, xr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
634
960
  <circle cx="6.49771" cy="5.49762" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
635
961
  <circle cx="6.49771" cy="18.503" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
636
962
  <path d="M6.49771 7.99854V16.0019" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
637
963
  <circle cx="17.5023" cy="13.0006" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
638
964
  <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"/>
639
965
  </svg>
640
- `, gt = (s) => {
641
- const { query: t, actions: r } = C(), {
642
- id: o,
643
- expanded: w,
644
- actions: n,
966
+ `, yr = (e) => {
967
+ const { query: t, actions: s } = W(), {
968
+ id: r,
969
+ expanded: i,
970
+ actions: o,
645
971
  displayName: d,
646
- children: l,
972
+ children: c,
647
973
  depth: a
648
- } = qe((m) => ({
649
- expanded: m.expanded,
650
- displayName: $(t.node(m.id).get())
651
- })), { selected: u, selectable: h } = C((m, f) => {
652
- const v = f.node(o).get();
974
+ } = $t((k) => ({
975
+ expanded: k.expanded,
976
+ displayName: Re(t.node(k.id).get())
977
+ })), { selected: g, selectable: h } = W((k, v) => {
978
+ const w = v.node(r).get();
653
979
  return {
654
- selected: f.getEvent("selected").contains(o),
655
- nodeDOM: v.dom,
656
- selectable: we(v)
980
+ selected: v.getEvent("selected").contains(r),
981
+ nodeDOM: w.dom,
982
+ selectable: it(w)
657
983
  };
658
984
  });
659
- N(() => {
660
- o === W && n.setExpandedState(!0);
661
- }, [n, o]), N(() => {
662
- if (l.length === 0) return;
663
- l.some((f) => {
664
- const v = t.getEvent("selected").all();
665
- return v.includes(f) ? !0 : t.node(f).descendants(!0).some((y) => v.includes(y));
666
- }) && n.setExpandedState(!0);
667
- }, [l, n, t]);
668
- const c = () => {
669
- r.selectNode(o);
670
- }, g = (m) => {
671
- m.stopPropagation(), n.toggleLayer();
985
+ V(() => {
986
+ r === oe && o.setExpandedState(!0);
987
+ }, [o, r]), V(() => {
988
+ if (c.length === 0) return;
989
+ c.some((v) => {
990
+ const w = t.getEvent("selected").all();
991
+ return w.includes(v) ? !0 : t.node(v).descendants(!0).some((b) => w.includes(b));
992
+ }) && o.setExpandedState(!0);
993
+ }, [c, o, t]);
994
+ const l = () => {
995
+ s.selectNode(r);
996
+ }, m = (k) => {
997
+ k.stopPropagation(), o.toggleLayer();
672
998
  };
673
- return /* @__PURE__ */ i(
999
+ return /* @__PURE__ */ p(
674
1000
  "div",
675
1001
  {
676
1002
  className: "tw:py-1",
677
1003
  children: [
678
- /* @__PURE__ */ i(
1004
+ /* @__PURE__ */ p(
679
1005
  "div",
680
1006
  {
681
- onClick: c,
1007
+ onClick: l,
682
1008
  style: {
683
1009
  paddingLeft: Math.max(0, a - 1) * 16
684
1010
  },
685
- className: b(
1011
+ className: I(
686
1012
  "tw:flex tw:items-center tw:gap-0.5 tw:cursor-pointer tw:rounded-1 tw:pr-2 tw:py-1 tw:border tw:border-ic-white-1s tw:hover:bg-ic-white-1s",
687
1013
  {
688
- hidden: o === W,
689
- "tw:bg-ic-black-7s": u,
1014
+ hidden: r === oe,
1015
+ "tw:bg-ic-black-7s": g,
690
1016
  "tw:pointer-events-none": !h
691
1017
  }
692
1018
  ),
693
1019
  children: [
694
- l.length ? /* @__PURE__ */ e(k, { className: "tw:pointer-events-auto", onClick: g, children: /* @__PURE__ */ e(
695
- p,
1020
+ c.length ? /* @__PURE__ */ n(j, { className: "tw:pointer-events-auto", onClick: m, children: /* @__PURE__ */ n(
1021
+ E,
696
1022
  {
697
- className: b("tw:transition-transform tw:-rotate-90", {
698
- "tw:rotate-0": w
1023
+ className: I("tw:transition-transform tw:-rotate-90", {
1024
+ "tw:rotate-0": i
699
1025
  }),
700
1026
  size: 16,
701
- source: q
1027
+ source: Se
702
1028
  }
703
- ) }) : /* @__PURE__ */ e("div", { className: "tw:p-1", children: /* @__PURE__ */ e(p, { size: 16, source: mt }) }),
704
- /* @__PURE__ */ e(
1029
+ ) }) : /* @__PURE__ */ n("div", { className: "tw:p-1", children: /* @__PURE__ */ n(E, { size: 16, source: xr }) }),
1030
+ /* @__PURE__ */ n(
705
1031
  "span",
706
1032
  {
707
- className: b("tw:flex-1 tw:truncate", {
1033
+ className: I("tw:flex-1 tw:truncate", {
708
1034
  "tw:text-ic-white-3s": !h
709
1035
  }),
710
1036
  children: d
@@ -713,16 +1039,16 @@ const ne = ({ children: s, viewport: t, containerProps: r }) => {
713
1039
  ]
714
1040
  }
715
1041
  ),
716
- /* @__PURE__ */ e("div", { className: "tw:space-y-1", children: s.children })
1042
+ /* @__PURE__ */ n("div", { className: "tw:space-y-1", children: e.children })
717
1043
  ]
718
1044
  }
719
1045
  );
720
- }, ft = ({ onClose: s }) => {
721
- const t = tt(), r = (o) => {
722
- t.start(o);
1046
+ }, Nr = ({ onClose: e }) => {
1047
+ const t = Dt(), s = (r) => {
1048
+ t.start(r);
723
1049
  };
724
- return /* @__PURE__ */ e(te, { children: /* @__PURE__ */ i(
725
- ye.div,
1050
+ return /* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ p(
1051
+ Xe.div,
726
1052
  {
727
1053
  drag: !0,
728
1054
  dragControls: t,
@@ -730,64 +1056,64 @@ const ne = ({ children: s, viewport: t, containerProps: r }) => {
730
1056
  style: { zIndex: 1e5, width: 320, height: 400, top: 80, right: 40 },
731
1057
  className: "tw:fixed tw:rounded-2 tw:bg-ic-ink-6s tw:text-white tw:flex tw:flex-col tw:border tw:border-ic-white-2s",
732
1058
  children: [
733
- /* @__PURE__ */ i(
1059
+ /* @__PURE__ */ p(
734
1060
  "div",
735
1061
  {
736
- onPointerDown: r,
1062
+ onPointerDown: s,
737
1063
  className: "tw:py-2 tw:cursor-grab tw:flex tw:items-center tw:justify-between tw:px-4",
738
1064
  children: [
739
- /* @__PURE__ */ i("div", { className: "tw:flex tw:items-center tw:gap-2", children: [
740
- /* @__PURE__ */ e(p, { source: pt }),
741
- /* @__PURE__ */ e("p", { className: "tw:text-sm tw:font-medium", children: "Layers" })
1065
+ /* @__PURE__ */ p("div", { className: "tw:flex tw:items-center tw:gap-2", children: [
1066
+ /* @__PURE__ */ n(E, { source: Cr }),
1067
+ /* @__PURE__ */ n("p", { className: "tw:text-sm tw:font-medium", children: "Layers" })
742
1068
  ] }),
743
- /* @__PURE__ */ e(k, { onClick: s, children: /* @__PURE__ */ e(p, { source: Ne }) })
1069
+ /* @__PURE__ */ n(j, { onClick: e, children: /* @__PURE__ */ n(E, { source: Je }) })
744
1070
  ]
745
1071
  }
746
1072
  ),
747
- /* @__PURE__ */ e("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s tw:p-2", children: /* @__PURE__ */ e(Ue, { renderLayer: gt }) })
1073
+ /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s tw:p-2", children: /* @__PURE__ */ n(Mt, { renderLayer: yr }) })
748
1074
  ]
749
1075
  }
750
1076
  ) });
751
- }, kt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1077
+ }, Lr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
752
1078
  <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"/>
753
1079
  <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"/>
754
1080
  <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"/>
755
1081
  </svg>
756
- `, bt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1082
+ `, Er = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
757
1083
  <path d="M5 12H19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
758
1084
  <path d="M10 7L5 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
759
1085
  <path d="M10 17L5 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
760
1086
  </svg>
761
- `, vt = ({ insert: s }) => {
762
- const [t, r] = J(!1), {
1087
+ `, Sr = ({ insert: e }) => {
1088
+ const [t, s] = De(!1), {
763
1089
  queryParams: {
764
- action: o = "insert"
1090
+ action: r = "insert"
765
1091
  /* Insert */
766
1092
  },
767
- setQueryParams: w
768
- } = S(), { actions: n, isDeletable: d, focusedNode: l } = C((c, g) => {
769
- const m = g.getEvent("selected").first(), f = m ? g.node(m) : null;
1093
+ setQueryParams: i
1094
+ } = J(), { actions: o, isDeletable: d, focusedNode: c } = W((l, m) => {
1095
+ const k = m.getEvent("selected").first(), v = k ? m.node(k) : null;
770
1096
  return {
771
- enabled: c.options.enabled,
772
- isDeletable: !!(f?.isDeletable() && (f.get().data.custom?.deletable ?? !0)),
773
- focusedNode: f?.get()
1097
+ enabled: l.options.enabled,
1098
+ isDeletable: !!(v?.isDeletable() && (v.get().data.custom?.deletable ?? !0)),
1099
+ focusedNode: v?.get()
774
1100
  };
775
1101
  }), a = () => {
776
- n.selectNode();
777
- }, u = (c) => {
778
- n.delete(c.currentTarget.value);
779
- }, h = (c) => {
780
- const g = c.currentTarget.value;
781
- g === "layers" ? r() : (a(), w({
782
- action: g
1102
+ o.selectNode();
1103
+ }, g = (l) => {
1104
+ o.delete(l.currentTarget.value);
1105
+ }, h = (l) => {
1106
+ const m = l.currentTarget.value;
1107
+ m === "layers" ? s() : (a(), i({
1108
+ action: m
783
1109
  }));
784
1110
  };
785
- return /* @__PURE__ */ i(L, { children: [
786
- /* @__PURE__ */ i("aside", { className: "tw:flex tw:items-stretch tw:bg-ic-ink-6s tw:relative tw:border-t tw:border-ic-white-2s tw:text-ic-white-6s tw:text-sm", children: [
787
- /* @__PURE__ */ i("div", { className: "tw:px-1 tw:flex tw:flex-col tw:gap-1", children: [
788
- !!s && /* @__PURE__ */ i(_, { children: [
789
- /* @__PURE__ */ e(
790
- k,
1111
+ return /* @__PURE__ */ p(K, { children: [
1112
+ /* @__PURE__ */ p("aside", { className: "tw:flex tw:items-stretch tw:bg-ic-ink-6s tw:relative tw:border-t tw:border-ic-white-2s tw:text-ic-white-6s tw:text-sm", children: [
1113
+ /* @__PURE__ */ p("div", { className: "tw:px-1 tw:flex tw:flex-col tw:gap-1", children: [
1114
+ !!e && /* @__PURE__ */ p(Ne, { children: [
1115
+ /* @__PURE__ */ n(
1116
+ j,
791
1117
  {
792
1118
  tooltip: {
793
1119
  content: "Insert",
@@ -797,13 +1123,13 @@ const ne = ({ children: s, viewport: t, containerProps: r }) => {
797
1123
  value: "insert",
798
1124
  className: "tw:relative",
799
1125
  size: "32",
800
- children: /* @__PURE__ */ e(p, { source: he })
1126
+ children: /* @__PURE__ */ n(E, { source: ct })
801
1127
  }
802
1128
  ),
803
- /* @__PURE__ */ e("hr", { className: "tw:border-ic-white-2s" })
1129
+ /* @__PURE__ */ n("hr", { className: "tw:border-ic-white-2s" })
804
1130
  ] }),
805
- /* @__PURE__ */ e(
806
- k,
1131
+ /* @__PURE__ */ n(
1132
+ j,
807
1133
  {
808
1134
  tooltip: {
809
1135
  content: "Layers",
@@ -813,55 +1139,55 @@ const ne = ({ children: s, viewport: t, containerProps: r }) => {
813
1139
  value: "layers",
814
1140
  className: "tw:relative",
815
1141
  size: "32",
816
- children: /* @__PURE__ */ e(p, { source: kt })
1142
+ children: /* @__PURE__ */ n(E, { source: Lr })
817
1143
  }
818
1144
  )
819
1145
  ] }),
820
- /* @__PURE__ */ i(
1146
+ /* @__PURE__ */ p(
821
1147
  "div",
822
1148
  {
823
- className: b("tw:relative tw:flex tw:flex-col tw:border-l tw:border-ic-white-1s tw:w-72 tw:overflow-auto"),
1149
+ className: I("tw:relative tw:flex tw:flex-col tw:border-l tw:border-ic-white-1s tw:w-72 tw:overflow-auto"),
824
1150
  children: [
825
- !l?.related.inspector && /* @__PURE__ */ e("div", { className: "tw:flex-1 tw:overflow-auto scrollbar", children: o === "insert" && !!s && /* @__PURE__ */ e(dt, { elements: s.elements, sections: s.sections }) }),
826
- !!l?.related?.inspector && /* @__PURE__ */ i("div", { className: "tw:flex tw:flex-col tw:flex-1 tw:overflow-hidden", children: [
827
- /* @__PURE__ */ i("div", { className: "tw:flex tw:items-center tw:gap-2 tw:px-2 tw:py-2", children: [
828
- /* @__PURE__ */ e(k, { onClick: a, children: /* @__PURE__ */ e(p, { source: bt }) }),
829
- /* @__PURE__ */ e("div", { className: "tw:flex-1 tw:overflow-hidden", children: /* @__PURE__ */ e(U, { fullWidth: !0, value: $(l), size: "32" }) }),
830
- d && /* @__PURE__ */ e(k, { value: l.id, onClick: u, children: /* @__PURE__ */ e(p, { className: "tw:text-ic-red-4s", source: Le }) })
1151
+ !c?.related.inspector && /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto scrollbar", children: r === "insert" && !!e && /* @__PURE__ */ n(mr, { elements: e.elements, sections: e.sections }) }),
1152
+ !!c?.related?.inspector && /* @__PURE__ */ p("div", { className: "tw:flex tw:flex-col tw:flex-1 tw:overflow-hidden", children: [
1153
+ /* @__PURE__ */ p("div", { className: "tw:flex tw:items-center tw:gap-2 tw:px-2 tw:py-2", children: [
1154
+ /* @__PURE__ */ n(j, { onClick: a, children: /* @__PURE__ */ n(E, { source: Er }) }),
1155
+ /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-hidden", children: /* @__PURE__ */ n(Ee, { fullWidth: !0, value: Re(c), size: "32" }) }),
1156
+ d && /* @__PURE__ */ n(j, { value: c.id, onClick: g, children: /* @__PURE__ */ n(E, { className: "tw:text-ic-red-4s", source: et }) })
831
1157
  ] }),
832
- /* @__PURE__ */ e("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s scrollbar-hidden", children: /* @__PURE__ */ e(Ee, { fallback: null, children: Y(l.related.inspector) }) })
1158
+ /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s scrollbar-hidden", children: /* @__PURE__ */ n(at, { fallback: null, children: Ae(c.related.inspector) }) })
833
1159
  ] })
834
1160
  ]
835
1161
  }
836
1162
  )
837
1163
  ] }),
838
- t && /* @__PURE__ */ e(ft, { onClose: r })
1164
+ t && /* @__PURE__ */ n(Nr, { onClose: s })
839
1165
  ] });
840
- }, It = ({ theme: s, insert: t }) => {
1166
+ }, Hr = ({ theme: e, insert: t }) => {
841
1167
  const {
842
- queryParams: { screen: r }
843
- } = S();
844
- return A({
845
- theme: s
846
- }), /* @__PURE__ */ e(Z, { enabled: !0, onRender: nt, children: /* @__PURE__ */ i("div", { className: "tw:flex tw:flex-col tw:w-screen tw:h-screen tw:bg-ic-ink-6s tw:text-ic-white-6s", children: [
847
- /* @__PURE__ */ e(lt, {}),
848
- /* @__PURE__ */ i("div", { className: "tw:flex-1 tw:overflow-hidden tw:flex", children: [
849
- /* @__PURE__ */ e(vt, { insert: t }),
850
- /* @__PURE__ */ e(
851
- ne,
1168
+ queryParams: { screen: s }
1169
+ } = J();
1170
+ return ae({
1171
+ theme: e
1172
+ }), /* @__PURE__ */ n(Me, { enabled: !0, onRender: dr, children: /* @__PURE__ */ p("div", { className: "tw:flex tw:flex-col tw:w-screen tw:h-screen tw:bg-ic-ink-6s tw:text-ic-white-6s", children: [
1173
+ /* @__PURE__ */ n(fr, {}),
1174
+ /* @__PURE__ */ p("div", { className: "tw:flex-1 tw:overflow-hidden tw:flex", children: [
1175
+ /* @__PURE__ */ n(Sr, { insert: t }),
1176
+ /* @__PURE__ */ n(
1177
+ Ve,
852
1178
  {
853
1179
  viewport: {
854
- width: (o) => r === "lg" ? Math.max(o, V[r]) : V[r]
1180
+ width: (r) => s === "lg" ? Math.max(r, fe[s]) : fe[s]
855
1181
  },
856
- children: /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(Se, {}) })
1182
+ children: /* @__PURE__ */ n($e, { children: /* @__PURE__ */ n(tt, {}) })
857
1183
  }
858
1184
  )
859
1185
  ] })
860
1186
  ] }) });
861
1187
  };
862
1188
  export {
863
- It as Editor,
864
- S as useEditorQueryParams,
865
- Ft as useEditorResponsive,
866
- A as useEditorState
1189
+ Hr as Editor,
1190
+ J as useEditorQueryParams,
1191
+ zr as useEditorResponsive,
1192
+ ae as useEditorState
867
1193
  };