@builder.io/sdk-vue 0.4.3 → 0.4.4
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.aaf62526.cjs → block-styles.0037defd.cjs} +1 -1
- package/packages/_vue2/dist/{block-styles.c38fdaef.js → block-styles.bc8cdc9f.js} +4 -4
- package/packages/_vue2/dist/{css.377600fa.js → css.5dc54b85.js} +2 -2
- package/packages/_vue2/dist/{css.4a664d41.cjs → css.91bb94e8.cjs} +1 -1
- package/packages/_vue2/dist/{evaluate.d837a845.cjs → evaluate.10e091b0.cjs} +2 -2
- package/packages/_vue2/dist/{evaluate.d2d16952.js → evaluate.f654f563.js} +1 -1
- package/packages/_vue2/dist/{index.1074d675.js → index.a1dfdaec.js} +7 -7
- package/packages/_vue2/dist/{index.3d5a7a37.cjs → index.a4e21f82.cjs} +4 -4
- package/packages/_vue2/dist/render-block.55b40822.cjs +3 -0
- package/packages/_vue2/dist/{render-block.1ec27d4d.js → render-block.df744a97.js} +6 -6
- package/packages/_vue2/dist/{render-component.82a8e6f7.js → render-component.9632b476.js} +3 -3
- package/packages/_vue2/dist/{render-component.ba549c84.cjs → render-component.baf2d372.cjs} +1 -1
- package/packages/_vue2/dist/{render-content.3afd4a46.js → render-content.30c701ec.js} +5 -5
- package/packages/_vue2/dist/{render-content.2c57f5bb.cjs → render-content.d464cccb.cjs} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.f76aba42.js → render-inlined-styles.36b7a3a4.js} +1 -1
- package/packages/_vue2/dist/{render-inlined-styles.1ed1b531.cjs → render-inlined-styles.469ed053.cjs} +1 -1
- package/packages/_vue2/dist/{render-repeated-block.d3c2411b.js → render-repeated-block.7f4862b2.js} +2 -2
- package/packages/_vue2/dist/{render-repeated-block.625e26fc.cjs → render-repeated-block.e9bfa3cd.cjs} +1 -1
- package/packages/_vue2/dist/{render-styles.7b01db22.js → render-styles.43e1e2a4.js} +2 -2
- package/packages/_vue2/dist/{render-styles.f1413001.cjs → render-styles.ad11935f.cjs} +3 -3
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +1 -1
- package/packages/_vue2/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue3/dist/sdk.cjs +2 -2
- package/packages/_vue3/dist/sdk.js +2 -2
- package/packages/_vue3/dist/src/constants/sdk-version.d.ts +1 -1
- package/packages/_vue2/dist/render-block.43f24cc4.cjs +0 -3
package/package.json
CHANGED
|
@@ -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.a4e21f82.cjs"),r=require("./css.91bb94e8.cjs");require("./evaluate.10e091b0.cjs");const S=()=>Promise.resolve().then(()=>require("./render-inlined-styles.469ed053.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)||{}),l=e==null?void 0:e.large,c=e==null?void 0:e.medium,i=e==null?void 0:e.small,n=this.useBlock.id;if(!n)return"";const u=l?r.createCssClass({className:n,styles:l}):"",d=c?r.createCssClass({className:n,styles:c,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,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.a1dfdaec.js";
|
|
3
|
+
import { g as f, c as n } from "./css.5dc54b85.js";
|
|
4
|
+
import "./evaluate.f654f563.js";
|
|
5
|
+
const _ = () => import("./render-inlined-styles.36b7a3a4.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,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.f654f563.js";
|
|
2
|
+
import { f as p, c as l } from "./index.a1dfdaec.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 d=require("./evaluate.10e091b0.cjs"),a=require("./index.a4e21f82.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],f=d.evaluate({code:l,localState:n,rootState:s,rootSetState:c,context:t});p(o,i,f)}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.a4e21f82.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
|
-
`,d)}}function
|
|
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;
|
|
@@ -128,7 +128,7 @@ const He = 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.36b7a3a4.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
|
|
@@ -418,12 +418,12 @@ function xt() {
|
|
|
418
418
|
function T() {
|
|
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.bc8cdc9f.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.df744a97.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
|
|
@@ -783,7 +783,7 @@ async function oe(e) {
|
|
|
783
783
|
return v.error("Error fetching data. ", t), null;
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
const se = () => import("./render-content.
|
|
786
|
+
const se = () => import("./render-content.30c701ec.js").then((e) => e.default).catch((e) => {
|
|
787
787
|
throw console.error(
|
|
788
788
|
"Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",
|
|
789
789
|
e
|
|
@@ -1060,12 +1060,12 @@ const ve = (e) => e === "react" || e === "reactNative" || e === "vue3" || e ===
|
|
|
1060
1060
|
parentContentId: e,
|
|
1061
1061
|
contentId: t
|
|
1062
1062
|
}) => `
|
|
1063
|
-
${X}("${t}", "${e}", ${J})`, ke = () => import("./render-content.
|
|
1063
|
+
${X}("${t}", "${e}", ${J})`, ke = () => import("./render-content.30c701ec.js").then((e) => e.default).catch((e) => {
|
|
1064
1064
|
throw console.error(
|
|
1065
1065
|
"Error while attempting to dynamically import component RenderContent at ../render-content/render-content.vue",
|
|
1066
1066
|
e
|
|
1067
1067
|
), e;
|
|
1068
|
-
}), xe = () => import("./render-inlined-styles.
|
|
1068
|
+
}), xe = () => import("./render-inlined-styles.36b7a3a4.js").then((e) => e.default).catch((e) => {
|
|
1069
1069
|
throw console.error(
|
|
1070
1070
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../render-inlined-styles.vue",
|
|
1071
1071
|
e
|
|
@@ -1321,7 +1321,7 @@ async function Ge(e) {
|
|
|
1321
1321
|
return;
|
|
1322
1322
|
}
|
|
1323
1323
|
if (!!e.canTrack && !T() && !!(h() || x === "reactNative"))
|
|
1324
|
-
return fetch("https://builder.io/api/v1/track", {
|
|
1324
|
+
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
1325
1325
|
method: "POST",
|
|
1326
1326
|
body: JSON.stringify({
|
|
1327
1327
|
events: [await Ke(e)]
|
|
@@ -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 g=a.render;a.render=function(m,d){return c.call(d),g(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},x="vue2",gt=Symbol(),I={Builder:{content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,registeredComponents:{},inheritedStyles:{}},key:gt},_t=()=>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 g=a.render;a.render=function(m,d){return c.call(d),g(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},x="vue2",gt=Symbol(),I={Builder:{content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,registeredComponents:{},inheritedStyles:{}},key:gt},_t=()=>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.469ed053.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:_t},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:x}},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 C(){return Nt()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Ft=()=>Promise.resolve().then(()=>require("./block-styles.aaf62526.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.43f24cc4.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;C()&&!((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;C()&&!((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:g=de}=e;if(!i)throw new Error("Missing API key");if(!["v2","v3"].includes(g))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${g}'`);const f=new URL(`https://cdn.builder.io/api/${g}/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 _ in d)f.searchParams.set(_,JSON.stringify(d[_]))}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()||x==="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 C(){return Nt()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Ft=()=>Promise.resolve().then(()=>require("./block-styles.0037defd.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.55b40822.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;C()&&!((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;C()&&!((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:g=de}=e;if(!i)throw new Error("Missing API key");if(!["v2","v3"].includes(g))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${g}'`);const f=new URL(`https://cdn.builder.io/api/${g}/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 _ in d)f.searchParams.set(_,JSON.stringify(d[_]))}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()||x==="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.d464cccb.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=[],ge=b(pe,he,be,!1,null,null,null,null);const _e=ge.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,_){let k="";if(_){const h=new Date;h.setTime(h.getTime()+_*24*60*60*1e3),k="; expires="+h.toUTCString()}document.cookie=m+"="+(d||"")+k+"; path=/; Secure; SameSite=None"}function u(m){const d=m+"=",_=document.cookie.split(";");for(let k=0;k<_.length;k++){let h=_[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),g=t.map(m=>m.id).concat(e);if(c&&g.includes(c))return c;let f=0;const l=Math.random();for(let m=0;m<t.length;m++){const d=t[m],_=d.testRatio;if(f+=_,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+"=",g=document.cookie.split(";");for(let f=0;f<g.length;f++){let l=g[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 Pe=e=>e==="react"||e==="reactNative"||e==="vue3"||e==="vue2",rt=Pe(x),j="bldrAbTest",ot="bldrCntntScrpt",Ae=(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
|
`},Oe=({parentContentId:e,contentId:t})=>`
|
|
32
|
-
${ot}("${t}", "${e}", ${rt})`,Ve=()=>Promise.resolve().then(()=>require("./render-content.
|
|
32
|
+
${ot}("${t}", "${e}", ${rt})`,Ve=()=>Promise.resolve().then(()=>require("./render-content.d464cccb.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}),Be=()=>Promise.resolve().then(()=>require("./render-inlined-styles.469ed053.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}),je=y.defineComponent({name:"render-content-variants",components:{RenderInlinedStyles:Be,RenderContent:Ve},props:["content","canTrack","apiKey","apiVersion","customComponents","model"],data(){var e;return{variantScriptStr:Ae(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 Ne=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)},Fe=[],Me=b(je,Ne,Fe,!1,null,null,null,null);const Ue=Me.exports;function We(){return!p()||C()?!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)`},Le=[],ze=({component:e,...t})=>({type:"builder.registerComponent",data:Ge(t)}),Ke=e=>typeof e=="function"?st(e):R(e),Ge=({inputs:e,...t})=>({...R(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((r,[o,s])=>({...r,[o]:Ke(s)}),{}))}),N={};function qe(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 De(e){if(p()){Object.assign(F,e);const t={type:"builder.settingsChange",data:F};parent.postMessage(t,"*")}}function He(){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 He().replace(/-/g,"")}const at="builderSessionId",Je=async({canTrack:e})=>{if(!e)return;const t=await K({name:at,canTrack:e});if(S(t))return t;{const n=Qe();return Xe({id:n,canTrack:e}),n}},Qe=()=>it(),Xe=({id:e,canTrack:t})=>G({name:at,value:e,canTrack:t}),ct=()=>p()&&typeof localStorage<"u"?localStorage:void 0,Ye=({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}},Ze=({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",tn=({canTrack:e})=>{if(!e)return;const t=Ye({key:lt,canTrack:e});if(S(t))return t;{const n=en();return nn({id:n,canTrack:e}),n}},en=()=>it(),nn=({id:e,canTrack:t})=>Ze({key:lt,value:e,canTrack:t}),rn=()=>{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},on=()=>typeof navigator=="object"&&navigator.userAgent||"",sn=()=>{const e=on(),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()||x==="reactNative"}},n=e.match(/Tablet|iPad/i),r=rn();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"}},an=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await Je({canTrack:e}),n=tn({canTrack:e});return{sessionId:t,visitorId:n}},cn=async({type:e,canTrack:t,apiKey:n,metadata:r,...o})=>({type:e,data:{...o,metadata:{url:location.href,...r},...await an({canTrack:t}),userAttributes:sn(),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&&!C()&&!!(p()||x==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await cn(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const ln=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=_e;exports.TARGET=x;exports.Text=xe;exports.Video=Re;exports._track=ut;exports.checkIsDefined=S;exports.components=Le;exports.createRegisterComponentMessage=ze;exports.fastClone=R;exports.fetch=J;exports.getAllContent=nt;exports.getBuilderSearchParams=Q;exports.getContent=tt;exports.getMaxWidthQueryForSize=bt;exports.getRenderContentScriptString=Oe;exports.getSizesForBreakpoints=U;exports.isBrowser=p;exports.isEditing=C;exports.isPreviewing=We;exports.logger=v;exports.normalizeComponent=b;exports.processContentResult=et;exports.register=qe;exports.renderBlocks=W;exports.renderBlocks$1=L;exports.renderContentVariants=Ue;exports.serializeFn=st;exports.setEditorSettings=De;exports.track=ln;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),u=require("./evaluate.10e091b0.cjs"),d=require("./index.a4e21f82.cjs"),s=require("./css.91bb94e8.cjs"),m=t=>`v-on:${t.toLowerCase()}`,h=(t,e)=>o=>u.evaluate({code:t,context:e.context,localState:e.localState,rootState:e.rootState,rootSetState:e.rootSetState,event:o,isExpression:!1});function k(t){var r;const e={},o=(r=t.block.actions)!=null?r:{};for(const n in o){if(!o.hasOwnProperty(n))continue;const c=o[n];e[m(n)]=h(c,t)}return e}function f(t){var e;return{...(e=t.component)==null?void 0:e.options,...t.options,builderBlock:t}}function S(t){const e={};if(typeof t!="string")return e;const o=t.trim().split(/\\s+/);for(const r of o)e[r]=!0;return e}function b(t){return t.class=S(t.class),t}const v=t=>({href:t.href});function y(t){var o;const e={...v(t),...t.properties,"builder-id":t.id,style:g(t.style),class:[t.id,"builder-block",t.class,(o=t.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return b(e)}function g(t){if(!!t)switch(d.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return s.convertStyleMapToCSSArray(t).join(" ");case"qwik":case"reactNative":case"react":return t}}const x=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],B=t=>typeof t=="string"&&x.includes(t.toLowerCase()),_=({block:t,context:e})=>{var n;const o=(n=s.getProcessedBlock({block:t,localState:e.localState,rootState:e.rootState,rootSetState:e.rootSetState,context:e.context,shouldEvaluateBindings:!1}).component)==null?void 0:n.name;if(!o)return null;const r=e.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:t,context:e})=>{const{repeat:o,...r}=t;if(!(o!=null&&o.collection))return;const n=u.evaluate({code:o.collection,localState:e.localState,rootState:e.rootState,rootSetState:e.rootSetState,context:e.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:{...e,localState:{...e.localState,$index:l,$item:i,[a]:i,[`$${a}Index`]:l}},block:r}))},w=()=>Promise.resolve().then(()=>require("./block-styles.0037defd.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",t),t}),P=()=>Promise.resolve().then(()=>require("./render-repeated-block.e9bfa3cd.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderRepeatedBlock at ./render-repeated-block.vue",t),t}),E=()=>Promise.resolve().then(()=>require("./render-component.baf2d372.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderComponent at ./render-component.vue",t),t}),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 e,o;return!((e=this.component)!=null&&e.component)&&!this.repeatItem?(o=this.useBlock.children)!=null?o:[]:[]},renderComponentProps(){var t,e,o;return{blockChildren:(t=this.useBlock.children)!=null?t:[],componentRef:(e=this.component)==null?void 0:e.component,componentOptions:{...f(this.useBlock),...(o=this.component)!=null&&o.noWrap?{attributes:{...this.attributes,...this.actions}}:{}},context:this.childrenContext}}},methods:{stripVOn:function(e={}){return Object.keys(e).reduce((o,r)=>({...o,[r.replace("v-on:","")]:e[r]}),{})}}});var T=function(){var r;var e=this,o=e._self._c;return e._self._setupProxy,!Boolean(!((r=e.component)!=null&&r.noWrap))&&e.canShowBlock?o("render-component",e._b({},"render-component",e.renderComponentProps,!1)):e.isEmptyHtmlElement(e.Tag)&&e.canShowBlock?o(e.Tag,e._g(e._b({tag:"component"},"component",e.attributes,!1),e.stripVOn(e.actions))):!e.isEmptyHtmlElement(e.Tag)&&e.repeatItem&&e.canShowBlock?o("div",{staticClass:"vue2-root-element-workaround"},e._l(e.repeatItem,function(n,c){return o("render-repeated-block",{key:c,attrs:{repeatContext:n.context,block:n.block}})}),1):e.canShowBlock?o(e.Tag,e._g(e._b({tag:"component"},"component",e.attributes,!1),e.stripVOn(e.actions)),[o("render-component",e._b({},"render-component",e.renderComponentProps,!1)),e._l(e.childrenWithoutParentComponent,function(n,c){return o("render-block",{key:"render-block-"+n.id,attrs:{block:n,context:e.childrenContext}})}),e._l(e.childrenWithoutParentComponent,function(n,c){return o("block-styles",{key:"block-style-"+n.id,attrs:{block:n,context:e.childrenContext}})})],2):e._e()},j=[],O=d.normalizeComponent(R,T,j,!1,null,null,null,null);const A=O.exports;exports.default=A;
|
|
@@ -1,7 +1,7 @@
|
|
|
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.
|
|
2
|
+
import { e as l } from "./evaluate.f654f563.js";
|
|
3
|
+
import { T as u, n as d } from "./index.a1dfdaec.js";
|
|
4
|
+
import { a as h, g as p } from "./css.5dc54b85.js";
|
|
5
5
|
const f = (e) => `v-on:${e.toLowerCase()}`, k = (e, t) => (o) => l({
|
|
6
6
|
code: e,
|
|
7
7
|
context: t.context,
|
|
@@ -135,17 +135,17 @@ const _ = [
|
|
|
135
135
|
},
|
|
136
136
|
block: r
|
|
137
137
|
}));
|
|
138
|
-
}, R = () => import("./block-styles.
|
|
138
|
+
}, R = () => import("./block-styles.bc8cdc9f.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.7f4862b2.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.9632b476.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
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as c } from "vue";
|
|
2
|
-
import { n as l } from "./index.
|
|
3
|
-
const s = () => import("./block-styles.
|
|
2
|
+
import { n as l } from "./index.a1dfdaec.js";
|
|
3
|
+
const s = () => import("./block-styles.bc8cdc9f.js").then((e) => e.default).catch((e) => {
|
|
4
4
|
throw console.error(
|
|
5
5
|
"Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",
|
|
6
6
|
e
|
|
7
7
|
), e;
|
|
8
|
-
}), m = () => import("./render-block.
|
|
8
|
+
}), m = () => import("./render-block.df744a97.js").then((e) => e.default).catch((e) => {
|
|
9
9
|
throw console.error(
|
|
10
10
|
"Error while attempting to dynamically import component RenderBlock at ./render-block.vue",
|
|
11
11
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),l=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),l=require("./index.a4e21f82.cjs"),s=()=>Promise.resolve().then(()=>require("./block-styles.0037defd.cjs")).then(n=>n.default).catch(n=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",n),n}),i=()=>Promise.resolve().then(()=>require("./render-block.55b40822.cjs")).then(n=>n.default).catch(n=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block.vue",n),n}),a=c.defineComponent({name:"render-component",components:{RenderBlock:i,BlockStyles:s},props:["componentRef","componentOptions","blockChildren","context"]});var d=function(){var e=this,t=e._self._c;return e._self._setupProxy,e.componentRef?t(e.componentRef,e._b({tag:"component"},"component",e.componentOptions,!1),[e._l(e.blockChildren,function(o,r){return t("render-block",{key:"render-block-"+o.id,attrs:{block:o,context:e.context}})}),e._l(e.blockChildren,function(o,r){return t("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:e.context}})})],2):e._e()},m=[],p=l.normalizeComponent(a,d,m,!1,null,null,null,null);const u=p.exports;exports.default=u;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as h } from "vue";
|
|
2
|
-
import { s as b, n as f, i as m, B as I, C as R, F as _, I as E, S as F, d as V, e as A, V as U, r as P, b as g, T as w, c as j, h as H, j as $, k as y, l as W, m as L, _ as v, o as M, p as q, q as B } from "./index.
|
|
3
|
-
import { e as S } from "./evaluate.
|
|
2
|
+
import { s as b, n as f, i as m, B as I, C as R, F as _, I as E, S as F, d as V, e as A, V as U, r as P, b as g, T as w, c as j, h as H, j as $, k as y, l as W, m as L, _ as v, o as M, p as q, q as B } from "./index.a1dfdaec.js";
|
|
3
|
+
import { e as S } from "./evaluate.f654f563.js";
|
|
4
4
|
const N = {
|
|
5
5
|
name: "Core:Button",
|
|
6
6
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
@@ -854,7 +854,7 @@ const fe = he.exports, ge = {
|
|
|
854
854
|
{ component: V, ...J },
|
|
855
855
|
{ component: A, ...Y },
|
|
856
856
|
{ component: U, ...G }
|
|
857
|
-
], xe = "0.4.
|
|
857
|
+
], xe = "0.4.4", ye = () => {
|
|
858
858
|
P("insertMenu", {
|
|
859
859
|
name: "_default",
|
|
860
860
|
default: !0,
|
|
@@ -995,12 +995,12 @@ const Se = (t, e, n = !0) => {
|
|
|
995
995
|
...e
|
|
996
996
|
},
|
|
997
997
|
meta: t == null ? void 0 : t.meta
|
|
998
|
-
} : void 0, Ie = () => import("./index.
|
|
998
|
+
} : void 0, Ie = () => import("./index.a1dfdaec.js").then((t) => t.A).then((t) => t.default).catch((t) => {
|
|
999
999
|
throw console.error(
|
|
1000
1000
|
"Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",
|
|
1001
1001
|
t
|
|
1002
1002
|
), t;
|
|
1003
|
-
}), Re = () => import("./render-styles.
|
|
1003
|
+
}), Re = () => import("./render-styles.43e1e2a4.js").then((t) => t.default).catch((t) => {
|
|
1004
1004
|
throw console.error(
|
|
1005
1005
|
"Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",
|
|
1006
1006
|
t
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),o=require("./index.3d5a7a37.cjs"),g=require("./evaluate.d837a845.cjs"),v={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},S={name:"Columns",inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:o.serializeFn(t=>{function e(){n.forEach(i=>{i.delete("width")})}const n=t.get("columns");Array.isArray(n)&&!!n.find(a=>a.get("width"))&&(!!n.find(r=>!r.get("width"))||n.reduce((d,l)=>d+l.get("width"),0)!==100)&&e()})},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},C={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},k={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:o.serializeFn(t=>{t.delete("srcset"),t.delete("noWebp");function n(s,d=6e4){return new Promise((l,u)=>{const c=document.createElement("img");let p=!1;c.onload=()=>{p=!0,l(c)},c.addEventListener("error",m=>{console.warn("Image load failed",m.error),u(m.error)}),c.src=s,setTimeout(()=>{p||u(new Error("Image load timed out"))},d)})}function i(s){return Math.round(s*1e3)/1e3}const a=t.get("image"),r=t.get("aspectRatio");if(fetch(a).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&t.set("noWebp",!0)}),a&&(!r||r===.7041))return n(a).then(s=>{const d=t.get("aspectRatio");t.get("image")===a&&(!d||d===.7041)&&s.width&&s.height&&(t.set("aspectRatio",i(s.height/s.width)),t.set("height",s.height),t.set("width",s.width))})})},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},T={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},w={name:"Symbol",noWrap:!0,static:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},R={name:"Text",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}},I={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},_={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:o.serializeFn(t=>{const e=t.get("url");if(e)return t.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${e}&api_key=ae0e60e78201a3f2b0de4b`).then(i=>i.json()).then(i=>{t.get("url")===e&&(i.html?t.set("content",i.html):t.set("content","Invalid url, please try another"))}).catch(i=>{t.set("content","There was an error embedding this URL, please try again or another URL")});t.delete("content")})},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},E=["text/javascript","application/javascript","application/ecmascript"],F=t=>E.includes(t.type),A=h.defineComponent({name:"builder-embed",props:["content"],data(){return{scriptsInserted:[],scriptsRun:[],ranInitFn:!1}},watch:{onUpdateHook0:{handler(){this.$refs.elem&&!this.ranInitFn&&(this.ranInitFn=!0,this.findAndRunScripts())},immediate:!0}},computed:{onUpdateHook0(){return{0:this.$refs.elem,1:this.ranInitFn}}},methods:{findAndRunScripts(){if(!this.$refs.elem||!this.$refs.elem.getElementsByTagName)return;const t=this.$refs.elem.getElementsByTagName("script");for(let e=0;e<t.length;e++){const n=t[e];if(n.src&&!this.scriptsInserted.includes(n.src)){this.scriptsInserted.push(n.src);const i=document.createElement("script");i.async=!0,i.src=n.src,document.head.appendChild(i)}else if(F(n)&&!this.scriptsRun.includes(n.innerText))try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(i){console.warn("`Embed`: Error running script:",i)}}}}});var V=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:e._s(e.content)}})},P=[],U=o.normalizeComponent(A,V,P,!1,null,null,null,null);const j=U.exports,H=h.defineComponent({name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:o.isEditing}},methods:{filterAttrs:function(e={},n){const i="v-on:";return Object.keys(e).filter(a=>{if(!e[a])return!1;const r=a.startsWith(i);return n?r:!r}).reduce((a,r)=>({...a,[r.replace(i,"")]:e[r]}),{})}}});var $=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("img",e._g(e._b({key:e.isEditing()&&e.imgSrc||"default-key",style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},attrs:{alt:e.altText,src:e.imgSrc||e.image}},"img",e.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)))},W=[],M=o.normalizeComponent(H,$,W,!1,null,null,null,null);const q=M.exports,L={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},B=h.defineComponent({name:"builder-custom-code",props:["replaceNodes","code"],data(){return{scriptsInserted:[],scriptsRun:[]}},mounted(){this.findAndRunScripts()},methods:{findAndRunScripts(){if(this.$refs.elem&&this.$refs.elem.getElementsByTagName&&typeof window<"u"){const t=this.$refs.elem.getElementsByTagName("script");for(let e=0;e<t.length;e++){const n=t[e];if(n.src){if(this.scriptsInserted.includes(n.src))continue;this.scriptsInserted.push(n.src);const i=document.createElement("script");i.async=!0,i.src=n.src,document.head.appendChild(i)}else if(!n.type||["text/javascript","application/javascript","application/ecmascript"].includes(n.type)){if(this.scriptsRun.includes(n.innerText))continue;try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(i){console.warn("`CustomCode`: Error running script:",i)}}}}},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const i of n)e[i]=!0;return e}}});var N=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{ref:"elem",class:e._classStringToObject("builder-custom-code"+(e.replaceNodes?" replace-nodes":"")),domProps:{innerHTML:e._s(e.code)}})},O=[],z=o.normalizeComponent(B,N,O,!1,null,null,null,null);const K=z.exports,D={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]},J=()=>[{component:o.Button,...v},{component:o.Columns,...S},{component:K,...D},{component:j,..._},{component:o.Fragment,...C},{component:o.Image,...k},{component:q,...L},{component:o.Section,...T},{component:o.Symbol,...w},{component:o.Text,...R},{component:o.Video,...I}],G="0.4.3",Y=()=>{o.register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let b=!1;const X=(t={})=>{var e,n;b||(b=!0,o.isBrowser()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:o.TARGET,version:G,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:t}},"*"),window.addEventListener("message",({data:i})=>{var a,r;if(!!(i!=null&&i.type))switch(i.type){case"builder.evaluate":{const s=i.data.text,d=i.data.arguments||[],l=i.data.id,u=new Function(s);let c,p=null;try{c=u.apply(null,d)}catch(m){p=m}p?(a=window.parent)==null||a.postMessage({type:"builder.evaluateError",data:{id:l,error:p.message}},"*"):c&&typeof c.then=="function"?c.then(m=>{var f;(f=window.parent)==null||f.postMessage({type:"builder.evaluateResult",data:{id:l,result:m}},"*")}).catch(console.error):(r=window.parent)==null||r.postMessage({type:"builder.evaluateResult",data:{result:c,id:l}},"*");break}}})))};function x(t){return Math.round(t*1e3)/1e3}const Q=(t,e,n=!0)=>{if(!(t instanceof HTMLElement))return null;let i=n?t:t.parentElement;do{if(!i)return null;if(e(i))return i}while(i=i.parentElement);return null},Z=t=>Q(t,e=>{const n=e.getAttribute("builder-id")||e.id;return Boolean((n==null?void 0:n.indexOf("builder-"))===0)}),y=({event:t,target:e})=>{const n=e.getBoundingClientRect(),i=t.clientX-n.left,a=t.clientY-n.top,r=x(i/n.width),s=x(a/n.height);return{x:r,y:s}},ee=t=>{const e=t.target,n=e&&Z(e),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:e?y({event:t,target:e}):void 0,builderTargetOffset:n?y({event:t,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},te=({content:t,data:e,locale:n})=>{var r,s,d;const i={};(s=(r=t==null?void 0:t.data)==null?void 0:r.inputs)==null||s.forEach(l=>{var u;l.name&&l.defaultValue!==void 0&&((u=t==null?void 0:t.data)==null?void 0:u.state)&&t.data.state[l.name]===void 0&&(i[l.name]=l.defaultValue)});const a={...(d=t==null?void 0:t.data)==null?void 0:d.state,...e,...n?{locale:n}:{}};return{...i,...a}},ne=({content:t,data:e})=>t?{...t,data:{...t==null?void 0:t.data,...e},meta:t==null?void 0:t.meta}:void 0,ie=()=>Promise.resolve().then(()=>require("./index.3d5a7a37.cjs")).then(t=>t.renderBlocks$1).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",t),t}),ae=()=>Promise.resolve().then(()=>require("./render-styles.f1413001.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",t),t}),oe=h.defineComponent({name:"render-content",components:{RenderContentStyles:ae,RenderBlocks:ie},props:["canTrack","model","context","apiKey","content","parentContentId","data","locale","apiVersion","customComponents","hideContent","classNameProp","isSsrAbTest","includeRefs","enrich"],data(){var t;return{forceReRenderCount:0,overrideContent:null,update:0,canTrackToUse:o.checkIsDefined(this.canTrack)?this.canTrack:!0,httpReqsData:{},clicked:!1,scriptStr:o.getRenderContentScriptString({contentId:(t=this.content)==null?void 0:t.id,parentContentId:this.parentContentId}),builderContextSignal:{content:ne({content:this.content,data:this.data}),localState:void 0,rootState:te({content:this.content,data:this.data,locale:this.locale}),rootSetState:this.contentSetState,context:this.context||{},apiKey:this.apiKey,apiVersion:this.apiVersion,registeredComponents:[...J(),...o.components,...this.customComponents||[]].reduce((e,{component:n,...i})=>({...e,[i.name]:{component:n,...i}}),{}),inheritedStyles:{}},builderContext:o.BuilderContext,TARGET:o.TARGET}},provide(){const t=this;return{[o.BuilderContext.key]:t.builderContextSignal}},mounted(){var t,e;if(this.apiKey||o.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),o.isBrowser()){if(o.isEditing()&&(this.forceReRenderCount=this.forceReRenderCount+1,Y(),X({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{},...this.enrich?{enrich:this.enrich}:{}}),Object.values(this.builderContextSignal.registeredComponents).forEach(n=>{var a;const i=o.createRegisterComponentMessage(n);(a=window.parent)==null||a.postMessage(i,"*")}),window.addEventListener("message",this.processMessage),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.builderContextSignal.content){const n=(t=this.builderContextSignal.content)==null?void 0:t.testVariationId,i=(e=this.builderContextSignal.content)==null?void 0:e.id;o._track({type:"impression",canTrack:this.canTrackToUse,contentId:i,apiKey:this.apiKey,variationId:n!==i?n:void 0})}if(o.isPreviewing()){const n=new URL(location.href).searchParams,i=n.get("builder.preview"),a=n.get(`builder.preview.${i}`),r=n.get("apiKey")||n.get("builder.space");i===this.model&&r===this.apiKey&&(!this.content||a===this.content.id)&&o.getContent({model:this.model,apiKey:this.apiKey,apiVersion:this.apiVersion}).then(s=>{s&&this.mergeNewContent(s)})}this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()}},watch:{onUpdateHook0:{handler(){this.content&&this.mergeNewContent(this.content)},immediate:!0},onUpdateHook1:{handler(){this.evaluateJsCode()},immediate:!0},onUpdateHook2:{handler(){this.runHttpRequests()},immediate:!0},onUpdateHook3:{handler(){this.emitStateUpdate()},immediate:!0}},unmounted(){o.isBrowser()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{onUpdateHook0(){return{0:this.content}},onUpdateHook1(){var t,e;return{0:(e=(t=this.builderContextSignal.content)==null?void 0:t.data)==null?void 0:e.jsCode,1:this.builderContextSignal.rootState}},onUpdateHook2(){var t,e;return{0:(e=(t=this.builderContextSignal.content)==null?void 0:t.data)==null?void 0:e.httpRequests}},onUpdateHook3(){return{0:this.builderContextSignal.rootState}}},methods:{mergeNewContent(t){var e,n,i,a,r;this.builderContextSignal.content={...this.builderContextSignal.content,...t,data:{...(e=this.builderContextSignal.content)==null?void 0:e.data,...t==null?void 0:t.data},meta:{...(n=this.builderContextSignal.content)==null?void 0:n.meta,...t==null?void 0:t.meta,breakpoints:((i=t==null?void 0:t.meta)==null?void 0:i.breakpoints)||((r=(a=this.builderContextSignal.content)==null?void 0:a.meta)==null?void 0:r.breakpoints)}}},setBreakpoints(t){var e;this.builderContextSignal.content={...this.builderContextSignal.content,meta:{...(e=this.builderContextSignal.content)==null?void 0:e.meta,breakpoints:t}}},contentSetState(t){this.builderContextSignal.rootState=t},processMessage(t){var n;const{data:e}=t;if(e)switch(e.type){case"builder.configureSdk":{const i=e.data,{breakpoints:a,contentId:r}=i;if(!r||r!==((n=this.builderContextSignal.content)==null?void 0:n.id))return;a&&this.setBreakpoints(a),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const i=e.data,a=i.key||i.alias||i.entry||i.modelName,r=i.data;a===this.model&&(this.mergeNewContent(r),this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var e,n;const t=(n=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:n.jsCode;t&&g.evaluate({code:t,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.contentSetState})},onClick(t){var e,n;if(this.builderContextSignal.content){const i=(e=this.builderContextSignal.content)==null?void 0:e.testVariationId,a=(n=this.builderContextSignal.content)==null?void 0:n.id;o._track({type:"click",canTrack:this.canTrackToUse,contentId:a,apiKey:this.apiKey,variationId:i!==a?i:void 0,...ee(t),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(t){return t.replace(/{{([^}]+)}}/g,(e,n)=>g.evaluate({code:n,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.contentSetState}))},handleRequest({url:t,key:e}){o.fetch(t).then(n=>n.json()).then(n=>{const i={...this.builderContextSignal.rootState,[e]:n};this.contentSetState(i)}).catch(n=>{console.error("error fetching dynamic data",t,n)})},runHttpRequests(){var e,n,i;const t=(i=(n=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:n.httpRequests)!=null?i:{};Object.entries(t).forEach(([a,r])=>{if(r&&(!this.httpReqsData[a]||o.isEditing())){const s=this.evalExpression(r);this.handleRequest({url:s,key:a})}})},emitStateUpdate(){o.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:this.builderContextSignal.rootState,ref:{name:this.model}}}))},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const i of n)e[i]=!0;return e}}});var re=function(){var i,a,r,s,d,l,u,c;var e=this,n=e._self._c;return e._self._setupProxy,e.builderContextSignal.content?n("div",e._b({ref:"elementRef",class:e._classStringToObject(e.classNameProp),attrs:{"builder-content-id":(i=e.builderContextSignal.content)==null?void 0:i.id,"builder-model":e.model},on:{click:function(p){return e.onClick(p)}}},"div",{...e.TARGET==="reactNative"?{dataSet:{"builder-content-id":""}}:{},...e.hideContent?{hidden:!0,"aria-hidden":!0}:{}},!1),[e.isSsrAbTest?[n("script",{tag:"component",domProps:{innerHTML:e._s(e.scriptStr)}})]:e._e(),e.TARGET!=="reactNative"?[n("render-content-styles",{attrs:{contentId:(a=e.builderContextSignal.content)==null?void 0:a.id,cssCode:(s=(r=e.builderContextSignal.content)==null?void 0:r.data)==null?void 0:s.cssCode,customFonts:(l=(d=e.builderContextSignal.content)==null?void 0:d.data)==null?void 0:l.customFonts}})]:e._e(),n("render-blocks",{key:e.forceReRenderCount,attrs:{blocks:(c=(u=e.builderContextSignal.content)==null?void 0:u.data)==null?void 0:c.blocks}})],2):e._e()},se=[],le=o.normalizeComponent(oe,re,se,!1,null,null,null,null);const de=le.exports;exports.default=de;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),o=require("./index.a4e21f82.cjs"),g=require("./evaluate.10e091b0.cjs"),v={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},S={name:"Columns",inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:o.serializeFn(t=>{function e(){n.forEach(i=>{i.delete("width")})}const n=t.get("columns");Array.isArray(n)&&!!n.find(a=>a.get("width"))&&(!!n.find(r=>!r.get("width"))||n.reduce((d,l)=>d+l.get("width"),0)!==100)&&e()})},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},C={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},k={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:o.serializeFn(t=>{t.delete("srcset"),t.delete("noWebp");function n(s,d=6e4){return new Promise((l,u)=>{const c=document.createElement("img");let p=!1;c.onload=()=>{p=!0,l(c)},c.addEventListener("error",m=>{console.warn("Image load failed",m.error),u(m.error)}),c.src=s,setTimeout(()=>{p||u(new Error("Image load timed out"))},d)})}function i(s){return Math.round(s*1e3)/1e3}const a=t.get("image"),r=t.get("aspectRatio");if(fetch(a).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&t.set("noWebp",!0)}),a&&(!r||r===.7041))return n(a).then(s=>{const d=t.get("aspectRatio");t.get("image")===a&&(!d||d===.7041)&&s.width&&s.height&&(t.set("aspectRatio",i(s.height/s.width)),t.set("height",s.height),t.set("width",s.width))})})},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},T={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},w={name:"Symbol",noWrap:!0,static:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},R={name:"Text",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}},I={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},_={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:o.serializeFn(t=>{const e=t.get("url");if(e)return t.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${e}&api_key=ae0e60e78201a3f2b0de4b`).then(i=>i.json()).then(i=>{t.get("url")===e&&(i.html?t.set("content",i.html):t.set("content","Invalid url, please try another"))}).catch(i=>{t.set("content","There was an error embedding this URL, please try again or another URL")});t.delete("content")})},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},E=["text/javascript","application/javascript","application/ecmascript"],F=t=>E.includes(t.type),A=h.defineComponent({name:"builder-embed",props:["content"],data(){return{scriptsInserted:[],scriptsRun:[],ranInitFn:!1}},watch:{onUpdateHook0:{handler(){this.$refs.elem&&!this.ranInitFn&&(this.ranInitFn=!0,this.findAndRunScripts())},immediate:!0}},computed:{onUpdateHook0(){return{0:this.$refs.elem,1:this.ranInitFn}}},methods:{findAndRunScripts(){if(!this.$refs.elem||!this.$refs.elem.getElementsByTagName)return;const t=this.$refs.elem.getElementsByTagName("script");for(let e=0;e<t.length;e++){const n=t[e];if(n.src&&!this.scriptsInserted.includes(n.src)){this.scriptsInserted.push(n.src);const i=document.createElement("script");i.async=!0,i.src=n.src,document.head.appendChild(i)}else if(F(n)&&!this.scriptsRun.includes(n.innerText))try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(i){console.warn("`Embed`: Error running script:",i)}}}}});var V=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:e._s(e.content)}})},P=[],U=o.normalizeComponent(A,V,P,!1,null,null,null,null);const j=U.exports,H=h.defineComponent({name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:o.isEditing}},methods:{filterAttrs:function(e={},n){const i="v-on:";return Object.keys(e).filter(a=>{if(!e[a])return!1;const r=a.startsWith(i);return n?r:!r}).reduce((a,r)=>({...a,[r.replace(i,"")]:e[r]}),{})}}});var $=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("img",e._g(e._b({key:e.isEditing()&&e.imgSrc||"default-key",style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},attrs:{alt:e.altText,src:e.imgSrc||e.image}},"img",e.filterAttrs(e.attributes,!1),!1),e.filterAttrs(e.attributes,!0)))},W=[],M=o.normalizeComponent(H,$,W,!1,null,null,null,null);const q=M.exports,L={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},B=h.defineComponent({name:"builder-custom-code",props:["replaceNodes","code"],data(){return{scriptsInserted:[],scriptsRun:[]}},mounted(){this.findAndRunScripts()},methods:{findAndRunScripts(){if(this.$refs.elem&&this.$refs.elem.getElementsByTagName&&typeof window<"u"){const t=this.$refs.elem.getElementsByTagName("script");for(let e=0;e<t.length;e++){const n=t[e];if(n.src){if(this.scriptsInserted.includes(n.src))continue;this.scriptsInserted.push(n.src);const i=document.createElement("script");i.async=!0,i.src=n.src,document.head.appendChild(i)}else if(!n.type||["text/javascript","application/javascript","application/ecmascript"].includes(n.type)){if(this.scriptsRun.includes(n.innerText))continue;try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(i){console.warn("`CustomCode`: Error running script:",i)}}}}},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const i of n)e[i]=!0;return e}}});var N=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("div",{ref:"elem",class:e._classStringToObject("builder-custom-code"+(e.replaceNodes?" replace-nodes":"")),domProps:{innerHTML:e._s(e.code)}})},O=[],z=o.normalizeComponent(B,N,O,!1,null,null,null,null);const K=z.exports,D={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]},J=()=>[{component:o.Button,...v},{component:o.Columns,...S},{component:K,...D},{component:j,..._},{component:o.Fragment,...C},{component:o.Image,...k},{component:q,...L},{component:o.Section,...T},{component:o.Symbol,...w},{component:o.Text,...R},{component:o.Video,...I}],G="0.4.4",Y=()=>{o.register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let b=!1;const X=(t={})=>{var e,n;b||(b=!0,o.isBrowser()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:o.TARGET,version:G,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:t}},"*"),window.addEventListener("message",({data:i})=>{var a,r;if(!!(i!=null&&i.type))switch(i.type){case"builder.evaluate":{const s=i.data.text,d=i.data.arguments||[],l=i.data.id,u=new Function(s);let c,p=null;try{c=u.apply(null,d)}catch(m){p=m}p?(a=window.parent)==null||a.postMessage({type:"builder.evaluateError",data:{id:l,error:p.message}},"*"):c&&typeof c.then=="function"?c.then(m=>{var f;(f=window.parent)==null||f.postMessage({type:"builder.evaluateResult",data:{id:l,result:m}},"*")}).catch(console.error):(r=window.parent)==null||r.postMessage({type:"builder.evaluateResult",data:{result:c,id:l}},"*");break}}})))};function x(t){return Math.round(t*1e3)/1e3}const Q=(t,e,n=!0)=>{if(!(t instanceof HTMLElement))return null;let i=n?t:t.parentElement;do{if(!i)return null;if(e(i))return i}while(i=i.parentElement);return null},Z=t=>Q(t,e=>{const n=e.getAttribute("builder-id")||e.id;return Boolean((n==null?void 0:n.indexOf("builder-"))===0)}),y=({event:t,target:e})=>{const n=e.getBoundingClientRect(),i=t.clientX-n.left,a=t.clientY-n.top,r=x(i/n.width),s=x(a/n.height);return{x:r,y:s}},ee=t=>{const e=t.target,n=e&&Z(e),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:e?y({event:t,target:e}):void 0,builderTargetOffset:n?y({event:t,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},te=({content:t,data:e,locale:n})=>{var r,s,d;const i={};(s=(r=t==null?void 0:t.data)==null?void 0:r.inputs)==null||s.forEach(l=>{var u;l.name&&l.defaultValue!==void 0&&((u=t==null?void 0:t.data)==null?void 0:u.state)&&t.data.state[l.name]===void 0&&(i[l.name]=l.defaultValue)});const a={...(d=t==null?void 0:t.data)==null?void 0:d.state,...e,...n?{locale:n}:{}};return{...i,...a}},ne=({content:t,data:e})=>t?{...t,data:{...t==null?void 0:t.data,...e},meta:t==null?void 0:t.meta}:void 0,ie=()=>Promise.resolve().then(()=>require("./index.a4e21f82.cjs")).then(t=>t.renderBlocks$1).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",t),t}),ae=()=>Promise.resolve().then(()=>require("./render-styles.ad11935f.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderContentStyles at ./components/render-styles.vue",t),t}),oe=h.defineComponent({name:"render-content",components:{RenderContentStyles:ae,RenderBlocks:ie},props:["canTrack","model","context","apiKey","content","parentContentId","data","locale","apiVersion","customComponents","hideContent","classNameProp","isSsrAbTest","includeRefs","enrich"],data(){var t;return{forceReRenderCount:0,overrideContent:null,update:0,canTrackToUse:o.checkIsDefined(this.canTrack)?this.canTrack:!0,httpReqsData:{},clicked:!1,scriptStr:o.getRenderContentScriptString({contentId:(t=this.content)==null?void 0:t.id,parentContentId:this.parentContentId}),builderContextSignal:{content:ne({content:this.content,data:this.data}),localState:void 0,rootState:te({content:this.content,data:this.data,locale:this.locale}),rootSetState:this.contentSetState,context:this.context||{},apiKey:this.apiKey,apiVersion:this.apiVersion,registeredComponents:[...J(),...o.components,...this.customComponents||[]].reduce((e,{component:n,...i})=>({...e,[i.name]:{component:n,...i}}),{}),inheritedStyles:{}},builderContext:o.BuilderContext,TARGET:o.TARGET}},provide(){const t=this;return{[o.BuilderContext.key]:t.builderContextSignal}},mounted(){var t,e;if(this.apiKey||o.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),o.isBrowser()){if(o.isEditing()&&(this.forceReRenderCount=this.forceReRenderCount+1,Y(),X({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{},...this.enrich?{enrich:this.enrich}:{}}),Object.values(this.builderContextSignal.registeredComponents).forEach(n=>{var a;const i=o.createRegisterComponentMessage(n);(a=window.parent)==null||a.postMessage(i,"*")}),window.addEventListener("message",this.processMessage),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.builderContextSignal.content){const n=(t=this.builderContextSignal.content)==null?void 0:t.testVariationId,i=(e=this.builderContextSignal.content)==null?void 0:e.id;o._track({type:"impression",canTrack:this.canTrackToUse,contentId:i,apiKey:this.apiKey,variationId:n!==i?n:void 0})}if(o.isPreviewing()){const n=new URL(location.href).searchParams,i=n.get("builder.preview"),a=n.get(`builder.preview.${i}`),r=n.get("apiKey")||n.get("builder.space");i===this.model&&r===this.apiKey&&(!this.content||a===this.content.id)&&o.getContent({model:this.model,apiKey:this.apiKey,apiVersion:this.apiVersion}).then(s=>{s&&this.mergeNewContent(s)})}this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()}},watch:{onUpdateHook0:{handler(){this.content&&this.mergeNewContent(this.content)},immediate:!0},onUpdateHook1:{handler(){this.evaluateJsCode()},immediate:!0},onUpdateHook2:{handler(){this.runHttpRequests()},immediate:!0},onUpdateHook3:{handler(){this.emitStateUpdate()},immediate:!0}},unmounted(){o.isBrowser()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{onUpdateHook0(){return{0:this.content}},onUpdateHook1(){var t,e;return{0:(e=(t=this.builderContextSignal.content)==null?void 0:t.data)==null?void 0:e.jsCode,1:this.builderContextSignal.rootState}},onUpdateHook2(){var t,e;return{0:(e=(t=this.builderContextSignal.content)==null?void 0:t.data)==null?void 0:e.httpRequests}},onUpdateHook3(){return{0:this.builderContextSignal.rootState}}},methods:{mergeNewContent(t){var e,n,i,a,r;this.builderContextSignal.content={...this.builderContextSignal.content,...t,data:{...(e=this.builderContextSignal.content)==null?void 0:e.data,...t==null?void 0:t.data},meta:{...(n=this.builderContextSignal.content)==null?void 0:n.meta,...t==null?void 0:t.meta,breakpoints:((i=t==null?void 0:t.meta)==null?void 0:i.breakpoints)||((r=(a=this.builderContextSignal.content)==null?void 0:a.meta)==null?void 0:r.breakpoints)}}},setBreakpoints(t){var e;this.builderContextSignal.content={...this.builderContextSignal.content,meta:{...(e=this.builderContextSignal.content)==null?void 0:e.meta,breakpoints:t}}},contentSetState(t){this.builderContextSignal.rootState=t},processMessage(t){var n;const{data:e}=t;if(e)switch(e.type){case"builder.configureSdk":{const i=e.data,{breakpoints:a,contentId:r}=i;if(!r||r!==((n=this.builderContextSignal.content)==null?void 0:n.id))return;a&&this.setBreakpoints(a),this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const i=e.data,a=i.key||i.alias||i.entry||i.modelName,r=i.data;a===this.model&&(this.mergeNewContent(r),this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var e,n;const t=(n=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:n.jsCode;t&&g.evaluate({code:t,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.contentSetState})},onClick(t){var e,n;if(this.builderContextSignal.content){const i=(e=this.builderContextSignal.content)==null?void 0:e.testVariationId,a=(n=this.builderContextSignal.content)==null?void 0:n.id;o._track({type:"click",canTrack:this.canTrackToUse,contentId:a,apiKey:this.apiKey,variationId:i!==a?i:void 0,...ee(t),unique:!this.clicked})}this.clicked||(this.clicked=!0)},evalExpression(t){return t.replace(/{{([^}]+)}}/g,(e,n)=>g.evaluate({code:n,context:this.context||{},localState:void 0,rootState:this.builderContextSignal.rootState,rootSetState:this.contentSetState}))},handleRequest({url:t,key:e}){o.fetch(t).then(n=>n.json()).then(n=>{const i={...this.builderContextSignal.rootState,[e]:n};this.contentSetState(i)}).catch(n=>{console.error("error fetching dynamic data",t,n)})},runHttpRequests(){var e,n,i;const t=(i=(n=(e=this.builderContextSignal.content)==null?void 0:e.data)==null?void 0:n.httpRequests)!=null?i:{};Object.entries(t).forEach(([a,r])=>{if(r&&(!this.httpReqsData[a]||o.isEditing())){const s=this.evalExpression(r);this.handleRequest({url:s,key:a})}})},emitStateUpdate(){o.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:this.builderContextSignal.rootState,ref:{name:this.model}}}))},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const i of n)e[i]=!0;return e}}});var re=function(){var i,a,r,s,d,l,u,c;var e=this,n=e._self._c;return e._self._setupProxy,e.builderContextSignal.content?n("div",e._b({ref:"elementRef",class:e._classStringToObject(e.classNameProp),attrs:{"builder-content-id":(i=e.builderContextSignal.content)==null?void 0:i.id,"builder-model":e.model},on:{click:function(p){return e.onClick(p)}}},"div",{...e.TARGET==="reactNative"?{dataSet:{"builder-content-id":""}}:{},...e.hideContent?{hidden:!0,"aria-hidden":!0}:{}},!1),[e.isSsrAbTest?[n("script",{tag:"component",domProps:{innerHTML:e._s(e.scriptStr)}})]:e._e(),e.TARGET!=="reactNative"?[n("render-content-styles",{attrs:{contentId:(a=e.builderContextSignal.content)==null?void 0:a.id,cssCode:(s=(r=e.builderContextSignal.content)==null?void 0:r.data)==null?void 0:s.cssCode,customFonts:(l=(d=e.builderContextSignal.content)==null?void 0:d.data)==null?void 0:l.customFonts}})]:e._e(),n("render-blocks",{key:e.forceReRenderCount,attrs:{blocks:(c=(u=e.builderContextSignal.content)==null?void 0:u.data)==null?void 0:c.blocks}})],2):e._e()},se=[],le=o.normalizeComponent(oe,re,se,!1,null,null,null,null);const de=le.exports;exports.default=de;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),s=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),s=require("./index.a4e21f82.cjs"),t=r.defineComponent({name:"render-inlined-styles",props:["styles","id"]});var l=function(){var e=this,n=e._self._c;return e._self._setupProxy,n("style",{tag:"component",attrs:{id:e.id},domProps:{innerHTML:e._s(e.styles)}})},o=[],i=s.normalizeComponent(t,l,o,!1,null,null,null,null);const d=i.exports;exports.default=d;
|
package/packages/_vue2/dist/{render-repeated-block.d3c2411b.js → render-repeated-block.7f4862b2.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as o } from "vue";
|
|
2
|
-
import { k as n, n as c } from "./index.
|
|
3
|
-
const l = () => import("./render-block.
|
|
2
|
+
import { k as n, n as c } from "./index.a1dfdaec.js";
|
|
3
|
+
const l = () => import("./render-block.df744a97.js").then((e) => e.default).catch((e) => {
|
|
4
4
|
throw console.error(
|
|
5
5
|
"Error while attempting to dynamically import component RenderBlock at ./render-block.vue",
|
|
6
6
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),r=require("./index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),r=require("./index.a4e21f82.cjs"),c=()=>Promise.resolve().then(()=>require("./render-block.55b40822.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block.vue",e),e}),l=o.defineComponent({name:"render-repeated-block",components:{RenderBlock:c},props:["repeatContext","block"],data(){return{store:this.repeatContext}},provide(){const e=this;return{[r.BuilderContext.key]:e.store}}});var s=function(){var t=this,n=t._self._c;return t._self._setupProxy,n("render-block",{attrs:{block:t.block,context:t.store}})},a=[],i=r.normalizeComponent(l,s,a,!1,null,null,null,null);const d=i.exports;exports.default=d;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f } from "vue";
|
|
2
|
-
import { n as c } from "./index.
|
|
2
|
+
import { n as c } from "./index.a1dfdaec.js";
|
|
3
3
|
const d = (e) => {
|
|
4
4
|
var o, a;
|
|
5
5
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), r = t.split(",")[0], i = (a = e.fileUrl) != null ? a : (o = e == null ? void 0 : e.files) == null ? void 0 : o.regular;
|
|
@@ -32,7 +32,7 @@ font-weight: ${n};
|
|
|
32
32
|
}, u = ({
|
|
33
33
|
cssCode: e,
|
|
34
34
|
contentId: t
|
|
35
|
-
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", p = () => import("./render-inlined-styles.
|
|
35
|
+
}) => e ? t ? (e == null ? void 0 : e.replace(/&/g, `div[builder-content-id="${t}"]`)) || "" : e : "", p = () => import("./render-inlined-styles.36b7a3a4.js").then((e) => e.default).catch((e) => {
|
|
36
36
|
throw console.error(
|
|
37
37
|
"Error while attempting to dynamically import component RenderInlinedStyles at ../../render-inlined-styles.vue",
|
|
38
38
|
e
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),f=require("./index.a4e21f82.cjs"),d=e=>{var o,a;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),r=t.split(",")[0],i=(a=e.fileUrl)!=null?a:(o=e==null?void 0:e.files)==null?void 0:o.regular;let l="";if(i&&t&&r&&(l+=`
|
|
2
2
|
@font-face {
|
|
3
3
|
font-family: "${t}";
|
|
4
4
|
src: local("${r}"), url('${i}') format('woff2');
|
|
@@ -12,7 +12,7 @@ src: url('${s}') format('woff2');
|
|
|
12
12
|
font-display: fallback;
|
|
13
13
|
font-weight: ${n};
|
|
14
14
|
}
|
|
15
|
-
`.trim())}return l},u=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(r=>
|
|
15
|
+
`.trim())}return l},u=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(r=>d(r)))==null?void 0:t.join(" "))||""},m=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",p=()=>Promise.resolve().then(()=>require("./render-inlined-styles.469ed053.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}),h=c.defineComponent({name:"render-content-styles",components:{RenderInlinedStyles:p},props:["cssCode","contentId","customFonts"],data(){return{injectedStyles:`
|
|
16
16
|
${m({cssCode:this.cssCode,contentId:this.contentId})}
|
|
17
17
|
${u({customFonts:this.customFonts})}
|
|
18
18
|
|
|
@@ -28,4 +28,4 @@ ${u({customFonts:this.customFonts})}
|
|
|
28
28
|
text-align: inherit;
|
|
29
29
|
font-family: inherit;
|
|
30
30
|
}
|
|
31
|
-
`.trim()}}});var y=function(){var t=this,r=t._self._c;return t._self._setupProxy,r("render-inlined-styles",{attrs:{styles:t.injectedStyles}})},g=[],_=
|
|
31
|
+
`.trim()}}});var y=function(){var t=this,r=t._self._c;return t._self._setupProxy,r("render-inlined-styles",{attrs:{styles:t.injectedStyles}})},g=[],_=f.normalizeComponent(h,y,g,!1,null,null,null,null);const b=_.exports;exports.default=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.a4e21f82.cjs");require("vue");exports.Button=e.Button;exports.Columns=e.Columns;exports.Fragment=e.Fragment;exports.Image=e.Image;exports.RenderBlocks=e.renderBlocks;exports.RenderContent=e.renderContentVariants;exports.Section=e.Section;exports.Symbol=e.Symbol;exports.Text=e.Text;exports.Video=e.Video;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.processContentResult=e.processContentResult;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.track=e.track;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as a, C as n, F as o, I as r, y as i, z as g, S as m, d, e as l, V as C, m as c, u as p, w as u, p as S, i as B, o as R, v as x, r as k, t as v, x as w } from "./index.
|
|
1
|
+
import { B as a, C as n, F as o, I as r, y as i, z as g, S as m, d, e as l, V as C, m as c, u as p, w as u, p as S, i as B, o as R, v as x, r as k, t as v, x as w } from "./index.a1dfdaec.js";
|
|
2
2
|
import "vue";
|
|
3
3
|
export {
|
|
4
4
|
a as Button,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.4.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.4";
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
`}},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),o=`${t}px`,i="100%",s=0;return{width:n,"margin-left":o,"--column-width-mobile":this.getMobileStyle({stackedStyle:i,desktopStyle:n}),"--column-margin-left-mobile":this.getMobileStyle({stackedStyle:s,desktopStyle:o}),"--column-width-tablet":this.getTabletStyle({stackedStyle:i,desktopStyle:n}),"--column-margin-left-tablet":this.getTabletStyle({stackedStyle:s,desktopStyle:o})}},getWidthForBreakpointSize(e){var n,o;return ee(((o=(n=this.builderContext.content)==null?void 0:n.meta)==null?void 0:o.breakpoints)||{})[e].max},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const o of n)t[o]=!0;return t}}});function $t(e,t,n,o,i,s){const a=r.resolveComponent("render-inlined-styles"),c=r.resolveComponent("render-blocks");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(e._classStringToObject(`builder-columns ${e.builderBlock.id}-breakpoints div-1eih9th5ow6`)),style:r.normalizeStyle(e.columnsCssVars),dataSet:{"builder-block-name":"builder-columns"}},[e.TARGET!=="reactNative"?(r.openBlock(),r.createBlock(a,{key:0,styles:e.columnsStyles},null,8,["styles"])):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.columns,(l,d)=>(r.openBlock(),r.createElementBlock("div",{key:d,class:"builder-column div-1eih9th5ow6-2",style:r.normalizeStyle(e.columnCssVars(d)),dataSet:{"builder-block-name":"builder-column"}},[r.createVNode(c,{blocks:l.blocks,path:`component.options.columns.${d}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"}},null,8,["blocks","path","parent"])],4))),128))],6)}const re=f(Ct,[["render",$t],["__scopeId","data-v-df2fecd0"]]),wt=r.defineComponent({name:"builder-fragment-component",props:[]});function Bt(e,t,n,o,i,s){return r.openBlock(),r.createElementBlock("span",null,[r.renderSlot(e.$slots,"default")])}const ie=f(wt,[["render",Bt]]);function H(e){return e.replace(/http(s)?:/,"")}function Tt(e="",t,n){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),i=e.indexOf("?")!==-1?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+i+t+"="+encodeURIComponent(n)}function xt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return H(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=e.split(n[0]),i=n[3],s=t.match("x")?t:`${t}x`;return H(`${o[0]}_${s}${i}`)}return null}function P(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const o=Number(e.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),t.filter(i=>i!==o).map(i=>`${Tt(e,"width",i)} ${i}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[xt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([e]).join(", "):e}const It=r.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"),P(t)}else if(this.image&&!this.srcset)return P(t);return P(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 o of n)t[o]=!0;return t}}});const Et=["srcset"],Rt=["alt","role","src","srcset","sizes"],Vt={key:2,class:"div-256wrwn33ry-2"};function At(e,t,n,o,i,s){var a,c,l,d;return r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("picture",null,[e.webpSrcSet?(r.openBlock(),r.createElementBlock("source",{key:0,type:"image/webp",srcset:e.webpSrcSet},null,8,Et)):r.createCommentVNode("",!0),r.createElementVNode("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:r.normalizeStyle({objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...e.aspectRatioCss}),class:r.normalizeClass(e._classStringToObject("builder-image"+(e.className?" "+e.className:"")+" img-256wrwn33ry")),src:e.image,srcset:e.srcSetToUse,sizes:e.sizes},null,14,Rt)]),e.aspectRatio&&!(((c=(a=e.builderBlock)==null?void 0:a.children)==null?void 0:c.length)&&e.fitContent)?(r.openBlock(),r.createElementBlock("div",{key:0,class:"builder-image-sizer div-256wrwn33ry",style:r.normalizeStyle({paddingTop:e.aspectRatio*100+"%"})},null,4)):r.createCommentVNode("",!0),((d=(l=e.builderBlock)==null?void 0:l.children)==null?void 0:d.length)&&e.fitContent?r.renderSlot(e.$slots,"default",{key:1},void 0,!0):r.createCommentVNode("",!0),!e.fitContent&&e.children?(r.openBlock(),r.createElementBlock("div",Vt,[r.renderSlot(e.$slots,"default",{},void 0,!0)])):r.createCommentVNode("",!0)],64)}const se=f(It,[["render",At],["__scopeId","data-v-f59f4313"]]),_t=r.defineComponent({name:"builder-section-component",props:["maxWidth","attributes"],methods:{filterAttrs:function(t={},n){const o="v-on:";return Object.keys(t).filter(i=>{if(!t[i])return!1;const s=i.startsWith(o);return n?s:!s}).reduce((i,s)=>({...i,[s.replace(o,"")]:t[s]}),{})}}});function Pt(e,t,n,o,i,s){return r.openBlock(),r.createElementBlock("section",r.mergeProps({style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},e.filterAttrs(e.attributes,!1),r.toHandlers(e.filterAttrs(e.attributes,!0),!0)),[r.renderSlot(e.$slots,"default")],16)}const ae=f(_t,[["render",Pt]]),Nt={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},A=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},Ot={name:"Columns",inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:A(e=>{function t(){n.forEach(o=>{o.delete("width")})}const n=e.get("columns");Array.isArray(n)&&!!n.find(i=>i.get("width"))&&(!!n.find(s=>!s.get("width"))||n.reduce((c,l)=>c+l.get("width"),0)!==100)&&t()})},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},jt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Ft={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:A(e=>{e.delete("srcset"),e.delete("noWebp");function n(a,c=6e4){return new Promise((l,d)=>{const u=document.createElement("img");let p=!1;u.onload=()=>{p=!0,l(u)},u.addEventListener("error",m=>{console.warn("Image load failed",m.error),d(m.error)}),u.src=a,setTimeout(()=>{p||d(new Error("Image load timed out"))},c)})}function o(a){return Math.round(a*1e3)/1e3}const i=e.get("image"),s=e.get("aspectRatio");if(fetch(i).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),i&&(!s||s===.7041))return n(i).then(a=>{const c=e.get("aspectRatio");e.get("image")===i&&(!c||c===.7041)&&a.width&&a.height&&(e.set("aspectRatio",o(a.height/a.width)),e.set("height",a.height),e.set("width",a.width))})})},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},Ut={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},Mt={name:"Symbol",noWrap:!0,static:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},Lt={name:"Text",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}},Wt=r.defineComponent({name:"builder-text",props:["text"]}),Ht=["innerHTML"];function zt(e,t,n,o,i,s){return r.openBlock(),r.createElementBlock("span",{class:"builder-text",innerHTML:e.text,style:{outline:"none"}},null,8,Ht)}const le=f(Wt,[["render",zt]]),Kt={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},Dt=r.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}}}}),qt=["src","poster"];function Gt(e,t,n,o,i,s){var a;return r.openBlock(),r.createElementBlock("video",r.mergeProps({style:{width:"100%",height:"100%",...(a=e.attributes)==null?void 0:a.style,objectFit:e.fit,objectPosition:e.position,borderRadius:1},src:e.video||"no-src",poster:e.posterImage},e.spreadProps),null,16,qt)}const ce=f(Dt,[["render",Gt]]),Jt={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:A(e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(o=>o.json()).then(o=>{e.get("url")===t&&(o.html?e.set("content",o.html):e.set("content","Invalid url, please try another"))}).catch(o=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")})},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},Yt=["text/javascript","application/javascript","application/ecmascript"],Xt=e=>Yt.includes(e.type),Qt=r.defineComponent({name:"builder-embed",props:["content"],data(){return{scriptsInserted:[],scriptsRun:[],ranInitFn:!1}},watch:{onUpdateHook0:{handler(){this.$refs.elem&&!this.ranInitFn&&(this.ranInitFn=!0,this.findAndRunScripts())},immediate:!0}},computed:{onUpdateHook0(){return{0:this.$refs.elem,1:this.ranInitFn}}},methods:{findAndRunScripts(){if(!this.$refs.elem||!this.$refs.elem.getElementsByTagName)return;const e=this.$refs.elem.getElementsByTagName("script");for(let t=0;t<e.length;t++){const n=e[t];if(n.src&&!this.scriptsInserted.includes(n.src)){this.scriptsInserted.push(n.src);const o=document.createElement("script");o.async=!0,o.src=n.src,document.head.appendChild(o)}else if(Xt(n)&&!this.scriptsRun.includes(n.innerText))try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(o){console.warn("`Embed`: Error running script:",o)}}}}}),Zt=["innerHTML"];function en(e,t,n,o,i,s){return r.openBlock(),r.createElementBlock("div",{class:"builder-embed",ref:"elem",innerHTML:e.content},null,8,Zt)}const tn=f(Qt,[["render",en]]),nn=r.defineComponent({name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data(){return{isEditing:S}},methods:{filterAttrs:function(t={},n){const o="v-on:";return Object.keys(t).filter(i=>{if(!t[i])return!1;const s=i.startsWith(o);return n?s:!s}).reduce((i,s)=>({...i,[s.replace(o,"")]:t[s]}),{})}}}),on=["alt","src"];function rn(e,t,n,o,i,s){return r.openBlock(),r.createElementBlock("img",r.mergeProps({style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},key:e.isEditing()&&e.imgSrc||"default-key",alt:e.altText,src:e.imgSrc||e.image},e.filterAttrs(e.attributes,!1),r.toHandlers(e.filterAttrs(e.attributes,!0),!0)),null,16,on)}const sn=f(nn,[["render",rn]]),an={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},ln=r.defineComponent({name:"builder-custom-code",props:["replaceNodes","code"],data(){return{scriptsInserted:[],scriptsRun:[]}},mounted(){this.findAndRunScripts()},methods:{findAndRunScripts(){if(this.$refs.elem&&this.$refs.elem.getElementsByTagName&&typeof window<"u"){const e=this.$refs.elem.getElementsByTagName("script");for(let t=0;t<e.length;t++){const n=e[t];if(n.src){if(this.scriptsInserted.includes(n.src))continue;this.scriptsInserted.push(n.src);const o=document.createElement("script");o.async=!0,o.src=n.src,document.head.appendChild(o)}else if(!n.type||["text/javascript","application/javascript","application/ecmascript"].includes(n.type)){if(this.scriptsRun.includes(n.innerText))continue;try{this.scriptsRun.push(n.innerText),new Function(n.innerText)()}catch(o){console.warn("`CustomCode`: Error running script:",o)}}}}},_classStringToObject(e){const t={};if(typeof e!="string")return t;const n=e.trim().split(/\s+/);for(const o of n)t[o]=!0;return t}}}),cn=["innerHTML"];function dn(e,t,n,o,i,s){return r.openBlock(),r.createElementBlock("div",{ref:"elem",class:r.normalizeClass(e._classStringToObject("builder-custom-code"+(e.replaceNodes?" replace-nodes":""))),innerHTML:e.code},null,10,cn)}const un=f(ln,[["render",dn]]),pn={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]},mn=()=>[{component:Q,...Nt},{component:re,...Ot},{component:un,...pn},{component:tn,...Jt},{component:ie,...jt},{component:se,...Ft},{component:sn,...an},{component:ae,...Ut},{component:_e,...Mt},{component:le,...Lt},{component:ce,...Kt}],x="[Builder.io]: ",C={log:(...e)=>console.log(x,...e),error:(...e)=>console.error(x,...e),warn:(...e)=>console.warn(x,...e),debug:(...e)=>console.debug(x,...e)},hn=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},de=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(o=>o.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){C.warn("[COOKIE] GET error: ",(o==null?void 0:o.message)||o);return}},ue=async e=>de(e),fn=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(v).join("; "),gn=[["secure",""],["SameSite","None"]],bn=({name:e,value:t,expires:n})=>{const i=(b()?location.protocol==="https:":!0)?gn:[[]],s=n?[["expires",n.toUTCString()]]:[[]],a=[[e,t],...s,["path","/"],["domain",hn(window.location.hostname)],...i];return fn(a)},pe=async({name:e,value:t,expires:n,canTrack:o})=>{try{if(!o)return;const i=bn({name:e,value:t,expires:n});document.cookie=i}catch(i){C.warn("[COOKIE] SET error: ",(i==null?void 0:i.message)||i)}},yn="builder.tests",M=e=>`${yn}.${e}`,kn=({contentId:e})=>ue({name:M(e),canTrack:!0}),Sn=({contentId:e})=>de({name:M(e),canTrack:!0}),vn=({contentId:e,value:t})=>pe({name:M(e),value:t,canTrack:!0}),me=e=>v(e.id)&&v(e.variations)&&Object.keys(e.variations).length>0,Cn=({id:e,variations:t})=>{var i;let n=0;const o=Math.random();for(const s in t){const a=(i=t[s])==null?void 0:i.testRatio;if(n+=a,o<n)return s}return e},he=e=>{const t=Cn(e);return vn({contentId:e.id,value:t}).catch(n=>{C.error("could not store A/B test variation: ",n)}),t},fe=({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":"")}},$n=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!me(e))return e;const n=Sn({contentId:e.id})||he({variations:e.variations,id:e.id}),o=fe({item:e,testGroupId:n});return{...e,...o}},wn=async({item:e,canTrack:t})=>{if(!t||!me(e))return e;const o=await kn({contentId:e.id})||he({variations:e.variations,id:e.id}),i=fe({item:e,testGroupId:o});return{...e,...i}},I=e=>v(e)?e:!0;function Bn(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function Tn(){const e=Bn().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.
|
|
36
|
-
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 ge=Tn();function N(e,t=null,n="."){return Object.keys(e).reduce((o,i)=>{const s=e[i],a=[t,i].filter(Boolean).join(n);return[typeof s=="object",s!==null,!(Array.isArray(s)&&s.length===0)].every(Boolean)?{...o,...N(s,a,n)}:{...o,[a]:s}},{})}const z="builder.",xn="options.",In=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},be=e=>{if(!e)return{};const t=ye(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(z)){const i=o.replace(z,"").replace(xn,"");n[i]=t[o]}}),n},En=()=>{if(!b())return{};const e=new URLSearchParams(window.location.search);return be(e)},ye=e=>e instanceof URLSearchParams?In(e):e,Rn="v3",ke=e=>{const{limit:t=30,userAttributes:n,query:o,noTraverse:i=!1,model:s,apiKey:a,includeRefs:c=!0,enrich:l,locale:d,apiVersion:u=Rn}=e;if(!a)throw new Error("Missing API key");if(!["v2","v3"].includes(u))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${u}'`);const p=new URL(`https://cdn.builder.io/api/${u}/content/${s}?apiKey=${a}&limit=${t}&noTraverse=${i}&includeRefs=${c}${d?`&locale=${d}`:""}${l?`&enrich=${l}`:""}`),m={...En(),...ye(e.options||{})},g=N(m);for(const h in g)p.searchParams.set(h,String(g[h]));if(n&&p.searchParams.set("userAttributes",JSON.stringify(n)),o){const h=N({query:o});for(const y in h)p.searchParams.set(y,JSON.stringify(h[y]))}return p},Se=e=>"results"in e;async function L(e){const t=await Ce({...e,limit:1});return t&&Se(t)&&t.results[0]||null}const Vn=async e=>{const t=ke(e);return await(await ge(t.href)).json()},ve=async(e,t)=>{const n=I(e.canTrack);if(!n||!(b()||$==="reactNative"))return t;try{const o=[];for(const i of t.results)o.push(await wn({item:i,canTrack:n}));t.results=o}catch(o){C.error("Could not process A/B tests. ",o)}return t};async function Ce(e){try{const t=ke(e),n=await Vn(e);return Se(n)?ve(e,n):(C.error("Error fetching data. ",{url:t,content:n,options:e}),n)}catch(t){return C.error("Error fetching data. ",t),null}}function $e(){return!b()||S()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const An=[],we=({component:e,...t})=>({type:"builder.registerComponent",data:Pn(t)}),_n=e=>typeof e=="function"?A(e):R(e),Pn=({inputs:e,...t})=>({...R(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((o,[i,s])=>({...o,[i]:_n(s)}),{}))});function Nn(){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 Be(){return Nn().replace(/-/g,"")}const Te="builderSessionId",On=async({canTrack:e})=>{if(!e)return;const t=await ue({name:Te,canTrack:e});if(v(t))return t;{const n=jn();return Fn({id:n,canTrack:e}),n}},jn=()=>Be(),Fn=({id:e,canTrack:t})=>pe({name:Te,value:e,canTrack:t}),xe=()=>b()&&typeof localStorage<"u"?localStorage:void 0,Un=({key:e,canTrack:t})=>{var n;try{return t?(n=xe())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},Mn=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=xe())==null||o.setItem(e,n))}catch(i){console.debug("[LocalStorage] SET error: ",i)}},Ie="builderVisitorId",Ln=({canTrack:e})=>{if(!e)return;const t=Un({key:Ie,canTrack:e});if(v(t))return t;{const n=Wn();return Hn({id:n,canTrack:e}),n}},Wn=()=>Be(),Hn=({id:e,canTrack:t})=>Mn({key:Ie,value:e,canTrack:t}),zn=()=>{if(b()){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},Kn=()=>typeof navigator=="object"&&navigator.userAgent||"",Dn=()=>{const e=Kn(),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()||$==="reactNative"}},n=e.match(/Tablet|iPad/i),o=zn();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},qn=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await On({canTrack:e}),n=Ln({canTrack:e});return{sessionId:t,visitorId:n}},Gn=async({type:e,canTrack:t,apiKey:n,metadata:o,...i})=>({type:e,data:{...i,metadata:{url:location.href,...o},...await qn({canTrack:t}),userAttributes:Dn(),ownerId:n}});async function O(e){if(!e.apiKey){C.error("Missing API key for track call. Please provide your API key.");return}if(!!e.canTrack&&!S()&&!!(b()||$==="reactNative"))return fetch("https://builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await Gn(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const Jn=e=>O({...e,canTrack:!0}),Yn=e=>{var s,a;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],o=(a=e.fileUrl)!=null?a:(s=e==null?void 0:e.files)==null?void 0:s.regular;let i="";if(o&&t&&n&&(i+=`
|
|
36
|
+
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 ge=Tn();function N(e,t=null,n="."){return Object.keys(e).reduce((o,i)=>{const s=e[i],a=[t,i].filter(Boolean).join(n);return[typeof s=="object",s!==null,!(Array.isArray(s)&&s.length===0)].every(Boolean)?{...o,...N(s,a,n)}:{...o,[a]:s}},{})}const z="builder.",xn="options.",In=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},be=e=>{if(!e)return{};const t=ye(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(z)){const i=o.replace(z,"").replace(xn,"");n[i]=t[o]}}),n},En=()=>{if(!b())return{};const e=new URLSearchParams(window.location.search);return be(e)},ye=e=>e instanceof URLSearchParams?In(e):e,Rn="v3",ke=e=>{const{limit:t=30,userAttributes:n,query:o,noTraverse:i=!1,model:s,apiKey:a,includeRefs:c=!0,enrich:l,locale:d,apiVersion:u=Rn}=e;if(!a)throw new Error("Missing API key");if(!["v2","v3"].includes(u))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${u}'`);const p=new URL(`https://cdn.builder.io/api/${u}/content/${s}?apiKey=${a}&limit=${t}&noTraverse=${i}&includeRefs=${c}${d?`&locale=${d}`:""}${l?`&enrich=${l}`:""}`),m={...En(),...ye(e.options||{})},g=N(m);for(const h in g)p.searchParams.set(h,String(g[h]));if(n&&p.searchParams.set("userAttributes",JSON.stringify(n)),o){const h=N({query:o});for(const y in h)p.searchParams.set(y,JSON.stringify(h[y]))}return p},Se=e=>"results"in e;async function L(e){const t=await Ce({...e,limit:1});return t&&Se(t)&&t.results[0]||null}const Vn=async e=>{const t=ke(e);return await(await ge(t.href)).json()},ve=async(e,t)=>{const n=I(e.canTrack);if(!n||!(b()||$==="reactNative"))return t;try{const o=[];for(const i of t.results)o.push(await wn({item:i,canTrack:n}));t.results=o}catch(o){C.error("Could not process A/B tests. ",o)}return t};async function Ce(e){try{const t=ke(e),n=await Vn(e);return Se(n)?ve(e,n):(C.error("Error fetching data. ",{url:t,content:n,options:e}),n)}catch(t){return C.error("Error fetching data. ",t),null}}function $e(){return!b()||S()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const An=[],we=({component:e,...t})=>({type:"builder.registerComponent",data:Pn(t)}),_n=e=>typeof e=="function"?A(e):R(e),Pn=({inputs:e,...t})=>({...R(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((o,[i,s])=>({...o,[i]:_n(s)}),{}))});function Nn(){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 Be(){return Nn().replace(/-/g,"")}const Te="builderSessionId",On=async({canTrack:e})=>{if(!e)return;const t=await ue({name:Te,canTrack:e});if(v(t))return t;{const n=jn();return Fn({id:n,canTrack:e}),n}},jn=()=>Be(),Fn=({id:e,canTrack:t})=>pe({name:Te,value:e,canTrack:t}),xe=()=>b()&&typeof localStorage<"u"?localStorage:void 0,Un=({key:e,canTrack:t})=>{var n;try{return t?(n=xe())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},Mn=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=xe())==null||o.setItem(e,n))}catch(i){console.debug("[LocalStorage] SET error: ",i)}},Ie="builderVisitorId",Ln=({canTrack:e})=>{if(!e)return;const t=Un({key:Ie,canTrack:e});if(v(t))return t;{const n=Wn();return Hn({id:n,canTrack:e}),n}},Wn=()=>Be(),Hn=({id:e,canTrack:t})=>Mn({key:Ie,value:e,canTrack:t}),zn=()=>{if(b()){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},Kn=()=>typeof navigator=="object"&&navigator.userAgent||"",Dn=()=>{const e=Kn(),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()||$==="reactNative"}},n=e.match(/Tablet|iPad/i),o=zn();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},qn=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await On({canTrack:e}),n=Ln({canTrack:e});return{sessionId:t,visitorId:n}},Gn=async({type:e,canTrack:t,apiKey:n,metadata:o,...i})=>({type:e,data:{...i,metadata:{url:location.href,...o},...await qn({canTrack:t}),userAttributes:Dn(),ownerId:n}});async function O(e){if(!e.apiKey){C.error("Missing API key for track call. Please provide your API key.");return}if(!!e.canTrack&&!S()&&!!(b()||$==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await Gn(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const Jn=e=>O({...e,canTrack:!0}),Yn=e=>{var s,a;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],o=(a=e.fileUrl)!=null?a:(s=e==null?void 0:e.files)==null?void 0:s.regular;let i="";if(o&&t&&n&&(i+=`
|
|
37
37
|
@font-face {
|
|
38
38
|
font-family: "${t}";
|
|
39
39
|
src: local("${n}"), url('${o}') format('woff2');
|
|
@@ -63,7 +63,7 @@ ${Xn({customFonts:this.customFonts})}
|
|
|
63
63
|
text-align: inherit;
|
|
64
64
|
font-family: inherit;
|
|
65
65
|
}
|
|
66
|
-
`.trim()}}});function eo(e,t,n,o,i,s){const a=r.resolveComponent("render-inlined-styles");return r.openBlock(),r.createBlock(a,{styles:e.injectedStyles},null,8,["styles"])}const to=f(Zn,[["render",eo]]),no="0.4.
|
|
66
|
+
`.trim()}}});function eo(e,t,n,o,i,s){const a=r.resolveComponent("render-inlined-styles");return r.openBlock(),r.createBlock(a,{styles:e.injectedStyles},null,8,["styles"])}const to=f(Zn,[["render",eo]]),no="0.4.4",K={};function Ee(e,t){let n=K[e];if(n||(n=K[e]=[]),n.push(t),b()){const o={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(i){console.debug("Could not postmessage",i)}}}const oo=()=>{Ee("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let D=!1;const ro=(e={})=>{var t,n;D||(D=!0,b()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:$,version:no,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",({data:o})=>{var i,s;if(!!(o!=null&&o.type))switch(o.type){case"builder.evaluate":{const a=o.data.text,c=o.data.arguments||[],l=o.data.id,d=new Function(a);let u,p=null;try{u=d.apply(null,c)}catch(m){p=m}p?(i=window.parent)==null||i.postMessage({type:"builder.evaluateError",data:{id:l,error:p.message}},"*"):u&&typeof u.then=="function"?u.then(m=>{var g;(g=window.parent)==null||g.postMessage({type:"builder.evaluateResult",data:{id:l,result:m}},"*")}).catch(console.error):(s=window.parent)==null||s.postMessage({type:"builder.evaluateResult",data:{result:u,id:l}},"*");break}}})))};function q(e){return Math.round(e*1e3)/1e3}const io=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let o=n?e:e.parentElement;do{if(!o)return null;if(t(o))return o}while(o=o.parentElement);return null},so=e=>io(e,t=>{const n=t.getAttribute("builder-id")||t.id;return Boolean((n==null?void 0:n.indexOf("builder-"))===0)}),G=({event:e,target:t})=>{const n=t.getBoundingClientRect(),o=e.clientX-n.left,i=e.clientY-n.top,s=q(o/n.width),a=q(i/n.height);return{x:s,y:a}},ao=e=>{const t=e.target,n=t&&so(t),o=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:t?G({event:e,target:t}):void 0,builderTargetOffset:n?G({event:e,target:n}):void 0,builderElementIndex:n&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(n):void 0}}},lo=({content:e,data:t,locale:n})=>{var s,a,c;const o={};(a=(s=e==null?void 0:e.data)==null?void 0:s.inputs)==null||a.forEach(l=>{var d;l.name&&l.defaultValue!==void 0&&((d=e==null?void 0:e.data)==null?void 0:d.state)&&e.data.state[l.name]===void 0&&(o[l.name]=l.defaultValue)});const i={...(c=e==null?void 0:e.data)==null?void 0:c.state,...t,...n?{locale:n}:{}};return{...o,...i}},co=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0,E=e=>Object.values((e==null?void 0:e.variations)||{}),J=({canTrack:e,content:t})=>!(!(E(t).length>0)||!e||b());function uo(e,t,n){function o(){function a(g,h,y){let w="";if(y){const k=new Date;k.setTime(k.getTime()+y*24*60*60*1e3),w="; expires="+k.toUTCString()}document.cookie=g+"="+(h||"")+w+"; path=/; Secure; SameSite=None"}function c(g){const h=g+"=",y=document.cookie.split(";");for(let w=0;w<y.length;w++){let k=y[w];for(;k.charAt(0)===" ";)k=k.substring(1,k.length);if(k.indexOf(h)===0)return k.substring(h.length,k.length)}return null}const l=`builder.tests.${e}`,d=c(l),u=t.map(g=>g.id).concat(e);if(d&&u.includes(d))return d;let p=0;const m=Math.random();for(let g=0;g<t.length;g++){const h=t[g],y=h.testRatio;if(p+=y,m<p)return a(l,h.id),h.id}return a(l,e),e}const i=o(),s=document.getElementById(`variants-styles-${e}`);if(n){s.remove();const a=document.getElementById(`variants-script-${e}`);a==null||a.remove()}else{const a=t.concat({id:e}).filter(c=>c.id!==i).map(c=>`.variant-${c.id} { display: none; }
|
|
67
67
|
`).join("");s.innerHTML=a}}function po(e,t,n){if(!navigator.cookieEnabled)return;function o(l){const d=l+"=",u=document.cookie.split(";");for(let p=0;p<u.length;p++){let m=u[p];for(;m.charAt(0)===" ";)m=m.substring(1,m.length);if(m.indexOf(d)===0)return m.substring(d.length,m.length)}return null}const i=`builder.tests.${t}`,s=o(i),a=document.querySelector(`[builder-content-id="${e}"]`),c=e===t;if(s===e){if(c)return;a==null||a.removeAttribute("hidden"),a==null||a.removeAttribute("aria-hidden")}else{c&&(n?a==null||a.remove():(a==null||a.setAttribute("hidden","true"),a==null||a.setAttribute("aria-hidden","true")));return}}const mo=e=>e==="react"||e==="reactNative"||e==="vue3"||e==="vue2",Re=mo($),Y="bldrAbTest",Ve="bldrCntntScrpt",ho=(e,t)=>{const n=uo.toString().replace(/\s+/g," "),o=po.toString().replace(/\s+/g," ");return`
|
|
68
68
|
const ${Y} = ${n}
|
|
69
69
|
const ${Ve} = ${o}
|
|
@@ -2346,7 +2346,7 @@ async function Q(e) {
|
|
|
2346
2346
|
return;
|
|
2347
2347
|
}
|
|
2348
2348
|
if (!!e.canTrack && !E() && !!(C() || _ === "reactNative"))
|
|
2349
|
-
return fetch("https://builder.io/api/v1/track", {
|
|
2349
|
+
return fetch("https://cdn.builder.io/api/v1/track", {
|
|
2350
2350
|
method: "POST",
|
|
2351
2351
|
body: JSON.stringify({
|
|
2352
2352
|
events: [await ho(e)]
|
|
@@ -2426,7 +2426,7 @@ function ko(e, t, n, o, r, i) {
|
|
|
2426
2426
|
const s = S("render-inlined-styles");
|
|
2427
2427
|
return d(), f(s, { styles: e.injectedStyles }, null, 8, ["styles"]);
|
|
2428
2428
|
}
|
|
2429
|
-
const So = /* @__PURE__ */ y(yo, [["render", ko]]), vo = "0.4.
|
|
2429
|
+
const So = /* @__PURE__ */ y(yo, [["render", ko]]), vo = "0.4.4", ae = {};
|
|
2430
2430
|
function Co(e, t) {
|
|
2431
2431
|
let n = ae[e];
|
|
2432
2432
|
if (n || (n = ae[e] = []), n.push(t), C()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.4.
|
|
1
|
+
export declare const SDK_VERSION = "0.4.4";
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("vue"),u=require("./evaluate.d837a845.cjs"),d=require("./index.3d5a7a37.cjs"),s=require("./css.4a664d41.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.aaf62526.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.625e26fc.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.ba549c84.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;
|