@builder.io/sdk-react 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/lib/browser/blocks-exports.cjs +21 -21
  2. package/lib/browser/blocks-exports.mjs +657 -658
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/server-entry-75ce8600.cjs +2 -0
  6. package/lib/browser/server-entry-a2495a20.js +748 -0
  7. package/lib/browser/server-entry.cjs +1 -1
  8. package/lib/browser/server-entry.mjs +1 -1
  9. package/lib/edge/{accordion-decb24cf.cjs → accordion-1c16f65e.cjs} +1 -1
  10. package/lib/edge/{accordion-1572cb0d.js → accordion-c020e15b.js} +1 -1
  11. package/lib/edge/blocks-27ac5b23.js +3534 -0
  12. package/lib/edge/blocks-cd946d16.cjs +30 -0
  13. package/lib/edge/blocks-exports.cjs +1 -1
  14. package/lib/edge/blocks-exports.mjs +2 -2
  15. package/lib/edge/{button-0709893d.js → button-5cdb4f26.js} +2 -2
  16. package/lib/edge/{button-cf66cf8d.cjs → button-8572fca5.cjs} +1 -1
  17. package/lib/edge/{columns-e234acc6.js → columns-3ac1fa96.js} +5 -6
  18. package/lib/edge/columns-c8a9cb89.cjs +28 -0
  19. package/lib/edge/{content-variants-3ab9230f.js → content-variants-23c8eec6.js} +209 -205
  20. package/lib/edge/content-variants-caa23bf7.cjs +134 -0
  21. package/lib/edge/form-3d9bf265.cjs +1 -0
  22. package/lib/edge/{form-27bcc23a.js → form-7fc5691b.js} +14 -15
  23. package/lib/edge/{get-class-prop-name-0b3d48a4.cjs → get-class-prop-name-29fd576a.cjs} +1 -1
  24. package/lib/edge/{get-class-prop-name-a3bd113c.js → get-class-prop-name-a4845b04.js} +1 -1
  25. package/lib/edge/{img-e0c8f7f9.cjs → img-102acaa2.cjs} +1 -1
  26. package/lib/edge/{img-80be6914.js → img-388698cb.js} +1 -1
  27. package/lib/edge/index.cjs +1 -1
  28. package/lib/edge/index.mjs +1 -1
  29. package/lib/edge/{input-f5ba6b1e.cjs → input-10e350a9.cjs} +1 -1
  30. package/lib/edge/{input-920922d5.js → input-5484e9e7.js} +1 -1
  31. package/lib/edge/{select-673864b7.js → select-b8406bcf.js} +1 -1
  32. package/lib/edge/{select-2ced1aca.cjs → select-f11be7a7.cjs} +1 -1
  33. package/lib/edge/server-entry-1879cbc4.cjs +2 -0
  34. package/lib/edge/server-entry-7ce03a4e.js +746 -0
  35. package/lib/edge/server-entry.cjs +1 -1
  36. package/lib/edge/server-entry.mjs +1 -1
  37. package/lib/edge/{slot-68f2b177.js → slot-23f75377.js} +5 -6
  38. package/lib/edge/slot-4ab390ec.cjs +1 -0
  39. package/lib/edge/{symbol-7e260a70.js → symbol-2eafb4e0.js} +2 -2
  40. package/lib/edge/{symbol-ded9dba9.cjs → symbol-fa343d77.cjs} +1 -1
  41. package/lib/edge/{tabs-5156494d.js → tabs-4c9c64f6.js} +15 -16
  42. package/lib/edge/tabs-7d258d82.cjs +1 -0
  43. package/lib/edge/text-5915f038.js +17 -0
  44. package/lib/edge/text-e6dbb721.cjs +1 -0
  45. package/lib/node/blocks-exports.cjs +22 -22
  46. package/lib/node/blocks-exports.mjs +542 -543
  47. package/lib/node/index.cjs +1 -1
  48. package/lib/node/index.mjs +3 -3
  49. package/lib/node/init.cjs +1 -1
  50. package/lib/node/init.mjs +3 -3
  51. package/lib/node/server-entry-2b263dde.js +749 -0
  52. package/lib/node/server-entry-ec330556.cjs +2 -0
  53. package/lib/node/server-entry.cjs +1 -1
  54. package/lib/node/server-entry.mjs +1 -1
  55. package/lib/node/{setIvm-aba1bed8.cjs → setIvm-1e6f0b60.cjs} +1 -1
  56. package/lib/node/{setIvm-8b303d4e.js → setIvm-7eb67cd6.js} +1 -1
  57. package/lib/node/setIvm.cjs +1 -1
  58. package/lib/node/setIvm.mjs +2 -2
  59. package/lib/node/{should-force-browser-runtime-in-node-491a9b55.cjs → should-force-browser-runtime-in-node-23218b19.cjs} +1 -1
  60. package/lib/node/{should-force-browser-runtime-in-node-0a037bde.js → should-force-browser-runtime-in-node-cdae9360.js} +1 -1
  61. package/package.json +1 -1
  62. package/types/constants/sdk-version.d.ts +1 -1
  63. package/types/functions/get-block-component-options.d.ts +2 -1
  64. package/types/functions/get-processed-block.d.ts +1 -6
  65. package/types/helpers/flatten.d.ts +6 -0
  66. package/types/server-index.d.ts +1 -1
  67. package/lib/browser/server-entry-017b8439.js +0 -717
  68. package/lib/browser/server-entry-9f80066e.cjs +0 -2
  69. package/lib/edge/blocks-9c35be74.js +0 -916
  70. package/lib/edge/blocks-d3823063.cjs +0 -12
  71. package/lib/edge/columns-2fdf0656.cjs +0 -28
  72. package/lib/edge/content-variants-616a6c0f.cjs +0 -134
  73. package/lib/edge/evaluate-ccf1ad96.cjs +0 -19
  74. package/lib/edge/evaluate-f0b82ede.js +0 -2612
  75. package/lib/edge/form-7c61693d.cjs +0 -1
  76. package/lib/edge/server-entry-6c0047ea.js +0 -715
  77. package/lib/edge/server-entry-de142ee8.cjs +0 -2
  78. package/lib/edge/slot-cc8b4e5b.cjs +0 -1
  79. package/lib/edge/tabs-d422921f.cjs +0 -1
  80. package/lib/edge/text-27a917c0.js +0 -37
  81. package/lib/edge/text-5796f488.cjs +0 -1
  82. package/lib/node/server-entry-e91e06a3.cjs +0 -2
  83. package/lib/node/server-entry-fdedc1aa.js +0 -718
