@blocklet/pages-kit-inner-components 0.6.17 → 0.6.19
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/lib/cjs/add-component.js +1 -1
- package/lib/cjs/chunks/{draft-data-CVjF01PQ.js → draft-data-BM4piqW0.js} +1 -1
- package/lib/cjs/chunks/{home-BarvCpAK.js → home--QTzptul.js} +2 -2
- package/lib/cjs/chunks/index-CKYYXx-8.js +475 -0
- package/lib/cjs/chunks/{publish-button-CNo2gT6Q.js → publish-button-B0Ubvq3p.js} +1 -1
- package/lib/cjs/chunks/state-tEydRMV8.js +1 -0
- package/lib/cjs/home.js +1 -1
- package/lib/cjs/locales.js +2 -2
- package/lib/cjs/setting.js +1 -1
- package/lib/es/add-component.js +6 -8
- package/lib/es/chunks/{draft-data-BiayOfQz.js → draft-data-CpCuyq4R.js} +1 -1
- package/lib/es/chunks/{home-DBc-g4K0.js → home-B1QFMvMR.js} +3 -3
- package/lib/es/chunks/{index-DaF8ujCZ.js → index-D3m-37ll.js} +542 -471
- package/lib/es/chunks/{publish-button-DiKDLFU8.js → publish-button-BUo0AlQd.js} +3 -3
- package/lib/es/chunks/state-DSo43FAB.js +601 -0
- package/lib/es/home.js +3 -3
- package/lib/es/locales.js +13 -4
- package/lib/es/setting.js +1 -1
- package/package.json +12 -12
- package/lib/cjs/chunks/index-DH8UBqWG.js +0 -475
- package/lib/cjs/chunks/state-DCxHc_MB.js +0 -1
- package/lib/es/chunks/state-C3hsEhCe.js +0 -569
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsx as r, jsxs as w, Fragment as
|
|
2
|
-
import { ErrorOutline as
|
|
3
|
-
import { Box as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { styled as _, useTheme as
|
|
9
|
-
import { cx as
|
|
10
|
-
import
|
|
11
|
-
import { Link as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { Icon as
|
|
15
|
-
import { e as
|
|
16
|
-
import
|
|
17
|
-
import { useColorConvert as
|
|
18
|
-
import { materialDark as
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { ResponsiveImage as
|
|
22
|
-
import { isGradient as
|
|
23
|
-
import
|
|
24
|
-
import { join as
|
|
25
|
-
import { withoutTrailingSlash as
|
|
26
|
-
import { useMessage as
|
|
27
|
-
import { useLatest as
|
|
28
|
-
import
|
|
29
|
-
import { EmbedIframe as
|
|
30
|
-
import { useLocaleContext as
|
|
31
|
-
import
|
|
32
|
-
import { TwitterTimelineEmbed as
|
|
33
|
-
import { useUpdate as
|
|
34
|
-
const
|
|
1
|
+
import { jsx as r, jsxs as w, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import { ErrorOutline as Ot } from "@mui/icons-material";
|
|
3
|
+
import { Box as g, styled as Ut, Typography as L, Container as Ft, useTheme as Ht, useMediaQuery as Dt, Card as Gt, CircularProgress as Yt, Grid as ut, CardMedia as Vt, CardContent as Jt, Alert as Kt } from "@mui/material";
|
|
4
|
+
import Xt from "lodash/isEmpty";
|
|
5
|
+
import lt from "lodash/pick";
|
|
6
|
+
import qt, { createContext as vt, useMemo as N, useCallback as F, useContext as kt, useState as Z, useEffect as H, Fragment as Qt, isValidElement as _t, useRef as ct } from "react";
|
|
7
|
+
import j from "lodash/keyBy";
|
|
8
|
+
import { styled as _, useTheme as $t } from "@arcblock/ux/lib/Theme";
|
|
9
|
+
import { cx as x, css as it } from "@emotion/css";
|
|
10
|
+
import B from "lodash/omit";
|
|
11
|
+
import { Link as Zt, NavLink as te, useNavigate as ee } from "react-router-dom";
|
|
12
|
+
import oe from "@arcblock/ux/lib/Button";
|
|
13
|
+
import at from "is-uri";
|
|
14
|
+
import { Icon as St } from "@iconify-icon/react";
|
|
15
|
+
import { e as z, f as M, i as dt, l as mt } from "./state-DSo43FAB.js";
|
|
16
|
+
import ne from "@blocklet/pages-kit/builtin/markdown/markdown-renderer";
|
|
17
|
+
import { useColorConvert as Ct } from "@blocklet/pages-kit/contexts/color";
|
|
18
|
+
import { materialDark as re } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
19
|
+
import ie from "@arcblock/react-hooks/lib/useBrowser";
|
|
20
|
+
import ht from "@arcblock/ux/lib/Colors";
|
|
21
|
+
import { ResponsiveImage as Nt, CustomComponentRenderer as ae } from "@blocklet/pages-kit/components";
|
|
22
|
+
import { isGradient as se, isColorString as le } from "@blocklet/pages-kit/utils/style";
|
|
23
|
+
import Bt from "@mui/material/useMediaQuery";
|
|
24
|
+
import { join as K } from "pathe";
|
|
25
|
+
import { withoutTrailingSlash as rt, isRelative as ce, parseURL as de } from "ufo";
|
|
26
|
+
import { useMessage as me } from "@blocklet/embed/message";
|
|
27
|
+
import { useLatest as pe } from "ahooks";
|
|
28
|
+
import ue from "lodash/isEqual";
|
|
29
|
+
import { EmbedIframe as he } from "@blocklet/embed/react";
|
|
30
|
+
import { useLocaleContext as ge } from "@arcblock/ux/lib/Locale/context";
|
|
31
|
+
import fe from "@arcblock/ux/lib/Screenshot";
|
|
32
|
+
import { TwitterTimelineEmbed as xe } from "react-twitter-embed";
|
|
33
|
+
import { useUpdate as be, useMount as ye } from "react-use";
|
|
34
|
+
const Mt = "{{CUSTOM_VALUE}}", we = [
|
|
35
35
|
{
|
|
36
36
|
title: "None",
|
|
37
37
|
value: "none",
|
|
@@ -52,7 +52,7 @@ const $t = "{{CUSTOM_VALUE}}", fe = [
|
|
|
52
52
|
value: "large",
|
|
53
53
|
sx: { py: { xs: 7.5, md: 10, lg: 12.5, xl: 15 } }
|
|
54
54
|
}
|
|
55
|
-
],
|
|
55
|
+
], ve = [
|
|
56
56
|
{
|
|
57
57
|
title: "None",
|
|
58
58
|
value: "none",
|
|
@@ -73,7 +73,7 @@ const $t = "{{CUSTOM_VALUE}}", fe = [
|
|
|
73
73
|
value: "large",
|
|
74
74
|
sx: { py: { xs: 6, md: 9, lg: 9, xl: 11 } }
|
|
75
75
|
}
|
|
76
|
-
],
|
|
76
|
+
], ke = [
|
|
77
77
|
{
|
|
78
78
|
title: "None",
|
|
79
79
|
value: "none",
|
|
@@ -94,17 +94,17 @@ const $t = "{{CUSTOM_VALUE}}", fe = [
|
|
|
94
94
|
value: "large",
|
|
95
95
|
sx: { px: { xs: 2.5, md: 10, lg: 12.5, xl: 15 } }
|
|
96
96
|
}
|
|
97
|
-
],
|
|
97
|
+
], X = (t, e, o) => {
|
|
98
98
|
const n = t.breakpoints.values[o];
|
|
99
99
|
return `${e}${n ? ` (${n}px)` : ""}`;
|
|
100
|
-
},
|
|
100
|
+
}, _e = [
|
|
101
101
|
{
|
|
102
102
|
title: "100%",
|
|
103
103
|
value: "full",
|
|
104
104
|
sx: { maxWidth: "100%" }
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
|
-
title: (t) =>
|
|
107
|
+
title: (t) => X(t, "Small", "sm"),
|
|
108
108
|
value: "sm",
|
|
109
109
|
sx: {
|
|
110
110
|
maxWidth: (t) => t.breakpoints.values.sm,
|
|
@@ -113,17 +113,17 @@ const $t = "{{CUSTOM_VALUE}}", fe = [
|
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
|
-
title: (t) =>
|
|
116
|
+
title: (t) => X(t, "Normal", "md"),
|
|
117
117
|
value: "md",
|
|
118
118
|
sx: { maxWidth: (t) => t.breakpoints.values.md, width: "100%", mx: "auto" }
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
|
-
title: (t) =>
|
|
121
|
+
title: (t) => X(t, "Large", "lg"),
|
|
122
122
|
value: "lg",
|
|
123
123
|
sx: { maxWidth: (t) => t.breakpoints.values.lg, width: "100%", mx: "auto" }
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
|
-
title: (t) =>
|
|
126
|
+
title: (t) => X(t, "Extra Large", "xl"),
|
|
127
127
|
value: "xl",
|
|
128
128
|
sx: { maxWidth: (t) => t.breakpoints.values.xl, width: "100%", mx: "auto" }
|
|
129
129
|
},
|
|
@@ -131,20 +131,64 @@ const $t = "{{CUSTOM_VALUE}}", fe = [
|
|
|
131
131
|
title: "Custom",
|
|
132
132
|
value: "custom",
|
|
133
133
|
sx: {
|
|
134
|
-
maxWidth:
|
|
134
|
+
maxWidth: Mt,
|
|
135
135
|
width: "100%",
|
|
136
136
|
mx: "auto"
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
],
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
], $e = [
|
|
140
|
+
{
|
|
141
|
+
title: "None",
|
|
142
|
+
value: "none",
|
|
143
|
+
sx: { gap: 0 }
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
title: "Small",
|
|
147
|
+
value: "small",
|
|
148
|
+
sx: { gap: { xs: 1, md: 2, lg: 2, xl: 3 } }
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
title: "Normal",
|
|
152
|
+
value: "normal",
|
|
153
|
+
sx: { gap: { xs: 2, md: 4, lg: 4, xl: 6 } }
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
title: "Large",
|
|
157
|
+
value: "large",
|
|
158
|
+
sx: { gap: { xs: 3, md: 5, lg: 5, xl: 7 } }
|
|
159
|
+
}
|
|
160
|
+
], Se = [
|
|
161
|
+
{
|
|
162
|
+
title: "None",
|
|
163
|
+
value: "none",
|
|
164
|
+
sx: { p: 0 }
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
title: "Small",
|
|
168
|
+
value: "small",
|
|
169
|
+
sx: { p: { xs: 1, md: 2, lg: 2, xl: 3 } }
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
title: "Normal",
|
|
173
|
+
value: "normal",
|
|
174
|
+
sx: { p: { xs: 2.5, md: 5, lg: 5, xl: 7.5 } }
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
title: "Large",
|
|
178
|
+
value: "large",
|
|
179
|
+
sx: { p: { xs: 3, md: 6, lg: 6, xl: 9 } }
|
|
180
|
+
}
|
|
181
|
+
], Ce = j(we, "value"), Ne = j(ve, "value"), Be = j(ke, "value"), Me = j(_e, "value"), Pe = j($e, "value"), Ie = j(Se, "value"), We = /* @__PURE__ */ new Map([
|
|
182
|
+
["baseSectionPaddingY", Ce],
|
|
183
|
+
["maxWidth", Me],
|
|
184
|
+
["paddingY", Ne],
|
|
185
|
+
["paddingX", Be],
|
|
186
|
+
["layoutBlockGap", Pe],
|
|
187
|
+
["layoutBlockPadding", Ie]
|
|
144
188
|
]);
|
|
145
|
-
function
|
|
146
|
-
const { type: e, value: o, format: n = "sx", defaultValue: i = null } = t, a =
|
|
147
|
-
if (!a)
|
|
189
|
+
function Q(t) {
|
|
190
|
+
const { type: e, value: o, format: n = "sx", defaultValue: i = null } = t, a = We.get(e);
|
|
191
|
+
if (!a || typeof o != "string" || !o)
|
|
148
192
|
return i;
|
|
149
193
|
const c = o.startsWith("custom:"), s = c ? "custom" : o;
|
|
150
194
|
if (a?.[s] && a?.[s]?.[n]) {
|
|
@@ -152,7 +196,7 @@ function St(t) {
|
|
|
152
196
|
if (c) {
|
|
153
197
|
const d = o.replace("custom:", "");
|
|
154
198
|
try {
|
|
155
|
-
return JSON.parse(JSON.stringify(l || {}).replaceAll(
|
|
199
|
+
return JSON.parse(JSON.stringify(l || {}).replaceAll(Mt, d));
|
|
156
200
|
} catch {
|
|
157
201
|
}
|
|
158
202
|
}
|
|
@@ -160,41 +204,41 @@ function St(t) {
|
|
|
160
204
|
}
|
|
161
205
|
return i;
|
|
162
206
|
}
|
|
163
|
-
const
|
|
207
|
+
const Pt = vt({
|
|
164
208
|
page: null,
|
|
165
209
|
getPageMeta: () => ({}),
|
|
166
210
|
getPageMetaStyle: () => ({})
|
|
167
211
|
});
|
|
168
|
-
function
|
|
169
|
-
return
|
|
212
|
+
function Le() {
|
|
213
|
+
return kt(Pt);
|
|
170
214
|
}
|
|
171
|
-
function
|
|
215
|
+
function Cn({
|
|
172
216
|
page: t,
|
|
173
217
|
children: e,
|
|
174
218
|
defaultLocale: o = "en",
|
|
175
219
|
currentLocale: n
|
|
176
220
|
}) {
|
|
177
|
-
const i =
|
|
221
|
+
const i = N(() => t ? JSON.parse(JSON.stringify(t)) : null, [JSON.stringify(t)]), a = F(() => {
|
|
178
222
|
if (!i) return {};
|
|
179
223
|
const l = n || o;
|
|
180
224
|
return i.locales?.[l] ?? {};
|
|
181
|
-
}, [i, o, n]), c =
|
|
225
|
+
}, [i, o, n]), c = F(
|
|
182
226
|
(l = "sx") => {
|
|
183
227
|
const d = a();
|
|
184
228
|
return !d || !d.style ? {} : Object.entries(d.style || {}).reduce((m, [h, u]) => {
|
|
185
229
|
if (!u) return m;
|
|
186
|
-
const
|
|
187
|
-
d.style[
|
|
188
|
-
const
|
|
230
|
+
const b = `${h}Custom`;
|
|
231
|
+
d.style[b];
|
|
232
|
+
const f = Q({
|
|
189
233
|
type: h,
|
|
190
234
|
value: u,
|
|
191
235
|
format: l
|
|
192
236
|
});
|
|
193
|
-
return
|
|
237
|
+
return f ? { ...m, ...f } : m;
|
|
194
238
|
}, {});
|
|
195
239
|
},
|
|
196
240
|
[a]
|
|
197
|
-
), s =
|
|
241
|
+
), s = N(
|
|
198
242
|
() => ({
|
|
199
243
|
page: i,
|
|
200
244
|
getPageMeta: a,
|
|
@@ -202,39 +246,39 @@ function hn({
|
|
|
202
246
|
}),
|
|
203
247
|
[i, a, c]
|
|
204
248
|
);
|
|
205
|
-
return /* @__PURE__ */ r(
|
|
249
|
+
return /* @__PURE__ */ r(Pt.Provider, { value: s, children: e });
|
|
206
250
|
}
|
|
207
|
-
const
|
|
208
|
-
function
|
|
251
|
+
const tt = ["editing", "height", "locale", "dev", "sx"];
|
|
252
|
+
function ze(t) {
|
|
209
253
|
const { className: e, ...o } = t;
|
|
210
|
-
return /* @__PURE__ */ r(
|
|
254
|
+
return /* @__PURE__ */ r(Re, { ...o, className: x("BlockBase-root", e) });
|
|
211
255
|
}
|
|
212
|
-
const
|
|
256
|
+
const Re = _(g)`
|
|
213
257
|
position: relative;
|
|
214
258
|
color: ${({ theme: t }) => t.palette.text.primary};
|
|
215
|
-
`,
|
|
259
|
+
`, It = vt({
|
|
216
260
|
pages: [],
|
|
217
261
|
project: void 0
|
|
218
|
-
}), { Provider:
|
|
219
|
-
function
|
|
220
|
-
return
|
|
262
|
+
}), { Provider: Nn, Consumer: Bn } = It;
|
|
263
|
+
function Wt() {
|
|
264
|
+
return kt(It);
|
|
221
265
|
}
|
|
222
|
-
function
|
|
223
|
-
return /* @__PURE__ */ r(
|
|
266
|
+
function je({ icon: t, ...e }) {
|
|
267
|
+
return /* @__PURE__ */ r(St, { icon: t, ...e, ref: null });
|
|
224
268
|
}
|
|
225
|
-
function
|
|
226
|
-
return /* @__PURE__ */ r(
|
|
269
|
+
function Ae({ icon: t, className: e = "", size: o = "1rem", ...n }) {
|
|
270
|
+
return /* @__PURE__ */ r(Ee, { component: je, className: x("css-icon", e), size: o, ...n, icon: t });
|
|
227
271
|
}
|
|
228
|
-
const
|
|
272
|
+
const Ee = _(g)`
|
|
229
273
|
&.css-icon {
|
|
230
274
|
display: inline-block;
|
|
231
275
|
width: ${({ size: t }) => t};
|
|
232
276
|
height: ${({ size: t }) => t};
|
|
233
277
|
}
|
|
234
278
|
`;
|
|
235
|
-
function
|
|
236
|
-
const a =
|
|
237
|
-
return c ? /* @__PURE__ */ r(
|
|
279
|
+
function Te({ icon: t, className: e = "", size: o = "1rem", imageMeta: n, ...i }) {
|
|
280
|
+
const a = z(M(t), 540), [c, s] = Z(!1), l = $t();
|
|
281
|
+
return c ? /* @__PURE__ */ r(Ae, { icon: "i-mdi:image", color: l.palette.grey[500], size: o, className: e, ...i }) : /* @__PURE__ */ r(Oe, { className: x("image-icon", e), size: o, ...i, children: /* @__PURE__ */ r(
|
|
238
282
|
"img",
|
|
239
283
|
{
|
|
240
284
|
className: "image-icon__image",
|
|
@@ -247,7 +291,7 @@ function We({ icon: t, className: e = "", size: o = "1rem", imageMeta: n, ...i }
|
|
|
247
291
|
}
|
|
248
292
|
) });
|
|
249
293
|
}
|
|
250
|
-
const
|
|
294
|
+
const Oe = _(g)`
|
|
251
295
|
display: inline-block;
|
|
252
296
|
width: ${({ size: t }) => t};
|
|
253
297
|
height: ${({ size: t }) => t};
|
|
@@ -256,33 +300,33 @@ const Pe = _(f)`
|
|
|
256
300
|
height: 100%;
|
|
257
301
|
width: 100%;
|
|
258
302
|
}
|
|
259
|
-
`,
|
|
260
|
-
function
|
|
303
|
+
`, pt = (t) => typeof t == "string" && /^[\w-_]+:[\w-_]+$/.test(t);
|
|
304
|
+
function st({ icon: t, size: e = "1rem", imageMeta: o, ...n }) {
|
|
261
305
|
const i = window.isNaN(e) ? e : `${e}px`;
|
|
262
|
-
return
|
|
306
|
+
return pt(t) ? /* @__PURE__ */ r(St, { icon: t }) : /* @__PURE__ */ r(Ue, { component: Te, imageMeta: o, className: "base-icon", icon: t, size: i, ...n });
|
|
263
307
|
}
|
|
264
|
-
const
|
|
308
|
+
const Ue = _(g)`
|
|
265
309
|
flex-shrink: 0;
|
|
266
310
|
`;
|
|
267
|
-
function
|
|
268
|
-
const l = o ? /* @__PURE__ */ r(
|
|
269
|
-
return p && (m.href = p,
|
|
311
|
+
function U({ text: t, children: e, icon: o = "", endIcon: n, color: i = "primary", link: a = "", href: c = "", ...s }) {
|
|
312
|
+
const l = o ? /* @__PURE__ */ r(st, { icon: o }) : null, d = n ? /* @__PURE__ */ r(st, { icon: n }) : null, p = a || c, m = { ...s };
|
|
313
|
+
return p && (m.href = p, at(p) && (m.target = m.target || "_blank")), /* @__PURE__ */ r(oe, { startIcon: l, endIcon: d, color: i, ...m, children: t || e });
|
|
270
314
|
}
|
|
271
|
-
function
|
|
272
|
-
const { pages: n = [] } =
|
|
315
|
+
function Lt({ editing: t, text: e, ...o }) {
|
|
316
|
+
const { pages: n = [] } = Wt(), i = n.find((a) => a.id === (o.link || o.linkId));
|
|
273
317
|
if (t)
|
|
274
|
-
return /* @__PURE__ */ r(
|
|
318
|
+
return /* @__PURE__ */ r(U, { ...B(o, ["link", "linkId"]), children: e });
|
|
275
319
|
if (i) {
|
|
276
320
|
const a = i.path || "/";
|
|
277
|
-
return /* @__PURE__ */ r(
|
|
321
|
+
return /* @__PURE__ */ r(Zt, { to: a, children: /* @__PURE__ */ r(U, { ...B(o, ["link", "linkId"]), children: e }) });
|
|
278
322
|
}
|
|
279
|
-
return /* @__PURE__ */ r(
|
|
323
|
+
return /* @__PURE__ */ r(U, { ...B(o, "linkId"), children: e });
|
|
280
324
|
}
|
|
281
|
-
function
|
|
325
|
+
function A({ actions: t, center: e, className: o, align: n }) {
|
|
282
326
|
return t && t?.length ? /* @__PURE__ */ r(
|
|
283
|
-
|
|
327
|
+
g,
|
|
284
328
|
{
|
|
285
|
-
className:
|
|
329
|
+
className: x(
|
|
286
330
|
"flex gap-4 flex-wrap",
|
|
287
331
|
"lg:flex-row lg:gap-8",
|
|
288
332
|
(e || n === "center") && "justify-center",
|
|
@@ -295,7 +339,7 @@ function j({ actions: t, center: e, className: o, align: n }) {
|
|
|
295
339
|
}
|
|
296
340
|
) : null;
|
|
297
341
|
}
|
|
298
|
-
const
|
|
342
|
+
const Fe = "section", He = Ut(g)`
|
|
299
343
|
overflow: hidden;
|
|
300
344
|
|
|
301
345
|
.section__title {
|
|
@@ -346,7 +390,7 @@ const ze = "section", Re = Et(f)`
|
|
|
346
390
|
margin-bottom: 0.5rem;
|
|
347
391
|
}
|
|
348
392
|
}
|
|
349
|
-
@media (min-width: ${({ theme: t }) => t.breakpoints.values[
|
|
393
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[Fe]}px) {
|
|
350
394
|
.section__tag {
|
|
351
395
|
margin-bottom: 32px;
|
|
352
396
|
}
|
|
@@ -358,7 +402,7 @@ const ze = "section", Re = Et(f)`
|
|
|
358
402
|
}
|
|
359
403
|
}
|
|
360
404
|
`;
|
|
361
|
-
function
|
|
405
|
+
function et({
|
|
362
406
|
title: t,
|
|
363
407
|
description: e,
|
|
364
408
|
descriptionMarkdown: o,
|
|
@@ -373,72 +417,72 @@ function X({
|
|
|
373
417
|
center: m,
|
|
374
418
|
logo: h,
|
|
375
419
|
titleAppearance: u,
|
|
376
|
-
descriptionAppearance:
|
|
377
|
-
...
|
|
420
|
+
descriptionAppearance: b,
|
|
421
|
+
...f
|
|
378
422
|
}) {
|
|
379
|
-
const
|
|
423
|
+
const y = Ct();
|
|
380
424
|
if (!t && !e && !n && !p && !d && !c && !s && !h) return null;
|
|
381
|
-
const
|
|
425
|
+
const k = Math.max(Math.min(5, l + 1), 1), $ = {
|
|
382
426
|
1: "xl:!text-3xl lg:!text-2xl md:!text-xl",
|
|
383
427
|
2: "xl:!text-2xl lg:!text-xl md:!text-lg",
|
|
384
428
|
3: "xl:!text-2xl lg:!text-xl md:!text-lg",
|
|
385
429
|
4: "xl:!text-xl lg:!text-lg md:!text-md",
|
|
386
430
|
5: "xl:!text-lg md:!text-md sm:!text-sm",
|
|
387
431
|
6: "!text-sm"
|
|
388
|
-
},
|
|
389
|
-
return /* @__PURE__ */ w(
|
|
432
|
+
}, C = l === 0 ? "big" : `h${k}`, S = l === 0;
|
|
433
|
+
return /* @__PURE__ */ w(He, { className: x("base-info", "lg:text-left", m && "!text-center", i), ...f, children: [
|
|
390
434
|
c && /* @__PURE__ */ r("div", { children: c }),
|
|
391
|
-
(d || p) && /* @__PURE__ */ r("div", { className:
|
|
435
|
+
(d || p) && /* @__PURE__ */ r("div", { className: x("section__tag", a?.tag || a?.badge), children: d || p }),
|
|
392
436
|
h && /* @__PURE__ */ r("img", { className: "w-[120px] m-auto mb-8", src: h, alt: "info", loading: "lazy" }),
|
|
393
437
|
t && /* @__PURE__ */ r(
|
|
394
|
-
|
|
438
|
+
L,
|
|
395
439
|
{
|
|
396
440
|
sx: {
|
|
397
441
|
whiteSpace: "pre-wrap",
|
|
398
442
|
mb: e ? "2vw" : 0,
|
|
399
|
-
...u?.color && { color: `${
|
|
443
|
+
...u?.color && { color: `${y(u.color)} !important` }
|
|
400
444
|
},
|
|
401
|
-
className:
|
|
445
|
+
className: x(
|
|
402
446
|
"section__title",
|
|
403
447
|
"text-gray-800",
|
|
404
448
|
"dark:text-gray-50",
|
|
405
449
|
a.title,
|
|
406
450
|
"page-kit-section__title",
|
|
407
|
-
|
|
451
|
+
S ? "" : "section__title_non_big"
|
|
408
452
|
),
|
|
409
453
|
component: `h${Math.max(l, 1)}`,
|
|
410
|
-
variant:
|
|
454
|
+
variant: C,
|
|
411
455
|
children: t
|
|
412
456
|
}
|
|
413
457
|
),
|
|
414
458
|
e && (o ? /* @__PURE__ */ r(
|
|
415
|
-
|
|
459
|
+
g,
|
|
416
460
|
{
|
|
417
461
|
sx: {
|
|
418
|
-
...
|
|
462
|
+
...b?.color && { color: `${y(b.color)} !important` }
|
|
419
463
|
},
|
|
420
|
-
className:
|
|
464
|
+
className: x(
|
|
421
465
|
"section__description",
|
|
422
466
|
"text-gray-800",
|
|
423
467
|
"dark:text-gray-100",
|
|
424
|
-
k
|
|
468
|
+
$[k],
|
|
425
469
|
a.description,
|
|
426
470
|
"page-kit-section__description"
|
|
427
471
|
),
|
|
428
|
-
children: /* @__PURE__ */ r(
|
|
472
|
+
children: /* @__PURE__ */ r(ne, { codeOptions: { showActionButton: !1, theme: re }, children: e })
|
|
429
473
|
}
|
|
430
474
|
) : /* @__PURE__ */ r(
|
|
431
|
-
|
|
475
|
+
L,
|
|
432
476
|
{
|
|
433
477
|
sx: {
|
|
434
478
|
whiteSpace: "pre-wrap",
|
|
435
|
-
...
|
|
479
|
+
...b?.color && { color: `${y(b.color)} !important` }
|
|
436
480
|
},
|
|
437
|
-
className:
|
|
481
|
+
className: x(
|
|
438
482
|
"section__description",
|
|
439
483
|
"text-gray-800",
|
|
440
484
|
"dark:text-gray-100",
|
|
441
|
-
k
|
|
485
|
+
$[k],
|
|
442
486
|
a.description,
|
|
443
487
|
"page-kit-section__description"
|
|
444
488
|
),
|
|
@@ -448,11 +492,11 @@ function X({
|
|
|
448
492
|
children: e
|
|
449
493
|
}
|
|
450
494
|
)),
|
|
451
|
-
/* @__PURE__ */ r(
|
|
495
|
+
/* @__PURE__ */ r(A, { actions: n, center: m, className: "mt-8" }),
|
|
452
496
|
s && /* @__PURE__ */ r("div", { children: s })
|
|
453
497
|
] });
|
|
454
498
|
}
|
|
455
|
-
const
|
|
499
|
+
const ot = [
|
|
456
500
|
"actions",
|
|
457
501
|
"append",
|
|
458
502
|
"badge",
|
|
@@ -467,28 +511,28 @@ const q = [
|
|
|
467
511
|
"titleAppearance",
|
|
468
512
|
"descriptionAppearance"
|
|
469
513
|
];
|
|
470
|
-
function
|
|
514
|
+
function De() {
|
|
471
515
|
const t = navigator.userAgent.toLowerCase();
|
|
472
516
|
return t.includes("safari") && !t.includes("chrome");
|
|
473
517
|
}
|
|
474
|
-
function
|
|
518
|
+
function Ge(t = "") {
|
|
475
519
|
if (t.startsWith("data:image/svg+xml,")) return !0;
|
|
476
520
|
const e = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/, o = /^(\/|\.\/|\.\.\/)(?:[^/]+\/)*[^/]+$/;
|
|
477
521
|
return e.test(t) || o.test(t);
|
|
478
522
|
}
|
|
479
|
-
function
|
|
523
|
+
function O(t) {
|
|
480
524
|
return t?.endsWith(".mp4") || t?.endsWith(".m4v") || t?.endsWith(".webm");
|
|
481
525
|
}
|
|
482
|
-
function
|
|
526
|
+
function Ye(t) {
|
|
483
527
|
return t?.endsWith(".mp4") || t?.endsWith(".m4v") ? "video/mp4" : t?.endsWith(".webm") ? "video/webm" : void 0;
|
|
484
528
|
}
|
|
485
|
-
function
|
|
529
|
+
function Ve(t) {
|
|
486
530
|
let e = {};
|
|
487
|
-
return typeof t == "string" ?
|
|
531
|
+
return typeof t == "string" ? se(t) ? e.image = t : (e.image = M(t), le(t) && (e.color = t, e.image = "")) : e = t, e;
|
|
488
532
|
}
|
|
489
|
-
function
|
|
490
|
-
const [t, e] =
|
|
491
|
-
return
|
|
533
|
+
function Je() {
|
|
534
|
+
const [t, e] = Z(Date.now());
|
|
535
|
+
return H(() => {
|
|
492
536
|
const o = () => {
|
|
493
537
|
e(Date.now());
|
|
494
538
|
};
|
|
@@ -497,14 +541,14 @@ function Oe() {
|
|
|
497
541
|
};
|
|
498
542
|
}, []), t;
|
|
499
543
|
}
|
|
500
|
-
function
|
|
544
|
+
function gt(t, e, o, n, i) {
|
|
501
545
|
let a = null;
|
|
502
|
-
const { color: c = "", image: s } =
|
|
503
|
-
if (s &&
|
|
546
|
+
const { color: c = "", image: s } = Ve(e);
|
|
547
|
+
if (s && Ge(s)) {
|
|
504
548
|
delete o.backgroundColor;
|
|
505
|
-
const l = !(t.mobile.apple.device ||
|
|
549
|
+
const l = !(t.mobile.apple.device || De()) && O(s), d = O(s) && n ? z(M(n), 1200, "quality") : "";
|
|
506
550
|
l ? a = /* @__PURE__ */ r(
|
|
507
|
-
|
|
551
|
+
g,
|
|
508
552
|
{
|
|
509
553
|
component: "video",
|
|
510
554
|
className: "section-bg",
|
|
@@ -514,7 +558,7 @@ function dt(t, e, o, n, i) {
|
|
|
514
558
|
controls: !1,
|
|
515
559
|
playsInline: !0,
|
|
516
560
|
poster: d,
|
|
517
|
-
src:
|
|
561
|
+
src: O(s) ? s : z(s, 1200, "quality"),
|
|
518
562
|
sx: {
|
|
519
563
|
width: "100%",
|
|
520
564
|
position: "absolute",
|
|
@@ -528,9 +572,9 @@ function dt(t, e, o, n, i) {
|
|
|
528
572
|
},
|
|
529
573
|
s
|
|
530
574
|
) : a = /* @__PURE__ */ r(
|
|
531
|
-
|
|
575
|
+
Nt,
|
|
532
576
|
{
|
|
533
|
-
src:
|
|
577
|
+
src: O(s) && n ? d : s,
|
|
534
578
|
sizesAttr: {
|
|
535
579
|
sm: 600,
|
|
536
580
|
md: 900,
|
|
@@ -556,9 +600,9 @@ function dt(t, e, o, n, i) {
|
|
|
556
600
|
} else s ? o.backgroundImage = `${s} !important` : c && (o.backgroundColor = `${c} !important`);
|
|
557
601
|
return a;
|
|
558
602
|
}
|
|
559
|
-
function
|
|
603
|
+
function Ke({ autoWidth: t, children: e, ...o }) {
|
|
560
604
|
return t ? /* @__PURE__ */ r(
|
|
561
|
-
|
|
605
|
+
g,
|
|
562
606
|
{
|
|
563
607
|
...o,
|
|
564
608
|
sx: [
|
|
@@ -569,9 +613,9 @@ function Ue({ autoWidth: t, children: e, ...o }) {
|
|
|
569
613
|
],
|
|
570
614
|
children: e
|
|
571
615
|
}
|
|
572
|
-
) : /* @__PURE__ */ r(
|
|
616
|
+
) : /* @__PURE__ */ r(Ft, { ...o, children: e });
|
|
573
617
|
}
|
|
574
|
-
function
|
|
618
|
+
function nt({
|
|
575
619
|
dark: t = !1,
|
|
576
620
|
children: e,
|
|
577
621
|
className: o,
|
|
@@ -582,30 +626,30 @@ function Q({
|
|
|
582
626
|
type: s,
|
|
583
627
|
...l
|
|
584
628
|
}) {
|
|
585
|
-
const d = { ...n }, p =
|
|
586
|
-
t && (d.color =
|
|
587
|
-
const m =
|
|
629
|
+
const d = { ...n }, p = Bt((u) => u.breakpoints.down("md"));
|
|
630
|
+
t && (d.color = ht.common.white, d.backgroundColor = `${ht.grey[900]} !important`), i.show && (d.display = "flex");
|
|
631
|
+
const m = N(() => !Number(l.boxMaxWidth) || p ? {
|
|
588
632
|
width: "100%"
|
|
589
633
|
} : s === "wall" && l.boxMaxWidth ? {
|
|
590
634
|
maxWidth: `${l.boxMaxWidth}px !important`,
|
|
591
635
|
width: "100%"
|
|
592
636
|
} : {
|
|
593
637
|
width: "100%"
|
|
594
|
-
}, [l.boxMaxWidth, p, s]), h =
|
|
638
|
+
}, [l.boxMaxWidth, p, s]), h = Q({
|
|
595
639
|
type: "baseSectionPaddingY",
|
|
596
640
|
value: a || "normal",
|
|
597
641
|
// section default is normal
|
|
598
642
|
defaultValue: ""
|
|
599
643
|
});
|
|
600
644
|
return /* @__PURE__ */ r(
|
|
601
|
-
|
|
645
|
+
Xe,
|
|
602
646
|
{
|
|
603
647
|
component: "section",
|
|
604
648
|
styles: { ...d, ...h },
|
|
605
|
-
className:
|
|
649
|
+
className: x("base-section", "px-2 md:px-5 lg:px-5 xl:px-10", o, {
|
|
606
650
|
dark: t
|
|
607
651
|
}),
|
|
608
|
-
...
|
|
652
|
+
...B(
|
|
609
653
|
l,
|
|
610
654
|
"hoverStyle",
|
|
611
655
|
"boxMaxWidth",
|
|
@@ -616,11 +660,11 @@ function Q({
|
|
|
616
660
|
"titleAppearance",
|
|
617
661
|
"descriptionAppearance"
|
|
618
662
|
),
|
|
619
|
-
children: /* @__PURE__ */ r(
|
|
663
|
+
children: /* @__PURE__ */ r(Ke, { autoWidth: l?.autoWidth, className: x("section-content h-full"), sx: m, children: i.show ? /* @__PURE__ */ r(zt, { ...c, boxed: i, children: e }) : e })
|
|
620
664
|
}
|
|
621
665
|
);
|
|
622
666
|
}
|
|
623
|
-
function
|
|
667
|
+
function zt({
|
|
624
668
|
background: t = "",
|
|
625
669
|
backgroundVideoPoster: e,
|
|
626
670
|
children: o,
|
|
@@ -630,30 +674,30 @@ function It({
|
|
|
630
674
|
styles: c = {},
|
|
631
675
|
...s
|
|
632
676
|
}) {
|
|
633
|
-
const l = { ...c, ...n }, d =
|
|
677
|
+
const l = { ...c, ...n }, d = Ct();
|
|
634
678
|
let p = null;
|
|
635
|
-
const m =
|
|
636
|
-
return t && (p =
|
|
679
|
+
const m = Bt((b) => b.breakpoints.up("sm")), h = ie(), u = Je();
|
|
680
|
+
return t && (p = gt(
|
|
637
681
|
h,
|
|
638
682
|
typeof t == "string" ? d(t) : t,
|
|
639
683
|
l,
|
|
640
684
|
e,
|
|
641
685
|
u
|
|
642
|
-
)), i.show && (l.borderRadius = "10px", l.padding === void 0 && (l.padding = m ? "50px" : "20px"), i?.border && (l.border = "1px solid #c0c0c0"), i?.background && (p =
|
|
686
|
+
)), i.show && (l.borderRadius = "10px", l.padding === void 0 && (l.padding = m ? "50px" : "20px"), i?.border && (l.border = "1px solid #c0c0c0"), i?.background && (p = gt(
|
|
643
687
|
h,
|
|
644
688
|
typeof i?.background == "string" ? d(i?.background) : i?.background,
|
|
645
689
|
l,
|
|
646
690
|
i?.backgroundVideoPoster,
|
|
647
691
|
u
|
|
648
692
|
))), /* @__PURE__ */ w(
|
|
649
|
-
|
|
693
|
+
g,
|
|
650
694
|
{
|
|
651
695
|
...s,
|
|
652
696
|
sx: {
|
|
653
697
|
...l,
|
|
654
698
|
...p ? { position: "relative", overflow: "hidden", zIndex: 0 } : {}
|
|
655
699
|
},
|
|
656
|
-
className:
|
|
700
|
+
className: x(a, i?.boxShadow && "shadow-xl"),
|
|
657
701
|
children: [
|
|
658
702
|
p,
|
|
659
703
|
o
|
|
@@ -661,7 +705,7 @@ function It({
|
|
|
661
705
|
}
|
|
662
706
|
);
|
|
663
707
|
}
|
|
664
|
-
const
|
|
708
|
+
const Xe = _(zt)`
|
|
665
709
|
&:nth-of-type(even) {
|
|
666
710
|
background: #f8f8f8;
|
|
667
711
|
}
|
|
@@ -678,15 +722,15 @@ const He = _(It)`
|
|
|
678
722
|
}
|
|
679
723
|
}
|
|
680
724
|
`;
|
|
681
|
-
function
|
|
682
|
-
if (t.type ===
|
|
683
|
-
const o = (t.props.children || []).filter((n) =>
|
|
684
|
-
return o.length === 1 ?
|
|
725
|
+
function Rt(t) {
|
|
726
|
+
if (t.type === Qt) {
|
|
727
|
+
const o = (t.props.children || []).filter((n) => _t(n));
|
|
728
|
+
return o.length === 1 ? Rt(o[0]) : o.length > 1;
|
|
685
729
|
}
|
|
686
730
|
return Array.isArray(t);
|
|
687
731
|
}
|
|
688
|
-
const
|
|
689
|
-
function
|
|
732
|
+
const I = "&>*";
|
|
733
|
+
function jt({ children: t, col: e, gap: o, className: n, align: i, sx: a, type: c, ...s } = {
|
|
690
734
|
children: null,
|
|
691
735
|
className: "",
|
|
692
736
|
col: 3,
|
|
@@ -695,7 +739,7 @@ function Pt({ children: t, col: e, gap: o, className: n, align: i, sx: a, type:
|
|
|
695
739
|
align: "center",
|
|
696
740
|
type: "default"
|
|
697
741
|
}) {
|
|
698
|
-
const l =
|
|
742
|
+
const l = $t(), d = Number(Math.floor(100 / e * 100) / 100), p = {
|
|
699
743
|
center: "justify-center items-center",
|
|
700
744
|
left: "justify-start items-center",
|
|
701
745
|
right: "justify-end items-center",
|
|
@@ -713,43 +757,43 @@ function Pt({ children: t, col: e, gap: o, className: n, align: i, sx: a, type:
|
|
|
713
757
|
5: 3,
|
|
714
758
|
6: 3
|
|
715
759
|
}[e] || 0);
|
|
716
|
-
|
|
717
|
-
const
|
|
718
|
-
let
|
|
719
|
-
const
|
|
720
|
-
switch (
|
|
760
|
+
Rt(t) || (u = 0);
|
|
761
|
+
const f = (e - 1) * u / e;
|
|
762
|
+
let y = { ...a, gap: `${u}rem` };
|
|
763
|
+
const k = { [I]: { width: "100%" } }, $ = {}, C = {}, S = {};
|
|
764
|
+
switch (k.gap = "1rem", $.gap = `${u / 2}rem`, e) {
|
|
721
765
|
case 3:
|
|
722
766
|
case 4:
|
|
723
|
-
|
|
767
|
+
$[I] = {
|
|
724
768
|
width: `calc(50% - ${u / 2}rem)`
|
|
725
769
|
};
|
|
726
770
|
break;
|
|
727
771
|
case 5:
|
|
728
772
|
case 6:
|
|
729
|
-
|
|
773
|
+
k[I] = {
|
|
730
774
|
width: `calc(50% - ${u / 2 / 2}rem)`
|
|
731
|
-
},
|
|
775
|
+
}, $[I] = {
|
|
732
776
|
width: `calc(50% - ${u / 2 / 2}rem)`
|
|
733
|
-
},
|
|
777
|
+
}, C[I] = {
|
|
734
778
|
width: `calc(33.33% - ${u * 2 / 3}rem)`
|
|
735
779
|
};
|
|
736
780
|
break;
|
|
737
781
|
}
|
|
738
|
-
return
|
|
782
|
+
return y[I] = { width: `calc(${d}% - ${f}rem)` }, y[`@media (max-width: ${l.breakpoints.values.xl}px)`] = S, y[`@media (max-width: ${l.breakpoints.values.lg}px)`] = C, y[`@media (max-width: ${l.breakpoints.values.md}px)`] = $, y[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k, c === "wall" && (y = { ...a, gap: `${u}rem` }, y[I] = { width: `calc(${d}% - ${f}rem)` }, k[I] = { width: `calc(45% - ${u / 2 / 2}rem)` }, y[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k), /* @__PURE__ */ r(g, { className: x("flex flex-wrap flex-row h-full", m, n), sx: y, ...s, children: t });
|
|
739
783
|
}
|
|
740
|
-
function
|
|
784
|
+
function E({ type: t = "", icon: e = "", size: o = "3rem", className: n = "", ...i }) {
|
|
741
785
|
return /* @__PURE__ */ r(
|
|
742
|
-
|
|
786
|
+
st,
|
|
743
787
|
{
|
|
744
788
|
icon: e || t,
|
|
745
789
|
size: o,
|
|
746
|
-
className:
|
|
790
|
+
className: x("content-icon", n),
|
|
747
791
|
...i,
|
|
748
792
|
color: typeof i.color > "u" ? "inherit" : i.color
|
|
749
793
|
}
|
|
750
794
|
);
|
|
751
795
|
}
|
|
752
|
-
function
|
|
796
|
+
function qe({
|
|
753
797
|
to: t,
|
|
754
798
|
base: e,
|
|
755
799
|
children: o,
|
|
@@ -760,33 +804,33 @@ function Fe({
|
|
|
760
804
|
useRouterLink: s,
|
|
761
805
|
...l
|
|
762
806
|
}) {
|
|
763
|
-
const { pages: d = [], locale: p = "" } = {}, m = e ?
|
|
764
|
-
let h = a === "auto" ? "_self" : a, u =
|
|
765
|
-
const
|
|
807
|
+
const { pages: d = [], locale: p = "" } = {}, m = e ? K("/", e) : e || "";
|
|
808
|
+
let h = a === "auto" ? "_self" : a, u = K(m, t);
|
|
809
|
+
const b = c ? at(u) : !1;
|
|
766
810
|
if (e)
|
|
767
|
-
return u =
|
|
811
|
+
return u = K(m, p, t), /* @__PURE__ */ r(
|
|
768
812
|
"a",
|
|
769
813
|
{
|
|
770
814
|
className: `no-underline ${n}`,
|
|
771
|
-
href:
|
|
815
|
+
href: rt(u),
|
|
772
816
|
rel: "noreferrer noopener",
|
|
773
817
|
target: h,
|
|
774
818
|
...l,
|
|
775
819
|
children: o
|
|
776
820
|
}
|
|
777
821
|
);
|
|
778
|
-
if (
|
|
822
|
+
if (at(t))
|
|
779
823
|
a === "auto" && (h = "_blank"), u = t;
|
|
780
824
|
else {
|
|
781
|
-
|
|
782
|
-
const
|
|
783
|
-
if (s ||
|
|
825
|
+
ce(u) && (u = K(window.location.pathname, u));
|
|
826
|
+
const f = de(`${window.location.origin}${u}`), y = d.some((k) => k.pathname === f.pathname);
|
|
827
|
+
if (s || y)
|
|
784
828
|
return /* @__PURE__ */ r(
|
|
785
|
-
|
|
829
|
+
te,
|
|
786
830
|
{
|
|
787
831
|
end: !0,
|
|
788
|
-
to:
|
|
789
|
-
className: ({ isActive:
|
|
832
|
+
to: rt(u),
|
|
833
|
+
className: ({ isActive: k }) => x(n, k ? i : ""),
|
|
790
834
|
...l,
|
|
791
835
|
children: o
|
|
792
836
|
}
|
|
@@ -796,18 +840,18 @@ function Fe({
|
|
|
796
840
|
"a",
|
|
797
841
|
{
|
|
798
842
|
className: `no-underline ${n}`,
|
|
799
|
-
href:
|
|
843
|
+
href: rt(u),
|
|
800
844
|
rel: "noreferrer noopener",
|
|
801
845
|
target: h,
|
|
802
846
|
...l,
|
|
803
847
|
children: [
|
|
804
848
|
o,
|
|
805
|
-
|
|
849
|
+
b && /* @__PURE__ */ r(E, { icon: "i-mdi:arrow-top-right", size: "0.9em", className: "smart-link__mark", style: { marginLeft: 5 } })
|
|
806
850
|
]
|
|
807
851
|
}
|
|
808
852
|
);
|
|
809
853
|
}
|
|
810
|
-
function
|
|
854
|
+
function D({
|
|
811
855
|
prepend: t,
|
|
812
856
|
append: e,
|
|
813
857
|
children: o,
|
|
@@ -817,22 +861,22 @@ function O({
|
|
|
817
861
|
...c
|
|
818
862
|
}) {
|
|
819
863
|
let s = {};
|
|
820
|
-
const { pages: l = [] } =
|
|
864
|
+
const { pages: l = [] } = Wt(), d = l.find((h) => h.id === c.link), p = !o || qt.Children.toArray(o).every((h) => h === null);
|
|
821
865
|
c.link && (s = {
|
|
822
|
-
component:
|
|
866
|
+
component: qe,
|
|
823
867
|
to: d?.path || c.link,
|
|
824
868
|
useRouterLink: !0
|
|
825
869
|
});
|
|
826
|
-
const m =
|
|
870
|
+
const m = Ht();
|
|
827
871
|
return /* @__PURE__ */ w(
|
|
828
|
-
|
|
872
|
+
Qe,
|
|
829
873
|
{
|
|
830
|
-
className:
|
|
874
|
+
className: x("base-card card", { dark: i, "border-transparent": !a }, n),
|
|
831
875
|
sx: {
|
|
832
876
|
borderColor: m.palette.divider
|
|
833
877
|
},
|
|
834
878
|
...s,
|
|
835
|
-
...
|
|
879
|
+
...B(c, ["listType", "dark", "iconColor", "link", "hoverStyle", "imageSize"]),
|
|
836
880
|
children: [
|
|
837
881
|
t,
|
|
838
882
|
!p && /* @__PURE__ */ r("div", { className: "card__body", children: o }),
|
|
@@ -841,7 +885,7 @@ function O({
|
|
|
841
885
|
}
|
|
842
886
|
);
|
|
843
887
|
}
|
|
844
|
-
const
|
|
888
|
+
const Qe = _(g)`
|
|
845
889
|
&.base-card {
|
|
846
890
|
text-align: left;
|
|
847
891
|
border-width: 1px;
|
|
@@ -857,18 +901,18 @@ const Ye = _(f)`
|
|
|
857
901
|
padding: 15px 15px;
|
|
858
902
|
}
|
|
859
903
|
`;
|
|
860
|
-
function
|
|
904
|
+
function G({
|
|
861
905
|
align: t = "left",
|
|
862
906
|
title: e,
|
|
863
907
|
titleProps: o = {},
|
|
864
908
|
description: n,
|
|
865
909
|
descriptionProps: i = {}
|
|
866
910
|
}) {
|
|
867
|
-
return /* @__PURE__ */ w(
|
|
911
|
+
return /* @__PURE__ */ w(q, { children: [
|
|
868
912
|
e && /* @__PURE__ */ r(
|
|
869
|
-
|
|
913
|
+
L,
|
|
870
914
|
{
|
|
871
|
-
className:
|
|
915
|
+
className: x("card__title text-gray-800", "dark:text-gray-50"),
|
|
872
916
|
component: "h5",
|
|
873
917
|
variant: "h5",
|
|
874
918
|
gutterBottom: !0,
|
|
@@ -878,9 +922,9 @@ function U({
|
|
|
878
922
|
}
|
|
879
923
|
),
|
|
880
924
|
n && /* @__PURE__ */ r(
|
|
881
|
-
|
|
925
|
+
L,
|
|
882
926
|
{
|
|
883
|
-
className:
|
|
927
|
+
className: x("card__description", "text-gray-500", "dark:text-gray-400"),
|
|
884
928
|
component: "div",
|
|
885
929
|
variant: "body1",
|
|
886
930
|
gutterBottom: !0,
|
|
@@ -891,7 +935,7 @@ function U({
|
|
|
891
935
|
)
|
|
892
936
|
] });
|
|
893
937
|
}
|
|
894
|
-
function
|
|
938
|
+
function Ze({
|
|
895
939
|
image: t,
|
|
896
940
|
title: e,
|
|
897
941
|
description: o,
|
|
@@ -904,14 +948,14 @@ function Ve({
|
|
|
904
948
|
align: d,
|
|
905
949
|
...p
|
|
906
950
|
}) {
|
|
907
|
-
const m =
|
|
951
|
+
const m = pt(t), h = z(M(t), 540);
|
|
908
952
|
return /* @__PURE__ */ w(
|
|
909
|
-
|
|
953
|
+
to,
|
|
910
954
|
{
|
|
911
955
|
className: "card-article",
|
|
912
956
|
...p,
|
|
913
957
|
prepend: /* @__PURE__ */ r("div", { className: "card__image__wrap", children: m && t ? /* @__PURE__ */ r(
|
|
914
|
-
|
|
958
|
+
g,
|
|
915
959
|
{
|
|
916
960
|
sx: {
|
|
917
961
|
position: "absolute",
|
|
@@ -923,7 +967,7 @@ function Ve({
|
|
|
923
967
|
alignItems: "center",
|
|
924
968
|
justifyContent: "center"
|
|
925
969
|
},
|
|
926
|
-
children: /* @__PURE__ */ r(
|
|
970
|
+
children: /* @__PURE__ */ r(E, { icon: t, color: "primary.main" })
|
|
927
971
|
}
|
|
928
972
|
) : h && /* @__PURE__ */ r(
|
|
929
973
|
"img",
|
|
@@ -940,7 +984,7 @@ function Ve({
|
|
|
940
984
|
) }),
|
|
941
985
|
children: [
|
|
942
986
|
e || o ? /* @__PURE__ */ r(
|
|
943
|
-
|
|
987
|
+
G,
|
|
944
988
|
{
|
|
945
989
|
align: d,
|
|
946
990
|
title: e,
|
|
@@ -949,12 +993,12 @@ function Ve({
|
|
|
949
993
|
descriptionProps: s
|
|
950
994
|
}
|
|
951
995
|
) : null,
|
|
952
|
-
l?.length ? /* @__PURE__ */ r(
|
|
996
|
+
l?.length ? /* @__PURE__ */ r(A, { align: d, actions: l, className: "mt-4" }) : null
|
|
953
997
|
]
|
|
954
998
|
}
|
|
955
999
|
);
|
|
956
1000
|
}
|
|
957
|
-
const
|
|
1001
|
+
const to = _(D)`
|
|
958
1002
|
${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
|
|
959
1003
|
&:hover {
|
|
960
1004
|
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
@@ -988,8 +1032,8 @@ const De = _(O)`
|
|
|
988
1032
|
height: 100%;
|
|
989
1033
|
object-position: top center;
|
|
990
1034
|
}
|
|
991
|
-
`,
|
|
992
|
-
function
|
|
1035
|
+
`, ft = "section";
|
|
1036
|
+
function xt({
|
|
993
1037
|
title: t,
|
|
994
1038
|
image: e,
|
|
995
1039
|
imageMeta: o,
|
|
@@ -1000,9 +1044,9 @@ function pt({
|
|
|
1000
1044
|
className: s = "",
|
|
1001
1045
|
...l
|
|
1002
1046
|
}) {
|
|
1003
|
-
return /* @__PURE__ */ w(
|
|
1047
|
+
return /* @__PURE__ */ w(eo, { className: x("card", `list-type-${c}`, s), align: a, ...l, children: [
|
|
1004
1048
|
e && /* @__PURE__ */ r(
|
|
1005
|
-
|
|
1049
|
+
E,
|
|
1006
1050
|
{
|
|
1007
1051
|
icon: e,
|
|
1008
1052
|
color: "primary.main",
|
|
@@ -1010,18 +1054,18 @@ function pt({
|
|
|
1010
1054
|
imageMeta: o
|
|
1011
1055
|
}
|
|
1012
1056
|
),
|
|
1013
|
-
t || n ? /* @__PURE__ */ r(
|
|
1014
|
-
i?.length ? /* @__PURE__ */ r(
|
|
1057
|
+
t || n ? /* @__PURE__ */ r(G, { align: a, title: t, description: n }) : null,
|
|
1058
|
+
i?.length ? /* @__PURE__ */ r(A, { align: a, actions: i, className: "mt-4" }) : null
|
|
1015
1059
|
] });
|
|
1016
1060
|
}
|
|
1017
|
-
const
|
|
1061
|
+
const eo = _(D)`
|
|
1018
1062
|
padding: 5vw 4vw;
|
|
1019
1063
|
box-sizing: border-box;
|
|
1020
1064
|
/* min-height: 320px; */
|
|
1021
1065
|
color: inherit !important;
|
|
1022
1066
|
border-radius: 0.5rem;
|
|
1023
1067
|
/* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
|
|
1024
|
-
@media (max-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1068
|
+
@media (max-width: ${({ theme: t }) => t.breakpoints.values[ft]}px) {
|
|
1025
1069
|
padding: 1.5rem 2rem;
|
|
1026
1070
|
}
|
|
1027
1071
|
@media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
|
|
@@ -1069,13 +1113,13 @@ const Je = _(O)`
|
|
|
1069
1113
|
}
|
|
1070
1114
|
}
|
|
1071
1115
|
|
|
1072
|
-
@media (min-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1116
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[ft]}px) {
|
|
1073
1117
|
padding: 2rem 2rem;
|
|
1074
1118
|
text-align: left;
|
|
1075
1119
|
box-sizing: border-box;
|
|
1076
1120
|
}
|
|
1077
1121
|
`;
|
|
1078
|
-
function
|
|
1122
|
+
function oo({
|
|
1079
1123
|
image: t,
|
|
1080
1124
|
title: e,
|
|
1081
1125
|
description: o,
|
|
@@ -1088,14 +1132,14 @@ function Ge({
|
|
|
1088
1132
|
align: d,
|
|
1089
1133
|
...p
|
|
1090
1134
|
}) {
|
|
1091
|
-
const m =
|
|
1135
|
+
const m = pt(t), h = z(M(t), 540);
|
|
1092
1136
|
return /* @__PURE__ */ w(
|
|
1093
|
-
|
|
1137
|
+
no,
|
|
1094
1138
|
{
|
|
1095
1139
|
className: "card-article",
|
|
1096
1140
|
...p,
|
|
1097
1141
|
prepend: /* @__PURE__ */ r("div", { className: "card__image__wrap", children: m && t ? /* @__PURE__ */ r(
|
|
1098
|
-
|
|
1142
|
+
g,
|
|
1099
1143
|
{
|
|
1100
1144
|
sx: {
|
|
1101
1145
|
position: "absolute",
|
|
@@ -1107,10 +1151,10 @@ function Ge({
|
|
|
1107
1151
|
alignItems: "center",
|
|
1108
1152
|
justifyContent: "center"
|
|
1109
1153
|
},
|
|
1110
|
-
children: /* @__PURE__ */ r(
|
|
1154
|
+
children: /* @__PURE__ */ r(E, { icon: t, color: "primary.main" })
|
|
1111
1155
|
}
|
|
1112
1156
|
) : h && /* @__PURE__ */ r(
|
|
1113
|
-
|
|
1157
|
+
g,
|
|
1114
1158
|
{
|
|
1115
1159
|
component: "img",
|
|
1116
1160
|
className: "card__image",
|
|
@@ -1130,7 +1174,7 @@ function Ge({
|
|
|
1130
1174
|
) }),
|
|
1131
1175
|
children: [
|
|
1132
1176
|
e || o ? /* @__PURE__ */ r(
|
|
1133
|
-
|
|
1177
|
+
G,
|
|
1134
1178
|
{
|
|
1135
1179
|
align: d,
|
|
1136
1180
|
title: e,
|
|
@@ -1139,12 +1183,12 @@ function Ge({
|
|
|
1139
1183
|
descriptionProps: s
|
|
1140
1184
|
}
|
|
1141
1185
|
) : null,
|
|
1142
|
-
l?.length ? /* @__PURE__ */ r(
|
|
1186
|
+
l?.length ? /* @__PURE__ */ r(A, { align: d, actions: l, className: "mt-4" }) : null
|
|
1143
1187
|
]
|
|
1144
1188
|
}
|
|
1145
1189
|
);
|
|
1146
1190
|
}
|
|
1147
|
-
const
|
|
1191
|
+
const no = _(D)`
|
|
1148
1192
|
${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
|
|
1149
1193
|
&:hover {
|
|
1150
1194
|
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
@@ -1168,8 +1212,8 @@ const Ke = _(O)`
|
|
|
1168
1212
|
.card__image {
|
|
1169
1213
|
max-height: 60px;
|
|
1170
1214
|
}
|
|
1171
|
-
`,
|
|
1172
|
-
function
|
|
1215
|
+
`, bt = "section";
|
|
1216
|
+
function ro({
|
|
1173
1217
|
title: t,
|
|
1174
1218
|
image: e,
|
|
1175
1219
|
imageMeta: o,
|
|
@@ -1180,15 +1224,15 @@ function Xe({
|
|
|
1180
1224
|
className: s = "",
|
|
1181
1225
|
...l
|
|
1182
1226
|
}) {
|
|
1183
|
-
return /* @__PURE__ */ r(
|
|
1184
|
-
e && /* @__PURE__ */ r(
|
|
1185
|
-
/* @__PURE__ */ w(
|
|
1186
|
-
/* @__PURE__ */ r(
|
|
1187
|
-
/* @__PURE__ */ r(
|
|
1227
|
+
return /* @__PURE__ */ r(io, { className: x("card", s), ...l, children: /* @__PURE__ */ w(g, { className: "flex items-center", children: [
|
|
1228
|
+
e && /* @__PURE__ */ r(E, { icon: e, color: "primary.main", size: n, imageMeta: o }),
|
|
1229
|
+
/* @__PURE__ */ w(g, { className: "flex-1 ml-4", children: [
|
|
1230
|
+
/* @__PURE__ */ r(G, { align: c, title: t, description: i }),
|
|
1231
|
+
/* @__PURE__ */ r(A, { align: c, actions: a, className: "mt-4" })
|
|
1188
1232
|
] })
|
|
1189
1233
|
] }) });
|
|
1190
1234
|
}
|
|
1191
|
-
const
|
|
1235
|
+
const io = _(D)`
|
|
1192
1236
|
padding: 5vw 4vw;
|
|
1193
1237
|
text-align: left;
|
|
1194
1238
|
box-sizing: border-box;
|
|
@@ -1196,7 +1240,7 @@ const qe = _(O)`
|
|
|
1196
1240
|
color: inherit !important;
|
|
1197
1241
|
border-radius: 0.5rem;
|
|
1198
1242
|
/* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
|
|
1199
|
-
@media (max-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1243
|
+
@media (max-width: ${({ theme: t }) => t.breakpoints.values[bt]}px) {
|
|
1200
1244
|
padding: 1.5rem 2rem;
|
|
1201
1245
|
}
|
|
1202
1246
|
@media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
|
|
@@ -1241,13 +1285,13 @@ const qe = _(O)`
|
|
|
1241
1285
|
}
|
|
1242
1286
|
}
|
|
1243
1287
|
|
|
1244
|
-
@media (min-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1288
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[bt]}px) {
|
|
1245
1289
|
padding: 2rem 2rem;
|
|
1246
1290
|
text-align: left;
|
|
1247
1291
|
box-sizing: border-box;
|
|
1248
1292
|
}
|
|
1249
1293
|
`;
|
|
1250
|
-
function
|
|
1294
|
+
function ao({
|
|
1251
1295
|
title: t,
|
|
1252
1296
|
titleProps: e = {},
|
|
1253
1297
|
description: o,
|
|
@@ -1259,10 +1303,10 @@ function Qe({
|
|
|
1259
1303
|
hoverStyle: l,
|
|
1260
1304
|
...d
|
|
1261
1305
|
}) {
|
|
1262
|
-
return /* @__PURE__ */ w(
|
|
1263
|
-
i && /* @__PURE__ */ r(
|
|
1306
|
+
return /* @__PURE__ */ w(so, { className: x("card-simple", c, `hover-style__${l}`), align: s, ...d, children: [
|
|
1307
|
+
i && /* @__PURE__ */ r(E, { icon: i, color: "primary.main", imageMeta: a }),
|
|
1264
1308
|
t || o ? /* @__PURE__ */ r(
|
|
1265
|
-
|
|
1309
|
+
G,
|
|
1266
1310
|
{
|
|
1267
1311
|
align: s,
|
|
1268
1312
|
title: t,
|
|
@@ -1273,7 +1317,7 @@ function Qe({
|
|
|
1273
1317
|
) : null
|
|
1274
1318
|
] });
|
|
1275
1319
|
}
|
|
1276
|
-
const
|
|
1320
|
+
const so = _(D)`
|
|
1277
1321
|
.card__title {
|
|
1278
1322
|
color: ${({ theme: t }) => t.palette.text.primary};
|
|
1279
1323
|
a {
|
|
@@ -1370,17 +1414,17 @@ const Ze = _(O)`
|
|
|
1370
1414
|
}
|
|
1371
1415
|
}
|
|
1372
1416
|
`;
|
|
1373
|
-
function
|
|
1417
|
+
function lo({ type: t = "default", ...e }) {
|
|
1374
1418
|
const n = {
|
|
1375
|
-
article:
|
|
1376
|
-
simple:
|
|
1377
|
-
news:
|
|
1378
|
-
default:
|
|
1379
|
-
wall:
|
|
1380
|
-
}[t] ||
|
|
1381
|
-
return /* @__PURE__ */ r(n, { ...t === "news" ? e :
|
|
1419
|
+
article: Ze,
|
|
1420
|
+
simple: ao,
|
|
1421
|
+
news: ro,
|
|
1422
|
+
default: xt,
|
|
1423
|
+
wall: oo
|
|
1424
|
+
}[t] || xt;
|
|
1425
|
+
return /* @__PURE__ */ r(n, { ...t === "news" ? e : B(e, "iconSize") });
|
|
1382
1426
|
}
|
|
1383
|
-
function
|
|
1427
|
+
function co({
|
|
1384
1428
|
list: t = [],
|
|
1385
1429
|
align: e = "top",
|
|
1386
1430
|
cards: o,
|
|
@@ -1397,23 +1441,23 @@ function eo({
|
|
|
1397
1441
|
...u
|
|
1398
1442
|
}) {
|
|
1399
1443
|
return /* @__PURE__ */ r(
|
|
1400
|
-
|
|
1444
|
+
jt,
|
|
1401
1445
|
{
|
|
1402
1446
|
type: d,
|
|
1403
|
-
className:
|
|
1447
|
+
className: x("card-list py-1", l, "items-stretch"),
|
|
1404
1448
|
col: a,
|
|
1405
1449
|
gap: c,
|
|
1406
1450
|
align: e,
|
|
1407
1451
|
...u,
|
|
1408
|
-
children: o || t.map((
|
|
1409
|
-
|
|
1452
|
+
children: o || t.map((b) => /* @__PURE__ */ r(
|
|
1453
|
+
lo,
|
|
1410
1454
|
{
|
|
1411
1455
|
borderColor: n,
|
|
1412
1456
|
iconColor: s,
|
|
1413
1457
|
type: d,
|
|
1414
1458
|
listType: i,
|
|
1415
1459
|
dark: p,
|
|
1416
|
-
...
|
|
1460
|
+
...b,
|
|
1417
1461
|
align: m,
|
|
1418
1462
|
style: c === 0 && t.length > 1 ? {
|
|
1419
1463
|
borderRadius: 0,
|
|
@@ -1421,12 +1465,12 @@ function eo({
|
|
|
1421
1465
|
marginBottom: "-1px"
|
|
1422
1466
|
} : {}
|
|
1423
1467
|
},
|
|
1424
|
-
|
|
1468
|
+
b.id
|
|
1425
1469
|
))
|
|
1426
1470
|
}
|
|
1427
1471
|
);
|
|
1428
1472
|
}
|
|
1429
|
-
const
|
|
1473
|
+
const mo = [
|
|
1430
1474
|
"align",
|
|
1431
1475
|
"cards",
|
|
1432
1476
|
"list",
|
|
@@ -1438,11 +1482,11 @@ const oo = [
|
|
|
1438
1482
|
"type",
|
|
1439
1483
|
"textAlign"
|
|
1440
1484
|
];
|
|
1441
|
-
function
|
|
1442
|
-
const o =
|
|
1485
|
+
function P(t, e) {
|
|
1486
|
+
const o = lt(t, e), n = B(t, e);
|
|
1443
1487
|
return [o, n];
|
|
1444
1488
|
}
|
|
1445
|
-
const
|
|
1489
|
+
const po = _(nt)`
|
|
1446
1490
|
a .card {
|
|
1447
1491
|
color: #404040;
|
|
1448
1492
|
cursor: pointer;
|
|
@@ -1458,14 +1502,14 @@ const no = _(Q)`
|
|
|
1458
1502
|
color: #404040;
|
|
1459
1503
|
}
|
|
1460
1504
|
`;
|
|
1461
|
-
function
|
|
1462
|
-
const [o, n] =
|
|
1463
|
-
return /* @__PURE__ */ w(
|
|
1464
|
-
Object.keys(o).length > 0 && /* @__PURE__ */ r(
|
|
1465
|
-
/* @__PURE__ */ r(
|
|
1505
|
+
function uo({ className: t, ...e }) {
|
|
1506
|
+
const [o, n] = P(e, ot), [i, a] = P(n, mo);
|
|
1507
|
+
return /* @__PURE__ */ w(po, { className: x("section--card-list", t), type: e.type, ...a, children: [
|
|
1508
|
+
Object.keys(o).length > 0 && /* @__PURE__ */ r(et, { center: !0, ...o, className: "mb-[2.5vw]" }),
|
|
1509
|
+
/* @__PURE__ */ r(co, { ...i, dark: !!e.dark })
|
|
1466
1510
|
] });
|
|
1467
1511
|
}
|
|
1468
|
-
const
|
|
1512
|
+
const ho = _(uo)`
|
|
1469
1513
|
.card__description {
|
|
1470
1514
|
white-space: pre-wrap;
|
|
1471
1515
|
}
|
|
@@ -1481,29 +1525,29 @@ const io = _(ro)`
|
|
|
1481
1525
|
background: inherit !important;
|
|
1482
1526
|
}
|
|
1483
1527
|
`;
|
|
1484
|
-
function
|
|
1485
|
-
const [{ editing: o }, n] =
|
|
1486
|
-
...
|
|
1528
|
+
function go({ section: t, ...e }) {
|
|
1529
|
+
const [{ editing: o }, n] = P(e, tt), i = N(() => ({
|
|
1530
|
+
...B(n, ["listBorder", "list", "iconSize", "imageSize"]),
|
|
1487
1531
|
list: n.list?.map((a) => ({
|
|
1488
|
-
...
|
|
1532
|
+
...B(a, "icon", "iconColor"),
|
|
1489
1533
|
image: ["news", "simple", "default"].includes(n.type) && a.icon ? a.icon : a.image,
|
|
1490
|
-
actions: a.actions?.map?.((c) => /* @__PURE__ */ r(
|
|
1534
|
+
actions: a.actions?.map?.((c) => /* @__PURE__ */ r(Lt, { ...c, editing: o }, c.id)),
|
|
1491
1535
|
border: n.listBorder,
|
|
1492
1536
|
iconSize: n.iconSize,
|
|
1493
1537
|
imageSize: n.imageSize,
|
|
1494
1538
|
hoverStyle: n.hoverStyle
|
|
1495
1539
|
}))
|
|
1496
1540
|
}), [n]);
|
|
1497
|
-
return /* @__PURE__ */ r(
|
|
1541
|
+
return /* @__PURE__ */ r(ho, { style: o ? { pointerEvents: "none" } : {}, ...i });
|
|
1498
1542
|
}
|
|
1499
|
-
function
|
|
1543
|
+
function fo({
|
|
1500
1544
|
properties: t,
|
|
1501
1545
|
section: e,
|
|
1502
1546
|
locale: o,
|
|
1503
1547
|
dev: n
|
|
1504
1548
|
}) {
|
|
1505
1549
|
return e?.config?.componentId ? /* @__PURE__ */ r(
|
|
1506
|
-
|
|
1550
|
+
ae,
|
|
1507
1551
|
{
|
|
1508
1552
|
instanceId: e.id,
|
|
1509
1553
|
componentId: e.config.componentId,
|
|
@@ -1515,14 +1559,14 @@ function so({
|
|
|
1515
1559
|
dev: n
|
|
1516
1560
|
}
|
|
1517
1561
|
) : /* @__PURE__ */ r(
|
|
1518
|
-
|
|
1562
|
+
g,
|
|
1519
1563
|
{
|
|
1520
1564
|
sx: {
|
|
1521
1565
|
textAlign: "center",
|
|
1522
1566
|
py: 2
|
|
1523
1567
|
},
|
|
1524
1568
|
children: /* @__PURE__ */ r(
|
|
1525
|
-
|
|
1569
|
+
L,
|
|
1526
1570
|
{
|
|
1527
1571
|
variant: "caption",
|
|
1528
1572
|
sx: {
|
|
@@ -1534,7 +1578,7 @@ function so({
|
|
|
1534
1578
|
}
|
|
1535
1579
|
);
|
|
1536
1580
|
}
|
|
1537
|
-
function
|
|
1581
|
+
function xo({
|
|
1538
1582
|
src: t,
|
|
1539
1583
|
dataId: e,
|
|
1540
1584
|
isEdit: o = !1,
|
|
@@ -1543,7 +1587,7 @@ function lo({
|
|
|
1543
1587
|
}
|
|
1544
1588
|
}) {
|
|
1545
1589
|
return /* @__PURE__ */ r(
|
|
1546
|
-
|
|
1590
|
+
he,
|
|
1547
1591
|
{
|
|
1548
1592
|
isEdit: o,
|
|
1549
1593
|
embedId: e,
|
|
@@ -1555,12 +1599,12 @@ function lo({
|
|
|
1555
1599
|
}
|
|
1556
1600
|
);
|
|
1557
1601
|
}
|
|
1558
|
-
function
|
|
1559
|
-
const [c, s] =
|
|
1560
|
-
return /* @__PURE__ */ w(
|
|
1561
|
-
Object.keys(c).length > 0 && /* @__PURE__ */ r(
|
|
1602
|
+
function bo({ dataId: t, src: e, actions: o, center: n, onLoad: i, ...a }) {
|
|
1603
|
+
const [c, s] = P(a, ot);
|
|
1604
|
+
return /* @__PURE__ */ w(nt, { ...s, children: [
|
|
1605
|
+
Object.keys(c).length > 0 && /* @__PURE__ */ r(et, { center: n, ...c }),
|
|
1562
1606
|
/* @__PURE__ */ r(
|
|
1563
|
-
|
|
1607
|
+
xo,
|
|
1564
1608
|
{
|
|
1565
1609
|
dataId: t,
|
|
1566
1610
|
src: e,
|
|
@@ -1568,10 +1612,10 @@ function co({ dataId: t, src: e, actions: o, center: n, onLoad: i, ...a }) {
|
|
|
1568
1612
|
height: a.iframeHeight ? `${a.iframeHeight}px` : "100%"
|
|
1569
1613
|
}
|
|
1570
1614
|
),
|
|
1571
|
-
/* @__PURE__ */ r(
|
|
1615
|
+
/* @__PURE__ */ r(A, { actions: o, center: n })
|
|
1572
1616
|
] });
|
|
1573
1617
|
}
|
|
1574
|
-
const
|
|
1618
|
+
const Mn = {
|
|
1575
1619
|
src: "",
|
|
1576
1620
|
embedUrl: "",
|
|
1577
1621
|
title: "",
|
|
@@ -1582,21 +1626,21 @@ const xn = {
|
|
|
1582
1626
|
config: {},
|
|
1583
1627
|
id: ""
|
|
1584
1628
|
};
|
|
1585
|
-
function
|
|
1586
|
-
const i = `${e}-${n.locale}`, [{ editing: a }, c] =
|
|
1587
|
-
return
|
|
1629
|
+
function yo({ section: t, id: e, src: o, ...n }) {
|
|
1630
|
+
const i = `${e}-${n.locale}`, [{ editing: a }, c] = P(n, tt), s = ct({}), l = JSON.parse(JSON.stringify(c)), { message: d } = me(i, "server"), p = pe(JSON.parse(JSON.stringify(c.config) || "{}"));
|
|
1631
|
+
return H(() => {
|
|
1588
1632
|
d && d.onInit(() => p.current);
|
|
1589
|
-
}, [d]),
|
|
1633
|
+
}, [d]), H(() => {
|
|
1590
1634
|
const m = JSON.parse(JSON.stringify(c.config) || "{}");
|
|
1591
|
-
|
|
1592
|
-
}, [d, c.config]), o ? /* @__PURE__ */ r(
|
|
1635
|
+
ue(s.current, m) || (s.current = m, d?.send("config-set", m));
|
|
1636
|
+
}, [d, c.config]), o ? /* @__PURE__ */ r(bo, { ...l, dataId: i, src: o, style: a ? { pointerEvents: "none" } : {} }) : /* @__PURE__ */ r(wo, { children: 'Please set the "src" attribute for this block' });
|
|
1593
1637
|
}
|
|
1594
|
-
const
|
|
1638
|
+
const wo = _("div")`
|
|
1595
1639
|
user-select: none;
|
|
1596
1640
|
color: #999;
|
|
1597
1641
|
padding: 8px;
|
|
1598
1642
|
height: 200px;
|
|
1599
|
-
`,
|
|
1643
|
+
`, vo = "none", ko = "none", _o = "transparent", $o = 12, So = ({
|
|
1600
1644
|
gridSettings: t,
|
|
1601
1645
|
section: e,
|
|
1602
1646
|
index: o,
|
|
@@ -1604,7 +1648,7 @@ const po = _("div")`
|
|
|
1604
1648
|
simulateMode: i = "desktop",
|
|
1605
1649
|
isBackground: a
|
|
1606
1650
|
}) => {
|
|
1607
|
-
const c = t?.[i] ?? {}, s = c[e.id], l =
|
|
1651
|
+
const c = t?.[i] ?? {}, s = c[e.id], l = Co(c);
|
|
1608
1652
|
return {
|
|
1609
1653
|
i: e.id,
|
|
1610
1654
|
static: e?.locked || a,
|
|
@@ -1625,29 +1669,37 @@ const po = _("div")`
|
|
|
1625
1669
|
maxH: 1,
|
|
1626
1670
|
maxY: l
|
|
1627
1671
|
};
|
|
1628
|
-
},
|
|
1629
|
-
const { dev: e, id: o, section: n, onBlockRender: i } = t, a = e?.mode, c =
|
|
1630
|
-
|
|
1631
|
-
|
|
1672
|
+
}, Co = (t) => Object.values(t).reduce((e, o) => Math.max(e, o.y || 0), 0) || 0, No = (t) => {
|
|
1673
|
+
const { dev: e, id: o, section: n, onBlockRender: i } = t, a = e?.mode, c = Dt((v) => v.breakpoints.down("sm")), { t: s } = ge(), { sections: l, sectionIds: d, config: p } = n, { columns: m = $o, gridSettings: h, gap: u, padding: b, background: f } = p || {}, y = N(() => Q({
|
|
1674
|
+
type: "layoutBlockGap",
|
|
1675
|
+
value: u ?? vo,
|
|
1676
|
+
format: "sx"
|
|
1677
|
+
}), [u]), k = N(() => Q({
|
|
1678
|
+
type: "layoutBlockPadding",
|
|
1679
|
+
value: b ?? ko,
|
|
1680
|
+
format: "sx"
|
|
1681
|
+
}), [b]), $ = F(
|
|
1682
|
+
(v, R = !1, Y = 0) => {
|
|
1683
|
+
if (!i || !v || !v.component || v.visibility === "hidden")
|
|
1632
1684
|
return null;
|
|
1633
|
-
const
|
|
1685
|
+
const W = So({
|
|
1634
1686
|
gridSettings: h,
|
|
1635
|
-
section:
|
|
1636
|
-
index:
|
|
1687
|
+
section: v,
|
|
1688
|
+
index: Y,
|
|
1637
1689
|
columns: m,
|
|
1638
1690
|
simulateMode: c ? "mobile" : "desktop",
|
|
1639
|
-
isBackground:
|
|
1640
|
-
}),
|
|
1691
|
+
isBackground: R
|
|
1692
|
+
}), V = W?.x ?? 0, J = W?.y ?? 0, T = W?.w ?? m, At = W?.h ?? 1, Et = W?.maxY ?? 0, Tt = !!n?.config?.backgroundSectionId;
|
|
1641
1693
|
return /* @__PURE__ */ r(
|
|
1642
|
-
|
|
1694
|
+
g,
|
|
1643
1695
|
{
|
|
1644
|
-
className:
|
|
1696
|
+
className: R ? "layout-block-background" : "layout-block-section",
|
|
1645
1697
|
sx: {
|
|
1646
1698
|
// 背景元素和普通元素都使用 grid 布局
|
|
1647
|
-
...
|
|
1699
|
+
...R ? {
|
|
1648
1700
|
// 背景元素覆盖整个网格区域
|
|
1649
1701
|
gridColumn: "1 / -1",
|
|
1650
|
-
gridRow: `1 / ${
|
|
1702
|
+
gridRow: `1 / ${Et + 1}`,
|
|
1651
1703
|
zIndex: 0,
|
|
1652
1704
|
width: "100%",
|
|
1653
1705
|
height: "100%",
|
|
@@ -1658,40 +1710,51 @@ const po = _("div")`
|
|
|
1658
1710
|
} : {
|
|
1659
1711
|
position: "relative",
|
|
1660
1712
|
// 使用 grid 定位普通元素
|
|
1661
|
-
gridColumn: `${
|
|
1713
|
+
gridColumn: `${V + 1} / span ${T}`,
|
|
1662
1714
|
// hasBackground 的话,不再 + 1,因为 background 会占用第一行
|
|
1663
|
-
gridRow: `${
|
|
1664
|
-
zIndex: 1
|
|
1715
|
+
gridRow: `${J + (Tt ? 0 : 1)} / span ${At}`,
|
|
1716
|
+
zIndex: 1,
|
|
1665
1717
|
// Ensure content is above background
|
|
1718
|
+
minWidth: 0,
|
|
1719
|
+
// 防止内容撑开网格项
|
|
1720
|
+
minHeight: 0,
|
|
1721
|
+
// 防止内容撑开网格项
|
|
1722
|
+
overflow: "hidden",
|
|
1723
|
+
// 防止子内容溢出网格项
|
|
1724
|
+
"& > .BlockBase-root": {
|
|
1725
|
+
height: "100%",
|
|
1726
|
+
width: "100%",
|
|
1727
|
+
boxSizing: "border-box"
|
|
1728
|
+
}
|
|
1666
1729
|
}
|
|
1667
1730
|
},
|
|
1668
1731
|
children: i({
|
|
1669
|
-
id:
|
|
1670
|
-
type:
|
|
1732
|
+
id: v.id,
|
|
1733
|
+
type: v.component,
|
|
1671
1734
|
config: {},
|
|
1672
1735
|
section: {
|
|
1673
|
-
...
|
|
1736
|
+
...v
|
|
1674
1737
|
},
|
|
1675
1738
|
mode: a
|
|
1676
1739
|
})
|
|
1677
1740
|
},
|
|
1678
|
-
|
|
1741
|
+
v.id
|
|
1679
1742
|
);
|
|
1680
1743
|
},
|
|
1681
1744
|
[o, a, i, h, m, c]
|
|
1682
|
-
), { backgroundElements:
|
|
1745
|
+
), { backgroundElements: C, contentElements: S } = N(() => {
|
|
1683
1746
|
if (!d || !d.length || !l || !Object.keys(l).length)
|
|
1684
1747
|
return { backgroundElements: [], contentElements: [] };
|
|
1685
|
-
const
|
|
1686
|
-
return d?.forEach((
|
|
1687
|
-
const
|
|
1688
|
-
if (!
|
|
1689
|
-
const
|
|
1690
|
-
|
|
1691
|
-
}), { backgroundElements:
|
|
1692
|
-
}, [
|
|
1693
|
-
return a === "draft" && !
|
|
1694
|
-
|
|
1748
|
+
const v = [], R = [];
|
|
1749
|
+
return d?.forEach((Y, W) => {
|
|
1750
|
+
const V = l[Y];
|
|
1751
|
+
if (!V) return;
|
|
1752
|
+
const J = n?.config?.backgroundSectionId === Y, T = $(V, J, W);
|
|
1753
|
+
T && (J ? v.push(T) : R.push(T));
|
|
1754
|
+
}), { backgroundElements: v, contentElements: R };
|
|
1755
|
+
}, [$, l, d]);
|
|
1756
|
+
return a === "draft" && !C?.length && !S?.length ? /* @__PURE__ */ w(
|
|
1757
|
+
g,
|
|
1695
1758
|
{
|
|
1696
1759
|
sx: {
|
|
1697
1760
|
gridColumn: "1 / -1",
|
|
@@ -1701,7 +1764,7 @@ const po = _("div")`
|
|
|
1701
1764
|
alignItems: "center",
|
|
1702
1765
|
justifyContent: "center",
|
|
1703
1766
|
gap: 2,
|
|
1704
|
-
border: (
|
|
1767
|
+
border: (v) => `2px dashed ${v.palette.divider}`,
|
|
1705
1768
|
borderRadius: 2,
|
|
1706
1769
|
padding: 4,
|
|
1707
1770
|
color: "text.secondary",
|
|
@@ -1710,7 +1773,7 @@ const po = _("div")`
|
|
|
1710
1773
|
},
|
|
1711
1774
|
children: [
|
|
1712
1775
|
/* @__PURE__ */ r(
|
|
1713
|
-
|
|
1776
|
+
g,
|
|
1714
1777
|
{
|
|
1715
1778
|
sx: {
|
|
1716
1779
|
fontSize: "48px",
|
|
@@ -1720,7 +1783,7 @@ const po = _("div")`
|
|
|
1720
1783
|
}
|
|
1721
1784
|
),
|
|
1722
1785
|
/* @__PURE__ */ r(
|
|
1723
|
-
|
|
1786
|
+
g,
|
|
1724
1787
|
{
|
|
1725
1788
|
sx: {
|
|
1726
1789
|
fontSize: "16px",
|
|
@@ -1731,7 +1794,7 @@ const po = _("div")`
|
|
|
1731
1794
|
}
|
|
1732
1795
|
),
|
|
1733
1796
|
/* @__PURE__ */ r(
|
|
1734
|
-
|
|
1797
|
+
g,
|
|
1735
1798
|
{
|
|
1736
1799
|
sx: {
|
|
1737
1800
|
opacity: 0.7,
|
|
@@ -1741,7 +1804,7 @@ const po = _("div")`
|
|
|
1741
1804
|
}
|
|
1742
1805
|
),
|
|
1743
1806
|
/* @__PURE__ */ r(
|
|
1744
|
-
|
|
1807
|
+
g,
|
|
1745
1808
|
{
|
|
1746
1809
|
sx: {
|
|
1747
1810
|
position: "absolute",
|
|
@@ -1751,13 +1814,13 @@ const po = _("div")`
|
|
|
1751
1814
|
bottom: 0,
|
|
1752
1815
|
pointerEvents: "none",
|
|
1753
1816
|
opacity: 0.1,
|
|
1754
|
-
background: (
|
|
1817
|
+
background: (v) => `
|
|
1755
1818
|
repeating-linear-gradient(
|
|
1756
1819
|
90deg,
|
|
1757
1820
|
transparent,
|
|
1758
1821
|
transparent calc(100% / ${m} - 1px),
|
|
1759
|
-
${
|
|
1760
|
-
${
|
|
1822
|
+
${v.palette.grey[400]} calc(100% / ${m} - 1px),
|
|
1823
|
+
${v.palette.grey[400]} calc(100% / ${m})
|
|
1761
1824
|
)
|
|
1762
1825
|
`
|
|
1763
1826
|
}
|
|
@@ -1766,24 +1829,32 @@ const po = _("div")`
|
|
|
1766
1829
|
]
|
|
1767
1830
|
}
|
|
1768
1831
|
) : /* @__PURE__ */ w(
|
|
1769
|
-
|
|
1832
|
+
g,
|
|
1770
1833
|
{
|
|
1771
1834
|
sx: {
|
|
1772
1835
|
position: "relative",
|
|
1773
1836
|
display: "grid",
|
|
1774
|
-
gridTemplateColumns: `repeat(${m}, 1fr)`,
|
|
1775
|
-
alignItems: "
|
|
1837
|
+
gridTemplateColumns: `repeat(${m}, minmax(0, 1fr))`,
|
|
1838
|
+
alignItems: "stretch",
|
|
1839
|
+
alignContent: "start",
|
|
1776
1840
|
width: "100%",
|
|
1777
|
-
height: "100%"
|
|
1841
|
+
height: "100%",
|
|
1842
|
+
minWidth: 0,
|
|
1843
|
+
bgcolor: f ?? _o,
|
|
1844
|
+
boxSizing: "border-box",
|
|
1845
|
+
overflow: "hidden",
|
|
1846
|
+
// Prevent content overflow
|
|
1847
|
+
...y,
|
|
1848
|
+
...k
|
|
1778
1849
|
},
|
|
1779
1850
|
children: [
|
|
1780
|
-
|
|
1781
|
-
|
|
1851
|
+
C,
|
|
1852
|
+
S
|
|
1782
1853
|
]
|
|
1783
1854
|
}
|
|
1784
1855
|
);
|
|
1785
|
-
},
|
|
1786
|
-
function
|
|
1856
|
+
}, Bo = ["title", "description", "actions", "badge", "tag", "prepend", "append", "logo"];
|
|
1857
|
+
function Mo({
|
|
1787
1858
|
image: t,
|
|
1788
1859
|
imageBorder: e,
|
|
1789
1860
|
imageShadow: o,
|
|
@@ -1792,10 +1863,10 @@ function bo({
|
|
|
1792
1863
|
fullSizeImage: a,
|
|
1793
1864
|
...c
|
|
1794
1865
|
}) {
|
|
1795
|
-
const [s, l] =
|
|
1796
|
-
|
|
1866
|
+
const [s, l] = P(c, ot), d = Object.keys(s).length > 0 && Object.values(lt(s, Bo)).filter(Boolean).length > 0 && /* @__PURE__ */ r(et, { ...s }), p = _t(t) ? t : /* @__PURE__ */ r(g, { component: "img", src: t, alt: "", className: "block" }), m = ["phone", "macbook"].includes(e), h = t && /* @__PURE__ */ r(
|
|
1867
|
+
g,
|
|
1797
1868
|
{
|
|
1798
|
-
className:
|
|
1869
|
+
className: x(
|
|
1799
1870
|
"section__image",
|
|
1800
1871
|
"m-auto, leading-[1] text-center",
|
|
1801
1872
|
o && "shadow-xl",
|
|
@@ -1810,17 +1881,17 @@ function bo({
|
|
|
1810
1881
|
},
|
|
1811
1882
|
children: m ? (
|
|
1812
1883
|
// @ts-ignore
|
|
1813
|
-
/* @__PURE__ */ r(
|
|
1884
|
+
/* @__PURE__ */ r(fe, { type: e, sx: { width: "100%" }, children: p })
|
|
1814
1885
|
) : p
|
|
1815
1886
|
}
|
|
1816
1887
|
);
|
|
1817
1888
|
return /* @__PURE__ */ r(
|
|
1818
|
-
|
|
1889
|
+
nt,
|
|
1819
1890
|
{
|
|
1820
|
-
className:
|
|
1891
|
+
className: x(
|
|
1821
1892
|
"section--block",
|
|
1822
1893
|
n,
|
|
1823
|
-
a && !i &&
|
|
1894
|
+
a && !i && it`
|
|
1824
1895
|
.section-bg {
|
|
1825
1896
|
height: 80%;
|
|
1826
1897
|
}
|
|
@@ -1829,10 +1900,10 @@ function bo({
|
|
|
1829
1900
|
...l,
|
|
1830
1901
|
boxProps: a ? { sx: { padding: 0, overflow: "hidden" } } : void 0,
|
|
1831
1902
|
children: /* @__PURE__ */ r(
|
|
1832
|
-
|
|
1903
|
+
jt,
|
|
1833
1904
|
{
|
|
1834
1905
|
col: t ? 2 : 1,
|
|
1835
|
-
className: a ?
|
|
1906
|
+
className: a ? it`
|
|
1836
1907
|
display: flex;
|
|
1837
1908
|
flex-direction: column;
|
|
1838
1909
|
|
|
@@ -1846,10 +1917,10 @@ function bo({
|
|
|
1846
1917
|
}
|
|
1847
1918
|
}
|
|
1848
1919
|
` : void 0,
|
|
1849
|
-
children: i ? /* @__PURE__ */ w(
|
|
1920
|
+
children: i ? /* @__PURE__ */ w(q, { children: [
|
|
1850
1921
|
h,
|
|
1851
1922
|
d
|
|
1852
|
-
] }) : /* @__PURE__ */ w(
|
|
1923
|
+
] }) : /* @__PURE__ */ w(q, { children: [
|
|
1853
1924
|
d,
|
|
1854
1925
|
h
|
|
1855
1926
|
] })
|
|
@@ -1858,7 +1929,7 @@ function bo({
|
|
|
1858
1929
|
}
|
|
1859
1930
|
);
|
|
1860
1931
|
}
|
|
1861
|
-
const
|
|
1932
|
+
const Po = [
|
|
1862
1933
|
/youtu\.be\/([^#&?]{11})/,
|
|
1863
1934
|
// youtu.be/<id>
|
|
1864
1935
|
/\?v=([^#&?]{11})/,
|
|
@@ -1870,51 +1941,51 @@ const yo = [
|
|
|
1870
1941
|
/\/v\/([^#&?]{11})/
|
|
1871
1942
|
// /v/<id>
|
|
1872
1943
|
];
|
|
1873
|
-
function
|
|
1944
|
+
function Io(t) {
|
|
1874
1945
|
if (/youtu\.?be/.test(t))
|
|
1875
|
-
for (const e of
|
|
1946
|
+
for (const e of Po) {
|
|
1876
1947
|
const o = e.exec(t)?.[1];
|
|
1877
1948
|
if (o)
|
|
1878
1949
|
return o;
|
|
1879
1950
|
}
|
|
1880
1951
|
}
|
|
1881
|
-
function
|
|
1882
|
-
const e =
|
|
1952
|
+
function Wo(t) {
|
|
1953
|
+
const e = Io(t);
|
|
1883
1954
|
if (e)
|
|
1884
1955
|
return `https://youtube.com/embed/${e}`;
|
|
1885
1956
|
}
|
|
1886
|
-
function
|
|
1887
|
-
return
|
|
1957
|
+
function Lo({ src: t }) {
|
|
1958
|
+
return H(() => {
|
|
1888
1959
|
import("@lottiefiles/lottie-player");
|
|
1889
1960
|
}, []), /* @__PURE__ */ r("lottie-player", { autoplay: !0, loop: !0, mode: "normal", src: t });
|
|
1890
1961
|
}
|
|
1891
|
-
function
|
|
1962
|
+
function zo(t) {
|
|
1892
1963
|
return /* @__PURE__ */ r(
|
|
1893
|
-
|
|
1964
|
+
g,
|
|
1894
1965
|
{
|
|
1895
1966
|
sx: {
|
|
1896
1967
|
maxHeight: 400,
|
|
1897
1968
|
overflow: "hidden auto"
|
|
1898
1969
|
},
|
|
1899
|
-
children: /* @__PURE__ */ r(
|
|
1970
|
+
children: /* @__PURE__ */ r(xe, { ...t })
|
|
1900
1971
|
}
|
|
1901
1972
|
);
|
|
1902
1973
|
}
|
|
1903
|
-
function
|
|
1904
|
-
const e =
|
|
1974
|
+
function Ro({ url: t }) {
|
|
1975
|
+
const e = ct(null), o = 495, [n, i] = Z(
|
|
1905
1976
|
e.current ? e.current.offsetWidth * 0.5625 : o
|
|
1906
|
-
), a =
|
|
1977
|
+
), a = F(() => {
|
|
1907
1978
|
const c = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 : o;
|
|
1908
1979
|
return i(Math.floor(s * c));
|
|
1909
1980
|
}, []);
|
|
1910
|
-
return
|
|
1981
|
+
return H(() => {
|
|
1911
1982
|
window.addEventListener("resize", a);
|
|
1912
1983
|
const c = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 : o;
|
|
1913
1984
|
return i(Math.floor(s * c)), function() {
|
|
1914
1985
|
window.removeEventListener("resize", a);
|
|
1915
1986
|
};
|
|
1916
1987
|
}, [n, a]), /* @__PURE__ */ r(
|
|
1917
|
-
|
|
1988
|
+
g,
|
|
1918
1989
|
{
|
|
1919
1990
|
component: "iframe",
|
|
1920
1991
|
ref: e,
|
|
@@ -1931,7 +2002,7 @@ function $o({ url: t }) {
|
|
|
1931
2002
|
}
|
|
1932
2003
|
);
|
|
1933
2004
|
}
|
|
1934
|
-
const
|
|
2005
|
+
const Pn = {
|
|
1935
2006
|
image: "https://www.arcblock.io/static/ead0cabde7f2b7ff34db8f3e8ceca271/afc4b/builder.png",
|
|
1936
2007
|
badge: "Develop · Deploy · Run",
|
|
1937
2008
|
title: "The Future is Here: Blockchain and Decentralized Application Development",
|
|
@@ -1942,11 +2013,11 @@ const bn = {
|
|
|
1942
2013
|
actions: void 0,
|
|
1943
2014
|
hasImage: !0,
|
|
1944
2015
|
center: !1
|
|
1945
|
-
},
|
|
2016
|
+
}, jo = _(Mo)`
|
|
1946
2017
|
.section__description {
|
|
1947
2018
|
}
|
|
1948
2019
|
`;
|
|
1949
|
-
function
|
|
2020
|
+
function Ao({
|
|
1950
2021
|
hasImage: t,
|
|
1951
2022
|
fullSizeImage: e,
|
|
1952
2023
|
boxed: o,
|
|
@@ -1957,12 +2028,12 @@ function Co({
|
|
|
1957
2028
|
section: s,
|
|
1958
2029
|
...l
|
|
1959
2030
|
}) {
|
|
1960
|
-
const [{ editing: d }, p] =
|
|
1961
|
-
let m =
|
|
2031
|
+
const [{ editing: d }, p] = P({ ...l, boxed: e ? void 0 : o }, tt);
|
|
2032
|
+
let m = Eo(p.image, n, e, i, a, c);
|
|
1962
2033
|
t || (m = null);
|
|
1963
2034
|
let h = null;
|
|
1964
|
-
return p.actions && (h = p.actions?.map?.((u,
|
|
1965
|
-
|
|
2035
|
+
return p.actions && (h = p.actions?.map?.((u, b) => /* @__PURE__ */ r(Lt, { ...u, editing: d }, b))), /* @__PURE__ */ r(
|
|
2036
|
+
jo,
|
|
1966
2037
|
{
|
|
1967
2038
|
...p,
|
|
1968
2039
|
style: d ? { pointerEvents: "none" } : {},
|
|
@@ -1972,17 +2043,17 @@ function Co({
|
|
|
1972
2043
|
}
|
|
1973
2044
|
);
|
|
1974
2045
|
}
|
|
1975
|
-
function
|
|
2046
|
+
function Eo(t, e, o, n, i, a) {
|
|
1976
2047
|
if (t) {
|
|
1977
2048
|
if (t.endsWith(".json"))
|
|
1978
|
-
return /* @__PURE__ */ r(
|
|
2049
|
+
return /* @__PURE__ */ r(Lo, { src: t });
|
|
1979
2050
|
if (t.indexOf("twitter.com") !== -1)
|
|
1980
|
-
return /* @__PURE__ */ r(
|
|
1981
|
-
const c =
|
|
2051
|
+
return /* @__PURE__ */ r(zo, { sourceType: "url", url: t });
|
|
2052
|
+
const c = Wo(t);
|
|
1982
2053
|
if (c)
|
|
1983
|
-
return /* @__PURE__ */ r(
|
|
2054
|
+
return /* @__PURE__ */ r(Ro, { url: c });
|
|
1984
2055
|
const { naturalWidth: s, naturalHeight: l, filename: d } = n || {};
|
|
1985
|
-
if (
|
|
2056
|
+
if (O(t))
|
|
1986
2057
|
return /* @__PURE__ */ r(
|
|
1987
2058
|
"video",
|
|
1988
2059
|
{
|
|
@@ -1998,16 +2069,16 @@ function No(t, e, o, n, i, a) {
|
|
|
1998
2069
|
width: "100%",
|
|
1999
2070
|
height: "100%"
|
|
2000
2071
|
},
|
|
2001
|
-
poster:
|
|
2002
|
-
children: /* @__PURE__ */ r("source", { src:
|
|
2072
|
+
poster: z(M(e), o ? 1200 : 540, i),
|
|
2073
|
+
children: /* @__PURE__ */ r("source", { src: M(t), type: Ye(t) })
|
|
2003
2074
|
},
|
|
2004
2075
|
t
|
|
2005
2076
|
);
|
|
2006
2077
|
const p = i === "quality" ? 1 : 0.6;
|
|
2007
2078
|
return /* @__PURE__ */ r(
|
|
2008
|
-
|
|
2079
|
+
Nt,
|
|
2009
2080
|
{
|
|
2010
|
-
src:
|
|
2081
|
+
src: M(t),
|
|
2011
2082
|
sizesAttr: {
|
|
2012
2083
|
sm: 600 * p,
|
|
2013
2084
|
md: 450 * p,
|
|
@@ -2027,57 +2098,57 @@ function No(t, e, o, n, i, a) {
|
|
|
2027
2098
|
}
|
|
2028
2099
|
return null;
|
|
2029
2100
|
}
|
|
2030
|
-
const
|
|
2031
|
-
function
|
|
2101
|
+
const In = ["production", "draft"];
|
|
2102
|
+
function Wn({ mode: t, version: e } = {}) {
|
|
2032
2103
|
const o = e && typeof e == "number" ? { mode: t, version: e } : { mode: t };
|
|
2033
|
-
return
|
|
2104
|
+
return dt.get(`/api/${mt()}/pages`, { params: o }).then((n) => n.data);
|
|
2034
2105
|
}
|
|
2035
|
-
function
|
|
2036
|
-
return
|
|
2106
|
+
function Ln({ mode: t, routes: e }) {
|
|
2107
|
+
return dt.post(`/api/${mt()}/pages/publish`, { mode: t, routes: e }).then((o) => o.data);
|
|
2037
2108
|
}
|
|
2038
|
-
function
|
|
2109
|
+
function To({
|
|
2039
2110
|
locale: t,
|
|
2040
2111
|
sort: e,
|
|
2041
2112
|
page: o,
|
|
2042
2113
|
limit: n,
|
|
2043
2114
|
mode: i
|
|
2044
2115
|
} = {}) {
|
|
2045
|
-
return
|
|
2116
|
+
return dt.get(`/api/${mt()}/pages/toc`, { params: { locale: t, sort: e, page: o, limit: n, mode: i } }).then((a) => a.data);
|
|
2046
2117
|
}
|
|
2047
|
-
const
|
|
2118
|
+
const zn = {
|
|
2048
2119
|
style: "list",
|
|
2049
2120
|
sort: "-updatedAt"
|
|
2050
|
-
},
|
|
2051
|
-
function
|
|
2052
|
-
const [{ editing: i, locale: a }, c] =
|
|
2121
|
+
}, yt = 20;
|
|
2122
|
+
function Oo({ style: t, sort: e, section: o, ...n }) {
|
|
2123
|
+
const [{ editing: i, locale: a }, c] = P(n, tt), [s, l] = P(c, ot), [d, p] = Z(), m = ct(!1), h = be(), u = ee(), b = F(async () => {
|
|
2053
2124
|
if (!m.current) {
|
|
2054
2125
|
m.current = !0, h();
|
|
2055
2126
|
try {
|
|
2056
|
-
const
|
|
2057
|
-
p((
|
|
2058
|
-
list: (
|
|
2059
|
-
total:
|
|
2127
|
+
const f = d ? Math.floor(d.list.length / yt) + 1 : 1, { list: y, total: k } = await To({ locale: a, sort: e, page: f, limit: yt });
|
|
2128
|
+
p(($) => ({
|
|
2129
|
+
list: ($?.list ?? []).concat(y),
|
|
2130
|
+
total: k
|
|
2060
2131
|
}));
|
|
2061
2132
|
} finally {
|
|
2062
2133
|
m.current = !1, h();
|
|
2063
2134
|
}
|
|
2064
2135
|
}
|
|
2065
2136
|
}, [d, a, e, h]);
|
|
2066
|
-
return
|
|
2067
|
-
|
|
2068
|
-
}), /* @__PURE__ */ w(
|
|
2069
|
-
Object.keys(s).length > 0 && /* @__PURE__ */ r(
|
|
2070
|
-
d ? /* @__PURE__ */ w(
|
|
2137
|
+
return ye(() => {
|
|
2138
|
+
b();
|
|
2139
|
+
}), /* @__PURE__ */ w(nt, { ...l, sx: i ? { pointerEvents: "none" } : {}, children: [
|
|
2140
|
+
Object.keys(s).length > 0 && /* @__PURE__ */ r(et, { ...s }),
|
|
2141
|
+
d ? /* @__PURE__ */ w(q, { children: [
|
|
2071
2142
|
/* @__PURE__ */ r(
|
|
2072
|
-
|
|
2143
|
+
ut,
|
|
2073
2144
|
{
|
|
2074
2145
|
container: !0,
|
|
2075
2146
|
spacing: 2,
|
|
2076
2147
|
sx: {
|
|
2077
2148
|
justifyContent: "center"
|
|
2078
2149
|
},
|
|
2079
|
-
children: d?.list.map((
|
|
2080
|
-
|
|
2150
|
+
children: d?.list.map((f) => /* @__PURE__ */ r(
|
|
2151
|
+
ut,
|
|
2081
2152
|
{
|
|
2082
2153
|
size: {
|
|
2083
2154
|
xs: 12,
|
|
@@ -2085,62 +2156,62 @@ function Mo({ style: t, sort: e, section: o, ...n }) {
|
|
|
2085
2156
|
md: t === "card" ? 3 : 12
|
|
2086
2157
|
},
|
|
2087
2158
|
children: /* @__PURE__ */ w(
|
|
2088
|
-
|
|
2159
|
+
Uo,
|
|
2089
2160
|
{
|
|
2090
2161
|
elevation: 0,
|
|
2091
|
-
className:
|
|
2092
|
-
onClick: i ? void 0 : () => u(
|
|
2162
|
+
className: x(t === "card" && "style-card"),
|
|
2163
|
+
onClick: i ? void 0 : () => u(f.slug),
|
|
2093
2164
|
children: [
|
|
2094
|
-
!!
|
|
2095
|
-
|
|
2165
|
+
!!f.image && /* @__PURE__ */ r(
|
|
2166
|
+
Vt,
|
|
2096
2167
|
{
|
|
2097
2168
|
component: "img",
|
|
2098
2169
|
alt: "",
|
|
2099
|
-
image:
|
|
2170
|
+
image: z(M(f.image), 540),
|
|
2100
2171
|
loading: "lazy"
|
|
2101
2172
|
}
|
|
2102
2173
|
),
|
|
2103
|
-
/* @__PURE__ */ w(
|
|
2104
|
-
/* @__PURE__ */ r(
|
|
2105
|
-
/* @__PURE__ */ r(
|
|
2174
|
+
/* @__PURE__ */ w(Jt, { children: [
|
|
2175
|
+
/* @__PURE__ */ r(L, { variant: "h6", component: "div", className: wt, children: f.title || f.id }),
|
|
2176
|
+
/* @__PURE__ */ r(L, { variant: "body2", className: wt, children: f.description })
|
|
2106
2177
|
] })
|
|
2107
2178
|
]
|
|
2108
2179
|
}
|
|
2109
2180
|
)
|
|
2110
2181
|
},
|
|
2111
|
-
|
|
2182
|
+
f.id
|
|
2112
2183
|
))
|
|
2113
2184
|
}
|
|
2114
2185
|
),
|
|
2115
2186
|
/* @__PURE__ */ r(
|
|
2116
|
-
|
|
2187
|
+
g,
|
|
2117
2188
|
{
|
|
2118
2189
|
sx: {
|
|
2119
2190
|
textAlign: "center",
|
|
2120
2191
|
mt: 2
|
|
2121
2192
|
},
|
|
2122
|
-
children: d.total > d.list.length ? /* @__PURE__ */ r(
|
|
2193
|
+
children: d.total > d.list.length ? /* @__PURE__ */ r(U, { variant: "outlined", color: "secondary", onClick: b, loading: m.current, children: "More" }) : /* @__PURE__ */ r(U, { variant: "outlined", color: "secondary", disabled: !0, children: "No More" })
|
|
2123
2194
|
}
|
|
2124
2195
|
)
|
|
2125
2196
|
] }) : /* @__PURE__ */ r(
|
|
2126
|
-
|
|
2197
|
+
g,
|
|
2127
2198
|
{
|
|
2128
2199
|
sx: {
|
|
2129
2200
|
p: 2,
|
|
2130
2201
|
textAlign: "center"
|
|
2131
2202
|
},
|
|
2132
|
-
children: /* @__PURE__ */ r(
|
|
2203
|
+
children: /* @__PURE__ */ r(Yt, { size: 24 })
|
|
2133
2204
|
}
|
|
2134
2205
|
)
|
|
2135
2206
|
] });
|
|
2136
2207
|
}
|
|
2137
|
-
const
|
|
2208
|
+
const wt = it`
|
|
2138
2209
|
display: -webkit-box;
|
|
2139
2210
|
-webkit-box-orient: vertical;
|
|
2140
2211
|
-webkit-line-clamp: 2;
|
|
2141
2212
|
overflow: hidden;
|
|
2142
2213
|
text-overflow: ellipsis;
|
|
2143
|
-
`,
|
|
2214
|
+
`, Uo = _(Gt)`
|
|
2144
2215
|
border: 1px solid #e0e0e0;
|
|
2145
2216
|
background-color: transparent;
|
|
2146
2217
|
cursor: pointer;
|
|
@@ -2160,15 +2231,15 @@ const gt = tt`
|
|
|
2160
2231
|
max-height: 50vw;
|
|
2161
2232
|
}
|
|
2162
2233
|
}
|
|
2163
|
-
`,
|
|
2164
|
-
iframe:
|
|
2165
|
-
section:
|
|
2166
|
-
"section-card-list":
|
|
2167
|
-
toc:
|
|
2168
|
-
"custom-component":
|
|
2169
|
-
"layout-block":
|
|
2234
|
+
`, Fo = {
|
|
2235
|
+
iframe: yo,
|
|
2236
|
+
section: Ao,
|
|
2237
|
+
"section-card-list": go,
|
|
2238
|
+
toc: Oo,
|
|
2239
|
+
"custom-component": fo,
|
|
2240
|
+
"layout-block": No
|
|
2170
2241
|
};
|
|
2171
|
-
function
|
|
2242
|
+
function Ho({
|
|
2172
2243
|
id: t,
|
|
2173
2244
|
type: e,
|
|
2174
2245
|
mode: o,
|
|
@@ -2178,46 +2249,46 @@ function Po({
|
|
|
2178
2249
|
page: c,
|
|
2179
2250
|
...s
|
|
2180
2251
|
}) {
|
|
2181
|
-
const l =
|
|
2182
|
-
const { height: u, ...
|
|
2183
|
-
return e === "layout-block" && (
|
|
2184
|
-
const
|
|
2252
|
+
const l = Fo[e], { getPageMetaStyle: d } = Le(), p = N(() => {
|
|
2253
|
+
const { height: u, ...b } = n;
|
|
2254
|
+
return e === "layout-block" && (b.onBlockRender = (f) => {
|
|
2255
|
+
const y = {
|
|
2185
2256
|
...n?.dev,
|
|
2186
|
-
...
|
|
2187
|
-
}, { defaultLocale:
|
|
2188
|
-
...
|
|
2189
|
-
...
|
|
2190
|
-
dev:
|
|
2191
|
-
}, { locale:
|
|
2192
|
-
let
|
|
2193
|
-
return
|
|
2194
|
-
|
|
2257
|
+
...f?.config?.dev
|
|
2258
|
+
}, { defaultLocale: k } = y, $ = {
|
|
2259
|
+
...lt(n, ["locale", "editing"]),
|
|
2260
|
+
...f?.config,
|
|
2261
|
+
dev: y
|
|
2262
|
+
}, { locale: C } = $;
|
|
2263
|
+
let S = c?.dataSource?.[f?.id]?.[C];
|
|
2264
|
+
return Xt(S) && (S = c?.dataSource?.[f?.id]?.[k ?? "en"]), /* @__PURE__ */ r(
|
|
2265
|
+
Ho,
|
|
2195
2266
|
{
|
|
2196
|
-
...
|
|
2267
|
+
...f,
|
|
2197
2268
|
config: {
|
|
2198
|
-
...
|
|
2199
|
-
|
|
2200
|
-
|
|
2269
|
+
...f?.section?.properties,
|
|
2270
|
+
...S,
|
|
2271
|
+
...$
|
|
2201
2272
|
},
|
|
2202
2273
|
page: c,
|
|
2203
2274
|
ignorePageMetaStyle: !0
|
|
2204
2275
|
}
|
|
2205
2276
|
);
|
|
2206
|
-
}),
|
|
2207
|
-
}, [n, e]), m =
|
|
2277
|
+
}), b;
|
|
2278
|
+
}, [n, e]), m = N(() => {
|
|
2208
2279
|
const u = {};
|
|
2209
2280
|
return e !== "custom-component" && (u.height = n.height), u.sx = a ? void 0 : d("sx"), u.id = `BlockBase-${t}`, u;
|
|
2210
2281
|
}, [n.height, a, e, d]), h = l && /* @__PURE__ */ r(l, { mode: o, ...p, id: t, section: i });
|
|
2211
|
-
return h ? /* @__PURE__ */ r(
|
|
2282
|
+
return h ? /* @__PURE__ */ r(ze, { ...s, ...m, children: h }) : /* @__PURE__ */ r(Do, { type: e });
|
|
2212
2283
|
}
|
|
2213
|
-
function
|
|
2284
|
+
function Do({ type: t }) {
|
|
2214
2285
|
return /* @__PURE__ */ r(
|
|
2215
|
-
|
|
2286
|
+
g,
|
|
2216
2287
|
{
|
|
2217
2288
|
sx: {
|
|
2218
2289
|
p: 2
|
|
2219
2290
|
},
|
|
2220
|
-
children: /* @__PURE__ */ w(
|
|
2291
|
+
children: /* @__PURE__ */ w(Kt, { icon: /* @__PURE__ */ r(Ot, {}), color: "error", children: [
|
|
2221
2292
|
"Unsupported Block `",
|
|
2222
2293
|
t,
|
|
2223
2294
|
"`"
|
|
@@ -2226,13 +2297,13 @@ function jo({ type: t }) {
|
|
|
2226
2297
|
);
|
|
2227
2298
|
}
|
|
2228
2299
|
export {
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2300
|
+
Ho as B,
|
|
2301
|
+
Mn as I,
|
|
2302
|
+
Nn as P,
|
|
2303
|
+
In as S,
|
|
2304
|
+
zn as T,
|
|
2305
|
+
Cn as a,
|
|
2306
|
+
Pn as b,
|
|
2307
|
+
Wn as g,
|
|
2308
|
+
Ln as p
|
|
2238
2309
|
};
|