1import{aR as D,aU as w,bm as g,bc as r,a_ as h,cH as E,cd as U,ce as M,aV as R,aW as j,bg as K}from"./c-index-D0PNHfG-.js";import{Z as N,u as S,s as $,i as _}from"./c-ZeroBlock-CHpWq-I3.js";/* empty css *//* empty css */import"./c-MonacoEditor-BhyA7Ixr.js";import"./c-vuedraggable.umd-DO1CELEr.js";/* empty css *//* empty css *//* empty css */import{l as x}from"./e-front-DVf7xbkB.js";import{l as J}from"./c-lodash-BnEgc9c8.js";import"./c-merge-CSO2wn0V.js";import"./c-isArrayLikeObject-Can3dch6.js";import"./c-_baseOrderBy-D2fYhRhL.js";import"./c-_baseMap-vQxfWueh.js";import"./c-animations-BseF7QIQ.js";import"./c-index-DimM6dsR.js";import"./c-debounce-B_JBmozd.js";import"./c-index-MsKR8JGb.js";import"./c-index-C3rzOKvV.js";import"./c-HelperTool-CefELQuQ.js";import"./c-index-B2MHE_Vs.js";import"./c-index-BK4XP-j-.js";import"./c-el-form-item-DpapBxAI.js";const P=D({name:"ZeroBlockDemo",components:{ZeroBlock:N},setup(){const o=new BroadcastChannel("zb_destination_channel"),e=S(),c=r(()=>e.elements),i=r(()=>e.cpCanUndo),l=r(()=>e.cpCanRedo),n=h(null),s=h(""),y=[{name:"Roboto",value:"Roboto, sans-serif"},{name:"Montserrat",value:"Montserrat, sans-serif"},{name:"Open Sans",value:"Open Sans, sans-serif"}],k=()=>{e.addElement("text",{text:"ÐÑÐ¸Ð¼ÐµÑ ÑекÑÑового блока",color:"#444444",fontsize:"24",fontweight:"500",align:"center",top:"100",left:"100",width:"400",bgcolor:"#f8f8f8",opacity:"0.9",borderradiu
1s:"4"})},C=p=>{},B=()=>{e.savePage(),E({message:"ÐÑÐ¾ÐµÐºÑ ÑоÑ
Ñанен! СмоÑÑиÑе деÑали в конÑоли.",type:"success"})},O=p=>{E({message:"ÐÑÐ¾ÐµÐºÑ ÑоÑ
Ñанен ÑеÑез ÑобÑÑие!",type:"success"})},Z=()=>{e.undo()},z=()=>{e.redo()};w(()=>{var d;new BroadcastChannel("zb_source_channel").addEventListener("message",u=>{if(u.data.type==="updateElements"){const f=JSON.parse(u.data.data),v=JSON.stringify(J.omit(f,["timestamp"]));if(s.value!==v){n.value=f,s.value=v;for(const t of $(Object.keys(n.value)))if(_(t)){const b=n.value[t];b.elem_type&&e.addOrUpdateElement(b,!0)}for(const t of Object.keys(n.value))!_(t)&&t.includes("ab_")&&(a.artboardSettings[t]=n.value[t])}}}),(d=x)==null||d.close("zeroblockdemo-mounted")});const a=S(),m=()=>{o.postMessage({type:"updateElements",data:JSON.stringify(a.buildZBData())})};return g(()=>a.elements,m,{deep:!0}),g(()=>a.artboardSettings,m,{deep:!0}),{elements:c,fonts:y,cpCanUndo:i,cpCanRedo:l,addTextElement:k,updateElements:C,handleSave:O,saveProject:B,undo:Z,redo:z}}}),V={class:"zeroblock-demo-container"};function q(o,e,c,i,l,n){const s=M("ZeroBlock");return R(),j("div",V,[K(s,{initialElements:o.elements,fonts:o.fonts,height:"calc(100vh)",onUpdate:o.updateElements,onSave:o.handleSave},null,8,["initialElements","fonts","onUpdate","onSave"])])}const ue=U(P,[["render",q],["__scopeId","data-v-4eff0d0d"]]);export{ue as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.