@builder.io/sdk-react-nextjs 0.12.1 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/USE_CLIENT_BUNDLE-4b1b3c99.cjs +23 -0
- package/lib/browser/{USE_CLIENT_BUNDLE-ac9ba054.js → USE_CLIENT_BUNDLE-550679f9.js} +250 -265
- package/lib/{edge/USE_SERVER_BUNDLE-231b55dd.js → browser/USE_SERVER_BUNDLE-464dccd7.js} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-24df6623.cjs → browser/USE_SERVER_BUNDLE-6234c5ea.cjs} +1 -1
- package/lib/browser/bundle-1d763be7.cjs +168 -0
- package/lib/browser/{bundle-7e2a44d9.js → bundle-d905bf70.js} +572 -573
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +17 -17
- package/lib/edge/{USE_CLIENT_BUNDLE-3049fd56.js → USE_CLIENT_BUNDLE-aa38a343.js} +250 -265
- package/lib/edge/USE_CLIENT_BUNDLE-edb18eb8.cjs +23 -0
- package/lib/{node/USE_SERVER_BUNDLE-33c309df.js → edge/USE_SERVER_BUNDLE-70c27ea1.js} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-93366161.cjs → edge/USE_SERVER_BUNDLE-f0eeb33e.cjs} +1 -1
- package/lib/edge/{bundle-6d55a6a7.cjs → bundle-25fa71b1.cjs} +33 -33
- package/lib/edge/{bundle-44392f6d.js → bundle-834dbf29.js} +807 -808
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +17 -17
- package/lib/node/{USE_CLIENT_BUNDLE-f4804af3.js → USE_CLIENT_BUNDLE-d30db795.js} +250 -265
- package/lib/node/USE_CLIENT_BUNDLE-def5165a.cjs +23 -0
- package/lib/{browser/USE_SERVER_BUNDLE-153f7d4b.js → node/USE_SERVER_BUNDLE-610c83b3.js} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-a0bf6d8f.cjs → node/USE_SERVER_BUNDLE-a5db98bc.cjs} +1 -1
- package/lib/node/{bundle-217b5738.js → bundle-1f73ead0.js} +162 -163
- package/lib/node/{bundle-b9af39ec.cjs → bundle-4efd9623.cjs} +7 -7
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +17 -17
- package/package.json +1 -1
- package/types/cjs/components/block/block.helpers.d.ts +0 -1
- package/types/cjs/components/block/components/block-wrapper.d.ts +2 -6
- package/types/cjs/components/content-variants/content-variants.types.d.ts +4 -0
- package/types/cjs/components/dynamic-renderer/dynamic-renderer.d.ts +8 -0
- package/types/cjs/components/dynamic-renderer/dynamic-renderer.helpers.d.ts +1 -0
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/is-from-trusted-host.d.ts +3 -0
- package/types/cjs/scripts/init-editing.d.ts +1 -0
- package/types/esm/components/block/block.helpers.d.ts +0 -1
- package/types/esm/components/block/components/block-wrapper.d.ts +2 -6
- package/types/esm/components/content-variants/content-variants.types.d.ts +4 -0
- package/types/esm/components/dynamic-renderer/dynamic-renderer.d.ts +8 -0
- package/types/esm/components/dynamic-renderer/dynamic-renderer.helpers.d.ts +1 -0
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/is-from-trusted-host.d.ts +3 -0
- package/types/esm/scripts/init-editing.d.ts +1 -0
- package/lib/browser/USE_CLIENT_BUNDLE-5457b97e.cjs +0 -23
- package/lib/browser/bundle-6435b7fb.cjs +0 -168
- package/lib/edge/USE_CLIENT_BUNDLE-8922846d.cjs +0 -23
- package/lib/node/USE_CLIENT_BUNDLE-09122ff1.cjs +0 -23
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";"use strict";const t=require("react/jsx-runtime"),a=require("./bundle-4efd9623.cjs"),r=require("react"),M=require("./USE_SERVER_BUNDLE-a5db98bc.cjs"),D=require("next/navigation");function V(e){return t.jsxs(t.Fragment,{children:[e.link?t.jsx(t.Fragment,{children:t.jsx("a",{...e.attributes,href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"button",children:e.text})}):t.jsx(t.Fragment,{children:t.jsx("button",{...e.attributes,style:e.attributes.style,className:e.attributes.className+" button-fdf49de0",children:e.text})}),t.jsx("style",{children:`.button-fdf49de0 {
|
|
2
|
+
all: unset;
|
|
3
|
+
}`})]})}function H(e){return t.jsx(t.Fragment,{children:a.isEmptyElement(e.TagName)?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):t.jsx(t.Fragment,{children:typeof e.TagName=="string"?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}function U(e){return t.jsx(H,{TagName:e.Wrapper,attributes:a.getBlockProperties({block:e.block,context:e.context}),actionAttributes:a.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function O(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...a.getBlockProperties({block:e.block,context:e.context}),...a.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}function J(e){function l(){var s;return"builder-blocks"+((s=e.blocks)!=null&&s.length?"":" no-blocks")}function g(){var s,m;a.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((m=window.parent)==null||m.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function S(){var s,m;a.isEditing()&&!((s=e.blocks)!=null&&s.length)&&((m=window.parent)==null||m.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx(e.BlocksWrapper,{className:l()+" props-blocks-wrapper-4f2c12d8","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:s=>g(),onMouseEnter:s=>S(),onKeyPress:s=>g(),...e.BlocksWrapperProps,children:e.children}),t.jsx("style",{children:`.props-blocks-wrapper-4f2c12d8 {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: stretch;
|
|
7
|
+
}`})]})}function $(e){return t.jsx("span",{children:e.children})}function G(e){var s,m,x,v;function l(){var f;const d=e.image||e.src;if(!d||!(d.match(/builder\.io/)||d.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((f=e.image)!=null&&f.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),a.getSrcSet(d)}else if(e.image&&!e.srcset)return a.getSrcSet(d);return a.getSrcSet(d)}function g(){var b;return(b=l==null?void 0:l())!=null&&b.match(/builder\.io/)&&!e.noWebp?l().replace(/\?/g,"?format=webp&"):""}function S(){const b={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?b:void 0}return t.jsxs(t.Fragment,{children:[t.jsxs(t.Fragment,{children:[t.jsxs("picture",{children:[g()?t.jsx(t.Fragment,{children:t.jsx("source",{type:"image/webp",srcSet:g()})}):null,t.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?"presentation":void 0,style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...S()},className:"builder-image"+(e.className?" "+e.className:"")+" img-40c70c9b",src:e.image,srcSet:l(),sizes:e.sizes})]}),e.aspectRatio&&!((m=(s=e.builderBlock)==null?void 0:s.children)!=null&&m.length&&e.fitContent)?t.jsx(t.Fragment,{children:t.jsx("div",{className:"builder-image-sizer div-40c70c9b",style:{paddingTop:e.aspectRatio*100+"%"}})}):null,(v=(x=e.builderBlock)==null?void 0:x.children)!=null&&v.length&&e.fitContent?t.jsx(t.Fragment,{children:e.children}):null,!e.fitContent&&e.children?t.jsx(t.Fragment,{children:t.jsx("div",{className:"div-40c70c9b-2",children:e.children})}):null]}),t.jsx("style",{children:`.img-40c70c9b {
|
|
8
|
+
opacity: 1;
|
|
9
|
+
transition: opacity 0.2s ease-in-out;
|
|
10
|
+
}.div-40c70c9b {
|
|
11
|
+
width: 100%;
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
font-size: 0;
|
|
14
|
+
}.div-40c70c9b-2 {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: stretch;
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 0;
|
|
20
|
+
left: 0;
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
}`})]})}function Q(e){return t.jsx("section",{...e.attributes,style:{width:"100%",alignSelf:"stretch",flexGrow:1,boxSizing:"border-box",maxWidth:e.maxWidth||1200,display:"flex",flexDirection:"column",alignItems:"stretch",marginLeft:"auto",marginRight:"auto"},children:e.children})}function X(e){const l=r.useRef(null),[g,S]=r.useState(()=>[]),[s,m]=r.useState(()=>[]);return r.useEffect(()=>{var v;if(!((v=l.current)!=null&&v.getElementsByTagName)||typeof window>"u")return;const x=l.current.getElementsByTagName("script");for(let b=0;b<x.length;b++){const d=x[b];if(d.src){if(g.includes(d.src))continue;g.push(d.src);const f=document.createElement("script");f.async=!0,f.src=d.src,document.head.appendChild(f)}else if(!d.type||["text/javascript","application/javascript","application/ecmascript"].includes(d.type)){if(s.includes(d.innerText))continue;try{s.push(d.innerText),new Function(d.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),t.jsx("div",{ref:l,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}function Y(e){const l=r.useRef(null),[g,S]=r.useState(()=>[]),[s,m]=r.useState(()=>[]),[x,v]=r.useState(()=>!1);function b(){if(!l.current||!l.current.getElementsByTagName)return;const d=l.current.getElementsByTagName("script");for(let f=0;f<d.length;f++){const y=d[f];if(y.src&&!g.includes(y.src)){g.push(y.src);const k=document.createElement("script");k.async=!0,k.src=y.src,document.head.appendChild(k)}else if(a.isJsScript(y)&&!s.includes(y.innerText))try{s.push(y.innerText),new Function(y.innerText)()}catch(k){console.warn("`Embed`: Error running script:",k)}}}return r.useEffect(()=>{l.current&&!x&&(v(!0),b())},[l.current,x]),t.jsx("div",{className:"builder-embed",ref:l,dangerouslySetInnerHTML:{__html:e.content}})}function Z(e){return t.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},a.isEditing()&&e.imgSrc||"default-key")}function p(e){var S,s,m,x,v,b,d;function l(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function g(){return{...l()}}return t.jsxs("div",{style:{position:"relative"},children:[t.jsx("video",{className:"builder-video",...g(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(S=e.attributes)==null?void 0:S.style,objectFit:e.fit,objectPosition:e.position,zIndex:2,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:t.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((m=(s=e.builderBlock)==null?void 0:s.children)!=null&&m.length))?t.jsx(t.Fragment,{children:t.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}})}):null,(v=(x=e.builderBlock)==null?void 0:x.children)!=null&&v.length&&e.fitContent?t.jsx(t.Fragment,{children:t.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children})}):null,(d=(b=e.builderBlock)==null?void 0:b.children)!=null&&d.length&&!e.fitContent?t.jsx(t.Fragment,{children:t.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",alignItems:"stretch",position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},children:e.children})}):null]})}const ee=r.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}});function te(e){var I,P,T,F,B,N,L;const l=r.useRef(null),[g,S]=r.useState(()=>0);r.useState(()=>!0);function s(n){var c,o;const i={...e.builderContextSignal.rootState,...n};e.builderContextSignal.rootSetState?(o=(c=e.builderContextSignal).rootSetState)==null||o.call(c,i):e.builderContextSignal.rootState=i}function m(n){var c,o,u,h,W;const i={...e.builderContextSignal.content,...n,data:{...(c=e.builderContextSignal.content)==null?void 0:c.data,...n==null?void 0:n.data},meta:{...(o=e.builderContextSignal.content)==null?void 0:o.meta,...n==null?void 0:n.meta,breakpoints:((u=n==null?void 0:n.meta)==null?void 0:u.breakpoints)||((W=(h=e.builderContextSignal.content)==null?void 0:h.meta)==null?void 0:W.breakpoints)}};M.postPreviewContent({value:i,key:i.id}).then(()=>{z.refresh()})}r.useState(()=>0);const[x,v]=r.useState(()=>!1),[b,d]=r.useState(()=>e.contentWrapper||"div");function f(n){var c;if(!a.isFromTrustedHost(e.trustedHosts,n))return;const{data:i}=n;if(i)switch(i.type){case"builder.configureSdk":{const o=i.data,{breakpoints:u,contentId:h}=o;if(!h||h!==((c=e.builderContextSignal.content)==null?void 0:c.id))return;u&&m({meta:{breakpoints:u}}),S(g+1);break}case"builder.contentUpdate":{const o=i.data,u=o.key||o.alias||o.entry||o.modelName,h=o.data;u===e.model&&(m(h),S(g+1));break}}}function y(){var i,c;const n=(c=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:c.jsCode;n&&a.evaluate({code:n,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})}const[k,ne]=r.useState(()=>({})),[E,K]=r.useState(()=>!1);function q(n){var i,c;if(e.builderContextSignal.content){const o=(i=e.builderContextSignal.content)==null?void 0:i.testVariationId,u=(c=e.builderContextSignal.content)==null?void 0:c.id;a._track({type:"click",canTrack:a.getDefaultCanTrack(e.canTrack),contentId:u,apiKey:e.apiKey,variationId:o!==u?o:void 0,...a.getInteractionPropertiesForEvent(n),unique:!E})}E||K(!0)}function A(n){return n.replace(/{{([^}]+)}}/g,(i,c)=>a.evaluate({code:c,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState}))}function _({url:n,key:i}){a.fetch(n).then(c=>c.json()).then(c=>{var u,h;const o={...e.builderContextSignal.rootState,[i]:c};(h=(u=e.builderContextSignal).rootSetState)==null||h.call(u,o),k[i]=!0}).catch(c=>{console.error("error fetching dynamic data",n,c)})}function j(){var i,c;const n=((c=(i=e.builderContextSignal.content)==null?void 0:i.data)==null?void 0:c.httpRequests)??{};Object.entries(n).forEach(([o,u])=>{if(u&&(!k[o]||a.isEditing())){const h=A(u);_({url:h,key:o})}})}function C(){a.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:a.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}function w(n){S(g+1),window.addEventListener("message",f),a.registerInsertMenu(),a.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.includeRefs?{includeRefs:e.includeRefs}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(i=>{var o;const c=a.createRegisterComponentMessage(i);(o=window.parent)==null||o.postMessage(c,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",C)}function R(n){const i=new URL(location.href).searchParams,c=i.get("builder.preview"),o=i.get(`builder.preview.${c}`),u=i.get("apiKey")||i.get("builder.space");c===e.model&&u===e.apiKey&&(!e.content||o===e.content.id)&&a.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(h=>{h&&m(h)})}const z=D.useRouter();return r.useEffect(()=>{var n;return(n=l.current)==null||n.addEventListener("initeditingbldr",w),()=>{var i;return(i=l.current)==null?void 0:i.removeEventListener("initeditingbldr",w)}},[]),r.useEffect(()=>{var n;return(n=l.current)==null||n.addEventListener("initpreviewingbldr",R),()=>{var i;return(i=l.current)==null?void 0:i.removeEventListener("initpreviewingbldr",R)}},[]),r.useEffect(()=>{var n,i;if(a.isBrowser()){if(a.isEditing()&&l.current&&l.current.dispatchEvent(new CustomEvent("initeditingbldr")),e.builderContextSignal.content&&a.getDefaultCanTrack(e.canTrack)){const o=(n=e.builderContextSignal.content)==null?void 0:n.testVariationId,u=(i=e.builderContextSignal.content)==null?void 0:i.id,h=e.apiKey;a._track({type:"impression",canTrack:!0,contentId:u,apiKey:h,variationId:o!==u?o:void 0})}a.isPreviewing()&&l.current}},[]),r.useEffect(()=>{e.apiKey||a.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),y(),j(),C()},[]),r.useEffect(()=>{},[e.content]),r.useEffect(()=>{a.isBrowser()&&(window.removeEventListener("message",f),window.addEventListener("message",f))},[x]),r.useEffect(()=>{y()},[(P=(I=e.builderContextSignal.content)==null?void 0:I.data)==null?void 0:P.jsCode,e.builderContextSignal.rootState]),r.useEffect(()=>{j()},[(F=(T=e.builderContextSignal.content)==null?void 0:T.data)==null?void 0:F.httpRequests]),r.useEffect(()=>{C()},[e.builderContextSignal.rootState]),r.useEffect(()=>{e.data&&s(e.data)},[e.data]),r.useEffect(()=>{e.locale&&s({locale:e.locale})},[e.locale]),r.useEffect(()=>()=>{a.isBrowser()&&(window.removeEventListener("message",f),window.removeEventListener("builder:component:stateChangeListenerActivated",C))},[]),t.jsx(ee.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?t.jsx(t.Fragment,{children:r.createElement(b,{key:g,ref:l,onClick:n=>q(n),"builder-content-id":(B=e.builderContextSignal.content)==null?void 0:B.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((N=e.content)==null?void 0:N.testVariationId)||((L=e.content)==null?void 0:L.id)}`},e.children)}):null})}exports.BlockWrapper=U;exports.BlocksWrapper=J;exports.Button=V;exports.CustomCode=X;exports.Embed=Y;exports.EnableEditor=te;exports.FragmentComponent=$;exports.Image=G;exports.ImgComponent=Z;exports.InteractiveElement=O;exports.SectionComponent=Q;exports.Video=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use server";"use strict";const n=require("./bundle-
|
|
1
|
+
"use server";"use strict";const n=require("./bundle-4efd9623.cjs");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LRUCache } from "lru-cache";
|
|
2
2
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { createElement } from "react";
|
|
4
|
-
import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, b as Button, C as CustomCode, E as Embed, F as FragmentComponent, c as Image, d as ImgComponent, S as SectionComponent, V as Video, e as EnableEditor } from "./USE_CLIENT_BUNDLE-
|
|
4
|
+
import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, b as Button, C as CustomCode, E as Embed, F as FragmentComponent, c as Image, d as ImgComponent, S as SectionComponent, V as Video, e as EnableEditor } from "./USE_CLIENT_BUNDLE-d30db795.js";
|
|
5
5
|
import "next/navigation";
|
|
6
6
|
function getBlockComponentOptions(e) {
|
|
7
7
|
var t;
|
|
@@ -187,21 +187,21 @@ output;
|
|
|
187
187
|
context: n,
|
|
188
188
|
event: o,
|
|
189
189
|
state: s
|
|
190
|
-
}), m = getIsolateContext(),
|
|
191
|
-
|
|
192
|
-
console.log(...
|
|
193
|
-
}),
|
|
194
|
-
set(a,
|
|
195
|
-
}), c.forEach(([
|
|
196
|
-
const l = typeof
|
|
190
|
+
}), m = getIsolateContext(), f = m.global;
|
|
191
|
+
f.setSync("global", f.derefInto()), f.setSync("log", function(...d) {
|
|
192
|
+
console.log(...d);
|
|
193
|
+
}), f.setSync(BUILDER_SET_STATE_NAME, function(d, u) {
|
|
194
|
+
set(a, d, u), i == null || i(a);
|
|
195
|
+
}), c.forEach(([d, u]) => {
|
|
196
|
+
const l = typeof u == "object" ? new ivm.Reference(
|
|
197
197
|
// workaround: methods with default values for arguments is not being cloned over
|
|
198
|
-
|
|
199
|
-
...
|
|
200
|
-
getUserAttributes: () =>
|
|
201
|
-
} :
|
|
198
|
+
d === "builder" ? {
|
|
199
|
+
...u,
|
|
200
|
+
getUserAttributes: () => u.getUserAttributes()
|
|
201
|
+
} : u
|
|
202
202
|
) : null;
|
|
203
|
-
|
|
204
|
-
}),
|
|
203
|
+
f.setSync(getSyncValName(d), l);
|
|
204
|
+
}), f.setSync(INJECTED_IVM_GLOBAL, ivm);
|
|
205
205
|
const p = processCode({
|
|
206
206
|
code: e,
|
|
207
207
|
args: c
|
|
@@ -295,7 +295,7 @@ function getProcessedBlock({
|
|
|
295
295
|
context: t
|
|
296
296
|
}) : a;
|
|
297
297
|
}
|
|
298
|
-
const
|
|
298
|
+
const getComponent = ({
|
|
299
299
|
block: e,
|
|
300
300
|
context: t,
|
|
301
301
|
registeredComponents: n
|
|
@@ -433,28 +433,28 @@ function BlockStyles(e) {
|
|
|
433
433
|
shouldEvaluateBindings: !0
|
|
434
434
|
}), i = r.responsiveStyles, a = e.context.content, s = getSizesForBreakpoints(
|
|
435
435
|
((l = a == null ? void 0 : a.meta) == null ? void 0 : l.breakpoints) || {}
|
|
436
|
-
), c = i == null ? void 0 : i.large, m = i == null ? void 0 : i.medium,
|
|
436
|
+
), c = i == null ? void 0 : i.large, m = i == null ? void 0 : i.medium, f = i == null ? void 0 : i.small, p = r.id;
|
|
437
437
|
if (!p)
|
|
438
438
|
return "";
|
|
439
439
|
const g = c ? createCssClass({
|
|
440
440
|
className: p,
|
|
441
441
|
styles: c
|
|
442
|
-
}) : "",
|
|
442
|
+
}) : "", d = m ? createCssClass({
|
|
443
443
|
className: p,
|
|
444
444
|
styles: m,
|
|
445
445
|
mediaQuery: getMaxWidthQueryForSize(
|
|
446
446
|
"medium",
|
|
447
447
|
s
|
|
448
448
|
)
|
|
449
|
-
}) : "",
|
|
449
|
+
}) : "", u = f ? createCssClass({
|
|
450
450
|
className: p,
|
|
451
|
-
styles:
|
|
451
|
+
styles: f,
|
|
452
452
|
mediaQuery: getMaxWidthQueryForSize(
|
|
453
453
|
"small",
|
|
454
454
|
s
|
|
455
455
|
)
|
|
456
456
|
}) : "";
|
|
457
|
-
return [g,
|
|
457
|
+
return [g, d, u].join(" ");
|
|
458
458
|
};
|
|
459
459
|
return /* @__PURE__ */ jsx(Fragment, { children: n() && t() ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { styles: n() }) }) : null });
|
|
460
460
|
}
|
|
@@ -529,7 +529,7 @@ function getStyleAttribute(e) {
|
|
|
529
529
|
return e;
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
const getWrapperProps = ({
|
|
532
|
+
const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), isEmptyElement = (e) => typeof e == "string" && EMPTY_HTML_ELEMENTS.has(e.toLowerCase()), getWrapperProps = ({
|
|
533
533
|
componentOptions: e,
|
|
534
534
|
builderBlock: t,
|
|
535
535
|
context: n,
|
|
@@ -598,7 +598,7 @@ function RepeatedBlock(e) {
|
|
|
598
598
|
);
|
|
599
599
|
}
|
|
600
600
|
function Block(e) {
|
|
601
|
-
var m,
|
|
601
|
+
var m, f, p;
|
|
602
602
|
const t = function() {
|
|
603
603
|
return getComponent({
|
|
604
604
|
block: e.block,
|
|
@@ -611,8 +611,8 @@ function Block(e) {
|
|
|
611
611
|
context: e.context
|
|
612
612
|
});
|
|
613
613
|
}, o = function() {
|
|
614
|
-
var
|
|
615
|
-
return (
|
|
614
|
+
var d;
|
|
615
|
+
return (d = e.block.repeat) != null && d.collection ? e.block : getProcessedBlock({
|
|
616
616
|
block: e.block,
|
|
617
617
|
localState: e.context.localState,
|
|
618
618
|
rootState: e.context.rootState,
|
|
@@ -626,20 +626,20 @@ function Block(e) {
|
|
|
626
626
|
var l, h;
|
|
627
627
|
if ((l = e.block.repeat) != null && l.collection)
|
|
628
628
|
return !!((h = n()) != null && h.length);
|
|
629
|
-
const
|
|
630
|
-
return ("show" in o() ? o().show : !0) && !
|
|
629
|
+
const d = "hide" in o() ? o().hide : !1;
|
|
630
|
+
return ("show" in o() ? o().show : !0) && !d;
|
|
631
631
|
}, a = function() {
|
|
632
|
-
var
|
|
633
|
-
return !((
|
|
632
|
+
var u;
|
|
633
|
+
return !((u = t()) != null && u.component) && !n() ? o().children ?? [] : [];
|
|
634
634
|
}, s = function() {
|
|
635
|
-
var
|
|
635
|
+
var d, u, l, h, y;
|
|
636
636
|
return {
|
|
637
637
|
blockChildren: o().children ?? [],
|
|
638
|
-
componentRef: (
|
|
638
|
+
componentRef: (d = t()) == null ? void 0 : d.component,
|
|
639
639
|
componentOptions: {
|
|
640
640
|
...getBlockComponentOptions(o()),
|
|
641
641
|
builderContext: e.context,
|
|
642
|
-
...((
|
|
642
|
+
...((u = t()) == null ? void 0 : u.name) === "Symbol" || ((l = t()) == null ? void 0 : l.name) === "Columns" ? {
|
|
643
643
|
builderComponents: e.registeredComponents
|
|
644
644
|
} : {}
|
|
645
645
|
},
|
|
@@ -664,59 +664,46 @@ function Block(e) {
|
|
|
664
664
|
includeBlockProps: s().includeBlockProps,
|
|
665
665
|
isInteractive: s().isInteractive
|
|
666
666
|
}
|
|
667
|
-
) }) : /* @__PURE__ */
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
(p = a()) == null ? void 0 : p.map((g) => /* @__PURE__ */ jsx(
|
|
708
|
-
Block,
|
|
709
|
-
{
|
|
710
|
-
block: g,
|
|
711
|
-
context: c,
|
|
712
|
-
registeredComponents: e.registeredComponents
|
|
713
|
-
},
|
|
714
|
-
g.id
|
|
715
|
-
))
|
|
716
|
-
]
|
|
717
|
-
}
|
|
718
|
-
) }) : null
|
|
719
|
-
] })
|
|
667
|
+
) }) : /* @__PURE__ */ jsx(Fragment, { children: n() ? /* @__PURE__ */ jsx(Fragment, { children: (p = n()) == null ? void 0 : p.map((g, d) => /* @__PURE__ */ jsx(
|
|
668
|
+
RepeatedBlock,
|
|
669
|
+
{
|
|
670
|
+
repeatContext: g.context,
|
|
671
|
+
block: g.block,
|
|
672
|
+
registeredComponents: e.registeredComponents
|
|
673
|
+
},
|
|
674
|
+
d
|
|
675
|
+
)) }) : /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
|
|
676
|
+
BlockWrapper,
|
|
677
|
+
{
|
|
678
|
+
Wrapper: r(),
|
|
679
|
+
block: o(),
|
|
680
|
+
context: e.context,
|
|
681
|
+
children: [
|
|
682
|
+
/* @__PURE__ */ jsx(
|
|
683
|
+
ComponentRef,
|
|
684
|
+
{
|
|
685
|
+
componentRef: s().componentRef,
|
|
686
|
+
componentOptions: s().componentOptions,
|
|
687
|
+
blockChildren: s().blockChildren,
|
|
688
|
+
context: s().context,
|
|
689
|
+
registeredComponents: s().registeredComponents,
|
|
690
|
+
builderBlock: s().builderBlock,
|
|
691
|
+
includeBlockProps: s().includeBlockProps,
|
|
692
|
+
isInteractive: s().isInteractive
|
|
693
|
+
}
|
|
694
|
+
),
|
|
695
|
+
(f = a()) == null ? void 0 : f.map((g) => /* @__PURE__ */ jsx(
|
|
696
|
+
Block,
|
|
697
|
+
{
|
|
698
|
+
block: g,
|
|
699
|
+
context: c,
|
|
700
|
+
registeredComponents: e.registeredComponents
|
|
701
|
+
},
|
|
702
|
+
g.id
|
|
703
|
+
))
|
|
704
|
+
]
|
|
705
|
+
}
|
|
706
|
+
) }) })
|
|
720
707
|
] }) : null });
|
|
721
708
|
}
|
|
722
709
|
function Blocks(e) {
|
|
@@ -743,7 +730,7 @@ function Blocks(e) {
|
|
|
743
730
|
);
|
|
744
731
|
}
|
|
745
732
|
function Columns(e) {
|
|
746
|
-
var
|
|
733
|
+
var d;
|
|
747
734
|
const t = typeof e.space == "number" ? e.space || 0 : 20, n = e.columns || [], o = e.stackColumnsAt || "tablet", r = function(l) {
|
|
748
735
|
var h;
|
|
749
736
|
return ((h = n[l]) == null ? void 0 : h.width) || 100 / n.length;
|
|
@@ -768,13 +755,13 @@ function Columns(e) {
|
|
|
768
755
|
desktopStyle: "row"
|
|
769
756
|
})
|
|
770
757
|
};
|
|
771
|
-
},
|
|
772
|
-
const h = l === 0 ? 0 : t, y = i(l), b = `${h}px`,
|
|
758
|
+
}, f = function(l) {
|
|
759
|
+
const h = l === 0 ? 0 : t, y = i(l), b = `${h}px`, I = "100%", x = 0;
|
|
773
760
|
return {
|
|
774
761
|
width: y,
|
|
775
762
|
["marginLeft"]: b,
|
|
776
763
|
"--column-width-mobile": s({
|
|
777
|
-
stackedStyle:
|
|
764
|
+
stackedStyle: I,
|
|
778
765
|
desktopStyle: y
|
|
779
766
|
}),
|
|
780
767
|
"--column-margin-left-mobile": s({
|
|
@@ -782,7 +769,7 @@ function Columns(e) {
|
|
|
782
769
|
desktopStyle: b
|
|
783
770
|
}),
|
|
784
771
|
"--column-width-tablet": a({
|
|
785
|
-
stackedStyle:
|
|
772
|
+
stackedStyle: I,
|
|
786
773
|
desktopStyle: y
|
|
787
774
|
}),
|
|
788
775
|
"--column-margin-left-tablet": a({
|
|
@@ -830,11 +817,11 @@ function Columns(e) {
|
|
|
830
817
|
style: m(),
|
|
831
818
|
children: [
|
|
832
819
|
/* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { styles: g() }) }),
|
|
833
|
-
(
|
|
820
|
+
(d = e.columns) == null ? void 0 : d.map((u, l) => /* @__PURE__ */ createElement(
|
|
834
821
|
"div",
|
|
835
822
|
{
|
|
836
823
|
className: "builder-column div-39daef82-2",
|
|
837
|
-
style:
|
|
824
|
+
style: f(l),
|
|
838
825
|
key: l
|
|
839
826
|
},
|
|
840
827
|
/* @__PURE__ */ jsx(
|
|
@@ -847,7 +834,7 @@ function Columns(e) {
|
|
|
847
834
|
},
|
|
848
835
|
context: e.builderContext,
|
|
849
836
|
registeredComponents: e.builderComponents,
|
|
850
|
-
blocks:
|
|
837
|
+
blocks: u.blocks
|
|
851
838
|
}
|
|
852
839
|
)
|
|
853
840
|
))
|
|
@@ -1338,13 +1325,13 @@ const getTopLevelDomain = (e) => {
|
|
|
1338
1325
|
e.delete("srcset"), e.delete("noWebp");
|
|
1339
1326
|
function n(a, s = 6e4) {
|
|
1340
1327
|
return new Promise((c, m) => {
|
|
1341
|
-
const
|
|
1328
|
+
const f = document.createElement("img");
|
|
1342
1329
|
let p = !1;
|
|
1343
|
-
|
|
1344
|
-
p = !0, c(
|
|
1345
|
-
},
|
|
1330
|
+
f.onload = () => {
|
|
1331
|
+
p = !0, c(f);
|
|
1332
|
+
}, f.addEventListener("error", (g) => {
|
|
1346
1333
|
console.warn("Image load failed", g.error), m(g.error);
|
|
1347
|
-
}),
|
|
1334
|
+
}), f.src = a, setTimeout(() => {
|
|
1348
1335
|
p || m(new Error("Image load timed out"));
|
|
1349
1336
|
}, s);
|
|
1350
1337
|
});
|
|
@@ -1893,32 +1880,32 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
|
|
|
1893
1880
|
includeRefs: s = !0,
|
|
1894
1881
|
enrich: c,
|
|
1895
1882
|
locale: m,
|
|
1896
|
-
apiVersion:
|
|
1883
|
+
apiVersion: f = DEFAULT_API_VERSION,
|
|
1897
1884
|
fields: p,
|
|
1898
1885
|
omit: g,
|
|
1899
|
-
offset:
|
|
1900
|
-
cacheSeconds:
|
|
1886
|
+
offset: d,
|
|
1887
|
+
cacheSeconds: u,
|
|
1901
1888
|
staleCacheSeconds: l,
|
|
1902
1889
|
sort: h,
|
|
1903
1890
|
includeUnpublished: y
|
|
1904
1891
|
} = e;
|
|
1905
1892
|
if (!a)
|
|
1906
1893
|
throw new Error("Missing API key");
|
|
1907
|
-
if (!["v2", "v3"].includes(
|
|
1908
|
-
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${
|
|
1894
|
+
if (!["v2", "v3"].includes(f))
|
|
1895
|
+
throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${f}'`);
|
|
1909
1896
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
1910
|
-
const b = new URL(`https://cdn.builder.io/api/${
|
|
1911
|
-
if (b.searchParams.set("omit", g || "meta.componentsUsed"), p && b.searchParams.set("fields", p), Number.isFinite(
|
|
1897
|
+
const b = new URL(`https://cdn.builder.io/api/${f}/content/${i}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m ? `&locale=${m}` : ""}${c ? `&enrich=${c}` : ""}`);
|
|
1898
|
+
if (b.searchParams.set("omit", g || "meta.componentsUsed"), p && b.searchParams.set("fields", p), Number.isFinite(d) && d > -1 && b.searchParams.set("offset", String(Math.floor(d))), typeof y == "boolean" && b.searchParams.set("includeUnpublished", String(y)), u && isPositiveNumber(u) && b.searchParams.set("cacheSeconds", String(u)), l && isPositiveNumber(l) && b.searchParams.set("staleCacheSeconds", String(l)), h) {
|
|
1912
1899
|
const S = flatten({
|
|
1913
1900
|
sort: h
|
|
1914
1901
|
});
|
|
1915
1902
|
for (const C in S)
|
|
1916
1903
|
b.searchParams.set(C, JSON.stringify(S[C]));
|
|
1917
1904
|
}
|
|
1918
|
-
const
|
|
1905
|
+
const I = {
|
|
1919
1906
|
...getBuilderSearchParamsFromWindow(),
|
|
1920
1907
|
...normalizeSearchParams(e.options || {})
|
|
1921
|
-
}, x = flatten(
|
|
1908
|
+
}, x = flatten(I);
|
|
1922
1909
|
for (const S in x)
|
|
1923
1910
|
b.searchParams.set(S, String(x[S]));
|
|
1924
1911
|
if (o && b.searchParams.set("userAttributes", JSON.stringify(o)), r) {
|
|
@@ -1977,7 +1964,11 @@ async function fetchEntries(e) {
|
|
|
1977
1964
|
return logger.error("Error fetching data. ", t), null;
|
|
1978
1965
|
}
|
|
1979
1966
|
}
|
|
1980
|
-
const getAllContent = fetchEntries;
|
|
1967
|
+
const getAllContent = fetchEntries, DEFAULT_TRUSTED_HOSTS = ["*.beta.builder.io", "beta.builder.io", "builder.io", "localhost", "qa.builder.io"];
|
|
1968
|
+
function isFromTrustedHost(e, t) {
|
|
1969
|
+
const n = new URL(t.origin), o = n.hostname;
|
|
1970
|
+
return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
1971
|
+
}
|
|
1981
1972
|
function isPreviewing() {
|
|
1982
1973
|
return !isBrowser() || isEditing() ? !1 : location.search.indexOf("builder.preview=") !== -1;
|
|
1983
1974
|
}
|
|
@@ -2165,7 +2156,7 @@ const findParentElement = (e, t, n = !0) => {
|
|
|
2165
2156
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
2166
2157
|
}
|
|
2167
2158
|
};
|
|
2168
|
-
}, SDK_VERSION = "0.12.
|
|
2159
|
+
}, SDK_VERSION = "0.12.2", registry = {};
|
|
2169
2160
|
function register(e, t) {
|
|
2170
2161
|
let n = registry[e];
|
|
2171
2162
|
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
|
@@ -2225,40 +2216,43 @@ const setupBrowserForEditing = (e = {}) => {
|
|
|
2225
2216
|
data: {
|
|
2226
2217
|
options: e
|
|
2227
2218
|
}
|
|
2228
|
-
}, "*"), window.addEventListener("message", ({
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2219
|
+
}, "*"), window.addEventListener("message", (o) => {
|
|
2220
|
+
var i, a;
|
|
2221
|
+
if (!isFromTrustedHost(e.trustedHosts, o))
|
|
2222
|
+
return;
|
|
2223
|
+
const {
|
|
2224
|
+
data: r
|
|
2225
|
+
} = o;
|
|
2226
|
+
if (r != null && r.type)
|
|
2227
|
+
switch (r.type) {
|
|
2234
2228
|
case "builder.evaluate": {
|
|
2235
|
-
const
|
|
2236
|
-
let
|
|
2229
|
+
const s = r.data.text, c = r.data.arguments || [], m = r.data.id, f = new Function(s);
|
|
2230
|
+
let p, g = null;
|
|
2237
2231
|
try {
|
|
2238
|
-
|
|
2239
|
-
} catch (
|
|
2240
|
-
|
|
2232
|
+
p = f.apply(null, c);
|
|
2233
|
+
} catch (d) {
|
|
2234
|
+
g = d;
|
|
2241
2235
|
}
|
|
2242
|
-
|
|
2236
|
+
g ? (i = window.parent) == null || i.postMessage({
|
|
2243
2237
|
type: "builder.evaluateError",
|
|
2244
2238
|
data: {
|
|
2245
|
-
id:
|
|
2246
|
-
error:
|
|
2239
|
+
id: m,
|
|
2240
|
+
error: g.message
|
|
2247
2241
|
}
|
|
2248
|
-
}, "*") :
|
|
2242
|
+
}, "*") : p && typeof p.then == "function" ? p.then((d) => {
|
|
2249
2243
|
var u;
|
|
2250
2244
|
(u = window.parent) == null || u.postMessage({
|
|
2251
2245
|
type: "builder.evaluateResult",
|
|
2252
2246
|
data: {
|
|
2253
|
-
id:
|
|
2254
|
-
result:
|
|
2247
|
+
id: m,
|
|
2248
|
+
result: d
|
|
2255
2249
|
}
|
|
2256
2250
|
}, "*");
|
|
2257
|
-
}).catch(console.error) : (
|
|
2251
|
+
}).catch(console.error) : (a = window.parent) == null || a.postMessage({
|
|
2258
2252
|
type: "builder.evaluateResult",
|
|
2259
2253
|
data: {
|
|
2260
|
-
result:
|
|
2261
|
-
id:
|
|
2254
|
+
result: p,
|
|
2255
|
+
id: m
|
|
2262
2256
|
}
|
|
2263
2257
|
}, "*");
|
|
2264
2258
|
break;
|
|
@@ -2354,7 +2348,7 @@ const getRootStateInitialValue = ({
|
|
|
2354
2348
|
meta: e == null ? void 0 : e.meta
|
|
2355
2349
|
} : void 0;
|
|
2356
2350
|
function ContentComponent(e) {
|
|
2357
|
-
var r, i, a, s, c, m,
|
|
2351
|
+
var r, i, a, s, c, m, f, p, g;
|
|
2358
2352
|
const t = getUpdateVariantVisibilityScript({
|
|
2359
2353
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2360
2354
|
variationId: (r = e.content) == null ? void 0 : r.testVariationId,
|
|
@@ -2370,10 +2364,10 @@ function ContentComponent(e) {
|
|
|
2370
2364
|
...components,
|
|
2371
2365
|
...e.customComponents || []
|
|
2372
2366
|
].reduce(
|
|
2373
|
-
(
|
|
2374
|
-
...
|
|
2367
|
+
(d, { component: u, ...l }) => ({
|
|
2368
|
+
...d,
|
|
2375
2369
|
[l.name]: {
|
|
2376
|
-
component:
|
|
2370
|
+
component: u,
|
|
2377
2371
|
...serializeComponentInfo(l)
|
|
2378
2372
|
}
|
|
2379
2373
|
}),
|
|
@@ -2403,8 +2397,8 @@ function ContentComponent(e) {
|
|
|
2403
2397
|
...components,
|
|
2404
2398
|
...e.customComponents || []
|
|
2405
2399
|
].reduce(
|
|
2406
|
-
(
|
|
2407
|
-
...
|
|
2400
|
+
(d, { component: u, ...l }) => ({
|
|
2401
|
+
...d,
|
|
2408
2402
|
[l.name]: serializeComponentInfo(l)
|
|
2409
2403
|
}),
|
|
2410
2404
|
{}
|
|
@@ -2429,6 +2423,7 @@ function ContentComponent(e) {
|
|
|
2429
2423
|
builderContextSignal: o,
|
|
2430
2424
|
contentWrapper: e.contentWrapper,
|
|
2431
2425
|
contentWrapperProps: e.contentWrapperProps,
|
|
2426
|
+
trustedHosts: e.trustedHosts,
|
|
2432
2427
|
children: [
|
|
2433
2428
|
e.isSsrAbTest ? /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedScript, { scriptStr: t }) }) : null,
|
|
2434
2429
|
/* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
@@ -2436,7 +2431,7 @@ function ContentComponent(e) {
|
|
|
2436
2431
|
{
|
|
2437
2432
|
contentId: (a = o.content) == null ? void 0 : a.id,
|
|
2438
2433
|
cssCode: (c = (s = o.content) == null ? void 0 : s.data) == null ? void 0 : c.cssCode,
|
|
2439
|
-
customFonts: (
|
|
2434
|
+
customFonts: (f = (m = o.content) == null ? void 0 : m.data) == null ? void 0 : f.customFonts
|
|
2440
2435
|
}
|
|
2441
2436
|
) }),
|
|
2442
2437
|
/* @__PURE__ */ jsx(
|
|
@@ -2507,7 +2502,8 @@ function ContentVariants(e) {
|
|
|
2507
2502
|
blocksWrapper: e.blocksWrapper,
|
|
2508
2503
|
blocksWrapperProps: e.blocksWrapperProps,
|
|
2509
2504
|
contentWrapper: e.contentWrapper,
|
|
2510
|
-
contentWrapperProps: e.contentWrapperProps
|
|
2505
|
+
contentWrapperProps: e.contentWrapperProps,
|
|
2506
|
+
trustedHosts: e.trustedHosts
|
|
2511
2507
|
},
|
|
2512
2508
|
s.testVariationId
|
|
2513
2509
|
))
|
|
@@ -2531,7 +2527,8 @@ function ContentVariants(e) {
|
|
|
2531
2527
|
blocksWrapper: e.blocksWrapper,
|
|
2532
2528
|
blocksWrapperProps: e.blocksWrapperProps,
|
|
2533
2529
|
contentWrapper: e.contentWrapper,
|
|
2534
|
-
contentWrapperProps: e.contentWrapperProps
|
|
2530
|
+
contentWrapperProps: e.contentWrapperProps,
|
|
2531
|
+
trustedHosts: e.trustedHosts
|
|
2535
2532
|
}
|
|
2536
2533
|
)
|
|
2537
2534
|
] });
|
|
@@ -2558,12 +2555,12 @@ const fetchSymbolContent = async ({
|
|
|
2558
2555
|
async function Symbol$1(e) {
|
|
2559
2556
|
var o, r, i, a, s;
|
|
2560
2557
|
const t = function() {
|
|
2561
|
-
var m,
|
|
2558
|
+
var m, f;
|
|
2562
2559
|
return [
|
|
2563
2560
|
e.attributes.className,
|
|
2564
2561
|
"builder-symbol",
|
|
2565
2562
|
(m = e.symbol) != null && m.inline ? "builder-inline-symbol" : void 0,
|
|
2566
|
-
(
|
|
2563
|
+
(f = e.symbol) != null && f.dynamic || e.dynamic ? "builder-dynamic-symbol" : void 0
|
|
2567
2564
|
].filter(Boolean).join(" ");
|
|
2568
2565
|
}, n = ((o = e.symbol) == null ? void 0 : o.content) || await fetchSymbolContent({
|
|
2569
2566
|
symbol: e.symbol,
|
|
@@ -2622,39 +2619,41 @@ const fetchBuilderProps = async (e) => {
|
|
|
2622
2619
|
};
|
|
2623
2620
|
};
|
|
2624
2621
|
export {
|
|
2625
|
-
|
|
2622
|
+
getAllContent as A,
|
|
2626
2623
|
Blocks as B,
|
|
2627
2624
|
ContentVariants as C,
|
|
2628
|
-
|
|
2629
|
-
|
|
2625
|
+
getContent as D,
|
|
2626
|
+
getBuilderSearchParams as E,
|
|
2627
|
+
track as F,
|
|
2628
|
+
fetchBuilderProps as G,
|
|
2630
2629
|
RenderBlocks as R,
|
|
2631
2630
|
Symbol$1 as S,
|
|
2632
2631
|
Text as T,
|
|
2633
2632
|
_track as _,
|
|
2634
2633
|
getBlockActions as a,
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2634
|
+
isEditing as b,
|
|
2635
|
+
getSrcSet as c,
|
|
2636
|
+
isJsScript as d,
|
|
2637
|
+
isBrowser as e,
|
|
2638
|
+
getDefaultCanTrack as f,
|
|
2640
2639
|
getBlockProperties as g,
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2640
|
+
isPreviewing as h,
|
|
2641
|
+
isEmptyElement as i,
|
|
2642
|
+
isFromTrustedHost as j,
|
|
2643
|
+
evaluate as k,
|
|
2645
2644
|
logger as l,
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2645
|
+
getInteractionPropertiesForEvent as m,
|
|
2646
|
+
fastClone as n,
|
|
2647
|
+
createRegisterComponentMessage as o,
|
|
2648
|
+
fetchOneEntry as p,
|
|
2649
|
+
fetch$1 as q,
|
|
2651
2650
|
registerInsertMenu as r,
|
|
2652
2651
|
setupBrowserForEditing as s,
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2652
|
+
init as t,
|
|
2653
|
+
RenderContent as u,
|
|
2654
|
+
Columns as v,
|
|
2655
|
+
register as w,
|
|
2656
|
+
setEditorSettings as x,
|
|
2657
|
+
_processContentResult as y,
|
|
2658
|
+
fetchEntries as z
|
|
2660
2659
|
};
|