@builder.io/sdk-react 1.0.12 → 1.0.14

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.
Files changed (54) hide show
  1. package/lib/browser/blocks-exports.cjs +27 -26
  2. package/lib/browser/blocks-exports.mjs +788 -790
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/{server-entry-60df1736.cjs → server-entry-742c121c.cjs} +1 -1
  6. package/lib/browser/{server-entry-34e4efb1.js → server-entry-df552d27.js} +1 -1
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{blocks-03ffaaf9.cjs → blocks-75e914c4.cjs} +1 -1
  10. package/lib/edge/{blocks-f8d5d3a0.js → blocks-dbf6f051.js} +2 -2
  11. package/lib/edge/blocks-exports.cjs +1 -1
  12. package/lib/edge/blocks-exports.mjs +2 -2
  13. package/lib/edge/{button-5137d1bc.cjs → button-4e7f9eff.cjs} +1 -1
  14. package/lib/edge/{button-5543875e.js → button-db8d78a4.js} +2 -2
  15. package/lib/edge/{columns-ad62a5ce.cjs → columns-8399aa74.cjs} +1 -1
  16. package/lib/edge/{columns-a05f9fd8.js → columns-9765610b.js} +3 -3
  17. package/lib/edge/{content-variants-74109911.js → content-variants-9a129944.js} +310 -312
  18. package/lib/edge/content-variants-ed22bfec.cjs +134 -0
  19. package/lib/edge/{form-67a4ec0b.js → form-7a73e99c.js} +3 -3
  20. package/lib/edge/{form-ee52f842.cjs → form-bc7b5558.cjs} +1 -1
  21. package/lib/edge/{get-class-prop-name-7ab1534a.cjs → get-class-prop-name-3c370466.cjs} +1 -1
  22. package/lib/edge/{get-class-prop-name-25116ae3.js → get-class-prop-name-83fffba1.js} +1 -1
  23. package/lib/edge/{img-147fc69c.cjs → img-7d93925c.cjs} +1 -1
  24. package/lib/edge/{img-43af4666.js → img-c944597b.js} +1 -1
  25. package/lib/edge/index.cjs +1 -1
  26. package/lib/edge/index.mjs +1 -1
  27. package/lib/edge/{input-90830684.cjs → input-72be594b.cjs} +1 -1
  28. package/lib/edge/{input-35088f50.js → input-d735cf41.js} +1 -1
  29. package/lib/edge/{select-1e63f097.cjs → select-3411462e.cjs} +1 -1
  30. package/lib/edge/{select-ee16e4ee.js → select-5e67472b.js} +1 -1
  31. package/lib/edge/{server-entry-f2d127da.js → server-entry-5e5c1898.js} +1 -1
  32. package/lib/edge/{server-entry-39e6b4a6.cjs → server-entry-62fc8a1d.cjs} +1 -1
  33. package/lib/edge/server-entry.cjs +1 -1
  34. package/lib/edge/server-entry.mjs +1 -1
  35. package/lib/edge/{slot-3db582db.cjs → slot-04d29096.cjs} +1 -1
  36. package/lib/edge/{slot-45a2e0bf.js → slot-495693a8.js} +3 -3
  37. package/lib/edge/{symbol-c533a54f.cjs → symbol-ad121694.cjs} +1 -1
  38. package/lib/edge/{symbol-75231166.js → symbol-c29e2a25.js} +3 -3
  39. package/lib/node/blocks-exports.cjs +15 -14
  40. package/lib/node/blocks-exports.mjs +328 -330
  41. package/lib/node/index.cjs +1 -1
  42. package/lib/node/index.mjs +1 -1
  43. package/lib/node/{server-entry-a0cd9606.js → server-entry-3a79d01e.js} +1 -1
  44. package/lib/node/{server-entry-81eab45c.cjs → server-entry-f5a4cdfa.cjs} +1 -1
  45. package/lib/node/server-entry.cjs +1 -1
  46. package/lib/node/server-entry.mjs +1 -1
  47. package/package.json +1 -1
  48. package/types/components/content/components/enable-editor.d.ts +1 -1
  49. package/types/components/content/components/styles.d.ts +1 -0
  50. package/types/components/content/components/styles.helpers.d.ts +1 -0
  51. package/types/components/content/contentProps.types.d.ts +6 -1
  52. package/types/components/content-variants/content-variants.d.ts +1 -1
  53. package/types/constants/sdk-version.d.ts +1 -1
  54. package/lib/edge/content-variants-e6ba9024.cjs +0 -133
