@blocklet/list 0.16.57 → 0.16.58
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/index.es.js +440 -424
- package/package.json +4 -3
package/lib/index.es.js
CHANGED
|
@@ -1,75 +1,76 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as u, Fragment as F } from "react/jsx-runtime";
|
|
2
2
|
import { styled as Q, useTheme as we } from "@arcblock/ux/lib/Theme";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { pick as
|
|
3
|
+
import tt from "@mui/material/styles/createTheme";
|
|
4
|
+
import rt from "@mui/material/styles/ThemeProvider";
|
|
5
|
+
import { pick as ot, omitBy as se, orderBy as nt, isEmpty as it, merge as lt } from "lodash-es";
|
|
6
6
|
import { ErrorFallback as be } from "@arcblock/ux/lib/ErrorBoundary";
|
|
7
7
|
import w from "@mui/material/Box";
|
|
8
8
|
import O from "@mui/material/Stack";
|
|
9
|
-
import { createContext as _e, useState as E, useMemo as G, useContext as Me, useCallback as ge, useEffect as q, forwardRef as
|
|
10
|
-
import { ErrorBoundary as
|
|
11
|
-
import
|
|
9
|
+
import { createContext as _e, useState as E, useMemo as G, useContext as Me, useCallback as ge, useEffect as q, forwardRef as at, useRef as re, memo as st } from "react";
|
|
10
|
+
import { ErrorBoundary as ct } from "react-error-boundary";
|
|
11
|
+
import dt from "@iconify-icons/tabler/compass";
|
|
12
12
|
import { Icon as M } from "@iconify/react";
|
|
13
13
|
import ze from "@mui/icons-material/Close";
|
|
14
14
|
import v from "@mui/material/Typography";
|
|
15
15
|
import { createAxios as Fe } from "@blocklet/js-sdk";
|
|
16
|
-
import { useRequest as
|
|
16
|
+
import { useRequest as ne, useDebounceFn as Ne, useInfiniteScroll as ht, useReactive as ut } from "ahooks";
|
|
17
17
|
import "color";
|
|
18
|
-
import { parseURL as
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
18
|
+
import { parseURL as pt, parseQuery as mt, parseFilename as ft, stringifyParsedURL as gt, withQuery as ke, joinURL as Ie } from "ufo";
|
|
19
|
+
import Be from "flat";
|
|
20
|
+
import ie from "@mui/material/Button";
|
|
21
|
+
import yt from "@mui/material/styles/useTheme";
|
|
22
22
|
import V from "@mui/material/useMediaQuery";
|
|
23
|
-
import
|
|
24
|
-
import
|
|
23
|
+
import xt from "@mui/material/Drawer";
|
|
24
|
+
import De from "@mui/material/Checkbox";
|
|
25
25
|
import We from "@mui/material/FormControlLabel";
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
26
|
+
import wt from "@mui/icons-material/Check";
|
|
27
|
+
import bt from "@mui/icons-material/KeyboardArrowDown";
|
|
28
|
+
import kt from "@mui/material/ClickAwayListener";
|
|
29
|
+
import vt from "@mui/material/Grow";
|
|
30
30
|
import $e from "@mui/material/MenuItem";
|
|
31
31
|
import je from "@mui/material/MenuList";
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
32
|
+
import Ct from "@mui/material/Paper";
|
|
33
|
+
import St from "@mui/material/Popper";
|
|
34
|
+
import It from "@mui/material/SvgIcon";
|
|
35
|
+
import le from "@mui/material/CircularProgress";
|
|
36
36
|
import He from "@arcblock/ux/lib/Avatar";
|
|
37
|
-
import
|
|
37
|
+
import Bt from "@iconify-icons/tabler/cloud-download";
|
|
38
38
|
import Rt from "@mui/icons-material/ChevronLeft";
|
|
39
|
-
import
|
|
39
|
+
import Tt from "@mui/icons-material/ChevronRight";
|
|
40
40
|
import _ from "@mui/material/Skeleton";
|
|
41
|
-
import
|
|
41
|
+
import Pt from "react-image-gallery";
|
|
42
42
|
import "react-image-gallery/styles/css/image-gallery.css";
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
43
|
+
import Re from "@mui/material/Grid";
|
|
44
|
+
import At from "react-infinite-scroll-hook";
|
|
45
|
+
import Et from "@iconify-icons/tabler/square";
|
|
46
|
+
import Ot from "@iconify-icons/tabler/square-check-filled";
|
|
47
47
|
import Te from "@mui/material/Chip";
|
|
48
|
-
import { useTheme as
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
48
|
+
import { useTheme as Lt } from "@mui/material/styles";
|
|
49
|
+
import ce from "@iconify-icons/tabler/search";
|
|
50
|
+
import _t from "@iconify-icons/tabler/x";
|
|
51
|
+
import Mt from "@mui/material/Autocomplete";
|
|
52
|
+
import zt from "@mui/material/Dialog";
|
|
53
53
|
import Ue from "@mui/material/OutlinedInput";
|
|
54
|
-
import
|
|
55
|
-
import { useHotkeys as
|
|
54
|
+
import Ft from "@mui/material/TextField";
|
|
55
|
+
import { useHotkeys as Nt } from "react-hotkeys-hook";
|
|
56
56
|
import Dt from "@mui/icons-material/Search";
|
|
57
57
|
import Pe from "@mui/material/InputAdornment";
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import {
|
|
62
|
-
import
|
|
58
|
+
import Wt from "@arcblock/ux/lib/Empty";
|
|
59
|
+
import $t from "json-stable-stringify";
|
|
60
|
+
import jt from "@mui/icons-material/Menu";
|
|
61
|
+
import { Box as te, Card as Ht, Skeleton as L } from "@mui/material";
|
|
62
|
+
import Ut from "@arcblock/react-hooks/lib/useBrowser";
|
|
63
|
+
import Vt from "@arcblock/ux/lib/Img";
|
|
63
64
|
const Ve = _e({
|
|
64
65
|
open: !1,
|
|
65
66
|
toggleOpen: (e) => {
|
|
66
67
|
}
|
|
67
68
|
});
|
|
68
|
-
function
|
|
69
|
+
function Gt({ children: e }) {
|
|
69
70
|
const [r, o] = E(!1), n = (a) => {
|
|
70
71
|
o(a ?? !a);
|
|
71
|
-
},
|
|
72
|
-
return /* @__PURE__ */ t(Ve.Provider, { value:
|
|
72
|
+
}, i = G(() => ({ open: r, toggleOpen: n }), [r]);
|
|
73
|
+
return /* @__PURE__ */ t(Ve.Provider, { value: i, children: e });
|
|
73
74
|
}
|
|
74
75
|
function ve() {
|
|
75
76
|
return Me(Ve);
|
|
@@ -88,19 +89,19 @@ const P = {
|
|
|
88
89
|
explorePath: "/api/blocklets/explore",
|
|
89
90
|
exploreDidsPath: "/api/blocklets/dids",
|
|
90
91
|
cacheSize: 100
|
|
91
|
-
},
|
|
92
|
+
}, qt = (e) => ne(
|
|
92
93
|
async () => {
|
|
93
94
|
const { data: r } = await e.get(P.categoriesPath);
|
|
94
95
|
return Array.isArray(r) ? r : [];
|
|
95
96
|
},
|
|
96
97
|
{ manual: !0 }
|
|
97
98
|
);
|
|
98
|
-
function
|
|
99
|
+
function Kt(e, r) {
|
|
99
100
|
const o = e.menu ? {
|
|
100
101
|
sortBy: "popularity",
|
|
101
102
|
sortDirection: "desc",
|
|
102
103
|
showResources: "true",
|
|
103
|
-
...
|
|
104
|
+
...ot(e, ["sortBy", "sortDirection", "showResources"])
|
|
104
105
|
} : {
|
|
105
106
|
sortBy: "popularity",
|
|
106
107
|
sortDirection: "desc",
|
|
@@ -109,52 +110,52 @@ function Gt(e, r) {
|
|
|
109
110
|
menu: void 0
|
|
110
111
|
}, {
|
|
111
112
|
onFilterChange: n,
|
|
112
|
-
onSearchSelect:
|
|
113
|
-
r.onFilterChange({ ...o, keyword:
|
|
113
|
+
onSearchSelect: i = (l) => {
|
|
114
|
+
r.onFilterChange({ ...o, keyword: l.title });
|
|
114
115
|
},
|
|
115
116
|
emptyCategory: a
|
|
116
117
|
} = r;
|
|
117
118
|
!o.category && !a && (o.category = "All");
|
|
118
|
-
const s = (
|
|
119
|
-
const m = { ...o, ...
|
|
120
|
-
n(
|
|
119
|
+
const s = (l) => {
|
|
120
|
+
const m = { ...o, ...l };
|
|
121
|
+
n(se(m, (c) => c === "" || c === void 0));
|
|
121
122
|
};
|
|
122
123
|
return {
|
|
123
124
|
filters: e,
|
|
124
|
-
cleanFilter: (
|
|
125
|
-
const m =
|
|
126
|
-
n(
|
|
125
|
+
cleanFilter: (l) => {
|
|
126
|
+
const m = l ? se(o, (c, f) => l.includes(f)) : {};
|
|
127
|
+
n(se(m, (c) => c === "" || c === void 0));
|
|
127
128
|
},
|
|
128
|
-
handleActiveMenu: (
|
|
129
|
-
|
|
129
|
+
handleActiveMenu: (l) => {
|
|
130
|
+
l !== e.menu && n({ menu: l });
|
|
130
131
|
},
|
|
131
|
-
handleSort: (
|
|
132
|
-
s({ sortBy:
|
|
132
|
+
handleSort: (l, m) => {
|
|
133
|
+
s({ sortBy: l, sortDirection: m || l === "nameAsc" ? "asc" : "desc" });
|
|
133
134
|
},
|
|
134
|
-
handleKeyword: (
|
|
135
|
-
s({ category: void 0, keyword:
|
|
135
|
+
handleKeyword: (l) => {
|
|
136
|
+
s({ category: void 0, keyword: l || void 0 });
|
|
136
137
|
},
|
|
137
|
-
handlePrice: (
|
|
138
|
-
s({ price:
|
|
138
|
+
handlePrice: (l) => {
|
|
139
|
+
s({ price: l === e.price ? void 0 : l });
|
|
139
140
|
},
|
|
140
|
-
handleCategory: (
|
|
141
|
-
s({ category:
|
|
141
|
+
handleCategory: (l) => {
|
|
142
|
+
s({ category: l === e.category ? "" : l });
|
|
142
143
|
},
|
|
143
|
-
handleDeveloper: (
|
|
144
|
-
s({ owner:
|
|
144
|
+
handleDeveloper: (l) => {
|
|
145
|
+
s({ owner: l || void 0 });
|
|
145
146
|
},
|
|
146
|
-
handlePage: (
|
|
147
|
-
s({ currentPage:
|
|
147
|
+
handlePage: (l) => {
|
|
148
|
+
s({ currentPage: l });
|
|
148
149
|
},
|
|
149
|
-
handleSwitchShowResources: (
|
|
150
|
-
s({ showResources:
|
|
150
|
+
handleSwitchShowResources: (l) => {
|
|
151
|
+
s({ showResources: l });
|
|
151
152
|
},
|
|
152
|
-
handleSearchSelect: (
|
|
153
|
-
l
|
|
153
|
+
handleSearchSelect: (l) => {
|
|
154
|
+
i(l);
|
|
154
155
|
}
|
|
155
156
|
};
|
|
156
157
|
}
|
|
157
|
-
const
|
|
158
|
+
const Xt = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
158
159
|
{
|
|
159
160
|
name: e("sort.popularity"),
|
|
160
161
|
value: "popularity"
|
|
@@ -168,28 +169,28 @@ const qt = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
|
168
169
|
// value: 'rating',
|
|
169
170
|
// },
|
|
170
171
|
], qe = (e, r, o) => {
|
|
171
|
-
var
|
|
172
|
-
const n =
|
|
173
|
-
if ((
|
|
174
|
-
return
|
|
175
|
-
if (
|
|
172
|
+
var c, f;
|
|
173
|
+
const n = pt(e), i = mt(n.search);
|
|
174
|
+
if ((c = ft(e, { strict: !0 })) == null ? void 0 : c.endsWith(".gif"))
|
|
175
|
+
return i.imageFilter ? gt({ ...n, search: "" }) : e;
|
|
176
|
+
if (i.imageFilter)
|
|
176
177
|
return e;
|
|
177
|
-
const s = o || ((f = window.blocklet) == null ? void 0 : f.version), { w:
|
|
178
|
+
const s = o || ((f = window.blocklet) == null ? void 0 : f.version), { w: l, h: m } = typeof r == "object" ? { w: r.w, h: r.h } : { w: r, h: r };
|
|
178
179
|
return ke(e, {
|
|
179
|
-
...
|
|
180
|
+
...l || m ? { imageFilter: "resize", w: l, h: m } : {},
|
|
180
181
|
v: s
|
|
181
182
|
});
|
|
182
|
-
},
|
|
183
|
+
}, Qt = (e) => [
|
|
183
184
|
{ name: e("blocklet.free"), value: "free" },
|
|
184
185
|
{ name: e("blocklet.payment"), value: "payment" }
|
|
185
|
-
],
|
|
186
|
+
], Yt = (e = [], r = "en") => e.map((o) => ({ name: o.locales[r] || o.locales.en, value: o._id })), Zt = (e) => {
|
|
186
187
|
var r, o;
|
|
187
188
|
return Array.isArray(e) ? e.map((n) => n.message).join(`
|
|
188
189
|
`) : (o = (r = e.response) == null ? void 0 : r.data) != null && o.error ? e.response.data.error.message || e.response.data.error : e.message || e;
|
|
189
|
-
},
|
|
190
|
+
}, Jt = (e, r) => (
|
|
190
191
|
// eslint-disable-next-line no-prototype-builtins
|
|
191
192
|
e == null ? void 0 : e.replace(/{(\w*)}/g, (o, n) => r.hasOwnProperty(n) ? r[n] : "")
|
|
192
|
-
),
|
|
193
|
+
), er = () => window.innerWidth <= 600, tr = {
|
|
193
194
|
common: {
|
|
194
195
|
title: "Blocklet Store",
|
|
195
196
|
searchStore: "Search Blocklet",
|
|
@@ -241,7 +242,7 @@ const qt = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
|
241
242
|
autocomplete: {
|
|
242
243
|
expandResult: 'View all search results for "{name}"'
|
|
243
244
|
}
|
|
244
|
-
},
|
|
245
|
+
}, rr = {
|
|
245
246
|
common: {
|
|
246
247
|
title: "Blocklet 商店",
|
|
247
248
|
searchStore: "搜索 Blocklet",
|
|
@@ -294,14 +295,14 @@ const qt = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
|
294
295
|
expandResult: "查看 “{name}” 的所有搜索结果"
|
|
295
296
|
}
|
|
296
297
|
}, de = {
|
|
297
|
-
en:
|
|
298
|
-
zh:
|
|
298
|
+
en: Be(tr),
|
|
299
|
+
zh: Be(rr)
|
|
299
300
|
}, Ke = (e, r) => {
|
|
300
301
|
const o = {};
|
|
301
302
|
return e && (o["x-blocklet-server-version"] = e), r && (o["x-blocklet-store-version"] = r), o;
|
|
302
|
-
},
|
|
303
|
+
}, or = (e) => (r, o) => {
|
|
303
304
|
const n = de[e] ? de[e][r] : de.en[r];
|
|
304
|
-
return
|
|
305
|
+
return Jt(n, o) || r;
|
|
305
306
|
}, Xe = {
|
|
306
307
|
errors: {
|
|
307
308
|
fetchCategoriesError: null
|
|
@@ -357,87 +358,87 @@ const qt = (e, r, o) => e && r || !o, Ge = (e) => [
|
|
|
357
358
|
handlePage: () => {
|
|
358
359
|
}
|
|
359
360
|
}
|
|
360
|
-
}, Qe = _e(Xe), { Provider:
|
|
361
|
-
function
|
|
361
|
+
}, Qe = _e(Xe), { Provider: nr, Consumer: Do } = Qe;
|
|
362
|
+
function ir(e) {
|
|
362
363
|
const {
|
|
363
364
|
locale: r = "zh",
|
|
364
365
|
filters: o = {},
|
|
365
366
|
serverVersion: n = "",
|
|
366
|
-
onFilterChange:
|
|
367
|
+
onFilterChange: i = () => {
|
|
367
368
|
},
|
|
368
369
|
minItemWidth: a = 350,
|
|
369
370
|
queryFilter: s = !0,
|
|
370
|
-
layout:
|
|
371
|
+
layout: l = {},
|
|
371
372
|
wrapChildren: m = (T) => T,
|
|
372
|
-
extraFilter:
|
|
373
|
+
extraFilter: c = (T) => T,
|
|
373
374
|
baseSearch: f = !1,
|
|
374
|
-
fetchCategoryDelay:
|
|
375
|
+
fetchCategoryDelay: d = 0,
|
|
375
376
|
showResourcesSwitch: g = !1,
|
|
376
377
|
showCategory: y = !0,
|
|
377
378
|
tagFilters: I = [],
|
|
378
379
|
children: x,
|
|
379
|
-
storeVersion:
|
|
380
|
+
storeVersion: B,
|
|
380
381
|
onSearchSelect: p = () => {
|
|
381
382
|
},
|
|
382
383
|
endpoint: C,
|
|
383
384
|
blockletRender: b,
|
|
384
385
|
compact: k = !1
|
|
385
|
-
} = e, A = Ke(n,
|
|
386
|
+
} = e, A = Ke(n, B), N = G(() => Fe({ baseURL: C, headers: A }), [C]), j = Kt(o, { onFilterChange: i, emptyCategory: !l.showExplore, onSearchSelect: p }), [D, K] = E(""), {
|
|
386
387
|
data: H = [],
|
|
387
|
-
error:
|
|
388
|
+
error: ae,
|
|
388
389
|
loading: Y,
|
|
389
390
|
run: Z
|
|
390
|
-
} =
|
|
391
|
-
const T =
|
|
391
|
+
} = qt(N), U = G(() => {
|
|
392
|
+
const T = nt(H, [($) => $.name], ["asc"]), z = T.findIndex(($) => $.name === "All" || $.locales.en === "All");
|
|
392
393
|
return z > -1 ? [{ ...T[z], _id: "All" }, ...T.slice(0, z), ...T.slice(z + 1)] : T;
|
|
393
|
-
}, [H]), X = ge(
|
|
394
|
+
}, [H]), X = ge(or(r), [r]), h = G(() => Yt(U, r), [U, r]), S = Qt(X), W = {
|
|
394
395
|
search: j,
|
|
395
396
|
compact: k,
|
|
396
|
-
errors: { fetchCategoriesError:
|
|
397
|
+
errors: { fetchCategoriesError: ae },
|
|
397
398
|
loadings: {
|
|
398
399
|
fetchCategoriesLoading: Y
|
|
399
400
|
},
|
|
400
|
-
extraFilter:
|
|
401
|
+
extraFilter: c,
|
|
401
402
|
endpoint: C,
|
|
402
403
|
queryFilter: s,
|
|
403
404
|
layout: {
|
|
404
|
-
showExplore:
|
|
405
|
-
showCategory:
|
|
406
|
-
showTitle:
|
|
407
|
-
showSearch:
|
|
405
|
+
showExplore: l.showExplore ?? !1,
|
|
406
|
+
showCategory: l.showCategory ?? !0,
|
|
407
|
+
showTitle: l.showTitle ?? !0,
|
|
408
|
+
showSearch: l.showSearch ?? !0
|
|
408
409
|
},
|
|
409
410
|
minItemWidth: a,
|
|
410
411
|
wrapChildren: m,
|
|
411
412
|
t: X,
|
|
412
|
-
storeVersion:
|
|
413
|
+
storeVersion: B,
|
|
413
414
|
serverVersion: n,
|
|
414
|
-
selectedCategory: j.filters.category || (
|
|
415
|
+
selectedCategory: j.filters.category || (l.showExplore ? "" : "All"),
|
|
415
416
|
categoryList: U,
|
|
416
417
|
blockletRender: b,
|
|
417
418
|
locale: r,
|
|
418
|
-
categoryOptions:
|
|
419
|
+
categoryOptions: h,
|
|
419
420
|
priceOptions: S,
|
|
420
|
-
storeApi:
|
|
421
|
+
storeApi: N,
|
|
421
422
|
baseSearch: f,
|
|
422
423
|
showResourcesSwitch: g,
|
|
423
424
|
showCategory: y,
|
|
424
425
|
tagFilters: I,
|
|
425
|
-
onFilterChange:
|
|
426
|
+
onFilterChange: i,
|
|
426
427
|
getCategoryLocale: (T) => {
|
|
427
428
|
if (!T) return null;
|
|
428
429
|
const z = H.find(($) => $._id === T || $.locales.en === "All");
|
|
429
430
|
return z ? z.locales[r] || z.locales.en : null;
|
|
430
431
|
},
|
|
431
432
|
get developerName() {
|
|
432
|
-
return
|
|
433
|
+
return D;
|
|
433
434
|
},
|
|
434
435
|
updateDeveloperName: K
|
|
435
436
|
};
|
|
436
437
|
return q(() => {
|
|
437
|
-
setTimeout(Z,
|
|
438
|
-
}, [C, Z,
|
|
438
|
+
setTimeout(Z, d || 0);
|
|
439
|
+
}, [C, Z, d]), /* @__PURE__ */ t(nr, { value: W, children: x });
|
|
439
440
|
}
|
|
440
|
-
function
|
|
441
|
+
function R() {
|
|
441
442
|
const e = Me(Qe);
|
|
442
443
|
return e || Xe;
|
|
443
444
|
}
|
|
@@ -448,7 +449,7 @@ function Ye({
|
|
|
448
449
|
...n
|
|
449
450
|
}) {
|
|
450
451
|
return /* @__PURE__ */ t(
|
|
451
|
-
|
|
452
|
+
ie,
|
|
452
453
|
{
|
|
453
454
|
...n,
|
|
454
455
|
onClick: r,
|
|
@@ -479,39 +480,39 @@ function Ce({
|
|
|
479
480
|
sm: r,
|
|
480
481
|
md: o,
|
|
481
482
|
lg: n,
|
|
482
|
-
xl:
|
|
483
|
+
xl: i,
|
|
483
484
|
exact: a
|
|
484
485
|
}) {
|
|
485
|
-
const s =
|
|
486
|
+
const s = yt(), l = V(s.breakpoints.down("sm")), m = V(s.breakpoints.between("sm", "md")), c = V(s.breakpoints.between("md", "lg")), f = V(s.breakpoints.between("lg", "xl"));
|
|
486
487
|
if (a)
|
|
487
|
-
return
|
|
488
|
-
let
|
|
489
|
-
return
|
|
488
|
+
return l ? e || null : m ? r || null : c ? o || null : f ? n || null : i || null;
|
|
489
|
+
let d = e;
|
|
490
|
+
return l || (d = J(r, d), m) || (d = J(o, d), c) || (d = J(n, d), f) ? d : J(i, d);
|
|
490
491
|
}
|
|
491
|
-
function
|
|
492
|
+
function lr({ children: e }) {
|
|
492
493
|
const { open: r, toggleOpen: o } = ve();
|
|
493
494
|
return /* @__PURE__ */ t(
|
|
494
495
|
Ce,
|
|
495
496
|
{
|
|
496
|
-
xs: /* @__PURE__ */ t(
|
|
497
|
+
xs: /* @__PURE__ */ t(xt, { open: r, onClose: () => o(!1), children: e }),
|
|
497
498
|
md: /* @__PURE__ */ t(w, { children: e })
|
|
498
499
|
}
|
|
499
500
|
);
|
|
500
501
|
}
|
|
501
|
-
const
|
|
502
|
-
|
|
502
|
+
const ar = at(({ loading: e, disabled: r, ...o }, n) => /* @__PURE__ */ t(
|
|
503
|
+
ie,
|
|
503
504
|
{
|
|
504
505
|
ref: n,
|
|
505
506
|
disableElevation: !0,
|
|
506
507
|
disabled: r || e,
|
|
507
508
|
...o,
|
|
508
509
|
sx: [{ borderRadius: "4px" }, ...Array.isArray(o.sx) ? o.sx : [o.sx]],
|
|
509
|
-
startIcon: e && /* @__PURE__ */ t(
|
|
510
|
+
startIcon: e && /* @__PURE__ */ t(le, { size: "1em" })
|
|
510
511
|
}
|
|
511
512
|
));
|
|
512
|
-
function ye({ value: e, options: r, onChange: o, placeholder: n, ...
|
|
513
|
-
var
|
|
514
|
-
const a =
|
|
513
|
+
function ye({ value: e, options: r, onChange: o, placeholder: n, ...i }) {
|
|
514
|
+
var B;
|
|
515
|
+
const a = re(null), s = we(), [l, m] = E(!1), [c, f] = E(e !== null ? e : ""), d = V(s.breakpoints.down("sm"));
|
|
515
516
|
q(() => {
|
|
516
517
|
f(e !== null ? e : "");
|
|
517
518
|
}, [e]);
|
|
@@ -521,36 +522,36 @@ function ye({ value: e, options: r, onChange: o, placeholder: n, ...l }) {
|
|
|
521
522
|
m(!0);
|
|
522
523
|
}, []);
|
|
523
524
|
function I(p) {
|
|
524
|
-
f(p.value), o(p.value),
|
|
525
|
+
f(p.value), o(p.value), d && g();
|
|
525
526
|
}
|
|
526
527
|
function x(p) {
|
|
527
|
-
return p ===
|
|
528
|
+
return p === c;
|
|
528
529
|
}
|
|
529
|
-
return /* @__PURE__ */
|
|
530
|
-
/* @__PURE__ */
|
|
531
|
-
|
|
530
|
+
return /* @__PURE__ */ u(F, { children: [
|
|
531
|
+
/* @__PURE__ */ u(
|
|
532
|
+
sr,
|
|
532
533
|
{
|
|
533
534
|
ref: a,
|
|
534
535
|
onClick: y,
|
|
535
536
|
variant: "outlined",
|
|
536
537
|
size: "medium",
|
|
537
|
-
className: ["my-select__selector",
|
|
538
|
+
className: ["my-select__selector", it(c) ? "" : "my-select__selector--active"].join(" "),
|
|
538
539
|
sx: { minWidth: { xs: "100px", md: "auto" }, color: "text.primary", borderRadius: "8px" },
|
|
539
|
-
...
|
|
540
|
+
...i,
|
|
540
541
|
children: [
|
|
541
|
-
((
|
|
542
|
-
/* @__PURE__ */ t(
|
|
542
|
+
((B = r.find((p) => p.value === c)) == null ? void 0 : B.name) || n,
|
|
543
|
+
/* @__PURE__ */ t(It, { className: "my-select__arrowdown", component: bt, sx: { width: 18, height: 18 } })
|
|
543
544
|
]
|
|
544
545
|
}
|
|
545
546
|
),
|
|
546
|
-
/* @__PURE__ */ t(
|
|
547
|
-
|
|
547
|
+
/* @__PURE__ */ t(St, { open: l, anchorEl: a.current, transition: !0, sx: { zIndex: "9999" }, children: ({ TransitionProps: p, placement: C }) => /* @__PURE__ */ t(
|
|
548
|
+
vt,
|
|
548
549
|
{
|
|
549
550
|
...p,
|
|
550
551
|
style: { transformOrigin: C === "bottom" ? "center top" : "center bottom" },
|
|
551
|
-
children: /* @__PURE__ */ t(
|
|
552
|
+
children: /* @__PURE__ */ t(Ct, { children: /* @__PURE__ */ t(kt, { onClickAway: g, children: /* @__PURE__ */ t(cr, { autoFocusItem: l, onMouseEnter: y, onMouseLeave: g, children: r.map((b) => /* @__PURE__ */ u($e, { onClick: () => I(b), sx: { fontSize: 14 }, children: [
|
|
552
553
|
/* @__PURE__ */ t(
|
|
553
|
-
|
|
554
|
+
wt,
|
|
554
555
|
{
|
|
555
556
|
sx: { mr: 1, fontSize: 16, visibility: x(b.value) ? "visible" : "hidden" }
|
|
556
557
|
}
|
|
@@ -561,7 +562,7 @@ function ye({ value: e, options: r, onChange: o, placeholder: n, ...l }) {
|
|
|
561
562
|
) })
|
|
562
563
|
] });
|
|
563
564
|
}
|
|
564
|
-
const
|
|
565
|
+
const sr = Q(ar)`
|
|
565
566
|
border: 1px solid ${(e) => e.theme.palette.divider};
|
|
566
567
|
padding: 6px 8px 6px 12px;
|
|
567
568
|
font-weight: ${(e) => e.theme.typography.fontWeightRegular};
|
|
@@ -589,7 +590,7 @@ const lr = Q(ir)`
|
|
|
589
590
|
margin-right: 3px;
|
|
590
591
|
}
|
|
591
592
|
}
|
|
592
|
-
`,
|
|
593
|
+
`, cr = Q(je)`
|
|
593
594
|
.my-select__option__icon {
|
|
594
595
|
color: transparent;
|
|
595
596
|
font-size: 14px;
|
|
@@ -607,8 +608,8 @@ const lr = Q(ir)`
|
|
|
607
608
|
}
|
|
608
609
|
`;
|
|
609
610
|
function Ze() {
|
|
610
|
-
const { search: e, t: r } =
|
|
611
|
-
return /* @__PURE__ */
|
|
611
|
+
const { search: e, t: r } = R(), { filters: o, handleSort: n, handlePrice: i } = e, a = Ge(r);
|
|
612
|
+
return /* @__PURE__ */ u(
|
|
612
613
|
O,
|
|
613
614
|
{
|
|
614
615
|
direction: { xs: "row", md: "column" },
|
|
@@ -621,12 +622,12 @@ function Ze() {
|
|
|
621
622
|
We,
|
|
622
623
|
{
|
|
623
624
|
control: /* @__PURE__ */ t(
|
|
624
|
-
|
|
625
|
+
De,
|
|
625
626
|
{
|
|
626
627
|
checked: o.price === "free",
|
|
627
628
|
size: "small",
|
|
628
629
|
sx: { "& .MuiSvgIcon-fontSizeSmall": { fontSize: 16, color: "text.hint" } },
|
|
629
|
-
onChange: (s) =>
|
|
630
|
+
onChange: (s) => i(s.target.checked ? "free" : "")
|
|
630
631
|
}
|
|
631
632
|
),
|
|
632
633
|
label: r("blocklet.free")
|
|
@@ -645,17 +646,17 @@ function Ze() {
|
|
|
645
646
|
}
|
|
646
647
|
);
|
|
647
648
|
}
|
|
648
|
-
function
|
|
649
|
-
const { selectedCategory: r, search: o, t: n, categoryOptions:
|
|
649
|
+
function dr({ menus: e }) {
|
|
650
|
+
const { selectedCategory: r, search: o, t: n, categoryOptions: i, loadings: a, layout: s, baseSearch: l, compact: m } = R(), { filters: c, handleActiveMenu: f, handleCategory: d, cleanFilter: g } = o, { toggleOpen: y } = ve();
|
|
650
651
|
q(() => {
|
|
651
652
|
y(!1);
|
|
652
|
-
}, [Object.values(
|
|
653
|
-
const I =
|
|
654
|
-
return s.showCategory && !m ? /* @__PURE__ */
|
|
653
|
+
}, [Object.values(c).join("")]);
|
|
654
|
+
const I = Xt(l, s.showSearch, c.keyword);
|
|
655
|
+
return s.showCategory && !m ? /* @__PURE__ */ u(lr, { children: [
|
|
655
656
|
/* @__PURE__ */ t(
|
|
656
657
|
Ce,
|
|
657
658
|
{
|
|
658
|
-
xs: /* @__PURE__ */
|
|
659
|
+
xs: /* @__PURE__ */ u(
|
|
659
660
|
O,
|
|
660
661
|
{
|
|
661
662
|
direction: "row",
|
|
@@ -683,16 +684,16 @@ function sr({ menus: e }) {
|
|
|
683
684
|
boxSizing: "content-box",
|
|
684
685
|
p: { xs: 2, md: 0 },
|
|
685
686
|
pr: { md: 6 },
|
|
686
|
-
children: I ? /* @__PURE__ */
|
|
687
|
-
s.showExplore && /* @__PURE__ */
|
|
688
|
-
/* @__PURE__ */
|
|
689
|
-
/* @__PURE__ */ t(M, { icon:
|
|
687
|
+
children: I ? /* @__PURE__ */ u(F, { children: [
|
|
688
|
+
s.showExplore && /* @__PURE__ */ u(w, { mb: 3, pb: 3, borderBottom: 1, borderColor: "divider", children: [
|
|
689
|
+
/* @__PURE__ */ u(w, { display: "flex", alignItems: "center", gap: 1, children: [
|
|
690
|
+
/* @__PURE__ */ t(M, { icon: dt, width: 20, height: 20 }),
|
|
690
691
|
/* @__PURE__ */ t(
|
|
691
692
|
v,
|
|
692
693
|
{
|
|
693
694
|
variant: "body1",
|
|
694
|
-
color: !r && !
|
|
695
|
-
fontWeight: !r && !
|
|
695
|
+
color: !r && !c.menu ? "text.primary" : "grey.400",
|
|
696
|
+
fontWeight: !r && !c.menu ? "fontWeightMedium" : void 0,
|
|
696
697
|
sx: { cursor: "pointer" },
|
|
697
698
|
onClick: () => {
|
|
698
699
|
y(!1), g();
|
|
@@ -701,25 +702,25 @@ function sr({ menus: e }) {
|
|
|
701
702
|
}
|
|
702
703
|
)
|
|
703
704
|
] }),
|
|
704
|
-
e == null ? void 0 : e.map((x) => /* @__PURE__ */
|
|
705
|
+
e == null ? void 0 : e.map((x) => /* @__PURE__ */ u(w, { display: "flex", alignItems: "center", mt: 2, gap: 1, children: [
|
|
705
706
|
typeof x.icon == "string" ? /* @__PURE__ */ t(M, { icon: x.icon, width: 20, height: 20 }) : x.icon,
|
|
706
707
|
/* @__PURE__ */ t(
|
|
707
708
|
v,
|
|
708
709
|
{
|
|
709
710
|
variant: "body1",
|
|
710
|
-
color:
|
|
711
|
-
fontWeight:
|
|
711
|
+
color: c.menu === x.key ? "text.primary" : "grey.400",
|
|
712
|
+
fontWeight: c.menu === x.key ? "fontWeightMedium" : void 0,
|
|
712
713
|
sx: { cursor: "pointer" },
|
|
713
714
|
onClick: () => {
|
|
714
|
-
var
|
|
715
|
-
y(!1), f(x.key), (
|
|
715
|
+
var B;
|
|
716
|
+
y(!1), f(x.key), (B = x.onClick) == null || B.call(x);
|
|
716
717
|
},
|
|
717
718
|
children: x.title
|
|
718
719
|
}
|
|
719
720
|
)
|
|
720
721
|
] }, x.key))
|
|
721
722
|
] }),
|
|
722
|
-
!!
|
|
723
|
+
!!i.length && /* @__PURE__ */ t(O, { gap: 2, children: i.map((x) => /* @__PURE__ */ t(
|
|
723
724
|
v,
|
|
724
725
|
{
|
|
725
726
|
variant: "body1",
|
|
@@ -729,7 +730,7 @@ function sr({ menus: e }) {
|
|
|
729
730
|
color: r === x.value ? "text.primary" : "grey.400",
|
|
730
731
|
textTransform: "capitalize",
|
|
731
732
|
onClick: () => {
|
|
732
|
-
r === x.value ? g() :
|
|
733
|
+
r === x.value ? g() : d(x.value), y(!1);
|
|
733
734
|
},
|
|
734
735
|
children: x.name
|
|
735
736
|
},
|
|
@@ -741,23 +742,23 @@ function sr({ menus: e }) {
|
|
|
741
742
|
] }) : null;
|
|
742
743
|
}
|
|
743
744
|
function Se() {
|
|
744
|
-
const { endpoint: e, serverVersion: r, storeVersion: o } =
|
|
745
|
+
const { endpoint: e, serverVersion: r, storeVersion: o } = R(), n = Ke(r, o), i = G(() => Fe({
|
|
745
746
|
baseURL: e,
|
|
746
747
|
headers: n
|
|
747
748
|
}), [e]);
|
|
748
749
|
return {
|
|
749
750
|
get: async (a) => {
|
|
750
|
-
const { data: s } = await
|
|
751
|
+
const { data: s } = await i.get(a);
|
|
751
752
|
return s;
|
|
752
753
|
},
|
|
753
754
|
post: async (a, s) => {
|
|
754
|
-
const { data:
|
|
755
|
-
return
|
|
755
|
+
const { data: l } = await i.post(a, s);
|
|
756
|
+
return l;
|
|
756
757
|
}
|
|
757
758
|
};
|
|
758
759
|
}
|
|
759
|
-
const Je =
|
|
760
|
-
return /* @__PURE__ */ t(w, { height: 60, display: "flex", alignItems: "center", justifyContent: "center", ...r, children: /* @__PURE__ */ t(
|
|
760
|
+
const Je = st(function(r) {
|
|
761
|
+
return /* @__PURE__ */ t(w, { height: 60, display: "flex", alignItems: "center", justifyContent: "center", ...r, children: /* @__PURE__ */ t(le, {}) });
|
|
761
762
|
});
|
|
762
763
|
function Ae({
|
|
763
764
|
icon: e,
|
|
@@ -765,7 +766,7 @@ function Ae({
|
|
|
765
766
|
maxWidth: o = 100,
|
|
766
767
|
title: n
|
|
767
768
|
}) {
|
|
768
|
-
return (r === 0 || r) && /* @__PURE__ */
|
|
769
|
+
return (r === 0 || r) && /* @__PURE__ */ u(O, { direction: "row", alignItems: "center", gap: 1, sx: { maxWidth: o, overflow: "hidden" }, children: [
|
|
769
770
|
e,
|
|
770
771
|
/* @__PURE__ */ t(
|
|
771
772
|
v,
|
|
@@ -779,21 +780,21 @@ function Ae({
|
|
|
779
780
|
)
|
|
780
781
|
] });
|
|
781
782
|
}
|
|
782
|
-
const
|
|
783
|
-
function
|
|
784
|
-
var x,
|
|
785
|
-
const { t: e, search: r } =
|
|
783
|
+
const hr = 16 / 9, he = 292, xe = 189, oe = 336;
|
|
784
|
+
function ur() {
|
|
785
|
+
var x, B;
|
|
786
|
+
const { t: e, search: r } = R(), { get: o } = Se(), n = we(), i = V(n.breakpoints.down("md")), a = ((B = (x = window.blocklet) == null ? void 0 : x.preferences) == null ? void 0 : B.homeBanner) || [], {
|
|
786
787
|
data: s = [],
|
|
787
|
-
error:
|
|
788
|
+
error: l,
|
|
788
789
|
loading: m
|
|
789
|
-
} =
|
|
790
|
+
} = ne(async () => {
|
|
790
791
|
const p = await o(
|
|
791
792
|
ke(P.blockletsPath, { didList: a.map((C) => C.did).join(",") })
|
|
792
793
|
);
|
|
793
794
|
return p != null && p.dataList ? a.map((C) => p.dataList.find((b) => b.did === C.did)) : [];
|
|
794
795
|
});
|
|
795
|
-
|
|
796
|
-
const
|
|
796
|
+
l && console.error("Get Banner Blocklets error:", l);
|
|
797
|
+
const c = {
|
|
797
798
|
position: "absolute",
|
|
798
799
|
top: "50%",
|
|
799
800
|
transform: "translateY(-50%)",
|
|
@@ -801,53 +802,53 @@ function dr() {
|
|
|
801
802
|
cursor: "pointer",
|
|
802
803
|
color: "text.hint"
|
|
803
804
|
};
|
|
804
|
-
return !
|
|
805
|
+
return !l && a.length > 0 ? /* @__PURE__ */ u(F, { children: [
|
|
805
806
|
/* @__PURE__ */ t(v, { component: "h2", variant: "h2", mt: { xs: 2, md: 0 }, mb: 3, children: e("explore.title") }),
|
|
806
807
|
/* @__PURE__ */ t(
|
|
807
808
|
w,
|
|
808
809
|
{
|
|
809
|
-
height: { xs: "auto", md:
|
|
810
|
-
minHeight:
|
|
810
|
+
height: { xs: "auto", md: he },
|
|
811
|
+
minHeight: he,
|
|
811
812
|
position: "relative",
|
|
812
813
|
border: 1,
|
|
813
814
|
borderColor: "divider",
|
|
814
815
|
borderRadius: 3,
|
|
815
816
|
overflow: "hidden",
|
|
816
|
-
children: m ? /* @__PURE__ */
|
|
817
|
-
/* @__PURE__ */ t(_, { variant: "rounded", height: xe, width:
|
|
818
|
-
/* @__PURE__ */
|
|
817
|
+
children: m ? /* @__PURE__ */ u(w, { p: 5, display: { md: "flex" }, gap: 5, alignItems: "center", justifyContent: "center", children: [
|
|
818
|
+
/* @__PURE__ */ t(_, { variant: "rounded", height: xe, width: oe }),
|
|
819
|
+
/* @__PURE__ */ u(w, { flex: 1, height: "100%", children: [
|
|
819
820
|
/* @__PURE__ */ t(_, { variant: "text", height: 50, width: 100 }),
|
|
820
821
|
/* @__PURE__ */ t(_, { variant: "text", height: 40, width: "100%" }),
|
|
821
822
|
/* @__PURE__ */ t(_, { variant: "text", height: 40, width: 300 }),
|
|
822
|
-
/* @__PURE__ */
|
|
823
|
+
/* @__PURE__ */ u(w, { display: "flex", gap: 1, my: 2, children: [
|
|
823
824
|
/* @__PURE__ */ t(_, { variant: "circular", height: 20, width: 20 }),
|
|
824
825
|
/* @__PURE__ */ t(_, { variant: "text", height: 20, width: 50 })
|
|
825
826
|
] }),
|
|
826
827
|
/* @__PURE__ */ t(_, { variant: "rounded", height: 30, width: 100 })
|
|
827
828
|
] })
|
|
828
829
|
] }) : /* @__PURE__ */ t(
|
|
829
|
-
|
|
830
|
+
Pt,
|
|
830
831
|
{
|
|
831
832
|
showNav: !0,
|
|
832
833
|
autoPlay: !0,
|
|
833
|
-
slideDuration:
|
|
834
|
+
slideDuration: i ? 500 : 1e3,
|
|
834
835
|
slideInterval: 5e3,
|
|
835
836
|
showPlayButton: !1,
|
|
836
837
|
showIndex: !1,
|
|
837
838
|
showBullets: !1,
|
|
838
839
|
showThumbnails: !1,
|
|
839
840
|
showFullscreenButton: !1,
|
|
840
|
-
renderLeftNav: (p) => /* @__PURE__ */ t(w, { onClick: p, sx: { display: { xs: "none", md: "block" } }, children: /* @__PURE__ */ t(Rt, { sx: { ...
|
|
841
|
-
renderRightNav: (p) => /* @__PURE__ */ t(w, { onClick: p, sx: { display: { xs: "none", md: "block" } }, children: /* @__PURE__ */ t(
|
|
841
|
+
renderLeftNav: (p) => /* @__PURE__ */ t(w, { onClick: p, sx: { display: { xs: "none", md: "block" } }, children: /* @__PURE__ */ t(Rt, { sx: { ...c, left: 5 } }) }),
|
|
842
|
+
renderRightNav: (p) => /* @__PURE__ */ t(w, { onClick: p, sx: { display: { xs: "none", md: "block" } }, children: /* @__PURE__ */ t(Tt, { sx: { ...c, right: 5 } }) }),
|
|
842
843
|
items: a.map((p, C) => ({
|
|
843
844
|
original: p.did,
|
|
844
845
|
renderItem: () => {
|
|
845
|
-
var
|
|
846
|
-
const b = s[C] || {}, k = p.cover ||
|
|
847
|
-
return /* @__PURE__ */
|
|
846
|
+
var N;
|
|
847
|
+
const b = s[C] || {}, k = p.cover || mr(p.did, (N = b.screenshots) == null ? void 0 : N[0]), A = qe(k, n.breakpoints.values.md * 2);
|
|
848
|
+
return /* @__PURE__ */ u(
|
|
848
849
|
O,
|
|
849
850
|
{
|
|
850
|
-
height: { xs: "auto", md:
|
|
851
|
+
height: { xs: "auto", md: he },
|
|
851
852
|
sx: {
|
|
852
853
|
cursor: "pointer",
|
|
853
854
|
"&::before": {
|
|
@@ -873,9 +874,9 @@ function dr() {
|
|
|
873
874
|
gap: { xs: 2, md: 5 },
|
|
874
875
|
children: [
|
|
875
876
|
f(A),
|
|
876
|
-
/* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */
|
|
878
|
-
|
|
877
|
+
/* @__PURE__ */ u(O, { flex: 1, height: "100%", gap: 3, children: [
|
|
878
|
+
/* @__PURE__ */ u(w, { flex: 1, children: [
|
|
879
|
+
d(p.name || b.title || p.name),
|
|
879
880
|
g(p.desc || b.description)
|
|
880
881
|
] }),
|
|
881
882
|
b.did && y(b, p.baseNum),
|
|
@@ -892,9 +893,9 @@ function dr() {
|
|
|
892
893
|
)
|
|
893
894
|
] }) : null;
|
|
894
895
|
function f(p) {
|
|
895
|
-
return /* @__PURE__ */ t(w, { borderRadius: 2, overflow: "hidden", position: "relative", width: { xs: "100%", md:
|
|
896
|
+
return /* @__PURE__ */ t(w, { borderRadius: 2, overflow: "hidden", position: "relative", width: { xs: "100%", md: oe }, children: /* @__PURE__ */ t(fr, { url: p }) });
|
|
896
897
|
}
|
|
897
|
-
function
|
|
898
|
+
function d(p) {
|
|
898
899
|
return /* @__PURE__ */ t(v, { variant: "h2", width: "100%", children: p });
|
|
899
900
|
}
|
|
900
901
|
function g(p) {
|
|
@@ -923,14 +924,14 @@ function dr() {
|
|
|
923
924
|
}
|
|
924
925
|
function y(p, C = 0) {
|
|
925
926
|
const { did: b, owner: k, stats: A } = p;
|
|
926
|
-
return /* @__PURE__ */
|
|
927
|
+
return /* @__PURE__ */ u(w, { display: "flex", alignItems: "center", gap: 2, color: "text.secondary", children: [
|
|
927
928
|
/* @__PURE__ */ t(Ae, { icon: /* @__PURE__ */ t(He, { src: k.avatar, did: b, size: 20, variant: "circle" }), children: k.fullName }),
|
|
928
|
-
/* @__PURE__ */ t(Ae, { icon: /* @__PURE__ */ t(M, { icon:
|
|
929
|
+
/* @__PURE__ */ t(Ae, { icon: /* @__PURE__ */ t(M, { icon: Bt }), title: `${A.downloads + C}`, children: pr(A.downloads + C) })
|
|
929
930
|
] });
|
|
930
931
|
}
|
|
931
932
|
function I(p) {
|
|
932
933
|
return /* @__PURE__ */ t(
|
|
933
|
-
|
|
934
|
+
ie,
|
|
934
935
|
{
|
|
935
936
|
variant: "outlined",
|
|
936
937
|
size: "small",
|
|
@@ -947,16 +948,16 @@ function dr() {
|
|
|
947
948
|
);
|
|
948
949
|
}
|
|
949
950
|
}
|
|
950
|
-
const
|
|
951
|
-
function
|
|
951
|
+
const pr = (e) => Number.isNaN(e) ? 0 : e < 1e3 ? e : e < 1e6 ? `${(e / 1e3).toFixed(1)}k` : e < 1e9 ? `${(e / 1e6).toFixed(1)}m` : `${(e / 1e9).toFixed(1)}b`, mr = (e, r) => e && r ? `/assets/${e}/screenshots/${r}` : "";
|
|
952
|
+
function fr({ url: e }) {
|
|
952
953
|
const [r, o] = E(!0);
|
|
953
|
-
return /* @__PURE__ */
|
|
954
|
+
return /* @__PURE__ */ u(F, { children: [
|
|
954
955
|
r && /* @__PURE__ */ t(
|
|
955
956
|
_,
|
|
956
957
|
{
|
|
957
958
|
variant: "rectangular",
|
|
958
959
|
sx: {
|
|
959
|
-
width: { xs: "100%", md:
|
|
960
|
+
width: { xs: "100%", md: oe },
|
|
960
961
|
height: { xs: "auto", md: xe }
|
|
961
962
|
}
|
|
962
963
|
}
|
|
@@ -968,64 +969,64 @@ function pr({ url: e }) {
|
|
|
968
969
|
component: "img",
|
|
969
970
|
src: e,
|
|
970
971
|
alt: "",
|
|
971
|
-
width: { xs: "100%", md:
|
|
972
|
+
width: { xs: "100%", md: oe },
|
|
972
973
|
height: { xs: "auto", md: xe },
|
|
973
974
|
borderRadius: 2,
|
|
974
975
|
border: 1,
|
|
975
976
|
borderColor: "divider",
|
|
976
|
-
sx: { objectFit: "container", cursor: "pointer", aspectRatio:
|
|
977
|
+
sx: { objectFit: "container", cursor: "pointer", aspectRatio: hr },
|
|
977
978
|
onLoad: () => o(!1),
|
|
978
979
|
onError: () => o(!1)
|
|
979
980
|
}
|
|
980
981
|
)
|
|
981
982
|
] });
|
|
982
983
|
}
|
|
983
|
-
function
|
|
984
|
-
const { blockletRender: o, serverVersion: n } =
|
|
985
|
-
return /* @__PURE__ */
|
|
984
|
+
function gr({ title: e, blocklets: r }) {
|
|
985
|
+
const { blockletRender: o, serverVersion: n } = R();
|
|
986
|
+
return /* @__PURE__ */ u(w, { mt: 3, children: [
|
|
986
987
|
/* @__PURE__ */ t(v, { component: "h3", variant: "h3", sx: { mb: 2 }, children: e }),
|
|
987
|
-
/* @__PURE__ */ t(
|
|
988
|
+
/* @__PURE__ */ t(Re, { container: !0, spacing: 2, boxSizing: "border-box", maxWidth: "calc(100vw - 16px)", children: r.map((i) => /* @__PURE__ */ t(Re, { item: !0, xs: 12, md: 6, p: "2px", "data-blocklet-did": i.did, children: /* @__PURE__ */ t(w, { padding: "1px", children: o({ blocklet: i, blocklets: r, serverVersion: n }) }) }, i.did)) })
|
|
988
989
|
] });
|
|
989
990
|
}
|
|
990
|
-
function
|
|
991
|
-
const { get: e } = Se(), { t: r } =
|
|
991
|
+
function yr() {
|
|
992
|
+
const { get: e } = Se(), { t: r } = R(), {
|
|
992
993
|
data: o = [],
|
|
993
994
|
error: n,
|
|
994
|
-
loading:
|
|
995
|
-
} =
|
|
995
|
+
loading: i
|
|
996
|
+
} = ne(async () => {
|
|
996
997
|
const a = await e(P.explorePath);
|
|
997
998
|
return Array.isArray(a) ? a : [];
|
|
998
999
|
});
|
|
999
|
-
return n ? /* @__PURE__ */ t(be, { error: new Error(`Failed to fetch blocklets from ${P.explorePath}`) }) :
|
|
1000
|
-
/* @__PURE__ */ t(
|
|
1000
|
+
return n ? /* @__PURE__ */ t(be, { error: new Error(`Failed to fetch blocklets from ${P.explorePath}`) }) : i ? /* @__PURE__ */ t(Je, { mt: 15 }) : /* @__PURE__ */ u(F, { children: [
|
|
1001
|
+
/* @__PURE__ */ t(ur, {}),
|
|
1001
1002
|
o.map(
|
|
1002
1003
|
(a) => {
|
|
1003
1004
|
var s;
|
|
1004
|
-
return ((s = a.blocklets) == null ? void 0 : s.length) > 0 ? /* @__PURE__ */ t(
|
|
1005
|
+
return ((s = a.blocklets) == null ? void 0 : s.length) > 0 ? /* @__PURE__ */ t(gr, { title: r(`explore.${a.type}`), blocklets: a.blocklets }, a.type) : null;
|
|
1005
1006
|
}
|
|
1006
1007
|
)
|
|
1007
1008
|
] });
|
|
1008
1009
|
}
|
|
1009
|
-
const
|
|
1010
|
-
function
|
|
1010
|
+
const ue = "__FREE_TEXT__", Ee = "__NO_RESULT__", pe = 40;
|
|
1011
|
+
function et({
|
|
1011
1012
|
endpoint: e,
|
|
1012
1013
|
t: r,
|
|
1013
1014
|
locale: o,
|
|
1014
1015
|
filters: n,
|
|
1015
|
-
handleKeyword:
|
|
1016
|
+
handleKeyword: i,
|
|
1016
1017
|
handleSearchSelect: a,
|
|
1017
1018
|
...s
|
|
1018
1019
|
}) {
|
|
1019
|
-
const
|
|
1020
|
+
const l = re(null), m = re(!1), [c, f] = E(!1), [d, g] = E(""), [y, I] = E(!1), x = Se(), [B, p] = E(!1), C = (s == null ? void 0 : s.placeholder) || r("common.searchStore"), b = async (h) => {
|
|
1020
1021
|
p(!0);
|
|
1021
|
-
const S = await x.get(Ie(e, ke(P.blockletsPath,
|
|
1022
|
+
const S = await x.get(Ie(e, ke(P.blockletsPath, h)));
|
|
1022
1023
|
return p(!1), S.dataList || [];
|
|
1023
|
-
}, { data: k, run: A } =
|
|
1024
|
-
(
|
|
1024
|
+
}, { data: k, run: A } = ne(
|
|
1025
|
+
(h) => h ? b({
|
|
1025
1026
|
sortBy: P.nameDesc,
|
|
1026
1027
|
page: 1,
|
|
1027
1028
|
pageSize: 10,
|
|
1028
|
-
keyword:
|
|
1029
|
+
keyword: h,
|
|
1029
1030
|
showResources: "true"
|
|
1030
1031
|
}) : Promise.resolve([]),
|
|
1031
1032
|
{
|
|
@@ -1034,19 +1035,19 @@ function gr({
|
|
|
1034
1035
|
);
|
|
1035
1036
|
q(() => {
|
|
1036
1037
|
p(!0), A(n.keyword), g(n.keyword || "");
|
|
1037
|
-
}, [n.keyword, A]),
|
|
1038
|
+
}, [n.keyword, A]), Nt(
|
|
1038
1039
|
"ctrl + k, command + k",
|
|
1039
|
-
(
|
|
1040
|
+
(h) => {
|
|
1040
1041
|
var S, W;
|
|
1041
|
-
return
|
|
1042
|
+
return h.stopPropagation(), h.preventDefault(), (W = (S = l.current) == null ? void 0 : S.querySelector("input")) == null || W.focus(), !1;
|
|
1042
1043
|
},
|
|
1043
1044
|
{ enableOnTags: ["INPUT"] }
|
|
1044
1045
|
);
|
|
1045
|
-
const
|
|
1046
|
-
let
|
|
1047
|
-
return
|
|
1048
|
-
/* @__PURE__ */
|
|
1049
|
-
/* @__PURE__ */
|
|
1046
|
+
const N = Ne((h) => A(h), { wait: 300 }), j = { name: ue, title: d, did: "" };
|
|
1047
|
+
let D = [];
|
|
1048
|
+
return d && (B ? D = [j] : k != null && k.length ? D = [j, ...k] : D = [{ name: Ee, title: r("blocklet.noResults"), did: "" }]), /* @__PURE__ */ u(F, { children: [
|
|
1049
|
+
/* @__PURE__ */ u(zt, { fullScreen: !0, open: y, sx: { display: { md: "none" } }, children: [
|
|
1050
|
+
/* @__PURE__ */ u(w, { p: 2, pb: 0, display: "flex", alignItems: "center", gap: 2, children: [
|
|
1050
1051
|
/* @__PURE__ */ t(
|
|
1051
1052
|
Ue,
|
|
1052
1053
|
{
|
|
@@ -1068,14 +1069,14 @@ function gr({
|
|
|
1068
1069
|
autoFocus: !0,
|
|
1069
1070
|
placeholder: C,
|
|
1070
1071
|
className: "bl-autocomplete-input",
|
|
1071
|
-
value:
|
|
1072
|
-
onChange: (
|
|
1072
|
+
value: d,
|
|
1073
|
+
onChange: (h) => K(h.target.value),
|
|
1073
1074
|
startAdornment: U(y),
|
|
1074
1075
|
endAdornment: X()
|
|
1075
1076
|
}
|
|
1076
1077
|
),
|
|
1077
1078
|
/* @__PURE__ */ t(
|
|
1078
|
-
|
|
1079
|
+
ie,
|
|
1079
1080
|
{
|
|
1080
1081
|
variant: "outlined",
|
|
1081
1082
|
onClick: () => {
|
|
@@ -1085,28 +1086,28 @@ function gr({
|
|
|
1085
1086
|
}
|
|
1086
1087
|
)
|
|
1087
1088
|
] }),
|
|
1088
|
-
/* @__PURE__ */ t(je, { sx: { p: 0.5 }, children:
|
|
1089
|
+
/* @__PURE__ */ t(je, { sx: { p: 0.5 }, children: D.map((h) => Y(h)) })
|
|
1089
1090
|
] }),
|
|
1090
|
-
/* @__PURE__ */ t(w, { sx: { display: { sx: "block", md: "none" }, paddingTop: 1, opacity: 0.5 }, children: /* @__PURE__ */ t(M, { icon:
|
|
1091
|
+
/* @__PURE__ */ t(w, { sx: { display: { sx: "block", md: "none" }, paddingTop: 1, opacity: 0.5 }, children: /* @__PURE__ */ t(M, { icon: ce, style: { fontSize: 22, color: "inherit" }, onClick: () => I(!0) }) }),
|
|
1091
1092
|
/* @__PURE__ */ t(
|
|
1092
|
-
|
|
1093
|
+
Mt,
|
|
1093
1094
|
{
|
|
1094
|
-
ref:
|
|
1095
|
-
open: !!
|
|
1095
|
+
ref: l,
|
|
1096
|
+
open: !!d && c,
|
|
1096
1097
|
size: "small",
|
|
1097
1098
|
onOpen: () => f(!0),
|
|
1098
|
-
onClose: (
|
|
1099
|
-
f(!1), S === "selectOption" && !m.current &&
|
|
1099
|
+
onClose: (h, S) => {
|
|
1100
|
+
f(!1), S === "selectOption" && !m.current && i(d);
|
|
1100
1101
|
},
|
|
1101
|
-
onKeyDown: (
|
|
1102
|
-
|
|
1102
|
+
onKeyDown: (h) => {
|
|
1103
|
+
h.key === "Enter" && !d && H();
|
|
1103
1104
|
},
|
|
1104
1105
|
disableClearable: !0,
|
|
1105
|
-
inputValue:
|
|
1106
|
-
onInputChange: (
|
|
1107
|
-
isOptionEqualToValue: (
|
|
1108
|
-
getOptionLabel: (
|
|
1109
|
-
getOptionKey: (
|
|
1106
|
+
inputValue: d,
|
|
1107
|
+
onInputChange: (h, S) => K(S),
|
|
1108
|
+
isOptionEqualToValue: (h, S) => h.name === S.name,
|
|
1109
|
+
getOptionLabel: (h) => h.title,
|
|
1110
|
+
getOptionKey: (h) => h.name,
|
|
1110
1111
|
noOptionsText: r("blocklet.noResults"),
|
|
1111
1112
|
autoHighlight: !0,
|
|
1112
1113
|
forcePopupIcon: !1,
|
|
@@ -1120,25 +1121,25 @@ function gr({
|
|
|
1120
1121
|
}
|
|
1121
1122
|
}
|
|
1122
1123
|
},
|
|
1123
|
-
renderInput: (
|
|
1124
|
-
|
|
1124
|
+
renderInput: (h) => /* @__PURE__ */ t(
|
|
1125
|
+
Ft,
|
|
1125
1126
|
{
|
|
1126
|
-
...
|
|
1127
|
+
...h,
|
|
1127
1128
|
InputProps: {
|
|
1128
|
-
...
|
|
1129
|
+
...h.InputProps,
|
|
1129
1130
|
autoFocus: !0,
|
|
1130
1131
|
placeholder: C,
|
|
1131
1132
|
className: "bl-autocomplete-input",
|
|
1132
|
-
value:
|
|
1133
|
-
startAdornment: U(
|
|
1133
|
+
value: d,
|
|
1134
|
+
startAdornment: U(c),
|
|
1134
1135
|
endAdornment: X()
|
|
1135
1136
|
}
|
|
1136
1137
|
}
|
|
1137
1138
|
),
|
|
1138
|
-
filterOptions: (
|
|
1139
|
+
filterOptions: (h) => h,
|
|
1139
1140
|
...s,
|
|
1140
|
-
options:
|
|
1141
|
-
renderOption: (
|
|
1141
|
+
options: D,
|
|
1142
|
+
renderOption: (h, S) => Y(S),
|
|
1142
1143
|
value: j,
|
|
1143
1144
|
sx: [
|
|
1144
1145
|
{
|
|
@@ -1159,35 +1160,35 @@ function gr({
|
|
|
1159
1160
|
}
|
|
1160
1161
|
)
|
|
1161
1162
|
] });
|
|
1162
|
-
function K(
|
|
1163
|
-
p(!0), g(
|
|
1163
|
+
function K(h) {
|
|
1164
|
+
p(!0), g(h), m.current = !1, N.run(h);
|
|
1164
1165
|
}
|
|
1165
1166
|
function H() {
|
|
1166
|
-
I(!1), g(""), K(""),
|
|
1167
|
+
I(!1), g(""), K(""), i("");
|
|
1167
1168
|
}
|
|
1168
|
-
function
|
|
1169
|
-
|
|
1169
|
+
function ae(h) {
|
|
1170
|
+
h != null && h.did ? (I(!1), m.current = !0, g(""), a(h)) : h.name === ue && (I(!1), i(d));
|
|
1170
1171
|
}
|
|
1171
|
-
function Y(
|
|
1172
|
+
function Y(h) {
|
|
1172
1173
|
var S, W;
|
|
1173
|
-
return /* @__PURE__ */
|
|
1174
|
+
return /* @__PURE__ */ u(
|
|
1174
1175
|
$e,
|
|
1175
1176
|
{
|
|
1176
1177
|
sx: { display: "flex", alignItems: "center", gap: 1, p: 1.5, borderRadius: "8px" },
|
|
1177
|
-
onClick: () =>
|
|
1178
|
+
onClick: () => ae(h),
|
|
1178
1179
|
children: [
|
|
1179
|
-
Z(
|
|
1180
|
-
/* @__PURE__ */
|
|
1181
|
-
/* @__PURE__ */ t(v, { fontWeight: "fontWeightMedium", display: "flex", alignItems: "center", gap: 1, children:
|
|
1182
|
-
/* @__PURE__ */ t(v, { sx: { color: "text.hint" }, fontSize: "13px", children: ((W = (S =
|
|
1180
|
+
Z(h),
|
|
1181
|
+
/* @__PURE__ */ u(v, { variant: "body1", children: [
|
|
1182
|
+
/* @__PURE__ */ t(v, { fontWeight: "fontWeightMedium", display: "flex", alignItems: "center", gap: 1, children: h.title }),
|
|
1183
|
+
/* @__PURE__ */ t(v, { sx: { color: "text.hint" }, fontSize: "13px", children: ((W = (S = h.category) == null ? void 0 : S.locales) == null ? void 0 : W[o || "en"]) || "" })
|
|
1183
1184
|
] })
|
|
1184
1185
|
]
|
|
1185
1186
|
},
|
|
1186
|
-
|
|
1187
|
+
h.did
|
|
1187
1188
|
);
|
|
1188
1189
|
}
|
|
1189
|
-
function Z(
|
|
1190
|
-
if ([
|
|
1190
|
+
function Z(h) {
|
|
1191
|
+
if ([ue, Ee].includes(h.name))
|
|
1191
1192
|
return /* @__PURE__ */ t(
|
|
1192
1193
|
w,
|
|
1193
1194
|
{
|
|
@@ -1199,55 +1200,55 @@ function gr({
|
|
|
1199
1200
|
color: "text.hint",
|
|
1200
1201
|
bgcolor: "grey.100",
|
|
1201
1202
|
borderRadius: "8px",
|
|
1202
|
-
children: /* @__PURE__ */ t(M, { icon:
|
|
1203
|
+
children: /* @__PURE__ */ t(M, { icon: ce, style: { fontSize: 28 } })
|
|
1203
1204
|
}
|
|
1204
1205
|
);
|
|
1205
1206
|
let S = "";
|
|
1206
|
-
return
|
|
1207
|
+
return h.logo && (S = Ie(e, "assets", h.did, qe(h.logo, pe, h.version))), /* @__PURE__ */ t(He, { src: S, size: pe, style: { borderRadius: "8px", overflow: "hidden" } });
|
|
1207
1208
|
}
|
|
1208
|
-
function U(
|
|
1209
|
-
return /* @__PURE__ */ t(w, { sx: { display: "flex", pl: 0.5, alignItems: "center", color: "text.hint" }, children:
|
|
1209
|
+
function U(h = !0) {
|
|
1210
|
+
return /* @__PURE__ */ t(w, { sx: { display: "flex", pl: 0.5, alignItems: "center", color: "text.hint" }, children: h && d && B ? /* @__PURE__ */ t(le, { color: "inherit", size: 16 }) : /* @__PURE__ */ t(M, { icon: ce, style: { fontSize: 16, cursor: "default" } }) });
|
|
1210
1211
|
}
|
|
1211
1212
|
function X() {
|
|
1212
|
-
return
|
|
1213
|
+
return d ? /* @__PURE__ */ t(w, { sx: { display: "flex", alignItems: "center", color: "text.hint" }, children: /* @__PURE__ */ t(
|
|
1213
1214
|
M,
|
|
1214
1215
|
{
|
|
1215
|
-
icon:
|
|
1216
|
+
icon: _t,
|
|
1216
1217
|
style: { fontSize: 20, cursor: "pointer", color: "inherit" },
|
|
1217
1218
|
onClick: () => H()
|
|
1218
1219
|
}
|
|
1219
1220
|
) }) : null;
|
|
1220
1221
|
}
|
|
1221
1222
|
}
|
|
1222
|
-
function
|
|
1223
|
-
const { search: o, t: n } =
|
|
1223
|
+
function xr({ placeholder: e, ...r }) {
|
|
1224
|
+
const { search: o, t: n } = R(), { filters: i, handleKeyword: a } = o, [s, l] = E(i.keyword || ""), m = Ne(a, { wait: 300 }), c = (g) => {
|
|
1224
1225
|
const { value: y } = g.target;
|
|
1225
|
-
|
|
1226
|
+
l(y), m.run(y);
|
|
1226
1227
|
}, f = () => {
|
|
1227
|
-
|
|
1228
|
+
l(""), a("");
|
|
1228
1229
|
};
|
|
1229
1230
|
q(() => {
|
|
1230
|
-
i
|
|
1231
|
-
}, [
|
|
1232
|
-
const
|
|
1231
|
+
l(i.keyword || "");
|
|
1232
|
+
}, [i.keyword]);
|
|
1233
|
+
const d = e || n("common.searchPlaceholder");
|
|
1233
1234
|
return /* @__PURE__ */ t(
|
|
1234
|
-
|
|
1235
|
+
wr,
|
|
1235
1236
|
{
|
|
1236
1237
|
inputProps: {
|
|
1237
1238
|
"data-cy": "search-blocklet"
|
|
1238
1239
|
},
|
|
1239
|
-
startAdornment: /* @__PURE__ */ t(Pe, { position: "start", children: /* @__PURE__ */ t(
|
|
1240
|
-
onChange:
|
|
1241
|
-
placeholder:
|
|
1240
|
+
startAdornment: /* @__PURE__ */ t(Pe, { position: "start", children: /* @__PURE__ */ t(br, { sx: { fontSize: 18, ml: -0.5 } }) }),
|
|
1241
|
+
onChange: c,
|
|
1242
|
+
placeholder: d,
|
|
1242
1243
|
value: s,
|
|
1243
|
-
title:
|
|
1244
|
+
title: d,
|
|
1244
1245
|
"data-cy": "search",
|
|
1245
|
-
endAdornment: s && /* @__PURE__ */ t(Pe, { position: "end", children: /* @__PURE__ */ t(
|
|
1246
|
+
endAdornment: s && /* @__PURE__ */ t(Pe, { position: "end", children: /* @__PURE__ */ t(kr, { "data-cy": "search-delete", onClick: f }) }),
|
|
1246
1247
|
...r
|
|
1247
1248
|
}
|
|
1248
1249
|
);
|
|
1249
1250
|
}
|
|
1250
|
-
const
|
|
1251
|
+
const wr = Q(Ue)`
|
|
1251
1252
|
background-color: ${(e) => e.theme.palette.grey[50]};
|
|
1252
1253
|
font-size: 14px;
|
|
1253
1254
|
border-radius: 6px;
|
|
@@ -1264,29 +1265,29 @@ const xr = Q(Ue)`
|
|
|
1264
1265
|
color: transparent;
|
|
1265
1266
|
}
|
|
1266
1267
|
}
|
|
1267
|
-
`,
|
|
1268
|
+
`, br = Q(Dt)`
|
|
1268
1269
|
color: ${(e) => e.theme.palette.grey[500]};
|
|
1269
|
-
`,
|
|
1270
|
+
`, kr = Q(ze)`
|
|
1270
1271
|
color: ${(e) => e.theme.palette.grey[500]};
|
|
1271
1272
|
font-size: 16px;
|
|
1272
1273
|
cursor: pointer;
|
|
1273
1274
|
`;
|
|
1274
|
-
function
|
|
1275
|
+
function vr() {
|
|
1275
1276
|
var b;
|
|
1276
1277
|
const {
|
|
1277
1278
|
search: e,
|
|
1278
1279
|
t: r,
|
|
1279
1280
|
endpoint: o,
|
|
1280
1281
|
locale: n,
|
|
1281
|
-
getCategoryLocale:
|
|
1282
|
+
getCategoryLocale: i,
|
|
1282
1283
|
developerName: a,
|
|
1283
1284
|
showResourcesSwitch: s,
|
|
1284
|
-
layout:
|
|
1285
|
+
layout: l,
|
|
1285
1286
|
baseSearch: m,
|
|
1286
|
-
categoryOptions:
|
|
1287
|
+
categoryOptions: c,
|
|
1287
1288
|
compact: f
|
|
1288
|
-
} =
|
|
1289
|
-
return /* @__PURE__ */
|
|
1289
|
+
} = R(), { filters: d, handleSort: g, handlePrice: y, handleDeveloper: I, handleSwitchShowResources: x, cleanFilter: B, handleCategory: p } = e, C = Ge(r);
|
|
1290
|
+
return /* @__PURE__ */ u(
|
|
1290
1291
|
O,
|
|
1291
1292
|
{
|
|
1292
1293
|
position: "sticky",
|
|
@@ -1303,8 +1304,8 @@ function kr() {
|
|
|
1303
1304
|
pb: f ? 2 : 3,
|
|
1304
1305
|
sx: { backgroundColor: "background.default" },
|
|
1305
1306
|
children: [
|
|
1306
|
-
!f && /* @__PURE__ */ t(v, { variant: "h2", textTransform: "capitalize", children:
|
|
1307
|
-
/* @__PURE__ */
|
|
1307
|
+
!f && /* @__PURE__ */ t(v, { variant: "h2", textTransform: "capitalize", children: i(d.category) }),
|
|
1308
|
+
/* @__PURE__ */ u(
|
|
1308
1309
|
O,
|
|
1309
1310
|
{
|
|
1310
1311
|
flex: 1,
|
|
@@ -1315,8 +1316,8 @@ function kr() {
|
|
|
1315
1316
|
justifyContent: { xs: "flex-start", md: "flex-end" },
|
|
1316
1317
|
gap: 2,
|
|
1317
1318
|
children: [
|
|
1318
|
-
|
|
1319
|
-
|
|
1319
|
+
l.showSearch ? /* @__PURE__ */ t(w, { flex: 1, flexBasis: { xs: "100%", md: "auto" }, children: m ? /* @__PURE__ */ t(xr, {}) : /* @__PURE__ */ t(
|
|
1320
|
+
et,
|
|
1320
1321
|
{
|
|
1321
1322
|
locale: n,
|
|
1322
1323
|
endpoint: o,
|
|
@@ -1332,7 +1333,7 @@ function kr() {
|
|
|
1332
1333
|
handleSearchSelect: e.handleSearchSelect
|
|
1333
1334
|
}
|
|
1334
1335
|
) }) : null,
|
|
1335
|
-
|
|
1336
|
+
d.owner && a && /* @__PURE__ */ t(
|
|
1336
1337
|
Te,
|
|
1337
1338
|
{
|
|
1338
1339
|
label: r("blocklet.authorTag", { name: a }),
|
|
@@ -1340,18 +1341,18 @@ function kr() {
|
|
|
1340
1341
|
onDelete: () => I("")
|
|
1341
1342
|
}
|
|
1342
1343
|
),
|
|
1343
|
-
|
|
1344
|
+
d.resourceDid && d.resourceBlocklet && /* @__PURE__ */ t(
|
|
1344
1345
|
Te,
|
|
1345
1346
|
{
|
|
1346
|
-
label: r("blocklet.resourceTag", { name:
|
|
1347
|
+
label: r("blocklet.resourceTag", { name: d.resourceBlocklet }),
|
|
1347
1348
|
size: "small",
|
|
1348
|
-
onDelete: () =>
|
|
1349
|
+
onDelete: () => B(["resourceDid", "resourceBlocklet", "showResources"])
|
|
1349
1350
|
}
|
|
1350
1351
|
),
|
|
1351
1352
|
s ? /* @__PURE__ */ t(
|
|
1352
1353
|
Oe,
|
|
1353
1354
|
{
|
|
1354
|
-
checked:
|
|
1355
|
+
checked: d.showResources !== "false",
|
|
1355
1356
|
onChange: (k) => x(k ? "true" : "false"),
|
|
1356
1357
|
label: r("common.showResources")
|
|
1357
1358
|
}
|
|
@@ -1359,7 +1360,7 @@ function kr() {
|
|
|
1359
1360
|
/* @__PURE__ */ t(
|
|
1360
1361
|
Oe,
|
|
1361
1362
|
{
|
|
1362
|
-
checked:
|
|
1363
|
+
checked: d.price === "free",
|
|
1363
1364
|
onChange: (k) => y(k ? "free" : ""),
|
|
1364
1365
|
label: r("blocklet.free")
|
|
1365
1366
|
}
|
|
@@ -1367,8 +1368,8 @@ function kr() {
|
|
|
1367
1368
|
f && /* @__PURE__ */ t(w, { children: /* @__PURE__ */ t(
|
|
1368
1369
|
ye,
|
|
1369
1370
|
{
|
|
1370
|
-
value:
|
|
1371
|
-
options:
|
|
1371
|
+
value: d.category || ((b = c[0]) == null ? void 0 : b.value),
|
|
1372
|
+
options: c,
|
|
1372
1373
|
placeholder: r("common.category"),
|
|
1373
1374
|
onChange: (k) => p(k)
|
|
1374
1375
|
}
|
|
@@ -1376,7 +1377,7 @@ function kr() {
|
|
|
1376
1377
|
/* @__PURE__ */ t(
|
|
1377
1378
|
ye,
|
|
1378
1379
|
{
|
|
1379
|
-
value:
|
|
1380
|
+
value: d.sortBy || C[0].value,
|
|
1380
1381
|
options: C,
|
|
1381
1382
|
placeholder: r("sort.sort"),
|
|
1382
1383
|
onChange: (k) => g(k)
|
|
@@ -1394,21 +1395,21 @@ function Oe({
|
|
|
1394
1395
|
onChange: r,
|
|
1395
1396
|
label: o
|
|
1396
1397
|
}) {
|
|
1397
|
-
const n =
|
|
1398
|
+
const n = Lt();
|
|
1398
1399
|
return /* @__PURE__ */ t(
|
|
1399
1400
|
We,
|
|
1400
1401
|
{
|
|
1401
1402
|
sx: { m: 0, p: 0 },
|
|
1402
1403
|
className: "check-button",
|
|
1403
1404
|
control: /* @__PURE__ */ t(
|
|
1404
|
-
|
|
1405
|
+
De,
|
|
1405
1406
|
{
|
|
1406
1407
|
checked: e,
|
|
1407
|
-
icon: /* @__PURE__ */ t(M, { style: { padding: 0, color: n.palette.text.secondary }, icon:
|
|
1408
|
-
checkedIcon: /* @__PURE__ */ t(M, { style: { padding: 0, color: n.palette.primary.main }, icon:
|
|
1408
|
+
icon: /* @__PURE__ */ t(M, { style: { padding: 0, color: n.palette.text.secondary }, icon: Et }),
|
|
1409
|
+
checkedIcon: /* @__PURE__ */ t(M, { style: { padding: 0, color: n.palette.primary.main }, icon: Ot }),
|
|
1409
1410
|
size: "large",
|
|
1410
1411
|
sx: { p: 0, mr: 1 },
|
|
1411
|
-
onChange: (
|
|
1412
|
+
onChange: (i) => r(i.target.checked)
|
|
1412
1413
|
}
|
|
1413
1414
|
),
|
|
1414
1415
|
label: o
|
|
@@ -1416,21 +1417,21 @@ function Oe({
|
|
|
1416
1417
|
);
|
|
1417
1418
|
}
|
|
1418
1419
|
function ee({ children: e }) {
|
|
1419
|
-
return /* @__PURE__ */
|
|
1420
|
-
/* @__PURE__ */ t(
|
|
1420
|
+
return /* @__PURE__ */ u(w, { display: "flex", mt: 2, flexDirection: "column", alignItems: "center", justifyContent: "center", color: "text.hint", children: [
|
|
1421
|
+
/* @__PURE__ */ t(Wt, {}),
|
|
1421
1422
|
e
|
|
1422
1423
|
] });
|
|
1423
1424
|
}
|
|
1424
1425
|
function Le() {
|
|
1425
|
-
const { t: e } =
|
|
1426
|
+
const { t: e } = R();
|
|
1426
1427
|
return /* @__PURE__ */ t(v, { style: { textAlign: "center" }, variant: "subtitle2", children: e("blocklet.noResults") });
|
|
1427
1428
|
}
|
|
1428
1429
|
function me({ filterTip: e, keywordTip: r }) {
|
|
1429
|
-
const { t: o, locale: n } =
|
|
1430
|
-
return /* @__PURE__ */
|
|
1430
|
+
const { t: o, locale: n } = R(), i = () => n === "zh" ? "、" : " , ";
|
|
1431
|
+
return /* @__PURE__ */ u(w, { mt: 1, display: "flex", children: [
|
|
1431
1432
|
/* @__PURE__ */ t(v, { style: { marginRight: "16px" }, children: o("blocklet.emptyTip") }),
|
|
1432
1433
|
e && /* @__PURE__ */ t(v, { children: o("blocklet.filterTip") }),
|
|
1433
|
-
e && r &&
|
|
1434
|
+
e && r && i(),
|
|
1434
1435
|
r && /* @__PURE__ */ t(v, { children: o("blocklet.keywordTip") })
|
|
1435
1436
|
] });
|
|
1436
1437
|
}
|
|
@@ -1439,7 +1440,7 @@ function fe({
|
|
|
1439
1440
|
primaryEnd: r,
|
|
1440
1441
|
filter: o
|
|
1441
1442
|
}) {
|
|
1442
|
-
return /* @__PURE__ */
|
|
1443
|
+
return /* @__PURE__ */ u(v, { variant: "subtitle2", display: "flex", gap: 0.5, mx: 0.5, children: [
|
|
1443
1444
|
/* @__PURE__ */ t(v, { children: e }),
|
|
1444
1445
|
/* @__PURE__ */ t(
|
|
1445
1446
|
v,
|
|
@@ -1450,41 +1451,41 @@ function fe({
|
|
|
1450
1451
|
children: o
|
|
1451
1452
|
}
|
|
1452
1453
|
),
|
|
1453
|
-
/* @__PURE__ */
|
|
1454
|
+
/* @__PURE__ */ u(v, { children: [
|
|
1454
1455
|
r,
|
|
1455
1456
|
" "
|
|
1456
1457
|
] })
|
|
1457
1458
|
] });
|
|
1458
1459
|
}
|
|
1459
|
-
function
|
|
1460
|
-
const { t: e, search: r, getCategoryLocale: o, selectedCategory: n } =
|
|
1461
|
-
if (
|
|
1462
|
-
return /* @__PURE__ */
|
|
1460
|
+
function Cr() {
|
|
1461
|
+
const { t: e, search: r, getCategoryLocale: o, selectedCategory: n } = R(), { filters: i } = r, a = !!n || !!i.price;
|
|
1462
|
+
if (i.keyword && a)
|
|
1463
|
+
return /* @__PURE__ */ u(ee, { children: [
|
|
1463
1464
|
/* @__PURE__ */ t(
|
|
1464
1465
|
fe,
|
|
1465
1466
|
{
|
|
1466
1467
|
primaryStart: e("blocklet.noBlockletPart1"),
|
|
1467
1468
|
primaryEnd: e("blocklet.noBlockletPart2"),
|
|
1468
|
-
filter:
|
|
1469
|
+
filter: i.keyword
|
|
1469
1470
|
}
|
|
1470
1471
|
),
|
|
1471
1472
|
/* @__PURE__ */ t(me, { keywordTip: !0, filterTip: !0 })
|
|
1472
1473
|
] });
|
|
1473
|
-
if (
|
|
1474
|
-
return /* @__PURE__ */
|
|
1474
|
+
if (i.keyword)
|
|
1475
|
+
return /* @__PURE__ */ u(ee, { children: [
|
|
1475
1476
|
/* @__PURE__ */ t(
|
|
1476
1477
|
fe,
|
|
1477
1478
|
{
|
|
1478
1479
|
primaryStart: e("blocklet.noBlockletPart1"),
|
|
1479
1480
|
primaryEnd: e("blocklet.noBlockletPart2"),
|
|
1480
|
-
filter:
|
|
1481
|
+
filter: i.keyword
|
|
1481
1482
|
}
|
|
1482
1483
|
),
|
|
1483
1484
|
/* @__PURE__ */ t(me, { keywordTip: !0 })
|
|
1484
1485
|
] });
|
|
1485
1486
|
if (a) {
|
|
1486
1487
|
const s = o(n);
|
|
1487
|
-
return /* @__PURE__ */
|
|
1488
|
+
return /* @__PURE__ */ u(ee, { children: [
|
|
1488
1489
|
s ? /* @__PURE__ */ t(
|
|
1489
1490
|
fe,
|
|
1490
1491
|
{
|
|
@@ -1498,10 +1499,10 @@ function vr() {
|
|
|
1498
1499
|
}
|
|
1499
1500
|
return /* @__PURE__ */ t(ee, { children: /* @__PURE__ */ t(Le, {}) });
|
|
1500
1501
|
}
|
|
1501
|
-
const
|
|
1502
|
-
async (
|
|
1503
|
-
|
|
1504
|
-
const { currentPage: a, pageSize: s } = o,
|
|
1502
|
+
const Sr = (e, r, o, n) => ht(
|
|
1503
|
+
async (i) => {
|
|
1504
|
+
i || (o.currentPage = o.defaultCurrentPage);
|
|
1505
|
+
const { currentPage: a, pageSize: s } = o, l = {
|
|
1505
1506
|
...r,
|
|
1506
1507
|
category: r.category === "All" ? "" : r.category,
|
|
1507
1508
|
sortBy: P[r.sortBy],
|
|
@@ -1509,60 +1510,60 @@ const Cr = (e, r, o, n) => dt(
|
|
|
1509
1510
|
pageSize: s
|
|
1510
1511
|
};
|
|
1511
1512
|
n(null);
|
|
1512
|
-
const { data: m = {} } = await e.get(P.blockletsPath, { params:
|
|
1513
|
+
const { data: m = {} } = await e.get(P.blockletsPath, { params: l });
|
|
1513
1514
|
return o.currentPage++, { page: a, pageSize: s, list: (m == null ? void 0 : m.dataList) || [], total: (m == null ? void 0 : m.total) || 0 };
|
|
1514
1515
|
},
|
|
1515
1516
|
{
|
|
1516
|
-
isNoMore: (
|
|
1517
|
-
reloadDeps: [e,
|
|
1517
|
+
isNoMore: (i) => i ? i.page * i.pageSize >= i.total : !1,
|
|
1518
|
+
reloadDeps: [e, $t(r)],
|
|
1518
1519
|
onError: n
|
|
1519
1520
|
}
|
|
1520
1521
|
);
|
|
1521
|
-
function
|
|
1522
|
-
var
|
|
1523
|
-
const { storeApi: e, search: r, extraFilter: o, errors: n, updateDeveloperName:
|
|
1522
|
+
function Ir() {
|
|
1523
|
+
var d;
|
|
1524
|
+
const { storeApi: e, search: r, extraFilter: o, errors: n, updateDeveloperName: i } = R(), { filters: a } = r, s = ut({
|
|
1524
1525
|
currentPage: P.currentPage,
|
|
1525
|
-
pageSize:
|
|
1526
|
+
pageSize: er() ? P.mobilePageSize : P.pageSize,
|
|
1526
1527
|
defaultCurrentPage: P.defaultCurrentPage
|
|
1527
|
-
}), [
|
|
1528
|
+
}), [l, m] = E(null), c = Sr(e, a, s, m), f = G(
|
|
1528
1529
|
() => {
|
|
1529
1530
|
var g, y;
|
|
1530
|
-
return o ? o(((g =
|
|
1531
|
+
return o ? o(((g = c.data) == null ? void 0 : g.list) || []) : ((y = c.data) == null ? void 0 : y.list) || [];
|
|
1531
1532
|
},
|
|
1532
|
-
[
|
|
1533
|
+
[c.data, o]
|
|
1533
1534
|
);
|
|
1534
1535
|
return q(() => {
|
|
1535
1536
|
const g = f.find((y) => y.owner.did === a.owner);
|
|
1536
|
-
|
|
1537
|
-
}, [a.owner, f,
|
|
1537
|
+
i((g == null ? void 0 : g.owner.fullName) || (g == null ? void 0 : g.author.name) || "");
|
|
1538
|
+
}, [a.owner, f, i]), {
|
|
1538
1539
|
blocklets: f,
|
|
1539
|
-
fetchBlockletsError:
|
|
1540
|
-
loadMore:
|
|
1541
|
-
hasNextPage: !
|
|
1542
|
-
total: ((
|
|
1540
|
+
fetchBlockletsError: l,
|
|
1541
|
+
loadMore: c.loadMore,
|
|
1542
|
+
hasNextPage: !c.noMore,
|
|
1543
|
+
total: ((d = c.data) == null ? void 0 : d.total) || 0,
|
|
1543
1544
|
loadings: {
|
|
1544
|
-
fetchBlockletsLoading:
|
|
1545
|
-
loadingMore:
|
|
1545
|
+
fetchBlockletsLoading: c.loading,
|
|
1546
|
+
loadingMore: c.loadingMore
|
|
1546
1547
|
},
|
|
1547
1548
|
errors: {
|
|
1548
1549
|
...n,
|
|
1549
|
-
fetchBlockletsError:
|
|
1550
|
+
fetchBlockletsError: l
|
|
1550
1551
|
}
|
|
1551
1552
|
};
|
|
1552
1553
|
}
|
|
1553
|
-
function
|
|
1554
|
-
const { t: e, search: r, endpoint: o, blockletRender: n, serverVersion:
|
|
1554
|
+
function Br() {
|
|
1555
|
+
const { t: e, search: r, endpoint: o, blockletRender: n, serverVersion: i, minItemWidth: a, layout: s, baseSearch: l, compact: m } = R(), { filters: c } = r, { blocklets: f, errors: d, loadMore: g, loadings: y, hasNextPage: I, total: x } = Ir(), [B] = At({
|
|
1555
1556
|
loading: y.fetchBlockletsLoading || y.loadingMore,
|
|
1556
1557
|
hasNextPage: I,
|
|
1557
1558
|
onLoadMore: g
|
|
1558
1559
|
});
|
|
1559
|
-
if (
|
|
1560
|
-
const k = new Error(`Failed to fetch blocklets from ${o}: ${
|
|
1560
|
+
if (d.fetchBlockletsError) {
|
|
1561
|
+
const k = new Error(`Failed to fetch blocklets from ${o}: ${Zt(d.fetchBlockletsError)}`);
|
|
1561
1562
|
return /* @__PURE__ */ t(be, { error: k });
|
|
1562
1563
|
}
|
|
1563
|
-
const p =
|
|
1564
|
-
return /* @__PURE__ */
|
|
1565
|
-
p ? /* @__PURE__ */ t(
|
|
1564
|
+
const p = l && s.showSearch || !c.keyword;
|
|
1565
|
+
return /* @__PURE__ */ u(F, { children: [
|
|
1566
|
+
p ? /* @__PURE__ */ t(vr, {}) : /* @__PURE__ */ u(F, { children: [
|
|
1566
1567
|
/* @__PURE__ */ t(Ce, { xs: /* @__PURE__ */ t(Ze, {}), md: null }),
|
|
1567
1568
|
b()
|
|
1568
1569
|
] }),
|
|
@@ -1576,8 +1577,8 @@ function Ir() {
|
|
|
1576
1577
|
justifyContent: "center",
|
|
1577
1578
|
py: 2,
|
|
1578
1579
|
overflow: "hidden",
|
|
1579
|
-
ref:
|
|
1580
|
-
children: y.loadingMore ? /* @__PURE__ */ t(
|
|
1580
|
+
ref: B,
|
|
1581
|
+
children: y.loadingMore ? /* @__PURE__ */ t(le, {}) : null
|
|
1581
1582
|
}
|
|
1582
1583
|
)
|
|
1583
1584
|
] });
|
|
@@ -1603,15 +1604,15 @@ function Ir() {
|
|
|
1603
1604
|
sm: a
|
|
1604
1605
|
},
|
|
1605
1606
|
maxWidth: "calc(100vw - 32px)",
|
|
1606
|
-
children: n({ blocklet: k, blocklets: f, serverVersion:
|
|
1607
|
+
children: n({ blocklet: k, blocklets: f, serverVersion: i })
|
|
1607
1608
|
},
|
|
1608
1609
|
k.did
|
|
1609
1610
|
))
|
|
1610
1611
|
}
|
|
1611
|
-
) : /* @__PURE__ */ t(
|
|
1612
|
+
) : /* @__PURE__ */ t(Cr, {});
|
|
1612
1613
|
}
|
|
1613
1614
|
function b() {
|
|
1614
|
-
return /* @__PURE__ */
|
|
1615
|
+
return /* @__PURE__ */ u(
|
|
1615
1616
|
O,
|
|
1616
1617
|
{
|
|
1617
1618
|
direction: "row",
|
|
@@ -1625,10 +1626,10 @@ function Ir() {
|
|
|
1625
1626
|
v,
|
|
1626
1627
|
{
|
|
1627
1628
|
variant: "h3",
|
|
1628
|
-
title:
|
|
1629
|
+
title: c.keyword,
|
|
1629
1630
|
maxWidth: "50vw",
|
|
1630
1631
|
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
1631
|
-
children: e("blocklet.search", { keyword:
|
|
1632
|
+
children: e("blocklet.search", { keyword: c.keyword })
|
|
1632
1633
|
}
|
|
1633
1634
|
),
|
|
1634
1635
|
/* @__PURE__ */ t(v, { variant: "body1", color: "text.hint", fontSize: 13, children: e("blocklet.resultCount", { count: x }) })
|
|
@@ -1638,45 +1639,60 @@ function Ir() {
|
|
|
1638
1639
|
}
|
|
1639
1640
|
}
|
|
1640
1641
|
function Rr() {
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1642
|
+
var c, f, d;
|
|
1643
|
+
const { t: e, selectedCategory: r, getCategoryLocale: o, locale: n, search: i } = R(), { toggleOpen: a } = ve(), l = Ut().arcSphere, m = !!((f = (c = window.blocklet) == null ? void 0 : c.navigation) != null && f.some((g) => g.section === "bottomNavigation"));
|
|
1644
|
+
return /* @__PURE__ */ u(te, { display: "flex", alignItems: "center", justifyContent: "space-between", children: [
|
|
1645
|
+
/* @__PURE__ */ u(
|
|
1646
|
+
v,
|
|
1647
|
+
{
|
|
1648
|
+
variant: "body1",
|
|
1649
|
+
display: { xs: "flex", md: "none" },
|
|
1650
|
+
alignItems: "center",
|
|
1651
|
+
gap: 1,
|
|
1652
|
+
py: 2,
|
|
1653
|
+
fontWeight: "fontWeightMedium",
|
|
1654
|
+
children: [
|
|
1655
|
+
/* @__PURE__ */ t(Ye, { onClick: () => a(!0), children: /* @__PURE__ */ t(jt, {}) }),
|
|
1656
|
+
o(r) || e("common.category")
|
|
1657
|
+
]
|
|
1658
|
+
}
|
|
1659
|
+
),
|
|
1660
|
+
l && m && /* @__PURE__ */ t(
|
|
1661
|
+
et,
|
|
1662
|
+
{
|
|
1663
|
+
locale: n,
|
|
1664
|
+
endpoint: ((d = window.blocklet) == null ? void 0 : d.prefix) || "/",
|
|
1665
|
+
sx: { display: { md: "block", xs: "none" }, mr: 1, width: "350px" },
|
|
1666
|
+
t: e,
|
|
1667
|
+
filters: i.filters,
|
|
1668
|
+
handleKeyword: i.handleKeyword,
|
|
1669
|
+
handleSearchSelect: i.handleSearchSelect
|
|
1670
|
+
}
|
|
1671
|
+
)
|
|
1672
|
+
] });
|
|
1657
1673
|
}
|
|
1658
|
-
function
|
|
1659
|
-
var
|
|
1660
|
-
const { search: o, layout: n, compact:
|
|
1661
|
-
return /* @__PURE__ */ t(
|
|
1662
|
-
!
|
|
1663
|
-
/* @__PURE__ */
|
|
1674
|
+
function Tr({ menus: e, children: r }) {
|
|
1675
|
+
var c;
|
|
1676
|
+
const { search: o, layout: n, compact: i } = R(), { filters: a } = o, s = re(null), l = a.category || a.keyword || a.price, m = (c = e == null ? void 0 : e.find((f) => f.key === a.menu)) == null ? void 0 : c.key;
|
|
1677
|
+
return /* @__PURE__ */ t(Gt, { children: /* @__PURE__ */ u(ct, { FallbackComponent: be, children: [
|
|
1678
|
+
!i && /* @__PURE__ */ t(Rr, {}),
|
|
1679
|
+
/* @__PURE__ */ u(
|
|
1664
1680
|
w,
|
|
1665
1681
|
{
|
|
1666
1682
|
ref: s,
|
|
1667
1683
|
display: "flex",
|
|
1668
1684
|
height: "100%",
|
|
1669
1685
|
className: "list-container",
|
|
1670
|
-
pt: { xs: 0, md:
|
|
1686
|
+
pt: { xs: 0, md: i ? 0 : 5 },
|
|
1671
1687
|
children: [
|
|
1672
|
-
/* @__PURE__ */ t(
|
|
1673
|
-
/* @__PURE__ */
|
|
1688
|
+
/* @__PURE__ */ t(dr, { menus: e }),
|
|
1689
|
+
/* @__PURE__ */ u(
|
|
1674
1690
|
O,
|
|
1675
1691
|
{
|
|
1676
1692
|
height: "100%",
|
|
1677
1693
|
position: "relative",
|
|
1678
1694
|
flex: 1,
|
|
1679
|
-
sx:
|
|
1695
|
+
sx: i ? {
|
|
1680
1696
|
overflowY: "auto",
|
|
1681
1697
|
ml: -2,
|
|
1682
1698
|
pr: 1,
|
|
@@ -1684,7 +1700,7 @@ function Br({ menus: e, children: r }) {
|
|
|
1684
1700
|
} : { overflow: "visible" },
|
|
1685
1701
|
children: [
|
|
1686
1702
|
m && (r == null ? void 0 : r(m)),
|
|
1687
|
-
!m && (n.showExplore && !
|
|
1703
|
+
!m && (n.showExplore && !l ? /* @__PURE__ */ t(yr, {}) : /* @__PURE__ */ t(Br, {}))
|
|
1688
1704
|
]
|
|
1689
1705
|
}
|
|
1690
1706
|
)
|
|
@@ -1693,10 +1709,10 @@ function Br({ menus: e, children: r }) {
|
|
|
1693
1709
|
)
|
|
1694
1710
|
] }) });
|
|
1695
1711
|
}
|
|
1696
|
-
function
|
|
1697
|
-
return /* @__PURE__ */
|
|
1698
|
-
/* @__PURE__ */
|
|
1699
|
-
/* @__PURE__ */
|
|
1712
|
+
function Wo(e) {
|
|
1713
|
+
return /* @__PURE__ */ u(Ht, { variant: "outlined", ...e, sx: { maxWidth: 400, borderRadius: "8px", p: { xs: 2, md: 3 }, ...e.sx }, children: [
|
|
1714
|
+
/* @__PURE__ */ u(te, { display: "flex", alignItems: "center", gap: 2, pb: 1, children: [
|
|
1715
|
+
/* @__PURE__ */ u(te, { display: "flex", alignItems: "center", gap: 2, flex: 1, children: [
|
|
1700
1716
|
/* @__PURE__ */ t(L, { variant: "rounded", width: 48, height: 48 }),
|
|
1701
1717
|
/* @__PURE__ */ t(L, { variant: "text", width: 60, height: 28 })
|
|
1702
1718
|
] }),
|
|
@@ -1704,7 +1720,7 @@ function Do(e) {
|
|
|
1704
1720
|
] }),
|
|
1705
1721
|
/* @__PURE__ */ t(L, { variant: "text", width: "100%", height: 24 }),
|
|
1706
1722
|
/* @__PURE__ */ t(L, { variant: "text", width: "90%", height: 24 }),
|
|
1707
|
-
/* @__PURE__ */
|
|
1723
|
+
/* @__PURE__ */ u(te, { display: "flex", alignItems: "center", gap: 1, pt: 1.5, children: [
|
|
1708
1724
|
/* @__PURE__ */ t(L, { variant: "rounded", width: 24, height: 24 }),
|
|
1709
1725
|
/* @__PURE__ */ t(L, { variant: "text", width: "15%", height: 20 }),
|
|
1710
1726
|
/* @__PURE__ */ t(L, { variant: "rounded", width: 24, height: 24, sx: { ml: 1 } }),
|
|
@@ -1712,12 +1728,12 @@ function Do(e) {
|
|
|
1712
1728
|
] })
|
|
1713
1729
|
] });
|
|
1714
1730
|
}
|
|
1715
|
-
function
|
|
1716
|
-
return e ? /* @__PURE__ */ t(_, { variant: "rectangular", width: r.width, height: r.height }) : /* @__PURE__ */ t(
|
|
1731
|
+
function $o({ showSkeleton: e, ...r }) {
|
|
1732
|
+
return e ? /* @__PURE__ */ t(_, { variant: "rectangular", width: r.width, height: r.height }) : /* @__PURE__ */ t(Vt, { ...r });
|
|
1717
1733
|
}
|
|
1718
|
-
function
|
|
1719
|
-
const { menus: r, children: o, ...n } = e,
|
|
1720
|
-
|
|
1734
|
+
function jo(e) {
|
|
1735
|
+
const { menus: r, children: o, ...n } = e, i = we(), a = tt(
|
|
1736
|
+
lt({}, i, {
|
|
1721
1737
|
typography: {
|
|
1722
1738
|
h1: {
|
|
1723
1739
|
fontSize: 32,
|
|
@@ -1744,12 +1760,12 @@ function Wo(e) {
|
|
|
1744
1760
|
}
|
|
1745
1761
|
})
|
|
1746
1762
|
);
|
|
1747
|
-
return /* @__PURE__ */ t(
|
|
1763
|
+
return /* @__PURE__ */ t(rt, { theme: a, children: /* @__PURE__ */ t(ir, { ...n, children: /* @__PURE__ */ t(Tr, { menus: r, children: o }) }) });
|
|
1748
1764
|
}
|
|
1749
1765
|
export {
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1766
|
+
et as Autocomplete,
|
|
1767
|
+
Wo as CardSkeleton,
|
|
1768
|
+
$o as Image,
|
|
1769
|
+
jo as default,
|
|
1770
|
+
Kt as useSearch
|
|
1755
1771
|
};
|