@builder.io/sdk-vue 0.1.2 → 0.1.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.e9ae5c99.js → block-styles.062b71eb.js} +6 -4
- package/packages/_vue2/dist/block-styles.c799c71a.cjs +1 -0
- package/packages/{_vue3/dist/get-processed-block.1220ffe6.js → _vue2/dist/get-processed-block.44306844.js} +1 -1
- package/packages/_vue2/dist/{get-processed-block.ac23eb44.cjs → get-processed-block.837e0313.cjs} +1 -1
- package/packages/_vue2/dist/index.59a0624f.cjs +30 -0
- package/packages/_vue2/dist/{index.71913926.js → index.b2edb9b2.js} +531 -435
- package/packages/_vue2/dist/render-block.74bfd4ea.js +249 -0
- package/packages/_vue2/dist/render-block.b97311ac.cjs +3 -0
- package/packages/_vue2/dist/{render-component.e0a952b3.js → render-component.b325feac.js} +3 -3
- package/packages/_vue2/dist/{render-component.4e09cdef.cjs → render-component.e59489c1.cjs} +1 -1
- package/packages/_vue2/dist/render-inlined-styles.14b606a5.cjs +1 -0
- package/packages/_vue2/dist/{render-inlined-styles.58be9e46.js → render-inlined-styles.734fe2c9.js} +7 -5
- package/packages/_vue2/dist/render-repeated-block.bbbfafcc.cjs +1 -0
- package/packages/_vue2/dist/render-repeated-block.e1d94c10.js +41 -0
- package/packages/_vue2/dist/{render-styles.b0b466c2.js → render-styles.0b296b86.js} +2 -2
- package/packages/_vue2/dist/{render-styles.5381508b.cjs → render-styles.6732290e.cjs} +1 -1
- package/packages/_vue2/dist/sdk.cjs +1 -1
- package/packages/_vue2/dist/sdk.js +3 -3
- package/packages/_vue2/dist/src/blocks/columns/columns.vue.d.ts +35 -175
- package/packages/_vue2/dist/src/blocks/custom-code/custom-code.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/embed/embed.vue.d.ts +5 -2
- package/packages/_vue2/dist/src/blocks/img/img.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/blocks/symbol/symbol.vue.d.ts +65 -192
- package/packages/_vue2/dist/src/components/render-block/block-styles.vue.d.ts +2 -2
- package/packages/_vue2/dist/src/components/render-block/render-block.helpers.d.ts +11 -0
- package/packages/_vue2/dist/src/components/render-block/render-block.vue.d.ts +30 -170
- package/packages/_vue2/dist/src/components/render-block/render-component.vue.d.ts +7 -57
- package/packages/_vue2/dist/src/components/render-block/render-repeated-block.vue.d.ts +28 -168
- package/packages/_vue2/dist/src/components/render-blocks.vue.d.ts +33 -173
- package/packages/_vue2/dist/src/components/render-content/components/render-styles.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/components/render-content/render-content.vue.d.ts +59 -189
- package/packages/_vue2/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
- package/packages/_vue2/dist/src/context/builder.context.d.ts +11 -1
- package/packages/_vue2/dist/src/functions/track/helpers.d.ts +5 -0
- package/packages/{_vue3/dist/src/functions/track.d.ts → _vue2/dist/src/functions/track/index.d.ts} +5 -10
- package/packages/_vue2/dist/src/functions/track/interaction.d.ts +13 -0
- package/packages/_vue2/dist/src/index.d.ts +1 -1
- package/packages/_vue2/dist/style.css +1 -1
- package/packages/_vue3/dist/{block-styles.ab09f721.js → block-styles.413a68e9.js} +19 -17
- package/packages/_vue3/dist/block-styles.6e935df7.cjs +1 -0
- package/packages/{_vue2/dist/get-processed-block.985f56a5.js → _vue3/dist/get-processed-block.ab2d823c.js} +1 -1
- package/packages/_vue3/dist/{get-processed-block.c0ffa71e.cjs → get-processed-block.b0588cd8.cjs} +1 -1
- package/packages/_vue3/dist/index.218c45a5.cjs +30 -0
- package/packages/_vue3/dist/{index.e0d3400f.js → index.7db5ef7e.js} +469 -374
- package/packages/_vue3/dist/render-block.a53e9af1.js +258 -0
- package/packages/_vue3/dist/render-block.a9195cb6.cjs +3 -0
- package/packages/_vue3/dist/{render-component.7a972660.js → render-component.41330655.js} +3 -3
- package/packages/_vue3/dist/{render-component.af4b9326.cjs → render-component.adae07fa.cjs} +1 -1
- package/packages/_vue3/dist/render-inlined-styles.47114c43.js +32 -0
- package/packages/_vue3/dist/render-inlined-styles.c80dee1c.cjs +1 -0
- package/packages/_vue3/dist/render-repeated-block.5b77dd2a.cjs +1 -0
- package/packages/_vue3/dist/render-repeated-block.648adc14.js +36 -0
- package/packages/_vue3/dist/{render-styles.c8214c85.js → render-styles.8780951f.js} +2 -2
- package/packages/_vue3/dist/{render-styles.1e95e77c.cjs → render-styles.9f30e56b.cjs} +1 -1
- package/packages/_vue3/dist/sdk.cjs +1 -1
- package/packages/_vue3/dist/sdk.js +6 -6
- package/packages/_vue3/dist/src/blocks/columns/columns.vue.d.ts +5 -5
- package/packages/_vue3/dist/src/blocks/custom-code/custom-code.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/embed/embed.vue.d.ts +5 -2
- package/packages/_vue3/dist/src/blocks/img/img.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/blocks/symbol/symbol.vue.d.ts +35 -22
- package/packages/_vue3/dist/src/components/render-block/block-styles.vue.d.ts +2 -2
- package/packages/_vue3/dist/src/components/render-block/render-block.helpers.d.ts +11 -0
- package/packages/_vue3/dist/src/components/render-block/render-component.vue.d.ts +1 -31
- package/packages/_vue3/dist/src/components/render-block/render-repeated-block.vue.d.ts +8 -1
- package/packages/_vue3/dist/src/components/render-blocks.vue.d.ts +3 -3
- package/packages/_vue3/dist/src/components/render-content/components/render-styles.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/components/render-content/render-content.vue.d.ts +29 -19
- package/packages/_vue3/dist/src/components/render-inlined-styles.vue.d.ts +1 -1
- package/packages/_vue3/dist/src/context/builder.context.d.ts +11 -1
- package/packages/_vue3/dist/src/functions/track/helpers.d.ts +5 -0
- package/packages/{_vue2/dist/src/functions/track.d.ts → _vue3/dist/src/functions/track/index.d.ts} +5 -10
- package/packages/_vue3/dist/src/functions/track/interaction.d.ts +13 -0
- package/packages/_vue3/dist/src/index.d.ts +1 -1
- package/packages/_vue3/dist/style.css +1 -1
- package/packages/_vue2/dist/block-styles.b9cb70e5.cjs +0 -1
- package/packages/_vue2/dist/index.50198d49.cjs +0 -30
- package/packages/_vue2/dist/render-block.2c42b2ea.cjs +0 -3
- package/packages/_vue2/dist/render-block.6f078e8d.js +0 -251
- package/packages/_vue2/dist/render-component-with-context.795868f2.js +0 -53
- package/packages/_vue2/dist/render-component-with-context.88c14993.cjs +0 -1
- package/packages/_vue2/dist/render-inlined-styles.171750b7.cjs +0 -1
- package/packages/_vue2/dist/render-repeated-block.2ef95a2e.cjs +0 -1
- package/packages/_vue2/dist/render-repeated-block.58051104.js +0 -53
- package/packages/_vue2/dist/src/components/render-block/render-component-with-context.vue.d.ts +0 -114
- package/packages/_vue3/dist/block-styles.4a2a7b8d.cjs +0 -1
- package/packages/_vue3/dist/index.ac143767.cjs +0 -30
- package/packages/_vue3/dist/render-block.489f5bb0.cjs +0 -3
- package/packages/_vue3/dist/render-block.f4974fcf.js +0 -262
- package/packages/_vue3/dist/render-component-with-context.49bb17cb.cjs +0 -1
- package/packages/_vue3/dist/render-component-with-context.b7aac17f.js +0 -50
- package/packages/_vue3/dist/render-inlined-styles.37596a05.js +0 -30
- package/packages/_vue3/dist/render-inlined-styles.ffa23fbe.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.704b65cb.cjs +0 -1
- package/packages/_vue3/dist/render-repeated-block.7b85cf89.js +0 -48
- package/packages/_vue3/dist/src/components/render-block/render-component-with-context.vue.d.ts +0 -48
|
@@ -1 +1,12 @@
|
|
|
1
|
+
import type { BuilderContextInterface } from '../../context/types';
|
|
2
|
+
import type { BuilderBlock } from '../../types/builder-block';
|
|
3
|
+
import type { RepeatData } from './types';
|
|
1
4
|
export declare const isEmptyHtmlElement: (tagName: unknown) => boolean;
|
|
5
|
+
export declare const getComponent: ({ block, context, }: {
|
|
6
|
+
block: BuilderBlock;
|
|
7
|
+
context: BuilderContextInterface;
|
|
8
|
+
}) => import("../../context/types").RegisteredComponent | null | undefined;
|
|
9
|
+
export declare const getRepeatItemData: ({ block, context, }: {
|
|
10
|
+
block: BuilderBlock;
|
|
11
|
+
context: BuilderContextInterface;
|
|
12
|
+
}) => RepeatData[] | undefined;
|
|
@@ -8,35 +8,5 @@ export interface RenderComponentProps {
|
|
|
8
8
|
context: BuilderContextInterface;
|
|
9
9
|
customBreakpoints?: Breakpoints;
|
|
10
10
|
}
|
|
11
|
-
declare const _sfc_main:
|
|
12
|
-
name: string;
|
|
13
|
-
components: {
|
|
14
|
-
RenderBlock: any;
|
|
15
|
-
BlockStyles: {
|
|
16
|
-
name: string;
|
|
17
|
-
components: {
|
|
18
|
-
RenderInlinedStyles: {
|
|
19
|
-
name: string;
|
|
20
|
-
props: string[];
|
|
21
|
-
data: () => {
|
|
22
|
-
TARGET: string;
|
|
23
|
-
};
|
|
24
|
-
computed: {
|
|
25
|
-
injectedStyleScript(): any;
|
|
26
|
-
tag(): string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
props: string[];
|
|
31
|
-
data: () => {
|
|
32
|
-
TARGET: string;
|
|
33
|
-
};
|
|
34
|
-
computed: {
|
|
35
|
-
useBlock(): any;
|
|
36
|
-
css(): any;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
props: string[];
|
|
41
|
-
};
|
|
11
|
+
declare const _sfc_main: any;
|
|
42
12
|
export default _sfc_main;
|
|
@@ -15,7 +15,7 @@ declare const _sfc_main: {
|
|
|
15
15
|
RenderInlinedStyles: {
|
|
16
16
|
name: string;
|
|
17
17
|
props: string[];
|
|
18
|
-
data
|
|
18
|
+
data(): {
|
|
19
19
|
TARGET: string;
|
|
20
20
|
};
|
|
21
21
|
computed: {
|
|
@@ -25,7 +25,7 @@ declare const _sfc_main: {
|
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
props: string[];
|
|
28
|
-
data
|
|
28
|
+
data(): {
|
|
29
29
|
TARGET: string;
|
|
30
30
|
};
|
|
31
31
|
computed: {
|
|
@@ -36,7 +36,7 @@ declare const _sfc_main: {
|
|
|
36
36
|
};
|
|
37
37
|
props: string[];
|
|
38
38
|
inject: {
|
|
39
|
-
builderContext:
|
|
39
|
+
builderContext: symbol;
|
|
40
40
|
};
|
|
41
41
|
computed: {
|
|
42
42
|
className(): any;
|
|
@@ -23,7 +23,7 @@ declare const _sfc_main: {
|
|
|
23
23
|
RenderInlinedStyles: {
|
|
24
24
|
name: string;
|
|
25
25
|
props: string[];
|
|
26
|
-
data
|
|
26
|
+
data(): {
|
|
27
27
|
TARGET: string;
|
|
28
28
|
};
|
|
29
29
|
computed: {
|
|
@@ -53,7 +53,7 @@ declare const _sfc_main: {
|
|
|
53
53
|
RenderInlinedStyles: {
|
|
54
54
|
name: string;
|
|
55
55
|
props: string[];
|
|
56
|
-
data
|
|
56
|
+
data(): {
|
|
57
57
|
TARGET: string;
|
|
58
58
|
};
|
|
59
59
|
computed: {
|
|
@@ -63,7 +63,7 @@ declare const _sfc_main: {
|
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
65
|
props: string[];
|
|
66
|
-
data
|
|
66
|
+
data(): {
|
|
67
67
|
TARGET: string;
|
|
68
68
|
};
|
|
69
69
|
computed: {
|
|
@@ -74,7 +74,7 @@ declare const _sfc_main: {
|
|
|
74
74
|
};
|
|
75
75
|
props: string[];
|
|
76
76
|
inject: {
|
|
77
|
-
builderContext:
|
|
77
|
+
builderContext: symbol;
|
|
78
78
|
};
|
|
79
79
|
computed: {
|
|
80
80
|
className(): any;
|
|
@@ -87,36 +87,46 @@ declare const _sfc_main: {
|
|
|
87
87
|
};
|
|
88
88
|
};
|
|
89
89
|
props: string[];
|
|
90
|
-
data
|
|
90
|
+
data(): {
|
|
91
91
|
forceReRenderCount: number;
|
|
92
92
|
overrideContent: null;
|
|
93
93
|
update: number;
|
|
94
94
|
useBreakpoints: null;
|
|
95
|
+
canTrackToUse: any;
|
|
95
96
|
overrideState: {};
|
|
97
|
+
contextContext: any;
|
|
98
|
+
allRegisteredComponents: any;
|
|
99
|
+
httpReqsData: {};
|
|
100
|
+
clicked: boolean;
|
|
96
101
|
};
|
|
97
102
|
provide(): {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
[x: symbol]: {
|
|
104
|
+
content: any;
|
|
105
|
+
state: any;
|
|
106
|
+
context: any;
|
|
107
|
+
apiKey: any;
|
|
108
|
+
registeredComponents: any;
|
|
104
109
|
};
|
|
105
110
|
};
|
|
106
111
|
mounted(): void;
|
|
107
112
|
watch: {
|
|
108
|
-
onUpdateHook0
|
|
109
|
-
|
|
110
|
-
|
|
113
|
+
onUpdateHook0: {
|
|
114
|
+
handler(): void;
|
|
115
|
+
immediate: boolean;
|
|
116
|
+
};
|
|
117
|
+
onUpdateHook1: {
|
|
118
|
+
handler(): void;
|
|
119
|
+
immediate: boolean;
|
|
120
|
+
};
|
|
121
|
+
onUpdateHook2: {
|
|
122
|
+
handler(): void;
|
|
123
|
+
immediate: boolean;
|
|
124
|
+
};
|
|
111
125
|
};
|
|
112
126
|
unmounted(): void;
|
|
113
127
|
computed: {
|
|
114
128
|
useContent(): any;
|
|
115
|
-
canTrackToUse(): any;
|
|
116
129
|
contentState(): any;
|
|
117
|
-
contextContext(): any;
|
|
118
|
-
allRegisteredComponents(): any;
|
|
119
|
-
httpReqsData(): {};
|
|
120
130
|
shouldRenderContentStyles(): any;
|
|
121
131
|
onUpdateHook0(): any;
|
|
122
132
|
onUpdateHook1(): any;
|
|
@@ -127,7 +137,7 @@ declare const _sfc_main: {
|
|
|
127
137
|
methods: {
|
|
128
138
|
processMessage(event: any): void;
|
|
129
139
|
evaluateJsCode(): void;
|
|
130
|
-
onClick(
|
|
140
|
+
onClick(event: any): void;
|
|
131
141
|
evalExpression(expression: any): any;
|
|
132
142
|
handleRequest({ url, key }: {
|
|
133
143
|
url: any;
|
package/packages/{_vue2/dist/src/functions/track.d.ts → _vue3/dist/src/functions/track/index.d.ts}
RENAMED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { CanTrack } from '
|
|
1
|
+
import type { CanTrack } from '../../types/can-track.js';
|
|
2
|
+
import type { Dictionary } from '../../types/typescript.js';
|
|
2
3
|
interface Event {
|
|
3
4
|
/**
|
|
4
5
|
* The type of your event.
|
|
@@ -16,9 +17,9 @@ interface Event {
|
|
|
16
17
|
*/
|
|
17
18
|
ownerId: string;
|
|
18
19
|
/**
|
|
19
|
-
*
|
|
20
|
+
* (Optional) metadata that you want to provide with your event.
|
|
20
21
|
*/
|
|
21
|
-
metadata?:
|
|
22
|
+
metadata?: Dictionary<any>;
|
|
22
23
|
/**
|
|
23
24
|
* Session ID of the user. This is provided by the SDK by checking session storage.
|
|
24
25
|
*/
|
|
@@ -34,17 +35,11 @@ interface Event {
|
|
|
34
35
|
[index: string]: any;
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
declare type EventProperties = Pick<Event, 'type'> & Pick<Event['data'], 'contentId' | 'variationId'> & {
|
|
38
|
+
declare type EventProperties = Pick<Event, 'type'> & Pick<Event['data'], 'contentId' | 'variationId' | 'metadata'> & {
|
|
38
39
|
/**
|
|
39
40
|
* Your organization's API key.
|
|
40
41
|
*/
|
|
41
42
|
apiKey: Event['data']['ownerId'];
|
|
42
|
-
/**
|
|
43
|
-
* (Optional) metadata that you want to provide with your event.
|
|
44
|
-
*/
|
|
45
|
-
metadata?: {
|
|
46
|
-
[index: string]: any;
|
|
47
|
-
};
|
|
48
43
|
/**
|
|
49
44
|
* (Optional) Any additional (non-metadata) properties to add to the event.
|
|
50
45
|
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare type Offset = {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
};
|
|
5
|
+
export declare const getInteractionPropertiesForEvent: (event: MouseEvent) => {
|
|
6
|
+
targetBuilderElement: string | undefined;
|
|
7
|
+
metadata: {
|
|
8
|
+
targetOffset: Offset | undefined;
|
|
9
|
+
builderTargetOffset: Offset | undefined;
|
|
10
|
+
builderElementIndex: number | undefined;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -7,6 +7,6 @@ export * from './functions/register.js';
|
|
|
7
7
|
export * from './functions/set-editor-settings.js';
|
|
8
8
|
export * from './functions/get-content/index.js';
|
|
9
9
|
export * from './functions/get-builder-search-params/index.js';
|
|
10
|
-
export { track } from './functions/track';
|
|
10
|
+
export { track } from './functions/track/index.js';
|
|
11
11
|
export type { RegisteredComponent } from './context/types';
|
|
12
12
|
export type { ComponentInfo } from './types/components';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.div-
|
|
1
|
+
.div-7fq9d0i380[data-v-1c640f4f]{display:flex;line-height:normal}.div-7fq9d0i380-2[data-v-1c640f4f]{display:flex;flex-direction:column;align-items:stretch}.img-2pqqf5a7788[data-v-50c3283d]{opacity:1;transition:opacity .2s ease-in-out}.div-2pqqf5a7788[data-v-50c3283d]{width:100%;pointer-events:none;font-size:0}.div-2pqqf5a7788-2[data-v-50c3283d]{display:flex;flex-direction:column;align-items:stretch;position:absolute;top:0;left:0;width:100%;height:100%}.button-4o9pb21oca6[data-v-f9067262]{all:unset}.div-361b1o6wv2k[data-v-69d4cd84]{display:flex;flex-direction:column;align-items:stretch}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index.50198d49.cjs"),m=require("./get-processed-block.ac23eb44.cjs"),y=()=>Promise.resolve().then(()=>require("./render-inlined-styles.171750b7.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}),p={name:"block-styles",components:{RenderInlinedStyles:y},props:["block","context"],data:()=>({TARGET:t.TARGET}),computed:{useBlock(){return m.getProcessedBlock({block:this.block,state:this.context.state,context:this.context.context,shouldEvaluateBindings:!0})},css(){var a;const e=this.useBlock.responsiveStyles,s=this.context.content,n=t.getSizesForBreakpoints(((a=s==null?void 0:s.meta)==null?void 0:a.breakpoints)||{}),o=e==null?void 0:e.large,r=e==null?void 0:e.medium,c=e==null?void 0:e.small,l=this.useBlock.id,i=o?t.createCssClass({className:l,styles:o}):"",d=r?t.createCssClass({className:l,styles:r,mediaQuery:t.getMaxWidthQueryForSize("medium",n)}):"",u=c?t.createCssClass({className:l,styles:c,mediaQuery:t.getMaxWidthQueryForSize("small",n)}):"";return[i,d,u].join(" ")}}};var h=function(){var s=this,n=s._self._c;return s.TARGET!=="reactNative"&&s.css?n("render-inlined-styles",{attrs:{styles:s.css}}):s._e()},S=[],_=t.normalizeComponent(p,h,S,!1,null,null,null,null);const k=_.exports;exports.default=k;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";const v="vue2";function p(){return typeof window<"u"&&typeof document<"u"}const E={};function O(t,e){let n=E[t];if(n||(n=E[t]=[]),n.push(e),p()){const o={type:"builder.register",data:{type:t,info:e}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(s){console.debug("Could not postmessage",s)}}}const de=()=>{O("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 F=!1;const me=(t={})=>{var e,n;F||(F=!0,p()&&((e=window.parent)==null||e.postMessage({type:"builder.sdkInfo",data:{target:v,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:t}},"*"),window.addEventListener("message",({data:o})=>{var s,r;if(!!(o!=null&&o.type))switch(o.type){case"builder.evaluate":{const i=o.data.text,l=o.data.arguments||[],a=o.data.id,u=new Function(i);let d,h=null;try{d=u.apply(null,l)}catch(c){h=c}h?(s=window.parent)==null||s.postMessage({type:"builder.evaluateError",data:{id:a,error:h.message}},"*"):d&&typeof d.then=="function"?d.then(c=>{var g;(g=window.parent)==null||g.postMessage({type:"builder.evaluateResult",data:{id:a,result:c}},"*")}).catch(console.error):(r=window.parent)==null||r.postMessage({type:"builder.evaluateResult",data:{result:d,id:a}},"*");break}}})))},_=t=>JSON.parse(JSON.stringify(t)),U={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},pe=(t,e=U)=>`@media (max-width: ${e[t].max}px)`,V=({small:t,medium:e})=>{const n=_(U);if(!t||!e)return n;const o=Math.floor(t/2);n.small={max:t,min:o,default:o+1};const s=n.small.max+1;n.medium={max:e,min:s,default:s+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n},he=t=>t.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),b=t=>t!=null,W=t=>Object.entries(t).map(([n,o])=>{if(typeof o=="string")return`${he(n)}: ${o};`}).filter(b),y=t=>W(t).join(`
|
|
2
|
-
`),fe=({mediaQuery:t,className:e,styles:n})=>{const o=`.${e} {
|
|
3
|
-
${y(n)}
|
|
4
|
-
}`;return t?`${t} {
|
|
5
|
-
${o}
|
|
6
|
-
}`:o},ge=()=>Promise.resolve().then(()=>ue).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../../components/render-blocks.vue",t),t}),be=()=>Promise.resolve().then(()=>require("./render-inlined-styles.171750b7.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderInlinedStyles at ../../components/render-inlined-styles.vue",t),t}),ye={name:"builder-columns",components:{RenderInlinedStyles:be,RenderBlocks:ge},props:["space","columns","stackColumnsAt","reverseColumnsWhenStacked","customBreakpoints","builderBlock"],data:()=>({TARGET:v}),computed:{columnsCssVars(){const t=this.stackColumnsAt==="never"?"inherit":this.reverseColumnsWhenStacked?"column-reverse":"column";return{"--flex-dir":t,"--flex-dir-tablet":this.maybeApplyForTablet(t)}},columnCssVars(){const t="100%",e="0";return{"--column-width":t,"--column-margin-left":e,"--column-width-tablet":this.maybeApplyForTablet(t),"--column-margin-left-tablet":this.maybeApplyForTablet(e)}},columnStyleObjects(){return{columns:{small:{flexDirection:"var(--flex-dir)",alignItems:"stretch"},medium:{flexDirection:"var(--flex-dir-tablet)",alignItems:"stretch"}},column:{small:{width:"var(--column-width) !important",marginLeft:"var(--column-margin-left) !important"},medium:{width:"var(--column-width-tablet) !important",marginLeft:"var(--column-margin-left-tablet) !important"}}}},columnsStyles(){return`
|
|
7
|
-
@media (max-width: ${this.getWidthForBreakpointSize("medium")}px) {
|
|
8
|
-
.${this.builderBlock.id}-breakpoints {
|
|
9
|
-
${y(this.columnStyleObjects.columns.medium)}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
13
|
-
${y(this.columnStyleObjects.column.medium)}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@media (max-width: ${this.getWidthForBreakpointSize("small")}px) {
|
|
18
|
-
.${this.builderBlock.id}-breakpoints {
|
|
19
|
-
${y(this.columnStyleObjects.columns.small)}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.${this.builderBlock.id}-breakpoints > .builder-column {
|
|
23
|
-
${y(this.columnStyleObjects.column.small)}
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
`},reactNativeColumnsStyles(){return this.columnStyleObjects.columns.small},reactNativeColumnStyles(){return this.columnStyleObjects.column.small}},methods:{getGutterSize(){return typeof this.space=="number"?this.space||0:20},getColumns(){return this.columns||[]},getWidth(t){var n;const e=this.getColumns();return((n=e[t])==null?void 0:n.width)||100/e.length},getColumnCssWidth(t){const e=this.getColumns(),o=this.getGutterSize()*(e.length-1)/e.length;return`calc(${this.getWidth(t)}% - ${o}px)`},maybeApplyForTablet(t){return(this.stackColumnsAt||"tablet")==="tablet"?t:"inherit"},getWidthForBreakpointSize(t){return V(this.customBreakpoints||{})[t].max},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}};function m(t,e,n,o,s,r,i,l){var a=typeof t=="function"?t.options:t;e&&(a.render=e,a.staticRenderFns=n,a._compiled=!0),o&&(a.functional=!0),r&&(a._scopeId="data-v-"+r);var u;if(i?(u=function(c){c=c||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!c&&typeof __VUE_SSR_CONTEXT__<"u"&&(c=__VUE_SSR_CONTEXT__),s&&s.call(this,c),c&&c._registeredComponents&&c._registeredComponents.add(i)},a._ssrRegister=u):s&&(u=l?function(){s.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:s),u)if(a.functional){a._injectStyles=u;var d=a.render;a.render=function(g,$){return u.call($),d(g,$)}}else{var h=a.beforeCreate;a.beforeCreate=h?[].concat(h,u):[u]}return{exports:t,options:a}}var ve=function(){var e=this,n=e._self._c;return n("div",{class:e._classStringToObject(`builder-columns ${e.builderBlock.id}-breakpoints div-29wpyomtntv`),style:{...e.TARGET==="reactNative"?e.reactNativeColumnsStyles:{},...e.columnsCssVars}},[e.TARGET!=="reactNative"?[n("render-inlined-styles",{attrs:{styles:e.columnsStyles}})]:e._e(),e._l(e.columns,function(o,s){return n("div",{key:s,staticClass:"builder-column div-29wpyomtntv-2",style:{width:e.getColumnCssWidth(s),marginLeft:`${s===0?0:e.getGutterSize()}px`,...e.TARGET==="reactNative"?e.reactNativeColumnStyles:{},...e.columnCssVars}},[n("render-blocks",{attrs:{blocks:o.blocks,path:`component.options.columns.${s}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"}}})],1)})],2)},_e=[],xe=m(ye,ve,_e,!1,null,"8932991b",null,null);const N=xe.exports;function j(t){return t.replace(/http(s)?:/,"")}function Ce(t="",e,n){const o=new RegExp("([?&])"+e+"=.*?(&|$)","i"),s=t.indexOf("?")!==-1?"&":"?";return t.match(o)?t.replace(o,"$1"+e+"="+encodeURIComponent(n)+"$2"):t+s+e+"="+encodeURIComponent(n)}function ke(t,e){if(!t||!(t!=null&&t.match(/cdn\.shopify\.com/))||!e)return t;if(e==="master")return j(t);const n=t.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=t.split(n[0]),s=n[3],r=e.match("x")?e:`${e}x`;return j(`${o[0]}_${r}${s}`)}return null}function C(t){if(!t)return t;const e=[100,200,400,800,1200,1600,2e3];if(t.match(/builder\.io/)){let n=t;const o=Number(t.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),e.filter(s=>s!==o).map(s=>`${Ce(t,"width",s)} ${s}w`).concat([n]).join(", ")}return t.match(/cdn\.shopify\.com/)?e.map(n=>[ke(t,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([t]).join(", "):t}const Se={name:"builder-image",props:["image","src","srcset","noWebp","aspectRatio","altText","backgroundPosition","backgroundSize","className","sizes","builderBlock","fitContent"],computed:{srcSetToUse(){var n;const e=this.image||this.src;if(!e||!(e.match(/builder\.io/)||e.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"),C(e)}else if(this.image&&!this.srcset)return C(e);return C(e)},webpSrcSet(){var t;return((t=this.srcSetToUse)==null?void 0:t.match(/builder\.io/))&&!this.noWebp?this.srcSetToUse.replace(/\?/g,"?format=webp&"):""},aspectRatioCss(){const t={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return this.aspectRatio?t:void 0}},methods:{_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}};var we=function(){var o,s,r,i;var e=this,n=e._self._c;return n("div",[n("picture",[e.webpSrcSet?[n("source",{attrs:{type:"image/webp",srcset:e.webpSrcSet}})]:e._e(),n("img",{class:e._classStringToObject("builder-image"+(e.className?" "+e.className:"")+" img-b1turyjjkok"),style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...e.aspectRatioCss},attrs:{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,src:e.image,srcset:e.srcSetToUse,sizes:e.sizes}}),n("source",{attrs:{srcset:e.srcSetToUse}})],2),e.aspectRatio&&!(((s=(o=e.builderBlock)==null?void 0:o.children)==null?void 0:s.length)&&e.fitContent)?[n("div",{staticClass:"builder-image-sizer div-b1turyjjkok",style:{paddingTop:e.aspectRatio*100+"%"}})]:e._e(),((i=(r=e.builderBlock)==null?void 0:r.children)==null?void 0:i.length)&&e.fitContent?[e._t("default")]:e._e(),!e.fitContent&&e.children?[n("div",{staticClass:"div-b1turyjjkok-2"},[e._t("default")],2)]:e._e()],2)},Ie=[],Re=m(Se,we,Ie,!1,null,"e3e7800f",null,null);const L=Re.exports,Te={name:"builder-text",props:["text"]};var $e=function(){var e=this,n=e._self._c;return n("span",{staticClass:"builder-text",domProps:{innerHTML:e._s(e.text)}})},Ee=[],Fe=m(Te,$e,Ee,!1,null,null,null,null);const M=Fe.exports,je={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 Pe=function(){var o;var e=this,n=e._self._c;return n("video",e._b({style:{width:"100%",height:"100%",...(o=e.attributes)==null?void 0:o.style,objectFit:e.fit,objectPosition:e.position,borderRadius:1},attrs:{src:e.video||"no-src",poster:e.posterImage}},"video",e.spreadProps,!1))},Be=[],Ae=m(je,Pe,Be,!1,null,null,null,null);const z=Ae.exports;function Oe(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function Ue(){const t=Oe().fetch;if(typeof t>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
27
|
-
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return t}const K=Ue(),Ve=t=>{if(t==="localhost"||t==="127.0.0.1")return t;const e=t.split(".");return e.length>2?e.slice(1).join("."):t},D=async({name:t,canTrack:e})=>{var n;try{return e?(n=document.cookie.split("; ").find(o=>o.startsWith(`${t}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){console.debug("[COOKIE] GET error: ",o);return}},We=t=>t.map(([e,n])=>n?`${e}=${n}`:e).filter(b).join("; "),Ne=[["secure",""],["SameSite","None"]],Le=({name:t,value:e,expires:n})=>{const s=(p()?location.protocol==="https:":!0)?Ne:[[]],r=n?[["expires",n.toUTCString()]]:[[]],i=[[t,e],...r,["path","/"],["domain",Ve(window.location.hostname)],...s];return We(i)},H=async({name:t,value:e,expires:n,canTrack:o})=>{try{if(!o)return;const s=Le({name:t,value:e,expires:n});document.cookie=s}catch(s){console.warn("[COOKIE] SET error: ",s)}},Me="builderio.variations",q=t=>`${Me}.${t}`,ze=({contentId:t,canTrack:e})=>D({name:q(t),canTrack:e}),Ke=({contentId:t,canTrack:e,value:n})=>H({name:q(t),value:n,canTrack:e}),De=t=>b(t.id)&&b(t.variations)&&Object.keys(t.variations).length>0,He=({id:t,variations:e})=>{var s;let n=0;const o=Math.random();for(const r in e)if(n+=(s=e[r])==null?void 0:s.testRatio,o<n)return r;return t},P=({item:t,testGroupId:e})=>{const n=t.variations[e];return e===t.id||!n?{testVariationId:t.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===t.id?"Default":"")}},qe=async({item:t,canTrack:e})=>{const n=await ze({canTrack:e,contentId:t.id}),o=n?P({item:t,testGroupId:n}):void 0;if(o)return o;{const s=He({variations:t.variations,id:t.id});return Ke({contentId:t.id,value:s,canTrack:e}).catch(r=>{console.error("could not store A/B test variation: ",r)}),P({item:t,testGroupId:s})}},Ge=async({item:t,canTrack:e})=>{if(!De(t))return;const n=await qe({item:t,canTrack:e});Object.assign(t,n)};function k(t,e=null,n="."){return Object.keys(t).reduce((o,s)=>{const r=t[s],i=[e,s].filter(Boolean).join(n);return[typeof r=="object",r!==null,!(Array.isArray(r)&&r.length===0)].every(Boolean)?{...o,...k(r,i,n)}:{...o,[i]:r}},{})}const B="builder.",Je="options.",G=t=>{const e={};return t.forEach((n,o)=>{e[o]=n}),e},J=t=>{if(!t)return{};const e=I(t),n={};return Object.keys(e).forEach(o=>{if(o.startsWith(B)){const s=o.replace(B,"").replace(Je,"");n[s]=e[o]}}),n},X=()=>{if(!p())return{};const t=new URLSearchParams(window.location.search);return J(t)},I=t=>t instanceof URLSearchParams?G(t):t,Xe=t=>{const{limit:e=30,userAttributes:n,query:o,noTraverse:s=!1,model:r,apiKey:i,includeRefs:l=!0,locale:a}=t;if(!i)throw new Error("Missing API key");const u=new URL(`https://cdn.builder.io/api/v2/content/${r}?apiKey=${i}&limit=${e}&noTraverse=${s}&includeRefs=${l}${a?`&locale=${a}`:""}`),d={...X(),...I(t.options||{})},h=k(d);for(const c in h)u.searchParams.set(c,String(h[c]));if(n&&u.searchParams.set("userAttributes",JSON.stringify(n)),o){const c=k({query:o});for(const g in c)u.searchParams.set(g,JSON.stringify(c[g]))}return u};async function R(t){return(await Y({...t,limit:1})).results[0]||null}async function Y(t){const e=Xe(t),o=await(await K(e.href)).json(),s=t.canTrack!==!1;if(s&&Array.isArray(o.results))for(const r of o.results)await Ge({item:r,canTrack:s});return o}const Ye=()=>Promise.resolve().then(()=>mn).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderContent at ../../components/render-content/render-content.vue",t),t}),Qe={name:"builder-symbol",components:{RenderContent:Ye},props:["attributes","symbol","dynamic"],data:()=>({fetchedContent:null}),inject:{builderContext:"BuilderContext"},watch:{onUpdateHook0(){const t=this.symbol;t&&!t.content&&!this.fetchedContent&&t.model&&R({model:t.model,apiKey:this.builderContext.apiKey,query:{id:t.entry}}).then(e=>{this.fetchedContent=e})}},computed:{className(){var t,e;return[...Object.keys(this.attributes.class),"builder-symbol",(t=this.symbol)!=null&&t.inline?"builder-inline-symbol":void 0,((e=this.symbol)==null?void 0:e.dynamic)||this.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")},contentToUse(){var t;return((t=this.symbol)==null?void 0:t.content)||this.fetchedContent},onUpdateHook0(){return{0:this.symbol,1:this.fetchedContent}}},methods:{_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}};var Ze=function(){var o,s,r,i,l;var e=this,n=e._self._c;return n("div",e._b({class:e._classStringToObject(e.className),attrs:{dataSet:{class:e.className}}},"div",e.attributes,!1),[n("render-content",{attrs:{apiKey:e.builderContext.apiKey,context:e.builderContext.context,customComponents:Object.values(e.builderContext.registeredComponents),data:{...(o=e.symbol)==null?void 0:o.data,...e.builderContext.state,...(i=(r=(s=e.symbol)==null?void 0:s.content)==null?void 0:r.data)==null?void 0:i.state},model:(l=e.symbol)==null?void 0:l.model,content:e.contentToUse}})],1)},et=[],tt=m(Qe,Ze,et,!1,null,null,null,null);const Q=tt.exports,nt={name:"builder-button",props:["attributes","text","link","openLinkInNewTab"]};var ot=function(){var e=this,n=e._self._c;return e.link?n("a",e._b({attrs:{role:"button",href:e.link,target:e.openLinkInNewTab?"_blank":void 0}},"a",e.attributes,!1),[e._v(" "+e._s(e.text)+" ")]):n("button",e._b({staticClass:"button-t43jfuqn6g"},"button",e.attributes,!1),[e._v(" "+e._s(e.text)+" ")])},st=[],rt=m(nt,ot,st,!1,null,"7abb91cf",null,null);const Z=rt.exports,it={name:"builder-section-component",props:["attributes","maxWidth"]};var at=function(){var e=this,n=e._self._c;return n("section",e._b({style:{width:"100%",alignSelf:"stretch",flexGrow:"1",boxSizing:"border-box",maxWidth:`${e.maxWidth&&typeof e.maxWidth=="number"?e.maxWidth:1200}px`,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"}},"section",e.attributes,!1),[e._t("default")],2)},lt=[],ct=m(it,at,lt,!1,null,null,null,null);const ee=ct.exports,ut={name:"builder-fragment-component",props:[]};var dt=function(){var e=this,n=e._self._c;return n("span",[e._t("default")],2)},mt=[],pt=m(ut,dt,mt,!1,null,null,null,null);const te=pt.exports,ht={name:"Core:Button",builtIn:!0,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},x=t=>{const e=t.toString().trim();return`return (${!e.startsWith("function")&&!e.startsWith("(")?"function ":""}${e}).apply(this, arguments)`},ft={name:"Columns",builtIn:!0,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:x(t=>{function e(){n.forEach(o=>{o.delete("width")})}const n=t.get("columns");Array.isArray(n)&&!!n.find(s=>s.get("width"))&&(!!n.find(r=>!r.get("width"))||n.reduce((l,a)=>l+a.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}]},gt={name:"Fragment",static:!0,hidden:!0,builtIn:!0,canHaveChildren:!0,noWrap:!0},bt={name:"Image",static:!0,builtIn:!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%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",onChange:x(t=>{t.delete("srcset"),t.delete("noWebp");function n(i,l=6e4){return new Promise((a,u)=>{const d=document.createElement("img");let h=!1;d.onload=()=>{h=!0,a(d)},d.addEventListener("error",c=>{console.warn("Image load failed",c.error),u(c.error)}),d.src=i,setTimeout(()=>{h||u(new Error("Image load timed out"))},l)})}function o(i){return Math.round(i*1e3)/1e3}const s=t.get("image"),r=t.get("aspectRatio");if(fetch(s).then(i=>i.blob()).then(i=>{i.type.includes("svg")&&t.set("noWebp",!0)}),s&&(!r||r===.7041))return n(s).then(i=>{const l=t.get("aspectRatio");t.get("image")===s&&(!l||l===.7041)&&i.width&&i.height&&(t.set("aspectRatio",o(i.height/i.width)),t.set("height",i.height),t.set("width",i.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}]},yt={name:"Core:Section",static:!0,builtIn:!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>"}}}]},vt={name:"Symbol",noWrap:!0,static:!0,builtIn:!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"}]},_t={name:"Text",static:!0,builtIn:!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"}},xt={name:"Video",canHaveChildren:!0,builtIn:!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}]},Ct={name:"Embed",static:!0,builtIn:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:x(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(o=>o.json()).then(o=>{t.get("url")===e&&(o.html?t.set("content",o.html):t.set("content","Invalid url, please try another"))}).catch(o=>{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}]},kt=["text/javascript","application/javascript","application/ecmascript"],St=t=>kt.includes(t.type),wt={name:"builder-embed",props:["content"],data:()=>({scriptsInserted:[],scriptsRun:[],ranInitFn:!1}),watch:{onUpdateHook0(){this.$refs.elem&&!this.ranInitFn&&(this.ranInitFn=!0,this.findAndRunScripts())}},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 o=document.createElement("script");o.async=!0,o.src=n.src,document.head.appendChild(o)}else if(St(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)}}}}};var It=function(){var e=this,n=e._self._c;return n("div",{ref:"elem",staticClass:"builder-embed",domProps:{innerHTML:e._s(e.content)}})},Rt=[],Tt=m(wt,It,Rt,!1,null,null,null,null);const $t=Tt.exports;function Et(){return p()&&window.self!==window.top}function f(){return Et()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Ft={name:"builder-img-component",props:["backgroundSize","backgroundPosition","imgSrc","altText","image","attributes"],data:()=>({isEditing:f})};var jt=function(){var e=this,n=e._self._c;return n("img",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.attributes,!1))},Pt=[],Bt=m(Ft,jt,Pt,!1,null,null,null,null);const At=Bt.exports,Ot={name:"Raw:Img",hideFromInsertMenu:!0,builtIn:!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"],required:!0}],noWrap:!0,static:!0},Ut={name:"builder-custom-code",props:["replaceNodes","code"],data:()=>({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 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(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}};var Vt=function(){var e=this,n=e._self._c;return n("div",{ref:"elem",class:e._classStringToObject("builder-custom-code"+(e.replaceNodes?" replace-nodes":"")),domProps:{innerHTML:e._s(e.code)}})},Wt=[],Nt=m(Ut,Vt,Wt,!1,null,null,null,null);const Lt=Nt.exports,Mt={name:"Custom Code",static:!0,builtIn:!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}]},zt=()=>[{component:N,...ft},{component:L,...bt},{component:At,...Ot},{component:M,..._t},{component:z,...xt},{component:Q,...vt},{component:Z,...ht},{component:ee,...yt},{component:te,...gt},{component:$t,...Ct},{component:Lt,...Mt}];function S({code:t,context:e,state:n,event:o,isExpression:s=!0}){if(t===""){console.warn("Skipping evaluation of empty code block.");return}const r={isEditing:f(),isBrowser:p(),isServer:!p()},l=s&&!(t.includes(";")||t.includes(" return ")||t.trim().startsWith("return "))?`return (${t});`:t;try{return new Function("builder","Builder","state","context","event",l)(r,r,n,e,o)}catch(a){console.warn(`Builder custom code error:
|
|
28
|
-
While Evaluating:
|
|
29
|
-
`,l,`
|
|
30
|
-
`,a)}}function ne(){return!p()||f()?!1:Boolean(location.search.indexOf("builder.preview=")!==-1)}const T=[];function Kt(t,e){return T.push({component:t,...e}),console.warn("registerComponent is deprecated. Use the `customComponents` prop in RenderContent instead to provide your custom components to the builder SDK."),t}const oe=({component:t,...e})=>({type:"builder.registerComponent",data:Ht(e)}),Dt=t=>typeof t=="function"?x(t):_(t),Ht=({inputs:t,...e})=>({..._(e),inputs:t==null?void 0:t.map(n=>Object.entries(n).reduce((o,[s,r])=>({...o,[s]:Dt(r)}),{}))});function qt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}function se(){return qt().replace(/-/g,"")}const re="builderSessionId",Gt=async({canTrack:t})=>{if(!t)return;const e=await D({name:re,canTrack:t});if(b(e))return e;{const n=Jt();return Xt({id:n,canTrack:t}),n}},Jt=()=>se(),Xt=({id:t,canTrack:e})=>H({name:re,value:t,canTrack:e}),ie=()=>p()&&typeof localStorage<"u"?localStorage:void 0,Yt=({key:t,canTrack:e})=>{var n;try{return e?(n=ie())==null?void 0:n.getItem(t):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},Qt=({key:t,canTrack:e,value:n})=>{var o;try{e&&((o=ie())==null||o.setItem(t,n))}catch(s){console.debug("[LocalStorage] SET error: ",s)}},ae="builderVisitorId",Zt=({canTrack:t})=>{if(!t)return;const e=Yt({key:ae,canTrack:t});if(b(e))return e;{const n=en();return tn({id:n,canTrack:t}),n}},en=()=>se(),tn=({id:t,canTrack:e})=>Qt({key:ae,value:t,canTrack:e}),nn=async({canTrack:t})=>{if(!t)return{visitorId:void 0,sessionId:void 0};const e=await Gt({canTrack:t}),n=Zt({canTrack:t});return{sessionId:e,visitorId:n}},on=async({type:t,canTrack:e,apiKey:n,metadata:o,...s})=>({type:t,data:{...s,metadata:JSON.stringify(o),...await nn({canTrack:e}),ownerId:n}});async function w(t){if(!t.apiKey){console.error("[Builder.io]: Missing API key for track call. Please provide your API key.");return}if(!!t.canTrack&&!f()&&!!(p()||v==="reactNative"))return fetch("https://builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await on(t)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(e=>{console.error("Failed to track: ",e)})}const sn=t=>w({...t,canTrack:!0}),rn=()=>Promise.resolve().then(()=>ue).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlocks at ../render-blocks.vue",t),t}),an=()=>Promise.resolve().then(()=>require("./render-styles.5381508b.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}),ln={name:"render-content",components:{RenderContentStyles:an,RenderBlocks:rn},props:["content","data","canTrack","locale","context","customComponents","model","apiKey","includeRefs"],data:()=>({forceReRenderCount:0,overrideContent:null,update:0,useBreakpoints:null,overrideState:{}}),provide(){const t=this;return{BuilderContext:{get content(){return t.useContent},get state(){return t.contentState},get context(){return t.contextContext},get apiKey(){return t.apiKey},get registeredComponents(){return t.allRegisteredComponents}}}},mounted(){var t,e;if(this.apiKey||console.error("[Builder.io]: No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),p()){if(f()&&(this.forceReRenderCount=this.forceReRenderCount+1,de(),me({...this.locale?{locale:this.locale}:{},...this.includeRefs?{includeRefs:this.includeRefs}:{}}),Object.values(this.allRegisteredComponents).forEach(n=>{var s;const o=oe(n);(s=window.parent)==null||s.postMessage(o,"*")}),window.addEventListener("message",this.processMessage),window.addEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate)),this.useContent){const n=(t=this.useContent)==null?void 0:t.testVariationId,o=(e=this.useContent)==null?void 0:e.id;w({type:"impression",canTrack:this.canTrackToUse,contentId:o,apiKey:this.apiKey,variationId:n!==o?n:void 0})}if(ne()){const n=new URL(location.href).searchParams;if(this.model&&n.get("builder.preview")===this.model){const o=n.get("apiKey")||n.get("builder.space");o&&R({model:this.model,apiKey:o}).then(s=>{s&&(this.overrideContent=s)})}}this.evaluateJsCode(),this.runHttpRequests(),this.emitStateUpdate()}},watch:{onUpdateHook0(){this.evaluateJsCode()},onUpdateHook1(){this.runHttpRequests()},onUpdateHook2(){this.emitStateUpdate()}},unmounted(){p()&&(window.removeEventListener("message",this.processMessage),window.removeEventListener("builder:component:stateChangeListenerActivated",this.emitStateUpdate))},computed:{useContent(){var e,n,o,s,r,i,l,a;return!this.content&&!this.overrideContent?void 0:{...this.content,...this.overrideContent,data:{...(e=this.content)==null?void 0:e.data,...this.data,...(n=this.overrideContent)==null?void 0:n.data},meta:{...(o=this.content)==null?void 0:o.meta,...(s=this.overrideContent)==null?void 0:s.meta,breakpoints:this.useBreakpoints||((i=(r=this.overrideContent)==null?void 0:r.meta)==null?void 0:i.breakpoints)||((a=(l=this.content)==null?void 0:l.meta)==null?void 0:a.breakpoints)}}},canTrackToUse(){return b(this.canTrack)?this.canTrack:!0},contentState(){var t,e;return{...(e=(t=this.content)==null?void 0:t.data)==null?void 0:e.state,...this.data,...this.locale?{locale:this.locale}:{},...this.overrideState}},contextContext(){return this.context||{}},allRegisteredComponents(){return[...zt(),...T,...this.customComponents||[]].reduce((n,o)=>({...n,[o.name]:o}),{})},httpReqsData(){return{}},shouldRenderContentStyles(){var t,e,n,o,s;return Boolean((((e=(t=this.useContent)==null?void 0:t.data)==null?void 0:e.cssCode)||((s=(o=(n=this.useContent)==null?void 0:n.data)==null?void 0:o.customFonts)==null?void 0:s.length))&&v!=="reactNative")},onUpdateHook0(){var t,e;return{0:(e=(t=this.useContent)==null?void 0:t.data)==null?void 0:e.jsCode,1:this.contentState}},onUpdateHook1(){var t,e;return{0:(e=(t=this.useContent)==null?void 0:t.data)==null?void 0:e.httpRequests}},onUpdateHook2(){return{0:this.contentState}}},methods:{processMessage(t){var n;const{data:e}=t;if(e)switch(e.type){case"builder.configureSdk":{const o=e.data,{breakpoints:s,contentId:r}=o;if(!r||r!==((n=this.useContent)==null?void 0:n.id))return;this.useBreakpoints=s,this.forceReRenderCount=this.forceReRenderCount+1;break}case"builder.contentUpdate":{const o=e.data,s=o.key||o.alias||o.entry||o.modelName,r=o.data;s===this.model&&(this.overrideContent=r,this.forceReRenderCount=this.forceReRenderCount+1);break}}},evaluateJsCode(){var e,n;const t=(n=(e=this.useContent)==null?void 0:e.data)==null?void 0:n.jsCode;t&&S({code:t,context:this.contextContext,state:this.contentState})},onClick(t){var e,n;if(this.useContent){const o=(e=this.useContent)==null?void 0:e.testVariationId,s=(n=this.useContent)==null?void 0:n.id;w({type:"click",canTrack:this.canTrackToUse,contentId:s,apiKey:this.apiKey,variationId:o!==s?o:void 0})}},evalExpression(t){return t.replace(/{{([^}]+)}}/g,(e,n)=>S({code:n,context:this.contextContext,state:this.contentState}))},handleRequest({url:t,key:e}){K(t).then(n=>n.json()).then(n=>{const o={...this.overrideState,[e]:n};this.overrideState=o}).catch(n=>{console.log("error fetching dynamic data",t,n)})},runHttpRequests(){var e,n,o;const t=(o=(n=(e=this.useContent)==null?void 0:e.data)==null?void 0:n.httpRequests)!=null?o:{};Object.entries(t).forEach(([s,r])=>{if(r&&(!this.httpReqsData[s]||f())){const i=this.evalExpression(r);this.handleRequest({url:i,key:s})}})},emitStateUpdate(){f()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:this.contentState,ref:{name:this.model}}}))}}};var cn=function(){var o,s,r,i,l,a,u;var e=this,n=e._self._c;return e.useContent?n("div",{ref:"elementRef",attrs:{"builder-content-id":(o=e.useContent)==null?void 0:o.id,"builder-model":e.model},on:{click:function(d){return e.onClick(d)}}},[e.shouldRenderContentStyles?[n("render-content-styles",{attrs:{cssCode:(r=(s=e.useContent)==null?void 0:s.data)==null?void 0:r.cssCode,customFonts:(l=(i=e.useContent)==null?void 0:i.data)==null?void 0:l.customFonts}})]:e._e(),n("render-blocks",{key:e.forceReRenderCount,attrs:{blocks:(u=(a=e.useContent)==null?void 0:a.data)==null?void 0:u.blocks}})],2):e._e()},un=[],dn=m(ln,cn,un,!1,null,null,null,null);const le=dn.exports,mn=Object.freeze(Object.defineProperty({__proto__:null,default:le},Symbol.toStringTag,{value:"Module"})),pn=()=>Promise.resolve().then(()=>require("./block-styles.b9cb70e5.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./render-block/block-styles.vue",t),t}),hn=()=>Promise.resolve().then(()=>require("./render-block.2c42b2ea.cjs")).then(t=>t.default).catch(t=>{throw console.error("Error while attempting to dynamically import component RenderBlock at ./render-block/render-block.vue",t),t}),fn={name:"render-blocks",components:{RenderBlock:hn,BlockStyles:pn},props:["blocks","parent","path","styleProp"],inject:{builderContext:"BuilderContext"},computed:{className(){var t;return"builder-blocks"+((t=this.blocks)!=null&&t.length?"":" no-blocks")}},methods:{onClick(){var t,e;f()&&!((t=this.blocks)!=null&&t.length)&&((e=window.parent)==null||e.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},onMouseEnter(){var t,e;f()&&!((t=this.blocks)!=null&&t.length)&&((e=window.parent)==null||e.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:this.parent,dataPath:this.path}},"*"))},_classStringToObject(t){const e={};if(typeof t!="string")return e;const n=t.trim().split(/\s+/);for(const o of n)e[o]=!0;return e}}};var gn=function(){var e=this,n=e._self._c;return n("div",{class:e._classStringToObject(e.className+" div-23e8fqt91nf"),style:e.styleProp,attrs:{"builder-path":e.path,"builder-parent-id":e.parent,dataSet:{class:e.className}},on:{click:function(o){return e.onClick()},mouseenter:function(o){return e.onMouseEnter()}}},[e.blocks?e._l(e.blocks,function(o,s){return n("render-block",{key:"render-block-"+o.id,attrs:{block:o,context:e.builderContext}})}):e._e(),e.blocks?e._l(e.blocks,function(o,s){return n("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:e.builderContext}})}):e._e()],2)},bn=[],yn=m(fn,gn,bn,!1,null,"713efc9e",null,null);const ce=yn.exports,ue=Object.freeze(Object.defineProperty({__proto__:null,default:ce},Symbol.toStringTag,{value:"Module"})),A={};function vn(t){if(p()){Object.assign(A,t);const e={type:"builder.settingsChange",data:A};parent.postMessage(e,"*")}}exports.Button=Z;exports.Columns=N;exports.Fragment=te;exports.Image=L;exports.Section=ee;exports.Symbol=Q;exports.TARGET=v;exports.Text=M;exports.Video=z;exports.components=T;exports.convertSearchParamsToQueryObject=G;exports.convertStyleMapToCSSArray=W;exports.createCssClass=fe;exports.createRegisterComponentMessage=oe;exports.evaluate=S;exports.fastClone=_;exports.getAllContent=Y;exports.getBuilderSearchParams=J;exports.getBuilderSearchParamsFromWindow=X;exports.getContent=R;exports.getMaxWidthQueryForSize=pe;exports.getSizesForBreakpoints=V;exports.isEditing=f;exports.isPreviewing=ne;exports.normalizeComponent=m;exports.normalizeSearchParams=I;exports.register=O;exports.registerComponent=Kt;exports.renderBlocks=ce;exports.renderContent=le;exports.setEditorSettings=vn;exports.track=sn;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index.50198d49.cjs"),l=require("./get-processed-block.ac23eb44.cjs"),u=e=>`v-on:${e.toLowerCase()}`,p=(e,t)=>n=>s.evaluate({code:e,context:t.context,state:t.state,event:n,isExpression:!1});function m(e){var o;const t={},n=(o=e.block.actions)!=null?o:{};for(const r in n){if(!n.hasOwnProperty(r))continue;const c=n[r];t[u(r)]=p(c,e)}return t}function h(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}function k(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 x(e){return e.class=k(e.class),e}function f(e){var n;const t={...e.properties,"builder-id":e.id,style:b(e.style),class:[e.id,"builder-block",e.class,(n=e.properties)==null?void 0:n.class].filter(Boolean).join(" ")};return x(t)}function b(e){if(!!e)switch(s.TARGET){case"svelte":case"vue2":case"vue3":case"solid":return s.convertStyleMapToCSSArray(e).join(" ");case"qwik":case"reactNative":case"react":return e}}function g(e){return e.tagName||"div"}const y=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],C=e=>typeof e=="string"&&y.includes(e.toLowerCase()),v=()=>Promise.resolve().then(()=>require("./block-styles.b9cb70e5.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component BlockStyles at ./block-styles.vue",e),e}),B=()=>Promise.resolve().then(()=>require("./render-repeated-block.2ef95a2e.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}),_=()=>Promise.resolve().then(()=>require("./render-component-with-context.88c14993.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderComponentWithContext at ./render-component-with-context.vue",e),e}),d=()=>Promise.resolve().then(()=>require("./render-component.4e09cdef.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component RenderComponent at ./render-component.vue",e),e}),E={name:"render-block",components:{RenderRepeatedBlock:B,BlockStyles:v,RenderComponentWithContext:_,RenderComponent:d},props:["block","context"],data:()=>({isEmptyHtmlElement:C}),computed:{component(){var n;const e=(n=l.getProcessedBlock({block:this.block,state:this.context.state,context:this.context.context,shouldEvaluateBindings:!1}).component)==null?void 0:n.name;if(!e)return null;const t=this.context.registeredComponents[e];if(t)return t;console.warn(`
|
|
2
|
-
Could not find a registered component named "${e}".
|
|
3
|
-
If you registered it, is the file that registered it imported by the file that needs to render it?`)},tag(){return g(this.useBlock)},useBlock(){return this.repeatItemData?this.block:l.getProcessedBlock({block:this.block,state:this.context.state,context:this.context.context,shouldEvaluateBindings:!0})},actions(){return m({block:this.useBlock,state:this.context.state,context:this.context.context})},attributes(){return{...f(this.useBlock)}},shouldWrap(){var e;return!((e=this.component)!=null&&e.noWrap)},renderComponentProps(){var e,t,n,o;return{blockChildren:this.useChildren,componentRef:(e=this.component)==null?void 0:e.component,componentOptions:{...h(this.useBlock),...this.shouldWrap?{}:{attributes:{...this.attributes,...this.actions}},customBreakpoints:(o=(n=(t=this.childrenContext)==null?void 0:t.content)==null?void 0:n.meta)==null?void 0:o.breakpoints},context:this.childrenContext}},useChildren(){var e;return(e=this.useBlock.children)!=null?e:[]},childrenWithoutParentComponent(){var t;return!((t=this.component)!=null&&t.component)&&!this.repeatItemData?this.useChildren:[]},repeatItemData(){const{repeat:e,...t}=this.block;if(!(e!=null&&e.collection))return;const n=s.evaluate({code:e.collection,state:this.context.state,context:this.context.context});if(!Array.isArray(n))return;const o=e.collection.split(".").pop(),r=e.itemName||(o?o+"Item":"item");return n.map((i,a)=>({context:{...this.context,state:{...this.context.state,$index:a,$item:i,[r]:i,[`$${r}Index`]:a}},block:t}))},inheritedTextStyles(){return{}},childrenContext(){return{apiKey:this.context.apiKey,state:this.context.state,content:this.context.content,context:this.context.context,registeredComponents:this.context.registeredComponents,inheritedStyles:this.inheritedTextStyles}},renderComponentTag(){return d}}};var P=function(){var t=this,n=t._self._c;return Boolean(t.shouldWrap)?t.isEmptyHtmlElement(t.tag)?n(t.tag,t._b({tag:"component"},"component",{...t.attributes,...t.actions},!1)):!t.isEmptyHtmlElement(t.tag)&&t.repeatItemData?n("div",{staticClass:"vue2-root-element-workaround"},t._l(t.repeatItemData,function(o,r){return n("render-repeated-block",{key:r,attrs:{repeatContext:o.context,block:o.block}})}),1):n(t.tag,t._b({tag:"component"},"component",{...t.attributes,...t.actions},!1),[n(t.renderComponentTag,t._b({tag:"component"},"component",t.renderComponentProps,!1)),t._l(t.childrenWithoutParentComponent,function(o,r){return n("render-block",{key:"render-block-"+o.id,attrs:{block:o,context:t.childrenContext}})}),t._l(t.childrenWithoutParentComponent,function(o,r){return n("block-styles",{key:"block-style-"+o.id,attrs:{block:o,context:t.childrenContext}})})],2):n(t.renderComponentTag,t._b({tag:"component"},"component",t.renderComponentProps,!1))},w=[],R=s.normalizeComponent(E,P,w,!1,null,null,null,null);const T=R.exports;exports.default=T;
|