@builder.io/sdk-react 4.0.4 → 4.0.6
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 +14 -13
- package/lib/browser/blocks-exports.mjs +8 -5
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/server-entry-5449a575.cjs +2 -0
- package/lib/browser/{server-entry-66a925df.js → server-entry-79285592.js} +24 -24
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-b4b4d9f1.js → accordion-87ad8263.js} +1 -1
- package/lib/edge/{accordion-7464a303.cjs → accordion-f7e030d5.cjs} +1 -1
- package/lib/edge/{blocks-e91ba3d4.cjs → blocks-31199191.cjs} +9 -9
- package/lib/edge/{blocks-e93076da.js → blocks-a066bb29.js} +246 -244
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-33f21c52.js → button-1d265b68.js} +2 -2
- package/lib/edge/{button-fda4fec5.cjs → button-45c9b994.cjs} +1 -1
- package/lib/edge/{columns-f7fd551f.cjs → columns-2282e71d.cjs} +3 -2
- package/lib/edge/{columns-55e99fb4.js → columns-6f323a60.js} +14 -13
- package/lib/edge/{content-variants-2ebd741d.js → content-variants-ddc4462d.js} +12 -12
- package/lib/edge/{content-variants-e6b3bd34.cjs → content-variants-ea56e041.cjs} +1 -1
- package/lib/edge/{custom-code-c66cd781.cjs → custom-code-046c9e54.cjs} +1 -1
- package/lib/edge/{custom-code-d7aa74ff.js → custom-code-27f3a9d0.js} +1 -1
- package/lib/edge/{embed-7384956f.js → embed-962809ed.js} +1 -1
- package/lib/edge/{embed-2c418cac.cjs → embed-a90e1ebf.cjs} +1 -1
- package/lib/edge/{form-61cd3cc1.cjs → form-2112cb80.cjs} +1 -1
- package/lib/edge/{form-5148ead0.js → form-4fc6f70a.js} +3 -3
- package/lib/edge/{get-class-prop-name-f91e4605.js → get-class-prop-name-03e66a61.js} +1 -1
- package/lib/edge/{get-class-prop-name-5ff8e9ef.cjs → get-class-prop-name-77a0b81b.cjs} +1 -1
- package/lib/edge/{img-8770a93f.cjs → img-5850d9d8.cjs} +1 -1
- package/lib/edge/{img-595b9ae3.js → img-95c678b5.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-10b2e145.cjs → input-3937aa23.cjs} +1 -1
- package/lib/edge/{input-cab27192.js → input-7d147e6f.js} +1 -1
- package/lib/edge/{personalization-container-1ba57b3b.cjs → personalization-container-aff166ba.cjs} +1 -1
- package/lib/edge/{personalization-container-9984806a.js → personalization-container-d687ea13.js} +4 -4
- package/lib/edge/{select-36b1bb81.cjs → select-5bdfe568.cjs} +1 -1
- package/lib/edge/{select-e1dc1504.js → select-bfca657e.js} +1 -1
- package/lib/edge/{server-entry-74debd65.js → server-entry-1d157602.js} +25 -25
- package/lib/edge/server-entry-e8854034.cjs +2 -0
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-e8473a94.cjs → slot-a4c97369.cjs} +1 -1
- package/lib/edge/{slot-c6535e6d.js → slot-acb2aa8e.js} +3 -3
- package/lib/edge/{symbol-9177d14c.cjs → symbol-33b65252.cjs} +1 -1
- package/lib/edge/{symbol-fc7d42ee.js → symbol-cc7e6b66.js} +2 -2
- package/lib/edge/{tabs-980a2753.cjs → tabs-900d88a9.cjs} +1 -1
- package/lib/edge/{tabs-955ab7dd.js → tabs-9cbb5615.js} +3 -3
- package/lib/node/blocks-exports.cjs +10 -9
- package/lib/node/blocks-exports.mjs +10 -7
- 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-0dcb0303.cjs +2 -0
- package/lib/node/{server-entry-d38415f3.js → server-entry-ee54171f.js} +25 -25
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-9fe8e65a.js → setIvm-b773f3ba.js} +1 -1
- package/lib/node/{setIvm-0a044ac8.cjs → setIvm-d479356f.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-e4a9bd6b.cjs → should-force-browser-runtime-in-node-364ee049.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-eb6e6ea4.js → should-force-browser-runtime-in-node-bdb5bf58.js} +1 -1
- package/package.json +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/helpers/preview-lru-cache/set.d.ts +3 -4
- package/lib/browser/server-entry-e6bf2d7b.cjs +0 -2
- package/lib/edge/server-entry-f10ae31d.cjs +0 -2
- package/lib/node/server-entry-a7413c09.cjs +0 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./server-entry-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./server-entry-0dcb0303.cjs"),r=require("react/jsx-runtime"),f=require("react"),N=require("./setIvm-d479356f.cjs"),Oe=require("./should-force-browser-runtime-in-node-364ee049.cjs");function Le(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 Ue=Le(f),_e=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),qe=e=>typeof e=="string"&&_e.has(e.toLowerCase());function ne(e){return r.jsx(r.Fragment,{children:qe(e.TagName)?r.jsx(r.Fragment,{children:r.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):r.jsx(r.Fragment,{children:typeof e.TagName=="string"?r.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children}):r.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})}const O=()=>{switch(p.TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":case"angular":return"class"}};function he(e){function t(){return{...e.attributes,[O()]:`${e.link?"":"builder-button"} ${e.attributes[O()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return r.jsx(ne,{attributes:t(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}const H=f.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""}),be=f.createContext({registeredComponents:{}}),pe=(e,t,n)=>{const i=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((a,s)=>a!=null?a[s]:a,e);return i===void 0||i===e?n:i},Me=({code:e,builder:t,context:n,event:i,localState:a,rootSetState:s,rootState:o})=>{const l=N.getFunctionArguments({builder:t,context:n,event:i,state:N.flattenState({rootState:o,localState:a,rootSetState:s})});return new Function(...l.map(([d])=>d),e)(...l.map(([,d])=>d))},He=e=>p.isBrowser()||Oe.shouldForceBrowserRuntimeInNode({shouldLogWarning:!0})?Me(e):N.runInNode(e),ze=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,Ke=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,Ge=e=>{var t,n,i,a,s,o;return((i=(n=(t=ze.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:i.slice(1))||((o=(s=(a=Ke.exec(e.trim()))==null?void 0:a.groups)==null?void 0:s.getPath)==null?void 0:o.slice(1))};function W({code:e,context:t,localState:n,rootState:i,rootSetState:a,event:s,isExpression:o=!0}){if(e.trim()==="")return;const l=Ge(e.trim());if(l)return pe({...i,...n},l);const d={code:N.parseCode(e,{isExpression:o}),builder:N.getBuilderGlobals(),context:t,event:s,rootSetState:a,rootState:i,localState:n};try{return He(d)}catch(u){p.logger.error("Failed code evaluation: "+u.message,{code:e});return}}function Je(e,t){var n;return{...(n=e.component)==null?void 0:n.options,...e.options,...Qe(e,t)}}const Qe=(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,s)=>W({code:s,context:t,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState}))}};function Ye(e,...t){const n=Object.assign({},e);for(const i of t)delete n[i];return n}function q(e,t,n=null,i=null,a=new WeakSet){if(e==null||typeof e!="object"){t(e,s=>{n!==null&&i!==null&&(n[i]=s)});return}a.has(e)||(a.add(e),Array.isArray(e)?e.forEach((s,o)=>{t(s,d=>{e[o]=d}),q(s,t,e,o,a)}):Object.entries(e).forEach(([s,o])=>{t(o,d=>{e[s]=d}),q(o,t,e,s,a)}))}function ye(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function Xe(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return q(e,n=>{if(ye(n)){t=!0;return}}),t}function Ze(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(q(e,(n,i)=>{var a;ye(n)&&i((a=n[t])!=null?a:void 0)}),e)}function et(e,t){var n,i;return(n=e.component)!=null&&n.options&&Xe((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=Ze(e.component.options,t!=null?t:"Default")),e}function te(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>te(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]=te(e[n]));return t}const tt=["svelte","vue","angular","qwik","solid"].includes(p.TARGET),nt=e=>{if(tt){const t=N.fastClone(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=te(Ye(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},it=({block:e,context:t,localState:n,rootState:i,rootSetState:a})=>{if(!e.bindings)return e;const s=nt(e);for(const o in e.bindings){const l=e.bindings[o],d=W({code:l,localState:n,rootState:i,rootSetState:a,context:t});N.set(s,o,d)}return s};function at({block:e,context:t,localState:n,rootState:i,rootSetState:a}){let s=et(e,i.locale);return s=s,it({block:s,localState:n,rootState:i,rootSetState:a,context:t})}const z=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function ot(e,t,n={}){let i,a,s,o=null,l=0;const d=function(){l=n.leading===!1?0:Date.now(),o=null,s=e.apply(i,a),o||(i=a=null)};return function(){const u=Date.now();!l&&n.leading===!1&&(l=u);const h=t-(u-l);return i=this,a=arguments,h<=0||h>t?(o&&(clearTimeout(o),o=null),l=u,s=e.apply(i,a),o||(i=a=null)):!o&&n.trailing!==!1&&(o=setTimeout(d,h)),s}}function $(e,...t){const n=Object(e);for(let i=1;i<arguments.length;i++){const a=arguments[i];if(a!=null)for(const s in a)Object.prototype.hasOwnProperty.call(a,s)&&(n[s]=a[s])}return n}function rt(e){for(const t of e)switch(t.trigger){case"pageLoad":Se(t);break;case"scrollInView":lt(t);break}}function xe(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function ve(e,t){const n=st(e),i=getComputedStyle(t),a=e.steps[0].styles,s=e.steps[e.steps.length-1].styles,o=[a,s];for(const l of o)for(const d of n)d in l||(l[d]=i[d])}function st(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",$(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${z(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),$(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function lt(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 s(){!i&&l(n)?(i=!0,a=!0,setTimeout(()=>{$(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",o),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,$(n.style,e.steps[0].styles))}const o=ot(s,200,{leading:!1});function l(h){const b=h.getBoundingClientRect(),c=window.innerHeight,g=(e.thresholdPercent||0)/100*c;return b.bottom>g&&b.top<c-g}const d=e.steps[0].styles;function u(){$(n.style,d)}u(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${z(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",o,{capture:!0,passive:!0}),s()})}const ke=e=>Object.entries(e).map(([n,i])=>{if(typeof i=="string")return`${z(n)}: ${i};`}).filter(p.checkIsDefined),ct=e=>ke(e).join(`
|
|
2
2
|
`),D=({mediaQuery:e,className:t,styles:n})=>{const i=`.${t} {
|
|
3
3
|
${ct(n)}
|
|
4
4
|
}`;return e?`${e} {
|
|
5
5
|
${i}
|
|
6
6
|
}`:i};function ut({style:e}){return e}const dt=({block:e,context:t})=>Ce(ut({style:e.style||{},context:t,block:e}));function Ce(e){switch(p.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,mt=({block:e,registeredComponents:t,model:n})=>{var s;const i=(s=e.component)==null?void 0:s.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},ft=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const a=W({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(a))return;const s=n.collection.split(".").pop(),o=n.itemName||(s?s+"Item":"item");return a.map((d,u)=>({context:{...t,localState:{...t.localState,$index:u,$item:d,[o]:d,[`$${o}Index`]:u}},block:i}))},gt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},ht=(e,t,n)=>{var i;return(i=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&i.builderComponents?{builderComponents:Object.fromEntries(Object.entries(t).filter(([s,o])=>!Te(o,n)))}:{}},bt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},pt=(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}},J=(e,t=we)=>`@media (max-width: ${t[e].max}px)`,Ie=e=>{const t=N.fastClone(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 s=n?t.xsmall.max+1:Math.floor(i/2);t.small={max:i,min:s,default:s+1};const o=t.small.max+1;t.medium={max:a,min:o,default:o+1};const l=t.medium.max+1;return t.large={max:2e3,min:l,default:l+1},t};function L(e){return r.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function yt(e){function t(){const i=e.block;return p.checkIsDefined(i.hide)?!i.hide:p.checkIsDefined(i.show)?i.show:!0}function n(){var w,P,E,k,m;const i=e.block,a=i.responsiveStyles,s=e.context.content,o=Ie(((w=s==null?void 0:s.meta)==null?void 0:w.breakpoints)||{}),l=!!((E=(P=s==null?void 0:s.meta)==null?void 0:P.breakpoints)!=null&&E.xsmall),d=a==null?void 0:a.large,u=a==null?void 0:a.medium,
|
|
8
|
+
If you registered it, is the file that registered it imported by the file that needs to render it?`);return}else return a},ft=({block:e,context:t})=>{const{repeat:n,...i}=e;if(!(n!=null&&n.collection))return;const a=W({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(a))return;const s=n.collection.split(".").pop(),o=n.itemName||(s?s+"Item":"item");return a.map((d,u)=>({context:{...t,localState:{...t.localState,$index:u,$item:d,[o]:d,[`$${o}Index`]:u}},block:i}))},gt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},ht=(e,t,n)=>{var i;return(i=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&i.builderComponents?{builderComponents:Object.fromEntries(Object.entries(t).filter(([s,o])=>!Te(o,n)))}:{}},bt=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},pt=(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}},J=(e,t=we)=>`@media (max-width: ${t[e].max}px)`,Ie=e=>{const t=N.fastClone(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 s=n?t.xsmall.max+1:Math.floor(i/2);t.small={max:i,min:s,default:s+1};const o=t.small.max+1;t.medium={max:a,min:o,default:o+1};const l=t.medium.max+1;return t.large={max:2e3,min:l,default:l+1},t};function L(e){return r.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function yt(e){function t(){const i=e.block;return p.checkIsDefined(i.hide)?!i.hide:p.checkIsDefined(i.show)?i.show:!0}function n(){var w,P,E,k,m;const i=e.block,a=i.responsiveStyles,s=e.context.content,o=Ie(((w=s==null?void 0:s.meta)==null?void 0:w.breakpoints)||{}),l=!!((E=(P=s==null?void 0:s.meta)==null?void 0:P.breakpoints)!=null&&E.xsmall),d=a==null?void 0:a.large,u=a==null?void 0:a.medium,h=a==null?void 0:a.small,b=a==null?void 0:a.xsmall,c=i.id;if(!c)return"";const S=d?D({className:c,styles:d}):"",g=u?D({className:c,styles:u,mediaQuery:J("medium",o)}):"",y=h?D({className:c,styles:h,mediaQuery:J("small",o)}):"",C=b&&l?D({className:c,styles:b,mediaQuery:J("xsmall",o)}):"",x=i.animations&&i.animations.find(v=>v.trigger==="hover");let T="";if(x){const v=((m=(k=x.steps)==null?void 0:k[1])==null?void 0:m.styles)||{};T=D({className:`${c}:hover`,styles:{...v,transition:`all ${x.duration}s ${z(x.easing)}`,transitionDelay:x.delay?`${x.delay}s`:"0s"}})||""}return[S,g,y,C,T].join(" ")}return r.jsx(r.Fragment,{children:n()&&t()?r.jsx(r.Fragment,{children:r.jsx(L,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function xt(e){return e.charAt(0).toUpperCase()+e.slice(1)}const vt=e=>`on${xt(e)}`,St=(e,t)=>n=>W({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 s=n[a];let o=vt(a);if(e.stripPrefix)switch(p.TARGET){case"vue":o=o.replace("v-on:","");break;case"svelte":o=o.replace("on:","");break}t[o]=St(s,e)}return t}function kt({properties:e}){return e}const Ct=e=>({href:e.href});function ie({block:e,context:t}){var i;const n={...Ct(e),...e.properties,"builder-id":e.id,style:dt({block:e,context:t}),[O()]:[e.id,"builder-block",e.class,(i=e.properties)==null?void 0:i.class].filter(Boolean).join(" ")};return kt({properties:n,context:t,block:e})}function Tt(e){return r.jsx(ne,{TagName:e.Wrapper,attributes:ie({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 wt(e){return f.useEffect(()=>{},[]),r.jsx(r.Fragment,{children:e.children})}function It(e){function t(){return e.includeBlockProps?{...ie({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 r.jsx(r.Fragment,{children:e.Wrapper.load?r.jsx(r.Fragment,{children:r.jsx(wt,{load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:t(),children:e.children})}):r.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})})}const Et=({componentOptions:e,builderBlock:t,context:n,componentRef:i,includeBlockProps:a,isInteractive:s,contextValue:o})=>{const l={...e,...a?{attributes:ie({block:t,context:o})}:{}};return s?{Wrapper:i,block:t,context:n,wrapperProps:e,includeBlockProps:a}:l};function re(e){var i;f.useState(()=>!1);const[t,n]=f.useState(()=>e.isInteractive?It:e.componentRef);return f.useEffect(()=>{},[e.componentOptions,e.blockChildren]),r.jsx(r.Fragment,{children:e.componentRef?r.jsx(r.Fragment,{children:r.jsx(t,{...Et({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=>r.jsx(K,{block:a,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},a.id))})}):null})}function se(e){const[t,n]=f.useState(()=>e.repeatContext);return r.jsx(H.Provider,{value:t,children:r.jsx(K,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function K(e){var h,b,c,S;function t(){return ft({block:e.block,context:e.context})}const[n,i]=f.useState(()=>({value:null,update:!1}));function a(){var y;if(n.value&&!n.update&&!p.isPreviewing())return n.value;const g=(y=e.block.repeat)!=null&&y.collection?e.block:at({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context});return n.value=g,n.update=!1,g}function s(){return mt({block:a(),registeredComponents:e.registeredComponents,model:e.context.model})}function o(){var y;return e.block.tagName==="a"||((y=a().properties)==null?void 0:y.href)||a().href?e.linkComponent||"a":e.block.tagName||"div"}function l(){var C,x;if((C=e.block.repeat)!=null&&C.collection)return!!((x=t==null?void 0:t())!=null&&x.length);const g="hide"in a()?a().hide:!1;return("show"in a()?a().show:!0)&&!g}function d(){var y,C;return!((y=s==null?void 0:s())!=null&&y.component)&&!t()?(C=a().children)!=null?C:[]:[]}function u(){var g,y,C,x;return{blockChildren:(g=a().children)!=null?g:[],componentRef:(y=s==null?void 0:s())==null?void 0:y.component,componentOptions:{...Je(a(),e.context),...bt(s(),a()),...pt(s(),e.context),...gt(s(),e.linkComponent),...ht(s(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:a(),includeBlockProps:((C=s==null?void 0:s())==null?void 0:C.noWrap)===!0,isInteractive:!((x=s==null?void 0:s())!=null&&x.isRSC&&p.TARGET==="rsc")}}return f.useEffect(()=>{const g=a().id,y=a().animations;y&&g&&rt(y.map(C=>({...C,elementId:g})))},[]),f.useEffect(()=>{n.update=!0}),r.jsx(r.Fragment,{children:l()?r.jsxs(r.Fragment,{children:[r.jsx(yt,{block:a(),context:e.context}),(h=s==null?void 0:s())!=null&&h.noWrap?t()?r.jsx(r.Fragment,{children:(S=t())==null?void 0:S.map((g,y)=>r.jsx(se,{repeatContext:g.context,block:g.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},y))}):r.jsx(re,{componentRef:u().componentRef,componentOptions:u().componentOptions,blockChildren:u().blockChildren,context:u().context,registeredComponents:u().registeredComponents,linkComponent:u().linkComponent,builderBlock:u().builderBlock,includeBlockProps:u().includeBlockProps,isInteractive:u().isInteractive}):r.jsx(r.Fragment,{children:t()?r.jsx(r.Fragment,{children:(c=t())==null?void 0:c.map((g,y)=>r.jsx(se,{repeatContext:g.context,block:g.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},y))}):r.jsxs(Tt,{Wrapper:o(),block:a(),context:e.context,children:[r.jsx(re,{componentRef:u().componentRef,componentOptions:u().componentOptions,blockChildren:u().blockChildren,context:u().context,registeredComponents:u().registeredComponents,linkComponent:u().linkComponent,builderBlock:u().builderBlock,includeBlockProps:u().includeBlockProps,isInteractive:u().isInteractive}),(b=d())==null?void 0:b.map(g=>r.jsx(K,{block:g,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},g.id))]})})]}):null})}function Rt(e){const t=f.useRef(null);f.useState(()=>!1);function n(){var o;return["builder-blocks",(o=e.blocks)!=null&&o.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function i(){if(!e.path)return;const o="this.",l="component.options.";return e.path.startsWith(o)?e.path.replace(o,""):e.path.startsWith(l)?e.path:`${l}${e.path||""}`}function a(){var o,l;p.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((l=window.parent)==null||l.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}function s(){var o,l;p.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((l=window.parent)==null||l.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:i()}},"*"))}return f.useEffect(()=>{},[]),f.useEffect(()=>{},[e.blocks]),r.jsxs(r.Fragment,{children:[r.jsx(e.BlocksWrapper,{ref:t,className:n()+" props-blocks-wrapper-14802cff","builder-path":i(),"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>a(),onMouseEnter:o=>s(),onKeyPress:o=>a(),...e.BlocksWrapperProps,children:e.children}),r.jsx("style",{children:`.props-blocks-wrapper-14802cff {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: stretch;
|
|
12
|
-
}`})]})}function A(e){var i,a,s;const t=
|
|
12
|
+
}`})]})}function A(e){var i,a,s;const t=f.useContext(H),n=f.useContext(be);return r.jsx(Rt,{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?r.jsx(r.Fragment,{children:(s=e.blocks)==null?void 0:s.map(o=>r.jsx(K,{block:o,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||(n==null?void 0:n.registeredComponents)},o.id))}):null})}const Pt=e=>`builder-columns ${e}-breakpoints`;function Re(e){var y,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(x){return x.link?e.builderLinkComponent||"a":"div"}function s(x){var T;return((T=n()[x])==null?void 0:T.width)||100/n().length}function o(x){const T=s(x),w=t()*(n().length-1)*(T/100);return`calc(${T}% - ${w}px)`}function l({stackedStyle:x,desktopStyle:T}){return i()==="tablet"?x:T}function d({stackedStyle:x,desktopStyle:T}){return i()==="never"?T:x}function u(){return e.stackColumnsAt==="never"?"row":e.reverseColumnsWhenStacked?"column-reverse":"column"}function h(){return{"--flex-dir":u(),"--flex-dir-tablet":l({stackedStyle:u(),desktopStyle:"row"})}}function b(x){const T=x===0?0:t(),w=o(x),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 c(x){var w,P;return Ie(((P=(w=e.builderContext.content)==null?void 0:w.meta)==null?void 0:P.breakpoints)||{})[x].max}function S(){const x=`.${e.builderBlock.id}-breakpoints > .builder-column`;return`
|
|
13
13
|
@media (max-width: ${c("medium")}px) {
|
|
14
14
|
.${e.builderBlock.id}-breakpoints {
|
|
15
15
|
flex-direction: var(--flex-dir-tablet);
|
|
@@ -33,10 +33,11 @@
|
|
|
33
33
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
`}function
|
|
36
|
+
`}function g(x,T){return{...x.link?{href:x.link}:{},[O()]:"builder-column",style:Ce(b(T))}}return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:Pt((y=e.builderBlock)==null?void 0:y.id)+" div-0369db37",style:h(),children:[r.jsx(L,{id:"builderio-columns",styles:S(),nonce:e.builderContext.nonce}),(C=e.columns)==null?void 0:C.map((x,T)=>r.jsx(ne,{TagName:a(x),actionAttributes:{},attributes:g(x,T),children:r.jsx(A,{path:`columns.${T}.blocks`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:x.blocks,styleProp:{flexGrow:"1"}})},T))]}),r.jsx("style",{children:`.div-0369db37 {
|
|
37
37
|
display: flex;
|
|
38
38
|
line-height: normal;
|
|
39
|
-
|
|
39
|
+
height: 100%;
|
|
40
|
+
}`})]})}function Pe(e){return r.jsx("span",{children:e.children})}function le(e){return e.replace(/http(s)?:/,"")}function jt(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 Vt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return le(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const i=e.split(n[0]),a=n[3],s=t.match("x")?t:`${t}x`;return le(`${i[0]}_${s}${a}`)}return null}function Q(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const i=Number(e.split("?width=")[1]);return isNaN(i)||(n=`${n} ${i}w`),t.filter(a=>a!==i).map(a=>`${jt(e,"width",a)} ${a}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[Vt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,i])=>`${n} ${i}w`).concat([e]).join(", "):e}function je(e){var a,s,o,l,d,u;function t(){var c;const b=e.image||e.src;if(!b||!(typeof b=="string"&&(b.match(/builder\.io/)||b.match(/cdn\.shopify\.com/))))return e.srcset;if(!e.noWebp){if(e.srcset&&((c=e.image)!=null&&c.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),Q(b)}else if(e.image&&!e.srcset)return Q(b);return Q(b)}}function n(){var h;return(h=t==null?void 0:t())!=null&&h.match(/builder\.io/)&&!e.noWebp?t().replace(/\?/g,"?format=webp&"):""}function i(){const h={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?h:void 0}return r.jsxs(r.Fragment,{children:[r.jsxs(r.Fragment,{children:[r.jsxs("picture",{children:[n()?r.jsx("source",{type:"image/webp",srcSet:n()}):null,r.jsx("img",{loading:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",alt:e.altText,title:e.title,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...i()},className:"builder-image"+(e.className?" "+e.className:"")+" img-1aa8aba3",src:e.image,srcSet:t(),sizes:e.sizes})]}),e.aspectRatio&&!((s=(a=e.builderBlock)==null?void 0:a.children)!=null&&s.length&&e.fitContent)?r.jsx("div",{className:"builder-image-sizer div-1aa8aba3",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(l=(o=e.builderBlock)==null?void 0:o.children)!=null&&l.length&&e.fitContent?r.jsx(r.Fragment,{children:e.children}):null,!e.fitContent&&((u=(d=e.builderBlock)==null?void 0:d.children)!=null&&u.length)?r.jsx("div",{className:"div-1aa8aba3-2",children:e.children}):null]}),r.jsx("style",{children:`.img-1aa8aba3 {
|
|
40
41
|
opacity: 1;
|
|
41
42
|
transition: opacity 0.2s ease-in-out;
|
|
42
43
|
}.div-1aa8aba3 {
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
left: 0;
|
|
53
54
|
width: 100%;
|
|
54
55
|
height: 100%;
|
|
55
|
-
}`})]})}function Ve(e){return r.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 Y={"@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!"}}}]},X={"@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!"}}}]},Bt={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:[Y]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[X]}],defaultValue:[{title:[Y],detail:[X]},{title:[Y],detail:[X]}],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}},ce=e=>e.toString();function At(e){var b;const[t,n]=h.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 s(){const S={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(S).filter(([f,y])=>y!==void 0))}function o(c){return`builder-accordion-title builder-accordion-title-${t.includes(c)?"open":"closed"}`}function l(c){return`builder-accordion-detail builder-accordion-detail-${t.includes(c)?"open":"closed"}`}function d(){let c=null;if(e.grid&&t.length&&document){const f=t[0];let C=document.querySelector(`.builder-accordion-title[data-index="${f}"]`);if(c=f,C){let x=C.getBoundingClientRect();for(;C=C&&C.nextElementSibling;)if(C){if(C.classList.contains("builder-accordion-detail"))continue;const T=C.getBoundingClientRect();if(T.left>x.left){const w=parseInt(C.getAttribute("data-index")||"",10);isNaN(w)||(x=T,c=w)}else break}}}return typeof c=="number"&&(c=c+1),c}function u(){const c={order:typeof d()=="number"?d():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(c).filter(([S,f])=>f!==void 0))}function g(c){t.includes(c)?n(i()?[]:t.filter(S=>S!==c)):n(i()?[c]:t.concat(c))}return r.jsx("div",{className:"builder-accordion",style:a(),children:(b=e.items)==null?void 0:b.map((c,S)=>r.jsxs(Ue.Fragment,{children:[r.jsx("div",{className:o(S),style:{...s(),...e.grid&&{width:e.gridRowWidth,order:d()!==null?ce(S):ce(S+1)}},"data-index":S,onClick:f=>g(S),children:r.jsx(A,{blocks:c.title,path:`items.${S}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(S)?r.jsx("div",{className:l(S),style:u(),children:r.jsx(A,{blocks:c.detail,path:`items.${S}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},S))})}const Nt={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}},Ft={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(a=>a.get("width"))&&(n.find(s=>!s.get("width"))||n.reduce((l,d)=>l+d.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Wt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},ae=["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"],Dt=["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"],$t={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:ae,required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(o,l=6e4){return new Promise((d,u)=>{const g=document.createElement("img");let b=!1;g.onload=()=>{b=!0,d(g)},g.addEventListener("error",c=>{console.warn("Image load failed",c.error),u(c.error)}),g.src=o,setTimeout(()=>{b||u(new Error("Image load timed out"))},l)})}function i(o){return Math.round(o*1e3)/1e3}const a=e.get("image"),s=e.get("aspectRatio");if(fetch(a).then(o=>o.blob()).then(o=>{o.type.includes("svg")&&e.set("noWebp",!0)}),a&&(!s||s===.7041))return n(a).then(o=>{const l=e.get("aspectRatio");e.get("image")===a&&(!l||l===.7041)&&o.width&&o.height&&(e.set("aspectRatio",i(o.height/o.width)),e.set("height",o.height),e.set("width",o.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:"title",type:"string",helperText:"Text to display when hovering over the asset"},{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}},Ot={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 M(e){return r.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function Lt(e,t,n,i){function a(u){return typeof u=="string"}function s(u){return typeof u=="number"}function o(u,g){return(()=>{const c=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)),!(c&&S))return!0;if(Array.isArray(f))return S==="isNot"?f.every(C=>o(u,{property:c,operator:S,value:C})):!!f.find(C=>o(u,{property:c,operator:S,value:C}));const y=u[c];if(Array.isArray(y))return y.includes(f);switch(S){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 s(y)&&s(f)&&y>f;case"lessThan":return s(y)&&s(f)&&y<f;case"greaterThanOrEqualTo":return s(y)&&s(f)&&y>=f;case"lessThanOrEqualTo":return s(y)&&s(f)&&y<=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(u=>o(e,u))}const Ut=`function getPersonalizedVariant(variants, blockId, locale) {
|
|
56
|
+
}`})]})}function Ve(e){return r.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 Y={"@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!"}}}]},X={"@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!"}}}]},Bt={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:[Y]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[X]}],defaultValue:[{title:[Y],detail:[X]},{title:[Y],detail:[X]}],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}},ce=e=>e.toString();function At(e){var b;const[t,n]=f.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 s(){const S={...{display:"flex",flexDirection:"column"},alignItems:"stretch",cursor:"pointer"};return Object.fromEntries(Object.entries(S).filter(([g,y])=>y!==void 0))}function o(c){return`builder-accordion-title builder-accordion-title-${t.includes(c)?"open":"closed"}`}function l(c){return`builder-accordion-detail builder-accordion-detail-${t.includes(c)?"open":"closed"}`}function d(){let c=null;if(e.grid&&t.length&&document){const g=t[0];let C=document.querySelector(`.builder-accordion-title[data-index="${g}"]`);if(c=g,C){let x=C.getBoundingClientRect();for(;C=C&&C.nextElementSibling;)if(C){if(C.classList.contains("builder-accordion-detail"))continue;const T=C.getBoundingClientRect();if(T.left>x.left){const w=parseInt(C.getAttribute("data-index")||"",10);isNaN(w)||(x=T,c=w)}else break}}}return typeof c=="number"&&(c=c+1),c}function u(){const c={order:typeof d()=="number"?d():void 0,...e.grid&&{width:"100%"}};return Object.fromEntries(Object.entries(c).filter(([S,g])=>g!==void 0))}function h(c){t.includes(c)?n(i()?[]:t.filter(S=>S!==c)):n(i()?[c]:t.concat(c))}return r.jsx("div",{className:"builder-accordion",style:a(),children:(b=e.items)==null?void 0:b.map((c,S)=>r.jsxs(Ue.Fragment,{children:[r.jsx("div",{className:o(S),style:{...s(),...e.grid&&{width:e.gridRowWidth,order:d()!==null?ce(S):ce(S+1)}},"data-index":S,onClick:g=>h(S),children:r.jsx(A,{blocks:c.title,path:`items.${S}.title`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}),t.includes(S)?r.jsx("div",{className:l(S),style:u(),children:r.jsx(A,{blocks:c.detail,path:`items.${S}.detail`,parent:e.builderBlock.id,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]},S))})}const Nt={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}},Ft={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(i=>{i.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(a=>a.get("width"))&&(n.find(s=>!s.get("width"))||n.reduce((l,d)=>l+d.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0,builderLinkComponent:!0}},Wt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},ae=["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"],Dt=["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"],$t={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:ae,required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(o,l=6e4){return new Promise((d,u)=>{const h=document.createElement("img");let b=!1;h.onload=()=>{b=!0,d(h)},h.addEventListener("error",c=>{console.warn("Image load failed",c.error),u(c.error)}),h.src=o,setTimeout(()=>{b||u(new Error("Image load timed out"))},l)})}function i(o){return Math.round(o*1e3)/1e3}const a=e.get("image"),s=e.get("aspectRatio");if(fetch(a).then(o=>o.blob()).then(o=>{o.type.includes("svg")&&e.set("noWebp",!0)}),a&&(!s||s===.7041))return n(a).then(o=>{const l=e.get("aspectRatio");e.get("image")===a&&(!l||l===.7041)&&o.width&&o.height&&(e.set("aspectRatio",i(o.height/o.width)),e.set("height",o.height),e.set("width",o.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:"title",type:"string",helperText:"Text to display when hovering over the asset"},{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}},Ot={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 M(e){return r.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function Lt(e,t,n,i){function a(u){return typeof u=="string"}function s(u){return typeof u=="number"}function o(u,h){return(()=>{const c=h.property,S=h.operator;let g=h.value;if(h&&h.property==="urlPath"&&h.value&&typeof h.value=="string"&&h.value!=="/"&&h.value.endsWith("/")&&(g=h.value.slice(0,-1)),!(c&&S))return!0;if(Array.isArray(g))return S==="isNot"?g.every(C=>o(u,{property:c,operator:S,value:C})):!!g.find(C=>o(u,{property:c,operator:S,value:C}));const y=u[c];if(Array.isArray(y))return y.includes(g);switch(S){case"is":return y===g;case"isNot":return y!==g;case"contains":return(a(y)||Array.isArray(y))&&y.includes(String(g));case"startsWith":return a(y)&&y.startsWith(String(g));case"endsWith":return a(y)&&y.endsWith(String(g));case"greaterThan":return s(y)&&s(g)&&y>g;case"lessThan":return s(y)&&s(g)&&y<g;case"greaterThanOrEqualTo":return s(y)&&s(g)&&y>=g;case"lessThanOrEqualTo":return s(y)&&s(g)&&y<=g;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(u=>o(e,u))}const Ut=`function getPersonalizedVariant(variants, blockId, locale) {
|
|
56
57
|
if (!navigator.cookieEnabled) {
|
|
57
58
|
return;
|
|
58
59
|
}
|
|
@@ -189,7 +190,7 @@
|
|
|
189
190
|
${Ut}
|
|
190
191
|
getPersonalizedVariant(${JSON.stringify(e)}, "${t}"${n?`, "${n}"`:""})
|
|
191
192
|
})();
|
|
192
|
-
`;function zt(e){var y,C,x,T,w,P,E;const t=h.useRef(null),[n,i]=h.useState(()=>p.userAttributesService.getUserAttributes()),[a,s]=h.useState(()=>{var k,m,v;return Ht(e.variants,((k=e.builderBlock)==null?void 0:k.id)||"none",(v=(m=e.builderContext)==null?void 0:m.rootState)==null?void 0:v.locale)}),[o,l]=h.useState(()=>[]),[d,u]=h.useState(()=>{var k;return qt(e.variants,p.getDefaultCanTrack((k=e.builderContext)==null?void 0:k.canTrack))}),[g,b]=h.useState(()=>!1);function c(){return(e.variants||[]).filter(k=>{var m,v,I,R;return Lt({...(v=(m=e.builderContext)==null?void 0:m.rootState)!=null&&v.locale?{locale:(R=(I=e.builderContext)==null?void 0:I.rootState)==null?void 0:R.locale}:{},...n},k.query,k.startDate,k.endDate)})}function S(){var k;return Mt({variants:e.variants,fallbackBlocks:(k=e.builderBlock)==null?void 0:k.children,isHydrated:g,filteredVariants:c(),previewingIndex:e.previewingIndex})}function f(){return(e.variants||[]).map((k,m)=>{var v;return`[data-variant-id="${(v=e.builderBlock)==null?void 0:v.id}-${m}"] { display: none; } `}).join("")}return h.useEffect(()=>{var m;b(!0);const k=p.userAttributesService.subscribeOnUserAttributesChange(v=>{i(v)});if(!(p.isEditing()||p.isPreviewing())){const v=c()[0];t.current&&(t.current.dispatchEvent(new CustomEvent("builder.variantLoaded",{detail:{variant:v||"default",content:(m=e.builderContext)==null?void 0:m.content},bubbles:!0})),new IntersectionObserver(R=>{R.forEach(j=>{var V;j.isIntersecting&&t.current&&t.current.dispatchEvent(new CustomEvent("builder.variantDisplayed",{detail:{variant:v||"default",content:(V=e.builderContext)==null?void 0:V.content},bubbles:!0}))})}).observe(t.current))}o.push(k)},[]),h.useEffect(()=>()=>{o.forEach(k=>k())},[]),r.jsxs("div",{ref:t,...e.attributes,className:`builder-personalization-container ${((y=e.attributes)==null?void 0:y.className)||""}`,children:[d?r.jsxs(r.Fragment,{children:[(C=e.variants)==null?void 0:C.map((k,m)=>{var v,I;return r.jsx("template",{"data-variant-id":`${(v=e.builderBlock)==null?void 0:v.id}-${m}`,children:r.jsx(A,{blocks:k.blocks,parent:(I=e.builderBlock)==null?void 0:I.id,path:`component.options.variants.${m}.blocks`})},m)}),r.jsx(L,{nonce:((x=e.builderContext)==null?void 0:x.nonce)||"",styles:f(),id:`variants-styles-${(T=e.builderBlock)==null?void 0:T.id}`}),r.jsx(M,{nonce:((w=e.builderContext)==null?void 0:w.nonce)||"",scriptStr:a,id:`variants-script-${(P=e.builderBlock)==null?void 0:P.id}`})]}):null,r.jsx(A,{blocks:S().blocks,parent:(E=e.builderBlock)==null?void 0:E.id,path:S().path})]})}const Kt={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>"}}}]},Gt={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 Jt(e){var t,n,i;return r.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:r.jsx(A,{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 Qt={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}},Z={"@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"}}},ee={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},Yt={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[Z]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[ee]}],defaultValue:[{label:[{...Z,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...ee,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...Z,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...ee,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 Xt(e){var s;const[t,n]=h.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(o){return e.tabs&&e.tabs[o].content}function a(o){o===t&&e.collapsible?n(-1):n(o)}return r.jsxs("div",{children:[r.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(s=e.tabs)==null?void 0:s.map((o,l)=>r.jsx("span",{className:`builder-tab-wrap ${t===l?"builder-tab-active":""}`,style:{...t===l?e.activeTabStyle:{}},onClick:d=>a(l),children:r.jsx(A,{parent:e.builderBlock.id,path:`tabs.${l}.label`,blocks:o.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},l))}),i(t)?r.jsx("div",{children:r.jsx(A,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const Zt={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 r.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const en={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 tn(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[a,s]=h.useState(()=>[]);function o(){var d;if(!t.current||!((d=t.current)!=null&&d.getElementsByTagName)||typeof window=="undefined")return;const l=t.current.getElementsByTagName("script");for(let u=0;u<l.length;u++){const g=l[u];if(g.src){if(n.includes(g.src))continue;n.push(g.src);const b=document.createElement("script");b.async=!0,b.src=g.src,document.head.appendChild(b)}else if(!g.type||["text/javascript","application/javascript","application/ecmascript"].includes(g.type)){if(a.includes(g.innerText))continue;try{a.push(g.innerText),new Function(g.innerText)()}catch(b){p.logger.warn("[BUILDER.IO] `CustomCode`: Error running script:",b)}}}}return h.useEffect(()=>{o()},[]),h.useEffect(()=>{p.isEditing()&&o()},[e.code]),r.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const nn={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}]},an=["text/javascript","application/javascript","application/ecmascript"],on=e=>an.includes(e.type);function rn(e){const t=h.useRef(null),[n,i]=h.useState(()=>[]),[a,s]=h.useState(()=>[]),[o,l]=h.useState(()=>!1);function d(){if(!t.current||!t.current.getElementsByTagName)return;const u=t.current.getElementsByTagName("script");for(let g=0;g<u.length;g++){const b=u[g];if(b.src&&!n.includes(b.src)){n.push(b.src);const c=document.createElement("script");c.async=!0,c.src=b.src,document.head.appendChild(c)}else if(on(b)&&!a.includes(b.innerText))try{a.push(b.innerText),new Function(b.innerText)()}catch(c){p.logger.warn("[BUILDER.IO] `Embed`: Error running script:",c)}}}return h.useEffect(()=>{t.current&&!o&&(l(!0),d())},[t.current,o]),r.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const sn={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}},ln=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],cn=()=>{const e=process.env.NODE_ENV||"production";return ln.includes(e)?e:"production"};function un(e){const t=h.useRef(null),[n,i]=h.useState(()=>"unsubmitted"),[a,s]=h.useState(()=>null),[o,l]=h.useState(()=>"");function d(b){var S,f;const c={...e.builderContext.rootState,...b};e.builderContext.rootSetState?(f=(S=e.builderContext).rootSetState)==null||f.call(S,c):e.builderContext.rootState=c}function u(){return p.isEditing()&&e.previewState||n}function g(b){var S;const c=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")b.preventDefault();else if(c){if(!(e.action||e.sendSubmissionsTo==="email")){b.preventDefault();return}b.preventDefault();const f=b.currentTarget||b.target,y=e.customHeaders||{};let C;const x=new FormData(f),T=Array.from(f.querySelectorAll("input,select,textarea")).filter(m=>!!m.name).map(m=>{let v;const I=m.name;if(m instanceof HTMLInputElement)if(m.type==="radio"){if(m.checked)return v=m.name,{key:I,value:v}}else if(m.type==="checkbox")v=m.checked;else if(m.type==="number"||m.type==="range"){const R=m.valueAsNumber;isNaN(R)||(v=R)}else m.type==="file"?v=m.files:v=m.value;else v=m.value;return{key:I,value:v}});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=x;else{const m={};Array.from(T).forEach(({value:v,key:I})=>{N.set(m,I,v)}),C=JSON.stringify(m)}w&&w!=="multipart/form-data"&&(c&&((S=e.action)!=null&&S.includes("zapier.com"))||(y["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=`${cn()==="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;p.logFetch(k),fetch(k,{body:C,headers:y,method:e.method||"post"}).then(async m=>{let v;const I=m.headers.get("content-type");if(I&&I.indexOf("application/json")!==-1?v=await m.json():v=await m.text(),!m.ok&&e.errorMessagePath){let R=pe(v,e.errorMessagePath);R&&(typeof R!="string"&&(R=JSON.stringify(R)),l(R),d({formErrorMessage:R}))}if(s(v),i(m.ok?"success":"error"),m.ok){const R=new CustomEvent("submit:success",{detail:{res:m,body:v}});if(t.current){if(t.current.dispatchEvent(R),R.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 v=new CustomEvent("submit:error",{detail:{error:m}});t.current&&(t.current.dispatchEvent(v),v.defaultPrevented)||(s(m),i("error"))})}}return r.jsxs(r.Fragment,{children:[" ",r.jsxs("form",{validate:e.validate,ref:t,action:!e.sendWithJs&&e.action,method:e.method,name:e.name,onSubmit:b=>g(b),...e.attributes,children:[e.children,u()==="error"?r.jsx(A,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,u()==="sending"?r.jsx(A,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,u()==="error"&&a?r.jsx("pre",{className:"builder-form-error-text pre-7acc3b46",children:JSON.stringify(a,null,2)}):null,u()==="success"?r.jsx(A,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",r.jsx("style",{children:".pre-7acc3b46 { padding: 10px; color: red; text-align: center; }"})," "]})}const dn={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 mn(e){return h.createElement("input",{...e.attributes,key:p.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 fn={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 gn(e){var t;return h.createElement("select",{...e.attributes,value:e.value,key:p.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)=>r.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const hn={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 bn(e){return r.jsx("button",{type:"submit",...e.attributes,children:e.text})}const pn={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 yn(e){return r.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const xn={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:ae,required:!0}],noWrap:!0,static:!0};function vn(e){return r.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},p.isEditing()&&e.imgSrc||"default-key")}const Sn={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:Dt,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:ae,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 o,l,d,u,g,b,c;const t=h.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,s]=h.useState(()=>{});return h.useEffect(()=>{if(e.lazyLoad){const S=new IntersectionObserver(function(f){f.forEach(function(y){if(!y.isIntersecting)return;const C=y.target;try{Array.from(C.children).filter(x=>x instanceof HTMLElement&&x.tagName==="SOURCE").forEach(x=>{const T=x.dataset.src;T&&(x.src=T)}),C.load(),S.unobserve(C)}catch(x){console.error("Error loading lazy video:",x)}})});t.current&&S.observe(t.current),s(S)}},[]),h.useEffect(()=>()=>{a&&a.disconnect()},[]),r.jsxs("div",{style:{position:"relative"},children:[r.jsx("video",{className:"builder-video",...i(),ref:t,preload:e.lazyLoad?"none":e.preload||"metadata",style:{width:"100%",height:"100%",...(o=e.attributes)==null?void 0:o.style,objectFit:e.fit,objectPosition:e.position,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},poster:e.posterImage,children:r.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))?r.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(g=(u=e.builderBlock)==null?void 0:u.children)!=null&&g.length&&e.fitContent?r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(c=(b=e.builderBlock)==null?void 0:b.children)!=null&&c.length&&!e.fitContent?r.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 kn=()=>[{component:tn,...en},{component:rn,...nn},{component:un,...sn},{component:mn,...dn},{component:bn,...hn},{component:gn,...fn},{component:yn,...pn},{component:vn,...xn},{component:Ae,...Sn}],ue=()=>[{component:he,...Nt},{component:Re,...Ft},{component:Pe,...Wt},{component:je,...$t},{component:Ve,...Kt},{component:Jt,...Gt},{component:$e,...Qt},{component:Be,...Zt},{component:zt,...Ot},{component:Xt,...Yt},{component:At,...Bt},...kn()],Cn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
|
|
193
|
+
`;function zt(e){var y,C,x,T,w,P,E;const t=f.useRef(null),[n,i]=f.useState(()=>p.userAttributesService.getUserAttributes()),[a,s]=f.useState(()=>{var k,m,v;return Ht(e.variants,((k=e.builderBlock)==null?void 0:k.id)||"none",(v=(m=e.builderContext)==null?void 0:m.rootState)==null?void 0:v.locale)}),[o,l]=f.useState(()=>[]),[d,u]=f.useState(()=>{var k;return qt(e.variants,p.getDefaultCanTrack((k=e.builderContext)==null?void 0:k.canTrack))}),[h,b]=f.useState(()=>!1);function c(){return(e.variants||[]).filter(k=>{var m,v,I,R;return Lt({...(v=(m=e.builderContext)==null?void 0:m.rootState)!=null&&v.locale?{locale:(R=(I=e.builderContext)==null?void 0:I.rootState)==null?void 0:R.locale}:{},...n},k.query,k.startDate,k.endDate)})}function S(){var k;return Mt({variants:e.variants,fallbackBlocks:(k=e.builderBlock)==null?void 0:k.children,isHydrated:h,filteredVariants:c(),previewingIndex:e.previewingIndex})}function g(){return(e.variants||[]).map((k,m)=>{var v;return`[data-variant-id="${(v=e.builderBlock)==null?void 0:v.id}-${m}"] { display: none; } `}).join("")}return f.useEffect(()=>{var m;b(!0);const k=p.userAttributesService.subscribeOnUserAttributesChange(v=>{i(v)});if(!(p.isEditing()||p.isPreviewing())){const v=c()[0];t.current&&(t.current.dispatchEvent(new CustomEvent("builder.variantLoaded",{detail:{variant:v||"default",content:(m=e.builderContext)==null?void 0:m.content},bubbles:!0})),new IntersectionObserver(R=>{R.forEach(j=>{var V;j.isIntersecting&&t.current&&t.current.dispatchEvent(new CustomEvent("builder.variantDisplayed",{detail:{variant:v||"default",content:(V=e.builderContext)==null?void 0:V.content},bubbles:!0}))})}).observe(t.current))}o.push(k)},[]),f.useEffect(()=>()=>{o.forEach(k=>k())},[]),r.jsxs("div",{ref:t,...e.attributes,className:`builder-personalization-container ${((y=e.attributes)==null?void 0:y.className)||""}`,children:[d?r.jsxs(r.Fragment,{children:[(C=e.variants)==null?void 0:C.map((k,m)=>{var v,I;return r.jsx("template",{"data-variant-id":`${(v=e.builderBlock)==null?void 0:v.id}-${m}`,children:r.jsx(A,{blocks:k.blocks,parent:(I=e.builderBlock)==null?void 0:I.id,path:`component.options.variants.${m}.blocks`})},m)}),r.jsx(L,{nonce:((x=e.builderContext)==null?void 0:x.nonce)||"",styles:g(),id:`variants-styles-${(T=e.builderBlock)==null?void 0:T.id}`}),r.jsx(M,{nonce:((w=e.builderContext)==null?void 0:w.nonce)||"",scriptStr:a,id:`variants-script-${(P=e.builderBlock)==null?void 0:P.id}`})]}):null,r.jsx(A,{blocks:S().blocks,parent:(E=e.builderBlock)==null?void 0:E.id,path:S().path})]})}const Kt={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>"}}}]},Gt={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 Jt(e){var t,n,i;return r.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:r.jsx(A,{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 Qt={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}},Z={"@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"}}},ee={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},Yt={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[Z]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[ee]}],defaultValue:[{label:[{...Z,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...ee,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...Z,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...ee,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 Xt(e){var s;const[t,n]=f.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function i(o){return e.tabs&&e.tabs[o].content}function a(o){o===t&&e.collapsible?n(-1):n(o)}return r.jsxs("div",{children:[r.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(s=e.tabs)==null?void 0:s.map((o,l)=>r.jsx("span",{className:`builder-tab-wrap ${t===l?"builder-tab-active":""}`,style:{...t===l?e.activeTabStyle:{}},onClick:d=>a(l),children:r.jsx(A,{parent:e.builderBlock.id,path:`tabs.${l}.label`,blocks:o.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},l))}),i(t)?r.jsx("div",{children:r.jsx(A,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:i(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}const Zt={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 r.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const en={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 tn(e){const t=f.useRef(null),[n,i]=f.useState(()=>[]),[a,s]=f.useState(()=>[]);function o(){var d;if(!t.current||!((d=t.current)!=null&&d.getElementsByTagName)||typeof window=="undefined")return;const l=t.current.getElementsByTagName("script");for(let u=0;u<l.length;u++){const h=l[u];if(h.src){if(n.includes(h.src))continue;n.push(h.src);const b=document.createElement("script");b.async=!0,b.src=h.src,document.head.appendChild(b)}else if(!h.type||["text/javascript","application/javascript","application/ecmascript"].includes(h.type)){if(a.includes(h.innerText))continue;try{a.push(h.innerText),new Function(h.innerText)()}catch(b){p.logger.warn("[BUILDER.IO] `CustomCode`: Error running script:",b)}}}}return f.useEffect(()=>{o()},[]),f.useEffect(()=>{p.isEditing()&&o()},[e.code]),r.jsx("div",{ref:t,className:"builder-custom-code"+(e.replaceNodes?" replace-nodes":""),dangerouslySetInnerHTML:{__html:e.code}})}const nn={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}]},an=["text/javascript","application/javascript","application/ecmascript"],on=e=>an.includes(e.type);function rn(e){const t=f.useRef(null),[n,i]=f.useState(()=>[]),[a,s]=f.useState(()=>[]),[o,l]=f.useState(()=>!1);function d(){if(!t.current||!t.current.getElementsByTagName)return;const u=t.current.getElementsByTagName("script");for(let h=0;h<u.length;h++){const b=u[h];if(b.src&&!n.includes(b.src)){n.push(b.src);const c=document.createElement("script");c.async=!0,c.src=b.src,document.head.appendChild(c)}else if(on(b)&&!a.includes(b.innerText))try{a.push(b.innerText),new Function(b.innerText)()}catch(c){p.logger.warn("[BUILDER.IO] `Embed`: Error running script:",c)}}}return f.useEffect(()=>{t.current&&!o&&(l(!0),d())},[t.current,o]),r.jsx("div",{className:"builder-embed",ref:t,dangerouslySetInnerHTML:{__html:e.content}})}const sn={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}},ln=["production","qa","test","development","dev","cdn-qa","cloud","fast","cdn2","cdn-prod"],cn=()=>{const e=process.env.NODE_ENV||"production";return ln.includes(e)?e:"production"};function un(e){const t=f.useRef(null),[n,i]=f.useState(()=>"unsubmitted"),[a,s]=f.useState(()=>null),[o,l]=f.useState(()=>"");function d(b){var S,g;const c={...e.builderContext.rootState,...b};e.builderContext.rootSetState?(g=(S=e.builderContext).rootSetState)==null||g.call(S,c):e.builderContext.rootState=c}function u(){return p.isEditing()&&e.previewState||n}function h(b){var S;const c=e.sendWithJs||e.sendSubmissionsTo==="email";if(e.sendSubmissionsTo==="zapier")b.preventDefault();else if(c){if(!(e.action||e.sendSubmissionsTo==="email")){b.preventDefault();return}b.preventDefault();const g=b.currentTarget||b.target,y=e.customHeaders||{};let C;const x=new FormData(g),T=Array.from(g.querySelectorAll("input,select,textarea")).filter(m=>!!m.name).map(m=>{let v;const I=m.name;if(m instanceof HTMLInputElement)if(m.type==="radio"){if(m.checked)return v=m.name,{key:I,value:v}}else if(m.type==="checkbox")v=m.checked;else if(m.type==="number"||m.type==="range"){const R=m.valueAsNumber;isNaN(R)||(v=R)}else m.type==="file"?v=m.files:v=m.value;else v=m.value;return{key:I,value:v}});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=x;else{const m={};Array.from(T).forEach(({value:v,key:I})=>{N.set(m,I,v)}),C=JSON.stringify(m)}w&&w!=="multipart/form-data"&&(c&&((S=e.action)!=null&&S.includes("zapier.com"))||(y["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=`${cn()==="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;p.logFetch(k),fetch(k,{body:C,headers:y,method:e.method||"post"}).then(async m=>{let v;const I=m.headers.get("content-type");if(I&&I.indexOf("application/json")!==-1?v=await m.json():v=await m.text(),!m.ok&&e.errorMessagePath){let R=pe(v,e.errorMessagePath);R&&(typeof R!="string"&&(R=JSON.stringify(R)),l(R),d({formErrorMessage:R}))}if(s(v),i(m.ok?"success":"error"),m.ok){const R=new CustomEvent("submit:success",{detail:{res:m,body:v}});if(t.current){if(t.current.dispatchEvent(R),R.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 v=new CustomEvent("submit:error",{detail:{error:m}});t.current&&(t.current.dispatchEvent(v),v.defaultPrevented)||(s(m),i("error"))})}}return r.jsxs(r.Fragment,{children:[" ",r.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,u()==="error"?r.jsx(A,{path:"errorMessage",blocks:e.errorMessage,context:e.builderContext}):null,u()==="sending"?r.jsx(A,{path:"sendingMessage",blocks:e.sendingMessage,context:e.builderContext}):null,u()==="error"&&a?r.jsx("pre",{className:"builder-form-error-text pre-7acc3b46",children:JSON.stringify(a,null,2)}):null,u()==="success"?r.jsx(A,{path:"successMessage",blocks:e.successMessage,context:e.builderContext}):null]})," ",r.jsx("style",{children:".pre-7acc3b46 { padding: 10px; color: red; text-align: center; }"})," "]})}const dn={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 mn(e){return f.createElement("input",{...e.attributes,key:p.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 fn={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 gn(e){var t;return f.createElement("select",{...e.attributes,value:e.value,key:p.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)=>r.jsx("option",{value:n.value,children:n.name||n.value},`${n.name}-${i}`)))}const hn={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 bn(e){return r.jsx("button",{type:"submit",...e.attributes,children:e.text})}const pn={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 yn(e){return r.jsx("textarea",{...e.attributes,placeholder:e.placeholder,name:e.name,value:e.value,defaultValue:e.defaultValue,required:e.required})}const xn={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:ae,required:!0}],noWrap:!0,static:!0};function vn(e){return r.jsx("img",{style:{objectFit:e.backgroundSize||"cover",objectPosition:e.backgroundPosition||"center"},alt:e.altText,src:e.imgSrc||e.image,...e.attributes},p.isEditing()&&e.imgSrc||"default-key")}const Sn={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:Dt,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:ae,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 o,l,d,u,h,b,c;const t=f.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,s]=f.useState(()=>{});return f.useEffect(()=>{if(e.lazyLoad){const S=new IntersectionObserver(function(g){g.forEach(function(y){if(!y.isIntersecting)return;const C=y.target;try{Array.from(C.children).filter(x=>x instanceof HTMLElement&&x.tagName==="SOURCE").forEach(x=>{const T=x.dataset.src;T&&(x.src=T)}),C.load(),S.unobserve(C)}catch(x){console.error("Error loading lazy video:",x)}})});t.current&&S.observe(t.current),s(S)}},[]),f.useEffect(()=>()=>{a&&a.disconnect()},[]),r.jsxs("div",{style:{position:"relative"},children:[r.jsx("video",{className:"builder-video",...i(),ref:t,preload:e.lazyLoad?"none":e.preload||"metadata",style:{width:"100%",height:"100%",...(o=e.attributes)==null?void 0:o.style,objectFit:e.fit,objectPosition:e.position,borderRadius:"1px",...e.aspectRatio?{position:"absolute"}:null},poster:e.posterImage,children:r.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))?r.jsx("div",{style:{width:"100%",paddingTop:e.aspectRatio*100+"%",pointerEvents:"none",fontSize:"0px"}}):null,(h=(u=e.builderBlock)==null?void 0:u.children)!=null&&h.length&&e.fitContent?r.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"stretch"},children:e.children}):null,(c=(b=e.builderBlock)==null?void 0:b.children)!=null&&c.length&&!e.fitContent?r.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 kn=()=>[{component:tn,...en},{component:rn,...nn},{component:un,...sn},{component:mn,...dn},{component:bn,...hn},{component:gn,...fn},{component:yn,...pn},{component:vn,...xn},{component:Ae,...Sn}],ue=()=>[{component:he,...Nt},{component:Re,...Ft},{component:Pe,...Wt},{component:je,...$t},{component:Ve,...Kt},{component:Jt,...Gt},{component:$e,...Qt},{component:Be,...Zt},{component:zt,...Ot},{component:Xt,...Yt},{component:At,...Bt},...kn()],Cn=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget, isAngularSDK) {
|
|
193
194
|
function getAndSetVariantId() {
|
|
194
195
|
function setCookie(name, value, days) {
|
|
195
196
|
let expires = '';
|
|
@@ -321,8 +322,8 @@ font-weight: ${l};
|
|
|
321
322
|
text-align: inherit;
|
|
322
323
|
font-family: inherit;
|
|
323
324
|
}
|
|
324
|
-
`,On=e=>e?"":$n,Ln=e=>`variant-${e}`;function Un(e){var T,w,P;const t=
|
|
325
|
+
`,On=e=>e?"":$n,Ln=e=>`variant-${e}`;function Un(e){var T,w,P;const t=f.useRef(null);f.useState(()=>!1);function n(E){var m,v;const k={...e.builderContextSignal.rootState,...E};e.builderContextSignal.rootSetState?(v=(m=e.builderContextSignal).rootSetState)==null||v.call(m,k):e.setBuilderContextSignal(I=>({...I,rootState:k}))}function i(E){var m,v,I,R,j;const k={...e.builderContextSignal.content,...E,data:{...(m=e.builderContextSignal.content)==null?void 0:m.data,...E==null?void 0:E.data},meta:{...(v=e.builderContextSignal.content)==null?void 0:v.meta,...E==null?void 0:E.meta,breakpoints:((I=E==null?void 0:E.meta)==null?void 0:I.breakpoints)||((j=(R=e.builderContextSignal.content)==null?void 0:R.meta)==null?void 0:j.breakpoints)}};e.setBuilderContextSignal(V=>({...V,content:k}))}function a(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[s,o]=f.useState(()=>e.contentWrapper||"div");function l(E){return p.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:k=>{var I;const{breakpoints:m,contentId:v}=k;!v||v!==((I=e.builderContextSignal.content)==null?void 0:I.id)||m&&i({meta:{breakpoints:m}})},animation:k=>{Se(k)},contentUpdate:k=>{i(k)},stateUpdate:k=>{n(k)}}})(E)}const[d,u]=f.useState(()=>({})),[h,b]=f.useState(()=>({})),[c,S]=f.useState(()=>!1);function g(E){var k,m;if(e.builderContextSignal.content){const v=(k=e.builderContextSignal.content)==null?void 0:k.testVariationId,I=(m=e.builderContextSignal.content)==null?void 0:m.id;p._track({apiHost:e.apiHost,type:"click",canTrack:p.getDefaultCanTrack(e.canTrack),contentId:I,apiKey:e.apiKey,variationId:v!==I?v:void 0,...An(E),unique:!c})}c||S(!0)}function y(){var k,m,v;const E=(v=(m=(k=e.builderContextSignal.content)==null?void 0:k.data)==null?void 0:m.httpRequests)!=null?v:{};Object.entries(E).forEach(([I,R])=>{if(!R||h[I]||d[I]&&!p.isEditing())return;h[I]=!0;const j=R.replace(/{{([^}]+)}}/g,(V,B)=>String(W({code:B,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})));p.logFetch(j),fetch(j).then(V=>V.json()).then(V=>{n({[I]:V}),d[I]=!0}).catch(V=>{console.error("error fetching dynamic data",R,V)}).finally(()=>{h[I]=!1})})}function C(){p.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:N.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}const x=f.useRef(!1);return x.current||(y(),C(),x.current=!0),f.useEffect(()=>{var E,k,m,v,I;if(p.isBrowser()){p.isEditing()&&!e.isNestedRender&&(window.addEventListener("message",l),p.registerInsertMenu(),p.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(B=>{var F,U;if(!((F=B.models)!=null&&F.length)||B.models.includes(e.model)){const G=p.createRegisterComponentMessage(B);(U=window.parent)==null||U.postMessage(G,"*")}}),window.addEventListener("builder:component:stateChangeListenerActivated",C));const R=e.builderContextSignal.content&&p.getDefaultCanTrack(e.canTrack),j=p.getCookieSync({name:`builder.tests.${(k=e.builderContextSignal.content)==null?void 0:k.id}`,canTrack:!0}),V=(m=e.builderContextSignal.content)==null?void 0:m.testVariationId;if(R&&V===j){const B=(v=e.builderContextSignal.content)==null?void 0:v.id,F=e.apiKey;p._track({apiHost:e.apiHost,type:"impression",canTrack:!0,contentId:B,apiKey:F,variationId:j!==B?j:void 0})}if(p.isPreviewing()&&!p.isEditing()){const B=new URL(location.href).searchParams,F=B.get("builder.preview"),U=B.get(`builder.overrides.${F}`),G=B.get("apiKey")||B.get("builder.space");(F==="BUILDER_STUDIO"||F===e.model&&G===e.apiKey&&(!e.content||U===e.content.id))&&p.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion,...F==="BUILDER_STUDIO"&&((I=e.context)!=null&&I.symbolId)?{query:{id:e.context.symbolId}}:{}}).then(oe=>{oe&&i(oe)})}}},[]),f.useEffect(()=>{e.content&&i(e.content)},[e.content]),f.useEffect(()=>{C()},[e.builderContextSignal.rootState]),f.useEffect(()=>{e.data&&n(e.data)},[e.data]),f.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),f.useEffect(()=>()=>{p.isBrowser()&&(window.removeEventListener("message",l),window.removeEventListener("builder:component:stateChangeListenerActivated",C))},[]),r.jsx(H.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content||fe()?r.jsx(s,{ref:t,onClick:E=>g(E),"builder-content-id":(T=e.builderContextSignal.content)==null?void 0:T.id,"builder-model":e.model,className:Ln(((w=e.content)==null?void 0:w.testVariationId)||((P=e.content)==null?void 0:P.id)),style:{display:!e.builderContextSignal.content&&fe()?"none":void 0},...a(),...e.contentWrapperProps,children:e.children}):null})}function _n(e){const[t,n]=f.useState(()=>`
|
|
325
326
|
${Dn({cssCode:e.cssCode,contentId:e.contentId})}
|
|
326
327
|
${Wn({customFonts:e.customFonts})}
|
|
327
328
|
${On(e.isNestedRender)}
|
|
328
|
-
`.trim());return r.jsx(L,{id:"builderio-content",styles:t,nonce:e.nonce})}const qn=({content:e,data:t,locale:n})=>{var s,o,l;const i={},a=((s=e==null?void 0:e.data)==null?void 0:s.state)||{};return(l=(o=e==null?void 0:e.data)==null?void 0:o.inputs)==null||l.forEach(d=>{d.name&&d.defaultValue!==void 0&&(i[d.name]=d.defaultValue)}),{...i,...a,...t,...n?{locale:n}:{}}},Mn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function ge(e){var u,
|
|
329
|
+
`.trim());return r.jsx(L,{id:"builderio-content",styles:t,nonce:e.nonce})}const qn=({content:e,data:t,locale:n})=>{var s,o,l;const i={},a=((s=e==null?void 0:e.data)==null?void 0:s.state)||{};return(l=(o=e==null?void 0:e.data)==null?void 0:o.inputs)==null||l.forEach(d=>{d.name&&d.defaultValue!==void 0&&(i[d.name]=d.defaultValue)}),{...i,...a,...t,...n?{locale:n}:{}}},Mn=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function ge(e){var u,h,b,c,S,g,y,C,x;const[t,n]=f.useState(()=>{var T,w;return jn({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,s]=f.useState(()=>[...ue(),...e.customComponents||[]].reduce((T,{component:w,...P})=>({...T,[P.name]:{component:w,...p.serializeIncludingFunctions(P)}}),{})),[o,l]=f.useState(()=>({content:Mn({content:e.content,data:e.data}),localState:void 0,rootState:qn({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},canTrack:e.canTrack,apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...ue(),...e.customComponents||[]].reduce((T,{component:w,...P})=>({...T,[P.name]:p.serializeIncludingFunctions(P)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{},nonce:e.nonce||"",model:e.model})),d=f.useRef(!1);if(!d.current){e.apiKey||p.logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");const T=(h=(u=o.content)==null?void 0:u.data)==null?void 0:h.jsCode;T&&W({code:T,context:e.context||{},localState:void 0,rootState:o.rootState,rootSetState:w=>{Object.assign(o.rootState,w)},isExpression:!1}),d.current=!0}return r.jsx(be.Provider,{value:{registeredComponents:a},children:r.jsxs(Un,{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:o,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts,isNestedRender:e.isNestedRender,setBuilderContextSignal:l,children:[e.isSsrAbTest?r.jsx(M,{id:"builderio-variant-visibility",scriptStr:t,nonce:e.nonce||""}):null,r.jsx(_n,{nonce:e.nonce||"",isNestedRender:e.isNestedRender,contentId:(b=o.content)==null?void 0:b.id,cssCode:(S=(c=o.content)==null?void 0:c.data)==null?void 0:S.cssCode,customFonts:(y=(g=o.content)==null?void 0:g.data)==null?void 0:y.customFonts}),r.jsx(A,{blocks:(x=(C=o.content)==null?void 0:C.data)==null?void 0:x.blocks,context:o,registeredComponents:a,linkComponent:e.linkComponent})]})})}function De(e){var o;const[t,n]=f.useState(()=>wn({canTrack:p.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var l;return Pn(_(e.content).map(d=>({id:d.testVariationId,testRatio:d.testRatio})),((l=e.content)==null?void 0:l.id)||"")}function a(){return _(e.content).map(l=>`.variant-${l.testVariationId} { display: none; } `).join("")}function s(){var l;return t?{...e.content,testVariationId:(l=e.content)==null?void 0:l.id}:p.handleABTestingSync({item:e.content,canTrack:p.getDefaultCanTrack(e.canTrack)})}return f.useEffect(()=>{},[]),r.jsxs(r.Fragment,{children:[!e.isNestedRender&&p.TARGET!=="reactNative"?r.jsx(M,{id:"builderio-init-variants-fns",scriptStr:Rn(),nonce:e.nonce||""}):null,t?r.jsxs(r.Fragment,{children:[r.jsx(L,{id:"builderio-variants",styles:a(),nonce:e.nonce||""}),r.jsx(M,{id:"builderio-variants-visibility",scriptStr:i(),nonce:e.nonce||""}),(o=_(e.content))==null?void 0:o.map(l=>r.jsx(ge,{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,r.jsx(ge,{apiHost:e.apiHost,nonce:e.nonce,isNestedRender:e.isNestedRender,content:s(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}const Hn=async({builderContextValue:e,symbol:t})=>{if(t!=null&&t.model&&(e!=null&&e.apiKey))return p.fetchOneEntry({model:t.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(t==null?void 0:t.entry)&&{query:{id:t.entry}}}).catch(n=>{p.logger.error("Could not fetch symbol content: ",n)})};function $e(e){var l,d,u,h,b;function t(){return"div"}function n(){return"div"}function i(){var c,S;return[e.attributes[O()],"builder-symbol",(c=e.symbol)!=null&&c.inline?"builder-inline-symbol":void 0,(S=e.symbol)!=null&&S.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[a,s]=f.useState(()=>{var c;return(c=e.symbol)==null?void 0:c.content});function o(){a||Hn({symbol:e.symbol,builderContextValue:e.builderContext}).then(c=>{c&&s(c)})}return f.useEffect(()=>{},[]),f.useEffect(()=>{o()},[e.symbol]),r.jsx("div",{...e.attributes,className:i(),children:r.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,...(u=a==null?void 0:a.data)==null?void 0:u.state},canTrack:e.builderContext.canTrack,model:(b=(h=e.symbol)==null?void 0:h.model)!=null?b:"",content:a,linkComponent:e.builderLinkComponent,blocksWrapper:t(),contentWrapper:n()})})}exports.setClientUserAttributes=p.setClientUserAttributes;exports.Blocks=A;exports.BuilderContext=H;exports.Button=he;exports.Columns=Re;exports.Content=De;exports.Fragment=Pe;exports.Image=je;exports.Section=Ve;exports.Symbol=$e;exports.Text=Be;exports.Video=Ae;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { TARGET as O, isBrowser as U, logger as z, checkIsDefined as se, isPreviewing as X, isEditing as N, userAttributesService as be, getDefaultCanTrack as M, logFetch as Ve, registerInsertMenu as Ge, setupBrowserForEditing as Qe, createRegisterComponentMessage as Ye, getCookieSync as Xe, _track as pe, fetchOneEntry as Pe, createEditorListener as Ze, serializeIncludingFunctions as ye, handleABTestingSync as et } from "./server-entry-
|
|
3
|
-
import { setClientUserAttributes as Ri } from "./server-entry-
|
|
2
|
+
import { TARGET as O, isBrowser as U, logger as z, checkIsDefined as se, isPreviewing as X, isEditing as N, userAttributesService as be, getDefaultCanTrack as M, logFetch as Ve, registerInsertMenu as Ge, setupBrowserForEditing as Qe, createRegisterComponentMessage as Ye, getCookieSync as Xe, _track as pe, fetchOneEntry as Pe, createEditorListener as Ze, serializeIncludingFunctions as ye, handleABTestingSync as et } from "./server-entry-ee54171f.js";
|
|
3
|
+
import { setClientUserAttributes as Ri } from "./server-entry-ee54171f.js";
|
|
4
4
|
import { jsx as s, Fragment as R, jsxs as B } from "react/jsx-runtime";
|
|
5
5
|
import * as tt from "react";
|
|
6
6
|
import { createContext as Be, useEffect as P, useState as I, useRef as L, useContext as ve, createElement as Ae } from "react";
|
|
7
|
-
import { getFunctionArguments as nt, flattenState as it, runInNode as at, parseCode as ot, getBuilderGlobals as rt, set as Ne, fastClone as ue } from "./setIvm-
|
|
8
|
-
import { shouldForceBrowserRuntimeInNode as lt } from "./should-force-browser-runtime-in-node-
|
|
7
|
+
import { getFunctionArguments as nt, flattenState as it, runInNode as at, parseCode as ot, getBuilderGlobals as rt, set as Ne, fastClone as ue } from "./setIvm-b773f3ba.js";
|
|
8
|
+
import { shouldForceBrowserRuntimeInNode as lt } from "./should-force-browser-runtime-in-node-bdb5bf58.js";
|
|
9
9
|
const st = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), ct = (e) => typeof e == "string" && st.has(e.toLowerCase());
|
|
10
10
|
function de(e) {
|
|
11
11
|
return /* @__PURE__ */ s(R, { children: ct(e.TagName) ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ s(R, { children: typeof e.TagName == "string" ? /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) : /* @__PURE__ */ s(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) });
|
|
@@ -770,10 +770,12 @@ const Jt = ({
|
|
|
770
770
|
};
|
|
771
771
|
function xe(e) {
|
|
772
772
|
var i;
|
|
773
|
+
I(() => !1);
|
|
773
774
|
const [t, n] = I(
|
|
774
775
|
() => e.isInteractive ? Kt : e.componentRef
|
|
775
776
|
);
|
|
776
|
-
return
|
|
777
|
+
return P(() => {
|
|
778
|
+
}, [e.componentOptions, e.blockChildren]), /* @__PURE__ */ s(R, { children: e.componentRef ? /* @__PURE__ */ s(R, { children: /* @__PURE__ */ s(
|
|
777
779
|
t,
|
|
778
780
|
{
|
|
779
781
|
...Jt({
|
|
@@ -1177,7 +1179,7 @@ function Yt(e) {
|
|
|
1177
1179
|
/* @__PURE__ */ B(
|
|
1178
1180
|
"div",
|
|
1179
1181
|
{
|
|
1180
|
-
className: Qt((b = e.builderBlock) == null ? void 0 : b.id) + " div-
|
|
1182
|
+
className: Qt((b = e.builderBlock) == null ? void 0 : b.id) + " div-0369db37",
|
|
1181
1183
|
style: h(),
|
|
1182
1184
|
children: [
|
|
1183
1185
|
/* @__PURE__ */ s(
|
|
@@ -1214,9 +1216,10 @@ function Yt(e) {
|
|
|
1214
1216
|
]
|
|
1215
1217
|
}
|
|
1216
1218
|
),
|
|
1217
|
-
/* @__PURE__ */ s("style", { children: `.div-
|
|
1219
|
+
/* @__PURE__ */ s("style", { children: `.div-0369db37 {
|
|
1218
1220
|
display: flex;
|
|
1219
1221
|
line-height: normal;
|
|
1222
|
+
height: 100%;
|
|
1220
1223
|
}` })
|
|
1221
1224
|
] });
|
|
1222
1225
|
}
|
package/lib/node/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./blocks-exports.cjs"),e=require("./server-entry-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./blocks-exports.cjs"),e=require("./server-entry-0dcb0303.cjs");require("react/jsx-runtime");require("react");require("./setIvm-d479356f.cjs");require("./should-force-browser-runtime-in-node-364ee049.cjs");exports.Blocks=t.Blocks;exports.BuilderContext=t.BuilderContext;exports.Button=t.Button;exports.Columns=t.Columns;exports.Content=t.Content;exports.Fragment=t.Fragment;exports.Image=t.Image;exports.Section=t.Section;exports.Symbol=t.Symbol;exports.Text=t.Text;exports.Video=t.Video;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setClientUserAttributes=e.setClientUserAttributes;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;
|
package/lib/node/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Blocks as n, BuilderContext as m, Button as c, Columns as g, Content as p, Fragment as a, Image as l, Section as u, Symbol as d, Text as C, Video as f } from "./blocks-exports.mjs";
|
|
2
|
-
import { _processContentResult as E, createRegisterComponentMessage as b, fetchBuilderProps as h, fetchEntries as x, fetchOneEntry as S, getBuilderSearchParams as P, isEditing as k, isPreviewing as y, register as R, setClientUserAttributes as T, setEditorSettings as v, subscribeToEditor as w, track as A } from "./server-entry-
|
|
2
|
+
import { _processContentResult as E, createRegisterComponentMessage as b, fetchBuilderProps as h, fetchEntries as x, fetchOneEntry as S, getBuilderSearchParams as P, isEditing as k, isPreviewing as y, register as R, setClientUserAttributes as T, setEditorSettings as v, subscribeToEditor as w, track as A } from "./server-entry-ee54171f.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./setIvm-
|
|
6
|
-
import "./should-force-browser-runtime-in-node-
|
|
5
|
+
import "./setIvm-b773f3ba.js";
|
|
6
|
+
import "./should-force-browser-runtime-in-node-bdb5bf58.js";
|
|
7
7
|
export {
|
|
8
8
|
n as Blocks,
|
|
9
9
|
m as BuilderContext,
|
package/lib/node/init.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./should-force-browser-runtime-in-node-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./should-force-browser-runtime-in-node-364ee049.cjs"),t=require("isolated-vm"),r=require("./setIvm-d479356f.cjs");require("./server-entry-0dcb0303.cjs");const n=e=>{if(o.shouldForceBrowserRuntimeInNode({shouldLogWarning:!0}))return;const{ivmIsolateOptions:i}=e||{};r.setIvm(t,i)};exports.initializeNodeRuntime=n;
|
package/lib/node/init.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { shouldForceBrowserRuntimeInNode as r } from "./should-force-browser-runtime-in-node-
|
|
1
|
+
import { shouldForceBrowserRuntimeInNode as r } from "./should-force-browser-runtime-in-node-bdb5bf58.js";
|
|
2
2
|
import t from "isolated-vm";
|
|
3
|
-
import { setIvm as e } from "./setIvm-
|
|
4
|
-
import "./server-entry-
|
|
3
|
+
import { setIvm as e } from "./setIvm-b773f3ba.js";
|
|
4
|
+
import "./server-entry-ee54171f.js";
|
|
5
5
|
const u = (o) => {
|
|
6
6
|
if (r({
|
|
7
7
|
shouldLogWarning: !0
|