@janbox/storefront-builder 1.0.7 → 1.0.9
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/anchor-target-BlOvysAr.js +2329 -0
- package/dist/color-picker-popover-B3AVFuei.js +201 -0
- package/dist/components/composer/dataset.d.ts +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/countdown-timer.node-j79tvSTR.js +826 -0
- package/dist/date-picker-B4Rju7gG.js +115 -0
- package/dist/{countdown-timer.node-CGKz1DZI.js → dialog-header-DPLOS7TT.js} +2209 -3174
- package/dist/dropzone-Dbfed3jK.js +490 -0
- package/dist/editor/hooks/index.d.ts +1 -1
- package/dist/editor/lib/index.d.ts +2 -2
- package/dist/editor/toolbars.js +336 -0
- package/dist/editor/types/index.d.ts +0 -2
- package/dist/editor/ui/button/button.d.ts +2 -3
- package/dist/editor/ui/icon-button/icon-button.d.ts +1 -2
- package/dist/editor/ui.js +110 -0
- package/dist/editor.js +273 -269
- package/dist/index-BbiQ0n_-.js +4 -0
- package/dist/index-C9Q0Iqvf.js +4447 -0
- package/dist/index.js +369 -107
- package/dist/lib/container/container.inspector/container.inspector.d.ts +1 -0
- package/dist/lib/container/container.inspector/index.d.ts +1 -0
- package/dist/lib/container/container.node/container.node.d.ts +2 -0
- package/dist/lib/container/container.node/index.d.ts +3 -0
- package/dist/lib/container/container.node/types.d.ts +2 -0
- package/dist/lib/container/index.d.ts +2 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/style.css +1 -1
- package/dist/templates.js +185 -189
- package/dist/{tooltip-Coblboaw.js → tooltip-KbIHELP2.js} +1 -1
- package/package.json +12 -4
- package/dist/index-Bvy64nrI.js +0 -4
- package/dist/index-Du5uN6Rq.js +0 -6015
- /package/dist/editor/hooks/{use-editor-state.d.ts → use-editor.d.ts} +0 -0
|
@@ -0,0 +1,4447 @@
|
|
|
1
|
+
import { jsxs as u, jsx as n, Fragment as It } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { R as V, e as Wt, F as Et, v as X, M as At, w as y, q as Dt, r as Ot, o as Ft, k as Mt, b as zt, c as $t, m as et, A as _t, g as Pn, a as kn, T as Bn, p as In, s as Wn, l as En, S as An, t as Dn, L as On, I as Fn, V as Mn, j as zn, f as $n, B as _n, h as Hn, G as Vn, i as jn, d as Un, U as Gn, n as qn, N as Jn } from "./countdown-timer.node-j79tvSTR.js";
|
|
3
|
+
import { useNode as Q, ROOT_NODE as Kn, Frame as Yn, Editor as Zn, DefaultEventHandlers as Xn } from "@craftjs/core";
|
|
4
|
+
import { isString as xe, isNil as ee, trimStart as Ht, isNumber as Qn } from "lodash-es";
|
|
5
|
+
import * as m from "react";
|
|
6
|
+
import { useState as U, useEffect as we, Fragment as Vt, useMemo as eo } from "react";
|
|
7
|
+
import "clsx";
|
|
8
|
+
import "tailwind-merge";
|
|
9
|
+
import { W, m as ie, c as j, l as G, w as le, p as to, d as K, o as no, n as oo, x as ro, y as tt, P as jt, e as ke, q as Ae, s as De, r as Oe, C as Fe } from "./dialog-header-DPLOS7TT.js";
|
|
10
|
+
import { v as E, K as ao, E as k, i as ve, N as Be, k as at, R as Ce, G as so, n as io, W as H, H as ce, D as Y, S as M, h as $, g as z, B as Z, T as L, p as Ut, A as Gt, b as Me, c as ge, d as ze, s as qt, e as st, F as $e, j as lo, M as co, m as Jt, l as Kt, J as uo, r as ho, L as it, y as dt, Q as go, O as po, q as Ie, o as mo, P as nt, f as fo, a as Yt } from "./anchor-target-BlOvysAr.js";
|
|
11
|
+
import { getGridProps as xo, getCellProps as bo, GRID_MINIMUM_COLS as Tt, GRID_MAXIMUM_COLS as wo, getLinkProps as vo, getButtonProps as Co, getFlexboxProps as Ro, getFlexItemProps as So, getImageProps as yo, getMarqueeProps as To, MarqueeDataAttributes as Ye, getTabsProps as No, getSwiperProps as Lo, getUnorderedListProps as Po, getIconProps as ko, getAccordionProps as Bo, getAccordionGroupProps as Io, getAccordionDataAttributes as Te, AccordionDataAttributes as ot, getVideoProps as Wo, getBoxProps as Eo, getContainerProps as Ao } from "@janbox/storefront-ui";
|
|
12
|
+
import { t as I, u as ne, i as Nt, a as rt, e as he, C as Zt } from "./color-picker-popover-B3AVFuei.js";
|
|
13
|
+
import "@janbox/storefront-ui/hooks";
|
|
14
|
+
import { useFloating as Do, autoUpdate as Oo, flip as Fo, offset as Mo, FloatingPortal as zo } from "@floating-ui/react";
|
|
15
|
+
import "react-use";
|
|
16
|
+
import "@janbox/storefront-ui/theme";
|
|
17
|
+
import "react-colorful";
|
|
18
|
+
import { l as A, j as D, h as T, i as O, k as N, c as be, g as lt, a as _e, e as $o, A as ct, f as He } from "./dropzone-Dbfed3jK.js";
|
|
19
|
+
import "overlayscrollbars-react";
|
|
20
|
+
import "@tanstack/react-virtual";
|
|
21
|
+
import "react-dropzone";
|
|
22
|
+
import "react-datepicker/dist/react-datepicker.css";
|
|
23
|
+
import "react-datepicker";
|
|
24
|
+
import "@tiptap/extension-text-style";
|
|
25
|
+
import "@tiptap/react";
|
|
26
|
+
import "@tiptap/react/menus";
|
|
27
|
+
import "@tiptap/starter-kit";
|
|
28
|
+
import { useFrame as _o } from "react-frame-component";
|
|
29
|
+
import "flat";
|
|
30
|
+
import "@emotion/react";
|
|
31
|
+
import "@janbox/storefront-ui/utils";
|
|
32
|
+
import { useToggle as Xt } from "usehooks-ts";
|
|
33
|
+
import { DragDropContext as Qt, Droppable as en, Draggable as tn } from "@hello-pangea/dnd";
|
|
34
|
+
import { W as Ho } from "./date-picker-B4Rju7gG.js";
|
|
35
|
+
const Vo = () => E({
|
|
36
|
+
transform: xo
|
|
37
|
+
}), jo = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
38
|
+
<path d="M11.835 15L16.835 20C17.663 20.828 19.007 20.828 19.835 20V20C20.663 19.172 20.663 17.828 19.835 17L14.835 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
39
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M20.916 5.84669C20.94 5.86969 20.958 5.89969 20.967 5.93169C21.437 7.49869 21.073 9.26169 19.835 10.4997C18.584 11.7507 16.797 12.1087 15.218 11.6167L6.871 19.9637C6.058 20.7767 4.732 20.8377 3.891 20.0537C3.007 19.2307 2.989 17.8467 3.835 16.9997L12.218 8.61669C11.726 7.03769 12.084 5.25069 13.335 3.99969C14.573 2.76169 16.336 2.39769 17.903 2.86769C17.935 2.87769 17.965 2.89469 17.988 2.91869L18.15 3.08069C18.228 3.15869 18.228 3.28569 18.15 3.36369L15.515 5.99969L17.835 8.31969L20.471 5.68369C20.549 5.60569 20.676 5.60569 20.754 5.68369L20.916 5.84669V5.84669Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
40
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.933 4.29296L3.607 6.31596C3.743 6.72496 4.125 6.99996 4.556 6.99996H6.835V4.72096C6.835 4.29096 6.56 3.90796 6.151 3.77196L4.128 3.09796C3.948 3.03796 3.75 3.08496 3.616 3.21896L3.054 3.78096C2.92 3.91496 2.873 4.11296 2.933 4.29296V4.29296Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
41
|
+
<path d="M6.84 7L10.34 10.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
42
|
+
</svg>
|
|
43
|
+
`, f = ({ name: e, children: o, responsive: r, slots: t }) => /* @__PURE__ */ u("div", { className: "tw:flex tw:flex-col tw:py-2 tw:gap-2", children: [
|
|
44
|
+
/* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:gap-2", children: [
|
|
45
|
+
/* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:gap-2", children: [
|
|
46
|
+
/* @__PURE__ */ n(W, { source: jo }),
|
|
47
|
+
/* @__PURE__ */ n("span", { className: "tw:text-sm tw:font-medium", children: e })
|
|
48
|
+
] }),
|
|
49
|
+
!!r && /* @__PURE__ */ n(ao, {}),
|
|
50
|
+
/* @__PURE__ */ n("div", { className: "tw:flex-1 tw:flex tw:items-center tw:justify-end", children: t?.right })
|
|
51
|
+
] }),
|
|
52
|
+
/* @__PURE__ */ n("div", { className: "tw:flex tw:flex-col tw:gap-4", children: o })
|
|
53
|
+
] }), _s = () => {
|
|
54
|
+
const { nodeProps: e, setNodeResponsiveProps: o, setNodeProps: r } = Vo(), { getResponsiveProp: t, currentScreen: a } = k(), s = (S, P = a) => {
|
|
55
|
+
r({
|
|
56
|
+
sx: I(S, P)
|
|
57
|
+
});
|
|
58
|
+
}, i = {
|
|
59
|
+
paddingBottom: t(e.sx ?? {}, "paddingBottom"),
|
|
60
|
+
paddingLeft: t(e.sx ?? {}, "paddingLeft"),
|
|
61
|
+
paddingRight: t(e.sx ?? {}, "paddingRight"),
|
|
62
|
+
paddingTop: t(e.sx ?? {}, "paddingTop"),
|
|
63
|
+
marginBottom: t(e.sx ?? {}, "marginBottom"),
|
|
64
|
+
marginLeft: t(e.sx ?? {}, "marginLeft"),
|
|
65
|
+
marginRight: t(e.sx ?? {}, "marginRight"),
|
|
66
|
+
marginTop: t(e.sx ?? {}, "marginTop")
|
|
67
|
+
}, d = {
|
|
68
|
+
backgroundColor: t(e.sx ?? {}, "backgroundColor"),
|
|
69
|
+
backgroundImage: t(e.sx ?? {}, "backgroundImage"),
|
|
70
|
+
backgroundPosition: t(e.sx ?? {}, "backgroundPosition"),
|
|
71
|
+
backgroundRepeat: t(e.sx ?? {}, "backgroundRepeat"),
|
|
72
|
+
background: t(e.sx ?? {}, "background"),
|
|
73
|
+
backgroundSize: t(e.sx ?? {}, "backgroundSize"),
|
|
74
|
+
backgroundAttachment: t(e.sx ?? {}, "backgroundAttachment")
|
|
75
|
+
}, l = () => /* @__PURE__ */ n(V, { canvas: !0, is: Wt }), c = {
|
|
76
|
+
columnGap: t(e.sx ?? {}, "columnGap") ?? 0
|
|
77
|
+
}, h = {
|
|
78
|
+
rowGap: t(e.sx ?? {}, "rowGap") ?? 0
|
|
79
|
+
}, g = {
|
|
80
|
+
width: t(e.sx ?? {}, "width")
|
|
81
|
+
}, x = {
|
|
82
|
+
height: t(e.sx ?? {}, "height")
|
|
83
|
+
}, w = {
|
|
84
|
+
alignItems: t(e.sx ?? {}, "alignItems")
|
|
85
|
+
}, b = {
|
|
86
|
+
justifyItems: t(e.sx ?? {}, "justifyItems")
|
|
87
|
+
}, C = {
|
|
88
|
+
borderStyle: t(e.sx ?? {}, "borderStyle"),
|
|
89
|
+
borderColor: t(e.sx ?? {}, "borderColor"),
|
|
90
|
+
borderTopWidth: t(e.sx ?? {}, "borderTopWidth"),
|
|
91
|
+
borderRightWidth: t(e.sx ?? {}, "borderRightWidth"),
|
|
92
|
+
borderBottomWidth: t(e.sx ?? {}, "borderBottomWidth"),
|
|
93
|
+
borderLeftWidth: t(e.sx ?? {}, "borderLeftWidth")
|
|
94
|
+
}, p = {
|
|
95
|
+
borderTopLeftRadius: t(e.sx ?? {}, "borderTopLeftRadius"),
|
|
96
|
+
borderTopRightRadius: t(e.sx ?? {}, "borderTopRightRadius"),
|
|
97
|
+
borderBottomRightRadius: t(e.sx ?? {}, "borderBottomRightRadius"),
|
|
98
|
+
borderBottomLeftRadius: t(e.sx ?? {}, "borderBottomLeftRadius")
|
|
99
|
+
}, v = t(e, "cols");
|
|
100
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
101
|
+
/* @__PURE__ */ u(D, { children: [
|
|
102
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
103
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
104
|
+
] }),
|
|
105
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
106
|
+
/* @__PURE__ */ u(N, { children: [
|
|
107
|
+
/* @__PURE__ */ n(f, { name: "Cells", children: /* @__PURE__ */ n(ve, { getNewNodeElement: l }) }),
|
|
108
|
+
/* @__PURE__ */ u(f, { name: "Layout", children: [
|
|
109
|
+
/* @__PURE__ */ n(Be, { min: 1, name: "Columns", responsive: !0, value: v, onChange: (S) => {
|
|
110
|
+
o(
|
|
111
|
+
{
|
|
112
|
+
cols: S
|
|
113
|
+
},
|
|
114
|
+
a
|
|
115
|
+
);
|
|
116
|
+
} }),
|
|
117
|
+
/* @__PURE__ */ n(at, { value: c, onChange: s }),
|
|
118
|
+
/* @__PURE__ */ n(Ce, { value: h, onChange: s }),
|
|
119
|
+
/* @__PURE__ */ n(so, { value: w, onChange: s }),
|
|
120
|
+
/* @__PURE__ */ n(io, { value: b, onChange: s })
|
|
121
|
+
] }),
|
|
122
|
+
/* @__PURE__ */ u(f, { name: "Size", children: [
|
|
123
|
+
/* @__PURE__ */ n(
|
|
124
|
+
H,
|
|
125
|
+
{
|
|
126
|
+
menu: {
|
|
127
|
+
autoOption: { visible: !0 },
|
|
128
|
+
fitContentOption: { visible: !0 }
|
|
129
|
+
},
|
|
130
|
+
value: g ?? "auto",
|
|
131
|
+
onChange: s
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
/* @__PURE__ */ n(ce, { value: x, onChange: s })
|
|
135
|
+
] })
|
|
136
|
+
] }),
|
|
137
|
+
/* @__PURE__ */ u(N, { children: [
|
|
138
|
+
/* @__PURE__ */ n(f, { name: "Display on", children: /* @__PURE__ */ n(Y, {}) }),
|
|
139
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: i, onChange: s }) }),
|
|
140
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
141
|
+
/* @__PURE__ */ n($, { value: C, onChange: s }),
|
|
142
|
+
/* @__PURE__ */ n(z, { value: p, onChange: s })
|
|
143
|
+
] }),
|
|
144
|
+
/* @__PURE__ */ n(f, { name: "Background", children: /* @__PURE__ */ n(Z, { value: d, onChange: s }) })
|
|
145
|
+
] })
|
|
146
|
+
] })
|
|
147
|
+
] });
|
|
148
|
+
}, nn = () => E({
|
|
149
|
+
transform: bo
|
|
150
|
+
}), Uo = () => {
|
|
151
|
+
const { currentScreen: e, getResponsiveProp: o } = k(), { nodeProps: r, setNodeResponsiveProps: t } = nn(), a = o(r, "colSpan") ?? Tt;
|
|
152
|
+
return /* @__PURE__ */ n(L, { responsive: !0, name: "Col span", children: /* @__PURE__ */ n("div", { className: "tw:w-1/2", children: /* @__PURE__ */ n(
|
|
153
|
+
be,
|
|
154
|
+
{
|
|
155
|
+
step: 1,
|
|
156
|
+
onChange: (i) => {
|
|
157
|
+
const d = isNaN(i.target.valueAsNumber) ? void 0 : i.target.valueAsNumber;
|
|
158
|
+
t(
|
|
159
|
+
{
|
|
160
|
+
colSpan: d ?? a
|
|
161
|
+
},
|
|
162
|
+
e
|
|
163
|
+
);
|
|
164
|
+
},
|
|
165
|
+
value: a,
|
|
166
|
+
className: "tw:text-center",
|
|
167
|
+
mode: "onBlur",
|
|
168
|
+
size: "32",
|
|
169
|
+
min: Tt,
|
|
170
|
+
max: wo
|
|
171
|
+
}
|
|
172
|
+
) }) });
|
|
173
|
+
}, Hs = () => {
|
|
174
|
+
const { nodeProps: e, setNodeProps: o } = nn(), { currentScreen: r, getResponsiveProp: t } = k(), a = (g, x = r) => {
|
|
175
|
+
o({ sx: I(g, x) });
|
|
176
|
+
}, s = {
|
|
177
|
+
backgroundColor: t(e.sx ?? {}, "backgroundColor"),
|
|
178
|
+
backgroundImage: t(e.sx ?? {}, "backgroundImage"),
|
|
179
|
+
backgroundPosition: t(e.sx ?? {}, "backgroundPosition"),
|
|
180
|
+
backgroundRepeat: t(e.sx ?? {}, "backgroundRepeat"),
|
|
181
|
+
background: t(e.sx ?? {}, "background"),
|
|
182
|
+
backgroundSize: t(e.sx ?? {}, "backgroundSize"),
|
|
183
|
+
backgroundAttachment: t(e.sx ?? {}, "backgroundAttachment")
|
|
184
|
+
}, i = {
|
|
185
|
+
paddingBottom: t(e.sx ?? {}, "paddingBottom"),
|
|
186
|
+
paddingLeft: t(e.sx ?? {}, "paddingLeft"),
|
|
187
|
+
paddingRight: t(e.sx ?? {}, "paddingRight"),
|
|
188
|
+
paddingTop: t(e.sx ?? {}, "paddingTop"),
|
|
189
|
+
marginBottom: t(e.sx ?? {}, "marginBottom"),
|
|
190
|
+
marginLeft: t(e.sx ?? {}, "marginLeft"),
|
|
191
|
+
marginRight: t(e.sx ?? {}, "marginRight"),
|
|
192
|
+
marginTop: t(e.sx ?? {}, "marginTop")
|
|
193
|
+
}, d = {
|
|
194
|
+
borderStyle: t(e.sx ?? {}, "borderStyle"),
|
|
195
|
+
borderColor: t(e.sx ?? {}, "borderColor"),
|
|
196
|
+
borderTopWidth: t(e.sx ?? {}, "borderTopWidth"),
|
|
197
|
+
borderRightWidth: t(e.sx ?? {}, "borderRightWidth"),
|
|
198
|
+
borderBottomWidth: t(e.sx ?? {}, "borderBottomWidth"),
|
|
199
|
+
borderLeftWidth: t(e.sx ?? {}, "borderLeftWidth")
|
|
200
|
+
}, l = {
|
|
201
|
+
borderTopLeftRadius: t(e.sx ?? {}, "borderTopLeftRadius"),
|
|
202
|
+
borderTopRightRadius: t(e.sx ?? {}, "borderTopRightRadius"),
|
|
203
|
+
borderBottomRightRadius: t(e.sx ?? {}, "borderBottomRightRadius"),
|
|
204
|
+
borderBottomLeftRadius: t(e.sx ?? {}, "borderBottomLeftRadius")
|
|
205
|
+
}, c = {
|
|
206
|
+
height: t(e.sx ?? {}, "height")
|
|
207
|
+
}, h = {
|
|
208
|
+
order: t(e.sx ?? {}, "order")
|
|
209
|
+
};
|
|
210
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
211
|
+
/* @__PURE__ */ u(D, { children: [
|
|
212
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
213
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
214
|
+
] }),
|
|
215
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
216
|
+
/* @__PURE__ */ u(N, { children: [
|
|
217
|
+
/* @__PURE__ */ u(f, { name: "Layout", children: [
|
|
218
|
+
/* @__PURE__ */ n(Uo, {}),
|
|
219
|
+
/* @__PURE__ */ n(Ut, { value: h, onChange: a })
|
|
220
|
+
] }),
|
|
221
|
+
/* @__PURE__ */ n(f, { name: "Size", children: /* @__PURE__ */ n(ce, { onChange: a, value: c }) })
|
|
222
|
+
] }),
|
|
223
|
+
/* @__PURE__ */ u(N, { children: [
|
|
224
|
+
/* @__PURE__ */ n(f, { name: "Display on", children: /* @__PURE__ */ n(Y, {}) }),
|
|
225
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: i, onChange: a }) }),
|
|
226
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
227
|
+
/* @__PURE__ */ n($, { value: d, onChange: a }),
|
|
228
|
+
/* @__PURE__ */ n(z, { value: l, onChange: a })
|
|
229
|
+
] }),
|
|
230
|
+
/* @__PURE__ */ n(f, { name: "Background", children: /* @__PURE__ */ n(Z, { value: s, onChange: a }) })
|
|
231
|
+
] })
|
|
232
|
+
] })
|
|
233
|
+
] });
|
|
234
|
+
}, ut = () => E({
|
|
235
|
+
transform: vo
|
|
236
|
+
}), Go = () => {
|
|
237
|
+
const { nodeProps: e, setNodeProps: o } = ut();
|
|
238
|
+
return /* @__PURE__ */ n(L, { name: "To", children: /* @__PURE__ */ n(
|
|
239
|
+
ie,
|
|
240
|
+
{
|
|
241
|
+
onChange: (t) => {
|
|
242
|
+
t.target.value = t.target.value.trim(), o({
|
|
243
|
+
to: t.target.value ? t.target.value : void 0
|
|
244
|
+
});
|
|
245
|
+
},
|
|
246
|
+
value: xe(e.to) ? e.to : e.to?.pathname ?? "",
|
|
247
|
+
classes: { container: "tw:w-1/2" }
|
|
248
|
+
}
|
|
249
|
+
) });
|
|
250
|
+
}, qo = () => {
|
|
251
|
+
const { nodeProps: e, setNodeProps: o } = ut();
|
|
252
|
+
return /* @__PURE__ */ n(L, { name: "Rel", children: /* @__PURE__ */ n(
|
|
253
|
+
ie,
|
|
254
|
+
{
|
|
255
|
+
classes: {
|
|
256
|
+
container: "tw:w-1/2"
|
|
257
|
+
},
|
|
258
|
+
onChange: (t) => {
|
|
259
|
+
t.target.value = t.target.value.trim(), o({
|
|
260
|
+
rel: t.target.value ? t.target.value : void 0
|
|
261
|
+
});
|
|
262
|
+
},
|
|
263
|
+
value: e.rel ?? "",
|
|
264
|
+
placeholder: "nofollow, noreferrer, noopener, ugc"
|
|
265
|
+
}
|
|
266
|
+
) });
|
|
267
|
+
}, Vs = () => {
|
|
268
|
+
const { nodeProps: e, setNodeResponsiveProps: o, setNodeProps: r } = ut(), { currentScreen: t, getResponsiveProp: a } = k(), s = (v, R = t) => {
|
|
269
|
+
r({ sx: I(v, R) });
|
|
270
|
+
}, i = {
|
|
271
|
+
paddingBottom: a(e.sx ?? {}, "paddingBottom"),
|
|
272
|
+
paddingLeft: a(e.sx ?? {}, "paddingLeft"),
|
|
273
|
+
paddingRight: a(e.sx ?? {}, "paddingRight"),
|
|
274
|
+
paddingTop: a(e.sx ?? {}, "paddingTop"),
|
|
275
|
+
marginBottom: a(e.sx ?? {}, "marginBottom"),
|
|
276
|
+
marginLeft: a(e.sx ?? {}, "marginLeft"),
|
|
277
|
+
marginRight: a(e.sx ?? {}, "marginRight"),
|
|
278
|
+
marginTop: a(e.sx ?? {}, "marginTop")
|
|
279
|
+
}, d = {
|
|
280
|
+
borderStyle: a(e.sx ?? {}, "borderStyle"),
|
|
281
|
+
borderColor: a(e.sx ?? {}, "borderColor"),
|
|
282
|
+
borderTopWidth: a(e.sx ?? {}, "borderTopWidth"),
|
|
283
|
+
borderRightWidth: a(e.sx ?? {}, "borderRightWidth"),
|
|
284
|
+
borderBottomWidth: a(e.sx ?? {}, "borderBottomWidth"),
|
|
285
|
+
borderLeftWidth: a(e.sx ?? {}, "borderLeftWidth")
|
|
286
|
+
}, l = {
|
|
287
|
+
borderTopLeftRadius: a(e.sx ?? {}, "borderTopLeftRadius"),
|
|
288
|
+
borderTopRightRadius: a(e.sx ?? {}, "borderTopRightRadius"),
|
|
289
|
+
borderBottomRightRadius: a(e.sx ?? {}, "borderBottomRightRadius"),
|
|
290
|
+
borderBottomLeftRadius: a(e.sx ?? {}, "borderBottomLeftRadius")
|
|
291
|
+
}, c = (v) => {
|
|
292
|
+
o(
|
|
293
|
+
{
|
|
294
|
+
textVariant: v
|
|
295
|
+
},
|
|
296
|
+
t
|
|
297
|
+
);
|
|
298
|
+
}, h = {
|
|
299
|
+
color: a(e.sx ?? {}, "color", "xs")
|
|
300
|
+
}, g = (v) => {
|
|
301
|
+
s(v, "xs");
|
|
302
|
+
}, x = {
|
|
303
|
+
fontStyle: a(e.sx ?? {}, "fontStyle", "xs"),
|
|
304
|
+
textDecorationLine: a(e.sx ?? {}, "textDecorationLine", "xs"),
|
|
305
|
+
fontWeight: a(e.sx ?? {}, "fontWeight", "xs")
|
|
306
|
+
}, w = (v) => {
|
|
307
|
+
s(
|
|
308
|
+
{
|
|
309
|
+
fontStyle: v.fontStyle,
|
|
310
|
+
textDecorationLine: v.textDecorationLine,
|
|
311
|
+
fontWeight: v.fontWeight
|
|
312
|
+
},
|
|
313
|
+
"xs"
|
|
314
|
+
);
|
|
315
|
+
}, b = a(e.sx ?? {}, "textAlign") ?? "left", C = (v) => {
|
|
316
|
+
s({
|
|
317
|
+
textAlign: v
|
|
318
|
+
});
|
|
319
|
+
}, p = (v) => {
|
|
320
|
+
r({
|
|
321
|
+
target: v
|
|
322
|
+
});
|
|
323
|
+
};
|
|
324
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
325
|
+
/* @__PURE__ */ u(D, { children: [
|
|
326
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
327
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
328
|
+
] }),
|
|
329
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
330
|
+
/* @__PURE__ */ u(N, { children: [
|
|
331
|
+
/* @__PURE__ */ u(f, { name: "Insert link", children: [
|
|
332
|
+
/* @__PURE__ */ n(Go, {}),
|
|
333
|
+
/* @__PURE__ */ n(Gt, { value: e.target, onChange: p })
|
|
334
|
+
] }),
|
|
335
|
+
/* @__PURE__ */ u(f, { name: "Text", children: [
|
|
336
|
+
/* @__PURE__ */ n(
|
|
337
|
+
Me,
|
|
338
|
+
{
|
|
339
|
+
onChange: c,
|
|
340
|
+
value: a(e, "textVariant")
|
|
341
|
+
}
|
|
342
|
+
),
|
|
343
|
+
/* @__PURE__ */ n(ge, { value: h, onChange: g }),
|
|
344
|
+
/* @__PURE__ */ n(ze, { value: x, onChange: w }),
|
|
345
|
+
/* @__PURE__ */ n(qt, { value: b, onChange: C }),
|
|
346
|
+
/* @__PURE__ */ n(
|
|
347
|
+
st,
|
|
348
|
+
{
|
|
349
|
+
value: {
|
|
350
|
+
textTransform: a(e.sx ?? {}, "textTransform", "xs") ?? "none"
|
|
351
|
+
},
|
|
352
|
+
onChange: (v) => s(v, "xs")
|
|
353
|
+
}
|
|
354
|
+
),
|
|
355
|
+
/* @__PURE__ */ n(
|
|
356
|
+
$e,
|
|
357
|
+
{
|
|
358
|
+
value: {
|
|
359
|
+
fontWeight: a(e.sx ?? {}, "fontWeight")
|
|
360
|
+
},
|
|
361
|
+
onChange: s
|
|
362
|
+
}
|
|
363
|
+
)
|
|
364
|
+
] }),
|
|
365
|
+
/* @__PURE__ */ n(f, { name: "SEO", children: /* @__PURE__ */ n(qo, {}) })
|
|
366
|
+
] }),
|
|
367
|
+
/* @__PURE__ */ u(N, { children: [
|
|
368
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: i, onChange: s }) }),
|
|
369
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
370
|
+
/* @__PURE__ */ n($, { value: d, onChange: s }),
|
|
371
|
+
/* @__PURE__ */ n(z, { value: l, onChange: s })
|
|
372
|
+
] })
|
|
373
|
+
] })
|
|
374
|
+
] })
|
|
375
|
+
] });
|
|
376
|
+
}, Ve = () => E({
|
|
377
|
+
transform: Co
|
|
378
|
+
});
|
|
379
|
+
function F(e, o) {
|
|
380
|
+
if (e === !1 || e === null || typeof e > "u")
|
|
381
|
+
throw new Error(o);
|
|
382
|
+
}
|
|
383
|
+
function te(e, o) {
|
|
384
|
+
if (!e) {
|
|
385
|
+
typeof console < "u" && console.warn(o);
|
|
386
|
+
try {
|
|
387
|
+
throw new Error(o);
|
|
388
|
+
} catch {
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
function We({
|
|
393
|
+
pathname: e = "/",
|
|
394
|
+
search: o = "",
|
|
395
|
+
hash: r = ""
|
|
396
|
+
}) {
|
|
397
|
+
return o && o !== "?" && (e += o.charAt(0) === "?" ? o : "?" + o), r && r !== "#" && (e += r.charAt(0) === "#" ? r : "#" + r), e;
|
|
398
|
+
}
|
|
399
|
+
function ht(e) {
|
|
400
|
+
let o = {};
|
|
401
|
+
if (e) {
|
|
402
|
+
let r = e.indexOf("#");
|
|
403
|
+
r >= 0 && (o.hash = e.substring(r), e = e.substring(0, r));
|
|
404
|
+
let t = e.indexOf("?");
|
|
405
|
+
t >= 0 && (o.search = e.substring(t), e = e.substring(0, t)), e && (o.pathname = e);
|
|
406
|
+
}
|
|
407
|
+
return o;
|
|
408
|
+
}
|
|
409
|
+
function on(e, o, r = "/") {
|
|
410
|
+
return Jo(e, o, r, !1);
|
|
411
|
+
}
|
|
412
|
+
function Jo(e, o, r, t) {
|
|
413
|
+
let a = typeof o == "string" ? ht(o) : o, s = de(a.pathname || "/", r);
|
|
414
|
+
if (s == null)
|
|
415
|
+
return null;
|
|
416
|
+
let i = rn(e);
|
|
417
|
+
Ko(i);
|
|
418
|
+
let d = null;
|
|
419
|
+
for (let l = 0; d == null && l < i.length; ++l) {
|
|
420
|
+
let c = sr(s);
|
|
421
|
+
d = rr(
|
|
422
|
+
i[l],
|
|
423
|
+
c,
|
|
424
|
+
t
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
return d;
|
|
428
|
+
}
|
|
429
|
+
function rn(e, o = [], r = [], t = "", a = !1) {
|
|
430
|
+
let s = (i, d, l = a, c) => {
|
|
431
|
+
let h = {
|
|
432
|
+
relativePath: c === void 0 ? i.path || "" : c,
|
|
433
|
+
caseSensitive: i.caseSensitive === !0,
|
|
434
|
+
childrenIndex: d,
|
|
435
|
+
route: i
|
|
436
|
+
};
|
|
437
|
+
if (h.relativePath.startsWith("/")) {
|
|
438
|
+
if (!h.relativePath.startsWith(t) && l)
|
|
439
|
+
return;
|
|
440
|
+
F(
|
|
441
|
+
h.relativePath.startsWith(t),
|
|
442
|
+
`Absolute route path "${h.relativePath}" nested under path "${t}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
|
|
443
|
+
), h.relativePath = h.relativePath.slice(t.length);
|
|
444
|
+
}
|
|
445
|
+
let g = J([t, h.relativePath]), x = r.concat(h);
|
|
446
|
+
i.children && i.children.length > 0 && (F(
|
|
447
|
+
// Our types know better, but runtime JS may not!
|
|
448
|
+
// @ts-expect-error
|
|
449
|
+
i.index !== !0,
|
|
450
|
+
`Index routes must not have child routes. Please remove all child routes from route path "${g}".`
|
|
451
|
+
), rn(
|
|
452
|
+
i.children,
|
|
453
|
+
o,
|
|
454
|
+
x,
|
|
455
|
+
g,
|
|
456
|
+
l
|
|
457
|
+
)), !(i.path == null && !i.index) && o.push({
|
|
458
|
+
path: g,
|
|
459
|
+
score: nr(g, i.index),
|
|
460
|
+
routesMeta: x
|
|
461
|
+
});
|
|
462
|
+
};
|
|
463
|
+
return e.forEach((i, d) => {
|
|
464
|
+
if (i.path === "" || !i.path?.includes("?"))
|
|
465
|
+
s(i, d);
|
|
466
|
+
else
|
|
467
|
+
for (let l of an(i.path))
|
|
468
|
+
s(i, d, !0, l);
|
|
469
|
+
}), o;
|
|
470
|
+
}
|
|
471
|
+
function an(e) {
|
|
472
|
+
let o = e.split("/");
|
|
473
|
+
if (o.length === 0) return [];
|
|
474
|
+
let [r, ...t] = o, a = r.endsWith("?"), s = r.replace(/\?$/, "");
|
|
475
|
+
if (t.length === 0)
|
|
476
|
+
return a ? [s, ""] : [s];
|
|
477
|
+
let i = an(t.join("/")), d = [];
|
|
478
|
+
return d.push(
|
|
479
|
+
...i.map(
|
|
480
|
+
(l) => l === "" ? s : [s, l].join("/")
|
|
481
|
+
)
|
|
482
|
+
), a && d.push(...i), d.map(
|
|
483
|
+
(l) => e.startsWith("/") && l === "" ? "/" : l
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
function Ko(e) {
|
|
487
|
+
e.sort(
|
|
488
|
+
(o, r) => o.score !== r.score ? r.score - o.score : or(
|
|
489
|
+
o.routesMeta.map((t) => t.childrenIndex),
|
|
490
|
+
r.routesMeta.map((t) => t.childrenIndex)
|
|
491
|
+
)
|
|
492
|
+
);
|
|
493
|
+
}
|
|
494
|
+
var Yo = /^:[\w-]+$/, Zo = 3, Xo = 2, Qo = 1, er = 10, tr = -2, Lt = (e) => e === "*";
|
|
495
|
+
function nr(e, o) {
|
|
496
|
+
let r = e.split("/"), t = r.length;
|
|
497
|
+
return r.some(Lt) && (t += tr), o && (t += Xo), r.filter((a) => !Lt(a)).reduce(
|
|
498
|
+
(a, s) => a + (Yo.test(s) ? Zo : s === "" ? Qo : er),
|
|
499
|
+
t
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
function or(e, o) {
|
|
503
|
+
return e.length === o.length && e.slice(0, -1).every((t, a) => t === o[a]) ? (
|
|
504
|
+
// If two routes are siblings, we should try to match the earlier sibling
|
|
505
|
+
// first. This allows people to have fine-grained control over the matching
|
|
506
|
+
// behavior by simply putting routes with identical paths in the order they
|
|
507
|
+
// want them tried.
|
|
508
|
+
e[e.length - 1] - o[o.length - 1]
|
|
509
|
+
) : (
|
|
510
|
+
// Otherwise, it doesn't really make sense to rank non-siblings by index,
|
|
511
|
+
// so they sort equally.
|
|
512
|
+
0
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
function rr(e, o, r = !1) {
|
|
516
|
+
let { routesMeta: t } = e, a = {}, s = "/", i = [];
|
|
517
|
+
for (let d = 0; d < t.length; ++d) {
|
|
518
|
+
let l = t[d], c = d === t.length - 1, h = s === "/" ? o : o.slice(s.length) || "/", g = Ee(
|
|
519
|
+
{ path: l.relativePath, caseSensitive: l.caseSensitive, end: c },
|
|
520
|
+
h
|
|
521
|
+
), x = l.route;
|
|
522
|
+
if (!g && c && r && !t[t.length - 1].route.index && (g = Ee(
|
|
523
|
+
{
|
|
524
|
+
path: l.relativePath,
|
|
525
|
+
caseSensitive: l.caseSensitive,
|
|
526
|
+
end: !1
|
|
527
|
+
},
|
|
528
|
+
h
|
|
529
|
+
)), !g)
|
|
530
|
+
return null;
|
|
531
|
+
Object.assign(a, g.params), i.push({
|
|
532
|
+
// TODO: Can this as be avoided?
|
|
533
|
+
params: a,
|
|
534
|
+
pathname: J([s, g.pathname]),
|
|
535
|
+
pathnameBase: cr(
|
|
536
|
+
J([s, g.pathnameBase])
|
|
537
|
+
),
|
|
538
|
+
route: x
|
|
539
|
+
}), g.pathnameBase !== "/" && (s = J([s, g.pathnameBase]));
|
|
540
|
+
}
|
|
541
|
+
return i;
|
|
542
|
+
}
|
|
543
|
+
function Ee(e, o) {
|
|
544
|
+
typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
|
|
545
|
+
let [r, t] = ar(
|
|
546
|
+
e.path,
|
|
547
|
+
e.caseSensitive,
|
|
548
|
+
e.end
|
|
549
|
+
), a = o.match(r);
|
|
550
|
+
if (!a) return null;
|
|
551
|
+
let s = a[0], i = s.replace(/(.)\/+$/, "$1"), d = a.slice(1);
|
|
552
|
+
return {
|
|
553
|
+
params: t.reduce(
|
|
554
|
+
(c, { paramName: h, isOptional: g }, x) => {
|
|
555
|
+
if (h === "*") {
|
|
556
|
+
let b = d[x] || "";
|
|
557
|
+
i = s.slice(0, s.length - b.length).replace(/(.)\/+$/, "$1");
|
|
558
|
+
}
|
|
559
|
+
const w = d[x];
|
|
560
|
+
return g && !w ? c[h] = void 0 : c[h] = (w || "").replace(/%2F/g, "/"), c;
|
|
561
|
+
},
|
|
562
|
+
{}
|
|
563
|
+
),
|
|
564
|
+
pathname: s,
|
|
565
|
+
pathnameBase: i,
|
|
566
|
+
pattern: e
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
function ar(e, o = !1, r = !0) {
|
|
570
|
+
te(
|
|
571
|
+
e === "*" || !e.endsWith("*") || e.endsWith("/*"),
|
|
572
|
+
`Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`
|
|
573
|
+
);
|
|
574
|
+
let t = [], a = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
|
|
575
|
+
/\/:([\w-]+)(\?)?/g,
|
|
576
|
+
(i, d, l, c, h) => {
|
|
577
|
+
if (t.push({ paramName: d, isOptional: l != null }), l) {
|
|
578
|
+
let g = h.charAt(c + i.length);
|
|
579
|
+
return g && g !== "/" ? "/([^\\/]*)" : "(?:/([^\\/]*))?";
|
|
580
|
+
}
|
|
581
|
+
return "/([^\\/]+)";
|
|
582
|
+
}
|
|
583
|
+
).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
|
|
584
|
+
return e.endsWith("*") ? (t.push({ paramName: "*" }), a += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? a += "\\/*$" : e !== "" && e !== "/" && (a += "(?:(?=\\/|$))"), [new RegExp(a, o ? void 0 : "i"), t];
|
|
585
|
+
}
|
|
586
|
+
function sr(e) {
|
|
587
|
+
try {
|
|
588
|
+
return e.split("/").map((o) => decodeURIComponent(o).replace(/\//g, "%2F")).join("/");
|
|
589
|
+
} catch (o) {
|
|
590
|
+
return te(
|
|
591
|
+
!1,
|
|
592
|
+
`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${o}).`
|
|
593
|
+
), e;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
function de(e, o) {
|
|
597
|
+
if (o === "/") return e;
|
|
598
|
+
if (!e.toLowerCase().startsWith(o.toLowerCase()))
|
|
599
|
+
return null;
|
|
600
|
+
let r = o.endsWith("/") ? o.length - 1 : o.length, t = e.charAt(r);
|
|
601
|
+
return t && t !== "/" ? null : e.slice(r) || "/";
|
|
602
|
+
}
|
|
603
|
+
var ir = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
604
|
+
function dr(e, o = "/") {
|
|
605
|
+
let {
|
|
606
|
+
pathname: r,
|
|
607
|
+
search: t = "",
|
|
608
|
+
hash: a = ""
|
|
609
|
+
} = typeof e == "string" ? ht(e) : e, s;
|
|
610
|
+
return r ? (r = r.replace(/\/\/+/g, "/"), r.startsWith("/") ? s = Pt(r.substring(1), "/") : s = Pt(r, o)) : s = o, {
|
|
611
|
+
pathname: s,
|
|
612
|
+
search: ur(t),
|
|
613
|
+
hash: hr(a)
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
function Pt(e, o) {
|
|
617
|
+
let r = o.replace(/\/+$/, "").split("/");
|
|
618
|
+
return e.split("/").forEach((a) => {
|
|
619
|
+
a === ".." ? r.length > 1 && r.pop() : a !== "." && r.push(a);
|
|
620
|
+
}), r.length > 1 ? r.join("/") : "/";
|
|
621
|
+
}
|
|
622
|
+
function Ze(e, o, r, t) {
|
|
623
|
+
return `Cannot include a '${e}' character in a manually specified \`to.${o}\` field [${JSON.stringify(
|
|
624
|
+
t
|
|
625
|
+
)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
|
|
626
|
+
}
|
|
627
|
+
function lr(e) {
|
|
628
|
+
return e.filter(
|
|
629
|
+
(o, r) => r === 0 || o.route.path && o.route.path.length > 0
|
|
630
|
+
);
|
|
631
|
+
}
|
|
632
|
+
function sn(e) {
|
|
633
|
+
let o = lr(e);
|
|
634
|
+
return o.map(
|
|
635
|
+
(r, t) => t === o.length - 1 ? r.pathname : r.pathnameBase
|
|
636
|
+
);
|
|
637
|
+
}
|
|
638
|
+
function gt(e, o, r, t = !1) {
|
|
639
|
+
let a;
|
|
640
|
+
typeof e == "string" ? a = ht(e) : (a = { ...e }, F(
|
|
641
|
+
!a.pathname || !a.pathname.includes("?"),
|
|
642
|
+
Ze("?", "pathname", "search", a)
|
|
643
|
+
), F(
|
|
644
|
+
!a.pathname || !a.pathname.includes("#"),
|
|
645
|
+
Ze("#", "pathname", "hash", a)
|
|
646
|
+
), F(
|
|
647
|
+
!a.search || !a.search.includes("#"),
|
|
648
|
+
Ze("#", "search", "hash", a)
|
|
649
|
+
));
|
|
650
|
+
let s = e === "" || a.pathname === "", i = s ? "/" : a.pathname, d;
|
|
651
|
+
if (i == null)
|
|
652
|
+
d = r;
|
|
653
|
+
else {
|
|
654
|
+
let g = o.length - 1;
|
|
655
|
+
if (!t && i.startsWith("..")) {
|
|
656
|
+
let x = i.split("/");
|
|
657
|
+
for (; x[0] === ".."; )
|
|
658
|
+
x.shift(), g -= 1;
|
|
659
|
+
a.pathname = x.join("/");
|
|
660
|
+
}
|
|
661
|
+
d = g >= 0 ? o[g] : "/";
|
|
662
|
+
}
|
|
663
|
+
let l = dr(a, d), c = i && i !== "/" && i.endsWith("/"), h = (s || i === ".") && r.endsWith("/");
|
|
664
|
+
return !l.pathname.endsWith("/") && (c || h) && (l.pathname += "/"), l;
|
|
665
|
+
}
|
|
666
|
+
var J = (e) => e.join("/").replace(/\/\/+/g, "/"), cr = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), ur = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, hr = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e, gr = class {
|
|
667
|
+
constructor(e, o, r, t = !1) {
|
|
668
|
+
this.status = e, this.statusText = o || "", this.internal = t, r instanceof Error ? (this.data = r.toString(), this.error = r) : this.data = r;
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
function pr(e) {
|
|
672
|
+
return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
|
|
673
|
+
}
|
|
674
|
+
function mr(e) {
|
|
675
|
+
return e.map((o) => o.route.path).filter(Boolean).join("/").replace(/\/\/*/g, "/") || "/";
|
|
676
|
+
}
|
|
677
|
+
var dn = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
678
|
+
function ln(e, o) {
|
|
679
|
+
let r = e;
|
|
680
|
+
if (typeof r != "string" || !ir.test(r))
|
|
681
|
+
return {
|
|
682
|
+
absoluteURL: void 0,
|
|
683
|
+
isExternal: !1,
|
|
684
|
+
to: r
|
|
685
|
+
};
|
|
686
|
+
let t = r, a = !1;
|
|
687
|
+
if (dn)
|
|
688
|
+
try {
|
|
689
|
+
let s = new URL(window.location.href), i = r.startsWith("//") ? new URL(s.protocol + r) : new URL(r), d = de(i.pathname, o);
|
|
690
|
+
i.origin === s.origin && d != null ? r = d + i.search + i.hash : a = !0;
|
|
691
|
+
} catch {
|
|
692
|
+
te(
|
|
693
|
+
!1,
|
|
694
|
+
`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
695
|
+
);
|
|
696
|
+
}
|
|
697
|
+
return {
|
|
698
|
+
absoluteURL: t,
|
|
699
|
+
isExternal: a,
|
|
700
|
+
to: r
|
|
701
|
+
};
|
|
702
|
+
}
|
|
703
|
+
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
704
|
+
var cn = [
|
|
705
|
+
"POST",
|
|
706
|
+
"PUT",
|
|
707
|
+
"PATCH",
|
|
708
|
+
"DELETE"
|
|
709
|
+
];
|
|
710
|
+
new Set(
|
|
711
|
+
cn
|
|
712
|
+
);
|
|
713
|
+
var fr = [
|
|
714
|
+
"GET",
|
|
715
|
+
...cn
|
|
716
|
+
];
|
|
717
|
+
new Set(fr);
|
|
718
|
+
var pe = m.createContext(null);
|
|
719
|
+
pe.displayName = "DataRouter";
|
|
720
|
+
var je = m.createContext(null);
|
|
721
|
+
je.displayName = "DataRouterState";
|
|
722
|
+
var un = m.createContext(!1);
|
|
723
|
+
function xr() {
|
|
724
|
+
return m.useContext(un);
|
|
725
|
+
}
|
|
726
|
+
var hn = m.createContext({
|
|
727
|
+
isTransitioning: !1
|
|
728
|
+
});
|
|
729
|
+
hn.displayName = "ViewTransition";
|
|
730
|
+
var br = m.createContext(
|
|
731
|
+
/* @__PURE__ */ new Map()
|
|
732
|
+
);
|
|
733
|
+
br.displayName = "Fetchers";
|
|
734
|
+
var wr = m.createContext(null);
|
|
735
|
+
wr.displayName = "Await";
|
|
736
|
+
var q = m.createContext(
|
|
737
|
+
null
|
|
738
|
+
);
|
|
739
|
+
q.displayName = "Navigation";
|
|
740
|
+
var pt = m.createContext(
|
|
741
|
+
null
|
|
742
|
+
);
|
|
743
|
+
pt.displayName = "Location";
|
|
744
|
+
var oe = m.createContext({
|
|
745
|
+
outlet: null,
|
|
746
|
+
matches: [],
|
|
747
|
+
isDataRoute: !1
|
|
748
|
+
});
|
|
749
|
+
oe.displayName = "Route";
|
|
750
|
+
var mt = m.createContext(null);
|
|
751
|
+
mt.displayName = "RouteError";
|
|
752
|
+
var gn = "REACT_ROUTER_ERROR", vr = "REDIRECT", Cr = "ROUTE_ERROR_RESPONSE";
|
|
753
|
+
function Rr(e) {
|
|
754
|
+
if (e.startsWith(`${gn}:${vr}:{`))
|
|
755
|
+
try {
|
|
756
|
+
let o = JSON.parse(e.slice(28));
|
|
757
|
+
if (typeof o == "object" && o && typeof o.status == "number" && typeof o.statusText == "string" && typeof o.location == "string" && typeof o.reloadDocument == "boolean" && typeof o.replace == "boolean")
|
|
758
|
+
return o;
|
|
759
|
+
} catch {
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
function Sr(e) {
|
|
763
|
+
if (e.startsWith(
|
|
764
|
+
`${gn}:${Cr}:{`
|
|
765
|
+
))
|
|
766
|
+
try {
|
|
767
|
+
let o = JSON.parse(e.slice(40));
|
|
768
|
+
if (typeof o == "object" && o && typeof o.status == "number" && typeof o.statusText == "string")
|
|
769
|
+
return new gr(
|
|
770
|
+
o.status,
|
|
771
|
+
o.statusText,
|
|
772
|
+
o.data
|
|
773
|
+
);
|
|
774
|
+
} catch {
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
function yr(e, { relative: o } = {}) {
|
|
778
|
+
F(
|
|
779
|
+
Ue(),
|
|
780
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
781
|
+
// router loaded. We can help them understand how to avoid that.
|
|
782
|
+
"useHref() may be used only in the context of a <Router> component."
|
|
783
|
+
);
|
|
784
|
+
let { basename: r, navigator: t } = m.useContext(q), { hash: a, pathname: s, search: i } = Re(e, { relative: o }), d = s;
|
|
785
|
+
return r !== "/" && (d = s === "/" ? r : J([r, s])), t.createHref({ pathname: d, search: i, hash: a });
|
|
786
|
+
}
|
|
787
|
+
function Ue() {
|
|
788
|
+
return m.useContext(pt) != null;
|
|
789
|
+
}
|
|
790
|
+
function re() {
|
|
791
|
+
return F(
|
|
792
|
+
Ue(),
|
|
793
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
794
|
+
// router loaded. We can help them understand how to avoid that.
|
|
795
|
+
"useLocation() may be used only in the context of a <Router> component."
|
|
796
|
+
), m.useContext(pt).location;
|
|
797
|
+
}
|
|
798
|
+
var pn = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
799
|
+
function mn(e) {
|
|
800
|
+
m.useContext(q).static || m.useLayoutEffect(e);
|
|
801
|
+
}
|
|
802
|
+
function Tr() {
|
|
803
|
+
let { isDataRoute: e } = m.useContext(oe);
|
|
804
|
+
return e ? Mr() : Nr();
|
|
805
|
+
}
|
|
806
|
+
function Nr() {
|
|
807
|
+
F(
|
|
808
|
+
Ue(),
|
|
809
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
810
|
+
// router loaded. We can help them understand how to avoid that.
|
|
811
|
+
"useNavigate() may be used only in the context of a <Router> component."
|
|
812
|
+
);
|
|
813
|
+
let e = m.useContext(pe), { basename: o, navigator: r } = m.useContext(q), { matches: t } = m.useContext(oe), { pathname: a } = re(), s = JSON.stringify(sn(t)), i = m.useRef(!1);
|
|
814
|
+
return mn(() => {
|
|
815
|
+
i.current = !0;
|
|
816
|
+
}), m.useCallback(
|
|
817
|
+
(l, c = {}) => {
|
|
818
|
+
if (te(i.current, pn), !i.current) return;
|
|
819
|
+
if (typeof l == "number") {
|
|
820
|
+
r.go(l);
|
|
821
|
+
return;
|
|
822
|
+
}
|
|
823
|
+
let h = gt(
|
|
824
|
+
l,
|
|
825
|
+
JSON.parse(s),
|
|
826
|
+
a,
|
|
827
|
+
c.relative === "path"
|
|
828
|
+
);
|
|
829
|
+
e == null && o !== "/" && (h.pathname = h.pathname === "/" ? o : J([o, h.pathname])), (c.replace ? r.replace : r.push)(
|
|
830
|
+
h,
|
|
831
|
+
c.state,
|
|
832
|
+
c
|
|
833
|
+
);
|
|
834
|
+
},
|
|
835
|
+
[
|
|
836
|
+
o,
|
|
837
|
+
r,
|
|
838
|
+
s,
|
|
839
|
+
a,
|
|
840
|
+
e
|
|
841
|
+
]
|
|
842
|
+
);
|
|
843
|
+
}
|
|
844
|
+
m.createContext(null);
|
|
845
|
+
function Re(e, { relative: o } = {}) {
|
|
846
|
+
let { matches: r } = m.useContext(oe), { pathname: t } = re(), a = JSON.stringify(sn(r));
|
|
847
|
+
return m.useMemo(
|
|
848
|
+
() => gt(
|
|
849
|
+
e,
|
|
850
|
+
JSON.parse(a),
|
|
851
|
+
t,
|
|
852
|
+
o === "path"
|
|
853
|
+
),
|
|
854
|
+
[e, a, t, o]
|
|
855
|
+
);
|
|
856
|
+
}
|
|
857
|
+
function Lr(e, o, r) {
|
|
858
|
+
F(
|
|
859
|
+
Ue(),
|
|
860
|
+
// TODO: This error is probably because they somehow have 2 versions of the
|
|
861
|
+
// router loaded. We can help them understand how to avoid that.
|
|
862
|
+
"useRoutes() may be used only in the context of a <Router> component."
|
|
863
|
+
);
|
|
864
|
+
let { navigator: t } = m.useContext(q), { matches: a } = m.useContext(oe), s = a[a.length - 1], i = s ? s.params : {}, d = s ? s.pathname : "/", l = s ? s.pathnameBase : "/", c = s && s.route;
|
|
865
|
+
{
|
|
866
|
+
let p = c && c.path || "";
|
|
867
|
+
xn(
|
|
868
|
+
d,
|
|
869
|
+
!c || p.endsWith("*") || p.endsWith("*?"),
|
|
870
|
+
`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${p}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
871
|
+
|
|
872
|
+
Please change the parent <Route path="${p}"> to <Route path="${p === "/" ? "*" : `${p}/*`}">.`
|
|
873
|
+
);
|
|
874
|
+
}
|
|
875
|
+
let h = re(), g;
|
|
876
|
+
g = h;
|
|
877
|
+
let x = g.pathname || "/", w = x;
|
|
878
|
+
if (l !== "/") {
|
|
879
|
+
let p = l.replace(/^\//, "").split("/");
|
|
880
|
+
w = "/" + x.replace(/^\//, "").split("/").slice(p.length).join("/");
|
|
881
|
+
}
|
|
882
|
+
let b = on(e, { pathname: w });
|
|
883
|
+
return te(
|
|
884
|
+
c || b != null,
|
|
885
|
+
`No routes matched location "${g.pathname}${g.search}${g.hash}" `
|
|
886
|
+
), te(
|
|
887
|
+
b == null || b[b.length - 1].route.element !== void 0 || b[b.length - 1].route.Component !== void 0 || b[b.length - 1].route.lazy !== void 0,
|
|
888
|
+
`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
|
|
889
|
+
), Wr(
|
|
890
|
+
b && b.map(
|
|
891
|
+
(p) => Object.assign({}, p, {
|
|
892
|
+
params: Object.assign({}, i, p.params),
|
|
893
|
+
pathname: J([
|
|
894
|
+
l,
|
|
895
|
+
// Re-encode pathnames that were decoded inside matchRoutes.
|
|
896
|
+
// Pre-encode `%`, `?` and `#` ahead of `encodeLocation` because it uses
|
|
897
|
+
// `new URL()` internally and we need to prevent it from treating
|
|
898
|
+
// them as separators
|
|
899
|
+
t.encodeLocation ? t.encodeLocation(
|
|
900
|
+
p.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")
|
|
901
|
+
).pathname : p.pathname
|
|
902
|
+
]),
|
|
903
|
+
pathnameBase: p.pathnameBase === "/" ? l : J([
|
|
904
|
+
l,
|
|
905
|
+
// Re-encode pathnames that were decoded inside matchRoutes
|
|
906
|
+
// Pre-encode `%`, `?` and `#` ahead of `encodeLocation` because it uses
|
|
907
|
+
// `new URL()` internally and we need to prevent it from treating
|
|
908
|
+
// them as separators
|
|
909
|
+
t.encodeLocation ? t.encodeLocation(
|
|
910
|
+
p.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")
|
|
911
|
+
).pathname : p.pathnameBase
|
|
912
|
+
])
|
|
913
|
+
})
|
|
914
|
+
),
|
|
915
|
+
a,
|
|
916
|
+
r
|
|
917
|
+
);
|
|
918
|
+
}
|
|
919
|
+
function Pr() {
|
|
920
|
+
let e = Fr(), o = pr(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, t = "rgba(200,200,200, 0.5)", a = { padding: "0.5rem", backgroundColor: t }, s = { padding: "2px 4px", backgroundColor: t }, i = null;
|
|
921
|
+
return console.error(
|
|
922
|
+
"Error handled by React Router default ErrorBoundary:",
|
|
923
|
+
e
|
|
924
|
+
), i = /* @__PURE__ */ m.createElement(m.Fragment, null, /* @__PURE__ */ m.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ m.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ m.createElement("code", { style: s }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ m.createElement("code", { style: s }, "errorElement"), " prop on your route.")), /* @__PURE__ */ m.createElement(m.Fragment, null, /* @__PURE__ */ m.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ m.createElement("h3", { style: { fontStyle: "italic" } }, o), r ? /* @__PURE__ */ m.createElement("pre", { style: a }, r) : null, i);
|
|
925
|
+
}
|
|
926
|
+
var kr = /* @__PURE__ */ m.createElement(Pr, null), fn = class extends m.Component {
|
|
927
|
+
constructor(e) {
|
|
928
|
+
super(e), this.state = {
|
|
929
|
+
location: e.location,
|
|
930
|
+
revalidation: e.revalidation,
|
|
931
|
+
error: e.error
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
static getDerivedStateFromError(e) {
|
|
935
|
+
return { error: e };
|
|
936
|
+
}
|
|
937
|
+
static getDerivedStateFromProps(e, o) {
|
|
938
|
+
return o.location !== e.location || o.revalidation !== "idle" && e.revalidation === "idle" ? {
|
|
939
|
+
error: e.error,
|
|
940
|
+
location: e.location,
|
|
941
|
+
revalidation: e.revalidation
|
|
942
|
+
} : {
|
|
943
|
+
error: e.error !== void 0 ? e.error : o.error,
|
|
944
|
+
location: o.location,
|
|
945
|
+
revalidation: e.revalidation || o.revalidation
|
|
946
|
+
};
|
|
947
|
+
}
|
|
948
|
+
componentDidCatch(e, o) {
|
|
949
|
+
this.props.onError ? this.props.onError(e, o) : console.error(
|
|
950
|
+
"React Router caught the following error during render",
|
|
951
|
+
e
|
|
952
|
+
);
|
|
953
|
+
}
|
|
954
|
+
render() {
|
|
955
|
+
let e = this.state.error;
|
|
956
|
+
if (this.context && typeof e == "object" && e && "digest" in e && typeof e.digest == "string") {
|
|
957
|
+
const r = Sr(e.digest);
|
|
958
|
+
r && (e = r);
|
|
959
|
+
}
|
|
960
|
+
let o = e !== void 0 ? /* @__PURE__ */ m.createElement(oe.Provider, { value: this.props.routeContext }, /* @__PURE__ */ m.createElement(
|
|
961
|
+
mt.Provider,
|
|
962
|
+
{
|
|
963
|
+
value: e,
|
|
964
|
+
children: this.props.component
|
|
965
|
+
}
|
|
966
|
+
)) : this.props.children;
|
|
967
|
+
return this.context ? /* @__PURE__ */ m.createElement(Br, { error: e }, o) : o;
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
fn.contextType = un;
|
|
971
|
+
var Xe = /* @__PURE__ */ new WeakMap();
|
|
972
|
+
function Br({
|
|
973
|
+
children: e,
|
|
974
|
+
error: o
|
|
975
|
+
}) {
|
|
976
|
+
let { basename: r } = m.useContext(q);
|
|
977
|
+
if (typeof o == "object" && o && "digest" in o && typeof o.digest == "string") {
|
|
978
|
+
let t = Rr(o.digest);
|
|
979
|
+
if (t) {
|
|
980
|
+
let a = Xe.get(o);
|
|
981
|
+
if (a) throw a;
|
|
982
|
+
let s = ln(t.location, r);
|
|
983
|
+
if (dn && !Xe.get(o))
|
|
984
|
+
if (s.isExternal || t.reloadDocument)
|
|
985
|
+
window.location.href = s.absoluteURL || s.to;
|
|
986
|
+
else {
|
|
987
|
+
const i = Promise.resolve().then(
|
|
988
|
+
() => window.__reactRouterDataRouter.navigate(s.to, {
|
|
989
|
+
replace: t.replace
|
|
990
|
+
})
|
|
991
|
+
);
|
|
992
|
+
throw Xe.set(o, i), i;
|
|
993
|
+
}
|
|
994
|
+
return /* @__PURE__ */ m.createElement(
|
|
995
|
+
"meta",
|
|
996
|
+
{
|
|
997
|
+
httpEquiv: "refresh",
|
|
998
|
+
content: `0;url=${s.absoluteURL || s.to}`
|
|
999
|
+
}
|
|
1000
|
+
);
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
return e;
|
|
1004
|
+
}
|
|
1005
|
+
function Ir({ routeContext: e, match: o, children: r }) {
|
|
1006
|
+
let t = m.useContext(pe);
|
|
1007
|
+
return t && t.static && t.staticContext && (o.route.errorElement || o.route.ErrorBoundary) && (t.staticContext._deepestRenderedBoundaryId = o.route.id), /* @__PURE__ */ m.createElement(oe.Provider, { value: e }, r);
|
|
1008
|
+
}
|
|
1009
|
+
function Wr(e, o = [], r) {
|
|
1010
|
+
let t = r?.state;
|
|
1011
|
+
if (e == null) {
|
|
1012
|
+
if (!t)
|
|
1013
|
+
return null;
|
|
1014
|
+
if (t.errors)
|
|
1015
|
+
e = t.matches;
|
|
1016
|
+
else if (o.length === 0 && !t.initialized && t.matches.length > 0)
|
|
1017
|
+
e = t.matches;
|
|
1018
|
+
else
|
|
1019
|
+
return null;
|
|
1020
|
+
}
|
|
1021
|
+
let a = e, s = t?.errors;
|
|
1022
|
+
if (s != null) {
|
|
1023
|
+
let h = a.findIndex(
|
|
1024
|
+
(g) => g.route.id && s?.[g.route.id] !== void 0
|
|
1025
|
+
);
|
|
1026
|
+
F(
|
|
1027
|
+
h >= 0,
|
|
1028
|
+
`Could not find a matching route for errors on route IDs: ${Object.keys(
|
|
1029
|
+
s
|
|
1030
|
+
).join(",")}`
|
|
1031
|
+
), a = a.slice(
|
|
1032
|
+
0,
|
|
1033
|
+
Math.min(a.length, h + 1)
|
|
1034
|
+
);
|
|
1035
|
+
}
|
|
1036
|
+
let i = !1, d = -1;
|
|
1037
|
+
if (r && t) {
|
|
1038
|
+
i = t.renderFallback;
|
|
1039
|
+
for (let h = 0; h < a.length; h++) {
|
|
1040
|
+
let g = a[h];
|
|
1041
|
+
if ((g.route.HydrateFallback || g.route.hydrateFallbackElement) && (d = h), g.route.id) {
|
|
1042
|
+
let { loaderData: x, errors: w } = t, b = g.route.loader && !x.hasOwnProperty(g.route.id) && (!w || w[g.route.id] === void 0);
|
|
1043
|
+
if (g.route.lazy || b) {
|
|
1044
|
+
r.isStatic && (i = !0), d >= 0 ? a = a.slice(0, d + 1) : a = [a[0]];
|
|
1045
|
+
break;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
let l = r?.onError, c = t && l ? (h, g) => {
|
|
1051
|
+
l(h, {
|
|
1052
|
+
location: t.location,
|
|
1053
|
+
params: t.matches?.[0]?.params ?? {},
|
|
1054
|
+
unstable_pattern: mr(t.matches),
|
|
1055
|
+
errorInfo: g
|
|
1056
|
+
});
|
|
1057
|
+
} : void 0;
|
|
1058
|
+
return a.reduceRight(
|
|
1059
|
+
(h, g, x) => {
|
|
1060
|
+
let w, b = !1, C = null, p = null;
|
|
1061
|
+
t && (w = s && g.route.id ? s[g.route.id] : void 0, C = g.route.errorElement || kr, i && (d < 0 && x === 0 ? (xn(
|
|
1062
|
+
"route-fallback",
|
|
1063
|
+
!1,
|
|
1064
|
+
"No `HydrateFallback` element provided to render during initial hydration"
|
|
1065
|
+
), b = !0, p = null) : d === x && (b = !0, p = g.route.hydrateFallbackElement || null)));
|
|
1066
|
+
let v = o.concat(a.slice(0, x + 1)), R = () => {
|
|
1067
|
+
let S;
|
|
1068
|
+
return w ? S = C : b ? S = p : g.route.Component ? S = /* @__PURE__ */ m.createElement(g.route.Component, null) : g.route.element ? S = g.route.element : S = h, /* @__PURE__ */ m.createElement(
|
|
1069
|
+
Ir,
|
|
1070
|
+
{
|
|
1071
|
+
match: g,
|
|
1072
|
+
routeContext: {
|
|
1073
|
+
outlet: h,
|
|
1074
|
+
matches: v,
|
|
1075
|
+
isDataRoute: t != null
|
|
1076
|
+
},
|
|
1077
|
+
children: S
|
|
1078
|
+
}
|
|
1079
|
+
);
|
|
1080
|
+
};
|
|
1081
|
+
return t && (g.route.ErrorBoundary || g.route.errorElement || x === 0) ? /* @__PURE__ */ m.createElement(
|
|
1082
|
+
fn,
|
|
1083
|
+
{
|
|
1084
|
+
location: t.location,
|
|
1085
|
+
revalidation: t.revalidation,
|
|
1086
|
+
component: C,
|
|
1087
|
+
error: w,
|
|
1088
|
+
children: R(),
|
|
1089
|
+
routeContext: { outlet: null, matches: v, isDataRoute: !0 },
|
|
1090
|
+
onError: c
|
|
1091
|
+
}
|
|
1092
|
+
) : R();
|
|
1093
|
+
},
|
|
1094
|
+
null
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1097
|
+
function ft(e) {
|
|
1098
|
+
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1099
|
+
}
|
|
1100
|
+
function Er(e) {
|
|
1101
|
+
let o = m.useContext(pe);
|
|
1102
|
+
return F(o, ft(e)), o;
|
|
1103
|
+
}
|
|
1104
|
+
function Ar(e) {
|
|
1105
|
+
let o = m.useContext(je);
|
|
1106
|
+
return F(o, ft(e)), o;
|
|
1107
|
+
}
|
|
1108
|
+
function Dr(e) {
|
|
1109
|
+
let o = m.useContext(oe);
|
|
1110
|
+
return F(o, ft(e)), o;
|
|
1111
|
+
}
|
|
1112
|
+
function xt(e) {
|
|
1113
|
+
let o = Dr(e), r = o.matches[o.matches.length - 1];
|
|
1114
|
+
return F(
|
|
1115
|
+
r.route.id,
|
|
1116
|
+
`${e} can only be used on routes that contain a unique "id"`
|
|
1117
|
+
), r.route.id;
|
|
1118
|
+
}
|
|
1119
|
+
function Or() {
|
|
1120
|
+
return xt(
|
|
1121
|
+
"useRouteId"
|
|
1122
|
+
/* UseRouteId */
|
|
1123
|
+
);
|
|
1124
|
+
}
|
|
1125
|
+
function Fr() {
|
|
1126
|
+
let e = m.useContext(mt), o = Ar(
|
|
1127
|
+
"useRouteError"
|
|
1128
|
+
/* UseRouteError */
|
|
1129
|
+
), r = xt(
|
|
1130
|
+
"useRouteError"
|
|
1131
|
+
/* UseRouteError */
|
|
1132
|
+
);
|
|
1133
|
+
return e !== void 0 ? e : o.errors?.[r];
|
|
1134
|
+
}
|
|
1135
|
+
function Mr() {
|
|
1136
|
+
let { router: e } = Er(
|
|
1137
|
+
"useNavigate"
|
|
1138
|
+
/* UseNavigateStable */
|
|
1139
|
+
), o = xt(
|
|
1140
|
+
"useNavigate"
|
|
1141
|
+
/* UseNavigateStable */
|
|
1142
|
+
), r = m.useRef(!1);
|
|
1143
|
+
return mn(() => {
|
|
1144
|
+
r.current = !0;
|
|
1145
|
+
}), m.useCallback(
|
|
1146
|
+
async (a, s = {}) => {
|
|
1147
|
+
te(r.current, pn), r.current && (typeof a == "number" ? await e.navigate(a) : await e.navigate(a, { fromRouteId: o, ...s }));
|
|
1148
|
+
},
|
|
1149
|
+
[e, o]
|
|
1150
|
+
);
|
|
1151
|
+
}
|
|
1152
|
+
var kt = {};
|
|
1153
|
+
function xn(e, o, r) {
|
|
1154
|
+
!o && !kt[e] && (kt[e] = !0, te(!1, r));
|
|
1155
|
+
}
|
|
1156
|
+
m.memo(zr);
|
|
1157
|
+
function zr({
|
|
1158
|
+
routes: e,
|
|
1159
|
+
future: o,
|
|
1160
|
+
state: r,
|
|
1161
|
+
isStatic: t,
|
|
1162
|
+
onError: a
|
|
1163
|
+
}) {
|
|
1164
|
+
return Lr(e, void 0, { state: r, isStatic: t, onError: a });
|
|
1165
|
+
}
|
|
1166
|
+
var Le = "get", Pe = "application/x-www-form-urlencoded";
|
|
1167
|
+
function Ge(e) {
|
|
1168
|
+
return typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
1169
|
+
}
|
|
1170
|
+
function $r(e) {
|
|
1171
|
+
return Ge(e) && e.tagName.toLowerCase() === "button";
|
|
1172
|
+
}
|
|
1173
|
+
function _r(e) {
|
|
1174
|
+
return Ge(e) && e.tagName.toLowerCase() === "form";
|
|
1175
|
+
}
|
|
1176
|
+
function Hr(e) {
|
|
1177
|
+
return Ge(e) && e.tagName.toLowerCase() === "input";
|
|
1178
|
+
}
|
|
1179
|
+
function Vr(e) {
|
|
1180
|
+
return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
|
|
1181
|
+
}
|
|
1182
|
+
function jr(e, o) {
|
|
1183
|
+
return e.button === 0 && // Ignore everything but left clicks
|
|
1184
|
+
(!o || o === "_self") && // Let browser handle "target=_blank" etc.
|
|
1185
|
+
!Vr(e);
|
|
1186
|
+
}
|
|
1187
|
+
var Ne = null;
|
|
1188
|
+
function Ur() {
|
|
1189
|
+
if (Ne === null)
|
|
1190
|
+
try {
|
|
1191
|
+
new FormData(
|
|
1192
|
+
document.createElement("form"),
|
|
1193
|
+
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
1194
|
+
0
|
|
1195
|
+
), Ne = !1;
|
|
1196
|
+
} catch {
|
|
1197
|
+
Ne = !0;
|
|
1198
|
+
}
|
|
1199
|
+
return Ne;
|
|
1200
|
+
}
|
|
1201
|
+
var Gr = /* @__PURE__ */ new Set([
|
|
1202
|
+
"application/x-www-form-urlencoded",
|
|
1203
|
+
"multipart/form-data",
|
|
1204
|
+
"text/plain"
|
|
1205
|
+
]);
|
|
1206
|
+
function Qe(e) {
|
|
1207
|
+
return e != null && !Gr.has(e) ? (te(
|
|
1208
|
+
!1,
|
|
1209
|
+
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Pe}"`
|
|
1210
|
+
), null) : e;
|
|
1211
|
+
}
|
|
1212
|
+
function qr(e, o) {
|
|
1213
|
+
let r, t, a, s, i;
|
|
1214
|
+
if (_r(e)) {
|
|
1215
|
+
let d = e.getAttribute("action");
|
|
1216
|
+
t = d ? de(d, o) : null, r = e.getAttribute("method") || Le, a = Qe(e.getAttribute("enctype")) || Pe, s = new FormData(e);
|
|
1217
|
+
} else if ($r(e) || Hr(e) && (e.type === "submit" || e.type === "image")) {
|
|
1218
|
+
let d = e.form;
|
|
1219
|
+
if (d == null)
|
|
1220
|
+
throw new Error(
|
|
1221
|
+
'Cannot submit a <button> or <input type="submit"> without a <form>'
|
|
1222
|
+
);
|
|
1223
|
+
let l = e.getAttribute("formaction") || d.getAttribute("action");
|
|
1224
|
+
if (t = l ? de(l, o) : null, r = e.getAttribute("formmethod") || d.getAttribute("method") || Le, a = Qe(e.getAttribute("formenctype")) || Qe(d.getAttribute("enctype")) || Pe, s = new FormData(d, e), !Ur()) {
|
|
1225
|
+
let { name: c, type: h, value: g } = e;
|
|
1226
|
+
if (h === "image") {
|
|
1227
|
+
let x = c ? `${c}.` : "";
|
|
1228
|
+
s.append(`${x}x`, "0"), s.append(`${x}y`, "0");
|
|
1229
|
+
} else c && s.append(c, g);
|
|
1230
|
+
}
|
|
1231
|
+
} else {
|
|
1232
|
+
if (Ge(e))
|
|
1233
|
+
throw new Error(
|
|
1234
|
+
'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
|
|
1235
|
+
);
|
|
1236
|
+
r = Le, t = null, a = Pe, i = e;
|
|
1237
|
+
}
|
|
1238
|
+
return s && a === "text/plain" && (i = s, s = void 0), { action: t, method: r.toLowerCase(), encType: a, formData: s, body: i };
|
|
1239
|
+
}
|
|
1240
|
+
Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
|
|
1241
|
+
function bt(e, o) {
|
|
1242
|
+
if (e === !1 || e === null || typeof e > "u")
|
|
1243
|
+
throw new Error(o);
|
|
1244
|
+
}
|
|
1245
|
+
function bn(e, o, r, t) {
|
|
1246
|
+
let a = typeof e == "string" ? new URL(
|
|
1247
|
+
e,
|
|
1248
|
+
// This can be called during the SSR flow via PrefetchPageLinksImpl so
|
|
1249
|
+
// don't assume window is available
|
|
1250
|
+
typeof window > "u" ? "server://singlefetch/" : window.location.origin
|
|
1251
|
+
) : e;
|
|
1252
|
+
return r ? a.pathname.endsWith("/") ? a.pathname = `${a.pathname}_.${t}` : a.pathname = `${a.pathname}.${t}` : a.pathname === "/" ? a.pathname = `_root.${t}` : o && de(a.pathname, o) === "/" ? a.pathname = `${o.replace(/\/$/, "")}/_root.${t}` : a.pathname = `${a.pathname.replace(/\/$/, "")}.${t}`, a;
|
|
1253
|
+
}
|
|
1254
|
+
async function Jr(e, o) {
|
|
1255
|
+
if (e.id in o)
|
|
1256
|
+
return o[e.id];
|
|
1257
|
+
try {
|
|
1258
|
+
let r = await import(
|
|
1259
|
+
/* @vite-ignore */
|
|
1260
|
+
/* webpackIgnore: true */
|
|
1261
|
+
e.module
|
|
1262
|
+
);
|
|
1263
|
+
return o[e.id] = r, r;
|
|
1264
|
+
} catch (r) {
|
|
1265
|
+
return console.error(
|
|
1266
|
+
`Error loading route module \`${e.module}\`, reloading page...`
|
|
1267
|
+
), console.error(r), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
function Kr(e) {
|
|
1272
|
+
return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
|
|
1273
|
+
}
|
|
1274
|
+
async function Yr(e, o, r) {
|
|
1275
|
+
let t = await Promise.all(
|
|
1276
|
+
e.map(async (a) => {
|
|
1277
|
+
let s = o.routes[a.route.id];
|
|
1278
|
+
if (s) {
|
|
1279
|
+
let i = await Jr(s, r);
|
|
1280
|
+
return i.links ? i.links() : [];
|
|
1281
|
+
}
|
|
1282
|
+
return [];
|
|
1283
|
+
})
|
|
1284
|
+
);
|
|
1285
|
+
return ea(
|
|
1286
|
+
t.flat(1).filter(Kr).filter((a) => a.rel === "stylesheet" || a.rel === "preload").map(
|
|
1287
|
+
(a) => a.rel === "stylesheet" ? { ...a, rel: "prefetch", as: "style" } : { ...a, rel: "prefetch" }
|
|
1288
|
+
)
|
|
1289
|
+
);
|
|
1290
|
+
}
|
|
1291
|
+
function Bt(e, o, r, t, a, s) {
|
|
1292
|
+
let i = (l, c) => r[c] ? l.route.id !== r[c].route.id : !0, d = (l, c) => (
|
|
1293
|
+
// param change, /users/123 -> /users/456
|
|
1294
|
+
r[c].pathname !== l.pathname || // splat param changed, which is not present in match.path
|
|
1295
|
+
// e.g. /files/images/avatar.jpg -> files/finances.xls
|
|
1296
|
+
r[c].route.path?.endsWith("*") && r[c].params["*"] !== l.params["*"]
|
|
1297
|
+
);
|
|
1298
|
+
return s === "assets" ? o.filter(
|
|
1299
|
+
(l, c) => i(l, c) || d(l, c)
|
|
1300
|
+
) : s === "data" ? o.filter((l, c) => {
|
|
1301
|
+
let h = t.routes[l.route.id];
|
|
1302
|
+
if (!h || !h.hasLoader)
|
|
1303
|
+
return !1;
|
|
1304
|
+
if (i(l, c) || d(l, c))
|
|
1305
|
+
return !0;
|
|
1306
|
+
if (l.route.shouldRevalidate) {
|
|
1307
|
+
let g = l.route.shouldRevalidate({
|
|
1308
|
+
currentUrl: new URL(
|
|
1309
|
+
a.pathname + a.search + a.hash,
|
|
1310
|
+
window.origin
|
|
1311
|
+
),
|
|
1312
|
+
currentParams: r[0]?.params || {},
|
|
1313
|
+
nextUrl: new URL(e, window.origin),
|
|
1314
|
+
nextParams: l.params,
|
|
1315
|
+
defaultShouldRevalidate: !0
|
|
1316
|
+
});
|
|
1317
|
+
if (typeof g == "boolean")
|
|
1318
|
+
return g;
|
|
1319
|
+
}
|
|
1320
|
+
return !0;
|
|
1321
|
+
}) : [];
|
|
1322
|
+
}
|
|
1323
|
+
function Zr(e, o, { includeHydrateFallback: r } = {}) {
|
|
1324
|
+
return Xr(
|
|
1325
|
+
e.map((t) => {
|
|
1326
|
+
let a = o.routes[t.route.id];
|
|
1327
|
+
if (!a) return [];
|
|
1328
|
+
let s = [a.module];
|
|
1329
|
+
return a.clientActionModule && (s = s.concat(a.clientActionModule)), a.clientLoaderModule && (s = s.concat(a.clientLoaderModule)), r && a.hydrateFallbackModule && (s = s.concat(a.hydrateFallbackModule)), a.imports && (s = s.concat(a.imports)), s;
|
|
1330
|
+
}).flat(1)
|
|
1331
|
+
);
|
|
1332
|
+
}
|
|
1333
|
+
function Xr(e) {
|
|
1334
|
+
return [...new Set(e)];
|
|
1335
|
+
}
|
|
1336
|
+
function Qr(e) {
|
|
1337
|
+
let o = {}, r = Object.keys(e).sort();
|
|
1338
|
+
for (let t of r)
|
|
1339
|
+
o[t] = e[t];
|
|
1340
|
+
return o;
|
|
1341
|
+
}
|
|
1342
|
+
function ea(e, o) {
|
|
1343
|
+
let r = /* @__PURE__ */ new Set();
|
|
1344
|
+
return new Set(o), e.reduce((t, a) => {
|
|
1345
|
+
let s = JSON.stringify(Qr(a));
|
|
1346
|
+
return r.has(s) || (r.add(s), t.push({ key: s, link: a })), t;
|
|
1347
|
+
}, []);
|
|
1348
|
+
}
|
|
1349
|
+
function wt() {
|
|
1350
|
+
let e = m.useContext(pe);
|
|
1351
|
+
return bt(
|
|
1352
|
+
e,
|
|
1353
|
+
"You must render this element inside a <DataRouterContext.Provider> element"
|
|
1354
|
+
), e;
|
|
1355
|
+
}
|
|
1356
|
+
function ta() {
|
|
1357
|
+
let e = m.useContext(je);
|
|
1358
|
+
return bt(
|
|
1359
|
+
e,
|
|
1360
|
+
"You must render this element inside a <DataRouterStateContext.Provider> element"
|
|
1361
|
+
), e;
|
|
1362
|
+
}
|
|
1363
|
+
var vt = m.createContext(void 0);
|
|
1364
|
+
vt.displayName = "FrameworkContext";
|
|
1365
|
+
function Ct() {
|
|
1366
|
+
let e = m.useContext(vt);
|
|
1367
|
+
return bt(
|
|
1368
|
+
e,
|
|
1369
|
+
"You must render this element inside a <HydratedRouter> element"
|
|
1370
|
+
), e;
|
|
1371
|
+
}
|
|
1372
|
+
function na(e, o) {
|
|
1373
|
+
let r = m.useContext(vt), [t, a] = m.useState(!1), [s, i] = m.useState(!1), { onFocus: d, onBlur: l, onMouseEnter: c, onMouseLeave: h, onTouchStart: g } = o, x = m.useRef(null);
|
|
1374
|
+
m.useEffect(() => {
|
|
1375
|
+
if (e === "render" && i(!0), e === "viewport") {
|
|
1376
|
+
let C = (v) => {
|
|
1377
|
+
v.forEach((R) => {
|
|
1378
|
+
i(R.isIntersecting);
|
|
1379
|
+
});
|
|
1380
|
+
}, p = new IntersectionObserver(C, { threshold: 0.5 });
|
|
1381
|
+
return x.current && p.observe(x.current), () => {
|
|
1382
|
+
p.disconnect();
|
|
1383
|
+
};
|
|
1384
|
+
}
|
|
1385
|
+
}, [e]), m.useEffect(() => {
|
|
1386
|
+
if (t) {
|
|
1387
|
+
let C = setTimeout(() => {
|
|
1388
|
+
i(!0);
|
|
1389
|
+
}, 100);
|
|
1390
|
+
return () => {
|
|
1391
|
+
clearTimeout(C);
|
|
1392
|
+
};
|
|
1393
|
+
}
|
|
1394
|
+
}, [t]);
|
|
1395
|
+
let w = () => {
|
|
1396
|
+
a(!0);
|
|
1397
|
+
}, b = () => {
|
|
1398
|
+
a(!1), i(!1);
|
|
1399
|
+
};
|
|
1400
|
+
return r ? e !== "intent" ? [s, x, {}] : [
|
|
1401
|
+
s,
|
|
1402
|
+
x,
|
|
1403
|
+
{
|
|
1404
|
+
onFocus: fe(d, w),
|
|
1405
|
+
onBlur: fe(l, b),
|
|
1406
|
+
onMouseEnter: fe(c, w),
|
|
1407
|
+
onMouseLeave: fe(h, b),
|
|
1408
|
+
onTouchStart: fe(g, w)
|
|
1409
|
+
}
|
|
1410
|
+
] : [!1, x, {}];
|
|
1411
|
+
}
|
|
1412
|
+
function fe(e, o) {
|
|
1413
|
+
return (r) => {
|
|
1414
|
+
e && e(r), r.defaultPrevented || o(r);
|
|
1415
|
+
};
|
|
1416
|
+
}
|
|
1417
|
+
function oa({ page: e, ...o }) {
|
|
1418
|
+
let r = xr(), { router: t } = wt(), a = m.useMemo(
|
|
1419
|
+
() => on(t.routes, e, t.basename),
|
|
1420
|
+
[t.routes, e, t.basename]
|
|
1421
|
+
);
|
|
1422
|
+
return a ? r ? /* @__PURE__ */ m.createElement(aa, { page: e, matches: a, ...o }) : /* @__PURE__ */ m.createElement(sa, { page: e, matches: a, ...o }) : null;
|
|
1423
|
+
}
|
|
1424
|
+
function ra(e) {
|
|
1425
|
+
let { manifest: o, routeModules: r } = Ct(), [t, a] = m.useState([]);
|
|
1426
|
+
return m.useEffect(() => {
|
|
1427
|
+
let s = !1;
|
|
1428
|
+
return Yr(e, o, r).then(
|
|
1429
|
+
(i) => {
|
|
1430
|
+
s || a(i);
|
|
1431
|
+
}
|
|
1432
|
+
), () => {
|
|
1433
|
+
s = !0;
|
|
1434
|
+
};
|
|
1435
|
+
}, [e, o, r]), t;
|
|
1436
|
+
}
|
|
1437
|
+
function aa({
|
|
1438
|
+
page: e,
|
|
1439
|
+
matches: o,
|
|
1440
|
+
...r
|
|
1441
|
+
}) {
|
|
1442
|
+
let t = re(), { future: a } = Ct(), { basename: s } = wt(), i = m.useMemo(() => {
|
|
1443
|
+
if (e === t.pathname + t.search + t.hash)
|
|
1444
|
+
return [];
|
|
1445
|
+
let d = bn(
|
|
1446
|
+
e,
|
|
1447
|
+
s,
|
|
1448
|
+
a.unstable_trailingSlashAwareDataRequests,
|
|
1449
|
+
"rsc"
|
|
1450
|
+
), l = !1, c = [];
|
|
1451
|
+
for (let h of o)
|
|
1452
|
+
typeof h.route.shouldRevalidate == "function" ? l = !0 : c.push(h.route.id);
|
|
1453
|
+
return l && c.length > 0 && d.searchParams.set("_routes", c.join(",")), [d.pathname + d.search];
|
|
1454
|
+
}, [
|
|
1455
|
+
s,
|
|
1456
|
+
a.unstable_trailingSlashAwareDataRequests,
|
|
1457
|
+
e,
|
|
1458
|
+
t,
|
|
1459
|
+
o
|
|
1460
|
+
]);
|
|
1461
|
+
return /* @__PURE__ */ m.createElement(m.Fragment, null, i.map((d) => /* @__PURE__ */ m.createElement("link", { key: d, rel: "prefetch", as: "fetch", href: d, ...r })));
|
|
1462
|
+
}
|
|
1463
|
+
function sa({
|
|
1464
|
+
page: e,
|
|
1465
|
+
matches: o,
|
|
1466
|
+
...r
|
|
1467
|
+
}) {
|
|
1468
|
+
let t = re(), { future: a, manifest: s, routeModules: i } = Ct(), { basename: d } = wt(), { loaderData: l, matches: c } = ta(), h = m.useMemo(
|
|
1469
|
+
() => Bt(
|
|
1470
|
+
e,
|
|
1471
|
+
o,
|
|
1472
|
+
c,
|
|
1473
|
+
s,
|
|
1474
|
+
t,
|
|
1475
|
+
"data"
|
|
1476
|
+
),
|
|
1477
|
+
[e, o, c, s, t]
|
|
1478
|
+
), g = m.useMemo(
|
|
1479
|
+
() => Bt(
|
|
1480
|
+
e,
|
|
1481
|
+
o,
|
|
1482
|
+
c,
|
|
1483
|
+
s,
|
|
1484
|
+
t,
|
|
1485
|
+
"assets"
|
|
1486
|
+
),
|
|
1487
|
+
[e, o, c, s, t]
|
|
1488
|
+
), x = m.useMemo(() => {
|
|
1489
|
+
if (e === t.pathname + t.search + t.hash)
|
|
1490
|
+
return [];
|
|
1491
|
+
let C = /* @__PURE__ */ new Set(), p = !1;
|
|
1492
|
+
if (o.forEach((R) => {
|
|
1493
|
+
let S = s.routes[R.route.id];
|
|
1494
|
+
!S || !S.hasLoader || (!h.some((P) => P.route.id === R.route.id) && R.route.id in l && i[R.route.id]?.shouldRevalidate || S.hasClientLoader ? p = !0 : C.add(R.route.id));
|
|
1495
|
+
}), C.size === 0)
|
|
1496
|
+
return [];
|
|
1497
|
+
let v = bn(
|
|
1498
|
+
e,
|
|
1499
|
+
d,
|
|
1500
|
+
a.unstable_trailingSlashAwareDataRequests,
|
|
1501
|
+
"data"
|
|
1502
|
+
);
|
|
1503
|
+
return p && C.size > 0 && v.searchParams.set(
|
|
1504
|
+
"_routes",
|
|
1505
|
+
o.filter((R) => C.has(R.route.id)).map((R) => R.route.id).join(",")
|
|
1506
|
+
), [v.pathname + v.search];
|
|
1507
|
+
}, [
|
|
1508
|
+
d,
|
|
1509
|
+
a.unstable_trailingSlashAwareDataRequests,
|
|
1510
|
+
l,
|
|
1511
|
+
t,
|
|
1512
|
+
s,
|
|
1513
|
+
h,
|
|
1514
|
+
o,
|
|
1515
|
+
e,
|
|
1516
|
+
i
|
|
1517
|
+
]), w = m.useMemo(
|
|
1518
|
+
() => Zr(g, s),
|
|
1519
|
+
[g, s]
|
|
1520
|
+
), b = ra(g);
|
|
1521
|
+
return /* @__PURE__ */ m.createElement(m.Fragment, null, x.map((C) => /* @__PURE__ */ m.createElement("link", { key: C, rel: "prefetch", as: "fetch", href: C, ...r })), w.map((C) => /* @__PURE__ */ m.createElement("link", { key: C, rel: "modulepreload", href: C, ...r })), b.map(({ key: C, link: p }) => (
|
|
1522
|
+
// these don't spread `linkProps` because they are full link descriptors
|
|
1523
|
+
// already with their own props
|
|
1524
|
+
/* @__PURE__ */ m.createElement(
|
|
1525
|
+
"link",
|
|
1526
|
+
{
|
|
1527
|
+
key: C,
|
|
1528
|
+
nonce: r.nonce,
|
|
1529
|
+
...p,
|
|
1530
|
+
crossOrigin: p.crossOrigin ?? r.crossOrigin
|
|
1531
|
+
}
|
|
1532
|
+
)
|
|
1533
|
+
)));
|
|
1534
|
+
}
|
|
1535
|
+
function ia(...e) {
|
|
1536
|
+
return (o) => {
|
|
1537
|
+
e.forEach((r) => {
|
|
1538
|
+
typeof r == "function" ? r(o) : r != null && (r.current = o);
|
|
1539
|
+
});
|
|
1540
|
+
};
|
|
1541
|
+
}
|
|
1542
|
+
var da = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
|
|
1543
|
+
try {
|
|
1544
|
+
da && (window.__reactRouterVersion = // @ts-expect-error
|
|
1545
|
+
"7.14.0");
|
|
1546
|
+
} catch {
|
|
1547
|
+
}
|
|
1548
|
+
var wn = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, vn = m.forwardRef(
|
|
1549
|
+
function({
|
|
1550
|
+
onClick: o,
|
|
1551
|
+
discover: r = "render",
|
|
1552
|
+
prefetch: t = "none",
|
|
1553
|
+
relative: a,
|
|
1554
|
+
reloadDocument: s,
|
|
1555
|
+
replace: i,
|
|
1556
|
+
unstable_mask: d,
|
|
1557
|
+
state: l,
|
|
1558
|
+
target: c,
|
|
1559
|
+
to: h,
|
|
1560
|
+
preventScrollReset: g,
|
|
1561
|
+
viewTransition: x,
|
|
1562
|
+
unstable_defaultShouldRevalidate: w,
|
|
1563
|
+
...b
|
|
1564
|
+
}, C) {
|
|
1565
|
+
let { basename: p, navigator: v, unstable_useTransitions: R } = m.useContext(q), S = typeof h == "string" && wn.test(h), P = ln(h, p);
|
|
1566
|
+
h = P.to;
|
|
1567
|
+
let B = yr(h, { relative: a }), _ = re(), ae = null;
|
|
1568
|
+
if (d) {
|
|
1569
|
+
let se = gt(
|
|
1570
|
+
d,
|
|
1571
|
+
[],
|
|
1572
|
+
_.unstable_mask ? _.unstable_mask.pathname : "/",
|
|
1573
|
+
!0
|
|
1574
|
+
);
|
|
1575
|
+
p !== "/" && (se.pathname = se.pathname === "/" ? p : J([p, se.pathname])), ae = v.createHref(se);
|
|
1576
|
+
}
|
|
1577
|
+
let [ue, me, Ke] = na(
|
|
1578
|
+
t,
|
|
1579
|
+
b
|
|
1580
|
+
), Nn = ha(h, {
|
|
1581
|
+
replace: i,
|
|
1582
|
+
unstable_mask: d,
|
|
1583
|
+
state: l,
|
|
1584
|
+
target: c,
|
|
1585
|
+
preventScrollReset: g,
|
|
1586
|
+
relative: a,
|
|
1587
|
+
viewTransition: x,
|
|
1588
|
+
unstable_defaultShouldRevalidate: w,
|
|
1589
|
+
unstable_useTransitions: R
|
|
1590
|
+
});
|
|
1591
|
+
function Ln(se) {
|
|
1592
|
+
o && o(se), se.defaultPrevented || Nn(se);
|
|
1593
|
+
}
|
|
1594
|
+
let St = !(P.isExternal || s), yt = (
|
|
1595
|
+
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
1596
|
+
/* @__PURE__ */ m.createElement(
|
|
1597
|
+
"a",
|
|
1598
|
+
{
|
|
1599
|
+
...b,
|
|
1600
|
+
...Ke,
|
|
1601
|
+
href: (St ? ae : void 0) || P.absoluteURL || B,
|
|
1602
|
+
onClick: St ? Ln : o,
|
|
1603
|
+
ref: ia(C, me),
|
|
1604
|
+
target: c,
|
|
1605
|
+
"data-discover": !S && r === "render" ? "true" : void 0
|
|
1606
|
+
}
|
|
1607
|
+
)
|
|
1608
|
+
);
|
|
1609
|
+
return ue && !S ? /* @__PURE__ */ m.createElement(m.Fragment, null, yt, /* @__PURE__ */ m.createElement(oa, { page: B })) : yt;
|
|
1610
|
+
}
|
|
1611
|
+
);
|
|
1612
|
+
vn.displayName = "Link";
|
|
1613
|
+
var la = m.forwardRef(
|
|
1614
|
+
function({
|
|
1615
|
+
"aria-current": o = "page",
|
|
1616
|
+
caseSensitive: r = !1,
|
|
1617
|
+
className: t = "",
|
|
1618
|
+
end: a = !1,
|
|
1619
|
+
style: s,
|
|
1620
|
+
to: i,
|
|
1621
|
+
viewTransition: d,
|
|
1622
|
+
children: l,
|
|
1623
|
+
...c
|
|
1624
|
+
}, h) {
|
|
1625
|
+
let g = Re(i, { relative: c.relative }), x = re(), w = m.useContext(je), { navigator: b, basename: C } = m.useContext(q), p = w != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1626
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1627
|
+
xa(g) && d === !0, v = b.encodeLocation ? b.encodeLocation(g).pathname : g.pathname, R = x.pathname, S = w && w.navigation && w.navigation.location ? w.navigation.location.pathname : null;
|
|
1628
|
+
r || (R = R.toLowerCase(), S = S ? S.toLowerCase() : null, v = v.toLowerCase()), S && C && (S = de(S, C) || S);
|
|
1629
|
+
const P = v !== "/" && v.endsWith("/") ? v.length - 1 : v.length;
|
|
1630
|
+
let B = R === v || !a && R.startsWith(v) && R.charAt(P) === "/", _ = S != null && (S === v || !a && S.startsWith(v) && S.charAt(v.length) === "/"), ae = {
|
|
1631
|
+
isActive: B,
|
|
1632
|
+
isPending: _,
|
|
1633
|
+
isTransitioning: p
|
|
1634
|
+
}, ue = B ? o : void 0, me;
|
|
1635
|
+
typeof t == "function" ? me = t(ae) : me = [
|
|
1636
|
+
t,
|
|
1637
|
+
B ? "active" : null,
|
|
1638
|
+
_ ? "pending" : null,
|
|
1639
|
+
p ? "transitioning" : null
|
|
1640
|
+
].filter(Boolean).join(" ");
|
|
1641
|
+
let Ke = typeof s == "function" ? s(ae) : s;
|
|
1642
|
+
return /* @__PURE__ */ m.createElement(
|
|
1643
|
+
vn,
|
|
1644
|
+
{
|
|
1645
|
+
...c,
|
|
1646
|
+
"aria-current": ue,
|
|
1647
|
+
className: me,
|
|
1648
|
+
ref: h,
|
|
1649
|
+
style: Ke,
|
|
1650
|
+
to: i,
|
|
1651
|
+
viewTransition: d
|
|
1652
|
+
},
|
|
1653
|
+
typeof l == "function" ? l(ae) : l
|
|
1654
|
+
);
|
|
1655
|
+
}
|
|
1656
|
+
);
|
|
1657
|
+
la.displayName = "NavLink";
|
|
1658
|
+
var ca = m.forwardRef(
|
|
1659
|
+
({
|
|
1660
|
+
discover: e = "render",
|
|
1661
|
+
fetcherKey: o,
|
|
1662
|
+
navigate: r,
|
|
1663
|
+
reloadDocument: t,
|
|
1664
|
+
replace: a,
|
|
1665
|
+
state: s,
|
|
1666
|
+
method: i = Le,
|
|
1667
|
+
action: d,
|
|
1668
|
+
onSubmit: l,
|
|
1669
|
+
relative: c,
|
|
1670
|
+
preventScrollReset: h,
|
|
1671
|
+
viewTransition: g,
|
|
1672
|
+
unstable_defaultShouldRevalidate: x,
|
|
1673
|
+
...w
|
|
1674
|
+
}, b) => {
|
|
1675
|
+
let { unstable_useTransitions: C } = m.useContext(q), p = ma(), v = fa(d, { relative: c }), R = i.toLowerCase() === "get" ? "get" : "post", S = typeof d == "string" && wn.test(d), P = (B) => {
|
|
1676
|
+
if (l && l(B), B.defaultPrevented) return;
|
|
1677
|
+
B.preventDefault();
|
|
1678
|
+
let _ = B.nativeEvent.submitter, ae = _?.getAttribute("formmethod") || i, ue = () => p(_ || B.currentTarget, {
|
|
1679
|
+
fetcherKey: o,
|
|
1680
|
+
method: ae,
|
|
1681
|
+
navigate: r,
|
|
1682
|
+
replace: a,
|
|
1683
|
+
state: s,
|
|
1684
|
+
relative: c,
|
|
1685
|
+
preventScrollReset: h,
|
|
1686
|
+
viewTransition: g,
|
|
1687
|
+
unstable_defaultShouldRevalidate: x
|
|
1688
|
+
});
|
|
1689
|
+
C && r !== !1 ? m.startTransition(() => ue()) : ue();
|
|
1690
|
+
};
|
|
1691
|
+
return /* @__PURE__ */ m.createElement(
|
|
1692
|
+
"form",
|
|
1693
|
+
{
|
|
1694
|
+
ref: b,
|
|
1695
|
+
method: R,
|
|
1696
|
+
action: v,
|
|
1697
|
+
onSubmit: t ? l : P,
|
|
1698
|
+
...w,
|
|
1699
|
+
"data-discover": !S && e === "render" ? "true" : void 0
|
|
1700
|
+
}
|
|
1701
|
+
);
|
|
1702
|
+
}
|
|
1703
|
+
);
|
|
1704
|
+
ca.displayName = "Form";
|
|
1705
|
+
function ua(e) {
|
|
1706
|
+
return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
1707
|
+
}
|
|
1708
|
+
function Cn(e) {
|
|
1709
|
+
let o = m.useContext(pe);
|
|
1710
|
+
return F(o, ua(e)), o;
|
|
1711
|
+
}
|
|
1712
|
+
function ha(e, {
|
|
1713
|
+
target: o,
|
|
1714
|
+
replace: r,
|
|
1715
|
+
unstable_mask: t,
|
|
1716
|
+
state: a,
|
|
1717
|
+
preventScrollReset: s,
|
|
1718
|
+
relative: i,
|
|
1719
|
+
viewTransition: d,
|
|
1720
|
+
unstable_defaultShouldRevalidate: l,
|
|
1721
|
+
unstable_useTransitions: c
|
|
1722
|
+
} = {}) {
|
|
1723
|
+
let h = Tr(), g = re(), x = Re(e, { relative: i });
|
|
1724
|
+
return m.useCallback(
|
|
1725
|
+
(w) => {
|
|
1726
|
+
if (jr(w, o)) {
|
|
1727
|
+
w.preventDefault();
|
|
1728
|
+
let b = r !== void 0 ? r : We(g) === We(x), C = () => h(e, {
|
|
1729
|
+
replace: b,
|
|
1730
|
+
unstable_mask: t,
|
|
1731
|
+
state: a,
|
|
1732
|
+
preventScrollReset: s,
|
|
1733
|
+
relative: i,
|
|
1734
|
+
viewTransition: d,
|
|
1735
|
+
unstable_defaultShouldRevalidate: l
|
|
1736
|
+
});
|
|
1737
|
+
c ? m.startTransition(() => C()) : C();
|
|
1738
|
+
}
|
|
1739
|
+
},
|
|
1740
|
+
[
|
|
1741
|
+
g,
|
|
1742
|
+
h,
|
|
1743
|
+
x,
|
|
1744
|
+
r,
|
|
1745
|
+
t,
|
|
1746
|
+
a,
|
|
1747
|
+
o,
|
|
1748
|
+
e,
|
|
1749
|
+
s,
|
|
1750
|
+
i,
|
|
1751
|
+
d,
|
|
1752
|
+
l,
|
|
1753
|
+
c
|
|
1754
|
+
]
|
|
1755
|
+
);
|
|
1756
|
+
}
|
|
1757
|
+
var ga = 0, pa = () => `__${String(++ga)}__`;
|
|
1758
|
+
function ma() {
|
|
1759
|
+
let { router: e } = Cn(
|
|
1760
|
+
"useSubmit"
|
|
1761
|
+
/* UseSubmit */
|
|
1762
|
+
), { basename: o } = m.useContext(q), r = Or(), t = e.fetch, a = e.navigate;
|
|
1763
|
+
return m.useCallback(
|
|
1764
|
+
async (s, i = {}) => {
|
|
1765
|
+
let { action: d, method: l, encType: c, formData: h, body: g } = qr(
|
|
1766
|
+
s,
|
|
1767
|
+
o
|
|
1768
|
+
);
|
|
1769
|
+
if (i.navigate === !1) {
|
|
1770
|
+
let x = i.fetcherKey || pa();
|
|
1771
|
+
await t(x, r, i.action || d, {
|
|
1772
|
+
unstable_defaultShouldRevalidate: i.unstable_defaultShouldRevalidate,
|
|
1773
|
+
preventScrollReset: i.preventScrollReset,
|
|
1774
|
+
formData: h,
|
|
1775
|
+
body: g,
|
|
1776
|
+
formMethod: i.method || l,
|
|
1777
|
+
formEncType: i.encType || c,
|
|
1778
|
+
flushSync: i.flushSync
|
|
1779
|
+
});
|
|
1780
|
+
} else
|
|
1781
|
+
await a(i.action || d, {
|
|
1782
|
+
unstable_defaultShouldRevalidate: i.unstable_defaultShouldRevalidate,
|
|
1783
|
+
preventScrollReset: i.preventScrollReset,
|
|
1784
|
+
formData: h,
|
|
1785
|
+
body: g,
|
|
1786
|
+
formMethod: i.method || l,
|
|
1787
|
+
formEncType: i.encType || c,
|
|
1788
|
+
replace: i.replace,
|
|
1789
|
+
state: i.state,
|
|
1790
|
+
fromRouteId: r,
|
|
1791
|
+
flushSync: i.flushSync,
|
|
1792
|
+
viewTransition: i.viewTransition
|
|
1793
|
+
});
|
|
1794
|
+
},
|
|
1795
|
+
[t, a, o, r]
|
|
1796
|
+
);
|
|
1797
|
+
}
|
|
1798
|
+
function fa(e, { relative: o } = {}) {
|
|
1799
|
+
let { basename: r } = m.useContext(q), t = m.useContext(oe);
|
|
1800
|
+
F(t, "useFormAction must be used inside a RouteContext");
|
|
1801
|
+
let [a] = t.matches.slice(-1), s = { ...Re(e || ".", { relative: o }) }, i = re();
|
|
1802
|
+
if (e == null) {
|
|
1803
|
+
s.search = i.search;
|
|
1804
|
+
let d = new URLSearchParams(s.search), l = d.getAll("index");
|
|
1805
|
+
if (l.some((h) => h === "")) {
|
|
1806
|
+
d.delete("index"), l.filter((g) => g).forEach((g) => d.append("index", g));
|
|
1807
|
+
let h = d.toString();
|
|
1808
|
+
s.search = h ? `?${h}` : "";
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
return (!e || e === ".") && a.route.index && (s.search = s.search ? s.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (s.pathname = s.pathname === "/" ? r : J([r, s.pathname])), We(s);
|
|
1812
|
+
}
|
|
1813
|
+
function xa(e, { relative: o } = {}) {
|
|
1814
|
+
let r = m.useContext(hn);
|
|
1815
|
+
F(
|
|
1816
|
+
r != null,
|
|
1817
|
+
"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
|
|
1818
|
+
);
|
|
1819
|
+
let { basename: t } = Cn(
|
|
1820
|
+
"useViewTransitionState"
|
|
1821
|
+
/* useViewTransitionState */
|
|
1822
|
+
), a = Re(e, { relative: o });
|
|
1823
|
+
if (!r.isTransitioning)
|
|
1824
|
+
return !1;
|
|
1825
|
+
let s = de(r.currentLocation.pathname, t) || r.currentLocation.pathname, i = de(r.nextLocation.pathname, t) || r.nextLocation.pathname;
|
|
1826
|
+
return Ee(a.pathname, i) != null || Ee(a.pathname, s) != null;
|
|
1827
|
+
}
|
|
1828
|
+
const ba = ({ readonlyTo: e }) => {
|
|
1829
|
+
const { nodeProps: o, setNodeProps: r } = Ve(), t = e ?? o.anchor?.to, a = (() => {
|
|
1830
|
+
if (!ee(t))
|
|
1831
|
+
return xe(t) ? t : We(t);
|
|
1832
|
+
})();
|
|
1833
|
+
return /* @__PURE__ */ n(L, { name: "To", children: /* @__PURE__ */ n(
|
|
1834
|
+
ie,
|
|
1835
|
+
{
|
|
1836
|
+
readOnly: !!e,
|
|
1837
|
+
placeholder: "https://example.com",
|
|
1838
|
+
classes: {
|
|
1839
|
+
container: "tw:w-1/2"
|
|
1840
|
+
},
|
|
1841
|
+
mode: "onBlur",
|
|
1842
|
+
value: a ?? "",
|
|
1843
|
+
onChange: (i) => {
|
|
1844
|
+
if (i.target.value = i.target.value.trim(), !i.target.value) {
|
|
1845
|
+
r({
|
|
1846
|
+
anchor: void 0
|
|
1847
|
+
});
|
|
1848
|
+
return;
|
|
1849
|
+
}
|
|
1850
|
+
r({
|
|
1851
|
+
anchor: {
|
|
1852
|
+
to: i.target.value
|
|
1853
|
+
}
|
|
1854
|
+
});
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
) });
|
|
1858
|
+
}, wa = () => {
|
|
1859
|
+
const { nodeProps: e, setNodeResponsiveProps: o } = Ve(), { getResponsiveProp: r, currentScreen: t } = k(), a = [
|
|
1860
|
+
{
|
|
1861
|
+
label: "Small",
|
|
1862
|
+
value: "sm"
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
label: "Medium",
|
|
1866
|
+
value: "md"
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
label: "Large",
|
|
1870
|
+
value: "lg"
|
|
1871
|
+
}
|
|
1872
|
+
], s = (i) => {
|
|
1873
|
+
o(
|
|
1874
|
+
{
|
|
1875
|
+
size: i
|
|
1876
|
+
},
|
|
1877
|
+
t
|
|
1878
|
+
);
|
|
1879
|
+
};
|
|
1880
|
+
return /* @__PURE__ */ n(L, { name: "Size variant", children: /* @__PURE__ */ n(
|
|
1881
|
+
lt,
|
|
1882
|
+
{
|
|
1883
|
+
className: "tw:w-1/2",
|
|
1884
|
+
options: a,
|
|
1885
|
+
value: r(e, "size") ?? null,
|
|
1886
|
+
onChange: s
|
|
1887
|
+
}
|
|
1888
|
+
) });
|
|
1889
|
+
}, va = [
|
|
1890
|
+
{
|
|
1891
|
+
value: "contained",
|
|
1892
|
+
label: "Contained"
|
|
1893
|
+
},
|
|
1894
|
+
{
|
|
1895
|
+
value: "outlined",
|
|
1896
|
+
label: "Outlined"
|
|
1897
|
+
},
|
|
1898
|
+
{
|
|
1899
|
+
value: "text",
|
|
1900
|
+
label: "Text"
|
|
1901
|
+
}
|
|
1902
|
+
], Ca = () => {
|
|
1903
|
+
const { nodeProps: e, setNodeProps: o } = Ve(), r = (t) => {
|
|
1904
|
+
o({
|
|
1905
|
+
variant: t.currentTarget.value
|
|
1906
|
+
});
|
|
1907
|
+
};
|
|
1908
|
+
return /* @__PURE__ */ n(L, { name: "Variant", children: /* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:gap-2", children: va.map((t) => {
|
|
1909
|
+
const a = e?.variant === t.value;
|
|
1910
|
+
return /* @__PURE__ */ n(
|
|
1911
|
+
"button",
|
|
1912
|
+
{
|
|
1913
|
+
onClick: r,
|
|
1914
|
+
value: t.value,
|
|
1915
|
+
className: j("tw:p-1 tw:border tw:rounded tw:border-transparent tw:text-ic-white-3s tw:bg-ic-white-1s", {
|
|
1916
|
+
"tw:text-ic-white-6s tw:border-ic-white-4s": a
|
|
1917
|
+
}),
|
|
1918
|
+
children: /* @__PURE__ */ n(
|
|
1919
|
+
"div",
|
|
1920
|
+
{
|
|
1921
|
+
className: j(
|
|
1922
|
+
"tw:rounded tw:overflow-hidden tw:relative tw:flex tw:justify-center tw:items-center tw:px-3 tw:py-1",
|
|
1923
|
+
{
|
|
1924
|
+
"tw:border tw:border-ic-white-2s tw:bg-ic-white-1s": t.value === "outlined",
|
|
1925
|
+
"tw:bg-ic-black-7s": t.value === "contained"
|
|
1926
|
+
}
|
|
1927
|
+
),
|
|
1928
|
+
children: /* @__PURE__ */ n("span", { className: "tw:text-xs", children: "Aa" })
|
|
1929
|
+
}
|
|
1930
|
+
)
|
|
1931
|
+
},
|
|
1932
|
+
t.value
|
|
1933
|
+
);
|
|
1934
|
+
}) }) });
|
|
1935
|
+
}, js = ({ readonlyTo: e }) => {
|
|
1936
|
+
const { nodeProps: o, setNodeProps: r } = Ve(), { currentScreen: t, getResponsiveProp: a } = k(), s = (h, g = t) => {
|
|
1937
|
+
r({
|
|
1938
|
+
sx: I(h, g)
|
|
1939
|
+
});
|
|
1940
|
+
}, i = {
|
|
1941
|
+
width: a(o.sx ?? {}, "width")
|
|
1942
|
+
}, d = (h) => {
|
|
1943
|
+
r({
|
|
1944
|
+
color: h
|
|
1945
|
+
});
|
|
1946
|
+
}, l = (h) => {
|
|
1947
|
+
r({
|
|
1948
|
+
anchor: {
|
|
1949
|
+
target: h
|
|
1950
|
+
}
|
|
1951
|
+
});
|
|
1952
|
+
}, c = (h) => {
|
|
1953
|
+
r({
|
|
1954
|
+
dangerouslySetInnerHTML: {
|
|
1955
|
+
__html: h.target.value
|
|
1956
|
+
}
|
|
1957
|
+
});
|
|
1958
|
+
};
|
|
1959
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
1960
|
+
/* @__PURE__ */ u(D, { children: [
|
|
1961
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
1962
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
1963
|
+
] }),
|
|
1964
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
1965
|
+
/* @__PURE__ */ u(N, { children: [
|
|
1966
|
+
/* @__PURE__ */ n(f, { name: "Text", children: /* @__PURE__ */ n(L, { name: "Content", children: /* @__PURE__ */ n(
|
|
1967
|
+
ie,
|
|
1968
|
+
{
|
|
1969
|
+
classes: { container: "tw:w-1/2" },
|
|
1970
|
+
value: o.dangerouslySetInnerHTML?.__html.toString() ?? "",
|
|
1971
|
+
onChange: c
|
|
1972
|
+
}
|
|
1973
|
+
) }) }),
|
|
1974
|
+
/* @__PURE__ */ u(f, { name: "Color & Variant", children: [
|
|
1975
|
+
/* @__PURE__ */ n(lo, { value: o.color, onChange: d }),
|
|
1976
|
+
/* @__PURE__ */ n(Ca, {})
|
|
1977
|
+
] }),
|
|
1978
|
+
/* @__PURE__ */ u(f, { name: "Size", children: [
|
|
1979
|
+
/* @__PURE__ */ n(wa, {}),
|
|
1980
|
+
/* @__PURE__ */ n(H, { onChange: s, value: i })
|
|
1981
|
+
] }),
|
|
1982
|
+
/* @__PURE__ */ u(f, { name: "Link", children: [
|
|
1983
|
+
/* @__PURE__ */ n(ba, { readonlyTo: e }),
|
|
1984
|
+
/* @__PURE__ */ n(Gt, { value: o.anchor?.target, onChange: l })
|
|
1985
|
+
] })
|
|
1986
|
+
] }),
|
|
1987
|
+
/* @__PURE__ */ u(N, { children: [
|
|
1988
|
+
/* @__PURE__ */ n(f, { name: "Display on", children: /* @__PURE__ */ n(Y, {}) }),
|
|
1989
|
+
/* @__PURE__ */ n(f, { name: "Spacing", children: /* @__PURE__ */ n(
|
|
1990
|
+
co,
|
|
1991
|
+
{
|
|
1992
|
+
value: {
|
|
1993
|
+
marginTop: a(o.sx ?? {}, "marginTop"),
|
|
1994
|
+
marginBottom: a(o.sx ?? {}, "marginBottom"),
|
|
1995
|
+
marginLeft: a(o.sx ?? {}, "marginLeft"),
|
|
1996
|
+
marginRight: a(o.sx ?? {}, "marginRight")
|
|
1997
|
+
},
|
|
1998
|
+
onChange: s
|
|
1999
|
+
}
|
|
2000
|
+
) })
|
|
2001
|
+
] })
|
|
2002
|
+
] })
|
|
2003
|
+
] });
|
|
2004
|
+
}, Rn = () => E({
|
|
2005
|
+
transform: Ro
|
|
2006
|
+
}), Ra = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2007
|
+
<path d="M19.9 13.5H4.1C2.6 13.5 2 14.14 2 15.73V19.77C2 21.36 2.6 22 4.1 22H19.9C21.4 22 22 21.36 22 19.77V15.73C22 14.14 21.4 13.5 19.9 13.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2008
|
+
<path d="M19.9 2H4.1C2.6 2 2 2.64 2 4.23V8.27C2 9.86 2.6 10.5 4.1 10.5H19.9C21.4 10.5 22 9.86 22 8.27V4.23C22 2.64 21.4 2 19.9 2Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2009
|
+
</svg>`, Sa = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2010
|
+
<path d="M10.5 19.9V4.1C10.5 2.6 9.86 2 8.27 2H4.23C2.64 2 2 2.6 2 4.1V19.9C2 21.4 2.64 22 4.23 22H8.27C9.86 22 10.5 21.4 10.5 19.9Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2011
|
+
<path d="M22 19.9V4.1C22 2.6 21.36 2 19.77 2H15.73C14.14 2 13.5 2.6 13.5 4.1V19.9C13.5 21.4 14.14 22 15.73 22H19.77C21.36 22 22 21.4 22 19.9Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2012
|
+
</svg>`, ya = [
|
|
2013
|
+
{
|
|
2014
|
+
value: "row",
|
|
2015
|
+
icon: Sa,
|
|
2016
|
+
label: "Row"
|
|
2017
|
+
},
|
|
2018
|
+
{
|
|
2019
|
+
value: "column",
|
|
2020
|
+
icon: Ra,
|
|
2021
|
+
label: "Column"
|
|
2022
|
+
}
|
|
2023
|
+
], Ta = () => {
|
|
2024
|
+
const { nodeProps: e, setNodeProps: o } = Rn(), { currentScreen: r, getResponsiveProp: t } = k(), a = t(e.sx ?? {}, "flexDirection");
|
|
2025
|
+
return /* @__PURE__ */ n(L, { responsive: !0, name: "Direction", children: /* @__PURE__ */ n(_e, { value: a, onSelectionChange: (i) => {
|
|
2026
|
+
o({
|
|
2027
|
+
sx: I(
|
|
2028
|
+
{
|
|
2029
|
+
flexDirection: i,
|
|
2030
|
+
justifyContent: void 0,
|
|
2031
|
+
alignItems: void 0
|
|
2032
|
+
},
|
|
2033
|
+
r
|
|
2034
|
+
)
|
|
2035
|
+
});
|
|
2036
|
+
}, children: ya.map((i) => /* @__PURE__ */ n(
|
|
2037
|
+
G,
|
|
2038
|
+
{
|
|
2039
|
+
tooltip: {
|
|
2040
|
+
content: i.label
|
|
2041
|
+
},
|
|
2042
|
+
size: "24",
|
|
2043
|
+
value: i.value,
|
|
2044
|
+
children: /* @__PURE__ */ n(W, { source: i.icon })
|
|
2045
|
+
},
|
|
2046
|
+
i.value
|
|
2047
|
+
)) }) });
|
|
2048
|
+
}, Us = () => {
|
|
2049
|
+
const { nodeProps: e, setNodeProps: o } = Rn(), { currentScreen: r, getResponsiveProp: t } = k(), a = (v, R = r) => {
|
|
2050
|
+
o({ sx: I(v, R) });
|
|
2051
|
+
}, s = {
|
|
2052
|
+
paddingBottom: t(e.sx ?? {}, "paddingBottom"),
|
|
2053
|
+
paddingLeft: t(e.sx ?? {}, "paddingLeft"),
|
|
2054
|
+
paddingRight: t(e.sx ?? {}, "paddingRight"),
|
|
2055
|
+
paddingTop: t(e.sx ?? {}, "paddingTop"),
|
|
2056
|
+
marginBottom: t(e.sx ?? {}, "marginBottom"),
|
|
2057
|
+
marginLeft: t(e.sx ?? {}, "marginLeft"),
|
|
2058
|
+
marginRight: t(e.sx ?? {}, "marginRight"),
|
|
2059
|
+
marginTop: t(e.sx ?? {}, "marginTop")
|
|
2060
|
+
}, i = {
|
|
2061
|
+
borderStyle: t(e.sx ?? {}, "borderStyle"),
|
|
2062
|
+
borderColor: t(e.sx ?? {}, "borderColor"),
|
|
2063
|
+
borderTopWidth: t(e.sx ?? {}, "borderTopWidth"),
|
|
2064
|
+
borderRightWidth: t(e.sx ?? {}, "borderRightWidth"),
|
|
2065
|
+
borderBottomWidth: t(e.sx ?? {}, "borderBottomWidth"),
|
|
2066
|
+
borderLeftWidth: t(e.sx ?? {}, "borderLeftWidth")
|
|
2067
|
+
}, d = {
|
|
2068
|
+
borderTopLeftRadius: t(e.sx ?? {}, "borderTopLeftRadius"),
|
|
2069
|
+
borderTopRightRadius: t(e.sx ?? {}, "borderTopRightRadius"),
|
|
2070
|
+
borderBottomRightRadius: t(e.sx ?? {}, "borderBottomRightRadius"),
|
|
2071
|
+
borderBottomLeftRadius: t(e.sx ?? {}, "borderBottomLeftRadius")
|
|
2072
|
+
}, l = () => /* @__PURE__ */ n(V, { canvas: !0, is: Et }), c = {
|
|
2073
|
+
rowGap: t(e.sx ?? {}, "rowGap") ?? 0
|
|
2074
|
+
}, h = {
|
|
2075
|
+
columnGap: t(e.sx ?? {}, "columnGap") ?? 0
|
|
2076
|
+
}, g = {
|
|
2077
|
+
width: t(e.sx ?? {}, "width")
|
|
2078
|
+
}, x = {
|
|
2079
|
+
alignItems: t(e.sx ?? {}, "alignItems")
|
|
2080
|
+
}, w = {
|
|
2081
|
+
height: t(e.sx ?? {}, "height")
|
|
2082
|
+
}, b = t(e.sx ?? {}, "flexDirection"), C = {
|
|
2083
|
+
justifyContent: t(e.sx ?? {}, "justifyContent")
|
|
2084
|
+
}, p = {
|
|
2085
|
+
backgroundColor: t(e.sx ?? {}, "backgroundColor"),
|
|
2086
|
+
backgroundImage: t(e.sx ?? {}, "backgroundImage"),
|
|
2087
|
+
backgroundPosition: t(e.sx ?? {}, "backgroundPosition"),
|
|
2088
|
+
backgroundRepeat: t(e.sx ?? {}, "backgroundRepeat"),
|
|
2089
|
+
background: t(e.sx ?? {}, "background"),
|
|
2090
|
+
backgroundSize: t(e.sx ?? {}, "backgroundSize"),
|
|
2091
|
+
backgroundAttachment: t(e.sx ?? {}, "backgroundAttachment")
|
|
2092
|
+
};
|
|
2093
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
2094
|
+
/* @__PURE__ */ u(D, { children: [
|
|
2095
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
2096
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
2097
|
+
] }),
|
|
2098
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
2099
|
+
/* @__PURE__ */ u(N, { children: [
|
|
2100
|
+
/* @__PURE__ */ n(f, { name: "Flex items", children: /* @__PURE__ */ n(ve, { getNewNodeElement: l }) }),
|
|
2101
|
+
/* @__PURE__ */ u(f, { name: "Layout", children: [
|
|
2102
|
+
/* @__PURE__ */ n(Ta, {}),
|
|
2103
|
+
/* @__PURE__ */ n(
|
|
2104
|
+
Jt,
|
|
2105
|
+
{
|
|
2106
|
+
value: {
|
|
2107
|
+
flexWrap: t(e.sx ?? {}, "flexWrap")
|
|
2108
|
+
},
|
|
2109
|
+
onChange: a
|
|
2110
|
+
}
|
|
2111
|
+
),
|
|
2112
|
+
/* @__PURE__ */ n(Ce, { value: c, onChange: a }),
|
|
2113
|
+
/* @__PURE__ */ n(at, { value: h, onChange: a }),
|
|
2114
|
+
/* @__PURE__ */ n(Kt, { flexDirection: b, value: x, onChange: a }),
|
|
2115
|
+
/* @__PURE__ */ n(
|
|
2116
|
+
uo,
|
|
2117
|
+
{
|
|
2118
|
+
onChange: a,
|
|
2119
|
+
value: C,
|
|
2120
|
+
direction: b === "column" ? "column" : "row"
|
|
2121
|
+
}
|
|
2122
|
+
)
|
|
2123
|
+
] }),
|
|
2124
|
+
/* @__PURE__ */ u(f, { name: "Size", children: [
|
|
2125
|
+
/* @__PURE__ */ n(
|
|
2126
|
+
H,
|
|
2127
|
+
{
|
|
2128
|
+
menu: {
|
|
2129
|
+
autoOption: { visible: !0 },
|
|
2130
|
+
fitContentOption: { visible: !0 }
|
|
2131
|
+
},
|
|
2132
|
+
onChange: a,
|
|
2133
|
+
value: g
|
|
2134
|
+
}
|
|
2135
|
+
),
|
|
2136
|
+
/* @__PURE__ */ n(ce, { value: w, units: ["px", "%"], onChange: a })
|
|
2137
|
+
] })
|
|
2138
|
+
] }),
|
|
2139
|
+
/* @__PURE__ */ u(N, { children: [
|
|
2140
|
+
/* @__PURE__ */ n(f, { name: "Display on", children: /* @__PURE__ */ n(Y, {}) }),
|
|
2141
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: s, onChange: a }) }),
|
|
2142
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
2143
|
+
/* @__PURE__ */ n($, { value: i, onChange: a }),
|
|
2144
|
+
/* @__PURE__ */ n(z, { value: d, onChange: a })
|
|
2145
|
+
] }),
|
|
2146
|
+
/* @__PURE__ */ n(f, { name: "Background", children: /* @__PURE__ */ n(Z, { value: p, onChange: a }) })
|
|
2147
|
+
] })
|
|
2148
|
+
] })
|
|
2149
|
+
] });
|
|
2150
|
+
}, Rt = () => E({
|
|
2151
|
+
transform: So
|
|
2152
|
+
}), Na = () => {
|
|
2153
|
+
const { nodeProps: e, setNodeProps: o } = Rt(), { getResponsiveProp: r, currentScreen: t } = k(), a = r(e.sx ?? {}, "flexGrow");
|
|
2154
|
+
return /* @__PURE__ */ n(L, { guide: "Automatically expands to fill the available space in a flex container.", name: "Auto grow", children: /* @__PURE__ */ n(le, { onChange: (i) => {
|
|
2155
|
+
o({
|
|
2156
|
+
sx: I(
|
|
2157
|
+
{
|
|
2158
|
+
flexGrow: i.target.checked ? 1 : void 0
|
|
2159
|
+
},
|
|
2160
|
+
t
|
|
2161
|
+
)
|
|
2162
|
+
});
|
|
2163
|
+
}, checked: !ee(a) }) });
|
|
2164
|
+
}, La = () => {
|
|
2165
|
+
const { nodeProps: e, setNodeProps: o } = Rt(), { getResponsiveProp: r, currentScreen: t } = k(), a = r(e.sx ?? {}, "flexShrink");
|
|
2166
|
+
return /* @__PURE__ */ n(L, { guide: "Automatically shrinks when there isn’t enough space in the flex container.", name: "Auto shrink", children: /* @__PURE__ */ n(le, { onChange: (i) => {
|
|
2167
|
+
o({
|
|
2168
|
+
sx: I(
|
|
2169
|
+
{
|
|
2170
|
+
flexShrink: i.target.checked ? void 0 : 0
|
|
2171
|
+
},
|
|
2172
|
+
t
|
|
2173
|
+
)
|
|
2174
|
+
});
|
|
2175
|
+
}, checked: a !== 0 }) });
|
|
2176
|
+
}, Gs = () => {
|
|
2177
|
+
const { nodeProps: e, setNodeProps: o } = Rt(), { currentScreen: r, getResponsiveProp: t } = k(), a = (g, x = r) => {
|
|
2178
|
+
o({ sx: I(g, x) });
|
|
2179
|
+
}, s = {
|
|
2180
|
+
paddingBottom: t(e.sx ?? {}, "paddingBottom"),
|
|
2181
|
+
paddingLeft: t(e.sx ?? {}, "paddingLeft"),
|
|
2182
|
+
paddingRight: t(e.sx ?? {}, "paddingRight"),
|
|
2183
|
+
paddingTop: t(e.sx ?? {}, "paddingTop"),
|
|
2184
|
+
marginBottom: t(e.sx ?? {}, "marginBottom"),
|
|
2185
|
+
marginLeft: t(e.sx ?? {}, "marginLeft"),
|
|
2186
|
+
marginRight: t(e.sx ?? {}, "marginRight"),
|
|
2187
|
+
marginTop: t(e.sx ?? {}, "marginTop")
|
|
2188
|
+
}, i = {
|
|
2189
|
+
borderStyle: t(e.sx ?? {}, "borderStyle"),
|
|
2190
|
+
borderColor: t(e.sx ?? {}, "borderColor"),
|
|
2191
|
+
borderTopWidth: t(e.sx ?? {}, "borderTopWidth"),
|
|
2192
|
+
borderRightWidth: t(e.sx ?? {}, "borderRightWidth"),
|
|
2193
|
+
borderBottomWidth: t(e.sx ?? {}, "borderBottomWidth"),
|
|
2194
|
+
borderLeftWidth: t(e.sx ?? {}, "borderLeftWidth")
|
|
2195
|
+
}, d = {
|
|
2196
|
+
borderTopLeftRadius: t(e.sx ?? {}, "borderTopLeftRadius"),
|
|
2197
|
+
borderTopRightRadius: t(e.sx ?? {}, "borderTopRightRadius"),
|
|
2198
|
+
borderBottomRightRadius: t(e.sx ?? {}, "borderBottomRightRadius"),
|
|
2199
|
+
borderBottomLeftRadius: t(e.sx ?? {}, "borderBottomLeftRadius")
|
|
2200
|
+
}, l = {
|
|
2201
|
+
width: t(e.sx ?? {}, "width")
|
|
2202
|
+
}, c = {
|
|
2203
|
+
backgroundColor: t(e.sx ?? {}, "backgroundColor"),
|
|
2204
|
+
backgroundImage: t(e.sx ?? {}, "backgroundImage"),
|
|
2205
|
+
backgroundPosition: t(e.sx ?? {}, "backgroundPosition"),
|
|
2206
|
+
backgroundRepeat: t(e.sx ?? {}, "backgroundRepeat"),
|
|
2207
|
+
background: t(e.sx ?? {}, "background"),
|
|
2208
|
+
backgroundSize: t(e.sx ?? {}, "backgroundSize"),
|
|
2209
|
+
backgroundAttachment: t(e.sx ?? {}, "backgroundAttachment")
|
|
2210
|
+
}, h = {
|
|
2211
|
+
order: t(e.sx ?? {}, "order")
|
|
2212
|
+
};
|
|
2213
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
2214
|
+
/* @__PURE__ */ u(D, { children: [
|
|
2215
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
2216
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
2217
|
+
] }),
|
|
2218
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
2219
|
+
/* @__PURE__ */ n(N, { children: /* @__PURE__ */ u(f, { name: "Layout", children: [
|
|
2220
|
+
/* @__PURE__ */ n(La, {}),
|
|
2221
|
+
/* @__PURE__ */ n(Na, {}),
|
|
2222
|
+
/* @__PURE__ */ n(
|
|
2223
|
+
H,
|
|
2224
|
+
{
|
|
2225
|
+
menu: {
|
|
2226
|
+
autoOption: { visible: !0 },
|
|
2227
|
+
fitContentOption: { visible: !0 }
|
|
2228
|
+
},
|
|
2229
|
+
onChange: a,
|
|
2230
|
+
value: l
|
|
2231
|
+
}
|
|
2232
|
+
),
|
|
2233
|
+
/* @__PURE__ */ n(
|
|
2234
|
+
ce,
|
|
2235
|
+
{
|
|
2236
|
+
value: {
|
|
2237
|
+
height: t(e.sx ?? {}, "height")
|
|
2238
|
+
},
|
|
2239
|
+
onChange: a
|
|
2240
|
+
}
|
|
2241
|
+
),
|
|
2242
|
+
/* @__PURE__ */ n(Ut, { value: h, onChange: a })
|
|
2243
|
+
] }) }),
|
|
2244
|
+
/* @__PURE__ */ u(N, { children: [
|
|
2245
|
+
/* @__PURE__ */ n(f, { name: "Display on", children: /* @__PURE__ */ n(Y, {}) }),
|
|
2246
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: s, onChange: a }) }),
|
|
2247
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
2248
|
+
/* @__PURE__ */ n($, { value: i, onChange: a }),
|
|
2249
|
+
/* @__PURE__ */ n(z, { value: d, onChange: a })
|
|
2250
|
+
] }),
|
|
2251
|
+
/* @__PURE__ */ n(f, { name: "Background", children: /* @__PURE__ */ n(Z, { value: c, onChange: a }) })
|
|
2252
|
+
] })
|
|
2253
|
+
] })
|
|
2254
|
+
] });
|
|
2255
|
+
}, Sn = ({ availableTags: e = [] }) => {
|
|
2256
|
+
const { setNodeProps: o, setNodeResponsiveProps: r, nodeProps: t } = E(), { currentScreen: a, getResponsiveProp: s } = k(), i = (R, S = a) => {
|
|
2257
|
+
o({ sx: I(R, S) });
|
|
2258
|
+
}, d = s(t.sx ?? {}, "textAlign") ?? "left", l = (R) => {
|
|
2259
|
+
i({
|
|
2260
|
+
textAlign: R
|
|
2261
|
+
});
|
|
2262
|
+
}, c = {
|
|
2263
|
+
fontStyle: s(t.sx ?? {}, "fontStyle", "xs"),
|
|
2264
|
+
textDecorationLine: s(t.sx ?? {}, "textDecorationLine", "xs"),
|
|
2265
|
+
fontWeight: s(t.sx ?? {}, "fontWeight", "xs")
|
|
2266
|
+
}, h = (R) => {
|
|
2267
|
+
i(
|
|
2268
|
+
{
|
|
2269
|
+
fontStyle: R.fontStyle,
|
|
2270
|
+
textDecorationLine: R.textDecorationLine,
|
|
2271
|
+
fontWeight: R.fontWeight
|
|
2272
|
+
},
|
|
2273
|
+
"xs"
|
|
2274
|
+
);
|
|
2275
|
+
}, g = {
|
|
2276
|
+
width: s(t.sx ?? {}, "width")
|
|
2277
|
+
}, x = {
|
|
2278
|
+
color: s(t.sx ?? {}, "color", "xs")
|
|
2279
|
+
}, w = (R) => {
|
|
2280
|
+
i(R, "xs");
|
|
2281
|
+
}, b = (R) => {
|
|
2282
|
+
r(
|
|
2283
|
+
{
|
|
2284
|
+
sizeVariant: R
|
|
2285
|
+
},
|
|
2286
|
+
a
|
|
2287
|
+
);
|
|
2288
|
+
}, C = {
|
|
2289
|
+
paddingBottom: s(t.sx ?? {}, "paddingBottom"),
|
|
2290
|
+
paddingLeft: s(t.sx ?? {}, "paddingLeft"),
|
|
2291
|
+
paddingRight: s(t.sx ?? {}, "paddingRight"),
|
|
2292
|
+
paddingTop: s(t.sx ?? {}, "paddingTop"),
|
|
2293
|
+
marginBottom: s(t.sx ?? {}, "marginBottom"),
|
|
2294
|
+
marginLeft: s(t.sx ?? {}, "marginLeft"),
|
|
2295
|
+
marginRight: s(t.sx ?? {}, "marginRight"),
|
|
2296
|
+
marginTop: s(t.sx ?? {}, "marginTop")
|
|
2297
|
+
}, p = t.as, v = (R) => {
|
|
2298
|
+
o({
|
|
2299
|
+
as: R
|
|
2300
|
+
});
|
|
2301
|
+
};
|
|
2302
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
2303
|
+
/* @__PURE__ */ u(D, { children: [
|
|
2304
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
2305
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
2306
|
+
] }),
|
|
2307
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
2308
|
+
/* @__PURE__ */ u(N, { children: [
|
|
2309
|
+
/* @__PURE__ */ u(f, { name: "Text", children: [
|
|
2310
|
+
/* @__PURE__ */ n(
|
|
2311
|
+
Me,
|
|
2312
|
+
{
|
|
2313
|
+
onChange: b,
|
|
2314
|
+
value: s(t, "sizeVariant")
|
|
2315
|
+
}
|
|
2316
|
+
),
|
|
2317
|
+
/* @__PURE__ */ n(ge, { value: x, onChange: w }),
|
|
2318
|
+
/* @__PURE__ */ n(ze, { value: c, onChange: h }),
|
|
2319
|
+
/* @__PURE__ */ n(qt, { value: d, onChange: l }),
|
|
2320
|
+
/* @__PURE__ */ n(
|
|
2321
|
+
st,
|
|
2322
|
+
{
|
|
2323
|
+
value: {
|
|
2324
|
+
textTransform: s(t.sx ?? {}, "textTransform", "xs") ?? "none"
|
|
2325
|
+
},
|
|
2326
|
+
onChange: (R) => i(R, "xs")
|
|
2327
|
+
}
|
|
2328
|
+
),
|
|
2329
|
+
/* @__PURE__ */ n(
|
|
2330
|
+
$e,
|
|
2331
|
+
{
|
|
2332
|
+
responsive: !0,
|
|
2333
|
+
value: {
|
|
2334
|
+
fontWeight: s(t.sx ?? {}, "fontWeight")
|
|
2335
|
+
},
|
|
2336
|
+
onChange: i
|
|
2337
|
+
}
|
|
2338
|
+
)
|
|
2339
|
+
] }),
|
|
2340
|
+
/* @__PURE__ */ n(f, { name: "Size", children: /* @__PURE__ */ n(H, { value: g, onChange: i }) }),
|
|
2341
|
+
e.length > 0 && /* @__PURE__ */ n(f, { name: "SEO", children: /* @__PURE__ */ n(ho, { onChange: v, value: p, availableTags: e }) })
|
|
2342
|
+
] }),
|
|
2343
|
+
/* @__PURE__ */ u(N, { children: [
|
|
2344
|
+
/* @__PURE__ */ n(f, { name: "Display on", children: /* @__PURE__ */ n(Y, {}) }),
|
|
2345
|
+
/* @__PURE__ */ n(f, { name: "Spacing", children: /* @__PURE__ */ n(M, { value: C, onChange: i }) })
|
|
2346
|
+
] })
|
|
2347
|
+
] })
|
|
2348
|
+
] });
|
|
2349
|
+
}, qs = () => /* @__PURE__ */ n(Sn, {}), Js = () => {
|
|
2350
|
+
const { id: e } = Q(), { actions: o, query: r } = ne(), [t, a] = U(!1), {
|
|
2351
|
+
dom: s,
|
|
2352
|
+
name: i,
|
|
2353
|
+
moveable: d,
|
|
2354
|
+
deletable: l,
|
|
2355
|
+
connectors: { drag: c },
|
|
2356
|
+
parentSelectableNode: h,
|
|
2357
|
+
selectable: g
|
|
2358
|
+
} = Q((p) => {
|
|
2359
|
+
let v = p.data.parent ? r.node(p.data.parent).get() : null;
|
|
2360
|
+
for (; v && !Nt(v); )
|
|
2361
|
+
v = v.data.parent && v.data.parent !== Kn ? r.node(v.data.parent).get() : null;
|
|
2362
|
+
return {
|
|
2363
|
+
dom: p.dom,
|
|
2364
|
+
name: rt(p),
|
|
2365
|
+
moveable: r.node(p.id).isDraggable(),
|
|
2366
|
+
deletable: r.node(p.id).isDeletable() && !!(p.data.custom?.deletable ?? !0),
|
|
2367
|
+
parentSelectableNode: v,
|
|
2368
|
+
parentNode: p.data.parent,
|
|
2369
|
+
selectable: Nt(p)
|
|
2370
|
+
};
|
|
2371
|
+
}), { floatingStyles: x, refs: w } = Do({
|
|
2372
|
+
open: !0,
|
|
2373
|
+
placement: "bottom-start",
|
|
2374
|
+
middleware: [Fo(), Mo(4)],
|
|
2375
|
+
whileElementsMounted: Oo
|
|
2376
|
+
}), b = (p) => {
|
|
2377
|
+
const v = p.currentTarget.getAttribute("value");
|
|
2378
|
+
!ee(v) && o.selectNode(v);
|
|
2379
|
+
};
|
|
2380
|
+
we(() => {
|
|
2381
|
+
w.setReference(s);
|
|
2382
|
+
}, [s, w]);
|
|
2383
|
+
const C = () => {
|
|
2384
|
+
o.delete(e);
|
|
2385
|
+
};
|
|
2386
|
+
return /* @__PURE__ */ n(Vt, { children: g && w.reference.current && /* @__PURE__ */ n(zo, { root: document.body, children: /* @__PURE__ */ n("div", { ref: w.setFloating, style: x, children: /* @__PURE__ */ u(
|
|
2387
|
+
"div",
|
|
2388
|
+
{
|
|
2389
|
+
className: j(
|
|
2390
|
+
"tw:bg-ic-ink-6s tw:text-ic-white-6s tw:text-xs tw:py-1 tw:px-1.5 tw:rounded tw:flex tw:items-center tw:gap-1"
|
|
2391
|
+
),
|
|
2392
|
+
children: [
|
|
2393
|
+
d && /* @__PURE__ */ n(
|
|
2394
|
+
G,
|
|
2395
|
+
{
|
|
2396
|
+
ref: (p) => {
|
|
2397
|
+
p && c(p);
|
|
2398
|
+
},
|
|
2399
|
+
className: "tw:cursor-grab",
|
|
2400
|
+
size: "20",
|
|
2401
|
+
children: /* @__PURE__ */ n(W, { size: 16, source: it })
|
|
2402
|
+
}
|
|
2403
|
+
),
|
|
2404
|
+
/* @__PURE__ */ u($o, { offset: 8, onOpenChange: a, open: t, children: [
|
|
2405
|
+
/* @__PURE__ */ n(to, { children: /* @__PURE__ */ n(
|
|
2406
|
+
K,
|
|
2407
|
+
{
|
|
2408
|
+
suffix: /* @__PURE__ */ n(
|
|
2409
|
+
W,
|
|
2410
|
+
{
|
|
2411
|
+
className: j("tw:transition-transform", {
|
|
2412
|
+
hidden: !h,
|
|
2413
|
+
"tw:-rotate-180": t
|
|
2414
|
+
}),
|
|
2415
|
+
size: 16,
|
|
2416
|
+
source: ct
|
|
2417
|
+
}
|
|
2418
|
+
),
|
|
2419
|
+
variant: "text",
|
|
2420
|
+
size: "24",
|
|
2421
|
+
children: i
|
|
2422
|
+
}
|
|
2423
|
+
) }),
|
|
2424
|
+
!!h && /* @__PURE__ */ n(no, { children: /* @__PURE__ */ n(oo, { onClick: b, value: h.id, children: rt(h) }) })
|
|
2425
|
+
] }),
|
|
2426
|
+
l && /* @__PURE__ */ n(G, { onClick: C, className: "tw:cursor-grab", size: "20", children: /* @__PURE__ */ n(W, { size: 16, source: dt }) })
|
|
2427
|
+
]
|
|
2428
|
+
}
|
|
2429
|
+
) }) }) });
|
|
2430
|
+
}, Ks = () => {
|
|
2431
|
+
const { dom: e } = Q((a) => ({
|
|
2432
|
+
dom: a.dom
|
|
2433
|
+
})), { window: o } = _o(), [r, t] = U(null);
|
|
2434
|
+
return we(() => {
|
|
2435
|
+
if (!e || !o) return;
|
|
2436
|
+
let a = null, s = !1;
|
|
2437
|
+
const i = () => {
|
|
2438
|
+
const h = e.getBoundingClientRect();
|
|
2439
|
+
t(h), s = !1;
|
|
2440
|
+
}, d = () => {
|
|
2441
|
+
s || (s = !0, a = o.requestAnimationFrame(i));
|
|
2442
|
+
};
|
|
2443
|
+
i(), o.addEventListener("scroll", d, !0), o.addEventListener("resize", d);
|
|
2444
|
+
const l = new ResizeObserver(d);
|
|
2445
|
+
l.observe(e);
|
|
2446
|
+
const c = new MutationObserver(d);
|
|
2447
|
+
return c.observe(e, { attributes: !0, childList: !0, subtree: !0 }), () => {
|
|
2448
|
+
a !== null && o.cancelAnimationFrame(a), o.removeEventListener("scroll", d, !0), o.removeEventListener("resize", d), l.disconnect(), c.disconnect();
|
|
2449
|
+
};
|
|
2450
|
+
}, [e, o]), r ? /* @__PURE__ */ n(
|
|
2451
|
+
"div",
|
|
2452
|
+
{
|
|
2453
|
+
style: {
|
|
2454
|
+
position: "fixed",
|
|
2455
|
+
left: `${r.left}px`,
|
|
2456
|
+
top: `${r.top}px`,
|
|
2457
|
+
width: `${r.width}px`,
|
|
2458
|
+
height: `${r.height}px`,
|
|
2459
|
+
pointerEvents: "none",
|
|
2460
|
+
zIndex: 9999
|
|
2461
|
+
},
|
|
2462
|
+
className: "tw:outline-1 tw:outline-dashed tw:outline-ic-ink-6s tw:-outline-offset-1"
|
|
2463
|
+
}
|
|
2464
|
+
) : null;
|
|
2465
|
+
}, Ys = () => /* @__PURE__ */ n(Sn, { availableTags: ["h1", "h2", "h3", "h4", "h5", "h6", "div"] }), Se = () => E({
|
|
2466
|
+
transform: yo
|
|
2467
|
+
}), Pa = () => {
|
|
2468
|
+
const { nodeProps: e, setNodeProps: o } = Se();
|
|
2469
|
+
return /* @__PURE__ */ n(L, { direction: "vertical", name: "Alt text", children: /* @__PURE__ */ n(
|
|
2470
|
+
ro,
|
|
2471
|
+
{
|
|
2472
|
+
onBlur: (a) => {
|
|
2473
|
+
o({
|
|
2474
|
+
alt: a.target.value.trim()
|
|
2475
|
+
});
|
|
2476
|
+
},
|
|
2477
|
+
onChange: (a) => {
|
|
2478
|
+
o({
|
|
2479
|
+
alt: Ht(a.target.value)
|
|
2480
|
+
});
|
|
2481
|
+
},
|
|
2482
|
+
placeholder: "E.g: Classic white crewneck t-shirt with minimalist logo design, casual and versatile style",
|
|
2483
|
+
rows: 3,
|
|
2484
|
+
value: e.alt ?? ""
|
|
2485
|
+
}
|
|
2486
|
+
) });
|
|
2487
|
+
}, ka = () => {
|
|
2488
|
+
const { nodeProps: e, setNodeProps: o } = Se(), r = (t) => {
|
|
2489
|
+
o({
|
|
2490
|
+
loading: t.target.checked ? "eager" : "lazy"
|
|
2491
|
+
});
|
|
2492
|
+
};
|
|
2493
|
+
return /* @__PURE__ */ n(L, { name: "Preload", children: /* @__PURE__ */ n(le, { checked: e.loading === "eager", onChange: r }) });
|
|
2494
|
+
};
|
|
2495
|
+
var yn = /* @__PURE__ */ ((e) => (e.Auto = "auto", e.Square = "1 / 1", e.Widescreen = "16 / 9", e.Portrait = "9 / 16", e.Custom = "custom", e))(yn || {});
|
|
2496
|
+
const Ba = [
|
|
2497
|
+
{
|
|
2498
|
+
value: "auto",
|
|
2499
|
+
label: "Original"
|
|
2500
|
+
},
|
|
2501
|
+
{
|
|
2502
|
+
value: "1 / 1",
|
|
2503
|
+
label: "Square"
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
value: "16 / 9",
|
|
2507
|
+
label: "Widescreen"
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
value: "9 / 16",
|
|
2511
|
+
label: "Portrait"
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
value: "custom",
|
|
2515
|
+
label: "Custom"
|
|
2516
|
+
}
|
|
2517
|
+
], Ia = ({ label: e }) => e, Wa = ({ label: e, value: o }) => [
|
|
2518
|
+
"auto",
|
|
2519
|
+
"custom"
|
|
2520
|
+
/* Custom */
|
|
2521
|
+
].includes(o) ? e : `${e} (${o})`, Ea = () => {
|
|
2522
|
+
const { nodeProps: e, setNodeProps: o } = Se(), { currentScreen: r, getResponsiveProp: t } = k(), [a, s] = U(null), i = t(e.sx ?? {}, "aspectRatio") ?? "auto", d = Object.values(yn).find((p) => p === i) ?? "custom", l = (p) => {
|
|
2523
|
+
p.target.select();
|
|
2524
|
+
}, c = (p = "auto") => {
|
|
2525
|
+
const v = {
|
|
2526
|
+
aspectRatio: p === "auto" ? void 0 : p
|
|
2527
|
+
};
|
|
2528
|
+
p !== "auto" && (v.height = ""), o({
|
|
2529
|
+
sx: I(v, r)
|
|
2530
|
+
});
|
|
2531
|
+
}, h = (p) => {
|
|
2532
|
+
if (s(p === "custom" ? p : null), p === "custom") {
|
|
2533
|
+
s(p);
|
|
2534
|
+
return;
|
|
2535
|
+
}
|
|
2536
|
+
s(null), c(p);
|
|
2537
|
+
}, g = a ?? d, x = i.toString().split("/"), w = tt(x.at(0)), b = tt(x.at(1)), C = (p) => {
|
|
2538
|
+
const v = isNaN(p.target.valueAsNumber) ? void 0 : p.target.valueAsNumber, R = {
|
|
2539
|
+
x: w ?? v,
|
|
2540
|
+
y: b ?? v,
|
|
2541
|
+
[p.target.name]: v
|
|
2542
|
+
}, S = ee(R.x) || ee(R.y) ? void 0 : `${R.x} / ${R.y}`;
|
|
2543
|
+
c(S);
|
|
2544
|
+
};
|
|
2545
|
+
return /* @__PURE__ */ u("div", { className: "tw:flex tw:flex-col tw:gap-2", children: [
|
|
2546
|
+
/* @__PURE__ */ n(L, { responsive: !0, name: "Proportion", children: /* @__PURE__ */ n(
|
|
2547
|
+
lt,
|
|
2548
|
+
{
|
|
2549
|
+
value: g,
|
|
2550
|
+
onChange: h,
|
|
2551
|
+
optionLabel: Wa,
|
|
2552
|
+
selectedRenderer: Ia,
|
|
2553
|
+
options: Ba,
|
|
2554
|
+
className: "tw:w-1/2"
|
|
2555
|
+
}
|
|
2556
|
+
) }),
|
|
2557
|
+
g === "custom" && /* @__PURE__ */ n("div", { className: "tw:flex tw:justify-end", children: /* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:gap-0.5 tw:py-0.5 tw:bg-ic-white-1s tw:rounded-lg tw:px-2 tw:w-1/2", children: [
|
|
2558
|
+
/* @__PURE__ */ n(
|
|
2559
|
+
be,
|
|
2560
|
+
{
|
|
2561
|
+
name: "x",
|
|
2562
|
+
onFocus: l,
|
|
2563
|
+
classes: {
|
|
2564
|
+
main: "bg-transparent px-1"
|
|
2565
|
+
},
|
|
2566
|
+
size: "28",
|
|
2567
|
+
value: w,
|
|
2568
|
+
onChange: C,
|
|
2569
|
+
mode: "onBlur",
|
|
2570
|
+
placeholder: "X",
|
|
2571
|
+
className: "tw:text-center"
|
|
2572
|
+
}
|
|
2573
|
+
),
|
|
2574
|
+
/* @__PURE__ */ n("span", { className: "tw:text-xs tw:text-ic-white-3s", children: "/" }),
|
|
2575
|
+
/* @__PURE__ */ n(
|
|
2576
|
+
be,
|
|
2577
|
+
{
|
|
2578
|
+
name: "y",
|
|
2579
|
+
placeholder: "Y",
|
|
2580
|
+
value: b,
|
|
2581
|
+
mode: "onBlur",
|
|
2582
|
+
onChange: C,
|
|
2583
|
+
onFocus: l,
|
|
2584
|
+
classes: {
|
|
2585
|
+
main: "bg-transparent px-1"
|
|
2586
|
+
},
|
|
2587
|
+
size: "28",
|
|
2588
|
+
className: "tw:text-center"
|
|
2589
|
+
}
|
|
2590
|
+
)
|
|
2591
|
+
] }) })
|
|
2592
|
+
] });
|
|
2593
|
+
}, Aa = () => {
|
|
2594
|
+
const { nodeProps: e, setNodeProps: o } = Se();
|
|
2595
|
+
return /* @__PURE__ */ u("div", { className: "tw:flex tw:flex-col tw:gap-2", children: [
|
|
2596
|
+
/* @__PURE__ */ n(L, { name: "Choose image" }),
|
|
2597
|
+
/* @__PURE__ */ n(go, { onChange: (t) => {
|
|
2598
|
+
o({
|
|
2599
|
+
src: t
|
|
2600
|
+
});
|
|
2601
|
+
}, source: e.src })
|
|
2602
|
+
] });
|
|
2603
|
+
}, Zs = () => {
|
|
2604
|
+
const { currentScreen: e, getResponsiveProp: o } = k(), { readOnly: r } = Q((b) => ({
|
|
2605
|
+
readOnly: b.dom?.getAttribute("aria-readonly") === X.True
|
|
2606
|
+
})), { nodeProps: t, setNodeProps: a } = Se(), s = o(t.sx ?? {}, "aspectRatio") ?? "auto", i = (b, C = e) => {
|
|
2607
|
+
a({ sx: I(b, C) });
|
|
2608
|
+
}, d = {
|
|
2609
|
+
width: o(t.sx ?? {}, "width")
|
|
2610
|
+
}, l = {
|
|
2611
|
+
height: o(t.sx ?? {}, "height")
|
|
2612
|
+
}, c = {
|
|
2613
|
+
objectFit: o(t.sx ?? {}, "objectFit")
|
|
2614
|
+
}, h = (b) => {
|
|
2615
|
+
i(
|
|
2616
|
+
{
|
|
2617
|
+
objectFit: b.objectFit ?? "cover"
|
|
2618
|
+
},
|
|
2619
|
+
"xs"
|
|
2620
|
+
);
|
|
2621
|
+
}, g = {
|
|
2622
|
+
paddingBottom: o(t.sx ?? {}, "paddingBottom"),
|
|
2623
|
+
paddingLeft: o(t.sx ?? {}, "paddingLeft"),
|
|
2624
|
+
paddingRight: o(t.sx ?? {}, "paddingRight"),
|
|
2625
|
+
paddingTop: o(t.sx ?? {}, "paddingTop"),
|
|
2626
|
+
marginBottom: o(t.sx ?? {}, "marginBottom"),
|
|
2627
|
+
marginLeft: o(t.sx ?? {}, "marginLeft"),
|
|
2628
|
+
marginRight: o(t.sx ?? {}, "marginRight"),
|
|
2629
|
+
marginTop: o(t.sx ?? {}, "marginTop")
|
|
2630
|
+
}, x = {
|
|
2631
|
+
borderStyle: o(t.sx ?? {}, "borderStyle"),
|
|
2632
|
+
borderColor: o(t.sx ?? {}, "borderColor"),
|
|
2633
|
+
borderTopWidth: o(t.sx ?? {}, "borderTopWidth"),
|
|
2634
|
+
borderRightWidth: o(t.sx ?? {}, "borderRightWidth"),
|
|
2635
|
+
borderBottomWidth: o(t.sx ?? {}, "borderBottomWidth"),
|
|
2636
|
+
borderLeftWidth: o(t.sx ?? {}, "borderLeftWidth")
|
|
2637
|
+
}, w = {
|
|
2638
|
+
borderTopLeftRadius: o(t.sx ?? {}, "borderTopLeftRadius"),
|
|
2639
|
+
borderTopRightRadius: o(t.sx ?? {}, "borderTopRightRadius"),
|
|
2640
|
+
borderBottomRightRadius: o(t.sx ?? {}, "borderBottomRightRadius"),
|
|
2641
|
+
borderBottomLeftRadius: o(t.sx ?? {}, "borderBottomLeftRadius")
|
|
2642
|
+
};
|
|
2643
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
2644
|
+
/* @__PURE__ */ u(D, { children: [
|
|
2645
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
2646
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
2647
|
+
] }),
|
|
2648
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
2649
|
+
/* @__PURE__ */ u(N, { children: [
|
|
2650
|
+
/* @__PURE__ */ u(f, { name: "Image", children: [
|
|
2651
|
+
!r && /* @__PURE__ */ n(Aa, {}),
|
|
2652
|
+
/* @__PURE__ */ n(ka, {})
|
|
2653
|
+
] }),
|
|
2654
|
+
/* @__PURE__ */ u(f, { name: "Size", children: [
|
|
2655
|
+
/* @__PURE__ */ n(Ea, {}),
|
|
2656
|
+
/* @__PURE__ */ n(H, { value: d, onChange: i }),
|
|
2657
|
+
s === "auto" && /* @__PURE__ */ n(ce, { value: l, onChange: i }),
|
|
2658
|
+
/* @__PURE__ */ n(po, { value: c, onChange: h })
|
|
2659
|
+
] }),
|
|
2660
|
+
/* @__PURE__ */ n(f, { name: "SEO", children: /* @__PURE__ */ n(Pa, {}) })
|
|
2661
|
+
] }),
|
|
2662
|
+
/* @__PURE__ */ u(N, { children: [
|
|
2663
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: g, onChange: i }) }),
|
|
2664
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
2665
|
+
/* @__PURE__ */ n($, { value: x, onChange: i }),
|
|
2666
|
+
/* @__PURE__ */ n(z, { value: w, onChange: i })
|
|
2667
|
+
] })
|
|
2668
|
+
] })
|
|
2669
|
+
] })
|
|
2670
|
+
] });
|
|
2671
|
+
}, Da = () => E({
|
|
2672
|
+
transform: To
|
|
2673
|
+
}), Oa = () => {
|
|
2674
|
+
const { nodeDOM: e } = Q((s) => ({
|
|
2675
|
+
nodeDOM: s.dom
|
|
2676
|
+
})), o = (s) => s?.getAttribute(Ye.PlayState) || "on", [r, t] = U(!1), a = () => {
|
|
2677
|
+
const s = o(e);
|
|
2678
|
+
e?.setAttribute(Ye.PlayState, s === "on" ? "off" : "on");
|
|
2679
|
+
};
|
|
2680
|
+
return we(() => {
|
|
2681
|
+
const s = new MutationObserver((i) => {
|
|
2682
|
+
const d = i.at(0)?.target;
|
|
2683
|
+
if (!d) return;
|
|
2684
|
+
const l = o(d);
|
|
2685
|
+
t(l === "on");
|
|
2686
|
+
});
|
|
2687
|
+
return e && s.observe(e, {
|
|
2688
|
+
attributes: !0,
|
|
2689
|
+
attributeFilter: [Ye.PlayState]
|
|
2690
|
+
}), () => {
|
|
2691
|
+
s.disconnect();
|
|
2692
|
+
};
|
|
2693
|
+
}, [e]), /* @__PURE__ */ n(K, { onClick: a, children: r ? "Pause" : "Play" });
|
|
2694
|
+
}, Fa = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2695
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.73122 20.833C7.22415 21.0977 6.6107 21.0511 6.14944 20.7129C5.68817 20.3746 5.45931 19.8035 5.55932 19.2404L6.36865 14.6014L2.96123 11.3361C2.54474 10.9389 2.39209 10.3385 2.56833 9.79059C2.74456 9.24271 3.21862 8.84388 3.78858 8.764L8.51955 8.08772L10.6554 3.82694C10.9087 3.31595 11.4297 2.99268 12 2.99268C12.5703 2.99268 13.0913 3.31595 13.3446 3.82694L15.4804 8.08772L20.2114 8.764C20.7814 8.84388 21.2554 9.24271 21.4317 9.79059C21.6079 10.3385 21.4553 10.9389 21.0388 11.3361L17.6313 14.6014L18.4407 19.2414C18.5407 19.8045 18.3118 20.3756 17.8506 20.7139C17.3893 21.0521 16.7758 21.0987 16.2688 20.834L12 18.6281L7.73122 20.833Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
2696
|
+
</svg>
|
|
2697
|
+
`, Xs = () => {
|
|
2698
|
+
const { nodeProps: e, setNodeProps: o, setNodeResponsiveProps: r } = Da(), { currentScreen: t, getResponsiveProp: a } = k(), s = (p, v = t) => {
|
|
2699
|
+
o({ sx: I(p, v) });
|
|
2700
|
+
};
|
|
2701
|
+
a(e.sx ?? {}, "columnGap");
|
|
2702
|
+
const i = {
|
|
2703
|
+
paddingBottom: a(e.sx ?? {}, "paddingBottom"),
|
|
2704
|
+
paddingLeft: a(e.sx ?? {}, "paddingLeft"),
|
|
2705
|
+
paddingRight: a(e.sx ?? {}, "paddingRight"),
|
|
2706
|
+
paddingTop: a(e.sx ?? {}, "paddingTop"),
|
|
2707
|
+
marginBottom: a(e.sx ?? {}, "marginBottom"),
|
|
2708
|
+
marginLeft: a(e.sx ?? {}, "marginLeft"),
|
|
2709
|
+
marginRight: a(e.sx ?? {}, "marginRight"),
|
|
2710
|
+
marginTop: a(e.sx ?? {}, "marginTop")
|
|
2711
|
+
}, d = {
|
|
2712
|
+
borderStyle: a(e.sx ?? {}, "borderStyle"),
|
|
2713
|
+
borderColor: a(e.sx ?? {}, "borderColor"),
|
|
2714
|
+
borderTopWidth: a(e.sx ?? {}, "borderTopWidth"),
|
|
2715
|
+
borderRightWidth: a(e.sx ?? {}, "borderRightWidth"),
|
|
2716
|
+
borderBottomWidth: a(e.sx ?? {}, "borderBottomWidth"),
|
|
2717
|
+
borderLeftWidth: a(e.sx ?? {}, "borderLeftWidth")
|
|
2718
|
+
}, l = {
|
|
2719
|
+
borderTopLeftRadius: a(e.sx ?? {}, "borderTopLeftRadius"),
|
|
2720
|
+
borderTopRightRadius: a(e.sx ?? {}, "borderTopRightRadius"),
|
|
2721
|
+
borderBottomRightRadius: a(e.sx ?? {}, "borderBottomRightRadius"),
|
|
2722
|
+
borderBottomLeftRadius: a(e.sx ?? {}, "borderBottomLeftRadius")
|
|
2723
|
+
}, c = {
|
|
2724
|
+
backgroundColor: a(e.sx ?? {}, "backgroundColor"),
|
|
2725
|
+
backgroundImage: a(e.sx ?? {}, "backgroundImage"),
|
|
2726
|
+
backgroundPosition: a(e.sx ?? {}, "backgroundPosition"),
|
|
2727
|
+
backgroundRepeat: a(e.sx ?? {}, "backgroundRepeat"),
|
|
2728
|
+
background: a(e.sx ?? {}, "background"),
|
|
2729
|
+
backgroundSize: a(e.sx ?? {}, "backgroundSize"),
|
|
2730
|
+
backgroundAttachment: a(e.sx ?? {}, "backgroundAttachment")
|
|
2731
|
+
}, h = () => /* @__PURE__ */ n(
|
|
2732
|
+
V,
|
|
2733
|
+
{
|
|
2734
|
+
canvas: !0,
|
|
2735
|
+
custom: {
|
|
2736
|
+
displayName: "Marquee Item (new)"
|
|
2737
|
+
},
|
|
2738
|
+
is: At
|
|
2739
|
+
}
|
|
2740
|
+
), g = (p) => {
|
|
2741
|
+
o({
|
|
2742
|
+
separatorIcon: p.target.checked ? {
|
|
2743
|
+
source: Fa
|
|
2744
|
+
} : void 0
|
|
2745
|
+
});
|
|
2746
|
+
}, x = (p) => {
|
|
2747
|
+
o({
|
|
2748
|
+
separatorIcon: {
|
|
2749
|
+
source: p
|
|
2750
|
+
}
|
|
2751
|
+
});
|
|
2752
|
+
}, w = (p) => {
|
|
2753
|
+
o({
|
|
2754
|
+
separatorIcon: {
|
|
2755
|
+
sx: p
|
|
2756
|
+
}
|
|
2757
|
+
});
|
|
2758
|
+
}, b = (p) => {
|
|
2759
|
+
o({
|
|
2760
|
+
separatorIcon: {
|
|
2761
|
+
size: p
|
|
2762
|
+
}
|
|
2763
|
+
});
|
|
2764
|
+
}, C = (p) => {
|
|
2765
|
+
r(
|
|
2766
|
+
{
|
|
2767
|
+
spaceBetween: p
|
|
2768
|
+
},
|
|
2769
|
+
t
|
|
2770
|
+
);
|
|
2771
|
+
};
|
|
2772
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
2773
|
+
/* @__PURE__ */ u(D, { children: [
|
|
2774
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
2775
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
2776
|
+
] }),
|
|
2777
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
2778
|
+
/* @__PURE__ */ u(N, { children: [
|
|
2779
|
+
/* @__PURE__ */ n(f, { name: "Items", children: /* @__PURE__ */ n(ve, { getNewNodeElement: h }) }),
|
|
2780
|
+
/* @__PURE__ */ u(f, { name: "States", children: [
|
|
2781
|
+
/* @__PURE__ */ n(
|
|
2782
|
+
Be,
|
|
2783
|
+
{
|
|
2784
|
+
value: a(e, "spaceBetween"),
|
|
2785
|
+
name: "Items spacing",
|
|
2786
|
+
responsive: !0,
|
|
2787
|
+
onChange: C
|
|
2788
|
+
}
|
|
2789
|
+
),
|
|
2790
|
+
/* @__PURE__ */ n(Oa, {})
|
|
2791
|
+
] }),
|
|
2792
|
+
/* @__PURE__ */ n(
|
|
2793
|
+
f,
|
|
2794
|
+
{
|
|
2795
|
+
name: "Separator",
|
|
2796
|
+
slots: {
|
|
2797
|
+
right: /* @__PURE__ */ n(le, { onChange: g, checked: !!e.separatorIcon })
|
|
2798
|
+
},
|
|
2799
|
+
children: e.separatorIcon && /* @__PURE__ */ u(It, { children: [
|
|
2800
|
+
/* @__PURE__ */ n(
|
|
2801
|
+
Ie,
|
|
2802
|
+
{
|
|
2803
|
+
name: "Icon",
|
|
2804
|
+
source: e.separatorIcon.source,
|
|
2805
|
+
onChange: x
|
|
2806
|
+
}
|
|
2807
|
+
),
|
|
2808
|
+
/* @__PURE__ */ n(
|
|
2809
|
+
ge,
|
|
2810
|
+
{
|
|
2811
|
+
value: {
|
|
2812
|
+
color: e.separatorIcon.sx?.color
|
|
2813
|
+
},
|
|
2814
|
+
onChange: w
|
|
2815
|
+
}
|
|
2816
|
+
),
|
|
2817
|
+
/* @__PURE__ */ n(
|
|
2818
|
+
Be,
|
|
2819
|
+
{
|
|
2820
|
+
value: e.separatorIcon.size ?? 24,
|
|
2821
|
+
name: "Size (px)",
|
|
2822
|
+
onChange: b
|
|
2823
|
+
}
|
|
2824
|
+
)
|
|
2825
|
+
] })
|
|
2826
|
+
}
|
|
2827
|
+
)
|
|
2828
|
+
] }),
|
|
2829
|
+
/* @__PURE__ */ u(N, { children: [
|
|
2830
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: i, onChange: s }) }),
|
|
2831
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
2832
|
+
/* @__PURE__ */ n($, { value: d, onChange: s }),
|
|
2833
|
+
/* @__PURE__ */ n(z, { value: l, onChange: s })
|
|
2834
|
+
] }),
|
|
2835
|
+
/* @__PURE__ */ n(f, { name: "Background", children: /* @__PURE__ */ n(Z, { value: c, onChange: s }) })
|
|
2836
|
+
] })
|
|
2837
|
+
] })
|
|
2838
|
+
] });
|
|
2839
|
+
}, Tn = (e) => E({
|
|
2840
|
+
transform: No,
|
|
2841
|
+
nodeId: e
|
|
2842
|
+
}), Ma = ({ tabIndex: e, tabNodeId: o }) => {
|
|
2843
|
+
const [r, t] = U(!1), [a, s] = Xt(e === 0), { nodeProps: i, setNodeProps: d } = _a(o), { actions: l, query: c } = ne(), { tabNode: h, tabPanelNode: g } = Q((p) => {
|
|
2844
|
+
const v = p.data.nodes.find(
|
|
2845
|
+
(B) => he(c.node(B).get()) === y.TabList
|
|
2846
|
+
);
|
|
2847
|
+
if (!v)
|
|
2848
|
+
throw new Error("Tab list node not found");
|
|
2849
|
+
const R = c.node(v).get().data.nodes.at(e);
|
|
2850
|
+
if (!R)
|
|
2851
|
+
throw new Error("Tab node not found");
|
|
2852
|
+
const S = p.data.nodes.find(
|
|
2853
|
+
(B) => he(c.node(B).get()) === y.TabContent
|
|
2854
|
+
);
|
|
2855
|
+
if (!S)
|
|
2856
|
+
throw new Error("Tab content node not found");
|
|
2857
|
+
const P = c.node(S).get().data.nodes.at(e);
|
|
2858
|
+
if (!P)
|
|
2859
|
+
throw new Error("Tab panel node not found");
|
|
2860
|
+
return {
|
|
2861
|
+
tabNode: c.node(R).get(),
|
|
2862
|
+
tabPanelNode: c.node(P).get()
|
|
2863
|
+
};
|
|
2864
|
+
}), x = (p) => {
|
|
2865
|
+
p.stopPropagation(), l.delete(h.id), l.delete(g.id);
|
|
2866
|
+
}, w = () => {
|
|
2867
|
+
t(!0);
|
|
2868
|
+
}, b = () => {
|
|
2869
|
+
t(!1);
|
|
2870
|
+
}, C = (p) => {
|
|
2871
|
+
d({
|
|
2872
|
+
dangerouslySetInnerHTML: {
|
|
2873
|
+
__html: p.target.value || i.dangerouslySetInnerHTML?.__html || ""
|
|
2874
|
+
}
|
|
2875
|
+
});
|
|
2876
|
+
};
|
|
2877
|
+
return /* @__PURE__ */ n(tn, { index: e, draggableId: e.toString(), children: (p) => /* @__PURE__ */ u(
|
|
2878
|
+
"div",
|
|
2879
|
+
{
|
|
2880
|
+
className: "tw:rounded-lg tw:border tw:border-ic-white-2s tw:overflow-hidden",
|
|
2881
|
+
ref: p.innerRef,
|
|
2882
|
+
...p.draggableProps,
|
|
2883
|
+
...p.dragHandleProps,
|
|
2884
|
+
children: [
|
|
2885
|
+
/* @__PURE__ */ u(
|
|
2886
|
+
"div",
|
|
2887
|
+
{
|
|
2888
|
+
className: j(
|
|
2889
|
+
"tw:flex tw:items-center tw:gap-1 tw:text-xs tw:px-2 tw:py-1.5 tw:bg-ic-white-1s tw:hover:bg-ic-white-2s"
|
|
2890
|
+
),
|
|
2891
|
+
onMouseEnter: w,
|
|
2892
|
+
onMouseLeave: b,
|
|
2893
|
+
"aria-hidden": !0,
|
|
2894
|
+
children: [
|
|
2895
|
+
/* @__PURE__ */ n(W, { source: it }),
|
|
2896
|
+
/* @__PURE__ */ n("span", { className: "tw:flex-1 tw:truncate", children: rt(h) }),
|
|
2897
|
+
/* @__PURE__ */ n(ke, { open: r || a, orientation: "horizontal", children: /* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:gap-1", children: [
|
|
2898
|
+
/* @__PURE__ */ n(G, { onClick: x, children: /* @__PURE__ */ n(W, { source: dt }) }),
|
|
2899
|
+
/* @__PURE__ */ n(G, { onClick: s, children: /* @__PURE__ */ n(
|
|
2900
|
+
W,
|
|
2901
|
+
{
|
|
2902
|
+
className: j("tw:transition-transform", {
|
|
2903
|
+
"tw:-rotate-180": a
|
|
2904
|
+
}),
|
|
2905
|
+
source: ct
|
|
2906
|
+
}
|
|
2907
|
+
) })
|
|
2908
|
+
] }) })
|
|
2909
|
+
]
|
|
2910
|
+
}
|
|
2911
|
+
),
|
|
2912
|
+
/* @__PURE__ */ n(ke, { open: a, children: /* @__PURE__ */ n("div", { className: "tw:p-2 tw:flex tw:flex-col tw:gap-4", children: /* @__PURE__ */ n(L, { name: "Content", children: /* @__PURE__ */ n(
|
|
2913
|
+
ie,
|
|
2914
|
+
{
|
|
2915
|
+
onChange: C,
|
|
2916
|
+
value: i.dangerouslySetInnerHTML?.__html.toString() ?? "",
|
|
2917
|
+
mode: "onBlur"
|
|
2918
|
+
}
|
|
2919
|
+
) }) }) })
|
|
2920
|
+
]
|
|
2921
|
+
}
|
|
2922
|
+
) });
|
|
2923
|
+
}, za = () => {
|
|
2924
|
+
const { query: e, actions: o } = ne(), { id: r, tabListNode: t, tabContentNode: a } = Q((d) => {
|
|
2925
|
+
const l = d.data.nodes.find(
|
|
2926
|
+
(h) => he(e.node(h).get()) === y.TabList
|
|
2927
|
+
);
|
|
2928
|
+
if (!l)
|
|
2929
|
+
throw new Error("Tab list node not found");
|
|
2930
|
+
const c = d.data.nodes.find(
|
|
2931
|
+
(h) => he(e.node(h).get()) === y.TabContent
|
|
2932
|
+
);
|
|
2933
|
+
if (!c)
|
|
2934
|
+
throw new Error("Tab content node not found");
|
|
2935
|
+
return {
|
|
2936
|
+
tabListNode: e.node(l).get(),
|
|
2937
|
+
tabContentNode: e.node(c).get()
|
|
2938
|
+
};
|
|
2939
|
+
});
|
|
2940
|
+
return /* @__PURE__ */ u("div", { children: [
|
|
2941
|
+
/* @__PURE__ */ n(Qt, { onDragEnd: (d) => {
|
|
2942
|
+
const { source: l, destination: c } = d;
|
|
2943
|
+
if (!c || l.index === c.index) return;
|
|
2944
|
+
const h = t.data.nodes.at(l.index), g = a.data.nodes.at(l.index);
|
|
2945
|
+
h && g && (o.move({
|
|
2946
|
+
nodeId: h,
|
|
2947
|
+
sourceIndex: l.index,
|
|
2948
|
+
destinationIndex: c.index
|
|
2949
|
+
}), o.move({
|
|
2950
|
+
nodeId: g,
|
|
2951
|
+
sourceIndex: l.index,
|
|
2952
|
+
destinationIndex: c.index
|
|
2953
|
+
}));
|
|
2954
|
+
}, children: /* @__PURE__ */ n(en, { droppableId: r, children: (d) => /* @__PURE__ */ u("div", { ref: d.innerRef, ...d.droppableProps, className: "tw:flex tw:flex-col tw:gap-2", children: [
|
|
2955
|
+
t.data.nodes.map((l, c) => /* @__PURE__ */ n(Ma, { tabNodeId: l, tabIndex: c }, l)),
|
|
2956
|
+
d.placeholder
|
|
2957
|
+
] }) }) }),
|
|
2958
|
+
/* @__PURE__ */ n(K, { className: "tw:mt-2", onClick: () => {
|
|
2959
|
+
const d = e.parseReactElement(
|
|
2960
|
+
/* @__PURE__ */ n(
|
|
2961
|
+
V,
|
|
2962
|
+
{
|
|
2963
|
+
canvas: !0,
|
|
2964
|
+
is: Dt,
|
|
2965
|
+
dangerouslySetInnerHTML: {
|
|
2966
|
+
__html: "Tab (new)"
|
|
2967
|
+
}
|
|
2968
|
+
}
|
|
2969
|
+
)
|
|
2970
|
+
).toNodeTree();
|
|
2971
|
+
o.addNodeTree(d, t.id);
|
|
2972
|
+
const l = e.parseReactElement(/* @__PURE__ */ n(V, { canvas: !0, is: Ot })).toNodeTree();
|
|
2973
|
+
o.addNodeTree(l, a.id);
|
|
2974
|
+
}, fullWidth: !0, prefix: /* @__PURE__ */ n(W, { source: jt }), children: "Add more" })
|
|
2975
|
+
] });
|
|
2976
|
+
}, $a = () => {
|
|
2977
|
+
const { query: e } = ne(), { nodeProps: o, setNodeProps: r } = Tn(), { selectOptions: t } = Q((s) => {
|
|
2978
|
+
const i = s.data.nodes.find(
|
|
2979
|
+
(l) => he(e.node(l).get()) === y.TabList
|
|
2980
|
+
);
|
|
2981
|
+
if (!i)
|
|
2982
|
+
throw new Error("Tab list node not found");
|
|
2983
|
+
return {
|
|
2984
|
+
selectOptions: e.node(i).get().data.nodes.map((l, c) => ({
|
|
2985
|
+
value: c,
|
|
2986
|
+
label: e.node(l).get().data.props.dangerouslySetInnerHTML?.__html.toString() ?? "Tab"
|
|
2987
|
+
}))
|
|
2988
|
+
};
|
|
2989
|
+
}), a = (s) => {
|
|
2990
|
+
r({
|
|
2991
|
+
defaultActiveIndex: s
|
|
2992
|
+
});
|
|
2993
|
+
};
|
|
2994
|
+
return /* @__PURE__ */ n(L, { name: "Default active", children: /* @__PURE__ */ n(
|
|
2995
|
+
lt,
|
|
2996
|
+
{
|
|
2997
|
+
value: o.defaultActiveIndex ?? 0,
|
|
2998
|
+
options: t,
|
|
2999
|
+
placeholder: "Select a tab",
|
|
3000
|
+
onChange: a
|
|
3001
|
+
}
|
|
3002
|
+
) });
|
|
3003
|
+
}, Qs = () => {
|
|
3004
|
+
const { nodeProps: e, setNodeProps: o } = Tn(), { currentScreen: r, getResponsiveProp: t } = k(), a = (h, g = r) => {
|
|
3005
|
+
o({ sx: I(h, g) });
|
|
3006
|
+
}, s = {
|
|
3007
|
+
paddingBottom: t(e.sx ?? {}, "paddingBottom"),
|
|
3008
|
+
paddingLeft: t(e.sx ?? {}, "paddingLeft"),
|
|
3009
|
+
paddingRight: t(e.sx ?? {}, "paddingRight"),
|
|
3010
|
+
paddingTop: t(e.sx ?? {}, "paddingTop"),
|
|
3011
|
+
marginBottom: t(e.sx ?? {}, "marginBottom"),
|
|
3012
|
+
marginLeft: t(e.sx ?? {}, "marginLeft"),
|
|
3013
|
+
marginRight: t(e.sx ?? {}, "marginRight"),
|
|
3014
|
+
marginTop: t(e.sx ?? {}, "marginTop")
|
|
3015
|
+
}, i = {
|
|
3016
|
+
borderStyle: t(e.sx ?? {}, "borderStyle"),
|
|
3017
|
+
borderColor: t(e.sx ?? {}, "borderColor"),
|
|
3018
|
+
borderTopWidth: t(e.sx ?? {}, "borderTopWidth"),
|
|
3019
|
+
borderRightWidth: t(e.sx ?? {}, "borderRightWidth"),
|
|
3020
|
+
borderBottomWidth: t(e.sx ?? {}, "borderBottomWidth"),
|
|
3021
|
+
borderLeftWidth: t(e.sx ?? {}, "borderLeftWidth")
|
|
3022
|
+
}, d = {
|
|
3023
|
+
borderTopLeftRadius: t(e.sx ?? {}, "borderTopLeftRadius"),
|
|
3024
|
+
borderTopRightRadius: t(e.sx ?? {}, "borderTopRightRadius"),
|
|
3025
|
+
borderBottomRightRadius: t(e.sx ?? {}, "borderBottomRightRadius"),
|
|
3026
|
+
borderBottomLeftRadius: t(e.sx ?? {}, "borderBottomLeftRadius")
|
|
3027
|
+
}, l = {
|
|
3028
|
+
backgroundColor: t(e.sx ?? {}, "backgroundColor"),
|
|
3029
|
+
backgroundImage: t(e.sx ?? {}, "backgroundImage"),
|
|
3030
|
+
backgroundPosition: t(e.sx ?? {}, "backgroundPosition"),
|
|
3031
|
+
backgroundRepeat: t(e.sx ?? {}, "backgroundRepeat"),
|
|
3032
|
+
background: t(e.sx ?? {}, "background"),
|
|
3033
|
+
backgroundSize: t(e.sx ?? {}, "backgroundSize"),
|
|
3034
|
+
backgroundAttachment: t(e.sx ?? {}, "backgroundAttachment")
|
|
3035
|
+
}, c = {
|
|
3036
|
+
width: t(e.sx ?? {}, "width") ?? "auto"
|
|
3037
|
+
};
|
|
3038
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
3039
|
+
/* @__PURE__ */ u(D, { children: [
|
|
3040
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
3041
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
3042
|
+
] }),
|
|
3043
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
3044
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3045
|
+
/* @__PURE__ */ u(f, { name: "Items management", children: [
|
|
3046
|
+
/* @__PURE__ */ n(za, {}),
|
|
3047
|
+
/* @__PURE__ */ n($a, {})
|
|
3048
|
+
] }),
|
|
3049
|
+
/* @__PURE__ */ n(f, { name: "Size", children: /* @__PURE__ */ n(H, { onChange: a, value: c }) })
|
|
3050
|
+
] }),
|
|
3051
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3052
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: s, onChange: a }) }),
|
|
3053
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
3054
|
+
/* @__PURE__ */ n($, { value: i, onChange: a }),
|
|
3055
|
+
/* @__PURE__ */ n(z, { value: d, onChange: a })
|
|
3056
|
+
] }),
|
|
3057
|
+
/* @__PURE__ */ n(f, { name: "Background", children: /* @__PURE__ */ n(Z, { value: l, onChange: a }) })
|
|
3058
|
+
] })
|
|
3059
|
+
] })
|
|
3060
|
+
] });
|
|
3061
|
+
}, _a = (e) => E({
|
|
3062
|
+
nodeId: e
|
|
3063
|
+
}), qe = () => E({
|
|
3064
|
+
transform: Lo
|
|
3065
|
+
}), Ha = () => {
|
|
3066
|
+
const { nodeProps: e, setNodeProps: o } = qe(), r = (t) => {
|
|
3067
|
+
const a = isNaN(t.target.valueAsNumber) ? void 0 : t.target.valueAsNumber;
|
|
3068
|
+
o({
|
|
3069
|
+
autoplayOptions: {
|
|
3070
|
+
delay: a ?? e.autoplayOptions?.delay
|
|
3071
|
+
}
|
|
3072
|
+
});
|
|
3073
|
+
};
|
|
3074
|
+
return /* @__PURE__ */ n(L, { name: "Delay", children: /* @__PURE__ */ n(
|
|
3075
|
+
be,
|
|
3076
|
+
{
|
|
3077
|
+
value: e.autoplayOptions?.delay,
|
|
3078
|
+
classes: {
|
|
3079
|
+
container: "tw:w-1/2"
|
|
3080
|
+
},
|
|
3081
|
+
mode: "onBlur",
|
|
3082
|
+
onChange: r
|
|
3083
|
+
}
|
|
3084
|
+
) });
|
|
3085
|
+
}, Va = () => {
|
|
3086
|
+
const { nodeProps: e, setNodeProps: o } = qe(), r = (t) => {
|
|
3087
|
+
o({
|
|
3088
|
+
autoplayOptions: {
|
|
3089
|
+
stopOnLastSnap: !t.target.checked
|
|
3090
|
+
}
|
|
3091
|
+
});
|
|
3092
|
+
};
|
|
3093
|
+
return /* @__PURE__ */ n(L, { name: "Loop", children: /* @__PURE__ */ n(le, { checked: !e.autoplayOptions?.stopOnLastSnap, onChange: r }) });
|
|
3094
|
+
}, ja = () => {
|
|
3095
|
+
const { getResponsiveProp: e, currentScreen: o } = k(), { nodeProps: r, setNodeResponsiveProps: t } = qe(), a = e(r, "slidesPerView");
|
|
3096
|
+
return /* @__PURE__ */ n(L, { name: "Items per view", responsive: !0, children: /* @__PURE__ */ n(
|
|
3097
|
+
mo,
|
|
3098
|
+
{
|
|
3099
|
+
className: "tw:w-1/2",
|
|
3100
|
+
onChange: (i) => {
|
|
3101
|
+
t(
|
|
3102
|
+
{
|
|
3103
|
+
slidesPerView: i
|
|
3104
|
+
},
|
|
3105
|
+
o
|
|
3106
|
+
);
|
|
3107
|
+
},
|
|
3108
|
+
value: a,
|
|
3109
|
+
options: [
|
|
3110
|
+
{
|
|
3111
|
+
label: "auto",
|
|
3112
|
+
value: "auto"
|
|
3113
|
+
}
|
|
3114
|
+
]
|
|
3115
|
+
}
|
|
3116
|
+
) });
|
|
3117
|
+
}, ei = () => {
|
|
3118
|
+
const { nodeProps: e, setNodeResponsiveProps: o, setNodeProps: r } = qe(), { getResponsiveProp: t, currentScreen: a } = k(), s = (C, p = a) => {
|
|
3119
|
+
r({ sx: I(C, p) });
|
|
3120
|
+
}, i = () => /* @__PURE__ */ n(
|
|
3121
|
+
V,
|
|
3122
|
+
{
|
|
3123
|
+
custom: {
|
|
3124
|
+
displayName: "Slide new"
|
|
3125
|
+
},
|
|
3126
|
+
is: Ft,
|
|
3127
|
+
canvas: !0
|
|
3128
|
+
}
|
|
3129
|
+
), d = {
|
|
3130
|
+
columnGap: t(e, "spaceBetween") ?? 0
|
|
3131
|
+
}, l = ({ columnGap: C }) => {
|
|
3132
|
+
o({ spaceBetween: Qn(C) ? C : void 0 }, a);
|
|
3133
|
+
}, c = (C) => {
|
|
3134
|
+
r({
|
|
3135
|
+
autoplayOptions: {
|
|
3136
|
+
active: C.target.checked
|
|
3137
|
+
}
|
|
3138
|
+
});
|
|
3139
|
+
}, h = e.autoplayOptions?.active ?? !1, g = {
|
|
3140
|
+
paddingBottom: t(e.sx ?? {}, "paddingBottom"),
|
|
3141
|
+
paddingLeft: t(e.sx ?? {}, "paddingLeft"),
|
|
3142
|
+
paddingRight: t(e.sx ?? {}, "paddingRight"),
|
|
3143
|
+
paddingTop: t(e.sx ?? {}, "paddingTop"),
|
|
3144
|
+
marginBottom: t(e.sx ?? {}, "marginBottom"),
|
|
3145
|
+
marginLeft: t(e.sx ?? {}, "marginLeft"),
|
|
3146
|
+
marginRight: t(e.sx ?? {}, "marginRight"),
|
|
3147
|
+
marginTop: t(e.sx ?? {}, "marginTop")
|
|
3148
|
+
}, x = {
|
|
3149
|
+
borderStyle: t(e.sx ?? {}, "borderStyle"),
|
|
3150
|
+
borderColor: t(e.sx ?? {}, "borderColor"),
|
|
3151
|
+
borderTopWidth: t(e.sx ?? {}, "borderTopWidth"),
|
|
3152
|
+
borderRightWidth: t(e.sx ?? {}, "borderRightWidth"),
|
|
3153
|
+
borderBottomWidth: t(e.sx ?? {}, "borderBottomWidth"),
|
|
3154
|
+
borderLeftWidth: t(e.sx ?? {}, "borderLeftWidth")
|
|
3155
|
+
}, w = {
|
|
3156
|
+
borderTopLeftRadius: t(e.sx ?? {}, "borderTopLeftRadius"),
|
|
3157
|
+
borderTopRightRadius: t(e.sx ?? {}, "borderTopRightRadius"),
|
|
3158
|
+
borderBottomRightRadius: t(e.sx ?? {}, "borderBottomRightRadius"),
|
|
3159
|
+
borderBottomLeftRadius: t(e.sx ?? {}, "borderBottomLeftRadius")
|
|
3160
|
+
}, b = {
|
|
3161
|
+
backgroundColor: t(e.sx ?? {}, "backgroundColor"),
|
|
3162
|
+
backgroundImage: t(e.sx ?? {}, "backgroundImage"),
|
|
3163
|
+
backgroundPosition: t(e.sx ?? {}, "backgroundPosition"),
|
|
3164
|
+
backgroundRepeat: t(e.sx ?? {}, "backgroundRepeat"),
|
|
3165
|
+
background: t(e.sx ?? {}, "background"),
|
|
3166
|
+
backgroundSize: t(e.sx ?? {}, "backgroundSize"),
|
|
3167
|
+
backgroundAttachment: t(e.sx ?? {}, "backgroundAttachment")
|
|
3168
|
+
};
|
|
3169
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
3170
|
+
/* @__PURE__ */ u(D, { children: [
|
|
3171
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
3172
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
3173
|
+
] }),
|
|
3174
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
3175
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3176
|
+
/* @__PURE__ */ u(f, { name: "Display", children: [
|
|
3177
|
+
/* @__PURE__ */ n(ja, {}),
|
|
3178
|
+
/* @__PURE__ */ n(at, { value: d, onChange: l, name: "Items spacing" })
|
|
3179
|
+
] }),
|
|
3180
|
+
/* @__PURE__ */ n(f, { name: "Item management", children: /* @__PURE__ */ n(ve, { getNewNodeElement: i }) }),
|
|
3181
|
+
/* @__PURE__ */ n(
|
|
3182
|
+
f,
|
|
3183
|
+
{
|
|
3184
|
+
name: "Autoplay",
|
|
3185
|
+
slots: {
|
|
3186
|
+
right: /* @__PURE__ */ n(le, { onChange: c, checked: h })
|
|
3187
|
+
},
|
|
3188
|
+
children: h && /* @__PURE__ */ u(It, { children: [
|
|
3189
|
+
/* @__PURE__ */ n(Ha, {}),
|
|
3190
|
+
/* @__PURE__ */ n(Va, {})
|
|
3191
|
+
] })
|
|
3192
|
+
}
|
|
3193
|
+
)
|
|
3194
|
+
] }),
|
|
3195
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3196
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: g, onChange: s }) }),
|
|
3197
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
3198
|
+
/* @__PURE__ */ n($, { value: x, onChange: s }),
|
|
3199
|
+
/* @__PURE__ */ n(z, { value: w, onChange: s })
|
|
3200
|
+
] }),
|
|
3201
|
+
/* @__PURE__ */ n(f, { name: "Background", children: /* @__PURE__ */ n(Z, { value: b, onChange: s }) })
|
|
3202
|
+
] })
|
|
3203
|
+
] })
|
|
3204
|
+
] });
|
|
3205
|
+
}, Ua = () => E({
|
|
3206
|
+
transform: Po
|
|
3207
|
+
}), ti = () => {
|
|
3208
|
+
const { nodeProps: e, setNodeProps: o } = Ua(), { currentScreen: r, getResponsiveProp: t } = k(), a = (x, w = r) => {
|
|
3209
|
+
o({ sx: I(x, w) });
|
|
3210
|
+
}, s = {
|
|
3211
|
+
paddingBottom: t(e.sx ?? {}, "paddingBottom"),
|
|
3212
|
+
paddingLeft: t(e.sx ?? {}, "paddingLeft"),
|
|
3213
|
+
paddingRight: t(e.sx ?? {}, "paddingRight"),
|
|
3214
|
+
paddingTop: t(e.sx ?? {}, "paddingTop"),
|
|
3215
|
+
marginBottom: t(e.sx ?? {}, "marginBottom"),
|
|
3216
|
+
marginLeft: t(e.sx ?? {}, "marginLeft"),
|
|
3217
|
+
marginRight: t(e.sx ?? {}, "marginRight"),
|
|
3218
|
+
marginTop: t(e.sx ?? {}, "marginTop")
|
|
3219
|
+
}, i = {
|
|
3220
|
+
borderStyle: t(e.sx ?? {}, "borderStyle"),
|
|
3221
|
+
borderColor: t(e.sx ?? {}, "borderColor"),
|
|
3222
|
+
borderTopWidth: t(e.sx ?? {}, "borderTopWidth"),
|
|
3223
|
+
borderRightWidth: t(e.sx ?? {}, "borderRightWidth"),
|
|
3224
|
+
borderBottomWidth: t(e.sx ?? {}, "borderBottomWidth"),
|
|
3225
|
+
borderLeftWidth: t(e.sx ?? {}, "borderLeftWidth")
|
|
3226
|
+
}, d = {
|
|
3227
|
+
borderTopLeftRadius: t(e.sx ?? {}, "borderTopLeftRadius"),
|
|
3228
|
+
borderTopRightRadius: t(e.sx ?? {}, "borderTopRightRadius"),
|
|
3229
|
+
borderBottomRightRadius: t(e.sx ?? {}, "borderBottomRightRadius"),
|
|
3230
|
+
borderBottomLeftRadius: t(e.sx ?? {}, "borderBottomLeftRadius")
|
|
3231
|
+
}, l = () => /* @__PURE__ */ n(V, { canvas: !0, is: Mt }), c = {
|
|
3232
|
+
rowGap: t(e.sx ?? {}, "rowGap") ?? 0
|
|
3233
|
+
}, h = {
|
|
3234
|
+
width: t(e.sx ?? {}, "width")
|
|
3235
|
+
}, g = {
|
|
3236
|
+
alignItems: t(e.sx ?? {}, "alignItems")
|
|
3237
|
+
};
|
|
3238
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
3239
|
+
/* @__PURE__ */ u(D, { children: [
|
|
3240
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
3241
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
3242
|
+
] }),
|
|
3243
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
3244
|
+
/* @__PURE__ */ n(N, { children: /* @__PURE__ */ u(f, { name: "Layout", children: [
|
|
3245
|
+
/* @__PURE__ */ n(ve, { getNewNodeElement: l }),
|
|
3246
|
+
/* @__PURE__ */ n(Ce, { value: c, onChange: a }),
|
|
3247
|
+
/* @__PURE__ */ n(
|
|
3248
|
+
Kt,
|
|
3249
|
+
{
|
|
3250
|
+
blacklist: ["stretch"],
|
|
3251
|
+
flexDirection: "column",
|
|
3252
|
+
onChange: a,
|
|
3253
|
+
value: g
|
|
3254
|
+
}
|
|
3255
|
+
),
|
|
3256
|
+
/* @__PURE__ */ n(H, { onChange: a, value: h })
|
|
3257
|
+
] }) }),
|
|
3258
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3259
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: s, onChange: a }) }),
|
|
3260
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
3261
|
+
/* @__PURE__ */ n($, { value: i, onChange: a }),
|
|
3262
|
+
/* @__PURE__ */ n(z, { value: d, onChange: a })
|
|
3263
|
+
] })
|
|
3264
|
+
] })
|
|
3265
|
+
] })
|
|
3266
|
+
] });
|
|
3267
|
+
}, Ga = () => E({
|
|
3268
|
+
transform: ko
|
|
3269
|
+
}), ni = () => {
|
|
3270
|
+
const { nodeProps: e, setNodeProps: o, setNodeResponsiveProps: r } = Ga(), { currentScreen: t, getResponsiveProp: a } = k(), s = (b, C = t) => {
|
|
3271
|
+
o({
|
|
3272
|
+
sx: I(b, C)
|
|
3273
|
+
});
|
|
3274
|
+
}, i = {
|
|
3275
|
+
color: a(e.sx ?? {}, "color", "xs")
|
|
3276
|
+
}, d = (b) => {
|
|
3277
|
+
s(b, "xs");
|
|
3278
|
+
}, l = {
|
|
3279
|
+
paddingBottom: a(e.sx ?? {}, "paddingBottom"),
|
|
3280
|
+
paddingLeft: a(e.sx ?? {}, "paddingLeft"),
|
|
3281
|
+
paddingRight: a(e.sx ?? {}, "paddingRight"),
|
|
3282
|
+
paddingTop: a(e.sx ?? {}, "paddingTop"),
|
|
3283
|
+
marginBottom: a(e.sx ?? {}, "marginBottom"),
|
|
3284
|
+
marginLeft: a(e.sx ?? {}, "marginLeft"),
|
|
3285
|
+
marginRight: a(e.sx ?? {}, "marginRight"),
|
|
3286
|
+
marginTop: a(e.sx ?? {}, "marginTop")
|
|
3287
|
+
}, c = {
|
|
3288
|
+
borderStyle: a(e.sx ?? {}, "borderStyle"),
|
|
3289
|
+
borderColor: a(e.sx ?? {}, "borderColor"),
|
|
3290
|
+
borderTopWidth: a(e.sx ?? {}, "borderTopWidth"),
|
|
3291
|
+
borderRightWidth: a(e.sx ?? {}, "borderRightWidth"),
|
|
3292
|
+
borderBottomWidth: a(e.sx ?? {}, "borderBottomWidth"),
|
|
3293
|
+
borderLeftWidth: a(e.sx ?? {}, "borderLeftWidth")
|
|
3294
|
+
}, h = {
|
|
3295
|
+
borderTopLeftRadius: a(e.sx ?? {}, "borderTopLeftRadius"),
|
|
3296
|
+
borderTopRightRadius: a(e.sx ?? {}, "borderTopRightRadius"),
|
|
3297
|
+
borderBottomRightRadius: a(e.sx ?? {}, "borderBottomRightRadius"),
|
|
3298
|
+
borderBottomLeftRadius: a(e.sx ?? {}, "borderBottomLeftRadius")
|
|
3299
|
+
}, g = (b) => {
|
|
3300
|
+
o({
|
|
3301
|
+
source: b
|
|
3302
|
+
});
|
|
3303
|
+
}, x = tt(a(e, "size")), w = (b) => {
|
|
3304
|
+
r(
|
|
3305
|
+
{
|
|
3306
|
+
size: t === "xs" ? b ?? x ?? 24 : b
|
|
3307
|
+
},
|
|
3308
|
+
t
|
|
3309
|
+
);
|
|
3310
|
+
};
|
|
3311
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
3312
|
+
/* @__PURE__ */ u(D, { children: [
|
|
3313
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
3314
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
3315
|
+
] }),
|
|
3316
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
3317
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3318
|
+
/* @__PURE__ */ n(f, { name: "Source", children: /* @__PURE__ */ n(Ie, { onChange: g, source: e.source }) }),
|
|
3319
|
+
/* @__PURE__ */ u(f, { name: "Color & Size", children: [
|
|
3320
|
+
/* @__PURE__ */ n(ge, { value: i, onChange: d }),
|
|
3321
|
+
/* @__PURE__ */ n(Be, { value: x, name: "Size (px)", onChange: w })
|
|
3322
|
+
] })
|
|
3323
|
+
] }),
|
|
3324
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3325
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: l, onChange: s }) }),
|
|
3326
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
3327
|
+
/* @__PURE__ */ n($, { value: c, onChange: s }),
|
|
3328
|
+
/* @__PURE__ */ n(z, { value: h, onChange: s })
|
|
3329
|
+
] })
|
|
3330
|
+
] })
|
|
3331
|
+
] })
|
|
3332
|
+
] });
|
|
3333
|
+
}, qa = (e) => E({
|
|
3334
|
+
transform: Bo,
|
|
3335
|
+
nodeId: e
|
|
3336
|
+
}), Je = () => E({
|
|
3337
|
+
transform: Io
|
|
3338
|
+
}), Ja = ({ accordionNodeId: e, accordionIndex: o }) => {
|
|
3339
|
+
const [r, t] = U(!1), [a, s] = Xt(o === 0), { id: i, nodeProps: d } = Je(), { query: l, accordionNode: c, actions: h } = ne((P) => ({
|
|
3340
|
+
accordionNode: P.nodes[e]
|
|
3341
|
+
})), { nodeProps: g, setNodeProps: x } = qa(e), [w, b] = U(
|
|
3342
|
+
c.dom ? Te(c.dom).openState : !1
|
|
3343
|
+
), C = () => {
|
|
3344
|
+
t(!0);
|
|
3345
|
+
}, p = () => {
|
|
3346
|
+
t(!1);
|
|
3347
|
+
}, v = (P) => {
|
|
3348
|
+
P.stopPropagation(), h.delete(c.id);
|
|
3349
|
+
}, R = () => {
|
|
3350
|
+
const P = c.dom;
|
|
3351
|
+
if (!P) return;
|
|
3352
|
+
const { openState: B } = Te(P);
|
|
3353
|
+
P.setAttribute(ot.OpenState, B ? X.False : X.True);
|
|
3354
|
+
};
|
|
3355
|
+
we(() => {
|
|
3356
|
+
const P = new MutationObserver((B) => {
|
|
3357
|
+
const _ = B.at(0)?.target;
|
|
3358
|
+
ee(_) || b(Te(_).openState);
|
|
3359
|
+
});
|
|
3360
|
+
return c.dom && (b(Te(c.dom).openState), P.observe(c.dom, {
|
|
3361
|
+
attributes: !0,
|
|
3362
|
+
attributeFilter: [ot.OpenState]
|
|
3363
|
+
})), () => {
|
|
3364
|
+
P.disconnect();
|
|
3365
|
+
};
|
|
3366
|
+
}, [c.dom]);
|
|
3367
|
+
const S = (P) => {
|
|
3368
|
+
x({
|
|
3369
|
+
defaultOpen: P.target.checked
|
|
3370
|
+
}), d.openMode === "single" && P.target.checked && l.node(i).childNodes().forEach((B) => {
|
|
3371
|
+
B !== e && h.setProp(B, (_) => {
|
|
3372
|
+
delete _.defaultOpen;
|
|
3373
|
+
});
|
|
3374
|
+
});
|
|
3375
|
+
};
|
|
3376
|
+
return /* @__PURE__ */ n(tn, { index: o, draggableId: o.toString(), children: (P) => /* @__PURE__ */ u(
|
|
3377
|
+
"div",
|
|
3378
|
+
{
|
|
3379
|
+
className: "tw:rounded-lg tw:border tw:border-ic-white-2s tw:overflow-hidden",
|
|
3380
|
+
ref: P.innerRef,
|
|
3381
|
+
...P.draggableProps,
|
|
3382
|
+
...P.dragHandleProps,
|
|
3383
|
+
children: [
|
|
3384
|
+
/* @__PURE__ */ u(
|
|
3385
|
+
"div",
|
|
3386
|
+
{
|
|
3387
|
+
className: j(
|
|
3388
|
+
"tw:flex tw:items-center tw:gap-1 tw:text-xs tw:px-2 tw:py-1.5 tw:bg-ic-white-1s tw:hover:bg-ic-white-2s"
|
|
3389
|
+
),
|
|
3390
|
+
onMouseEnter: C,
|
|
3391
|
+
onMouseLeave: p,
|
|
3392
|
+
"aria-hidden": !0,
|
|
3393
|
+
children: [
|
|
3394
|
+
/* @__PURE__ */ n(W, { source: it }),
|
|
3395
|
+
/* @__PURE__ */ n("span", { className: "tw:flex-1 tw:truncate", children: "Item" }),
|
|
3396
|
+
/* @__PURE__ */ n(ke, { open: r || a, orientation: "horizontal", children: /* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:gap-1", children: [
|
|
3397
|
+
/* @__PURE__ */ n(G, { onClick: v, children: /* @__PURE__ */ n(W, { source: dt }) }),
|
|
3398
|
+
/* @__PURE__ */ n(G, { onClick: s, children: /* @__PURE__ */ n(
|
|
3399
|
+
W,
|
|
3400
|
+
{
|
|
3401
|
+
className: j("tw:transition-transform", {
|
|
3402
|
+
"tw:-rotate-180": a
|
|
3403
|
+
}),
|
|
3404
|
+
source: ct
|
|
3405
|
+
}
|
|
3406
|
+
) })
|
|
3407
|
+
] }) })
|
|
3408
|
+
]
|
|
3409
|
+
}
|
|
3410
|
+
),
|
|
3411
|
+
/* @__PURE__ */ n(ke, { open: a, children: /* @__PURE__ */ u("div", { className: "tw:p-2 tw:flex tw:flex-col tw:gap-4", children: [
|
|
3412
|
+
/* @__PURE__ */ n(L, { name: "Default open", children: /* @__PURE__ */ n(le, { onChange: S, checked: g.defaultOpen ?? !1 }) }),
|
|
3413
|
+
/* @__PURE__ */ n(K, { onClick: R, children: w ? "Close" : "Open" })
|
|
3414
|
+
] }) })
|
|
3415
|
+
]
|
|
3416
|
+
}
|
|
3417
|
+
) });
|
|
3418
|
+
}, Ka = () => {
|
|
3419
|
+
const { query: e, actions: o } = ne(), { id: r, accordionNodeIds: t } = Q((i) => ({
|
|
3420
|
+
accordionNodeIds: i.data.nodes
|
|
3421
|
+
}));
|
|
3422
|
+
return /* @__PURE__ */ u("div", { children: [
|
|
3423
|
+
/* @__PURE__ */ n(Qt, { onDragEnd: (i) => {
|
|
3424
|
+
const { source: d, destination: l } = i;
|
|
3425
|
+
if (!l || d.index === l.index) return;
|
|
3426
|
+
const c = t.at(d.index);
|
|
3427
|
+
c && o.move({
|
|
3428
|
+
nodeId: c,
|
|
3429
|
+
sourceIndex: d.index,
|
|
3430
|
+
destinationIndex: l.index
|
|
3431
|
+
});
|
|
3432
|
+
}, children: /* @__PURE__ */ n(en, { droppableId: r, children: (i) => /* @__PURE__ */ u("div", { ref: i.innerRef, ...i.droppableProps, className: "tw:flex tw:flex-col tw:gap-2", children: [
|
|
3433
|
+
t.map((d, l) => /* @__PURE__ */ n(Ja, { accordionNodeId: d, accordionIndex: l }, d)),
|
|
3434
|
+
i.placeholder
|
|
3435
|
+
] }) }) }),
|
|
3436
|
+
/* @__PURE__ */ n(K, { className: "tw:mt-2", onClick: () => {
|
|
3437
|
+
const i = e.parseReactElement(
|
|
3438
|
+
/* @__PURE__ */ u(V, { is: zt, children: [
|
|
3439
|
+
/* @__PURE__ */ n(V, { is: $t, children: /* @__PURE__ */ n(V, { sizeVariant: "base", is: et, dangerouslySetInnerHTML: { __html: "Accordion (new)" } }) }),
|
|
3440
|
+
/* @__PURE__ */ n(V, { is: _t, children: /* @__PURE__ */ n(
|
|
3441
|
+
V,
|
|
3442
|
+
{
|
|
3443
|
+
sx: {
|
|
3444
|
+
paddingTop: 8,
|
|
3445
|
+
paddingBottom: 8
|
|
3446
|
+
},
|
|
3447
|
+
is: et,
|
|
3448
|
+
dangerouslySetInnerHTML: { __html: "Content for accordion (new)" }
|
|
3449
|
+
}
|
|
3450
|
+
) })
|
|
3451
|
+
] })
|
|
3452
|
+
).toNodeTree();
|
|
3453
|
+
o.addNodeTree(i, r);
|
|
3454
|
+
}, fullWidth: !0, prefix: /* @__PURE__ */ n(W, { source: jt }), children: "Add more" })
|
|
3455
|
+
] });
|
|
3456
|
+
}, Ya = () => {
|
|
3457
|
+
const { nodeProps: e, setNodeProps: o } = Je(), [r, t] = U(!1), a = e.accordionSummaryProps?.expandIcon, s = (h) => {
|
|
3458
|
+
o({
|
|
3459
|
+
accordionSummaryProps: {
|
|
3460
|
+
expandIcon: {
|
|
3461
|
+
source: {
|
|
3462
|
+
expanded: h
|
|
3463
|
+
}
|
|
3464
|
+
}
|
|
3465
|
+
}
|
|
3466
|
+
});
|
|
3467
|
+
}, i = (h) => {
|
|
3468
|
+
o({
|
|
3469
|
+
accordionSummaryProps: {
|
|
3470
|
+
expandIcon: {
|
|
3471
|
+
source: {
|
|
3472
|
+
collapsed: h
|
|
3473
|
+
}
|
|
3474
|
+
}
|
|
3475
|
+
}
|
|
3476
|
+
});
|
|
3477
|
+
}, d = (h) => {
|
|
3478
|
+
o({
|
|
3479
|
+
accordionSummaryProps: {
|
|
3480
|
+
expandIcon: {
|
|
3481
|
+
position: h
|
|
3482
|
+
}
|
|
3483
|
+
}
|
|
3484
|
+
});
|
|
3485
|
+
}, l = (h) => {
|
|
3486
|
+
const g = isNaN(h.target.valueAsNumber) ? void 0 : h.target.valueAsNumber;
|
|
3487
|
+
o({
|
|
3488
|
+
accordionSummaryProps: {
|
|
3489
|
+
expandIcon: {
|
|
3490
|
+
size: g
|
|
3491
|
+
}
|
|
3492
|
+
}
|
|
3493
|
+
});
|
|
3494
|
+
}, c = (h) => {
|
|
3495
|
+
o({
|
|
3496
|
+
accordionSummaryProps: {
|
|
3497
|
+
expandIcon: {
|
|
3498
|
+
sx: {
|
|
3499
|
+
color: h
|
|
3500
|
+
}
|
|
3501
|
+
}
|
|
3502
|
+
}
|
|
3503
|
+
});
|
|
3504
|
+
};
|
|
3505
|
+
return /* @__PURE__ */ n(L, { name: "Expand icon", children: /* @__PURE__ */ u(Ae, { placement: "right", open: r, onOpenChange: t, children: [
|
|
3506
|
+
/* @__PURE__ */ n(De, { children: /* @__PURE__ */ u(
|
|
3507
|
+
"button",
|
|
3508
|
+
{
|
|
3509
|
+
className: j("tw:flex tw:items-center tw:gap-2 tw:w-1/2 tw:rounded-md tw:h-8 tw:px-2 tw:bg-ic-white-1s", {
|
|
3510
|
+
"tw:bg-ic-black-7s": r
|
|
3511
|
+
}),
|
|
3512
|
+
children: [
|
|
3513
|
+
/* @__PURE__ */ n("div", { className: "tw:mx-auto", children: /* @__PURE__ */ n(W, { source: a?.source.expanded ?? "" }) }),
|
|
3514
|
+
/* @__PURE__ */ n("div", { className: "tw:px-2 tw:text-xs tw:text-ic-white-2s", children: "|" }),
|
|
3515
|
+
/* @__PURE__ */ n("div", { className: "tw:mx-auto", children: /* @__PURE__ */ n(W, { source: a?.source.collapsed ?? "" }) })
|
|
3516
|
+
]
|
|
3517
|
+
}
|
|
3518
|
+
) }),
|
|
3519
|
+
/* @__PURE__ */ n(Oe, { children: /* @__PURE__ */ u("div", { style: { width: 280 }, children: [
|
|
3520
|
+
/* @__PURE__ */ u("div", { className: "tw:flex tw:items-center tw:gap-2", children: [
|
|
3521
|
+
/* @__PURE__ */ n("p", { className: "tw:flex-1 tw:font-medium", children: "Expand icon" }),
|
|
3522
|
+
/* @__PURE__ */ n(He, { children: /* @__PURE__ */ n(G, { children: /* @__PURE__ */ n(W, { source: Fe }) }) })
|
|
3523
|
+
] }),
|
|
3524
|
+
/* @__PURE__ */ n("hr", { className: "tw:my-2 tw:border-ic-white-1s" }),
|
|
3525
|
+
/* @__PURE__ */ u("div", { className: "tw:space-y-4", children: [
|
|
3526
|
+
/* @__PURE__ */ n(
|
|
3527
|
+
Ie,
|
|
3528
|
+
{
|
|
3529
|
+
source: a?.source.expanded ?? "",
|
|
3530
|
+
name: "When expanded",
|
|
3531
|
+
onChange: s
|
|
3532
|
+
}
|
|
3533
|
+
),
|
|
3534
|
+
/* @__PURE__ */ n(
|
|
3535
|
+
Ie,
|
|
3536
|
+
{
|
|
3537
|
+
onChange: i,
|
|
3538
|
+
source: a?.source.collapsed ?? "",
|
|
3539
|
+
name: "When collapsed"
|
|
3540
|
+
}
|
|
3541
|
+
),
|
|
3542
|
+
/* @__PURE__ */ n(L, { name: "Position", children: /* @__PURE__ */ u(_e, { value: a?.position, onSelectionChange: d, children: [
|
|
3543
|
+
/* @__PURE__ */ n(K, { value: "left", size: "28", children: "Left" }),
|
|
3544
|
+
/* @__PURE__ */ n(K, { value: "right", size: "28", children: "Right" })
|
|
3545
|
+
] }) }),
|
|
3546
|
+
/* @__PURE__ */ n(L, { name: "Size", children: /* @__PURE__ */ n(
|
|
3547
|
+
be,
|
|
3548
|
+
{
|
|
3549
|
+
mode: "onBlur",
|
|
3550
|
+
value: a?.size ?? 24,
|
|
3551
|
+
onChange: l,
|
|
3552
|
+
step: 1,
|
|
3553
|
+
className: "tw:text-center",
|
|
3554
|
+
classes: { container: "tw:w-1/2" }
|
|
3555
|
+
}
|
|
3556
|
+
) }),
|
|
3557
|
+
/* @__PURE__ */ n(L, { name: "Color", children: /* @__PURE__ */ n(Zt, { color: a?.sx?.color, onChange: c }) })
|
|
3558
|
+
] })
|
|
3559
|
+
] }) })
|
|
3560
|
+
] }) });
|
|
3561
|
+
}, Za = () => {
|
|
3562
|
+
const { id: e, nodeProps: o, setNodeProps: r } = Je(), { query: t } = ne(), a = [
|
|
3563
|
+
{
|
|
3564
|
+
value: "single",
|
|
3565
|
+
label: "Single"
|
|
3566
|
+
},
|
|
3567
|
+
{
|
|
3568
|
+
value: "multiple",
|
|
3569
|
+
label: "Multiple"
|
|
3570
|
+
}
|
|
3571
|
+
], s = (i) => {
|
|
3572
|
+
r({
|
|
3573
|
+
openMode: i
|
|
3574
|
+
}), i === "single" && t.node(e).childNodes().forEach((d) => {
|
|
3575
|
+
const l = t.node(d).get().dom;
|
|
3576
|
+
l && l.setAttribute(ot.OpenState, X.False);
|
|
3577
|
+
});
|
|
3578
|
+
};
|
|
3579
|
+
return /* @__PURE__ */ n(L, { name: "Open mode", children: /* @__PURE__ */ n(_e, { value: o.openMode, onSelectionChange: s, children: a.map((i) => /* @__PURE__ */ n(K, { value: i.value, children: i.label }, i.value)) }) });
|
|
3580
|
+
}, oi = () => {
|
|
3581
|
+
const { nodeProps: e, setNodeProps: o } = Je(), { getResponsiveProp: r, currentScreen: t } = k(), a = (b, C = t) => {
|
|
3582
|
+
o({ sx: I(b, C) });
|
|
3583
|
+
}, s = {
|
|
3584
|
+
paddingBottom: r(e.sx ?? {}, "paddingBottom") ?? e.sx?.paddingBottom,
|
|
3585
|
+
paddingLeft: r(e.sx ?? {}, "paddingLeft") ?? e.sx?.paddingLeft,
|
|
3586
|
+
paddingRight: r(e.sx ?? {}, "paddingRight") ?? e.sx?.paddingRight,
|
|
3587
|
+
paddingTop: r(e.sx ?? {}, "paddingTop") ?? e.sx?.paddingTop,
|
|
3588
|
+
marginBottom: r(e.sx ?? {}, "marginBottom") ?? e.sx?.marginBottom,
|
|
3589
|
+
marginLeft: r(e.sx ?? {}, "marginLeft") ?? e.sx?.marginLeft,
|
|
3590
|
+
marginRight: r(e.sx ?? {}, "marginRight") ?? e.sx?.marginRight,
|
|
3591
|
+
marginTop: r(e.sx ?? {}, "marginTop") ?? e.sx?.marginTop
|
|
3592
|
+
}, i = {
|
|
3593
|
+
rowGap: r(e.sx ?? {}, "rowGap") ?? e.sx?.rowGap ?? 0
|
|
3594
|
+
}, d = {
|
|
3595
|
+
width: r(e.sx ?? {}, "width") ?? e.sx?.width
|
|
3596
|
+
}, l = (b, C = t) => {
|
|
3597
|
+
o({
|
|
3598
|
+
accordionSummaryProps: {
|
|
3599
|
+
[C]: {
|
|
3600
|
+
css: b
|
|
3601
|
+
}
|
|
3602
|
+
}
|
|
3603
|
+
});
|
|
3604
|
+
}, c = e.accordionSummaryProps ?? {}, h = {
|
|
3605
|
+
paddingTop: r(c.sx ?? {}, "paddingTop"),
|
|
3606
|
+
paddingLeft: r(c.sx ?? {}, "paddingLeft"),
|
|
3607
|
+
paddingRight: r(c.sx ?? {}, "paddingRight"),
|
|
3608
|
+
paddingBottom: r(c.sx ?? {}, "paddingBottom")
|
|
3609
|
+
}, g = (b, C = t) => {
|
|
3610
|
+
o({
|
|
3611
|
+
accordionContentProps: {
|
|
3612
|
+
[C]: {
|
|
3613
|
+
css: b
|
|
3614
|
+
}
|
|
3615
|
+
}
|
|
3616
|
+
});
|
|
3617
|
+
}, x = e.accordionContentProps ?? {}, w = {
|
|
3618
|
+
paddingTop: r(x.sx ?? {}, "paddingTop"),
|
|
3619
|
+
paddingLeft: r(x.sx ?? {}, "paddingLeft"),
|
|
3620
|
+
paddingRight: r(x.sx ?? {}, "paddingRight"),
|
|
3621
|
+
paddingBottom: r(x.sx ?? {}, "paddingBottom")
|
|
3622
|
+
};
|
|
3623
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
3624
|
+
/* @__PURE__ */ u(D, { children: [
|
|
3625
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
3626
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
3627
|
+
] }),
|
|
3628
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
3629
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3630
|
+
/* @__PURE__ */ u(f, { name: "Items management", children: [
|
|
3631
|
+
/* @__PURE__ */ n(Ka, {}),
|
|
3632
|
+
/* @__PURE__ */ n(Za, {}),
|
|
3633
|
+
/* @__PURE__ */ n(Ce, { value: i, onChange: a })
|
|
3634
|
+
] }),
|
|
3635
|
+
/* @__PURE__ */ u(f, { name: "Item header", children: [
|
|
3636
|
+
/* @__PURE__ */ n(nt, { value: h, onChange: l }),
|
|
3637
|
+
/* @__PURE__ */ n(Ya, {})
|
|
3638
|
+
] }),
|
|
3639
|
+
/* @__PURE__ */ n(f, { name: "Item content", children: /* @__PURE__ */ n(nt, { value: w, onChange: g }) }),
|
|
3640
|
+
/* @__PURE__ */ n(f, { name: "Size", children: /* @__PURE__ */ n(H, { value: d, onChange: a }) })
|
|
3641
|
+
] }),
|
|
3642
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3643
|
+
/* @__PURE__ */ n(f, { name: "Display on", children: /* @__PURE__ */ n(Y, {}) }),
|
|
3644
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: s, onChange: a }) })
|
|
3645
|
+
] })
|
|
3646
|
+
] })
|
|
3647
|
+
] });
|
|
3648
|
+
}, Xa = () => E({
|
|
3649
|
+
transform: Wo
|
|
3650
|
+
}), ri = () => {
|
|
3651
|
+
const { currentScreen: e, getResponsiveProp: o } = k(), { nodeProps: r, setNodeProps: t } = Xa(), a = {
|
|
3652
|
+
aspectRatio: o(r.sx ?? {}, "aspectRatio")
|
|
3653
|
+
}, s = (w, b = e) => {
|
|
3654
|
+
t({ sx: I(w, b) });
|
|
3655
|
+
}, i = {
|
|
3656
|
+
width: o(r.sx ?? {}, "width")
|
|
3657
|
+
}, d = {
|
|
3658
|
+
paddingBottom: o(r.sx ?? {}, "paddingBottom"),
|
|
3659
|
+
paddingLeft: o(r.sx ?? {}, "paddingLeft"),
|
|
3660
|
+
paddingRight: o(r.sx ?? {}, "paddingRight"),
|
|
3661
|
+
paddingTop: o(r.sx ?? {}, "paddingTop"),
|
|
3662
|
+
marginBottom: o(r.sx ?? {}, "marginBottom"),
|
|
3663
|
+
marginLeft: o(r.sx ?? {}, "marginLeft"),
|
|
3664
|
+
marginRight: o(r.sx ?? {}, "marginRight"),
|
|
3665
|
+
marginTop: o(r.sx ?? {}, "marginTop")
|
|
3666
|
+
}, l = {
|
|
3667
|
+
borderStyle: o(r.sx ?? {}, "borderStyle"),
|
|
3668
|
+
borderColor: o(r.sx ?? {}, "borderColor"),
|
|
3669
|
+
borderTopWidth: o(r.sx ?? {}, "borderTopWidth"),
|
|
3670
|
+
borderRightWidth: o(r.sx ?? {}, "borderRightWidth"),
|
|
3671
|
+
borderBottomWidth: o(r.sx ?? {}, "borderBottomWidth"),
|
|
3672
|
+
borderLeftWidth: o(r.sx ?? {}, "borderLeftWidth")
|
|
3673
|
+
}, c = {
|
|
3674
|
+
borderTopLeftRadius: o(r.sx ?? {}, "borderTopLeftRadius"),
|
|
3675
|
+
borderTopRightRadius: o(r.sx ?? {}, "borderTopRightRadius"),
|
|
3676
|
+
borderBottomRightRadius: o(r.sx ?? {}, "borderBottomRightRadius"),
|
|
3677
|
+
borderBottomLeftRadius: o(r.sx ?? {}, "borderBottomLeftRadius")
|
|
3678
|
+
}, h = (w) => {
|
|
3679
|
+
try {
|
|
3680
|
+
const b = new URL(w.target.value);
|
|
3681
|
+
t({
|
|
3682
|
+
src: b.toString()
|
|
3683
|
+
});
|
|
3684
|
+
} catch {
|
|
3685
|
+
}
|
|
3686
|
+
}, g = r.light ?? "", x = (w) => {
|
|
3687
|
+
try {
|
|
3688
|
+
const b = new URL(w.target.value);
|
|
3689
|
+
t({
|
|
3690
|
+
light: b.toString()
|
|
3691
|
+
});
|
|
3692
|
+
} catch {
|
|
3693
|
+
}
|
|
3694
|
+
};
|
|
3695
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
3696
|
+
/* @__PURE__ */ u(D, { children: [
|
|
3697
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
3698
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
3699
|
+
] }),
|
|
3700
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
3701
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3702
|
+
/* @__PURE__ */ u(f, { name: "Video source", children: [
|
|
3703
|
+
/* @__PURE__ */ n(L, { name: "Video link", children: /* @__PURE__ */ n(
|
|
3704
|
+
ie,
|
|
3705
|
+
{
|
|
3706
|
+
mode: "onBlur",
|
|
3707
|
+
classes: { container: "tw:w-1/2" },
|
|
3708
|
+
placeholder: "https://example.com/video.mp4",
|
|
3709
|
+
onChange: h,
|
|
3710
|
+
value: r.src
|
|
3711
|
+
}
|
|
3712
|
+
) }),
|
|
3713
|
+
xe(g) && /* @__PURE__ */ n(L, { name: "Thumbnail", children: /* @__PURE__ */ n(
|
|
3714
|
+
ie,
|
|
3715
|
+
{
|
|
3716
|
+
mode: "onBlur",
|
|
3717
|
+
classes: { container: "tw:w-1/2" },
|
|
3718
|
+
placeholder: "https://example.com/thumbnail.jpg",
|
|
3719
|
+
onChange: x,
|
|
3720
|
+
value: g
|
|
3721
|
+
}
|
|
3722
|
+
) })
|
|
3723
|
+
] }),
|
|
3724
|
+
/* @__PURE__ */ u(f, { name: "Size", children: [
|
|
3725
|
+
/* @__PURE__ */ n(H, { value: i ?? "", onChange: s }),
|
|
3726
|
+
/* @__PURE__ */ n(
|
|
3727
|
+
fo,
|
|
3728
|
+
{
|
|
3729
|
+
suggestOptions: [
|
|
3730
|
+
{
|
|
3731
|
+
label: "Square",
|
|
3732
|
+
value: "1 / 1"
|
|
3733
|
+
},
|
|
3734
|
+
{ label: "16 / 9", value: "16 / 9" }
|
|
3735
|
+
],
|
|
3736
|
+
value: a,
|
|
3737
|
+
onChange: s
|
|
3738
|
+
}
|
|
3739
|
+
)
|
|
3740
|
+
] })
|
|
3741
|
+
] }),
|
|
3742
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3743
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: d, onChange: s }) }),
|
|
3744
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
3745
|
+
/* @__PURE__ */ n($, { value: l, onChange: s }),
|
|
3746
|
+
/* @__PURE__ */ n(z, { value: c, onChange: s })
|
|
3747
|
+
] })
|
|
3748
|
+
] })
|
|
3749
|
+
] })
|
|
3750
|
+
] });
|
|
3751
|
+
}, Qa = () => E({
|
|
3752
|
+
transform: Eo
|
|
3753
|
+
}), ai = () => {
|
|
3754
|
+
const { nodeProps: e, setNodeProps: o } = Qa(), { getResponsiveProp: r, currentScreen: t } = k(), a = (g, x = t) => {
|
|
3755
|
+
o({ sx: I(g, x) });
|
|
3756
|
+
}, s = {
|
|
3757
|
+
paddingBottom: r(e.sx ?? {}, "paddingBottom"),
|
|
3758
|
+
paddingLeft: r(e.sx ?? {}, "paddingLeft"),
|
|
3759
|
+
paddingRight: r(e.sx ?? {}, "paddingRight"),
|
|
3760
|
+
paddingTop: r(e.sx ?? {}, "paddingTop"),
|
|
3761
|
+
marginBottom: r(e.sx ?? {}, "marginBottom"),
|
|
3762
|
+
marginLeft: r(e.sx ?? {}, "marginLeft"),
|
|
3763
|
+
marginRight: r(e.sx ?? {}, "marginRight"),
|
|
3764
|
+
marginTop: r(e.sx ?? {}, "marginTop")
|
|
3765
|
+
}, i = {
|
|
3766
|
+
backgroundColor: r(e.sx ?? {}, "backgroundColor"),
|
|
3767
|
+
backgroundImage: r(e.sx ?? {}, "backgroundImage"),
|
|
3768
|
+
backgroundPosition: r(e.sx ?? {}, "backgroundPosition"),
|
|
3769
|
+
backgroundRepeat: r(e.sx ?? {}, "backgroundRepeat"),
|
|
3770
|
+
background: r(e.sx ?? {}, "background"),
|
|
3771
|
+
backgroundSize: r(e.sx ?? {}, "backgroundSize"),
|
|
3772
|
+
backgroundAttachment: r(e.sx ?? {}, "backgroundAttachment")
|
|
3773
|
+
}, d = {
|
|
3774
|
+
width: r(e.sx ?? {}, "width") ?? "auto"
|
|
3775
|
+
}, l = {
|
|
3776
|
+
height: r(e.sx ?? {}, "height") ?? "auto"
|
|
3777
|
+
}, c = {
|
|
3778
|
+
borderStyle: r(e.sx ?? {}, "borderStyle"),
|
|
3779
|
+
borderColor: r(e.sx ?? {}, "borderColor"),
|
|
3780
|
+
borderTopWidth: r(e.sx ?? {}, "borderTopWidth"),
|
|
3781
|
+
borderRightWidth: r(e.sx ?? {}, "borderRightWidth"),
|
|
3782
|
+
borderBottomWidth: r(e.sx ?? {}, "borderBottomWidth"),
|
|
3783
|
+
borderLeftWidth: r(e.sx ?? {}, "borderLeftWidth")
|
|
3784
|
+
}, h = {
|
|
3785
|
+
borderTopLeftRadius: r(e.sx ?? {}, "borderTopLeftRadius"),
|
|
3786
|
+
borderTopRightRadius: r(e.sx ?? {}, "borderTopRightRadius"),
|
|
3787
|
+
borderBottomRightRadius: r(e.sx ?? {}, "borderBottomRightRadius"),
|
|
3788
|
+
borderBottomLeftRadius: r(e.sx ?? {}, "borderBottomLeftRadius")
|
|
3789
|
+
};
|
|
3790
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
3791
|
+
/* @__PURE__ */ u(D, { children: [
|
|
3792
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
3793
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
3794
|
+
] }),
|
|
3795
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
3796
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3797
|
+
/* @__PURE__ */ u(f, { name: "Layout", children: [
|
|
3798
|
+
/* @__PURE__ */ n(
|
|
3799
|
+
H,
|
|
3800
|
+
{
|
|
3801
|
+
menu: {
|
|
3802
|
+
autoOption: { visible: !0 },
|
|
3803
|
+
fitContentOption: { visible: !0 }
|
|
3804
|
+
},
|
|
3805
|
+
value: d,
|
|
3806
|
+
onChange: a
|
|
3807
|
+
}
|
|
3808
|
+
),
|
|
3809
|
+
/* @__PURE__ */ n(ce, { value: l, onChange: a })
|
|
3810
|
+
] }),
|
|
3811
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
3812
|
+
/* @__PURE__ */ n($, { value: c, onChange: a }),
|
|
3813
|
+
/* @__PURE__ */ n(z, { value: h, onChange: a })
|
|
3814
|
+
] }),
|
|
3815
|
+
/* @__PURE__ */ n(f, { name: "Background", children: /* @__PURE__ */ n(Z, { value: i, onChange: a }) })
|
|
3816
|
+
] }),
|
|
3817
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3818
|
+
/* @__PURE__ */ n(f, { name: "Display on", children: /* @__PURE__ */ n(Y, {}) }),
|
|
3819
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: s, onChange: a }) })
|
|
3820
|
+
] })
|
|
3821
|
+
] })
|
|
3822
|
+
] });
|
|
3823
|
+
}, es = () => E({
|
|
3824
|
+
transform: Ao
|
|
3825
|
+
}), si = () => {
|
|
3826
|
+
const { nodeProps: e, setNodeProps: o } = es(), { getResponsiveProp: r, currentScreen: t } = k(), a = (h, g = t) => {
|
|
3827
|
+
o({ sx: I(h, g) });
|
|
3828
|
+
}, s = {
|
|
3829
|
+
paddingBottom: r(e.sx ?? {}, "paddingBottom"),
|
|
3830
|
+
paddingLeft: r(e.sx ?? {}, "paddingLeft"),
|
|
3831
|
+
paddingRight: r(e.sx ?? {}, "paddingRight"),
|
|
3832
|
+
paddingTop: r(e.sx ?? {}, "paddingTop"),
|
|
3833
|
+
marginBottom: r(e.sx ?? {}, "marginBottom"),
|
|
3834
|
+
marginLeft: r(e.sx ?? {}, "marginLeft"),
|
|
3835
|
+
marginRight: r(e.sx ?? {}, "marginRight"),
|
|
3836
|
+
marginTop: r(e.sx ?? {}, "marginTop")
|
|
3837
|
+
}, i = {
|
|
3838
|
+
backgroundColor: r(e.sx ?? {}, "backgroundColor"),
|
|
3839
|
+
backgroundImage: r(e.sx ?? {}, "backgroundImage"),
|
|
3840
|
+
backgroundPosition: r(e.sx ?? {}, "backgroundPosition"),
|
|
3841
|
+
backgroundRepeat: r(e.sx ?? {}, "backgroundRepeat"),
|
|
3842
|
+
background: r(e.sx ?? {}, "background"),
|
|
3843
|
+
backgroundSize: r(e.sx ?? {}, "backgroundSize"),
|
|
3844
|
+
backgroundAttachment: r(e.sx ?? {}, "backgroundAttachment")
|
|
3845
|
+
}, d = {
|
|
3846
|
+
height: r(e.sx ?? {}, "height") ?? "auto"
|
|
3847
|
+
}, l = {
|
|
3848
|
+
borderStyle: r(e.sx ?? {}, "borderStyle"),
|
|
3849
|
+
borderColor: r(e.sx ?? {}, "borderColor"),
|
|
3850
|
+
borderTopWidth: r(e.sx ?? {}, "borderTopWidth"),
|
|
3851
|
+
borderRightWidth: r(e.sx ?? {}, "borderRightWidth"),
|
|
3852
|
+
borderBottomWidth: r(e.sx ?? {}, "borderBottomWidth"),
|
|
3853
|
+
borderLeftWidth: r(e.sx ?? {}, "borderLeftWidth")
|
|
3854
|
+
}, c = {
|
|
3855
|
+
borderTopLeftRadius: r(e.sx ?? {}, "borderTopLeftRadius"),
|
|
3856
|
+
borderTopRightRadius: r(e.sx ?? {}, "borderTopRightRadius"),
|
|
3857
|
+
borderBottomRightRadius: r(e.sx ?? {}, "borderBottomRightRadius"),
|
|
3858
|
+
borderBottomLeftRadius: r(e.sx ?? {}, "borderBottomLeftRadius")
|
|
3859
|
+
};
|
|
3860
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
3861
|
+
/* @__PURE__ */ u(D, { children: [
|
|
3862
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
3863
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
3864
|
+
] }),
|
|
3865
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
3866
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3867
|
+
/* @__PURE__ */ n(f, { name: "Layout", children: /* @__PURE__ */ n(ce, { value: d, onChange: a }) }),
|
|
3868
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
3869
|
+
/* @__PURE__ */ n($, { value: l, onChange: a }),
|
|
3870
|
+
/* @__PURE__ */ n(z, { value: c, onChange: a })
|
|
3871
|
+
] }),
|
|
3872
|
+
/* @__PURE__ */ n(f, { name: "Background", children: /* @__PURE__ */ n(Z, { value: i, onChange: a }) })
|
|
3873
|
+
] }),
|
|
3874
|
+
/* @__PURE__ */ u(N, { children: [
|
|
3875
|
+
/* @__PURE__ */ n(f, { name: "Display on", children: /* @__PURE__ */ n(Y, {}) }),
|
|
3876
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: s, onChange: a }) })
|
|
3877
|
+
] })
|
|
3878
|
+
] })
|
|
3879
|
+
] });
|
|
3880
|
+
}, ye = () => E(), ts = () => {
|
|
3881
|
+
const { nodeProps: e, setNodeProps: o } = ye(), { currentScreen: r, getResponsiveProp: t } = k(), [a, s] = U(!1), i = e.captionProps ?? {}, d = (c) => {
|
|
3882
|
+
o({
|
|
3883
|
+
captionProps: {
|
|
3884
|
+
[r]: {
|
|
3885
|
+
sizeVariant: c
|
|
3886
|
+
}
|
|
3887
|
+
}
|
|
3888
|
+
});
|
|
3889
|
+
}, l = (c) => {
|
|
3890
|
+
o({
|
|
3891
|
+
captionProps: {
|
|
3892
|
+
sx: c
|
|
3893
|
+
}
|
|
3894
|
+
});
|
|
3895
|
+
};
|
|
3896
|
+
return /* @__PURE__ */ n(f, { name: "Caption style", children: /* @__PURE__ */ n(L, { name: "Text style", children: /* @__PURE__ */ u(Ae, { open: a, onOpenChange: s, placement: "right-end", children: [
|
|
3897
|
+
/* @__PURE__ */ n(De, { children: /* @__PURE__ */ u(
|
|
3898
|
+
"button",
|
|
3899
|
+
{
|
|
3900
|
+
className: j(
|
|
3901
|
+
"tw:w-1/2 tw:h-8 tw:flex tw:items-center tw:gap-2 tw:rounded-md tw:bg-ic-white-1s tw:px-2 tw:text-left tw:truncate tw:text-xs",
|
|
3902
|
+
{
|
|
3903
|
+
"tw:bg-ic-black-7s": a
|
|
3904
|
+
}
|
|
3905
|
+
),
|
|
3906
|
+
children: [
|
|
3907
|
+
/* @__PURE__ */ n(W, { className: "tw:text-white", source: Yt }),
|
|
3908
|
+
/* @__PURE__ */ n("span", { children: "Auto" })
|
|
3909
|
+
]
|
|
3910
|
+
}
|
|
3911
|
+
) }),
|
|
3912
|
+
/* @__PURE__ */ n(Oe, { children: /* @__PURE__ */ u("div", { style: { width: 280 }, children: [
|
|
3913
|
+
/* @__PURE__ */ u("div", { className: "tw:flex tw:justify-between tw:items-center tw:gap-2", children: [
|
|
3914
|
+
/* @__PURE__ */ n("div", { className: "tw:font-medium", children: "Text style" }),
|
|
3915
|
+
/* @__PURE__ */ n(He, { children: /* @__PURE__ */ n(G, { children: /* @__PURE__ */ n(W, { source: Fe }) }) })
|
|
3916
|
+
] }),
|
|
3917
|
+
/* @__PURE__ */ n("hr", { className: "tw:border-ic-white-1s tw:my-2" }),
|
|
3918
|
+
/* @__PURE__ */ u("div", { className: "tw:flex tw:flex-col tw:gap-3", children: [
|
|
3919
|
+
/* @__PURE__ */ n(
|
|
3920
|
+
Me,
|
|
3921
|
+
{
|
|
3922
|
+
value: t(i, "sizeVariant"),
|
|
3923
|
+
onChange: d
|
|
3924
|
+
}
|
|
3925
|
+
),
|
|
3926
|
+
/* @__PURE__ */ n(
|
|
3927
|
+
ge,
|
|
3928
|
+
{
|
|
3929
|
+
value: { color: t(i.sx ?? {}, "color") },
|
|
3930
|
+
onChange: l
|
|
3931
|
+
}
|
|
3932
|
+
),
|
|
3933
|
+
/* @__PURE__ */ n(
|
|
3934
|
+
ze,
|
|
3935
|
+
{
|
|
3936
|
+
name: "Style",
|
|
3937
|
+
value: {
|
|
3938
|
+
fontWeight: t(i.sx ?? {}, "fontWeight"),
|
|
3939
|
+
fontStyle: t(i.sx ?? {}, "fontStyle"),
|
|
3940
|
+
textDecorationLine: t(i.sx ?? {}, "textDecorationLine")
|
|
3941
|
+
},
|
|
3942
|
+
onChange: l
|
|
3943
|
+
}
|
|
3944
|
+
),
|
|
3945
|
+
/* @__PURE__ */ n(
|
|
3946
|
+
$e,
|
|
3947
|
+
{
|
|
3948
|
+
value: { fontWeight: t(i.sx ?? {}, "fontWeight") },
|
|
3949
|
+
onChange: l
|
|
3950
|
+
}
|
|
3951
|
+
),
|
|
3952
|
+
/* @__PURE__ */ n(
|
|
3953
|
+
st,
|
|
3954
|
+
{
|
|
3955
|
+
value: {
|
|
3956
|
+
textTransform: t(i.sx ?? {}, "textTransform") ?? "none"
|
|
3957
|
+
},
|
|
3958
|
+
onChange: l
|
|
3959
|
+
}
|
|
3960
|
+
)
|
|
3961
|
+
] })
|
|
3962
|
+
] }) })
|
|
3963
|
+
] }) }) });
|
|
3964
|
+
}, ns = () => {
|
|
3965
|
+
const { nodeProps: e, setNodeProps: o } = ye(), { currentScreen: r, getResponsiveProp: t } = k(), [a, s] = U(!1), i = e.timeProps ?? {}, d = (c) => {
|
|
3966
|
+
o({
|
|
3967
|
+
timeProps: r === "xs" ? {
|
|
3968
|
+
sizeVariant: c
|
|
3969
|
+
} : {
|
|
3970
|
+
[r]: {
|
|
3971
|
+
sizeVariant: c
|
|
3972
|
+
}
|
|
3973
|
+
}
|
|
3974
|
+
});
|
|
3975
|
+
}, l = (c) => {
|
|
3976
|
+
o({
|
|
3977
|
+
timeProps: {
|
|
3978
|
+
sx: c
|
|
3979
|
+
}
|
|
3980
|
+
});
|
|
3981
|
+
};
|
|
3982
|
+
return /* @__PURE__ */ n(f, { name: "Time style", children: /* @__PURE__ */ n(L, { name: "Text style", children: /* @__PURE__ */ u(Ae, { open: a, onOpenChange: s, placement: "right-end", children: [
|
|
3983
|
+
/* @__PURE__ */ n(De, { children: /* @__PURE__ */ u(
|
|
3984
|
+
"button",
|
|
3985
|
+
{
|
|
3986
|
+
className: j(
|
|
3987
|
+
"tw:w-1/2 tw:h-8 tw:flex tw:items-center tw:gap-2 tw:rounded-md tw:bg-ic-white-1s tw:px-2 tw:text-left tw:truncate tw:text-xs",
|
|
3988
|
+
{
|
|
3989
|
+
"tw:bg-ic-black-7s": a
|
|
3990
|
+
}
|
|
3991
|
+
),
|
|
3992
|
+
children: [
|
|
3993
|
+
/* @__PURE__ */ n(W, { className: "tw:text-white", source: Yt }),
|
|
3994
|
+
/* @__PURE__ */ n("span", { children: "Auto" })
|
|
3995
|
+
]
|
|
3996
|
+
}
|
|
3997
|
+
) }),
|
|
3998
|
+
/* @__PURE__ */ n(Oe, { children: /* @__PURE__ */ u("div", { style: { width: 280 }, children: [
|
|
3999
|
+
/* @__PURE__ */ u("div", { className: "tw:flex tw:justify-between tw:items-center tw:gap-2", children: [
|
|
4000
|
+
/* @__PURE__ */ n("div", { className: "tw:font-medium", children: "Text style" }),
|
|
4001
|
+
/* @__PURE__ */ n(He, { children: /* @__PURE__ */ n(G, { children: /* @__PURE__ */ n(W, { source: Fe }) }) })
|
|
4002
|
+
] }),
|
|
4003
|
+
/* @__PURE__ */ n("hr", { className: "tw:border-ic-white-1s tw:my-2" }),
|
|
4004
|
+
/* @__PURE__ */ u("div", { className: "tw:flex tw:flex-col tw:gap-3", children: [
|
|
4005
|
+
/* @__PURE__ */ n(
|
|
4006
|
+
Me,
|
|
4007
|
+
{
|
|
4008
|
+
value: t(i, "sizeVariant"),
|
|
4009
|
+
onChange: d
|
|
4010
|
+
}
|
|
4011
|
+
),
|
|
4012
|
+
/* @__PURE__ */ n(
|
|
4013
|
+
ge,
|
|
4014
|
+
{
|
|
4015
|
+
value: { color: t(i.sx ?? {}, "color") },
|
|
4016
|
+
onChange: l
|
|
4017
|
+
}
|
|
4018
|
+
),
|
|
4019
|
+
/* @__PURE__ */ n(
|
|
4020
|
+
ze,
|
|
4021
|
+
{
|
|
4022
|
+
name: "Style",
|
|
4023
|
+
value: {
|
|
4024
|
+
fontWeight: t(i.sx ?? {}, "fontWeight"),
|
|
4025
|
+
fontStyle: t(i.sx ?? {}, "fontStyle"),
|
|
4026
|
+
textDecorationLine: t(i.sx ?? {}, "textDecorationLine")
|
|
4027
|
+
},
|
|
4028
|
+
onChange: l
|
|
4029
|
+
}
|
|
4030
|
+
),
|
|
4031
|
+
/* @__PURE__ */ n(
|
|
4032
|
+
$e,
|
|
4033
|
+
{
|
|
4034
|
+
value: { fontWeight: t(i.sx ?? {}, "fontWeight") },
|
|
4035
|
+
onChange: l
|
|
4036
|
+
}
|
|
4037
|
+
)
|
|
4038
|
+
] })
|
|
4039
|
+
] }) })
|
|
4040
|
+
] }) }) });
|
|
4041
|
+
}, os = () => {
|
|
4042
|
+
const { currentScreen: e, getResponsiveProp: o } = k(), { nodeProps: r, setNodeProps: t } = ye(), a = (l, c = e) => {
|
|
4043
|
+
t({
|
|
4044
|
+
unitItemProps: {
|
|
4045
|
+
sx: c === "xs" ? l : {
|
|
4046
|
+
[c]: l
|
|
4047
|
+
}
|
|
4048
|
+
}
|
|
4049
|
+
});
|
|
4050
|
+
}, s = r.unitItemProps ?? {}, i = {
|
|
4051
|
+
paddingTop: o(s.sx ?? {}, "paddingTop"),
|
|
4052
|
+
paddingRight: o(s.sx ?? {}, "paddingRight"),
|
|
4053
|
+
paddingBottom: o(s.sx ?? {}, "paddingBottom"),
|
|
4054
|
+
paddingLeft: o(s.sx ?? {}, "paddingLeft")
|
|
4055
|
+
}, d = (l) => {
|
|
4056
|
+
a(
|
|
4057
|
+
{
|
|
4058
|
+
backgroundColor: l
|
|
4059
|
+
},
|
|
4060
|
+
"xs"
|
|
4061
|
+
);
|
|
4062
|
+
};
|
|
4063
|
+
return /* @__PURE__ */ u(f, { name: "Item style", children: [
|
|
4064
|
+
/* @__PURE__ */ n(
|
|
4065
|
+
H,
|
|
4066
|
+
{
|
|
4067
|
+
menu: {
|
|
4068
|
+
autoOption: { visible: !0 }
|
|
4069
|
+
},
|
|
4070
|
+
value: { width: o(s.sx ?? {}, "width") ?? "auto" },
|
|
4071
|
+
onChange: a
|
|
4072
|
+
}
|
|
4073
|
+
),
|
|
4074
|
+
/* @__PURE__ */ n(nt, { onChange: a, value: i }),
|
|
4075
|
+
/* @__PURE__ */ n(
|
|
4076
|
+
Ce,
|
|
4077
|
+
{
|
|
4078
|
+
name: "Item gap",
|
|
4079
|
+
onChange: a,
|
|
4080
|
+
value: { rowGap: o(s.sx ?? {}, "rowGap") ?? 0 }
|
|
4081
|
+
}
|
|
4082
|
+
),
|
|
4083
|
+
/* @__PURE__ */ n(L, { name: "Background", children: /* @__PURE__ */ n(
|
|
4084
|
+
Zt,
|
|
4085
|
+
{
|
|
4086
|
+
color: o(s.sx ?? {}, "backgroundColor"),
|
|
4087
|
+
onChange: d
|
|
4088
|
+
}
|
|
4089
|
+
) }),
|
|
4090
|
+
/* @__PURE__ */ n(
|
|
4091
|
+
z,
|
|
4092
|
+
{
|
|
4093
|
+
value: {
|
|
4094
|
+
borderBottomLeftRadius: o(s.sx ?? {}, "borderBottomLeftRadius"),
|
|
4095
|
+
borderBottomRightRadius: o(s.sx ?? {}, "borderBottomRightRadius"),
|
|
4096
|
+
borderTopLeftRadius: o(s.sx ?? {}, "borderTopLeftRadius"),
|
|
4097
|
+
borderTopRightRadius: o(s.sx ?? {}, "borderTopRightRadius")
|
|
4098
|
+
},
|
|
4099
|
+
onChange: a
|
|
4100
|
+
}
|
|
4101
|
+
)
|
|
4102
|
+
] });
|
|
4103
|
+
}, rs = () => {
|
|
4104
|
+
const { nodeProps: e, setNodeProps: o } = ye(), [r, t] = U(!1), a = [
|
|
4105
|
+
{
|
|
4106
|
+
label: "Months",
|
|
4107
|
+
value: "months"
|
|
4108
|
+
},
|
|
4109
|
+
{
|
|
4110
|
+
label: "Weeks",
|
|
4111
|
+
value: "weeks"
|
|
4112
|
+
},
|
|
4113
|
+
{
|
|
4114
|
+
label: "Days",
|
|
4115
|
+
value: "days"
|
|
4116
|
+
},
|
|
4117
|
+
{
|
|
4118
|
+
label: "Hours",
|
|
4119
|
+
value: "hours"
|
|
4120
|
+
},
|
|
4121
|
+
{
|
|
4122
|
+
label: "Minutes",
|
|
4123
|
+
value: "minutes"
|
|
4124
|
+
},
|
|
4125
|
+
{
|
|
4126
|
+
label: "Seconds",
|
|
4127
|
+
value: "seconds"
|
|
4128
|
+
}
|
|
4129
|
+
].map((d) => ({
|
|
4130
|
+
...d,
|
|
4131
|
+
currentValue: e.units.find((l) => l.value === d.value)
|
|
4132
|
+
})), s = (d, l) => {
|
|
4133
|
+
if (d === X.False) {
|
|
4134
|
+
o((c) => {
|
|
4135
|
+
c.units = c.units.filter((h) => h.value !== l.currentTarget.name);
|
|
4136
|
+
});
|
|
4137
|
+
return;
|
|
4138
|
+
}
|
|
4139
|
+
o((c) => {
|
|
4140
|
+
const h = [];
|
|
4141
|
+
a.forEach((g) => {
|
|
4142
|
+
if (g.value === l.currentTarget.name) {
|
|
4143
|
+
h.push({
|
|
4144
|
+
value: g.value,
|
|
4145
|
+
caption: g.label
|
|
4146
|
+
});
|
|
4147
|
+
return;
|
|
4148
|
+
}
|
|
4149
|
+
const x = c.units.find((w) => w.value === g.value);
|
|
4150
|
+
if (x) {
|
|
4151
|
+
h.push(x);
|
|
4152
|
+
return;
|
|
4153
|
+
}
|
|
4154
|
+
}), c.units = h;
|
|
4155
|
+
});
|
|
4156
|
+
}, i = (d) => {
|
|
4157
|
+
o((l) => {
|
|
4158
|
+
l.units = l.units.map((c) => c.value === d.target.name ? { ...c, caption: d.target.value } : c);
|
|
4159
|
+
});
|
|
4160
|
+
};
|
|
4161
|
+
return /* @__PURE__ */ n(L, { name: "Units", children: /* @__PURE__ */ u(Ae, { placement: "right", open: r, onOpenChange: t, children: [
|
|
4162
|
+
/* @__PURE__ */ n(De, { children: /* @__PURE__ */ n(
|
|
4163
|
+
"button",
|
|
4164
|
+
{
|
|
4165
|
+
className: j(
|
|
4166
|
+
"tw:w-1/2 tw:h-8 tw:rounded-md tw:bg-ic-white-1s tw:px-2 tw:text-left tw:truncate tw:text-xs",
|
|
4167
|
+
{
|
|
4168
|
+
"tw:bg-ic-black-7s": r
|
|
4169
|
+
}
|
|
4170
|
+
),
|
|
4171
|
+
children: a.filter((d) => !!d.currentValue).map((d) => d.label).join(", ") || /* @__PURE__ */ n("span", { className: "tw:text-ic-white-3s", children: "None" })
|
|
4172
|
+
}
|
|
4173
|
+
) }),
|
|
4174
|
+
/* @__PURE__ */ n(Oe, { style: { top: 120 }, children: /* @__PURE__ */ u("div", { style: { width: 280 }, children: [
|
|
4175
|
+
/* @__PURE__ */ u("div", { className: "tw:flex tw:justify-between tw:items-center tw:gap-2", children: [
|
|
4176
|
+
/* @__PURE__ */ n("div", { className: "tw:font-medium", children: "Units" }),
|
|
4177
|
+
/* @__PURE__ */ n(He, { children: /* @__PURE__ */ n(G, { children: /* @__PURE__ */ n(W, { source: Fe }) }) })
|
|
4178
|
+
] }),
|
|
4179
|
+
/* @__PURE__ */ n("hr", { className: "tw:border-ic-white-1s tw:my-2" }),
|
|
4180
|
+
/* @__PURE__ */ n("div", { className: "tw:flex tw:flex-col tw:gap-3", children: a.map((d) => /* @__PURE__ */ u(Vt, { children: [
|
|
4181
|
+
/* @__PURE__ */ n(L, { name: d.label, children: /* @__PURE__ */ u(
|
|
4182
|
+
_e,
|
|
4183
|
+
{
|
|
4184
|
+
onSelectionChange: s,
|
|
4185
|
+
className: "tw:w-1/2",
|
|
4186
|
+
value: (!!d.currentValue).toString(),
|
|
4187
|
+
children: [
|
|
4188
|
+
/* @__PURE__ */ n(K, { name: d.value, className: "tw:flex-1", value: X.True, size: "28", children: "Show" }),
|
|
4189
|
+
/* @__PURE__ */ n(K, { name: d.value, className: "tw:flex-1", value: X.False, size: "28", children: "Hide" })
|
|
4190
|
+
]
|
|
4191
|
+
}
|
|
4192
|
+
) }),
|
|
4193
|
+
!!d.currentValue && /* @__PURE__ */ n(L, { name: `${d.label} caption`, children: /* @__PURE__ */ n(
|
|
4194
|
+
ie,
|
|
4195
|
+
{
|
|
4196
|
+
transform: Ht,
|
|
4197
|
+
debounce: 400,
|
|
4198
|
+
name: d.value,
|
|
4199
|
+
onChange: i,
|
|
4200
|
+
value: d.currentValue.caption ?? "",
|
|
4201
|
+
placeholder: "Caption",
|
|
4202
|
+
classes: { container: "tw:w-1/2" }
|
|
4203
|
+
}
|
|
4204
|
+
) })
|
|
4205
|
+
] }, d.value)) })
|
|
4206
|
+
] }) })
|
|
4207
|
+
] }) });
|
|
4208
|
+
}, ii = () => {
|
|
4209
|
+
const { nodeProps: e, setNodeProps: o } = ye(), { getResponsiveProp: r, currentScreen: t } = k(), a = (x, w = t) => {
|
|
4210
|
+
o({ sx: I(x, w) });
|
|
4211
|
+
}, s = {
|
|
4212
|
+
paddingBottom: r(e.sx ?? {}, "paddingBottom"),
|
|
4213
|
+
paddingLeft: r(e.sx ?? {}, "paddingLeft"),
|
|
4214
|
+
paddingRight: r(e.sx ?? {}, "paddingRight"),
|
|
4215
|
+
paddingTop: r(e.sx ?? {}, "paddingTop"),
|
|
4216
|
+
marginBottom: r(e.sx ?? {}, "marginBottom"),
|
|
4217
|
+
marginLeft: r(e.sx ?? {}, "marginLeft"),
|
|
4218
|
+
marginRight: r(e.sx ?? {}, "marginRight"),
|
|
4219
|
+
marginTop: r(e.sx ?? {}, "marginTop")
|
|
4220
|
+
}, i = {
|
|
4221
|
+
backgroundColor: r(e.sx ?? {}, "backgroundColor"),
|
|
4222
|
+
backgroundImage: r(e.sx ?? {}, "backgroundImage"),
|
|
4223
|
+
backgroundPosition: r(e.sx ?? {}, "backgroundPosition"),
|
|
4224
|
+
backgroundRepeat: r(e.sx ?? {}, "backgroundRepeat"),
|
|
4225
|
+
background: r(e.sx ?? {}, "background"),
|
|
4226
|
+
backgroundSize: r(e.sx ?? {}, "backgroundSize"),
|
|
4227
|
+
backgroundAttachment: r(e.sx ?? {}, "backgroundAttachment")
|
|
4228
|
+
}, d = {
|
|
4229
|
+
width: r(e.sx ?? {}, "width") ?? "auto"
|
|
4230
|
+
}, l = {
|
|
4231
|
+
borderStyle: r(e.sx ?? {}, "borderStyle"),
|
|
4232
|
+
borderColor: r(e.sx ?? {}, "borderColor"),
|
|
4233
|
+
borderTopWidth: r(e.sx ?? {}, "borderTopWidth"),
|
|
4234
|
+
borderRightWidth: r(e.sx ?? {}, "borderRightWidth"),
|
|
4235
|
+
borderBottomWidth: r(e.sx ?? {}, "borderBottomWidth"),
|
|
4236
|
+
borderLeftWidth: r(e.sx ?? {}, "borderLeftWidth")
|
|
4237
|
+
}, c = {
|
|
4238
|
+
borderTopLeftRadius: r(e.sx ?? {}, "borderTopLeftRadius"),
|
|
4239
|
+
borderTopRightRadius: r(e.sx ?? {}, "borderTopRightRadius"),
|
|
4240
|
+
borderBottomRightRadius: r(e.sx ?? {}, "borderBottomRightRadius"),
|
|
4241
|
+
borderBottomLeftRadius: r(e.sx ?? {}, "borderBottomLeftRadius")
|
|
4242
|
+
}, h = (x) => {
|
|
4243
|
+
o({
|
|
4244
|
+
date: x
|
|
4245
|
+
});
|
|
4246
|
+
}, g = (x) => {
|
|
4247
|
+
o({
|
|
4248
|
+
hideAfterExpired: x.target.checked
|
|
4249
|
+
});
|
|
4250
|
+
};
|
|
4251
|
+
return /* @__PURE__ */ u(A, { children: [
|
|
4252
|
+
/* @__PURE__ */ u(D, { children: [
|
|
4253
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Settings" }),
|
|
4254
|
+
/* @__PURE__ */ n(T, { className: "tw:flex-1", children: "Advanced" })
|
|
4255
|
+
] }),
|
|
4256
|
+
/* @__PURE__ */ u(O, { className: "tw:px-2", children: [
|
|
4257
|
+
/* @__PURE__ */ u(N, { children: [
|
|
4258
|
+
/* @__PURE__ */ u(f, { name: "Config", children: [
|
|
4259
|
+
/* @__PURE__ */ n(L, { name: "Date", children: /* @__PURE__ */ n(
|
|
4260
|
+
Ho,
|
|
4261
|
+
{
|
|
4262
|
+
onChange: h,
|
|
4263
|
+
referenceProps: { className: "w-1/2" },
|
|
4264
|
+
value: ee(e.date) ? null : new Date(e.date)
|
|
4265
|
+
}
|
|
4266
|
+
) }),
|
|
4267
|
+
/* @__PURE__ */ n(rs, {}),
|
|
4268
|
+
/* @__PURE__ */ n(L, { name: "Hide after expired", children: /* @__PURE__ */ n(le, { checked: e.hideAfterExpired ?? !1, onChange: g }) })
|
|
4269
|
+
] }),
|
|
4270
|
+
/* @__PURE__ */ u(f, { name: "Layout", children: [
|
|
4271
|
+
/* @__PURE__ */ n(
|
|
4272
|
+
H,
|
|
4273
|
+
{
|
|
4274
|
+
menu: {
|
|
4275
|
+
autoOption: { visible: !0 },
|
|
4276
|
+
fitContentOption: { visible: !0 }
|
|
4277
|
+
},
|
|
4278
|
+
value: d,
|
|
4279
|
+
onChange: a
|
|
4280
|
+
}
|
|
4281
|
+
),
|
|
4282
|
+
/* @__PURE__ */ n(
|
|
4283
|
+
Jt,
|
|
4284
|
+
{
|
|
4285
|
+
value: {
|
|
4286
|
+
flexWrap: r(e.sx ?? {}, "flexWrap")
|
|
4287
|
+
},
|
|
4288
|
+
onChange: a
|
|
4289
|
+
}
|
|
4290
|
+
)
|
|
4291
|
+
] }),
|
|
4292
|
+
/* @__PURE__ */ n(os, {}),
|
|
4293
|
+
/* @__PURE__ */ n(ns, {}),
|
|
4294
|
+
/* @__PURE__ */ n(ts, {})
|
|
4295
|
+
] }),
|
|
4296
|
+
/* @__PURE__ */ u(N, { children: [
|
|
4297
|
+
/* @__PURE__ */ n(f, { name: "Display on", children: /* @__PURE__ */ n(Y, {}) }),
|
|
4298
|
+
/* @__PURE__ */ n(f, { name: "Spacing (px)", children: /* @__PURE__ */ n(M, { value: s, onChange: a }) }),
|
|
4299
|
+
/* @__PURE__ */ u(f, { name: "Shape", children: [
|
|
4300
|
+
/* @__PURE__ */ n($, { value: l, onChange: a }),
|
|
4301
|
+
/* @__PURE__ */ n(z, { value: c, onChange: a })
|
|
4302
|
+
] }),
|
|
4303
|
+
/* @__PURE__ */ n(f, { name: "Background", children: /* @__PURE__ */ n(Z, { value: i, onChange: a }) })
|
|
4304
|
+
] })
|
|
4305
|
+
] })
|
|
4306
|
+
] });
|
|
4307
|
+
}, di = ({ children: e, data: o }) => {
|
|
4308
|
+
const { resolver: r } = ne((a) => ({
|
|
4309
|
+
resolver: a.options.resolver
|
|
4310
|
+
})), t = eo(() => {
|
|
4311
|
+
if (ee(o)) return o;
|
|
4312
|
+
const a = xe(o) ? JSON.parse(o) : o;
|
|
4313
|
+
return Object.entries(a).forEach(([, s]) => {
|
|
4314
|
+
const i = xe(s.type) ? s.type : s.type.resolvedName;
|
|
4315
|
+
r[i] || (console.error(`Unknown node: ${i}`), s.type = {
|
|
4316
|
+
resolvedName: y.Unknown
|
|
4317
|
+
});
|
|
4318
|
+
}), a;
|
|
4319
|
+
}, [o, r]);
|
|
4320
|
+
return /* @__PURE__ */ n(Yn, { data: t, children: e });
|
|
4321
|
+
}, as = {
|
|
4322
|
+
// Root
|
|
4323
|
+
[y.Root]: qn,
|
|
4324
|
+
// Unknown
|
|
4325
|
+
[y.Unknown]: Gn,
|
|
4326
|
+
// Button
|
|
4327
|
+
[y.Button]: Un,
|
|
4328
|
+
// Text
|
|
4329
|
+
[y.Paragraph]: et,
|
|
4330
|
+
[y.Heading]: jn,
|
|
4331
|
+
// Layout
|
|
4332
|
+
[y.Grid]: Vn,
|
|
4333
|
+
[y.Cell]: Wt,
|
|
4334
|
+
[y.Flexbox]: Hn,
|
|
4335
|
+
[y.FlexItem]: Et,
|
|
4336
|
+
[y.Box]: _n,
|
|
4337
|
+
[y.Container]: $n,
|
|
4338
|
+
// Media
|
|
4339
|
+
[y.Image]: zn,
|
|
4340
|
+
[y.Video]: Mn,
|
|
4341
|
+
[y.Icon]: Fn,
|
|
4342
|
+
// Navigation
|
|
4343
|
+
[y.Link]: On,
|
|
4344
|
+
// List
|
|
4345
|
+
[y.UnorderedList]: Dn,
|
|
4346
|
+
[y.ListItem]: Mt,
|
|
4347
|
+
// Carousel
|
|
4348
|
+
[y.Swiper]: An,
|
|
4349
|
+
[y.SwiperSlide]: Ft,
|
|
4350
|
+
[y.Marquee]: En,
|
|
4351
|
+
[y.MarqueeItem]: At,
|
|
4352
|
+
// Tabs
|
|
4353
|
+
[y.Tabs]: Wn,
|
|
4354
|
+
[y.TabList]: In,
|
|
4355
|
+
[y.Tab]: Dt,
|
|
4356
|
+
[y.TabContent]: Bn,
|
|
4357
|
+
[y.TabPanel]: Ot,
|
|
4358
|
+
// Accordion
|
|
4359
|
+
[y.AccordionGroup]: kn,
|
|
4360
|
+
[y.Accordion]: zt,
|
|
4361
|
+
[y.AccordionSummary]: $t,
|
|
4362
|
+
[y.AccordionContent]: _t,
|
|
4363
|
+
// Timer
|
|
4364
|
+
[y.CountdownTimer]: Pn
|
|
4365
|
+
}, li = ({ resolver: e, children: o, ...r }) => /* @__PURE__ */ n(
|
|
4366
|
+
Zn,
|
|
4367
|
+
{
|
|
4368
|
+
enabled: !1,
|
|
4369
|
+
onRender: ss,
|
|
4370
|
+
handlers: (t) => new is({
|
|
4371
|
+
store: t,
|
|
4372
|
+
removeHoverOnMouseleave: !0,
|
|
4373
|
+
isMultiSelectEnabled: () => !1
|
|
4374
|
+
}),
|
|
4375
|
+
resolver: { ...as, ...e },
|
|
4376
|
+
...r,
|
|
4377
|
+
children: o
|
|
4378
|
+
}
|
|
4379
|
+
), ss = ({ render: e }) => {
|
|
4380
|
+
const { id: o } = E(), { query: r } = ne();
|
|
4381
|
+
return we(() => {
|
|
4382
|
+
const t = r.node(o).get(), a = he(t);
|
|
4383
|
+
if (ee(a))
|
|
4384
|
+
throw new Error(
|
|
4385
|
+
`The node with id "${t.data.displayName}" does not have a resolved ID. Please check your node configuration.`
|
|
4386
|
+
);
|
|
4387
|
+
}, [o, r]), e;
|
|
4388
|
+
};
|
|
4389
|
+
class is extends Xn {
|
|
4390
|
+
handlers() {
|
|
4391
|
+
const o = super.handlers();
|
|
4392
|
+
return {
|
|
4393
|
+
...o,
|
|
4394
|
+
select(r, t) {
|
|
4395
|
+
return (r.getAttribute(Jn.DATA_NODE_SELECTABLE) ?? X.True) === X.True ? o.select(r, t) : () => {
|
|
4396
|
+
};
|
|
4397
|
+
}
|
|
4398
|
+
};
|
|
4399
|
+
}
|
|
4400
|
+
}
|
|
4401
|
+
export {
|
|
4402
|
+
oi as A,
|
|
4403
|
+
ai as B,
|
|
4404
|
+
di as C,
|
|
4405
|
+
Js as D,
|
|
4406
|
+
_a as E,
|
|
4407
|
+
Gs as F,
|
|
4408
|
+
_s as G,
|
|
4409
|
+
Ys as H,
|
|
4410
|
+
ni as I,
|
|
4411
|
+
Tn as J,
|
|
4412
|
+
Ua as K,
|
|
4413
|
+
Vs as L,
|
|
4414
|
+
Xs as M,
|
|
4415
|
+
Xa as N,
|
|
4416
|
+
qs as P,
|
|
4417
|
+
wa as S,
|
|
4418
|
+
Qs as T,
|
|
4419
|
+
ti as U,
|
|
4420
|
+
Ca as V,
|
|
4421
|
+
Ks as a,
|
|
4422
|
+
js as b,
|
|
4423
|
+
Hs as c,
|
|
4424
|
+
li as d,
|
|
4425
|
+
si as e,
|
|
4426
|
+
ii as f,
|
|
4427
|
+
Us as g,
|
|
4428
|
+
Zs as h,
|
|
4429
|
+
ei as i,
|
|
4430
|
+
Sn as j,
|
|
4431
|
+
ri as k,
|
|
4432
|
+
qa as l,
|
|
4433
|
+
Qa as m,
|
|
4434
|
+
Ve as n,
|
|
4435
|
+
nn as o,
|
|
4436
|
+
es as p,
|
|
4437
|
+
ye as q,
|
|
4438
|
+
Rt as r,
|
|
4439
|
+
Rn as s,
|
|
4440
|
+
Vo as t,
|
|
4441
|
+
Je as u,
|
|
4442
|
+
Ga as v,
|
|
4443
|
+
Se as w,
|
|
4444
|
+
ut as x,
|
|
4445
|
+
Da as y,
|
|
4446
|
+
qe as z
|
|
4447
|
+
};
|