@blocklet/pages-kit-inner-components 0.4.159 → 0.5.0
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/{array-5NwrYcJ5.js → array-CjyMzwA7.js} +46 -20
- package/lib/cjs/chunks/home-BlT3oqu3.js +38 -0
- package/lib/cjs/chunks/{publish-button-ImPoBEP5.js → publish-button-BPa7uf5h.js} +1 -1
- package/lib/cjs/home.js +1 -1
- package/lib/es/add-component.js +1 -1
- package/lib/es/chunks/{array-BAy40Bak.js → array-D52_0LRy.js} +287 -261
- package/lib/es/chunks/{home-DOrhBil-.js → home-uXodXQ2c.js} +194 -194
- package/lib/es/chunks/{publish-button-CxEaqAku.js → publish-button-DMmhToxU.js} +2 -2
- package/lib/es/home.js +2 -2
- package/package.json +5 -5
- package/lib/cjs/chunks/home-WKpO7IF-.js +0 -38
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as i, jsxs as w, Fragment as J } from "react/jsx-runtime";
|
|
2
2
|
import "@mui/icons-material";
|
|
3
|
-
import { Box as
|
|
4
|
-
import Jt, { createContext as xt, useMemo as W, useCallback as M, useContext as
|
|
3
|
+
import { Box as y, styled as Tt, Typography as C, Container as Et, Stack as Ot, useTheme as At, createTheme as Ft, ThemeProvider as Ut, Card as Vt, CircularProgress as Dt, Grid as st, CardMedia as Ht, CardContent as Yt } from "@mui/material";
|
|
4
|
+
import Jt, { createContext as xt, useMemo as W, useCallback as M, useContext as yt, Fragment as Mt, isValidElement as bt, useState as K, useEffect as E, useRef as tt } from "react";
|
|
5
5
|
import G from "lodash/keyBy";
|
|
6
6
|
import { e as j, g as N, E as Kt, h as et, l as ot } from "./state-C_CbKF7g.js";
|
|
7
7
|
import { AIForm as lt, AIFormResult as ct } from "@blocklet/ai-runtime/components";
|
|
8
8
|
import { deepmerge as Gt } from "@mui/utils";
|
|
9
|
-
import
|
|
9
|
+
import rt from "lodash/pick";
|
|
10
10
|
import { ErrorBoundary as Xt } from "react-error-boundary";
|
|
11
11
|
import qt from "@blocklet/pages-kit/builtin/markdown/markdown-renderer";
|
|
12
12
|
import { useColorConvert as wt } from "@blocklet/pages-kit/contexts/color";
|
|
@@ -20,8 +20,8 @@ import { isGradient as ee, isColorString as oe } from "@blocklet/pages-kit/utils
|
|
|
20
20
|
import _t from "@mui/material/useMediaQuery";
|
|
21
21
|
import S from "lodash/omit";
|
|
22
22
|
import { Icon as $t } from "@iconify-icon/react";
|
|
23
|
-
import
|
|
24
|
-
import { Link as
|
|
23
|
+
import re from "@arcblock/ux/lib/Screenshot";
|
|
24
|
+
import { Link as ne, NavLink as ie, useNavigate as ae } from "react-router-dom";
|
|
25
25
|
import se from "@arcblock/ux/lib/Button";
|
|
26
26
|
import Q from "is-uri";
|
|
27
27
|
import { join as H } from "pathe";
|
|
@@ -53,7 +53,7 @@ const Nt = "{{CUSTOM_VALUE}}", xe = [
|
|
|
53
53
|
value: "large",
|
|
54
54
|
sx: { py: { xs: 7.5, md: 10, lg: 12.5, xl: 15 } }
|
|
55
55
|
}
|
|
56
|
-
],
|
|
56
|
+
], ye = [
|
|
57
57
|
{
|
|
58
58
|
title: "None",
|
|
59
59
|
value: "none",
|
|
@@ -74,7 +74,7 @@ const Nt = "{{CUSTOM_VALUE}}", xe = [
|
|
|
74
74
|
value: "large",
|
|
75
75
|
sx: { py: { xs: 6, md: 9, lg: 9, xl: 11 } }
|
|
76
76
|
}
|
|
77
|
-
],
|
|
77
|
+
], be = [
|
|
78
78
|
{
|
|
79
79
|
title: "None",
|
|
80
80
|
value: "none",
|
|
@@ -95,9 +95,9 @@ const Nt = "{{CUSTOM_VALUE}}", xe = [
|
|
|
95
95
|
value: "large",
|
|
96
96
|
sx: { px: { xs: 2.5, md: 10, lg: 12.5, xl: 15 } }
|
|
97
97
|
}
|
|
98
|
-
], Y = (t, e,
|
|
99
|
-
const
|
|
100
|
-
return `${e}${
|
|
98
|
+
], Y = (t, e, n) => {
|
|
99
|
+
const r = t.breakpoints.values[n];
|
|
100
|
+
return `${e}${r ? ` (${r}px)` : ""}`;
|
|
101
101
|
}, we = [
|
|
102
102
|
{
|
|
103
103
|
title: "100%",
|
|
@@ -137,7 +137,7 @@ const Nt = "{{CUSTOM_VALUE}}", xe = [
|
|
|
137
137
|
mx: "auto"
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
], ve = G(xe, "value"), ke = G(
|
|
140
|
+
], ve = G(xe, "value"), ke = G(ye, "value"), _e = G(be, "value"), $e = G(we, "value"), Ne = /* @__PURE__ */ new Map([
|
|
141
141
|
["baseSectionPaddingY", ve],
|
|
142
142
|
["maxWidth", $e],
|
|
143
143
|
["paddingY", ke],
|
|
@@ -145,14 +145,14 @@ const Nt = "{{CUSTOM_VALUE}}", xe = [
|
|
|
145
145
|
]);
|
|
146
146
|
function St(t) {
|
|
147
147
|
var l;
|
|
148
|
-
const { type: e, value:
|
|
148
|
+
const { type: e, value: n, format: r = "sx", defaultValue: o = null } = t, a = Ne.get(e);
|
|
149
149
|
if (!a)
|
|
150
150
|
return o;
|
|
151
|
-
const d =
|
|
152
|
-
if (a != null && a[s] && ((l = a == null ? void 0 : a[s]) != null && l[
|
|
153
|
-
const c = a[s][
|
|
151
|
+
const d = n.startsWith("custom:"), s = d ? "custom" : n;
|
|
152
|
+
if (a != null && a[s] && ((l = a == null ? void 0 : a[s]) != null && l[r])) {
|
|
153
|
+
const c = a[s][r];
|
|
154
154
|
if (d) {
|
|
155
|
-
const m =
|
|
155
|
+
const m = n.replace("custom:", "");
|
|
156
156
|
try {
|
|
157
157
|
return JSON.parse(JSON.stringify(c || {}).replaceAll(Nt, m));
|
|
158
158
|
} catch {
|
|
@@ -168,32 +168,32 @@ const Ct = xt({
|
|
|
168
168
|
getPageMetaStyle: () => ({})
|
|
169
169
|
});
|
|
170
170
|
function Se() {
|
|
171
|
-
return
|
|
171
|
+
return yt(Ct);
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function lr({
|
|
174
174
|
page: t,
|
|
175
175
|
children: e,
|
|
176
|
-
defaultLocale:
|
|
177
|
-
currentLocale:
|
|
176
|
+
defaultLocale: n = "en",
|
|
177
|
+
currentLocale: r
|
|
178
178
|
}) {
|
|
179
179
|
const o = W(() => t ? JSON.parse(JSON.stringify(t)) : null, [JSON.stringify(t)]), a = M(() => {
|
|
180
180
|
var c;
|
|
181
181
|
if (!o) return {};
|
|
182
|
-
const l =
|
|
182
|
+
const l = r || n;
|
|
183
183
|
return ((c = o.locales) == null ? void 0 : c[l]) ?? {};
|
|
184
|
-
}, [o,
|
|
184
|
+
}, [o, n, r]), d = M(
|
|
185
185
|
(l = "sx") => {
|
|
186
186
|
const c = a();
|
|
187
187
|
return !c || !c.style ? {} : Object.entries(c.style || {}).reduce((p, [h, u]) => {
|
|
188
188
|
if (!u) return p;
|
|
189
189
|
const f = `${h}Custom`;
|
|
190
190
|
c.style[f];
|
|
191
|
-
const
|
|
191
|
+
const b = St({
|
|
192
192
|
type: h,
|
|
193
193
|
value: u,
|
|
194
194
|
format: l
|
|
195
195
|
});
|
|
196
|
-
return
|
|
196
|
+
return b ? { ...p, ...b } : p;
|
|
197
197
|
}, {});
|
|
198
198
|
},
|
|
199
199
|
[a]
|
|
@@ -207,24 +207,24 @@ function cn({
|
|
|
207
207
|
);
|
|
208
208
|
return /* @__PURE__ */ i(Ct.Provider, { value: s, children: e });
|
|
209
209
|
}
|
|
210
|
-
function z({ actions: t, center: e, className:
|
|
210
|
+
function z({ actions: t, center: e, className: n, align: r }) {
|
|
211
211
|
return t && (t != null && t.length) ? /* @__PURE__ */ i(
|
|
212
|
-
|
|
212
|
+
y,
|
|
213
213
|
{
|
|
214
214
|
className: g(
|
|
215
215
|
"flex gap-4 flex-wrap",
|
|
216
216
|
"lg:flex-row lg:gap-8",
|
|
217
|
-
(e ||
|
|
218
|
-
!e &&
|
|
219
|
-
!e &&
|
|
220
|
-
|
|
217
|
+
(e || r === "center") && "justify-center",
|
|
218
|
+
!e && r === "right" && "justify-end",
|
|
219
|
+
!e && r === "left" && "justify-start",
|
|
220
|
+
n
|
|
221
221
|
),
|
|
222
222
|
sx: { alignItems: "center" },
|
|
223
223
|
children: t
|
|
224
224
|
}
|
|
225
225
|
) : null;
|
|
226
226
|
}
|
|
227
|
-
const Ce = "section", Pe = Tt(
|
|
227
|
+
const Ce = "section", Pe = Tt(y)`
|
|
228
228
|
overflow: hidden;
|
|
229
229
|
|
|
230
230
|
.section__title {
|
|
@@ -290,8 +290,8 @@ const Ce = "section", Pe = Tt(b)`
|
|
|
290
290
|
function O({
|
|
291
291
|
title: t,
|
|
292
292
|
description: e,
|
|
293
|
-
descriptionMarkdown:
|
|
294
|
-
actions:
|
|
293
|
+
descriptionMarkdown: n,
|
|
294
|
+
actions: r,
|
|
295
295
|
className: o = "",
|
|
296
296
|
classes: a = {},
|
|
297
297
|
prepend: d,
|
|
@@ -303,10 +303,10 @@ function O({
|
|
|
303
303
|
logo: h,
|
|
304
304
|
titleAppearance: u,
|
|
305
305
|
descriptionAppearance: f,
|
|
306
|
-
...
|
|
306
|
+
...b
|
|
307
307
|
}) {
|
|
308
308
|
const x = wt();
|
|
309
|
-
if (!t && !e && !
|
|
309
|
+
if (!t && !e && !r && !m && !c && !d && !s && !h) return null;
|
|
310
310
|
const k = Math.max(Math.min(5, l + 1), 1), v = {
|
|
311
311
|
1: "xl:!text-3xl lg:!text-2xl md:!text-xl",
|
|
312
312
|
2: "xl:!text-2xl lg:!text-xl md:!text-lg",
|
|
@@ -315,7 +315,7 @@ function O({
|
|
|
315
315
|
5: "xl:!text-lg md:!text-md sm:!text-sm",
|
|
316
316
|
6: "!text-sm"
|
|
317
317
|
}, I = l === 0 ? "big" : `h${k}`, R = l === 0;
|
|
318
|
-
return /* @__PURE__ */ w(Pe, { className: g("base-info", "lg:text-left", p && "!text-center", o), ...
|
|
318
|
+
return /* @__PURE__ */ w(Pe, { className: g("base-info", "lg:text-left", p && "!text-center", o), ...b, children: [
|
|
319
319
|
d && /* @__PURE__ */ i("div", { children: d }),
|
|
320
320
|
(c || m) && /* @__PURE__ */ i("div", { className: g("section__tag", (a == null ? void 0 : a.tag) || (a == null ? void 0 : a.badge)), children: c || m }),
|
|
321
321
|
h && /* @__PURE__ */ i("img", { className: "w-[120px] m-auto mb-8", src: h, alt: "info", loading: "lazy" }),
|
|
@@ -340,8 +340,8 @@ function O({
|
|
|
340
340
|
children: t
|
|
341
341
|
}
|
|
342
342
|
),
|
|
343
|
-
e && (
|
|
344
|
-
|
|
343
|
+
e && (n ? /* @__PURE__ */ i(
|
|
344
|
+
y,
|
|
345
345
|
{
|
|
346
346
|
sx: {
|
|
347
347
|
...(f == null ? void 0 : f.color) && { color: `${x(f.color)} !important` }
|
|
@@ -377,7 +377,7 @@ function O({
|
|
|
377
377
|
children: e
|
|
378
378
|
}
|
|
379
379
|
)),
|
|
380
|
-
/* @__PURE__ */ i(z, { actions:
|
|
380
|
+
/* @__PURE__ */ i(z, { actions: r, center: p, className: "mt-8" }),
|
|
381
381
|
s && /* @__PURE__ */ i("div", { children: s })
|
|
382
382
|
] });
|
|
383
383
|
}
|
|
@@ -398,13 +398,13 @@ const A = [
|
|
|
398
398
|
];
|
|
399
399
|
function Pt(t) {
|
|
400
400
|
if (t.type === Mt) {
|
|
401
|
-
const
|
|
402
|
-
return
|
|
401
|
+
const n = (t.props.children || []).filter((r) => bt(r));
|
|
402
|
+
return n.length === 1 ? Pt(n[0]) : n.length > 1;
|
|
403
403
|
}
|
|
404
404
|
return Array.isArray(t);
|
|
405
405
|
}
|
|
406
406
|
const P = "&>*";
|
|
407
|
-
function
|
|
407
|
+
function nt({ children: t, col: e, gap: n, className: r, align: o, sx: a, type: d, ...s } = {
|
|
408
408
|
children: null,
|
|
409
409
|
className: "",
|
|
410
410
|
col: 3,
|
|
@@ -424,7 +424,7 @@ function rt({ children: t, col: e, gap: r, className: n, align: o, sx: a, type:
|
|
|
424
424
|
"bottom-left": "justify-start items-end",
|
|
425
425
|
"bottom-right": "justify-end items-end"
|
|
426
426
|
}, p = m[o] || m.center;
|
|
427
|
-
let u =
|
|
427
|
+
let u = n ?? ({
|
|
428
428
|
2: 6,
|
|
429
429
|
3: 4,
|
|
430
430
|
4: 4,
|
|
@@ -432,7 +432,7 @@ function rt({ children: t, col: e, gap: r, className: n, align: o, sx: a, type:
|
|
|
432
432
|
6: 3
|
|
433
433
|
}[e] || 0);
|
|
434
434
|
Pt(t) || (u = 0);
|
|
435
|
-
const
|
|
435
|
+
const b = (e - 1) * u / e;
|
|
436
436
|
let x = { ...a, gap: `${u}rem` };
|
|
437
437
|
const k = { [P]: { width: "100%" } }, v = {}, I = {}, R = {};
|
|
438
438
|
switch (k.gap = "1rem", v.gap = `${u / 2}rem`, e) {
|
|
@@ -453,7 +453,7 @@ function rt({ children: t, col: e, gap: r, className: n, align: o, sx: a, type:
|
|
|
453
453
|
};
|
|
454
454
|
break;
|
|
455
455
|
}
|
|
456
|
-
return x[P] = { width: `calc(${c}% - ${
|
|
456
|
+
return x[P] = { width: `calc(${c}% - ${b}rem)` }, x[`@media (max-width: ${l.breakpoints.values.xl}px)`] = R, x[`@media (max-width: ${l.breakpoints.values.lg}px)`] = I, x[`@media (max-width: ${l.breakpoints.values.md}px)`] = v, x[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k, d === "wall" && (x = { ...a, gap: `${u}rem` }, x[P] = { width: `calc(${c}% - ${b}rem)` }, k[P] = { width: `calc(45% - ${u / 2 / 2}rem)` }, x[`@media (max-width: ${l.breakpoints.values.sm}px)`] = k), /* @__PURE__ */ i(y, { className: g("flex flex-wrap flex-row h-full", p, r), sx: x, ...s, children: t });
|
|
457
457
|
}
|
|
458
458
|
function Be() {
|
|
459
459
|
const t = navigator.userAgent.toLowerCase();
|
|
@@ -461,8 +461,8 @@ function Be() {
|
|
|
461
461
|
}
|
|
462
462
|
function Ie(t = "") {
|
|
463
463
|
if (t.startsWith("data:image/svg+xml,")) return !0;
|
|
464
|
-
const e = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,
|
|
465
|
-
return e.test(t) ||
|
|
464
|
+
const e = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/, n = /^(\/|\.\/|\.\.\/)(?:[^/]+\/)*[^/]+$/;
|
|
465
|
+
return e.test(t) || n.test(t);
|
|
466
466
|
}
|
|
467
467
|
function L(t) {
|
|
468
468
|
return (t == null ? void 0 : t.endsWith(".mp4")) || (t == null ? void 0 : t.endsWith(".m4v")) || (t == null ? void 0 : t.endsWith(".webm"));
|
|
@@ -477,22 +477,22 @@ function je(t) {
|
|
|
477
477
|
function Re() {
|
|
478
478
|
const [t, e] = K(Date.now());
|
|
479
479
|
return E(() => {
|
|
480
|
-
const
|
|
480
|
+
const n = () => {
|
|
481
481
|
e(Date.now());
|
|
482
482
|
};
|
|
483
|
-
return document.addEventListener("visibilitychange",
|
|
484
|
-
document.removeEventListener("visibilitychange",
|
|
483
|
+
return document.addEventListener("visibilitychange", n), () => {
|
|
484
|
+
document.removeEventListener("visibilitychange", n);
|
|
485
485
|
};
|
|
486
486
|
}, []), t;
|
|
487
487
|
}
|
|
488
|
-
function mt(t, e,
|
|
488
|
+
function mt(t, e, n, r, o) {
|
|
489
489
|
let a = null;
|
|
490
490
|
const { color: d = "", image: s } = je(e);
|
|
491
491
|
if (s && Ie(s)) {
|
|
492
|
-
delete
|
|
493
|
-
const l = !(t.mobile.apple.device || Be()) && L(s), c = L(s) &&
|
|
492
|
+
delete n.backgroundColor;
|
|
493
|
+
const l = !(t.mobile.apple.device || Be()) && L(s), c = L(s) && r ? j(N(r), 1200, "quality") : "";
|
|
494
494
|
l ? a = /* @__PURE__ */ i(
|
|
495
|
-
|
|
495
|
+
y,
|
|
496
496
|
{
|
|
497
497
|
component: "video",
|
|
498
498
|
className: "section-bg",
|
|
@@ -519,7 +519,7 @@ function mt(t, e, r, n, o) {
|
|
|
519
519
|
) : a = /* @__PURE__ */ i(
|
|
520
520
|
kt,
|
|
521
521
|
{
|
|
522
|
-
src: L(s) &&
|
|
522
|
+
src: L(s) && r ? c : s,
|
|
523
523
|
sizesAttr: {
|
|
524
524
|
sm: 600,
|
|
525
525
|
md: 900,
|
|
@@ -542,24 +542,24 @@ function mt(t, e, r, n, o) {
|
|
|
542
542
|
},
|
|
543
543
|
o || s
|
|
544
544
|
);
|
|
545
|
-
} else s ?
|
|
545
|
+
} else s ? n.backgroundImage = `${s} !important` : d && (n.backgroundColor = `${d} !important`);
|
|
546
546
|
return a;
|
|
547
547
|
}
|
|
548
|
-
function ze({ autoWidth: t, children: e, ...
|
|
549
|
-
return t ? /* @__PURE__ */ i(
|
|
548
|
+
function ze({ autoWidth: t, children: e, ...n }) {
|
|
549
|
+
return t ? /* @__PURE__ */ i(y, { display: "flex", ...n, children: e }) : /* @__PURE__ */ i(Et, { ...n, children: e });
|
|
550
550
|
}
|
|
551
551
|
function F({
|
|
552
552
|
dark: t = !1,
|
|
553
553
|
children: e,
|
|
554
|
-
className:
|
|
555
|
-
sx:
|
|
554
|
+
className: n,
|
|
555
|
+
sx: r = {},
|
|
556
556
|
boxed: o = { show: !1 },
|
|
557
557
|
padding: a = "normal",
|
|
558
558
|
boxProps: d,
|
|
559
559
|
type: s,
|
|
560
560
|
...l
|
|
561
561
|
}) {
|
|
562
|
-
const c = { ...
|
|
562
|
+
const c = { ...r }, m = _t((u) => u.breakpoints.down("md"));
|
|
563
563
|
t && (c.color = dt.common.white, c.backgroundColor = `${dt.grey[900]} !important`), o.show && (c.display = "flex");
|
|
564
564
|
const p = W(() => !Number(l.boxMaxWidth) || m ? {
|
|
565
565
|
width: "100%"
|
|
@@ -579,7 +579,7 @@ function F({
|
|
|
579
579
|
{
|
|
580
580
|
component: "section",
|
|
581
581
|
styles: { ...c, ...h },
|
|
582
|
-
className: g("base-section", "px-2 md:px-5 lg:px-5 xl:px-10",
|
|
582
|
+
className: g("base-section", "px-2 md:px-5 lg:px-5 xl:px-10", n, {
|
|
583
583
|
dark: t
|
|
584
584
|
}),
|
|
585
585
|
...S(
|
|
@@ -600,14 +600,14 @@ function F({
|
|
|
600
600
|
function Bt({
|
|
601
601
|
background: t = "",
|
|
602
602
|
backgroundVideoPoster: e,
|
|
603
|
-
children:
|
|
604
|
-
sx:
|
|
603
|
+
children: n,
|
|
604
|
+
sx: r = {},
|
|
605
605
|
boxed: o = { show: !1 },
|
|
606
606
|
className: a = "",
|
|
607
607
|
styles: d = {},
|
|
608
608
|
...s
|
|
609
609
|
}) {
|
|
610
|
-
const l = { ...d, ...
|
|
610
|
+
const l = { ...d, ...r }, c = wt();
|
|
611
611
|
let m = null;
|
|
612
612
|
const p = _t((f) => f.breakpoints.up("sm")), h = Zt(), u = Re();
|
|
613
613
|
return t && (m = mt(
|
|
@@ -623,7 +623,7 @@ function Bt({
|
|
|
623
623
|
o == null ? void 0 : o.backgroundVideoPoster,
|
|
624
624
|
u
|
|
625
625
|
))), /* @__PURE__ */ w(
|
|
626
|
-
|
|
626
|
+
y,
|
|
627
627
|
{
|
|
628
628
|
...s,
|
|
629
629
|
sx: {
|
|
@@ -633,7 +633,7 @@ function Bt({
|
|
|
633
633
|
className: g(a, (o == null ? void 0 : o.boxShadow) && "shadow-xl"),
|
|
634
634
|
children: [
|
|
635
635
|
m,
|
|
636
|
-
|
|
636
|
+
n
|
|
637
637
|
]
|
|
638
638
|
}
|
|
639
639
|
);
|
|
@@ -659,26 +659,26 @@ function It({ icon: t, ...e }) {
|
|
|
659
659
|
return /* @__PURE__ */ i($t, { icon: t, ...e, ref: null });
|
|
660
660
|
}
|
|
661
661
|
function $(t, e) {
|
|
662
|
-
const
|
|
663
|
-
return [
|
|
662
|
+
const n = rt(t, e), r = S(t, e);
|
|
663
|
+
return [n, r];
|
|
664
664
|
}
|
|
665
665
|
const Wt = ["title", "description", "actions", "badge", "tag", "prepend", "append", "logo"];
|
|
666
666
|
function Te({
|
|
667
667
|
image: t,
|
|
668
668
|
imageBorder: e,
|
|
669
|
-
imageShadow:
|
|
670
|
-
className:
|
|
669
|
+
imageShadow: n,
|
|
670
|
+
className: r,
|
|
671
671
|
reverse: o = !1,
|
|
672
672
|
fullSizeImage: a,
|
|
673
673
|
...d
|
|
674
674
|
}) {
|
|
675
|
-
const [s, l] = $(d, A), c = Object.keys(s).length > 0 && Object.values(
|
|
676
|
-
|
|
675
|
+
const [s, l] = $(d, A), c = Object.keys(s).length > 0 && Object.values(rt(s, Wt)).filter(Boolean).length > 0 && /* @__PURE__ */ i(O, { ...s }), m = bt(t) ? t : /* @__PURE__ */ i(y, { component: "img", src: t, alt: "", className: "block" }), p = ["phone", "macbook"].includes(e), h = t && /* @__PURE__ */ i(
|
|
676
|
+
y,
|
|
677
677
|
{
|
|
678
678
|
className: g(
|
|
679
679
|
"section__image",
|
|
680
680
|
"m-auto, leading-[1] text-center",
|
|
681
|
-
|
|
681
|
+
n && "shadow-xl",
|
|
682
682
|
s != null && s.center ? "flex justify-center items-center" : ""
|
|
683
683
|
),
|
|
684
684
|
sx: {
|
|
@@ -690,7 +690,7 @@ function Te({
|
|
|
690
690
|
},
|
|
691
691
|
children: p ? (
|
|
692
692
|
// @ts-ignore
|
|
693
|
-
/* @__PURE__ */ i(
|
|
693
|
+
/* @__PURE__ */ i(re, { type: e, sx: { width: "100%" }, children: m })
|
|
694
694
|
) : m
|
|
695
695
|
}
|
|
696
696
|
);
|
|
@@ -699,7 +699,7 @@ function Te({
|
|
|
699
699
|
{
|
|
700
700
|
className: g(
|
|
701
701
|
"section--block",
|
|
702
|
-
|
|
702
|
+
r,
|
|
703
703
|
a && !o && q`
|
|
704
704
|
.section-bg {
|
|
705
705
|
height: 80%;
|
|
@@ -709,7 +709,7 @@ function Te({
|
|
|
709
709
|
...l,
|
|
710
710
|
boxProps: a ? { sx: { padding: 0, overflow: "hidden" } } : void 0,
|
|
711
711
|
children: /* @__PURE__ */ i(
|
|
712
|
-
|
|
712
|
+
nt,
|
|
713
713
|
{
|
|
714
714
|
col: t ? 2 : 1,
|
|
715
715
|
className: a ? q`
|
|
@@ -740,18 +740,18 @@ function Te({
|
|
|
740
740
|
}
|
|
741
741
|
const U = ["editing", "height", "locale", "dev", "sx"];
|
|
742
742
|
function Ee(t) {
|
|
743
|
-
const { className: e, ...
|
|
744
|
-
return /* @__PURE__ */ i(Oe, { ...
|
|
743
|
+
const { className: e, ...n } = t;
|
|
744
|
+
return /* @__PURE__ */ i(Oe, { ...n, className: g("BlockBase-root", e) });
|
|
745
745
|
}
|
|
746
|
-
const Oe = _(
|
|
746
|
+
const Oe = _(y)`
|
|
747
747
|
position: relative;
|
|
748
748
|
color: ${({ theme: t }) => t.palette.text.primary};
|
|
749
749
|
`;
|
|
750
750
|
function Ae({
|
|
751
751
|
widget: t,
|
|
752
752
|
reverse: e,
|
|
753
|
-
projectId:
|
|
754
|
-
assistantId:
|
|
753
|
+
projectId: n,
|
|
754
|
+
assistantId: r,
|
|
755
755
|
working: o,
|
|
756
756
|
submitTitle: a,
|
|
757
757
|
submitIcon: d,
|
|
@@ -761,7 +761,7 @@ function Ae({
|
|
|
761
761
|
section: m,
|
|
762
762
|
...p
|
|
763
763
|
}) {
|
|
764
|
-
const [{ editing: h }, u] = $(p, U), [f,
|
|
764
|
+
const [{ editing: h }, u] = $(p, U), [f, b] = $(u, A), x = n && r ? { projectId: n, gitRef: "main", assistantId: r, working: !0 } : void 0, k = {
|
|
765
765
|
children: a,
|
|
766
766
|
endIcon: d ? /* @__PURE__ */ i(It, { icon: d }) : void 0,
|
|
767
767
|
sx: {
|
|
@@ -772,7 +772,7 @@ function Ae({
|
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
774
|
}, v = [], I = l && /* @__PURE__ */ i(C, { variant: "caption", color: "text.disabled", children: l }), R = c && /* @__PURE__ */ i(C, { variant: "caption", color: "text.disabled", children: c });
|
|
775
|
-
Object.keys(f).length > 0 && Object.values(
|
|
775
|
+
Object.keys(f).length > 0 && Object.values(rt(f, Wt)).filter(Boolean).length > 0 && v.push(/* @__PURE__ */ i(O, { ...f }, "base-info")), x && (t === "form" ? v.push(/* @__PURE__ */ i(lt, { identifier: x, SubmitProps: k }, "form")) : t === "result" ? v.push(
|
|
776
776
|
/* @__PURE__ */ i(
|
|
777
777
|
ct,
|
|
778
778
|
{
|
|
@@ -800,41 +800,41 @@ function Ae({
|
|
|
800
800
|
() => Ft(Gt(at, { palette: { primary: s ? { main: s } : void 0 } })),
|
|
801
801
|
[s, at]
|
|
802
802
|
);
|
|
803
|
-
return /* @__PURE__ */ i(Xt, { fallbackRender: Kt, children: /* @__PURE__ */ i(Ut, { theme: Lt, children: /* @__PURE__ */ i(F, { ...
|
|
803
|
+
return /* @__PURE__ */ i(Xt, { fallbackRender: Kt, children: /* @__PURE__ */ i(Ut, { theme: Lt, children: /* @__PURE__ */ i(F, { ...b, sx: h ? { pointerEvents: "none" } : {}, children: /* @__PURE__ */ i(nt, { col: v.length, children: v }) }) }) });
|
|
804
804
|
}
|
|
805
805
|
const jt = xt({
|
|
806
806
|
pages: [],
|
|
807
807
|
project: void 0
|
|
808
|
-
}), { Provider:
|
|
808
|
+
}), { Provider: cr, Consumer: dr } = jt;
|
|
809
809
|
function Rt() {
|
|
810
|
-
return
|
|
810
|
+
return yt(jt);
|
|
811
811
|
}
|
|
812
|
-
function Fe({ icon: t, className: e = "", size:
|
|
813
|
-
return /* @__PURE__ */ i(Ue, { component: It, className: g("css-icon", e), size:
|
|
812
|
+
function Fe({ icon: t, className: e = "", size: n = "1rem", ...r }) {
|
|
813
|
+
return /* @__PURE__ */ i(Ue, { component: It, className: g("css-icon", e), size: n, ...r, icon: t });
|
|
814
814
|
}
|
|
815
|
-
const Ue = _(
|
|
815
|
+
const Ue = _(y)`
|
|
816
816
|
&.css-icon {
|
|
817
817
|
display: inline-block;
|
|
818
818
|
width: ${({ size: t }) => t};
|
|
819
819
|
height: ${({ size: t }) => t};
|
|
820
820
|
}
|
|
821
821
|
`;
|
|
822
|
-
function Ve({ icon: t, className: e = "", size:
|
|
822
|
+
function Ve({ icon: t, className: e = "", size: n = "1rem", imageMeta: r, ...o }) {
|
|
823
823
|
const a = j(N(t), 540), [d, s] = K(!1), l = vt();
|
|
824
|
-
return d ? /* @__PURE__ */ i(Fe, { icon: "i-mdi:image", color: l.palette.grey[500], size:
|
|
824
|
+
return d ? /* @__PURE__ */ i(Fe, { icon: "i-mdi:image", color: l.palette.grey[500], size: n, className: e, ...o }) : /* @__PURE__ */ i(De, { className: g("image-icon", e), size: n, ...o, children: /* @__PURE__ */ i(
|
|
825
825
|
"img",
|
|
826
826
|
{
|
|
827
827
|
className: "image-icon__image",
|
|
828
828
|
src: a,
|
|
829
829
|
onError: () => s(!0),
|
|
830
|
-
width:
|
|
831
|
-
height:
|
|
832
|
-
alt: (
|
|
830
|
+
width: r == null ? void 0 : r.naturalWidth,
|
|
831
|
+
height: r == null ? void 0 : r.naturalHeight,
|
|
832
|
+
alt: (r == null ? void 0 : r.filename) || "card-icon",
|
|
833
833
|
loading: "lazy"
|
|
834
834
|
}
|
|
835
835
|
) });
|
|
836
836
|
}
|
|
837
|
-
const De = _(
|
|
837
|
+
const De = _(y)`
|
|
838
838
|
display: inline-block;
|
|
839
839
|
width: ${({ size: t }) => t};
|
|
840
840
|
height: ${({ size: t }) => t};
|
|
@@ -844,29 +844,29 @@ const De = _(b)`
|
|
|
844
844
|
width: 100%;
|
|
845
845
|
}
|
|
846
846
|
`, it = (t) => typeof t == "string" && /^[\w-_]+:[\w-_]+$/.test(t);
|
|
847
|
-
function Z({ icon: t, size: e = "1rem", imageMeta:
|
|
847
|
+
function Z({ icon: t, size: e = "1rem", imageMeta: n, ...r }) {
|
|
848
848
|
const o = window.isNaN(e) ? e : `${e}px`;
|
|
849
|
-
return it(t) ? /* @__PURE__ */ i($t, { icon: t }) : /* @__PURE__ */ i(He, { component: Ve, imageMeta:
|
|
849
|
+
return it(t) ? /* @__PURE__ */ i($t, { icon: t }) : /* @__PURE__ */ i(He, { component: Ve, imageMeta: n, className: "base-icon", icon: t, size: o, ...r });
|
|
850
850
|
}
|
|
851
|
-
const He = _(
|
|
851
|
+
const He = _(y)`
|
|
852
852
|
flex-shrink: 0;
|
|
853
853
|
`;
|
|
854
|
-
function T({ text: t, children: e, icon:
|
|
855
|
-
const l =
|
|
854
|
+
function T({ text: t, children: e, icon: n = "", endIcon: r, color: o = "primary", link: a = "", href: d = "", ...s }) {
|
|
855
|
+
const l = n ? /* @__PURE__ */ i(Z, { icon: n }) : null, c = r ? /* @__PURE__ */ i(Z, { icon: r }) : null, m = a || d, p = { ...s };
|
|
856
856
|
return m && (p.href = m, Q(m) && (p.target = p.target || "_blank")), /* @__PURE__ */ i(se, { startIcon: l, endIcon: c, color: o, ...p, children: t || e });
|
|
857
857
|
}
|
|
858
|
-
function zt({ editing: t, text: e, ...
|
|
859
|
-
const { pages:
|
|
858
|
+
function zt({ editing: t, text: e, ...n }) {
|
|
859
|
+
const { pages: r = [] } = Rt(), o = r.find((a) => a.id === (n.link || n.linkId));
|
|
860
860
|
if (t)
|
|
861
|
-
return /* @__PURE__ */ i(T, { ...S(
|
|
861
|
+
return /* @__PURE__ */ i(T, { ...S(n, ["link", "linkId"]), children: e });
|
|
862
862
|
if (o) {
|
|
863
863
|
const a = o.path || "/";
|
|
864
|
-
return /* @__PURE__ */ i(
|
|
864
|
+
return /* @__PURE__ */ i(ne, { to: a, children: /* @__PURE__ */ i(T, { ...S(n, ["link", "linkId"]), children: e }) });
|
|
865
865
|
}
|
|
866
|
-
return /* @__PURE__ */ i(T, { ...S(
|
|
866
|
+
return /* @__PURE__ */ i(T, { ...S(n, "linkId"), children: e });
|
|
867
867
|
}
|
|
868
|
-
function B({ type: t = "", icon: e = "", size:
|
|
869
|
-
return /* @__PURE__ */ i(Z, { icon: e || t, size:
|
|
868
|
+
function B({ type: t = "", icon: e = "", size: n = "3rem", className: r = "", ...o }) {
|
|
869
|
+
return /* @__PURE__ */ i(Z, { icon: e || t, size: n, className: g("content-icon", r), ...o });
|
|
870
870
|
}
|
|
871
871
|
B.propTypes = {};
|
|
872
872
|
B.defaultProps = {
|
|
@@ -879,8 +879,8 @@ B.defaultProps = {
|
|
|
879
879
|
function Ye({
|
|
880
880
|
to: t,
|
|
881
881
|
base: e,
|
|
882
|
-
children:
|
|
883
|
-
className:
|
|
882
|
+
children: n,
|
|
883
|
+
className: r,
|
|
884
884
|
activeClassName: o = "active",
|
|
885
885
|
target: a = "auto",
|
|
886
886
|
autoExternalMark: d = !1,
|
|
@@ -894,41 +894,41 @@ function Ye({
|
|
|
894
894
|
return u = H(p, m, t), /* @__PURE__ */ i(
|
|
895
895
|
"a",
|
|
896
896
|
{
|
|
897
|
-
className: `no-underline ${
|
|
897
|
+
className: `no-underline ${r}`,
|
|
898
898
|
href: X(u),
|
|
899
899
|
rel: "noreferrer noopener",
|
|
900
900
|
target: h,
|
|
901
901
|
...l,
|
|
902
|
-
children:
|
|
902
|
+
children: n
|
|
903
903
|
}
|
|
904
904
|
);
|
|
905
905
|
if (Q(t))
|
|
906
906
|
a === "auto" && (h = "_blank"), u = t;
|
|
907
907
|
else {
|
|
908
908
|
le(u) && (u = H(window.location.pathname, u));
|
|
909
|
-
const
|
|
909
|
+
const b = ce(`${window.location.origin}${u}`), x = c.some((k) => k.pathname === b.pathname);
|
|
910
910
|
if (s || x)
|
|
911
911
|
return /* @__PURE__ */ i(
|
|
912
912
|
ie,
|
|
913
913
|
{
|
|
914
914
|
end: !0,
|
|
915
915
|
to: X(u),
|
|
916
|
-
className: ({ isActive: k }) => g(
|
|
916
|
+
className: ({ isActive: k }) => g(r, k ? o : ""),
|
|
917
917
|
...l,
|
|
918
|
-
children:
|
|
918
|
+
children: n
|
|
919
919
|
}
|
|
920
920
|
);
|
|
921
921
|
}
|
|
922
922
|
return /* @__PURE__ */ w(
|
|
923
923
|
"a",
|
|
924
924
|
{
|
|
925
|
-
className: `no-underline ${
|
|
925
|
+
className: `no-underline ${r}`,
|
|
926
926
|
href: X(u),
|
|
927
927
|
rel: "noreferrer noopener",
|
|
928
928
|
target: h,
|
|
929
929
|
...l,
|
|
930
930
|
children: [
|
|
931
|
-
|
|
931
|
+
n,
|
|
932
932
|
f && /* @__PURE__ */ i(B, { icon: "i-mdi:arrow-top-right", size: "0.9em", className: "smart-link__mark", style: { marginLeft: 5 } })
|
|
933
933
|
]
|
|
934
934
|
}
|
|
@@ -937,14 +937,14 @@ function Ye({
|
|
|
937
937
|
function V({
|
|
938
938
|
prepend: t,
|
|
939
939
|
append: e,
|
|
940
|
-
children:
|
|
941
|
-
className:
|
|
940
|
+
children: n,
|
|
941
|
+
className: r = "",
|
|
942
942
|
dark: o = !1,
|
|
943
943
|
border: a = !0,
|
|
944
944
|
...d
|
|
945
945
|
}) {
|
|
946
946
|
let s = {};
|
|
947
|
-
const { pages: l = [] } = Rt(), c = l.find((h) => h.id === d.link), m = !
|
|
947
|
+
const { pages: l = [] } = Rt(), c = l.find((h) => h.id === d.link), m = !n || Jt.Children.toArray(n).every((h) => h === null);
|
|
948
948
|
return d.link && (s = {
|
|
949
949
|
component: Ye,
|
|
950
950
|
to: (c == null ? void 0 : c.path) || d.link,
|
|
@@ -957,19 +957,19 @@ function V({
|
|
|
957
957
|
{ "border-gray-200": a },
|
|
958
958
|
{ "dark:border-gray-500": o && a },
|
|
959
959
|
{ dark: o, "border-transparent": !a },
|
|
960
|
-
|
|
960
|
+
r
|
|
961
961
|
),
|
|
962
962
|
...s,
|
|
963
963
|
...S(d, ["listType", "dark", "iconColor", "link", "hoverStyle", "imageSize"]),
|
|
964
964
|
children: [
|
|
965
965
|
t,
|
|
966
|
-
!m && /* @__PURE__ */ i("div", { className: "card__body", children:
|
|
966
|
+
!m && /* @__PURE__ */ i("div", { className: "card__body", children: n }),
|
|
967
967
|
e
|
|
968
968
|
]
|
|
969
969
|
}
|
|
970
970
|
);
|
|
971
971
|
}
|
|
972
|
-
const Je = _(
|
|
972
|
+
const Je = _(y)`
|
|
973
973
|
&.base-card {
|
|
974
974
|
text-align: left;
|
|
975
975
|
border-width: 1px;
|
|
@@ -988,8 +988,8 @@ const Je = _(b)`
|
|
|
988
988
|
function D({
|
|
989
989
|
align: t = "left",
|
|
990
990
|
title: e,
|
|
991
|
-
titleProps:
|
|
992
|
-
description:
|
|
991
|
+
titleProps: n = {},
|
|
992
|
+
description: r,
|
|
993
993
|
descriptionProps: o = {}
|
|
994
994
|
}) {
|
|
995
995
|
return /* @__PURE__ */ w(J, { children: [
|
|
@@ -1001,11 +1001,11 @@ function D({
|
|
|
1001
1001
|
variant: "h5",
|
|
1002
1002
|
gutterBottom: !0,
|
|
1003
1003
|
align: t,
|
|
1004
|
-
...
|
|
1004
|
+
...n,
|
|
1005
1005
|
children: e
|
|
1006
1006
|
}
|
|
1007
1007
|
),
|
|
1008
|
-
|
|
1008
|
+
r && /* @__PURE__ */ i(
|
|
1009
1009
|
C,
|
|
1010
1010
|
{
|
|
1011
1011
|
className: g("card__description", "text-gray-500", "dark:text-gray-400"),
|
|
@@ -1014,7 +1014,7 @@ function D({
|
|
|
1014
1014
|
gutterBottom: !0,
|
|
1015
1015
|
align: t,
|
|
1016
1016
|
...o,
|
|
1017
|
-
children:
|
|
1017
|
+
children: r
|
|
1018
1018
|
}
|
|
1019
1019
|
)
|
|
1020
1020
|
] });
|
|
@@ -1022,8 +1022,8 @@ function D({
|
|
|
1022
1022
|
function Me({
|
|
1023
1023
|
image: t,
|
|
1024
1024
|
title: e,
|
|
1025
|
-
description:
|
|
1026
|
-
imageProps:
|
|
1025
|
+
description: n,
|
|
1026
|
+
imageProps: r = {},
|
|
1027
1027
|
imageMeta: o,
|
|
1028
1028
|
imageSize: a,
|
|
1029
1029
|
titleProps: d = {},
|
|
@@ -1039,7 +1039,7 @@ function Me({
|
|
|
1039
1039
|
className: "card-article",
|
|
1040
1040
|
...m,
|
|
1041
1041
|
prepend: /* @__PURE__ */ i("div", { className: "card__image__wrap", children: p && t ? /* @__PURE__ */ i(
|
|
1042
|
-
|
|
1042
|
+
y,
|
|
1043
1043
|
{
|
|
1044
1044
|
sx: {
|
|
1045
1045
|
position: "absolute",
|
|
@@ -1058,8 +1058,8 @@ function Me({
|
|
|
1058
1058
|
{
|
|
1059
1059
|
className: "card__image",
|
|
1060
1060
|
src: h,
|
|
1061
|
-
...
|
|
1062
|
-
alt:
|
|
1061
|
+
...r,
|
|
1062
|
+
alt: r.alt || (o == null ? void 0 : o.filename) || "card-image",
|
|
1063
1063
|
width: o == null ? void 0 : o.naturalWidth,
|
|
1064
1064
|
height: o == null ? void 0 : o.naturalHeight,
|
|
1065
1065
|
style: { width: "100%", height: "100%", objectFit: a || "cover", objectPosition: "center" },
|
|
@@ -1067,13 +1067,13 @@ function Me({
|
|
|
1067
1067
|
}
|
|
1068
1068
|
) }),
|
|
1069
1069
|
children: [
|
|
1070
|
-
e ||
|
|
1070
|
+
e || n ? /* @__PURE__ */ i(
|
|
1071
1071
|
D,
|
|
1072
1072
|
{
|
|
1073
1073
|
align: c,
|
|
1074
1074
|
title: e,
|
|
1075
1075
|
titleProps: d,
|
|
1076
|
-
description:
|
|
1076
|
+
description: n,
|
|
1077
1077
|
descriptionProps: s
|
|
1078
1078
|
}
|
|
1079
1079
|
) : null,
|
|
@@ -1088,6 +1088,19 @@ const Ke = _(V)`
|
|
|
1088
1088
|
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
1089
1089
|
}` : ""}
|
|
1090
1090
|
|
|
1091
|
+
.card__title {
|
|
1092
|
+
color: ${({ theme: t }) => t.palette.text.primary};
|
|
1093
|
+
a {
|
|
1094
|
+
color: ${({ theme: t }) => t.palette.primary.main};
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
.card__description {
|
|
1098
|
+
color: ${({ theme: t }) => t.palette.text.primary};
|
|
1099
|
+
a {
|
|
1100
|
+
color: ${({ theme: t }) => t.palette.primary.main};
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1091
1104
|
.card__image__wrap {
|
|
1092
1105
|
padding-top: 61.8%;
|
|
1093
1106
|
width: 100%;
|
|
@@ -1107,8 +1120,8 @@ const Ke = _(V)`
|
|
|
1107
1120
|
function ut({
|
|
1108
1121
|
title: t,
|
|
1109
1122
|
image: e,
|
|
1110
|
-
imageMeta:
|
|
1111
|
-
description:
|
|
1123
|
+
imageMeta: n,
|
|
1124
|
+
description: r,
|
|
1112
1125
|
actions: o,
|
|
1113
1126
|
align: a,
|
|
1114
1127
|
listType: d = "",
|
|
@@ -1122,10 +1135,10 @@ function ut({
|
|
|
1122
1135
|
icon: e,
|
|
1123
1136
|
color: "primary.main",
|
|
1124
1137
|
size: d === "icon-title" ? "1.2rem" : "3rem",
|
|
1125
|
-
imageMeta:
|
|
1138
|
+
imageMeta: n
|
|
1126
1139
|
}
|
|
1127
1140
|
),
|
|
1128
|
-
t ||
|
|
1141
|
+
t || r ? /* @__PURE__ */ i(D, { align: a, title: t, description: r }) : null,
|
|
1129
1142
|
o != null && o.length ? /* @__PURE__ */ i(z, { align: a, actions: o, className: "mt-4" }) : null
|
|
1130
1143
|
] });
|
|
1131
1144
|
}
|
|
@@ -1193,8 +1206,8 @@ const Ge = _(V)`
|
|
|
1193
1206
|
function Xe({
|
|
1194
1207
|
image: t,
|
|
1195
1208
|
title: e,
|
|
1196
|
-
description:
|
|
1197
|
-
imageProps:
|
|
1209
|
+
description: n,
|
|
1210
|
+
imageProps: r = {},
|
|
1198
1211
|
imageMeta: o,
|
|
1199
1212
|
imageSize: a,
|
|
1200
1213
|
titleProps: d = {},
|
|
@@ -1210,7 +1223,7 @@ function Xe({
|
|
|
1210
1223
|
className: "card-article",
|
|
1211
1224
|
...m,
|
|
1212
1225
|
prepend: /* @__PURE__ */ i("div", { className: "card__image__wrap", children: p && t ? /* @__PURE__ */ i(
|
|
1213
|
-
|
|
1226
|
+
y,
|
|
1214
1227
|
{
|
|
1215
1228
|
sx: {
|
|
1216
1229
|
position: "absolute",
|
|
@@ -1225,13 +1238,13 @@ function Xe({
|
|
|
1225
1238
|
children: /* @__PURE__ */ i(B, { icon: t, color: "primary.main" })
|
|
1226
1239
|
}
|
|
1227
1240
|
) : h && /* @__PURE__ */ i(
|
|
1228
|
-
|
|
1241
|
+
y,
|
|
1229
1242
|
{
|
|
1230
1243
|
component: "img",
|
|
1231
1244
|
className: "card__image",
|
|
1232
1245
|
src: h,
|
|
1233
|
-
...
|
|
1234
|
-
alt:
|
|
1246
|
+
...r,
|
|
1247
|
+
alt: r.alt || (o == null ? void 0 : o.filename) || "card-image",
|
|
1235
1248
|
width: o == null ? void 0 : o.naturalWidth,
|
|
1236
1249
|
height: o == null ? void 0 : o.naturalHeight,
|
|
1237
1250
|
style: { width: "100%", height: "100%", objectFit: a || "contain", objectPosition: "center" },
|
|
@@ -1239,13 +1252,13 @@ function Xe({
|
|
|
1239
1252
|
}
|
|
1240
1253
|
) }),
|
|
1241
1254
|
children: [
|
|
1242
|
-
e ||
|
|
1255
|
+
e || n ? /* @__PURE__ */ i(
|
|
1243
1256
|
D,
|
|
1244
1257
|
{
|
|
1245
1258
|
align: c,
|
|
1246
1259
|
title: e,
|
|
1247
1260
|
titleProps: d,
|
|
1248
|
-
description:
|
|
1261
|
+
description: n,
|
|
1249
1262
|
descriptionProps: s
|
|
1250
1263
|
}
|
|
1251
1264
|
) : null,
|
|
@@ -1282,17 +1295,17 @@ const qe = _(V)`
|
|
|
1282
1295
|
function Qe({
|
|
1283
1296
|
title: t,
|
|
1284
1297
|
image: e,
|
|
1285
|
-
imageMeta:
|
|
1286
|
-
iconSize:
|
|
1298
|
+
imageMeta: n,
|
|
1299
|
+
iconSize: r = 100,
|
|
1287
1300
|
description: o,
|
|
1288
1301
|
actions: a,
|
|
1289
1302
|
align: d,
|
|
1290
1303
|
className: s = "",
|
|
1291
1304
|
...l
|
|
1292
1305
|
}) {
|
|
1293
|
-
return /* @__PURE__ */ i(Ze, { className: g("card", s), ...l, children: /* @__PURE__ */ w(
|
|
1294
|
-
e && /* @__PURE__ */ i(B, { icon: e, color: "primary.main", size:
|
|
1295
|
-
/* @__PURE__ */ w(
|
|
1306
|
+
return /* @__PURE__ */ i(Ze, { className: g("card", s), ...l, children: /* @__PURE__ */ w(y, { className: "flex items-center", children: [
|
|
1307
|
+
e && /* @__PURE__ */ i(B, { icon: e, color: "primary.main", size: r, imageMeta: n }),
|
|
1308
|
+
/* @__PURE__ */ w(y, { className: "flex-1 ml-4", children: [
|
|
1296
1309
|
/* @__PURE__ */ i(D, { align: d, title: t, description: o }),
|
|
1297
1310
|
/* @__PURE__ */ i(z, { align: d, actions: a, className: "mt-4" })
|
|
1298
1311
|
] })
|
|
@@ -1322,11 +1335,13 @@ const Ze = _(V)`
|
|
|
1322
1335
|
.card__title {
|
|
1323
1336
|
font-weight: 700;
|
|
1324
1337
|
margin-bottom: 12px;
|
|
1338
|
+
color: ${({ theme: t }) => t.palette.text.primary};
|
|
1325
1339
|
a {
|
|
1326
1340
|
color: ${({ theme: t }) => t.palette.primary.main};
|
|
1327
1341
|
}
|
|
1328
1342
|
}
|
|
1329
1343
|
.card__description {
|
|
1344
|
+
color: ${({ theme: t }) => t.palette.text.primary};
|
|
1330
1345
|
a {
|
|
1331
1346
|
color: ${({ theme: t }) => t.palette.primary.main};
|
|
1332
1347
|
}
|
|
@@ -1358,8 +1373,8 @@ const Ze = _(V)`
|
|
|
1358
1373
|
function to({
|
|
1359
1374
|
title: t,
|
|
1360
1375
|
titleProps: e = {},
|
|
1361
|
-
description:
|
|
1362
|
-
descriptionProps:
|
|
1376
|
+
description: n,
|
|
1377
|
+
descriptionProps: r = {},
|
|
1363
1378
|
image: o,
|
|
1364
1379
|
imageMeta: a,
|
|
1365
1380
|
className: d = "",
|
|
@@ -1369,20 +1384,31 @@ function to({
|
|
|
1369
1384
|
}) {
|
|
1370
1385
|
return /* @__PURE__ */ w(eo, { className: g("card-simple", d, `hover-style__${l}`), align: s, ...c, children: [
|
|
1371
1386
|
o && /* @__PURE__ */ i(B, { icon: o, color: "primary.main", imageMeta: a }),
|
|
1372
|
-
t ||
|
|
1387
|
+
t || n ? /* @__PURE__ */ i(
|
|
1373
1388
|
D,
|
|
1374
1389
|
{
|
|
1375
1390
|
align: s,
|
|
1376
1391
|
title: t,
|
|
1377
1392
|
titleProps: e,
|
|
1378
|
-
description:
|
|
1379
|
-
descriptionProps:
|
|
1393
|
+
description: n,
|
|
1394
|
+
descriptionProps: r
|
|
1380
1395
|
}
|
|
1381
1396
|
) : null
|
|
1382
1397
|
] });
|
|
1383
1398
|
}
|
|
1384
1399
|
const eo = _(V)`
|
|
1385
|
-
|
|
1400
|
+
.card__title {
|
|
1401
|
+
color: ${({ theme: t }) => t.palette.text.primary};
|
|
1402
|
+
a {
|
|
1403
|
+
color: ${({ theme: t }) => t.palette.primary.main};
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
.card__description {
|
|
1407
|
+
color: ${({ theme: t }) => t.palette.text.primary};
|
|
1408
|
+
a {
|
|
1409
|
+
color: ${({ theme: t }) => t.palette.primary.main};
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1386
1412
|
|
|
1387
1413
|
&.hover-style__default {
|
|
1388
1414
|
&.card-simple {
|
|
@@ -1468,20 +1494,20 @@ const eo = _(V)`
|
|
|
1468
1494
|
}
|
|
1469
1495
|
`;
|
|
1470
1496
|
function oo({ type: t = "default", ...e }) {
|
|
1471
|
-
const
|
|
1497
|
+
const r = {
|
|
1472
1498
|
article: Me,
|
|
1473
1499
|
simple: to,
|
|
1474
1500
|
news: Qe,
|
|
1475
1501
|
default: ut,
|
|
1476
1502
|
wall: Xe
|
|
1477
1503
|
}[t] || ut;
|
|
1478
|
-
return /* @__PURE__ */ i(
|
|
1504
|
+
return /* @__PURE__ */ i(r, { ...t === "news" ? e : S(e, "iconSize") });
|
|
1479
1505
|
}
|
|
1480
|
-
function
|
|
1506
|
+
function ro({
|
|
1481
1507
|
list: t = [],
|
|
1482
1508
|
align: e = "top",
|
|
1483
|
-
cards:
|
|
1484
|
-
listBorder:
|
|
1509
|
+
cards: n,
|
|
1510
|
+
listBorder: r = !0,
|
|
1485
1511
|
listType: o = "",
|
|
1486
1512
|
col: a = 3,
|
|
1487
1513
|
gap: d,
|
|
@@ -1494,7 +1520,7 @@ function no({
|
|
|
1494
1520
|
...u
|
|
1495
1521
|
}) {
|
|
1496
1522
|
return /* @__PURE__ */ i(
|
|
1497
|
-
|
|
1523
|
+
nt,
|
|
1498
1524
|
{
|
|
1499
1525
|
type: c,
|
|
1500
1526
|
className: g("card-list py-1", l, "items-stretch"),
|
|
@@ -1502,10 +1528,10 @@ function no({
|
|
|
1502
1528
|
gap: d,
|
|
1503
1529
|
align: e,
|
|
1504
1530
|
...u,
|
|
1505
|
-
children:
|
|
1531
|
+
children: n || t.map((f) => /* @__PURE__ */ i(
|
|
1506
1532
|
oo,
|
|
1507
1533
|
{
|
|
1508
|
-
borderColor:
|
|
1534
|
+
borderColor: r,
|
|
1509
1535
|
iconColor: s,
|
|
1510
1536
|
type: c,
|
|
1511
1537
|
listType: o,
|
|
@@ -1523,7 +1549,7 @@ function no({
|
|
|
1523
1549
|
}
|
|
1524
1550
|
);
|
|
1525
1551
|
}
|
|
1526
|
-
const
|
|
1552
|
+
const no = [
|
|
1527
1553
|
"align",
|
|
1528
1554
|
"cards",
|
|
1529
1555
|
"list",
|
|
@@ -1551,10 +1577,10 @@ const ro = [
|
|
|
1551
1577
|
}
|
|
1552
1578
|
`;
|
|
1553
1579
|
function ao({ className: t, ...e }) {
|
|
1554
|
-
const [
|
|
1580
|
+
const [n, r] = $(e, A), [o, a] = $(r, no);
|
|
1555
1581
|
return /* @__PURE__ */ w(io, { className: g("section--card-list", t), type: e.type, ...a, children: [
|
|
1556
|
-
Object.keys(
|
|
1557
|
-
/* @__PURE__ */ i(
|
|
1582
|
+
Object.keys(n).length > 0 && /* @__PURE__ */ i(O, { center: !0, ...n, className: "mb-[2.5vw]" }),
|
|
1583
|
+
/* @__PURE__ */ i(ro, { ...o, dark: !!e.dark })
|
|
1558
1584
|
] });
|
|
1559
1585
|
}
|
|
1560
1586
|
const so = _(ao)`
|
|
@@ -1574,31 +1600,31 @@ const so = _(ao)`
|
|
|
1574
1600
|
}
|
|
1575
1601
|
`;
|
|
1576
1602
|
function lo({ section: t, ...e }) {
|
|
1577
|
-
const [{ editing:
|
|
1603
|
+
const [{ editing: n }, r] = $(e, U), o = W(() => {
|
|
1578
1604
|
var a;
|
|
1579
1605
|
return {
|
|
1580
|
-
...S(
|
|
1581
|
-
list: (a =
|
|
1606
|
+
...S(r, ["listBorder", "list", "iconSize", "imageSize"]),
|
|
1607
|
+
list: (a = r.list) == null ? void 0 : a.map((d) => {
|
|
1582
1608
|
var s, l;
|
|
1583
1609
|
return {
|
|
1584
1610
|
...S(d, "icon", "iconColor"),
|
|
1585
|
-
image: ["news", "simple", "default"].includes(
|
|
1586
|
-
actions: (l = (s = d.actions) == null ? void 0 : s.map) == null ? void 0 : l.call(s, (c) => /* @__PURE__ */ i(zt, { ...c, editing:
|
|
1587
|
-
border:
|
|
1588
|
-
iconSize:
|
|
1589
|
-
imageSize:
|
|
1590
|
-
hoverStyle:
|
|
1611
|
+
image: ["news", "simple", "default"].includes(r.type) && d.icon ? d.icon : d.image,
|
|
1612
|
+
actions: (l = (s = d.actions) == null ? void 0 : s.map) == null ? void 0 : l.call(s, (c) => /* @__PURE__ */ i(zt, { ...c, editing: n }, c.id)),
|
|
1613
|
+
border: r.listBorder,
|
|
1614
|
+
iconSize: r.iconSize,
|
|
1615
|
+
imageSize: r.imageSize,
|
|
1616
|
+
hoverStyle: r.hoverStyle
|
|
1591
1617
|
};
|
|
1592
1618
|
})
|
|
1593
1619
|
};
|
|
1594
|
-
}, [
|
|
1595
|
-
return /* @__PURE__ */ i(so, { style:
|
|
1620
|
+
}, [r]);
|
|
1621
|
+
return /* @__PURE__ */ i(so, { style: n ? { pointerEvents: "none" } : {}, ...o });
|
|
1596
1622
|
}
|
|
1597
1623
|
function co({
|
|
1598
1624
|
properties: t,
|
|
1599
1625
|
section: e,
|
|
1600
|
-
locale:
|
|
1601
|
-
dev:
|
|
1626
|
+
locale: n,
|
|
1627
|
+
dev: r
|
|
1602
1628
|
}) {
|
|
1603
1629
|
var o;
|
|
1604
1630
|
return (o = e == null ? void 0 : e.config) != null && o.componentId ? /* @__PURE__ */ i(
|
|
@@ -1609,37 +1635,37 @@ function co({
|
|
|
1609
1635
|
blockletId: e.config.blockletId,
|
|
1610
1636
|
blockletTitle: e.config.blockletTitle,
|
|
1611
1637
|
componentName: e.config.componentName,
|
|
1612
|
-
locale:
|
|
1638
|
+
locale: n,
|
|
1613
1639
|
properties: t,
|
|
1614
|
-
dev:
|
|
1640
|
+
dev: r
|
|
1615
1641
|
}
|
|
1616
|
-
) : /* @__PURE__ */ i(
|
|
1642
|
+
) : /* @__PURE__ */ i(y, { textAlign: "center", py: 2, children: /* @__PURE__ */ i(C, { variant: "caption", color: "text.secondary", children: "Please select component to render" }) });
|
|
1617
1643
|
}
|
|
1618
1644
|
function mo({
|
|
1619
1645
|
src: t,
|
|
1620
1646
|
dataId: e,
|
|
1621
|
-
isEdit:
|
|
1622
|
-
height:
|
|
1647
|
+
isEdit: n = !1,
|
|
1648
|
+
height: r = "100%",
|
|
1623
1649
|
onLoad: o = () => {
|
|
1624
1650
|
}
|
|
1625
1651
|
}) {
|
|
1626
1652
|
return /* @__PURE__ */ i(
|
|
1627
1653
|
ue,
|
|
1628
1654
|
{
|
|
1629
|
-
isEdit:
|
|
1655
|
+
isEdit: n,
|
|
1630
1656
|
embedId: e,
|
|
1631
1657
|
src: t,
|
|
1632
|
-
height:
|
|
1658
|
+
height: r,
|
|
1633
1659
|
onLoad: () => {
|
|
1634
1660
|
o();
|
|
1635
1661
|
}
|
|
1636
1662
|
}
|
|
1637
1663
|
);
|
|
1638
1664
|
}
|
|
1639
|
-
function po({ dataId: t, src: e, actions:
|
|
1665
|
+
function po({ dataId: t, src: e, actions: n, center: r, onLoad: o, ...a }) {
|
|
1640
1666
|
const [d, s] = $(a, A);
|
|
1641
1667
|
return /* @__PURE__ */ w(F, { ...s, children: [
|
|
1642
|
-
Object.keys(d).length > 0 && /* @__PURE__ */ i(O, { center:
|
|
1668
|
+
Object.keys(d).length > 0 && /* @__PURE__ */ i(O, { center: r, ...d }),
|
|
1643
1669
|
/* @__PURE__ */ i(
|
|
1644
1670
|
mo,
|
|
1645
1671
|
{
|
|
@@ -1649,10 +1675,10 @@ function po({ dataId: t, src: e, actions: r, center: n, onLoad: o, ...a }) {
|
|
|
1649
1675
|
height: a.iframeHeight ? `${a.iframeHeight}px` : "100%"
|
|
1650
1676
|
}
|
|
1651
1677
|
),
|
|
1652
|
-
/* @__PURE__ */ i(z, { actions:
|
|
1678
|
+
/* @__PURE__ */ i(z, { actions: n, center: r })
|
|
1653
1679
|
] });
|
|
1654
1680
|
}
|
|
1655
|
-
const
|
|
1681
|
+
const mr = {
|
|
1656
1682
|
src: "",
|
|
1657
1683
|
embedUrl: "",
|
|
1658
1684
|
title: "",
|
|
@@ -1663,14 +1689,14 @@ const pn = {
|
|
|
1663
1689
|
config: {},
|
|
1664
1690
|
id: ""
|
|
1665
1691
|
};
|
|
1666
|
-
function uo({ section: t, id: e, src:
|
|
1667
|
-
const o = `${e}-${
|
|
1692
|
+
function uo({ section: t, id: e, src: n, ...r }) {
|
|
1693
|
+
const o = `${e}-${r.locale}`, [{ editing: a }, d] = $(r, U), s = tt({}), l = JSON.parse(JSON.stringify(d)), { message: c } = de(o, "server"), m = me(JSON.parse(JSON.stringify(d.config) || "{}"));
|
|
1668
1694
|
return E(() => {
|
|
1669
1695
|
c && c.onInit(() => m.current);
|
|
1670
1696
|
}, [c]), E(() => {
|
|
1671
1697
|
const p = JSON.parse(JSON.stringify(d.config) || "{}");
|
|
1672
1698
|
pe(s.current, p) || (s.current = p, c == null || c.send("config-set", p));
|
|
1673
|
-
}, [c, d.config]),
|
|
1699
|
+
}, [c, d.config]), n ? /* @__PURE__ */ i(po, { ...l, dataId: o, src: n, style: a ? { pointerEvents: "none" } : {} }) : /* @__PURE__ */ i(ho, { children: 'Please set the "src" attribute for this block' });
|
|
1674
1700
|
}
|
|
1675
1701
|
const ho = _("div")`
|
|
1676
1702
|
user-select: none;
|
|
@@ -1692,10 +1718,10 @@ const ho = _("div")`
|
|
|
1692
1718
|
function go(t) {
|
|
1693
1719
|
var e;
|
|
1694
1720
|
if (/youtu\.?be/.test(t))
|
|
1695
|
-
for (const
|
|
1696
|
-
const
|
|
1697
|
-
if (
|
|
1698
|
-
return
|
|
1721
|
+
for (const n of fo) {
|
|
1722
|
+
const r = (e = n.exec(t)) == null ? void 0 : e[1];
|
|
1723
|
+
if (r)
|
|
1724
|
+
return r;
|
|
1699
1725
|
}
|
|
1700
1726
|
}
|
|
1701
1727
|
function xo(t) {
|
|
@@ -1703,35 +1729,35 @@ function xo(t) {
|
|
|
1703
1729
|
if (e)
|
|
1704
1730
|
return `https://youtube.com/embed/${e}`;
|
|
1705
1731
|
}
|
|
1706
|
-
function
|
|
1732
|
+
function yo({ src: t }) {
|
|
1707
1733
|
return E(() => {
|
|
1708
1734
|
import("@lottiefiles/lottie-player");
|
|
1709
1735
|
}, []), /* @__PURE__ */ i("lottie-player", { autoplay: !0, loop: !0, mode: "normal", src: t });
|
|
1710
1736
|
}
|
|
1711
|
-
function
|
|
1712
|
-
return /* @__PURE__ */ i(
|
|
1737
|
+
function bo(t) {
|
|
1738
|
+
return /* @__PURE__ */ i(y, { maxHeight: 400, overflow: "hidden auto", children: /* @__PURE__ */ i(he, { ...t }) });
|
|
1713
1739
|
}
|
|
1714
1740
|
function wo({ url: t }) {
|
|
1715
|
-
const e = tt(null),
|
|
1716
|
-
e.current ? e.current.offsetWidth * 0.5625 :
|
|
1741
|
+
const e = tt(null), n = 495, [r, o] = K(
|
|
1742
|
+
e.current ? e.current.offsetWidth * 0.5625 : n
|
|
1717
1743
|
), a = M(() => {
|
|
1718
|
-
const d = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 :
|
|
1744
|
+
const d = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 : n;
|
|
1719
1745
|
return o(Math.floor(s * d));
|
|
1720
1746
|
}, []);
|
|
1721
1747
|
return E(() => {
|
|
1722
1748
|
window.addEventListener("resize", a);
|
|
1723
|
-
const d = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 :
|
|
1749
|
+
const d = window.innerWidth > 990 ? 1 : window.innerWidth > 522 ? 1.2 : window.innerWidth > 400 ? 1.45 : 1.85, s = e.current ? e.current.offsetWidth * 0.5625 : n;
|
|
1724
1750
|
return o(Math.floor(s * d)), function() {
|
|
1725
1751
|
window.removeEventListener("resize", a);
|
|
1726
1752
|
};
|
|
1727
|
-
}, [
|
|
1728
|
-
|
|
1753
|
+
}, [r, a]), /* @__PURE__ */ i(
|
|
1754
|
+
y,
|
|
1729
1755
|
{
|
|
1730
1756
|
component: "iframe",
|
|
1731
1757
|
ref: e,
|
|
1732
1758
|
title: "youtube",
|
|
1733
1759
|
width: "100%",
|
|
1734
|
-
height: `${
|
|
1760
|
+
height: `${r}px`,
|
|
1735
1761
|
src: t,
|
|
1736
1762
|
frameBorder: "0",
|
|
1737
1763
|
allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
|
|
@@ -1740,7 +1766,7 @@ function wo({ url: t }) {
|
|
|
1740
1766
|
}
|
|
1741
1767
|
);
|
|
1742
1768
|
}
|
|
1743
|
-
const
|
|
1769
|
+
const pr = {
|
|
1744
1770
|
image: "https://www.arcblock.io/static/ead0cabde7f2b7ff34db8f3e8ceca271/afc4b/builder.png",
|
|
1745
1771
|
badge: "Develop · Deploy · Run",
|
|
1746
1772
|
title: "The Future is Here: Blockchain and Decentralized Application Development",
|
|
@@ -1758,8 +1784,8 @@ const un = {
|
|
|
1758
1784
|
function ko({
|
|
1759
1785
|
hasImage: t,
|
|
1760
1786
|
fullSizeImage: e,
|
|
1761
|
-
boxed:
|
|
1762
|
-
videoPoster:
|
|
1787
|
+
boxed: n,
|
|
1788
|
+
videoPoster: r,
|
|
1763
1789
|
imageMeta: o,
|
|
1764
1790
|
imageOptimization: a,
|
|
1765
1791
|
imageSize: d,
|
|
@@ -1767,11 +1793,11 @@ function ko({
|
|
|
1767
1793
|
...l
|
|
1768
1794
|
}) {
|
|
1769
1795
|
var u, f;
|
|
1770
|
-
const [{ editing: c }, m] = $({ ...l, boxed: e ? void 0 :
|
|
1771
|
-
let p = _o(m.image,
|
|
1796
|
+
const [{ editing: c }, m] = $({ ...l, boxed: e ? void 0 : n }, U);
|
|
1797
|
+
let p = _o(m.image, r, e, o, a, d);
|
|
1772
1798
|
t || (p = null);
|
|
1773
1799
|
let h = null;
|
|
1774
|
-
return m.actions && (h = (f = (u = m.actions) == null ? void 0 : u.map) == null ? void 0 : f.call(u, (
|
|
1800
|
+
return m.actions && (h = (f = (u = m.actions) == null ? void 0 : u.map) == null ? void 0 : f.call(u, (b, x) => /* @__PURE__ */ i(zt, { ...b, editing: c }, x))), /* @__PURE__ */ i(
|
|
1775
1801
|
vo,
|
|
1776
1802
|
{
|
|
1777
1803
|
...m,
|
|
@@ -1782,16 +1808,16 @@ function ko({
|
|
|
1782
1808
|
}
|
|
1783
1809
|
);
|
|
1784
1810
|
}
|
|
1785
|
-
function _o(t, e,
|
|
1811
|
+
function _o(t, e, n, r, o, a) {
|
|
1786
1812
|
if (t) {
|
|
1787
1813
|
if (t.endsWith(".json"))
|
|
1788
|
-
return /* @__PURE__ */ i(
|
|
1814
|
+
return /* @__PURE__ */ i(yo, { src: t });
|
|
1789
1815
|
if (t.indexOf("twitter.com") !== -1)
|
|
1790
|
-
return /* @__PURE__ */ i(
|
|
1816
|
+
return /* @__PURE__ */ i(bo, { sourceType: "url", url: t });
|
|
1791
1817
|
const d = xo(t);
|
|
1792
1818
|
if (d)
|
|
1793
1819
|
return /* @__PURE__ */ i(wo, { url: d });
|
|
1794
|
-
const { naturalWidth: s, naturalHeight: l, filename: c } =
|
|
1820
|
+
const { naturalWidth: s, naturalHeight: l, filename: c } = r || {};
|
|
1795
1821
|
if (L(t))
|
|
1796
1822
|
return /* @__PURE__ */ i(
|
|
1797
1823
|
"video",
|
|
@@ -1808,7 +1834,7 @@ function _o(t, e, r, n, o, a) {
|
|
|
1808
1834
|
width: "100%",
|
|
1809
1835
|
height: "100%"
|
|
1810
1836
|
},
|
|
1811
|
-
poster: j(N(e),
|
|
1837
|
+
poster: j(N(e), n ? 1200 : 540, o),
|
|
1812
1838
|
children: /* @__PURE__ */ i("source", { src: N(t), type: We(t) })
|
|
1813
1839
|
},
|
|
1814
1840
|
t
|
|
@@ -1822,7 +1848,7 @@ function _o(t, e, r, n, o, a) {
|
|
|
1822
1848
|
sm: 600 * m,
|
|
1823
1849
|
md: 450 * m,
|
|
1824
1850
|
lg: 540 * m,
|
|
1825
|
-
...
|
|
1851
|
+
...n && {
|
|
1826
1852
|
md: 900 * m,
|
|
1827
1853
|
lg: 1200 * m
|
|
1828
1854
|
}
|
|
@@ -1837,33 +1863,33 @@ function _o(t, e, r, n, o, a) {
|
|
|
1837
1863
|
}
|
|
1838
1864
|
return null;
|
|
1839
1865
|
}
|
|
1840
|
-
const
|
|
1841
|
-
function
|
|
1842
|
-
const
|
|
1843
|
-
return et.get(`/api/${ot()}/pages`, { params:
|
|
1866
|
+
const ur = ["production", "draft"];
|
|
1867
|
+
function hr({ mode: t, version: e } = {}) {
|
|
1868
|
+
const n = e && typeof e == "number" ? { mode: t, version: e } : { mode: t };
|
|
1869
|
+
return et.get(`/api/${ot()}/pages`, { params: n }).then((r) => r.data);
|
|
1844
1870
|
}
|
|
1845
|
-
function
|
|
1846
|
-
return et.post(`/api/${ot()}/pages/publish`, { mode: t, routes: e }).then((
|
|
1871
|
+
function fr({ mode: t, routes: e }) {
|
|
1872
|
+
return et.post(`/api/${ot()}/pages/publish`, { mode: t, routes: e }).then((n) => n.data);
|
|
1847
1873
|
}
|
|
1848
1874
|
function $o({
|
|
1849
1875
|
locale: t,
|
|
1850
1876
|
sort: e,
|
|
1851
|
-
page:
|
|
1852
|
-
limit:
|
|
1877
|
+
page: n,
|
|
1878
|
+
limit: r,
|
|
1853
1879
|
mode: o
|
|
1854
1880
|
} = {}) {
|
|
1855
|
-
return et.get(`/api/${ot()}/pages/toc`, { params: { locale: t, sort: e, page:
|
|
1881
|
+
return et.get(`/api/${ot()}/pages/toc`, { params: { locale: t, sort: e, page: n, limit: r, mode: o } }).then((a) => a.data);
|
|
1856
1882
|
}
|
|
1857
|
-
const
|
|
1883
|
+
const gr = {
|
|
1858
1884
|
style: "list",
|
|
1859
1885
|
sort: "-updatedAt"
|
|
1860
1886
|
}, ft = 20;
|
|
1861
|
-
function No({ style: t, sort: e, section:
|
|
1862
|
-
const [{ editing: o, locale: a }, d] = $(
|
|
1887
|
+
function No({ style: t, sort: e, section: n, ...r }) {
|
|
1888
|
+
const [{ editing: o, locale: a }, d] = $(r, U), [s, l] = $(d, A), [c, m] = K(), p = tt(!1), h = fe(), u = ae(), f = M(async () => {
|
|
1863
1889
|
if (!p.current) {
|
|
1864
1890
|
p.current = !0, h();
|
|
1865
1891
|
try {
|
|
1866
|
-
const
|
|
1892
|
+
const b = c ? Math.floor(c.list.length / ft) + 1 : 1, { list: x, total: k } = await $o({ locale: a, sort: e, page: b, limit: ft });
|
|
1867
1893
|
m((v) => ({
|
|
1868
1894
|
list: ((v == null ? void 0 : v.list) ?? []).concat(x),
|
|
1869
1895
|
total: k
|
|
@@ -1878,31 +1904,31 @@ function No({ style: t, sort: e, section: r, ...n }) {
|
|
|
1878
1904
|
}), /* @__PURE__ */ w(F, { ...l, sx: o ? { pointerEvents: "none" } : {}, children: [
|
|
1879
1905
|
Object.keys(s).length > 0 && /* @__PURE__ */ i(O, { ...s }),
|
|
1880
1906
|
c ? /* @__PURE__ */ w(J, { children: [
|
|
1881
|
-
/* @__PURE__ */ i(st, { container: !0, spacing: 2, justifyContent: "center", children: c == null ? void 0 : c.list.map((
|
|
1907
|
+
/* @__PURE__ */ i(st, { container: !0, spacing: 2, justifyContent: "center", children: c == null ? void 0 : c.list.map((b) => /* @__PURE__ */ i(st, { item: !0, xs: 12, sm: t === "card" ? 6 : 12, md: t === "card" ? 3 : 12, children: /* @__PURE__ */ w(
|
|
1882
1908
|
So,
|
|
1883
1909
|
{
|
|
1884
1910
|
elevation: 0,
|
|
1885
1911
|
className: g(t === "card" && "style-card"),
|
|
1886
|
-
onClick: o ? void 0 : () => u(
|
|
1912
|
+
onClick: o ? void 0 : () => u(b.slug),
|
|
1887
1913
|
children: [
|
|
1888
|
-
!!
|
|
1914
|
+
!!b.image && /* @__PURE__ */ i(
|
|
1889
1915
|
Ht,
|
|
1890
1916
|
{
|
|
1891
1917
|
component: "img",
|
|
1892
1918
|
alt: "",
|
|
1893
|
-
image: j(N(
|
|
1919
|
+
image: j(N(b.image), 540),
|
|
1894
1920
|
loading: "lazy"
|
|
1895
1921
|
}
|
|
1896
1922
|
),
|
|
1897
1923
|
/* @__PURE__ */ w(Yt, { children: [
|
|
1898
|
-
/* @__PURE__ */ i(C, { variant: "h6", component: "div", className: gt, children:
|
|
1899
|
-
/* @__PURE__ */ i(C, { variant: "body2", className: gt, children:
|
|
1924
|
+
/* @__PURE__ */ i(C, { variant: "h6", component: "div", className: gt, children: b.title || b.id }),
|
|
1925
|
+
/* @__PURE__ */ i(C, { variant: "body2", className: gt, children: b.description })
|
|
1900
1926
|
] })
|
|
1901
1927
|
]
|
|
1902
1928
|
}
|
|
1903
|
-
) },
|
|
1904
|
-
/* @__PURE__ */ i(
|
|
1905
|
-
] }) : /* @__PURE__ */ i(
|
|
1929
|
+
) }, b.id)) }),
|
|
1930
|
+
/* @__PURE__ */ i(y, { textAlign: "center", mt: 2, children: c.total > c.list.length ? /* @__PURE__ */ i(T, { variant: "outlined", color: "secondary", onClick: f, loading: p.current, children: "More" }) : /* @__PURE__ */ i(T, { variant: "outlined", color: "secondary", disabled: !0, children: "No More" }) })
|
|
1931
|
+
] }) : /* @__PURE__ */ i(y, { p: 2, textAlign: "center", children: /* @__PURE__ */ i(Dt, { size: 24 }) })
|
|
1906
1932
|
] });
|
|
1907
1933
|
}
|
|
1908
1934
|
const gt = q`
|
|
@@ -1939,30 +1965,30 @@ const gt = q`
|
|
|
1939
1965
|
"ai-runtime": Ae,
|
|
1940
1966
|
"custom-component": co
|
|
1941
1967
|
};
|
|
1942
|
-
function
|
|
1968
|
+
function xr({ id: t, type: e, mode: n, config: r, section: o, ...a }) {
|
|
1943
1969
|
const d = Co[e], { getPageMetaStyle: s } = Se(), l = W(() => {
|
|
1944
|
-
const { height: p, ...h } =
|
|
1970
|
+
const { height: p, ...h } = r;
|
|
1945
1971
|
return h;
|
|
1946
|
-
}, [
|
|
1972
|
+
}, [r]), c = W(() => {
|
|
1947
1973
|
const p = {};
|
|
1948
|
-
return e !== "custom-component" && (p.height =
|
|
1949
|
-
}, [
|
|
1974
|
+
return e !== "custom-component" && (p.height = r.height), p.sx = s("sx"), p;
|
|
1975
|
+
}, [r.height, e, s]), m = d && /* @__PURE__ */ i(d, { mode: n, ...l, id: t, section: o });
|
|
1950
1976
|
return /* @__PURE__ */ i(Ee, { ...a, ...c, children: m });
|
|
1951
1977
|
}
|
|
1952
|
-
function
|
|
1978
|
+
function yr(t) {
|
|
1953
1979
|
return t != null;
|
|
1954
1980
|
}
|
|
1955
1981
|
export {
|
|
1956
1982
|
zt as A,
|
|
1957
|
-
|
|
1983
|
+
xr as B,
|
|
1958
1984
|
It as I,
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1985
|
+
cr as P,
|
|
1986
|
+
ur as S,
|
|
1987
|
+
gr as T,
|
|
1988
|
+
lr as a,
|
|
1989
|
+
pr as b,
|
|
1990
|
+
mr as c,
|
|
1991
|
+
hr as g,
|
|
1992
|
+
yr as n,
|
|
1993
|
+
fr as p
|
|
1968
1994
|
};
|