@@ -1,12 +0,0 @@
1
- "use strict";const l=require("react/jsx-runtime"),p=require("react"),T=require("./blocks-exports.cjs"),g=require("./server-entry-de142ee8.cjs"),R=require("./evaluate-ccf1ad96.cjs"),J=require("./get-class-prop-name-0b3d48a4.cjs"),Q=require("./dynamic-renderer-b29b45ca.cjs"),$=p.createContext({registeredComponents:{}});function X(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options}}function Y(e,...t){const n=Object.assign({},e);for(const r of t)delete n[r];return n}function b(e,t,n=null,r=null,o=new WeakSet){if(e==null||typeof e!="object"){t(e,s=>{n!==null&&r!==null&&(n[r]=s)});return}o.has(e)||(o.add(e),Array.isArray(e)?e.forEach((s,i)=>{t(s,d=>{e[i]=d}),b(s,t,e,i,o)}):Object.entries(e).forEach(([s,i])=>{t(i,d=>{e[s]=d}),b(i,t,e,s,o)}))}function D(e){return e&&typeof e=="object"&&e["@type"]==="@builder.io/core:LocalizedValue"}function ee(e){if(!e||!Object.getOwnPropertyNames(e).length)return!1;let t=!1;return b(e,n=>{if(D(n)){t=!0;return}}),t}function te(e,t){return!e||!Object.getOwnPropertyNames(e).length?{}:(b(e,(n,r)=>{var o;D(n)&&r((o=n[t])!=null?o:void 0)}),e)}function ne(e,t){var n,r;return(n=e.component)!=null&&n.options&&ee((r=e.component)==null?void 0:r.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=te(e.component.options,t!=null?t:"Default")),e}const j=e=>JSON.parse(JSON.stringify(e)),F=(e,t,n)=>{if(Object(e)!==e)return e;const r=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return r.slice(0,-1).reduce((o,s,i)=>Object(o[s])===o[s]?o[s]:o[s]=Math.abs(Number(r[i+1]))>>0===+r[i+1]?[]:{},e)[r[r.length-1]]=n,e};function E(e){if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(n=>E(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]=E(e[n]));return t}const oe=["svelte","vue","angular","qwik","solid"].includes(g.TARGET),re=e=>{if(oe){const t=j(e);return{...t,properties:{...t.properties},actions:{...t.actions}}}else{const t=E(Y(e,"children","meta"));return{...t,properties:{...t.properties},actions:{...t.actions},children:e.children,meta:e.meta}}},se=({block:e,context:t,localState:n,rootState:r,rootSetState:o})=>{if(!e.bindings)return e;const s=re(e);for(const i in e.bindings){const u=e.bindings[i],d=R.evaluate({code:u,localState:n,rootState:r,rootSetState:o,context:t});F(s,i,d)}return s};function ie({block:e,context:t,shouldEvaluateBindings:n,localState:r,rootState:o,rootSetState:s}){let i=ne(e,o.locale);return i=i,n?se({block:i,localState:r,rootState:o,rootSetState:s,context:t}):i}const P=e=>e?e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():"";function le(e,t,n={}){let r,o,s,i=null,u=0;const d=function(){u=n.leading===!1?0:Date.now(),i=null,s=e.apply(r,o),i||(r=o=null)};return function(){const a=Date.now();!u&&n.leading===!1&&(u=a);const m=t-(a-u);return r=this,o=arguments,m<=0||m>t?(i&&(clearTimeout(i),i=null),u=a,s=e.apply(r,o),i||(r=o=null)):!i&&n.trailing!==!1&&(i=setTimeout(d,m)),s}}function C(e,...t){const n=Object(e);for(let r=1;r<arguments.length;r++){const o=arguments[r];if(o!=null)for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])}return n}function ce(e){for(const t of e)switch(t.trigger){case"pageLoad":M(t);break;case"scrollInView":ue(t);break}}function L(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function z(e,t){const n=ae(e),r=getComputedStyle(t),o=e.steps[0].styles,s=e.steps[e.steps.length-1].styles,i=[o,s];for(const u of i)for(const d of n)d in u||(u[d]=r[d])}function ae(e){const t=[];for(const n of e.steps)for(const r in n.styles)t.indexOf(r)===-1&&t.push(r);return t}function M(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){L(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{z(e,n),n.style.transition="none",n.style.transitionDelay="0",C(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${P(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),C(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}function ue(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){L(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{z(e,n);let r=!1,o=!1;function s(){!r&&u(n)?(r=!0,o=!0,setTimeout(()=>{C(n.style,e.steps[1].styles),e.repeat||document.removeEventListener("scroll",i),setTimeout(()=>{o=!1,e.repeat||(n.style.transition="",n.style.transitionDelay="")},(e.duration+(e.delay||0))*1e3+100)})):e.repeat&&r&&!o&&!u(n)&&(r=!1,C(n.style,e.steps[0].styles))}const i=le(s,200,{leading:!1});function u(m){const x=m.getBoundingClientRect(),k=window.innerHeight,c=(e.thresholdPercent||0)/100*k;return x.bottom>c&&x.top<k-c}const d=e.steps[0].styles;function a(){C(n.style,d)}a(),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${P(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s")}),document.addEventListener("scroll",i,{capture:!0,passive:!0}),s()})}const _=e=>Object.entries(e).map(([n,r])=>{if(typeof r=="string")return`${P(n)}: ${r};`}).filter(g.checkIsDefined),de=e=>_(e).join(`
2
- `),v=({mediaQuery:e,className:t,styles:n})=>{const r=`.${t} {
3
- ${de(n)}
4
- }`;return e?`${e} {
5
- ${r}
6
- }`:r};function fe({style:e}){return e}const me=({block:e,context:t})=>q(fe({style:e.style||{},context:t,block:e}));function q(e){switch(g.TARGET){case"svelte":case"vue":case"solid":case"angular":return _(e).join(" ");case"qwik":case"reactNative":case"react":case"rsc":return e}}const H=(e,t)=>e?t?e.models&&e.models.length>0&&!e.models.includes(t):!1:!0,he=({block:e,registeredComponents:t,model:n})=>{var s;const r=(s=e.component)==null?void 0:s.name;if(!r)return null;const o=t[r];if(!o||H(o,n)){console.warn(`
7
- Could not find a registered component named "${r}".
8
- If you registered it, is the file that registered it imported by the file that needs to render it?`);return}else return o},pe=({block:e,context:t})=>{const{repeat:n,...r}=e;if(!(n!=null&&n.collection))return;const o=R.evaluate({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(o))return;const s=n.collection.split(".").pop(),i=n.itemName||(s?s+"Item":"item");return o.map((d,a)=>({context:{...t,localState:{...t.localState,$index:a,$item:d,[i]:d,[`$${i}Index`]:a}},block:r}))},ge=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderLinkComponent?{builderLinkComponent:t}:{}},ye=(e,t,n)=>{var r;return(r=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&r.builderComponents?{builderComponents:Object.fromEntries(Object.entries(t).filter(([s,i])=>!H(i,n)))}:{}},xe=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderBlock?{builderBlock:t}:{}},ke=(e,t)=>{var n;return(n=e==null?void 0:e.shouldReceiveBuilderProps)!=null&&n.builderContext?{builderContext:t}:{}},U={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},I=(e,t=U)=>`@media (max-width: ${t[e].max}px)`,V=({small:e,medium:t})=>{const n=j(U);if(!e||!t)return n;const r=Math.floor(e/2);n.small={max:e,min:r,default:r+1};const o=n.small.max+1;n.medium={max:t,min:o,default:o+1};const s=n.medium.max+1;return n.large={max:2e3,min:s,default:s+1},n};function K(e){return l.jsx("style",{dangerouslySetInnerHTML:{__html:e.styles},"data-id":e.id,nonce:e.nonce})}function Se(e){function t(){const r=e.block;return g.checkIsDefined(r.hide)?!r.hide:g.checkIsDefined(r.show)?r.show:!0}function n(){var h,y,A;const r=e.block,o=r.responsiveStyles,s=e.context.content,i=V(((h=s==null?void 0:s.meta)==null?void 0:h.breakpoints)||{}),u=o==null?void 0:o.large,d=o==null?void 0:o.medium,a=o==null?void 0:o.small,m=r.id;if(!m)return"";const x=u?v({className:m,styles:u}):"",k=d?v({className:m,styles:d,mediaQuery:I("medium",i)}):"",S=a?v({className:m,styles:a,mediaQuery:I("small",i)}):"",c=r.animations&&r.animations.find(w=>w.trigger==="hover");let f="";if(c){const w=((A=(y=c.steps)==null?void 0:y[1])==null?void 0:A.styles)||{};f=v({className:`${m}:hover`,styles:{...w,transition:`all ${c.duration}s ${P(c.easing)}`,transitionDelay:c.delay?`${c.delay}s`:"0s"}})||""}return[x,k,S,f].join(" ")}return l.jsx(l.Fragment,{children:n()&&t()?l.jsx(l.Fragment,{children:l.jsx(K,{id:"builderio-block",styles:n(),nonce:e.context.nonce})}):null})}function Ce(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Be=e=>`on${Ce(e)}`,ve=(e,t)=>n=>R.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:n,isExpression:!1});function G(e){var r;const t={},n=(r=e.block.actions)!=null?r:{};for(const o in n){if(!n.hasOwnProperty(o))continue;const s=n[o];let i=Be(o);if(e.stripPrefix)switch(g.TARGET){case"vue":i=i.replace("v-on:","");break;case"svelte":i=i.replace("on:","");break}t[i]=ve(s,e)}return t}function be({properties:e}){return e}const Pe=e=>({href:e.href});function O({block:e,context:t}){var r;const n={...Pe(e),...e.properties,"builder-id":e.id,style:me({block:e,context:t}),[J.getClassPropName()]:[e.id,"builder-block",e.class,(r=e.properties)==null?void 0:r.class].filter(Boolean).join(" ")};return be({properties:n,context:t,block:e})}function we(e){return l.jsx(Q.DynamicRenderer,{TagName:e.Wrapper,attributes:O({block:e.block,context:e.context}),actionAttributes:G({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 Ee(e){return p.useEffect(()=>{},[]),l.jsx(l.Fragment,{children:e.children})}function Re(e){function t(){return e.includeBlockProps?{...O({block:e.block,context:e.context}),...G({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}}return l.jsx(l.Fragment,{children:e.Wrapper.load?l.jsx(l.Fragment,{children:l.jsx(Ee,{load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:t(),children:e.children})}):l.jsx(e.Wrapper,{...e.wrapperProps,attributes:t(),children:e.children})})}const je=({componentOptions:e,builderBlock:t,context:n,componentRef:r,includeBlockProps:o,isInteractive:s,contextValue:i})=>{const u={...e,...o?{attributes:O({block:t,context:i})}:{}};return s?{Wrapper:r,block:t,context:n,wrapperProps:e,includeBlockProps:o}:u};function W(e){var r;const[t,n]=p.useState(()=>e.isInteractive?Re:e.componentRef);return l.jsx(l.Fragment,{children:e.componentRef?l.jsx(l.Fragment,{children:l.jsx(t,{...je({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:(r=e.blockChildren)==null?void 0:r.map(o=>l.jsx(B,{block:o,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},o.id))})}):null})}function N(e){const[t,n]=p.useState(()=>e.repeatContext);return l.jsx(T.BuilderContext.Provider,{value:t,children:l.jsx(B,{block:e.block,context:t,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent})})}function B(e){var m,x,k,S;function t(){return pe({block:e.block,context:e.context})}const[n,r]=p.useState(()=>({value:null,update:!1}));function o(){var f;if(n.value&&!n.update&&!g.isPreviewing())return n.value;const c=(f=e.block.repeat)!=null&&f.collection?e.block:ie({block:e.block,localState:e.context.localState,rootState:e.context.rootState,rootSetState:e.context.rootSetState,context:e.context.context,shouldEvaluateBindings:!0});return n.value=c,n.update=!1,c}function s(){return he({block:o(),registeredComponents:e.registeredComponents,model:e.context.model})}function i(){var f;return e.block.tagName==="a"||((f=o().properties)==null?void 0:f.href)||o().href?e.linkComponent||"a":e.block.tagName||"div"}function u(){var h,y;if((h=e.block.repeat)!=null&&h.collection)return!!((y=t==null?void 0:t())!=null&&y.length);const c="hide"in o()?o().hide:!1;return("show"in o()?o().show:!0)&&!c}function d(){var f,h;return!((f=s==null?void 0:s())!=null&&f.component)&&!t()?(h=o().children)!=null?h:[]:[]}function a(){var c,f,h,y;return{blockChildren:(c=o().children)!=null?c:[],componentRef:(f=s==null?void 0:s())==null?void 0:f.component,componentOptions:{...X(o()),...xe(s(),o()),...ke(s(),e.context),...ge(s(),e.linkComponent),...ye(s(),e.registeredComponents,e.context.model)},context:e.context,linkComponent:e.linkComponent,registeredComponents:e.registeredComponents,builderBlock:o(),includeBlockProps:((h=s==null?void 0:s())==null?void 0:h.noWrap)===!0,isInteractive:!((y=s==null?void 0:s())!=null&&y.isRSC&&g.TARGET==="rsc")}}return p.useEffect(()=>{const c=o().id,f=o().animations;f&&c&&ce(f.map(h=>({...h,elementId:c})))},[]),p.useEffect(()=>{n.update=!0}),l.jsx(l.Fragment,{children:u()?l.jsxs(l.Fragment,{children:[l.jsx(Se,{block:o(),context:e.context}),(m=s==null?void 0:s())!=null&&m.noWrap?t()?l.jsx(l.Fragment,{children:(S=t())==null?void 0:S.map((c,f)=>l.jsx(N,{repeatContext:c.context,block:c.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},f))}):l.jsx(W,{componentRef:a().componentRef,componentOptions:a().componentOptions,blockChildren:a().blockChildren,context:a().context,registeredComponents:a().registeredComponents,linkComponent:a().linkComponent,builderBlock:a().builderBlock,includeBlockProps:a().includeBlockProps,isInteractive:a().isInteractive}):l.jsx(l.Fragment,{children:t()?l.jsx(l.Fragment,{children:(k=t())==null?void 0:k.map((c,f)=>l.jsx(N,{repeatContext:c.context,block:c.block,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},f))}):l.jsxs(we,{Wrapper:i(),block:o(),context:e.context,children:[l.jsx(W,{componentRef:a().componentRef,componentOptions:a().componentOptions,blockChildren:a().blockChildren,context:a().context,registeredComponents:a().registeredComponents,linkComponent:a().linkComponent,builderBlock:a().builderBlock,includeBlockProps:a().includeBlockProps,isInteractive:a().isInteractive}),(x=d())==null?void 0:x.map(c=>l.jsx(B,{block:c,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent,context:e.context},c.id))]})})]}):null})}function Oe(e){const t=p.useRef(null);function n(){var i;return["builder-blocks",(i=e.blocks)!=null&&i.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function r(){if(!e.path)return;const i="component.options.";return e.path.startsWith(i)?e.path:`${i}${e.path||""}`}function o(){var i,u;g.isEditing()&&!((i=e.blocks)!=null&&i.length)&&((u=window.parent)==null||u.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:r()}},"*"))}function s(){var i,u;g.isEditing()&&!((i=e.blocks)!=null&&i.length)&&((u=window.parent)==null||u.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:r()}},"*"))}return p.useEffect(()=>{},[]),l.jsxs(l.Fragment,{children:[l.jsx(e.BlocksWrapper,{ref:t,className:n()+" props-blocks-wrapper-215a41e0","builder-path":r(),"builder-parent-id":e.parent,style:e.styleProp,onClick:i=>o(),onMouseEnter:i=>s(),onKeyPress:i=>o(),...e.BlocksWrapperProps,children:e.children}),l.jsx("style",{children:`.props-blocks-wrapper-215a41e0 {
9
- display: flex;
10
- flex-direction: column;
11
- align-items: stretch;
12
- }`})]})}function Z(e){var r,o,s;const t=p.useContext(T.BuilderContext),n=p.useContext($);return l.jsx(Oe,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,classNameProp:e.className,BlocksWrapper:((r=e.context)==null?void 0:r.BlocksWrapper)||(t==null?void 0:t.BlocksWrapper),BlocksWrapperProps:((o=e.context)==null?void 0:o.BlocksWrapperProps)||(t==null?void 0:t.BlocksWrapperProps),children:e.blocks?l.jsx(l.Fragment,{children:(s=e.blocks)==null?void 0:s.map(i=>l.jsx(B,{block:i,linkComponent:e.linkComponent,context:e.context||t,registeredComponents:e.registeredComponents||(n==null?void 0:n.registeredComponents)},i.id))}):null})}const Ae=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"}));exports.Block=B;exports.Blocks=Z;exports.ComponentsContext=$;exports.InlinedStyles=K;exports.blocks=Ae;exports.fastClone=j;exports.getSizesForBreakpoints=V;exports.mapStyleObjToStrIfNeeded=q;exports.set=F;exports.triggerAnimation=M;
@@ -1,28 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("./blocks-d3823063.cjs"),j=require("./dynamic-renderer-b29b45ca.cjs"),q=require("./get-class-prop-name-0b3d48a4.cjs");require("react");require("./blocks-exports.cjs");require("./server-entry-de142ee8.cjs");require("./evaluate-ccf1ad96.cjs");const B=t=>`builder-columns ${t}-breakpoints`;function p(t){var f,k;function a(){return typeof t.space=="number"?t.space||0:20}function s(){return t.columns||[]}function u(){return t.stackColumnsAt||"tablet"}function y(e){return e.link?t.builderLinkComponent||"a":"div"}function x(e){var n;return((n=s()[e])==null?void 0:n.width)||100/s().length}function S(e){const n=x(e),i=a()*(s().length-1)*(n/100);return`calc(${n}% - ${i}px)`}function c({stackedStyle:e,desktopStyle:n}){return u()==="tablet"?e:n}function d({stackedStyle:e,desktopStyle:n}){return u()==="never"?n:e}function m(){return t.stackColumnsAt==="never"?"row":t.reverseColumnsWhenStacked?"column-reverse":"column"}function C(){return{"--flex-dir":m(),"--flex-dir-tablet":c({stackedStyle:m(),desktopStyle:"row"})}}function v(e){const n=e===0?0:a(),i=S(e),r=`${n}px`,g="100%",h=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:i,["marginLeft"]:r,"--column-width-mobile":d({stackedStyle:g,desktopStyle:i}),"--column-margin-left-mobile":d({stackedStyle:h,desktopStyle:r}),"--column-width-tablet":c({stackedStyle:g,desktopStyle:i}),"--column-margin-left-tablet":c({stackedStyle:h,desktopStyle:r})}}function b(e){var i,r;return o.getSizesForBreakpoints(((r=(i=t.builderContext.content)==null?void 0:i.meta)==null?void 0:r.breakpoints)||{})[e].max}function w(){const e=`.${t.builderBlock.id}-breakpoints > .builder-column`;return`
2
- @media (max-width: ${b("medium")}px) {
3
- .${t.builderBlock.id}-breakpoints {
4
- flex-direction: var(--flex-dir-tablet);
5
- align-items: stretch;
6
- }
7
-
8
- ${e} {
9
- width: var(--column-width-tablet) !important;
10
- margin-left: var(--column-margin-left-tablet) !important;
11
- }
12
- }
13
-
14
- @media (max-width: ${b("small")}px) {
15
- .${t.builderBlock.id}-breakpoints {
16
- flex-direction: var(--flex-dir);
17
- align-items: stretch;
18
- }
19
-
20
- ${e} {
21
- width: var(--column-width-mobile) !important;
22
- margin-left: var(--column-margin-left-mobile) !important;
23
- }
24
- },
25
- `}function $(e,n){return{...e.link?{href:e.link}:{},[q.getClassPropName()]:"builder-column",style:o.mapStyleObjToStrIfNeeded(v(n))}}return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:B((f=t.builderBlock)==null?void 0:f.id)+" div-49f40bae",style:C(),children:[l.jsx(o.InlinedStyles,{id:"builderio-columns",styles:w(),nonce:t.builderContext.nonce}),(k=t.columns)==null?void 0:k.map((e,n)=>l.jsx(j.DynamicRenderer,{TagName:y(e),actionAttributes:{},attributes:$(e,n),children:l.jsx(o.Blocks,{path:`columns.${n}.blocks`,parent:t.builderBlock.id,styleProp:{flexGrow:"1"},context:t.builderContext,registeredComponents:t.builderComponents,linkComponent:t.builderLinkComponent,blocks:e.blocks})},n))]}),l.jsx("style",{children:`.div-49f40bae {
26
- display: flex;
27
- line-height: normal;
28
- }`})]})}exports.default=p;
@@ -1,134 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),r=require("react"),l=require("./server-entry-de142ee8.cjs"),I=require("./blocks-exports.cjs"),R=require("./blocks-d3823063.cjs"),M=require("./evaluate-ccf1ad96.cjs");require("./get-class-prop-name-0b3d48a4.cjs");require("./dynamic-renderer-b29b45ca.cjs");const B={"@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!"}}}]},D={"@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!"}}}]},Q={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:[B]},{name:"detail",type:"uiBlocks",hideFromUI:!0,defaultValue:[D]}],defaultValue:[{title:[B],detail:[D]},{title:[B],detail:[D]}],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}},X=r.lazy(()=>Promise.resolve().then(()=>require("./accordion-decb24cf.cjs"))),Z={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}},ee={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(u=>u.get("width"))&&(n.find(p=>!p.get("width"))||n.reduce((o,f)=>o+f.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}},te={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},U=["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"],ne=["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"],ae={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:U,required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(a,o=6e4){return new Promise((f,T)=>{const v=document.createElement("img");let E=!1;v.onload=()=>{E=!0,f(v)},v.addEventListener("error",C=>{console.warn("Image load failed",C.error),T(C.error)}),v.src=a,setTimeout(()=>{E||T(new Error("Image load timed out"))},o)})}function i(a){return Math.round(a*1e3)/1e3}const u=e.get("image"),p=e.get("aspectRatio");if(fetch(u).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),u&&(!p||p===.7041))return n(u).then(a=>{const o=e.get("aspectRatio");e.get("image")===u&&(!o||o===.7041)&&a.width&&a.height&&(e.set("aspectRatio",i(a.height/a.width)),e.set("height",a.height),e.set("width",a.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"highPriority",type:"boolean",advanced:!0,helperText:"Mark this image as high priority compared to other images on the page. This prevents lazy loading of the image and tells the browser to load this image before others on the page."},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}],shouldReceiveBuilderProps:{builderBlock:!0}},ie={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>"}}}]},oe={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}},re=r.lazy(()=>Promise.resolve().then(()=>require("./slot-cc8b4e5b.cjs"))),le={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}},H={"@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"}}},j={"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{height:"200px",display:"flex",marginTop:"20px",flexDirection:"column"}},component:{name:"Text",options:{text:"New tab content "}}},se={name:"Builder: Tabs",inputs:[{name:"tabs",type:"list",broadcast:!0,subFields:[{name:"label",type:"uiBlocks",hideFromUI:!0,defaultValue:[H]},{name:"content",type:"uiBlocks",hideFromUI:!0,defaultValue:[j]}],defaultValue:[{label:[{...H,component:{name:"Text",options:{text:"Tab 1"}}}],content:[{...j,component:{name:"Text",options:{text:"Tab 1 content"}}}]},{label:[{...H,component:{name:"Text",options:{text:"Tab 2"}}}],content:[{...j,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}},de=r.lazy(()=>Promise.resolve().then(()=>require("./tabs-d422921f.cjs"))),ue={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"}},ce={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}]},me=r.lazy(()=>Promise.resolve().then(()=>require("./custom-code-6d9730ff.cjs"))),pe={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}]},fe=r.lazy(()=>Promise.resolve().then(()=>require("./embed-32bdd007.cjs"))),ge={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}},he=r.lazy(()=>Promise.resolve().then(()=>require("./form-7c61693d.cjs"))),be={name:"Form:Input",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",inputs:[{name:"type",type:"text",enum:["text","number","email","url","checkbox","radio","range","date","datetime-local","search","tel","time","file","month","week","password","color","hidden"],defaultValue:"text"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it takes, e.g. "email"'},{name:"placeholder",type:"string",defaultValue:"Hello there",helperText:"Text to display when there is no value"},{name:"defaultValue",type:"string"},{name:"value",type:"string",advanced:!0},{name:"required",type:"boolean",helperText:"Is this input required to be filled out to submit a form",defaultValue:!1}],noWrap:!0,static:!0,defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"}},ye=r.lazy(()=>Promise.resolve().then(()=>require("./input-f5ba6b1e.cjs"))),xe={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},ve=r.lazy(()=>Promise.resolve().then(()=>require("./select-2ced1aca.cjs"))),Se={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},Te=r.lazy(()=>Promise.resolve().then(()=>require("./submit-button-b363e0ed.cjs"))),ke={name:"Form:TextArea",image:"https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",inputs:[{advanced:!0,name:"value",type:"string"},{name:"name",type:"string",required:!0,helperText:'Every input in a form needs a unique name describing what it gets, e.g. "email"'},{name:"defaultValue",type:"string"},{name:"placeholder",type:"string",defaultValue:"Hello there"},{name:"required",type:"boolean",defaultValue:!1}],defaultStyles:{paddingTop:"10px",paddingBottom:"10px",paddingLeft:"10px",paddingRight:"10px",borderRadius:"3px",borderWidth:"1px",borderStyle:"solid",borderColor:"#ccc"},static:!0,noWrap:!0},Ie=r.lazy(()=>Promise.resolve().then(()=>require("./textarea-56a875bc.cjs"))),Ce={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:U,required:!0}],noWrap:!0,static:!0},we=r.lazy(()=>Promise.resolve().then(()=>require("./img-e0c8f7f9.cjs"))),Ve={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:ne,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:U,helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}],shouldReceiveBuilderProps:{builderBlock:!0}},Ee=()=>[{component:me,...ce},{component:fe,...pe},{component:he,...ge},{component:ye,...be},{component:Te,...Se},{component:ve,...xe},{component:Ie,...ke},{component:we,...Ce},{component:I.Video,...Ve}],N=()=>[{component:I.Button,...Z},{component:I.Columns,...ee},{component:I.Fragment,...te},{component:I.Image,...ae},{component:I.Section,...ie},{component:re,...oe},{component:I.Symbol,...le},{component:I.Text,...ue},{component:de,...se},{component:X,...Q},...Ee()],Re=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
2
- function getAndSetVariantId() {
3
- function setCookie(name, value, days) {
4
- let expires = '';
5
- if (days) {
6
- const date = new Date();
7
- date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
8
- expires = '; expires=' + date.toUTCString();
9
- }
10
- document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';
11
- }
12
- function getCookie(name) {
13
- const nameEQ = name + '=';
14
- const ca = document.cookie.split(';');
15
- for (let i = 0; i < ca.length; i++) {
16
- let c = ca[i];
17
- while (c.charAt(0) === ' ') c = c.substring(1, c.length);
18
- if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
19
- }
20
- return null;
21
- }
22
- const cookieName = \`builder.tests.\${contentId}\`;
23
- const variantInCookie = getCookie(cookieName);
24
- const availableIDs = variants.map(vr => vr.id).concat(contentId);
25
- if (variantInCookie && availableIDs.includes(variantInCookie)) {
26
- return variantInCookie;
27
- }
28
- let n = 0;
29
- const random = Math.random();
30
- for (let i = 0; i < variants.length; i++) {
31
- const variant = variants[i];
32
- const testRatio = variant.testRatio;
33
- n += testRatio;
34
- if (random < n) {
35
- setCookie(cookieName, variant.id);
36
- return variant.id;
37
- }
38
- }
39
- setCookie(cookieName, contentId);
40
- return contentId;
41
- }
42
- const winningVariantId = getAndSetVariantId();
43
- const styleEl = document.currentScript?.previousElementSibling;
44
- if (isHydrationTarget) {
45
- styleEl.remove();
46
- const thisScriptEl = document.currentScript;
47
- thisScriptEl?.remove();
48
- } else {
49
- const newStyleStr = variants.concat({
50
- id: contentId
51
- }).filter(variant => variant.id !== winningVariantId).map(value => {
52
- return \`.variant-\${value.id} { display: none; }
53
- \`;
54
- }).join('');
55
- styleEl.innerHTML = newStyleStr;
56
- }
57
- }`,Fe=`function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
58
- if (!navigator.cookieEnabled) {
59
- return;
60
- }
61
- function getCookie(name) {
62
- const nameEQ = name + '=';
63
- const ca = document.cookie.split(';');
64
- for (let i = 0; i < ca.length; i++) {
65
- let c = ca[i];
66
- while (c.charAt(0) === ' ') c = c.substring(1, c.length);
67
- if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
68
- }
69
- return null;
70
- }
71
- const cookieName = \`builder.tests.\${defaultContentId}\`;
72
- const winningVariant = getCookie(cookieName);
73
- const parentDiv = document.currentScript?.parentElement;
74
- const isDefaultContent = variantContentId === defaultContentId;
75
- const isWinningVariant = winningVariant === variantContentId;
76
- if (isWinningVariant && !isDefaultContent) {
77
- parentDiv?.removeAttribute('hidden');
78
- parentDiv?.removeAttribute('aria-hidden');
79
- } else if (!isWinningVariant && isDefaultContent) {
80
- parentDiv?.setAttribute('hidden', 'true');
81
- parentDiv?.setAttribute('aria-hidden', 'true');
82
- }
83
- if (isHydrationTarget) {
84
- if (!isWinningVariant) {
85
- parentDiv?.remove();
86
- }
87
- const thisScriptEl = document.currentScript;
88
- thisScriptEl?.remove();
89
- }
90
- return;
91
- }`,O="builderIoAbTest",J="builderIoRenderContent",q=e=>Object.values((e==null?void 0:e.variations)||{}).map(t=>({...t,testVariationId:t.id,id:e==null?void 0:e.id})),Pe=({canTrack:e,content:t})=>!(!(q(t).length>0)||!e||l.isBrowser()),Ae=e=>e==="react"||e==="reactNative",Y=Ae(l.TARGET),We=()=>`
92
- window.${O} = ${Re}
93
- window.${J} = ${Fe}
94
- `,qe=(e,t)=>`
95
- window.${O}(
96
- "${t}",${JSON.stringify(e)}, ${Y}
97
- )`,Be=({contentId:e,variationId:t})=>`window.${J}(
98
- "${t}", "${e}", ${Y}
99
- )`;function L(e){return g.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},"data-id":e.id,nonce:e.nonce||""})}function $(e){return Math.round(e*1e3)/1e3}const De=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let i=n?e:e.parentElement;do{if(!i)return null;if(t(i))return i}while(i=i.parentElement);return null},He=e=>De(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),_=({event:e,target:t})=>{const n=t.getBoundingClientRect(),i=e.clientX-n.left,u=e.clientY-n.top,p=$(i/n.width),a=$(u/n.height);return{x:p,y:a}},je=e=>{const t=e.target,n=t&&He(t),i=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:i||void 0,metadata:{targetOffset:t?_({event:e,target:t}):void 0,builderTargetOffset:n?_({event:e,target:n}):void 0,builderElementIndex:n&&i?[].slice.call(document.getElementsByClassName(i)).indexOf(n):void 0}}},Le=["svelte","qwik","vue"],z=()=>Le.includes(l.TARGET)&&(l.isEditing()||l.isPreviewing()),Ue=e=>{var p,a;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],i=(a=e.fileUrl)!=null?a:(p=e==null?void 0:e.files)==null?void 0:p.regular;let u="";if(i&&t&&n&&(u+=`
100
- @font-face {
101
- font-family: "${t}";
102
- src: local("${n}"), url('${i}') format('woff2');
103
- font-display: fallback;
104
- font-weight: 400;
105
- }
106
- `.trim()),e.files)for(const o in e.files){if(!(String(Number(o))===o))continue;const T=e.files[o];T&&T!==i&&(u+=`
107
- @font-face {
108
- font-family: "${t}";
109
- src: url('${T}') format('woff2');
110
- font-display: fallback;
111
- font-weight: ${o};
112
- }
113
- `.trim())}return u},Ne=({customFonts:e})=>{var t;return((t=e==null?void 0:e.map(n=>Ue(n)))==null?void 0:t.join(" "))||""},$e=({cssCode:e,contentId:t})=>e?t?(e==null?void 0:e.replace(/&/g,`div[builder-content-id="${t}"]`))||"":e:"",_e=`
114
- .builder-button {
115
- all: unset;
116
- }
117
-
118
- .builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
119
- margin: 0;
120
- }
121
- .builder-text > p, .builder-text > .builder-paragraph {
122
- color: inherit;
123
- line-height: inherit;
124
- letter-spacing: inherit;
125
- font-weight: inherit;
126
- font-size: inherit;
127
- text-align: inherit;
128
- font-family: inherit;
129
- }
130
- `,ze=e=>e?"":_e,Ke=e=>`variant-${e}`;function Me(e){var b,x,w;const t=r.useRef(null);function n(c){var h,s;const m={...e.builderContextSignal.rootState,...c};e.builderContextSignal.rootSetState?(s=(h=e.builderContextSignal).rootSetState)==null||s.call(h,m):e.setBuilderContextSignal(d=>({...d,rootState:m}))}function i(c){var h,s,d,y,k;const m={...e.builderContextSignal.content,...c,data:{...(h=e.builderContextSignal.content)==null?void 0:h.data,...c==null?void 0:c.data},meta:{...(s=e.builderContextSignal.content)==null?void 0:s.meta,...c==null?void 0:c.meta,breakpoints:((d=c==null?void 0:c.meta)==null?void 0:d.breakpoints)||((k=(y=e.builderContextSignal.content)==null?void 0:y.meta)==null?void 0:k.breakpoints)}};e.setBuilderContextSignal(S=>({...S,content:m}))}function u(){return e.showContent?{}:{hidden:!0,"aria-hidden":!0}}const[p,a]=r.useState(()=>e.contentWrapper||"div");function o(c){return l.createEditorListener({model:e.model,trustedHosts:e.trustedHosts,callbacks:{configureSdk:m=>{var d;const{breakpoints:h,contentId:s}=m;!s||s!==((d=e.builderContextSignal.content)==null?void 0:d.id)||h&&i({meta:{breakpoints:h}})},animation:m=>{R.triggerAnimation(m)},contentUpdate:m=>{i(m)}}})(c)}const[f,T]=r.useState(()=>({})),[v,E]=r.useState(()=>({})),[C,P]=r.useState(()=>!1);function A(c){var m,h;if(e.builderContextSignal.content){const s=(m=e.builderContextSignal.content)==null?void 0:m.testVariationId,d=(h=e.builderContextSignal.content)==null?void 0:h.id;l._track({apiHost:e.apiHost,type:"click",canTrack:l.getDefaultCanTrack(e.canTrack),contentId:d,apiKey:e.apiKey,variationId:s!==d?s:void 0,...je(c),unique:!C})}C||P(!0)}function W(){var m,h,s;const c=(s=(h=(m=e.builderContextSignal.content)==null?void 0:m.data)==null?void 0:h.httpRequests)!=null?s:{};Object.entries(c).forEach(([d,y])=>{if(!y||v[d]||f[d]&&!l.isEditing())return;v[d]=!0;const k=y.replace(/{{([^}]+)}}/g,(S,G)=>String(M.evaluate({code:G,context:e.context||{},localState:void 0,rootState:e.builderContextSignal.rootState,rootSetState:e.builderContextSignal.rootSetState})));l.logFetch(k),fetch(k).then(S=>S.json()).then(S=>{n({[d]:S}),f[d]=!0}).catch(S=>{console.error("error fetching dynamic data",y,S)}).finally(()=>{v[d]=!1})})}function V(){l.isEditing()&&window.dispatchEvent(new CustomEvent("builder:component:stateChange",{detail:{state:R.fastClone(e.builderContextSignal.rootState),ref:{name:e.model}}}))}const F=r.useRef(!1);return F.current||(W(),V(),F.current=!0),r.useEffect(()=>{var c,m;if(l.isBrowser()){if(l.isEditing()&&!e.isNestedRender&&(window.addEventListener("message",o),l.registerInsertMenu(),l.setupBrowserForEditing({...e.locale?{locale:e.locale}:{},...e.enrich?{enrich:e.enrich}:{},...e.trustedHosts?{trustedHosts:e.trustedHosts}:{}}),Object.values(e.builderContextSignal.componentInfos).forEach(s=>{var d,y;if(!e.model||!((d=s.models)!=null&&d.length)||s.models.includes(e.model)){const k=l.createRegisterComponentMessage(s);(y=window.parent)==null||y.postMessage(k,"*")}}),window.addEventListener("builder:component:stateChangeListenerActivated",V)),e.builderContextSignal.content&&l.getDefaultCanTrack(e.canTrack)){const s=(c=e.builderContextSignal.content)==null?void 0:c.testVariationId,d=(m=e.builderContextSignal.content)==null?void 0:m.id,y=e.apiKey;l._track({apiHost:e.apiHost,type:"impression",canTrack:!0,contentId:d,apiKey:y,variationId:s!==d?s:void 0})}if(l.isPreviewing()&&!l.isEditing()){const s=new URL(location.href).searchParams,d=s.get("builder.preview"),y=s.get(`builder.overrides.${d}`),k=s.get("apiKey")||s.get("builder.space");d===e.model&&k===e.apiKey&&(!e.content||y===e.content.id)&&l.fetchOneEntry({model:e.model,apiKey:e.apiKey,apiVersion:e.builderContextSignal.apiVersion}).then(S=>{S&&i(S)})}}},[]),r.useEffect(()=>{e.content&&i(e.content)},[e.content]),r.useEffect(()=>{V()},[e.builderContextSignal.rootState]),r.useEffect(()=>{e.data&&n(e.data)},[e.data]),r.useEffect(()=>{e.locale&&n({locale:e.locale})},[e.locale]),r.useEffect(()=>()=>{l.isBrowser()&&(window.removeEventListener("message",o),window.removeEventListener("builder:component:stateChangeListenerActivated",V))},[]),g.jsx(I.BuilderContext.Provider,{value:e.builderContextSignal,children:e.builderContextSignal.content||z()?g.jsx(p,{ref:t,onClick:c=>A(c),"builder-content-id":(b=e.builderContextSignal.content)==null?void 0:b.id,"builder-model":e.model,className:Ke(((x=e.content)==null?void 0:x.testVariationId)||((w=e.content)==null?void 0:w.id)),style:{display:!e.builderContextSignal.content&&z()?"none":void 0},...u(),...e.contentWrapperProps,children:e.children}):null})}function Oe(e){const[t,n]=r.useState(()=>`
131
- ${$e({cssCode:e.cssCode,contentId:e.contentId})}
132
- ${Ne({customFonts:e.customFonts})}
133
- ${ze(e.isNestedRender)}
134
- `.trim());return g.jsx(R.InlinedStyles,{id:"builderio-content",styles:t,nonce:e.nonce})}const Je=({content:e,data:t,locale:n})=>{var p,a,o;const i={},u=((p=e==null?void 0:e.data)==null?void 0:p.state)||{};return(o=(a=e==null?void 0:e.data)==null?void 0:a.inputs)==null||o.forEach(f=>{f.name&&f.defaultValue!==void 0&&(i[f.name]=f.defaultValue)}),{...i,...u,...t,...n?{locale:n}:{}}},Ye=({content:e,data:t})=>e?{...e,data:{...e==null?void 0:e.data,...t},meta:e==null?void 0:e.meta}:void 0;function K(e){var T,v,E,C,P,A,W,V,F;const[t,n]=r.useState(()=>{var b,x;return Be({variationId:(b=e.content)==null?void 0:b.testVariationId,contentId:(x=e.content)==null?void 0:x.id})});function i(b){o(x=>({...x,rootState:b}))}const[u,p]=r.useState(()=>[...N(),...e.customComponents||[]].reduce((b,{component:x,...w})=>({...b,[w.name]:{component:x,...l.serializeIncludingFunctions(w)}}),{})),[a,o]=r.useState(()=>({content:Ye({content:e.content,data:e.data}),localState:void 0,rootState:Je({content:e.content,data:e.data,locale:e.locale}),rootSetState:i,context:e.context||{},canTrack:e.canTrack,apiKey:e.apiKey,apiVersion:e.apiVersion,componentInfos:[...N(),...e.customComponents||[]].reduce((b,{component:x,...w})=>({...b,[w.name]:l.serializeIncludingFunctions(w)}),{}),inheritedStyles:{},BlocksWrapper:e.blocksWrapper||"div",BlocksWrapperProps:e.blocksWrapperProps||{},nonce:e.nonce||"",model:e.model||""})),f=r.useRef(!1);if(!f.current){e.apiKey||l.logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");const b=(v=(T=a.content)==null?void 0:T.data)==null?void 0:v.jsCode;b&&M.evaluate({code:b,context:e.context||{},localState:void 0,rootState:a.rootState,rootSetState:x=>{Object.assign(a.rootState,x)},isExpression:!1}),f.current=!0}return g.jsx(R.ComponentsContext.Provider,{value:{registeredComponents:u},children:g.jsxs(Me,{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:a,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts,isNestedRender:e.isNestedRender,setBuilderContextSignal:o,children:[e.isSsrAbTest?g.jsx(L,{id:"builderio-variant-visibility",scriptStr:t,nonce:e.nonce||""}):null,g.jsx(Oe,{nonce:e.nonce||"",isNestedRender:e.isNestedRender,contentId:(E=a.content)==null?void 0:E.id,cssCode:(P=(C=a.content)==null?void 0:C.data)==null?void 0:P.cssCode,customFonts:(W=(A=a.content)==null?void 0:A.data)==null?void 0:W.customFonts}),g.jsx(R.Blocks,{blocks:(F=(V=a.content)==null?void 0:V.data)==null?void 0:F.blocks,context:a,registeredComponents:u,linkComponent:e.linkComponent})]})})}function Ge(e){var a;const[t,n]=r.useState(()=>Pe({canTrack:l.getDefaultCanTrack(e.canTrack),content:e.content}));function i(){var o;return qe(q(e.content).map(f=>({id:f.testVariationId,testRatio:f.testRatio})),((o=e.content)==null?void 0:o.id)||"")}function u(){return q(e.content).map(o=>`.variant-${o.testVariationId} { display: none; } `).join("")}function p(){var o;return t?{...e.content,testVariationId:(o=e.content)==null?void 0:o.id}:l.handleABTestingSync({item:e.content,canTrack:l.getDefaultCanTrack(e.canTrack)})}return r.useEffect(()=>{},[]),g.jsxs(g.Fragment,{children:[!e.isNestedRender&&l.TARGET!=="reactNative"?g.jsx(L,{id:"builderio-init-variants-fns",scriptStr:We(),nonce:e.nonce||""}):null,t?g.jsxs(g.Fragment,{children:[g.jsx(R.InlinedStyles,{id:"builderio-variants",styles:u(),nonce:e.nonce||""}),g.jsx(L,{id:"builderio-variants-visibility",scriptStr:i(),nonce:e.nonce||""}),(a=q(e.content))==null?void 0:a.map(o=>g.jsx(K,{apiHost:e.apiHost,isNestedRender:e.isNestedRender,nonce:e.nonce,content:o,showContent:!1,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts},o.testVariationId))]}):null,g.jsx(K,{apiHost:e.apiHost,nonce:e.nonce,isNestedRender:e.isNestedRender,content:p(),showContent:!0,model:e.model,data:e.data,context:e.context,apiKey:e.apiKey,apiVersion:e.apiVersion,customComponents:e.customComponents,linkComponent:e.linkComponent,canTrack:e.canTrack,locale:e.locale,enrich:e.enrich,isSsrAbTest:t,blocksWrapper:e.blocksWrapper,blocksWrapperProps:e.blocksWrapperProps,contentWrapper:e.contentWrapper,contentWrapperProps:e.contentWrapperProps,trustedHosts:e.trustedHosts})]})}exports.default=Ge;
@@ -1,19 +0,0 @@
1
- "use strict";const q=require("./server-entry-de142ee8.cjs"),kr=(e,t,n)=>{const r=String.prototype.split.call(t,/[,[\].]+?/).filter(Boolean).reduce((i,s)=>i!=null?i[s]:i,e);return r===void 0||r===e?n:r},Or=({builder:e,context:t,event:n,state:r})=>Object.entries({state:r,Builder:e,builder:e,context:t,event:n}),Jr=()=>({isEditing:q.isEditing(),isBrowser:q.isBrowser(),isServer:!q.isBrowser(),getUserAttributes:()=>q.getUserAttributes()}),$r=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e;function At({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(r,i)=>{if(t&&i in t)return t[i];const s=r[i];return typeof s=="object"&&s!==null?At({rootState:s,localState:void 0,rootSetState:n?u=>{r[i]=u,n(r)}:void 0}):s},set:(r,i,s)=>{if(t&&i in t)throw new Error("Writing to local state is not allowed as it is read-only.");return r[i]=s,n==null||n(r),!0}})}const Kr=({code:e,builder:t,context:n,event:r,localState:i,rootSetState:s,rootState:u})=>{const h=Or({builder:t,context:n,event:r,state:At({rootState:u,localState:i,rootSetState:s})});return new Function(...h.map(([d])=>d),e)(...h.map(([,d])=>d))};var O,Zr=function(e){function t(o){return 48>o?o===36:58>o?!0:65>o?!1:91>o?!0:97>o?o===95:123>o?!0:170<=o&&Hr.test(String.fromCharCode(o))}function n(o){return 65>o?o===36:91>o?!0:97>o?o===95:123>o?!0:170<=o&&dr.test(String.fromCharCode(o))}function r(o,a){for(var l=g,p=1,E=0;;){Ze.lastIndex=E;var M=Ze.exec(l);if(M&&M.index<o)++p,E=M.index+M[0].length;else break}throw l={line:p,ab:o-E},a+=" ("+l.line+":"+l.ab+")",a=new SyntaxError(a),a.j=o,a.X=l,a.o=c,a}function i(o){o=o.split(" ");for(var a=Object.create(null),l=0;l<o.length;l++)a[o[l]]=!0;return function(p){return a[p]||!1}}function s(){this.line=le,this.ab=c-K}function u(o,a){he=c,j.C&&(lt=new s),w=o,d(),V=a,Ce=o.m}function h(){for(var o=c,a=j.va&&j.C&&new s,l=g.charCodeAt(c+=2);c<fe&&l!==10&&l!==13&&l!==8232&&l!==8233;)++c,l=g.charCodeAt(c);j.va&&j.va(!1,g.slice(o+2,c),o,c,a,j.C&&new s)}function d(){for(;c<fe;){var o=g.charCodeAt(c);if(o===32)++c;else if(o===13)++c,o=g.charCodeAt(c),o===10&&++c,j.C&&(++le,K=c);else if(o===10||o===8232||o===8233)++c,j.C&&(++le,K=c);else if(8<o&&14>o)++c;else if(o===47)if(o=g.charCodeAt(c+1),o===42){o=void 0;var a=j.va&&j.C&&new s,l=c,p=g.indexOf("*/",c+=2);if(p===-1&&r(c-2,"Unterminated comment"),c=p+2,j.C)for(Ze.lastIndex=l;(o=Ze.exec(g))&&o.index<c;)++le,K=o.index+o[0].length;j.va&&j.va(!0,g.slice(l+2,p),l,c,a,j.C&&new s)}else if(o===47)h();else break;else if(o===160)++c;else if(5760<=o&&Wr.test(String.fromCharCode(o)))++c;else break}}function N(o){switch(o){case 46:o=g.charCodeAt(c+1),48<=o&&57>=o?qe(!0):(++c,u(lr));return;case 40:return++c,u(Z);case 41:return++c,u(H);case 59:return++c,u(z);case 44:return++c,u(se);case 91:return++c,u(wt);case 93:return++c,u(Et);case 123:return++c,u(Te);case 125:return++c,u(ve);case 58:return++c,u(Ne);case 63:return++c,u(cr);case 48:if(o=g.charCodeAt(c+1),o===120||o===88){c+=2,o=Y(16),o===null&&r(R+2,"Expected hexadecimal number"),n(g.charCodeAt(c))&&r(c,"Identifier directly after number"),u(Ie,o);return}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return qe(!1);case 34:case 39:c++;for(var a="";;){c>=fe&&r(R,"Unterminated string constant");var l=g.charCodeAt(c);if(l===o){++c,u(Ye,a);break}if(l===92){l=g.charCodeAt(++c);var p=/^[0-7]+/.exec(g.slice(c,c+3));for(p&&(p=p[0]);p&&255<parseInt(p,8);)p=p.slice(0,-1);if(p==="0"&&(p=null),++c,p)X&&r(c-2,"Octal literal in strict mode"),a+=String.fromCharCode(parseInt(p,8)),c+=p.length-1;else switch(l){case 110:a+=`
2
- `;break;case 114:a+="\r";break;case 120:a+=String.fromCharCode(G(2));break;case 117:a+=String.fromCharCode(G(4));break;case 85:a+=String.fromCharCode(G(8));break;case 116:a+=" ";break;case 98:a+="\b";break;case 118:a+="\v";break;case 102:a+="\f";break;case 48:a+="\0";break;case 13:g.charCodeAt(c)===10&&++c;case 10:j.C&&(K=c,++le);break;default:a+=String.fromCharCode(l)}}else l!==13&&l!==10&&l!==8232&&l!==8233||r(R,"Unterminated string constant"),a+=String.fromCharCode(l),++c}return;case 47:o=g.charCodeAt(c+1),Ce?(++c,Xe()):o===61?C(ce,2):C(pr,1);return;case 37:case 42:g.charCodeAt(c+1)===61?C(ce,2):C(Gr,1);return;case 124:case 38:a=g.charCodeAt(c+1),a===o?C(o===124?gr:vr,2):a===61?C(ce,2):C(o===124?_r:Dr,1);return;case 94:g.charCodeAt(c+1)===61?C(ce,2):C(br,1);return;case 43:case 45:a=g.charCodeAt(c+1),a===o?a===45&&g.charCodeAt(c+2)===62&&Ke.test(g.slice(oe,c))?(c+=3,h(),d(),P()):C(Mr,2):a===61?C(ce,2):C(Br,1);return;case 60:case 62:a=g.charCodeAt(c+1),l=1,a===o?(l=o===62&&g.charCodeAt(c+2)===62?3:2,g.charCodeAt(c+l)===61?C(ce,l+1):C(Lr,l)):a===33&&o===60&&g.charCodeAt(c+2)===45&&g.charCodeAt(c+3)===45?(c+=4,h(),d(),P()):(a===61&&(l=g.charCodeAt(c+2)===61?3:2),C(Fr,l));return;case 61:case 33:g.charCodeAt(c+1)===61?C(Ur,g.charCodeAt(c+2)===61?3:2):C(o===61?fr:hr,1);return;case 126:return C(hr,1)}return!1}function P(o){if(o?c=R+1:R=c,j.C&&(ut=new s),o)return Xe();if(c>=fe)return u(ft);if(o=g.charCodeAt(c),n(o)||o===92)return pe();if(N(o)===!1){if(o=String.fromCharCode(o),o==="\\"||dr.test(o))return pe();r(c,"Unexpected character '"+o+"'")}}function C(o,a){var l=g.slice(c,c+a);c+=a,u(o,l)}function Xe(){for(var o,a,l=c;;){c>=fe&&r(l,"Unterminated regexp");var p=g.charAt(c);if(Ke.test(p)&&r(l,"Unterminated regexp"),o)o=!1;else{if(p==="[")a=!0;else if(p==="]"&&a)a=!1;else if(p==="/"&&!a)break;o=p==="\\"}++c}o=g.slice(l,c),++c,(a=ne())&&!/^[gmi]*$/.test(a)&&r(l,"Invalid regexp flag");try{var E=new RegExp(o,a)}catch(M){throw M instanceof SyntaxError&&r(l,M.message),M}u(Wt,E)}function Y(o,a){for(var l=c,p=0,E=a===void 0?1/0:a,M=0;M<E;++M){var F=g.charCodeAt(c);if(F=97<=F?F-97+10:65<=F?F-65+10:48<=F&&57>=F?F-48:1/0,F>=o)break;++c,p=p*o+F}return c===l||a!==void 0&&c-l!==a?null:p}function qe(o){var a=c,l=!1,p=g.charCodeAt(c)===48;o||Y(10)!==null||r(a,"Invalid number"),g.charCodeAt(c)===46&&(++c,Y(10),l=!0),o=g.charCodeAt(c),(o===69||o===101)&&(o=g.charCodeAt(++c),o!==43&&o!==45||++c,Y(10)===null&&r(a,"Invalid number"),l=!0),n(g.charCodeAt(c))&&r(c,"Identifier directly after number"),o=g.slice(a,c);var E;l?E=parseFloat(o):p&&o.length!==1?/[89]/.test(o)||X?r(a,"Invalid number"):E=parseInt(o,8):E=parseInt(o,10),u(Ie,E)}function G(o){return o=Y(16,o),o===null&&r(R,"Bad character escape sequence"),o}function ne(){ye=!1;for(var o,a=!0,l=c;;){var p=g.charCodeAt(c);if(t(p))ye&&(o+=g.charAt(c)),++c;else if(p===92){ye||(o=g.slice(l,c)),ye=!0,g.charCodeAt(++c)!==117&&r(c,"Expecting Unicode escape sequence \\uXXXX"),++c,p=G(4);var E=String.fromCharCode(p);E||r(c-1,"Invalid Unicode escape"),(a?n(p):t(p))||r(c-4,"Invalid Unicode escape"),o+=E}else break;a=!1}return ye?o:g.slice(l,c)}function pe(){var o=ne(),a=ge;!ye&&Vr(o)&&(a=Rr[o]),u(a,o)}function S(){ct=R,oe=he,pt=lt,P()}function je(o){if(X=o,c=R,j.C)for(;c<K;)K=g.lastIndexOf(`
3
- `,K-2)+1,--le;d(),P()}function Lt(){this.type=null,this.start=R,this.end=null}function Bt(){this.start=ut,this.end=null,at&&(this.source=at)}function b(){var o=new Lt;return j.C&&(o.X=new Bt),j.vb&&(o.sourceFile=j.vb),j.Xa&&(o.j=[R,0]),o}function ie(o){var a=new Lt;return a.start=o.start,j.C&&(a.X=new Bt,a.X.start=o.X.start),j.Xa&&(a.j=[o.j[0],0]),a}function x(o,a){return o.type=a,o.end=oe,j.C&&(o.X.end=pt),j.Xa&&(o.j[1]=oe),o}function et(o){return o.type==="ExpressionStatement"&&o.la.type==="Literal"&&o.la.value==="use strict"}function A(o){return w===o?(S(),!0):!1}function Ve(){return!j.fc&&(w===ft||w===ve||Ke.test(g.slice(oe,R)))}function ue(){A(z)||Ve()||J()}function I(o){w===o?S():J()}function J(){r(R,"Unexpected token")}function We(o){o.type!=="Identifier"&&o.type!=="MemberExpression"&&r(o.start,"Assigning to rvalue"),X&&o.type==="Identifier"&&$e(o.name)&&r(o.start,"Assigning to "+o.name+" in strict mode")}function W(){(w===pr||w===ce&&V==="/=")&&P(!0);var o=w,a=b();switch(o){case ht:case Yt:S();var l=o===ht;A(z)||Ve()?a.label=null:w!==ge?J():(a.label=$(),ue());for(var p=0;p<T.length;++p){var E=T[p];if((a.label===null||E.name===a.label.name)&&(E.kind!==null&&(l||E.kind==="loop")||a.label&&l))break}return p===T.length&&r(a.start,"Unsyntactic "+o.l),x(a,l?"BreakStatement":"ContinueStatement");case Jt:return S(),ue(),x(a,"DebuggerStatement");case Kt:return S(),T.push(xt),a.body=W(),T.pop(),I(mt),a.test=Se(),ue(),x(a,"DoWhileStatement");case Qt:return S(),T.push(xt),I(Z),w===z?tt(a,null):w===dt?(o=b(),S(),Xt(o,!0),x(o,"VariableDeclaration"),o.fa.length===1&&A(Je)?Gt(a,o):tt(a,o)):(o=U(!1,!0),A(Je)?(We(o),Gt(a,o)):tt(a,o));case vt:return S(),ot(a,!0);case qt:return S(),a.test=Se(),a.da=W(),a.alternate=A(Zt)?W():null,x(a,"IfStatement");case er:return Ae||j.Ib||r(R,"'return' outside of function"),S(),A(z)||Ve()?a.K=null:(a.K=U(),ue()),x(a,"ReturnStatement");case yt:for(S(),a.Qb=Se(),a.tb=[],I(Te),T.push(Yr);w!==ve;)w===gt||w===$t?(o=w===gt,p&&x(p,"SwitchCase"),a.tb.push(p=b()),p.da=[],S(),o?p.test=U():(l&&r(ct,"Multiple default clauses"),l=!0,p.test=null),I(Ne)):(p||J(),p.da.push(W()));return p&&x(p,"SwitchCase"),S(),T.pop(),x(a,"SwitchStatement");case tr:return S(),Ke.test(g.slice(oe,R))&&r(oe,"Illegal newline after throw"),a.K=U(),ue(),x(a,"ThrowStatement");case rr:return S(),a.block=ke(),a.Ea=null,w===Ht&&(o=b(),S(),I(Z),o.Ua=$(),X&&$e(o.Ua.name)&&r(o.Ua.start,"Binding "+o.Ua.name+" in strict mode"),I(H),o.body=ke(),a.Ea=x(o,"CatchClause")),a.fb=A(zt)?ke():null,a.Ea||a.fb||r(a.start,"Missing catch or finally clause"),x(a,"TryStatement");case dt:return S(),Xt(a),ue(),x(a,"VariableDeclaration");case mt:return S(),a.test=Se(),T.push(xt),a.body=W(),T.pop(),x(a,"WhileStatement");case nr:return X&&r(R,"'with' in strict mode"),S(),a.object=Se(),a.body=W(),x(a,"WithStatement");case Te:return ke();case z:return S(),x(a,"EmptyStatement");default:if(l=V,E=U(),o===ge&&E.type==="Identifier"&&A(Ne)){for(p=0;p<T.length;++p)T[p].name===l&&r(E.start,"Label '"+l+"' is already declared");return T.push({name:l,kind:w.W?"loop":w===yt?"switch":null}),a.body=W(),T.pop(),a.label=E,x(a,"LabeledStatement")}return a.la=E,ue(),x(a,"ExpressionStatement")}}function Se(){I(Z);var o=U();return I(H),o}function ke(o){var a=b(),l=!0,p=!1;for(a.body=[],I(Te);!A(ve);){var E=W();if(a.body.push(E),l&&o&&et(E)){var M=p;je(p=!0)}l=!1}return p&&!M&&je(!1),x(a,"BlockStatement")}function tt(o,a){return o.ua=a,I(z),o.test=w===z?null:U(),I(z),o.update=w===H?null:U(),I(H),o.body=W(),T.pop(),x(o,"ForStatement")}function Gt(o,a){return o.left=a,o.right=U(),I(H),o.body=W(),T.pop(),x(o,"ForInStatement")}function Xt(o,a){for(o.fa=[],o.kind="var";;){var l=b();if(l.id=$(),X&&$e(l.id.name)&&r(l.id.start,"Binding "+l.id.name+" in strict mode"),l.ua=A(fr)?U(!0,a):null,o.fa.push(x(l,"VariableDeclarator")),!A(se))break}}function U(o,a){var l=rt(a);if(!o&&w===se){for(o=ie(l),o.xb=[l];A(se);)o.xb.push(rt(a));return x(o,"SequenceExpression")}return l}function rt(o){var a=nt(it(),-1,o);if(A(cr)){var l=ie(a);l.test=a,l.da=U(!0),I(Ne),l.alternate=U(!0,o),a=x(l,"ConditionalExpression")}return w.Cb?(l=ie(a),l.operator=V,l.left=a,S(),l.right=rt(o),We(a),x(l,"AssignmentExpression")):a}function nt(o,a,l){var p=w.L;if(p!==null&&(!l||w!==Je)&&p>a){var E=ie(o);return E.left=o,E.operator=V,o=w,S(),E.right=nt(it(),p,l),p=x(E,o===gr||o===vr?"LogicalExpression":"BinaryExpression"),nt(p,a,l)}return o}function it(){if(w.prefix){var o=b(),a=w.$b;return o.operator=V,Ce=o.prefix=!0,S(),o.K=it(),a?We(o.K):X&&o.operator==="delete"&&o.K.type==="Identifier"&&r(o.start,"Deleting local variable in strict mode"),x(o,a?"UpdateExpression":"UnaryExpression")}for(a=Oe(He());w.cc&&!Ve();)o=ie(a),o.operator=V,o.prefix=!1,o.K=a,We(a),S(),a=x(o,"UpdateExpression");return a}function Oe(o,a){if(A(lr)){var l=ie(o);return l.object=o,l.Wa=$(!0),l.bb=!1,Oe(x(l,"MemberExpression"),a)}return A(wt)?(l=ie(o),l.object=o,l.Wa=U(),l.bb=!0,I(Et),Oe(x(l,"MemberExpression"),a)):!a&&A(Z)?(l=ie(o),l.callee=o,l.arguments=st(H,!1),Oe(x(l,"CallExpression"),a)):o}function He(){switch(w){case or:var o=b();return S(),x(o,"ThisExpression");case ge:return $();case Ie:case Ye:case Wt:return o=b(),o.value=V,o.raw=g.slice(R,he),S(),x(o,"Literal");case sr:case ar:case ur:return o=b(),o.value=w.$a,o.raw=w.l,S(),x(o,"Literal");case Z:o=ut;var a=R;S();var l=U();return l.start=a,l.end=he,j.C&&(l.X.start=o,l.X.end=lt),j.Xa&&(l.j=[a,he]),I(H),l;case wt:return o=b(),S(),o.elements=st(Et,!0,!0),x(o,"ArrayExpression");case Te:for(o=b(),a=!0,l=!1,o.h=[],S();!A(ve);){if(a)a=!1;else if(I(se),j.sb&&A(ve))break;var p={key:w===Ie||w===Ye?He():$(!0)},E=!1;if(A(Ne)){p.value=U(!0);var M=p.kind="init"}else p.key.type!=="Identifier"||p.key.name!=="get"&&p.key.name!=="set"?J():(E=l=!0,M=p.kind=p.key.name,p.key=w===Ie||w===Ye?He():$(!0),w!==Z&&J(),p.value=ot(b(),!1));if(p.key.type==="Identifier"&&(X||l))for(var F=0;F<o.h.length;++F){var de=o.h[F];if(de.key.name===p.key.name){var jt=M===de.kind||E&&de.kind==="init"||M==="init"&&(de.kind==="get"||de.kind==="set");jt&&!X&&M==="init"&&de.kind==="init"&&(jt=!1),jt&&r(p.key.start,"Redefinition of property")}}o.h.push(p)}return x(o,"ObjectExpression");case vt:return o=b(),S(),ot(o,!1);case ir:return o=b(),S(),o.callee=Oe(He(),!0),o.arguments=A(Z)?st(H,!1):Pr,x(o,"NewExpression")}J()}function ot(o,a){w===ge?o.id=$():a?J():o.id=null,o.oa=[];var l=!0;for(I(Z);!A(H);)l?l=!1:I(se),o.oa.push($());l=Ae;var p=T;if(Ae=!0,T=[],o.body=ke(!0),Ae=l,T=p,X||o.body.body.length&&et(o.body.body[0])){for(l=o.id?-1:0;l<o.oa.length;++l)if(p=0>l?o.id:o.oa[l],(yr(p.name)||$e(p.name))&&r(p.start,"Defining '"+p.name+"' in strict mode"),0<=l)for(var E=0;E<l;++E)p.name===o.oa[E].name&&r(p.start,"Argument name clash in strict mode")}return x(o,a?"FunctionDeclaration":"FunctionExpression")}function st(o,a,l){for(var p=[],E=!0;!A(o);){if(E)E=!1;else if(I(se),a&&j.sb&&A(o))break;p.push(l&&w===se?null:U(!0))}return p}function $(o){var a=b();return o&&j.yb==="everywhere"&&(o=!1),w===ge?(!o&&(j.yb&&Xr(V)||X&&yr(V))&&g.slice(R,he).indexOf("\\")===-1&&r(R,"The keyword '"+V+"' is reserved"),a.name=V):o&&w.l?a.name=w.l:J(),Ce=!1,S(),x(a,"Identifier")}e.version="0.5.0";var j,g="",fe,at;e.parse=function(o,a){g=String(o),fe=g.length,j=a||{};for(var l in Vt)Object.prototype.hasOwnProperty.call(j,l)||(j[l]=Vt[l]);for(at=j.sourceFile,le=1,c=K=0,Ce=!0,d(),l=j.dc,ct=oe=c,j.C&&(pt=new s),Ae=X=!1,T=[],P(),o=l||b(),a=!0,l||(o.body=[]);w!==ft;)l=W(),o.body.push(l),a&&et(l)&&je(!0),a=!1;return x(o,"Program")};var Vt={fc:!1,sb:!0,yb:!1,Ib:!1,C:!1,va:null,Xa:!1,dc:null,sourceFile:null,vb:null},c=0,R=0,he=0,ut,lt,w,V,Ce,le,K,ct=0,oe=0,pt,Ae,T,X,Pr=[],Ie={type:"num"},Wt={type:"regexp"},Ye={type:"string"},ge={type:"name"},ft={type:"eof"},ht={l:"break"},gt={l:"case",m:!0},Ht={l:"catch"},Yt={l:"continue"},Jt={l:"debugger"},$t={l:"default"},Kt={l:"do",W:!0},Zt={l:"else",m:!0},zt={l:"finally"},Qt={l:"for",W:!0},vt={l:"function"},qt={l:"if"},er={l:"return",m:!0},yt={l:"switch"},tr={l:"throw",m:!0},rr={l:"try"},dt={l:"var"},mt={l:"while",W:!0},nr={l:"with"},ir={l:"new",m:!0},or={l:"this"},sr={l:"null",$a:null},ar={l:"true",$a:!0},ur={l:"false",$a:!1},Je={l:"in",L:7,m:!0},Rr={break:ht,case:gt,catch:Ht,continue:Yt,debugger:Jt,default:$t,do:Kt,else:Zt,finally:zt,for:Qt,function:vt,if:qt,return:er,switch:yt,throw:tr,try:rr,var:dt,while:mt,with:nr,null:sr,true:ar,false:ur,new:ir,in:Je,instanceof:{l:"instanceof",L:7,m:!0},this:or,typeof:{l:"typeof",prefix:!0,m:!0},void:{l:"void",prefix:!0,m:!0},delete:{l:"delete",prefix:!0,m:!0}},wt={type:"[",m:!0},Et={type:"]"},Te={type:"{",m:!0},ve={type:"}"},Z={type:"(",m:!0},H={type:")"},se={type:",",m:!0},z={type:";",m:!0},Ne={type:":",m:!0},lr={type:"."},cr={type:"?",m:!0},pr={L:10,m:!0},fr={Cb:!0,m:!0},ce={Cb:!0,m:!0},Mr={cc:!0,prefix:!0,$b:!0},hr={prefix:!0,m:!0},gr={L:1,m:!0},vr={L:2,m:!0},_r={L:3,m:!0},br={L:4,m:!0},Dr={L:5,m:!0},Ur={L:6,m:!0},Fr={L:7,m:!0},Lr={L:8,m:!0},Br={L:9,prefix:!0,m:!0},Gr={L:10,m:!0},Xr=i("class enum extends super const export import"),yr=i("implements interface let package private protected public static yield"),$e=i("eval arguments"),Vr=i("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"),Wr=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,dr=RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),Hr=RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]"),Ke=/[\n\r\u2028\u2029]/,Ze=/\r\n|[\n\r\u2028\u2029]/g,ye,xt={kind:"loop"},Yr={kind:"switch"}},kt=kt=typeof globalThis=="undefined"?void 0:globalThis;Zr(kt.j||(kt.j={}));function f(e,t){typeof e=="string"&&(e=we(e,"code"));var n=e.constructor;this.ya=function(){return new n({options:{}})};var r=this.ya(),i;for(i in e)r[i]=i==="body"?e[i].slice():e[i];this.ra=r,this.ca=[],this.qb=t,this.za=!1,this.ba=[],this.Ya=0,this.rb=Object.create(null),e=/^step([A-Z]\w*)$/;var s,u;for(u in this)typeof this[u]=="function"&&(s=u.match(e))&&(this.rb[s[1]]=this[u].bind(this));this.N=Ct(this,this.ra,null),this.Na=this.N.object,this.ra=we(this.ba.join(`
4
- `),"polyfills"),this.ba=void 0,ze(this.ra),s=new y(this.ra,this.N),s.done=!1,this.o=[s],this.Eb(),this.value=void 0,this.ra=r,s=new y(this.ra,this.N),s.done=!1,this.o.length=0,this.o[0]=s}var mr={C:!0,kc:5},It={configurable:!0,enumerable:!0,writable:!1},v={configurable:!0,enumerable:!1,writable:!0},B={configurable:!0,enumerable:!1,writable:!1},Pe={configurable:!1,enumerable:!1,writable:!1},wr={configurable:!1,enumerable:!0,writable:!0},Cr={STEP_ERROR:!0},xe={SCOPE_REFERENCE:!0},Fe={VALUE_IN_DESCRIPTOR:!0},me={REGEXP_TIMEOUT:!0},Er=[],ee=null,De=null,ae=typeof globalThis=="undefined"?void 0:globalThis,zr=["onmessage = function(e) {","var result;","var data = e.data;","switch (data[0]) {","case 'split':","result = data[1].split(data[2], data[3]);","break;","case 'match':","result = data[1].match(data[2]);","break;","case 'search':","result = data[1].search(data[2]);","break;","case 'replace':","result = data[1].replace(data[2], data[3]);","break;","case 'exec':","var regexp = data[1];","regexp.lastIndex = data[2];","result = [regexp.exec(data[3]), data[1].lastIndex];","break;","default:","throw Error('Unknown RegExp operation: ' + data[0]);","}","postMessage(result);","close();","};"];function Tt(e){var t=e>>>0;return t===Number(e)?t:NaN}function Ue(e){var t=e>>>0;return String(t)===String(e)&&t!==4294967295?t:NaN}function ze(e,t,n){t?e.start=t:delete e.start,n?e.end=n:delete e.end;for(var r in e)if(r!=="loc"&&e.hasOwnProperty(r)){var i=e[r];i&&typeof i=="object"&&ze(i,t,n)}}f.prototype.REGEXP_MODE=2;f.prototype.REGEXP_THREAD_TIMEOUT=1e3;f.prototype.POLYFILL_TIMEOUT=1e3;O=f.prototype;O.P=!1;O.Ka=!1;O.Kb=0;O.ic=0;function we(e,t){var n={},r;for(r in mr)n[r]=mr[r];return n.sourceFile=t,ae.j.parse(e,n)}O.Jb=function(e){var t=this.o[0];if(!t||t.node.type!=="Program")throw Error("Expecting original AST to start with a Program node");if(typeof e=="string"&&(e=we(e,"appendCode"+this.Kb++)),!e||e.type!=="Program")throw Error("Expecting new AST to start with a Program node");Le(this,e,t.scope),Array.prototype.push.apply(t.node.body,e.body),t.node.body.jb=null,t.done=!1};O.lb=function(){var e=this.o,t;do{var n=e[e.length-1];if(this.za)break;if(!n||n.node.type==="Program"&&n.done){if(!this.ca.length)return!1;if(n=this.ca[0],!n||n.time>Date.now())n=null;else{this.ca.shift(),0<=n.interval&&Tr(this,n,n.interval);var r=new y(n.node,n.scope);n.zb&&(r.ia=2,r.B=this.Na,r.U=n.zb,r.Qa=!0,r.F=n.Lb),n=r}if(!n)break}r=n.node;var i=De;De=this;try{var s=this.rb[r.type](e,n,r)}catch(u){if(u!==Cr)throw this.value!==u&&(this.value=void 0),u}finally{De=i}if(s&&e.push(s),this.P)throw this.value=void 0,Error("Getter not supported in this context");if(this.Ka)throw this.value=void 0,Error("Setter not supported in this context");t||r.end||(t=Date.now()+this.POLYFILL_TIMEOUT)}while(!r.end&&t>Date.now());return!0};O.Eb=function(){for(;!this.za&&this.lb(););return this.za};function Qr(e,t){e.g(t,"NaN",NaN,Pe),e.g(t,"Infinity",1/0,Pe),e.g(t,"undefined",void 0,Pe),e.g(t,"window",t,It),e.g(t,"this",t,Pe),e.g(t,"self",t),e.M=new k(null),e.Z=new k(e.M),qr(e,t),en(e,t),t.xa=e.M,e.g(t,"constructor",e.v,v),tn(e,t),rn(e,t),nn(e,t),on(e,t),sn(e,t),an(e,t),un(e,t),ln(e,t),cn(e,t);var n=e.i(function(){throw EvalError("Can't happen")},!1);n.eval=!0,e.g(t,"eval",n,v),e.g(t,"parseInt",e.i(parseInt,!1),v),e.g(t,"parseFloat",e.i(parseFloat,!1),v),e.g(t,"isNaN",e.i(isNaN,!1),v),e.g(t,"isFinite",e.i(isFinite,!1),v);for(var r=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],i=0;i<r.length;i++)n=function(s){return function(u){try{return s(u)}catch(h){m(e,e.Gb,h.message)}}}(r[i][0]),e.g(t,r[i][1],e.i(n,!1),v);n=function(s){return xr(e,!1,arguments)},e.g(t,"setTimeout",e.i(n,!1),v),n=function(s){return xr(e,!0,arguments)},e.g(t,"setInterval",e.i(n,!1),v),n=function(s){jr(e,s)},e.g(t,"clearTimeout",e.i(n,!1),v),n=function(s){jr(e,s)},e.g(t,"clearInterval",e.i(n,!1),v),e.OBJECT=e.v,e.OBJECT_PROTO=e.M,e.FUNCTION=e.O,e.FUNCTION_PROTO=e.Z,e.ARRAY=e.qa,e.ARRAY_PROTO=e.La,e.REGEXP=e.I,e.REGEXP_PROTO=e.Ma,e.DATE=e.$,e.DATE_PROTO=e.nb,e.qb&&e.qb(e,t)}O.Wb=0;function qr(e,t){var n=/^[A-Za-z_$][\w$]*$/,r=function(i){var s=arguments.length?String(arguments[arguments.length-1]):"",u=Array.prototype.slice.call(arguments,0,-1).join(",").trim();if(u){u=u.split(/\s*,\s*/);for(var h=0;h<u.length;h++){var d=u[h];n.test(d)||m(e,e.T,"Invalid function argument: "+d)}u=u.join(", ")}try{var N=we("(function("+u+") {"+s+"})","function"+e.Wb++)}catch(P){m(e,e.T,"Invalid code: "+P.message)}return N.body.length!==1&&m(e,e.T,"Invalid code in function body"),Rt(e,N.body[0].la,e.N,"anonymous")};e.O=e.i(r,!0),e.g(t,"Function",e.O,v),e.g(e.O,"prototype",e.Z,v),e.g(e.Z,"constructor",e.O,v),e.Z.Ta=function(){},e.Z.Ta.id=e.Ya++,e.Z.Ab=!0,e.g(e.Z,"length",0,B),e.Z.H="Function",r=function(i,s){var u=e.o[e.o.length-1];u.U=this,u.B=i,u.F=[],s!=null&&(s instanceof k?u.F=Ar(e,s):m(e,e.j,"CreateListFromArrayLike called on non-object")),u.eb=!1},_(e,e.O,"apply",r),r=function(i){var s=e.o[e.o.length-1];s.U=this,s.B=i,s.F=[];for(var u=1;u<arguments.length;u++)s.F.push(arguments[u]);s.eb=!1},_(e,e.O,"call",r),e.ba.push("Object.defineProperty(Function.prototype, 'bind',","{configurable: true, writable: true, value:","function bind(oThis) {","if (typeof this !== 'function') {","throw TypeError('What is trying to be bound is not callable');","}","var aArgs = Array.prototype.slice.call(arguments, 1),","fToBind = this,","fNOP = function() {},","fBound = function() {","return fToBind.apply(this instanceof fNOP","? this",": oThis,","aArgs.concat(Array.prototype.slice.call(arguments)));","};","if (this.prototype) {","fNOP.prototype = this.prototype;","}","fBound.prototype = new fNOP();","return fBound;","}","});",""),r=function(){return String(this)},_(e,e.O,"toString",r),e.g(e.O,"toString",e.i(r,!1),v),r=function(){return this.valueOf()},_(e,e.O,"valueOf",r),e.g(e.O,"valueOf",e.i(r,!1),v)}function en(e,t){function n(i){i!=null||m(e,e.j,"Cannot convert '"+i+"' to object")}var r=function(i){if(i==null)return re(e)?this:e.s(e.M);if(!(i instanceof k)){var s=e.s(te(e,i));return s.data=i,s}return i};e.v=e.i(r,!0),e.g(e.v,"prototype",e.M,v),e.g(e.M,"constructor",e.v,v),e.g(t,"Object",e.v,v),r=function(i){return n(i),Q(e,Object.getOwnPropertyNames(i instanceof k?i.h:i))},e.g(e.v,"getOwnPropertyNames",e.i(r,!1),v),r=function(i){return n(i),i instanceof k&&(i=i.h),Q(e,Object.keys(i))},e.g(e.v,"keys",e.i(r,!1),v),r=function(i){return i===null?e.s(null):(i instanceof k||m(e,e.j,"Object prototype may only be an Object or null, not "+i),e.s(i))},e.g(e.v,"create",e.i(r,!1),v),e.ba.push("(function() {","var create_ = Object.create;","Object.create = function create(proto, props) {","var obj = create_(proto);","props && Object.defineProperties(obj, props);","return obj;","};","})();",""),r=function(i,s,u){return s=String(s),i instanceof k||m(e,e.j,"Object.defineProperty called on non-object: "+i),u instanceof k||m(e,e.j,"Property description must be an object"),!i.preventExtensions||s in i.h||m(e,e.j,"Can't define property '"+s+"', object is not extensible"),e.g(i,s,Fe,u.h),i},e.g(e.v,"defineProperty",e.i(r,!1),v),e.ba.push("(function() {","var defineProperty_ = Object.defineProperty;","Object.defineProperty = function defineProperty(obj, prop, d1) {","var d2 = {};","if ('configurable' in d1) d2.configurable = d1.configurable;","if ('enumerable' in d1) d2.enumerable = d1.enumerable;","if ('writable' in d1) d2.writable = d1.writable;","if ('value' in d1) d2.value = d1.value;","if ('get' in d1) d2.get = d1.get;","if ('set' in d1) d2.set = d1.set;","return defineProperty_(obj, prop, d2);","};","})();","Object.defineProperty(Object, 'defineProperties',","{configurable: true, writable: true, value:","function defineProperties(obj, props) {","var keys = Object.keys(props);","for (var i = 0; i < keys.length; i++) {","Object.defineProperty(obj, keys[i], props[keys[i]]);","}","return obj;","}","});",""),r=function(i,s){if(i instanceof k||m(e,e.j,"Object.getOwnPropertyDescriptor called on non-object: "+i),s=String(s),s in i.h){var u=Object.getOwnPropertyDescriptor(i.h,s),h=i.V[s];return i=i.Y[s],s=e.s(e.M),h||i?(e.g(s,"get",h),e.g(s,"set",i)):(e.g(s,"value",u.value),e.g(s,"writable",u.writable)),e.g(s,"configurable",u.configurable),e.g(s,"enumerable",u.enumerable),s}},e.g(e.v,"getOwnPropertyDescriptor",e.i(r,!1),v),r=function(i){return n(i),te(e,i)},e.g(e.v,"getPrototypeOf",e.i(r,!1),v),r=function(i){return!!i&&!i.preventExtensions},e.g(e.v,"isExtensible",e.i(r,!1),v),r=function(i){return i instanceof k&&(i.preventExtensions=!0),i},e.g(e.v,"preventExtensions",e.i(r,!1),v),_(e,e.v,"toString",k.prototype.toString),_(e,e.v,"toLocaleString",k.prototype.toString),_(e,e.v,"valueOf",k.prototype.valueOf),r=function(i){return n(this),this instanceof k?String(i)in this.h:this.hasOwnProperty(i)},_(e,e.v,"hasOwnProperty",r),r=function(i){return n(this),this instanceof k?Object.prototype.propertyIsEnumerable.call(this.h,i):this.propertyIsEnumerable(i)},_(e,e.v,"propertyIsEnumerable",r),r=function(i){for(;;){if(i=te(e,i),!i)return!1;if(i===this)return!0}},_(e,e.v,"isPrototypeOf",r)}function tn(e,t){var n=function(r){var i=re(e)?this:Ee(e),s=arguments[0];if(arguments.length===1&&typeof s=="number")isNaN(Tt(s))&&m(e,e.ob,"Invalid array length: "+s),i.h.length=s;else{for(s=0;s<arguments.length;s++)i.h[s]=arguments[s];i.h.length=s}return i};e.qa=e.i(n,!0),e.La=e.qa.h.prototype,e.g(t,"Array",e.qa,v),n=function(r){return r&&r.H==="Array"},e.g(e.qa,"isArray",e.i(n,!1),v),e.g(e.La,"length",0,{configurable:!1,enumerable:!1,writable:!0}),e.La.H="Array",e.ba.push("(function() {","function createArrayMethod_(f) {","Object.defineProperty(Array.prototype, f.name,","{configurable: true, writable: true, value: f});","}","createArrayMethod_(","function pop() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 0) {","o.length = 0;","return undefined;","}","len--;","var x = o[len];","delete o[len];","o.length = len;","return x;","}",");","createArrayMethod_(","function push(var_args) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","for (var i = 0; i < arguments.length; i++) {","o[len] = arguments[i];","len++;","}","o.length = len;","return len;","}",");","createArrayMethod_(","function shift() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 0) {","o.length = 0;","return undefined;","}","var value = o[0];","for (var i = 0; i < len - 1; i++) {","if ((i + 1) in o) {","o[i] = o[i + 1];","} else {","delete o[i];","}","}","delete o[i];","o.length = len - 1;","return value;","}",");","createArrayMethod_(","function unshift(var_args) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 0) {","len = 0;","}","for (var i = len - 1; i >= 0; i--) {","if (i in o) {","o[i + arguments.length] = o[i];","} else {","delete o[i + arguments.length];","}","}","for (var i = 0; i < arguments.length; i++) {","o[i] = arguments[i];","}","return (o.length = len + arguments.length);","}",");","createArrayMethod_(","function reverse() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len || len < 2) {","return o;","}","for (var i = 0; i < len / 2 - 0.5; i++) {","var x = o[i];","var hasX = i in o;","if ((len - i - 1) in o) {","o[i] = o[len - i - 1];","} else {","delete o[i];","}","if (hasX) {","o[len - i - 1] = x;","} else {","delete o[len - i - 1];","}","}","return o;","}",");","createArrayMethod_(","function indexOf(searchElement, fromIndex) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var n = fromIndex | 0;","if (!len || n >= len) {","return -1;","}","var i = Math.max(n >= 0 ? n : len - Math.abs(n), 0);","while (i < len) {","if (i in o && o[i] === searchElement) {","return i;","}","i++;","}","return -1;","}",");","createArrayMethod_(","function lastIndexOf(searchElement, fromIndex) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","if (!len) {","return -1;","}","var n = len - 1;","if (arguments.length > 1) {","n = fromIndex | 0;","if (n) {","n = (n > 0 || -1) * Math.floor(Math.abs(n));","}","}","var i = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n);","while (i >= 0) {","if (i in o && o[i] === searchElement) {","return i;","}","i--;","}","return -1;","}",");","createArrayMethod_(","function slice(start, end) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","start |= 0;","start = (start >= 0) ? start : Math.max(0, len + start);","if (typeof end !== 'undefined') {","if (end !== Infinity) {","end |= 0;","}","if (end < 0) {","end = len + end;","} else {","end = Math.min(end, len);","}","} else {","end = len;","}","var size = end - start;","var cloned = new Array(size);","for (var i = 0; i < size; i++) {","if ((start + i) in o) {","cloned[i] = o[start + i];","}","}","return cloned;","}",");","createArrayMethod_(","function splice(start, deleteCount, var_args) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","start |= 0;","if (start < 0) {","start = Math.max(len + start, 0);","} else {","start = Math.min(start, len);","}","if (arguments.length < 1) {","deleteCount = len - start;","} else {","deleteCount |= 0;","deleteCount = Math.max(0, Math.min(deleteCount, len - start));","}","var removed = [];","for (var i = start; i < start + deleteCount; i++) {","if (i in o) {","removed.push(o[i]);","} else {","removed.length++;","}","if ((i + deleteCount) in o) {","o[i] = o[i + deleteCount];","} else {","delete o[i];","}","}","for (var i = start + deleteCount; i < len - deleteCount; i++) {","if ((i + deleteCount) in o) {","o[i] = o[i + deleteCount];","} else {","delete o[i];","}","}","for (var i = len - deleteCount; i < len; i++) {","delete o[i];","}","len -= deleteCount;","var arl = arguments.length - 2;","for (var i = len - 1; i >= start; i--) {","if (i in o) {","o[i + arl] = o[i];","} else {","delete o[i + arl];","}","}","len += arl;","for (var i = 2; i < arguments.length; i++) {","o[start + i - 2] = arguments[i];","}","o.length = len;","return removed;","}",");","createArrayMethod_(","function concat(var_args) {","if (!this) throw TypeError();","var o = Object(this);","var cloned = [];","for (var i = -1; i < arguments.length; i++) {","var value = (i === -1) ? o : arguments[i];","if (Array.isArray(value)) {","for (var j = 0, l = value.length; j < l; j++) {","if (j in value) {","cloned.push(value[j]);","} else {","cloned.length++;","}","}","} else {","cloned.push(value);","}","}","return cloned;","}",");","createArrayMethod_(","function join(opt_separator) {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var sep = typeof opt_separator === 'undefined' ?","',' : ('' + opt_separator);","var str = '';","for (var i = 0; i < len; i++) {","if (i && sep) str += sep;","str += (o[i] === null || o[i] === undefined) ? '' : o[i];","}","return str;","}",");","createArrayMethod_(","function every(callbackfn, thisArg) {","if (!this || typeof callbackfn !== 'function') throw TypeError();","var t, k = 0;","var o = Object(this), len = o.length >>> 0;","if (arguments.length > 1) t = thisArg;","while (k < len) {","if (k in o && !callbackfn.call(t, o[k], k, o)) return false;","k++;","}","return true;","}",");","createArrayMethod_(","function filter(fun, var_args) {","if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();","var o = Object(this), len = o.length >>> 0;","var res = [];","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in o) {","var val = o[i];","if (fun.call(thisArg, val, i, o)) res.push(val);","}","}","return res;","}",");","createArrayMethod_(","function forEach(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var t, k = 0;","var o = Object(this), len = o.length >>> 0;","if (arguments.length > 1) t = thisArg;","while (k < len) {","if (k in o) callback.call(t, o[k], k, o);","k++;","}","}",");","createArrayMethod_(","function map(callback, thisArg) {","if (!this || typeof callback !== 'function') throw TypeError();","var t, k = 0;","var o = Object(this), len = o.length >>> 0;","if (arguments.length > 1) t = thisArg;","var a = new Array(len);","while (k < len) {","if (k in o) a[k] = callback.call(t, o[k], k, o);","k++;","}","return a;","}",");","createArrayMethod_(","function reduce(callback /*, initialValue*/) {","if (!this || typeof callback !== 'function') throw TypeError();","var o = Object(this), len = o.length >>> 0;","var k = 0, value;","if (arguments.length === 2) {","value = arguments[1];","} else {","while (k < len && !(k in o)) k++;","if (k >= len) {","throw TypeError('Reduce of empty array with no initial value');","}","value = o[k++];","}","for (; k < len; k++) {","if (k in o) value = callback(value, o[k], k, o);","}","return value;","}",");","createArrayMethod_(","function reduceRight(callback /*, initialValue*/) {","if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var k = len - 1, value;","if (arguments.length >= 2) {","value = arguments[1];","} else {","while (k >= 0 && !(k in o)) k--;","if (k < 0) {","throw TypeError('Reduce of empty array with no initial value');","}","value = o[k--];","}","for (; k >= 0; k--) {","if (k in o) value = callback(value, o[k], k, o);","}","return value;","}",");","createArrayMethod_(","function some(fun/*, thisArg*/) {","if (!this || typeof fun !== 'function') throw TypeError();","var o = Object(this), len = o.length >>> 0;","var thisArg = arguments.length >= 2 ? arguments[1] : void 0;","for (var i = 0; i < len; i++) {","if (i in o && fun.call(thisArg, o[i], i, o)) return true;","}","return false;","}",");","createArrayMethod_(","function sort(opt_comp) {","if (!this) throw TypeError();","if (typeof opt_comp !== 'function') {","opt_comp = undefined;","}","for (var i = 0; i < this.length; i++) {","var changes = 0;","for (var j = 0; j < this.length - i - 1; j++) {","if (opt_comp ? (opt_comp(this[j], this[j + 1]) > 0) :","(String(this[j]) > String(this[j + 1]))) {","var swap = this[j];","var hasSwap = j in this;","if ((j + 1) in this) {","this[j] = this[j + 1];","} else {","delete this[j];","}","if (hasSwap) {","this[j + 1] = swap;","} else {","delete this[j + 1];","}","changes++;","}","}","if (!changes) break;","}","return this;","}",");","createArrayMethod_(","function toLocaleString() {","if (!this) throw TypeError();","var o = Object(this), len = o.length >>> 0;","var out = [];","for (var i = 0; i < len; i++) {","out[i] = (o[i] === null || o[i] === undefined) ? '' : o[i].toLocaleString();","}","return out.join(',');","}",");","})();","")}function rn(e,t){var n=function(r){return r=arguments.length?ae.String(r):"",re(e)?(this.data=r,this):r};for(e.J=e.i(n,!0),e.g(t,"String",e.J,v),e.g(e.J,"fromCharCode",e.i(String.fromCharCode,!1),v),t="charAt charCodeAt concat indexOf lastIndexOf slice substr substring toLocaleLowerCase toLocaleUpperCase toLowerCase toUpperCase trim".split(" "),n=0;n<t.length;n++)_(e,e.J,t[n],String.prototype[t[n]]);n=function(r,i,s){i=e.R(i),s=e.R(s);try{return String(this).localeCompare(r,i,s)}catch(u){m(e,e.D,"localeCompare: "+u.message)}},_(e,e.J,"localeCompare",n),n=function(r,i,s){var u=String(this);if(i=i?Number(i):void 0,D(e,r,e.I)&&(r=r.data,Me(e,r,s),e.REGEXP_MODE===2)){if(ee)r=Re(e,"string.split(separator, limit)",{string:u,separator:r,limit:i},r,s),r!==me&&s(Q(e,r));else{var h=e.ha(),d=_e(e,r,h,s);h.onmessage=function(N){clearTimeout(d),s(Q(e,N.data))},h.postMessage(["split",u,r,i])}return}r=u.split(r,i),s(Q(e,r))},be(e,e.J,"split",n),n=function(r,i){var s=String(this);if(r=D(e,r,e.I)?r.data:new RegExp(r),Me(e,r,i),e.REGEXP_MODE===2)if(ee)r=Re(e,"string.match(regexp)",{string:s,regexp:r},r,i),r!==me&&i(r&&Q(e,r));else{var u=e.ha(),h=_e(e,r,u,i);u.onmessage=function(d){clearTimeout(h),i(d.data&&Q(e,d.data))},u.postMessage(["match",s,r])}else r=s.match(r),i(r&&Q(e,r))},be(e,e.J,"match",n),n=function(r,i){var s=String(this);if(D(e,r,e.I)?r=r.data:r=new RegExp(r),Me(e,r,i),e.REGEXP_MODE===2)if(ee)r=Re(e,"string.search(regexp)",{string:s,regexp:r},r,i),r!==me&&i(r);else{var u=e.ha(),h=_e(e,r,u,i);u.onmessage=function(d){clearTimeout(h),i(d.data)},u.postMessage(["search",s,r])}else i(s.search(r))},be(e,e.J,"search",n),n=function(r,i,s){var u=String(this);if(i=String(i),D(e,r,e.I)&&(r=r.data,Me(e,r,s),e.REGEXP_MODE===2)){if(ee)r=Re(e,"string.replace(substr, newSubstr)",{string:u,substr:r,newSubstr:i},r,s),r!==me&&s(r);else{var h=e.ha(),d=_e(e,r,h,s);h.onmessage=function(N){clearTimeout(d),s(N.data)},h.postMessage(["replace",u,r,i])}return}s(u.replace(r,i))},be(e,e.J,"replace",n),e.ba.push("(function() {","var replace_ = String.prototype.replace;","String.prototype.replace = function replace(substr, newSubstr) {","if (typeof newSubstr !== 'function') {","return replace_.call(this, substr, newSubstr);","}","var str = this;","if (substr instanceof RegExp) {","var subs = [];","var m = substr.exec(str);","while (m) {","m.push(m.index, str);","var inject = newSubstr.apply(null, m);","subs.push([m.index, m[0].length, inject]);","m = substr.global ? substr.exec(str) : null;","}","for (var i = subs.length - 1; i >= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","var i = str.indexOf(substr);","if (i !== -1) {","var inject = newSubstr(str.substr(i, substr.length), i, str);","str = str.substring(0, i) + inject + str.substring(i + substr.length);","}","}","return str;","};","})();","")}function nn(e,t){e.mb=e.i(function(n){return n=ae.Boolean(n),re(e)?(this.data=n,this):n},!0),e.g(t,"Boolean",e.mb,v)}function on(e,t){var n=function(r){return r=arguments.length?ae.Number(r):0,re(e)?(this.data=r,this):r};for(e.aa=e.i(n,!0),e.g(t,"Number",e.aa,v),t=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"],n=0;n<t.length;n++)e.g(e.aa,t[n],Number[t[n]],Pe);n=function(r){try{return Number(this).toExponential(r)}catch(i){m(e,e.D,i.message)}},_(e,e.aa,"toExponential",n),n=function(r){try{return Number(this).toFixed(r)}catch(i){m(e,e.D,i.message)}},_(e,e.aa,"toFixed",n),n=function(r){try{return Number(this).toPrecision(r)}catch(i){m(e,e.D,i.message)}},_(e,e.aa,"toPrecision",n),n=function(r){try{return Number(this).toString(r)}catch(i){m(e,e.D,i.message)}},_(e,e.aa,"toString",n),n=function(r,i){r=r?e.R(r):void 0,i=i?e.R(i):void 0;try{return Number(this).toLocaleString(r,i)}catch(s){m(e,e.D,"toLocaleString: "+s.message)}},_(e,e.aa,"toLocaleString",n)}function sn(e,t){var n=function(i,s){if(!re(e))return ae.Date();var u=[null].concat(Array.from(arguments));return this.data=new(Function.prototype.bind.apply(ae.Date,u)),this};e.$=e.i(n,!0),e.nb=e.$.h.prototype,e.g(t,"Date",e.$,v),e.g(e.$,"now",e.i(Date.now,!1),v),e.g(e.$,"parse",e.i(Date.parse,!1),v),e.g(e.$,"UTC",e.i(Date.UTC,!1),v),t="getDate getDay getFullYear getHours getMilliseconds getMinutes getMonth getSeconds getTime getTimezoneOffset getUTCDate getUTCDay getUTCFullYear getUTCHours getUTCMilliseconds getUTCMinutes getUTCMonth getUTCSeconds getYear setDate setFullYear setHours setMilliseconds setMinutes setMonth setSeconds setTime setUTCDate setUTCFullYear setUTCHours setUTCMilliseconds setUTCMinutes setUTCMonth setUTCSeconds setYear toDateString toISOString toJSON toGMTString toLocaleDateString toLocaleString toLocaleTimeString toTimeString toUTCString".split(" ");for(var r=0;r<t.length;r++)n=function(i){return function(s){var u=this.data;u instanceof Date||m(e,e.j,i+" not called on a Date");for(var h=[],d=0;d<arguments.length;d++)h[d]=e.R(arguments[d]);return u[i].apply(u,h)}}(t[r]),_(e,e.$,t[r],n)}function an(e,t){var n=function(r,i){if(re(e))var s=this;else{if(i===void 0&&D(e,r,e.I))return r;s=e.s(e.Ma)}r=r===void 0?"":String(r),i=i?String(i):"",/^[gmi]*$/.test(i)||m(e,e.T,"Invalid regexp flag: "+i);try{var u=new ae.RegExp(r,i)}catch(h){m(e,e.T,h.message)}return Nt(e,s,u),s};e.I=e.i(n,!0),e.Ma=e.I.h.prototype,e.g(t,"RegExp",e.I,v),e.g(e.I.h.prototype,"global",void 0,B),e.g(e.I.h.prototype,"ignoreCase",void 0,B),e.g(e.I.h.prototype,"multiline",void 0,B),e.g(e.I.h.prototype,"source","(?:)",B),e.ba.push("Object.defineProperty(RegExp.prototype, 'test',","{configurable: true, writable: true, value:","function test(str) {","return !!this.exec(str);","}","});"),n=function(r,i){function s(P){if(P){var C=Q(e,P);return e.g(C,"index",P.index),e.g(C,"input",P.input),C}return null}var u=this.data;if(r=String(r),u.lastIndex=Number(e.G(this,"lastIndex")),Me(e,u,i),e.REGEXP_MODE===2)if(ee)r=Re(e,"regexp.exec(string)",{string:r,regexp:u},u,i),r!==me&&(e.g(this,"lastIndex",u.lastIndex),i(s(r)));else{var h=e.ha(),d=_e(e,u,h,i),N=this;h.onmessage=function(P){clearTimeout(d),e.g(N,"lastIndex",P.data[1]),i(s(P.data[0]))},h.postMessage(["exec",u,u.lastIndex,r])}else r=u.exec(r),e.g(this,"lastIndex",u.lastIndex),i(s(r))},be(e,e.I,"exec",n)}function un(e,t){function n(r){var i=e.i(function(s){var u=re(e)?this:e.Aa(i);return Ot(e,u,s),u},!0);return e.g(i,"prototype",e.Aa(e.D),v),e.g(i.h.prototype,"name",r,v),e.g(t,r,i,v),i}e.D=e.i(function(r){var i=re(e)?this:e.Aa(e.D);return Ot(e,i,r),i},!0),e.g(t,"Error",e.D,v),e.g(e.D.h.prototype,"message","",v),e.g(e.D.h.prototype,"name","Error",v),n("EvalError"),e.ob=n("RangeError"),e.pb=n("ReferenceError"),e.T=n("SyntaxError"),e.j=n("TypeError"),e.Gb=n("URIError")}function ln(e,t){var n=e.s(e.M);e.g(t,"Math",n,v);var r="E LN2 LN10 LOG2E LOG10E PI SQRT1_2 SQRT2".split(" ");for(t=0;t<r.length;t++)e.g(n,r[t],Math[r[t]],B);for(r="abs acos asin atan atan2 ceil cos exp floor log max min pow random round sin sqrt tan".split(" "),t=0;t<r.length;t++)e.g(n,r[t],e.i(Math[r[t]],!1),v)}function cn(e,t){var n=e.s(e.M);e.g(t,"JSON",n,v),t=function(r){try{var i=JSON.parse(String(r))}catch(s){m(e,e.T,s.message)}return e.Ia(i)},e.g(n,"parse",e.i(t,!1)),t=function(r,i,s){i&&i.H==="Function"?m(e,e.j,"Function replacer on JSON.stringify not supported"):i&&i.H==="Array"?(i=Ar(e,i),i=i.filter(function(h){return typeof h=="string"||typeof h=="number"})):i=null,typeof s!="string"&&typeof s!="number"&&(s=void 0),r=e.R(r);try{var u=JSON.stringify(r,i,s)}catch(h){m(e,e.j,h.message)}return u},e.g(n,"stringify",e.i(t,!1))}function D(e,t,n){if(t==null||!n)return!1;if(n=n.h.prototype,t===n)return!0;for(t=te(e,t);t;){if(t===n)return!0;t=t.xa}return!1}function Nt(e,t,n){t.data=new RegExp(n.source,n.flags),e.g(t,"lastIndex",n.lastIndex,v),e.g(t,"source",n.source,B),e.g(t,"global",n.global,B),e.g(t,"ignoreCase",n.ignoreCase,B),e.g(t,"multiline",n.multiline,B)}function Ot(e,t,n){n&&e.g(t,"message",String(n),v),n=[];for(var r=e.o.length-1;0<=r;r--){var i=e.o[r],s=i.node;s.type==="CallExpression"&&(i=i.U)&&n.length&&(n[n.length-1].Ob=e.G(i,"name")),!s.X||n.length&&s.type!=="CallExpression"||n.push({Nb:s.X})}for(r=String(e.G(t,"name")),s=String(e.G(t,"message")),s=r+": "+s+`
5
- `,r=0;r<n.length;r++){var u=n[r].Nb;i=n[r].Ob,u=u.source+":"+u.start.line+":"+u.start.ab,s=i?s+(" at "+i+" ("+u+`)
6
- `):s+(" at "+u+`
7
- `)}e.g(t,"stack",s.trim(),v)}O.ha=function(){var e=this.ha.Mb;return e||(e=new Blob([zr.join(`
8
- `)],{type:"application/javascript"}),this.ha.Mb=e),new Worker(URL.createObjectURL(e))};function Re(e,t,n,r,i){var s={timeout:e.REGEXP_THREAD_TIMEOUT};try{return ee.runInNewContext(t,n,s)}catch{i(null),m(e,e.D,"RegExp Timeout: "+r)}return me}function Me(e,t,n){if(e.REGEXP_MODE===0)var r=!1;else if(e.REGEXP_MODE===1)r=!0;else if(ee)r=!0;else if(typeof Worker=="function"&&typeof URL=="function")r=!0;else if(typeof require=="function"){try{ee=require("vm")}catch{}r=!!ee}else r=!1;r||(n(null),m(e,e.D,"Regular expressions not supported: "+t))}function _e(e,t,n,r){return setTimeout(function(){n.terminate(),r(null);try{m(e,e.D,"RegExp Timeout: "+t)}catch{}},e.REGEXP_THREAD_TIMEOUT)}O.Aa=function(e){return this.s(e&&e.h.prototype)};O.s=function(e){if(typeof e!="object")throw Error("Non object prototype");return e=new k(e),D(this,e,this.D)&&(e.H="Error"),e};function Ee(e){var t=e.s(e.La);return e.g(t,"length",0,{configurable:!1,enumerable:!1,writable:!0}),t.H="Array",t}function Pt(e,t,n){var r=e.s(e.Z);return n?(n=e.s(e.M),e.g(r,"prototype",n,v),e.g(n,"constructor",r,v)):r.Ab=!0,e.g(r,"length",t,B),r.H="Function",r}function Rt(e,t,n,r){var i=Pt(e,t.oa.length,!0);return i.Va=n,i.node=t,e.g(i,"name",t.id?String(t.id.name):r||"",B),i}O.i=function(e,t){return t=Pt(this,e.length,t),t.Ta=e,e.id=this.Ya++,this.g(t,"name",e.name,B),t};O.ub=function(e){var t=Pt(this,e.length,!0);return t.Za=e,e.id=this.Ya++,this.g(t,"name",e.name,B),t};O.Ia=function(e){if(e instanceof k)throw Error("Object is already pseudo");if(e==null||e===!0||e===!1||typeof e=="string"||typeof e=="number")return e;if(e instanceof RegExp){var t=this.s(this.Ma);return Nt(this,t,e),t}if(e instanceof Date)return t=this.s(this.nb),t.data=new Date(e.valueOf()),t;if(typeof e=="function"){var n=this;return t=Object.getOwnPropertyDescriptor(e,"prototype"),this.i(function(){var i=Array.prototype.slice.call(arguments).map(function(s){return n.R(s)});return i=e.apply(n,i),n.Ia(i)},!!t)}if(Array.isArray(e)){t=Ee(this);for(var r=0;r<e.length;r++)r in e&&this.g(t,r,this.Ia(e[r]));return t}t=this.s(this.M);for(r in e)this.g(t,r,this.Ia(e[r]));return t};O.R=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)return e;if(!(e instanceof k))throw Error("Object is not pseudo");if(D(this,e,this.I))return t=new RegExp(e.data.source,e.data.flags),t.lastIndex=e.data.lastIndex,t;if(D(this,e,this.$))return new Date(e.data.valueOf());t=t||{hb:[],Sa:[]};var n=t.hb.indexOf(e);if(n!==-1)return t.Sa[n];if(t.hb.push(e),D(this,e,this.qa)){n=[],t.Sa.push(n);for(var r=this.G(e,"length"),i=0;i<r;i++)Qe(this,e,i)&&(n[i]=this.R(this.G(e,i),t))}else for(r in n={},t.Sa.push(n),e.h)i=this.R(e.h[r],t),Object.defineProperty(n,r,{value:i,writable:!0,enumerable:!0,configurable:!0});return t.hb.pop(),t.Sa.pop(),n};function Q(e,t){for(var n=Ee(e),r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++)e.g(n,r[i],t[r[i]]);return n}function Ar(e,t){var n=[],r;for(r in t.h)n[r]=e.G(t,r);return n.length=Tt(e.G(t,"length"))||0,n}function te(e,t){switch(typeof t){case"number":return e.aa.h.prototype;case"boolean":return e.mb.h.prototype;case"string":return e.J.h.prototype}return t?t.xa:null}O.G=function(e,t){if(this.P)throw Error("Getter not supported in that context");if(t=String(t),e!=null||m(this,this.j,"Cannot read property '"+t+"' of "+e),typeof e=="object"&&!(e instanceof k))throw TypeError("Expecting native value or pseudo object");if(t==="length"){if(D(this,e,this.J))return String(e).length}else if(64>t.charCodeAt(0)&&D(this,e,this.J)){var n=Ue(t);if(!isNaN(n)&&n<String(e).length)return String(e)[n]}do if(e.h&&t in e.h)return(n=e.V[t])?(this.P=!0,n):e.h[t];while(e=te(this,e))};function Qe(e,t,n){if(!(t instanceof k))throw TypeError("Primitive data type has no properties");if(n=String(n),n==="length"&&D(e,t,e.J))return!0;if(D(e,t,e.J)){var r=Ue(n);if(!isNaN(r)&&r<String(t).length)return!0}do if(t.h&&n in t.h)return!0;while(t=te(e,t));return!1}O.g=function(e,t,n,r){if(this.Ka)throw Error("Setter not supported in that context");if(t=String(t),e!=null||m(this,this.j,"Cannot set property '"+t+"' of "+e),typeof e=="object"&&!(e instanceof k))throw TypeError("Expecting native value or pseudo object");r&&("get"in r||"set"in r)&&("value"in r||"writable"in r)&&m(this,this.j,"Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");var i=!this.o||Mt(this).S;if(e instanceof k){if(D(this,e,this.J)){var s=Ue(t);if(t==="length"||!isNaN(s)&&s<String(e).length){i&&m(this,this.j,"Cannot assign to read only property '"+t+"' of String '"+e.data+"'");return}}if(e.H==="Array")if(s=e.h.length,t==="length"){if(r){if(!("value"in r))return;n=r.value}if(n=Tt(n),isNaN(n)&&m(this,this.ob,"Invalid array length"),n<s)for(u in e.h){var u=Ue(u);!isNaN(u)&&n<=u&&delete e.h[u]}}else isNaN(u=Ue(t))||(e.h.length=Math.max(s,u+1));if(!e.preventExtensions||t in e.h)if(r){i={},"get"in r&&r.get&&(e.V[t]=r.get,i.get=this.g.ac),"set"in r&&r.set&&(e.Y[t]=r.set,i.set=this.g.bc),"configurable"in r&&(i.configurable=r.configurable),"enumerable"in r&&(i.enumerable=r.enumerable),"writable"in r&&(i.writable=r.writable,delete e.V[t],delete e.Y[t]),"value"in r?(i.value=r.value,delete e.V[t],delete e.Y[t]):n!==Fe&&(i.value=n,delete e.V[t],delete e.Y[t]);try{Object.defineProperty(e.h,t,i)}catch{m(this,this.j,"Cannot redefine property: "+t)}"get"in r&&!r.get&&delete e.V[t],"set"in r&&!r.set&&delete e.Y[t]}else{if(n===Fe)throw ReferenceError("Value not specified");for(r=e;!(t in r.h);)if(r=te(this,r),!r){r=e;break}if(r.Y&&r.Y[t])return this.Ka=!0,r.Y[t];if(r.V&&r.V[t])i&&m(this,this.j,"Cannot set property '"+t+"' of object '"+e+"' which only has a getter");else try{e.h[t]=n}catch{i&&m(this,this.j,"Cannot assign to read only property '"+t+"' of object '"+e+"'")}}else i&&m(this,this.j,"Can't add property '"+t+"', object is not extensible")}else i&&m(this,this.j,"Can't create property '"+t+"' on '"+e+"'")};O.g.ac=function(){throw Error("Placeholder getter")};O.g.bc=function(){throw Error("Placeholder setter")};function _(e,t,n,r){e.g(t.h.prototype,n,e.i(r,!1),v)}function be(e,t,n,r){e.g(t.h.prototype,n,e.ub(r),v)}function Mt(e){if(e=e.o[e.o.length-1].scope,!e)throw Error("No scope found");return e}function Ct(e,t,n){var r=!1;if(n&&n.S)r=!0;else{var i=t.body&&t.body[0];i&&i.la&&i.la.type==="Literal"&&i.la.value==="use strict"&&(r=!0)}return i=e.s(null),r=new Nr(n,r,i),n||Qr(e,r.object),Le(e,t,r),r}function _t(e,t,n){if(!t)throw Error("parentScope required");return e=n||e.s(null),new Nr(t,t.S,e)}function bt(e,t){for(var n=Mt(e);n&&n!==e.N;){if(t in n.object.h)return n.object.h[t];n=n.Va}if(n===e.N&&Qe(e,n.object,t))return e.G(n.object,t);n=e.o[e.o.length-1].node,n.type==="UnaryExpression"&&n.operator==="typeof"||m(e,e.pb,t+" is not defined")}function Ir(e,t,n){for(var r=Mt(e),i=r.S;r&&r!==e.N;){if(t in r.object.h){try{r.object.h[t]=n}catch{i&&m(e,e.j,"Cannot assign to read only variable '"+t+"'")}return}r=r.Va}if(r===e.N&&(!i||Qe(e,r.object,t)))return e.g(r.object,t,n);m(e,e.pb,t+" is not defined")}function Le(e,t,n){if(t.jb)var r=t.jb;else{switch(r=Object.create(null),t.type){case"VariableDeclaration":for(var i=0;i<t.fa.length;i++)r[t.fa[i].id.name]=!0;break;case"FunctionDeclaration":r[t.id.name]=t;break;case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"Program":case"SwitchCase":case"SwitchStatement":case"TryStatement":case"WithStatement":case"WhileStatement":var s=t.constructor,u;for(u in t)if(u!=="loc"){var h=t[u];if(h&&typeof h=="object"){if(Array.isArray(h)){for(i=0;i<h.length;i++)if(h[i]&&h[i].constructor===s){var d=Le(e,h[i],n);for(u in d)r[u]=d[u]}}else if(h.constructor===s)for(u in d=Le(e,h,n),d)r[u]=d[u]}}}t.jb=r}for(u in r)r[u]===!0?e.g(n.object,u,void 0,wr):e.g(n.object,u,Rt(e,r[u],n),wr);return r}function re(e){return e.o[e.o.length-1].isConstructor}function Dt(e,t){return t[0]===xe?bt(e,t[1]):e.G(t[0],t[1])}function Ut(e,t,n){return t[0]===xe?Ir(e,t[1],n):e.g(t[0],t[1],n)}function m(e,t,n){throw e.N?(n!==void 0&&t instanceof k&&(t=e.Aa(t),Ot(e,t,n)),Be(e,4,t),Cr):n===void 0?t:n}function Be(e,t,n,r){if(t===0)throw TypeError("Should not unwind for NORMAL completions");var i=e.o;e:for(;0<i.length;i.pop()){var s=i[i.length-1];switch(s.node.type){case"TryStatement":s.ea={type:t,value:n,label:r};return;case"CallExpression":case"NewExpression":if(t===3){s.value=n;return}if(t!==4)throw Error("Unsynatctic break/continue not rejected by Acorn");break;case"Program":s.done=!0;break e}if(t===1){if(r?s.labels&&s.labels.indexOf(r)!==-1:s.W||s.Zb){i.pop();return}}else if(t===2&&(r?s.labels&&s.labels.indexOf(r)!==-1:s.W))return}throw D(e,n,e.D)?(t={EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError},r=String(e.G(n,"name")),i=e.G(n,"message").valueOf(),t=(t[r]||Error)(i),t.stack=String(e.G(n,"stack"))):t=String(n),e.value=t,t}function L(e,t){switch(t.type){case"ArrayExpression":return"[...]";case"BinaryExpression":case"LogicalExpression":return L(e,t.left)+" "+t.operator+" "+L(e,t.right);case"CallExpression":return L(e,t.callee)+"(...)";case"ConditionalExpression":return L(e,t.test)+" ? "+L(e,t.da)+" : "+L(e,t.alternate);case"Identifier":return t.name;case"Literal":return t.raw;case"MemberExpression":var n=L(e,t.object);return e=L(e,t.Wa),t.bb?n+"["+e+"]":n+"."+e;case"NewExpression":return"new "+L(e,t.callee)+"(...)";case"ObjectExpression":return"{...}";case"ThisExpression":return"this";case"UnaryExpression":return t.operator+" "+L(e,t.K);case"UpdateExpression":return n=L(e,t.K),t.prefix?t.operator+n:n+t.operator}return"???"}function xr(e,t,n){var r=e.o[e.o.length-1],i=Array.from(n),s=i.shift();n=Math.max(Number(i.shift()||0),0);var u=e.ya();if(s instanceof k&&s.H==="Function"){var h=s;u.type="CallExpression",r=r.scope}else{try{var d=we(String(s),"taskCode"+e.ic++)}catch(N){m(e,e.T,"Invalid code: "+N.message)}u.type="EvalProgram_",u.body=d.body,r=r.node.arguments[0],ze(u,r?r.start:void 0,r?r.end:void 0),r=e.N,i.length=0}return t=new pn(h,i,r,u,t?n:-1),Tr(e,t,n),t.Db}function Tr(e,t,n){t.time=Date.now()+n,e.ca.push(t),e.ca.sort(function(r,i){return r.time-i.time})}function jr(e,t){for(var n=0;n<e.ca.length;n++)if(e.ca[n].Db==t){e.ca.splice(n,1);break}}function Ge(e,t,n){if(!e.P)throw Error("Unexpected call to createGetter");e.P=!1,n=Array.isArray(n)?n[0]:n;var r=e.ya();return r.type="CallExpression",e=new y(r,e.o[e.o.length-1].scope),e.ia=2,e.B=n,e.U=t,e.Qa=!0,e.F=[],e}function Ft(e,t,n,r){if(!e.Ka)throw Error("Unexpected call to createSetter");e.Ka=!1,n=Array.isArray(n)?n[0]:e.Na;var i=e.ya();return i.type="CallExpression",e=new y(i,e.o[e.o.length-1].scope),e.ia=2,e.B=n,e.U=t,e.Qa=!0,e.F=[r],e}function St(e,t){return t==null?e.Na:t instanceof k?t:(e=e.s(te(e,t)),e.data=t,e)}O.Xb=function(){return this.N};O.Yb=function(){return this.o};O.ec=function(e){this.o=e};function y(e,t){this.node=e,this.scope=t}function Nr(e,t,n){this.Va=e,this.S=t,this.object=n}function k(e){this.V=Object.create(null),this.Y=Object.create(null),this.h=Object.create(null),this.xa=e}O=k.prototype;O.xa=null;O.H="Object";O.data=null;O.toString=function(){if(!De)return"[object Interpreter.Object]";if(!(this instanceof k))return String(this);if(this.H==="Array"){var e=Er;e.push(this);try{var t=[],n=this.h.length,r=!1;1024<n&&(n=1e3,r=!0);for(var i=0;i<n;i++){var s=this.h[i];t[i]=s instanceof k&&e.indexOf(s)!==-1?"...":s}r&&t.push("...")}finally{e.pop()}return t.join(",")}if(this.H==="Error"){if(e=Er,e.indexOf(this)!==-1)return"[object Error]";n=this;do if("name"in n.h){t=n.h.name;break}while(n=n.xa);n=this;do if("message"in n.h){r=n.h.message;break}while(n=n.xa);e.push(this);try{t=t&&String(t),r=r&&String(r)}finally{e.pop()}return r?t+": "+r:String(t)}return this.data!==null?String(this.data):"[object "+this.H+"]"};O.valueOf=function(){return!De||this.data===void 0||this.data===null||this.data instanceof RegExp?this:this.data instanceof Date?this.data.valueOf():this.data};function pn(e,t,n,r,i){this.zb=e,this.Lb=t,this.scope=n,this.node=r,this.interval=i,this.Db=++fn,this.time=0}var fn=0;f.prototype.stepArrayExpression=function(e,t,n){n=n.elements;var r=t.A||0;for(t.Oa?(this.g(t.Oa,r,t.value),r++):(t.Oa=Ee(this),t.Oa.h.length=n.length);r<n.length;){if(n[r])return t.A=r,new y(n[r],t.scope);r++}e.pop(),e[e.length-1].value=t.Oa};f.prototype.stepAssignmentExpression=function(e,t,n){if(!t.ja)return t.ja=!0,t=new y(n.left,t.scope),t.sa=!0,t;if(!t.Da)return t.Fa||(t.Fa=t.value),t.Ba&&(t.ma=t.value),!t.Ba&&n.operator!=="="&&(e=Dt(this,t.Fa),t.ma=e,this.P)?(t.Ba=!0,Ge(this,e,t.Fa)):(t.Da=!0,n.operator==="="&&n.left.type==="Identifier"&&(t.Pa=n.left.name),new y(n.right,t.scope));if(t.ta)e.pop(),e[e.length-1].value=t.ib;else{var r=t.ma,i=t.value;switch(n.operator){case"=":r=i;break;case"+=":r+=i;break;case"-=":r-=i;break;case"*=":r*=i;break;case"/=":r/=i;break;case"%=":r%=i;break;case"<<=":r<<=i;break;case">>=":r>>=i;break;case">>>=":r>>>=i;break;case"&=":r&=i;break;case"^=":r^=i;break;case"|=":r|=i;break;default:throw SyntaxError("Unknown assignment expression: "+n.operator)}if(n=Ut(this,t.Fa,r))return t.ta=!0,t.ib=r,Ft(this,n,t.Fa,r);e.pop(),e[e.length-1].value=r}};f.prototype.stepBinaryExpression=function(e,t,n){if(!t.ja)return t.ja=!0,new y(n.left,t.scope);if(!t.Da)return t.Da=!0,t.ma=t.value,new y(n.right,t.scope);e.pop();var r=t.ma;switch(t=t.value,n.operator){case"==":n=r==t;break;case"!=":n=r!=t;break;case"===":n=r===t;break;case"!==":n=r!==t;break;case">":n=r>t;break;case">=":n=r>=t;break;case"<":n=r<t;break;case"<=":n=r<=t;break;case"+":n=r+t;break;case"-":n=r-t;break;case"*":n=r*t;break;case"/":n=r/t;break;case"%":n=r%t;break;case"&":n=r&t;break;case"|":n=r|t;break;case"^":n=r^t;break;case"<<":n=r<<t;break;case">>":n=r>>t;break;case">>>":n=r>>>t;break;case"in":t instanceof k||m(this,this.j,"'in' expects an object, not '"+t+"'"),n=Qe(this,t,r);break;case"instanceof":D(this,t,this.O)||m(this,this.j,"'instanceof' expects an object, not '"+t+"'"),n=r instanceof k?D(this,r,t):!1;break;default:throw SyntaxError("Unknown binary operator: "+n.operator)}e[e.length-1].value=n};f.prototype.stepBlockStatement=function(e,t,n){var r=t.A||0;if(n=n.body[r])return t.A=r+1,new y(n,t.scope);e.pop()};f.prototype.stepBreakStatement=function(e,t,n){Be(this,1,void 0,n.label&&n.label.name)};f.prototype.Hb=0;f.prototype.stepCallExpression=function(e,t,n){if(!t.ia){t.ia=1;var r=new y(n.callee,t.scope);return r.sa=!0,r}if(t.ia===1){t.ia=2;var i=t.value;if(Array.isArray(i)){if(t.U=Dt(this,i),i[0]===xe?t.Pb=i[1]==="eval":t.B=i[0],i=t.U,this.P)return t.ia=1,Ge(this,i,t.value)}else t.U=i;t.F=[],t.A=0}if(i=t.U,!t.Qa){if(t.A!==0&&t.F.push(t.value),n.arguments[t.A])return new y(n.arguments[t.A++],t.scope);if(n.type==="NewExpression"){if(i instanceof k&&!i.Ab||m(this,this.j,L(this,n.callee)+" is not a constructor"),i===this.qa)t.B=Ee(this);else{var s=i.h.prototype;(typeof s!="object"||s===null)&&(s=this.M),t.B=this.s(s)}t.isConstructor=!0}t.Qa=!0}if(t.eb)e.pop(),e[e.length-1].value=t.isConstructor&&typeof t.value!="object"?t.B:t.value;else{if(t.eb=!0,i instanceof k||m(this,this.j,L(this,n.callee)+" is not a function"),e=i.node){for(n=Ct(this,e.body,i.Va),r=Ee(this),i=0;i<t.F.length;i++)this.g(r,i,t.F[i]);for(this.g(n.object,"arguments",r),i=0;i<e.oa.length;i++)this.g(n.object,e.oa[i].name,t.F.length>i?t.F[i]:void 0);return n.S||(t.B=St(this,t.B)),this.g(n.object,"this",t.B,It),t.value=void 0,new y(e.body,n)}if(i.eval)if(i=t.F[0],typeof i!="string")t.value=i;else{try{r=we(String(i),"eval"+this.Hb++)}catch(h){m(this,this.T,"Invalid code: "+h.message)}return i=this.ya(),i.type="EvalProgram_",i.body=r.body,ze(i,n.start,n.end),n=t.Pb?t.scope:this.N,n.S?n=Ct(this,r,n):Le(this,r,n),this.value=void 0,new y(i,n)}else if(i.Ta)t.scope.S||(t.B=St(this,t.B)),t.value=i.Ta.apply(t.B,t.F);else if(i.Za){var u=this;r=i.Za.length-1,r=t.F.concat(Array(r)).slice(0,r),r.push(function(h){t.value=h,u.za=!1}),this.za=!0,t.scope.S||(t.B=St(this,t.B)),i.Za.apply(t.B,r)}else m(this,this.j,L(this,n.callee)+" is not callable")}};f.prototype.stepConditionalExpression=function(e,t,n){var r=t.na||0;if(r===0)return t.na=1,new y(n.test,t.scope);if(r===1){if(t.na=2,(r=!!t.value)&&n.da)return new y(n.da,t.scope);if(!r&&n.alternate)return new y(n.alternate,t.scope);this.value=void 0}e.pop(),n.type==="ConditionalExpression"&&(e[e.length-1].value=t.value)};f.prototype.stepContinueStatement=function(e,t,n){Be(this,2,void 0,n.label&&n.label.name)};f.prototype.stepDebuggerStatement=function(e){e.pop()};f.prototype.stepDoWhileStatement=function(e,t,n){if(n.type==="DoWhileStatement"&&t.ga===void 0&&(t.value=!0,t.ga=!0),!t.ga)return t.ga=!0,new y(n.test,t.scope);if(!t.value)e.pop();else if(n.body)return t.ga=!1,t.W=!0,new y(n.body,t.scope)};f.prototype.stepEmptyStatement=function(e){e.pop()};f.prototype.stepEvalProgram_=function(e,t,n){var r=t.A||0;if(n=n.body[r])return t.A=r+1,new y(n,t.scope);e.pop(),e[e.length-1].value=this.value};f.prototype.stepExpressionStatement=function(e,t,n){if(!t.ka)return this.value=void 0,t.ka=!0,new y(n.la,t.scope);e.pop(),this.value=t.value};f.prototype.stepForInStatement=function(e,t,n){if(!t.Ub&&(t.Ub=!0,n.left.fa&&n.left.fa[0].ua))return t.scope.S&&m(this,this.T,"for-in loop variable declaration may not have an initializer"),new y(n.left,t.scope);if(!t.Ca)return t.Ca=!0,t.pa||(t.pa=t.value),new y(n.right,t.scope);if(t.W||(t.W=!0,t.u=t.value,t.kb=Object.create(null)),t.Ra===void 0)e:for(;;){if(t.u instanceof k)for(t.wa||(t.wa=Object.getOwnPropertyNames(t.u.h));;){var r=t.wa.shift();if(r===void 0)break;if(Object.prototype.hasOwnProperty.call(t.u.h,r)&&!t.kb[r]&&(t.kb[r]=!0,Object.prototype.propertyIsEnumerable.call(t.u.h,r))){t.Ra=r;break e}}else if(t.u!==null&&t.u!==void 0){for(t.wa||(t.wa=Object.getOwnPropertyNames(t.u));r=t.wa.shift(),r!==void 0;)if(t.kb[r]=!0,Object.prototype.propertyIsEnumerable.call(t.u,r)){t.Ra=r;break e}}if(t.u=te(this,t.u),t.wa=null,t.u===null){e.pop();return}}if(!t.wb)if(t.wb=!0,e=n.left,e.type==="VariableDeclaration")t.pa=[xe,e.fa[0].id.name];else return t.pa=null,t=new y(e,t.scope),t.sa=!0,t;if(t.pa||(t.pa=t.value),!t.ta&&(t.ta=!0,e=t.Ra,r=Ut(this,t.pa,e)))return Ft(this,r,t.pa,e);if(t.Ra=void 0,t.wb=!1,t.ta=!1,n.body)return new y(n.body,t.scope)};f.prototype.stepForStatement=function(e,t,n){switch(t.na){default:if(t.na=1,n.ua)return new y(n.ua,t.scope);break;case 1:if(t.na=2,n.test)return new y(n.test,t.scope);break;case 2:if(t.na=3,n.test&&!t.value)e.pop();else return t.W=!0,new y(n.body,t.scope);break;case 3:if(t.na=1,n.update)return new y(n.update,t.scope)}};f.prototype.stepFunctionDeclaration=function(e){e.pop()};f.prototype.stepFunctionExpression=function(e,t,n){e.pop(),t=e[e.length-1],e=t.scope,n.id&&(e=_t(this,e)),t.value=Rt(this,n,e,t.Pa),n.id&&this.g(e.object,n.id.name,t.value,It)};f.prototype.stepIdentifier=function(e,t,n){if(e.pop(),t.sa)e[e.length-1].value=[xe,n.name];else{if(t=bt(this,n.name),this.P)return Ge(this,t,this.Na);e[e.length-1].value=t}};f.prototype.stepIfStatement=f.prototype.stepConditionalExpression;f.prototype.stepLabeledStatement=function(e,t,n){return e.pop(),e=t.labels||[],e.push(n.label.name),t=new y(n.body,t.scope),t.labels=e,t};f.prototype.stepLiteral=function(e,t,n){e.pop(),t=n.value,t instanceof RegExp&&(n=this.s(this.Ma),Nt(this,n,t),t=n),e[e.length-1].value=t};f.prototype.stepLogicalExpression=function(e,t,n){if(n.operator!=="&&"&&n.operator!=="||")throw SyntaxError("Unknown logical operator: "+n.operator);if(!t.ja)return t.ja=!0,new y(n.left,t.scope);if(t.Da)e.pop(),e[e.length-1].value=t.value;else if(n.operator==="&&"&&!t.value||n.operator==="||"&&t.value)e.pop(),e[e.length-1].value=t.value;else return t.Da=!0,new y(n.right,t.scope)};f.prototype.stepMemberExpression=function(e,t,n){if(!t.Ca)return t.Ca=!0,new y(n.object,t.scope);if(n.bb)if(t.Vb)n=t.value;else return t.u=t.value,t.Vb=!0,new y(n.Wa,t.scope);else t.u=t.value,n=n.Wa.name;if(e.pop(),t.sa)e[e.length-1].value=[t.u,n];else{if(n=this.G(t.u,n),this.P)return Ge(this,n,t.u);e[e.length-1].value=n}};f.prototype.stepNewExpression=f.prototype.stepCallExpression;f.prototype.stepObjectExpression=function(e,t,n){var r=t.A||0,i=n.h[r];if(t.u){var s=t.Pa;t.Ja[s]||(t.Ja[s]={}),t.Ja[s][i.kind]=t.value,t.A=++r,i=n.h[r]}else t.u=this.s(this.M),t.Ja=Object.create(null);if(i){var u=i.key;if(u.type==="Identifier")s=u.name;else if(u.type==="Literal")s=u.value;else throw SyntaxError("Unknown object structure: "+u.type);return t.Pa=s,new y(i.value,t.scope)}for(u in t.Ja)n=t.Ja[u],"get"in n||"set"in n?this.g(t.u,u,Fe,{configurable:!0,enumerable:!0,get:n.get,set:n.set}):this.g(t.u,u,n.init);e.pop(),e[e.length-1].value=t.u};f.prototype.stepProgram=function(e,t,n){if(e=n.body.shift())return t.done=!1,new y(e,t.scope);t.done=!0};f.prototype.stepReturnStatement=function(e,t,n){if(n.K&&!t.ka)return t.ka=!0,new y(n.K,t.scope);Be(this,3,t.value)};f.prototype.stepSequenceExpression=function(e,t,n){var r=t.A||0;if(n=n.xb[r])return t.A=r+1,new y(n,t.scope);e.pop(),e[e.length-1].value=t.value};f.prototype.stepSwitchStatement=function(e,t,n){if(!t.ga)return t.ga=1,new y(n.Qb,t.scope);for(t.ga===1&&(t.ga=2,t.hc=t.value,t.cb=-1);;){var r=t.gb||0,i=n.tb[r];if(t.Ha||!i||i.test)if(i||t.Ha||t.cb===-1)if(i){if(!t.Ha&&!t.Fb&&i.test)return t.Fb=!0,new y(i.test,t.scope);if(t.Ha||t.value===t.hc){t.Ha=!0;var s=t.A||0;if(i.da[s])return t.Zb=!0,t.A=s+1,new y(i.da[s],t.scope)}t.Fb=!1,t.A=0,t.gb=r+1}else{e.pop();break}else t.Ha=!0,t.gb=t.cb;else t.cb=r,t.gb=r+1}};f.prototype.stepThisExpression=function(e){e.pop(),e[e.length-1].value=bt(this,"this")};f.prototype.stepThrowStatement=function(e,t,n){if(t.ka)m(this,t.value);else return t.ka=!0,new y(n.K,t.scope)};f.prototype.stepTryStatement=function(e,t,n){if(!t.Rb)return t.Rb=!0,new y(n.block,t.scope);if(t.ea&&t.ea.type===4&&!t.Tb&&n.Ea)return t.Tb=!0,e=_t(this,t.scope),this.g(e.object,n.Ea.Ua.name,t.ea.value),t.ea=void 0,new y(n.Ea.body,e);if(!t.Sb&&n.fb)return t.Sb=!0,new y(n.fb,t.scope);e.pop(),t.ea&&Be(this,t.ea.type,t.ea.value,t.ea.label)};f.prototype.stepUnaryExpression=function(e,t,n){if(!t.ka)return t.ka=!0,e=new y(n.K,t.scope),e.sa=n.operator==="delete",e;e.pop();var r=t.value;switch(n.operator){case"-":r=-r;break;case"+":r=+r;break;case"!":r=!r;break;case"~":r=~r;break;case"delete":if(n=!0,Array.isArray(r)){var i=r[0];i===xe&&(i=t.scope),r=String(r[1]);try{delete i.h[r]}catch{t.scope.S?m(this,this.j,"Cannot delete property '"+r+"' of '"+i+"'"):n=!1}}r=n;break;case"typeof":r=r&&r.H==="Function"?"function":typeof r;break;case"void":r=void 0;break;default:throw SyntaxError("Unknown unary operator: "+n.operator)}e[e.length-1].value=r};f.prototype.stepUpdateExpression=function(e,t,n){if(!t.ja)return t.ja=!0,e=new y(n.K,t.scope),e.sa=!0,e;if(t.Ga||(t.Ga=t.value),t.Ba&&(t.ma=t.value),!t.Ba){var r=Dt(this,t.Ga);if(t.ma=r,this.P)return t.Ba=!0,Ge(this,r,t.Ga)}if(t.ta)e.pop(),e[e.length-1].value=t.ib;else{if(r=Number(t.ma),n.operator==="++")var i=r+1;else if(n.operator==="--")i=r-1;else throw SyntaxError("Unknown update expression: "+n.operator);if(n=n.prefix?i:r,r=Ut(this,t.Ga,i))return t.ta=!0,t.ib=n,Ft(this,r,t.Ga,i);e.pop(),e[e.length-1].value=n}};f.prototype.stepVariableDeclaration=function(e,t,n){n=n.fa;var r=t.A||0,i=n[r];for(t.Bb&&i&&(Ir(this,i.id.name,t.value),t.Bb=!1,i=n[++r]);i;){if(i.ua)return t.A=r,t.Bb=!0,t.Pa=i.id.name,new y(i.ua,t.scope);i=n[++r]}e.pop()};f.prototype.stepWithStatement=function(e,t,n){return t.Ca?(e.pop(),e=_t(this,t.scope,t.value),new y(n.body,e)):(t.Ca=!0,new y(n.object,t.scope))};f.prototype.stepWhileStatement=f.prototype.stepDoWhileStatement;ae.Interpreter=f;f.prototype.step=f.prototype.lb;f.prototype.run=f.prototype.Eb;f.prototype.appendCode=f.prototype.Jb;f.prototype.createObject=f.prototype.Aa;f.prototype.createObjectProto=f.prototype.s;f.prototype.createAsyncFunction=f.prototype.ub;f.prototype.createNativeFunction=f.prototype.i;f.prototype.getProperty=f.prototype.G;f.prototype.setProperty=f.prototype.g;f.prototype.nativeToPseudo=f.prototype.Ia;f.prototype.pseudoToNative=f.prototype.R;f.prototype.getGlobalScope=f.prototype.Xb;f.prototype.getStateStack=f.prototype.Yb;f.prototype.setStateStack=f.prototype.ec;f.VALUE_IN_DESCRIPTOR=Fe;function hn(){const e=f.prototype.getProperty,t=f.prototype.setProperty;function n(u,h){if(u==null||!u._connected)return e.call(this,u,h);const d=u._connected[h];return Array.isArray(d)?this.nativeToPseudo(d):typeof d=="object"?this.createConnectedObject(d):d}function r(u,h,d,N){if(u==null||!u._connected)return t.call(this,u,h,d,N);u._connected[h]=this.pseudoToNative(d)}const i=[],s=[];for(const u of Object.keys(f.prototype))f.prototype[u]===e&&i.push(u),f.prototype[u]===t&&s.push(u);for(const u of i)f.prototype[u]=n;for(const u of s)f.prototype[u]=r;f.prototype.createConnectedObject=function(u){const h=this.createObject(this.OBJECT);return h._connected=u,h}}hn();const gn=e=>e.replace(/^.*?function main\(\)/,`
9
- var __awaiter = function (e, t, n, r) {return r()},
10
- __generator = function (e, t) { return t() };
11
- function main()`).replace(/\?\./g,"."),Sr=e=>e+"JSON",vn=({builder:e,context:t,event:n,rootState:r,localState:i,rootSetState:s,code:u})=>{const h=At({rootState:r,localState:i,rootSetState:s}),d=Or({builder:e,context:t,event:n,state:h}),N=d.map(([G])=>{const ne=Sr(G);return G==="state"?"":`var ${G} = ${ne} === undefined ? undefined : JSON.parse(${ne});`}).join(`
12
- `),P=gn(u);if(P===""){q.logger.warn("Skipping evaluation of empty code block.");return}const C=`
13
- function theFunction() {
14
- ${N}
15
-
16
- ${P}
17
- }
18
- theFunction();
19
- `,Xe=function(G,ne){d.forEach(([pe,S])=>{if(pe==="state")G.setProperty(ne,pe,G.createConnectedObject(S),G.READONLY_DESCRIPTOR);else{const je=JSON.stringify(S);G.setProperty(ne,Sr(pe),je)}})},Y=new f(C,Xe);return Y.run(),Y.pseudoToNative(Y.value)};function yn(){var e;return typeof process!="undefined"&&q.checkIsDefined((e=process==null?void 0:process.versions)==null?void 0:e.node)}const dn=({shouldLogWarning:e})=>{var i;if(!yn())return!1;const t=process.arch==="arm64",n=process.version.startsWith("v20"),r=(i=process.env.NODE_OPTIONS)==null?void 0:i.includes("--no-node-snapshot");return t&&n&&!r?(e&&q.logger.log("Skipping usage of `isolated-vm` to avoid crashes in Node v20 on an arm64 machine.\n If you would like to use the `isolated-vm` package on this machine, please provide the `NODE_OPTIONS=--no-node-snapshot` config to your Node process.\n See https://github.com/BuilderIO/builder/blob/main/packages/sdks/README.md#node-v20--m1-macs-apple-silicon-support for more information.\n "),!0):!1},mn=e=>q.isBrowser()||dn({shouldLogWarning:!0})?Kr(e):vn(e),wn=/^(return )?(\s*)?state(?<getPath>(\.\w+)+)(\s*);?$/,En=/(\s)*var(\s)+_virtual_index(\s)*=(\s)*state(?<getPath>(\.\w+)+)(\s*);?(\s)*return(\s)*_virtual_index(\s)*/,xn=e=>{var t,n,r,i,s,u;return((r=(n=(t=wn.exec(e.trim()))==null?void 0:t.groups)==null?void 0:n.getPath)==null?void 0:r.slice(1))||((u=(s=(i=En.exec(e.trim()))==null?void 0:i.groups)==null?void 0:s.getPath)==null?void 0:u.slice(1))};function jn({code:e,context:t,localState:n,rootState:r,rootSetState:i,event:s,isExpression:u=!0}){if(e.trim()==="")return;const h=xn(e.trim());if(h)return kr({...r,...n},h);const d={code:$r(e,{isExpression:u}),builder:Jr(),context:t,event:s,rootSetState:i,rootState:r,localState:n};try{return mn(d)}catch(N){q.logger.error("Failed code evaluation: "+N.message,{code:e});return}}exports.evaluate=jn;exports.get=kr;