Files
aaPanel/BTPanel/static/vite/js/feature-EmailEditor-legacy.js
T
2026-08-13 18:24:50 +08:00

4 lines
105 KiB
JavaScript

(function(){System.register([`./vendor-utils-legacy.js?v=1786507437784`,`./vendor-vue-legacy.js?v=1786507437784`,`./vendor-naive-legacy.js?v=1786507437784`,`./app-legacy.js?v=1786507437784`,`./app-components-legacy.js?v=1786507437784`,`./vendor-interaction-legacy.js?v=1786507437784`,`./vendor-wangeditor-legacy.js?v=1786507437784`],function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,ee,S,C,te,w,ne,T,re,ie,ae,oe,se,ce,le,ue,de,fe,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,E,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,dn,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,D,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,O,Ir,k,Lr,A,j,M,N,P,F,Rr,I,zr,Br,L,Vr,Hr,Ur,Wr,Gr,Kr,R,qr,z,Jr,Yr,Xr,Zr,Qr,$r,ei,ti,B,ni,ri,ii,V,ai,oi,si,H,U,W,ci,li,ui,di,fi,G,pi,mi,K,q,hi,gi,_i,vi,yi,J,Y,bi,xi,Si,Ci,X,wi,Ti,Ei;function Di(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Oi(e){if(Array.isArray(e))return e}function ki(e){if(Array.isArray(e))return Di(e)}function Ai(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function ji(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){Ai(a,r,i,o,s,`next`,e)}function s(e){Ai(a,r,i,o,s,`throw`,e)}o(void 0)})}}function Mi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ni(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Pi(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Fi(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ii(){throw TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Li(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t],r=Object.keys(n);typeof Object.getOwnPropertySymbols==`function`&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Mi(e,t,n[t])})}return e}function Ri(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zi(e,t){return t=t==null?{}:t,Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ri(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function Z(e,t){return Oi(e)||Pi(e,t)||Vi(e,t)||Fi()}function Q(e){return ki(e)||Ni(e)||Vi(e)||Ii()}function Bi(e,t){var n,r,i,a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype),s=Object.defineProperty;return s(o,`next`,{value:c(0)}),s(o,`throw`,{value:c(1)}),s(o,`return`,{value:c(2)}),typeof Symbol==`function`&&s(o,Symbol.iterator,{value:function(){return this}}),o;function c(e){return function(t){return l([e,t])}}function l(s){if(n)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(i=s[0]&2?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if((i=a.trys,!(i=i.length>0&&i[i.length-1]))&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(s[0]===6&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Vi(e,t){if(e){if(typeof e==`string`)return Di(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(n);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Di(e,t)}}function Hi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:12,t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,function(e){return e.toString(16).padStart(2,`0`)}).join(``).slice(0,e)}function Ui(){var e=function(e){var r={};return Object.entries(e).forEach(function(e){var i=Z(e,2),a=i[0],o=i[1];t(a)&&qr(o)&&Object.assign(r,n(a,o)),!t(a)&&Jr(o)&&(r[a]=o),!t(a)&&qr(o)&&a===`borderTop`&&qr(o)&&(r.borderTop=``.concat(o.width,` `,o.style,` `,o.color||`transparent`))}),r},t=function(e){return e===`border`||e===`padding`||e===`borderRadius`},n=function(e,t){var n={},i={top:`TopLeft`,right:`TopRight`,bottom:`BottomRight`,left:`BottomLeft`};if(!t.more)e===`border`&&qr(t.all)&&t.all.width!==`0`?n.border=``.concat(t.all.width,` `,t.all.style,` `,t.all.color||`transparent`):(e===`padding`||e===`borderRadius`)&&Jr(t.all)&&(n[e]=t.all);else{var a=[`top`,`right`,`bottom`,`left`];switch(e){case`border`:a.forEach(function(e){var i=t[e];qr(i)&&i.width!==`0`&&(n[`border`.concat(r(e))]=``.concat(i.width,` `,i.style,` `,i.color||`transparent`))});break;case`padding`:a.forEach(function(e){var i=t[e];Jr(i)&&i!==`0`&&(n[`padding`.concat(r(e))]=i)});break;case`borderRadius`:a.forEach(function(e){var r=t[e];Jr(r)&&r!==`0`&&(n[`border`.concat(i[e],`Radius`)]=r)});break}}return n},r=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};return{configToStyle:e}}function Wi(e){oi(Lr,e)}function Gi(e,t){return V(),N(`div`,Ln,[W(e.$slots,`default`,{},void 0,!0)])}function Ki(e,t){var n=ee;return V(),j(n,{"arrow-placement":`right`,"display-directive":`show`},{default:X(function(){return[W(e.$slots,`default`,{},void 0,!0)]}),_:3})}function qi(e,t){return V(),N(`div`,_n,[W(e.$slots,`default`)])}function Ji(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!Yr(e)}function $(e){return[I({setup:function(t,n){var r=n.slots;return function(){return F(fe,{options:e},Ji(r)?r:{default:function(){return[r]}})}}})]}function Yi(e,t,n){var r=e.key,i=e.attrKey,a=e.label,o=r||i;switch(i){case`color`:case`backgroundColor`:return F(C,{value:t[o],"onUpdate:value":function(e){return t[o]=e},label:a},null);case`head`:return F(Le,{value:t[o],"onUpdate:value":function(e){return t[o]=e}},null);case`padding`:return F(Tt,{value:t[o],"onUpdate:value":function(e){return t[o]=e},label:a},null);case`border`:return F(l,{value:t[o],"onUpdate:value":function(e){return t[o]=e},label:a},null);case`borderTop`:return F(st,{value:t[o],"onUpdate:value":function(e){return t[o]=e}},null);case`width`:return F(an,{value:t[o],"onUpdate:value":function(e){return t[o]=e}},null);case`widthAuto`:return F(en,{value:t[o],"onUpdate:value":function(e){return t[o]=e}},null);case`widthNumber`:return F(nn,{value:t[o],"onUpdate:value":function(e){return t[o]=e}},null);case`fontWeight`:return F(Me,{value:t[o],"onUpdate:value":function(e){return t[o]=e}},null);case`fontSize`:return F(Ae,{value:t[o],"onUpdate:value":function(e){return t[o]=e}},null);case`lineHeight`:return F(at,{value:t[o],"onUpdate:value":function(e){return t[o]=e}},null);case`letterSpacing`:return F(rt,{value:t[o],"onUpdate:value":function(e){return t[o]=e}},null);case`textAlign`:return F(Ut,{value:t[o],"onUpdate:value":function(e){return t[o]=e},label:a},null);case`borderRadius`:return F(Mt,{value:t[o],"onUpdate:value":function(e){return t[o]=e}},null);case`layout`:return F(tt,{value:t[o],"onUpdate:value":function(e){return t[o]=e}},null);case`custom`:return Xi(e,n)}}function Xi(e,t){if(e.render)return F(E,null,[e.render()]);if(e.key){var n;return(n=t[e.key])==null?void 0:n.call(t)}}function Zi(e,t){var n=ke;return V(),N(`div`,jn,[F(n,{size:`large`,description:`Please select a component`})])}return e({a:void 0,i:void 0,n:void 0,o:Hi,r:void 0,t:void 0}),{setters:[function(e){E=e.mn,O=e.jt,k=e.yn,A=e.bn,j=e.xn,M=e.Sn,N=e.Cn,P=e.En,F=e.Dn,Rr=e.At,I=e.kn,L=e.w,e.fr,e.Pn,e.on,e.Ir,R=e.nn,z=e.hr,Jr=e.Tt,Yr=e.In,$r=e.Ln,ei=e.zn,ti=e.Yr,B=e.Zr,ni=e.Hn,ri=e.Gn,ii=e.Kn,V=e.Jn,oi=e.Yn,si=e.vr,H=e.br,U=e.Xn,W=e.Zn,ci=e.er,li=e.Cr,fi=e._t,G=e.ei,pi=e.wr,K=e.Or,J=e.rr,bi=e.ar,Si=e.un,Ci=e.or,X=e.cr,wi=e.lr,Ti=e.fn},function(e){zr=e.f,ui=e.p},function(e){d=e.gt,b=e.st,ee=e.ct,S=e.at,ke=e.Et,Pe=e.P,Fe=e.M,Ye=e.bt,Xe=e.xt,Ze=e.A,Qe=e.St,At=e.Q,jt=e.Z,Rt=e.tt,zt=e.y,Bt=e.h,Vt=e.p,Ht=e.d},function(e){D=e.zf,Mr=e.Rf,qr=e.yp,yi=e.Pf},function(e){Pr=e.na},function(e){_e=e.i,Ie=e.t,hi=e.r,gi=e.n},function(e){ve=e.t,kt=e.r,Zt=e.n,Ei=e.i}],execute:function(){sn=document.createElement(`style`),sn.textContent=`.block-toolbar[data-v-c5cb1fa1]{z-index:101;background-color:#1890ff;border-radius:4px 4px 0 0;display:flex;position:absolute;bottom:-36px;right:0}.block-toolbar .tool-btn[data-v-c5cb1fa1]{color:#fff;cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;width:32px;height:32px;padding:0;transition:background-color .2s;display:flex}.block-toolbar .tool-btn svg[data-v-c5cb1fa1]{width:16px;height:16px}.block-toolbar .tool-btn[data-v-c5cb1fa1]:hover{background-color:rgba(0,0,0,.1)}.block-base[data-v-f8113c96]{position:relative}.block-base .block-section[data-v-f8113c96]{user-select:none;width:100%;position:absolute;top:0;bottom:0;left:0;right:0}.block-base .block-section[data-v-f8113c96]:after{content:"";opacity:0;z-index:100;pointer-events:none;background-color:transparent;display:block;position:absolute;top:0;bottom:0;left:0;right:0}.block-base .block-section[data-v-f8113c96]:hover:after{opacity:1;border:2px solid #4eaef8}.block-base .block-section:hover .drag-handle[data-v-f8113c96]{opacity:1}.block-base.is-selected>.block-section[data-v-f8113c96]:after{opacity:1;border:2px solid #0871c2}.block-base.is-selected>.block-section .drag-handle[data-v-f8113c96]{opacity:1}.block-base.is-dragging[data-v-f8113c96]{opacity:.4}.block-base .block-content[data-v-f8113c96]{margin:0 auto}.block-base .block-type-hint[data-v-f8113c96]{color:#fff;opacity:.8;pointer-events:none;z-index:102;background:rgba(0,0,0,.6);border-radius:3px;padding:2px 8px;font-size:12px;position:absolute;bottom:-24px;left:0}.block-base .drag-handle[data-v-f8113c96]{cursor:grab;z-index:101;color:#909399;opacity:0;background-color:#fff;border:1px solid #e8e8e8;border-radius:3px;justify-content:center;align-items:center;width:24px;height:24px;transition:opacity .2s;display:flex;position:absolute;top:50%;right:-12px;transform:translateY(-50%)}.block-base .drag-handle.columns-drag-handle[data-v-f8113c96]{right:0}.block-base .drag-handle[data-v-f8113c96]:hover{color:#1890ff}.block-base .drag-handle .drag-icon[data-v-f8113c96]{font-size:16px;font-style:normal}.editor-box[data-v-320a6ce4]{width:100%;position:relative}.toolbar[data-v-320a6ce4]{z-index:200;flex-direction:column;display:flex;position:fixed;top:-100px;left:0}.toolbar[data-v-320a6ce4] .w-e-toolbar{border:1px solid #ccc;max-width:500px;margin:0 auto;padding:0 4px}.toolbar[data-v-320a6ce4] .w-e-toolbar .w-e-bar{overflow:hidden}.toolbar[data-v-320a6ce4] .w-e-toolbar .w-e-bar-item{padding:4px 2px;display:inline-flex}.toolbar[data-v-320a6ce4] .w-e-toolbar .w-e-bar-item button .title{border-bottom:none;height:auto}.editor[data-v-320a6ce4] .w-e-text-container{color:inherit;background:0 0}.editor[data-v-320a6ce4] .w-e-text-container [data-slate-editor]{border-top:none;padding:0}.editor[data-v-320a6ce4] .w-e-text-container p{line-height:inherit;margin:0}.editor[data-v-320a6ce4] .w-e-modal{z-index:100}.block-none[data-v-1e66913b]{color:#a8a8a8;background-color:#f9f9f9;border:1px solid #d4d4d4;border-radius:4px;flex-direction:column;justify-content:center;align-items:center;height:100px;padding:10px;font-size:14px;display:flex}img[data-v-a891cab1]{width:100%}.cell-container.drop-active[data-v-98374d19]{background-color:rgba(24,144,255,.05)!important;border:1px dashed #1890ff!important}.cell-container .cell-content[data-v-98374d19]{flex-direction:column;display:flex}.cell-container .block-item[data-v-98374d19]{transition:transform .2s;position:relative}.cell-container .block-item[data-v-98374d19]:hover{z-index:1}.cell-container .block-placeholder[data-v-98374d19]{background-color:transparent;border:1px dashed transparent;border-radius:4px;justify-content:center;align-items:center;height:0;transition:height .3s;display:flex;overflow:hidden}.cell-container .block-placeholder.active[data-v-98374d19]{background-color:rgba(24,144,255,.05);border-color:#1890ff;height:50px}.cell-container .block-placeholder .placeholder-content[data-v-98374d19]{color:#1890ff;flex-direction:column;align-items:center;display:flex}.cell-container .column-placeholder[data-v-98374d19]{color:#0079d6;text-align:center;background-color:rgba(62,158,212,.15);border:1px dashed rgba(62,158,212,.5);flex-direction:column;justify-content:center;align-items:center;height:100px;font-size:14px;transition:all .3s;display:flex}.cell-container .column-placeholder.active[data-v-98374d19]{color:#1890ff}.columns-layout[data-v-741ae7b5]{margin:0 auto;display:flex;position:relative}.columns-layout .column-divider[data-v-741ae7b5]{width:2px;position:relative}.columns-layout .column-divider[data-v-741ae7b5]:after{content:"";opacity:.5;cursor:col-resize;background-color:#0871c2;width:2px;height:100%;transition:all .2s;display:block;position:absolute;top:0;left:50%;transform:translate(-50%)}.columns-layout .column-divider[data-v-741ae7b5]:hover:after,.columns-layout .column-divider.active[data-v-741ae7b5]:after{opacity:1;width:4px}.canvas-area[data-v-53cd2711]{background-color:#f4f7fa;width:100%;height:100%;position:relative}.canvas-container[data-v-53cd2711]{background-color:#fff;position:absolute;top:24px;bottom:24px;left:24px;right:24px;overflow-y:auto;box-shadow:0 4px 12px #ebedf0}.block-columns-wrapper[data-v-53cd2711]{position:relative}.block-placeholder[data-v-53cd2711]{background-color:rgba(24,144,255,.05);border:2px dashed #1890ff;border-radius:4px;justify-content:center;align-items:center;height:104px;transition:all .2s;display:flex}.block-placeholder .placeholder-content[data-v-53cd2711]{color:#1890ff;text-align:center;font-size:14px}.block-placeholder .placeholder-content span[data-v-53cd2711]{display:block}.empty-container[data-v-53cd2711]{justify-content:center;align-items:center;height:calc(100% - 32px);display:flex}.empty-container .empty-message[data-v-53cd2711]{color:#999;text-align:center;background-color:#fafafa;border:2px dashed #e8e8e8;border-radius:4px;padding:24px;font-size:16px}.editor-tools[data-v-428569d7]{border-bottom:1px solid #d8dee8;justify-content:space-between;align-items:center;height:40px;min-height:40px;padding:0 16px;display:flex}.tools-view[data-v-428569d7]{border:1px solid #d9d9d9;border-radius:4px;align-items:center;gap:4px;height:28px;padding:2px;display:flex}.tools-view .view-item[data-v-428569d7]{cursor:pointer;border-radius:2px;align-items:center;height:24px;padding:0 4px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);display:flex}.tools-view .view-item.checked[data-v-428569d7]{color:#3e8bf2;background-color:#f8f8f8}.editor-container[data-v-b95fec5b]{flex-direction:column;flex:1;display:flex}.block-item[data-v-ea0cad5e]{border:1px solid var(--color-border);background-color:var(--color-bg-2);text-align:center;cursor:grab;border-radius:2px;flex-direction:column;justify-content:center;align-items:center;height:74px;font-weight:500;transition:box-shadow .1s;display:flex;position:relative}.block-item .text[data-v-ea0cad5e]{margin-top:6px}.block-item[data-v-ea0cad5e]:hover{border:1px solid #eee;box-shadow:-2px 7px 20px rgba(0,0,0,.17)}.block-panel[data-v-2cd77b18]{width:100%;height:100%;overflow:auto}.block-title[data-v-2cd77b18]{height:32px;color:var(--color-text-1);justify-content:center;align-items:center;margin-top:8px;margin-bottom:8px;font-size:14px;font-weight:700;display:flex}.block-list[data-v-2cd77b18]{grid-gap:12px;grid-template-columns:74px 74px 74px;padding:16px;display:grid}.editor-menu[data-v-7b19c6e6]{border-right:1px solid var(--color-border);background-color:var(--color-bg-2);width:280px;overflow:hidden}.n-collapse[data-v-be0a8b1b]{--n-title-padding:0;--n-item-margin:0;--n-text-color:var(--color-text-2);--n-arrow-color:#d4d4d4;--n-title-text-color:var(--color-text-1);--n-divider-color:var(--color-border)}.n-collapse[data-v-be0a8b1b] .n-collapse-item{background-color:var(--color-bg-2)}.n-collapse[data-v-be0a8b1b] .n-collapse-item>.n-collapse-item__header:hover{background-color:var(--color-bg-3)}.n-collapse[data-v-be0a8b1b] .n-collapse-item>.n-collapse-item__header .n-collapse-item__header-main{justify-content:space-between;padding:12px 16px;font-weight:700}.n-collapse[data-v-be0a8b1b] .n-collapse-item .n-collapse-item__content-inner{padding:16px}.layout-grid[data-v-44ad3be7]{grid-template-columns:repeat(2,1fr);gap:16px;display:grid}.layout-option[data-v-44ad3be7]{border:1px solid var(--color-border);background-color:var(--color-bg-1);cursor:pointer;border-radius:4px}.layout-option[data-v-44ad3be7]:hover,.layout-option.active[data-v-44ad3be7]{background-color:var(--color-bg-2);border-color:#333}.layout-option:hover .column[data-v-44ad3be7],.layout-option.active .column[data-v-44ad3be7]{border-left-color:#333}.layout-option:hover .column .text[data-v-44ad3be7],.layout-option.active .column .text[data-v-44ad3be7]{visibility:visible}.layout-preview[data-v-44ad3be7]{border-radius:4px;width:100%;height:36px;display:flex;overflow:hidden}.column[data-v-44ad3be7]{color:var(--color-text-2);justify-content:center;align-items:center;font-size:12px;display:flex}.column+.column[data-v-44ad3be7]{border-left:1px solid var(--color-border)}.column .text[data-v-44ad3be7]{visibility:hidden}.style-container[data-v-2bc44916]{border-top:1px solid var(--color-border);padding:16px 0}.style-container[data-v-2bc44916]:first-of-type{border-top:none;padding-top:0}.style-container[data-v-2bc44916]:last-of-type{padding-bottom:0}.style-container .style-rows[data-v-2bc44916]{justify-content:space-between;align-items:flex-start;display:flex}.style-container .style-rows .style-label[data-v-2bc44916]{align-items:center;min-height:32px;font-weight:500;line-height:24px;display:flex}.style-container .style-rows .style-value[data-v-2bc44916]{align-items:center;min-height:32px;display:flex}.n-tabs[data-v-9e21eccb]{--n-tab-padding:13px 16px 11px;--n-tab-gap:0;--n-pane-padding-top:0;--n-tab-font-size:12px}.n-tab-pane[data-v-9e21eccb]{flex:1;overflow:auto}.link-items[data-v-6755f2fb]{border:1px solid #e5e7eb;border-top:none;align-items:center;gap:8px;width:100%;padding:12px;display:flex}.link-items[data-v-6755f2fb]:first-child{border-top:1px solid #e5e7eb;border-top-left-radius:4px;border-top-right-radius:4px}.link-items[data-v-6755f2fb]:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.link-group[data-v-1b62ebe3]{flex-direction:column;width:100%;margin:0;padding-left:0;display:flex}.n-tabs[data-v-83e94fc5]{--n-tab-padding:16px 12px 14px;--n-tab-gap:0;--n-pane-padding-top:0;--n-tab-font-size:14px;height:100%}.n-tabs[data-v-83e94fc5]>.n-tabs-nav .n-tabs-wrapper{width:100%}.n-tabs[data-v-83e94fc5]>.n-tabs-nav .n-tabs-wrapper .n-tabs-tab-wrapper{flex:1}.n-tabs[data-v-83e94fc5]>.n-tabs-nav .n-tabs-wrapper .n-tabs-tab{justify-content:center;width:100%}.n-tab-pane[data-v-83e94fc5]{flex:1;overflow:auto}.editor-sidebar[data-v-51030538]{border-left:1px solid var(--color-border);background-color:var(--color-bg-2);width:320px;height:100%;overflow:hidden}.email-editor[data-v-cec325ed]{border:1px solid var(--color-border);height:720px;display:flex}
/*$vite$:1*/`,document.head.appendChild(sn),R(),_i=zr(`email-editor`,function(){var e=H(`2.1`);return{version:e,pageConfig:H({meta:{version:e.value,createdAt:``,updatedAt:``},style:{backgroundColor:`#ffffff`,width:`500px`}}),columnsSource:H([]),columnsMap:H({}),columnsConfigMap:H({}),cellMap:H({}),cellConfigMap:H({}),blockMap:H({}),blockConfigMap:H({}),selectedBlockKey:H(``),selectedBlockType:H(``),saveFn:H(function(){return ji(function(){return Bi(this,function(e){return[2,!1]})})()})}}),Ir={key:``,name:`Columns`,type:`columns`,meta:{version:``,createdAt:``,updatedAt:``},attr:{},style:{backgroundColor:``,padding:{more:!1,all:`0`,top:`0`,left:`0`,right:`0`,bottom:`0`}},containerStyle:{backgroundColor:``}},Fr={key:``,name:`Cell`,type:`cell`,meta:{version:``,createdAt:``,updatedAt:``},attr:{},style:{backgroundColor:``,padding:{more:!1,all:`0`,top:`0`,left:`0`,right:`0`,bottom:`0`},border:{more:!1,all:{color:``,width:`0`,style:`solid`},top:{color:``,width:`0`,style:`solid`},right:{color:``,width:`0`,style:`solid`},bottom:{color:``,width:`0`,style:`solid`},left:{color:``,width:`0`,style:`solid`}}},containerStyle:{}},Nr={key:``,name:`Button`,type:`button`,meta:{version:``,createdAt:``,updatedAt:``},attr:{href:`#`,target:`_blank`,content:`Button Text`},style:{display:`inline-block`,backgroundColor:`#20A53A`,color:`#fff`,width:`auto`,fontWeight:`normal`,fontSize:`14px`,lineHeight:`120%`,letterSpacing:`0px`,boxSizing:`border-box`,textDecoration:`none`,padding:{more:!0,all:`0`,top:`10px`,left:`20px`,right:`20px`,bottom:`10px`},border:{more:!1,all:{color:``,width:`0`,style:`solid`},top:{color:``,width:`0`,style:`solid`},right:{color:``,width:`0`,style:`solid`},bottom:{color:``,width:`0`,style:`solid`},left:{color:``,width:`0`,style:`solid`}},borderRadius:{more:!1,all:`4px`,top:`0`,left:`0`,right:`0`,bottom:`0`}},containerStyle:{textAlign:`center`,padding:{more:!1,all:`10px`,top:`0`,left:`0`,right:`0`,bottom:`0`}}},Xr={key:``,name:`Link`,type:`link`,meta:{version:``,createdAt:``,updatedAt:``},attr:{href:``,target:`_blank`,content:`Link Text`},style:{display:`inline-block`,color:`#333`,fontWeight:`normal`,fontSize:`14px`,lineHeight:`120%`,letterSpacing:`0px`,textDecoration:`none`},containerStyle:{textAlign:`center`,padding:{more:!1,all:`10px`,top:`0`,left:`0`,right:`0`,bottom:`0`}}},Br={key:``,name:`Divider`,type:`divider`,meta:{version:``,createdAt:``,updatedAt:``},attr:{},style:{display:`inline-block`,width:`100%`,height:`1px`,lineHeight:`1px`,verticalAlign:`middle`,boxSizing:`border-box`,borderTop:{color:`#bbbbbb`,width:`1px`,style:`solid`}},containerStyle:{textAlign:`center`,padding:{more:!1,all:`10px`,top:`0`,left:`0`,right:`0`,bottom:`0`}}},Vr={key:``,name:`Header`,type:`header`,meta:{version:``,createdAt:``,updatedAt:``},attr:{content:`Header`},style:{display:`inline-block`,color:`#333`,fontWeight:`normal`,fontSize:`22px`,lineHeight:`140%`,letterSpacing:`0px`},containerStyle:{textAlign:`left`,padding:{more:!1,all:`10px`,top:`0`,left:`0`,right:`0`,bottom:`0`}}},di={key:``,name:`Text`,type:`text`,meta:{version:``,createdAt:``,updatedAt:``},attr:{content:`Text`},style:{display:`inline-block`,color:`#333`,fontWeight:`normal`,fontSize:`14px`,lineHeight:`120%`,letterSpacing:`0px`},containerStyle:{textAlign:`left`,padding:{more:!1,all:`10px`,top:`0`,left:`0`,right:`0`,bottom:`0`}}},Hr={key:``,name:`Image`,type:`image`,meta:{version:``,createdAt:``,updatedAt:``},attr:{href:``,target:`_blank`,src:``,alt:``},style:{display:`inline-block`,width:`100%`,boxSizing:`border-box`,textDecoration:`none`},containerStyle:{textAlign:`center`,padding:{more:!1,all:`10px`,top:`0`,left:`0`,right:`0`,bottom:`0`}}},Zr={key:``,name:`Menu`,type:`menu`,meta:{version:``,createdAt:``,updatedAt:``},attr:{links:[{id:Hi(6),label:`Menu`,href:``},{id:Hi(6),label:`Menu`,href:``}]},style:{display:`inline-block`,fontWeight:`normal`,fontSize:`14px`,letterSpacing:`0px`,color:`#333`,textDecoration:`none`,padding:{more:!0,all:``,top:`5px`,left:`15px`,right:`15px`,bottom:`5px`}},containerStyle:{textAlign:`center`,padding:{more:!1,all:`10px`,top:`0`,left:`0`,right:`0`,bottom:`0`}}},kr=new Map([[`button`,Nr],[`link`,Xr],[`divider`,Br],[`header`,Vr],[`text`,di],[`image`,Hr],[`menu`,Zr]]),xi=function(e){var t=ui(_i()).version,n=function(e){try{var t=JSON.parse(e),n=t.version;return n<2?r(t):n<2.1?f(t):t}catch(t){console.log(e,t)}},r=function(e){var n={meta:{version:t.value,createdAt:L(new Date,`yyyy-MM-dd HH:mm:ss`),updatedAt:L(new Date,`yyyy-MM-dd HH:mm:ss`)},style:{width:``,backgroundColor:``}};e.page_style?(n.style.width=e.page_style.maxWidth,n.style.backgroundColor=e.page_style.backgroundColor):(n.style.width=`500px`,n.style.backgroundColor=`#fff`);var r=e.columns_source,a=e.column_map,f=e.column_row_style_map,p=[],m={},h={};r.forEach(function(e){p.push(e)}),Object.entries(a).forEach(function(e){var t=Z(e,2),n=t[0],r=t[1];qr(r)&&(m[n]={key:n,type:r.type,name:`Columns`,children:r.children})}),Object.keys(f).forEach(function(e){var n=f[e],r=O(Ir);r.key=e,r.meta.version=t.value,r.meta.createdAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.meta.updatedAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.style.padding=n.style.padding,r.style.backgroundColor=n.style.backgroundColor,h[e]=r});var g=e.cell_map,_=e.cell_style_map,v={},y={};Object.keys(g).forEach(function(e){var t=g[e];v[e]={key:e,type:`cell`,name:`Cell`,width:Number.parseFloat(t.width),children:t.children}}),Object.keys(_).forEach(function(e){var n=_[e],r=O(Fr);r.key=e,r.meta.version=t.value,r.meta.createdAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.meta.updatedAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.style.backgroundColor=n.style.background,r.style.padding=n.style.padding,r.style.border=i(n.style.border),y[e]=r});var b=e.comp_map,x=e.comp_style_map,ee={},S={};return Object.keys(b).forEach(function(e){var t=b[e];ee[e]={key:e,type:t.type,name:Pr(t.type)}}),Object.keys(x).forEach(function(e){var t=b[e],n=x[e];switch(t.type){case`button`:S[e]=o(e,n);break;case`divider`:S[e]=s(e,n);break;case`header`:S[e]=c(e,n);break;case`text`:S[e]=l(e,n);break;case`image`:S[e]=u(e,n);break;case`menu`:S[e]=d(e,n);break}}),{pageConfig:n,columnsSource:p,columnsMap:m,columnsConfigMap:h,cellMap:v,cellConfigMap:y,blockMap:ee,blockConfigMap:S}},i=function(e){return{more:e.more,all:a(e.all),top:a(e.top),left:a(e.left),right:a(e.right),bottom:a(e.bottom)}},a=function(e){var t=e.split(` `);return{width:t[0]||`0`,style:t[1]||`solid`,color:t[2]||``}},o=function(e,n){var r=O(Nr);return r.key=e,r.meta.version=t.value,r.meta.createdAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.meta.updatedAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.attr.content=n.content,r.attr.href=n.info.href||`#`,r.attr.target=n.info.target||`_blank`,r.style=n.style,r.style.border=i(n.style.border),r.style.fontWeight=n.style.FontWeight,r.style.letterSpacing=n.style.LetterSpacing,delete n.style.FontWeight,delete n.style.LetterSpacing,r.containerStyle=n.general,r},s=function(e,n){var r=O(Br);return r.key=e,r.meta.version=t.value,r.meta.createdAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.meta.updatedAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.style=n.style,r.style.borderTop=a(n.style.borderTop),r},c=function(e,n){var r=O(Vr);return r.key=e,r.meta.version=t.value,r.meta.createdAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.meta.updatedAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.attr.content=n.content||``,r.style=n.style,r.containerStyle=n.general,r},l=function(e,n){var r=O(di);return r.key=e,r.meta.version=t.value,r.meta.createdAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.meta.updatedAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.attr.content=n.content||``,r.style=n.style,r.containerStyle=n.general,r.containerStyle.textAlign=n.style.textAlign,delete n.style.textAlign,r},u=function(e,n){var r=O(Hr);return r.key=e,r.meta.version=t.value,r.meta.createdAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.meta.updatedAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.attr=n.info,r.style=n.style,r.containerStyle.padding=n.general.padding,r.containerStyle.textAlign=n.general.textAlign||`center`,r},d=function(e,n){var r=O(Zr);return r.key=e,r.meta.version=t.value,r.meta.createdAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.meta.updatedAt=L(new Date,`yyyy-MM-dd HH:mm:ss`),r.attr.links=n.links,r.style=n.style,r.style.display=n.info.layout===`horizontal`?`inline-block`:`block`,r.containerStyle.padding=n.general.padding,r.containerStyle.textAlign=n.general.textAlign||`center`,r},f=function(e){var t=e.blockMap,n=e.blockConfigMap;return Object.keys(t).forEach(function(e){var r=t[e],i=n[e];switch(r.type){case`button`:n[e].style=Object.assign({},O(Nr.style),i.style);break;case`link`:n[e].style=Object.assign({},O(Xr.style),i.style);break;case`divider`:n[e].style=Object.assign({},O(Br.style),i.style);break;case`image`:n[e].style=Object.assign({},O(Hr.style),i.style);break;case`menu`:n[e].type=r.type,n[e].name=r.name,n[e].style=Object.assign({},O(Zr.style),i.style);break}}),e};return{parsedData:n(e)}},R(),e(`a`,Y=function(){var e=ui(_i()),t=e.version,n=e.columnsSource,r=e.columnsMap,i=e.columnsConfigMap,a=e.cellMap,o=e.cellConfigMap,s=e.blockMap,c=e.blockConfigMap,l=e.pageConfig,u=e.selectedBlockKey,d=e.selectedBlockType,f=e.saveFn;return{saveFn:f,getData:function(){return JSON.stringify({version:t.value,pageConfig:pi(l.value),blockMap:pi(s.value),blockConfigMap:pi(c.value),cellMap:pi(a.value),cellConfigMap:pi(o.value),columnsConfigMap:pi(i.value),columnsMap:pi(r.value),columnsSource:pi(n.value)})},setData:function(e){var t=xi(e).parsedData;t&&(l.value=t.pageConfig,s.value=t.blockMap,c.value=t.blockConfigMap,a.value=t.cellMap,o.value=t.cellConfigMap,i.value=t.columnsConfigMap,r.value=t.columnsMap,n.value=t.columnsSource)},resetData:function(){s.value={},c.value={},a.value={},o.value={},i.value={},r.value={},n.value=[],u.value=``,d.value=``},setSaveFn:function(e){f.value=e},autoSaveFn:function(){var e=null;(function(){e&&clearTimeout(e),e=window.setTimeout(function(){f.value()},300)})()}}}),R(),e(`i`,vi=function(){var e=ui(_i()),t=e.columnsSource,n=e.columnsMap,r=e.columnsConfigMap,i=e.cellMap,a=e.cellConfigMap,o=e.blockMap,s=e.blockConfigMap,c=e.pageConfig,l=Ui().configToStyle,u=H(``),d=function(){u.value=f().outerHTML},f=function(){var e=p(),n=document.createElement(`table`);return n.style.backgroundColor=c.value.style.backgroundColor||`#fff`,n.style.width=`100%`,t.value.forEach(function(t){e[t]&&n.appendChild(e[t].dom)}),n},p=function(){var e=m(),t={};return Object.entries(n.value).forEach(function(n){var i=Z(n,2),a=i[0],o=i[1],s=document.createElement(`tr`),l=document.createElement(`td`),u=document.createElement(`div`);g(u,r.value[a].style),u.style.width=c.value.style.width||`auto`,u.style.margin=`0 auto`;var d=document.createElement(`table`);d.style.width=`100%`;var f=document.createElement(`tr`);o.children.forEach(function(t){f.appendChild(e[t].dom)}),d.appendChild(f),u.appendChild(d),l.appendChild(u),s.appendChild(l),t[a]={dom:s}}),t},m=function(){var e=h(),t={};return Object.entries(i.value).forEach(function(n){var r=Z(n,2),i=r[0],o=r[1],s=document.createElement(`td`);s.style.width=``.concat(o.width,`%`),g(s,a.value[i].style),o.children.forEach(function(t){e[t]&&s.appendChild(e[t].dom)}),t[i]={dom:s}}),t},h=function(){var e={};return Object.keys(o.value).forEach(function(t){var n=o.value[t],r=s.value[t],i=document.createElement(`div`);switch(g(i,r.containerStyle),n.type){case`button`:i.appendChild(v(r));break;case`link`:i.appendChild(y(r));break;case`divider`:i.appendChild(b(r));break;case`header`:i.appendChild(x(r));break;case`text`:i.appendChild(ee(r));break;case`image`:i.appendChild(S(r));break;case`menu`:i.appendChild(C(r));break}e[t]={dom:i,config:r}}),e},g=function(e,t){var n=l(t);Object.entries(n).forEach(function(t){var n=Z(t,2),r=n[0],i=n[1];e.style[r]=i})},_=function(e){return e.replace(`<p>`,`<p style="margin: 0;">`)},v=function(e){var t,n,r,i=document.createElement(`a`);return i.href=(t=e.attr.href)==null?``:t,i.target=(n=e.attr.target)==null?``:n,i.innerHTML=_((r=e.attr.content)==null?``:r),g(i,e.style),i},y=function(e){var t,n,r,i=document.createElement(`a`);return i.href=(t=e.attr.href)==null?``:t,i.target=(n=e.attr.target)==null?``:n,i.innerHTML=_((r=e.attr.content)==null?``:r),g(i,e.style),i},b=function(e){var t=document.createElement(`div`);return g(t,e.style),t},x=function(e){var t,n=document.createElement(`div`);return n.innerHTML=_((t=e.attr.content)==null?``:t),g(n,e.style),n},ee=function(e){var t,n=document.createElement(`div`);return n.innerHTML=_((t=e.attr.content)==null?``:t),g(n,e.style),n},S=function(e){var t,n,r=document.createElement(`img`);if(r.src=(t=e.attr.src)==null?``:t,r.alt=(n=e.attr.alt)==null?``:n,e.attr.href){var i,a,o=document.createElement(`a`);return o.href=(i=e.attr.href)==null?``:i,o.target=(a=e.attr.target)==null?``:a,r.style.width=`100%`,o.appendChild(r),g(o,e.style),o}return g(r,e.style),r},C=function(e){var t,n=document.createElement(`div`);return(t=e.attr.links)==null||t.forEach(function(t){var r,i=document.createElement(`a`);g(i,e.style),i.href=t.href,i.target=(r=e.attr.target)==null?``:r,i.innerHTML=t.label,n.appendChild(i)}),n};return{html:u,generateHtml:d}}),R(),Lr=Symbol(`EmailEditorContext`),R(),Se=I({__name:`EditorProvider`,setup:function(e){return Wi({store:_i()}),function(e,t){return V(),j(K(_e),{backend:K(Ie)},{default:X(function(){return[W(e.$slots,`default`)]}),_:3},8,[`backend`])}}}),xe=Se,R(),q=function(){var e=ui(_i()),t=e.version,n=e.selectedBlockKey,r=e.selectedBlockType,i=e.columnsSource,a=e.columnsMap,o=e.columnsConfigMap,s=e.cellMap,c=e.cellConfigMap,l=e.blockMap,u=e.blockConfigMap,d=e.pageConfig,f=Y().autoSaveFn,p=k(function(){return i.value.map(function(e){return a.value[e]})}),m=function(e,t){n.value=e,r.value=t},h=function(){var e={key:Hi(),type:`columns`,name:`Columns`,children:[]};return g(e),e},g=function(e){var t=_(e.key);o.value[e.key]=t},_=function(e){var n=new Date,r=O(Ir);return r.key=e,r.meta.version=t.value,r.meta.createdAt=L(n,`yyyy-MM-dd HH:mm:ss`),r.meta.updatedAt=L(n,`yyyy-MM-dd HH:mm:ss`),r},v=function(e){var t=h();a.value[t.key]=t,x(t.key),i.value.splice(e,0,t.key),f()},y=function(){var e=Hi(),t={key:e,width:100,name:`Cell`,type:`cell`,children:[]};return s.value[e]=t,c.value[e]=b(t.key),t},b=function(e){var n=new Date,r=O(Fr);return r.key=e,r.meta.version=t.value,r.meta.createdAt=L(n,`yyyy-MM-dd HH:mm:ss`),r.meta.updatedAt=L(n,`yyyy-MM-dd HH:mm:ss`),r},x=function(e){var t=a.value[e];if(t){var n=y();t.children.push(n.key)}},ee=function(e,t){if(e<0||e>=i.value.length||t<0||t>i.value.length){console.warn(`Move column: 索引超出范围`);return}var n=i.value[e],r=Q(i.value);r.splice(e,1);var a=e<t?t-1:t;r.splice(a,0,n),i.value=r,f()},S=function(e,t){var n=a.value[e];if(n){var r=n.children.findIndex(function(e){return e===t});r>-1&&(n.children.splice(r,1),delete s.value[t])}},C=function(e,t){var n=a.value[e];if(n&&a.value[e]){var r=n.children.length,i=t.length,o=i-r;if(o>0)for(var c=0;c<o;c++){var l=y();n.children.push(l.key)}else o<0&&n.children.slice(i,Math.abs(o)).forEach(function(t){S(e,t)});t.forEach(function(e,t){n.children[t]&&(s.value[n.children[t]].width=e)}),f()}},te=function(e){var n=kr.get(e.type);if(n){var r=new Date,i=O(n);i.key=e.key,i.name=e.name,i.meta.version=t.value,i.meta.createdAt=L(r,`yyyy-MM-dd HH:mm:ss`),i.meta.updatedAt=L(r,`yyyy-MM-dd HH:mm:ss`),u.value[e.key]=i}},w=function(e,t,n){var r=s.value[t];if(r){var i={key:Hi(),type:n.type,name:``.concat(n.name)};te(i),l.value[i.key]=i,r.children.splice(e,0,i.key),f()}},ne=function(e,t,n){var r=s.value[e];if(!(!r||!r.children)){var i=r.children[t];if(i&&t!==n){r.children.splice(t,1);var a=t<n?n-1:n;r.children.splice(a,0,i),f()}}},T=function(e,t,n,r,i){if(e===t)return ne(e,n,r);var a=s.value[e],o=s.value[t];if(!(!a||!a.children||!o||!o.children)&&a.children[n]===i){var c=a.children.splice(n,1);o.children.splice(r,0,c[0]),f()}},re=function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=O(l.value[n]),a=O(u.value[n]),o=s.value[e];if(o){var c=Hi();i.key=c,a.key=c,a.meta={version:t.value,createdAt:L(new Date,`yyyy-MM-dd HH:mm:ss`),updatedAt:L(new Date,`yyyy-MM-dd HH:mm:ss`)};var d=o.children.findIndex(function(e){return e===n});l.value[c]=i,u.value[c]=a,d?o.children.splice(d+1,0,c):o.children.push(c)}r&&f()},ie=function(e,n){var r=O(s.value[n]),i=O(c.value[n]),o=Hi();r.key=o,r.children=[],i.key=o,i.meta={version:t.value,createdAt:L(new Date,`yyyy-MM-dd HH:mm:ss`),updatedAt:L(new Date,`yyyy-MM-dd HH:mm:ss`)},s.value[o]=r,c.value[o]=i,s.value[n].children.forEach(function(e){re(o,e,!1)});var l=a.value[e];l&&l.children.push(o)},ae=function(e){var n=O(a.value[e]),r=O(o.value[e]),s=Hi();n.key=s,n.children=[],r.key=s,r.meta={version:t.value,createdAt:L(new Date,`yyyy-MM-dd HH:mm:ss`),updatedAt:L(new Date,`yyyy-MM-dd HH:mm:ss`)},a.value[s]=n,o.value[s]=r;var c=i.value.findIndex(function(t){return t===e});i.value.splice(c+1,0,s),a.value[e].children.forEach(function(e){ie(s,e)}),f()},oe=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=s.value[e];if(r){var i=r.children.findIndex(function(e){return e===t});i>-1&&(m(``,``),r.children.splice(i,1),delete l.value[t],delete u.value[t])}n&&f()},se=function(e,t){var n=s.value[e],r=a.value[t];if(n){n.children.forEach(function(t){oe(e,t,!1)});var i=r.children.findIndex(function(t){return t===e});i>-1&&(delete s.value[e],delete c.value[e],r.children.splice(i,1))}};return{columnsSource:i,columnsMap:a,columnsMaps:p,columnsConfigMap:o,cellMap:s,cellConfigMap:c,blockMap:l,blockConfigMap:u,selectedBlockKey:n,selectedBlockType:r,pageConfig:d,selectBlock:m,insertColumnSourceAt:v,moveColumnSource:ee,generateNewCell:y,applyNewWidthColumnsInCell:C,delColumnsInCell:S,insertBlockToCell:w,moveBlockInCell:ne,moveBlockBetweenCells:T,duplicateBlock:re,duplicateColumn:ae,removeBlock:oe,removeColumn:function(e){var t=i.value.findIndex(function(t){return t===e});t>-1&&(m(``,``),a.value[e].children.forEach(function(t){se(t,e)}),delete a.value[e],delete o.value[e],i.value.splice(t,1)),f()}}},R(),Bn={class:`block-toolbar`},$t=I({__name:`Toolbar`,props:{cellKey:{type:String,required:!0},data:{type:Object,required:!0}},setup:function(e){var t=q(),n=t.duplicateBlock,r=t.duplicateColumn,i=t.removeBlock,a=t.removeColumn,o=function(){e.data.type===`columns`?r(e.data.key):n(e.cellKey,e.data.key)},s=function(){e.data.type===`columns`?a(e.data.key):i(e.cellKey,e.data.key)};return function(e,t){var n=Mr;return V(),N(`div`,Bn,[A(`button`,{class:`tool-btn`,onClick:Ti(o,[`stop`])},[F(n,{name:`drag-copy`,size:`16`,color:`#fff`})]),A(`button`,{class:`tool-btn`,onClick:Ti(s,[`stop`])},[F(n,{name:`drag-remove`,size:`16`,color:`#fff`})])])}}}),Qt=D($t,[[`__scopeId`,`data-v-c5cb1fa1`]]),R(),zn=[`data-block-id`],rr={class:`block-section`},vr={class:`block-content`},Lt=I({__name:`Section`,props:{data:{type:Object,required:!0},cellKey:{type:String,default:``},blockType:{type:String,required:!0},blockIndex:{type:Number,default:-1}},emits:[`select`,`unSelect`],setup:function(e,t){var n=t.emit,r=q(),i=r.selectedBlockKey,a=r.columnsConfigMap,o=r.blockConfigMap,s=r.selectBlock,c=Ui().configToStyle,l=k(function(){return i.value===e.data.key}),u=function(){s(e.data.key,e.data.type),n(`select`)},d=k(function(){var t={};return t=e.data.type===`columns`?a.value[e.data.key].containerStyle:o.value[e.data.key].containerStyle,c(t)}),f=Z(hi(function(){return{type:`SORT_BASE_BLOCK`,item:function(){return{type:`SORT_BASE_BLOCK`,sourceIndex:e.blockIndex,sourceCellKey:e.cellKey,blockData:O(e.data)}},collect:function(e){return{isDragging:e.isDragging()}}}}),3),p=f[0],m=f[1],h=f[2],g=Z(hi(function(){return{type:`SORT_COLUMNS_BLOCK`,item:function(){return{type:`SORT_COLUMNS_BLOCK`,sourceIndex:e.blockIndex,blockData:O(e.data)}},collect:function(e){return{isDragging:e.isDragging()}}}}),2),_=g[0],v=g[1],y=k(function(){return p.value.isDragging||_.value.isDragging});return Ci(function(){return y.value},function(e){e===!0&&n(`unSelect`)}),Ci(function(){return l.value},function(e,t){e===!1&&t===!0&&n(`unSelect`)}),function(t,n){return V(),N(`div`,{ref:K(h),class:ti([`block-base`,[`block-`.concat(e.blockType),{"is-selected":K(l)},{"is-dragging":K(y)}]]),"data-block-id":e.data.key,style:B(K(d)),onClick:Ti(u,[`stop`])},[A(`div`,rr,[wi(F(Qt,{"cell-key":e.cellKey,data:e.data},null,8,[`cell-key`,`data`]),[[Si,K(l)&&!K(y)]]),e.data.type===`columns`?(V(),N(`div`,{key:0,ref:K(v),class:`drag-handle columns-drag-handle`},Q(n[0]||(n[0]=[A(`i`,{class:`drag-icon`},`≡`,-1)])),512)):M(``,!0),e.data.type===`columns`?M(``,!0):(V(),N(`div`,{key:1,ref:K(m),class:`drag-handle`},Q(n[1]||(n[1]=[A(`i`,{class:`drag-icon`},`≡`,-1)])),512))]),A(`div`,vr,[W(t.$slots,`default`,{},void 0,!0)])],14,zn)}}}),It=D(Lt,[[`__scopeId`,`data-v-f8113c96`]]),R(),Rn={ref:`editorBoxRef`,class:`editor-box`},Oe=I({__name:`Editor`,props:$r({type:{type:String,default:`button`}},{value:{},valueModifiers:{}}),emits:[`update:value`],setup:function(e,t){var n=t.expose,r=li(void 0),i=bi(`toolbarRef`),a=J(e,`value`),o=H({}),s=function(){switch(e.type){case`button`:return[`bold`,`underline`,`italic`,`through`];case`text`:return[`bold`,`underline`,`italic`,`through`,`sup`,`sub`,`color`,`bgColor`,`bulletedList`,`numberedList`,`insertLink`];case`header`:return[`bold`,`underline`,`italic`,`through`,`color`,`bgColor`,`bulletedList`,`numberedList`,`insertLink`]}};Ei(`en`);var c={toolbarKeys:s()},l={autoFocus:!1,placeholder:``},u=H(!1),d=!1,f=function(){if(r.value&&i.value){var e=r.value.getEditableContainer();if(e){var t=e.getBoundingClientRect();if(i.value.selector){var n=i.value.$el.querySelector(`.w-e-toolbar`),a=300;n&&(a=n.getBoundingClientRect().width);var s=t.left+(t.width-a)/2;o.value={top:``.concat(t.top-56,`px`),left:``.concat(s,`px`)}}}}},p=function(e){r.value=e,ei(function(){window.addEventListener(`resize`,f);var t=kt.getToolbar(e);t&&t.$box.find(`button[data-menu-key="insertLink"]`).on(`click`,function(){d=!0})})},m=function(){u.value=!0,ei(function(){f()})},h=function(){if(d){d=!1;return}u.value=!1};return ni(function(){var e=r.value;e!=null&&(e.destroy(),window.removeEventListener(`resize`,f))}),n({focus:function(){var e;u.value=!0,(e=r.value)==null||e.focus()},blur:function(){u.value=!1}}),function(e,t){return V(),N(`div`,Rn,[wi(F(K(Zt),{ref_key:`toolbarRef`,ref:i,class:`toolbar`,mode:`default`,editor:K(r),style:B(K(o)),defaultConfig:c},null,8,[`editor`,`style`]),[[Si,K(u)]]),F(K(ve),{modelValue:a.value,"onUpdate:modelValue":t[0]||(t[0]=function(e){return a.value=e}),class:`editor`,mode:`simple`,defaultConfig:l,onOnCreated:p,onOnFocus:m,onOnBlur:h},null,8,[`modelValue`])],512)}}}),Ee=D(Oe,[[`__scopeId`,`data-v-320a6ce4`]]),R(),h=I({__name:`Button`,props:{data:{type:Object,required:!0},cellKey:{type:String,required:!0},blockIndex:{type:Number,required:!0}},setup:function(e){var t=q().blockConfigMap,n=Ui().configToStyle,r=bi(`editorRef`),i=k({get:function(){return t.value[e.data.key].attr},set:function(n){t.value[e.data.key].attr=n}}),a=k(function(){var r=t.value[e.data.key].style;return Li({},n(r))}),o=function(){var e;(e=r.value)==null||e.focus()},s=function(){var e;(e=r.value)==null||e.blur()};return function(t,n){return V(),j(It,{data:e.data,"cell-key":e.cellKey,"block-type":e.data.type,"block-index":e.blockIndex,onSelect:o,onUnSelect:s},{default:X(function(){return[A(`div`,{style:B(K(a))},[F(Ee,{ref_key:`editorRef`,ref:r,value:K(i).content,"onUpdate:value":n[0]||(n[0]=function(e){return K(i).content=e})},null,8,[`value`])],4)]}),_:1},8,[`data`,`cell-key`,`block-type`,`block-index`])}}}),p=h,R(),mt=I({__name:`Link`,props:{data:{type:Object,required:!0},cellKey:{type:String,required:!0},blockIndex:{type:Number,required:!0}},setup:function(e){var t=q().blockConfigMap,n=Ui().configToStyle,r=bi(`editorRef`),i=k({get:function(){return t.value[e.data.key].attr},set:function(n){t.value[e.data.key].attr=n}}),a=k(function(){var r=t.value[e.data.key].style;return Li({},n(r))}),o=function(){var e;(e=r.value)==null||e.focus()},s=function(){var e;(e=r.value)==null||e.blur()};return function(t,n){return V(),j(It,{data:e.data,"cell-key":e.cellKey,"block-type":e.data.type,"block-index":e.blockIndex,onSelect:o,onUnSelect:s},{default:X(function(){return[A(`div`,{style:B(K(a))},[F(Ee,{ref_key:`editorRef`,ref:r,value:K(i).content,"onUpdate:value":n[0]||(n[0]=function(e){return K(i).content=e})},null,8,[`value`])],4)]}),_:1},8,[`data`,`cell-key`,`block-type`,`block-index`])}}}),dt=mt,R(),ge=I({__name:`Divider`,props:{data:{type:Object,required:!0},cellKey:{type:String,required:!0},blockIndex:{type:Number,required:!0}},setup:function(e){var t=q().blockConfigMap,n=Ui().configToStyle,r=k(function(){var r=t.value[e.data.key].style;return Li({},n(r))});return function(t,n){return V(),j(It,{data:e.data,"cell-key":e.cellKey,"block-type":e.data.type,"block-index":e.blockIndex},{default:X(function(){return[A(`div`,{style:B(K(r))},null,4)]}),_:1},8,[`data`,`cell-key`,`block-type`,`block-index`])}}}),me=ge,R(),He=I({__name:`Header`,props:{data:{type:Object,required:!0},cellKey:{type:String,required:!0},blockIndex:{type:Number,required:!0}},setup:function(e){var t=q().blockConfigMap,n=Ui().configToStyle,r=bi(`editorRef`),i=k({get:function(){return t.value[e.data.key].attr},set:function(n){t.value[e.data.key].attr=n}}),a=k(function(){var r=t.value[e.data.key].style;return zi(Li({},n(r)),{width:`100%`})}),o=function(){var e;(e=r.value)==null||e.focus()},s=function(){var e;(e=r.value)==null||e.blur()};return function(t,n){return V(),j(It,{data:e.data,"cell-key":e.cellKey,"block-type":e.data.type,"block-index":e.blockIndex,onSelect:o,onUnSelect:s},{default:X(function(){return[A(`div`,{style:B(K(a))},[F(Ee,{ref_key:`editorRef`,ref:r,value:K(i).content,"onUpdate:value":n[0]||(n[0]=function(e){return K(i).content=e}),type:`header`},null,8,[`value`])],4)]}),_:1},8,[`data`,`cell-key`,`block-type`,`block-index`])}}}),Be=He,R(),Jt=I({__name:`Text`,props:{data:{type:Object,required:!0},cellKey:{type:String,required:!0},blockIndex:{type:Number,required:!0}},setup:function(e){var t=q().blockConfigMap,n=Ui().configToStyle,r=bi(`editorRef`),i=k({get:function(){return t.value[e.data.key].attr},set:function(n){t.value[e.data.key].attr=n}}),a=k(function(){var r=t.value[e.data.key].style;return zi(Li({},n(r)),{width:`100%`})}),o=function(){var e;(e=r.value)==null||e.focus()},s=function(){var e;(e=r.value)==null||e.blur()};return function(t,n){return V(),j(It,{data:e.data,"cell-key":e.cellKey,"block-type":e.data.type,"block-index":e.blockIndex,onSelect:o,onUnSelect:s},{default:X(function(){return[A(`div`,{style:B(K(a))},[F(Ee,{ref_key:`editorRef`,ref:r,value:K(i).content,"onUpdate:value":n[0]||(n[0]=function(e){return K(i).content=e}),type:`text`},null,8,[`value`])],4)]}),_:1},8,[`data`,`cell-key`,`block-type`,`block-index`])}}}),Kt=Jt,R(),Or={},Ln={class:`block-none`},wt=D(Or,[[`render`,Gi],[`__scopeId`,`data-v-1e66913b`]]),R(),In=[`src`,`alt`],Je=I({__name:`Image`,props:{data:{type:Object,required:!0},cellKey:{type:String,required:!0},blockIndex:{type:Number,required:!0}},setup:function(e){var t=q().blockConfigMap,n=Ui().configToStyle,r=k(function(){var r=t.value[e.data.key].style;return Li({},n(r))}),i=k({get:function(){return t.value[e.data.key].attr},set:function(n){t.value[e.data.key].attr=n}});return function(t,n){return V(),j(It,{data:e.data,"cell-key":e.cellKey,"block-type":e.data.type,"block-index":e.blockIndex},{default:X(function(){return[A(`div`,{style:B(K(r))},[K(i).src?(V(),N(`img`,{key:0,src:K(i).src,alt:K(i).alt},null,8,In)):(V(),j(wt,{key:1},{default:X(function(){return Q(n[0]||(n[0]=[P(`Image`,-1)]))}),_:1}))],4)]}),_:1},8,[`data`,`cell-key`,`block-type`,`block-index`])}}}),Ge=D(Je,[[`__scopeId`,`data-v-a891cab1`]]),R(),bt=I({__name:`Menu`,props:{data:{type:Object,required:!0},cellKey:{type:String,required:!0},blockIndex:{type:Number,required:!0}},setup:function(e){var t=q().blockConfigMap,n=Ui().configToStyle,r=k(function(){var r=t.value[e.data.key].style;return Li({},n(r))}),i=k(function(){return t.value[e.data.key].attr});return function(t,n){return V(),j(It,{data:e.data,"cell-key":e.cellKey,"block-type":e.data.type,"block-index":e.blockIndex},{default:X(function(){var e;return[A(`div`,null,[((e=K(i).links)==null?void 0:e.length)===0?(V(),j(wt,{key:0},{default:X(function(){return Q(n[0]||(n[0]=[P(`Menu`,-1)]))}),_:1})):M(``,!0),(V(!0),N(E,null,U(K(i).links,function(e){return V(),N(`a`,{key:e.id,style:B(K(r))},G(e.label),5)}),128))])]}),_:1},8,[`data`,`cell-key`,`block-type`,`block-index`])}}}),vt=bt,R(),Fn=[`data-cell-key`],nr={key:0,class:`column-placeholder`},y=I({__name:`Cell`,props:{data:{type:Object,required:!0},blockKey:{type:String,required:!0}},setup:function(e){var t=q(),n=t.cellMap,r=t.cellConfigMap,i=t.blockMap,a=t.insertBlockToCell,o=t.moveBlockInCell,s=t.moveBlockBetweenCells,c=Ui().configToStyle,l=H(null),u=H(null),d=H([]),f=function(e){e&&(l.value=e,ce(e))},m=function(e,t){e&&(d.value.length<=t&&(d.value=d.value.concat(Array(t-d.value.length+1).fill(null))),d.value[t]=e)},h=k(function(){return``.concat(e.data.width,`%`)}),g=k(function(){var t=r.value[e.blockKey].style;return zi(Li({},c(t)),{width:h.value})}),_=k(function(){return n.value[e.blockKey]?n.value[e.blockKey].children.filter(function(e){return!!i.value[e]}).map(function(e){return i.value[e]}):[]}),v=k(function(){return _.value&&_.value.length>0}),y=H(!1),b=H(-1),x=H(-1),ee=H(``),S=H(``),C=H({x:0,y:0}),te=k(function(){return y.value&&ee.value===e.blockKey&&x.value!==-1}),w=H([]),ne=function(e){return!y.value||b.value===-1||e<b.value?e:e-1},T=k(function(){if(!v.value||!y.value||b.value===-1)return _.value||[];var e=Q(_.value||[]);if(te.value){if(x.value===b.value)return e;var t=e.splice(x.value,1)[0];return e.splice(b.value>x.value?b.value-1:b.value,0,t),e}var n={key:`drag-placeholder`,type:`placeholder`,name:`Placeholder`};return b.value<=e.length?e.splice(b.value,0,n):e.push(n),e}),re=function(){if(!(!l.value||!u.value||d.value.length===0)){var e=[],t=l.value.getBoundingClientRect();d.value.forEach(function(n,r){if(n){var i=n.getBoundingClientRect();e.push({index:r,top:i.top-t.top,bottom:i.bottom-t.top,center:i.top+i.height/2-t.top,height:i.height})}}),e.sort(function(e,t){return e.top-t.top}),w.value=e}},ie=function(e,t){if(t.length===0||e<t[0].top)return 0;if(e>t[t.length-1].bottom)return t.length;for(var n=0,r=t.length-1;n<=r;){var i=Math.floor((n+r)/2),a=t[i];if(e>=a.top&&e<=a.bottom)return e<a.top+a.height/2?a.index:a.index+1;e<a.top?r=i-1:n=i+1}return n<t.length?n:t.length},ae=function(){if(!l.value){b.value=0;return}var e=l.value.getBoundingClientRect(),t=C.value.y-e.top;if(t<20){b.value=0;return}if(t>e.height-20){b.value=_.value.length;return}if(!w.value.length&&(re(),!w.value.length)){b.value=0;return}b.value=ie(t,w.value)},oe=fi(function(){ae()},10,{leading:!0,trailing:!0}),se=function(){y.value=!1,b.value=-1,x.value=-1,ee.value=``,S.value=``,w.value=[]},ce=Z(gi(function(){return{accept:[`ADD_BASE_BLOCK`,`SORT_BASE_BLOCK`],hover:fi(function(e,t){if(S.value=e.type,y.value||re(),!t.isOver()){se();return}y.value=!0,e.type===`SORT_BASE_BLOCK`&&(x.value=e.sourceIndex===void 0?-1:e.sourceIndex,ee.value=e.sourceCellKey||``);var n=t.getClientOffset();n&&(C.value={x:n.x,y:n.y},oe())},16),drop:function(t){if(t.type===`ADD_BASE_BLOCK`&&(v.value&&b.value!==-1?a(b.value,e.blockKey,t.blockData):a(0,e.blockKey,t.blockData)),t.type===`SORT_BASE_BLOCK`&&b.value!==-1)if(t.sourceCellKey===e.blockKey){var n=t.sourceIndex<b.value?b.value-1:b.value;t.sourceIndex!==n&&o(e.blockKey,t.sourceIndex,b.value)}else t.sourceCellKey&&s(t.sourceCellKey,e.blockKey,t.sourceIndex,b.value,t.blockData.key);se()},collect:function(e){return e.isOver()||se(),{}}}}),2)[1],le=function(e){return{button:p,link:dt,divider:me,header:Be,text:Kt,image:Ge,menu:vt}[e]||null},ue=Rr(function(){y.value&&re()},100,{leading:!0,maxWait:200}),de=Rr(function(){y.value&&re()},100,{leading:!0,maxWait:200});return ri(function(){window.addEventListener(`scroll`,ue,{passive:!0}),window.addEventListener(`resize`,de,{passive:!0})}),ii(function(){window.removeEventListener(`scroll`,ue),window.removeEventListener(`resize`,de),oe.cancel(),ue.cancel(),de.cancel()}),function(t,n){return V(),N(`div`,{ref:f,class:ti([`cell-container`,{"drop-active":K(y)}]),style:B(K(g)),"data-cell-key":e.blockKey},[A(`div`,{ref_key:`contentRef`,ref:u,class:`cell-content`},[(V(!0),N(E,null,U(K(T),function(t,r){return V(),N(E,{key:t.key||`placeholder-`.concat(r)},[t.type===`placeholder`?(V(),N(`div`,{key:1,class:ti([`block-placeholder`,{active:K(y)}])},Q(n[0]||(n[0]=[A(`div`,{class:`placeholder-content`},[A(`span`,null,`Place new content here`)],-1)])),2)):(V(),N(`div`,{key:0,class:`block-wrapper`,ref_for:!0,ref:function(e){return m(e,r)}},[(V(),j(ci(le(t.type)),{data:t,"block-index":ne(r),"cell-key":e.blockKey,class:`block-item`},null,8,[`data`,`block-index`,`cell-key`]))],512))],64)}),128))],512),K(v)?M(``,!0):(V(),N(`div`,nr,Q(n[1]||(n[1]=[A(`span`,null,`Drag and drop contents to this column`,-1)]))))],14,Fn)}}}),v=D(y,[[`__scopeId`,`data-v-98374d19`]]),R(),Pn=[`onMousedown`],se=I({__name:`Columns`,props:{index:Number,data:{type:Object,required:!0}},setup:function(e){var t=q(),n=t.columnsConfigMap,r=t.cellMap,i=t.selectedBlockKey,a=t.pageConfig,o=Ui().configToStyle,s=li(null),c=H([]),l=H(!1),u=H(-1),d=H(0),f=H([]),p=k(function(){var t=n.value[e.data.key].style;return zi(Li({},o(t)),{width:a.value.style.width})}),m=k(function(){return i.value===e.data.key}),h=H(null),g=function(t,n){h.value&&clearTimeout(h.value),h.value=window.setTimeout(function(){r.value[e.data.children[t]].width=c.value[t],r.value[e.data.children[n]].width=c.value[n],h.value=null},16)};Ci(function(){return e.data.children.length},function(){return _()});var _=function(){var t;if(!((t=e.data)==null||(t=t.children)==null)&&t.length){var n=e.data.children.length,i=Math.floor(100/n),a=100-i*n;c.value=e.data.children.map(function(e,t){var o=r.value[e];if(typeof o.width==`number`&&!isNaN(o.width))return o.width;var s=t===n-1?i+a:i;return o.width=s,s}),y()}},y=function(){if(!(!c.value||c.value.length===0)){var t=c.value.reduce(function(e,t){return e+(isNaN(t)?0:t)},0);if(t!==100){var n=100-t,i=c.value.length-1;c.value[i]=Math.max(10,(c.value[i]||0)+n),e.data.children[i]&&(r.value[e.data.children[i]].width=c.value[i])}}},b=function(t,n){var r;if(!(n<0||n>=e.data.children.length-1)){t.preventDefault(),l.value=!0,u.value=n,d.value=t.clientX,c.value.length===0&&_();var i=(r=s.value)==null?void 0:r.querySelectorAll(`.cell-container`);if(!i||i.length<=n+1){l.value=!1;return}var a=i[n].getBoundingClientRect().width,o=i[n+1].getBoundingClientRect().width;a>0&&o>0?(f.value=[a,o],x(),document.body.style.userSelect=`none`,document.body.style.cursor=`col-resize`):l.value=!1}},x=function(){document.addEventListener(`mousemove`,w,{passive:!1,capture:!0}),document.addEventListener(`mouseup`,T,{passive:!1,capture:!0}),document.addEventListener(`touchmove`,S,{passive:!1,capture:!0}),document.addEventListener(`touchend`,T,{passive:!1,capture:!0}),document.addEventListener(`touchcancel`,T,{passive:!1,capture:!0})},ee=function(){document.removeEventListener(`mousemove`,w,{capture:!0}),document.removeEventListener(`mouseup`,T,{capture:!0}),document.removeEventListener(`touchmove`,S,{capture:!0}),document.removeEventListener(`touchend`,T,{capture:!0}),document.removeEventListener(`touchcancel`,T,{capture:!0})},S=function(e){!l.value||!e.touches[0]||(e.preventDefault(),w({clientX:e.touches[0].clientX,preventDefault:function(){return e.preventDefault()}}))},C=null,te=null,w=function(e){e.preventDefault(),l.value&&(te=e,C===null&&(C=requestAnimationFrame(ne)))},ne=function(){if(C=null,!(!te||!l.value)){var e=te,t=u.value;if(!(t<0||t>=c.value.length-1||f.value.length<2||f.value[0]<=0||f.value[1]<=0)){var n=f.value[0]+f.value[1],r=e.clientX-d.value,i=Math.max(50,Math.min(n-50,f.value[0]+r)),a=c.value[t]+c.value[t+1],o=10,s=a-o,p=Math.round(i/n*a);p=Math.max(o,Math.min(s,p));var m=a-p;c.value[t]=p,c.value[t+1]=m,g(t,t+1)}}},T=function(t){if(t.preventDefault(),l.value=!1,C!==null&&(cancelAnimationFrame(C),C=null),h.value){clearTimeout(h.value),h.value=null;var n=u.value;n>=0&&n<c.value.length-1&&(r.value[e.data.children[n]].width=c.value[n],r.value[e.data.children[n+1]].width=c.value[n+1])}ee(),document.body.style.userSelect=``,document.body.style.cursor=``,te=null};return ri(function(){_()}),ii(function(){C!==null&&cancelAnimationFrame(C),h.value&&clearTimeout(h.value),ee()}),function(t,n){return V(),j(It,{data:e.data,"block-type":`columns`,"block-index":e.index},{default:X(function(){return[A(`div`,{ref_key:`columnsLayoutRef`,ref:s,class:`columns-layout`,style:B(K(p))},[(V(!0),N(E,null,U(e.data.children,function(t,n){return V(),N(E,{key:t},[F(v,{blockKey:t,data:K(r)[t]},null,8,[`blockKey`,`data`]),n<e.data.children.length-1?wi((V(),N(`div`,{key:0,class:ti([`column-divider`,{active:K(l)&&K(u)===n}]),onMousedown:function(e){return b(e,n)}},null,42,Pn)),[[Si,K(m)]]):M(``,!0)],64)}),128))],4)]}),_:1},8,[`data`,`block-index`])}}}),ae=D(se,[[`__scopeId`,`data-v-741ae7b5`]]),R(),Nn={key:0,class:`empty-container`},_=I({__name:`Canvas`,setup:function(e){var t=this,n=q(),r=n.pageConfig,i=n.columnsMaps,a=n.selectBlock,o=n.insertColumnSourceAt,s=n.moveColumnSource,c=H(null),l=H(null),u=function(e){e&&(c.value=e,de(e))},d=H(new Map),f=H([]),p=si({needsUpdate:!0,isUpdating:!1,lastUpdateTime:0,lastColumnsLength:0}),m=H({x:0,y:0}),h=si({isDragging:!1,isProcessingDrop:!1,placeholderIndex:-1,highlightIndex:-1,insertPosition:null,currentDragType:null,sortingActive:!1}),g=si({isSorting:!1,sourceIndex:-1,lastAppliedTarget:-1,originalOrder:[],draggedElement:null,dragSourceDisplayIndex:-1}),_=H(0),v=k(function(){if(g.isSorting||!h.isDragging||h.placeholderIndex<0)return i.value;var e=Q(i.value),t={key:`drag-placeholder`,type:`placeholder`,name:`Placeholder`,children:[]},n=Math.min(Math.max(0,h.placeholderIndex),e.length);return e.splice(n,0,t),e}),y=k(function(){return{backgroundColor:r.value.style.backgroundColor}}),b=function(e){var t=v.value[e];if(!t||!g.isSorting)return e;var n=i.value.findIndex(function(e){return e===t});return n===-1?e:n},x={isAllowedDragType:function(e){return e===`SORT_COLUMNS_BLOCK`||i.value.length===0||e===`ADD_COLUMNS_BLOCK`},findTargetPosition:function(e){if(f.value.length===0)return null;if(e<f.value[0].top)return{targetIndex:0,targetPosition:`before`};var t=f.value[f.value.length-1];if(e>t.bottom)return{targetIndex:t.index,targetPosition:`after`};var n=!0,r=!1,i=void 0;try{for(var a=f.value[Symbol.iterator](),o;!(n=(o=a.next()).done);n=!0){var s=o.value;if(!(g.isSorting&&s.index===g.sourceIndex)&&e>=s.top&&e<=s.bottom)return{targetIndex:s.index,targetPosition:e<s.center?`before`:`after`}}}catch(e){r=!0,i=e}finally{try{!n&&a.return!=null&&a.return()}finally{if(r)throw i}}for(var c=0;c<f.value.length-1;c++){var l=f.value[c],u=f.value[c+1];if(!(g.isSorting&&(l.index===g.sourceIndex||u.index===g.sourceIndex))&&e>l.bottom&&e<u.top)return{targetIndex:l.index,targetPosition:`after`}}return null},getMoveToIndex:function(e){return e?e.targetPosition===`before`?e.targetIndex:e.targetIndex+1:-1},shouldSkipMove:function(e,t,n){return t===e||t===e+1||t===n},getNewSourceIndex:function(e,t){return t>e?t-1:t}},ee=function(e,t){if(!e){d.value.delete(t);return}var n=b(t);e.dataset.index=n.toString(),d.value.set(t,e),p.needsUpdate=!0},S=function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(!(p.isUpdating&&!e)&&!(!p.needsUpdate&&!e)){p.isUpdating=!0;try{var t=c.value;if(!t)return;var n=t.getBoundingClientRect(),r=[],a=t.querySelectorAll(`.block-columns-wrapper`);if(a.length===0){f.value=[],p.needsUpdate=!1;return}a.forEach(function(e,t){var i=e.getBoundingClientRect(),a=e.dataset.index,o=a?parseInt(a,10):t;r.push({index:o,domIndex:t,top:i.top-n.top,bottom:i.bottom-n.top,height:i.height,center:i.top-n.top+i.height/2,element:e})}),f.value=r.sort(function(e,t){return e.top-t.top}),p.needsUpdate=!1,p.lastUpdateTime=Date.now(),p.lastColumnsLength=i.value.length}finally{p.isUpdating=!1}}};Ci(function(){return i.value.length},function(e,t){e!==t&&(p.needsUpdate=!0,ei(function(){S()}))});var C=function(){a(``,``)},te=fi(function(e){h.isProcessingDrop||(m.value={x:e.clientX,y:e.clientY},h.isDragging&&(g.isSorting?re(m.value):T(m.value)))},16),w=function(){!h.isDragging||h.isProcessingDrop||ne()},ne=function(){h.highlightIndex=-1,h.insertPosition=null},T=function(e){if(!(!h.isDragging||h.isProcessingDrop||g.isSorting)){if(!x.isAllowedDragType(h.currentDragType||``)){h.placeholderIndex=-1;return}var t=c.value;if(t){var n=t.getBoundingClientRect(),r=e.y-n.top;if(f.value.length===0){h.placeholderIndex=0;return}p.needsUpdate&&S();var i=x.findTargetPosition(r);if(i){var a=i.targetIndex,o=i.targetPosition;h.highlightIndex=a,h.insertPosition=o,h.placeholderIndex=o===`before`?a:a+1}}}},re=fi(function(e){!g.isSorting||h.isProcessingDrop||(p.needsUpdate&&S(!0),ie(e))},16,{leading:!0,trailing:!0}),ie=function(e){var t;if(g.isSorting){var n=(t=c.value)==null?void 0:t.getBoundingClientRect();if(n){var r=e.y-n.top,i=x.findTargetPosition(r);if(i){var a=x.getMoveToIndex(i);if(!x.shouldSkipMove(g.sourceIndex,a,g.lastAppliedTarget)){h.highlightIndex=i.targetIndex,h.insertPosition=i.targetPosition,_.value++,s(g.sourceIndex,a);var o=x.getNewSourceIndex(g.sourceIndex,a);g.lastAppliedTarget=a,g.sourceIndex=o,p.needsUpdate=!0,ei(function(){S(!0)})}}}}},oe=function(e){if(!g.isSorting){S(!0);var t=null,n=-1,r=!0,a=!1,o=void 0;try{for(var s=f.value[Symbol.iterator](),l;!(r=(l=s.next()).done);r=!0){var u=l.value;if(u.index===e){n=u.domIndex,t=u.element;break}}}catch(e){a=!0,o=e}finally{try{!r&&s.return!=null&&s.return()}finally{if(a)throw o}}if(!t){var d=c.value;d&&d.querySelectorAll(`.block-columns-wrapper`).forEach(function(r,i){parseInt(r.dataset.index||`-1`,10)===e&&(t=r,n=i)})}n===-1&&(n=e),g.isSorting=!0,g.sourceIndex=e,g.originalOrder=Q(i.value),g.lastAppliedTarget=-1,g.draggedElement=t,g.dragSourceDisplayIndex=n,h.isDragging=!0,h.currentDragType=`SORT_COLUMNS_BLOCK`,h.sortingActive=!0,_.value=0,p.needsUpdate=!0,S(!0)}},se=function(){g.isSorting=!1,g.sourceIndex=-1,g.originalOrder=[],g.lastAppliedTarget=-1,g.draggedElement=null,g.dragSourceDisplayIndex=-1,h.sortingActive=!1,h.highlightIndex=-1,h.insertPosition=null,_.value=0,p.needsUpdate=!0,ei(function(){return S(!0)})},ce=function(e){try{var t=e.type;if(!e.blockData||!x.isAllowedDragType(t))return;t===`ADD_COLUMNS_BLOCK`?o(h.placeholderIndex>=0?h.placeholderIndex:i.value.length):t===`ADD_BASE_BLOCK`&&o(0)}finally{p.needsUpdate=!0,ei(function(){return S(!0)})}},le=function(){h.isDragging=!1,h.isProcessingDrop=!1,h.currentDragType=null,h.placeholderIndex=-1,h.highlightIndex=-1,h.insertPosition=null,h.sortingActive=!1,g.isSorting=!1,g.sourceIndex=-1,g.originalOrder=[],g.lastAppliedTarget=-1,g.draggedElement=null,g.dragSourceDisplayIndex=-1,p.needsUpdate=!0},ue=function(){le(),ei(function(){return S()})},de=Z(gi(function(){return{accept:[`ADD_COLUMNS_BLOCK`,`ADD_BASE_BLOCK`,`SORT_COLUMNS_BLOCK`],hover:fi(function(e,t){if(!h.isProcessingDrop){var n=t.isOver({shallow:!0});h.currentDragType=e.type;var r=e.type===`SORT_COLUMNS_BLOCK`||x.isAllowedDragType(e.type),i=n&&t.canDrop()&&r;if(h.isDragging&&!i&&!g.isSorting&&(h.placeholderIndex=-1),h.isDragging=i,!(!r&&e.type!==`SORT_COLUMNS_BLOCK`)&&n){var a=t.getClientOffset();a&&(e.type===`SORT_COLUMNS_BLOCK`&&`sourceIndex`in e?(g.isSorting||oe(e.sourceIndex),re(a)):(e.type===`ADD_COLUMNS_BLOCK`||e.type===`ADD_BASE_BLOCK`)&&T(a))}}},16,{leading:!0,trailing:!0}),drop:function(e,t){if(!h.isProcessingDrop){h.isProcessingDrop=!0;try{if(!t.isOver({shallow:!0}))return;e.type===`SORT_COLUMNS_BLOCK`?se():(e.type===`ADD_COLUMNS_BLOCK`||e.type===`ADD_BASE_BLOCK`)&&ce(e)}finally{setTimeout(function(){ue()},50)}}},collect:function(e){return h.isDragging&&!e.isOver()&&(g.isSorting||(h.placeholderIndex=-1),h.isDragging=!1),{}}}}),2)[1];return function(e,n){var r=t;return V(),N(`div`,{ref:u,class:`canvas-area`,onClick:Ti(C,[`stop`])},[A(`div`,{ref_key:`canvasRef`,ref:l,class:`canvas-container`,style:B(K(y)),onMousemove:n[0]||(n[0]=function(){var e=[...arguments];return K(te)&&K(te).apply(r,Q(e))}),onMouseleave:w},[(V(!0),N(E,null,U(K(v),function(e,t){return V(),N(E,{key:e.key||`placeholder-`.concat(t)},[e.type===`columns`?(V(),N(`div`,{key:0,ref_for:!0,ref:function(e){return ee(e,t)},class:`block-columns-wrapper`},[F(ae,{data:e,index:b(t)},null,8,[`data`,`index`])],512)):M(``,!0),e.type===`placeholder`?(V(),N(`div`,{key:1,class:ti([`block-placeholder`,{active:K(h).isDragging}])},Q(n[1]||(n[1]=[A(`div`,{class:`placeholder-content`},[A(`span`,null,`Place the new content here`)],-1)])),2)):M(``,!0)],64)}),128)),K(i).length===0&&!K(h).isDragging?(V(),N(`div`,Nn,Q(n[2]||(n[2]=[A(`div`,{class:`empty-message`},`No content here. Drag content from left.`,-1)])))):M(``,!0)],36)])}}}),g=D(_,[[`__scopeId`,`data-v-53cd2711`]]),R(),Mn=[`innerHTML`],Kr=I({__name:`index`,setup:function(e){var t=vi(),n=t.html,r=t.generateHtml;return r(),function(e,t){return V(),N(`div`,{innerHTML:K(n)},null,8,Mn)}}}),ai=Kr,R(),An={class:`editor-tools`},Gr=I({__name:`index`,setup:function(e){var t=function(){yi({title:`Preview`,width:800,height:600,component:ai})};return function(e,n){var r=Mr;return V(),N(`div`,An,[A(`div`,null,[A(`span`,{class:`cursor-pointer`,onClick:t},[F(r,{name:`drag-preview`,size:`18`})])]),A(`div`,null,[M(``,!0)])])}}}),mi=D(Gr,[[`__scopeId`,`data-v-428569d7`]]),R(),kn={class:`editor-container`},tr={class:`flex-1`},De=I({__name:`Editor`,setup:function(e){return function(e,t){return V(),N(`div`,kn,[F(mi),A(`div`,tr,[F(g)])])}}}),Te=D(De,[[`__scopeId`,`data-v-b95fec5b`]]),R(),On={class:`text`},jr=I({__name:`block`,props:{type:{type:String,required:!0},data:{type:Object,required:!0}},setup:function(e){var t=Z(hi(function(){return{type:e.type===`columns`?`ADD_COLUMNS_BLOCK`:`ADD_BASE_BLOCK`,item:{type:e.type===`columns`?`ADD_COLUMNS_BLOCK`:`ADD_BASE_BLOCK`,blockData:O(e.data)}}}),2)[1];return function(n,r){var i=Mr;return V(),N(`div`,{ref:K(t),class:`block-item`},[F(i,{name:`drag-`.concat(e.type),size:`18`},null,8,[`name`]),A(`div`,On,G(e.data.name),1)],512)}}}),Ar=D(jr,[[`__scopeId`,`data-v-ea0cad5e`]]),R(),Dn={class:`block-panel`},er={class:`block-list`},Wr=I({__name:`index`,setup:function(e){var t=H([{type:`columns`,name:`Columns`,key:`0`},{type:`button`,name:`Button`,key:`0`},{type:`link`,name:`Link`,key:`0`},{type:`divider`,name:`Divider`,key:`0`},{type:`header`,name:`Header`,key:`0`},{type:`text`,name:`Text`,key:`0`},{type:`image`,name:`Image`,key:`0`},{type:`menu`,name:`Menu`,key:`0`}]);return function(e,n){return V(),N(`div`,Dn,[A(`div`,er,[(V(!0),N(E,null,U(K(t),function(e){return V(),j(Ar,{key:e.type,type:e.type,data:e},null,8,[`type`,`data`])}),128))])])}}}),Qr=D(Wr,[[`__scopeId`,`data-v-2cd77b18`]]),R(),En={class:`editor-menu`},be=I({__name:`EditorMenu`,setup:function(e){return function(e,t){return V(),N(`div`,En,[F(Qr)])}}}),ye=D(be,[[`__scopeId`,`data-v-7b19c6e6`]]),R(),Dr={},x=D(Dr,[[`render`,Ki],[`__scopeId`,`data-v-be0a8b1b`]]),R(),Tn={class:`columns-panel`},$n={class:`layout-grid`},_r=[`onClick`],br={class:`layout-preview`},xr={class:`text`},Sr={key:0,class:`layout-option active mt-16px`},Cr={class:`layout-preview`},wr={class:`text`},re=I({__name:`ColumnsPanel`,setup:function(e){var t=q(),n=t.columnsMap,r=t.cellMap,i=t.selectedBlockKey,a=t.generateNewCell,o=Y().autoSaveFn,s=k(function(){return n.value[i.value]}),c=[{type:`single`,columns:[100]},{type:`two-equal`,columns:[50,50]},{type:`three-equal`,columns:[33,33,33]},{type:`four-equal`,columns:[25,25,25,25]},{type:`two-left-small`,columns:[33,67]},{type:`two-right-small`,columns:[67,33]},{type:`four-left-small`,columns:[17,33,17,33]},{type:`four-right-small`,columns:[33,17,33,17]}],l=new Map(c.map(function(e){return[e.type,e.columns]})),u=H(null),d=k(function(){var e,t=(e=s.value)==null?void 0:e.children;return t!=null&&t.length?t.map(function(e){return r.value[e].width||0}):[]}),f=k(function(){var e=d.value;if(!e.length)return``;for(var t=0;t<c.length;t++){var n=c[t];if(n.columns.length===e.length){for(var r=!0,i=0;i<e.length;i++)if(Math.abs(e[i]-n.columns[i])>3){r=!1;break}if(r)return n.type}}return``}),p=k(function(){return d.value.length>0&&c.some(function(e){return e.columns.length===d.value.length&&e.columns.every(function(e,t){return Math.abs(e-d.value[t])<=1})})}),m=k(function(){return p.value?f.value:``}),h=function(e){return l.get(e)||[100]},g=function(e){if(u.value=e,s.value){var t=h(e),c=s.value.children||[],l=Math.max(0,t.length-c.length),d=l>0?Array.from({length:l},function(){return a()}):[],f=t.map(function(e,t){if(t<c.length)return r.value[c[t]].width=e,c[t];var n=d[t-c.length];return n.width=e,n.key});i.value&&(n.value[i.value].children=f),o()}};return function(e,t){return V(),N(`div`,Tn,[A(`div`,$n,[(V(),N(E,null,U(c,function(e){return A(`div`,{key:e.type,class:ti([`layout-option`,{active:K(m)===e.type}]),onClick:function(t){return g(e.type)}},[A(`div`,br,[(V(!0),N(E,null,U(e.columns,function(e,t){return V(),N(`div`,{key:t,class:`column`,style:B({width:e+`%`})},[A(`span`,xr,G(e),1)],4)}),128))])],10,_r)}),64))]),K(p)?M(``,!0):(V(),N(`div`,Sr,[A(`div`,Cr,[(V(!0),N(E,null,U(K(d),function(e,t){return V(),N(`div`,{key:t,class:`column`,style:B({width:e+`%`})},[A(`span`,wr,G(e),1)],4)}),128))])]))])}}}),T=D(re,[[`__scopeId`,`data-v-44ad3be7`]]),R(),wn={class:`style-container`},Qn={class:`style-rows`},gr={class:`style-label`},yr={class:`style-value`},a=I({__name:`BaseContainer`,props:{label:{type:String,default:``}},setup:function(e){return function(t,n){return V(),N(`div`,wn,[A(`div`,Qn,[A(`div`,gr,G(e.label),1),A(`div`,yr,[W(t.$slots,`value`,{},void 0,!0)])]),W(t.$slots,`options`,{},void 0,!0)])}}}),i=D(a,[[`__scopeId`,`data-v-2bc44916`]]),R(),Re=I({__name:`Head`,props:{value:{},valueModifiers:{}},emits:[`update:value`],setup:function(e){var t=J(e,`value`);return function(e,n){var r=At,a=jt;return V(),j(i,{label:`Heading Type`},{value:X(function(){return[F(a,{value:t.value,"onUpdate:value":n[0]||(n[0]=function(e){return t.value=e})},{default:X(function(){return[F(r,{value:`22px`},{default:X(function(){return Q(n[1]||(n[1]=[P(`H1`,-1)]))}),_:1}),F(r,{value:`20px`},{default:X(function(){return Q(n[2]||(n[2]=[P(`H2`,-1)]))}),_:1}),F(r,{value:`18px`},{default:X(function(){return Q(n[3]||(n[3]=[P(`H3`,-1)]))}),_:1}),F(r,{value:`16px`},{default:X(function(){return Q(n[4]||(n[4]=[P(`H4`,-1)]))}),_:1})]}),_:1},8,[`value`])]}),_:1})}}}),Le=Re,R(),Cn={class:`w-32px`},te=I({__name:`Color`,props:$r({label:{default:``}},{value:{default:``},valueModifiers:{}}),emits:[`update:value`],setup:function(e){var t=J(e,`value`);return function(n,r){var a=S;return V(),j(i,{label:e.label},{value:X(function(){return[A(`div`,Cn,[F(a,{value:t.value,"onUpdate:value":r[0]||(r[0]=function(e){return t.value=e}),modes:[`hex`]},{label:X(function(){return Q(r[1]||(r[1]=[A(`span`,null,null,-1)]))}),_:1},8,[`value`])])]}),_:1},8,[`label`])}}}),C=te,R(),Sn={class:`w-180px`},on=I({__name:`Width`,props:{value:{default:``},valueModifiers:{}},emits:[`update:value`],setup:function(e){var t=J(e,`value`),n=H(100);Ci(function(){return t.value},function(e){n.value=Number.parseFloat(e)},{immediate:!0});var r=function(e){t.value=``.concat(e,`%`)};return function(e,t){var a=zt;return V(),j(i,{label:`Width`},{value:X(function(){return[A(`div`,Sn,[F(a,{value:n.value,"onUpdate:value":[t[0]||(t[0]=function(e){return n.value=e}),r],step:1},null,8,[`value`])])]}),_:1})}}}),an=on,R(),xn={class:`flex items-center h-32px`},Zn={key:0,class:`ml-8px whitespace-nowrap`},tn=I({__name:`WidthAuto`,props:{value:{default:``},valueModifiers:{}},emits:[`update:value`],setup:function(e){var t=J(e,`value`),n=H(!0),r=H(100);Ci(function(){return t.value},function(e){e===`auto`?n.value=!0:(n.value=!1,r.value=Number.parseFloat(e)),n.value||(r.value=Number.parseFloat(e))},{immediate:!0});var a=function(e){r.value=100,e?t.value=`100%`:t.value=``.concat(r.value,`%`)},o=function(e){t.value=``.concat(e,`%`)};return function(e,t){var s=Bt,c=zt;return V(),j(i,{label:`Width`},{value:X(function(){return[t[2]||(t[2]=A(`span`,{class:`mr-12px`},`Auto On`,-1)),F(s,{value:n.value,"onUpdate:value":[t[0]||(t[0]=function(e){return n.value=e}),a]},null,8,[`value`])]}),options:X(function(){return[A(`div`,xn,[F(c,{value:r.value,"onUpdate:value":[t[1]||(t[1]=function(e){return r.value=e}),o],step:1,disabled:n.value},null,8,[`value`,`disabled`]),n.value?M(``,!0):(V(),N(`span`,Zn,G(r.value)+`%`,1))])]}),_:1})}}}),en=tn,R(),c=I({__name:`BaseNumber`,props:$r({unit:{type:String,default:`px`},step:{type:Number,default:1}},{value:{default:``},valueModifiers:{}}),emits:[`update:value`],setup:function(e){var t=J(e,`value`),n=H(0);Ci(function(){return t.value},function(e){n.value=e?Number.parseFloat(e):0},{immediate:!0});var r=function(n){t.value=``.concat(n||0,e.unit)};return function(t,i){var a=Ze,o=Ye,s=Xe;return V(),j(s,{class:`w-130px`},{default:X(function(){return[F(a,{value:K(n),"onUpdate:value":[i[0]||(i[0]=function(e){return z(n)?n.value=e:null}),r],min:0,step:e.step,placeholder:``},null,8,[`value`,`step`]),F(o,{class:`w-40px text-center`},{default:X(function(){return[P(G(e.unit),1)]}),_:1})]}),_:1})}}}),s=c,R(),rn=I({__name:`WidthNumber`,props:{value:{default:`500px`},valueModifiers:{}},emits:[`update:value`],setup:function(e){var t=J(e,`value`);return function(e,n){return V(),j(i,{label:`Width`},{value:X(function(){return[F(s,{value:t.value,"onUpdate:value":n[0]||(n[0]=function(e){return t.value=e})},null,8,[`value`])]}),_:1})}}}),nn=rn,R(),yn={class:`w-100px`},Ne=I({__name:`FontWeight`,props:$r({label:{default:``}},{value:{default:``},valueModifiers:{}}),emits:[`update:value`],setup:function(e){var t=J(e,`value`),n=[{label:`Normal`,value:`normal`},{label:`Bold`,value:`bold`}];return t.value||(t.value=n[0].value),function(e,r){var a=Rt;return V(),j(i,{label:`Font Weight`},{value:X(function(){return[A(`div`,yn,[F(a,{value:t.value,"onUpdate:value":r[0]||(r[0]=function(e){return t.value=e}),options:n},null,8,[`value`])])]}),_:1})}}}),Me=Ne,R(),je=I({__name:`FontSize`,props:{value:{default:`14px`},valueModifiers:{}},emits:[`update:value`],setup:function(e){var t=J(e,`value`);return function(e,n){return V(),j(i,{label:`Font Size`},{value:X(function(){return[F(s,{value:t.value,"onUpdate:value":n[0]||(n[0]=function(e){return t.value=e})},null,8,[`value`])]}),_:1})}}}),Ae=je,R(),ot=I({__name:`LineHeight`,props:{value:{default:`120%`},valueModifiers:{}},emits:[`update:value`],setup:function(e){var t=J(e,`value`);return function(e,n){return V(),j(i,{label:`Line Height`},{value:X(function(){return[F(s,{value:t.value,"onUpdate:value":n[0]||(n[0]=function(e){return t.value=e}),unit:`%`,step:10},null,8,[`value`])]}),_:1})}}}),at=ot,R(),it=I({__name:`LetterSpacing`,props:{value:{default:`0px`},valueModifiers:{}},emits:[`update:value`],setup:function(e){var t=J(e,`value`);return function(e,n){return V(),j(i,{label:`Letter Spacing`},{value:X(function(){return[F(s,{value:t.value,"onUpdate:value":n[0]||(n[0]=function(e){return t.value=e})},null,8,[`value`])]}),_:1})}}}),rt=it,R(),Wt=I({__name:`TextAlign`,props:$r({label:{default:``}},{value:{},valueModifiers:{}}),emits:[`update:value`],setup:function(e){var t=J(e,`value`);return function(n,r){var a=At,o=jt;return V(),j(i,{label:e.label||`Text Align`},{value:X(function(){return[F(o,{value:t.value,"onUpdate:value":r[0]||(r[0]=function(e){return t.value=e})},{default:X(function(){return[F(a,{value:`left`},{default:X(function(){return Q(r[1]||(r[1]=[P(`Left`,-1)]))}),_:1}),F(a,{value:`center`},{default:X(function(){return Q(r[2]||(r[2]=[P(`Center`,-1)]))}),_:1}),F(a,{value:`right`},{default:X(function(){return Q(r[3]||(r[3]=[P(`Right`,-1)]))}),_:1})]}),_:1},8,[`value`])]}),_:1},8,[`label`])}}}),Ut=Wt,R(),vn={class:`flex flex-col gap-8px`},Xn={class:`w-92px`},hr={class:`w-32px`},r=I({__name:`BaseBorder`,props:{value:{default:function(){return{width:`0`,style:`solid`,color:``}}},valueModifiers:{}},emits:[`update:value`],setup:function(e){var t=J(e,`value`),n=[{label:`Solid`,value:`solid`},{label:`Dotted`,value:`dotted`},{label:`Dashed`,value:`dashed`}];return function(e,r){var i=Rt,a=S;return V(),N(`div`,vn,[F(s,{value:t.value.width,"onUpdate:value":r[0]||(r[0]=function(e){return t.value.width=e}),placeholder:``},null,8,[`value`]),A(`div`,Xn,[F(i,{value:t.value.style,"onUpdate:value":r[1]||(r[1]=function(e){return t.value.style=e}),options:n,placeholder:``},null,8,[`value`])]),A(`div`,hr,[F(a,{value:t.value.color,"onUpdate:value":r[2]||(r[2]=function(e){return t.value.color=e}),modes:[`hex`]},{label:X(function(){return Q(r[3]||(r[3]=[A(`span`,null,null,-1)]))}),_:1},8,[`value`])])])}}}),n=r,R(),ct=I({__name:`Line`,props:{value:{default:function(){return{width:`0`,style:`solid`,color:``}}},valueModifiers:{}},emits:[`update:value`],setup:function(e){var t=J(e,`value`);return function(e,r){return V(),j(i,{label:`Line`},{value:X(function(){return[F(n,{value:t.value,"onUpdate:value":r[0]||(r[0]=function(e){return t.value=e})},null,8,[`value`])]}),_:1})}}}),st=ct,R(),Er={},_n={class:`flex items-center h-32px`},o=D(Er,[[`render`,qi]]),R(),St=I({__name:`MoreOptions`,props:{show:{type:Boolean,default:!1},topLabel:{default:`Top`},rightLabel:{default:`Right`},leftLabel:{default:`Left`},bottomLabel:{default:`Bottom`}},setup:function(e){return function(t,n){var r=Pe,i=Fe;return e.show?(V(),j(i,{key:1,"x-gap":`8`,"y-gap":`8`,cols:2},{default:X(function(){return[F(r,null,{default:X(function(){return[F(o,null,{default:X(function(){return[P(G(e.topLabel),1)]}),_:1}),W(t.$slots,`top`)]}),_:3}),F(r,null,{default:X(function(){return[F(o,null,{default:X(function(){return[P(G(e.rightLabel),1)]}),_:1}),W(t.$slots,`right`)]}),_:3}),F(r,null,{default:X(function(){return[F(o,null,{default:X(function(){return[P(G(e.leftLabel),1)]}),_:1}),W(t.$slots,`left`)]}),_:3}),F(r,null,{default:X(function(){return[F(o,null,{default:X(function(){return[P(G(e.bottomLabel),1)]}),_:1}),W(t.$slots,`bottom`)]}),_:3})]}),_:3})):(V(),N(E,{key:0},[F(o,null,{default:X(function(){return Q(n[0]||(n[0]=[P(`All Sides`,-1)]))}),_:1}),W(t.$slots,`all`)],64))}}}),xt=St,R(),u=I({__name:`Border`,props:$r({label:{default:``}},{value:{default:function(){return{more:!1,all:{width:`0`,style:`solid`,color:``},top:{width:`0`,style:`solid`,color:``},left:{width:`0`,style:`solid`,color:``},right:{width:`0`,style:`solid`,color:``},bottom:{width:`0`,style:`solid`,color:``}}}},valueModifiers:{}}),emits:[`update:value`],setup:function(e){var t=J(e,`value`),r=function(e){e?(t.value.top=t.value.all,t.value.right=t.value.all,t.value.bottom=t.value.all,t.value.left=t.value.all):t.value.all=t.value.top};return function(a,o){var s=Bt;return V(),j(i,{label:e.label||`Border`},{value:X(function(){return[o[6]||(o[6]=A(`span`,{class:`mr-12px`},`More Options`,-1)),F(s,{value:t.value.more,"onUpdate:value":[o[0]||(o[0]=function(e){return t.value.more=e}),r]},null,8,[`value`])]}),options:X(function(){return[F(xt,{show:t.value.more},{all:X(function(){return[F(n,{value:t.value.all,"onUpdate:value":o[1]||(o[1]=function(e){return t.value.all=e})},null,8,[`value`])]}),top:X(function(){return[F(n,{value:t.value.top,"onUpdate:value":o[2]||(o[2]=function(e){return t.value.top=e})},null,8,[`value`])]}),left:X(function(){return[F(n,{value:t.value.left,"onUpdate:value":o[3]||(o[3]=function(e){return t.value.left=e})},null,8,[`value`])]}),right:X(function(){return[F(n,{value:t.value.right,"onUpdate:value":o[4]||(o[4]=function(e){return t.value.right=e})},null,8,[`value`])]}),bottom:X(function(){return[F(n,{value:t.value.bottom,"onUpdate:value":o[5]||(o[5]=function(e){return t.value.bottom=e})},null,8,[`value`])]}),_:1},8,[`show`])]}),_:1},8,[`label`])}}}),l=u,R(),Et=I({__name:`Padding`,props:$r({label:{default:``}},{value:{default:function(){return{more:!1,all:``,top:``,left:``,right:``,bottom:``}}},valueModifiers:{}}),emits:[`update:value`],setup:function(e){var t=J(e,`value`),n=function(e){e?(t.value.top=t.value.all,t.value.right=t.value.all,t.value.bottom=t.value.all,t.value.left=t.value.all):t.value.all=t.value.top};return function(r,a){var o=Bt;return V(),j(i,{label:e.label||`Padding`},{value:X(function(){return[a[6]||(a[6]=A(`span`,{class:`mr-12px`},`More Options`,-1)),F(o,{value:t.value.more,"onUpdate:value":[a[0]||(a[0]=function(e){return t.value.more=e}),n]},null,8,[`value`])]}),options:X(function(){return[F(xt,{show:t.value.more},{all:X(function(){return[F(s,{value:t.value.all,"onUpdate:value":a[1]||(a[1]=function(e){return t.value.all=e})},null,8,[`value`])]}),top:X(function(){return[F(s,{value:t.value.top,"onUpdate:value":a[2]||(a[2]=function(e){return t.value.top=e})},null,8,[`value`])]}),left:X(function(){return[F(s,{value:t.value.left,"onUpdate:value":a[3]||(a[3]=function(e){return t.value.left=e})},null,8,[`value`])]}),right:X(function(){return[F(s,{value:t.value.right,"onUpdate:value":a[4]||(a[4]=function(e){return t.value.right=e})},null,8,[`value`])]}),bottom:X(function(){return[F(s,{value:t.value.bottom,"onUpdate:value":a[5]||(a[5]=function(e){return t.value.bottom=e})},null,8,[`value`])]}),_:1},8,[`show`])]}),_:1},8,[`label`])}}}),Tt=Et,R(),Nt=I({__name:`Rounded`,props:{value:{default:function(){return{more:!1,all:``,top:``,left:``,right:``,bottom:``}}},valueModifiers:{}},emits:[`update:value`],setup:function(e){var t=J(e,`value`),n=function(e){e?(t.value.top=t.value.all,t.value.right=t.value.all,t.value.bottom=t.value.all,t.value.left=t.value.all):t.value.all=t.value.top};return function(e,r){var a=Bt;return V(),j(i,{label:`Rounded Border`},{value:X(function(){return[r[6]||(r[6]=A(`span`,{class:`mr-12px`},`More Options`,-1)),F(a,{value:t.value.more,"onUpdate:value":[r[0]||(r[0]=function(e){return t.value.more=e}),n]},null,8,[`value`])]}),options:X(function(){return[F(xt,{show:t.value.more,"top-label":`Top Left`,"left-label":`Bottom Left`,"right-label":`Top Right`,"bottom-label":`Bottom Right`},{all:X(function(){return[F(s,{value:t.value.all,"onUpdate:value":r[1]||(r[1]=function(e){return t.value.all=e})},null,8,[`value`])]}),top:X(function(){return[F(s,{value:t.value.top,"onUpdate:value":r[2]||(r[2]=function(e){return t.value.top=e})},null,8,[`value`])]}),left:X(function(){return[F(s,{value:t.value.left,"onUpdate:value":r[3]||(r[3]=function(e){return t.value.left=e})},null,8,[`value`])]}),right:X(function(){return[F(s,{value:t.value.right,"onUpdate:value":r[4]||(r[4]=function(e){return t.value.right=e})},null,8,[`value`])]}),bottom:X(function(){return[F(s,{value:t.value.bottom,"onUpdate:value":r[5]||(r[5]=function(e){return t.value.bottom=e})},null,8,[`value`])]}),_:1},8,[`show`])]}),_:1})}}}),Mt=Nt,R(),gn={class:`w-140px`},nt=I({__name:`Layout`,props:$r({label:{default:``}},{value:{default:``},valueModifiers:{}}),emits:[`update:value`],setup:function(e){var t=J(e,`value`),n=[{label:`Horizontal`,value:`inline-block`},{label:`Vertical`,value:`block`}];return t.value||(t.value=n[0].value),function(e,r){var a=Rt;return V(),j(i,{label:`Layout`},{value:X(function(){return[A(`div`,gn,[F(a,{value:t.value,"onUpdate:value":r[0]||(r[0]=function(e){return t.value=e}),options:n},null,8,[`value`])])]}),_:1})}}}),tt=nt,R(),fe=I({props:{value:{type:Object,default:function(){return{}}},options:{type:Array,default:function(){return[]}}},setup:function(e,t){var n=t.slots;return function(){return F(E,null,[e.options.map(function(t){return Yi(t,e.value,n)})])}}}),R(),hn={class:`mb-8px`},Yn={class:`py-16px`},ne=I({__name:`ColumnPropertiesPanel`,setup:function(e){var t=q(),n=t.selectedBlockKey,r=t.columnsMap,i=t.cellMap,a=t.cellConfigMap,o=t.applyNewWidthColumnsInCell,s=t.delColumnsInCell,c=Y().autoSaveFn,l=bi(`tabsRef`),u=k(function(){return r.value[n.value]}),f=k(function(){return u.value.children.map(function(e){return i.value[e]})}),p=H(0),m=function(){var e=[];f.value.forEach(function(t){e.push(t.width)});var t=100,r=Math.floor(t/(e.length+1)),i=e.reduce(function(e,t){return e+t},0),a=(t-(i+r))/i;e.push(r);for(var s=0;s<e.length-1;s++)e[s]=Math.floor(e[s]+e[s]*a);o(n.value,e),p.value=e.length-1,ei(function(){var e;(e=l.value)==null||e.syncBarPosition()})},h=function(){if(!(f.value.length<=1)){var e=f.value.reduce(function(e,t){var n=t.width;return zi(Li({},e),Mi({},t.key,n))},{}),t=f.value[p.value];delete e[t.key];var r=Object.values(e),i=100,a=r.reduce(function(e,t){return e+t},0),c=(i-a)/a;r=r.map(function(e){return Math.floor(e*(1+c))});var u=i-r.reduce(function(e,t){return e+t},0);u!==0&&(r[r.length-1]+=u),s(n.value,t.key),o(n.value,r),p.value>=r.length&&(p.value=r.length-1),ei(function(){var e;(e=l.value)==null||e.syncBarPosition()})}},g=k(function(){var e;return((e=f.value[p.value])==null?void 0:e.key)||``}),_=k({get:function(){return a.value[g.value].style},set:function(e){a.value[g.value].style=e,c()}}),v=Z($([{attrKey:`backgroundColor`,label:`Background Color`},{attrKey:`padding`,label:`Padding`},{attrKey:`border`,label:`Border`}]),1)[0];return function(e,t){var n=d,r=Vt,i=Ht;return V(),N(`div`,null,[A(`div`,hn,[F(n,{onClick:m},{default:X(function(){return Q(t[2]||(t[2]=[P(` Add `,-1)]))}),_:1}),F(n,{class:`ml-10px`,disabled:K(f).length<=1,onClick:h},{default:X(function(){return Q(t[3]||(t[3]=[P(`Delete`,-1)]))}),_:1},8,[`disabled`])]),F(i,{ref_key:`tabsRef`,ref:l,value:K(p),"onUpdate:value":t[0]||(t[0]=function(e){return z(p)?p.value=e:null}),class:`mb-8px`,type:`line`},{default:X(function(){return[(V(!0),N(E,null,U(K(f),function(e,t){return V(),j(r,{key:e.key,name:t,tab:`Column `.concat(t+1)},null,8,[`name`,`tab`])}),128))]}),_:1},8,[`value`]),A(`div`,Yn,[K(g)?(V(),j(K(v),{key:0,value:K(_),"onUpdate:value":t[1]||(t[1]=function(e){return z(_)?_.value=e:null})},null,8,[`value`])):M(``,!0)])])}}}),w=D(ne,[[`__scopeId`,`data-v-9e21eccb`]]),R(),mn={class:`py-8px`},Ft=I({__name:`RowPropertiesPanel`,setup:function(e){var t=q(),n=t.selectedBlockKey,r=t.columnsConfigMap,i=Y().autoSaveFn,a=k({get:function(){return r.value[n.value].style},set:function(e){r.value[n.value].style=e,i()}}),o=k({get:function(){return r.value[n.value].containerStyle},set:function(e){r.value[n.value].containerStyle=e,i()}}),s=Z($([{attrKey:`backgroundColor`,label:`Background Color`},{attrKey:`custom`,render:function(){return F(C,{label:`Content Background Color`,value:o.value.backgroundColor,"onUpdate:value":function(e){o.value.backgroundColor=e}},null)}},{attrKey:`padding`,label:`Padding`}]),1)[0];return function(e,t){return V(),N(`div`,mn,[F(K(s),{value:K(a),"onUpdate:value":t[0]||(t[0]=function(e){return z(a)?a.value=e:null})},null,8,[`value`])])}}}),Pt=Ft,R(),oe=I({__name:`Columns`,setup:function(e){return function(e,t){var n=b;return V(),j(x,{"default-expanded-names":[`1`,`2`,`3`]},{default:X(function(){return[F(n,{title:`Columns`,name:`1`},{default:X(function(){return[F(T)]}),_:1}),F(n,{title:`Column Properties`,name:`2`},{default:X(function(){return[F(w)]}),_:1}),F(n,{title:`Row Properties`,name:`3`},{default:X(function(){return[F(Pt)]}),_:1})]}),_:1})}}}),ie=oe,R(),pn={class:`mt-12px`},dr={class:`mt-12px`},pt=I({__name:`Link`,props:{value:{},valueModifiers:{},target:{},targetModifiers:{}},emits:[`update:value`,`update:target`],setup:function(e){var t=J(e,`value`),n=J(e,`target`),r=H(!1),a=function(e){e?t.value=`__UNSUBSCRIBE_URL__`:t.value=``};return function(e,o){var s=Qe,c=Bt;return V(),j(i,{label:`Link`},{options:X(function(){return[A(`div`,null,[F(s,{value:t.value,"onUpdate:value":o[0]||(o[0]=function(e){return t.value=e}),disabled:K(r)},null,8,[`value`,`disabled`])]),A(`div`,pn,[F(c,{value:n.value,"onUpdate:value":o[1]||(o[1]=function(e){return n.value=e}),"checked-value":`_blank`,"unchecked-value":`_self`},null,8,[`value`]),o[3]||(o[3]=A(`span`,{class:`ml-8px`},`Open link in new tab`,-1))]),A(`div`,dr,[F(c,{value:K(r),"onUpdate:value":[o[2]||(o[2]=function(e){return z(r)?r.value=e:null}),a]},null,8,[`value`]),o[4]||(o[4]=A(`span`,{class:`ml-8px`},`Unsubscribe`,-1))])]}),_:1})}}}),ut=pt,R(),fn={class:`pb-10px`},ur={class:`py-8px`},mr={class:`py-8px`},m=I({__name:`Button`,setup:function(e){var t=q(),n=t.selectedBlockKey,r=t.blockConfigMap,i=Y().autoSaveFn,a=k({get:function(){return r.value[n.value].attr},set:function(e){r.value[n.value].attr=e,i()}}),o=k({get:function(){return r.value[n.value].style},set:function(e){r.value[n.value].style=e,i()}}),s=k({get:function(){return r.value[n.value].containerStyle},set:function(e){r.value[n.value].containerStyle=e,i()}}),c=Z($([{attrKey:`custom`,render:function(){return F(ut,{value:a.value.href,"onUpdate:value":function(e){return a.value.href=e},target:a.value.target,"onUpdate:target":function(e){return a.value.target=e}},null)}}]),1)[0],l=Z($([{attrKey:`backgroundColor`,label:`Background Color`},{attrKey:`color`,label:`Text Color`},{attrKey:`widthAuto`,key:`width`,label:`Width`},{attrKey:`fontWeight`},{attrKey:`fontSize`},{attrKey:`lineHeight`},{attrKey:`letterSpacing`},{attrKey:`padding`},{attrKey:`border`},{attrKey:`borderRadius`}]),1)[0],u=Z($([{attrKey:`textAlign`},{attrKey:`padding`}]),1)[0];return function(e,t){var n=b;return V(),j(x,{"default-expanded-names":[`1`,`2`,`3`]},{default:X(function(){return[F(n,{title:`Action`,name:`1`},{default:X(function(){return[A(`div`,fn,[F(K(c))])]}),_:1}),F(n,{title:`Button Options`,name:`2`},{default:X(function(){return[A(`div`,ur,[F(K(l),{value:K(o),"onUpdate:value":t[0]||(t[0]=function(e){return z(o)?o.value=e:null})},null,8,[`value`])])]}),_:1}),F(n,{title:`Container`,name:`3`},{default:X(function(){return[A(`div`,mr,[F(K(u),{value:K(s),"onUpdate:value":t[1]||(t[1]=function(e){return z(s)?s.value=e:null})},null,8,[`value`])])]}),_:1})]}),_:1})}}}),f=m,R(),dn={class:`pb-10px`},lr={class:`py-8px`},pr={class:`py-8px`},ft=I({__name:`Link`,setup:function(e){var t=q(),n=t.selectedBlockKey,r=t.blockConfigMap,i=Y().autoSaveFn,a=k({get:function(){return r.value[n.value].attr},set:function(e){r.value[n.value].attr=e,i()}}),o=k({get:function(){return r.value[n.value].style},set:function(e){r.value[n.value].style=e,i()}}),s=k({get:function(){return r.value[n.value].containerStyle},set:function(e){r.value[n.value].containerStyle=e,i()}}),c=Z($([{attrKey:`custom`,render:function(){return F(ut,{value:a.value.href,"onUpdate:value":function(e){return a.value.href=e},target:a.value.target,"onUpdate:target":function(e){return a.value.target=e}},null)}}]),1)[0],l=Z($([{attrKey:`color`,label:`Text Color`},{attrKey:`fontWeight`},{attrKey:`fontSize`},{attrKey:`lineHeight`},{attrKey:`letterSpacing`}]),1)[0],u=Z($([{attrKey:`textAlign`},{attrKey:`padding`}]),1)[0];return function(e,t){var n=b;return V(),j(x,{"default-expanded-names":[`1`,`2`,`3`]},{default:X(function(){return[F(n,{title:`Action`,name:`1`},{default:X(function(){return[A(`div`,dn,[F(K(c))])]}),_:1}),F(n,{title:`Link Options`,name:`2`},{default:X(function(){return[A(`div`,lr,[F(K(l),{value:K(o),"onUpdate:value":t[0]||(t[0]=function(e){return z(o)?o.value=e:null})},null,8,[`value`])])]}),_:1}),F(n,{title:`Container`,name:`3`},{default:X(function(){return[A(`div`,pr,[F(K(u),{value:K(s),"onUpdate:value":t[1]||(t[1]=function(e){return z(s)?s.value=e:null})},null,8,[`value`])])]}),_:1})]}),_:1})}}}),lt=ft,R(),un={class:`py-8px`},cr={class:`py-8px`},he=I({__name:`Divider`,setup:function(e){var t=q(),n=t.selectedBlockKey,r=t.blockConfigMap,i=Y().autoSaveFn,a=k({get:function(){return r.value[n.value].style},set:function(e){r.value[n.value].style=e,i()}}),o=k({get:function(){return r.value[n.value].containerStyle},set:function(e){r.value[n.value].containerStyle=e,i()}}),s=Z($([{attrKey:`width`},{attrKey:`borderTop`}]),1)[0],c=Z($([{attrKey:`textAlign`},{attrKey:`padding`}]),1)[0];return function(e,t){var n=b;return V(),j(x,{"default-expanded-names":[`1`,`2`]},{default:X(function(){return[F(n,{title:`Line`,name:`1`},{default:X(function(){return[A(`div`,un,[F(K(s),{value:K(a),"onUpdate:value":t[0]||(t[0]=function(e){return z(a)?a.value=e:null})},null,8,[`value`])])]}),_:1}),F(n,{title:`Container`,name:`2`},{default:X(function(){return[A(`div`,cr,[F(K(c),{value:K(o),"onUpdate:value":t[1]||(t[1]=function(e){return z(o)?o.value=e:null})},null,8,[`value`])])]}),_:1})]}),_:1})}}}),pe=he,R(),Kn={class:`py-8px`},sr={class:`py-8px`},Ve=I({__name:`Header`,setup:function(e){var t=q(),n=t.selectedBlockKey,r=t.blockConfigMap,i=Y().autoSaveFn,a=k({get:function(){return r.value[n.value].style},set:function(e){r.value[n.value].style=e,i()}}),o=k({get:function(){return r.value[n.value].containerStyle},set:function(e){r.value[n.value].containerStyle=e,i()}}),s=Z($([{attrKey:`head`,key:`fontSize`},{attrKey:`fontWeight`},{attrKey:`fontSize`},{attrKey:`color`,label:`Text Color`},{attrKey:`lineHeight`},{attrKey:`letterSpacing`}]),1)[0],c=Z($([{attrKey:`textAlign`},{attrKey:`padding`}]),1)[0];return function(e,t){var n=b;return V(),j(x,{"default-expanded-names":[`1`,`2`]},{default:X(function(){return[F(n,{title:`Header`,name:`1`},{default:X(function(){return[A(`div`,Kn,[F(K(s),{value:K(a),"onUpdate:value":t[0]||(t[0]=function(e){return z(a)?a.value=e:null})},null,8,[`value`])])]}),_:1}),F(n,{title:`Container`,name:`2`},{default:X(function(){return[A(`div`,sr,[F(K(c),{value:K(o),"onUpdate:value":t[1]||(t[1]=function(e){return z(o)?o.value=e:null})},null,8,[`value`])])]}),_:1})]}),_:1})}}}),ze=Ve,R(),Gn={class:`py-8px`},or={class:`py-8px`},qt=I({__name:`Text`,setup:function(e){var t=q(),n=t.selectedBlockKey,r=t.blockConfigMap,i=Y().autoSaveFn,a=k({get:function(){return r.value[n.value].style},set:function(e){r.value[n.value].style=e,i()}}),o=k({get:function(){return r.value[n.value].containerStyle},set:function(e){r.value[n.value].containerStyle=e,i()}}),s=Z($([{attrKey:`fontWeight`},{attrKey:`fontSize`},{attrKey:`color`,label:`Text Color`},{attrKey:`lineHeight`},{attrKey:`letterSpacing`}]),1)[0],c=Z($([{attrKey:`textAlign`},{attrKey:`padding`}]),1)[0];return function(e,t){var n=b;return V(),j(x,{"default-expanded-names":[`1`,`2`]},{default:X(function(){return[F(n,{title:`Text`,name:`1`},{default:X(function(){return[A(`div`,Gn,[F(K(s),{value:K(a),"onUpdate:value":t[0]||(t[0]=function(e){return z(a)?a.value=e:null})},null,8,[`value`])])]}),_:1}),F(n,{title:`Container`,name:`2`},{default:X(function(){return[A(`div`,or,[F(K(c),{value:K(o),"onUpdate:value":t[1]||(t[1]=function(e){return z(o)?o.value=e:null})},null,8,[`value`])])]}),_:1})]}),_:1})}}}),Gt=qt,R(),qe=I({__name:`Image`,props:{value:{},valueModifiers:{}},emits:[`update:value`],setup:function(e){var t=J(e,`value`);return function(e,n){var r=Qe;return V(),j(i,{label:`Image URL`},{options:X(function(){return[F(r,{value:t.value,"onUpdate:value":n[0]||(n[0]=function(e){return t.value=e})},null,8,[`value`])]}),_:1})}}}),We=qe,R(),Xt=I({__name:`Title`,props:{value:{},valueModifiers:{}},emits:[`update:value`],setup:function(e){var t=J(e,`value`);return function(e,n){var r=Qe;return V(),j(i,{label:`Alternate Text`},{options:X(function(){return[F(r,{value:t.value,"onUpdate:value":n[0]||(n[0]=function(e){return t.value=e})},null,8,[`value`])]}),_:1})}}}),Yt=Xt,R(),Wn={class:`pb-10px`},ar={class:`pb-10px`},fr={class:`py-8px`},Ke=I({__name:`Image`,setup:function(e){var t=q(),n=t.selectedBlockKey,r=t.blockConfigMap,i=Y().autoSaveFn,a=k({get:function(){return r.value[n.value].attr},set:function(e){r.value[n.value].attr=e,i()}}),o=k({get:function(){return r.value[n.value].style},set:function(e){r.value[n.value].style=e,i()}}),s=k({get:function(){return r.value[n.value].containerStyle},set:function(e){r.value[n.value].containerStyle=e,i()}}),c=Z($([{attrKey:`custom`,render:function(){return F(We,{value:a.value.src,"onUpdate:value":function(e){return a.value.src=e}},null)}},{attrKey:`widthAuto`,key:`width`},{attrKey:`custom`,render:function(){return F(Yt,{value:a.value.alt,"onUpdate:value":function(e){return a.value.alt=e}},null)}}]),1)[0],l=Z($([{attrKey:`custom`,render:function(){return F(ut,{value:a.value.href,"onUpdate:value":function(e){return a.value.href=e},target:a.value.target,"onUpdate:target":function(e){return a.value.target=e}},null)}}]),1)[0],u=Z($([{attrKey:`textAlign`},{attrKey:`padding`}]),1)[0];return function(e,t){var n=b;return V(),j(x,{"default-expanded-names":[`1`,`2`,`3`]},{default:X(function(){return[F(n,{title:`Image`,name:`1`},{default:X(function(){return[A(`div`,Wn,[F(K(c),{value:K(o),"onUpdate:value":t[0]||(t[0]=function(e){return z(o)?o.value=e:null})},null,8,[`value`])])]}),_:1}),F(n,{title:`Action`,name:`2`},{default:X(function(){return[A(`div`,ar,[F(K(l),{value:K(o),"onUpdate:value":t[1]||(t[1]=function(e){return z(o)?o.value=e:null})},null,8,[`value`])])]}),_:1}),F(n,{title:`Container`,name:`3`},{default:X(function(){return[A(`div`,fr,[F(K(u),{value:K(s),"onUpdate:value":t[2]||(t[2]=function(e){return z(s)?s.value=e:null})},null,8,[`value`])])]}),_:1})]}),_:1})}}}),Ue=Ke,R(),Un={class:`flex-1`},ir={class:`flex-1`},et=I({__name:`Item`,props:$r({id:{},index:{},moveLink:{type:Function},findLink:{type:Function}},{label:{},labelModifiers:{},href:{},hrefModifiers:{}}),emits:$r([`del`],[`update:label`,`update:href`]),setup:function(e,t){var n=t.emit,r=e,i=n,a=J(e,`label`),o=J(e,`href`),s=function(){i(`del`)},c=Z(hi({type:`MenuLink`,item:function(){return{id:r.id,index:r.index}},collect:function(e){return{isDragging:e.isDragging()}},end:function(e,t){var n=e.id,i=e.index;t.didDrop()||r.moveLink(n,i)}}),3),l=c[0],u=c[1],d=c[2],f=Z(gi(function(){return{accept:`MenuLink`,hover:function(e){var t=e.id;if(t!==r.id){var n=r.findLink(r.id).index;r.moveLink(t,n)}}}}),2)[1],p=function(e){e&&d(f(e))},m=k(function(){return+!l.value.isDragging});return function(e,t){var n=Qe,r=Mr;return V(),N(`li`,{ref:p,class:`link-items`,style:B({opacity:K(m)})},[A(`div`,Un,[F(n,{value:a.value,"onUpdate:value":t[0]||(t[0]=function(e){return a.value=e})},null,8,[`value`])]),A(`div`,ir,[F(n,{value:o.value,"onUpdate:value":t[1]||(t[1]=function(e){return o.value=e})},null,8,[`value`])]),A(`div`,{class:`w-auto cursor-pointer`,onClick:s},[F(r,{name:`drag-remove`,size:`13`})]),A(`div`,{ref:K(u),class:`w-auto cursor-grab`},[F(r,{name:`drag-sort`,size:`16`})],512)],4)}}}),$e=D(et,[[`__scopeId`,`data-v-6755f2fb`]]),R(),Hn={class:`w-full`},Jn={class:`link-group`},gt=I({__name:`List`,setup:function(e){var t=q(),n=t.selectedBlockKey,r=t.blockConfigMap,i=Y().autoSaveFn,a=k({get:function(){return r.value[n.value].attr.links||[]},set:function(e){r.value[n.value].attr.links=e,i()}}),o=function(e){a.value.splice(e,1)},s=function(){a.value.push({id:Hi(6),label:``,href:``})},c=function(e){var t=a.value.filter(function(t){return``.concat(t.id)===e})[0];return{link:t,index:a.value.indexOf(t)}},l=function(e,t){var n=c(e),r=n.link,i=n.index;a.value.splice(i,1),a.value.splice(t,0,r)};return function(e,t){var n=d;return V(),N(`div`,Hn,[A(`ul`,Jn,[(V(!0),N(E,null,U(K(a),function(e,t){return V(),j($e,{label:e.label,"onUpdate:label":function(t){return e.label=t},href:e.href,"onUpdate:href":function(t){return e.href=t},key:e.id,id:e.id,index:t,"find-link":c,"move-link":l,onDel:function(e){return o(t)}},null,8,[`label`,`onUpdate:label`,`href`,`onUpdate:href`,`id`,`index`,`onDel`])}),128))]),F(n,{block:``,class:`mt-12px`,onClick:s},{default:X(function(){return Q(t[0]||(t[0]=[P(`Add`,-1)]))}),_:1})])}}}),ht=D(gt,[[`__scopeId`,`data-v-1b62ebe3`]]),R(),Vn={class:`py-8px`},qn={class:`py-8px`},yt=I({__name:`Menu`,setup:function(e){var t=q(),n=t.selectedBlockKey,r=t.blockConfigMap,i=Y().autoSaveFn,a=k({get:function(){return r.value[n.value].style},set:function(e){r.value[n.value].style=e,i()}}),o=k({get:function(){return r.value[n.value].containerStyle},set:function(e){r.value[n.value].containerStyle=e,i()}}),s=Z($([{attrKey:`fontWeight`},{attrKey:`fontSize`},{attrKey:`letterSpacing`},{attrKey:`color`,label:`Text Color`},{attrKey:`layout`,key:`display`},{attrKey:`padding`}]),1)[0],c=Z($([{attrKey:`textAlign`},{attrKey:`padding`}]),1)[0];return function(e,t){var n=b;return V(),j(x,{"default-expanded-names":[`1`,`2`,`3`]},{default:X(function(){return[F(n,{title:`Menu Items`,name:`1`},{default:X(function(){return[F(ht)]}),_:1}),F(n,{title:`Style`,name:`2`},{default:X(function(){return[A(`div`,Vn,[F(K(s),{value:K(a),"onUpdate:value":t[0]||(t[0]=function(e){return z(a)?a.value=e:null})},null,8,[`value`])])]}),_:1}),F(n,{title:`Container`,name:`3`},{default:X(function(){return[A(`div`,qn,[F(K(c),{value:K(o),"onUpdate:value":t[1]||(t[1]=function(e){return z(o)?o.value=e:null})},null,8,[`value`])])]}),_:1})]}),_:1})}}}),_t=yt,R(),Tr={},jn={class:`h-full pb-100px flex items-center justify-center`},Ct=D(Tr,[[`render`,Zi]]),R(),de=I({__name:`Content`,setup:function(e){var t=q(),n=t.selectedBlockType,r=t.selectedBlockKey,i=k(function(){switch(n.value){case`columns`:return ie;case`button`:return f;case`link`:return lt;case`divider`:return pe;case`header`:return ze;case`text`:return Gt;case`image`:return Ue;case`menu`:return _t;default:return Ct}});return function(e,t){return V(),j(ci(K(i)),{key:K(r)})}}}),ue=de,R(),bn={class:`p-20px`},Ot=I({__name:`Page`,setup:function(e){var t=q().pageConfig,n=k({get:function(){return t.value.style},set:function(e){t.value.style=e}}),r=Z($([{attrKey:`backgroundColor`,label:`Background Color`},{attrKey:`widthNumber`,label:`Width`,key:`width`}]),1)[0];return function(e,t){return V(),N(`div`,bn,[F(K(r),{value:K(n),"onUpdate:value":t[0]||(t[0]=function(e){return z(n)?n.value=e:null})},null,8,[`value`])])}}}),Dt=Ot,R(),le=I({__name:`ConfigTabs`,setup:function(e){var t=H(`config`),n=[{name:`config`,label:`Content`,component:ue},{name:`page`,label:`Page`,component:Dt}];return function(e,r){var i=Vt,a=Ht;return V(),j(a,{value:K(t),"onUpdate:value":r[0]||(r[0]=function(e){return z(t)?t.value=e:null}),type:`line`},{default:X(function(){return[(V(),N(E,null,U(n,function(e){return F(i,{key:e.name,name:e.name,tab:e.label},{default:X(function(){return[(V(),j(ci(e.component)))]}),_:2},1032,[`name`,`tab`])}),64))]}),_:1},8,[`value`])}}}),ce=D(le,[[`__scopeId`,`data-v-83e94fc5`]]),R(),ln={class:`editor-sidebar`},we=I({__name:`EditorSidebar`,setup:function(e){return function(e,t){return V(),N(`div`,ln,[F(ce)])}}}),Ce=D(we,[[`__scopeId`,`data-v-51030538`]]),R(),cn={class:`email-editor`},Ur=I({__name:`index`,props:{save:{}},setup:function(e,t){var n=t.expose,r=e,i=Y(),a=i.setData,o=i.getData,s=i.resetData,c=i.setSaveFn,l=vi(),u=l.html,d=l.generateHtml;return r.save&&c(r.save),ni(function(){s()}),n({setEmailData:function(e){a(e)},getEmailData:function(){return o()},getEmailHTML:function(){return d(),u.value}}),function(e,t){return V(),j(xe,null,{default:X(function(){return[A(`div`,cn,[F(ye),F(Te),F(Ce)])]}),_:1})}}}),e(`r`,D(Ur,[[`__scopeId`,`data-v-cec325ed`]])),e(`t`,`{"version":"2.0","pageConfig":{"meta":{"version":"2.0","createdAt":"","updatedAt":""},"style":{"backgroundColor":"#ffffff","width":"500px"}},"blockMap":{"9d79c91fd764":{"key":"9d79c91fd764","type":"divider","name":"Divider"},"b37fb9a4cfad":{"key":"b37fb9a4cfad","type":"link","name":"Link"}},"blockConfigMap":{"9d79c91fd764":{"key":"9d79c91fd764","name":"Divider","type":"divider","meta":{"version":"2.0","createdAt":"2025-03-25 11:16:12","updatedAt":"2025-03-25 11:16:12"},"attr":{},"style":{"display":"inline-block","width":"100%","height":"1px","lineHeight":"1px","verticalAlign":"middle","borderTop":{"color":"#bbbbbb","width":"1px","style":"solid"}},"containerStyle":{"textAlign":"center","padding":{"more":false,"all":"10px","top":"0","left":"0","right":"0","bottom":"0"}}},"b37fb9a4cfad":{"key":"b37fb9a4cfad","name":"Link","type":"link","meta":{"version":"2.0","createdAt":"2025-03-25 11:16:18","updatedAt":"2025-03-25 11:16:18"},"attr":{"href":"__UNSUBSCRIBE_URL__","target":"_blank","content":"<p><u>Unsubscribe</u></p>"},"style":{"display":"inline-block","color":"#A2A2A2FF","fontWeight":"normal","fontSize":"12px","lineHeight":"120%","letterSpacing":"0px"},"containerStyle":{"textAlign":"center","padding":{"more":false,"all":"10px","top":"0","left":"0","right":"0","bottom":"0"}}}},"cellMap":{"29b965b1ee6b":{"key":"29b965b1ee6b","width":100,"name":"Cell","type":"cell","children":[]},"91fef345521e":{"key":"91fef345521e","width":100,"name":"Cell","type":"cell","children":["9d79c91fd764","b37fb9a4cfad"]}},"cellConfigMap":{"29b965b1ee6b":{"key":"29b965b1ee6b","name":"Cell","type":"cell","meta":{"version":"2.0","createdAt":"2025-03-25 11:16:05","updatedAt":"2025-03-25 11:16:05"},"attr":{},"style":{"backgroundColor":"","padding":{"more":false,"all":"0","top":"0","left":"0","right":"0","bottom":"0"},"border":{"more":false,"all":{"color":"","width":"0","style":"solid"},"top":{"color":"","width":"0","style":"solid"},"right":{"color":"","width":"0","style":"solid"},"bottom":{"color":"","width":"0","style":"solid"},"left":{"color":"","width":"0","style":"solid"}}},"containerStyle":{}},"91fef345521e":{"key":"91fef345521e","name":"Cell","type":"cell","meta":{"version":"2.0","createdAt":"2025-03-25 11:16:08","updatedAt":"2025-03-25 11:16:08"},"attr":{},"style":{"backgroundColor":"","padding":{"more":false,"all":"0","top":"0","left":"0","right":"0","bottom":"0"},"border":{"more":false,"all":{"color":"","width":"0","style":"solid"},"top":{"color":"","width":"0","style":"solid"},"right":{"color":"","width":"0","style":"solid"},"bottom":{"color":"","width":"0","style":"solid"},"left":{"color":"","width":"0","style":"solid"}}},"containerStyle":{}}},"columnsConfigMap":{"75faa7472294":{"key":"75faa7472294","name":"Columns","type":"columns","meta":{"version":"2.0","createdAt":"2025-03-25 11:16:05","updatedAt":"2025-03-25 11:16:05"},"attr":{},"style":{"backgroundColor":"","padding":{"more":false,"all":"0","top":"0","left":"0","right":"0","bottom":"0"}},"containerStyle":{"backgroundColor":""}},"73fc2135ce3e":{"key":"73fc2135ce3e","name":"Columns","type":"columns","meta":{"version":"2.0","createdAt":"2025-03-25 11:16:08","updatedAt":"2025-03-25 11:16:08"},"attr":{},"style":{"backgroundColor":"","padding":{"more":false,"all":"0","top":"0","left":"0","right":"0","bottom":"0"}},"containerStyle":{"backgroundColor":""}}},"columnsMap":{"75faa7472294":{"key":"75faa7472294","type":"columns","name":"Columns","children":["29b965b1ee6b"]},"73fc2135ce3e":{"key":"73fc2135ce3e","type":"columns","name":"Columns","children":["91fef345521e"]}},"columnsSource":["75faa7472294","73fc2135ce3e"]}`),e(`n`,`<table style="background-color: rgb(255, 255, 255); width: 100%;"><tr><td><div style="padding: 0px; width: 500px; margin: 0px auto;"><table style="width: 100%;"><tr><td style="width: 100%; padding: 0px;"></td></tr></table></div></td></tr><tr><td><div style="padding: 0px; width: 500px; margin: 0px auto;"><table style="width: 100%;"><tr><td style="width: 100%; padding: 0px;"><div style="text-align: center; padding: 10px;"><div style="display: inline-block; width: 100%; height: 1px; line-height: 1px; vertical-align: middle; border-top: 1px solid rgb(187, 187, 187);"></div></div><div style="text-align: center; padding: 10px;"><a href="__UNSUBSCRIBE_URL__" target="_blank" style="display: inline-block; color: rgb(162, 162, 162); font-weight: normal; font-size: 12px; line-height: 120%; letter-spacing: 0px;"><p><u>Unsubscribe</u></p></a></div></td></tr></table></div></td></tr></table>`)}}})})();