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