@blocklet/pages-kit-inner-components 0.6.20 → 0.6.22
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/{home-D6CNLMDa.js → home-CmcR9R89.js} +2 -2
- package/lib/cjs/chunks/html-JOhPskS4.js +1 -0
- package/lib/cjs/chunks/index-7_tPWvdE.js +475 -0
- package/lib/cjs/chunks/{publish-button-FsuH_RMC.js → publish-button-CuIP1HAR.js} +1 -1
- package/lib/cjs/chunks/site-state-CkqENAbR.js +1 -0
- package/lib/cjs/home.js +1 -1
- package/lib/cjs/locales.js +2 -2
- package/lib/cjs/project-html.js +6 -6
- package/lib/cjs/resources.js +1 -1
- package/lib/cjs/setting.js +3 -3
- package/lib/cjs/site-state.js +1 -1
- package/lib/es/add-component.js +2 -2
- package/lib/es/chunks/{home-Dmze9ay0.js → home-pT8D7Ttx.js} +2 -2
- package/lib/es/chunks/html-DfzaaIYa.js +49 -0
- package/lib/es/chunks/{index-aeMNll_R.js → index-BHQcp5eX.js} +964 -563
- package/lib/es/chunks/{publish-button-BPtL08Ue.js → publish-button-CIVPDQb7.js} +2 -2
- package/lib/es/chunks/{site-state-Dt2__Byi.js → site-state-CqlS8v17.js} +536 -562
- package/lib/es/home.js +2 -2
- package/lib/es/locales.js +86 -8
- package/lib/es/project-html.js +93 -133
- package/lib/es/resources.js +1 -1
- package/lib/es/setting.js +143 -141
- package/lib/es/site-state.js +1 -1
- package/package.json +5 -5
- package/lib/cjs/chunks/index-D3fT0ax0.js +0 -475
- package/lib/cjs/chunks/site-state-Vc48a38-.js +0 -1
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { jsx as r, jsxs as w, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
-
import { ErrorOutline as
|
|
3
|
-
import { Box as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { styled 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
|
|
2
|
+
import { ErrorOutline as ne } from "@mui/icons-material";
|
|
3
|
+
import { Box as f, styled as re, Typography as j, Container as ie, useTheme as ae, useMediaQuery as se, GlobalStyles as le, Card as ce, CircularProgress as de, Grid as wt, CardMedia as ue, CardContent as me, Alert as pe } from "@mui/material";
|
|
4
|
+
import he from "lodash/isEmpty";
|
|
5
|
+
import pt from "lodash/pick";
|
|
6
|
+
import ge, { createContext as It, useMemo as S, useCallback as z, useContext as Lt, useState as Z, useEffect as J, Fragment as fe, isValidElement as Et, useRef as ht } from "react";
|
|
7
|
+
import R from "lodash/keyBy";
|
|
8
|
+
import { styled as C, useTheme as At } from "@arcblock/ux/lib/Theme";
|
|
9
|
+
import { cx as b, css as ct } from "@emotion/css";
|
|
10
|
+
import I from "lodash/omit";
|
|
11
|
+
import { Link as xe, NavLink as be, useNavigate as ye } from "react-router-dom";
|
|
12
|
+
import ve from "@arcblock/ux/lib/Button";
|
|
13
|
+
import dt from "is-uri";
|
|
14
|
+
import { Icon as Pt } from "@iconify-icon/react";
|
|
15
|
+
import { e as F, f as L, i as gt, l as ft } from "./state-DSo43FAB.js";
|
|
16
|
+
import we from "@blocklet/pages-kit/builtin/markdown/markdown-renderer";
|
|
17
|
+
import { useColorConvert as Wt } from "@blocklet/pages-kit/contexts/color";
|
|
18
|
+
import { materialDark as ke } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
19
|
+
import _e from "@arcblock/react-hooks/lib/useBrowser";
|
|
20
|
+
import kt from "@arcblock/ux/lib/Colors";
|
|
21
|
+
import { ResponsiveImage as jt, CustomComponentRenderer as $e } from "@blocklet/pages-kit/components";
|
|
22
|
+
import { isGradient as Ce, isColorString as Se } from "@blocklet/pages-kit/utils/style";
|
|
23
|
+
import zt from "@mui/material/useMediaQuery";
|
|
24
24
|
import { join as X } from "pathe";
|
|
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
|
|
25
|
+
import { withoutTrailingSlash as lt, isRelative as Be, parseURL as Ne } from "ufo";
|
|
26
|
+
import { useMessage as Re } from "@blocklet/embed/message";
|
|
27
|
+
import { useLatest as Me } from "ahooks";
|
|
28
|
+
import Ie from "lodash/isEqual";
|
|
29
|
+
import { EmbedIframe as Le } from "@blocklet/embed/react";
|
|
30
|
+
import { useLocaleContext as Ee } from "@arcblock/ux/lib/Locale/context";
|
|
31
|
+
import ut from "@arcblock/ux/lib/Screenshot";
|
|
32
|
+
import { TwitterTimelineEmbed as Ae } from "react-twitter-embed";
|
|
33
|
+
import { useUpdate as Pe, useMount as We } from "react-use";
|
|
34
|
+
const tt = "{{CUSTOM_VALUE}}", je = [
|
|
35
35
|
{
|
|
36
36
|
title: "None",
|
|
37
37
|
value: "none",
|
|
@@ -52,7 +52,7 @@ const Wt = "{{CUSTOM_VALUE}}", _e = [
|
|
|
52
52
|
value: "large",
|
|
53
53
|
sx: { py: { xs: 7.5, md: 10, lg: 12.5, xl: 15 } }
|
|
54
54
|
}
|
|
55
|
-
],
|
|
55
|
+
], ze = [
|
|
56
56
|
{
|
|
57
57
|
title: "None",
|
|
58
58
|
value: "none",
|
|
@@ -73,7 +73,7 @@ const Wt = "{{CUSTOM_VALUE}}", _e = [
|
|
|
73
73
|
value: "large",
|
|
74
74
|
sx: { py: { xs: 6, md: 9, lg: 9, xl: 11 } }
|
|
75
75
|
}
|
|
76
|
-
],
|
|
76
|
+
], Fe = [
|
|
77
77
|
{
|
|
78
78
|
title: "None",
|
|
79
79
|
value: "none",
|
|
@@ -97,7 +97,7 @@ const Wt = "{{CUSTOM_VALUE}}", _e = [
|
|
|
97
97
|
], q = (t, e, o) => {
|
|
98
98
|
const n = t.breakpoints.values[o];
|
|
99
99
|
return `${e}${n ? ` (${n}px)` : ""}`;
|
|
100
|
-
},
|
|
100
|
+
}, Te = [
|
|
101
101
|
{
|
|
102
102
|
title: "100%",
|
|
103
103
|
value: "full",
|
|
@@ -131,16 +131,17 @@ const Wt = "{{CUSTOM_VALUE}}", _e = [
|
|
|
131
131
|
title: "Custom",
|
|
132
132
|
value: "custom",
|
|
133
133
|
sx: {
|
|
134
|
-
maxWidth:
|
|
134
|
+
maxWidth: tt,
|
|
135
135
|
width: "100%",
|
|
136
136
|
mx: "auto"
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
],
|
|
139
|
+
], Oe = [
|
|
140
140
|
{
|
|
141
141
|
title: "None",
|
|
142
142
|
value: "none",
|
|
143
|
-
sx: { gap: 0 }
|
|
143
|
+
sx: { gap: 0 },
|
|
144
|
+
containerSx: { gap: 0 }
|
|
144
145
|
},
|
|
145
146
|
{
|
|
146
147
|
title: "Small",
|
|
@@ -150,14 +151,14 @@ const Wt = "{{CUSTOM_VALUE}}", _e = [
|
|
|
150
151
|
{
|
|
151
152
|
title: "Normal",
|
|
152
153
|
value: "normal",
|
|
153
|
-
sx: { gap: { xs: 2, md:
|
|
154
|
+
sx: { gap: { xs: 2, md: 3.5, lg: 3.5, xl: 5 } }
|
|
154
155
|
},
|
|
155
156
|
{
|
|
156
157
|
title: "Large",
|
|
157
158
|
value: "large",
|
|
158
|
-
sx: { gap: { xs: 3, md: 5, lg: 5, xl:
|
|
159
|
+
sx: { gap: { xs: 3, md: 5, lg: 5, xl: 6.5 } }
|
|
159
160
|
}
|
|
160
|
-
],
|
|
161
|
+
], Ue = [
|
|
161
162
|
{
|
|
162
163
|
title: "None",
|
|
163
164
|
value: "none",
|
|
@@ -178,48 +179,301 @@ const Wt = "{{CUSTOM_VALUE}}", _e = [
|
|
|
178
179
|
value: "large",
|
|
179
180
|
sx: { p: { xs: 3, md: 6, lg: 6, xl: 9 } }
|
|
180
181
|
}
|
|
181
|
-
],
|
|
182
|
+
], De = [
|
|
182
183
|
{
|
|
183
184
|
title: "Start",
|
|
184
185
|
value: "start",
|
|
185
186
|
sx: { alignContent: "start" }
|
|
186
187
|
},
|
|
188
|
+
{
|
|
189
|
+
title: "Center",
|
|
190
|
+
value: "center",
|
|
191
|
+
sx: { alignContent: "center" }
|
|
192
|
+
},
|
|
187
193
|
{
|
|
188
194
|
title: "End",
|
|
189
195
|
value: "end",
|
|
190
196
|
sx: { alignContent: "end" }
|
|
191
197
|
},
|
|
198
|
+
{
|
|
199
|
+
title: "Space Between",
|
|
200
|
+
value: "space-between",
|
|
201
|
+
sx: { alignContent: "space-between" }
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
title: "Space Around",
|
|
205
|
+
value: "space-around",
|
|
206
|
+
sx: { alignContent: "space-around" }
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
title: "Space Evenly",
|
|
210
|
+
value: "space-evenly",
|
|
211
|
+
sx: { alignContent: "space-evenly" }
|
|
212
|
+
}
|
|
213
|
+
], Ge = [
|
|
214
|
+
{
|
|
215
|
+
title: "Start",
|
|
216
|
+
value: "start",
|
|
217
|
+
sx: { justifyContent: "start" }
|
|
218
|
+
},
|
|
192
219
|
{
|
|
193
220
|
title: "Center",
|
|
194
221
|
value: "center",
|
|
195
|
-
sx: {
|
|
222
|
+
sx: { justifyContent: "center" }
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
title: "End",
|
|
226
|
+
value: "end",
|
|
227
|
+
sx: { justifyContent: "end" }
|
|
196
228
|
},
|
|
197
229
|
{
|
|
198
230
|
title: "Space Between",
|
|
199
231
|
value: "space-between",
|
|
200
|
-
sx: {
|
|
232
|
+
sx: { justifyContent: "space-between" }
|
|
201
233
|
},
|
|
202
234
|
{
|
|
203
235
|
title: "Space Around",
|
|
204
236
|
value: "space-around",
|
|
205
|
-
sx: {
|
|
237
|
+
sx: { justifyContent: "space-around" }
|
|
206
238
|
},
|
|
207
239
|
{
|
|
208
240
|
title: "Space Evenly",
|
|
209
241
|
value: "space-evenly",
|
|
210
|
-
sx: {
|
|
242
|
+
sx: { justifyContent: "space-evenly" }
|
|
243
|
+
}
|
|
244
|
+
], He = [
|
|
245
|
+
{
|
|
246
|
+
title: "Solid",
|
|
247
|
+
value: "solid",
|
|
248
|
+
sx: { border: "1px solid", borderColor: "divider" },
|
|
249
|
+
group: "borderFrame"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
title: "Dashed",
|
|
253
|
+
value: "dashed",
|
|
254
|
+
sx: { border: "1px dashed", borderColor: "divider" },
|
|
255
|
+
group: "borderFrame"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
title: "Dotted",
|
|
259
|
+
value: "dotted",
|
|
260
|
+
sx: { border: "1px dotted", borderColor: "divider" },
|
|
261
|
+
group: "borderFrame"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
title: "Custom",
|
|
265
|
+
value: "custom",
|
|
266
|
+
sx: {
|
|
267
|
+
border: tt
|
|
268
|
+
},
|
|
269
|
+
group: "borderFrame"
|
|
270
|
+
}
|
|
271
|
+
], Ft = [
|
|
272
|
+
// new device frames
|
|
273
|
+
{ value: "macbook", title: "MacBook", group: "deviceFrame" },
|
|
274
|
+
{ value: "phone", title: "Phone", group: "deviceFrame" }
|
|
275
|
+
// old device frames:
|
|
276
|
+
// @FIXME:以下类型不适配 children,先注释掉了,会走以前的逻辑,渲染 p script 有问题
|
|
277
|
+
// { value: 'iphone-x', title: 'iPhone X', group: 'deviceFrame' },
|
|
278
|
+
// { value: 'iphone-8', title: 'iPhone 8', group: 'deviceFrame' },
|
|
279
|
+
// { value: 'ipad-pro', title: 'iPad Pro', group: 'deviceFrame' },
|
|
280
|
+
// { value: 'imac-pro', title: 'iMac Pro', group: 'deviceFrame' },
|
|
281
|
+
// { value: 'macbook-pro', title: 'MacBook Pro', group: 'deviceFrame' },
|
|
282
|
+
// { value: 'surface-pro', title: 'Surface Pro', group: 'deviceFrame' },
|
|
283
|
+
// { value: 'surface-book', title: 'Surface Book', group: 'deviceFrame' },
|
|
284
|
+
// { value: 'surface-studio', title: 'Surface Studio', group: 'deviceFrame' },
|
|
285
|
+
// { value: 'galaxy-s8', title: 'Galaxy S8', group: 'deviceFrame' },
|
|
286
|
+
// { value: 'google-pixel', title: 'Google Pixel', group: 'deviceFrame' },
|
|
287
|
+
// { value: 'google-pixel-2-xl', title: 'Google Pixel 2 XL', group: 'deviceFrame' },
|
|
288
|
+
// { value: 'apple-watch', title: 'Apple Watch', group: 'deviceFrame' },
|
|
289
|
+
], Tt = (t) => Ft.some((e) => e.value === t), _t = ({ hasUrl: t = !1, hasTab: e = !1 } = {}) => ({
|
|
290
|
+
position: "relative",
|
|
291
|
+
paddingTop: "2em",
|
|
292
|
+
// 为顶部栏腾出空间
|
|
293
|
+
// 移除这些边框属性
|
|
294
|
+
// border: 1,
|
|
295
|
+
// borderColor: 'divider',
|
|
296
|
+
// borderTop: '2em solid',
|
|
297
|
+
// borderTopColor: 'divider',
|
|
298
|
+
// borderRadius: 1,
|
|
299
|
+
// 使用伪元素替代边框
|
|
300
|
+
"&::before": {
|
|
301
|
+
content: '""',
|
|
302
|
+
position: "absolute",
|
|
303
|
+
top: 0,
|
|
304
|
+
left: 0,
|
|
305
|
+
right: 0,
|
|
306
|
+
bottom: 0,
|
|
307
|
+
border: "1px solid",
|
|
308
|
+
borderColor: "divider",
|
|
309
|
+
pointerEvents: "none",
|
|
310
|
+
zIndex: 1
|
|
311
|
+
},
|
|
312
|
+
// 使用伪元素替代顶部边框
|
|
313
|
+
"&::after": {
|
|
314
|
+
content: '""',
|
|
315
|
+
position: "absolute",
|
|
316
|
+
top: 0,
|
|
317
|
+
left: 0,
|
|
318
|
+
right: 0,
|
|
319
|
+
height: "2em",
|
|
320
|
+
backgroundColor: "divider",
|
|
321
|
+
pointerEvents: "none",
|
|
322
|
+
zIndex: 1
|
|
323
|
+
},
|
|
324
|
+
// 浏览器按钮
|
|
325
|
+
"& > div:first-of-type:before": {
|
|
326
|
+
display: "block",
|
|
327
|
+
position: "absolute",
|
|
328
|
+
content: '""',
|
|
329
|
+
top: "-1.25em",
|
|
330
|
+
// 调整按钮位置到顶部栏中间
|
|
331
|
+
left: "1em",
|
|
332
|
+
width: "0.5em",
|
|
333
|
+
height: "0.5em",
|
|
334
|
+
borderRadius: "50%",
|
|
335
|
+
bgcolor: "#f44",
|
|
336
|
+
boxShadow: "0 0 0 2px #f44, 1.5em 0 0 2px #9b3, 3em 0 0 2px #fb5",
|
|
337
|
+
zIndex: 2
|
|
338
|
+
},
|
|
339
|
+
// 浏览器 URL 栏样式
|
|
340
|
+
"& > div:first-of-type:after": t ? {
|
|
341
|
+
display: "block",
|
|
342
|
+
position: "absolute",
|
|
343
|
+
content: '""',
|
|
344
|
+
top: "-1.6em",
|
|
345
|
+
// 调整URL栏位置到顶部栏中间
|
|
346
|
+
left: "5.5em",
|
|
347
|
+
width: "calc(100% - 7em)",
|
|
348
|
+
height: "1.2em",
|
|
349
|
+
borderRadius: 0.25,
|
|
350
|
+
bgcolor: "white",
|
|
351
|
+
zIndex: 2
|
|
352
|
+
} : e ? {
|
|
353
|
+
display: "block",
|
|
354
|
+
position: "absolute",
|
|
355
|
+
content: '""',
|
|
356
|
+
top: "0em",
|
|
357
|
+
// 调整Tab栏位置
|
|
358
|
+
left: "5.5em",
|
|
359
|
+
width: "20%",
|
|
360
|
+
height: "0em",
|
|
361
|
+
borderBottom: "2em solid white",
|
|
362
|
+
borderLeft: "0.8em solid transparent",
|
|
363
|
+
borderRight: "0.8em solid transparent",
|
|
364
|
+
zIndex: 2
|
|
365
|
+
} : {}
|
|
366
|
+
}), Ve = [
|
|
367
|
+
{
|
|
368
|
+
value: "chrome",
|
|
369
|
+
title: "Chrome",
|
|
370
|
+
group: "browserFrame",
|
|
371
|
+
sx: _t()
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
value: "chrome-with-url",
|
|
375
|
+
title: "Chrome (With URL)",
|
|
376
|
+
group: "browserFrame",
|
|
377
|
+
sx: _t({
|
|
378
|
+
hasUrl: !0
|
|
379
|
+
})
|
|
380
|
+
}
|
|
381
|
+
], Je = [
|
|
382
|
+
{
|
|
383
|
+
value: "shadow-sm",
|
|
384
|
+
title: "Shadow Low Elevation",
|
|
385
|
+
group: "shadowFrame",
|
|
386
|
+
sx: { boxShadow: (t) => t.shadows[2] }
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
value: "shadow-md",
|
|
390
|
+
title: "Shadow Medium Elevation",
|
|
391
|
+
group: "shadowFrame",
|
|
392
|
+
sx: { boxShadow: (t) => t.shadows[6] }
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
value: "shadow-lg",
|
|
396
|
+
title: "Shadow High Elevation",
|
|
397
|
+
group: "shadowFrame",
|
|
398
|
+
sx: { boxShadow: (t) => t.shadows[12] }
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
value: "shadow-xl",
|
|
402
|
+
title: "Shadow Extra High Elevation",
|
|
403
|
+
group: "shadowFrame",
|
|
404
|
+
sx: { boxShadow: (t) => t.shadows[16] }
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
value: "shadow-max",
|
|
408
|
+
title: "Shadow Max Elevation",
|
|
409
|
+
group: "shadowFrame",
|
|
410
|
+
sx: { boxShadow: (t) => t.shadows[24] }
|
|
411
|
+
}
|
|
412
|
+
], Ye = [
|
|
413
|
+
{
|
|
414
|
+
title: "None",
|
|
415
|
+
value: "none",
|
|
416
|
+
sx: { border: "none" },
|
|
417
|
+
group: "commonFrame"
|
|
418
|
+
},
|
|
419
|
+
...He,
|
|
420
|
+
...Ve,
|
|
421
|
+
...Je,
|
|
422
|
+
...Ft
|
|
423
|
+
], Ke = [
|
|
424
|
+
{
|
|
425
|
+
title: "None",
|
|
426
|
+
value: "none",
|
|
427
|
+
sx: { borderRadius: 0 }
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
title: "Small",
|
|
431
|
+
value: "small",
|
|
432
|
+
sx: { borderRadius: 1 }
|
|
433
|
+
// theme.shape.borderRadius * 1
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
title: "Medium",
|
|
437
|
+
value: "medium",
|
|
438
|
+
sx: { borderRadius: 2 }
|
|
439
|
+
// theme.shape.borderRadius * 2
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
title: "Large",
|
|
443
|
+
value: "large",
|
|
444
|
+
sx: { borderRadius: 3 }
|
|
445
|
+
// theme.shape.borderRadius * 3
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
title: "Extra Large",
|
|
449
|
+
value: "xl",
|
|
450
|
+
sx: { borderRadius: 4 }
|
|
451
|
+
// theme.shape.borderRadius * 4
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
title: "Rounded",
|
|
455
|
+
value: "rounded",
|
|
456
|
+
sx: { borderRadius: "50%" }
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
title: "Custom",
|
|
460
|
+
value: "custom",
|
|
461
|
+
sx: { borderRadius: tt }
|
|
211
462
|
}
|
|
212
|
-
],
|
|
213
|
-
["baseSectionPaddingY",
|
|
214
|
-
["maxWidth",
|
|
215
|
-
["paddingY",
|
|
216
|
-
["paddingX",
|
|
217
|
-
["layoutBlockGap",
|
|
218
|
-
["layoutBlockPadding",
|
|
219
|
-
["layoutBlockAlignContent",
|
|
463
|
+
], Xe = R(je, "value"), qe = R(ze, "value"), Qe = R(Fe, "value"), Ze = R(Te, "value"), to = R(Oe, "value"), eo = R(Ue, "value"), oo = R(De, "value"), no = R(Ge, "value"), ro = R(Ye, "value"), io = R(Ke, "value"), ao = /* @__PURE__ */ new Map([
|
|
464
|
+
["baseSectionPaddingY", Xe],
|
|
465
|
+
["maxWidth", Ze],
|
|
466
|
+
["paddingY", qe],
|
|
467
|
+
["paddingX", Qe],
|
|
468
|
+
["layoutBlockGap", to],
|
|
469
|
+
["layoutBlockPadding", eo],
|
|
470
|
+
["layoutBlockAlignContent", oo],
|
|
471
|
+
["layoutBlockJustifyContent", no],
|
|
472
|
+
["layoutBlockBorder", ro],
|
|
473
|
+
["layoutBlockBorderRadius", io]
|
|
220
474
|
]);
|
|
221
|
-
function
|
|
222
|
-
const { type: e, value: o, format: n = "sx", defaultValue: i = null } = t, a =
|
|
475
|
+
function W(t) {
|
|
476
|
+
const { type: e, value: o, format: n = "sx", defaultValue: i = null } = t, a = ao.get(e);
|
|
223
477
|
if (!a || typeof o != "string" || !o)
|
|
224
478
|
return i;
|
|
225
479
|
const c = o.startsWith("custom:"), s = c ? "custom" : o;
|
|
@@ -228,7 +482,7 @@ function U(t) {
|
|
|
228
482
|
if (c) {
|
|
229
483
|
const d = o.replace("custom:", "");
|
|
230
484
|
try {
|
|
231
|
-
return JSON.parse(JSON.stringify(l || {}).replaceAll(
|
|
485
|
+
return JSON.parse(JSON.stringify(l || {}).replaceAll(tt, d));
|
|
232
486
|
} catch {
|
|
233
487
|
}
|
|
234
488
|
}
|
|
@@ -236,37 +490,37 @@ function U(t) {
|
|
|
236
490
|
}
|
|
237
491
|
return i;
|
|
238
492
|
}
|
|
239
|
-
const
|
|
493
|
+
const Ot = It({
|
|
240
494
|
page: null,
|
|
241
495
|
getPageMeta: () => ({}),
|
|
242
496
|
getPageMetaStyle: () => ({})
|
|
243
497
|
});
|
|
244
|
-
function
|
|
245
|
-
return
|
|
498
|
+
function so() {
|
|
499
|
+
return Lt(Ot);
|
|
246
500
|
}
|
|
247
|
-
function
|
|
501
|
+
function cr({
|
|
248
502
|
page: t,
|
|
249
503
|
children: e,
|
|
250
504
|
defaultLocale: o = "en",
|
|
251
505
|
currentLocale: n
|
|
252
506
|
}) {
|
|
253
|
-
const i = S(() => t ? JSON.parse(JSON.stringify(t)) : null, [JSON.stringify(t)]), a =
|
|
507
|
+
const i = S(() => t ? JSON.parse(JSON.stringify(t)) : null, [JSON.stringify(t)]), a = z(() => {
|
|
254
508
|
if (!i) return {};
|
|
255
509
|
const l = n || o;
|
|
256
510
|
return i.locales?.[l] ?? {};
|
|
257
|
-
}, [i, o, n]), c =
|
|
511
|
+
}, [i, o, n]), c = z(
|
|
258
512
|
(l = "sx") => {
|
|
259
513
|
const d = a();
|
|
260
|
-
return !d || !d.style ? {} : Object.entries(d.style || {}).reduce((
|
|
261
|
-
if (!
|
|
262
|
-
const
|
|
263
|
-
d.style[
|
|
264
|
-
const
|
|
265
|
-
type:
|
|
266
|
-
value:
|
|
514
|
+
return !d || !d.style ? {} : Object.entries(d.style || {}).reduce((u, [h, p]) => {
|
|
515
|
+
if (!p) return u;
|
|
516
|
+
const y = `${h}Custom`;
|
|
517
|
+
d.style[y];
|
|
518
|
+
const x = W({
|
|
519
|
+
type: h,
|
|
520
|
+
value: p,
|
|
267
521
|
format: l
|
|
268
522
|
});
|
|
269
|
-
return
|
|
523
|
+
return x ? { ...u, ...x } : u;
|
|
270
524
|
}, {});
|
|
271
525
|
},
|
|
272
526
|
[a]
|
|
@@ -278,39 +532,39 @@ function In({
|
|
|
278
532
|
}),
|
|
279
533
|
[i, a, c]
|
|
280
534
|
);
|
|
281
|
-
return /* @__PURE__ */ r(
|
|
535
|
+
return /* @__PURE__ */ r(Ot.Provider, { value: s, children: e });
|
|
282
536
|
}
|
|
283
|
-
const
|
|
284
|
-
function
|
|
537
|
+
const et = ["editing", "height", "locale", "dev", "sx"];
|
|
538
|
+
function lo(t) {
|
|
285
539
|
const { className: e, ...o } = t;
|
|
286
|
-
return /* @__PURE__ */ r(
|
|
540
|
+
return /* @__PURE__ */ r(co, { ...o, className: b("BlockBase-root", e) });
|
|
287
541
|
}
|
|
288
|
-
const
|
|
542
|
+
const co = C(f)`
|
|
289
543
|
position: relative;
|
|
290
544
|
color: ${({ theme: t }) => t.palette.text.primary};
|
|
291
|
-
`,
|
|
545
|
+
`, Ut = It({
|
|
292
546
|
pages: [],
|
|
293
547
|
project: void 0
|
|
294
|
-
}), { Provider:
|
|
295
|
-
function
|
|
296
|
-
return
|
|
548
|
+
}), { Provider: dr, Consumer: ur } = Ut;
|
|
549
|
+
function Dt() {
|
|
550
|
+
return Lt(Ut);
|
|
297
551
|
}
|
|
298
|
-
function
|
|
299
|
-
return /* @__PURE__ */ r(
|
|
552
|
+
function uo({ icon: t, ...e }) {
|
|
553
|
+
return /* @__PURE__ */ r(Pt, { icon: t, ...e, ref: null });
|
|
300
554
|
}
|
|
301
|
-
function
|
|
302
|
-
return /* @__PURE__ */ r(
|
|
555
|
+
function mo({ icon: t, className: e = "", size: o = "1rem", ...n }) {
|
|
556
|
+
return /* @__PURE__ */ r(po, { component: uo, className: b("css-icon", e), size: o, ...n, icon: t });
|
|
303
557
|
}
|
|
304
|
-
const
|
|
558
|
+
const po = C(f)`
|
|
305
559
|
&.css-icon {
|
|
306
560
|
display: inline-block;
|
|
307
561
|
width: ${({ size: t }) => t};
|
|
308
562
|
height: ${({ size: t }) => t};
|
|
309
563
|
}
|
|
310
564
|
`;
|
|
311
|
-
function
|
|
312
|
-
const a =
|
|
313
|
-
return c ? /* @__PURE__ */ r(
|
|
565
|
+
function ho({ icon: t, className: e = "", size: o = "1rem", imageMeta: n, ...i }) {
|
|
566
|
+
const a = F(L(t), 540), [c, s] = Z(!1), l = At();
|
|
567
|
+
return c ? /* @__PURE__ */ r(mo, { icon: "i-mdi:image", color: l.palette.grey[500], size: o, className: e, ...i }) : /* @__PURE__ */ r(go, { className: b("image-icon", e), size: o, ...i, children: /* @__PURE__ */ r(
|
|
314
568
|
"img",
|
|
315
569
|
{
|
|
316
570
|
className: "image-icon__image",
|
|
@@ -323,7 +577,7 @@ function Ge({ icon: t, className: e = "", size: o = "1rem", imageMeta: n, ...i }
|
|
|
323
577
|
}
|
|
324
578
|
) });
|
|
325
579
|
}
|
|
326
|
-
const
|
|
580
|
+
const go = C(f)`
|
|
327
581
|
display: inline-block;
|
|
328
582
|
width: ${({ size: t }) => t};
|
|
329
583
|
height: ${({ size: t }) => t};
|
|
@@ -332,33 +586,33 @@ const He = _(h)`
|
|
|
332
586
|
height: 100%;
|
|
333
587
|
width: 100%;
|
|
334
588
|
}
|
|
335
|
-
`,
|
|
336
|
-
function
|
|
589
|
+
`, xt = (t) => typeof t == "string" && /^[\w-_]+:[\w-_]+$/.test(t);
|
|
590
|
+
function mt({ icon: t, size: e = "1rem", imageMeta: o, ...n }) {
|
|
337
591
|
const i = window.isNaN(e) ? e : `${e}px`;
|
|
338
|
-
return
|
|
592
|
+
return xt(t) ? /* @__PURE__ */ r(Pt, { icon: t }) : /* @__PURE__ */ r(fo, { component: ho, imageMeta: o, className: "base-icon", icon: t, size: i, ...n });
|
|
339
593
|
}
|
|
340
|
-
const
|
|
594
|
+
const fo = C(f)`
|
|
341
595
|
flex-shrink: 0;
|
|
342
596
|
`;
|
|
343
|
-
function
|
|
344
|
-
const l = o ? /* @__PURE__ */ r(
|
|
345
|
-
return
|
|
597
|
+
function V({ text: t, children: e, icon: o = "", endIcon: n, color: i = "primary", link: a = "", href: c = "", ...s }) {
|
|
598
|
+
const l = o ? /* @__PURE__ */ r(mt, { icon: o }) : null, d = n ? /* @__PURE__ */ r(mt, { icon: n }) : null, m = a || c, u = { ...s };
|
|
599
|
+
return m && (u.href = m, dt(m) && (u.target = u.target || "_blank")), /* @__PURE__ */ r(ve, { startIcon: l, endIcon: d, color: i, ...u, children: t || e });
|
|
346
600
|
}
|
|
347
|
-
function
|
|
348
|
-
const { pages: n = [] } =
|
|
601
|
+
function Gt({ editing: t, text: e, ...o }) {
|
|
602
|
+
const { pages: n = [] } = Dt(), i = n.find((a) => a.id === (o.link || o.linkId));
|
|
349
603
|
if (t)
|
|
350
|
-
return /* @__PURE__ */ r(
|
|
604
|
+
return /* @__PURE__ */ r(V, { ...I(o, ["link", "linkId"]), children: e });
|
|
351
605
|
if (i) {
|
|
352
606
|
const a = i.path || "/";
|
|
353
|
-
return /* @__PURE__ */ r(
|
|
607
|
+
return /* @__PURE__ */ r(xe, { to: a, children: /* @__PURE__ */ r(V, { ...I(o, ["link", "linkId"]), children: e }) });
|
|
354
608
|
}
|
|
355
|
-
return /* @__PURE__ */ r(
|
|
609
|
+
return /* @__PURE__ */ r(V, { ...I(o, "linkId"), children: e });
|
|
356
610
|
}
|
|
357
|
-
function
|
|
611
|
+
function O({ actions: t, center: e, className: o, align: n }) {
|
|
358
612
|
return t && t?.length ? /* @__PURE__ */ r(
|
|
359
|
-
|
|
613
|
+
f,
|
|
360
614
|
{
|
|
361
|
-
className:
|
|
615
|
+
className: b(
|
|
362
616
|
"flex gap-4 flex-wrap",
|
|
363
617
|
"lg:flex-row lg:gap-8",
|
|
364
618
|
(e || n === "center") && "justify-center",
|
|
@@ -371,7 +625,7 @@ function j({ actions: t, center: e, className: o, align: n }) {
|
|
|
371
625
|
}
|
|
372
626
|
) : null;
|
|
373
627
|
}
|
|
374
|
-
const
|
|
628
|
+
const xo = "section", bo = re(f)`
|
|
375
629
|
overflow: hidden;
|
|
376
630
|
|
|
377
631
|
.section__title {
|
|
@@ -422,7 +676,7 @@ const Ve = "section", Je = Gt(h)`
|
|
|
422
676
|
margin-bottom: 0.5rem;
|
|
423
677
|
}
|
|
424
678
|
}
|
|
425
|
-
@media (min-width: ${({ theme: t }) => t.breakpoints.values[
|
|
679
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[xo]}px) {
|
|
426
680
|
.section__tag {
|
|
427
681
|
margin-bottom: 32px;
|
|
428
682
|
}
|
|
@@ -434,7 +688,7 @@ const Ve = "section", Je = Gt(h)`
|
|
|
434
688
|
}
|
|
435
689
|
}
|
|
436
690
|
`;
|
|
437
|
-
function
|
|
691
|
+
function ot({
|
|
438
692
|
title: t,
|
|
439
693
|
description: e,
|
|
440
694
|
descriptionMarkdown: o,
|
|
@@ -445,76 +699,76 @@ function et({
|
|
|
445
699
|
append: s,
|
|
446
700
|
level: l = 2,
|
|
447
701
|
tag: d,
|
|
448
|
-
badge:
|
|
449
|
-
center:
|
|
450
|
-
logo:
|
|
451
|
-
titleAppearance:
|
|
452
|
-
descriptionAppearance:
|
|
453
|
-
...
|
|
702
|
+
badge: m,
|
|
703
|
+
center: u,
|
|
704
|
+
logo: h,
|
|
705
|
+
titleAppearance: p,
|
|
706
|
+
descriptionAppearance: y,
|
|
707
|
+
...x
|
|
454
708
|
}) {
|
|
455
|
-
const
|
|
456
|
-
if (!t && !e && !n && !
|
|
457
|
-
const k = Math.max(Math.min(5, l + 1), 1),
|
|
709
|
+
const v = Wt();
|
|
710
|
+
if (!t && !e && !n && !m && !d && !c && !s && !h) return null;
|
|
711
|
+
const k = Math.max(Math.min(5, l + 1), 1), _ = {
|
|
458
712
|
1: "xl:!text-3xl lg:!text-2xl md:!text-xl",
|
|
459
713
|
2: "xl:!text-2xl lg:!text-xl md:!text-lg",
|
|
460
714
|
3: "xl:!text-2xl lg:!text-xl md:!text-lg",
|
|
461
715
|
4: "xl:!text-xl lg:!text-lg md:!text-md",
|
|
462
716
|
5: "xl:!text-lg md:!text-md sm:!text-sm",
|
|
463
717
|
6: "!text-sm"
|
|
464
|
-
},
|
|
465
|
-
return /* @__PURE__ */ w(
|
|
718
|
+
}, M = l === 0 ? "big" : `h${k}`, B = l === 0;
|
|
719
|
+
return /* @__PURE__ */ w(bo, { className: b("base-info", "lg:text-left", u && "!text-center", i), ...x, children: [
|
|
466
720
|
c && /* @__PURE__ */ r("div", { children: c }),
|
|
467
|
-
(d ||
|
|
468
|
-
|
|
721
|
+
(d || m) && /* @__PURE__ */ r("div", { className: b("section__tag", a?.tag || a?.badge), children: d || m }),
|
|
722
|
+
h && /* @__PURE__ */ r("img", { className: "w-[120px] m-auto mb-8", src: h, alt: "info", loading: "lazy" }),
|
|
469
723
|
t && /* @__PURE__ */ r(
|
|
470
|
-
|
|
724
|
+
j,
|
|
471
725
|
{
|
|
472
726
|
sx: {
|
|
473
727
|
whiteSpace: "pre-wrap",
|
|
474
728
|
mb: e ? "2vw" : 0,
|
|
475
|
-
...
|
|
729
|
+
...p?.color && { color: `${v(p.color)} !important` }
|
|
476
730
|
},
|
|
477
|
-
className:
|
|
731
|
+
className: b(
|
|
478
732
|
"section__title",
|
|
479
733
|
"text-gray-800",
|
|
480
734
|
"dark:text-gray-50",
|
|
481
735
|
a.title,
|
|
482
736
|
"page-kit-section__title",
|
|
483
|
-
|
|
737
|
+
B ? "" : "section__title_non_big"
|
|
484
738
|
),
|
|
485
739
|
component: `h${Math.max(l, 1)}`,
|
|
486
|
-
variant:
|
|
740
|
+
variant: M,
|
|
487
741
|
children: t
|
|
488
742
|
}
|
|
489
743
|
),
|
|
490
744
|
e && (o ? /* @__PURE__ */ r(
|
|
491
|
-
|
|
745
|
+
f,
|
|
492
746
|
{
|
|
493
747
|
sx: {
|
|
494
|
-
...
|
|
748
|
+
...y?.color && { color: `${v(y.color)} !important` }
|
|
495
749
|
},
|
|
496
|
-
className:
|
|
750
|
+
className: b(
|
|
497
751
|
"section__description",
|
|
498
752
|
"text-gray-800",
|
|
499
753
|
"dark:text-gray-100",
|
|
500
|
-
|
|
754
|
+
_[k],
|
|
501
755
|
a.description,
|
|
502
756
|
"page-kit-section__description"
|
|
503
757
|
),
|
|
504
|
-
children: /* @__PURE__ */ r(
|
|
758
|
+
children: /* @__PURE__ */ r(we, { codeOptions: { showActionButton: !1, theme: ke }, children: e })
|
|
505
759
|
}
|
|
506
760
|
) : /* @__PURE__ */ r(
|
|
507
|
-
|
|
761
|
+
j,
|
|
508
762
|
{
|
|
509
763
|
sx: {
|
|
510
764
|
whiteSpace: "pre-wrap",
|
|
511
|
-
...
|
|
765
|
+
...y?.color && { color: `${v(y.color)} !important` }
|
|
512
766
|
},
|
|
513
|
-
className:
|
|
767
|
+
className: b(
|
|
514
768
|
"section__description",
|
|
515
769
|
"text-gray-800",
|
|
516
770
|
"dark:text-gray-100",
|
|
517
|
-
|
|
771
|
+
_[k],
|
|
518
772
|
a.description,
|
|
519
773
|
"page-kit-section__description"
|
|
520
774
|
),
|
|
@@ -524,11 +778,11 @@ function et({
|
|
|
524
778
|
children: e
|
|
525
779
|
}
|
|
526
780
|
)),
|
|
527
|
-
/* @__PURE__ */ r(
|
|
781
|
+
/* @__PURE__ */ r(O, { actions: n, center: u, className: "mt-8" }),
|
|
528
782
|
s && /* @__PURE__ */ r("div", { children: s })
|
|
529
783
|
] });
|
|
530
784
|
}
|
|
531
|
-
const
|
|
785
|
+
const nt = [
|
|
532
786
|
"actions",
|
|
533
787
|
"append",
|
|
534
788
|
"badge",
|
|
@@ -543,28 +797,28 @@ const ot = [
|
|
|
543
797
|
"titleAppearance",
|
|
544
798
|
"descriptionAppearance"
|
|
545
799
|
];
|
|
546
|
-
function
|
|
800
|
+
function yo() {
|
|
547
801
|
const t = navigator.userAgent.toLowerCase();
|
|
548
802
|
return t.includes("safari") && !t.includes("chrome");
|
|
549
803
|
}
|
|
550
|
-
function
|
|
804
|
+
function vo(t = "") {
|
|
551
805
|
if (t.startsWith("data:image/svg+xml,")) return !0;
|
|
552
806
|
const e = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/, o = /^(\/|\.\/|\.\.\/)(?:[^/]+\/)*[^/]+$/;
|
|
553
807
|
return e.test(t) || o.test(t);
|
|
554
808
|
}
|
|
555
|
-
function
|
|
809
|
+
function H(t) {
|
|
556
810
|
return t?.endsWith(".mp4") || t?.endsWith(".m4v") || t?.endsWith(".webm");
|
|
557
811
|
}
|
|
558
|
-
function
|
|
812
|
+
function wo(t) {
|
|
559
813
|
return t?.endsWith(".mp4") || t?.endsWith(".m4v") ? "video/mp4" : t?.endsWith(".webm") ? "video/webm" : void 0;
|
|
560
814
|
}
|
|
561
|
-
function
|
|
815
|
+
function ko(t) {
|
|
562
816
|
let e = {};
|
|
563
|
-
return typeof t == "string" ?
|
|
817
|
+
return typeof t == "string" ? Ce(t) ? e.image = t : (e.image = L(t), Se(t) && (e.color = t, e.image = "")) : e = t, e;
|
|
564
818
|
}
|
|
565
|
-
function
|
|
819
|
+
function _o() {
|
|
566
820
|
const [t, e] = Z(Date.now());
|
|
567
|
-
return
|
|
821
|
+
return J(() => {
|
|
568
822
|
const o = () => {
|
|
569
823
|
e(Date.now());
|
|
570
824
|
};
|
|
@@ -573,14 +827,14 @@ function Ze() {
|
|
|
573
827
|
};
|
|
574
828
|
}, []), t;
|
|
575
829
|
}
|
|
576
|
-
function
|
|
830
|
+
function $t(t, e, o, n, i) {
|
|
577
831
|
let a = null;
|
|
578
|
-
const { color: c = "", image: s } =
|
|
579
|
-
if (s &&
|
|
832
|
+
const { color: c = "", image: s } = ko(e);
|
|
833
|
+
if (s && vo(s)) {
|
|
580
834
|
delete o.backgroundColor;
|
|
581
|
-
const l = !(t.mobile.apple.device ||
|
|
835
|
+
const l = !(t.mobile.apple.device || yo()) && H(s), d = H(s) && n ? F(L(n), 1200, "quality") : "";
|
|
582
836
|
l ? a = /* @__PURE__ */ r(
|
|
583
|
-
|
|
837
|
+
f,
|
|
584
838
|
{
|
|
585
839
|
component: "video",
|
|
586
840
|
className: "section-bg",
|
|
@@ -590,7 +844,7 @@ function xt(t, e, o, n, i) {
|
|
|
590
844
|
controls: !1,
|
|
591
845
|
playsInline: !0,
|
|
592
846
|
poster: d,
|
|
593
|
-
src:
|
|
847
|
+
src: H(s) ? s : F(s, 1200, "quality"),
|
|
594
848
|
sx: {
|
|
595
849
|
width: "100%",
|
|
596
850
|
position: "absolute",
|
|
@@ -604,9 +858,9 @@ function xt(t, e, o, n, i) {
|
|
|
604
858
|
},
|
|
605
859
|
s
|
|
606
860
|
) : a = /* @__PURE__ */ r(
|
|
607
|
-
|
|
861
|
+
jt,
|
|
608
862
|
{
|
|
609
|
-
src:
|
|
863
|
+
src: H(s) && n ? d : s,
|
|
610
864
|
sizesAttr: {
|
|
611
865
|
sm: 600,
|
|
612
866
|
md: 900,
|
|
@@ -632,9 +886,9 @@ function xt(t, e, o, n, i) {
|
|
|
632
886
|
} else s ? o.backgroundImage = `${s} !important` : c && (o.backgroundColor = `${c} !important`);
|
|
633
887
|
return a;
|
|
634
888
|
}
|
|
635
|
-
function
|
|
889
|
+
function $o({ autoWidth: t, children: e, ...o }) {
|
|
636
890
|
return t ? /* @__PURE__ */ r(
|
|
637
|
-
|
|
891
|
+
f,
|
|
638
892
|
{
|
|
639
893
|
...o,
|
|
640
894
|
sx: [
|
|
@@ -645,9 +899,9 @@ function to({ autoWidth: t, children: e, ...o }) {
|
|
|
645
899
|
],
|
|
646
900
|
children: e
|
|
647
901
|
}
|
|
648
|
-
) : /* @__PURE__ */ r(
|
|
902
|
+
) : /* @__PURE__ */ r(ie, { ...o, children: e });
|
|
649
903
|
}
|
|
650
|
-
function
|
|
904
|
+
function rt({
|
|
651
905
|
dark: t = !1,
|
|
652
906
|
children: e,
|
|
653
907
|
className: o,
|
|
@@ -658,30 +912,30 @@ function nt({
|
|
|
658
912
|
type: s,
|
|
659
913
|
...l
|
|
660
914
|
}) {
|
|
661
|
-
const d = { ...n },
|
|
662
|
-
t && (d.color =
|
|
663
|
-
const
|
|
915
|
+
const d = { ...n }, m = zt((p) => p.breakpoints.down("md"));
|
|
916
|
+
t && (d.color = kt.common.white, d.backgroundColor = `${kt.grey[900]} !important`), i.show && (d.display = "flex");
|
|
917
|
+
const u = S(() => !Number(l.boxMaxWidth) || m ? {
|
|
664
918
|
width: "100%"
|
|
665
919
|
} : s === "wall" && l.boxMaxWidth ? {
|
|
666
920
|
maxWidth: `${l.boxMaxWidth}px !important`,
|
|
667
921
|
width: "100%"
|
|
668
922
|
} : {
|
|
669
923
|
width: "100%"
|
|
670
|
-
}, [l.boxMaxWidth,
|
|
924
|
+
}, [l.boxMaxWidth, m, s]), h = W({
|
|
671
925
|
type: "baseSectionPaddingY",
|
|
672
926
|
value: a || "normal",
|
|
673
927
|
// section default is normal
|
|
674
928
|
defaultValue: ""
|
|
675
929
|
});
|
|
676
930
|
return /* @__PURE__ */ r(
|
|
677
|
-
|
|
931
|
+
Co,
|
|
678
932
|
{
|
|
679
933
|
component: "section",
|
|
680
|
-
styles: { ...d, ...
|
|
681
|
-
className:
|
|
934
|
+
styles: { ...d, ...h },
|
|
935
|
+
className: b("base-section", "px-2 md:px-5 lg:px-5 xl:px-10", o, {
|
|
682
936
|
dark: t
|
|
683
937
|
}),
|
|
684
|
-
...
|
|
938
|
+
...I(
|
|
685
939
|
l,
|
|
686
940
|
"hoverStyle",
|
|
687
941
|
"boxMaxWidth",
|
|
@@ -692,11 +946,11 @@ function nt({
|
|
|
692
946
|
"titleAppearance",
|
|
693
947
|
"descriptionAppearance"
|
|
694
948
|
),
|
|
695
|
-
children: /* @__PURE__ */ r(
|
|
949
|
+
children: /* @__PURE__ */ r($o, { autoWidth: l?.autoWidth, className: b("section-content h-full"), sx: u, children: i.show ? /* @__PURE__ */ r(Ht, { ...c, boxed: i, children: e }) : e })
|
|
696
950
|
}
|
|
697
951
|
);
|
|
698
952
|
}
|
|
699
|
-
function
|
|
953
|
+
function Ht({
|
|
700
954
|
background: t = "",
|
|
701
955
|
backgroundVideoPoster: e,
|
|
702
956
|
children: o,
|
|
@@ -706,38 +960,38 @@ function jt({
|
|
|
706
960
|
styles: c = {},
|
|
707
961
|
...s
|
|
708
962
|
}) {
|
|
709
|
-
const l = { ...c, ...n }, d =
|
|
710
|
-
let
|
|
711
|
-
const
|
|
712
|
-
return t && (
|
|
713
|
-
|
|
963
|
+
const l = { ...c, ...n }, d = Wt();
|
|
964
|
+
let m = null;
|
|
965
|
+
const u = zt((y) => y.breakpoints.up("sm")), h = _e(), p = _o();
|
|
966
|
+
return t && (m = $t(
|
|
967
|
+
h,
|
|
714
968
|
typeof t == "string" ? d(t) : t,
|
|
715
969
|
l,
|
|
716
970
|
e,
|
|
717
|
-
|
|
718
|
-
)), i.show && (l.borderRadius = "10px", l.padding === void 0 && (l.padding =
|
|
719
|
-
|
|
971
|
+
p
|
|
972
|
+
)), i.show && (l.borderRadius = "10px", l.padding === void 0 && (l.padding = u ? "50px" : "20px"), i?.border && (l.border = "1px solid #c0c0c0"), i?.background && (m = $t(
|
|
973
|
+
h,
|
|
720
974
|
typeof i?.background == "string" ? d(i?.background) : i?.background,
|
|
721
975
|
l,
|
|
722
976
|
i?.backgroundVideoPoster,
|
|
723
|
-
|
|
977
|
+
p
|
|
724
978
|
))), /* @__PURE__ */ w(
|
|
725
|
-
|
|
979
|
+
f,
|
|
726
980
|
{
|
|
727
981
|
...s,
|
|
728
982
|
sx: {
|
|
729
983
|
...l,
|
|
730
|
-
...
|
|
984
|
+
...m ? { position: "relative", overflow: "hidden", zIndex: 0 } : {}
|
|
731
985
|
},
|
|
732
|
-
className:
|
|
986
|
+
className: b(a, i?.boxShadow && "shadow-xl"),
|
|
733
987
|
children: [
|
|
734
|
-
|
|
988
|
+
m,
|
|
735
989
|
o
|
|
736
990
|
]
|
|
737
991
|
}
|
|
738
992
|
);
|
|
739
993
|
}
|
|
740
|
-
const
|
|
994
|
+
const Co = C(Ht)`
|
|
741
995
|
&:nth-of-type(even) {
|
|
742
996
|
background: #f8f8f8;
|
|
743
997
|
}
|
|
@@ -754,15 +1008,15 @@ const eo = _(jt)`
|
|
|
754
1008
|
}
|
|
755
1009
|
}
|
|
756
1010
|
`;
|
|
757
|
-
function
|
|
758
|
-
if (t.type ===
|
|
759
|
-
const o = (t.props.children || []).filter((n) =>
|
|
760
|
-
return o.length === 1 ?
|
|
1011
|
+
function Vt(t) {
|
|
1012
|
+
if (t.type === fe) {
|
|
1013
|
+
const o = (t.props.children || []).filter((n) => Et(n));
|
|
1014
|
+
return o.length === 1 ? Vt(o[0]) : o.length > 1;
|
|
761
1015
|
}
|
|
762
1016
|
return Array.isArray(t);
|
|
763
1017
|
}
|
|
764
|
-
const
|
|
765
|
-
function
|
|
1018
|
+
const P = "&>*";
|
|
1019
|
+
function Jt({ children: t, col: e, gap: o, className: n, align: i, sx: a, type: c, ...s } = {
|
|
766
1020
|
children: null,
|
|
767
1021
|
className: "",
|
|
768
1022
|
col: 3,
|
|
@@ -771,7 +1025,7 @@ function Tt({ children: t, col: e, gap: o, className: n, align: i, sx: a, type:
|
|
|
771
1025
|
align: "center",
|
|
772
1026
|
type: "default"
|
|
773
1027
|
}) {
|
|
774
|
-
const l =
|
|
1028
|
+
const l = At(), d = Number(Math.floor(100 / e * 100) / 100), m = {
|
|
775
1029
|
center: "justify-center items-center",
|
|
776
1030
|
left: "justify-start items-center",
|
|
777
1031
|
right: "justify-end items-center",
|
|
@@ -781,51 +1035,51 @@ function Tt({ children: t, col: e, gap: o, className: n, align: i, sx: a, type:
|
|
|
781
1035
|
"top-right": "justify-end items-start",
|
|
782
1036
|
"bottom-left": "justify-start items-end",
|
|
783
1037
|
"bottom-right": "justify-end items-end"
|
|
784
|
-
},
|
|
785
|
-
let
|
|
1038
|
+
}, u = m[i] || m.center;
|
|
1039
|
+
let p = o ?? ({
|
|
786
1040
|
2: 6,
|
|
787
1041
|
3: 4,
|
|
788
1042
|
4: 4,
|
|
789
1043
|
5: 3,
|
|
790
1044
|
6: 3
|
|
791
1045
|
}[e] || 0);
|
|
792
|
-
|
|
793
|
-
const
|
|
794
|
-
let
|
|
795
|
-
const k = { [
|
|
796
|
-
switch (k.gap = "1rem",
|
|
1046
|
+
Vt(t) || (p = 0);
|
|
1047
|
+
const x = (e - 1) * p / e;
|
|
1048
|
+
let v = { ...a, gap: `${p}rem` };
|
|
1049
|
+
const k = { [P]: { width: "100%" } }, _ = {}, M = {}, B = {};
|
|
1050
|
+
switch (k.gap = "1rem", _.gap = `${p / 2}rem`, e) {
|
|
797
1051
|
case 3:
|
|
798
1052
|
case 4:
|
|
799
|
-
|
|
800
|
-
width: `calc(50% - ${
|
|
1053
|
+
_[P] = {
|
|
1054
|
+
width: `calc(50% - ${p / 2}rem)`
|
|
801
1055
|
};
|
|
802
1056
|
break;
|
|
803
1057
|
case 5:
|
|
804
1058
|
case 6:
|
|
805
|
-
k[
|
|
806
|
-
width: `calc(50% - ${
|
|
807
|
-
},
|
|
808
|
-
width: `calc(50% - ${
|
|
809
|
-
}, P
|
|
810
|
-
width: `calc(33.33% - ${
|
|
1059
|
+
k[P] = {
|
|
1060
|
+
width: `calc(50% - ${p / 2 / 2}rem)`
|
|
1061
|
+
}, _[P] = {
|
|
1062
|
+
width: `calc(50% - ${p / 2 / 2}rem)`
|
|
1063
|
+
}, M[P] = {
|
|
1064
|
+
width: `calc(33.33% - ${p * 2 / 3}rem)`
|
|
811
1065
|
};
|
|
812
1066
|
break;
|
|
813
1067
|
}
|
|
814
|
-
return
|
|
1068
|
+
return v[P] = { width: `calc(${d}% - ${x}rem)` }, v[`@media (max-width: ${l.breakpoints.values.xl}px)`] = B, v[`@media (max-width: ${l.breakpoints.values.lg}px)`] = M, v[`@media (max-width: ${l.breakpoints.values.md}px)`] = _, v[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k, c === "wall" && (v = { ...a, gap: `${p}rem` }, v[P] = { width: `calc(${d}% - ${x}rem)` }, k[P] = { width: `calc(45% - ${p / 2 / 2}rem)` }, v[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k), /* @__PURE__ */ r(f, { className: b("flex flex-wrap flex-row h-full", u, n), sx: v, ...s, children: t });
|
|
815
1069
|
}
|
|
816
|
-
function
|
|
1070
|
+
function U({ type: t = "", icon: e = "", size: o = "3rem", className: n = "", ...i }) {
|
|
817
1071
|
return /* @__PURE__ */ r(
|
|
818
|
-
|
|
1072
|
+
mt,
|
|
819
1073
|
{
|
|
820
1074
|
icon: e || t,
|
|
821
1075
|
size: o,
|
|
822
|
-
className:
|
|
1076
|
+
className: b("content-icon", n),
|
|
823
1077
|
...i,
|
|
824
1078
|
color: typeof i.color > "u" ? "inherit" : i.color
|
|
825
1079
|
}
|
|
826
1080
|
);
|
|
827
1081
|
}
|
|
828
|
-
function
|
|
1082
|
+
function So({
|
|
829
1083
|
to: t,
|
|
830
1084
|
base: e,
|
|
831
1085
|
children: o,
|
|
@@ -836,33 +1090,33 @@ function oo({
|
|
|
836
1090
|
useRouterLink: s,
|
|
837
1091
|
...l
|
|
838
1092
|
}) {
|
|
839
|
-
const { pages: d = [], locale:
|
|
840
|
-
let
|
|
841
|
-
const
|
|
1093
|
+
const { pages: d = [], locale: m = "" } = {}, u = e ? X("/", e) : e || "";
|
|
1094
|
+
let h = a === "auto" ? "_self" : a, p = X(u, t);
|
|
1095
|
+
const y = c ? dt(p) : !1;
|
|
842
1096
|
if (e)
|
|
843
|
-
return
|
|
1097
|
+
return p = X(u, m, t), /* @__PURE__ */ r(
|
|
844
1098
|
"a",
|
|
845
1099
|
{
|
|
846
1100
|
className: `no-underline ${n}`,
|
|
847
|
-
href:
|
|
1101
|
+
href: lt(p),
|
|
848
1102
|
rel: "noreferrer noopener",
|
|
849
|
-
target:
|
|
1103
|
+
target: h,
|
|
850
1104
|
...l,
|
|
851
1105
|
children: o
|
|
852
1106
|
}
|
|
853
1107
|
);
|
|
854
|
-
if (
|
|
855
|
-
a === "auto" && (
|
|
1108
|
+
if (dt(t))
|
|
1109
|
+
a === "auto" && (h = "_blank"), p = t;
|
|
856
1110
|
else {
|
|
857
|
-
|
|
858
|
-
const
|
|
859
|
-
if (s ||
|
|
1111
|
+
Be(p) && (p = X(window.location.pathname, p));
|
|
1112
|
+
const x = Ne(`${window.location.origin}${p}`), v = d.some((k) => k.pathname === x.pathname);
|
|
1113
|
+
if (s || v)
|
|
860
1114
|
return /* @__PURE__ */ r(
|
|
861
|
-
|
|
1115
|
+
be,
|
|
862
1116
|
{
|
|
863
1117
|
end: !0,
|
|
864
|
-
to:
|
|
865
|
-
className: ({ isActive: k }) =>
|
|
1118
|
+
to: lt(p),
|
|
1119
|
+
className: ({ isActive: k }) => b(n, k ? i : ""),
|
|
866
1120
|
...l,
|
|
867
1121
|
children: o
|
|
868
1122
|
}
|
|
@@ -872,18 +1126,18 @@ function oo({
|
|
|
872
1126
|
"a",
|
|
873
1127
|
{
|
|
874
1128
|
className: `no-underline ${n}`,
|
|
875
|
-
href:
|
|
1129
|
+
href: lt(p),
|
|
876
1130
|
rel: "noreferrer noopener",
|
|
877
|
-
target:
|
|
1131
|
+
target: h,
|
|
878
1132
|
...l,
|
|
879
1133
|
children: [
|
|
880
1134
|
o,
|
|
881
|
-
|
|
1135
|
+
y && /* @__PURE__ */ r(U, { icon: "i-mdi:arrow-top-right", size: "0.9em", className: "smart-link__mark", style: { marginLeft: 5 } })
|
|
882
1136
|
]
|
|
883
1137
|
}
|
|
884
1138
|
);
|
|
885
1139
|
}
|
|
886
|
-
function
|
|
1140
|
+
function Y({
|
|
887
1141
|
prepend: t,
|
|
888
1142
|
append: e,
|
|
889
1143
|
children: o,
|
|
@@ -893,31 +1147,31 @@ function H({
|
|
|
893
1147
|
...c
|
|
894
1148
|
}) {
|
|
895
1149
|
let s = {};
|
|
896
|
-
const { pages: l = [] } =
|
|
1150
|
+
const { pages: l = [] } = Dt(), d = l.find((h) => h.id === c.link), m = !o || ge.Children.toArray(o).every((h) => h === null);
|
|
897
1151
|
c.link && (s = {
|
|
898
|
-
component:
|
|
1152
|
+
component: So,
|
|
899
1153
|
to: d?.path || c.link,
|
|
900
1154
|
useRouterLink: !0
|
|
901
1155
|
});
|
|
902
|
-
const
|
|
1156
|
+
const u = ae();
|
|
903
1157
|
return /* @__PURE__ */ w(
|
|
904
|
-
|
|
1158
|
+
Bo,
|
|
905
1159
|
{
|
|
906
|
-
className:
|
|
1160
|
+
className: b("base-card card", { dark: i, "border-transparent": !a }, n),
|
|
907
1161
|
sx: {
|
|
908
|
-
borderColor:
|
|
1162
|
+
borderColor: u.palette.divider
|
|
909
1163
|
},
|
|
910
1164
|
...s,
|
|
911
|
-
...
|
|
1165
|
+
...I(c, ["listType", "dark", "iconColor", "link", "hoverStyle", "imageSize"]),
|
|
912
1166
|
children: [
|
|
913
1167
|
t,
|
|
914
|
-
!
|
|
1168
|
+
!m && /* @__PURE__ */ r("div", { className: "card__body", children: o }),
|
|
915
1169
|
e
|
|
916
1170
|
]
|
|
917
1171
|
}
|
|
918
1172
|
);
|
|
919
1173
|
}
|
|
920
|
-
const
|
|
1174
|
+
const Bo = C(f)`
|
|
921
1175
|
&.base-card {
|
|
922
1176
|
text-align: left;
|
|
923
1177
|
border-width: 1px;
|
|
@@ -933,7 +1187,7 @@ const no = _(h)`
|
|
|
933
1187
|
padding: 15px 15px;
|
|
934
1188
|
}
|
|
935
1189
|
`;
|
|
936
|
-
function
|
|
1190
|
+
function K({
|
|
937
1191
|
align: t = "left",
|
|
938
1192
|
title: e,
|
|
939
1193
|
titleProps: o = {},
|
|
@@ -942,9 +1196,9 @@ function Y({
|
|
|
942
1196
|
}) {
|
|
943
1197
|
return /* @__PURE__ */ w(Q, { children: [
|
|
944
1198
|
e && /* @__PURE__ */ r(
|
|
945
|
-
|
|
1199
|
+
j,
|
|
946
1200
|
{
|
|
947
|
-
className:
|
|
1201
|
+
className: b("card__title text-gray-800", "dark:text-gray-50"),
|
|
948
1202
|
component: "h5",
|
|
949
1203
|
variant: "h5",
|
|
950
1204
|
gutterBottom: !0,
|
|
@@ -954,9 +1208,9 @@ function Y({
|
|
|
954
1208
|
}
|
|
955
1209
|
),
|
|
956
1210
|
n && /* @__PURE__ */ r(
|
|
957
|
-
|
|
1211
|
+
j,
|
|
958
1212
|
{
|
|
959
|
-
className:
|
|
1213
|
+
className: b("card__description", "text-gray-500", "dark:text-gray-400"),
|
|
960
1214
|
component: "div",
|
|
961
1215
|
variant: "body1",
|
|
962
1216
|
gutterBottom: !0,
|
|
@@ -967,7 +1221,7 @@ function Y({
|
|
|
967
1221
|
)
|
|
968
1222
|
] });
|
|
969
1223
|
}
|
|
970
|
-
function
|
|
1224
|
+
function No({
|
|
971
1225
|
image: t,
|
|
972
1226
|
title: e,
|
|
973
1227
|
description: o,
|
|
@@ -978,16 +1232,16 @@ function ro({
|
|
|
978
1232
|
descriptionProps: s = {},
|
|
979
1233
|
actions: l,
|
|
980
1234
|
align: d,
|
|
981
|
-
...
|
|
1235
|
+
...m
|
|
982
1236
|
}) {
|
|
983
|
-
const
|
|
1237
|
+
const u = xt(t), h = F(L(t), 540);
|
|
984
1238
|
return /* @__PURE__ */ w(
|
|
985
|
-
|
|
1239
|
+
Ro,
|
|
986
1240
|
{
|
|
987
1241
|
className: "card-article",
|
|
988
|
-
...
|
|
989
|
-
prepend: /* @__PURE__ */ r("div", { className: "card__image__wrap", children:
|
|
990
|
-
|
|
1242
|
+
...m,
|
|
1243
|
+
prepend: /* @__PURE__ */ r("div", { className: "card__image__wrap", children: u && t ? /* @__PURE__ */ r(
|
|
1244
|
+
f,
|
|
991
1245
|
{
|
|
992
1246
|
sx: {
|
|
993
1247
|
position: "absolute",
|
|
@@ -999,13 +1253,13 @@ function ro({
|
|
|
999
1253
|
alignItems: "center",
|
|
1000
1254
|
justifyContent: "center"
|
|
1001
1255
|
},
|
|
1002
|
-
children: /* @__PURE__ */ r(
|
|
1256
|
+
children: /* @__PURE__ */ r(U, { icon: t, color: "primary.main" })
|
|
1003
1257
|
}
|
|
1004
|
-
) :
|
|
1258
|
+
) : h && /* @__PURE__ */ r(
|
|
1005
1259
|
"img",
|
|
1006
1260
|
{
|
|
1007
1261
|
className: "card__image",
|
|
1008
|
-
src:
|
|
1262
|
+
src: h,
|
|
1009
1263
|
...n,
|
|
1010
1264
|
alt: n.alt || i?.filename || "card-image",
|
|
1011
1265
|
width: i?.naturalWidth,
|
|
@@ -1016,7 +1270,7 @@ function ro({
|
|
|
1016
1270
|
) }),
|
|
1017
1271
|
children: [
|
|
1018
1272
|
e || o ? /* @__PURE__ */ r(
|
|
1019
|
-
|
|
1273
|
+
K,
|
|
1020
1274
|
{
|
|
1021
1275
|
align: d,
|
|
1022
1276
|
title: e,
|
|
@@ -1025,12 +1279,12 @@ function ro({
|
|
|
1025
1279
|
descriptionProps: s
|
|
1026
1280
|
}
|
|
1027
1281
|
) : null,
|
|
1028
|
-
l?.length ? /* @__PURE__ */ r(
|
|
1282
|
+
l?.length ? /* @__PURE__ */ r(O, { align: d, actions: l, className: "mt-4" }) : null
|
|
1029
1283
|
]
|
|
1030
1284
|
}
|
|
1031
1285
|
);
|
|
1032
1286
|
}
|
|
1033
|
-
const
|
|
1287
|
+
const Ro = C(Y)`
|
|
1034
1288
|
${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
|
|
1035
1289
|
&:hover {
|
|
1036
1290
|
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
@@ -1064,8 +1318,8 @@ const io = _(H)`
|
|
|
1064
1318
|
height: 100%;
|
|
1065
1319
|
object-position: top center;
|
|
1066
1320
|
}
|
|
1067
|
-
`,
|
|
1068
|
-
function
|
|
1321
|
+
`, Ct = "section";
|
|
1322
|
+
function St({
|
|
1069
1323
|
title: t,
|
|
1070
1324
|
image: e,
|
|
1071
1325
|
imageMeta: o,
|
|
@@ -1076,9 +1330,9 @@ function yt({
|
|
|
1076
1330
|
className: s = "",
|
|
1077
1331
|
...l
|
|
1078
1332
|
}) {
|
|
1079
|
-
return /* @__PURE__ */ w(
|
|
1333
|
+
return /* @__PURE__ */ w(Mo, { className: b("card", `list-type-${c}`, s), align: a, ...l, children: [
|
|
1080
1334
|
e && /* @__PURE__ */ r(
|
|
1081
|
-
|
|
1335
|
+
U,
|
|
1082
1336
|
{
|
|
1083
1337
|
icon: e,
|
|
1084
1338
|
color: "primary.main",
|
|
@@ -1086,18 +1340,18 @@ function yt({
|
|
|
1086
1340
|
imageMeta: o
|
|
1087
1341
|
}
|
|
1088
1342
|
),
|
|
1089
|
-
t || n ? /* @__PURE__ */ r(
|
|
1090
|
-
i?.length ? /* @__PURE__ */ r(
|
|
1343
|
+
t || n ? /* @__PURE__ */ r(K, { align: a, title: t, description: n }) : null,
|
|
1344
|
+
i?.length ? /* @__PURE__ */ r(O, { align: a, actions: i, className: "mt-4" }) : null
|
|
1091
1345
|
] });
|
|
1092
1346
|
}
|
|
1093
|
-
const
|
|
1347
|
+
const Mo = C(Y)`
|
|
1094
1348
|
padding: 5vw 4vw;
|
|
1095
1349
|
box-sizing: border-box;
|
|
1096
1350
|
/* min-height: 320px; */
|
|
1097
1351
|
color: inherit !important;
|
|
1098
1352
|
border-radius: 0.5rem;
|
|
1099
1353
|
/* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
|
|
1100
|
-
@media (max-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1354
|
+
@media (max-width: ${({ theme: t }) => t.breakpoints.values[Ct]}px) {
|
|
1101
1355
|
padding: 1.5rem 2rem;
|
|
1102
1356
|
}
|
|
1103
1357
|
@media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
|
|
@@ -1145,13 +1399,13 @@ const ao = _(H)`
|
|
|
1145
1399
|
}
|
|
1146
1400
|
}
|
|
1147
1401
|
|
|
1148
|
-
@media (min-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1402
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[Ct]}px) {
|
|
1149
1403
|
padding: 2rem 2rem;
|
|
1150
1404
|
text-align: left;
|
|
1151
1405
|
box-sizing: border-box;
|
|
1152
1406
|
}
|
|
1153
1407
|
`;
|
|
1154
|
-
function
|
|
1408
|
+
function Io({
|
|
1155
1409
|
image: t,
|
|
1156
1410
|
title: e,
|
|
1157
1411
|
description: o,
|
|
@@ -1162,16 +1416,16 @@ function so({
|
|
|
1162
1416
|
descriptionProps: s = {},
|
|
1163
1417
|
actions: l,
|
|
1164
1418
|
align: d,
|
|
1165
|
-
...
|
|
1419
|
+
...m
|
|
1166
1420
|
}) {
|
|
1167
|
-
const
|
|
1421
|
+
const u = xt(t), h = F(L(t), 540);
|
|
1168
1422
|
return /* @__PURE__ */ w(
|
|
1169
|
-
|
|
1423
|
+
Lo,
|
|
1170
1424
|
{
|
|
1171
1425
|
className: "card-article",
|
|
1172
|
-
...
|
|
1173
|
-
prepend: /* @__PURE__ */ r("div", { className: "card__image__wrap", children:
|
|
1174
|
-
|
|
1426
|
+
...m,
|
|
1427
|
+
prepend: /* @__PURE__ */ r("div", { className: "card__image__wrap", children: u && t ? /* @__PURE__ */ r(
|
|
1428
|
+
f,
|
|
1175
1429
|
{
|
|
1176
1430
|
sx: {
|
|
1177
1431
|
position: "absolute",
|
|
@@ -1183,14 +1437,14 @@ function so({
|
|
|
1183
1437
|
alignItems: "center",
|
|
1184
1438
|
justifyContent: "center"
|
|
1185
1439
|
},
|
|
1186
|
-
children: /* @__PURE__ */ r(
|
|
1440
|
+
children: /* @__PURE__ */ r(U, { icon: t, color: "primary.main" })
|
|
1187
1441
|
}
|
|
1188
|
-
) :
|
|
1189
|
-
|
|
1442
|
+
) : h && /* @__PURE__ */ r(
|
|
1443
|
+
f,
|
|
1190
1444
|
{
|
|
1191
1445
|
component: "img",
|
|
1192
1446
|
className: "card__image",
|
|
1193
|
-
src:
|
|
1447
|
+
src: h,
|
|
1194
1448
|
...n,
|
|
1195
1449
|
alt: n.alt || i?.filename || "card-image",
|
|
1196
1450
|
style: { width: "100%", height: "100%", objectFit: a || "contain", objectPosition: "center" },
|
|
@@ -1206,7 +1460,7 @@ function so({
|
|
|
1206
1460
|
) }),
|
|
1207
1461
|
children: [
|
|
1208
1462
|
e || o ? /* @__PURE__ */ r(
|
|
1209
|
-
|
|
1463
|
+
K,
|
|
1210
1464
|
{
|
|
1211
1465
|
align: d,
|
|
1212
1466
|
title: e,
|
|
@@ -1215,12 +1469,12 @@ function so({
|
|
|
1215
1469
|
descriptionProps: s
|
|
1216
1470
|
}
|
|
1217
1471
|
) : null,
|
|
1218
|
-
l?.length ? /* @__PURE__ */ r(
|
|
1472
|
+
l?.length ? /* @__PURE__ */ r(O, { align: d, actions: l, className: "mt-4" }) : null
|
|
1219
1473
|
]
|
|
1220
1474
|
}
|
|
1221
1475
|
);
|
|
1222
1476
|
}
|
|
1223
|
-
const
|
|
1477
|
+
const Lo = C(Y)`
|
|
1224
1478
|
${(t) => t.hoverStyle === "none" ? "" : t.link ? `transition: box-shadow ease .3s;
|
|
1225
1479
|
&:hover {
|
|
1226
1480
|
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
@@ -1244,8 +1498,8 @@ const lo = _(H)`
|
|
|
1244
1498
|
.card__image {
|
|
1245
1499
|
max-height: 60px;
|
|
1246
1500
|
}
|
|
1247
|
-
`,
|
|
1248
|
-
function
|
|
1501
|
+
`, Bt = "section";
|
|
1502
|
+
function Eo({
|
|
1249
1503
|
title: t,
|
|
1250
1504
|
image: e,
|
|
1251
1505
|
imageMeta: o,
|
|
@@ -1256,15 +1510,15 @@ function co({
|
|
|
1256
1510
|
className: s = "",
|
|
1257
1511
|
...l
|
|
1258
1512
|
}) {
|
|
1259
|
-
return /* @__PURE__ */ r(
|
|
1260
|
-
e && /* @__PURE__ */ r(
|
|
1261
|
-
/* @__PURE__ */ w(
|
|
1262
|
-
/* @__PURE__ */ r(
|
|
1263
|
-
/* @__PURE__ */ r(
|
|
1513
|
+
return /* @__PURE__ */ r(Ao, { className: b("card", s), ...l, children: /* @__PURE__ */ w(f, { className: "flex items-center", children: [
|
|
1514
|
+
e && /* @__PURE__ */ r(U, { icon: e, color: "primary.main", size: n, imageMeta: o }),
|
|
1515
|
+
/* @__PURE__ */ w(f, { className: "flex-1 ml-4", children: [
|
|
1516
|
+
/* @__PURE__ */ r(K, { align: c, title: t, description: i }),
|
|
1517
|
+
/* @__PURE__ */ r(O, { align: c, actions: a, className: "mt-4" })
|
|
1264
1518
|
] })
|
|
1265
1519
|
] }) });
|
|
1266
1520
|
}
|
|
1267
|
-
const
|
|
1521
|
+
const Ao = C(Y)`
|
|
1268
1522
|
padding: 5vw 4vw;
|
|
1269
1523
|
text-align: left;
|
|
1270
1524
|
box-sizing: border-box;
|
|
@@ -1272,7 +1526,7 @@ const mo = _(H)`
|
|
|
1272
1526
|
color: inherit !important;
|
|
1273
1527
|
border-radius: 0.5rem;
|
|
1274
1528
|
/* ${({ dark: t, theme: e }) => `background-color:${t ? e.palette.grey[900] : e.palette.common.white};`} */
|
|
1275
|
-
@media (max-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1529
|
+
@media (max-width: ${({ theme: t }) => t.breakpoints.values[Bt]}px) {
|
|
1276
1530
|
padding: 1.5rem 2rem;
|
|
1277
1531
|
}
|
|
1278
1532
|
@media (max-width: ${({ theme: t }) => t.breakpoints.values.sm}px) {
|
|
@@ -1317,13 +1571,13 @@ const mo = _(H)`
|
|
|
1317
1571
|
}
|
|
1318
1572
|
}
|
|
1319
1573
|
|
|
1320
|
-
@media (min-width: ${({ theme: t }) => t.breakpoints.values[
|
|
1574
|
+
@media (min-width: ${({ theme: t }) => t.breakpoints.values[Bt]}px) {
|
|
1321
1575
|
padding: 2rem 2rem;
|
|
1322
1576
|
text-align: left;
|
|
1323
1577
|
box-sizing: border-box;
|
|
1324
1578
|
}
|
|
1325
1579
|
`;
|
|
1326
|
-
function
|
|
1580
|
+
function Po({
|
|
1327
1581
|
title: t,
|
|
1328
1582
|
titleProps: e = {},
|
|
1329
1583
|
description: o,
|
|
@@ -1335,10 +1589,10 @@ function po({
|
|
|
1335
1589
|
hoverStyle: l,
|
|
1336
1590
|
...d
|
|
1337
1591
|
}) {
|
|
1338
|
-
return /* @__PURE__ */ w(
|
|
1339
|
-
i && /* @__PURE__ */ r(
|
|
1592
|
+
return /* @__PURE__ */ w(Wo, { className: b("card-simple", c, `hover-style__${l}`), align: s, ...d, children: [
|
|
1593
|
+
i && /* @__PURE__ */ r(U, { icon: i, color: "primary.main", imageMeta: a }),
|
|
1340
1594
|
t || o ? /* @__PURE__ */ r(
|
|
1341
|
-
|
|
1595
|
+
K,
|
|
1342
1596
|
{
|
|
1343
1597
|
align: s,
|
|
1344
1598
|
title: t,
|
|
@@ -1349,7 +1603,7 @@ function po({
|
|
|
1349
1603
|
) : null
|
|
1350
1604
|
] });
|
|
1351
1605
|
}
|
|
1352
|
-
const
|
|
1606
|
+
const Wo = C(Y)`
|
|
1353
1607
|
.card__title {
|
|
1354
1608
|
color: ${({ theme: t }) => t.palette.text.primary};
|
|
1355
1609
|
a {
|
|
@@ -1446,17 +1700,17 @@ const uo = _(H)`
|
|
|
1446
1700
|
}
|
|
1447
1701
|
}
|
|
1448
1702
|
`;
|
|
1449
|
-
function
|
|
1703
|
+
function jo({ type: t = "default", ...e }) {
|
|
1450
1704
|
const n = {
|
|
1451
|
-
article:
|
|
1452
|
-
simple:
|
|
1453
|
-
news:
|
|
1454
|
-
default:
|
|
1455
|
-
wall:
|
|
1456
|
-
}[t] ||
|
|
1457
|
-
return /* @__PURE__ */ r(n, { ...t === "news" ? e :
|
|
1458
|
-
}
|
|
1459
|
-
function
|
|
1705
|
+
article: No,
|
|
1706
|
+
simple: Po,
|
|
1707
|
+
news: Eo,
|
|
1708
|
+
default: St,
|
|
1709
|
+
wall: Io
|
|
1710
|
+
}[t] || St;
|
|
1711
|
+
return /* @__PURE__ */ r(n, { ...t === "news" ? e : I(e, "iconSize") });
|
|
1712
|
+
}
|
|
1713
|
+
function zo({
|
|
1460
1714
|
list: t = [],
|
|
1461
1715
|
align: e = "top",
|
|
1462
1716
|
cards: o,
|
|
@@ -1467,42 +1721,42 @@ function ho({
|
|
|
1467
1721
|
iconColor: s,
|
|
1468
1722
|
className: l = "",
|
|
1469
1723
|
type: d = "default",
|
|
1470
|
-
dark:
|
|
1471
|
-
textAlign:
|
|
1472
|
-
hoverStyle:
|
|
1473
|
-
...
|
|
1724
|
+
dark: m = !1,
|
|
1725
|
+
textAlign: u = "left",
|
|
1726
|
+
hoverStyle: h,
|
|
1727
|
+
...p
|
|
1474
1728
|
}) {
|
|
1475
1729
|
return /* @__PURE__ */ r(
|
|
1476
|
-
|
|
1730
|
+
Jt,
|
|
1477
1731
|
{
|
|
1478
1732
|
type: d,
|
|
1479
|
-
className:
|
|
1733
|
+
className: b("card-list py-1", l, "items-stretch"),
|
|
1480
1734
|
col: a,
|
|
1481
1735
|
gap: c,
|
|
1482
1736
|
align: e,
|
|
1483
|
-
...
|
|
1484
|
-
children: o || t.map((
|
|
1485
|
-
|
|
1737
|
+
...p,
|
|
1738
|
+
children: o || t.map((y) => /* @__PURE__ */ r(
|
|
1739
|
+
jo,
|
|
1486
1740
|
{
|
|
1487
1741
|
borderColor: n,
|
|
1488
1742
|
iconColor: s,
|
|
1489
1743
|
type: d,
|
|
1490
1744
|
listType: i,
|
|
1491
|
-
dark:
|
|
1492
|
-
...
|
|
1493
|
-
align:
|
|
1745
|
+
dark: m,
|
|
1746
|
+
...y,
|
|
1747
|
+
align: u,
|
|
1494
1748
|
style: c === 0 && t.length > 1 ? {
|
|
1495
1749
|
borderRadius: 0,
|
|
1496
1750
|
marginRight: "-1px",
|
|
1497
1751
|
marginBottom: "-1px"
|
|
1498
1752
|
} : {}
|
|
1499
1753
|
},
|
|
1500
|
-
|
|
1754
|
+
y.id
|
|
1501
1755
|
))
|
|
1502
1756
|
}
|
|
1503
1757
|
);
|
|
1504
1758
|
}
|
|
1505
|
-
const
|
|
1759
|
+
const Fo = [
|
|
1506
1760
|
"align",
|
|
1507
1761
|
"cards",
|
|
1508
1762
|
"list",
|
|
@@ -1514,11 +1768,11 @@ const fo = [
|
|
|
1514
1768
|
"type",
|
|
1515
1769
|
"textAlign"
|
|
1516
1770
|
];
|
|
1517
|
-
function
|
|
1518
|
-
const o =
|
|
1771
|
+
function E(t, e) {
|
|
1772
|
+
const o = pt(t, e), n = I(t, e);
|
|
1519
1773
|
return [o, n];
|
|
1520
1774
|
}
|
|
1521
|
-
const
|
|
1775
|
+
const To = C(rt)`
|
|
1522
1776
|
a .card {
|
|
1523
1777
|
color: #404040;
|
|
1524
1778
|
cursor: pointer;
|
|
@@ -1534,14 +1788,14 @@ const xo = _(nt)`
|
|
|
1534
1788
|
color: #404040;
|
|
1535
1789
|
}
|
|
1536
1790
|
`;
|
|
1537
|
-
function
|
|
1538
|
-
const [o, n] =
|
|
1539
|
-
return /* @__PURE__ */ w(
|
|
1540
|
-
Object.keys(o).length > 0 && /* @__PURE__ */ r(
|
|
1541
|
-
/* @__PURE__ */ r(
|
|
1791
|
+
function Oo({ className: t, ...e }) {
|
|
1792
|
+
const [o, n] = E(e, nt), [i, a] = E(n, Fo);
|
|
1793
|
+
return /* @__PURE__ */ w(To, { className: b("section--card-list", t), type: e.type, ...a, children: [
|
|
1794
|
+
Object.keys(o).length > 0 && /* @__PURE__ */ r(ot, { center: !0, ...o, className: "mb-[2.5vw]" }),
|
|
1795
|
+
/* @__PURE__ */ r(zo, { ...i, dark: !!e.dark })
|
|
1542
1796
|
] });
|
|
1543
1797
|
}
|
|
1544
|
-
const
|
|
1798
|
+
const Uo = C(Oo)`
|
|
1545
1799
|
.card__description {
|
|
1546
1800
|
white-space: pre-wrap;
|
|
1547
1801
|
}
|
|
@@ -1557,29 +1811,29 @@ const yo = _(bo)`
|
|
|
1557
1811
|
background: inherit !important;
|
|
1558
1812
|
}
|
|
1559
1813
|
`;
|
|
1560
|
-
function
|
|
1561
|
-
const [{ editing: o }, n] =
|
|
1562
|
-
...
|
|
1814
|
+
function Do({ section: t, ...e }) {
|
|
1815
|
+
const [{ editing: o }, n] = E(e, et), i = S(() => ({
|
|
1816
|
+
...I(n, ["listBorder", "list", "iconSize", "imageSize"]),
|
|
1563
1817
|
list: n.list?.map((a) => ({
|
|
1564
|
-
...
|
|
1818
|
+
...I(a, "icon", "iconColor"),
|
|
1565
1819
|
image: ["news", "simple", "default"].includes(n.type) && a.icon ? a.icon : a.image,
|
|
1566
|
-
actions: a.actions?.map?.((c) => /* @__PURE__ */ r(
|
|
1820
|
+
actions: a.actions?.map?.((c) => /* @__PURE__ */ r(Gt, { ...c, editing: o }, c.id)),
|
|
1567
1821
|
border: n.listBorder,
|
|
1568
1822
|
iconSize: n.iconSize,
|
|
1569
1823
|
imageSize: n.imageSize,
|
|
1570
1824
|
hoverStyle: n.hoverStyle
|
|
1571
1825
|
}))
|
|
1572
1826
|
}), [n]);
|
|
1573
|
-
return /* @__PURE__ */ r(
|
|
1827
|
+
return /* @__PURE__ */ r(Uo, { style: o ? { pointerEvents: "none" } : {}, ...i });
|
|
1574
1828
|
}
|
|
1575
|
-
function
|
|
1829
|
+
function Go({
|
|
1576
1830
|
properties: t,
|
|
1577
1831
|
section: e,
|
|
1578
1832
|
locale: o,
|
|
1579
1833
|
dev: n
|
|
1580
1834
|
}) {
|
|
1581
1835
|
return e?.config?.componentId ? /* @__PURE__ */ r(
|
|
1582
|
-
|
|
1836
|
+
$e,
|
|
1583
1837
|
{
|
|
1584
1838
|
instanceId: e.id,
|
|
1585
1839
|
componentId: e.config.componentId,
|
|
@@ -1591,14 +1845,14 @@ function vo({
|
|
|
1591
1845
|
dev: n
|
|
1592
1846
|
}
|
|
1593
1847
|
) : /* @__PURE__ */ r(
|
|
1594
|
-
|
|
1848
|
+
f,
|
|
1595
1849
|
{
|
|
1596
1850
|
sx: {
|
|
1597
1851
|
textAlign: "center",
|
|
1598
1852
|
py: 2
|
|
1599
1853
|
},
|
|
1600
1854
|
children: /* @__PURE__ */ r(
|
|
1601
|
-
|
|
1855
|
+
j,
|
|
1602
1856
|
{
|
|
1603
1857
|
variant: "caption",
|
|
1604
1858
|
sx: {
|
|
@@ -1610,7 +1864,7 @@ function vo({
|
|
|
1610
1864
|
}
|
|
1611
1865
|
);
|
|
1612
1866
|
}
|
|
1613
|
-
function
|
|
1867
|
+
function Ho({
|
|
1614
1868
|
src: t,
|
|
1615
1869
|
dataId: e,
|
|
1616
1870
|
isEdit: o = !1,
|
|
@@ -1619,7 +1873,7 @@ function ko({
|
|
|
1619
1873
|
}
|
|
1620
1874
|
}) {
|
|
1621
1875
|
return /* @__PURE__ */ r(
|
|
1622
|
-
|
|
1876
|
+
Le,
|
|
1623
1877
|
{
|
|
1624
1878
|
isEdit: o,
|
|
1625
1879
|
embedId: e,
|
|
@@ -1631,12 +1885,12 @@ function ko({
|
|
|
1631
1885
|
}
|
|
1632
1886
|
);
|
|
1633
1887
|
}
|
|
1634
|
-
function
|
|
1635
|
-
const [c, s] =
|
|
1636
|
-
return /* @__PURE__ */ w(
|
|
1637
|
-
Object.keys(c).length > 0 && /* @__PURE__ */ r(
|
|
1888
|
+
function Vo({ dataId: t, src: e, actions: o, center: n, onLoad: i, ...a }) {
|
|
1889
|
+
const [c, s] = E(a, nt);
|
|
1890
|
+
return /* @__PURE__ */ w(rt, { ...s, children: [
|
|
1891
|
+
Object.keys(c).length > 0 && /* @__PURE__ */ r(ot, { center: n, ...c }),
|
|
1638
1892
|
/* @__PURE__ */ r(
|
|
1639
|
-
|
|
1893
|
+
Ho,
|
|
1640
1894
|
{
|
|
1641
1895
|
dataId: t,
|
|
1642
1896
|
src: e,
|
|
@@ -1644,10 +1898,10 @@ function _o({ dataId: t, src: e, actions: o, center: n, onLoad: i, ...a }) {
|
|
|
1644
1898
|
height: a.iframeHeight ? `${a.iframeHeight}px` : "100%"
|
|
1645
1899
|
}
|
|
1646
1900
|
),
|
|
1647
|
-
/* @__PURE__ */ r(
|
|
1901
|
+
/* @__PURE__ */ r(O, { actions: o, center: n })
|
|
1648
1902
|
] });
|
|
1649
1903
|
}
|
|
1650
|
-
const
|
|
1904
|
+
const mr = {
|
|
1651
1905
|
src: "",
|
|
1652
1906
|
embedUrl: "",
|
|
1653
1907
|
title: "",
|
|
@@ -1658,21 +1912,95 @@ const An = {
|
|
|
1658
1912
|
config: {},
|
|
1659
1913
|
id: ""
|
|
1660
1914
|
};
|
|
1661
|
-
function
|
|
1662
|
-
const i = `${e}-${n.locale}`, [{ editing: a }, c] =
|
|
1663
|
-
return
|
|
1664
|
-
d && d.onInit(() =>
|
|
1665
|
-
}, [d]),
|
|
1666
|
-
const
|
|
1667
|
-
|
|
1668
|
-
}, [d, c.config]), o ? /* @__PURE__ */ r(
|
|
1669
|
-
}
|
|
1670
|
-
const
|
|
1915
|
+
function Jo({ section: t, id: e, src: o, ...n }) {
|
|
1916
|
+
const i = `${e}-${n.locale}`, [{ editing: a }, c] = E(n, et), s = ht({}), l = JSON.parse(JSON.stringify(c)), { message: d } = Re(i, "server"), m = Me(JSON.parse(JSON.stringify(c.config) || "{}"));
|
|
1917
|
+
return J(() => {
|
|
1918
|
+
d && d.onInit(() => m.current);
|
|
1919
|
+
}, [d]), J(() => {
|
|
1920
|
+
const u = JSON.parse(JSON.stringify(c.config) || "{}");
|
|
1921
|
+
Ie(s.current, u) || (s.current = u, d?.send("config-set", u));
|
|
1922
|
+
}, [d, c.config]), o ? /* @__PURE__ */ r(Vo, { ...l, dataId: i, src: o, style: a ? { pointerEvents: "none" } : {} }) : /* @__PURE__ */ r(Yo, { children: 'Please set the "src" attribute for this block' });
|
|
1923
|
+
}
|
|
1924
|
+
const Yo = C("div")`
|
|
1671
1925
|
user-select: none;
|
|
1672
1926
|
color: #999;
|
|
1673
1927
|
padding: 8px;
|
|
1674
1928
|
height: 200px;
|
|
1675
|
-
`,
|
|
1929
|
+
`, Nt = {
|
|
1930
|
+
width: "1px",
|
|
1931
|
+
style: "solid",
|
|
1932
|
+
color: "divider"
|
|
1933
|
+
};
|
|
1934
|
+
function Yt(t) {
|
|
1935
|
+
return typeof t == "string" && t.startsWith("custom:");
|
|
1936
|
+
}
|
|
1937
|
+
function Ko(t) {
|
|
1938
|
+
if (!Yt(t)) return Nt;
|
|
1939
|
+
try {
|
|
1940
|
+
const e = t?.substring(7) || "", [o = "1px", n = "solid", ...i] = e.split(" ");
|
|
1941
|
+
return {
|
|
1942
|
+
width: o,
|
|
1943
|
+
style: n,
|
|
1944
|
+
color: i.join(" ") || "divider"
|
|
1945
|
+
};
|
|
1946
|
+
} catch {
|
|
1947
|
+
return Nt;
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
function Xo(t) {
|
|
1951
|
+
if (!t || t === "none")
|
|
1952
|
+
return { border: "none" };
|
|
1953
|
+
if (Yt(t)) {
|
|
1954
|
+
const { width: e, style: o, color: n } = Ko(t);
|
|
1955
|
+
return {
|
|
1956
|
+
border: "none",
|
|
1957
|
+
// 避免和下面的详细属性冲突
|
|
1958
|
+
borderWidth: e,
|
|
1959
|
+
borderStyle: o,
|
|
1960
|
+
borderColor: n
|
|
1961
|
+
};
|
|
1962
|
+
}
|
|
1963
|
+
return {};
|
|
1964
|
+
}
|
|
1965
|
+
function Kt(t) {
|
|
1966
|
+
return typeof t == "string" && t.startsWith("custom:");
|
|
1967
|
+
}
|
|
1968
|
+
function qo(t) {
|
|
1969
|
+
if (!Kt(t)) return "0";
|
|
1970
|
+
try {
|
|
1971
|
+
return t?.substring(7) || "0";
|
|
1972
|
+
} catch {
|
|
1973
|
+
return "0";
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
function Qo(t) {
|
|
1977
|
+
return !t || t === "none" ? { borderRadius: 0 } : Kt(t) ? { borderRadius: qo(t) } : {};
|
|
1978
|
+
}
|
|
1979
|
+
function Zo({ ref: t = void 0, type: e, sx: o, children: n, ...i }) {
|
|
1980
|
+
const a = [{}, ...Array.isArray(o) ? o : [o]];
|
|
1981
|
+
return z(() => {
|
|
1982
|
+
const s = Tt(e);
|
|
1983
|
+
return s ? (a.push({
|
|
1984
|
+
img: {
|
|
1985
|
+
objectFit: "contain !important",
|
|
1986
|
+
bgcolor: (l) => l.palette.background.default,
|
|
1987
|
+
borderRadius: "0 !important",
|
|
1988
|
+
position: "relative"
|
|
1989
|
+
}
|
|
1990
|
+
}), /* @__PURE__ */ r(ut, { type: e, children: n })) : /* @__PURE__ */ r(
|
|
1991
|
+
f,
|
|
1992
|
+
{
|
|
1993
|
+
component: s ? ut : "div",
|
|
1994
|
+
ref: t,
|
|
1995
|
+
sx: a,
|
|
1996
|
+
...i,
|
|
1997
|
+
...s ? { type: e } : {},
|
|
1998
|
+
children: n
|
|
1999
|
+
}
|
|
2000
|
+
);
|
|
2001
|
+
}, [e, n, a])();
|
|
2002
|
+
}
|
|
2003
|
+
const tn = "none", en = "none", on = "transparent", nn = "center", rn = "start", an = "none", sn = "none", ln = 12, cn = ({
|
|
1676
2004
|
gridSettings: t,
|
|
1677
2005
|
section: e,
|
|
1678
2006
|
index: o,
|
|
@@ -1680,7 +2008,7 @@ const Co = _("div")`
|
|
|
1680
2008
|
simulateMode: i = "desktop",
|
|
1681
2009
|
isBackground: a
|
|
1682
2010
|
}) => {
|
|
1683
|
-
const c = t?.[i] ?? {}, s = c[e.id], l =
|
|
2011
|
+
const c = t?.[i] ?? {}, s = c[e.id], l = dn(c);
|
|
1684
2012
|
return {
|
|
1685
2013
|
i: e.id,
|
|
1686
2014
|
static: e?.locked || a,
|
|
@@ -1701,42 +2029,82 @@ const Co = _("div")`
|
|
|
1701
2029
|
maxH: 1,
|
|
1702
2030
|
maxY: l
|
|
1703
2031
|
};
|
|
1704
|
-
},
|
|
1705
|
-
const { dev: e, id: o, section: n, onBlockRender: i } = t, a = e?.mode, c =
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
2032
|
+
}, dn = (t) => Object.values(t).reduce((e, o) => Math.max(e, o.y || 0), 0) || 0, un = (t) => {
|
|
2033
|
+
const { dev: e, id: o, section: n, onBlockRender: i } = t, a = e?.mode, c = se((g) => g.breakpoints.down("sm")), { t: s } = Ee(), { sections: l, sectionIds: d, config: m } = n, {
|
|
2034
|
+
columns: u = ln,
|
|
2035
|
+
gridSettings: h,
|
|
2036
|
+
gap: p,
|
|
2037
|
+
padding: y,
|
|
2038
|
+
background: x,
|
|
2039
|
+
alignContent: v,
|
|
2040
|
+
justifyContent: k,
|
|
2041
|
+
border: _,
|
|
2042
|
+
borderRadius: M,
|
|
2043
|
+
ignoreMaxWidth: B
|
|
2044
|
+
} = m || {}, it = S(() => {
|
|
2045
|
+
const $ = W({
|
|
2046
|
+
type: "layoutBlockGap",
|
|
2047
|
+
value: p ?? tn,
|
|
2048
|
+
format: "sx"
|
|
2049
|
+
}), T = {
|
|
2050
|
+
...$,
|
|
2051
|
+
gap: Object.keys($.gap).reduce((N, A) => (N[A] = -$.gap[A], N), {})
|
|
2052
|
+
};
|
|
2053
|
+
return {
|
|
2054
|
+
item: $,
|
|
2055
|
+
container: T
|
|
2056
|
+
};
|
|
2057
|
+
}, [p]), Xt = S(() => W({
|
|
1710
2058
|
type: "layoutBlockPadding",
|
|
1711
|
-
value:
|
|
2059
|
+
value: y ?? en,
|
|
1712
2060
|
format: "sx"
|
|
1713
|
-
}), [
|
|
2061
|
+
}), [y]), at = S(() => W({
|
|
1714
2062
|
type: "layoutBlockAlignContent",
|
|
1715
|
-
|
|
1716
|
-
|
|
2063
|
+
value: v ?? nn,
|
|
2064
|
+
format: "sx"
|
|
2065
|
+
}), [v]), st = S(() => W({
|
|
2066
|
+
type: "layoutBlockJustifyContent",
|
|
2067
|
+
value: k ?? rn,
|
|
1717
2068
|
format: "sx"
|
|
1718
|
-
}), [
|
|
1719
|
-
|
|
1720
|
-
|
|
2069
|
+
}), [k]), qt = S(() => {
|
|
2070
|
+
const g = _ ?? an, $ = Xo(g);
|
|
2071
|
+
return Object.keys($).length > 0 ? $ : W({
|
|
2072
|
+
type: "layoutBlockBorder",
|
|
2073
|
+
value: g,
|
|
2074
|
+
format: "sx"
|
|
2075
|
+
});
|
|
2076
|
+
}, [_]), Qt = z(
|
|
2077
|
+
(g) => Tt(_) ? /* @__PURE__ */ r(Zo, { type: _, ...g }) : /* @__PURE__ */ r(f, { ...g }),
|
|
2078
|
+
[_]
|
|
2079
|
+
), Zt = S(() => {
|
|
2080
|
+
const g = M ?? sn, $ = Qo(g);
|
|
2081
|
+
return Object.keys($).length > 0 ? $ : W({
|
|
2082
|
+
type: "layoutBlockBorderRadius",
|
|
2083
|
+
value: g,
|
|
2084
|
+
format: "sx"
|
|
2085
|
+
});
|
|
2086
|
+
}, [M]), bt = z(
|
|
2087
|
+
(g, $ = !1, T = 0) => {
|
|
2088
|
+
if (!i || !g || !g.component || g.visibility === "hidden")
|
|
1721
2089
|
return null;
|
|
1722
|
-
const
|
|
1723
|
-
gridSettings:
|
|
1724
|
-
section:
|
|
1725
|
-
index:
|
|
1726
|
-
columns:
|
|
2090
|
+
const N = cn({
|
|
2091
|
+
gridSettings: h,
|
|
2092
|
+
section: g,
|
|
2093
|
+
index: T,
|
|
2094
|
+
columns: u,
|
|
1727
2095
|
simulateMode: c ? "mobile" : "desktop",
|
|
1728
|
-
isBackground:
|
|
1729
|
-
}),
|
|
2096
|
+
isBackground: $
|
|
2097
|
+
}), A = N?.x ?? 0, D = N?.y ?? 0, G = N?.w ?? u, te = N?.h ?? 1, ee = N?.maxY ?? 0, oe = !!n?.config?.backgroundSectionId;
|
|
1730
2098
|
return /* @__PURE__ */ r(
|
|
1731
|
-
|
|
2099
|
+
f,
|
|
1732
2100
|
{
|
|
1733
|
-
className:
|
|
2101
|
+
className: $ ? "layout-block-background" : "layout-block-component",
|
|
1734
2102
|
sx: {
|
|
1735
2103
|
// 背景元素和普通元素都使用 grid 布局
|
|
1736
|
-
|
|
2104
|
+
...$ ? {
|
|
1737
2105
|
// 背景元素覆盖整个网格区域
|
|
1738
2106
|
gridColumn: "1 / -1",
|
|
1739
|
-
gridRow: `1 / ${
|
|
2107
|
+
gridRow: `1 / ${ee + 1}`,
|
|
1740
2108
|
zIndex: 0,
|
|
1741
2109
|
width: "100%",
|
|
1742
2110
|
height: "100%",
|
|
@@ -1747,51 +2115,68 @@ const Co = _("div")`
|
|
|
1747
2115
|
} : {
|
|
1748
2116
|
position: "relative",
|
|
1749
2117
|
// 使用 grid 定位普通元素
|
|
1750
|
-
gridColumn: `${
|
|
2118
|
+
gridColumn: `${A + 1} / span ${G}`,
|
|
1751
2119
|
// hasBackground 的话,不再 + 1,因为 background 会占用第一行
|
|
1752
|
-
gridRow: `${
|
|
2120
|
+
gridRow: `${D + (oe ? 0 : 1)} / span ${te}`,
|
|
1753
2121
|
zIndex: 1,
|
|
1754
2122
|
// Ensure content is above background
|
|
1755
2123
|
minWidth: 0,
|
|
1756
2124
|
// 防止内容撑开网格项
|
|
1757
2125
|
minHeight: 0,
|
|
1758
2126
|
// 防止内容撑开网格项
|
|
1759
|
-
overflow:
|
|
1760
|
-
//
|
|
2127
|
+
// overflow: 'hidden', // 防止子内容溢出网格项
|
|
2128
|
+
// 只给非第一行添加上边距
|
|
2129
|
+
...D > 0 ? { mt: it?.item?.gap } : {},
|
|
2130
|
+
// 只给非第一列添加左边距
|
|
2131
|
+
...A > 0 ? { ml: it?.item?.gap } : {},
|
|
1761
2132
|
"& > .BlockBase-root": {
|
|
1762
2133
|
height: "100%",
|
|
1763
2134
|
width: "100%",
|
|
1764
|
-
boxSizing: "border-box"
|
|
2135
|
+
boxSizing: "border-box",
|
|
2136
|
+
position: "relative",
|
|
2137
|
+
...at,
|
|
2138
|
+
...st
|
|
1765
2139
|
}
|
|
1766
2140
|
}
|
|
1767
2141
|
},
|
|
1768
2142
|
children: i({
|
|
1769
|
-
id:
|
|
1770
|
-
type:
|
|
2143
|
+
id: g.id,
|
|
2144
|
+
type: g.component,
|
|
1771
2145
|
config: {},
|
|
1772
2146
|
section: {
|
|
1773
|
-
...
|
|
2147
|
+
...g
|
|
1774
2148
|
},
|
|
1775
2149
|
mode: a
|
|
1776
2150
|
})
|
|
1777
2151
|
},
|
|
1778
|
-
|
|
2152
|
+
g.id
|
|
1779
2153
|
);
|
|
1780
2154
|
},
|
|
1781
|
-
[
|
|
1782
|
-
|
|
2155
|
+
[
|
|
2156
|
+
o,
|
|
2157
|
+
a,
|
|
2158
|
+
i,
|
|
2159
|
+
h,
|
|
2160
|
+
u,
|
|
2161
|
+
c,
|
|
2162
|
+
it,
|
|
2163
|
+
at,
|
|
2164
|
+
st,
|
|
2165
|
+
B
|
|
2166
|
+
]
|
|
2167
|
+
), { backgroundElements: yt, contentElements: vt } = S(() => {
|
|
1783
2168
|
if (!d || !d.length || !l || !Object.keys(l).length)
|
|
1784
2169
|
return { backgroundElements: [], contentElements: [] };
|
|
1785
|
-
const
|
|
1786
|
-
return d?.forEach((
|
|
1787
|
-
const
|
|
1788
|
-
if (!
|
|
1789
|
-
const
|
|
1790
|
-
|
|
1791
|
-
}), { backgroundElements:
|
|
1792
|
-
}, [
|
|
1793
|
-
return a === "draft" && !
|
|
1794
|
-
|
|
2170
|
+
const g = [], $ = [];
|
|
2171
|
+
return d?.forEach((T, N) => {
|
|
2172
|
+
const A = l[T];
|
|
2173
|
+
if (!A) return;
|
|
2174
|
+
const D = n?.config?.backgroundSectionId === T, G = bt(A, D, N);
|
|
2175
|
+
G && (D ? g.push(G) : $.push(G));
|
|
2176
|
+
}), { backgroundElements: g, contentElements: $ };
|
|
2177
|
+
}, [bt, l, d]);
|
|
2178
|
+
return a === "draft" && !yt?.length && !vt?.length ? /* @__PURE__ */ w(
|
|
2179
|
+
f,
|
|
1795
2180
|
{
|
|
1796
2181
|
sx: {
|
|
1797
2182
|
gridColumn: "1 / -1",
|
|
@@ -1801,16 +2186,17 @@ const Co = _("div")`
|
|
|
1801
2186
|
alignItems: "center",
|
|
1802
2187
|
justifyContent: "center",
|
|
1803
2188
|
gap: 2,
|
|
1804
|
-
border: (
|
|
2189
|
+
border: (g) => `2px dashed ${g.palette.divider}`,
|
|
1805
2190
|
borderRadius: 2,
|
|
1806
2191
|
padding: 4,
|
|
1807
2192
|
color: "text.secondary",
|
|
1808
2193
|
textAlign: "center",
|
|
1809
|
-
minHeight: "160px"
|
|
2194
|
+
minHeight: "160px",
|
|
2195
|
+
position: "relative"
|
|
1810
2196
|
},
|
|
1811
2197
|
children: [
|
|
1812
2198
|
/* @__PURE__ */ r(
|
|
1813
|
-
|
|
2199
|
+
f,
|
|
1814
2200
|
{
|
|
1815
2201
|
sx: {
|
|
1816
2202
|
fontSize: "48px",
|
|
@@ -1820,7 +2206,7 @@ const Co = _("div")`
|
|
|
1820
2206
|
}
|
|
1821
2207
|
),
|
|
1822
2208
|
/* @__PURE__ */ r(
|
|
1823
|
-
|
|
2209
|
+
f,
|
|
1824
2210
|
{
|
|
1825
2211
|
sx: {
|
|
1826
2212
|
fontSize: "16px",
|
|
@@ -1831,7 +2217,7 @@ const Co = _("div")`
|
|
|
1831
2217
|
}
|
|
1832
2218
|
),
|
|
1833
2219
|
/* @__PURE__ */ r(
|
|
1834
|
-
|
|
2220
|
+
f,
|
|
1835
2221
|
{
|
|
1836
2222
|
sx: {
|
|
1837
2223
|
opacity: 0.7,
|
|
@@ -1841,7 +2227,7 @@ const Co = _("div")`
|
|
|
1841
2227
|
}
|
|
1842
2228
|
),
|
|
1843
2229
|
/* @__PURE__ */ r(
|
|
1844
|
-
|
|
2230
|
+
f,
|
|
1845
2231
|
{
|
|
1846
2232
|
sx: {
|
|
1847
2233
|
position: "absolute",
|
|
@@ -1851,13 +2237,13 @@ const Co = _("div")`
|
|
|
1851
2237
|
bottom: 0,
|
|
1852
2238
|
pointerEvents: "none",
|
|
1853
2239
|
opacity: 0.1,
|
|
1854
|
-
background: (
|
|
2240
|
+
background: (g) => `
|
|
1855
2241
|
repeating-linear-gradient(
|
|
1856
2242
|
90deg,
|
|
1857
2243
|
transparent,
|
|
1858
|
-
transparent calc(100% / ${
|
|
1859
|
-
${
|
|
1860
|
-
${
|
|
2244
|
+
transparent calc(100% / ${u} - 1px),
|
|
2245
|
+
${g.palette.grey[400]} calc(100% / ${u} - 1px),
|
|
2246
|
+
${g.palette.grey[400]} calc(100% / ${u})
|
|
1861
2247
|
)
|
|
1862
2248
|
`
|
|
1863
2249
|
}
|
|
@@ -1866,32 +2252,47 @@ const Co = _("div")`
|
|
|
1866
2252
|
]
|
|
1867
2253
|
}
|
|
1868
2254
|
) : /* @__PURE__ */ w(
|
|
1869
|
-
|
|
2255
|
+
Qt,
|
|
1870
2256
|
{
|
|
1871
2257
|
sx: {
|
|
1872
2258
|
position: "relative",
|
|
1873
2259
|
display: "grid",
|
|
1874
|
-
gridTemplateColumns: `repeat(${
|
|
2260
|
+
gridTemplateColumns: `repeat(${u}, minmax(0, 1fr))`,
|
|
1875
2261
|
alignItems: "stretch",
|
|
1876
2262
|
width: "100%",
|
|
1877
2263
|
height: "100%",
|
|
1878
2264
|
minWidth: 0,
|
|
1879
|
-
bgcolor:
|
|
2265
|
+
bgcolor: x ?? on,
|
|
1880
2266
|
boxSizing: "border-box",
|
|
1881
|
-
overflow:
|
|
1882
|
-
|
|
1883
|
-
...
|
|
1884
|
-
|
|
1885
|
-
alignContent: P?.alignContent ?? vt
|
|
2267
|
+
// overflow: 'hidden', // Prevent content overflow
|
|
2268
|
+
...Xt,
|
|
2269
|
+
...at,
|
|
2270
|
+
...st
|
|
1886
2271
|
},
|
|
1887
2272
|
children: [
|
|
1888
|
-
|
|
1889
|
-
|
|
2273
|
+
n?.id && /* @__PURE__ */ r(
|
|
2274
|
+
le,
|
|
2275
|
+
{
|
|
2276
|
+
styles: (g) => g.unstable_sx({
|
|
2277
|
+
[`#BlockBase-${n.id}`]: {
|
|
2278
|
+
...B && {
|
|
2279
|
+
maxWidth: "unset !important",
|
|
2280
|
+
px: 0
|
|
2281
|
+
},
|
|
2282
|
+
...qt,
|
|
2283
|
+
...Zt,
|
|
2284
|
+
overflow: "hidden"
|
|
2285
|
+
}
|
|
2286
|
+
})
|
|
2287
|
+
}
|
|
2288
|
+
),
|
|
2289
|
+
yt,
|
|
2290
|
+
vt
|
|
1890
2291
|
]
|
|
1891
2292
|
}
|
|
1892
2293
|
);
|
|
1893
|
-
},
|
|
1894
|
-
function
|
|
2294
|
+
}, mn = ["title", "description", "actions", "badge", "tag", "prepend", "append", "logo"];
|
|
2295
|
+
function pn({
|
|
1895
2296
|
image: t,
|
|
1896
2297
|
imageBorder: e,
|
|
1897
2298
|
imageShadow: o,
|
|
@@ -1900,10 +2301,10 @@ function Ao({
|
|
|
1900
2301
|
fullSizeImage: a,
|
|
1901
2302
|
...c
|
|
1902
2303
|
}) {
|
|
1903
|
-
const [s, l] =
|
|
1904
|
-
|
|
2304
|
+
const [s, l] = E(c, nt), d = Object.keys(s).length > 0 && Object.values(pt(s, mn)).filter(Boolean).length > 0 && /* @__PURE__ */ r(ot, { ...s }), m = Et(t) ? t : /* @__PURE__ */ r(f, { component: "img", src: t, alt: "", className: "block" }), u = ["phone", "macbook"].includes(e), h = t && /* @__PURE__ */ r(
|
|
2305
|
+
f,
|
|
1905
2306
|
{
|
|
1906
|
-
className:
|
|
2307
|
+
className: b(
|
|
1907
2308
|
"section__image",
|
|
1908
2309
|
"m-auto, leading-[1] text-center",
|
|
1909
2310
|
o && "shadow-xl",
|
|
@@ -1914,21 +2315,21 @@ function Ao({
|
|
|
1914
2315
|
borderRadius: 2,
|
|
1915
2316
|
overflow: "hidden",
|
|
1916
2317
|
// FIXME: Screenshot 组件无法设置最外层 div 的样式,只能通过父元素设置
|
|
1917
|
-
"> div":
|
|
2318
|
+
"> div": u ? { width: "100%", video: { borderRadius: "0 !important" } } : void 0
|
|
1918
2319
|
},
|
|
1919
|
-
children:
|
|
2320
|
+
children: u ? (
|
|
1920
2321
|
// @ts-ignore
|
|
1921
|
-
/* @__PURE__ */ r(
|
|
1922
|
-
) :
|
|
2322
|
+
/* @__PURE__ */ r(ut, { type: e, sx: { width: "100%" }, children: m })
|
|
2323
|
+
) : m
|
|
1923
2324
|
}
|
|
1924
2325
|
);
|
|
1925
2326
|
return /* @__PURE__ */ r(
|
|
1926
|
-
|
|
2327
|
+
rt,
|
|
1927
2328
|
{
|
|
1928
|
-
className:
|
|
2329
|
+
className: b(
|
|
1929
2330
|
"section--block",
|
|
1930
2331
|
n,
|
|
1931
|
-
a && !i &&
|
|
2332
|
+
a && !i && ct`
|
|
1932
2333
|
.section-bg {
|
|
1933
2334
|
height: 80%;
|
|
1934
2335
|
}
|
|
@@ -1937,10 +2338,10 @@ function Ao({
|
|
|
1937
2338
|
...l,
|
|
1938
2339
|
boxProps: a ? { sx: { padding: 0, overflow: "hidden" } } : void 0,
|
|
1939
2340
|
children: /* @__PURE__ */ r(
|
|
1940
|
-
|
|
2341
|
+
Jt,
|
|
1941
2342
|
{
|
|
1942
2343
|
col: t ? 2 : 1,
|
|
1943
|
-
className: a ?
|
|
2344
|
+
className: a ? ct`
|
|
1944
2345
|
display: flex;
|
|
1945
2346
|
flex-direction: column;
|
|
1946
2347
|
|
|
@@ -1955,18 +2356,18 @@ function Ao({
|
|
|
1955
2356
|
}
|
|
1956
2357
|
` : void 0,
|
|
1957
2358
|
children: i ? /* @__PURE__ */ w(Q, { children: [
|
|
1958
|
-
|
|
2359
|
+
h,
|
|
1959
2360
|
d
|
|
1960
2361
|
] }) : /* @__PURE__ */ w(Q, { children: [
|
|
1961
2362
|
d,
|
|
1962
|
-
|
|
2363
|
+
h
|
|
1963
2364
|
] })
|
|
1964
2365
|
}
|
|
1965
2366
|
)
|
|
1966
2367
|
}
|
|
1967
2368
|
);
|
|
1968
2369
|
}
|
|
1969
|
-
const
|
|
2370
|
+
const hn = [
|
|
1970
2371
|
/youtu\.be\/([^#&?]{11})/,
|
|
1971
2372
|
// youtu.be/<id>
|
|
1972
2373
|
/\?v=([^#&?]{11})/,
|
|
@@ -1978,51 +2379,51 @@ const zo = [
|
|
|
1978
2379
|
/\/v\/([^#&?]{11})/
|
|
1979
2380
|
// /v/<id>
|
|
1980
2381
|
];
|
|
1981
|
-
function
|
|
2382
|
+
function gn(t) {
|
|
1982
2383
|
if (/youtu\.?be/.test(t))
|
|
1983
|
-
for (const e of
|
|
2384
|
+
for (const e of hn) {
|
|
1984
2385
|
const o = e.exec(t)?.[1];
|
|
1985
2386
|
if (o)
|
|
1986
2387
|
return o;
|
|
1987
2388
|
}
|
|
1988
2389
|
}
|
|
1989
|
-
function
|
|
1990
|
-
const e =
|
|
2390
|
+
function fn(t) {
|
|
2391
|
+
const e = gn(t);
|
|
1991
2392
|
if (e)
|
|
1992
2393
|
return `https://youtube.com/embed/${e}`;
|
|
1993
2394
|
}
|
|
1994
|
-
function
|
|
1995
|
-
return
|
|
2395
|
+
function xn({ src: t }) {
|
|
2396
|
+
return J(() => {
|
|
1996
2397
|
import("@lottiefiles/lottie-player");
|
|
1997
2398
|
}, []), /* @__PURE__ */ r("lottie-player", { autoplay: !0, loop: !0, mode: "normal", src: t });
|
|
1998
2399
|
}
|
|
1999
|
-
function
|
|
2400
|
+
function bn(t) {
|
|
2000
2401
|
return /* @__PURE__ */ r(
|
|
2001
|
-
|
|
2402
|
+
f,
|
|
2002
2403
|
{
|
|
2003
2404
|
sx: {
|
|
2004
2405
|
maxHeight: 400,
|
|
2005
2406
|
overflow: "hidden auto"
|
|
2006
2407
|
},
|
|
2007
|
-
children: /* @__PURE__ */ r(
|
|
2408
|
+
children: /* @__PURE__ */ r(Ae, { ...t })
|
|
2008
2409
|
}
|
|
2009
2410
|
);
|
|
2010
2411
|
}
|
|
2011
|
-
function
|
|
2012
|
-
const e =
|
|
2412
|
+
function yn({ url: t }) {
|
|
2413
|
+
const e = ht(null), o = 495, [n, i] = Z(
|
|
2013
2414
|
e.current ? e.current.offsetWidth * 0.5625 : o
|
|
2014
|
-
), a =
|
|
2415
|
+
), a = z(() => {
|
|
2015
2416
|
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;
|
|
2016
2417
|
return i(Math.floor(s * c));
|
|
2017
2418
|
}, []);
|
|
2018
|
-
return
|
|
2419
|
+
return J(() => {
|
|
2019
2420
|
window.addEventListener("resize", a);
|
|
2020
2421
|
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;
|
|
2021
2422
|
return i(Math.floor(s * c)), function() {
|
|
2022
2423
|
window.removeEventListener("resize", a);
|
|
2023
2424
|
};
|
|
2024
2425
|
}, [n, a]), /* @__PURE__ */ r(
|
|
2025
|
-
|
|
2426
|
+
f,
|
|
2026
2427
|
{
|
|
2027
2428
|
component: "iframe",
|
|
2028
2429
|
ref: e,
|
|
@@ -2039,7 +2440,7 @@ function Oo({ url: t }) {
|
|
|
2039
2440
|
}
|
|
2040
2441
|
);
|
|
2041
2442
|
}
|
|
2042
|
-
const
|
|
2443
|
+
const pr = {
|
|
2043
2444
|
image: "https://www.arcblock.io/static/ead0cabde7f2b7ff34db8f3e8ceca271/afc4b/builder.png",
|
|
2044
2445
|
badge: "Develop · Deploy · Run",
|
|
2045
2446
|
title: "The Future is Here: Blockchain and Decentralized Application Development",
|
|
@@ -2050,11 +2451,11 @@ const zn = {
|
|
|
2050
2451
|
actions: void 0,
|
|
2051
2452
|
hasImage: !0,
|
|
2052
2453
|
center: !1
|
|
2053
|
-
},
|
|
2454
|
+
}, vn = C(pn)`
|
|
2054
2455
|
.section__description {
|
|
2055
2456
|
}
|
|
2056
2457
|
`;
|
|
2057
|
-
function
|
|
2458
|
+
function wn({
|
|
2058
2459
|
hasImage: t,
|
|
2059
2460
|
fullSizeImage: e,
|
|
2060
2461
|
boxed: o,
|
|
@@ -2065,32 +2466,32 @@ function Fo({
|
|
|
2065
2466
|
section: s,
|
|
2066
2467
|
...l
|
|
2067
2468
|
}) {
|
|
2068
|
-
const [{ editing: d },
|
|
2069
|
-
let
|
|
2070
|
-
t || (
|
|
2071
|
-
let
|
|
2072
|
-
return
|
|
2073
|
-
|
|
2469
|
+
const [{ editing: d }, m] = E({ ...l, boxed: e ? void 0 : o }, et);
|
|
2470
|
+
let u = kn(m.image, n, e, i, a, c);
|
|
2471
|
+
t || (u = null);
|
|
2472
|
+
let h = null;
|
|
2473
|
+
return m.actions && (h = m.actions?.map?.((p, y) => /* @__PURE__ */ r(Gt, { ...p, editing: d }, y))), /* @__PURE__ */ r(
|
|
2474
|
+
vn,
|
|
2074
2475
|
{
|
|
2075
|
-
...
|
|
2476
|
+
...m,
|
|
2076
2477
|
style: d ? { pointerEvents: "none" } : {},
|
|
2077
|
-
image:
|
|
2478
|
+
image: u,
|
|
2078
2479
|
fullSizeImage: t && e,
|
|
2079
|
-
actions:
|
|
2480
|
+
actions: h
|
|
2080
2481
|
}
|
|
2081
2482
|
);
|
|
2082
2483
|
}
|
|
2083
|
-
function
|
|
2484
|
+
function kn(t, e, o, n, i, a) {
|
|
2084
2485
|
if (t) {
|
|
2085
2486
|
if (t.endsWith(".json"))
|
|
2086
|
-
return /* @__PURE__ */ r(
|
|
2487
|
+
return /* @__PURE__ */ r(xn, { src: t });
|
|
2087
2488
|
if (t.indexOf("twitter.com") !== -1)
|
|
2088
|
-
return /* @__PURE__ */ r(
|
|
2089
|
-
const c =
|
|
2489
|
+
return /* @__PURE__ */ r(bn, { sourceType: "url", url: t });
|
|
2490
|
+
const c = fn(t);
|
|
2090
2491
|
if (c)
|
|
2091
|
-
return /* @__PURE__ */ r(
|
|
2492
|
+
return /* @__PURE__ */ r(yn, { url: c });
|
|
2092
2493
|
const { naturalWidth: s, naturalHeight: l, filename: d } = n || {};
|
|
2093
|
-
if (
|
|
2494
|
+
if (H(t))
|
|
2094
2495
|
return /* @__PURE__ */ r(
|
|
2095
2496
|
"video",
|
|
2096
2497
|
{
|
|
@@ -2106,23 +2507,23 @@ function Do(t, e, o, n, i, a) {
|
|
|
2106
2507
|
width: "100%",
|
|
2107
2508
|
height: "100%"
|
|
2108
2509
|
},
|
|
2109
|
-
poster:
|
|
2110
|
-
children: /* @__PURE__ */ r("source", { src:
|
|
2510
|
+
poster: F(L(e), o ? 1200 : 540, i),
|
|
2511
|
+
children: /* @__PURE__ */ r("source", { src: L(t), type: wo(t) })
|
|
2111
2512
|
},
|
|
2112
2513
|
t
|
|
2113
2514
|
);
|
|
2114
|
-
const
|
|
2515
|
+
const m = i === "quality" ? 1 : 0.6;
|
|
2115
2516
|
return /* @__PURE__ */ r(
|
|
2116
|
-
|
|
2517
|
+
jt,
|
|
2117
2518
|
{
|
|
2118
|
-
src:
|
|
2519
|
+
src: L(t),
|
|
2119
2520
|
sizesAttr: {
|
|
2120
|
-
sm: 600 *
|
|
2121
|
-
md: 450 *
|
|
2122
|
-
lg: 540 *
|
|
2521
|
+
sm: 600 * m,
|
|
2522
|
+
md: 450 * m,
|
|
2523
|
+
lg: 540 * m,
|
|
2123
2524
|
...o && {
|
|
2124
|
-
md: 900 *
|
|
2125
|
-
lg: 1200 *
|
|
2525
|
+
md: 900 * m,
|
|
2526
|
+
lg: 1200 * m
|
|
2126
2527
|
}
|
|
2127
2528
|
},
|
|
2128
2529
|
width: s && `${s}px`,
|
|
@@ -2135,57 +2536,57 @@ function Do(t, e, o, n, i, a) {
|
|
|
2135
2536
|
}
|
|
2136
2537
|
return null;
|
|
2137
2538
|
}
|
|
2138
|
-
const
|
|
2139
|
-
function
|
|
2539
|
+
const hr = ["production", "draft"];
|
|
2540
|
+
function gr({ mode: t, version: e } = {}) {
|
|
2140
2541
|
const o = e && typeof e == "number" ? { mode: t, version: e } : { mode: t };
|
|
2141
|
-
return
|
|
2542
|
+
return gt.get(`/api/${ft()}/pages`, { params: o }).then((n) => n.data);
|
|
2142
2543
|
}
|
|
2143
|
-
function
|
|
2144
|
-
return
|
|
2544
|
+
function fr({ mode: t, routes: e }) {
|
|
2545
|
+
return gt.post(`/api/${ft()}/pages/publish`, { mode: t, routes: e }).then((o) => o.data);
|
|
2145
2546
|
}
|
|
2146
|
-
function
|
|
2547
|
+
function _n({
|
|
2147
2548
|
locale: t,
|
|
2148
2549
|
sort: e,
|
|
2149
2550
|
page: o,
|
|
2150
2551
|
limit: n,
|
|
2151
2552
|
mode: i
|
|
2152
2553
|
} = {}) {
|
|
2153
|
-
return
|
|
2554
|
+
return gt.get(`/api/${ft()}/pages/toc`, { params: { locale: t, sort: e, page: o, limit: n, mode: i } }).then((a) => a.data);
|
|
2154
2555
|
}
|
|
2155
|
-
const
|
|
2556
|
+
const xr = {
|
|
2156
2557
|
style: "list",
|
|
2157
2558
|
sort: "-updatedAt"
|
|
2158
|
-
},
|
|
2159
|
-
function
|
|
2160
|
-
const [{ editing: i, locale: a }, c] =
|
|
2161
|
-
if (!
|
|
2162
|
-
|
|
2559
|
+
}, Rt = 20;
|
|
2560
|
+
function $n({ style: t, sort: e, section: o, ...n }) {
|
|
2561
|
+
const [{ editing: i, locale: a }, c] = E(n, et), [s, l] = E(c, nt), [d, m] = Z(), u = ht(!1), h = Pe(), p = ye(), y = z(async () => {
|
|
2562
|
+
if (!u.current) {
|
|
2563
|
+
u.current = !0, h();
|
|
2163
2564
|
try {
|
|
2164
|
-
const
|
|
2165
|
-
|
|
2166
|
-
list: (
|
|
2565
|
+
const x = d ? Math.floor(d.list.length / Rt) + 1 : 1, { list: v, total: k } = await _n({ locale: a, sort: e, page: x, limit: Rt });
|
|
2566
|
+
m((_) => ({
|
|
2567
|
+
list: (_?.list ?? []).concat(v),
|
|
2167
2568
|
total: k
|
|
2168
2569
|
}));
|
|
2169
2570
|
} finally {
|
|
2170
|
-
|
|
2571
|
+
u.current = !1, h();
|
|
2171
2572
|
}
|
|
2172
2573
|
}
|
|
2173
|
-
}, [d, a, e,
|
|
2174
|
-
return
|
|
2175
|
-
|
|
2176
|
-
}), /* @__PURE__ */ w(
|
|
2177
|
-
Object.keys(s).length > 0 && /* @__PURE__ */ r(
|
|
2574
|
+
}, [d, a, e, h]);
|
|
2575
|
+
return We(() => {
|
|
2576
|
+
y();
|
|
2577
|
+
}), /* @__PURE__ */ w(rt, { ...l, sx: i ? { pointerEvents: "none" } : {}, children: [
|
|
2578
|
+
Object.keys(s).length > 0 && /* @__PURE__ */ r(ot, { ...s }),
|
|
2178
2579
|
d ? /* @__PURE__ */ w(Q, { children: [
|
|
2179
2580
|
/* @__PURE__ */ r(
|
|
2180
|
-
|
|
2581
|
+
wt,
|
|
2181
2582
|
{
|
|
2182
2583
|
container: !0,
|
|
2183
2584
|
spacing: 2,
|
|
2184
2585
|
sx: {
|
|
2185
2586
|
justifyContent: "center"
|
|
2186
2587
|
},
|
|
2187
|
-
children: d?.list.map((
|
|
2188
|
-
|
|
2588
|
+
children: d?.list.map((x) => /* @__PURE__ */ r(
|
|
2589
|
+
wt,
|
|
2189
2590
|
{
|
|
2190
2591
|
size: {
|
|
2191
2592
|
xs: 12,
|
|
@@ -2193,62 +2594,62 @@ function Ho({ style: t, sort: e, section: o, ...n }) {
|
|
|
2193
2594
|
md: t === "card" ? 3 : 12
|
|
2194
2595
|
},
|
|
2195
2596
|
children: /* @__PURE__ */ w(
|
|
2196
|
-
|
|
2597
|
+
Cn,
|
|
2197
2598
|
{
|
|
2198
2599
|
elevation: 0,
|
|
2199
|
-
className:
|
|
2200
|
-
onClick: i ? void 0 : () =>
|
|
2600
|
+
className: b(t === "card" && "style-card"),
|
|
2601
|
+
onClick: i ? void 0 : () => p(x.slug),
|
|
2201
2602
|
children: [
|
|
2202
|
-
!!
|
|
2203
|
-
|
|
2603
|
+
!!x.image && /* @__PURE__ */ r(
|
|
2604
|
+
ue,
|
|
2204
2605
|
{
|
|
2205
2606
|
component: "img",
|
|
2206
2607
|
alt: "",
|
|
2207
|
-
image:
|
|
2608
|
+
image: F(L(x.image), 540),
|
|
2208
2609
|
loading: "lazy"
|
|
2209
2610
|
}
|
|
2210
2611
|
),
|
|
2211
|
-
/* @__PURE__ */ w(
|
|
2212
|
-
/* @__PURE__ */ r(
|
|
2213
|
-
/* @__PURE__ */ r(
|
|
2612
|
+
/* @__PURE__ */ w(me, { children: [
|
|
2613
|
+
/* @__PURE__ */ r(j, { variant: "h6", component: "div", className: Mt, children: x.title || x.id }),
|
|
2614
|
+
/* @__PURE__ */ r(j, { variant: "body2", className: Mt, children: x.description })
|
|
2214
2615
|
] })
|
|
2215
2616
|
]
|
|
2216
2617
|
}
|
|
2217
2618
|
)
|
|
2218
2619
|
},
|
|
2219
|
-
|
|
2620
|
+
x.id
|
|
2220
2621
|
))
|
|
2221
2622
|
}
|
|
2222
2623
|
),
|
|
2223
2624
|
/* @__PURE__ */ r(
|
|
2224
|
-
|
|
2625
|
+
f,
|
|
2225
2626
|
{
|
|
2226
2627
|
sx: {
|
|
2227
2628
|
textAlign: "center",
|
|
2228
2629
|
mt: 2
|
|
2229
2630
|
},
|
|
2230
|
-
children: d.total > d.list.length ? /* @__PURE__ */ r(
|
|
2631
|
+
children: d.total > d.list.length ? /* @__PURE__ */ r(V, { variant: "outlined", color: "secondary", onClick: y, loading: u.current, children: "More" }) : /* @__PURE__ */ r(V, { variant: "outlined", color: "secondary", disabled: !0, children: "No More" })
|
|
2231
2632
|
}
|
|
2232
2633
|
)
|
|
2233
2634
|
] }) : /* @__PURE__ */ r(
|
|
2234
|
-
|
|
2635
|
+
f,
|
|
2235
2636
|
{
|
|
2236
2637
|
sx: {
|
|
2237
2638
|
p: 2,
|
|
2238
2639
|
textAlign: "center"
|
|
2239
2640
|
},
|
|
2240
|
-
children: /* @__PURE__ */ r(
|
|
2641
|
+
children: /* @__PURE__ */ r(de, { size: 24 })
|
|
2241
2642
|
}
|
|
2242
2643
|
)
|
|
2243
2644
|
] });
|
|
2244
2645
|
}
|
|
2245
|
-
const
|
|
2646
|
+
const Mt = ct`
|
|
2246
2647
|
display: -webkit-box;
|
|
2247
2648
|
-webkit-box-orient: vertical;
|
|
2248
2649
|
-webkit-line-clamp: 2;
|
|
2249
2650
|
overflow: hidden;
|
|
2250
2651
|
text-overflow: ellipsis;
|
|
2251
|
-
`,
|
|
2652
|
+
`, Cn = C(ce)`
|
|
2252
2653
|
border: 1px solid #e0e0e0;
|
|
2253
2654
|
background-color: transparent;
|
|
2254
2655
|
cursor: pointer;
|
|
@@ -2268,15 +2669,15 @@ const _t = it`
|
|
|
2268
2669
|
max-height: 50vw;
|
|
2269
2670
|
}
|
|
2270
2671
|
}
|
|
2271
|
-
`,
|
|
2272
|
-
iframe:
|
|
2273
|
-
section:
|
|
2274
|
-
"section-card-list":
|
|
2275
|
-
toc:
|
|
2276
|
-
"custom-component":
|
|
2277
|
-
"layout-block":
|
|
2672
|
+
`, Sn = {
|
|
2673
|
+
iframe: Jo,
|
|
2674
|
+
section: wn,
|
|
2675
|
+
"section-card-list": Do,
|
|
2676
|
+
toc: $n,
|
|
2677
|
+
"custom-component": Go,
|
|
2678
|
+
"layout-block": un
|
|
2278
2679
|
};
|
|
2279
|
-
function
|
|
2680
|
+
function Bn({
|
|
2280
2681
|
id: t,
|
|
2281
2682
|
type: e,
|
|
2282
2683
|
mode: o,
|
|
@@ -2286,46 +2687,46 @@ function Jo({
|
|
|
2286
2687
|
page: c,
|
|
2287
2688
|
...s
|
|
2288
2689
|
}) {
|
|
2289
|
-
const l =
|
|
2290
|
-
const { height:
|
|
2291
|
-
return e === "layout-block" && (
|
|
2292
|
-
const
|
|
2690
|
+
const l = Sn[e], { getPageMetaStyle: d } = so(), m = S(() => {
|
|
2691
|
+
const { height: p, ...y } = n;
|
|
2692
|
+
return e === "layout-block" && (y.onBlockRender = (x) => {
|
|
2693
|
+
const v = {
|
|
2293
2694
|
...n?.dev,
|
|
2294
|
-
...
|
|
2295
|
-
}, { defaultLocale: k } =
|
|
2296
|
-
...
|
|
2297
|
-
...
|
|
2298
|
-
dev:
|
|
2299
|
-
}, { locale:
|
|
2300
|
-
let
|
|
2301
|
-
return
|
|
2302
|
-
|
|
2695
|
+
...x?.config?.dev
|
|
2696
|
+
}, { defaultLocale: k } = v, _ = {
|
|
2697
|
+
...pt(n, ["locale", "editing"]),
|
|
2698
|
+
...x?.config,
|
|
2699
|
+
dev: v
|
|
2700
|
+
}, { locale: M } = _;
|
|
2701
|
+
let B = c?.dataSource?.[x?.id]?.[M];
|
|
2702
|
+
return he(B) && (B = c?.dataSource?.[x?.id]?.[k ?? "en"]), /* @__PURE__ */ r(
|
|
2703
|
+
Bn,
|
|
2303
2704
|
{
|
|
2304
|
-
...
|
|
2705
|
+
...x,
|
|
2305
2706
|
config: {
|
|
2306
|
-
...
|
|
2307
|
-
...
|
|
2308
|
-
|
|
2707
|
+
...x?.section?.properties,
|
|
2708
|
+
...B,
|
|
2709
|
+
..._
|
|
2309
2710
|
},
|
|
2310
2711
|
page: c,
|
|
2311
2712
|
ignorePageMetaStyle: !0
|
|
2312
2713
|
}
|
|
2313
2714
|
);
|
|
2314
|
-
}),
|
|
2315
|
-
}, [n, e]),
|
|
2316
|
-
const
|
|
2317
|
-
return e !== "custom-component" && (
|
|
2318
|
-
}, [n.height, a, e, d]),
|
|
2319
|
-
return
|
|
2320
|
-
}
|
|
2321
|
-
function
|
|
2715
|
+
}), y;
|
|
2716
|
+
}, [n, e]), u = S(() => {
|
|
2717
|
+
const p = {};
|
|
2718
|
+
return e !== "custom-component" && (p.height = n.height), p.sx = a ? void 0 : d("sx"), p.id = `BlockBase-${t}`, p;
|
|
2719
|
+
}, [n.height, a, e, d]), h = l && /* @__PURE__ */ r(l, { mode: o, ...m, id: t, section: i });
|
|
2720
|
+
return h ? /* @__PURE__ */ r(lo, { ...s, ...u, children: h }) : /* @__PURE__ */ r(Nn, { type: e });
|
|
2721
|
+
}
|
|
2722
|
+
function Nn({ type: t }) {
|
|
2322
2723
|
return /* @__PURE__ */ r(
|
|
2323
|
-
|
|
2724
|
+
f,
|
|
2324
2725
|
{
|
|
2325
2726
|
sx: {
|
|
2326
2727
|
p: 2
|
|
2327
2728
|
},
|
|
2328
|
-
children: /* @__PURE__ */ w(
|
|
2729
|
+
children: /* @__PURE__ */ w(pe, { icon: /* @__PURE__ */ r(ne, {}), color: "error", children: [
|
|
2329
2730
|
"Unsupported Block `",
|
|
2330
2731
|
t,
|
|
2331
2732
|
"`"
|
|
@@ -2334,13 +2735,13 @@ function Ko({ type: t }) {
|
|
|
2334
2735
|
);
|
|
2335
2736
|
}
|
|
2336
2737
|
export {
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2738
|
+
Bn as B,
|
|
2739
|
+
mr as I,
|
|
2740
|
+
dr as P,
|
|
2741
|
+
hr as S,
|
|
2742
|
+
xr as T,
|
|
2743
|
+
cr as a,
|
|
2744
|
+
pr as b,
|
|
2745
|
+
gr as g,
|
|
2746
|
+
fr as p
|
|
2346
2747
|
};
|