@builder.io/sdk-vue 0.4.1 → 0.4.2
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/package.json +1 -1
- package/packages/_vue2/dist/{block-styles.69ca115c.js → block-styles.6a1d7394.js} +4 -4
- package/packages/_vue2/dist/{block-styles.18ca317b.cjs → block-styles.cacb4849.cjs} +1 -1
- package/packages/{_vue3/dist/css.7fe37cb4.js → _vue2/dist/css.49cc4003.js} +2 -2
- package/packages/{_vue3/dist/css.5cacc3c3.cjs → _vue2/dist/css.c26b7ab4.cjs} +1 -1
- package/packages/_vue2/dist/{evaluate.8238dbc9.js → evaluate.6ab6e7cb.js} +1 -1
- package/packages/_vue2/dist/{evaluate.cff086ca.cjs → evaluate.7d21bb04.cjs} +1 -1
- package/packages/_vue2/dist/{index.e2db82e0.js → index.2473a355.js} +39 -37
- package/packages/_vue2/dist/{index.c16f4cca.cjs → index.95d9006f.cjs} +4 -4
- package/packages/_vue2/dist/{render-block.0f23cd7e.js → render-block.22052bd8.js} +20 -33
- package/packages/_vue2/dist/render-block.9342f7b5.cjs +3 -0
- package/packages/_vue2/dist/{render-component.74280c04.js → render-component.ec485884.js} +3 -3
- package/packages/_vue2/dist/{render-component.e8047ef5.cjs → render-component.f3cccaa9.cjs} +1 -1
- package/packages/_vue2/dist/{render-content.672eabd9.js → render-content.a6b17a6c.js} +270 -271
- package/packages/_vue2/dist/render-content.d53085e5.cjs +1 -0
- package/packages/_vue2/dist/{render-inlined-styles.ac06208e.js → render-inlined-styles.2286ef7c.js} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.2c0cf85b.cjs → render-inlined-styles.b322c74a.cjs} +1 -1
- package/packages/_vue2/dist/render-repeated-block.253c96e6.cjs +1 -0
- package/packages/_vue2/dist/render-repeated-block.ac4f1559.js +38 -0
- package/packages/_vue2/dist/{render-styles.e6e62ba1.cjs → render-styles.0cb949b0.cjs} +2 -2
- package/packages/_vue2/dist/{render-styles.af4e2d5a.js → render-styles.a148b748.js} +2 -2
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +1 -1
- package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +3 -1
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +27 -5
- package/packages/_vue2/dist/src/components/render-content-variants/render-content-variants.vue.d.ts +3 -3
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/{block-styles.e3f09eb7.cjs → block-styles.5b949efb.cjs} +1 -1
- package/packages/_vue3/dist/{block-styles.7969d695.js → block-styles.e91165b8.js} +4 -4
- package/packages/{_vue2/dist/css.ce776b44.js → _vue3/dist/css.41ed2294.js} +2 -2
- package/packages/{_vue2/dist/css.24c082d4.cjs → _vue3/dist/css.627e21ae.cjs} +1 -1
- package/packages/_vue3/dist/{evaluate.975fa4d3.js → evaluate.0662f166.js} +1 -1
- package/packages/_vue3/dist/{evaluate.9a614eea.cjs → evaluate.da45a33b.cjs} +1 -1
- package/packages/_vue3/dist/{index.cdd37dcf.js → index.3a561c6a.js} +39 -38
- package/packages/_vue3/dist/{index.3f716812.cjs → index.3e17c057.cjs} +4 -4
- package/packages/_vue3/dist/render-block.20c07cb1.cjs +3 -0
- package/packages/_vue3/dist/render-block.e9a2cb71.js +273 -0
- package/packages/_vue3/dist/{render-component.788543b4.cjs → render-component.20ef18f7.cjs} +1 -1
- package/packages/_vue3/dist/{render-component.9bd5c435.js → render-component.afa60a7b.js} +3 -3
- package/packages/_vue3/dist/{render-content.0423df8b.js → render-content.20bd0f8d.js} +185 -186
- package/packages/_vue3/dist/render-content.e790eee5.cjs +1 -0
- package/packages/_vue3/dist/{render-inlined-styles.49a121f8.js → render-inlined-styles.0444f4fe.js} +1 -1
- package/packages/_vue3/dist/{render-inlined-styles.528fb5cd.cjs → render-inlined-styles.14d9ba36.cjs} +1 -1
- package/packages/_vue3/dist/render-repeated-block.5a245883.js +32 -0
- package/packages/_vue3/dist/render-repeated-block.75230844.cjs +1 -0
- package/packages/_vue3/dist/{render-styles.3411b577.js → render-styles.73c7ba5a.js} +2 -2
- package/packages/_vue3/dist/{render-styles.b4509dd3.cjs → render-styles.bd7475f8.cjs} +2 -2
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +1 -1
- package/packages/_vue3/dist/src/components/render-block/render-repeated-block.vue.d.ts +3 -1
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +36 -14
- package/packages/_vue3/dist/src/components/render-content-variants/render-content-variants.vue.d.ts +3 -3
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/render-block.954cc390.cjs +0 -3
- package/packages/_vue2/dist/render-content.702f0387.cjs +0 -1
- package/packages/_vue2/dist/render-repeated-block.5740965b.cjs +0 -1
- package/packages/_vue2/dist/render-repeated-block.c40e7c25.js +0 -45
- package/packages/_vue3/dist/render-block.348e561a.js +0 -286
- package/packages/_vue3/dist/render-block.d1c4ccaa.cjs +0 -3
- package/packages/_vue3/dist/render-content.17e9b187.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.04301799.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.35a0d813.js +0 -39
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as p } from "vue";
|
|
2
|
-
import { T as S, c as i, g as k, a as m, n as y } from "./index.
|
|
3
|
-
import { g as f, c as n } from "./css.
|
|
4
|
-
import "./evaluate.
|
|
5
|
-
const _ = () => import("./render-inlined-styles.
|
|
2
|
+
import { T as S, c as i, g as k, a as m, n as y } from "./index.2473a355.js";
|
|
3
|
+
import { g as f, c as n } from "./css.49cc4003.js";
|
|
4
|
+
import "./evaluate.6ab6e7cb.js";
|
|
5
|
+
const _ = () => import("./render-inlined-styles.2286ef7c.js").then((t) => t.default).catch((t) => {
|
|
6
6
|
throw console.error(
|
|
7
7
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",
|
|
8
8
|
t
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),s=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),s=require("./index.95d9006f.cjs"),r=require("./css.c26b7ab4.cjs");require("./evaluate.7d21bb04.cjs");const S=()=>Promise.resolve().then(()=>require("./render-inlined-styles.b322c74a.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",e),e}),y=h.defineComponent({name:"block-styles",components:{RenderInlinedStyles:S},props:["block","context"],data(){return{TARGET:s.TARGET}},computed:{useBlock(){return r.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0})},canShowBlock(){return s.checkIsDefined(this.useBlock.hide)?!this.useBlock.hide:s.checkIsDefined(this.useBlock.show)?this.useBlock.show:!0},css(){var a;const e=this.useBlock.responsiveStyles,t=this.context.content,o=s.getSizesForBreakpoints(((a=t==null?void 0:t.meta)==null?void 0:a.breakpoints)||{}),c=e==null?void 0:e.large,l=e==null?void 0:e.medium,i=e==null?void 0:e.small,n=this.useBlock.id;if(!n)return"";const u=c?r.createCssClass({className:n,styles:c}):"",d=l?r.createCssClass({className:n,styles:l,mediaQuery:s.getMaxWidthQueryForSize("medium",o)}):"",m=i?r.createCssClass({className:n,styles:i,mediaQuery:s.getMaxWidthQueryForSize("small",o)}):"";return[u,d,m].join(" ")}}});var k=function(){var t=this,o=t._self._c;return t._self._setupProxy,t.TARGET!=="reactNative"&&t.css&&t.canShowBlock?o("render-inlined-styles",{attrs:{styles:t.css}}):t._e()},p=[],f=s.normalizeComponent(y,k,p,!1,null,null,null,null);const _=f.exports;exports.default=_;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as u } from "./evaluate.
|
|
2
|
-
import { f as p, c as l } from "./index.
|
|
1
|
+
import { e as u } from "./evaluate.6ab6e7cb.js";
|
|
2
|
+
import { f as p, c as l } from "./index.2473a355.js";
|
|
3
3
|
const g = (e, t, n) => {
|
|
4
4
|
if (Object(e) !== e)
|
|
5
5
|
return e;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const f=require("./evaluate.7d21bb04.cjs"),a=require("./index.95d9006f.cjs"),p=(e,t,n)=>{if(Object(e)!==e)return e;const s=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return s.slice(0,-1).reduce((c,r,o)=>Object(c[r])===c[r]?c[r]:c[r]=Math.abs(Number(s[o+1]))>>0===+s[o+1]?[]:{},e)[s[s.length-1]]=n,e};const g=({block:e,context:t,localState:n,rootState:s,rootSetState:c})=>{if(!e.bindings)return e;const r=a.fastClone(e),o={...r,properties:{...r.properties},actions:{...r.actions}};for(const i in e.bindings){const l=e.bindings[i],d=f.evaluate({code:l,localState:n,rootState:s,rootSetState:c,context:t});p(o,i,d)}return o};function C({block:e,context:t,shouldEvaluateBindings:n,localState:s,rootState:c,rootSetState:r}){const o=e;return n?g({block:o,localState:s,rootState:c,rootSetState:r,context:t}):o}const S=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),u=e=>Object.entries(e).map(([n,s])=>{if(typeof s=="string")return`${S(n)}: ${s};`}).filter(a.checkIsDefined),v=e=>u(e).join(`
|
|
2
2
|
`),y=({mediaQuery:e,className:t,styles:n})=>{const s=`.${t} {
|
|
3
3
|
${v(n)}
|
|
4
4
|
}`;return e?`${e} {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./index.
|
|
1
|
+
"use strict";const t=require("./index.95d9006f.cjs");function f({code:n,context:r,localState:i,rootState:s,rootSetState:e,event:u,isExpression:w=!0}){if(n===""){console.warn("Skipping evaluation of empty code block.");return}const c={isEditing:t.isEditing(),isBrowser:t.isBrowser(),isServer:!t.isBrowser()},l=w&&!(n.includes(";")||n.includes(" return ")||n.trim().startsWith("return "))?`return (${n});`:n;try{return new Function("builder","Builder","state","context","event",l)(c,c,o(s,i,e),r,u)}catch(d){console.warn(`Builder custom code error:
|
|
2
2
|
While Evaluating:
|
|
3
3
|
`,l,`
|
|
4
4
|
`,d)}}function o(n,r,i){if(n===r)throw new Error("rootState === localState");return new Proxy(n,{get:(s,e)=>r&&e in r?r[e]:n[e],set:(s,e,u)=>{if(r&&e in r)throw new Error("Writing to local state is not allowed as it is read-only.");return n[e]=u,i==null||i(n),!0}})}exports.evaluate=f;
|
|
@@ -43,9 +43,9 @@ function y(e, t, n, r, o, s, i, u) {
|
|
|
43
43
|
} : o), c)
|
|
44
44
|
if (a.functional) {
|
|
45
45
|
a._injectStyles = c;
|
|
46
|
-
var
|
|
46
|
+
var _ = a.render;
|
|
47
47
|
a.render = function(m, d) {
|
|
48
|
-
return c.call(d),
|
|
48
|
+
return c.call(d), _(m, d);
|
|
49
49
|
};
|
|
50
50
|
} else {
|
|
51
51
|
var f = a.beforeCreate;
|
|
@@ -128,7 +128,7 @@ const De = ot.exports, A = (e) => JSON.parse(JSON.stringify(e)), M = {
|
|
|
128
128
|
"Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",
|
|
129
129
|
e
|
|
130
130
|
), e;
|
|
131
|
-
}), ct = () => import("./render-inlined-styles.
|
|
131
|
+
}), ct = () => import("./render-inlined-styles.2286ef7c.js").then((e) => e.default).catch((e) => {
|
|
132
132
|
throw console.error(
|
|
133
133
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",
|
|
134
134
|
e
|
|
@@ -287,7 +287,7 @@ const qe = ft.exports, mt = g({
|
|
|
287
287
|
var pt = function() {
|
|
288
288
|
var t = this, n = t._self._c;
|
|
289
289
|
return t._self._setupProxy, n("span", [t._t("default")], 2);
|
|
290
|
-
}, ht = [],
|
|
290
|
+
}, ht = [], _t = /* @__PURE__ */ y(
|
|
291
291
|
mt,
|
|
292
292
|
pt,
|
|
293
293
|
ht,
|
|
@@ -297,11 +297,11 @@ var pt = function() {
|
|
|
297
297
|
null,
|
|
298
298
|
null
|
|
299
299
|
);
|
|
300
|
-
const Je =
|
|
300
|
+
const Je = _t.exports;
|
|
301
301
|
function V(e) {
|
|
302
302
|
return e.replace(/http(s)?:/, "");
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function bt(e = "", t, n) {
|
|
305
305
|
const r = new RegExp("([?&])" + t + "=.*?(&|$)", "i"), o = e.indexOf("?") !== -1 ? "&" : "?";
|
|
306
306
|
return e.match(r) ? e.replace(r, "$1" + t + "=" + encodeURIComponent(n) + "$2") : e + o + t + "=" + encodeURIComponent(n);
|
|
307
307
|
}
|
|
@@ -326,7 +326,7 @@ function R(e) {
|
|
|
326
326
|
if (e.match(/builder\.io/)) {
|
|
327
327
|
let n = e;
|
|
328
328
|
const r = Number(e.split("?width=")[1]);
|
|
329
|
-
return isNaN(r) || (n = `${n} ${r}w`), t.filter((o) => o !== r).map((o) => `${
|
|
329
|
+
return isNaN(r) || (n = `${n} ${r}w`), t.filter((o) => o !== r).map((o) => `${bt(e, "width", o)} ${o}w`).concat([n]).join(", ");
|
|
330
330
|
}
|
|
331
331
|
return e.match(/cdn\.shopify\.com/) ? t.map((n) => [gt(e, `${n}x${n}`), n]).filter(([n]) => !!n).map(([n, r]) => `${n} ${r}w`).concat([e]).join(", ") : e;
|
|
332
332
|
}
|
|
@@ -418,12 +418,12 @@ function xt() {
|
|
|
418
418
|
function $() {
|
|
419
419
|
return xt() && window.location.search.indexOf("builder.frameEditing=") !== -1;
|
|
420
420
|
}
|
|
421
|
-
const Ct = () => import("./block-styles.
|
|
421
|
+
const Ct = () => import("./block-styles.6a1d7394.js").then((e) => e.default).catch((e) => {
|
|
422
422
|
throw console.error(
|
|
423
423
|
"Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",
|
|
424
424
|
e
|
|
425
425
|
), e;
|
|
426
|
-
}), wt = () => import("./render-block.
|
|
426
|
+
}), wt = () => import("./render-block.22052bd8.js").then((e) => e.default).catch((e) => {
|
|
427
427
|
throw console.error(
|
|
428
428
|
"Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",
|
|
429
429
|
e
|
|
@@ -487,6 +487,8 @@ var Tt = function() {
|
|
|
487
487
|
return t.onClick();
|
|
488
488
|
}, mouseenter: function(r) {
|
|
489
489
|
return t.onMouseEnter();
|
|
490
|
+
}, keypress: function(r) {
|
|
491
|
+
return t.onClick();
|
|
490
492
|
} } }, [t.blocks ? t._l(t.blocks, function(r, o) {
|
|
491
493
|
return n("render-block", { key: "render-block-" + r.id, attrs: { block: r, context: t.builderContext } });
|
|
492
494
|
}) : t._e(), t.blocks ? t._l(t.blocks, function(r, o) {
|
|
@@ -498,7 +500,7 @@ var Tt = function() {
|
|
|
498
500
|
Rt,
|
|
499
501
|
!1,
|
|
500
502
|
null,
|
|
501
|
-
"
|
|
503
|
+
"8f1a25fb",
|
|
502
504
|
null,
|
|
503
505
|
null
|
|
504
506
|
);
|
|
@@ -729,16 +731,16 @@ const P = "builder.", Xt = "options.", Qt = (e) => {
|
|
|
729
731
|
includeRefs: u = !0,
|
|
730
732
|
enrich: a,
|
|
731
733
|
locale: c,
|
|
732
|
-
apiVersion:
|
|
734
|
+
apiVersion: _ = te
|
|
733
735
|
} = e;
|
|
734
736
|
if (!i)
|
|
735
737
|
throw new Error("Missing API key");
|
|
736
|
-
if (!["v2", "v3"].includes(
|
|
738
|
+
if (!["v2", "v3"].includes(_))
|
|
737
739
|
throw new Error(
|
|
738
|
-
`Invalid apiVersion: expected 'v2' or 'v3', received '${
|
|
740
|
+
`Invalid apiVersion: expected 'v2' or 'v3', received '${_}'`
|
|
739
741
|
);
|
|
740
742
|
const f = new URL(
|
|
741
|
-
`https://cdn.builder.io/api/${
|
|
743
|
+
`https://cdn.builder.io/api/${_}/content/${s}?apiKey=${i}&limit=${t}&noTraverse=${o}&includeRefs=${u}${c ? `&locale=${c}` : ""}${a ? `&enrich=${a}` : ""}`
|
|
742
744
|
), l = {
|
|
743
745
|
...Zt(),
|
|
744
746
|
...D(e.options || {})
|
|
@@ -747,8 +749,8 @@ const P = "builder.", Xt = "options.", Qt = (e) => {
|
|
|
747
749
|
f.searchParams.set(d, String(m[d]));
|
|
748
750
|
if (n && f.searchParams.set("userAttributes", JSON.stringify(n)), r) {
|
|
749
751
|
const d = I({ query: r });
|
|
750
|
-
for (const
|
|
751
|
-
f.searchParams.set(
|
|
752
|
+
for (const b in d)
|
|
753
|
+
f.searchParams.set(b, JSON.stringify(d[b]));
|
|
752
754
|
}
|
|
753
755
|
return f;
|
|
754
756
|
}, q = (e) => "results" in e;
|
|
@@ -781,7 +783,7 @@ async function oe(e) {
|
|
|
781
783
|
return v.error("Error fetching data. ", t), null;
|
|
782
784
|
}
|
|
783
785
|
}
|
|
784
|
-
const se = () => import("./render-content.
|
|
786
|
+
const se = () => import("./render-content.a6b17a6c.js").then((e) => e.default).catch((e) => {
|
|
785
787
|
throw console.error(
|
|
786
788
|
"Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
|
|
787
789
|
e
|
|
@@ -957,34 +959,34 @@ var he = function() {
|
|
|
957
959
|
objectPosition: t.position,
|
|
958
960
|
borderRadius: 1
|
|
959
961
|
}, attrs: { src: t.video || "no-src", poster: t.posterImage } }, "video", t.spreadProps, !1));
|
|
960
|
-
},
|
|
962
|
+
}, _e = [], be = /* @__PURE__ */ y(
|
|
961
963
|
pe,
|
|
962
964
|
he,
|
|
963
|
-
|
|
965
|
+
_e,
|
|
964
966
|
!1,
|
|
965
967
|
null,
|
|
966
968
|
null,
|
|
967
969
|
null,
|
|
968
970
|
null
|
|
969
971
|
);
|
|
970
|
-
const tn =
|
|
972
|
+
const tn = be.exports, w = (e) => Object.values((e == null ? void 0 : e.variations) || {}), j = ({
|
|
971
973
|
canTrack: e,
|
|
972
974
|
content: t
|
|
973
975
|
}) => !(!(w(t).length > 0) || !e || h());
|
|
974
976
|
function ge(e, t, n) {
|
|
975
977
|
function r() {
|
|
976
|
-
function i(m, d,
|
|
978
|
+
function i(m, d, b) {
|
|
977
979
|
let S = "";
|
|
978
|
-
if (
|
|
980
|
+
if (b) {
|
|
979
981
|
const p = new Date();
|
|
980
|
-
p.setTime(p.getTime() +
|
|
982
|
+
p.setTime(p.getTime() + b * 24 * 60 * 60 * 1e3), S = "; expires=" + p.toUTCString();
|
|
981
983
|
}
|
|
982
984
|
document.cookie = m + "=" + (d || "") + S + "; path=/; Secure; SameSite=None";
|
|
983
985
|
}
|
|
984
986
|
function u(m) {
|
|
985
|
-
const d = m + "=",
|
|
986
|
-
for (let S = 0; S <
|
|
987
|
-
let p =
|
|
987
|
+
const d = m + "=", b = document.cookie.split(";");
|
|
988
|
+
for (let S = 0; S < b.length; S++) {
|
|
989
|
+
let p = b[S];
|
|
988
990
|
for (; p.charAt(0) === " "; )
|
|
989
991
|
p = p.substring(1, p.length);
|
|
990
992
|
if (p.indexOf(d) === 0)
|
|
@@ -992,14 +994,14 @@ function ge(e, t, n) {
|
|
|
992
994
|
}
|
|
993
995
|
return null;
|
|
994
996
|
}
|
|
995
|
-
const a = `builder.tests.${e}`, c = u(a),
|
|
996
|
-
if (c &&
|
|
997
|
+
const a = `builder.tests.${e}`, c = u(a), _ = t.map((m) => m.id).concat(e);
|
|
998
|
+
if (c && _.includes(c))
|
|
997
999
|
return c;
|
|
998
1000
|
let f = 0;
|
|
999
1001
|
const l = Math.random();
|
|
1000
1002
|
for (let m = 0; m < t.length; m++) {
|
|
1001
|
-
const d = t[m],
|
|
1002
|
-
if (f +=
|
|
1003
|
+
const d = t[m], b = d.testRatio;
|
|
1004
|
+
if (f += b, l < f)
|
|
1003
1005
|
return i(a, d.id), d.id;
|
|
1004
1006
|
}
|
|
1005
1007
|
return i(a, e), e;
|
|
@@ -1023,9 +1025,9 @@ function ye(e, t, n) {
|
|
|
1023
1025
|
if (!navigator.cookieEnabled)
|
|
1024
1026
|
return;
|
|
1025
1027
|
function r(a) {
|
|
1026
|
-
const c = a + "=",
|
|
1027
|
-
for (let f = 0; f <
|
|
1028
|
-
let l =
|
|
1028
|
+
const c = a + "=", _ = document.cookie.split(";");
|
|
1029
|
+
for (let f = 0; f < _.length; f++) {
|
|
1030
|
+
let l = _[f];
|
|
1029
1031
|
for (; l.charAt(0) === " "; )
|
|
1030
1032
|
l = l.substring(1, l.length);
|
|
1031
1033
|
if (l.indexOf(c) === 0)
|
|
@@ -1058,12 +1060,12 @@ const J = (e) => e === "react" || e === "reactNative" || e === "vue3" || e === "
|
|
|
1058
1060
|
parentContentId: e,
|
|
1059
1061
|
contentId: t
|
|
1060
1062
|
}) => `
|
|
1061
|
-
${X}("${t}", "${e}", ${J})`, Se = () => import("./render-content.
|
|
1063
|
+
${X}("${t}", "${e}", ${J})`, Se = () => import("./render-content.a6b17a6c.js").then((e) => e.default).catch((e) => {
|
|
1062
1064
|
throw console.error(
|
|
1063
1065
|
"Error while attempting to dynamically import component RenderContent at ../render-content/render-content.vue",
|
|
1064
1066
|
e
|
|
1065
1067
|
), e;
|
|
1066
|
-
}), ke = () => import("./render-inlined-styles.
|
|
1068
|
+
}), ke = () => import("./render-inlined-styles.2286ef7c.js").then((e) => e.default).catch((e) => {
|
|
1067
1069
|
throw console.error(
|
|
1068
1070
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",
|
|
1069
1071
|
e
|
|
@@ -1350,9 +1352,9 @@ export {
|
|
|
1350
1352
|
Ze as e,
|
|
1351
1353
|
A as f,
|
|
1352
1354
|
st as g,
|
|
1353
|
-
|
|
1355
|
+
en as h,
|
|
1354
1356
|
$ as i,
|
|
1355
|
-
|
|
1357
|
+
on as j,
|
|
1356
1358
|
E as k,
|
|
1357
1359
|
v as l,
|
|
1358
1360
|
sn as m,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const y=require("vue"),dt=y.defineComponent({name:"builder-button",props:["attributes","text","link","openLinkInNewTab"],methods:{filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(o=>{if(!t[o])return!1;const s=o.startsWith(r);return n?s:!s}).reduce((o,s)=>({...o,[s.replace(r,"")]:t[s]}),{})},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});function b(e,t,n,r,o,s,i,u){var a=typeof e=="function"?e.options:e;t&&(a.render=t,a.staticRenderFns=n,a._compiled=!0),r&&(a.functional=!0),s&&(a._scopeId="data-v-"+s);var c;if(i?(c=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),o&&o.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(i)},a._ssrRegister=c):o&&(c=u?function(){o.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(a.functional){a._injectStyles=c;var _=a.render;a.render=function(m,d){return c.call(d),_(m,d)}}else{var f=a.beforeCreate;a.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:a}}var ft=function(){var t=this,n=t._self._c;return t._self._setupProxy,t.link?n("a",t._g(t._b({attrs:{role:"button",href:t.link,target:t.openLinkInNewTab?"_blank":void 0}},"a",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[t._v(" "+t._s(t.text)+" ")]):n("button",t._g(t._b({class:t._classStringToObject(t.attributes.class+" button-2fnk003dqad")},"button",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[t._v(" "+t._s(t.text)+" ")])},mt=[],pt=b(dt,ft,mt,!1,null,"7e3d619b",null,null);const ht=pt.exports,R=e=>JSON.parse(JSON.stringify(e)),M={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},bt=(e,t=M)=>`@media (max-width: ${t[e].max}px)`,U=({small:e,medium:t})=>{const n=R(M);if(!e||!t)return n;const r=Math.floor(e/2);n.small={max:e,min:r,default:r+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n},C="vue2",_t=Symbol(),I={Builder:{content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,registeredComponents:{},inheritedStyles:{}},key:_t},gt=()=>Promise.resolve().then(()=>L).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",e),e}),yt=()=>Promise.resolve().then(()=>require("./render-inlined-styles.
|
|
1
|
+
"use strict";const y=require("vue"),dt=y.defineComponent({name:"builder-button",props:["attributes","text","link","openLinkInNewTab"],methods:{filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(o=>{if(!t[o])return!1;const s=o.startsWith(r);return n?s:!s}).reduce((o,s)=>({...o,[s.replace(r,"")]:t[s]}),{})},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});function b(e,t,n,r,o,s,i,u){var a=typeof e=="function"?e.options:e;t&&(a.render=t,a.staticRenderFns=n,a._compiled=!0),r&&(a.functional=!0),s&&(a._scopeId="data-v-"+s);var c;if(i?(c=function(l){l=l||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!l&&typeof __VUE_SSR_CONTEXT__<"u"&&(l=__VUE_SSR_CONTEXT__),o&&o.call(this,l),l&&l._registeredComponents&&l._registeredComponents.add(i)},a._ssrRegister=c):o&&(c=u?function(){o.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(a.functional){a._injectStyles=c;var _=a.render;a.render=function(m,d){return c.call(d),_(m,d)}}else{var f=a.beforeCreate;a.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:a}}var ft=function(){var t=this,n=t._self._c;return t._self._setupProxy,t.link?n("a",t._g(t._b({attrs:{role:"button",href:t.link,target:t.openLinkInNewTab?"_blank":void 0}},"a",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[t._v(" "+t._s(t.text)+" ")]):n("button",t._g(t._b({class:t._classStringToObject(t.attributes.class+" button-2fnk003dqad")},"button",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[t._v(" "+t._s(t.text)+" ")])},mt=[],pt=b(dt,ft,mt,!1,null,"7e3d619b",null,null);const ht=pt.exports,R=e=>JSON.parse(JSON.stringify(e)),M={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},bt=(e,t=M)=>`@media (max-width: ${t[e].max}px)`,U=({small:e,medium:t})=>{const n=R(M);if(!e||!t)return n;const r=Math.floor(e/2);n.small={max:e,min:r,default:r+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n},C="vue2",_t=Symbol(),I={Builder:{content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,registeredComponents:{},inheritedStyles:{}},key:_t},gt=()=>Promise.resolve().then(()=>L).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",e),e}),yt=()=>Promise.resolve().then(()=>require("./render-inlined-styles.b322c74a.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",e),e}),vt=y.defineComponent({name:"builder-columns",components:{RenderInlinedStyles:yt,RenderBlocks:gt},props:["space","columns","stackColumnsAt","reverseColumnsWhenStacked","builderBlock"],data(){return{gutterSize:typeof this.space=="number"?this.space||0:20,cols:this.columns||[],stackAt:this.stackColumnsAt||"tablet",flexDir:this.stackColumnsAt==="never"?"row":this.reverseColumnsWhenStacked?"column-reverse":"column",TARGET:C}},inject:{builderContext:I.key},computed:{columnsCssVars(){return{"--flex-dir":this.flexDir,"--flex-dir-tablet":this.getTabletStyle({stackedStyle:this.flexDir,desktopStyle:"row"})}},columnsStyles(){return`
|
|
2
2
|
@media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
|
|
3
3
|
.${this.builderBlock.id}-breakpoints {
|
|
4
4
|
flex-direction: var(--flex-dir-tablet);
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
|
-
`}},methods:{getWidth(e){var t;return((t=this.cols[e])==null?void 0:t.width)||100/this.cols.length},getColumnCssWidth(e){const t=this.gutterSize*(this.cols.length-1)/this.cols.length;return`calc(${this.getWidth(e)}% - ${t}px)`},getTabletStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="tablet"?e:t},getMobileStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="never"?t:e},columnCssVars(e){const t=e===0?0:this.gutterSize,n=this.getColumnCssWidth(e),r=`${t}px`,o="100%",s=0;return{width:n,"margin-left":r,"--column-width-mobile":this.getMobileStyle({stackedStyle:o,desktopStyle:n}),"--column-margin-left-mobile":this.getMobileStyle({stackedStyle:s,desktopStyle:r}),"--column-width-tablet":this.getTabletStyle({stackedStyle:o,desktopStyle:n}),"--column-margin-left-tablet":this.getTabletStyle({stackedStyle:s,desktopStyle:r})}},getWidthForBreakpointSize(e){var n,r;return U(((r=(n=this.builderContext.content)==null?void 0:n.meta)==null?void 0:r.breakpoints)||{})[e].max},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var St=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{class:t._classStringToObject(`builder-columns ${t.builderBlock.id}-breakpoints div-t9spj7joih`),style:t.columnsCssVars,attrs:{dataSet:{"builder-block-name":"builder-columns"}}},[t.TARGET!=="reactNative"?[n("render-inlined-styles",{attrs:{styles:t.columnsStyles}})]:t._e(),t._l(t.columns,function(r,o){return n("div",{key:o,staticClass:"builder-column div-t9spj7joih-2",style:t.columnCssVars(o),attrs:{dataSet:{"builder-block-name":"builder-column"}}},[n("render-blocks",{attrs:{blocks:r.blocks,path:`component.options.columns.${o}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"}}})],1)})],2)},kt=[],xt=b(vt,St,kt,!1,null,"ea80c645",null,null);const Ct=xt.exports,wt=y.defineComponent({name:"builder-fragment-component",props:[]});var $t=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("span",[t._t("default")],2)},Tt=[],Rt=b(wt,$t,Tt,!1,null,null,null,null);const It=Rt.exports;function O(e){return e.replace(/http(s)?:/,"")}function Et(e="",t,n){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=e.indexOf("?")!==-1?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+o+t+"="+encodeURIComponent(n)}function Pt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return O(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const r=e.split(n[0]),o=n[3],s=t.match("x")?t:`${t}x`;return O(`${r[0]}_${s}${o}`)}return null}function E(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const r=Number(e.split("?width=")[1]);return isNaN(r)||(n=`${n} ${r}w`),t.filter(o=>o!==r).map(o=>`${Et(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Pt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,r])=>`${n} ${r}w`).concat([e]).join(", "):e}const At=y.defineComponent({name:"builder-image",props:["image","src","srcset","noWebp","aspectRatio","altText","backgroundPosition","backgroundSize","className","sizes","builderBlock","fitContent"],computed:{srcSetToUse(){var n;const t=this.image||this.src;if(!t||!(t.match(/builder\.io/)||t.match(/cdn\.shopify\.com/)))return this.srcset;if(this.srcset&&((n=this.image)==null?void 0:n.includes("builder.io/api/v1/image"))){if(!this.srcset.includes(this.image.split("?")[0]))return console.debug("Removed given srcset"),E(t)}else if(this.image&&!this.srcset)return E(t);return E(t)},webpSrcSet(){var e;return((e=this.srcSetToUse)==null?void 0:e.match(/builder\.io/))&&!this.noWebp?this.srcSetToUse.replace(/\?/g,"?format=webp&"):""},aspectRatioCss(){const e={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return this.aspectRatio?e:void 0}},methods:{_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var Ot=function(){var r,o,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",[n("picture",[t.webpSrcSet?[n("source",{attrs:{type:"image/webp",srcset:t.webpSrcSet}})]:t._e(),n("img",{class:t._classStringToObject("builder-image"+(t.className?" "+t.className:"")+" img-1pl23ac79ld"),style:{objectPosition:t.backgroundPosition||"center",objectFit:t.backgroundSize||"cover",...t.aspectRatioCss},attrs:{loading:"lazy",alt:t.altText,role:t.altText?"presentation":void 0,src:t.image,srcset:t.srcSetToUse,sizes:t.sizes}})],2),t.aspectRatio&&!(((o=(r=t.builderBlock)==null?void 0:r.children)==null?void 0:o.length)&&t.fitContent)?[n("div",{staticClass:"builder-image-sizer div-1pl23ac79ld",style:{paddingTop:t.aspectRatio*100+"%"}})]:t._e(),((i=(s=t.builderBlock)==null?void 0:s.children)==null?void 0:i.length)&&t.fitContent?[t._t("default")]:t._e(),!t.fitContent&&t.children?[n("div",{staticClass:"div-1pl23ac79ld-2"},[t._t("default")],2)]:t._e()],2)},Vt=[],Bt=b(At,Ot,Vt,!1,null,"7eca4996",null,null);const jt=Bt.exports;function p(){return typeof window<"u"&&typeof document<"u"}function Nt(){return p()&&window.self!==window.top}function x(){return Nt()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Ft=()=>Promise.resolve().then(()=>require("./block-styles.18ca317b.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",e),e}),Mt=()=>Promise.resolve().then(()=>require("./render-block.954cc390.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",e),e}),Ut=y.defineComponent({name:"render-blocks",components:{RenderBlock:Mt,BlockStyles:Ft},props:["blocks","parent","path","styleProp"],inject:{builderContext:I.key},computed:{className(){var e;return"builder-blocks"+((e=this.blocks)!=null&&e.length?"":" no-blocks")}},methods:{onClick(){var e,t;x()&&!((e=this.blocks)!=null&&e.length)&&((t=window.parent)==null||t.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},onMouseEnter(){var e,t;x()&&!((e=this.blocks)!=null&&e.length)&&((t=window.parent)==null||t.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var Wt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{class:t._classStringToObject(t.className+" div-21azgz5avex"),style:t.styleProp,attrs:{"builder-path":t.path,"builder-parent-id":t.parent,dataSet:{class:t.className}},on:{click:function(r){return t.onClick()},mouseenter:function(r){return t.onMouseEnter()}}},[t.blocks?t._l(t.blocks,function(r,o){return n("render-block",{key:"render-block-"+r.id,attrs:{block:r,context:t.builderContext}})}):t._e(),t.blocks?t._l(t.blocks,function(r,o){return n("block-styles",{key:"block-style-"+r.id,attrs:{block:r,context:t.builderContext}})}):t._e()],2)},Lt=[],zt=b(Ut,Wt,Lt,!1,null,"23bbd49b",null,null);const W=zt.exports,L=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"})),Kt=y.defineComponent({name:"builder-section-component",props:["maxWidth","attributes"],methods:{filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(o=>{if(!t[o])return!1;const s=o.startsWith(r);return n?s:!s}).reduce((o,s)=>({...o,[s.replace(r,"")]:t[s]}),{})}}});var Gt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("section",t._g(t._b({style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:t.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},"section",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[t._t("default")],2)},qt=[],Dt=b(Kt,Gt,qt,!1,null,null,null,null);const Ht=Dt.exports,w="[Builder.io]: ",v={log:(...e)=>console.log(w,...e),error:(...e)=>console.error(w,...e),warn:(...e)=>console.warn(w,...e),debug:(...e)=>console.debug(w,...e)},S=e=>e!=null,Jt=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},z=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(r=>r.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(r){v.warn("[COOKIE] GET error: ",(r==null?void 0:r.message)||r);return}},K=async e=>z(e),Qt=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(S).join("; "),Xt=[["secure",""],["SameSite","None"]],Yt=({name:e,value:t,expires:n})=>{const o=(p()?location.protocol==="https:":!0)?Xt:[[]],s=n?[["expires",n.toUTCString()]]:[[]],i=[[e,t],...s,["path","/"],["domain",Jt(window.location.hostname)],...o];return Qt(i)},G=async({name:e,value:t,expires:n,canTrack:r})=>{try{if(!r)return;const o=Yt({name:e,value:t,expires:n});document.cookie=o}catch(o){v.warn("[COOKIE] SET error: ",(o==null?void 0:o.message)||o)}},Zt="builder.tests",A=e=>`${Zt}.${e}`,te=({contentId:e})=>K({name:A(e),canTrack:!0}),ee=({contentId:e})=>z({name:A(e),canTrack:!0}),ne=({contentId:e,value:t})=>G({name:A(e),value:t,canTrack:!0}),q=e=>S(e.id)&&S(e.variations)&&Object.keys(e.variations).length>0,re=({id:e,variations:t})=>{var o;let n=0;const r=Math.random();for(const s in t){const i=(o=t[s])==null?void 0:o.testRatio;if(n+=i,r<n)return s}return e},D=e=>{const t=re(e);return ne({contentId:e.id,value:t}).catch(n=>{v.error("could not store A/B test variation: ",n)}),t},H=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},oe=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!q(e))return e;const n=ee({contentId:e.id})||D({variations:e.variations,id:e.id}),r=H({item:e,testGroupId:n});return{...e,...r}},se=async({item:e,canTrack:t})=>{if(!t||!q(e))return e;const r=await te({contentId:e.id})||D({variations:e.variations,id:e.id}),o=H({item:e,testGroupId:r});return{...e,...o}},$=e=>S(e)?e:!0;function ie(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function ae(){const e=ie().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
26
|
-
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const J=ae();function P(e,t=null,n="."){return Object.keys(e).reduce((r,o)=>{const s=e[o],i=[t,o].filter(Boolean).join(n);return[typeof s=="object",s!==null,!(Array.isArray(s)&&s.length===0)].every(Boolean)?{...r,...P(s,i,n)}:{...r,[i]:s}},{})}const V="builder.",ce="options.",le=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},Q=e=>{if(!e)return{};const t=X(e),n={};return Object.keys(t).forEach(r=>{if(r.startsWith(V)){const o=r.replace(V,"").replace(ce,"");n[o]=t[r]}}),n},ue=()=>{if(!p())return{};const e=new URLSearchParams(window.location.search);return Q(e)},X=e=>e instanceof URLSearchParams?le(e):e,de="v3",Y=e=>{const{limit:t=30,userAttributes:n,query:r,noTraverse:o=!1,model:s,apiKey:i,includeRefs:u=!0,enrich:a,locale:c,apiVersion:_=de}=e;if(!i)throw new Error("Missing API key");if(!["v2","v3"].includes(_))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${_}'`);const f=new URL(`https://cdn.builder.io/api/${_}/content/${s}?apiKey=${i}&limit=${t}&noTraverse=${o}&includeRefs=${u}${c?`&locale=${c}`:""}${a?`&enrich=${a}`:""}`),l={...ue(),...X(e.options||{})},m=P(l);for(const d in m)f.searchParams.set(d,String(m[d]));if(n&&f.searchParams.set("userAttributes",JSON.stringify(n)),r){const d=P({query:r});for(const g in d)f.searchParams.set(g,JSON.stringify(d[g]))}return f},Z=e=>"results"in e;async function tt(e){const t=await nt({...e,limit:1});return t&&Z(t)&&t.results[0]||null}const fe=async e=>{const t=Y(e);return await(await J(t.href)).json()},et=async(e,t)=>{const n=$(e.canTrack);if(!n||!(p()||C==="reactNative"))return t;try{const r=[];for(const o of t.results)r.push(await se({item:o,canTrack:n}));t.results=r}catch(r){v.error("Could not process A/B tests. ",r)}return t};async function nt(e){try{const t=Y(e),n=await fe(e);return Z(n)?et(e,n):(v.error("Error fetching data. ",{url:t,content:n,options:e}),n)}catch(t){return v.error("Error fetching data. ",t),null}}const me=()=>Promise.resolve().then(()=>require("./render-content.
|
|
25
|
+
`}},methods:{getWidth(e){var t;return((t=this.cols[e])==null?void 0:t.width)||100/this.cols.length},getColumnCssWidth(e){const t=this.gutterSize*(this.cols.length-1)/this.cols.length;return`calc(${this.getWidth(e)}% - ${t}px)`},getTabletStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="tablet"?e:t},getMobileStyle({stackedStyle:e,desktopStyle:t}){return this.stackAt==="never"?t:e},columnCssVars(e){const t=e===0?0:this.gutterSize,n=this.getColumnCssWidth(e),r=`${t}px`,o="100%",s=0;return{width:n,"margin-left":r,"--column-width-mobile":this.getMobileStyle({stackedStyle:o,desktopStyle:n}),"--column-margin-left-mobile":this.getMobileStyle({stackedStyle:s,desktopStyle:r}),"--column-width-tablet":this.getTabletStyle({stackedStyle:o,desktopStyle:n}),"--column-margin-left-tablet":this.getTabletStyle({stackedStyle:s,desktopStyle:r})}},getWidthForBreakpointSize(e){var n,r;return U(((r=(n=this.builderContext.content)==null?void 0:n.meta)==null?void 0:r.breakpoints)||{})[e].max},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var St=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{class:t._classStringToObject(`builder-columns ${t.builderBlock.id}-breakpoints div-t9spj7joih`),style:t.columnsCssVars,attrs:{dataSet:{"builder-block-name":"builder-columns"}}},[t.TARGET!=="reactNative"?[n("render-inlined-styles",{attrs:{styles:t.columnsStyles}})]:t._e(),t._l(t.columns,function(r,o){return n("div",{key:o,staticClass:"builder-column div-t9spj7joih-2",style:t.columnCssVars(o),attrs:{dataSet:{"builder-block-name":"builder-column"}}},[n("render-blocks",{attrs:{blocks:r.blocks,path:`component.options.columns.${o}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"}}})],1)})],2)},kt=[],xt=b(vt,St,kt,!1,null,"ea80c645",null,null);const Ct=xt.exports,wt=y.defineComponent({name:"builder-fragment-component",props:[]});var $t=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("span",[t._t("default")],2)},Tt=[],Rt=b(wt,$t,Tt,!1,null,null,null,null);const It=Rt.exports;function O(e){return e.replace(/http(s)?:/,"")}function Et(e="",t,n){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=e.indexOf("?")!==-1?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+o+t+"="+encodeURIComponent(n)}function Pt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return O(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const r=e.split(n[0]),o=n[3],s=t.match("x")?t:`${t}x`;return O(`${r[0]}_${s}${o}`)}return null}function E(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const r=Number(e.split("?width=")[1]);return isNaN(r)||(n=`${n} ${r}w`),t.filter(o=>o!==r).map(o=>`${Et(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Pt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,r])=>`${n} ${r}w`).concat([e]).join(", "):e}const At=y.defineComponent({name:"builder-image",props:["image","src","srcset","noWebp","aspectRatio","altText","backgroundPosition","backgroundSize","className","sizes","builderBlock","fitContent"],computed:{srcSetToUse(){var n;const t=this.image||this.src;if(!t||!(t.match(/builder\.io/)||t.match(/cdn\.shopify\.com/)))return this.srcset;if(this.srcset&&((n=this.image)==null?void 0:n.includes("builder.io/api/v1/image"))){if(!this.srcset.includes(this.image.split("?")[0]))return console.debug("Removed given srcset"),E(t)}else if(this.image&&!this.srcset)return E(t);return E(t)},webpSrcSet(){var e;return((e=this.srcSetToUse)==null?void 0:e.match(/builder\.io/))&&!this.noWebp?this.srcSetToUse.replace(/\?/g,"?format=webp&"):""},aspectRatioCss(){const e={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return this.aspectRatio?e:void 0}},methods:{_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var Ot=function(){var r,o,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",[n("picture",[t.webpSrcSet?[n("source",{attrs:{type:"image/webp",srcset:t.webpSrcSet}})]:t._e(),n("img",{class:t._classStringToObject("builder-image"+(t.className?" "+t.className:"")+" img-1pl23ac79ld"),style:{objectPosition:t.backgroundPosition||"center",objectFit:t.backgroundSize||"cover",...t.aspectRatioCss},attrs:{loading:"lazy",alt:t.altText,role:t.altText?"presentation":void 0,src:t.image,srcset:t.srcSetToUse,sizes:t.sizes}})],2),t.aspectRatio&&!(((o=(r=t.builderBlock)==null?void 0:r.children)==null?void 0:o.length)&&t.fitContent)?[n("div",{staticClass:"builder-image-sizer div-1pl23ac79ld",style:{paddingTop:t.aspectRatio*100+"%"}})]:t._e(),((i=(s=t.builderBlock)==null?void 0:s.children)==null?void 0:i.length)&&t.fitContent?[t._t("default")]:t._e(),!t.fitContent&&t.children?[n("div",{staticClass:"div-1pl23ac79ld-2"},[t._t("default")],2)]:t._e()],2)},Vt=[],Bt=b(At,Ot,Vt,!1,null,"7eca4996",null,null);const jt=Bt.exports;function p(){return typeof window<"u"&&typeof document<"u"}function Nt(){return p()&&window.self!==window.top}function x(){return Nt()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Ft=()=>Promise.resolve().then(()=>require("./block-styles.cacb4849.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",e),e}),Mt=()=>Promise.resolve().then(()=>require("./render-block.9342f7b5.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",e),e}),Ut=y.defineComponent({name:"render-blocks",components:{RenderBlock:Mt,BlockStyles:Ft},props:["blocks","parent","path","styleProp"],inject:{builderContext:I.key},computed:{className(){var e;return"builder-blocks"+((e=this.blocks)!=null&&e.length?"":" no-blocks")}},methods:{onClick(){var e,t;x()&&!((e=this.blocks)!=null&&e.length)&&((t=window.parent)==null||t.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},onMouseEnter(){var e,t;x()&&!((e=this.blocks)!=null&&e.length)&&((t=window.parent)==null||t.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var Wt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("div",{class:t._classStringToObject(t.className+" div-21azgz5avex"),style:t.styleProp,attrs:{"builder-path":t.path,"builder-parent-id":t.parent,dataSet:{class:t.className}},on:{click:function(r){return t.onClick()},mouseenter:function(r){return t.onMouseEnter()},keypress:function(r){return t.onClick()}}},[t.blocks?t._l(t.blocks,function(r,o){return n("render-block",{key:"render-block-"+r.id,attrs:{block:r,context:t.builderContext}})}):t._e(),t.blocks?t._l(t.blocks,function(r,o){return n("block-styles",{key:"block-style-"+r.id,attrs:{block:r,context:t.builderContext}})}):t._e()],2)},Lt=[],zt=b(Ut,Wt,Lt,!1,null,"8f1a25fb",null,null);const W=zt.exports,L=Object.freeze(Object.defineProperty({__proto__:null,default:W},Symbol.toStringTag,{value:"Module"})),Kt=y.defineComponent({name:"builder-section-component",props:["maxWidth","attributes"],methods:{filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(o=>{if(!t[o])return!1;const s=o.startsWith(r);return n?s:!s}).reduce((o,s)=>({...o,[s.replace(r,"")]:t[s]}),{})}}});var Gt=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("section",t._g(t._b({style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:t.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},"section",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[t._t("default")],2)},qt=[],Dt=b(Kt,Gt,qt,!1,null,null,null,null);const Ht=Dt.exports,w="[Builder.io]: ",v={log:(...e)=>console.log(w,...e),error:(...e)=>console.error(w,...e),warn:(...e)=>console.warn(w,...e),debug:(...e)=>console.debug(w,...e)},S=e=>e!=null,Jt=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},z=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(r=>r.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(r){v.warn("[COOKIE] GET error: ",(r==null?void 0:r.message)||r);return}},K=async e=>z(e),Qt=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(S).join("; "),Xt=[["secure",""],["SameSite","None"]],Yt=({name:e,value:t,expires:n})=>{const o=(p()?location.protocol==="https:":!0)?Xt:[[]],s=n?[["expires",n.toUTCString()]]:[[]],i=[[e,t],...s,["path","/"],["domain",Jt(window.location.hostname)],...o];return Qt(i)},G=async({name:e,value:t,expires:n,canTrack:r})=>{try{if(!r)return;const o=Yt({name:e,value:t,expires:n});document.cookie=o}catch(o){v.warn("[COOKIE] SET error: ",(o==null?void 0:o.message)||o)}},Zt="builder.tests",A=e=>`${Zt}.${e}`,te=({contentId:e})=>K({name:A(e),canTrack:!0}),ee=({contentId:e})=>z({name:A(e),canTrack:!0}),ne=({contentId:e,value:t})=>G({name:A(e),value:t,canTrack:!0}),q=e=>S(e.id)&&S(e.variations)&&Object.keys(e.variations).length>0,re=({id:e,variations:t})=>{var o;let n=0;const r=Math.random();for(const s in t){const i=(o=t[s])==null?void 0:o.testRatio;if(n+=i,r<n)return s}return e},D=e=>{const t=re(e);return ne({contentId:e.id,value:t}).catch(n=>{v.error("could not store A/B test variation: ",n)}),t},H=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},oe=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!q(e))return e;const n=ee({contentId:e.id})||D({variations:e.variations,id:e.id}),r=H({item:e,testGroupId:n});return{...e,...r}},se=async({item:e,canTrack:t})=>{if(!t||!q(e))return e;const r=await te({contentId:e.id})||D({variations:e.variations,id:e.id}),o=H({item:e,testGroupId:r});return{...e,...o}},$=e=>S(e)?e:!0;function ie(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function ae(){const e=ie().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
26
|
+
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const J=ae();function P(e,t=null,n="."){return Object.keys(e).reduce((r,o)=>{const s=e[o],i=[t,o].filter(Boolean).join(n);return[typeof s=="object",s!==null,!(Array.isArray(s)&&s.length===0)].every(Boolean)?{...r,...P(s,i,n)}:{...r,[i]:s}},{})}const V="builder.",ce="options.",le=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},Q=e=>{if(!e)return{};const t=X(e),n={};return Object.keys(t).forEach(r=>{if(r.startsWith(V)){const o=r.replace(V,"").replace(ce,"");n[o]=t[r]}}),n},ue=()=>{if(!p())return{};const e=new URLSearchParams(window.location.search);return Q(e)},X=e=>e instanceof URLSearchParams?le(e):e,de="v3",Y=e=>{const{limit:t=30,userAttributes:n,query:r,noTraverse:o=!1,model:s,apiKey:i,includeRefs:u=!0,enrich:a,locale:c,apiVersion:_=de}=e;if(!i)throw new Error("Missing API key");if(!["v2","v3"].includes(_))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${_}'`);const f=new URL(`https://cdn.builder.io/api/${_}/content/${s}?apiKey=${i}&limit=${t}&noTraverse=${o}&includeRefs=${u}${c?`&locale=${c}`:""}${a?`&enrich=${a}`:""}`),l={...ue(),...X(e.options||{})},m=P(l);for(const d in m)f.searchParams.set(d,String(m[d]));if(n&&f.searchParams.set("userAttributes",JSON.stringify(n)),r){const d=P({query:r});for(const g in d)f.searchParams.set(g,JSON.stringify(d[g]))}return f},Z=e=>"results"in e;async function tt(e){const t=await nt({...e,limit:1});return t&&Z(t)&&t.results[0]||null}const fe=async e=>{const t=Y(e);return await(await J(t.href)).json()},et=async(e,t)=>{const n=$(e.canTrack);if(!n||!(p()||C==="reactNative"))return t;try{const r=[];for(const o of t.results)r.push(await se({item:o,canTrack:n}));t.results=r}catch(r){v.error("Could not process A/B tests. ",r)}return t};async function nt(e){try{const t=Y(e),n=await fe(e);return Z(n)?et(e,n):(v.error("Error fetching data. ",{url:t,content:n,options:e}),n)}catch(t){return v.error("Error fetching data. ",t),null}}const me=()=>Promise.resolve().then(()=>require("./render-content.d53085e5.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",e),e}),pe=y.defineComponent({name:"builder-symbol",components:{RenderContent:me},props:["attributes","symbol","dynamic"],data(){var e,t,n;return{className:[...Object.keys(this.attributes.class),"builder-symbol",(e=this.symbol)!=null&&e.inline?"builder-inline-symbol":void 0,((t=this.symbol)==null?void 0:t.dynamic)||this.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" "),contentToUse:(n=this.symbol)==null?void 0:n.content}},inject:{builderContext:I.key},mounted(){this.fetchContent()},watch:{onUpdateHook0:{handler(){this.fetchContent()},immediate:!0}},computed:{onUpdateHook0(){return{0:this.symbol}}},methods:{fetchContent(){var e,t;!this.contentToUse&&((e=this.symbol)==null?void 0:e.model)&&((t=this.builderContext)==null?void 0:t.apiKey)&&tt({model:this.symbol.model,apiKey:this.builderContext.apiKey,apiVersion:this.builderContext.apiVersion,query:{id:this.symbol.entry}}).then(n=>{n&&(this.contentToUse=n)}).catch(n=>{v.error("Could not fetch symbol content: ",n)})},filterAttrs:function(t={},n){const r="v-on:";return Object.keys(t).filter(o=>{if(!t[o])return!1;const s=o.startsWith(r);return n?s:!s}).reduce((o,s)=>({...o,[s.replace(r,"")]:t[s]}),{})},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const r of n)t[r]=!0;return t}}});var he=function(){var r,o,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",t._g(t._b({class:t._classStringToObject(t.className),attrs:{dataSet:{class:t.className}}},"div",t.filterAttrs(t.attributes,!1),!1),t.filterAttrs(t.attributes,!0)),[n("render-content",{attrs:{apiVersion:t.builderContext.apiVersion,apiKey:t.builderContext.apiKey,context:t.builderContext.context,customComponents:Object.values(t.builderContext.registeredComponents),data:{...(r=t.symbol)==null?void 0:r.data,...t.builderContext.localState,...(s=(o=t.contentToUse)==null?void 0:o.data)==null?void 0:s.state},model:(i=t.symbol)==null?void 0:i.model,content:t.contentToUse}})],1)},be=[],_e=b(pe,he,be,!1,null,null,null,null);const ge=_e.exports,ye=y.defineComponent({name:"builder-text",props:["text"]});var ve=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("span",{staticClass:"builder-text",style:{outline:"none"},domProps:{innerHTML:t._s(t.text)}})},Se=[],ke=b(ye,ve,Se,!1,null,null,null,null);const xe=ke.exports,Ce=y.defineComponent({name:"builder-video",props:["autoPlay","muted","controls","loop","playsInline","attributes","fit","position","video","posterImage"],computed:{videoProps(){return{...this.autoPlay===!0?{autoPlay:!0}:{},...this.muted===!0?{muted:!0}:{},...this.controls===!0?{controls:!0}:{},...this.loop===!0?{loop:!0}:{},...this.playsInline===!0?{playsInline:!0}:{}}},spreadProps(){return{...this.attributes,...this.videoProps}}}});var we=function(){var r;var t=this,n=t._self._c;return t._self._setupProxy,n("video",t._b({style:{width:"100%",height:"100%",...(r=t.attributes)==null?void 0:r.style,objectFit:t.fit,objectPosition:t.position,borderRadius:1},attrs:{src:t.video||"no-src",poster:t.posterImage}},"video",t.spreadProps,!1))},$e=[],Te=b(Ce,we,$e,!1,null,null,null,null);const Re=Te.exports,T=e=>Object.values((e==null?void 0:e.variations)||{}),B=({canTrack:e,content:t})=>!(!(T(t).length>0)||!e||p());function Ie(e,t,n){function r(){function i(m,d,g){let k="";if(g){const h=new Date;h.setTime(h.getTime()+g*24*60*60*1e3),k="; expires="+h.toUTCString()}document.cookie=m+"="+(d||"")+k+"; path=/; Secure; SameSite=None"}function u(m){const d=m+"=",g=document.cookie.split(";");for(let k=0;k<g.length;k++){let h=g[k];for(;h.charAt(0)===" ";)h=h.substring(1,h.length);if(h.indexOf(d)===0)return h.substring(d.length,h.length)}return null}const a=`builder.tests.${e}`,c=u(a),_=t.map(m=>m.id).concat(e);if(c&&_.includes(c))return c;let f=0;const l=Math.random();for(let m=0;m<t.length;m++){const d=t[m],g=d.testRatio;if(f+=g,l<f)return i(a,d.id),d.id}return i(a,e),e}const o=r(),s=document.getElementById(`variants-styles-${e}`);if(n){s.remove();const i=document.getElementById(`variants-script-${e}`);i==null||i.remove()}else{const i=t.concat({id:e}).filter(u=>u.id!==o).map(u=>`.variant-${u.id} { display: none; }
|
|
27
27
|
`).join("");s.innerHTML=i}}function Ee(e,t,n){if(!navigator.cookieEnabled)return;function r(a){const c=a+"=",_=document.cookie.split(";");for(let f=0;f<_.length;f++){let l=_[f];for(;l.charAt(0)===" ";)l=l.substring(1,l.length);if(l.indexOf(c)===0)return l.substring(c.length,l.length)}return null}const o=`builder.tests.${t}`,s=r(o),i=document.querySelector(`[builder-content-id="${e}"]`),u=e===t;if(s===e){if(u)return;i==null||i.removeAttribute("hidden"),i==null||i.removeAttribute("aria-hidden")}else{u&&(n?i==null||i.remove():(i==null||i.setAttribute("hidden","true"),i==null||i.setAttribute("aria-hidden","true")));return}}const rt=e=>e==="react"||e==="reactNative"||e==="vue3"||e==="vue2",j="bldrAbTest",ot="bldrCntntScrpt",Pe=(e,t)=>{const n=Ie.toString().replace(/\s+/g," "),r=Ee.toString().replace(/\s+/g," ");return`
|
|
28
28
|
const ${j} = ${n}
|
|
29
29
|
const ${ot} = ${r}
|
|
30
30
|
${j}("${t}", ${JSON.stringify(e)}, ${rt})
|
|
31
31
|
`},Ae=({parentContentId:e,contentId:t})=>`
|
|
32
|
-
${ot}("${t}", "${e}", ${rt})`,Oe=()=>Promise.resolve().then(()=>require("./render-content.
|
|
32
|
+
${ot}("${t}", "${e}", ${rt})`,Oe=()=>Promise.resolve().then(()=>require("./render-content.d53085e5.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderContent at ../render-content/render-content.vue",e),e}),Ve=()=>Promise.resolve().then(()=>require("./render-inlined-styles.b322c74a.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",e),e}),Be=y.defineComponent({name:"render-content-variants",components:{RenderInlinedStyles:Ve,RenderContent:Oe},props:["content","canTrack","apiKey","apiVersion","customComponents","model"],data(){var e;return{variantScriptStr:Pe(T(this.content).map(t=>({id:t.id,testRatio:t.testRatio})),((e=this.content)==null?void 0:e.id)||""),shouldRenderVariants:B({canTrack:$(this.canTrack),content:this.content}),hideVariantsStyleString:T(this.content).map(t=>`.variant-${t.id} { display: none; } `).join(""),contentToRender:B({canTrack:$(this.canTrack),content:this.content})?this.content:oe({item:this.content,canTrack:$(this.canTrack)}),getVariants:T}}});var je=function(){var r,o,s,i;var t=this,n=t._self._c;return t._self._setupProxy,n("div",[t.shouldRenderVariants?[n("render-inlined-styles",{attrs:{id:`variants-styles-${(r=t.content)==null?void 0:r.id}`,styles:t.hideVariantsStyleString}}),n("script",{tag:"component",attrs:{id:`variants-script-${(o=t.content)==null?void 0:o.id}`},domProps:{innerHTML:t._s(t.variantScriptStr)}}),t._l(t.getVariants(t.content),function(u,a){var c;return n("render-content",{key:u.id,attrs:{content:u,apiKey:t.apiKey,apiVersion:t.apiVersion,canTrack:t.canTrack,customComponents:t.customComponents,hideContent:!0,parentContentId:(c=t.content)==null?void 0:c.id,isSsrAbTest:t.shouldRenderVariants}})})]:t._e(),n("render-content",{attrs:{model:t.model,content:t.contentToRender,apiKey:t.apiKey,apiVersion:t.apiVersion,canTrack:t.canTrack,customComponents:t.customComponents,classNameProp:`variant-${(s=t.content)==null?void 0:s.id}`,parentContentId:(i=t.content)==null?void 0:i.id,isSsrAbTest:t.shouldRenderVariants}})],2)},Ne=[],Fe=b(Be,je,Ne,!1,null,null,null,null);const Me=Fe.exports;function Ue(){return!p()||x()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const st=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},We=[],Le=({component:e,...t})=>({type:"builder.registerComponent",data:Ke(t)}),ze=e=>typeof e=="function"?st(e):R(e),Ke=({inputs:e,...t})=>({...R(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((r,[o,s])=>({...r,[o]:ze(s)}),{}))}),N={};function Ge(e,t){let n=N[e];if(n||(n=N[e]=[]),n.push(t),p()){const r={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(r,"*"),parent!==window&&window.postMessage(r,"*")}catch(o){console.debug("Could not postmessage",o)}}}const F={};function qe(e){if(p()){Object.assign(F,e);const t={type:"builder.settingsChange",data:F};parent.postMessage(t,"*")}}function De(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function it(){return De().replace(/-/g,"")}const at="builderSessionId",He=async({canTrack:e})=>{if(!e)return;const t=await K({name:at,canTrack:e});if(S(t))return t;{const n=Je();return Qe({id:n,canTrack:e}),n}},Je=()=>it(),Qe=({id:e,canTrack:t})=>G({name:at,value:e,canTrack:t}),ct=()=>p()&&typeof localStorage<"u"?localStorage:void 0,Xe=({key:e,canTrack:t})=>{var n;try{return t?(n=ct())==null?void 0:n.getItem(e):void 0}catch(r){console.debug("[LocalStorage] GET error: ",r);return}},Ye=({key:e,canTrack:t,value:n})=>{var r;try{t&&((r=ct())==null||r.setItem(e,n))}catch(o){console.debug("[LocalStorage] SET error: ",o)}},lt="builderVisitorId",Ze=({canTrack:e})=>{if(!e)return;const t=Xe({key:lt,canTrack:e});if(S(t))return t;{const n=tn();return en({id:n,canTrack:e}),n}},tn=()=>it(),en=({id:e,canTrack:t})=>Ye({key:lt,value:e,canTrack:t}),nn=()=>{if(p()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},rn=()=>typeof navigator=="object"&&navigator.userAgent||"",on=()=>{const e=rn(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||C==="reactNative"}},n=e.match(/Tablet|iPad/i),r=nn();return{urlPath:r==null?void 0:r.pathname,host:(r==null?void 0:r.host)||(r==null?void 0:r.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},sn=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await He({canTrack:e}),n=Ze({canTrack:e});return{sessionId:t,visitorId:n}},an=async({type:e,canTrack:t,apiKey:n,metadata:r,...o})=>({type:e,data:{...o,metadata:{url:location.href,...r},...await sn({canTrack:t}),userAttributes:on(),ownerId:n}});async function ut(e){if(!e.apiKey){v.error("Missing API key for track call. Please provide your API key.");return}if(!!e.canTrack&&!x()&&!!(p()||C==="reactNative"))return fetch("https://builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await an(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const cn=e=>ut({...e,canTrack:!0});exports.BuilderContext=I;exports.Button=ht;exports.Columns=Ct;exports.Fragment=It;exports.Image=jt;exports.Section=Ht;exports.Symbol=ge;exports.TARGET=C;exports.Text=xe;exports.Video=Re;exports._track=ut;exports.checkIsDefined=S;exports.components=We;exports.createRegisterComponentMessage=Le;exports.fastClone=R;exports.fetch=J;exports.getAllContent=nt;exports.getBuilderSearchParams=Q;exports.getContent=tt;exports.getMaxWidthQueryForSize=bt;exports.getRenderContentScriptString=Ae;exports.getSizesForBreakpoints=U;exports.isBrowser=p;exports.isEditing=x;exports.isPreviewing=Ue;exports.logger=v;exports.normalizeComponent=b;exports.processContentResult=et;exports.register=Ge;exports.renderBlocks=W;exports.renderBlocks$1=L;exports.renderContentVariants=Me;exports.serializeFn=st;exports.setEditorSettings=qe;exports.track=cn;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as m } from "vue";
|
|
2
|
-
import { e as l } from "./evaluate.
|
|
3
|
-
import { T as u, n as d } from "./index.
|
|
4
|
-
import { a as h, g as p } from "./css.
|
|
5
|
-
const
|
|
2
|
+
import { e as l } from "./evaluate.6ab6e7cb.js";
|
|
3
|
+
import { T as u, n as d } from "./index.2473a355.js";
|
|
4
|
+
import { a as h, g as p } from "./css.49cc4003.js";
|
|
5
|
+
const f = (e) => `v-on:${e.toLowerCase()}`, k = (e, t) => (o) => l({
|
|
6
6
|
code: e,
|
|
7
7
|
context: t.context,
|
|
8
8
|
localState: t.localState,
|
|
@@ -11,14 +11,14 @@ const S = (e) => `v-on:${e.toLowerCase()}`, f = (e, t) => (o) => l({
|
|
|
11
11
|
event: o,
|
|
12
12
|
isExpression: !1
|
|
13
13
|
});
|
|
14
|
-
function
|
|
14
|
+
function S(e) {
|
|
15
15
|
var r;
|
|
16
16
|
const t = {}, o = (r = e.block.actions) != null ? r : {};
|
|
17
17
|
for (const n in o) {
|
|
18
18
|
if (!o.hasOwnProperty(n))
|
|
19
19
|
continue;
|
|
20
20
|
const c = o[n];
|
|
21
|
-
t[
|
|
21
|
+
t[f(n)] = k(c, e);
|
|
22
22
|
}
|
|
23
23
|
return t;
|
|
24
24
|
}
|
|
@@ -30,7 +30,7 @@ function b(e) {
|
|
|
30
30
|
builderBlock: e
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function y(e) {
|
|
34
34
|
const t = {};
|
|
35
35
|
if (typeof e != "string")
|
|
36
36
|
return t;
|
|
@@ -39,8 +39,8 @@ function x(e) {
|
|
|
39
39
|
t[r] = !0;
|
|
40
40
|
return t;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return e.class =
|
|
42
|
+
function x(e) {
|
|
43
|
+
return e.class = y(e.class), e;
|
|
44
44
|
}
|
|
45
45
|
const g = (e) => ({ href: e.href });
|
|
46
46
|
function B(e) {
|
|
@@ -52,7 +52,7 @@ function B(e) {
|
|
|
52
52
|
style: v(e.style),
|
|
53
53
|
class: [e.id, "builder-block", e.class, (o = e.properties) == null ? void 0 : o.class].filter(Boolean).join(" ")
|
|
54
54
|
};
|
|
55
|
-
return
|
|
55
|
+
return x(t);
|
|
56
56
|
}
|
|
57
57
|
function v(e) {
|
|
58
58
|
if (!!e)
|
|
@@ -68,7 +68,7 @@ function v(e) {
|
|
|
68
68
|
return e;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
const
|
|
71
|
+
const _ = [
|
|
72
72
|
"area",
|
|
73
73
|
"base",
|
|
74
74
|
"br",
|
|
@@ -84,7 +84,7 @@ const C = [
|
|
|
84
84
|
"source",
|
|
85
85
|
"track",
|
|
86
86
|
"wbr"
|
|
87
|
-
],
|
|
87
|
+
], C = (e) => typeof e == "string" && _.includes(e.toLowerCase()), w = ({
|
|
88
88
|
block: e,
|
|
89
89
|
context: t
|
|
90
90
|
}) => {
|
|
@@ -135,17 +135,17 @@ const C = [
|
|
|
135
135
|
},
|
|
136
136
|
block: r
|
|
137
137
|
}));
|
|
138
|
-
}, R = () => import("./block-styles.
|
|
138
|
+
}, R = () => import("./block-styles.6a1d7394.js").then((e) => e.default).catch((e) => {
|
|
139
139
|
throw console.error(
|
|
140
140
|
"Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",
|
|
141
141
|
e
|
|
142
142
|
), e;
|
|
143
|
-
}), P = () => import("./render-repeated-block.
|
|
143
|
+
}), P = () => import("./render-repeated-block.ac4f1559.js").then((e) => e.default).catch((e) => {
|
|
144
144
|
throw console.error(
|
|
145
145
|
"Error while attempting to dynamically import component RenderRepeatedBlock at ./render-repeated-block.vue",
|
|
146
146
|
e
|
|
147
147
|
), e;
|
|
148
|
-
}), T = () => import("./render-component.
|
|
148
|
+
}), T = () => import("./render-component.ec485884.js").then((e) => e.default).catch((e) => {
|
|
149
149
|
throw console.error(
|
|
150
150
|
"Error while attempting to dynamically import component RenderComponent at ./render-component.vue",
|
|
151
151
|
e
|
|
@@ -165,7 +165,8 @@ const C = [
|
|
|
165
165
|
context: this.context
|
|
166
166
|
}),
|
|
167
167
|
Tag: this.block.tagName || "div",
|
|
168
|
-
|
|
168
|
+
childrenContext: this.context,
|
|
169
|
+
isEmptyHtmlElement: C
|
|
169
170
|
};
|
|
170
171
|
},
|
|
171
172
|
computed: {
|
|
@@ -189,7 +190,7 @@ const C = [
|
|
|
189
190
|
return "hide" in this.useBlock ? !this.useBlock.hide : "show" in this.useBlock ? this.useBlock.show : !0;
|
|
190
191
|
},
|
|
191
192
|
actions() {
|
|
192
|
-
return
|
|
193
|
+
return S({
|
|
193
194
|
block: this.useBlock,
|
|
194
195
|
rootState: this.context.rootState,
|
|
195
196
|
rootSetState: this.context.rootSetState,
|
|
@@ -206,20 +207,6 @@ const C = [
|
|
|
206
207
|
var t, o;
|
|
207
208
|
return !((t = this.component) != null && t.component) && !this.repeatItem ? (o = this.useBlock.children) != null ? o : [] : [];
|
|
208
209
|
},
|
|
209
|
-
childrenContext() {
|
|
210
|
-
const e = () => ({});
|
|
211
|
-
return {
|
|
212
|
-
apiKey: this.context.apiKey,
|
|
213
|
-
apiVersion: this.context.apiVersion,
|
|
214
|
-
localState: this.context.localState,
|
|
215
|
-
rootState: this.context.rootState,
|
|
216
|
-
rootSetState: this.context.rootSetState,
|
|
217
|
-
content: this.context.content,
|
|
218
|
-
context: this.context.context,
|
|
219
|
-
registeredComponents: this.context.registeredComponents,
|
|
220
|
-
inheritedStyles: e()
|
|
221
|
-
};
|
|
222
|
-
},
|
|
223
210
|
renderComponentProps() {
|
|
224
211
|
var e, t, o;
|
|
225
212
|
return {
|
|
@@ -270,7 +257,7 @@ var A = function() {
|
|
|
270
257
|
null,
|
|
271
258
|
null
|
|
272
259
|
);
|
|
273
|
-
const
|
|
260
|
+
const M = N.exports;
|
|
274
261
|
export {
|
|
275
|
-
|
|
262
|
+
M as default
|
|
276
263
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),u=require("./evaluate.7d21bb04.cjs"),d=require("./index.95d9006f.cjs"),s=require("./css.c26b7ab4.cjs"),m=e=>`v-on:${e.toLowerCase()}`,h=(e,t)=>o=>u.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:o,isExpression:!1});function k(e){var r;const t={},o=(r=e.block.actions)!=null?r:{};for(const n in o){if(!o.hasOwnProperty(n))continue;const c=o[n];t[m(n)]=h(c,e)}return t}function f(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}function S(e){const t={};if(typeof e!="string")return t;const o=e.trim().split(/\\s+/);for(const r of o)t[r]=!0;return t}function b(e){return e.class=S(e.class),e}const v=e=>({href:e.href});function y(e){var o;const t={...v(e),...e.properties,"builder-id":e.id,style:g(e.style),class:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return b(t)}function g(e){if(!!e)switch(d.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return s.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":return e}}const x=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],B=e=>typeof e=="string"&&x.includes(e.toLowerCase()),_=({block:e,context:t})=>{var n;const o=(n=s.getProcessedBlock({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:n.name;if(!o)return null;const r=t.registeredComponents[o];if(r)return r;console.warn(`
|
|
2
|
+
Could not find a registered component named "${o}".
|
|
3
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`)},C=({block:e,context:t})=>{const{repeat:o,...r}=e;if(!(o!=null&&o.collection))return;const n=u.evaluate({code:o.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(n))return;const c=o.collection.split(".").pop(),a=o.itemName||(c?c+"Item":"item");return n.map((i,l)=>({context:{...t,localState:{...t.localState,$index:l,$item:i,[a]:i,[`$${a}Index`]:l}},block:r}))},w=()=>Promise.resolve().then(()=>require("./block-styles.cacb4849.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",e),e}),P=()=>Promise.resolve().then(()=>require("./render-repeated-block.253c96e6.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderRepeatedBlock at ./render-repeated-block.vue",e),e}),E=()=>Promise.resolve().then(()=>require("./render-component.f3cccaa9.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderComponent at ./render-component.vue",e),e}),R=p.defineComponent({name:"render-block",components:{RenderComponent:E,RenderRepeatedBlock:P,BlockStyles:w},props:["block","context"],data(){return{component:_({block:this.block,context:this.context}),Tag:this.block.tagName||"div",childrenContext:this.context,isEmptyHtmlElement:B}},computed:{repeatItem(){return C({block:this.block,context:this.context})},useBlock(){return this.repeatItem?this.block:s.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0})},canShowBlock(){return"hide"in this.useBlock?!this.useBlock.hide:"show"in this.useBlock?this.useBlock.show:!0},actions(){return k({block:this.useBlock,rootState:this.context.rootState,rootSetState:this.context.rootSetState,localState:this.context.localState,context:this.context.context})},attributes(){return{...y(this.useBlock)}},childrenWithoutParentComponent(){var t,o;return!((t=this.component)!=null&&t.component)&&!this.repeatItem?(o=this.useBlock.children)!=null?o:[]:[]},renderComponentProps(){var e,t,o;return{blockChildren:(e=this.useBlock.children)!=null?e:[],componentRef:(t=this.component)==null?void 0:t.component,componentOptions:{...f(this.useBlock),...(o=this.component)!=null&&o.noWrap?{attributes:{...this.attributes,...this.actions}}:{}},context:this.childrenContext}}},methods:{stripVOn:function(t={}){return Object.keys(t).reduce((o,r)=>({...o,[r.replace("v-on:","")]:t[r]}),{})}}});var T=function(){var r;var t=this,o=t._self._c;return t._self._setupProxy,!Boolean(!((r=t.component)!=null&&r.noWrap))&&t.canShowBlock?o("render-component",t._b({},"render-component",t.renderComponentProps,!1)):t.isEmptyHtmlElement(t.Tag)&&t.canShowBlock?o(t.Tag,t._g(t._b({tag:"component"},"component",t.attributes,!1),t.stripVOn(t.actions))):!t.isEmptyHtmlElement(t.Tag)&&t.repeatItem&&t.canShowBlock?o("div",{staticClass:"vue2-root-element-workaround"},t._l(t.repeatItem,function(n,c){return o("render-repeated-block",{key:c,attrs:{repeatContext:n.context,block:n.block}})}),1):t.canShowBlock?o(t.Tag,t._g(t._b({tag:"component"},"component",t.attributes,!1),t.stripVOn(t.actions)),[o("render-component",t._b({},"render-component",t.renderComponentProps,!1)),t._l(t.childrenWithoutParentComponent,function(n,c){return o("render-block",{key:"render-block-"+n.id,attrs:{block:n,context:t.childrenContext}})}),t._l(t.childrenWithoutParentComponent,function(n,c){return o("block-styles",{key:"block-style-"+n.id,attrs:{block:n,context:t.childrenContext}})})],2):t._e()},j=[],O=d.normalizeComponent(R,T,j,!1,null,null,null,null);const A=O.exports;exports.default=A;
|