@billgangcom/theme-lib 1.8.1 → 1.9.0

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.
@@ -27,11 +27,11 @@ Check the top-level render call using <`+E+">.")}return v}}function Er(c,v){{if(
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,mt,le,_s,le),_r[le+mt]=!0}}return c===n?bs(q):ys(q),q}}function Ss(c,v,E){return Tr(c,v,E,!0)}function ws(c,v,E){return Tr(c,v,E,!1)}var Es=ws,Os=Ss;xe.Fragment=n,xe.jsx=Es,xe.jsxs=Os}()),xe}process.env.NODE_ENV==="production"?It.exports=Ds():It.exports=Cs();var m=It.exports;const xr=t=>{let e;const r=new Set,n=(l,u)=>{const h=typeof l=="function"?l(e):l;if(!Object.is(h,e)){const S=e;e=u??(typeof h!="object"||h===null)?h:Object.assign({},e,h),r.forEach(y=>y(e,S))}},s=()=>e,a={setState:n,getState:s,getInitialState:()=>d,subscribe:l=>(r.add(l),()=>r.delete(l))},d=e=t(n,s,a);return a},xs=t=>t?xr(t):xr,Ps=t=>t;function Is(t,e=Ps){const r=D.useSyncExternalStore(t.subscribe,()=>e(t.getState()),()=>e(t.getInitialState()));return D.useDebugValue(r),r}const Pr=t=>{const e=xs(t),r=n=>Is(e,n);return Object.assign(r,e),r},Y=t=>t?Pr(t):Pr,Rs=Y(t=>({blocks:{},setBlocks:e=>t(()=>({blocks:e})),activeBlock:null,setActiveBlock:e=>t(()=>({activeBlock:e})),sourceBlocks:{},setSourceBlocks:e=>t(()=>({sourceBlocks:e}))})),Ns=Y(t=>({currentDevice:"desktop",setCurrentDevice:e=>t(()=>({currentDevice:e}))}));Y(t=>({pageData:null,setPageData:e=>t(()=>({pageData:e}))}));const on=[{icon:"layers",name:"Layers"},{icon:"plus",name:"Add"},{icon:"palette",name:"Theme"},{icon:"settings",name:"Settings"}],ks=Array.from({length:122/2+1},(t,e)=>String(6+e*2)),js=["100","200","300","400","500","600","700","800","900"],As=["home","reviews","faqs","contact","product","ticket","login"],Ms={home:{path:"/",name:"home",icon:"house",seo:{description:"",title:""},visibility:"public"},product:{path:"/product",name:"product",icon:"squares",seo:{description:"",title:""},visibility:"public"},faqs:{path:"/faqs",name:"faqs",icon:"faqs",seo:{description:"",title:""},visibility:"public"},reviews:{path:"/reviews",name:"reviews",icon:"star",seo:{description:"",title:""},visibility:"public"},contact:{path:"/contact",name:"contact",icon:"chat",seo:{description:"",title:""},visibility:"public"},ticket:{path:"/ticket",name:"ticket",icon:"ticket",seo:{description:"",title:""},visibility:"public"},login:{path:"/login",name:"login",icon:"user-circle-gear",seo:{description:"",title:""},visibility:"public"}},Ls=Y(t=>({activeBlock:on[0],setActiveBlock:e=>t(()=>({activeBlock:e}))}));function qs(t,e){let r;try{r=t()}catch{return}return{getItem:s=>{var o;const i=d=>d===null?null:JSON.parse(d,void 0),a=(o=r.getItem(s))!=null?o:null;return a instanceof Promise?a.then(i):i(a)},setItem:(s,o)=>r.setItem(s,JSON.stringify(o,void 0)),removeItem:s=>r.removeItem(s)}}const Rt=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return Rt(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Rt(n)(r)}}}},Bs=(t,e)=>(r,n,s)=>{let o={storage:qs(()=>localStorage),partialize:p=>p,version:0,merge:(p,b)=>({...b,...p}),...e},i=!1;const a=new Set,d=new Set;let l=o.storage;if(!l)return t((...p)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...p)},n,s);const u=()=>{const p=o.partialize({...n()});return l.setItem(o.name,{state:p,version:o.version})},h=s.setState;s.setState=(p,b)=>{h(p,b),u()};const S=t((...p)=>{r(...p),u()},n,s);s.getInitialState=()=>S;let y;const g=()=>{var p,b;if(!l)return;i=!1,a.forEach(w=>{var _;return w((_=n())!=null?_:S)});const O=((b=o.onRehydrateStorage)==null?void 0:b.call(o,(p=n())!=null?p:S))||void 0;return Rt(l.getItem.bind(l))(o.name).then(w=>{if(w)if(typeof w.version=="number"&&w.version!==o.version){if(o.migrate)return[!0,o.migrate(w.state,w.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,w.state];return[!1,void 0]}).then(w=>{var _;const[k,M]=w;if(y=o.merge(M,(_=n())!=null?_:S),r(y,!0),k)return u()}).then(()=>{O==null||O(y,void 0),y=n(),i=!0,d.forEach(w=>w(y))}).catch(w=>{O==null||O(void 0,w)})};return s.persist={setOptions:p=>{o={...o,...p},p.storage&&(l=p.storage)},clearStorage:()=>{l==null||l.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>g(),hasHydrated:()=>i,onHydrate:p=>(a.add(p),()=>{a.delete(p)}),onFinishHydration:p=>(d.add(p),()=>{d.delete(p)})},o.skipHydration||g(),y||S},Ke=Bs,Fs=Y(Ke(t=>({onPreview:!1,setOnPreview:e=>t(()=>({onPreview:e})),activeBlock:null,setActiveBlock:e=>t(()=>({activeBlock:e}))}),{name:"preview-storage",partialize:t=>{const{onPreview:e}=t;return{onPreview:e}}}));var F=[];for(var vt=0;vt<256;++vt)F.push((vt+256).toString(16).slice(1));function Us(t,e=0){return(F[t[e+0]]+F[t[e+1]]+F[t[e+2]]+F[t[e+3]]+"-"+F[t[e+4]]+F[t[e+5]]+"-"+F[t[e+6]]+F[t[e+7]]+"-"+F[t[e+8]]+F[t[e+9]]+"-"+F[t[e+10]]+F[t[e+11]]+F[t[e+12]]+F[t[e+13]]+F[t[e+14]]+F[t[e+15]]).toLowerCase()}var Be,Hs=new Uint8Array(16);function $s(){if(!Be&&(Be=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Be))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Be(Hs)}var Vs=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Ir={randomUUID:Vs};function Ye(t,e,r){if(Ir.randomUUID&&!e&&!t)return Ir.randomUUID();t=t||{};var n=t.random||(t.rng||$s)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Us(n)}const zs=Y(Ke((t,e)=>({header:null,blocks:{home:{},contact:{},product:{},faqs:{},reviews:{},ticket:{},login:{}},footer:null,currentBlock:null,positionBlock:null,setHeader:r=>{t({header:r})},setFooter:r=>{t({footer:r})},createPage:r=>{const n=e().blocks;n[r]={},t({blocks:n})},deletePage:r=>{const n=e().blocks;delete n[r],t({blocks:n})},updatePage:(r,n)=>{const s=e().blocks;if(s[n])return;const o=s[r];delete s[r],s[n]=o,t({blocks:s})},setCurrentBlock:r=>{t({currentBlock:r})},setPositionBlock:r=>{t({positionBlock:r})},addBlock:(r,n)=>{const s=e().blocks,o=s[r]||{},i=e().positionBlock,a=Ye(),d=Object.keys(o);if(i===null||i>=d.length)o[a]={name:n.name,value:{...n.value}},t({blocks:{...s,[r]:o}});else{const l={name:n.name,value:{...n.value}},u=d.slice(0,i),h=d.slice(i),S={...u.reduce((y,g)=>(y[g]=o[g],y),{}),[a]:l,...h.reduce((y,g)=>(y[g]=o[g],y),{})};t({blocks:{...s,[r]:S}})}},editBlock:(r,n,s)=>{const o=e().blocks,i=o[r]||{};i[n]={name:s.name,value:{...s.value}},t({blocks:{...o,[r]:i}})},removeBlock:(r,n)=>{const s=e().blocks,o=s[r]||{};delete o[n],t({blocks:{...s,[r]:o}})},moveBlock:(r,n,s)=>t(o=>{const i={...o.blocks[r]},a=Object.keys(i),[d]=a.splice(n,1);a.splice(s,0,d);const l=a.reduce((u,h)=>(u[h]=i[h],u),{});return{blocks:{...o.blocks,[r]:l}}}),duplicateBlock:(r,n)=>{const{blocks:s}=e(),o=s[r],i=o[n],a=Ye(),d={name:i.name,value:{...i.value}},l=Object.keys(o),u=l.indexOf(n),h=l.slice(0,u+1),S=l.slice(u+1),y={...h.reduce((g,p)=>(g[p]=o[p],g),{}),[a]:d,...S.reduce((g,p)=>(g[p]=o[p],g),{})};t({blocks:{...s,[r]:y}})}}),{name:"layers-storage",partialize:t=>{const{blocks:e,header:r,footer:n}=t;return{blocks:e,header:r,footer:n}}})),an=Y((t,e)=>({isModalVisible:!1,hoverBlockId:null,isMouseOverModal:!1,hideTimeout:null,showModal:r=>{e().hideTimeout&&clearTimeout(e().hideTimeout),t({isModalVisible:!0,hoverBlockId:r})},hideModal:()=>{t({isModalVisible:!1,hoverBlockId:null})},startHideTimeout:()=>{if(!e().isMouseOverModal){const r=setTimeout(()=>{t({isModalVisible:!1,hoverBlockId:null})},500);t({hideTimeout:r})}},clearHideTimeout:()=>{e().hideTimeout&&(clearTimeout(e().hideTimeout),t({hideTimeout:null}))},setMouseOverModal:r=>{t({isMouseOverModal:r})},isPreviewVisible:!1,showPreview:r=>{t({isPreviewVisible:!0,hoverBlockId:r})},hidePreview:()=>{t({isPreviewVisible:!1,hoverBlockId:null})}})),Ws=Y(t=>({activeBlock:null,setActiveBlock:e=>t(()=>({activeBlock:e})),activeFont:null,setActiveFont:e=>t(()=>({activeFont:e})),themeSettings:{colors:{brand:{primary:"#fefefe",secondary:"#fefefe",toner:"#ffffff"},background:{primary:"#fefefe",secondary:"#000000"},text_icons:{primary:"#000000",secondary:"#fefefe",tertiary:"#fefefe",disabled:"#ffffff"},lines:{divider:"#000000",border:"#fefefe"},others:{link:"#000000"}},fonts:{heading:{h1:{font:"Archivo",weight:"900",size:48},h2:{font:"Archivo",weight:"700",size:32},h3:{font:"Archivo",weight:"600",size:24},h4:{font:"Archivo",weight:"500",size:16},h5:{font:"Archivo",weight:"400",size:16},h6:{font:"Archivo",weight:"400",size:16}},paragraph:{text:{font:"Archivo",size:48,weight:"400"}}},borders:{radius:52,thickness:52},buttons:{size:26,alignment:"left",radius:32,height:40},inputs:{general:{height:48,name:"Style Name",size:48,color:"black"},field:{active:!0,color:"black",opacity:40},border:{active:!0,style:"solid",radius:0,thickness:0,color:"black"},label:{height:48,size:48,color:"black",alignment:"left"}}},updateColor:(e,r,n)=>t(s=>{const o={...s.themeSettings.colors,[e]:{...s.themeSettings.colors[e],[r]:n}};return{themeSettings:{...s.themeSettings,colors:o}}}),updateFont:(e,r,n,s)=>t(o=>{const i={...o.themeSettings.fonts,[e]:{...o.themeSettings.fonts[e],[r]:{...o.themeSettings.fonts[e][r],[n]:s}}};return{themeSettings:{...o.themeSettings,fonts:i}}}),updateBorder:(e,r)=>t(n=>{const s={...n.themeSettings.borders,[e]:r};return{themeSettings:{...n.themeSettings,borders:s}}}),updateButton:(e,r)=>t(n=>{const s={...n.themeSettings.buttons,[e]:r};return{themeSettings:{...n.themeSettings,buttons:s}}}),updateInput:(e,r,n)=>t(s=>({themeSettings:{...s.themeSettings,inputs:{...s.themeSettings.inputs,[e]:{...s.themeSettings.inputs[e],[n]:r}}}}))})),Ys=Y(Ke(t=>({fonts:[],setFonts:e=>t(()=>({fonts:e}))}),{name:"fonts-storage"})),Js=Y(t=>({settings:null,setSettings:e=>t(()=>({settings:e}))})),cn=Y()(t=>({color:"default",initialColor:"",setInitialColor:e=>t(()=>({initialColor:e})),colorChange:()=>{},update:()=>{},activeLabel:null,modalPosition:{left:0,top:0},showModal:!1,dragging:!1,hue:0,saturation:100,brightness:100,setModalPosition:e=>t(()=>({modalPosition:e})),setHue:e=>t(()=>({hue:e})),setSaturation:e=>t(()=>({saturation:e})),setBrightness:e=>t(()=>({brightness:e})),setShowModal:e=>t(()=>({showModal:e})),setDragging:e=>t(()=>({dragging:e})),setActiveLabel:e=>t(()=>({activeLabel:e})),setColor:e=>t(()=>({color:e})),setUpdate:e=>t(()=>({update:e})),setColorChange:e=>t(()=>({colorChange:e}))})),Gs=Y(Ke((t,e)=>({pages:Ms,currentPage:"home",pageContext:{listings:void 0,products:void 0,reviews:void 0,categories:void 0,faqs:void 0,general:void 0},isOpenModal:!1,isOpenSelectModal:!1,isEdit:!1,editedPage:null,setEditedPage:r=>t(()=>({editedPage:r})),setCurrentPage:r=>t(()=>({currentPage:r})),setPageContext:r=>t(()=>({pageContext:r})),setIsOpenModal:r=>t(()=>({isOpenModal:r})),setIsOpenSelectModal:r=>t(()=>({isOpenSelectModal:r})),setIsEdit:r=>t(()=>({isEdit:r})),createPage:r=>{const n=e().pages,s=Ye();n[s]=r,t({pages:n})},updatePage:(r,n)=>{const s=e().pages;s[r]={...n},t({pages:s})},deletePage:r=>{const n=e().pages;delete n[r],t({pages:n})}}),{name:"pages-storage",partialize:t=>{const{pages:e}=t;return{pages:e}}})),zt=Y(t=>({openModal:!1,setOpenModal:e=>t(()=>({openModal:e})),onChange:null,setOnChange:e=>t(()=>({onChange:e}))})),Ks=(t,e,r)=>{const n=t[e];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((s,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==r?". Note that variables only represent file names one level deep.":""))))})},Xs="_icon_bsuj2_1",Qs="_hoverable_bsuj2_5",Zs="_rotated_bsuj2_9",yt={icon:Xs,hoverable:Qs,rotated:Zs};var ln={exports:{}};/*!
30
+ <%s key={someKey} {...props} />`,mt,le,_s,le),_r[le+mt]=!0}}return c===n?bs(q):ys(q),q}}function Ss(c,v,E){return Tr(c,v,E,!0)}function ws(c,v,E){return Tr(c,v,E,!1)}var Es=ws,Os=Ss;xe.Fragment=n,xe.jsx=Es,xe.jsxs=Os}()),xe}process.env.NODE_ENV==="production"?It.exports=Ds():It.exports=Cs();var m=It.exports;const xr=t=>{let e;const r=new Set,n=(l,u)=>{const h=typeof l=="function"?l(e):l;if(!Object.is(h,e)){const S=e;e=u??(typeof h!="object"||h===null)?h:Object.assign({},e,h),r.forEach(y=>y(e,S))}},s=()=>e,a={setState:n,getState:s,getInitialState:()=>d,subscribe:l=>(r.add(l),()=>r.delete(l))},d=e=t(n,s,a);return a},xs=t=>t?xr(t):xr,Ps=t=>t;function Is(t,e=Ps){const r=D.useSyncExternalStore(t.subscribe,()=>e(t.getState()),()=>e(t.getInitialState()));return D.useDebugValue(r),r}const Pr=t=>{const e=xs(t),r=n=>Is(e,n);return Object.assign(r,e),r},Y=t=>t?Pr(t):Pr,Rs=Y(t=>({blocks:{},setBlocks:e=>t(()=>({blocks:e})),activeBlock:null,setActiveBlock:e=>t(()=>({activeBlock:e})),sourceBlocks:{},setSourceBlocks:e=>t(()=>({sourceBlocks:e}))})),Ns=Y(t=>({currentDevice:"desktop",setCurrentDevice:e=>t(()=>({currentDevice:e}))}));Y(t=>({pageData:null,setPageData:e=>t(()=>({pageData:e}))}));const on=[{icon:"layers",name:"Layers"},{icon:"plus",name:"Add"},{icon:"palette",name:"Theme"},{icon:"settings",name:"Settings"}],ks=Array.from({length:122/2+1},(t,e)=>String(6+e*2)),js=["100","200","300","400","500","600","700","800","900"],As=["home","reviews","faqs","contact","product","ticket","login"],Ms={home:{path:"/",name:"home",icon:"house",seo:{description:"",title:""},visibility:"public"},product:{path:"/product",name:"product",icon:"squares",seo:{description:"",title:""},visibility:"public"},faqs:{path:"/faqs",name:"faqs",icon:"faqs",seo:{description:"",title:""},visibility:"public"},reviews:{path:"/reviews",name:"reviews",icon:"star",seo:{description:"",title:""},visibility:"public"},contact:{path:"/contact",name:"contact",icon:"chat",seo:{description:"",title:""},visibility:"public"},ticket:{path:"/ticket",name:"ticket",icon:"ticket",seo:{description:"",title:""},visibility:"public"},login:{path:"/login",name:"login",icon:"user-circle-gear",seo:{description:"",title:""},visibility:"public"}},Ls=Y(t=>({activeBlock:on[0],setActiveBlock:e=>t(()=>({activeBlock:e}))}));function qs(t,e){let r;try{r=t()}catch{return}return{getItem:s=>{var o;const i=d=>d===null?null:JSON.parse(d,void 0),a=(o=r.getItem(s))!=null?o:null;return a instanceof Promise?a.then(i):i(a)},setItem:(s,o)=>r.setItem(s,JSON.stringify(o,void 0)),removeItem:s=>r.removeItem(s)}}const Rt=t=>e=>{try{const r=t(e);return r instanceof Promise?r:{then(n){return Rt(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return Rt(n)(r)}}}},Bs=(t,e)=>(r,n,s)=>{let o={storage:qs(()=>localStorage),partialize:p=>p,version:0,merge:(p,b)=>({...b,...p}),...e},i=!1;const a=new Set,d=new Set;let l=o.storage;if(!l)return t((...p)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),r(...p)},n,s);const u=()=>{const p=o.partialize({...n()});return l.setItem(o.name,{state:p,version:o.version})},h=s.setState;s.setState=(p,b)=>{h(p,b),u()};const S=t((...p)=>{r(...p),u()},n,s);s.getInitialState=()=>S;let y;const g=()=>{var p,b;if(!l)return;i=!1,a.forEach(w=>{var _;return w((_=n())!=null?_:S)});const O=((b=o.onRehydrateStorage)==null?void 0:b.call(o,(p=n())!=null?p:S))||void 0;return Rt(l.getItem.bind(l))(o.name).then(w=>{if(w)if(typeof w.version=="number"&&w.version!==o.version){if(o.migrate)return[!0,o.migrate(w.state,w.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,w.state];return[!1,void 0]}).then(w=>{var _;const[k,M]=w;if(y=o.merge(M,(_=n())!=null?_:S),r(y,!0),k)return u()}).then(()=>{O==null||O(y,void 0),y=n(),i=!0,d.forEach(w=>w(y))}).catch(w=>{O==null||O(void 0,w)})};return s.persist={setOptions:p=>{o={...o,...p},p.storage&&(l=p.storage)},clearStorage:()=>{l==null||l.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>g(),hasHydrated:()=>i,onHydrate:p=>(a.add(p),()=>{a.delete(p)}),onFinishHydration:p=>(d.add(p),()=>{d.delete(p)})},o.skipHydration||g(),y||S},Ke=Bs,Fs=Y(Ke(t=>({onPreview:!1,setOnPreview:e=>t(()=>({onPreview:e})),activeBlock:null,setActiveBlock:e=>t(()=>({activeBlock:e}))}),{name:"preview-storage",partialize:t=>{const{onPreview:e}=t;return{onPreview:e}}}));var F=[];for(var vt=0;vt<256;++vt)F.push((vt+256).toString(16).slice(1));function Us(t,e=0){return(F[t[e+0]]+F[t[e+1]]+F[t[e+2]]+F[t[e+3]]+"-"+F[t[e+4]]+F[t[e+5]]+"-"+F[t[e+6]]+F[t[e+7]]+"-"+F[t[e+8]]+F[t[e+9]]+"-"+F[t[e+10]]+F[t[e+11]]+F[t[e+12]]+F[t[e+13]]+F[t[e+14]]+F[t[e+15]]).toLowerCase()}var Be,Hs=new Uint8Array(16);function $s(){if(!Be&&(Be=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Be))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Be(Hs)}var Vs=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Ir={randomUUID:Vs};function Ye(t,e,r){if(Ir.randomUUID&&!e&&!t)return Ir.randomUUID();t=t||{};var n=t.random||(t.rng||$s)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Us(n)}const zs=Y(Ke((t,e)=>({header:null,blocks:{home:{},contact:{},product:{},faqs:{},reviews:{},ticket:{},login:{}},footer:null,currentBlock:null,positionBlock:null,setHeader:r=>{t({header:r})},setFooter:r=>{t({footer:r})},createPage:r=>{const n=e().blocks;n[r]={},t({blocks:n})},deletePage:r=>{const n=e().blocks;delete n[r],t({blocks:n})},updatePage:(r,n)=>{const s=e().blocks;if(s[n])return;const o=s[r];delete s[r],s[n]=o,t({blocks:s})},setCurrentBlock:r=>{t({currentBlock:r})},setPositionBlock:r=>{t({positionBlock:r})},addBlock:(r,n)=>{const s=e().blocks,o=s[r]||{},i=e().positionBlock,a=Ye();o[a]={name:n.name,value:n.value};const d=Object.keys(o);if(i===null||i>=d.length)t({blocks:{...s,[r]:o}});else{const l={name:n.name,value:{...n.value}},u=d.slice(0,i),h=d.slice(i),S={...u.reduce((y,g)=>(y[g]=o[g],y),{}),[a]:l,...h.reduce((y,g)=>(y[g]=o[g],y),{})};t({blocks:{...s,[r]:S}})}},editBlock:(r,n,s)=>{const o=e().blocks,i=o[r]||{};i[n]={name:s.name,value:{...s.value}},t({blocks:{...o,[r]:i}})},removeBlock:(r,n)=>{const s=e().blocks,o=s[r]||{};delete o[n],t({blocks:{...s,[r]:o}})},moveBlock:(r,n,s)=>t(o=>{const i={...o.blocks[r]},a=Object.keys(i),[d]=a.splice(n,1);a.splice(s,0,d);const l=a.reduce((u,h)=>(u[h]=i[h],u),{});return{blocks:{...o.blocks,[r]:l}}}),duplicateBlock:(r,n)=>{const{blocks:s}=e(),o=s[r],i=o[n],a=Ye(),d={name:i.name,value:{...i.value}},l=Object.keys(o),u=l.indexOf(n),h=l.slice(0,u+1),S=l.slice(u+1),y={...h.reduce((g,p)=>(g[p]=o[p],g),{}),[a]:d,...S.reduce((g,p)=>(g[p]=o[p],g),{})};t({blocks:{...s,[r]:y}})}}),{name:"layers-storage",partialize:t=>{const{blocks:e,header:r,footer:n}=t;return{blocks:e,header:r,footer:n}}})),an=Y((t,e)=>({isModalVisible:!1,hoverBlockId:null,isMouseOverModal:!1,hideTimeout:null,setHoverBlockId:r=>{t({hoverBlockId:r})},showModal:r=>{e().hideTimeout&&clearTimeout(e().hideTimeout),t({isModalVisible:!0,hoverBlockId:r})},hideModal:()=>{t({isModalVisible:!1,hoverBlockId:null})},startHideTimeout:()=>{if(!e().isMouseOverModal){const r=setTimeout(()=>{t({isModalVisible:!1,hoverBlockId:null})},500);t({hideTimeout:r})}},clearHideTimeout:()=>{e().hideTimeout&&(clearTimeout(e().hideTimeout),t({hideTimeout:null}))},setMouseOverModal:r=>{t({isMouseOverModal:r})},isPreviewVisible:!1,showPreview:r=>{t({isPreviewVisible:!0,hoverBlockId:r})},hidePreview:()=>{t({isPreviewVisible:!1,hoverBlockId:null})}})),Ws=Y(t=>({activeBlock:null,setActiveBlock:e=>t(()=>({activeBlock:e})),activeFont:null,setActiveFont:e=>t(()=>({activeFont:e})),themeSettings:{colors:{brand:{primary:"#fefefe",secondary:"#fefefe",toner:"#ffffff"},background:{primary:"#fefefe",secondary:"#000000"},text_icons:{primary:"#000000",secondary:"#fefefe",tertiary:"#fefefe",disabled:"#ffffff"},lines:{divider:"#000000",border:"#fefefe"},others:{link:"#000000"}},fonts:{heading:{h1:{font:"Archivo",weight:"900",size:48},h2:{font:"Archivo",weight:"700",size:32},h3:{font:"Archivo",weight:"600",size:24},h4:{font:"Archivo",weight:"500",size:16},h5:{font:"Archivo",weight:"400",size:16},h6:{font:"Archivo",weight:"400",size:16}},paragraph:{text:{font:"Archivo",size:48,weight:"400"}}},borders:{radius:52,thickness:52},buttons:{size:26,alignment:"left",radius:32,height:40},inputs:{general:{height:48,name:"Style Name",size:48,color:"black"},field:{active:!0,color:"black",opacity:40},border:{active:!0,style:"solid",radius:0,thickness:0,color:"black"},label:{height:48,size:48,color:"black",alignment:"left"}}},updateColor:(e,r,n)=>t(s=>{const o={...s.themeSettings.colors,[e]:{...s.themeSettings.colors[e],[r]:n}};return{themeSettings:{...s.themeSettings,colors:o}}}),updateFont:(e,r,n,s)=>t(o=>{const i={...o.themeSettings.fonts,[e]:{...o.themeSettings.fonts[e],[r]:{...o.themeSettings.fonts[e][r],[n]:s}}};return{themeSettings:{...o.themeSettings,fonts:i}}}),updateBorder:(e,r)=>t(n=>{const s={...n.themeSettings.borders,[e]:r};return{themeSettings:{...n.themeSettings,borders:s}}}),updateButton:(e,r)=>t(n=>{const s={...n.themeSettings.buttons,[e]:r};return{themeSettings:{...n.themeSettings,buttons:s}}}),updateInput:(e,r,n)=>t(s=>({themeSettings:{...s.themeSettings,inputs:{...s.themeSettings.inputs,[e]:{...s.themeSettings.inputs[e],[n]:r}}}}))})),Ys=Y(Ke(t=>({fonts:[],setFonts:e=>t(()=>({fonts:e}))}),{name:"fonts-storage"})),Js=Y(t=>({settings:null,setSettings:e=>t(()=>({settings:e}))})),cn=Y()(t=>({color:"default",initialColor:"",setInitialColor:e=>t(()=>({initialColor:e})),colorChange:()=>{},update:()=>{},activeLabel:null,modalPosition:{left:0,top:0},showModal:!1,dragging:!1,hue:0,saturation:100,brightness:100,setModalPosition:e=>t(()=>({modalPosition:e})),setHue:e=>t(()=>({hue:e})),setSaturation:e=>t(()=>({saturation:e})),setBrightness:e=>t(()=>({brightness:e})),setShowModal:e=>t(()=>({showModal:e})),setDragging:e=>t(()=>({dragging:e})),setActiveLabel:e=>t(()=>({activeLabel:e})),setColor:e=>t(()=>({color:e})),setUpdate:e=>t(()=>({update:e})),setColorChange:e=>t(()=>({colorChange:e}))})),Gs=Y(Ke((t,e)=>({pages:Ms,currentPage:"home",pageContext:{listings:void 0,products:void 0,reviews:void 0,categories:void 0,faqs:void 0,general:void 0},isOpenModal:!1,isOpenSelectModal:!1,isEdit:!1,editedPage:null,setEditedPage:r=>t(()=>({editedPage:r})),setCurrentPage:r=>t(()=>({currentPage:r})),setPageContext:r=>t(()=>({pageContext:r})),setIsOpenModal:r=>t(()=>({isOpenModal:r})),setIsOpenSelectModal:r=>t(()=>({isOpenSelectModal:r})),setIsEdit:r=>t(()=>({isEdit:r})),createPage:r=>{const n=e().pages,s=Ye();n[s]=r,t({pages:n})},updatePage:(r,n)=>{const s=e().pages;s[r]={...n},t({pages:s})},deletePage:r=>{const n=e().pages;delete n[r],t({pages:n})}}),{name:"pages-storage",partialize:t=>{const{pages:e}=t;return{pages:e}}})),zt=Y(t=>({openModal:!1,setOpenModal:e=>t(()=>({openModal:e})),onChange:null,setOnChange:e=>t(()=>({onChange:e}))})),Ks=(t,e,r)=>{const n=t[e];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((s,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==r?". Note that variables only represent file names one level deep.":""))))})},Xs="_icon_bsuj2_1",Qs="_hoverable_bsuj2_5",Zs="_rotated_bsuj2_9",yt={icon:Xs,hoverable:Qs,rotated:Zs};var ln={exports:{}};/*!
31
31
  Copyright (c) 2018 Jed Watson.
32
32
  Licensed under the MIT License (MIT), see
33
33
  http://jedwatson.github.io/classnames
34
- */(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(o=s(o,n(a)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var a in o)e.call(o,a)&&o[a]&&(i=s(i,a));return i}function s(o,i){return i?o?o+" "+i:o+i:o}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(ln);var eo=ln.exports;const z=sn(eo),ne=t=>{const{name:e,iconComponent:r=null,fill:n="currentColor",hoverable:s=!1,onClick:o,className:i,width:a,height:d,rotated:l=!1}=t;console.log(r);const[u,h]=D.useState(()=>r);return D.useEffect(()=>{r||(async()=>{try{const{default:y}=await Ks(Object.assign({"../../../assets/icons/align-bottom.svg":()=>Promise.resolve().then(()=>require("./align-bottom-BNcdAnw9.cjs")),"../../../assets/icons/align-center.svg":()=>Promise.resolve().then(()=>require("./align-center-DEANXdAS.cjs")),"../../../assets/icons/align-left.svg":()=>Promise.resolve().then(()=>require("./align-left-Cm-uab8B.cjs")),"../../../assets/icons/align-right.svg":()=>Promise.resolve().then(()=>require("./align-right-3l34PJVv.cjs")),"../../../assets/icons/align-top.svg":()=>Promise.resolve().then(()=>require("./align-top-BGk9vlUd.cjs")),"../../../assets/icons/arrow-down.svg":()=>Promise.resolve().then(()=>require("./arrow-down-BVZ1P_L9.cjs")),"../../../assets/icons/arrow-left.svg":()=>Promise.resolve().then(()=>require("./arrow-left-CXb5pfjn.cjs")),"../../../assets/icons/arrow-preview-down.svg":()=>Promise.resolve().then(()=>require("./arrow-preview-down-DaEiSgZ5.cjs")),"../../../assets/icons/arrow-preview-up.svg":()=>Promise.resolve().then(()=>require("./arrow-preview-up-DaNjYolK.cjs")),"../../../assets/icons/arrow-right.svg":()=>Promise.resolve().then(()=>require("./arrow-right-QxBPnNiY.cjs")),"../../../assets/icons/arrow-square.svg":()=>Promise.resolve().then(()=>require("./arrow-square-BQEpI5Xn.cjs")),"../../../assets/icons/arrow-up-right.svg":()=>Promise.resolve().then(()=>require("./arrow-up-right-BAHL0rjI.cjs")),"../../../assets/icons/border-dashed.svg":()=>Promise.resolve().then(()=>require("./border-dashed-hzn9HgjT.cjs")),"../../../assets/icons/border-solid.svg":()=>Promise.resolve().then(()=>require("./border-solid-7GLUyhD0.cjs")),"../../../assets/icons/cards.svg":()=>Promise.resolve().then(()=>require("./cards-DsOTH3J4.cjs")),"../../../assets/icons/chat.svg":()=>Promise.resolve().then(()=>require("./chat-B_av70HO.cjs")),"../../../assets/icons/check.svg":()=>Promise.resolve().then(()=>require("./check-b4m73KG0.cjs")),"../../../assets/icons/copy.svg":()=>Promise.resolve().then(()=>require("./copy-D4o494-8.cjs")),"../../../assets/icons/corners-out.svg":()=>Promise.resolve().then(()=>require("./corners-out-4-FEW-w_.cjs")),"../../../assets/icons/desktop.svg":()=>Promise.resolve().then(()=>require("./desktop-BaS7MtSb.cjs")),"../../../assets/icons/drag.svg":()=>Promise.resolve().then(()=>require("./drag-CRprmRb-.cjs")),"../../../assets/icons/faqs.svg":()=>Promise.resolve().then(()=>require("./faqs-BqOuvjUH.cjs")),"../../../assets/icons/file.svg":()=>Promise.resolve().then(()=>require("./file-8wBLPxbL.cjs")),"../../../assets/icons/font.svg":()=>Promise.resolve().then(()=>require("./font-DkMBoXe1.cjs")),"../../../assets/icons/globe.svg":()=>Promise.resolve().then(()=>require("./globe-Dc76Xp4l.cjs")),"../../../assets/icons/heading.svg":()=>Promise.resolve().then(()=>require("./heading-CPq36T7M.cjs")),"../../../assets/icons/house.svg":()=>Promise.resolve().then(()=>require("./house-CZ2u4ZpK.cjs")),"../../../assets/icons/image.svg":()=>Promise.resolve().then(()=>require("./image-Bx3xvWOB.cjs")),"../../../assets/icons/info-circle.svg":()=>Promise.resolve().then(()=>require("./info-circle-DxyEtmA8.cjs")),"../../../assets/icons/layers.svg":()=>Promise.resolve().then(()=>require("./layers-D-nS2yjm.cjs")),"../../../assets/icons/lock.svg":()=>Promise.resolve().then(()=>require("./lock-BmgYa3ZA.cjs")),"../../../assets/icons/mobile.svg":()=>Promise.resolve().then(()=>require("./mobile-jT12AeF2.cjs")),"../../../assets/icons/paint.svg":()=>Promise.resolve().then(()=>require("./paint-onR-PyLb.cjs")),"../../../assets/icons/palette.svg":()=>Promise.resolve().then(()=>require("./palette-BOR3Eq6r.cjs")),"../../../assets/icons/paragraph.svg":()=>Promise.resolve().then(()=>require("./paragraph-BYRArpHX.cjs")),"../../../assets/icons/plus.svg":()=>Promise.resolve().then(()=>require("./plus-7zIw2qu6.cjs")),"../../../assets/icons/radius.svg":()=>Promise.resolve().then(()=>require("./radius-CRLmETG0.cjs")),"../../../assets/icons/redo.svg":()=>Promise.resolve().then(()=>require("./redo-C-M_xJyP.cjs")),"../../../assets/icons/search.svg":()=>Promise.resolve().then(()=>require("./search-kPFRd0TJ.cjs")),"../../../assets/icons/settings.svg":()=>Promise.resolve().then(()=>require("./settings-BqG-9m9d.cjs")),"../../../assets/icons/sign-out.svg":()=>Promise.resolve().then(()=>require("./sign-out-vR-y-Fk7.cjs")),"../../../assets/icons/sliders.svg":()=>Promise.resolve().then(()=>require("./sliders-CsvSCMlf.cjs")),"../../../assets/icons/squares.svg":()=>Promise.resolve().then(()=>require("./squares-BaUyzSBO.cjs")),"../../../assets/icons/star.svg":()=>Promise.resolve().then(()=>require("./star-DX6bHsl_.cjs")),"../../../assets/icons/tablet.svg":()=>Promise.resolve().then(()=>require("./tablet-BvEDp-eu.cjs")),"../../../assets/icons/text-align-center.svg":()=>Promise.resolve().then(()=>require("./text-align-center-DSiXCwfH.cjs")),"../../../assets/icons/text-align-left.svg":()=>Promise.resolve().then(()=>require("./text-align-left-BLq4Pvg1.cjs")),"../../../assets/icons/text-align-right.svg":()=>Promise.resolve().then(()=>require("./text-align-right-B1liYPsk.cjs")),"../../../assets/icons/text-bold.svg":()=>Promise.resolve().then(()=>require("./text-bold-BqCslwM8.cjs")),"../../../assets/icons/text-code.svg":()=>Promise.resolve().then(()=>require("./text-code-CdpLXZEo.cjs")),"../../../assets/icons/text-italic.svg":()=>Promise.resolve().then(()=>require("./text-italic-DgM86CDI.cjs")),"../../../assets/icons/text-strike-through.svg":()=>Promise.resolve().then(()=>require("./text-strike-through-DUrcRZUF.cjs")),"../../../assets/icons/text-underline.svg":()=>Promise.resolve().then(()=>require("./text-underline-CwR9adlS.cjs")),"../../../assets/icons/textbox.svg":()=>Promise.resolve().then(()=>require("./textbox-CeYJQP_1.cjs")),"../../../assets/icons/thickness.svg":()=>Promise.resolve().then(()=>require("./thickness-DSnQHY5N.cjs")),"../../../assets/icons/ticket.svg":()=>Promise.resolve().then(()=>require("./ticket-BFI6P_1c.cjs")),"../../../assets/icons/trash.svg":()=>Promise.resolve().then(()=>require("./trash-Cy0hsvys.cjs")),"../../../assets/icons/undo.svg":()=>Promise.resolve().then(()=>require("./undo-D2eH1UgJ.cjs")),"../../../assets/icons/user-circle-gear.svg":()=>Promise.resolve().then(()=>require("./user-circle-gear-DeMV7Apx.cjs")),"../../../assets/icons/x.svg":()=>Promise.resolve().then(()=>require("./x-DW1UBLIF.cjs")),"../../../assets/icons/zoom-minus.svg":()=>Promise.resolve().then(()=>require("./zoom-minus-TiFzxDhk.cjs"))}),`../../../assets/icons/${e}.svg`,6);h(()=>y)}catch{console.error(`Icon "${e}" not found in assets.`),h(()=>null)}})()},[e,r]),u?m.jsx(u,{fill:n,style:{"--icon-fill":n},className:z(yt.icon,i,{[yt.hoverable]:s,[yt.rotated]:l}),onClick:o,width:a||"24",height:d||"24"}):null},to="_button_gxd35_1",ro="_primary_gxd35_13",no="_secondary_gxd35_18",Fe={button:to,primary:ro,secondary:no},Nt=t=>{const{children:e,onClick:r,style:n,className:s,disabled:o=!1,size:i="m",type:a="Primary"}=t;return m.jsx("button",{className:z(Fe.button,s,{[Fe.primary]:a==="Primary",[Fe.secondary]:a==="Secondary",[Fe.tertiary]:a==="Tertiary"}),onClick:r,style:{...n,fontSize:i==="m"?14:i==="s"?12:16},disabled:o,children:e})},so="_wrapper_wp7u5_1",oo="_label_wp7u5_9",io="_input_wp7u5_17",ao="_required_wp7u5_36",co="_paddingless_wp7u5_40",lo="_content_wp7u5_44",uo="_borderless_wp7u5_50",ue={wrapper:so,label:oo,input:io,required:ao,paddingless:co,content:lo,borderless:uo},fo=t=>{const{onChange:e,style:r,label:n,value:s,type:o,min:i,max:a,placeholder:d,disabled:l=!1,required:u=!1,regex:h,paddingless:S=!1,borderless:y=!1,editable:g=!1}=t,[p,b]=D.useState(!1);function O(_){return Number(_)<0?String(i):_}function w(_){return!u||!h?!0:new RegExp(h).test(_)}return m.jsxs("div",{className:ue.wrapper,children:[n&&m.jsx("label",{className:ue.label,htmlFor:n,children:n}),m.jsxs("div",{className:ue.content,children:[m.jsx("input",{id:n,type:o||"text",onChange:_=>{if(o==="text")e(_.target.value);else{const k=O(_.target.value);e(k)}},value:s,autoComplete:"off",placeholder:d,className:z(ue.input,{[ue.required]:p&&u&&!w(s),[ue.paddingless]:S,[ue.borderless]:y}),min:o==="number"?i:void 0,max:o==="number"?a:void 0,disabled:l,onFocus:()=>b(!0),style:r}),g&&m.jsx("div",{children:m.jsx(ne,{name:"sliders",width:20,height:20,hoverable:!0})})]})]})},ho="_wrapper_1v1ye_1",po="_label_1v1ye_9",go="_select_1v1ye_17",mo="_icon_1v1ye_30",vo="_rotate_1v1ye_34",yo="_content_1v1ye_38",bo="_options_1v1ye_42",So="_option_1v1ye_42",wo="_addon_1v1ye_66",oe={wrapper:ho,label:po,select:go,icon:mo,rotate:vo,content:yo,options:bo,option:So,addon:wo},Eo=t=>{const{leftAddon:e,onChange:r,label:n,value:s,options:o,style:i}=t,[a,d]=D.useState(!1);function l(u){r(u),d(!1)}return D.useEffect(()=>{const u=()=>{d(!1)};return u(),document.body.addEventListener("click",u),()=>{document.body.removeEventListener("click",u)}},[]),m.jsxs("div",{className:oe.wrapper,style:{...i},children:[n&&m.jsx("label",{className:oe.label,htmlFor:n,children:n}),m.jsxs("div",{className:oe.content,onClick:u=>u.stopPropagation(),children:[m.jsxs("div",{className:oe.select,onClick:()=>d(u=>!u),children:[m.jsxs("div",{className:oe.addon,children:[e,m.jsx("span",{children:s})]}),m.jsx(ne,{name:"arrow-down",className:z(oe.icon,{[oe.rotate]:a})})]}),a&&m.jsx("div",{className:oe.options,onClick:()=>d(!1),children:o.filter(u=>u!==s).map(u=>m.jsx("div",{className:oe.option,onClick:()=>l(u),children:u},u))})]})]})},Oo="_wrapper_3w2ni_1",_o="_active_3w2ni_24",To="_toggle_3w2ni_27",Do="_background_3w2ni_39",Co="_padding_3w2ni_43",re={wrapper:Oo,switch:"_switch_3w2ni_13",active:_o,toggle:To,background:Do,padding:Co},xo=t=>{const{onChange:e,style:r,current:n,label:s,hasBackground:o=!1,paddingless:i=!0}=t,[a,d]=D.useState(n),l=()=>{d(u=>!u),e==null||e(!a)};return m.jsx(m.Fragment,{children:s?m.jsxs("div",{className:z(re.wrapper,{[re.background]:o,[re.padding]:!i}),children:[m.jsx("div",{className:z(re.switch,{[re.active]:a}),onClick:l,style:r,children:m.jsx("div",{className:re.toggle})}),m.jsx("span",{className:re.value,children:s})]}):m.jsx("div",{className:z(re.switch,{[re.active]:a}),onClick:l,style:r,children:m.jsx("div",{className:re.toggle})})})},Po="_wrapper_1inu5_1",Io={wrapper:Po},Ro=({children:t})=>{const{hoverBlockId:e,startHideTimeout:r,clearHideTimeout:n,setMouseOverModal:s}=an();return e?m.jsx("div",{className:Io.wrapper,onMouseEnter:()=>{n(),s(!0)},onMouseLeave:()=>{s(!1),r()},children:t}):null},No="_blocks_1op3c_1",ko="_block_1op3c_1",jo="_active_1op3c_18",bt={blocks:No,block:ko,active:jo},Ao=t=>{const{items:e,selectedItem:r,onSelect:n,getIconName:s}=t;return m.jsx("div",{className:bt.blocks,children:e.map(o=>m.jsx("div",{className:z(bt.block,{[bt.active]:r===o}),onClick:()=>n(o),children:m.jsx(ne,{name:s(o),fill:r===o?"#252525":"#757575"})},String(o)))})},Mo="_applyButton_1cqw4_2",Lo="_cancelButton_1cqw4_7",qo="_content_1cqw4_12",Bo="_label_1cqw4_18",Fo="_colorValue_1cqw4_30",Uo="_modal_1cqw4_37",Ho="_colorMap_1cqw4_56",$o="_indicator_1cqw4_64",Vo="_hueSlider_1cqw4_73",zo="_slider_1cqw4_102",Wo="_buttons_1cqw4_107",Yo="_name_1cqw4_113",Jo="_secondary_1cqw4_118",Go="_input_1cqw4_126",fe={applyButton:Mo,cancelButton:Lo,content:qo,label:Bo,colorValue:Fo,modal:Uo,colorMap:Ho,indicator:$o,hueSlider:Vo,slider:zo,buttons:Wo,name:Yo,secondary:Jo,input:Go},Ko=t=>{const{initialColor:e,onChange:r,title:n,labelStyle:s="primary"}=t,[o,i]=D.useState(e),{setActiveLabel:a,setModalPosition:d,setInitialColor:l,setShowModal:u,setUpdate:h,setColor:S,setColorChange:y,colorChange:g}=cn();D.useEffect(()=>{const b=()=>{u(!1),a(null),l(e),h(()=>{}),S(e),y(()=>{})};return document.body.addEventListener("click",b),()=>{document.body.removeEventListener("click",b)}},[]);const p=b=>{b.stopPropagation(),u(!0),y(i),h(r),l(e),S(o);const O=b.currentTarget.getBoundingClientRect(),w=400,_=288,k=10,M=20,B=window.innerHeight-O.bottom,X=O.top,se=window.innerWidth-O.right,ae=O.left;let Z,ee;Z=O.bottom+k+window.scrollY,ee=O.left,(B<w||B<M)&&(X>=w?Z=O.top-w-k+window.scrollY:Z=window.scrollY+(window.innerHeight-w)/2),se<_&&(ae>=_?ee=O.right-_:ee=(window.innerWidth-_)/2),ee<O.right&&ee+_>O.left&&Z<O.bottom&&Z+w>O.top&&(se>=_?ee=O.right+k+100:B>=w?Z=O.bottom+k+window.scrollY:(Z=window.scrollY+(window.innerHeight-w)/2,ee=(window.innerWidth-_)/2)),d({top:Z,left:ee})};return m.jsxs("div",{className:fe.content,children:[m.jsx("span",{className:z(fe.name,{[fe.secondary]:s==="secondary"}),children:n}),m.jsxs("label",{htmlFor:"color",className:fe.label,children:[m.jsx("div",{className:fe.colorValue,style:{background:o},onClick:p}),m.jsx("input",{type:"text",defaultValue:o,value:o,onChange:b=>{const O=b.target.value;r(O),S(O),i(O),g(O)},className:fe.input})]})]})},Xo="_modal_1qb2a_1",Qo={modal:Xo},Zo=t=>{const{close:e,children:r}=t;return D.useEffect(()=>{const n=()=>{e(!1)};return document.body.addEventListener("click",n),()=>{document.body.removeEventListener("click",n)}},[]),m.jsx("div",{className:Qo.modal,children:r})},ei="_wrapper_1qvfi_1",ti="_label_1qvfi_10",ri="_textarea_1qvfi_18",ni="_length_1qvfi_33",Ue={wrapper:ei,label:ti,textarea:ri,length:ni},si=t=>{const{onChange:e,label:r,value:n,maxLength:s,placeholder:o}=t,[i,a]=D.useState(n.length);return m.jsxs("div",{className:Ue.wrapper,children:[r&&m.jsx("label",{className:Ue.label,htmlFor:r,children:r}),m.jsx("textarea",{id:r,defaultValue:n,onChange:d=>{a(d.target.value.length),e(d.target.value)},placeholder:o,className:Ue.textarea,maxLength:s}),s&&m.jsxs("div",{className:Ue.length,children:[i,"/",s]})]})},oi="_wrapper_1fcne_2",ii="_label_1fcne_10",ai="_options_1fcne_18",ci="_radioLabel_1fcne_23",li="_radio_1fcne_23",ui="_custom_1fcne_36",di="_option_1fcne_18",de={wrapper:oi,label:ii,options:ai,radioLabel:ci,radio:li,custom:ui,option:di},fi=t=>{const{defaultValue:e,options:r,onChange:n,label:s}=t,[o,i]=D.useState(e),a=d=>{const l=d.target.value;i(l),n(l)};return m.jsxs("div",{className:de.wrapper,children:[m.jsx("span",{className:de.label,children:s}),m.jsx("div",{className:de.options,children:r.map(d=>m.jsxs("label",{className:de.radioLabel,children:[m.jsx("input",{type:"radio",value:d.value,checked:o===d.value,onChange:a,className:de.radio}),m.jsx("span",{className:de.custom}),m.jsx("span",{className:de.option,children:d.label})]},d.value))})]})},hi="_tip_pl6k0_1",pi="_text_pl6k0_9",gi="_warning_pl6k0_15",mi="_error_pl6k0_20",vi="_hide_pl6k0_25",Pe={tip:hi,text:pi,warning:gi,error:mi,hide:vi},yi=t=>{const{type:e,message:r,style:n}=t,[s,o]=D.useState(!1);return m.jsxs("div",{className:z(Pe.tip,{[Pe.warning]:e==="warning",[Pe.error]:e==="error",[Pe.hide]:s}),style:n,children:[m.jsx("div",{children:m.jsx(ne,{name:"info-circle",fill:e==="warning"?"#C1972A":"#FF3F19",width:20,height:20})}),m.jsx("div",{className:Pe.text,children:r}),m.jsx("div",{children:m.jsx(ne,{name:"x",fill:e==="warning"?"#C1972A":"#FF3F19",width:20,height:20,hoverable:!0,onClick:()=>o(!0)})})]})},bi="_customCheckbox_1b69m_1",Si="_checkboxBox_1b69m_7",wi="_checked_1b69m_16",Ei="_icon_1b69m_21",He={customCheckbox:bi,checkboxBox:Si,checked:wi,icon:Ei},un=t=>{const{value:e,onChange:r}=t,[n,s]=D.useState(e),o=()=>{s(!n),r(!n)};return m.jsxs("label",{className:He.customCheckbox,children:[m.jsx("input",{type:"checkbox",checked:n,onChange:o,style:{display:"none"}}),m.jsx("span",{className:z(He.checkboxBox,{[He.checked]:n})}),n&&m.jsx("div",{className:He.icon,children:m.jsx(ne,{name:"check",width:14,height:14,fill:"#ff3f19"})})]})};function dn(t,e){return function(){return t.apply(e,arguments)}}const{toString:Oi}=Object.prototype,{getPrototypeOf:Wt}=Object,Xe=(t=>e=>{const r=Oi.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Q=t=>(t=t.toLowerCase(),e=>Xe(e)===t),Qe=t=>e=>typeof e===t,{isArray:we}=Array,Ne=Qe("undefined");function _i(t){return t!==null&&!Ne(t)&&t.constructor!==null&&!Ne(t.constructor)&&W(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const fn=Q("ArrayBuffer");function Ti(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&fn(t.buffer),e}const Di=Qe("string"),W=Qe("function"),hn=Qe("number"),Ze=t=>t!==null&&typeof t=="object",Ci=t=>t===!0||t===!1,Ve=t=>{if(Xe(t)!=="object")return!1;const e=Wt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},xi=Q("Date"),Pi=Q("File"),Ii=Q("Blob"),Ri=Q("FileList"),Ni=t=>Ze(t)&&W(t.pipe),ki=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||W(t.append)&&((e=Xe(t))==="formdata"||e==="object"&&W(t.toString)&&t.toString()==="[object FormData]"))},ji=Q("URLSearchParams"),[Ai,Mi,Li,qi]=["ReadableStream","Request","Response","Headers"].map(Q),Bi=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ke(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,s;if(typeof t!="object"&&(t=[t]),we(t))for(n=0,s=t.length;n<s;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(n=0;n<i;n++)a=o[n],e.call(null,t[a],a,t)}}function pn(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,s;for(;n-- >0;)if(s=r[n],e===s.toLowerCase())return s;return null}const he=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gn=t=>!Ne(t)&&t!==he;function kt(){const{caseless:t}=gn(this)&&this||{},e={},r=(n,s)=>{const o=t&&pn(e,s)||s;Ve(e[o])&&Ve(n)?e[o]=kt(e[o],n):Ve(n)?e[o]=kt({},n):we(n)?e[o]=n.slice():e[o]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&ke(arguments[n],r);return e}const Fi=(t,e,r,{allOwnKeys:n}={})=>(ke(e,(s,o)=>{r&&W(s)?t[o]=dn(s,r):t[o]=s},{allOwnKeys:n}),t),Ui=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Hi=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},$i=(t,e,r,n)=>{let s,o,i;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)i=s[o],(!n||n(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=r!==!1&&Wt(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Vi=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},zi=t=>{if(!t)return null;if(we(t))return t;let e=t.length;if(!hn(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Wi=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Wt(Uint8Array)),Yi=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=n.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},Ji=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Gi=Q("HTMLFormElement"),Ki=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Rr=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Xi=Q("RegExp"),mn=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};ke(r,(s,o)=>{let i;(i=e(s,o,t))!==!1&&(n[o]=i||s)}),Object.defineProperties(t,n)},Qi=t=>{mn(t,(e,r)=>{if(W(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(W(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Zi=(t,e)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return we(t)?n(t):n(String(t).split(e)),r},ea=()=>{},ta=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,St="abcdefghijklmnopqrstuvwxyz",Nr="0123456789",vn={DIGIT:Nr,ALPHA:St,ALPHA_DIGIT:St+St.toUpperCase()+Nr},ra=(t=16,e=vn.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};function na(t){return!!(t&&W(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const sa=t=>{const e=new Array(10),r=(n,s)=>{if(Ze(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[s]=n;const o=we(n)?[]:{};return ke(n,(i,a)=>{const d=r(i,s+1);!Ne(d)&&(o[a]=d)}),e[s]=void 0,o}}return n};return r(t,0)},oa=Q("AsyncFunction"),ia=t=>t&&(Ze(t)||W(t))&&W(t.then)&&W(t.catch),yn=((t,e)=>t?setImmediate:e?((r,n)=>(he.addEventListener("message",({source:s,data:o})=>{s===he&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),he.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",W(he.postMessage)),aa=typeof queueMicrotask<"u"?queueMicrotask.bind(he):typeof process<"u"&&process.nextTick||yn,f={isArray:we,isArrayBuffer:fn,isBuffer:_i,isFormData:ki,isArrayBufferView:Ti,isString:Di,isNumber:hn,isBoolean:Ci,isObject:Ze,isPlainObject:Ve,isReadableStream:Ai,isRequest:Mi,isResponse:Li,isHeaders:qi,isUndefined:Ne,isDate:xi,isFile:Pi,isBlob:Ii,isRegExp:Xi,isFunction:W,isStream:Ni,isURLSearchParams:ji,isTypedArray:Wi,isFileList:Ri,forEach:ke,merge:kt,extend:Fi,trim:Bi,stripBOM:Ui,inherits:Hi,toFlatObject:$i,kindOf:Xe,kindOfTest:Q,endsWith:Vi,toArray:zi,forEachEntry:Yi,matchAll:Ji,isHTMLForm:Gi,hasOwnProperty:Rr,hasOwnProp:Rr,reduceDescriptors:mn,freezeMethods:Qi,toObjectSet:Zi,toCamelCase:Ki,noop:ea,toFiniteNumber:ta,findKey:pn,global:he,isContextDefined:gn,ALPHABET:vn,generateString:ra,isSpecCompliantForm:na,toJSONObject:sa,isAsyncFn:oa,isThenable:ia,setImmediate:yn,asap:aa};function C(t,e,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}f.inherits(C,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const bn=C.prototype,Sn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Sn[t]={value:t}});Object.defineProperties(C,Sn);Object.defineProperty(bn,"isAxiosError",{value:!0});C.from=(t,e,r,n,s,o)=>{const i=Object.create(bn);return f.toFlatObject(t,i,function(d){return d!==Error.prototype},a=>a!=="isAxiosError"),C.call(i,t.message,e,r,n,s),i.cause=t,i.name=t.name,o&&Object.assign(i,o),i};const ca=null;function jt(t){return f.isPlainObject(t)||f.isArray(t)}function wn(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function kr(t,e,r){return t?t.concat(e).map(function(s,o){return s=wn(s),!r&&o?"["+s+"]":s}).join(r?".":""):e}function la(t){return f.isArray(t)&&!t.some(jt)}const ua=f.toFlatObject(f,{},null,function(e){return/^is[A-Z]/.test(e)});function et(t,e,r){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=f.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,b){return!f.isUndefined(b[p])});const n=r.metaTokens,s=r.visitor||u,o=r.dots,i=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(s))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(f.isDate(g))return g.toISOString();if(!d&&f.isBlob(g))throw new C("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(g)||f.isTypedArray(g)?d&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,p,b){let O=g;if(g&&!b&&typeof g=="object"){if(f.endsWith(p,"{}"))p=n?p:p.slice(0,-2),g=JSON.stringify(g);else if(f.isArray(g)&&la(g)||(f.isFileList(g)||f.endsWith(p,"[]"))&&(O=f.toArray(g)))return p=wn(p),O.forEach(function(_,k){!(f.isUndefined(_)||_===null)&&e.append(i===!0?kr([p],k,o):i===null?p:p+"[]",l(_))}),!1}return jt(g)?!0:(e.append(kr(b,p,o),l(g)),!1)}const h=[],S=Object.assign(ua,{defaultVisitor:u,convertValue:l,isVisitable:jt});function y(g,p){if(!f.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));h.push(g),f.forEach(g,function(O,w){(!(f.isUndefined(O)||O===null)&&s.call(e,O,f.isString(w)?w.trim():w,p,S))===!0&&y(O,p?p.concat(w):[w])}),h.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return y(t),e}function jr(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Yt(t,e){this._pairs=[],t&&et(t,this,e)}const En=Yt.prototype;En.append=function(e,r){this._pairs.push([e,r])};En.toString=function(e){const r=e?function(n){return e.call(this,n,jr)}:jr;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function da(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function On(t,e,r){if(!e)return t;const n=r&&r.encode||da,s=r&&r.serialize;let o;if(s?o=s(e,r):o=f.isURLSearchParams(e)?e.toString():new Yt(e,r).toString(n),o){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Ar{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){f.forEach(this.handlers,function(n){n!==null&&e(n)})}}const _n={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fa=typeof URLSearchParams<"u"?URLSearchParams:Yt,ha=typeof FormData<"u"?FormData:null,pa=typeof Blob<"u"?Blob:null,ga={isBrowser:!0,classes:{URLSearchParams:fa,FormData:ha,Blob:pa},protocols:["http","https","file","blob","url","data"]},Jt=typeof window<"u"&&typeof document<"u",At=typeof navigator=="object"&&navigator||void 0,ma=Jt&&(!At||["ReactNative","NativeScript","NS"].indexOf(At.product)<0),va=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ya=Jt&&window.location.href||"http://localhost",ba=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Jt,hasStandardBrowserEnv:ma,hasStandardBrowserWebWorkerEnv:va,navigator:At,origin:ya},Symbol.toStringTag,{value:"Module"})),$={...ba,...ga};function Sa(t,e){return et(t,new $.classes.URLSearchParams,Object.assign({visitor:function(r,n,s,o){return $.isNode&&f.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function wa(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Ea(t){const e={},r=Object.keys(t);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],e[o]=t[o];return e}function Tn(t){function e(r,n,s,o){let i=r[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),d=o>=r.length;return i=!i&&f.isArray(s)?s.length:i,d?(f.hasOwnProp(s,i)?s[i]=[s[i],n]:s[i]=n,!a):((!s[i]||!f.isObject(s[i]))&&(s[i]=[]),e(r,n,s[i],o)&&f.isArray(s[i])&&(s[i]=Ea(s[i])),!a)}if(f.isFormData(t)&&f.isFunction(t.entries)){const r={};return f.forEachEntry(t,(n,s)=>{e(wa(n),s,r,0)}),r}return null}function Oa(t,e,r){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(t)}const je={transitional:_n,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=f.isObject(e);if(o&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return s?JSON.stringify(Tn(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e)||f.isReadableStream(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Sa(e,this.formSerializer).toString();if((a=f.isFileList(e))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return et(a?{"files[]":e}:e,d&&new d,this.formSerializer)}}return o||s?(r.setContentType("application/json",!1),Oa(e)):e}],transformResponse:[function(e){const r=this.transitional||je.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(f.isResponse(e)||f.isReadableStream(e))return e;if(e&&f.isString(e)&&(n&&!this.responseType||s)){const i=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(a){if(i)throw a.name==="SyntaxError"?C.from(a,C.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{je.headers[t]={}});const _a=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ta=t=>{const e={};let r,n,s;return t&&t.split(`
34
+ */(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var o="",i=0;i<arguments.length;i++){var a=arguments[i];a&&(o=s(o,n(a)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var a in o)e.call(o,a)&&o[a]&&(i=s(i,a));return i}function s(o,i){return i?o?o+" "+i:o+i:o}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(ln);var eo=ln.exports;const z=sn(eo),ne=t=>{const{name:e,iconComponent:r=null,fill:n="currentColor",hoverable:s=!1,onClick:o,className:i,width:a,height:d,rotated:l=!1}=t,[u,h]=D.useState(()=>r);return D.useEffect(()=>{r||(async()=>{try{const{default:y}=await Ks(Object.assign({"../../../assets/icons/align-bottom.svg":()=>Promise.resolve().then(()=>require("./align-bottom-BNcdAnw9.cjs")),"../../../assets/icons/align-center.svg":()=>Promise.resolve().then(()=>require("./align-center-DEANXdAS.cjs")),"../../../assets/icons/align-left.svg":()=>Promise.resolve().then(()=>require("./align-left-Cm-uab8B.cjs")),"../../../assets/icons/align-right.svg":()=>Promise.resolve().then(()=>require("./align-right-3l34PJVv.cjs")),"../../../assets/icons/align-top.svg":()=>Promise.resolve().then(()=>require("./align-top-BGk9vlUd.cjs")),"../../../assets/icons/arrow-down.svg":()=>Promise.resolve().then(()=>require("./arrow-down-BVZ1P_L9.cjs")),"../../../assets/icons/arrow-left.svg":()=>Promise.resolve().then(()=>require("./arrow-left-CXb5pfjn.cjs")),"../../../assets/icons/arrow-preview-down.svg":()=>Promise.resolve().then(()=>require("./arrow-preview-down-DaEiSgZ5.cjs")),"../../../assets/icons/arrow-preview-up.svg":()=>Promise.resolve().then(()=>require("./arrow-preview-up-DaNjYolK.cjs")),"../../../assets/icons/arrow-right.svg":()=>Promise.resolve().then(()=>require("./arrow-right-QxBPnNiY.cjs")),"../../../assets/icons/arrow-square.svg":()=>Promise.resolve().then(()=>require("./arrow-square-BQEpI5Xn.cjs")),"../../../assets/icons/arrow-up-right.svg":()=>Promise.resolve().then(()=>require("./arrow-up-right-BAHL0rjI.cjs")),"../../../assets/icons/border-dashed.svg":()=>Promise.resolve().then(()=>require("./border-dashed-hzn9HgjT.cjs")),"../../../assets/icons/border-solid.svg":()=>Promise.resolve().then(()=>require("./border-solid-7GLUyhD0.cjs")),"../../../assets/icons/cards.svg":()=>Promise.resolve().then(()=>require("./cards-DsOTH3J4.cjs")),"../../../assets/icons/chat.svg":()=>Promise.resolve().then(()=>require("./chat-B_av70HO.cjs")),"../../../assets/icons/check.svg":()=>Promise.resolve().then(()=>require("./check-b4m73KG0.cjs")),"../../../assets/icons/copy.svg":()=>Promise.resolve().then(()=>require("./copy-D4o494-8.cjs")),"../../../assets/icons/corners-out.svg":()=>Promise.resolve().then(()=>require("./corners-out-4-FEW-w_.cjs")),"../../../assets/icons/desktop.svg":()=>Promise.resolve().then(()=>require("./desktop-BaS7MtSb.cjs")),"../../../assets/icons/drag.svg":()=>Promise.resolve().then(()=>require("./drag-CRprmRb-.cjs")),"../../../assets/icons/faqs.svg":()=>Promise.resolve().then(()=>require("./faqs-BqOuvjUH.cjs")),"../../../assets/icons/file.svg":()=>Promise.resolve().then(()=>require("./file-8wBLPxbL.cjs")),"../../../assets/icons/font.svg":()=>Promise.resolve().then(()=>require("./font-DkMBoXe1.cjs")),"../../../assets/icons/globe.svg":()=>Promise.resolve().then(()=>require("./globe-Dc76Xp4l.cjs")),"../../../assets/icons/heading.svg":()=>Promise.resolve().then(()=>require("./heading-CPq36T7M.cjs")),"../../../assets/icons/house.svg":()=>Promise.resolve().then(()=>require("./house-CZ2u4ZpK.cjs")),"../../../assets/icons/image.svg":()=>Promise.resolve().then(()=>require("./image-Bx3xvWOB.cjs")),"../../../assets/icons/info-circle.svg":()=>Promise.resolve().then(()=>require("./info-circle-DxyEtmA8.cjs")),"../../../assets/icons/layers.svg":()=>Promise.resolve().then(()=>require("./layers-D-nS2yjm.cjs")),"../../../assets/icons/lock.svg":()=>Promise.resolve().then(()=>require("./lock-BmgYa3ZA.cjs")),"../../../assets/icons/mobile.svg":()=>Promise.resolve().then(()=>require("./mobile-jT12AeF2.cjs")),"../../../assets/icons/paint.svg":()=>Promise.resolve().then(()=>require("./paint-onR-PyLb.cjs")),"../../../assets/icons/palette.svg":()=>Promise.resolve().then(()=>require("./palette-BOR3Eq6r.cjs")),"../../../assets/icons/paragraph.svg":()=>Promise.resolve().then(()=>require("./paragraph-BYRArpHX.cjs")),"../../../assets/icons/plus.svg":()=>Promise.resolve().then(()=>require("./plus-7zIw2qu6.cjs")),"../../../assets/icons/radius.svg":()=>Promise.resolve().then(()=>require("./radius-CRLmETG0.cjs")),"../../../assets/icons/redo.svg":()=>Promise.resolve().then(()=>require("./redo-C-M_xJyP.cjs")),"../../../assets/icons/search.svg":()=>Promise.resolve().then(()=>require("./search-kPFRd0TJ.cjs")),"../../../assets/icons/settings.svg":()=>Promise.resolve().then(()=>require("./settings-BqG-9m9d.cjs")),"../../../assets/icons/sign-out.svg":()=>Promise.resolve().then(()=>require("./sign-out-vR-y-Fk7.cjs")),"../../../assets/icons/sliders.svg":()=>Promise.resolve().then(()=>require("./sliders-CsvSCMlf.cjs")),"../../../assets/icons/squares.svg":()=>Promise.resolve().then(()=>require("./squares-BaUyzSBO.cjs")),"../../../assets/icons/star.svg":()=>Promise.resolve().then(()=>require("./star-DX6bHsl_.cjs")),"../../../assets/icons/tablet.svg":()=>Promise.resolve().then(()=>require("./tablet-BvEDp-eu.cjs")),"../../../assets/icons/text-align-center.svg":()=>Promise.resolve().then(()=>require("./text-align-center-DSiXCwfH.cjs")),"../../../assets/icons/text-align-left.svg":()=>Promise.resolve().then(()=>require("./text-align-left-BLq4Pvg1.cjs")),"../../../assets/icons/text-align-right.svg":()=>Promise.resolve().then(()=>require("./text-align-right-B1liYPsk.cjs")),"../../../assets/icons/text-bold.svg":()=>Promise.resolve().then(()=>require("./text-bold-BqCslwM8.cjs")),"../../../assets/icons/text-code.svg":()=>Promise.resolve().then(()=>require("./text-code-CdpLXZEo.cjs")),"../../../assets/icons/text-italic.svg":()=>Promise.resolve().then(()=>require("./text-italic-DgM86CDI.cjs")),"../../../assets/icons/text-strike-through.svg":()=>Promise.resolve().then(()=>require("./text-strike-through-DUrcRZUF.cjs")),"../../../assets/icons/text-underline.svg":()=>Promise.resolve().then(()=>require("./text-underline-CwR9adlS.cjs")),"../../../assets/icons/textbox.svg":()=>Promise.resolve().then(()=>require("./textbox-CeYJQP_1.cjs")),"../../../assets/icons/thickness.svg":()=>Promise.resolve().then(()=>require("./thickness-DSnQHY5N.cjs")),"../../../assets/icons/ticket.svg":()=>Promise.resolve().then(()=>require("./ticket-BFI6P_1c.cjs")),"../../../assets/icons/trash.svg":()=>Promise.resolve().then(()=>require("./trash-Cy0hsvys.cjs")),"../../../assets/icons/undo.svg":()=>Promise.resolve().then(()=>require("./undo-D2eH1UgJ.cjs")),"../../../assets/icons/user-circle-gear.svg":()=>Promise.resolve().then(()=>require("./user-circle-gear-DeMV7Apx.cjs")),"../../../assets/icons/x.svg":()=>Promise.resolve().then(()=>require("./x-DW1UBLIF.cjs")),"../../../assets/icons/zoom-minus.svg":()=>Promise.resolve().then(()=>require("./zoom-minus-TiFzxDhk.cjs"))}),`../../../assets/icons/${e}.svg`,6);h(()=>y)}catch{console.error(`Icon "${e}" not found in assets.`),h(()=>null)}})()},[e,r]),u?m.jsx(u,{fill:n,style:{"--icon-fill":n},className:z(yt.icon,i,{[yt.hoverable]:s,[yt.rotated]:l}),onClick:o,width:a||"24",height:d||"24"}):null},to="_button_gxd35_1",ro="_primary_gxd35_13",no="_secondary_gxd35_18",Fe={button:to,primary:ro,secondary:no},Nt=t=>{const{children:e,onClick:r,style:n,className:s,disabled:o=!1,size:i="m",type:a="Primary"}=t;return m.jsx("button",{className:z(Fe.button,s,{[Fe.primary]:a==="Primary",[Fe.secondary]:a==="Secondary",[Fe.tertiary]:a==="Tertiary"}),onClick:r,style:{...n,fontSize:i==="m"?14:i==="s"?12:16},disabled:o,children:e})},so="_wrapper_wp7u5_1",oo="_label_wp7u5_9",io="_input_wp7u5_17",ao="_required_wp7u5_36",co="_paddingless_wp7u5_40",lo="_content_wp7u5_44",uo="_borderless_wp7u5_50",ue={wrapper:so,label:oo,input:io,required:ao,paddingless:co,content:lo,borderless:uo},fo=t=>{const{onChange:e,style:r,label:n,value:s,type:o,min:i,max:a,placeholder:d,disabled:l=!1,required:u=!1,regex:h,paddingless:S=!1,borderless:y=!1,editable:g=!1}=t,[p,b]=D.useState(!1);function O(_){return Number(_)<0?String(i):_}function w(_){return!u||!h?!0:new RegExp(h).test(_)}return m.jsxs("div",{className:ue.wrapper,children:[n&&m.jsx("label",{className:ue.label,htmlFor:n,children:n}),m.jsxs("div",{className:ue.content,children:[m.jsx("input",{id:n,type:o||"text",onChange:_=>{if(o==="text")e(_.target.value);else{const k=O(_.target.value);e(k)}},value:s,autoComplete:"off",placeholder:d,className:z(ue.input,{[ue.required]:p&&u&&!w(s),[ue.paddingless]:S,[ue.borderless]:y}),min:o==="number"?i:void 0,max:o==="number"?a:void 0,disabled:l,onFocus:()=>b(!0),style:r}),g&&m.jsx("div",{children:m.jsx(ne,{name:"sliders",width:20,height:20,hoverable:!0})})]})]})},ho="_wrapper_1v1ye_1",po="_label_1v1ye_9",go="_select_1v1ye_17",mo="_icon_1v1ye_30",vo="_rotate_1v1ye_34",yo="_content_1v1ye_38",bo="_options_1v1ye_42",So="_option_1v1ye_42",wo="_addon_1v1ye_66",oe={wrapper:ho,label:po,select:go,icon:mo,rotate:vo,content:yo,options:bo,option:So,addon:wo},Eo=t=>{const{leftAddon:e,onChange:r,label:n,value:s,options:o,style:i}=t,[a,d]=D.useState(!1);function l(u){r(u),d(!1)}return D.useEffect(()=>{const u=()=>{d(!1)};return u(),document.body.addEventListener("click",u),()=>{document.body.removeEventListener("click",u)}},[]),m.jsxs("div",{className:oe.wrapper,style:{...i},children:[n&&m.jsx("label",{className:oe.label,htmlFor:n,children:n}),m.jsxs("div",{className:oe.content,onClick:u=>u.stopPropagation(),children:[m.jsxs("div",{className:oe.select,onClick:()=>d(u=>!u),children:[m.jsxs("div",{className:oe.addon,children:[e,m.jsx("span",{children:s})]}),m.jsx(ne,{name:"arrow-down",className:z(oe.icon,{[oe.rotate]:a})})]}),a&&m.jsx("div",{className:oe.options,onClick:()=>d(!1),children:o.filter(u=>u!==s).map(u=>m.jsx("div",{className:oe.option,onClick:()=>l(u),children:u},u))})]})]})},Oo="_wrapper_3w2ni_1",_o="_active_3w2ni_24",To="_toggle_3w2ni_27",Do="_background_3w2ni_39",Co="_padding_3w2ni_43",re={wrapper:Oo,switch:"_switch_3w2ni_13",active:_o,toggle:To,background:Do,padding:Co},xo=t=>{const{onChange:e,style:r,current:n,label:s,hasBackground:o=!1,paddingless:i=!0}=t,[a,d]=D.useState(n),l=()=>{d(u=>!u),e==null||e(!a)};return m.jsx(m.Fragment,{children:s?m.jsxs("div",{className:z(re.wrapper,{[re.background]:o,[re.padding]:!i}),children:[m.jsx("div",{className:z(re.switch,{[re.active]:a}),onClick:l,style:r,children:m.jsx("div",{className:re.toggle})}),m.jsx("span",{className:re.value,children:s})]}):m.jsx("div",{className:z(re.switch,{[re.active]:a}),onClick:l,style:r,children:m.jsx("div",{className:re.toggle})})})},Po="_wrapper_1inu5_1",Io={wrapper:Po},Ro=({children:t})=>{const{hoverBlockId:e,startHideTimeout:r,clearHideTimeout:n,setMouseOverModal:s}=an();return e?m.jsx("div",{className:Io.wrapper,onMouseEnter:()=>{n(),s(!0)},onMouseLeave:()=>{s(!1),r()},children:t}):null},No="_blocks_1op3c_1",ko="_block_1op3c_1",jo="_active_1op3c_18",bt={blocks:No,block:ko,active:jo},Ao=t=>{const{items:e,selectedItem:r,onSelect:n,getIconName:s}=t;return m.jsx("div",{className:bt.blocks,children:e.map(o=>m.jsx("div",{className:z(bt.block,{[bt.active]:r===o}),onClick:()=>n(o),children:m.jsx(ne,{name:s(o),fill:r===o?"#252525":"#757575"})},String(o)))})},Mo="_applyButton_1cqw4_2",Lo="_cancelButton_1cqw4_7",qo="_content_1cqw4_12",Bo="_label_1cqw4_18",Fo="_colorValue_1cqw4_30",Uo="_modal_1cqw4_37",Ho="_colorMap_1cqw4_56",$o="_indicator_1cqw4_64",Vo="_hueSlider_1cqw4_73",zo="_slider_1cqw4_102",Wo="_buttons_1cqw4_107",Yo="_name_1cqw4_113",Jo="_secondary_1cqw4_118",Go="_input_1cqw4_126",fe={applyButton:Mo,cancelButton:Lo,content:qo,label:Bo,colorValue:Fo,modal:Uo,colorMap:Ho,indicator:$o,hueSlider:Vo,slider:zo,buttons:Wo,name:Yo,secondary:Jo,input:Go},Ko=t=>{const{initialColor:e,onChange:r,title:n,labelStyle:s="primary"}=t,[o,i]=D.useState(e),{setActiveLabel:a,setModalPosition:d,setInitialColor:l,setShowModal:u,setUpdate:h,setColor:S,setColorChange:y,colorChange:g}=cn();D.useEffect(()=>{const b=()=>{u(!1),a(null),l(e),h(()=>{}),S(e),y(()=>{})};return document.body.addEventListener("click",b),()=>{document.body.removeEventListener("click",b)}},[]);const p=b=>{b.stopPropagation(),u(!0),y(i),h(r),l(e),S(o);const O=b.currentTarget.getBoundingClientRect(),w=400,_=288,k=10,M=20,B=window.innerHeight-O.bottom,X=O.top,se=window.innerWidth-O.right,ae=O.left;let Z,ee;Z=O.bottom+k+window.scrollY,ee=O.left,(B<w||B<M)&&(X>=w?Z=O.top-w-k+window.scrollY:Z=window.scrollY+(window.innerHeight-w)/2),se<_&&(ae>=_?ee=O.right-_:ee=(window.innerWidth-_)/2),ee<O.right&&ee+_>O.left&&Z<O.bottom&&Z+w>O.top&&(se>=_?ee=O.right+k+100:B>=w?Z=O.bottom+k+window.scrollY:(Z=window.scrollY+(window.innerHeight-w)/2,ee=(window.innerWidth-_)/2)),d({top:Z,left:ee})};return m.jsxs("div",{className:fe.content,children:[m.jsx("span",{className:z(fe.name,{[fe.secondary]:s==="secondary"}),children:n}),m.jsxs("label",{htmlFor:"color",className:fe.label,children:[m.jsx("div",{className:fe.colorValue,style:{background:o},onClick:p}),m.jsx("input",{type:"text",defaultValue:o,value:o,onChange:b=>{const O=b.target.value;r(O),S(O),i(O),g(O)},className:fe.input})]})]})},Xo="_modal_1qb2a_1",Qo={modal:Xo},Zo=t=>{const{close:e,children:r}=t;return D.useEffect(()=>{const n=()=>{e(!1)};return document.body.addEventListener("click",n),()=>{document.body.removeEventListener("click",n)}},[]),m.jsx("div",{className:Qo.modal,children:r})},ei="_wrapper_1qvfi_1",ti="_label_1qvfi_10",ri="_textarea_1qvfi_18",ni="_length_1qvfi_33",Ue={wrapper:ei,label:ti,textarea:ri,length:ni},si=t=>{const{onChange:e,label:r,value:n,maxLength:s,placeholder:o}=t,[i,a]=D.useState(n.length);return m.jsxs("div",{className:Ue.wrapper,children:[r&&m.jsx("label",{className:Ue.label,htmlFor:r,children:r}),m.jsx("textarea",{id:r,defaultValue:n,onChange:d=>{a(d.target.value.length),e(d.target.value)},placeholder:o,className:Ue.textarea,maxLength:s}),s&&m.jsxs("div",{className:Ue.length,children:[i,"/",s]})]})},oi="_wrapper_1fcne_2",ii="_label_1fcne_10",ai="_options_1fcne_18",ci="_radioLabel_1fcne_23",li="_radio_1fcne_23",ui="_custom_1fcne_36",di="_option_1fcne_18",de={wrapper:oi,label:ii,options:ai,radioLabel:ci,radio:li,custom:ui,option:di},fi=t=>{const{defaultValue:e,options:r,onChange:n,label:s}=t,[o,i]=D.useState(e),a=d=>{const l=d.target.value;i(l),n(l)};return m.jsxs("div",{className:de.wrapper,children:[m.jsx("span",{className:de.label,children:s}),m.jsx("div",{className:de.options,children:r.map(d=>m.jsxs("label",{className:de.radioLabel,children:[m.jsx("input",{type:"radio",value:d.value,checked:o===d.value,onChange:a,className:de.radio}),m.jsx("span",{className:de.custom}),m.jsx("span",{className:de.option,children:d.label})]},d.value))})]})},hi="_tip_pl6k0_1",pi="_text_pl6k0_9",gi="_warning_pl6k0_15",mi="_error_pl6k0_20",vi="_hide_pl6k0_25",Pe={tip:hi,text:pi,warning:gi,error:mi,hide:vi},yi=t=>{const{type:e,message:r,style:n}=t,[s,o]=D.useState(!1);return m.jsxs("div",{className:z(Pe.tip,{[Pe.warning]:e==="warning",[Pe.error]:e==="error",[Pe.hide]:s}),style:n,children:[m.jsx("div",{children:m.jsx(ne,{name:"info-circle",fill:e==="warning"?"#C1972A":"#FF3F19",width:20,height:20})}),m.jsx("div",{className:Pe.text,children:r}),m.jsx("div",{children:m.jsx(ne,{name:"x",fill:e==="warning"?"#C1972A":"#FF3F19",width:20,height:20,hoverable:!0,onClick:()=>o(!0)})})]})},bi="_customCheckbox_1b69m_1",Si="_checkboxBox_1b69m_7",wi="_checked_1b69m_16",Ei="_icon_1b69m_21",He={customCheckbox:bi,checkboxBox:Si,checked:wi,icon:Ei},un=t=>{const{value:e,onChange:r}=t,[n,s]=D.useState(e),o=()=>{s(!n),r(!n)};return m.jsxs("label",{className:He.customCheckbox,children:[m.jsx("input",{type:"checkbox",checked:n,onChange:o,style:{display:"none"}}),m.jsx("span",{className:z(He.checkboxBox,{[He.checked]:n})}),n&&m.jsx("div",{className:He.icon,children:m.jsx(ne,{name:"check",width:14,height:14,fill:"#ff3f19"})})]})};function dn(t,e){return function(){return t.apply(e,arguments)}}const{toString:Oi}=Object.prototype,{getPrototypeOf:Wt}=Object,Xe=(t=>e=>{const r=Oi.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Q=t=>(t=t.toLowerCase(),e=>Xe(e)===t),Qe=t=>e=>typeof e===t,{isArray:we}=Array,Ne=Qe("undefined");function _i(t){return t!==null&&!Ne(t)&&t.constructor!==null&&!Ne(t.constructor)&&W(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const fn=Q("ArrayBuffer");function Ti(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&fn(t.buffer),e}const Di=Qe("string"),W=Qe("function"),hn=Qe("number"),Ze=t=>t!==null&&typeof t=="object",Ci=t=>t===!0||t===!1,Ve=t=>{if(Xe(t)!=="object")return!1;const e=Wt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},xi=Q("Date"),Pi=Q("File"),Ii=Q("Blob"),Ri=Q("FileList"),Ni=t=>Ze(t)&&W(t.pipe),ki=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||W(t.append)&&((e=Xe(t))==="formdata"||e==="object"&&W(t.toString)&&t.toString()==="[object FormData]"))},ji=Q("URLSearchParams"),[Ai,Mi,Li,qi]=["ReadableStream","Request","Response","Headers"].map(Q),Bi=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ke(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,s;if(typeof t!="object"&&(t=[t]),we(t))for(n=0,s=t.length;n<s;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(n=0;n<i;n++)a=o[n],e.call(null,t[a],a,t)}}function pn(t,e){e=e.toLowerCase();const r=Object.keys(t);let n=r.length,s;for(;n-- >0;)if(s=r[n],e===s.toLowerCase())return s;return null}const he=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gn=t=>!Ne(t)&&t!==he;function kt(){const{caseless:t}=gn(this)&&this||{},e={},r=(n,s)=>{const o=t&&pn(e,s)||s;Ve(e[o])&&Ve(n)?e[o]=kt(e[o],n):Ve(n)?e[o]=kt({},n):we(n)?e[o]=n.slice():e[o]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&ke(arguments[n],r);return e}const Fi=(t,e,r,{allOwnKeys:n}={})=>(ke(e,(s,o)=>{r&&W(s)?t[o]=dn(s,r):t[o]=s},{allOwnKeys:n}),t),Ui=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Hi=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},$i=(t,e,r,n)=>{let s,o,i;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)i=s[o],(!n||n(i,t,e))&&!a[i]&&(e[i]=t[i],a[i]=!0);t=r!==!1&&Wt(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Vi=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},zi=t=>{if(!t)return null;if(we(t))return t;let e=t.length;if(!hn(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Wi=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Wt(Uint8Array)),Yi=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=n.next())&&!s.done;){const o=s.value;e.call(t,o[0],o[1])}},Ji=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Gi=Q("HTMLFormElement"),Ki=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Rr=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),Xi=Q("RegExp"),mn=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};ke(r,(s,o)=>{let i;(i=e(s,o,t))!==!1&&(n[o]=i||s)}),Object.defineProperties(t,n)},Qi=t=>{mn(t,(e,r)=>{if(W(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(W(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Zi=(t,e)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return we(t)?n(t):n(String(t).split(e)),r},ea=()=>{},ta=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,St="abcdefghijklmnopqrstuvwxyz",Nr="0123456789",vn={DIGIT:Nr,ALPHA:St,ALPHA_DIGIT:St+St.toUpperCase()+Nr},ra=(t=16,e=vn.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r};function na(t){return!!(t&&W(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const sa=t=>{const e=new Array(10),r=(n,s)=>{if(Ze(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[s]=n;const o=we(n)?[]:{};return ke(n,(i,a)=>{const d=r(i,s+1);!Ne(d)&&(o[a]=d)}),e[s]=void 0,o}}return n};return r(t,0)},oa=Q("AsyncFunction"),ia=t=>t&&(Ze(t)||W(t))&&W(t.then)&&W(t.catch),yn=((t,e)=>t?setImmediate:e?((r,n)=>(he.addEventListener("message",({source:s,data:o})=>{s===he&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),he.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",W(he.postMessage)),aa=typeof queueMicrotask<"u"?queueMicrotask.bind(he):typeof process<"u"&&process.nextTick||yn,f={isArray:we,isArrayBuffer:fn,isBuffer:_i,isFormData:ki,isArrayBufferView:Ti,isString:Di,isNumber:hn,isBoolean:Ci,isObject:Ze,isPlainObject:Ve,isReadableStream:Ai,isRequest:Mi,isResponse:Li,isHeaders:qi,isUndefined:Ne,isDate:xi,isFile:Pi,isBlob:Ii,isRegExp:Xi,isFunction:W,isStream:Ni,isURLSearchParams:ji,isTypedArray:Wi,isFileList:Ri,forEach:ke,merge:kt,extend:Fi,trim:Bi,stripBOM:Ui,inherits:Hi,toFlatObject:$i,kindOf:Xe,kindOfTest:Q,endsWith:Vi,toArray:zi,forEachEntry:Yi,matchAll:Ji,isHTMLForm:Gi,hasOwnProperty:Rr,hasOwnProp:Rr,reduceDescriptors:mn,freezeMethods:Qi,toObjectSet:Zi,toCamelCase:Ki,noop:ea,toFiniteNumber:ta,findKey:pn,global:he,isContextDefined:gn,ALPHABET:vn,generateString:ra,isSpecCompliantForm:na,toJSONObject:sa,isAsyncFn:oa,isThenable:ia,setImmediate:yn,asap:aa};function C(t,e,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}f.inherits(C,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const bn=C.prototype,Sn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Sn[t]={value:t}});Object.defineProperties(C,Sn);Object.defineProperty(bn,"isAxiosError",{value:!0});C.from=(t,e,r,n,s,o)=>{const i=Object.create(bn);return f.toFlatObject(t,i,function(d){return d!==Error.prototype},a=>a!=="isAxiosError"),C.call(i,t.message,e,r,n,s),i.cause=t,i.name=t.name,o&&Object.assign(i,o),i};const ca=null;function jt(t){return f.isPlainObject(t)||f.isArray(t)}function wn(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function kr(t,e,r){return t?t.concat(e).map(function(s,o){return s=wn(s),!r&&o?"["+s+"]":s}).join(r?".":""):e}function la(t){return f.isArray(t)&&!t.some(jt)}const ua=f.toFlatObject(f,{},null,function(e){return/^is[A-Z]/.test(e)});function et(t,e,r){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=f.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,b){return!f.isUndefined(b[p])});const n=r.metaTokens,s=r.visitor||u,o=r.dots,i=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(s))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(f.isDate(g))return g.toISOString();if(!d&&f.isBlob(g))throw new C("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(g)||f.isTypedArray(g)?d&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,p,b){let O=g;if(g&&!b&&typeof g=="object"){if(f.endsWith(p,"{}"))p=n?p:p.slice(0,-2),g=JSON.stringify(g);else if(f.isArray(g)&&la(g)||(f.isFileList(g)||f.endsWith(p,"[]"))&&(O=f.toArray(g)))return p=wn(p),O.forEach(function(_,k){!(f.isUndefined(_)||_===null)&&e.append(i===!0?kr([p],k,o):i===null?p:p+"[]",l(_))}),!1}return jt(g)?!0:(e.append(kr(b,p,o),l(g)),!1)}const h=[],S=Object.assign(ua,{defaultVisitor:u,convertValue:l,isVisitable:jt});function y(g,p){if(!f.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));h.push(g),f.forEach(g,function(O,w){(!(f.isUndefined(O)||O===null)&&s.call(e,O,f.isString(w)?w.trim():w,p,S))===!0&&y(O,p?p.concat(w):[w])}),h.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return y(t),e}function jr(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function Yt(t,e){this._pairs=[],t&&et(t,this,e)}const En=Yt.prototype;En.append=function(e,r){this._pairs.push([e,r])};En.toString=function(e){const r=e?function(n){return e.call(this,n,jr)}:jr;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function da(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function On(t,e,r){if(!e)return t;const n=r&&r.encode||da,s=r&&r.serialize;let o;if(s?o=s(e,r):o=f.isURLSearchParams(e)?e.toString():new Yt(e,r).toString(n),o){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Ar{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){f.forEach(this.handlers,function(n){n!==null&&e(n)})}}const _n={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fa=typeof URLSearchParams<"u"?URLSearchParams:Yt,ha=typeof FormData<"u"?FormData:null,pa=typeof Blob<"u"?Blob:null,ga={isBrowser:!0,classes:{URLSearchParams:fa,FormData:ha,Blob:pa},protocols:["http","https","file","blob","url","data"]},Jt=typeof window<"u"&&typeof document<"u",At=typeof navigator=="object"&&navigator||void 0,ma=Jt&&(!At||["ReactNative","NativeScript","NS"].indexOf(At.product)<0),va=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ya=Jt&&window.location.href||"http://localhost",ba=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Jt,hasStandardBrowserEnv:ma,hasStandardBrowserWebWorkerEnv:va,navigator:At,origin:ya},Symbol.toStringTag,{value:"Module"})),$={...ba,...ga};function Sa(t,e){return et(t,new $.classes.URLSearchParams,Object.assign({visitor:function(r,n,s,o){return $.isNode&&f.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function wa(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Ea(t){const e={},r=Object.keys(t);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],e[o]=t[o];return e}function Tn(t){function e(r,n,s,o){let i=r[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),d=o>=r.length;return i=!i&&f.isArray(s)?s.length:i,d?(f.hasOwnProp(s,i)?s[i]=[s[i],n]:s[i]=n,!a):((!s[i]||!f.isObject(s[i]))&&(s[i]=[]),e(r,n,s[i],o)&&f.isArray(s[i])&&(s[i]=Ea(s[i])),!a)}if(f.isFormData(t)&&f.isFunction(t.entries)){const r={};return f.forEachEntry(t,(n,s)=>{e(wa(n),s,r,0)}),r}return null}function Oa(t,e,r){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(t)}const je={transitional:_n,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=f.isObject(e);if(o&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return s?JSON.stringify(Tn(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e)||f.isReadableStream(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Sa(e,this.formSerializer).toString();if((a=f.isFileList(e))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return et(a?{"files[]":e}:e,d&&new d,this.formSerializer)}}return o||s?(r.setContentType("application/json",!1),Oa(e)):e}],transformResponse:[function(e){const r=this.transitional||je.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(f.isResponse(e)||f.isReadableStream(e))return e;if(e&&f.isString(e)&&(n&&!this.responseType||s)){const i=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(a){if(i)throw a.name==="SyntaxError"?C.from(a,C.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{je.headers[t]={}});const _a=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ta=t=>{const e={};let r,n,s;return t&&t.split(`
35
35
  `).forEach(function(i){s=i.indexOf(":"),r=i.substring(0,s).trim().toLowerCase(),n=i.substring(s+1).trim(),!(!r||e[r]&&_a[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e},Mr=Symbol("internals");function Ie(t){return t&&String(t).trim().toLowerCase()}function ze(t){return t===!1||t==null?t:f.isArray(t)?t.map(ze):String(t)}function Da(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const Ca=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function wt(t,e,r,n,s){if(f.isFunction(n))return n.call(this,e,r);if(s&&(e=r),!!f.isString(e)){if(f.isString(n))return e.indexOf(n)!==-1;if(f.isRegExp(n))return n.test(e)}}function xa(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function Pa(t,e){const r=f.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(s,o,i){return this[n].call(this,e,s,o,i)},configurable:!0})})}class V{constructor(e){e&&this.set(e)}set(e,r,n){const s=this;function o(a,d,l){const u=Ie(d);if(!u)throw new Error("header name must be a non-empty string");const h=f.findKey(s,u);(!h||s[h]===void 0||l===!0||l===void 0&&s[h]!==!1)&&(s[h||d]=ze(a))}const i=(a,d)=>f.forEach(a,(l,u)=>o(l,u,d));if(f.isPlainObject(e)||e instanceof this.constructor)i(e,r);else if(f.isString(e)&&(e=e.trim())&&!Ca(e))i(Ta(e),r);else if(f.isHeaders(e))for(const[a,d]of e.entries())o(d,a,n);else e!=null&&o(r,e,n);return this}get(e,r){if(e=Ie(e),e){const n=f.findKey(this,e);if(n){const s=this[n];if(!r)return s;if(r===!0)return Da(s);if(f.isFunction(r))return r.call(this,s,n);if(f.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Ie(e),e){const n=f.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||wt(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let s=!1;function o(i){if(i=Ie(i),i){const a=f.findKey(n,i);a&&(!r||wt(n,n[a],a,r))&&(delete n[a],s=!0)}}return f.isArray(e)?e.forEach(o):o(e),s}clear(e){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const o=r[n];(!e||wt(this,this[o],o,e,!0))&&(delete this[o],s=!0)}return s}normalize(e){const r=this,n={};return f.forEach(this,(s,o)=>{const i=f.findKey(n,o);if(i){r[i]=ze(s),delete r[o];return}const a=e?xa(o):String(o).trim();a!==o&&delete r[o],r[a]=ze(s),n[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return f.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=e&&f.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
36
36
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const n=new this(e);return r.forEach(s=>n.set(s)),n}static accessor(e){const n=(this[Mr]=this[Mr]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=Ie(i);n[a]||(Pa(s,i),n[a]=!0)}return f.isArray(e)?e.forEach(o):o(e),this}}V.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(V.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}});f.freezeMethods(V);function Et(t,e){const r=this||je,n=e||r,s=V.from(n.headers);let o=n.data;return f.forEach(t,function(a){o=a.call(r,o,s.normalize(),e?e.status:void 0)}),s.normalize(),o}function Dn(t){return!!(t&&t.__CANCEL__)}function Ee(t,e,r){C.call(this,t??"canceled",C.ERR_CANCELED,e,r),this.name="CanceledError"}f.inherits(Ee,C,{__CANCEL__:!0});function Cn(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new C("Request failed with status code "+r.status,[C.ERR_BAD_REQUEST,C.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ia(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Ra(t,e){t=t||10;const r=new Array(t),n=new Array(t);let s=0,o=0,i;return e=e!==void 0?e:1e3,function(d){const l=Date.now(),u=n[o];i||(i=l),r[s]=d,n[s]=l;let h=o,S=0;for(;h!==s;)S+=r[h++],h=h%t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),l-i<e)return;const y=u&&l-u;return y?Math.round(S*1e3/y):void 0}}function Na(t,e){let r=0,n=1e3/e,s,o;const i=(l,u=Date.now())=>{r=u,s=null,o&&(clearTimeout(o),o=null),t.apply(null,l)};return[(...l)=>{const u=Date.now(),h=u-r;h>=n?i(l,u):(s=l,o||(o=setTimeout(()=>{o=null,i(s)},n-h)))},()=>s&&i(s)]}const Je=(t,e,r=3)=>{let n=0;const s=Ra(50,250);return Na(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,d=i-n,l=s(d),u=i<=a;n=i;const h={loaded:i,total:a,progress:a?i/a:void 0,bytes:d,rate:l||void 0,estimated:l&&a&&u?(a-i)/l:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(h)},r)},Lr=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},qr=t=>(...e)=>f.asap(()=>t(...e)),ka=$.hasStandardBrowserEnv?function(){const e=$.navigator&&/(msie|trident)/i.test($.navigator.userAgent),r=document.createElement("a");let n;function s(o){let i=o;return e&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=s(window.location.href),function(i){const a=f.isString(i)?s(i):i;return a.protocol===n.protocol&&a.host===n.host}}():function(){return function(){return!0}}(),ja=$.hasStandardBrowserEnv?{write(t,e,r,n,s,o){const i=[t+"="+encodeURIComponent(e)];f.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),f.isString(n)&&i.push("path="+n),f.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Aa(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ma(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function xn(t,e){return t&&!Aa(e)?Ma(t,e):e}const Br=t=>t instanceof V?{...t}:t;function ge(t,e){e=e||{};const r={};function n(l,u,h){return f.isPlainObject(l)&&f.isPlainObject(u)?f.merge.call({caseless:h},l,u):f.isPlainObject(u)?f.merge({},u):f.isArray(u)?u.slice():u}function s(l,u,h){if(f.isUndefined(u)){if(!f.isUndefined(l))return n(void 0,l,h)}else return n(l,u,h)}function o(l,u){if(!f.isUndefined(u))return n(void 0,u)}function i(l,u){if(f.isUndefined(u)){if(!f.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function a(l,u,h){if(h in e)return n(l,u);if(h in t)return n(void 0,l)}const d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(l,u)=>s(Br(l),Br(u),!0)};return f.forEach(Object.keys(Object.assign({},t,e)),function(u){const h=d[u]||s,S=h(t[u],e[u],u);f.isUndefined(S)&&h!==a||(r[u]=S)}),r}const Pn=t=>{const e=ge({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=e;e.headers=i=V.from(i),e.url=On(xn(e.baseURL,e.url),t.params,t.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let d;if(f.isFormData(r)){if($.hasStandardBrowserEnv||$.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((d=i.getContentType())!==!1){const[l,...u]=d?d.split(";").map(h=>h.trim()).filter(Boolean):[];i.setContentType([l||"multipart/form-data",...u].join("; "))}}if($.hasStandardBrowserEnv&&(n&&f.isFunction(n)&&(n=n(e)),n||n!==!1&&ka(e.url))){const l=s&&o&&ja.read(o);l&&i.set(s,l)}return e},La=typeof XMLHttpRequest<"u",qa=La&&function(t){return new Promise(function(r,n){const s=Pn(t);let o=s.data;const i=V.from(s.headers).normalize();let{responseType:a,onUploadProgress:d,onDownloadProgress:l}=s,u,h,S,y,g;function p(){y&&y(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function O(){if(!b)return;const _=V.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),M={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:_,config:t,request:b};Cn(function(X){r(X),p()},function(X){n(X),p()},M),b=null}"onloadend"in b?b.onloadend=O:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(O)},b.onabort=function(){b&&(n(new C("Request aborted",C.ECONNABORTED,t,b)),b=null)},b.onerror=function(){n(new C("Network Error",C.ERR_NETWORK,t,b)),b=null},b.ontimeout=function(){let k=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const M=s.transitional||_n;s.timeoutErrorMessage&&(k=s.timeoutErrorMessage),n(new C(k,M.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,t,b)),b=null},o===void 0&&i.setContentType(null),"setRequestHeader"in b&&f.forEach(i.toJSON(),function(k,M){b.setRequestHeader(M,k)}),f.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),a&&a!=="json"&&(b.responseType=s.responseType),l&&([S,g]=Je(l,!0),b.addEventListener("progress",S)),d&&b.upload&&([h,y]=Je(d),b.upload.addEventListener("progress",h),b.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(u=_=>{b&&(n(!_||_.type?new Ee(null,t,b):_),b.abort(),b=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const w=Ia(s.url);if(w&&$.protocols.indexOf(w)===-1){n(new C("Unsupported protocol "+w+":",C.ERR_BAD_REQUEST,t));return}b.send(o||null)})},Ba=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,s;const o=function(l){if(!s){s=!0,a();const u=l instanceof Error?l:this.reason;n.abort(u instanceof C?u:new Ee(u instanceof Error?u.message:u))}};let i=e&&setTimeout(()=>{i=null,o(new C(`timeout ${e} of ms exceeded`,C.ETIMEDOUT))},e);const a=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),t=null)};t.forEach(l=>l.addEventListener("abort",o));const{signal:d}=n;return d.unsubscribe=()=>f.asap(a),d}},Fa=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,s;for(;n<r;)s=n+e,yield t.slice(n,s),n=s},Ua=async function*(t,e){for await(const r of Ha(t))yield*Fa(r,e)},Ha=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},Fr=(t,e,r,n)=>{const s=Ua(t,e);let o=0,i,a=d=>{i||(i=!0,n&&n(d))};return new ReadableStream({async pull(d){try{const{done:l,value:u}=await s.next();if(l){a(),d.close();return}let h=u.byteLength;if(r){let S=o+=h;r(S)}d.enqueue(new Uint8Array(u))}catch(l){throw a(l),l}},cancel(d){return a(d),s.return()}},{highWaterMark:2})},tt=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",In=tt&&typeof ReadableStream=="function",$a=tt&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Rn=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Va=In&&Rn(()=>{let t=!1;const e=new Request($.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Ur=64*1024,Mt=In&&Rn(()=>f.isReadableStream(new Response("").body)),Ge={stream:Mt&&(t=>t.body)};tt&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ge[e]&&(Ge[e]=f.isFunction(t[e])?r=>r[e]():(r,n)=>{throw new C(`Response type '${e}' is not supported`,C.ERR_NOT_SUPPORT,n)})})})(new Response);const za=async t=>{if(t==null)return 0;if(f.isBlob(t))return t.size;if(f.isSpecCompliantForm(t))return(await new Request($.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(f.isArrayBufferView(t)||f.isArrayBuffer(t))return t.byteLength;if(f.isURLSearchParams(t)&&(t=t+""),f.isString(t))return(await $a(t)).byteLength},Wa=async(t,e)=>{const r=f.toFiniteNumber(t.getContentLength());return r??za(e)},Ya=tt&&(async t=>{let{url:e,method:r,data:n,signal:s,cancelToken:o,timeout:i,onDownloadProgress:a,onUploadProgress:d,responseType:l,headers:u,withCredentials:h="same-origin",fetchOptions:S}=Pn(t);l=l?(l+"").toLowerCase():"text";let y=Ba([s,o&&o.toAbortSignal()],i),g;const p=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let b;try{if(d&&Va&&r!=="get"&&r!=="head"&&(b=await Wa(u,n))!==0){let M=new Request(e,{method:"POST",body:n,duplex:"half"}),B;if(f.isFormData(n)&&(B=M.headers.get("content-type"))&&u.setContentType(B),M.body){const[X,se]=Lr(b,Je(qr(d)));n=Fr(M.body,Ur,X,se)}}f.isString(h)||(h=h?"include":"omit");const O="credentials"in Request.prototype;g=new Request(e,{...S,signal:y,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:O?h:void 0});let w=await fetch(g);const _=Mt&&(l==="stream"||l==="response");if(Mt&&(a||_&&p)){const M={};["status","statusText","headers"].forEach(ae=>{M[ae]=w[ae]});const B=f.toFiniteNumber(w.headers.get("content-length")),[X,se]=a&&Lr(B,Je(qr(a),!0))||[];w=new Response(Fr(w.body,Ur,X,()=>{se&&se(),p&&p()}),M)}l=l||"text";let k=await Ge[f.findKey(Ge,l)||"text"](w,t);return!_&&p&&p(),await new Promise((M,B)=>{Cn(M,B,{data:k,headers:V.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:g})})}catch(O){throw p&&p(),O&&O.name==="TypeError"&&/fetch/i.test(O.message)?Object.assign(new C("Network Error",C.ERR_NETWORK,t,g),{cause:O.cause||O}):C.from(O,O&&O.code,t,g)}}),Lt={http:ca,xhr:qa,fetch:Ya};f.forEach(Lt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Hr=t=>`- ${t}`,Ja=t=>f.isFunction(t)||t===null||t===!1,Nn={getAdapter:t=>{t=f.isArray(t)?t:[t];const{length:e}=t;let r,n;const s={};for(let o=0;o<e;o++){r=t[o];let i;if(n=r,!Ja(r)&&(n=Lt[(i=String(r)).toLowerCase()],n===void 0))throw new C(`Unknown adapter '${i}'`);if(n)break;s[i||"#"+o]=n}if(!n){const o=Object.entries(s).map(([a,d])=>`adapter ${a} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=e?o.length>1?`since :
37
37
  `+o.map(Hr).join(`
@@ -1004,12 +1004,14 @@ const Cu = W(
1004
1004
  t({ positionBlock: r });
1005
1005
  },
1006
1006
  addBlock: (r, n) => {
1007
- const s = e().blocks, o = s[r] || {}, i = e().positionBlock, a = kt(), d = Object.keys(o);
1007
+ const s = e().blocks, o = s[r] || {}, i = e().positionBlock, a = kt();
1008
+ o[a] = {
1009
+ name: n.name,
1010
+ value: n.value
1011
+ };
1012
+ const d = Object.keys(o);
1008
1013
  if (i === null || i >= d.length)
1009
- o[a] = {
1010
- name: n.name,
1011
- value: { ...n.value }
1012
- }, t({
1014
+ t({
1013
1015
  blocks: {
1014
1016
  ...s,
1015
1017
  [r]: o
@@ -1037,6 +1039,7 @@ const Cu = W(
1037
1039
  i[n] = {
1038
1040
  name: s.name,
1039
1041
  value: { ...s.value }
1042
+ // Здесь редактируем только экземпляр конкретного блока
1040
1043
  }, t({
1041
1044
  blocks: {
1042
1045
  ...o,
@@ -1097,6 +1100,9 @@ const Cu = W(
1097
1100
  hoverBlockId: null,
1098
1101
  isMouseOverModal: !1,
1099
1102
  hideTimeout: null,
1103
+ setHoverBlockId: (r) => {
1104
+ t({ hoverBlockId: r });
1105
+ },
1100
1106
  showModal: (r) => {
1101
1107
  e().hideTimeout && clearTimeout(e().hideTimeout), t({ isModalVisible: !0, hoverBlockId: r });
1102
1108
  },
@@ -1439,9 +1445,7 @@ const K = /* @__PURE__ */ cn(Xs), ie = (t) => {
1439
1445
  width: a,
1440
1446
  height: d,
1441
1447
  rotated: l = !1
1442
- } = t;
1443
- console.log(r);
1444
- const [u, h] = F.useState(() => r);
1448
+ } = t, [u, h] = F.useState(() => r);
1445
1449
  return F.useEffect(() => {
1446
1450
  r || (async () => {
1447
1451
  try {
@@ -1,12 +1,8 @@
1
1
  import { IBlock } from '../abstractions';
2
- interface Block {
3
- name: string;
4
- value: any;
5
- }
6
2
  interface Options {
7
3
  header: IBlock | null;
8
4
  footer: IBlock | null;
9
- blocks: Record<string, Record<string, Block>>;
5
+ blocks: Record<string, Record<string, any>>;
10
6
  currentBlock: string | null;
11
7
  positionBlock: number | null;
12
8
  setHeader: (header: IBlock) => void;
@@ -15,8 +11,8 @@ interface Options {
15
11
  deletePage: (name: string) => void;
16
12
  updatePage: (oldName: string, newName: string) => void;
17
13
  setPositionBlock: (positionBlock: number | null) => void;
18
- addBlock: (path: string, block: Block) => void;
19
- editBlock: (path: string, id: string, block: Block) => void;
14
+ addBlock: (path: string, any: any) => void;
15
+ editBlock: (path: string, id: string, any: any) => void;
20
16
  removeBlock: (path: string, blockName: string) => void;
21
17
  setCurrentBlock: (blockName: string | null) => void;
22
18
  moveBlock: (path: string, fromIndex: number, toIndex: number) => void;
@@ -11,6 +11,7 @@ interface Options {
11
11
  isPreviewVisible: boolean;
12
12
  showPreview: (blockId: string) => void;
13
13
  hidePreview: () => void;
14
+ setHoverBlockId: (hoverBlockId: string | null) => void;
14
15
  }
15
16
  export declare const useSubmodalStore: import("zustand").UseBoundStore<import("zustand").StoreApi<Options>>;
16
17
  export {};
@@ -1,7 +1,7 @@
1
1
  import { ModalOption } from './popup';
2
2
  import { Other } from '../OtherSettings';
3
3
  export interface ItemBase {
4
- image?: string;
4
+ images: string[];
5
5
  name: string;
6
6
  id: string;
7
7
  }
@@ -0,0 +1,49 @@
1
+ import { Other } from '../OtherSettings';
2
+ import { Listing } from '../../abstractions';
3
+ interface ListingData {
4
+ id: number;
5
+ link: {
6
+ to: string;
7
+ };
8
+ productData: {
9
+ compareAtPrice: {
10
+ amount: number;
11
+ currency: string;
12
+ };
13
+ images: string[];
14
+ isInStock: boolean;
15
+ minPrice: {
16
+ amount: number;
17
+ currency: string;
18
+ };
19
+ name: string;
20
+ shortDescription: string;
21
+ stats: {
22
+ averageRating: number;
23
+ totalReviews: number;
24
+ totalSold: number;
25
+ };
26
+ uniquePath: string;
27
+ };
28
+ type: string;
29
+ }
30
+ interface Props {
31
+ isActiveItems?: boolean;
32
+ setIsActiveItems?: (value: boolean) => void;
33
+ items: Listing[];
34
+ setItems: (value: Listing[]) => void;
35
+ title?: string;
36
+ subtitle?: string;
37
+ editable?: boolean;
38
+ draggable?: boolean;
39
+ withImage?: boolean;
40
+ deletable?: boolean;
41
+ addable?: boolean;
42
+ other?: Other[];
43
+ addableOptions?: Record<string, any>;
44
+ itemsType: 'select';
45
+ itemsPlaceholder?: never;
46
+ itemsOptions: ListingData[];
47
+ }
48
+ export declare const ListingSelector: (props: Props) => import("react/jsx-runtime").JSX.Element;
49
+ export {};
@@ -0,0 +1,12 @@
1
+ import { Listing } from '../../abstractions';
2
+ interface Props {
3
+ activeItem: Listing;
4
+ setActiveItem: (value: Listing | null) => void;
5
+ setIsOpenModal: React.Dispatch<React.SetStateAction<boolean>>;
6
+ popupPosition: {
7
+ top: number;
8
+ left: number;
9
+ };
10
+ }
11
+ export declare const ListingPopup: (props: Props) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -7,3 +7,4 @@ export * from './TypesText';
7
7
  export * from './ChooseImage';
8
8
  export * from './ButtonTypeSettings';
9
9
  export * from './RangeSelector';
10
+ export * from './ListingSelector';
package/dist/ui.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-aZQncUjW.cjs"),b=require("react"),V="_wrapper_1g82c_2",W="_alignmentBlock_1g82c_8",X="_title_1g82c_15",Z="_subtitle_1g82c_22",tt="_alignmentContent_1g82c_29",et="_alignments_1g82c_35",st="_alignment_1g82c_8",nt="_circle_1g82c_54",ot="_paddings_1g82c_61",it="_padding_1g82c_61",ct="_input_1g82c_79",v={wrapper:V,alignmentBlock:W,title:X,subtitle:Z,alignmentContent:tt,alignments:et,alignment:st,circle:nt,paddings:ot,padding:it,input:ct},lt=["topLeft","top","topRight","left","center","right","bottomLeft","bottom","bottomRight"],rt=["left","top","right","bottom"],at=x=>{const{alignment:s,padding:o,setPadding:i,setAlignment:c}=x;function e(){switch(s){case"left":case"topLeft":case"bottomLeft":return"left";case"right":case"topRight":case"bottomRight":return"right";case"center":case"top":case"bottom":return"center";default:return"center"}}return t.jsxRuntimeExports.jsxs("div",{className:v.layout,children:[t.jsxRuntimeExports.jsx("h3",{className:v.title,children:"Layout"}),t.jsxRuntimeExports.jsxs("div",{className:v.alignmentBlock,children:[t.jsxRuntimeExports.jsx("h5",{className:v.subtitle,children:"Alignment"}),t.jsxRuntimeExports.jsxs("div",{className:v.alignmentContent,children:[t.jsxRuntimeExports.jsx("div",{className:v.alignments,children:lt.map(n=>t.jsxRuntimeExports.jsxs("div",{onClick:()=>{c(n)},className:v.alignment,children:[n!==s&&t.jsxRuntimeExports.jsx("div",{className:v.circle}),n===s&&t.jsxRuntimeExports.jsx(t.Icon,{name:`text-align-${e()}`,fill:"#FF3F19",width:22,height:22})]},n))}),t.jsxRuntimeExports.jsx("div",{className:v.paddings,children:rt.map(n=>t.jsxRuntimeExports.jsxs("label",{className:v.padding,children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:`align-${n}`,width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Input,{type:"text",value:String(o[n]),onChange:l=>i({...o,[n]:Number(l)}),paddingless:!0,borderless:!0})]}))})]})]})]})},xt="_subtitle_2zbxx_1",ut="_header_2zbxx_8",dt="_text_2zbxx_9",pt="_top_2zbxx_16",mt="_itemsBlock_2zbxx_23",C={subtitle:xt,header:ut,text:dt,top:pt,itemsBlock:mt},_t="_typeTexts_3zlec_1",ht="_block_3zlec_7",gt="_active_3zlec_18",A={typeTexts:_t,block:ht,active:gt},jt=["bold","italic","underline","strike-through","code"],L=x=>{const{typesText:s,setTypesText:o}=x;return t.jsxRuntimeExports.jsx("div",{className:A.typeTexts,children:jt.map(i=>t.jsxRuntimeExports.jsx("div",{className:t.clx(A.block,{[A.active]:s.includes(i)}),onClick:()=>{const c=[...s];if(c.includes(i)){const e=c.filter(n=>n!==i);o(e)}else c.push(i),o(c)},children:t.jsxRuntimeExports.jsx(t.Icon,{name:`text-${i}`,fill:s.includes(i)?"#252525":"#757575",width:20,height:20})},String(i)))})},M=x=>{const{typesText:s,isActiveText:o,setIsActiveText:i,text:c,setText:e,setTypesText:n,title:l,subtitle:_="Items"}=x;return t.jsxRuntimeExports.jsxs("div",{className:C.text,children:[(l||o)&&t.jsxRuntimeExports.jsxs("div",{className:C.top,children:[l&&t.jsxRuntimeExports.jsx("h3",{className:C.title,children:l}),o&&i&&t.jsxRuntimeExports.jsx(t.Switch,{current:o,onChange:f=>i(f)})]}),t.jsxRuntimeExports.jsxs("div",{className:C.itemsBlock,children:[t.jsxRuntimeExports.jsx("h5",{className:C.subtitle,children:_}),t.jsxRuntimeExports.jsx(t.Textarea,{onChange:f=>e(f),value:c,maxLength:150}),t.jsxRuntimeExports.jsx(L,{typesText:s,setTypesText:n})]})]})},bt="_subtitle_1nl8x_1",ft="_header_1nl8x_8",Rt="_text_1nl8x_9",Et="_productsBlock_1nl8x_10",vt="_top_1nl8x_22",kt="_itemsBlock_1nl8x_29",yt="_typeTexts_1nl8x_35",wt="_block_1nl8x_41",$t="_active_1nl8x_52",It="_products_1nl8x_10",Bt="_product_1nl8x_10",Nt="_button_1nl8x_70",Ct="_image_1nl8x_80",Tt="_info_1nl8x_87",St="_name_1nl8x_98",Pt="_buttons_1nl8x_102",At="_modal_1nl8x_108",Ot="_link_1nl8x_126",Lt="_modalOptions_1nl8x_132",j={subtitle:bt,header:ft,text:Rt,productsBlock:Et,top:vt,itemsBlock:kt,typeTexts:yt,block:wt,active:$t,products:It,product:Bt,button:Nt,image:Ct,info:Tt,name:St,buttons:Pt,modal:At,link:Ot,modalOptions:Lt},Dt=x=>{const{activeItem:s,setActiveItem:o,popupPosition:i,modalOptions:c}=x;return t.jsxRuntimeExports.jsxs("div",{className:j.modal,onClick:e=>{e.stopPropagation()},style:{top:`${i.top}px`,left:`${i.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:j.top,children:[t.jsxRuntimeExports.jsx("h3",{children:s.name}),t.jsxRuntimeExports.jsx(t.Icon,{name:"x",height:20,width:20,hoverable:!0,onClick:()=>o(null)})]}),t.jsxRuntimeExports.jsx("div",{className:j.modalOptions,children:c.map(e=>{if(e.type==="image")return t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",onChange:n=>{const l={...s,[e.field]:n[0]};o(l)}});if(e.type==="text")return t.jsxRuntimeExports.jsx(M,{typesText:s[e.field.type],setTypesText:n=>{const l={...s,[e.field.type]:n};o(l)},text:s[e.field.text]||"",setText:n=>{const l={...s,[e.field.text]:n};o(l)},subtitle:e.label});if(e.type==="input")return t.jsxRuntimeExports.jsx(t.Input,{onChange:n=>{const l={...s,[e.field]:n};o(l)},value:s[e.field]||"",label:e.label,placeholder:e.placeholder});if(e.type==="inputSwitch")return t.jsxRuntimeExports.jsxs("div",{className:j.link,children:[t.jsxRuntimeExports.jsx(t.Input,{onChange:n=>{const l={...s,[e.field.text]:n};o(l)},value:s[e.field.text]||"",label:e.inputLabel,placeholder:e.placeholder}),t.jsxRuntimeExports.jsx(t.Switch,{current:!!s[e.field.switch]||!1,label:e.switchLabel,onChange:n=>{const l={...s,[e.field.switch]:n};o(l)}})]});if(e.type==="list")return t.jsxRuntimeExports.jsx(F,{items:s[e.field]||[],setItems:n=>{const l={...s,[e.field]:n};o(l)},itemsType:"select",draggable:e.draggable||!1,itemsOptions:e.itemsOptions,deletable:e.deletable||!1,editable:!1,subtitle:e.label});if(e.type==="select")return t.jsxRuntimeExports.jsx(t.Select,{options:e.itemsOptions,onChange:n=>{const l={...s,[e.field]:n};o(l)},label:e.label,value:s[e.field]||"String"})})})]})},zt="_other_1wtgi_1",Ht="_subtitle_1wtgi_7",Mt="_items_1wtgi_14",O={other:zt,subtitle:Ht,items:Mt},Ft=x=>{const{items:s,title:o="Other"}=x;return t.jsxRuntimeExports.jsxs("div",{className:O.other,children:[t.jsxRuntimeExports.jsx("h5",{className:O.subtitle,children:o}),t.jsxRuntimeExports.jsx("div",{className:O.items,children:s.map(i=>t.jsxRuntimeExports.jsx(t.Switch,{current:i.isItem,onChange:c=>i.setIsItem(c),label:i.label,hasBackground:!0,paddingless:!1}))})]})},Gt=x=>{const{index:s,moveProduct:o,children:i}=x,[,c]=t.useDrop({accept:"product",hover(l){l.index!==s&&(o(l.index,s),l.index=s)}}),[{isDragging:e},n]=t.useDrag({type:"product",item:{index:s},collect:l=>({isDragging:l.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:l=>n(c(l)),className:`${j.product} ${e?j.dragging:""}`,children:i})},F=x=>{const{isActiveItems:s,setIsActiveItems:o,items:i,setItems:c,other:e,title:n,subtitle:l,editable:_=!0,draggable:f=!1,withImage:a=!1,deletable:p=!0,addable:u=!0,itemsType:R,itemsPlaceholder:h="",itemsOptions:d,hasRangeSelector:S=!1,rangeSelectorOptions:D,modalOptions:z,addableOptions:P={}}=x,[$,B]=b.useState(null),[Y,U]=b.useState({top:0,left:0}),J=(r,E)=>{const k=[...i],[g]=k.splice(r,1);k.splice(E,0,g),c(k)};b.useEffect(()=>{const r=()=>{B(null)};return document.body.addEventListener("click",r),B(null),()=>{B(null),document.body.removeEventListener("click",r)}},[]),b.useEffect(()=>{if($){const r=[...i].map(E=>E.id===$.id?$:E);c(r)}},[$]);const K=(r,E)=>{r.stopPropagation();const k=r.target.getBoundingClientRect(),g=100,N=window.innerHeight;let y=k.top+window.scrollY;y+g>N&&(y=N-g-20),U({top:y-80,left:k.left-30}),B(E)};function Q(r){if(a)return r?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${r}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"image",width:16,height:16,fill:"#757575"})}const H=(r,E)=>{const k=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[f&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"drag",hoverable:!0,width:20,height:20})}),R==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:g=>{const y=[...i].map(w=>w.id===r.id?{...r,name:g}:w);c(y)},value:r.name,options:d,leftAddon:Q(r.image)}),R==="input"&&t.jsxRuntimeExports.jsx(t.Input,{onChange:g=>{const y=[...i].map(w=>w.id===r.id?{...r,name:g}:w);c(y)},value:r.name,placeholder:h}),R==="image"&&t.jsxRuntimeExports.jsx(t.ChooseImage,{onChange:g=>{const y=[...i].map(w=>w.id===r.id?{...r,image:g[0]}:w);c(y)}}),t.jsxRuntimeExports.jsxs("div",{className:j.buttons,children:[_&&t.jsxRuntimeExports.jsx(t.Icon,{name:"sliders",hoverable:!0,width:20,height:20,onClick:g=>K(g,r)}),p&&t.jsxRuntimeExports.jsx(t.Icon,{name:"trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>c(i.filter(g=>g.id!==r.id))})]})]});return f?t.jsxRuntimeExports.jsx(Gt,{product:r,index:E,moveProduct:J,children:k},r.id):t.jsxRuntimeExports.jsx("div",{className:j.product,children:k},r.id)};return t.jsxRuntimeExports.jsxs("div",{className:j.productsBlock,children:[(n||s!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:j.top,children:[n&&t.jsxRuntimeExports.jsx("h3",{className:j.title,children:n}),s!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:s,onChange:r=>o==null?void 0:o(r)})]}),$&&_&&z&&t.jsxRuntimeExports.jsx(Dt,{activeItem:$,setActiveItem:B,popupPosition:Y,modalOptions:z}),S&&D&&t.jsxRuntimeExports.jsx(q,{...D}),t.jsxRuntimeExports.jsxs("div",{className:j.products,children:[l&&t.jsxRuntimeExports.jsx("h5",{className:j.subtitle,children:l}),f?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:i.map((r,E)=>H(r,E))}):i.map((r,E)=>H(r,E)),u&&t.jsxRuntimeExports.jsxs(t.Button,{className:j.button,size:"s",onClick:()=>{const r=[...i];R==="select"?r.push({name:d[0]||`Product ${i.length+1}`,id:t.v4(),...P}):R==="input"?r.push({name:"",id:t.v4(),...P}):r.push({name:`Image ${i.length+1}`,id:t.v4(),...P}),c(r)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"plus",width:16,height:16})]})]}),e!==void 0&&t.jsxRuntimeExports.jsx(Ft,{items:e})]})},qt="_subtitle_41klp_1",Yt="_header_41klp_8",Ut="_text_41klp_9",Jt="_productsBlock_41klp_10",Kt="_buttonsBlock_41klp_11",Qt="_top_41klp_21",Vt="_itemsBlock_41klp_28",Wt="_typeTexts_41klp_34",Xt="_block_41klp_40",Zt="_active_41klp_51",te="_products_41klp_10",ee="_product_41klp_10",se="_button_41klp_11",ne="_image_41klp_79",oe="_info_41klp_86",ie="_name_41klp_97",ce="_buttons_41klp_11",le="_modal_41klp_107",re="_other_41klp_124",ae="_options_41klp_130",I={subtitle:qt,header:Yt,text:Ut,productsBlock:Jt,buttonsBlock:Kt,top:Qt,itemsBlock:Vt,typeTexts:Wt,block:Xt,active:Zt,products:te,product:ee,button:se,image:ne,info:oe,name:ie,buttons:ce,modal:le,other:re,options:ae},xe=x=>{const{activeButton:s,setActiveButton:o,popupPosition:i}=x,[c,e]=b.useState(s.typesText),[n,l]=b.useState(s.destination),[_,f]=b.useState(s.link||""),[a,p]=b.useState(s.text||"");return b.useEffect(()=>{o({...s,...{text:a,link:_,destination:n,typesText:c}})},[c,n,_,a]),t.jsxRuntimeExports.jsxs("div",{className:I.modal,onClick:u=>{u.stopPropagation()},style:{top:`${i.top}px`,left:`${i.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:I.top,children:[t.jsxRuntimeExports.jsx("h3",{children:s.type}),t.jsxRuntimeExports.jsx(t.Icon,{name:"x",height:20,width:20,hoverable:!0,onClick:()=>o(null)})]}),t.jsxRuntimeExports.jsxs("div",{className:I.options,children:[t.jsxRuntimeExports.jsx(t.Select,{label:"Destination",onChange:u=>l(u),options:["Go to Page","Open Link"],value:n}),n==="Go to Page"?t.jsxRuntimeExports.jsx(t.Select,{label:"Go to",onChange:()=>{},options:[],value:"Homepage"}):t.jsxRuntimeExports.jsx(t.Input,{onChange:u=>f(u),value:_,placeholder:"https://",label:"Link"}),t.jsxRuntimeExports.jsx(t.Switch,{current:!1,label:"Open in new tab"}),t.jsxRuntimeExports.jsx(t.Textarea,{onChange:u=>p(u),value:a,label:"Text",maxLength:150}),t.jsxRuntimeExports.jsx(L,{typesText:c,setTypesText:e})]})]})},ue="_subtitle_1y5sw_1",de="_header_1y5sw_8",pe="_text_1y5sw_9",me="_productsBlock_1y5sw_10",_e="_buttonsBlock_1y5sw_11",he="_top_1y5sw_22",ge="_itemsBlock_1y5sw_29",je="_typeTexts_1y5sw_35",be="_block_1y5sw_41",fe="_active_1y5sw_52",Re="_products_1y5sw_10",Ee="_product_1y5sw_10",ve="_button_1y5sw_11",ke="_image_1y5sw_80",ye="_info_1y5sw_87",we="_name_1y5sw_98",$e="_buttons_1y5sw_11",Ie="_modal_1y5sw_108",Be="_other_1y5sw_125",Ne="_options_1y5sw_131",T={subtitle:ue,header:de,text:pe,productsBlock:me,buttonsBlock:_e,top:he,itemsBlock:ge,typeTexts:je,block:be,active:fe,products:Re,product:Ee,button:ve,image:ke,info:ye,name:we,buttons:$e,modal:Ie,other:Be,options:Ne},G=x=>{const{buttons:s,setButtons:o,deletable:i=!0,addable:c=!0}=x,[e,n]=b.useState(null),[l,_]=b.useState({top:0,left:0});b.useEffect(()=>{const a=()=>{n(null)};return document.body.addEventListener("click",a),n(null),()=>{n(null),document.body.removeEventListener("click",a)}},[]),b.useEffect(()=>{if(e){const a=[...s].map(p=>p.id===e.id?e:p);o(a)}},[e]),console.log(s);const f=(a,p)=>{a.stopPropagation();const u=a.target.getBoundingClientRect(),R=490,h=window.innerHeight;let d=u.top+window.scrollY;d+R>h&&(d=h-R-20),_({top:d,left:u.left-30}),n(p)};return t.jsxRuntimeExports.jsxs("div",{className:T.products,children:[t.jsxRuntimeExports.jsx("h5",{className:T.subtitle,children:"Button Type"}),s.map(a=>t.jsxRuntimeExports.jsxs("div",{className:T.product,children:[t.jsxRuntimeExports.jsx(t.Select,{onChange:p=>{const R=[...s].map(h=>h.id===a.id?{...a,type:p}:h);o(R)},value:a.type,options:["Primary","Secondary","Tertiary"]}),t.jsxRuntimeExports.jsxs("div",{className:T.buttons,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"sliders",hoverable:!0,width:20,height:20,onClick:p=>{f(p,a)}}),i&&t.jsxRuntimeExports.jsx(t.Icon,{name:"trash",hoverable:!0,onClick:()=>{const p=s.filter(u=>u.id!==a.id);o(p)},width:20,height:20,fill:"#C12A2A"})]})]},a.id)),e&&t.jsxRuntimeExports.jsx(xe,{activeButton:e,setActiveButton:n,popupPosition:l}),c&&t.jsxRuntimeExports.jsxs(t.Button,{className:T.button,size:"s",onClick:()=>{const a=[...s];a.push({type:"Primary",id:t.v4(),typesText:[],destination:"Go to Page",text:""}),o(a)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"plus",width:16,height:16})]})]})},Ce=x=>{const{isActiveButtons:s,setIsActiveButtons:o,buttons:i,setButtons:c}=x;return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsxs("div",{className:I.buttonsBlock,children:[t.jsxRuntimeExports.jsxs("div",{className:I.top,children:[t.jsxRuntimeExports.jsx("h3",{className:I.title,children:"Buttons"}),t.jsxRuntimeExports.jsx(t.Switch,{current:s,onChange:e=>o(e)})]}),t.jsxRuntimeExports.jsx(G,{buttons:i,setButtons:c})]})})},Te="_wrapper_tn7gb_1",Se="_subtitle_tn7gb_7",Pe="_content_tn7gb_14",Ae="_range_tn7gb_21",Oe="_track_tn7gb_26",Le="_progress_tn7gb_35",De="_dots_tn7gb_45",ze="_dot_tn7gb_45",He="_active_tn7gb_62",Me="_input_tn7gb_74",Fe="_countBlock_tn7gb_88",Ge="_count_tn7gb_88",qe="_controls_tn7gb_103",Ye="_button_tn7gb_108",m={wrapper:Te,subtitle:Se,content:Pe,range:Ae,track:Oe,progress:Le,dots:De,dot:ze,active:He,input:Me,countBlock:Fe,count:Ge,controls:qe,button:Ye},q=x=>{const{label:s,min:o=1,max:i=4,step:c=1,count:e,setCount:n}=x,[l,_]=b.useState(!1),f=Array.from({length:(i-o)/c+1}),a=(e-o)/(i-o)*100,p=()=>{e<i&&n(e+c)},u=()=>{e>o&&n(e-c)},R=h=>{const d=o+h*c;n(d)};return t.jsxRuntimeExports.jsxs("div",{className:m.wrapper,children:[s&&t.jsxRuntimeExports.jsx("h5",{className:m.subtitle,children:s}),t.jsxRuntimeExports.jsxs("div",{className:m.content,children:[t.jsxRuntimeExports.jsxs("div",{className:m.range,children:[t.jsxRuntimeExports.jsx("div",{className:m.track}),t.jsxRuntimeExports.jsx("div",{className:m.progress,style:{width:`${a}%`}}),t.jsxRuntimeExports.jsx("div",{className:m.dots,children:f.map((h,d)=>{const S=d<=(e-o)/c;return t.jsxRuntimeExports.jsx("button",{onClick:()=>R(d),className:t.clx(m.dot,{[m.active]:S,[m.inactive]:!S,[m.dragging]:l}),"aria-label":`Set value to ${o+d*c}`},d)})}),t.jsxRuntimeExports.jsx("input",{type:"range",min:o,max:i,step:c,value:e,onChange:h=>n(Number(h.target.value)),onMouseDown:()=>_(!0),onMouseUp:()=>_(!1),onTouchStart:()=>_(!0),onTouchEnd:()=>_(!1),className:m.input})]}),t.jsxRuntimeExports.jsxs("div",{className:m.countBlock,children:[t.jsxRuntimeExports.jsx(t.Input,{type:"number",min:o,max:i,paddingless:!0,onChange:h=>{const d=Number(h);d>i?n(i):d<o?n(o):n(d)},value:String(e)}),t.jsxRuntimeExports.jsxs("div",{className:m.controls,children:[t.jsxRuntimeExports.jsx("button",{onClick:p,disabled:e>=i,className:m.button,"aria-label":"Increment count",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"arrow-down",width:15,height:15,rotated:!0})}),t.jsxRuntimeExports.jsx("button",{onClick:u,disabled:e<=o,className:m.button,"aria-label":"Decrement count",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"arrow-down",width:15,height:15})})]})]})]})]})};exports.Button=t.Button;exports.Checkbox=t.Checkbox;exports.ChooseImage=t.ChooseImage;exports.ChooseImageModal=t.ChooseImageModal;exports.ColorPicker=t.ColorPicker;exports.Icon=t.Icon;exports.Input=t.Input;exports.Modal=t.Modal;exports.Picker=t.Picker;exports.Radio=t.Radio;exports.Select=t.Select;exports.Submodal=t.Submodal;exports.Switch=t.Switch;exports.Textarea=t.Textarea;exports.Tip=t.Tip;exports.ButtonTypeSettings=G;exports.ButtonsSettings=Ce;exports.ItemsSettings=F;exports.LayoutSettings=at;exports.RangeSelector=q;exports.TextSettings=M;exports.TypesText=L;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-C2h2e3d1.cjs"),h=require("react"),X="_wrapper_1g82c_2",Z="_alignmentBlock_1g82c_8",tt="_title_1g82c_15",et="_subtitle_1g82c_22",st="_alignmentContent_1g82c_29",nt="_alignments_1g82c_35",ot="_alignment_1g82c_8",it="_circle_1g82c_54",ct="_paddings_1g82c_61",lt="_padding_1g82c_61",rt="_input_1g82c_79",C={wrapper:X,alignmentBlock:Z,title:tt,subtitle:et,alignmentContent:st,alignments:nt,alignment:ot,circle:it,paddings:ct,padding:lt,input:rt},at=["topLeft","top","topRight","left","center","right","bottomLeft","bottom","bottomRight"],xt=["left","top","right","bottom"],ut=x=>{const{alignment:s,padding:i,setPadding:n,setAlignment:r}=x;function e(){switch(s){case"left":case"topLeft":case"bottomLeft":return"left";case"right":case"topRight":case"bottomRight":return"right";case"center":case"top":case"bottom":return"center";default:return"center"}}return t.jsxRuntimeExports.jsxs("div",{className:C.layout,children:[t.jsxRuntimeExports.jsx("h3",{className:C.title,children:"Layout"}),t.jsxRuntimeExports.jsxs("div",{className:C.alignmentBlock,children:[t.jsxRuntimeExports.jsx("h5",{className:C.subtitle,children:"Alignment"}),t.jsxRuntimeExports.jsxs("div",{className:C.alignmentContent,children:[t.jsxRuntimeExports.jsx("div",{className:C.alignments,children:at.map(o=>t.jsxRuntimeExports.jsxs("div",{onClick:()=>{r(o)},className:C.alignment,children:[o!==s&&t.jsxRuntimeExports.jsx("div",{className:C.circle}),o===s&&t.jsxRuntimeExports.jsx(t.Icon,{name:`text-align-${e()}`,fill:"#FF3F19",width:22,height:22})]},o))}),t.jsxRuntimeExports.jsx("div",{className:C.paddings,children:xt.map(o=>t.jsxRuntimeExports.jsxs("label",{className:C.padding,children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:`align-${o}`,width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Input,{type:"text",value:String(i[o]),onChange:l=>n({...i,[o]:Number(l)}),paddingless:!0,borderless:!0})]}))})]})]})]})},dt="_subtitle_2zbxx_1",pt="_header_2zbxx_8",mt="_text_2zbxx_9",_t="_top_2zbxx_16",ht="_itemsBlock_2zbxx_23",D={subtitle:dt,header:pt,text:mt,top:_t,itemsBlock:ht},gt="_typeTexts_3zlec_1",jt="_block_3zlec_7",bt="_active_3zlec_18",Y={typeTexts:gt,block:jt,active:bt},ft=["bold","italic","underline","strike-through","code"],U=x=>{const{typesText:s,setTypesText:i}=x;return t.jsxRuntimeExports.jsx("div",{className:Y.typeTexts,children:ft.map(n=>t.jsxRuntimeExports.jsx("div",{className:t.clx(Y.block,{[Y.active]:s.includes(n)}),onClick:()=>{const r=[...s];if(r.includes(n)){const e=r.filter(o=>o!==n);i(e)}else r.push(n),i(r)},children:t.jsxRuntimeExports.jsx(t.Icon,{name:`text-${n}`,fill:s.includes(n)?"#252525":"#757575",width:20,height:20})},String(n)))})},J=x=>{const{typesText:s,isActiveText:i,setIsActiveText:n,text:r,setText:e,setTypesText:o,title:l,subtitle:b="Items"}=x;return t.jsxRuntimeExports.jsxs("div",{className:D.text,children:[(l||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:D.top,children:[l&&t.jsxRuntimeExports.jsx("h3",{className:D.title,children:l}),i!==void 0&&n&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:f=>n(f)})]}),t.jsxRuntimeExports.jsxs("div",{className:D.itemsBlock,children:[t.jsxRuntimeExports.jsx("h5",{className:D.subtitle,children:b}),t.jsxRuntimeExports.jsx(t.Textarea,{onChange:f=>e(f),value:r,maxLength:150}),t.jsxRuntimeExports.jsx(U,{typesText:s,setTypesText:o})]})]})},Et="_subtitle_1nl8x_1",Rt="_header_1nl8x_8",vt="_text_1nl8x_9",kt="_productsBlock_1nl8x_10",yt="_top_1nl8x_22",$t="_itemsBlock_1nl8x_29",wt="_typeTexts_1nl8x_35",It="_block_1nl8x_41",Bt="_active_1nl8x_52",Nt="_products_1nl8x_10",Ct="_product_1nl8x_10",Pt="_button_1nl8x_70",Tt="_image_1nl8x_80",St="_info_1nl8x_87",At="_name_1nl8x_98",Ot="_buttons_1nl8x_102",Dt="_modal_1nl8x_108",Lt="_link_1nl8x_126",Ht="_modalOptions_1nl8x_132",y={subtitle:Et,header:Rt,text:vt,productsBlock:kt,top:yt,itemsBlock:$t,typeTexts:wt,block:It,active:Bt,products:Nt,product:Ct,button:Pt,image:Tt,info:St,name:At,buttons:Ot,modal:Dt,link:Lt,modalOptions:Ht},Mt=x=>{const{activeItem:s,setActiveItem:i,popupPosition:n,modalOptions:r}=x;return t.jsxRuntimeExports.jsxs("div",{className:y.modal,onClick:e=>{e.stopPropagation()},style:{top:`${n.top}px`,left:`${n.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:y.top,children:[t.jsxRuntimeExports.jsx("h3",{children:s.name}),t.jsxRuntimeExports.jsx(t.Icon,{name:"x",height:20,width:20,hoverable:!0,onClick:()=>i(null)})]}),t.jsxRuntimeExports.jsx("div",{className:y.modalOptions,children:r.map(e=>{if(e.type==="image")return t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",onChange:o=>{const l={...s,[e.field]:o};i(l)}});if(e.type==="text")return t.jsxRuntimeExports.jsx(J,{typesText:s[e.field.type],setTypesText:o=>{const l={...s,[e.field.type]:o};i(l)},text:s[e.field.text]||"",setText:o=>{const l={...s,[e.field.text]:o};i(l)},subtitle:e.label});if(e.type==="input")return t.jsxRuntimeExports.jsx(t.Input,{onChange:o=>{const l={...s,[e.field]:o};i(l)},value:s[e.field]||"",label:e.label,placeholder:e.placeholder});if(e.type==="inputSwitch")return t.jsxRuntimeExports.jsxs("div",{className:y.link,children:[t.jsxRuntimeExports.jsx(t.Input,{onChange:o=>{const l={...s,[e.field.text]:o};i(l)},value:s[e.field.text]||"",label:e.inputLabel,placeholder:e.placeholder}),t.jsxRuntimeExports.jsx(t.Switch,{current:!!s[e.field.switch]||!1,label:e.switchLabel,onChange:o=>{const l={...s,[e.field.switch]:o};i(l)}})]});if(e.type==="list")return t.jsxRuntimeExports.jsx(Q,{items:s[e.field]||[],setItems:o=>{const l={...s,[e.field]:o};i(l)},itemsType:"select",draggable:e.draggable||!1,itemsOptions:e.itemsOptions,deletable:e.deletable||!1,editable:!1,subtitle:e.label});if(e.type==="select")return t.jsxRuntimeExports.jsx(t.Select,{options:e.itemsOptions,onChange:o=>{const l={...s,[e.field]:o};i(l)},label:e.label,value:s[e.field]||"String"})})})]})},zt="_other_1wtgi_1",Ft="_subtitle_1wtgi_7",Gt="_items_1wtgi_14",q={other:zt,subtitle:Ft,items:Gt},K=x=>{const{items:s,title:i="Other"}=x;return t.jsxRuntimeExports.jsxs("div",{className:q.other,children:[t.jsxRuntimeExports.jsx("h5",{className:q.subtitle,children:i}),t.jsxRuntimeExports.jsx("div",{className:q.items,children:s.map(n=>t.jsxRuntimeExports.jsx(t.Switch,{current:n.isItem,onChange:r=>n.setIsItem(r),label:n.label,hasBackground:!0,paddingless:!1}))})]})},Yt=x=>{const{index:s,moveProduct:i,children:n}=x,[,r]=t.useDrop({accept:"product",hover(l){l.index!==s&&(i(l.index,s),l.index=s)}}),[{isDragging:e},o]=t.useDrag({type:"product",item:{index:s},collect:l=>({isDragging:l.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:l=>o(r(l)),className:`${y.product} ${e?y.dragging:""}`,children:n})},Q=x=>{const{isActiveItems:s,setIsActiveItems:i,items:n,setItems:r,other:e,title:o,subtitle:l,editable:b=!0,draggable:f=!1,withImage:u=!1,deletable:g=!0,addable:m=!0,itemsType:k,itemsPlaceholder:p="",itemsOptions:d,hasRangeSelector:B=!1,rangeSelectorOptions:H,modalOptions:M,addableOptions:O={}}=x,[P,T]=h.useState(null),[F,G]=h.useState({top:0,left:0}),z=(c,R)=>{const j=[...n],[_]=j.splice(c,1);j.splice(R,0,_),r(j)};h.useEffect(()=>{const c=()=>{T(null)};return document.body.addEventListener("click",c),T(null),()=>{T(null),document.body.removeEventListener("click",c)}},[]),h.useEffect(()=>{if(P){const c=[...n].map(R=>R.id===P.id?P:R);r(c)}},[P]);const a=(c,R)=>{c.stopPropagation();const j=c.target.getBoundingClientRect(),_=100,S=window.innerHeight;let N=j.top+window.scrollY;N+_>S&&(N=S-_-20),G({top:N-80,left:j.left-30}),T(R)};console.log(n);function E(c){if(u)return c?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${c[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"image",width:16,height:16,fill:"#757575"})}const I=(c,R)=>{const j=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[f&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"drag",hoverable:!0,width:20,height:20})}),k==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:_=>{const N=[...n].map($=>$.id===c.id?{...c,name:_}:$);T({...c,name:_}),r([...N])},value:c.name,options:d,leftAddon:E(c.images)}),k==="input"&&t.jsxRuntimeExports.jsx(t.Input,{onChange:_=>{const N=[...n].map($=>$.id===c.id?{...c,name:_}:$);r([...N])},value:c.name,placeholder:p}),k==="image"&&t.jsxRuntimeExports.jsx(t.ChooseImage,{onChange:_=>{const N=[...n].map($=>$.id===c.id?{...c,image:_[0]}:$);r([...N])}}),t.jsxRuntimeExports.jsxs("div",{className:y.buttons,children:[b&&t.jsxRuntimeExports.jsx(t.Icon,{name:"sliders",hoverable:!0,width:20,height:20,onClick:_=>a(_,c)}),g&&t.jsxRuntimeExports.jsx(t.Icon,{name:"trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>r(n.filter(_=>_.id!==c.id))})]})]});return f?t.jsxRuntimeExports.jsx(Yt,{product:c,index:R,moveProduct:z,children:j},c.id):t.jsxRuntimeExports.jsx("div",{className:y.product,children:j},c.id)};return t.jsxRuntimeExports.jsxs("div",{className:y.productsBlock,children:[(o||s!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:y.top,children:[o&&t.jsxRuntimeExports.jsx("h3",{className:y.title,children:o}),s!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:s,onChange:c=>i==null?void 0:i(c)})]}),P&&b&&M&&t.jsxRuntimeExports.jsx(Mt,{activeItem:P,setActiveItem:T,popupPosition:F,modalOptions:M}),B&&H&&t.jsxRuntimeExports.jsx(W,{...H}),t.jsxRuntimeExports.jsxs("div",{className:y.products,children:[l&&t.jsxRuntimeExports.jsx("h5",{className:y.subtitle,children:l}),f?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:n.map((c,R)=>I(c,R))}):n.map((c,R)=>I(c,R)),m&&t.jsxRuntimeExports.jsxs(t.Button,{className:y.button,size:"s",onClick:()=>{const c=[...n];k==="select"?c.push({name:d[0]||`Product ${n.length+1}`,id:t.v4(),...O}):k==="input"?c.push({name:"",id:t.v4(),...O}):c.push({name:`Image ${n.length+1}`,id:t.v4(),...O}),r(c)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"plus",width:16,height:16})]})]}),e!==void 0&&t.jsxRuntimeExports.jsx(K,{items:e})]})},qt="_subtitle_41klp_1",Ut="_header_41klp_8",Jt="_text_41klp_9",Kt="_productsBlock_41klp_10",Qt="_buttonsBlock_41klp_11",Vt="_top_41klp_21",Wt="_itemsBlock_41klp_28",Xt="_typeTexts_41klp_34",Zt="_block_41klp_40",te="_active_41klp_51",ee="_products_41klp_10",se="_product_41klp_10",ne="_button_41klp_11",oe="_image_41klp_79",ie="_info_41klp_86",ce="_name_41klp_97",le="_buttons_41klp_11",re="_modal_41klp_107",ae="_other_41klp_124",xe="_options_41klp_130",A={subtitle:qt,header:Ut,text:Jt,productsBlock:Kt,buttonsBlock:Qt,top:Vt,itemsBlock:Wt,typeTexts:Xt,block:Zt,active:te,products:ee,product:se,button:ne,image:oe,info:ie,name:ce,buttons:le,modal:re,other:ae,options:xe},ue=x=>{const{activeButton:s,setActiveButton:i,popupPosition:n}=x,[r,e]=h.useState(s.typesText),[o,l]=h.useState(s.destination),[b,f]=h.useState(s.link||""),[u,g]=h.useState(s.text||"");return h.useEffect(()=>{i({...s,...{text:u,link:b,destination:o,typesText:r}})},[r,o,b,u]),t.jsxRuntimeExports.jsxs("div",{className:A.modal,onClick:m=>{m.stopPropagation()},style:{top:`${n.top}px`,left:`${n.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:A.top,children:[t.jsxRuntimeExports.jsx("h3",{children:s.type}),t.jsxRuntimeExports.jsx(t.Icon,{name:"x",height:20,width:20,hoverable:!0,onClick:()=>i(null)})]}),t.jsxRuntimeExports.jsxs("div",{className:A.options,children:[t.jsxRuntimeExports.jsx(t.Select,{label:"Destination",onChange:m=>l(m),options:["Go to Page","Open Link"],value:o}),o==="Go to Page"?t.jsxRuntimeExports.jsx(t.Select,{label:"Go to",onChange:()=>{},options:[],value:"Homepage"}):t.jsxRuntimeExports.jsx(t.Input,{onChange:m=>f(m),value:b,placeholder:"https://",label:"Link"}),t.jsxRuntimeExports.jsx(t.Switch,{current:!1,label:"Open in new tab"}),t.jsxRuntimeExports.jsx(t.Textarea,{onChange:m=>g(m),value:u,label:"Text",maxLength:150}),t.jsxRuntimeExports.jsx(U,{typesText:r,setTypesText:e})]})]})},de="_subtitle_1y5sw_1",pe="_header_1y5sw_8",me="_text_1y5sw_9",_e="_productsBlock_1y5sw_10",he="_buttonsBlock_1y5sw_11",ge="_top_1y5sw_22",je="_itemsBlock_1y5sw_29",be="_typeTexts_1y5sw_35",fe="_block_1y5sw_41",Ee="_active_1y5sw_52",Re="_products_1y5sw_10",ve="_product_1y5sw_10",ke="_button_1y5sw_11",ye="_image_1y5sw_80",$e="_info_1y5sw_87",we="_name_1y5sw_98",Ie="_buttons_1y5sw_11",Be="_modal_1y5sw_108",Ne="_other_1y5sw_125",Ce="_options_1y5sw_131",L={subtitle:de,header:pe,text:me,productsBlock:_e,buttonsBlock:he,top:ge,itemsBlock:je,typeTexts:be,block:fe,active:Ee,products:Re,product:ve,button:ke,image:ye,info:$e,name:we,buttons:Ie,modal:Be,other:Ne,options:Ce},V=x=>{const{buttons:s,setButtons:i,deletable:n=!0,addable:r=!0}=x,[e,o]=h.useState(null),[l,b]=h.useState({top:0,left:0});h.useEffect(()=>{const u=()=>{o(null)};return document.body.addEventListener("click",u),o(null),()=>{o(null),document.body.removeEventListener("click",u)}},[]),h.useEffect(()=>{if(e){const u=[...s].map(g=>g.id===e.id?e:g);i(u)}},[e]);const f=(u,g)=>{u.stopPropagation();const m=u.target.getBoundingClientRect(),k=490,p=window.innerHeight;let d=m.top+window.scrollY;d+k>p&&(d=p-k-20),b({top:d,left:m.left-30}),o(g)};return t.jsxRuntimeExports.jsxs("div",{className:L.products,children:[t.jsxRuntimeExports.jsx("h5",{className:L.subtitle,children:"Button Type"}),s.map(u=>t.jsxRuntimeExports.jsxs("div",{className:L.product,children:[t.jsxRuntimeExports.jsx(t.Select,{onChange:g=>{const k=[...s].map(p=>p.id===u.id?{...u,type:g}:p);i(k)},value:u.type,options:["Primary","Secondary","Tertiary"]}),t.jsxRuntimeExports.jsxs("div",{className:L.buttons,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"sliders",hoverable:!0,width:20,height:20,onClick:g=>{f(g,u)}}),n&&t.jsxRuntimeExports.jsx(t.Icon,{name:"trash",hoverable:!0,onClick:()=>{const g=s.filter(m=>m.id!==u.id);i(g)},width:20,height:20,fill:"#C12A2A"})]})]},u.id)),e&&t.jsxRuntimeExports.jsx(ue,{activeButton:e,setActiveButton:o,popupPosition:l}),r&&t.jsxRuntimeExports.jsxs(t.Button,{className:L.button,size:"s",onClick:()=>{const u=[...s];u.push({type:"Primary",id:t.v4(),typesText:[],destination:"Go to Page",text:""}),i(u)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"plus",width:16,height:16})]})]})},Pe=x=>{const{isActiveButtons:s,setIsActiveButtons:i,buttons:n,setButtons:r}=x;return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsxs("div",{className:A.buttonsBlock,children:[t.jsxRuntimeExports.jsxs("div",{className:A.top,children:[t.jsxRuntimeExports.jsx("h3",{className:A.title,children:"Buttons"}),t.jsxRuntimeExports.jsx(t.Switch,{current:s,onChange:e=>i(e)})]}),t.jsxRuntimeExports.jsx(V,{buttons:n,setButtons:r})]})})},Te="_wrapper_tn7gb_1",Se="_subtitle_tn7gb_7",Ae="_content_tn7gb_14",Oe="_range_tn7gb_21",De="_track_tn7gb_26",Le="_progress_tn7gb_35",He="_dots_tn7gb_45",Me="_dot_tn7gb_45",ze="_active_tn7gb_62",Fe="_input_tn7gb_74",Ge="_countBlock_tn7gb_88",Ye="_count_tn7gb_88",qe="_controls_tn7gb_103",Ue="_button_tn7gb_108",v={wrapper:Te,subtitle:Se,content:Ae,range:Oe,track:De,progress:Le,dots:He,dot:Me,active:ze,input:Fe,countBlock:Ge,count:Ye,controls:qe,button:Ue},W=x=>{const{label:s,min:i=1,max:n=4,step:r=1,count:e,setCount:o}=x,[l,b]=h.useState(!1),f=Array.from({length:(n-i)/r+1}),u=(e-i)/(n-i)*100,g=()=>{e<n&&o(e+r)},m=()=>{e>i&&o(e-r)},k=p=>{const d=i+p*r;o(d)};return t.jsxRuntimeExports.jsxs("div",{className:v.wrapper,children:[s&&t.jsxRuntimeExports.jsx("h5",{className:v.subtitle,children:s}),t.jsxRuntimeExports.jsxs("div",{className:v.content,children:[t.jsxRuntimeExports.jsxs("div",{className:v.range,children:[t.jsxRuntimeExports.jsx("div",{className:v.track}),t.jsxRuntimeExports.jsx("div",{className:v.progress,style:{width:`${u}%`}}),t.jsxRuntimeExports.jsx("div",{className:v.dots,children:f.map((p,d)=>{const B=d<=(e-i)/r;return t.jsxRuntimeExports.jsx("button",{onClick:()=>k(d),className:t.clx(v.dot,{[v.active]:B,[v.inactive]:!B,[v.dragging]:l}),"aria-label":`Set value to ${i+d*r}`},d)})}),t.jsxRuntimeExports.jsx("input",{type:"range",min:i,max:n,step:r,value:e,onChange:p=>o(Number(p.target.value)),onMouseDown:()=>b(!0),onMouseUp:()=>b(!1),onTouchStart:()=>b(!0),onTouchEnd:()=>b(!1),className:v.input})]}),t.jsxRuntimeExports.jsxs("div",{className:v.countBlock,children:[t.jsxRuntimeExports.jsx(t.Input,{type:"number",min:i,max:n,paddingless:!0,onChange:p=>{const d=Number(p);d>n?o(n):d<i?o(i):o(d)},value:String(e)}),t.jsxRuntimeExports.jsxs("div",{className:v.controls,children:[t.jsxRuntimeExports.jsx("button",{onClick:g,disabled:e>=n,className:v.button,"aria-label":"Increment count",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"arrow-down",width:15,height:15,rotated:!0})}),t.jsxRuntimeExports.jsx("button",{onClick:m,disabled:e<=i,className:v.button,"aria-label":"Decrement count",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"arrow-down",width:15,height:15})})]})]})]})]})},Je="_subtitle_1nl8x_1",Ke="_header_1nl8x_8",Qe="_text_1nl8x_9",Ve="_productsBlock_1nl8x_10",We="_top_1nl8x_22",Xe="_itemsBlock_1nl8x_29",Ze="_typeTexts_1nl8x_35",ts="_block_1nl8x_41",es="_active_1nl8x_52",ss="_products_1nl8x_10",ns="_product_1nl8x_10",os="_button_1nl8x_70",is="_image_1nl8x_80",cs="_info_1nl8x_87",ls="_name_1nl8x_98",rs="_buttons_1nl8x_102",as="_modal_1nl8x_108",xs="_link_1nl8x_126",us="_modalOptions_1nl8x_132",w={subtitle:Je,header:Ke,text:Qe,productsBlock:Ve,top:We,itemsBlock:Xe,typeTexts:Ze,block:ts,active:es,products:ss,product:ns,button:os,image:is,info:cs,name:ls,buttons:rs,modal:as,link:xs,modalOptions:us},ds=x=>{const{activeItem:s,setActiveItem:i,popupPosition:n,setIsOpenModal:r}=x;return t.jsxRuntimeExports.jsxs("div",{className:w.modal,onClick:e=>{e.stopPropagation()},style:{top:`${n.top}px`,left:`${n.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:w.top,children:[t.jsxRuntimeExports.jsx("h3",{children:s.name}),t.jsxRuntimeExports.jsx(t.Icon,{name:"x",height:20,width:20,hoverable:!0,onClick:()=>{r(!1),i(null)}})]}),t.jsxRuntimeExports.jsx("div",{className:w.modalOptions,children:t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",onChange:e=>{const o={...s,images:e,imagePath:e[0]};i(o)}})})]})},ps=x=>{const{index:s,moveProduct:i,children:n}=x,[,r]=t.useDrop({accept:"product",hover(l){l.index!==s&&(i(l.index,s),l.index=s)}}),[{isDragging:e},o]=t.useDrag({type:"product",item:{index:s},collect:l=>({isDragging:l.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:l=>o(r(l)),className:`${w.product} ${e?w.dragging:""}`,children:n})},ms=x=>{const{isActiveItems:s,setIsActiveItems:i,items:n,setItems:r,other:e,title:o,subtitle:l,editable:b=!0,draggable:f=!1,withImage:u=!1,deletable:g=!0,addable:m=!0,itemsType:k,itemsOptions:p}=x,[d,B]=h.useState(null),[H,M]=h.useState({top:0,left:0}),[O,P]=h.useState(!1),T=(a,E)=>{const I=[...n],[c]=I.splice(a,1);I.splice(E,0,c),r(I)};h.useEffect(()=>{const a=()=>{B(null)};return document.body.addEventListener("click",a),B(null),()=>{B(null),document.body.removeEventListener("click",a)}},[]),h.useEffect(()=>{if(d){const a=[...n].map(E=>E.id===d.id?d:E);r(a)}},[d]);const F=(a,E)=>{a.stopPropagation();const I=a.target.getBoundingClientRect(),c=100,R=window.innerHeight;let j=I.top+window.scrollY;j+c>R&&(j=R-c-20),P(!0),M({top:j-80,left:I.left-30}),B(E)};function G(a){if(u)return a?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${a}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"image",width:16,height:16,fill:"#757575"})}const z=(a,E)=>{const I=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[f&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"drag",hoverable:!0,width:20,height:20})}),k==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:c=>{const R=[...n],j=Number(c.split(" ")[1]),_=p.find($=>$.id===j);if(!_)return;const S={..._.productData.stats,newPrice:_.productData.minPrice.amount,oldPrice:_.productData.compareAtPrice.amount},N=R.map($=>(console.log(c,j),$.id===a.id?{...a,name:c,listingId:j,stats:S}:$));B({...a,name:c,listingId:j}),r([...N])},value:a.name,options:[...p.map(c=>`Product ${c.id}`)],leftAddon:G(a.images[0])}),t.jsxRuntimeExports.jsxs("div",{className:w.buttons,children:[b&&t.jsxRuntimeExports.jsx(t.Icon,{name:"sliders",hoverable:!0,width:20,height:20,onClick:c=>F(c,a)}),g&&t.jsxRuntimeExports.jsx(t.Icon,{name:"trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>r(n.filter(c=>c.id!==a.id))})]})]});return f?t.jsxRuntimeExports.jsx(ps,{product:a,index:E,moveProduct:T,children:I},a.id):t.jsxRuntimeExports.jsx("div",{className:w.product,children:I},a.id)};return t.jsxRuntimeExports.jsxs("div",{className:w.productsBlock,children:[(o||s!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:w.top,children:[o&&t.jsxRuntimeExports.jsx("h3",{className:w.title,children:o}),s!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:s,onChange:a=>i==null?void 0:i(a)})]}),O&&d&&t.jsxRuntimeExports.jsx(ds,{activeItem:d,setActiveItem:B,setIsOpenModal:P,popupPosition:H}),t.jsxRuntimeExports.jsxs("div",{className:w.products,children:[l&&t.jsxRuntimeExports.jsx("h5",{className:w.subtitle,children:l}),f?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:n.map((a,E)=>z(a,E))}):n.map((a,E)=>z(a,E)),m&&t.jsxRuntimeExports.jsxs(t.Button,{className:w.button,size:"s",onClick:()=>{const a=[...n],E=p[0].id;a.push({name:`Product ${E}`,id:t.v4(),listingId:E,imagePath:"",images:[],stats:{...p[0].productData.stats,newPrice:p[0].productData.minPrice.amount,oldPrice:p[0].productData.compareAtPrice.amount}}),r(a)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"plus",width:16,height:16})]})]}),e!==void 0&&t.jsxRuntimeExports.jsx(K,{items:e})]})};exports.Button=t.Button;exports.Checkbox=t.Checkbox;exports.ChooseImage=t.ChooseImage;exports.ChooseImageModal=t.ChooseImageModal;exports.ColorPicker=t.ColorPicker;exports.Icon=t.Icon;exports.Input=t.Input;exports.Modal=t.Modal;exports.Picker=t.Picker;exports.Radio=t.Radio;exports.Select=t.Select;exports.Submodal=t.Submodal;exports.Switch=t.Switch;exports.Textarea=t.Textarea;exports.Tip=t.Tip;exports.ButtonTypeSettings=V;exports.ButtonsSettings=Pe;exports.ItemsSettings=Q;exports.LayoutSettings=ut;exports.ListingSelector=ms;exports.RangeSelector=W;exports.TextSettings=J;exports.TypesText=U;