@builder.io/sdk-vue 0.0.2-0 → 0.0.2-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.
Files changed (39) hide show
  1. package/package.json +4 -4
  2. package/packages/_vue2/dist/block-styles.4b780e2e.js +56 -0
  3. package/packages/_vue2/dist/block-styles.d7caff48.cjs +10 -0
  4. package/packages/_vue2/dist/get-processed-block.1b0392ce.js +57 -0
  5. package/packages/_vue2/dist/get-processed-block.a69f90d1.cjs +1 -0
  6. package/packages/_vue2/dist/index.35b10c2f.js +2081 -0
  7. package/packages/_vue2/dist/index.e881a81c.cjs +4 -0
  8. package/packages/_vue2/dist/render-block.3112f40b.js +237 -0
  9. package/packages/_vue2/dist/render-block.37a4bbe9.cjs +3 -0
  10. package/packages/_vue2/dist/render-component.3c148966.cjs +1 -0
  11. package/packages/_vue2/dist/render-component.7c5a2af0.js +38 -0
  12. package/packages/_vue2/dist/render-inlined-styles.c3478295.cjs +1 -0
  13. package/packages/_vue2/dist/render-inlined-styles.f67a4c7d.js +31 -0
  14. package/packages/_vue2/dist/render-repeated-block.006af118.js +50 -0
  15. package/packages/_vue2/dist/render-repeated-block.ea4adce6.cjs +1 -0
  16. package/packages/_vue2/dist/render-styles.90704267.js +70 -0
  17. package/packages/_vue2/dist/render-styles.e6d20f13.cjs +17 -0
  18. package/packages/_vue2/dist/sdk.cjs +1 -0
  19. package/packages/_vue2/dist/sdk.js +27 -0
  20. package/packages/_vue2/dist/style.css +1 -0
  21. package/packages/_vue3/dist/block-styles.13caf8d7.js +53 -0
  22. package/packages/_vue3/dist/block-styles.8cb7f734.cjs +10 -0
  23. package/packages/_vue3/dist/get-processed-block.15d39b53.cjs +1 -0
  24. package/packages/_vue3/dist/get-processed-block.bebdc794.js +57 -0
  25. package/packages/_vue3/dist/index.f58628dd.cjs +4 -0
  26. package/packages/_vue3/dist/index.fa54ce28.js +2054 -0
  27. package/packages/_vue3/dist/render-block.23c16bfb.cjs +3 -0
  28. package/packages/_vue3/dist/render-block.9c550b26.js +253 -0
  29. package/packages/_vue3/dist/render-component.9668419b.js +43 -0
  30. package/packages/_vue3/dist/render-component.c2e224cc.cjs +1 -0
  31. package/packages/_vue3/dist/render-inlined-styles.08569ffb.js +30 -0
  32. package/packages/_vue3/dist/render-inlined-styles.32f5f3bc.cjs +1 -0
  33. package/packages/_vue3/dist/render-repeated-block.73309b84.js +45 -0
  34. package/packages/_vue3/dist/render-repeated-block.8c10514d.cjs +1 -0
  35. package/packages/_vue3/dist/render-styles.22ddc0bf.cjs +17 -0
  36. package/packages/_vue3/dist/render-styles.63eb2def.js +64 -0
  37. package/packages/_vue3/dist/sdk.cjs +1 -0
  38. package/packages/_vue3/dist/sdk.js +28 -0
  39. package/packages/_vue3/dist/style.css +1 -0
