@storyblok/astro 5.0.2 → 5.1.0-alpha.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.
@@ -1,90 +1,90 @@
1
- function Or(o, r, t) {
2
- const s = "virtual:storyblok-init", i = "\0" + s;
1
+ function E(r, t, e) {
2
+ const o = "virtual:storyblok-init", s = "\0" + o;
3
3
  return {
4
4
  name: "vite-plugin-storyblok-init",
5
- async resolveId(l) {
6
- if (l === s)
7
- return i;
5
+ async resolveId(a) {
6
+ if (a === o)
7
+ return s;
8
8
  },
9
- async load(l) {
10
- if (l === i)
9
+ async load(a) {
10
+ if (a === s)
11
11
  return `
12
12
  import { storyblokInit, apiPlugin } from "@storyblok/js";
13
13
  const { storyblokApi } = storyblokInit({
14
- accessToken: "${o}",
15
- use: ${r ? "[]" : "[apiPlugin]"},
16
- apiOptions: ${JSON.stringify(t)},
14
+ accessToken: "${r}",
15
+ use: ${t ? "[]" : "[apiPlugin]"},
16
+ apiOptions: ${JSON.stringify(e)},
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, Ne = /^[\p{Lu}](?![\p{Lu}])/gu, Ge = /([\p{Alpha}\p{N}_]|$)/u, fe = /[_.\- ]+/, xr = new RegExp("^" + fe.source), ze = new RegExp(fe.source + Ge.source, "gu"), Le = new RegExp("\\d+" + Ge.source, "gu"), $r = (o, r, t, s) => {
24
- let i = !1, l = !1, u = !1, f = !1;
25
- for (let p = 0; p < o.length; p++) {
26
- const y = o[p];
27
- f = p > 2 ? o[p - 3] === "-" : !0, i && Cr.test(y) ? (o = o.slice(0, p) + "-" + o.slice(p), i = !1, u = l, l = !0, p++) : l && u && jr.test(y) && (!f || s) ? (o = o.slice(0, p - 1) + "-" + o.slice(p - 1), u = l, l = !1, i = !0) : (i = r(y) === y && t(y) !== y, u = l, l = t(y) === y && r(y) !== y);
28
- }
29
- return o;
30
- }, Er = (o, r) => (Ne.lastIndex = 0, o.replaceAll(Ne, (t) => r(t))), Rr = (o, r) => (ze.lastIndex = 0, Le.lastIndex = 0, o.replaceAll(Le, (t, s, i) => ["_", "-"].includes(o.charAt(i + t.length)) ? t : r(t)).replaceAll(ze, (t, s) => r(s)));
31
- function De(o, r) {
32
- if (!(typeof o == "string" || Array.isArray(o)))
23
+ const C = /[\p{Lu}]/u, j = /[\p{Ll}]/u, k = /^[\p{Lu}](?![\p{Lu}])/gu, x = /([\p{Alpha}\p{N}_]|$)/u, b = /[_.\- ]+/, R = new RegExp("^" + b.source), w = new RegExp(b.source + x.source, "gu"), $ = new RegExp("\\d+" + x.source, "gu"), M = (r, t, e, o) => {
24
+ let s = !1, a = !1, n = !1, i = !1;
25
+ for (let l = 0; l < r.length; l++) {
26
+ const c = r[l];
27
+ i = l > 2 ? r[l - 3] === "-" : !0, s && C.test(c) ? (r = r.slice(0, l) + "-" + r.slice(l), s = !1, n = a, a = !0, l++) : a && n && j.test(c) && (!i || o) ? (r = r.slice(0, l - 1) + "-" + r.slice(l - 1), n = a, a = !1, s = !0) : (s = t(c) === c && e(c) !== c, n = a, a = e(c) === c && t(c) !== c);
28
+ }
29
+ return r;
30
+ }, O = (r, t) => (k.lastIndex = 0, r.replaceAll(k, (e) => t(e))), L = (r, t) => (w.lastIndex = 0, $.lastIndex = 0, r.replaceAll($, (e, o, s) => ["_", "-"].includes(r.charAt(s + e.length)) ? e : t(e)).replaceAll(w, (e, o) => t(o)));
31
+ function v(r, t) {
32
+ if (!(typeof r == "string" || Array.isArray(r)))
33
33
  throw new TypeError("Expected the input to be `string | string[]`");
34
- if (r = {
34
+ if (t = {
35
35
  pascalCase: !1,
36
36
  preserveConsecutiveUppercase: !1,
37
- ...r
38
- }, Array.isArray(o) ? o = o.map((l) => l.trim()).filter((l) => l.length).join("-") : o = o.trim(), o.length === 0)
37
+ ...t
38
+ }, Array.isArray(r) ? r = r.map((a) => a.trim()).filter((a) => a.length).join("-") : r = r.trim(), r.length === 0)
39
39
  return "";
40
- const t = r.locale === !1 ? (l) => l.toLowerCase() : (l) => l.toLocaleLowerCase(r.locale), s = r.locale === !1 ? (l) => l.toUpperCase() : (l) => l.toLocaleUpperCase(r.locale);
41
- return o.length === 1 ? fe.test(o) ? "" : r.pascalCase ? s(o) : t(o) : (o !== t(o) && (o = $r(o, t, s, r.preserveConsecutiveUppercase)), o = o.replace(xr, ""), o = r.preserveConsecutiveUppercase ? Er(o, t) : t(o), r.pascalCase && (o = s(o.charAt(0)) + o.slice(1)), Rr(o, s));
40
+ const e = t.locale === !1 ? (a) => a.toLowerCase() : (a) => a.toLocaleLowerCase(t.locale), o = t.locale === !1 ? (a) => a.toUpperCase() : (a) => a.toLocaleUpperCase(t.locale);
41
+ return r.length === 1 ? b.test(r) ? "" : t.pascalCase ? o(r) : e(r) : (r !== e(r) && (r = M(r, e, o, t.preserveConsecutiveUppercase)), r = r.replace(R, ""), r = t.preserveConsecutiveUppercase ? O(r, e) : e(r), t.pascalCase && (r = o(r.charAt(0)) + r.slice(1)), L(r, o));
42
42
  }
43
- function Pr(o, r, t, s) {
44
- const i = "virtual:storyblok-components", l = "\0" + i;
43
+ function N(r, t, e, o) {
44
+ const s = "virtual:storyblok-components", a = "\0" + s;
45
45
  return {
46
46
  name: "vite-plugin-storyblok-components",
47
- async resolveId(u) {
48
- if (u === i)
49
- return l;
47
+ async resolveId(n) {
48
+ if (n === s)
49
+ return a;
50
50
  },
51
- async load(u) {
52
- if (u === l) {
53
- const f = [], p = [];
54
- for await (const [_, k] of Object.entries(r)) {
55
- const A = await this.resolve(
56
- "/" + o + "/" + k + ".astro"
51
+ async load(n) {
52
+ if (n === a) {
53
+ const i = [], l = [];
54
+ for await (const [u, f] of Object.entries(t)) {
55
+ const d = await this.resolve(
56
+ "/" + r + "/" + f + ".astro"
57
57
  );
58
- if (A)
59
- f.push(`import ${De(_)} from "${A.id}"`);
60
- else if (t)
61
- p.push(_);
58
+ if (d)
59
+ i.push(`import ${v(u)} from "${d.id}"`);
60
+ else if (e)
61
+ l.push(u);
62
62
  else
63
63
  throw new Error(
64
- `Component could not be found for blok "${_}"! Does "${"/" + o + "/" + k}.astro" exist?`
64
+ `Component could not be found for blok "${u}"! Does "${"/" + r + "/" + f}.astro" exist?`
65
65
  );
66
66
  }
67
- let y = "";
68
- if (t)
69
- if (y = ",FallbackComponent", s) {
70
- const _ = await this.resolve(
71
- "/" + o + "/" + s + ".astro"
67
+ let c = "";
68
+ if (e)
69
+ if (c = ",FallbackComponent", o) {
70
+ const u = await this.resolve(
71
+ "/" + r + "/" + o + ".astro"
72
72
  );
73
- if (!_)
73
+ if (!u)
74
74
  throw new Error(
75
- `Custom fallback component could not be found. Does "${"/" + o + "/" + s}.astro" exist?`
75
+ `Custom fallback component could not be found. Does "${"/" + r + "/" + o}.astro" exist?`
76
76
  );
77
- f.push(
78
- `import FallbackComponent from "${_.id}"`
77
+ i.push(
78
+ `import FallbackComponent from "${u.id}"`
79
79
  );
80
80
  } else
81
- f.push(
81
+ i.push(
82
82
  "import FallbackComponent from '@storyblok/astro/FallbackComponent.astro'"
83
83
  );
84
- if (Object.values(r).length)
85
- return `${f.join(";")};export default {${Object.keys(r).filter((_) => !p.includes(_)).map((_) => De(_)).join(",")}${y}}`;
86
- if (t)
87
- return `${f[0]}; export default {${y.replace(",", "")}}`;
84
+ if (Object.values(t).length)
85
+ return `${i.join(";")};export default {${Object.keys(t).filter((u) => !l.includes(u)).map((u) => v(u)).join(",")}${c}}`;
86
+ if (e)
87
+ return `${i[0]}; export default {${c.replace(",", "")}}`;
88
88
  throw new Error(
89
89
  `Currently, no Storyblok components are registered in astro.config.mjs.
90
90
  Please register your components or enable the fallback component.
@@ -94,53 +94,53 @@ Detailed information can be found here: https://github.com/storyblok/storyblok-a
94
94
  }
95
95
  };
96
96
  }
97
- function Mr(o) {
98
- const r = "virtual:storyblok-options", t = "\0" + r;
97
+ function P(r) {
98
+ const t = "virtual:storyblok-options", e = "\0" + t;
99
99
  return {
100
100
  name: "vite-plugin-storyblok-options",
101
- async resolveId(s) {
102
- if (s === r)
103
- return t;
101
+ async resolveId(o) {
102
+ if (o === t)
103
+ return e;
104
104
  },
105
- async load(s) {
106
- if (s === t)
107
- return `export default ${JSON.stringify(o)}`;
105
+ async load(o) {
106
+ if (o === e)
107
+ return `export default ${JSON.stringify(r)}`;
108
108
  }
109
109
  };
110
110
  }
111
- let Ue = !1;
112
- const Be = [], Nr = (o) => new Promise((r, t) => {
113
- if (typeof window > "u" || (window.storyblokRegisterEvent = (i) => {
111
+ let I = !1;
112
+ const S = [], _ = (r) => new Promise((t, e) => {
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
- Ue ? i() : Be.push(i);
118
+ I ? s() : S.push(s);
119
119
  }, document.getElementById("storyblok-javascript-bridge"))) return;
120
- const s = document.createElement("script");
121
- s.async = !0, s.src = o, s.id = "storyblok-javascript-bridge", s.onerror = (i) => t(i), s.onload = (i) => {
122
- Be.forEach((l) => l()), Ue = !0, r(i);
123
- }, document.getElementsByTagName("head")[0].appendChild(s);
120
+ const o = document.createElement("script");
121
+ o.async = !0, o.src = r, o.id = "storyblok-javascript-bridge", o.onerror = (s) => e(s), o.onload = (s) => {
122
+ S.forEach((a) => a()), I = !0, t(s);
123
+ }, document.getElementsByTagName("head")[0].appendChild(o);
124
124
  });
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);
126
- class Dr {
125
+ var z = Object.defineProperty, D = (r, t, e) => t in r ? z(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, g = (r, t, e) => D(r, typeof t != "symbol" ? t + "" : t, e);
126
+ class U {
127
127
  constructor() {
128
- S(this, "isCDNUrl", (r = "") => r.indexOf("/cdn/") > -1), S(this, "getOptionsPage", (r, t = 25, s = 1) => ({
129
- ...r,
130
- per_page: t,
131
- page: s
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 s = Math.abs(t - r) || 0, i = r < t ? 1 : -1;
134
- return this.arrayFrom(s, (l, u) => u * i + r);
135
- }), S(this, "asyncMap", async (r, t) => Promise.all(r.map(t))), S(this, "flatMap", (r = [], t) => r.map(t).reduce((s, i) => [...s, ...i], [])), S(this, "escapeHTML", function(r) {
136
- const t = {
128
+ g(this, "isCDNUrl", (t = "") => t.indexOf("/cdn/") > -1), g(this, "getOptionsPage", (t, e = 25, o = 1) => ({
129
+ ...t,
130
+ per_page: e,
131
+ page: o
132
+ })), g(this, "delay", (t) => new Promise((e) => setTimeout(e, t))), g(this, "arrayFrom", (t = 0, e) => [...Array(t)].map(e)), g(this, "range", (t = 0, e = t) => {
133
+ const o = Math.abs(e - t) || 0, s = t < e ? 1 : -1;
134
+ return this.arrayFrom(o, (a, n) => n * s + t);
135
+ }), g(this, "asyncMap", async (t, e) => Promise.all(t.map(e))), g(this, "flatMap", (t = [], e) => t.map(e).reduce((o, s) => [...o, ...s], [])), g(this, "escapeHTML", function(t) {
136
+ const e = {
137
137
  "&": "&amp;",
138
138
  "<": "&lt;",
139
139
  ">": "&gt;",
140
140
  '"': "&quot;",
141
141
  "'": "&#39;"
142
- }, s = /[&<>"']/g, i = RegExp(s.source);
143
- return r && i.test(r) ? r.replace(s, (l) => t[l]) : r;
142
+ }, o = /[&<>"']/g, s = RegExp(o.source);
143
+ return t && s.test(t) ? t.replace(o, (a) => e[a]) : t;
144
144
  });
145
145
  }
146
146
  /**
@@ -150,226 +150,226 @@ class Dr {
150
150
  * @param {Boolean} isArray
151
151
  * @return {String} Stringified object
152
152
  */
153
- stringify(r, t, s) {
154
- const i = [];
155
- for (const l in r) {
156
- if (!Object.prototype.hasOwnProperty.call(r, l))
153
+ stringify(t, e, o) {
154
+ const s = [];
155
+ for (const a in t) {
156
+ if (!Object.prototype.hasOwnProperty.call(t, a))
157
157
  continue;
158
- const u = r[l], f = s ? "" : encodeURIComponent(l);
159
- let p;
160
- typeof u == "object" ? p = this.stringify(
161
- u,
162
- t ? t + encodeURIComponent("[" + f + "]") : f,
163
- Array.isArray(u)
164
- ) : p = (t ? t + encodeURIComponent("[" + f + "]") : f) + "=" + encodeURIComponent(u), i.push(p);
158
+ const n = t[a], i = o ? "" : encodeURIComponent(a);
159
+ let l;
160
+ typeof n == "object" ? l = this.stringify(
161
+ n,
162
+ e ? e + encodeURIComponent("[" + i + "]") : i,
163
+ Array.isArray(n)
164
+ ) : l = (e ? e + encodeURIComponent("[" + i + "]") : i) + "=" + encodeURIComponent(n), s.push(l);
165
165
  }
166
- return i.join("&");
166
+ return s.join("&");
167
167
  }
168
168
  /**
169
169
  * @method getRegionURL
170
170
  * @param {String} regionCode region code, could be eu, us, cn, ap or ca
171
171
  * @return {String} The base URL of the region
172
172
  */
173
- getRegionURL(r) {
174
- const t = "api.storyblok.com", s = "api-us.storyblok.com", i = "app.storyblokchina.cn", l = "api-ap.storyblok.com", u = "api-ca.storyblok.com";
175
- switch (r) {
173
+ getRegionURL(t) {
174
+ const e = "api.storyblok.com", o = "api-us.storyblok.com", s = "app.storyblokchina.cn", a = "api-ap.storyblok.com", n = "api-ca.storyblok.com";
175
+ switch (t) {
176
176
  case "us":
177
- return s;
177
+ return o;
178
178
  case "cn":
179
- return i;
179
+ return s;
180
180
  case "ap":
181
- return l;
181
+ return a;
182
182
  case "ca":
183
- return u;
183
+ return n;
184
184
  default:
185
- return t;
185
+ return e;
186
186
  }
187
187
  }
188
188
  }
189
- const Ur = function(o, r) {
190
- const t = {};
191
- for (const s in o) {
192
- const i = o[s];
193
- r.indexOf(s) > -1 && i !== null && (t[s] = i);
194
- }
195
- return t;
196
- }, Br = (o) => o === "email", Fr = () => ({
189
+ const B = function(r, t) {
190
+ const e = {};
191
+ for (const o in r) {
192
+ const s = r[o];
193
+ t.indexOf(o) > -1 && s !== null && (e[o] = s);
194
+ }
195
+ return e;
196
+ }, q = (r) => r === "email", F = () => ({
197
197
  singleTag: "hr"
198
- }), Hr = () => ({
198
+ }), H = () => ({
199
199
  tag: "blockquote"
200
- }), qr = () => ({
200
+ }), W = () => ({
201
201
  tag: "ul"
202
- }), Gr = (o) => ({
202
+ }), J = (r) => ({
203
203
  tag: [
204
204
  "pre",
205
205
  {
206
206
  tag: "code",
207
- attrs: o.attrs
207
+ attrs: r.attrs
208
208
  }
209
209
  ]
210
- }), Jr = () => ({
210
+ }), K = () => ({
211
211
  singleTag: "br"
212
- }), Kr = (o) => ({
213
- tag: `h${o.attrs.level}`
214
- }), Wr = (o) => ({
212
+ }), V = (r) => ({
213
+ tag: `h${r.attrs.level}`
214
+ }), G = (r) => ({
215
215
  singleTag: [
216
216
  {
217
217
  tag: "img",
218
- attrs: Ur(o.attrs, ["src", "alt", "title"])
218
+ attrs: B(r.attrs, ["src", "alt", "title"])
219
219
  }
220
220
  ]
221
- }), Xr = () => ({
221
+ }), Q = () => ({
222
222
  tag: "li"
223
- }), Yr = () => ({
223
+ }), X = () => ({
224
224
  tag: "ol"
225
- }), Zr = () => ({
225
+ }), Y = () => ({
226
226
  tag: "p"
227
- }), Qr = (o) => ({
227
+ }), Z = (r) => ({
228
228
  tag: [
229
229
  {
230
230
  tag: "span",
231
231
  attrs: {
232
232
  "data-type": "emoji",
233
- "data-name": o.attrs.name,
234
- emoji: o.attrs.emoji
233
+ "data-name": r.attrs.name,
234
+ emoji: r.attrs.emoji
235
235
  }
236
236
  }
237
237
  ]
238
- }), Vr = () => ({
238
+ }), ee = () => ({
239
239
  tag: "b"
240
- }), en = () => ({
240
+ }), te = () => ({
241
241
  tag: "s"
242
- }), tn = () => ({
242
+ }), re = () => ({
243
243
  tag: "u"
244
- }), rn = () => ({
244
+ }), oe = () => ({
245
245
  tag: "strong"
246
- }), nn = () => ({
246
+ }), se = () => ({
247
247
  tag: "code"
248
- }), on = () => ({
248
+ }), ae = () => ({
249
249
  tag: "i"
250
- }), an = (o) => {
251
- if (!o.attrs)
250
+ }), ne = (r) => {
251
+ if (!r.attrs)
252
252
  return {
253
253
  tag: ""
254
254
  };
255
- const r = new Dr().escapeHTML, t = { ...o.attrs }, { linktype: s = "url" } = o.attrs;
256
- if (delete t.linktype, t.href && (t.href = r(o.attrs.href || "")), Br(s) && (t.href = `mailto:${t.href}`), t.anchor && (t.href = `${t.href}#${t.anchor}`, delete t.anchor), t.custom) {
257
- for (const i in t.custom)
258
- t[i] = t.custom[i];
259
- delete t.custom;
255
+ const t = new U().escapeHTML, e = { ...r.attrs }, { linktype: o = "url" } = r.attrs;
256
+ if (delete e.linktype, e.href && (e.href = t(r.attrs.href || "")), q(o) && (e.href = `mailto:${e.href}`), e.anchor && (e.href = `${e.href}#${e.anchor}`, delete e.anchor), e.custom) {
257
+ for (const s in e.custom)
258
+ e[s] = e.custom[s];
259
+ delete e.custom;
260
260
  }
261
261
  return {
262
262
  tag: [
263
263
  {
264
264
  tag: "a",
265
- attrs: t
265
+ attrs: e
266
266
  }
267
267
  ]
268
268
  };
269
- }, sn = (o) => ({
269
+ }, le = (r) => ({
270
270
  tag: [
271
271
  {
272
272
  tag: "span",
273
- attrs: o.attrs
273
+ attrs: r.attrs
274
274
  }
275
275
  ]
276
- }), ln = () => ({
276
+ }), ie = () => ({
277
277
  tag: "sub"
278
- }), cn = () => ({
278
+ }), ce = () => ({
279
279
  tag: "sup"
280
- }), un = (o) => ({
280
+ }), ue = (r) => ({
281
281
  tag: [
282
282
  {
283
283
  tag: "span",
284
- attrs: o.attrs
284
+ attrs: r.attrs
285
285
  }
286
286
  ]
287
- }), fn = (o) => {
288
- var r;
289
- return (r = o.attrs) != null && r.color ? {
287
+ }), de = (r) => {
288
+ var t;
289
+ return (t = r.attrs) != null && t.color ? {
290
290
  tag: [
291
291
  {
292
292
  tag: "span",
293
293
  attrs: {
294
- style: `background-color:${o.attrs.color};`
294
+ style: `background-color:${r.attrs.color};`
295
295
  }
296
296
  }
297
297
  ]
298
298
  } : {
299
299
  tag: ""
300
300
  };
301
- }, dn = (o) => {
302
- var r;
303
- return (r = o.attrs) != null && r.color ? {
301
+ }, pe = (r) => {
302
+ var t;
303
+ return (t = r.attrs) != null && t.color ? {
304
304
  tag: [
305
305
  {
306
306
  tag: "span",
307
307
  attrs: {
308
- style: `color:${o.attrs.color}`
308
+ style: `color:${r.attrs.color}`
309
309
  }
310
310
  }
311
311
  ]
312
312
  } : {
313
313
  tag: ""
314
314
  };
315
- }, pn = {
315
+ }, ge = {
316
316
  nodes: {
317
- horizontal_rule: Fr,
318
- blockquote: Hr,
319
- bullet_list: qr,
320
- code_block: Gr,
321
- hard_break: Jr,
322
- heading: Kr,
323
- image: Wr,
324
- list_item: Xr,
325
- ordered_list: Yr,
326
- paragraph: Zr,
327
- emoji: Qr
317
+ horizontal_rule: F,
318
+ blockquote: H,
319
+ bullet_list: W,
320
+ code_block: J,
321
+ hard_break: K,
322
+ heading: V,
323
+ image: G,
324
+ list_item: Q,
325
+ ordered_list: X,
326
+ paragraph: Y,
327
+ emoji: Z
328
328
  },
329
329
  marks: {
330
- bold: Vr,
331
- strike: en,
332
- underline: tn,
333
- strong: rn,
334
- code: nn,
335
- italic: on,
336
- link: an,
337
- styled: sn,
338
- subscript: ln,
339
- superscript: cn,
340
- anchor: un,
341
- highlight: fn,
342
- textStyle: dn
343
- }
344
- }, gn = function(o) {
345
- const r = {
330
+ bold: ee,
331
+ strike: te,
332
+ underline: re,
333
+ strong: oe,
334
+ code: se,
335
+ italic: ae,
336
+ link: ne,
337
+ styled: le,
338
+ subscript: ie,
339
+ superscript: ce,
340
+ anchor: ue,
341
+ highlight: de,
342
+ textStyle: pe
343
+ }
344
+ }, fe = function(r) {
345
+ const t = {
346
346
  "&": "&amp;",
347
347
  "<": "&lt;",
348
348
  ">": "&gt;",
349
349
  '"': "&quot;",
350
350
  "'": "&#39;"
351
- }, t = /[&<>"']/g, s = RegExp(t.source);
352
- return o && s.test(o) ? o.replace(t, (i) => r[i]) : o;
351
+ }, e = /[&<>"']/g, o = RegExp(e.source);
352
+ return r && o.test(r) ? r.replace(e, (s) => t[s]) : r;
353
353
  };
354
- let Fe = !1;
355
- class hn {
356
- constructor(r) {
357
- S(this, "marks"), S(this, "nodes"), r || (r = pn), this.marks = r.marks || [], this.nodes = r.nodes || [];
354
+ let T = !1;
355
+ class he {
356
+ constructor(t) {
357
+ g(this, "marks"), g(this, "nodes"), t || (t = ge), this.marks = t.marks || [], this.nodes = t.nodes || [];
358
358
  }
359
- addNode(r, t) {
360
- this.nodes[r] = t;
359
+ addNode(t, e) {
360
+ this.nodes[t] = e;
361
361
  }
362
- addMark(r, t) {
363
- this.marks[r] = t;
362
+ addMark(t, e) {
363
+ this.marks[t] = e;
364
364
  }
365
- render(r, t = { optimizeImages: !1 }, s = !0) {
366
- if (!Fe && s && (console.warn(
365
+ render(t, e = { optimizeImages: !1 }, o = !0) {
366
+ if (!T && o && (console.warn(
367
367
  "Warning ⚠️: The RichTextResolver class is deprecated and will be removed in the next major release. Please use the `@storyblok/richtext` package instead. https://github.com/storyblok/richtext/"
368
- ), Fe = !0), r && r.content && Array.isArray(r.content)) {
369
- let i = "";
370
- return r.content.forEach((l) => {
371
- i += this.renderNode(l);
372
- }), t.optimizeImages ? this.optimizeImages(i, t.optimizeImages) : i;
368
+ ), T = !0), t && t.content && Array.isArray(t.content)) {
369
+ let s = "";
370
+ return t.content.forEach((a) => {
371
+ s += this.renderNode(a);
372
+ }), e.optimizeImages ? this.optimizeImages(s, e.optimizeImages) : s;
373
373
  }
374
374
  return console.warn(
375
375
  `The render method must receive an Object with a "content" field.
@@ -398,853 +398,251 @@ class hn {
398
398
  }`
399
399
  ), "";
400
400
  }
401
- optimizeImages(r, t) {
402
- let s = 0, i = 0, l = "", u = "";
403
- typeof t != "boolean" && (typeof t.width == "number" && t.width > 0 && (l += `width="${t.width}" `, s = t.width), typeof t.height == "number" && t.height > 0 && (l += `height="${t.height}" `, i = 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()}`));
404
- const f = s > 0 || i > 0 || u.length > 0 ? `${s}x${i}${u}` : "";
405
- return r = r.replace(
401
+ optimizeImages(t, e) {
402
+ let o = 0, s = 0, a = "", n = "";
403
+ typeof e != "boolean" && (typeof e.width == "number" && e.width > 0 && (a += `width="${e.width}" `, o = e.width), typeof e.height == "number" && e.height > 0 && (a += `height="${e.height}" `, s = e.height), (e.loading === "lazy" || e.loading === "eager") && (a += `loading="${e.loading}" `), typeof e.class == "string" && e.class.length > 0 && (a += `class="${e.class}" `), e.filters && (typeof e.filters.blur == "number" && e.filters.blur >= 0 && e.filters.blur <= 100 && (n += `:blur(${e.filters.blur})`), typeof e.filters.brightness == "number" && e.filters.brightness >= -100 && e.filters.brightness <= 100 && (n += `:brightness(${e.filters.brightness})`), e.filters.fill && (e.filters.fill.match(/[0-9A-Fa-f]{6}/g) || e.filters.fill === "transparent") && (n += `:fill(${e.filters.fill})`), e.filters.format && ["webp", "png", "jpeg"].includes(e.filters.format) && (n += `:format(${e.filters.format})`), typeof e.filters.grayscale == "boolean" && e.filters.grayscale && (n += ":grayscale()"), typeof e.filters.quality == "number" && e.filters.quality >= 0 && e.filters.quality <= 100 && (n += `:quality(${e.filters.quality})`), e.filters.rotate && [90, 180, 270].includes(e.filters.rotate) && (n += `:rotate(${e.filters.rotate})`), n.length > 0 && (n = "/filters" + n))), a.length > 0 && (t = t.replace(/<img/g, `<img ${a.trim()}`));
404
+ const i = o > 0 || s > 0 || n.length > 0 ? `${o}x${s}${n}` : "";
405
+ return t = t.replace(
406
406
  /a.storyblok.com\/f\/(\d+)\/([^.]+)\.(gif|jpg|jpeg|png|tif|tiff|bmp)/g,
407
- `a.storyblok.com/f/$1/$2.$3/m/${f}`
408
- ), typeof t != "boolean" && (t.sizes || t.srcset) && (r = r.replace(/<img.*?src=["|'](.*?)["|']/g, (p) => {
409
- var y, _;
410
- const k = p.match(
407
+ `a.storyblok.com/f/$1/$2.$3/m/${i}`
408
+ ), typeof e != "boolean" && (e.sizes || e.srcset) && (t = t.replace(/<img.*?src=["|'](.*?)["|']/g, (l) => {
409
+ var c, u;
410
+ const f = l.match(
411
411
  /a.storyblok.com\/f\/(\d+)\/([^.]+)\.(gif|jpg|jpeg|png|tif|tiff|bmp)/g
412
412
  );
413
- if (k && k.length > 0) {
414
- const A = {
415
- srcset: (y = t.srcset) == null ? void 0 : y.map((w) => {
416
- if (typeof w == "number")
417
- return `//${k}/m/${w}x0${u} ${w}w`;
418
- if (typeof w == "object" && w.length === 2) {
419
- let M = 0, F = 0;
420
- return typeof w[0] == "number" && (M = w[0]), typeof w[1] == "number" && (F = w[1]), `//${k}/m/${M}x${F}${u} ${M}w`;
413
+ if (f && f.length > 0) {
414
+ const d = {
415
+ srcset: (c = e.srcset) == null ? void 0 : c.map((p) => {
416
+ if (typeof p == "number")
417
+ return `//${f}/m/${p}x0${n} ${p}w`;
418
+ if (typeof p == "object" && p.length === 2) {
419
+ let y = 0, m = 0;
420
+ return typeof p[0] == "number" && (y = p[0]), typeof p[1] == "number" && (m = p[1]), `//${f}/m/${y}x${m}${n} ${y}w`;
421
421
  }
422
422
  }).join(", "),
423
- sizes: (_ = t.sizes) == null ? void 0 : _.map((w) => w).join(", ")
423
+ sizes: (u = e.sizes) == null ? void 0 : u.map((p) => p).join(", ")
424
424
  };
425
- let O = "";
426
- return A.srcset && (O += `srcset="${A.srcset}" `), A.sizes && (O += `sizes="${A.sizes}" `), p.replace(/<img/g, `<img ${O.trim()}`);
425
+ let h = "";
426
+ return d.srcset && (h += `srcset="${d.srcset}" `), d.sizes && (h += `sizes="${d.sizes}" `), l.replace(/<img/g, `<img ${h.trim()}`);
427
427
  }
428
- return p;
429
- })), r;
430
- }
431
- renderNode(r) {
432
- const t = [];
433
- r.marks && r.marks.forEach((i) => {
434
- const l = this.getMatchingMark(i);
435
- l && l.tag !== "" && t.push(this.renderOpeningTag(l.tag));
428
+ return l;
429
+ })), t;
430
+ }
431
+ renderNode(t) {
432
+ const e = [];
433
+ t.marks && t.marks.forEach((s) => {
434
+ const a = this.getMatchingMark(s);
435
+ a && a.tag !== "" && e.push(this.renderOpeningTag(a.tag));
436
436
  });
437
- const s = this.getMatchingNode(r);
438
- return s && s.tag && t.push(this.renderOpeningTag(s.tag)), r.content ? r.content.forEach((i) => {
439
- t.push(this.renderNode(i));
440
- }) : r.text ? t.push(gn(r.text)) : s && s.singleTag ? t.push(this.renderTag(s.singleTag, " /")) : s && s.html ? t.push(s.html) : r.type === "emoji" && t.push(this.renderEmoji(r)), s && s.tag && t.push(this.renderClosingTag(s.tag)), r.marks && r.marks.slice(0).reverse().forEach((i) => {
441
- const l = this.getMatchingMark(i);
442
- l && l.tag !== "" && t.push(this.renderClosingTag(l.tag));
443
- }), t.join("");
444
- }
445
- renderTag(r, t) {
446
- return r.constructor === String ? `<${r}${t}>` : r.map((s) => {
447
- if (s.constructor === String)
448
- return `<${s}${t}>`;
437
+ const o = this.getMatchingNode(t);
438
+ return o && o.tag && e.push(this.renderOpeningTag(o.tag)), t.content ? t.content.forEach((s) => {
439
+ e.push(this.renderNode(s));
440
+ }) : t.text ? e.push(fe(t.text)) : o && o.singleTag ? e.push(this.renderTag(o.singleTag, " /")) : o && o.html ? e.push(o.html) : t.type === "emoji" && e.push(this.renderEmoji(t)), o && o.tag && e.push(this.renderClosingTag(o.tag)), t.marks && t.marks.slice(0).reverse().forEach((s) => {
441
+ const a = this.getMatchingMark(s);
442
+ a && a.tag !== "" && e.push(this.renderClosingTag(a.tag));
443
+ }), e.join("");
444
+ }
445
+ renderTag(t, e) {
446
+ return t.constructor === String ? `<${t}${e}>` : t.map((o) => {
447
+ if (o.constructor === String)
448
+ return `<${o}${e}>`;
449
449
  {
450
- let i = `<${s.tag}`;
451
- if (s.attrs) {
452
- for (const l in s.attrs)
453
- if (Object.prototype.hasOwnProperty.call(s.attrs, l)) {
454
- const u = s.attrs[l];
455
- u !== null && (i += ` ${l}="${u}"`);
450
+ let s = `<${o.tag}`;
451
+ if (o.attrs) {
452
+ for (const a in o.attrs)
453
+ if (Object.prototype.hasOwnProperty.call(o.attrs, a)) {
454
+ const n = o.attrs[a];
455
+ n !== null && (s += ` ${a}="${n}"`);
456
456
  }
457
457
  }
458
- return `${i}${t}>`;
458
+ return `${s}${e}>`;
459
459
  }
460
460
  }).join("");
461
461
  }
462
- renderOpeningTag(r) {
463
- return this.renderTag(r, "");
462
+ renderOpeningTag(t) {
463
+ return this.renderTag(t, "");
464
464
  }
465
- renderClosingTag(r) {
466
- return r.constructor === String ? `</${r}>` : r.slice(0).reverse().map((t) => t.constructor === String ? `</${t}>` : `</${t.tag}>`).join("");
465
+ renderClosingTag(t) {
466
+ return t.constructor === String ? `</${t}>` : t.slice(0).reverse().map((e) => e.constructor === String ? `</${e}>` : `</${e.tag}>`).join("");
467
467
  }
468
- getMatchingNode(r) {
469
- const t = this.nodes[r.type];
470
- if (typeof t == "function")
471
- return t(r);
468
+ getMatchingNode(t) {
469
+ const e = this.nodes[t.type];
470
+ if (typeof e == "function")
471
+ return e(t);
472
472
  }
473
- getMatchingMark(r) {
474
- const t = this.marks[r.type];
475
- if (typeof t == "function")
476
- return t(r);
473
+ getMatchingMark(t) {
474
+ const e = this.marks[t.type];
475
+ if (typeof e == "function")
476
+ return e(t);
477
477
  }
478
- renderEmoji(r) {
479
- if (r.attrs.emoji)
480
- return r.attrs.emoji;
481
- const t = [
478
+ renderEmoji(t) {
479
+ if (t.attrs.emoji)
480
+ return t.attrs.emoji;
481
+ const e = [
482
482
  {
483
483
  tag: "img",
484
484
  attrs: {
485
- src: r.attrs.fallbackImage,
485
+ src: t.attrs.fallbackImage,
486
486
  draggable: "false",
487
487
  loading: "lazy",
488
488
  align: "absmiddle"
489
489
  }
490
490
  }
491
491
  ];
492
- return this.renderTag(t, " /");
492
+ return this.renderTag(e, " /");
493
493
  }
494
494
  }
495
- const bn = hn, $n = (o) => {
496
- if (typeof o != "object" || typeof o._editable > "u")
495
+ const ye = he, Te = (r) => {
496
+ if (typeof r != "object" || typeof r._editable > "u")
497
497
  return {};
498
498
  try {
499
- const r = JSON.parse(
500
- o._editable.replace(/^<!--#storyblok#/, "").replace(/-->$/, "")
499
+ const t = JSON.parse(
500
+ r._editable.replace(/^<!--#storyblok#/, "").replace(/-->$/, "")
501
501
  );
502
- return r ? {
503
- "data-blok-c": JSON.stringify(r),
504
- "data-blok-uid": r.id + "-" + r.uid
502
+ return t ? {
503
+ "data-blok-c": JSON.stringify(t),
504
+ "data-blok-uid": t.id + "-" + t.uid
505
505
  } : {};
506
506
  } catch {
507
507
  return {};
508
508
  }
509
509
  };
510
- let yn, mn = "https://app.storyblok.com/f/storyblok-v2-latest.js";
511
- const vn = (o, r) => {
512
- o.addNode("blok", (t) => {
513
- let s = "";
514
- return t.attrs.body.forEach((i) => {
515
- s += r(i.component, i);
510
+ let be, me = "https://app.storyblok.com/f/storyblok-v2-latest.js";
511
+ const ke = (r, t) => {
512
+ r.addNode("blok", (e) => {
513
+ let o = "";
514
+ return e.attrs.body.forEach((s) => {
515
+ o += t(s.component, s);
516
516
  }), {
517
- html: s
517
+ html: o
518
518
  };
519
519
  });
520
- }, _n = (o) => !o || !(o != null && o.content.some((r) => r.content || r.type === "blok" || r.type === "horizontal_rule")), wn = (o, r, t) => {
521
- let s = t || yn;
522
- if (!s) {
520
+ }, we = (r) => !r || !(r != null && r.content.some((t) => t.content || t.type === "blok" || t.type === "horizontal_rule")), $e = (r, t, e) => {
521
+ let o = e || be;
522
+ if (!o) {
523
523
  console.error(
524
524
  "Please initialize the Storyblok SDK before calling the renderRichText function"
525
525
  );
526
526
  return;
527
527
  }
528
- return _n(o) ? "" : (r && (s = new bn(r.schema), r.resolver && vn(s, r.resolver)), s.render(o, {}, !1));
529
- }, En = () => Nr(mn);
530
- function Tn(o) {
531
- let r = {
532
- resolveRelations: []
533
- };
534
- function t(s) {
535
- s && Array.isArray(r.resolveRelations) && r.resolveRelations.push(
536
- ...Array.isArray(s) ? s : [s]
537
- );
538
- }
539
- for (const s of o)
540
- if (s.options) {
541
- const { apiOptions: i, bridgeOptions: l } = s.options;
542
- if (t(i == null ? void 0 : i.resolve_relations), l) {
543
- const { resolveRelations: u, ...f } = l;
544
- t(u), Object.assign(r, f);
545
- }
546
- }
547
- return r.resolveRelations = [...new Set(r.resolveRelations)], r;
548
- }
549
- var Z = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
550
- function kn(o) {
551
- return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
528
+ return we(r) ? "" : (t && (o = new ye(t.schema), t.resolver && ke(o, t.resolver)), o.render(r, {}, !1));
529
+ }, Ae = () => _(me);
530
+ function ve(r) {
531
+ return typeof r == "object" ? `const storyblokInstance = new StoryblokBridge(${JSON.stringify(r)});` : "const storyblokInstance = new StoryblokBridge();";
552
532
  }
553
- var Q = { exports: {} };
554
- Q.exports;
555
- (function(o, r) {
556
- var t = 200, s = "__lodash_hash_undefined__", i = 800, l = 16, u = 9007199254740991, f = "[object Arguments]", p = "[object Array]", y = "[object AsyncFunction]", _ = "[object Boolean]", k = "[object Date]", A = "[object Error]", O = "[object Function]", w = "[object GeneratorFunction]", M = "[object Map]", F = "[object Number]", Je = "[object Null]", de = "[object Object]", Ke = "[object Proxy]", We = "[object RegExp]", Xe = "[object Set]", Ye = "[object String]", Ze = "[object Undefined]", Qe = "[object WeakMap]", Ve = "[object ArrayBuffer]", et = "[object DataView]", tt = "[object Float32Array]", rt = "[object Float64Array]", nt = "[object Int8Array]", ot = "[object Int16Array]", at = "[object Int32Array]", st = "[object Uint8Array]", it = "[object Uint8ClampedArray]", lt = "[object Uint16Array]", ct = "[object Uint32Array]", ut = /[\\^$.*+?()[\]{}|]/g, ft = /^\[object .+?Constructor\]$/, dt = /^(?:0|[1-9]\d*)$/, b = {};
557
- b[tt] = b[rt] = b[nt] = b[ot] = b[at] = b[st] = b[it] = b[lt] = b[ct] = !0, b[f] = b[p] = b[Ve] = b[_] = b[et] = b[k] = b[A] = b[O] = b[M] = b[F] = b[de] = b[We] = b[Xe] = b[Ye] = b[Qe] = !1;
558
- var pe = typeof Z == "object" && Z && Z.Object === Object && Z, pt = typeof self == "object" && self && self.Object === Object && self, N = pe || pt || Function("return this")(), ge = r && !r.nodeType && r, z = ge && !0 && o && !o.nodeType && o, he = z && z.exports === ge, V = he && pe.process, be = function() {
559
- try {
560
- var e = z && z.require && z.require("util").types;
561
- return e || V && V.binding && V.binding("util");
562
- } catch {
563
- }
564
- }(), ye = be && be.isTypedArray;
565
- function gt(e, n, a) {
566
- switch (a.length) {
567
- case 0:
568
- return e.call(n);
569
- case 1:
570
- return e.call(n, a[0]);
571
- case 2:
572
- return e.call(n, a[0], a[1]);
573
- case 3:
574
- return e.call(n, a[0], a[1], a[2]);
575
- }
576
- return e.apply(n, a);
577
- }
578
- function ht(e, n) {
579
- for (var a = -1, c = Array(e); ++a < e; )
580
- c[a] = n(a);
581
- return c;
582
- }
583
- function bt(e) {
584
- return function(n) {
585
- return e(n);
586
- };
587
- }
588
- function yt(e, n) {
589
- return e == null ? void 0 : e[n];
590
- }
591
- function mt(e, n) {
592
- return function(a) {
593
- return e(n(a));
594
- };
595
- }
596
- var vt = Array.prototype, _t = Function.prototype, H = Object.prototype, ee = N["__core-js_shared__"], q = _t.toString, j = H.hasOwnProperty, me = function() {
597
- var e = /[^.]+$/.exec(ee && ee.keys && ee.keys.IE_PROTO || "");
598
- return e ? "Symbol(src)_1." + e : "";
599
- }(), ve = H.toString, wt = q.call(Object), Tt = RegExp(
600
- "^" + q.call(j).replace(ut, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
601
- ), G = he ? N.Buffer : void 0, _e = N.Symbol, we = N.Uint8Array;
602
- G && G.allocUnsafe;
603
- var Te = mt(Object.getPrototypeOf, Object), ke = Object.create, kt = H.propertyIsEnumerable, At = vt.splice, x = _e ? _e.toStringTag : void 0, J = function() {
604
- try {
605
- var e = ne(Object, "defineProperty");
606
- return e({}, "", {}), e;
607
- } catch {
608
- }
609
- }(), It = G ? G.isBuffer : void 0, Ae = Math.max, St = Date.now, Ie = ne(N, "Map"), L = ne(Object, "create"), Ot = /* @__PURE__ */ function() {
610
- function e() {
611
- }
612
- return function(n) {
613
- if (!E(n))
614
- return {};
615
- if (ke)
616
- return ke(n);
617
- e.prototype = n;
618
- var a = new e();
619
- return e.prototype = void 0, a;
620
- };
621
- }();
622
- function $(e) {
623
- var n = -1, a = e == null ? 0 : e.length;
624
- for (this.clear(); ++n < a; ) {
625
- var c = e[n];
626
- this.set(c[0], c[1]);
627
- }
628
- }
629
- function Ct() {
630
- this.__data__ = L ? L(null) : {}, this.size = 0;
631
- }
632
- function jt(e) {
633
- var n = this.has(e) && delete this.__data__[e];
634
- return this.size -= n ? 1 : 0, n;
635
- }
636
- function xt(e) {
637
- var n = this.__data__;
638
- if (L) {
639
- var a = n[e];
640
- return a === s ? void 0 : a;
641
- }
642
- return j.call(n, e) ? n[e] : void 0;
643
- }
644
- function $t(e) {
645
- var n = this.__data__;
646
- return L ? n[e] !== void 0 : j.call(n, e);
647
- }
648
- function Et(e, n) {
649
- var a = this.__data__;
650
- return this.size += this.has(e) ? 0 : 1, a[e] = L && n === void 0 ? s : n, this;
651
- }
652
- $.prototype.clear = Ct, $.prototype.delete = jt, $.prototype.get = xt, $.prototype.has = $t, $.prototype.set = Et;
653
- function C(e) {
654
- var n = -1, a = e == null ? 0 : e.length;
655
- for (this.clear(); ++n < a; ) {
656
- var c = e[n];
657
- this.set(c[0], c[1]);
658
- }
659
- }
660
- function Rt() {
661
- this.__data__ = [], this.size = 0;
662
- }
663
- function Pt(e) {
664
- var n = this.__data__, a = K(n, e);
665
- if (a < 0)
666
- return !1;
667
- var c = n.length - 1;
668
- return a == c ? n.pop() : At.call(n, a, 1), --this.size, !0;
669
- }
670
- function Mt(e) {
671
- var n = this.__data__, a = K(n, e);
672
- return a < 0 ? void 0 : n[a][1];
673
- }
674
- function Nt(e) {
675
- return K(this.__data__, e) > -1;
676
- }
677
- function zt(e, n) {
678
- var a = this.__data__, c = K(a, e);
679
- return c < 0 ? (++this.size, a.push([e, n])) : a[c][1] = n, this;
680
- }
681
- C.prototype.clear = Rt, C.prototype.delete = Pt, C.prototype.get = Mt, C.prototype.has = Nt, C.prototype.set = zt;
682
- function R(e) {
683
- var n = -1, a = e == null ? 0 : e.length;
684
- for (this.clear(); ++n < a; ) {
685
- var c = e[n];
686
- this.set(c[0], c[1]);
687
- }
688
- }
689
- function Lt() {
690
- this.size = 0, this.__data__ = {
691
- hash: new $(),
692
- map: new (Ie || C)(),
693
- string: new $()
533
+ let A;
534
+ async function xe(r) {
535
+ const { action: t, story: e } = r || {};
536
+ if (t === "input" && e) {
537
+ const o = async () => {
538
+ const a = await Se(e), n = document.body;
539
+ if (a.outerHTML === n.outerHTML) return;
540
+ const i = document.querySelector('[data-blok-focused="true"]');
541
+ Ie(n, a, i), document.dispatchEvent(new Event("storyblok-live-preview-updated"));
694
542
  };
543
+ clearTimeout(A), A = setTimeout(o, 500);
695
544
  }
696
- function Dt(e) {
697
- var n = X(this, e).delete(e);
698
- return this.size -= n ? 1 : 0, n;
699
- }
700
- function Ut(e) {
701
- return X(this, e).get(e);
702
- }
703
- function Bt(e) {
704
- return X(this, e).has(e);
705
- }
706
- function Ft(e, n) {
707
- var a = X(this, e), c = a.size;
708
- return a.set(e, n), this.size += a.size == c ? 0 : 1, this;
709
- }
710
- R.prototype.clear = Lt, R.prototype.delete = Dt, R.prototype.get = Ut, R.prototype.has = Bt, R.prototype.set = Ft;
711
- function P(e) {
712
- var n = this.__data__ = new C(e);
713
- this.size = n.size;
714
- }
715
- function Ht() {
716
- this.__data__ = new C(), this.size = 0;
717
- }
718
- function qt(e) {
719
- var n = this.__data__, a = n.delete(e);
720
- return this.size = n.size, a;
721
- }
722
- function Gt(e) {
723
- return this.__data__.get(e);
724
- }
725
- function Jt(e) {
726
- return this.__data__.has(e);
727
- }
728
- function Kt(e, n) {
729
- var a = this.__data__;
730
- if (a instanceof C) {
731
- var c = a.__data__;
732
- if (!Ie || c.length < t - 1)
733
- return c.push([e, n]), this.size = ++a.size, this;
734
- a = this.__data__ = new R(c);
735
- }
736
- return a.set(e, n), this.size = a.size, this;
737
- }
738
- P.prototype.clear = Ht, P.prototype.delete = qt, P.prototype.get = Gt, P.prototype.has = Jt, P.prototype.set = Kt;
739
- function Wt(e, n) {
740
- var a = se(e), c = !a && ae(e), d = !a && !c && xe(e), h = !a && !c && !d && Ee(e), m = a || c || d || h, g = m ? ht(e.length, String) : [], v = g.length;
741
- for (var I in e)
742
- m && // Safari 9 has enumerable `arguments.length` in strict mode.
743
- (I == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
744
- d && (I == "offset" || I == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
745
- h && (I == "buffer" || I == "byteLength" || I == "byteOffset") || // Skip index properties.
746
- Ce(I, v)) || g.push(I);
747
- return g;
748
- }
749
- function te(e, n, a) {
750
- (a !== void 0 && !Y(e[n], a) || a === void 0 && !(n in e)) && re(e, n, a);
751
- }
752
- function Xt(e, n, a) {
753
- var c = e[n];
754
- (!(j.call(e, n) && Y(c, a)) || a === void 0 && !(n in e)) && re(e, n, a);
755
- }
756
- function K(e, n) {
757
- for (var a = e.length; a--; )
758
- if (Y(e[a][0], n))
759
- return a;
760
- return -1;
761
- }
762
- function re(e, n, a) {
763
- n == "__proto__" && J ? J(e, n, {
764
- configurable: !0,
765
- enumerable: !0,
766
- value: a,
767
- writable: !0
768
- }) : e[n] = a;
769
- }
770
- var Yt = cr();
771
- function W(e) {
772
- return e == null ? e === void 0 ? Ze : Je : x && x in Object(e) ? ur(e) : br(e);
773
- }
774
- function Se(e) {
775
- return D(e) && W(e) == f;
776
- }
777
- function Zt(e) {
778
- if (!E(e) || gr(e))
779
- return !1;
780
- var n = le(e) ? Tt : ft;
781
- return n.test(_r(e));
782
- }
783
- function Qt(e) {
784
- return D(e) && $e(e.length) && !!b[W(e)];
785
- }
786
- function Vt(e) {
787
- if (!E(e))
788
- return hr(e);
789
- var n = je(e), a = [];
790
- for (var c in e)
791
- c == "constructor" && (n || !j.call(e, c)) || a.push(c);
792
- return a;
793
- }
794
- function Oe(e, n, a, c, d) {
795
- e !== n && Yt(n, function(h, m) {
796
- if (d || (d = new P()), E(h))
797
- er(e, n, m, a, Oe, c, d);
798
- else {
799
- var g = c ? c(oe(e, m), h, m + "", e, n, d) : void 0;
800
- g === void 0 && (g = h), te(e, m, g);
801
- }
802
- }, Re);
803
- }
804
- function er(e, n, a, c, d, h, m) {
805
- var g = oe(e, a), v = oe(n, a), I = m.get(v);
806
- if (I) {
807
- te(e, a, I);
808
- return;
809
- }
810
- var T = h ? h(g, v, a + "", e, n, m) : void 0, U = T === void 0;
811
- if (U) {
812
- var ce = se(v), ue = !ce && xe(v), Me = !ce && !ue && Ee(v);
813
- T = v, ce || ue || Me ? se(g) ? T = g : wr(g) ? T = sr(g) : ue ? (U = !1, T = nr(v)) : Me ? (U = !1, T = ar(v)) : T = [] : Tr(v) || ae(v) ? (T = g, ae(g) ? T = kr(g) : (!E(g) || le(g)) && (T = fr(v))) : U = !1;
814
- }
815
- U && (m.set(v, T), d(T, v, c, h, m), m.delete(v)), te(e, a, T);
816
- }
817
- function tr(e, n) {
818
- return mr(yr(e, n, Pe), e + "");
819
- }
820
- var rr = J ? function(e, n) {
821
- return J(e, "toString", {
822
- configurable: !0,
823
- enumerable: !1,
824
- value: Ir(n),
825
- writable: !0
826
- });
827
- } : Pe;
828
- function nr(e, n) {
829
- return e.slice();
830
- }
831
- function or(e) {
832
- var n = new e.constructor(e.byteLength);
833
- return new we(n).set(new we(e)), n;
834
- }
835
- function ar(e, n) {
836
- var a = or(e.buffer);
837
- return new e.constructor(a, e.byteOffset, e.length);
838
- }
839
- function sr(e, n) {
840
- var a = -1, c = e.length;
841
- for (n || (n = Array(c)); ++a < c; )
842
- n[a] = e[a];
843
- return n;
844
- }
845
- function ir(e, n, a, c) {
846
- var d = !a;
847
- a || (a = {});
848
- for (var h = -1, m = n.length; ++h < m; ) {
849
- var g = n[h], v = void 0;
850
- v === void 0 && (v = e[g]), d ? re(a, g, v) : Xt(a, g, v);
851
- }
852
- return a;
853
- }
854
- function lr(e) {
855
- return tr(function(n, a) {
856
- var c = -1, d = a.length, h = d > 1 ? a[d - 1] : void 0, m = d > 2 ? a[2] : void 0;
857
- for (h = e.length > 3 && typeof h == "function" ? (d--, h) : void 0, m && dr(a[0], a[1], m) && (h = d < 3 ? void 0 : h, d = 1), n = Object(n); ++c < d; ) {
858
- var g = a[c];
859
- g && e(n, g, c, h);
860
- }
861
- return n;
862
- });
863
- }
864
- function cr(e) {
865
- return function(n, a, c) {
866
- for (var d = -1, h = Object(n), m = c(n), g = m.length; g--; ) {
867
- var v = m[++d];
868
- if (a(h[v], v, h) === !1)
869
- break;
870
- }
871
- return n;
872
- };
873
- }
874
- function X(e, n) {
875
- var a = e.__data__;
876
- return pr(n) ? a[typeof n == "string" ? "string" : "hash"] : a.map;
877
- }
878
- function ne(e, n) {
879
- var a = yt(e, n);
880
- return Zt(a) ? a : void 0;
881
- }
882
- function ur(e) {
883
- var n = j.call(e, x), a = e[x];
884
- try {
885
- e[x] = void 0;
886
- var c = !0;
887
- } catch {
888
- }
889
- var d = ve.call(e);
890
- return c && (n ? e[x] = a : delete e[x]), d;
891
- }
892
- function fr(e) {
893
- return typeof e.constructor == "function" && !je(e) ? Ot(Te(e)) : {};
894
- }
895
- function Ce(e, n) {
896
- var a = typeof e;
897
- return n = n ?? u, !!n && (a == "number" || a != "symbol" && dt.test(e)) && e > -1 && e % 1 == 0 && e < n;
898
- }
899
- function dr(e, n, a) {
900
- if (!E(a))
901
- return !1;
902
- var c = typeof n;
903
- return (c == "number" ? ie(a) && Ce(n, a.length) : c == "string" && n in a) ? Y(a[n], e) : !1;
904
- }
905
- function pr(e) {
906
- var n = typeof e;
907
- return n == "string" || n == "number" || n == "symbol" || n == "boolean" ? e !== "__proto__" : e === null;
908
- }
909
- function gr(e) {
910
- return !!me && me in e;
911
- }
912
- function je(e) {
913
- var n = e && e.constructor, a = typeof n == "function" && n.prototype || H;
914
- return e === a;
915
- }
916
- function hr(e) {
917
- var n = [];
918
- if (e != null)
919
- for (var a in Object(e))
920
- n.push(a);
921
- return n;
922
- }
923
- function br(e) {
924
- return ve.call(e);
925
- }
926
- function yr(e, n, a) {
927
- return n = Ae(n === void 0 ? e.length - 1 : n, 0), function() {
928
- for (var c = arguments, d = -1, h = Ae(c.length - n, 0), m = Array(h); ++d < h; )
929
- m[d] = c[n + d];
930
- d = -1;
931
- for (var g = Array(n + 1); ++d < n; )
932
- g[d] = c[d];
933
- return g[n] = a(m), gt(e, this, g);
934
- };
935
- }
936
- function oe(e, n) {
937
- if (!(n === "constructor" && typeof e[n] == "function") && n != "__proto__")
938
- return e[n];
939
- }
940
- var mr = vr(rr);
941
- function vr(e) {
942
- var n = 0, a = 0;
943
- return function() {
944
- var c = St(), d = l - (c - a);
945
- if (a = c, d > 0) {
946
- if (++n >= i)
947
- return arguments[0];
948
- } else
949
- n = 0;
950
- return e.apply(void 0, arguments);
951
- };
952
- }
953
- function _r(e) {
954
- if (e != null) {
955
- try {
956
- return q.call(e);
957
- } catch {
958
- }
959
- try {
960
- return e + "";
961
- } catch {
962
- }
963
- }
964
- return "";
965
- }
966
- function Y(e, n) {
967
- return e === n || e !== e && n !== n;
968
- }
969
- var ae = Se(/* @__PURE__ */ function() {
970
- return arguments;
971
- }()) ? Se : function(e) {
972
- return D(e) && j.call(e, "callee") && !kt.call(e, "callee");
973
- }, se = Array.isArray;
974
- function ie(e) {
975
- return e != null && $e(e.length) && !le(e);
976
- }
977
- function wr(e) {
978
- return D(e) && ie(e);
979
- }
980
- var xe = It || Sr;
981
- function le(e) {
982
- if (!E(e))
983
- return !1;
984
- var n = W(e);
985
- return n == O || n == w || n == y || n == Ke;
986
- }
987
- function $e(e) {
988
- return typeof e == "number" && e > -1 && e % 1 == 0 && e <= u;
989
- }
990
- function E(e) {
991
- var n = typeof e;
992
- return e != null && (n == "object" || n == "function");
993
- }
994
- function D(e) {
995
- return e != null && typeof e == "object";
996
- }
997
- function Tr(e) {
998
- if (!D(e) || W(e) != de)
999
- return !1;
1000
- var n = Te(e);
1001
- if (n === null)
1002
- return !0;
1003
- var a = j.call(n, "constructor") && n.constructor;
1004
- return typeof a == "function" && a instanceof a && q.call(a) == wt;
1005
- }
1006
- var Ee = ye ? bt(ye) : Qt;
1007
- function kr(e) {
1008
- return ir(e, Re(e));
1009
- }
1010
- function Re(e) {
1011
- return ie(e) ? Wt(e) : Vt(e);
1012
- }
1013
- var Ar = lr(function(e, n, a, c) {
1014
- Oe(e, n, a, c);
1015
- });
1016
- function Ir(e) {
1017
- return function() {
1018
- return e;
1019
- };
1020
- }
1021
- function Pe(e) {
1022
- return e;
1023
- }
1024
- function Sr() {
1025
- return !1;
1026
- }
1027
- o.exports = Ar;
1028
- })(Q, Q.exports);
1029
- var An = Q.exports;
1030
- const In = /* @__PURE__ */ kn(An);
1031
- function Sn(o) {
1032
- let r = {};
1033
- function t(s, i) {
1034
- if ((i == null ? void 0 : i.type) === "AwaitExpression" && i.argument.type === "CallExpression" && i.argument.callee.type === "Identifier" && i.argument.callee.name === "useStoryblok") {
1035
- const l = i.argument.arguments;
1036
- if (l && l[1].type === "ObjectExpression") {
1037
- const u = He(l[1].properties);
1038
- r = {
1039
- ...r,
1040
- apiOptions: u
1041
- };
1042
- }
1043
- if (l && l[2].type === "ObjectExpression") {
1044
- const u = He(l[2].properties);
1045
- r = {
1046
- ...r,
1047
- bridgeOptions: u
1048
- };
1049
- }
1050
- }
1051
- }
1052
- return In({}, o, t), r;
1053
- }
1054
- function He(o) {
1055
- const r = {};
1056
- return o.reduce((t, s) => {
1057
- if (s.type !== "Property") return t;
1058
- const { key: i, value: l } = s, { type: u } = l;
1059
- if (i.type !== "Identifier") return t;
1060
- if (u === "Literal")
1061
- t[i.name] = l.value;
1062
- else if (u === "ArrayExpression") {
1063
- const f = l.elements.reduce((p, y) => y.type === "Literal" && y.value ? [...p, y.value] : p, []);
1064
- t[i.name] = f;
1065
- }
1066
- return t;
1067
- }, r);
545
+ ["published", "change"].includes(r == null ? void 0 : r.action) && location.reload();
1068
546
  }
1069
- let B = [];
1070
- function On(o, r) {
1071
- const t = "virtual:storyblok-bridge", s = "\0" + t;
1072
- if (!o || r !== "server")
1073
- return {
1074
- name: "vite-plugin-storyblok-bridge",
1075
- resolveId(f) {
1076
- if (f === t)
1077
- return s;
1078
- },
1079
- load(f) {
1080
- if (f === s)
1081
- return "export const bridgeOptions = null";
1082
- }
1083
- };
1084
- let i = [], l = null, u;
1085
- return {
1086
- name: "vite-plugin-storyblok-bridge",
1087
- async resolveId(f) {
1088
- if (f === t)
1089
- return s;
1090
- },
1091
- async transform(f, p) {
1092
- var O;
1093
- if (p.includes("node_modules") && !p.includes("/pages/") || !f.includes("useStoryblok") || !((O = this.getModuleInfo(p).meta) != null && O.astro)) return;
1094
- const [, ..._] = p.split("src/pages/"), k = _.join("/").replace(".astro", ""), A = Sn(this.parse(f));
1095
- B.length && (i = B.filter((w) => w.url !== k)), i.push({
1096
- url: k,
1097
- options: A
1098
- }), l && (u && clearTimeout(u), u = setTimeout(() => {
1099
- Cn(B, i) || (B.length !== 0 && (l.restart(), console.info("Bridge options updated. Restarting...")), B = [...i]);
1100
- }, 1e3));
1101
- },
1102
- async load(f) {
1103
- if (f === s)
1104
- return `export const bridgeOptions = ${JSON.stringify(Tn(i))}`;
1105
- },
1106
- configureServer(f) {
1107
- l = f;
1108
- }
1109
- };
1110
- }
1111
- function Cn(o = [], r = []) {
1112
- return r.every(({ url: t, options: s }) => {
1113
- const i = o.find((l) => (l == null ? void 0 : l.url) === t);
1114
- return i && JSON.stringify(s) === JSON.stringify(i.options);
1115
- });
1116
- }
1117
- let qe;
1118
- async function Rn(o) {
1119
- const { action: r, story: t } = o || {};
1120
- if (r === "input" && t) {
1121
- const s = async () => {
1122
- const l = await xn(t), u = document.body;
1123
- if (l.outerHTML === u.outerHTML) return;
1124
- const f = document.querySelector('[data-blok-focused="true"]');
1125
- jn(u, l, f);
1126
- };
1127
- clearTimeout(qe), qe = setTimeout(s, 500);
1128
- }
1129
- ["published", "change"].includes(o == null ? void 0 : o.action) && location.reload();
1130
- }
1131
- function jn(o, r, t) {
1132
- if (t) {
1133
- const s = t.getAttribute("data-blok-uid"), i = r.querySelector(
1134
- `[data-blok-uid="${s}"]`
547
+ function Ie(r, t, e) {
548
+ if (e) {
549
+ const o = e.getAttribute("data-blok-uid"), s = t.querySelector(
550
+ `[data-blok-uid="${o}"]`
1135
551
  );
1136
- i && (i.setAttribute("data-blok-focused", "true"), t.replaceWith(i));
552
+ s && (s.setAttribute("data-blok-focused", "true"), e.replaceWith(s));
1137
553
  } else
1138
- o.replaceWith(r);
554
+ r.replaceWith(t);
1139
555
  }
1140
- async function xn(o) {
1141
- const t = await (await fetch(location.href, {
556
+ async function Se(r) {
557
+ const e = await (await fetch(location.href, {
1142
558
  method: "POST",
1143
559
  body: JSON.stringify({
1144
- ...o,
560
+ ...r,
1145
561
  is_storyblok_preview: !0
1146
562
  }),
1147
563
  headers: {
1148
564
  "Content-Type": "application/json"
1149
565
  }
1150
566
  })).text();
1151
- return new DOMParser().parseFromString(t, "text/html").body;
567
+ return new DOMParser().parseFromString(e, "text/html").body;
1152
568
  }
1153
- function Pn() {
569
+ function Ee() {
1154
570
  return globalThis.storyblokApiInstance || console.error("storyblokApiInstance has not been initialized correctly"), globalThis.storyblokApiInstance;
1155
571
  }
1156
- async function Mn(o, r = {}, t = {}, s) {
1157
- globalThis.storyblokApiInstance || console.error("storyblokApiInstance has not been initialized correctly");
1158
- let i = null;
1159
- if (s && s.locals._storyblok_preview_data)
1160
- i = s.locals._storyblok_preview_data;
1161
- else {
1162
- const { data: l } = await globalThis.storyblokApiInstance.get(
1163
- o,
1164
- r,
1165
- t
1166
- );
1167
- i = l.story;
1168
- }
1169
- return i;
572
+ async function Ce(r) {
573
+ let t = null;
574
+ return r && r.locals._storyblok_preview_data && (t = r.locals._storyblok_preview_data), t;
1170
575
  }
1171
- function Nn(o, r) {
1172
- const t = globalThis.storyblokApiInstance.richTextResolver;
1173
- if (!t) {
576
+ function je(r, t) {
577
+ const e = globalThis.storyblokApiInstance.richTextResolver;
578
+ if (!e) {
1174
579
  console.error(
1175
580
  "Please initialize the Storyblok SDK before calling the renderRichText function"
1176
581
  );
1177
582
  return;
1178
583
  }
1179
- return wn(o, r, t);
584
+ return $e(r, t, e);
1180
585
  }
1181
- function zn(o) {
1182
- const r = {
1183
- useCustomApi: !1,
1184
- bridge: !0,
1185
- componentsDir: "src",
1186
- enableFallbackComponent: !1,
1187
- livePreview: !1,
1188
- ...o
1189
- };
586
+ function Re({
587
+ useCustomApi: r = !1,
588
+ bridge: t = !0,
589
+ componentsDir: e = "src",
590
+ enableFallbackComponent: o = !1,
591
+ livePreview: s = !1,
592
+ ...a
593
+ }) {
594
+ const n = {
595
+ useCustomApi: r,
596
+ bridge: t,
597
+ componentsDir: e,
598
+ enableFallbackComponent: o,
599
+ livePreview: s,
600
+ ...a
601
+ }, i = ve(t);
1190
602
  return {
1191
603
  name: "@storyblok/astro",
1192
604
  hooks: {
1193
605
  "astro:config:setup": ({
1194
- injectScript: t,
1195
- updateConfig: s,
1196
- addDevToolbarApp: i,
1197
- addMiddleware: l,
1198
- config: u
606
+ injectScript: l,
607
+ updateConfig: c,
608
+ addDevToolbarApp: u,
609
+ addMiddleware: f,
610
+ config: d
1199
611
  }) => {
1200
- if (s({
612
+ if (c({
1201
613
  vite: {
1202
614
  plugins: [
1203
- Or(
1204
- r.accessToken,
1205
- r.useCustomApi,
1206
- r.apiOptions
615
+ E(
616
+ n.accessToken,
617
+ n.useCustomApi,
618
+ n.apiOptions
1207
619
  ),
1208
- Pr(
1209
- r.componentsDir,
1210
- r.components,
1211
- r.enableFallbackComponent,
1212
- r.customFallbackComponent
620
+ N(
621
+ n.componentsDir,
622
+ n.components,
623
+ n.enableFallbackComponent,
624
+ n.customFallbackComponent
1213
625
  ),
1214
- Mr(r),
1215
- On(
1216
- r.livePreview,
1217
- u.output
1218
- )
626
+ P(n)
1219
627
  ]
1220
628
  }
1221
- }), r.livePreview && (u == null ? void 0 : u.output) !== "server")
629
+ }), n.livePreview && (d == null ? void 0 : d.output) !== "server")
1222
630
  throw new Error(
1223
631
  "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."
1224
632
  );
1225
- if (t(
633
+ l(
1226
634
  "page-ssr",
1227
635
  `
1228
636
  import { storyblokApiInstance } from "virtual:storyblok-init";
1229
637
  globalThis.storyblokApiInstance = storyblokApiInstance;
1230
638
  `
1231
- ), r.bridge && !r.livePreview) {
1232
- let f = "";
1233
- if (typeof r.bridge == "object") {
1234
- const p = { ...r.bridge };
1235
- f = `const storyblokInstance = new StoryblokBridge(${JSON.stringify(
1236
- p
1237
- )});`;
1238
- } else
1239
- f = "const storyblokInstance = new StoryblokBridge()";
1240
- t(
1241
- "page",
1242
- `
639
+ ), t && !s && l(
640
+ "page",
641
+ `
1243
642
  import { loadStoryblokBridge } from "@storyblok/astro";
1244
643
  loadStoryblokBridge().then(() => {
1245
644
  const { StoryblokBridge, location } = window;
1246
- ${f}
1247
-
645
+ ${i}
1248
646
  storyblokInstance.on(["published", "change"], (event) => {
1249
647
  if (!event.slugChanged) {
1250
648
  location.reload(true);
@@ -1252,38 +650,33 @@ function zn(o) {
1252
650
  });
1253
651
  });
1254
652
  `
1255
- );
1256
- }
1257
- r.livePreview && (t(
653
+ ), s && (l(
1258
654
  "page",
1259
655
  `
1260
656
  import { loadStoryblokBridge, handleStoryblokMessage } from "@storyblok/astro";
1261
- import { bridgeOptions } from "virtual:storyblok-bridge";
1262
657
  console.info("The Storyblok Astro live preview feature is currently in an experimental phase, and its API is subject to change in the future.")
1263
658
  loadStoryblokBridge().then(() => {
1264
659
  const { StoryblokBridge, location } = window;
1265
- if(bridgeOptions){
1266
- const storyblokInstance = new StoryblokBridge(bridgeOptions);
1267
- storyblokInstance.on(["published", "change", "input"], handleStoryblokMessage);
1268
- };
660
+ ${i}
661
+ storyblokInstance.on(["published", "change", "input"], handleStoryblokMessage);
1269
662
  });
1270
663
  `
1271
- ), l({
664
+ ), f({
1272
665
  entrypoint: "@storyblok/astro/middleware.ts",
1273
666
  order: "pre"
1274
- })), i("@storyblok/astro/toolbarApp.ts");
667
+ })), u("@storyblok/astro/toolbarApp.ts");
1275
668
  }
1276
669
  }
1277
670
  };
1278
671
  }
1279
672
  export {
1280
- bn as RichTextResolver,
1281
- pn as RichTextSchema,
1282
- zn as default,
1283
- Rn as handleStoryblokMessage,
1284
- En as loadStoryblokBridge,
1285
- Nn as renderRichText,
1286
- $n as storyblokEditable,
1287
- Mn as useStoryblok,
1288
- Pn as useStoryblokApi
673
+ ye as RichTextResolver,
674
+ ge as RichTextSchema,
675
+ Re as default,
676
+ Ce as getLiveStory,
677
+ xe as handleStoryblokMessage,
678
+ Ae as loadStoryblokBridge,
679
+ je as renderRichText,
680
+ Te as storyblokEditable,
681
+ Ee as useStoryblokApi
1289
682
  };