@builder.io/sdk-react-nextjs 0.21.1 → 0.22.1
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/browser/blocks/img/component-info.cjs +1 -1
- package/lib/browser/blocks/img/component-info.mjs +33 -3
- package/lib/browser/blocks/img/img.cjs +1 -1
- package/lib/browser/blocks/img/img.mjs +22 -17
- package/lib/browser/blocks/text/component-info.cjs +1 -1
- package/lib/browser/blocks/text/component-info.mjs +0 -1
- package/lib/browser/blocks/text/text.cjs +1 -1
- package/lib/browser/blocks/text/text.mjs +3 -2
- package/lib/browser/components/block/block.cjs +1 -1
- package/lib/browser/components/block/block.mjs +27 -20
- package/lib/browser/components/block/components/interactive-element.cjs +1 -1
- package/lib/browser/components/block/components/interactive-element.mjs +27 -15
- package/lib/browser/components/block/components/live-edit-block-styles.cjs +1 -0
- package/lib/browser/components/block/components/live-edit-block-styles.mjs +94 -0
- package/lib/browser/components/block/components/style-wrapper.cjs +1 -0
- package/lib/browser/components/block/components/style-wrapper.mjs +24 -0
- package/lib/browser/components/content/components/enable-editor.cjs +1 -1
- package/lib/browser/components/content/components/enable-editor.mjs +182 -164
- package/lib/browser/components/live-edit.cjs +1 -0
- package/lib/browser/components/live-edit.mjs +19 -0
- package/lib/browser/constants/builder-registered-components.cjs +1 -1
- package/lib/browser/constants/builder-registered-components.mjs +3 -2
- package/lib/browser/constants/extra-components.cjs +1 -1
- package/lib/browser/constants/extra-components.mjs +3 -2
- package/lib/browser/constants/sdk-version.cjs +1 -1
- package/lib/browser/constants/sdk-version.mjs +1 -1
- package/lib/browser/functions/get-content/generate-content-url.cjs +1 -1
- package/lib/browser/functions/get-content/generate-content-url.mjs +38 -42
- package/lib/browser/functions/get-content/index.cjs +1 -1
- package/lib/browser/functions/get-content/index.mjs +42 -36
- package/lib/browser/helpers/find-block.cjs +1 -0
- package/lib/browser/helpers/find-block.mjs +30 -0
- package/lib/browser/helpers/subscribe-to-editor.cjs +1 -1
- package/lib/browser/helpers/subscribe-to-editor.mjs +15 -15
- package/lib/edge/blocks/img/component-info.cjs +1 -1
- package/lib/edge/blocks/img/component-info.mjs +33 -3
- package/lib/edge/blocks/img/img.cjs +1 -1
- package/lib/edge/blocks/img/img.mjs +22 -17
- package/lib/edge/blocks/text/component-info.cjs +1 -1
- package/lib/edge/blocks/text/component-info.mjs +0 -1
- package/lib/edge/blocks/text/text.cjs +1 -1
- package/lib/edge/blocks/text/text.mjs +3 -2
- package/lib/edge/components/block/block.cjs +1 -1
- package/lib/edge/components/block/block.mjs +27 -20
- package/lib/edge/components/block/components/interactive-element.cjs +1 -1
- package/lib/edge/components/block/components/interactive-element.mjs +27 -15
- package/lib/edge/components/block/components/live-edit-block-styles.cjs +1 -0
- package/lib/edge/components/block/components/live-edit-block-styles.mjs +94 -0
- package/lib/edge/components/block/components/style-wrapper.cjs +1 -0
- package/lib/edge/components/block/components/style-wrapper.mjs +24 -0
- package/lib/edge/components/content/components/enable-editor.cjs +1 -1
- package/lib/edge/components/content/components/enable-editor.mjs +182 -164
- package/lib/edge/components/live-edit.cjs +1 -0
- package/lib/edge/components/live-edit.mjs +19 -0
- package/lib/edge/constants/builder-registered-components.cjs +1 -1
- package/lib/edge/constants/builder-registered-components.mjs +3 -2
- package/lib/edge/constants/extra-components.cjs +1 -1
- package/lib/edge/constants/extra-components.mjs +3 -2
- package/lib/edge/constants/sdk-version.cjs +1 -1
- package/lib/edge/constants/sdk-version.mjs +1 -1
- package/lib/edge/functions/get-content/generate-content-url.cjs +1 -1
- package/lib/edge/functions/get-content/generate-content-url.mjs +38 -42
- package/lib/edge/functions/get-content/index.cjs +1 -1
- package/lib/edge/functions/get-content/index.mjs +42 -36
- package/lib/edge/helpers/find-block.cjs +1 -0
- package/lib/edge/helpers/find-block.mjs +30 -0
- package/lib/edge/helpers/subscribe-to-editor.cjs +1 -1
- package/lib/edge/helpers/subscribe-to-editor.mjs +15 -15
- package/lib/node/blocks/img/component-info.cjs +1 -1
- package/lib/node/blocks/img/component-info.mjs +33 -3
- package/lib/node/blocks/img/img.cjs +1 -1
- package/lib/node/blocks/img/img.mjs +22 -17
- package/lib/node/blocks/text/component-info.cjs +1 -1
- package/lib/node/blocks/text/component-info.mjs +0 -1
- package/lib/node/blocks/text/text.cjs +1 -1
- package/lib/node/blocks/text/text.mjs +3 -2
- package/lib/node/components/block/block.cjs +1 -1
- package/lib/node/components/block/block.mjs +27 -20
- package/lib/node/components/block/components/interactive-element.cjs +1 -1
- package/lib/node/components/block/components/interactive-element.mjs +27 -15
- package/lib/node/components/block/components/live-edit-block-styles.cjs +1 -0
- package/lib/node/components/block/components/live-edit-block-styles.mjs +94 -0
- package/lib/node/components/block/components/style-wrapper.cjs +1 -0
- package/lib/node/components/block/components/style-wrapper.mjs +24 -0
- package/lib/node/components/content/components/enable-editor.cjs +1 -1
- package/lib/node/components/content/components/enable-editor.mjs +182 -164
- package/lib/node/components/live-edit.cjs +1 -0
- package/lib/node/components/live-edit.mjs +19 -0
- package/lib/node/constants/builder-registered-components.cjs +1 -1
- package/lib/node/constants/builder-registered-components.mjs +3 -2
- package/lib/node/constants/extra-components.cjs +1 -1
- package/lib/node/constants/extra-components.mjs +3 -2
- package/lib/node/constants/sdk-version.cjs +1 -1
- package/lib/node/constants/sdk-version.mjs +1 -1
- package/lib/node/functions/get-content/generate-content-url.cjs +1 -1
- package/lib/node/functions/get-content/generate-content-url.mjs +38 -42
- package/lib/node/functions/get-content/index.cjs +1 -1
- package/lib/node/functions/get-content/index.mjs +42 -36
- package/lib/node/helpers/find-block.cjs +1 -0
- package/lib/node/helpers/find-block.mjs +30 -0
- package/lib/node/helpers/subscribe-to-editor.cjs +1 -1
- package/lib/node/helpers/subscribe-to-editor.mjs +15 -15
- package/package.json +1 -1
- package/types/cjs/blocks/img/img.d.ts +2 -0
- package/types/cjs/components/block/components/live-edit-block-styles.d.ts +8 -0
- package/types/cjs/components/block/components/style-wrapper.d.ts +9 -0
- package/types/cjs/components/live-edit.d.ts +9 -0
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/helpers/find-block.d.ts +18 -0
- package/types/cjs/helpers/subscribe-to-editor.d.ts +3 -2
- package/types/esm/blocks/img/img.d.ts +2 -0
- package/types/esm/components/block/components/live-edit-block-styles.d.ts +8 -0
- package/types/esm/components/block/components/style-wrapper.d.ts +9 -0
- package/types/esm/components/live-edit.d.ts +9 -0
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/helpers/find-block.d.ts +18 -0
- package/types/esm/helpers/subscribe-to-editor.d.ts +3 -2
|
@@ -1,62 +1,58 @@
|
|
|
1
|
-
import { flatten as
|
|
2
|
-
import { normalizeSearchParams as
|
|
3
|
-
import { DEFAULT_API_VERSION as
|
|
4
|
-
import { getBuilderSearchParamsFromWindow as
|
|
1
|
+
import { flatten as U, flattenMongoQuery as I, unflatten as E } from "../../helpers/flatten.mjs";
|
|
2
|
+
import { normalizeSearchParams as F } from "../../helpers/search/search.mjs";
|
|
3
|
+
import { DEFAULT_API_VERSION as O } from "../../types/api-version.mjs";
|
|
4
|
+
import { getBuilderSearchParamsFromWindow as J } from "../get-builder-search-params/index.mjs";
|
|
5
5
|
import { isBrowser as R } from "../is-browser.mjs";
|
|
6
|
-
const
|
|
6
|
+
const w = (t) => typeof t == "number" && !isNaN(t) && t >= 0, V = (t) => {
|
|
7
7
|
const {
|
|
8
8
|
limit: a = 30,
|
|
9
9
|
userAttributes: r,
|
|
10
10
|
query: u,
|
|
11
|
-
model:
|
|
12
|
-
apiKey:
|
|
13
|
-
enrich:
|
|
14
|
-
locale:
|
|
15
|
-
apiVersion: o =
|
|
11
|
+
model: y,
|
|
12
|
+
apiKey: h,
|
|
13
|
+
enrich: d,
|
|
14
|
+
locale: P,
|
|
15
|
+
apiVersion: o = O,
|
|
16
16
|
fields: S,
|
|
17
17
|
omit: c,
|
|
18
|
-
offset:
|
|
19
|
-
cacheSeconds:
|
|
20
|
-
staleCacheSeconds:
|
|
21
|
-
sort:
|
|
22
|
-
includeUnpublished:
|
|
23
|
-
apiHost:
|
|
18
|
+
offset: f,
|
|
19
|
+
cacheSeconds: m,
|
|
20
|
+
staleCacheSeconds: l,
|
|
21
|
+
sort: b,
|
|
22
|
+
includeUnpublished: p,
|
|
23
|
+
apiHost: N
|
|
24
24
|
} = t;
|
|
25
|
-
if (!
|
|
25
|
+
if (!h)
|
|
26
26
|
throw new Error("Missing API key");
|
|
27
27
|
if (!["v3"].includes(o))
|
|
28
28
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${o}'`);
|
|
29
|
-
const
|
|
30
|
-
e.searchParams.set("apiKey",
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
...i
|
|
36
|
-
}), P && e.searchParams.set("enrich", String(P)), e.searchParams.set("omit", c != null ? c : "meta.componentsUsed"), S && e.searchParams.set("fields", S), Number.isFinite(l) && l > -1 && e.searchParams.set("offset", String(Math.floor(l))), typeof b == "boolean" && e.searchParams.set("includeUnpublished", String(b)), f && y(f) && e.searchParams.set("cacheSeconds", String(f)), m && y(m) && e.searchParams.set("staleCacheSeconds", String(m)), p) {
|
|
37
|
-
const s = w({
|
|
38
|
-
sort: p
|
|
29
|
+
const v = a !== 1, k = N || "https://cdn.builder.io", e = new URL(`${k}/api/${o}/content/${y}`);
|
|
30
|
+
e.searchParams.set("apiKey", h), e.searchParams.set("limit", String(a)), e.searchParams.set("noTraverse", String(v)), e.searchParams.set("includeRefs", String(!0)), P && e.searchParams.set("locale", P);
|
|
31
|
+
let n = r || {};
|
|
32
|
+
if (d && e.searchParams.set("enrich", String(d)), e.searchParams.set("omit", c != null ? c : "meta.componentsUsed"), S && e.searchParams.set("fields", S), Number.isFinite(f) && f > -1 && e.searchParams.set("offset", String(Math.floor(f))), typeof p == "boolean" && e.searchParams.set("includeUnpublished", String(p)), m && w(m) && e.searchParams.set("cacheSeconds", String(m)), l && w(l) && e.searchParams.set("staleCacheSeconds", String(l)), b) {
|
|
33
|
+
const s = U({
|
|
34
|
+
sort: b
|
|
39
35
|
});
|
|
40
|
-
for (const
|
|
41
|
-
e.searchParams.set(
|
|
36
|
+
for (const i in s)
|
|
37
|
+
e.searchParams.set(i, JSON.stringify(s[i]));
|
|
42
38
|
}
|
|
43
39
|
const g = {
|
|
44
|
-
...
|
|
45
|
-
...
|
|
40
|
+
...J(),
|
|
41
|
+
...F(t.options || {})
|
|
46
42
|
};
|
|
47
|
-
|
|
48
|
-
...
|
|
43
|
+
n = {
|
|
44
|
+
...n,
|
|
49
45
|
...$(g)
|
|
50
46
|
};
|
|
51
|
-
const
|
|
52
|
-
for (const s in
|
|
53
|
-
e.searchParams.set(s, String(
|
|
54
|
-
if (Object.keys(
|
|
55
|
-
const s =
|
|
47
|
+
const A = U(g);
|
|
48
|
+
for (const s in A)
|
|
49
|
+
e.searchParams.set(s, String(A[s]));
|
|
50
|
+
if (Object.keys(n).length > 0 && e.searchParams.set("userAttributes", JSON.stringify(n)), u) {
|
|
51
|
+
const s = I({
|
|
56
52
|
query: u
|
|
57
53
|
});
|
|
58
|
-
for (const
|
|
59
|
-
e.searchParams.set(
|
|
54
|
+
for (const i in s)
|
|
55
|
+
e.searchParams.set(i, JSON.stringify(s[i]));
|
|
60
56
|
}
|
|
61
57
|
return e;
|
|
62
58
|
}, T = (t) => {
|
|
@@ -69,11 +65,11 @@ const y = (t) => typeof t == "number" && !isNaN(t) && t >= 0, _ = (t) => {
|
|
|
69
65
|
t["userAttributes.urlPath"] = window.location.pathname, t["userAttributes.host"] = window.location.host;
|
|
70
66
|
const a = T(t), {
|
|
71
67
|
userAttributes: r
|
|
72
|
-
} =
|
|
68
|
+
} = E(a);
|
|
73
69
|
return r;
|
|
74
70
|
}
|
|
75
71
|
return {};
|
|
76
72
|
};
|
|
77
73
|
export {
|
|
78
|
-
|
|
74
|
+
V as generateContentUrl
|
|
79
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../../constants/target.cjs"),g=require("../../helpers/ab-tests.cjs"),w=require("../../helpers/canTrack.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../../constants/target.cjs"),g=require("../../helpers/ab-tests.cjs"),w=require("../../helpers/canTrack.cjs"),l=require("../../helpers/logger.cjs"),C=require("../../helpers/preview-lru-cache/get.cjs"),d=require("../../helpers/sdk-headers.cjs"),T=require("../get-fetch.cjs"),q=require("../is-browser.cjs"),u=require("./generate-content-url.cjs"),y=e=>"results"in e;async function k(e){var n;const t=e.locale||((n=e.userAttributes)==null?void 0:n.locale);t&&(e.locale=t,e.userAttributes={locale:t,...e.userAttributes});const r=await i({...e,limit:1});return r&&r[0]||null}const v=async e=>{var c,a;const t=u.generateContentUrl(e),r=(c=e.fetch)!=null?c:T.fetch,n={...e.fetchOptions,headers:{...(a=e.fetchOptions)==null?void 0:a.headers,...d.getSdkHeaders()}};return await(await r(t.href,n)).json()},o=async(e,t,r=u.generateContentUrl(e))=>{const n=w.getDefaultCanTrack(e.canTrack);if(r.search.includes("preview=")){const s=[];for(const c of t.results){const a=C.getPreviewContent(r.searchParams);s.push(a||c)}t.results=s}if(!n||!(q.isBrowser()||h.TARGET==="reactNative"))return t.results;try{const s=[];for(const c of t.results)s.push(await g.handleABTesting({item:c,canTrack:n}));t.results=s}catch(s){l.logger.error("Could not process A/B tests. ",s)}return t.results};async function i(e){const t=u.generateContentUrl(e),r=await v(e);if(!y(r))throw l.logger.error("Error fetching data. ",{url:t,content:r,options:e}),r;return o(e,r)}exports._processContentResult=o;exports.fetchEntries=i;exports.fetchOneEntry=k;
|
|
@@ -1,67 +1,73 @@
|
|
|
1
1
|
import { TARGET as u } from "../../constants/target.mjs";
|
|
2
|
-
import { handleABTesting as
|
|
2
|
+
import { handleABTesting as f } from "../../helpers/ab-tests.mjs";
|
|
3
3
|
import { getDefaultCanTrack as m } from "../../helpers/canTrack.mjs";
|
|
4
4
|
import { logger as i } from "../../helpers/logger.mjs";
|
|
5
5
|
import { getPreviewContent as h } from "../../helpers/preview-lru-cache/get.mjs";
|
|
6
6
|
import { getSdkHeaders as w } from "../../helpers/sdk-headers.mjs";
|
|
7
|
-
import { fetch as
|
|
8
|
-
import { isBrowser as
|
|
9
|
-
import { generateContentUrl as
|
|
10
|
-
const
|
|
11
|
-
async function
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
import { fetch as g } from "../get-fetch.mjs";
|
|
8
|
+
import { isBrowser as C } from "../is-browser.mjs";
|
|
9
|
+
import { generateContentUrl as o } from "./generate-content-url.mjs";
|
|
10
|
+
const d = (e) => "results" in e;
|
|
11
|
+
async function _(e) {
|
|
12
|
+
var n;
|
|
13
|
+
const t = e.locale || ((n = e.userAttributes) == null ? void 0 : n.locale);
|
|
14
|
+
t && (e.locale = t, e.userAttributes = {
|
|
15
|
+
locale: t,
|
|
16
|
+
...e.userAttributes
|
|
17
|
+
});
|
|
18
|
+
const r = await y({
|
|
19
|
+
...e,
|
|
14
20
|
limit: 1
|
|
15
21
|
});
|
|
16
|
-
return
|
|
22
|
+
return r && r[0] || null;
|
|
17
23
|
}
|
|
18
|
-
const
|
|
19
|
-
var
|
|
20
|
-
const
|
|
21
|
-
...
|
|
24
|
+
const p = async (e) => {
|
|
25
|
+
var c, a;
|
|
26
|
+
const t = o(e), r = (c = e.fetch) != null ? c : g, n = {
|
|
27
|
+
...e.fetchOptions,
|
|
22
28
|
headers: {
|
|
23
|
-
...(
|
|
29
|
+
...(a = e.fetchOptions) == null ? void 0 : a.headers,
|
|
24
30
|
...w()
|
|
25
31
|
}
|
|
26
32
|
};
|
|
27
|
-
return await (await r(
|
|
28
|
-
}, v = async (
|
|
29
|
-
const
|
|
33
|
+
return await (await r(t.href, n)).json();
|
|
34
|
+
}, v = async (e, t, r = o(e)) => {
|
|
35
|
+
const n = m(e.canTrack);
|
|
30
36
|
if (r.search.includes("preview=")) {
|
|
31
37
|
const s = [];
|
|
32
|
-
for (const
|
|
33
|
-
const
|
|
34
|
-
s.push(
|
|
38
|
+
for (const c of t.results) {
|
|
39
|
+
const a = h(r.searchParams);
|
|
40
|
+
s.push(a || c);
|
|
35
41
|
}
|
|
36
|
-
|
|
42
|
+
t.results = s;
|
|
37
43
|
}
|
|
38
|
-
if (!
|
|
39
|
-
return
|
|
44
|
+
if (!n || !(C() || u === "reactNative"))
|
|
45
|
+
return t.results;
|
|
40
46
|
try {
|
|
41
47
|
const s = [];
|
|
42
|
-
for (const
|
|
43
|
-
s.push(await
|
|
44
|
-
item:
|
|
45
|
-
canTrack:
|
|
48
|
+
for (const c of t.results)
|
|
49
|
+
s.push(await f({
|
|
50
|
+
item: c,
|
|
51
|
+
canTrack: n
|
|
46
52
|
}));
|
|
47
|
-
|
|
53
|
+
t.results = s;
|
|
48
54
|
} catch (s) {
|
|
49
55
|
i.error("Could not process A/B tests. ", s);
|
|
50
56
|
}
|
|
51
|
-
return
|
|
57
|
+
return t.results;
|
|
52
58
|
};
|
|
53
|
-
async function y(
|
|
54
|
-
const
|
|
55
|
-
if (!
|
|
59
|
+
async function y(e) {
|
|
60
|
+
const t = o(e), r = await p(e);
|
|
61
|
+
if (!d(r))
|
|
56
62
|
throw i.error("Error fetching data. ", {
|
|
57
|
-
url:
|
|
63
|
+
url: t,
|
|
58
64
|
content: r,
|
|
59
|
-
options:
|
|
65
|
+
options: e
|
|
60
66
|
}), r;
|
|
61
|
-
return v(
|
|
67
|
+
return v(e, r);
|
|
62
68
|
}
|
|
63
69
|
export {
|
|
64
70
|
v as _processContentResult,
|
|
65
71
|
y as fetchEntries,
|
|
66
|
-
|
|
72
|
+
_ as fetchOneEntry
|
|
67
73
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=(e,o)=>{var c;return l((c=e.data)==null?void 0:c.blocks,o)},l=(e,o)=>{var c,r,i;if(!e)return null;for(const n of e){if(n.id===o)return n;if(n.children){const t=l(n.children,o);if(t)return t}if(((c=n.component)==null?void 0:c.name)==="Columns"&&((i=(r=n.component)==null?void 0:r.options)!=null&&i.columns)){for(const t of n.component.options.columns)if(t.blocks){const f=l(t.blocks,o);if(f)return f}}}return null};exports.findBlockById=s;exports.findBlockInTree=l;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const s = (r, o) => {
|
|
2
|
+
var c;
|
|
3
|
+
return l((c = r.data) == null ? void 0 : c.blocks, o);
|
|
4
|
+
}, l = (r, o) => {
|
|
5
|
+
var c, e, i;
|
|
6
|
+
if (!r)
|
|
7
|
+
return null;
|
|
8
|
+
for (const n of r) {
|
|
9
|
+
if (n.id === o)
|
|
10
|
+
return n;
|
|
11
|
+
if (n.children) {
|
|
12
|
+
const t = l(n.children, o);
|
|
13
|
+
if (t)
|
|
14
|
+
return t;
|
|
15
|
+
}
|
|
16
|
+
if (((c = n.component) == null ? void 0 : c.name) === "Columns" && ((i = (e = n.component) == null ? void 0 : e.options) != null && i.columns)) {
|
|
17
|
+
for (const t of n.component.options.columns)
|
|
18
|
+
if (t.blocks) {
|
|
19
|
+
const f = l(t.blocks, o);
|
|
20
|
+
if (f)
|
|
21
|
+
return f;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
s as findBlockById,
|
|
29
|
+
l as findBlockInTree
|
|
30
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../functions/is-browser.cjs"),b=require("../functions/is-from-trusted-host.cjs"),g=require("../scripts/init-editing.cjs"),m=require("./logger.cjs"),c=({model:n,trustedHosts:s,callbacks:r})=>i=>{if(!b.isFromTrustedHost(s,i))return;const{data:t}=i;if(t)switch(t.type){case"builder.configureSdk":{r.configureSdk(t.data);break}case"builder.triggerAnimation":{r.animation(t.data);break}case"builder.resetState":{const e=t.data,a=e.model,o=e==null?void 0:e.state,d=e.editType;a===n&&o&&r.stateUpdate(o,d);break}case"builder.contentUpdate":{const e=t.data,a=e.key||e.alias||e.entry||e.modelName,o=e.data,d=e.editType;a===n&&r.contentUpdate(o,d);break}}},p=({model:n,apiKey:s,callback:r,trustedHosts:i})=>{if(!u.isBrowser)return m.logger.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."),()=>{};g.setupBrowserForEditing({modelName:n,apiKey:s});const t=c({callbacks:{contentUpdate:r,animation:()=>{},configureSdk:()=>{},stateUpdate:()=>{}},model:n,trustedHosts:i});return window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}};exports.createEditorListener=c;exports.subscribeToEditor=p;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { isBrowser as
|
|
2
|
-
import { isFromTrustedHost as
|
|
3
|
-
import { setupBrowserForEditing as
|
|
4
|
-
import { logger as
|
|
1
|
+
import { isBrowser as c } from "../functions/is-browser.mjs";
|
|
2
|
+
import { isFromTrustedHost as m } from "../functions/is-from-trusted-host.mjs";
|
|
3
|
+
import { setupBrowserForEditing as u } from "../scripts/init-editing.mjs";
|
|
4
|
+
import { logger as p } from "./logger.mjs";
|
|
5
5
|
const b = ({
|
|
6
6
|
model: o,
|
|
7
|
-
trustedHosts:
|
|
7
|
+
trustedHosts: s,
|
|
8
8
|
callbacks: r
|
|
9
9
|
}) => (n) => {
|
|
10
|
-
if (!
|
|
10
|
+
if (!m(s, n))
|
|
11
11
|
return;
|
|
12
12
|
const {
|
|
13
13
|
data: t
|
|
@@ -23,28 +23,28 @@ const b = ({
|
|
|
23
23
|
break;
|
|
24
24
|
}
|
|
25
25
|
case "builder.resetState": {
|
|
26
|
-
const e = t.data,
|
|
27
|
-
|
|
26
|
+
const e = t.data, a = e.model, i = e == null ? void 0 : e.state, d = e.editType;
|
|
27
|
+
a === o && i && r.stateUpdate(i, d);
|
|
28
28
|
break;
|
|
29
29
|
}
|
|
30
30
|
case "builder.contentUpdate": {
|
|
31
|
-
const e = t.data,
|
|
32
|
-
|
|
31
|
+
const e = t.data, a = e.key || e.alias || e.entry || e.modelName, i = e.data, d = e.editType;
|
|
32
|
+
a === o && r.contentUpdate(i, d);
|
|
33
33
|
break;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}, k = ({
|
|
37
37
|
model: o,
|
|
38
|
-
apiKey:
|
|
38
|
+
apiKey: s,
|
|
39
39
|
callback: r,
|
|
40
40
|
trustedHosts: n
|
|
41
41
|
}) => {
|
|
42
|
-
if (!
|
|
43
|
-
return
|
|
42
|
+
if (!c)
|
|
43
|
+
return p.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."), () => {
|
|
44
44
|
};
|
|
45
|
-
|
|
45
|
+
u({
|
|
46
46
|
modelName: o,
|
|
47
|
-
apiKey:
|
|
47
|
+
apiKey: s
|
|
48
48
|
});
|
|
49
49
|
const t = b({
|
|
50
50
|
callbacks: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../constants/file-types.cjs"),t={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:e.IMAGE_FILE_TYPES,required:!0}],
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../constants/file-types.cjs"),t={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:e.IMAGE_FILE_TYPES,required:!0},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"title",type:"string",helperText:"Text to display when hovering over the asset"},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],noWrap:!0};exports.componentInfo=t;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IMAGE_FILE_TYPES as e } from "../../constants/file-types.mjs";
|
|
2
2
|
const o = {
|
|
3
|
-
// friendlyName?
|
|
4
3
|
name: "Raw:Img",
|
|
5
4
|
hideFromInsertMenu: !0,
|
|
6
5
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
@@ -10,9 +9,40 @@ const o = {
|
|
|
10
9
|
type: "file",
|
|
11
10
|
allowedFileTypes: e,
|
|
12
11
|
required: !0
|
|
12
|
+
}, {
|
|
13
|
+
name: "backgroundSize",
|
|
14
|
+
type: "text",
|
|
15
|
+
defaultValue: "cover",
|
|
16
|
+
enum: [{
|
|
17
|
+
label: "contain",
|
|
18
|
+
value: "contain",
|
|
19
|
+
helperText: "The image should never get cropped"
|
|
20
|
+
}, {
|
|
21
|
+
label: "cover",
|
|
22
|
+
value: "cover",
|
|
23
|
+
helperText: "The image should fill it's box, cropping when needed"
|
|
24
|
+
}]
|
|
25
|
+
}, {
|
|
26
|
+
name: "backgroundPosition",
|
|
27
|
+
type: "text",
|
|
28
|
+
defaultValue: "center",
|
|
29
|
+
enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
|
|
30
|
+
}, {
|
|
31
|
+
name: "altText",
|
|
32
|
+
type: "string",
|
|
33
|
+
helperText: "Text to display when the user has images off"
|
|
34
|
+
}, {
|
|
35
|
+
name: "title",
|
|
36
|
+
type: "string",
|
|
37
|
+
helperText: "Text to display when hovering over the asset"
|
|
38
|
+
}, {
|
|
39
|
+
name: "aspectRatio",
|
|
40
|
+
type: "number",
|
|
41
|
+
helperText: "This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",
|
|
42
|
+
advanced: !0,
|
|
43
|
+
defaultValue: 0.7041
|
|
13
44
|
}],
|
|
14
|
-
noWrap: !0
|
|
15
|
-
static: !0
|
|
45
|
+
noWrap: !0
|
|
16
46
|
};
|
|
17
47
|
export {
|
|
18
48
|
o as componentInfo
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";const
|
|
1
|
+
"use client";"use strict";const s=require("react/jsx-runtime"),c=require("../../functions/is-editing.cjs"),a=require("../../functions/get-class-prop-name.cjs");function r(t){var e;function n(){const i={...t.attributes,[a.getClassPropName()]:`builder-raw-img ${t.attributes[a.getClassPropName()]||""}`};return delete i.style,i}return s.jsx("img",{loading:"lazy",alt:t.altText,title:t.title,src:t.imgSrc||t.image,...n(),style:{objectFit:t.backgroundSize||"cover",objectPosition:t.backgroundPosition||"center",aspectRatio:t.aspectRatio||void 0,...((e=t.attributes)==null?void 0:e.style)||{}}},c.isEditing()&&t.imgSrc||"default-key")}module.exports=r;
|
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { isEditing as
|
|
4
|
-
import {
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { isEditing as r } from "../../functions/is-editing.mjs";
|
|
4
|
+
import { getClassPropName as a } from "../../functions/get-class-prop-name.mjs";
|
|
5
|
+
function u(t) {
|
|
6
|
+
var e;
|
|
7
|
+
function n() {
|
|
8
|
+
const i = {
|
|
9
|
+
...t.attributes,
|
|
10
|
+
[a()]: `builder-raw-img ${t.attributes[a()] || ""}`
|
|
11
|
+
};
|
|
12
|
+
return delete i.style, i;
|
|
10
13
|
}
|
|
11
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ o(
|
|
12
15
|
"img",
|
|
13
16
|
{
|
|
14
17
|
loading: "lazy",
|
|
15
|
-
style: {
|
|
16
|
-
objectFit: t.backgroundSize || "cover",
|
|
17
|
-
objectPosition: t.backgroundPosition || "center"
|
|
18
|
-
},
|
|
19
18
|
alt: t.altText,
|
|
19
|
+
title: t.title,
|
|
20
20
|
src: t.imgSrc || t.image,
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
...n(),
|
|
22
|
+
style: {
|
|
23
|
+
objectFit: t.backgroundSize || "cover",
|
|
24
|
+
objectPosition: t.backgroundPosition || "center",
|
|
25
|
+
aspectRatio: t.aspectRatio || void 0,
|
|
26
|
+
...((e = t.attributes) == null ? void 0 : e.style) || {}
|
|
27
|
+
}
|
|
23
28
|
},
|
|
24
|
-
|
|
29
|
+
r() && t.imgSrc || "default-key"
|
|
25
30
|
);
|
|
26
31
|
}
|
|
27
32
|
export {
|
|
28
|
-
|
|
33
|
+
u as default
|
|
29
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={shouldReceiveBuilderProps:{},name:"Text",static:!0,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={shouldReceiveBuilderProps:{},name:"Text",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};exports.componentInfo=e;
|
|
@@ -2,7 +2,6 @@ const e = {
|
|
|
2
2
|
shouldReceiveBuilderProps: {},
|
|
3
3
|
name: "Text",
|
|
4
4
|
static: !0,
|
|
5
|
-
isRSC: !0,
|
|
6
5
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
|
|
7
6
|
inputs: [{
|
|
8
7
|
name: "text",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime");function
|
|
1
|
+
"use client";"use strict";const n=require("react/jsx-runtime");function s(t){var e;return n.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((e=t.text)==null?void 0:e.toString())||""},style:{outline:"none"}})}module.exports=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),v=require("../../constants/target.cjs"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),v=require("../../constants/target.cjs"),j=require("../../functions/get-block-component-options.cjs"),P=require("../../functions/get-processed-block.cjs"),S=require("../../functions/is-previewing.cjs");require("../../helpers/user-attributes.cjs");require("../../functions/get-fetch.cjs");const d=require("./block.helpers.cjs"),q=require("./components/block-wrapper.cjs"),h=require("./components/component-ref/component-ref.cjs"),p=require("./components/repeated-block.cjs"),O=require("./components/style-wrapper.cjs");function b(e){var a,C,x,g;const m=function(){return d.getRepeatItemData({block:e.block,context:e.context})},u={value:null,update:!1},c=function(){var i;if(u.value&&!u.update&&!S.isPreviewing())return u.value;const r=(i=e.block.repeat)!=null&&i.collection?e.block:P.getProcessedBlock({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context});return u.value=r,u.update=!1,r},l=function(){return d.getComponent({block:c(),registeredComponents:e.registeredComponents,model:e.context.model})},f=function(){var i;return e.block.tagName==="a"||((i=c().properties)==null?void 0:i.href)||c().href?e.linkComponent||"a":e.block.tagName||"div"},B=function(){var s,k;if((s=e.block.repeat)!=null&&s.collection)return!!((k=m())!=null&&k.length);const r="hide"in c()?c().hide:!1;return("show"in c()?c().show:!0)&&!r},R=function(){var i,s;return!((i=l())!=null&&i.component)&&!m()?(s=c().children)!=null?s:[]:[]},n=function(){var r,i,s,k;return{blockChildren:(r=c().children)!=null?r:[],componentRef:(i=l())==null?void 0:i.component,componentOptions:{...j.getBlockComponentOptions(c(),e.context),...d.provideBuilderBlock(l(),c()),...d.provideBuilderContext(l(),e.context),...d.provideLinkComponent(l(),e.linkComponent),...d.provideRegisteredComponents(l(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:c(),includeBlockProps:((s=l())==null?void 0:s.noWrap)===!0,isInteractive:!((k=l())!=null&&k.isRSC&&v.TARGET==="rsc")}};return t.jsx(t.Fragment,{children:B()?t.jsxs(t.Fragment,{children:[t.jsx(O,{block:c(),context:e.context,id:e.block.id}),(a=l())!=null&&a.noWrap?m()?t.jsx(t.Fragment,{children:(g=m())==null?void 0:g.map((o,r)=>t.jsx(p,{repeatContext:o.context,block:o.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},d.generateKey(r)))}):t.jsx(h,{componentRef:n().componentRef,componentOptions:n().componentOptions,blockChildren:n().blockChildren,context:n().context,registeredComponents:n().registeredComponents,linkComponent:n().linkComponent,builderBlock:n().builderBlock,includeBlockProps:n().includeBlockProps,isInteractive:n().isInteractive}):t.jsx(t.Fragment,{children:m()?t.jsx(t.Fragment,{children:(x=m())==null?void 0:x.map((o,r)=>t.jsx(p,{repeatContext:o.context,block:o.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},d.generateKey(r)))}):t.jsxs(q,{Wrapper:f(),block:c(),context:e.context,children:[t.jsx(h,{componentRef:n().componentRef,componentOptions:n().componentOptions,blockChildren:n().blockChildren,context:n().context,registeredComponents:n().registeredComponents,linkComponent:n().linkComponent,builderBlock:n().builderBlock,includeBlockProps:n().includeBlockProps,isInteractive:n().isInteractive}),(C=R())==null?void 0:C.map(o=>t.jsx(b,{block:o,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},o.id))]})})]}):null})}module.exports=b;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r, Fragment as u, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import { TARGET as S } from "../../constants/target.mjs";
|
|
3
3
|
import { getBlockComponentOptions as P } from "../../functions/get-block-component-options.mjs";
|
|
4
4
|
import { getProcessedBlock as I } from "../../functions/get-processed-block.mjs";
|
|
@@ -6,10 +6,10 @@ import { isPreviewing as O } from "../../functions/is-previewing.mjs";
|
|
|
6
6
|
import "../../helpers/user-attributes.mjs";
|
|
7
7
|
import "../../functions/get-fetch.mjs";
|
|
8
8
|
import { generateKey as x, getRepeatItemData as w, getComponent as W, provideBuilderBlock as T, provideBuilderContext as L, provideLinkComponent as U, provideRegisteredComponents as j } from "./block.helpers.mjs";
|
|
9
|
-
import y from "./components/block-
|
|
10
|
-
import N from "./components/block-wrapper.mjs";
|
|
9
|
+
import y from "./components/block-wrapper.mjs";
|
|
11
10
|
import b from "./components/component-ref/component-ref.mjs";
|
|
12
11
|
import g from "./components/repeated-block.mjs";
|
|
12
|
+
import N from "./components/style-wrapper.mjs";
|
|
13
13
|
function A(e) {
|
|
14
14
|
var a, C, p, f;
|
|
15
15
|
const d = function() {
|
|
@@ -32,7 +32,7 @@ function A(e) {
|
|
|
32
32
|
context: e.context.context
|
|
33
33
|
});
|
|
34
34
|
return s.value = c, s.update = !1, c;
|
|
35
|
-
},
|
|
35
|
+
}, l = function() {
|
|
36
36
|
return W({
|
|
37
37
|
block: n(),
|
|
38
38
|
registeredComponents: e.registeredComponents,
|
|
@@ -49,19 +49,19 @@ function A(e) {
|
|
|
49
49
|
return ("show" in n() ? n().show : !0) && !c;
|
|
50
50
|
}, v = function() {
|
|
51
51
|
var i, m;
|
|
52
|
-
return !((i =
|
|
52
|
+
return !((i = l()) != null && i.component) && !d() ? (m = n().children) != null ? m : [] : [];
|
|
53
53
|
}, o = function() {
|
|
54
54
|
var c, i, m, k;
|
|
55
55
|
return {
|
|
56
56
|
blockChildren: (c = n().children) != null ? c : [],
|
|
57
|
-
componentRef: (i =
|
|
57
|
+
componentRef: (i = l()) == null ? void 0 : i.component,
|
|
58
58
|
componentOptions: {
|
|
59
59
|
...P(n(), e.context),
|
|
60
|
-
...T(
|
|
61
|
-
...L(
|
|
62
|
-
...U(
|
|
60
|
+
...T(l(), n()),
|
|
61
|
+
...L(l(), e.context),
|
|
62
|
+
...U(l(), e.linkComponent),
|
|
63
63
|
...j(
|
|
64
|
-
|
|
64
|
+
l(),
|
|
65
65
|
e.registeredComponents,
|
|
66
66
|
e.context.model
|
|
67
67
|
)
|
|
@@ -70,13 +70,20 @@ function A(e) {
|
|
|
70
70
|
linkComponent: e.linkComponent,
|
|
71
71
|
registeredComponents: e.registeredComponents,
|
|
72
72
|
builderBlock: n(),
|
|
73
|
-
includeBlockProps: ((m =
|
|
74
|
-
isInteractive: !((k =
|
|
73
|
+
includeBlockProps: ((m = l()) == null ? void 0 : m.noWrap) === !0,
|
|
74
|
+
isInteractive: !((k = l()) != null && k.isRSC && S === "rsc")
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
|
-
return /* @__PURE__ */
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
|
|
77
|
+
return /* @__PURE__ */ r(u, { children: R() ? /* @__PURE__ */ h(u, { children: [
|
|
78
|
+
/* @__PURE__ */ r(
|
|
79
|
+
N,
|
|
80
|
+
{
|
|
81
|
+
block: n(),
|
|
82
|
+
context: e.context,
|
|
83
|
+
id: e.block.id
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
(a = l()) != null && a.noWrap ? d() ? /* @__PURE__ */ r(u, { children: (f = d()) == null ? void 0 : f.map((t, c) => /* @__PURE__ */ r(
|
|
80
87
|
g,
|
|
81
88
|
{
|
|
82
89
|
repeatContext: t.context,
|
|
@@ -85,7 +92,7 @@ function A(e) {
|
|
|
85
92
|
linkComponent: e.linkComponent
|
|
86
93
|
},
|
|
87
94
|
x(c)
|
|
88
|
-
)) }) : /* @__PURE__ */
|
|
95
|
+
)) }) : /* @__PURE__ */ r(
|
|
89
96
|
b,
|
|
90
97
|
{
|
|
91
98
|
componentRef: o().componentRef,
|
|
@@ -98,7 +105,7 @@ function A(e) {
|
|
|
98
105
|
includeBlockProps: o().includeBlockProps,
|
|
99
106
|
isInteractive: o().isInteractive
|
|
100
107
|
}
|
|
101
|
-
) : /* @__PURE__ */
|
|
108
|
+
) : /* @__PURE__ */ r(u, { children: d() ? /* @__PURE__ */ r(u, { children: (p = d()) == null ? void 0 : p.map((t, c) => /* @__PURE__ */ r(
|
|
102
109
|
g,
|
|
103
110
|
{
|
|
104
111
|
repeatContext: t.context,
|
|
@@ -108,13 +115,13 @@ function A(e) {
|
|
|
108
115
|
},
|
|
109
116
|
x(c)
|
|
110
117
|
)) }) : /* @__PURE__ */ h(
|
|
111
|
-
|
|
118
|
+
y,
|
|
112
119
|
{
|
|
113
120
|
Wrapper: B(),
|
|
114
121
|
block: n(),
|
|
115
122
|
context: e.context,
|
|
116
123
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ r(
|
|
118
125
|
b,
|
|
119
126
|
{
|
|
120
127
|
componentRef: o().componentRef,
|
|
@@ -128,7 +135,7 @@ function A(e) {
|
|
|
128
135
|
isInteractive: o().isInteractive
|
|
129
136
|
}
|
|
130
137
|
),
|
|
131
|
-
(C = v()) == null ? void 0 : C.map((t) => /* @__PURE__ */
|
|
138
|
+
(C = v()) == null ? void 0 : C.map((t) => /* @__PURE__ */ r(
|
|
132
139
|
A,
|
|
133
140
|
{
|
|
134
141
|
block: t,
|