@storyblok/astro 5.0.0 → 5.0.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/README.md +0 -10
- package/dist/storyblok-astro.js +4 -4
- package/dist/storyblok-astro.mjs +383 -382
- package/package.json +6 -6
package/dist/storyblok-astro.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function Or(o, r,
|
|
1
|
+
function Or(o, r, t) {
|
|
2
2
|
const i = "virtual:storyblok-init", s = "\0" + i;
|
|
3
3
|
return {
|
|
4
4
|
name: "vite-plugin-storyblok-init",
|
|
@@ -13,22 +13,22 @@ function Or(o, r, e) {
|
|
|
13
13
|
const { storyblokApi } = storyblokInit({
|
|
14
14
|
accessToken: "${o}",
|
|
15
15
|
use: ${r ? "[]" : "[apiPlugin]"},
|
|
16
|
-
apiOptions: ${JSON.stringify(
|
|
16
|
+
apiOptions: ${JSON.stringify(t)},
|
|
17
17
|
});
|
|
18
18
|
export const storyblokApiInstance = storyblokApi;
|
|
19
19
|
`;
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
const Cr = /[\p{Lu}]/u, jr = /[\p{Ll}]/u,
|
|
23
|
+
const Cr = /[\p{Lu}]/u, jr = /[\p{Ll}]/u, ze = /^[\p{Lu}](?![\p{Lu}])/gu, Ge = /([\p{Alpha}\p{N}_]|$)/u, fe = /[_.\- ]+/, $r = new RegExp("^" + fe.source), Le = new RegExp(fe.source + Ge.source, "gu"), De = new RegExp("\\d+" + Ge.source, "gu"), xr = (o, r, t, i) => {
|
|
24
24
|
let s = !1, l = !1, u = !1, f = !1;
|
|
25
25
|
for (let g = 0; g < o.length; g++) {
|
|
26
26
|
const b = o[g];
|
|
27
|
-
f = g > 2 ? o[g - 3] === "-" : !0, s && Cr.test(b) ? (o = o.slice(0, g) + "-" + o.slice(g), s = !1, u = l, l = !0, g++) : l && u && jr.test(b) && (!f || i) ? (o = o.slice(0, g - 1) + "-" + o.slice(g - 1), u = l, l = !1, s = !0) : (s = r(b) === b &&
|
|
27
|
+
f = g > 2 ? o[g - 3] === "-" : !0, s && Cr.test(b) ? (o = o.slice(0, g) + "-" + o.slice(g), s = !1, u = l, l = !0, g++) : l && u && jr.test(b) && (!f || i) ? (o = o.slice(0, g - 1) + "-" + o.slice(g - 1), u = l, l = !1, s = !0) : (s = r(b) === b && t(b) !== b, u = l, l = t(b) === b && r(b) !== b);
|
|
28
28
|
}
|
|
29
29
|
return o;
|
|
30
|
-
}, Er = (o, r) => (
|
|
31
|
-
function
|
|
30
|
+
}, Er = (o, r) => (ze.lastIndex = 0, o.replaceAll(ze, (t) => r(t))), Rr = (o, r) => (Le.lastIndex = 0, De.lastIndex = 0, o.replaceAll(De, (t, i, s) => ["_", "-"].includes(o.charAt(s + t.length)) ? t : r(t)).replaceAll(Le, (t, i) => r(i)));
|
|
31
|
+
function Ue(o, r) {
|
|
32
32
|
if (!(typeof o == "string" || Array.isArray(o)))
|
|
33
33
|
throw new TypeError("Expected the input to be `string | string[]`");
|
|
34
34
|
if (r = {
|
|
@@ -37,10 +37,10 @@ function Ut(o, r) {
|
|
|
37
37
|
...r
|
|
38
38
|
}, Array.isArray(o) ? o = o.map((l) => l.trim()).filter((l) => l.length).join("-") : o = o.trim(), o.length === 0)
|
|
39
39
|
return "";
|
|
40
|
-
const
|
|
41
|
-
return o.length === 1 ?
|
|
40
|
+
const t = r.locale === !1 ? (l) => l.toLowerCase() : (l) => l.toLocaleLowerCase(r.locale), i = r.locale === !1 ? (l) => l.toUpperCase() : (l) => l.toLocaleUpperCase(r.locale);
|
|
41
|
+
return o.length === 1 ? fe.test(o) ? "" : r.pascalCase ? i(o) : t(o) : (o !== t(o) && (o = xr(o, t, i, r.preserveConsecutiveUppercase)), o = o.replace($r, ""), o = r.preserveConsecutiveUppercase ? Er(o, t) : t(o), r.pascalCase && (o = i(o.charAt(0)) + o.slice(1)), Rr(o, i));
|
|
42
42
|
}
|
|
43
|
-
function Pr(o, r,
|
|
43
|
+
function Pr(o, r, t, i) {
|
|
44
44
|
const s = "virtual:storyblok-components", l = "\0" + s;
|
|
45
45
|
return {
|
|
46
46
|
name: "vite-plugin-storyblok-components",
|
|
@@ -56,8 +56,8 @@ function Pr(o, r, e, i) {
|
|
|
56
56
|
"/" + o + "/" + k + ".astro"
|
|
57
57
|
);
|
|
58
58
|
if (I)
|
|
59
|
-
f.push(`import ${
|
|
60
|
-
else if (
|
|
59
|
+
f.push(`import ${Ue(_)} from "${I.id}"`);
|
|
60
|
+
else if (t)
|
|
61
61
|
g.push(_);
|
|
62
62
|
else
|
|
63
63
|
throw new Error(
|
|
@@ -65,7 +65,7 @@ function Pr(o, r, e, i) {
|
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
let b = "";
|
|
68
|
-
if (
|
|
68
|
+
if (t)
|
|
69
69
|
if (b = ",FallbackComponent", i) {
|
|
70
70
|
const _ = await this.resolve(
|
|
71
71
|
"/" + o + "/" + i + ".astro"
|
|
@@ -82,8 +82,8 @@ function Pr(o, r, e, i) {
|
|
|
82
82
|
"import FallbackComponent from '@storyblok/astro/FallbackComponent.astro'"
|
|
83
83
|
);
|
|
84
84
|
if (Object.values(r).length)
|
|
85
|
-
return `${f.join(";")};export default {${Object.keys(r).filter((_) => !g.includes(_)).map((_) =>
|
|
86
|
-
if (
|
|
85
|
+
return `${f.join(";")};export default {${Object.keys(r).filter((_) => !g.includes(_)).map((_) => Ue(_)).join(",")}${b}}`;
|
|
86
|
+
if (t)
|
|
87
87
|
return `${f[0]}; export default {${b.replace(",", "")}}`;
|
|
88
88
|
throw new Error(
|
|
89
89
|
`Currently, no Storyblok components are registered in astro.config.mjs.
|
|
@@ -95,53 +95,52 @@ Detailed information can be found here: https://github.com/storyblok/storyblok-a
|
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
function Mr(o) {
|
|
98
|
-
const r = "virtual:storyblok-options",
|
|
98
|
+
const r = "virtual:storyblok-options", t = "\0" + r;
|
|
99
99
|
return {
|
|
100
100
|
name: "vite-plugin-storyblok-options",
|
|
101
101
|
async resolveId(i) {
|
|
102
102
|
if (i === r)
|
|
103
|
-
return
|
|
103
|
+
return t;
|
|
104
104
|
},
|
|
105
105
|
async load(i) {
|
|
106
|
-
if (i ===
|
|
106
|
+
if (i === t)
|
|
107
107
|
return `export default ${JSON.stringify(o)}`;
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
|
-
let
|
|
112
|
-
const
|
|
111
|
+
let Be = !1;
|
|
112
|
+
const Fe = [], Nr = (o) => new Promise((r, t) => {
|
|
113
113
|
if (typeof window > "u" || (window.storyblokRegisterEvent = (s) => {
|
|
114
114
|
if (window.location === window.parent.location) {
|
|
115
115
|
console.warn("You are not in Draft Mode or in the Visual Editor.");
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
|
-
|
|
119
|
-
}, document.getElementById("storyblok-javascript-bridge")))
|
|
120
|
-
return;
|
|
118
|
+
Be ? s() : Fe.push(s);
|
|
119
|
+
}, document.getElementById("storyblok-javascript-bridge"))) return;
|
|
121
120
|
const i = document.createElement("script");
|
|
122
|
-
i.async = !0, i.src = o, i.id = "storyblok-javascript-bridge", i.onerror = (s) =>
|
|
123
|
-
|
|
121
|
+
i.async = !0, i.src = o, i.id = "storyblok-javascript-bridge", i.onerror = (s) => t(s), i.onload = (s) => {
|
|
122
|
+
Fe.forEach((l) => l()), Be = !0, r(s);
|
|
124
123
|
}, document.getElementsByTagName("head")[0].appendChild(i);
|
|
125
124
|
});
|
|
126
|
-
var zr = Object.defineProperty, Lr = (o, r,
|
|
125
|
+
var zr = Object.defineProperty, Lr = (o, r, t) => r in o ? zr(o, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[r] = t, S = (o, r, t) => (Lr(o, typeof r != "symbol" ? r + "" : r, t), t);
|
|
127
126
|
class Dr {
|
|
128
127
|
constructor() {
|
|
129
|
-
S(this, "isCDNUrl", (r = "") => r.indexOf("/cdn/") > -1), S(this, "getOptionsPage", (r,
|
|
128
|
+
S(this, "isCDNUrl", (r = "") => r.indexOf("/cdn/") > -1), S(this, "getOptionsPage", (r, t = 25, i = 1) => ({
|
|
130
129
|
...r,
|
|
131
|
-
per_page:
|
|
130
|
+
per_page: t,
|
|
132
131
|
page: i
|
|
133
|
-
})), S(this, "delay", (r) => new Promise((
|
|
134
|
-
const i = Math.abs(
|
|
132
|
+
})), S(this, "delay", (r) => new Promise((t) => setTimeout(t, r))), S(this, "arrayFrom", (r = 0, t) => [...Array(r)].map(t)), S(this, "range", (r = 0, t = r) => {
|
|
133
|
+
const i = Math.abs(t - r) || 0, s = r < t ? 1 : -1;
|
|
135
134
|
return this.arrayFrom(i, (l, u) => u * s + r);
|
|
136
|
-
}), S(this, "asyncMap", async (r,
|
|
137
|
-
const
|
|
135
|
+
}), S(this, "asyncMap", async (r, t) => Promise.all(r.map(t))), S(this, "flatMap", (r = [], t) => r.map(t).reduce((i, s) => [...i, ...s], [])), S(this, "escapeHTML", function(r) {
|
|
136
|
+
const t = {
|
|
138
137
|
"&": "&",
|
|
139
138
|
"<": "<",
|
|
140
139
|
">": ">",
|
|
141
140
|
'"': """,
|
|
142
141
|
"'": "'"
|
|
143
142
|
}, i = /[&<>"']/g, s = RegExp(i.source);
|
|
144
|
-
return r && s.test(r) ? r.replace(i, (l) =>
|
|
143
|
+
return r && s.test(r) ? r.replace(i, (l) => t[l]) : r;
|
|
145
144
|
});
|
|
146
145
|
}
|
|
147
146
|
/**
|
|
@@ -151,7 +150,7 @@ class Dr {
|
|
|
151
150
|
* @param {Boolean} isArray
|
|
152
151
|
* @return {String} Stringified object
|
|
153
152
|
*/
|
|
154
|
-
stringify(r,
|
|
153
|
+
stringify(r, t, i) {
|
|
155
154
|
const s = [];
|
|
156
155
|
for (const l in r) {
|
|
157
156
|
if (!Object.prototype.hasOwnProperty.call(r, l))
|
|
@@ -160,9 +159,9 @@ class Dr {
|
|
|
160
159
|
let g;
|
|
161
160
|
typeof u == "object" ? g = this.stringify(
|
|
162
161
|
u,
|
|
163
|
-
|
|
162
|
+
t ? t + encodeURIComponent("[" + f + "]") : f,
|
|
164
163
|
Array.isArray(u)
|
|
165
|
-
) : g = (
|
|
164
|
+
) : g = (t ? t + encodeURIComponent("[" + f + "]") : f) + "=" + encodeURIComponent(u), s.push(g);
|
|
166
165
|
}
|
|
167
166
|
return s.join("&");
|
|
168
167
|
}
|
|
@@ -172,7 +171,7 @@ class Dr {
|
|
|
172
171
|
* @return {String} The base URL of the region
|
|
173
172
|
*/
|
|
174
173
|
getRegionURL(r) {
|
|
175
|
-
const
|
|
174
|
+
const t = "api.storyblok.com", i = "api-us.storyblok.com", s = "app.storyblokchina.cn", l = "api-ap.storyblok.com", u = "api-ca.storyblok.com";
|
|
176
175
|
switch (r) {
|
|
177
176
|
case "us":
|
|
178
177
|
return i;
|
|
@@ -183,17 +182,17 @@ class Dr {
|
|
|
183
182
|
case "ca":
|
|
184
183
|
return u;
|
|
185
184
|
default:
|
|
186
|
-
return
|
|
185
|
+
return t;
|
|
187
186
|
}
|
|
188
187
|
}
|
|
189
188
|
}
|
|
190
189
|
const Ur = function(o, r) {
|
|
191
|
-
const
|
|
190
|
+
const t = {};
|
|
192
191
|
for (const i in o) {
|
|
193
192
|
const s = o[i];
|
|
194
|
-
r.indexOf(i) > -1 && s !== null && (
|
|
193
|
+
r.indexOf(i) > -1 && s !== null && (t[i] = s);
|
|
195
194
|
}
|
|
196
|
-
return
|
|
195
|
+
return t;
|
|
197
196
|
}, Br = (o) => o === "email", Fr = () => ({
|
|
198
197
|
singleTag: "hr"
|
|
199
198
|
}), Hr = () => ({
|
|
@@ -238,9 +237,9 @@ const Ur = function(o, r) {
|
|
|
238
237
|
]
|
|
239
238
|
}), Qr = () => ({
|
|
240
239
|
tag: "b"
|
|
241
|
-
}), tn = () => ({
|
|
242
|
-
tag: "s"
|
|
243
240
|
}), en = () => ({
|
|
241
|
+
tag: "s"
|
|
242
|
+
}), tn = () => ({
|
|
244
243
|
tag: "u"
|
|
245
244
|
}), rn = () => ({
|
|
246
245
|
tag: "strong"
|
|
@@ -253,17 +252,17 @@ const Ur = function(o, r) {
|
|
|
253
252
|
return {
|
|
254
253
|
tag: ""
|
|
255
254
|
};
|
|
256
|
-
const r = new Dr().escapeHTML,
|
|
257
|
-
if (delete
|
|
258
|
-
for (const s in
|
|
259
|
-
|
|
260
|
-
delete
|
|
255
|
+
const r = new Dr().escapeHTML, t = { ...o.attrs }, { linktype: i = "url" } = o.attrs;
|
|
256
|
+
if (delete t.linktype, t.href && (t.href = r(o.attrs.href || "")), Br(i) && (t.href = `mailto:${t.href}`), t.anchor && (t.href = `${t.href}#${t.anchor}`, delete t.anchor), t.custom) {
|
|
257
|
+
for (const s in t.custom)
|
|
258
|
+
t[s] = t.custom[s];
|
|
259
|
+
delete t.custom;
|
|
261
260
|
}
|
|
262
261
|
return {
|
|
263
262
|
tag: [
|
|
264
263
|
{
|
|
265
264
|
tag: "a",
|
|
266
|
-
attrs:
|
|
265
|
+
attrs: t
|
|
267
266
|
}
|
|
268
267
|
]
|
|
269
268
|
};
|
|
@@ -329,8 +328,8 @@ const Ur = function(o, r) {
|
|
|
329
328
|
},
|
|
330
329
|
marks: {
|
|
331
330
|
bold: Qr,
|
|
332
|
-
strike:
|
|
333
|
-
underline:
|
|
331
|
+
strike: en,
|
|
332
|
+
underline: tn,
|
|
334
333
|
strong: rn,
|
|
335
334
|
code: nn,
|
|
336
335
|
italic: on,
|
|
@@ -349,25 +348,25 @@ const Ur = function(o, r) {
|
|
|
349
348
|
">": ">",
|
|
350
349
|
'"': """,
|
|
351
350
|
"'": "'"
|
|
352
|
-
},
|
|
353
|
-
return o && i.test(o) ? o.replace(
|
|
351
|
+
}, t = /[&<>"']/g, i = RegExp(t.source);
|
|
352
|
+
return o && i.test(o) ? o.replace(t, (s) => r[s]) : o;
|
|
354
353
|
};
|
|
355
354
|
class hn {
|
|
356
355
|
constructor(r) {
|
|
357
356
|
S(this, "marks"), S(this, "nodes"), r || (r = dn), this.marks = r.marks || [], this.nodes = r.nodes || [];
|
|
358
357
|
}
|
|
359
|
-
addNode(r,
|
|
360
|
-
this.nodes[r] =
|
|
358
|
+
addNode(r, t) {
|
|
359
|
+
this.nodes[r] = t;
|
|
361
360
|
}
|
|
362
|
-
addMark(r,
|
|
363
|
-
this.marks[r] =
|
|
361
|
+
addMark(r, t) {
|
|
362
|
+
this.marks[r] = t;
|
|
364
363
|
}
|
|
365
|
-
render(r,
|
|
364
|
+
render(r, t = { optimizeImages: !1 }) {
|
|
366
365
|
if (r && r.content && Array.isArray(r.content)) {
|
|
367
366
|
let i = "";
|
|
368
367
|
return r.content.forEach((s) => {
|
|
369
368
|
i += this.renderNode(s);
|
|
370
|
-
}),
|
|
369
|
+
}), t.optimizeImages ? this.optimizeImages(i, t.optimizeImages) : i;
|
|
371
370
|
}
|
|
372
371
|
return console.warn(
|
|
373
372
|
`The render method must receive an Object with a "content" field.
|
|
@@ -396,21 +395,21 @@ class hn {
|
|
|
396
395
|
}`
|
|
397
396
|
), "";
|
|
398
397
|
}
|
|
399
|
-
optimizeImages(r,
|
|
398
|
+
optimizeImages(r, t) {
|
|
400
399
|
let i = 0, s = 0, l = "", u = "";
|
|
401
|
-
typeof
|
|
400
|
+
typeof t != "boolean" && (typeof t.width == "number" && t.width > 0 && (l += `width="${t.width}" `, i = t.width), typeof t.height == "number" && t.height > 0 && (l += `height="${t.height}" `, s = t.height), (t.loading === "lazy" || t.loading === "eager") && (l += `loading="${t.loading}" `), typeof t.class == "string" && t.class.length > 0 && (l += `class="${t.class}" `), t.filters && (typeof t.filters.blur == "number" && t.filters.blur >= 0 && t.filters.blur <= 100 && (u += `:blur(${t.filters.blur})`), typeof t.filters.brightness == "number" && t.filters.brightness >= -100 && t.filters.brightness <= 100 && (u += `:brightness(${t.filters.brightness})`), t.filters.fill && (t.filters.fill.match(/[0-9A-Fa-f]{6}/g) || t.filters.fill === "transparent") && (u += `:fill(${t.filters.fill})`), t.filters.format && ["webp", "png", "jpeg"].includes(t.filters.format) && (u += `:format(${t.filters.format})`), typeof t.filters.grayscale == "boolean" && t.filters.grayscale && (u += ":grayscale()"), typeof t.filters.quality == "number" && t.filters.quality >= 0 && t.filters.quality <= 100 && (u += `:quality(${t.filters.quality})`), t.filters.rotate && [90, 180, 270].includes(t.filters.rotate) && (u += `:rotate(${t.filters.rotate})`), u.length > 0 && (u = "/filters" + u))), l.length > 0 && (r = r.replace(/<img/g, `<img ${l.trim()}`));
|
|
402
401
|
const f = i > 0 || s > 0 || u.length > 0 ? `${i}x${s}${u}` : "";
|
|
403
402
|
return r = r.replace(
|
|
404
403
|
/a.storyblok.com\/f\/(\d+)\/([^.]+)\.(gif|jpg|jpeg|png|tif|tiff|bmp)/g,
|
|
405
404
|
`a.storyblok.com/f/$1/$2.$3/m/${f}`
|
|
406
|
-
), typeof
|
|
405
|
+
), typeof t != "boolean" && (t.sizes || t.srcset) && (r = r.replace(/<img.*?src=["|'](.*?)["|']/g, (g) => {
|
|
407
406
|
var b, _;
|
|
408
407
|
const k = g.match(
|
|
409
408
|
/a.storyblok.com\/f\/(\d+)\/([^.]+)\.(gif|jpg|jpeg|png|tif|tiff|bmp)/g
|
|
410
409
|
);
|
|
411
410
|
if (k && k.length > 0) {
|
|
412
411
|
const I = {
|
|
413
|
-
srcset: (b =
|
|
412
|
+
srcset: (b = t.srcset) == null ? void 0 : b.map((w) => {
|
|
414
413
|
if (typeof w == "number")
|
|
415
414
|
return `//${k}/m/${w}x0${u} ${w}w`;
|
|
416
415
|
if (typeof w == "object" && w.length === 2) {
|
|
@@ -418,7 +417,7 @@ class hn {
|
|
|
418
417
|
return typeof w[0] == "number" && (M = w[0]), typeof w[1] == "number" && (F = w[1]), `//${k}/m/${M}x${F}${u} ${M}w`;
|
|
419
418
|
}
|
|
420
419
|
}).join(", "),
|
|
421
|
-
sizes: (_ =
|
|
420
|
+
sizes: (_ = t.sizes) == null ? void 0 : _.map((w) => w).join(", ")
|
|
422
421
|
};
|
|
423
422
|
let O = "";
|
|
424
423
|
return I.srcset && (O += `srcset="${I.srcset}" `), I.sizes && (O += `sizes="${I.sizes}" `), g.replace(/<img/g, `<img ${O.trim()}`);
|
|
@@ -427,31 +426,33 @@ class hn {
|
|
|
427
426
|
})), r;
|
|
428
427
|
}
|
|
429
428
|
renderNode(r) {
|
|
430
|
-
const
|
|
429
|
+
const t = [];
|
|
431
430
|
r.marks && r.marks.forEach((s) => {
|
|
432
431
|
const l = this.getMatchingMark(s);
|
|
433
|
-
l && l.tag !== "" &&
|
|
432
|
+
l && l.tag !== "" && t.push(this.renderOpeningTag(l.tag));
|
|
434
433
|
});
|
|
435
434
|
const i = this.getMatchingNode(r);
|
|
436
|
-
return i && i.tag &&
|
|
437
|
-
|
|
438
|
-
}) : r.text ?
|
|
435
|
+
return i && i.tag && t.push(this.renderOpeningTag(i.tag)), r.content ? r.content.forEach((s) => {
|
|
436
|
+
t.push(this.renderNode(s));
|
|
437
|
+
}) : r.text ? t.push(gn(r.text)) : i && i.singleTag ? t.push(this.renderTag(i.singleTag, " /")) : i && i.html ? t.push(i.html) : r.type === "emoji" && t.push(this.renderEmoji(r)), i && i.tag && t.push(this.renderClosingTag(i.tag)), r.marks && r.marks.slice(0).reverse().forEach((s) => {
|
|
439
438
|
const l = this.getMatchingMark(s);
|
|
440
|
-
l && l.tag !== "" &&
|
|
441
|
-
}),
|
|
439
|
+
l && l.tag !== "" && t.push(this.renderClosingTag(l.tag));
|
|
440
|
+
}), t.join("");
|
|
442
441
|
}
|
|
443
|
-
renderTag(r,
|
|
444
|
-
return r.constructor === String ? `<${r}${
|
|
442
|
+
renderTag(r, t) {
|
|
443
|
+
return r.constructor === String ? `<${r}${t}>` : r.map((i) => {
|
|
445
444
|
if (i.constructor === String)
|
|
446
|
-
return `<${i}${
|
|
445
|
+
return `<${i}${t}>`;
|
|
447
446
|
{
|
|
448
447
|
let s = `<${i.tag}`;
|
|
449
|
-
if (i.attrs)
|
|
450
|
-
for (const l in i.attrs)
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
448
|
+
if (i.attrs) {
|
|
449
|
+
for (const l in i.attrs)
|
|
450
|
+
if (Object.prototype.hasOwnProperty.call(i.attrs, l)) {
|
|
451
|
+
const u = i.attrs[l];
|
|
452
|
+
u !== null && (s += ` ${l}="${u}"`);
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
return `${s}${t}>`;
|
|
455
456
|
}
|
|
456
457
|
}).join("");
|
|
457
458
|
}
|
|
@@ -459,22 +460,22 @@ class hn {
|
|
|
459
460
|
return this.renderTag(r, "");
|
|
460
461
|
}
|
|
461
462
|
renderClosingTag(r) {
|
|
462
|
-
return r.constructor === String ? `</${r}>` : r.slice(0).reverse().map((
|
|
463
|
+
return r.constructor === String ? `</${r}>` : r.slice(0).reverse().map((t) => t.constructor === String ? `</${t}>` : `</${t.tag}>`).join("");
|
|
463
464
|
}
|
|
464
465
|
getMatchingNode(r) {
|
|
465
|
-
const
|
|
466
|
-
if (typeof
|
|
467
|
-
return
|
|
466
|
+
const t = this.nodes[r.type];
|
|
467
|
+
if (typeof t == "function")
|
|
468
|
+
return t(r);
|
|
468
469
|
}
|
|
469
470
|
getMatchingMark(r) {
|
|
470
|
-
const
|
|
471
|
-
if (typeof
|
|
472
|
-
return
|
|
471
|
+
const t = this.marks[r.type];
|
|
472
|
+
if (typeof t == "function")
|
|
473
|
+
return t(r);
|
|
473
474
|
}
|
|
474
475
|
renderEmoji(r) {
|
|
475
476
|
if (r.attrs.emoji)
|
|
476
477
|
return r.attrs.emoji;
|
|
477
|
-
const
|
|
478
|
+
const t = [
|
|
478
479
|
{
|
|
479
480
|
tag: "img",
|
|
480
481
|
attrs: {
|
|
@@ -485,7 +486,7 @@ class hn {
|
|
|
485
486
|
}
|
|
486
487
|
}
|
|
487
488
|
];
|
|
488
|
-
return this.renderTag(
|
|
489
|
+
return this.renderTag(t, " /");
|
|
489
490
|
}
|
|
490
491
|
}
|
|
491
492
|
const $n = (o) => {
|
|
@@ -505,16 +506,16 @@ const $n = (o) => {
|
|
|
505
506
|
};
|
|
506
507
|
let yn, bn = "https://app.storyblok.com/f/storyblok-v2-latest.js";
|
|
507
508
|
const mn = (o, r) => {
|
|
508
|
-
o.addNode("blok", (
|
|
509
|
+
o.addNode("blok", (t) => {
|
|
509
510
|
let i = "";
|
|
510
|
-
return
|
|
511
|
+
return t.attrs.body.forEach((s) => {
|
|
511
512
|
i += r(s.component, s);
|
|
512
513
|
}), {
|
|
513
514
|
html: i
|
|
514
515
|
};
|
|
515
516
|
});
|
|
516
|
-
}, vn = (o) => !o || !(o != null && o.content.some((r) => r.content || r.type === "blok" || r.type === "horizontal_rule")), _n = (o, r,
|
|
517
|
-
let i =
|
|
517
|
+
}, vn = (o) => !o || !(o != null && o.content.some((r) => r.content || r.type === "blok" || r.type === "horizontal_rule")), _n = (o, r, t) => {
|
|
518
|
+
let i = t || yn;
|
|
518
519
|
if (!i) {
|
|
519
520
|
console.error(
|
|
520
521
|
"Please initialize the Storyblok SDK before calling the renderRichText function"
|
|
@@ -527,7 +528,7 @@ function wn(o) {
|
|
|
527
528
|
let r = {
|
|
528
529
|
resolveRelations: []
|
|
529
530
|
};
|
|
530
|
-
function
|
|
531
|
+
function t(i) {
|
|
531
532
|
i && Array.isArray(r.resolveRelations) && r.resolveRelations.push(
|
|
532
533
|
...Array.isArray(i) ? i : [i]
|
|
533
534
|
);
|
|
@@ -535,9 +536,9 @@ function wn(o) {
|
|
|
535
536
|
for (const i of o)
|
|
536
537
|
if (i.options) {
|
|
537
538
|
const { apiOptions: s, bridgeOptions: l } = i.options;
|
|
538
|
-
if (
|
|
539
|
+
if (t(s == null ? void 0 : s.resolve_relations), l) {
|
|
539
540
|
const { resolveRelations: u, ...f } = l;
|
|
540
|
-
|
|
541
|
+
t(u), Object.assign(r, f);
|
|
541
542
|
}
|
|
542
543
|
}
|
|
543
544
|
return r.resolveRelations = [...new Set(r.resolveRelations)], r;
|
|
@@ -549,474 +550,474 @@ function Tn(o) {
|
|
|
549
550
|
var Z = { exports: {} };
|
|
550
551
|
Z.exports;
|
|
551
552
|
(function(o, r) {
|
|
552
|
-
var
|
|
553
|
-
y[
|
|
554
|
-
var
|
|
553
|
+
var t = 200, i = "__lodash_hash_undefined__", s = 800, l = 16, u = 9007199254740991, f = "[object Arguments]", g = "[object Array]", b = "[object AsyncFunction]", _ = "[object Boolean]", k = "[object Date]", I = "[object Error]", O = "[object Function]", w = "[object GeneratorFunction]", M = "[object Map]", F = "[object Number]", Je = "[object Null]", pe = "[object Object]", Ke = "[object Proxy]", We = "[object RegExp]", Ye = "[object Set]", Ve = "[object String]", Xe = "[object Undefined]", Ze = "[object WeakMap]", Qe = "[object ArrayBuffer]", et = "[object DataView]", tt = "[object Float32Array]", rt = "[object Float64Array]", nt = "[object Int8Array]", ot = "[object Int16Array]", at = "[object Int32Array]", it = "[object Uint8Array]", st = "[object Uint8ClampedArray]", lt = "[object Uint16Array]", ct = "[object Uint32Array]", ut = /[\\^$.*+?()[\]{}|]/g, ft = /^\[object .+?Constructor\]$/, pt = /^(?:0|[1-9]\d*)$/, y = {};
|
|
554
|
+
y[tt] = y[rt] = y[nt] = y[ot] = y[at] = y[it] = y[st] = y[lt] = y[ct] = !0, y[f] = y[g] = y[Qe] = y[_] = y[et] = y[k] = y[I] = y[O] = y[M] = y[F] = y[pe] = y[We] = y[Ye] = y[Ve] = y[Ze] = !1;
|
|
555
|
+
var de = typeof X == "object" && X && X.Object === Object && X, dt = typeof self == "object" && self && self.Object === Object && self, N = de || dt || Function("return this")(), ge = r && !r.nodeType && r, z = ge && !0 && o && !o.nodeType && o, he = z && z.exports === ge, Q = he && de.process, ye = function() {
|
|
555
556
|
try {
|
|
556
|
-
var
|
|
557
|
-
return
|
|
557
|
+
var e = z && z.require && z.require("util").types;
|
|
558
|
+
return e || Q && Q.binding && Q.binding("util");
|
|
558
559
|
} catch {
|
|
559
560
|
}
|
|
560
|
-
}(),
|
|
561
|
-
function
|
|
561
|
+
}(), be = ye && ye.isTypedArray;
|
|
562
|
+
function gt(e, n, a) {
|
|
562
563
|
switch (a.length) {
|
|
563
564
|
case 0:
|
|
564
|
-
return
|
|
565
|
+
return e.call(n);
|
|
565
566
|
case 1:
|
|
566
|
-
return
|
|
567
|
+
return e.call(n, a[0]);
|
|
567
568
|
case 2:
|
|
568
|
-
return
|
|
569
|
+
return e.call(n, a[0], a[1]);
|
|
569
570
|
case 3:
|
|
570
|
-
return
|
|
571
|
+
return e.call(n, a[0], a[1], a[2]);
|
|
571
572
|
}
|
|
572
|
-
return
|
|
573
|
+
return e.apply(n, a);
|
|
573
574
|
}
|
|
574
|
-
function
|
|
575
|
-
for (var a = -1, c = Array(
|
|
575
|
+
function ht(e, n) {
|
|
576
|
+
for (var a = -1, c = Array(e); ++a < e; )
|
|
576
577
|
c[a] = n(a);
|
|
577
578
|
return c;
|
|
578
579
|
}
|
|
579
|
-
function
|
|
580
|
+
function yt(e) {
|
|
580
581
|
return function(n) {
|
|
581
|
-
return
|
|
582
|
+
return e(n);
|
|
582
583
|
};
|
|
583
584
|
}
|
|
584
|
-
function
|
|
585
|
-
return
|
|
585
|
+
function bt(e, n) {
|
|
586
|
+
return e == null ? void 0 : e[n];
|
|
586
587
|
}
|
|
587
|
-
function
|
|
588
|
+
function mt(e, n) {
|
|
588
589
|
return function(a) {
|
|
589
|
-
return
|
|
590
|
+
return e(n(a));
|
|
590
591
|
};
|
|
591
592
|
}
|
|
592
|
-
var
|
|
593
|
-
var
|
|
594
|
-
return
|
|
595
|
-
}(),
|
|
596
|
-
"^" + q.call(C).replace(
|
|
597
|
-
), G =
|
|
593
|
+
var vt = Array.prototype, _t = Function.prototype, H = Object.prototype, ee = N["__core-js_shared__"], q = _t.toString, C = H.hasOwnProperty, me = function() {
|
|
594
|
+
var e = /[^.]+$/.exec(ee && ee.keys && ee.keys.IE_PROTO || "");
|
|
595
|
+
return e ? "Symbol(src)_1." + e : "";
|
|
596
|
+
}(), ve = H.toString, wt = q.call(Object), Tt = RegExp(
|
|
597
|
+
"^" + q.call(C).replace(ut, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
598
|
+
), G = he ? N.Buffer : void 0, _e = N.Symbol, we = N.Uint8Array, Te = G ? G.allocUnsafe : void 0, ke = mt(Object.getPrototypeOf, Object), Ae = Object.create, kt = H.propertyIsEnumerable, At = vt.splice, $ = _e ? _e.toStringTag : void 0, J = function() {
|
|
598
599
|
try {
|
|
599
|
-
var
|
|
600
|
-
return
|
|
600
|
+
var e = ne(Object, "defineProperty");
|
|
601
|
+
return e({}, "", {}), e;
|
|
601
602
|
} catch {
|
|
602
603
|
}
|
|
603
|
-
}(),
|
|
604
|
-
function
|
|
604
|
+
}(), It = G ? G.isBuffer : void 0, Ie = Math.max, St = Date.now, Se = ne(N, "Map"), L = ne(Object, "create"), Ot = /* @__PURE__ */ function() {
|
|
605
|
+
function e() {
|
|
605
606
|
}
|
|
606
607
|
return function(n) {
|
|
607
608
|
if (!E(n))
|
|
608
609
|
return {};
|
|
609
|
-
if (
|
|
610
|
-
return
|
|
611
|
-
|
|
612
|
-
var a = new
|
|
613
|
-
return
|
|
610
|
+
if (Ae)
|
|
611
|
+
return Ae(n);
|
|
612
|
+
e.prototype = n;
|
|
613
|
+
var a = new e();
|
|
614
|
+
return e.prototype = void 0, a;
|
|
614
615
|
};
|
|
615
616
|
}();
|
|
616
|
-
function x(
|
|
617
|
-
var n = -1, a =
|
|
617
|
+
function x(e) {
|
|
618
|
+
var n = -1, a = e == null ? 0 : e.length;
|
|
618
619
|
for (this.clear(); ++n < a; ) {
|
|
619
|
-
var c =
|
|
620
|
+
var c = e[n];
|
|
620
621
|
this.set(c[0], c[1]);
|
|
621
622
|
}
|
|
622
623
|
}
|
|
623
|
-
function
|
|
624
|
+
function Ct() {
|
|
624
625
|
this.__data__ = L ? L(null) : {}, this.size = 0;
|
|
625
626
|
}
|
|
626
|
-
function
|
|
627
|
-
var n = this.has(
|
|
627
|
+
function jt(e) {
|
|
628
|
+
var n = this.has(e) && delete this.__data__[e];
|
|
628
629
|
return this.size -= n ? 1 : 0, n;
|
|
629
630
|
}
|
|
630
|
-
function $e
|
|
631
|
+
function $t(e) {
|
|
631
632
|
var n = this.__data__;
|
|
632
633
|
if (L) {
|
|
633
|
-
var a = n[
|
|
634
|
+
var a = n[e];
|
|
634
635
|
return a === i ? void 0 : a;
|
|
635
636
|
}
|
|
636
|
-
return C.call(n,
|
|
637
|
+
return C.call(n, e) ? n[e] : void 0;
|
|
637
638
|
}
|
|
638
|
-
function
|
|
639
|
+
function xt(e) {
|
|
639
640
|
var n = this.__data__;
|
|
640
|
-
return L ? n[
|
|
641
|
+
return L ? n[e] !== void 0 : C.call(n, e);
|
|
641
642
|
}
|
|
642
|
-
function
|
|
643
|
+
function Et(e, n) {
|
|
643
644
|
var a = this.__data__;
|
|
644
|
-
return this.size += this.has(
|
|
645
|
+
return this.size += this.has(e) ? 0 : 1, a[e] = L && n === void 0 ? i : n, this;
|
|
645
646
|
}
|
|
646
|
-
x.prototype.clear =
|
|
647
|
-
function j(
|
|
648
|
-
var n = -1, a =
|
|
647
|
+
x.prototype.clear = Ct, x.prototype.delete = jt, x.prototype.get = $t, x.prototype.has = xt, x.prototype.set = Et;
|
|
648
|
+
function j(e) {
|
|
649
|
+
var n = -1, a = e == null ? 0 : e.length;
|
|
649
650
|
for (this.clear(); ++n < a; ) {
|
|
650
|
-
var c =
|
|
651
|
+
var c = e[n];
|
|
651
652
|
this.set(c[0], c[1]);
|
|
652
653
|
}
|
|
653
654
|
}
|
|
654
|
-
function
|
|
655
|
+
function Rt() {
|
|
655
656
|
this.__data__ = [], this.size = 0;
|
|
656
657
|
}
|
|
657
|
-
function
|
|
658
|
-
var n = this.__data__, a = K(n,
|
|
658
|
+
function Pt(e) {
|
|
659
|
+
var n = this.__data__, a = K(n, e);
|
|
659
660
|
if (a < 0)
|
|
660
661
|
return !1;
|
|
661
662
|
var c = n.length - 1;
|
|
662
|
-
return a == c ? n.pop() :
|
|
663
|
+
return a == c ? n.pop() : At.call(n, a, 1), --this.size, !0;
|
|
663
664
|
}
|
|
664
|
-
function
|
|
665
|
-
var n = this.__data__, a = K(n,
|
|
665
|
+
function Mt(e) {
|
|
666
|
+
var n = this.__data__, a = K(n, e);
|
|
666
667
|
return a < 0 ? void 0 : n[a][1];
|
|
667
668
|
}
|
|
668
|
-
function
|
|
669
|
-
return K(this.__data__,
|
|
669
|
+
function Nt(e) {
|
|
670
|
+
return K(this.__data__, e) > -1;
|
|
670
671
|
}
|
|
671
|
-
function
|
|
672
|
-
var a = this.__data__, c = K(a,
|
|
673
|
-
return c < 0 ? (++this.size, a.push([
|
|
672
|
+
function zt(e, n) {
|
|
673
|
+
var a = this.__data__, c = K(a, e);
|
|
674
|
+
return c < 0 ? (++this.size, a.push([e, n])) : a[c][1] = n, this;
|
|
674
675
|
}
|
|
675
|
-
j.prototype.clear =
|
|
676
|
-
function R(
|
|
677
|
-
var n = -1, a =
|
|
676
|
+
j.prototype.clear = Rt, j.prototype.delete = Pt, j.prototype.get = Mt, j.prototype.has = Nt, j.prototype.set = zt;
|
|
677
|
+
function R(e) {
|
|
678
|
+
var n = -1, a = e == null ? 0 : e.length;
|
|
678
679
|
for (this.clear(); ++n < a; ) {
|
|
679
|
-
var c =
|
|
680
|
+
var c = e[n];
|
|
680
681
|
this.set(c[0], c[1]);
|
|
681
682
|
}
|
|
682
683
|
}
|
|
683
|
-
function
|
|
684
|
+
function Lt() {
|
|
684
685
|
this.size = 0, this.__data__ = {
|
|
685
686
|
hash: new x(),
|
|
686
|
-
map: new (
|
|
687
|
+
map: new (Se || j)(),
|
|
687
688
|
string: new x()
|
|
688
689
|
};
|
|
689
690
|
}
|
|
690
|
-
function
|
|
691
|
-
var n = Y(this,
|
|
691
|
+
function Dt(e) {
|
|
692
|
+
var n = Y(this, e).delete(e);
|
|
692
693
|
return this.size -= n ? 1 : 0, n;
|
|
693
694
|
}
|
|
694
|
-
function
|
|
695
|
-
return Y(this,
|
|
695
|
+
function Ut(e) {
|
|
696
|
+
return Y(this, e).get(e);
|
|
696
697
|
}
|
|
697
|
-
function
|
|
698
|
-
return Y(this,
|
|
698
|
+
function Bt(e) {
|
|
699
|
+
return Y(this, e).has(e);
|
|
699
700
|
}
|
|
700
|
-
function
|
|
701
|
-
var a = Y(this,
|
|
702
|
-
return a.set(
|
|
701
|
+
function Ft(e, n) {
|
|
702
|
+
var a = Y(this, e), c = a.size;
|
|
703
|
+
return a.set(e, n), this.size += a.size == c ? 0 : 1, this;
|
|
703
704
|
}
|
|
704
|
-
R.prototype.clear =
|
|
705
|
-
function P(
|
|
706
|
-
var n = this.__data__ = new j(
|
|
705
|
+
R.prototype.clear = Lt, R.prototype.delete = Dt, R.prototype.get = Ut, R.prototype.has = Bt, R.prototype.set = Ft;
|
|
706
|
+
function P(e) {
|
|
707
|
+
var n = this.__data__ = new j(e);
|
|
707
708
|
this.size = n.size;
|
|
708
709
|
}
|
|
709
|
-
function
|
|
710
|
+
function Ht() {
|
|
710
711
|
this.__data__ = new j(), this.size = 0;
|
|
711
712
|
}
|
|
712
|
-
function
|
|
713
|
-
var n = this.__data__, a = n.delete(
|
|
713
|
+
function qt(e) {
|
|
714
|
+
var n = this.__data__, a = n.delete(e);
|
|
714
715
|
return this.size = n.size, a;
|
|
715
716
|
}
|
|
716
|
-
function
|
|
717
|
-
return this.__data__.get(
|
|
717
|
+
function Gt(e) {
|
|
718
|
+
return this.__data__.get(e);
|
|
718
719
|
}
|
|
719
|
-
function
|
|
720
|
-
return this.__data__.has(
|
|
720
|
+
function Jt(e) {
|
|
721
|
+
return this.__data__.has(e);
|
|
721
722
|
}
|
|
722
|
-
function
|
|
723
|
+
function Kt(e, n) {
|
|
723
724
|
var a = this.__data__;
|
|
724
725
|
if (a instanceof j) {
|
|
725
726
|
var c = a.__data__;
|
|
726
|
-
if (!
|
|
727
|
-
return c.push([
|
|
727
|
+
if (!Se || c.length < t - 1)
|
|
728
|
+
return c.push([e, n]), this.size = ++a.size, this;
|
|
728
729
|
a = this.__data__ = new R(c);
|
|
729
730
|
}
|
|
730
|
-
return a.set(
|
|
731
|
+
return a.set(e, n), this.size = a.size, this;
|
|
731
732
|
}
|
|
732
|
-
P.prototype.clear =
|
|
733
|
-
function
|
|
734
|
-
var a =
|
|
735
|
-
for (var A in
|
|
736
|
-
(n || C.call(
|
|
733
|
+
P.prototype.clear = Ht, P.prototype.delete = qt, P.prototype.get = Gt, P.prototype.has = Jt, P.prototype.set = Kt;
|
|
734
|
+
function Wt(e, n) {
|
|
735
|
+
var a = ie(e), c = !a && ae(e), d = !a && !c && xe(e), h = !a && !c && !d && Re(e), m = a || c || d || h, p = m ? ht(e.length, String) : [], v = p.length;
|
|
736
|
+
for (var A in e)
|
|
737
|
+
(n || C.call(e, A)) && !(m && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
737
738
|
(A == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
738
739
|
d && (A == "offset" || A == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
739
740
|
h && (A == "buffer" || A == "byteLength" || A == "byteOffset") || // Skip index properties.
|
|
740
|
-
|
|
741
|
+
je(A, v))) && p.push(A);
|
|
741
742
|
return p;
|
|
742
743
|
}
|
|
743
|
-
function
|
|
744
|
-
(a !== void 0 && !V(
|
|
744
|
+
function te(e, n, a) {
|
|
745
|
+
(a !== void 0 && !V(e[n], a) || a === void 0 && !(n in e)) && re(e, n, a);
|
|
745
746
|
}
|
|
746
|
-
function
|
|
747
|
-
var c =
|
|
748
|
-
(!(C.call(
|
|
747
|
+
function Yt(e, n, a) {
|
|
748
|
+
var c = e[n];
|
|
749
|
+
(!(C.call(e, n) && V(c, a)) || a === void 0 && !(n in e)) && re(e, n, a);
|
|
749
750
|
}
|
|
750
|
-
function K(
|
|
751
|
-
for (var a =
|
|
752
|
-
if (V(
|
|
751
|
+
function K(e, n) {
|
|
752
|
+
for (var a = e.length; a--; )
|
|
753
|
+
if (V(e[a][0], n))
|
|
753
754
|
return a;
|
|
754
755
|
return -1;
|
|
755
756
|
}
|
|
756
|
-
function
|
|
757
|
-
n == "__proto__" && J ? J(
|
|
757
|
+
function re(e, n, a) {
|
|
758
|
+
n == "__proto__" && J ? J(e, n, {
|
|
758
759
|
configurable: !0,
|
|
759
760
|
enumerable: !0,
|
|
760
761
|
value: a,
|
|
761
762
|
writable: !0
|
|
762
|
-
}) :
|
|
763
|
+
}) : e[n] = a;
|
|
763
764
|
}
|
|
764
|
-
var
|
|
765
|
-
function W(
|
|
766
|
-
return
|
|
765
|
+
var Vt = cr();
|
|
766
|
+
function W(e) {
|
|
767
|
+
return e == null ? e === void 0 ? Xe : Je : $ && $ in Object(e) ? ur(e) : yr(e);
|
|
767
768
|
}
|
|
768
|
-
function
|
|
769
|
-
return D(
|
|
769
|
+
function Oe(e) {
|
|
770
|
+
return D(e) && W(e) == f;
|
|
770
771
|
}
|
|
771
|
-
function
|
|
772
|
-
if (!E(
|
|
772
|
+
function Xt(e) {
|
|
773
|
+
if (!E(e) || gr(e))
|
|
773
774
|
return !1;
|
|
774
|
-
var n =
|
|
775
|
-
return n.test(_r(
|
|
776
|
-
}
|
|
777
|
-
function
|
|
778
|
-
return D(
|
|
779
|
-
}
|
|
780
|
-
function
|
|
781
|
-
if (!E(
|
|
782
|
-
return hr(
|
|
783
|
-
var n = $
|
|
784
|
-
for (var c in
|
|
785
|
-
c == "constructor" && (n || !C.call(
|
|
775
|
+
var n = le(e) ? Tt : ft;
|
|
776
|
+
return n.test(_r(e));
|
|
777
|
+
}
|
|
778
|
+
function Zt(e) {
|
|
779
|
+
return D(e) && Ee(e.length) && !!y[W(e)];
|
|
780
|
+
}
|
|
781
|
+
function Qt(e) {
|
|
782
|
+
if (!E(e))
|
|
783
|
+
return hr(e);
|
|
784
|
+
var n = $e(e), a = [];
|
|
785
|
+
for (var c in e)
|
|
786
|
+
c == "constructor" && (n || !C.call(e, c)) || a.push(c);
|
|
786
787
|
return a;
|
|
787
788
|
}
|
|
788
|
-
function
|
|
789
|
-
|
|
789
|
+
function Ce(e, n, a, c, d) {
|
|
790
|
+
e !== n && Vt(n, function(h, m) {
|
|
790
791
|
if (d || (d = new P()), E(h))
|
|
791
|
-
|
|
792
|
+
er(e, n, m, a, Ce, c, d);
|
|
792
793
|
else {
|
|
793
|
-
var p = c ? c(
|
|
794
|
-
p === void 0 && (p = h),
|
|
794
|
+
var p = c ? c(oe(e, m), h, m + "", e, n, d) : void 0;
|
|
795
|
+
p === void 0 && (p = h), te(e, m, p);
|
|
795
796
|
}
|
|
796
|
-
},
|
|
797
|
+
}, Pe);
|
|
797
798
|
}
|
|
798
|
-
function
|
|
799
|
-
var p =
|
|
799
|
+
function er(e, n, a, c, d, h, m) {
|
|
800
|
+
var p = oe(e, a), v = oe(n, a), A = m.get(v);
|
|
800
801
|
if (A) {
|
|
801
|
-
|
|
802
|
+
te(e, a, A);
|
|
802
803
|
return;
|
|
803
804
|
}
|
|
804
|
-
var T = h ? h(p, v, a + "",
|
|
805
|
+
var T = h ? h(p, v, a + "", e, n, m) : void 0, U = T === void 0;
|
|
805
806
|
if (U) {
|
|
806
|
-
var
|
|
807
|
-
T = v,
|
|
807
|
+
var ce = ie(v), ue = !ce && xe(v), Ne = !ce && !ue && Re(v);
|
|
808
|
+
T = v, ce || ue || Ne ? ie(p) ? T = p : wr(p) ? T = ir(p) : ue ? (U = !1, T = nr(v, !0)) : Ne ? (U = !1, T = ar(v, !0)) : T = [] : Tr(v) || ae(v) ? (T = p, ae(p) ? T = kr(p) : (!E(p) || le(p)) && (T = fr(v))) : U = !1;
|
|
808
809
|
}
|
|
809
|
-
U && (m.set(v, T), d(T, v, c, h, m), m.delete(v)),
|
|
810
|
+
U && (m.set(v, T), d(T, v, c, h, m), m.delete(v)), te(e, a, T);
|
|
810
811
|
}
|
|
811
|
-
function
|
|
812
|
-
return mr(br(
|
|
812
|
+
function tr(e, n) {
|
|
813
|
+
return mr(br(e, n, Me), e + "");
|
|
813
814
|
}
|
|
814
|
-
var rr = J ? function(
|
|
815
|
-
return J(
|
|
815
|
+
var rr = J ? function(e, n) {
|
|
816
|
+
return J(e, "toString", {
|
|
816
817
|
configurable: !0,
|
|
817
818
|
enumerable: !1,
|
|
818
819
|
value: Ir(n),
|
|
819
820
|
writable: !0
|
|
820
821
|
});
|
|
821
|
-
} :
|
|
822
|
-
function nr(
|
|
822
|
+
} : Me;
|
|
823
|
+
function nr(e, n) {
|
|
823
824
|
if (n)
|
|
824
|
-
return
|
|
825
|
-
var a =
|
|
826
|
-
return
|
|
825
|
+
return e.slice();
|
|
826
|
+
var a = e.length, c = Te ? Te(a) : new e.constructor(a);
|
|
827
|
+
return e.copy(c), c;
|
|
827
828
|
}
|
|
828
|
-
function or(
|
|
829
|
-
var n = new
|
|
830
|
-
return new
|
|
829
|
+
function or(e) {
|
|
830
|
+
var n = new e.constructor(e.byteLength);
|
|
831
|
+
return new we(n).set(new we(e)), n;
|
|
831
832
|
}
|
|
832
|
-
function ar(
|
|
833
|
-
var a = n ? or(
|
|
834
|
-
return new
|
|
833
|
+
function ar(e, n) {
|
|
834
|
+
var a = n ? or(e.buffer) : e.buffer;
|
|
835
|
+
return new e.constructor(a, e.byteOffset, e.length);
|
|
835
836
|
}
|
|
836
|
-
function ir(
|
|
837
|
-
var a = -1, c =
|
|
837
|
+
function ir(e, n) {
|
|
838
|
+
var a = -1, c = e.length;
|
|
838
839
|
for (n || (n = Array(c)); ++a < c; )
|
|
839
|
-
n[a] =
|
|
840
|
+
n[a] = e[a];
|
|
840
841
|
return n;
|
|
841
842
|
}
|
|
842
|
-
function sr(
|
|
843
|
+
function sr(e, n, a, c) {
|
|
843
844
|
var d = !a;
|
|
844
845
|
a || (a = {});
|
|
845
846
|
for (var h = -1, m = n.length; ++h < m; ) {
|
|
846
|
-
var p = n[h], v = c ? c(a[p],
|
|
847
|
-
v === void 0 && (v =
|
|
847
|
+
var p = n[h], v = c ? c(a[p], e[p], p, a, e) : void 0;
|
|
848
|
+
v === void 0 && (v = e[p]), d ? re(a, p, v) : Yt(a, p, v);
|
|
848
849
|
}
|
|
849
850
|
return a;
|
|
850
851
|
}
|
|
851
|
-
function lr(
|
|
852
|
-
return
|
|
852
|
+
function lr(e) {
|
|
853
|
+
return tr(function(n, a) {
|
|
853
854
|
var c = -1, d = a.length, h = d > 1 ? a[d - 1] : void 0, m = d > 2 ? a[2] : void 0;
|
|
854
|
-
for (h =
|
|
855
|
+
for (h = e.length > 3 && typeof h == "function" ? (d--, h) : void 0, m && pr(a[0], a[1], m) && (h = d < 3 ? void 0 : h, d = 1), n = Object(n); ++c < d; ) {
|
|
855
856
|
var p = a[c];
|
|
856
|
-
p &&
|
|
857
|
+
p && e(n, p, c, h);
|
|
857
858
|
}
|
|
858
859
|
return n;
|
|
859
860
|
});
|
|
860
861
|
}
|
|
861
|
-
function cr(
|
|
862
|
+
function cr(e) {
|
|
862
863
|
return function(n, a, c) {
|
|
863
864
|
for (var d = -1, h = Object(n), m = c(n), p = m.length; p--; ) {
|
|
864
|
-
var v = m[
|
|
865
|
+
var v = m[e ? p : ++d];
|
|
865
866
|
if (a(h[v], v, h) === !1)
|
|
866
867
|
break;
|
|
867
868
|
}
|
|
868
869
|
return n;
|
|
869
870
|
};
|
|
870
871
|
}
|
|
871
|
-
function Y(
|
|
872
|
-
var a =
|
|
872
|
+
function Y(e, n) {
|
|
873
|
+
var a = e.__data__;
|
|
873
874
|
return dr(n) ? a[typeof n == "string" ? "string" : "hash"] : a.map;
|
|
874
875
|
}
|
|
875
|
-
function
|
|
876
|
-
var a =
|
|
877
|
-
return
|
|
876
|
+
function ne(e, n) {
|
|
877
|
+
var a = bt(e, n);
|
|
878
|
+
return Xt(a) ? a : void 0;
|
|
878
879
|
}
|
|
879
|
-
function ur(
|
|
880
|
-
var n = C.call(
|
|
880
|
+
function ur(e) {
|
|
881
|
+
var n = C.call(e, $), a = e[$];
|
|
881
882
|
try {
|
|
882
|
-
|
|
883
|
+
e[$] = void 0;
|
|
883
884
|
var c = !0;
|
|
884
885
|
} catch {
|
|
885
886
|
}
|
|
886
|
-
var d =
|
|
887
|
-
return c && (n ?
|
|
887
|
+
var d = ve.call(e);
|
|
888
|
+
return c && (n ? e[$] = a : delete e[$]), d;
|
|
888
889
|
}
|
|
889
|
-
function fr(
|
|
890
|
-
return typeof
|
|
890
|
+
function fr(e) {
|
|
891
|
+
return typeof e.constructor == "function" && !$e(e) ? Ot(ke(e)) : {};
|
|
891
892
|
}
|
|
892
|
-
function
|
|
893
|
-
var a = typeof
|
|
894
|
-
return n = n ?? u, !!n && (a == "number" || a != "symbol" &&
|
|
893
|
+
function je(e, n) {
|
|
894
|
+
var a = typeof e;
|
|
895
|
+
return n = n ?? u, !!n && (a == "number" || a != "symbol" && pt.test(e)) && e > -1 && e % 1 == 0 && e < n;
|
|
895
896
|
}
|
|
896
|
-
function pr(
|
|
897
|
+
function pr(e, n, a) {
|
|
897
898
|
if (!E(a))
|
|
898
899
|
return !1;
|
|
899
900
|
var c = typeof n;
|
|
900
|
-
return (c == "number" ?
|
|
901
|
+
return (c == "number" ? se(a) && je(n, a.length) : c == "string" && n in a) ? V(a[n], e) : !1;
|
|
901
902
|
}
|
|
902
|
-
function dr(
|
|
903
|
-
var n = typeof
|
|
904
|
-
return n == "string" || n == "number" || n == "symbol" || n == "boolean" ?
|
|
903
|
+
function dr(e) {
|
|
904
|
+
var n = typeof e;
|
|
905
|
+
return n == "string" || n == "number" || n == "symbol" || n == "boolean" ? e !== "__proto__" : e === null;
|
|
905
906
|
}
|
|
906
|
-
function gr(
|
|
907
|
-
return !!
|
|
907
|
+
function gr(e) {
|
|
908
|
+
return !!me && me in e;
|
|
908
909
|
}
|
|
909
|
-
function $
|
|
910
|
-
var n =
|
|
911
|
-
return
|
|
910
|
+
function $e(e) {
|
|
911
|
+
var n = e && e.constructor, a = typeof n == "function" && n.prototype || H;
|
|
912
|
+
return e === a;
|
|
912
913
|
}
|
|
913
|
-
function hr(
|
|
914
|
+
function hr(e) {
|
|
914
915
|
var n = [];
|
|
915
|
-
if (
|
|
916
|
-
for (var a in Object(
|
|
916
|
+
if (e != null)
|
|
917
|
+
for (var a in Object(e))
|
|
917
918
|
n.push(a);
|
|
918
919
|
return n;
|
|
919
920
|
}
|
|
920
|
-
function yr(
|
|
921
|
-
return
|
|
921
|
+
function yr(e) {
|
|
922
|
+
return ve.call(e);
|
|
922
923
|
}
|
|
923
|
-
function br(
|
|
924
|
-
return n =
|
|
925
|
-
for (var c = arguments, d = -1, h =
|
|
924
|
+
function br(e, n, a) {
|
|
925
|
+
return n = Ie(n === void 0 ? e.length - 1 : n, 0), function() {
|
|
926
|
+
for (var c = arguments, d = -1, h = Ie(c.length - n, 0), m = Array(h); ++d < h; )
|
|
926
927
|
m[d] = c[n + d];
|
|
927
928
|
d = -1;
|
|
928
929
|
for (var p = Array(n + 1); ++d < n; )
|
|
929
930
|
p[d] = c[d];
|
|
930
|
-
return p[n] = a(m),
|
|
931
|
+
return p[n] = a(m), gt(e, this, p);
|
|
931
932
|
};
|
|
932
933
|
}
|
|
933
|
-
function
|
|
934
|
-
if (!(n === "constructor" && typeof
|
|
935
|
-
return
|
|
934
|
+
function oe(e, n) {
|
|
935
|
+
if (!(n === "constructor" && typeof e[n] == "function") && n != "__proto__")
|
|
936
|
+
return e[n];
|
|
936
937
|
}
|
|
937
938
|
var mr = vr(rr);
|
|
938
|
-
function vr(
|
|
939
|
+
function vr(e) {
|
|
939
940
|
var n = 0, a = 0;
|
|
940
941
|
return function() {
|
|
941
|
-
var c =
|
|
942
|
+
var c = St(), d = l - (c - a);
|
|
942
943
|
if (a = c, d > 0) {
|
|
943
944
|
if (++n >= s)
|
|
944
945
|
return arguments[0];
|
|
945
946
|
} else
|
|
946
947
|
n = 0;
|
|
947
|
-
return
|
|
948
|
+
return e.apply(void 0, arguments);
|
|
948
949
|
};
|
|
949
950
|
}
|
|
950
|
-
function _r(
|
|
951
|
-
if (
|
|
951
|
+
function _r(e) {
|
|
952
|
+
if (e != null) {
|
|
952
953
|
try {
|
|
953
|
-
return q.call(
|
|
954
|
+
return q.call(e);
|
|
954
955
|
} catch {
|
|
955
956
|
}
|
|
956
957
|
try {
|
|
957
|
-
return
|
|
958
|
+
return e + "";
|
|
958
959
|
} catch {
|
|
959
960
|
}
|
|
960
961
|
}
|
|
961
962
|
return "";
|
|
962
963
|
}
|
|
963
|
-
function V(
|
|
964
|
-
return
|
|
964
|
+
function V(e, n) {
|
|
965
|
+
return e === n || e !== e && n !== n;
|
|
965
966
|
}
|
|
966
|
-
var
|
|
967
|
+
var ae = Oe(/* @__PURE__ */ function() {
|
|
967
968
|
return arguments;
|
|
968
|
-
}()) ?
|
|
969
|
-
return D(
|
|
970
|
-
},
|
|
971
|
-
function
|
|
972
|
-
return
|
|
973
|
-
}
|
|
974
|
-
function wr(
|
|
975
|
-
return D(
|
|
976
|
-
}
|
|
977
|
-
var
|
|
978
|
-
function
|
|
979
|
-
if (!E(
|
|
969
|
+
}()) ? Oe : function(e) {
|
|
970
|
+
return D(e) && C.call(e, "callee") && !kt.call(e, "callee");
|
|
971
|
+
}, ie = Array.isArray;
|
|
972
|
+
function se(e) {
|
|
973
|
+
return e != null && Ee(e.length) && !le(e);
|
|
974
|
+
}
|
|
975
|
+
function wr(e) {
|
|
976
|
+
return D(e) && se(e);
|
|
977
|
+
}
|
|
978
|
+
var xe = It || Sr;
|
|
979
|
+
function le(e) {
|
|
980
|
+
if (!E(e))
|
|
980
981
|
return !1;
|
|
981
|
-
var n = W(
|
|
982
|
-
return n == O || n == w || n == b || n ==
|
|
982
|
+
var n = W(e);
|
|
983
|
+
return n == O || n == w || n == b || n == Ke;
|
|
983
984
|
}
|
|
984
|
-
function
|
|
985
|
-
return typeof
|
|
985
|
+
function Ee(e) {
|
|
986
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= u;
|
|
986
987
|
}
|
|
987
|
-
function E(
|
|
988
|
-
var n = typeof
|
|
989
|
-
return
|
|
988
|
+
function E(e) {
|
|
989
|
+
var n = typeof e;
|
|
990
|
+
return e != null && (n == "object" || n == "function");
|
|
990
991
|
}
|
|
991
|
-
function D(
|
|
992
|
-
return
|
|
992
|
+
function D(e) {
|
|
993
|
+
return e != null && typeof e == "object";
|
|
993
994
|
}
|
|
994
|
-
function Tr(
|
|
995
|
-
if (!D(
|
|
995
|
+
function Tr(e) {
|
|
996
|
+
if (!D(e) || W(e) != pe)
|
|
996
997
|
return !1;
|
|
997
|
-
var n =
|
|
998
|
+
var n = ke(e);
|
|
998
999
|
if (n === null)
|
|
999
1000
|
return !0;
|
|
1000
1001
|
var a = C.call(n, "constructor") && n.constructor;
|
|
1001
|
-
return typeof a == "function" && a instanceof a && q.call(a) ==
|
|
1002
|
+
return typeof a == "function" && a instanceof a && q.call(a) == wt;
|
|
1002
1003
|
}
|
|
1003
|
-
var
|
|
1004
|
-
function kr(
|
|
1005
|
-
return sr(
|
|
1004
|
+
var Re = be ? yt(be) : Zt;
|
|
1005
|
+
function kr(e) {
|
|
1006
|
+
return sr(e, Pe(e));
|
|
1006
1007
|
}
|
|
1007
|
-
function
|
|
1008
|
-
return
|
|
1008
|
+
function Pe(e) {
|
|
1009
|
+
return se(e) ? Wt(e, !0) : Qt(e);
|
|
1009
1010
|
}
|
|
1010
|
-
var Ar = lr(function(
|
|
1011
|
-
|
|
1011
|
+
var Ar = lr(function(e, n, a, c) {
|
|
1012
|
+
Ce(e, n, a, c);
|
|
1012
1013
|
});
|
|
1013
|
-
function Ir(
|
|
1014
|
+
function Ir(e) {
|
|
1014
1015
|
return function() {
|
|
1015
|
-
return
|
|
1016
|
+
return e;
|
|
1016
1017
|
};
|
|
1017
1018
|
}
|
|
1018
|
-
function
|
|
1019
|
-
return
|
|
1019
|
+
function Me(e) {
|
|
1020
|
+
return e;
|
|
1020
1021
|
}
|
|
1021
1022
|
function Sr() {
|
|
1022
1023
|
return !1;
|
|
@@ -1027,18 +1028,18 @@ var kn = Z.exports;
|
|
|
1027
1028
|
const An = /* @__PURE__ */ Tn(kn);
|
|
1028
1029
|
function In(o) {
|
|
1029
1030
|
let r = {};
|
|
1030
|
-
function
|
|
1031
|
+
function t(i, s) {
|
|
1031
1032
|
if ((s == null ? void 0 : s.type) === "AwaitExpression" && s.argument.type === "CallExpression" && s.argument.callee.type === "Identifier" && s.argument.callee.name === "useStoryblok") {
|
|
1032
1033
|
const l = s.argument.arguments;
|
|
1033
1034
|
if (l && l[1].type === "ObjectExpression") {
|
|
1034
|
-
const u =
|
|
1035
|
+
const u = He(l[1].properties);
|
|
1035
1036
|
r = {
|
|
1036
1037
|
...r,
|
|
1037
1038
|
apiOptions: u
|
|
1038
1039
|
};
|
|
1039
1040
|
}
|
|
1040
1041
|
if (l && l[2].type === "ObjectExpression") {
|
|
1041
|
-
const u =
|
|
1042
|
+
const u = He(l[2].properties);
|
|
1042
1043
|
r = {
|
|
1043
1044
|
...r,
|
|
1044
1045
|
bridgeOptions: u
|
|
@@ -1046,31 +1047,31 @@ function In(o) {
|
|
|
1046
1047
|
}
|
|
1047
1048
|
}
|
|
1048
1049
|
}
|
|
1049
|
-
return An({}, o,
|
|
1050
|
+
return An({}, o, t), r;
|
|
1050
1051
|
}
|
|
1051
|
-
function
|
|
1052
|
+
function He(o) {
|
|
1052
1053
|
const r = {};
|
|
1053
|
-
return o.reduce((
|
|
1054
|
-
if (i.type !== "Property") return
|
|
1054
|
+
return o.reduce((t, i) => {
|
|
1055
|
+
if (i.type !== "Property") return t;
|
|
1055
1056
|
const { key: s, value: l } = i, { type: u } = l;
|
|
1056
|
-
if (s.type !== "Identifier") return
|
|
1057
|
+
if (s.type !== "Identifier") return t;
|
|
1057
1058
|
if (u === "Literal")
|
|
1058
|
-
|
|
1059
|
+
t[s.name] = l.value;
|
|
1059
1060
|
else if (u === "ArrayExpression") {
|
|
1060
1061
|
const f = l.elements.reduce((g, b) => b.type === "Literal" && b.value ? [...g, b.value] : g, []);
|
|
1061
|
-
|
|
1062
|
+
t[s.name] = f;
|
|
1062
1063
|
}
|
|
1063
|
-
return
|
|
1064
|
+
return t;
|
|
1064
1065
|
}, r);
|
|
1065
1066
|
}
|
|
1066
1067
|
let B = [];
|
|
1067
1068
|
function Sn(o, r) {
|
|
1068
|
-
const
|
|
1069
|
+
const t = "virtual:storyblok-bridge", i = "\0" + t;
|
|
1069
1070
|
if (!o || r !== "server")
|
|
1070
1071
|
return {
|
|
1071
1072
|
name: "vite-plugin-storyblok-bridge",
|
|
1072
1073
|
resolveId(f) {
|
|
1073
|
-
if (f ===
|
|
1074
|
+
if (f === t)
|
|
1074
1075
|
return i;
|
|
1075
1076
|
},
|
|
1076
1077
|
load(f) {
|
|
@@ -1082,7 +1083,7 @@ function Sn(o, r) {
|
|
|
1082
1083
|
return {
|
|
1083
1084
|
name: "vite-plugin-storyblok-bridge",
|
|
1084
1085
|
async resolveId(f) {
|
|
1085
|
-
if (f ===
|
|
1086
|
+
if (f === t)
|
|
1086
1087
|
return i;
|
|
1087
1088
|
},
|
|
1088
1089
|
async transform(f, g) {
|
|
@@ -1106,36 +1107,36 @@ function Sn(o, r) {
|
|
|
1106
1107
|
};
|
|
1107
1108
|
}
|
|
1108
1109
|
function On(o = [], r = []) {
|
|
1109
|
-
return r.every(({ url:
|
|
1110
|
-
const s = o.find((l) => (l == null ? void 0 : l.url) ===
|
|
1110
|
+
return r.every(({ url: t, options: i }) => {
|
|
1111
|
+
const s = o.find((l) => (l == null ? void 0 : l.url) === t);
|
|
1111
1112
|
return s && JSON.stringify(i) === JSON.stringify(s.options);
|
|
1112
1113
|
});
|
|
1113
1114
|
}
|
|
1114
|
-
let
|
|
1115
|
+
let qe;
|
|
1115
1116
|
async function En(o) {
|
|
1116
|
-
const { action: r, story:
|
|
1117
|
-
if (r === "input" &&
|
|
1117
|
+
const { action: r, story: t } = o || {};
|
|
1118
|
+
if (r === "input" && t) {
|
|
1118
1119
|
const i = async () => {
|
|
1119
|
-
const l = await jn(
|
|
1120
|
+
const l = await jn(t), u = document.body;
|
|
1120
1121
|
if (l.outerHTML === u.outerHTML) return;
|
|
1121
1122
|
const f = document.querySelector('[data-blok-focused="true"]');
|
|
1122
1123
|
Cn(u, l, f);
|
|
1123
1124
|
};
|
|
1124
|
-
clearTimeout(
|
|
1125
|
+
clearTimeout(qe), qe = setTimeout(i, 500);
|
|
1125
1126
|
}
|
|
1126
1127
|
["published", "change"].includes(o == null ? void 0 : o.action) && location.reload();
|
|
1127
1128
|
}
|
|
1128
|
-
function Cn(o, r,
|
|
1129
|
-
if (
|
|
1130
|
-
const i =
|
|
1129
|
+
function Cn(o, r, t) {
|
|
1130
|
+
if (t) {
|
|
1131
|
+
const i = t.getAttribute("data-blok-uid"), s = r.querySelector(
|
|
1131
1132
|
`[data-blok-uid="${i}"]`
|
|
1132
1133
|
);
|
|
1133
|
-
s && (s.setAttribute("data-blok-focused", "true"),
|
|
1134
|
+
s && (s.setAttribute("data-blok-focused", "true"), t.replaceWith(s));
|
|
1134
1135
|
} else
|
|
1135
1136
|
o.replaceWith(r);
|
|
1136
1137
|
}
|
|
1137
1138
|
async function jn(o) {
|
|
1138
|
-
const
|
|
1139
|
+
const t = await (await fetch(location.href, {
|
|
1139
1140
|
method: "POST",
|
|
1140
1141
|
body: JSON.stringify({
|
|
1141
1142
|
...o,
|
|
@@ -1145,12 +1146,12 @@ async function jn(o) {
|
|
|
1145
1146
|
"Content-Type": "application/json"
|
|
1146
1147
|
}
|
|
1147
1148
|
})).text();
|
|
1148
|
-
return new DOMParser().parseFromString(
|
|
1149
|
+
return new DOMParser().parseFromString(t, "text/html").body;
|
|
1149
1150
|
}
|
|
1150
1151
|
function Rn() {
|
|
1151
1152
|
return globalThis.storyblokApiInstance || console.error("storyblokApiInstance has not been initialized correctly"), globalThis.storyblokApiInstance;
|
|
1152
1153
|
}
|
|
1153
|
-
async function Pn(o, r = {},
|
|
1154
|
+
async function Pn(o, r = {}, t = {}, i) {
|
|
1154
1155
|
globalThis.storyblokApiInstance || console.error("storyblokApiInstance has not been initialized correctly");
|
|
1155
1156
|
let s = null;
|
|
1156
1157
|
if (i && i.locals._storyblok_preview_data)
|
|
@@ -1159,21 +1160,21 @@ async function Pn(o, r = {}, e = {}, i) {
|
|
|
1159
1160
|
const { data: l } = await globalThis.storyblokApiInstance.get(
|
|
1160
1161
|
o,
|
|
1161
1162
|
r,
|
|
1162
|
-
|
|
1163
|
+
t
|
|
1163
1164
|
);
|
|
1164
1165
|
s = l.story;
|
|
1165
1166
|
}
|
|
1166
1167
|
return s;
|
|
1167
1168
|
}
|
|
1168
1169
|
function Mn(o, r) {
|
|
1169
|
-
const
|
|
1170
|
-
if (!
|
|
1170
|
+
const t = globalThis.storyblokApiInstance.richTextResolver;
|
|
1171
|
+
if (!t) {
|
|
1171
1172
|
console.error(
|
|
1172
1173
|
"Please initialize the Storyblok SDK before calling the renderRichText function"
|
|
1173
1174
|
);
|
|
1174
1175
|
return;
|
|
1175
1176
|
}
|
|
1176
|
-
return _n(o, r,
|
|
1177
|
+
return _n(o, r, t);
|
|
1177
1178
|
}
|
|
1178
1179
|
function Nn(o) {
|
|
1179
1180
|
const r = {
|
|
@@ -1188,7 +1189,7 @@ function Nn(o) {
|
|
|
1188
1189
|
name: "@storyblok/astro",
|
|
1189
1190
|
hooks: {
|
|
1190
1191
|
"astro:config:setup": ({
|
|
1191
|
-
injectScript:
|
|
1192
|
+
injectScript: t,
|
|
1192
1193
|
updateConfig: i,
|
|
1193
1194
|
addDevToolbarApp: s,
|
|
1194
1195
|
addMiddleware: l,
|
|
@@ -1219,7 +1220,7 @@ function Nn(o) {
|
|
|
1219
1220
|
throw new Error(
|
|
1220
1221
|
"To utilize the Astro Storyblok Live feature, Astro must be configured to run in SSR mode. Please disable this feature or switch Astro to SSR mode."
|
|
1221
1222
|
);
|
|
1222
|
-
if (
|
|
1223
|
+
if (t(
|
|
1223
1224
|
"page-ssr",
|
|
1224
1225
|
`
|
|
1225
1226
|
import { storyblokApiInstance } from "virtual:storyblok-init";
|
|
@@ -1234,7 +1235,7 @@ function Nn(o) {
|
|
|
1234
1235
|
)});`;
|
|
1235
1236
|
} else
|
|
1236
1237
|
f = "const storyblokInstance = new StoryblokBridge()";
|
|
1237
|
-
|
|
1238
|
+
t(
|
|
1238
1239
|
"page",
|
|
1239
1240
|
`
|
|
1240
1241
|
import { loadStoryblokBridge } from "@storyblok/astro";
|
|
@@ -1251,7 +1252,7 @@ function Nn(o) {
|
|
|
1251
1252
|
`
|
|
1252
1253
|
);
|
|
1253
1254
|
}
|
|
1254
|
-
r.livePreview && (
|
|
1255
|
+
r.livePreview && (t(
|
|
1255
1256
|
"page",
|
|
1256
1257
|
`
|
|
1257
1258
|
import { loadStoryblokBridge, handleStoryblokMessage } from "@storyblok/astro";
|