@builder.io/sdk-react 2.0.3 → 2.0.8

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 (82) hide show
  1. package/lib/browser/blocks-exports.cjs +14 -14
  2. package/lib/browser/blocks-exports.mjs +191 -170
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/init.cjs +1 -1
  6. package/lib/browser/init.mjs +1 -1
  7. package/lib/browser/{server-entry-02cecfb7.cjs → server-entry-ba3e0524.cjs} +1 -1
  8. package/lib/{node/server-entry-0687830a.js → browser/server-entry-f6ee5d92.js} +1 -1
  9. package/lib/browser/server-entry.cjs +1 -1
  10. package/lib/browser/server-entry.mjs +1 -1
  11. package/lib/edge/{accordion-368a2cf8.cjs → accordion-88007399.cjs} +1 -1
  12. package/lib/edge/{accordion-0eca9b08.js → accordion-ef5e6161.js} +1 -1
  13. package/lib/edge/blocks-90fd2fd8.js +808 -0
  14. package/lib/edge/blocks-dc478c97.cjs +12 -0
  15. package/lib/edge/blocks-exports.cjs +1 -1
  16. package/lib/edge/blocks-exports.mjs +2 -2
  17. package/lib/edge/{button-3ed29654.cjs → button-228f448d.cjs} +1 -1
  18. package/lib/edge/{button-e852700f.js → button-8d307faf.js} +2 -2
  19. package/lib/edge/columns-3547be8c.cjs +28 -0
  20. package/lib/edge/{columns-ee464f6c.js → columns-77b7011a.js} +10 -9
  21. package/lib/edge/{content-variants-c0257a99.js → content-variants-4f7cad1a.js} +15 -13
  22. package/lib/edge/content-variants-f0edf280.cjs +134 -0
  23. package/lib/edge/evaluate-384a03ed.js +2615 -0
  24. package/lib/edge/evaluate-39c2c786.cjs +21 -0
  25. package/lib/edge/form-c6da17f5.cjs +1 -0
  26. package/lib/edge/{form-8191004e.js → form-d40e9eca.js} +8 -7
  27. package/lib/edge/{get-class-prop-name-5fc98fcc.cjs → get-class-prop-name-4f8743e9.cjs} +1 -1
  28. package/lib/edge/{get-class-prop-name-d18337d2.js → get-class-prop-name-767dbeb0.js} +1 -1
  29. package/lib/edge/{image-e3fcd611.js → image-6a074aab.js} +27 -25
  30. package/lib/edge/image-eebfcbac.cjs +17 -0
  31. package/lib/edge/{img-10ef20a5.cjs → img-c50b3839.cjs} +1 -1
  32. package/lib/edge/{img-a24ed75f.js → img-d650b796.js} +1 -1
  33. package/lib/edge/index.cjs +1 -1
  34. package/lib/edge/index.mjs +1 -1
  35. package/lib/edge/init.cjs +1 -1
  36. package/lib/edge/init.mjs +1 -1
  37. package/lib/edge/{input-3876429d.js → input-5646dcb2.js} +1 -1
  38. package/lib/edge/{input-6325bfc0.cjs → input-aaba7df0.cjs} +1 -1
  39. package/lib/edge/{select-3f0f00f3.cjs → select-2e7bf7d0.cjs} +1 -1
  40. package/lib/edge/{select-5dc1c7d1.js → select-d3905dcd.js} +1 -1
  41. package/lib/edge/{server-entry-ff728468.js → server-entry-29a170e3.js} +1 -1
  42. package/lib/edge/{server-entry-805b9266.cjs → server-entry-b0e7430b.cjs} +1 -1
  43. package/lib/edge/server-entry.cjs +1 -1
  44. package/lib/edge/server-entry.mjs +1 -1
  45. package/lib/edge/slot-695259cf.cjs +1 -0
  46. package/lib/edge/{slot-20fe5e4f.js → slot-82c0b340.js} +12 -11
  47. package/lib/edge/{symbol-5012ed02.cjs → symbol-5a6a783f.cjs} +1 -1
  48. package/lib/edge/{symbol-e95082e1.js → symbol-91897bd4.js} +2 -2
  49. package/lib/edge/tabs-4c4a6b19.cjs +1 -0
  50. package/lib/edge/{tabs-261e8cd4.js → tabs-a191e7b1.js} +10 -9
  51. package/lib/edge/text-7a00e2f8.cjs +1 -0
  52. package/lib/edge/text-ca974245.js +38 -0
  53. package/lib/node/blocks-exports.cjs +15 -15
  54. package/lib/node/blocks-exports.mjs +192 -171
  55. package/lib/node/index.cjs +1 -1
  56. package/lib/node/index.mjs +2 -2
  57. package/lib/node/init.cjs +1 -1
  58. package/lib/node/init.mjs +2 -2
  59. package/lib/node/{node-runtime-160b6846.cjs → node-runtime-a6fb6ac7.cjs} +1 -1
  60. package/lib/node/{node-runtime-405effc5.js → node-runtime-d8e6d827.js} +1 -1
  61. package/lib/node/{server-entry-02cecfb7.cjs → server-entry-ba3e0524.cjs} +1 -1
  62. package/lib/{browser/server-entry-0687830a.js → node/server-entry-f6ee5d92.js} +1 -1
  63. package/lib/node/server-entry.cjs +1 -1
  64. package/lib/node/server-entry.mjs +1 -1
  65. package/package.json +1 -1
  66. package/types/blocks/image/image.types.d.ts +2 -0
  67. package/types/blocks/symbol/symbol.types.d.ts +1 -0
  68. package/types/components/content-variants/content-variants.types.d.ts +2 -1
  69. package/types/components/content-variants/extra-framework-props-types.d.ts +2 -0
  70. package/types/constants/sdk-version.d.ts +1 -1
  71. package/types/context/extra-context-types.d.ts +6 -0
  72. package/types/context/types.d.ts +2 -1
  73. package/lib/edge/blocks-db3cfcac.js +0 -3419
  74. package/lib/edge/blocks-f524a758.cjs +0 -32
  75. package/lib/edge/columns-1f84e26e.cjs +0 -28
  76. package/lib/edge/content-variants-42f2495b.cjs +0 -134
  77. package/lib/edge/form-4444faf2.cjs +0 -1
  78. package/lib/edge/image-344ddbb0.cjs +0 -17
  79. package/lib/edge/slot-a64b535f.cjs +0 -1
  80. package/lib/edge/tabs-d672f816.cjs +0 -1
  81. package/lib/edge/text-5915f038.js +0 -17
  82. package/lib/edge/text-e6dbb721.cjs +0 -1