@@ -0,0 +1,2054 @@
1
+ import { defineAsyncComponent as y, resolveComponent as v, openBlock as l, createElementBlock as d, normalizeStyle as k, Fragment as R, renderList as E, createVNode as q, createElementVNode as I, createCommentVNode as b, normalizeClass as j, renderSlot as C, mergeProps as x, toDisplayString as P, createBlock as w } from "vue";
2
+ const U = "reactNative";
3
+ function h() {
4
+ return typeof window < "u" && typeof document < "u";
5
+ }
6
+ const W = {};
7
+ function ae(e, n) {
8
+ let t = W[e];
9
+ if (t || (t = W[e] = []), t.push(n), h()) {
10
+ const o = {
11
+ type: "builder.register",
12
+ data: {
13
+ type: e,
14
+ info: n
15
+ }
16
+ };
17
+ try {
18
+ parent.postMessage(o, "*"), parent !== window && window.postMessage(o, "*");
19
+ } catch (r) {
20
+ console.debug("Could not postmessage", r);
21
+ }
22
+ }
23
+ }
24
+ const ie = () => {
25
+ ae("insertMenu", {
26
+ name: "_default",
27
+ default: !0,
28
+ items: [
29
+ { name: "Box" },
30
+ { name: "Text" },
31
+ { name: "Image" },
32
+ { name: "Columns" }
33
+ ]
34
+ });
35
+ }, ce = () => {
36
+ var e;
37
+ h() && ((e = window.parent) == null || e.postMessage(
38
+ {
39
+ type: "builder.sdkInfo",
40
+ data: {
41
+ target: U,
42
+ supportsPatchUpdates: !1
43
+ }
44
+ },
45
+ "*"
46
+ ), window.addEventListener("message", ({ data: n }) => {
47
+ var t, o;
48
+ if (n)
49
+ switch (n.type) {
50
+ case "builder.evaluate": {
51
+ const r = n.data.text, s = n.data.arguments || [], a = n.data.id, c = new Function(r);
52
+ let i, u = null;
53
+ try {
54
+ i = c.apply(null, s);
55
+ } catch (m) {
56
+ u = m;
57
+ }
58
+ u ? (t = window.parent) == null || t.postMessage(
59
+ {
60
+ type: "builder.evaluateError",
61
+ data: { id: a, error: u.message }
62
+ },
63
+ "*"
64
+ ) : i && typeof i.then == "function" ? i.then((m) => {
65
+ var p;
66
+ (p = window.parent) == null || p.postMessage(
67
+ {
68
+ type: "builder.evaluateResult",
69
+ data: { id: a, result: m }
70
+ },
71
+ "*"
72
+ );
73
+ }).catch(console.error) : (o = window.parent) == null || o.postMessage(
74
+ {
75
+ type: "builder.evaluateResult",
76
+ data: { result: i, id: a }
77
+ },
78
+ "*"
79
+ );
80
+ break;
81
+ }
82
+ }
83
+ }));
84
+ };
85
+ function V(e) {
86
+ return e;
87
+ }
88
+ function pn(e) {
89
+ return e;
90
+ }
91
+ const le = () => Promise.resolve().then(() => se).then((e) => e.default).catch((e) => {
92
+ throw console.error(
93
+ "Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
94
+ e
95
+ ), e;
96
+ }), de = {
97
+ name: "builder-columns",
98
+ components: { "render-blocks": y(le) },
99
+ props: [
100
+ "space",
101
+ "columns",
102
+ "stackColumnsAt",
103
+ "reverseColumnsWhenStacked",
104
+ "builderBlock"
105
+ ],
106
+ data: () => ({ markMutable: V }),
107
+ computed: {
108
+ columnsCssVars() {
109
+ const e = this.stackColumnsAt === "never" ? "inherit" : this.reverseColumnsWhenStacked ? "column-reverse" : "column";
110
+ return {
111
+ "--flex-dir": e,
112
+ "--flex-dir-tablet": this.maybeApplyForTablet(e)
113
+ };
114
+ },
115
+ columnCssVars() {
116
+ const e = "100%", n = "0";
117
+ return {
118
+ "--column-width": e,
119
+ "--column-margin-left": n,
120
+ "--column-width-tablet": this.maybeApplyForTablet(e),
121
+ "--column-margin-left-tablet": this.maybeApplyForTablet(n)
122
+ };
123
+ }
124
+ },
125
+ methods: {
126
+ getGutterSize() {
127
+ return typeof this.space == "number" ? this.space || 0 : 20;
128
+ },
129
+ getColumns() {
130
+ return this.columns || [];
131
+ },
132
+ getWidth(e) {
133
+ var t;
134
+ const n = this.getColumns();
135
+ return ((t = n[e]) == null ? void 0 : t.width) || 100 / n.length;
136
+ },
137
+ getColumnCssWidth(e) {
138
+ const n = this.getColumns(), o = this.getGutterSize() * (n.length - 1) / n.length;
139
+ return `calc(${this.getWidth(e)}% - ${o}px)`;
140
+ },
141
+ maybeApplyForTablet(e) {
142
+ return (this.stackColumnsAt || "tablet") === "tablet" ? e : "inherit";
143
+ }
144
+ }
145
+ };
146
+ const f = (e, n) => {
147
+ const t = e.__vccOpts || e;
148
+ for (const [o, r] of n)
149
+ t[o] = r;
150
+ return t;
151
+ };
152
+ function ue(e, n, t, o, r, s) {
153
+ const a = v("render-blocks");
154
+ return l(), d("div", {
155
+ class: "builder-columns div-7fq9d0i380",
156
+ style: k(s.columnsCssVars)
157
+ }, [
158
+ (l(!0), d(R, null, E(t.columns, (c, i) => (l(), d("div", {
159
+ key: i,
160
+ class: "builder-column div-7fq9d0i380-2",
161
+ style: k({
162
+ width: s.getColumnCssWidth(i),
163
+ marginLeft: `${i === 0 ? 0 : s.getGutterSize()}px`,
164
+ ...s.columnCssVars
165
+ })
166
+ }, [
167
+ q(a, {
168
+ blocks: e.markMutable(c.blocks),
169
+ path: `component.options.columns.${i}.blocks`,
170
+ parent: t.builderBlock.id
171
+ }, null, 8, ["blocks", "path", "parent"])
172
+ ], 4))), 128))
173
+ ], 4);
174
+ }
175
+ const me = /* @__PURE__ */ f(de, [["render", ue], ["__scopeId", "data-v-6b734aa0"]]);
176
+ function B(e) {
177
+ return e.replace(/http(s)?:/, "");
178
+ }
179
+ function pe(e = "", n, t) {
180
+ const o = new RegExp("([?&])" + n + "=.*?(&|$)", "i"), r = e.indexOf("?") !== -1 ? "&" : "?";
181
+ return e.match(o) ? e.replace(o, "$1" + n + "=" + encodeURIComponent(t) + "$2") : e + r + n + "=" + encodeURIComponent(t);
182
+ }
183
+ function he(e, n) {
184
+ if (!e || !(e != null && e.match(/cdn\.shopify\.com/)) || !n)
185
+ return e;
186
+ if (n === "master")
187
+ return B(e);
188
+ const t = e.match(
189
+ /(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i
190
+ );
191
+ if (t) {
192
+ const o = e.split(t[0]), r = t[3], s = n.match("x") ? n : `${n}x`;
193
+ return B(`${o[0]}_${s}${r}`);
194
+ }
195
+ return null;
196
+ }
197
+ function T(e) {
198
+ if (!e)
199
+ return e;
200
+ const n = [100, 200, 400, 800, 1200, 1600, 2e3];
201
+ if (e.match(/builder\.io/)) {
202
+ let t = e;
203
+ const o = Number(e.split("?width=")[1]);
204
+ return isNaN(o) || (t = `${t} ${o}w`), n.filter((r) => r !== o).map((r) => `${pe(e, "width", r)} ${r}w`).concat([t]).join(", ");
205
+ }
206
+ return e.match(/cdn\.shopify\.com/) ? n.map((t) => [he(e, `${t}x${t}`), t]).filter(([t]) => !!t).map(([t, o]) => `${t} ${o}w`).concat([e]).join(", ") : e;
207
+ }
208
+ const fe = {
209
+ name: "builder-image",
210
+ props: [
211
+ "image",
212
+ "src",
213
+ "srcset",
214
+ "noWebp",
215
+ "altText",
216
+ "backgroundSize",
217
+ "className",
218
+ "sizes",
219
+ "aspectRatio",
220
+ "fitContent",
221
+ "builderBlock"
222
+ ],
223
+ computed: {
224
+ srcSetToUse() {
225
+ var t;
226
+ const n = this.image || this.src;
227
+ if (!n || !(n.match(/builder\.io/) || n.match(/cdn\.shopify\.com/)))
228
+ return this.srcset;
229
+ if (this.srcset && ((t = this.image) == null ? void 0 : t.includes("builder.io/api/v1/image"))) {
230
+ if (!this.srcset.includes(this.image.split("?")[0]))
231
+ return console.debug("Removed given srcset"), T(n);
232
+ } else if (this.image && !this.srcset)
233
+ return T(n);
234
+ return T(n);
235
+ },
236
+ webpSrcSet() {
237
+ var e;
238
+ return ((e = this.srcSetToUse) == null ? void 0 : e.match(/builder\.io/)) && !this.noWebp ? this.srcSetToUse.replace(/\?/g, "?format=webp&") : "";
239
+ }
240
+ },
241
+ methods: {
242
+ _classStringToObject(e) {
243
+ const n = {};
244
+ if (typeof e != "string")
245
+ return n;
246
+ const t = e.trim().split(/\s+/);
247
+ for (const o of t)
248
+ n[o] = !0;
249
+ return n;
250
+ }
251
+ }
252
+ };
253
+ const ge = { class: "div-2btisl9m7v3" }, be = ["srcset"], ye = ["alt", "role", "src", "srcset", "sizes"], ve = ["srcset"], xe = {
254
+ key: 2,
255
+ class: "div-2btisl9m7v3-3"
256
+ };
257
+ function _e(e, n, t, o, r, s) {
258
+ var a, c, i, u;
259
+ return l(), d("div", ge, [
260
+ I("picture", null, [
261
+ s.webpSrcSet ? (l(), d("source", {
262
+ key: 0,
263
+ type: "image/webp",
264
+ srcset: s.webpSrcSet
265
+ }, null, 8, be)) : b("", !0),
266
+ I("img", {
267
+ loading: "lazy",
268
+ alt: t.altText,
269
+ role: t.altText ? "presentation" : void 0,
270
+ style: k({
271
+ objectPosition: t.backgroundSize || "center",
272
+ objectFit: t.backgroundSize || "cover"
273
+ }),
274
+ class: j(
275
+ s._classStringToObject(
276
+ "builder-image" + (t.className ? " " + t.className : "") + " img-2btisl9m7v3"
277
+ )
278
+ ),
279
+ src: t.image,
280
+ srcset: s.srcSetToUse,
281
+ sizes: t.sizes
282
+ }, null, 14, ye),
283
+ I("source", { srcset: s.srcSetToUse }, null, 8, ve)
284
+ ]),
285
+ t.aspectRatio && !(t.fitContent && ((c = (a = t.builderBlock) == null ? void 0 : a.children) == null ? void 0 : c.length)) ? (l(), d("div", {
286
+ key: 0,
287
+ class: "builder-image-sizer div-2btisl9m7v3-2",
288
+ style: k({
289
+ paddingTop: t.aspectRatio * 100 + "%"
290
+ })
291
+ }, null, 4)) : b("", !0),
292
+ ((u = (i = t.builderBlock) == null ? void 0 : i.children) == null ? void 0 : u.length) && t.fitContent ? C(e.$slots, "default", { key: 1 }, void 0, !0) : b("", !0),
293
+ t.fitContent ? b("", !0) : (l(), d("div", xe, [
294
+ C(e.$slots, "default", {}, void 0, !0)
295
+ ]))
296
+ ]);
297
+ }
298
+ const ke = /* @__PURE__ */ f(fe, [["render", _e], ["__scopeId", "data-v-865f9b2c"]]), Ce = {
299
+ name: "builder-text",
300
+ props: ["text"]
301
+ }, we = ["innerHTML"];
302
+ function Se(e, n, t, o, r, s) {
303
+ return l(), d("span", {
304
+ class: "builder-text",
305
+ innerHTML: t.text
306
+ }, null, 8, we);
307
+ }
308
+ const Ie = /* @__PURE__ */ f(Ce, [["render", Se]]), Te = {
309
+ name: "builder-video",
310
+ props: [
311
+ "autoPlay",
312
+ "muted",
313
+ "controls",
314
+ "loop",
315
+ "playsInline",
316
+ "attributes",
317
+ "fit",
318
+ "position",
319
+ "video",
320
+ "posterImage"
321
+ ],
322
+ computed: {
323
+ videoProps() {
324
+ return {
325
+ ...this.autoPlay === !0 ? {
326
+ autoPlay: !0
327
+ } : {},
328
+ ...this.muted === !0 ? {
329
+ muted: !0
330
+ } : {},
331
+ ...this.controls === !0 ? {
332
+ controls: !0
333
+ } : {},
334
+ ...this.loop === !0 ? {
335
+ loop: !0
336
+ } : {},
337
+ ...this.playsInline === !0 ? {
338
+ playsInline: !0
339
+ } : {}
340
+ };
341
+ }
342
+ }
343
+ }, Re = ["src", "poster"];
344
+ function Ee(e, n, t, o, r, s) {
345
+ var a;
346
+ return l(), d("video", x(s.videoProps, {
347
+ style: {
348
+ width: "100%",
349
+ height: "100%",
350
+ ...(a = t.attributes) == null ? void 0 : a.style,
351
+ objectFit: t.fit,
352
+ objectPosition: t.position,
353
+ borderRadius: 1
354
+ },
355
+ src: t.video || "no-src",
356
+ poster: t.posterImage
357
+ }), null, 16, Re);
358
+ }
359
+ const Fe = /* @__PURE__ */ f(Te, [["render", Ee]]);
360
+ function F(e, n = null, t = ".") {
361
+ return Object.keys(e).reduce((o, r) => {
362
+ const s = e[r], a = [n, r].filter(Boolean).join(t);
363
+ return [
364
+ typeof s == "object",
365
+ s !== null,
366
+ !(Array.isArray(s) && s.length === 0)
367
+ ].every(Boolean) ? { ...o, ...F(s, a, t) } : { ...o, [a]: s };
368
+ }, {});
369
+ }
370
+ const L = "builder.", je = (e) => {
371
+ const n = {};
372
+ return e.forEach((t, o) => {
373
+ n[o] = t;
374
+ }), n;
375
+ }, Ue = (e) => {
376
+ if (!e)
377
+ return {};
378
+ const n = D(e), t = {};
379
+ return Object.keys(n).forEach((o) => {
380
+ if (o.startsWith(L)) {
381
+ const r = o.replace(L, "");
382
+ t[r] = n[o];
383
+ }
384
+ }), t;
385
+ }, Ve = () => {
386
+ if (!h())
387
+ return {};
388
+ const e = new URLSearchParams(window.location.search);
389
+ return Ue(e);
390
+ }, D = (e) => e instanceof URLSearchParams ? je(e) : e;
391
+ function Ae() {
392
+ return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : null;
393
+ }
394
+ async function K() {
395
+ const e = Ae().fetch;
396
+ if (typeof e > "u" && typeof global < "u") {
397
+ const n = import("node-fetch").then((t) => t.default);
398
+ return n.default || n;
399
+ }
400
+ return e.default || e;
401
+ }
402
+ const $e = (e) => {
403
+ const n = e.split(".");
404
+ return n.length > 2 ? n.slice(1).join(".") : e;
405
+ }, J = async ({
406
+ name: e,
407
+ canTrack: n
408
+ }) => {
409
+ var t;
410
+ try {
411
+ return n ? (t = document.cookie.split("; ").find((o) => o.startsWith(`${e}=`))) == null ? void 0 : t.split("=")[1] : void 0;
412
+ } catch (o) {
413
+ console.debug("[COOKIE] GET error: ", o);
414
+ }
415
+ }, Oe = (e) => e.map(([n, t]) => t ? `${n}=${t}` : n).join("; "), Pe = [
416
+ ["secure", ""],
417
+ ["SameSite", "None"]
418
+ ], We = ({
419
+ name: e,
420
+ value: n,
421
+ expires: t
422
+ }) => {
423
+ const r = (h() ? location.protocol === "https:" : !0) ? Pe : [[]], s = t ? [["expires", t.toUTCString()]] : [[]], a = [
424
+ [e, n],
425
+ ...s,
426
+ ["path", "/"],
427
+ ["domain", $e(window.location.hostname)],
428
+ ...r
429
+ ];
430
+ return Oe(a);
431
+ }, G = async ({
432
+ name: e,
433
+ value: n,
434
+ expires: t,
435
+ canTrack: o
436
+ }) => {
437
+ try {
438
+ if (!o)
439
+ return;
440
+ const r = We({ name: e, value: n, expires: t });
441
+ document.cookie = r;
442
+ } catch (r) {
443
+ console.warn("[COOKIE] SET error: ", r);
444
+ }
445
+ }, Be = "builderio.variations", Y = (e) => `${Be}.${e}`, Le = ({
446
+ contentId: e,
447
+ canTrack: n
448
+ }) => J({ name: Y(e), canTrack: n }), Me = ({
449
+ contentId: e,
450
+ canTrack: n,
451
+ value: t
452
+ }) => G({ name: Y(e), value: t, canTrack: n }), S = (e) => e != null, Ne = (e) => S(e.id) && S(e.variations) && Object.keys(e.variations).length > 0, He = ({
453
+ id: e,
454
+ variations: n
455
+ }) => {
456
+ var r;
457
+ let t = 0;
458
+ const o = Math.random();
459
+ for (const s in n)
460
+ if (t += (r = n[s]) == null ? void 0 : r.testRatio, o < t)
461
+ return s;
462
+ return e;
463
+ }, M = ({
464
+ item: e,
465
+ testGroupId: n
466
+ }) => {
467
+ const t = e.variations[n];
468
+ return n === e.id || !t ? {
469
+ testVariationId: e.id,
470
+ testVariationName: "Default"
471
+ } : {
472
+ data: t.data,
473
+ testVariationId: t.id,
474
+ testVariationName: t.name || (t.id === e.id ? "Default" : "")
475
+ };
476
+ }, ze = async ({
477
+ item: e,
478
+ canTrack: n
479
+ }) => {
480
+ const t = await Le({
481
+ canTrack: n,
482
+ contentId: e.id
483
+ }), o = t ? M({ item: e, testGroupId: t }) : void 0;
484
+ if (o)
485
+ return o;
486
+ {
487
+ const r = He({
488
+ variations: e.variations,
489
+ id: e.id
490
+ });
491
+ return Me({
492
+ contentId: e.id,
493
+ value: r,
494
+ canTrack: n
495
+ }).catch((s) => {
496
+ console.error("could not store A/B test variation: ", s);
497
+ }), M({ item: e, testGroupId: r });
498
+ }
499
+ }, qe = async ({
500
+ item: e,
501
+ canTrack: n
502
+ }) => {
503
+ if (!Ne(e))
504
+ return;
505
+ const t = await ze({ item: e, canTrack: n });
506
+ Object.assign(e, t);
507
+ };
508
+ async function X(e) {
509
+ return (await Ke({ ...e, limit: 1 })).results[0] || null;
510
+ }
511
+ const De = (e) => {
512
+ const {
513
+ limit: n = 30,
514
+ userAttributes: t,
515
+ query: o,
516
+ noTraverse: r = !1,
517
+ model: s,
518
+ apiKey: a
519
+ } = e, c = new URL(
520
+ `https://cdn.builder.io/api/v2/content/${s}?apiKey=${a}&limit=${n}&noTraverse=${r}`
521
+ ), i = {
522
+ ...Ve(),
523
+ ...D(e.options || {})
524
+ }, u = F(i);
525
+ for (const m in u)
526
+ c.searchParams.set(m, String(u[m]));
527
+ if (t && c.searchParams.set("userAttributes", JSON.stringify(t)), o) {
528
+ const m = F({ query: o });
529
+ for (const p in m)
530
+ c.searchParams.set(p, JSON.stringify(m[p]));
531
+ }
532
+ return c;
533
+ };
534
+ async function Ke(e) {
535
+ const n = De(e), o = await (await K())(n.href).then(
536
+ (s) => s.json()
537
+ ), r = e.canTrack !== !1;
538
+ if (r)
539
+ for (const s of o.results)
540
+ await qe({ item: s, canTrack: r });
541
+ return o;
542
+ }
543
+ const Je = () => Promise.resolve().then(() => sn).then((e) => e.default).catch((e) => {
544
+ throw console.error(
545
+ "Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
546
+ e
547
+ ), e;
548
+ }), Ge = {
549
+ name: "builder-symbol",
550
+ components: { "render-content": y(Je) },
551
+ props: ["symbol", "attributes"],
552
+ data: () => ({ className: "builder-symbol", content: null, markMutable: V }),
553
+ inject: {
554
+ builderContext: "BuilderContext"
555
+ },
556
+ mounted() {
557
+ var e;
558
+ this.content = (e = this.symbol) == null ? void 0 : e.content;
559
+ },
560
+ watch: {
561
+ onUpdateHook0() {
562
+ const e = this.symbol;
563
+ e && !e.content && !this.content && e.model && X({
564
+ model: e.model,
565
+ apiKey: this.builderContext.apiKey,
566
+ query: {
567
+ id: e.entry
568
+ }
569
+ }).then((n) => {
570
+ this.content = n;
571
+ });
572
+ }
573
+ },
574
+ computed: {
575
+ onUpdateHook0() {
576
+ return {
577
+ 0: this.symbol,
578
+ 1: this.content
579
+ };
580
+ }
581
+ },
582
+ methods: {
583
+ _classStringToObject(e) {
584
+ const n = {};
585
+ if (typeof e != "string")
586
+ return n;
587
+ const t = e.trim().split(/\s+/);
588
+ for (const o of t)
589
+ n[o] = !0;
590
+ return n;
591
+ }
592
+ }
593
+ }, Ye = ["dataSet"];
594
+ function Xe(e, n, t, o, r, s) {
595
+ var c, i, u, m, p;
596
+ const a = v("render-content");
597
+ return l(), d("div", x(t.attributes, {
598
+ dataSet: {
599
+ class: e.className
600
+ },
601
+ class: s._classStringToObject(e.className)
602
+ }), [
603
+ q(a, {
604
+ apiKey: s.builderContext.apiKey,
605
+ context: s.builderContext.context,
606
+ customComponents: e.markMutable(Object.values(s.builderContext.registeredComponents)),
607
+ data: e.markMutable({
608
+ ...(c = t.symbol) == null ? void 0 : c.data,
609
+ ...s.builderContext.state,
610
+ ...(m = (u = (i = t.symbol) == null ? void 0 : i.content) == null ? void 0 : u.data) == null ? void 0 : m.state
611
+ }),
612
+ model: (p = t.symbol) == null ? void 0 : p.model,
613
+ content: e.markMutable(e.content)
614
+ }, null, 8, ["apiKey", "context", "customComponents", "data", "model", "content"])
615
+ ], 16, Ye);
616
+ }
617
+ const Qe = /* @__PURE__ */ f(Ge, [["render", Xe]]), Ze = {
618
+ name: "builder-button",
619
+ props: ["attributes", "text", "link", "openLinkInNewTab"]
620
+ };
621
+ const et = ["href", "target"];
622
+ function tt(e, n, t, o, r, s) {
623
+ return t.link ? (l(), d("a", x({ key: 0 }, t.attributes, {
624
+ role: "button",
625
+ href: t.link,
626
+ target: t.openLinkInNewTab ? "_blank" : void 0
627
+ }), P(t.text), 17, et)) : (l(), d("button", x({ key: 1 }, t.attributes, { class: "button-2oa2wtipkzk" }), P(t.text), 17));
628
+ }
629
+ const nt = /* @__PURE__ */ f(Ze, [["render", tt], ["__scopeId", "data-v-3cb049f3"]]), ot = {
630
+ name: "builder-section-component",
631
+ props: ["attributes", "maxWidth"]
632
+ };
633
+ function st(e, n, t, o, r, s) {
634
+ return l(), d("section", x(t.attributes, {
635
+ style: t.maxWidth && typeof t.maxWidth == "number" ? {
636
+ maxWidth: t.maxWidth
637
+ } : void 0
638
+ }), [
639
+ C(e.$slots, "default")
640
+ ], 16);
641
+ }
642
+ const rt = /* @__PURE__ */ f(ot, [["render", st]]), at = {
643
+ name: "builder-fragment-component",
644
+ props: []
645
+ };
646
+ function it(e, n, t, o, r, s) {
647
+ return l(), d("span", null, [
648
+ C(e.$slots, "default")
649
+ ]);
650
+ }
651
+ const ct = /* @__PURE__ */ f(at, [["render", it]]), lt = {
652
+ name: "Core:Button",
653
+ builtIn: !0,
654
+ image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
655
+ defaultStyles: {
656
+ appearance: "none",
657
+ paddingTop: "15px",
658
+ paddingBottom: "15px",
659
+ paddingLeft: "25px",
660
+ paddingRight: "25px",
661
+ backgroundColor: "#000000",
662
+ color: "white",
663
+ borderRadius: "4px",
664
+ textAlign: "center",
665
+ cursor: "pointer"
666
+ },
667
+ inputs: [
668
+ {
669
+ name: "text",
670
+ type: "text",
671
+ defaultValue: "Click me!",
672
+ bubble: !0
673
+ },
674
+ {
675
+ name: "link",
676
+ type: "url",
677
+ bubble: !0
678
+ },
679
+ {
680
+ name: "openLinkInNewTab",
681
+ type: "boolean",
682
+ defaultValue: !1,
683
+ friendlyName: "Open link in new tab"
684
+ }
685
+ ],
686
+ static: !0,
687
+ noWrap: !0
688
+ };
689
+ function A(e) {
690
+ return e.__qwik_serializable__ = !0, e;
691
+ }
692
+ const dt = {
693
+ name: "Columns",
694
+ builtIn: !0,
695
+ inputs: [
696
+ {
697
+ name: "columns",
698
+ type: "array",
699
+ broadcast: !0,
700
+ subFields: [
701
+ {
702
+ name: "blocks",
703
+ type: "array",
704
+ hideFromUI: !0,
705
+ defaultValue: [
706
+ {
707
+ "@type": "@builder.io/sdk:Element",
708
+ responsiveStyles: {
709
+ large: {
710
+ display: "flex",
711
+ flexDirection: "column",
712
+ alignItems: "stretch",
713
+ flexShrink: "0",
714
+ position: "relative",
715
+ marginTop: "30px",
716
+ textAlign: "center",
717
+ lineHeight: "normal",
718
+ height: "auto",
719
+ minHeight: "20px",
720
+ minWidth: "20px",
721
+ overflow: "hidden"
722
+ }
723
+ },
724
+ component: {
725
+ name: "Image",
726
+ options: {
727
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
728
+ backgroundPosition: "center",
729
+ backgroundSize: "cover",
730
+ aspectRatio: 0.7004048582995948
731
+ }
732
+ }
733
+ },
734
+ {
735
+ "@type": "@builder.io/sdk:Element",
736
+ responsiveStyles: {
737
+ large: {
738
+ display: "flex",
739
+ flexDirection: "column",
740
+ alignItems: "stretch",
741
+ flexShrink: "0",
742
+ position: "relative",
743
+ marginTop: "30px",
744
+ textAlign: "center",
745
+ lineHeight: "normal",
746
+ height: "auto"
747
+ }
748
+ },
749
+ component: {
750
+ name: "Text",
751
+ options: {
752
+ text: "<p>Enter some text...</p>"
753
+ }
754
+ }
755
+ }
756
+ ]
757
+ },
758
+ {
759
+ name: "width",
760
+ type: "number",
761
+ hideFromUI: !0,
762
+ helperText: "Width %, e.g. set to 50 to fill half of the space"
763
+ },
764
+ {
765
+ name: "link",
766
+ type: "url",
767
+ helperText: "Optionally set a url that clicking this column will link to"
768
+ }
769
+ ],
770
+ defaultValue: [
771
+ {
772
+ blocks: [
773
+ {
774
+ "@type": "@builder.io/sdk:Element",
775
+ responsiveStyles: {
776
+ large: {
777
+ display: "flex",
778
+ flexDirection: "column",
779
+ alignItems: "stretch",
780
+ flexShrink: "0",
781
+ position: "relative",
782
+ marginTop: "30px",
783
+ textAlign: "center",
784
+ lineHeight: "normal",
785
+ height: "auto",
786
+ minHeight: "20px",
787
+ minWidth: "20px",
788
+ overflow: "hidden"
789
+ }
790
+ },
791
+ component: {
792
+ name: "Image",
793
+ options: {
794
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
795
+ backgroundPosition: "center",
796
+ backgroundSize: "cover",
797
+ aspectRatio: 0.7004048582995948
798
+ }
799
+ }
800
+ },
801
+ {
802
+ "@type": "@builder.io/sdk:Element",
803
+ responsiveStyles: {
804
+ large: {
805
+ display: "flex",
806
+ flexDirection: "column",
807
+ alignItems: "stretch",
808
+ flexShrink: "0",
809
+ position: "relative",
810
+ marginTop: "30px",
811
+ textAlign: "center",
812
+ lineHeight: "normal",
813
+ height: "auto"
814
+ }
815
+ },
816
+ component: {
817
+ name: "Text",
818
+ options: {
819
+ text: "<p>Enter some text...</p>"
820
+ }
821
+ }
822
+ }
823
+ ]
824
+ },
825
+ {
826
+ blocks: [
827
+ {
828
+ "@type": "@builder.io/sdk:Element",
829
+ responsiveStyles: {
830
+ large: {
831
+ display: "flex",
832
+ flexDirection: "column",
833
+ alignItems: "stretch",
834
+ flexShrink: "0",
835
+ position: "relative",
836
+ marginTop: "30px",
837
+ textAlign: "center",
838
+ lineHeight: "normal",
839
+ height: "auto",
840
+ minHeight: "20px",
841
+ minWidth: "20px",
842
+ overflow: "hidden"
843
+ }
844
+ },
845
+ component: {
846
+ name: "Image",
847
+ options: {
848
+ image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
849
+ backgroundPosition: "center",
850
+ backgroundSize: "cover",
851
+ aspectRatio: 0.7004048582995948
852
+ }
853
+ }
854
+ },
855
+ {
856
+ "@type": "@builder.io/sdk:Element",
857
+ responsiveStyles: {
858
+ large: {
859
+ display: "flex",
860
+ flexDirection: "column",
861
+ alignItems: "stretch",
862
+ flexShrink: "0",
863
+ position: "relative",
864
+ marginTop: "30px",
865
+ textAlign: "center",
866
+ lineHeight: "normal",
867
+ height: "auto"
868
+ }
869
+ },
870
+ component: {
871
+ name: "Text",
872
+ options: {
873
+ text: "<p>Enter some text...</p>"
874
+ }
875
+ }
876
+ }
877
+ ]
878
+ }
879
+ ],
880
+ onChange: A((e) => {
881
+ function n() {
882
+ t.forEach((o) => {
883
+ o.delete("width");
884
+ });
885
+ }
886
+ const t = e.get("columns");
887
+ Array.isArray(t) && !!t.find(
888
+ (r) => r.get("width")
889
+ ) && (!!t.find(
890
+ (s) => !s.get("width")
891
+ ) || t.reduce((c, i) => c + i.get("width"), 0) !== 100) && n();
892
+ })
893
+ },
894
+ {
895
+ name: "space",
896
+ type: "number",
897
+ defaultValue: 20,
898
+ helperText: "Size of gap between columns",
899
+ advanced: !0
900
+ },
901
+ {
902
+ name: "stackColumnsAt",
903
+ type: "string",
904
+ defaultValue: "tablet",
905
+ helperText: "Convert horizontal columns to vertical at what device size",
906
+ enum: ["tablet", "mobile", "never"],
907
+ advanced: !0
908
+ },
909
+ {
910
+ name: "reverseColumnsWhenStacked",
911
+ type: "boolean",
912
+ defaultValue: !1,
913
+ helperText: "When stacking columns for mobile devices, reverse the ordering",
914
+ advanced: !0
915
+ }
916
+ ]
917
+ }, ut = {
918
+ name: "Fragment",
919
+ static: !0,
920
+ hidden: !0,
921
+ builtIn: !0,
922
+ canHaveChildren: !0,
923
+ noWrap: !0
924
+ }, mt = {
925
+ name: "Image",
926
+ static: !0,
927
+ builtIn: !0,
928
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
929
+ defaultStyles: {
930
+ position: "relative",
931
+ minHeight: "20px",
932
+ minWidth: "20px",
933
+ overflow: "hidden"
934
+ },
935
+ canHaveChildren: !0,
936
+ inputs: [
937
+ {
938
+ name: "image",
939
+ type: "file",
940
+ bubble: !0,
941
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
942
+ required: !0,
943
+ defaultValue: "https://cdn.builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
944
+ onChange: A((e) => {
945
+ e.delete("srcset"), e.delete("noWebp");
946
+ function t(a, c = 6e4) {
947
+ return new Promise((i, u) => {
948
+ const m = document.createElement("img");
949
+ let p = !1;
950
+ m.onload = () => {
951
+ p = !0, i(m);
952
+ }, m.addEventListener("error", (_) => {
953
+ console.warn("Image load failed", _.error), u(_.error);
954
+ }), m.src = a, setTimeout(() => {
955
+ p || u(new Error("Image load timed out"));
956
+ }, c);
957
+ });
958
+ }
959
+ function o(a) {
960
+ return Math.round(a * 1e3) / 1e3;
961
+ }
962
+ const r = e.get("image"), s = e.get("aspectRatio");
963
+ if (fetch(r).then((a) => a.blob()).then((a) => {
964
+ a.type.includes("svg") && e.set("noWebp", !0);
965
+ }), r && (!s || s === 0.7041))
966
+ return t(r).then((a) => {
967
+ const c = e.get("aspectRatio");
968
+ e.get("image") === r && (!c || c === 0.7041) && a.width && a.height && (e.set("aspectRatio", o(a.height / a.width)), e.set("height", a.height), e.set("width", a.width));
969
+ });
970
+ })
971
+ },
972
+ {
973
+ name: "backgroundSize",
974
+ type: "text",
975
+ defaultValue: "cover",
976
+ enum: [
977
+ {
978
+ label: "contain",
979
+ value: "contain",
980
+ helperText: "The image should never get cropped"
981
+ },
982
+ {
983
+ label: "cover",
984
+ value: "cover",
985
+ helperText: "The image should fill it's box, cropping when needed"
986
+ }
987
+ ]
988
+ },
989
+ {
990
+ name: "backgroundPosition",
991
+ type: "text",
992
+ defaultValue: "center",
993
+ enum: [
994
+ "center",
995
+ "top",
996
+ "left",
997
+ "right",
998
+ "bottom",
999
+ "top left",
1000
+ "top right",
1001
+ "bottom left",
1002
+ "bottom right"
1003
+ ]
1004
+ },
1005
+ {
1006
+ name: "altText",
1007
+ type: "string",
1008
+ helperText: "Text to display when the user has images off"
1009
+ },
1010
+ {
1011
+ name: "height",
1012
+ type: "number",
1013
+ hideFromUI: !0
1014
+ },
1015
+ {
1016
+ name: "width",
1017
+ type: "number",
1018
+ hideFromUI: !0
1019
+ },
1020
+ {
1021
+ name: "sizes",
1022
+ type: "string",
1023
+ hideFromUI: !0
1024
+ },
1025
+ {
1026
+ name: "srcset",
1027
+ type: "string",
1028
+ hideFromUI: !0
1029
+ },
1030
+ {
1031
+ name: "lazy",
1032
+ type: "boolean",
1033
+ defaultValue: !0,
1034
+ hideFromUI: !0
1035
+ },
1036
+ {
1037
+ name: "fitContent",
1038
+ type: "boolean",
1039
+ helperText: "When child blocks are provided, fit to them instead of using the image's aspect ratio",
1040
+ defaultValue: !0
1041
+ },
1042
+ {
1043
+ name: "aspectRatio",
1044
+ type: "number",
1045
+ helperText: "This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",
1046
+ advanced: !0,
1047
+ defaultValue: 0.7041
1048
+ }
1049
+ ]
1050
+ }, pt = {
1051
+ name: "Core:Section",
1052
+ static: !0,
1053
+ builtIn: !0,
1054
+ image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
1055
+ inputs: [
1056
+ {
1057
+ name: "maxWidth",
1058
+ type: "number",
1059
+ defaultValue: 1200
1060
+ },
1061
+ {
1062
+ name: "lazyLoad",
1063
+ type: "boolean",
1064
+ defaultValue: !1,
1065
+ advanced: !0,
1066
+ description: "Only render this section when in view"
1067
+ }
1068
+ ],
1069
+ defaultStyles: {
1070
+ paddingLeft: "20px",
1071
+ paddingRight: "20px",
1072
+ paddingTop: "50px",
1073
+ paddingBottom: "50px",
1074
+ marginTop: "0px",
1075
+ width: "100vw",
1076
+ marginLeft: "calc(50% - 50vw)"
1077
+ },
1078
+ canHaveChildren: !0,
1079
+ defaultChildren: [
1080
+ {
1081
+ "@type": "@builder.io/sdk:Element",
1082
+ responsiveStyles: {
1083
+ large: {
1084
+ textAlign: "center"
1085
+ }
1086
+ },
1087
+ component: {
1088
+ name: "Text",
1089
+ options: {
1090
+ text: "<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"
1091
+ }
1092
+ }
1093
+ }
1094
+ ]
1095
+ }, ht = {
1096
+ name: "Symbol",
1097
+ noWrap: !0,
1098
+ static: !0,
1099
+ builtIn: !0,
1100
+ inputs: [
1101
+ {
1102
+ name: "symbol",
1103
+ type: "uiSymbol"
1104
+ },
1105
+ {
1106
+ name: "dataOnly",
1107
+ helperText: "Make this a data symbol that doesn't display any UI",
1108
+ type: "boolean",
1109
+ defaultValue: !1,
1110
+ advanced: !0,
1111
+ hideFromUI: !0
1112
+ },
1113
+ {
1114
+ name: "inheritState",
1115
+ helperText: "Inherit the parent component state and data",
1116
+ type: "boolean",
1117
+ defaultValue: !1,
1118
+ advanced: !0
1119
+ },
1120
+ {
1121
+ name: "renderToLiquid",
1122
+ helperText: "Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",
1123
+ type: "boolean",
1124
+ defaultValue: !1,
1125
+ advanced: !0,
1126
+ hideFromUI: !0
1127
+ },
1128
+ {
1129
+ name: "useChildren",
1130
+ hideFromUI: !0,
1131
+ type: "boolean"
1132
+ }
1133
+ ]
1134
+ }, ft = {
1135
+ name: "Text",
1136
+ static: !0,
1137
+ builtIn: !0,
1138
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
1139
+ inputs: [
1140
+ {
1141
+ name: "text",
1142
+ type: "html",
1143
+ required: !0,
1144
+ autoFocus: !0,
1145
+ bubble: !0,
1146
+ defaultValue: "Enter some text..."
1147
+ }
1148
+ ],
1149
+ defaultStyles: {
1150
+ lineHeight: "normal",
1151
+ height: "auto",
1152
+ textAlign: "center"
1153
+ }
1154
+ }, gt = {
1155
+ name: "Video",
1156
+ canHaveChildren: !0,
1157
+ builtIn: !0,
1158
+ defaultStyles: {
1159
+ minHeight: "20px",
1160
+ minWidth: "20px"
1161
+ },
1162
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",
1163
+ inputs: [
1164
+ {
1165
+ name: "video",
1166
+ type: "file",
1167
+ allowedFileTypes: ["mp4"],
1168
+ bubble: !0,
1169
+ defaultValue: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",
1170
+ required: !0
1171
+ },
1172
+ {
1173
+ name: "posterImage",
1174
+ type: "file",
1175
+ allowedFileTypes: ["jpeg", "png"],
1176
+ helperText: "Image to show before the video plays"
1177
+ },
1178
+ {
1179
+ name: "autoPlay",
1180
+ type: "boolean",
1181
+ defaultValue: !0
1182
+ },
1183
+ {
1184
+ name: "controls",
1185
+ type: "boolean",
1186
+ defaultValue: !1
1187
+ },
1188
+ {
1189
+ name: "muted",
1190
+ type: "boolean",
1191
+ defaultValue: !0
1192
+ },
1193
+ {
1194
+ name: "loop",
1195
+ type: "boolean",
1196
+ defaultValue: !0
1197
+ },
1198
+ {
1199
+ name: "playsInline",
1200
+ type: "boolean",
1201
+ defaultValue: !0
1202
+ },
1203
+ {
1204
+ name: "fit",
1205
+ type: "text",
1206
+ defaultValue: "cover",
1207
+ enum: ["contain", "cover", "fill", "auto"]
1208
+ },
1209
+ {
1210
+ name: "fitContent",
1211
+ type: "boolean",
1212
+ helperText: "When child blocks are provided, fit to them instead of using the aspect ratio",
1213
+ defaultValue: !0,
1214
+ advanced: !0
1215
+ },
1216
+ {
1217
+ name: "position",
1218
+ type: "text",
1219
+ defaultValue: "center",
1220
+ enum: [
1221
+ "center",
1222
+ "top",
1223
+ "left",
1224
+ "right",
1225
+ "bottom",
1226
+ "top left",
1227
+ "top right",
1228
+ "bottom left",
1229
+ "bottom right"
1230
+ ]
1231
+ },
1232
+ {
1233
+ name: "height",
1234
+ type: "number",
1235
+ advanced: !0
1236
+ },
1237
+ {
1238
+ name: "width",
1239
+ type: "number",
1240
+ advanced: !0
1241
+ },
1242
+ {
1243
+ name: "aspectRatio",
1244
+ type: "number",
1245
+ advanced: !0,
1246
+ defaultValue: 0.7004048582995948
1247
+ },
1248
+ {
1249
+ name: "lazyLoad",
1250
+ type: "boolean",
1251
+ helperText: 'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',
1252
+ defaultValue: !0,
1253
+ advanced: !0
1254
+ }
1255
+ ]
1256
+ }, bt = {
1257
+ name: "Embed",
1258
+ static: !0,
1259
+ builtIn: !0,
1260
+ inputs: [
1261
+ {
1262
+ name: "url",
1263
+ type: "url",
1264
+ required: !0,
1265
+ defaultValue: "",
1266
+ helperText: "e.g. enter a youtube url, google map, etc",
1267
+ onChange: A((e) => {
1268
+ const n = e.get("url");
1269
+ if (n)
1270
+ return e.set("content", "Loading..."), fetch(
1271
+ `https://iframe.ly/api/iframely?url=${n}&api_key=ae0e60e78201a3f2b0de4b`
1272
+ ).then((o) => o.json()).then((o) => {
1273
+ e.get("url") === n && (o.html ? e.set("content", o.html) : e.set("content", "Invalid url, please try another"));
1274
+ }).catch((o) => {
1275
+ e.set(
1276
+ "content",
1277
+ "There was an error embedding this URL, please try again or another URL"
1278
+ );
1279
+ });
1280
+ e.delete("content");
1281
+ })
1282
+ },
1283
+ {
1284
+ name: "content",
1285
+ type: "html",
1286
+ defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
1287
+ hideFromUI: !0
1288
+ }
1289
+ ]
1290
+ }, yt = [
1291
+ "text/javascript",
1292
+ "application/javascript",
1293
+ "application/ecmascript"
1294
+ ], vt = (e) => yt.includes(e.type), xt = {
1295
+ name: "builder-embed",
1296
+ props: ["content"],
1297
+ data: () => ({ scriptsInserted: [], scriptsRun: [], ranInitFn: !1 }),
1298
+ watch: {
1299
+ onUpdateHook0() {
1300
+ this.$refs.elem && !this.ranInitFn && (this.ranInitFn = !0, this.findAndRunScripts());
1301
+ }
1302
+ },
1303
+ computed: {
1304
+ onUpdateHook0() {
1305
+ return {
1306
+ 0: this.$refs.elem,
1307
+ 1: this.ranInitFn
1308
+ };
1309
+ }
1310
+ },
1311
+ methods: {
1312
+ findAndRunScripts() {
1313
+ if (!this.$refs.elem || !this.$refs.elem.getElementsByTagName)
1314
+ return;
1315
+ const e = this.$refs.elem.getElementsByTagName("script");
1316
+ for (let n = 0; n < e.length; n++) {
1317
+ const t = e[n];
1318
+ if (t.src && !this.scriptsInserted.includes(t.src)) {
1319
+ this.scriptsInserted.push(t.src);
1320
+ const o = document.createElement("script");
1321
+ o.async = !0, o.src = t.src, document.head.appendChild(o);
1322
+ } else if (vt(t) && !this.scriptsRun.includes(t.innerText))
1323
+ try {
1324
+ this.scriptsRun.push(t.innerText), new Function(t.innerText)();
1325
+ } catch (o) {
1326
+ console.warn("`Embed`: Error running script:", o);
1327
+ }
1328
+ }
1329
+ }
1330
+ }
1331
+ }, _t = ["innerHTML"];
1332
+ function kt(e, n, t, o, r, s) {
1333
+ return l(), d("div", {
1334
+ class: "builder-embed",
1335
+ ref: "elem",
1336
+ innerHTML: t.content
1337
+ }, null, 8, _t);
1338
+ }
1339
+ const Ct = /* @__PURE__ */ f(xt, [["render", kt]]);
1340
+ function wt() {
1341
+ return h() && window.self !== window.top;
1342
+ }
1343
+ function g() {
1344
+ return wt() && window.location.search.indexOf("builder.frameEditing=") !== -1;
1345
+ }
1346
+ const St = {
1347
+ name: "builder-img-component",
1348
+ props: [
1349
+ "backgroundSize",
1350
+ "backgroundPosition",
1351
+ "imgSrc",
1352
+ "altText",
1353
+ "image",
1354
+ "attributes"
1355
+ ],
1356
+ data: () => ({ isEditing: g })
1357
+ }, It = ["alt", "src"];
1358
+ function Tt(e, n, t, o, r, s) {
1359
+ return l(), d("img", x(t.attributes, {
1360
+ style: {
1361
+ objectFit: t.backgroundSize || "cover",
1362
+ objectPosition: t.backgroundPosition || "center"
1363
+ },
1364
+ key: e.isEditing() && t.imgSrc || "default-key",
1365
+ alt: t.altText,
1366
+ src: t.imgSrc || t.image
1367
+ }), null, 16, It);
1368
+ }
1369
+ const Rt = /* @__PURE__ */ f(St, [["render", Tt]]), Et = {
1370
+ name: "Raw:Img",
1371
+ hideFromInsertMenu: !0,
1372
+ builtIn: !0,
1373
+ image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
1374
+ inputs: [
1375
+ {
1376
+ name: "image",
1377
+ bubble: !0,
1378
+ type: "file",
1379
+ allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
1380
+ required: !0
1381
+ }
1382
+ ],
1383
+ noWrap: !0,
1384
+ static: !0
1385
+ }, Ft = {
1386
+ name: "builder-custom-code",
1387
+ props: ["replaceNodes", "code"],
1388
+ data: () => ({ scriptsInserted: [], scriptsRun: [] }),
1389
+ mounted() {
1390
+ this.findAndRunScripts();
1391
+ },
1392
+ methods: {
1393
+ findAndRunScripts() {
1394
+ if (this.$refs.elem && this.$refs.elem.getElementsByTagName && typeof window < "u") {
1395
+ const e = this.$refs.elem.getElementsByTagName("script");
1396
+ for (let n = 0; n < e.length; n++) {
1397
+ const t = e[n];
1398
+ if (t.src) {
1399
+ if (this.scriptsInserted.includes(t.src))
1400
+ continue;
1401
+ this.scriptsInserted.push(t.src);
1402
+ const o = document.createElement("script");
1403
+ o.async = !0, o.src = t.src, document.head.appendChild(o);
1404
+ } else if (!t.type || [
1405
+ "text/javascript",
1406
+ "application/javascript",
1407
+ "application/ecmascript"
1408
+ ].includes(t.type)) {
1409
+ if (this.scriptsRun.includes(t.innerText))
1410
+ continue;
1411
+ try {
1412
+ this.scriptsRun.push(t.innerText), new Function(t.innerText)();
1413
+ } catch (o) {
1414
+ console.warn("`CustomCode`: Error running script:", o);
1415
+ }
1416
+ }
1417
+ }
1418
+ }
1419
+ },
1420
+ _classStringToObject(e) {
1421
+ const n = {};
1422
+ if (typeof e != "string")
1423
+ return n;
1424
+ const t = e.trim().split(/\s+/);
1425
+ for (const o of t)
1426
+ n[o] = !0;
1427
+ return n;
1428
+ }
1429
+ }
1430
+ }, jt = ["innerHTML"];
1431
+ function Ut(e, n, t, o, r, s) {
1432
+ return l(), d("div", {
1433
+ ref: "elem",
1434
+ class: j(
1435
+ s._classStringToObject(
1436
+ "builder-custom-code" + (t.replaceNodes ? " replace-nodes" : "")
1437
+ )
1438
+ ),
1439
+ innerHTML: t.code
1440
+ }, null, 10, jt);
1441
+ }
1442
+ const Vt = /* @__PURE__ */ f(Ft, [["render", Ut]]), At = {
1443
+ name: "Custom Code",
1444
+ static: !0,
1445
+ builtIn: !0,
1446
+ requiredPermissions: ["editCode"],
1447
+ inputs: [
1448
+ {
1449
+ name: "code",
1450
+ type: "html",
1451
+ required: !0,
1452
+ defaultValue: "<p>Hello there, I am custom HTML code!</p>",
1453
+ code: !0
1454
+ },
1455
+ {
1456
+ name: "replaceNodes",
1457
+ type: "boolean",
1458
+ helperText: "Preserve server rendered dom nodes",
1459
+ advanced: !0
1460
+ },
1461
+ {
1462
+ name: "scriptsClientOnly",
1463
+ type: "boolean",
1464
+ defaultValue: !1,
1465
+ helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
1466
+ advanced: !0
1467
+ }
1468
+ ]
1469
+ }, $t = () => [
1470
+ { component: me, ...dt },
1471
+ { component: ke, ...mt },
1472
+ { component: Rt, ...Et },
1473
+ { component: Ie, ...ft },
1474
+ { component: Fe, ...gt },
1475
+ { component: Qe, ...ht },
1476
+ { component: nt, ...lt },
1477
+ { component: rt, ...pt },
1478
+ { component: ct, ...ut },
1479
+ { component: Ct, ...bt },
1480
+ { component: Vt, ...At }
1481
+ ];
1482
+ function N({
1483
+ code: e,
1484
+ context: n,
1485
+ state: t,
1486
+ event: o
1487
+ }) {
1488
+ if (e === "") {
1489
+ console.warn("Skipping evaluation of empty code block.");
1490
+ return;
1491
+ }
1492
+ const r = {
1493
+ isEditing: g(),
1494
+ isBrowser: h(),
1495
+ isServer: !h()
1496
+ }, a = !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e;
1497
+ try {
1498
+ return new Function(
1499
+ "builder",
1500
+ "Builder",
1501
+ "state",
1502
+ "context",
1503
+ "event",
1504
+ a
1505
+ )(r, r, t, n, o);
1506
+ } catch (c) {
1507
+ console.warn(
1508
+ `Builder custom code error:
1509
+ While Evaluating:
1510
+ `,
1511
+ a,
1512
+ `
1513
+ `,
1514
+ c.message || c
1515
+ );
1516
+ }
1517
+ }
1518
+ function Ot() {
1519
+ return !h() || g() ? !1 : Boolean(location.search.indexOf("builder.preview=") !== -1);
1520
+ }
1521
+ const Q = [];
1522
+ function hn(e, n) {
1523
+ return Q.push({ component: e, ...n }), console.warn(
1524
+ "registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."
1525
+ ), e;
1526
+ }
1527
+ const Pt = ({
1528
+ component: e,
1529
+ ...n
1530
+ }) => ({
1531
+ type: "builder.registerComponent",
1532
+ data: Lt(n)
1533
+ }), Z = (e) => JSON.parse(JSON.stringify(e)), Wt = (e) => typeof e == "function" ? Bt(e) : Z(e), Bt = (e) => {
1534
+ const n = e.toString().trim();
1535
+ return `return (${!n.startsWith("function") && !n.startsWith("(") ? "function " : ""}${n}).apply(this, arguments)`;
1536
+ }, Lt = ({
1537
+ inputs: e,
1538
+ ...n
1539
+ }) => ({
1540
+ ...Z(n),
1541
+ inputs: e == null ? void 0 : e.map(
1542
+ (t) => Object.entries(t).reduce(
1543
+ (o, [r, s]) => ({
1544
+ ...o,
1545
+ [r]: Wt(s)
1546
+ }),
1547
+ {}
1548
+ )
1549
+ )
1550
+ });
1551
+ function Mt() {
1552
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
1553
+ const n = Math.random() * 16 | 0;
1554
+ return (e == "x" ? n : n & 3 | 8).toString(16);
1555
+ });
1556
+ }
1557
+ function ee() {
1558
+ return Mt().replace(/-/g, "");
1559
+ }
1560
+ const te = "builderSessionId", Nt = async ({ canTrack: e }) => {
1561
+ if (!e)
1562
+ return;
1563
+ const n = await J({
1564
+ name: te,
1565
+ canTrack: e
1566
+ });
1567
+ if (S(n))
1568
+ return n;
1569
+ {
1570
+ const t = Ht();
1571
+ zt({ id: t, canTrack: e });
1572
+ }
1573
+ }, Ht = () => ee(), zt = ({
1574
+ id: e,
1575
+ canTrack: n
1576
+ }) => G({ name: te, value: e, canTrack: n }), ne = () => h() && typeof localStorage < "u" ? localStorage : void 0, qt = ({
1577
+ key: e,
1578
+ canTrack: n
1579
+ }) => {
1580
+ var t;
1581
+ try {
1582
+ return n ? (t = ne()) == null ? void 0 : t.getItem(e) : void 0;
1583
+ } catch (o) {
1584
+ console.debug("[LocalStorage] GET error: ", o);
1585
+ }
1586
+ }, Dt = ({
1587
+ key: e,
1588
+ canTrack: n,
1589
+ value: t
1590
+ }) => {
1591
+ var o;
1592
+ try {
1593
+ n && ((o = ne()) == null || o.setItem(e, t));
1594
+ } catch (r) {
1595
+ console.debug("[LocalStorage] SET error: ", r);
1596
+ }
1597
+ }, oe = "builderVisitorId", Kt = ({ canTrack: e }) => {
1598
+ if (!e)
1599
+ return;
1600
+ const n = qt({
1601
+ key: oe,
1602
+ canTrack: e
1603
+ });
1604
+ if (S(n))
1605
+ return n;
1606
+ {
1607
+ const t = Jt();
1608
+ Gt({ id: t, canTrack: e });
1609
+ }
1610
+ }, Jt = () => ee(), Gt = ({
1611
+ id: e,
1612
+ canTrack: n
1613
+ }) => Dt({
1614
+ key: oe,
1615
+ value: e,
1616
+ canTrack: n
1617
+ }), Yt = async ({
1618
+ canTrack: e
1619
+ }) => {
1620
+ if (!e)
1621
+ return { visitorId: void 0, sessionId: void 0 };
1622
+ const n = await Nt({ canTrack: e }), t = Kt({ canTrack: e });
1623
+ return {
1624
+ sessionId: n,
1625
+ visitorId: t
1626
+ };
1627
+ }, Xt = async ({
1628
+ type: e,
1629
+ canTrack: n,
1630
+ orgId: t,
1631
+ contentId: o,
1632
+ ...r
1633
+ }) => ({
1634
+ type: e,
1635
+ data: {
1636
+ ...r,
1637
+ ...await Yt({ canTrack: n }),
1638
+ ownerId: t,
1639
+ contentId: o
1640
+ }
1641
+ });
1642
+ async function H(e) {
1643
+ if (!!e.canTrack && !g() && !!(h() || U === "reactNative"))
1644
+ return fetch("https://builder.io/api/v1/track", {
1645
+ method: "POST",
1646
+ body: JSON.stringify({
1647
+ events: [await Xt(e)]
1648
+ }),
1649
+ headers: {
1650
+ "content-type": "application/json"
1651
+ },
1652
+ mode: "cors"
1653
+ }).catch((n) => {
1654
+ console.error("Failed to track: ", n);
1655
+ });
1656
+ }
1657
+ const Qt = () => Promise.resolve().then(() => se).then((e) => e.default).catch((e) => {
1658
+ throw console.error(
1659
+ "Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
1660
+ e
1661
+ ), e;
1662
+ }), Zt = () => import("./render-styles.63eb2def.js").then((e) => e.default).catch((e) => {
1663
+ throw console.error(
1664
+ "Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
1665
+ e
1666
+ ), e;
1667
+ }), en = {
1668
+ name: "render-content",
1669
+ components: {
1670
+ "render-content-styles": y(Zt),
1671
+ "render-blocks": y(Qt)
1672
+ },
1673
+ props: [
1674
+ "content",
1675
+ "data",
1676
+ "canTrack",
1677
+ "context",
1678
+ "customComponents",
1679
+ "model",
1680
+ "apiKey"
1681
+ ],
1682
+ data: () => ({
1683
+ forceReRenderCount: 0,
1684
+ overrideContent: null,
1685
+ update: 0,
1686
+ overrideState: {},
1687
+ markMutable: V
1688
+ }),
1689
+ provide() {
1690
+ const e = this;
1691
+ return {
1692
+ BuilderContext: {
1693
+ get content() {
1694
+ return e.useContent;
1695
+ },
1696
+ get state() {
1697
+ return e.contentState;
1698
+ },
1699
+ get context() {
1700
+ return e.contextContext;
1701
+ },
1702
+ get apiKey() {
1703
+ return e.apiKey;
1704
+ },
1705
+ get registeredComponents() {
1706
+ return e.allRegisteredComponents;
1707
+ }
1708
+ }
1709
+ };
1710
+ },
1711
+ mounted() {
1712
+ var e;
1713
+ if (h()) {
1714
+ if (g() && (this.forceReRenderCount = this.forceReRenderCount + 1, ie(), ce(), Object.values(this.allRegisteredComponents).forEach(
1715
+ (n) => {
1716
+ var o;
1717
+ const t = Pt(n);
1718
+ (o = window.parent) == null || o.postMessage(t, "*");
1719
+ }
1720
+ ), window.addEventListener("message", this.processMessage), window.addEventListener(
1721
+ "builder:component:stateChangeListenerActivated",
1722
+ this.emitStateUpdate
1723
+ )), this.useContent && H({
1724
+ type: "impression",
1725
+ canTrack: this.canTrackToUse,
1726
+ contentId: (e = this.useContent) == null ? void 0 : e.id,
1727
+ orgId: this.apiKey
1728
+ }), Ot()) {
1729
+ const n = new URL(location.href).searchParams;
1730
+ if (this.model && n.get("builder.preview") === this.model) {
1731
+ const t = n.get("apiKey") || n.get("builder.space");
1732
+ t && X({
1733
+ model: this.model,
1734
+ apiKey: t
1735
+ }).then((o) => {
1736
+ o && (this.overrideContent = o);
1737
+ });
1738
+ }
1739
+ }
1740
+ this.evaluateJsCode(), this.runHttpRequests(), this.emitStateUpdate();
1741
+ }
1742
+ },
1743
+ watch: {
1744
+ onUpdateHook0() {
1745
+ this.evaluateJsCode();
1746
+ },
1747
+ onUpdateHook1() {
1748
+ this.runHttpRequests();
1749
+ },
1750
+ onUpdateHook2() {
1751
+ this.emitStateUpdate();
1752
+ }
1753
+ },
1754
+ unmounted() {
1755
+ h() && (window.removeEventListener("message", this.processMessage), window.removeEventListener(
1756
+ "builder:component:stateChangeListenerActivated",
1757
+ this.emitStateUpdate
1758
+ ));
1759
+ },
1760
+ computed: {
1761
+ useContent() {
1762
+ var n, t;
1763
+ return !this.content && !this.overrideContent ? void 0 : {
1764
+ ...this.content,
1765
+ ...this.overrideContent,
1766
+ data: {
1767
+ ...(n = this.content) == null ? void 0 : n.data,
1768
+ ...this.data,
1769
+ ...(t = this.overrideContent) == null ? void 0 : t.data
1770
+ }
1771
+ };
1772
+ },
1773
+ canTrackToUse() {
1774
+ return this.canTrack || !0;
1775
+ },
1776
+ contentState() {
1777
+ var e, n;
1778
+ return {
1779
+ ...(n = (e = this.content) == null ? void 0 : e.data) == null ? void 0 : n.state,
1780
+ ...this.data,
1781
+ ...this.overrideState
1782
+ };
1783
+ },
1784
+ contextContext() {
1785
+ return this.context || {};
1786
+ },
1787
+ allRegisteredComponents() {
1788
+ return [
1789
+ ...$t(),
1790
+ ...Q,
1791
+ ...this.customComponents || []
1792
+ ].reduce(
1793
+ (t, o) => ({ ...t, [o.name]: o }),
1794
+ {}
1795
+ );
1796
+ },
1797
+ httpReqsData() {
1798
+ return {};
1799
+ },
1800
+ shouldRenderContentStyles() {
1801
+ var e, n, t, o, r;
1802
+ return Boolean(
1803
+ (((n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.cssCode) || ((r = (o = (t = this.useContent) == null ? void 0 : t.data) == null ? void 0 : o.customFonts) == null ? void 0 : r.length)) && U !== "reactNative"
1804
+ );
1805
+ },
1806
+ onUpdateHook0() {
1807
+ var e, n;
1808
+ return {
1809
+ 0: (n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.jsCode
1810
+ };
1811
+ },
1812
+ onUpdateHook1() {
1813
+ var e, n;
1814
+ return {
1815
+ 0: (n = (e = this.useContent) == null ? void 0 : e.data) == null ? void 0 : n.httpRequests
1816
+ };
1817
+ },
1818
+ onUpdateHook2() {
1819
+ return {
1820
+ 0: this.contentState
1821
+ };
1822
+ }
1823
+ },
1824
+ methods: {
1825
+ processMessage(e) {
1826
+ const { data: n } = e;
1827
+ if (n)
1828
+ switch (n.type) {
1829
+ case "builder.contentUpdate": {
1830
+ const t = n.data, o = t.key || t.alias || t.entry || t.modelName, r = t.data;
1831
+ o === this.model && (this.overrideContent = r, this.forceReRenderCount = this.forceReRenderCount + 1);
1832
+ break;
1833
+ }
1834
+ }
1835
+ },
1836
+ evaluateJsCode() {
1837
+ var n, t;
1838
+ const e = (t = (n = this.useContent) == null ? void 0 : n.data) == null ? void 0 : t.jsCode;
1839
+ e && N({
1840
+ code: e,
1841
+ context: this.contextContext,
1842
+ state: this.contentState
1843
+ });
1844
+ },
1845
+ onClick(e) {
1846
+ var n;
1847
+ this.useContent && H({
1848
+ type: "click",
1849
+ canTrack: this.canTrackToUse,
1850
+ contentId: (n = this.useContent) == null ? void 0 : n.id,
1851
+ orgId: this.apiKey
1852
+ });
1853
+ },
1854
+ evalExpression(e) {
1855
+ return e.replace(
1856
+ /{{([^}]+)}}/g,
1857
+ (n, t) => N({
1858
+ code: t,
1859
+ context: this.contextContext,
1860
+ state: this.contentState
1861
+ })
1862
+ );
1863
+ },
1864
+ handleRequest({ url: e, key: n }) {
1865
+ K().then((t) => t(e)).then((t) => t.json()).then((t) => {
1866
+ const o = { ...this.overrideState, [n]: t };
1867
+ this.overrideState = o;
1868
+ }).catch((t) => {
1869
+ console.log("error fetching dynamic data", e, t);
1870
+ });
1871
+ },
1872
+ runHttpRequests() {
1873
+ var n, t, o;
1874
+ const e = (o = (t = (n = this.useContent) == null ? void 0 : n.data) == null ? void 0 : t.httpRequests) != null ? o : {};
1875
+ Object.entries(e).forEach(([r, s]) => {
1876
+ if (s && (!this.httpReqsData[r] || g())) {
1877
+ const a = this.evalExpression(s);
1878
+ this.handleRequest({
1879
+ url: a,
1880
+ key: r
1881
+ });
1882
+ }
1883
+ });
1884
+ },
1885
+ emitStateUpdate() {
1886
+ g() && window.dispatchEvent(
1887
+ new CustomEvent("builder:component:stateChange", {
1888
+ detail: {
1889
+ state: this.contentState,
1890
+ ref: {
1891
+ name: this.model
1892
+ }
1893
+ }
1894
+ })
1895
+ );
1896
+ }
1897
+ }
1898
+ }, tn = ["builder-content-id"];
1899
+ function nn(e, n, t, o, r, s) {
1900
+ var i, u, m, p, _, $, O;
1901
+ const a = v("render-content-styles"), c = v("render-blocks");
1902
+ return s.useContent ? (l(), d("div", {
1903
+ key: 0,
1904
+ ref: "elementRef",
1905
+ onClick: n[0] || (n[0] = (re) => s.onClick(re)),
1906
+ "builder-content-id": (i = s.useContent) == null ? void 0 : i.id
1907
+ }, [
1908
+ s.shouldRenderContentStyles ? (l(), w(a, {
1909
+ key: 0,
1910
+ cssCode: (m = (u = s.useContent) == null ? void 0 : u.data) == null ? void 0 : m.cssCode,
1911
+ customFonts: (_ = (p = s.useContent) == null ? void 0 : p.data) == null ? void 0 : _.customFonts
1912
+ }, null, 8, ["cssCode", "customFonts"])) : b("", !0),
1913
+ (l(), w(c, {
1914
+ blocks: e.markMutable((O = ($ = s.useContent) == null ? void 0 : $.data) == null ? void 0 : O.blocks),
1915
+ key: e.forceReRenderCount
1916
+ }, null, 8, ["blocks"]))
1917
+ ], 8, tn)) : b("", !0);
1918
+ }
1919
+ const on = /* @__PURE__ */ f(en, [["render", nn]]), sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1920
+ __proto__: null,
1921
+ default: on
1922
+ }, Symbol.toStringTag, { value: "Module" })), rn = () => import("./block-styles.13caf8d7.js").then((e) => e.default).catch((e) => {
1923
+ throw console.error(
1924
+ "Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
1925
+ e
1926
+ ), e;
1927
+ }), an = () => import("./render-block.9c550b26.js").then((e) => e.default).catch((e) => {
1928
+ throw console.error(
1929
+ "Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
1930
+ e
1931
+ ), e;
1932
+ }), cn = {
1933
+ name: "render-blocks",
1934
+ components: {
1935
+ "render-block": y(an),
1936
+ "block-styles": y(rn)
1937
+ },
1938
+ props: ["blocks", "parent", "path"],
1939
+ inject: {
1940
+ builderContext: "BuilderContext"
1941
+ },
1942
+ computed: {
1943
+ className() {
1944
+ var e;
1945
+ return "builder-blocks" + ((e = this.blocks) != null && e.length ? "" : " no-blocks");
1946
+ }
1947
+ },
1948
+ methods: {
1949
+ onClick() {
1950
+ var e, n;
1951
+ g() && !((e = this.blocks) != null && e.length) && ((n = window.parent) == null || n.postMessage(
1952
+ {
1953
+ type: "builder.clickEmptyBlocks",
1954
+ data: {
1955
+ parentElementId: this.parent,
1956
+ dataPath: this.path
1957
+ }
1958
+ },
1959
+ "*"
1960
+ ));
1961
+ },
1962
+ onMouseEnter() {
1963
+ var e, n;
1964
+ g() && !((e = this.blocks) != null && e.length) && ((n = window.parent) == null || n.postMessage(
1965
+ {
1966
+ type: "builder.hoverEmptyBlocks",
1967
+ data: {
1968
+ parentElementId: this.parent,
1969
+ dataPath: this.path
1970
+ }
1971
+ },
1972
+ "*"
1973
+ ));
1974
+ },
1975
+ _classStringToObject(e) {
1976
+ const n = {};
1977
+ if (typeof e != "string")
1978
+ return n;
1979
+ const t = e.trim().split(/\s+/);
1980
+ for (const o of t)
1981
+ n[o] = !0;
1982
+ return n;
1983
+ }
1984
+ }
1985
+ };
1986
+ const ln = ["builder-path", "builder-parent-id", "dataSet"];
1987
+ function dn(e, n, t, o, r, s) {
1988
+ const a = v("render-block"), c = v("block-styles");
1989
+ return l(), d("div", {
1990
+ class: j(s._classStringToObject(s.className + " div-3q96myty4lk")),
1991
+ "builder-path": t.path,
1992
+ "builder-parent-id": t.parent,
1993
+ dataSet: {
1994
+ class: s.className
1995
+ },
1996
+ onClick: n[0] || (n[0] = (i) => s.onClick()),
1997
+ onMouseenter: n[1] || (n[1] = (i) => s.onMouseEnter())
1998
+ }, [
1999
+ t.blocks ? (l(!0), d(R, { key: 0 }, E(t.blocks, (i, u) => (l(), w(a, {
2000
+ key: "render-block-" + i.id,
2001
+ block: i,
2002
+ context: s.builderContext
2003
+ }, null, 8, ["block", "context"]))), 128)) : b("", !0),
2004
+ t.blocks ? (l(!0), d(R, { key: 1 }, E(t.blocks, (i, u) => (l(), w(c, {
2005
+ key: "block-style-" + i.id,
2006
+ block: i,
2007
+ context: s.builderContext
2008
+ }, null, 8, ["block", "context"]))), 128)) : b("", !0)
2009
+ ], 42, ln);
2010
+ }
2011
+ const un = /* @__PURE__ */ f(cn, [["render", dn], ["__scopeId", "data-v-53f55c54"]]), se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2012
+ __proto__: null,
2013
+ default: un
2014
+ }, Symbol.toStringTag, { value: "Module" })), z = {};
2015
+ function fn(e) {
2016
+ if (h()) {
2017
+ Object.assign(z, e);
2018
+ const n = {
2019
+ type: "builder.settingsChange",
2020
+ data: z
2021
+ };
2022
+ parent.postMessage(n, "*");
2023
+ }
2024
+ }
2025
+ export {
2026
+ nt as B,
2027
+ me as C,
2028
+ ct as F,
2029
+ ke as I,
2030
+ Qe as S,
2031
+ U as T,
2032
+ Fe as V,
2033
+ f as _,
2034
+ Ie as a,
2035
+ rt as b,
2036
+ un as c,
2037
+ Ot as d,
2038
+ N as e,
2039
+ Q as f,
2040
+ hn as g,
2041
+ Pt as h,
2042
+ g as i,
2043
+ ae as j,
2044
+ X as k,
2045
+ De as l,
2046
+ pn as m,
2047
+ Ke as n,
2048
+ je as o,
2049
+ Ue as p,
2050
+ Ve as q,
2051
+ on as r,
2052
+ fn as s,
2053
+ D as t
2054
+ };