@builder.io/sdk-react 1.0.23 → 1.0.25

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 (83) hide show
  1. package/lib/browser/blocks-exports.cjs +31 -31
  2. package/lib/browser/blocks-exports.mjs +1042 -826
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/init.cjs +8 -1
  6. package/lib/browser/init.mjs +37 -2
  7. package/lib/browser/{server-entry-4ca9f249.js → server-entry-d15ee928.js} +2 -1
  8. package/lib/browser/{server-entry-f69e2b2a.cjs → server-entry-f28ec73b.cjs} +2 -2
  9. package/lib/browser/server-entry.cjs +1 -1
  10. package/lib/browser/server-entry.mjs +1 -1
  11. package/lib/edge/{blocks-93608689.js → blocks-7c1422af.js} +682 -685
  12. package/lib/edge/blocks-8c31869c.cjs +32 -0
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/button-3439cb1b.js +31 -0
  16. package/lib/edge/button-96857fcf.cjs +1 -0
  17. package/lib/edge/columns-0d152875.js +163 -0
  18. package/lib/edge/columns-930c3d9a.cjs +28 -0
  19. package/lib/edge/{content-variants-f416bff5.js → content-variants-1ff6980e.js} +404 -262
  20. package/lib/edge/content-variants-d62785c6.cjs +134 -0
  21. package/lib/edge/{form-8526db32.js → form-1dbd32d7.js} +3 -3
  22. package/lib/edge/{form-44ceed15.cjs → form-69ed6cc5.cjs} +1 -1
  23. package/lib/edge/{get-class-prop-name-e85bf7a3.js → get-class-prop-name-58140fb7.js} +2 -1
  24. package/lib/edge/get-class-prop-name-c793129b.cjs +1 -0
  25. package/lib/edge/image-764070f8.cjs +17 -0
  26. package/lib/edge/{image-0008c792.js → image-9d24a962.js} +24 -24
  27. package/lib/edge/{img-a5802e2b.cjs → img-305b1676.cjs} +1 -1
  28. package/lib/edge/{img-5ef224a8.js → img-d4b1130f.js} +1 -1
  29. package/lib/edge/index.cjs +1 -1
  30. package/lib/edge/index.mjs +1 -1
  31. package/lib/edge/init.cjs +8 -1
  32. package/lib/edge/init.mjs +37 -2
  33. package/lib/edge/{input-f1aa0191.cjs → input-28dd9b60.cjs} +1 -1
  34. package/lib/edge/{input-3f85283b.js → input-a7054c28.js} +1 -1
  35. package/lib/edge/{select-d4c018c0.cjs → select-57b6e444.cjs} +1 -1
  36. package/lib/edge/{select-4fe889b6.js → select-dd83a040.js} +1 -1
  37. package/lib/edge/{server-entry-e1e18fd2.js → server-entry-cb8ad418.js} +2 -1
  38. package/lib/edge/{server-entry-c4b7844d.cjs → server-entry-d9413c6f.cjs} +2 -2
  39. package/lib/edge/server-entry.cjs +1 -1
  40. package/lib/edge/server-entry.mjs +1 -1
  41. package/lib/edge/{slot-2a11e808.cjs → slot-3f6aff1b.cjs} +1 -1
  42. package/lib/edge/{slot-97599025.js → slot-7dbe2bcb.js} +3 -3
  43. package/lib/edge/symbol-63f3b56e.cjs +1 -0
  44. package/lib/edge/{symbol-a90a41a3.js → symbol-a20aae0e.js} +32 -26
  45. package/lib/edge/tabs-f559c3bf.cjs +1 -0
  46. package/lib/edge/tabs-f5fd67a5.js +69 -0
  47. package/lib/node/blocks-exports.cjs +32 -32
  48. package/lib/node/blocks-exports.mjs +1158 -942
  49. package/lib/node/index.cjs +1 -1
  50. package/lib/node/index.mjs +2 -2
  51. package/lib/node/init.cjs +1 -1
  52. package/lib/node/init.mjs +8 -6
  53. package/lib/node/node-runtime-79a56b80.cjs +48 -0
  54. package/lib/node/{node-runtime-8062cfb8.js → node-runtime-def43b7b.js} +49 -47
  55. package/lib/node/{server-entry-3e54c767.js → server-entry-28bf4f4c.js} +1 -1
  56. package/lib/node/{server-entry-461bfaf9.cjs → server-entry-c4d16d70.cjs} +1 -1
  57. package/lib/node/server-entry.cjs +1 -1
  58. package/lib/node/server-entry.mjs +1 -1
  59. package/package.json +1 -1
  60. package/types/blocks/columns/columns.types.d.ts +1 -1
  61. package/types/blocks/columns/helpers.d.ts +1 -0
  62. package/types/blocks/tabs/component-info.d.ts +2 -0
  63. package/types/blocks/tabs/index.d.ts +1 -0
  64. package/types/blocks/tabs/tabs.d.ts +4 -0
  65. package/types/blocks/tabs/tabs.types.d.ts +13 -0
  66. package/types/blocks/text/text.types.d.ts +2 -1
  67. package/types/components/block/block.helpers.d.ts +4 -2
  68. package/types/components/content/components/styles.helpers.d.ts +1 -0
  69. package/types/components/dynamic-div.d.ts +15 -0
  70. package/types/constants/sdk-version.d.ts +1 -1
  71. package/types/functions/evaluate/node-runtime/init.d.ts +4 -1
  72. package/types/functions/evaluate/node-runtime/node-runtime.d.ts +4 -1
  73. package/types/types/targets.d.ts +1 -1
  74. package/lib/edge/blocks-5539f58f.cjs +0 -32
  75. package/lib/edge/button-7e98d8f3.cjs +0 -1
  76. package/lib/edge/button-8816ab35.js +0 -28
  77. package/lib/edge/columns-8db639b5.cjs +0 -28
  78. package/lib/edge/columns-d065e3c4.js +0 -156
  79. package/lib/edge/content-variants-44d061f2.cjs +0 -134
  80. package/lib/edge/get-class-prop-name-7b951501.cjs +0 -1
  81. package/lib/edge/image-ee3dd857.cjs +0 -17
  82. package/lib/edge/symbol-dbb5c95e.cjs +0 -1
  83. package/lib/node/node-runtime-11a8cdfe.cjs +0 -48