@@ -1,16 +1,16 @@
1
- "use client";"use strict";var Ae=Object.defineProperty;var We=(e,t,n)=>t in e?Ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Y=(e,t,n)=>(We(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("./server-entry-60df1736.cjs"),d=require("react"),Ne=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),$e=e=>typeof e=="string"&&Ne.has(e.toLowerCase());function Z(e){return a.jsx(a.Fragment,{children:$e(e.TagName)?a.jsx(a.Fragment,{children:a.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):a.jsx(a.Fragment,{children:typeof e.TagName=="string"?a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const U=()=>{switch(m.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function fe(e){return a.jsx(Z,{attributes:{...e.attributes,[U()]:`${e.link?"":"builder-button"} ${e.attributes[U()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const ee=d.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}}),he=d.createContext({registeredComponents:{}});function De(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const Le=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),Me=()=>({isEditing:m.isEditing(),isBrowser:m.isBrowser(),isServer:!m.isBrowser(),getUserAttributes:()=>m.getUserAttributes()}),Oe=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,ae=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:r,rootState:s})=>{const l=Le({builder:t,context:n,event:i,state:ge({rootState:s,localState:o,rootSetState:r})});return new Function(...l.map(([u])=>u),e)(...l.map(([,u])=>u))};function ge({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,o)=>{if(t&&o in t)return t[o];const r=i[o];return typeof r=="object"&&r!==null?ge({rootState:r,localState:void 0,rootSetState:n?s=>{i[o]=s,n(i)}:void 0}):r},set:(i,o,r)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[o]=r,n==null||n(i),!0}})}function Ue(){var e;return typeof process!="undefined"&&m.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const He=()=>{var i;if(!Ue())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(i=process.env.NODE_OPTIONS)==null?void 0:i.includes("--no-node-snapshot");return e&&t&&!n?(m.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},Ke=e=>(m.isBrowser()||He(),ae(e)),W=class W{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return W.cache.get(t)}static setCachedValue(t,n){W.cache.size>20&&W.cache.delete(W.cache.keys().next().value),W.cache.set(t,{value:n})}};Y(W,"cacheLimit",20),Y(W,"cache",new Map);let O=W;function H({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:r,isExpression:s=!0,enableCache:l}){if(e===""){m.logger.warn("Skipping evaluation of empty code block.");return}const u={code:Oe(e,{isExpression:s}),builder:Me(),context:t,event:r,rootSetState:o,rootState:i,localState:n};if(l){const c=O.getCacheKey(u),f=O.getCachedValue(c);if(f)return f.value}try{const c=Ke(u);if(l){const f=O.getCacheKey(u);O.setCachedValue(f,c)}return c}catch(c){m.logger.error("Failed code evaluation: "+c.message,{code:e});return}}const be=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((o,r,s)=>Object(o[r])===o[r]?o[r]:o[r]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};const qe=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const r=m.fastClone(e),s={...r,properties:{...r.properties},actions:{...r.actions}};for(const l in e.bindings){const u=e.bindings[l],c=H({code:u,localState:n,rootState:i,rootSetState:o,context:t,enableCache:!0});be(s,l,c)}return s};function z({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:o,rootSetState:r}){const s=e;return n?qe({block:s,localState:i,rootState:o,rootSetState:r,context:t}):s}function _e(e,t,n={}){let i,o,r,s=null,l=0;const u=function(){l=n.leading===!1?0:Date.now(),s=null,r=e.apply(i,o),s||(i=o=null)};return function(){const c=Date.now();!l&&n.leading===!1&&(l=c);const f=t-(c-l);return i=this,o=arguments,f<=0||f>t?(s&&(clearTimeout(s),s=null),l=c,r=e.apply(i,o),s||(i=o=null)):!s&&n.trailing!==!1&&(s=setTimeout(u,f)),r}}function D(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const o=arguments[i];if(o!=null)for(const r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])}return n}const te=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function ze(e){for(const t of e)switch(t.trigger){case"pageLoad":ye(t);break;case"hover":Ye(t);break;case"scrollInView":Ge(t);break}}function ne(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ie(e,t){const n=Je(e),i=getComputedStyle(t),o=e.steps[0].styles,r=e.steps[e.steps.length-1].styles,s=[o,r];for(const l of s)for(const u of n)u in l||(l[u]=i[u])}function Je(e){const t=[];for(const n of e.steps)for(const i in n.styles)t.indexOf(i)===-1&&t.push(i);return t}function ye(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ne(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ie(e,n),n.style.transition="none",n.style.transitionDelay="0",D(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${te(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),D(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function Ye(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ne(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ie(e,n);const i=e.steps[0].styles,o=e.steps[1].styles;function r(){D(n.style,i)}function s(){D(n.style,o)}r(),n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",r),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${te(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")})})}function Ge(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ne(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ie(e,n);let i=!1,o=!1;function r(){!i&&l(n)?(i=!0,o=!0,setTimeout(()=>{D(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{o=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!o&&!l(n)&&(i=!1,D(n.style,e.steps[0].styles))}const s=_e(r,200,{leading:!1});function l(f){const h=f.getBoundingClientRect(),b=window.innerHeight,p=(e.thresholdPercent||0)/100*b;return h.bottom>p&&h.top<b-p}const u=e.steps[0].styles;function c(){D(n.style,u)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${te(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),r()})}const Qe=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),xe=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${Qe(n)}: ${i};`}).filter(m.checkIsDefined),Xe=e=>xe(e).join(`
2
- `),G=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
3
- ${Xe(n)}
1
+ "use client";"use strict";var Pe=Object.defineProperty;var Ve=(e,t,n)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var q=(e,t,n)=>(Ve(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("./server-entry-742c121c.cjs"),h=require("react"),Fe=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Be=e=>typeof e=="string"&&Fe.has(e.toLowerCase());function Y(e){return a.jsx(a.Fragment,{children:Be(e.TagName)?a.jsx(a.Fragment,{children:a.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):a.jsx(a.Fragment,{children:typeof e.TagName=="string"?a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):a.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const D=()=>{switch(m.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function ce(e){return a.jsx(Y,{attributes:{...e.attributes,[D()]:`${e.link?"":"builder-button"} ${e.attributes[D()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const G=h.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}}),de=h.createContext({registeredComponents:{}});function Ae(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const We=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),Ne=()=>({isEditing:m.isEditing(),isBrowser:m.isBrowser(),isServer:!m.isBrowser(),getUserAttributes:()=>m.getUserAttributes()}),$e=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,te=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:r,rootState:s})=>{const l=We({builder:t,context:n,event:i,state:ue({rootState:s,localState:o,rootSetState:r})});return new Function(...l.map(([d])=>d),e)(...l.map(([,d])=>d))};function ue({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,o)=>{if(t&&o in t)return t[o];const r=i[o];return typeof r=="object"&&r!==null?ue({rootState:r,localState:void 0,rootSetState:n?s=>{i[o]=s,n(i)}:void 0}):r},set:(i,o,r)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[o]=r,n==null||n(i),!0}})}function De(){var e;return typeof process!="undefined"&&m.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const Le=()=>{var i;if(!De())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(i=process.env.NODE_OPTIONS)==null?void 0:i.includes("--no-node-snapshot");return e&&t&&!n?(m.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},Me=e=>(m.isBrowser()||Le(),te(e)),V=class V{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return V.cache.get(t)}static setCachedValue(t,n){V.cache.size>20&&V.cache.delete(V.cache.keys().next().value),V.cache.set(t,{value:n})}};q(V,"cacheLimit",20),q(V,"cache",new Map);let $=V;function L({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:r,isExpression:s=!0,enableCache:l}){if(e===""){m.logger.warn("Skipping evaluation of empty code block.");return}const d={code:$e(e,{isExpression:s}),builder:Ne(),context:t,event:r,rootSetState:o,rootState:i,localState:n};if(l){const c=$.getCacheKey(d),f=$.getCachedValue(c);if(f)return f.value}try{const c=Me(d);if(l){const f=$.getCacheKey(d);$.setCachedValue(f,c)}return c}catch(c){m.logger.error("Failed code evaluation: "+c.message,{code:e});return}}const me=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((o,r,s)=>Object(o[r])===o[r]?o[r]:o[r]=Math.abs(Number(i[s+1]))>>0===+i[s+1]?[]:{},e)[i[i.length-1]]=n,e};const Oe=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const r=m.fastClone(e),s={...r,properties:{...r.properties},actions:{...r.actions}};for(const l in e.bindings){const d=e.bindings[l],c=L({code:d,localState:n,rootState:i,rootSetState:o,context:t,enableCache:!0});me(s,l,c)}return s};function H({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:o,rootSetState:r}){const s=e;return n?Oe({block:s,localState:i,rootState:o,rootSetState:r,context:t}):s}function Ue(e,t,n={}){let i,o,r,s=null,l=0;const d=function(){l=n.leading===!1?0:Date.now(),s=null,r=e.apply(i,o),s||(i=o=null)};return function(){const c=Date.now();!l&&n.leading===!1&&(l=c);const f=t-(c-l);return i=this,o=arguments,f<=0||f>t?(s&&(clearTimeout(s),s=null),l=c,r=e.apply(i,o),s||(i=o=null)):!s&&n.trailing!==!1&&(s=setTimeout(d,f)),r}}function A(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const o=arguments[i];if(o!=null)for(const r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])}return n}const Q=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function He(e){for(const t of e)switch(t.trigger){case"pageLoad":fe(t);break;case"hover":qe(t);break;case"scrollInView":ze(t);break}}function X(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function Z(e,t){const n=Ke(e),i=getComputedStyle(t),o=e.steps[0].styles,r=e.steps[e.steps.length-1].styles,s=[o,r];for(const l of s)for(const d of n)d in l||(l[d]=i[d])}function Ke(e){const t=[];for(const n of e.steps)for(const i in n.styles)t.indexOf(i)===-1&&t.push(i);return t}function fe(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){X(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Z(e,n),n.style.transition="none",n.style.transitionDelay="0",A(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${Q(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),A(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function qe(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){X(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Z(e,n);const i=e.steps[0].styles,o=e.steps[1].styles;function r(){A(n.style,i)}function s(){A(n.style,o)}r(),n.addEventListener("mouseenter",s),n.addEventListener("mouseleave",r),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${Q(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")})})}function ze(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){X(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Z(e,n);let i=!1,o=!1;function r(){!i&&l(n)?(i=!0,o=!0,setTimeout(()=>{A(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",s),setTimeout(()=>{o=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!o&&!l(n)&&(i=!1,A(n.style,e.steps[0].styles))}const s=Ue(r,200,{leading:!1});function l(f){const b=f.getBoundingClientRect(),x=window.innerHeight,C=(e.thresholdPercent||0)/100*x;return b.bottom>C&&b.top<x-C}const d=e.steps[0].styles;function c(){A(n.style,d)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${Q(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",s,{capture:!0,passive:!0}),r()})}const _e=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),he=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${_e(n)}: ${i};`}).filter(m.checkIsDefined),Je=e=>he(e).join(`
2
+ `),z=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
3
+ ${Je(n)}
4
4
  }`;return e?`${e} {
5
5
  ${i}
6
- }`:i};function Ze({style:e}){return e}const et=({block:e,context:t})=>pe(Ze({style:e.style||{},context:t,block:e}));function pe(e){switch(m.TARGET){case"svelte":case"vue":case"solid":return xe(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const tt=({block:e,context:t,registeredComponents:n})=>{var r;const i=(r=z({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!i)return null;const o=n[i];if(o)return o;console.warn(`
6
+ }`:i};function Ye({style:e}){return e}const Ge=({block:e,context:t})=>ge(Ye({style:e.style||{},context:t,block:e}));function ge(e){switch(m.TARGET){case"svelte":case"vue":case"solid":return he(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const Qe=({block:e,context:t,registeredComponents:n})=>{var r;const i=(r=H({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!i)return null;const o=n[i];if(o)return o;console.warn(`
7
7
  Could not find a registered component named "${i}".
8
- If you registered it, is the file that registered it imported by the file that needs to render it?`)},nt=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const o=H({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(o))return;const r=n.collection.split(".").pop(),s=n.itemName||(r?r+"Item":"item");return o.map((u,c)=>({context:{...t,localState:{...t.localState,$index:c,$item:u,[s]:u,[`$${s}Index`]:c}},block:i}))},Se={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},re=(e,t=Se)=>`@media (max-width: ${t[e].max}px)`,ve=({small:e,medium:t})=>{const n=m.fastClone(Se);if(!e||!t)return n;const i=Math.floor(e/2);n.small={max:e,min:i,default:i+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n};function J(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function it(e){function t(){const i=z({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return m.checkIsDefined(i.hide)?!i.hide:m.checkIsDefined(i.show)?i.show:!0}function n(){var p;const i=z({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),o=i.responsiveStyles,r=e.context.content,s=ve(((p=r==null?void 0:r.meta)==null?void 0:p.breakpoints)||{}),l=o==null?void 0:o.large,u=o==null?void 0:o.medium,c=o==null?void 0:o.small,f=i.id;if(!f)return"";const h=l?G({className:f,styles:l}):"",b=u?G({className:f,styles:u,mediaQuery:re("medium",s)}):"",x=c?G({className:f,styles:c,mediaQuery:re("small",s)}):"";return[h,b,x].join(" ")}return a.jsx(a.Fragment,{children:n()&&t()?a.jsx(a.Fragment,{children:a.jsx(J,{styles:n()})}):null})}function ot(e){return e.charAt(0).toUpperCase()+e.slice(1)}const at=e=>`on${ot(e)}`,rt=(e,t)=>n=>H({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,enableCache:!0});function ke(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const o in n){if(!n.hasOwnProperty(o))continue;const r=n[o];let s=at(o);if(e.stripPrefix)switch(m.TARGET){case"vue":s=s.replace("v-on:","");break;case"svelte":s=s.replace("on:","");break}t[s]=rt(r,e)}return t}function st({properties:e}){return e}const lt=e=>({href:e.href});function oe({block:e,context:t}){var i;const n={...lt(e),...e.properties,"builder-id":e.id,style:et({block:e,context:t}),[U()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return st({properties:n,context:t,block:e})}function ct(e){return a.jsx(Z,{TagName:e.Wrapper,attributes:oe({block:e.block,context:e.context}),actionAttributes:ke({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 ut(e){return a.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...oe({block:e.block,context:e.context}),...ke({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}const dt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:o,isInteractive:r,contextValue:s})=>{const l={...e,...o?{attributes:oe({block:t,context:s})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:o}:l};function se(e){var i;const[t,n]=d.useState(()=>e.isInteractive?ut:e.componentRef);return a.jsx(a.Fragment,{children:e.componentRef?a.jsx(a.Fragment,{children:a.jsx(t,{...dt({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(i=e.blockChildren)==null?void 0:i.map(o=>a.jsx(K,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function mt(e){const[t,n]=d.useState(()=>e.repeatContext);return a.jsx(ee.Provider,{value:t,children:a.jsx(K,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function K(e){var u,c,f;function t(){return tt({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return nt({block:e.block,context:e.context})}function i(){var h;return(h=e.block.repeat)!=null&&h.collection?e.block:z({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function o(){var b;return e.block.tagName==="a"||((b=i().properties)==null?void 0:b.href)||i().href?e.linkComponent||"a":e.block.tagName||"div"}function r(){var x,p;if((x=e.block.repeat)!=null&&x.collection)return!!((p=n==null?void 0:n())!=null&&p.length);const h="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!h}function s(){var b,x;return!((b=t==null?void 0:t())!=null&&b.component)&&!n()?(x=i().children)!=null?x:[]:[]}function l(){var h,b,x,p,E,j,V,S,I,P,R;return{blockChildren:(h=i().children)!=null?h:[],componentRef:(b=t==null?void 0:t())==null?void 0:b.component,componentOptions:{...De(i()),builderContext:e.context,...((x=t==null?void 0:t())==null?void 0:x.name)==="Core:Button"||((p=t==null?void 0:t())==null?void 0:p.name)==="Symbol"||((E=t==null?void 0:t())==null?void 0:E.name)==="Columns"||((j=t==null?void 0:t())==null?void 0:j.name)==="Form:Form"?{builderLinkComponent:e.linkComponent}:{},...((V=t==null?void 0:t())==null?void 0:V.name)==="Symbol"||((S=t==null?void 0:t())==null?void 0:S.name)==="Columns"||((I=t==null?void 0:t())==null?void 0:I.name)==="Form:Form"?{builderComponents:e.registeredComponents}:{}},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:i(),includeBlockProps:((P=t==null?void 0:t())==null?void 0:P.noWrap)===!0,isInteractive:!((R=t==null?void 0:t())!=null&&R.isRSC)}}return d.useEffect(()=>{const h=i().id,b=i().animations;b&&h&&ze(b.filter(x=>x.trigger!=="hover").map(x=>({...x,elementId:h})))},[]),a.jsx(a.Fragment,{children:r()?a.jsxs(a.Fragment,{children:[a.jsx(it,{block:e.block,context:e.context}),(u=t==null?void 0:t())!=null&&u.noWrap?a.jsx(a.Fragment,{children:a.jsx(se,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive})}):a.jsx(a.Fragment,{children:n()?a.jsx(a.Fragment,{children:(f=n())==null?void 0:f.map((h,b)=>a.jsx(mt,{repeatContext:h.context,block:h.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},b))}):a.jsxs(ct,{Wrapper:o(),block:i(),context:e.context,linkComponent:e.linkComponent,children:[a.jsx(se,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive}),(c=s())==null?void 0:c.map(h=>a.jsx(K,{block:h,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},h.id))]})})]}):null})}function ft(e){function t(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function n(){var o,r;m.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((r=window.parent)==null||r.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function i(){var o,r;m.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((r=window.parent)==null||r.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return a.jsxs(a.Fragment,{children:[a.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-7cd1560e","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>n(),onMouseEnter:o=>i(),onKeyPress:o=>n(),...e.BlocksWrapperProps,children:e.children}),a.jsx("style",{children:`.props-blocks-wrapper-7cd1560e {
8
+ If you registered it, is the file that registered it imported by the file that needs to render it?`)},Xe=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const o=L({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(o))return;const r=n.collection.split(".").pop(),s=n.itemName||(r?r+"Item":"item");return o.map((d,c)=>({context:{...t,localState:{...t.localState,$index:c,$item:d,[s]:d,[`$${s}Index`]:c}},block:i}))},be={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ne=(e,t=be)=>`@media (max-width: ${t[e].max}px)`,ye=({small:e,medium:t})=>{const n=m.fastClone(be);if(!e||!t)return n;const i=Math.floor(e/2);n.small={max:e,min:i,default:i+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n};function K(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},id:e.id})}function Ze(e){function t(){const i=H({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return m.checkIsDefined(i.hide)?!i.hide:m.checkIsDefined(i.show)?i.show:!0}function n(){var C;const i=H({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),o=i.responsiveStyles,r=e.context.content,s=ye(((C=r==null?void 0:r.meta)==null?void 0:C.breakpoints)||{}),l=o==null?void 0:o.large,d=o==null?void 0:o.medium,c=o==null?void 0:o.small,f=i.id;if(!f)return"";const b=l?z({className:f,styles:l}):"",x=d?z({className:f,styles:d,mediaQuery:ne("medium",s)}):"",p=c?z({className:f,styles:c,mediaQuery:ne("small",s)}):"";return[b,x,p].join(" ")}return a.jsx(a.Fragment,{children:n()&&t()?a.jsx(a.Fragment,{children:a.jsx(K,{styles:n()})}):null})}function et(e){return e.charAt(0).toUpperCase()+e.slice(1)}const tt=e=>`on${et(e)}`,nt=(e,t)=>n=>L({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,enableCache:!0});function xe(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const o in n){if(!n.hasOwnProperty(o))continue;const r=n[o];let s=tt(o);if(e.stripPrefix)switch(m.TARGET){case"vue":s=s.replace("v-on:","");break;case"svelte":s=s.replace("on:","");break}t[s]=nt(r,e)}return t}function it({properties:e}){return e}const ot=e=>({href:e.href});function ee({block:e,context:t}){var i;const n={...ot(e),...e.properties,"builder-id":e.id,style:Ge({block:e,context:t}),[D()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return it({properties:n,context:t,block:e})}function at(e){return a.jsx(Y,{TagName:e.Wrapper,attributes:ee({block:e.block,context:e.context}),actionAttributes:xe({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 rt(e){return a.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...ee({block:e.block,context:e.context}),...xe({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}const st=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:o,isInteractive:r,contextValue:s})=>{const l={...e,...o?{attributes:ee({block:t,context:s})}:{}};return r?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:o}:l};function ie(e){var i;const[t,n]=h.useState(()=>e.isInteractive?rt:e.componentRef);return a.jsx(a.Fragment,{children:e.componentRef?a.jsx(a.Fragment,{children:a.jsx(t,{...st({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}),children:(i=e.blockChildren)==null?void 0:i.map(o=>a.jsx(M,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function lt(e){const[t,n]=h.useState(()=>e.repeatContext);return a.jsx(G.Provider,{value:t,children:a.jsx(M,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function M(e){var d,c,f;function t(){return Qe({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return Xe({block:e.block,context:e.context})}function i(){var b;return(b=e.block.repeat)!=null&&b.collection?e.block:H({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function o(){var x;return e.block.tagName==="a"||((x=i().properties)==null?void 0:x.href)||i().href?e.linkComponent||"a":e.block.tagName||"div"}function r(){var p,C;if((p=e.block.repeat)!=null&&p.collection)return!!((C=n==null?void 0:n())!=null&&C.length);const b="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!b}function s(){var x,p;return!((x=t==null?void 0:t())!=null&&x.component)&&!n()?(p=i().children)!=null?p:[]:[]}function l(){var b,x,p,C,w,T,j,v,I,R,E;return{blockChildren:(b=i().children)!=null?b:[],componentRef:(x=t==null?void 0:t())==null?void 0:x.component,componentOptions:{...Ae(i()),builderContext:e.context,...((p=t==null?void 0:t())==null?void 0:p.name)==="Core:Button"||((C=t==null?void 0:t())==null?void 0:C.name)==="Symbol"||((w=t==null?void 0:t())==null?void 0:w.name)==="Columns"||((T=t==null?void 0:t())==null?void 0:T.name)==="Form:Form"?{builderLinkComponent:e.linkComponent}:{},...((j=t==null?void 0:t())==null?void 0:j.name)==="Symbol"||((v=t==null?void 0:t())==null?void 0:v.name)==="Columns"||((I=t==null?void 0:t())==null?void 0:I.name)==="Form:Form"?{builderComponents:e.registeredComponents}:{}},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:i(),includeBlockProps:((R=t==null?void 0:t())==null?void 0:R.noWrap)===!0,isInteractive:!((E=t==null?void 0:t())!=null&&E.isRSC)}}return h.useEffect(()=>{const b=i().id,x=i().animations;x&&b&&He(x.filter(p=>p.trigger!=="hover").map(p=>({...p,elementId:b})))},[]),a.jsx(a.Fragment,{children:r()?a.jsxs(a.Fragment,{children:[a.jsx(Ze,{block:e.block,context:e.context}),(d=t==null?void 0:t())!=null&&d.noWrap?a.jsx(a.Fragment,{children:a.jsx(ie,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive})}):a.jsx(a.Fragment,{children:n()?a.jsx(a.Fragment,{children:(f=n())==null?void 0:f.map((b,x)=>a.jsx(lt,{repeatContext:b.context,block:b.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},x))}):a.jsxs(at,{Wrapper:o(),block:i(),context:e.context,linkComponent:e.linkComponent,children:[a.jsx(ie,{componentRef:l().componentRef,componentOptions:l().componentOptions,blockChildren:l().blockChildren,context:l().context,registeredComponents:l().registeredComponents,linkComponent:l().linkComponent,builderBlock:l().builderBlock,includeBlockProps:l().includeBlockProps,isInteractive:l().isInteractive}),(c=s())==null?void 0:c.map(b=>a.jsx(M,{block:b,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},b.id))]})})]}):null})}function ct(e){function t(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function n(){var o,r;m.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((r=window.parent)==null||r.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function i(){var o,r;m.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((r=window.parent)==null||r.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return a.jsxs(a.Fragment,{children:[a.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-7cd1560e","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>n(),onMouseEnter:o=>i(),onKeyPress:o=>n(),...e.BlocksWrapperProps,children:e.children}),a.jsx("style",{children:`.props-blocks-wrapper-7cd1560e {
9
9
  display: flex;
10
10
  flex-direction: column;
11
11
  align-items: stretch;
12
- }`})]})}function L(e){var i,o,r;const t=d.useContext(ee),n=d.useContext(he);return a.jsx(ft,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:((i=e.context)==null?void 0:i.BlocksWrapper)||t.BlocksWrapper,BlocksWrapperProps:((o=e.context)==null?void 0:o.BlocksWrapperProps)||t.BlocksWrapperProps,children:e.blocks?a.jsx(a.Fragment,{children:(r=e.blocks)==null?void 0:r.map(s=>a.jsx(K,{block:s,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},s.id))}):null})}function Ce(e){var V;const[t,n]=d.useState(()=>typeof e.space=="number"?e.space||0:20),[i,o]=d.useState(()=>e.columns||[]),[r,s]=d.useState(()=>e.stackColumnsAt||"tablet");function l(S){var I;return((I=i[S])==null?void 0:I.width)||100/i.length}function u(S){const I=t*(i.length-1)/i.length;return`calc(${l(S)}% - ${I}px)`}function c({stackedStyle:S,desktopStyle:I}){return r==="tablet"?S:I}function f({stackedStyle:S,desktopStyle:I}){return r==="never"?I:S}const[h,b]=d.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function x(){return{"--flex-dir":h,"--flex-dir-tablet":c({stackedStyle:h,desktopStyle:"row"})}}function p(S){const I=S===0?0:t,P=u(S),R=`${I}px`,N="100%",$=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:P,["marginLeft"]:R,"--column-width-mobile":f({stackedStyle:N,desktopStyle:P}),"--column-margin-left-mobile":f({stackedStyle:$,desktopStyle:R}),"--column-width-tablet":c({stackedStyle:N,desktopStyle:P}),"--column-margin-left-tablet":c({stackedStyle:$,desktopStyle:R})}}function E(S){var P,R;return ve(((R=(P=e.builderContext.content)==null?void 0:P.meta)==null?void 0:R.breakpoints)||{})[S].max}function j(){return`
13
- @media (max-width: ${E("medium")}px) {
12
+ }`})]})}function W(e){var i,o,r;const t=h.useContext(G),n=h.useContext(de);return a.jsx(ct,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:((i=e.context)==null?void 0:i.BlocksWrapper)||t.BlocksWrapper,BlocksWrapperProps:((o=e.context)==null?void 0:o.BlocksWrapperProps)||t.BlocksWrapperProps,children:e.blocks?a.jsx(a.Fragment,{children:(r=e.blocks)==null?void 0:r.map(s=>a.jsx(M,{block:s,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},s.id))}):null})}function pe(e){var j;const[t,n]=h.useState(()=>typeof e.space=="number"?e.space||0:20),[i,o]=h.useState(()=>e.columns||[]),[r,s]=h.useState(()=>e.stackColumnsAt||"tablet");function l(v){var I;return((I=i[v])==null?void 0:I.width)||100/i.length}function d(v){const I=t*(i.length-1)/i.length;return`calc(${l(v)}% - ${I}px)`}function c({stackedStyle:v,desktopStyle:I}){return r==="tablet"?v:I}function f({stackedStyle:v,desktopStyle:I}){return r==="never"?I:v}const[b,x]=h.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function p(){return{"--flex-dir":b,"--flex-dir-tablet":c({stackedStyle:b,desktopStyle:"row"})}}function C(v){const I=v===0?0:t,R=d(v),E=`${I}px`,F="100%",B=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:R,["marginLeft"]:E,"--column-width-mobile":f({stackedStyle:F,desktopStyle:R}),"--column-margin-left-mobile":f({stackedStyle:B,desktopStyle:E}),"--column-width-tablet":c({stackedStyle:F,desktopStyle:R}),"--column-margin-left-tablet":c({stackedStyle:B,desktopStyle:E})}}function w(v){var R,E;return ye(((E=(R=e.builderContext.content)==null?void 0:R.meta)==null?void 0:E.breakpoints)||{})[v].max}function T(){return`
13
+ @media (max-width: ${w("medium")}px) {
14
14
  .${e.builderBlock.id}-breakpoints {
15
15
  flex-direction: var(--flex-dir-tablet);
16
16
  align-items: stretch;
@@ -22,7 +22,7 @@
22
22
  }
23
23
  }
24
24
 
25
- @media (max-width: ${E("small")}px) {
25
+ @media (max-width: ${w("small")}px) {
26
26
  .${e.builderBlock.id}-breakpoints {
27
27
  flex-direction: var(--flex-dir);
28
28
  align-items: stretch;
@@ -33,10 +33,10 @@
33
33
  margin-left: var(--column-margin-left-mobile) !important;
34
34
  }
35
35
  },
36
- `}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-5e636bea`,style:x(),children:[a.jsx(J,{styles:j()}),(V=e.columns)==null?void 0:V.map((S,I)=>a.jsx(Z,{TagName:S.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...S.link?{href:S.link}:{},[U()]:"builder-column",style:pe(p(I))},children:a.jsx(L,{path:`component.options.columns.${I}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:S.blocks})},I))]}),a.jsx("style",{children:`.div-5e636bea {
36
+ `}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-5e636bea`,style:p(),children:[a.jsx(K,{styles:T()}),(j=e.columns)==null?void 0:j.map((v,I)=>a.jsx(Y,{TagName:v.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...v.link?{href:v.link}:{},[D()]:"builder-column",style:ge(C(I))},children:a.jsx(W,{path:`component.options.columns.${I}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:v.blocks})},I))]}),a.jsx("style",{children:`.div-5e636bea {
37
37
  display: flex;
38
38
  line-height: normal;
39
- }`})]})}function we(e){return a.jsx("span",{children:e.children})}function le(e){return e.replace(/http(s)?:/,"")}function ht(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+o+t+"="+encodeURIComponent(n)}function gt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return le(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const i=e.split(n[0]),o=n[3],r=t.match("x")?t:`${t}x`;return le(`${i[0]}_${r}${o}`)}return null}function Q(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const i=Number(e.split("?width=")[1]);return isNaN(i)||(n=`${n} ${i}w`),t.filter(o=>o!==i).map(o=>`${ht(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[gt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Ie(e){var o,r,s,l;function t(){var f;const c=e.image||e.src;if(!c||!(c.match(/builder\.io/)||c.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"),Q(c)}else if(e.image&&!e.srcset)return Q(c);return Q(c)}function n(){var u;return(u=t==null?void 0:t())!=null&&u.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const u={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?u:void 0}return a.jsxs(a.Fragment,{children:[a.jsxs(a.Fragment,{children:[a.jsxs("picture",{children:[n()?a.jsx("source",{type:"image/webp",srcSet:n()}):null,a.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-a0c95e8c",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(o=e.builderBlock)==null?void 0:o.children)!=null&&r.length&&e.fitContent)?a.jsx("div",{className:"builder-image-sizer div-a0c95e8c",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?a.jsx(a.Fragment,{children:e.children}):null,!e.fitContent&&e.children?a.jsx("div",{className:"div-a0c95e8c-2",children:e.children}):null]}),a.jsx("style",{children:`.img-a0c95e8c {
39
+ }`})]})}function Se(e){return a.jsx("span",{children:e.children})}function oe(e){return e.replace(/http(s)?:/,"")}function dt(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+o+t+"="+encodeURIComponent(n)}function ut(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return oe(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const i=e.split(n[0]),o=n[3],r=t.match("x")?t:`${t}x`;return oe(`${i[0]}_${r}${o}`)}return null}function _(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const i=Number(e.split("?width=")[1]);return isNaN(i)||(n=`${n} ${i}w`),t.filter(o=>o!==i).map(o=>`${dt(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[ut(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function ve(e){var o,r,s,l;function t(){var f;const c=e.image||e.src;if(!c||!(c.match(/builder\.io/)||c.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"),_(c)}else if(e.image&&!e.srcset)return _(c);return _(c)}function n(){var d;return(d=t==null?void 0:t())!=null&&d.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const d={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?d:void 0}return a.jsxs(a.Fragment,{children:[a.jsxs(a.Fragment,{children:[a.jsxs("picture",{children:[n()?a.jsx("source",{type:"image/webp",srcSet:n()}):null,a.jsx("img",{loading:"lazy",alt:e.altText,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-a0c95e8c",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(o=e.builderBlock)==null?void 0:o.children)!=null&&r.length&&e.fitContent)?a.jsx("div",{className:"builder-image-sizer div-a0c95e8c",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?a.jsx(a.Fragment,{children:e.children}):null,!e.fitContent&&e.children?a.jsx("div",{className:"div-a0c95e8c-2",children:e.children}):null]}),a.jsx("style",{children:`.img-a0c95e8c {
40
40
  opacity: 1;
41
41
  transition: opacity 0.2s ease-in-out;
42
42
  }.div-a0c95e8c {
@@ -52,7 +52,7 @@
52
52
  left: 0;
53
53
  width: 100%;
54
54
  height: 100%;
55
- }`})]})}function Te(e){return a.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})}const bt={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},yt={name:"Columns",isRSC:!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:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(o=>o.get("width"))&&(n.find(r=>!r.get("width"))||n.reduce((l,u)=>l+u.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},xt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},pt={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(s,l=6e4){return new Promise((u,c)=>{const f=document.createElement("img");let h=!1;f.onload=()=>{h=!0,u(f)},f.addEventListener("error",b=>{console.warn("Image load failed",b.error),c(b.error)}),f.src=s,setTimeout(()=>{h||c(new Error("Image load timed out"))},l)})}function i(s){return Math.round(s*1e3)/1e3}const o=e.get("image"),r=e.get("aspectRatio");if(fetch(o).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!r||r===.7041))return n(o).then(s=>{const l=e.get("aspectRatio");e.get("image")===o&&(!l||l===.7041)&&s.width&&s.height&&(e.set("aspectRatio",i(s.height/s.width)),e.set("height",s.height),e.set("width",s.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},St={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},vt={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}]};function kt(e){var t,n,i;return a.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:a.jsx(L,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const Ct={name:"Symbol",noWrap:!0,static:!0,isRSC:!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"}]},wt={name:"Text",static:!0,isRSC:!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"}};function Ee(e){var t;return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const It={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]};function Tt(e){const t=d.useRef(null),[n,i]=d.useState(()=>[]),[o,r]=d.useState(()=>[]);return d.useEffect(()=>{var l;if(!((l=t.current)!=null&&l.getElementsByTagName)||typeof window=="undefined")return;const s=t.current.getElementsByTagName("script");for(let u=0;u<s.length;u++){const c=s[u];if(c.src){if(n.includes(c.src))continue;n.push(c.src);const f=document.createElement("script");f.async=!0,f.src=c.src,document.head.appendChild(f)}else if(!c.type||["text/javascript","application/javascript","application/ecmascript"].includes(c.type)){if(o.includes(c.innerText))continue;try{o.push(c.innerText),new Function(c.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const Et={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(i=>i.json()).then(i=>{e.get("url")===t&&(i.html?e.set("content",i.html):e.set("content","Invalid url, please try another"))}).catch(i=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},jt=["text/javascript","application/javascript","application/ecmascript"],Rt=e=>jt.includes(e.type);function Pt(e){const t=d.useRef(null),[n,i]=d.useState(()=>[]),[o,r]=d.useState(()=>[]),[s,l]=d.useState(()=>!1);function u(){if(!t.current||!t.current.getElementsByTagName)return;const c=t.current.getElementsByTagName("script");for(let f=0;f<c.length;f++){const h=c[f];if(h.src&&!n.includes(h.src)){n.push(h.src);const b=document.createElement("script");b.async=!0,b.src=h.src,document.head.appendChild(b)}else if(Rt(h)&&!o.includes(h.innerText))try{o.push(h.innerText),new Function(h.innerText)()}catch(b){console.warn("`Embed`: Error running script:",b)}}}return d.useEffect(()=>{t.current&&!s&&(l(!0),u())},[t.current,s]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Vt={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}]},Ft=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Bt=()=>{const e=process.env.NODE_ENV||"production";return Ft.includes(e)?e:"production"},At=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((o,r)=>o!=null?o[r]:o,e);return i===void 0||i===e?n:i};function Wt(e){var h,b;const t=d.useRef(null),[n,i]=d.useState(()=>"unsubmitted"),[o,r]=d.useState(()=>null),[s,l]=d.useState(()=>"");function u(x){var E,j;const p={...e.builderContext.rootState,...x};e.builderContext.rootSetState?(j=(E=e.builderContext).rootSetState)==null||j.call(E,p):e.builderContext.rootState=p}function c(){return m.isEditing()&&e.previewState||n}function f(x){var E;const p=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")x.preventDefault();else if(p){if(!(e.action||e.sendSubmissionsTo==="email")){x.preventDefault();return}x.preventDefault();const j=x.currentTarget,V=e.customHeaders||{};let S;const I=new FormData(j),P=Array.from(x.currentTarget.querySelectorAll("input,select,textarea")).filter(g=>!!g.name).map(g=>{let T;const A=g.name;if(g instanceof HTMLInputElement)if(g.type==="radio"){if(g.checked)return T=g.name,{key:A,value:T}}else if(g.type==="checkbox")T=g.checked;else if(g.type==="number"||g.type==="range"){const F=g.valueAsNumber;isNaN(F)||(T=F)}else g.type==="file"?T=g.files:T=g.value;else T=g.value;return{key:A,value:T}});let R=e.contentType;if(e.sendSubmissionsTo==="email"&&(R="multipart/form-data"),Array.from(P).forEach(({value:g})=>{(g instanceof File||Array.isArray(g)&&g[0]instanceof File||g instanceof FileList)&&(R="multipart/form-data")}),R!=="application/json")S=I;else{const g={};Array.from(P).forEach(({value:T,key:A})=>{be(g,A,T)}),S=JSON.stringify(g)}R&&R!=="multipart/form-data"&&(p&&((E=e.action)!=null&&E.includes("zapier.com"))||(V["content-type"]=R));const N=new CustomEvent("presubmit",{detail:{body:S}});if(t.current&&(t.current.dispatchEvent(N),N.defaultPrevented))return;i("sending");const $=`${Bt()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`;fetch(e.sendSubmissionsTo==="email"?$:e.action,{body:S,headers:V,method:e.method||"post"}).then(async g=>{let T;const A=g.headers.get("content-type");if(A&&A.indexOf("application/json")!==-1?T=await g.json():T=await g.text(),!g.ok&&e.errorMessagePath){let F=At(T,e.errorMessagePath);F&&(typeof F!="string"&&(F=JSON.stringify(F)),l(F),u({formErrorMessage:F}))}if(r(T),i(g.ok?"success":"error"),g.ok){const F=new CustomEvent("submit:success",{detail:{res:g,body:T}});if(t.current){if(t.current.dispatchEvent(F),F.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const y=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(y),y.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},g=>{const T=new CustomEvent("submit:error",{detail:{error:g}});t.current&&(t.current.dispatchEvent(T),T.defaultPrevented)||(r(g),i("error"))})}}return a.jsxs(a.Fragment,{children:[" ",a.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:x=>f(x),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?a.jsx(a.Fragment,{children:(b=(h=e.builderBlock)==null?void 0:h.children)==null?void 0:b.map((x,p)=>a.jsx(K,{block:x,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${p}`))}):null,c()==="error"?a.jsx(L,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,c()==="sending"?a.jsx(L,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,c()==="error"&&o?a.jsx("pre",{className:"builder-form-error-text pre-31bf8a14",children:JSON.stringify(o,null,2)}):null,c()==="success"?a.jsx(L,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",a.jsx("style",{children:".pre-31bf8a14 { padding: 10px; color: red; text-align: center; }"})," "]})}const Nt={name:"Form:Input",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",inputs:[{name:"type",type:"text",enum:["text","number","email","url","checkbox","radio","range","date","datetime-local","search","tel","time","file","month","week","password","color","hidden"],defaultValue:"text"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it takes, e.g. "email"'},{name:"placeholder",type:"string",defaultValue:"Hello there",helperText:"Text to display when there is no value"},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",helperText:"Is this input required to be filled out to submit a form",defaultValue:!1}],noWrap:!0,static:!0,defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"}};function $t(e){return d.createElement("input",{...e.attributes,key:m.isEditing()&&e.defaultValue?e.defaultValue:"default-key",placeholder:e.placeholder,type:e.type,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const Dt={name:"Form:Select",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",defaultStyles:{alignSelf:"flex-start"},inputs:[{name:"options",type:"list",required:!0,subFields:[{name:"value",type:"text",required:!0},{name:"name",type:"text"}],defaultValue:[{value:"option 1"},{value:"option 2"}]},{name:"name",type:"string",required:!0,helperText:'Every select in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",defaultValue:!1}],static:!0,noWrap:!0};function Lt(e){var t;return d.createElement("select",{...e.attributes,value:e.value,key:m.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name},(t=e.options)==null?void 0:t.map(n=>a.jsx("option",{value:n.value,children:n.name||n.value})))}const Mt={name:"Form:SubmitButton",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#3898EC",color:"white",borderRadius:"4px",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me"}],static:!0,noWrap:!0};function Ot(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Ut={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0};function Ht(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},m.isEditing()&&e.imgSrc||"default-key")}const Kt={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",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:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{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}]};function je(e){var i,o,r,s,l,u,c;function t(){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 n(){return{...t()}}return a.jsxs("div",{style:{position:"relative"},children:[a.jsx("video",{className:"builder-video",...n(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(i=e.attributes)==null?void 0:i.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:a.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((r=(o=e.builderBlock)==null?void 0:o.children)!=null&&r.length))?a.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(c=(u=e.builderBlock)==null?void 0:u.children)!=null&&c.length&&!e.fitContent?a.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 qt=()=>[{component:Tt,...It},{component:Pt,...Et},{component:Wt,...Vt},{component:$t,...Nt},{component:Ot,...Mt},{component:Lt,...Dt},{component:Ht,...Ut},{component:je,...Kt}],ce=()=>[{component:fe,...bt},{component:Ce,...yt},{component:we,...xt},{component:Ie,...pt},{component:Te,...St},{component:kt,...vt},{component:Be,...Ct},{component:Ee,...wt},...qt()],_t=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
55
+ }`})]})}function ke(e){return a.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})}const mt={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0},ft={name:"Columns",isRSC:!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:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(o=>o.get("width"))&&(n.find(r=>!r.get("width"))||n.reduce((l,d)=>l+d.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},ht={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},gt={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(s,l=6e4){return new Promise((d,c)=>{const f=document.createElement("img");let b=!1;f.onload=()=>{b=!0,d(f)},f.addEventListener("error",x=>{console.warn("Image load failed",x.error),c(x.error)}),f.src=s,setTimeout(()=>{b||c(new Error("Image load timed out"))},l)})}function i(s){return Math.round(s*1e3)/1e3}const o=e.get("image"),r=e.get("aspectRatio");if(fetch(o).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!r||r===.7041))return n(o).then(s=>{const l=e.get("aspectRatio");e.get("image")===o&&(!l||l===.7041)&&s.width&&s.height&&(e.set("aspectRatio",i(s.height/s.width)),e.set("height",s.height),e.set("width",s.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},bt={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},yt={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}]};function xt(e){var t,n,i;return a.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:a.jsx(W,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const pt={name:"Symbol",noWrap:!0,static:!0,isRSC:!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"}]},St={name:"Text",static:!0,isRSC:!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"}};function Ce(e){var t;return a.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const vt={name:"Custom Code",static:!0,requiredPermissions:["editCode"],inputs:[{name:"code",type:"html",required:!0,defaultValue:"<p>Hello there, I am custom HTML code!</p>",code:!0},{name:"replaceNodes",type:"boolean",helperText:"Preserve server rendered dom nodes",advanced:!0},{name:"scriptsClientOnly",type:"boolean",defaultValue:!1,helperText:"Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",advanced:!0}]};function kt(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[o,r]=h.useState(()=>[]);return h.useEffect(()=>{var l;if(!((l=t.current)!=null&&l.getElementsByTagName)||typeof window=="undefined")return;const s=t.current.getElementsByTagName("script");for(let d=0;d<s.length;d++){const c=s[d];if(c.src){if(n.includes(c.src))continue;n.push(c.src);const f=document.createElement("script");f.async=!0,f.src=c.src,document.head.appendChild(f)}else if(!c.type||["text/javascript","application/javascript","application/ecmascript"].includes(c.type)){if(o.includes(c.innerText))continue;try{o.push(c.innerText),new Function(c.innerText)()}catch(f){console.warn("`CustomCode`: Error running script:",f)}}}},[]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const Ct={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(i=>i.json()).then(i=>{e.get("url")===t&&(i.html?e.set("content",i.html):e.set("content","Invalid url, please try another"))}).catch(i=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},wt=["text/javascript","application/javascript","application/ecmascript"],It=e=>wt.includes(e.type);function Tt(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[o,r]=h.useState(()=>[]),[s,l]=h.useState(()=>!1);function d(){if(!t.current||!t.current.getElementsByTagName)return;const c=t.current.getElementsByTagName("script");for(let f=0;f<c.length;f++){const b=c[f];if(b.src&&!n.includes(b.src)){n.push(b.src);const x=document.createElement("script");x.async=!0,x.src=b.src,document.head.appendChild(x)}else if(It(b)&&!o.includes(b.innerText))try{o.push(b.innerText),new Function(b.innerText)()}catch(x){console.warn("`Embed`: Error running script:",x)}}}return h.useEffect(()=>{t.current&&!s&&(l(!0),d())},[t.current,s]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Et={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}]},jt=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Rt=()=>{const e=process.env.NODE_ENV||"production";return jt.includes(e)?e:"production"},Pt=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((o,r)=>o!=null?o[r]:o,e);return i===void 0||i===e?n:i};function Vt(e){var b,x;const t=h.useRef(null),[n,i]=h.useState(()=>"unsubmitted"),[o,r]=h.useState(()=>null),[s,l]=h.useState(()=>"");function d(p){var w,T;const C={...e.builderContext.rootState,...p};e.builderContext.rootSetState?(T=(w=e.builderContext).rootSetState)==null||T.call(w,C):e.builderContext.rootState=C}function c(){return m.isEditing()&&e.previewState||n}function f(p){var w;const C=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")p.preventDefault();else if(C){if(!(e.action||e.sendSubmissionsTo==="email")){p.preventDefault();return}p.preventDefault();const T=p.currentTarget,j=e.customHeaders||{};let v;const I=new FormData(T),R=Array.from(p.currentTarget.querySelectorAll("input,select,textarea")).filter(u=>!!u.name).map(u=>{let g;const S=u.name;if(u instanceof HTMLInputElement)if(u.type==="radio"){if(u.checked)return g=u.name,{key:S,value:g}}else if(u.type==="checkbox")g=u.checked;else if(u.type==="number"||u.type==="range"){const y=u.valueAsNumber;isNaN(y)||(g=y)}else u.type==="file"?g=u.files:g=u.value;else g=u.value;return{key:S,value:g}});let E=e.contentType;if(e.sendSubmissionsTo==="email"&&(E="multipart/form-data"),Array.from(R).forEach(({value:u})=>{(u instanceof File||Array.isArray(u)&&u[0]instanceof File||u instanceof FileList)&&(E="multipart/form-data")}),E!=="application/json")v=I;else{const u={};Array.from(R).forEach(({value:g,key:S})=>{me(u,S,g)}),v=JSON.stringify(u)}E&&E!=="multipart/form-data"&&(C&&((w=e.action)!=null&&w.includes("zapier.com"))||(j["content-type"]=E));const F=new CustomEvent("presubmit",{detail:{body:v}});if(t.current&&(t.current.dispatchEvent(F),F.defaultPrevented))return;i("sending");const B=`${Rt()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`;fetch(e.sendSubmissionsTo==="email"?B:e.action,{body:v,headers:j,method:e.method||"post"}).then(async u=>{let g;const S=u.headers.get("content-type");if(S&&S.indexOf("application/json")!==-1?g=await u.json():g=await u.text(),!u.ok&&e.errorMessagePath){let y=Pt(g,e.errorMessagePath);y&&(typeof y!="string"&&(y=JSON.stringify(y)),l(y),d({formErrorMessage:y}))}if(r(g),i(u.ok?"success":"error"),u.ok){const y=new CustomEvent("submit:success",{detail:{res:u,body:g}});if(t.current){if(t.current.dispatchEvent(y),y.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const k=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(k),k.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},u=>{const g=new CustomEvent("submit:error",{detail:{error:u}});t.current&&(t.current.dispatchEvent(g),g.defaultPrevented)||(r(u),i("error"))})}}return a.jsxs(a.Fragment,{children:[" ",a.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:p=>f(p),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?a.jsx(a.Fragment,{children:(x=(b=e.builderBlock)==null?void 0:b.children)==null?void 0:x.map((p,C)=>a.jsx(M,{block:p,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${C}`))}):null,c()==="error"?a.jsx(W,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,c()==="sending"?a.jsx(W,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,c()==="error"&&o?a.jsx("pre",{className:"builder-form-error-text pre-31bf8a14",children:JSON.stringify(o,null,2)}):null,c()==="success"?a.jsx(W,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",a.jsx("style",{children:".pre-31bf8a14 { padding: 10px; color: red; text-align: center; }"})," "]})}const Ft={name:"Form:Input",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",inputs:[{name:"type",type:"text",enum:["text","number","email","url","checkbox","radio","range","date","datetime-local","search","tel","time","file","month","week","password","color","hidden"],defaultValue:"text"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it takes, e.g. "email"'},{name:"placeholder",type:"string",defaultValue:"Hello there",helperText:"Text to display when there is no value"},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",helperText:"Is this input required to be filled out to submit a form",defaultValue:!1}],noWrap:!0,static:!0,defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"}};function Bt(e){return h.createElement("input",{...e.attributes,key:m.isEditing()&&e.defaultValue?e.defaultValue:"default-key",placeholder:e.placeholder,type:e.type,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const At={name:"Form:Select",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",defaultStyles:{alignSelf:"flex-start"},inputs:[{name:"options",type:"list",required:!0,subFields:[{name:"value",type:"text",required:!0},{name:"name",type:"text"}],defaultValue:[{value:"option 1"},{value:"option 2"}]},{name:"name",type:"string",required:!0,helperText:'Every select in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",defaultValue:!1}],static:!0,noWrap:!0};function Wt(e){var t;return h.createElement("select",{...e.attributes,value:e.value,key:m.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name},(t=e.options)==null?void 0:t.map(n=>a.jsx("option",{value:n.value,children:n.name||n.value})))}const Nt={name:"Form:SubmitButton",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#3898EC",color:"white",borderRadius:"4px",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me"}],static:!0,noWrap:!0};function $t(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Dt={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0};function Lt(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},m.isEditing()&&e.imgSrc||"default-key")}const Mt={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://cdn.builder.io/o/assets%2FYJIGb4i01jvw0SRdL5Bt%2Fd27731a526464deba0016216f5f9e570%2Fcompressed?apiKey=YJIGb4i01jvw0SRdL5Bt&token=d27731a526464deba0016216f5f9e570&alt=media&optimized=true",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:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{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}]};function we(e){var i,o,r,s,l,d,c;function t(){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 n(){return{...t()}}return a.jsxs("div",{style:{position:"relative"},children:[a.jsx("video",{className:"builder-video",...n(),preload:e.preload||"metadata",style:{width:"100%",height:"100%",...(i=e.attributes)==null?void 0:i.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:a.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((r=(o=e.builderBlock)==null?void 0:o.children)!=null&&r.length))?a.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(l=(s=e.builderBlock)==null?void 0:s.children)!=null&&l.length&&e.fitContent?a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(c=(d=e.builderBlock)==null?void 0:d.children)!=null&&c.length&&!e.fitContent?a.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 Ot=()=>[{component:kt,...vt},{component:Tt,...Ct},{component:Vt,...Et},{component:Bt,...Ft},{component:$t,...Nt},{component:Wt,...At},{component:Lt,...Dt},{component:we,...Mt}],ae=()=>[{component:ce,...mt},{component:pe,...ft},{component:Se,...ht},{component:ve,...gt},{component:ke,...bt},{component:xt,...yt},{component:Re,...pt},{component:Ce,...St},...Ot()],Ut=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
56
56
  function getAndSetVariantId() {
57
57
  function setCookie(name, value, days) {
58
58
  let expires = '';
@@ -108,7 +108,7 @@
108
108
  }).join('');
109
109
  styleEl.innerHTML = newStyleStr;
110
110
  }
111
- }`,zt=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
111
+ }`,Ht=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
112
112
  if (!navigator.cookieEnabled) {
113
113
  return;
114
114
  }
@@ -142,15 +142,15 @@
142
142
  thisScriptEl?.remove();
143
143
  }
144
144
  return;
145
- }`,Re="builderIoAbTest",Pe="builderIoRenderContent",_=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Jt=({canTrack:e,content:t})=>!(!(_(t).length>0)||!e||m.isBrowser()),Yt=e=>e==="react"||e==="reactNative",Ve=Yt(m.TARGET),Gt=()=>`
146
- window.${Re} = ${_t}
147
- window.${Pe} = ${zt}
148
- `,Qt=(e,t)=>`
149
- window.${Re}(
150
- "${t}",${JSON.stringify(e)}, ${Ve}
151
- )`,Xt=({contentId:e,variationId:t})=>`window.${Pe}(
152
- "${t}", "${e}", ${Ve}
153
- )`;function X(e){return a.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}function ue(e){return Math.round(e*1e3)/1e3}const Zt=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let i=n?e:e.parentElement;do{if(!i)return null;if(t(i))return i}while(i=i.parentElement);return null},en=e=>Zt(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),de=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,r=ue(i/n.width),s=ue(o/n.height);return{x:r,y:s}},tn=e=>{const t=e.target,n=t&&en(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?de({event:e,target:t}):void 0,builderTargetOffset:n?de({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}};function nn(e){var R,N,$,g,T,A,F;const t=d.useRef(null),[n,i]=d.useState(()=>0);d.useState(()=>!0);function o(y){var k,C;const v={...e.builderContextSignal.rootState,...y};e.builderContextSignal.rootSetState?(C=(k=e.builderContextSignal).rootSetState)==null||C.call(k,v):e.setBuilderContextSignal(w=>({...w,rootState:v}))}function r(y){var k,C,w,B,M;const v={...e.builderContextSignal.content,...y,data:{...(k=e.builderContextSignal.content)==null?void 0:k.data,...y==null?void 0:y.data},meta:{...(C=e.builderContextSignal.content)==null?void 0:C.meta,...y==null?void 0:y.meta,breakpoints:((w=y==null?void 0:y.meta)==null?void 0:w.breakpoints)||((M=(B=e.builderContextSignal.content)==null?void 0:B.meta)==null?void 0:M.breakpoints)}};e.setBuilderContextSignal(q=>({...q,content:v}))}d.useState(()=>0);const[s,l]=d.useState(()=>!1),[u,c]=d.useState(()=>e.contentWrapper||"div");function f(y){return m.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:v=>{var w;const{breakpoints:k,contentId:C}=v;!C||C!==((w=e.builderContextSignal.content)==null?void 0:w.id)||k&&(r({meta:{breakpoints:k}}),i(n+1))},animation:v=>{ye(v)},contentUpdate:v=>{r(v),i(n+1)}}})(y)}function h(){var v,k;const y=(k=(v=e.builderContextSignal.content)==null?void 0:v.data)==null?void 0:k.jsCode;y&&H({code:y,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!1})}const[b,x]=d.useState(()=>({})),[p,E]=d.useState(()=>!1);function j(y){var v,k;if(e.builderContextSignal.content){const C=(v=e.builderContextSignal.content)==null?void 0:v.testVariationId,w=(k=e.builderContextSignal.content)==null?void 0:k.id;m._track({type:"click",canTrack:m.getDefaultCanTrack(e.canTrack),contentId:w,apiKey:e.apiKey,variationId:C!==w?C:void 0,...tn(y),unique:!p})}p||E(!0)}function V(y){return y.replace(/{{([^}]+)}}/g,(v,k)=>String(H({code:k,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!0})))}function S({url:y,key:v}){m.fetch(y).then(k=>k.json()).then(k=>{var w,B;const C={...e.builderContextSignal.rootState,[v]:k};(B=(w=e.builderContextSignal).rootSetState)==null||B.call(w,C),b[v]=!0}).catch(k=>{console.error("error fetching dynamic data",y,k)})}function I(){var v,k,C;const y=(C=(k=(v=e.builderContextSignal.content)==null?void 0:v.data)==null?void 0:k.httpRequests)!=null?C:{};Object.entries(y).forEach(([w,B])=>{if(B&&(!b[w]||m.isEditing())){const M=V(B);S({url:M,key:w})}})}function P(){m.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:m.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}return d.useEffect(()=>{var y,v;if(m.isBrowser()){if(m.isEditing()&&(i(n+1),window.addEventListener("message",f),m.registerInsertMenu(),m.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(C=>{var B;const w=m.createRegisterComponentMessage(C);(B=window.parent)==null||B.postMessage(w,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",P)),e.builderContextSignal.content&&m.getDefaultCanTrack(e.canTrack)){const C=(y=e.builderContextSignal.content)==null?void 0:y.testVariationId,w=(v=e.builderContextSignal.content)==null?void 0:v.id,B=e.apiKey;m._track({type:"impression",canTrack:!0,contentId:w,apiKey:B,variationId:C!==w?C:void 0})}if(m.isPreviewing()){const C=new URL(location.href).searchParams,w=C.get("builder.preview"),B=C.get(`builder.preview.${w}`),M=C.get("apiKey")||C.get("builder.space");w===e.model&&M===e.apiKey&&(!e.content||B===e.content.id)&&m.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(q=>{q&&r(q)})}}},[]),d.useEffect(()=>{e.apiKey||m.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),h(),I(),P()},[]),d.useEffect(()=>{e.content&&r(e.content)},[e.content]),d.useEffect(()=>{},[s]),d.useEffect(()=>{h()},[(N=(R=e.builderContextSignal.content)==null?void 0:R.data)==null?void 0:N.jsCode]),d.useEffect(()=>{I()},[(g=($=e.builderContextSignal.content)==null?void 0:$.data)==null?void 0:g.httpRequests]),d.useEffect(()=>{P()},[e.builderContextSignal.rootState]),d.useEffect(()=>{e.data&&o(e.data)},[e.data]),d.useEffect(()=>{e.locale&&o({locale:e.locale})},[e.locale]),d.useEffect(()=>()=>{m.isBrowser()&&(window.removeEventListener("message",f),window.removeEventListener("builder:component:stateChangeListenerActivated",P))},[]),a.jsx(ee.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?d.createElement(u,{key:n,ref:t,onClick:y=>j(y),"builder-content-id":(T=e.builderContextSignal.content)==null?void 0:T.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((A=e.content)==null?void 0:A.testVariationId)||((F=e.content)==null?void 0:F.id)}`},e.children):null})}const on=e=>{var r,s;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(s=e.fileUrl)!=null?s:(r=e==null?void 0:e.files)==null?void 0:r.regular;let o="";if(i&&t&&n&&(o+=`
145
+ }`,Ie="builderIoAbTest",Te="builderIoRenderContent",U=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Kt=({canTrack:e,content:t})=>!(!(U(t).length>0)||!e||m.isBrowser()),qt=e=>e==="react"||e==="reactNative",Ee=qt(m.TARGET),zt=()=>`
146
+ window.${Ie} = ${Ut}
147
+ window.${Te} = ${Ht}
148
+ `,_t=(e,t)=>`
149
+ window.${Ie}(
150
+ "${t}",${JSON.stringify(e)}, ${Ee}
151
+ )`,Jt=({contentId:e,variationId:t})=>`window.${Te}(
152
+ "${t}", "${e}", ${Ee}
153
+ )`;function J(e){return a.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}function re(e){return Math.round(e*1e3)/1e3}const Yt=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let i=n?e:e.parentElement;do{if(!i)return null;if(t(i))return i}while(i=i.parentElement);return null},Gt=e=>Yt(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),se=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,r=re(i/n.width),s=re(o/n.height);return{x:r,y:s}},Qt=e=>{const t=e.target,n=t&&Gt(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?se({event:e,target:t}):void 0,builderTargetOffset:n?se({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}};function Xt(e){var j,v,I,R,E,F,B;const t=h.useRef(null);function n(u){var S,y;const g={...e.builderContextSignal.rootState,...u};e.builderContextSignal.rootSetState?(y=(S=e.builderContextSignal).rootSetState)==null||y.call(S,g):e.setBuilderContextSignal(k=>({...k,rootState:g}))}function i(u){var S,y,k,P,N;const g={...e.builderContextSignal.content,...u,data:{...(S=e.builderContextSignal.content)==null?void 0:S.data,...u==null?void 0:u.data},meta:{...(y=e.builderContextSignal.content)==null?void 0:y.meta,...u==null?void 0:u.meta,breakpoints:((k=u==null?void 0:u.meta)==null?void 0:k.breakpoints)||((N=(P=e.builderContextSignal.content)==null?void 0:P.meta)==null?void 0:N.breakpoints)}};e.setBuilderContextSignal(O=>({...O,content:g}))}const[o,r]=h.useState(()=>e.contentWrapper||"div");function s(u){return m.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:g=>{var k;const{breakpoints:S,contentId:y}=g;!y||y!==((k=e.builderContextSignal.content)==null?void 0:k.id)||S&&i({meta:{breakpoints:S}})},animation:g=>{fe(g)},contentUpdate:g=>{i(g)}}})(u)}function l(){var g,S;const u=(S=(g=e.builderContextSignal.content)==null?void 0:g.data)==null?void 0:S.jsCode;u&&L({code:u,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!1})}const[d,c]=h.useState(()=>({})),[f,b]=h.useState(()=>!1);function x(u){var g,S;if(e.builderContextSignal.content){const y=(g=e.builderContextSignal.content)==null?void 0:g.testVariationId,k=(S=e.builderContextSignal.content)==null?void 0:S.id;m._track({type:"click",canTrack:m.getDefaultCanTrack(e.canTrack),contentId:k,apiKey:e.apiKey,variationId:y!==k?y:void 0,...Qt(u),unique:!f})}f||b(!0)}function p(u){return u.replace(/{{([^}]+)}}/g,(g,S)=>String(L({code:S,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!0})))}function C({url:u,key:g}){m.fetch(u).then(S=>S.json()).then(S=>{var k,P;const y={...e.builderContextSignal.rootState,[g]:S};(P=(k=e.builderContextSignal).rootSetState)==null||P.call(k,y),d[g]=!0}).catch(S=>{console.error("error fetching dynamic data",u,S)})}function w(){var g,S,y;const u=(y=(S=(g=e.builderContextSignal.content)==null?void 0:g.data)==null?void 0:S.httpRequests)!=null?y:{};Object.entries(u).forEach(([k,P])=>{if(P&&(!d[k]||m.isEditing())){const N=p(P);C({url:N,key:k})}})}function T(){m.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:m.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}return h.useEffect(()=>{var u,g;if(m.isBrowser()){if(m.isEditing()&&(window.addEventListener("message",s),m.registerInsertMenu(),m.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(y=>{var P;const k=m.createRegisterComponentMessage(y);(P=window.parent)==null||P.postMessage(k,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",T)),e.builderContextSignal.content&&m.getDefaultCanTrack(e.canTrack)){const y=(u=e.builderContextSignal.content)==null?void 0:u.testVariationId,k=(g=e.builderContextSignal.content)==null?void 0:g.id,P=e.apiKey;m._track({type:"impression",canTrack:!0,contentId:k,apiKey:P,variationId:y!==k?y:void 0})}if(m.isPreviewing()){const y=new URL(location.href).searchParams,k=y.get("builder.preview"),P=y.get(`builder.preview.${k}`),N=y.get("apiKey")||y.get("builder.space");k===e.model&&N===e.apiKey&&(!e.content||P===e.content.id)&&m.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(O=>{O&&i(O)})}}},[]),h.useEffect(()=>{e.apiKey||m.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),l(),w(),T()},[]),h.useEffect(()=>{e.content&&i(e.content)},[e.content]),h.useEffect(()=>{l()},[(v=(j=e.builderContextSignal.content)==null?void 0:j.data)==null?void 0:v.jsCode]),h.useEffect(()=>{w()},[(R=(I=e.builderContextSignal.content)==null?void 0:I.data)==null?void 0:R.httpRequests]),h.useEffect(()=>{T()},[e.builderContextSignal.rootState]),h.useEffect(()=>{e.data&&n(e.data)},[e.data]),h.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),h.useEffect(()=>()=>{m.isBrowser()&&(window.removeEventListener("message",s),window.removeEventListener("builder:component:stateChangeListenerActivated",T))},[]),a.jsx(G.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?a.jsx(o,{ref:t,onClick:u=>x(u),"builder-content-id":(E=e.builderContextSignal.content)==null?void 0:E.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((F=e.content)==null?void 0:F.testVariationId)||((B=e.content)==null?void 0:B.id)}`,children:e.children}):null})}const Zt=e=>{var r,s;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(s=e.fileUrl)!=null?s:(r=e==null?void 0:e.files)==null?void 0:r.regular;let o="";if(i&&t&&n&&(o+=`
154
154
  @font-face {
155
155
  font-family: "${t}";
156
156
  src: local("${n}"), url('${i}') format('woff2');
@@ -164,10 +164,7 @@ src: url('${c}') format('woff2');
164
164
  font-display: fallback;
165
165
  font-weight: ${l};
166
166
  }
167
- `.trim())}return o},an=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>on(n)))==null?void 0:t.join(" "))||""},rn=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"";function sn(e){const[t,n]=d.useState(()=>`
168
- ${rn({cssCode:e.cssCode,contentId:e.contentId})}
169
- ${an({customFonts:e.customFonts})}
170
-
167
+ `.trim())}return o},en=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Zt(n)))==null?void 0:t.join(" "))||""},tn=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",nn=`
171
168
  .builder-button {
172
169
  all: unset;
173
170
  }
@@ -184,4 +181,8 @@ ${an({customFonts:e.customFonts})}
184
181
  text-align: inherit;
185
182
  font-family: inherit;
186
183
  }
187
- `.trim());return a.jsx(J,{styles:t})}const ln=({content:e,data:t,locale:n})=>{var r,s,l;const i={},o=((r=e==null?void 0:e.data)==null?void 0:r.state)||{};return(l=(s=e==null?void 0:e.data)==null?void 0:s.inputs)==null||l.forEach(u=>{u.name&&u.defaultValue!==void 0&&(i[u.name]=u.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},cn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function me(e){var u,c,f,h,b,x,p;const[t,n]=d.useState(()=>{var E,j;return Xt({variationId:(E=e.content)==null?void 0:E.testVariationId,contentId:(j=e.content)==null?void 0:j.id})});function i(E){l(j=>({...j,rootState:E}))}const[o,r]=d.useState(()=>[...ce(),...e.customComponents||[]].reduce((E,{component:j,...V})=>({...E,[V.name]:{component:j,...m.serializeComponentInfo(V)}}),{})),[s,l]=d.useState(()=>({content:cn({content:e.content,data:e.data}),localState:void 0,rootState:ln({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...ce(),...e.customComponents||[]].reduce((E,{component:j,...V})=>({...E,[V.name]:m.serializeComponentInfo(V)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return a.jsx(he.Provider,{value:{registeredComponents:o},children:a.jsxs(nn,{content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,showContent:e.showContent,builderContextSignal:s,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,linkComponent:e.linkComponent,trustedHosts:e.trustedHosts,setBuilderContextSignal:l,children:[e.isSsrAbTest?a.jsx(X,{scriptStr:t}):null,a.jsx(sn,{contentId:(u=s.content)==null?void 0:u.id,cssCode:(f=(c=s.content)==null?void 0:c.data)==null?void 0:f.cssCode,customFonts:(b=(h=s.content)==null?void 0:h.data)==null?void 0:b.customFonts}),a.jsx(L,{blocks:(p=(x=s.content)==null?void 0:x.data)==null?void 0:p.blocks,context:s,registeredComponents:o,linkComponent:e.linkComponent})]})})}function Fe(e){var s,l;const[t,n]=d.useState(()=>Jt({canTrack:m.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var u;return Qt(_(e.content).map(c=>({id:c.testVariationId,testRatio:c.testRatio})),((u=e.content)==null?void 0:u.id)||"")}function o(){return _(e.content).map(u=>`.variant-${u.testVariationId} { display: none; } `).join("")}function r(){var u;return t?{...e.content,testVariationId:(u=e.content)==null?void 0:u.id}:m.handleABTestingSync({item:e.content,canTrack:m.getDefaultCanTrack(e.canTrack)})}return d.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[!e.__isNestedRender&&m.TARGET!=="reactNative"?a.jsx(X,{scriptStr:Gt()}):null,t?a.jsxs(a.Fragment,{children:[a.jsx(J,{id:`variants-styles-${(s=e.content)==null?void 0:s.id}`,styles:o()}),a.jsx(X,{scriptStr:i()}),(l=_(e.content))==null?void 0:l.map(u=>a.jsx(me,{content:u,showContent:!1,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},u.testVariationId))]}):null,a.jsx(me,{content:r(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const un=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return m.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{m.logger.error("Could not fetch symbol content: ",n)})};function Be(e){var r,s,l,u;function t(){var c,f;return[e.attributes[U()],"builder-symbol",(c=e.symbol)!=null&&c.inline?"builder-inline-symbol":void 0,(f=e.symbol)!=null&&f.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[n,i]=d.useState(()=>{var c;return(c=e.symbol)==null?void 0:c.content});function o(){n||un({symbol:e.symbol,builderContextValue:e.builderContext}).then(c=>{c&&i(c)})}return d.useEffect(()=>{},[]),d.useEffect(()=>{o()},[e.symbol]),a.jsx("div",{...e.attributes,className:t(),children:a.jsx(Fe,{__isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(r=e.builderBlock)==null?void 0:r.id},customComponents:Object.values(e.builderComponents),data:{...(s=e.symbol)==null?void 0:s.data,...e.builderContext.localState,...(l=n==null?void 0:n.data)==null?void 0:l.state},model:(u=e.symbol)==null?void 0:u.model,content:n,linkComponent:e.builderLinkComponent,blocksWrapper:"div",contentWrapper:"div"})})}exports.Blocks=L;exports.Button=fe;exports.Columns=Ce;exports.Content=Fe;exports.Fragment=we;exports.Image=Ie;exports.Section=Te;exports.Symbol=Be;exports.Text=Ee;exports.Video=je;
184
+ `,on=e=>e?"":nn;function an(e){const[t,n]=h.useState(()=>`
185
+ ${tn({cssCode:e.cssCode,contentId:e.contentId})}
186
+ ${en({customFonts:e.customFonts})}
187
+ ${on(e.isNestedRender)}
188
+ `.trim());return a.jsx(K,{styles:t})}const rn=({content:e,data:t,locale:n})=>{var r,s,l;const i={},o=((r=e==null?void 0:e.data)==null?void 0:r.state)||{};return(l=(s=e==null?void 0:e.data)==null?void 0:s.inputs)==null||l.forEach(d=>{d.name&&d.defaultValue!==void 0&&(i[d.name]=d.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},sn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function le(e){var d,c,f,b,x,p,C;const[t,n]=h.useState(()=>{var w,T;return Jt({variationId:(w=e.content)==null?void 0:w.testVariationId,contentId:(T=e.content)==null?void 0:T.id})});function i(w){l(T=>({...T,rootState:w}))}const[o,r]=h.useState(()=>[...ae(),...e.customComponents||[]].reduce((w,{component:T,...j})=>({...w,[j.name]:{component:T,...m.serializeComponentInfo(j)}}),{})),[s,l]=h.useState(()=>({content:sn({content:e.content,data:e.data}),localState:void 0,rootState:rn({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...ae(),...e.customComponents||[]].reduce((w,{component:T,...j})=>({...w,[j.name]:m.serializeComponentInfo(j)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return a.jsx(de.Provider,{value:{registeredComponents:o},children:a.jsxs(Xt,{content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,showContent:e.showContent,builderContextSignal:s,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,linkComponent:e.linkComponent,trustedHosts:e.trustedHosts,setBuilderContextSignal:l,children:[e.isSsrAbTest?a.jsx(J,{scriptStr:t}):null,a.jsx(an,{isNestedRender:e.isNestedRender,contentId:(d=s.content)==null?void 0:d.id,cssCode:(f=(c=s.content)==null?void 0:c.data)==null?void 0:f.cssCode,customFonts:(x=(b=s.content)==null?void 0:b.data)==null?void 0:x.customFonts}),a.jsx(W,{blocks:(C=(p=s.content)==null?void 0:p.data)==null?void 0:C.blocks,context:s,registeredComponents:o,linkComponent:e.linkComponent})]})})}function je(e){var s,l;const[t,n]=h.useState(()=>Kt({canTrack:m.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var d;return _t(U(e.content).map(c=>({id:c.testVariationId,testRatio:c.testRatio})),((d=e.content)==null?void 0:d.id)||"")}function o(){return U(e.content).map(d=>`.variant-${d.testVariationId} { display: none; } `).join("")}function r(){var d;return t?{...e.content,testVariationId:(d=e.content)==null?void 0:d.id}:m.handleABTestingSync({item:e.content,canTrack:m.getDefaultCanTrack(e.canTrack)})}return h.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[!e.isNestedRender&&m.TARGET!=="reactNative"?a.jsx(J,{scriptStr:zt()}):null,t?a.jsxs(a.Fragment,{children:[a.jsx(K,{id:`variants-styles-${(s=e.content)==null?void 0:s.id}`,styles:o()}),a.jsx(J,{scriptStr:i()}),(l=U(e.content))==null?void 0:l.map(d=>a.jsx(le,{isNestedRender:e.isNestedRender,content:d,showContent:!1,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},d.testVariationId))]}):null,a.jsx(le,{isNestedRender:e.isNestedRender,content:r(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const ln=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return m.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{m.logger.error("Could not fetch symbol content: ",n)})};function Re(e){var r,s,l,d;function t(){var c,f;return[e.attributes[D()],"builder-symbol",(c=e.symbol)!=null&&c.inline?"builder-inline-symbol":void 0,(f=e.symbol)!=null&&f.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[n,i]=h.useState(()=>{var c;return(c=e.symbol)==null?void 0:c.content});function o(){n||ln({symbol:e.symbol,builderContextValue:e.builderContext}).then(c=>{c&&i(c)})}return h.useEffect(()=>{},[]),h.useEffect(()=>{o()},[e.symbol]),a.jsx("div",{...e.attributes,className:t(),children:a.jsx(je,{isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(r=e.builderBlock)==null?void 0:r.id},customComponents:Object.values(e.builderComponents),data:{...(s=e.symbol)==null?void 0:s.data,...e.builderContext.localState,...(l=n==null?void 0:n.data)==null?void 0:l.state},model:(d=e.symbol)==null?void 0:d.model,content:n,linkComponent:e.builderLinkComponent,blocksWrapper:"div",contentWrapper:"div"})})}exports.Blocks=W;exports.Button=ce;exports.Columns=pe;exports.Content=je;exports.Fragment=Se;exports.Image=ve;exports.Section=ke;exports.Symbol=Re;exports.Text=Ce;exports.Video=we;