@builder.io/sdk-react-nextjs 0.12.8 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/{USE_CLIENT_BUNDLE-164b0828.js → USE_CLIENT_BUNDLE-0e2e786f.js} +2 -2
- package/lib/{node/USE_CLIENT_BUNDLE-e31c74cc.cjs → browser/USE_CLIENT_BUNDLE-1c19fc49.cjs} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-cd7a6238.js → browser/USE_SERVER_BUNDLE-c5bf5f08.js} +1 -1
- package/lib/{edge/USE_SERVER_BUNDLE-2e4c0a0a.cjs → browser/USE_SERVER_BUNDLE-eda321c7.cjs} +1 -1
- package/lib/browser/{bundle-f375f07b.cjs → bundle-8768227a.cjs} +3 -3
- package/lib/browser/{bundle-f83a1ca5.js → bundle-a759c640.js} +6 -6
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +3 -3
- package/lib/{node/USE_CLIENT_BUNDLE-e0108fb4.js → edge/USE_CLIENT_BUNDLE-3b67982b.js} +2 -2
- package/lib/{browser/USE_CLIENT_BUNDLE-a350a268.cjs → edge/USE_CLIENT_BUNDLE-d79f63a1.cjs} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-3e951ab1.js → edge/USE_SERVER_BUNDLE-2f4d4c84.js} +1 -1
- package/lib/{node/USE_SERVER_BUNDLE-29398256.cjs → edge/USE_SERVER_BUNDLE-eebc5fb9.cjs} +1 -1
- package/lib/edge/{bundle-3da03df6.js → bundle-117e4014.js} +6 -6
- package/lib/edge/{bundle-5b207761.cjs → bundle-67a092ad.cjs} +3 -3
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +3 -3
- package/lib/{edge/USE_CLIENT_BUNDLE-f1ccd54b.cjs → node/USE_CLIENT_BUNDLE-d6e6f95b.cjs} +1 -1
- package/lib/{edge/USE_CLIENT_BUNDLE-b8d07605.js → node/USE_CLIENT_BUNDLE-ea8e582d.js} +2 -2
- package/lib/{browser/USE_SERVER_BUNDLE-5219d3fc.js → node/USE_SERVER_BUNDLE-18bb0dcb.js} +1 -1
- package/lib/{browser/USE_SERVER_BUNDLE-b1e8364e.cjs → node/USE_SERVER_BUNDLE-78694df8.cjs} +1 -1
- package/lib/node/{bundle-83186530.cjs → bundle-1f2f3033.cjs} +3 -3
- package/lib/node/{bundle-6c5cef2d.js → bundle-457b4e1d.js} +6 -6
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/package.json +1 -1
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/get-content/types.d.ts +2 -2
- package/types/cjs/types/api-version.d.ts +1 -1
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/get-content/types.d.ts +2 -2
- package/types/esm/types/api-version.d.ts +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i, Fragment as h, jsxs as E } from "react/jsx-runtime";
|
|
3
|
-
import { i as p, g as H, a as $, b as O, c as w, d as R, e as ee, f as P, h as V, _ as D, j as te, l as ne, k as ie, t as ae, m as U, n as ce, o as re, r as le, s as oe, p as de, q as se, u as ue } from "./bundle-
|
|
3
|
+
import { i as p, g as H, a as $, b as O, c as w, d as R, e as ee, f as P, h as V, _ as D, j as te, l as ne, k as ie, t as ae, m as U, n as ce, o as re, r as le, s as oe, p as de, q as se, u as ue } from "./bundle-a759c640.js";
|
|
4
4
|
import { useRef as T, useState as x, useEffect as b, createContext as me, createElement as ge } from "react";
|
|
5
|
-
import { p as he } from "./USE_SERVER_BUNDLE-
|
|
5
|
+
import { p as he } from "./USE_SERVER_BUNDLE-c5bf5f08.js";
|
|
6
6
|
import { useRouter as be } from "next/navigation";
|
|
7
7
|
function J(e) {
|
|
8
8
|
return /* @__PURE__ */ i(h, { children: p(e.TagName) ? /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ i(h, { children: typeof e.TagName == "string" ? /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) : /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) }) });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";const t=require("react/jsx-runtime"),a=require("./bundle-
|
|
1
|
+
"use client";"use strict";const t=require("react/jsx-runtime"),a=require("./bundle-8768227a.cjs"),r=require("react"),D=require("./USE_SERVER_BUNDLE-eda321c7.cjs"),V=require("next/navigation");function C(e){return t.jsx(t.Fragment,{children:a.isEmptyElement(e.TagName)?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):t.jsx(t.Fragment,{children:typeof e.TagName=="string"?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}function H(e){return t.jsx(C,{TagName:e.link?e.builderLinkComponent||"a":"button",attributes:{...e.attributes,[a.getClassPropName()]:`${e.link?"":"builder-button"} ${e.attributes[a.getClassPropName()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},actionAttributes:{},children:e.text})}function U(e){return t.jsx(C,{TagName:e.Wrapper,attributes:a.getBlockProperties({block:e.block,context:e.context}),actionAttributes:a.getBlockActions({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 $(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...a.getBlockProperties({block:e.block,context:e.context}),...a.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}function O(e){function l(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function g(){var o,m;a.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((m=window.parent)==null||m.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function x(){var o,m;a.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((m=window.parent)==null||m.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx(e.BlocksWrapper,{className:l()+" props-blocks-wrapper-4f2c12d8","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>g(),onMouseEnter:o=>x(),onKeyPress:o=>g(),...e.BlocksWrapperProps,children:e.children}),t.jsx("style",{children:`.props-blocks-wrapper-4f2c12d8 {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: stretch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use server";"use strict";const n=require("./bundle-
|
|
1
|
+
"use server";"use strict";const n=require("./bundle-8768227a.cjs");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const Me=require("lru-cache"),c=require("react/jsx-runtime"),S=require("./USE_CLIENT_BUNDLE-
|
|
1
|
+
"use strict";const Me=require("lru-cache"),c=require("react/jsx-runtime"),S=require("./USE_CLIENT_BUNDLE-1c19fc49.cjs");require("react");require("next/navigation");const He=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Ke=e=>typeof e=="string"&&He.has(e.toLowerCase()),I="rsc",F=()=>{switch(I){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function qe(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const B="[Builder.io]: ",k={log:(...e)=>console.log(B,...e),error:(...e)=>console.error(B,...e),warn:(...e)=>console.warn(B,...e),debug:(...e)=>console.debug(B,...e)};function x(){return typeof window<"u"&&typeof document<"u"}function ze(){return x()&&window.self!==window.top}function O(){return ze()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const Ge=()=>{if(x()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},Je=()=>typeof navigator=="object"&&navigator.userAgent||"",ue=()=>{const e=Je(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||I==="reactNative"}},n=e.match(/Tablet|iPad/i),o=Ge();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},Ye=({builder:e,context:t,event:n,state:o})=>Object.entries({state:o,Builder:e,builder:e,context:t,event:n}),Qe=()=>({isEditing:O(),isBrowser:x(),isServer:!x(),getUserAttributes:()=>ue()}),Xe=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,Y=({code:e,builder:t,context:n,event:o,localState:i,rootSetState:r,rootState:a})=>{const s=Ye({builder:t,context:n,event:o,state:me({rootState:a,localState:i,rootSetState:r})});return new Function(...s.map(([l])=>l),e)(...s.map(([,l])=>l))};function me({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(o,i)=>{if(t&&i in t)return t[i];const r=o[i];return typeof r=="object"?me({rootState:r,localState:void 0,rootSetState:n?a=>{o[i]=a,n(o)}:void 0}):r},set:(o,i,r)=>{if(t&&i in t)throw new Error("Writing to local state is not allowed as it is read-only.");return o[i]=r,n==null||n(o),!0}})}const C=e=>e!=null;function Ze(){var e;return typeof process<"u"&&C((e=process==null?void 0:process.versions)==null?void 0:e.node)}const et=()=>{var o;if(!Ze())return!1;const e=process.arch==="arm64",t=process.version.startsWith("v20"),n=(o=process.env.NODE_OPTIONS)==null?void 0:o.includes("--no-node-snapshot");return e&&t&&!n?(k.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},tt=e=>(x()||et(),Y(e));function N({code:e,context:t,localState:n,rootState:o,rootSetState:i,event:r,isExpression:a=!0}){if(e===""){k.warn("Skipping evaluation of empty code block.");return}const s={code:Xe(e,{isExpression:a}),builder:Qe(),context:t,event:r,rootSetState:i,rootState:o,localState:n};try{return tt(s)}catch(l){k.error("Failed code evaluation: "+l.message,{code:e});return}}const A=e=>JSON.parse(JSON.stringify(e)),nt=(e,t,n)=>{if(Object(e)!==e)return e;const o=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return o.slice(0,-1).reduce((i,r,a)=>Object(i[r])===i[r]?i[r]:i[r]=Math.abs(Number(o[a+1]))>>0===+o[a+1]?[]:{},e)[o[o.length-1]]=n,e};const ot=({block:e,context:t,localState:n,rootState:o,rootSetState:i})=>{if(!e.bindings)return e;const r=A(e),a={...r,properties:{...r.properties},actions:{...r.actions}};for(const s in e.bindings){const l=e.bindings[s],m=N({code:l,localState:n,rootState:o,rootSetState:i,context:t});nt(a,s,m)}return a};function $({block:e,context:t,shouldEvaluateBindings:n,localState:o,rootState:i,rootSetState:r}){const a=e;return n?ot({block:a,localState:o,rootState:i,rootSetState:r,context:t}):a}const it=({block:e,context:t,registeredComponents:n})=>{var r;const o=(r=$({block:e,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context,shouldEvaluateBindings:!1}).component)==null?void 0:r.name;if(!o)return null;const i=n[o];if(i)return i;console.warn(`
|
|
2
2
|
Could not find a registered component named "${o}".
|
|
3
3
|
If you registered it, is the file that registered it imported by the file that needs to render it?`)},rt=({block:e,context:t})=>{const{repeat:n,...o}=e;if(!(n!=null&&n.collection))return;const i=N({code:n.collection,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,context:t.context});if(!Array.isArray(i))return;const r=n.collection.split(".").pop(),a=n.itemName||(r?r+"Item":"item");return i.map((l,m)=>({context:{...t,localState:{...t.localState,$index:m,$item:l,[a]:l,[`$${a}Index`]:m}},block:o}))},fe={small:{min:320,default:321,max:640},medium:{min:641,default:642,max:991},large:{min:990,default:991,max:1200}},Q=(e,t=fe)=>`@media (max-width: ${t[e].max}px)`,he=({small:e,medium:t})=>{const n=A(fe);if(!e||!t)return n;const o=Math.floor(e/2);n.small={max:e,min:o,default:o+1};const i=n.small.max+1;n.medium={max:t,min:i,default:i+1};const r=n.medium.max+1;return n.large={max:2e3,min:r,default:r+1},n},at=e=>e.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase(),pe=e=>Object.entries(e).map(([n,o])=>{if(typeof o=="string")return`${at(n)}: ${o};`}).filter(C),st=e=>pe(e).join(`
|
|
4
4
|
`),D=({mediaQuery:e,className:t,styles:n})=>{const o=`.${t} {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
`};return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
32
|
+
`};return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-febc5ea6`,style:m(),children:[c.jsx(c.Fragment,{children:c.jsx(L,{styles:f()})}),(h=e.columns)==null?void 0:h.map((u,d)=>c.jsx(S.DynamicRenderer,{TagName:u.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...u.link?{href:u.link}:{},[F()]:"builder-column",style:ge(g(d))},children:c.jsx(P,{path:`component.options.columns.${d}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:u.blocks})},d))]}),c.jsx("style",{children:`.div-febc5ea6 {
|
|
33
33
|
display: flex;
|
|
34
34
|
line-height: normal;
|
|
35
35
|
}`})]})}function Z(e){return e.replace(/http(s)?:/,"")}function xt(e="",t,n){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),i=e.indexOf("?")!==-1?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+i+t+"="+encodeURIComponent(n)}function kt(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return Z(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=e.split(n[0]),i=n[3],r=t.match("x")?t:`${t}x`;return Z(`${o[0]}_${r}${i}`)}return null}function St(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const o=Number(e.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),t.filter(i=>i!==o).map(i=>`${xt(e,"width",i)} ${i}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[kt(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([e]).join(", "):e}const vt=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},xe=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(o=>o.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){k.warn("[COOKIE] GET error: ",(o==null?void 0:o.message)||o);return}},ke=async e=>xe(e),Ct=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(C).join("; "),wt=[["secure",""],["SameSite","None"]],It=({name:e,value:t,expires:n})=>{const i=(x()?location.protocol==="https:":!0)?wt:[[]],r=n?[["expires",n.toUTCString()]]:[[]],a=[[e,t],...r,["path","/"],["domain",vt(window.location.hostname)],...i];return Ct(a)},Se=async({name:e,value:t,expires:n,canTrack:o})=>{try{if(!o)return;const i=It({name:e,value:t,expires:n});document.cookie=i}catch(i){k.warn("[COOKIE] SET error: ",(i==null?void 0:i.message)||i)}},Et="builder.tests",K=e=>`${Et}.${e}`,Tt=({contentId:e})=>ke({name:K(e),canTrack:!0}),Rt=({contentId:e})=>xe({name:K(e),canTrack:!0}),At=({contentId:e,value:t})=>Se({name:K(e),value:t,canTrack:!0}),ve=e=>C(e.id)&&C(e.variations)&&Object.keys(e.variations).length>0,Pt=({id:e,variations:t})=>{var i;let n=0;const o=Math.random();for(const r in t){const a=(i=t[r])==null?void 0:i.testRatio;if(n+=a,o<n)return r}return e},Ce=e=>{const t=Pt(e);return At({contentId:e.id,value:t}).catch(n=>{k.error("could not store A/B test variation: ",n)}),t},we=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},Bt=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!ve(e))return e;const n=Rt({contentId:e.id})||Ce({variations:e.variations,id:e.id}),o=we({item:e,testGroupId:n});return{...e,...o}},Vt=async({item:e,canTrack:t})=>{if(!t||!ve(e))return e;const o=await Tt({contentId:e.id})||Ce({variations:e.variations,id:e.id}),i=we({item:e,testGroupId:o});return{...e,...i}},W=e=>C(e)?e:!0,jt={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},$t={name:"Columns",isRSC:!0,inputs:[{name:"columns",type:"array",broadcast:!0,subFields:[{name:"blocks",type:"array",hideFromUI:!0,defaultValue:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{name:"width",type:"number",hideFromUI:!0,helperText:"Width %, e.g. set to 50 to fill half of the space"},{name:"link",type:"url",helperText:"Optionally set a url that clicking this column will link to"}],defaultValue:[{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]},{blocks:[{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto",minHeight:"20px",minWidth:"20px",overflow:"hidden"}},component:{name:"Image",options:{image:"https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",backgroundPosition:"center",backgroundSize:"cover",aspectRatio:.7004048582995948}}},{"@type":"@builder.io/sdk:Element",responsiveStyles:{large:{display:"flex",flexDirection:"column",alignItems:"stretch",flexShrink:"0",position:"relative",marginTop:"30px",textAlign:"center",lineHeight:"normal",height:"auto"}},component:{name:"Text",options:{text:"<p>Enter some text...</p>"}}}]}],onChange:e=>{function t(){n.forEach(o=>{o.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(i=>i.get("width"))&&(n.find(r=>!r.get("width"))||n.reduce((s,l)=>s+l.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}]},Wt={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}]},Ft={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(o=>o.json()).then(o=>{e.get("url")===t&&(o.html?e.set("content",o.html):e.set("content","Invalid url, please try another"))}).catch(o=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},Ot=["text/javascript","application/javascript","application/ecmascript"],Nt=e=>Ot.includes(e.type),Lt={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Ut={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(a,s=6e4){return new Promise((l,m)=>{const g=document.createElement("img");let p=!1;g.onload=()=>{p=!0,l(g)},g.addEventListener("error",f=>{console.warn("Image load failed",f.error),m(f.error)}),g.src=a,setTimeout(()=>{p||m(new Error("Image load timed out"))},s)})}function o(a){return Math.round(a*1e3)/1e3}const i=e.get("image"),r=e.get("aspectRatio");if(fetch(i).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),i&&(!r||r===.7041))return n(i).then(a=>{const s=e.get("aspectRatio");e.get("image")===i&&(!s||s===.7041)&&a.width&&a.height&&(e.set("aspectRatio",o(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:"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}]},_t={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},Dt={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>"}}}]},Mt={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}]};function Ht(e){var t,n,o;return c.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:c.jsx(P,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(o=e.builderContext.rootState)==null?void 0:o[e.name]})})}const Kt={name:"Symbol",noWrap:!0,static:!0,isRSC:!0,inputs:[{name:"symbol",type:"uiSymbol"},{name:"dataOnly",helperText:"Make this a data symbol that doesn't display any UI",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"inheritState",helperText:"Inherit the parent component state and data",type:"boolean",defaultValue:!1,advanced:!0},{name:"renderToLiquid",helperText:"Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",type:"boolean",defaultValue:!1,advanced:!0,hideFromUI:!0},{name:"useChildren",hideFromUI:!0,type:"boolean"}]},qt={name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Ie(e){var t;return c.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const zt={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},ee=()=>[{component:S.Button,...jt},{component:ye,...$t},{component:S.CustomCode,...Wt},{component:S.Embed,...Ft},{component:S.FragmentComponent,...Lt},{component:S.Image,...Ut},{component:S.ImgComponent,..._t},{component:S.SectionComponent,...Dt},{component:De,...Kt},{component:Ie,...qt},{component:S.Video,...zt},{component:Ht,...Mt}],te=[],Gt=e=>({type:"builder.registerComponent",data:M(e)}),Jt=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},Yt=e=>typeof e=="function"?Jt(e):A(e),M=({inputs:e,...t})=>({...A(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((o,[i,r])=>({...o,[i]:Yt(r)}),{}))}),Qt=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
)`,on=({contentId:e,variationId:t})=>`window.${Te}(
|
|
132
132
|
"${t}", "${e}", ${Re}
|
|
133
133
|
)`;function H(e){return c.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}const rn=e=>{const t=e.get("preview"),n=e.get("overrides."+t);return n||k.warn("No previewed ID found in search params."),n};function Ae(){globalThis._BUILDER_PREVIEW_LRU_CACHE||(globalThis._BUILDER_PREVIEW_LRU_CACHE=new Me.LRUCache({max:500,ttl:1e3*60*5}))}function an(e){Ae();const t=rn(e);return typeof t=="string"?globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t):void 0}function sn(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function cn(){const e=sn().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
134
|
-
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const Pe=cn();function j(e,t=null,n="."){return Object.keys(e).reduce((o,i)=>{const r=e[i],a=[t,i].filter(Boolean).join(n);return[typeof r=="object",r!==null,!(Array.isArray(r)&&r.length===0)].every(Boolean)?{...o,...j(r,a,n)}:{...o,[a]:r}},{})}const ln="v3",ne="builder.",dn="options.",un=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},q=e=>{if(!e)return{};const t=Be(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(ne)){const i=o.replace(ne,"").replace(dn,"");n[i]=t[o]}}),n},mn=()=>{if(!x())return{};const e=new URLSearchParams(window.location.search);return q(e)},Be=e=>e instanceof URLSearchParams?un(e):e,oe=e=>typeof e=="number"&&!isNaN(e)&&e>=0,z=e=>{let{noTraverse:t=!1}=e;const{limit:n=30,userAttributes:o,query:i,model:r,apiKey:a,includeRefs:s=!0,enrich:l,locale:m,apiVersion:g=ln,fields:p,omit:f,offset:h,cacheSeconds:u,staleCacheSeconds:d,sort:y,includeUnpublished:v}=e;if(!a)throw new Error("Missing API key");if(!["
|
|
134
|
+
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const Pe=cn();function j(e,t=null,n="."){return Object.keys(e).reduce((o,i)=>{const r=e[i],a=[t,i].filter(Boolean).join(n);return[typeof r=="object",r!==null,!(Array.isArray(r)&&r.length===0)].every(Boolean)?{...o,...j(r,a,n)}:{...o,[a]:r}},{})}const ln="v3",ne="builder.",dn="options.",un=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},q=e=>{if(!e)return{};const t=Be(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(ne)){const i=o.replace(ne,"").replace(dn,"");n[i]=t[o]}}),n},mn=()=>{if(!x())return{};const e=new URLSearchParams(window.location.search);return q(e)},Be=e=>e instanceof URLSearchParams?un(e):e,oe=e=>typeof e=="number"&&!isNaN(e)&&e>=0,z=e=>{let{noTraverse:t=!1}=e;const{limit:n=30,userAttributes:o,query:i,model:r,apiKey:a,includeRefs:s=!0,enrich:l,locale:m,apiVersion:g=ln,fields:p,omit:f,offset:h,cacheSeconds:u,staleCacheSeconds:d,sort:y,includeUnpublished:v}=e;if(!a)throw new Error("Missing API key");if(!["v3"].includes(g))throw new Error(`Invalid apiVersion: expected 'v3', received '${g}'`);(e.limit===void 0||e.limit>1)&&!("noTraverse"in e)&&(t=!0);const b=new URL(`https://cdn.builder.io/api/${g}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m?`&locale=${m}`:""}${l?`&enrich=${l}`:""}`);if(b.searchParams.set("omit",f||"meta.componentsUsed"),p&&b.searchParams.set("fields",p),Number.isFinite(h)&&h>-1&&b.searchParams.set("offset",String(Math.floor(h))),typeof v=="boolean"&&b.searchParams.set("includeUnpublished",String(v)),u&&oe(u)&&b.searchParams.set("cacheSeconds",String(u)),d&&oe(d)&&b.searchParams.set("staleCacheSeconds",String(d)),y){const w=j({sort:y});for(const R in w)b.searchParams.set(R,JSON.stringify(w[R]))}const T={...mn(),...Be(e.options||{})},E=j(T);for(const w in E)b.searchParams.set(w,String(E[w]));if(o&&b.searchParams.set("userAttributes",JSON.stringify(o)),i){const w=j({query:i});for(const R in w)b.searchParams.set(R,JSON.stringify(w[R]))}return b},fn=e=>"results"in e;async function _(e){const t=await G({...e,limit:1});return t&&t[0]||null}const hn=_,pn=async e=>{const t=z(e);return await(await Pe(t.href)).json()},Ve=async(e,t,n=z(e))=>{const o=W(e.canTrack);if(n.search.includes("preview=")){const r=[];for(const a of t.results){const s=an(n.searchParams);r.push(s||a)}t.results=r}if(!o||!(x()||I==="reactNative"))return t.results;try{const r=[];for(const a of t.results)r.push(await Vt({item:a,canTrack:o}));t.results=r}catch(r){k.error("Could not process A/B tests. ",r)}return t.results};async function G(e){try{const t=z(e),n=await pn(e);return fn(n)?Ve(e,n):(k.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return k.error("Error fetching data. ",t),null}}const gn=G;function bn(){return!x()||O()?!1:location.search.indexOf("builder.preview=")!==-1}function yn(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function je(){return yn().replace(/-/g,"")}const $e="builderSessionId",xn=async({canTrack:e})=>{if(!e)return;const t=await ke({name:$e,canTrack:e});if(C(t))return t;{const n=kn();return Sn({id:n,canTrack:e}),n}},kn=()=>je(),Sn=({id:e,canTrack:t})=>Se({name:$e,value:e,canTrack:t}),We=()=>x()&&typeof localStorage<"u"?localStorage:void 0,vn=({key:e,canTrack:t})=>{var n;try{return t?(n=We())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},Cn=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=We())==null||o.setItem(e,n))}catch(i){console.debug("[LocalStorage] SET error: ",i)}},Fe="builderVisitorId",wn=({canTrack:e})=>{if(!e)return;const t=vn({key:Fe,canTrack:e});if(C(t))return t;{const n=In();return En({id:n,canTrack:e}),n}},In=()=>je(),En=({id:e,canTrack:t})=>Cn({key:Fe,value:e,canTrack:t}),Tn=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await xn({canTrack:e}),n=wn({canTrack:e});return{sessionId:t,visitorId:n}},Rn=async({type:e,canTrack:t,apiKey:n,metadata:o,...i})=>({type:e,data:{...i,metadata:{url:location.href,...o},...await Tn({canTrack:t}),userAttributes:ue(),ownerId:n}});async function Oe(e){if(!e.apiKey){k.error("Missing API key for track call. Please provide your API key.");return}if(e.canTrack&&!O()&&(x()||I==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await Rn(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const An=e=>Oe({...e,canTrack:!0});function ie(e){return Math.round(e*1e3)/1e3}const Pn=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let o=n?e:e.parentElement;do{if(!o)return null;if(t(o))return o}while(o=o.parentElement);return null},Bn=e=>Pn(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),re=({event:e,target:t})=>{const n=t.getBoundingClientRect(),o=e.clientX-n.left,i=e.clientY-n.top,r=ie(o/n.width),a=ie(i/n.height);return{x:r,y:a}},Vn=e=>{const t=e.target,n=t&&Bn(t),o=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:t?re({event:e,target:t}):void 0,builderTargetOffset:n?re({event:e,target:n}):void 0,builderElementIndex:n&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(n):void 0}}},jn=["*.beta.builder.io","beta.builder.io","builder.io","localhost","qa.builder.io"];function Ne(e,t){const n=new URL(t.origin),o=n.hostname;return(e||jn).findIndex(i=>i.startsWith("*.")?o.endsWith(i.slice(1)):i===o)>-1}const $n="0.13.1",ae={};function Le(e,t){let n=ae[e];if(n||(n=ae[e]=[]),n.push(t),x()){const o={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(i){console.debug("Could not postmessage",i)}}}const Wn=()=>{Le("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let se=!1;const Ue=(e={})=>{var t,n;se||(se=!0,x()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:I,version:$n,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",o=>{var r,a;if(!Ne(e.trustedHosts,o))return;const{data:i}=o;if(i!=null&&i.type)switch(i.type){case"builder.evaluate":{const s=i.data.text,l=i.data.arguments||[],m=i.data.id,g=new Function(s);let p,f=null;try{p=g.apply(null,l)}catch(h){f=h}f?(r=window.parent)==null||r.postMessage({type:"builder.evaluateError",data:{id:m,error:f.message}},"*"):p&&typeof p.then=="function"?p.then(h=>{var u;(u=window.parent)==null||u.postMessage({type:"builder.evaluateResult",data:{id:m,result:h}},"*")}).catch(console.error):(a=window.parent)==null||a.postMessage({type:"builder.evaluateResult",data:{result:p,id:m}},"*");break}}})))},_e=({model:e,trustedHosts:t,callbacks:n})=>o=>{if(!Ne(t,o))return;const{data:i}=o;if(i)switch(i.type){case"builder.configureSdk":{n.configureSdk(i.data);break}case"builder.triggerAnimation":{n.animation(i.data);break}case"builder.contentUpdate":{const r=i.data,a=r.key||r.alias||r.entry||r.modelName,s=r.data;a===e&&n.contentUpdate(s);break}}},Fn=(e,t,n)=>{if(!x)return k.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."),()=>{};Ue();const o=_e({callbacks:{contentUpdate:t,animation:()=>{},configureSdk:()=>{}},model:e,trustedHosts:n==null?void 0:n.trustedHosts});return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}};function ce(e,...t){const n=Object(e);for(let o=1;o<arguments.length;o++){const i=arguments[o];if(i!=null)for(const r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n}const On=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function Nn(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function Ln(e,t){const n=Un(e),o=getComputedStyle(t),i=e.steps[0].styles,r=e.steps[e.steps.length-1].styles,a=[i,r];for(const s of a)for(const l of n)l in s||(s[l]=o[l])}function Un(e){const t=[];for(const n of e.steps)for(const o in n.styles)t.indexOf(o)===-1&&t.push(o);return t}function _n(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){Nn(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Ln(e,n),n.style.transition="none",n.style.transitionDelay="0",ce(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${On(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),ce(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}const Dn=e=>{var r;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],o=e.fileUrl??((r=e==null?void 0:e.files)==null?void 0:r.regular);let i="";if(o&&t&&n&&(i+=`
|
|
135
135
|
@font-face {
|
|
136
136
|
font-family: "${t}";
|
|
137
137
|
src: local("${n}"), url('${o}') format('woff2');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LRUCache as $e } from "lru-cache";
|
|
2
2
|
import { jsx as l, Fragment as k, jsxs as R } from "react/jsx-runtime";
|
|
3
|
-
import { I as We, B as Oe, a as Ne, D as Fe, b as Le, C as Ue, E as _e, F as De, c as Me, d as je, S as He, V as Ke, e as ze } from "./USE_CLIENT_BUNDLE-
|
|
3
|
+
import { I as We, B as Oe, a as Ne, D as Fe, b as Le, C as Ue, E as _e, F as De, c as Me, d as je, S as He, V as Ke, e as ze } from "./USE_CLIENT_BUNDLE-0e2e786f.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "next/navigation";
|
|
6
6
|
const qe = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), to = (e) => typeof e == "string" && qe.has(e.toLowerCase()), I = "rsc", M = () => {
|
|
@@ -790,7 +790,7 @@ function vt(e) {
|
|
|
790
790
|
/* @__PURE__ */ R(
|
|
791
791
|
"div",
|
|
792
792
|
{
|
|
793
|
-
className: `builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
793
|
+
className: `builder-columns ${e.builderBlock.id}-breakpoints div-febc5ea6`,
|
|
794
794
|
style: m(),
|
|
795
795
|
children: [
|
|
796
796
|
/* @__PURE__ */ l(k, { children: /* @__PURE__ */ l(O, { styles: f() }) }),
|
|
@@ -826,7 +826,7 @@ function vt(e) {
|
|
|
826
826
|
]
|
|
827
827
|
}
|
|
828
828
|
),
|
|
829
|
-
/* @__PURE__ */ l("style", { children: `.div-
|
|
829
|
+
/* @__PURE__ */ l("style", { children: `.div-febc5ea6 {
|
|
830
830
|
display: flex;
|
|
831
831
|
line-height: normal;
|
|
832
832
|
}` })
|
|
@@ -1872,8 +1872,8 @@ const mn = "v3", ee = "builder.", fn = "options.", hn = (e) => {
|
|
|
1872
1872
|
} = e;
|
|
1873
1873
|
if (!a)
|
|
1874
1874
|
throw new Error("Missing API key");
|
|
1875
|
-
if (!["
|
|
1876
|
-
throw new Error(`Invalid apiVersion: expected '
|
|
1875
|
+
if (!["v3"].includes(g))
|
|
1876
|
+
throw new Error(`Invalid apiVersion: expected 'v3', received '${g}'`);
|
|
1877
1877
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
1878
1878
|
const b = new URL(`https://cdn.builder.io/api/${g}/content/${r}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m ? `&locale=${m}` : ""}${c ? `&enrich=${c}` : ""}`);
|
|
1879
1879
|
if (b.searchParams.set("omit", f || "meta.componentsUsed"), p && b.searchParams.set("fields", p), Number.isFinite(h) && h > -1 && b.searchParams.set("offset", String(Math.floor(h))), typeof x == "boolean" && b.searchParams.set("includeUnpublished", String(x)), u && te(u) && b.searchParams.set("cacheSeconds", String(u)), d && te(d) && b.searchParams.set("staleCacheSeconds", String(d)), y) {
|
|
@@ -2138,7 +2138,7 @@ function Be(e, t) {
|
|
|
2138
2138
|
const n = new URL(t.origin), o = n.hostname;
|
|
2139
2139
|
return (e || $n).findIndex((i) => i.startsWith("*.") ? o.endsWith(i.slice(1)) : i === o) > -1;
|
|
2140
2140
|
}
|
|
2141
|
-
const Wn = "0.
|
|
2141
|
+
const Wn = "0.13.1", ie = {};
|
|
2142
2142
|
function On(e, t) {
|
|
2143
2143
|
let n = ie[e];
|
|
2144
2144
|
if (n || (n = ie[e] = []), n.push(t), S()) {
|
package/lib/browser/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-8768227a.cjs"),t=require("./USE_CLIENT_BUNDLE-1c19fc49.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-eda321c7.cjs");exports.Blocks=e.Blocks;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.RenderBlocks=e.RenderBlocks;exports.RenderContent=e.RenderContent;exports.Symbol=e.Symbol;exports.Text=e.Text;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;exports.Button=t.Button;exports.Fragment=t.FragmentComponent;exports.Image=t.Image;exports.Section=t.SectionComponent;exports.Video=t.Video;
|
package/lib/browser/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as i, x as c, C as m, R as g, w as p, S as l, T as d, G as C, p as u, F as B, H as E, q as S, I as f, A as R, J as b, c as h, j as x, y as k, z as y, E as F, D as P } from "./bundle-
|
|
2
|
-
import { b as w, F as A, c as I, S as V, V as j } from "./USE_CLIENT_BUNDLE-
|
|
1
|
+
import { B as i, x as c, C as m, R as g, w as p, S as l, T as d, G as C, p as u, F as B, H as E, q as S, I as f, A as R, J as b, c as h, j as x, y as k, z as y, E as F, D as P } from "./bundle-a759c640.js";
|
|
2
|
+
import { b as w, F as A, c as I, S as V, V as j } from "./USE_CLIENT_BUNDLE-0e2e786f.js";
|
|
3
3
|
import "lru-cache";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "react";
|
|
6
6
|
import "next/navigation";
|
|
7
|
-
import "./USE_SERVER_BUNDLE-
|
|
7
|
+
import "./USE_SERVER_BUNDLE-c5bf5f08.js";
|
|
8
8
|
export {
|
|
9
9
|
i as Blocks,
|
|
10
10
|
w as Button,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i, Fragment as h, jsxs as E } from "react/jsx-runtime";
|
|
3
|
-
import { i as p, g as H, a as $, b as O, c as w, d as R, e as ee, f as P, h as V, _ as D, j as te, l as ne, k as ie, t as ae, m as U, n as ce, o as re, r as le, s as oe, p as de, q as se, u as ue } from "./bundle-
|
|
3
|
+
import { i as p, g as H, a as $, b as O, c as w, d as R, e as ee, f as P, h as V, _ as D, j as te, l as ne, k as ie, t as ae, m as U, n as ce, o as re, r as le, s as oe, p as de, q as se, u as ue } from "./bundle-117e4014.js";
|
|
4
4
|
import { useRef as T, useState as x, useEffect as b, createContext as me, createElement as ge } from "react";
|
|
5
|
-
import { p as he } from "./USE_SERVER_BUNDLE-
|
|
5
|
+
import { p as he } from "./USE_SERVER_BUNDLE-2f4d4c84.js";
|
|
6
6
|
import { useRouter as be } from "next/navigation";
|
|
7
7
|
function J(e) {
|
|
8
8
|
return /* @__PURE__ */ i(h, { children: p(e.TagName) ? /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ i(h, { children: typeof e.TagName == "string" ? /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) : /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) }) });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";const t=require("react/jsx-runtime"),a=require("./bundle-
|
|
1
|
+
"use client";"use strict";const t=require("react/jsx-runtime"),a=require("./bundle-67a092ad.cjs"),r=require("react"),D=require("./USE_SERVER_BUNDLE-eebc5fb9.cjs"),V=require("next/navigation");function C(e){return t.jsx(t.Fragment,{children:a.isEmptyElement(e.TagName)?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):t.jsx(t.Fragment,{children:typeof e.TagName=="string"?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}function H(e){return t.jsx(C,{TagName:e.link?e.builderLinkComponent||"a":"button",attributes:{...e.attributes,[a.getClassPropName()]:`${e.link?"":"builder-button"} ${e.attributes[a.getClassPropName()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},actionAttributes:{},children:e.text})}function U(e){return t.jsx(C,{TagName:e.Wrapper,attributes:a.getBlockProperties({block:e.block,context:e.context}),actionAttributes:a.getBlockActions({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 $(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...a.getBlockProperties({block:e.block,context:e.context}),...a.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}function O(e){function l(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function g(){var o,m;a.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((m=window.parent)==null||m.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function x(){var o,m;a.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((m=window.parent)==null||m.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx(e.BlocksWrapper,{className:l()+" props-blocks-wrapper-4f2c12d8","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>g(),onMouseEnter:o=>x(),onKeyPress:o=>g(),...e.BlocksWrapperProps,children:e.children}),t.jsx("style",{children:`.props-blocks-wrapper-4f2c12d8 {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: stretch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use server";"use strict";const n=require("./bundle-
|
|
1
|
+
"use server";"use strict";const n=require("./bundle-67a092ad.cjs");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LRUCache as to } from "lru-cache";
|
|
2
2
|
import { jsx as C, Fragment as L, jsxs as xe } from "react/jsx-runtime";
|
|
3
|
-
import { I as no, B as ro, a as oo, D as io, b as ao, C as so, E as lo, F as co, c as uo, d as fo, S as po, V as ho, e as mo } from "./USE_CLIENT_BUNDLE-
|
|
3
|
+
import { I as no, B as ro, a as oo, D as io, b as ao, C as so, E as lo, F as co, c as uo, d as fo, S as po, V as ho, e as mo } from "./USE_CLIENT_BUNDLE-3b67982b.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "next/navigation";
|
|
6
6
|
const go = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), _a = (e) => typeof e == "string" && go.has(e.toLowerCase()), he = "rsc", Xt = () => {
|
|
@@ -3263,7 +3263,7 @@ function si(e) {
|
|
|
3263
3263
|
/* @__PURE__ */ xe(
|
|
3264
3264
|
"div",
|
|
3265
3265
|
{
|
|
3266
|
-
className: `builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
3266
|
+
className: `builder-columns ${e.builderBlock.id}-breakpoints div-febc5ea6`,
|
|
3267
3267
|
style: k(),
|
|
3268
3268
|
children: [
|
|
3269
3269
|
/* @__PURE__ */ C(L, { children: /* @__PURE__ */ C(dt, { styles: P() }) }),
|
|
@@ -3299,7 +3299,7 @@ function si(e) {
|
|
|
3299
3299
|
]
|
|
3300
3300
|
}
|
|
3301
3301
|
),
|
|
3302
|
-
/* @__PURE__ */ C("style", { children: `.div-
|
|
3302
|
+
/* @__PURE__ */ C("style", { children: `.div-febc5ea6 {
|
|
3303
3303
|
display: flex;
|
|
3304
3304
|
line-height: normal;
|
|
3305
3305
|
}` })
|
|
@@ -4345,8 +4345,8 @@ const qi = "v3", Qn = "builder.", Zi = "options.", Qi = (e) => {
|
|
|
4345
4345
|
} = e;
|
|
4346
4346
|
if (!s)
|
|
4347
4347
|
throw new Error("Missing API key");
|
|
4348
|
-
if (!["
|
|
4349
|
-
throw new Error(`Invalid apiVersion: expected '
|
|
4348
|
+
if (!["v3"].includes(E))
|
|
4349
|
+
throw new Error(`Invalid apiVersion: expected 'v3', received '${E}'`);
|
|
4350
4350
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
4351
4351
|
const m = new URL(`https://cdn.builder.io/api/${E}/content/${i}?apiKey=${s}&limit=${n}&noTraverse=${t}&includeRefs=${u}${k ? `&locale=${k}` : ""}${d ? `&enrich=${d}` : ""}`);
|
|
4352
4352
|
if (m.searchParams.set("omit", P || "meta.componentsUsed"), S && m.searchParams.set("fields", S), Number.isFinite(j) && j > -1 && m.searchParams.set("offset", String(Math.floor(j))), typeof $ == "boolean" && m.searchParams.set("includeUnpublished", String($)), v && er(v) && m.searchParams.set("cacheSeconds", String(v)), x && er(x) && m.searchParams.set("staleCacheSeconds", String(x)), B) {
|
|
@@ -4611,7 +4611,7 @@ function Fr(e, t) {
|
|
|
4611
4611
|
const n = new URL(t.origin), r = n.hostname;
|
|
4612
4612
|
return (e || va).findIndex((o) => o.startsWith("*.") ? r.endsWith(o.slice(1)) : o === r) > -1;
|
|
4613
4613
|
}
|
|
4614
|
-
const ba = "0.
|
|
4614
|
+
const ba = "0.13.1", rr = {};
|
|
4615
4615
|
function Sa(e, t) {
|
|
4616
4616
|
let n = rr[e];
|
|
4617
4617
|
if (n || (n = rr[e] = []), n.push(t), G()) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const fo=require("lru-cache"),m=require("react/jsx-runtime"),q=require("./USE_CLIENT_BUNDLE-
|
|
1
|
+
"use strict";const fo=require("lru-cache"),m=require("react/jsx-runtime"),q=require("./USE_CLIENT_BUNDLE-d79f63a1.cjs");require("react");require("next/navigation");const po=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),ho=e=>typeof e=="string"&&po.has(e.toLowerCase()),he="rsc",pt=()=>{switch(he){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function mo(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const st="[Builder.io]: ",G={log:(...e)=>console.log(st,...e),error:(...e)=>console.error(st,...e),warn:(...e)=>console.warn(st,...e),debug:(...e)=>console.debug(st,...e)};function H(){return typeof window<"u"&&typeof document<"u"}function go(){return H()&&window.self!==window.top}function dt(){return go()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const yo=()=>{if(H()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},vo=()=>typeof navigator=="object"&&navigator.userAgent||"",ur=()=>{const e=vo(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||he==="reactNative"}},n=e.match(/Tablet|iPad/i),r=yo();return{urlPath:r==null?void 0:r.pathname,host:(r==null?void 0:r.host)||(r==null?void 0:r.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},fr=({builder:e,context:t,event:n,state:r})=>Object.entries({state:r,Builder:e,builder:e,context:t,event:n}),xo=()=>({isEditing:dt(),isBrowser:H(),isServer:!H(),getUserAttributes:()=>ur()}),bo=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,So=({code:e,builder:t,context:n,event:r,localState:o,rootSetState:i,rootState:s})=>{const u=fr({builder:t,context:n,event:r,state:pr({rootState:s,localState:o,rootSetState:i})});return new Function(...u.map(([d])=>d),e)(...u.map(([,d])=>d))};function pr({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(r,o)=>{if(t&&o in t)return t[o];const i=r[o];return typeof i=="object"?pr({rootState:i,localState:void 0,rootSetState:n?s=>{r[o]=s,n(r)}:void 0}):i},set:(r,o,i)=>{if(t&&o in t)throw new Error("Writing to local state is not allowed as it is read-only.");return r[o]=i,n==null||n(r),!0}})}const dr=(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,i,s)=>Object(o[i])===o[i]?o[i]:o[i]=Math.abs(Number(r[s+1]))>>0===+r[s+1]?[]:{},e)[r[r.length-1]]=n,e};var N,wo=function(e){function t(a){return 48>a?a===36:58>a?!0:65>a?!1:91>a?!0:97>a?a===95:123>a?!0:170<=a&&co.test(String.fromCharCode(a))}function n(a){return 65>a?a===36:91>a?!0:97>a?a===95:123>a?!0:170<=a&&$n.test(String.fromCharCode(a))}function r(a,l){for(var c=y,p=1,j=0;;){at.lastIndex=j;var _=at.exec(c);if(_&&_.index<a)++p,j=_.index+_[0].length;else break}throw c={line:p,ab:a-j},l+=" ("+c.line+":"+c.ab+")",l=new SyntaxError(l),l.j=a,l.X=c,l.o=f,l}function o(a){a=a.split(" ");for(var l=Object.create(null),c=0;c<a.length;c++)l[a[c]]=!0;return function(p){return l[p]||!1}}function i(){this.line=be,this.ab=f-se}function s(a,l){ke=f,A.C&&(At=new i),I=a,d(),Q=l,Be=a.m}function u(){for(var a=f,l=A.va&&A.C&&new i,c=y.charCodeAt(f+=2);f<we&&c!==10&&c!==13&&c!==8232&&c!==8233;)++f,c=y.charCodeAt(f);A.va&&A.va(!1,y.slice(a+2,f),a,f,l,A.C&&new i)}function d(){for(;f<we;){var a=y.charCodeAt(f);if(a===32)++f;else if(a===13)++f,a=y.charCodeAt(f),a===10&&++f,A.C&&(++be,se=f);else if(a===10||a===8232||a===8233)++f,A.C&&(++be,se=f);else if(8<a&&14>a)++f;else if(a===47)if(a=y.charCodeAt(f+1),a===42){a=void 0;var l=A.va&&A.C&&new i,c=f,p=y.indexOf("*/",f+=2);if(p===-1&&r(f-2,"Unterminated comment"),f=p+2,A.C)for(at.lastIndex=c;(a=at.exec(y))&&a.index<f;)++be,se=a.index+a[0].length;A.va&&A.va(!0,y.slice(c+2,p),c,f,l,A.C&&new i)}else if(a===47)u();else break;else if(a===160)++f;else if(5760<=a&&lo.test(String.fromCharCode(a)))++f;else break}}function C(a){switch(a){case 46:a=y.charCodeAt(f+1),48<=a&&57>=a?x(!0):(++f,s(Bn));return;case 40:return++f,s(le);case 41:return++f,s(re);case 59:return++f,s(ce);case 44:return++f,s(ye);case 91:return++f,s(Vt);case 93:return++f,s(_t);case 123:return++f,s(De);case 125:return++f,s(Ee);case 58:return++f,s(Ve);case 63:return++f,s(Un);case 48:if(a=y.charCodeAt(f+1),a===120||a===88){f+=2,a=O(16),a===null&&r(V+2,"Expected hexadecimal number"),n(y.charCodeAt(f))&&r(f,"Identifier directly after number"),s(Me,a);return}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return x(!1);case 34:case 39:f++;for(var l="";;){f>=we&&r(V,"Unterminated string constant");var c=y.charCodeAt(f);if(c===a){++f,s(nt,l);break}if(c===92){c=y.charCodeAt(++f);var p=/^[0-7]+/.exec(y.slice(f,f+3));for(p&&(p=p[0]);p&&255<parseInt(p,8);)p=p.slice(0,-1);if(p==="0"&&(p=null),++f,p)z&&r(f-2,"Octal literal in strict mode"),l+=String.fromCharCode(parseInt(p,8)),f+=p.length-1;else switch(c){case 110:l+=`
|
|
2
2
|
`;break;case 114:l+="\r";break;case 120:l+=String.fromCharCode(k(2));break;case 117:l+=String.fromCharCode(k(4));break;case 85:l+=String.fromCharCode(k(8));break;case 116:l+=" ";break;case 98:l+="\b";break;case 118:l+="\v";break;case 102:l+="\f";break;case 48:l+="\0";break;case 13:y.charCodeAt(f)===10&&++f;case 10:A.C&&(se=f,++be);break;default:l+=String.fromCharCode(c)}}else c!==13&&c!==10&&c!==8232&&c!==8233||r(V,"Unterminated string constant"),l+=String.fromCharCode(c),++f}return;case 47:a=y.charCodeAt(f+1),Be?(++f,P()):a===61?S(Se,2):S(Mn,1);return;case 37:case 42:y.charCodeAt(f+1)===61?S(Se,2):S(io,1);return;case 124:case 38:l=y.charCodeAt(f+1),l===a?S(a===124?_n:Ln,2):l===61?S(Se,2):S(a===124?Zr:eo,1);return;case 94:y.charCodeAt(f+1)===61?S(Se,2):S(Qr,1);return;case 43:case 45:l=y.charCodeAt(f+1),l===a?l===45&&y.charCodeAt(f+2)===62&&it.test(y.slice(ge,f))?(f+=3,u(),d(),E()):S(qr,2):l===61?S(Se,2):S(oo,1);return;case 60:case 62:l=y.charCodeAt(f+1),c=1,l===a?(c=a===62&&y.charCodeAt(f+2)===62?3:2,y.charCodeAt(f+c)===61?S(Se,c+1):S(ro,c)):l===33&&a===60&&y.charCodeAt(f+2)===45&&y.charCodeAt(f+3)===45?(f+=4,u(),d(),E()):(l===61&&(c=y.charCodeAt(f+2)===61?3:2),S(no,c));return;case 61:case 33:y.charCodeAt(f+1)===61?S(to,y.charCodeAt(f+2)===61?3:2):S(a===61?Dn:Vn,1);return;case 126:return S(Vn,1)}return!1}function E(a){if(a?f=V+1:V=f,A.C&&(Tt=new i),a)return P();if(f>=we)return s(Pt);if(a=y.charCodeAt(f),n(a)||a===92)return W();if(C(a)===!1){if(a=String.fromCharCode(a),a==="\\"||$n.test(a))return W();r(f,"Unexpected character '"+a+"'")}}function S(a,l){var c=y.slice(f,f+l);f+=l,s(a,c)}function P(){for(var a,l,c=f;;){f>=we&&r(c,"Unterminated regexp");var p=y.charAt(f);if(it.test(p)&&r(c,"Unterminated regexp"),a)a=!1;else{if(p==="[")l=!0;else if(p==="]"&&l)l=!1;else if(p==="/"&&!l)break;a=p==="\\"}++f}a=y.slice(c,f),++f,(l=F())&&!/^[gmi]*$/.test(l)&&r(c,"Invalid regexp flag");try{var j=new RegExp(a,l)}catch(_){throw _ instanceof SyntaxError&&r(c,_.message),_}s(gn,j)}function O(a,l){for(var c=f,p=0,j=l===void 0?1/0:l,_=0;_<j;++_){var X=y.charCodeAt(f);if(X=97<=X?X-97+10:65<=X?X-65+10:48<=X&&57>=X?X-48:1/0,X>=a)break;++f,p=p*a+X}return f===c||l!==void 0&&f-c!==l?null:p}function x(a){var l=f,c=!1,p=y.charCodeAt(f)===48;a||O(10)!==null||r(l,"Invalid number"),y.charCodeAt(f)===46&&(++f,O(10),c=!0),a=y.charCodeAt(f),(a===69||a===101)&&(a=y.charCodeAt(++f),a!==43&&a!==45||++f,O(10)===null&&r(l,"Invalid number"),c=!0),n(y.charCodeAt(f))&&r(f,"Identifier directly after number"),a=y.slice(l,f);var j;c?j=parseFloat(a):p&&a.length!==1?/[89]/.test(a)||z?r(l,"Invalid number"):j=parseInt(a,8):j=parseInt(a,10),s(Me,j)}function k(a){return a=O(16,a),a===null&&r(V,"Bad character escape sequence"),a}function F(){Ie=!1;for(var a,l=!0,c=f;;){var p=y.charCodeAt(f);if(t(p))Ie&&(a+=y.charAt(f)),++f;else if(p===92){Ie||(a=y.slice(c,f)),Ie=!0,y.charCodeAt(++f)!==117&&r(f,"Expecting Unicode escape sequence \\uXXXX"),++f,p=k(4);var j=String.fromCharCode(p);j||r(f-1,"Invalid Unicode escape"),(l?n(p):t(p))||r(f-4,"Invalid Unicode escape"),a+=j}else break;l=!1}return Ie?a:y.slice(c,f)}function W(){var a=F(),l=Ce;!Ie&&so(a)&&(l=zr[a]),s(l,a)}function g(){Ot=V,ge=ke,Rt=At,E()}function ee(a){if(z=a,f=V,A.C)for(;f<se;)se=y.lastIndexOf(`
|
|
3
3
|
`,se-2)+1,--be;d(),E()}function te(){this.type=null,this.start=V,this.end=null}function Z(){this.start=Tt,this.end=null,jt&&(this.source=jt)}function B(){var a=new te;return A.C&&(a.X=new Z),A.vb&&(a.sourceFile=A.vb),A.Xa&&(a.j=[V,0]),a}function me(a){var l=new te;return l.start=a.start,A.C&&(l.X=new Z,l.X.start=a.X.start),A.Xa&&(l.j=[a.j[0],0]),l}function T(a,l){return a.type=l,a.end=ge,A.C&&(a.X.end=Rt),A.Xa&&(a.j[1]=ge),a}function bt(a){return a.type==="ExpressionStatement"&&a.la.type==="Literal"&&a.la.value==="use strict"}function U(a){return I===a?(g(),!0):!1}function Qe(){return!A.fc&&(I===Pt||I===Ee||it.test(y.slice(ge,V)))}function xe(){U(ce)||Qe()||ie()}function M(a){I===a?g():ie()}function ie(){r(V,"Unexpected token")}function et(a){a.type!=="Identifier"&&a.type!=="MemberExpression"&&r(a.start,"Assigning to rvalue"),z&&a.type==="Identifier"&&ot(a.name)&&r(a.start,"Assigning to "+a.name+" in strict mode")}function ne(){(I===Mn||I===Se&&Q==="/=")&&E(!0);var a=I,l=B();switch(a){case Nt:case vn:g();var c=a===Nt;U(ce)||Qe()?l.label=null:I!==Ce?ie():(l.label=ae(),xe());for(var p=0;p<D.length;++p){var j=D[p];if((l.label===null||j.name===l.label.name)&&(j.kind!==null&&(c||j.kind==="loop")||l.label&&c))break}return p===D.length&&r(l.start,"Unsyntactic "+a.l),T(l,c?"BreakStatement":"ContinueStatement");case xn:return g(),xe(),T(l,"DebuggerStatement");case Sn:return g(),D.push(Lt),l.body=ne(),D.pop(),M(Dt),l.test=Pe(),xe(),T(l,"DoWhileStatement");case Cn:return g(),D.push(Lt),M(le),I===ce?St(l,null):I===Mt?(a=B(),g(),hn(a,!0),T(a,"VariableDeclaration"),a.fa.length===1&&U(rt)?dn(l,a):St(l,a)):(a=K(!1,!0),U(rt)?(et(a),dn(l,a)):St(l,a));case Bt:return g(),Et(l,!0);case En:return g(),l.test=Pe(),l.da=ne(),l.alternate=U(wn)?ne():null,T(l,"IfStatement");case In:return Ue||A.Ib||r(V,"'return' outside of function"),g(),U(ce)||Qe()?l.K=null:(l.K=K(),xe()),T(l,"ReturnStatement");case Ut:for(g(),l.Qb=Pe(),l.tb=[],M(De),D.push(uo);I!==Ee;)I===Ft||I===bn?(a=I===Ft,p&&T(p,"SwitchCase"),l.tb.push(p=B()),p.da=[],g(),a?p.test=K():(c&&r(Ot,"Multiple default clauses"),c=!0,p.test=null),M(Ve)):(p||ie(),p.da.push(ne()));return p&&T(p,"SwitchCase"),g(),D.pop(),T(l,"SwitchStatement");case jn:return g(),it.test(y.slice(ge,V))&&r(ge,"Illegal newline after throw"),l.K=K(),xe(),T(l,"ThrowStatement");case Tn:return g(),l.block=Ne(),l.Ea=null,I===yn&&(a=B(),g(),M(le),a.Ua=ae(),z&&ot(a.Ua.name)&&r(a.Ua.start,"Binding "+a.Ua.name+" in strict mode"),M(re),a.body=Ne(),l.Ea=T(a,"CatchClause")),l.fb=U(kn)?Ne():null,l.Ea||l.fb||r(l.start,"Missing catch or finally clause"),T(l,"TryStatement");case Mt:return g(),hn(l),xe(),T(l,"VariableDeclaration");case Dt:return g(),l.test=Pe(),D.push(Lt),l.body=ne(),D.pop(),T(l,"WhileStatement");case An:return z&&r(V,"'with' in strict mode"),g(),l.object=Pe(),l.body=ne(),T(l,"WithStatement");case De:return Ne();case ce:return g(),T(l,"EmptyStatement");default:if(c=Q,j=K(),a===Ce&&j.type==="Identifier"&&U(Ve)){for(p=0;p<D.length;++p)D[p].name===c&&r(j.start,"Label '"+c+"' is already declared");return D.push({name:c,kind:I.W?"loop":I===Ut?"switch":null}),l.body=ne(),D.pop(),l.label=j,T(l,"LabeledStatement")}return l.la=j,xe(),T(l,"ExpressionStatement")}}function Pe(){M(le);var a=K();return M(re),a}function Ne(a){var l=B(),c=!0,p=!1;for(l.body=[],M(De);!U(Ee);){var j=ne();if(l.body.push(j),c&&a&&bt(j)){var _=p;ee(p=!0)}c=!1}return p&&!_&&ee(!1),T(l,"BlockStatement")}function St(a,l){return a.ua=l,M(ce),a.test=I===ce?null:K(),M(ce),a.update=I===re?null:K(),M(re),a.body=ne(),D.pop(),T(a,"ForStatement")}function dn(a,l){return a.left=l,a.right=K(),M(re),a.body=ne(),D.pop(),T(a,"ForInStatement")}function hn(a,l){for(a.fa=[],a.kind="var";;){var c=B();if(c.id=ae(),z&&ot(c.id.name)&&r(c.id.start,"Binding "+c.id.name+" in strict mode"),c.ua=U(Dn)?K(!0,l):null,a.fa.push(T(c,"VariableDeclarator")),!U(ye))break}}function K(a,l){var c=wt(l);if(!a&&I===ye){for(a=me(c),a.xb=[c];U(ye);)a.xb.push(wt(l));return T(a,"SequenceExpression")}return c}function wt(a){var l=kt(Ct(),-1,a);if(U(Un)){var c=me(l);c.test=l,c.da=K(!0),M(Ve),c.alternate=K(!0,a),l=T(c,"ConditionalExpression")}return I.Cb?(c=me(l),c.operator=Q,c.left=l,g(),c.right=wt(a),et(l),T(c,"AssignmentExpression")):l}function kt(a,l,c){var p=I.L;if(p!==null&&(!c||I!==rt)&&p>l){var j=me(a);return j.left=a,j.operator=Q,a=I,g(),j.right=kt(Ct(),p,c),p=T(j,a===_n||a===Ln?"LogicalExpression":"BinaryExpression"),kt(p,l,c)}return a}function Ct(){if(I.prefix){var a=B(),l=I.$b;return a.operator=Q,Be=a.prefix=!0,g(),a.K=Ct(),l?et(a.K):z&&a.operator==="delete"&&a.K.type==="Identifier"&&r(a.start,"Deleting local variable in strict mode"),T(a,l?"UpdateExpression":"UnaryExpression")}for(l=Fe(tt());I.cc&&!Qe();)a=me(l),a.operator=Q,a.prefix=!1,a.K=l,et(l),g(),l=T(a,"UpdateExpression");return l}function Fe(a,l){if(U(Bn)){var c=me(a);return c.object=a,c.Wa=ae(!0),c.bb=!1,Fe(T(c,"MemberExpression"),l)}return U(Vt)?(c=me(a),c.object=a,c.Wa=K(),c.bb=!0,M(_t),Fe(T(c,"MemberExpression"),l)):!l&&U(le)?(c=me(a),c.callee=a,c.arguments=It(re,!1),Fe(T(c,"CallExpression"),l)):a}function tt(){switch(I){case Rn:var a=B();return g(),T(a,"ThisExpression");case Ce:return ae();case Me:case nt:case gn:return a=B(),a.value=Q,a.raw=y.slice(V,ke),g(),T(a,"Literal");case Pn:case Nn:case Fn:return a=B(),a.value=I.$a,a.raw=I.l,g(),T(a,"Literal");case le:a=Tt;var l=V;g();var c=K();return c.start=l,c.end=ke,A.C&&(c.X.start=a,c.X.end=At),A.Xa&&(c.j=[l,ke]),M(re),c;case Vt:return a=B(),g(),a.elements=It(_t,!0,!0),T(a,"ArrayExpression");case De:for(a=B(),l=!0,c=!1,a.h=[],g();!U(Ee);){if(l)l=!1;else if(M(ye),A.sb&&U(Ee))break;var p={key:I===Me||I===nt?tt():ae(!0)},j=!1;if(U(Ve)){p.value=K(!0);var _=p.kind="init"}else p.key.type!=="Identifier"||p.key.name!=="get"&&p.key.name!=="set"?ie():(j=c=!0,_=p.kind=p.key.name,p.key=I===Me||I===nt?tt():ae(!0),I!==le&&ie(),p.value=Et(B(),!1));if(p.key.type==="Identifier"&&(z||c))for(var X=0;X<a.h.length;++X){var je=a.h[X];if(je.key.name===p.key.name){var Wt=_===je.kind||j&&je.kind==="init"||_==="init"&&(je.kind==="get"||je.kind==="set");Wt&&!z&&_==="init"&&je.kind==="init"&&(Wt=!1),Wt&&r(p.key.start,"Redefinition of property")}}a.h.push(p)}return T(a,"ObjectExpression");case Bt:return a=B(),g(),Et(a,!1);case On:return a=B(),g(),a.callee=Fe(tt(),!0),a.arguments=U(le)?It(re,!1):Yr,T(a,"NewExpression")}ie()}function Et(a,l){I===Ce?a.id=ae():l?ie():a.id=null,a.oa=[];var c=!0;for(M(le);!U(re);)c?c=!1:M(ye),a.oa.push(ae());c=Ue;var p=D;if(Ue=!0,D=[],a.body=Ne(!0),Ue=c,D=p,z||a.body.body.length&&bt(a.body.body[0])){for(c=a.id?-1:0;c<a.oa.length;++c)if(p=0>c?a.id:a.oa[c],(Wn(p.name)||ot(p.name))&&r(p.start,"Defining '"+p.name+"' in strict mode"),0<=c)for(var j=0;j<c;++j)p.name===a.oa[j].name&&r(p.start,"Argument name clash in strict mode")}return T(a,l?"FunctionDeclaration":"FunctionExpression")}function It(a,l,c){for(var p=[],j=!0;!U(a);){if(j)j=!1;else if(M(ye),l&&A.sb&&U(a))break;p.push(c&&I===ye?null:K(!0))}return p}function ae(a){var l=B();return a&&A.yb==="everywhere"&&(a=!1),I===Ce?(!a&&(A.yb&&ao(Q)||z&&Wn(Q))&&y.slice(V,ke).indexOf("\\")===-1&&r(V,"The keyword '"+Q+"' is reserved"),l.name=Q):a&&I.l?l.name=I.l:ie(),Be=!1,g(),T(l,"Identifier")}e.version="0.5.0";var A,y="",we,jt;e.parse=function(a,l){y=String(a),we=y.length,A=l||{};for(var c in mn)Object.prototype.hasOwnProperty.call(A,c)||(A[c]=mn[c]);for(jt=A.sourceFile,be=1,f=se=0,Be=!0,d(),c=A.dc,Ot=ge=f,A.C&&(Rt=new i),Ue=z=!1,D=[],E(),a=c||B(),l=!0,c||(a.body=[]);I!==Pt;)c=ne(),a.body.push(c),l&&bt(c)&&ee(!0),l=!1;return T(a,"Program")};var mn={fc:!1,sb:!0,yb:!1,Ib:!1,C:!1,va:null,Xa:!1,dc:null,sourceFile:null,vb:null},f=0,V=0,ke=0,Tt,At,I,Q,Be,be,se,Ot=0,ge=0,Rt,Ue,D,z,Yr=[],Me={type:"num"},gn={type:"regexp"},nt={type:"string"},Ce={type:"name"},Pt={type:"eof"},Nt={l:"break"},Ft={l:"case",m:!0},yn={l:"catch"},vn={l:"continue"},xn={l:"debugger"},bn={l:"default"},Sn={l:"do",W:!0},wn={l:"else",m:!0},kn={l:"finally"},Cn={l:"for",W:!0},Bt={l:"function"},En={l:"if"},In={l:"return",m:!0},Ut={l:"switch"},jn={l:"throw",m:!0},Tn={l:"try"},Mt={l:"var"},Dt={l:"while",W:!0},An={l:"with"},On={l:"new",m:!0},Rn={l:"this"},Pn={l:"null",$a:null},Nn={l:"true",$a:!0},Fn={l:"false",$a:!1},rt={l:"in",L:7,m:!0},zr={break:Nt,case:Ft,catch:yn,continue:vn,debugger:xn,default:bn,do:Sn,else:wn,finally:kn,for:Cn,function:Bt,if:En,return:In,switch:Ut,throw:jn,try:Tn,var:Mt,while:Dt,with:An,null:Pn,true:Nn,false:Fn,new:On,in:rt,instanceof:{l:"instanceof",L:7,m:!0},this:Rn,typeof:{l:"typeof",prefix:!0,m:!0},void:{l:"void",prefix:!0,m:!0},delete:{l:"delete",prefix:!0,m:!0}},Vt={type:"[",m:!0},_t={type:"]"},De={type:"{",m:!0},Ee={type:"}"},le={type:"(",m:!0},re={type:")"},ye={type:",",m:!0},ce={type:";",m:!0},Ve={type:":",m:!0},Bn={type:"."},Un={type:"?",m:!0},Mn={L:10,m:!0},Dn={Cb:!0,m:!0},Se={Cb:!0,m:!0},qr={cc:!0,prefix:!0,$b:!0},Vn={prefix:!0,m:!0},_n={L:1,m:!0},Ln={L:2,m:!0},Zr={L:3,m:!0},Qr={L:4,m:!0},eo={L:5,m:!0},to={L:6,m:!0},no={L:7,m:!0},ro={L:8,m:!0},oo={L:9,prefix:!0,m:!0},io={L:10,m:!0},ao=o("class enum extends super const export import"),Wn=o("implements interface let package private protected public static yield"),ot=o("eval arguments"),so=o("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"),lo=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,$n=RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),co=RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏0-9_]"),it=/[\n\r\u2028\u2029]/,at=/\r\n|[\n\r\u2028\u2029]/g,Ie,Lt={kind:"loop"},uo={kind:"switch"}},Kt=Kt=typeof globalThis>"u"?void 0:globalThis;wo(Kt.j||(Kt.j={}));function h(e,t){typeof e=="string"&&(e=Ae(e,"code"));var n=e.constructor;this.ya=function(){return new n({options:{}})};var r=this.ya(),o;for(o in e)r[o]=o==="body"?e[o].slice():e[o];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 i,s;for(s in this)typeof this[s]=="function"&&(i=s.match(e))&&(this.rb[i[1]]=this[s].bind(this));this.N=Xt(this,this.ra,null),this.Na=this.N.object,this.ra=Ae(this.ba.join(`
|
|
4
4
|
`),"polyfills"),this.ba=void 0,ht(this.ra),i=new b(this.ra,this.N),i.done=!1,this.o=[i],this.Eb(),this.value=void 0,this.ra=r,i=new b(this.ra,this.N),i.done=!1,this.o.length=0,this.o[0]=i}var Hn={C:!0,kc:5},zt={configurable:!0,enumerable:!0,writable:!1},v={configurable:!0,enumerable:!1,writable:!0},Y={configurable:!0,enumerable:!1,writable:!1},_e={configurable:!1,enumerable:!1,writable:!1},Kn={configurable:!1,enumerable:!0,writable:!0},hr={STEP_ERROR:!0},Re={SCOPE_REFERENCE:!0},Xe={VALUE_IN_DESCRIPTOR:!0},Te={REGEXP_TIMEOUT:!0},Gn=[],fe=null,Ke=null,ve=typeof globalThis>"u"?void 0:globalThis,ko=["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 qt(e){var t=e>>>0;return t===Number(e)?t:NaN}function Ge(e){var t=e>>>0;return String(t)===String(e)&&t!==4294967295?t:NaN}function ht(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 o=e[r];o&&typeof o=="object"&&ht(o,t,n)}}h.prototype.REGEXP_MODE=2;h.prototype.REGEXP_THREAD_TIMEOUT=1e3;h.prototype.POLYFILL_TIMEOUT=1e3;N=h.prototype;N.P=!1;N.Ka=!1;N.Kb=0;N.ic=0;function Ae(e,t){var n={},r;for(r in Hn)n[r]=Hn[r];return n.sourceFile=t,ve.j.parse(e,n)}N.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=Ae(e,"appendCode"+this.Kb++)),!e||e.type!=="Program")throw Error("Expecting new AST to start with a Program node");Je(this,e,t.scope),Array.prototype.push.apply(t.node.body,e.body),t.node.body.jb=null,t.done=!1};N.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&&yr(this,n,n.interval);var r=new b(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 o=Ke;Ke=this;try{var i=this.rb[r.type](e,n,r)}catch(s){if(s!==hr)throw this.value!==s&&(this.value=void 0),s}finally{Ke=o}if(i&&e.push(i),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};N.Eb=function(){for(;!this.za&&this.lb(););return this.za};function Co(e,t){e.g(t,"NaN",NaN,_e),e.g(t,"Infinity",1/0,_e),e.g(t,"undefined",void 0,_e),e.g(t,"window",t,zt),e.g(t,"this",t,_e),e.g(t,"self",t),e.M=new R(null),e.Z=new R(e.M),Eo(e,t),Io(e,t),t.xa=e.M,e.g(t,"constructor",e.v,v),jo(e,t),To(e,t),Ao(e,t),Oo(e,t),Ro(e,t),Po(e,t),No(e,t),Fo(e,t),Bo(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"]],o=0;o<r.length;o++)n=function(i){return function(s){try{return i(s)}catch(u){w(e,e.Gb,u.message)}}}(r[o][0]),e.g(t,r[o][1],e.i(n,!1),v);n=function(i){return Xn(e,!1,arguments)},e.g(t,"setTimeout",e.i(n,!1),v),n=function(i){return Xn(e,!0,arguments)},e.g(t,"setInterval",e.i(n,!1),v),n=function(i){Jn(e,i)},e.g(t,"clearTimeout",e.i(n,!1),v),n=function(i){Jn(e,i)},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)}N.Wb=0;function Eo(e,t){var n=/^[A-Za-z_$][\w$]*$/,r=function(o){var i=arguments.length?String(arguments[arguments.length-1]):"",s=Array.prototype.slice.call(arguments,0,-1).join(",").trim();if(s){s=s.split(/\s*,\s*/);for(var u=0;u<s.length;u++){var d=s[u];n.test(d)||w(e,e.T,"Invalid function argument: "+d)}s=s.join(", ")}try{var C=Ae("(function("+s+") {"+i+"})","function"+e.Wb++)}catch(E){w(e,e.T,"Invalid code: "+E.message)}return C.body.length!==1&&w(e,e.T,"Invalid code in function body"),en(e,C.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,Y),e.Z.H="Function",r=function(o,i){var s=e.o[e.o.length-1];s.U=this,s.B=o,s.F=[],i!=null&&(i instanceof R?s.F=mr(e,i):w(e,e.j,"CreateListFromArrayLike called on non-object")),s.eb=!1},L(e,e.O,"apply",r),r=function(o){var i=e.o[e.o.length-1];i.U=this,i.B=o,i.F=[];for(var s=1;s<arguments.length;s++)i.F.push(arguments[s]);i.eb=!1},L(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)},L(e,e.O,"toString",r),e.g(e.O,"toString",e.i(r,!1),v),r=function(){return this.valueOf()},L(e,e.O,"valueOf",r),e.g(e.O,"valueOf",e.i(r,!1),v)}function Io(e,t){function n(o){o!=null||w(e,e.j,"Cannot convert '"+o+"' to object")}var r=function(o){if(o==null)return de(e)?this:e.s(e.M);if(!(o instanceof R)){var i=e.s(pe(e,o));return i.data=o,i}return o};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(o){return n(o),ue(e,Object.getOwnPropertyNames(o instanceof R?o.h:o))},e.g(e.v,"getOwnPropertyNames",e.i(r,!1),v),r=function(o){return n(o),o instanceof R&&(o=o.h),ue(e,Object.keys(o))},e.g(e.v,"keys",e.i(r,!1),v),r=function(o){return o===null?e.s(null):(o instanceof R||w(e,e.j,"Object prototype may only be an Object or null, not "+o),e.s(o))},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(o,i,s){return i=String(i),o instanceof R||w(e,e.j,"Object.defineProperty called on non-object: "+o),s instanceof R||w(e,e.j,"Property description must be an object"),!o.preventExtensions||i in o.h||w(e,e.j,"Can't define property '"+i+"', object is not extensible"),e.g(o,i,Xe,s.h),o},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(o,i){if(o instanceof R||w(e,e.j,"Object.getOwnPropertyDescriptor called on non-object: "+o),i=String(i),i in o.h){var s=Object.getOwnPropertyDescriptor(o.h,i),u=o.V[i];return o=o.Y[i],i=e.s(e.M),u||o?(e.g(i,"get",u),e.g(i,"set",o)):(e.g(i,"value",s.value),e.g(i,"writable",s.writable)),e.g(i,"configurable",s.configurable),e.g(i,"enumerable",s.enumerable),i}},e.g(e.v,"getOwnPropertyDescriptor",e.i(r,!1),v),r=function(o){return n(o),pe(e,o)},e.g(e.v,"getPrototypeOf",e.i(r,!1),v),r=function(o){return!!o&&!o.preventExtensions},e.g(e.v,"isExtensible",e.i(r,!1),v),r=function(o){return o instanceof R&&(o.preventExtensions=!0),o},e.g(e.v,"preventExtensions",e.i(r,!1),v),L(e,e.v,"toString",R.prototype.toString),L(e,e.v,"toLocaleString",R.prototype.toString),L(e,e.v,"valueOf",R.prototype.valueOf),r=function(o){return n(this),this instanceof R?String(o)in this.h:this.hasOwnProperty(o)},L(e,e.v,"hasOwnProperty",r),r=function(o){return n(this),this instanceof R?Object.prototype.propertyIsEnumerable.call(this.h,o):this.propertyIsEnumerable(o)},L(e,e.v,"propertyIsEnumerable",r),r=function(o){for(;;){if(o=pe(e,o),!o)return!1;if(o===this)return!0}},L(e,e.v,"isPrototypeOf",r)}function jo(e,t){var n=function(r){var o=de(e)?this:Oe(e),i=arguments[0];if(arguments.length===1&&typeof i=="number")isNaN(qt(i))&&w(e,e.ob,"Invalid array length: "+i),o.h.length=i;else{for(i=0;i<arguments.length;i++)o.h[i]=arguments[i];o.h.length=i}return o};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 To(e,t){var n=function(r){return r=arguments.length?ve.String(r):"",de(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++)L(e,e.J,t[n],String.prototype[t[n]]);n=function(r,o,i){o=e.R(o),i=e.R(i);try{return String(this).localeCompare(r,o,i)}catch(s){w(e,e.D,"localeCompare: "+s.message)}},L(e,e.J,"localeCompare",n),n=function(r,o,i){var s=String(this);if(o=o?Number(o):void 0,$(e,r,e.I)&&(r=r.data,We(e,r,i),e.REGEXP_MODE===2)){if(fe)r=Le(e,"string.split(separator, limit)",{string:s,separator:r,limit:o},r,i),r!==Te&&i(ue(e,r));else{var u=e.ha(),d=$e(e,r,u,i);u.onmessage=function(C){clearTimeout(d),i(ue(e,C.data))},u.postMessage(["split",s,r,o])}return}r=s.split(r,o),i(ue(e,r))},He(e,e.J,"split",n),n=function(r,o){var i=String(this);if(r=$(e,r,e.I)?r.data:new RegExp(r),We(e,r,o),e.REGEXP_MODE===2)if(fe)r=Le(e,"string.match(regexp)",{string:i,regexp:r},r,o),r!==Te&&o(r&&ue(e,r));else{var s=e.ha(),u=$e(e,r,s,o);s.onmessage=function(d){clearTimeout(u),o(d.data&&ue(e,d.data))},s.postMessage(["match",i,r])}else r=i.match(r),o(r&&ue(e,r))},He(e,e.J,"match",n),n=function(r,o){var i=String(this);if($(e,r,e.I)?r=r.data:r=new RegExp(r),We(e,r,o),e.REGEXP_MODE===2)if(fe)r=Le(e,"string.search(regexp)",{string:i,regexp:r},r,o),r!==Te&&o(r);else{var s=e.ha(),u=$e(e,r,s,o);s.onmessage=function(d){clearTimeout(u),o(d.data)},s.postMessage(["search",i,r])}else o(i.search(r))},He(e,e.J,"search",n),n=function(r,o,i){var s=String(this);if(o=String(o),$(e,r,e.I)&&(r=r.data,We(e,r,i),e.REGEXP_MODE===2)){if(fe)r=Le(e,"string.replace(substr, newSubstr)",{string:s,substr:r,newSubstr:o},r,i),r!==Te&&i(r);else{var u=e.ha(),d=$e(e,r,u,i);u.onmessage=function(C){clearTimeout(d),i(C.data)},u.postMessage(["replace",s,r,o])}return}i(s.replace(r,o))},He(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 Ao(e,t){e.mb=e.i(function(n){return n=ve.Boolean(n),de(e)?(this.data=n,this):n},!0),e.g(t,"Boolean",e.mb,v)}function Oo(e,t){var n=function(r){return r=arguments.length?ve.Number(r):0,de(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]],_e);n=function(r){try{return Number(this).toExponential(r)}catch(o){w(e,e.D,o.message)}},L(e,e.aa,"toExponential",n),n=function(r){try{return Number(this).toFixed(r)}catch(o){w(e,e.D,o.message)}},L(e,e.aa,"toFixed",n),n=function(r){try{return Number(this).toPrecision(r)}catch(o){w(e,e.D,o.message)}},L(e,e.aa,"toPrecision",n),n=function(r){try{return Number(this).toString(r)}catch(o){w(e,e.D,o.message)}},L(e,e.aa,"toString",n),n=function(r,o){r=r?e.R(r):void 0,o=o?e.R(o):void 0;try{return Number(this).toLocaleString(r,o)}catch(i){w(e,e.D,"toLocaleString: "+i.message)}},L(e,e.aa,"toLocaleString",n)}function Ro(e,t){var n=function(o,i){if(!de(e))return ve.Date();var s=[null].concat(Array.from(arguments));return this.data=new(Function.prototype.bind.apply(ve.Date,s)),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(o){return function(i){var s=this.data;s instanceof Date||w(e,e.j,o+" not called on a Date");for(var u=[],d=0;d<arguments.length;d++)u[d]=e.R(arguments[d]);return s[o].apply(s,u)}}(t[r]),L(e,e.$,t[r],n)}function Po(e,t){var n=function(r,o){if(de(e))var i=this;else{if(o===void 0&&$(e,r,e.I))return r;i=e.s(e.Ma)}r=r===void 0?"":String(r),o=o?String(o):"",/^[gmi]*$/.test(o)||w(e,e.T,"Invalid regexp flag: "+o);try{var s=new ve.RegExp(r,o)}catch(u){w(e,e.T,u.message)}return Zt(e,i,s),i};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,Y),e.g(e.I.h.prototype,"ignoreCase",void 0,Y),e.g(e.I.h.prototype,"multiline",void 0,Y),e.g(e.I.h.prototype,"source","(?:)",Y),e.ba.push("Object.defineProperty(RegExp.prototype, 'test',","{configurable: true, writable: true, value:","function test(str) {","return !!this.exec(str);","}","});"),n=function(r,o){function i(E){if(E){var S=ue(e,E);return e.g(S,"index",E.index),e.g(S,"input",E.input),S}return null}var s=this.data;if(r=String(r),s.lastIndex=Number(e.G(this,"lastIndex")),We(e,s,o),e.REGEXP_MODE===2)if(fe)r=Le(e,"regexp.exec(string)",{string:r,regexp:s},s,o),r!==Te&&(e.g(this,"lastIndex",s.lastIndex),o(i(r)));else{var u=e.ha(),d=$e(e,s,u,o),C=this;u.onmessage=function(E){clearTimeout(d),e.g(C,"lastIndex",E.data[1]),o(i(E.data[0]))},u.postMessage(["exec",s,s.lastIndex,r])}else r=s.exec(r),e.g(this,"lastIndex",s.lastIndex),o(i(r))},He(e,e.I,"exec",n)}function No(e,t){function n(r){var o=e.i(function(i){var s=de(e)?this:e.Aa(o);return Gt(e,s,i),s},!0);return e.g(o,"prototype",e.Aa(e.D),v),e.g(o.h.prototype,"name",r,v),e.g(t,r,o,v),o}e.D=e.i(function(r){var o=de(e)?this:e.Aa(e.D);return Gt(e,o,r),o},!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 Fo(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]],Y);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 Bo(e,t){var n=e.s(e.M);e.g(t,"JSON",n,v),t=function(r){try{var o=JSON.parse(String(r))}catch(i){w(e,e.T,i.message)}return e.Ia(o)},e.g(n,"parse",e.i(t,!1)),t=function(r,o,i){o&&o.H==="Function"?w(e,e.j,"Function replacer on JSON.stringify not supported"):o&&o.H==="Array"?(o=mr(e,o),o=o.filter(function(u){return typeof u=="string"||typeof u=="number"})):o=null,typeof i!="string"&&typeof i!="number"&&(i=void 0),r=e.R(r);try{var s=JSON.stringify(r,o,i)}catch(u){w(e,e.j,u.message)}return s},e.g(n,"stringify",e.i(t,!1))}function $(e,t,n){if(t==null||!n)return!1;if(n=n.h.prototype,t===n)return!0;for(t=pe(e,t);t;){if(t===n)return!0;t=t.xa}return!1}function Zt(e,t,n){t.data=new RegExp(n.source,n.flags),e.g(t,"lastIndex",n.lastIndex,v),e.g(t,"source",n.source,Y),e.g(t,"global",n.global,Y),e.g(t,"ignoreCase",n.ignoreCase,Y),e.g(t,"multiline",n.multiline,Y)}function Gt(e,t,n){n&&e.g(t,"message",String(n),v),n=[];for(var r=e.o.length-1;0<=r;r--){var o=e.o[r],i=o.node;i.type==="CallExpression"&&(o=o.U)&&n.length&&(n[n.length-1].Ob=e.G(o,"name")),!i.X||n.length&&i.type!=="CallExpression"||n.push({Nb:i.X})}for(r=String(e.G(t,"name")),i=String(e.G(t,"message")),i=r+": "+i+`
|
|
@@ -49,7 +49,7 @@ theFunction();
|
|
|
49
49
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
-
`};return m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
52
|
+
`};return m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-febc5ea6`,style:C(),children:[m.jsx(m.Fragment,{children:m.jsx(yt,{styles:P()})}),(O=e.columns)==null?void 0:O.map((x,k)=>m.jsx(q.DynamicRenderer,{TagName:x.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...x.link?{href:x.link}:{},[pt()]:"builder-column",style:wr(E(k))},children:m.jsx(Ze,{path:`component.options.columns.${k}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:x.blocks})},k))]}),m.jsx("style",{children:`.div-febc5ea6 {
|
|
53
53
|
display: flex;
|
|
54
54
|
line-height: normal;
|
|
55
55
|
}`})]})}function Zn(e){return e.replace(/http(s)?:/,"")}function ii(e="",t,n){const r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=e.indexOf("?")!==-1?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+o+t+"="+encodeURIComponent(n)}function ai(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return Zn(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const r=e.split(n[0]),o=n[3],i=t.match("x")?t:`${t}x`;return Zn(`${r[0]}_${i}${o}`)}return null}function si(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const r=Number(e.split("?width=")[1]);return isNaN(r)||(n=`${n} ${r}w`),t.filter(o=>o!==r).map(o=>`${ii(e,"width",o)} ${o}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[ai(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,r])=>`${n} ${r}w`).concat([e]).join(", "):e}const li=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},Er=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(r=>r.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(r){G.warn("[COOKIE] GET error: ",(r==null?void 0:r.message)||r);return}},Ir=async e=>Er(e),ci=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(oe).join("; "),ui=[["secure",""],["SameSite","None"]],fi=({name:e,value:t,expires:n})=>{const o=(H()?location.protocol==="https:":!0)?ui:[[]],i=n?[["expires",n.toUTCString()]]:[[]],s=[[e,t],...i,["path","/"],["domain",li(window.location.hostname)],...o];return ci(s)},jr=async({name:e,value:t,expires:n,canTrack:r})=>{try{if(!r)return;const o=fi({name:e,value:t,expires:n});document.cookie=o}catch(o){G.warn("[COOKIE] SET error: ",(o==null?void 0:o.message)||o)}},pi="builder.tests",ln=e=>`${pi}.${e}`,di=({contentId:e})=>Ir({name:ln(e),canTrack:!0}),hi=({contentId:e})=>Er({name:ln(e),canTrack:!0}),mi=({contentId:e,value:t})=>jr({name:ln(e),value:t,canTrack:!0}),Tr=e=>oe(e.id)&&oe(e.variations)&&Object.keys(e.variations).length>0,gi=({id:e,variations:t})=>{var o;let n=0;const r=Math.random();for(const i in t){const s=(o=t[i])==null?void 0:o.testRatio;if(n+=s,r<n)return i}return e},Ar=e=>{const t=gi(e);return mi({contentId:e.id,value:t}).catch(n=>{G.error("could not store A/B test variation: ",n)}),t},Or=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},yi=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!Tr(e))return e;const n=hi({contentId:e.id})||Ar({variations:e.variations,id:e.id}),r=Or({item:e,testGroupId:n});return{...e,...r}},vi=async({item:e,canTrack:t})=>{if(!t||!Tr(e))return e;const r=await di({contentId:e.id})||Ar({variations:e.variations,id:e.id}),o=Or({item:e,testGroupId:r});return{...e,...o}},ft=e=>oe(e)?e:!0,xi={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},bi={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(r=>{r.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(o=>o.get("width"))&&(n.find(i=>!i.get("width"))||n.reduce((u,d)=>u+d.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},Si={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}]},wi={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(r=>r.json()).then(r=>{e.get("url")===t&&(r.html?e.set("content",r.html):e.set("content","Invalid url, please try another"))}).catch(r=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},ki=["text/javascript","application/javascript","application/ecmascript"],Ci=e=>ki.includes(e.type),Ei={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},Ii={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(s,u=6e4){return new Promise((d,C)=>{const E=document.createElement("img");let S=!1;E.onload=()=>{S=!0,d(E)},E.addEventListener("error",P=>{console.warn("Image load failed",P.error),C(P.error)}),E.src=s,setTimeout(()=>{S||C(new Error("Image load timed out"))},u)})}function r(s){return Math.round(s*1e3)/1e3}const o=e.get("image"),i=e.get("aspectRatio");if(fetch(o).then(s=>s.blob()).then(s=>{s.type.includes("svg")&&e.set("noWebp",!0)}),o&&(!i||i===.7041))return n(o).then(s=>{const u=e.get("aspectRatio");e.get("image")===o&&(!u||u===.7041)&&s.width&&s.height&&(e.set("aspectRatio",r(s.height/s.width)),e.set("height",s.height),e.set("width",s.width))})}},{name:"backgroundSize",type:"text",defaultValue:"cover",enum:[{label:"contain",value:"contain",helperText:"The image should never get cropped"},{label:"cover",value:"cover",helperText:"The image should fill it's box, cropping when needed"}]},{name:"backgroundPosition",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"altText",type:"string",helperText:"Text to display when the user has images off"},{name:"height",type:"number",hideFromUI:!0},{name:"width",type:"number",hideFromUI:!0},{name:"sizes",type:"string",hideFromUI:!0},{name:"srcset",type:"string",hideFromUI:!0},{name:"lazy",type:"boolean",defaultValue:!0,hideFromUI:!0},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the image's aspect ratio",defaultValue:!0},{name:"aspectRatio",type:"number",helperText:"This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",advanced:!0,defaultValue:.7041}]},ji={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},Ti={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>"}}}]},Ai={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}]};function Oi(e){var t,n,r;return m.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:m.jsx(Ze,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(r=e.builderContext.rootState)==null?void 0:r[e.name]})})}const Ri={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"}]},Pi={name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Rr(e){var t;return m.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const Ni={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},Qn=()=>[{component:q.Button,...xi},{component:Cr,...bi},{component:q.CustomCode,...Si},{component:q.Embed,...wi},{component:q.FragmentComponent,...Ei},{component:q.Image,...Ii},{component:q.ImgComponent,...ji},{component:q.SectionComponent,...Ti},{component:Jr,...Ri},{component:Rr,...Pi},{component:q.Video,...Ni},{component:Oi,...Ai}],er=[],Fi=e=>({type:"builder.registerComponent",data:Jt(e)}),Bi=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},Ui=e=>typeof e=="function"?Bi(e):qe(e),Jt=({inputs:e,...t})=>({...qe(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((r,[o,i])=>({...r,[o]:Ui(i)}),{}))}),Mi=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
@@ -151,7 +151,7 @@ theFunction();
|
|
|
151
151
|
)`,$i=({contentId:e,variationId:t})=>`window.${Nr}(
|
|
152
152
|
"${t}", "${e}", ${Fr}
|
|
153
153
|
)`;function Yt(e){return m.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}const Hi=e=>{const t=e.get("preview"),n=e.get("overrides."+t);return n||G.warn("No previewed ID found in search params."),n};function Br(){globalThis._BUILDER_PREVIEW_LRU_CACHE||(globalThis._BUILDER_PREVIEW_LRU_CACHE=new fo.LRUCache({max:500,ttl:1e3*60*5}))}function Ki(e){Br();const t=Hi(e);return typeof t=="string"?globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t):void 0}function Gi(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function Xi(){const e=Gi().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
154
|
-
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const Ur=Xi();function ct(e,t=null,n="."){return Object.keys(e).reduce((r,o)=>{const i=e[o],s=[t,o].filter(Boolean).join(n);return[typeof i=="object",i!==null,!(Array.isArray(i)&&i.length===0)].every(Boolean)?{...r,...ct(i,s,n)}:{...r,[s]:i}},{})}const Ji="v3",tr="builder.",Yi="options.",zi=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},cn=e=>{if(!e)return{};const t=Mr(e),n={};return Object.keys(t).forEach(r=>{if(r.startsWith(tr)){const o=r.replace(tr,"").replace(Yi,"");n[o]=t[r]}}),n},qi=()=>{if(!H())return{};const e=new URLSearchParams(window.location.search);return cn(e)},Mr=e=>e instanceof URLSearchParams?zi(e):e,nr=e=>typeof e=="number"&&!isNaN(e)&&e>=0,un=e=>{let{noTraverse:t=!1}=e;const{limit:n=30,userAttributes:r,query:o,model:i,apiKey:s,includeRefs:u=!0,enrich:d,locale:C,apiVersion:E=Ji,fields:S,omit:P,offset:O,cacheSeconds:x,staleCacheSeconds:k,sort:F,includeUnpublished:W}=e;if(!s)throw new Error("Missing API key");if(!["
|
|
154
|
+
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const Ur=Xi();function ct(e,t=null,n="."){return Object.keys(e).reduce((r,o)=>{const i=e[o],s=[t,o].filter(Boolean).join(n);return[typeof i=="object",i!==null,!(Array.isArray(i)&&i.length===0)].every(Boolean)?{...r,...ct(i,s,n)}:{...r,[s]:i}},{})}const Ji="v3",tr="builder.",Yi="options.",zi=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},cn=e=>{if(!e)return{};const t=Mr(e),n={};return Object.keys(t).forEach(r=>{if(r.startsWith(tr)){const o=r.replace(tr,"").replace(Yi,"");n[o]=t[r]}}),n},qi=()=>{if(!H())return{};const e=new URLSearchParams(window.location.search);return cn(e)},Mr=e=>e instanceof URLSearchParams?zi(e):e,nr=e=>typeof e=="number"&&!isNaN(e)&&e>=0,un=e=>{let{noTraverse:t=!1}=e;const{limit:n=30,userAttributes:r,query:o,model:i,apiKey:s,includeRefs:u=!0,enrich:d,locale:C,apiVersion:E=Ji,fields:S,omit:P,offset:O,cacheSeconds:x,staleCacheSeconds:k,sort:F,includeUnpublished:W}=e;if(!s)throw new Error("Missing API key");if(!["v3"].includes(E))throw new Error(`Invalid apiVersion: expected 'v3', received '${E}'`);(e.limit===void 0||e.limit>1)&&!("noTraverse"in e)&&(t=!0);const g=new URL(`https://cdn.builder.io/api/${E}/content/${i}?apiKey=${s}&limit=${n}&noTraverse=${t}&includeRefs=${u}${C?`&locale=${C}`:""}${d?`&enrich=${d}`:""}`);if(g.searchParams.set("omit",P||"meta.componentsUsed"),S&&g.searchParams.set("fields",S),Number.isFinite(O)&&O>-1&&g.searchParams.set("offset",String(Math.floor(O))),typeof W=="boolean"&&g.searchParams.set("includeUnpublished",String(W)),x&&nr(x)&&g.searchParams.set("cacheSeconds",String(x)),k&&nr(k)&&g.searchParams.set("staleCacheSeconds",String(k)),F){const Z=ct({sort:F});for(const B in Z)g.searchParams.set(B,JSON.stringify(Z[B]))}const ee={...qi(),...Mr(e.options||{})},te=ct(ee);for(const Z in te)g.searchParams.set(Z,String(te[Z]));if(r&&g.searchParams.set("userAttributes",JSON.stringify(r)),o){const Z=ct({query:o});for(const B in Z)g.searchParams.set(B,JSON.stringify(Z[B]))}return g},Zi=e=>"results"in e;async function xt(e){const t=await fn({...e,limit:1});return t&&t[0]||null}const Qi=xt,ea=async e=>{const t=un(e);return await(await Ur(t.href)).json()},Dr=async(e,t,n=un(e))=>{const r=ft(e.canTrack);if(n.search.includes("preview=")){const i=[];for(const s of t.results){const u=Ki(n.searchParams);i.push(u||s)}t.results=i}if(!r||!(H()||he==="reactNative"))return t.results;try{const i=[];for(const s of t.results)i.push(await vi({item:s,canTrack:r}));t.results=i}catch(i){G.error("Could not process A/B tests. ",i)}return t.results};async function fn(e){try{const t=un(e),n=await ea(e);return Zi(n)?Dr(e,n):(G.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return G.error("Error fetching data. ",t),null}}const ta=fn;function na(){return!H()||dt()?!1:location.search.indexOf("builder.preview=")!==-1}function ra(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function Vr(){return ra().replace(/-/g,"")}const _r="builderSessionId",oa=async({canTrack:e})=>{if(!e)return;const t=await Ir({name:_r,canTrack:e});if(oe(t))return t;{const n=ia();return aa({id:n,canTrack:e}),n}},ia=()=>Vr(),aa=({id:e,canTrack:t})=>jr({name:_r,value:e,canTrack:t}),Lr=()=>H()&&typeof localStorage<"u"?localStorage:void 0,sa=({key:e,canTrack:t})=>{var n;try{return t?(n=Lr())==null?void 0:n.getItem(e):void 0}catch(r){console.debug("[LocalStorage] GET error: ",r);return}},la=({key:e,canTrack:t,value:n})=>{var r;try{t&&((r=Lr())==null||r.setItem(e,n))}catch(o){console.debug("[LocalStorage] SET error: ",o)}},Wr="builderVisitorId",ca=({canTrack:e})=>{if(!e)return;const t=sa({key:Wr,canTrack:e});if(oe(t))return t;{const n=ua();return fa({id:n,canTrack:e}),n}},ua=()=>Vr(),fa=({id:e,canTrack:t})=>la({key:Wr,value:e,canTrack:t}),pa=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await oa({canTrack:e}),n=ca({canTrack:e});return{sessionId:t,visitorId:n}},da=async({type:e,canTrack:t,apiKey:n,metadata:r,...o})=>({type:e,data:{...o,metadata:{url:location.href,...r},...await pa({canTrack:t}),userAttributes:ur(),ownerId:n}});async function $r(e){if(!e.apiKey){G.error("Missing API key for track call. Please provide your API key.");return}if(e.canTrack&&!dt()&&(H()||he==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await da(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const ha=e=>$r({...e,canTrack:!0});function rr(e){return Math.round(e*1e3)/1e3}const ma=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let r=n?e:e.parentElement;do{if(!r)return null;if(t(r))return r}while(r=r.parentElement);return null},ga=e=>ma(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),or=({event:e,target:t})=>{const n=t.getBoundingClientRect(),r=e.clientX-n.left,o=e.clientY-n.top,i=rr(r/n.width),s=rr(o/n.height);return{x:i,y:s}},ya=e=>{const t=e.target,n=t&&ga(t),r=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:r||void 0,metadata:{targetOffset:t?or({event:e,target:t}):void 0,builderTargetOffset:n?or({event:e,target:n}):void 0,builderElementIndex:n&&r?[].slice.call(document.getElementsByClassName(r)).indexOf(n):void 0}}},va=["*.beta.builder.io","beta.builder.io","builder.io","localhost","qa.builder.io"];function Hr(e,t){const n=new URL(t.origin),r=n.hostname;return(e||va).findIndex(o=>o.startsWith("*.")?r.endsWith(o.slice(1)):o===r)>-1}const xa="0.13.1",ir={};function Kr(e,t){let n=ir[e];if(n||(n=ir[e]=[]),n.push(t),H()){const r={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(r,"*"),parent!==window&&window.postMessage(r,"*")}catch(o){console.debug("Could not postmessage",o)}}}const ba=()=>{Kr("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let ar=!1;const Gr=(e={})=>{var t,n;ar||(ar=!0,H()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:he,version:xa,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",r=>{var i,s;if(!Hr(e.trustedHosts,r))return;const{data:o}=r;if(o!=null&&o.type)switch(o.type){case"builder.evaluate":{const u=o.data.text,d=o.data.arguments||[],C=o.data.id,E=new Function(u);let S,P=null;try{S=E.apply(null,d)}catch(O){P=O}P?(i=window.parent)==null||i.postMessage({type:"builder.evaluateError",data:{id:C,error:P.message}},"*"):S&&typeof S.then=="function"?S.then(O=>{var x;(x=window.parent)==null||x.postMessage({type:"builder.evaluateResult",data:{id:C,result:O}},"*")}).catch(console.error):(s=window.parent)==null||s.postMessage({type:"builder.evaluateResult",data:{result:S,id:C}},"*");break}}})))},Xr=({model:e,trustedHosts:t,callbacks:n})=>r=>{if(!Hr(t,r))return;const{data:o}=r;if(o)switch(o.type){case"builder.configureSdk":{n.configureSdk(o.data);break}case"builder.triggerAnimation":{n.animation(o.data);break}case"builder.contentUpdate":{const i=o.data,s=i.key||i.alias||i.entry||i.modelName,u=i.data;s===e&&n.contentUpdate(u);break}}},Sa=(e,t,n)=>{if(!H)return G.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."),()=>{};Gr();const r=Xr({callbacks:{contentUpdate:t,animation:()=>{},configureSdk:()=>{}},model:e,trustedHosts:n==null?void 0:n.trustedHosts});return window.addEventListener("message",r),()=>{window.removeEventListener("message",r)}};function sr(e,...t){const n=Object(e);for(let r=1;r<arguments.length;r++){const o=arguments[r];if(o!=null)for(const i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])}return n}const wa=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function ka(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function Ca(e,t){const n=Ea(e),r=getComputedStyle(t),o=e.steps[0].styles,i=e.steps[e.steps.length-1].styles,s=[o,i];for(const u of s)for(const d of n)d in u||(u[d]=r[d])}function Ea(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 Ia(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){ka(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{Ca(e,n),n.style.transition="none",n.style.transitionDelay="0",sr(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${wa(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),sr(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}const ja=e=>{var i;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],r=e.fileUrl??((i=e==null?void 0:e.files)==null?void 0:i.regular);let o="";if(r&&t&&n&&(o+=`
|
|
155
155
|
@font-face {
|
|
156
156
|
font-family: "${t}";
|
|
157
157
|
src: local("${n}"), url('${r}') format('woff2');
|
package/lib/edge/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-67a092ad.cjs"),t=require("./USE_CLIENT_BUNDLE-d79f63a1.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-eebc5fb9.cjs");exports.Blocks=e.Blocks;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.RenderBlocks=e.RenderBlocks;exports.RenderContent=e.RenderContent;exports.Symbol=e.Symbol;exports.Text=e.Text;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;exports.Button=t.Button;exports.Fragment=t.FragmentComponent;exports.Image=t.Image;exports.Section=t.SectionComponent;exports.Video=t.Video;
|
package/lib/edge/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as i, x as c, C as m, R as g, w as p, S as l, T as d, G as C, p as u, F as B, H as E, q as S, I as f, A as R, J as b, c as h, j as x, y as k, z as y, E as F, D as P } from "./bundle-
|
|
2
|
-
import { b as w, F as A, c as I, S as V, V as j } from "./USE_CLIENT_BUNDLE-
|
|
1
|
+
import { B as i, x as c, C as m, R as g, w as p, S as l, T as d, G as C, p as u, F as B, H as E, q as S, I as f, A as R, J as b, c as h, j as x, y as k, z as y, E as F, D as P } from "./bundle-117e4014.js";
|
|
2
|
+
import { b as w, F as A, c as I, S as V, V as j } from "./USE_CLIENT_BUNDLE-3b67982b.js";
|
|
3
3
|
import "lru-cache";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "react";
|
|
6
6
|
import "next/navigation";
|
|
7
|
-
import "./USE_SERVER_BUNDLE-
|
|
7
|
+
import "./USE_SERVER_BUNDLE-2f4d4c84.js";
|
|
8
8
|
export {
|
|
9
9
|
i as Blocks,
|
|
10
10
|
w as Button,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";const t=require("react/jsx-runtime"),a=require("./bundle-
|
|
1
|
+
"use client";"use strict";const t=require("react/jsx-runtime"),a=require("./bundle-1f2f3033.cjs"),r=require("react"),D=require("./USE_SERVER_BUNDLE-78694df8.cjs"),V=require("next/navigation");function C(e){return t.jsx(t.Fragment,{children:a.isEmptyElement(e.TagName)?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes})}):t.jsx(t.Fragment,{children:typeof e.TagName=="string"?t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})}):t.jsx(t.Fragment,{children:t.jsx(e.TagName,{...e.attributes,...e.actionAttributes,children:e.children})})})})}function H(e){return t.jsx(C,{TagName:e.link?e.builderLinkComponent||"a":"button",attributes:{...e.attributes,[a.getClassPropName()]:`${e.link?"":"builder-button"} ${e.attributes[a.getClassPropName()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}},actionAttributes:{},children:e.text})}function U(e){return t.jsx(C,{TagName:e.Wrapper,attributes:a.getBlockProperties({block:e.block,context:e.context}),actionAttributes:a.getBlockActions({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 $(e){return t.jsx(e.Wrapper,{...e.wrapperProps,attributes:e.includeBlockProps?{...a.getBlockProperties({block:e.block,context:e.context}),...a.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{},children:e.children})}function O(e){function l(){var o;return"builder-blocks"+((o=e.blocks)!=null&&o.length?"":" no-blocks")}function g(){var o,m;a.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((m=window.parent)==null||m.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}function x(){var o,m;a.isEditing()&&!((o=e.blocks)!=null&&o.length)&&((m=window.parent)==null||m.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:e.path}},"*"))}return t.jsxs(t.Fragment,{children:[t.jsx(e.BlocksWrapper,{className:l()+" props-blocks-wrapper-4f2c12d8","builder-path":e.path,"builder-parent-id":e.parent,style:e.styleProp,onClick:o=>g(),onMouseEnter:o=>x(),onKeyPress:o=>g(),...e.BlocksWrapperProps,children:e.children}),t.jsx("style",{children:`.props-blocks-wrapper-4f2c12d8 {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: stretch;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i, Fragment as h, jsxs as E } from "react/jsx-runtime";
|
|
3
|
-
import { i as p, g as H, a as $, b as O, c as w, d as R, e as ee, f as P, h as V, _ as D, j as te, l as ne, k as ie, t as ae, m as U, n as ce, o as re, r as le, s as oe, p as de, q as se, u as ue } from "./bundle-
|
|
3
|
+
import { i as p, g as H, a as $, b as O, c as w, d as R, e as ee, f as P, h as V, _ as D, j as te, l as ne, k as ie, t as ae, m as U, n as ce, o as re, r as le, s as oe, p as de, q as se, u as ue } from "./bundle-457b4e1d.js";
|
|
4
4
|
import { useRef as T, useState as x, useEffect as b, createContext as me, createElement as ge } from "react";
|
|
5
|
-
import { p as he } from "./USE_SERVER_BUNDLE-
|
|
5
|
+
import { p as he } from "./USE_SERVER_BUNDLE-18bb0dcb.js";
|
|
6
6
|
import { useRouter as be } from "next/navigation";
|
|
7
7
|
function J(e) {
|
|
8
8
|
return /* @__PURE__ */ i(h, { children: p(e.TagName) ? /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(e.TagName, { ...e.attributes, ...e.actionAttributes }) }) : /* @__PURE__ */ i(h, { children: typeof e.TagName == "string" ? /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) : /* @__PURE__ */ i(h, { children: /* @__PURE__ */ i(e.TagName, { ...e.attributes, ...e.actionAttributes, children: e.children }) }) }) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use server";"use strict";const n=require("./bundle-
|
|
1
|
+
"use server";"use strict";const n=require("./bundle-1f2f3033.cjs");async function s({key:e,value:t}){return n.init(),globalThis._BUILDER_PREVIEW_LRU_CACHE.set(e,t),{[e]:t}}exports.postPreviewContent=s;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const lruCache=require("lru-cache"),jsxRuntime=require("react/jsx-runtime"),USE_CLIENT_BUNDLE=require("./USE_CLIENT_BUNDLE-
|
|
1
|
+
"use strict";const lruCache=require("lru-cache"),jsxRuntime=require("react/jsx-runtime"),USE_CLIENT_BUNDLE=require("./USE_CLIENT_BUNDLE-d6e6f95b.cjs");require("react");require("next/navigation");const EMPTY_HTML_ELEMENTS=new Set(["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),isEmptyElement=e=>typeof e=="string"&&EMPTY_HTML_ELEMENTS.has(e.toLowerCase()),TARGET="rsc",getClassPropName=()=>{switch(TARGET){case"react":case"reactNative":case"rsc":return"className";case"svelte":case"vue":case"solid":case"qwik":return"class"}};function getBlockComponentOptions(e){var t;return{...(t=e.component)==null?void 0:t.options,...e.options,builderBlock:e}}const MSG_PREFIX="[Builder.io]: ",logger={log:(...e)=>console.log(MSG_PREFIX,...e),error:(...e)=>console.error(MSG_PREFIX,...e),warn:(...e)=>console.warn(MSG_PREFIX,...e),debug:(...e)=>console.debug(MSG_PREFIX,...e)};function isBrowser(){return typeof window<"u"&&typeof document<"u"}function isIframe(){return isBrowser()&&window.self!==window.top}function isEditing(){return isIframe()&&window.location.search.indexOf("builder.frameEditing=")!==-1}const getLocation=()=>{if(isBrowser()){const e=new URL(location.href);return e.pathname===""&&(e.pathname="/"),e}else return console.warn("Cannot get location for tracking in non-browser environment"),null},getUserAgent=()=>typeof navigator=="object"&&navigator.userAgent||"",getUserAttributes=()=>{const e=getUserAgent(),t={Android(){return e.match(/Android/i)},BlackBerry(){return e.match(/BlackBerry/i)},iOS(){return e.match(/iPhone|iPod/i)},Opera(){return e.match(/Opera Mini/i)},Windows(){return e.match(/IEMobile/i)||e.match(/WPDesktop/i)},any(){return t.Android()||t.BlackBerry()||t.iOS()||t.Opera()||t.Windows()||TARGET==="reactNative"}},n=e.match(/Tablet|iPad/i),o=getLocation();return{urlPath:o==null?void 0:o.pathname,host:(o==null?void 0:o.host)||(o==null?void 0:o.hostname),device:n?"tablet":t.any()?"mobile":"desktop"}},getFunctionArguments=({builder:e,context:t,event:n,state:o})=>Object.entries({state:o,Builder:e,builder:e,context:t,event:n}),getBuilderGlobals=()=>({isEditing:isEditing(),isBrowser:isBrowser(),isServer:!isBrowser(),getUserAttributes:()=>getUserAttributes()}),parseCode=(e,{isExpression:t=!0})=>t&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,runInBrowser=({code:e,builder:t,context:n,event:o,localState:r,rootSetState:i,rootState:a})=>{const s=getFunctionArguments({builder:t,context:n,event:o,state:flattenState({rootState:a,localState:r,rootSetState:i})});return new Function(...s.map(([c])=>c),e)(...s.map(([,c])=>c))};function flattenState({rootState:e,localState:t,rootSetState:n}){return new Proxy(e,{get:(o,r)=>{if(t&&r in t)return t[r];const i=o[r];return typeof i=="object"?flattenState({rootState:i,localState:void 0,rootSetState:n?a=>{o[r]=a,n(o)}:void 0}):i},set:(o,r,i)=>{if(t&&r in t)throw new Error("Writing to local state is not allowed as it is read-only.");return o[r]=i,n==null||n(o),!0}})}const fastClone=e=>JSON.parse(JSON.stringify(e)),set=(e,t,n)=>{if(Object(e)!==e)return e;const o=Array.isArray(t)?t:t.toString().match(/[^.[\]]+/g);return o.slice(0,-1).reduce((r,i,a)=>Object(r[i])===r[i]?r[i]:r[i]=Math.abs(Number(o[a+1]))>>0===+o[a+1]?[]:{},e)[o[o.length-1]]=n,e},noop=()=>{};let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(e){}const ivm=safeDynamicRequire("isolated-vm"),getSyncValName=e=>`bldr_${e}_sync`,BUILDER_SET_STATE_NAME="BUILDER_SET_STATE",INJECTED_IVM_GLOBAL="BUILDER_IVM",REF_TO_PROXY_FN=`
|
|
2
2
|
var refToProxy = (obj) => {
|
|
3
3
|
if (typeof obj !== 'object' || obj === null) {
|
|
4
4
|
return obj;
|
|
@@ -69,7 +69,7 @@ output;
|
|
|
69
69
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
|
-
`};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
72
|
+
`};return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{className:`builder-columns ${e.builderBlock.id}-breakpoints div-febc5ea6`,style:m(),children:[jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsx(InlinedStyles,{styles:g()})}),(u=e.columns)==null?void 0:u.map((l,d)=>jsxRuntime.jsx(USE_CLIENT_BUNDLE.DynamicRenderer,{TagName:l.link?e.builderLinkComponent||"a":"div",actionAttributes:{},attributes:{...l.link?{href:l.link}:{},[getClassPropName()]:"builder-column",style:mapStyleObjToStrIfNeeded(f(d))},children:jsxRuntime.jsx(Blocks,{path:`component.options.columns.${d}.blocks`,parent:e.builderBlock.id,styleProp:{flexGrow:"1"},context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent,blocks:l.blocks})},d))]}),jsxRuntime.jsx("style",{children:`.div-febc5ea6 {
|
|
73
73
|
display: flex;
|
|
74
74
|
line-height: normal;
|
|
75
75
|
}`})]})}function removeProtocol(e){return e.replace(/http(s)?:/,"")}function updateQueryParam(e="",t,n){const o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),r=e.indexOf("?")!==-1?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+encodeURIComponent(n)+"$2"):e+r+t+"="+encodeURIComponent(n)}function getShopifyImageUrl(e,t){if(!e||!(e!=null&&e.match(/cdn\.shopify\.com/))||!t)return e;if(t==="master")return removeProtocol(e);const n=e.match(/(_\d+x(\d+)?)?(\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?)/i);if(n){const o=e.split(n[0]),r=n[3],i=t.match("x")?t:`${t}x`;return removeProtocol(`${o[0]}_${i}${r}`)}return null}function getSrcSet(e){if(!e)return e;const t=[100,200,400,800,1200,1600,2e3];if(e.match(/builder\.io/)){let n=e;const o=Number(e.split("?width=")[1]);return isNaN(o)||(n=`${n} ${o}w`),t.filter(r=>r!==o).map(r=>`${updateQueryParam(e,"width",r)} ${r}w`).concat([n]).join(", ")}return e.match(/cdn\.shopify\.com/)?t.map(n=>[getShopifyImageUrl(e,`${n}x${n}`),n]).filter(([n])=>!!n).map(([n,o])=>`${n} ${o}w`).concat([e]).join(", "):e}const getTopLevelDomain=e=>{if(e==="localhost"||e==="127.0.0.1")return e;const t=e.split(".");return t.length>2?t.slice(1).join("."):e},getCookieSync=({name:e,canTrack:t})=>{var n;try{return t?(n=document.cookie.split("; ").find(o=>o.startsWith(`${e}=`)))==null?void 0:n.split("=")[1]:void 0}catch(o){logger.warn("[COOKIE] GET error: ",(o==null?void 0:o.message)||o);return}},getCookie=async e=>getCookieSync(e),stringifyCookie=e=>e.map(([t,n])=>n?`${t}=${n}`:t).filter(checkIsDefined).join("; "),SECURE_CONFIG=[["secure",""],["SameSite","None"]],createCookieString=({name:e,value:t,expires:n})=>{const r=(isBrowser()?location.protocol==="https:":!0)?SECURE_CONFIG:[[]],i=n?[["expires",n.toUTCString()]]:[[]],a=[[e,t],...i,["path","/"],["domain",getTopLevelDomain(window.location.hostname)],...r];return stringifyCookie(a)},setCookie=async({name:e,value:t,expires:n,canTrack:o})=>{try{if(!o)return;const r=createCookieString({name:e,value:t,expires:n});document.cookie=r}catch(r){logger.warn("[COOKIE] SET error: ",(r==null?void 0:r.message)||r)}},BUILDER_STORE_PREFIX="builder.tests",getContentTestKey=e=>`${BUILDER_STORE_PREFIX}.${e}`,getContentVariationCookie=({contentId:e})=>getCookie({name:getContentTestKey(e),canTrack:!0}),getContentVariationCookieSync=({contentId:e})=>getCookieSync({name:getContentTestKey(e),canTrack:!0}),setContentVariationCookie=({contentId:e,value:t})=>setCookie({name:getContentTestKey(e),value:t,canTrack:!0}),checkIsBuilderContentWithVariations=e=>checkIsDefined(e.id)&&checkIsDefined(e.variations)&&Object.keys(e.variations).length>0,getRandomVariationId=({id:e,variations:t})=>{var r;let n=0;const o=Math.random();for(const i in t){const a=(r=t[i])==null?void 0:r.testRatio;if(n+=a,o<n)return i}return e},getAndSetVariantId=e=>{const t=getRandomVariationId(e);return setContentVariationCookie({contentId:e.id,value:t}).catch(n=>{logger.error("could not store A/B test variation: ",n)}),t},getTestFields=({item:e,testGroupId:t})=>{const n=e.variations[t];return t===e.id||!n?{testVariationId:e.id,testVariationName:"Default"}:{data:n.data,testVariationId:n.id,testVariationName:n.name||(n.id===e.id?"Default":"")}},handleABTestingSync=({item:e,canTrack:t})=>{if(!t)return e;if(!e)return;if(!checkIsBuilderContentWithVariations(e))return e;const n=getContentVariationCookieSync({contentId:e.id})||getAndSetVariantId({variations:e.variations,id:e.id}),o=getTestFields({item:e,testGroupId:n});return{...e,...o}},handleABTesting=async({item:e,canTrack:t})=>{if(!t||!checkIsBuilderContentWithVariations(e))return e;const o=await getContentVariationCookie({contentId:e.id})||getAndSetVariantId({variations:e.variations,id:e.id}),r=getTestFields({item:e,testGroupId:o});return{...e,...r}},getDefaultCanTrack=e=>checkIsDefined(e)?e:!0,componentInfo$b={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},componentInfo$a={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(o=>{o.delete("width")})}const n=e.get("columns");Array.isArray(n)&&n.find(r=>r.get("width"))&&(n.find(i=>!i.get("width"))||n.reduce((s,c)=>s+c.get("width"),0)!==100)&&t()}},{name:"space",type:"number",defaultValue:20,helperText:"Size of gap between columns",advanced:!0},{name:"stackColumnsAt",type:"string",defaultValue:"tablet",helperText:"Convert horizontal columns to vertical at what device size",enum:["tablet","mobile","never"],advanced:!0},{name:"reverseColumnsWhenStacked",type:"boolean",defaultValue:!1,helperText:"When stacking columns for mobile devices, reverse the ordering",advanced:!0}]},componentInfo$9={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}]},componentInfo$8={name:"Embed",static:!0,inputs:[{name:"url",type:"url",required:!0,defaultValue:"",helperText:"e.g. enter a youtube url, google map, etc",onChange:e=>{const t=e.get("url");if(t)return e.set("content","Loading..."),fetch(`https://iframe.ly/api/iframely?url=${t}&api_key=ae0e60e78201a3f2b0de4b`).then(o=>o.json()).then(o=>{e.get("url")===t&&(o.html?e.set("content",o.html):e.set("content","Invalid url, please try another"))}).catch(o=>{e.set("content","There was an error embedding this URL, please try again or another URL")});e.delete("content")}},{name:"content",type:"html",defaultValue:'<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',hideFromUI:!0}]},SCRIPT_MIME_TYPES=["text/javascript","application/javascript","application/ecmascript"],isJsScript=e=>SCRIPT_MIME_TYPES.includes(e.type),componentInfo$7={name:"Fragment",static:!0,hidden:!0,canHaveChildren:!0,noWrap:!0},componentInfo$6={name:"Image",static:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",defaultStyles:{position:"relative",minHeight:"20px",minWidth:"20px",overflow:"hidden"},canHaveChildren:!0,inputs:[{name:"image",type:"file",bubble:!0,allowedFileTypes:["jpeg","jpg","png","svg"],required:!0,defaultValue:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",onChange:e=>{e.delete("srcset"),e.delete("noWebp");function n(a,s=6e4){return new Promise((c,m)=>{const f=document.createElement("img");let p=!1;f.onload=()=>{p=!0,c(f)},f.addEventListener("error",g=>{console.warn("Image load failed",g.error),m(g.error)}),f.src=a,setTimeout(()=>{p||m(new Error("Image load timed out"))},s)})}function o(a){return Math.round(a*1e3)/1e3}const r=e.get("image"),i=e.get("aspectRatio");if(fetch(r).then(a=>a.blob()).then(a=>{a.type.includes("svg")&&e.set("noWebp",!0)}),r&&(!i||i===.7041))return n(r).then(a=>{const s=e.get("aspectRatio");e.get("image")===r&&(!s||s===.7041)&&a.width&&a.height&&(e.set("aspectRatio",o(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:"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}]},componentInfo$5={name:"Raw:Img",hideFromInsertMenu:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",inputs:[{name:"image",bubble:!0,type:"file",allowedFileTypes:["jpeg","jpg","png","svg","gif","webp"],required:!0}],noWrap:!0,static:!0},componentInfo$4={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>"}}}]},componentInfo$3={name:"Slot",isRSC:!0,description:"Allow child blocks to be inserted into this content when used as a Symbol",docsLink:"https://www.builder.io/c/docs/symbols-with-blocks",image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",inputs:[{name:"name",type:"string",required:!0,defaultValue:"children"}]};function Slot(e){var t,n,o;return jsxRuntime.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:jsxRuntime.jsx(Blocks,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,blocks:(o=e.builderContext.rootState)==null?void 0:o[e.name]})})}const componentInfo$2={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"}]},componentInfo$1={name:"Text",static:!0,isRSC:!0,image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",inputs:[{name:"text",type:"html",required:!0,autoFocus:!0,bubble:!0,defaultValue:"Enter some text..."}],defaultStyles:{lineHeight:"normal",height:"auto",textAlign:"center"}};function Text(e){var t;return jsxRuntime.jsx("div",{className:"builder-text",dangerouslySetInnerHTML:{__html:((t=e.text)==null?void 0:t.toString())||""},style:{outline:"none"}})}const componentInfo={name:"Video",canHaveChildren:!0,defaultStyles:{minHeight:"20px",minWidth:"20px"},image:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-videocam-24px%20(1).svg?alt=media&token=49a84e4a-b20e-4977-a650-047f986874bb",inputs:[{name:"video",type:"file",allowedFileTypes:["mp4"],bubble:!0,defaultValue:"https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/assets%2FKQlEmWDxA0coC3PK6UvkrjwkIGI2%2F28cb070609f546cdbe5efa20e931aa4b?alt=media&token=912e9551-7a7c-4dfb-86b6-3da1537d1a7f",required:!0},{name:"posterImage",type:"file",allowedFileTypes:["jpeg","png"],helperText:"Image to show before the video plays"},{name:"autoPlay",type:"boolean",defaultValue:!0},{name:"controls",type:"boolean",defaultValue:!1},{name:"muted",type:"boolean",defaultValue:!0},{name:"loop",type:"boolean",defaultValue:!0},{name:"playsInline",type:"boolean",defaultValue:!0},{name:"fit",type:"text",defaultValue:"cover",enum:["contain","cover","fill","auto"]},{name:"preload",type:"text",defaultValue:"metadata",enum:["auto","metadata","none"]},{name:"fitContent",type:"boolean",helperText:"When child blocks are provided, fit to them instead of using the aspect ratio",defaultValue:!0,advanced:!0},{name:"position",type:"text",defaultValue:"center",enum:["center","top","left","right","bottom","top left","top right","bottom left","bottom right"]},{name:"height",type:"number",advanced:!0},{name:"width",type:"number",advanced:!0},{name:"aspectRatio",type:"number",advanced:!0,defaultValue:.7004048582995948},{name:"lazyLoad",type:"boolean",helperText:'Load this video "lazily" - as in only when a user scrolls near the video. Recommended for optmized performance and bandwidth consumption',defaultValue:!0,advanced:!0}]},getDefaultRegisteredComponents=()=>[{component:USE_CLIENT_BUNDLE.Button,...componentInfo$b},{component:Columns,...componentInfo$a},{component:USE_CLIENT_BUNDLE.CustomCode,...componentInfo$9},{component:USE_CLIENT_BUNDLE.Embed,...componentInfo$8},{component:USE_CLIENT_BUNDLE.FragmentComponent,...componentInfo$7},{component:USE_CLIENT_BUNDLE.Image,...componentInfo$6},{component:USE_CLIENT_BUNDLE.ImgComponent,...componentInfo$5},{component:USE_CLIENT_BUNDLE.SectionComponent,...componentInfo$4},{component:Symbol$1,...componentInfo$2},{component:Text,...componentInfo$1},{component:USE_CLIENT_BUNDLE.Video,...componentInfo},{component:Slot,...componentInfo$3}],components=[],createRegisterComponentMessage=e=>({type:"builder.registerComponent",data:serializeComponentInfo(e)}),serializeFn=e=>{const t=e.toString().trim();return`return (${!t.startsWith("function")&&!t.startsWith("(")?"function ":""}${t}).apply(this, arguments)`},serializeValue=e=>typeof e=="function"?serializeFn(e):fastClone(e),serializeComponentInfo=({inputs:e,...t})=>({...fastClone(t),inputs:e==null?void 0:e.map(n=>Object.entries(n).reduce((o,[r,i])=>({...o,[r]:serializeValue(i)}),{}))}),UPDATE_COOKIES_AND_STYLES_SCRIPT=`function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
|
|
@@ -171,7 +171,7 @@ output;
|
|
|
171
171
|
)`,getUpdateVariantVisibilityScript=({contentId:e,variationId:t})=>`window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
172
172
|
"${t}", "${e}", ${isHydrationTarget}
|
|
173
173
|
)`;function InlinedScript(e){return jsxRuntime.jsx("script",{dangerouslySetInnerHTML:{__html:e.scriptStr},id:e.id||""})}const getIdFromSearchParams=e=>{const t=e.get("preview"),n=e.get("overrides."+t);return n||logger.warn("No previewed ID found in search params."),n};function init(){globalThis._BUILDER_PREVIEW_LRU_CACHE||(globalThis._BUILDER_PREVIEW_LRU_CACHE=new lruCache.LRUCache({max:500,ttl:1e3*60*5}))}function getPreviewContent(e){init();const t=getIdFromSearchParams(e);return typeof t=="string"?globalThis._BUILDER_PREVIEW_LRU_CACHE.get(t):void 0}function getGlobalThis(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:globalThis}function getFetch(){const e=getGlobalThis().fetch;if(typeof e>"u")throw console.warn(`Builder SDK could not find a global fetch function. Make sure you have a polyfill for fetch in your project.
|
|
174
|
-
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const fetch$1=getFetch();function flatten(e,t=null,n="."){return Object.keys(e).reduce((o,r)=>{const i=e[r],a=[t,r].filter(Boolean).join(n);return[typeof i=="object",i!==null,!(Array.isArray(i)&&i.length===0)].every(Boolean)?{...o,...flatten(i,a,n)}:{...o,[a]:i}},{})}const DEFAULT_API_VERSION="v3",BUILDER_SEARCHPARAMS_PREFIX="builder.",BUILDER_OPTIONS_PREFIX="options.",convertSearchParamsToQueryObject=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},getBuilderSearchParams=e=>{if(!e)return{};const t=normalizeSearchParams(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(BUILDER_SEARCHPARAMS_PREFIX)){const r=o.replace(BUILDER_SEARCHPARAMS_PREFIX,"").replace(BUILDER_OPTIONS_PREFIX,"");n[r]=t[o]}}),n},getBuilderSearchParamsFromWindow=()=>{if(!isBrowser())return{};const e=new URLSearchParams(window.location.search);return getBuilderSearchParams(e)},normalizeSearchParams=e=>e instanceof URLSearchParams?convertSearchParamsToQueryObject(e):e,isPositiveNumber=e=>typeof e=="number"&&!isNaN(e)&&e>=0,generateContentUrl=e=>{let{noTraverse:t=!1}=e;const{limit:n=30,userAttributes:o,query:r,model:i,apiKey:a,includeRefs:s=!0,enrich:c,locale:m,apiVersion:f=DEFAULT_API_VERSION,fields:p,omit:g,offset:u,cacheSeconds:l,staleCacheSeconds:d,sort:b,includeUnpublished:y}=e;if(!a)throw new Error("Missing API key");if(!["v2","v3"].includes(f))throw new Error(`Invalid apiVersion: expected 'v2' or 'v3', received '${f}'`);(e.limit===void 0||e.limit>1)&&!("noTraverse"in e)&&(t=!0);const h=new URL(`https://cdn.builder.io/api/${f}/content/${i}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m?`&locale=${m}`:""}${c?`&enrich=${c}`:""}`);if(h.searchParams.set("omit",g||"meta.componentsUsed"),p&&h.searchParams.set("fields",p),Number.isFinite(u)&&u>-1&&h.searchParams.set("offset",String(Math.floor(u))),typeof y=="boolean"&&h.searchParams.set("includeUnpublished",String(y)),l&&isPositiveNumber(l)&&h.searchParams.set("cacheSeconds",String(l)),d&&isPositiveNumber(d)&&h.searchParams.set("staleCacheSeconds",String(d)),b){const S=flatten({sort:b});for(const k in S)h.searchParams.set(k,JSON.stringify(S[k]))}const C={...getBuilderSearchParamsFromWindow(),...normalizeSearchParams(e.options||{})},x=flatten(C);for(const S in x)h.searchParams.set(S,String(x[S]));if(o&&h.searchParams.set("userAttributes",JSON.stringify(o)),r){const S=flatten({query:r});for(const k in S)h.searchParams.set(k,JSON.stringify(S[k]))}return h},checkContentHasResults=e=>"results"in e;async function fetchOneEntry(e){const t=await fetchEntries({...e,limit:1});return t&&t[0]||null}const getContent=fetchOneEntry,_fetchContent=async e=>{const t=generateContentUrl(e);return await(await fetch$1(t.href)).json()},_processContentResult=async(e,t,n=generateContentUrl(e))=>{const o=getDefaultCanTrack(e.canTrack);if(n.search.includes("preview=")){const i=[];for(const a of t.results){const s=getPreviewContent(n.searchParams);i.push(s||a)}t.results=i}if(!o||!(isBrowser()||TARGET==="reactNative"))return t.results;try{const i=[];for(const a of t.results)i.push(await handleABTesting({item:a,canTrack:o}));t.results=i}catch(i){logger.error("Could not process A/B tests. ",i)}return t.results};async function fetchEntries(e){try{const t=generateContentUrl(e),n=await _fetchContent(e);return checkContentHasResults(n)?_processContentResult(e,n):(logger.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return logger.error("Error fetching data. ",t),null}}const getAllContent=fetchEntries;function isPreviewing(){return!isBrowser()||isEditing()?!1:location.search.indexOf("builder.preview=")!==-1}function uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function uuid(){return uuidv4().replace(/-/g,"")}const SESSION_LOCAL_STORAGE_KEY="builderSessionId",getSessionId=async({canTrack:e})=>{if(!e)return;const t=await getCookie({name:SESSION_LOCAL_STORAGE_KEY,canTrack:e});if(checkIsDefined(t))return t;{const n=createSessionId();return setSessionId({id:n,canTrack:e}),n}},createSessionId=()=>uuid(),setSessionId=({id:e,canTrack:t})=>setCookie({name:SESSION_LOCAL_STORAGE_KEY,value:e,canTrack:t}),getLocalStorage=()=>isBrowser()&&typeof localStorage<"u"?localStorage:void 0,getLocalStorageItem=({key:e,canTrack:t})=>{var n;try{return t?(n=getLocalStorage())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},setLocalStorageItem=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=getLocalStorage())==null||o.setItem(e,n))}catch(r){console.debug("[LocalStorage] SET error: ",r)}},VISITOR_LOCAL_STORAGE_KEY="builderVisitorId",getVisitorId=({canTrack:e})=>{if(!e)return;const t=getLocalStorageItem({key:VISITOR_LOCAL_STORAGE_KEY,canTrack:e});if(checkIsDefined(t))return t;{const n=createVisitorId();return setVisitorId({id:n,canTrack:e}),n}},createVisitorId=()=>uuid(),setVisitorId=({id:e,canTrack:t})=>setLocalStorageItem({key:VISITOR_LOCAL_STORAGE_KEY,value:e,canTrack:t}),getTrackingEventData=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await getSessionId({canTrack:e}),n=getVisitorId({canTrack:e});return{sessionId:t,visitorId:n}},createEvent=async({type:e,canTrack:t,apiKey:n,metadata:o,...r})=>({type:e,data:{...r,metadata:{url:location.href,...o},...await getTrackingEventData({canTrack:t}),userAttributes:getUserAttributes(),ownerId:n}});async function _track(e){if(!e.apiKey){logger.error("Missing API key for track call. Please provide your API key.");return}if(e.canTrack&&!isEditing()&&(isBrowser()||TARGET==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await createEvent(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const track=e=>_track({...e,canTrack:!0});function round(e){return Math.round(e*1e3)/1e3}const findParentElement=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let o=n?e:e.parentElement;do{if(!o)return null;if(t(o))return o}while(o=o.parentElement);return null},findBuilderParent=e=>findParentElement(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),computeOffset=({event:e,target:t})=>{const n=t.getBoundingClientRect(),o=e.clientX-n.left,r=e.clientY-n.top,i=round(o/n.width),a=round(r/n.height);return{x:i,y:a}},getInteractionPropertiesForEvent=e=>{const t=e.target,n=t&&findBuilderParent(t),o=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:t?computeOffset({event:e,target:t}):void 0,builderTargetOffset:n?computeOffset({event:e,target:n}):void 0,builderElementIndex:n&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(n):void 0}}},DEFAULT_TRUSTED_HOSTS=["*.beta.builder.io","beta.builder.io","builder.io","localhost","qa.builder.io"];function isFromTrustedHost(e,t){const n=new URL(t.origin),o=n.hostname;return(e||DEFAULT_TRUSTED_HOSTS).findIndex(r=>r.startsWith("*.")?o.endsWith(r.slice(1)):r===o)>-1}const SDK_VERSION="0.12.8",registry={};function register(e,t){let n=registry[e];if(n||(n=registry[e]=[]),n.push(t),isBrowser()){const o={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(r){console.debug("Could not postmessage",r)}}}const registerInsertMenu=()=>{register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let isSetupForEditing=!1;const setupBrowserForEditing=(e={})=>{var t,n;isSetupForEditing||(isSetupForEditing=!0,isBrowser()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:TARGET,version:SDK_VERSION,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",o=>{var i,a;if(!isFromTrustedHost(e.trustedHosts,o))return;const{data:r}=o;if(r!=null&&r.type)switch(r.type){case"builder.evaluate":{const s=r.data.text,c=r.data.arguments||[],m=r.data.id,f=new Function(s);let p,g=null;try{p=f.apply(null,c)}catch(u){g=u}g?(i=window.parent)==null||i.postMessage({type:"builder.evaluateError",data:{id:m,error:g.message}},"*"):p&&typeof p.then=="function"?p.then(u=>{var l;(l=window.parent)==null||l.postMessage({type:"builder.evaluateResult",data:{id:m,result:u}},"*")}).catch(console.error):(a=window.parent)==null||a.postMessage({type:"builder.evaluateResult",data:{result:p,id:m}},"*");break}}})))},createEditorListener=({model:e,trustedHosts:t,callbacks:n})=>o=>{if(!isFromTrustedHost(t,o))return;const{data:r}=o;if(r)switch(r.type){case"builder.configureSdk":{n.configureSdk(r.data);break}case"builder.triggerAnimation":{n.animation(r.data);break}case"builder.contentUpdate":{const i=r.data,a=i.key||i.alias||i.entry||i.modelName,s=i.data;a===e&&n.contentUpdate(s);break}}},subscribeToEditor=(e,t,n)=>{if(!isBrowser)return logger.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."),()=>{};setupBrowserForEditing();const o=createEditorListener({callbacks:{contentUpdate:t,animation:()=>{},configureSdk:()=>{}},model:e,trustedHosts:n==null?void 0:n.trustedHosts});return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}};function assign(e,...t){const n=Object(e);for(let o=1;o<arguments.length;o++){const r=arguments[o];if(r!=null)for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])}return n}const camelCaseToKebabCase=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function warnElementNotPresent(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function augmentAnimation(e,t){const n=getAllStylesUsed(e),o=getComputedStyle(t),r=e.steps[0].styles,i=e.steps[e.steps.length-1].styles,a=[r,i];for(const s of a)for(const c of n)c in s||(s[c]=o[c])}function getAllStylesUsed(e){const t=[];for(const n of e.steps)for(const o in n.styles)t.indexOf(o)===-1&&t.push(o);return t}function triggerAnimation(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){warnElementNotPresent(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{augmentAnimation(e,n),n.style.transition="none",n.style.transitionDelay="0",assign(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${camelCaseToKebabCase(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),assign(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}const getCssFromFont=e=>{var i;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],o=e.fileUrl??((i=e==null?void 0:e.files)==null?void 0:i.regular);let r="";if(o&&t&&n&&(r+=`
|
|
174
|
+
For more information, read https://github.com/BuilderIO/this-package-uses-fetch`),new Error("Builder SDK could not find a global `fetch` function");return e}const fetch$1=getFetch();function flatten(e,t=null,n="."){return Object.keys(e).reduce((o,r)=>{const i=e[r],a=[t,r].filter(Boolean).join(n);return[typeof i=="object",i!==null,!(Array.isArray(i)&&i.length===0)].every(Boolean)?{...o,...flatten(i,a,n)}:{...o,[a]:i}},{})}const DEFAULT_API_VERSION="v3",BUILDER_SEARCHPARAMS_PREFIX="builder.",BUILDER_OPTIONS_PREFIX="options.",convertSearchParamsToQueryObject=e=>{const t={};return e.forEach((n,o)=>{t[o]=n}),t},getBuilderSearchParams=e=>{if(!e)return{};const t=normalizeSearchParams(e),n={};return Object.keys(t).forEach(o=>{if(o.startsWith(BUILDER_SEARCHPARAMS_PREFIX)){const r=o.replace(BUILDER_SEARCHPARAMS_PREFIX,"").replace(BUILDER_OPTIONS_PREFIX,"");n[r]=t[o]}}),n},getBuilderSearchParamsFromWindow=()=>{if(!isBrowser())return{};const e=new URLSearchParams(window.location.search);return getBuilderSearchParams(e)},normalizeSearchParams=e=>e instanceof URLSearchParams?convertSearchParamsToQueryObject(e):e,isPositiveNumber=e=>typeof e=="number"&&!isNaN(e)&&e>=0,generateContentUrl=e=>{let{noTraverse:t=!1}=e;const{limit:n=30,userAttributes:o,query:r,model:i,apiKey:a,includeRefs:s=!0,enrich:c,locale:m,apiVersion:f=DEFAULT_API_VERSION,fields:p,omit:g,offset:u,cacheSeconds:l,staleCacheSeconds:d,sort:b,includeUnpublished:y}=e;if(!a)throw new Error("Missing API key");if(!["v3"].includes(f))throw new Error(`Invalid apiVersion: expected 'v3', received '${f}'`);(e.limit===void 0||e.limit>1)&&!("noTraverse"in e)&&(t=!0);const h=new URL(`https://cdn.builder.io/api/${f}/content/${i}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m?`&locale=${m}`:""}${c?`&enrich=${c}`:""}`);if(h.searchParams.set("omit",g||"meta.componentsUsed"),p&&h.searchParams.set("fields",p),Number.isFinite(u)&&u>-1&&h.searchParams.set("offset",String(Math.floor(u))),typeof y=="boolean"&&h.searchParams.set("includeUnpublished",String(y)),l&&isPositiveNumber(l)&&h.searchParams.set("cacheSeconds",String(l)),d&&isPositiveNumber(d)&&h.searchParams.set("staleCacheSeconds",String(d)),b){const S=flatten({sort:b});for(const k in S)h.searchParams.set(k,JSON.stringify(S[k]))}const C={...getBuilderSearchParamsFromWindow(),...normalizeSearchParams(e.options||{})},x=flatten(C);for(const S in x)h.searchParams.set(S,String(x[S]));if(o&&h.searchParams.set("userAttributes",JSON.stringify(o)),r){const S=flatten({query:r});for(const k in S)h.searchParams.set(k,JSON.stringify(S[k]))}return h},checkContentHasResults=e=>"results"in e;async function fetchOneEntry(e){const t=await fetchEntries({...e,limit:1});return t&&t[0]||null}const getContent=fetchOneEntry,_fetchContent=async e=>{const t=generateContentUrl(e);return await(await fetch$1(t.href)).json()},_processContentResult=async(e,t,n=generateContentUrl(e))=>{const o=getDefaultCanTrack(e.canTrack);if(n.search.includes("preview=")){const i=[];for(const a of t.results){const s=getPreviewContent(n.searchParams);i.push(s||a)}t.results=i}if(!o||!(isBrowser()||TARGET==="reactNative"))return t.results;try{const i=[];for(const a of t.results)i.push(await handleABTesting({item:a,canTrack:o}));t.results=i}catch(i){logger.error("Could not process A/B tests. ",i)}return t.results};async function fetchEntries(e){try{const t=generateContentUrl(e),n=await _fetchContent(e);return checkContentHasResults(n)?_processContentResult(e,n):(logger.error("Error fetching data. ",{url:t,content:n,options:e}),null)}catch(t){return logger.error("Error fetching data. ",t),null}}const getAllContent=fetchEntries;function isPreviewing(){return!isBrowser()||isEditing()?!1:location.search.indexOf("builder.preview=")!==-1}function uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}function uuid(){return uuidv4().replace(/-/g,"")}const SESSION_LOCAL_STORAGE_KEY="builderSessionId",getSessionId=async({canTrack:e})=>{if(!e)return;const t=await getCookie({name:SESSION_LOCAL_STORAGE_KEY,canTrack:e});if(checkIsDefined(t))return t;{const n=createSessionId();return setSessionId({id:n,canTrack:e}),n}},createSessionId=()=>uuid(),setSessionId=({id:e,canTrack:t})=>setCookie({name:SESSION_LOCAL_STORAGE_KEY,value:e,canTrack:t}),getLocalStorage=()=>isBrowser()&&typeof localStorage<"u"?localStorage:void 0,getLocalStorageItem=({key:e,canTrack:t})=>{var n;try{return t?(n=getLocalStorage())==null?void 0:n.getItem(e):void 0}catch(o){console.debug("[LocalStorage] GET error: ",o);return}},setLocalStorageItem=({key:e,canTrack:t,value:n})=>{var o;try{t&&((o=getLocalStorage())==null||o.setItem(e,n))}catch(r){console.debug("[LocalStorage] SET error: ",r)}},VISITOR_LOCAL_STORAGE_KEY="builderVisitorId",getVisitorId=({canTrack:e})=>{if(!e)return;const t=getLocalStorageItem({key:VISITOR_LOCAL_STORAGE_KEY,canTrack:e});if(checkIsDefined(t))return t;{const n=createVisitorId();return setVisitorId({id:n,canTrack:e}),n}},createVisitorId=()=>uuid(),setVisitorId=({id:e,canTrack:t})=>setLocalStorageItem({key:VISITOR_LOCAL_STORAGE_KEY,value:e,canTrack:t}),getTrackingEventData=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await getSessionId({canTrack:e}),n=getVisitorId({canTrack:e});return{sessionId:t,visitorId:n}},createEvent=async({type:e,canTrack:t,apiKey:n,metadata:o,...r})=>({type:e,data:{...r,metadata:{url:location.href,...o},...await getTrackingEventData({canTrack:t}),userAttributes:getUserAttributes(),ownerId:n}});async function _track(e){if(!e.apiKey){logger.error("Missing API key for track call. Please provide your API key.");return}if(e.canTrack&&!isEditing()&&(isBrowser()||TARGET==="reactNative"))return fetch("https://cdn.builder.io/api/v1/track",{method:"POST",body:JSON.stringify({events:[await createEvent(e)]}),headers:{"content-type":"application/json"},mode:"cors"}).catch(t=>{console.error("Failed to track: ",t)})}const track=e=>_track({...e,canTrack:!0});function round(e){return Math.round(e*1e3)/1e3}const findParentElement=(e,t,n=!0)=>{if(!(e instanceof HTMLElement))return null;let o=n?e:e.parentElement;do{if(!o)return null;if(t(o))return o}while(o=o.parentElement);return null},findBuilderParent=e=>findParentElement(e,t=>{const n=t.getAttribute("builder-id")||t.id;return(n==null?void 0:n.indexOf("builder-"))===0}),computeOffset=({event:e,target:t})=>{const n=t.getBoundingClientRect(),o=e.clientX-n.left,r=e.clientY-n.top,i=round(o/n.width),a=round(r/n.height);return{x:i,y:a}},getInteractionPropertiesForEvent=e=>{const t=e.target,n=t&&findBuilderParent(t),o=(n==null?void 0:n.getAttribute("builder-id"))||(n==null?void 0:n.id);return{targetBuilderElement:o||void 0,metadata:{targetOffset:t?computeOffset({event:e,target:t}):void 0,builderTargetOffset:n?computeOffset({event:e,target:n}):void 0,builderElementIndex:n&&o?[].slice.call(document.getElementsByClassName(o)).indexOf(n):void 0}}},DEFAULT_TRUSTED_HOSTS=["*.beta.builder.io","beta.builder.io","builder.io","localhost","qa.builder.io"];function isFromTrustedHost(e,t){const n=new URL(t.origin),o=n.hostname;return(e||DEFAULT_TRUSTED_HOSTS).findIndex(r=>r.startsWith("*.")?o.endsWith(r.slice(1)):r===o)>-1}const SDK_VERSION="0.13.1",registry={};function register(e,t){let n=registry[e];if(n||(n=registry[e]=[]),n.push(t),isBrowser()){const o={type:"builder.register",data:{type:e,info:t}};try{parent.postMessage(o,"*"),parent!==window&&window.postMessage(o,"*")}catch(r){console.debug("Could not postmessage",r)}}}const registerInsertMenu=()=>{register("insertMenu",{name:"_default",default:!0,items:[{name:"Box"},{name:"Text"},{name:"Image"},{name:"Columns"},{name:"Core:Section"},{name:"Core:Button"},{name:"Embed"},{name:"Custom Code"}]})};let isSetupForEditing=!1;const setupBrowserForEditing=(e={})=>{var t,n;isSetupForEditing||(isSetupForEditing=!0,isBrowser()&&((t=window.parent)==null||t.postMessage({type:"builder.sdkInfo",data:{target:TARGET,version:SDK_VERSION,supportsPatchUpdates:!1,supportsAddBlockScoping:!0,supportsCustomBreakpoints:!0}},"*"),(n=window.parent)==null||n.postMessage({type:"builder.updateContent",data:{options:e}},"*"),window.addEventListener("message",o=>{var i,a;if(!isFromTrustedHost(e.trustedHosts,o))return;const{data:r}=o;if(r!=null&&r.type)switch(r.type){case"builder.evaluate":{const s=r.data.text,c=r.data.arguments||[],m=r.data.id,f=new Function(s);let p,g=null;try{p=f.apply(null,c)}catch(u){g=u}g?(i=window.parent)==null||i.postMessage({type:"builder.evaluateError",data:{id:m,error:g.message}},"*"):p&&typeof p.then=="function"?p.then(u=>{var l;(l=window.parent)==null||l.postMessage({type:"builder.evaluateResult",data:{id:m,result:u}},"*")}).catch(console.error):(a=window.parent)==null||a.postMessage({type:"builder.evaluateResult",data:{result:p,id:m}},"*");break}}})))},createEditorListener=({model:e,trustedHosts:t,callbacks:n})=>o=>{if(!isFromTrustedHost(t,o))return;const{data:r}=o;if(r)switch(r.type){case"builder.configureSdk":{n.configureSdk(r.data);break}case"builder.triggerAnimation":{n.animation(r.data);break}case"builder.contentUpdate":{const i=r.data,a=i.key||i.alias||i.entry||i.modelName,s=i.data;a===e&&n.contentUpdate(s);break}}},subscribeToEditor=(e,t,n)=>{if(!isBrowser)return logger.warn("`subscribeToEditor` only works in the browser. It currently seems to be running on the server."),()=>{};setupBrowserForEditing();const o=createEditorListener({callbacks:{contentUpdate:t,animation:()=>{},configureSdk:()=>{}},model:e,trustedHosts:n==null?void 0:n.trustedHosts});return window.addEventListener("message",o),()=>{window.removeEventListener("message",o)}};function assign(e,...t){const n=Object(e);for(let o=1;o<arguments.length;o++){const r=arguments[o];if(r!=null)for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])}return n}const camelCaseToKebabCase=e=>e?e.replace(/([A-Z])/g,t=>`-${t[0].toLowerCase()}`):"";function warnElementNotPresent(e){console.warn(`Cannot animate element: element with ID ${e} not found!`)}function augmentAnimation(e,t){const n=getAllStylesUsed(e),o=getComputedStyle(t),r=e.steps[0].styles,i=e.steps[e.steps.length-1].styles,a=[r,i];for(const s of a)for(const c of n)c in s||(s[c]=o[c])}function getAllStylesUsed(e){const t=[];for(const n of e.steps)for(const o in n.styles)t.indexOf(o)===-1&&t.push(o);return t}function triggerAnimation(e){const t=Array.prototype.slice.call(document.getElementsByClassName(e.elementId||e.id||""));if(!t.length){warnElementNotPresent(e.elementId||e.id||"");return}Array.from(t).forEach(n=>{augmentAnimation(e,n),n.style.transition="none",n.style.transitionDelay="0",assign(n.style,e.steps[0].styles),setTimeout(()=>{n.style.transition=`all ${e.duration}s ${camelCaseToKebabCase(e.easing)}`,e.delay&&(n.style.transitionDelay=e.delay+"s"),assign(n.style,e.steps[1].styles),setTimeout(()=>{n.style.transition="",n.style.transitionDelay=""},(e.delay||0)*1e3+e.duration*1e3+100)})})}const getCssFromFont=e=>{var i;const t=e.family+(e.kind&&!e.kind.includes("#")?", "+e.kind:""),n=t.split(",")[0],o=e.fileUrl??((i=e==null?void 0:e.files)==null?void 0:i.regular);let r="";if(o&&t&&n&&(r+=`
|
|
175
175
|
@font-face {
|
|
176
176
|
font-family: "${t}";
|
|
177
177
|
src: local("${n}"), url('${o}') format('woff2');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LRUCache } from "lru-cache";
|
|
2
2
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, D as DynamicRenderer, b as Button, C as CustomCode, E as Embed, F as FragmentComponent, c as Image, d as ImgComponent, S as SectionComponent, V as Video, e as EnableEditor } from "./USE_CLIENT_BUNDLE-
|
|
3
|
+
import { I as InteractiveElement, B as BlockWrapper, a as BlocksWrapper, D as DynamicRenderer, b as Button, C as CustomCode, E as Embed, F as FragmentComponent, c as Image, d as ImgComponent, S as SectionComponent, V as Video, e as EnableEditor } from "./USE_CLIENT_BUNDLE-ea8e582d.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "next/navigation";
|
|
6
6
|
const EMPTY_HTML_ELEMENTS = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), isEmptyElement = (e) => typeof e == "string" && EMPTY_HTML_ELEMENTS.has(e.toLowerCase()), TARGET = "rsc", getClassPropName = () => {
|
|
@@ -888,7 +888,7 @@ function Columns(e) {
|
|
|
888
888
|
/* @__PURE__ */ jsxs(
|
|
889
889
|
"div",
|
|
890
890
|
{
|
|
891
|
-
className: `builder-columns ${e.builderBlock.id}-breakpoints div-
|
|
891
|
+
className: `builder-columns ${e.builderBlock.id}-breakpoints div-febc5ea6`,
|
|
892
892
|
style: m(),
|
|
893
893
|
children: [
|
|
894
894
|
/* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(InlinedStyles, { styles: g() }) }),
|
|
@@ -924,7 +924,7 @@ function Columns(e) {
|
|
|
924
924
|
]
|
|
925
925
|
}
|
|
926
926
|
),
|
|
927
|
-
/* @__PURE__ */ jsx("style", { children: `.div-
|
|
927
|
+
/* @__PURE__ */ jsx("style", { children: `.div-febc5ea6 {
|
|
928
928
|
display: flex;
|
|
929
929
|
line-height: normal;
|
|
930
930
|
}` })
|
|
@@ -1970,8 +1970,8 @@ const DEFAULT_API_VERSION = "v3", BUILDER_SEARCHPARAMS_PREFIX = "builder.", BUIL
|
|
|
1970
1970
|
} = e;
|
|
1971
1971
|
if (!a)
|
|
1972
1972
|
throw new Error("Missing API key");
|
|
1973
|
-
if (!["
|
|
1974
|
-
throw new Error(`Invalid apiVersion: expected '
|
|
1973
|
+
if (!["v3"].includes(f))
|
|
1974
|
+
throw new Error(`Invalid apiVersion: expected 'v3', received '${f}'`);
|
|
1975
1975
|
(e.limit === void 0 || e.limit > 1) && !("noTraverse" in e) && (t = !0);
|
|
1976
1976
|
const h = new URL(`https://cdn.builder.io/api/${f}/content/${i}?apiKey=${a}&limit=${n}&noTraverse=${t}&includeRefs=${s}${m ? `&locale=${m}` : ""}${c ? `&enrich=${c}` : ""}`);
|
|
1977
1977
|
if (h.searchParams.set("omit", g || "meta.componentsUsed"), p && h.searchParams.set("fields", p), Number.isFinite(d) && d > -1 && h.searchParams.set("offset", String(Math.floor(d))), typeof y == "boolean" && h.searchParams.set("includeUnpublished", String(y)), l && isPositiveNumber(l) && h.searchParams.set("cacheSeconds", String(l)), u && isPositiveNumber(u) && h.searchParams.set("staleCacheSeconds", String(u)), b) {
|
|
@@ -2236,7 +2236,7 @@ function isFromTrustedHost(e, t) {
|
|
|
2236
2236
|
const n = new URL(t.origin), o = n.hostname;
|
|
2237
2237
|
return (e || DEFAULT_TRUSTED_HOSTS).findIndex((r) => r.startsWith("*.") ? o.endsWith(r.slice(1)) : r === o) > -1;
|
|
2238
2238
|
}
|
|
2239
|
-
const SDK_VERSION = "0.
|
|
2239
|
+
const SDK_VERSION = "0.13.1", registry = {};
|
|
2240
2240
|
function register(e, t) {
|
|
2241
2241
|
let n = registry[e];
|
|
2242
2242
|
if (n || (n = registry[e] = []), n.push(t), isBrowser()) {
|
package/lib/node/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bundle-1f2f3033.cjs"),t=require("./USE_CLIENT_BUNDLE-d6e6f95b.cjs");require("lru-cache");require("react/jsx-runtime");require("react");require("next/navigation");require("./USE_SERVER_BUNDLE-78694df8.cjs");exports.Blocks=e.Blocks;exports.Columns=e.Columns;exports.Content=e.ContentVariants;exports.RenderBlocks=e.RenderBlocks;exports.RenderContent=e.RenderContent;exports.Symbol=e.Symbol;exports.Text=e.Text;exports._processContentResult=e._processContentResult;exports.createRegisterComponentMessage=e.createRegisterComponentMessage;exports.fetchBuilderProps=e.fetchBuilderProps;exports.fetchEntries=e.fetchEntries;exports.fetchOneEntry=e.fetchOneEntry;exports.getAllContent=e.getAllContent;exports.getBuilderSearchParams=e.getBuilderSearchParams;exports.getContent=e.getContent;exports.isEditing=e.isEditing;exports.isPreviewing=e.isPreviewing;exports.register=e.register;exports.setEditorSettings=e.setEditorSettings;exports.subscribeToEditor=e.subscribeToEditor;exports.track=e.track;exports.Button=t.Button;exports.Fragment=t.FragmentComponent;exports.Image=t.Image;exports.Section=t.SectionComponent;exports.Video=t.Video;
|
package/lib/node/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as i, x as c, C as m, R as g, w as p, S as l, T as d, G as C, p as u, F as B, H as E, q as S, I as f, A as R, J as b, c as h, j as x, y as k, z as y, E as F, D as P } from "./bundle-
|
|
2
|
-
import { b as w, F as A, c as I, S as V, V as j } from "./USE_CLIENT_BUNDLE-
|
|
1
|
+
import { B as i, x as c, C as m, R as g, w as p, S as l, T as d, G as C, p as u, F as B, H as E, q as S, I as f, A as R, J as b, c as h, j as x, y as k, z as y, E as F, D as P } from "./bundle-457b4e1d.js";
|
|
2
|
+
import { b as w, F as A, c as I, S as V, V as j } from "./USE_CLIENT_BUNDLE-ea8e582d.js";
|
|
3
3
|
import "lru-cache";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "react";
|
|
6
6
|
import "next/navigation";
|
|
7
|
-
import "./USE_SERVER_BUNDLE-
|
|
7
|
+
import "./USE_SERVER_BUNDLE-18bb0dcb.js";
|
|
8
8
|
export {
|
|
9
9
|
i as Blocks,
|
|
10
10
|
w as Button,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-react-nextjs",
|
|
3
3
|
"description": "Builder.io RSC SDK for NextJS App Directory",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.13.1",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/nextjs",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.13.1";
|
|
@@ -76,9 +76,9 @@ export interface GetContentOptions {
|
|
|
76
76
|
/**
|
|
77
77
|
* If provided, sets the Builder API version used to fetch content.
|
|
78
78
|
*
|
|
79
|
-
*
|
|
79
|
+
* Currently, the only available API version is `v3`.
|
|
80
80
|
*/
|
|
81
|
-
apiVersion?: '
|
|
81
|
+
apiVersion?: 'v3';
|
|
82
82
|
/**
|
|
83
83
|
* Only include these fields.
|
|
84
84
|
* Note: 'omit' takes precedence over 'fields'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type ApiVersion = '
|
|
1
|
+
export type ApiVersion = 'v3';
|
|
2
2
|
export declare const DEFAULT_API_VERSION: ApiVersion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_VERSION = "0.13.1";
|
|
@@ -76,9 +76,9 @@ export interface GetContentOptions {
|
|
|
76
76
|
/**
|
|
77
77
|
* If provided, sets the Builder API version used to fetch content.
|
|
78
78
|
*
|
|
79
|
-
*
|
|
79
|
+
* Currently, the only available API version is `v3`.
|
|
80
80
|
*/
|
|
81
|
-
apiVersion?: '
|
|
81
|
+
apiVersion?: 'v3';
|
|
82
82
|
/**
|
|
83
83
|
* Only include these fields.
|
|
84
84
|
* Note: 'omit' takes precedence over 'fields'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type ApiVersion = '
|
|
1
|
+
export type ApiVersion = 'v3';
|
|
2
2
|
export declare const DEFAULT_API_VERSION: ApiVersion;
|