@@ -1,16 +1,16 @@
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 J=(e,t,n)=>(Ve(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),h=require("./server-entry-461bfaf9.cjs"),f=require("react"),D=require("./node-runtime-11a8cdfe.cjs"),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 Q(e){return o.jsx(o.Fragment,{children:Be(e.TagName)?o.jsx(o.Fragment,{children:o.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):o.jsx(o.Fragment,{children:typeof e.TagName=="string"?o.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):o.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const M=()=>{switch(h.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function se(e){return o.jsx(Q,{attributes:{...e.attributes,[M()]:`${e.link?"":"builder-button"} ${e.attributes[M()]||""}`,...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 _=f.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}}),le=f.createContext({registeredComponents:{}});function We(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const Ae=({code:e,builder:t,context:n,event:i,localState:a,rootSetState:s,rootState:r})=>{const l=D.getFunctionArguments({builder:t,context:n,event:i,state:ce({rootState:r,localState:a,rootSetState:s})});return new Function(...l.map(([d])=>d),e)(...l.map(([,d])=>d))};function ce({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,a)=>{if(t&&a in t)return t[a];const s=i[a];return typeof s=="object"&&s!==null?ce({rootState:s,localState:void 0,rootSetState:n?r=>{i[a]=r,n(i)}:void 0}):s},set:(i,a,s)=>{if(t&&a in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[a]=s,n==null||n(i),!0}})}function Ne(){var e;return typeof process!="undefined"&&h.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const $e=()=>{var i;if(!Ne())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?(h.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},De=e=>h.isBrowser()||$e()?Ae(e):D.runInNode(e),F=class F{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return F.cache.get(t)}static setCachedValue(t,n){F.cache.size>20&&F.cache.delete(F.cache.keys().next().value),F.cache.set(t,{value:n})}};J(F,"cacheLimit",20),J(F,"cache",new Map);let $=F;function O({code:e,context:t,localState:n,rootState:i,rootSetState:a,event:s,isExpression:r=!0,enableCache:l}){if(e==="")return;const d={code:D.parseCode(e,{isExpression:r}),builder:D.getBuilderGlobals(),context:t,event:s,rootSetState:a,rootState:i,localState:n};if(l){const c=$.getCacheKey(d),m=$.getCachedValue(c);if(m)return m.value}try{const c=De(d);if(l){const m=$.getCacheKey(d);$.setCachedValue(m,c)}return c}catch(c){h.logger.error("Failed code evaluation: "+c.message,{code:e});return}}const Le=({block:e,context:t,localState:n,rootState:i,rootSetState:a})=>{if(!e.bindings)return e;const s=h.fastClone(e),r={...s,properties:{...s.properties},actions:{...s.actions}};for(const l in e.bindings){const d=e.bindings[l],c=O({code:d,localState:n,rootState:i,rootSetState:a,context:t,enableCache:!0});D.set(r,l,c)}return r};function q({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:a,rootSetState:s}){const r=e;return n?Le({block:r,localState:i,rootState:a,rootSetState:s,context:t}):r}function Me(e,t,n={}){let i,a,s,r=null,l=0;const d=function(){l=n.leading===!1?0:Date.now(),r=null,s=e.apply(i,a),r||(i=a=null)};return function(){const c=Date.now();!l&&n.leading===!1&&(l=c);const m=t-(c-l);return i=this,a=arguments,m<=0||m>t?(r&&(clearTimeout(r),r=null),l=c,s=e.apply(i,a),r||(i=a=null)):!r&&n.trailing!==!1&&(r=setTimeout(d,m)),s}}function L(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const a=arguments[i];if(a!=null)for(const s in a)Object.prototype.hasOwnProperty.call(a,s)&&(n[s]=a[s])}return n}const X=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function Oe(e){for(const t of e)switch(t.trigger){case"pageLoad":me(t);break;case"scrollInView":He(t);break}}function de(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ue(e,t){const n=Ue(e),i=getComputedStyle(t),a=e.steps[0].styles,s=e.steps[e.steps.length-1].styles,r=[a,s];for(const l of r)for(const d of n)d in l||(l[d]=i[d])}function Ue(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 me(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){de(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ue(e,n),n.style.transition="none",n.style.transitionDelay="0",L(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${X(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),L(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function He(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){de(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ue(e,n);let i=!1,a=!1;function s(){!i&&l(n)?(i=!0,a=!0,setTimeout(()=>{L(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",r),setTimeout(()=>{a=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&i&&!a&&!l(n)&&(i=!1,L(n.style,e.steps[0].styles))}const r=Me(s,200,{leading:!1});function l(m){const g=m.getBoundingClientRect(),x=window.innerHeight,v=(e.thresholdPercent||0)/100*x;return g.bottom>v&&g.top<x-v}const d=e.steps[0].styles;function c(){L(n.style,d)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${X(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",r,{capture:!0,passive:!0}),s()})}const Ke=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),fe=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${Ke(n)}: ${i};`}).filter(h.checkIsDefined),qe=e=>fe(e).join(`
2
- `),H=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
3
- ${qe(n)}
1
+ "use client";"use strict";var Be=Object.defineProperty;var Ae=(e,t,n)=>t in e?Be(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Y=(e,t,n)=>(Ae(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),g=require("./server-entry-c4d16d70.cjs"),f=require("react"),L=require("./node-runtime-79a56b80.cjs"),Ne=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),We=e=>typeof e=="string"&&Ne.has(e.toLowerCase());function ee(e){return a.jsx(a.Fragment,{children:We(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 O=()=>{switch(g.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function de(e){function t(){return{...e.attributes,[O()]:`${e.link?"":"builder-button"} ${e.attributes[O()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return a.jsx(ee,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const z=f.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{}}),ue=f.createContext({registeredComponents:{}});function $e(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const De=({code:e,builder:t,context:n,event:i,localState:o,rootSetState:l,rootState:s})=>{const r=L.getFunctionArguments({builder:t,context:n,event:i,state:me({rootState:s,localState:o,rootSetState:l})});return new Function(...r.map(([c])=>c),e)(...r.map(([,c])=>c))};function me({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,o)=>{if(t&&o in t)return t[o];const l=i[o];return typeof l=="object"&&l!==null?me({rootState:l,localState:void 0,rootSetState:n?s=>{i[o]=s,n(i)}:void 0}):l},set:(i,o,l)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[o]=l,n==null||n(i),!0}})}function Le(){var e;return typeof process!="undefined"&&g.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const Me=()=>{var i;if(!Le())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?(g.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},Oe=e=>g.isBrowser()||Me()?De(e):L.runInNode(e),A=class A{static getCacheKey(t){return JSON.stringify({...t,event:t.event?Math.random():void 0})}static getCachedValue(t){return A.cache.get(t)}static setCachedValue(t,n){A.cache.size>20&&A.cache.delete(A.cache.keys().next().value),A.cache.set(t,{value:n})}};Y(A,"cacheLimit",20),Y(A,"cache",new Map);let D=A;function U({code:e,context:t,localState:n,rootState:i,rootSetState:o,event:l,isExpression:s=!0,enableCache:r}){if(e==="")return;const c={code:L.parseCode(e,{isExpression:s}),builder:L.getBuilderGlobals(),context:t,event:l,rootSetState:o,rootState:i,localState:n};if(r){const d=D.getCacheKey(c),m=D.getCachedValue(d);if(m)return m.value}try{const d=Oe(c);if(r){const m=D.getCacheKey(c);D.setCachedValue(m,d)}return d}catch(d){g.logger.error("Failed code evaluation: "+d.message,{code:e});return}}const Ue=({block:e,context:t,localState:n,rootState:i,rootSetState:o})=>{if(!e.bindings)return e;const l=g.fastClone(e),s={...l,properties:{...l.properties},actions:{...l.actions}};for(const r in e.bindings){const c=e.bindings[r],d=U({code:c,localState:n,rootState:i,rootSetState:o,context:t,enableCache:!0});L.set(s,r,d)}return s};function _({block:e,context:t,shouldEvaluateBindings:n,localState:i,rootState:o,rootSetState:l}){const s=e;return n?Ue({block:s,localState:i,rootState:o,rootSetState:l,context:t}):s}function He(e,t,n={}){let i,o,l,s=null,r=0;const c=function(){r=n.leading===!1?0:Date.now(),s=null,l=e.apply(i,o),s||(i=o=null)};return function(){const d=Date.now();!r&&n.leading===!1&&(r=d);const m=t-(d-r);return i=this,o=arguments,m<=0||m>t?(s&&(clearTimeout(s),s=null),r=d,l=e.apply(i,o),s||(i=o=null)):!s&&n.trailing!==!1&&(s=setTimeout(c,m)),l}}function M(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const o=arguments[i];if(o!=null)for(const l in o)Object.prototype.hasOwnProperty.call(o,l)&&(n[l]=o[l])}return n}const te=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function Ke(e){for(const t of e)switch(t.trigger){case"pageLoad":ge(t);break;case"scrollInView":_e(t);break}}function fe(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function he(e,t){const n=qe(e),i=getComputedStyle(t),o=e.steps[0].styles,l=e.steps[e.steps.length-1].styles,s=[o,l];for(const r of s)for(const c of n)c in r||(r[c]=i[c])}function qe(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 ge(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){fe(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{he(e,n),n.style.transition="none",n.style.transitionDelay="0",M(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"),M(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function _e(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){fe(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{he(e,n);let i=!1,o=!1;function l(){!i&&r(n)?(i=!0,o=!0,setTimeout(()=>{M(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&&!r(n)&&(i=!1,M(n.style,e.steps[0].styles))}const s=He(l,200,{leading:!1});function r(m){const u=m.getBoundingClientRect(),x=window.innerHeight,k=(e.thresholdPercent||0)/100*x;return u.bottom>k&&u.top<x-k}const c=e.steps[0].styles;function d(){M(n.style,c)}d(),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}),l()})}const ze=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),be=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${ze(n)}: ${i};`}).filter(g.checkIsDefined),Je=e=>be(e).join(`
2
+ `),K=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
3
+ ${Je(n)}
4
4
  }`;return e?`${e} {
5
5
  ${i}
6
- }`:i};function _e({style:e}){return e}const ze=({block:e,context:t})=>he(_e({style:e.style||{},context:t,block:e}));function he(e){switch(h.TARGET){case"svelte":case"vue":case"solid":return fe(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const Je=({block:e,context:t,registeredComponents:n})=>{var s;const i=(s=q({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:s.name;if(!i)return null;const a=n[i];if(a)return a;console.warn(`
6
+ }`:i};function Ye({style:e}){return e}const Ge=({block:e,context:t})=>xe(Ye({style:e.style||{},context:t,block:e}));function xe(e){switch(g.TARGET){case"svelte":case"vue":case"solid":case"angular":return be(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const Qe=({block:e,context:t,registeredComponents:n})=>{var l;const i=(l=_({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:l.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?`)},Ye=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const a=O({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(a))return;const s=n.collection.split(".").pop(),r=n.itemName||(s?s+"Item":"item");return a.map((d,c)=>({context:{...t,localState:{...t.localState,$index:c,$item:d,[r]:d,[`$${r}Index`]:c}},block:i}))},ge={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ee=(e,t=ge)=>`@media (max-width: ${t[e].max}px)`,be=({small:e,medium:t})=>{const n=h.fastClone(ge);if(!e||!t)return n;const i=Math.floor(e/2);n.small={max:e,min:i,default:i+1};const a=n.small.max+1;n.medium={max:t,min:a,default:a+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n};function z(e){return o.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id})}function Ge(e){function t(){const i=q({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return h.checkIsDefined(i.hide)?!i.hide:h.checkIsDefined(i.show)?i.show:!0}function n(){var T,E,S;const i=q({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),a=i.responsiveStyles,s=e.context.content,r=be(((T=s==null?void 0:s.meta)==null?void 0:T.breakpoints)||{}),l=a==null?void 0:a.large,d=a==null?void 0:a.medium,c=a==null?void 0:a.small,m=i.id;if(!m)return"";const g=l?H({className:m,styles:l}):"",x=d?H({className:m,styles:d,mediaQuery:ee("medium",r)}):"",p=c?H({className:m,styles:c,mediaQuery:ee("small",r)}):"",v=i.animations&&i.animations.find(C=>C.trigger==="hover");let w="";if(v){const C=((S=(E=v.steps)==null?void 0:E[1])==null?void 0:S.styles)||{};w=H({className:`${m}:hover`,styles:{...C,transition:`all ${v.duration}s ${X(v.easing)}`,transitionDelay:v.delay?`${v.delay}s`:"0s"}})||""}return[g,x,p,w].join(" ")}return o.jsx(o.Fragment,{children:n()&&t()?o.jsx(o.Fragment,{children:o.jsx(z,{id:"builderio-block",styles:n()})}):null})}function Qe(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Xe=e=>`on${Qe(e)}`,Ze=(e,t)=>n=>O({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 a in n){if(!n.hasOwnProperty(a))continue;const s=n[a];let r=Xe(a);if(e.stripPrefix)switch(h.TARGET){case"vue":r=r.replace("v-on:","");break;case"svelte":r=r.replace("on:","");break}t[r]=Ze(s,e)}return t}function et({properties:e}){return e}const tt=e=>({href:e.href});function Z({block:e,context:t}){var i;const n={...tt(e),...e.properties,"builder-id":e.id,style:ze({block:e,context:t}),[M()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return et({properties:n,context:t,block:e})}function nt(e){return o.jsx(Q,{TagName:e.Wrapper,attributes:Z({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 it(e){return o.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...Z({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 at=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:a,isInteractive:s,contextValue:r})=>{const l={...e,...a?{attributes:Z({block:t,context:r})}:{}};return s?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:a}:l};function te(e){var i;const[t,n]=f.useState(()=>e.isInteractive?it:e.componentRef);return o.jsx(o.Fragment,{children:e.componentRef?o.jsx(o.Fragment,{children:o.jsx(t,{...at({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(a=>o.jsx(U,{block:a,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},a.id))})}):null})}function ot(e){const[t,n]=f.useState(()=>e.repeatContext);return o.jsx(_.Provider,{value:t,children:o.jsx(U,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function U(e){var d,c,m;function t(){return Je({block:e.block,context:e.context,registeredComponents:e.registeredComponents})}function n(){return Ye({block:e.block,context:e.context})}function i(){var g;return(g=e.block.repeat)!=null&&g.collection?e.block:q({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0})}function a(){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 s(){var p,v;if((p=e.block.repeat)!=null&&p.collection)return!!((v=n==null?void 0:n())!=null&&v.length);const g="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!g}function r(){var x,p;return!((x=t==null?void 0:t())!=null&&x.component)&&!n()?(p=i().children)!=null?p:[]:[]}function l(){var g,x,p,v,w,T,E,S,C,R,j;return{blockChildren:(g=i().children)!=null?g:[],componentRef:(x=t==null?void 0:t())==null?void 0:x.component,componentOptions:{...We(i()),builderContext:e.context,...((p=t==null?void 0:t())==null?void 0:p.name)==="Core:Button"||((v=t==null?void 0:t())==null?void 0:v.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}:{},...((E=t==null?void 0:t())==null?void 0:E.name)==="Symbol"||((S=t==null?void 0:t())==null?void 0:S.name)==="Columns"||((C=t==null?void 0:t())==null?void 0:C.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:!((j=t==null?void 0:t())!=null&&j.isRSC)}}return f.useEffect(()=>{const g=i().id,x=i().animations;x&&g&&Oe(x.map(p=>({...p,elementId:g})))},[]),o.jsx(o.Fragment,{children:s()?o.jsxs(o.Fragment,{children:[o.jsx(Ge,{block:e.block,context:e.context}),(d=t==null?void 0:t())!=null&&d.noWrap?o.jsx(o.Fragment,{children:o.jsx(te,{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})}):o.jsx(o.Fragment,{children:n()?o.jsx(o.Fragment,{children:(m=n())==null?void 0:m.map((g,x)=>o.jsx(ot,{repeatContext:g.context,block:g.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},x))}):o.jsxs(nt,{Wrapper:a(),block:i(),context:e.context,linkComponent:e.linkComponent,children:[o.jsx(te,{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=r())==null?void 0:c.map(g=>o.jsx(U,{block:g,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},g.id))]})})]}):null})}function rt(e){function t(){var a;return"builder-blocks"+((a=e.blocks)!=null&&a.length?"":" no-blocks")}function n(){var a,s;h.isEditing()&&!((a=e.blocks)!=null&&a.length)&&((s=window.parent)==null||s.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function i(){var a,s;h.isEditing()&&!((a=e.blocks)!=null&&a.length)&&((s=window.parent)==null||s.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return o.jsxs(o.Fragment,{children:[o.jsx(e.BlocksWrapper,{className:t()+" props-blocks-wrapper-7cd1560e","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:a=>n(),onMouseEnter:a=>i(),onKeyPress:a=>n(),...e.BlocksWrapperProps,children:e.children}),o.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=U({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,enableCache:!0});if(!Array.isArray(o))return;const l=n.collection.split(".").pop(),s=n.itemName||(l?l+"Item":"item");return o.map((c,d)=>({context:{...t,localState:{...t.localState,$index:d,$item:c,[s]:c,[`$${s}Index`]:d}},block:i}))},Ze=e=>e&&(e.isRSC||["Core:Button","Symbol","Columns","Form:Form","Builder: Tabs"].includes(e.name)),et=e=>e&&(e.isRSC||["Symbol","Columns","Form:Form","Builder: Tabs"].includes(e.name)),ye={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},ie=(e,t=ye)=>`@media (max-width: ${t[e].max}px)`,pe=({small:e,medium:t})=>{const n=g.fastClone(ye);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 l=n.medium.max+1;return n.large={max:2e3,min:l,default:l+1},n};function J(e){return a.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id})}function tt(e){function t(){const i=_({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return g.checkIsDefined(i.hide)?!i.hide:g.checkIsDefined(i.show)?i.show:!0}function n(){var E,j,P;const i=_({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0}),o=i.responsiveStyles,l=e.context.content,s=pe(((E=l==null?void 0:l.meta)==null?void 0:E.breakpoints)||{}),r=o==null?void 0:o.large,c=o==null?void 0:o.medium,d=o==null?void 0:o.small,m=i.id;if(!m)return"";const u=r?K({className:m,styles:r}):"",x=c?K({className:m,styles:c,mediaQuery:ie("medium",s)}):"",p=d?K({className:m,styles:d,mediaQuery:ie("small",s)}):"",k=i.animations&&i.animations.find(V=>V.trigger==="hover");let I="";if(k){const V=((P=(j=k.steps)==null?void 0:j[1])==null?void 0:P.styles)||{};I=K({className:`${m}:hover`,styles:{...V,transition:`all ${k.duration}s ${te(k.easing)}`,transitionDelay:k.delay?`${k.delay}s`:"0s"}})||""}return[u,x,p,I].join(" ")}return a.jsx(a.Fragment,{children:n()&&t()?a.jsx(a.Fragment,{children:a.jsx(J,{id:"builderio-block",styles:n()})}):null})}function nt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const it=e=>`on${nt(e)}`,ot=(e,t)=>n=>U({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1,enableCache:!0});function Se(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const o in n){if(!n.hasOwnProperty(o))continue;const l=n[o];let s=it(o);if(e.stripPrefix)switch(g.TARGET){case"vue":s=s.replace("v-on:","");break;case"svelte":s=s.replace("on:","");break}t[s]=ot(l,e)}return t}function at({properties:e}){return e}const rt=e=>({href:e.href});function ne({block:e,context:t}){var i;const n={...rt(e),...e.properties,"builder-id":e.id,style:Ge({block:e,context:t}),[O()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return at({properties:n,context:t,block:e})}function st(e){return a.jsx(ee,{TagName:e.Wrapper,attributes:ne({block:e.block,context:e.context}),actionAttributes:Se({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 lt(e){function t(){return e.includeBlockProps?{...ne({block:e.block,context:e.context}),...Se({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return a.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})}const ct=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:o,isInteractive:l,contextValue:s})=>{const r={...e,...o?{attributes:ne({block:t,context:s})}:{}};return l?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:o}:r};function oe(e){var i;const[t,n]=f.useState(()=>e.isInteractive?lt:e.componentRef);return a.jsx(a.Fragment,{children:e.componentRef?a.jsx(a.Fragment,{children:a.jsx(t,{...ct({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(H,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function dt(e){const[t,n]=f.useState(()=>e.repeatContext);return a.jsx(z.Provider,{value:t,children:a.jsx(H,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function H(e){var c,d,m;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 u;return(u=e.block.repeat)!=null&&u.collection?e.block:_({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 l(){var p,k;if((p=e.block.repeat)!=null&&p.collection)return!!((k=n==null?void 0:n())!=null&&k.length);const u="hide"in i()?i().hide:!1;return("show"in i()?i().show:!0)&&!u}function s(){var x,p;return!((x=t==null?void 0:t())!=null&&x.component)&&!n()?(p=i().children)!=null?p:[]:[]}function r(){var u,x,p,k;return{blockChildren:(u=i().children)!=null?u:[],componentRef:(x=t==null?void 0:t())==null?void 0:x.component,componentOptions:{...$e(i()),builderContext:e.context,...Ze(t())?{builderLinkComponent:e.linkComponent}:{},...et(t())?{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:!((k=t==null?void 0:t())!=null&&k.isRSC)}}return f.useEffect(()=>{const u=i().id,x=i().animations;x&&u&&Ke(x.map(p=>({...p,elementId:u})))},[]),a.jsx(a.Fragment,{children:l()?a.jsxs(a.Fragment,{children:[a.jsx(tt,{block:e.block,context:e.context}),(c=t==null?void 0:t())!=null&&c.noWrap?a.jsx(a.Fragment,{children:a.jsx(oe,{componentRef:r().componentRef,componentOptions:r().componentOptions,blockChildren:r().blockChildren,context:r().context,registeredComponents:r().registeredComponents,linkComponent:r().linkComponent,builderBlock:r().builderBlock,includeBlockProps:r().includeBlockProps,isInteractive:r().isInteractive})}):a.jsx(a.Fragment,{children:n()?a.jsx(a.Fragment,{children:(m=n())==null?void 0:m.map((u,x)=>a.jsx(dt,{repeatContext:u.context,block:u.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},x))}):a.jsxs(st,{Wrapper:o(),block:i(),context:e.context,linkComponent:e.linkComponent,children:[a.jsx(oe,{componentRef:r().componentRef,componentOptions:r().componentOptions,blockChildren:r().blockChildren,context:r().context,registeredComponents:r().registeredComponents,linkComponent:r().linkComponent,builderBlock:r().builderBlock,includeBlockProps:r().includeBlockProps,isInteractive:r().isInteractive}),(d=s())==null?void 0:d.map(u=>a.jsx(H,{block:u,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},u.id))]})})]}):null})}function ut(e){function t(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function n(){var o,l;g.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((l=window.parent)==null||l.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function i(){var o,l;g.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((l=window.parent)==null||l.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 A(e){var i,a,s;const t=f.useContext(_),n=f.useContext(le);return o.jsx(rt,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapper:((i=e.context)==null?void 0:i.BlocksWrapper)||t.BlocksWrapper,BlocksWrapperProps:((a=e.context)==null?void 0:a.BlocksWrapperProps)||t.BlocksWrapperProps,children:e.blocks?o.jsx(o.Fragment,{children:(s=e.blocks)==null?void 0:s.map(r=>o.jsx(U,{block:r,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},r.id))}):null})}function ye(e){var E;const[t,n]=f.useState(()=>typeof e.space=="number"?e.space||0:20),[i,a]=f.useState(()=>e.columns||[]),[s,r]=f.useState(()=>e.stackColumnsAt||"tablet");function l(S){var C;return((C=i[S])==null?void 0:C.width)||100/i.length}function d(S){const C=t*(i.length-1)/i.length;return`calc(${l(S)}% - ${C}px)`}function c({stackedStyle:S,desktopStyle:C}){return s==="tablet"?S:C}function m({stackedStyle:S,desktopStyle:C}){return s==="never"?C:S}const[g,x]=f.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function p(){return{"--flex-dir":g,"--flex-dir-tablet":c({stackedStyle:g,desktopStyle:"row"})}}function v(S){const C=S===0?0:t,R=d(S),j=`${C}px`,B="100%",W=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:R,["marginLeft"]:j,"--column-width-mobile":m({stackedStyle:B,desktopStyle:R}),"--column-margin-left-mobile":m({stackedStyle:W,desktopStyle:j}),"--column-width-tablet":c({stackedStyle:B,desktopStyle:R}),"--column-margin-left-tablet":c({stackedStyle:W,desktopStyle:j})}}function w(S){var R,j;return be(((j=(R=e.builderContext.content)==null?void 0:R.meta)==null?void 0:j.breakpoints)||{})[S].max}function T(){return`
13
- @media (max-width: ${w("medium")}px) {
12
+ }`})]})}function N(e){var i,o,l;const t=f.useContext(z),n=f.useContext(ue);return a.jsx(ut,{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:(l=e.blocks)==null?void 0:l.map(s=>a.jsx(H,{block:s,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||n.registeredComponents},s.id))}):null})}const mt=e=>`builder-columns ${e}-breakpoints`;function ve(e){var V,W;const[t,n]=f.useState(()=>typeof e.space=="number"?e.space||0:20),[i,o]=f.useState(()=>e.columns||[]),[l,s]=f.useState(()=>e.stackColumnsAt||"tablet");function r(v){return v.link?e.builderLinkComponent||"a":"div"}function c(v){var w;return((w=i[v])==null?void 0:w.width)||100/i.length}function d(v){const w=t*(i.length-1)/i.length;return`calc(${c(v)}% - ${w}px)`}function m({stackedStyle:v,desktopStyle:w}){return l==="tablet"?v:w}function u({stackedStyle:v,desktopStyle:w}){return l==="never"?w:v}const[x,p]=f.useState(()=>e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column");function k(){return{"--flex-dir":x,"--flex-dir-tablet":m({stackedStyle:x,desktopStyle:"row"})}}function I(v){const w=v===0?0:t,F=d(v),b=`${w}px`,h="100%",y=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:F,["marginLeft"]:b,"--column-width-mobile":u({stackedStyle:h,desktopStyle:F}),"--column-margin-left-mobile":u({stackedStyle:y,desktopStyle:b}),"--column-width-tablet":m({stackedStyle:h,desktopStyle:F}),"--column-margin-left-tablet":m({stackedStyle:y,desktopStyle:b})}}function E(v){var F,b;return pe(((b=(F=e.builderContext.content)==null?void 0:F.meta)==null?void 0:b.breakpoints)||{})[v].max}function j(){return`
13
+ @media (max-width: ${E("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: ${w("small")}px) {
25
+ @media (max-width: ${E("small")}px) {
26
26
  .${e.builderBlock.id}-breakpoints {
27
27
  flex-direction: var(--flex-dir);
28
28
  align-items: stretch;
@@ -33,17 +33,17 @@
33
33
  margin-left: var(--column-margin-left-mobile) !important;
34
34
  }
35
35
  },
36
- `}return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-003f4b1c`,style:p(),children:[o.jsx(z,{id:"builderio-columns",styles:T()}),(E=e.columns)==null?void 0:E.map((S,C)=>o.jsx(Q,{TagName:S.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...S.link?{href:S.link}:{},[M()]:"builder-column",style:he(v(C))},children:o.jsx(A,{path:`component.options.columns.${C}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:S.blocks})},C))]}),o.jsx("style",{children:`.div-003f4b1c {
36
+ `}function P(v,w){return{...v.link?{href:v.link}:{},[O()]:"builder-column",style:xe(I(w))}}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:mt((V=e.builderBlock)==null?void 0:V.id)+" div-00cb97e2",style:k(),children:[a.jsx(J,{id:"builderio-columns",styles:j()}),(W=e.columns)==null?void 0:W.map((v,w)=>a.jsx(ee,{TagName:r(v),actionAttributes:{},attributes:P(v,w),children:a.jsx(N,{path:`component.options.columns.${w}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:v.blocks})},w))]}),a.jsx("style",{children:`.div-00cb97e2 {
37
37
  display: flex;
38
38
  line-height: normal;
39
- }`})]})}function pe(e){return o.jsx("span",{children:e.children})}function ne(e){return e.replace(/http(s)?:/,"")}function st(e="",t,n){const i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=e.indexOf("?")!==-1?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+a+t+"="+encodeURIComponent(n)}function lt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return ne(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]),a=n[3],s=t.match("x")?t:`${t}x`;return ne(`${i[0]}_${s}${a}`)}return null}function Y(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(a=>a!==i).map(a=>`${st(e,"width",a)} ${a}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[lt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Se(e){var a,s,r,l;function t(){var m;const c=e.image||e.src;if(!c||!(c.match(/builder\.io/)||c.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((m=e.image)!=null&&m.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),Y(c)}else if(e.image&&!e.srcset)return Y(c);return Y(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 o.jsxs(o.Fragment,{children:[o.jsxs(o.Fragment,{children:[o.jsxs("picture",{children:[n()?o.jsx("source",{type:"image/webp",srcSet:n()}):null,o.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&&!((s=(a=e.builderBlock)==null?void 0:a.children)!=null&&s.length&&e.fitContent)?o.jsx("div",{className:"builder-image-sizer div-a0c95e8c",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(l=(r=e.builderBlock)==null?void 0:r.children)!=null&&l.length&&e.fitContent?o.jsx(o.Fragment,{children:e.children}):null,!e.fitContent&&e.children?o.jsx("div",{className:"div-a0c95e8c-2",children:e.children}):null]}),o.jsx("style",{children:`.img-a0c95e8c {
39
+ }`})]})}function ke(e){return a.jsx("span",{children:e.children})}function ae(e){return e.replace(/http(s)?:/,"")}function ft(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 ht(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return ae(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],l=t.match("x")?t:`${t}x`;return ae(`${i[0]}_${l}${o}`)}return null}function G(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=>`${ft(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[ht(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function Ce(e){var o,l,s,r,c,d;function t(){var x;const u=e.image||e.src;if(!u||!(u.match(/builder\.io/)||u.match(/cdn\.shopify\.com/)))return e.srcset;if(e.srcset&&((x=e.image)!=null&&x.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),G(u)}else if(e.image&&!e.srcset)return G(u);return G(u)}function n(){var m;return(m=t==null?void 0:t())!=null&&m.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const m={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?m: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-3ac67dd4",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((l=(o=e.builderBlock)==null?void 0:o.children)!=null&&l.length&&e.fitContent)?a.jsx("div",{className:"builder-image-sizer div-3ac67dd4",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(r=(s=e.builderBlock)==null?void 0:s.children)!=null&&r.length&&e.fitContent?a.jsx(a.Fragment,{children:e.children}):null,!e.fitContent&&((d=(c=e.builderBlock)==null?void 0:c.children)!=null&&d.length)?a.jsx("div",{className:"div-3ac67dd4-2",children:e.children}):null]}),a.jsx("style",{children:`.img-3ac67dd4 {
40
40
  opacity: 1;
41
41
  transition: opacity 0.2s ease-in-out;
42
- }.div-a0c95e8c {
42
+ }.div-3ac67dd4 {
43
43
  width: 100%;
44
44
  pointer-events: none;
45
45
  font-size: 0;
46
- }.div-a0c95e8c-2 {
46
+ }.div-3ac67dd4-2 {
47
47
  display: flex;
48
48
  flex-direction: column;
49
49
  align-items: stretch;
@@ -52,7 +52,7 @@
52
52
  left: 0;
53
53
  width: 100%;
54
54
  height: 100%;
55
- }`})]})}function ve(e){return o.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 ct={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},dt={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(a=>a.get("width"))&&(n.find(s=>!s.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}]},ut={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},mt={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(r,l=6e4){return new Promise((d,c)=>{const m=document.createElement("img");let g=!1;m.onload=()=>{g=!0,d(m)},m.addEventListener("error",x=>{console.warn("Image load failed",x.error),c(x.error)}),m.src=r,setTimeout(()=>{g||c(new Error("Image load timed out"))},l)})}function i(r){return Math.round(r*1e3)/1e3}const a=e.get("image"),s=e.get("aspectRatio");if(fetch(a).then(r=>r.blob()).then(r=>{r.type.includes("svg")&&e.set("noWebp",!0)}),a&&(!s||s===.7041))return n(a).then(r=>{const l=e.get("aspectRatio");e.get("image")===a&&(!l||l===.7041)&&r.width&&r.height&&(e.set("aspectRatio",i(r.height/r.width)),e.set("height",r.height),e.set("width",r.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}]},ft={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>"}}}]},ht={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 gt(e){var t,n,i;return o.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:o.jsx(A,{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 bt={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"}]},xt={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 ke(e){var t;return o.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const yt={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 pt(e){const t=f.useRef(null),[n,i]=f.useState(()=>[]),[a,s]=f.useState(()=>[]);return f.useEffect(()=>{var l;if(!((l=t.current)!=null&&l.getElementsByTagName)||typeof window=="undefined")return;const r=t.current.getElementsByTagName("script");for(let d=0;d<r.length;d++){const c=r[d];if(c.src){if(n.includes(c.src))continue;n.push(c.src);const m=document.createElement("script");m.async=!0,m.src=c.src,document.head.appendChild(m)}else if(!c.type||["text/javascript","application/javascript","application/ecmascript"].includes(c.type)){if(a.includes(c.innerText))continue;try{a.push(c.innerText),new Function(c.innerText)()}catch(m){console.warn("`CustomCode`: Error running script:",m)}}}},[]),o.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const St={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}]},vt=["text/javascript","application/javascript","application/ecmascript"],kt=e=>vt.includes(e.type);function Ct(e){const t=f.useRef(null),[n,i]=f.useState(()=>[]),[a,s]=f.useState(()=>[]),[r,l]=f.useState(()=>!1);function d(){if(!t.current||!t.current.getElementsByTagName)return;const c=t.current.getElementsByTagName("script");for(let m=0;m<c.length;m++){const g=c[m];if(g.src&&!n.includes(g.src)){n.push(g.src);const x=document.createElement("script");x.async=!0,x.src=g.src,document.head.appendChild(x)}else if(kt(g)&&!a.includes(g.innerText))try{a.push(g.innerText),new Function(g.innerText)()}catch(x){console.warn("`Embed`: Error running script:",x)}}}return f.useEffect(()=>{t.current&&!r&&(l(!0),d())},[t.current,r]),o.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const wt={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"}}}]},It=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],Tt=()=>{const e=process.env.NODE_ENV||"production";return It.includes(e)?e:"production"},Et=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((a,s)=>a!=null?a[s]:a,e);return i===void 0||i===e?n:i};function jt(e){var g,x;const t=f.useRef(null),[n,i]=f.useState(()=>"unsubmitted"),[a,s]=f.useState(()=>null),[r,l]=f.useState(()=>"");function d(p){var w,T;const v={...e.builderContext.rootState,...p};e.builderContext.rootSetState?(T=(w=e.builderContext).rootSetState)==null||T.call(w,v):e.builderContext.rootState=v}function c(){return h.isEditing()&&e.previewState||n}function m(p){var w;const v=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")p.preventDefault();else if(v){if(!(e.action||e.sendSubmissionsTo==="email")){p.preventDefault();return}p.preventDefault();const T=p.currentTarget,E=e.customHeaders||{};let S;const C=new FormData(T),R=Array.from(p.currentTarget.querySelectorAll("input,select,textarea")).filter(u=>!!u.name).map(u=>{let b;const I=u.name;if(u instanceof HTMLInputElement)if(u.type==="radio"){if(u.checked)return b=u.name,{key:I,value:b}}else if(u.type==="checkbox")b=u.checked;else if(u.type==="number"||u.type==="range"){const y=u.valueAsNumber;isNaN(y)||(b=y)}else u.type==="file"?b=u.files:b=u.value;else b=u.value;return{key:I,value:b}});let j=e.contentType;if(e.sendSubmissionsTo==="email"&&(j="multipart/form-data"),Array.from(R).forEach(({value:u})=>{(u instanceof File||Array.isArray(u)&&u[0]instanceof File||u instanceof FileList)&&(j="multipart/form-data")}),j!=="application/json")S=C;else{const u={};Array.from(R).forEach(({value:b,key:I})=>{D.set(u,I,b)}),S=JSON.stringify(u)}j&&j!=="multipart/form-data"&&(v&&((w=e.action)!=null&&w.includes("zapier.com"))||(E["content-type"]=j));const B=new CustomEvent("presubmit",{detail:{body:S}});if(t.current&&(t.current.dispatchEvent(B),B.defaultPrevented))return;i("sending");const W=`${Tt()==="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"?W:e.action,{body:S,headers:E,method:e.method||"post"}).then(async u=>{let b;const I=u.headers.get("content-type");if(I&&I.indexOf("application/json")!==-1?b=await u.json():b=await u.text(),!u.ok&&e.errorMessagePath){let y=Et(b,e.errorMessagePath);y&&(typeof y!="string"&&(y=JSON.stringify(y)),l(y),d({formErrorMessage:y}))}if(s(b),i(u.ok?"success":"error"),u.ok){const y=new CustomEvent("submit:success",{detail:{res:u,body:b}});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 b=new CustomEvent("submit:error",{detail:{error:u}});t.current&&(t.current.dispatchEvent(b),b.defaultPrevented)||(s(u),i("error"))})}}return o.jsxs(o.Fragment,{children:[" ",o.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:p=>m(p),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?o.jsx(o.Fragment,{children:(x=(g=e.builderBlock)==null?void 0:g.children)==null?void 0:x.map((p,v)=>o.jsx(U,{block:p,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${v}`))}):null,c()==="error"?o.jsx(A,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,c()==="sending"?o.jsx(A,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,c()==="error"&&a?o.jsx("pre",{className:"builder-form-error-text pre-31bf8a14",children:JSON.stringify(a,null,2)}):null,c()==="success"?o.jsx(A,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",o.jsx("style",{children:".pre-31bf8a14 { padding: 10px; color: red; text-align: center; }"})," "]})}const Rt={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 Pt(e){return f.createElement("input",{...e.attributes,key:h.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 Vt={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 Ft(e){var t;return f.createElement("select",{...e.attributes,value:e.value,key:h.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name},(t=e.options)==null?void 0:t.map((n,i)=>o.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const Bt={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 Wt(e){return o.jsx("button",{type:"submit",...e.attributes,children:e.text})}const At={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 Nt(e){return o.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},h.isEditing()&&e.imgSrc||"default-key")}const $t={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 Ce(e){var i,a,s,r,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 o.jsxs("div",{style:{position:"relative"},children:[o.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:o.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((s=(a=e.builderBlock)==null?void 0:a.children)!=null&&s.length))?o.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(l=(r=e.builderBlock)==null?void 0:r.children)!=null&&l.length&&e.fitContent?o.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?o.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 Dt=()=>[{component:pt,...yt},{component:Ct,...St},{component:jt,...wt},{component:Pt,...Rt},{component:Wt,...Bt},{component:Ft,...Vt},{component:Nt,...At},{component:Ce,...$t}],ie=()=>[{component:se,...ct},{component:ye,...dt},{component:pe,...ut},{component:Se,...mt},{component:ve,...ft},{component:gt,...ht},{component:je,...bt},{component:ke,...xt},...Dt()],Lt=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
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 gt={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},bt={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(l=>!l.get("width"))||n.reduce((r,c)=>r+c.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},yt={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,r=6e4){return new Promise((c,d)=>{const m=document.createElement("img");let u=!1;m.onload=()=>{u=!0,c(m)},m.addEventListener("error",x=>{console.warn("Image load failed",x.error),d(x.error)}),m.src=s,setTimeout(()=>{u||d(new Error("Image load timed out"))},r)})}function i(s){return Math.round(s*1e3)/1e3}const o=e.get("image"),l=e.get("aspectRatio");if(fetch(o).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!l||l===.7041))return n(o).then(s=>{const r=e.get("aspectRatio");e.get("image")===o&&(!r||r===.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}]},pt={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>"}}}]},St={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 vt(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(N,{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 kt={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"}]},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"}}},X={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},Ct={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:[X]}],defaultValue:[{label:[{...Q,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...X,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...Q,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...X,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"}]}]};function Tt(e){var l;const[t,n]=f.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(s){return e.tabs&&e.tabs[s].content}function o(s){return t===s?e.activeTabStyle:{}}return a.jsxs("div",{children:[a.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(l=e.tabs)==null?void 0:l.map((s,r)=>a.jsx("span",{className:`builder-tab-wrap ${t===r?"builder-tab-active":""}`,style:o(r),onClick:c=>{r===t&&e.collapsible?n(-1):n(r)},children:a.jsx(N,{parent:e.builderBlock.id,path:`component.options.tabs.${r}.label`,blocks:s.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},r))}),i(t)?a.jsx("div",{children:a.jsx(N,{parent:e.builderBlock.id,path:`component.options.tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const 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 we(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 Et(e){const t=f.useRef(null),[n,i]=f.useState(()=>[]),[o,l]=f.useState(()=>[]);return f.useEffect(()=>{var r;if(!((r=t.current)!=null&&r.getElementsByTagName)||typeof window=="undefined")return;const s=t.current.getElementsByTagName("script");for(let c=0;c<s.length;c++){const d=s[c];if(d.src){if(n.includes(d.src))continue;n.push(d.src);const m=document.createElement("script");m.async=!0,m.src=d.src,document.head.appendChild(m)}else if(!d.type||["text/javascript","application/javascript","application/ecmascript"].includes(d.type)){if(o.includes(d.innerText))continue;try{o.push(d.innerText),new Function(d.innerText)()}catch(m){console.warn("`CustomCode`: Error running script:",m)}}}},[]),a.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const jt={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}]},Rt=["text/javascript","application/javascript","application/ecmascript"],Pt=e=>Rt.includes(e.type);function Vt(e){const t=f.useRef(null),[n,i]=f.useState(()=>[]),[o,l]=f.useState(()=>[]),[s,r]=f.useState(()=>!1);function c(){if(!t.current||!t.current.getElementsByTagName)return;const d=t.current.getElementsByTagName("script");for(let m=0;m<d.length;m++){const u=d[m];if(u.src&&!n.includes(u.src)){n.push(u.src);const x=document.createElement("script");x.async=!0,x.src=u.src,document.head.appendChild(x)}else if(Pt(u)&&!o.includes(u.innerText))try{o.push(u.innerText),new Function(u.innerText)()}catch(x){console.warn("`Embed`: Error running script:",x)}}}return f.useEffect(()=>{t.current&&!s&&(r(!0),c())},[t.current,s]),a.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const Ft={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"}}}]},Bt=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],At=()=>{const e=process.env.NODE_ENV||"production";return Bt.includes(e)?e:"production"},Nt=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((o,l)=>o!=null?o[l]:o,e);return i===void 0||i===e?n:i};function Wt(e){var u,x;const t=f.useRef(null),[n,i]=f.useState(()=>"unsubmitted"),[o,l]=f.useState(()=>null),[s,r]=f.useState(()=>"");function c(p){var I,E;const k={...e.builderContext.rootState,...p};e.builderContext.rootSetState?(E=(I=e.builderContext).rootSetState)==null||E.call(I,k):e.builderContext.rootState=k}function d(){return g.isEditing()&&e.previewState||n}function m(p){var I;const k=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")p.preventDefault();else if(k){if(!(e.action||e.sendSubmissionsTo==="email")){p.preventDefault();return}p.preventDefault();const E=p.currentTarget,j=e.customHeaders||{};let P;const V=new FormData(E),W=Array.from(p.currentTarget.querySelectorAll("input,select,textarea")).filter(b=>!!b.name).map(b=>{let h;const y=b.name;if(b instanceof HTMLInputElement)if(b.type==="radio"){if(b.checked)return h=b.name,{key:y,value:h}}else if(b.type==="checkbox")h=b.checked;else if(b.type==="number"||b.type==="range"){const S=b.valueAsNumber;isNaN(S)||(h=S)}else b.type==="file"?h=b.files:h=b.value;else h=b.value;return{key:y,value:h}});let v=e.contentType;if(e.sendSubmissionsTo==="email"&&(v="multipart/form-data"),Array.from(W).forEach(({value:b})=>{(b instanceof File||Array.isArray(b)&&b[0]instanceof File||b instanceof FileList)&&(v="multipart/form-data")}),v!=="application/json")P=V;else{const b={};Array.from(W).forEach(({value:h,key:y})=>{L.set(b,y,h)}),P=JSON.stringify(b)}v&&v!=="multipart/form-data"&&(k&&((I=e.action)!=null&&I.includes("zapier.com"))||(j["content-type"]=v));const w=new CustomEvent("presubmit",{detail:{body:P}});if(t.current&&(t.current.dispatchEvent(w),w.defaultPrevented))return;i("sending");const F=`${At()==="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"?F:e.action,{body:P,headers:j,method:e.method||"post"}).then(async b=>{let h;const y=b.headers.get("content-type");if(y&&y.indexOf("application/json")!==-1?h=await b.json():h=await b.text(),!b.ok&&e.errorMessagePath){let S=Nt(h,e.errorMessagePath);S&&(typeof S!="string"&&(S=JSON.stringify(S)),r(S),c({formErrorMessage:S}))}if(l(h),i(b.ok?"success":"error"),b.ok){const S=new CustomEvent("submit:success",{detail:{res:b,body:h}});if(t.current){if(t.current.dispatchEvent(S),S.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const C=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(C),C.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},b=>{const h=new CustomEvent("submit:error",{detail:{error:b}});t.current&&(t.current.dispatchEvent(h),h.defaultPrevented)||(l(b),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=>m(p),...e.attributes,children:[e.builderBlock&&e.builderBlock.children?a.jsx(a.Fragment,{children:(x=(u=e.builderBlock)==null?void 0:u.children)==null?void 0:x.map((p,k)=>a.jsx(H,{block:p,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent},`form-block-${k}`))}):null,d()==="error"?a.jsx(N,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,d()==="sending"?a.jsx(N,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,d()==="error"&&o?a.jsx("pre",{className:"builder-form-error-text pre-31bf8a14",children:JSON.stringify(o,null,2)}):null,d()==="success"?a.jsx(N,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",a.jsx("style",{children:".pre-31bf8a14 { padding: 10px; color: red; text-align: center; }"})," "]})}const $t={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 Dt(e){return f.createElement("input",{...e.attributes,key:g.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 Lt={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 Mt(e){var t;return f.createElement("select",{...e.attributes,value:e.value,key:g.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name},(t=e.options)==null?void 0:t.map((n,i)=>a.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const Ot={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 Ut(e){return a.jsx("button",{type:"submit",...e.attributes,children:e.text})}const Ht={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 Kt(e){return a.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},g.isEditing()&&e.imgSrc||"default-key")}const qt={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 Ie(e){var i,o,l,s,r,c,d;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&&((l=(o=e.builderBlock)==null?void 0:o.children)!=null&&l.length))?a.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(r=(s=e.builderBlock)==null?void 0:s.children)!=null&&r.length&&e.fitContent?a.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(d=(c=e.builderBlock)==null?void 0:c.children)!=null&&d.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 _t=()=>[{component:Et,...It},{component:Vt,...jt},{component:Wt,...Ft},{component:Dt,...$t},{component:Ut,...Ot},{component:Mt,...Lt},{component:Kt,...Ht},{component:Ie,...qt}],re=()=>[{component:de,...gt},{component:ve,...bt},{component:ke,...xt},{component:Ce,...yt},{component:Te,...pt},{component:vt,...St},{component:Ve,...kt},{component:we,...wt},{component:Tt,...Ct},..._t()],zt=`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
- }`,Mt=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
111
+ }`,Jt=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
112
112
  if (!navigator.cookieEnabled) {
113
113
  return;
114
114
  }
@@ -142,29 +142,29 @@
142
142
  thisScriptEl?.remove();
143
143
  }
144
144
  return;
145
- }`,we="builderIoAbTest",Ie="builderIoRenderContent",K=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Ot=({canTrack:e,content:t})=>!(!(K(t).length>0)||!e||h.isBrowser()),Ut=e=>e==="react"||e==="reactNative",Te=Ut(h.TARGET),Ht=()=>`
146
- window.${we} = ${Lt}
147
- window.${Ie} = ${Mt}
148
- `,Kt=(e,t)=>`
149
- window.${we}(
150
- "${t}",${JSON.stringify(e)}, ${Te}
151
- )`,qt=({contentId:e,variationId:t})=>`window.${Ie}(
152
- "${t}", "${e}", ${Te}
153
- )`;function G(e){return o.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id})}function ae(e){return Math.round(e*1e3)/1e3}const _t=(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},zt=e=>_t(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),oe=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,a=e.clientY-n.top,s=ae(i/n.width),r=ae(a/n.height);return{x:s,y:r}},Jt=e=>{const t=e.target,n=t&&zt(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?oe({event:e,target:t}):void 0,builderTargetOffset:n?oe({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}};function Yt(e){var E,S,C,R,j,B,W;const t=f.useRef(null);function n(u){var I,y;const b={...e.builderContextSignal.rootState,...u};e.builderContextSignal.rootSetState?(y=(I=e.builderContextSignal).rootSetState)==null||y.call(I,b):e.setBuilderContextSignal(k=>({...k,rootState:b}))}function i(u){var I,y,k,P,N;const b={...e.builderContextSignal.content,...u,data:{...(I=e.builderContextSignal.content)==null?void 0:I.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(V=>({...V,content:b}))}const[a,s]=f.useState(()=>e.contentWrapper||"div");function r(u){return h.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:b=>{var k;const{breakpoints:I,contentId:y}=b;!y||y!==((k=e.builderContextSignal.content)==null?void 0:k.id)||I&&i({meta:{breakpoints:I}})},animation:b=>{me(b)},contentUpdate:b=>{i(b)}}})(u)}function l(){var b,I;const u=(I=(b=e.builderContextSignal.content)==null?void 0:b.data)==null?void 0:I.jsCode;u&&O({code:u,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!1})}const[d,c]=f.useState(()=>({})),[m,g]=f.useState(()=>({})),[x,p]=f.useState(()=>!1);function v(u){var b,I;if(e.builderContextSignal.content){const y=(b=e.builderContextSignal.content)==null?void 0:b.testVariationId,k=(I=e.builderContextSignal.content)==null?void 0:I.id;h._track({type:"click",canTrack:h.getDefaultCanTrack(e.canTrack),contentId:k,apiKey:e.apiKey,variationId:y!==k?y:void 0,...Jt(u),unique:!x})}x||p(!0)}function w(){var b,I,y;const u=(y=(I=(b=e.builderContextSignal.content)==null?void 0:b.data)==null?void 0:I.httpRequests)!=null?y:{};Object.entries(u).forEach(([k,P])=>{if(!P||m[k]||d[k]&&!h.isEditing())return;m[k]=!0;const N=P.replace(/{{([^}]+)}}/g,(V,Re)=>String(O({code:Re,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!0})));h.fetch(N).then(V=>V.json()).then(V=>{n({[k]:V}),d[k]=!0}).catch(V=>{console.error("error fetching dynamic data",P,V)}).finally(()=>{m[k]=!1})})}function T(){h.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:h.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}return f.useEffect(()=>{var u,b;if(h.isBrowser()){if(h.isEditing()&&(window.addEventListener("message",r),h.registerInsertMenu(),h.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=h.createRegisterComponentMessage(y);(P=window.parent)==null||P.postMessage(k,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",T)),e.builderContextSignal.content&&h.getDefaultCanTrack(e.canTrack)){const y=(u=e.builderContextSignal.content)==null?void 0:u.testVariationId,k=(b=e.builderContextSignal.content)==null?void 0:b.id,P=e.apiKey;h._track({type:"impression",canTrack:!0,contentId:k,apiKey:P,variationId:y!==k?y:void 0})}if(h.isPreviewing()&&!h.isEditing()){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)&&h.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(V=>{V&&i(V)})}}},[]),f.useEffect(()=>{e.apiKey||h.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()},[]),f.useEffect(()=>{e.content&&i(e.content)},[e.content]),f.useEffect(()=>{l()},[(S=(E=e.builderContextSignal.content)==null?void 0:E.data)==null?void 0:S.jsCode]),f.useEffect(()=>{w()},[(R=(C=e.builderContextSignal.content)==null?void 0:C.data)==null?void 0:R.httpRequests]),f.useEffect(()=>{T()},[e.builderContextSignal.rootState]),f.useEffect(()=>{e.data&&n(e.data)},[e.data]),f.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),f.useEffect(()=>()=>{h.isBrowser()&&(window.removeEventListener("message",r),window.removeEventListener("builder:component:stateChangeListenerActivated",T))},[]),o.jsx(_.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?o.jsx(a,{ref:t,onClick:u=>v(u),"builder-content-id":(j=e.builderContextSignal.content)==null?void 0:j.id,"builder-model":e.model,...e.showContent?{}:{hidden:!0,"aria-hidden":!0},...e.contentWrapperProps,className:`variant-${((B=e.content)==null?void 0:B.testVariationId)||((W=e.content)==null?void 0:W.id)}`,children:e.children}):null})}const Gt=e=>{var s,r;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(r=e.fileUrl)!=null?r:(s=e==null?void 0:e.files)==null?void 0:s.regular;let a="";if(i&&t&&n&&(a+=`
145
+ }`,Ee="builderIoAbTest",je="builderIoRenderContent",q=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Yt=({canTrack:e,content:t})=>!(!(q(t).length>0)||!e||g.isBrowser()),Gt=e=>e==="react"||e==="reactNative",Re=Gt(g.TARGET),Qt=()=>`
146
+ window.${Ee} = ${zt}
147
+ window.${je} = ${Jt}
148
+ `,Xt=(e,t)=>`
149
+ window.${Ee}(
150
+ "${t}",${JSON.stringify(e)}, ${Re}
151
+ )`,Zt=({contentId:e,variationId:t})=>`window.${je}(
152
+ "${t}", "${e}", ${Re}
153
+ )`;function Z(e){return a.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id})}function se(e){return Math.round(e*1e3)/1e3}const en=(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},tn=e=>en(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),le=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,o=e.clientY-n.top,l=se(i/n.width),s=se(o/n.height);return{x:l,y:s}},nn=e=>{const t=e.target,n=t&&tn(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?le({event:e,target:t}):void 0,builderTargetOffset:n?le({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},on=e=>{var l,s;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(s=e.fileUrl)!=null?s:(l=e==null?void 0:e.files)==null?void 0:l.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');
157
157
  font-display: fallback;
158
158
  font-weight: 400;
159
159
  }
160
- `.trim()),e.files)for(const l in e.files){if(!(String(Number(l))===l))continue;const c=e.files[l];c&&c!==i&&(a+=`
160
+ `.trim()),e.files)for(const r in e.files){if(!(String(Number(r))===r))continue;const d=e.files[r];d&&d!==i&&(o+=`
161
161
  @font-face {
162
162
  font-family: "${t}";
163
- src: url('${c}') format('woff2');
163
+ src: url('${d}') format('woff2');
164
164
  font-display: fallback;
165
- font-weight: ${l};
165
+ font-weight: ${r};
166
166
  }
167
- `.trim())}return a},Qt=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Gt(n)))==null?void 0:t.join(" "))||""},Xt=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",Zt=`
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:"",sn=`
168
168
  .builder-button {
169
169
  all: unset;
170
170
  }
@@ -181,8 +181,8 @@ font-weight: ${l};
181
181
  text-align: inherit;
182
182
  font-family: inherit;
183
183
  }
184
- `,en=e=>e?"":Zt;function tn(e){const[t,n]=f.useState(()=>`
185
- ${Xt({cssCode:e.cssCode,contentId:e.contentId})}
186
- ${Qt({customFonts:e.customFonts})}
187
- ${en(e.isNestedRender)}
188
- `.trim());return o.jsx(z,{id:"builderio-content",styles:t})}const nn=({content:e,data:t,locale:n})=>{var s,r,l;const i={},a=((s=e==null?void 0:e.data)==null?void 0:s.state)||{};return(l=(r=e==null?void 0:e.data)==null?void 0:r.inputs)==null||l.forEach(d=>{d.name&&d.defaultValue!==void 0&&(i[d.name]=d.defaultValue)}),{...i,...a,...t,...n?{locale:n}:{}}},an=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function re(e){var d,c,m,g,x,p,v;const[t,n]=f.useState(()=>{var w,T;return qt({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[a,s]=f.useState(()=>[...ie(),...e.customComponents||[]].reduce((w,{component:T,...E})=>({...w,[E.name]:{component:T,...h.serializeComponentInfo(E)}}),{})),[r,l]=f.useState(()=>({content:an({content:e.content,data:e.data}),localState:void 0,rootState:nn({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...ie(),...e.customComponents||[]].reduce((w,{component:T,...E})=>({...w,[E.name]:h.serializeComponentInfo(E)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return o.jsx(le.Provider,{value:{registeredComponents:a},children:o.jsxs(Yt,{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:r,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,linkComponent:e.linkComponent,trustedHosts:e.trustedHosts,setBuilderContextSignal:l,children:[e.isSsrAbTest?o.jsx(G,{id:"builderio-variant-visibility",scriptStr:t}):null,o.jsx(tn,{isNestedRender:e.isNestedRender,contentId:(d=r.content)==null?void 0:d.id,cssCode:(m=(c=r.content)==null?void 0:c.data)==null?void 0:m.cssCode,customFonts:(x=(g=r.content)==null?void 0:g.data)==null?void 0:x.customFonts}),o.jsx(A,{blocks:(v=(p=r.content)==null?void 0:p.data)==null?void 0:v.blocks,context:r,registeredComponents:a,linkComponent:e.linkComponent})]})})}function Ee(e){var r;const[t,n]=f.useState(()=>Ot({canTrack:h.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var l;return Kt(K(e.content).map(d=>({id:d.testVariationId,testRatio:d.testRatio})),((l=e.content)==null?void 0:l.id)||"")}function a(){return K(e.content).map(l=>`.variant-${l.testVariationId} { display: none; } `).join("")}function s(){var l;return t?{...e.content,testVariationId:(l=e.content)==null?void 0:l.id}:h.handleABTestingSync({item:e.content,canTrack:h.getDefaultCanTrack(e.canTrack)})}return f.useEffect(()=>{},[]),o.jsxs(o.Fragment,{children:[!e.isNestedRender&&h.TARGET!=="reactNative"?o.jsx(G,{id:"builderio-init-variants-fns",scriptStr:Ht()}):null,t?o.jsxs(o.Fragment,{children:[o.jsx(z,{id:"builderio-variants",styles:a()}),o.jsx(G,{id:"builderio-variants-visibility",scriptStr:i()}),(r=K(e.content))==null?void 0:r.map(l=>o.jsx(re,{isNestedRender:e.isNestedRender,content:l,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},l.testVariationId))]}):null,o.jsx(re,{isNestedRender:e.isNestedRender,content:s(),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 on=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return h.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{h.logger.error("Could not fetch symbol content: ",n)})};function je(e){var s,r,l,d;function t(){var c,m;return[e.attributes[M()],"builder-symbol",(c=e.symbol)!=null&&c.inline?"builder-inline-symbol":void 0,(m=e.symbol)!=null&&m.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[n,i]=f.useState(()=>{var c;return(c=e.symbol)==null?void 0:c.content});function a(){n||on({symbol:e.symbol,builderContextValue:e.builderContext}).then(c=>{c&&i(c)})}return f.useEffect(()=>{},[]),f.useEffect(()=>{a()},[e.symbol]),o.jsx("div",{...e.attributes,className:t(),children:o.jsx(Ee,{isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(s=e.builderBlock)==null?void 0:s.id},customComponents:Object.values(e.builderComponents),data:{...(r=e.symbol)==null?void 0:r.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=A;exports.BuilderContext=_;exports.Button=se;exports.Columns=ye;exports.Content=Ee;exports.Fragment=pe;exports.Image=Se;exports.Section=ve;exports.Symbol=je;exports.Text=ke;exports.Video=Ce;
184
+ `,ln=e=>e?"":sn,cn=e=>`variant-${e}`;function dn(e){var P,V,W,v,w,F,b;const t=f.useRef(null);function n(h){var S,C;const y={...e.builderContextSignal.rootState,...h};e.builderContextSignal.rootSetState?(C=(S=e.builderContextSignal).rootSetState)==null||C.call(S,y):e.setBuilderContextSignal(T=>({...T,rootState:y}))}function i(h){var S,C,T,R,$;const y={...e.builderContextSignal.content,...h,data:{...(S=e.builderContextSignal.content)==null?void 0:S.data,...h==null?void 0:h.data},meta:{...(C=e.builderContextSignal.content)==null?void 0:C.meta,...h==null?void 0:h.meta,breakpoints:((T=h==null?void 0:h.meta)==null?void 0:T.breakpoints)||(($=(R=e.builderContextSignal.content)==null?void 0:R.meta)==null?void 0:$.breakpoints)}};e.setBuilderContextSignal(B=>({...B,content:y}))}function o(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[l,s]=f.useState(()=>e.contentWrapper||"div");function r(h){return g.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:y=>{var T;const{breakpoints:S,contentId:C}=y;!C||C!==((T=e.builderContextSignal.content)==null?void 0:T.id)||S&&i({meta:{breakpoints:S}})},animation:y=>{ge(y)},contentUpdate:y=>{i(y)}}})(h)}function c(){var y,S;const h=(S=(y=e.builderContextSignal.content)==null?void 0:y.data)==null?void 0:S.jsCode;h&&U({code:h,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!1})}const[d,m]=f.useState(()=>({})),[u,x]=f.useState(()=>({})),[p,k]=f.useState(()=>!1);function I(h){var y,S;if(e.builderContextSignal.content){const C=(y=e.builderContextSignal.content)==null?void 0:y.testVariationId,T=(S=e.builderContextSignal.content)==null?void 0:S.id;g._track({type:"click",canTrack:g.getDefaultCanTrack(e.canTrack),contentId:T,apiKey:e.apiKey,variationId:C!==T?C:void 0,...nn(h),unique:!p})}p||k(!0)}function E(){var y,S,C;const h=(C=(S=(y=e.builderContextSignal.content)==null?void 0:y.data)==null?void 0:S.httpRequests)!=null?C:{};Object.entries(h).forEach(([T,R])=>{if(!R||u[T]||d[T]&&!g.isEditing())return;u[T]=!0;const $=R.replace(/{{([^}]+)}}/g,(B,Fe)=>String(U({code:Fe,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState,enableCache:!0})));g.fetch($).then(B=>B.json()).then(B=>{n({[T]:B}),d[T]=!0}).catch(B=>{console.error("error fetching dynamic data",R,B)}).finally(()=>{u[T]=!1})})}function j(){g.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:g.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}return f.useEffect(()=>{var h,y;if(g.isBrowser()){if(g.isEditing()&&(window.addEventListener("message",r),g.registerInsertMenu(),g.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(C=>{var R;const T=g.createRegisterComponentMessage(C);(R=window.parent)==null||R.postMessage(T,"*")}),window.addEventListener("builder:component:stateChangeListenerActivated",j)),e.builderContextSignal.content&&g.getDefaultCanTrack(e.canTrack)){const C=(h=e.builderContextSignal.content)==null?void 0:h.testVariationId,T=(y=e.builderContextSignal.content)==null?void 0:y.id,R=e.apiKey;g._track({type:"impression",canTrack:!0,contentId:T,apiKey:R,variationId:C!==T?C:void 0})}if(g.isPreviewing()&&!g.isEditing()){const C=new URL(location.href).searchParams,T=C.get("builder.preview"),R=C.get(`builder.preview.${T}`),$=C.get("apiKey")||C.get("builder.space");T===e.model&&$===e.apiKey&&(!e.content||R===e.content.id)&&g.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(B=>{B&&i(B)})}}},[]),f.useEffect(()=>{e.apiKey||g.logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."),c(),E(),j()},[]),f.useEffect(()=>{e.content&&i(e.content)},[e.content]),f.useEffect(()=>{c()},[(V=(P=e.builderContextSignal.content)==null?void 0:P.data)==null?void 0:V.jsCode]),f.useEffect(()=>{E()},[(v=(W=e.builderContextSignal.content)==null?void 0:W.data)==null?void 0:v.httpRequests]),f.useEffect(()=>{j()},[e.builderContextSignal.rootState]),f.useEffect(()=>{e.data&&n(e.data)},[e.data]),f.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),f.useEffect(()=>()=>{g.isBrowser()&&(window.removeEventListener("message",r),window.removeEventListener("builder:component:stateChangeListenerActivated",j))},[]),a.jsx(z.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content?a.jsx(l,{ref:t,onClick:h=>I(h),"builder-content-id":(w=e.builderContextSignal.content)==null?void 0:w.id,"builder-model":e.model,...o(),...e.contentWrapperProps,className:cn(((F=e.content)==null?void 0:F.testVariationId)||((b=e.content)==null?void 0:b.id)),children:e.children}):null})}function un(e){const[t,n]=f.useState(()=>`
185
+ ${rn({cssCode:e.cssCode,contentId:e.contentId})}
186
+ ${an({customFonts:e.customFonts})}
187
+ ${ln(e.isNestedRender)}
188
+ `.trim());return a.jsx(J,{id:"builderio-content",styles:t})}const mn=({content:e,data:t,locale:n})=>{var l,s,r;const i={},o=((l=e==null?void 0:e.data)==null?void 0:l.state)||{};return(r=(s=e==null?void 0:e.data)==null?void 0:s.inputs)==null||r.forEach(c=>{c.name&&c.defaultValue!==void 0&&(i[c.name]=c.defaultValue)}),{...i,...o,...t,...n?{locale:n}:{}}},fn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function ce(e){var c,d,m,u,x,p,k;const[t,n]=f.useState(()=>{var I,E;return Zt({variationId:(I=e.content)==null?void 0:I.testVariationId,contentId:(E=e.content)==null?void 0:E.id})});function i(I){r(E=>({...E,rootState:I}))}const[o,l]=f.useState(()=>[...re(),...e.customComponents||[]].reduce((I,{component:E,...j})=>({...I,[j.name]:{component:E,...g.serializeComponentInfo(j)}}),{})),[s,r]=f.useState(()=>({content:fn({content:e.content,data:e.data}),localState:void 0,rootState:mn({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...re(),...e.customComponents||[]].reduce((I,{component:E,...j})=>({...I,[j.name]:g.serializeComponentInfo(j)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{}}));return a.jsx(ue.Provider,{value:{registeredComponents:o},children:a.jsxs(dn,{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:r,children:[e.isSsrAbTest?a.jsx(Z,{id:"builderio-variant-visibility",scriptStr:t}):null,a.jsx(un,{isNestedRender:e.isNestedRender,contentId:(c=s.content)==null?void 0:c.id,cssCode:(m=(d=s.content)==null?void 0:d.data)==null?void 0:m.cssCode,customFonts:(x=(u=s.content)==null?void 0:u.data)==null?void 0:x.customFonts}),a.jsx(N,{blocks:(k=(p=s.content)==null?void 0:p.data)==null?void 0:k.blocks,context:s,registeredComponents:o,linkComponent:e.linkComponent})]})})}function Pe(e){var s;const[t,n]=f.useState(()=>Yt({canTrack:g.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var r;return Xt(q(e.content).map(c=>({id:c.testVariationId,testRatio:c.testRatio})),((r=e.content)==null?void 0:r.id)||"")}function o(){return q(e.content).map(r=>`.variant-${r.testVariationId} { display: none; } `).join("")}function l(){var r;return t?{...e.content,testVariationId:(r=e.content)==null?void 0:r.id}:g.handleABTestingSync({item:e.content,canTrack:g.getDefaultCanTrack(e.canTrack)})}return f.useEffect(()=>{},[]),a.jsxs(a.Fragment,{children:[!e.isNestedRender&&g.TARGET!=="reactNative"?a.jsx(Z,{id:"builderio-init-variants-fns",scriptStr:Qt()}):null,t?a.jsxs(a.Fragment,{children:[a.jsx(J,{id:"builderio-variants",styles:o()}),a.jsx(Z,{id:"builderio-variants-visibility",scriptStr:i()}),(s=q(e.content))==null?void 0:s.map(r=>a.jsx(ce,{isNestedRender:e.isNestedRender,content:r,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},r.testVariationId))]}):null,a.jsx(ce,{isNestedRender:e.isNestedRender,content:l(),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 hn=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return g.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{g.logger.error("Could not fetch symbol content: ",n)})};function Ve(e){var r,c,d,m;function t(){return"div"}function n(){return"div"}function i(){var u,x;return[e.attributes[O()],"builder-symbol",(u=e.symbol)!=null&&u.inline?"builder-inline-symbol":void 0,(x=e.symbol)!=null&&x.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[o,l]=f.useState(()=>{var u;return(u=e.symbol)==null?void 0:u.content});function s(){o||hn({symbol:e.symbol,builderContextValue:e.builderContext}).then(u=>{u&&l(u)})}return f.useEffect(()=>{},[]),f.useEffect(()=>{s()},[e.symbol]),a.jsx("div",{...e.attributes,className:i(),children:a.jsx(Pe,{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:{...(c=e.symbol)==null?void 0:c.data,...e.builderContext.localState,...(d=o==null?void 0:o.data)==null?void 0:d.state},model:(m=e.symbol)==null?void 0:m.model,content:o,linkComponent:e.builderLinkComponent,blocksWrapper:t(),contentWrapper:n()})})}exports.Blocks=N;exports.BuilderContext=z;exports.Button=de;exports.Columns=ve;exports.Content=Pe;exports.Fragment=ke;exports.Image=Ce;exports.Section=Te;exports.Symbol=Ve;exports.Text=we;exports.Video=Ie;