varmA=Object.defineProperty,FA=Object.defineProperties;varpA=Object.getOwnPropertyDescriptors;varY=Object.getOwnPropertySymbols;varOA=Object.prototype.hasOwnProperty,VA=Object.prototype.propertyIsEnumerable;varZ=(A,e,t)=>einA?mA(A,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):A[e]=t,u=(A,e)=>{for(vartine||(e={}))OA.call(e,t)&&Z(A,t,e[t]);if(Y)for(vartofY(e))VA.call(e,t)&&Z(A,t,e[t]);returnA},m=(A,e)=>FA(A,pA(e));import{iasU,rasC,easL,fasSA,gask,pasl,hasjA,wasb,jasGA,kass,lasi,basP,masH,nasc,qasKA,sasHA,tashA,FasxA,casJA,uasWA,dasNA,oasYA}from"./app.87539bc2.js";varE=(A=>(A.Edit="edit",A.Display="display",A))(E||{});constoA=Symbol("Schlechtenburg mode");varF,ZA=newUint8Array(16);functionTA(){if(!F&&(F=typeofcrypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeofmsCrypto!="undefined"&&typeofmsCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!F))thrownewError("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");returnF(ZA)}var_A=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function$A(A){returntypeofA=="string"&&_A.test(A)}varo=[];for(varV=0;V<256;++V)o.push((V+256).toString(16).substr(1));functionAe(A){vare=arguments.length>1&&arguments[1]!==void0?arguments[1]:0,t=(o[A[e+0]]+o[A[e+1]]+o[A[e+2]]+o[A[e+3]]+"-"+o[A[e+4]]+o[A[e+5]]+"-"+o[A[e+6]]+o[A[e+7]]+"-"+o[A[e+8]]+o[A[e+9]]+"-"+o[A[e+10]]+o[A[e+11]]+o[A[e+12]]+o[A[e+13]]+o[A[e+14]]+o[A[e+15]]).toLowerCase();if(!$A(t))throwTypeError("Stringified UUID is invalid");returnt}functionee(A,e,t){A=A||{};varn=A.random||(A.rng||TA)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(varg=0;g<16;++g)e[t+g]=n[g];returne}returnAe(n)}consth=ee,te={prop:"block",event:"update"},Dt={blockId:{type:String,default:h}},CA=Symbol("Schlechtenburg active block");functionIA(A=null){conste=U(CA,C(null)),t=L(()=>e.value===A),n=(a=A)=>{e.value===a&&(e.value=null)},g=a=>n();SA(()=>{document.removeEventListener("click",g)});constQ=(a=A)=>{document.addEventListener("click",g,{once:!0}),e.value=a};return{activeBlockId:e,isActive:t,activate:Q,deactivate:n,requestActivation:()=>{e.value||Q()}}}constsA=Symbol("Schlechtenburg block library");functionfA(){constA=U(oA,C(E.Edit)),e=U(sA,k({}));return{mode:A,customBlocks:e,getBlock:n=>e[n]}}constEA=Symbol("Schlechtenburg block dimensions"),cA=Symbol("Schlechtenburg editor dimensions");functiondA(A,e){constt=C(null);l(e,t);constn=()=>{if(!A.value)return;constg=A.value.getBoundingClientRect();t.value={width:g.width,height:g.height,left:A.value.offsetLeft,top:A.value.offsetTop}};returnjA(()=>{constg=newResizeObserver(n),Q=newMutationObserver(n);b(A,()=>{!A.value||(g.observe(A.value),Q.observe(A.value,{attributes:!0,childList:!1,subtree:!1}))})}),{triggerSizeCalculation:n,dimensions:t}}functionuA(){constA=U(cA,C(null)),e=U(EA,C(null));return{editorDimensions:A,blockDimensions:e}}constlA=Symbol("Schlechtenburg block tree"),j=Symbol("Schlechtenburg block tree register"),G=Symbol("Schlechtenburg block tree unregister");functionbA(){constA=U(lA,C(null)),e=U(j,Q=>{}),t=U(G,Q=>{}),n=k({id:"",name:"",icon:"",children:[]});l(j,Q=>{n.children.find(r=>r.id===Q.id)||(n.children=[...n.children,Q])}),l(G,({id:Q})=>{n.children=n.children.filter(r=>r.id!==Q)});constg=Q=>{if(!Q.id)thrownewError(`Cannot register a block without an id: ${JSON.stringify(Q)}`);n.id=Q.id,n.name=Q.name,e(n)};returnGA(()=>{n.id&&t(n)}),{blockTree:A,register:g}}constq=s({name:"sb-button",inheritAttrs:!1,setup(A,e){return()=>{vart,n;returni("button",m(u({},e.attrs),{class:(e.attrs.class||"")+" sb-button"}),[(n=(t=e.slots).default)==null?void0:n.call(t)])}}});constDA=s({name:"sb-context-menu",props:{onClose:{type:Function,default:()=>{}},onOpen:{type:Function,default:()=>{}}},setup(A,e){constt=C(!1),n=()=>{t.value=!0},g=()=>{t.value=!1},Q=a=>{a.key==="Escape"&&g()},r=()=>{t.value?g():n()};returnb(t,