@builder.io/sdk-vue 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/{block-styles-BvnzCFek.cjs → block-styles-xXC5xD7m.cjs} +1 -1
- package/lib/browser/{block-styles-xxtFjFid.js → block-styles-xasGILBF.js} +1 -1
- package/lib/browser/{block-wrapper-nLXtfeUi.cjs → block-wrapper-4N6UCZUb.cjs} +1 -1
- package/lib/browser/{block-wrapper-R_mUEr8w.js → block-wrapper-N_9kN83W.js} +3 -3
- package/lib/browser/{component-ref-79alcUzS.cjs → component-ref-CtedueX1.cjs} +1 -1
- package/lib/browser/{component-ref-BGigzrfM.js → component-ref-NZYFpLyY.js} +2 -2
- package/lib/browser/components/block/block.helpers.d.ts +4 -0
- package/lib/browser/components/block/block.vue.d.ts +1 -3
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +3 -3
- package/lib/browser/components/content/content.vue.d.ts +3 -3
- package/lib/browser/components/content-variants/content-variants.vue.d.ts +3 -3
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/functions/evaluate/evaluate.d.ts +3 -1
- package/lib/browser/functions/evaluate/helpers.d.ts +1 -0
- package/lib/browser/get-block-properties-BYv9arve.cjs +1 -0
- package/lib/browser/{get-block-properties-bp_2lFmO.js → get-block-properties-XpDJWplm.js} +13 -12
- package/lib/browser/{index-C7j1WgZK.js → index-IiLTuw5y.js} +745 -707
- package/lib/browser/index-TLgvBIUm.cjs +165 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.js +1 -1
- package/lib/browser/{repeated-block-bDIdkk6O.js → repeated-block-2uW65br0.js} +2 -2
- package/lib/browser/{repeated-block-W7bXYbUO.cjs → repeated-block-R55GuInH.cjs} +1 -1
- package/lib/browser/style.css +1 -1
- package/lib/{node/block-styles-YKIkvfZd.js → edge/block-styles-1Y-luUbF.js} +1 -1
- package/lib/edge/{block-styles-QigWYA-E.cjs → block-styles-OQkHmuXv.cjs} +1 -1
- package/lib/edge/{block-wrapper-ftxiiohL.js → block-wrapper-amJaBkpx.js} +3 -3
- package/lib/{node/block-wrapper-ZpFHfHDZ.cjs → edge/block-wrapper-qcbYIhCp.cjs} +1 -1
- package/lib/{node/component-ref-fMPa1SgG.js → edge/component-ref-G4Y_2Wev.js} +2 -2
- package/lib/{node/component-ref-_QSNBXoU.cjs → edge/component-ref-TBA1YCG5.cjs} +1 -1
- package/lib/edge/components/block/block.helpers.d.ts +4 -0
- package/lib/edge/components/block/block.vue.d.ts +1 -3
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +3 -3
- package/lib/edge/components/content/content.vue.d.ts +3 -3
- package/lib/edge/components/content-variants/content-variants.vue.d.ts +3 -3
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/functions/evaluate/evaluate.d.ts +3 -1
- package/lib/edge/functions/evaluate/helpers.d.ts +1 -0
- package/lib/edge/get-block-properties-I4wR6gqz.cjs +1 -0
- package/lib/{node/get-block-properties-vJcm6WEl.js → edge/get-block-properties-Mf8j3xxz.js} +15 -14
- package/lib/edge/{index-1p20XDan.js → index-QGDyn3F4.js} +1227 -1189
- package/lib/edge/{index--C_NsEvi.cjs → index-Y1Ul7p-a.cjs} +29 -30
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.js +1 -1
- package/lib/edge/{repeated-block-ukxNWlZu.js → repeated-block-SXw3PYRg.js} +2 -2
- package/lib/edge/{repeated-block-WI_LbjE8.cjs → repeated-block-cho6OAg2.cjs} +1 -1
- package/lib/edge/style.css +1 -1
- package/lib/node/{block-styles-xDDM-KOO.cjs → block-styles-duIy1mDJ.cjs} +1 -1
- package/lib/{edge/block-styles-olcG8bYF.js → node/block-styles-rVezFfnK.js} +1 -1
- package/lib/{edge/block-wrapper-lOUKV9Kz.cjs → node/block-wrapper-HZs0reB7.cjs} +1 -1
- package/lib/node/{block-wrapper-fq4wNFt0.js → block-wrapper-pazX_RJj.js} +3 -3
- package/lib/{edge/component-ref-UUGHN6dr.js → node/component-ref-lZGzt5_2.js} +2 -2
- package/lib/{edge/component-ref-0LKCvrm-.cjs → node/component-ref-pR-6yx5E.cjs} +1 -1
- package/lib/node/components/block/block.helpers.d.ts +4 -0
- package/lib/node/components/block/block.vue.d.ts +1 -3
- package/lib/node/components/content/components/enable-editor.vue.d.ts +3 -3
- package/lib/node/components/content/content.vue.d.ts +3 -3
- package/lib/node/components/content-variants/content-variants.vue.d.ts +3 -3
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/functions/evaluate/evaluate.d.ts +3 -1
- package/lib/node/functions/evaluate/helpers.d.ts +1 -0
- package/lib/node/get-block-properties-R1EbzpGB.cjs +1 -0
- package/lib/{edge/get-block-properties-66gBHVtJ.js → node/get-block-properties-huGrIrmB.js} +15 -14
- package/lib/node/{index-jQ6BUsiE.cjs → index-3Ry2GjhV.cjs} +7 -8
- package/lib/node/{index-UXPrrhRi.js → index-whwvaDGF.js} +230 -192
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.js +1 -1
- package/lib/node/{repeated-block-t0vsXxhN.cjs → repeated-block-11rZMkW-.cjs} +1 -1
- package/lib/node/{repeated-block-M2Jxf-y2.js → repeated-block-q2Om5NKj.js} +2 -2
- package/lib/node/style.css +1 -1
- package/package.json +1 -1
- package/lib/browser/get-block-properties-lBZ4R-WH.cjs +0 -1
- package/lib/browser/index-lozy1Rbj.cjs +0 -166
- package/lib/edge/get-block-properties-QGAVgRed.cjs +0 -1
- package/lib/node/get-block-properties-vWSuHhTt.cjs +0 -1
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var $ = Object.defineProperty;
|
|
2
|
+
var E = (e, t, n) => t in e ? $(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var v = (e, t, n) => (E(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
1
4
|
import { defineComponent, openBlock, createElementBlock, Fragment as Fragment$1, createBlock, resolveDynamicComponent, mergeProps, toHandlers, withCtx, renderSlot, resolveComponent, createTextVNode, toDisplayString, defineAsyncComponent, createVNode, renderList, createCommentVNode, h, createElementVNode, normalizeStyle, normalizeClass, markRaw } from "vue";
|
|
2
5
|
import { createRequire } from "node:module";
|
|
3
6
|
const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), isEmptyElement = (e) => typeof e == "string" && EMPTY_HTML_ELEMENTS.has(e.toLowerCase());
|
|
@@ -224,7 +227,7 @@ function flattenState({
|
|
|
224
227
|
if (t && r in t)
|
|
225
228
|
return t[r];
|
|
226
229
|
const s = o[r];
|
|
227
|
-
return typeof s == "object" ? flattenState({
|
|
230
|
+
return typeof s == "object" && s !== null ? flattenState({
|
|
228
231
|
rootState: s,
|
|
229
232
|
localState: void 0,
|
|
230
233
|
rootSetState: n ? (i) => {
|
|
@@ -318,29 +321,29 @@ output;
|
|
|
318
321
|
const a = safeDynamicRequire("isolated-vm"), l = fastClone({
|
|
319
322
|
...i,
|
|
320
323
|
...r
|
|
321
|
-
}),
|
|
324
|
+
}), c = getFunctionArguments({
|
|
322
325
|
builder: t,
|
|
323
326
|
context: n,
|
|
324
327
|
event: o,
|
|
325
328
|
state: l
|
|
326
|
-
}), u = getIsolateContext(),
|
|
327
|
-
|
|
329
|
+
}), u = getIsolateContext(), d = u.global;
|
|
330
|
+
d.setSync("global", d.derefInto()), d.setSync("log", function(...m) {
|
|
328
331
|
console.log(...m);
|
|
329
|
-
}),
|
|
332
|
+
}), d.setSync(BUILDER_SET_STATE_NAME, function(m, b) {
|
|
330
333
|
set(i, m, b), s == null || s(i);
|
|
331
|
-
}),
|
|
332
|
-
const
|
|
334
|
+
}), c.forEach(([m, b]) => {
|
|
335
|
+
const S = typeof b == "object" ? new a.Reference(
|
|
333
336
|
// workaround: methods with default values for arguments is not being cloned over
|
|
334
337
|
m === "builder" ? {
|
|
335
338
|
...b,
|
|
336
339
|
getUserAttributes: () => b.getUserAttributes()
|
|
337
340
|
} : b
|
|
338
341
|
) : null;
|
|
339
|
-
|
|
340
|
-
}),
|
|
342
|
+
d.setSync(getSyncValName(m), S);
|
|
343
|
+
}), d.setSync(INJECTED_IVM_GLOBAL, a);
|
|
341
344
|
const p = processCode({
|
|
342
345
|
code: e,
|
|
343
|
-
args:
|
|
346
|
+
args: c
|
|
344
347
|
}), f = u.evalSync(p);
|
|
345
348
|
try {
|
|
346
349
|
return JSON.parse(f);
|
|
@@ -358,7 +361,26 @@ const shouldForceBrowserRuntimeInNode = () => {
|
|
|
358
361
|
return !1;
|
|
359
362
|
const e = process.arch === "arm64", t = process.version.startsWith("v20"), n = (o = process.env.NODE_OPTIONS) == null ? void 0 : o.includes("--no-node-snapshot");
|
|
360
363
|
return e && t && !n ? (logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "), !0) : !1;
|
|
361
|
-
}, chooseBrowserOrServerEval = (e) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(e) : runInNode(e)
|
|
364
|
+
}, chooseBrowserOrServerEval = (e) => isBrowser() || shouldForceBrowserRuntimeInNode() ? runInBrowser(e) : runInNode(e), y = class y {
|
|
365
|
+
static getCacheKey(t) {
|
|
366
|
+
return JSON.stringify({
|
|
367
|
+
...t,
|
|
368
|
+
// replace the event with a random number to break cache
|
|
369
|
+
// thats because we can't serialize the event object due to circular refs in DOM node refs.
|
|
370
|
+
event: t.event ? Math.random() : void 0
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
static getCachedValue(t) {
|
|
374
|
+
return y.cache.get(t);
|
|
375
|
+
}
|
|
376
|
+
static setCachedValue(t, n) {
|
|
377
|
+
y.cache.size > 20 && y.cache.delete(y.cache.keys().next().value), y.cache.set(t, {
|
|
378
|
+
value: n
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
v(y, "cacheLimit", 20), v(y, "cache", /* @__PURE__ */ new Map());
|
|
383
|
+
let EvalCache = y;
|
|
362
384
|
function evaluate({
|
|
363
385
|
code: e,
|
|
364
386
|
context: t,
|
|
@@ -366,13 +388,14 @@ function evaluate({
|
|
|
366
388
|
rootState: o,
|
|
367
389
|
rootSetState: r,
|
|
368
390
|
event: s,
|
|
369
|
-
isExpression: i = !0
|
|
391
|
+
isExpression: i = !0,
|
|
392
|
+
enableCache: a
|
|
370
393
|
}) {
|
|
371
394
|
if (e === "") {
|
|
372
395
|
logger.warn("Skipping evaluation of empty code block.");
|
|
373
396
|
return;
|
|
374
397
|
}
|
|
375
|
-
const
|
|
398
|
+
const l = {
|
|
376
399
|
code: parseCode(e, {
|
|
377
400
|
isExpression: i
|
|
378
401
|
}),
|
|
@@ -383,10 +406,20 @@ function evaluate({
|
|
|
383
406
|
rootState: o,
|
|
384
407
|
localState: n
|
|
385
408
|
};
|
|
409
|
+
if (a) {
|
|
410
|
+
const c = EvalCache.getCacheKey(l), u = EvalCache.getCachedValue(c);
|
|
411
|
+
if (u)
|
|
412
|
+
return u.value;
|
|
413
|
+
}
|
|
386
414
|
try {
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
415
|
+
const c = chooseBrowserOrServerEval(l);
|
|
416
|
+
if (a) {
|
|
417
|
+
const u = EvalCache.getCacheKey(l);
|
|
418
|
+
EvalCache.setCachedValue(u, c);
|
|
419
|
+
}
|
|
420
|
+
return c;
|
|
421
|
+
} catch (c) {
|
|
422
|
+
logger.error("Failed code evaluation: " + c.message, {
|
|
390
423
|
code: e
|
|
391
424
|
});
|
|
392
425
|
return;
|
|
@@ -414,14 +447,15 @@ const evaluateBindings = ({
|
|
|
414
447
|
}
|
|
415
448
|
};
|
|
416
449
|
for (const a in e.bindings) {
|
|
417
|
-
const l = e.bindings[a],
|
|
450
|
+
const l = e.bindings[a], c = evaluate({
|
|
418
451
|
code: l,
|
|
419
452
|
localState: n,
|
|
420
453
|
rootState: o,
|
|
421
454
|
rootSetState: r,
|
|
422
|
-
context: t
|
|
455
|
+
context: t,
|
|
456
|
+
enableCache: !0
|
|
423
457
|
});
|
|
424
|
-
set(i, a,
|
|
458
|
+
set(i, a, c);
|
|
425
459
|
}
|
|
426
460
|
return i;
|
|
427
461
|
};
|
|
@@ -442,58 +476,16 @@ function getProcessedBlock({
|
|
|
442
476
|
context: t
|
|
443
477
|
}) : i;
|
|
444
478
|
}
|
|
445
|
-
const camelToKebabCase = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), convertStyleMapToCSSArray = (e) => Object.entries(e).map(([n, o]) => {
|
|
446
|
-
if (typeof o == "string")
|
|
447
|
-
return `${camelToKebabCase(n)}: ${o};`;
|
|
448
|
-
}).filter(checkIsDefined), convertStyleMapToCSS = (e) => convertStyleMapToCSSArray(e).join(`
|
|
449
|
-
`), createCssClass = ({
|
|
450
|
-
mediaQuery: e,
|
|
451
|
-
className: t,
|
|
452
|
-
styles: n
|
|
453
|
-
}) => {
|
|
454
|
-
const o = `.${t} {
|
|
455
|
-
${convertStyleMapToCSS(n)}
|
|
456
|
-
}`;
|
|
457
|
-
return e ? `${e} {
|
|
458
|
-
${o}
|
|
459
|
-
}` : o;
|
|
460
|
-
};
|
|
461
|
-
function transformStyleProperty({
|
|
462
|
-
style: e
|
|
463
|
-
}) {
|
|
464
|
-
return e;
|
|
465
|
-
}
|
|
466
|
-
const getStyle = ({
|
|
467
|
-
block: e,
|
|
468
|
-
context: t
|
|
469
|
-
}) => mapStyleObjToStrIfNeeded(transformStyleProperty({
|
|
470
|
-
style: e.style || {},
|
|
471
|
-
context: t,
|
|
472
|
-
block: e
|
|
473
|
-
}));
|
|
474
|
-
function mapStyleObjToStrIfNeeded(e) {
|
|
475
|
-
switch (TARGET) {
|
|
476
|
-
case "svelte":
|
|
477
|
-
case "vue":
|
|
478
|
-
case "solid":
|
|
479
|
-
return convertStyleMapToCSSArray(e).join(" ");
|
|
480
|
-
case "qwik":
|
|
481
|
-
case "reactNative":
|
|
482
|
-
case "react":
|
|
483
|
-
case "rsc":
|
|
484
|
-
return e;
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
479
|
function throttle(e, t, n = {}) {
|
|
488
480
|
let o, r, s, i = null, a = 0;
|
|
489
481
|
const l = function() {
|
|
490
482
|
a = n.leading === !1 ? 0 : Date.now(), i = null, s = e.apply(o, r), i || (o = r = null);
|
|
491
483
|
};
|
|
492
484
|
return function() {
|
|
493
|
-
const
|
|
494
|
-
!a && n.leading === !1 && (a =
|
|
495
|
-
const u = t - (
|
|
496
|
-
return o = this, r = arguments, u <= 0 || u > t ? (i && (clearTimeout(i), i = null), a =
|
|
485
|
+
const c = Date.now();
|
|
486
|
+
!a && n.leading === !1 && (a = c);
|
|
487
|
+
const u = t - (c - a);
|
|
488
|
+
return o = this, r = arguments, u <= 0 || u > t ? (i && (clearTimeout(i), i = null), a = c, s = e.apply(o, r), i || (o = r = null)) : !i && n.trailing !== !1 && (i = setTimeout(l, u)), s;
|
|
497
489
|
};
|
|
498
490
|
}
|
|
499
491
|
function assign(e, ...t) {
|
|
@@ -591,14 +583,14 @@ function bindScrollInViewAnimation(e) {
|
|
|
591
583
|
leading: !1
|
|
592
584
|
});
|
|
593
585
|
function a(u) {
|
|
594
|
-
const
|
|
595
|
-
return
|
|
586
|
+
const d = u.getBoundingClientRect(), p = window.innerHeight, m = (e.thresholdPercent || 0) / 100 * p;
|
|
587
|
+
return d.bottom > m && d.top < p - m;
|
|
596
588
|
}
|
|
597
589
|
const l = e.steps[0].styles;
|
|
598
|
-
function
|
|
590
|
+
function c() {
|
|
599
591
|
assign(n.style, l);
|
|
600
592
|
}
|
|
601
|
-
|
|
593
|
+
c(), setTimeout(() => {
|
|
602
594
|
n.style.transition = `all ${e.duration}s ${camelCaseToKebabCase(e.easing)}`, e.delay && (n.style.transitionDelay = e.delay + "s");
|
|
603
595
|
}), document.addEventListener("scroll", i, {
|
|
604
596
|
capture: !0,
|
|
@@ -606,6 +598,48 @@ function bindScrollInViewAnimation(e) {
|
|
|
606
598
|
}), s();
|
|
607
599
|
});
|
|
608
600
|
}
|
|
601
|
+
const camelToKebabCase = (e) => e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase(), convertStyleMapToCSSArray = (e) => Object.entries(e).map(([n, o]) => {
|
|
602
|
+
if (typeof o == "string")
|
|
603
|
+
return `${camelToKebabCase(n)}: ${o};`;
|
|
604
|
+
}).filter(checkIsDefined), convertStyleMapToCSS = (e) => convertStyleMapToCSSArray(e).join(`
|
|
605
|
+
`), createCssClass = ({
|
|
606
|
+
mediaQuery: e,
|
|
607
|
+
className: t,
|
|
608
|
+
styles: n
|
|
609
|
+
}) => {
|
|
610
|
+
const o = `.${t} {
|
|
611
|
+
${convertStyleMapToCSS(n)}
|
|
612
|
+
}`;
|
|
613
|
+
return e ? `${e} {
|
|
614
|
+
${o}
|
|
615
|
+
}` : o;
|
|
616
|
+
};
|
|
617
|
+
function transformStyleProperty({
|
|
618
|
+
style: e
|
|
619
|
+
}) {
|
|
620
|
+
return e;
|
|
621
|
+
}
|
|
622
|
+
const getStyle = ({
|
|
623
|
+
block: e,
|
|
624
|
+
context: t
|
|
625
|
+
}) => mapStyleObjToStrIfNeeded(transformStyleProperty({
|
|
626
|
+
style: e.style || {},
|
|
627
|
+
context: t,
|
|
628
|
+
block: e
|
|
629
|
+
}));
|
|
630
|
+
function mapStyleObjToStrIfNeeded(e) {
|
|
631
|
+
switch (TARGET) {
|
|
632
|
+
case "svelte":
|
|
633
|
+
case "vue":
|
|
634
|
+
case "solid":
|
|
635
|
+
return convertStyleMapToCSSArray(e).join(" ");
|
|
636
|
+
case "qwik":
|
|
637
|
+
case "reactNative":
|
|
638
|
+
case "react":
|
|
639
|
+
case "rsc":
|
|
640
|
+
return e;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
609
643
|
const getComponent = ({
|
|
610
644
|
block: e,
|
|
611
645
|
context: t,
|
|
@@ -643,40 +677,41 @@ const getComponent = ({
|
|
|
643
677
|
localState: t.localState,
|
|
644
678
|
rootState: t.rootState,
|
|
645
679
|
rootSetState: t.rootSetState,
|
|
646
|
-
context: t.context
|
|
680
|
+
context: t.context,
|
|
681
|
+
enableCache: !0
|
|
647
682
|
});
|
|
648
683
|
if (!Array.isArray(r))
|
|
649
684
|
return;
|
|
650
685
|
const s = n.collection.split(".").pop(), i = n.itemName || (s ? s + "Item" : "item");
|
|
651
|
-
return r.map((l,
|
|
686
|
+
return r.map((l, c) => ({
|
|
652
687
|
context: {
|
|
653
688
|
...t,
|
|
654
689
|
localState: {
|
|
655
690
|
...t.localState,
|
|
656
|
-
$index:
|
|
691
|
+
$index: c,
|
|
657
692
|
$item: l,
|
|
658
693
|
[i]: l,
|
|
659
|
-
[`$${i}Index`]:
|
|
694
|
+
[`$${i}Index`]: c
|
|
660
695
|
}
|
|
661
696
|
},
|
|
662
697
|
block: o
|
|
663
698
|
}));
|
|
664
|
-
}, BlockStyles = () => import("./block-styles-
|
|
699
|
+
}, BlockStyles = () => import("./block-styles-rVezFfnK.js").then((e) => e.default).catch((e) => {
|
|
665
700
|
throw console.error(
|
|
666
701
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
667
702
|
e
|
|
668
703
|
), e;
|
|
669
|
-
}), BlockWrapper = () => import("./block-wrapper-
|
|
704
|
+
}), BlockWrapper = () => import("./block-wrapper-pazX_RJj.js").then((e) => e.default).catch((e) => {
|
|
670
705
|
throw console.error(
|
|
671
706
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
672
707
|
e
|
|
673
708
|
), e;
|
|
674
|
-
}), ComponentRef = () => import("./component-ref-
|
|
709
|
+
}), ComponentRef = () => import("./component-ref-lZGzt5_2.js").then((e) => e.default).catch((e) => {
|
|
675
710
|
throw console.error(
|
|
676
711
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
677
712
|
e
|
|
678
713
|
), e;
|
|
679
|
-
}), RepeatedBlock = () => import("./repeated-block-
|
|
714
|
+
}), RepeatedBlock = () => import("./repeated-block-q2Om5NKj.js").then((e) => e.default).catch((e) => {
|
|
680
715
|
throw console.error(
|
|
681
716
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
682
717
|
e
|
|
@@ -690,9 +725,6 @@ const getComponent = ({
|
|
|
690
725
|
BlockWrapper: defineAsyncComponent(BlockWrapper)
|
|
691
726
|
},
|
|
692
727
|
props: ["block", "context", "registeredComponents", "linkComponent"],
|
|
693
|
-
data() {
|
|
694
|
-
return { childrenContext: this.context };
|
|
695
|
-
},
|
|
696
728
|
mounted() {
|
|
697
729
|
const e = this.processedBlock.id, t = this.processedBlock.animations;
|
|
698
730
|
t && e && bindAnimations(
|
|
@@ -743,7 +775,7 @@ const getComponent = ({
|
|
|
743
775
|
return !((t = this.blockComponent) != null && t.component) && !this.repeatItem ? this.processedBlock.children ?? [] : [];
|
|
744
776
|
},
|
|
745
777
|
componentRefProps() {
|
|
746
|
-
var e, t, n, o, r, s, i, a, l,
|
|
778
|
+
var e, t, n, o, r, s, i, a, l, c;
|
|
747
779
|
return {
|
|
748
780
|
blockChildren: this.processedBlock.children ?? [],
|
|
749
781
|
componentRef: (e = this.blockComponent) == null ? void 0 : e.component,
|
|
@@ -757,25 +789,25 @@ const getComponent = ({
|
|
|
757
789
|
builderComponents: this.registeredComponents
|
|
758
790
|
} : {}
|
|
759
791
|
},
|
|
760
|
-
context: this.
|
|
792
|
+
context: this.context,
|
|
761
793
|
linkComponent: this.linkComponent,
|
|
762
794
|
registeredComponents: this.registeredComponents,
|
|
763
795
|
builderBlock: this.processedBlock,
|
|
764
796
|
includeBlockProps: ((l = this.blockComponent) == null ? void 0 : l.noWrap) === !0,
|
|
765
|
-
isInteractive: !((
|
|
797
|
+
isInteractive: !((c = this.blockComponent) != null && c.isRSC)
|
|
766
798
|
};
|
|
767
799
|
}
|
|
768
800
|
}
|
|
769
801
|
});
|
|
770
802
|
function _sfc_render$l(e, t, n, o, r, s) {
|
|
771
|
-
var
|
|
772
|
-
const i = resolveComponent("block-styles"), a = resolveComponent("component-ref"), l = resolveComponent("block", !0),
|
|
803
|
+
var d;
|
|
804
|
+
const i = resolveComponent("block-styles"), a = resolveComponent("component-ref"), l = resolveComponent("block", !0), c = resolveComponent("block-wrapper"), u = resolveComponent("repeated-block");
|
|
773
805
|
return e.canShowBlock ? (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
|
|
774
806
|
createVNode(i, {
|
|
775
807
|
block: e.block,
|
|
776
808
|
context: e.context
|
|
777
809
|
}, null, 8, ["block", "context"]),
|
|
778
|
-
(
|
|
810
|
+
(d = e.blockComponent) != null && d.noWrap ? (openBlock(), createBlock(a, {
|
|
779
811
|
key: 1,
|
|
780
812
|
componentRef: e.componentRefProps.componentRef,
|
|
781
813
|
componentOptions: e.componentRefProps.componentOptions,
|
|
@@ -793,7 +825,7 @@ function _sfc_render$l(e, t, n, o, r, s) {
|
|
|
793
825
|
block: p.block,
|
|
794
826
|
registeredComponents: e.registeredComponents,
|
|
795
827
|
linkComponent: e.linkComponent
|
|
796
|
-
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (openBlock(), createBlock(
|
|
828
|
+
}, null, 8, ["repeatContext", "block", "registeredComponents", "linkComponent"]))), 128)) : (openBlock(), createBlock(c, {
|
|
797
829
|
key: 0,
|
|
798
830
|
Wrapper: e.Tag,
|
|
799
831
|
block: e.processedBlock,
|
|
@@ -815,10 +847,10 @@ function _sfc_render$l(e, t, n, o, r, s) {
|
|
|
815
847
|
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.childrenWithoutParentComponent, (p, f) => (openBlock(), createBlock(l, {
|
|
816
848
|
key: p.id,
|
|
817
849
|
block: p,
|
|
818
|
-
context: e.childrenContext,
|
|
819
850
|
registeredComponents: e.registeredComponents,
|
|
820
|
-
linkComponent: e.linkComponent
|
|
821
|
-
|
|
851
|
+
linkComponent: e.linkComponent,
|
|
852
|
+
context: e.context
|
|
853
|
+
}, null, 8, ["block", "registeredComponents", "linkComponent", "context"]))), 128))
|
|
822
854
|
]),
|
|
823
855
|
_: 1
|
|
824
856
|
}, 8, ["Wrapper", "block", "context", "linkComponent"]))
|
|
@@ -889,7 +921,7 @@ function _sfc_render$k(e, t, n, o, r, s) {
|
|
|
889
921
|
_: 3
|
|
890
922
|
}, 16, ["class", "builder-path", "builder-parent-id", "style", "onClick", "onMouseEnter", "onKeyPress"]);
|
|
891
923
|
}
|
|
892
|
-
const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$k], ["__scopeId", "data-v-
|
|
924
|
+
const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$k], ["__scopeId", "data-v-b8add99a"]]), _sfc_main$l = defineComponent({
|
|
893
925
|
name: "builder-blocks",
|
|
894
926
|
components: { BlocksWrapper, Block },
|
|
895
927
|
props: [
|
|
@@ -907,7 +939,7 @@ const BlocksWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_
|
|
|
907
939
|
}
|
|
908
940
|
});
|
|
909
941
|
function _sfc_render$j(e, t, n, o, r, s) {
|
|
910
|
-
var l,
|
|
942
|
+
var l, c;
|
|
911
943
|
const i = resolveComponent("block"), a = resolveComponent("blocks-wrapper");
|
|
912
944
|
return openBlock(), createBlock(a, {
|
|
913
945
|
blocks: e.blocks,
|
|
@@ -915,10 +947,10 @@ function _sfc_render$j(e, t, n, o, r, s) {
|
|
|
915
947
|
path: e.path,
|
|
916
948
|
styleProp: e.styleProp,
|
|
917
949
|
BlocksWrapper: ((l = e.context) == null ? void 0 : l.BlocksWrapper) || e.builderContext.BlocksWrapper,
|
|
918
|
-
BlocksWrapperProps: ((
|
|
950
|
+
BlocksWrapperProps: ((c = e.context) == null ? void 0 : c.BlocksWrapperProps) || e.builderContext.BlocksWrapperProps
|
|
919
951
|
}, {
|
|
920
952
|
default: withCtx(() => [
|
|
921
|
-
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList(e.blocks, (u,
|
|
953
|
+
e.blocks ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList(e.blocks, (u, d) => (openBlock(), createBlock(i, {
|
|
922
954
|
key: u.id,
|
|
923
955
|
block: u,
|
|
924
956
|
linkComponent: e.linkComponent,
|
|
@@ -1110,13 +1142,13 @@ function _sfc_render$i(e, t, n, o, r, s) {
|
|
|
1110
1142
|
key: 0,
|
|
1111
1143
|
styles: e.columnsStyles
|
|
1112
1144
|
}, null, 8, ["styles"])) : createCommentVNode("", !0),
|
|
1113
|
-
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.columns, (
|
|
1145
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.columns, (c, u) => (openBlock(), createBlock(l, {
|
|
1114
1146
|
key: u,
|
|
1115
|
-
TagName:
|
|
1147
|
+
TagName: c.link ? e.builderLinkComponent || "a" : "div",
|
|
1116
1148
|
actionAttributes: {},
|
|
1117
1149
|
attributes: {
|
|
1118
|
-
...
|
|
1119
|
-
href:
|
|
1150
|
+
...c.link ? {
|
|
1151
|
+
href: c.link
|
|
1120
1152
|
} : {},
|
|
1121
1153
|
[e.getClassPropName()]: "builder-column",
|
|
1122
1154
|
style: e.mapStyleObjToStrIfNeeded(e.columnCssVars(u))
|
|
@@ -1132,14 +1164,14 @@ function _sfc_render$i(e, t, n, o, r, s) {
|
|
|
1132
1164
|
context: e.builderContext,
|
|
1133
1165
|
registeredComponents: e.builderComponents,
|
|
1134
1166
|
linkComponent: e.builderLinkComponent,
|
|
1135
|
-
blocks:
|
|
1167
|
+
blocks: c.blocks
|
|
1136
1168
|
}, null, 8, ["path", "parent", "context", "registeredComponents", "linkComponent", "blocks"])
|
|
1137
1169
|
]),
|
|
1138
1170
|
_: 2
|
|
1139
1171
|
}, 1032, ["TagName", "attributes"]))), 128))
|
|
1140
1172
|
], 16);
|
|
1141
1173
|
}
|
|
1142
|
-
const Columns = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-
|
|
1174
|
+
const Columns = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-d0d8b675"]]), _sfc_main$i = defineComponent({
|
|
1143
1175
|
name: "builder-fragment-component",
|
|
1144
1176
|
props: []
|
|
1145
1177
|
});
|
|
@@ -1230,7 +1262,7 @@ const _sfc_main$h = defineComponent({
|
|
|
1230
1262
|
class: "div-1be3j8m9ewb-2"
|
|
1231
1263
|
};
|
|
1232
1264
|
function _sfc_render$g(e, t, n, o, r, s) {
|
|
1233
|
-
var i, a, l,
|
|
1265
|
+
var i, a, l, c;
|
|
1234
1266
|
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
1235
1267
|
createElementVNode("picture", null, [
|
|
1236
1268
|
e.webpSrcSet ? (openBlock(), createElementBlock("source", {
|
|
@@ -1241,7 +1273,7 @@ function _sfc_render$g(e, t, n, o, r, s) {
|
|
|
1241
1273
|
createElementVNode("img", {
|
|
1242
1274
|
loading: "lazy",
|
|
1243
1275
|
alt: e.altText,
|
|
1244
|
-
role: e.altText ? "presentation"
|
|
1276
|
+
role: e.altText ? void 0 : "presentation",
|
|
1245
1277
|
style: normalizeStyle({
|
|
1246
1278
|
objectPosition: e.backgroundPosition || "center",
|
|
1247
1279
|
objectFit: e.backgroundSize || "cover",
|
|
@@ -1262,13 +1294,13 @@ function _sfc_render$g(e, t, n, o, r, s) {
|
|
|
1262
1294
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
1263
1295
|
})
|
|
1264
1296
|
}, null, 4)) : createCommentVNode("", !0),
|
|
1265
|
-
(
|
|
1297
|
+
(c = (l = e.builderBlock) == null ? void 0 : l.children) != null && c.length && e.fitContent ? renderSlot(e.$slots, "default", { key: 1 }, void 0, !0) : createCommentVNode("", !0),
|
|
1266
1298
|
!e.fitContent && e.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
1267
1299
|
renderSlot(e.$slots, "default", {}, void 0, !0)
|
|
1268
1300
|
])) : createCommentVNode("", !0)
|
|
1269
1301
|
], 64);
|
|
1270
1302
|
}
|
|
1271
|
-
const Image = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-
|
|
1303
|
+
const Image = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-c23615d2"]]), _sfc_main$g = defineComponent({
|
|
1272
1304
|
name: "builder-section-component",
|
|
1273
1305
|
props: ["attributes", "maxWidth"],
|
|
1274
1306
|
data() {
|
|
@@ -1689,15 +1721,15 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1689
1721
|
onChange: (e) => {
|
|
1690
1722
|
e.delete("srcset"), e.delete("noWebp");
|
|
1691
1723
|
function n(i, a = 6e4) {
|
|
1692
|
-
return new Promise((l,
|
|
1724
|
+
return new Promise((l, c) => {
|
|
1693
1725
|
const u = document.createElement("img");
|
|
1694
|
-
let
|
|
1726
|
+
let d = !1;
|
|
1695
1727
|
u.onload = () => {
|
|
1696
|
-
|
|
1728
|
+
d = !0, l(u);
|
|
1697
1729
|
}, u.addEventListener("error", (p) => {
|
|
1698
|
-
console.warn("Image load failed", p.error),
|
|
1730
|
+
console.warn("Image load failed", p.error), c(p.error);
|
|
1699
1731
|
}), u.src = i, setTimeout(() => {
|
|
1700
|
-
|
|
1732
|
+
d || c(new Error("Image load timed out"));
|
|
1701
1733
|
}, a);
|
|
1702
1734
|
});
|
|
1703
1735
|
}
|
|
@@ -1826,7 +1858,7 @@ const Section = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
|
|
|
1826
1858
|
props: ["js", "builderContext", "name"]
|
|
1827
1859
|
});
|
|
1828
1860
|
function _sfc_render$e(e, t, n, o, r, s) {
|
|
1829
|
-
var a, l,
|
|
1861
|
+
var a, l, c;
|
|
1830
1862
|
const i = resolveComponent("blocks");
|
|
1831
1863
|
return openBlock(), createElementBlock("div", mergeProps(
|
|
1832
1864
|
{ style: {
|
|
@@ -1840,7 +1872,7 @@ function _sfc_render$e(e, t, n, o, r, s) {
|
|
|
1840
1872
|
parent: (l = e.builderContext.context) == null ? void 0 : l.symbolId,
|
|
1841
1873
|
path: `symbol.data.${e.name}`,
|
|
1842
1874
|
context: e.builderContext,
|
|
1843
|
-
blocks: (
|
|
1875
|
+
blocks: (c = e.builderContext.rootState) == null ? void 0 : c[e.name]
|
|
1844
1876
|
}, null, 8, ["parent", "path", "context", "blocks"])
|
|
1845
1877
|
], 16);
|
|
1846
1878
|
}
|
|
@@ -2347,48 +2379,48 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2347
2379
|
let s;
|
|
2348
2380
|
const i = new FormData(o), a = Array.from(
|
|
2349
2381
|
e.currentTarget.querySelectorAll("input,select,textarea")
|
|
2350
|
-
).filter((
|
|
2382
|
+
).filter((d) => !!d.name).map((d) => {
|
|
2351
2383
|
let p;
|
|
2352
|
-
const f =
|
|
2353
|
-
if (
|
|
2354
|
-
if (
|
|
2355
|
-
if (
|
|
2356
|
-
return p =
|
|
2384
|
+
const f = d.name;
|
|
2385
|
+
if (d instanceof HTMLInputElement)
|
|
2386
|
+
if (d.type === "radio") {
|
|
2387
|
+
if (d.checked)
|
|
2388
|
+
return p = d.name, {
|
|
2357
2389
|
key: f,
|
|
2358
2390
|
value: p
|
|
2359
2391
|
};
|
|
2360
|
-
} else if (
|
|
2361
|
-
p =
|
|
2362
|
-
else if (
|
|
2363
|
-
const m =
|
|
2392
|
+
} else if (d.type === "checkbox")
|
|
2393
|
+
p = d.checked;
|
|
2394
|
+
else if (d.type === "number" || d.type === "range") {
|
|
2395
|
+
const m = d.valueAsNumber;
|
|
2364
2396
|
isNaN(m) || (p = m);
|
|
2365
2397
|
} else
|
|
2366
|
-
|
|
2398
|
+
d.type === "file" ? p = d.files : p = d.value;
|
|
2367
2399
|
else
|
|
2368
|
-
p =
|
|
2400
|
+
p = d.value;
|
|
2369
2401
|
return {
|
|
2370
2402
|
key: f,
|
|
2371
2403
|
value: p
|
|
2372
2404
|
};
|
|
2373
2405
|
});
|
|
2374
2406
|
let l = this.contentType;
|
|
2375
|
-
if (this.sendSubmissionsTo === "email" && (l = "multipart/form-data"), Array.from(a).forEach(({ value:
|
|
2376
|
-
(
|
|
2407
|
+
if (this.sendSubmissionsTo === "email" && (l = "multipart/form-data"), Array.from(a).forEach(({ value: d }) => {
|
|
2408
|
+
(d instanceof File || Array.isArray(d) && d[0] instanceof File || d instanceof FileList) && (l = "multipart/form-data");
|
|
2377
2409
|
}), l !== "application/json")
|
|
2378
2410
|
s = i;
|
|
2379
2411
|
else {
|
|
2380
|
-
const
|
|
2412
|
+
const d = {};
|
|
2381
2413
|
Array.from(a).forEach(({ value: p, key: f }) => {
|
|
2382
|
-
set(
|
|
2383
|
-
}), s = JSON.stringify(
|
|
2414
|
+
set(d, f, p);
|
|
2415
|
+
}), s = JSON.stringify(d);
|
|
2384
2416
|
}
|
|
2385
2417
|
l && l !== "multipart/form-data" && (t && ((n = this.action) != null && n.includes("zapier.com")) || (r["content-type"] = l));
|
|
2386
|
-
const
|
|
2418
|
+
const c = new CustomEvent("presubmit", {
|
|
2387
2419
|
detail: {
|
|
2388
2420
|
body: s
|
|
2389
2421
|
}
|
|
2390
2422
|
});
|
|
2391
|
-
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(
|
|
2423
|
+
if (this.$refs.formRef && (this.$refs.formRef.dispatchEvent(c), c.defaultPrevented))
|
|
2392
2424
|
return;
|
|
2393
2425
|
this.formState = "sending";
|
|
2394
2426
|
const u = `${getEnv() === "dev" ? "http://localhost:5000" : "https://builder.io"}/api/v1/form-submit?apiKey=${this.builderContext.apiKey}&to=${btoa(
|
|
@@ -2402,19 +2434,19 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2402
2434
|
method: this.method || "post"
|
|
2403
2435
|
}
|
|
2404
2436
|
).then(
|
|
2405
|
-
async (
|
|
2437
|
+
async (d) => {
|
|
2406
2438
|
let p;
|
|
2407
|
-
const f =
|
|
2408
|
-
if (f && f.indexOf("application/json") !== -1 ? p = await
|
|
2439
|
+
const f = d.headers.get("content-type");
|
|
2440
|
+
if (f && f.indexOf("application/json") !== -1 ? p = await d.json() : p = await d.text(), !d.ok && this.errorMessagePath) {
|
|
2409
2441
|
let m = get(p, this.errorMessagePath);
|
|
2410
2442
|
m && (typeof m != "string" && (m = JSON.stringify(m)), this.formErrorMessage = m, this.mergeNewRootState({
|
|
2411
2443
|
formErrorMessage: m
|
|
2412
2444
|
}));
|
|
2413
2445
|
}
|
|
2414
|
-
if (this.responseData = p, this.formState =
|
|
2446
|
+
if (this.responseData = p, this.formState = d.ok ? "success" : "error", d.ok) {
|
|
2415
2447
|
const m = new CustomEvent("submit:success", {
|
|
2416
2448
|
detail: {
|
|
2417
|
-
res:
|
|
2449
|
+
res: d,
|
|
2418
2450
|
body: p
|
|
2419
2451
|
}
|
|
2420
2452
|
});
|
|
@@ -2435,13 +2467,13 @@ const embed = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b
|
|
|
2435
2467
|
location.href = this.successUrl;
|
|
2436
2468
|
}
|
|
2437
2469
|
},
|
|
2438
|
-
(
|
|
2470
|
+
(d) => {
|
|
2439
2471
|
const p = new CustomEvent("submit:error", {
|
|
2440
2472
|
detail: {
|
|
2441
|
-
error:
|
|
2473
|
+
error: d
|
|
2442
2474
|
}
|
|
2443
2475
|
});
|
|
2444
|
-
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(p), p.defaultPrevented) || (this.responseData =
|
|
2476
|
+
this.$refs.formRef && (this.$refs.formRef.dispatchEvent(p), p.defaultPrevented) || (this.responseData = d, this.formState = "error");
|
|
2445
2477
|
}
|
|
2446
2478
|
);
|
|
2447
2479
|
}
|
|
@@ -2460,11 +2492,11 @@ function _sfc_render$a(e, t, n, o, r, s) {
|
|
|
2460
2492
|
action: !e.sendWithJs && e.action,
|
|
2461
2493
|
method: e.method,
|
|
2462
2494
|
name: e.name,
|
|
2463
|
-
onSubmit: t[0] || (t[0] = (
|
|
2495
|
+
onSubmit: t[0] || (t[0] = (c) => e.onSubmit(c))
|
|
2464
2496
|
}, e.filterAttrs(e.attributes, "v-on:", !1), toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
2465
|
-
e.builderBlock && e.builderBlock.children ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList((l = e.builderBlock) == null ? void 0 : l.children, (
|
|
2497
|
+
e.builderBlock && e.builderBlock.children ? (openBlock(!0), createElementBlock(Fragment$1, { key: 0 }, renderList((l = e.builderBlock) == null ? void 0 : l.children, (c, u) => (openBlock(), createBlock(i, {
|
|
2466
2498
|
key: `form-block-${e.idx}`,
|
|
2467
|
-
block:
|
|
2499
|
+
block: c,
|
|
2468
2500
|
context: e.builderContext,
|
|
2469
2501
|
registeredComponents: e.builderComponents,
|
|
2470
2502
|
linkComponent: e.builderLinkComponent
|
|
@@ -2481,8 +2513,7 @@ function _sfc_render$a(e, t, n, o, r, s) {
|
|
|
2481
2513
|
blocks: e.sendingMessage,
|
|
2482
2514
|
context: e.builderContext
|
|
2483
2515
|
}, null, 8, ["blocks", "context"])) : createCommentVNode("", !0),
|
|
2484
|
-
e.submissionState() === "error" && e.responseData ? (openBlock(), createElementBlock("pre", _hoisted_2$2,
|
|
2485
|
-
`, 1)) : createCommentVNode("", !0),
|
|
2516
|
+
e.submissionState() === "error" && e.responseData ? (openBlock(), createElementBlock("pre", _hoisted_2$2, toDisplayString(JSON.stringify(e.responseData, null, 2)), 1)) : createCommentVNode("", !0),
|
|
2486
2517
|
e.submissionState() === "success" ? (openBlock(), createBlock(a, {
|
|
2487
2518
|
key: 4,
|
|
2488
2519
|
path: "successMessage",
|
|
@@ -2491,7 +2522,7 @@ function _sfc_render$a(e, t, n, o, r, s) {
|
|
|
2491
2522
|
}, null, 8, ["blocks", "context"])) : createCommentVNode("", !0)
|
|
2492
2523
|
], 16, _hoisted_1$4);
|
|
2493
2524
|
}
|
|
2494
|
-
const Form = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-
|
|
2525
|
+
const Form = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-541b06ed"]]), componentInfo$4 = {
|
|
2495
2526
|
name: "Form:Input",
|
|
2496
2527
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
2497
2528
|
inputs: [
|
|
@@ -2854,7 +2885,7 @@ const Img = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]
|
|
|
2854
2885
|
}
|
|
2855
2886
|
};
|
|
2856
2887
|
function _sfc_render$5(e, t, n, o, r, s) {
|
|
2857
|
-
var i, a, l,
|
|
2888
|
+
var i, a, l, c, u, d, p;
|
|
2858
2889
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
2859
2890
|
createElementVNode("video", mergeProps({
|
|
2860
2891
|
class: "builder-video",
|
|
@@ -2891,10 +2922,10 @@ function _sfc_render$5(e, t, n, o, r, s) {
|
|
|
2891
2922
|
fontSize: "0px"
|
|
2892
2923
|
})
|
|
2893
2924
|
}, null, 4)) : createCommentVNode("", !0),
|
|
2894
|
-
(u = (
|
|
2925
|
+
(u = (c = e.builderBlock) == null ? void 0 : c.children) != null && u.length && e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
2895
2926
|
renderSlot(e.$slots, "default")
|
|
2896
2927
|
])) : createCommentVNode("", !0),
|
|
2897
|
-
(p = (
|
|
2928
|
+
(p = (d = e.builderBlock) == null ? void 0 : d.children) != null && p.length && !e.fitContent ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
2898
2929
|
renderSlot(e.$slots, "default")
|
|
2899
2930
|
])) : createCommentVNode("", !0)
|
|
2900
2931
|
]);
|
|
@@ -3125,9 +3156,9 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
|
|
|
3125
3156
|
enrich: i,
|
|
3126
3157
|
locale: a,
|
|
3127
3158
|
apiVersion: l = DEFAULT_API_VERSION,
|
|
3128
|
-
fields:
|
|
3159
|
+
fields: c,
|
|
3129
3160
|
omit: u,
|
|
3130
|
-
offset:
|
|
3161
|
+
offset: d,
|
|
3131
3162
|
cacheSeconds: p,
|
|
3132
3163
|
staleCacheSeconds: f,
|
|
3133
3164
|
sort: m,
|
|
@@ -3137,26 +3168,26 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
|
|
|
3137
3168
|
throw new Error("Missing API key");
|
|
3138
3169
|
if (!["v3"].includes(l))
|
|
3139
3170
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${l}'`);
|
|
3140
|
-
const
|
|
3141
|
-
if (g.searchParams.set("apiKey", s), g.searchParams.set("limit", String(t)), g.searchParams.set("noTraverse", String(
|
|
3142
|
-
const
|
|
3171
|
+
const S = t !== 1, g = new URL(`https://cdn.builder.io/api/${l}/content/${r}`);
|
|
3172
|
+
if (g.searchParams.set("apiKey", s), g.searchParams.set("limit", String(t)), g.searchParams.set("noTraverse", String(S)), g.searchParams.set("includeRefs", String(!0)), a && g.searchParams.set("locale", a), i && g.searchParams.set("enrich", String(i)), g.searchParams.set("omit", u || "meta.componentsUsed"), c && g.searchParams.set("fields", c), Number.isFinite(d) && d > -1 && g.searchParams.set("offset", String(Math.floor(d))), typeof b == "boolean" && g.searchParams.set("includeUnpublished", String(b)), p && isPositiveNumber(p) && g.searchParams.set("cacheSeconds", String(p)), f && isPositiveNumber(f) && g.searchParams.set("staleCacheSeconds", String(f)), m) {
|
|
3173
|
+
const k = flatten({
|
|
3143
3174
|
sort: m
|
|
3144
3175
|
});
|
|
3145
|
-
for (const
|
|
3146
|
-
g.searchParams.set(
|
|
3176
|
+
for (const C in k)
|
|
3177
|
+
g.searchParams.set(C, JSON.stringify(k[C]));
|
|
3147
3178
|
}
|
|
3148
|
-
const
|
|
3179
|
+
const T = {
|
|
3149
3180
|
...getBuilderSearchParamsFromWindow(),
|
|
3150
3181
|
...normalizeSearchParams(e.options || {})
|
|
3151
|
-
},
|
|
3152
|
-
for (const
|
|
3153
|
-
g.searchParams.set(
|
|
3182
|
+
}, I = flatten(T);
|
|
3183
|
+
for (const k in I)
|
|
3184
|
+
g.searchParams.set(k, String(I[k]));
|
|
3154
3185
|
if (n && g.searchParams.set("userAttributes", JSON.stringify(n)), o) {
|
|
3155
|
-
const
|
|
3186
|
+
const k = flatten({
|
|
3156
3187
|
query: o
|
|
3157
3188
|
});
|
|
3158
|
-
for (const
|
|
3159
|
-
g.searchParams.set(
|
|
3189
|
+
for (const C in k)
|
|
3190
|
+
g.searchParams.set(C, JSON.stringify(k[C]));
|
|
3160
3191
|
}
|
|
3161
3192
|
return g;
|
|
3162
3193
|
}, checkContentHasResults = (e) => "results" in e;
|
|
@@ -3394,7 +3425,7 @@ function isFromTrustedHost(e, t) {
|
|
|
3394
3425
|
const n = new URL(t.origin), o = n.hostname;
|
|
3395
3426
|
return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
3396
3427
|
}
|
|
3397
|
-
const SDK_VERSION = "1.0.
|
|
3428
|
+
const SDK_VERSION = "1.0.12", registry = {};
|
|
3398
3429
|
function register(e, t) {
|
|
3399
3430
|
let n = registry[e];
|
|
3400
3431
|
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
|
@@ -3464,33 +3495,33 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
3464
3495
|
if (r != null && r.type)
|
|
3465
3496
|
switch (r.type) {
|
|
3466
3497
|
case "builder.evaluate": {
|
|
3467
|
-
const a = r.data.text, l = r.data.arguments || [],
|
|
3468
|
-
let
|
|
3498
|
+
const a = r.data.text, l = r.data.arguments || [], c = r.data.id, u = new Function(a);
|
|
3499
|
+
let d, p = null;
|
|
3469
3500
|
try {
|
|
3470
|
-
|
|
3501
|
+
d = u.apply(null, l);
|
|
3471
3502
|
} catch (f) {
|
|
3472
3503
|
p = f;
|
|
3473
3504
|
}
|
|
3474
3505
|
p ? (s = window.parent) == null || s.postMessage({
|
|
3475
3506
|
type: "builder.evaluateError",
|
|
3476
3507
|
data: {
|
|
3477
|
-
id:
|
|
3508
|
+
id: c,
|
|
3478
3509
|
error: p.message
|
|
3479
3510
|
}
|
|
3480
|
-
}, "*") :
|
|
3511
|
+
}, "*") : d && typeof d.then == "function" ? d.then((f) => {
|
|
3481
3512
|
var m;
|
|
3482
3513
|
(m = window.parent) == null || m.postMessage({
|
|
3483
3514
|
type: "builder.evaluateResult",
|
|
3484
3515
|
data: {
|
|
3485
|
-
id:
|
|
3516
|
+
id: c,
|
|
3486
3517
|
result: f
|
|
3487
3518
|
}
|
|
3488
3519
|
}, "*");
|
|
3489
3520
|
}).catch(console.error) : (i = window.parent) == null || i.postMessage({
|
|
3490
3521
|
type: "builder.evaluateResult",
|
|
3491
3522
|
data: {
|
|
3492
|
-
result:
|
|
3493
|
-
id:
|
|
3523
|
+
result: d,
|
|
3524
|
+
id: c
|
|
3494
3525
|
}
|
|
3495
3526
|
}, "*");
|
|
3496
3527
|
break;
|
|
@@ -3747,7 +3778,11 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
3747
3778
|
context: this.context || {},
|
|
3748
3779
|
localState: void 0,
|
|
3749
3780
|
rootState: this.builderContextSignal.rootState,
|
|
3750
|
-
rootSetState: this.builderContextSignal.rootSetState
|
|
3781
|
+
rootSetState: this.builderContextSignal.rootSetState,
|
|
3782
|
+
/**
|
|
3783
|
+
* We don't want to cache the result of the JS code, since it's arbitrary side effect code.
|
|
3784
|
+
*/
|
|
3785
|
+
enableCache: !1
|
|
3751
3786
|
});
|
|
3752
3787
|
},
|
|
3753
3788
|
onClick(e) {
|
|
@@ -3769,13 +3804,16 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
3769
3804
|
evalExpression(e) {
|
|
3770
3805
|
return e.replace(
|
|
3771
3806
|
/{{([^}]+)}}/g,
|
|
3772
|
-
(t, n) =>
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3807
|
+
(t, n) => String(
|
|
3808
|
+
evaluate({
|
|
3809
|
+
code: n,
|
|
3810
|
+
context: this.context || {},
|
|
3811
|
+
localState: void 0,
|
|
3812
|
+
rootState: this.builderContextSignal.rootState,
|
|
3813
|
+
rootSetState: this.builderContextSignal.rootSetState,
|
|
3814
|
+
enableCache: !0
|
|
3815
|
+
})
|
|
3816
|
+
)
|
|
3779
3817
|
);
|
|
3780
3818
|
},
|
|
3781
3819
|
handleRequest({ url: e, key: t }) {
|
|
@@ -3859,12 +3897,12 @@ function _sfc_render$4(e, t, n, o, r, s) {
|
|
|
3859
3897
|
return e.builderContextSignal.content ? (openBlock(), createBlock(resolveDynamicComponent(e.ContentWrapper), mergeProps({
|
|
3860
3898
|
key: e.forceReRenderCount,
|
|
3861
3899
|
ref: "elementRef",
|
|
3862
|
-
onClick: (
|
|
3900
|
+
onClick: (c) => e.onClick(c),
|
|
3863
3901
|
"builder-content-id": (i = e.builderContextSignal.content) == null ? void 0 : i.id,
|
|
3864
3902
|
"builder-model": e.model,
|
|
3865
3903
|
class: `variant-${((a = e.content) == null ? void 0 : a.testVariationId) || ((l = e.content) == null ? void 0 : l.id)}`,
|
|
3866
|
-
onIniteditingbldr: (
|
|
3867
|
-
onInitpreviewingbldr: (
|
|
3904
|
+
onIniteditingbldr: (c) => e.elementRef_onIniteditingbldr(c),
|
|
3905
|
+
onInitpreviewingbldr: (c) => e.elementRef_onInitpreviewingbldr(c)
|
|
3868
3906
|
}, {
|
|
3869
3907
|
...e.showContent ? {} : {
|
|
3870
3908
|
hidden: !0,
|
|
@@ -4075,8 +4113,8 @@ const ContentStyles = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_
|
|
|
4075
4113
|
}
|
|
4076
4114
|
});
|
|
4077
4115
|
function _sfc_render$2(e, t, n, o, r, s) {
|
|
4078
|
-
const i = resolveComponent("inlined-script"), a = resolveComponent("content-styles"), l = resolveComponent("blocks"),
|
|
4079
|
-
return openBlock(), createBlock(
|
|
4116
|
+
const i = resolveComponent("inlined-script"), a = resolveComponent("content-styles"), l = resolveComponent("blocks"), c = resolveComponent("enable-editor");
|
|
4117
|
+
return openBlock(), createBlock(c, mergeProps({
|
|
4080
4118
|
content: e.content,
|
|
4081
4119
|
data: e.data,
|
|
4082
4120
|
model: e.model,
|
|
@@ -4093,7 +4131,7 @@ function _sfc_render$2(e, t, n, o, r, s) {
|
|
|
4093
4131
|
trustedHosts: e.trustedHosts
|
|
4094
4132
|
}, {}), {
|
|
4095
4133
|
default: withCtx(() => {
|
|
4096
|
-
var u,
|
|
4134
|
+
var u, d, p, f, m, b, S;
|
|
4097
4135
|
return [
|
|
4098
4136
|
e.isSsrAbTest ? (openBlock(), createBlock(i, {
|
|
4099
4137
|
key: 0,
|
|
@@ -4102,11 +4140,11 @@ function _sfc_render$2(e, t, n, o, r, s) {
|
|
|
4102
4140
|
e.TARGET !== "reactNative" ? (openBlock(), createBlock(a, {
|
|
4103
4141
|
key: 1,
|
|
4104
4142
|
contentId: (u = e.builderContextSignal.content) == null ? void 0 : u.id,
|
|
4105
|
-
cssCode: (p = (
|
|
4143
|
+
cssCode: (p = (d = e.builderContextSignal.content) == null ? void 0 : d.data) == null ? void 0 : p.cssCode,
|
|
4106
4144
|
customFonts: (m = (f = e.builderContextSignal.content) == null ? void 0 : f.data) == null ? void 0 : m.customFonts
|
|
4107
4145
|
}, null, 8, ["contentId", "cssCode", "customFonts"])) : createCommentVNode("", !0),
|
|
4108
4146
|
createVNode(l, {
|
|
4109
|
-
blocks: (
|
|
4147
|
+
blocks: (S = (b = e.builderContextSignal.content) == null ? void 0 : b.data) == null ? void 0 : S.blocks,
|
|
4110
4148
|
context: e.builderContextSignal,
|
|
4111
4149
|
registeredComponents: e.registeredComponents,
|
|
4112
4150
|
linkComponent: e.linkComponent
|
|
@@ -4183,7 +4221,7 @@ const ContentComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _s
|
|
|
4183
4221
|
}
|
|
4184
4222
|
});
|
|
4185
4223
|
function _sfc_render$1(e, t, n, o, r, s) {
|
|
4186
|
-
var
|
|
4224
|
+
var c;
|
|
4187
4225
|
const i = resolveComponent("inlined-script"), a = resolveComponent("inlined-styles"), l = resolveComponent("content-component");
|
|
4188
4226
|
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
4189
4227
|
!e.__isNestedRender && e.TARGET !== "reactNative" ? (openBlock(), createBlock(i, {
|
|
@@ -4192,11 +4230,11 @@ function _sfc_render$1(e, t, n, o, r, s) {
|
|
|
4192
4230
|
}, null, 8, ["scriptStr"])) : createCommentVNode("", !0),
|
|
4193
4231
|
e.shouldRenderVariants ? (openBlock(), createElementBlock(Fragment$1, { key: 1 }, [
|
|
4194
4232
|
createVNode(a, {
|
|
4195
|
-
id: `variants-styles-${(
|
|
4233
|
+
id: `variants-styles-${(c = e.content) == null ? void 0 : c.id}`,
|
|
4196
4234
|
styles: e.hideVariantsStyleString
|
|
4197
4235
|
}, null, 8, ["id", "styles"]),
|
|
4198
4236
|
createVNode(i, { scriptStr: e.updateCookieAndStylesScriptStr }, null, 8, ["scriptStr"]),
|
|
4199
|
-
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.getVariants(e.content), (u,
|
|
4237
|
+
(openBlock(!0), createElementBlock(Fragment$1, null, renderList(e.getVariants(e.content), (u, d) => (openBlock(), createBlock(l, {
|
|
4200
4238
|
key: u.testVariationId,
|
|
4201
4239
|
content: u,
|
|
4202
4240
|
showContent: !1,
|
|
@@ -4315,7 +4353,7 @@ const ContentVariants = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sf
|
|
|
4315
4353
|
}
|
|
4316
4354
|
});
|
|
4317
4355
|
function _sfc_render(e, t, n, o, r, s) {
|
|
4318
|
-
var a, l,
|
|
4356
|
+
var a, l, c, u, d;
|
|
4319
4357
|
const i = resolveComponent("content-variants");
|
|
4320
4358
|
return openBlock(), createElementBlock("div", mergeProps({ class: e.className }, { ...e.filterAttrs(e.attributes, "v-on:", !1) }, toHandlers(e.filterAttrs(e.attributes, "v-on:", !0), !0)), [
|
|
4321
4359
|
createVNode(i, {
|
|
@@ -4330,9 +4368,9 @@ function _sfc_render(e, t, n, o, r, s) {
|
|
|
4330
4368
|
data: {
|
|
4331
4369
|
...(l = e.symbol) == null ? void 0 : l.data,
|
|
4332
4370
|
...e.builderContext.localState,
|
|
4333
|
-
...(u = (
|
|
4371
|
+
...(u = (c = e.contentToUse) == null ? void 0 : c.data) == null ? void 0 : u.state
|
|
4334
4372
|
},
|
|
4335
|
-
model: (
|
|
4373
|
+
model: (d = e.symbol) == null ? void 0 : d.model,
|
|
4336
4374
|
content: e.contentToUse,
|
|
4337
4375
|
linkComponent: e.builderLinkComponent,
|
|
4338
4376
|
blocksWrapper: "div",
|