@@ -0,0 +1,12 @@
1
+ "use strict";const c=require("react/jsx-runtime"),S=require("react"),$=require("./blocks-exports.cjs"),g=require("./server-entry-b0e7430b.cjs"),p=require("./evaluate-39c2c786.cjs"),_=require("./get-class-prop-name-4f8743e9.cjs"),V=require("./dynamic-renderer-b29b45ca.cjs"),P=e=>JSON.parse(JSON.stringify(e)),N=S.createContext({registeredComponents:{}});function G(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options}}const K=({block:e,context:t,localState:n,rootState:o,rootSetState:r})=>{if(!e.bindings)return e;const s=P(e),i={...s,properties:{...s.properties},actions:{...s.actions}};for(const l in e.bindings){const u=e.bindings[l],f=p.evaluate({code:u,localState:n,rootState:o,rootSetState:r,context:t,enableCache:!0});p.set(i,l,f)}return i};function b({block:e,context:t,shouldEvaluateBindings:n,localState:o,rootState:r,rootSetState:s}){const i=e;return n?K({block:i,localState:o,rootState:r,rootSetState:s,context:t}):i}const B=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function Z(e,t,n={}){let o,r,s,i=null,l=0;const u=function(){l=n.leading===!1?0:Date.now(),i=null,s=e.apply(o,r),i||(o=r=null)};return function(){const f=Date.now();!l&&n.leading===!1&&(l=f);const x=t-(f-l);return o=this,r=arguments,x<=0||x>t?(i&&(clearTimeout(i),i=null),l=f,s=e.apply(o,r),i||(o=r=null)):!i&&n.trailing!==!1&&(i=setTimeout(u,x)),s}}function y(e,...t){const n=Object(e);for(let o=1;o<arguments.length;o++){const r=arguments[o];if(r!=null)for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n}function J(e){for(const t of e)switch(t.trigger){case"pageLoad":D(t);break;case"scrollInView":X(t);break}}function T(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function O(e,t){const n=Q(e),o=getComputedStyle(t),r=e.steps[0].styles,s=e.steps[e.steps.length-1].styles,i=[r,s];for(const l of i)for(const u of n)u in l||(l[u]=o[u])}function Q(e){const t=[];for(const n of e.steps)for(const o in n.styles)t.indexOf(o)===-1&&t.push(o);return t}function D(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){T(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{O(e,n),n.style.transition="none",n.style.transitionDelay="0",y(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${B(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),y(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function X(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){T(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{O(e,n);let o=!1,r=!1;function s(){!o&&l(n)?(o=!0,r=!0,setTimeout(()=>{y(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",i),setTimeout(()=>{r=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&o&&!r&&!l(n)&&(o=!1,y(n.style,e.steps[0].styles))}const i=Z(s,200,{leading:!1});function l(x){const a=x.getBoundingClientRect(),d=window.innerHeight,m=(e.thresholdPercent||0)/100*d;return a.bottom>m&&a.top<d-m}const u=e.steps[0].styles;function f(){y(n.style,u)}f(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${B(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",i,{capture:!0,passive:!0}),s()})}const F=e=>Object.entries(e).map(([n,o])=>{if(typeof o=="string")return`${B(n)}: ${o};`}).filter(g.checkIsDefined),Y=e=>F(e).join(`
2
+ `),C=({mediaQuery:e,className:t,styles:n})=>{const o=`.${t} {
3
+ ${Y(n)}
4
+ }`;return e?`${e} {
5
+ ${o}
6
+ }`:o};function ee({style:e}){return e}const te=({block:e,context:t})=>M(ee({style:e.style||{},context:t,block:e}));function M(e){switch(g.TARGET){case"svelte":case"vue":case"solid":case"angular":return F(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const ne=({block:e,context:t,registeredComponents:n})=>{var s;const o=(s=b({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:s.name;if(!o)return null;const r=n[o];if(r)return r;console.warn(`
7
+ Could not find a registered component named "${o}".
8
+ If you registered it, is the file that registered it imported by the file that needs to render it?`)},oe=({block:e,context:t})=>{const{repeat:n,...o}=e;if(!(n!=null&&n.collection))return;const r=p.evaluate({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(r))return;const s=n.collection.split(".").pop(),i=n.itemName||(s?s+"Item":"item");return r.map((u,f)=>({context:{...t,localState:{...t.localState,$index:f,$item:u,[i]:u,[`$${i}Index`]:f}},block:o}))},re=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},se=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderComponents?{builderComponents:t}:{}},ce=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},le=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},L={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},A=(e,t=L)=>`@media (max-width: ${t[e].max}px)`,q=({small:e,medium:t})=>{const n=P(L);if(!e||!t)return n;const o=Math.floor(e/2);n.small={max:e,min:o,default:o+1};const r=n.small.max+1;n.medium={max:t,min:r,default:r+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n};function z(e){return c.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function ie(e){function t(){const o=b({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return g.checkIsDefined(o.hide)?!o.hide:g.checkIsDefined(o.show)?o.show:!0}function n(){var I,R,E;const o=b({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),r=o.responsiveStyles,s=e.context.content,i=q(((I=s==null?void 0:s.meta)==null?void 0:I.breakpoints)||{}),l=r==null?void 0:r.large,u=r==null?void 0:r.medium,f=r==null?void 0:r.small,x=o.id;if(!x)return"";const a=l?C({className:x,styles:l}):"",d=u?C({className:x,styles:u,mediaQuery:A("medium",i)}):"",h=f?C({className:x,styles:f,mediaQuery:A("small",i)}):"",m=o.animations&&o.animations.find(v=>v.trigger==="hover");let w="";if(m){const v=((E=(R=m.steps)==null?void 0:R[1])==null?void 0:E.styles)||{};w=C({className:`${x}:hover`,styles:{...v,transition:`all ${m.duration}s ${B(m.easing)}`,transitionDelay:m.delay?`${m.delay}s`:"0s"}})||""}return[a,d,h,w].join(" ")}return c.jsx(c.Fragment,{children:n()&&t()?c.jsx(c.Fragment,{children:c.jsx(z,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function ae(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ue=e=>`on${ae(e)}`,de=(e,t)=>n=>p.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,enableCache:!0});function H(e){var o;const t={},n=(o=e.block.actions)!=null?o:{};for(const r in n){if(!n.hasOwnProperty(r))continue;const s=n[r];let i=ue(r);if(e.stripPrefix)switch(g.TARGET){case"vue":i=i.replace("v-on:","");break;case"svelte":i=i.replace("on:","");break}t[i]=de(s,e)}return t}function fe({properties:e}){return e}const me=e=>({href:e.href});function j({block:e,context:t}){var o;const n={...me(e),...e.properties,"builder-id":e.id,style:te({block:e,context:t}),[_.getClassPropName()]:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return fe({properties:n,context:t,block:e})}function xe(e){return c.jsx(V.DynamicRenderer,{TagName:e.Wrapper,attributes:j({block:e.block,context:e.context}),actionAttributes:H({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 he(e){function t(){return e.includeBlockProps?{...j({block:e.block,context:e.context}),...H({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return c.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})}const ge=({componentOptions:e,builderBlock:t,context:n,componentRef:o,includeBlockProps:r,isInteractive:s,contextValue:i})=>{const l={...e,...r?{attributes:j({block:t,context:i})}:{}};return s?{Wrapper:o,block:t,context:n,wrapperProps:e,includeBlockProps:r}:l};function W(e){var o;const[t,n]=S.useState(()=>e.isInteractive?he:e.componentRef);return c.jsx(c.Fragment,{children:e.componentRef?c.jsx(c.Fragment,{children:c.jsx(t,{...ge({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:(o=e.blockChildren)==null?void 0:o.map(r=>c.jsx(k,{block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},r.id))})}):null})}function Se(e){const[t,n]=S.useState(()=>e.repeatContext);return c.jsx($.BuilderContext.Provider,{value:t,children:c.jsx(k,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function k(e){var u,f,x;function t(){return ne({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return oe({block:e.block,context:e.context})}function o(){var a;return(a=e.block.repeat)!=null&&a.collection?e.block:b({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function r(){var d;return e.block.tagName==="a"||((d=o().properties)==null?void 0:d.href)||o().href?e.linkComponent||"a":e.block.tagName||"div"}function s(){var h,m;if((h=e.block.repeat)!=null&&h.collection)return!!((m=n==null?void 0:n())!=null&&m.length);const a="hide"in o()?o().hide:!1;return("show"in o()?o().show:!0)&&!a}function i(){var d,h;return!((d=t==null?void 0:t())!=null&&d.component)&&!n()?(h=o().children)!=null?h:[]:[]}function l(){var a,d,h,m;return{blockChildren:(a=o().children)!=null?a:[],componentRef:(d=t==null?void 0:t())==null?void 0:d.component,componentOptions:{...G(o()),...ce(t(),o()),...le(t(),e.context),...re(t(),e.linkComponent),...se(t(),e.registeredComponents)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:o(),includeBlockProps:((h=t==null?void 0:t())==null?void 0:h.noWrap)===!0,isInteractive:!((m=t==null?void 0:t())!=null&&m.isRSC&&g.TARGET==="rsc")}}return S.useEffect(()=>{const a=o().id,d=o().animations;d&&a&&J(d.map(h=>({...h,elementId:a})))},[]),c.jsx(c.Fragment,{children:s()?c.jsxs(c.Fragment,{children:[c.jsx(ie,{block:e.block,context:e.context}),(u=t==null?void 0:t())!=null&&u.noWrap?c.jsx(c.Fragment,{children:c.jsx(W,{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.jsx(c.Fragment,{children:n()?c.jsx(c.Fragment,{children:(x=n())==null?void 0:x.map((a,d)=>c.jsx(Se,{repeatContext:a.context,block:a.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},d))}):c.jsxs(xe,{Wrapper:r(),block:o(),context:e.context,children:[c.jsx(W,{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}),(f=i())==null?void 0:f.map(a=>c.jsx(k,{block:a,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},a.id))]})})]}):null})}function ye(e){function t(){var r;return"builder-blocks"+((r=e.blocks)!=null&&r.length?"":" no-blocks")}function n(){var r,s;g.isEditing()&&!((r=e.blocks)!=null&&r.length)&&((s=window.parent)==null||s.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function o(){var r,s;g.isEditing()&&!((r=e.blocks)!=null&&r.length)&&((s=window.parent)==null||s.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return c.jsxs(c.Fragment,{children:[c.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-7cd1560e","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:r=>n(),onMouseEnter:r=>o(),onKeyPress:r=>n(),...e.BlocksWrapperProps,children:e.children}),c.jsx("style",{children:`.props-blocks-wrapper-7cd1560e {
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: stretch;
12
+ }`})]})}function U(e){var o,r,s;const t=S.useContext($.BuilderContext),n=S.useContext(N);return c.jsx(ye,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:((o=e.context)==null?void 0:o.BlocksWrapper)||t.BlocksWrapper,BlocksWrapperProps:((r=e.context)==null?void 0:r.BlocksWrapperProps)||t.BlocksWrapperProps,children:e.blocks?c.jsx(c.Fragment,{children:(s=e.blocks)==null?void 0:s.map(i=>c.jsx(k,{block:i,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},i.id))}):null})}const ke=Object.freeze(Object.defineProperty({__proto__:null,default:U},Symbol.toStringTag,{value:"Module"}));exports.Block=k;exports.Blocks=U;exports.ComponentsContext=N;exports.InlinedStyles=z;exports.blocks=ke;exports.fastClone=P;exports.getSizesForBreakpoints=q;exports.mapStyleObjToStrIfNeeded=M;exports.triggerAnimation=D;
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");require("./server-entry-805b9266.cjs");const t=e.lazy(()=>Promise.resolve().then(()=>require("./button-3ed29654.cjs"))),r=e.lazy(()=>Promise.resolve().then(()=>require("./columns-1f84e26e.cjs"))),n=e.lazy(()=>Promise.resolve().then(()=>require("./fragment-b6e3a326.cjs"))),s=e.lazy(()=>Promise.resolve().then(()=>require("./image-344ddbb0.cjs"))),i=e.lazy(()=>Promise.resolve().then(()=>require("./section-d655ea14.cjs"))),l=e.lazy(()=>Promise.resolve().then(()=>require("./symbol-5012ed02.cjs"))),c=e.lazy(()=>Promise.resolve().then(()=>require("./text-e6dbb721.cjs"))),a=e.lazy(()=>Promise.resolve().then(()=>require("./video-e20dcbbc.cjs"))),u=e.lazy(()=>Promise.resolve().then(()=>require("./blocks-f524a758.cjs")).then(o=>o.blocks)),m=e.lazy(()=>Promise.resolve().then(()=>require("./content-variants-42f2495b.cjs"))),y=e.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:""});exports.Blocks=u;exports.BuilderContext=y;exports.Button=t;exports.Columns=r;exports.Content=m;exports.Fragment=n;exports.Image=s;exports.Section=i;exports.Symbol=l;exports.Text=c;exports.Video=a;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");require("./server-entry-b0e7430b.cjs");const t=e.lazy(()=>Promise.resolve().then(()=>require("./button-228f448d.cjs"))),r=e.lazy(()=>Promise.resolve().then(()=>require("./columns-3547be8c.cjs"))),n=e.lazy(()=>Promise.resolve().then(()=>require("./fragment-b6e3a326.cjs"))),s=e.lazy(()=>Promise.resolve().then(()=>require("./image-eebfcbac.cjs"))),i=e.lazy(()=>Promise.resolve().then(()=>require("./section-d655ea14.cjs"))),l=e.lazy(()=>Promise.resolve().then(()=>require("./symbol-5a6a783f.cjs"))),c=e.lazy(()=>Promise.resolve().then(()=>require("./text-7a00e2f8.cjs"))),a=e.lazy(()=>Promise.resolve().then(()=>require("./video-e20dcbbc.cjs"))),u=e.lazy(()=>Promise.resolve().then(()=>require("./blocks-dc478c97.cjs")).then(o=>o.blocks)),m=e.lazy(()=>Promise.resolve().then(()=>require("./content-variants-f0edf280.cjs"))),y=e.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:""});exports.Blocks=u;exports.BuilderContext=y;exports.Button=t;exports.Columns=r;exports.Content=m;exports.Fragment=n;exports.Image=s;exports.Section=i;exports.Symbol=l;exports.Text=c;exports.Video=a;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { lazy as t, createContext as n } from "react";
3
- import "./server-entry-ff728468.js";
4
- const i = t(() => import("./button-e852700f.js")), r = t(() => import("./columns-ee464f6c.js")), a = t(() => import("./fragment-1492bc7f.js")), c = t(() => import("./image-e3fcd611.js")), m = t(() => import("./section-d83e2dd3.js")), p = t(() => import("./symbol-e95082e1.js")), l = t(() => import("./text-5915f038.js")), u = t(() => import("./video-58c2cc8d.js")), d = t(() => import("./blocks-db3cfcac.js").then((o) => o.blocks)), x = t(() => import("./content-variants-c0257a99.js")), S = n({
3
+ import "./server-entry-29a170e3.js";
4
+ const i = t(() => import("./button-8d307faf.js")), r = t(() => import("./columns-77b7011a.js")), a = t(() => import("./fragment-1492bc7f.js")), c = t(() => import("./image-6a074aab.js")), m = t(() => import("./section-d83e2dd3.js")), p = t(() => import("./symbol-91897bd4.js")), l = t(() => import("./text-ca974245.js")), u = t(() => import("./video-58c2cc8d.js")), d = t(() => import("./blocks-90fd2fd8.js").then((o) => o.blocks)), x = t(() => import("./content-variants-4f7cad1a.js")), S = n({
5
5
  content: null,
6
6
  context: {},
7
7
  localState: void 0,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),r=require("./dynamic-renderer-b29b45ca.cjs"),t=require("./get-class-prop-name-5fc98fcc.cjs");require("./server-entry-805b9266.cjs");function u(e){function n(){return{...e.attributes,[t.getClassPropName()]:`${e.link?"":"builder-button"} ${e.attributes[t.getClassPropName()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return i.jsx(r.DynamicRenderer,{attributes:n(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}exports.default=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),r=require("./dynamic-renderer-b29b45ca.cjs"),t=require("./get-class-prop-name-4f8743e9.cjs");require("./server-entry-b0e7430b.cjs");function u(e){function n(){return{...e.attributes,[t.getClassPropName()]:`${e.link?"":"builder-button"} ${e.attributes[t.getClassPropName()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return i.jsx(r.DynamicRenderer,{attributes:n(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}exports.default=u;
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { DynamicRenderer as r } from "./dynamic-renderer-8b343325.js";
3
- import { getClassPropName as n } from "./get-class-prop-name-d18337d2.js";
4
- import "./server-entry-ff728468.js";
3
+ import { getClassPropName as n } from "./get-class-prop-name-767dbeb0.js";
4
+ import "./server-entry-29a170e3.js";
5
5
  function b(t) {
6
6
  function e() {
7
7
  return {
@@ -0,0 +1,28 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("react"),s=require("./blocks-dc478c97.cjs"),p=require("./dynamic-renderer-b29b45ca.cjs"),q=require("./get-class-prop-name-4f8743e9.cjs");require("./blocks-exports.cjs");require("./server-entry-b0e7430b.cjs");require("./evaluate-39c2c786.cjs");const B=t=>`builder-columns ${t}-breakpoints`;function z(t){var f,g;const[u,A]=o.useState(()=>typeof t.space=="number"?t.space||0:20),[c,L]=o.useState(()=>t.columns||[]),[d,N]=o.useState(()=>t.stackColumnsAt||"tablet");function y(e){return e.link?t.builderLinkComponent||"a":"div"}function x(e){var n;return((n=c[e])==null?void 0:n.width)||100/c.length}function C(e){const n=x(e),i=u*(c.length-1)*(n/100);return`calc(${n}% - ${i}px)`}function a({stackedStyle:e,desktopStyle:n}){return d==="tablet"?e:n}function m({stackedStyle:e,desktopStyle:n}){return d==="never"?n:e}const[b,W]=o.useState(()=>t.stackColumnsAt==="never"?"row":t.reverseColumnsWhenStacked?"column-reverse":"column");function v(){return{"--flex-dir":b,"--flex-dir-tablet":a({stackedStyle:b,desktopStyle:"row"})}}function w(e){const n=e===0?0:u,i=C(e),r=`${n}px`,h="100%",S=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:i,["marginLeft"]:r,"--column-width-mobile":m({stackedStyle:h,desktopStyle:i}),"--column-margin-left-mobile":m({stackedStyle:S,desktopStyle:r}),"--column-width-tablet":a({stackedStyle:h,desktopStyle:i}),"--column-margin-left-tablet":a({stackedStyle:S,desktopStyle:r})}}function k(e){var i,r;return s.getSizesForBreakpoints(((r=(i=t.builderContext.content)==null?void 0:i.meta)==null?void 0:r.breakpoints)||{})[e].max}function $(){const e=`.${t.builderBlock.id}-breakpoints > .builder-column`;return`
2
+ @media (max-width: ${k("medium")}px) {
3
+ .${t.builderBlock.id}-breakpoints {
4
+ flex-direction: var(--flex-dir-tablet);
5
+ align-items: stretch;
6
+ }
7
+
8
+ ${e} {
9
+ width: var(--column-width-tablet) !important;
10
+ margin-left: var(--column-margin-left-tablet) !important;
11
+ }
12
+ }
13
+
14
+ @media (max-width: ${k("small")}px) {
15
+ .${t.builderBlock.id}-breakpoints {
16
+ flex-direction: var(--flex-dir);
17
+ align-items: stretch;
18
+ }
19
+
20
+ ${e} {
21
+ width: var(--column-width-mobile) !important;
22
+ margin-left: var(--column-margin-left-mobile) !important;
23
+ }
24
+ },
25
+ `}function j(e,n){return{...e.link?{href:e.link}:{},[q.getClassPropName()]:"builder-column",style:s.mapStyleObjToStrIfNeeded(w(n))}}return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:B((f=t.builderBlock)==null?void 0:f.id)+" div-34f576bb",style:v(),children:[l.jsx(s.InlinedStyles,{id:"builderio-columns",styles:$(),nonce:t.builderContext.nonce}),(g=t.columns)==null?void 0:g.map((e,n)=>l.jsx(p.DynamicRenderer,{TagName:y(e),actionAttributes:{},attributes:j(e,n),children:l.jsx(s.Blocks,{path:`component.options.columns.${n}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"},context:t.builderContext,registeredComponents:t.builderComponents,linkComponent:t.builderLinkComponent,blocks:e.blocks})},n))]}),l.jsx("style",{children:`.div-34f576bb {
26
+ display: flex;
27
+ line-height: normal;
28
+ }`})]})}exports.default=z;
@@ -1,12 +1,13 @@
1
1
  import { jsxs as y, Fragment as B, jsx as o } from "react/jsx-runtime";
2
2
  import { useState as r } from "react";
3
- import { InlinedStyles as z, Blocks as A, mapStyleObjToStrIfNeeded as L, getSizesForBreakpoints as W } from "./blocks-db3cfcac.js";
3
+ import { InlinedStyles as z, Blocks as A, mapStyleObjToStrIfNeeded as L, getSizesForBreakpoints as W } from "./blocks-90fd2fd8.js";
4
4
  import { DynamicRenderer as D } from "./dynamic-renderer-8b343325.js";
5
- import { getClassPropName as N } from "./get-class-prop-name-d18337d2.js";
5
+ import { getClassPropName as N } from "./get-class-prop-name-767dbeb0.js";
6
6
  import "./blocks-exports.mjs";
7
- import "./server-entry-ff728468.js";
7
+ import "./server-entry-29a170e3.js";
8
+ import "./evaluate-384a03ed.js";
8
9
  const F = (e) => `builder-columns ${e}-breakpoints`;
9
- function J(e) {
10
+ function Q(e) {
10
11
  var f, k;
11
12
  const [c, T] = r(
12
13
  () => typeof e.space == "number" ? e.space || 0 : 20
@@ -39,7 +40,7 @@ function J(e) {
39
40
  const [d, P] = r(
40
41
  () => e.stackColumnsAt === "never" ? "row" : e.reverseColumnsWhenStacked ? "column-reverse" : "column"
41
42
  );
42
- function v() {
43
+ function p() {
43
44
  return {
44
45
  "--flex-dir": d,
45
46
  "--flex-dir-tablet": a({
@@ -48,7 +49,7 @@ function J(e) {
48
49
  })
49
50
  };
50
51
  }
51
- function p(t) {
52
+ function v(t) {
52
53
  const n = t === 0 ? 0 : c, i = C(t), l = `${n}px`, g = "100%", h = 0;
53
54
  return {
54
55
  ...{
@@ -116,7 +117,7 @@ function J(e) {
116
117
  href: t.link
117
118
  } : {},
118
119
  [N()]: "builder-column",
119
- style: L(p(n))
120
+ style: L(v(n))
120
121
  };
121
122
  }
122
123
  return /* @__PURE__ */ y(B, { children: [
@@ -124,7 +125,7 @@ function J(e) {
124
125
  "div",
125
126
  {
126
127
  className: F((f = e.builderBlock) == null ? void 0 : f.id) + " div-34f576bb",
127
- style: v(),
128
+ style: p(),
128
129
  children: [
129
130
  /* @__PURE__ */ o(
130
131
  z,
@@ -167,5 +168,5 @@ function J(e) {
167
168
  ] });
168
169
  }
169
170
  export {
170
- J as default
171
+ Q as default
171
172
  };
@@ -1,9 +1,10 @@
1
1
  import { jsx as h, jsxs as H, Fragment as z } from "react/jsx-runtime";
2
2
  import { lazy as v, useRef as le, useState as k, useEffect as S } from "react";
3
- import { isBrowser as $, TARGET as te, isEditing as P, registerInsertMenu as se, setupBrowserForEditing as de, createRegisterComponentMessage as ue, getDefaultCanTrack as A, _track as J, isPreviewing as ce, fetchOneEntry as me, logger as pe, createEditorListener as ge, fetch as fe, serializeComponentInfo as Y, handleABTestingSync as he } from "./server-entry-ff728468.js";
3
+ import { isBrowser as $, TARGET as te, isEditing as P, registerInsertMenu as se, setupBrowserForEditing as de, createRegisterComponentMessage as ue, getDefaultCanTrack as A, _track as J, isPreviewing as ce, fetchOneEntry as me, logger as pe, createEditorListener as ge, fetch as fe, serializeComponentInfo as Y, handleABTestingSync as he } from "./server-entry-29a170e3.js";
4
4
  import { Video as be, Button as xe, Columns as ye, Fragment as ve, Image as Se, Section as Te, Symbol as ke, Text as Ce, BuilderContext as Ie } from "./blocks-exports.mjs";
5
- import { triggerAnimation as we, evaluate as Q, fastClone as Ve, InlinedStyles as ne, ComponentsContext as Re, Blocks as Ee } from "./blocks-db3cfcac.js";
6
- import "./get-class-prop-name-d18337d2.js";
5
+ import { triggerAnimation as we, fastClone as Ve, InlinedStyles as ne, ComponentsContext as Re, Blocks as Ee } from "./blocks-90fd2fd8.js";
6
+ import { evaluate as Q } from "./evaluate-384a03ed.js";
7
+ import "./get-class-prop-name-767dbeb0.js";
7
8
  import "./dynamic-renderer-8b343325.js";
8
9
  const B = {
9
10
  "@type": "@builder.io/sdk:Element",
@@ -129,7 +130,7 @@ const B = {
129
130
  builderComponents: !0,
130
131
  builderLinkComponent: !0
131
132
  }
132
- }, Pe = v(() => import("./accordion-0eca9b08.js")), We = {
133
+ }, Pe = v(() => import("./accordion-ef5e6161.js")), We = {
133
134
  name: "Core:Button",
134
135
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
135
136
  defaultStyles: {
@@ -541,7 +542,7 @@ const B = {
541
542
  shouldReceiveBuilderProps: {
542
543
  builderContext: !0
543
544
  }
544
- }, He = v(() => import("./slot-20fe5e4f.js")), $e = {
545
+ }, He = v(() => import("./slot-82c0b340.js")), $e = {
545
546
  name: "Symbol",
546
547
  noWrap: !0,
547
548
  static: !0,
@@ -721,9 +722,10 @@ const B = {
721
722
  builderComponents: !0,
722
723
  builderLinkComponent: !0
723
724
  }
724
- }, qe = v(() => import("./tabs-261e8cd4.js")), je = {
725
+ }, qe = v(() => import("./tabs-a191e7b1.js")), je = {
725
726
  shouldReceiveBuilderProps: {
726
- builderBlock: !1
727
+ builderBlock: !1,
728
+ builderContext: !0
727
729
  },
728
730
  name: "Text",
729
731
  static: !0,
@@ -1016,7 +1018,7 @@ const B = {
1016
1018
  builderComponents: !0,
1017
1019
  builderLinkComponent: !0
1018
1020
  }
1019
- }, Je = v(() => import("./form-8191004e.js")), Ye = {
1021
+ }, Je = v(() => import("./form-d40e9eca.js")), Ye = {
1020
1022
  name: "Form:Input",
1021
1023
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
1022
1024
  inputs: [
@@ -1067,7 +1069,7 @@ const B = {
1067
1069
  borderStyle: "solid",
1068
1070
  borderColor: "#ccc"
1069
1071
  }
1070
- }, Qe = v(() => import("./input-3876429d.js")), Ge = {
1072
+ }, Qe = v(() => import("./input-5646dcb2.js")), Ge = {
1071
1073
  name: "Form:Select",
1072
1074
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
1073
1075
  defaultStyles: {
@@ -1109,7 +1111,7 @@ const B = {
1109
1111
  }],
1110
1112
  static: !0,
1111
1113
  noWrap: !0
1112
- }, Xe = v(() => import("./select-5dc1c7d1.js")), Ze = {
1114
+ }, Xe = v(() => import("./select-d3905dcd.js")), Ze = {
1113
1115
  name: "Form:SubmitButton",
1114
1116
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
1115
1117
  defaultStyles: {
@@ -1184,7 +1186,7 @@ const B = {
1184
1186
  }],
1185
1187
  noWrap: !0,
1186
1188
  static: !0
1187
- }, it = v(() => import("./img-a24ed75f.js")), ot = {
1189
+ }, it = v(() => import("./img-d650b796.js")), ot = {
1188
1190
  name: "Video",
1189
1191
  canHaveChildren: !0,
1190
1192
  defaultStyles: {
@@ -1944,7 +1946,7 @@ function ee(e) {
1944
1946
  }
1945
1947
  );
1946
1948
  }
1947
- function Bt(e) {
1949
+ function Dt(e) {
1948
1950
  var a;
1949
1951
  const [t, n] = k(
1950
1952
  () => dt({
@@ -2057,5 +2059,5 @@ function Bt(e) {
2057
2059
  ] });
2058
2060
  }
2059
2061
  export {
2060
- Bt as default
2062
+ Dt as default
2061
2063
  };
@@ -0,0 +1,134 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),r=require("react"),s=require("./server-entry-b0e7430b.cjs"),k=require("./blocks-exports.cjs"),E=require("./blocks-dc478c97.cjs"),z=require("./evaluate-39c2c786.cjs");require("./get-class-prop-name-4f8743e9.cjs");require("./dynamic-renderer-b29b45ca.cjs");const A={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},B={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},Z={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[A]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[B]}],defaultValue:[{title:[A],detail:[B]},{title:[A],detail:[B]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},ee=r.lazy(()=>Promise.resolve().then(()=>require("./accordion-88007399.cjs"))),te={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,shouldReceiveBuilderProps:{builderLinkComponent:!0}},ne={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(c=>c.get("width"))&&(n.find(f=>!f.get("width"))||n.reduce((o,g)=>o+g.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}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},ae={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},ie={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","webp"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(a,o=6e4){return new Promise((g,y)=>{const C=document.createElement("img");let T=!1;C.onload=()=>{T=!0,g(C)},C.addEventListener("error",V=>{console.warn("Image load failed",V.error),y(V.error)}),C.src=a,setTimeout(()=>{T||y(new Error("Image load timed out"))},o)})}function i(a){return Math.round(a*1e3)/1e3}const c=e.get("image"),f=e.get("aspectRatio");if(fetch(c).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),c&&(!f||f===.7041))return n(c).then(a=>{const o=e.get("aspectRatio");e.get("image")===c&&(!o||o===.7041)&&a.width&&a.height&&(e.set("aspectRatio",i(a.height/a.width)),e.set("height",a.height),e.set("width",a.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{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}],shouldReceiveBuilderProps:{builderBlock:!0}},oe={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>"}}}]},re={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"}],shouldReceiveBuilderProps:{builderContext:!0}},le=r.lazy(()=>Promise.resolve().then(()=>require("./slot-695259cf.cjs"))),se={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"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},q={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"10px",paddingBottom:"10px",minWidth:"100px",textAlign:"center",display:"flex",flexDirection:"column",cursor:"pointer",userSelect:"none"}},component:{name:"Text",options:{text:"New tab"}}},D={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},de={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[q]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[D]}],defaultValue:[{label:[{...q,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...D,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...q,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...D,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},ue=r.lazy(()=>Promise.resolve().then(()=>require("./tabs-4c4a6b19.cjs"))),ce={shouldReceiveBuilderProps:{builderBlock:!1,builderContext:!0},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"}},me={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}]},pe=r.lazy(()=>Promise.resolve().then(()=>require("./custom-code-6d9730ff.cjs"))),fe={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},ge=r.lazy(()=>Promise.resolve().then(()=>require("./embed-32bdd007.cjs"))),he={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"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},be=r.lazy(()=>Promise.resolve().then(()=>require("./form-c6da17f5.cjs"))),xe={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"}},ye=r.lazy(()=>Promise.resolve().then(()=>require("./input-aaba7df0.cjs"))),ve={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},Se=r.lazy(()=>Promise.resolve().then(()=>require("./select-2e7bf7d0.cjs"))),Te={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},ke=r.lazy(()=>Promise.resolve().then(()=>require("./submit-button-b363e0ed.cjs"))),Ce={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0},Ie=r.lazy(()=>Promise.resolve().then(()=>require("./textarea-56a875bc.cjs"))),we={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},Ve=r.lazy(()=>Promise.resolve().then(()=>require("./img-c50b3839.cjs"))),Re={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}],shouldReceiveBuilderProps:{builderBlock:!0}},Ee=()=>[{component:pe,...me},{component:ge,...fe},{component:be,...he},{component:ye,...xe},{component:ke,...Te},{component:Se,...ve},{component:Ie,...Ce},{component:Ve,...we},{component:k.Video,...Re}],M=()=>[{component:k.Button,...te},{component:k.Columns,...ne},{component:k.Fragment,...ae},{component:k.Image,...ie},{component:k.Section,...oe},{component:le,...re},{component:k.Symbol,...se},{component:k.Text,...ce},{component:ue,...de},{component:ee,...Z},...Ee()],Fe=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
2
+ function getAndSetVariantId() {
3
+ function setCookie(name, value, days) {
4
+ let expires = '';
5
+ if (days) {
6
+ const date = new Date();
7
+ date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
8
+ expires = '; expires=' + date.toUTCString();
9
+ }
10
+ document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';
11
+ }
12
+ function getCookie(name) {
13
+ const nameEQ = name + '=';
14
+ const ca = document.cookie.split(';');
15
+ for (let i = 0; i < ca.length; i++) {
16
+ let c = ca[i];
17
+ while (c.charAt(0) === ' ') c = c.substring(1, c.length);
18
+ if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
19
+ }
20
+ return null;
21
+ }
22
+ const cookieName = \`builder.tests.\${contentId}\`;
23
+ const variantInCookie = getCookie(cookieName);
24
+ const availableIDs = variants.map(vr => vr.id).concat(contentId);
25
+ if (variantInCookie && availableIDs.includes(variantInCookie)) {
26
+ return variantInCookie;
27
+ }
28
+ let n = 0;
29
+ const random = Math.random();
30
+ for (let i = 0; i < variants.length; i++) {
31
+ const variant = variants[i];
32
+ const testRatio = variant.testRatio;
33
+ n += testRatio;
34
+ if (random < n) {
35
+ setCookie(cookieName, variant.id);
36
+ return variant.id;
37
+ }
38
+ }
39
+ setCookie(cookieName, contentId);
40
+ return contentId;
41
+ }
42
+ const winningVariantId = getAndSetVariantId();
43
+ const styleEl = document.currentScript?.previousElementSibling;
44
+ if (isHydrationTarget) {
45
+ styleEl.remove();
46
+ const thisScriptEl = document.currentScript;
47
+ thisScriptEl?.remove();
48
+ } else {
49
+ const newStyleStr = variants.concat({
50
+ id: contentId
51
+ }).filter(variant => variant.id !== winningVariantId).map(value => {
52
+ return \`.variant-\${value.id} { display: none; }
53
+ \`;
54
+ }).join('');
55
+ styleEl.innerHTML = newStyleStr;
56
+ }
57
+ }`,Pe=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
58
+ if (!navigator.cookieEnabled) {
59
+ return;
60
+ }
61
+ function getCookie(name) {
62
+ const nameEQ = name + '=';
63
+ const ca = document.cookie.split(';');
64
+ for (let i = 0; i < ca.length; i++) {
65
+ let c = ca[i];
66
+ while (c.charAt(0) === ' ') c = c.substring(1, c.length);
67
+ if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
68
+ }
69
+ return null;
70
+ }
71
+ const cookieName = \`builder.tests.\${defaultContentId}\`;
72
+ const winningVariant = getCookie(cookieName);
73
+ const parentDiv = document.currentScript?.parentElement;
74
+ const isDefaultContent = variantContentId === defaultContentId;
75
+ const isWinningVariant = winningVariant === variantContentId;
76
+ if (isWinningVariant && !isDefaultContent) {
77
+ parentDiv?.removeAttribute('hidden');
78
+ parentDiv?.removeAttribute('aria-hidden');
79
+ } else if (!isWinningVariant && isDefaultContent) {
80
+ parentDiv?.setAttribute('hidden', 'true');
81
+ parentDiv?.setAttribute('aria-hidden', 'true');
82
+ }
83
+ if (isHydrationTarget) {
84
+ if (!isWinningVariant) {
85
+ parentDiv?.remove();
86
+ }
87
+ const thisScriptEl = document.currentScript;
88
+ thisScriptEl?.remove();
89
+ }
90
+ return;
91
+ }`,Y="builderIoAbTest",G="builderIoRenderContent",W=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),We=({canTrack:e,content:t})=>!(!(W(t).length>0)||!e||s.isBrowser()),Ae=e=>e==="react"||e==="reactNative",Q=Ae(s.TARGET),Be=()=>`
92
+ window.${Y} = ${Fe}
93
+ window.${G} = ${Pe}
94
+ `,qe=(e,t)=>`
95
+ window.${Y}(
96
+ "${t}",${JSON.stringify(e)}, ${Q}
97
+ )`,De=({contentId:e,variationId:t})=>`window.${G}(
98
+ "${t}", "${e}", ${Q}
99
+ )`;function j(e){return b.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function O(e){return Math.round(e*1e3)/1e3}const je=(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},Ue=e=>je(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),_=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,c=e.clientY-n.top,f=O(i/n.width),a=O(c/n.height);return{x:f,y:a}},Le=e=>{const t=e.target,n=t&&Ue(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?_({event:e,target:t}):void 0,builderTargetOffset:n?_({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},He=e=>{var f,a;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(a=e.fileUrl)!=null?a:(f=e==null?void 0:e.files)==null?void 0:f.regular;let c="";if(i&&t&&n&&(c+=`
100
+ @font-face {
101
+ font-family: "${t}";
102
+ src: local("${n}"), url('${i}') format('woff2');
103
+ font-display: fallback;
104
+ font-weight: 400;
105
+ }
106
+ `.trim()),e.files)for(const o in e.files){if(!(String(Number(o))===o))continue;const y=e.files[o];y&&y!==i&&(c+=`
107
+ @font-face {
108
+ font-family: "${t}";
109
+ src: url('${y}') format('woff2');
110
+ font-display: fallback;
111
+ font-weight: ${o};
112
+ }
113
+ `.trim())}return c},$e=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>He(n)))==null?void 0:t.join(" "))||""},Ne=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",Ke=`
114
+ .builder-button {
115
+ all: unset;
116
+ }
117
+
118
+ .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
119
+ margin: 0;
120
+ }
121
+ .builder-text > p, .builder-text > .builder-paragraph {
122
+ color: inherit;
123
+ line-height: inherit;
124
+ letter-spacing: inherit;
125
+ font-weight: inherit;
126
+ font-size: inherit;
127
+ text-align: inherit;
128
+ font-family: inherit;
129
+ }
130
+ `,ze=e=>e?"":Ke,Me=e=>`variant-${e}`;function Oe(e){var I,U,L,H,$,N,K;const t=r.useRef(null);function n(l){var h,u;const m={...e.builderContextSignal.rootState,...l};e.builderContextSignal.rootSetState?(u=(h=e.builderContextSignal).rootSetState)==null||u.call(h,m):e.setBuilderContextSignal(d=>({...d,rootState:m}))}function i(l){var h,u,d,x,R;const m={...e.builderContextSignal.content,...l,data:{...(h=e.builderContextSignal.content)==null?void 0:h.data,...l==null?void 0:l.data},meta:{...(u=e.builderContextSignal.content)==null?void 0:u.meta,...l==null?void 0:l.meta,breakpoints:((d=l==null?void 0:l.meta)==null?void 0:d.breakpoints)||((R=(x=e.builderContextSignal.content)==null?void 0:x.meta)==null?void 0:R.breakpoints)}};e.setBuilderContextSignal(S=>({...S,content:m}))}function c(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[f,a]=r.useState(()=>e.contentWrapper||"div");function o(l){return s.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:m=>{var d;const{breakpoints:h,contentId:u}=m;!u||u!==((d=e.builderContextSignal.content)==null?void 0:d.id)||h&&i({meta:{breakpoints:h}})},animation:m=>{E.triggerAnimation(m)},contentUpdate:m=>{i(m)}}})(l)}function g(){var m,h;const l=(h=(m=e.builderContextSignal.content)==null?void 0:m.data)==null?void 0:h.jsCode;l&&z.evaluate({code:l,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!1})}const[y,C]=r.useState(()=>({})),[T,V]=r.useState(()=>({})),[F,P]=r.useState(()=>!1);function v(l){var m,h;if(e.builderContextSignal.content){const u=(m=e.builderContextSignal.content)==null?void 0:m.testVariationId,d=(h=e.builderContextSignal.content)==null?void 0:h.id;s._track({type:"click",canTrack:s.getDefaultCanTrack(e.canTrack),contentId:d,apiKey:e.apiKey,variationId:u!==d?u:void 0,...Le(l),unique:!F})}F||P(!0)}function p(){var m,h,u;const l=(u=(h=(m=e.builderContextSignal.content)==null?void 0:m.data)==null?void 0:h.httpRequests)!=null?u:{};Object.entries(l).forEach(([d,x])=>{if(!x||T[d]||y[d]&&!s.isEditing())return;T[d]=!0;const R=x.replace(/{{([^}]+)}}/g,(S,X)=>String(z.evaluate({code:X,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!0})));s.fetch(R).then(S=>S.json()).then(S=>{n({[d]:S}),y[d]=!0}).catch(S=>{console.error("error fetching dynamic data",x,S)}).finally(()=>{T[d]=!1})})}function w(){s.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:E.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}return r.useEffect(()=>{var l,m;if(s.isBrowser()){if(s.isEditing()&&(window.addEventListener("message",o),s.registerInsertMenu(),s.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(u=>{var x;const d=s.createRegisterComponentMessage(u);(x=window.parent)==null||x.postMessage(d,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",w)),e.builderContextSignal.content&&s.getDefaultCanTrack(e.canTrack)){const u=(l=e.builderContextSignal.content)==null?void 0:l.testVariationId,d=(m=e.builderContextSignal.content)==null?void 0:m.id,x=e.apiKey;s._track({type:"impression",canTrack:!0,contentId:d,apiKey:x,variationId:u!==d?u:void 0})}if(s.isPreviewing()&&!s.isEditing()){const u=new URL(location.href).searchParams,d=u.get("builder.preview"),x=u.get(`builder.overrides.${d}`),R=u.get("apiKey")||u.get("builder.space");d===e.model&&R===e.apiKey&&(!e.content||x===e.content.id)&&s.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(S=>{S&&i(S)})}}},[]),r.useEffect(()=>{e.apiKey||s.logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."),g(),p(),w()},[]),r.useEffect(()=>{e.content&&i(e.content)},[e.content]),r.useEffect(()=>{g()},[(U=(I=e.builderContextSignal.content)==null?void 0:I.data)==null?void 0:U.jsCode]),r.useEffect(()=>{p()},[(H=(L=e.builderContextSignal.content)==null?void 0:L.data)==null?void 0:H.httpRequests]),r.useEffect(()=>{w()},[e.builderContextSignal.rootState]),r.useEffect(()=>{e.data&&n(e.data)},[e.data]),r.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),r.useEffect(()=>()=>{s.isBrowser()&&(window.removeEventListener("message",o),window.removeEventListener("builder:component:stateChangeListenerActivated",w))},[]),b.jsx(k.BuilderContext.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?b.jsx(f,{ref:t,onClick:l=>v(l),"builder-content-id":($=e.builderContextSignal.content)==null?void 0:$.id,"builder-model":e.model,...c(),...e.contentWrapperProps,className:Me(((N=e.content)==null?void 0:N.testVariationId)||((K=e.content)==null?void 0:K.id)),children:e.children}):null})}function _e(e){const[t,n]=r.useState(()=>`
131
+ ${Ne({cssCode:e.cssCode,contentId:e.contentId})}
132
+ ${$e({customFonts:e.customFonts})}
133
+ ${ze(e.isNestedRender)}
134
+ `.trim());return b.jsx(E.InlinedStyles,{id:"builderio-content",styles:t,nonce:e.nonce})}const Je=({content:e,data:t,locale:n})=>{var f,a,o;const i={},c=((f=e==null?void 0:e.data)==null?void 0:f.state)||{};return(o=(a=e==null?void 0:e.data)==null?void 0:a.inputs)==null||o.forEach(g=>{g.name&&g.defaultValue!==void 0&&(i[g.name]=g.defaultValue)}),{...i,...c,...t,...n?{locale:n}:{}}},Ye=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function J(e){var g,y,C,T,V,F,P;const[t,n]=r.useState(()=>{var v,p;return De({variationId:(v=e.content)==null?void 0:v.testVariationId,contentId:(p=e.content)==null?void 0:p.id})});function i(v){o(p=>({...p,rootState:v}))}const[c,f]=r.useState(()=>{var v;return[...M(),...((v=e.customComponents)==null?void 0:v.filter(({models:p})=>!(p!=null&&p.length)||!e.model?!0:p.includes(e.model)))||[]].reduce((p,{component:w,...I})=>({...p,[I.name]:{component:w,...s.serializeComponentInfo(I)}}),{})}),[a,o]=r.useState(()=>{var v;return{content:Ye({content:e.content,data:e.data}),localState:void 0,rootState:Je({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},canTrack:e.canTrack,apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...M(),...((v=e.customComponents)==null?void 0:v.filter(({models:p})=>!(p!=null&&p.length)||!e.model?!0:p.includes(e.model)))||[]].reduce((p,{component:w,...I})=>({...p,[I.name]:s.serializeComponentInfo(I)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{},nonce:e.nonce||""}});return b.jsx(E.ComponentsContext.Provider,{value:{registeredComponents:c},children:b.jsxs(Oe,{nonce:e.nonce,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:a,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts,setBuilderContextSignal:o,children:[e.isSsrAbTest?b.jsx(j,{id:"builderio-variant-visibility",scriptStr:t,nonce:e.nonce||""}):null,b.jsx(_e,{nonce:e.nonce||"",isNestedRender:e.isNestedRender,contentId:(g=a.content)==null?void 0:g.id,cssCode:(C=(y=a.content)==null?void 0:y.data)==null?void 0:C.cssCode,customFonts:(V=(T=a.content)==null?void 0:T.data)==null?void 0:V.customFonts}),b.jsx(E.Blocks,{blocks:(P=(F=a.content)==null?void 0:F.data)==null?void 0:P.blocks,context:a,registeredComponents:c,linkComponent:e.linkComponent})]})})}function Ge(e){var a;const[t,n]=r.useState(()=>We({canTrack:s.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var o;return qe(W(e.content).map(g=>({id:g.testVariationId,testRatio:g.testRatio})),((o=e.content)==null?void 0:o.id)||"")}function c(){return W(e.content).map(o=>`.variant-${o.testVariationId} { display: none; } `).join("")}function f(){var o;return t?{...e.content,testVariationId:(o=e.content)==null?void 0:o.id}:s.handleABTestingSync({item:e.content,canTrack:s.getDefaultCanTrack(e.canTrack)})}return r.useEffect(()=>{},[]),b.jsxs(b.Fragment,{children:[!e.isNestedRender&&s.TARGET!=="reactNative"?b.jsx(j,{id:"builderio-init-variants-fns",scriptStr:Be(),nonce:e.nonce||""}):null,t?b.jsxs(b.Fragment,{children:[b.jsx(E.InlinedStyles,{id:"builderio-variants",styles:c(),nonce:e.nonce||""}),b.jsx(j,{id:"builderio-variants-visibility",scriptStr:i(),nonce:e.nonce||""}),(a=W(e.content))==null?void 0:a.map(o=>b.jsx(J,{isNestedRender:e.isNestedRender,nonce:e.nonce,content:o,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},o.testVariationId))]}):null,b.jsx(J,{nonce:e.nonce,isNestedRender:e.isNestedRender,content:f(),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})]})}exports.default=Ge;