vdc-editor 0.1.144 → 0.1.145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/BulkSpellChecker-cA8aqog4.mjs +657 -0
- package/lib/BulkSpellChecker-cA8aqog4.mjs.map +1 -0
- package/lib/fonts/Dotum.woff2 +0 -0
- package/lib/fonts/Gulim.woff2 +0 -0
- package/lib/fonts/Gungsuh.woff2 +0 -0
- package/lib/index-BO416jr9.mjs +56241 -0
- package/lib/index-BO416jr9.mjs.map +1 -0
- package/lib/style.css +1 -1
- package/lib/vdc-editor.mjs +1 -1
- package/lib/vdc-editor.umd.js +2 -2
- package/lib/vdc-editor.umd.js.map +1 -1
- package/package.json +1 -1
package/lib/vdc-editor.umd.js
CHANGED
|
@@ -270,7 +270,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ne=R,oe=G),N===void 0&
|
|
|
270
270
|
`,lW="️",uW="",_g="";let op=null,ip=null;function cW(t=[]){const e={};ir.groups=e;const n=new ir;op==null&&(op=m8(nW)),ip==null&&(ip=m8(rW)),ye(n,"'",vg),ye(n,"{",Nu),ye(n,"}",ec),ye(n,"[",If),ye(n,"]",Rf),ye(n,"(",Lf),ye(n,")",Df),ye(n,"<",Pf),ye(n,">",Vf),ye(n,"(",Ff),ye(n,")",$f),ye(n,"「",zf),ye(n,"」",Hf),ye(n,"『",Uf),ye(n,"』",Wf),ye(n,"<",jf),ye(n,">",qf),ye(n,"&",Kf),ye(n,"*",Gf),ye(n,"@",es),ye(n,"`",Yf),ye(n,"^",Jf),ye(n,":",ts),ye(n,",",yg),ye(n,"$",Zf),ye(n,".",Do),ye(n,"=",Qf),ye(n,"!",wg),ye(n,"-",Fr),ye(n,"%",tc),ye(n,"|",Nf),ye(n,"+",ep),ye(n,"#",tp),ye(n,"?",nc),ye(n,'"',xg),ye(n,"/",Po),ye(n,";",Cg),ye(n,"~",rc),ye(n,"_",np),ye(n,"\\",Xf),ye(n,"・",c8);const r=tn(n,ci,mg,{[ag]:!0});tn(r,ci,r);const o=tn(r,ui,l8,{[Ju]:!0}),s=tn(r,oc,u8,{[Zu]:!0}),a=tn(n,ui,li,{[lg]:!0});tn(a,ci,o),tn(a,ui,a),tn(o,ci,o),tn(o,ui,o);const l=tn(n,oc,fg,{[ug]:!0});tn(l,ui),tn(l,ci,s),tn(l,oc,l),tn(s,ci,s),tn(s,ui),tn(s,oc,s);const u=ye(n,Sg,bg,{[dg]:!0}),c=ye(n,p8,gg,{[dg]:!0}),f=tn(n,kg,gg,{[dg]:!0});ye(n,_g,f),ye(c,Sg,u),ye(c,_g,f),tn(c,kg,f),ye(f,p8),ye(f,Sg),tn(f,kg,f),ye(f,_g,f);const p=tn(n,Eg,d8,{[s8]:!0});ye(p,"#"),tn(p,Eg,p),ye(p,lW,p);const m=ye(p,uW);ye(m,"#"),tn(m,Eg,p);const g=[[ui,a],[ci,o]],b=[[ui,null],[oc,l],[ci,s]];for(let y=0;y<op.length;y++)ns(n,op[y],pg,li,g);for(let y=0;y<ip.length;y++)ns(n,ip[y],hg,fg,b);Ns(pg,{tld:!0,ascii:!0},e),Ns(hg,{utld:!0,alpha:!0},e),ns(n,"file",Bf,li,g),ns(n,"mailto",Bf,li,g),ns(n,"http",yl,li,g),ns(n,"https",yl,li,g),ns(n,"ftp",yl,li,g),ns(n,"ftps",yl,li,g),Ns(Bf,{scheme:!0,ascii:!0},e),Ns(yl,{slashscheme:!0,ascii:!0},e),t=t.sort((y,w)=>y[0]>w[0]?1:-1);for(let y=0;y<t.length;y++){const w=t[y][0],S=t[y][1]?{[oW]:!0}:{[iW]:!0};w.indexOf("-")>=0?S[cg]=!0:ui.test(w)?ci.test(w)?S[Ju]=!0:S[lg]=!0:S[ag]=!0,a8(n,w,w,S)}return a8(n,"localhost",Qu,{ascii:!0}),n.jd=new ir(rp),{start:n,tokens:vl({groups:e},f8)}}function h8(t,e){const n=dW(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,o=[];let s=0,a=0;for(;a<r;){let l=t,u=null,c=0,f=null,p=-1,m=-1;for(;a<r&&(u=l.go(n[a]));)l=u,l.accepts()?(p=0,m=0,f=l):p>=0&&(p+=n[a].length,m++),c+=n[a].length,s+=n[a].length,a++;s-=p,a-=m,c-=p,o.push({t:f.t,v:e.slice(s-c,s),s:s-c,e:s})}return o}function dW(t){const e=[],n=t.length;let r=0;for(;r<n;){let o=t.charCodeAt(r),s,a=o<55296||o>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?t[r]:t.slice(r,r+2);e.push(a),r+=a.length}return e}function ns(t,e,n,r,o){let s;const a=e.length;for(let l=0;l<a-1;l++){const u=e[l];t.j[u]?s=t.j[u]:(s=new ir(r),s.jr=o.slice(),t.j[u]=s),t=s}return s=new ir(n),s.jr=o.slice(),t.j[e[a-1]]=s,s}function m8(t){const e=[],n=[];let r=0,o="0123456789";for(;r<t.length;){let s=0;for(;o.indexOf(t[r+s])>=0;)s++;if(s>0){e.push(n.join(""));for(let a=parseInt(t.substring(r,r+s),10);a>0;a--)n.pop();r+=s}else n.push(t[r]),r++}return e}const ic={defaultProtocol:"http",events:null,format:g8,formatHref:g8,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Tg(t,e=null){let n=vl({},ic);t&&(n=vl(n,t instanceof Tg?t.o:t));const r=n.ignoreTags,o=[];for(let s=0;s<r.length;s++)o.push(r[s].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}Tg.prototype={o:ic,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let o=this.o[t];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:ic[t],typeof o=="function"&&r&&(o=o(e,n))):typeof o=="function"&&r&&(o=o(e,n.t,n)),o)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function g8(t){return t}function b8(t,e){this.t="token",this.v=t,this.tk=e}b8.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=ic.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),s=this.toFormattedString(t),a={},l=t.get("className",n,e),u=t.get("target",n,e),c=t.get("rel",n,e),f=t.getObj("attributes",n,e),p=t.getObj("events",n,e);return a.href=r,l&&(a.class=l),u&&(a.target=u),c&&(a.rel=c),f&&vl(a,f),{tagName:o,attributes:a,content:s,eventListeners:p}}};function sp(t,e){class n extends b8{constructor(o,s){super(o,s),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const v8=sp("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),y8=sp("text"),fW=sp("nl"),ap=sp("url",{isLink:!0,toHref(t=ic.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Qu&&t[1].t===ts}}),$r=t=>new ir(t);function pW({groups:t}){const e=t.domain.concat([Kf,Gf,es,Xf,Yf,Jf,Zf,Qf,Fr,mg,tc,Nf,ep,tp,Po,rp,rc,np]),n=[ts,yg,Do,wg,tc,nc,xg,Cg,Pf,Vf,Nu,ec,Rf,If,Lf,Df,Ff,$f,zf,Hf,Uf,Wf,jf,qf],r=[Kf,vg,Gf,Xf,Yf,Jf,Zf,Qf,Fr,Nu,ec,tc,Nf,ep,tp,nc,Po,rp,rc,np],o=$r(),s=ye(o,rc);ut(s,r,s),ut(s,t.domain,s);const a=$r(),l=$r(),u=$r();ut(o,t.domain,a),ut(o,t.scheme,l),ut(o,t.slashscheme,u),ut(a,r,s),ut(a,t.domain,a);const c=ye(a,es);ye(s,es,c),ye(l,es,c),ye(u,es,c);const f=ye(s,Do);ut(f,r,s),ut(f,t.domain,s);const p=$r();ut(c,t.domain,p),ut(p,t.domain,p);const m=ye(p,Do);ut(m,t.domain,p);const g=$r(v8);ut(m,t.tld,g),ut(m,t.utld,g),ye(c,Qu,g);const b=ye(p,Fr);ye(b,Fr,b),ut(b,t.domain,p),ut(g,t.domain,p),ye(g,Do,m),ye(g,Fr,b);const y=ye(g,ts);ut(y,t.numeric,v8);const w=ye(a,Fr),x=ye(a,Do);ye(w,Fr,w),ut(w,t.domain,a),ut(x,r,s),ut(x,t.domain,a);const S=$r(ap);ut(x,t.tld,S),ut(x,t.utld,S),ut(S,t.domain,a),ut(S,r,s),ye(S,Do,x),ye(S,Fr,w),ye(S,es,c);const E=ye(S,ts),C=$r(ap);ut(E,t.numeric,C);const T=$r(ap),_=$r();ut(T,e,T),ut(T,n,_),ut(_,e,T),ut(_,n,_),ye(S,Po,T),ye(C,Po,T);const A=ye(l,ts),D=ye(u,ts),L=ye(D,Po),B=ye(L,Po);ut(l,t.domain,a),ye(l,Do,x),ye(l,Fr,w),ut(u,t.domain,a),ye(u,Do,x),ye(u,Fr,w),ut(A,t.domain,T),ye(A,Po,T),ye(A,nc,T),ut(B,t.domain,T),ut(B,e,T),ye(B,Po,T);const W=[[Nu,ec],[If,Rf],[Lf,Df],[Pf,Vf],[Ff,$f],[zf,Hf],[Uf,Wf],[jf,qf]];for(let J=0;J<W.length;J++){const[ue,X]=W[J],H=ye(T,ue);ye(_,ue,H),ye(H,X,T);const F=$r(ap);ut(H,e,F);const R=$r();ut(H,n),ut(F,e,F),ut(F,n,R),ut(R,e,F),ut(R,n,R),ye(F,X,T),ye(R,X,T)}return ye(o,Qu,S),ye(o,bg,fW),{start:o,tokens:f8}}function hW(t,e,n){let r=n.length,o=0,s=[],a=[];for(;o<r;){let l=t,u=null,c=null,f=0,p=null,m=-1;for(;o<r&&!(u=l.go(n[o].t));)a.push(n[o++]);for(;o<r&&(c=u||l.go(n[o].t));)u=null,l=c,l.accepts()?(m=0,p=l):m>=0&&m++,o++,f++;if(m<0)o-=f,o<r&&(a.push(n[o]),o++);else{a.length>0&&(s.push(Ag(y8,e,a)),a=[]),o-=m,f-=m;const g=p.t,b=n.slice(o-f,o);s.push(Ag(g,e,b))}}return a.length>0&&s.push(Ag(y8,e,a)),s}function Ag(t,e,n){const r=n[0].s,o=n[n.length-1].e,s=e.slice(r,o);return new t(s,n)}const mW=typeof console<"u"&&console&&console.warn||(()=>{}),gW="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",qt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function bW(){return ir.groups={},qt.scanner=null,qt.parser=null,qt.tokenQueue=[],qt.pluginQueue=[],qt.customSchemes=[],qt.initialized=!1,qt}function w8(t,e=!1){if(qt.initialized&&mW(`linkifyjs: already initialized - will not register custom scheme "${t}" ${gW}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
|
271
271
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
272
272
|
2. Cannot start or end with "-"
|
|
273
|
-
3. "-" cannot repeat`);qt.customSchemes.push([t,e])}function vW(){qt.scanner=cW(qt.customSchemes);for(let t=0;t<qt.tokenQueue.length;t++)qt.tokenQueue[t][1]({scanner:qt.scanner});qt.parser=pW(qt.scanner.tokens);for(let t=0;t<qt.pluginQueue.length;t++)qt.pluginQueue[t][1]({scanner:qt.scanner,parser:qt.parser});return qt.initialized=!0,qt}function Og(t){return qt.initialized||vW(),hW(qt.parser.start,t,h8(qt.scanner.start,t))}Og.scan=h8;function x8(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Tg(n),o=Og(t),s=[];for(let a=0;a<o.length;a++){const l=o[a];l.isLink&&(!e||l.t===e)&&r.check(l)&&s.push(l.toFormattedObject(r))}return s}function yW(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function wW(t){return new tt({key:new kt("autolink"),appendTransaction:(e,n,r)=>{const o=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!o||s)return;const{tr:a}=r,l=cO(n.doc,[...e]);if(hO(l).forEach(({newRange:c})=>{const f=t4(r.doc,c,g=>g.isTextblock);let p,m;if(f.length>1?(p=f[0],m=r.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ")):f.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(p=f[0],m=r.doc.textBetween(p.pos,c.to,void 0," ")),p&&m){const g=m.split(" ").filter(x=>x!=="");if(g.length<=0)return!1;const b=g[g.length-1],y=p.pos+m.lastIndexOf(b);if(!b)return!1;const w=Og(b).map(x=>x.toObject(t.defaultProtocol));if(!yW(w))return!1;w.filter(x=>x.isLink).map(x=>({...x,from:y+x.start+1,to:y+x.end+1})).filter(x=>r.schema.marks.code?!r.doc.rangeHasMark(x.from,x.to,r.schema.marks.code):!0).filter(x=>t.validate(x.value)).filter(x=>t.shouldAutoLink(x.value)).forEach(x=>{Xm(x.from,x.to,r.doc).some(S=>S.mark.type===t.type)||a.addMark(x.from,x.to,t.type.create({href:x.href}))})}}),!!a.steps.length)return a}})}function xW(t){return new tt({key:new kt("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,s;if(r.button!==0||!e.editable)return!1;let a=r.target;const l=[];for(;a.nodeName!=="DIV";)l.push(a),a=a.parentNode;if(!l.find(m=>m.nodeName==="A"))return!1;const u=o4(e.state,t.type.name),c=r.target,f=(o=c==null?void 0:c.href)!==null&&o!==void 0?o:u.href,p=(s=c==null?void 0:c.target)!==null&&s!==void 0?s:u.target;return c&&f?(window.open(f,p),!0):!1}}})}function CW(t){return new tt({key:new kt("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:s}=o,{empty:a}=s;if(a)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});const u=x8(l,{defaultProtocol:t.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!u?!1:t.editor.commands.setMark(t.type,{href:u.href})}}})}const EW=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function ea(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(EW,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const kW=Gn.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){w8(t);return}w8(t.scheme,t.optionalSlashes)})},onDestroy(){bW()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!ea(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!ea(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!ea(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",bt(this.options.HTMLAttributes,t),0]:["a",bt(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!ea(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!ea(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[zi({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,o=x8(t).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:a=>!!ea(a,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(s=>e.push({text:s.value,data:{href:s.href},index:s.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(wW({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!ea(o,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(xW({type:this.type})),this.options.linkOnPaste&&t.push(CW({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),SW={class:"flex w-full max-w-sm items-center gap-1.5"},_W={class:"relative w-full max-w-sm items-center"},TW={class:"flex w-full max-w-sm items-center gap-1.5"},AW={class:"relative w-full max-w-sm items-center"},OW={class:"absolute start-0 inset-y-0 flex items-center justify-center px-2"},C8=i.defineComponent({__name:"LinkEditBlock",props:{editor:{}},emits:["onSetLink","onClickOutside"],setup(t,{emit:e}){const n=t,r=e,{t:o}=St();let s=i.reactive({text:"",link:""});const a=i.ref(null),{focused:l}=et.useFocus(a),u=i.ref(!0),c=i.ref(null);et.onClickOutside(c,p=>r("onClickOutside",p)),i.watchEffect(()=>{const{href:p,target:m}=n.editor.getAttributes("link"),{from:g,to:b}=n.editor.state.selection,y=n.editor.state.doc.textBetween(g,b," ");s={link:p,text:y}});function f(){r("onSetLink",s.link,s.text,u.value)}return i.onMounted(()=>{l.value=!0}),(p,m)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"target",ref:c,class:"p-2 bg-white rounded-lg dark:bg-black shadow-sm border border-neutral-200 dark:border-neutral-800"},[i.createElementVNode("form",{class:"flex flex-col gap-2",onSubmit:i.withModifiers(f,["prevent"])},[i.createVNode(i.unref(R1),null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.link.dialog.text")),1)]),_:1}),i.createElementVNode("div",SW,[i.createElementVNode("div",_W,[i.createVNode(i.unref(ul),{modelValue:i.unref(s).text,"onUpdate:modelValue":m[0]||(m[0]=g=>i.unref(s).text=g),type:"text",required:"",class:"w-80",placeholder:"텍스트"},null,8,["modelValue"])])]),i.createVNode(i.unref(R1),null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.link.dialog.link")),1)]),_:1}),i.createElementVNode("div",TW,[i.createElementVNode("div",AW,[i.createVNode(i.unref(ul),{ref_key:"inputRef",ref:a,modelValue:i.unref(s).link,"onUpdate:modelValue":m[1]||(m[1]=g=>i.unref(s).link=g),type:"url",required:"",class:"pl-10"},null,8,["modelValue"]),i.createElementVNode("span",OW,[i.createVNode(i.unref(jt),{class:"size-5 text-ed-muted-foreground",name:"Link"})])])]),i.createVNode(i.unref(_n),{class:"mt-2 self-end"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.link.dialog.button.apply")),1)]),_:1})],32)],512))}}),MW=i.defineComponent({__name:"LinkEditPopover",props:{editor:{},icon:{default:void 0},title:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},shortcutKeys:{default:void 0},isActive:{type:Function,default:void 0},action:{type:Function,default:void 0}},setup(t){const e=t;function n(r,o,s){e.action&&e.action({link:r,text:o,openInNewTab:s})}return(r,o)=>(i.openBlock(),i.createBlock(i.unref(al),null,{default:i.withCtx(()=>[i.createVNode(i.unref(cl),{disabled:r.disabled},{default:i.withCtx(()=>[i.createVNode(je,{icon:r.icon,tooltip:r.tooltip,"is-active":r.isActive,disabled:r.disabled},null,8,["icon","tooltip","is-active","disabled"])]),_:1},8,["disabled"]),i.createVNode(i.unref(ll),{"hide-when-detached":"","as-child":"",class:"w-full",align:"start",side:"bottom"},{default:i.withCtx(()=>[i.createVNode(C8,{editor:r.editor,onOnSetLink:n},null,8,["editor"])]),_:1})]),_:1}))}}),Mg=kW.extend({inclusive:!1,parseHTML(){return[{tag:'a[href]:not([data-type="button"]):not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:t}){return["a",bt(this.options.HTMLAttributes,t,{class:"link"}),0]},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),openOnClick:!0,button:({editor:e,t:n})=>({component:MW,componentProps:{action:r=>{const{link:o,text:s,openInNewTab:a}=r;e.chain().extendMarkRange("link").insertContent({type:"text",text:s,marks:[{type:"link",attrs:{href:o,target:a?"_blank":""}}]}).setLink({href:o}).focus().run()},isActive:()=>e.isActive("link")||!1,disabled:!e.can().setLink({href:""}),icon:"Link",tooltip:n("editor.link.tooltip")}})}},addProseMirrorPlugins(){return[new tt({props:{handleClick:(t,e)=>{const{schema:n,doc:r,tr:o}=t.state,s=fd(r.resolve(e),n.marks.link);if(!s)return!1;const a=r.resolve(s.from),l=r.resolve(s.to),u=o.setSelection(new Be(a,l));t.dispatch(u)}}})]}}),BW=Bt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",bt(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:o}=n,s=t();return r.parentOffset===0?s.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):i4(n)?s.insertContentAt(o.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:a,dispatch:l})=>{var u;if(l){const{$to:c}=a.selection,f=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?a.setSelection(Be.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(De.create(a.doc,c.pos)):a.setSelection(Be.create(a.doc,c.pos));else{const p=(u=c.parent.type.contentMatch.defaultType)===null||u===void 0?void 0:u.create();p&&(a.insert(f,p),a.setSelection(Be.create(a.doc,f+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[u4({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}).extend({renderHTML(){return["div",bt(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:n})=>({component:je,componentProps:{action:()=>e.commands.setHorizontalRule(),disabled:!e.can().setHorizontalRule(),icon:"Minus",shortcutKeys:["mod","alt","S"],tooltip:n("editor.horizontalrule.tooltip")}})}},addKeyboardShortcuts(){return{"Mod-Alt-s":()=>this.editor.commands.setHorizontalRule()}}});var lp=200,yn=function(){};yn.prototype.append=function(e){return e.length?(e=yn.from(e),!this.length&&e||e.length<lp&&this.leafAppend(e)||this.length<lp&&e.leafPrepend(this)||this.appendInner(e)):this},yn.prototype.prepend=function(e){return e.length?yn.from(e).append(this):this},yn.prototype.appendInner=function(e){return new IW(this,e)},yn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?yn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},yn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},yn.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)},yn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(s,a){return o.push(e(s,a))},n,r),o},yn.from=function(e){return e instanceof yn?e:e&&e.length?new E8(e):yn.empty};var E8=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,s){return o==0&&s==this.length?this:new e(this.values.slice(o,s))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,s,a,l){for(var u=s;u<a;u++)if(o(this.values[u],l+u)===!1)return!1},e.prototype.forEachInvertedInner=function(o,s,a,l){for(var u=s-1;u>=a;u--)if(o(this.values[u],l+u)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=lp)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=lp)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(yn);yn.empty=new E8([]);var IW=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,s,a){var l=this.left.length;if(o<l&&this.left.forEachInner(r,o,Math.min(s,l),a)===!1||s>l&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,s)-l,a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,s,a){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(s,l)-l,a+l)===!1||s<l&&this.left.forEachInvertedInner(r,Math.min(o,l),s,a)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var s=this.left.length;return o<=s?this.left.slice(r,o):r>=s?this.right.slice(r-s,o-s):this.left.slice(r,s).append(this.right.slice(0,o-s))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(yn);const RW=500;class lo{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,s;n&&(o=this.remapping(r,this.items.length),s=o.maps.length);let a=e.tr,l,u,c=[],f=[];return this.items.forEach((p,m)=>{if(!p.step){o||(o=this.remapping(r,m+1),s=o.maps.length),s--,f.push(p);return}if(o){f.push(new Vo(p.map));let g=p.step.map(o.slice(s)),b;g&&a.maybeStep(g).doc&&(b=a.mapping.maps[a.mapping.maps.length-1],c.push(new Vo(b,void 0,void 0,c.length+f.length))),s--,b&&o.appendMap(b,s)}else a.maybeStep(p.step);if(p.selection)return l=o?p.selection.map(o.slice(s)):p.selection,u=new lo(this.items.slice(0,r).append(f.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:a,selection:l}}addTransform(e,n,r,o){let s=[],a=this.eventCount,l=this.items,u=!o&&l.length?l.get(l.length-1):null;for(let f=0;f<e.steps.length;f++){let p=e.steps[f].invert(e.docs[f]),m=new Vo(e.mapping.maps[f],p,n),g;(g=u&&u.merge(m))&&(m=g,f?s.pop():l=l.slice(0,l.length-1)),s.push(m),n&&(a++,n=void 0),o||(u=m)}let c=a-r.depth;return c>DW&&(l=LW(l,c),a-=c),new lo(l.append(s),a)}remapping(e,n){let r=new Jl;return this.items.forEach((o,s)=>{let a=o.mirrorOffset!=null&&s-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new lo(this.items.append(e.map(n=>new Vo(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),s=e.mapping,a=e.steps.length,l=this.eventCount;this.items.forEach(m=>{m.selection&&l--},o);let u=n;this.items.forEach(m=>{let g=s.getMirror(--u);if(g==null)return;a=Math.min(a,g);let b=s.maps[g];if(m.step){let y=e.steps[g].invert(e.docs[g]),w=m.selection&&m.selection.map(s.slice(u+1,g));w&&l++,r.push(new Vo(b,y,w))}else r.push(new Vo(b))},o);let c=[];for(let m=n;m<a;m++)c.push(new Vo(s.maps[m]));let f=this.items.slice(0,o).append(c).append(r),p=new lo(f,l);return p.emptyItemCount()>RW&&(p=p.compress(this.items.length-r.length)),p}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],s=0;return this.items.forEach((a,l)=>{if(l>=e)o.push(a),a.selection&&s++;else if(a.step){let u=a.step.map(n.slice(r)),c=u&&u.getMap();if(r--,c&&n.appendMap(c,r),u){let f=a.selection&&a.selection.map(n.slice(r));f&&s++;let p=new Vo(c.invert(),u,f),m,g=o.length-1;(m=o.length&&o[g].merge(p))?o[g]=m:o.push(p)}}else a.map&&r--},this.items.length,0),new lo(yn.from(o.reverse()),s)}}lo.empty=new lo(yn.empty,0);function LW(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class Vo{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Vo(n.getMap().invert(),n,this.selection)}}}class rs{constructor(e,n,r,o,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=s}}const DW=20;function PW(t,e,n,r){let o=n.getMeta(ta),s;if(o)return o.historyState;n.getMeta($W)&&(t=new rs(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(ta))return a.getMeta(ta).redo?new rs(t.done.addTransform(n,void 0,r,up(e)),t.undone,k8(n.mapping.maps),t.prevTime,t.prevComposition):new rs(t.done,t.undone.addTransform(n,void 0,r,up(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),u=t.prevTime==0||!a&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!VW(n,t.prevRanges)),c=a?Bg(t.prevRanges,n.mapping):k8(n.mapping.maps);return new rs(t.done.addTransform(n,u?e.selection.getBookmark():void 0,r,up(e)),lo.empty,c,n.time,l??t.prevComposition)}else return(s=n.getMeta("rebased"))?new rs(t.done.rebased(n,s),t.undone.rebased(n,s),Bg(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new rs(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Bg(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function VW(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&o>=e[s]&&(n=!0)}),n}function k8(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,s,a)=>e.push(s,a));return e}function Bg(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),s=e.map(t[r+1],-1);o<=s&&n.push(o,s)}return n}function FW(t,e,n){let r=up(e),o=ta.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let a=s.selection.resolve(s.transform.doc),l=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),o,r),u=new rs(n?l:s.remaining,n?s.remaining:l,null,0,-1);return s.transform.setSelection(a).setMeta(ta,{redo:n,historyState:u})}let Ig=!1,S8=null;function up(t){let e=t.plugins;if(S8!=e){Ig=!1,S8=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Ig=!0;break}}return Ig}const ta=new kt("history"),$W=new kt("closeHistory");function zW(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new tt({key:ta,state:{init(){return new rs(lo.empty,lo.empty,null,0,-1)},apply(e,n,r){return PW(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?T8:r=="historyRedo"?A8:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function _8(t,e){return(n,r)=>{let o=ta.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let s=FW(o,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const T8=_8(!1,!0),A8=_8(!0,!0),HW=Qe.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>T8(t,e),redo:()=>({state:t,dispatch:e})=>A8(t,e)}},addProseMirrorPlugins(){return[zW(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),O8={HISTORY_TRANSACTION:"history$",ADD_TO_HISTORY_TRANSACTION:"addToHistory"},Rg=HW.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),depth:10,button:({editor:e,t:n})=>["undo","redo"].map(o=>({component:je,componentProps:{action:()=>{o==="undo"&&e.commands.undo(),o==="redo"&&e.commands.redo()},shortcutKeys:o==="undo"?["mod","Z"]:["shift","mod","Z"],disabled:!e.can()[o](),icon:o==="undo"?"Undo2":"Redo2",tooltip:n(`editor.${o}.tooltip`)}}))}}}),{isFullscreen:Lg,toggleFullscreen:Dg}=vn(),UW=Qe.create({name:"fullscreen",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>({component:je,componentProps:{tooltip:Lg.value?r("editor.fullscreen.tooltip.exit"):r("editor.fullscreen.tooltip.fullscreen"),action:()=>Dg(),icon:Lg.value?"Minimize":"Maximize",isActive:()=>Lg.value}})}},addKeyboardShortcuts(){return{F11:()=>(Dg(),!0),"Mod-F11":()=>(Dg(),!0)}}}),WW=Qe.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new tt({key:new kt("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const o=this.options.limit;if(o==null||o===0){t=!0;return}const s=this.storage.characters({node:r.doc});if(s>o){const a=s-o,l=0,u=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${o} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(l,u);return t=!0,c}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const o=this.storage.characters({node:n.doc}),s=this.storage.characters({node:e.doc});if(s<=r||o>r&&s>r&&s<=o)return!0;if(o>r&&s>r&&s>o||!e.getMeta("paste"))return!1;const l=e.selection.$head.pos,u=s-r,c=l-u,f=l;return e.deleteRange(c,f),!(this.storage.characters({node:e.doc})>r)}})]}});function jW(t={}){return new tt({view(e){return new qW(e,t)}})}class qW{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let s=a=>{this[o](a)};return e.dom.addEventListener(o,s),{name:o,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r;if(n){let l=e.nodeBefore,u=e.nodeAfter;if(l||u){let c=this.editorView.nodeDOM(this.cursorPos-(l?l.nodeSize:0));if(c){let f=c.getBoundingClientRect(),p=l?f.bottom:f.top;l&&u&&(p=(p+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:f.left,right:f.right,top:p-this.width/2,bottom:p+this.width/2}}}}if(!r){let l=this.editorView.coordsAtPos(this.cursorPos);r={left:l.left-this.width/2,right:l.left+this.width/2,top:l.top,bottom:l.bottom}}let o=this.editorView.dom.offsetParent;this.element||(this.element=o.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let s,a;if(!o||o==document.body&&getComputedStyle(o).position=="static")s=-pageXOffset,a=-pageYOffset;else{let l=o.getBoundingClientRect();s=l.left-o.scrollLeft,a=l.top-o.scrollTop}this.element.style.left=r.left-s+"px",this.element.style.top=r.top-a+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,s=typeof o=="function"?o(this.editorView,n,e):o;if(n&&!s){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=ty(this.editorView.state.doc,a,this.editorView.dragging.slice);l!=null&&(a=l)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const KW=Qe.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[jW(this.options)]}}),GW=Qe.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new tt({key:new kt("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:o}=e,s=[];if(!n||!r)return mt.create(t,[]);let a=0;this.options.mode==="deepest"&&t.descendants((u,c)=>{if(u.isText)return;if(!(o>=c&&o<=c+u.nodeSize-1))return!1;a+=1});let l=0;return t.descendants((u,c)=>{if(u.isText||!(o>=c&&o<=c+u.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&a-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";s.push(Wt.node(c,c+u.nodeSize,{class:this.options.className}))}),mt.create(t,s)}}})]}});class nn extends Ve{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return nn.valid(r)?new nn(r):Ve.near(r)}content(){return Ce.empty}eq(e){return e instanceof nn&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new nn(e.resolve(n.pos))}getBookmark(){return new Pg(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!XW(e)||!YW(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&nn.valid(e))return e;let o=e.pos,s=null;for(let a=e.depth;;a--){let l=e.node(a);if(n>0?e.indexAfter(a)<l.childCount:e.index(a)>0){s=l.child(n>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;o+=n;let u=e.doc.resolve(o);if(nn.valid(u))return u}for(;;){let a=n>0?s.firstChild:s.lastChild;if(!a){if(s.isAtom&&!s.isText&&!De.isSelectable(s)){e=e.doc.resolve(o+s.nodeSize*n),r=!1;continue e}break}s=a,o+=n;let l=e.doc.resolve(o);if(nn.valid(l))return l}return null}}}nn.prototype.visible=!1,nn.findFrom=nn.findGapCursorFrom,Ve.jsonID("gapcursor",nn);class Pg{constructor(e){this.pos=e}map(e){return new Pg(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return nn.valid(n)?new nn(n):Ve.near(n)}}function XW(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function YW(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function JW(){return new tt({props:{decorations:ej,createSelectionBetween(t,e,n){return e.pos==n.pos&&nn.valid(n)?new nn(n):null},handleClick:QW,handleKeyDown:ZW,handleDOMEvents:{beforeinput:NW}}})}const ZW=Lm({ArrowLeft:cp("horiz",-1),ArrowRight:cp("horiz",1),ArrowUp:cp("vert",-1),ArrowDown:cp("vert",1)});function cp(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,s){let a=r.selection,l=e>0?a.$to:a.$from,u=a.empty;if(a instanceof Be){if(!s.endOfTextblock(n)||l.depth==0)return!1;u=!1,l=r.doc.resolve(e>0?l.after():l.before())}let c=nn.findGapCursorFrom(l,e,u);return c?(o&&o(r.tr.setSelection(new nn(c))),!0):!1}}function QW(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!nn.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&De.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new nn(r))),!0)}function NW(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof nn))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=ce.empty;for(let a=r.length-1;a>=0;a--)o=ce.from(r[a].createAndFill(null,o));let s=t.state.tr.replace(n.pos,n.pos,new Ce(o,0,0));return s.setSelection(Be.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function ej(t){if(!(t.selection instanceof nn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",mt.create(t.doc,[Wt.widget(t.selection.head,e,{key:"gapcursor"})])}const tj=Qe.create({name:"gapCursor",addProseMirrorPlugins(){return[JW()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=at(Re(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),nj=Bt.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",bt(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
273
|
+
3. "-" cannot repeat`);qt.customSchemes.push([t,e])}function vW(){qt.scanner=cW(qt.customSchemes);for(let t=0;t<qt.tokenQueue.length;t++)qt.tokenQueue[t][1]({scanner:qt.scanner});qt.parser=pW(qt.scanner.tokens);for(let t=0;t<qt.pluginQueue.length;t++)qt.pluginQueue[t][1]({scanner:qt.scanner,parser:qt.parser});return qt.initialized=!0,qt}function Og(t){return qt.initialized||vW(),hW(qt.parser.start,t,h8(qt.scanner.start,t))}Og.scan=h8;function x8(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Tg(n),o=Og(t),s=[];for(let a=0;a<o.length;a++){const l=o[a];l.isLink&&(!e||l.t===e)&&r.check(l)&&s.push(l.toFormattedObject(r))}return s}function yW(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function wW(t){return new tt({key:new kt("autolink"),appendTransaction:(e,n,r)=>{const o=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!o||s)return;const{tr:a}=r,l=cO(n.doc,[...e]);if(hO(l).forEach(({newRange:c})=>{const f=t4(r.doc,c,g=>g.isTextblock);let p,m;if(f.length>1?(p=f[0],m=r.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ")):f.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(p=f[0],m=r.doc.textBetween(p.pos,c.to,void 0," ")),p&&m){const g=m.split(" ").filter(x=>x!=="");if(g.length<=0)return!1;const b=g[g.length-1],y=p.pos+m.lastIndexOf(b);if(!b)return!1;const w=Og(b).map(x=>x.toObject(t.defaultProtocol));if(!yW(w))return!1;w.filter(x=>x.isLink).map(x=>({...x,from:y+x.start+1,to:y+x.end+1})).filter(x=>r.schema.marks.code?!r.doc.rangeHasMark(x.from,x.to,r.schema.marks.code):!0).filter(x=>t.validate(x.value)).filter(x=>t.shouldAutoLink(x.value)).forEach(x=>{Xm(x.from,x.to,r.doc).some(S=>S.mark.type===t.type)||a.addMark(x.from,x.to,t.type.create({href:x.href}))})}}),!!a.steps.length)return a}})}function xW(t){return new tt({key:new kt("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,s;if(r.button!==0||!e.editable)return!1;let a=r.target;const l=[];for(;a.nodeName!=="DIV";)l.push(a),a=a.parentNode;if(!l.find(m=>m.nodeName==="A"))return!1;const u=o4(e.state,t.type.name),c=r.target,f=(o=c==null?void 0:c.href)!==null&&o!==void 0?o:u.href,p=(s=c==null?void 0:c.target)!==null&&s!==void 0?s:u.target;return c&&f?(window.open(f,p),!0):!1}}})}function CW(t){return new tt({key:new kt("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:s}=o,{empty:a}=s;if(a)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});const u=x8(l,{defaultProtocol:t.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!u?!1:t.editor.commands.setMark(t.type,{href:u.href})}}})}const EW=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function ea(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(EW,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const kW=Gn.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){w8(t);return}w8(t.scheme,t.optionalSlashes)})},onDestroy(){bW()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!ea(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!ea(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!ea(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",bt(this.options.HTMLAttributes,t),0]:["a",bt(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!ea(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!ea(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[zi({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,o=x8(t).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:a=>!!ea(a,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(s=>e.push({text:s.value,data:{href:s.href},index:s.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(wW({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!ea(o,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(xW({type:this.type})),this.options.linkOnPaste&&t.push(CW({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),SW={class:"flex w-full max-w-sm items-center gap-1.5"},_W={class:"relative w-full max-w-sm items-center"},TW={class:"flex w-full max-w-sm items-center gap-1.5"},AW={class:"relative w-full max-w-sm items-center"},OW={class:"absolute start-0 inset-y-0 flex items-center justify-center px-2"},C8=i.defineComponent({__name:"LinkEditBlock",props:{editor:{}},emits:["onSetLink","onClickOutside"],setup(t,{emit:e}){const n=t,r=e,{t:o}=St();let s=i.reactive({text:"",link:""});const a=i.ref(null),{focused:l}=et.useFocus(a),u=i.ref(!0),c=i.ref(null);et.onClickOutside(c,p=>r("onClickOutside",p)),i.watchEffect(()=>{const{href:p,target:m}=n.editor.getAttributes("link"),{from:g,to:b}=n.editor.state.selection,y=n.editor.state.doc.textBetween(g,b," ");s={link:p,text:y}});function f(){r("onSetLink",s.link,s.text,u.value)}return i.onMounted(()=>{l.value=!0}),(p,m)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"target",ref:c,class:"p-2 bg-white rounded-lg dark:bg-black shadow-sm border border-neutral-200 dark:border-neutral-800"},[i.createElementVNode("form",{class:"flex flex-col gap-2",onSubmit:i.withModifiers(f,["prevent"])},[i.createVNode(i.unref(R1),null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.link.dialog.text")),1)]),_:1}),i.createElementVNode("div",SW,[i.createElementVNode("div",_W,[i.createVNode(i.unref(ul),{modelValue:i.unref(s).text,"onUpdate:modelValue":m[0]||(m[0]=g=>i.unref(s).text=g),type:"text",required:"",placeholder:"텍스트"},null,8,["modelValue"])])]),i.createVNode(i.unref(R1),null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.link.dialog.link")),1)]),_:1}),i.createElementVNode("div",TW,[i.createElementVNode("div",AW,[i.createVNode(i.unref(ul),{ref_key:"inputRef",ref:a,modelValue:i.unref(s).link,"onUpdate:modelValue":m[1]||(m[1]=g=>i.unref(s).link=g),type:"url",required:"",class:"pl-10"},null,8,["modelValue"]),i.createElementVNode("span",OW,[i.createVNode(i.unref(jt),{class:"size-5 text-ed-muted-foreground",name:"Link"})])])]),i.createVNode(i.unref(_n),{class:"mt-2 self-end"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.link.dialog.button.apply")),1)]),_:1})],32)],512))}}),MW=i.defineComponent({__name:"LinkEditPopover",props:{editor:{},icon:{default:void 0},title:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},shortcutKeys:{default:void 0},isActive:{type:Function,default:void 0},action:{type:Function,default:void 0}},setup(t){const e=t;function n(r,o,s){e.action&&e.action({link:r,text:o,openInNewTab:s})}return(r,o)=>(i.openBlock(),i.createBlock(i.unref(al),null,{default:i.withCtx(()=>[i.createVNode(i.unref(cl),{disabled:r.disabled},{default:i.withCtx(()=>[i.createVNode(je,{icon:r.icon,tooltip:r.tooltip,"is-active":r.isActive,disabled:r.disabled},null,8,["icon","tooltip","is-active","disabled"])]),_:1},8,["disabled"]),i.createVNode(i.unref(ll),{"hide-when-detached":"","as-child":"",class:"w-full sm:w-80",align:"start",side:"bottom"},{default:i.withCtx(()=>[i.createVNode(C8,{editor:r.editor,onOnSetLink:n},null,8,["editor"])]),_:1})]),_:1}))}}),Mg=kW.extend({inclusive:!1,parseHTML(){return[{tag:'a[href]:not([data-type="button"]):not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:t}){return["a",bt(this.options.HTMLAttributes,t,{class:"link"}),0]},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),openOnClick:!0,button:({editor:e,t:n})=>({component:MW,componentProps:{action:r=>{const{link:o,text:s,openInNewTab:a}=r;e.chain().extendMarkRange("link").insertContent({type:"text",text:s,marks:[{type:"link",attrs:{href:o,target:a?"_blank":""}}]}).setLink({href:o}).focus().run()},isActive:()=>e.isActive("link")||!1,disabled:!e.can().setLink({href:""}),icon:"Link",tooltip:n("editor.link.tooltip")}})}},addProseMirrorPlugins(){return[new tt({props:{handleClick:(t,e)=>{const{schema:n,doc:r,tr:o}=t.state,s=fd(r.resolve(e),n.marks.link);if(!s)return!1;const a=r.resolve(s.from),l=r.resolve(s.to),u=o.setSelection(new Be(a,l));t.dispatch(u)}}})]}}),BW=Bt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",bt(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:o}=n,s=t();return r.parentOffset===0?s.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):i4(n)?s.insertContentAt(o.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:a,dispatch:l})=>{var u;if(l){const{$to:c}=a.selection,f=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?a.setSelection(Be.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(De.create(a.doc,c.pos)):a.setSelection(Be.create(a.doc,c.pos));else{const p=(u=c.parent.type.contentMatch.defaultType)===null||u===void 0?void 0:u.create();p&&(a.insert(f,p),a.setSelection(Be.create(a.doc,f+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[u4({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}).extend({renderHTML(){return["div",bt(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:n})=>({component:je,componentProps:{action:()=>e.commands.setHorizontalRule(),disabled:!e.can().setHorizontalRule(),icon:"Minus",shortcutKeys:["mod","alt","S"],tooltip:n("editor.horizontalrule.tooltip")}})}},addKeyboardShortcuts(){return{"Mod-Alt-s":()=>this.editor.commands.setHorizontalRule()}}});var lp=200,yn=function(){};yn.prototype.append=function(e){return e.length?(e=yn.from(e),!this.length&&e||e.length<lp&&this.leafAppend(e)||this.length<lp&&e.leafPrepend(this)||this.appendInner(e)):this},yn.prototype.prepend=function(e){return e.length?yn.from(e).append(this):this},yn.prototype.appendInner=function(e){return new IW(this,e)},yn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?yn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},yn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},yn.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)},yn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(s,a){return o.push(e(s,a))},n,r),o},yn.from=function(e){return e instanceof yn?e:e&&e.length?new E8(e):yn.empty};var E8=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,s){return o==0&&s==this.length?this:new e(this.values.slice(o,s))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,s,a,l){for(var u=s;u<a;u++)if(o(this.values[u],l+u)===!1)return!1},e.prototype.forEachInvertedInner=function(o,s,a,l){for(var u=s-1;u>=a;u--)if(o(this.values[u],l+u)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=lp)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=lp)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(yn);yn.empty=new E8([]);var IW=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,s,a){var l=this.left.length;if(o<l&&this.left.forEachInner(r,o,Math.min(s,l),a)===!1||s>l&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,s)-l,a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,s,a){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(s,l)-l,a+l)===!1||s<l&&this.left.forEachInvertedInner(r,Math.min(o,l),s,a)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var s=this.left.length;return o<=s?this.left.slice(r,o):r>=s?this.right.slice(r-s,o-s):this.left.slice(r,s).append(this.right.slice(0,o-s))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(yn);const RW=500;class lo{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,s;n&&(o=this.remapping(r,this.items.length),s=o.maps.length);let a=e.tr,l,u,c=[],f=[];return this.items.forEach((p,m)=>{if(!p.step){o||(o=this.remapping(r,m+1),s=o.maps.length),s--,f.push(p);return}if(o){f.push(new Vo(p.map));let g=p.step.map(o.slice(s)),b;g&&a.maybeStep(g).doc&&(b=a.mapping.maps[a.mapping.maps.length-1],c.push(new Vo(b,void 0,void 0,c.length+f.length))),s--,b&&o.appendMap(b,s)}else a.maybeStep(p.step);if(p.selection)return l=o?p.selection.map(o.slice(s)):p.selection,u=new lo(this.items.slice(0,r).append(f.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:a,selection:l}}addTransform(e,n,r,o){let s=[],a=this.eventCount,l=this.items,u=!o&&l.length?l.get(l.length-1):null;for(let f=0;f<e.steps.length;f++){let p=e.steps[f].invert(e.docs[f]),m=new Vo(e.mapping.maps[f],p,n),g;(g=u&&u.merge(m))&&(m=g,f?s.pop():l=l.slice(0,l.length-1)),s.push(m),n&&(a++,n=void 0),o||(u=m)}let c=a-r.depth;return c>DW&&(l=LW(l,c),a-=c),new lo(l.append(s),a)}remapping(e,n){let r=new Jl;return this.items.forEach((o,s)=>{let a=o.mirrorOffset!=null&&s-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new lo(this.items.append(e.map(n=>new Vo(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),s=e.mapping,a=e.steps.length,l=this.eventCount;this.items.forEach(m=>{m.selection&&l--},o);let u=n;this.items.forEach(m=>{let g=s.getMirror(--u);if(g==null)return;a=Math.min(a,g);let b=s.maps[g];if(m.step){let y=e.steps[g].invert(e.docs[g]),w=m.selection&&m.selection.map(s.slice(u+1,g));w&&l++,r.push(new Vo(b,y,w))}else r.push(new Vo(b))},o);let c=[];for(let m=n;m<a;m++)c.push(new Vo(s.maps[m]));let f=this.items.slice(0,o).append(c).append(r),p=new lo(f,l);return p.emptyItemCount()>RW&&(p=p.compress(this.items.length-r.length)),p}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],s=0;return this.items.forEach((a,l)=>{if(l>=e)o.push(a),a.selection&&s++;else if(a.step){let u=a.step.map(n.slice(r)),c=u&&u.getMap();if(r--,c&&n.appendMap(c,r),u){let f=a.selection&&a.selection.map(n.slice(r));f&&s++;let p=new Vo(c.invert(),u,f),m,g=o.length-1;(m=o.length&&o[g].merge(p))?o[g]=m:o.push(p)}}else a.map&&r--},this.items.length,0),new lo(yn.from(o.reverse()),s)}}lo.empty=new lo(yn.empty,0);function LW(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class Vo{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Vo(n.getMap().invert(),n,this.selection)}}}class rs{constructor(e,n,r,o,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=s}}const DW=20;function PW(t,e,n,r){let o=n.getMeta(ta),s;if(o)return o.historyState;n.getMeta($W)&&(t=new rs(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(ta))return a.getMeta(ta).redo?new rs(t.done.addTransform(n,void 0,r,up(e)),t.undone,k8(n.mapping.maps),t.prevTime,t.prevComposition):new rs(t.done,t.undone.addTransform(n,void 0,r,up(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),u=t.prevTime==0||!a&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!VW(n,t.prevRanges)),c=a?Bg(t.prevRanges,n.mapping):k8(n.mapping.maps);return new rs(t.done.addTransform(n,u?e.selection.getBookmark():void 0,r,up(e)),lo.empty,c,n.time,l??t.prevComposition)}else return(s=n.getMeta("rebased"))?new rs(t.done.rebased(n,s),t.undone.rebased(n,s),Bg(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new rs(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Bg(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function VW(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&o>=e[s]&&(n=!0)}),n}function k8(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,s,a)=>e.push(s,a));return e}function Bg(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),s=e.map(t[r+1],-1);o<=s&&n.push(o,s)}return n}function FW(t,e,n){let r=up(e),o=ta.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let a=s.selection.resolve(s.transform.doc),l=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),o,r),u=new rs(n?l:s.remaining,n?s.remaining:l,null,0,-1);return s.transform.setSelection(a).setMeta(ta,{redo:n,historyState:u})}let Ig=!1,S8=null;function up(t){let e=t.plugins;if(S8!=e){Ig=!1,S8=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Ig=!0;break}}return Ig}const ta=new kt("history"),$W=new kt("closeHistory");function zW(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new tt({key:ta,state:{init(){return new rs(lo.empty,lo.empty,null,0,-1)},apply(e,n,r){return PW(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?T8:r=="historyRedo"?A8:null;return o?(n.preventDefault(),o(e.state,e.dispatch)):!1}}}})}function _8(t,e){return(n,r)=>{let o=ta.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let s=FW(o,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const T8=_8(!1,!0),A8=_8(!0,!0),HW=Qe.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>T8(t,e),redo:()=>({state:t,dispatch:e})=>A8(t,e)}},addProseMirrorPlugins(){return[zW(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),O8={HISTORY_TRANSACTION:"history$",ADD_TO_HISTORY_TRANSACTION:"addToHistory"},Rg=HW.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),depth:10,button:({editor:e,t:n})=>["undo","redo"].map(o=>({component:je,componentProps:{action:()=>{o==="undo"&&e.commands.undo(),o==="redo"&&e.commands.redo()},shortcutKeys:o==="undo"?["mod","Z"]:["shift","mod","Z"],disabled:!e.can()[o](),icon:o==="undo"?"Undo2":"Redo2",tooltip:n(`editor.${o}.tooltip`)}}))}}}),{isFullscreen:Lg,toggleFullscreen:Dg}=vn(),UW=Qe.create({name:"fullscreen",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>({component:je,componentProps:{tooltip:Lg.value?r("editor.fullscreen.tooltip.exit"):r("editor.fullscreen.tooltip.fullscreen"),action:()=>Dg(),icon:Lg.value?"Minimize":"Maximize",isActive:()=>Lg.value}})}},addKeyboardShortcuts(){return{F11:()=>(Dg(),!0),"Mod-F11":()=>(Dg(),!0)}}}),WW=Qe.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new tt({key:new kt("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const o=this.options.limit;if(o==null||o===0){t=!0;return}const s=this.storage.characters({node:r.doc});if(s>o){const a=s-o,l=0,u=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${o} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(l,u);return t=!0,c}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const o=this.storage.characters({node:n.doc}),s=this.storage.characters({node:e.doc});if(s<=r||o>r&&s>r&&s<=o)return!0;if(o>r&&s>r&&s>o||!e.getMeta("paste"))return!1;const l=e.selection.$head.pos,u=s-r,c=l-u,f=l;return e.deleteRange(c,f),!(this.storage.characters({node:e.doc})>r)}})]}});function jW(t={}){return new tt({view(e){return new qW(e,t)}})}class qW{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let s=a=>{this[o](a)};return e.dom.addEventListener(o,s),{name:o,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r;if(n){let l=e.nodeBefore,u=e.nodeAfter;if(l||u){let c=this.editorView.nodeDOM(this.cursorPos-(l?l.nodeSize:0));if(c){let f=c.getBoundingClientRect(),p=l?f.bottom:f.top;l&&u&&(p=(p+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:f.left,right:f.right,top:p-this.width/2,bottom:p+this.width/2}}}}if(!r){let l=this.editorView.coordsAtPos(this.cursorPos);r={left:l.left-this.width/2,right:l.left+this.width/2,top:l.top,bottom:l.bottom}}let o=this.editorView.dom.offsetParent;this.element||(this.element=o.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let s,a;if(!o||o==document.body&&getComputedStyle(o).position=="static")s=-pageXOffset,a=-pageYOffset;else{let l=o.getBoundingClientRect();s=l.left-o.scrollLeft,a=l.top-o.scrollTop}this.element.style.left=r.left-s+"px",this.element.style.top=r.top-a+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,s=typeof o=="function"?o(this.editorView,n,e):o;if(n&&!s){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=ty(this.editorView.state.doc,a,this.editorView.dragging.slice);l!=null&&(a=l)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const KW=Qe.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[jW(this.options)]}}),GW=Qe.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new tt({key:new kt("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:o}=e,s=[];if(!n||!r)return mt.create(t,[]);let a=0;this.options.mode==="deepest"&&t.descendants((u,c)=>{if(u.isText)return;if(!(o>=c&&o<=c+u.nodeSize-1))return!1;a+=1});let l=0;return t.descendants((u,c)=>{if(u.isText||!(o>=c&&o<=c+u.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&a-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";s.push(Wt.node(c,c+u.nodeSize,{class:this.options.className}))}),mt.create(t,s)}}})]}});class nn extends Ve{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return nn.valid(r)?new nn(r):Ve.near(r)}content(){return Ce.empty}eq(e){return e instanceof nn&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new nn(e.resolve(n.pos))}getBookmark(){return new Pg(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!XW(e)||!YW(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&nn.valid(e))return e;let o=e.pos,s=null;for(let a=e.depth;;a--){let l=e.node(a);if(n>0?e.indexAfter(a)<l.childCount:e.index(a)>0){s=l.child(n>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;o+=n;let u=e.doc.resolve(o);if(nn.valid(u))return u}for(;;){let a=n>0?s.firstChild:s.lastChild;if(!a){if(s.isAtom&&!s.isText&&!De.isSelectable(s)){e=e.doc.resolve(o+s.nodeSize*n),r=!1;continue e}break}s=a,o+=n;let l=e.doc.resolve(o);if(nn.valid(l))return l}return null}}}nn.prototype.visible=!1,nn.findFrom=nn.findGapCursorFrom,Ve.jsonID("gapcursor",nn);class Pg{constructor(e){this.pos=e}map(e){return new Pg(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return nn.valid(n)?new nn(n):Ve.near(n)}}function XW(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function YW(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||o.isAtom||o.type.spec.isolating)return!0;if(o.inlineContent)return!1}}return!0}function JW(){return new tt({props:{decorations:ej,createSelectionBetween(t,e,n){return e.pos==n.pos&&nn.valid(n)?new nn(n):null},handleClick:QW,handleKeyDown:ZW,handleDOMEvents:{beforeinput:NW}}})}const ZW=Lm({ArrowLeft:cp("horiz",-1),ArrowRight:cp("horiz",1),ArrowUp:cp("vert",-1),ArrowDown:cp("vert",1)});function cp(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,s){let a=r.selection,l=e>0?a.$to:a.$from,u=a.empty;if(a instanceof Be){if(!s.endOfTextblock(n)||l.depth==0)return!1;u=!1,l=r.doc.resolve(e>0?l.after():l.before())}let c=nn.findGapCursorFrom(l,e,u);return c?(o&&o(r.tr.setSelection(new nn(c))),!0):!1}}function QW(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!nn.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&De.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new nn(r))),!0)}function NW(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof nn))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=ce.empty;for(let a=r.length-1;a>=0;a--)o=ce.from(r[a].createAndFill(null,o));let s=t.state.tr.replace(n.pos,n.pos,new Ce(o,0,0));return s.setSelection(Be.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function ej(t){if(!(t.selection instanceof nn))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",mt.create(t.doc,[Wt.widget(t.selection.head,e,{key:"gapcursor"})])}const tj=Qe.create({name:"gapCursor",addProseMirrorPlugins(){return[JW()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=at(Re(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),nj=Bt.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",bt(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
274
274
|
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:s}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:l}=r.extensionManager,u=s||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:f})=>{if(f&&u&&a){const p=u.filter(m=>l.includes(m.type.name));c.ensureMarks(p)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),rj=Bt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",bt(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),M8=Bt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",bt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),oj=Qe.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new tt({key:new kt("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,o=[];if(!n)return null;const s=this.editor.isEmpty;return t.descendants((a,l)=>{const u=r>=l&&r<=l+a.nodeSize,c=!a.isLeaf&&yd(a);if((u||!this.options.showOnlyCurrent)&&c){const f=[this.options.emptyNodeClass];s&&f.push(this.options.emptyEditorClass);const p=Wt.node(l,l+a.nodeSize,{class:f.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:u}):this.options.placeholder});o.push(p)}return this.options.includeChildren}),mt.create(t,o)}}})]}}),B8=Bt.create({name:"text",group:"inline"}),I8=Bt.create({name:"doc",topNode:!0,content:"block+"}),R8=I8.extend({content(){var e;return!!((e=this.editor)!=null&&e.options.extensions.find(n=>n.name==="columns"))?"(block|columns)+":"block+"}}),ij=Qe.create({name:"selection",addProseMirrorPlugins(){const{editor:t}=this;return[new tt({key:new kt("selection"),props:{decorations(e){return e.selection.empty?null:mt.create(e.doc,[Wt.inline(e.selection.from,e.selection.to,{class:"selection"})])}}})]}}),sj=t=>{const e=["size-small","size-medium","size-large"],n=["SizeS","SizeM","SizeL"];return e.map((r,o)=>({type:`video-${r}`,component:je,componentProps:{tooltip:`editor.${r.replace("-",".")}.tooltip`,icon:n[o],action:()=>t.commands.updateVideo({width:Bd[r]}),isActive:()=>t.isActive("video",{width:Bd[r]})}}))},aj=t=>[...sj(t),{type:"remove",component:je,componentProps:{tooltip:"editor.remove",icon:"Trash2",action:()=>{const{state:e,dispatch:n}=t.view;cu(e,n)}}}],lj=(t,e,{editor:n,extension:r,t:o})=>{const{extensions:s=[]}=n.extensionManager,a={};for(const l of Object.keys(t)){const u=t[l];if(!u)continue;const c=[];for(const m of u){if(m==="divider"){const y=c[c.length-1];if((y==null?void 0:y.type)==="divider")continue;c.push({type:"divider",component:void 0,componentProps:{}});continue}const g=e.find(y=>y.type===m);if(g){c.push({...g,componentProps:{...g.componentProps,tooltip:g.componentProps.tooltip?o(g.componentProps.tooltip):void 0},componentSlots:g.componentSlots});continue}const b=s.find(y=>y.name===m);if(b){const{button:y}=b.options,w=y({editor:n,extension:b,t:o});c.push({type:m,component:w.component,componentProps:w.componentProps,componentSlots:w.componentSlots});continue}}const f=c[c.length-1],p=c[0];(f==null?void 0:f.type)==="divider"&&c.pop(),(p==null?void 0:p.type)==="divider"&&c.shift(),a[l]=c}return a},uj=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(t=>t.charCodeAt(0))),cj=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var Vg;const dj=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),fj=(Vg=String.fromCodePoint)!==null&&Vg!==void 0?Vg:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function pj(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=dj.get(t))!==null&&e!==void 0?e:t}var wn;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(wn||(wn={}));const hj=32;var is;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(is||(is={}));function Fg(t){return t>=wn.ZERO&&t<=wn.NINE}function mj(t){return t>=wn.UPPER_A&&t<=wn.UPPER_F||t>=wn.LOWER_A&&t<=wn.LOWER_F}function gj(t){return t>=wn.UPPER_A&&t<=wn.UPPER_Z||t>=wn.LOWER_A&&t<=wn.LOWER_Z||Fg(t)}function bj(t){return t===wn.EQUALS||gj(t)}var xn;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(xn||(xn={}));var ss;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(ss||(ss={}));class vj{constructor(e,n,r){this.decodeTree=e,this.emitCodePoint=n,this.errors=r,this.state=xn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ss.Strict}startEntity(e){this.decodeMode=e,this.state=xn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case xn.EntityStart:return e.charCodeAt(n)===wn.NUM?(this.state=xn.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=xn.NamedEntity,this.stateNamedEntity(e,n));case xn.NumericStart:return this.stateNumericStart(e,n);case xn.NumericDecimal:return this.stateNumericDecimal(e,n);case xn.NumericHex:return this.stateNumericHex(e,n);case xn.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|hj)===wn.LOWER_X?(this.state=xn.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=xn.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,r,o){if(n!==r){const s=r-n;this.result=this.result*Math.pow(o,s)+Number.parseInt(e.substr(n,s),o),this.consumed+=s}}stateNumericHex(e,n){const r=n;for(;n<e.length;){const o=e.charCodeAt(n);if(Fg(o)||mj(o))n+=1;else return this.addToNumericResult(e,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(e,r,n,16),-1}stateNumericDecimal(e,n){const r=n;for(;n<e.length;){const o=e.charCodeAt(n);if(Fg(o))n+=1;else return this.addToNumericResult(e,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(e,r,n,10),-1}emitNumericEntity(e,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===wn.SEMI)this.consumed+=1;else if(this.decodeMode===ss.Strict)return 0;return this.emitCodePoint(pj(this.result),this.consumed),this.errors&&(e!==wn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,n){const{decodeTree:r}=this;let o=r[this.treeIndex],s=(o&is.VALUE_LENGTH)>>14;for(;n<e.length;n++,this.excess++){const a=e.charCodeAt(n);if(this.treeIndex=yj(r,o,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===ss.Attribute&&(s===0||bj(a))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],s=(o&is.VALUE_LENGTH)>>14,s!==0){if(a===wn.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==ss.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:r}=this,o=(r[n]&is.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[e]&~is.VALUE_LENGTH:o[e+1],r),n===3&&this.emitCodePoint(o[e+2],r),r}end(){var e;switch(this.state){case xn.NamedEntity:return this.result!==0&&(this.decodeMode!==ss.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case xn.NumericDecimal:return this.emitNumericEntity(0,2);case xn.NumericHex:return this.emitNumericEntity(0,3);case xn.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case xn.EntityStart:return 0}}}function L8(t){let e="";const n=new vj(t,r=>e+=fj(r));return function(o,s){let a=0,l=0;for(;(l=o.indexOf("&",l))>=0;){e+=o.slice(a,l),n.startEntity(s);const c=n.write(o,l+1);if(c<0){a=l+n.end();break}a=l+c,l=c===0?a+1:a}const u=e+o.slice(a);return e="",u}}function yj(t,e,n,r){const o=(e&is.BRANCH_LENGTH)>>7,s=e&is.JUMP_TABLE;if(o===0)return s!==0&&r===s?n:-1;if(s){const u=r-s;return u<0||u>=o?-1:t[n+u]-1}let a=n,l=a+o-1;for(;a<=l;){const u=a+l>>>1,c=t[u];if(c<r)a=u+1;else if(c>r)l=u-1;else return t[u+o]}return-1}const wj=L8(uj);L8(cj);function xj(t,e=ss.Legacy){return wj(t,e)}var Qt;(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(Qt||(Qt={}));var zr;(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(zr||(zr={}));const D8=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,Cj=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,Ej=new Map([[126,zr.Element],[94,zr.Start],[36,zr.End],[42,zr.Any],[33,zr.Not],[124,zr.Hyphen]]),kj=new Set(["has","not","matches","is","where","host","host-context"]);function Sj(t){switch(t.type){case Qt.Adjacent:case Qt.Child:case Qt.Descendant:case Qt.Parent:case Qt.Sibling:case Qt.ColumnCombinator:return!0;default:return!1}}const _j=new Set(["contains","icontains"]);function Tj(t,e,n){const r=parseInt(e,16)-65536;return r!==r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)}function sc(t){return t.replace(Cj,Tj)}function $g(t){return t===39||t===34}function P8(t){return t===32||t===9||t===10||t===12||t===13}function Aj(t){const e=[],n=V8(e,`${t}`,0);if(n<t.length)throw new Error(`Unmatched selector: ${t.slice(n)}`);return e}function V8(t,e,n){let r=[];function o(m){const g=e.slice(n+m).match(D8);if(!g)throw new Error(`Expected name, found ${e.slice(n)}`);const[b]=g;return n+=m+b.length,sc(b)}function s(m){for(n+=m;n<e.length&&P8(e.charCodeAt(n));)n++}function a(){n+=1;const m=n;let g=1;for(;g>0&&n<e.length;n++)e.charCodeAt(n)===40&&!l(n)?g++:e.charCodeAt(n)===41&&!l(n)&&g--;if(g)throw new Error("Parenthesis not matched");return sc(e.slice(m,n-1))}function l(m){let g=0;for(;e.charCodeAt(--m)===92;)g++;return(g&1)===1}function u(){if(r.length>0&&Sj(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function c(m){if(r.length>0&&r[r.length-1].type===Qt.Descendant){r[r.length-1].type=m;return}u(),r.push({type:m})}function f(m,g){r.push({type:Qt.Attribute,name:m,action:g,value:o(1),namespace:null,ignoreCase:"quirks"})}function p(){if(r.length&&r[r.length-1].type===Qt.Descendant&&r.pop(),r.length===0)throw new Error("Empty sub-selector");t.push(r)}if(s(0),e.length===n)return n;e:for(;n<e.length;){const m=e.charCodeAt(n);switch(m){case 32:case 9:case 10:case 12:case 13:{(r.length===0||r[0].type!==Qt.Descendant)&&(u(),r.push({type:Qt.Descendant})),s(1);break}case 62:{c(Qt.Child),s(1);break}case 60:{c(Qt.Parent),s(1);break}case 126:{c(Qt.Sibling),s(1);break}case 43:{c(Qt.Adjacent),s(1);break}case 46:{f("class",zr.Element);break}case 35:{f("id",zr.Equals);break}case 91:{s(1);let g,b=null;e.charCodeAt(n)===124?g=o(1):e.startsWith("*|",n)?(b="*",g=o(2)):(g=o(0),e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==61&&(b=g,g=o(1))),s(0);let y=zr.Exists;const w=Ej.get(e.charCodeAt(n));if(w){if(y=w,e.charCodeAt(n+1)!==61)throw new Error("Expected `=`");s(2)}else e.charCodeAt(n)===61&&(y=zr.Equals,s(1));let x="",S=null;if(y!=="exists"){if($g(e.charCodeAt(n))){const T=e.charCodeAt(n);let _=n+1;for(;_<e.length&&(e.charCodeAt(_)!==T||l(_));)_+=1;if(e.charCodeAt(_)!==T)throw new Error("Attribute value didn't end");x=sc(e.slice(n+1,_)),n=_+1}else{const T=n;for(;n<e.length&&(!P8(e.charCodeAt(n))&&e.charCodeAt(n)!==93||l(n));)n+=1;x=sc(e.slice(T,n))}s(0);const C=e.charCodeAt(n)|32;C===115?(S=!1,s(1)):C===105&&(S=!0,s(1))}if(e.charCodeAt(n)!==93)throw new Error("Attribute selector didn't terminate");n+=1;const E={type:Qt.Attribute,name:g,action:y,value:x,namespace:b,ignoreCase:S};r.push(E);break}case 58:{if(e.charCodeAt(n+1)===58){r.push({type:Qt.PseudoElement,name:o(2).toLowerCase(),data:e.charCodeAt(n)===40?a():null});continue}const g=o(1).toLowerCase();let b=null;if(e.charCodeAt(n)===40)if(kj.has(g)){if($g(e.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${g} cannot be quoted`);if(b=[],n=V8(b,e,n+1),e.charCodeAt(n)!==41)throw new Error(`Missing closing parenthesis in :${g} (${e})`);n+=1}else{if(b=a(),_j.has(g)){const y=b.charCodeAt(0);y===b.charCodeAt(b.length-1)&&$g(y)&&(b=b.slice(1,-1))}b=sc(b)}r.push({type:Qt.Pseudo,name:g,data:b});break}case 44:{p(),r=[],s(1);break}default:{if(e.startsWith("/*",n)){const y=e.indexOf("*/",n+2);if(y<0)throw new Error("Comment was not terminated");n=y+2,r.length===0&&s(0);break}let g=null,b;if(m===42)n+=1,b="*";else if(m===124){if(b="",e.charCodeAt(n+1)===124){c(Qt.ColumnCombinator),s(2);break}}else if(D8.test(e.slice(n)))b=o(0);else break e;e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==124&&(g=b,e.charCodeAt(n+1)===42?(b="*",n+=2):b=o(1)),r.push(b==="*"?{type:Qt.Universal,namespace:g}:{type:Qt.Tag,name:b,namespace:g})}}}return p(),n}function zg(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\xA0/g," ").replace(/\xAD/g,"­")}var F8=t=>xj(t);function Oj(t,e,n,r){if(typeof e=="function")return e({props:{...n,children:r},attrs:n,children:r,h:t.h,context:t});{let o=!0,s;if(e?e.toLowerCase()==="fragment"?(s=t.document.createDocumentFragment(),o=!1):s=t.document.createElement(e):s=t.document.createElement("div"),n&&o){const a=s;for(let[l,u]of Object.entries(n)){l=l.toString();const c=l.toLowerCase();c==="classname"?a.className=u:c==="on"?Object.entries(u).forEach(([f,p])=>{a.setAttribute(`on${f}`,String(p))}):u!==!1&&u!=null&&(u===!0?a.setAttribute(l,l):a.setAttribute(l,u.toString()))}}if(r)for(const a of r){const l=Array.isArray(a)?[...a]:[a];for(const u of l)u&&u!==!1&&u!=null&&(typeof u!="object"?s.appendChild(t.document.createTextNode(u.toString())):s.appendChild(u))}return s}}function $8(t,e,...n){return typeof t=="object"&&(t="fragment",n=t.children,e=t.attrs),Array.isArray(e)?(n=[e],e={}):e?e.attrs&&(e={...e.attrs,...e},delete e.attrs):e={},{tag:t,attrs:e,children:typeof n[0]=="string"?n:n.flat(Number.POSITIVE_INFINITY)}}function Mj(t){return t.h=function(n,r,...o){const{tag:s,attrs:a,children:l}=$8(n,r,o);return Oj(t,s,a,l)},t.h}var z8={};function Bj(t){let e=z8[t];return e==null&&(e=Aj(t),z8[t]=e),e}function Ij(t,e,{debug:n=!1}={}){for(const r of Bj(t)){const o=(s,a)=>{var u,c,f,p;let l=!1;for(const m of a){const{type:g,name:b,action:y,value:w,_ignoreCase:x=!0,data:S}=m;if(g==="attribute")y==="equals"?l=s.getAttribute(b)===w:y==="start"?l=!!((u=s.getAttribute(b))!=null&&u.startsWith(w)):y==="end"?l=!!((c=s.getAttribute(b))!=null&&c.endsWith(w)):y==="element"?b==="class"?l=s.classList.contains(w):l=!!((f=s.getAttribute(b))!=null&&f.includes(w)):y==="exists"?l=s.hasAttribute(b):y==="any"?l=!!((p=s.getAttribute(b))!=null&&p.includes(w)):console.warn("Unknown CSS selector action",y);else if(g==="tag")l=s.tagName===b.toUpperCase();else if(g==="universal")l=!0;else if(g==="pseudo"){if(b==="not"){let E=!0;S.forEach(C=>{o(s,C)||(E=!1)}),l=!E}}else console.warn("Unknown CSS selector type",g,t,a);if(!l)break}return l};if(o(e,r))return!0}return!1}var Rj=Symbol.for("nodejs.util.inspect.custom"),H8={fontWeight:"bold"},U8={fontStyle:"italic"},W8={backgroundColor:"rgb(255, 250, 165)"},j8={textDecorations:"underline"},Hg={textDecorations:"line-through"},Lj={b:H8,strong:H8,em:U8,i:U8,mark:W8,u:j8,a:j8,s:Hg,del:Hg,ins:W8,strike:Hg};function q8(t){return t.toLowerCase().replace(/[^a-z0-9]+(.)/gi,(e,n)=>n.toUpperCase())}var di=class zh{constructor(){this.append=this.appendChild,this._parentNode=null,this._childNodes=[]}get nodeType(){return console.error("Subclasses should define nodeType!"),0}get nodeName(){return console.error("Subclasses should define nodeName!"),""}get nodeValue(){return null}cloneNode(e=!1){const n=new this.constructor;return e&&(n._childNodes=this._childNodes.map(r=>r.cloneNode(!0)),n._fixChildNodesParent()),n}_fixChildNodesParent(){this._childNodes.forEach(e=>e._parentNode=this)}insertBefore(e,n){if(e!==n){let r=n?this._childNodes.indexOf(n):0;r<0&&(r=0),this._childNodes.splice(r,0,e),this._fixChildNodesParent()}}appendChild(e){if(e!=null){if(e===this){console.warn("Cannot appendChild to self");return}if(e instanceof Wg&&console.warn("No defined how to append a document to a node!",e),e instanceof Ug)for(const n of[...e._childNodes])this.appendChild(n);else if(Array.isArray(e))for(const n of[...e])this.appendChild(n);else if(e instanceof zh)e.remove(),this._childNodes.push(e);else try{const n=typeof e=="string"?e:JSON.stringify(e,null,2);this._childNodes.push(new wl(n))}catch(n){console.error(`The data ${e} to be added to ${this.render()} is problematic: ${n}`)}this._fixChildNodesParent()}}removeChild(e){const n=this._childNodes.indexOf(e);n>=0&&(e._parentNode=null,this._childNodes.splice(n,1),this._fixChildNodesParent())}remove(){var e;return(e=this==null?void 0:this.parentNode)==null||e.removeChild(this),this}replaceChildren(...e){this._childNodes=e.map(n=>typeof n=="string"?new wl(n):n.remove()),this._fixChildNodesParent()}replaceWith(...e){const n=this._parentNode;if(n){const r=this._indexInParent();r>=0&&(e=e.map(o=>typeof o=="string"?new wl(o):o.remove()),n._childNodes.splice(r,1,...e),this._parentNode=null,n._fixChildNodesParent())}}_indexInParent(){return this._parentNode?this._parentNode.childNodes.indexOf(this):-1}get parentNode(){return this._parentNode}get childNodes(){return this._childNodes||[]}get children(){return this._childNodes||[]}get firstChild(){return this._childNodes[0]}get lastChild(){return this._childNodes[this._childNodes.length-1]}get nextSibling(){const e=this._indexInParent();return e!=null&&this.parentNode.childNodes[e+1]||null}get previousSibling(){const e=this._indexInParent();return e>0&&this.parentNode.childNodes[e-1]||null}flatten(){const e=[];this instanceof uo&&e.push(this);for(const n of this._childNodes)e.push(...n.flatten());return e}flattenNodes(){const e=[];e.push(this);for(const n of this._childNodes)e.push(...n.flattenNodes());return e}render(){return""}get textContent(){return this._childNodes.map(e=>e.textContent).join("")}set textContent(e){this._childNodes=[],e&&this.appendChild(new wl(e.toString()))}contains(e){return e===this?!0:this._childNodes.some(n=>n.contains(e))}get ownerDocument(){var e;return this.nodeType===zh.DOCUMENT_NODE||this.nodeType===zh.DOCUMENT_FRAGMENT_NODE?this:(e=this==null?void 0:this._parentNode)==null?void 0:e.ownerDocument}toString(){return`${this.nodeName}`}[Rj](){return`${this.constructor.name} "${this.render()}"`}};di.ELEMENT_NODE=1,di.TEXT_NODE=3,di.CDATA_SECTION_NODE=4,di.PROCESSING_INSTRUCTION_NODE=7,di.COMMENT_NODE=8,di.DOCUMENT_NODE=9,di.DOCUMENT_TYPE_NODE=10,di.DOCUMENT_FRAGMENT_NODE=11;var as=di,wl=class extends as{get nodeType(){return as.TEXT_NODE}get nodeName(){return"#text"}get nodeValue(){return this._text||""}get textContent(){return this.nodeValue}constructor(t=""){super(),this._text=t}render(){var e;const t=(e=this.parentNode)==null?void 0:e.tagName;return t==="SCRIPT"||t==="STYLE"?this._text:zg(this._text)}cloneNode(t=!1){const e=super.cloneNode(t);return e._text=this._text,e}},K8=class extends as{getElementById(t){return this.flatten().find(e=>e._attributes.id===t)}getElementsByClassName(t){return this.flatten().filter(e=>e.classList.contains(t))}matches(t){return Ij(t,this)}querySelectorAll(t){return this.flatten().filter(e=>e.matches(t))}querySelector(t){return this.flatten().find(e=>e.matches(t))}parent(t){var e;return this.matches(t)?this:this.parentNode==null?null:(e=this.parentNode)==null?void 0:e.parent(t)}handle(t,e){let n=0;for(const r of this.querySelectorAll(t))e(r,n++)}},uo=class extends K8{get nodeType(){return as.ELEMENT_NODE}get nodeName(){return this._nodeName}constructor(t="div",e={}){super(),this._originalTagName=t,this._nodeName=(t||"").toUpperCase(),this._attributes=e||{}}cloneNode(t=!1){const e=super.cloneNode(t);return e._originalTagName=this._originalTagName,e._nodeName=this._nodeName,e._attributes=Object.assign({},this._attributes),e}get attributes(){return Object.entries(this._attributes).map(([t,e])=>({name:t,value:e}))}get attributesObject(){return{...this._attributes}}_findAttributeName(t){const e=t.toLowerCase();return Object.keys(this._attributes).find(n=>e===n.toLowerCase())||null}setAttribute(t,e){this.removeAttribute(t),this._attributes[t]=e,this._styles=void 0,this._dataset=void 0}getAttribute(t){const e=this._findAttributeName(t),n=e?this._attributes[e]:null;return n==null?null:typeof n=="string"?n:""}removeAttribute(t){this._findAttributeName(String(t))&&delete this._attributes[t]}hasAttribute(t){const e=this._findAttributeName(t);return e?this._attributes[e]!=null:!1}get style(){if(this._styles==null){const t={};let e=0;const n=this.getAttribute("style");if(n){let r;const o=/\s*([\w-]+)\s*:\s*((url\(.*?\)[^;]*|[^;]+))/gi;for(;r=o.exec(n);){++e;const s=r[1],a=r[2].trim();t[s]=a,t[q8(s)]=a}}this._styles={get length(){return e},getPropertyValue(r){return t[r]},...Lj[this.tagName.toLowerCase()],...t}}return this._styles}get dataset(){if(this._dataset==null){const t={};for(const[e,n]of Object.entries(this._attributes))e.startsWith("data-")&&(t[e.slice(5)]=n,t[q8(e.slice(5))]=n);this._dataset=t}return this._dataset}get tagName(){return this._nodeName}setTagName(t){this._nodeName=t.toUpperCase()}get id(){return this._attributes.id||null}set id(t){t==null?delete this._attributes.id:this._attributes.id=t}get src(){return this._attributes.src}set src(t){t==null?delete this._attributes.src:this._attributes.src=t}getElementsByTagName(t){t=t.toUpperCase();const e=this.flatten();return t!=="*"?e.filter(n=>n.tagName===t):e}setInnerHTML(t){}get innerHTML(){return this._childNodes.map(t=>t.render(dp)).join("")}set innerHTML(t){this.setInnerHTML(t)}get outerHTML(){return this.render(fp)}get className(){return this._attributes.class||""}set className(t){Array.isArray(t)?t=t.filter(e=>!!e).join(" "):typeof t=="object"&&(t=Object.entries(t).filter(([e,n])=>!!n).map(([e,n])=>e).join(" ")),this._attributes.class=t}get classList(){const t=String(this.className??"").trim().split(/\s+/g)||[];return{contains(e){return t.includes(e)},add:e=>{t.includes(e)||(t.push(e),this.className=t)},remove:e=>{const n=t.indexOf(e);n>=0&&(t.splice(n,1),this.className=t)}}}render(t=fp){return t(this._originalTagName||this.tagName,this._attributes,this._childNodes.map(e=>e.render(t)).join(""))}},G8=class w_ extends as{get nodeName(){return super.nodeName}get nodeValue(){return super.nodeValue}get nodeType(){return w_.DOCUMENT_TYPE_NODE}render(){return"<!DOCTYPE html>"}},Ug=class x_ extends K8{get nodeType(){return as.DOCUMENT_FRAGMENT_NODE}get nodeName(){return"#document-fragment"}render(e=fp){return this._childNodes.map(n=>n.render(e)||[]).join("")}get innerHTML(){return this._childNodes.map(e=>e.render(dp)).join("")}createElement(e,n={}){return new uo(e,n)}createDocumentFragment(){return new x_}createTextNode(e){return new wl(e)}},Wg=class extends Ug{get nodeType(){return as.DOCUMENT_NODE}get nodeName(){return"#document"}get documentElement(){return this.firstChild}render(t=fp){let e=super.render(t);return this.docType&&(e=this.docType.render()+e),e}},X8=class extends Wg{constructor(t=!1){if(super(),this.docType=new G8,!t){const e=new uo("html"),n=new uo("body"),r=new uo("head"),o=new uo("title");e.appendChild(r),r.appendChild(o),e.appendChild(n),this.appendChild(e)}}get body(){let t=this.querySelector("body");if(!t){let e=this.querySelector("html");e||(e=new uo("html"),this.appendChild(e)),t=new uo("body"),e.appendChild(e)}return t}get title(){var t;return((t=this.querySelector("title"))==null?void 0:t.textContent)||""}set title(t){const e=this.querySelector("title");e&&(e.textContent=t)}get head(){let t=this.querySelector("head");if(!t){let e=this.querySelector("html");e||(e=new uo("html"),this.appendChild(e)),t=new uo("head"),e.insertBefore(e)}return t}};function Dj(){return new Wg}function Pj(){return new X8}var Y8=Dj();Mj({document:Y8});var Vj={},Fj=Vj.hasOwnProperty;function J8(t,e){return Fj.call(t,e)}var Z8=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr","command"];function Q8(t,e,n={},r){const o=!(typeof r=="string"&&r===""||Array.isArray(r)&&(r.length===0||r.length===1&&r[0]==="")||r==null),s=[];if(e=e.replace(/__/g,":"),e!=="noop"&&e!==""){e!=="cdata"?s.push(`<${e}`):s.push("<![CDATA[");for(let a in n)if(a&&J8(n,a)){const l=n[a];if(a==="html")continue;a.toLowerCase()==="classname"&&(a="class"),a=a.replace(/__/g,":"),l===!0?s.push(` ${a}`):a==="style"&&typeof l=="object"?s.push(` ${a}="${Object.keys(l).filter(u=>l[u]!=null).map(u=>{let c=l[u];return c=typeof c=="number"?`${c}px`:c,`${u.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${c}`}).join(";")}"`):l!==!1&&l!=null&&s.push(` ${a}="${zg(l.toString())}"`)}if(e!=="cdata"){if(t&&!o)return s.push(" />"),s.join("");s.push(">")}if(!t&&Z8.includes(e))return s.join("")}if(o){if(typeof r=="string")s.push(r);else if(r&&r.length>0){for(let a of r)if(a!=null&&a!==!1){Array.isArray(a)||(a=[a]);for(const l of a)l.startsWith("<")&&l.endsWith(">")||e==="script"||e==="style"?s.push(l):s.push(zg(l.toString()))}}}return n.html&&s.push(n.html),e!=="noop"&&e!==""&&(e!=="cdata"?s.push(`</${e}>`):s.push("]]>")),s.join("")}function dp(t,e,...n){const{tag:r,attrs:o,children:s}=$8(t,e,n);return Q8(!1,r,o,s)}var fp=Q8.bind(null,!1);dp.firstLine="<!DOCTYPE html>",dp.html=!0;var $j=/([^=\s]+)(\s*=\s*(("([^"]*)")|('([^']*)')|[^>\s]+))?/g,zj=/^<\/([^>\s]+)[^>]*>/m,Hj=/^<([^>\s/]+)((\s+[^=>\s]+(\s*=\s*(("[^"]*")|('[^']*')|[^>\s]+))?)*)\s*(?:\/\s*)?>/m,Uj=/\s*\/\s*>\s*$/m,Wj=class{constructor(t={}){this.attrRe=$j,this.endTagRe=zj,this.startTagRe=Hj,this.defaults={ignoreWhitespaceText:!1},t.scanner&&(this.scanner=t.scanner),this.options=Object.assign({},this.defaults,t)}parse(t){let e=!1,n,r,o;for(;t.length;){if(t.substring(0,4)==="<!--")n=t.indexOf("-->"),n!==-1?(this.scanner.comment(t.substring(4,n)),t=t.substring(n+3),e=!1):e=!0;else if(t.substring(0,2)==="</")r=this.endTagRe.exec(t),r?(t=RegExp.rightContext,e=!1,this.parseEndTag(RegExp.lastMatch,r[1])):e=!0;else if(t.charAt(0)==="<")if(r=this.startTagRe.exec(t),r){t=RegExp.rightContext,e=!1;const s=this.parseStartTag(RegExp.lastMatch,r[1],r);(s==="script"||s==="style")&&(n=t.search(new RegExp(`</${s}`,"i")),n!==-1?(this.scanner.characters(t.substring(0,n)),t=t.substring(n),e=!1):e=!0)}else e=!0;if(e){n=t.indexOf("<");let s=n;n===0&&(n=t.substring(1).indexOf("<"),s=s+1),n===-1?(o=t,t=""):(o=t.substring(0,s),t=t.substring(s)),(!this.options.ignoreWhitespaceText||!/^\s*$/.test(o))&&this.scanner.characters(o)}e=!0,r=null}}parseStartTag(t,e,n){const r=Uj.test(t);let o=n[2];r&&(o=o.replace(/\s*\/\s*$/,""));const s=this.parseAttributes(e,o);return this.scanner.startElement(e,s,r,n[0]),e.toLocaleLowerCase()}parseEndTag(t,e){this.scanner.endElement(e)}parseAttributes(t,e){const n={};return e.replace(this.attrRe,(...r)=>{const[o,s,a,l,u,c,f,p]=r;n[s]=p??c??l??!0}),n}};function jj(t){if(typeof t!="string")throw console.error("parseHTML requires string, found",t),new Error("parseHTML requires string");const e=t.indexOf("<!")===0?new X8(!0):new Ug,n=[e];return new Wj({scanner:{startElement(o,s,a){if(o.toLowerCase()==="!doctype"){e.docType=new G8;return}for(const c in s)if(J8(s,c)){const f=s[c];typeof f=="string"&&(s[c]=F8(f))}const u=n[n.length-1];if(u){const c=Y8.createElement(o,s);u.appendChild(c),Z8.includes(o.toLowerCase())||a||n.push(c)}},endElement(o){n.pop()},characters(o){var a;o=F8(o);const s=n[n.length-1];((a=s==null?void 0:s.lastChild)==null?void 0:a.nodeType)===as.TEXT_NODE?s.lastChild._text+=o:s&&s.appendChild(new wl(o))},comment(o){}}}).parse(t),e}uo.prototype.setInnerHTML=function(t){const e=jj(t);this._childNodes=e._childNodes,this._fixChildNodesParent()};function qj(t,e,n){return vo.fromSchema(e).serializeFragment(t.content,{document:Pj()}).render()}function Kj(t,e){const n=Jr.fromJSON(e,t);return qj(n,e)}function Gj(t,e){const n=document.getElementById(t.attrs.id)??jg.getElementById(t.attrs.id);if(!n)return null;const r=N8(n),{lastChild:o}=t,{childCount:s}=t,a=t.content.content.slice(0,s);if(!o)return!1;o.isText&&a.push(e.text("gg"));const l=Kj(Xj(t.type.create(t.attrs,a,t.marks)),e);return Jj(l,t.attrs.id,!1)>r}function Xj(t){return{type:"doc",content:[t.toJSON()]}}let Yj=null,jg=null;const qg=new Map;function Jj(t,e,n=!0){if(n&&qg.has(t))return qg.get(t);const r=jg.getElementById("computeddiv");if(r){r.innerHTML=`<p> </p>${t}`;const o=jg.getElementById(e),{height:s}=N8(o);return r.innerHTML=" ",n&&qg.set(t,s),s}return 0}function N8(t){const e=window.getComputedStyle(t)||Yj.contentWindow.getComputedStyle(t),n=e.getPropertyValue("margin-top"),r=e.getPropertyValue("margin-bottom"),o=parseFloat(n)+parseFloat(r),{height:s}=t.getBoundingClientRect();return{margin:o,height:o+t.offsetHeight+parseFloat(e.borderWidth)}}function Kg(){return Qi(10)}const pp="paragraph",Hr="page",eE="Extend",xl="Node",Zj=xl+eE,Qj="CC",Gg="heading",hp="bulletList",Xg="listItem",tE="taskList",Nj="taskItem",mp="orderedList",na="table",Yg="tableHeader",Jg="tableRow",eq="tableCell",Zg="column",Cl="columns",Qg="textBox",ra="image",oa="imageUpload",tq="iframe",nq="file",Ng="codeBlock",eb="blockquote",rq="audio",oq="toc",nE="video",iq="horizontalrule",tb="pagination",sq=[na,mp,hp,tE],aq=[nE,ra],gp="link",lq="placeholder",uq="focus",cq="text",dq="text-bubble",fq="gapCursor",pq="dropCursor",hq="characterCount",mq="hardBreak",gq="textStyle",bq="selection",rE="superText",nb="configPlan",vq="fontSize",yq="fontFamily",wq="bold",xq="italic",Cq="underline",Eq="strike",kq="color",Sq="highlight",_q="moreMark",Tq="textAlign",Aq="indent",Oq="lineHeight",Mq="painter",Bq="clear",bp="spellchecker",oE="fontSizeIncreaseDecrease",Iq=Object.freeze(Object.defineProperty({__proto__:null,AUDIO:rq,BLOCKQUOTE:eb,BOLD:wq,BULLETLIST:hp,CASSIE_BLOCK:xl,CASSIE_BLOCK_EXTEND:Zj,CC:Qj,CHARACTER_COUNT:hq,CLEAR:Bq,CODE_BLOCK:Ng,COLOR:kq,COLUMN:Zg,COLUMNS:Cl,CONFIG_PLAN:nb,DROP_CURSOR:pq,EXTEND:eE,FILE:nq,FOCUS:uq,FONTSIZEINCREASEDECREASE:oE,FONT_FAMILY:yq,FONT_SIZE:vq,GAP_CURSOR:fq,HARD_BREAK:mq,HEADING:Gg,HIGHLIGHT:Sq,HORIZONTALRULE:iq,IFRAME:tq,IMAGE:ra,IMAGE_UPLOAD:oa,INDENT:Aq,ITALIC:xq,LINE_HEIGHT:Oq,LINK:gp,LISTITEM:Xg,LIST_MEDIA:aq,LIST_TYPE:sq,MORE_MARK:_q,ORDEREDLIST:mp,PAGE:Hr,PAGEBREAK:tb,PAINTER:Mq,PARAGRAPH:pp,PLACEHOLDER:lq,SELECTION:bq,SPELLCHECKER:bp,STRIKE:Eq,SUPER_TEXT:rE,TABLE:na,TABLEHEADER:Yg,TABLE_CELL:eq,TABLE_ROW:Jg,TASKITEM:Nj,TASKLIST:tE,TEXT:cq,TEXT_ALIGN:Tq,TEXT_BOX:Qg,TEXT_BUBBLE:dq,TEXT_STYLE:gq,TOC:oq,UNDERLINE:Cq,VIDEO:nE},Symbol.toStringTag,{value:"Module"})),vp=i.defineComponent({__name:"ContextMenu",props:{dir:{},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const o=Dt(t,e);return(s,a)=>(i.openBlock(),i.createBlock(i.unref(OL),i.normalizeProps(i.guardReactiveProps(i.unref(o))),{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default")]),_:3},16))}}),yp=i.defineComponent({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{type:Boolean},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,o=i.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(o,r);return(a,l)=>(i.openBlock(),i.createBlock(i.unref(BL),null,{default:i.withCtx(()=>[i.createVNode(i.unref(IL),i.mergeProps(i.unref(s),{class:i.unref(Ae)("z-50 min-w-32 overflow-hidden rounded-md border bg-ed-popover p-1 text-ed-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:i.withCtx(()=>[i.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),wp=i.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},emits:["select"],setup(t,{emit:e}){const n=t,r=e,o=i.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(o,r);return(a,l)=>(i.openBlock(),i.createBlock(i.unref(RL),i.mergeProps(i.unref(s),{class:i.unref(Ae)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-ed-accent focus:text-ed-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n.inset&&"pl-8",n.class)}),{default:i.withCtx(()=>[i.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),xp=i.defineComponent({__name:"ContextMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const n=Xn(t);return(r,o)=>(i.openBlock(),i.createBlock(i.unref(ML),i.normalizeProps(i.guardReactiveProps(i.unref(n))),{default:i.withCtx(()=>[i.renderSlot(r.$slots,"default")]),_:3},16))}}),Cp=i.defineComponent({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const o=Dt(t,e);return(s,a)=>(i.openBlock(),i.createBlock(i.unref(yR),i.normalizeProps(i.guardReactiveProps(i.unref(o))),{default:i.withCtx(()=>[i.renderSlot(s.$slots,"default")]),_:3},16))}}),Ep=i.defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{},isOverlayTransparent:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,o=i.computed(()=>{const{isOverlayTransparent:a,class:l,...u}=n;return u}),s=Dt(o,r);return(a,l)=>(i.openBlock(),i.createBlock(i.unref(W0),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Y0),{class:i.normalizeClass(i.unref(Ae)("fixed inset-0 z-[60] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a.isOverlayTransparent&&"bg-transparent"))},null,8,["class"]),i.createVNode(i.unref(UR),i.mergeProps(i.unref(s),{class:i.unref(Ae)("fixed left-1/2 top-1/2 z-[60] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-ed-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n.class)}),{default:i.withCtx(()=>[i.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),rb=i.defineComponent({__name:"DialogFooter",props:{class:{}},setup(t){const e=t;return(n,r)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(Ae)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",e.class))},[i.renderSlot(n.$slots,"default")],2))}}),kp=i.defineComponent({__name:"DialogHeader",props:{class:{}},setup(t){const e=t;return(n,r)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(Ae)("flex flex-col gap-y-1.5 text-center sm:text-left",e.class))},[i.renderSlot(n.$slots,"default")],2))}}),Sp=i.defineComponent({__name:"DialogClose",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(i.openBlock(),i.createBlock(i.unref(jR),i.normalizeProps(i.guardReactiveProps(e)),{default:i.withCtx(()=>[i.renderSlot(n.$slots,"default")]),_:3},16))}}),_p=i.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=i.computed(()=>{const{class:o,...s}=e;return s}),r=Xn(n);return(o,s)=>(i.openBlock(),i.createBlock(i.unref(qR),i.mergeProps(i.unref(r),{class:i.unref(Ae)("text-lg font-semibold leading-none tracking-tight",e.class)}),{default:i.withCtx(()=>[i.renderSlot(o.$slots,"default")]),_:3},16,["class"]))}}),Rq={class:"m-2.5 p-2.5 space-y-2.5"},Lq=i.defineComponent({__name:"SuperInputDialogAlert",props:{open:{type:Boolean}},emits:["close"],setup(t,{emit:e}){const n=e,{t:r}=St(),o=vn(),s=t,a=i.computed(()=>r(o.textAlert.value||"editor.alert")),l=i.reactive({x:0,y:0}),u=i.ref(!1),c={x:0,y:0},f=()=>{n("close")},p=b=>{u.value=!0,c.x=b.clientX-l.x,c.y=b.clientY-l.y,document.addEventListener("mousemove",m),document.addEventListener("mouseup",g)},m=b=>{u.value&&(l.x=b.clientX-c.x,l.y=b.clientY-c.y)},g=()=>{u.value=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)};return i.watch(()=>s.open,async b=>{if(b){await i.nextTick();const y=document.querySelector(".draggable-dialog");if(y){const{width:w,height:x}=y.getBoundingClientRect(),S=window.innerWidth,E=window.innerHeight;l.x=(S-w)/2+250,l.y=(E-x)/2-50}}},{immediate:!0}),i.onUnmounted(()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)}),(b,y)=>{const w=_p,x=Sp,S=kp,E=rb,C=Ep,T=Cp;return i.openBlock(),i.createBlock(T,{open:b.open},{default:i.withCtx(()=>[i.createVNode(i.unref(W0),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Y0),{class:"!pointer-events-none bg-black/30"}),i.createVNode(C,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none","as-child":""},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"draggable-dialog fixed z-[70] pointer-events-auto",style:i.normalizeStyle({transform:`translate(${i.unref(l).x}px, ${i.unref(l).y}px)`,top:"0px",left:"0px"})},[i.createVNode(S,{class:"bg-blue-500 text-white p-2.5 rounded-t-[5px] cursor-move",onMousedown:i.withModifiers(p,["prevent"])},{default:i.withCtx(()=>[i.createVNode(w,null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)("editor.alertConfirm")),1)]),_:1}),i.createVNode(x,{class:"absolute right-3 top-3 text-white",onClick:f},{default:i.withCtx(()=>[i.createVNode(i.unref(Mf),{class:"w-5 h-5"}),y[0]||(y[0]=i.createElementVNode("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:1}),i.createElementVNode("div",Rq,i.toDisplayString(i.unref(a)),1),i.createVNode(E,{class:"sm:justify-center pb-3.5 pt-1"},{default:i.withCtx(()=>[i.createVNode(_n,{as:"button",variant:"default",class:"bg-blue-500 hover:bg-blue-500/90",onClick:f},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)("editor.alertYes")),1)]),_:1})]),_:1})],4)]),_:1})]),_:1})]),_:1},8,["open"])}}});function Dq(t,e){return i.openBlock(),i.createElementBlock("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[i.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:"currentColor"})])}const Pq=i.defineComponent({__name:"Checkbox",props:{defaultChecked:{type:Boolean},checked:{type:[Boolean,String]},disabled:{type:Boolean},required:{type:Boolean},name:{},value:{},id:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,o=i.computed(()=>{const{class:a,...l}=n;return l}),s=Dt(o,r);return(a,l)=>(i.openBlock(),i.createBlock(i.unref(JR),i.mergeProps(i.unref(s),{class:i.unref(Ae)("peer h-4 w-4 shrink-0 rounded-sm border border-ed-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ed-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-ed-primary data-[state=checked]:text-ed-primary-foreground",n.class)}),{default:i.withCtx(()=>[i.createVNode(i.unref(ZR),{class:"flex h-full w-full items-center justify-center text-current"},{default:i.withCtx(()=>[i.renderSlot(a.$slots,"default",{},()=>[i.createVNode(i.unref(Dq),{class:"h-4 w-4"})])]),_:3})]),_:3},16,["class"]))}}),iE=i.defineComponent({__name:"SimpleEditor",props:{modelValue:{default:""},parentEditor:{},isReadOnly:{type:Boolean}},emits:["update:modelValue"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=i.inject("isMobile",!1),a=[I8,M8,B8],l=i.ref(!0),u=i.computed(()=>{var g;return(g=r.parentEditor)==null?void 0:g.extensionManager.extensions.find(b=>b.name==="spellchecker")}),c=i.computed(()=>{var g,b,y,w,x,S,E;return YE.configure({proofreader:new I5({api:(b=(g=u.value)==null?void 0:g.options.proofreader)==null?void 0:b.api,limit:(w=(y=u.value)==null?void 0:y.options.proofreader)==null?void 0:w.limit,transfer:(S=(x=u.value)==null?void 0:x.options.proofreader)==null?void 0:S.transfer,enabled:l.value}),uiStrings:(E=u.value)==null?void 0:E.options.uiStrings})}),f=new No({enablePasteRules:!1,enableInputRules:!1,content:r.modelValue,extensions:a.concat(c.value),editable:!r.isReadOnly,autofocus:!0,onUpdate:({editor:g})=>{o("update:modelValue",g.getHTML())}});i.watch(()=>r.isReadOnly,g=>{f.setEditable(!g)});function p(g){const{view:b}=f,{from:y}=b.state.selection;f.commands.insertContentAt(y,g),f.commands.focus()}function m(){var g;f.commands.handleActiveSpellCheck(!1),l.value=!l.value,(g=f==null?void 0:f.commands)!=null&&g.setIsEnableSuggestion&&f.commands.setIsEnableSuggestion(!1)}return e({insertSpecialCharater:p,isChecked:l,toggleSpellCheck:m}),(g,b)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(Ae)("h-40 overflow-y-auto",i.unref(s)&&"h-20 rounded-[5px]"))},[i.createVNode(i.unref(ko),{id:"editor-panel",editor:i.unref(f),class:i.normalizeClass(i.unref(Ae)(" vdc-editor break-all [&_.tiptap.ProseMirror-focused]:border-ed-input-focus [&_.tiptap]:min-h-40 [&_.tiptap]:border-[inherit] relative",i.unref(s)&&"[&_.tiptap]:border-ed-gray [&_.tiptap]:min-h-20",g.isReadOnly&&"[&_.tiptap]:border-none"))},null,8,["editor","class"])],2))}}),Vq={class:"m-2.5 p-2.5 space-y-2.5 rounded border border-gray-200"},Fq={class:"flex gap-x-2"},$q={class:"flex gap-x-7 flex-1"},zq={class:"flex items-center space-x-2 text-xs font-normal"},Hq={for:"spellcheck",class:"select-none whitespace-nowrap"},Uq={class:"flex gap-x-1"},Wq={class:"flex gap-x-2"},jq={class:"w-1/6 text-right text-sm p-2"},qq={class:"flex gap-x-2"},ac=i.defineComponent({__name:"SuperInputDialog",props:{editor:{},open:{type:Boolean},superTextInit:{},superTextElementId:{}},emits:["close","save"],setup(t,{emit:e}){var W,J;const n=e,r=t,{t:o}=St(),s=i.ref(""),a=i.ref(""),l=i.ref(null),u=i.ref(!1),c=i.reactive({x:0,y:0}),f=i.ref(!1),p={x:0,y:0},m=i.ref(!1),g=i.ref(!1),b=ue=>{f.value=!0,p.x=ue.clientX-c.x,p.y=ue.clientY-c.y,document.addEventListener("mousemove",y),document.addEventListener("mouseup",w)},y=ue=>{f.value&&(c.x=ue.clientX-p.x,c.y=ue.clientY-p.y)},w=()=>{f.value=!1,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",w)};i.watch(()=>r.open,async ue=>{if(ue){g.value=!1,r.superTextInit&&(s.value=r.superTextInit,r.superTextElementId&&(a.value=r.superTextElementId)),await i.nextTick();const X=document.querySelector(".draggable-dialog");if(X){const{width:H,height:F}=X.getBoundingClientRect(),R=window.innerWidth,G=window.innerHeight;c.x=(R-H)/2,c.y=(G-F)/2}}},{immediate:!0});const x=()=>{n("close"),s.value="",a.value="",u.value=!1},S=()=>{g.value?(m.value=!0,a.value=""):n("close"),n("save",s.value),s.value=""},E=()=>{m.value=!1,n("close")},C=(J=(W=r.editor)==null?void 0:W.extensionManager.extensions.find(ue=>ue.name==="superText"))==null?void 0:J.options.specialCharModal,T=et.useLocalStorage("recentSpecialChars",[]),_=ue=>{if(!ue)return;const X=(T.value??[]).filter(H=>H!==ue);X.unshift(ue),T.value=X.slice(0,5)},A=ue=>{var X;(X=l.value)==null||X.insertSpecialCharater(ue)},D=(ue,X)=>{var H;X&&((H=l.value)==null||H.insertSpecialCharater(ue),_(ue))},L=i.computed(()=>{var ue;return(ue=l.value)==null?void 0:ue.isChecked}),B=()=>{var ue;(ue=l.value)==null||ue.toggleSpellCheck()};return i.onUnmounted(()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",w)}),i.watch(s,ue=>{!r.superTextElementId||r.superTextElementId===""||(g.value=ue!==(r.superTextInit??""))}),(ue,X)=>{const H=_p,F=Sp,R=kp,G=rb,N=Ep,oe=Cp,ne=Lq;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(oe,{open:ue.open},{default:i.withCtx(()=>[i.createVNode(i.unref(W0),null,{default:i.withCtx(()=>[i.createVNode(i.unref(Y0),{class:"!pointer-events-none bg-black/30"}),i.createVNode(N,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none","as-child":""},{default:i.withCtx(()=>{var xe,Ee,ze;return[i.createElementVNode("div",{class:"draggable-dialog fixed z-[70] pointer-events-auto",style:i.normalizeStyle({transform:`translate(${c.x}px, ${c.y}px)`,top:"0px",left:"0px"})},[i.createVNode(R,{class:"bg-blue-500 text-white p-2.5 rounded-t-[5px] cursor-move",onMousedown:i.withModifiers(b,["prevent"])},{default:i.withCtx(()=>[i.createVNode(H,null,{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.superinput")),1)]),_:1}),i.createVNode(F,{class:"absolute right-3 top-3 text-white",onClick:x},{default:i.withCtx(()=>[i.createVNode(i.unref(Mf),{class:"w-5 h-5"}),X[4]||(X[4]=i.createElementVNode("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:1}),i.createElementVNode("div",Vq,[i.createElementVNode("div",Fq,[X[5]||(X[5]=i.createElementVNode("label",{class:"w-1/6"}," ",-1)),i.createElementVNode("div",$q,[i.createVNode(_n,{class:"text-[#65558F] bg-[#ECE6F0] hover:bg-[#ECE6F0]/90 shadow text-xs rounded font-normal h-[25px] px-3",onClick:X[0]||(X[0]=ke=>u.value=!0)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("editor.insert.symbol")),1)]),_:1}),i.createElementVNode("div",zq,[i.createVNode(Pq,{id:"spellcheck",checked:i.unref(L),class:"border-gray-300","onUpdate:checked":B},null,8,["checked"]),i.createElementVNode("label",Hq,i.toDisplayString(i.unref(o)("editor.menubar.menu.spellCheck")),1)]),i.createElementVNode("div",Uq,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(T),ke=>(i.openBlock(),i.createBlock(_n,{key:ke,variant:"outline",size:"xs",class:"h-[25px] w-[25px] p-0",onClick:me=>A(ke)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(ke),1)]),_:2},1032,["onClick"]))),128))])]),u.value?(i.openBlock(),i.createBlock(i.resolveDynamicComponent((xe=i.unref(C))==null?void 0:xe.component),{key:0,"custom-class":"!z-[70] !pointer-events-auto",class:i.normalizeClass((ze=(Ee=i.unref(C))==null?void 0:Ee.componentProps)==null?void 0:ze.class),onSelectedChar:D,onClose:X[1]||(X[1]=ke=>u.value=!1)},null,40,["class"])):i.createCommentVNode("",!0)]),i.createElementVNode("div",Wq,[i.createElementVNode("label",jq,i.toDisplayString(i.unref(o)("editor.detail")),1),i.createVNode(iE,{ref_key:"simpleEditorRef",ref:l,modelValue:s.value,"onUpdate:modelValue":X[2]||(X[2]=ke=>s.value=ke),"parent-editor":ue.editor,class:"flex-1"},null,8,["modelValue","parent-editor"])]),i.createElementVNode("div",qq,[X[6]||(X[6]=i.createElementVNode("label",{class:"w-1/6 text-right text-sm p-2"},"ID",-1)),i.createVNode(ul,{modelValue:a.value,"onUpdate:modelValue":X[3]||(X[3]=ke=>a.value=ke),class:"flex-1 rounded-none","default-value":a.value,disabled:""},null,8,["modelValue","default-value"])])]),i.createVNode(G,{class:"sm:justify-center pb-3.5 pt-1"},{default:i.withCtx(()=>[i.createVNode(_n,{as:"button",variant:"default",class:"bg-blue-500 hover:bg-blue-500/90",onClick:S},{default:i.withCtx(()=>[i.createVNode(i.unref(ng),{class:"w-5 h-5 mr-2"}),i.createTextVNode(" "+i.toDisplayString(i.unref(o)("editor.check")),1)]),_:1}),i.createVNode(_n,{as:"button",variant:"destructive",onClick:x},{default:i.withCtx(()=>[i.createVNode(i.unref(Mf),{class:"w-5 h-5 mr-2"}),X[7]||(X[7]=i.createTextVNode(" Close "))]),_:1})]),_:1})],4)]}),_:1})]),_:1})]),_:1},8,["open"]),i.createVNode(ne,{open:m.value,onClose:E},null,8,["open"])],64)}}}),ob=i.defineComponent({__name:"SelectContextMenu",props:{editor:{},mode:{},superTextStore:{},disabled:{type:Boolean},disableSuperInput:{type:Boolean}},setup(t,{expose:e}){const n=t,{t:r}=St(),o=i.ref(!1),s=i.reactive({from:0,to:0,text:""}),a=i.ref(!0);let l=0;const u=i.inject("isEditable",i.ref(!0)),c=i.inject("canEditSuper",i.ref(!0)),f=i.computed(()=>n.mode===Fe.EDITOR||n.mode===Fe.PLAIN_TEXT||!c.value||n.disableSuperInput);function p(){if(!n.editor)return"";const{from:E,to:C}=n.editor.state.selection,T=n.editor.state.doc.cut(E,C),A=vo.fromSchema(n.editor.schema).serializeFragment(T.content),D=document.createElement("div");return D.appendChild(A),D.innerHTML}const m=()=>{const{view:E}=n.editor,{from:C,to:T}=E.state.selection,_=p();s.text=_,s.from=C,s.to=T},g=()=>o.value=!o.value,b=()=>{f.value||(o.value=!0,m())},y=()=>o.value=!1,w=E=>{const C=n==null?void 0:n.superTextStore.addMoreSuperText(E);n.editor&&n.editor.commands.insertContentAt(s.from,{type:"superText",attrs:{"data-id":C,"data-text":E}}),o.value=!1,requestAnimationFrame(()=>{var _,A;const T=(_=n.editor)==null?void 0:_.view.dom.parentElement;T&&((A=n.editor)==null||A.view.focus(),T.scrollTop=l)})},x=async E=>{if(E)try{const C=await navigator.clipboard.readText();a.value=!C.trim()}catch{a.value=!0}},S=()=>{var A,D;if(f.value||!n.editor)return;const{view:E,state:C}=n.editor,{from:T,to:_}=C.selection;s.from=T,s.to=_,s.text="",l=((D=(A=n.editor)==null?void 0:A.view.dom.parentElement)==null?void 0:D.scrollTop)||0,E.dom.blur(),o.value=!0};return e({toggleDialog:g,openDialog:b,closeDialog:y}),(E,C)=>{const T=ac,_=xp,A=wp,D=yp,L=vp;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(T,{open:o.value,editor:E.editor,"super-text-init":s.text,onClose:g,onSave:w},null,8,["open","editor","super-text-init"]),i.createVNode(L,{"onUpdate:open":x},{default:i.withCtx(()=>[i.createVNode(_,{as:"template",class:"relative",disabled:i.unref(f),onDblclick:i.withModifiers(S,["prevent","stop"])},{default:i.withCtx(()=>[i.renderSlot(E.$slots,"default")]),_:3},8,["disabled"]),i.createVNode(D,null,{default:i.withCtx(()=>[E.disableSuperInput?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(A,{key:0,onSelect:b},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)("editor.inputSuper")),1)]),_:1})),i.unref(u)?(i.openBlock(),i.createBlock(A,{key:1,onSelect:C[0]||(C[0]=B=>{var W;return(W=E.editor)==null?void 0:W.commands.cutContent()})},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)("editor.cut")),1)]),_:1})):i.createCommentVNode("",!0),i.unref(u)?(i.openBlock(),i.createBlock(A,{key:2,onSelect:C[1]||(C[1]=B=>{var W;return(W=E.editor)==null?void 0:W.commands.copyContent()})},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)("editor.copy")),1)]),_:1})):i.createCommentVNode("",!0),i.unref(u)?(i.openBlock(),i.createBlock(A,{key:3,disabled:a.value,onSelect:C[2]||(C[2]=B=>{var W;return(W=E.editor)==null?void 0:W.commands.pasteContent()})},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(r)("editor.paste")),1)]),_:1},8,["disabled"])):i.createCommentVNode("",!0)]),_:1})]),_:3})],64)}}});var Fn=(t=>(t.TOGGLE_SUPER_TEXT="toggle-super-text",t.SUPER_TEXT_UPDATE_POSITION="SUPER_TEXT_UPDATE_POSITION",t.RENDER_SUPER_TEXT="RENDER_SUPER_TEXT",t.SUPER_VIEW_PAGE="SUPER_VIEW_PAGE",t.INCREASE_DECREASE_FONTSIZE="increase-decrease-fontsize",t))(Fn||{});const Kq={id:"editor-panel",class:"flex relative w-full h-full"},Gq=eo(i.defineComponent({__name:"PageNode",props:Ps,setup(t){const{state:e,page:n,superTextStore:r}=vn(),{size:o,pagination:s,margin:a}=n.value,l=i.ref(null),u=i.ref(t.node.attrs.viewSuperTextArea),c=i.computed(()=>u.value&&t.editor.storage.page.mode!=="editor"),f=i.computed(()=>t.editor.storage.page.mode===Fe.REPORT),{width:p,height:m}=o,g=i.computed(()=>s?`calc(${m} - ${(a==null?void 0:a.top)??0} - ${(a==null?void 0:a.bottom)??0}`:"max-content"),b=et.useEventBus(Fn.SUPER_VIEW_PAGE);return i.watch(()=>t.node.attrs,y=>{b.emit(y.pageNumber)},{immediate:!0}),(y,w)=>{var S,E,C,T;const x=ob;return i.openBlock(),i.createBlock(i.unref(Ds),{id:y.node.attrs.id,ref_key:"containerRef",ref:l,"page-number":y.node.attrs.pageNumber,class:"overflow-hidden umo-page-node-view w-full border rounded-[3px] border-[#999999]",style:i.normalizeStyle({"--umo-page-margin-top":((S=i.unref(a))==null?void 0:S.top)??"0","--umo-page-margin-bottom":((E=i.unref(a))==null?void 0:E.bottom)??"0","--umo-page-margin-left":((C=i.unref(a))==null?void 0:C.left)??"0","--umo-page-margin-right":((T=i.unref(a))==null?void 0:T.right)??"0","--umo-page-width":i.unref(p),"--umo-page-height":i.unref(m),"--empty-node-left":"0px",left:100,"min-height":typeof i.unref(m)=="number"?`${i.unref(m)}px`:i.unref(m),height:f.value?typeof i.unref(m)=="number"?`${i.unref(m)}px`:i.unref(m):"auto"})},{default:i.withCtx(()=>[i.createElementVNode("div",Kq,[i.createVNode(x,{mode:c.value?i.unref(Fe).REPORT:i.unref(Fe).EDITOR,editor:y.editor,"super-text-store":i.unref(r)},{default:i.withCtx(()=>[i.createVNode(i.unref(ew),{class:"umo-page-node-content",style:i.normalizeStyle({height:g.value})},null,8,["style"])]),_:1},8,["mode","editor","super-text-store"])])]),_:1},8,["id","page-number","style"])}}}),[["__scopeId","data-v-b5bf1538"]]);function sE(t,e){const n=t.storedMarks??(t.selection.$to.parentOffset&&t.selection.$from.marks());if(n){const r=n.filter(o=>e==null?void 0:e.includes(o.type.name));t.tr.ensureMarks(r)}}const Xq=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:s,doc:a}=e,{$from:l,$to:u}=s,c=o.extensionManager.attributes,f=Tp(c,l.node().type.name,l.node().attrs);if(f.id=Kg(),f.extend&&(f.extend=!1),s instanceof De&&s.node.isBlock)return!l.parentOffset||!pr(a,l.pos)?!1:(r&&(t&&sE(n,o.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(r){const p=u.parentOffset===u.parent.content.size;s instanceof Be&&e.deleteSelection();const m=l.depth===0?void 0:e4(l.node(-1).contentMatchAt(l.indexAfter(-1)));let g=p&&m?[{type:m,attrs:f}]:void 0,b=pr(e.doc,e.mapping.map(l.pos),1,g);if(!g&&!b&&pr(e.doc,e.mapping.map(l.pos),1,m?[{type:m}]:void 0)&&(b=!0,g=m?[{type:m,attrs:f}]:void 0),b&&(g||(g=[{type:l.node().type,attrs:f}]),e.split(e.mapping.map(l.pos),1,g),m&&!p&&!l.parentOffset&&l.parent.type!==m)){const y=e.mapping.map(l.before()),w=e.doc.resolve(y);l.node(-1).canReplaceWith(w.index(),w.index()+1,m)&&e.setNodeMarkup(e.mapping.map(l.before()),m)}t&&sE(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return!0},Yq=t=>({tr:e,state:n,dispatch:r,editor:o})=>{var y;const s=pn(t,n.schema),{$from:a,$to:l}=n.selection,u=n.selection instanceof De?n.selection.node:null;if(u!=null&&u.isBlock||a.depth<2||!a.sameParent(l))return!1;const c=a.node(-1);if(c.type!==s)return!1;const f=o.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let w=ce.empty;const x=a.index(-1)?1:a.index(-2)?2:3;for(let A=a.depth-x;A>=a.depth-3;A-=1)w=ce.from(a.node(A).copy(w));const S=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,E=Tp(f,a.node().type.name,a.node().attrs),C=((y=s.contentMatch.defaultType)==null?void 0:y.createAndFill(E))??void 0;w=w.append(ce.from(s.createAndFill(null,C)??void 0));const T=a.before(a.depth-(x-1));e.replace(T,a.after(-S),new Ce(w,4-x,0));let _=-1;e.doc.nodesBetween(T,e.doc.content.size,(A,D)=>{if(_>-1)return!1;A.isTextblock&&A.content.size===0&&(_=D+1)}),_>-1&&e.setSelection(Be.near(e.doc.resolve(_))),e.scrollIntoView()}return!0}const p=l.pos===a.end()?c.contentMatchAt(0).defaultType:null,m=Tp(f,c.type.name,c.attrs),g=Tp(f,a.node().type.name,a.node().attrs);m.id=Kg(),g.id=Kg(),e.delete(a.pos,l.pos);const b=p?[{type:s,attrs:m},{type:p,attrs:g}]:[{type:s,attrs:m}];if(!pr(e.doc,a.pos,2))return!1;if(r){const{selection:w,storedMarks:x}=n,{splittableMarks:S}=o.extensionManager,E=x??(w.$to.parentOffset&&w.$from.marks());if(e.split(a.pos,2,b).scrollIntoView(),!E||!r)return!0;const C=E.filter(T=>S.includes(T.type.name));e.ensureMarks(C)}return!0},Jq=[Gg,pp,hp,Xg,mp,na,Jg,xl,Qg,eb,Zg,Cl,ra,oa,Ng,tb,Yg,Hr],Zq=Bt.create({priority:200,name:`${Hr}`,content:"block*",group:`${Hr}`,isolating:!0,selectable:!1,draggable:!1,isLeaf:!0,addOptions(){return{SystemAttributes:{},nodesComputed:{},View:Vs(Gq),types:[],slots:{}}},addAttributes(){return{HTMLAttributes:{},id:{default:Qi(10)},pageNumber:{default:1},force:{default:!1},viewSuperTextArea:{default:!0},slots:{default:this.options.slots,renderHTML:()=>({})}}},parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){return["div",{...bt(e),"data-type":this.name},0]},addCommands(){return{splitBlock:Xq,splitListItem:Yq,autoPaging:(t=!0)=>({tr:e,state:n,dispatch:r,editor:o})=>(r&&e.setMeta("runState",t),!0),setPageBreak:()=>({tr:t,state:e,dispatch:n,editor:r})=>(n&&t.setMeta("splitPage",!0),!0),togglePagePlugin:t=>({tr:e,dispatch:n})=>(e.setMeta("disablePage",t),n&&n(e),!0)}},addGlobalAttributes(){return[{types:Jq.concat(this.options.types||[]),attributes:{id:{default:null},extend:{default:!1}}}]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.first(({commands:r})=>[()=>r.undoInputRule(),()=>r.command(({tr:o})=>{const{selection:s,doc:a}=o,{empty:l,$anchor:u}=s,{pos:c,parent:f}=u,p=Ve.atStart(a).from===c;return!l||!p||!f.type.isTextblock||f.textContent.length?!1:r.clearNodes()}),()=>aE(r),()=>r.joinBackward(),()=>r.selectNodeBackward(),()=>r.command(({editor:o,tr:s})=>{const{selection:a,doc:l}=s,{$anchor:u}=a,{pos:c}=u;if(l.childCount===1)return!1;if(Ve.atEnd(l).from===c&&!u.parentOffset)return r.deleteNode(Hr);const f=Jo(p=>p.type.name===Hr)(a);if(f){if(!f.node.firstChild)return r.deleteNode(Hr);const p=f.node.firstChild.type;if(f.start+Ve.atStart(f.node).from===c){const g=Be.create(l,f.start-2,f.start-2),b=Jo(y=>y.type.name===Hr)(g);if(b){const y=Ve.atEnd(b.node).from+b.start,w=Be.create(l,y,y);if(p===b.node.lastChild.type){const{parent:x}=w.$anchor;return Gj(x,o.schema)?s.setSelection(w):s.step(new fn(y,c,Ce.empty)),!0}s.setSelection(w)}return!0}}return!1})]),Delete:()=>this.editor.commands.first(({commands:r})=>[()=>aE(r),()=>r.command(({tr:o})=>{const{selection:s,doc:a}=o,{$anchor:l}=s,u=l.node(),c=Jo(f=>f.type.name===xl)(s);return c&&c.start+Ve.atStart(c.node).from===l.pos&&c.node.childCount===1&&u.content.size===0?!0:r.joinForward()}),()=>r.selectNodeForward(),()=>r.command(({tr:o})=>{const{selection:s,doc:a}=o,{$anchor:l}=s,{pos:u}=l;if(a.childCount===1)return!1;if(Ve.atEnd(a).from===u)return r.deleteNode(Hr);const c=Jo(f=>f.type.name===Hr)(s);if(c&&c.start+Ve.atEnd(c.node).from===u){const p=Be.create(a,u+2,u+2),m=Jo(g=>g.type.name===Hr)(p);if(m){const g=Ve.atStart(m.node).from+m.start,b=Be.create(a,g,g);if(Jo(w=>w.attrs.extend)(b))return o.step(new fn(u,g,Ce.empty)),!0}}return!1})]),Tab:()=>this.editor.commands.first(({commands:r})=>[()=>!0]),"Mod-Enter":()=>this.editor.commands.setPageBreak()}},addNodeView(){return this.options.View}});function Tp(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(s=>s.type===e&&s.name===r);return o?o.attribute.keepOnSplit:!1}))}const aE=t=>t.command(({tr:e})=>{const{selection:n,doc:r}=e,o=t4(r,{from:n.from,to:n.to},s=>s.type.name===xl);for(const s of o){const a=s.pos+s.node.nodeSize;if(n.from<s.pos||n.to>a)return!0}return t.deleteSelection()}),Qq=Qe.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),Nq=["data-font"],eK=i.defineComponent({__name:"FontFamilyMenuButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},shortcutKeys:{default:void 0},maxHeight:{default:void 0},tooltip:{default:""},items:{default:()=>[]},customClass:{default:""}},setup(t){const e=t,n=i.computed(()=>e.editor.extensionStorage["base-kit"].mode===Fe.EDITOR),{t:r}=St(),o=[{label:r("editor.fontFamily.gulim"),value:"Gulim"},{label:r("editor.fontFamily.dotum"),value:"Dotum"},{label:r("editor.fontFamily.gungsuh"),value:"Gungsuh"}],s=i.inject("fontFamily"),a=i.computed(()=>{const p=e.editor.extensionManager.extensions.find(g=>g.name==="fontFamily").options;return nt.isEmpty(p.fontFamilyMap)&&(p.fontFamilyMap=o),[{label:r("editor.fontFamily.default"),value:r("editor.fontFamily.default")},...p.fontFamilyMap]}),l=i.computed(()=>{const p={label:r("editor.fontFamily.default"),value:r("editor.fontFamily.default")};return n.value?Km(e.editor.state,"textStyle").fontFamily||p.value:s.value||p.value}),u=et.useEventBus("fontFamily");function c(p){p.value===l.value||p.value===r("editor.fontFamily.default")?(e.editor.commands.unsetFontFamily(),s.value=null):(s.value=p.value,e.editor.commands.setFontFamily(p.value),u.emit())}const f=i.computed(()=>{var p;return(p=a.value.find(m=>m.value===l.value))==null?void 0:p.label});return(p,m)=>(i.openBlock(),i.createBlock(Qs,{disabled:p.disabled,tooltip:p.tooltip,title:f.value,btn_class:`min-w-24 ${p.customClass}`},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,(g,b)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:b},[i.createVNode(i.unref(bl),{checked:l.value===g.value,onClick:y=>c(g)},{default:i.withCtx(()=>[i.createElementVNode("span",{class:"ml-1 h-full","data-font":g.label,style:i.normalizeStyle({fontFamily:g.value??void 0})},i.toDisplayString(g.label),13,Nq)]),_:2},1032,["checked","onClick"]),g.label===i.unref(r)("editor.fontFamily.default")?(i.openBlock(),i.createBlock(i.unref(ig),{key:0})):i.createCommentVNode("",!0)],64))),128))]),_:1},8,["disabled","tooltip","title","btn_class"]))}}),lE=Qq.extend({name:"fontFamily",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"],fontFamilyMap:[],button({editor:e,extension:n,t:r}){return{component:eK,componentProps:{editor:e,disabled:!e.can().setFontFamily(""),tooltip:r("editor.fontFamily.tooltip"),customClass:"border border-gray-300 rounded-none text-gray-500 px-2.5 h-[26px]"}}}}},addGlobalAttributes(){return[{types:["paragraph","heading","textStyle"],attributes:{style:{default:null,parseHTML:t=>t.style.fontFamily||null,renderHTML:t=>t.style?{style:`font-family: ${t.style}`}:{}},fontFamily:{default:null,parseHTML:t=>t.style.fontFamily.replace(/['"]/g,""),renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}},addStorage(){return{value:null}},onUpdate(){this.storage.value=this.editor.getAttributes("textStyle").fontFamily}}),tK={class:"flex gap-2"},nK=["disabled"],rK=eo(i.defineComponent({__name:"FontSizeIncreaseDecrease",props:{editor:Object},setup(t){const e=i.inject("fontSize"),n=i.computed(()=>e.value?parseInt(e.value)===parseInt(b0[0])||parseInt(e.value)<parseInt(b0[0]):!1),r=et.useEventBus(Fn.INCREASE_DECREASE_FONTSIZE),o=s=>{r.emit(s)};return(s,a)=>{const l=fl,u=dl,c=pl;return i.openBlock(),i.createElementBlock("div",tK,[i.createVNode(c,null,{default:i.withCtx(()=>[i.createVNode(u,{"delay-duration":0},{default:i.withCtx(()=>[i.createVNode(l,null,{default:i.withCtx(()=>[i.createElementVNode("button",{class:"btn",onClick:a[0]||(a[0]=f=>o(!0))},[i.createVNode(i.unref(jt),{name:"Plus",class:"w-6 h-6"})])]),_:1}),i.createVNode(i.unref(Xs),null,{default:i.withCtx(()=>a[2]||(a[2]=[i.createTextVNode(" 글꼴 크기 크게 ")])),_:1})]),_:1})]),_:1}),i.createVNode(c,null,{default:i.withCtx(()=>[i.createVNode(u,{"delay-duration":0},{default:i.withCtx(()=>[i.createVNode(l,null,{default:i.withCtx(()=>[i.createElementVNode("button",{class:"btn",onClick:a[1]||(a[1]=f=>o(!1)),disabled:i.unref(n)},[i.createVNode(i.unref(jt),{name:"Minus",class:"w-6 h-6"})],8,nK)]),_:1}),i.createVNode(i.unref(Xs),null,{default:i.withCtx(()=>a[3]||(a[3]=[i.createTextVNode(" 글꼴 크기 작게 ")])),_:1})]),_:1})]),_:1})])}}}),[["__scopeId","data-v-8403813a"]]),oK=Gn.create({name:"fontSizeIncreaseDecrease",addOptions(){return{defaultSize:"14px",button({editor:t}){return{component:rK,componentProps:{editor:t}}}}},addAttributes(){return{size:{default:this.options.defaultSize,parseHTML:t=>t.style.fontSize||this.options.defaultSize,renderHTML:t=>t.size?{style:`font-size: ${t.size}`}:{}}}},addCommands(){return{setFontSizeIncreaseDecrease:t=>({commands:e})=>e.setMark("textStyle",{fontSize:t})}}}),ib=Qe.create({name:"painter",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>({component:je,componentProps:{action:()=>{e.commands.setPainter(e==null?void 0:e.state.selection.$head.marks())},icon:"PaintRoller",tooltip:r("editor.format")}})}},addCommands(){return{setPainter:t=>({view:{dispatch:e,state:{tr:n},dom:r}})=>{const a=`url("data:image/svg+xml;utf8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#000" d="M9 22v-6H4V7q0-1.65 1.175-2.825T8 3h12v13h-5v6zM6 10h12V5h-1v4h-2V5h-1v2h-2V5H8q-.825 0-1.412.588T6 7zm0 4h12v-2H6zm0 0v-2z"/></svg>')}"), auto`;return r.style.cursor=a,e(n.setMeta("painterAction",{type:"start",marks:t})),!0}}},addProseMirrorPlugins(){return[new tt({key:new kt("format-painter"),state:{init:()=>[],apply:(t,e)=>{const n=t.getMeta("painterAction");return n&&n.type==="start"?e=n.marks:n&&n.type==="end"&&(e=[]),e}},props:{handleDOMEvents:{mousedown(t,e){const n=this.getState(t.state);if(!n||n.length==0)return t.dom.style.cursor="",!1;const r=()=>{document.removeEventListener("mouseup",r);const{dispatch:o,state:{selection:s},dom:a}=t;let l=t.state.tr;a.style.cursor="",l=l.removeMark(s.from,s.to);for(const u of n)u.type.name!="link"&&(l=l.addMark(s.from,s.to,u));o(l.setMeta("painterAction",{type:"end"}))};return document.addEventListener("mouseup",r),!0}}}})]}}),sb=()=>Qi(10),uE=new kt("attrkey"),iK=t=>new tt({key:uE,state:{init:()=>!1,apply:n=>n.getMeta("initSplit")},appendTransaction(n,r,o){const{tr:s}=o;let a=!1;const l=uE.getState(o);if(n.some(c=>c.getMeta("composition")))return null;if(l||n.some(c=>c.docChanged)){const c=[];o.doc.descendants((f,p,m,g)=>{const{attrs:b}=f,y=c.includes(b.id)?sb():b.id||sb();t.includes(f.type.name)&&(s.setNodeMarkup(p,void 0,{...b,id:y,"number-line":g+1}),a=!0),c.push(y)})}return a?s:null}}),cE=[Gg,pp,hp,Xg,mp,na,Jg,xl,Qg,eb,Zg,Cl,ra,oa,Ng,tb,Yg,Hr],sK=Qe.create({name:"autoId",addGlobalAttributes(){return[{types:cE.concat(this.options.types||[]),attributes:{id:{default:sb()},extend:{default:!1},class:{default:null},"number-line":{default:null}}}]},addProseMirrorPlugins(){return[iK(cE.concat(this.options.types||[]))]}}),aK=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,lK=Bt.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",bt(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[u4({find:aK,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),uK=["src","alt"],cK={key:0,class:"image-resizer"},dK=["onMousedown"],fK=i.defineComponent({__name:"ImageView",props:{...Ps,selected:{type:Boolean,required:!0}},setup(t){const e=t,n={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"},r=i.ref({width:nw,height:nw}),o=i.ref({width:0,height:0}),s=i.ref(!1),a=i.ref({x:0,y:0,w:0,h:0,dir:""}),l=i.computed(()=>{const{src:C,alt:T,width:_,height:A,flipX:D,flipY:L}=e.node.attrs,B=[];D&&B.push("rotateX(180deg)"),L&&B.push("rotateY(180deg)");const W=B.join(" ");return{src:C||void 0,alt:T||void 0,style:{width:v0(_)?`${_}px`:_,height:v0(A)?`${A}px`:A,transform:W||"none"}}}),u=i.computed(()=>({width:i.unref(l).style.width==="100%"?"100%":void 0})),c=i.ref(null),f=new ResizeObserver(C=>{for(const T of C){const{width:_,height:A}=T.contentRect;o.value={width:_,height:A},e.updateAttributes({originWidth:_,originHeight:A})}});function p(){const{editor:C,getPos:T}=e;C.commands.setNodeSelection(T())}const m=nt.throttle(()=>{const{editor:C}=e;r.value.width=parseInt(getComputedStyle(C.view.dom).width,10)},rw);function g(C,T){C.preventDefault(),C.stopPropagation();const{width:_,height:A}=i.unref(o),D=_/A;let L=Number(e.node.attrs.width)||_,B=Number(e.node.attrs.height)||Math.round(L/D);const W=i.unref(r).width;L=Math.min(L>W?W:L,W),B=Math.round(L/D),Object.assign(a.value,{x:C.clientX,y:C.clientY,w:L,h:B,dir:T}),s.value=!0,w()}const b=nt.throttle(C=>{if(!i.unref(s))return;const{x:T,y:_,w:A,dir:D}=i.unref(a),L=(C.clientX-T)*(/l/.test(D)?-1:1),B=MB(A+L,CB,i.unref(r).width);e.updateAttributes({width:B})},rw);function y(C){C.preventDefault(),C.stopPropagation(),i.unref(s)&&(s.value=!1,Object.assign(a.value,{x:0,y:0,w:0,h:0,dir:""}),x(),p())}function w(){document.addEventListener("mousemove",b,!0),document.addEventListener("mouseup",y,!0)}function x(){document.removeEventListener("mousemove",b,!0),document.removeEventListener("mouseup",y,!0)}const S=new ResizeObserver(m),E=i.computed(()=>{const{textAlign:C}=e.node.attrs;return{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[C]||""});return i.onMounted(()=>{c.value&&f.observe(c.value),S.observe(e.editor.view.dom)}),i.onBeforeUnmount(()=>{x(),f.disconnect(),S.disconnect()}),(C,T)=>(i.openBlock(),i.createBlock(i.unref(Ds),{class:"node-image"},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"image-view",style:i.normalizeStyle([l.value.style,E.value])},[i.createElementVNode("div",{draggable:"true","data-drag-handle":"",class:i.normalizeClass([{"image-view__body--focused":t.selected,"image-view__body--resizing":s.value},"image-view__body"]),style:i.normalizeStyle(u.value)},[i.createElementVNode("img",{ref_key:"imageRef",ref:c,src:l.value.src,alt:l.value.alt,class:"block w-full image-view__body__image",onClick:p},null,8,uK),C.editor.view.editable?i.withDirectives((i.openBlock(),i.createElementBlock("div",cK,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.values(n),_=>(i.openBlock(),i.createElementBlock("span",{key:_,class:i.normalizeClass([`image-resizer__handler--${_}`,"image-resizer__handler"]),onMousedown:A=>g(A,_)},null,42,dK))),128))],512)),[[i.vShow,t.selected||s.value]]):i.createCommentVNode("",!0)],6)],4)]),_:1}))}}),pK=eo(fK,[["__scopeId","data-v-dbc7ca58"]]),ab=lK.extend({group:"block",defining:!0,isolating:!0,addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),flipX:{default:!1},flipY:{default:!1},originWidth:{default:null},originHeight:{default:null},textAlign:{default:"left",parseHTML:e=>e.style.textAlign||e.getAttribute("textAlign")||null,renderHTML:e=>({textAlign:e.textAlign})},width:{default:"100%",parseHTML:e=>{const n=e.style.width||e.getAttribute("width")||null;return n&&n.endsWith("%")?n:n==null?null:parseInt(n,10)},renderHTML:e=>({width:e.width})}}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this)}},addNodeView(){return Vs(pK)},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),updateImage:e=>({commands:n,editor:r})=>n.updateAttributes(this.name,e)}},renderHTML({node:t,HTMLAttributes:e}){const{textAlign:n,flipX:r,flipY:o}=t.attrs,l=`${{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[n]||""} ${r||o?`transform: rotateX(${r?"180":"0"}deg) rotateY(${o?"180":"0"}deg);`:""}`;return["img",bt({height:"auto",style:l},this.options.HTMLAttributes,e)]},parseHTML(){return[{tag:"img[src]"}]},addProseMirrorPlugins(){return[new tt({props:{handleTextInput(t){const{selection:e}=t.state;return e instanceof De&&e.node.type.name==="image"},handlePaste(t){const{selection:e}=t.state;return e instanceof De&&e.node.type.name==="image"}}})]}}),hK=["paragraph","heading","list_item","todo_item"];function mK(t,e){const{selection:n,doc:r}=t;if(!n||!r||!(n instanceof Be||n instanceof In))return t;const{from:o,to:s}=n,a=[],l=e&&e!==ow?e:null;return r.nodesBetween(o,s,(u,c)=>{const f=u.type;return hK.includes(f.name)?((u.attrs.lineHeight||null)!==l&&a.push({node:u,pos:c,nodeType:f}),f.name!=="list_item"&&f.name!=="todo_item"):!0}),a.length&&a.forEach(u=>{const{node:c,pos:f,nodeType:p}=u;let{attrs:m}=c;m={...m,lineHeight:l},t=t.setNodeMarkup(f,p,m,c.marks)}),t}function gK(t){return({state:e,dispatch:n})=>{const{selection:r}=e;let{tr:o}=e;return o=o.setSelection(r),o=mK(o,t),o.docChanged?(n&&n(o),!0):!1}}const bK=i.defineComponent({__name:"LineHeightDropdown",props:{editor:{},icon:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const{t:e}=St();function n(l){return parseFloat(l.replace("%",""))/100}const r=i.computed(()=>{const c=s.editor.extensionManager.extensions.find(f=>f.name==="lineHeight").options.lineHeights.map(f=>({label:n(f),value:f}));return c.unshift({label:i.unref(e)("editor.default"),value:"default"}),c}),o=i.ref("default"),s=t;function a(l){l==="default"?s.editor.commands.unsetLineHeight():s.editor.commands.setLineHeight(l),o.value=l}return(l,u)=>(i.openBlock(),i.createBlock(Qs,{icon:l.icon,tooltip:l.tooltip,disabled:l.disabled},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,(c,f)=>(i.openBlock(),i.createBlock(i.unref(bl),{key:f,checked:c.value===o.value,onClick:p=>a(c.value)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c.label),1)]),_:2},1032,["checked","onClick"]))),128))]),_:1},8,["icon","tooltip","disabled"]))}}),dE=Qe.create({name:"lineHeight",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["paragraph","heading","list_item","todo_item"],lineHeights:["100%","115%","150%","200%","250%","300%"],defaultHeight:ow,button({editor:e,t:n}){return{component:bK,componentProps:{editor:e,icon:"LineHeight",tooltip:n("editor.lineheight.tooltip")}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight||this.options.defaultHeight,renderHTML:t=>t.lineHeight===this.options.defaultHeight||!t.lineHeight?{}:{style:`line-height: ${t.lineHeight}`}}}}]},addCommands(){return{setLineHeight:t=>gK(t),unsetLineHeight:()=>({commands:t})=>this.options.types.every(e=>t.resetAttributes(e,"lineHeight"))}}}),vK=Bt.create({name:"column",content:"block+",isolating:!0,addAttributes(){return{position:{default:"",parseHTML:t=>t.getAttribute("data-position"),renderHTML:t=>({"data-position":t.position})}}},renderHTML({HTMLAttributes:t}){return["div",bt(t,{"data-type":"column"}),0]},parseHTML(){return[{tag:'div[data-type="column"]'}]}});var ia=(t=>(t.SidebarLeft="sidebar-left",t.SidebarRight="sidebar-right",t.TwoColumn="two-column",t))(ia||{});const lb=Bt.create({name:"columns",group:"columns",content:"column+",defining:!0,isolating:!0,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),layout:"two-column"}},addAttributes(){return{layout:{default:"two-column"}}},addCommands(){return{setColumns:()=>({commands:t})=>(t.insertContent('<div data-type="columns"><div data-type="column" data-position="left"><p></p></div><div data-type="column" data-position="right"><p></p></div></div>'),!0),setLayout:t=>({commands:e})=>e.updateAttributes("columns",{layout:t})}},renderHTML({HTMLAttributes:t}){return["div",{"data-type":"columns",class:`layout-${t.layout}`},0]},parseHTML(){return[{tag:'div[data-type="columns"]'}]},addExtensions(){return[vK.configure(this.options.columnOptions)]}}),fE=i.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=i.computed(()=>{const{class:o,...s}=e;return s}),r=Xn(n);return(o,s)=>(i.openBlock(),i.createBlock(i.unref(KR),i.mergeProps(i.unref(r),{class:i.unref(Ae)("text-sm text-ed-muted-foreground",e.class)}),{default:i.withCtx(()=>[i.renderSlot(o.$slots,"default")]),_:3},16,["class"]))}}),yK={class:"flex gap-x-2 items-center"},wK={class:"sr-only"},xK={class:"flex justify-end gap-x-2.5 flex-1"},CK=["disabled"],Ap=i.defineComponent({__name:"SuperInputDialogMoblie",props:{editor:{},open:{type:Boolean},superTextInit:{},superTextId:{},superTextElementId:{},isViewMode:{type:Boolean},title:{}},emits:["close","save","delete"],setup(t,{emit:e}){const n=e,r=t,{t:o}=St(),s=i.ref(""),a=i.ref(!1),l=i.ref(r.isViewMode??!1),u=i.ref(!1);i.watch(()=>r.isViewMode,g=>{l.value=g,g||(s.value="")});const c=i.computed(()=>{var b;if(!s.value)return!0;const g=document.createElement("div");return g.innerHTML=s.value,((b=g==null?void 0:g.textContent)==null?void 0:b.trim())===""});i.watch(()=>r.open,()=>{r.open&&r.superTextInit&&(s.value=r.superTextInit)});const f=()=>{n("close"),a.value=!1,l.value=!0,u.value=!1},p=()=>{n("save",s.value),s.value="",l.value=!0,u.value=!1},m=()=>{u.value=!0,l.value=!1};return(g,b)=>{const y=_p,w=Sp,x=kp,S=fE,E=rb,C=Ep,T=Cp;return i.openBlock(),i.createBlock(T,{open:g.open},{default:i.withCtx(()=>[i.createVNode(C,{isOverlayTransparent:"",class:"p-2.5 gap-0 gap-y-2.5 border-none w-[calc(100%-40px)] !shadow-ed rounded-[5px]"},{default:i.withCtx(()=>[i.createVNode(x,{class:"text-left flex-row justify-between"},{default:i.withCtx(()=>[i.createVNode(y,{class:"text-base font-normal"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(g.title?g.title:i.unref(o)("editor.superinput")),1)]),_:1}),i.createElementVNode("div",yK,[i.withDirectives(i.createElementVNode("button",{onClick:m},[i.createVNode(i.unref(lC),{icon:"lucide:edit-2"})],512),[[i.vShow,l.value]]),i.createVNode(w,{class:"outline-none",onClick:f},{default:i.withCtx(()=>[i.createVNode(i.unref(Mf),{class:"w-5 h-5"}),i.createElementVNode("span",wK,i.toDisplayString(i.unref(o)("editor.close")),1)]),_:1})])]),_:1}),i.createVNode(S,{class:"hidden"}),i.createVNode(iE,{isReadOnly:l.value,modelValue:s.value,"onUpdate:modelValue":b[0]||(b[0]=_=>s.value=_)},null,8,["isReadOnly","modelValue"]),i.createVNode(E,{class:"flex-row justify-between"},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("button",{onClick:b[1]||(b[1]=_=>n("delete"))},i.toDisplayString(i.unref(o)("editor.delete")),513),[[i.vShow,u.value]]),i.withDirectives(i.createElementVNode("div",xK,[i.createElementVNode("button",{onClick:f},i.toDisplayString(i.unref(o)("editor.menubar.menu.cancel")),1),i.createElementVNode("button",{onClick:p,disabled:i.unref(c),class:i.normalizeClass({"cursor-not-allowed":i.unref(c)})},i.toDisplayString(i.unref(o)("editor.menubar.menu.save")),11,CK)],512),[[i.vShow,u.value||!l.value]])]),_:1})]),_:1})]),_:1},8,["open"])}}});function EK(t){let e=t;for(;e&&e!==document.body;){if(e.nodeType===1){const n=e;if(n.id==="editor-panel")return n}e=e.parentNode}return null}const pE=t=>{var n;if(!t)return!0;const e=document.createElement("div");return e.innerHTML=t,((n=e==null?void 0:e.textContent)==null?void 0:n.trim())===""},kK=["book-mark-node-id","page-id","page-number","book-mark-content","node-id","element-id","line-id"],SK=i.defineComponent({__name:"SuperText",props:Ps,setup(t){const e=t,n=i.ref(!1),r=i.ref(null),{selection:o,doc:s}=e.editor.state,a=i.ref(!1),l=i.inject("isMobile",!1),u=et.useEventBus(Fn.RENDER_SUPER_TEXT),c=i.computed(()=>{var A,D;const E=s.resolve(o.from),C=E==null?void 0:E.node(-1),T=(A=C==null?void 0:C.attrs)==null?void 0:A.id,_=(D=C==null?void 0:C.attrs)==null?void 0:D.pageNumber;return{pageId:T,pageNumber:_}}),f=i.computed(()=>{const E=e.getPos(),C=e.editor.state.doc.resolve(E);for(let T=C.depth;T>0;T--){const _=C.node(T);if(_.type.name==="paragraph")return _}return null}),p=i.computed(()=>{var E;return((E=f.value)==null?void 0:E.attrs.id)||""}),m=i.inject("canEditSuper",i.ref(!0));function g(E){var D,L,B,W;if(pE(E)){w();return}const C=e.getPos(),T=(D=e.editor)==null?void 0:D.state.doc.nodeAt(C),_=E.trim();if((((B=(L=T==null?void 0:T.attrs)==null?void 0:L[it.TEXT])==null?void 0:B.trim())||"")!==_){const{[it.ELEMENT_ID]:J,...ue}=(T==null?void 0:T.attrs)||{};(W=e.editor)==null||W.view.dispatch(e.editor.state.tr.setNodeMarkup(C,void 0,{...ue,[it.TEXT]:_}))}requestAnimationFrame(()=>{e.editor.commands.setTextSelection(C+1),e.editor.view.focus()})}function b(E){const C=e.node.attrs[it.TEXT],T=e.node.attrs[it.ID],A={lineId:E.target.querySelector(`[node-id="${T}"]`).getAttribute("line-id"),dataId:T,text:C};u.emit({action:"hover",payload:A})}function y(E){const C=e.node.attrs[it.ID],_={lineId:E.target.querySelector(`[node-id="${C}"]`).getAttribute("line-id"),dataId:C,text:""};u.emit({action:"hover",payload:_})}function w(){const{getPos:E,node:C,editor:T}=e,_=E(),A=_+1;T.commands.deleteRange({from:_,to:A})}function x(){if(!m.value)return;const{attributes:E}=e.editor.options.editorProps;if(E&&E.id===rr.COMMENT){const C=document.getElementById(rr.COMMENT);if((C==null?void 0:C.getAttribute(rr.DISABLE_SUPER_INPUT))==="true")return}e.editor.view.dom.blur(),n.value=!0}function S(){l&&(a.value=!0,x())}return(E,C)=>{const T=_n,_=xp,A=wp,D=yp,L=vp,B=ac;return i.openBlock(),i.createBlock(i.unref(Ds),{as:"span",class:i.normalizeClass(["w-fit text-inherit super-text align-middle",{"text-red-600 !leading-[13px]":i.unref(l)}]),"data-drag-handle":"",draggable:i.unref(m),contenteditable:"false"},{default:i.withCtx(()=>[i.createVNode(L,null,{default:i.withCtx(()=>[i.createVNode(_,{as:"template",class:"relative",disabled:!i.unref(m)},{default:i.withCtx(()=>[i.createVNode(T,{class:i.normalizeClass([{"pointer-events-none":!i.unref(m)},"!p-0 !m-0 !h-fit"]),variant:"ghost",onDblclick:i.withModifiers(x,["stop"]),onClick:S,onMouseenter:b,onMouseleave:y},{default:i.withCtx(()=>[i.createVNode(i.unref(jt),{name:"fileEdit",class:i.normalizeClass({"w-[13px] h-auto":i.unref(l)})},null,8,["class"]),i.createElementVNode("div",{ref_key:"bookMarkRef",ref:r,"book-mark-node-id":e.node.attrs[i.unref(it).ID],"page-id":c.value.pageId,"page-number":c.value.pageNumber,"book-mark-content":e.node.attrs[i.unref(it).TEXT],"node-id":e.node.attrs[i.unref(it).ID],"element-id":e.node.attrs[i.unref(it).ELEMENT_ID],"line-id":p.value},null,8,kK)]),_:1},8,["class"])]),_:1},8,["disabled"]),i.createVNode(D,null,{default:i.withCtx(()=>[i.createVNode(A,{onSelect:C[0]||(C[0]=W=>n.value=!0)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(E.$t("editor.super.edit")),1)]),_:1}),i.createVNode(A,{onSelect:w},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(E.$t("editor.super.delete")),1)]),_:1})]),_:1})]),_:1}),i.unref(l)?(i.openBlock(),i.createBlock(Ap,{key:1,open:n.value,"is-view-mode":a.value,editor:e.editor,"super-text-init":e.node.attrs[i.unref(it).TEXT],"super-text-id":e.node.attrs[i.unref(it).ID],"super-text-element-id":e.node.attrs[i.unref(it).ELEMENT_ID],onClose:C[2]||(C[2]=W=>n.value=!1),onSave:g,onDelete:w},null,8,["open","is-view-mode","editor","super-text-init","super-text-id","super-text-element-id"])):(i.openBlock(),i.createBlock(B,{key:0,open:n.value,editor:e.editor,"super-text-init":e.node.attrs[i.unref(it).TEXT],"super-text-element-id":e.node.attrs[i.unref(it).ELEMENT_ID],onClose:C[1]||(C[1]=W=>n.value=!1),onSave:g},null,8,["open","editor","super-text-init","super-text-element-id"]))]),_:1},8,["class","draggable"])}}}),_K=new tt({props:{handleKeyDown(t,e){var n;if(e.key==="Backspace"){const{state:r,dispatch:o}=t,{$from:s}=r.selection;if(s.parentOffset===1){const u=s.nodeAfter;if(u&&u.type.name==="superText"){const c=r.tr;c.delete(s.pos-1,s.pos);const f=r.schema.text("");return c.insert(s.pos-1,ce.from(f)),c.setSelection(Be.create(c.doc,s.pos)),o(c),e.preventDefault(),!0}}const a=s.nodeBefore,l=s.nodeAfter;if(a&&a.isText&&((n=a.text)==null?void 0:n.length)===1&&l&&l.type.name==="superText"){const u=s.parent.childBefore(s.parentOffset-1).node;if(u&&u.type.name==="superText"){const c=r.tr;return c.delete(s.pos-1,s.pos),c.setSelection(Be.create(c.doc,s.pos-1)),o(c),e.preventDefault(),!0}}}return!1}}}),Op="superText",hE={UPDATE:"superTextUpdate"},mE=Bt.create({name:"superText",inline:!0,group:"inline",selectable:!1,defining:!0,draggable:!0,addStorage(){return{enable:!0,isShowSuperInputMoblie:!1,view:!0,items:[],toggleSuperViewMobileCallBack:this.options.toggleSuperViewMobileCallBack}},addOptions(){return{specialCharModal:null,button:({editor:t,t:e,isMobile:n})=>[...n?[{component:je,componentProps:{action:()=>{t.commands.toggleSuperInputMoblie()},isActive:()=>{},icon:"fileEdit",title:e("editor.menubar.menu.insertSuper"),tooltip:e("editor.menubar.menu.insertSuper"),customClass:"whitespace-nowrap !bg-ed-blue !text-white !font-normal rounded-[3px] h-[26px] ml-auto",customClassTooltip:"ml-auto"}}]:[],{component:je,componentProps:{action:()=>t.commands.toggleSuperText(n),isActive:()=>t.storage.superText.enable,title:e("editor.menubar.menu.superView"),customClass:`whitespace-nowrap !text-white !font-normal rounded-[3px] h-[26px]
|
|
275
275
|
${n?"!bg-ed-blue":t.storage.superText.enable?"!bg-blue-700":"!bg-blue-500"}
|
|
276
276
|
`,tooltip:"수퍼 보기"}}]}},addAttributes(){return{[it.ID]:{default:null},[it.TEXT]:{default:""},[it.POSITION]:{default:"0"},[it.ELEMENT_ID]:{default:""}}},addCommands(){return{toggleSuperText:t=>({editor:e})=>t?e.storage.superText.toggleSuperViewMobileCallBack():e.storage.superText.enable=!e.storage.superText.enable,toggleSuperInputMoblie:()=>({editor:t})=>t.storage.superText.isShowSuperInputMoblie=!t.storage.superText.isShowSuperInputMoblie}},parseHTML(){return[{tag:"button.super-text"}]},renderHTML({HTMLAttributes:t}){return["button",bt(t,{class:"super-text"})]},addNodeView(){return Vs(SK)},addProseMirrorPlugins(){return[new tt({appendTransaction(t,e,n){let r=n.tr,o=!1;return n.doc.descendants((s,a)=>{if(s.type.name==="superText"){const l=s.attrs[it.POSITION],u=String(a);l!==u&&(r=r.setNodeMarkup(a,void 0,{...s.attrs,[it.POSITION]:u}),o=!0)}}),o?r:null}}),new tt({filterTransaction(t,e){return t.steps.some(r=>{if(r.toJSON&&r.toJSON().stepType==="replace"){const o=r.toJSON();return o.slice&&o.slice.content&&o.slice.content.some(s=>s.type===Op)}return!1})&&t.setMeta(hE.UPDATE,!0),!0}}),_K]}}),TK=["innerHTML"],AK=["book-mark-node-id","page-id","page-number","book-mark-content","node-id","line-id"],OK=i.defineComponent({__name:"ConfigPlan",props:Ps,setup(t){const e=t,n=i.ref(!1),r=i.ref(null),{selection:o,doc:s}=e.editor.state,a=i.inject("isMobile"),l=i.ref(!1),u=et.useEventBus(Fn.RENDER_SUPER_TEXT),c=i.computed(()=>{var T,_;const x=s.resolve(o.from),S=x==null?void 0:x.node(-1),E=(T=S==null?void 0:S.attrs)==null?void 0:T.id,C=(_=S==null?void 0:S.attrs)==null?void 0:_.pageNumber;return{pageId:E,pageNumber:C}}),f=i.computed(()=>{const x=e.getPos(),S=e.editor.state.doc.resolve(x);for(let E=S.depth;E>0;E--){const C=S.node(E);if(C.type.name==="paragraph")return C}return null}),p=i.computed(()=>{var x;return((x=f.value)==null?void 0:x.attrs.id)||""});function m(x){e.updateAttributes({"data-text":x}),n.value=!1}function g(x){const S=e.node.attrs[it.TEXT],E=e.node.attrs[it.ID],T={lineId:x.target.querySelector(`[node-id="${E}"]`).getAttribute("line-id"),text:S};u.emit({action:"hover",payload:T})}function b(x){const S=e.node.attrs[it.ID],C={lineId:x.target.querySelector(`[node-id="${S}"]`).getAttribute("line-id"),text:""};u.emit({action:"hover",payload:C})}function y(){const{getPos:x,node:S,editor:E}=e,C=x(),T=C+1;E.commands.deleteRange({from:C,to:T})}function w(){n.value=!0,a&&(l.value=!0)}return(x,S)=>{const E=_n,C=xp,T=wp,_=yp,A=vp,D=ac;return i.openBlock(),i.createBlock(i.unref(Ds),{as:"span",class:i.normalizeClass(["w-fit text-inherit super-text align-middle",{"!leading-[9px] [&_*]:!leading-[9px]":i.unref(a)}]),"data-drag-handle":"",draggable:"true",contenteditable:"false"},{default:i.withCtx(()=>[i.createVNode(A,null,{default:i.withCtx(()=>[i.createVNode(C,{as:"template",class:"relative"},{default:i.withCtx(()=>[i.createVNode(E,{variant:"ghost",class:"!p-0 !m-0 !h-fit font-normal !text-ed-blue",onClick:w,onMouseenter:g,onMouseleave:b},{default:i.withCtx(()=>[i.createVNode(i.unref(jt),{name:"plan",class:i.normalizeClass({"w-[18px] h-auto pr-1":i.unref(a)})},null,8,["class"]),S[3]||(S[3]=i.createTextVNode(" [")),i.createElementVNode("span",{class:"[&_*]:inline",innerHTML:e.node.attrs[i.unref(it).TEXT]},null,8,TK),S[4]||(S[4]=i.createTextVNode("] ")),i.createElementVNode("div",{ref_key:"bookMarkRef",ref:r,"book-mark-node-id":e.node.attrs[i.unref(it).ID],"page-id":c.value.pageId,"page-number":c.value.pageNumber,"book-mark-content":e.node.attrs[i.unref(it).TEXT],"node-id":e.node.attrs[i.unref(it).ID],"line-id":p.value},null,8,AK)]),_:1})]),_:1}),i.createVNode(_,null,{default:i.withCtx(()=>[i.createVNode(T,{onSelect:S[0]||(S[0]=L=>n.value=!0)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(x.$t("editor.configPlan.edit")),1)]),_:1}),i.createVNode(T,{onSelect:y},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(x.$t("editor.configPlan.delete")),1)]),_:1})]),_:1})]),_:1}),i.unref(a)?(i.openBlock(),i.createBlock(Ap,{key:1,title:x.$t("editor.configPlan"),open:n.value,"is-view-mode":l.value,editor:e.editor,"super-text-init":e.node.attrs[i.unref(it).TEXT],"super-text-id":e.node.attrs[i.unref(it).ID],onClose:S[2]||(S[2]=L=>n.value=!1),onSave:m,onDelete:y},null,8,["title","open","is-view-mode","editor","super-text-init","super-text-id"])):(i.openBlock(),i.createBlock(D,{key:0,open:n.value,editor:e.editor,"super-text-init":e.node.attrs[i.unref(it).TEXT],"super-text-element-id":e.node.attrs[i.unref(it).ELEMENT_ID],onClose:S[1]||(S[1]=L=>n.value=!1),onSave:m},null,8,["open","editor","super-text-init","super-text-element-id"]))]),_:1},8,["class"])}}}),gE=Bt.create({name:"configPlan",inline:!0,group:"inline",atom:!0,draggable:!0,addStorage(){return{isShowConfigPlanInput:!1}},addOptions(){return{specialCharModal:null,button:({editor:t,t:e,isMobile:n})=>[...n?[{component:je,componentProps:{action:()=>{t.commands.toggleConfigPlanInput()},isActive:()=>{},icon:"plan",title:e("editor.insertConfigPlan"),tooltip:e("editor.insertConfigPlan"),customClass:"whitespace-nowrap !bg-ed-blue !text-white !font-normal rounded-[3px] h-[26px] gap-x-1 ml-auto",customClassTooltip:"ml-auto"}}]:[]]}},addAttributes(){return{"data-id":{default:null},"data-text":{default:""},"data-position":{default:"0"}}},addCommands(){return{toggleConfigPlanInput:()=>({editor:t})=>t.storage.configPlan.isShowConfigPlanInput=!t.storage.configPlan.isShowConfigPlanInput}},parseHTML(){return[{tag:"button.config-plan"}]},renderHTML({HTMLAttributes:t}){return["button",bt(t,{class:"config-plan"})]},addNodeView(){return Vs(OK)},addProseMirrorPlugins(){return[new tt({appendTransaction(t,e,n){let r=n.tr,o=!1;return n.doc.descendants((s,a)=>{if(s.type.name==="configPlan"){const l=s.attrs["data-position"],u=String(a);l!==u&&(r=r.setNodeMarkup(a,void 0,{...s.attrs,"data-position":u}),o=!0)}}),o?r:null}})]}});var ub,cb;if(typeof WeakMap<"u"){let t=new WeakMap;ub=e=>t.get(e),cb=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;ub=r=>{for(let o=0;o<t.length;o+=2)if(t[o]==r)return t[o+1]},cb=(r,o)=>(n==10&&(n=0),t[n++]=r,t[n++]=o)}var rn=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,o=e/this.width|0;let s=r+1,a=o+1;for(let l=1;s<this.width&&this.map[e+l]==n;l++)s++;for(let l=1;a<this.height&&this.map[e+this.width*l]==n;l++)a++;return{left:r,top:o,right:s,bottom:a}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:o,top:s,bottom:a}=this.findCell(t);return e=="horiz"?(n<0?r==0:o==this.width)?null:this.map[s*this.width+(n<0?r-1:o)]:(n<0?s==0:a==this.height)?null:this.map[r+this.width*(n<0?s-1:a)]}rectBetween(t,e){const{left:n,right:r,top:o,bottom:s}=this.findCell(t),{left:a,right:l,top:u,bottom:c}=this.findCell(e);return{left:Math.min(n,a),top:Math.min(o,u),right:Math.max(r,l),bottom:Math.max(s,c)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let o=t.left;o<t.right;o++){const s=r*this.width+o,a=this.map[s];n[a]||(n[a]=!0,!(o==t.left&&o&&this.map[s-1]==a||r==t.top&&r&&this.map[s-this.width]==a)&&e.push(a))}return e}positionAt(t,e,n){for(let r=0,o=0;;r++){const s=o+n.child(r).nodeSize;if(r==t){let a=e+t*this.width;const l=(t+1)*this.width;for(;a<l&&this.map[a]<o;)a++;return a==l?s-1:this.map[a]}o=s}}static get(t){return ub(t)||cb(t,MK(t))}};function MK(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=BK(t),n=t.childCount,r=[];let o=0,s=null;const a=[];for(let c=0,f=e*n;c<f;c++)r[c]=0;for(let c=0,f=0;c<n;c++){const p=t.child(c);f++;for(let b=0;;b++){for(;o<r.length&&r[o]!=0;)o++;if(b==p.childCount)break;const y=p.child(b),{colspan:w,rowspan:x,colwidth:S}=y.attrs;for(let E=0;E<x;E++){if(E+c>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:f,n:x-E});break}const C=o+E*e;for(let T=0;T<w;T++){r[C+T]==0?r[C+T]=f:(s||(s=[])).push({type:"collision",row:c,pos:f,n:w-T});const _=S&&S[T];if(_){const A=(C+T)%e*2,D=a[A];D==null||D!=_&&a[A+1]==1?(a[A]=_,a[A+1]=1):D==_&&a[A+1]++}}}o+=w,f+=y.nodeSize}const m=(c+1)*e;let g=0;for(;o<m;)r[o++]==0&&g++;g&&(s||(s=[])).push({type:"missing",row:c,n:g}),f++}(e===0||n===0)&&(s||(s=[])).push({type:"zero_sized"});const l=new rn(e,n,r,s);let u=!1;for(let c=0;!u&&c<a.length;c+=2)a[c]!=null&&a[c+1]<n&&(u=!0);return u&&IK(l,a,t),l}function BK(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const o=t.child(r);let s=0;if(n)for(let a=0;a<r;a++){const l=t.child(a);for(let u=0;u<l.childCount;u++){const c=l.child(u);a+c.attrs.rowspan>r&&(s+=c.attrs.colspan)}}for(let a=0;a<o.childCount;a++){const l=o.child(a);s+=l.attrs.colspan,l.attrs.rowspan>1&&(n=!0)}e==-1?e=s:e!=s&&(e=Math.max(e,s))}return e}function IK(t,e,n){t.problems||(t.problems=[]);const r={};for(let o=0;o<t.map.length;o++){const s=t.map[o];if(r[s])continue;r[s]=!0;const a=n.nodeAt(s);if(!a)throw new RangeError(`No cell with offset ${s} found`);let l=null;const u=a.attrs;for(let c=0;c<u.colspan;c++){const f=(o+c)%t.width,p=e[f*2];p!=null&&(!u.colwidth||u.colwidth[c]!=p)&&((l||(l=RK(u)))[c]=p)}l&&t.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function RK(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function $n(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],o=r.spec.tableRole;o&&(e[o]=r)}}return e}var ls=new kt("selectingCells");function El(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function LK(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function co(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function Mp(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=El(e.$head)||DK(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function DK(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function db(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function PK(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function fb(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function bE(t,e,n){const r=t.node(-1),o=rn.get(r),s=t.start(-1),a=o.nextCell(t.pos-s,e,n);return a==null?null:t.node(0).resolve(s+a)}function sa(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function vE(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;o<n;o++)r.colwidth.splice(e,0,0)}return r}function VK(t,e,n){const r=$n(e.type.schema).header_cell;for(let o=0;o<t.height;o++)if(e.nodeAt(t.map[n+o*t.width]).type!=r)return!1;return!0}var Ft=class Si extends Ve{constructor(e,n=e){const r=e.node(-1),o=rn.get(r),s=e.start(-1),a=o.rectBetween(e.pos-s,n.pos-s),l=e.node(0),u=o.cellsInRect(a).filter(f=>f!=n.pos-s);u.unshift(n.pos-s);const c=u.map(f=>{const p=r.nodeAt(f);if(!p)throw RangeError(`No cell with offset ${f} found`);const m=s+f+1;return new sy(l.resolve(m),l.resolve(m+p.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(db(r)&&db(o)&&fb(r,o)){const s=this.$anchorCell.node(-1)!=r.node(-1);return s&&this.isRowSelection()?Si.rowSelection(r,o):s&&this.isColSelection()?Si.colSelection(r,o):new Si(r,o)}return Be.between(r,o)}content(){const e=this.$anchorCell.node(-1),n=rn.get(e),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),s={},a=[];for(let u=o.top;u<o.bottom;u++){const c=[];for(let f=u*n.width+o.left,p=o.left;p<o.right;p++,f++){const m=n.map[f];if(s[m])continue;s[m]=!0;const g=n.findCell(m);let b=e.nodeAt(m);if(!b)throw RangeError(`No cell with offset ${m} found`);const y=o.left-g.left,w=g.right-o.right;if(y>0||w>0){let x=b.attrs;if(y>0&&(x=sa(x,0,y)),w>0&&(x=sa(x,x.colspan-w,w)),g.left<o.left){if(b=b.type.createAndFill(x),!b)throw RangeError(`Could not create cell with attrs ${JSON.stringify(x)}`)}else b=b.type.create(x,b.content)}if(g.top<o.top||g.bottom>o.bottom){const x={...b.attrs,rowspan:Math.min(g.bottom,o.bottom)-Math.max(g.top,o.top)};g.top<o.top?b=b.type.createAndFill(x):b=b.type.create(x,b.content)}c.push(b)}a.push(e.child(u).copy(ce.from(c)))}const l=this.isColSelection()&&this.isRowSelection()?e:a;return new Ce(ce.from(l),1,1)}replace(e,n=Ce.empty){const r=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){const{$from:l,$to:u}=o[a],c=e.mapping.slice(r);e.replace(c.map(l.pos),c.map(u.pos),a?Ce.empty:n)}const s=Ve.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);s&&e.setSelection(s)}replaceWith(e,n){this.replace(e,new Ce(ce.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=rn.get(n),o=this.$anchorCell.start(-1),s=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o));for(let a=0;a<s.length;a++)e(n.nodeAt(s[a]),o+s[a])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),o=rn.get(r),s=e.start(-1),a=o.findCell(e.pos-s),l=o.findCell(n.pos-s),u=e.node(0);return a.top<=l.top?(a.top>0&&(e=u.resolve(s+o.map[a.left])),l.bottom<o.height&&(n=u.resolve(s+o.map[o.width*(o.height-1)+l.right-1]))):(l.top>0&&(n=u.resolve(s+o.map[l.left])),a.bottom<o.height&&(e=u.resolve(s+o.map[o.width*(o.height-1)+a.right-1]))),new Si(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=rn.get(e),r=this.$anchorCell.start(-1),o=n.colCount(this.$anchorCell.pos-r),s=n.colCount(this.$headCell.pos-r);if(Math.min(o,s)>0)return!1;const a=o+this.$anchorCell.nodeAfter.attrs.colspan,l=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,l)==n.width}eq(e){return e instanceof Si&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=rn.get(r),s=e.start(-1),a=o.findCell(e.pos-s),l=o.findCell(n.pos-s),u=e.node(0);return a.left<=l.left?(a.left>0&&(e=u.resolve(s+o.map[a.top*o.width])),l.right<o.width&&(n=u.resolve(s+o.map[o.width*(l.top+1)-1]))):(l.left>0&&(n=u.resolve(s+o.map[l.top*o.width])),a.right<o.width&&(e=u.resolve(s+o.map[o.width*(a.top+1)-1]))),new Si(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Si(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new Si(e.resolve(n),e.resolve(r))}getBookmark(){return new FK(this.$anchorCell.pos,this.$headCell.pos)}};Ft.prototype.visible=!1,Ve.jsonID("cell",Ft);var FK=class C_{constructor(e,n){this.anchor=e,this.head=n}map(e){return new C_(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&fb(n,r)?new Ft(n,r):Ve.near(r,1)}};function $K(t){if(!(t.selection instanceof Ft))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Wt.node(r,r+n.nodeSize,{class:"selectedCell"}))}),mt.create(t.doc,e)}function zK({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,o=t.depth;for(;o>=0&&!(t.after(o+1)<t.end(o));o--,n++);for(let s=e.depth;s>=0&&!(e.before(s+1)>e.start(s));s--,r--);return n==r&&/row|table/.test(t.node(o).type.spec.tableRole)}function HK({$from:t,$to:e}){let n,r;for(let o=t.depth;o>0;o--){const s=t.node(o);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){n=s;break}}for(let o=e.depth;o>0;o--){const s=e.node(o);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){r=s;break}}return n!==r&&e.parentOffset===0}function UK(t,e,n){const r=(e||t).selection,o=(e||t).doc;let s,a;if(r instanceof De&&(a=r.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")s=Ft.create(o,r.from);else if(a=="row"){const l=o.resolve(r.from+1);s=Ft.rowSelection(l,l)}else if(!n){const l=rn.get(r.node),u=r.from+1,c=u+l.map[l.width*l.height-1];s=Ft.create(o,u+1,c)}}else r instanceof Be&&zK(r)?s=Be.create(o,r.from):r instanceof Be&&HK(r)&&(s=Be.create(o,r.$from.start(),r.$from.end()));return s&&(e||(e=t.tr)).setSelection(s),e}var WK=new kt("fix-tables");function yE(t,e,n,r){const o=t.childCount,s=e.childCount;e:for(let a=0,l=0;a<s;a++){const u=e.child(a);for(let c=l,f=Math.min(o,a+3);c<f;c++)if(t.child(c)==u){l=c+1,n+=u.nodeSize;continue e}r(u,n),l<o&&t.child(l).sameMarkup(u)?yE(t.child(l),u,n+1,r):u.nodesBetween(0,u.content.size,r,n+1),n+=u.nodeSize}}function wE(t,e){let n;const r=(o,s)=>{o.type.spec.tableRole=="table"&&(n=jK(t,o,s,n))};return e?e.doc!=t.doc&&yE(e.doc,t.doc,0,r):t.doc.descendants(r),n}function jK(t,e,n,r){const o=rn.get(e);if(!o.problems)return r;r||(r=t.tr);const s=[];for(let u=0;u<o.height;u++)s.push(0);for(let u=0;u<o.problems.length;u++){const c=o.problems[u];if(c.type=="collision"){const f=e.nodeAt(c.pos);if(!f)continue;const p=f.attrs;for(let m=0;m<p.rowspan;m++)s[c.row+m]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,sa(p,p.colspan-c.n,c.n))}else if(c.type=="missing")s[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const f=e.nodeAt(c.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...f.attrs,rowspan:f.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const f=e.nodeAt(c.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...f.attrs,colwidth:c.colwidth})}else if(c.type=="zero_sized"){const f=r.mapping.map(n);r.delete(f,f+e.nodeSize)}}let a,l;for(let u=0;u<s.length;u++)s[u]&&(a==null&&(a=u),l=u);for(let u=0,c=n+1;u<o.height;u++){const f=e.child(u),p=c+f.nodeSize,m=s[u];if(m>0){let g="cell";f.firstChild&&(g=f.firstChild.type.spec.tableRole);const b=[];for(let w=0;w<m;w++){const x=$n(t.schema)[g].createAndFill();x&&b.push(x)}const y=(u==0||a==u-1)&&l==u?c+1:p-1;r.insert(r.mapping.map(y),b)}c=p}return r.setMeta(WK,{fixTables:!0})}function Fo(t){const e=t.selection,n=Mp(t),r=n.node(-1),o=n.start(-1),s=rn.get(r);return{...e instanceof Ft?s.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):s.findCell(n.pos-o),tableStart:o,map:s,table:r}}function xE(t,{map:e,tableStart:n,table:r},o){let s=o>0?-1:0;VK(e,r,o+s)&&(s=o==0||o==e.width?null:0);for(let a=0;a<e.height;a++){const l=a*e.width+o;if(o>0&&o<e.width&&e.map[l-1]==e.map[l]){const u=e.map[l],c=r.nodeAt(u);t.setNodeMarkup(t.mapping.map(n+u),null,vE(c.attrs,o-e.colCount(u))),a+=c.attrs.rowspan-1}else{const u=s==null?$n(r.type.schema).cell:r.nodeAt(e.map[l+s]).type,c=e.positionAt(a,o,r);t.insert(t.mapping.map(n+c),u.createAndFill())}}return t}function qK(t,e){if(!co(t))return!1;if(e){const n=Fo(t);e(xE(t.tr,n,n.left))}return!0}function KK(t,e){if(!co(t))return!1;if(e){const n=Fo(t);e(xE(t.tr,n,n.right))}return!0}function GK(t,{map:e,table:n,tableStart:r},o){const s=t.mapping.maps.length;for(let a=0;a<e.height;){const l=a*e.width+o,u=e.map[l],c=n.nodeAt(u),f=c.attrs;if(o>0&&e.map[l-1]==u||o<e.width-1&&e.map[l+1]==u)t.setNodeMarkup(t.mapping.slice(s).map(r+u),null,sa(f,o-e.colCount(u)));else{const p=t.mapping.slice(s).map(r+u);t.delete(p,p+c.nodeSize)}a+=f.rowspan}}function XK(t,e){if(!co(t))return!1;if(e){const n=Fo(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;GK(r,n,o),o!=n.left;o--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=rn.get(s)}e(r)}return!0}function YK(t,e,n){var r;const o=$n(e.type.schema).header_cell;for(let s=0;s<t.width;s++)if(((r=e.nodeAt(t.map[s+n*t.width]))==null?void 0:r.type)!=o)return!1;return!0}function CE(t,{map:e,tableStart:n,table:r},o){var s;let a=n;for(let c=0;c<o;c++)a+=r.child(c).nodeSize;const l=[];let u=o>0?-1:0;YK(e,r,o+u)&&(u=o==0||o==e.height?null:0);for(let c=0,f=e.width*o;c<e.width;c++,f++)if(o>0&&o<e.height&&e.map[f]==e.map[f-e.width]){const p=e.map[f],m=r.nodeAt(p).attrs;t.setNodeMarkup(n+p,null,{...m,rowspan:m.rowspan+1}),c+=m.colspan-1}else{const p=u==null?$n(r.type.schema).cell:(s=r.nodeAt(e.map[f+u*e.width]))==null?void 0:s.type,m=p==null?void 0:p.createAndFill();m&&l.push(m)}return t.insert(a,$n(r.type.schema).row.create(null,l)),t}function JK(t,e){if(!co(t))return!1;if(e){const n=Fo(t);e(CE(t.tr,n,n.top))}return!0}function ZK(t,e){if(!co(t))return!1;if(e){const n=Fo(t);e(CE(t.tr,n,n.bottom))}return!0}function QK(t,{map:e,table:n,tableStart:r},o){let s=0;for(let c=0;c<o;c++)s+=n.child(c).nodeSize;const a=s+n.child(o).nodeSize,l=t.mapping.maps.length;t.delete(s+r,a+r);const u=new Set;for(let c=0,f=o*e.width;c<e.width;c++,f++){const p=e.map[f];if(!u.has(p)){if(u.add(p),o>0&&p==e.map[f-e.width]){const m=n.nodeAt(p).attrs;t.setNodeMarkup(t.mapping.slice(l).map(p+r),null,{...m,rowspan:m.rowspan-1}),c+=m.colspan-1}else if(o<e.height&&p==e.map[f+e.width]){const m=n.nodeAt(p),g=m.attrs,b=m.type.create({...g,rowspan:m.attrs.rowspan-1},m.content),y=e.positionAt(o+1,c,n);t.insert(t.mapping.slice(l).map(r+y),b),c+=g.colspan-1}}}}function NK(t,e){if(!co(t))return!1;if(e){const n=Fo(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;QK(r,n,o),o!=n.top;o--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=rn.get(n.table)}e(r)}return!0}function EE(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function eG({width:t,height:e,map:n},r){let o=r.top*t+r.left,s=o,a=(r.bottom-1)*t+r.left,l=o+(r.right-r.left-1);for(let u=r.top;u<r.bottom;u++){if(r.left>0&&n[s]==n[s-1]||r.right<t&&n[l]==n[l+1])return!0;s+=t,l+=t}for(let u=r.left;u<r.right;u++){if(r.top>0&&n[o]==n[o-t]||r.bottom<e&&n[a]==n[a+t])return!0;o++,a++}return!1}function kE(t,e){const n=t.selection;if(!(n instanceof Ft)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=Fo(t),{map:o}=r;if(eG(o,r))return!1;if(e){const s=t.tr,a={};let l=ce.empty,u,c;for(let f=r.top;f<r.bottom;f++)for(let p=r.left;p<r.right;p++){const m=o.map[f*o.width+p],g=r.table.nodeAt(m);if(!(a[m]||!g))if(a[m]=!0,u==null)u=m,c=g;else{EE(g)||(l=l.append(g.content));const b=s.mapping.map(m+r.tableStart);s.delete(b,b+g.nodeSize)}}if(u==null||c==null)return!0;if(s.setNodeMarkup(u+r.tableStart,null,{...vE(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),l.size){const f=u+1+c.content.size,p=EE(c)?u+1:f;s.replaceWith(p+r.tableStart,f+r.tableStart,l)}s.setSelection(new Ft(s.doc.resolve(u+r.tableStart))),e(s)}return!0}function SE(t,e){const n=$n(t.schema);return tG(({node:r})=>n[r.type.spec.tableRole])(t,e)}function tG(t){return(e,n)=>{var r;const o=e.selection;let s,a;if(o instanceof Ft){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;s=o.$anchorCell.nodeAfter,a=o.$anchorCell.pos}else{if(s=LK(o.$from),!s)return!1;a=(r=El(o.$from))==null?void 0:r.pos}if(s==null||a==null||s.attrs.colspan==1&&s.attrs.rowspan==1)return!1;if(n){let l=s.attrs;const u=[],c=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});const f=Fo(e),p=e.tr;for(let g=0;g<f.right-f.left;g++)u.push(c?{...l,colwidth:c&&c[g]?[c[g]]:null}:l);let m;for(let g=f.top;g<f.bottom;g++){let b=f.map.positionAt(g,f.left,f.table);g==f.top&&(b+=s.nodeSize);for(let y=f.left,w=0;y<f.right;y++,w++)y==f.left&&g==f.top||p.insert(m=p.mapping.map(b+f.tableStart,1),t({node:s,row:g,col:y}).createAndFill(u[w]))}p.setNodeMarkup(a,t({node:s,row:f.top,col:f.left}),u[0]),o instanceof Ft&&p.setSelection(new Ft(p.doc.resolve(o.$anchorCell.pos),m?p.doc.resolve(m):void 0)),n(p)}return!0}}function nG(t,e){return function(n,r){if(!co(n))return!1;const o=Mp(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const s=n.tr;n.selection instanceof Ft?n.selection.forEachCell((a,l)=>{a.attrs[t]!==e&&s.setNodeMarkup(l,null,{...a.attrs,[t]:e})}):s.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(s)}return!0}}function rG(t){return function(e,n){if(!co(e))return!1;if(n){const r=$n(e.schema),o=Fo(e),s=e.tr,a=o.map.cellsInRect(t=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:t=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=a.map(u=>o.table.nodeAt(u));for(let u=0;u<a.length;u++)l[u].type==r.header_cell&&s.setNodeMarkup(o.tableStart+a[u],r.cell,l[u].attrs);if(s.steps.length==0)for(let u=0;u<a.length;u++)s.setNodeMarkup(o.tableStart+a[u],r.header_cell,l[u].attrs);n(s)}return!0}}function _E(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let o=0;o<r.length;o++){const s=e.table.nodeAt(r[o]);if(s&&s.type!==n.header_cell)return!1}return!0}function lc(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?rG(t):function(n,r){if(!co(n))return!1;if(r){const o=$n(n.schema),s=Fo(n),a=n.tr,l=_E("row",s,o),u=_E("column",s,o),f=(t==="column"?l:t==="row"?u:!1)?1:0,p=t=="column"?{left:0,top:f,right:1,bottom:s.map.height}:t=="row"?{left:f,top:0,right:s.map.width,bottom:1}:s,m=t=="column"?u?o.cell:o.header_cell:t=="row"?l?o.cell:o.header_cell:o.cell;s.map.cellsInRect(p).forEach(g=>{const b=g+s.tableStart,y=a.doc.nodeAt(b);y&&a.setNodeMarkup(b,m,y.attrs)}),r(a)}return!0}}lc("row",{useDeprecatedLogic:!0}),lc("column",{useDeprecatedLogic:!0});var oG=lc("cell",{useDeprecatedLogic:!0});function iG(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,o=t.before();r>=0;r--){const s=t.node(-1).child(r),a=s.lastChild;if(a)return o-1-a.nodeSize;o-=s.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),o=t.after();r<n.childCount;r++){const s=n.child(r);if(s.childCount)return o+1;o+=s.nodeSize}}return null}function TE(t){return function(e,n){if(!co(e))return!1;const r=iG(Mp(e),t);if(r==null)return!1;if(n){const o=e.doc.resolve(r);n(e.tr.setSelection(Be.between(o,PK(o))).scrollIntoView())}return!0}}function sG(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Bp(t,e){const n=t.selection;if(!(n instanceof Ft))return!1;if(e){const r=t.tr,o=$n(t.schema).cell.createAndFill().content;n.forEachCell((s,a)=>{s.content.eq(o)||r.replace(r.mapping.map(a+1),r.mapping.map(a+s.nodeSize-1),new Ce(o,0,0))}),r.docChanged&&e(r)}return!0}function aG(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const o=e.child(0),s=o.type.spec.tableRole,a=o.type.schema,l=[];if(s=="row")for(let u=0;u<e.childCount;u++){let c=e.child(u).content;const f=u?0:Math.max(0,n-1),p=u<e.childCount-1?0:Math.max(0,r-1);(f||p)&&(c=pb($n(a).row,new Ce(c,f,p)).content),l.push(c)}else if(s=="cell"||s=="header_cell")l.push(n||r?pb($n(a).row,new Ce(e,n,r)).content:e);else return null;return lG(a,l)}function lG(t,e){const n=[];for(let o=0;o<e.length;o++){const s=e[o];for(let a=s.childCount-1;a>=0;a--){const{rowspan:l,colspan:u}=s.child(a).attrs;for(let c=o;c<o+l;c++)n[c]=(n[c]||0)+u}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=e.length&&e.push(ce.empty),n[o]<r){const s=$n(t).cell.createAndFill(),a=[];for(let l=n[o];l<r;l++)a.push(s);e[o]=e[o].append(ce.from(a))}return{height:e.length,width:r,rows:e}}function pb(t,e){const n=t.createAndFill();return new rm(n).replace(0,n.content.size,e).doc}function uG({width:t,height:e,rows:n},r,o){if(t!=r){const s=[],a=[];for(let l=0;l<n.length;l++){const u=n[l],c=[];for(let f=s[l]||0,p=0;f<r;p++){let m=u.child(p%u.childCount);f+m.attrs.colspan>r&&(m=m.type.createChecked(sa(m.attrs,m.attrs.colspan,f+m.attrs.colspan-r),m.content)),c.push(m),f+=m.attrs.colspan;for(let g=1;g<m.attrs.rowspan;g++)s[l+g]=(s[l+g]||0)+m.attrs.colspan}a.push(ce.from(c))}n=a,t=r}if(e!=o){const s=[];for(let a=0,l=0;a<o;a++,l++){const u=[],c=n[l%e];for(let f=0;f<c.childCount;f++){let p=c.child(f);a+p.attrs.rowspan>o&&(p=p.type.create({...p.attrs,rowspan:Math.max(1,o-p.attrs.rowspan)},p.content)),u.push(p)}s.push(ce.from(u))}n=s,e=o}return{width:t,height:e,rows:n}}function cG(t,e,n,r,o,s,a){const l=t.doc.type.schema,u=$n(l);let c,f;if(o>e.width)for(let p=0,m=0;p<e.height;p++){const g=n.child(p);m+=g.nodeSize;const b=[];let y;g.lastChild==null||g.lastChild.type==u.cell?y=c||(c=u.cell.createAndFill()):y=f||(f=u.header_cell.createAndFill());for(let w=e.width;w<o;w++)b.push(y);t.insert(t.mapping.slice(a).map(m-1+r),b)}if(s>e.height){const p=[];for(let b=0,y=(e.height-1)*e.width;b<Math.max(e.width,o);b++){const w=b>=e.width?!1:n.nodeAt(e.map[y+b]).type==u.header_cell;p.push(w?f||(f=u.header_cell.createAndFill()):c||(c=u.cell.createAndFill()))}const m=u.row.create(null,ce.from(p)),g=[];for(let b=e.height;b<s;b++)g.push(m);t.insert(t.mapping.slice(a).map(r+n.nodeSize-2),g)}return!!(c||f)}function AE(t,e,n,r,o,s,a,l){if(a==0||a==e.height)return!1;let u=!1;for(let c=o;c<s;c++){const f=a*e.width+c,p=e.map[f];if(e.map[f-e.width]==p){u=!0;const m=n.nodeAt(p),{top:g,left:b}=e.findCell(p);t.setNodeMarkup(t.mapping.slice(l).map(p+r),null,{...m.attrs,rowspan:a-g}),t.insert(t.mapping.slice(l).map(e.positionAt(a,b,n)),m.type.createAndFill({...m.attrs,rowspan:g+m.attrs.rowspan-a})),c+=m.attrs.colspan-1}}return u}function OE(t,e,n,r,o,s,a,l){if(a==0||a==e.width)return!1;let u=!1;for(let c=o;c<s;c++){const f=c*e.width+a,p=e.map[f];if(e.map[f-1]==p){u=!0;const m=n.nodeAt(p),g=e.colCount(p),b=t.mapping.slice(l).map(p+r);t.setNodeMarkup(b,null,sa(m.attrs,a-g,m.attrs.colspan-(a-g))),t.insert(b+m.nodeSize,m.type.createAndFill(sa(m.attrs,0,a-g))),c+=m.attrs.rowspan-1}}return u}function ME(t,e,n,r,o){let s=n?t.doc.nodeAt(n-1):t.doc;if(!s)throw new Error("No table found");let a=rn.get(s);const{top:l,left:u}=r,c=u+o.width,f=l+o.height,p=t.tr;let m=0;function g(){if(s=n?p.doc.nodeAt(n-1):p.doc,!s)throw new Error("No table found");a=rn.get(s),m=p.mapping.maps.length}cG(p,a,s,n,c,f,m)&&g(),AE(p,a,s,n,u,c,l,m)&&g(),AE(p,a,s,n,u,c,f,m)&&g(),OE(p,a,s,n,l,f,u,m)&&g(),OE(p,a,s,n,l,f,c,m)&&g();for(let b=l;b<f;b++){const y=a.positionAt(b,u,s),w=a.positionAt(b,c,s);p.replace(p.mapping.slice(m).map(y+n),p.mapping.slice(m).map(w+n),new Ce(o.rows[b-l],0,0))}g(),p.setSelection(new Ft(p.doc.resolve(n+a.positionAt(l,u,s)),p.doc.resolve(n+a.positionAt(f-1,c-1,s)))),e(p)}var dG=Lm({ArrowLeft:Rp("horiz",-1),ArrowRight:Rp("horiz",1),ArrowUp:Rp("vert",-1),ArrowDown:Rp("vert",1),"Shift-ArrowLeft":Lp("horiz",-1),"Shift-ArrowRight":Lp("horiz",1),"Shift-ArrowUp":Lp("vert",-1),"Shift-ArrowDown":Lp("vert",1),Backspace:Bp,"Mod-Backspace":Bp,Delete:Bp,"Mod-Delete":Bp});function Ip(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Rp(t,e){return(n,r,o)=>{if(!o)return!1;const s=n.selection;if(s instanceof Ft)return Ip(n,r,Ve.near(s.$headCell,e));if(t!="horiz"&&!s.empty)return!1;const a=BE(o,t,e);if(a==null)return!1;if(t=="horiz")return Ip(n,r,Ve.near(n.doc.resolve(s.head+e),e));{const l=n.doc.resolve(a),u=bE(l,t,e);let c;return u?c=Ve.near(u,1):e<0?c=Ve.near(n.doc.resolve(l.before(-1)),-1):c=Ve.near(n.doc.resolve(l.after(-1)),1),Ip(n,r,c)}}}function Lp(t,e){return(n,r,o)=>{if(!o)return!1;const s=n.selection;let a;if(s instanceof Ft)a=s;else{const u=BE(o,t,e);if(u==null)return!1;a=new Ft(n.doc.resolve(u))}const l=bE(a.$headCell,t,e);return l?Ip(n,r,new Ft(a.$anchorCell,l)):!1}}function fG(t,e){const n=t.state.doc,r=El(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new Ft(r))),!0):!1}function pG(t,e,n){if(!co(t.state))return!1;let r=aG(n);const o=t.state.selection;if(o instanceof Ft){r||(r={width:1,height:1,rows:[ce.from(pb($n(t.state.schema).cell,n))]});const s=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),l=rn.get(s).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return r=uG(r,l.right-l.left,l.bottom-l.top),ME(t.state,t.dispatch,a,l,r),!0}else if(r){const s=Mp(t.state),a=s.start(-1);return ME(t.state,t.dispatch,a,rn.get(s.node(-1)).findCell(s.pos-a),r),!0}else return!1}function hG(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=IE(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof Ft)s(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(o=El(t.state.selection.$anchor))!=null&&((n=hb(t,e))==null?void 0:n.pos)!=o.pos)s(o,e),e.preventDefault();else if(!r)return;function s(u,c){let f=hb(t,c);const p=ls.getState(t.state)==null;if(!f||!fb(u,f))if(p)f=u;else return;const m=new Ft(u,f);if(p||!t.state.selection.eq(m)){const g=t.state.tr.setSelection(m);p&&g.setMeta(ls,u.pos),t.dispatch(g)}}function a(){t.root.removeEventListener("mouseup",a),t.root.removeEventListener("dragstart",a),t.root.removeEventListener("mousemove",l),ls.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(ls,-1))}function l(u){const c=u,f=ls.getState(t.state);let p;if(f!=null)p=t.state.doc.resolve(f);else if(IE(t,c.target)!=r&&(p=hb(t,e),!p))return a();p&&s(p,c)}t.root.addEventListener("mouseup",a),t.root.addEventListener("dragstart",a),t.root.addEventListener("mousemove",l)}function BE(t,e,n){if(!(t.state.selection instanceof Be))return null;const{$head:r}=t.state.selection;for(let o=r.depth-1;o>=0;o--){const s=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const l=r.before(o),u=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(u)?l:null}}return null}function IE(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function hb(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?El(t.state.doc.resolve(n.pos)):null}var mG=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),mb(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,mb(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function mb(t,e,n,r,o,s){var a;let l=0,u=!0,c=e.firstChild;const f=t.firstChild;if(f){for(let p=0,m=0;p<f.childCount;p++){const{colspan:g,colwidth:b}=f.child(p).attrs;for(let y=0;y<g;y++,m++){const w=o==m?s:b&&b[y],x=w?w+"px":"";if(l+=w||r,w||(u=!1),c)c.style.width!=x&&(c.style.width=x),c=c.nextSibling;else{const S=document.createElement("col");S.style.width=x,e.appendChild(S)}}}for(;c;){const p=c.nextSibling;(a=c.parentNode)==null||a.removeChild(c),c=p}u?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var yr=new kt("tableColumnResizing");function gG({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=mG,lastColumnResizable:o=!0}={}){const s=new tt({key:yr,state:{init(a,l){var u,c;const f=(c=(u=s.spec)==null?void 0:u.props)==null?void 0:c.nodeViews,p=$n(l.schema).table.name;return r&&f&&(f[p]=(m,g)=>new r(m,n,g)),new bG(-1,!1)},apply(a,l){return l.apply(a)}},props:{attributes:a=>{const l=yr.getState(a);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,l)=>{vG(a,l,t,o)},mouseleave:a=>{yG(a)},mousedown:(a,l)=>{wG(a,l,e,n)}},decorations:a=>{const l=yr.getState(a);if(l&&l.activeHandle>-1)return SG(a,l.activeHandle)},nodeViews:{}}});return s}var bG=class Hh{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(yr);if(r&&r.setHandle!=null)return new Hh(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Hh(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return db(e.doc.resolve(o))||(o=-1),new Hh(o,n.dragging)}return n}};function vG(t,e,n,r){if(!t.editable)return;const o=yr.getState(t.state);if(o&&!o.dragging){const s=CG(e.target);let a=-1;if(s){const{left:l,right:u}=s.getBoundingClientRect();e.clientX-l<=n?a=RE(t,e,"left",n):u-e.clientX<=n&&(a=RE(t,e,"right",n))}if(a!=o.activeHandle){if(!r&&a!==-1){const l=t.state.doc.resolve(a),u=l.node(-1),c=rn.get(u),f=l.start(-1);if(c.colCount(l.pos-f)+l.nodeAfter.attrs.colspan-1==c.width-1)return}DE(t,a)}}}function yG(t){if(!t.editable)return;const e=yr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&DE(t,-1)}function wG(t,e,n,r){var o;if(!t.editable)return!1;const s=(o=t.dom.ownerDocument.defaultView)!=null?o:window,a=yr.getState(t.state);if(!a||a.activeHandle==-1||a.dragging)return!1;const l=t.state.doc.nodeAt(a.activeHandle),u=xG(t,a.activeHandle,l.attrs);t.dispatch(t.state.tr.setMeta(yr,{setDragging:{startX:e.clientX,startWidth:u}}));function c(p){s.removeEventListener("mouseup",c),s.removeEventListener("mousemove",f);const m=yr.getState(t.state);m!=null&&m.dragging&&(EG(t,m.activeHandle,LE(m.dragging,p,n)),t.dispatch(t.state.tr.setMeta(yr,{setDragging:null})))}function f(p){if(!p.which)return c(p);const m=yr.getState(t.state);if(m&&m.dragging){const g=LE(m.dragging,p,n);PE(t,m.activeHandle,g,r)}}return PE(t,a.activeHandle,u,r),s.addEventListener("mouseup",c),s.addEventListener("mousemove",f),e.preventDefault(),!0}function xG(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const s=t.domAtPos(e);let l=s.node.childNodes[s.offset].offsetWidth,u=n;if(r)for(let c=0;c<n;c++)r[c]&&(l-=r[c],u--);return l/u}function CG(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function RE(t,e,n,r){const o=n=="right"?-r:r,s=t.posAtCoords({left:e.clientX+o,top:e.clientY});if(!s)return-1;const{pos:a}=s,l=El(t.state.doc.resolve(a));if(!l)return-1;if(n=="right")return l.pos;const u=rn.get(l.node(-1)),c=l.start(-1),f=u.map.indexOf(l.pos-c);return f%u.width==0?-1:c+u.map[f-1]}function LE(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function DE(t,e){t.dispatch(t.state.tr.setMeta(yr,{setHandle:e}))}function EG(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),s=rn.get(o),a=r.start(-1),l=s.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,u=t.state.tr;for(let c=0;c<s.height;c++){const f=c*s.width+l;if(c&&s.map[f]==s.map[f-s.width])continue;const p=s.map[f],m=o.nodeAt(p).attrs,g=m.colspan==1?0:l-s.colCount(p);if(m.colwidth&&m.colwidth[g]==n)continue;const b=m.colwidth?m.colwidth.slice():kG(m.colspan);b[g]=n,u.setNodeMarkup(a+p,null,{...m,colwidth:b})}u.docChanged&&t.dispatch(u)}function PE(t,e,n,r){const o=t.state.doc.resolve(e),s=o.node(-1),a=o.start(-1),l=rn.get(s).colCount(o.pos-a)+o.nodeAfter.attrs.colspan-1;let u=t.domAtPos(o.start(-1)).node;for(;u&&u.nodeName!="TABLE";)u=u.parentNode;u&&mb(s,u.firstChild,u,r,l,n)}function kG(t){return Array(t).fill(0)}function SG(t,e){var n;const r=[],o=t.doc.resolve(e),s=o.node(-1);if(!s)return mt.empty;const a=rn.get(s),l=o.start(-1),u=a.colCount(o.pos-l)+o.nodeAfter.attrs.colspan-1;for(let c=0;c<a.height;c++){const f=u+c*a.width;if((u==a.width-1||a.map[f]!=a.map[f+1])&&(c==0||a.map[f]!=a.map[f-a.width])){const p=a.map[f],m=l+p+s.nodeAt(p).nodeSize-1,g=document.createElement("div");g.className="column-resize-handle",(n=yr.getState(t))!=null&&n.dragging&&r.push(Wt.node(l+p,l+p+s.nodeAt(p).nodeSize,{class:"column-resize-dragging"})),r.push(Wt.widget(m,g))}}return mt.create(t.doc,r)}function _G({allowTableNodeSelection:t=!1}={}){return new tt({key:ls,state:{init(){return null},apply(e,n){const r=e.getMeta(ls);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:o,pos:s}=e.mapping.mapResult(n);return o?null:s}},props:{decorations:$K,handleDOMEvents:{mousedown:hG},createSelectionBetween(e){return ls.getState(e.state)!=null?e.state.selection:null},handleTripleClick:fG,handleKeyDown:dG,handlePaste:pG},appendTransaction(e,n,r){return UK(r,wE(r,n),t)}})}const TG=(t,e,n)=>{if(!t.doc)return t;const r=t.doc.nodeAt(e);if(!r||n===r.attrs.backgroundColor)return t;const o={...r.attrs,backgroundColor:n};return t.setNodeMarkup(e,r.type,o,r.marks)},AG=(t,e,n)=>{const{doc:r,selection:o}=t;return!r||!o||!(o instanceof Ft)||o.forEachCell((s,a)=>{t=TG(t,a,n)}),t},VE=(t,e)=>({tr:n,state:r,dispatch:o})=>{const{selection:s}=r;return n=n.setSelection(s),n=AG(n,e,t),n.docChanged?(o==null||o(n),!0):!1},OG=Qe.create({name:"tableCellBackground",addOptions(){return{types:["tableCell"],HTMLAttributes:{}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{parseHTML:t=>t.style.backgroundColor||"",renderHTML:t=>!t.backgroundColor||t.backgroundColor===""?{}:{style:`background-color: ${t.backgroundColor}`}}}}]},addCommands(){return{setTableCellBackground:t=>VE(t,this.options),unsetTableCellBackground:()=>VE("",this.options)}}}),MG=Bt.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",bt(this.options.HTMLAttributes,t),0]}}),BG=Bt.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",bt(this.options.HTMLAttributes,t),0]}}),IG=Bt.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",bt(this.options.HTMLAttributes,t),0]}});function gb(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function FE(t,e,n,r,o,s){var a;let l=0,u=!0,c=e.firstChild;const f=t.firstChild;if(f!==null)for(let p=0,m=0;p<f.childCount;p+=1){const{colspan:g,colwidth:b}=f.child(p).attrs;for(let y=0;y<g;y+=1,m+=1){const w=o===m?s:b&&b[y],x=w?`${w}px`:"";if(l+=w||r,w||(u=!1),c){if(c.style.width!==x){const[S,E]=gb(r,w);c.style.setProperty(S,E)}c=c.nextSibling}else{const S=document.createElement("col"),[E,C]=gb(r,w);S.style.setProperty(E,C),e.appendChild(S)}}}for(;c;){const p=c.nextSibling;(a=c.parentNode)===null||a===void 0||a.removeChild(c),c=p}u?(n.style.width=`${l}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${l}px`)}class RG{constructor(e,n){this.node=e,this.cellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),FE(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,FE(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function LG(t,e,n,r){let o=0,s=!0;const a=[],l=t.firstChild;if(!l)return{};for(let p=0,m=0;p<l.childCount;p+=1){const{colspan:g,colwidth:b}=l.child(p).attrs;for(let y=0;y<g;y+=1,m+=1){const w=n===m?r:b&&b[y];o+=w||e,w||(s=!1);const[x,S]=gb(e,w);a.push(["col",{style:`${x}: ${S}`}])}}const u=s?`${o}px`:"",c=s?"":`${o}px`;return{colgroup:["colgroup",{},...a],tableWidth:u,tableMinWidth:c}}function $E(t,e){return t.createAndFill()}function DG(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function PG(t,e,n,r,o){const s=DG(t),a=[],l=[];for(let c=0;c<n;c+=1){const f=$E(s.cell);if(f&&l.push(f),r){const p=$E(s.header_cell);p&&a.push(p)}}const u=[];for(let c=0;c<e;c+=1)u.push(s.row.createChecked(null,r&&c===0?a:l));return s.table.createChecked(null,u)}function VG(t){return t instanceof Ft}const Dp=({editor:t})=>{const{selection:e}=t.state;if(!VG(e))return!1;let n=0;const r=n4(e.ranges[0].$from,s=>s.type.name==="table");return r==null||r.node.descendants(s=>{if(s.type.name==="table")return!1;["tableCell","tableHeader"].includes(s.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},FG=Bt.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:RG,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=LG(t,this.options.cellMinWidth);return["table",bt(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${o}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:s})=>{const a=PG(s.schema,t,e,n);if(o){const l=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(Be.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>qK(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>KK(t,e),deleteColumn:()=>({state:t,dispatch:e})=>XK(t,e),addRowBefore:()=>({state:t,dispatch:e})=>JK(t,e),addRowAfter:()=>({state:t,dispatch:e})=>ZK(t,e),deleteRow:()=>({state:t,dispatch:e})=>NK(t,e),deleteTable:()=>({state:t,dispatch:e})=>sG(t,e),mergeCells:()=>({state:t,dispatch:e})=>kE(t,e),splitCell:()=>({state:t,dispatch:e})=>SE(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>lc("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>lc("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>oG(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>kE(t,e)?!0:SE(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>nG(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>TE(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>TE(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&wE(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=Ft.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Dp,"Mod-Backspace":Dp,Delete:Dp,"Mod-Delete":Dp}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[gG({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],_G({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:at(Re(t,"tableRole",e))}}}),$G=["disabled"],zG={"content-class":"table-grid-size-editor","content-style":"padding:0"},HG={class:"flex flex-col flex-wrap gap-1 justify-between"},UG=["onMouseover","onMousedown"],WG={class:"text-center text-sm text-zinc-600 mt-2"},jG=i.defineComponent({__name:"CreateTablePopover",props:{disabled:{type:Boolean,default:!1}},emits:["create-table"],setup(t,{emit:e}){const n=e,r=i.ref(!1),o=i.ref(!0),s=i.reactive({rows:Mu()?Od:Ad,cols:Mu()?Od:Ad}),a=i.reactive({rows:Md,cols:Md});function l(f,p){f===s.rows&&(s.rows=Math.min(f+1,Od)),p===s.cols&&(s.cols=Math.min(p+1,Od)),a.rows=f,a.cols=p}function u(f,p){n("create-table",{rows:f,cols:p,withHeaderRow:i.unref(o)}),c()}function c(){r.value=!1,o.value=!1,s.rows=Ad,s.cols=Ad,a.rows=Md,a.cols=Md}return(f,p)=>(i.openBlock(),i.createBlock(i.unref(al),null,{default:i.withCtx(()=>[i.createVNode(i.unref(cl),{"as-child":""},{default:i.withCtx(()=>[i.createElementVNode("button",{disabled:t.disabled,class:"m-0 p-0"},[i.renderSlot(f.$slots,"trigger")],8,$G)]),_:3}),i.createVNode(i.unref(ll),{class:"w-full",align:"start",side:"bottom"},{default:i.withCtx(()=>[i.createElementVNode("div",zG,[i.createElementVNode("div",HG,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.rows,m=>(i.openBlock(),i.createElementBlock("div",{key:"r"+m,class:"flex gap-1"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(s.cols,g=>(i.openBlock(),i.createElementBlock("div",{key:"c"+g,class:i.normalizeClass([[g<=a.cols&&m<=a.rows&&"bg-ed-foreground border-ed-border","cursor-pointer"],"pa-1"]),onMouseover:b=>l(m,g),onMousedown:b=>u(m,g)},p[0]||(p[0]=[i.createElementVNode("div",{class:"w-4 h-4 p-1 border box-border"},null,-1)]),42,UG))),128))]))),128))]),i.createElementVNode("div",WG,i.toDisplayString(a.rows)+" x "+i.toDisplayString(a.cols),1)])]),_:1})]),_:3}))}}),qG={style:{display:"flex"}},KG=i.defineComponent({__name:"TableActionButton",props:{editor:{},icon:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},color:{default:void 0},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const e=t;function n(r){e.disabled||e.editor.chain().focus().insertTable({...r,withHeaderRow:!1}).run()}return(r,o)=>(i.openBlock(),i.createBlock(jG,{disabled:r.disabled,onCreateTable:n},{trigger:i.withCtx(()=>[i.createElementVNode("div",qG,[i.createVNode(je,{icon:r.icon,tooltip:r.tooltip,disabled:r.disabled,color:r.color,action:r.action,"is-active":r.isActive},null,8,["icon","tooltip","disabled","color","action","is-active"])])]),_:1},8,["disabled"]))}}),bb=FG.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!1,button:({editor:e,t:n})=>({component:KG,componentProps:{disabled:e.isActive("table")||!1,icon:"Table",tooltip:n("editor.table.tooltip")}})}},addExtensions(){return[BG.configure(this.options.tableRow),MG.configure(this.options.tableHeader),IG.configure(this.options.tableCell),OG.configure(this.options.tableCellBackground)]}}),GG={class:"flex items-center gap-2 px-2"},XG=i.defineComponent({__name:"TextDropdown",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},maxHeight:{default:void 0},icon:{default:void 0},tooltip:{default:""}},setup(t){const e=t,{t:n}=St(),r=i.computed(()=>[{name:"paragraph",label:n("editor.paragraph.tooltip"),iconName:"Paragraph",isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),action:()=>e.editor.chain().focus().clearNodes().run()},{name:"heading1",label:n("editor.heading.h1.tooltip"),isActive:()=>e.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:n("editor.heading.h2.tooltip"),isActive:()=>e.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:n("editor.heading.h3.tooltip"),isActive:()=>e.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:n("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:n("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:n("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:n("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()},{name:"codeBlock",label:n("editor.codeblock.tooltip"),isActive:()=>e.editor.isActive("codeBlock"),iconName:"Code2",action:()=>e.editor.chain().focus().clearNodes().toggleCodeBlock().run()}]),o=i.computed(()=>r.value.filter(s=>s.isActive()).pop()??{label:n("editor.modify")});return(s,a)=>{var l;return i.openBlock(),i.createBlock(Qs,{title:(l=o.value)==null?void 0:l.label,"side-offset":5},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,(u,c)=>{var f;return i.openBlock(),i.createBlock(i.unref(bl),{key:c,class:"cursor-pointer",checked:((f=u.isActive)==null?void 0:f.call(u))||!1,onClick:u.action},{default:i.withCtx(()=>[i.createElementVNode("div",GG,[i.createVNode(i.unref(jt),{name:u.iconName,class:"h3 w-3"},null,8,["name"]),i.createElementVNode("span",null,i.toDisplayString(u.label),1)])]),_:2},1032,["checked","onClick"])}),128))]),_:1},8,["title"])}}}),YG=Qe.create({name:"text-bubble",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toolbar:!1,button:()=>({component:XG,componentProps:{}})}}}),JG=[{label:"복합 표현 - 요일과 시간대",examples:["다음 월요일 저녁","이번 토요일 오전"],pattern:"(이번|다음)?\\s?(월|화|수|목|금|토|일)요일(\\s?(오전|오후|저녁|밤|새벽))?"},{label:"시각 표현",examples:["오전 10시","오후 3시 30분","정오","자정","새벽 2시"],pattern:"((오전|오후|새벽|밤|저녁)\\s?\\d{1,2}(시(\\s?\\d{1,2}분)?)?|정오|자정)"},{label:"시간 표현 - 이른/늦은",examples:["이른 아침","늦은 밤"],pattern:"(이른\\s아침|늦은\\s밤)"},{label:"연도+월",examples:["2019년 6월","2025년12월","2024년 01월"],pattern:"\\d{4}년\\s?\\d{1,2}월"},{label:"오늘/내일/어제",examples:["오늘","내일","모레","어제","그제","그끄제"],pattern:"(오늘|내일|모레|어제|그제|그끄제)"},{label:"상대적 주 단위",examples:["이번 주","다음 주","지난 주"],pattern:"(이번|다음|지난)\\s?주"},{label:"상대적 월 단위",examples:["이번 달","다음 달","지난 달"],pattern:"(이번|다음|지난)\\s?달"},{label:"상대적 연도",examples:["올해","내년","작년","재작년","내후년"],pattern:"(올해|내년|작년|재작년|내후년)"},{label:"복합 표현 - 날짜와 시간대",examples:["1월 1일 오전","12월25일 저녁","다음 주 금요일 오전"],pattern:"(내년|올해|작년)?\\s?\\d{1,2}\\s?월\\s?\\d{1,2}\\s?일(\\s?(오전|오후|저녁|밤|새벽))?"},{label:"정확한 날짜",examples:["1월1일","1월 1일","12월 25일","01월 01일"],pattern:"\\d{1,2}\\s?월\\s?\\d{1,2}\\s?일"},{label:"요일",examples:["월요일","화요일","이번 금요일","다음 화요일"],pattern:"(이번|다음)?\\s?(월|화|수|목|금|토|일)요일"},{label:"시간대",examples:["오전","오후","저녁","밤","새벽"],pattern:"(오전|오후|저녁|밤|새벽)"},{label:"짧은 시간 표현",examples:["방금","조금 전","금방","곧","잠시 후"],pattern:"(방금|조금\\s전|금방|곧|잠시\\s후)"},{label:"연도",examples:["2015년","2024년","1998년"],pattern:"\\d{4}년"}],ZG=t=>{const e=[...t||[],...JG.map(n=>n.pattern)].join("|");return new RegExp(e,"gu")},QG=Qe.create({name:"time-highlighter",addOptions(){return{additionalTimeWords:[]}},addStorage(){return{cachedRegex:null,cachedAdditionalWords:null}},addProseMirrorPlugins(){return[new tt({props:{decorations:t=>{const e=[];return(this.storage.cachedAdditionalWords!==this.options.additionalTimeWords||!this.storage.cachedRegex)&&(this.storage.cachedAdditionalWords=this.options.additionalTimeWords,this.storage.cachedRegex=ZG(this.options.additionalTimeWords)),t.doc.descendants((n,r)=>{if(!n.isText)return;let o;const s=this.storage.cachedRegex;for(;o=s.exec(n.text||"");){const a=r+o.index,l=a+o[0].length;e.push(Wt.inline(a,l,{class:"time-highlight"}))}}),mt.create(t.doc,e)}}})]}}),NG=Qe.create({name:"invalidCharFocus",addOptions(){return{invalidChars:["{","}"]}},addCommands(){return{focusInvalidChar:()=>({state:t,dispatch:e,view:n})=>{let r=null;if(t.doc.descendants((s,a)=>{if(!s.isText)return!0;const l=s.text??"";for(let u=0;u<l.length;u++)if(this.options.invalidChars.includes(l[u])){const c=a+u+1;(r==null||c<r)&&(r=c)}return!0}),r==null)return!1;const o=t.tr.setSelection(Be.create(t.doc,r));return e&&e(o.scrollIntoView()),n&&n.focus(),!0}}}}),eX=Qe.create({name:"clipboard",addCommands(){return{copyContent:()=>({editor:t,state:e})=>{const{from:n,to:r}=e.selection;return n===r?!1:((async()=>{const o=e.doc.slice(n,r),a=vo.fromSchema(t.schema).serializeFragment(o.content),l=document.createElement("div");l.appendChild(a);const u=l.innerHTML,c=e.doc.textBetween(n,r,`
|
|
@@ -280,7 +280,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),ne=R,oe=G),N===void 0&
|
|
|
280
280
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[h5]=this[h5]={accessors:{}}).accessors,o=this.prototype;function s(a){const l=pc(a);r[l]||(wJ(o,a),r[l]=!0)}return re.isArray(e)?e.forEach(s):s(e),this}};sr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),re.reduceDescriptors(sr.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),re.freezeMethods(sr);function Mb(t,e){const n=this||fc,r=e||n,o=sr.from(r.headers);let s=r.data;return re.forEach(t,function(l){s=l.call(n,s,o.normalize(),e?e.status:void 0)}),o.normalize(),s}function m5(t){return!!(t&&t.__CANCEL__)}function _l(t,e,n){rt.call(this,t??"canceled",rt.ERR_CANCELED,e,n),this.name="CanceledError"}re.inherits(_l,rt,{__CANCEL__:!0});function g5(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new rt("Request failed with status code "+n.status,[rt.ERR_BAD_REQUEST,rt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function xJ(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function CJ(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,s=0,a;return e=e!==void 0?e:1e3,function(u){const c=Date.now(),f=r[s];a||(a=c),n[o]=u,r[o]=c;let p=s,m=0;for(;p!==o;)m+=n[p++],p=p%t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),c-a<e)return;const g=f&&c-f;return g?Math.round(m*1e3/g):void 0}}function EJ(t,e){let n=0,r=1e3/e,o,s;const a=(c,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),t.apply(null,c)};return[(...c)=>{const f=Date.now(),p=f-n;p>=r?a(c,f):(o=c,s||(s=setTimeout(()=>{s=null,a(o)},r-p)))},()=>o&&a(o)]}const Wp=(t,e,n=3)=>{let r=0;const o=CJ(50,250);return EJ(s=>{const a=s.loaded,l=s.lengthComputable?s.total:void 0,u=a-r,c=o(u),f=a<=l;r=a;const p={loaded:a,total:l,progress:l?a/l:void 0,bytes:u,rate:c||void 0,estimated:c&&l&&f?(l-a)/c:void 0,event:s,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(p)},n)},b5=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},v5=t=>(...e)=>re.asap(()=>t(...e)),kJ=Hn.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Hn.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Hn.origin),Hn.navigator&&/(msie|trident)/i.test(Hn.navigator.userAgent)):()=>!0,SJ=Hn.hasStandardBrowserEnv?{write(t,e,n,r,o,s){const a=[t+"="+encodeURIComponent(e)];re.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),re.isString(r)&&a.push("path="+r),re.isString(o)&&a.push("domain="+o),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function _J(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function TJ(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function y5(t,e,n){let r=!_J(e);return t&&(r||n==!1)?TJ(t,e):e}const w5=t=>t instanceof sr?{...t}:t;function ca(t,e){e=e||{};const n={};function r(c,f,p,m){return re.isPlainObject(c)&&re.isPlainObject(f)?re.merge.call({caseless:m},c,f):re.isPlainObject(f)?re.merge({},f):re.isArray(f)?f.slice():f}function o(c,f,p,m){if(re.isUndefined(f)){if(!re.isUndefined(c))return r(void 0,c,p,m)}else return r(c,f,p,m)}function s(c,f){if(!re.isUndefined(f))return r(void 0,f)}function a(c,f){if(re.isUndefined(f)){if(!re.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function l(c,f,p){if(p in e)return r(c,f);if(p in t)return r(void 0,c)}const u={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(c,f,p)=>o(w5(c),w5(f),p,!0)};return re.forEach(Object.keys(Object.assign({},t,e)),function(f){const p=u[f]||o,m=p(t[f],e[f],f);re.isUndefined(m)&&p!==l||(n[f]=m)}),n}const x5=t=>{const e=ca({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:l}=e;e.headers=a=sr.from(a),e.url=c5(y5(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(re.isFormData(n)){if(Hn.hasStandardBrowserEnv||Hn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[c,...f]=u?u.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...f].join("; "))}}if(Hn.hasStandardBrowserEnv&&(r&&re.isFunction(r)&&(r=r(e)),r||r!==!1&&kJ(e.url))){const c=o&&s&&SJ.read(s);c&&a.set(o,c)}return e},AJ=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const o=x5(t);let s=o.data;const a=sr.from(o.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:c}=o,f,p,m,g,b;function y(){g&&g(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let w=new XMLHttpRequest;w.open(o.method.toUpperCase(),o.url,!0),w.timeout=o.timeout;function x(){if(!w)return;const E=sr.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),T={data:!l||l==="text"||l==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:E,config:t,request:w};g5(function(A){n(A),y()},function(A){r(A),y()},T),w=null}"onloadend"in w?w.onloadend=x:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(x)},w.onabort=function(){w&&(r(new rt("Request aborted",rt.ECONNABORTED,t,w)),w=null)},w.onerror=function(){r(new rt("Network Error",rt.ERR_NETWORK,t,w)),w=null},w.ontimeout=function(){let C=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||f5;o.timeoutErrorMessage&&(C=o.timeoutErrorMessage),r(new rt(C,T.clarifyTimeoutError?rt.ETIMEDOUT:rt.ECONNABORTED,t,w)),w=null},s===void 0&&a.setContentType(null),"setRequestHeader"in w&&re.forEach(a.toJSON(),function(C,T){w.setRequestHeader(T,C)}),re.isUndefined(o.withCredentials)||(w.withCredentials=!!o.withCredentials),l&&l!=="json"&&(w.responseType=o.responseType),c&&([m,b]=Wp(c,!0),w.addEventListener("progress",m)),u&&w.upload&&([p,g]=Wp(u),w.upload.addEventListener("progress",p),w.upload.addEventListener("loadend",g)),(o.cancelToken||o.signal)&&(f=E=>{w&&(r(!E||E.type?new _l(null,t,w):E),w.abort(),w=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const S=xJ(o.url);if(S&&Hn.protocols.indexOf(S)===-1){r(new rt("Unsupported protocol "+S+":",rt.ERR_BAD_REQUEST,t));return}w.send(s||null)})},OJ=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,o;const s=function(c){if(!o){o=!0,l();const f=c instanceof Error?c:this.reason;r.abort(f instanceof rt?f:new _l(f instanceof Error?f.message:f))}};let a=e&&setTimeout(()=>{a=null,s(new rt(`timeout ${e} of ms exceeded`,rt.ETIMEDOUT))},e);const l=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),t=null)};t.forEach(c=>c.addEventListener("abort",s));const{signal:u}=r;return u.unsubscribe=()=>re.asap(l),u}},MJ=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},BJ=async function*(t,e){for await(const n of IJ(t))yield*MJ(n,e)},IJ=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},C5=(t,e,n,r)=>{const o=BJ(t,e);let s=0,a,l=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:c,value:f}=await o.next();if(c){l(),u.close();return}let p=f.byteLength;if(n){let m=s+=p;n(m)}u.enqueue(new Uint8Array(f))}catch(c){throw l(c),c}},cancel(u){return l(u),o.return()}},{highWaterMark:2})},jp=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",E5=jp&&typeof ReadableStream=="function",RJ=jp&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),k5=(t,...e)=>{try{return!!t(...e)}catch{return!1}},LJ=E5&&k5(()=>{let t=!1;const e=new Request(Hn.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),S5=64*1024,Bb=E5&&k5(()=>re.isReadableStream(new Response("").body)),qp={stream:Bb&&(t=>t.body)};jp&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!qp[e]&&(qp[e]=re.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new rt(`Response type '${e}' is not supported`,rt.ERR_NOT_SUPPORT,r)})})})(new Response);const DJ=async t=>{if(t==null)return 0;if(re.isBlob(t))return t.size;if(re.isSpecCompliantForm(t))return(await new Request(Hn.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(re.isArrayBufferView(t)||re.isArrayBuffer(t))return t.byteLength;if(re.isURLSearchParams(t)&&(t=t+""),re.isString(t))return(await RJ(t)).byteLength},PJ=async(t,e)=>{const n=re.toFiniteNumber(t.getContentLength());return n??DJ(e)},Ib={http:rJ,xhr:AJ,fetch:jp&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:s,timeout:a,onDownloadProgress:l,onUploadProgress:u,responseType:c,headers:f,withCredentials:p="same-origin",fetchOptions:m}=x5(t);c=c?(c+"").toLowerCase():"text";let g=OJ([o,s&&s.toAbortSignal()],a),b;const y=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let w;try{if(u&&LJ&&n!=="get"&&n!=="head"&&(w=await PJ(f,r))!==0){let T=new Request(e,{method:"POST",body:r,duplex:"half"}),_;if(re.isFormData(r)&&(_=T.headers.get("content-type"))&&f.setContentType(_),T.body){const[A,D]=b5(w,Wp(v5(u)));r=C5(T.body,S5,A,D)}}re.isString(p)||(p=p?"include":"omit");const x="credentials"in Request.prototype;b=new Request(e,{...m,signal:g,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:x?p:void 0});let S=await fetch(b);const E=Bb&&(c==="stream"||c==="response");if(Bb&&(l||E&&y)){const T={};["status","statusText","headers"].forEach(L=>{T[L]=S[L]});const _=re.toFiniteNumber(S.headers.get("content-length")),[A,D]=l&&b5(_,Wp(v5(l),!0))||[];S=new Response(C5(S.body,S5,A,()=>{D&&D(),y&&y()}),T)}c=c||"text";let C=await qp[re.findKey(qp,c)||"text"](S,t);return!E&&y&&y(),await new Promise((T,_)=>{g5(T,_,{data:C,headers:sr.from(S.headers),status:S.status,statusText:S.statusText,config:t,request:b})})}catch(x){throw y&&y(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new rt("Network Error",rt.ERR_NETWORK,t,b),{cause:x.cause||x}):rt.from(x,x&&x.code,t,b)}})};re.forEach(Ib,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const _5=t=>`- ${t}`,VJ=t=>re.isFunction(t)||t===null||t===!1,T5={getAdapter:t=>{t=re.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let s=0;s<e;s++){n=t[s];let a;if(r=n,!VJ(n)&&(r=Ib[(a=String(n)).toLowerCase()],r===void 0))throw new rt(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+s]=r}if(!r){const s=Object.entries(o).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=e?s.length>1?`since :
|
|
281
281
|
`+s.map(_5).join(`
|
|
282
282
|
`):" "+_5(s[0]):"as no adapter specified";throw new rt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Ib};function Rb(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new _l(null,t)}function A5(t){return Rb(t),t.headers=sr.from(t.headers),t.data=Mb.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),T5.getAdapter(t.adapter||fc.adapter)(t).then(function(r){return Rb(t),r.data=Mb.call(t,t.transformResponse,r),r.headers=sr.from(r.headers),r},function(r){return m5(r)||(Rb(t),r&&r.response&&(r.response.data=Mb.call(t,t.transformResponse,r.response),r.response.headers=sr.from(r.response.headers))),Promise.reject(r)})}const O5="1.8.4",Kp={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Kp[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const M5={};Kp.transitional=function(e,n,r){function o(s,a){return"[Axios v"+O5+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,l)=>{if(e===!1)throw new rt(o(a," has been removed"+(n?" in "+n:"")),rt.ERR_DEPRECATED);return n&&!M5[a]&&(M5[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,a,l):!0}},Kp.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function FJ(t,e,n){if(typeof t!="object")throw new rt("options must be an object",rt.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const s=r[o],a=e[s];if(a){const l=t[s],u=l===void 0||a(l,s,t);if(u!==!0)throw new rt("option "+s+" must be "+u,rt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new rt("Unknown option "+s,rt.ERR_BAD_OPTION)}}const Gp={assertOptions:FJ,validators:Kp},$o=Gp.validators;let da=class{constructor(e){this.defaults=e,this.interceptors={request:new d5,response:new d5}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
283
|
-
`+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ca(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Gp.assertOptions(r,{silentJSONParsing:$o.transitional($o.boolean),forcedJSONParsing:$o.transitional($o.boolean),clarifyTimeoutError:$o.transitional($o.boolean)},!1),o!=null&&(re.isFunction(o)?n.paramsSerializer={serialize:o}:Gp.assertOptions(o,{encode:$o.function,serialize:$o.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Gp.assertOptions(n,{baseUrl:$o.spelling("baseURL"),withXsrfToken:$o.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&re.merge(s.common,s[n.method]);s&&re.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=sr.concat(a,s);const l=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let f,p=0,m;if(!u){const b=[A5.bind(this),void 0];for(b.unshift.apply(b,l),b.push.apply(b,c),m=b.length,f=Promise.resolve(n);p<m;)f=f.then(b[p++],b[p++]);return f}m=l.length;let g=n;for(p=0;p<m;){const b=l[p++],y=l[p++];try{g=b(g)}catch(w){y.call(this,w);break}}try{f=A5.call(this,g)}catch(b){return Promise.reject(b)}for(p=0,m=c.length;p<m;)f=f.then(c[p++],c[p++]);return f}getUri(e){e=ca(this.defaults,e);const n=y5(e.baseURL,e.url,e.allowAbsoluteUrls);return c5(n,e.params,e.paramsSerializer)}};re.forEach(["delete","get","head","options"],function(e){da.prototype[e]=function(n,r){return this.request(ca(r||{},{method:e,url:n,data:(r||{}).data}))}}),re.forEach(["post","put","patch"],function(e){function n(r){return function(s,a,l){return this.request(ca(l||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}da.prototype[e]=n(),da.prototype[e+"Form"]=n(!0)});let $J=class E_{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(l=>{r.subscribe(l),s=l}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},e(function(s,a,l){r.reason||(r.reason=new _l(s,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new E_(function(o){e=o}),cancel:e}}};function zJ(t){return function(n){return t.apply(null,n)}}function HJ(t){return re.isObject(t)&&t.isAxiosError===!0}const Lb={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Lb).forEach(([t,e])=>{Lb[e]=t});function B5(t){const e=new da(t),n=JE(da.prototype.request,e);return re.extend(n,da.prototype,e,{allOwnKeys:!0}),re.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return B5(ca(t,o))},n}const on=B5(fc);on.Axios=da,on.CanceledError=_l,on.CancelToken=$J,on.isCancel=m5,on.VERSION=O5,on.toFormData=Hp,on.AxiosError=rt,on.Cancel=on.CanceledError,on.all=function(e){return Promise.all(e)},on.spread=zJ,on.isAxiosError=HJ,on.mergeConfig=ca,on.AxiosHeaders=sr,on.formToJSON=t=>p5(re.isHTMLForm(t)?new FormData(t):t),on.getAdapter=T5.getAdapter,on.HttpStatusCode=Lb,on.default=on;const{Axios:Ise,AxiosError:Rse,CanceledError:Lse,isCancel:Dse,CancelToken:Pse,VERSION:Vse,all:Fse,Cancel:$se,isAxiosError:zse,spread:Hse,toFormData:Use,AxiosHeaders:Wse,HttpStatusCode:jse,formToJSON:qse,getAdapter:Kse,mergeConfig:Gse}=on,UJ=async function(t){let e=[];try{if(this.enabled===!1||t.length===0||t.trim()==="")return e;if(this.limit&&t.length>this.limit)throw new Error("Text is too long");const n=await on.post(this.getApi(),{value:t}),r=this.transfer(n.data);e=(r==null?void 0:r.map(o=>o.errorText))||[],this!=null&&this.setSuggestions&&this.setSuggestions(r)}catch(n){console.error(n)}return e};class I5{constructor({api:e,limit:n,transfer:r,enabled:o}){Gt(this,"suggestions",[]);Gt(this,"api","");Gt(this,"enabled",!0);Gt(this,"limit");Gt(this,"transfer");this.suggestions=[],this.api=e,this.limit=n,this.transfer=r,this.enabled=o??!0}setSuggestions(e){this.suggestions=e}getSuggestions(e){var n;return Promise.resolve(((n=this.suggestions.find(r=>r.errorText.wrongWord===e))==null?void 0:n.spellData.correctWord)??[])}getApi(){return this.api}normalizeTextForLanguage(e){return e}proofreadText(e){return Promise.resolve(UJ.call(this,e))}toggleIsEnabled(){this.enabled=!this.enabled}setEnabled(e){this.enabled=e}getIsEnabled(){return this.enabled}}const WJ=Object.freeze(Object.defineProperty({__proto__:null,AI:LX,BaseKit:zE,Blockquote:tW,Bold:yC,BulletList:KU,Clear:sg,Code:Yz,CodeBlock:pU,Color:NC,Columns:lb,FindAndReplace:pY,FontFamily:lE,FontSize:QC,FormatPainter:ib,Fullscreen:UW,Heading:JC,Highlight:HU,History:Rg,HorizontalRule:BW,Image:ab,ImageUpload:ZX,ImportWord:VX,Indent:lX,Italic:wC,LineHeight:dE,Link:Mg,MoreMark:oX,OrderedList:JU,Preview:sY,Printer:gY,Proofreader:I5,SlashCommand:TX,SpellcheckerExtension:YE,Strike:CC,SubAndSuperScript:tX,Table:bb,TaskList:NU,TextAlign:ZC,Underline:xC,Video:jE,VideoUpload:iY},Symbol.toStringTag,{value:"Module"})),jJ='<page id="ft6nbbxs" extend="false" pagenumber="1" force="false"><h1 id="tk6n64mj" extend=""false""><strong>Introduction(English)</strong></h1><p id="s864ng1o" extend=""false"">MyMy Editor is open-source document editor based on Vue3 and Tiptap. MyMy Editor provides comprehensive document editing capabilities, supports pagination, supports Markdown syntax, offers basic rich text editing functions, allows for the insertion of various node types in multiple formats, provides a variety of practical tools, and supports setting page styles. It also supports exporting in various formats, printing and print preview, block-level document editing, adding custom extensions, multi-language settings, and a dark theme.</p><h1 id="jm9johtz" extend=""false""><strong>소개(국문)</strong></h1><p id="0qei01hl" extend=""false"">마이마이 에디터는 Vue3과 Tiptap을 기반으로 한 오픈소스 문서 편집기입니다. 마이마이 에디터는 포괄적인 문서 편집 기능을 제공하며, 페이지네이션, 마크다운 구문 지원, 기본적인 리치 텍스트 편집 기능, 다양한 형식의 다양한 노드 유형 삽입, 다양한 실용적인 도구 제공, 페이지 스타일 설정 지원 등을 제공합니다. 또한 다양한 형식으로 내보내기, 인쇄 및 인쇄 미리보기, 블록 수준의 문서 편집, 사용자 지정 확장 추가, 다국어 설정 및 다크 테마를 지원합니다.마이마이 에디터는 Vue3과 Tiptap을 기반으로 한 오픈소스 문서 편집기입니다. 마이마이 에디터는 포괄적인 문서 편집 기능을 제공하며, 페이지네이션, 마크다운 구문 지원, 기본적인 리치 텍스트 편집 기능, 다양한 형식의 다양한 노드 유형 삽입, 다양한 실용적인 도구 제공, 페이지 스타일 설정 지원 등을 제공합니다. 또한 다양한 형식으로 내보내기, 인쇄 및 인쇄 미리보기, 블록 수준의 문서 편집, 사용자 지정 확장 추가, 다국어 설정 및 다크 테마를 지원합니다.</p><blockquote class="blockquote"><p id="nekf7yi0" extend="false"><span style="color: rgb(115, 209, 61)"><strong><em>Make by VDC</em></strong></span></p></blockquote></page>';function qJ(){const t=window.localStorage.getItem("content"),e=i.ref(t||jJ),n=i.computed(()=>[zE.configure({placeholder:{showOnlyCurrent:!0},characterCount:{limit:5e4},excludes:{}}),Rg,lb,ib,sg,Mg,ab,bb]),r=et.useEventBus(Fn.RENDER_SUPER_TEXT);function o(s,a){const l={action:"status",payload:{id:s,status:a}};r.emit(l)}return{defaultExtensions:n,content:e,dispatchUpdateStatusSuperText:o}}const KJ={class:"flex items-center h-[32px] hover:bg-ed-muted rounded-md"},GJ={class:"text-sm flex items-center justify-center"},XJ={width:"18px",height:"18px",viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},YJ={id:"icon/填充色",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},JJ={id:"icon/背景颜色"},ZJ=["fill"],R5=i.defineComponent({__name:"HighlightActionButton",props:{editor:{},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0},tooltipOptions:{default:void 0}},setup(t){const e=t,n=i.ref(void 0),{state:r}=vn();function o(a){var l;(l=e.action)==null||l.call(e,a)}function s(a){var l;(l=e.action)==null||l.call(e,n.value)}return i.watchEffect(()=>{const{color:a}=e.editor.getAttributes("highlight");r.highlight=a}),(a,l)=>(i.openBlock(),i.createElementBlock("div",KJ,[i.createVNode(je,{id:"highlight",tooltip:a.tooltip,disabled:a.disabled,action:s,"tooltip-options":a.tooltipOptions},{icon:i.withCtx(()=>[i.createElementVNode("span",GJ,[(i.openBlock(),i.createElementBlock("svg",XJ,[i.createElementVNode("g",YJ,[i.createElementVNode("g",JJ,[l[1]||(l[1]=i.createElementVNode("g",{id:"编组",fill:"currentColor"},[i.createElementVNode("g",{id:"矩形",transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)"},[i.createElementVNode("path",{d:"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z","fill-rule":"nonzero"}),i.createElementVNode("path",{d:"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z","fill-rule":"evenodd"}),i.createElementVNode("path",{d:"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z","fill-rule":"nonzero"})])],-1)),i.createElementVNode("path",{id:"矩形",d:"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z",fill:n.value||"#FBDE28"},null,8,ZJ)])])]))])]),_:1},8,["tooltip","disabled","tooltip-options"]),i.createVNode(dC,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=u=>n.value=u),highlight:"",disabled:a.disabled,onChange:o},{default:i.withCtx(()=>[i.createVNode(i.unref(_n),{variant:"ghost",size:"icon",class:"w-3 h-[32px] rounded-l-none hover:bg-ed-muted-foreground/20",disabled:a.disabled},{default:i.withCtx(()=>[i.createVNode(i.unref(jt),{class:"w-3 h-3 text-zinc-500",name:"MenuDown"})]),_:1},8,["disabled"])]),_:1},8,["modelValue","disabled"])]))}}),QJ={class:"min-w-32 flex flex-row h-full items-center leading-none gap-0.5 p-2 w-full bg-ed-background rounded-lg shadow-sm border border-ed-border"},Db=i.defineComponent({__name:"TableBubbleMenu",props:{editor:{}},setup(t){const e=t,n=({editor:y})=>vd(y.view.state,"table"),{t:r}=St();function o(){e.editor.chain().focus().addColumnBefore().run()}function s(){e.editor.chain().focus().addColumnAfter().run()}function a(){e.editor.chain().focus().deleteColumn().run()}function l(){e.editor.chain().focus().addRowBefore().run()}function u(){e.editor.chain().focus().addRowAfter().run()}function c(){e.editor.chain().focus().deleteRow().run()}function f(){e.editor.chain().focus().mergeCells().run()}function p(){var y;(y=e.editor)==null||y.chain().focus().splitCell().run()}function m(){e.editor.chain().focus().deleteTable().run()}function g(y){e.editor.chain().focus().setTableCellBackground(y).run()}const b=()=>{var T;const{view:y,state:{selection:{from:w}}}=e.editor,x=y.domAtPos(w).node;if(!x)return new DOMRect(-1e3,-1e3,0,0);const S=x.nodeType===Node.TEXT_NODE?x.parentElement:x,E=(T=S==null?void 0:S.closest)==null?void 0:T.call(S,".tableWrapper");return E?E.getBoundingClientRect():new DOMRect(-1e3,-1e3,0,0)};return(y,w)=>(i.openBlock(),i.createBlock(i.unref(_d),{editor:y.editor,"plugin-key":"table","should-show":n,"update-delay":0,"tippy-options":{maxWidth:"auto",getReferenceClientRect:b}},{default:i.withCtx(()=>{var x,S,E,C,T,_,A,D,L;return[i.createElementVNode("div",QJ,[i.createVNode(je,{icon:"TablerColumnInsertLeft",iconClass:"w-5 h-5",tooltip:i.unref(r)("editor.table.menu.insertColumnBefore"),action:o,"tooltip-options":{sideOffset:15},disabled:!((x=y.editor)!=null&&x.can().addColumnBefore())},null,8,["tooltip","disabled"]),i.createVNode(je,{icon:"TablerColumnInsertRight",tooltip:i.unref(r)("editor.table.menu.insertColumnAfter"),iconClass:"w-5 h-5",action:s,"tooltip-options":{sideOffset:15},disabled:!((S=y.editor)!=null&&S.can().addColumnAfter())},null,8,["tooltip","disabled"]),i.createVNode(je,{icon:"TablerColumnRemove",action:a,iconClass:"w-5 h-5",tooltip:i.unref(r)("editor.table.menu.deleteColumn"),"tooltip-options":{sideOffset:15},disabled:!((E=y.editor)!=null&&E.can().deleteColumn())},null,8,["tooltip","disabled"]),i.createVNode(i.unref(oi),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),i.createVNode(je,{icon:"TablerRowInsertTop",action:l,iconClass:"w-5 h-5",tooltip:i.unref(r)("editor.table.menu.insertRowAbove"),"tooltip-options":{sideOffset:15},disabled:!((C=y.editor)!=null&&C.can().addRowBefore())},null,8,["tooltip","disabled"]),i.createVNode(je,{icon:"TablerRowInsertBottom",action:u,iconClass:"w-5 h-5",tooltip:i.unref(r)("editor.table.menu.insertRowBelow"),"tooltip-options":{sideOffset:15},disabled:!((T=y.editor)!=null&&T.can().addRowAfter())},null,8,["tooltip","disabled"]),i.createVNode(je,{icon:"TablerRowRemove",action:c,iconClass:"w-5 h-5",tooltip:i.unref(r)("editor.table.menu.deleteRow"),"tooltip-options":{sideOffset:15},disabled:!((_=y.editor)!=null&&_.can().deleteRow())},null,8,["tooltip","disabled"]),i.createVNode(i.unref(oi),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),i.createVNode(je,{icon:"TableCellsMerge",action:f,iconClass:"w-5 h-5",tooltip:i.unref(r)("editor.table.menu.mergeCells"),"tooltip-options":{sideOffset:15},disabled:!((A=y.editor)!=null&&A.can().mergeCells())},null,8,["tooltip","disabled"]),i.createVNode(je,{icon:"TableCellsSplit",action:p,iconClass:"w-5 h-5",tooltip:i.unref(r)("editor.table.menu.splitCells"),"tooltip-options":{sideOffset:15},disabled:!((D=y.editor)!=null&&D.can().splitCell())},null,8,["tooltip","disabled"]),i.createVNode(i.unref(oi),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),i.createVNode(R5,{editor:y.editor,tooltip:i.unref(r)("editor.table.menu.setCellsBgColor"),action:g,"tooltip-options":{sideOffset:15}},null,8,["editor","tooltip"]),i.createVNode(je,{icon:"Trash2",tooltip:i.unref(r)("editor.table.menu.deleteTable"),iconClass:"w-5 h-5",action:m,"tooltip-options":{sideOffset:15},disabled:!((L=y.editor)!=null&&L.can().deleteTable())},null,8,["tooltip","disabled"])])]}),_:1},8,["editor","tippy-options"]))}}),NJ={class:"p-2 bg-white border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800"},eZ={class:"flex items-center gap-1"},Pb=i.defineComponent({__name:"ColumnsBubbleMenu",props:{editor:{},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=({editor:l})=>vd(l.view.state,"columns"),r=()=>{const l=cC(e.editor,"columns");return(l==null?void 0:l.getBoundingClientRect())||new DOMRect(-1e3,-1e3,0,0)},o=()=>{e.editor.chain().focus().setLayout(ia.SidebarLeft).run()},s=()=>{e.editor.chain().focus().setLayout(ia.SidebarRight).run()},a=()=>{e.editor.chain().focus().setLayout(ia.TwoColumn).run()};return(l,u)=>(i.openBlock(),i.createBlock(i.unref(_d),{editor:l.editor,"plugin-key":"columns","should-show":n,"update-delay":0,"tippy-options":{offset:[0,8],popperOptions:{modifiers:[{name:"flip",enabled:!1}]},getReferenceClientRect:r,plugins:[i.unref(mB)],sticky:"popper"}},{default:i.withCtx(()=>[i.createElementVNode("div",NJ,[i.createElementVNode("div",eZ,[i.createVNode(je,{id:"panel-left",title:"ok",icon:"PanelLeft",tooltip:"tooltip",action:o,"is-active":()=>l.editor.isActive("columns",{layout:i.unref(ia).SidebarLeft}),"tooltip-options":{sideOffset:15}},null,8,["is-active"]),i.createVNode(je,{id:"columns",title:"ok",icon:"Columns",tooltip:"tooltip",action:a,"is-active":()=>l.editor.isActive("columns",{layout:i.unref(ia).TwoColumn}),"tooltip-options":{sideOffset:15}},null,8,["is-active"]),i.createVNode(je,{id:"panel-right",title:"ok",icon:"PanelRight",tooltip:"tooltip",action:s,"is-active":()=>l.editor.isActive("columns",{layout:i.unref(ia).SidebarRight}),"tooltip-options":{sideOffset:15}},null,8,["is-active"])])])]),_:1},8,["editor","tippy-options"]))}}),tZ={class:"flex items-center gap-2 p-2 bg-white border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800"},nZ=["href"],rZ={class:"flex flex-nowrap"},oZ=i.defineComponent({__name:"LinkViewBlock",props:{editor:{},link:{default:void 0}},emits:["clear","edit"],setup(t,{emit:e}){const{t:n}=St(),r=e;function o(){r("clear")}function s(){r("edit")}return(a,l)=>(i.openBlock(),i.createElementBlock("div",tZ,[i.createElementVNode("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",class:"text-sm underline break-all"},i.toDisplayString(i.unref(nt.truncate)(a.link,{length:50,omission:"…"})),9,nZ),a.link?(i.openBlock(),i.createBlock(i.unref(oi),{key:0,orientation:"vertical",class:"h-4"})):i.createCommentVNode("",!0),i.createElementVNode("div",rZ,[i.createVNode(je,{icon:"Pencil",tooltip:i.unref(n)("editor.link.edit.tooltip"),action:s,"tooltip-options":{sideOffset:15}},null,8,["tooltip"]),i.createVNode(je,{icon:"Unlink",tooltip:i.unref(n)("editor.link.unlink.tooltip"),action:o,"tooltip-options":{sideOffset:15}},null,8,["tooltip"])])]))}}),Vb=i.defineComponent({__name:"LinkBubbleMenu",props:{editor:{},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=i.ref(!1),r=i.ref(),o={width:-2,height:16},s=i.computed(()=>{const{href:f}=e.editor.getAttributes("link");return f}),a=i.computed(()=>e.editor.isActive("link")),l=i.computed(()=>{var y;if(!n.value)return{};const f=e.editor.state.selection,p=e.editor.view.coordsAtPos(f.from),m=(y=r.value)==null?void 0:y.getBoundingClientRect(),g=p.left+((m==null?void 0:m.width)??0)+o.width>window.innerWidth,b=p.top+((m==null?void 0:m.height)??0)+o.height>window.innerHeight;return g||b?{left:g?`${p.left-((m==null?void 0:m.width)??0)-o.width}px`:`${p.left}px`,top:b?`${p.top-((m==null?void 0:m.height)??0)-o.height}px`:`${p.top}px`}:{left:`${p.left}px`,top:`${p.bottom+o.height}px`}});function u(f,p,m){e.editor.chain().extendMarkRange("link").insertContent({type:"text",text:p,marks:[{type:"link",attrs:{href:f,target:m?"_blank":""}}]}).setLink({href:f}).focus().run(),n.value=!1}function c(){e.editor.chain().extendMarkRange("link").unsetLink().focus().run(),n.value=!1}return(f,p)=>i.withDirectives((i.openBlock(),i.createBlock(i.unref(_d),{editor:f.editor,"update-delay":0,"tippy-options":{popperOptions:{modifiers:[{name:"flip",enabled:!0}]},appendTo:"parent",placement:"bottom-start",offset:[o.width,o.height],zIndex:9999,onHidden:()=>{n.value=!1}}},{default:i.withCtx(()=>[n.value?(i.openBlock(),i.createBlock(i.Teleport,{key:0,to:"#vdc-editor"},[i.createElementVNode("div",{ref_key:"editFormRef",ref:r,class:"fixed z-50",style:i.normalizeStyle(l.value)},[i.createVNode(C8,{class:"p-4",editor:f.editor,onOnSetLink:u},null,8,["editor"])],4)])):i.createCommentVNode("",!0),n.value?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(oZ,{key:1,editor:f.editor,link:s.value,onClear:c,onEdit:p[0]||(p[0]=m=>n.value=!0)},null,8,["editor","link"]))]),_:1},8,["editor","tippy-options"])),[[i.vShow,a.value]])}}),Fb=i.defineComponent({__name:"Badge",props:{variant:{},class:{}},setup(t){const e=t;return(n,r)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(Ae)(i.unref(iZ)({variant:e.variant}),e.class))},[i.renderSlot(n.$slots,"default")],2))}}),iZ=P1("inline-flex items-center rounded-full border px-2.5 py-0.5 font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-ed-primary text-ed-primary-foreground hover:bg-ed-primary/80",secondary:"border-transparent bg-ed-secondary text-ed-secondary-foreground hover:bg-ed-secondary/80",destructive:"border-transparent bg-ed-destructive text-ed-destructive-foreground hover:bg-ed-destructive/80",outline:"text-ed-foreground"}},defaultVariants:{variant:"default"}}),L5=(t,e,n,r,o)=>{const s=et.useEventBus(Fn.RENDER_SUPER_TEXT),a=E=>{if(!e.value||!t)return;const C=e.value.index,T=e.value.id,{state:_}=t,{tr:A}=_;let D=!1;_.doc.descendants((L,B)=>{var W,J;if(((W=L.attrs)==null?void 0:W[it.ID])===T){const ue=((J=L.attrs[it.TEXT])==null?void 0:J.trim())||"",X=E.trim();if(ue!==X){if(pE(X))return A.delete(B,B+1),D=!0,!1;const{[it.ELEMENT_ID]:H,...F}=L.attrs;A.setNodeMarkup(B,void 0,{...F,[it.TEXT]:X}),D=!0}return!1}return!0}),D&&t&&t.view.dispatch(A),C!==-1&&(n.value[C].text=E,n.value[C].textOriginal=E)},l=()=>{if(!(t!=null&&t.view.dom))return[];const E=[],C=t==null?void 0:t.view.dom.querySelectorAll("[node-id]"),T=new Map;return C.forEach(_=>{const A=_.getBoundingClientRect().top;T.set(A,_)}),E.push(...T.values()),E},u=E=>{const C=E.closest(`#${r}`);if(!C)return;const T=C.getBoundingClientRect().top,_=C==null?void 0:C.scrollTop;return E.getBoundingClientRect().top-(T-_)},c=()=>{l().forEach((C,T)=>{n.value[T]&&(n.value[T].visiblePosition=u(C))})},f=(E,C)=>{const T=n.value.findIndex(_=>_.id===E);T>-1&&(n.value[T].status=C)},p=E=>E.replace(/<p><\/p>/g,"<p> </p>"),m=async()=>{await i.nextTick();const C=l().map(T=>{const _=T.getAttribute("node-id"),A=T.getAttribute("book-mark-content"),D=T.getAttribute("page-id"),L=T.getAttribute("page-number"),B=T.getBoundingClientRect(),W=T.getAttribute("line-id"),J=T.getAttribute("element-id");return{position:B,text:p(A),id:_,pageId:D,pageNumber:L,visiblePosition:u(T),status:0,lineId:W,elementId:J,textOriginal:p(A)}});n.value=C},g=(E,C)=>{const T=E.bottom<=C.top,_=E.top>=C.bottom;return!(T||_)};async function b(){const E=o.value;!E||E.length===0||(E.sort((C,T)=>{const _=Number(C.getAttribute("index")),A=Number(T.getAttribute("index"));return _-A}),E.forEach(C=>C.classList.remove("super-text-truncate")),E.forEach((C,T)=>{const _=C.getBoundingClientRect();E.slice(T+1).forEach(A=>{const D=A.getBoundingClientRect();g(_,D)&&C.classList.add("super-text-truncate")})}))}const y=async E=>{await i.nextTick();const C=t==null?void 0:t.view.dom.querySelector(`[node-id='${E.dataId}']`),T=o.value.find(D=>D.getBoundingClientRect().top+9===(C==null?void 0:C.getBoundingClientRect().top));if(!T)return;const _=Number(T.getAttribute("index"));if(!E.text){T.querySelector(".super-text-lines").innerHTML=n.value[_].textOriginal,o.value.forEach(D=>D.classList.remove("hidden")),b();return}T.querySelector(".super-text-lines").innerHTML=p(E.text),T.classList.remove("super-text-truncate");const A=T.getBoundingClientRect();o.value.forEach((D,L)=>{if(L!==_){const B=D.getBoundingClientRect();g(A,B)&&D.classList.add("hidden")}})},w=E=>{switch(E.action){case"hover":y(E.payload);break;case"status":f(E.payload.id,E.payload.status);break;case"render":m();break;default:console.log("There is no action")}},x=(E,C)=>{const T=E.currentTarget;T.classList.remove("super-text-truncate");const _=T.getBoundingClientRect();o.value.forEach((A,D)=>{if(D!==C){const L=A.getBoundingClientRect();g(_,L)&&A.classList.add("hidden")}})},S=()=>{o.value.forEach(E=>E.classList.remove("hidden")),b()};return i.onBeforeMount(()=>{s.on(w),window.addEventListener("resize",c)}),i.onBeforeUnmount(()=>{s.off(w),window.removeEventListener("resize",c)}),i.watch(()=>n,async()=>{await i.nextTick(),b()},{deep:!0}),{onUpdate:a,updateVisiblePositions:c,hanldeTruncateSuperTexts:b,eventListener:w,handleMouseOver:x,handleMouseLeave:S}},sZ=["index","book-mark-id","line-id","onMouseover"],aZ=["innerHTML"],lZ=eo(i.defineComponent({__name:"SuperTextView",props:{editor:l4},setup(t){const e=t,n=i.ref([]),r=i.ref([]),o=i.ref(!1),s=i.ref(!1),a=i.ref(null),l=i.inject("isMobile",!1),u=i.inject("canEditSuper",i.ref(!0)),c=i.inject("superTextViewCustomClass",""),{onUpdate:f,handleMouseOver:p,handleMouseLeave:m}=L5(e.editor,a,r,"editor-container",n),g=(b,y)=>{u.value&&(a.value={id:b.id,text:b.text,elementId:b.elementId,index:y},o.value=!0,l&&(s.value=!0))};return(b,y)=>{const w=jt;return i.openBlock(),i.createElementBlock("div",{id:"super-text-view-wrapper",class:i.normalizeClass(["relative w-[32%]",i.unref(c)])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,(x,S)=>{var E;return i.openBlock(),i.createElementBlock("div",{key:x.id,ref_for:!0,ref_key:"superTextRefs",ref:n,index:S,"book-mark-id":x.id,"line-id":x.lineId,class:i.normalizeClass(i.unref(Ae)("super-text-view","absolute w-full px-2 translate-y-[-10px] group",{})),style:i.normalizeStyle({top:`${x.visiblePosition||((E=x.position)==null?void 0:E.top)}px`}),onMouseover:C=>i.unref(p)(C,S),onMouseleave:y[0]||(y[0]=(...C)=>i.unref(m)&&i.unref(m)(...C))},[i.createVNode(i.unref(Fb),{role:"text",variant:"outline",class:i.normalizeClass(i.unref(Ae)("break-all whitespace-normal w-full !font-normal px-1 pt-0 m-0 !leading-tight rounded-sm text-white border-transparent",x.elementId?"bg-black":"bg-red-500 cursor-pointer",{"cursor-default":!i.unref(u)})),onDblclick:C=>g(x,S)},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"super-text-lines",innerHTML:x.text},null,8,aZ),i.createVNode(w,{name:"triangle",class:i.normalizeClass(["absolute top-1.5 rotate-90 w-3 h-3 right-0",x.elementId?"text-black":"text-red-500"])},null,8,["class"])]),_:2},1032,["class","onDblclick"])],46,sZ)}),128)),!i.unref(l)&&a.value?(i.openBlock(),i.createBlock(ac,{key:0,open:o.value,editor:e.editor,"super-text-init":a.value.text,"super-text-element-id":a.value.elementId,onClose:y[1]||(y[1]=x=>o.value=!1),onSave:i.unref(f)},null,8,["open","editor","super-text-init","super-text-element-id","onSave"])):i.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-b637b2c3"]]),uZ=["index","book-mark-id","line-id","onMouseover"],cZ=["innerHTML"],dZ=eo(i.defineComponent({__name:"SuperTextViewComment",props:{editor:{},disableSuperInput:{type:Boolean}},setup(t){const e=t,n=i.ref([]),r=i.ref([]),o=i.ref(!1),s=i.ref(!1),a=i.ref(null),l=i.inject("isMobile",!1),u=i.inject("isEditable",i.ref(!0)),c=i.inject("superTextViewCustomClass",""),{onUpdate:f,handleMouseOver:p,handleMouseLeave:m}=L5(e.editor,a,r,"editor-container-comment",n),g=(b,y)=>{u.value&&(a.value={id:b.id,text:b.text,elementId:b.elementId,index:y},e.disableSuperInput||(o.value=!0),l&&(s.value=!0))};return(b,y)=>{const w=jt;return i.openBlock(),i.createElementBlock("div",{id:"super-text-view-wrapper",class:i.normalizeClass(["relative w-[32%]",i.unref(c)])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,(x,S)=>{var E;return i.openBlock(),i.createElementBlock("div",{key:x.id,ref_for:!0,ref_key:"superTextRefs",ref:n,index:S,"book-mark-id":x.id,"line-id":x.lineId,class:i.normalizeClass(i.unref(Ae)("super-text-view","absolute w-full px-2 translate-y-[-10px] group",{})),style:i.normalizeStyle({top:`${x.visiblePosition||((E=x.position)==null?void 0:E.top)}px`}),onMouseover:C=>i.unref(p)(C,S),onMouseleave:y[0]||(y[0]=(...C)=>i.unref(m)&&i.unref(m)(...C))},[i.createVNode(i.unref(Fb),{role:"text",variant:"outline",class:i.normalizeClass(i.unref(Ae)("break-all whitespace-normal w-full !font-normal px-1 pt-0 m-0 !leading-tight rounded-sm text-white border-transparent",x.elementId?"bg-black":"bg-red-500 cursor-pointer",{"cursor-default":!i.unref(u)})),onDblclick:C=>g(x,S)},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"super-text-lines",innerHTML:x.text},null,8,cZ),i.createVNode(w,{name:"triangle",class:i.normalizeClass(["absolute top-1.5 rotate-90 w-3 h-3 right-0",x.elementId?"text-black":"text-red-500"])},null,8,["class"])]),_:2},1032,["class","onDblclick"])],46,uZ)}),128)),!i.unref(l)&&a.value&&!b.disableSuperInput?(i.openBlock(),i.createBlock(ac,{key:0,open:o.value,editor:e.editor,"super-text-init":a.value.text,"super-text-element-id":a.value.elementId,onClose:y[1]||(y[1]=x=>o.value=!1),onSave:i.unref(f)},null,8,["open","editor","super-text-init","super-text-element-id","onSave"])):i.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-df3461f6"]]),D5=t=>{t=t.replace(/\s*style="[^"]*"/g,"");const e=t.match(/<!--StartFragment-->([\s\S]*?)<!--EndFragment-->/),r=(e?e[1]:t).replace(/<br\s*\/?>/gi,`
|
|
283
|
+
`+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ca(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Gp.assertOptions(r,{silentJSONParsing:$o.transitional($o.boolean),forcedJSONParsing:$o.transitional($o.boolean),clarifyTimeoutError:$o.transitional($o.boolean)},!1),o!=null&&(re.isFunction(o)?n.paramsSerializer={serialize:o}:Gp.assertOptions(o,{encode:$o.function,serialize:$o.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Gp.assertOptions(n,{baseUrl:$o.spelling("baseURL"),withXsrfToken:$o.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&re.merge(s.common,s[n.method]);s&&re.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=sr.concat(a,s);const l=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(u=u&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const c=[];this.interceptors.response.forEach(function(y){c.push(y.fulfilled,y.rejected)});let f,p=0,m;if(!u){const b=[A5.bind(this),void 0];for(b.unshift.apply(b,l),b.push.apply(b,c),m=b.length,f=Promise.resolve(n);p<m;)f=f.then(b[p++],b[p++]);return f}m=l.length;let g=n;for(p=0;p<m;){const b=l[p++],y=l[p++];try{g=b(g)}catch(w){y.call(this,w);break}}try{f=A5.call(this,g)}catch(b){return Promise.reject(b)}for(p=0,m=c.length;p<m;)f=f.then(c[p++],c[p++]);return f}getUri(e){e=ca(this.defaults,e);const n=y5(e.baseURL,e.url,e.allowAbsoluteUrls);return c5(n,e.params,e.paramsSerializer)}};re.forEach(["delete","get","head","options"],function(e){da.prototype[e]=function(n,r){return this.request(ca(r||{},{method:e,url:n,data:(r||{}).data}))}}),re.forEach(["post","put","patch"],function(e){function n(r){return function(s,a,l){return this.request(ca(l||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}da.prototype[e]=n(),da.prototype[e+"Form"]=n(!0)});let $J=class E_{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(l=>{r.subscribe(l),s=l}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},e(function(s,a,l){r.reason||(r.reason=new _l(s,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new E_(function(o){e=o}),cancel:e}}};function zJ(t){return function(n){return t.apply(null,n)}}function HJ(t){return re.isObject(t)&&t.isAxiosError===!0}const Lb={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Lb).forEach(([t,e])=>{Lb[e]=t});function B5(t){const e=new da(t),n=JE(da.prototype.request,e);return re.extend(n,da.prototype,e,{allOwnKeys:!0}),re.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return B5(ca(t,o))},n}const on=B5(fc);on.Axios=da,on.CanceledError=_l,on.CancelToken=$J,on.isCancel=m5,on.VERSION=O5,on.toFormData=Hp,on.AxiosError=rt,on.Cancel=on.CanceledError,on.all=function(e){return Promise.all(e)},on.spread=zJ,on.isAxiosError=HJ,on.mergeConfig=ca,on.AxiosHeaders=sr,on.formToJSON=t=>p5(re.isHTMLForm(t)?new FormData(t):t),on.getAdapter=T5.getAdapter,on.HttpStatusCode=Lb,on.default=on;const{Axios:Ise,AxiosError:Rse,CanceledError:Lse,isCancel:Dse,CancelToken:Pse,VERSION:Vse,all:Fse,Cancel:$se,isAxiosError:zse,spread:Hse,toFormData:Use,AxiosHeaders:Wse,HttpStatusCode:jse,formToJSON:qse,getAdapter:Kse,mergeConfig:Gse}=on,UJ=async function(t){let e=[];try{if(this.enabled===!1||t.length===0||t.trim()==="")return e;if(this.limit&&t.length>this.limit)throw new Error("Text is too long");const n=await on.post(this.getApi(),{value:t}),r=this.transfer(n.data);e=(r==null?void 0:r.map(o=>o.errorText))||[],this!=null&&this.setSuggestions&&this.setSuggestions(r)}catch(n){console.error(n)}return e};class I5{constructor({api:e,limit:n,transfer:r,enabled:o}){Gt(this,"suggestions",[]);Gt(this,"api","");Gt(this,"enabled",!0);Gt(this,"limit");Gt(this,"transfer");this.suggestions=[],this.api=e,this.limit=n,this.transfer=r,this.enabled=o??!0}setSuggestions(e){this.suggestions=e}getSuggestions(e){var n;return Promise.resolve(((n=this.suggestions.find(r=>r.errorText.wrongWord===e))==null?void 0:n.spellData.correctWord)??[])}getApi(){return this.api}normalizeTextForLanguage(e){return e}proofreadText(e){return Promise.resolve(UJ.call(this,e))}toggleIsEnabled(){this.enabled=!this.enabled}setEnabled(e){this.enabled=e}getIsEnabled(){return this.enabled}}const WJ=Object.freeze(Object.defineProperty({__proto__:null,AI:LX,BaseKit:zE,Blockquote:tW,Bold:yC,BulletList:KU,Clear:sg,Code:Yz,CodeBlock:pU,Color:NC,Columns:lb,FindAndReplace:pY,FontFamily:lE,FontSize:QC,FormatPainter:ib,Fullscreen:UW,Heading:JC,Highlight:HU,History:Rg,HorizontalRule:BW,Image:ab,ImageUpload:ZX,ImportWord:VX,Indent:lX,Italic:wC,LineHeight:dE,Link:Mg,MoreMark:oX,OrderedList:JU,Preview:sY,Printer:gY,Proofreader:I5,SlashCommand:TX,SpellcheckerExtension:YE,Strike:CC,SubAndSuperScript:tX,Table:bb,TaskList:NU,TextAlign:ZC,Underline:xC,Video:jE,VideoUpload:iY},Symbol.toStringTag,{value:"Module"})),jJ='<page id="ft6nbbxs" extend="false" pagenumber="1" force="false"><h1 id="tk6n64mj" extend=""false""><strong>Introduction(English)</strong></h1><p id="s864ng1o" extend=""false"">MyMy Editor is open-source document editor based on Vue3 and Tiptap. MyMy Editor provides comprehensive document editing capabilities, supports pagination, supports Markdown syntax, offers basic rich text editing functions, allows for the insertion of various node types in multiple formats, provides a variety of practical tools, and supports setting page styles. It also supports exporting in various formats, printing and print preview, block-level document editing, adding custom extensions, multi-language settings, and a dark theme.</p><h1 id="jm9johtz" extend=""false""><strong>소개(국문)</strong></h1><p id="0qei01hl" extend=""false"">마이마이 에디터는 Vue3과 Tiptap을 기반으로 한 오픈소스 문서 편집기입니다. 마이마이 에디터는 포괄적인 문서 편집 기능을 제공하며, 페이지네이션, 마크다운 구문 지원, 기본적인 리치 텍스트 편집 기능, 다양한 형식의 다양한 노드 유형 삽입, 다양한 실용적인 도구 제공, 페이지 스타일 설정 지원 등을 제공합니다. 또한 다양한 형식으로 내보내기, 인쇄 및 인쇄 미리보기, 블록 수준의 문서 편집, 사용자 지정 확장 추가, 다국어 설정 및 다크 테마를 지원합니다.마이마이 에디터는 Vue3과 Tiptap을 기반으로 한 오픈소스 문서 편집기입니다. 마이마이 에디터는 포괄적인 문서 편집 기능을 제공하며, 페이지네이션, 마크다운 구문 지원, 기본적인 리치 텍스트 편집 기능, 다양한 형식의 다양한 노드 유형 삽입, 다양한 실용적인 도구 제공, 페이지 스타일 설정 지원 등을 제공합니다. 또한 다양한 형식으로 내보내기, 인쇄 및 인쇄 미리보기, 블록 수준의 문서 편집, 사용자 지정 확장 추가, 다국어 설정 및 다크 테마를 지원합니다.</p><blockquote class="blockquote"><p id="nekf7yi0" extend="false"><span style="color: rgb(115, 209, 61)"><strong><em>Make by VDC</em></strong></span></p></blockquote></page>';function qJ(){const t=window.localStorage.getItem("content"),e=i.ref(t||jJ),n=i.computed(()=>[zE.configure({placeholder:{showOnlyCurrent:!0},characterCount:{limit:5e4},excludes:{}}),Rg,lb,ib,sg,Mg,ab,bb]),r=et.useEventBus(Fn.RENDER_SUPER_TEXT);function o(s,a){const l={action:"status",payload:{id:s,status:a}};r.emit(l)}return{defaultExtensions:n,content:e,dispatchUpdateStatusSuperText:o}}const KJ={class:"flex items-center h-[32px] hover:bg-ed-muted rounded-md"},GJ={class:"text-sm flex items-center justify-center"},XJ={width:"18px",height:"18px",viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},YJ={id:"icon/填充色",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},JJ={id:"icon/背景颜色"},ZJ=["fill"],R5=i.defineComponent({__name:"HighlightActionButton",props:{editor:{},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0},tooltipOptions:{default:void 0}},setup(t){const e=t,n=i.ref(void 0),{state:r}=vn();function o(a){var l;(l=e.action)==null||l.call(e,a)}function s(a){var l;(l=e.action)==null||l.call(e,n.value)}return i.watchEffect(()=>{const{color:a}=e.editor.getAttributes("highlight");r.highlight=a}),(a,l)=>(i.openBlock(),i.createElementBlock("div",KJ,[i.createVNode(je,{id:"highlight",tooltip:a.tooltip,disabled:a.disabled,action:s,"tooltip-options":a.tooltipOptions},{icon:i.withCtx(()=>[i.createElementVNode("span",GJ,[(i.openBlock(),i.createElementBlock("svg",XJ,[i.createElementVNode("g",YJ,[i.createElementVNode("g",JJ,[l[1]||(l[1]=i.createElementVNode("g",{id:"编组",fill:"currentColor"},[i.createElementVNode("g",{id:"矩形",transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)"},[i.createElementVNode("path",{d:"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z","fill-rule":"nonzero"}),i.createElementVNode("path",{d:"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z","fill-rule":"evenodd"}),i.createElementVNode("path",{d:"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z","fill-rule":"nonzero"})])],-1)),i.createElementVNode("path",{id:"矩形",d:"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z",fill:n.value||"#FBDE28"},null,8,ZJ)])])]))])]),_:1},8,["tooltip","disabled","tooltip-options"]),i.createVNode(dC,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=u=>n.value=u),highlight:"",disabled:a.disabled,onChange:o},{default:i.withCtx(()=>[i.createVNode(i.unref(_n),{variant:"ghost",size:"icon",class:"w-3 h-[32px] rounded-l-none hover:bg-ed-muted-foreground/20",disabled:a.disabled},{default:i.withCtx(()=>[i.createVNode(i.unref(jt),{class:"w-3 h-3 text-zinc-500",name:"MenuDown"})]),_:1},8,["disabled"])]),_:1},8,["modelValue","disabled"])]))}}),QJ={class:"min-w-32 flex flex-row h-full items-center leading-none gap-0.5 p-2 w-full bg-ed-background rounded-lg shadow-sm border border-ed-border"},Db=i.defineComponent({__name:"TableBubbleMenu",props:{editor:{}},setup(t){const e=t,n=({editor:y})=>vd(y.view.state,"table"),{t:r}=St();function o(){e.editor.chain().focus().addColumnBefore().run()}function s(){e.editor.chain().focus().addColumnAfter().run()}function a(){e.editor.chain().focus().deleteColumn().run()}function l(){e.editor.chain().focus().addRowBefore().run()}function u(){e.editor.chain().focus().addRowAfter().run()}function c(){e.editor.chain().focus().deleteRow().run()}function f(){e.editor.chain().focus().mergeCells().run()}function p(){var y;(y=e.editor)==null||y.chain().focus().splitCell().run()}function m(){e.editor.chain().focus().deleteTable().run()}function g(y){e.editor.chain().focus().setTableCellBackground(y).run()}const b=()=>{var T;const{view:y,state:{selection:{from:w}}}=e.editor,x=y.domAtPos(w).node;if(!x)return new DOMRect(-1e3,-1e3,0,0);const S=x.nodeType===Node.TEXT_NODE?x.parentElement:x,E=(T=S==null?void 0:S.closest)==null?void 0:T.call(S,".tableWrapper");return E?E.getBoundingClientRect():new DOMRect(-1e3,-1e3,0,0)};return(y,w)=>(i.openBlock(),i.createBlock(i.unref(_d),{editor:y.editor,"plugin-key":"table","should-show":n,"update-delay":0,"tippy-options":{maxWidth:"auto",getReferenceClientRect:b}},{default:i.withCtx(()=>{var x,S,E,C,T,_,A,D,L;return[i.createElementVNode("div",QJ,[i.createVNode(je,{icon:"TablerColumnInsertLeft",iconClass:"w-5 h-5",tooltip:i.unref(r)("editor.table.menu.insertColumnBefore"),action:o,"tooltip-options":{sideOffset:15},disabled:!((x=y.editor)!=null&&x.can().addColumnBefore())},null,8,["tooltip","disabled"]),i.createVNode(je,{icon:"TablerColumnInsertRight",tooltip:i.unref(r)("editor.table.menu.insertColumnAfter"),iconClass:"w-5 h-5",action:s,"tooltip-options":{sideOffset:15},disabled:!((S=y.editor)!=null&&S.can().addColumnAfter())},null,8,["tooltip","disabled"]),i.createVNode(je,{icon:"TablerColumnRemove",action:a,iconClass:"w-5 h-5",tooltip:i.unref(r)("editor.table.menu.deleteColumn"),"tooltip-options":{sideOffset:15},disabled:!((E=y.editor)!=null&&E.can().deleteColumn())},null,8,["tooltip","disabled"]),i.createVNode(i.unref(oi),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),i.createVNode(je,{icon:"TablerRowInsertTop",action:l,iconClass:"w-5 h-5",tooltip:i.unref(r)("editor.table.menu.insertRowAbove"),"tooltip-options":{sideOffset:15},disabled:!((C=y.editor)!=null&&C.can().addRowBefore())},null,8,["tooltip","disabled"]),i.createVNode(je,{icon:"TablerRowInsertBottom",action:u,iconClass:"w-5 h-5",tooltip:i.unref(r)("editor.table.menu.insertRowBelow"),"tooltip-options":{sideOffset:15},disabled:!((T=y.editor)!=null&&T.can().addRowAfter())},null,8,["tooltip","disabled"]),i.createVNode(je,{icon:"TablerRowRemove",action:c,iconClass:"w-5 h-5",tooltip:i.unref(r)("editor.table.menu.deleteRow"),"tooltip-options":{sideOffset:15},disabled:!((_=y.editor)!=null&&_.can().deleteRow())},null,8,["tooltip","disabled"]),i.createVNode(i.unref(oi),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),i.createVNode(je,{icon:"TableCellsMerge",action:f,iconClass:"w-5 h-5",tooltip:i.unref(r)("editor.table.menu.mergeCells"),"tooltip-options":{sideOffset:15},disabled:!((A=y.editor)!=null&&A.can().mergeCells())},null,8,["tooltip","disabled"]),i.createVNode(je,{icon:"TableCellsSplit",action:p,iconClass:"w-5 h-5",tooltip:i.unref(r)("editor.table.menu.splitCells"),"tooltip-options":{sideOffset:15},disabled:!((D=y.editor)!=null&&D.can().splitCell())},null,8,["tooltip","disabled"]),i.createVNode(i.unref(oi),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),i.createVNode(R5,{editor:y.editor,tooltip:i.unref(r)("editor.table.menu.setCellsBgColor"),action:g,"tooltip-options":{sideOffset:15}},null,8,["editor","tooltip"]),i.createVNode(je,{icon:"Trash2",tooltip:i.unref(r)("editor.table.menu.deleteTable"),iconClass:"w-5 h-5",action:m,"tooltip-options":{sideOffset:15},disabled:!((L=y.editor)!=null&&L.can().deleteTable())},null,8,["tooltip","disabled"])])]}),_:1},8,["editor","tippy-options"]))}}),NJ={class:"p-2 bg-white border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800"},eZ={class:"flex items-center gap-1"},Pb=i.defineComponent({__name:"ColumnsBubbleMenu",props:{editor:{},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=({editor:l})=>vd(l.view.state,"columns"),r=()=>{const l=cC(e.editor,"columns");return(l==null?void 0:l.getBoundingClientRect())||new DOMRect(-1e3,-1e3,0,0)},o=()=>{e.editor.chain().focus().setLayout(ia.SidebarLeft).run()},s=()=>{e.editor.chain().focus().setLayout(ia.SidebarRight).run()},a=()=>{e.editor.chain().focus().setLayout(ia.TwoColumn).run()};return(l,u)=>(i.openBlock(),i.createBlock(i.unref(_d),{editor:l.editor,"plugin-key":"columns","should-show":n,"update-delay":0,"tippy-options":{offset:[0,8],popperOptions:{modifiers:[{name:"flip",enabled:!1}]},getReferenceClientRect:r,plugins:[i.unref(mB)],sticky:"popper"}},{default:i.withCtx(()=>[i.createElementVNode("div",NJ,[i.createElementVNode("div",eZ,[i.createVNode(je,{id:"panel-left",title:"ok",icon:"PanelLeft",tooltip:"tooltip",action:o,"is-active":()=>l.editor.isActive("columns",{layout:i.unref(ia).SidebarLeft}),"tooltip-options":{sideOffset:15}},null,8,["is-active"]),i.createVNode(je,{id:"columns",title:"ok",icon:"Columns",tooltip:"tooltip",action:a,"is-active":()=>l.editor.isActive("columns",{layout:i.unref(ia).TwoColumn}),"tooltip-options":{sideOffset:15}},null,8,["is-active"]),i.createVNode(je,{id:"panel-right",title:"ok",icon:"PanelRight",tooltip:"tooltip",action:s,"is-active":()=>l.editor.isActive("columns",{layout:i.unref(ia).SidebarRight}),"tooltip-options":{sideOffset:15}},null,8,["is-active"])])])]),_:1},8,["editor","tippy-options"]))}}),tZ={class:"flex items-center gap-2 p-2 bg-white border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800"},nZ=["href"],rZ={class:"flex flex-nowrap"},oZ=i.defineComponent({__name:"LinkViewBlock",props:{editor:{},link:{default:void 0}},emits:["clear","edit"],setup(t,{emit:e}){const{t:n}=St(),r=e;function o(){r("clear")}function s(){r("edit")}return(a,l)=>(i.openBlock(),i.createElementBlock("div",tZ,[i.createElementVNode("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",class:"text-sm underline break-all"},i.toDisplayString(i.unref(nt.truncate)(a.link,{length:50,omission:"…"})),9,nZ),a.link?(i.openBlock(),i.createBlock(i.unref(oi),{key:0,orientation:"vertical",class:"h-4"})):i.createCommentVNode("",!0),i.createElementVNode("div",rZ,[i.createVNode(je,{icon:"Pencil",tooltip:i.unref(n)("editor.link.edit.tooltip"),action:s,"tooltip-options":{sideOffset:15}},null,8,["tooltip"]),i.createVNode(je,{icon:"Unlink",tooltip:i.unref(n)("editor.link.unlink.tooltip"),action:o,"tooltip-options":{sideOffset:15}},null,8,["tooltip"])])]))}}),Vb=i.defineComponent({__name:"LinkBubbleMenu",props:{editor:{},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=i.ref(!1),r=i.ref(),o={width:-2,height:16},s=i.computed(()=>{const{href:f}=e.editor.getAttributes("link");return f}),a=i.computed(()=>e.editor.isActive("link")),l=i.computed(()=>{var y;if(!n.value)return{};const f=e.editor.state.selection,p=e.editor.view.coordsAtPos(f.from),m=(y=r.value)==null?void 0:y.getBoundingClientRect(),g=p.left+((m==null?void 0:m.width)??0)+o.width>window.innerWidth,b=p.top+((m==null?void 0:m.height)??0)+o.height>window.innerHeight;return g||b?{left:g?`${p.left-((m==null?void 0:m.width)??0)-o.width}px`:`${p.left}px`,top:b?`${p.top-((m==null?void 0:m.height)??0)-o.height}px`:`${p.top}px`}:{left:`${p.left}px`,top:`${p.bottom+o.height}px`}});function u(f,p,m){e.editor.chain().extendMarkRange("link").insertContent({type:"text",text:p,marks:[{type:"link",attrs:{href:f,target:m?"_blank":""}}]}).setLink({href:f}).focus().run(),n.value=!1}function c(){e.editor.chain().extendMarkRange("link").unsetLink().focus().run(),n.value=!1}return(f,p)=>i.withDirectives((i.openBlock(),i.createBlock(i.unref(_d),{editor:f.editor,"update-delay":0,"tippy-options":{popperOptions:{modifiers:[{name:"flip",enabled:!0}]},appendTo:"parent",placement:"bottom-start",offset:[o.width,o.height],zIndex:9999,onHidden:()=>{n.value=!1}}},{default:i.withCtx(()=>[n.value?(i.openBlock(),i.createBlock(i.Teleport,{key:0,to:"#vdc-editor"},[i.createElementVNode("div",{ref_key:"editFormRef",ref:r,class:"fixed z-50",style:i.normalizeStyle(l.value)},[i.createVNode(C8,{class:"p-4",editor:f.editor,onOnSetLink:u},null,8,["editor"])],4)])):i.createCommentVNode("",!0),n.value?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(oZ,{key:1,editor:f.editor,link:s.value,onClear:c,onEdit:p[0]||(p[0]=m=>n.value=!0)},null,8,["editor","link"]))]),_:1},8,["editor","tippy-options"])),[[i.vShow,a.value]])}}),Fb=i.defineComponent({__name:"Badge",props:{variant:{},class:{}},setup(t){const e=t;return(n,r)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(i.unref(Ae)(i.unref(iZ)({variant:e.variant}),e.class))},[i.renderSlot(n.$slots,"default")],2))}}),iZ=P1("inline-flex items-center rounded-full border px-2.5 py-0.5 font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-ed-primary text-ed-primary-foreground hover:bg-ed-primary/80",secondary:"border-transparent bg-ed-secondary text-ed-secondary-foreground hover:bg-ed-secondary/80",destructive:"border-transparent bg-ed-destructive text-ed-destructive-foreground hover:bg-ed-destructive/80",outline:"text-ed-foreground"}},defaultVariants:{variant:"default"}}),L5=(t,e,n,r,o)=>{const s=et.useEventBus(Fn.RENDER_SUPER_TEXT),a=E=>{if(!e.value||!t)return;const C=e.value.index,T=e.value.id,{state:_}=t,{tr:A}=_;let D=!1;_.doc.descendants((L,B)=>{var W,J;if(((W=L.attrs)==null?void 0:W[it.ID])===T){const ue=((J=L.attrs[it.TEXT])==null?void 0:J.trim())||"",X=E.trim();if(ue!==X){if(pE(X))return A.delete(B,B+1),D=!0,!1;const{[it.ELEMENT_ID]:H,...F}=L.attrs;A.setNodeMarkup(B,void 0,{...F,[it.TEXT]:X}),D=!0}return!1}return!0}),D&&t&&t.view.dispatch(A),C!==-1&&(n.value[C].text=E,n.value[C].textOriginal=E)},l=()=>{if(!(t!=null&&t.view.dom))return[];const E=[],C=t==null?void 0:t.view.dom.querySelectorAll("[node-id]"),T=new Map;return C.forEach(_=>{const A=_.getBoundingClientRect().top;T.set(A,_)}),E.push(...T.values()),E},u=E=>{const C=E.closest(`#${r}`);if(!C)return;const T=C.getBoundingClientRect().top,_=C==null?void 0:C.scrollTop;return E.getBoundingClientRect().top-(T-_)},c=()=>{l().forEach((C,T)=>{n.value[T]&&(n.value[T].visiblePosition=u(C))})},f=(E,C)=>{const T=n.value.findIndex(_=>_.id===E);T>-1&&(n.value[T].status=C)},p=E=>E.replace(/<p><\/p>/g,"<p> </p>"),m=async()=>{await i.nextTick();const C=l().map(T=>{const _=T.getAttribute("node-id"),A=T.getAttribute("book-mark-content"),D=T.getAttribute("page-id"),L=T.getAttribute("page-number"),B=T.getBoundingClientRect(),W=T.getAttribute("line-id"),J=T.getAttribute("element-id");return{position:B,text:p(A),id:_,pageId:D,pageNumber:L,visiblePosition:u(T),status:0,lineId:W,elementId:J,textOriginal:p(A)}});n.value=C},g=(E,C)=>{const T=E.bottom<=C.top,_=E.top>=C.bottom;return!(T||_)};async function b(){const E=o.value;!E||E.length===0||(E.sort((C,T)=>{const _=Number(C.getAttribute("index")),A=Number(T.getAttribute("index"));return _-A}),E.forEach(C=>C.classList.remove("super-text-truncate")),E.forEach((C,T)=>{const _=C.getBoundingClientRect();E.slice(T+1).forEach(A=>{const D=A.getBoundingClientRect();g(_,D)&&C.classList.add("super-text-truncate")})}))}const y=async E=>{await i.nextTick();const C=t==null?void 0:t.view.dom.querySelector(`[node-id='${E.dataId}']`),T=o.value.find(D=>D.getBoundingClientRect().top+9===(C==null?void 0:C.getBoundingClientRect().top));if(!T)return;const _=Number(T.getAttribute("index"));if(!E.text){T.querySelector(".super-text-lines").innerHTML=n.value[_].textOriginal,o.value.forEach(D=>D.classList.remove("hidden")),b();return}T.querySelector(".super-text-lines").innerHTML=p(E.text),T.classList.remove("super-text-truncate");const A=T.getBoundingClientRect();o.value.forEach((D,L)=>{if(L!==_){const B=D.getBoundingClientRect();g(A,B)&&D.classList.add("hidden")}})},w=E=>{switch(E.action){case"hover":y(E.payload);break;case"status":f(E.payload.id,E.payload.status);break;case"render":m();break;default:console.log("There is no action")}},x=(E,C)=>{const T=E.currentTarget;T.classList.remove("super-text-truncate");const _=T.getBoundingClientRect();o.value.forEach((A,D)=>{if(D!==C){const L=A.getBoundingClientRect();g(_,L)&&A.classList.add("hidden")}})},S=()=>{o.value.forEach(E=>E.classList.remove("hidden")),b()};return i.onBeforeMount(()=>{s.on(w),window.addEventListener("resize",c)}),i.onBeforeUnmount(()=>{s.off(w),window.removeEventListener("resize",c)}),i.onMounted(async()=>{await i.nextTick(),setTimeout(c,300)}),i.watch(()=>n,async()=>{await i.nextTick(),b()},{deep:!0}),{onUpdate:a,updateVisiblePositions:c,hanldeTruncateSuperTexts:b,eventListener:w,handleMouseOver:x,handleMouseLeave:S}},sZ=["index","book-mark-id","line-id","onMouseover"],aZ=["innerHTML"],lZ=eo(i.defineComponent({__name:"SuperTextView",props:{editor:l4},setup(t){const e=t,n=i.ref([]),r=i.ref([]),o=i.ref(!1),s=i.ref(!1),a=i.ref(null),l=i.inject("isMobile",!1),u=i.inject("canEditSuper",i.ref(!0)),c=i.inject("superTextViewCustomClass",""),{onUpdate:f,handleMouseOver:p,handleMouseLeave:m}=L5(e.editor,a,r,"editor-container",n),g=(b,y)=>{u.value&&(a.value={id:b.id,text:b.text,elementId:b.elementId,index:y},o.value=!0,l&&(s.value=!0))};return(b,y)=>{const w=jt;return i.openBlock(),i.createElementBlock("div",{id:"super-text-view-wrapper",class:i.normalizeClass(["relative w-[32%]",i.unref(c)])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,(x,S)=>{var E;return i.openBlock(),i.createElementBlock("div",{key:x.id,ref_for:!0,ref_key:"superTextRefs",ref:n,index:S,"book-mark-id":x.id,"line-id":x.lineId,class:i.normalizeClass(i.unref(Ae)("super-text-view","absolute w-full px-2 translate-y-[-10px] group",{})),style:i.normalizeStyle({top:`${x.visiblePosition||((E=x.position)==null?void 0:E.top)}px`}),onMouseover:C=>i.unref(p)(C,S),onMouseleave:y[0]||(y[0]=(...C)=>i.unref(m)&&i.unref(m)(...C))},[i.createVNode(i.unref(Fb),{role:"text",variant:"outline",class:i.normalizeClass(i.unref(Ae)("break-all whitespace-normal w-full !font-normal px-1 pt-0 m-0 !leading-tight rounded-sm text-white border-transparent",x.elementId?"bg-black":"bg-red-500 cursor-pointer",{"cursor-default":!i.unref(u)})),onDblclick:C=>g(x,S)},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"super-text-lines",innerHTML:x.text},null,8,aZ),i.createVNode(w,{name:"triangle",class:i.normalizeClass(["absolute top-1.5 rotate-90 w-3 h-3 right-0",x.elementId?"text-black":"text-red-500"])},null,8,["class"])]),_:2},1032,["class","onDblclick"])],46,sZ)}),128)),!i.unref(l)&&a.value?(i.openBlock(),i.createBlock(ac,{key:0,open:o.value,editor:e.editor,"super-text-init":a.value.text,"super-text-element-id":a.value.elementId,onClose:y[1]||(y[1]=x=>o.value=!1),onSave:i.unref(f)},null,8,["open","editor","super-text-init","super-text-element-id","onSave"])):i.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-b637b2c3"]]),uZ=["index","book-mark-id","line-id","onMouseover"],cZ=["innerHTML"],dZ=eo(i.defineComponent({__name:"SuperTextViewComment",props:{editor:{},disableSuperInput:{type:Boolean}},setup(t){const e=t,n=i.ref([]),r=i.ref([]),o=i.ref(!1),s=i.ref(!1),a=i.ref(null),l=i.inject("isMobile",!1),u=i.inject("isEditable",i.ref(!0)),c=i.inject("superTextViewCustomClass",""),{onUpdate:f,handleMouseOver:p,handleMouseLeave:m}=L5(e.editor,a,r,"editor-container-comment",n),g=(b,y)=>{u.value&&(a.value={id:b.id,text:b.text,elementId:b.elementId,index:y},e.disableSuperInput||(o.value=!0),l&&(s.value=!0))};return(b,y)=>{const w=jt;return i.openBlock(),i.createElementBlock("div",{id:"super-text-view-wrapper",class:i.normalizeClass(["relative w-[32%]",i.unref(c)])},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(r.value,(x,S)=>{var E;return i.openBlock(),i.createElementBlock("div",{key:x.id,ref_for:!0,ref_key:"superTextRefs",ref:n,index:S,"book-mark-id":x.id,"line-id":x.lineId,class:i.normalizeClass(i.unref(Ae)("super-text-view","absolute w-full px-2 translate-y-[-10px] group",{})),style:i.normalizeStyle({top:`${x.visiblePosition||((E=x.position)==null?void 0:E.top)}px`}),onMouseover:C=>i.unref(p)(C,S),onMouseleave:y[0]||(y[0]=(...C)=>i.unref(m)&&i.unref(m)(...C))},[i.createVNode(i.unref(Fb),{role:"text",variant:"outline",class:i.normalizeClass(i.unref(Ae)("break-all whitespace-normal w-full !font-normal px-1 pt-0 m-0 !leading-tight rounded-sm text-white border-transparent",x.elementId?"bg-black":"bg-red-500 cursor-pointer",{"cursor-default":!i.unref(u)})),onDblclick:C=>g(x,S)},{default:i.withCtx(()=>[i.createElementVNode("div",{class:"super-text-lines",innerHTML:x.text},null,8,cZ),i.createVNode(w,{name:"triangle",class:i.normalizeClass(["absolute top-1.5 rotate-90 w-3 h-3 right-0",x.elementId?"text-black":"text-red-500"])},null,8,["class"])]),_:2},1032,["class","onDblclick"])],46,uZ)}),128)),!i.unref(l)&&a.value&&!b.disableSuperInput?(i.openBlock(),i.createBlock(ac,{key:0,open:o.value,editor:e.editor,"super-text-init":a.value.text,"super-text-element-id":a.value.elementId,onClose:y[1]||(y[1]=x=>o.value=!1),onSave:i.unref(f)},null,8,["open","editor","super-text-init","super-text-element-id","onSave"])):i.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-df3461f6"]]),D5=t=>{t=t.replace(/\s*style="[^"]*"/g,"");const e=t.match(/<!--StartFragment-->([\s\S]*?)<!--EndFragment-->/),r=(e?e[1]:t).replace(/<br\s*\/?>/gi,`
|
|
284
284
|
`).split(/\r?\n/),o=[];for(const s of r){const a=s.trim();if(a==="")o.push("<p></p>");else if(/^<br\s*\/?>/i.test(a)){const l=a.replace(/^<br\s*\/?>/i,"").trim();o.push(`<p>${l}</p>`)}else if(/^<\/BR>/i.test(a)){const l=a.replace(/^<\/BR>/i,"").trim();o.push(`<p>${l}</p>`)}else/^<(?!p\b)[^>]+>/i.test(a)?o.push(`<p>${a}</p>`):o.push(a)}return o.join("")},fZ=vn(),hc=t=>{const e=i.computed(()=>fZ.state.spellCheck);i.watch(()=>e.value,n=>{t.view.dispatch(t.state.tr.setMeta(zn.IS_ACTIVE_SPELLCHECK,n))},{immediate:!0})},pZ={id:"editor-container-comment",class:"flex flex-col"},hZ={class:"flex flex-1"},mZ={id:"editor-panel",class:"flex-1"},gZ=i.defineComponent({__name:"EditorComment",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{},fontFamilyDefault:{},isOpenSuperView:{type:Boolean,default:!0},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:600},maxHeight:{default:void 0},height:{},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},toolBarClass:{},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean},superTextViewCustomClass:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","lineFocus"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=et.useEventBus(Fn.RENDER_SUPER_TEXT),a=i.useAttrs(),l=vn(),{state:u,isReady:c,editor:f,updateEditorState:p,superTextStore:m,checkSpellStore:g,setEditorContextMenuRef:b}=l,y=et.useDark(),w=i.inject("isEditable",i.ref(!0)),x=new No({enablePasteRules:!1,enableInputRules:!1,content:Dn(r.modelValue,r.disabled),editorProps:{attributes:{id:rr.COMMENT,[rr.DISABLE_SUPER_INPUT]:`${r.disableSuperInput}`},handleKeyDown:nt.throttle((_,A)=>A.key==="Enter"&&a.enter&&!A.shiftKey?(o("enter"),!0):!1,_o),transformPastedHTML:_=>D5(_),handlePaste:(_,A)=>{const D=A.clipboardData;if(!D)return!1;const L=r.mode,B=D.getData("text/plain")||"",W=Array.from(D.items).some(J=>J.type.startsWith("image/"));return(L===Fe.STRAIGHT||L===Fe.REPORT)&&W?(A.preventDefault(),!0):L===Fe.PLAIN_TEXT?(A.preventDefault(),_.dispatch(_.state.tr.insertText(B,_.state.selection.from)),!0):!1},clipboardTextParser:(_,A)=>{const D=_.split(/(?:\r\n?|\n)/),L=[];D.forEach(W=>{let J={type:"paragraph"};W.length>0&&(J.content=[{type:"text",text:W}]);let ue=Jr.fromJSON(A.doc.type.schema,J);L.push(ue)});const B=ce.fromArray(L);return Ce.maxOpen(B)}},onCreate:({editor:_})=>{p(_)},onUpdate:nt.throttle(({editor:_})=>{c.value=!0;const A=E(_,r.output);o("update:modelValue",A),o("change",{editor:_,output:A}),p(_),S()},_o),extensions:r.extensions,editable:w.value,onFocus:()=>{b(C.value)}});async function S(){await i.nextTick(),s.emit({action:"render"})}function E(_,A){if(!_)return"";if(_.isEmpty)return A==="json"?{}:"";switch(A){case"html":return _.getHTML();case"json":return _.getJSON();case"text":return _.getText();default:return""}}i.watch(()=>r.disableSuperInput,()=>{const _=document.getElementById(rr.COMMENT);_==null||_.setAttribute(rr.DISABLE_SUPER_INPUT,`${r.disableSuperInput}`)}),i.watch(()=>r.dark,()=>et.useToggle(y)),i.watch(()=>g.languages,()=>{x.commands.checkSpelling()}),i.watch(()=>r.modelValue,_=>{if(!x||nt.isEqual(E(x,r.output),_))return;const{from:A,to:D}=x.state.selection;x.commands.setTextSelection({from:A,to:D}),x.commands.setContent(Dn(_,r.disabled),!1),S()},{deep:!0}),i.watch(()=>w.value,_=>{var A;x==null||x.setEditable(_),(A=x==null?void 0:x.commands)!=null&&A.setIsEnableSuggestion&&x.commands.setIsEnableSuggestion(_)},{immediate:!0}),i.watch(()=>f.value,()=>{f.value&&f.value.on("selectionUpdate",({editor:_})=>{o("changed:selection",{editor:_})})}),i.onUnmounted(()=>x==null?void 0:x.destroy()),Gu(Cu.SAVE,()=>{localStorage.setItem("comment",E(x,"html"))});const C=i.ref(null);function T(_){_===Fe.REPORT&&b(C.value)}return i.onMounted(()=>{T(r.mode)}),i.watch(()=>r.mode,_=>{T(_)}),hc(x),e({editor:x}),(_,A)=>(i.openBlock(),i.createElementBlock("div",pZ,[i.createElementVNode("div",hZ,[i.withDirectives(i.createVNode(dZ,{"disable-super-input":_.disableSuperInput,editor:i.unref(x),class:"mr-2.5 border border-[#999999] rounded-[3px] bg-[#F2F2F7] dark:bg-black"},null,8,["disable-super-input","editor"]),[[i.vShow,_.isOpenSuperView]]),i.createElementVNode("div",mZ,[i.createVNode(ob,{ref_key:"selectContextMenuRef",ref:C,"disable-super-input":_.disableSuperInput,editor:i.unref(x),mode:_.mode,"super-text-store":i.unref(m)},{default:i.withCtx(()=>[i.createVNode(i.unref(ko),{editor:i.unref(x),spellcheck:"true",class:"h-full break-all"},null,8,["editor"])]),_:1},8,["disable-super-input","editor","mode","super-text-store"])])])]))}});function bZ(t,e,n=!1,r=200){const{height:o}=et.useElementSize(t),s=i.ref(0),a=i.ref(0),l=i.ref(r),u=i.ref(0),c=async()=>{await i.nextTick();const f=o.value-8;e.value===Fe.REPORT?(s.value=f/3,a.value=n?"auto":f-s.value,l.value=r/3*2,u.value=r/3):(s.value=0,a.value=n?"auto":o.value)};return n||i.watch(()=>o.value,c),i.onMounted(()=>{c()}),{commentHeight:s,contentHeight:a,minHeight:l,minHeightComment:u}}const vZ={class:"flex flex-1"},yZ={id:"editor-panel",class:"flex-1"},Xp=i.defineComponent({__name:"CoreEditorV2",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{default:""},commentCuesheet:{default:""},hideComment:{type:Boolean,default:!1},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{default:"14px"},fontFamilyDefault:{default:""},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},titleBarComment:{},titleBarContent:{},fieldNameComment:{default:null},fieldNameCommentCuesheet:{default:null},fieldNameContent:{default:null},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:200},maxHeight:{default:void 0},height:{default:void 0},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean,default:!1},textAlert:{},toolBarClass:{default:void 0},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean,default:!1},autoFocus:{type:Boolean},superTextViewCustomClass:{default:void 0}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","lineFocus"],setup(t,{expose:e,emit:n}){const r=t,o=n,s=et.useEventBus(Fn.RENDER_SUPER_TEXT),a=et.useEventBus(Fn.INCREASE_DECREASE_FONTSIZE),l=i.useAttrs(),u=vn(),{state:c,isFullscreen:f,setEditor:p,isReady:m,page:g,editor:b,changePageOption:y,updateEditorState:w,viewSuperText:x,superTextStore:S,checkSpellStore:E,setEditorContextMenuRef:C}=u,T=i.computed(()=>!(r.disabled||r.readonly));i.provide("isEditable",T);const _=i.computed(()=>T.value?!0:r.canEditSuperReadOnly);i.provide("canEditSuper",_);const A=i.computed(()=>{const j=[...c.extensions,...nt.differenceBy(r.extensions,c.extensions,"name")];return j.some(U=>U.name==="video")||j.push(jE.configure({upload:async U=>URL.createObjectURL(U)})),j.map((U,de)=>{var Se;return((Se=U.configure)==null?void 0:Se.call(U,{sort:de}))||U})}),D=i.computed(()=>r.mode===Fe.EDITOR),L=i.ref(r.fontSizeDefault),B=i.ref(r.fontFamilyDefault);i.provide("fontSize",L),i.provide("fontFamily",B),i.provide("superTextViewCustomClass",i.toRef(r,"superTextViewCustomClass"));const W=i.computed(()=>{const j={height:"auto",minHeight:r.minHeight?an(r.minHeight):void 0,maxHeight:r.maxHeight?an(r.maxHeight):void 0,overflowY:"auto"};return D.value&&!r.autoHeight?{}:D.value&&r.autoHeight?j:!D.value&&r.autoHeight?{...j,fontFamily:B.value,fontSize:L.value}:{fontFamily:B.value,fontSize:L.value}});i.watch(()=>[W.value,r.disabled],async()=>{H()}),i.onMounted(()=>{H()});const J=j=>{const ee=parseInt(L.value||"16px"),U=j?ee+2:ee-2;L.value=U+"px"};i.onBeforeMount(()=>{r.disabled||a.on(J)}),i.onBeforeUnmount(()=>{r.disabled||a.off(J)});const ue=i.computed(()=>({...i.unref(f)?{height:"100%"}:{minHeight:r.minHeight?an(r.minHeight):void 0,maxHeight:r.maxHeight?an(r.maxHeight):void 0,height:r.height?an(r.height):void 0},maxWidth:an(r.maxWidth),width:r.maxWidth?"100%":void 0,margin:r.maxWidth?"0 auto":void 0})),X=new No({enablePasteRules:!1,enableInputRules:!1,content:Dn(r.modelValue,r.disabled,r.mode),editorProps:{handleKeyDown:nt.throttle((j,ee)=>ee.key==="Enter"&&l.enter&&!ee.shiftKey?(o("enter"),!0):!1,_o),transformPastedHTML:j=>D5(j),handlePaste:(j,ee)=>{const U=ee.clipboardData;if(!U)return!1;const de=r.mode,Se=Array.from(U.items),Xe=Se.some(pt=>pt.type.startsWith("image/")),ft=Se.some(pt=>pt.type.startsWith("video/"));return(de===Fe.STRAIGHT||de===Fe.REPORT)&&(Xe||ft)?(ee.preventDefault(),!0):ft?(ee.preventDefault(),R(["video"])&&Se.forEach(async pt=>{var Ie;if(!pt.type.startsWith("video/"))return;const $=pt.getAsFile();if(!$)return;const P=X.extensionManager.extensions.find(Je=>Je.name==="video"),ae=(Ie=P==null?void 0:P.options)==null?void 0:Ie.upload,ve=ae?await ae($):URL.createObjectURL($);X.commands.focus(),X.commands.setVideo({src:ve})}),!0):!1},clipboardTextParser:(j,ee)=>{const U=j.split(/(?:\r\n?|\n)/),de=[];U.forEach(Xe=>{let ft={type:"paragraph"};Xe.length>0&&(ft.content=[{type:"text",text:Xe}]);let pt=Jr.fromJSON(ee.doc.type.schema,ft);de.push(pt)});const Se=ce.fromArray(de);return Ce.maxOpen(Se)}},onCreate:({editor:j})=>{w(j)},onUpdate:nt.throttle(({editor:j})=>{m.value=!0;const ee=F(j,r.output);o("update:modelValue",ee),o("change",{editor:j,output:ee}),w(j),H()},_o),extensions:nt.uniqBy(nt.reverse(i.unref(A)),"name"),editable:T.value,onFocus:()=>{C(ke.value)},parseOptions:{preserveWhitespace:"full"}});async function H(){await i.nextTick(),s.emit({action:"render"})}function F(j,ee){if(!j)return"";if(j.isEmpty)return ee==="json"?{}:"";if(r.mode===Fe.PLAIN_TEXT)return j.getText({blockSeparator:`
|
|
285
285
|
`});switch(ee){case"html":return j.getHTML();case"json":return j.getJSON();case"text":return j.getText({blockSeparator:`
|
|
286
286
|
`});default:return""}}function R(j){return j.every(ee=>X==null?void 0:X.extensionManager.extensions.find(U=>U.name===ee))}i.watch(()=>E.languages,()=>{X.commands.checkSpelling()}),i.watch(()=>r.modelValue,j=>{if(!X||nt.isEqual(F(X,r.output),j))return;const{from:ee,to:U}=X.state.selection;X.commands.setTextSelection({from:ee,to:U}),X.commands.setContent(Dn(j,r.disabled,r.mode),!1,{preserveWhitespace:"full"}),H()},{deep:!0}),i.watch(()=>T.value,j=>{var ee;X==null||X.setEditable(j),(ee=X==null?void 0:X.commands)!=null&&ee.setIsEnableSuggestion&&X.commands.setIsEnableSuggestion(j)},{immediate:!0}),i.watch(()=>b.value,()=>{b.value&&b.value.on("selectionUpdate",({editor:j})=>{o("changed:selection",{editor:j})})}),i.onUnmounted(()=>X==null?void 0:X.destroy()),Gu(Cu.SAVE,()=>{localStorage.setItem("content",F(X,"html"))});const G=i.computed(()=>{var de;if(!((de=X==null?void 0:X.storage)!=null&&de.superText))return!1;const{enable:j}=X.storage.superText,ee=[Fe.EDITOR,Fe.PLAIN_TEXT].includes(r.mode),U=r.disabled;return j&&!ee&&!U}),N=i.ref(null),oe=i.computed(()=>r.mode),{commentHeight:ne,contentHeight:xe,minHeight:Ee,minHeightComment:ze}=bZ(N,oe,r.autoHeight,typeof r.minHeight=="string"?parseInt(r.minHeight):r.minHeight),ke=i.ref(null);function me(j){j===Fe.STRAIGHT&&C(ke.value)}i.onMounted(()=>{me(r.mode)}),i.watch(()=>r.mode,j=>{me(j)});const q=i.ref(null),Z=()=>{var ee;(ee=q.value)!=null&&ee.editor.commands.focusInvalidChar()||X.commands.focusInvalidChar()};u.focusFirstInvalidChar.value=Z,i.onActivated(()=>{u.focusFirstInvalidChar.value=Z});const fe=i.computed(()=>{var ee,U,de;const j=((ee=r.fieldNameComment)==null?void 0:ee.label)||((U=r.fieldNameCommentCuesheet)==null?void 0:U.label)||((de=r.fieldNameContent)==null?void 0:de.label);return r.disabled&&j});return e({editor:X}),(j,ee)=>{var $;const U=Vb,de=Pb,Se=Db,Xe=K1,ft=XF,pt=VB;return i.unref(X)?(i.openBlock(),i.createElementBlock("div",{key:0,id:"vdc-editor",class:i.normalizeClass(["vdc-editor w-full flex flex-col",[j.editorClass,{"outline-ed-primary":i.unref(X).isFocused,"outline-ed-border":!i.unref(X).isFocused}]]),style:i.normalizeStyle(ue.value)},[!j.hideBubble&&!j.disabled&&T.value?(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[R([i.unref(gp)])?(i.openBlock(),i.createBlock(U,{key:0,editor:i.unref(X)},null,8,["editor"])):i.createCommentVNode("",!0),R([i.unref(Cl)])?(i.openBlock(),i.createBlock(de,{key:1,editor:i.unref(X)},null,8,["editor"])):i.createCommentVNode("",!0),R([i.unref(na)])?(i.openBlock(),i.createBlock(Se,{key:2,editor:i.unref(X)},null,8,["editor"])):i.createCommentVNode("",!0),R([i.unref(ra),i.unref(oa)])?(i.openBlock(),i.createBlock(Xe,{key:3,editor:i.unref(X)},null,8,["editor"])):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),j.hideToolbar?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(ft,{key:1,editor:i.unref(X),"editor-comment":($=q.value)==null?void 0:$.editor,mode:j.mode,class:i.normalizeClass(["mb-2",j.toolBarClass])},null,8,["editor","editor-comment","mode","class"])),i.createElementVNode("div",{ref_key:"editorWrapRef",ref:N,class:i.normalizeClass(i.unref(Ae)("space-y-2 flex-1 flex flex-col break-keep",!D.value&&"[&_*]:!font-inherit [&_*]:!text-font-size-inherit",B.value&&!D.value&&"[&_*]:!font-inherit",L.value&&!D.value&&"[&_*]:!text-font-size-inherit")),style:i.normalizeStyle(W.value)},[fe.value?(i.openBlock(),i.createBlock(pt,{key:0,extensions:j.extensions,mode:j.mode,"hide-comment":j.hideComment,"field-name-comment":j.fieldNameComment,"field-name-comment-cuesheet":j.fieldNameCommentCuesheet,"field-name-content":j.fieldNameContent,comment:j.comment,"comment-cuesheet":j.commentCuesheet,content:j.modelValue},null,8,["extensions","mode","hide-comment","field-name-comment","field-name-comment-cuesheet","field-name-content","comment","comment-cuesheet","content"])):(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[j.mode===i.unref(Fe).REPORT&&!j.hideComment?(i.openBlock(),i.createBlock(gZ,{key:0,ref_key:"editorCommentRef",ref:q,mode:i.unref(Fe).REPORT,extensions:j.extensions,"model-value":r.comment,disabled:r.disabled,"disable-super-input":j.disableSuperInput,"is-open-super-view":G.value,style:i.normalizeStyle(r.autoHeight?{height:"auto",minHeight:i.unref(an)(i.unref(ze))}:{height:i.unref(an)(i.unref(ne)),minHeight:i.unref(an)(i.unref(Ee))}),class:"relative overflow-y-auto","onUpdate:modelValue":ee[0]||(ee[0]=P=>o("update:comment",P))},null,8,["mode","extensions","model-value","disabled","disable-super-input","is-open-super-view","style"])):i.createCommentVNode("",!0),i.createElementVNode("div",{id:"editor-container",class:"relative overflow-y-auto flex flex-col",style:i.normalizeStyle(r.autoHeight?{height:"auto",minHeight:i.unref(an)(i.unref(Ee))}:{height:i.unref(an)(i.unref(xe))})},[i.createElementVNode("div",vZ,[i.withDirectives(i.createVNode(lZ,{editor:i.unref(X),class:"mr-2.5 border border-[#999999] rounded-[3px] bg-[#F2F2F7] dark:bg-black"},null,8,["editor"]),[[i.vShow,G.value]]),i.createElementVNode("div",yZ,[i.createVNode(ob,{ref_key:"selectContextMenuRef",ref:ke,editor:i.unref(X),mode:j.mode,"super-text-store":i.unref(S)},{default:i.withCtx(()=>[i.createVNode(i.unref(ko),{editor:i.unref(X),spellcheck:"true",class:i.normalizeClass(i.unref(Ae)("h-full break-all",j.mode===i.unref(Fe).PLAIN_TEXT&&"plain-text"))},null,8,["editor","class"])]),_:1},8,["editor","mode","super-text-store"])])])],4)],64))],6)],6)):i.createCommentVNode("",!0)}}}),wZ={class:"flex gap-2 items-center"},P5=eo(i.defineComponent({__name:"ToolbarFormat",props:{editor:{},disabled:{type:Boolean,default:!1},mode:{},activeExtensions:{default:()=>[]}},setup(t){const{t:e}=St(),n=t,r=["fontSize","fontFamily","superText","spellchecker",oE],o=i.computed(()=>{const l=[...n.editor.extensionManager.extensions];let u=[];for(const c of l){const{button:f,divider:p=!1,spacer:m=!1,toolbar:g=!0}=c.options;if(!f||!y0(f)||!g)continue;const b=f({editor:n.editor,extension:c,t:i.unref(e),isMobile:!0});if(Array.isArray(b)){const y=b.map((w,x)=>({id:`${c.name}`,button:w,divider:x===b.length-1?p:!1,spacer:x===0?m:!1}));u=[...u,...y];continue}u.push({button:b,divider:p,spacer:m,id:`${c.name}`})}return n.activeExtensions.length?u.filter(c=>c.id&&n.activeExtensions.includes(c.id)):(r.length&&(u=u.filter(c=>c.id&&!r.includes(c.id))),u)}),s=l=>l.id==="spellchecker"?"!text-ed-blue !bg-white !font-normal rounded [&>div>svg]:w-[19px] [&>div>svg]:h-[19px] h-[26px] gap-x-1 whitespace-nowrap":l.button.componentProps.customClass,a=l=>l.id==="spellchecker"?"Spellchecker":l.button.componentProps.icon;return(l,u)=>(i.openBlock(),i.createElementBlock("div",{id:"tool-bar-format",class:i.normalizeClass(i.unref(Ae)("z-10 bg-[#E0E0E0] rounded-[5px] px-2.5 py-[5px] leading-none overflow-x-auto overflow-y-hidden min-h-[48px]",i.unref(Mu)()&&"top-16",!o.value.length&&"hidden"))},[i.createElementVNode("div",wZ,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,(c,f)=>{var p;return i.openBlock(),i.createBlock(i.resolveDynamicComponent(c.button.component),i.mergeProps({key:f,id:c.id,ref_for:!0},c.button.componentProps,{editor:l.editor,disabled:l.disabled||((p=c.button.componentProps)==null?void 0:p.disabled),"custom-class":s(c),icon:a(c)}),i.createSlots({_:2},[i.renderList(c.button.componentSlots,(m,g,b)=>({name:`${g}`,fn:i.withCtx(y=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(m),i.mergeProps({ref_for:!0},y==null?void 0:y.props,{id:c.id}),null,16,["id"]))])}))]),1040,["id","editor","disabled","custom-class","icon"])}),128))])],2))}}),[["__scopeId","data-v-5cf68949"]]),xZ={class:"flex gap-2 items-center overflow-x-auto"},V5=eo(i.defineComponent({__name:"ToolbarMobile",props:{editor:{},disabled:{type:Boolean,default:!1},mode:{},activeExtensions:{default:()=>[rE,bp,nb]}},setup(t){const{t:e}=St(),n=t,r=i.inject("isEditable",i.ref(!0)),o=i.computed(()=>{const l=[...n.editor.extensionManager.extensions],u=l.find(p=>p.name===nb);let c=l.sort((p,m)=>p.name==="spellchecker"?-1:m.name==="spellchecker"||p.name==="superText"?1:m.name==="superText"?-1:0);u&&(c=l.sort((p,m)=>p.name==="configPlan"?1:m.name==="configPlan"?-1:0));let f=[];for(const p of c){const{button:m,divider:g=!1,spacer:b=!1,toolbar:y=!0}=p.options;if(!m||!y0(m)||!y)continue;const w=m({editor:n.editor,extension:p,t:i.unref(e),isMobile:!0});if(Array.isArray(w)){const x=w.map((S,E)=>({id:`${p.name}`,button:S,divider:E===w.length-1?g:!1,spacer:E===0?b:!1}));f=[...f,...x];continue}f.push({button:w,divider:g,spacer:b,id:`${p.name}`})}if(!r.value){const p=f.find(m=>m.id==="superText");p&&(p.button.componentProps.disabled=!0)}return n.activeExtensions.length?f.filter(p=>p.id&&n.activeExtensions.includes(p.id)):f}),s=l=>l.id==="spellchecker"?"!text-ed-blue bg-white !font-normal rounded [&>div>svg]:w-[19px] [&>div>svg]:h-[19px] h-[26px] gap-x-1 whitespace-nowrap":l.button.componentProps.customClass,a=l=>l.id==="spellchecker"?"Spellchecker":l.button.componentProps.icon;return(l,u)=>(i.openBlock(),i.createElementBlock("div",{id:"tool-bar",class:i.normalizeClass(i.unref(Ae)("z-10 bg-[#E0E0E0] rounded-[5px] px-2.5 py-[5px] leading-none",i.unref(Mu)()&&"top-16",!o.value.length&&"hidden"))},[i.createElementVNode("div",xZ,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,(c,f)=>{var p;return i.openBlock(),i.createElementBlock(i.Fragment,{key:f},[c.spacer&&f!==0?(i.openBlock(),i.createBlock(i.unref(oi),{key:0,orientation:"vertical",class:"h-[16px] mx-[10px]"})):i.createCommentVNode("",!0),(i.openBlock(),i.createBlock(i.resolveDynamicComponent(c.button.component),i.mergeProps({id:c.id,ref_for:!0},c.button.componentProps,{editor:l.editor,disabled:l.disabled||((p=c.button.componentProps)==null?void 0:p.disabled),"custom-class":s(c),icon:a(c)}),i.createSlots({_:2},[i.renderList(c.button.componentSlots,(m,g,b)=>({name:`${g}`,fn:i.withCtx(y=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(m),i.mergeProps({ref_for:!0},y==null?void 0:y.props,{id:c.id}),null,16,["id"]))])}))]),1040,["id","editor","disabled","custom-class","icon"])),c.divider?(i.openBlock(),i.createBlock(i.unref(oi),{key:1,orientation:"vertical",class:"mx-2 h-auto"})):i.createCommentVNode("",!0)],64)}),128))])],2))}}),[["__scopeId","data-v-236fec84"]]),CZ={class:"bg-ed-blue px-1"},EZ={class:"bg-ed-blue px-1"},$b=eo(i.defineComponent({__name:"SelectContextMenuMobile",props:{editor:{},mode:{},disableSuperInput:{type:Boolean}},setup(t){var g;const e=t,{t:n}=St(),r=i.ref(!1),o=i.inject("isEditable",i.ref(!0)),s=(g=e.editor.extensionManager.extensions.find(b=>b.name==="superText"))==null?void 0:g.options.specialCharModal,a=b=>{e.editor.chain().focus().insertContent(b).run()},l=()=>{e.editor.chain().focus().selectAll().run()},u=i.ref(!1),c=async()=>{try{const b=await navigator.clipboard.readText();u.value=!!b}catch{u.value=!1}},f=i.computed(()=>!o.value),p=i.computed(()=>[...e.editor.extensionManager.extensions].find(y=>y.name==="configPlan")),m=i.computed(()=>[...e.editor.extensionManager.extensions].find(y=>y.name==="superText"));return(b,y)=>{var C,T,_;const w=xp,x=wp,S=yp,E=vp;return i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(E,{"onUpdate:open":c},{default:i.withCtx(()=>[i.createVNode(w,{as:"template",disabled:i.unref(f)},{default:i.withCtx(()=>[i.renderSlot(b.$slots,"default",{},void 0,!0)]),_:3},8,["disabled"]),i.createVNode(S,{"avoid-collisions":!0,sticky:"always","hide-when-detached":"","prioritize-position":"",class:"flex bg-[#616161] text-white max-w-[calc(100vw-16px)] sm:max-w-[310px] overflow-x-auto whitespace-nowrap"},{default:i.withCtx(()=>[i.unref(m)&&!b.disableSuperInput&&b.mode!==i.unref(Fe).EDITOR?(i.openBlock(),i.createBlock(x,{key:0,onClick:y[0]||(y[0]=A=>b.editor.commands.toggleSuperInputMoblie())},{default:i.withCtx(()=>[i.createElementVNode("span",CZ,i.toDisplayString(i.unref(n)("editor.super")),1)]),_:1})):i.createCommentVNode("",!0),i.unref(p)?(i.openBlock(),i.createBlock(x,{key:1,onClick:y[1]||(y[1]=A=>b.editor.commands.toggleConfigPlanInput())},{default:i.withCtx(()=>[i.createElementVNode("span",EZ,i.toDisplayString(i.unref(n)("editor.configPlan")),1)]),_:1})):i.createCommentVNode("",!0),i.createVNode(x,{onClick:y[2]||(y[2]=A=>r.value=!0)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("editor.insertSpecial")),1)]),_:1}),i.unref(u)?(i.openBlock(),i.createBlock(x,{key:2,onClick:y[3]||(y[3]=A=>{var D;return(D=b.editor)==null?void 0:D.commands.pasteContent()})},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("editor.paste")),1)]),_:1})):i.createCommentVNode("",!0),i.createVNode(x,{onClick:y[4]||(y[4]=A=>{var D;return(D=b.editor)==null?void 0:D.commands.cutContent()})},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("editor.cut")),1)]),_:1}),i.createVNode(x,{onClick:y[5]||(y[5]=A=>{var D;return(D=b.editor)==null?void 0:D.commands.copyContent()})},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("editor.copy")),1)]),_:1}),i.createVNode(x,{onClick:l},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(n)("editor.selectAll")),1)]),_:1})]),_:1})]),_:3}),(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[(i.openBlock(),i.createBlock(i.resolveDynamicComponent((C=i.unref(s))==null?void 0:C.component),{"is-open":i.unref(r),open:i.unref(r),class:i.normalizeClass((_=(T=i.unref(s))==null?void 0:T.componentProps)==null?void 0:_.class),onSelectedChar:a,onClose:y[6]||(y[6]=A=>r.value=!1)},null,40,["is-open","open","class"]))]))],64)}}}),[["__scopeId","data-v-dd3c0188"]]),kZ={class:"text-red-500 relative -top-1"},Yp=i.defineComponent({__name:"EditorFieldName",props:{fieldName:{},mode:{},disabled:{type:Boolean,default:!1},intent:{default:"primary"}},setup(t){const e=t,n=i.computed(()=>e.disabled&&e.mode!==Fe.EDITOR?`[${e.fieldName.label}]`:e.fieldName.label),r=i.computed(()=>e.mode===Fe.EDITOR?"":e.intent==="primary"?"border-ed-blue text-ed-blue":"border-[#FF3B30] text-[#FF3B30]");return(o,s)=>(i.openBlock(),i.createElementBlock("p",null,[i.createElementVNode("span",{class:i.normalizeClass(i.unref(Ae)("font-bold",o.mode!==i.unref(Fe).EDITOR&&"rounded-full border text-xs py-[2px] px-1 inline-block font-normal",o.disabled&&"!border-transparent px-0",i.unref(r)))},i.toDisplayString(i.unref(n)),3),i.withDirectives(i.createElementVNode("span",kZ," •",512),[[i.vShow,o.fieldName.isRequired]])]))}}),SZ=i.defineComponent({__name:"EditorCommentMoblie",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{},fontFamilyDefault:{},isOpenSuperView:{type:Boolean,default:!0},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:600},maxHeight:{default:void 0},height:{},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},toolBarClass:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superTextViewCustomClass:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","lineFocus"],setup(t,{expose:e,emit:n}){const r=t,o=n,{t:s}=St(),a=et.useEventBus(Fn.RENDER_SUPER_TEXT),l=i.useAttrs(),u=vn(),{state:c,isReady:f,editor:p,updateEditorState:m,checkSpellStore:g}=u,b=i.inject("isEditable",i.ref(!0)),y=et.useDark(),w=new No({enablePasteRules:!1,enableInputRules:!1,content:Dn(r.modelValue,r.disabled),editorProps:{attributes:{id:rr.COMMENT,[rr.DISABLE_SUPER_INPUT]:`${r.disableSuperInput}`},handleKeyDown:nt.throttle((_,A)=>A.key==="Enter"&&l.enter&&!A.shiftKey?(o("enter"),!0):!1,_o),transformPastedHTML:_=>(_=_.replace(/\s*style="[^"]*"/g,""),_)},onCreate:({editor:_})=>{m(_)},onUpdate:nt.throttle(({editor:_})=>{f.value=!0;const A=C(_,r.output);o("update:modelValue",A),o("change",{editor:_,output:A}),m(_),E()},_o),extensions:nt.uniqBy(nt.reverse(i.unref(r.extensions)),"name"),editable:b.value,onFocus:()=>{S(),x.value=!0},onBlur:()=>x.value=!1}),x=i.ref(!1);function S(){o("setEditorSelected",w)}function E(){a.emit({action:"render"})}function C(_,A){if(!_)return"";if(_.isEmpty)return A==="json"?{}:"";switch(A){case"html":return _.getHTML();case"json":return _.getJSON();case"text":return _.getText();default:return""}}i.watch(()=>r.dark,()=>et.useToggle(y)),i.watch(()=>g.languages,()=>{w.commands.checkSpelling()}),i.watch(()=>r.modelValue,_=>{if(!w||nt.isEqual(C(w,r.output),_))return;const{from:A,to:D}=w.state.selection;w.commands.setTextSelection({from:A,to:D}),E(),w.commands.setContent(Dn(_,r.disabled),!1)},{deep:!0}),i.watch(()=>p.value,()=>{p.value&&p.value.on("selectionUpdate",({editor:_})=>{o("changed:selection",{editor:_})})}),i.watch(()=>r.disableSuperInput,()=>{const _=document.getElementById(rr.COMMENT);_==null||_.setAttribute(rr.DISABLE_SUPER_INPUT,`${r.disableSuperInput}`)}),i.onUnmounted(()=>w==null?void 0:w.destroy()),Gu(Cu.SAVE,()=>{localStorage.setItem("comment",C(w,"html"))});function T(_){w.commands.focus("end"),S()}return hc(w),i.onMounted(()=>{var _,A;r.autoFocus&&T(r.mode),(_=w==null?void 0:w.commands)!=null&&_.setIsEnableSuggestion&&w.commands.setIsEnableSuggestion(!1),(A=w==null?void 0:w.commands)!=null&&A.setIsMobile&&w.commands.setIsMobile(!0)}),i.watch(()=>r.mode,_=>{r.autoFocus&&T()}),i.watch(()=>b.value,_=>{w==null||w.setEditable(_)},{immediate:!0}),e({editor:w,isFocused:x}),(_,A)=>{var B;const D=Yp,L=P5;return i.openBlock(),i.createElementBlock(i.Fragment,null,[(B=_.fieldNameComment)!=null&&B.label?(i.openBlock(),i.createBlock(D,{key:0,"field-name":_.fieldNameComment,mode:_.mode,disabled:_.disabled,class:"mb-1"},null,8,["field-name","mode","disabled"])):i.createCommentVNode("",!0),_.isShowFormatControlBar?(i.openBlock(),i.createBlock(L,{key:1,editor:i.unref(w),mode:_.mode,disabled:!i.unref(b)||_.disabled,class:"mb-[3px]"},null,8,["editor","mode","disabled"])):i.createCommentVNode("",!0),i.createVNode($b,{editor:i.unref(w),mode:_.mode,"disable-super-input":_.disableSuperInput},{default:i.withCtx(()=>[i.createVNode(i.unref(ko),{editor:i.unref(w),spellcheck:"true",class:"flex-1 flex-col"},null,8,["editor"])]),_:1},8,["editor","mode","disable-super-input"])],64)}}}),zb={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(t,{emit:e}){const n=e,r=t,o=i.useSlots(),s=i.ref([]),a=i.computed(()=>s.value.reduce((q,Z)=>(q[~~Z.id]=Z)&&q,{})),l=i.computed(()=>s.value.length),u=i.ref(null),c=i.ref(!1),f=i.ref({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),p=i.ref({splitter:null,timeoutId:null}),m=i.computed(()=>({[`splitpanes splitpanes--${r.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":f.value.dragging})),g=()=>{document.addEventListener("mousemove",w,{passive:!1}),document.addEventListener("mouseup",x),"ontouchstart"in window&&(document.addEventListener("touchmove",w,{passive:!1}),document.addEventListener("touchend",x))},b=()=>{document.removeEventListener("mousemove",w,{passive:!1}),document.removeEventListener("mouseup",x),"ontouchstart"in window&&(document.removeEventListener("touchmove",w,{passive:!1}),document.removeEventListener("touchend",x))},y=(q,Z)=>{const fe=q.target.closest(".splitpanes__splitter");if(fe){const{left:j,top:ee}=fe.getBoundingClientRect(),{clientX:U,clientY:de}="ontouchstart"in window&&q.touches?q.touches[0]:q;f.value.cursorOffset=r.horizontal?de-ee:U-j}g(),f.value.mouseDown=!0,f.value.activeSplitter=Z},w=q=>{f.value.mouseDown&&(q.preventDefault(),f.value.dragging=!0,requestAnimationFrame(()=>{A(T(q)),ke("resize",{event:q},!0)}))},x=q=>{f.value.dragging&&(window.getSelection().removeAllRanges(),ke("resized",{event:q},!0)),f.value.mouseDown=!1,f.value.activeSplitter=null,setTimeout(()=>{f.value.dragging=!1,b()},100)},S=(q,Z)=>{"ontouchstart"in window&&(q.preventDefault(),p.value.splitter===Z?(clearTimeout(p.value.timeoutId),p.value.timeoutId=null,E(q,Z),p.value.splitter=null):(p.value.splitter=Z,p.value.timeoutId=setTimeout(()=>p.value.splitter=null,500))),f.value.dragging||ke("splitter-click",{event:q,index:Z},!0)},E=(q,Z)=>{if(ke("splitter-dblclick",{event:q,index:Z},!0),r.maximizePanes){let fe=0;s.value=s.value.map((j,ee)=>(j.size=ee===Z?j.max:j.min,ee!==Z&&(fe+=j.min),j)),s.value[Z].size-=fe,ke("pane-maximize",{event:q,index:Z,pane:s.value[Z]}),ke("resized",{event:q,index:Z},!0)}},C=(q,Z)=>{ke("pane-click",{event:q,index:a.value[Z].index,pane:a.value[Z]})},T=q=>{const Z=u.value.getBoundingClientRect(),{clientX:fe,clientY:j}="ontouchstart"in window&&q.touches?q.touches[0]:q;return{x:fe-(r.horizontal?0:f.value.cursorOffset)-Z.left,y:j-(r.horizontal?f.value.cursorOffset:0)-Z.top}},_=q=>{q=q[r.horizontal?"y":"x"];const Z=u.value[r.horizontal?"clientHeight":"clientWidth"];return r.rtl&&!r.horizontal&&(q=Z-q),q*100/Z},A=q=>{const Z=f.value.activeSplitter;let fe={prevPanesSize:L(Z),nextPanesSize:B(Z),prevReachedMinPanes:0,nextReachedMinPanes:0};const j=0+(r.pushOtherPanes?0:fe.prevPanesSize),ee=100-(r.pushOtherPanes?0:fe.nextPanesSize),U=Math.max(Math.min(_(q),ee),j);let de=[Z,Z+1],Se=s.value[de[0]]||null,Xe=s.value[de[1]]||null;const ft=Se.max<100&&U>=Se.max+fe.prevPanesSize,pt=Xe.max<100&&U<=100-(Xe.max+B(Z+1));if(ft||pt){ft?(Se.size=Se.max,Xe.size=Math.max(100-Se.max-fe.prevPanesSize-fe.nextPanesSize,0)):(Se.size=Math.max(100-Xe.max-fe.prevPanesSize-B(Z+1),0),Xe.size=Xe.max);return}if(r.pushOtherPanes){const $=D(fe,U);if(!$)return;({sums:fe,panesToResize:de}=$),Se=s.value[de[0]]||null,Xe=s.value[de[1]]||null}Se!==null&&(Se.size=Math.min(Math.max(U-fe.prevPanesSize-fe.prevReachedMinPanes,Se.min),Se.max)),Xe!==null&&(Xe.size=Math.min(Math.max(100-U-fe.nextPanesSize-fe.nextReachedMinPanes,Xe.min),Xe.max))},D=(q,Z)=>{const fe=f.value.activeSplitter,j=[fe,fe+1];return Z<q.prevPanesSize+s.value[j[0]].min&&(j[0]=W(fe).index,q.prevReachedMinPanes=0,j[0]<fe&&s.value.forEach((ee,U)=>{U>j[0]&&U<=fe&&(ee.size=ee.min,q.prevReachedMinPanes+=ee.min)}),q.prevPanesSize=L(j[0]),j[0]===void 0)?(q.prevReachedMinPanes=0,s.value[0].size=s.value[0].min,s.value.forEach((ee,U)=>{U>0&&U<=fe&&(ee.size=ee.min,q.prevReachedMinPanes+=ee.min)}),s.value[j[1]].size=100-q.prevReachedMinPanes-s.value[0].min-q.prevPanesSize-q.nextPanesSize,null):Z>100-q.nextPanesSize-s.value[j[1]].min&&(j[1]=J(fe).index,q.nextReachedMinPanes=0,j[1]>fe+1&&s.value.forEach((ee,U)=>{U>fe&&U<j[1]&&(ee.size=ee.min,q.nextReachedMinPanes+=ee.min)}),q.nextPanesSize=B(j[1]-1),j[1]===void 0)?(q.nextReachedMinPanes=0,s.value.forEach((ee,U)=>{U<l.value-1&&U>=fe+1&&(ee.size=ee.min,q.nextReachedMinPanes+=ee.min)}),s.value[j[0]].size=100-q.prevPanesSize-B(j[0]-1),null):{sums:q,panesToResize:j}},L=q=>s.value.reduce((Z,fe,j)=>Z+(j<q?fe.size:0),0),B=q=>s.value.reduce((Z,fe,j)=>Z+(j>q+1?fe.size:0),0),W=q=>[...s.value].reverse().find(Z=>Z.index<q&&Z.size>Z.min)||{},J=q=>s.value.find(Z=>Z.index>q+1&&Z.size>Z.min)||{},ue=()=>{var q;const Z=Array.from(((q=u.value)==null?void 0:q.children)||[]);for(const fe of Z){const j=fe.classList.contains("splitpanes__pane"),ee=fe.classList.contains("splitpanes__splitter");!j&&!ee&&(fe.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},X=(q,Z,fe=!1)=>{const j=q-1,ee=document.createElement("div");ee.classList.add("splitpanes__splitter"),fe||(ee.onmousedown=U=>y(U,j),typeof window<"u"&&"ontouchstart"in window&&(ee.ontouchstart=U=>y(U,j)),ee.onclick=U=>S(U,j+1)),ee.ondblclick=U=>E(U,j+1),Z.parentNode.insertBefore(ee,Z)},H=q=>{q.onmousedown=void 0,q.onclick=void 0,q.ondblclick=void 0,q.remove()},F=()=>{var q;const Z=Array.from(((q=u.value)==null?void 0:q.children)||[]);for(const j of Z)j.className.includes("splitpanes__splitter")&&H(j);let fe=0;for(const j of Z)j.className.includes("splitpanes__pane")&&(!fe&&r.firstSplitter?X(fe,j,!0):fe&&X(fe,j),fe++)},R=({uid:q,...Z})=>{const fe=a.value[q];for(const[j,ee]of Object.entries(Z))fe[j]=ee},G=q=>{var Z;let fe=-1;Array.from(((Z=u.value)==null?void 0:Z.children)||[]).some(j=>(j.className.includes("splitpanes__pane")&&fe++,j.isSameNode(q.el))),s.value.splice(fe,0,{...q,index:fe}),s.value.forEach((j,ee)=>j.index=ee),c.value&&i.nextTick(()=>{F(),oe({addedPane:s.value[fe]}),ke("pane-add",{pane:s.value[fe]})})},N=q=>{const Z=s.value.findIndex(j=>j.id===q);s.value[Z].el=null;const fe=s.value.splice(Z,1)[0];s.value.forEach((j,ee)=>j.index=ee),i.nextTick(()=>{F(),ke("pane-remove",{pane:fe}),oe({removedPane:{...fe}})})},oe=(q={})=>{!q.addedPane&&!q.removedPane?xe():s.value.some(Z=>Z.givenSize!==null||Z.min||Z.max<100)?Ee(q):ne(),c.value&&ke("resized")},ne=()=>{const q=100/l.value;let Z=0;const fe=[],j=[];for(const ee of s.value)ee.size=Math.max(Math.min(q,ee.max),ee.min),Z-=ee.size,ee.size>=ee.max&&fe.push(ee.id),ee.size<=ee.min&&j.push(ee.id);Z>.1&&ze(Z,fe,j)},xe=()=>{let q=100;const Z=[],fe=[];let j=0;for(const U of s.value)q-=U.size,U.givenSize!==null&&j++,U.size>=U.max&&Z.push(U.id),U.size<=U.min&&fe.push(U.id);let ee=100;if(q>.1){for(const U of s.value)U.givenSize===null&&(U.size=Math.max(Math.min(q/(l.value-j),U.max),U.min)),ee-=U.size;ee>.1&&ze(ee,Z,fe)}},Ee=({addedPane:q,removedPane:Z}={})=>{let fe=100/l.value,j=0;const ee=[],U=[];((q==null?void 0:q.givenSize)??null)!==null&&(fe=(100-q.givenSize)/(l.value-1));for(const de of s.value)j-=de.size,de.size>=de.max&&ee.push(de.id),de.size<=de.min&&U.push(de.id);if(!(Math.abs(j)<.1)){for(const de of s.value)(q==null?void 0:q.givenSize)!==null&&(q==null?void 0:q.id)===de.id||(de.size=Math.max(Math.min(fe,de.max),de.min)),j-=de.size,de.size>=de.max&&ee.push(de.id),de.size<=de.min&&U.push(de.id);j>.1&&ze(j,ee,U)}},ze=(q,Z,fe)=>{let j;q>0?j=q/(l.value-Z.length):j=q/(l.value-fe.length),s.value.forEach((ee,U)=>{if(q>0&&!Z.includes(ee.id)){const de=Math.max(Math.min(ee.size+j,ee.max),ee.min),Se=de-ee.size;q-=Se,ee.size=de}else if(!fe.includes(ee.id)){const de=Math.max(Math.min(ee.size+j,ee.max),ee.min),Se=de-ee.size;q-=Se,ee.size=de}}),Math.abs(q)>.1&&i.nextTick(()=>{c.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},ke=(q,Z=void 0,fe=!1)=>{const j=(Z==null?void 0:Z.index)??f.value.activeSplitter??null;n(q,{...Z,...j!==null&&{index:j},...fe&&j!==null&&{prevPane:s.value[j-(r.firstSplitter?1:0)],nextPane:s.value[j+(r.firstSplitter?0:1)]},panes:s.value.map(ee=>({min:ee.min,max:ee.max,size:ee.size}))})};i.watch(()=>r.firstSplitter,()=>F()),i.onMounted(()=>{ue(),F(),oe(),ke("ready"),c.value=!0}),i.onBeforeUnmount(()=>c.value=!1);const me=()=>{var q;return i.h("div",{ref:u,class:m.value},(q=o.default)==null?void 0:q.call(o))};return i.provide("panes",s),i.provide("indexedPanes",a),i.provide("horizontal",i.computed(()=>r.horizontal)),i.provide("requestUpdate",R),i.provide("onPaneAdd",G),i.provide("onPaneRemove",N),i.provide("onPaneClick",C),(q,Z)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(me)))}},fa={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(t){var e;const n=t,r=i.inject("requestUpdate"),o=i.inject("onPaneAdd"),s=i.inject("horizontal"),a=i.inject("onPaneRemove"),l=i.inject("onPaneClick"),u=(e=i.getCurrentInstance())==null?void 0:e.uid,c=i.inject("indexedPanes"),f=i.computed(()=>c.value[u]),p=i.ref(null),m=i.computed(()=>{const w=isNaN(n.size)||n.size===void 0?0:parseFloat(n.size);return Math.max(Math.min(w,b.value),g.value)}),g=i.computed(()=>{const w=parseFloat(n.minSize);return isNaN(w)?0:w}),b=i.computed(()=>{const w=parseFloat(n.maxSize);return isNaN(w)?100:w}),y=i.computed(()=>{var w;return`${s.value?"height":"width"}: ${(w=f.value)==null?void 0:w.size}%`});return i.watch(()=>m.value,w=>r({uid:u,size:w})),i.watch(()=>g.value,w=>r({uid:u,min:w})),i.watch(()=>b.value,w=>r({uid:u,max:w})),i.onMounted(()=>{o({id:u,el:p.value,min:g.value,max:b.value,givenSize:n.size===void 0?null:m.value,size:m.value})}),i.onBeforeUnmount(()=>a(u)),(w,x)=>(i.openBlock(),i.createElementBlock("div",{ref_key:"paneEl",ref:p,class:"splitpanes__pane",onClick:x[0]||(x[0]=S=>i.unref(l)(S,w._.uid)),style:i.normalizeStyle(y.value)},[i.renderSlot(w.$slots,"default")],4))}},Hb=i.defineComponent({__name:"ToolbarTitle",props:{titleBar:{},customClass:{}},setup(t){return(e,n)=>(i.openBlock(),i.createElementBlock("h3",{class:i.normalizeClass(i.unref(Ae)("rounded-[5px] px-2.5 py-[5px] min-h-[32px] flex items-center bg-[#E0E0E0]",[e.customClass],[e.titleBar.bgClass]))},i.toDisplayString(e.titleBar.title),3))}});function Jp(){let e=null,n=!1;const r=i.ref(!1),o=i.ref(0),s=i.ref(0),a=i.ref(50),l=i.ref(50);let u=[];function c(x,S){n=!1,e=setTimeout(()=>{n=!0},200);const E=S.getBoundingClientRect();o.value=E.left+E.width/2,s.value=E.top+E.height/2}function f(x){clearTimeout(e),e=null,n||(r.value=!0),n=!1}function p(){const x=document.querySelectorAll(".splitpanes__splitter");u=Array.from(x),u.forEach(S=>{S.addEventListener("mousedown",E=>c(E,S)),S.addEventListener("mouseup",f),S.addEventListener("touchstart",E=>c(E,S)),S.addEventListener("touchend",f)})}function m(){u.forEach(x=>{x.removeEventListener("mouseup",f),x.removeEventListener("touchend",f),x.removeEventListener("mousedown",S=>c(S,x)),x.removeEventListener("touchstart",S=>c(S,x))}),u=[]}const g=i.ref([{name:"paneUp",selected:!1},{name:"paneMiddle",selected:!0},{name:"paneDown",selected:!1}]),b=i.ref({name:"paneMiddle",selected:!0});function y(x){b.value=x}async function w(x){y(x),r.value=!1,await i.nextTick(),x.name==="paneUp"?(a.value=0,l.value=100):x.name==="paneDown"?(a.value=100,l.value=0):(a.value=50,l.value=50)}return{showMenuSplitter:r,menuX:o,menuY:s,commentSize:a,contentSize:l,setupSplitterListeners:p,removeSplitterListeners:m,iconSplitters:g,iconSplitSelected:b,setSelectedIconSplit:y,clickIconSplitter:w}}const Ub=i.defineComponent({__name:"ScreenSplitToastPopup",props:{menuX:{},menuY:{},iconSplitSelected:{}},emits:["on-change-split"],setup(t,{emit:e}){const{iconSplitters:n}=Jp(),r=t,o=e,s=i.computed(()=>({top:`${r.menuY}px`,left:`${r.menuX}px`,transform:"translate(-50%, -50%)"}));return(a,l)=>(i.openBlock(),i.createElementBlock("div",{style:i.normalizeStyle(i.unref(s)),class:"fixed bg-[#424242]/40 text-white/40 rounded-[21px] w-[132px] h-[37px] flex items-center justify-center gap-6 [&>svg]:cursor-pointer"},[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(n),u=>(i.openBlock(),i.createBlock(i.unref(jt),{key:u.name,name:u.name,class:i.normalizeClass({"text-black/80":u.name===a.iconSplitSelected.name}),onClick:c=>o("on-change-split",u)},null,8,["name","class","onClick"]))),128))],4))}}),mc=i.defineComponent({__name:"CoreEditorMoblie",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{default:""},commentCuesheet:{},hideComment:{type:Boolean,default:!1},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{default:"12px"},fontFamilyDefault:{default:""},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean,default:!1},titleBarComment:{default:null},titleBarContent:{default:null},fieldNameComment:{default:null},fieldNameCommentCuesheet:{},fieldNameContent:{default:null},fieldNameSuper:{},isScreenSplit:{default:!1},isShowLineNumber:{type:Boolean,default:!1},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:200},maxHeight:{default:void 0},height:{default:void 0},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},toolBarClass:{default:void 0},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superTextViewCustomClass:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","lineFocus"],setup(t,{expose:e,emit:n}){const r=t,o=n;i.provide("isMobile",!0);const{t:s}=St(),a=et.useEventBus(Fn.RENDER_SUPER_TEXT),l=et.useEventBus(Fn.INCREASE_DECREASE_FONTSIZE),u=i.useAttrs(),c=vn(),{state:f,isFullscreen:p,isReady:m,editor:g,updateEditorState:b,superTextStore:y,checkSpellStore:w,setImageAttachment:x}=c,S=i.ref(!r.disabled&&!r.readonly);i.provide("isEditable",S);const E=i.computed(()=>[...f.extensions,...nt.differenceBy(r.extensions,f.extensions,"name")].map((U,de)=>U.configure({sort:de}))),C=i.ref(r.fontSizeDefault),T=i.ref(r.fontFamilyDefault);i.provide("fontSize",C),i.provide("fontFamily",T);const _=i.computed(()=>({fontFamily:T.value,fontSize:C.value})),A=i.ref();i.watch(()=>_.value,()=>{F()}),i.onMounted(()=>{F()});const D=U=>{const de=parseInt(C.value||"12px"),Se=U?de+2:de-2;C.value=Se+"px"};i.onBeforeMount(()=>{l.on(D)}),i.onBeforeUnmount(()=>{l.off(D)});const L=i.computed(()=>({...i.unref(p)?{height:"100%"}:{minHeight:r.minHeight?an(r.minHeight):void 0,maxHeight:r.maxHeight?an(r.maxHeight):void 0,height:r.height?an(r.height):void 0},maxWidth:an(r.maxWidth),width:r.maxWidth?"100%":void 0,margin:r.maxWidth?"0 auto":void 0})),B=new No({enablePasteRules:!1,enableInputRules:!1,content:Dn(r.modelValue,r.disabled,r.mode),editorProps:{handleKeyDown:nt.throttle((U,de)=>de.key==="Enter"&&u.enter&&!de.shiftKey?(o("enter"),!0):!1,_o),transformPastedHTML:U=>(U=U.replace(/\s*style="[^"]*"/g,""),U),handlePaste(U,de){var pt;if(r.mode!==Fe.PLAIN_TEXT)return!1;de.preventDefault();const Se=((pt=de.clipboardData)==null?void 0:pt.getData("text/plain"))||"",{tr:Xe,selection:ft}=U.state;return U.dispatch(Xe.insertText(Se,ft.from)),!0}},onCreate:({editor:U})=>{b(U)},onUpdate:nt.throttle(({editor:U})=>{m.value=!0;const de=R(U,r.output);o("update:modelValue",de),o("change",{editor:U,output:de}),b(U),F(),ue(U)},_o),extensions:nt.uniqBy(nt.reverse(i.unref(E)),"name"),editable:S.value,onFocus:()=>{H(),W.value=!0},onBlur:()=>W.value=!1,parseOptions:{preserveWhitespace:"full"}}),W=i.ref(!1),J=i.ref();function ue(U){const de=[];U.state.doc.descendants(Se=>{Se.type.name==="image"&&de.push({id:Se.attrs.id,src:Se.attrs.src})}),x(de)}const X=i.ref();i.onMounted(()=>{X.value=B});function H(U){X.value=U??B}function F(){a.emit({action:"render"})}function R(U,de){if(!U)return"";if(U.isEmpty)return de==="json"?{}:"";if(r.mode===Fe.PLAIN_TEXT)return U.getText({blockSeparator:`
|