@builder.io/sdk-react 3.0.7 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks-exports.cjs +32 -32
- package/lib/browser/blocks-exports.mjs +837 -796
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-762e29e0.cjs → server-entry-0e0758cb.cjs} +2 -2
- package/lib/browser/{server-entry-20c79b90.js → server-entry-403d3877.js} +33 -16
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-071aa4f9.cjs → accordion-02a74a7b.cjs} +1 -1
- package/lib/edge/{accordion-22c2c037.js → accordion-46e5b47a.js} +1 -1
- package/lib/edge/{blocks-2989e629.js → blocks-27f4c960.js} +2 -2
- package/lib/edge/{blocks-d3f37507.cjs → blocks-43b7cd64.cjs} +1 -1
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-a2cc6565.cjs → button-b1f2e20e.cjs} +1 -1
- package/lib/edge/{button-2b5270c4.js → button-c26a8cc8.js} +2 -2
- package/lib/edge/{columns-b7240242.cjs → columns-5a3e9ac8.cjs} +1 -1
- package/lib/edge/{columns-21b9be25.js → columns-9a6cd1b4.js} +3 -3
- package/lib/edge/{content-variants-88f4dc64.js → content-variants-3085ec74.js} +291 -286
- package/lib/edge/content-variants-eff73ca9.cjs +134 -0
- package/lib/edge/{form-77687883.cjs → form-bf3ca65d.cjs} +1 -1
- package/lib/edge/{form-d29f3cc0.js → form-f2aa1c12.js} +3 -3
- package/lib/edge/{get-class-prop-name-f597545d.cjs → get-class-prop-name-7cdcaf94.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-dbc5d99c.js → get-class-prop-name-e41a3976.js} +1 -1
- package/lib/edge/{img-fed70928.js → img-2a060e61.js} +1 -1
- package/lib/edge/{img-03f9002b.cjs → img-2c718c5f.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-1e548fd0.cjs → input-213f973c.cjs} +1 -1
- package/lib/edge/{input-083c3c35.js → input-f270ae3b.js} +1 -1
- package/lib/edge/{personalization-container-dde10a09.cjs → personalization-container-b03bc073.cjs} +1 -1
- package/lib/edge/{personalization-container-bcff3433.js → personalization-container-b85b14c3.js} +4 -4
- package/lib/edge/{select-21e33225.cjs → select-d6ff55b2.cjs} +1 -1
- package/lib/edge/{select-9f22c2ba.js → select-e12e1a87.js} +1 -1
- package/lib/edge/{server-entry-43a6f5be.js → server-entry-b94c45af.js} +35 -18
- package/lib/edge/{server-entry-ac35a5c8.cjs → server-entry-d0313f00.cjs} +2 -2
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-ca171e8c.js → slot-2670ac48.js} +3 -3
- package/lib/edge/{slot-a9f5d6c0.cjs → slot-5ee0ac5d.cjs} +1 -1
- package/lib/edge/symbol-7e58faf5.cjs +1 -0
- package/lib/edge/{symbol-8f6ff028.js → symbol-a0b2e083.js} +25 -25
- package/lib/edge/{tabs-880c9088.cjs → tabs-1f475bd4.cjs} +1 -1
- package/lib/edge/{tabs-6b67fca2.js → tabs-931291c4.js} +3 -3
- package/lib/edge/{video-a3f10439.js → video-52df64e2.js} +54 -17
- package/lib/edge/video-cc58dd83.cjs +1 -0
- package/lib/node/blocks-exports.cjs +32 -32
- package/lib/node/blocks-exports.mjs +820 -779
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/node/{server-entry-0b433783.cjs → server-entry-24943b12.cjs} +2 -2
- package/lib/node/{server-entry-6626257d.js → server-entry-a017e97a.js} +33 -16
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-5cb298bf.js → setIvm-0a7e7bf0.js} +1 -1
- package/lib/node/{setIvm-49abbae6.cjs → setIvm-dcd69a69.cjs} +1 -1
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-11e8399e.cjs → should-force-browser-runtime-in-node-0ca8d8b1.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-94f1a5b3.js → should-force-browser-runtime-in-node-c51ac820.js} +1 -1
- package/package.json +1 -1
- package/types/components/content-variants/content-variants.types.d.ts +2 -2
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/helpers/subscribe-to-editor.d.ts +15 -13
- package/types/scripts/init-editing.d.ts +3 -1
- package/lib/edge/content-variants-fdd5ee50.cjs +0 -134
- package/lib/edge/symbol-a2015c7e.cjs +0 -1
- package/lib/edge/video-4ecfd08b.cjs +0 -1
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./server-entry-762e29e0.cjs"),s=require("react/jsx-runtime"),p=require("react");function $e(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Oe=$e(p),Le=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Ue=e=>typeof e=="string"&&Le.has(e.toLowerCase());function X(e){return s.jsx(s.Fragment,{children:Ue(e.TagName)?s.jsx(s.Fragment,{children:s.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):s.jsx(s.Fragment,{children:typeof e.TagName=="string"?s.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):s.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const W=()=>{switch(g.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function me(e){function t(){return{...e.attributes,[W()]:`${e.link?"":"builder-button"} ${e.attributes[W()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return s.jsx(X,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const _=p.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""}),fe=p.createContext({registeredComponents:{}}),ge=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((a,o)=>a!=null?a[o]:a,e);return i===void 0||i===e?n:i},_e=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),qe=()=>({isEditing:g.isEditing(),isBrowser:g.isBrowser(),isServer:!g.isBrowser(),getUserAttributes:()=>g.getUserAttributes()}),Me=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function he({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,a)=>{if(t&&a in t)return t[a];const o=i[a];return typeof o=="object"&&o!==null?he({rootState:o,localState:void 0,rootSetState:n?r=>{i[a]=r,n(i)}:void 0}):o},set:(i,a,o)=>{if(t&&a in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[a]=o,n==null||n(i),!0}})}const ne=({code:e,builder:t,context:n,event:i,localState:a,rootSetState:o,rootState:r})=>{const l=_e({builder:t,context:n,event:i,state:he({rootState:r,localState:a,rootSetState:o})});return new Function(...l.map(([u])=>u),e)(...l.map(([,u])=>u))};function He(){var e;return typeof process!="undefined"&&g.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const ze=({shouldLogWarning:e})=>{var a;if(!He())return!1;const t=process.arch==="arm64",n=process.version.startsWith("v20"),i=(a=process.env.NODE_OPTIONS)==null?void 0:a.includes("--no-node-snapshot");return t&&n&&!i?(e&&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},Ke=e=>(g.isBrowser()||ze({shouldLogWarning:!0}),ne(e)),Je=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,Ge=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,Qe=e=>{var t,n,i,a,o,r;return((i=(n=(t=Je.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:i.slice(1))||((r=(o=(a=Ge.exec(e.trim()))==null?void 0:a.groups)==null?void 0:o.getPath)==null?void 0:r.slice(1))};function A({code:e,context:t,localState:n,rootState:i,rootSetState:a,event:o,isExpression:r=!0}){if(e.trim()==="")return;const l=Qe(e.trim());if(l)return ge({...i,...n},l);const u={code:Me(e,{isExpression:r}),builder:qe(),context:t,event:o,rootSetState:a,rootState:i,localState:n};try{return Ke(u)}catch(c){g.logger.error("Failed code evaluation: "+c.message,{code:e});return}}function Ye(e,t){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,...Xe(e,t)}}const Xe=(e,t)=>{var n,i;if(((n=e.component)==null?void 0:n.name)==="Text"&&((i=e.component.options)!=null&&i.text)&&typeof e.component.options.text=="string")return{...e.component.options,text:e.component.options.text.replace(/{{([^}]+)}}/g,(a,o)=>A({code:o,context:t,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState}))}};function Ze(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}function L(e,t,n=null,i=null,a=new WeakSet){if(e==null||typeof e!="object"){t(e,o=>{n!==null&&i!==null&&(n[i]=o)});return}a.has(e)||(a.add(e),Array.isArray(e)?e.forEach((o,r)=>{t(o,u=>{e[r]=u}),L(o,t,e,r,a)}):Object.entries(e).forEach(([o,r])=>{t(r,u=>{e[o]=u}),L(r,t,e,o,a)}))}function be(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function et(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return L(e,n=>{if(be(n)){t=!0;return}}),t}function tt(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(L(e,(n,i)=>{var a;be(n)&&i((a=n[t])!=null?a:void 0)}),e)}function nt(e,t){var n,i;return(n=e.component)!=null&&n.options&&et((i=e.component)==null?void 0:i.options)&&(t||console.warn("[Builder.io] In order to use localized fields in Builder, you must pass a locale prop to the BuilderComponent or to options object while fetching the content to resolve localized fields. Learn more: https://www.builder.io/c/docs/localization-inline#targeting-and-inline-localization"),e.component.options=tt(e.component.options,t!=null?t:"Default")),e}const Z=e=>JSON.parse(JSON.stringify(e)),pe=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((a,o,r)=>Object(a[o])===a[o]?a[o]:a[o]=Math.abs(Number(i[r+1]))>>0===+i[r+1]?[]:{},e)[i[i.length-1]]=n,e};function Y(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>Y(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=Y(e[n]));return t}const it=["svelte","vue","angular","qwik","solid"].includes(g.TARGET),at=e=>{if(it){const t=Z(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=Y(Ze(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},ot=({block:e,context:t,localState:n,rootState:i,rootSetState:a})=>{if(!e.bindings)return e;const o=at(e);for(const r in e.bindings){const l=e.bindings[r],u=A({code:l,localState:n,rootState:i,rootSetState:a,context:t});pe(o,r,u)}return o};function rt({block:e,context:t,localState:n,rootState:i,rootSetState:a}){let o=nt(e,i.locale);return o=o,ot({block:o,localState:n,rootState:i,rootSetState:a,context:t})}const q=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function st(e,t,n={}){let i,a,o,r=null,l=0;const u=function(){l=n.leading===!1?0:Date.now(),r=null,o=e.apply(i,a),r||(i=a=null)};return function(){const c=Date.now();!l&&n.leading===!1&&(l=c);const h=t-(c-l);return i=this,a=arguments,h<=0||h>t?(r&&(clearTimeout(r),r=null),l=c,o=e.apply(i,a),r||(i=a=null)):!r&&n.trailing!==!1&&(r=setTimeout(u,h)),o}}function F(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const a=arguments[i];if(a!=null)for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n}function lt(e){for(const t of e)switch(t.trigger){case"pageLoad":ve(t);break;case"scrollInView":ut(t);break}}function ye(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function xe(e,t){const n=ct(e),i=getComputedStyle(t),a=e.steps[0].styles,o=e.steps[e.steps.length-1].styles,r=[a,o];for(const l of r)for(const u of n)u in l||(l[u]=i[u])}function ct(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 ve(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ye(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{xe(e,n),n.style.transition="none",n.style.transitionDelay="0",F(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${q(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),F(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function ut(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ye(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{xe(e,n);let i=!1,a=!1;function o(){!i&&l(n)?(i=!0,a=!0,setTimeout(()=>{F(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,F(n.style,e.steps[0].styles))}const r=st(o,200,{leading:!1});function l(h){const b=h.getBoundingClientRect(),d=window.innerHeight,f=(e.thresholdPercent||0)/100*d;return b.bottom>f&&b.top<d-f}const u=e.steps[0].styles;function c(){F(n.style,u)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${q(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",r,{capture:!0,passive:!0}),o()})}const Se=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${q(n)}: ${i};`}).filter(g.checkIsDefined),dt=e=>Se(e).join(`
|
|
2
|
-
`),
|
|
3
|
-
${
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./server-entry-0e0758cb.cjs"),s=require("react/jsx-runtime"),b=require("react");function Oe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Le=Oe(b),Ue=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),_e=e=>typeof e=="string"&&Ue.has(e.toLowerCase());function X(e){return s.jsx(s.Fragment,{children:_e(e.TagName)?s.jsx(s.Fragment,{children:s.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):s.jsx(s.Fragment,{children:typeof e.TagName=="string"?s.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):s.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const D=()=>{switch(h.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function fe(e){function t(){return{...e.attributes,[D()]:`${e.link?"":"builder-button"} ${e.attributes[D()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return s.jsx(X,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const _=b.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""}),ge=b.createContext({registeredComponents:{}}),he=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((a,o)=>a!=null?a[o]:a,e);return i===void 0||i===e?n:i},qe=({builder:e,context:t,event:n,state:i})=>Object.entries({state:i,Builder:e,builder:e,context:t,event:n}),Me=()=>({isEditing:h.isEditing(),isBrowser:h.isBrowser(),isServer:!h.isBrowser(),getUserAttributes:()=>h.getUserAttributes()}),He=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function be({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(i,a)=>{if(t&&a in t)return t[a];const o=i[a];return typeof o=="object"&&o!==null?be({rootState:o,localState:void 0,rootSetState:n?r=>{i[a]=r,n(i)}:void 0}):o},set:(i,a,o)=>{if(t&&a in t)throw new Error("Writing to local state is not allowed as it is read-only.");return i[a]=o,n==null||n(i),!0}})}const ie=({code:e,builder:t,context:n,event:i,localState:a,rootSetState:o,rootState:r})=>{const l=qe({builder:t,context:n,event:i,state:be({rootState:r,localState:a,rootSetState:o})});return new Function(...l.map(([d])=>d),e)(...l.map(([,d])=>d))};function ze(){var e;return typeof process!="undefined"&&h.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const Ke=({shouldLogWarning:e})=>{var a;if(!ze())return!1;const t=process.arch==="arm64",n=process.version.startsWith("v20"),i=(a=process.env.NODE_OPTIONS)==null?void 0:a.includes("--no-node-snapshot");return t&&n&&!i?(e&&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},Je=e=>(h.isBrowser()||Ke({shouldLogWarning:!0}),ie(e)),Ge=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,Qe=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,Ye=e=>{var t,n,i,a,o,r;return((i=(n=(t=Ge.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:i.slice(1))||((r=(o=(a=Qe.exec(e.trim()))==null?void 0:a.groups)==null?void 0:o.getPath)==null?void 0:r.slice(1))};function A({code:e,context:t,localState:n,rootState:i,rootSetState:a,event:o,isExpression:r=!0}){if(e.trim()==="")return;const l=Ye(e.trim());if(l)return he({...i,...n},l);const d={code:He(e,{isExpression:r}),builder:Me(),context:t,event:o,rootSetState:a,rootState:i,localState:n};try{return Je(d)}catch(c){h.logger.error("Failed code evaluation: "+c.message,{code:e});return}}function Xe(e,t){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,...Ze(e,t)}}const Ze=(e,t)=>{var n,i;if(((n=e.component)==null?void 0:n.name)==="Text"&&((i=e.component.options)!=null&&i.text)&&typeof e.component.options.text=="string")return{...e.component.options,text:e.component.options.text.replace(/{{([^}]+)}}/g,(a,o)=>A({code:o,context:t,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState}))}};function et(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}function L(e,t,n=null,i=null,a=new WeakSet){if(e==null||typeof e!="object"){t(e,o=>{n!==null&&i!==null&&(n[i]=o)});return}a.has(e)||(a.add(e),Array.isArray(e)?e.forEach((o,r)=>{t(o,d=>{e[r]=d}),L(o,t,e,r,a)}):Object.entries(e).forEach(([o,r])=>{t(r,d=>{e[o]=d}),L(r,t,e,o,a)}))}function pe(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function tt(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return L(e,n=>{if(pe(n)){t=!0;return}}),t}function nt(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(L(e,(n,i)=>{var a;pe(n)&&i((a=n[t])!=null?a:void 0)}),e)}function it(e,t){var n,i;return(n=e.component)!=null&&n.options&&tt((i=e.component)==null?void 0:i.options)&&(t||console.warn("[Builder.io] In order to use localized fields in Builder, you must pass a locale prop to the BuilderComponent or to options object while fetching the content to resolve localized fields. Learn more: https://www.builder.io/c/docs/localization-inline#targeting-and-inline-localization"),e.component.options=nt(e.component.options,t!=null?t:"Default")),e}const Z=e=>JSON.parse(JSON.stringify(e)),ye=(e,t,n)=>{if(Object(e)!==e)return e;const i=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return i.slice(0,-1).reduce((a,o,r)=>Object(a[o])===a[o]?a[o]:a[o]=Math.abs(Number(i[r+1]))>>0===+i[r+1]?[]:{},e)[i[i.length-1]]=n,e};function Y(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>Y(n));if(e["@type"]==="@builder.io/sdk:Element")return e;const t={};for(const n in e)n!=="meta"&&Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=Y(e[n]));return t}const at=["svelte","vue","angular","qwik","solid"].includes(h.TARGET),ot=e=>{if(at){const t=Z(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=Y(et(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},rt=({block:e,context:t,localState:n,rootState:i,rootSetState:a})=>{if(!e.bindings)return e;const o=ot(e);for(const r in e.bindings){const l=e.bindings[r],d=A({code:l,localState:n,rootState:i,rootSetState:a,context:t});ye(o,r,d)}return o};function st({block:e,context:t,localState:n,rootState:i,rootSetState:a}){let o=it(e,i.locale);return o=o,rt({block:o,localState:n,rootState:i,rootSetState:a,context:t})}const q=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function lt(e,t,n={}){let i,a,o,r=null,l=0;const d=function(){l=n.leading===!1?0:Date.now(),r=null,o=e.apply(i,a),r||(i=a=null)};return function(){const c=Date.now();!l&&n.leading===!1&&(l=c);const g=t-(c-l);return i=this,a=arguments,g<=0||g>t?(r&&(clearTimeout(r),r=null),l=c,o=e.apply(i,a),r||(i=a=null)):!r&&n.trailing!==!1&&(r=setTimeout(d,g)),o}}function W(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const a=arguments[i];if(a!=null)for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n}function ct(e){for(const t of e)switch(t.trigger){case"pageLoad":Se(t);break;case"scrollInView":dt(t);break}}function xe(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ve(e,t){const n=ut(e),i=getComputedStyle(t),a=e.steps[0].styles,o=e.steps[e.steps.length-1].styles,r=[a,o];for(const l of r)for(const d of n)d in l||(l[d]=i[d])}function ut(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 Se(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){xe(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ve(e,n),n.style.transition="none",n.style.transitionDelay="0",W(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${q(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),W(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function dt(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){xe(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{ve(e,n);let i=!1,a=!1;function o(){!i&&l(n)?(i=!0,a=!0,setTimeout(()=>{W(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,W(n.style,e.steps[0].styles))}const r=lt(o,200,{leading:!1});function l(g){const v=g.getBoundingClientRect(),u=window.innerHeight,f=(e.thresholdPercent||0)/100*u;return v.bottom>f&&v.top<u-f}const d=e.steps[0].styles;function c(){W(n.style,d)}c(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${q(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",r,{capture:!0,passive:!0}),o()})}const ke=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${q(n)}: ${i};`}).filter(h.checkIsDefined),mt=e=>ke(e).join(`
|
|
2
|
+
`),F=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
|
|
3
|
+
${mt(n)}
|
|
4
4
|
}`;return e?`${e} {
|
|
5
5
|
${i}
|
|
6
|
-
}`:i};function
|
|
6
|
+
}`:i};function ft({style:e}){return e}const gt=({block:e,context:t})=>Ce(ft({style:e.style||{},context:t,block:e}));function Ce(e){switch(h.TARGET){case"svelte":case"vue":case"solid":case"angular":return ke(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const Te=(e,t)=>e?t?e.models&&e.models.length>0&&!e.models.includes(t):!1:!0,ht=({block:e,registeredComponents:t,model:n})=>{var o;const i=(o=e.component)==null?void 0:o.name;if(!i)return null;const a=t[i];if(!a||Te(a,n)){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?`);return}else return a},
|
|
8
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`);return}else return a},bt=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const a=A({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(a))return;const o=n.collection.split(".").pop(),r=n.itemName||(o?o+"Item":"item");return a.map((d,c)=>({context:{...t,localState:{...t.localState,$index:c,$item:d,[r]:d,[`$${r}Index`]:c}},block:i}))},pt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},yt=(e,t,n)=>{var i;return(i=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&i.builderComponents?{builderComponents:Object.fromEntries(Object.entries(t).filter(([o,r])=>!Te(r,n)))}:{}},xt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},vt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},we={xsmall:{min:0,default:160,max:320},small:{min:321,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},H=(e,t=we)=>`@media (max-width: ${t[e].max}px)`,Ie=e=>{const t=Z(we);if(!e)return t;const{xsmall:n,small:i,medium:a}=e;if(n){const d=Math.floor(n/2);t.xsmall={max:n,min:d,default:d+1}}if(!i||!a)return t;const o=n?t.xsmall.max+1:Math.floor(i/2);t.small={max:i,min:o,default:o+1};const r=t.small.max+1;t.medium={max:a,min:r,default:r+1};const l=t.medium.max+1;return t.large={max:2e3,min:l,default:l+1},t};function $(e){return s.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function St(e){function t(){const i=e.block;return h.checkIsDefined(i.hide)?!i.hide:h.checkIsDefined(i.show)?i.show:!0}function n(){var w,P,E,k,m;const i=e.block,a=i.responsiveStyles,o=e.context.content,r=Ie(((w=o==null?void 0:o.meta)==null?void 0:w.breakpoints)||{}),l=!!((E=(P=o==null?void 0:o.meta)==null?void 0:P.breakpoints)!=null&&E.xsmall),d=a==null?void 0:a.large,c=a==null?void 0:a.medium,g=a==null?void 0:a.small,v=a==null?void 0:a.xsmall,u=i.id;if(!u)return"";const S=d?F({className:u,styles:d}):"",f=c?F({className:u,styles:c,mediaQuery:H("medium",r)}):"",p=g?F({className:u,styles:g,mediaQuery:H("small",r)}):"",C=v&&l?F({className:u,styles:v,mediaQuery:H("xsmall",r)}):"",y=i.animations&&i.animations.find(x=>x.trigger==="hover");let T="";if(y){const x=((m=(k=y.steps)==null?void 0:k[1])==null?void 0:m.styles)||{};T=F({className:`${u}:hover`,styles:{...x,transition:`all ${y.duration}s ${q(y.easing)}`,transitionDelay:y.delay?`${y.delay}s`:"0s"}})||""}return[S,f,p,C,T].join(" ")}return s.jsx(s.Fragment,{children:n()&&t()?s.jsx(s.Fragment,{children:s.jsx($,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function kt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Ct=e=>`on${kt(e)}`,Tt=(e,t)=>n=>A({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function Ee(e){var i;const t={},n=(i=e.block.actions)!=null?i:{};for(const a in n){if(!n.hasOwnProperty(a))continue;const o=n[a];let r=Ct(a);if(e.stripPrefix)switch(h.TARGET){case"vue":r=r.replace("v-on:","");break;case"svelte":r=r.replace("on:","");break}t[r]=Tt(o,e)}return t}function wt({properties:e}){return e}const It=e=>({href:e.href});function ee({block:e,context:t}){var i;const n={...It(e),...e.properties,"builder-id":e.id,style:gt({block:e,context:t}),[D()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return wt({properties:n,context:t,block:e})}function Et(e){return s.jsx(X,{TagName:e.Wrapper,attributes:ee({block:e.block,context:e.context}),actionAttributes:Ee({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0}),children:e.children})}function Rt(e){return b.useEffect(()=>{},[]),s.jsx(s.Fragment,{children:e.children})}function Pt(e){function t(){return e.includeBlockProps?{...ee({block:e.block,context:e.context}),...Ee({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return s.jsx(s.Fragment,{children:e.Wrapper.load?s.jsx(s.Fragment,{children:s.jsx(Rt,{load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:t(),children:e.children})}):s.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})})}const jt=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:a,isInteractive:o,contextValue:r})=>{const l={...e,...a?{attributes:ee({block:t,context:r})}:{}};return o?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:a}:l};function ae(e){var i;const[t,n]=b.useState(()=>e.isInteractive?Pt:e.componentRef);return s.jsx(s.Fragment,{children:e.componentRef?s.jsx(s.Fragment,{children:s.jsx(t,{...jt({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=>s.jsx(M,{block:a,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},a.id))})}):null})}function oe(e){const[t,n]=b.useState(()=>e.repeatContext);return s.jsx(_.Provider,{value:t,children:s.jsx(M,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function M(e){var g,v,u,S;function t(){return bt({block:e.block,context:e.context})}const[n,i]=b.useState(()=>({value:null,update:!1}));function a(){var p;if(n.value&&!n.update&&!h.isPreviewing())return n.value;const f=(p=e.block.repeat)!=null&&p.collection?e.block:st({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context});return n.value=f,n.update=!1,f}function o(){return ht({block:a(),registeredComponents:e.registeredComponents,model:e.context.model})}function r(){var p;return e.block.tagName==="a"||((p=a().properties)==null?void 0:p.href)||a().href?e.linkComponent||"a":e.block.tagName||"div"}function l(){var C,y;if((C=e.block.repeat)!=null&&C.collection)return!!((y=t==null?void 0:t())!=null&&y.length);const f="hide"in a()?a().hide:!1;return("show"in a()?a().show:!0)&&!f}function d(){var p,C;return!((p=o==null?void 0:o())!=null&&p.component)&&!t()?(C=a().children)!=null?C:[]:[]}function c(){var f,p,C,y;return{blockChildren:(f=a().children)!=null?f:[],componentRef:(p=o==null?void 0:o())==null?void 0:p.component,componentOptions:{...Xe(a(),e.context),...xt(o(),a()),...vt(o(),e.context),...pt(o(),e.linkComponent),...yt(o(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:a(),includeBlockProps:((C=o==null?void 0:o())==null?void 0:C.noWrap)===!0,isInteractive:!((y=o==null?void 0:o())!=null&&y.isRSC&&h.TARGET==="rsc")}}return b.useEffect(()=>{const f=a().id,p=a().animations;p&&f&&ct(p.map(C=>({...C,elementId:f})))},[]),b.useEffect(()=>{n.update=!0}),s.jsx(s.Fragment,{children:l()?s.jsxs(s.Fragment,{children:[s.jsx(St,{block:a(),context:e.context}),(g=o==null?void 0:o())!=null&&g.noWrap?t()?s.jsx(s.Fragment,{children:(S=t())==null?void 0:S.map((f,p)=>s.jsx(oe,{repeatContext:f.context,block:f.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},p))}):s.jsx(ae,{componentRef:c().componentRef,componentOptions:c().componentOptions,blockChildren:c().blockChildren,context:c().context,registeredComponents:c().registeredComponents,linkComponent:c().linkComponent,builderBlock:c().builderBlock,includeBlockProps:c().includeBlockProps,isInteractive:c().isInteractive}):s.jsx(s.Fragment,{children:t()?s.jsx(s.Fragment,{children:(u=t())==null?void 0:u.map((f,p)=>s.jsx(oe,{repeatContext:f.context,block:f.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},p))}):s.jsxs(Et,{Wrapper:r(),block:a(),context:e.context,children:[s.jsx(ae,{componentRef:c().componentRef,componentOptions:c().componentOptions,blockChildren:c().blockChildren,context:c().context,registeredComponents:c().registeredComponents,linkComponent:c().linkComponent,builderBlock:c().builderBlock,includeBlockProps:c().includeBlockProps,isInteractive:c().isInteractive}),(v=d())==null?void 0:v.map(f=>s.jsx(M,{block:f,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},f.id))]})})]}):null})}function Vt(e){const t=b.useRef(null);function n(){var r;return["builder-blocks",(r=e.blocks)!=null&&r.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function i(){if(!e.path)return;const r="this.",l="component.options.";return e.path.startsWith(r)?e.path.replace(r,""):e.path.startsWith(l)?e.path:`${l}${e.path||""}`}function a(){var r,l;h.isEditing()&&!((r=e.blocks)!=null&&r.length)&&((l=window.parent)==null||l.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}function o(){var r,l;h.isEditing()&&!((r=e.blocks)!=null&&r.length)&&((l=window.parent)==null||l.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}return b.useEffect(()=>{},[]),s.jsxs(s.Fragment,{children:[s.jsx(e.BlocksWrapper,{ref:t,className:n()+" props-blocks-wrapper-2936bbfc","builder-path":i(),"builder-parent-id":e.parent,style:e.styleProp,onClick:r=>a(),onMouseEnter:r=>o(),onKeyPress:r=>a(),...e.BlocksWrapperProps,children:e.children}),s.jsx("style",{children:`.props-blocks-wrapper-2936bbfc {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: stretch;
|
|
12
|
-
}`})]})}function B(e){var i,a,o;const t=
|
|
13
|
-
@media (max-width: ${
|
|
12
|
+
}`})]})}function B(e){var i,a,o;const t=b.useContext(_),n=b.useContext(ge);return s.jsx(Vt,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,classNameProp:e.className,BlocksWrapper:((i=e.context)==null?void 0:i.BlocksWrapper)||(t==null?void 0:t.BlocksWrapper),BlocksWrapperProps:((a=e.context)==null?void 0:a.BlocksWrapperProps)||(t==null?void 0:t.BlocksWrapperProps),children:e.blocks?s.jsx(s.Fragment,{children:(o=e.blocks)==null?void 0:o.map(r=>s.jsx(M,{block:r,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||(n==null?void 0:n.registeredComponents)},r.id))}):null})}const Bt=e=>`builder-columns ${e}-breakpoints`;function Re(e){var p,C;function t(){return typeof e.space=="number"?e.space||0:20}function n(){return e.columns||[]}function i(){return e.stackColumnsAt||"tablet"}function a(y){return y.link?e.builderLinkComponent||"a":"div"}function o(y){var T;return((T=n()[y])==null?void 0:T.width)||100/n().length}function r(y){const T=o(y),w=t()*(n().length-1)*(T/100);return`calc(${T}% - ${w}px)`}function l({stackedStyle:y,desktopStyle:T}){return i()==="tablet"?y:T}function d({stackedStyle:y,desktopStyle:T}){return i()==="never"?T:y}function c(){return e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column"}function g(){return{"--flex-dir":c(),"--flex-dir-tablet":l({stackedStyle:c(),desktopStyle:"row"})}}function v(y){const T=y===0?0:t(),w=r(y),P=`${T}px`,E="100%",k=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:w,["marginLeft"]:P,"--column-width-mobile":d({stackedStyle:E,desktopStyle:w}),"--column-margin-left-mobile":d({stackedStyle:k,desktopStyle:P}),"--column-width-tablet":l({stackedStyle:E,desktopStyle:w}),"--column-margin-left-tablet":l({stackedStyle:k,desktopStyle:P})}}function u(y){var w,P;return Ie(((P=(w=e.builderContext.content)==null?void 0:w.meta)==null?void 0:P.breakpoints)||{})[y].max}function S(){const y=`.${e.builderBlock.id}-breakpoints > .builder-column`;return`
|
|
13
|
+
@media (max-width: ${u("medium")}px) {
|
|
14
14
|
.${e.builderBlock.id}-breakpoints {
|
|
15
15
|
flex-direction: var(--flex-dir-tablet);
|
|
16
16
|
align-items: stretch;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
${
|
|
19
|
+
${y} {
|
|
20
20
|
width: var(--column-width-tablet) !important;
|
|
21
21
|
margin-left: var(--column-margin-left-tablet) !important;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
@media (max-width: ${
|
|
25
|
+
@media (max-width: ${u("small")}px) {
|
|
26
26
|
.${e.builderBlock.id}-breakpoints {
|
|
27
27
|
flex-direction: var(--flex-dir);
|
|
28
28
|
align-items: stretch;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
${
|
|
31
|
+
${y} {
|
|
32
32
|
width: var(--column-width-mobile) !important;
|
|
33
33
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
`}function f(
|
|
36
|
+
`}function f(y,T){return{...y.link?{href:y.link}:{},[D()]:"builder-column",style:Ce(v(T))}}return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:Bt((p=e.builderBlock)==null?void 0:p.id)+" div-a6f3faac",style:g(),children:[s.jsx($,{id:"builderio-columns",styles:S(),nonce:e.builderContext.nonce}),(C=e.columns)==null?void 0:C.map((y,T)=>s.jsx(X,{TagName:a(y),actionAttributes:{},attributes:f(y,T),children:s.jsx(B,{path:`columns.${T}.blocks`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:y.blocks,styleProp:{flexGrow:"1"}})},T))]}),s.jsx("style",{children:`.div-a6f3faac {
|
|
37
37
|
display: flex;
|
|
38
38
|
line-height: normal;
|
|
39
|
-
}`})]})}function
|
|
39
|
+
}`})]})}function Pe(e){return s.jsx("span",{children:e.children})}function re(e){return e.replace(/http(s)?:/,"")}function At(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 Nt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return re(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],o=t.match("x")?t:`${t}x`;return re(`${i[0]}_${o}${a}`)}return null}function z(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=>`${At(e,"width",a)} ${a}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Nt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function je(e){var a,o,r,l,d,c;function t(){var u;const v=e.image||e.src;if(!v||!(typeof v=="string"&&(v.match(/builder\.io/)||v.match(/cdn\.shopify\.com/))))return e.srcset;if(!e.noWebp){if(e.srcset&&((u=e.image)!=null&&u.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),z(v)}else if(e.image&&!e.srcset)return z(v);return z(v)}}function n(){var g;return(g=t==null?void 0:t())!=null&&g.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const g={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?g:void 0}return s.jsxs(s.Fragment,{children:[s.jsxs(s.Fragment,{children:[s.jsxs("picture",{children:[n()?s.jsx("source",{type:"image/webp",srcSet:n()}):null,s.jsx("img",{loading:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",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-9dac2184",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((o=(a=e.builderBlock)==null?void 0:a.children)!=null&&o.length&&e.fitContent)?s.jsx("div",{className:"builder-image-sizer div-9dac2184",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(l=(r=e.builderBlock)==null?void 0:r.children)!=null&&l.length&&e.fitContent?s.jsx(s.Fragment,{children:e.children}):null,!e.fitContent&&((c=(d=e.builderBlock)==null?void 0:d.children)!=null&&c.length)?s.jsx("div",{className:"div-9dac2184-2",children:e.children}):null]}),s.jsx("style",{children:`.img-9dac2184 {
|
|
40
40
|
opacity: 1;
|
|
41
41
|
transition: opacity 0.2s ease-in-out;
|
|
42
42
|
}.div-9dac2184 {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
left: 0;
|
|
53
53
|
width: 100%;
|
|
54
54
|
height: 100%;
|
|
55
|
-
}`})]})}function je(e){return s.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 K={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},J={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},Nt={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[K]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[J]}],defaultValue:[{title:[K],detail:[J]},{title:[K],detail:[J]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},re=e=>e.toString();function Ft(e){var b;const[t,n]=p.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function a(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function o(){const T={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(T).filter(([f,y])=>y!==void 0))}function r(d){return`builder-accordion-title builder-accordion-title-${t.includes(d)?"open":"closed"}`}function l(d){return`builder-accordion-detail builder-accordion-detail-${t.includes(d)?"open":"closed"}`}function u(){let d=null;if(e.grid&&t.length&&document){const f=t[0];let k=document.querySelector(`.builder-accordion-title[data-index="${f}"]`);if(d=f,k){let v=k.getBoundingClientRect();for(;k=k&&k.nextElementSibling;)if(k){if(k.classList.contains("builder-accordion-detail"))continue;const C=k.getBoundingClientRect();if(C.left>v.left){const I=parseInt(k.getAttribute("data-index")||"",10);isNaN(I)||(v=C,d=I)}else break}}}return typeof d=="number"&&(d=d+1),d}function c(){const d={order:typeof u()=="number"?u():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(d).filter(([T,f])=>f!==void 0))}function h(d){t.includes(d)?n(i()?[]:t.filter(T=>T!==d)):n(i()?[d]:t.concat(d))}return s.jsx("div",{className:"builder-accordion",style:a(),children:(b=e.items)==null?void 0:b.map((d,T)=>s.jsxs(Oe.Fragment,{children:[s.jsx("div",{className:r(T),style:{...o(),...e.grid&&{width:e.gridRowWidth,order:u()!==null?re(T):re(T+1)}},"data-index":T,onClick:f=>h(T),children:s.jsx(B,{blocks:d.title,path:`items.${T}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(T)?s.jsx("div",{className:l(T),style:c(),children:s.jsx(B,{blocks:d.detail,path:`items.${T}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},T))})}const Wt={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0,shouldReceiveBuilderProps:{builderLinkComponent:!0}},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(o=>!o.get("width"))||n.reduce((l,u)=>l+u.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},$t={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},te=["jpeg","jpg","png","svg","webp","gif","jfif","pjpeg","pjp","apng","avif","tif","tiff","heif","bmp","eps","raw","cr2","nef","orf","sr2","psd","heic","dib","ai"],Ot=["mp4","webm","mkv","flv","vob","ogv","ogg","drc","gif","gifv","mng","avi","mov","qt","mts","m2ts","ts","wmv","yuv","rm","rmvb","viv","asf","amv","m4p","mpeg","mpe","m2v","m4v","svi","3gp","3g2","mxf","roq","nsv","f4v","f4p","f4a","f4b"],Lt={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:te,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((u,c)=>{const h=document.createElement("img");let b=!1;h.onload=()=>{b=!0,u(h)},h.addEventListener("error",d=>{console.warn("Image load failed",d.error),c(d.error)}),h.src=r,setTimeout(()=>{b||c(new Error("Image load timed out"))},l)})}function i(r){return Math.round(r*1e3)/1e3}const a=e.get("image"),o=e.get("aspectRatio");if(fetch(a).then(r=>r.blob()).then(r=>{r.type.includes("svg")&&e.set("noWebp",!0)}),a&&(!o||o===.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:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},Ut={name:"PersonalizationContainer",shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0},noWrap:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",canHaveChildren:!0,inputs:[{name:"variants",defaultValue:[],behavior:"personalizationVariantList",type:"list",subFields:[{name:"name",type:"text"},{name:"query",friendlyName:"Targeting rules",type:"BuilderQuery",defaultValue:[]},{name:"startDate",type:"date"},{name:"endDate",type:"date"},{name:"blocks",type:"uiBlocks",hideFromUI:!0,defaultValue:[]}]}]};function U(e){return s.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function _t(e,t,n,i){function a(c){return typeof c=="string"}function o(c){return typeof c=="number"}function r(c,h){return(()=>{const d=h.property,T=h.operator;let f=h.value;if(h&&h.property==="urlPath"&&h.value&&typeof h.value=="string"&&h.value!=="/"&&h.value.endsWith("/")&&(f=h.value.slice(0,-1)),!(d&&T))return!0;if(Array.isArray(f))return T==="isNot"?f.every(k=>r(c,{property:d,operator:T,value:k})):!!f.find(k=>r(c,{property:d,operator:T,value:k}));const y=c[d];if(Array.isArray(y))return y.includes(f);switch(T){case"is":return y===f;case"isNot":return y!==f;case"contains":return(a(y)||Array.isArray(y))&&y.includes(String(f));case"startsWith":return a(y)&&y.startsWith(String(f));case"endsWith":return a(y)&&y.endsWith(String(f));case"greaterThan":return o(y)&&o(f)&&y>f;case"lessThan":return o(y)&&o(f)&&y<f;case"greaterThanOrEqualTo":return o(y)&&o(f)&&y>=f;case"lessThanOrEqualTo":return o(y)&&o(f)&&y<=f;default:return!1}})()}const l={query:t,startDate:n,endDate:i},u=e.date&&new Date(e.date)||new Date;return l.startDate&&new Date(l.startDate)>u||l.endDate&&new Date(l.endDate)<u?!1:!l.query||!l.query.length?!0:l.query.every(c=>r(e,c))}const qt=`function getPersonalizedVariant(variants, blockId, locale) {
|
|
55
|
+
}`})]})}function Ve(e){return s.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 K={"@type":"@builder.io/sdk:Element",layerName:"Accordion item title",responsiveStyles:{large:{marginTop:"10px",position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"left",display:"flex",flexDirection:"column"}},component:{name:"Text",options:{text:"I am an accordion title. Click me!"}}}]},J={"@type":"@builder.io/sdk:Element",layerName:"Accordion item detail",responsiveStyles:{large:{position:"relative",display:"flex",alignItems:"stretch",flexDirection:"column",marginTop:"10px",paddingBottom:"10px"}},children:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{paddingTop:"50px",textAlign:"left",display:"flex",flexDirection:"column",paddingBottom:"50px"}},component:{name:"Text",options:{text:"I am an accordion detail, hello!"}}}]},Ft={name:"Builder:Accordion",canHaveChildren:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",defaultStyles:{display:"flex",flexDirection:"column",alignItems:"stretch"},inputs:[{name:"items",type:"list",broadcast:!0,subFields:[{name:"title",type:"uiBlocks",hideFromUI:!0,defaultValue:[K]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[J]}],defaultValue:[{title:[K],detail:[J]},{title:[K],detail:[J]}],showIf:e=>!e.get("useChildrenForItems")},{name:"oneAtATime",helperText:"Only allow opening one at a time (collapse all others when new item openned)",type:"boolean",defaultValue:!1},{name:"grid",helperText:"Display as a grid",type:"boolean",defaultValue:!1},{name:"gridRowWidth",helperText:"Display as a grid",type:"string",showIf:e=>e.get("grid"),defaultValue:"25%"},{name:"useChildrenForItems",type:"boolean",helperText:"Use child elements for each slide, instead of the array. Useful for dynamically repeating items",advanced:!0,defaultValue:!1,onChange:e=>{e.get("useChildrenForItems")===!0&&e.set("items",[])}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},se=e=>e.toString();function Wt(e){var v;const[t,n]=b.useState(()=>[]);function i(){return!!(e.grid||e.oneAtATime)}function a(){return{display:"flex",alignItems:"stretch",flexDirection:"column",...e.grid&&{flexDirection:"row",alignItems:"flex-start",flexWrap:"wrap"}}}function o(){const S={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(S).filter(([f,p])=>p!==void 0))}function r(u){return`builder-accordion-title builder-accordion-title-${t.includes(u)?"open":"closed"}`}function l(u){return`builder-accordion-detail builder-accordion-detail-${t.includes(u)?"open":"closed"}`}function d(){let u=null;if(e.grid&&t.length&&document){const f=t[0];let C=document.querySelector(`.builder-accordion-title[data-index="${f}"]`);if(u=f,C){let y=C.getBoundingClientRect();for(;C=C&&C.nextElementSibling;)if(C){if(C.classList.contains("builder-accordion-detail"))continue;const T=C.getBoundingClientRect();if(T.left>y.left){const w=parseInt(C.getAttribute("data-index")||"",10);isNaN(w)||(y=T,u=w)}else break}}}return typeof u=="number"&&(u=u+1),u}function c(){const u={order:typeof d()=="number"?d():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(u).filter(([S,f])=>f!==void 0))}function g(u){t.includes(u)?n(i()?[]:t.filter(S=>S!==u)):n(i()?[u]:t.concat(u))}return s.jsx("div",{className:"builder-accordion",style:a(),children:(v=e.items)==null?void 0:v.map((u,S)=>s.jsxs(Le.Fragment,{children:[s.jsx("div",{className:r(S),style:{...o(),...e.grid&&{width:e.gridRowWidth,order:d()!==null?se(S):se(S+1)}},"data-index":S,onClick:f=>g(S),children:s.jsx(B,{blocks:u.title,path:`items.${S}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(S)?s.jsx("div",{className:l(S),style:c(),children:s.jsx(B,{blocks:u.detail,path:`items.${S}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},S))})}const Dt={name:"Core:Button",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",defaultStyles:{appearance:"none",paddingTop:"15px",paddingBottom:"15px",paddingLeft:"25px",paddingRight:"25px",backgroundColor:"#000000",color:"white",borderRadius:"4px",textAlign:"center",cursor:"pointer"},inputs:[{name:"text",type:"text",defaultValue:"Click me!",bubble:!0},{name:"link",type:"url",bubble:!0},{name:"openLinkInNewTab",type:"boolean",defaultValue:!1,friendlyName:"Open link in new tab"}],static:!0,noWrap:!0,shouldReceiveBuilderProps:{builderLinkComponent:!0}},$t={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(o=>!o.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}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Ot={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},te=["jpeg","jpg","png","svg","webp","gif","jfif","pjpeg","pjp","apng","avif","tif","tiff","heif","bmp","eps","raw","cr2","nef","orf","sr2","psd","heic","dib","ai"],Lt=["mp4","webm","mkv","flv","vob","ogv","ogg","drc","gif","gifv","mng","avi","mov","qt","mts","m2ts","ts","wmv","yuv","rm","rmvb","viv","asf","amv","m4p","mpeg","mpe","m2v","m4v","svi","3gp","3g2","mxf","roq","nsv","f4v","f4p","f4a","f4b"],Ut={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:te,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 g=document.createElement("img");let v=!1;g.onload=()=>{v=!0,d(g)},g.addEventListener("error",u=>{console.warn("Image load failed",u.error),c(u.error)}),g.src=r,setTimeout(()=>{v||c(new Error("Image load timed out"))},l)})}function i(r){return Math.round(r*1e3)/1e3}const a=e.get("image"),o=e.get("aspectRatio");if(fetch(a).then(r=>r.blob()).then(r=>{r.type.includes("svg")&&e.set("noWebp",!0)}),a&&(!o||o===.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:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},_t={name:"PersonalizationContainer",shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0},noWrap:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",canHaveChildren:!0,inputs:[{name:"variants",defaultValue:[],behavior:"personalizationVariantList",type:"list",subFields:[{name:"name",type:"text"},{name:"query",friendlyName:"Targeting rules",type:"BuilderQuery",defaultValue:[]},{name:"startDate",type:"date"},{name:"endDate",type:"date"},{name:"blocks",type:"uiBlocks",hideFromUI:!0,defaultValue:[]}]}]};function U(e){return s.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function qt(e,t,n,i){function a(c){return typeof c=="string"}function o(c){return typeof c=="number"}function r(c,g){return(()=>{const u=g.property,S=g.operator;let f=g.value;if(g&&g.property==="urlPath"&&g.value&&typeof g.value=="string"&&g.value!=="/"&&g.value.endsWith("/")&&(f=g.value.slice(0,-1)),!(u&&S))return!0;if(Array.isArray(f))return S==="isNot"?f.every(C=>r(c,{property:u,operator:S,value:C})):!!f.find(C=>r(c,{property:u,operator:S,value:C}));const p=c[u];if(Array.isArray(p))return p.includes(f);switch(S){case"is":return p===f;case"isNot":return p!==f;case"contains":return(a(p)||Array.isArray(p))&&p.includes(String(f));case"startsWith":return a(p)&&p.startsWith(String(f));case"endsWith":return a(p)&&p.endsWith(String(f));case"greaterThan":return o(p)&&o(f)&&p>f;case"lessThan":return o(p)&&o(f)&&p<f;case"greaterThanOrEqualTo":return o(p)&&o(f)&&p>=f;case"lessThanOrEqualTo":return o(p)&&o(f)&&p<=f;default:return!1}})()}const l={query:t,startDate:n,endDate:i},d=e.date&&new Date(e.date)||new Date;return l.startDate&&new Date(l.startDate)>d||l.endDate&&new Date(l.endDate)<d?!1:!l.query||!l.query.length?!0:l.query.every(c=>r(e,c))}const Mt=`function getPersonalizedVariant(variants, blockId, locale) {
|
|
56
56
|
if (!navigator.cookieEnabled) {
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
} else if (variants && variants.length > 0) {
|
|
106
106
|
removeVariants();
|
|
107
107
|
}
|
|
108
|
-
}`,
|
|
108
|
+
}`,Ht=`function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
|
|
109
109
|
function isString(val) {
|
|
110
110
|
return typeof val === 'string';
|
|
111
111
|
}
|
|
@@ -183,13 +183,13 @@
|
|
|
183
183
|
return item.query.every(filter => {
|
|
184
184
|
return objectMatchesQuery(userAttributes, filter);
|
|
185
185
|
});
|
|
186
|
-
}`;function
|
|
186
|
+
}`;function zt(e,t){return!(!(e&&e.length>0)||!t||h.isBrowser())}function Kt({variants:e,previewingIndex:t,isHydrated:n,filteredVariants:i,fallbackBlocks:a}){var r;const o={blocks:a!=null?a:[],path:"this.children"};if(n&&h.isEditing())return typeof t=="number"&&t<((r=e==null?void 0:e.length)!=null?r:0)?{blocks:e[t].blocks,path:`component.options.variants.${t}.blocks`}:o;if(h.isBrowser()){const l=i==null?void 0:i[0];if(l)return{blocks:l.blocks,path:`component.options.variants.${e==null?void 0:e.indexOf(l)}.blocks`}}return o}const Jt=(e,t,n)=>`
|
|
187
187
|
(function() {
|
|
188
|
+
${Ht}
|
|
188
189
|
${Mt}
|
|
189
|
-
${qt}
|
|
190
190
|
getPersonalizedVariant(${JSON.stringify(e)}, "${t}"${n?`, "${n}"`:""})
|
|
191
191
|
})();
|
|
192
|
-
`;function Jt(e){var y,k,v,C,I,P,R;const t=p.useRef(null),[n,i]=p.useState(()=>g.userAttributesService.getUserAttributes()),[a,o]=p.useState(()=>{var S,m,x;return Kt(e.variants,((S=e.builderBlock)==null?void 0:S.id)||"none",(x=(m=e.builderContext)==null?void 0:m.rootState)==null?void 0:x.locale)}),[r,l]=p.useState(()=>[]),[u,c]=p.useState(()=>{var S;return Ht(e.variants,g.getDefaultCanTrack((S=e.builderContext)==null?void 0:S.canTrack))}),[h,b]=p.useState(()=>!1);function d(){return(e.variants||[]).filter(S=>{var m,x,w,E;return _t({...(x=(m=e.builderContext)==null?void 0:m.rootState)!=null&&x.locale?{locale:(E=(w=e.builderContext)==null?void 0:w.rootState)==null?void 0:E.locale}:{},...n},S.query,S.startDate,S.endDate)})}function T(){var S;return zt({variants:e.variants,fallbackBlocks:(S=e.builderBlock)==null?void 0:S.children,isHydrated:h,filteredVariants:d(),previewingIndex:e.previewingIndex})}function f(){return(e.variants||[]).map((S,m)=>{var x;return`[data-variant-id="${(x=e.builderBlock)==null?void 0:x.id}-${m}"] { display: none; } `}).join("")}return p.useEffect(()=>{var m;b(!0);const S=g.userAttributesService.subscribeOnUserAttributesChange(x=>{i(x)});if(!(g.isEditing()||g.isPreviewing())){const x=d()[0];t.current&&(t.current.dispatchEvent(new CustomEvent("builder.variantLoaded",{detail:{variant:x||"default",content:(m=e.builderContext)==null?void 0:m.content},bubbles:!0})),new IntersectionObserver(E=>{E.forEach(j=>{var V;j.isIntersecting&&t.current&&t.current.dispatchEvent(new CustomEvent("builder.variantDisplayed",{detail:{variant:x||"default",content:(V=e.builderContext)==null?void 0:V.content},bubbles:!0}))})}).observe(t.current))}r.push(S)},[]),p.useEffect(()=>()=>{r.forEach(S=>S())},[]),s.jsxs("div",{ref:t,...e.attributes,className:`builder-personalization-container ${((y=e.attributes)==null?void 0:y.className)||""}`,children:[u?s.jsxs(s.Fragment,{children:[(k=e.variants)==null?void 0:k.map((S,m)=>{var x,w;return s.jsx("template",{"data-variant-id":`${(x=e.builderBlock)==null?void 0:x.id}-${m}`,children:s.jsx(B,{blocks:S.blocks,parent:(w=e.builderBlock)==null?void 0:w.id,path:`component.options.variants.${m}.blocks`})},m)}),s.jsx(D,{nonce:((v=e.builderContext)==null?void 0:v.nonce)||"",styles:f(),id:`variants-styles-${(C=e.builderBlock)==null?void 0:C.id}`}),s.jsx(U,{nonce:((I=e.builderContext)==null?void 0:I.nonce)||"",scriptStr:a,id:`variants-script-${(P=e.builderBlock)==null?void 0:P.id}`})]}):null,s.jsx(B,{blocks:T().blocks,parent:(R=e.builderBlock)==null?void 0:R.id,path:T().path})]})}const Gt={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>"}}}]},Qt={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}],shouldReceiveBuilderProps:{builderContext:!0,builderComponents:!0}};function Yt(e){var t,n,i;return s.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:s.jsx(B,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,registeredComponents:e.builderComponents,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const Xt={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},G={"@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"}}},Q={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},Zt={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[G]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[Q]}],defaultValue:[{label:[{...G,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...Q,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...G,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...Q,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}};function en(e){var o;const[t,n]=p.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(r){return e.tabs&&e.tabs[r].content}function a(r){r===t&&e.collapsible?n(-1):n(r)}return s.jsxs("div",{children:[s.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(o=e.tabs)==null?void 0:o.map((r,l)=>s.jsx("span",{className:`builder-tab-wrap ${t===l?"builder-tab-active":""}`,style:{...t===l?e.activeTabStyle:{}},onClick:u=>a(l),children:s.jsx(B,{parent:e.builderBlock.id,path:`tabs.${l}.label`,blocks:r.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},l))}),i(t)?s.jsx("div",{children:s.jsx(B,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const tn={shouldReceiveBuilderProps:{builderBlock:!1,builderContext:!0},name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Ve(e){var t;return s.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const nn={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 an(e){const t=p.useRef(null),[n,i]=p.useState(()=>[]),[a,o]=p.useState(()=>[]);return p.useEffect(()=>{var l;if(!((l=t.current)!=null&&l.getElementsByTagName)||typeof window=="undefined")return;const r=t.current.getElementsByTagName("script");for(let u=0;u<r.length;u++){const c=r[u];if(c.src){if(n.includes(c.src))continue;n.push(c.src);const h=document.createElement("script");h.async=!0,h.src=c.src,document.head.appendChild(h)}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(h){console.warn("`CustomCode`: Error running script:",h)}}}},[]),s.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const on={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},rn=["text/javascript","application/javascript","application/ecmascript"],sn=e=>rn.includes(e.type);function ln(e){const t=p.useRef(null),[n,i]=p.useState(()=>[]),[a,o]=p.useState(()=>[]),[r,l]=p.useState(()=>!1);function u(){if(!t.current||!t.current.getElementsByTagName)return;const c=t.current.getElementsByTagName("script");for(let h=0;h<c.length;h++){const b=c[h];if(b.src&&!n.includes(b.src)){n.push(b.src);const d=document.createElement("script");d.async=!0,d.src=b.src,document.head.appendChild(d)}else if(sn(b)&&!a.includes(b.innerText))try{a.push(b.innerText),new Function(b.innerText)()}catch(d){console.warn("`Embed`: Error running script:",d)}}}return p.useEffect(()=>{t.current&&!r&&(l(!0),u())},[t.current,r]),s.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const cn={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},un=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],dn=()=>{const e=process.env.NODE_ENV||"production";return un.includes(e)?e:"production"};function mn(e){const t=p.useRef(null),[n,i]=p.useState(()=>"unsubmitted"),[a,o]=p.useState(()=>null),[r,l]=p.useState(()=>"");function u(b){var T,f;const d={...e.builderContext.rootState,...b};e.builderContext.rootSetState?(f=(T=e.builderContext).rootSetState)==null||f.call(T,d):e.builderContext.rootState=d}function c(){return g.isEditing()&&e.previewState||n}function h(b){var T;const d=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")b.preventDefault();else if(d){if(!(e.action||e.sendSubmissionsTo==="email")){b.preventDefault();return}b.preventDefault();const f=b.currentTarget||b.target,y=e.customHeaders||{};let k;const v=new FormData(f),C=Array.from(f.querySelectorAll("input,select,textarea")).filter(m=>!!m.name).map(m=>{let x;const w=m.name;if(m instanceof HTMLInputElement)if(m.type==="radio"){if(m.checked)return x=m.name,{key:w,value:x}}else if(m.type==="checkbox")x=m.checked;else if(m.type==="number"||m.type==="range"){const E=m.valueAsNumber;isNaN(E)||(x=E)}else m.type==="file"?x=m.files:x=m.value;else x=m.value;return{key:w,value:x}});let I=e.contentType;if(e.sendSubmissionsTo==="email"&&(I="multipart/form-data"),Array.from(C).forEach(({value:m})=>{(m instanceof File||Array.isArray(m)&&m[0]instanceof File||m instanceof FileList)&&(I="multipart/form-data")}),I!=="application/json")k=v;else{const m={};Array.from(C).forEach(({value:x,key:w})=>{pe(m,w,x)}),k=JSON.stringify(m)}I&&I!=="multipart/form-data"&&(d&&((T=e.action)!=null&&T.includes("zapier.com"))||(y["content-type"]=I));const P=new CustomEvent("presubmit",{detail:{body:k}});if(t.current&&(t.current.dispatchEvent(P),P.defaultPrevented))return;i("sending");const R=`${dn()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`,S=e.sendSubmissionsTo==="email"?R:e.action;g.logFetch(S),fetch(S,{body:k,headers:y,method:e.method||"post"}).then(async m=>{let x;const w=m.headers.get("content-type");if(w&&w.indexOf("application/json")!==-1?x=await m.json():x=await m.text(),!m.ok&&e.errorMessagePath){let E=ge(x,e.errorMessagePath);E&&(typeof E!="string"&&(E=JSON.stringify(E)),l(E),u({formErrorMessage:E}))}if(o(x),i(m.ok?"success":"error"),m.ok){const E=new CustomEvent("submit:success",{detail:{res:m,body:x}});if(t.current){if(t.current.dispatchEvent(E),E.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const j=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(j),j.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},m=>{const x=new CustomEvent("submit:error",{detail:{error:m}});t.current&&(t.current.dispatchEvent(x),x.defaultPrevented)||(o(m),i("error"))})}}return s.jsxs(s.Fragment,{children:[" ",s.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:b=>h(b),...e.attributes,children:[e.children,c()==="error"?s.jsx(B,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,c()==="sending"?s.jsx(B,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,c()==="error"&&a?s.jsx("pre",{className:"builder-form-error-text pre-7acc3b46",children:JSON.stringify(a,null,2)}):null,c()==="success"?s.jsx(B,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",s.jsx("style",{children:".pre-7acc3b46 { padding: 10px; color: red; text-align: center; }"})," "]})}const fn={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 gn(e){return p.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 hn={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 bn(e){var t;return p.createElement("select",{...e.attributes,value:e.value,key:g.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name,required:e.required},(t=e.options)==null?void 0:t.map((n,i)=>s.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const pn={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 yn(e){return s.jsx("button",{type:"submit",...e.attributes,children:e.text})}const xn={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0};function vn(e){return s.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const Sn={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:te,required:!0}],noWrap:!0,static:!0};function kn(e){return s.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 Cn={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:Ot,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:te,helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0}};function Be(e){var i,a,o,r,l,u,c;function t(){return{...e.autoPlay===!0?{autoPlay:!0}:{},...e.muted===!0?{muted:!0}:{},...e.controls===!0?{controls:!0}:{},...e.loop===!0?{loop:!0}:{},...e.playsInline===!0?{playsInline:!0}:{}}}function n(){return{...t()}}return s.jsxs("div",{style:{position:"relative"},children:[s.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,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},src:e.video||"no-src",poster:e.posterImage,children:e.lazyLoad?null:s.jsx("source",{type:"video/mp4",src:e.video})}),e.aspectRatio&&!(e.fitContent&&((o=(a=e.builderBlock)==null?void 0:a.children)!=null&&o.length))?s.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?s.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(c=(u=e.builderBlock)==null?void 0:u.children)!=null&&c.length&&!e.fitContent?s.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 Tn=()=>[{component:an,...nn},{component:ln,...on},{component:mn,...cn},{component:gn,...fn},{component:yn,...pn},{component:bn,...hn},{component:vn,...xn},{component:kn,...Sn},{component:Be,...Cn}],se=()=>[{component:me,...Wt},{component:Ee,...Dt},{component:Re,...$t},{component:Pe,...Lt},{component:je,...Gt},{component:Yt,...Qt},{component:De,...Xt},{component:Ve,...tn},{component:Jt,...Ut},{component:en,...Zt},{component:Ft,...Nt},...Tn()],wn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
192
|
+
`;function Gt(e){var p,C,y,T,w,P,E;const t=b.useRef(null),[n,i]=b.useState(()=>h.userAttributesService.getUserAttributes()),[a,o]=b.useState(()=>{var k,m,x;return Jt(e.variants,((k=e.builderBlock)==null?void 0:k.id)||"none",(x=(m=e.builderContext)==null?void 0:m.rootState)==null?void 0:x.locale)}),[r,l]=b.useState(()=>[]),[d,c]=b.useState(()=>{var k;return zt(e.variants,h.getDefaultCanTrack((k=e.builderContext)==null?void 0:k.canTrack))}),[g,v]=b.useState(()=>!1);function u(){return(e.variants||[]).filter(k=>{var m,x,R,I;return qt({...(x=(m=e.builderContext)==null?void 0:m.rootState)!=null&&x.locale?{locale:(I=(R=e.builderContext)==null?void 0:R.rootState)==null?void 0:I.locale}:{},...n},k.query,k.startDate,k.endDate)})}function S(){var k;return Kt({variants:e.variants,fallbackBlocks:(k=e.builderBlock)==null?void 0:k.children,isHydrated:g,filteredVariants:u(),previewingIndex:e.previewingIndex})}function f(){return(e.variants||[]).map((k,m)=>{var x;return`[data-variant-id="${(x=e.builderBlock)==null?void 0:x.id}-${m}"] { display: none; } `}).join("")}return b.useEffect(()=>{var m;v(!0);const k=h.userAttributesService.subscribeOnUserAttributesChange(x=>{i(x)});if(!(h.isEditing()||h.isPreviewing())){const x=u()[0];t.current&&(t.current.dispatchEvent(new CustomEvent("builder.variantLoaded",{detail:{variant:x||"default",content:(m=e.builderContext)==null?void 0:m.content},bubbles:!0})),new IntersectionObserver(I=>{I.forEach(j=>{var V;j.isIntersecting&&t.current&&t.current.dispatchEvent(new CustomEvent("builder.variantDisplayed",{detail:{variant:x||"default",content:(V=e.builderContext)==null?void 0:V.content},bubbles:!0}))})}).observe(t.current))}r.push(k)},[]),b.useEffect(()=>()=>{r.forEach(k=>k())},[]),s.jsxs("div",{ref:t,...e.attributes,className:`builder-personalization-container ${((p=e.attributes)==null?void 0:p.className)||""}`,children:[d?s.jsxs(s.Fragment,{children:[(C=e.variants)==null?void 0:C.map((k,m)=>{var x,R;return s.jsx("template",{"data-variant-id":`${(x=e.builderBlock)==null?void 0:x.id}-${m}`,children:s.jsx(B,{blocks:k.blocks,parent:(R=e.builderBlock)==null?void 0:R.id,path:`component.options.variants.${m}.blocks`})},m)}),s.jsx($,{nonce:((y=e.builderContext)==null?void 0:y.nonce)||"",styles:f(),id:`variants-styles-${(T=e.builderBlock)==null?void 0:T.id}`}),s.jsx(U,{nonce:((w=e.builderContext)==null?void 0:w.nonce)||"",scriptStr:a,id:`variants-script-${(P=e.builderBlock)==null?void 0:P.id}`})]}):null,s.jsx(B,{blocks:S().blocks,parent:(E=e.builderBlock)==null?void 0:E.id,path:S().path})]})}const Qt={name:"Core:Section",static:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",inputs:[{name:"maxWidth",type:"number",defaultValue:1200},{name:"lazyLoad",type:"boolean",defaultValue:!1,advanced:!0,description:"Only render this section when in view"}],defaultStyles:{paddingLeft:"20px",paddingRight:"20px",paddingTop:"50px",paddingBottom:"50px",marginTop:"0px",width:"100vw",marginLeft:"calc(50% - 50vw)"},canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{textAlign:"center"}},component:{name:"Text",options:{text:"<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"}}}]},Yt={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}],shouldReceiveBuilderProps:{builderContext:!0,builderComponents:!0}};function Xt(e){var t,n,i;return s.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:s.jsx(B,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,registeredComponents:e.builderComponents,blocks:(i=e.builderContext.rootState)==null?void 0:i[e.name]})})}const Zt={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},G={"@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"}}},Q={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},en={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[G]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[Q]}],defaultValue:[{label:[{...G,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...Q,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...G,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...Q,component:{name:"Text",options:{text:"Tab 2 content"}}}]}]},{name:"activeTabStyle",type:"uiStyle",helperText:"CSS styles for the active tab",defaultValue:{backgroundColor:"rgba(0, 0, 0, 0.1)"}},{name:"defaultActiveTab",type:"number",helperText:'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',defaultValue:1,advanced:!0},{name:"collapsible",type:"boolean",helperText:"If on, clicking an open tab closes it so no tabs are active",defaultValue:!1,advanced:!0},{name:"tabHeaderLayout",type:"enum",helperText:"Change the layout of the tab headers (uses justify-content)",defaultValue:"flex-start",enum:[{label:"Center",value:"center"},{label:"Space between",value:"space-between"},{label:"Space around",value:"space-around"},{label:"Left",value:"flex-start"},{label:"Right",value:"flex-end"}]}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}};function tn(e){var o;const[t,n]=b.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(r){return e.tabs&&e.tabs[r].content}function a(r){r===t&&e.collapsible?n(-1):n(r)}return s.jsxs("div",{children:[s.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(o=e.tabs)==null?void 0:o.map((r,l)=>s.jsx("span",{className:`builder-tab-wrap ${t===l?"builder-tab-active":""}`,style:{...t===l?e.activeTabStyle:{}},onClick:d=>a(l),children:s.jsx(B,{parent:e.builderBlock.id,path:`tabs.${l}.label`,blocks:r.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},l))}),i(t)?s.jsx("div",{children:s.jsx(B,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const nn={shouldReceiveBuilderProps:{builderBlock:!1,builderContext:!0},name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Be(e){var t;return s.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const an={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 on(e){const t=b.useRef(null),[n,i]=b.useState(()=>[]),[a,o]=b.useState(()=>[]);return b.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 g=document.createElement("script");g.async=!0,g.src=c.src,document.head.appendChild(g)}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(g){console.warn("`CustomCode`: Error running script:",g)}}}},[]),s.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const rn={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc"},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},sn=["text/javascript","application/javascript","application/ecmascript"],ln=e=>sn.includes(e.type);function cn(e){const t=b.useRef(null),[n,i]=b.useState(()=>[]),[a,o]=b.useState(()=>[]),[r,l]=b.useState(()=>!1);function d(){if(!t.current||!t.current.getElementsByTagName)return;const c=t.current.getElementsByTagName("script");for(let g=0;g<c.length;g++){const v=c[g];if(v.src&&!n.includes(v.src)){n.push(v.src);const u=document.createElement("script");u.async=!0,u.src=v.src,document.head.appendChild(u)}else if(ln(v)&&!a.includes(v.innerText))try{a.push(v.innerText),new Function(v.innerText)()}catch(u){console.warn("`Embed`: Error running script:",u)}}}return b.useEffect(()=>{t.current&&!r&&(l(!0),d())},[t.current,r]),s.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const un={name:"Form:Form",defaults:{responsiveStyles:{large:{marginTop:"15px",paddingBottom:"15px"}}},image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fef36d2a846134910b64b88e6d18c5ca5",inputs:[{name:"sendSubmissionsTo",type:"string",enum:[{label:"Send to email",value:"email",helperText:"Send form submissions to the email address of your choosing"},{label:"Custom",value:"custom",helperText:"Handle where the form requests go manually with a little code, e.g. to your own custom backend"}],defaultValue:"email"},{name:"sendSubmissionsToEmail",type:"string",required:!0,defaultValue:"your@email.com",showIf:'options.get("sendSubmissionsTo") === "email"'},{name:"sendWithJs",type:"boolean",helperText:"Set to false to use basic html form action",defaultValue:!0,showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"name",type:"string",defaultValue:"My form"},{name:"action",type:"string",helperText:"URL to send the form data to",showIf:'options.get("sendSubmissionsTo") === "custom"'},{name:"contentType",type:"string",defaultValue:"application/json",advanced:!0,enum:["application/json","multipart/form-data","application/x-www-form-urlencoded"],showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'},{name:"method",type:"string",showIf:'options.get("sendSubmissionsTo") === "custom"',defaultValue:"POST",advanced:!0},{name:"previewState",type:"string",enum:["unsubmitted","sending","success","error"],defaultValue:"unsubmitted",helperText:'Choose a state to edit, e.g. choose "success" to show what users see on success and edit the message',showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"successUrl",type:"url",helperText:"Optional URL to redirect the user to on form submission success",showIf:'options.get("sendSubmissionsTo") !== "zapier" && options.get("sendWithJs") === true'},{name:"resetFormOnSubmit",type:"boolean",showIf:"options.get('sendSubmissionsTo') === 'custom' && options.get('sendWithJs') === true",advanced:!0},{name:"successMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Thanks!</span>"}}}]},{name:"validate",type:"boolean",defaultValue:!0,advanced:!0},{name:"errorMessagePath",type:"text",advanced:!0,helperText:'Path to where to get the error message from in a JSON response to display to the user, e.g. "error.message" for a response like { "error": { "message": "this username is taken" }}'},{name:"errorMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},bindings:{"component.options.text":"state.formErrorMessage || block.component.options.text"},component:{name:"Text",options:{text:"<span>Form submission error :( Please check your answers and try again</span>"}}}]},{name:"sendingMessage",type:"uiBlocks",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Sending...</span>"}}}]},{name:"customHeaders",type:"map",valueType:{type:"string"},advanced:!0,showIf:'options.get("sendSubmissionsTo") === "custom" && options.get("sendWithJs") === true'}],noWrap:!0,canHaveChildren:!0,defaultChildren:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your name</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"name",placeholder:"Jane Doe"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Text",options:{text:"<span>Enter your email</span>"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:Input",options:{name:"email",placeholder:"jane@doe.com"}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{marginTop:"10px"}},component:{name:"Form:SubmitButton",options:{text:"Submit"}}}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},dn=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],mn=()=>{const e=process.env.NODE_ENV||"production";return dn.includes(e)?e:"production"};function fn(e){const t=b.useRef(null),[n,i]=b.useState(()=>"unsubmitted"),[a,o]=b.useState(()=>null),[r,l]=b.useState(()=>"");function d(v){var S,f;const u={...e.builderContext.rootState,...v};e.builderContext.rootSetState?(f=(S=e.builderContext).rootSetState)==null||f.call(S,u):e.builderContext.rootState=u}function c(){return h.isEditing()&&e.previewState||n}function g(v){var S;const u=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")v.preventDefault();else if(u){if(!(e.action||e.sendSubmissionsTo==="email")){v.preventDefault();return}v.preventDefault();const f=v.currentTarget||v.target,p=e.customHeaders||{};let C;const y=new FormData(f),T=Array.from(f.querySelectorAll("input,select,textarea")).filter(m=>!!m.name).map(m=>{let x;const R=m.name;if(m instanceof HTMLInputElement)if(m.type==="radio"){if(m.checked)return x=m.name,{key:R,value:x}}else if(m.type==="checkbox")x=m.checked;else if(m.type==="number"||m.type==="range"){const I=m.valueAsNumber;isNaN(I)||(x=I)}else m.type==="file"?x=m.files:x=m.value;else x=m.value;return{key:R,value:x}});let w=e.contentType;if(e.sendSubmissionsTo==="email"&&(w="multipart/form-data"),Array.from(T).forEach(({value:m})=>{(m instanceof File||Array.isArray(m)&&m[0]instanceof File||m instanceof FileList)&&(w="multipart/form-data")}),w!=="application/json")C=y;else{const m={};Array.from(T).forEach(({value:x,key:R})=>{ye(m,R,x)}),C=JSON.stringify(m)}w&&w!=="multipart/form-data"&&(u&&((S=e.action)!=null&&S.includes("zapier.com"))||(p["content-type"]=w));const P=new CustomEvent("presubmit",{detail:{body:C}});if(t.current&&(t.current.dispatchEvent(P),P.defaultPrevented))return;i("sending");const E=`${mn()==="dev"?"http://localhost:5000":"https://builder.io"}/api/v1/form-submit?apiKey=${e.builderContext.apiKey}&to=${btoa(e.sendSubmissionsToEmail||"")}&name=${encodeURIComponent(e.name||"")}`,k=e.sendSubmissionsTo==="email"?E:e.action;h.logFetch(k),fetch(k,{body:C,headers:p,method:e.method||"post"}).then(async m=>{let x;const R=m.headers.get("content-type");if(R&&R.indexOf("application/json")!==-1?x=await m.json():x=await m.text(),!m.ok&&e.errorMessagePath){let I=he(x,e.errorMessagePath);I&&(typeof I!="string"&&(I=JSON.stringify(I)),l(I),d({formErrorMessage:I}))}if(o(x),i(m.ok?"success":"error"),m.ok){const I=new CustomEvent("submit:success",{detail:{res:m,body:x}});if(t.current){if(t.current.dispatchEvent(I),I.defaultPrevented)return;e.resetFormOnSubmit!==!1&&t.current.reset()}if(e.successUrl)if(t.current){const j=new CustomEvent("route",{detail:{url:e.successUrl}});t.current.dispatchEvent(j),j.defaultPrevented||(location.href=e.successUrl)}else location.href=e.successUrl}},m=>{const x=new CustomEvent("submit:error",{detail:{error:m}});t.current&&(t.current.dispatchEvent(x),x.defaultPrevented)||(o(m),i("error"))})}}return s.jsxs(s.Fragment,{children:[" ",s.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:v=>g(v),...e.attributes,children:[e.children,c()==="error"?s.jsx(B,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,c()==="sending"?s.jsx(B,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,c()==="error"&&a?s.jsx("pre",{className:"builder-form-error-text pre-7acc3b46",children:JSON.stringify(a,null,2)}):null,c()==="success"?s.jsx(B,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",s.jsx("style",{children:".pre-7acc3b46 { padding: 10px; color: red; text-align: center; }"})," "]})}const gn={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 hn(e){return b.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 bn={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 pn(e){var t;return b.createElement("select",{...e.attributes,value:e.value,key:h.isEditing()&&e.defaultValue?e.defaultValue:"default-key",defaultValue:e.defaultValue,name:e.name,required:e.required},(t=e.options)==null?void 0:t.map((n,i)=>s.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const yn={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 xn(e){return s.jsx("button",{type:"submit",...e.attributes,children:e.text})}const vn={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0};function Sn(e){return s.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const kn={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:te,required:!0}],noWrap:!0,static:!0};function Cn(e){return s.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 Tn={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:Lt,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:te,helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0}};function Ae(e){var r,l,d,c,g,v,u;const t=b.useRef(null);function n(){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 i(){return{...n()}}const[a,o]=b.useState(()=>{});return b.useEffect(()=>{if(e.lazyLoad){const S=new IntersectionObserver(function(f){f.forEach(function(p){if(!p.isIntersecting)return;const C=p.target;try{Array.from(C.children).filter(y=>y instanceof HTMLElement&&y.tagName==="SOURCE").forEach(y=>{const T=y.dataset.src;T&&(y.src=T)}),C.load(),S.unobserve(C)}catch(y){console.error("Error loading lazy video:",y)}})});t.current&&S.observe(t.current),o(S)}},[]),b.useEffect(()=>()=>{a&&a.disconnect()},[]),s.jsxs("div",{style:{position:"relative"},children:[s.jsx("video",{className:"builder-video",...i(),ref:t,preload:e.lazyLoad?"none":e.preload||"metadata",style:{width:"100%",height:"100%",...(r=e.attributes)==null?void 0:r.style,objectFit:e.fit,objectPosition:e.position,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},poster:e.posterImage,children:s.jsx("source",{type:"video/mp4",...e.lazyLoad?{"data-src":e.video}:{src:e.video}})}),e.aspectRatio&&!(e.fitContent&&((d=(l=e.builderBlock)==null?void 0:l.children)!=null&&d.length))?s.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(g=(c=e.builderBlock)==null?void 0:c.children)!=null&&g.length&&e.fitContent?s.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(u=(v=e.builderBlock)==null?void 0:v.children)!=null&&u.length&&!e.fitContent?s.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 wn=()=>[{component:on,...an},{component:cn,...rn},{component:fn,...un},{component:hn,...gn},{component:xn,...yn},{component:pn,...bn},{component:Sn,...vn},{component:Cn,...kn},{component:Ae,...Tn}],le=()=>[{component:fe,...Dt},{component:Re,...$t},{component:Pe,...Ot},{component:je,...Ut},{component:Ve,...Qt},{component:Xt,...Yt},{component:$e,...Zt},{component:Be,...nn},{component:Gt,..._t},{component:tn,...en},{component:Wt,...Ft},...wn()],In=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
193
193
|
function getAndSetVariantId() {
|
|
194
194
|
function setCookie(name, value, days) {
|
|
195
195
|
let expires = '';
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
}).join('');
|
|
246
246
|
styleEl.innerHTML = newStyleStr;
|
|
247
247
|
}
|
|
248
|
-
}`,
|
|
248
|
+
}`,En=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
249
249
|
if (!navigator.cookieEnabled) {
|
|
250
250
|
return;
|
|
251
251
|
}
|
|
@@ -279,15 +279,15 @@
|
|
|
279
279
|
thisScriptEl?.remove();
|
|
280
280
|
}
|
|
281
281
|
return;
|
|
282
|
-
}`,
|
|
283
|
-
window.${Ae} = ${wn}
|
|
282
|
+
}`,Ne="builderIoAbTest",Fe="builderIoRenderContent",O=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Rn=({canTrack:e,content:t})=>!(!(O(t).length>0)||!e||h.isBrowser()),Pn=e=>e==="react"||e==="reactNative",We=Pn(h.TARGET),jn=()=>`
|
|
284
283
|
window.${Ne} = ${In}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
284
|
+
window.${Fe} = ${En}
|
|
285
|
+
`,Vn=(e,t)=>`
|
|
286
|
+
window.${Ne}(
|
|
287
|
+
"${t}",${JSON.stringify(e)}, ${We}
|
|
288
|
+
)`,Bn=({contentId:e,variationId:t})=>`window.${Fe}(
|
|
289
|
+
"${t}", "${e}", ${We}
|
|
290
|
+
)`;function ce(e){return Math.round(e*1e3)/1e3}const An=(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},Nn=e=>An(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),ue=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,a=e.clientY-n.top,o=ce(i/n.width),r=ce(a/n.height);return{x:o,y:r}},Fn=e=>{const t=e.target,n=t&&Nn(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?ue({event:e,target:t}):void 0,builderTargetOffset:n?ue({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},Wn=["svelte","qwik","vue"],de=()=>Wn.includes(h.TARGET)&&(h.isEditing()||h.isPreviewing()),Dn=e=>{var o,r;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(r=e.fileUrl)!=null?r:(o=e==null?void 0:e.files)==null?void 0:o.regular;let a="";if(i&&t&&n&&(a+=`
|
|
291
291
|
@font-face {
|
|
292
292
|
font-family: "${t}";
|
|
293
293
|
src: local("${n}"), url('${i}') format('woff2');
|
|
@@ -301,7 +301,7 @@ src: url('${c}') format('woff2');
|
|
|
301
301
|
font-display: fallback;
|
|
302
302
|
font-weight: ${l};
|
|
303
303
|
}
|
|
304
|
-
`.trim())}return a}
|
|
304
|
+
`.trim())}return a},$n=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Dn(n)))==null?void 0:t.join(" "))||""},On=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",Ln=`
|
|
305
305
|
.builder-button {
|
|
306
306
|
all: unset;
|
|
307
307
|
}
|
|
@@ -318,8 +318,8 @@ font-weight: ${l};
|
|
|
318
318
|
text-align: inherit;
|
|
319
319
|
font-family: inherit;
|
|
320
320
|
}
|
|
321
|
-
`,
|
|
322
|
-
${
|
|
323
|
-
${
|
|
324
|
-
${
|
|
325
|
-
`.trim());return s.jsx(
|
|
321
|
+
`,Un=e=>e?"":Ln,_n=e=>`variant-${e}`;function qn(e){var T,w,P;const t=b.useRef(null);function n(E){var m,x;const k={...e.builderContextSignal.rootState,...E};e.builderContextSignal.rootSetState?(x=(m=e.builderContextSignal).rootSetState)==null||x.call(m,k):e.setBuilderContextSignal(R=>({...R,rootState:k}))}function i(E){var m,x,R,I,j;const k={...e.builderContextSignal.content,...E,data:{...(m=e.builderContextSignal.content)==null?void 0:m.data,...E==null?void 0:E.data},meta:{...(x=e.builderContextSignal.content)==null?void 0:x.meta,...E==null?void 0:E.meta,breakpoints:((R=E==null?void 0:E.meta)==null?void 0:R.breakpoints)||((j=(I=e.builderContextSignal.content)==null?void 0:I.meta)==null?void 0:j.breakpoints)}};e.setBuilderContextSignal(V=>({...V,content:k}))}function a(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[o,r]=b.useState(()=>e.contentWrapper||"div");function l(E){return h.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:k=>{var R;const{breakpoints:m,contentId:x}=k;!x||x!==((R=e.builderContextSignal.content)==null?void 0:R.id)||m&&i({meta:{breakpoints:m}})},animation:k=>{Se(k)},contentUpdate:k=>{i(k)},stateUpdate:k=>{n(k)}}})(E)}const[d,c]=b.useState(()=>({})),[g,v]=b.useState(()=>({})),[u,S]=b.useState(()=>!1);function f(E){var k,m;if(e.builderContextSignal.content){const x=(k=e.builderContextSignal.content)==null?void 0:k.testVariationId,R=(m=e.builderContextSignal.content)==null?void 0:m.id;h._track({apiHost:e.apiHost,type:"click",canTrack:h.getDefaultCanTrack(e.canTrack),contentId:R,apiKey:e.apiKey,variationId:x!==R?x:void 0,...Fn(E),unique:!u})}u||S(!0)}function p(){var k,m,x;const E=(x=(m=(k=e.builderContextSignal.content)==null?void 0:k.data)==null?void 0:m.httpRequests)!=null?x:{};Object.entries(E).forEach(([R,I])=>{if(!I||g[R]||d[R]&&!h.isEditing())return;g[R]=!0;const j=I.replace(/{{([^}]+)}}/g,(V,N)=>String(A({code:N,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})));h.logFetch(j),fetch(j).then(V=>V.json()).then(V=>{n({[R]:V}),d[R]=!0}).catch(V=>{console.error("error fetching dynamic data",I,V)}).finally(()=>{g[R]=!1})})}function C(){h.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:Z(e.builderContextSignal.rootState),ref:{name:e.model}}}))}const y=b.useRef(!1);return y.current||(p(),C(),y.current=!0),b.useEffect(()=>{var E,k,m,x;if(h.isBrowser()){if(h.isEditing()&&!e.isNestedRender&&(window.addEventListener("message",l),h.registerInsertMenu(),h.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{},modelName:(E=e.model)!=null?E:"",apiKey:e.apiKey}),Object.values(e.builderContextSignal.componentInfos).forEach(I=>{var j,V;if(!((j=I.models)!=null&&j.length)||I.models.includes(e.model)){const N=h.createRegisterComponentMessage(I);(V=window.parent)==null||V.postMessage(N,"*")}}),window.addEventListener("builder:component:stateChangeListenerActivated",C)),e.builderContextSignal.content&&h.getDefaultCanTrack(e.canTrack)){const I=(k=e.builderContextSignal.content)==null?void 0:k.testVariationId,j=(m=e.builderContextSignal.content)==null?void 0:m.id,V=e.apiKey;h._track({apiHost:e.apiHost,type:"impression",canTrack:!0,contentId:j,apiKey:V,variationId:I!==j?I:void 0})}if(h.isPreviewing()&&!h.isEditing()){const I=new URL(location.href).searchParams,j=I.get("builder.preview"),V=I.get(`builder.overrides.${j}`),N=I.get("apiKey")||I.get("builder.space");(j==="BUILDER_STUDIO"||j===e.model&&N===e.apiKey&&(!e.content||V===e.content.id))&&h.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion,...j==="BUILDER_STUDIO"&&((x=e.context)!=null&&x.symbolId)?{query:{id:e.context.symbolId}}:{}}).then(ne=>{ne&&i(ne)})}}},[]),b.useEffect(()=>{e.content&&i(e.content)},[e.content]),b.useEffect(()=>{C()},[e.builderContextSignal.rootState]),b.useEffect(()=>{e.data&&n(e.data)},[e.data]),b.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),b.useEffect(()=>()=>{h.isBrowser()&&(window.removeEventListener("message",l),window.removeEventListener("builder:component:stateChangeListenerActivated",C))},[]),s.jsx(_.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content||de()?s.jsx(o,{ref:t,onClick:E=>f(E),"builder-content-id":(T=e.builderContextSignal.content)==null?void 0:T.id,"builder-model":e.model,className:_n(((w=e.content)==null?void 0:w.testVariationId)||((P=e.content)==null?void 0:P.id)),style:{display:!e.builderContextSignal.content&&de()?"none":void 0},...a(),...e.contentWrapperProps,children:e.children}):null})}function Mn(e){const[t,n]=b.useState(()=>`
|
|
322
|
+
${On({cssCode:e.cssCode,contentId:e.contentId})}
|
|
323
|
+
${$n({customFonts:e.customFonts})}
|
|
324
|
+
${Un(e.isNestedRender)}
|
|
325
|
+
`.trim());return s.jsx($,{id:"builderio-content",styles:t,nonce:e.nonce})}const Hn=({content:e,data:t,locale:n})=>{var o,r,l;const i={},a=((o=e==null?void 0:e.data)==null?void 0:o.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}:{}}},zn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function me(e){var c,g,v,u,S,f,p,C,y;const[t,n]=b.useState(()=>{var T,w;return Bn({variationId:(T=e.content)==null?void 0:T.testVariationId,contentId:(w=e.content)==null?void 0:w.id})});function i(T){l(w=>({...w,rootState:T}))}const[a,o]=b.useState(()=>[...le(),...e.customComponents||[]].reduce((T,{component:w,...P})=>({...T,[P.name]:{component:w,...h.serializeIncludingFunctions(P)}}),{})),[r,l]=b.useState(()=>({content:zn({content:e.content,data:e.data}),localState:void 0,rootState:Hn({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},canTrack:e.canTrack,apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...le(),...e.customComponents||[]].reduce((T,{component:w,...P})=>({...T,[P.name]:h.serializeIncludingFunctions(P)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{},nonce:e.nonce||"",model:e.model})),d=b.useRef(!1);if(!d.current){e.apiKey||h.logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");const T=(g=(c=r.content)==null?void 0:c.data)==null?void 0:g.jsCode;T&&A({code:T,context:e.context||{},localState:void 0,rootState:r.rootState,rootSetState:w=>{Object.assign(r.rootState,w)},isExpression:!1}),d.current=!0}return s.jsx(ge.Provider,{value:{registeredComponents:a},children:s.jsxs(qn,{apiHost:e.apiHost,nonce:e.nonce,content:e.content,data:e.data,model:e.model,context:e.context,apiKey:e.apiKey,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,showContent:e.showContent,builderContextSignal:r,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts,isNestedRender:e.isNestedRender,setBuilderContextSignal:l,children:[e.isSsrAbTest?s.jsx(U,{id:"builderio-variant-visibility",scriptStr:t,nonce:e.nonce||""}):null,s.jsx(Mn,{nonce:e.nonce||"",isNestedRender:e.isNestedRender,contentId:(v=r.content)==null?void 0:v.id,cssCode:(S=(u=r.content)==null?void 0:u.data)==null?void 0:S.cssCode,customFonts:(p=(f=r.content)==null?void 0:f.data)==null?void 0:p.customFonts}),s.jsx(B,{blocks:(y=(C=r.content)==null?void 0:C.data)==null?void 0:y.blocks,context:r,registeredComponents:a,linkComponent:e.linkComponent})]})})}function De(e){var r;const[t,n]=b.useState(()=>Rn({canTrack:h.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var l;return Vn(O(e.content).map(d=>({id:d.testVariationId,testRatio:d.testRatio})),((l=e.content)==null?void 0:l.id)||"")}function a(){return O(e.content).map(l=>`.variant-${l.testVariationId} { display: none; } `).join("")}function o(){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 b.useEffect(()=>{},[]),s.jsxs(s.Fragment,{children:[!e.isNestedRender&&h.TARGET!=="reactNative"?s.jsx(U,{id:"builderio-init-variants-fns",scriptStr:jn(),nonce:e.nonce||""}):null,t?s.jsxs(s.Fragment,{children:[s.jsx($,{id:"builderio-variants",styles:a(),nonce:e.nonce||""}),s.jsx(U,{id:"builderio-variants-visibility",scriptStr:i(),nonce:e.nonce||""}),(r=O(e.content))==null?void 0:r.map(l=>s.jsx(me,{apiHost:e.apiHost,isNestedRender:e.isNestedRender,nonce:e.nonce,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,s.jsx(me,{apiHost:e.apiHost,nonce:e.nonce,isNestedRender:e.isNestedRender,content:o(),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 Kn=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 $e(e){var l,d,c,g,v;function t(){return"div"}function n(){return"div"}function i(){var u,S;return[e.attributes[D()],"builder-symbol",(u=e.symbol)!=null&&u.inline?"builder-inline-symbol":void 0,(S=e.symbol)!=null&&S.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[a,o]=b.useState(()=>{var u;return(u=e.symbol)==null?void 0:u.content});function r(){a||Kn({symbol:e.symbol,builderContextValue:e.builderContext}).then(u=>{u&&o(u)})}return b.useEffect(()=>{},[]),b.useEffect(()=>{r()},[e.symbol]),s.jsx("div",{...e.attributes,className:i(),children:s.jsx(De,{nonce:e.builderContext.nonce,isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(l=e.builderBlock)==null?void 0:l.id},customComponents:Object.values(e.builderComponents),data:{...(d=e.symbol)==null?void 0:d.data,...e.builderContext.localState,...(c=a==null?void 0:a.data)==null?void 0:c.state},canTrack:e.builderContext.canTrack,model:(v=(g=e.symbol)==null?void 0:g.model)!=null?v:"",content:a,linkComponent:e.builderLinkComponent,blocksWrapper:t(),contentWrapper:n()})})}exports.setClientUserAttributes=h.setClientUserAttributes;exports.Blocks=B;exports.BuilderContext=_;exports.Button=fe;exports.Columns=Re;exports.Content=De;exports.Fragment=Pe;exports.Image=je;exports.Section=Ve;exports.Symbol=$e;exports.Text=Be;exports.Video=Ae;
|