gitea_hat/public/assets/js/easymde.58e747ca.js

96 lines
325 KiB
JavaScript

(self.webpackChunk=self.webpackChunk||[]).push([["easymde"],{"./node_modules/codemirror-spell-checker/src/js/spell-checker.js":function(ut,Ie,ye){"use strict";var W=ye("./node_modules/typo-js/typo.js");function Q(B){if(B=B||{},typeof B.codeMirrorInstance!="function"||typeof B.codeMirrorInstance.defineMode!="function"){console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`");return}String.prototype.includes||(String.prototype.includes=function(){"use strict";return String.prototype.indexOf.apply(this,arguments)!==-1}),B.codeMirrorInstance.defineMode("spell-checker",function(R){if(!Q.aff_loading){Q.aff_loading=!0;var E=new XMLHttpRequest;E.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),E.onload=function(){E.readyState===4&&E.status===200&&(Q.aff_data=E.responseText,Q.num_loaded++,Q.num_loaded==2&&(Q.typo=new W("en_US",Q.aff_data,Q.dic_data,{platform:"any"})))},E.send(null)}if(!Q.dic_loading){Q.dic_loading=!0;var F=new XMLHttpRequest;F.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),F.onload=function(){F.readyState===4&&F.status===200&&(Q.dic_data=F.responseText,Q.num_loaded++,Q.num_loaded==2&&(Q.typo=new W("en_US",Q.aff_data,Q.dic_data,{platform:"any"})))},F.send(null)}var M='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',Y={token:function(K){var P=K.peek(),oe="";if(M.includes(P))return K.next(),null;for(;(P=K.peek())!=null&&!M.includes(P);)oe+=P,K.next();return Q.typo&&!Q.typo.check(oe)?"spell-error":null}},V=B.codeMirrorInstance.getMode(R,R.backdrop||"text/plain");return B.codeMirrorInstance.overlayMode(V,Y,!0)})}Q.num_loaded=0,Q.aff_loading=!1,Q.dic_loading=!1,Q.aff_data="",Q.dic_data="",Q.typo,ut.exports=Q},"./node_modules/codemirror/addon/display/autorefresh.js":function(ut,Ie,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.defineOption("autoRefresh",!1,function(R,E){R.state.autoRefresh&&(B(R,R.state.autoRefresh),R.state.autoRefresh=null),E&&R.display.wrapper.offsetHeight==0&&Q(R,R.state.autoRefresh={delay:E.delay||250})});function Q(R,E){function F(){R.display.wrapper.offsetHeight?(B(R,E),R.display.lastWrapHeight!=R.display.wrapper.clientHeight&&R.refresh()):E.timeout=setTimeout(F,E.delay)}E.timeout=setTimeout(F,E.delay),E.hurry=function(){clearTimeout(E.timeout),E.timeout=setTimeout(F,50)},W.on(window,"mouseup",E.hurry),W.on(window,"keyup",E.hurry)}function B(R,E){clearTimeout(E.timeout),W.off(window,"mouseup",E.hurry),W.off(window,"keyup",E.hurry)}})},"./node_modules/codemirror/addon/display/fullscreen.js":function(ut,Ie,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.defineOption("fullScreen",!1,function(R,E,F){F==W.Init&&(F=!1),!F!=!E&&(E?Q(R):B(R))});function Q(R){var E=R.getWrapperElement();R.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:E.style.width,height:E.style.height},E.style.width="",E.style.height="auto",E.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",R.refresh()}function B(R){var E=R.getWrapperElement();E.className=E.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var F=R.state.fullScreenRestore;E.style.width=F.width,E.style.height=F.height,window.scrollTo(F.scrollLeft,F.scrollTop),R.refresh()}})},"./node_modules/codemirror/addon/display/placeholder.js":function(ut,Ie,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){W.defineOption("placeholder","",function(Y,V,K){var P=K&&K!=W.Init;if(V&&!P)Y.on("blur",E),Y.on("change",F),Y.on("swapDoc",F),W.on(Y.getInputField(),"compositionupdate",Y.state.placeholderCompose=function(){R(Y)}),F(Y);else if(!V&&P){Y.off("blur",E),Y.off("change",F),Y.off("swapDoc",F),W.off(Y.getInputField(),"compositionupdate",Y.state.placeholderCompose),Q(Y);var oe=Y.getWrapperElement();oe.className=oe.className.replace(" CodeMirror-empty","")}V&&!Y.hasFocus()&&E(Y)});function Q(Y){Y.state.placeholder&&(Y.state.placeholder.parentNode.removeChild(Y.state.placeholder),Y.state.placeholder=null)}function B(Y){Q(Y);var V=Y.state.placeholder=document.createElement("pre");V.style.cssText="height: 0; overflow: visible",V.style.direction=Y.getOption("direction"),V.className="CodeMirror-placeholder CodeMirror-line-like";var K=Y.getOption("placeholder");typeof K=="string"&&(K=document.createTextNode(K)),V.appendChild(K),Y.display.lineSpace.insertBefore(V,Y.display.lineSpace.firstChild)}function R(Y){setTimeout(function(){var V=!1;if(Y.lineCount()==1){var K=Y.getInputField();V=K.nodeName=="TEXTAREA"?!Y.getLine(0).length:!/[^\u200b]/.test(K.querySelector(".CodeMirror-line").textContent)}V?B(Y):Q(Y)},20)}function E(Y){M(Y)&&B(Y)}function F(Y){var V=Y.getWrapperElement(),K=M(Y);V.className=V.className.replace(" CodeMirror-empty","")+(K?" CodeMirror-empty":""),K?B(Y):Q(Y)}function M(Y){return Y.lineCount()===1&&Y.getLine(0)===""}})},"./node_modules/codemirror/addon/edit/continuelist.js":function(ut,Ie,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";var Q=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,B=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,R=/[*+-]\s/;W.commands.newlineAndIndentContinueMarkdownList=function(F){if(F.getOption("disableInput"))return W.Pass;for(var M=F.listSelections(),Y=[],V=0;V<M.length;V++){var K=M[V].head,P=F.getStateAfter(K.line),oe=W.innerMode(F.getMode(),P);if(oe.mode.name!=="markdown"&&oe.mode.helperType!=="markdown"){F.execCommand("newlineAndIndent");return}else P=oe.state;var pe=P.list!==!1,Ee=P.quote!==0,xe=F.getLine(K.line),Ce=Q.exec(xe),H=/^\s*$/.test(xe.slice(0,K.ch));if(!M[V].empty()||!pe&&!Ee||!Ce||H){F.execCommand("newlineAndIndent");return}if(B.test(xe)){var U=Ee&&/>\s*$/.test(xe),q=!/>\s*$/.test(xe);(U||q)&&F.replaceRange("",{line:K.line,ch:0},{line:K.line,ch:K.ch+1}),Y[V]=`
`}else{var te=Ce[1],X=Ce[5],ue=!(R.test(Ce[2])||Ce[2].indexOf(">")>=0),ne=ue?parseInt(Ce[3],10)+1+Ce[4]:Ce[2].replace("x"," ");Y[V]=`
`+te+ne+X,ue&&E(F,K)}}F.replaceSelections(Y)};function E(F,M){var Y=M.line,V=0,K=0,P=Q.exec(F.getLine(Y)),oe=P[1];do{V+=1;var pe=Y+V,Ee=F.getLine(pe),xe=Q.exec(Ee);if(xe){var Ce=xe[1],H=parseInt(P[3],10)+V-K,U=parseInt(xe[3],10),q=U;if(oe===Ce&&!isNaN(U))H===U&&(q=U+1),H>U&&(q=H+1),F.replaceRange(Ee.replace(Q,Ce+q+xe[4]+xe[5]),{line:pe,ch:0},{line:pe,ch:Ee.length});else{if(oe.length>Ce.length||oe.length<Ce.length&&V===1)return;K+=1}}}while(xe)}})},"./node_modules/codemirror/addon/mode/overlay.js":function(ut,Ie,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.overlayMode=function(Q,B,R){return{startState:function(){return{base:W.startState(Q),overlay:W.startState(B),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(E){return{base:W.copyState(Q,E.base),overlay:W.copyState(B,E.overlay),basePos:E.basePos,baseCur:null,overlayPos:E.overlayPos,overlayCur:null}},token:function(E,F){return(E!=F.streamSeen||Math.min(F.basePos,F.overlayPos)<E.start)&&(F.streamSeen=E,F.basePos=F.overlayPos=E.start),E.start==F.basePos&&(F.baseCur=Q.token(E,F.base),F.basePos=E.pos),E.start==F.overlayPos&&(E.pos=E.start,F.overlayCur=B.token(E,F.overlay),F.overlayPos=E.pos),E.pos=Math.min(F.basePos,F.overlayPos),F.overlayCur==null?F.baseCur:F.baseCur!=null&&F.overlay.combineTokens||R&&F.overlay.combineTokens==null?F.baseCur+" "+F.overlayCur:F.overlayCur},indent:Q.indent&&function(E,F,M){return Q.indent(E.base,F,M)},electricChars:Q.electricChars,innerMode:function(E){return{state:E.base,mode:Q}},blankLine:function(E){var F,M;return Q.blankLine&&(F=Q.blankLine(E.base)),B.blankLine&&(M=B.blankLine(E.overlay)),M==null?F:R&&F!=null?F+" "+M:M}}}})},"./node_modules/codemirror/addon/search/searchcursor.js":function(ut,Ie,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";var Q=W.Pos;function B(H){var U=H.flags;return U!=null?U:(H.ignoreCase?"i":"")+(H.global?"g":"")+(H.multiline?"m":"")}function R(H,U){for(var q=B(H),te=q,X=0;X<U.length;X++)te.indexOf(U.charAt(X))==-1&&(te+=U.charAt(X));return q==te?H:new RegExp(H.source,te)}function E(H){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(H.source)}function F(H,U,q){U=R(U,"g");for(var te=q.line,X=q.ch,ue=H.lastLine();te<=ue;te++,X=0){U.lastIndex=X;var ne=H.getLine(te),ge=U.exec(ne);if(ge)return{from:Q(te,ge.index),to:Q(te,ge.index+ge[0].length),match:ge}}}function M(H,U,q){if(!E(U))return F(H,U,q);U=R(U,"gm");for(var te,X=1,ue=q.line,ne=H.lastLine();ue<=ne;){for(var ge=0;ge<X&&!(ue>ne);ge++){var Te=H.getLine(ue++);te=te==null?Te:te+`
`+Te}X=X*2,U.lastIndex=q.ch;var Z=U.exec(te);if(Z){var Ae=te.slice(0,Z.index).split(`
`),J=Z[0].split(`
`),He=q.line+Ae.length-1,_=Ae[Ae.length-1].length;return{from:Q(He,_),to:Q(He+J.length-1,J.length==1?_+J[0].length:J[J.length-1].length),match:Z}}}}function Y(H,U,q){for(var te,X=0;X<=H.length;){U.lastIndex=X;var ue=U.exec(H);if(!ue)break;var ne=ue.index+ue[0].length;if(ne>H.length-q)break;(!te||ne>te.index+te[0].length)&&(te=ue),X=ue.index+1}return te}function V(H,U,q){U=R(U,"g");for(var te=q.line,X=q.ch,ue=H.firstLine();te>=ue;te--,X=-1){var ne=H.getLine(te),ge=Y(ne,U,X<0?0:ne.length-X);if(ge)return{from:Q(te,ge.index),to:Q(te,ge.index+ge[0].length),match:ge}}}function K(H,U,q){if(!E(U))return V(H,U,q);U=R(U,"gm");for(var te,X=1,ue=H.getLine(q.line).length-q.ch,ne=q.line,ge=H.firstLine();ne>=ge;){for(var Te=0;Te<X&&ne>=ge;Te++){var Z=H.getLine(ne--);te=te==null?Z:Z+`
`+te}X*=2;var Ae=Y(te,U,ue);if(Ae){var J=te.slice(0,Ae.index).split(`
`),He=Ae[0].split(`
`),_=ne+J.length,le=J[J.length-1].length;return{from:Q(_,le),to:Q(_+He.length-1,He.length==1?le+He[0].length:He[He.length-1].length),match:Ae}}}}var P,oe;String.prototype.normalize?(P=function(H){return H.normalize("NFD").toLowerCase()},oe=function(H){return H.normalize("NFD")}):(P=function(H){return H.toLowerCase()},oe=function(H){return H});function pe(H,U,q,te){if(H.length==U.length)return q;for(var X=0,ue=q+Math.max(0,H.length-U.length);;){if(X==ue)return X;var ne=X+ue>>1,ge=te(H.slice(0,ne)).length;if(ge==q)return ne;ge>q?ue=ne:X=ne+1}}function Ee(H,U,q,te){if(!U.length)return null;var X=te?P:oe,ue=X(U).split(/\r|\n\r?/);e:for(var ne=q.line,ge=q.ch,Te=H.lastLine()+1-ue.length;ne<=Te;ne++,ge=0){var Z=H.getLine(ne).slice(ge),Ae=X(Z);if(ue.length==1){var J=Ae.indexOf(ue[0]);if(J==-1)continue e;var q=pe(Z,Ae,J,X)+ge;return{from:Q(ne,pe(Z,Ae,J,X)+ge),to:Q(ne,pe(Z,Ae,J+ue[0].length,X)+ge)}}else{var He=Ae.length-ue[0].length;if(Ae.slice(He)!=ue[0])continue e;for(var _=1;_<ue.length-1;_++)if(X(H.getLine(ne+_))!=ue[_])continue e;var le=H.getLine(ne+ue.length-1),$=X(le),ke=ue[ue.length-1];if($.slice(0,ke.length)!=ke)continue e;return{from:Q(ne,pe(Z,Ae,He,X)+ge),to:Q(ne+ue.length-1,pe(le,$,ke.length,X))}}}}function xe(H,U,q,te){if(!U.length)return null;var X=te?P:oe,ue=X(U).split(/\r|\n\r?/);e:for(var ne=q.line,ge=q.ch,Te=H.firstLine()-1+ue.length;ne>=Te;ne--,ge=-1){var Z=H.getLine(ne);ge>-1&&(Z=Z.slice(0,ge));var Ae=X(Z);if(ue.length==1){var J=Ae.lastIndexOf(ue[0]);if(J==-1)continue e;return{from:Q(ne,pe(Z,Ae,J,X)),to:Q(ne,pe(Z,Ae,J+ue[0].length,X))}}else{var He=ue[ue.length-1];if(Ae.slice(0,He.length)!=He)continue e;for(var _=1,q=ne-ue.length+1;_<ue.length-1;_++)if(X(H.getLine(q+_))!=ue[_])continue e;var le=H.getLine(ne+1-ue.length),$=X(le);if($.slice($.length-ue[0].length)!=ue[0])continue e;return{from:Q(ne+1-ue.length,pe(le,$,le.length-ue[0].length,X)),to:Q(ne,pe(Z,Ae,He.length,X))}}}}function Ce(H,U,q,te){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=H,q=q?H.clipPos(q):Q(0,0),this.pos={from:q,to:q};var X;typeof te=="object"?X=te.caseFold:(X=te,te=null),typeof U=="string"?(X==null&&(X=!1),this.matches=function(ue,ne){return(ue?xe:Ee)(H,U,ne,X)}):(U=R(U,"gm"),!te||te.multiline!==!1?this.matches=function(ue,ne){return(ue?K:M)(H,U,ne)}:this.matches=function(ue,ne){return(ue?V:F)(H,U,ne)})}Ce.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(H){var U=this.doc.clipPos(H?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(U=Q(U.line,U.ch),H?(U.ch--,U.ch<0&&(U.line--,U.ch=(this.doc.getLine(U.line)||"").length)):(U.ch++,U.ch>(this.doc.getLine(U.line)||"").length&&(U.ch=0,U.line++)),W.cmpPos(U,this.doc.clipPos(U))!=0))return this.atOccurrence=!1;var q=this.matches(H,U);if(this.afterEmptyMatch=q&&W.cmpPos(q.from,q.to)==0,q)return this.pos=q,this.atOccurrence=!0,this.pos.match||!0;var te=Q(H?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:te,to:te},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(H,U){if(this.atOccurrence){var q=W.splitLines(H);this.doc.replaceRange(q,this.pos.from,this.pos.to,U),this.pos.to=Q(this.pos.from.line+q.length-1,q[q.length-1].length+(q.length==1?this.pos.from.ch:0))}}},W.defineExtension("getSearchCursor",function(H,U,q){return new Ce(this.doc,H,U,q)}),W.defineDocExtension("getSearchCursor",function(H,U,q){return new Ce(this,H,U,q)}),W.defineExtension("selectMatches",function(H,U){for(var q=[],te=this.getSearchCursor(H,this.getCursor("from"),U);te.findNext()&&!(W.cmpPos(te.to(),this.getCursor("to"))>0);)q.push({anchor:te.from(),head:te.to()});q.length&&this.setSelections(q,0)})})},"./node_modules/codemirror/addon/selection/mark-selection.js":function(ut,Ie,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.defineOption("styleSelectedText",!1,function(P,oe,pe){var Ee=pe&&pe!=W.Init;oe&&!Ee?(P.state.markedSelection=[],P.state.markedSelectionStyle=typeof oe=="string"?oe:"CodeMirror-selectedtext",V(P),P.on("cursorActivity",Q),P.on("change",B)):!oe&&Ee&&(P.off("cursorActivity",Q),P.off("change",B),Y(P),P.state.markedSelection=P.state.markedSelectionStyle=null)});function Q(P){P.state.markedSelection&&P.operation(function(){K(P)})}function B(P){P.state.markedSelection&&P.state.markedSelection.length&&P.operation(function(){Y(P)})}var R=8,E=W.Pos,F=W.cmpPos;function M(P,oe,pe,Ee){if(F(oe,pe)!=0)for(var xe=P.state.markedSelection,Ce=P.state.markedSelectionStyle,H=oe.line;;){var U=H==oe.line?oe:E(H,0),q=H+R,te=q>=pe.line,X=te?pe:E(q,0),ue=P.markText(U,X,{className:Ce});if(Ee==null?xe.push(ue):xe.splice(Ee++,0,ue),te)break;H=q}}function Y(P){for(var oe=P.state.markedSelection,pe=0;pe<oe.length;++pe)oe[pe].clear();oe.length=0}function V(P){Y(P);for(var oe=P.listSelections(),pe=0;pe<oe.length;pe++)M(P,oe[pe].from(),oe[pe].to())}function K(P){if(!P.somethingSelected())return Y(P);if(P.listSelections().length>1)return V(P);var oe=P.getCursor("start"),pe=P.getCursor("end"),Ee=P.state.markedSelection;if(!Ee.length)return M(P,oe,pe);var xe=Ee[0].find(),Ce=Ee[Ee.length-1].find();if(!xe||!Ce||pe.line-oe.line<=R||F(oe,Ce.to)>=0||F(pe,xe.from)<=0)return V(P);for(;F(oe,xe.from)>0;)Ee.shift().clear(),xe=Ee[0].find();for(F(oe,xe.from)<0&&(xe.to.line-oe.line<R?(Ee.shift().clear(),M(P,oe,xe.to,0)):M(P,oe,xe.from,0));F(pe,Ce.to)<0;)Ee.pop().clear(),Ce=Ee[Ee.length-1].find();F(pe,Ce.to)>0&&(pe.line-Ce.from.line<R?(Ee.pop().clear(),M(P,Ce.from,pe)):M(P,Ce.to,pe))}})},"./node_modules/codemirror/lib/codemirror.js":function(ut){(function(Ie,ye){ut.exports=ye()})(this,function(){"use strict";var Ie=navigator.userAgent,ye=navigator.platform,W=/gecko\/\d/i.test(Ie),Q=/MSIE \d/.test(Ie),B=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ie),R=/Edge\/(\d+)/.exec(Ie),E=Q||B||R,F=E&&(Q?document.documentMode||6:+(R||B)[1]),M=!R&&/WebKit\//.test(Ie),Y=M&&/Qt\/\d+\.\d+/.test(Ie),V=!R&&/Chrome\/(\d+)/.exec(Ie),K=V&&+V[1],P=/Opera\//.test(Ie),oe=/Apple Computer/.test(navigator.vendor),pe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ie),Ee=/PhantomJS/.test(Ie),xe=oe&&(/Mobile\/\w+/.test(Ie)||navigator.maxTouchPoints>2),Ce=/Android/.test(Ie),H=xe||Ce||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ie),U=xe||/Mac/.test(ye),q=/\bCrOS\b/.test(Ie),te=/win/i.test(ye),X=P&&Ie.match(/Version\/(\d*\.\d*)/);X&&(X=Number(X[1])),X&&X>=15&&(P=!1,M=!0);var ue=U&&(Y||P&&(X==null||X<12.11)),ne=W||E&&F>=9;function ge(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Te=function(e,t){var n=e.className,r=ge(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function Z(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Ae(e,t){return Z(e).appendChild(t)}function J(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)i.appendChild(t[a]);return i}function He(e,t,n,r){var i=J(e,t,n,r);return i.setAttribute("role","presentation"),i}var _;document.createRange?_=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:_=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function le(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function $(e){var t;try{t=e.activeElement}catch(n){t=e.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function ke(e,t){var n=e.className;ge(t).test(n)||(e.className+=(n?" ":"")+t)}function Qe(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!ge(n[r]).test(t)&&(t+=" "+n[r]);return t}var at=function(e){e.select()};xe?at=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:E&&(at=function(e){try{e.select()}catch(t){}});function rt(e){return e.display.wrapper.ownerDocument}function k(e){return rt(e).defaultView}function h(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function j(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function ee(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=r||0,o=i||0;;){var u=e.indexOf(" ",a);if(u<0||u>=t)return o+(t-a);o+=u-a,o+=n-o%n,a=u+1}}var Le=function(){this.id=null,this.f=null,this.time=0,this.handler=h(this.onTimeout,this)};Le.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Le.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function Ue(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var st=50,nt={toString:function(){return"CodeMirror.Pass"}},Xe={scroll:!1},ft={origin:"*mouse"},_e={origin:"+move"};function je(e,t,n){for(var r=0,i=0;;){var a=e.indexOf(" ",r);a==-1&&(a=e.length);var o=a-r;if(a==e.length||i+o>=t)return r+Math.min(o,t-i);if(i+=a-r,i+=n-i%n,r=a+1,i>=t)return r}}var At=[""];function qt(e){for(;At.length<=e;)At.push(se(At)+" ");return At[e]}function se(e){return e[e.length-1]}function Et(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Lt(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function Ut(){}function ht(e,t){var n;return Object.create?n=Object.create(e):(Ut.prototype=e,n=new Ut),t&&j(t,n),n}var Rt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ze(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Rt.test(e))}function kt(e,t){return t?t.source.indexOf("\\w")>-1&&ze(e)?!0:t.test(e):ze(e)}function Br(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var O=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function I(e){return e.charCodeAt(0)>=768&&O.test(e)}function L(e,t,n){for(;(n<0?t>0:t<e.length)&&I(e.charAt(t));)t+=n;return t}function c(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,a=r<0?Math.ceil(i):Math.floor(i);if(a==t)return e(a)?t:n;e(a)?n=a:t=a+r}}function p(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,a=0;a<e.length;++a){var o=e[a];(o.from<n&&o.to>t||t==n&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,n),o.level==1?"rtl":"ltr",a),i=!0)}i||r(t,n,"ltr")}var g=null;function b(e,t,n){var r;g=null;for(var i=0;i<e.length;++i){var a=e[i];if(a.from<t&&a.to>t)return i;a.to==t&&(a.from!=a.to&&n=="before"?r=i:g=i),a.from==t&&(a.from!=a.to&&n!="before"?r=i:g=i)}return r!=null?r:g}var l=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(f){return f<=247?e.charAt(f):1424<=f&&f<=1524?"R":1536<=f&&f<=1785?t.charAt(f-1536):1774<=f&&f<=2220?"r":8192<=f&&f<=8203?"w":f==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,u=/[1n]/;function s(f,v,y){this.level=f,this.from=v,this.to=y}return function(f,v){var y=v=="ltr"?"L":"R";if(f.length==0||v=="ltr"&&!r.test(f))return!1;for(var T=f.length,A=[],z=0;z<T;++z)A.push(n(f.charCodeAt(z)));for(var G=0,ae=y;G<T;++G){var fe=A[G];fe=="m"?A[G]=ae:ae=fe}for(var de=0,ce=y;de<T;++de){var ve=A[de];ve=="1"&&ce=="r"?A[de]="n":a.test(ve)&&(ce=ve,ve=="r"&&(A[de]="R"))}for(var Fe=1,Se=A[0];Fe<T-1;++Fe){var Oe=A[Fe];Oe=="+"&&Se=="1"&&A[Fe+1]=="1"?A[Fe]="1":Oe==","&&Se==A[Fe+1]&&(Se=="1"||Se=="n")&&(A[Fe]=Se),Se=Oe}for(var Ye=0;Ye<T;++Ye){var vt=A[Ye];if(vt==",")A[Ye]="N";else if(vt=="%"){var et=void 0;for(et=Ye+1;et<T&&A[et]=="%";++et);for(var _t=Ye&&A[Ye-1]=="!"||et<T&&A[et]=="1"?"1":"N",Nt=Ye;Nt<et;++Nt)A[Nt]=_t;Ye=et-1}}for(var ot=0,Ot=y;ot<T;++ot){var Dt=A[ot];Ot=="L"&&Dt=="1"?A[ot]="L":a.test(Dt)&&(Ot=Dt)}for(var ct=0;ct<T;++ct)if(i.test(A[ct])){var lt=void 0;for(lt=ct+1;lt<T&&i.test(A[lt]);++lt);for(var tt=(ct?A[ct-1]:y)=="L",It=(lt<T?A[lt]:y)=="L",$r=tt==It?tt?"L":"R":y,mr=ct;mr<lt;++mr)A[mr]=$r;ct=lt-1}for(var Ct=[],er,mt=0;mt<T;)if(o.test(A[mt])){var oa=mt;for(++mt;mt<T&&o.test(A[mt]);++mt);Ct.push(new s(0,oa,mt))}else{var lr=mt,Lr=Ct.length,Tr=v=="rtl"?1:0;for(++mt;mt<T&&A[mt]!="L";++mt);for(var Ft=lr;Ft<mt;)if(u.test(A[Ft])){lr<Ft&&(Ct.splice(Lr,0,new s(1,lr,Ft)),Lr+=Tr);var Vr=Ft;for(++Ft;Ft<mt&&u.test(A[Ft]);++Ft);Ct.splice(Lr,0,new s(2,Vr,Ft)),Lr+=Tr,lr=Ft}else++Ft;lr<mt&&Ct.splice(Lr,0,new s(1,lr,mt))}return v=="ltr"&&(Ct[0].level==1&&(er=f.match(/^\s+/))&&(Ct[0].from=er[0].length,Ct.unshift(new s(0,0,er[0].length))),se(Ct).level==1&&(er=f.match(/\s+$/))&&(se(Ct).to-=er[0].length,Ct.push(new s(0,T-er[0].length,T)))),v=="rtl"?Ct.reverse():Ct}}();function d(e,t){var n=e.order;return n==null&&(n=e.order=l(e.text,t)),n}var x=[],m=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||x).concat(n)}};function w(e,t){return e._handlers&&e._handlers[t]||x}function N(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var a=Ue(i,n);a>-1&&(r[t]=i.slice(0,a).concat(i.slice(a+1)))}}}function D(e,t){var n=w(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function C(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),D(e,n||t.type,e,t),me(t)||t.codemirrorIgnore}function S(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)Ue(n,t[r])==-1&&n.push(t[r])}function ie(e,t){return w(e,t).length>0}function he(e){e.prototype.on=function(t,n){m(this,t,n)},e.prototype.off=function(t,n){N(this,t,n)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function De(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function me(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Re(e){be(e),De(e)}function Pe(e){return e.target||e.srcElement}function Ne(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),U&&e.ctrlKey&&t==1&&(t=3),t}var We=function(){if(E&&F<9)return!1;var e=J("div");return"draggable"in e||"dragDrop"in e}(),Ze;function Je(e){if(Ze==null){var t=J("span","\u200B");Ae(e,J("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Ze=t.offsetWidth<=1&&t.offsetHeight>2&&!(E&&F<8))}var n=Ze?J("span","\u200B"):J("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var Tt;function xt(e){if(Tt!=null)return Tt;var t=Ae(e,document.createTextNode("A\u062EA")),n=_(t,0,1).getBoundingClientRect(),r=_(t,1,2).getBoundingClientRect();return Z(e),!n||n.left==n.right?!1:Tt=r.right-n.right<3}var jt=`
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
`,t);i==-1&&(i=e.length);var a=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),o=a.indexOf("\r");o!=-1?(n.push(a.slice(0,o)),t+=o+1):(n.push(a),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Mr=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Ln=function(){var e=J("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Nr=null;function si(e){if(Nr!=null)return Nr;var t=Ae(e,J("span","x")),n=t.getBoundingClientRect(),r=_(t,0,1).getBoundingClientRect();return Nr=Math.abs(n.left-r.left)>1}var xr={},ur={};function fi(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),xr[e]=t}function yt(e,t){ur[e]=t}function Gt(e){if(typeof e=="string"&&ur.hasOwnProperty(e))e=ur[e];else if(e&&typeof e.name=="string"&&ur.hasOwnProperty(e.name)){var t=ur[e.name];typeof t=="string"&&(t={name:t}),e=ht(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Gt("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Gt("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function zt(e,t){t=Gt(t);var n=xr[t.name];if(!n)return zt(e,"text/plain");var r=n(e,t);if(wt.hasOwnProperty(t.name)){var i=wt[t.name];for(var a in i)i.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=i[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var wt={};function tr(e,t){var n=wt.hasOwnProperty(e)?wt[e]:wt[e]={};j(t,n)}function Pt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Or(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Tn(e,t,n){return e.startState?e.startState(t,n):!0}var Ve=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Ve.prototype.eol=function(){return this.pos>=this.string.length},Ve.prototype.sol=function(){return this.pos==this.lineStart},Ve.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ve.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ve.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},Ve.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ve.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ve.prototype.skipToEnd=function(){this.pos=this.string.length},Ve.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ve.prototype.backUp=function(e){this.pos-=e},Ve.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ee(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ee(this.string,this.lineStart,this.tabSize):0)},Ve.prototype.indentation=function(){return ee(this.string,null,this.tabSize)-(this.lineStart?ee(this.string,this.lineStart,this.tabSize):0)},Ve.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(o){return n?o.toLowerCase():o},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},Ve.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ve.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ve.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ve.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function we(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],a=i.chunkSize();if(t<a){n=i;break}t-=a}return n.lines[t]}function yr(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(a){var o=a.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function ci(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Qt(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Ge(e){if(e.parent==null)return null;for(var t=e.parent,n=Ue(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Dr(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],a=i.height;if(t<a){e=i;continue e}t-=a,n+=i.chunkSize()}return n}while(!e.lines);for(var o=0;o<e.lines.length;++o){var u=e.lines[o],s=u.height;if(t<s)break;t-=s}return n+o}function en(e,t){return t>=e.first&&t<e.first+e.size}function hi(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function re(e,t,n){if(n===void 0&&(n=null),!(this instanceof re))return new re(e,t,n);this.line=e,this.ch=t,this.sticky=n}function Be(e,t){return e.line-t.line||e.ch-t.ch}function di(e,t){return e.sticky==t.sticky&&Be(e,t)==0}function pi(e){return re(e.line,e.ch)}function Bn(e,t){return Be(e,t)<0?t:e}function Mn(e,t){return Be(e,t)<0?e:t}function ua(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Me(e,t){if(t.line<e.first)return re(e.first,0);var n=e.first+e.size-1;return t.line>n?re(n,we(e,n).text.length):ul(t,we(e,t.line).text.length)}function ul(e,t){var n=e.ch;return n==null||n>t?re(e.line,t):n<0?re(e.line,0):e}function sa(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=Me(e,t[r]);return n}var Nn=function(e,t){this.state=e,this.lookAhead=t},Jt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Jt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Jt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Jt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Jt.fromSaved=function(e,t,n){return t instanceof Nn?new Jt(e,Pt(e.mode,t.state),n,t.lookAhead):new Jt(e,Pt(e.mode,t),n)},Jt.prototype.save=function(e){var t=e!==!1?Pt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Nn(t,this.maxLookAhead):t};function fa(e,t,n,r){var i=[e.state.modeGen],a={};va(e,t.text,e.doc.mode,n,function(f,v){return i.push(f,v)},a,r);for(var o=n.state,u=function(f){n.baseTokens=i;var v=e.state.overlays[f],y=1,T=0;n.state=!0,va(e,t.text,v.mode,n,function(A,z){for(var G=y;T<A;){var ae=i[y];ae>A&&i.splice(y,1,A,i[y+1],ae),y+=2,T=Math.min(A,ae)}if(z)if(v.opaque)i.splice(G,y-G,A,"overlay "+z),y=G+2;else for(;G<y;G+=2){var fe=i[G+1];i[G+1]=(fe?fe+" ":"")+"overlay "+z}},a),n.state=o,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)u(s);return{styles:i,classes:a.bgClass||a.textClass?a:null}}function ca(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=tn(e,Ge(t)),i=t.text.length>e.options.maxHighlightLength&&Pt(e.doc.mode,r.state),a=fa(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function tn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Jt(r,!0,t);var a=sl(e,t,n),o=a>r.first&&we(r,a-1).stateAfter,u=o?Jt.fromSaved(r,o,a):new Jt(r,Tn(r.mode),a);return r.iter(a,t,function(s){gi(e,s.text,u);var f=u.line;s.stateAfter=f==t-1||f%5==0||f>=i.viewFrom&&f<i.viewTo?u.save():null,u.nextLine()}),n&&(r.modeFrontier=u.line),u}function gi(e,t,n,r){var i=e.doc.mode,a=new Ve(t,e.options.tabSize,n);for(a.start=a.pos=r||0,t==""&&ha(i,n.state);!a.eol();)vi(i,a,n.state),a.start=a.pos}function ha(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Or(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function vi(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Or(e,n).mode);var a=e.token(t,n);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var da=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function pa(e,t,n,r){var i=e.doc,a=i.mode,o;t=Me(i,t);var u=we(i,t.line),s=tn(e,t.line,n),f=new Ve(u.text,e.options.tabSize,s),v;for(r&&(v=[]);(r||f.pos<t.ch)&&!f.eol();)f.start=f.pos,o=vi(a,f,s.state),r&&v.push(new da(f,o,Pt(i.mode,s.state)));return r?v:new da(f,o,s.state)}function ga(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";t[r]==null?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function va(e,t,n,r,i,a,o){var u=n.flattenSpans;u==null&&(u=e.options.flattenSpans);var s=0,f=null,v=new Ve(t,e.options.tabSize,r),y,T=e.options.addModeClass&&[null];for(t==""&&ga(ha(n,r.state),a);!v.eol();){if(v.pos>e.options.maxHighlightLength?(u=!1,o&&gi(e,t,r,v.pos),v.pos=t.length,y=null):y=ga(vi(n,v,r.state,T),a),T){var A=T[0].name;A&&(y="m-"+(y?A+" "+y:A))}if(!u||f!=y){for(;s<v.start;)s=Math.min(v.start,s+5e3),i(s,f);f=y}v.start=v.pos}for(;s<v.pos;){var z=Math.min(v.pos,s+5e3);i(z,f),s=z}}function sl(e,t,n){for(var r,i,a=e.doc,o=n?-1:t-(e.doc.mode.innerMode?1e3:100),u=t;u>o;--u){if(u<=a.first)return a.first;var s=we(a,u-1),f=s.stateAfter;if(f&&(!n||u+(f instanceof Nn?f.lookAhead:0)<=a.modeFrontier))return u;var v=ee(s.text,null,e.options.tabSize);(i==null||r>v)&&(i=u-1,r=v)}return i}function fl(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=we(e,r).stateAfter;if(i&&(!(i instanceof Nn)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var ma=!1,rr=!1;function cl(){ma=!0}function hl(){rr=!0}function On(e,t,n){this.marker=e,this.from=t,this.to=n}function rn(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function dl(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function pl(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function gl(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,u=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);if(u||a.from==t&&o.type=="bookmark"&&(!n||!a.marker.insertLeft)){var s=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(r||(r=[])).push(new On(o,a.from,s?null:a.to))}}return r}function vl(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var a=e[i],o=a.marker,u=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);if(u||a.from==t&&o.type=="bookmark"&&(!n||a.marker.insertLeft)){var s=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(r||(r=[])).push(new On(o,s?null:a.from-t,a.to==null?null:a.to-t))}}return r}function mi(e,t){if(t.full)return null;var n=en(e,t.from.line)&&we(e,t.from.line).markedSpans,r=en(e,t.to.line)&&we(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,a=t.to.ch,o=Be(t.from,t.to)==0,u=gl(n,i,o),s=vl(r,a,o),f=t.text.length==1,v=se(t.text).length+(f?i:0);if(u)for(var y=0;y<u.length;++y){var T=u[y];if(T.to==null){var A=rn(s,T.marker);A?f&&(T.to=A.to==null?null:A.to+v):T.to=i}}if(s)for(var z=0;z<s.length;++z){var G=s[z];if(G.to!=null&&(G.to+=v),G.from==null){var ae=rn(u,G.marker);ae||(G.from=v,f&&(u||(u=[])).push(G))}else G.from+=v,f&&(u||(u=[])).push(G)}u&&(u=xa(u)),s&&s!=u&&(s=xa(s));var fe=[u];if(!f){var de=t.text.length-2,ce;if(de>0&&u)for(var ve=0;ve<u.length;++ve)u[ve].to==null&&(ce||(ce=[])).push(new On(u[ve].marker,null,null));for(var Fe=0;Fe<de;++Fe)fe.push(ce);fe.push(s)}return fe}function xa(e){for(var t=0;t<e.length;++t){var n=e[t];n.from!=null&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function ml(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(A){if(A.markedSpans)for(var z=0;z<A.markedSpans.length;++z){var G=A.markedSpans[z].marker;G.readOnly&&(!r||Ue(r,G)==-1)&&(r||(r=[])).push(G)}}),!r)return null;for(var i=[{from:t,to:n}],a=0;a<r.length;++a)for(var o=r[a],u=o.find(0),s=0;s<i.length;++s){var f=i[s];if(!(Be(f.to,u.from)<0||Be(f.from,u.to)>0)){var v=[s,1],y=Be(f.from,u.from),T=Be(f.to,u.to);(y<0||!o.inclusiveLeft&&!y)&&v.push({from:f.from,to:u.from}),(T>0||!o.inclusiveRight&&!T)&&v.push({from:u.to,to:f.to}),i.splice.apply(i,v),s+=v.length-3}}return i}function ya(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Da(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function In(e){return e.inclusiveLeft?-1:0}function Hn(e){return e.inclusiveRight?1:0}function xi(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),a=Be(r.from,i.from)||In(e)-In(t);if(a)return-a;var o=Be(r.to,i.to)||Hn(e)-Hn(t);return o||t.id-e.id}function ba(e,t){var n=rr&&e.markedSpans,r;if(n)for(var i=void 0,a=0;a<n.length;++a)i=n[a],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||xi(r,i.marker)<0)&&(r=i.marker);return r}function Ca(e){return ba(e,!0)}function _n(e){return ba(e,!1)}function xl(e,t){var n=rr&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var a=n[i];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!r||xi(r,a.marker)<0)&&(r=a.marker)}return r}function ka(e,t,n,r,i){var a=we(e,t),o=rr&&a.markedSpans;if(o)for(var u=0;u<o.length;++u){var s=o[u];if(s.marker.collapsed){var f=s.marker.find(0),v=Be(f.from,n)||In(s.marker)-In(i),y=Be(f.to,r)||Hn(s.marker)-Hn(i);if(!(v>=0&&y<=0||v<=0&&y>=0)&&(v<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Be(f.to,n)>=0:Be(f.to,n)>0)||v>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Be(f.from,r)<=0:Be(f.from,r)<0)))return!0}}}function Kt(e){for(var t;t=Ca(e);)e=t.find(-1,!0).line;return e}function yl(e){for(var t;t=_n(e);)e=t.find(1,!0).line;return e}function Dl(e){for(var t,n;t=_n(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function yi(e,t){var n=we(e,t),r=Kt(n);return n==r?t:Ge(r)}function wa(e,t){if(t>e.lastLine())return t;var n=we(e,t),r;if(!sr(e,n))return t;for(;r=_n(n);)n=r.find(1,!0).line;return Ge(n)+1}function sr(e,t){var n=rr&&t.markedSpans;if(n){for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&Di(e,t,r))return!0}}}function Di(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return Di(e,r.line,rn(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,a=0;a<t.markedSpans.length;++a)if(i=t.markedSpans[a],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Di(e,t,i))return!0}function nr(e){e=Kt(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var a=n.parent;a;n=a,a=n.parent)for(var o=0;o<a.children.length;++o){var u=a.children[o];if(u==n)break;t+=u.height}return t}function Rn(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=Ca(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=_n(r);){var a=n.find(0,!0);t-=r.text.length-a.from.ch,r=a.to.line,t+=r.text.length-a.to.ch}return t}function bi(e){var t=e.display,n=e.doc;t.maxLine=we(n,n.first),t.maxLineLength=Rn(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var i=Rn(r);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Ir=function(e,t,n){this.text=e,Da(this,t),this.height=n?n(this):1};Ir.prototype.lineNo=function(){return Ge(this)},he(Ir);function bl(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ya(e),Da(e,n);var i=r?r(e):1;i!=e.height&&Qt(e,i)}function Cl(e){e.parent=null,ya(e)}var kl={},wl={};function Sa(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?wl:kl;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Fa(e,t){var n=He("span",null,null,M?"padding-right: .1px":null),r={pre:He("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var a=i?t.rest[i-1]:t.line,o=void 0;r.pos=0,r.addToken=Fl,xt(e.display.measure)&&(o=d(a,e.doc.direction))&&(r.addToken=El(r.addToken,o)),r.map=[];var u=t!=e.display.externalMeasured&&Ge(a);Ll(a,r,ca(e,a,u)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=Qe(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=Qe(a.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Je(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(M){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return D(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Qe(r.pre.className,r.textClass||"")),r}function Sl(e){var t=J("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Fl(e,t,n,r,i,a,o){if(t){var u=e.splitSpaces?Al(t,e.trailingSpace):t,s=e.cm.state.specialChars,f=!1,v;if(!s.test(t))e.col+=t.length,v=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,v),E&&F<9&&(f=!0),e.pos+=t.length;else{v=document.createDocumentFragment();for(var y=0;;){s.lastIndex=y;var T=s.exec(t),A=T?T.index-y:t.length-y;if(A){var z=document.createTextNode(u.slice(y,y+A));E&&F<9?v.appendChild(J("span",[z])):v.appendChild(z),e.map.push(e.pos,e.pos+A,z),e.col+=A,e.pos+=A}if(!T)break;y+=A+1;var G=void 0;if(T[0]==" "){var ae=e.cm.options.tabSize,fe=ae-e.col%ae;G=v.appendChild(J("span",qt(fe),"cm-tab")),G.setAttribute("role","presentation"),G.setAttribute("cm-text"," "),e.col+=fe}else T[0]=="\r"||T[0]==`
`?(G=v.appendChild(J("span",T[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),G.setAttribute("cm-text",T[0]),e.col+=1):(G=e.cm.options.specialCharPlaceholder(T[0]),G.setAttribute("cm-text",T[0]),E&&F<9?v.appendChild(J("span",[G])):v.appendChild(G),e.col+=1);e.map.push(e.pos,e.pos+1,G),e.pos++}}if(e.trailingSpace=u.charCodeAt(t.length-1)==32,n||r||i||f||a||o){var de=n||"";r&&(de+=r),i&&(de+=i);var ce=J("span",[v],de,a);if(o)for(var ve in o)o.hasOwnProperty(ve)&&ve!="style"&&ve!="class"&&ce.setAttribute(ve,o[ve]);return e.content.appendChild(ce)}e.content.appendChild(v)}}function Al(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var a=e.charAt(i);a==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(a="\xA0"),r+=a,n=a==" "}return r}function El(e,t){return function(n,r,i,a,o,u,s){i=i?i+" cm-force-border":"cm-force-border";for(var f=n.pos,v=f+r.length;;){for(var y=void 0,T=0;T<t.length&&(y=t[T],!(y.to>f&&y.from<=f));T++);if(y.to>=v)return e(n,r,i,a,o,u,s);e(n,r.slice(0,y.to-f),i,a,null,u,s),a=null,r=r.slice(y.to-f),f=y.to}}}function Aa(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function Ll(e,t,n){var r=e.markedSpans,i=e.text,a=0;if(!r){for(var o=1;o<n.length;o+=2)t.addToken(t,i.slice(a,a=n[o]),Sa(n[o+1],t.cm.options));return}for(var u=i.length,s=0,f=1,v="",y,T,A=0,z,G,ae,fe,de;;){if(A==s){z=G=ae=T="",de=null,fe=null,A=1/0;for(var ce=[],ve=void 0,Fe=0;Fe<r.length;++Fe){var Se=r[Fe],Oe=Se.marker;if(Oe.type=="bookmark"&&Se.from==s&&Oe.widgetNode)ce.push(Oe);else if(Se.from<=s&&(Se.to==null||Se.to>s||Oe.collapsed&&Se.to==s&&Se.from==s)){if(Se.to!=null&&Se.to!=s&&A>Se.to&&(A=Se.to,G=""),Oe.className&&(z+=" "+Oe.className),Oe.css&&(T=(T?T+";":"")+Oe.css),Oe.startStyle&&Se.from==s&&(ae+=" "+Oe.startStyle),Oe.endStyle&&Se.to==A&&(ve||(ve=[])).push(Oe.endStyle,Se.to),Oe.title&&((de||(de={})).title=Oe.title),Oe.attributes)for(var Ye in Oe.attributes)(de||(de={}))[Ye]=Oe.attributes[Ye];Oe.collapsed&&(!fe||xi(fe.marker,Oe)<0)&&(fe=Se)}else Se.from>s&&A>Se.from&&(A=Se.from)}if(ve)for(var vt=0;vt<ve.length;vt+=2)ve[vt+1]==A&&(G+=" "+ve[vt]);if(!fe||fe.from==s)for(var et=0;et<ce.length;++et)Aa(t,0,ce[et]);if(fe&&(fe.from||0)==s){if(Aa(t,(fe.to==null?u+1:fe.to)-s,fe.marker,fe.from==null),fe.to==null)return;fe.to==s&&(fe=!1)}}if(s>=u)break;for(var _t=Math.min(u,A);;){if(v){var Nt=s+v.length;if(!fe){var ot=Nt>_t?v.slice(0,_t-s):v;t.addToken(t,ot,y?y+z:z,ae,s+ot.length==A?G:"",T,de)}if(Nt>=_t){v=v.slice(_t-s),s=_t;break}s=Nt,ae=""}v=i.slice(a,a=n[f++]),y=Sa(n[f++],t.cm.options)}}}function Ea(e,t,n){this.line=t,this.rest=Dl(t),this.size=this.rest?Ge(se(this.rest))-n+1:1,this.node=this.text=null,this.hidden=sr(e,t)}function zn(e,t,n){for(var r=[],i,a=t;a<n;a=i){var o=new Ea(e.doc,we(e.doc,a),a);i=a+o.size,r.push(o)}return r}var Hr=null;function Tl(e){Hr?Hr.ops.push(e):e.ownsGroup=Hr={ops:[e],delayedCallbacks:[]}}function Bl(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function Ml(e,t){var n=e.ownsGroup;if(n)try{Bl(n)}finally{Hr=null,t(n)}}var nn=null;function dt(e,t){var n=w(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;Hr?i=Hr.delayedCallbacks:nn?i=nn:(i=nn=[],setTimeout(Nl,0));for(var a=function(u){i.push(function(){return n[u].apply(null,r)})},o=0;o<n.length;++o)a(o)}}function Nl(){var e=nn;nn=null;for(var t=0;t<e.length;++t)e[t]()}function La(e,t,n,r){for(var i=0;i<t.changes.length;i++){var a=t.changes[i];a=="text"?Il(e,t):a=="gutter"?Ba(e,t,n,r):a=="class"?Ci(e,t):a=="widget"&&Hl(e,t,r)}t.changes=null}function an(e){return e.node==e.text&&(e.node=J("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),E&&F<8&&(e.node.style.zIndex=2)),e.node}function Ol(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=an(t);t.background=r.insertBefore(J("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Ta(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Fa(e,t)}function Il(e,t){var n=t.text.className,r=Ta(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Ci(e,t)):n&&(t.text.className=n)}function Ci(e,t){Ol(e,t),t.line.wrapClass?an(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Ba(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=an(t);t.gutterBackground=J("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=an(t),u=t.gutter=J("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(u.setAttribute("aria-hidden","true"),e.display.input.setUneditable(u),o.insertBefore(u,t.text),t.line.gutterClass&&(u.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=u.appendChild(J("div",hi(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var s=0;s<e.display.gutterSpecs.length;++s){var f=e.display.gutterSpecs[s].className,v=a.hasOwnProperty(f)&&a[f];v&&u.appendChild(J("div",[v],"CodeMirror-gutter-elt","left: "+r.gutterLeft[f]+"px; width: "+r.gutterWidth[f]+"px"))}}}function Hl(e,t,n){t.alignable&&(t.alignable=null);for(var r=ge("CodeMirror-linewidget"),i=t.node.firstChild,a=void 0;i;i=a)a=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Ma(e,t,n)}function _l(e,t,n,r){var i=Ta(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Ci(e,t),Ba(e,t,n,r),Ma(e,t,r),t.node}function Ma(e,t,n){if(Na(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Na(e,t.rest[r],t,n,!1)}function Na(e,t,n,r,i){if(t.widgets)for(var a=an(n),o=0,u=t.widgets;o<u.length;++o){var s=u[o],f=J("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||f.setAttribute("cm-ignore-events","true"),Rl(s,f,n,r),e.display.input.setUneditable(f),i&&s.above?a.insertBefore(f,n.gutter||n.text):a.appendChild(f),dt(s,"redraw")}}function Rl(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function on(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!le(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),Ae(t.display.measure,J("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function ir(e,t){for(var n=Pe(t);n!=e.wrapper;n=n.parentNode)if(!n||n.nodeType==1&&n.getAttribute("cm-ignore-events")=="true"||n.parentNode==e.sizer&&n!=e.mover)return!0}function Pn(e){return e.lineSpace.offsetTop}function ki(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Oa(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Ae(e.measure,J("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function $t(e){return st-e.display.nativeBarWidth}function br(e){return e.display.scroller.clientWidth-$t(e)-e.display.barWidth}function wi(e){return e.display.scroller.clientHeight-$t(e)-e.display.barHeight}function zl(e,t,n){var r=e.options.lineWrapping,i=r&&br(e);if(!t.measure.heights||r&&t.measure.width!=i){var a=t.measure.heights=[];if(r){t.measure.width=i;for(var o=t.text.firstChild.getClientRects(),u=0;u<o.length-1;u++){var s=o[u],f=o[u+1];Math.abs(s.bottom-f.bottom)>2&&a.push((s.bottom+f.top)/2-n.top)}}a.push(n.bottom-n.top)}}function Ia(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(Ge(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Pl(e,t){t=Kt(t);var n=Ge(t),r=e.display.externalMeasured=new Ea(e.doc,t,n);r.lineN=n;var i=r.built=Fa(e,r);return r.text=i.pre,Ae(e.display.lineMeasure,i.pre),r}function Ha(e,t,n,r){return Vt(e,_r(e,t),n,r)}function Si(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[wr(e,t)];var n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size)return n}function _r(e,t){var n=Ge(t),r=Si(e,n);r&&!r.text?r=null:r&&r.changes&&(La(e,r,n,Ti(e)),e.curOp.forceUpdate=!0),r||(r=Pl(e,t));var i=Ia(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Vt(e,t,n,r,i){t.before&&(n=-1);var a=n+(r||""),o;return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(zl(e,t.view,t.rect),t.hasHeights=!0),o=Ul(e,t,n,r),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var _a={left:0,right:0,top:0,bottom:0};function Ra(e,t,n){for(var r,i,a,o,u,s,f=0;f<e.length;f+=3)if(u=e[f],s=e[f+1],t<u?(i=0,a=1,o="left"):t<s?(i=t-u,a=i+1):(f==e.length-3||t==s&&e[f+3]>t)&&(a=s-u,i=a-1,t>=s&&(o="right")),i!=null){if(r=e[f+2],u==s&&n==(r.insertLeft?"left":"right")&&(o=n),n=="left"&&i==0)for(;f&&e[f-2]==e[f-3]&&e[f-1].insertLeft;)r=e[(f-=3)+2],o="left";if(n=="right"&&i==s-u)for(;f<e.length-3&&e[f+3]==e[f+4]&&!e[f+5].insertLeft;)r=e[(f+=3)+2],o="right";break}return{node:r,start:i,end:a,collapse:o,coverStart:u,coverEnd:s}}function Wl(e,t){var n=_a;if(t=="left")for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function Ul(e,t,n,r){var i=Ra(t.map,n,r),a=i.node,o=i.start,u=i.end,s=i.collapse,f;if(a.nodeType==3){for(var v=0;v<4;v++){for(;o&&I(t.line.text.charAt(i.coverStart+o));)--o;for(;i.coverStart+u<i.coverEnd&&I(t.line.text.charAt(i.coverStart+u));)++u;if(E&&F<9&&o==0&&u==i.coverEnd-i.coverStart?f=a.parentNode.getBoundingClientRect():f=Wl(_(a,o,u).getClientRects(),r),f.left||f.right||o==0)break;u=o,o=o-1,s="right"}E&&F<11&&(f=jl(e.display.measure,f))}else{o>0&&(s=r="right");var y;e.options.lineWrapping&&(y=a.getClientRects()).length>1?f=y[r=="right"?y.length-1:0]:f=a.getBoundingClientRect()}if(E&&F<9&&!o&&(!f||!f.left&&!f.right)){var T=a.parentNode.getClientRects()[0];T?f={left:T.left,right:T.left+zr(e.display),top:T.top,bottom:T.bottom}:f=_a}for(var A=f.top-t.rect.top,z=f.bottom-t.rect.top,G=(A+z)/2,ae=t.view.measure.heights,fe=0;fe<ae.length-1&&!(G<ae[fe]);fe++);var de=fe?ae[fe-1]:0,ce=ae[fe],ve={left:(s=="right"?f.right:f.left)-t.rect.left,right:(s=="left"?f.left:f.right)-t.rect.left,top:de,bottom:ce};return!f.left&&!f.right&&(ve.bogus=!0),e.options.singleCursorHeightPerLine||(ve.rtop=A,ve.rbottom=z),ve}function jl(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!si(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function za(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Pa(e){e.display.externalMeasure=null,Z(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)za(e.display.view[t])}function ln(e){Pa(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Wa(e){return V&&Ce?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function Ua(e){return V&&Ce?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function Fi(e){var t=Kt(e),n=t.widgets,r=0;if(n)for(var i=0;i<n.length;++i)n[i].above&&(r+=on(n[i]));return r}function Wn(e,t,n,r,i){if(!i){var a=Fi(t);n.top+=a,n.bottom+=a}if(r=="line")return n;r||(r="local");var o=nr(t);if(r=="local"?o+=Pn(e.display):o-=e.display.viewOffset,r=="page"||r=="window"){var u=e.display.lineSpace.getBoundingClientRect();o+=u.top+(r=="window"?0:Ua(rt(e)));var s=u.left+(r=="window"?0:Wa(rt(e)));n.left+=s,n.right+=s}return n.top+=o,n.bottom+=o,n}function ja(e,t,n){if(n=="div")return t;var r=t.left,i=t.top;if(n=="page")r-=Wa(rt(e)),i-=Ua(rt(e));else if(n=="local"||!n){var a=e.display.sizer.getBoundingClientRect();r+=a.left,i+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:r-o.left,top:i-o.top}}function Un(e,t,n,r,i){return r||(r=we(e.doc,t.line)),Wn(e,r,Ha(e,r,t.ch,i),n)}function Xt(e,t,n,r,i,a){r=r||we(e.doc,t.line),i||(i=_r(e,r));function o(z,G){var ae=Vt(e,i,z,G?"right":"left",a);return G?ae.left=ae.right:ae.right=ae.left,Wn(e,r,ae,n)}var u=d(r,e.doc.direction),s=t.ch,f=t.sticky;if(s>=r.text.length?(s=r.text.length,f="before"):s<=0&&(s=0,f="after"),!u)return o(f=="before"?s-1:s,f=="before");function v(z,G,ae){var fe=u[G],de=fe.level==1;return o(ae?z-1:z,de!=ae)}var y=b(u,s,f),T=g,A=v(s,y,f=="before");return T!=null&&(A.other=v(s,T,f!="before")),A}function qa(e,t){var n=0;t=Me(e.doc,t),e.options.lineWrapping||(n=zr(e.display)*t.ch);var r=we(e.doc,t.line),i=nr(r)+Pn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Ai(e,t,n,r,i){var a=re(e,t,n);return a.xRel=i,r&&(a.outside=r),a}function Ei(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return Ai(r.first,0,null,-1,-1);var i=Dr(r,n),a=r.first+r.size-1;if(i>a)return Ai(r.first+r.size-1,we(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=we(r,i);;){var u=ql(e,o,i,t,n),s=xl(o,u.ch+(u.xRel>0||u.outside>0?1:0));if(!s)return u;var f=s.find(1);if(f.line==i)return f;o=we(r,i=f.line)}}function Ga(e,t,n,r){r-=Fi(t);var i=t.text.length,a=c(function(o){return Vt(e,n,o-1).bottom<=r},i,0);return i=c(function(o){return Vt(e,n,o).top>r},a,i),{begin:a,end:i}}function Ka(e,t,n,r){n||(n=_r(e,t));var i=Wn(e,t,Vt(e,n,r),"line").top;return Ga(e,t,n,i)}function Li(e,t,n,r){return e.bottom<=n?!1:e.top>n?!0:(r?e.left:e.right)>t}function ql(e,t,n,r,i){i-=nr(t);var a=_r(e,t),o=Fi(t),u=0,s=t.text.length,f=!0,v=d(t,e.doc.direction);if(v){var y=(e.options.lineWrapping?Kl:Gl)(e,t,n,a,v,r,i);f=y.level!=1,u=f?y.from:y.to-1,s=f?y.to:y.from-1}var T=null,A=null,z=c(function(Fe){var Se=Vt(e,a,Fe);return Se.top+=o,Se.bottom+=o,Li(Se,r,i,!1)?(Se.top<=i&&Se.left<=r&&(T=Fe,A=Se),!0):!1},u,s),G,ae,fe=!1;if(A){var de=r-A.left<A.right-r,ce=de==f;z=T+(ce?0:1),ae=ce?"after":"before",G=de?A.left:A.right}else{!f&&(z==s||z==u)&&z++,ae=z==0?"after":z==t.text.length?"before":Vt(e,a,z-(f?1:0)).bottom+o<=i==f?"after":"before";var ve=Xt(e,re(n,z,ae),"line",t,a);G=ve.left,fe=i<ve.top?-1:i>=ve.bottom?1:0}return z=L(t.text,z,1),Ai(n,z,ae,fe,r-G)}function Gl(e,t,n,r,i,a,o){var u=c(function(y){var T=i[y],A=T.level!=1;return Li(Xt(e,re(n,A?T.to:T.from,A?"before":"after"),"line",t,r),a,o,!0)},0,i.length-1),s=i[u];if(u>0){var f=s.level!=1,v=Xt(e,re(n,f?s.from:s.to,f?"after":"before"),"line",t,r);Li(v,a,o,!0)&&v.top>o&&(s=i[u-1])}return s}function Kl(e,t,n,r,i,a,o){var u=Ga(e,t,r,o),s=u.begin,f=u.end;/\s/.test(t.text.charAt(f-1))&&f--;for(var v=null,y=null,T=0;T<i.length;T++){var A=i[T];if(!(A.from>=f||A.to<=s)){var z=A.level!=1,G=Vt(e,r,z?Math.min(f,A.to)-1:Math.max(s,A.from)).right,ae=G<a?a-G+1e9:G-a;(!v||y>ae)&&(v=A,y=ae)}}return v||(v=i[i.length-1]),v.from<s&&(v={from:s,to:v.to,level:v.level}),v.to>f&&(v={from:v.from,to:f,level:v.level}),v}var Cr;function Rr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(Cr==null){Cr=J("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Cr.appendChild(document.createTextNode("x")),Cr.appendChild(J("br"));Cr.appendChild(document.createTextNode("x"))}Ae(e.measure,Cr);var n=Cr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Z(e.measure),n||1}function zr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=J("span","xxxxxxxxxx"),n=J("pre",[t],"CodeMirror-line-like");Ae(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Ti(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var u=e.display.gutterSpecs[o].className;n[u]=a.offsetLeft+a.clientLeft+i,r[u]=a.clientWidth}return{fixedPos:Bi(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Bi(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Xa(e){var t=Rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/zr(e.display)-3);return function(i){if(sr(e.doc,i))return 0;var a=0;if(i.widgets)for(var o=0;o<i.widgets.length;o++)i.widgets[o].height&&(a+=i.widgets[o].height);return n?a+(Math.ceil(i.text.length/r)||1)*t:a+t}}function Mi(e){var t=e.doc,n=Xa(e);t.iter(function(r){var i=n(r);i!=r.height&&Qt(r,i)})}function kr(e,t,n,r){var i=e.display;if(!n&&Pe(t).getAttribute("cm-not-content")=="true")return null;var a,o,u=i.lineSpace.getBoundingClientRect();try{a=t.clientX-u.left,o=t.clientY-u.top}catch(y){return null}var s=Ei(e,a,o),f;if(r&&s.xRel>0&&(f=we(e.doc,s.line).text).length==s.ch){var v=ee(f,f.length,e.options.tabSize)-f.length;s=re(s.line,Math.max(0,Math.round((a-Oa(e.display).left)/zr(e.display))-v))}return s}function wr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function Bt(e,t,n,r){t==null&&(t=e.doc.first),n==null&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)rr&&yi(e.doc,t)<i.viewTo&&cr(e);else if(n<=i.viewFrom)rr&&wa(e.doc,n+r)>i.viewFrom?cr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)cr(e);else if(t<=i.viewFrom){var a=jn(e,n,n+r,1);a?(i.view=i.view.slice(a.index),i.viewFrom=a.lineN,i.viewTo+=r):cr(e)}else if(n>=i.viewTo){var o=jn(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):cr(e)}else{var u=jn(e,t,t,-1),s=jn(e,n,n+r,1);u&&s?(i.view=i.view.slice(0,u.index).concat(zn(e,u.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):cr(e)}var f=i.externalMeasured;f&&(n<f.lineN?f.lineN+=r:t<f.lineN+f.size&&(i.externalMeasured=null))}function fr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var a=r.view[wr(e,t)];if(a.node!=null){var o=a.changes||(a.changes=[]);Ue(o,n)==-1&&o.push(n)}}}function cr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function jn(e,t,n,r){var i=wr(e,t),a,o=e.display.view;if(!rr||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var u=e.display.viewFrom,s=0;s<i;s++)u+=o[s].size;if(u!=t){if(r>0){if(i==o.length-1)return null;a=u+o[i].size-t,i++}else a=u-t;t+=a,n+=a}for(;yi(e.doc,n)!=n;){if(i==(r<0?0:o.length-1))return null;n+=r*o[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Xl(e,t,n){var r=e.display,i=r.view;i.length==0||t>=r.viewTo||n<=r.viewFrom?(r.view=zn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=zn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(wr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(zn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,wr(e,n)))),r.viewTo=n}function Ya(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];!i.hidden&&(!i.node||i.changes)&&++n}return n}function un(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Za(e,t){t===void 0&&(t=!0);var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),a=r.selection=document.createDocumentFragment(),o=e.options.$customCursor;o&&(t=!0);for(var u=0;u<n.sel.ranges.length;u++)if(!(!t&&u==n.sel.primIndex)){var s=n.sel.ranges[u];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var f=s.empty();if(o){var v=o(e,s);v&&Ni(e,v,i)}else(f||e.options.showCursorWhenSelecting)&&Ni(e,s.head,i);f||Yl(e,s,a)}}return r}function Ni(e,t,n){var r=Xt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(J("div","\xA0","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var a=Un(e,t,"div",null,null),o=a.right-a.left;i.style.width=(o>0?o:e.defaultCharWidth())+"px"}if(r.other){var u=n.appendChild(J("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));u.style.display="",u.style.left=r.other.left+"px",u.style.top=r.other.top+"px",u.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function qn(e,t){return e.top-t.top||e.left-t.left}function Yl(e,t,n){var r=e.display,i=e.doc,a=document.createDocumentFragment(),o=Oa(e.display),u=o.left,s=Math.max(r.sizerWidth,br(e)-r.sizer.offsetLeft)-o.right,f=i.direction=="ltr";function v(ce,ve,Fe,Se){ve<0&&(ve=0),ve=Math.round(ve),Se=Math.round(Se),a.appendChild(J("div",null,"CodeMirror-selected","position: absolute; left: "+ce+`px;
top: `+ve+"px; width: "+(Fe==null?s-ce:Fe)+`px;
height: `+(Se-ve)+"px"))}function y(ce,ve,Fe){var Se=we(i,ce),Oe=Se.text.length,Ye,vt;function et(ot,Ot){return Un(e,re(ce,ot),"div",Se,Ot)}function _t(ot,Ot,Dt){var ct=Ka(e,Se,null,ot),lt=Ot=="ltr"==(Dt=="after")?"left":"right",tt=Dt=="after"?ct.begin:ct.end-(/\s/.test(Se.text.charAt(ct.end-1))?2:1);return et(tt,lt)[lt]}var Nt=d(Se,i.direction);return p(Nt,ve||0,Fe==null?Oe:Fe,function(ot,Ot,Dt,ct){var lt=Dt=="ltr",tt=et(ot,lt?"left":"right"),It=et(Ot-1,lt?"right":"left"),$r=ve==null&&ot==0,mr=Fe==null&&Ot==Oe,Ct=ct==0,er=!Nt||ct==Nt.length-1;if(It.top-tt.top<=3){var mt=(f?$r:mr)&&Ct,oa=(f?mr:$r)&&er,lr=mt?u:(lt?tt:It).left,Lr=oa?s:(lt?It:tt).right;v(lr,tt.top,Lr-lr,tt.bottom)}else{var Tr,Ft,Vr,la;lt?(Tr=f&&$r&&Ct?u:tt.left,Ft=f?s:_t(ot,Dt,"before"),Vr=f?u:_t(Ot,Dt,"after"),la=f&&mr&&er?s:It.right):(Tr=f?_t(ot,Dt,"before"):u,Ft=!f&&$r&&Ct?s:tt.right,Vr=!f&&mr&&er?u:It.left,la=f?_t(Ot,Dt,"after"):s),v(Tr,tt.top,Ft-Tr,tt.bottom),tt.bottom<It.top&&v(u,tt.bottom,null,It.top),v(Vr,It.top,la-Vr,It.bottom)}(!Ye||qn(tt,Ye)<0)&&(Ye=tt),qn(It,Ye)<0&&(Ye=It),(!vt||qn(tt,vt)<0)&&(vt=tt),qn(It,vt)<0&&(vt=It)}),{start:Ye,end:vt}}var T=t.from(),A=t.to();if(T.line==A.line)y(T.line,T.ch,A.ch);else{var z=we(i,T.line),G=we(i,A.line),ae=Kt(z)==Kt(G),fe=y(T.line,T.ch,ae?z.text.length+1:null).end,de=y(A.line,ae?0:null,A.ch).start;ae&&(fe.top<de.top-2?(v(fe.right,fe.top,null,fe.bottom),v(u,de.top,de.left,de.bottom)):v(fe.right,fe.top,de.left-fe.right,fe.bottom)),fe.bottom<de.top&&v(u,fe.bottom,null,de.top)}n.appendChild(a)}function Oi(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Pr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Qa(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Hi(e))}function Ii(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Pr(e))},100)}function Hi(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(D(e,"focus",e,t),e.state.focused=!0,ke(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),M&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Oi(e))}function Pr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(D(e,"blur",e,t),e.state.focused=!1,Te(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Gn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,a=0,o=0;o<t.view.length;o++){var u=t.view[o],s=e.options.lineWrapping,f=void 0,v=0;if(!u.hidden){if(i+=u.line.height,E&&F<8){var y=u.node.offsetTop+u.node.offsetHeight;f=y-n,n=y}else{var T=u.node.getBoundingClientRect();f=T.bottom-T.top,!s&&u.text.firstChild&&(v=u.text.firstChild.getBoundingClientRect().right-T.left-1)}var A=u.line.height-f;if((A>.005||A<-.005)&&(i<r&&(a-=A),Qt(u.line,f),Ja(u.line),u.rest))for(var z=0;z<u.rest.length;z++)Ja(u.rest[z]);if(v>e.display.sizerWidth){var G=Math.ceil(v/zr(e.display));G>e.display.maxLineLength&&(e.display.maxLineLength=G,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Ja(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function Kn(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Pn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,a=Dr(t,r),o=Dr(t,i);if(n&&n.ensure){var u=n.ensure.from.line,s=n.ensure.to.line;u<a?(a=u,o=Dr(t,nr(we(t,u))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=o&&(a=Dr(t,nr(we(t,s))-e.wrapper.clientHeight),o=s)}return{from:a,to:Math.max(o,a+1)}}function Zl(e,t){if(!C(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,a=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(i=!1),i!=null&&!Ee){var o=J("div","\u200B",null,`position: absolute;
top: `+(t.top-n.viewOffset-Pn(e.display))+`px;
height: `+(t.bottom-t.top+$t(e)+n.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Ql(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?re(t.line,t.ch+1,"before"):t,t=t.ch?re(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var o=!1,u=Xt(e,t),s=!n||n==t?u:Xt(e,n);i={left:Math.min(u.left,s.left),top:Math.min(u.top,s.top)-r,right:Math.max(u.left,s.left),bottom:Math.max(u.bottom,s.bottom)+r};var f=_i(e,i),v=e.doc.scrollTop,y=e.doc.scrollLeft;if(f.scrollTop!=null&&(fn(e,f.scrollTop),Math.abs(e.doc.scrollTop-v)>1&&(o=!0)),f.scrollLeft!=null&&(Sr(e,f.scrollLeft),Math.abs(e.doc.scrollLeft-y)>1&&(o=!0)),!o)break}return i}function Jl(e,t){var n=_i(e,t);n.scrollTop!=null&&fn(e,n.scrollTop),n.scrollLeft!=null&&Sr(e,n.scrollLeft)}function _i(e,t){var n=e.display,r=Rr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,a=wi(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var u=e.doc.height+ki(n),s=t.top<r,f=t.bottom>u-r;if(t.top<i)o.scrollTop=s?0:t.top;else if(t.bottom>i+a){var v=Math.min(t.top,(f?u:t.bottom)-a);v!=i&&(o.scrollTop=v)}var y=e.options.fixedGutter?0:n.gutters.offsetWidth,T=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-y,A=br(e)-n.gutters.offsetWidth,z=t.right-t.left>A;return z&&(t.right=t.left+A),t.left<10?o.scrollLeft=0:t.left<T?o.scrollLeft=Math.max(0,t.left+y-(z?0:10)):t.right>A+T-3&&(o.scrollLeft=t.right+(z?0:10)-A),o}function Ri(e,t){t!=null&&(Xn(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Wr(e){Xn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function sn(e,t,n){(t!=null||n!=null)&&Xn(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function $l(e,t){Xn(e),e.curOp.scrollToPos=t}function Xn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=qa(e,t.from),r=qa(e,t.to);$a(e,n,r,t.margin)}}function $a(e,t,n,r){var i=_i(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});sn(e,i.scrollLeft,i.scrollTop)}function fn(e,t){Math.abs(e.doc.scrollTop-t)<2||(W||Pi(e,{top:t}),Va(e,t,!0),W&&Pi(e),dn(e,100))}function Va(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Sr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,io(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function cn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+ki(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+$t(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Fr=function(e,t,n){this.cm=n;var r=this.vert=J("div",[J("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=J("div",[J("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),m(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),m(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,E&&F<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Fr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fr.prototype.zeroWidthHack=function(){var e=U&&!pe?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Le,this.disableVert=new Le},Fr.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="";function r(){var i=e.getBoundingClientRect(),a=n=="vert"?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);a!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Fr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var hn=function(){};hn.prototype.update=function(){return{bottom:0,right:0}},hn.prototype.setScrollLeft=function(){},hn.prototype.setScrollTop=function(){},hn.prototype.clear=function(){};function Ur(e,t){t||(t=cn(e));var n=e.display.barWidth,r=e.display.barHeight;eo(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Gn(e),eo(e,cn(e)),n=e.display.barWidth,r=e.display.barHeight}function eo(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}var to={native:Fr,null:hn};function ro(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Te(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new to[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),m(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){n=="horizontal"?Sr(e,t):fn(e,t)},e),e.display.scrollbars.addClass&&ke(e.display.wrapper,e.display.scrollbars.addClass)}var Vl=0;function Ar(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Vl,markArrays:null},Tl(e.curOp)}function Er(e){var t=e.curOp;t&&Ml(t,function(n){for(var r=0;r<n.ops.length;r++)n.ops[r].cm.curOp=null;eu(n)})}function eu(e){for(var t=e.ops,n=0;n<t.length;n++)tu(t[n]);for(var r=0;r<t.length;r++)ru(t[r]);for(var i=0;i<t.length;i++)nu(t[i]);for(var a=0;a<t.length;a++)iu(t[a]);for(var o=0;o<t.length;o++)au(t[o])}function tu(e){var t=e.cm,n=t.display;lu(t),e.updateMaxLine&&bi(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Yn(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ru(e){e.updatedDisplay=e.mustUpdate&&zi(e.cm,e.update)}function nu(e){var t=e.cm,n=t.display;e.updatedDisplay&&Gn(t),e.barMeasure=cn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ha(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+$t(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-br(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function iu(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Sr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==$(rt(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ur(t,e.barMeasure),e.updatedDisplay&&Ui(t,e.barMeasure),e.selectionChanged&&Oi(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Qa(e.cm)}function au(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&no(t,e.update),n.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),e.scrollTop!=null&&Va(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Sr(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=Ql(t,Me(r,e.scrollToPos.from),Me(r,e.scrollToPos.to),e.scrollToPos.margin);Zl(t,i)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var u=0;u<a.length;++u)a[u].lines.length||D(a[u],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&D(o[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&D(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Ht(e,t){if(e.curOp)return t();Ar(e);try{return t()}finally{Er(e)}}function pt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ar(e);try{return t.apply(e,arguments)}finally{Er(e)}}}function St(e){return function(){if(this.curOp)return e.apply(this,arguments);Ar(this);try{return e.apply(this,arguments)}finally{Er(this)}}}function gt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ar(t);try{return e.apply(this,arguments)}finally{Er(t)}}}function dn(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,h(ou,e))}function ou(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=tn(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(r.line>=e.display.viewFrom){var o=a.styles,u=a.text.length>e.options.maxHighlightLength?Pt(t.mode,r.state):null,s=fa(e,a,r,!0);u&&(r.state=u),a.styles=s.styles;var f=a.styleClasses,v=s.classes;v?a.styleClasses=v:f&&(a.styleClasses=null);for(var y=!o||o.length!=a.styles.length||f!=v&&(!f||!v||f.bgClass!=v.bgClass||f.textClass!=v.textClass),T=0;!y&&T<o.length;++T)y=o[T]!=a.styles[T];y&&i.push(r.line),a.stateAfter=r.save(),r.nextLine()}else a.text.length<=e.options.maxHighlightLength&&gi(e,a.text,r),a.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return dn(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Ht(e,function(){for(var a=0;a<i.length;a++)fr(e,i[a],"text")})}}var Yn=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Kn(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=br(e),this.force=n,this.dims=Ti(e),this.events=[]};Yn.prototype.signal=function(e,t){ie(e,t)&&this.events.push(arguments)},Yn.prototype.finish=function(){for(var e=0;e<this.events.length;e++)D.apply(null,this.events[e])};function lu(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=$t(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=$t(e)+"px",t.scrollbarsClipped=!0)}function uu(e){if(e.hasFocus())return null;var t=$(rt(e));if(!t||!le(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=k(e).getSelection();r.anchorNode&&r.extend&&le(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function su(e){if(!(!e||!e.activeElt||e.activeElt==$(e.activeElt.ownerDocument))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&le(document.body,e.anchorNode)&&le(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),n.removeAllRanges(),n.addRange(r),n.extend(e.focusNode,e.focusOffset)}}function zi(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return cr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&Ya(e)==0)return!1;ao(e)&&(cr(e),t.dims=Ti(e));var i=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<a&&a-n.viewFrom<20&&(a=Math.max(r.first,n.viewFrom)),n.viewTo>o&&n.viewTo-o<20&&(o=Math.min(i,n.viewTo)),rr&&(a=yi(e.doc,a),o=wa(e.doc,o));var u=a!=n.viewFrom||o!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Xl(e,a,o),n.viewOffset=nr(we(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=Ya(e);if(!u&&s==0&&!t.force&&n.renderedView==n.view&&(n.updateLineNumbers==null||n.updateLineNumbers>=n.viewTo))return!1;var f=uu(e);return s>4&&(n.lineDiv.style.display="none"),fu(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,su(f),Z(n.cursorDiv),Z(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,u&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,dn(e,400)),n.updateLineNumbers=null,!0}function no(e,t){for(var n=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==br(e)){if(n&&n.top!=null&&(n={top:Math.min(e.doc.height+ki(e.display)-wi(e),n.top)}),t.visible=Kn(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Kn(e.display,e.doc,n));if(!zi(e,t))break;Gn(e);var i=cn(e);un(e),Ur(e,i),Ui(e,i),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Pi(e,t){var n=new Yn(e,t);if(zi(e,n)){Gn(e),no(e,n);var r=cn(e);un(e),Ur(e,r),Ui(e,r),n.finish()}}function fu(e,t,n){var r=e.display,i=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function u(z){var G=z.nextSibling;return M&&U&&e.display.currentWheelTarget==z?z.style.display="none":z.parentNode.removeChild(z),G}for(var s=r.view,f=r.viewFrom,v=0;v<s.length;v++){var y=s[v];if(!y.hidden)if(!y.node||y.node.parentNode!=a){var T=_l(e,y,f,n);a.insertBefore(T,o)}else{for(;o!=y.node;)o=u(o);var A=i&&t!=null&&t<=f&&y.lineNumber;y.changes&&(Ue(y.changes,"gutter")>-1&&(A=!1),La(e,y,f,n)),A&&(Z(y.lineNumber),y.lineNumber.appendChild(document.createTextNode(hi(e.options,f)))),o=y.node.nextSibling}f+=y.size}for(;o;)o=u(o)}function Wi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",dt(e,"gutterChanged",e)}function Ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+$t(e)+"px"}function io(e){var t=e.display,n=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Bi(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,a=r+"px",o=0;o<n.length;o++)if(!n[o].hidden){e.options.fixedGutter&&(n[o].gutter&&(n[o].gutter.style.left=a),n[o].gutterBackground&&(n[o].gutterBackground.style.left=a));var u=n[o].alignable;if(u)for(var s=0;s<u.length;s++)u[s].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function ao(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=hi(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(J("div",[J("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=i.firstChild.offsetWidth,o=i.offsetWidth-a;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(a,r.lineGutter.offsetWidth-o)+1,r.lineNumWidth=r.lineNumInnerWidth+o,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Wi(e.display),!0}return!1}function ji(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var a=e[i],o=null;if(typeof a!="string"&&(o=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)r=!0;else continue;n.push({className:a,style:o})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function oo(e){var t=e.gutters,n=e.gutterSpecs;Z(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],a=i.className,o=i.style,u=t.appendChild(J("div",null,"CodeMirror-gutter "+a));o&&(u.style.cssText=o),a=="CodeMirror-linenumbers"&&(e.lineGutter=u,u.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Wi(e)}function pn(e){oo(e.display),Bt(e),io(e)}function cu(e,t,n,r){var i=this;this.input=n,i.scrollbarFiller=J("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=J("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=He("div",null,"CodeMirror-code"),i.selectionDiv=J("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=J("div",null,"CodeMirror-cursors"),i.measure=J("div",null,"CodeMirror-measure"),i.lineMeasure=J("div",null,"CodeMirror-measure"),i.lineSpace=He("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var a=He("div",[i.lineSpace],"CodeMirror-lines");i.mover=J("div",[a],null,"position: relative"),i.sizer=J("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=J("div",null,null,"position: absolute; height: "+st+"px; width: 1px;"),i.gutters=J("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=J("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=J("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),V&&K>=105&&(i.wrapper.style.clipPath="inset(0px)"),i.wrapper.setAttribute("translate","no"),E&&F<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),!M&&!(W&&H)&&(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=ji(r.gutters,r.lineNumbers),oo(i),n.init(i)}var Zn=0,ar=null;E?ar=-.53:W?ar=15:V?ar=-.7:oe&&(ar=-1/3);function lo(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),n==null&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:n==null&&(n=e.wheelDelta),{x:t,y:n}}function hu(e){var t=lo(e);return t.x*=ar,t.y*=ar,t}function uo(e,t){V&&K==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var n=lo(t),r=n.x,i=n.y,a=ar;t.deltaMode===0&&(r=t.deltaX,i=t.deltaY,a=1);var o=e.display,u=o.scroller,s=u.scrollWidth>u.clientWidth,f=u.scrollHeight>u.clientHeight;if(r&&s||i&&f){if(i&&U&&M){e:for(var v=t.target,y=o.view;v!=u;v=v.parentNode)for(var T=0;T<y.length;T++)if(y[T].node==v){e.display.currentWheelTarget=v;break e}}if(r&&!W&&!P&&a!=null){i&&f&&fn(e,Math.max(0,u.scrollTop+i*a)),Sr(e,Math.max(0,u.scrollLeft+r*a)),(!i||i&&f)&&be(t),o.wheelStartX=null;return}if(i&&a!=null){var A=i*a,z=e.doc.scrollTop,G=z+o.wrapper.clientHeight;A<0?z=Math.max(0,z+A-50):G=Math.min(e.doc.height,G+A+50),Pi(e,{top:z,bottom:G})}Zn<20&&t.deltaMode!==0&&(o.wheelStartX==null?(o.wheelStartX=u.scrollLeft,o.wheelStartY=u.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(o.wheelStartX!=null){var ae=u.scrollLeft-o.wheelStartX,fe=u.scrollTop-o.wheelStartY,de=fe&&o.wheelDY&&fe/o.wheelDY||ae&&o.wheelDX&&ae/o.wheelDX;o.wheelStartX=o.wheelStartY=null,de&&(ar=(ar*Zn+de)/(Zn+1),++Zn)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}var Wt=function(e,t){this.ranges=e,this.primIndex=t};Wt.prototype.primary=function(){return this.ranges[this.primIndex]},Wt.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!di(n.anchor,r.anchor)||!di(n.head,r.head))return!1}return!0},Wt.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new qe(pi(this.ranges[t].anchor),pi(this.ranges[t].head));return new Wt(e,this.primIndex)},Wt.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Wt.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(Be(t,r.from())>=0&&Be(e,r.to())<=0)return n}return-1};var qe=function(e,t){this.anchor=e,this.head=t};qe.prototype.from=function(){return Mn(this.anchor,this.head)},qe.prototype.to=function(){return Bn(this.anchor,this.head)},qe.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Yt(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(T,A){return Be(T.from(),A.from())}),n=Ue(t,i);for(var a=1;a<t.length;a++){var o=t[a],u=t[a-1],s=Be(u.to(),o.from());if(r&&!o.empty()?s>0:s>=0){var f=Mn(u.from(),o.from()),v=Bn(u.to(),o.to()),y=u.empty()?o.from()==o.head:u.from()==u.head;a<=n&&--n,t.splice(--a,2,new qe(y?v:f,y?f:v))}}return new Wt(t,n)}function hr(e,t){return new Wt([new qe(e,t||e)],0)}function dr(e){return e.text?re(e.from.line+e.text.length-1,se(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function so(e,t){if(Be(e,t.from)<0)return e;if(Be(e,t.to)<=0)return dr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=dr(t).ch-t.to.ch),re(n,r)}function qi(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new qe(so(i.anchor,t),so(i.head,t)))}return Yt(e.cm,n,e.sel.primIndex)}function fo(e,t,n){return e.line==t.line?re(n.line,e.ch-t.ch+n.ch):re(n.line+(e.line-t.line),e.ch)}function du(e,t,n){for(var r=[],i=re(e.first,0),a=i,o=0;o<t.length;o++){var u=t[o],s=fo(u.from,i,a),f=fo(dr(u),i,a);if(i=u.to,a=f,n=="around"){var v=e.sel.ranges[o],y=Be(v.head,v.anchor)<0;r[o]=new qe(y?f:s,y?s:f)}else r[o]=new qe(s,s)}return new Wt(r,e.sel.primIndex)}function Gi(e){e.doc.mode=zt(e.options,e.doc.modeOption),gn(e)}function gn(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,dn(e,100),e.state.modeGen++,e.curOp&&Bt(e)}function co(e,t){return t.from.ch==0&&t.to.ch==0&&se(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ki(e,t,n,r){function i(de){return n?n[de]:null}function a(de,ce,ve){bl(de,ce,ve,r),dt(de,"change",de,t)}function o(de,ce){for(var ve=[],Fe=de;Fe<ce;++Fe)ve.push(new Ir(f[Fe],i(Fe),r));return ve}var u=t.from,s=t.to,f=t.text,v=we(e,u.line),y=we(e,s.line),T=se(f),A=i(f.length-1),z=s.line-u.line;if(t.full)e.insert(0,o(0,f.length)),e.remove(f.length,e.size-f.length);else if(co(e,t)){var G=o(0,f.length-1);a(y,y.text,A),z&&e.remove(u.line,z),G.length&&e.insert(u.line,G)}else if(v==y)if(f.length==1)a(v,v.text.slice(0,u.ch)+T+v.text.slice(s.ch),A);else{var ae=o(1,f.length-1);ae.push(new Ir(T+v.text.slice(s.ch),A,r)),a(v,v.text.slice(0,u.ch)+f[0],i(0)),e.insert(u.line+1,ae)}else if(f.length==1)a(v,v.text.slice(0,u.ch)+f[0]+y.text.slice(s.ch),i(0)),e.remove(u.line+1,z);else{a(v,v.text.slice(0,u.ch)+f[0],i(0)),a(y,T+y.text.slice(s.ch),A);var fe=o(1,f.length-1);z>1&&e.remove(u.line+1,z-1),e.insert(u.line+1,fe)}dt(e,"change",e,t)}function pr(e,t,n){function r(i,a,o){if(i.linked)for(var u=0;u<i.linked.length;++u){var s=i.linked[u];if(s.doc!=a){var f=o&&s.sharedHist;n&&!f||(t(s.doc,f),r(s.doc,i,f))}}}r(e,null,!0)}function ho(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Mi(e),Gi(e),po(e),e.options.direction=t.direction,e.options.lineWrapping||bi(e),e.options.mode=t.modeOption,Bt(e)}function po(e){(e.doc.direction=="rtl"?ke:Te)(e.display.lineDiv,"CodeMirror-rtl")}function pu(e){Ht(e,function(){po(e),Bt(e)})}function Qn(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Xi(e,t){var n={from:pi(t.from),to:dr(t),text:yr(e,t.from,t.to)};return mo(e,n,t.from.line,t.to.line+1),pr(e,function(r){return mo(r,n,t.from.line,t.to.line+1)},!0),n}function go(e){for(;e.length;){var t=se(e);if(t.ranges)e.pop();else break}}function gu(e,t){if(t)return go(e.done),se(e.done);if(e.done.length&&!se(e.done).ranges)return se(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),se(e.done)}function vo(e,t,n,r){var i=e.history;i.undone.length=0;var a=+new Date,o,u;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=gu(i,i.lastOp==r)))u=se(o.changes),Be(t.from,t.to)==0&&Be(t.from,u.to)==0?u.to=dr(t):o.changes.push(Xi(e,t));else{var s=se(i.done);for((!s||!s.ranges)&&Jn(e.sel,i.done),o={changes:[Xi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,u||D(e,"historyAdded")}function vu(e,t,n,r){var i=t.charAt(0);return i=="*"||i=="+"&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function mu(e,t,n,r){var i=e.history,a=r&&r.origin;n==i.lastSelOp||a&&i.lastSelOrigin==a&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==a||vu(e,a,se(i.done),t))?i.done[i.done.length-1]=t:Jn(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=a,i.lastSelOp=n,r&&r.clearRedo!==!1&&go(i.undone)}function Jn(e,t){var n=se(t);n&&n.ranges&&n.equals(e)||t.push(e)}function mo(e,t,n,r){var i=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(o){o.markedSpans&&((i||(i=t["spans_"+e.id]={}))[a]=o.markedSpans),++a})}function xu(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function yu(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(xu(n[i]));return r}function xo(e,t){var n=yu(e,t),r=mi(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var a=n[i],o=r[i];if(a&&o)e:for(var u=0;u<o.length;++u){for(var s=o[u],f=0;f<a.length;++f)if(a[f].marker==s.marker)continue e;a.push(s)}else o&&(n[i]=o)}return n}function jr(e,t,n){for(var r=[],i=0;i<e.length;++i){var a=e[i];if(a.ranges){r.push(n?Wt.prototype.deepCopy.call(a):a);continue}var o=a.changes,u=[];r.push({changes:u});for(var s=0;s<o.length;++s){var f=o[s],v=void 0;if(u.push({from:f.from,to:f.to,text:f.text}),t)for(var y in f)(v=y.match(/^spans_(\d+)$/))&&Ue(t,Number(v[1]))>-1&&(se(u)[y]=f[y],delete f[y])}}return r}function Yi(e,t,n,r){if(r){var i=e.anchor;if(n){var a=Be(t,i)<0;a!=Be(n,i)<0?(i=t,t=n):a!=Be(t,n)<0&&(t=n)}return new qe(i,t)}else return new qe(n||t,t)}function $n(e,t,n,r,i){i==null&&(i=e.cm&&(e.cm.display.shift||e.extend)),bt(e,new Wt([Yi(e.sel.primary(),t,n,i)],0),r)}function yo(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)r[a]=Yi(e.sel.ranges[a],t[a],null,i);var o=Yt(e.cm,r,e.sel.primIndex);bt(e,o,n)}function Zi(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,bt(e,Yt(e.cm,i,e.sel.primIndex),r)}function Do(e,t,n,r){bt(e,hr(t,n),r)}function Du(e,t,n){var r={ranges:t.ranges,update:function(i){this.ranges=[];for(var a=0;a<i.length;a++)this.ranges[a]=new qe(Me(e,i[a].anchor),Me(e,i[a].head))},origin:n&&n.origin};return D(e,"beforeSelectionChange",e,r),e.cm&&D(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Yt(e.cm,r.ranges,r.ranges.length-1):t}function bo(e,t,n){var r=e.history.done,i=se(r);i&&i.ranges?(r[r.length-1]=t,Vn(e,t,n)):bt(e,t,n)}function bt(e,t,n){Vn(e,t,n),mu(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Vn(e,t,n){(ie(e,"beforeSelectionChange")||e.cm&&ie(e.cm,"beforeSelectionChange"))&&(t=Du(e,t,n));var r=n&&n.bias||(Be(t.primary().head,e.sel.primary().head)<0?-1:1);Co(e,wo(e,t,r,!0)),!(n&&n.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Wr(e.cm)}function Co(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,S(e.cm)),dt(e,"cursorActivity",e))}function ko(e){Co(e,wo(e,e.sel,null,!1))}function wo(e,t,n,r){for(var i,a=0;a<t.ranges.length;a++){var o=t.ranges[a],u=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],s=ei(e,o.anchor,u&&u.anchor,n,r),f=o.head==o.anchor?s:ei(e,o.head,u&&u.head,n,r);(i||s!=o.anchor||f!=o.head)&&(i||(i=t.ranges.slice(0,a)),i[a]=new qe(s,f))}return i?Yt(e.cm,i,t.primIndex):t}function qr(e,t,n,r,i){var a=we(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var u=a.markedSpans[o],s=u.marker,f="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,v="selectRight"in s?!s.selectRight:s.inclusiveRight;if((u.from==null||(f?u.from<=t.ch:u.from<t.ch))&&(u.to==null||(v?u.to>=t.ch:u.to>t.ch))){if(i&&(D(s,"beforeCursorEnter"),s.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!s.atomic)continue;if(n){var y=s.find(r<0?1:-1),T=void 0;if((r<0?v:f)&&(y=So(e,y,-r,y&&y.line==t.line?a:null)),y&&y.line==t.line&&(T=Be(y,n))&&(r<0?T<0:T>0))return qr(e,y,t,r,i)}var A=s.find(r<0?-1:1);return(r<0?f:v)&&(A=So(e,A,r,A.line==t.line?a:null)),A?qr(e,A,t,r,i):null}}return t}function ei(e,t,n,r,i){var a=r||1,o=qr(e,t,n,a,i)||!i&&qr(e,t,n,a,!0)||qr(e,t,n,-a,i)||!i&&qr(e,t,n,-a,!0);return o||(e.cantEdit=!0,re(e.first,0))}function So(e,t,n,r){return n<0&&t.ch==0?t.line>e.first?Me(e,re(t.line-1)):null:n>0&&t.ch==(r||we(e,t.line)).text.length?t.line<e.first+e.size-1?re(t.line+1,0):null:new re(t.line,t.ch+n)}function Fo(e){e.setSelection(re(e.firstLine(),0),re(e.lastLine()),Xe)}function Ao(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(i,a,o,u){i&&(r.from=Me(e,i)),a&&(r.to=Me(e,a)),o&&(r.text=o),u!==void 0&&(r.origin=u)}),D(e,"beforeChange",e,r),e.cm&&D(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Gr(e,t,n){if(e.cm){if(!e.cm.curOp)return pt(e.cm,Gr)(e,t,n);if(e.cm.state.suppressEdits)return}if(!((ie(e,"beforeChange")||e.cm&&ie(e.cm,"beforeChange"))&&(t=Ao(e,t,!0),!t))){var r=ma&&!n&&ml(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Eo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Eo(e,t)}}function Eo(e,t){if(!(t.text.length==1&&t.text[0]==""&&Be(t.from,t.to)==0)){var n=qi(e,t);vo(e,t,n,e.cm?e.cm.curOp.id:NaN),vn(e,t,n,mi(e,t));var r=[];pr(e,function(i,a){!a&&Ue(r,i.history)==-1&&(Mo(i.history,t),r.push(i.history)),vn(i,t,null,mi(i,t))})}}function ti(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!n)){for(var i=e.history,a,o=e.sel,u=t=="undo"?i.done:i.undone,s=t=="undo"?i.undone:i.done,f=0;f<u.length&&(a=u[f],!(n?a.ranges&&!a.equals(e.sel):!a.ranges));f++);if(f!=u.length){for(i.lastOrigin=i.lastSelOrigin=null;;)if(a=u.pop(),a.ranges){if(Jn(a,s),n&&!a.equals(e.sel)){bt(e,a,{clearRedo:!1});return}o=a}else if(r){u.push(a);return}else break;var v=[];Jn(o,s),s.push({changes:v,generation:i.generation}),i.generation=a.generation||++i.maxGeneration;for(var y=ie(e,"beforeChange")||e.cm&&ie(e.cm,"beforeChange"),T=function(G){var ae=a.changes[G];if(ae.origin=t,y&&!Ao(e,ae,!1))return u.length=0,{};v.push(Xi(e,ae));var fe=G?qi(e,ae):se(u);vn(e,ae,fe,xo(e,ae)),!G&&e.cm&&e.cm.scrollIntoView({from:ae.from,to:dr(ae)});var de=[];pr(e,function(ce,ve){!ve&&Ue(de,ce.history)==-1&&(Mo(ce.history,ae),de.push(ce.history)),vn(ce,ae,null,xo(ce,ae))})},A=a.changes.length-1;A>=0;--A){var z=T(A);if(z)return z.v}}}}function Lo(e,t){if(t!=0&&(e.first+=t,e.sel=new Wt(Et(e.sel.ranges,function(i){return new qe(re(i.anchor.line+t,i.anchor.ch),re(i.head.line+t,i.head.ch))}),e.sel.primIndex),e.cm)){Bt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)fr(e.cm,r,"gutter")}}function vn(e,t,n,r){if(e.cm&&!e.cm.curOp)return pt(e.cm,vn)(e,t,n,r);if(t.to.line<e.first){Lo(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Lo(e,i),t={from:re(e.first,0),to:re(t.to.line+i,t.to.ch),text:[se(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:re(a,we(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=yr(e,t.from,t.to),n||(n=qi(e,t)),e.cm?bu(e.cm,t,r):Ki(e,t,r),Vn(e,n,Xe),e.cantEdit&&ei(e,re(e.firstLine(),0))&&(e.cantEdit=!1)}}function bu(e,t,n){var r=e.doc,i=e.display,a=t.from,o=t.to,u=!1,s=a.line;e.options.lineWrapping||(s=Ge(Kt(we(r,a.line))),r.iter(s,o.line+1,function(A){if(A==i.maxLine)return u=!0,!0})),r.sel.contains(t.from,t.to)>-1&&S(e),Ki(r,t,n,Xa(e)),e.options.lineWrapping||(r.iter(s,a.line+t.text.length,function(A){var z=Rn(A);z>i.maxLineLength&&(i.maxLine=A,i.maxLineLength=z,i.maxLineChanged=!0,u=!1)}),u&&(e.curOp.updateMaxLine=!0)),fl(r,a.line),dn(e,400);var f=t.text.length-(o.line-a.line)-1;t.full?Bt(e):a.line==o.line&&t.text.length==1&&!co(e.doc,t)?fr(e,a.line,"text"):Bt(e,a.line,o.line+1,f);var v=ie(e,"changes"),y=ie(e,"change");if(y||v){var T={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};y&&dt(e,"change",e,T),v&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(T)}e.display.selForContextMenu=null}function Kr(e,t,n,r,i){var a;r||(r=n),Be(r,n)<0&&(a=[r,n],n=a[0],r=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Gr(e,{from:n,to:r,text:t,origin:i})}function To(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function Bo(e,t,n,r){for(var i=0;i<e.length;++i){var a=e[i],o=!0;if(a.ranges){a.copied||(a=e[i]=a.deepCopy(),a.copied=!0);for(var u=0;u<a.ranges.length;u++)To(a.ranges[u].anchor,t,n,r),To(a.ranges[u].head,t,n,r);continue}for(var s=0;s<a.changes.length;++s){var f=a.changes[s];if(n<f.from.line)f.from=re(f.from.line+r,f.from.ch),f.to=re(f.to.line+r,f.to.ch);else if(t<=f.to.line){o=!1;break}}o||(e.splice(0,i+1),i=0)}}function Mo(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;Bo(e.done,n,r,i),Bo(e.undone,n,r,i)}function mn(e,t,n,r){var i=t,a=t;return typeof t=="number"?a=we(e,ua(e,t)):i=Ge(t),i==null?null:(r(a,i)&&e.cm&&fr(e.cm,i,n),a)}function xn(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}xn.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,Cl(i),dt(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}};function yn(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}yn.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var a=Math.min(t,i-e),o=r.height;if(r.removeInner(e,a),this.height-=o-r.height,i==a&&(this.children.splice(n--,1),r.parent=null),(t-=a)==0)break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof xn))){var u=[];this.collapse(u),this.children=[new xn(u)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<=a){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var o=i.lines.length%25+25,u=o;u<i.lines.length;){var s=new xn(i.lines.slice(u,u+=25));i.height-=s.height,this.children.splice(++r,0,s),s.parent=this}i.lines=i.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new yn(t);if(e.parent){e.size-=n.size,e.height-=n.height;var i=Ue(e.parent.children,e);e.parent.children.splice(i+1,0,n)}else{var r=new yn(e.children);r.parent=e,e.children=[r,n],e=r}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],a=i.chunkSize();if(e<a){var o=Math.min(t,a-e);if(i.iterN(e,o,n))return!0;if((t-=o)==0)break;e=0}else e-=a}}};var Dn=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};Dn.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Ge(n);if(!(r==null||!t)){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var a=on(this);Qt(n,Math.max(0,n.height-a)),e&&(Ht(e,function(){No(e,n,-a),fr(e,r,"widget")}),dt(e,"lineWidgetCleared",e,this,r))}},Dn.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=on(this)-t;i&&(sr(this.doc,r)||Qt(r,r.height+i),n&&Ht(n,function(){n.curOp.forceUpdate=!0,No(n,r,i),dt(n,"lineWidgetChanged",n,e,Ge(r))}))},he(Dn);function No(e,t,n){nr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ri(e,n)}function Cu(e,t,n,r){var i=new Dn(e,n,r),a=e.cm;return a&&i.noHScroll&&(a.display.alignWidgets=!0),mn(e,t,"widget",function(o){var u=o.widgets||(o.widgets=[]);if(i.insertAt==null?u.push(i):u.splice(Math.min(u.length,Math.max(0,i.insertAt)),0,i),i.line=o,a&&!sr(e,o)){var s=nr(o)<e.scrollTop;Qt(o,o.height+on(i)),s&&Ri(a,i.height),a.curOp.forceUpdate=!0}return!0}),a&&dt(a,"lineWidgetAdded",a,i,typeof t=="number"?t:Ge(t)),i}var Oo=0,gr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Oo};gr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ar(e),ie(this,"clear")){var n=this.find();n&&dt(this,"clear",n.from,n.to)}for(var r=null,i=null,a=0;a<this.lines.length;++a){var o=this.lines[a],u=rn(o.markedSpans,this);e&&!this.collapsed?fr(e,Ge(o),"text"):e&&(u.to!=null&&(i=Ge(o)),u.from!=null&&(r=Ge(o))),o.markedSpans=dl(o.markedSpans,u),u.from==null&&this.collapsed&&!sr(this.doc,o)&&e&&Qt(o,Rr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var f=Kt(this.lines[s]),v=Rn(f);v>e.display.maxLineLength&&(e.display.maxLine=f,e.display.maxLineLength=v,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Bt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ko(e.doc)),e&&dt(e,"markerCleared",e,this,r,i),t&&Er(e),this.parent&&this.parent.clear()}},gr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var n,r,i=0;i<this.lines.length;++i){var a=this.lines[i],o=rn(a.markedSpans,this);if(o.from!=null&&(n=re(t?a:Ge(a),o.from),e==-1))return n;if(o.to!=null&&(r=re(t?a:Ge(a),o.to),e==1))return r}return n&&{from:n,to:r}},gr.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;!t||!r||Ht(r,function(){var i=t.line,a=Ge(t.line),o=Si(r,a);if(o&&(za(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!sr(n.doc,i)&&n.height!=null){var u=n.height;n.height=null;var s=on(n)-u;s&&Qt(i,i.height+s)}dt(r,"markerChanged",r,e)})},gr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||Ue(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},gr.prototype.detachLine=function(e){if(this.lines.splice(Ue(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},he(gr);function Xr(e,t,n,r,i){if(r&&r.shared)return ku(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return pt(e.cm,Xr)(e,t,n,r,i);var a=new gr(e,i),o=Be(t,n);if(r&&j(r,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=He("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ka(e,t.line,t,n,a)||t.line!=n.line&&ka(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");hl()}a.addToHistory&&vo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var u=t.line,s=e.cm,f;if(e.iter(u,n.line+1,function(y){s&&a.collapsed&&!s.options.lineWrapping&&Kt(y)==s.display.maxLine&&(f=!0),a.collapsed&&u!=t.line&&Qt(y,0),pl(y,new On(a,u==t.line?t.ch:null,u==n.line?n.ch:null),e.cm&&e.cm.curOp),++u}),a.collapsed&&e.iter(t.line,n.line+1,function(y){sr(e,y)&&Qt(y,0)}),a.clearOnEnter&&m(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(cl(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Oo,a.atomic=!0),s){if(f&&(s.curOp.updateMaxLine=!0),a.collapsed)Bt(s,t.line,n.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var v=t.line;v<=n.line;v++)fr(s,v,"text");a.atomic&&ko(s.doc),dt(s,"markerAdded",s,a)}return a}var bn=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};bn.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();dt(this,"clear")}},bn.prototype.find=function(e,t){return this.primary.find(e,t)},he(bn);function ku(e,t,n,r,i){r=j(r),r.shared=!1;var a=[Xr(e,t,n,r,i)],o=a[0],u=r.widgetNode;return pr(e,function(s){u&&(r.widgetNode=u.cloneNode(!0)),a.push(Xr(s,Me(s,t),Me(s,n),r,i));for(var f=0;f<s.linked.length;++f)if(s.linked[f].isParent)return;o=se(a)}),new bn(a,o)}function Io(e){return e.findMarks(re(e.first,0),e.clipPos(re(e.lastLine())),function(t){return t.parent})}function wu(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),a=e.clipPos(i.from),o=e.clipPos(i.to);if(Be(a,o)){var u=Xr(e,a,o,r.primary,r.primary.type);r.markers.push(u),u.parent=r}}}function Su(e){for(var t=function(r){var i=e[r],a=[i.primary.doc];pr(i.primary.doc,function(s){return a.push(s)});for(var o=0;o<i.markers.length;o++){var u=i.markers[o];Ue(a,u.doc)==-1&&(u.parent=null,i.markers.splice(o--,1))}},n=0;n<e.length;n++)t(n)}var Fu=0,Mt=function(e,t,n,r,i){if(!(this instanceof Mt))return new Mt(e,t,n,r,i);n==null&&(n=0),yn.call(this,[new xn([new Ir("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var a=re(n,0);this.sel=hr(a),this.history=new Qn(null),this.id=++Fu,this.modeOption=t,this.lineSep=r,this.direction=i=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Ki(this,{from:a,to:a,text:e}),bt(this,hr(a),Xe)};Mt.prototype=ht(yn.prototype,{constructor:Mt,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ci(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:gt(function(e){var t=re(this.first,0),n=this.first+this.size-1;Gr(this,{from:t,to:re(n,we(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&sn(this.cm,0,0),bt(this,hr(t),Xe)}),replaceRange:function(e,t,n,r){t=Me(this,t),n=n?Me(this,n):t,Kr(this,e,t,n,r)},getRange:function(e,t,n){var r=yr(this,Me(this,e),Me(this,t));return n===!1?r:n===""?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(en(this,e))return we(this,e)},getLineNumber:function(e){return Ge(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=we(this,e)),Kt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Me(this,e)},getCursor:function(e){var t=this.sel.primary(),n;return e==null||e=="head"?n=t.head:e=="anchor"?n=t.anchor:e=="end"||e=="to"||e===!1?n=t.to():n=t.from(),n},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:gt(function(e,t,n){Do(this,Me(this,typeof e=="number"?re(e,t||0):e),null,n)}),setSelection:gt(function(e,t,n){Do(this,Me(this,e),Me(this,t||e),n)}),extendSelection:gt(function(e,t,n){$n(this,Me(this,e),t&&Me(this,t),n)}),extendSelections:gt(function(e,t){yo(this,sa(this,e),t)}),extendSelectionsBy:gt(function(e,t){var n=Et(this.sel.ranges,e);yo(this,sa(this,n),t)}),setSelections:gt(function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new qe(Me(this,e[i].anchor),Me(this,e[i].head||e[i].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),bt(this,Yt(this.cm,r,t),n)}}),addSelection:gt(function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new qe(Me(this,e),Me(this,t||e))),bt(this,Yt(this.cm,r,r.length-1),n)}),getSelection:function(e){for(var t=this.sel.ranges,n,r=0;r<t.length;r++){var i=yr(this,t[r].from(),t[r].to());n=n?n.concat(i):i}return e===!1?n:n.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=yr(this,n[r].from(),n[r].to());e!==!1&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:gt(function(e,t,n){for(var r=[],i=this.sel,a=0;a<i.ranges.length;a++){var o=i.ranges[a];r[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:n}}for(var u=t&&t!="end"&&du(this,r,t),s=r.length-1;s>=0;s--)Gr(this,r[s]);u?bo(this,u):this.cm&&Wr(this.cm)}),undo:gt(function(){ti(this,"undo")}),redo:gt(function(){ti(this,"redo")}),undoSelection:gt(function(){ti(this,"undo",!0)}),redoSelection:gt(function(){ti(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Qn(this.history),pr(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:jr(this.history.done),undone:jr(this.history.undone)}},setHistory:function(e){var t=this.history=new Qn(this.history);t.done=jr(e.done.slice(0),null,!0),t.undone=jr(e.undone.slice(0),null,!0)},setGutterMarker:gt(function(e,t,n){return mn(this,e,"gutter",function(r){var i=r.gutterMarkers||(r.gutterMarkers={});return i[t]=n,!n&&Br(i)&&(r.gutterMarkers=null),!0})}),clearGutter:gt(function(e){var t=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&mn(t,n,"gutter",function(){return n.gutterMarkers[e]=null,Br(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!en(this,e)||(t=e,e=we(this,e),!e))return null}else if(t=Ge(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:gt(function(e,t,n){return mn(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[i])r[i]=n;else{if(ge(n).test(r[i]))return!1;r[i]+=" "+n}return!0})}),removeLineClass:gt(function(e,t,n){return mn(this,e,t=="gutter"?"gutter":"class",function(r){var i=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",a=r[i];if(a)if(n==null)r[i]=null;else{var o=a.match(ge(n));if(!o)return!1;var u=o.index+o[0].length;r[i]=a.slice(0,o.index)+(!o.index||u==a.length?"":" ")+a.slice(u)||null}else return!1;return!0})}),addLineWidget:gt(function(e,t,n){return Cu(this,e,t,n)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Xr(this,Me(this,e),Me(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Me(this,e),Xr(this,e,e,n,"bookmark")},findMarksAt:function(e){e=Me(this,e);var t=[],n=we(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(i.from==null||i.from<=e.ch)&&(i.to==null||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=Me(this,e),t=Me(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var u=0;u<o.length;u++){var s=o[u];!(s.to!=null&&i==e.line&&e.ch>=s.to||s.from==null&&i!=e.line||s.from!=null&&i==t.line&&s.from>=t.ch)&&(!n||n(s.marker))&&r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)n[r].from!=null&&e.push(n[r].marker)}),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter(function(i){var a=i.text.length+r;if(a>e)return t=e,!0;e-=a,++n}),Me(this,re(n,t))},indexFromPos:function(e){e=Me(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+n}),t},copy:function(e){var t=new Mt(ci(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<n&&(n=e.to);var r=new Mt(ci(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],wu(r,Io(this)),r},unlinkDoc:function(e){if(e instanceof $e&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Su(Io(this));break}}if(e.history==this.history){var r=[e.id];pr(e,function(i){return r.push(i.id)},!0),e.history=new Qn(null),e.history.done=jr(this.history.done,r),e.history.undone=jr(this.history.undone,r)}},iterLinkedDocs:function(e){pr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):jt(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:gt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&pu(this.cm))})}),Mt.prototype.eachLine=Mt.prototype.iter;var Ho=0;function Au(e){var t=this;if(_o(t),!(C(t,e)||ir(t.display,e))){be(e),E&&(Ho=+new Date);var n=kr(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,a=Array(i),o=0,u=function(){++o==i&&pt(t,function(){n=Me(t.doc,n);var A={from:n,to:n,text:t.doc.splitLines(a.filter(function(z){return z!=null}).join(t.doc.lineSeparator())),origin:"paste"};Gr(t.doc,A),bo(t.doc,hr(Me(t.doc,n),Me(t.doc,dr(A))))})()},s=function(A,z){if(t.options.allowDropFileTypes&&Ue(t.options.allowDropFileTypes,A.type)==-1){u();return}var G=new FileReader;G.onerror=function(){return u()},G.onload=function(){var ae=G.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ae)){u();return}a[z]=ae,u()},G.readAsText(A)},f=0;f<r.length;f++)s(r[f],f);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var v=e.dataTransfer.getData("Text");if(v){var y;if(t.state.draggingText&&!t.state.draggingText.copy&&(y=t.listSelections()),Vn(t.doc,hr(n,n)),y)for(var T=0;T<y.length;++T)Kr(t.doc,"",y[T].anchor,y[T].head,"drag");t.replaceSelection(v,"around","paste"),t.display.input.focus()}}catch(A){}}}}function Eu(e,t){if(E&&(!e.state.draggingText||+new Date-Ho<100)){Re(t);return}if(!(C(e,t)||ir(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!oe)){var n=J("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",P&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),P&&n.parentNode.removeChild(n)}}function Lu(e,t){var n=kr(e,t);if(n){var r=document.createDocumentFragment();Ni(e,n,r),e.display.dragCursor||(e.display.dragCursor=J("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Ae(e.display.dragCursor,r)}}function _o(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ro(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var a=0;a<n.length;a++)e(n[a])})}}var zo=!1;function Tu(){zo||(Bu(),zo=!0)}function Bu(){var e;m(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Ro(Mu)},100))}),m(window,"blur",function(){return Ro(Pr)})}function Mu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var vr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Cn=0;Cn<10;Cn++)vr[Cn+48]=vr[Cn+96]=String(Cn);for(var ri=65;ri<=90;ri++)vr[ri]=String.fromCharCode(ri);for(var kn=1;kn<=12;kn++)vr[kn+111]=vr[kn+63235]="F"+kn;var or={};or.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},or.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},or.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},or.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},or.default=U?or.macDefault:or.pcDefault;function Nu(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var n,r,i,a,o=0;o<t.length-1;o++){var u=t[o];if(/^(cmd|meta|m)$/i.test(u))a=!0;else if(/^a(lt)?$/i.test(u))n=!0;else if(/^(c|ctrl|control)$/i.test(u))r=!0;else if(/^s(hift)?$/i.test(u))i=!0;else throw new Error("Unrecognized modifier name: "+u)}return n&&(e="Alt-"+e),r&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Ou(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if(r=="..."){delete e[n];continue}for(var i=Et(n.split(" "),Nu),a=0;a<i.length;a++){var o=void 0,u=void 0;a==i.length-1?(u=i.join(" "),o=r):(u=i.slice(0,a+1).join(" "),o="...");var s=t[u];if(!s)t[u]=o;else if(s!=o)throw new Error("Inconsistent bindings for "+u)}delete e[n]}for(var f in t)e[f]=t[f];return e}function Yr(e,t,n,r){t=ni(t);var i=t.call?t.call(e,r):t[e];if(i===!1)return"nothing";if(i==="...")return"multi";if(i!=null&&n(i))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Yr(e,t.fallthrough,n,r);for(var a=0;a<t.fallthrough.length;a++){var o=Yr(e,t.fallthrough[a],n,r);if(o)return o}}}function Po(e){var t=typeof e=="string"?e:vr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Wo(e,t,n){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(ue?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(ue?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!n&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function Uo(e,t){if(P&&e.keyCode==34&&e.char)return!1;var n=vr[e.keyCode];return n==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(n=e.code),Wo(n,e,t))}function ni(e){return typeof e=="string"?or[e]:e}function Zr(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var a=t(n[i]);r.length&&Be(a.from,se(r).to)<=0;){var o=r.pop();if(Be(o.from,a.from)<0){a.from=o.from;break}}r.push(a)}Ht(e,function(){for(var u=r.length-1;u>=0;u--)Kr(e.doc,"",r[u].from,r[u].to,"+delete");Wr(e)})}function Qi(e,t,n){var r=L(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ji(e,t,n){var r=Qi(e,t.ch,n);return r==null?null:new re(t.line,r,n<0?"after":"before")}function $i(e,t,n,r,i){if(e){t.doc.direction=="rtl"&&(i=-i);var a=d(n,t.doc.direction);if(a){var o=i<0?se(a):a[0],u=i<0==(o.level==1),s=u?"after":"before",f;if(o.level>0||t.doc.direction=="rtl"){var v=_r(t,n);f=i<0?n.text.length-1:0;var y=Vt(t,v,f).top;f=c(function(T){return Vt(t,v,T).top==y},i<0==(o.level==1)?o.from:o.to-1,f),s=="before"&&(f=Qi(n,f,1))}else f=i<0?o.to:o.from;return new re(r,f,s)}}return new re(r,i<0?n.text.length:0,i<0?"before":"after")}function Iu(e,t,n,r){var i=d(t,e.doc.direction);if(!i)return Ji(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=b(i,n.ch,n.sticky),o=i[a];if(e.doc.direction=="ltr"&&o.level%2==0&&(r>0?o.to>n.ch:o.from<n.ch))return Ji(t,n,r);var u=function(fe,de){return Qi(t,fe instanceof re?fe.ch:fe,de)},s,f=function(fe){return e.options.lineWrapping?(s=s||_r(e,t),Ka(e,t,s,fe)):{begin:0,end:t.text.length}},v=f(n.sticky=="before"?u(n,-1):n.ch);if(e.doc.direction=="rtl"||o.level==1){var y=o.level==1==r<0,T=u(n,y?1:-1);if(T!=null&&(y?T<=o.to&&T<=v.end:T>=o.from&&T>=v.begin)){var A=y?"before":"after";return new re(n.line,T,A)}}var z=function(fe,de,ce){for(var ve=function(Ye,vt){return vt?new re(n.line,u(Ye,1),"before"):new re(n.line,Ye,"after")};fe>=0&&fe<i.length;fe+=de){var Fe=i[fe],Se=de>0==(Fe.level!=1),Oe=Se?ce.begin:u(ce.end,-1);if(Fe.from<=Oe&&Oe<Fe.to||(Oe=Se?Fe.from:u(Fe.to,-1),ce.begin<=Oe&&Oe<ce.end))return ve(Oe,Se)}},G=z(a+r,r,v);if(G)return G;var ae=r>0?v.end:u(v.begin,-1);return ae!=null&&!(r>0&&ae==t.text.length)&&(G=z(r>0?0:i.length-1,r,f(ae)),G)?G:null}var wn={selectAll:Fo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Xe)},killLine:function(e){return Zr(e,function(t){if(t.empty()){var n=we(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:re(t.head.line+1,0)}:{from:t.head,to:re(t.head.line,n)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Zr(e,function(t){return{from:re(t.from().line,0),to:Me(e.doc,re(t.to().line+1,0))}})},delLineLeft:function(e){return Zr(e,function(t){return{from:re(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Zr(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return Zr(e,function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(re(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(re(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return jo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return qo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Hu(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")},_e)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")},_e)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?qo(e,t.head):r},_e)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var a=n[i].from(),o=ee(e.getLine(a.line),a.ch,r);t.push(qt(r-o%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ht(e,function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,a=we(e.doc,i.line).text;if(a){if(i.ch==a.length&&(i=new re(i.line,i.ch-1)),i.ch>0)i=new re(i.line,i.ch+1),e.replaceRange(a.charAt(i.ch-1)+a.charAt(i.ch-2),re(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var o=we(e.doc,i.line-1).text;o&&(i=new re(i.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),re(i.line-1,o.length-1),i,"+transpose"))}}n.push(new qe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Ht(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Wr(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function jo(e,t){var n=we(e.doc,t),r=Kt(n);return r!=n&&(t=Ge(r)),$i(!0,e,r,t,1)}function Hu(e,t){var n=we(e.doc,t),r=yl(n);return r!=n&&(t=Ge(r)),$i(!0,e,n,t,-1)}function qo(e,t){var n=jo(e,t.line),r=we(e.doc,n.line),i=d(r,e.doc.direction);if(!i||i[0].level==0){var a=Math.max(n.ch,r.text.search(/\S/)),o=t.line==n.line&&t.ch<=a&&t.ch;return re(n.line,o?0:a,n.sticky)}return n}function ii(e,t,n){if(typeof t=="string"&&(t=wn[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=nt}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function _u(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Yr(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Yr(t,e.options.extraKeys,n,e)||Yr(t,e.options.keyMap,n,e)}var Ru=new Le;function Sn(e,t,n,r){var i=e.state.keySeq;if(i){if(Po(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Ru.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),Go(e,i+" "+t,n,r))return!0}return Go(e,t,n,r)}function Go(e,t,n,r){var i=_u(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&dt(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(be(n),Oi(e)),!!i}function Ko(e,t){var n=Uo(t,!0);return n?t.shiftKey&&!e.state.keySeq?Sn(e,"Shift-"+n,t,function(r){return ii(e,r,!0)})||Sn(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return ii(e,r)}):Sn(e,n,t,function(r){return ii(e,r)}):!1}function zu(e,t,n){return Sn(e,"'"+n+"'",t,function(r){return ii(e,r,!0)})}var Vi=null;function Xo(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=$(rt(t)),!C(t,e))){E&&F<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=Ko(t,e);P&&(Vi=r?n:null,!r&&n==88&&!Ln&&(U?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),W&&!U&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Pu(t)}}function Pu(e){var t=e.display.lineDiv;ke(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(Te(t,"CodeMirror-crosshair"),N(document,"keyup",n),N(document,"mouseover",n))}m(document,"keyup",n),m(document,"mouseover",n)}function Yo(e){e.keyCode==16&&(this.doc.sel.shift=!1),C(this,e)}function Zo(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(ir(t.display,e)||C(t,e)||e.ctrlKey&&!e.altKey||U&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(P&&n==Vi){Vi=null,be(e);return}if(!(P&&(!e.which||e.which<10)&&Ko(t,e))){var i=String.fromCharCode(r==null?n:r);i!="\b"&&(zu(t,e,i)||t.display.input.onKeyPress(e))}}}var Wu=400,ea=function(e,t,n){this.time=e,this.pos=t,this.button=n};ea.prototype.compare=function(e,t,n){return this.time+Wu>e&&Be(t,this.pos)==0&&n==this.button};var Fn,An;function Uu(e,t){var n=+new Date;return An&&An.compare(n,e,t)?(Fn=An=null,"triple"):Fn&&Fn.compare(n,e,t)?(An=new ea(n,e,t),Fn=null,"double"):(Fn=new ea(n,e,t),An=null,"single")}function Qo(e){var t=this,n=t.display;if(!(C(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,ir(n,e)){M||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!ta(t,e)){var r=kr(t,e),i=Ne(e),a=r?Uu(r,i):"single";k(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&ju(t,i,r,a,e))&&(i==1?r?Gu(t,r,a,e):Pe(e)==n.scroller&&be(e):i==2?(r&&$n(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(ne?t.display.input.onContextMenu(e):Ii(t)))}}}function ju(e,t,n,r,i){var a="Click";return r=="double"?a="Double"+a:r=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,Sn(e,Wo(a,i),i,function(o){if(typeof o=="string"&&(o=wn[o]),!o)return!1;var u=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),u=o(e,n)!=nt}finally{e.state.suppressEdits=!1}return u})}function qu(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var a=q?n.shiftKey&&n.metaKey:n.altKey;i.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=U?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(U?n.altKey:n.ctrlKey)),i}function Gu(e,t,n,r){E?setTimeout(h(Qa,e),0):e.curOp.focus=$(rt(e));var i=qu(e,n,r),a=e.doc.sel,o;e.options.dragDrop&&We&&!e.isReadOnly()&&n=="single"&&(o=a.contains(t))>-1&&(Be((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(Be(o.to(),t)>0||t.xRel<0)?Ku(e,r,t,i):Xu(e,r,t,i)}function Ku(e,t,n,r){var i=e.display,a=!1,o=pt(e,function(f){M&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Ii(e)),N(i.wrapper.ownerDocument,"mouseup",o),N(i.wrapper.ownerDocument,"mousemove",u),N(i.scroller,"dragstart",s),N(i.scroller,"drop",o),a||(be(f),r.addNew||$n(e.doc,n,null,null,r.extend),M&&!oe||E&&F==9?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),u=function(f){a=a||Math.abs(t.clientX-f.clientX)+Math.abs(t.clientY-f.clientY)>=10},s=function(){return a=!0};M&&(i.scroller.draggable=!0),e.state.draggingText=o,o.copy=!r.moveOnDrag,m(i.wrapper.ownerDocument,"mouseup",o),m(i.wrapper.ownerDocument,"mousemove",u),m(i.scroller,"dragstart",s),m(i.scroller,"drop",o),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}function Jo(e,t,n){if(n=="char")return new qe(t,t);if(n=="word")return e.findWordAt(t);if(n=="line")return new qe(re(t.line,0),Me(e.doc,re(t.line+1,0)));var r=n(e,t);return new qe(r.from,r.to)}function Xu(e,t,n,r){E&&Ii(e);var i=e.display,a=e.doc;be(t);var o,u,s=a.sel,f=s.ranges;if(r.addNew&&!r.extend?(u=a.sel.contains(n),u>-1?o=f[u]:o=new qe(n,n)):(o=a.sel.primary(),u=a.sel.primIndex),r.unit=="rectangle")r.addNew||(o=new qe(n,n)),n=kr(e,t,!0,!0),u=-1;else{var v=Jo(e,n,r.unit);r.extend?o=Yi(o,v.anchor,v.head,r.extend):o=v}r.addNew?u==-1?(u=f.length,bt(a,Yt(e,f.concat([o]),u),{scroll:!1,origin:"*mouse"})):f.length>1&&f[u].empty()&&r.unit=="char"&&!r.extend?(bt(a,Yt(e,f.slice(0,u).concat(f.slice(u+1)),0),{scroll:!1,origin:"*mouse"}),s=a.sel):Zi(a,u,o,ft):(u=0,bt(a,new Wt([o],0),ft),s=a.sel);var y=n;function T(ce){if(Be(y,ce)!=0)if(y=ce,r.unit=="rectangle"){for(var ve=[],Fe=e.options.tabSize,Se=ee(we(a,n.line).text,n.ch,Fe),Oe=ee(we(a,ce.line).text,ce.ch,Fe),Ye=Math.min(Se,Oe),vt=Math.max(Se,Oe),et=Math.min(n.line,ce.line),_t=Math.min(e.lastLine(),Math.max(n.line,ce.line));et<=_t;et++){var Nt=we(a,et).text,ot=je(Nt,Ye,Fe);Ye==vt?ve.push(new qe(re(et,ot),re(et,ot))):Nt.length>ot&&ve.push(new qe(re(et,ot),re(et,je(Nt,vt,Fe))))}ve.length||ve.push(new qe(n,n)),bt(a,Yt(e,s.ranges.slice(0,u).concat(ve),u),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ce)}else{var Ot=o,Dt=Jo(e,ce,r.unit),ct=Ot.anchor,lt;Be(Dt.anchor,ct)>0?(lt=Dt.head,ct=Mn(Ot.from(),Dt.anchor)):(lt=Dt.anchor,ct=Bn(Ot.to(),Dt.head));var tt=s.ranges.slice(0);tt[u]=Yu(e,new qe(Me(a,ct),lt)),bt(a,Yt(e,tt,u),ft)}}var A=i.wrapper.getBoundingClientRect(),z=0;function G(ce){var ve=++z,Fe=kr(e,ce,!0,r.unit=="rectangle");if(Fe)if(Be(Fe,y)!=0){e.curOp.focus=$(rt(e)),T(Fe);var Se=Kn(i,a);(Fe.line>=Se.to||Fe.line<Se.from)&&setTimeout(pt(e,function(){z==ve&&G(ce)}),150)}else{var Oe=ce.clientY<A.top?-20:ce.clientY>A.bottom?20:0;Oe&&setTimeout(pt(e,function(){z==ve&&(i.scroller.scrollTop+=Oe,G(ce))}),50)}}function ae(ce){e.state.selectingText=!1,z=1/0,ce&&(be(ce),i.input.focus()),N(i.wrapper.ownerDocument,"mousemove",fe),N(i.wrapper.ownerDocument,"mouseup",de),a.history.lastSelOrigin=null}var fe=pt(e,function(ce){ce.buttons===0||!Ne(ce)?ae(ce):G(ce)}),de=pt(e,ae);e.state.selectingText=de,m(i.wrapper.ownerDocument,"mousemove",fe),m(i.wrapper.ownerDocument,"mouseup",de)}function Yu(e,t){var n=t.anchor,r=t.head,i=we(e.doc,n.line);if(Be(n,r)==0&&n.sticky==r.sticky)return t;var a=d(i);if(!a)return t;var o=b(a,n.ch,n.sticky),u=a[o];if(u.from!=n.ch&&u.to!=n.ch)return t;var s=o+(u.from==n.ch==(u.level!=1)?0:1);if(s==0||s==a.length)return t;var f;if(r.line!=n.line)f=(r.line-n.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var v=b(a,r.ch,r.sticky),y=v-o||(r.ch-n.ch)*(u.level==1?-1:1);v==s-1||v==s?f=y<0:f=y>0}var T=a[s+(f?-1:0)],A=f==(T.level==1),z=A?T.from:T.to,G=A?"after":"before";return n.ch==z&&n.sticky==G?t:new qe(new re(n.line,z,G),r)}function $o(e,t,n,r){var i,a;if(t.touches)i=t.touches[0].clientX,a=t.touches[0].clientY;else try{i=t.clientX,a=t.clientY}catch(T){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var o=e.display,u=o.lineDiv.getBoundingClientRect();if(a>u.bottom||!ie(e,n))return me(t);a-=u.top-o.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var f=o.gutters.childNodes[s];if(f&&f.getBoundingClientRect().right>=i){var v=Dr(e.doc,a),y=e.display.gutterSpecs[s];return D(e,n,e,v,y.className,t),me(t)}}}function ta(e,t){return $o(e,t,"gutterClick",!0)}function Vo(e,t){ir(e.display,t)||Zu(e,t)||C(e,t,"contextmenu")||ne||e.display.input.onContextMenu(t)}function Zu(e,t){return ie(e,"gutterContextMenu")?$o(e,t,"gutterContextMenu",!1):!1}function el(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ln(e)}var Qr={toString:function(){return"CodeMirror.Init"}},tl={},ai={};function Qu(e){var t=e.optionHandlers;function n(r,i,a,o){e.defaults[r]=i,a&&(t[r]=o?function(u,s,f){f!=Qr&&a(u,s,f)}:a)}e.defineOption=n,e.Init=Qr,n("value","",function(r,i){return r.setValue(i)},!0),n("mode",null,function(r,i){r.doc.modeOption=i,Gi(r)},!0),n("indentUnit",2,Gi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(r){gn(r),ln(r),Bt(r)},!0),n("lineSeparator",null,function(r,i){if(r.doc.lineSep=i,!!i){var a=[],o=r.doc.first;r.doc.iter(function(s){for(var f=0;;){var v=s.text.indexOf(i,f);if(v==-1)break;f=v+i.length,a.push(re(o,v))}o++});for(var u=a.length-1;u>=0;u--)Kr(r.doc,i,a[u],re(a[u].line,a[u].ch+i.length))}}),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,i,a){r.state.specialChars=new RegExp(i.source+(i.test(" ")?"":"| "),"g"),a!=Qr&&r.refresh()}),n("specialCharPlaceholder",Sl,function(r){return r.refresh()},!0),n("electricChars",!0),n("inputStyle",H?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(r,i){return r.getInputField().spellcheck=i},!0),n("autocorrect",!1,function(r,i){return r.getInputField().autocorrect=i},!0),n("autocapitalize",!1,function(r,i){return r.getInputField().autocapitalize=i},!0),n("rtlMoveVisually",!te),n("wholeLineUpdateBefore",!0),n("theme","default",function(r){el(r),pn(r)},!0),n("keyMap","default",function(r,i,a){var o=ni(i),u=a!=Qr&&ni(a);u&&u.detach&&u.detach(r,o),o.attach&&o.attach(r,u||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,$u,!0),n("gutters",[],function(r,i){r.display.gutterSpecs=ji(i,r.options.lineNumbers),pn(r)},!0),n("fixedGutter",!0,function(r,i){r.display.gutters.style.left=i?Bi(r.display)+"px":"0",r.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(r){return Ur(r)},!0),n("scrollbarStyle","native",function(r){ro(r),Ur(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),n("lineNumbers",!1,function(r,i){r.display.gutterSpecs=ji(r.options.gutters,i),pn(r)},!0),n("firstLineNumber",1,pn,!0),n("lineNumberFormatter",function(r){return r},pn,!0),n("showCursorWhenSelecting",!1,un,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(r,i){i=="nocursor"&&(Pr(r),r.display.input.blur()),r.display.input.readOnlyChanged(i)}),n("screenReaderLabel",null,function(r,i){i=i===""?null:i,r.display.input.screenReaderLabelChanged(i)}),n("disableInput",!1,function(r,i){i||r.display.input.reset()},!0),n("dragDrop",!0,Ju),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,un,!0),n("singleCursorHeightPerLine",!0,un,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,gn,!0),n("addModeClass",!1,gn,!0),n("pollInterval",100),n("undoDepth",200,function(r,i){return r.doc.history.undoDepth=i}),n("historyEventDelay",1250),n("viewportMargin",10,function(r){return r.refresh()},!0),n("maxHighlightLength",1e4,gn,!0),n("moveInputWithCursor",!0,function(r,i){i||r.display.input.resetPosition()}),n("tabindex",null,function(r,i){return r.display.input.getField().tabIndex=i||""}),n("autofocus",null),n("direction","ltr",function(r,i){return r.doc.setDirection(i)},!0),n("phrases",null)}function Ju(e,t,n){var r=n&&n!=Qr;if(!t!=!r){var i=e.display.dragFunctions,a=t?m:N;a(e.display.scroller,"dragstart",i.start),a(e.display.scroller,"dragenter",i.enter),a(e.display.scroller,"dragover",i.over),a(e.display.scroller,"dragleave",i.leave),a(e.display.scroller,"drop",i.drop)}}function $u(e){e.options.lineWrapping?(ke(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Te(e.display.wrapper,"CodeMirror-wrap"),bi(e)),Mi(e),Bt(e),ln(e),setTimeout(function(){return Ur(e)},100)}function $e(e,t){var n=this;if(!(this instanceof $e))return new $e(e,t);this.options=t=t?j(t):{},j(tl,t,!1);var r=t.value;typeof r=="string"?r=new Mt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new $e.inputStyles[t.inputStyle](this),a=this.display=new cu(e,r,i,t);a.wrapper.CodeMirror=this,el(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ro(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Le,keySeq:null,specialChars:null},t.autofocus&&!H&&a.input.focus(),E&&F<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Vu(this),Tu(),Ar(this),this.curOp.forceUpdate=!0,ho(this,r),t.autofocus&&!H||this.hasFocus()?setTimeout(function(){n.hasFocus()&&!n.state.focused&&Hi(n)},20):Pr(this);for(var o in ai)ai.hasOwnProperty(o)&&ai[o](this,t[o],Qr);ao(this),t.finishInit&&t.finishInit(this);for(var u=0;u<ra.length;++u)ra[u](this);Er(this),M&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}$e.defaults=tl,$e.optionHandlers=ai;function Vu(e){var t=e.display;m(t.scroller,"mousedown",pt(e,Qo)),E&&F<11?m(t.scroller,"dblclick",pt(e,function(s){if(!C(e,s)){var f=kr(e,s);if(!(!f||ta(e,s)||ir(e.display,s))){be(s);var v=e.findWordAt(f);$n(e.doc,v.anchor,v.head)}}})):m(t.scroller,"dblclick",function(s){return C(e,s)||be(s)}),m(t.scroller,"contextmenu",function(s){return Vo(e,s)}),m(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||Vo(e,s)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function a(s){if(s.touches.length!=1)return!1;var f=s.touches[0];return f.radiusX<=1&&f.radiusY<=1}function o(s,f){if(f.left==null)return!0;var v=f.left-s.left,y=f.top-s.top;return v*v+y*y>20*20}m(t.scroller,"touchstart",function(s){if(!C(e,s)&&!a(s)&&!ta(e,s)){t.input.ensurePolled(),clearTimeout(n);var f=+new Date;t.activeTouch={start:f,moved:!1,prev:f-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),m(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),m(t.scroller,"touchend",function(s){var f=t.activeTouch;if(f&&!ir(t,s)&&f.left!=null&&!f.moved&&new Date-f.start<300){var v=e.coordsChar(t.activeTouch,"page"),y;!f.prev||o(f,f.prev)?y=new qe(v,v):!f.prev.prev||o(f,f.prev.prev)?y=e.findWordAt(v):y=new qe(re(v.line,0),Me(e.doc,re(v.line+1,0))),e.setSelection(y.anchor,y.head),e.focus(),be(s)}i()}),m(t.scroller,"touchcancel",i),m(t.scroller,"scroll",function(){t.scroller.clientHeight&&(fn(e,t.scroller.scrollTop),Sr(e,t.scroller.scrollLeft,!0),D(e,"scroll",e))}),m(t.scroller,"mousewheel",function(s){return uo(e,s)}),m(t.scroller,"DOMMouseScroll",function(s){return uo(e,s)}),m(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){C(e,s)||Re(s)},over:function(s){C(e,s)||(Lu(e,s),Re(s))},start:function(s){return Eu(e,s)},drop:pt(e,Au),leave:function(s){C(e,s)||_o(e)}};var u=t.input.getField();m(u,"keyup",function(s){return Yo.call(e,s)}),m(u,"keydown",pt(e,Xo)),m(u,"keypress",pt(e,Zo)),m(u,"focus",function(s){return Hi(e,s)}),m(u,"blur",function(s){return Pr(e,s)})}var ra=[];$e.defineInitHook=function(e){return ra.push(e)};function En(e,t,n,r){var i=e.doc,a;n==null&&(n="add"),n=="smart"&&(i.mode.indent?a=tn(e,t).state:n="prev");var o=e.options.tabSize,u=we(i,t),s=ee(u.text,null,o);u.stateAfter&&(u.stateAfter=null);var f=u.text.match(/^\s*/)[0],v;if(!r&&!/\S/.test(u.text))v=0,n="not";else if(n=="smart"&&(v=i.mode.indent(a,u.text.slice(f.length),u.text),v==nt||v>150)){if(!r)return;n="prev"}n=="prev"?t>i.first?v=ee(we(i,t-1).text,null,o):v=0:n=="add"?v=s+e.options.indentUnit:n=="subtract"?v=s-e.options.indentUnit:typeof n=="number"&&(v=s+n),v=Math.max(0,v);var y="",T=0;if(e.options.indentWithTabs)for(var A=Math.floor(v/o);A;--A)T+=o,y+=" ";if(T<v&&(y+=qt(v-T)),y!=f)return Kr(i,y,re(t,0),re(t,f.length),"+input"),u.stateAfter=null,!0;for(var z=0;z<i.sel.ranges.length;z++){var G=i.sel.ranges[z];if(G.head.line==t&&G.head.ch<f.length){var ae=re(t,f.length);Zi(i,z,new qe(ae,ae));break}}}var Zt=null;function oi(e){Zt=e}function na(e,t,n,r,i){var a=e.doc;e.display.shift=!1,r||(r=a.sel);var o=+new Date-200,u=i=="paste"||e.state.pasteIncoming>o,s=jt(t),f=null;if(u&&r.ranges.length>1)if(Zt&&Zt.text.join(`
`)==t){if(r.ranges.length%Zt.text.length==0){f=[];for(var v=0;v<Zt.text.length;v++)f.push(a.splitLines(Zt.text[v]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(f=Et(s,function(fe){return[fe]}));for(var y=e.curOp.updateInput,T=r.ranges.length-1;T>=0;T--){var A=r.ranges[T],z=A.from(),G=A.to();A.empty()&&(n&&n>0?z=re(z.line,z.ch-n):e.state.overwrite&&!u?G=re(G.line,Math.min(we(a,G.line).text.length,G.ch+se(s).length)):u&&Zt&&Zt.lineWise&&Zt.text.join(`
`)==s.join(`
`)&&(z=G=re(z.line,0)));var ae={from:z,to:G,text:f?f[T%f.length]:s,origin:i||(u?"paste":e.state.cutIncoming>o?"cut":"+input")};Gr(e.doc,ae),dt(e,"inputRead",e,ae)}t&&!u&&nl(e,t),Wr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=y),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function rl(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Ht(t,function(){return na(t,n,0,null,"paste")}),!0}function nl(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var a=e.getModeAt(i.head),o=!1;if(a.electricChars){for(var u=0;u<a.electricChars.length;u++)if(t.indexOf(a.electricChars.charAt(u))>-1){o=En(e,i.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(we(e.doc,i.head.line).text.slice(0,i.head.ch))&&(o=En(e,i.head.line,"smart"));o&&dt(e,"electricInput",e,i.head.line)}}}function il(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,a={anchor:re(i,0),head:re(i+1,0)};n.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:n}}function ia(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function al(){var e=J("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=J("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return M?e.style.width="1000px":e.setAttribute("wrap","off"),xe&&(e.style.border="1px solid black"),t}function es(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){k(this).focus(),this.display.input.focus()},setOption:function(r,i){var a=this.options,o=a[r];a[r]==i&&r!="mode"||(a[r]=i,t.hasOwnProperty(r)&&pt(this,t[r])(this,i,o),D(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,i){this.state.keyMaps[i?"push":"unshift"](ni(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,a=0;a<i.length;++a)if(i[a]==r||i[a].name==r)return i.splice(a,1),!0},addOverlay:St(function(r,i){var a=r.token?r:e.getMode(this.options,r);if(a.startState)throw new Error("Overlays may not be stateful.");Lt(this.state.overlays,{mode:a,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(o){return o.priority}),this.state.modeGen++,Bt(this)}),removeOverlay:St(function(r){for(var i=this.state.overlays,a=0;a<i.length;++a){var o=i[a].modeSpec;if(o==r||typeof r=="string"&&o.name==r){i.splice(a,1),this.state.modeGen++,Bt(this);return}}}),indentLine:St(function(r,i,a){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),en(this.doc,r)&&En(this,r,i,a)}),indentSelection:St(function(r){for(var i=this.doc.sel.ranges,a=-1,o=0;o<i.length;o++){var u=i[o];if(u.empty())u.head.line>a&&(En(this,u.head.line,r,!0),a=u.head.line,o==this.doc.sel.primIndex&&Wr(this));else{var s=u.from(),f=u.to(),v=Math.max(a,s.line);a=Math.min(this.lastLine(),f.line-(f.ch?0:1))+1;for(var y=v;y<a;++y)En(this,y,r);var T=this.doc.sel.ranges;s.ch==0&&i.length==T.length&&T[o].from().ch>0&&Zi(this.doc,o,new qe(s,T[o].to()),Xe)}}}),getTokenAt:function(r,i){return pa(this,r,i)},getLineTokens:function(r,i){return pa(this,re(r),i,!0)},getTokenTypeAt:function(r){r=Me(this.doc,r);var i=ca(this,we(this.doc,r.line)),a=0,o=(i.length-1)/2,u=r.ch,s;if(u==0)s=i[2];else for(;;){var f=a+o>>1;if((f?i[f*2-1]:0)>=u)o=f;else if(i[f*2+1]<u)a=f+1;else{s=i[f*2+2];break}}var v=s?s.indexOf("overlay "):-1;return v<0?s:v==0?null:s.slice(0,v-1)},getModeAt:function(r){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(r).state).mode:i},getHelper:function(r,i){return this.getHelpers(r,i)[0]},getHelpers:function(r,i){var a=[];if(!n.hasOwnProperty(i))return a;var o=n[i],u=this.getModeAt(r);if(typeof u[i]=="string")o[u[i]]&&a.push(o[u[i]]);else if(u[i])for(var s=0;s<u[i].length;s++){var f=o[u[i][s]];f&&a.push(f)}else u.helperType&&o[u.helperType]?a.push(o[u.helperType]):o[u.name]&&a.push(o[u.name]);for(var v=0;v<o._global.length;v++){var y=o._global[v];y.pred(u,this)&&Ue(a,y.val)==-1&&a.push(y.val)}return a},getStateAfter:function(r,i){var a=this.doc;return r=ua(a,r==null?a.first+a.size-1:r),tn(this,r+1,i).state},cursorCoords:function(r,i){var a,o=this.doc.sel.primary();return r==null?a=o.head:typeof r=="object"?a=Me(this.doc,r):a=r?o.from():o.to(),Xt(this,a,i||"page")},charCoords:function(r,i){return Un(this,Me(this.doc,r),i||"page")},coordsChar:function(r,i){return r=ja(this,r,i||"page"),Ei(this,r.left,r.top)},lineAtHeight:function(r,i){return r=ja(this,{top:r,left:0},i||"page").top,Dr(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,i,a){var o=!1,u;if(typeof r=="number"){var s=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>s&&(r=s,o=!0),u=we(this.doc,r)}else u=r;return Wn(this,u,{top:0,left:0},i||"page",a||o).top+(o?this.doc.height-nr(u):0)},defaultTextHeight:function(){return Rr(this.display)},defaultCharWidth:function(){return zr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,i,a,o,u){var s=this.display;r=Xt(this,Me(this.doc,r));var f=r.bottom,v=r.left;if(i.style.position="absolute",i.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(i),s.sizer.appendChild(i),o=="over")f=r.top;else if(o=="above"||o=="near"){var y=Math.max(s.wrapper.clientHeight,this.doc.height),T=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(o=="above"||r.bottom+i.offsetHeight>y)&&r.top>i.offsetHeight?f=r.top-i.offsetHeight:r.bottom+i.offsetHeight<=y&&(f=r.bottom),v+i.offsetWidth>T&&(v=T-i.offsetWidth)}i.style.top=f+"px",i.style.left=i.style.right="",u=="right"?(v=s.sizer.clientWidth-i.offsetWidth,i.style.right="0px"):(u=="left"?v=0:u=="middle"&&(v=(s.sizer.clientWidth-i.offsetWidth)/2),i.style.left=v+"px"),a&&Jl(this,{left:v,top:f,right:v+i.offsetWidth,bottom:f+i.offsetHeight})},triggerOnKeyDown:St(Xo),triggerOnKeyPress:St(Zo),triggerOnKeyUp:Yo,triggerOnMouseDown:St(Qo),execCommand:function(r){if(wn.hasOwnProperty(r))return wn[r].call(null,this)},triggerElectric:St(function(r){nl(this,r)}),findPosH:function(r,i,a,o){var u=1;i<0&&(u=-1,i=-i);for(var s=Me(this.doc,r),f=0;f<i&&(s=aa(this.doc,s,u,a,o),!s.hitSide);++f);return s},moveH:St(function(r,i){var a=this;this.extendSelectionsBy(function(o){return a.display.shift||a.doc.extend||o.empty()?aa(a.doc,o.head,r,i,a.options.rtlMoveVisually):r<0?o.from():o.to()},_e)}),deleteH:St(function(r,i){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Zr(this,function(u){var s=aa(o,u.head,r,i,!1);return r<0?{from:s,to:u.head}:{from:u.head,to:s}})}),findPosV:function(r,i,a,o){var u=1,s=o;i<0&&(u=-1,i=-i);for(var f=Me(this.doc,r),v=0;v<i;++v){var y=Xt(this,f,"div");if(s==null?s=y.left:y.left=s,f=ol(this,y,u,a),f.hitSide)break}return f},moveV:St(function(r,i){var a=this,o=this.doc,u=[],s=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(v){if(s)return r<0?v.from():v.to();var y=Xt(a,v.head,"div");v.goalColumn!=null&&(y.left=v.goalColumn),u.push(y.left);var T=ol(a,y,r,i);return i=="page"&&v==o.sel.primary()&&Ri(a,Un(a,T,"div").top-y.top),T},_e),u.length)for(var f=0;f<o.sel.ranges.length;f++)o.sel.ranges[f].goalColumn=u[f]}),findWordAt:function(r){var i=this.doc,a=we(i,r.line).text,o=r.ch,u=r.ch;if(a){var s=this.getHelper(r,"wordChars");(r.sticky=="before"||u==a.length)&&o?--o:++u;for(var f=a.charAt(o),v=kt(f,s)?function(y){return kt(y,s)}:/\s/.test(f)?function(y){return/\s/.test(y)}:function(y){return!/\s/.test(y)&&!kt(y)};o>0&&v(a.charAt(o-1));)--o;for(;u<a.length&&v(a.charAt(u));)++u}return new qe(re(r.line,o),re(r.line,u))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ke(this.display.cursorDiv,"CodeMirror-overwrite"):Te(this.display.cursorDiv,"CodeMirror-overwrite"),D(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==$(rt(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:St(function(r,i){sn(this,r,i)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-$t(this)-this.display.barHeight,width:r.scrollWidth-$t(this)-this.display.barWidth,clientHeight:wi(this),clientWidth:br(this)}},scrollIntoView:St(function(r,i){r==null?(r={from:this.doc.sel.primary().head,to:null},i==null&&(i=this.options.cursorScrollMargin)):typeof r=="number"?r={from:re(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=i||0,r.from.line!=null?$l(this,r):$a(this,r.from,r.to,r.margin)}),setSize:St(function(r,i){var a=this,o=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};r!=null&&(this.display.wrapper.style.width=o(r)),i!=null&&(this.display.wrapper.style.height=o(i)),this.options.lineWrapping&&Pa(this);var u=this.display.viewFrom;this.doc.iter(u,this.display.viewTo,function(s){if(s.widgets){for(var f=0;f<s.widgets.length;f++)if(s.widgets[f].noHScroll){fr(a,u,"widget");break}}++u}),this.curOp.forceUpdate=!0,D(this,"refresh",this)}),operation:function(r){return Ht(this,r)},startOperation:function(){return Ar(this)},endOperation:function(){return Er(this)},refresh:St(function(){var r=this.display.cachedTextHeight;Bt(this),this.curOp.forceUpdate=!0,ln(this),sn(this,this.doc.scrollLeft,this.doc.scrollTop),Wi(this.display),(r==null||Math.abs(r-Rr(this.display))>.5||this.options.lineWrapping)&&Mi(this),D(this,"refresh",this)}),swapDoc:St(function(r){var i=this.doc;return i.cm=null,this.state.selectingText&&this.state.selectingText(),ho(this,r),ln(this),this.display.input.reset(),sn(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,dt(this,"swapDoc",this,i),i}),phrase:function(r){var i=this.options.phrases;return i&&Object.prototype.hasOwnProperty.call(i,r)?i[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},he(e),e.registerHelper=function(r,i,a){n.hasOwnProperty(r)||(n[r]=e[r]={_global:[]}),n[r][i]=a},e.registerGlobalHelper=function(r,i,a,o){e.registerHelper(r,i,o),n[r]._global.push({pred:a,val:o})}}function aa(e,t,n,r,i){var a=t,o=n,u=we(e,t.line),s=i&&e.direction=="rtl"?-n:n;function f(){var de=t.line+s;return de<e.first||de>=e.first+e.size?!1:(t=new re(de,t.ch,t.sticky),u=we(e,de))}function v(de){var ce;if(r=="codepoint"){var ve=u.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(ve))ce=null;else{var Fe=n>0?ve>=55296&&ve<56320:ve>=56320&&ve<57343;ce=new re(t.line,Math.max(0,Math.min(u.text.length,t.ch+n*(Fe?2:1))),-n)}}else i?ce=Iu(e.cm,u,t,n):ce=Ji(u,t,n);if(ce==null)if(!de&&f())t=$i(i,e.cm,u,t.line,s);else return!1;else t=ce;return!0}if(r=="char"||r=="codepoint")v();else if(r=="column")v(!0);else if(r=="word"||r=="group")for(var y=null,T=r=="group",A=e.cm&&e.cm.getHelper(t,"wordChars"),z=!0;!(n<0&&!v(!z));z=!1){var G=u.text.charAt(t.ch)||`
`,ae=kt(G,A)?"w":T&&G==`
`?"n":!T||/\s/.test(G)?null:"p";if(T&&!z&&!ae&&(ae="s"),y&&y!=ae){n<0&&(n=1,v(),t.sticky="after");break}if(ae&&(y=ae),n>0&&!v(!z))break}var fe=ei(e,t,a,o,!0);return di(a,fe)&&(fe.hitSide=!0),fe}function ol(e,t,n,r){var i=e.doc,a=t.left,o;if(r=="page"){var u=Math.min(e.display.wrapper.clientHeight,k(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(u-.5*Rr(e.display),3);o=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(o=n>0?t.bottom+3:t.top-3);for(var f;f=Ei(e,a,o),!!f.outside;){if(n<0?o<=0:o>=i.height){f.hitSide=!0;break}o+=n*5}return f}var Ke=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Le,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ke.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,ia(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function a(u){for(var s=u.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}m(i,"paste",function(u){!a(u)||C(r,u)||rl(u,r)||F<=11&&setTimeout(pt(r,function(){return t.updateFromDOM()}),20)}),m(i,"compositionstart",function(u){t.composing={data:u.data,done:!1}}),m(i,"compositionupdate",function(u){t.composing||(t.composing={data:u.data,done:!1})}),m(i,"compositionend",function(u){t.composing&&(u.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),m(i,"touchstart",function(){return n.forceCompositionEnd()}),m(i,"input",function(){t.composing||t.readFromDOMSoon()});function o(u){if(!(!a(u)||C(r,u))){if(r.somethingSelected())oi({lineWise:!1,text:r.getSelections()}),u.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=il(r);oi({lineWise:!0,text:s.text}),u.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Xe),r.replaceSelection("",null,"cut")})}else return;if(u.clipboardData){u.clipboardData.clearData();var f=Zt.text.join(`
`);if(u.clipboardData.setData("Text",f),u.clipboardData.getData("Text")==f){u.preventDefault();return}}var v=al(),y=v.firstChild;ia(y),r.display.lineSpace.insertBefore(v,r.display.lineSpace.firstChild),y.value=Zt.text.join(`
`);var T=$(i.ownerDocument);at(y),setTimeout(function(){r.display.lineSpace.removeChild(v),T.focus(),T==i&&n.showPrimarySelection()},50)}}m(i,"copy",o),m(i,"cut",o)},Ke.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ke.prototype.prepareSelection=function(){var e=Za(this.cm,!1);return e.focus=$(this.div.ownerDocument)==this.div,e},Ke.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ke.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ke.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var a=li(t,e.anchorNode,e.anchorOffset),o=li(t,e.focusNode,e.focusOffset);if(!(a&&!a.bad&&o&&!o.bad&&Be(Mn(a,o),r)==0&&Be(Bn(a,o),i)==0)){var u=t.display.view,s=r.line>=t.display.viewFrom&&ll(t,r)||{node:u[0].measure.map[2],offset:0},f=i.line<t.display.viewTo&&ll(t,i);if(!f){var v=u[u.length-1].measure,y=v.maps?v.maps[v.maps.length-1]:v.map;f={node:y[y.length-1],offset:y[y.length-2]-y[y.length-3]}}if(!s||!f){e.removeAllRanges();return}var T=e.rangeCount&&e.getRangeAt(0),A;try{A=_(s.node,s.offset,f.offset,f.node)}catch(z){}A&&(!W&&t.state.focused?(e.collapse(s.node,s.offset),A.collapsed||(e.removeAllRanges(),e.addRange(A))):(e.removeAllRanges(),e.addRange(A)),T&&e.anchorNode==null?e.addRange(T):W&&this.startGracePeriod()),this.rememberSelection()}},Ke.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Ke.prototype.showMultipleSelections=function(e){Ae(this.cm.display.cursorDiv,e.cursors),Ae(this.cm.display.selectionDiv,e.selection)},Ke.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ke.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return le(this.div,t)},Ke.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||$(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ke.prototype.blur=function(){this.div.blur()},Ke.prototype.getField=function(){return this.div},Ke.prototype.supportsTouch=function(){return!0},Ke.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Ht(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},Ke.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ke.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(Ce&&V&&this.cm.display.gutterSpecs.length&&ts(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=li(t,e.anchorNode,e.anchorOffset),r=li(t,e.focusNode,e.focusOffset);n&&r&&Ht(t,function(){bt(t.doc,hr(n,r),Xe),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},Ke.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=re(r.line-1,we(e.doc,r.line-1).length)),i.ch==we(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=re(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var a,o,u;r.line==t.viewFrom||(a=wr(e,r.line))==0?(o=Ge(t.view[0].line),u=t.view[0].node):(o=Ge(t.view[a].line),u=t.view[a-1].node.nextSibling);var s=wr(e,i.line),f,v;if(s==t.view.length-1?(f=t.viewTo-1,v=t.lineDiv.lastChild):(f=Ge(t.view[s+1].line)-1,v=t.view[s+1].node.previousSibling),!u)return!1;for(var y=e.doc.splitLines(rs(e,u,v,o,f)),T=yr(e.doc,re(o,0),re(f,we(e.doc,f).text.length));y.length>1&&T.length>1;)if(se(y)==se(T))y.pop(),T.pop(),f--;else if(y[0]==T[0])y.shift(),T.shift(),o++;else break;for(var A=0,z=0,G=y[0],ae=T[0],fe=Math.min(G.length,ae.length);A<fe&&G.charCodeAt(A)==ae.charCodeAt(A);)++A;for(var de=se(y),ce=se(T),ve=Math.min(de.length-(y.length==1?A:0),ce.length-(T.length==1?A:0));z<ve&&de.charCodeAt(de.length-z-1)==ce.charCodeAt(ce.length-z-1);)++z;if(y.length==1&&T.length==1&&o==r.line)for(;A&&A>r.ch&&de.charCodeAt(de.length-z-1)==ce.charCodeAt(ce.length-z-1);)A--,z++;y[y.length-1]=de.slice(0,de.length-z).replace(/^\u200b+/,""),y[0]=y[0].slice(A).replace(/\u200b+$/,"");var Fe=re(o,A),Se=re(f,T.length?se(T).length-z:0);if(y.length>1||y[0]||Be(Fe,Se))return Kr(e.doc,y,Fe,Se,"+input"),!0},Ke.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ke.prototype.reset=function(){this.forceCompositionEnd()},Ke.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ke.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},Ke.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&Ht(this.cm,function(){return Bt(e.cm)})},Ke.prototype.setUneditable=function(e){e.contentEditable="false"},Ke.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||pt(this.cm,na)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Ke.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Ke.prototype.onContextMenu=function(){},Ke.prototype.resetPosition=function(){},Ke.prototype.needsContentAttribute=!0;function ll(e,t){var n=Si(e,t.line);if(!n||n.hidden)return null;var r=we(e.doc,t.line),i=Ia(n,r,t.line),a=d(r,e.doc.direction),o="left";if(a){var u=b(a,t.ch);o=u%2?"right":"left"}var s=Ra(i.map,t.ch,o);return s.offset=s.collapse=="right"?s.end:s.start,s}function ts(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Jr(e,t){return t&&(e.bad=!0),e}function rs(e,t,n,r,i){var a="",o=!1,u=e.doc.lineSeparator(),s=!1;function f(A){return function(z){return z.id==A}}function v(){o&&(a+=u,s&&(a+=u),o=s=!1)}function y(A){A&&(v(),a+=A)}function T(A){if(A.nodeType==1){var z=A.getAttribute("cm-text");if(z){y(z);return}var G=A.getAttribute("cm-marker"),ae;if(G){var fe=e.findMarks(re(r,0),re(i+1,0),f(+G));fe.length&&(ae=fe[0].find(0))&&y(yr(e.doc,ae.from,ae.to).join(u));return}if(A.getAttribute("contenteditable")=="false")return;var de=/^(pre|div|p|li|table|br)$/i.test(A.nodeName);if(!/^br$/i.test(A.nodeName)&&A.textContent.length==0)return;de&&v();for(var ce=0;ce<A.childNodes.length;ce++)T(A.childNodes[ce]);/^(pre|p)$/i.test(A.nodeName)&&(s=!0),de&&(o=!0)}else A.nodeType==3&&y(A.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;T(t),t!=n;)t=t.nextSibling,s=!1;return a}function li(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return Jr(e.clipPos(re(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var a=e.display.view[i];if(a.node==r)return ns(a,t,n)}}function ns(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!le(r,t))return Jr(re(Ge(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var a=e.rest?se(e.rest):e.line;return Jr(re(Ge(a),a.text.length),i)}var o=t.nodeType==3?t:null,u=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,n&&(n=o.nodeValue.length));u.parentNode!=r;)u=u.parentNode;var s=e.measure,f=s.maps;function v(ae,fe,de){for(var ce=-1;ce<(f?f.length:0);ce++)for(var ve=ce<0?s.map:f[ce],Fe=0;Fe<ve.length;Fe+=3){var Se=ve[Fe+2];if(Se==ae||Se==fe){var Oe=Ge(ce<0?e.line:e.rest[ce]),Ye=ve[Fe]+de;return(de<0||Se!=ae)&&(Ye=ve[Fe+(de?1:0)]),re(Oe,Ye)}}}var y=v(o,u,n);if(y)return Jr(y,i);for(var T=u.nextSibling,A=o?o.nodeValue.length-n:0;T;T=T.nextSibling){if(y=v(T,T.firstChild,0),y)return Jr(re(y.line,y.ch-A),i);A+=T.textContent.length}for(var z=u.previousSibling,G=n;z;z=z.previousSibling){if(y=v(z,z.firstChild,-1),y)return Jr(re(y.line,y.ch+G),i);G+=z.textContent.length}}var it=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Le,this.hasSelection=!1,this.composing=null,this.resetting=!1};it.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),xe&&(i.style.width="0px"),m(i,"input",function(){E&&F>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),m(i,"paste",function(o){C(r,o)||rl(o,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())});function a(o){if(!C(r,o)){if(r.somethingSelected())oi({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var u=il(r);oi({lineWise:!0,text:u.text}),o.type=="cut"?r.setSelections(u.ranges,null,Xe):(n.prevInput="",i.value=u.text.join(`
`),at(i))}else return;o.type=="cut"&&(r.state.cutIncoming=+new Date)}}m(i,"cut",a),m(i,"copy",a),m(e.scroller,"paste",function(o){if(!(ir(e,o)||C(r,o))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var u=new Event("paste");u.clipboardData=o.clipboardData,i.dispatchEvent(u)}}),m(e.lineSpace,"selectstart",function(o){ir(e,o)||be(o)}),m(i,"compositionstart",function(){var o=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:o,range:r.markText(o,r.getCursor("to"),{className:"CodeMirror-composing"})}}),m(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},it.prototype.createField=function(e){this.wrapper=al(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;ia(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},it.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},it.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Za(e);if(e.options.moveInputWithCursor){var i=Xt(e,n.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+o.left-a.left))}return r},it.prototype.showSelection=function(e){var t=this.cm,n=t.display;Ae(n.cursorDiv,e.cursors),Ae(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},it.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&at(this.textarea),E&&F>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",E&&F>=9&&(this.hasSelection=null));this.resetting=!1}},it.prototype.getField=function(){return this.textarea},it.prototype.supportsTouch=function(){return!1},it.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!H||$(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},it.prototype.blur=function(){this.textarea.blur()},it.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},it.prototype.receivedFocus=function(){this.slowPoll()},it.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},it.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},it.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Mr(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(E&&F>=9&&this.hasSelection===i||U&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=i.charCodeAt(0);if(a==8203&&!r&&(r="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,u=Math.min(r.length,i.length);o<u&&r.charCodeAt(o)==i.charCodeAt(o);)++o;return Ht(t,function(){na(t,i.slice(o),r.length-o,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},it.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},it.prototype.onKeyPress=function(){E&&F>=9&&(this.hasSelection=null),this.fastPoll()},it.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=kr(n,e),o=r.scroller.scrollTop;if(!a||P)return;var u=n.options.resetSelectionOnContextMenu;u&&n.doc.sel.contains(a)==-1&&pt(n,bt)(n.doc,hr(a),Xe);var s=i.style.cssText,f=t.wrapper.style.cssText,v=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-v.top-5)+"px; left: "+(e.clientX-v.left-5)+`px;
z-index: 1000; background: `+(E?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var y;M&&(y=i.ownerDocument.defaultView.scrollY),r.input.focus(),M&&i.ownerDocument.defaultView.scrollTo(null,y),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=A,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function T(){if(i.selectionStart!=null){var G=n.somethingSelected(),ae="\u200B"+(G?i.value:"");i.value="\u21DA",i.value=ae,t.prevInput=G?"":"\u200B",i.selectionStart=1,i.selectionEnd=ae.length,r.selForContextMenu=n.doc.sel}}function A(){if(t.contextMenuPending==A&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=s,E&&F<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=o),i.selectionStart!=null)){(!E||E&&F<9)&&T();var G=0,ae=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput=="\u200B"?pt(n,Fo)(n):G++<10?r.detectingSelectAll=setTimeout(ae,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(ae,200)}}if(E&&F>=9&&T(),ne){Re(e);var z=function(){N(window,"mouseup",z),setTimeout(A,20)};m(window,"mouseup",z)}else setTimeout(A,50)},it.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},it.prototype.setUneditable=function(){},it.prototype.needsContentAttribute=!1;function is(e,t){if(t=t?j(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=$(e.ownerDocument);t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=u.getValue()}var i;if(e.form&&(m(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;i=a.submit;try{var o=a.submit=function(){r(),a.submit=i,a.submit(),a.submit=o}}catch(s){}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(N(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var u=$e(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return u}function as(e){e.off=N,e.on=m,e.wheelEventPixels=hu,e.Doc=Mt,e.splitLines=jt,e.countColumn=ee,e.findColumn=je,e.isWordChar=ze,e.Pass=nt,e.signal=D,e.Line=Ir,e.changeEnd=dr,e.scrollbarModel=to,e.Pos=re,e.cmpPos=Be,e.modes=xr,e.mimeModes=ur,e.resolveMode=Gt,e.getMode=zt,e.modeExtensions=wt,e.extendMode=tr,e.copyState=Pt,e.startState=Tn,e.innerMode=Or,e.commands=wn,e.keyMap=or,e.keyName=Uo,e.isModifierKey=Po,e.lookupKey=Yr,e.normalizeKeyMap=Ou,e.StringStream=Ve,e.SharedTextMarker=bn,e.TextMarker=gr,e.LineWidget=Dn,e.e_preventDefault=be,e.e_stopPropagation=De,e.e_stop=Re,e.addClass=ke,e.contains=le,e.rmClass=Te,e.keyNames=vr}Qu($e),es($e);var os="iter insert remove copy getEditor constructor".split(" ");for(var ui in Mt.prototype)Mt.prototype.hasOwnProperty(ui)&&Ue(os,ui)<0&&($e.prototype[ui]=function(e){return function(){return e.apply(this.doc,arguments)}}(Mt.prototype[ui]));return he(Mt),$e.inputStyles={textarea:it,contenteditable:Ke},$e.defineMode=function(e){!$e.defaults.mode&&e!="null"&&($e.defaults.mode=e),fi.apply(this,arguments)},$e.defineMIME=yt,$e.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),$e.defineMIME("text/plain","null"),$e.defineExtension=function(e,t){$e.prototype[e]=t},$e.defineDocExtension=function(e,t){Mt.prototype[e]=t},$e.fromTextArea=is,as($e),$e.version="5.65.15",$e})},"./node_modules/codemirror/mode/gfm/gfm.js":function(ut,Ie,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"),ye("./node_modules/codemirror/mode/markdown/markdown.js"),ye("./node_modules/codemirror/addon/mode/overlay.js"))})(function(W){"use strict";var Q=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;W.defineMode("gfm",function(B,R){var E=0;function F(K){return K.code=!1,null}var M={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(K){return{code:K.code,codeBlock:K.codeBlock,ateSpace:K.ateSpace}},token:function(K,P){if(P.combineTokens=null,P.codeBlock)return K.match(/^```+/)?(P.codeBlock=!1,null):(K.skipToEnd(),null);if(K.sol()&&(P.code=!1),K.sol()&&K.match(/^```+/))return K.skipToEnd(),P.codeBlock=!0,null;if(K.peek()==="`"){K.next();var oe=K.pos;K.eatWhile("`");var pe=1+K.pos-oe;return P.code?pe===E&&(P.code=!1):(E=pe,P.code=!0),null}else if(P.code)return K.next(),null;if(K.eatSpace())return P.ateSpace=!0,null;if((K.sol()||P.ateSpace)&&(P.ateSpace=!1,R.gitHubSpice!==!1)){if(K.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return P.combineTokens=!0,"link";if(K.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return P.combineTokens=!0,"link"}return K.match(Q)&&K.string.slice(K.start-2,K.start)!="]("&&(K.start==0||/\W/.test(K.string.charAt(K.start-1)))?(P.combineTokens=!0,"link"):(K.next(),null)},blankLine:F},Y={taskLists:!0,strikethrough:!0,emoji:!0};for(var V in R)Y[V]=R[V];return Y.name="markdown",W.overlayMode(W.getMode(B,Y),M)},"markdown"),W.defineMIME("text/x-gfm","gfm")})},"./node_modules/codemirror/mode/markdown/markdown.js":function(ut,Ie,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"),ye("./node_modules/codemirror/mode/xml/xml.js"),ye("./node_modules/codemirror/mode/meta.js"))})(function(W){"use strict";W.defineMode("markdown",function(Q,B){var R=W.getMode(Q,"text/html"),E=R.name=="null";function F(k){if(W.findModeByName){var h=W.findModeByName(k);h&&(k=h.mime||h.mimes[0])}var j=W.getMode(Q,k);return j.name=="null"?null:j}B.highlightFormatting===void 0&&(B.highlightFormatting=!1),B.maxBlockquoteDepth===void 0&&(B.maxBlockquoteDepth=0),B.taskLists===void 0&&(B.taskLists=!1),B.strikethrough===void 0&&(B.strikethrough=!1),B.emoji===void 0&&(B.emoji=!1),B.fencedCodeBlockHighlighting===void 0&&(B.fencedCodeBlockHighlighting=!0),B.fencedCodeBlockDefaultMode===void 0&&(B.fencedCodeBlockDefaultMode="text/plain"),B.xml===void 0&&(B.xml=!0),B.tokenTypeOverrides===void 0&&(B.tokenTypeOverrides={});var M={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var Y in M)M.hasOwnProperty(Y)&&B.tokenTypeOverrides[Y]&&(M[Y]=B.tokenTypeOverrides[Y]);var V=/^([*\-_])(?:\s*\1){2,}\s*$/,K=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,P=/^\[(x| )\](?=\s)/i,oe=B.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,pe=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ee=/^[^#!\[\]*_\\<>` "'(~:]+/,xe=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Ce=/^\s*\[[^\]]+?\]:.*$/,H=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,U=" ";function q(k,h,j){return h.f=h.inline=j,j(k,h)}function te(k,h,j){return h.f=h.block=j,j(k,h)}function X(k){return!k||!/\S/.test(k.string)}function ue(k){if(k.linkTitle=!1,k.linkHref=!1,k.linkText=!1,k.em=!1,k.strong=!1,k.strikethrough=!1,k.quote=0,k.indentedCode=!1,k.f==ge){var h=E;if(!h){var j=W.innerMode(R,k.htmlState);h=j.mode.name=="xml"&&j.state.tagStart===null&&!j.state.context&&j.state.tokenize.isInText}h&&(k.f=J,k.block=ne,k.htmlState=null)}return k.trailingSpace=0,k.trailingSpaceNewLine=!1,k.prevLine=k.thisLine,k.thisLine={stream:null},null}function ne(k,h){var j=k.column()===h.indentation,ee=X(h.prevLine.stream),Le=h.indentedCode,Ue=h.prevLine.hr,st=h.list!==!1,nt=(h.listStack[h.listStack.length-1]||0)+3;h.indentedCode=!1;var Xe=h.indentation;if(h.indentationDiff===null&&(h.indentationDiff=h.indentation,st)){for(h.list=null;Xe<h.listStack[h.listStack.length-1];)h.listStack.pop(),h.listStack.length?h.indentation=h.listStack[h.listStack.length-1]:h.list=!1;h.list!==!1&&(h.indentationDiff=Xe-h.listStack[h.listStack.length-1])}var ft=!ee&&!Ue&&!h.prevLine.header&&(!st||!Le)&&!h.prevLine.fencedCodeEnd,_e=(h.list===!1||Ue||ee)&&h.indentation<=nt&&k.match(V),je=null;if(h.indentationDiff>=4&&(Le||h.prevLine.fencedCodeEnd||h.prevLine.header||ee))return k.skipToEnd(),h.indentedCode=!0,M.code;if(k.eatSpace())return null;if(j&&h.indentation<=nt&&(je=k.match(oe))&&je[1].length<=6)return h.quote=0,h.header=je[1].length,h.thisLine.header=!0,B.highlightFormatting&&(h.formatting="header"),h.f=h.inline,Z(h);if(h.indentation<=nt&&k.eat(">"))return h.quote=j?1:h.quote+1,B.highlightFormatting&&(h.formatting="quote"),k.eatSpace(),Z(h);if(!_e&&!h.setext&&j&&h.indentation<=nt&&(je=k.match(K))){var At=je[1]?"ol":"ul";return h.indentation=Xe+k.current().length,h.list=!0,h.quote=0,h.listStack.push(h.indentation),h.em=!1,h.strong=!1,h.code=!1,h.strikethrough=!1,B.taskLists&&k.match(P,!1)&&(h.taskList=!0),h.f=h.inline,B.highlightFormatting&&(h.formatting=["list","list-"+At]),Z(h)}else{if(j&&h.indentation<=nt&&(je=k.match(xe,!0)))return h.quote=0,h.fencedEndRE=new RegExp(je[1]+"+ *$"),h.localMode=B.fencedCodeBlockHighlighting&&F(je[2]||B.fencedCodeBlockDefaultMode),h.localMode&&(h.localState=W.startState(h.localMode)),h.f=h.block=Te,B.highlightFormatting&&(h.formatting="code-block"),h.code=-1,Z(h);if(h.setext||(!ft||!st)&&!h.quote&&h.list===!1&&!h.code&&!_e&&!Ce.test(k.string)&&(je=k.lookAhead(1))&&(je=je.match(pe)))return h.setext?(h.header=h.setext,h.setext=0,k.skipToEnd(),B.highlightFormatting&&(h.formatting="header")):(h.header=je[0].charAt(0)=="="?1:2,h.setext=h.header),h.thisLine.header=!0,h.f=h.inline,Z(h);if(_e)return k.skipToEnd(),h.hr=!0,h.thisLine.hr=!0,M.hr;if(k.peek()==="[")return q(k,h,ke)}return q(k,h,h.inline)}function ge(k,h){var j=R.token(k,h.htmlState);if(!E){var ee=W.innerMode(R,h.htmlState);(ee.mode.name=="xml"&&ee.state.tagStart===null&&!ee.state.context&&ee.state.tokenize.isInText||h.md_inside&&k.current().indexOf(">")>-1)&&(h.f=J,h.block=ne,h.htmlState=null)}return j}function Te(k,h){var j=h.listStack[h.listStack.length-1]||0,ee=h.indentation<j,Le=j+3;if(h.fencedEndRE&&h.indentation<=Le&&(ee||k.match(h.fencedEndRE))){B.highlightFormatting&&(h.formatting="code-block");var Ue;return ee||(Ue=Z(h)),h.localMode=h.localState=null,h.block=ne,h.f=J,h.fencedEndRE=null,h.code=0,h.thisLine.fencedCodeEnd=!0,ee?te(k,h,h.block):Ue}else return h.localMode?h.localMode.token(k,h.localState):(k.skipToEnd(),M.code)}function Z(k){var h=[];if(k.formatting){h.push(M.formatting),typeof k.formatting=="string"&&(k.formatting=[k.formatting]);for(var j=0;j<k.formatting.length;j++)h.push(M.formatting+"-"+k.formatting[j]),k.formatting[j]==="header"&&h.push(M.formatting+"-"+k.formatting[j]+"-"+k.header),k.formatting[j]==="quote"&&(!B.maxBlockquoteDepth||B.maxBlockquoteDepth>=k.quote?h.push(M.formatting+"-"+k.formatting[j]+"-"+k.quote):h.push("error"))}if(k.taskOpen)return h.push("meta"),h.length?h.join(" "):null;if(k.taskClosed)return h.push("property"),h.length?h.join(" "):null;if(k.linkHref?h.push(M.linkHref,"url"):(k.strong&&h.push(M.strong),k.em&&h.push(M.em),k.strikethrough&&h.push(M.strikethrough),k.emoji&&h.push(M.emoji),k.linkText&&h.push(M.linkText),k.code&&h.push(M.code),k.image&&h.push(M.image),k.imageAltText&&h.push(M.imageAltText,"link"),k.imageMarker&&h.push(M.imageMarker)),k.header&&h.push(M.header,M.header+"-"+k.header),k.quote&&(h.push(M.quote),!B.maxBlockquoteDepth||B.maxBlockquoteDepth>=k.quote?h.push(M.quote+"-"+k.quote):h.push(M.quote+"-"+B.maxBlockquoteDepth)),k.list!==!1){var ee=(k.listStack.length-1)%3;ee?ee===1?h.push(M.list2):h.push(M.list3):h.push(M.list1)}return k.trailingSpaceNewLine?h.push("trailing-space-new-line"):k.trailingSpace&&h.push("trailing-space-"+(k.trailingSpace%2?"a":"b")),h.length?h.join(" "):null}function Ae(k,h){if(k.match(Ee,!0))return Z(h)}function J(k,h){var j=h.text(k,h);if(typeof j!="undefined")return j;if(h.list)return h.list=null,Z(h);if(h.taskList){var ee=k.match(P,!0)[1]===" ";return ee?h.taskOpen=!0:h.taskClosed=!0,B.highlightFormatting&&(h.formatting="task"),h.taskList=!1,Z(h)}if(h.taskOpen=!1,h.taskClosed=!1,h.header&&k.match(/^#+$/,!0))return B.highlightFormatting&&(h.formatting="header"),Z(h);var Le=k.next();if(h.linkTitle){h.linkTitle=!1;var Ue=Le;Le==="("&&(Ue=")"),Ue=(Ue+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var st="^\\s*(?:[^"+Ue+"\\\\]+|\\\\\\\\|\\\\.)"+Ue;if(k.match(new RegExp(st),!0))return M.linkHref}if(Le==="`"){var nt=h.formatting;B.highlightFormatting&&(h.formatting="code"),k.eatWhile("`");var Xe=k.current().length;if(h.code==0&&(!h.quote||Xe==1))return h.code=Xe,Z(h);if(Xe==h.code){var ft=Z(h);return h.code=0,ft}else return h.formatting=nt,Z(h)}else if(h.code)return Z(h);if(Le==="\\"&&(k.next(),B.highlightFormatting)){var _e=Z(h),je=M.formatting+"-escape";return _e?_e+" "+je:je}if(Le==="!"&&k.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return h.imageMarker=!0,h.image=!0,B.highlightFormatting&&(h.formatting="image"),Z(h);if(Le==="["&&h.imageMarker&&k.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return h.imageMarker=!1,h.imageAltText=!0,B.highlightFormatting&&(h.formatting="image"),Z(h);if(Le==="]"&&h.imageAltText){B.highlightFormatting&&(h.formatting="image");var _e=Z(h);return h.imageAltText=!1,h.image=!1,h.inline=h.f=_,_e}if(Le==="["&&!h.image)return h.linkText&&k.match(/^.*?\]/)||(h.linkText=!0,B.highlightFormatting&&(h.formatting="link")),Z(h);if(Le==="]"&&h.linkText){B.highlightFormatting&&(h.formatting="link");var _e=Z(h);return h.linkText=!1,h.inline=h.f=k.match(/\(.*?\)| ?\[.*?\]/,!1)?_:J,_e}if(Le==="<"&&k.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){h.f=h.inline=He,B.highlightFormatting&&(h.formatting="link");var _e=Z(h);return _e?_e+=" ":_e="",_e+M.linkInline}if(Le==="<"&&k.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){h.f=h.inline=He,B.highlightFormatting&&(h.formatting="link");var _e=Z(h);return _e?_e+=" ":_e="",_e+M.linkEmail}if(B.xml&&Le==="<"&&k.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var At=k.string.indexOf(">",k.pos);if(At!=-1){var qt=k.string.substring(k.start,At);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(qt)&&(h.md_inside=!0)}return k.backUp(1),h.htmlState=W.startState(R),te(k,h,ge)}if(B.xml&&Le==="<"&&k.match(/^\/\w*?>/))return h.md_inside=!1,"tag";if(Le==="*"||Le==="_"){for(var se=1,Et=k.pos==1?" ":k.string.charAt(k.pos-2);se<3&&k.eat(Le);)se++;var Lt=k.peek()||" ",Ut=!/\s/.test(Lt)&&(!H.test(Lt)||/\s/.test(Et)||H.test(Et)),ht=!/\s/.test(Et)&&(!H.test(Et)||/\s/.test(Lt)||H.test(Lt)),Rt=null,ze=null;if(se%2&&(!h.em&&Ut&&(Le==="*"||!ht||H.test(Et))?Rt=!0:h.em==Le&&ht&&(Le==="*"||!Ut||H.test(Lt))&&(Rt=!1)),se>1&&(!h.strong&&Ut&&(Le==="*"||!ht||H.test(Et))?ze=!0:h.strong==Le&&ht&&(Le==="*"||!Ut||H.test(Lt))&&(ze=!1)),ze!=null||Rt!=null){B.highlightFormatting&&(h.formatting=Rt==null?"strong":ze==null?"em":"strong em"),Rt===!0&&(h.em=Le),ze===!0&&(h.strong=Le);var ft=Z(h);return Rt===!1&&(h.em=!1),ze===!1&&(h.strong=!1),ft}}else if(Le===" "&&(k.eat("*")||k.eat("_"))){if(k.peek()===" ")return Z(h);k.backUp(1)}if(B.strikethrough){if(Le==="~"&&k.eatWhile(Le)){if(h.strikethrough){B.highlightFormatting&&(h.formatting="strikethrough");var ft=Z(h);return h.strikethrough=!1,ft}else if(k.match(/^[^\s]/,!1))return h.strikethrough=!0,B.highlightFormatting&&(h.formatting="strikethrough"),Z(h)}else if(Le===" "&&k.match("~~",!0)){if(k.peek()===" ")return Z(h);k.backUp(2)}}if(B.emoji&&Le===":"&&k.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){h.emoji=!0,B.highlightFormatting&&(h.formatting="emoji");var kt=Z(h);return h.emoji=!1,kt}return Le===" "&&(k.match(/^ +$/,!1)?h.trailingSpace++:h.trailingSpace&&(h.trailingSpaceNewLine=!0)),Z(h)}function He(k,h){var j=k.next();if(j===">"){h.f=h.inline=J,B.highlightFormatting&&(h.formatting="link");var ee=Z(h);return ee?ee+=" ":ee="",ee+M.linkInline}return k.match(/^[^>]+/,!0),M.linkInline}function _(k,h){if(k.eatSpace())return null;var j=k.next();return j==="("||j==="["?(h.f=h.inline=$(j==="("?")":"]"),B.highlightFormatting&&(h.formatting="link-string"),h.linkHref=!0,Z(h)):"error"}var le={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function $(k){return function(h,j){var ee=h.next();if(ee===k){j.f=j.inline=J,B.highlightFormatting&&(j.formatting="link-string");var Le=Z(j);return j.linkHref=!1,Le}return h.match(le[k]),j.linkHref=!0,Z(j)}}function ke(k,h){return k.match(/^([^\]\\]|\\.)*\]:/,!1)?(h.f=Qe,k.next(),B.highlightFormatting&&(h.formatting="link"),h.linkText=!0,Z(h)):q(k,h,J)}function Qe(k,h){if(k.match("]:",!0)){h.f=h.inline=at,B.highlightFormatting&&(h.formatting="link");var j=Z(h);return h.linkText=!1,j}return k.match(/^([^\]\\]|\\.)+/,!0),M.linkText}function at(k,h){return k.eatSpace()?null:(k.match(/^[^\s]+/,!0),k.peek()===void 0?h.linkTitle=!0:k.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),h.f=h.inline=J,M.linkHref+" url")}var rt={startState:function(){return{f:ne,prevLine:{stream:null},thisLine:{stream:null},block:ne,htmlState:null,indentation:0,inline:J,text:Ae,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(k){return{f:k.f,prevLine:k.prevLine,thisLine:k.thisLine,block:k.block,htmlState:k.htmlState&&W.copyState(R,k.htmlState),indentation:k.indentation,localMode:k.localMode,localState:k.localMode?W.copyState(k.localMode,k.localState):null,inline:k.inline,text:k.text,formatting:!1,linkText:k.linkText,linkTitle:k.linkTitle,linkHref:k.linkHref,code:k.code,em:k.em,strong:k.strong,strikethrough:k.strikethrough,emoji:k.emoji,header:k.header,setext:k.setext,hr:k.hr,taskList:k.taskList,list:k.list,listStack:k.listStack.slice(0),quote:k.quote,indentedCode:k.indentedCode,trailingSpace:k.trailingSpace,trailingSpaceNewLine:k.trailingSpaceNewLine,md_inside:k.md_inside,fencedEndRE:k.fencedEndRE}},token:function(k,h){if(h.formatting=!1,k!=h.thisLine.stream){if(h.header=0,h.hr=!1,k.match(/^\s*$/,!0))return ue(h),null;if(h.prevLine=h.thisLine,h.thisLine={stream:k},h.taskList=!1,h.trailingSpace=0,h.trailingSpaceNewLine=!1,!h.localState&&(h.f=h.block,h.f!=ge)){var j=k.match(/^\s*/,!0)[0].replace(/\t/g,U).length;if(h.indentation=j,h.indentationDiff=null,j>0)return null}}return h.f(k,h)},innerMode:function(k){return k.block==ge?{state:k.htmlState,mode:R}:k.localState?{state:k.localState,mode:k.localMode}:{state:k,mode:rt}},indent:function(k,h,j){return k.block==ge&&R.indent?R.indent(k.htmlState,h,j):k.localState&&k.localMode.indent?k.localMode.indent(k.localState,h,j):W.Pass},blankLine:ue,getType:Z,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return rt},"xml"),W.defineMIME("text/markdown","markdown"),W.defineMIME("text/x-markdown","markdown")})},"./node_modules/codemirror/mode/meta.js":function(ut,Ie,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Q=0;Q<W.modeInfo.length;Q++){var B=W.modeInfo[Q];B.mimes&&(B.mime=B.mimes[0])}W.findModeByMIME=function(R){R=R.toLowerCase();for(var E=0;E<W.modeInfo.length;E++){var F=W.modeInfo[E];if(F.mime==R)return F;if(F.mimes){for(var M=0;M<F.mimes.length;M++)if(F.mimes[M]==R)return F}}if(/\+xml$/.test(R))return W.findModeByMIME("application/xml");if(/\+json$/.test(R))return W.findModeByMIME("application/json")},W.findModeByExtension=function(R){R=R.toLowerCase();for(var E=0;E<W.modeInfo.length;E++){var F=W.modeInfo[E];if(F.ext){for(var M=0;M<F.ext.length;M++)if(F.ext[M]==R)return F}}},W.findModeByFileName=function(R){for(var E=0;E<W.modeInfo.length;E++){var F=W.modeInfo[E];if(F.file&&F.file.test(R))return F}var M=R.lastIndexOf("."),Y=M>-1&&R.substring(M+1,R.length);if(Y)return W.findModeByExtension(Y)},W.findModeByName=function(R){R=R.toLowerCase();for(var E=0;E<W.modeInfo.length;E++){var F=W.modeInfo[E];if(F.name.toLowerCase()==R)return F;if(F.alias){for(var M=0;M<F.alias.length;M++)if(F.alias[M].toLowerCase()==R)return F}}}})},"./node_modules/codemirror/mode/xml/xml.js":function(ut,Ie,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";var Q={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},B={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};W.defineMode("xml",function(R,E){var F=R.indentUnit,M={},Y=E.htmlMode?Q:B;for(var V in Y)M[V]=Y[V];for(var V in E)M[V]=E[V];var K,P;function oe(_,le){function $(at){return le.tokenize=at,at(_,le)}var ke=_.next();if(ke=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?$(xe("atom","]]>")):null:_.match("--")?$(xe("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),$(Ce(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),le.tokenize=xe("meta","?>"),"meta"):(K=_.eat("/")?"closeTag":"openTag",le.tokenize=pe,"tag bracket");if(ke=="&"){var Qe;return _.eat("#")?_.eat("x")?Qe=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):Qe=_.eatWhile(/[\d]/)&&_.eat(";"):Qe=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),Qe?"atom":"error"}else return _.eatWhile(/[^&<]/),null}oe.isInText=!0;function pe(_,le){var $=_.next();if($==">"||$=="/"&&_.eat(">"))return le.tokenize=oe,K=$==">"?"endTag":"selfcloseTag","tag bracket";if($=="=")return K="equals",null;if($=="<"){le.tokenize=oe,le.state=X,le.tagName=le.tagStart=null;var ke=le.tokenize(_,le);return ke?ke+" tag error":"tag error"}else return/[\'\"]/.test($)?(le.tokenize=Ee($),le.stringStartCol=_.column(),le.tokenize(_,le)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ee(_){var le=function($,ke){for(;!$.eol();)if($.next()==_){ke.tokenize=pe;break}return"string"};return le.isInAttribute=!0,le}function xe(_,le){return function($,ke){for(;!$.eol();){if($.match(le)){ke.tokenize=oe;break}$.next()}return _}}function Ce(_){return function(le,$){for(var ke;(ke=le.next())!=null;){if(ke=="<")return $.tokenize=Ce(_+1),$.tokenize(le,$);if(ke==">")if(_==1){$.tokenize=oe;break}else return $.tokenize=Ce(_-1),$.tokenize(le,$)}return"meta"}}function H(_){return _&&_.toLowerCase()}function U(_,le,$){this.prev=_.context,this.tagName=le||"",this.indent=_.indented,this.startOfLine=$,(M.doNotIndent.hasOwnProperty(le)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function q(_){_.context&&(_.context=_.context.prev)}function te(_,le){for(var $;;){if(!_.context||($=_.context.tagName,!M.contextGrabbers.hasOwnProperty(H($))||!M.contextGrabbers[H($)].hasOwnProperty(H(le))))return;q(_)}}function X(_,le,$){return _=="openTag"?($.tagStart=le.column(),ue):_=="closeTag"?ne:X}function ue(_,le,$){return _=="word"?($.tagName=le.current(),P="tag",Z):M.allowMissingTagName&&_=="endTag"?(P="tag bracket",Z(_,le,$)):(P="error",ue)}function ne(_,le,$){if(_=="word"){var ke=le.current();return $.context&&$.context.tagName!=ke&&M.implicitlyClosed.hasOwnProperty(H($.context.tagName))&&q($),$.context&&$.context.tagName==ke||M.matchClosing===!1?(P="tag",ge):(P="tag error",Te)}else return M.allowMissingTagName&&_=="endTag"?(P="tag bracket",ge(_,le,$)):(P="error",Te)}function ge(_,le,$){return _!="endTag"?(P="error",ge):(q($),X)}function Te(_,le,$){return P="error",ge(_,le,$)}function Z(_,le,$){if(_=="word")return P="attribute",Ae;if(_=="endTag"||_=="selfcloseTag"){var ke=$.tagName,Qe=$.tagStart;return $.tagName=$.tagStart=null,_=="selfcloseTag"||M.autoSelfClosers.hasOwnProperty(H(ke))?te($,ke):(te($,ke),$.context=new U($,ke,Qe==$.indented)),X}return P="error",Z}function Ae(_,le,$){return _=="equals"?J:(M.allowMissing||(P="error"),Z(_,le,$))}function J(_,le,$){return _=="string"?He:_=="word"&&M.allowUnquoted?(P="string",Z):(P="error",Z(_,le,$))}function He(_,le,$){return _=="string"?He:Z(_,le,$)}return{startState:function(_){var le={tokenize:oe,state:X,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(le.baseIndent=_),le},token:function(_,le){if(!le.tagName&&_.sol()&&(le.indented=_.indentation()),_.eatSpace())return null;K=null;var $=le.tokenize(_,le);return($||K)&&$!="comment"&&(P=null,le.state=le.state(K||$,_,le),P&&($=P=="error"?$+" error":P)),$},indent:function(_,le,$){var ke=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+F;if(ke&&ke.noIndent)return W.Pass;if(_.tokenize!=pe&&_.tokenize!=oe)return $?$.match(/^(\s*)/)[0].length:0;if(_.tagName)return M.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+F*(M.multilineTagIndentFactor||1);if(M.alignCDATA&&/<!\[CDATA\[/.test(le))return 0;var Qe=le&&/^<(\/)?([\w_:\.-]*)/.exec(le);if(Qe&&Qe[1])for(;ke;)if(ke.tagName==Qe[2]){ke=ke.prev;break}else if(M.implicitlyClosed.hasOwnProperty(H(ke.tagName)))ke=ke.prev;else break;else if(Qe)for(;ke;){var at=M.contextGrabbers[H(ke.tagName)];if(at&&at.hasOwnProperty(H(Qe[2])))ke=ke.prev;else break}for(;ke&&ke.prev&&!ke.startOfLine;)ke=ke.prev;return ke?ke.indent+F:_.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:M.htmlMode?"html":"xml",helperType:M.htmlMode?"html":"xml",skipAttribute:function(_){_.state==J&&(_.state=Z)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var le=[],$=_.context;$;$=$.prev)le.push($.tagName);return le.reverse()}}}),W.defineMIME("text/xml","xml"),W.defineMIME("application/xml","xml"),W.mimeModes.hasOwnProperty("text/html")||W.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"./node_modules/easymde/src/js/codemirror/tablist.js":function(ut,Ie,ye){var W=ye("./node_modules/codemirror/lib/codemirror.js");W.commands.tabAndIndentMarkdownList=function(Q){var B=Q.listSelections(),R=B[0].head,E=Q.getStateAfter(R.line),F=E.list!==!1;if(F){Q.execCommand("indentMore");return}if(Q.options.indentWithTabs)Q.execCommand("insertTab");else{var M=Array(Q.options.tabSize+1).join(" ");Q.replaceSelection(M)}},W.commands.shiftTabAndUnindentMarkdownList=function(Q){var B=Q.listSelections(),R=B[0].head,E=Q.getStateAfter(R.line),F=E.list!==!1;if(F){Q.execCommand("indentLess");return}if(Q.options.indentWithTabs)Q.execCommand("insertTab");else{var M=Array(Q.options.tabSize+1).join(" ");Q.replaceSelection(M)}}},"./node_modules/easymde/src/js/easymde.js":function(ut,Ie,ye){"use strict";var W=ye("./node_modules/codemirror/lib/codemirror.js");ye("./node_modules/codemirror/addon/edit/continuelist.js"),ye("./node_modules/easymde/src/js/codemirror/tablist.js"),ye("./node_modules/codemirror/addon/display/fullscreen.js"),ye("./node_modules/codemirror/mode/markdown/markdown.js"),ye("./node_modules/codemirror/addon/mode/overlay.js"),ye("./node_modules/codemirror/addon/display/placeholder.js"),ye("./node_modules/codemirror/addon/display/autorefresh.js"),ye("./node_modules/codemirror/addon/selection/mark-selection.js"),ye("./node_modules/codemirror/addon/search/searchcursor.js"),ye("./node_modules/codemirror/mode/gfm/gfm.js"),ye("./node_modules/codemirror/mode/xml/xml.js");var Q=ye("./node_modules/codemirror-spell-checker/src/js/spell-checker.js"),B=ye("./node_modules/marked/lib/marked.cjs").TU,R=/Mac/.test(navigator.platform),E=new RegExp(/(<a.*?https?:\/\/.*?[^a]>)+?/g),F={toggleBold:te,toggleItalic:X,drawLink:rt,toggleHeadingSmaller:Te,toggleHeadingBigger:Z,drawImage:k,toggleBlockquote:ge,toggleOrderedList:Qe,toggleUnorderedList:ke,toggleCodeBlock:ne,togglePreview:ft,toggleStrikethrough:ue,toggleHeading1:Ae,toggleHeading2:J,toggleHeading3:He,toggleHeading4:_,toggleHeading5:le,toggleHeading6:$,cleanBlock:at,drawTable:Le,drawHorizontalRule:Ue,undo:st,redo:nt,toggleSideBySide:Xe,toggleFullScreen:q},M={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",toggleHeading1:"Ctrl+Alt+1",toggleHeading2:"Ctrl+Alt+2",toggleHeading3:"Ctrl+Alt+3",toggleHeading4:"Ctrl+Alt+4",toggleHeading5:"Ctrl+Alt+5",toggleHeading6:"Ctrl+Alt+6",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},Y=function(l){for(var d in F)if(F[d]===l)return d;return null},V=function(){var l=!1;return function(d){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(d)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(d.substr(0,4)))&&(l=!0)}(navigator.userAgent||navigator.vendor||window.opera),l};function K(l){for(var d;(d=E.exec(l))!==null;){var x=d[0];if(x.indexOf("target=")===-1){var m=x.replace(/>$/,' target="_blank">');l=l.replace(x,m)}}return l}function P(l){for(var d=new DOMParser,x=d.parseFromString(l,"text/html"),m=x.getElementsByTagName("li"),w=0;w<m.length;w++)for(var N=m[w],D=0;D<N.children.length;D++){var C=N.children[D];C instanceof HTMLInputElement&&C.type==="checkbox"&&(N.style.marginLeft="-1.5em",N.style.listStyleType="none")}return x.documentElement.innerHTML}function oe(l){return R?l=l.replace("Ctrl","Cmd"):l=l.replace("Cmd","Ctrl"),l}function pe(l,d,x,m){var w=Ee(l,!1,d,x,"button",m);w.classList.add("easymde-dropdown"),w.onclick=function(){w.focus()};var N=document.createElement("div");N.className="easymde-dropdown-content";for(var D=0;D<l.children.length;D++){var C=l.children[D],S;typeof C=="string"&&C in kt?S=Ee(kt[C],!0,d,x,"button",m):S=Ee(C,!0,d,x,"button",m),S.addEventListener("click",function(ie){ie.stopPropagation()},!1),N.appendChild(S)}return w.appendChild(N),w}function Ee(l,d,x,m,w,N){l=l||{};var D=document.createElement(w);if(l.attributes)for(var C in l.attributes)Object.prototype.hasOwnProperty.call(l.attributes,C)&&D.setAttribute(C,l.attributes[C]);var S=N.options.toolbarButtonClassPrefix?N.options.toolbarButtonClassPrefix+"-":"";D.className=S+l.name,D.setAttribute("type",w),x=x==null?!0:x,l.text&&(D.innerText=l.text),l.name&&l.name in m&&(F[l.name]=l.action),l.title&&x&&(D.title=Ce(l.title,l.action,m),R&&(D.title=D.title.replace("Ctrl","\u2318"),D.title=D.title.replace("Alt","\u2325"))),l.title&&D.setAttribute("aria-label",l.title),l.noDisable&&D.classList.add("no-disable"),l.noMobile&&D.classList.add("no-mobile");var ie=[];typeof l.className!="undefined"&&(ie=l.className.split(" "));for(var he=[],be=0;be<ie.length;be++){var De=ie[be];De.match(/^fa([srlb]|(-[\w-]*)|$)/)?he.push(De):D.classList.add(De)}if(D.tabIndex=-1,he.length>0){for(var me=document.createElement("i"),Re=0;Re<he.length;Re++){var Pe=he[Re];me.classList.add(Pe)}D.appendChild(me)}return typeof l.icon!="undefined"&&(D.innerHTML=l.icon),l.action&&d&&(typeof l.action=="function"?D.onclick=function(Ne){Ne.preventDefault(),l.action(N)}:typeof l.action=="string"&&(D.onclick=function(Ne){Ne.preventDefault(),window.open(l.action,"_blank")})),D}function xe(){var l=document.createElement("i");return l.className="separator",l.innerHTML="|",l}function Ce(l,d,x){var m,w=l;return d&&(m=Y(d),x[m]&&(w+=" ("+oe(x[m])+")")),w}function H(l,d){d=d||l.getCursor("start");var x=l.getTokenAt(d);if(!x.type)return{};for(var m=x.type.split(" "),w={},N,D,C=0;C<m.length;C++)N=m[C],N==="strong"?w.bold=!0:N==="variable-2"?(D=l.getLine(d.line),/^\s*\d+\.\s/.test(D)?w["ordered-list"]=!0:w["unordered-list"]=!0):N==="atom"?w.quote=!0:N==="em"?w.italic=!0:N==="quote"?w.quote=!0:N==="strikethrough"?w.strikethrough=!0:N==="comment"?w.code=!0:N==="link"&&!w.image?w.link=!0:N==="image"?w.image=!0:N.match(/^header(-[1-6])?$/)&&(w[N.replace("header","heading")]=!0);return w}var U="";function q(l){var d=l.codemirror;d.setOption("fullScreen",!d.getOption("fullScreen")),d.getOption("fullScreen")?(U=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=U;var x=d.getWrapperElement(),m=x.nextSibling;if(m.classList.contains("editor-preview-active-side"))if(l.options.sideBySideFullscreen===!1){var w=x.parentNode;d.getOption("fullScreen")?w.classList.remove("sided--no-fullscreen"):w.classList.add("sided--no-fullscreen")}else Xe(l);if(l.options.onToggleFullScreen&&l.options.onToggleFullScreen(d.getOption("fullScreen")||!1),typeof l.options.maxHeight!="undefined"&&(d.getOption("fullScreen")?(d.getScrollerElement().style.removeProperty("height"),m.style.removeProperty("height")):(d.getScrollerElement().style.height=l.options.maxHeight,l.setPreviewMaxHeight())),l.toolbar_div.classList.toggle("fullscreen"),l.toolbarElements&&l.toolbarElements.fullscreen){var N=l.toolbarElements.fullscreen;N.classList.toggle("active")}}function te(l){se(l,"bold",l.options.blockStyles.bold)}function X(l){se(l,"italic",l.options.blockStyles.italic)}function ue(l){se(l,"strikethrough","~~")}function ne(l){var d=l.options.blockStyles.code;function x(yt){if(typeof yt!="object")throw"fencing_line() takes a 'line' object (not a line number, or line text). Got: "+typeof yt+": "+yt;return yt.styles&&yt.styles[2]&&yt.styles[2].indexOf("formatting-code-block")!==-1}function m(yt){return yt.state.base.base||yt.state.base}function w(yt,Gt,zt,wt,tr){zt=zt||yt.getLineHandle(Gt),wt=wt||yt.getTokenAt({line:Gt,ch:1}),tr=tr||!!zt.text&&yt.getTokenAt({line:Gt,ch:zt.text.length-1});var Pt=wt.type?wt.type.split(" "):[];return tr&&m(tr).indentedCode?"indented":Pt.indexOf("comment")===-1?!1:m(wt).fencedChars||m(tr).fencedChars||x(zt)?"fenced":"single"}function N(yt,Gt,zt,wt){var tr=Gt.line+1,Pt=zt.line+1,Or=Gt.line!==zt.line,Tn=wt+`
`,Ve=`
`+wt;Or&&Pt++,Or&&zt.ch===0&&(Ve=wt+`
`,Pt--),_e(yt,!1,[Tn,Ve]),yt.setSelection({line:tr,ch:0},{line:Pt,ch:0})}var D=l.codemirror,C=D.getCursor("start"),S=D.getCursor("end"),ie=D.getTokenAt({line:C.line,ch:C.ch||1}),he=D.getLineHandle(C.line),be=w(D,C.line,he,ie),De,me,Re;if(be==="single"){var Pe=he.text.slice(0,C.ch).replace("`",""),Ne=he.text.slice(C.ch).replace("`","");D.replaceRange(Pe+Ne,{line:C.line,ch:0},{line:C.line,ch:99999999999999}),C.ch--,C!==S&&S.ch--,D.setSelection(C,S),D.focus()}else if(be==="fenced")if(C.line!==S.line||C.ch!==S.ch){for(De=C.line;De>=0&&(he=D.getLineHandle(De),!x(he));De--);var We=D.getTokenAt({line:De,ch:1}),Ze=m(We).fencedChars,Je,Tt,xt,jt;x(D.getLineHandle(C.line))?(Je="",Tt=C.line):x(D.getLineHandle(C.line-1))?(Je="",Tt=C.line-1):(Je=Ze+`
`,Tt=C.line),x(D.getLineHandle(S.line))?(xt="",jt=S.line,S.ch===0&&(jt+=1)):S.ch!==0&&x(D.getLineHandle(S.line+1))?(xt="",jt=S.line+1):(xt=Ze+`
`,jt=S.line+1),S.ch===0&&(jt-=1),D.operation(function(){D.replaceRange(xt,{line:jt,ch:0},{line:jt+(xt?0:1),ch:0}),D.replaceRange(Je,{line:Tt,ch:0},{line:Tt+(Je?0:1),ch:0})}),D.setSelection({line:Tt+(Je?1:0),ch:0},{line:jt+(Je?1:-1),ch:0}),D.focus()}else{var Mr=C.line;if(x(D.getLineHandle(C.line))&&(w(D,C.line+1)==="fenced"?(De=C.line,Mr=C.line+1):(me=C.line,Mr=C.line-1)),De===void 0)for(De=Mr;De>=0&&(he=D.getLineHandle(De),!x(he));De--);if(me===void 0)for(Re=D.lineCount(),me=Mr;me<Re&&(he=D.getLineHandle(me),!x(he));me++);D.operation(function(){D.replaceRange("",{line:De,ch:0},{line:De+1,ch:0}),D.replaceRange("",{line:me-1,ch:0},{line:me,ch:0})}),D.focus()}else if(be==="indented"){if(C.line!==S.line||C.ch!==S.ch)De=C.line,me=S.line,S.ch===0&&me--;else{for(De=C.line;De>=0;De--)if(he=D.getLineHandle(De),!he.text.match(/^\s*$/)&&w(D,De,he)!=="indented"){De+=1;break}for(Re=D.lineCount(),me=C.line;me<Re;me++)if(he=D.getLineHandle(me),!he.text.match(/^\s*$/)&&w(D,me,he)!=="indented"){me-=1;break}}var Ln=D.getLineHandle(me+1),Nr=Ln&&D.getTokenAt({line:me+1,ch:Ln.text.length-1}),si=Nr&&m(Nr).indentedCode;si&&D.replaceRange(`
`,{line:me+1,ch:0});for(var xr=De;xr<=me;xr++)D.indentLine(xr,"subtract");D.focus()}else{var ur=C.line===S.line&&C.ch===S.ch&&C.ch===0,fi=C.line!==S.line;ur||fi?N(D,C,S,d):_e(D,!1,["`","`"])}}function ge(l){At(l.codemirror,"quote")}function Te(l){je(l.codemirror,"smaller")}function Z(l){je(l.codemirror,"bigger")}function Ae(l){je(l.codemirror,void 0,1)}function J(l){je(l.codemirror,void 0,2)}function He(l){je(l.codemirror,void 0,3)}function _(l){je(l.codemirror,void 0,4)}function le(l){je(l.codemirror,void 0,5)}function $(l){je(l.codemirror,void 0,6)}function ke(l){var d=l.codemirror,x="*";["-","+","*"].includes(l.options.unorderedListStyle)&&(x=l.options.unorderedListStyle),At(d,"unordered-list",x)}function Qe(l){At(l.codemirror,"ordered-list")}function at(l){Et(l.codemirror)}function rt(l){var d=l.options,x="https://";if(d.promptURLs){var m=prompt(d.promptTexts.link,x);if(!m)return!1;x=h(m)}qt(l,"link",d.insertTexts.link,x)}function k(l){var d=l.options,x="https://";if(d.promptURLs){var m=prompt(d.promptTexts.image,x);if(!m)return!1;x=h(m)}qt(l,"image",d.insertTexts.image,x)}function h(l){return encodeURI(l).replace(/([\\()])/g,"\\$1")}function j(l){l.openBrowseFileWindow()}function ee(l,d){var x=l.codemirror,m=H(x),w=l.options,N=d.substr(d.lastIndexOf("/")+1),D=N.substring(N.lastIndexOf(".")+1).replace(/\?.*$/,"").toLowerCase();if(["png","jpg","jpeg","gif","svg","apng","avif","webp"].includes(D))_e(x,m.image,w.insertTexts.uploadedImage,d);else{var C=w.insertTexts.link;C[0]="["+N,_e(x,m.link,C,d)}l.updateStatusBar("upload-image",l.options.imageTexts.sbOnUploaded.replace("#image_name#",N)),setTimeout(function(){l.updateStatusBar("upload-image",l.options.imageTexts.sbInit)},1e3)}function Le(l){var d=l.codemirror,x=H(d),m=l.options;_e(d,x.table,m.insertTexts.table)}function Ue(l){var d=l.codemirror,x=H(d),m=l.options;_e(d,x.image,m.insertTexts.horizontalRule)}function st(l){var d=l.codemirror;d.undo(),d.focus()}function nt(l){var d=l.codemirror;d.redo(),d.focus()}function Xe(l){var d=l.codemirror,x=d.getWrapperElement(),m=x.nextSibling,w=l.toolbarElements&&l.toolbarElements["side-by-side"],N=!1,D=x.parentNode;m.classList.contains("editor-preview-active-side")?(l.options.sideBySideFullscreen===!1&&D.classList.remove("sided--no-fullscreen"),m.classList.remove("editor-preview-active-side"),w&&w.classList.remove("active"),x.classList.remove("CodeMirror-sided")):(setTimeout(function(){d.getOption("fullScreen")||(l.options.sideBySideFullscreen===!1?D.classList.add("sided--no-fullscreen"):q(l)),m.classList.add("editor-preview-active-side")},1),w&&w.classList.add("active"),x.classList.add("CodeMirror-sided"),N=!0);var C=x.lastChild;if(C.classList.contains("editor-preview-active")){C.classList.remove("editor-preview-active");var S=l.toolbarElements.preview,ie=l.toolbar_div;S.classList.remove("active"),ie.classList.remove("disabled-for-preview")}var he=function(){var De=l.options.previewRender(l.value(),m);De!=null&&(m.innerHTML=De)};if(d.sideBySideRenderingFunction||(d.sideBySideRenderingFunction=he),N){var be=l.options.previewRender(l.value(),m);be!=null&&(m.innerHTML=be),d.on("update",d.sideBySideRenderingFunction)}else d.off("update",d.sideBySideRenderingFunction);d.refresh()}function ft(l){var d=l.codemirror,x=d.getWrapperElement(),m=l.toolbar_div,w=l.options.toolbar?l.toolbarElements.preview:!1,N=x.lastChild,D=d.getWrapperElement().nextSibling;if(D.classList.contains("editor-preview-active-side")&&Xe(l),!N||!N.classList.contains("editor-preview-full")){if(N=document.createElement("div"),N.className="editor-preview-full",l.options.previewClass)if(Array.isArray(l.options.previewClass))for(var C=0;C<l.options.previewClass.length;C++)N.classList.add(l.options.previewClass[C]);else typeof l.options.previewClass=="string"&&N.classList.add(l.options.previewClass);x.appendChild(N)}N.classList.contains("editor-preview-active")?(N.classList.remove("editor-preview-active"),w&&(w.classList.remove("active"),m.classList.remove("disabled-for-preview"))):(setTimeout(function(){N.classList.add("editor-preview-active")},1),w&&(w.classList.add("active"),m.classList.add("disabled-for-preview")));var S=l.options.previewRender(l.value(),N);S!==null&&(N.innerHTML=S)}function _e(l,d,x,m){if(!l.getWrapperElement().lastChild.classList.contains("editor-preview-active")){var w,N=x[0],D=x[1],C={},S={};Object.assign(C,l.getCursor("start")),Object.assign(S,l.getCursor("end")),m&&(N=N.replace("#url#",m),D=D.replace("#url#",m)),d?(w=l.getLine(C.line),N=w.slice(0,C.ch),D=w.slice(C.ch),l.replaceRange(N+D,{line:C.line,ch:0})):(w=l.getSelection(),l.replaceSelection(N+w+D),C.ch+=N.length,C!==S&&(S.ch+=N.length)),l.setSelection(C,S),l.focus()}}function je(l,d,x){if(!l.getWrapperElement().lastChild.classList.contains("editor-preview-active")){for(var m=l.getCursor("start"),w=l.getCursor("end"),N=m.line;N<=w.line;N++)(function(D){var C=l.getLine(D),S=C.search(/[^#]/);d!==void 0?S<=0?d=="bigger"?C="###### "+C:C="# "+C:S==6&&d=="smaller"?C=C.substr(7):S==1&&d=="bigger"?C=C.substr(2):d=="bigger"?C=C.substr(1):C="#"+C:S<=0?C="#".repeat(x)+" "+C:S==x?C=C.substr(S+1):C="#".repeat(x)+" "+C.substr(S+1),l.replaceRange(C,{line:D,ch:0},{line:D,ch:99999999999999})})(N);l.focus()}}function At(l,d,x){if(!l.getWrapperElement().lastChild.classList.contains("editor-preview-active")){for(var m=/^(\s*)(\*|-|\+|\d*\.)(\s+)/,w=/^\s*/,N=H(l),D=l.getCursor("start"),C=l.getCursor("end"),S={quote:/^(\s*)>\s+/,"unordered-list":m,"ordered-list":m},ie=function(Re,Pe){var Ne={quote:">","unordered-list":x,"ordered-list":"%%i."};return Ne[Re].replace("%%i",Pe)},he=function(Re,Pe){var Ne={quote:">","unordered-list":"\\"+x,"ordered-list":"\\d+."},We=new RegExp(Ne[Re]);return Pe&&We.test(Pe)},be=function(Re,Pe,Ne){var We=m.exec(Pe),Ze=ie(Re,De);return We!==null?(he(Re,We[2])&&(Ze=""),Pe=We[1]+Ze+We[3]+Pe.replace(w,"").replace(S[Re],"$1")):Ne==!1&&(Pe=Ze+" "+Pe),Pe},De=1,me=D.line;me<=C.line;me++)(function(Re){var Pe=l.getLine(Re);N[d]?Pe=Pe.replace(S[d],"$1"):(d=="unordered-list"&&(Pe=be("ordered-list",Pe,!0)),Pe=be(d,Pe,!1),De+=1),l.replaceRange(Pe,{line:Re,ch:0},{line:Re,ch:99999999999999})})(me);l.focus()}}function qt(l,d,x,m){if(!(!l.codemirror||l.isPreviewActive())){var w=l.codemirror,N=H(w),D=N[d];if(!D){_e(w,D,x,m);return}var C=w.getCursor("start"),S=w.getCursor("end"),ie=w.getLine(C.line),he=ie.slice(0,C.ch),be=ie.slice(C.ch);d=="link"?he=he.replace(/(.*)[^!]\[/,"$1"):d=="image"&&(he=he.replace(/(.*)!\[$/,"$1")),be=be.replace(/]\(.*?\)/,""),w.replaceRange(he+be,{line:C.line,ch:0},{line:C.line,ch:99999999999999}),C.ch-=x[0].length,C!==S&&(S.ch-=x[0].length),w.setSelection(C,S),w.focus()}}function se(l,d,x,m){if(!(!l.codemirror||l.isPreviewActive())){m=typeof m=="undefined"?x:m;var w=l.codemirror,N=H(w),D,C=x,S=m,ie=w.getCursor("start"),he=w.getCursor("end");N[d]?(D=w.getLine(ie.line),C=D.slice(0,ie.ch),S=D.slice(ie.ch),d=="bold"?(C=C.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),S=S.replace(/(\*\*|__)/,"")):d=="italic"?(C=C.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),S=S.replace(/(\*|_)/,"")):d=="strikethrough"&&(C=C.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),S=S.replace(/(\*\*|~~)/,"")),w.replaceRange(C+S,{line:ie.line,ch:0},{line:ie.line,ch:99999999999999}),d=="bold"||d=="strikethrough"?(ie.ch-=2,ie!==he&&(he.ch-=2)):d=="italic"&&(ie.ch-=1,ie!==he&&(he.ch-=1))):(D=w.getSelection(),d=="bold"?(D=D.split("**").join(""),D=D.split("__").join("")):d=="italic"?(D=D.split("*").join(""),D=D.split("_").join("")):d=="strikethrough"&&(D=D.split("~~").join("")),w.replaceSelection(C+D+S),ie.ch+=x.length,he.ch=ie.ch+D.length),w.setSelection(ie,he),w.focus()}}function Et(l){if(!l.getWrapperElement().lastChild.classList.contains("editor-preview-active"))for(var d=l.getCursor("start"),x=l.getCursor("end"),m,w=d.line;w<=x.line;w++)m=l.getLine(w),m=m.replace(/^[ ]*([# ]+|\*|-|[> ]+|[0-9]+(.|\)))[ ]*/,""),l.replaceRange(m,{line:w,ch:0},{line:w,ch:99999999999999})}function Lt(l,d){if(Math.abs(l)<1024)return""+l+d[0];var x=0;do l/=1024,++x;while(Math.abs(l)>=1024&&x<d.length);return""+l.toFixed(1)+d[x]}function Ut(l,d){for(var x in d)Object.prototype.hasOwnProperty.call(d,x)&&(d[x]instanceof Array?l[x]=d[x].concat(l[x]instanceof Array?l[x]:[]):d[x]!==null&&typeof d[x]=="object"&&d[x].constructor===Object?l[x]=Ut(l[x]||{},d[x]):l[x]=d[x]);return l}function ht(l){for(var d=1;d<arguments.length;d++)l=Ut(l,arguments[d]);return l}function Rt(l){var d=/[a-zA-Z0-9_\u00A0-\u02AF\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g,x=l.match(d),m=0;if(x===null)return m;for(var w=0;w<x.length;w++)x[w].charCodeAt(0)>=19968?m+=x[w].length:m+=1;return m}var ze={bold:"fa fa-bold",italic:"fa fa-italic",strikethrough:"fa fa-strikethrough",heading:"fa fa-header fa-heading","heading-smaller":"fa fa-header fa-heading header-smaller","heading-bigger":"fa fa-header fa-heading header-bigger","heading-1":"fa fa-header fa-heading header-1","heading-2":"fa fa-header fa-heading header-2","heading-3":"fa fa-header fa-heading header-3",code:"fa fa-code",quote:"fa fa-quote-left","ordered-list":"fa fa-list-ol","unordered-list":"fa fa-list-ul","clean-block":"fa fa-eraser",link:"fa fa-link",image:"fa fa-image","upload-image":"fa fa-image",table:"fa fa-table","horizontal-rule":"fa fa-minus",preview:"fa fa-eye","side-by-side":"fa fa-columns",fullscreen:"fa fa-arrows-alt",guide:"fa fa-question-circle",undo:"fa fa-undo",redo:"fa fa-repeat fa-redo"},kt={bold:{name:"bold",action:te,className:ze.bold,title:"Bold",default:!0},italic:{name:"italic",action:X,className:ze.italic,title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:ue,className:ze.strikethrough,title:"Strikethrough"},heading:{name:"heading",action:Te,className:ze.heading,title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:Te,className:ze["heading-smaller"],title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:Z,className:ze["heading-bigger"],title:"Bigger Heading"},"heading-1":{name:"heading-1",action:Ae,className:ze["heading-1"],title:"Big Heading"},"heading-2":{name:"heading-2",action:J,className:ze["heading-2"],title:"Medium Heading"},"heading-3":{name:"heading-3",action:He,className:ze["heading-3"],title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:ne,className:ze.code,title:"Code"},quote:{name:"quote",action:ge,className:ze.quote,title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:ke,className:ze["unordered-list"],title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:Qe,className:ze["ordered-list"],title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:at,className:ze["clean-block"],title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:rt,className:ze.link,title:"Create Link",default:!0},image:{name:"image",action:k,className:ze.image,title:"Insert Image",default:!0},"upload-image":{name:"upload-image",action:j,className:ze["upload-image"],title:"Import an image"},table:{name:"table",action:Le,className:ze.table,title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:Ue,className:ze["horizontal-rule"],title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:ft,className:ze.preview,noDisable:!0,title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:Xe,className:ze["side-by-side"],noDisable:!0,noMobile:!0,title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:q,className:ze.fullscreen,noDisable:!0,noMobile:!0,title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://www.markdownguide.org/basic-syntax/",className:ze.guide,noDisable:!0,title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:st,className:ze.undo,noDisable:!0,title:"Undo"},redo:{name:"redo",action:nt,className:ze.redo,noDisable:!0,title:"Redo"}},Br={link:["[","](#url#)"],image:["![","](#url#)"],uploadedImage:["![](#url#)",""],table:["",`
| Column 1 | Column 2 | Column 3 |
| -------- | -------- | -------- |
| Text | Text | Text |
`],horizontalRule:["",`
-----
`]},O={link:"URL for the link:",image:"URL of the image:"},I={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},L={bold:"**",code:"```",italic:"*"},c={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},p={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:`Image #image_name# is too big (#image_size#).
Maximum file size is #image_max_size#.`,importError:"Something went wrong when uploading the image #image_name#."};function g(l){l=l||{},l.parent=this;var d=!0;if(l.autoDownloadFontAwesome===!1&&(d=!1),l.autoDownloadFontAwesome!==!0)for(var x=document.styleSheets,m=0;m<x.length;m++)x[m].href&&x[m].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(d=!1);if(d){var w=document.createElement("link");w.rel="stylesheet",w.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(w)}if(l.element)this.element=l.element;else if(l.element===null){console.log("EasyMDE: Error. No element was found.");return}if(l.toolbar===void 0){l.toolbar=[];for(var N in kt)Object.prototype.hasOwnProperty.call(kt,N)&&(N.indexOf("separator-")!=-1&&l.toolbar.push("|"),(kt[N].default===!0||l.showIcons&&l.showIcons.constructor===Array&&l.showIcons.indexOf(N)!=-1)&&l.toolbar.push(N))}if(Object.prototype.hasOwnProperty.call(l,"previewClass")||(l.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(l,"status")||(l.status=["autosave","lines","words","cursor"],l.uploadImage&&l.status.unshift("upload-image")),l.previewRender||(l.previewRender=function(C){return this.parent.markdown(C)}),l.parsingConfig=ht({highlightFormatting:!0},l.parsingConfig||{}),l.insertTexts=ht({},Br,l.insertTexts||{}),l.promptTexts=ht({},O,l.promptTexts||{}),l.blockStyles=ht({},L,l.blockStyles||{}),l.autosave!=null&&(l.autosave.timeFormat=ht({},I,l.autosave.timeFormat||{})),l.iconClassMap=ht({},ze,l.iconClassMap||{}),l.shortcuts=ht({},M,l.shortcuts||{}),l.maxHeight=l.maxHeight||void 0,l.direction=l.direction||"ltr",typeof l.maxHeight!="undefined"?l.minHeight=l.maxHeight:l.minHeight=l.minHeight||"300px",l.errorCallback=l.errorCallback||function(C){alert(C)},l.uploadImage=l.uploadImage||!1,l.imageMaxSize=l.imageMaxSize||2097152,l.imageAccept=l.imageAccept||"image/png, image/jpeg, image/gif, image/avif",l.imageTexts=ht({},c,l.imageTexts||{}),l.errorMessages=ht({},p,l.errorMessages||{}),l.imagePathAbsolute=l.imagePathAbsolute||!1,l.imageCSRFName=l.imageCSRFName||"csrfmiddlewaretoken",l.imageCSRFHeader=l.imageCSRFHeader||!1,l.autosave!=null&&l.autosave.unique_id!=null&&l.autosave.unique_id!=""&&(l.autosave.uniqueId=l.autosave.unique_id),l.overlayMode&&l.overlayMode.combine===void 0&&(l.overlayMode.combine=!0),this.options=l,this.render(),l.initialValue&&(!this.options.autosave||this.options.autosave.foundSavedValue!==!0)&&this.value(l.initialValue),l.uploadImage){var D=this;this.codemirror.on("dragenter",function(C,S){D.updateStatusBar("upload-image",D.options.imageTexts.sbOnDragEnter),S.stopPropagation(),S.preventDefault()}),this.codemirror.on("dragend",function(C,S){D.updateStatusBar("upload-image",D.options.imageTexts.sbInit),S.stopPropagation(),S.preventDefault()}),this.codemirror.on("dragleave",function(C,S){D.updateStatusBar("upload-image",D.options.imageTexts.sbInit),S.stopPropagation(),S.preventDefault()}),this.codemirror.on("dragover",function(C,S){D.updateStatusBar("upload-image",D.options.imageTexts.sbOnDragEnter),S.stopPropagation(),S.preventDefault()}),this.codemirror.on("drop",function(C,S){S.stopPropagation(),S.preventDefault(),l.imageUploadFunction?D.uploadImagesUsingCustomFunction(l.imageUploadFunction,S.dataTransfer.files):D.uploadImages(S.dataTransfer.files)}),this.codemirror.on("paste",function(C,S){l.imageUploadFunction?D.uploadImagesUsingCustomFunction(l.imageUploadFunction,S.clipboardData.files):D.uploadImages(S.clipboardData.files)})}}g.prototype.uploadImages=function(l,d,x){if(l.length!==0){for(var m=[],w=0;w<l.length;w++)m.push(l[w].name),this.uploadImage(l[w],d,x);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",m.join(", ")))}},g.prototype.uploadImagesUsingCustomFunction=function(l,d){if(d.length!==0){for(var x=[],m=0;m<d.length;m++)x.push(d[m].name),this.uploadImageUsingCustomFunction(l,d[m]);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",x.join(", ")))}},g.prototype.updateStatusBar=function(l,d){if(this.gui.statusbar){var x=this.gui.statusbar.getElementsByClassName(l);x.length===1?this.gui.statusbar.getElementsByClassName(l)[0].textContent=d:x.length===0?console.log("EasyMDE: status bar item "+l+" was not found."):console.log("EasyMDE: Several status bar items named "+l+" was found.")}},g.prototype.markdown=function(l){if(B){var d;if(this.options&&this.options.renderingConfig&&this.options.renderingConfig.markedOptions?d=this.options.renderingConfig.markedOptions:d={},this.options&&this.options.renderingConfig&&this.options.renderingConfig.singleLineBreaks===!1?d.breaks=!1:d.breaks=!0,this.options&&this.options.renderingConfig&&this.options.renderingConfig.codeSyntaxHighlighting===!0){var x=this.options.renderingConfig.hljs||window.hljs;x&&(d.highlight=function(w,N){return N&&x.getLanguage(N)?x.highlight(N,w).value:x.highlightAuto(w).value})}B.setOptions(d);var m=B.parse(l);return this.options.renderingConfig&&typeof this.options.renderingConfig.sanitizerFunction=="function"&&(m=this.options.renderingConfig.sanitizerFunction.call(this,m)),m=K(m),m=P(m),m}},g.prototype.render=function(l){if(l||(l=this.element||document.getElementsByTagName("textarea")[0]),this._rendered&&this._rendered===l)return;this.element=l;var d=this.options,x=this,m={};for(var w in d.shortcuts)d.shortcuts[w]!==null&&F[w]!==null&&function(Ne){m[oe(d.shortcuts[Ne])]=function(){var We=F[Ne];typeof We=="function"?We(x):typeof We=="string"&&window.open(We,"_blank")}}(w);m.Enter="newlineAndIndentContinueMarkdownList",m.Tab="tabAndIndentMarkdownList",m["Shift-Tab"]="shiftTabAndUnindentMarkdownList",m.Esc=function(Ne){Ne.getOption("fullScreen")&&q(x)},this.documentOnKeyDown=function(Ne){Ne=Ne||window.event,Ne.keyCode==27&&x.codemirror.getOption("fullScreen")&&q(x)},document.addEventListener("keydown",this.documentOnKeyDown,!1);var N,D;d.overlayMode?(W.defineMode("overlay-mode",function(Ne){return W.overlayMode(W.getMode(Ne,d.spellChecker!==!1?"spell-checker":"gfm"),d.overlayMode.mode,d.overlayMode.combine)}),N="overlay-mode",D=d.parsingConfig,D.gitHubSpice=!1):(N=d.parsingConfig,N.name="gfm",N.gitHubSpice=!1),d.spellChecker!==!1&&(N="spell-checker",D=d.parsingConfig,D.name="gfm",D.gitHubSpice=!1,typeof d.spellChecker=="function"?d.spellChecker({codeMirrorInstance:W}):Q({codeMirrorInstance:W}));function C(Ne,We,Ze){return{addNew:!1}}if(this.codemirror=W.fromTextArea(l,{mode:N,backdrop:D,theme:d.theme!=null?d.theme:"easymde",tabSize:d.tabSize!=null?d.tabSize:2,indentUnit:d.tabSize!=null?d.tabSize:2,indentWithTabs:d.indentWithTabs!==!1,lineNumbers:d.lineNumbers===!0,autofocus:d.autofocus===!0,extraKeys:m,direction:d.direction,lineWrapping:d.lineWrapping!==!1,allowDropFileTypes:["text/plain"],placeholder:d.placeholder||l.getAttribute("placeholder")||"",styleSelectedText:d.styleSelectedText!=null?d.styleSelectedText:!V(),scrollbarStyle:d.scrollbarStyle!=null?d.scrollbarStyle:"native",configureMouse:C,inputStyle:d.inputStyle!=null?d.inputStyle:V()?"contenteditable":"textarea",spellcheck:d.nativeSpellcheck!=null?d.nativeSpellcheck:!0,autoRefresh:d.autoRefresh!=null?d.autoRefresh:!1}),this.codemirror.getScrollerElement().style.minHeight=d.minHeight,typeof d.maxHeight!="undefined"&&(this.codemirror.getScrollerElement().style.height=d.maxHeight),d.forceSync===!0){var S=this.codemirror;S.on("change",function(){S.save()})}this.gui={};var ie=document.createElement("div");ie.classList.add("EasyMDEContainer"),ie.setAttribute("role","application");var he=this.codemirror.getWrapperElement();he.parentNode.insertBefore(ie,he),ie.appendChild(he),d.toolbar!==!1&&(this.gui.toolbar=this.createToolbar()),d.status!==!1&&(this.gui.statusbar=this.createStatusbar()),d.autosave!=null&&d.autosave.enabled===!0&&(this.autosave(),this.codemirror.on("change",function(){clearTimeout(x._autosave_timeout),x._autosave_timeout=setTimeout(function(){x.autosave()},x.options.autosave.submit_delay||x.options.autosave.delay||1e3)}));function be(Ne,We){var Ze,Je=window.getComputedStyle(document.querySelector(".CodeMirror-sizer")).width.replace("px","");return Ne<Je?Ze=We+"px":Ze=We/Ne*100+"%",Ze}var De=this;function me(Ne,We){Ne.setAttribute("data-img-src",We.url),Ne.setAttribute("style","--bg-image:url("+We.url+");--width:"+We.naturalWidth+"px;--height:"+be(We.naturalWidth,We.naturalHeight)),De.codemirror.setSize()}function Re(){d.previewImagesInEditor&&ie.querySelectorAll(".cm-image-marker").forEach(function(Ne){var We=Ne.parentElement;if(We.innerText.match(/^!\[.*?\]\(.*\)/g)&&!We.hasAttribute("data-img-src")){var Ze=We.innerText.match("\\((.*)\\)");if(window.EMDEimagesCache||(window.EMDEimagesCache={}),Ze&&Ze.length>=2){var Je=Ze[1];if(d.imagesPreviewHandler){var Tt=d.imagesPreviewHandler(Ze[1]);typeof Tt=="string"&&(Je=Tt)}if(window.EMDEimagesCache[Je])me(We,window.EMDEimagesCache[Je]);else{var xt=document.createElement("img");xt.onload=function(){window.EMDEimagesCache[Je]={naturalWidth:xt.naturalWidth,naturalHeight:xt.naturalHeight,url:Je},me(We,window.EMDEimagesCache[Je])},xt.src=Je}}}})}this.codemirror.on("update",function(){Re()}),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element,(d.autofocus===!0||l.autofocus)&&this.codemirror.focus();var Pe=this.codemirror;setTimeout(function(){Pe.refresh()}.bind(Pe),0)},g.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)};function b(){if(typeof localStorage=="object")try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(l){return!1}else return!1;return!0}g.prototype.autosave=function(){if(b()){var l=this;if(this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to use the autosave feature");return}this.options.autosave.binded!==!0&&(l.element.form!=null&&l.element.form!=null&&l.element.form.addEventListener("submit",function(){clearTimeout(l.autosaveTimeoutId),l.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+l.options.autosave.uniqueId)}),this.options.autosave.binded=!0),this.options.autosave.loaded!==!0&&(typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)=="string"&&localStorage.getItem("smde_"+this.options.autosave.uniqueId)!=""&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0);var d=l.value();d!==""?localStorage.setItem("smde_"+this.options.autosave.uniqueId,d):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var x=document.getElementById("autosaved");if(x!=null&&x!=null&&x!=""){var m=new Date,w=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(m),N=this.options.autosave.text==null?"Autosaved: ":this.options.autosave.text;x.innerHTML=N+w}}else console.log("EasyMDE: localStorage not available, cannot autosave")},g.prototype.clearAutosavedValue=function(){if(b()){if(this.options.autosave==null||this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to clear the autosave value");return}localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")},g.prototype.openBrowseFileWindow=function(l,d){var x=this,m=this.gui.toolbar.getElementsByClassName("imageInput")[0];m.click();function w(N){x.options.imageUploadFunction?x.uploadImagesUsingCustomFunction(x.options.imageUploadFunction,N.target.files):x.uploadImages(N.target.files,l,d),m.removeEventListener("change",w)}m.addEventListener("change",w)},g.prototype.uploadImage=function(l,d,x){var m=this;d=d||function(ie){ee(m,ie)};function w(S){m.updateStatusBar("upload-image",S),setTimeout(function(){m.updateStatusBar("upload-image",m.options.imageTexts.sbInit)},1e4),x&&typeof x=="function"&&x(S),m.options.errorCallback(S)}function N(S){var ie=m.options.imageTexts.sizeUnits.split(",");return S.replace("#image_name#",l.name).replace("#image_size#",Lt(l.size,ie)).replace("#image_max_size#",Lt(m.options.imageMaxSize,ie))}if(l.size>this.options.imageMaxSize){w(N(this.options.errorMessages.fileTooLarge));return}var D=new FormData;D.append("image",l),m.options.imageCSRFToken&&!m.options.imageCSRFHeader&&D.append(m.options.imageCSRFName,m.options.imageCSRFToken);var C=new XMLHttpRequest;C.upload.onprogress=function(S){if(S.lengthComputable){var ie=""+Math.round(S.loaded*100/S.total);m.updateStatusBar("upload-image",m.options.imageTexts.sbProgress.replace("#file_name#",l.name).replace("#progress#",ie))}},C.open("POST",this.options.imageUploadEndpoint),m.options.imageCSRFToken&&m.options.imageCSRFHeader&&C.setRequestHeader(m.options.imageCSRFName,m.options.imageCSRFToken),C.onload=function(){try{var S=JSON.parse(this.responseText)}catch(ie){console.error("EasyMDE: The server did not return a valid json."),w(N(m.options.errorMessages.importError));return}this.status===200&&S&&!S.error&&S.data&&S.data.filePath?d((m.options.imagePathAbsolute?"":window.location.origin+"/")+S.data.filePath):S.error&&S.error in m.options.errorMessages?w(N(m.options.errorMessages[S.error])):S.error?w(N(S.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),w(N(m.options.errorMessages.importError)))},C.onerror=function(S){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+S.target.status+" ("+S.target.statusText+")"),w(m.options.errorMessages.importError)},C.send(D)},g.prototype.uploadImageUsingCustomFunction=function(l,d){var x=this;function m(D){ee(x,D)}function w(D){var C=N(D);x.updateStatusBar("upload-image",C),setTimeout(function(){x.updateStatusBar("upload-image",x.options.imageTexts.sbInit)},1e4),x.options.errorCallback(C)}function N(D){var C=x.options.imageTexts.sizeUnits.split(",");return D.replace("#image_name#",d.name).replace("#image_size#",Lt(d.size,C)).replace("#image_max_size#",Lt(x.options.imageMaxSize,C))}l.apply(this,[d,m,w])},g.prototype.setPreviewMaxHeight=function(){var l=this.codemirror,d=l.getWrapperElement(),x=d.nextSibling,m=parseInt(window.getComputedStyle(d).paddingTop),w=parseInt(window.getComputedStyle(d).borderTopWidth),N=parseInt(this.options.maxHeight),D=N+m*2+w*2,C=D.toString()+"px";x.style.height=C},g.prototype.createSideBySide=function(){var l=this.codemirror,d=l.getWrapperElement(),x=d.nextSibling;if(!x||!x.classList.contains("editor-preview-side")){if(x=document.createElement("div"),x.className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var m=0;m<this.options.previewClass.length;m++)x.classList.add(this.options.previewClass[m]);else typeof this.options.previewClass=="string"&&x.classList.add(this.options.previewClass);d.parentNode.insertBefore(x,d.nextSibling)}if(typeof this.options.maxHeight!="undefined"&&this.setPreviewMaxHeight(),this.options.syncSideBySidePreviewScroll===!1)return x;var w=!1,N=!1;return l.on("scroll",function(D){if(w){w=!1;return}N=!0;var C=D.getScrollInfo().height-D.getScrollInfo().clientHeight,S=parseFloat(D.getScrollInfo().top)/C,ie=(x.scrollHeight-x.clientHeight)*S;x.scrollTop=ie}),x.onscroll=function(){if(N){N=!1;return}w=!0;var D=x.scrollHeight-x.clientHeight,C=parseFloat(x.scrollTop)/D,S=(l.getScrollInfo().height-l.getScrollInfo().clientHeight)*C;l.scrollTo(0,S)},x},g.prototype.createToolbar=function(l){if(l=l||this.options.toolbar,!(!l||l.length===0)){var d;for(d=0;d<l.length;d++)kt[l[d]]!=null&&(l[d]=kt[l[d]]);var x=document.createElement("div");x.className="editor-toolbar",x.setAttribute("role","toolbar");var m=this,w={};for(m.toolbar=l,d=0;d<l.length;d++)if(!(l[d].name=="guide"&&m.options.toolbarGuideIcon===!1)&&!(m.options.hideIcons&&m.options.hideIcons.indexOf(l[d].name)!=-1)&&!((l[d].name=="fullscreen"||l[d].name=="side-by-side")&&V())){if(l[d]==="|"){for(var N=!1,D=d+1;D<l.length;D++)l[D]!=="|"&&(!m.options.hideIcons||m.options.hideIcons.indexOf(l[D].name)==-1)&&(N=!0);if(!N)continue}(function(ie){var he;if(ie==="|"?he=xe():ie.children?he=pe(ie,m.options.toolbarTips,m.options.shortcuts,m):he=Ee(ie,!0,m.options.toolbarTips,m.options.shortcuts,"button",m),w[ie.name||ie]=he,x.appendChild(he),ie.name==="upload-image"){var be=document.createElement("input");be.className="imageInput",be.type="file",be.multiple=!0,be.name="image",be.accept=m.options.imageAccept,be.style.display="none",be.style.opacity=0,x.appendChild(be)}})(l[d])}m.toolbar_div=x,m.toolbarElements=w;var C=this.codemirror;C.on("cursorActivity",function(){var ie=H(C);for(var he in w)(function(be){var De=w[be];ie[be]?De.classList.add("active"):be!="fullscreen"&&be!="side-by-side"&&De.classList.remove("active")})(he)});var S=C.getWrapperElement();return S.parentNode.insertBefore(x,S),x}},g.prototype.createStatusbar=function(l){l=l||this.options.status;var d=this.options,x=this.codemirror;if(!(!l||l.length===0)){var m=[],w,N,D,C;for(w=0;w<l.length;w++)if(N=void 0,D=void 0,C=void 0,typeof l[w]=="object")m.push({className:l[w].className,defaultValue:l[w].defaultValue,onUpdate:l[w].onUpdate,onActivity:l[w].onActivity});else{var S=l[w];S==="words"?(C=function(me){me.innerHTML=Rt(x.getValue())},N=function(me){me.innerHTML=Rt(x.getValue())}):S==="lines"?(C=function(me){me.innerHTML=x.lineCount()},N=function(me){me.innerHTML=x.lineCount()}):S==="cursor"?(C=function(me){me.innerHTML="1:1"},D=function(me){var Re=x.getCursor(),Pe=Re.line+1,Ne=Re.ch+1;me.innerHTML=Pe+":"+Ne}):S==="autosave"?C=function(me){d.autosave!=null&&d.autosave.enabled===!0&&me.setAttribute("id","autosaved")}:S==="upload-image"&&(C=function(me){me.innerHTML=d.imageTexts.sbInit}),m.push({className:S,defaultValue:C,onUpdate:N,onActivity:D})}var ie=document.createElement("div");for(ie.className="editor-statusbar",w=0;w<m.length;w++){var he=m[w],be=document.createElement("span");be.className=he.className,typeof he.defaultValue=="function"&&he.defaultValue(be),typeof he.onUpdate=="function"&&this.codemirror.on("update",function(me,Re){return function(){Re.onUpdate(me)}}(be,he)),typeof he.onActivity=="function"&&this.codemirror.on("cursorActivity",function(me,Re){return function(){Re.onActivity(me)}}(be,he)),ie.appendChild(be)}var De=this.codemirror.getWrapperElement();return De.parentNode.insertBefore(ie,De.nextSibling),ie}},g.prototype.value=function(l){var d=this.codemirror;if(l===void 0)return d.getValue();if(d.getDoc().setValue(l),this.isPreviewActive()){var x=d.getWrapperElement(),m=x.lastChild,w=this.options.previewRender(l,m);w!==null&&(m.innerHTML=w)}return this},g.toggleBold=te,g.toggleItalic=X,g.toggleStrikethrough=ue,g.toggleBlockquote=ge,g.toggleHeadingSmaller=Te,g.toggleHeadingBigger=Z,g.toggleHeading1=Ae,g.toggleHeading2=J,g.toggleHeading3=He,g.toggleHeading4=_,g.toggleHeading5=le,g.toggleHeading6=$,g.toggleCodeBlock=ne,g.toggleUnorderedList=ke,g.toggleOrderedList=Qe,g.cleanBlock=at,g.drawLink=rt,g.drawImage=k,g.drawUploadedImage=j,g.drawTable=Le,g.drawHorizontalRule=Ue,g.undo=st,g.redo=nt,g.togglePreview=ft,g.toggleSideBySide=Xe,g.toggleFullScreen=q,g.prototype.toggleBold=function(){te(this)},g.prototype.toggleItalic=function(){X(this)},g.prototype.toggleStrikethrough=function(){ue(this)},g.prototype.toggleBlockquote=function(){ge(this)},g.prototype.toggleHeadingSmaller=function(){Te(this)},g.prototype.toggleHeadingBigger=function(){Z(this)},g.prototype.toggleHeading1=function(){Ae(this)},g.prototype.toggleHeading2=function(){J(this)},g.prototype.toggleHeading3=function(){He(this)},g.prototype.toggleHeading4=function(){_(this)},g.prototype.toggleHeading5=function(){le(this)},g.prototype.toggleHeading6=function(){$(this)},g.prototype.toggleCodeBlock=function(){ne(this)},g.prototype.toggleUnorderedList=function(){ke(this)},g.prototype.toggleOrderedList=function(){Qe(this)},g.prototype.cleanBlock=function(){at(this)},g.prototype.drawLink=function(){rt(this)},g.prototype.drawImage=function(){k(this)},g.prototype.drawUploadedImage=function(){j(this)},g.prototype.drawTable=function(){Le(this)},g.prototype.drawHorizontalRule=function(){Ue(this)},g.prototype.undo=function(){st(this)},g.prototype.redo=function(){nt(this)},g.prototype.togglePreview=function(){ft(this)},g.prototype.toggleSideBySide=function(){Xe(this)},g.prototype.toggleFullScreen=function(){q(this)},g.prototype.isPreviewActive=function(){var l=this.codemirror,d=l.getWrapperElement(),x=d.lastChild;return x.classList.contains("editor-preview-active")},g.prototype.isSideBySideActive=function(){var l=this.codemirror,d=l.getWrapperElement(),x=d.nextSibling;return x.classList.contains("editor-preview-active-side")},g.prototype.isFullscreenActive=function(){var l=this.codemirror;return l.getOption("fullScreen")},g.prototype.getState=function(){var l=this.codemirror;return H(l)},g.prototype.toTextArea=function(){var l=this.codemirror,d=l.getWrapperElement(),x=d.parentNode;x&&(this.gui.toolbar&&x.removeChild(this.gui.toolbar),this.gui.statusbar&&x.removeChild(this.gui.statusbar),this.gui.sideBySide&&x.removeChild(this.gui.sideBySide)),x.parentNode.insertBefore(d,x),x.remove(),l.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())},ut.exports=g},"./node_modules/typo-js/typo.js":function(ut,Ie,ye){var W="/",Q;(function(){"use strict";Q=function(B,R,E,F){F=F||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=F.flags||{},this.memoized={},this.loaded=!1;var M=this,Y,V,K,P,oe;B&&(M.dictionary=B,R&&E?Ce():typeof window!="undefined"&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(F.dictionaryPath?Y=F.dictionaryPath:Y="typo/dictionaries",R||pe(chrome.extension.getURL(Y+"/"+B+"/"+B+".aff"),Ee),E||pe(chrome.extension.getURL(Y+"/"+B+"/"+B+".dic"),xe)):(F.dictionaryPath?Y=F.dictionaryPath:Y=W+"/dictionaries",R||pe(Y+"/"+B+"/"+B+".aff",Ee),E||pe(Y+"/"+B+"/"+B+".dic",xe)));function pe(H,U){var q=M._readFile(H,null,F.asyncLoad);F.asyncLoad?q.then(function(te){U(te)}):U(q)}function Ee(H){R=H,E&&Ce()}function xe(H){E=H,R&&Ce()}function Ce(){for(M.rules=M._parseAFF(R),M.compoundRuleCodes={},V=0,P=M.compoundRules.length;V<P;V++){var H=M.compoundRules[V];for(K=0,oe=H.length;K<oe;K++)M.compoundRuleCodes[H[K]]=[]}"ONLYINCOMPOUND"in M.flags&&(M.compoundRuleCodes[M.flags.ONLYINCOMPOUND]=[]),M.dictionaryTable=M._parseDIC(E);for(V in M.compoundRuleCodes)M.compoundRuleCodes[V].length===0&&delete M.compoundRuleCodes[V];for(V=0,P=M.compoundRules.length;V<P;V++){var U=M.compoundRules[V],q="";for(K=0,oe=U.length;K<oe;K++){var te=U[K];te in M.compoundRuleCodes?q+="("+M.compoundRuleCodes[te].join("|")+")":q+=te}M.compoundRules[V]=new RegExp(q,"i")}M.loaded=!0,F.asyncLoad&&F.loadedCallback&&F.loadedCallback(M)}return this},Q.prototype={load:function(B){for(var R in B)B.hasOwnProperty(R)&&(this[R]=B[R]);return this},_readFile:function(B,R,E){if(R=R||"utf8",typeof XMLHttpRequest!="undefined"){var F,M=new XMLHttpRequest;return M.open("GET",B,E),E&&(F=new Promise(function(V,K){M.onload=function(){M.status===200?V(M.responseText):K(M.statusText)},M.onerror=function(){K(M.statusText)}})),M.overrideMimeType&&M.overrideMimeType("text/plain; charset="+R),M.send(null),E?F:M.responseText}else{var Y=ye("?b2fd");try{if(Y.existsSync(B))return Y.readFileSync(B,R);console.log("Path "+B+" does not exist.")}catch(V){return console.log(V),""}}},_parseAFF:function(B){var R={},E,F,M,Y,V,K,P,oe,pe=B.split(/\r?\n/);for(V=0,P=pe.length;V<P;V++)if(E=this._removeAffixComments(pe[V]),E=E.trim(),!!E){var Ee=E.split(/\s+/),xe=Ee[0];if(xe=="PFX"||xe=="SFX"){var Ce=Ee[1],H=Ee[2];M=parseInt(Ee[3],10);var U=[];for(K=V+1,oe=V+1+M;K<oe;K++){F=pe[K],Y=F.split(/\s+/);var q=Y[2],te=Y[3].split("/"),X=te[0];X==="0"&&(X="");var ue=this.parseRuleCodes(te[1]),ne=Y[4],ge={};ge.add=X,ue.length>0&&(ge.continuationClasses=ue),ne!=="."&&(xe==="SFX"?ge.match=new RegExp(ne+"$"):ge.match=new RegExp("^"+ne)),q!="0"&&(xe==="SFX"?ge.remove=new RegExp(q+"$"):ge.remove=q),U.push(ge)}R[Ce]={type:xe,combineable:H=="Y",entries:U},V+=M}else if(xe==="COMPOUNDRULE"){for(M=parseInt(Ee[1],10),K=V+1,oe=V+1+M;K<oe;K++)E=pe[K],Y=E.split(/\s+/),this.compoundRules.push(Y[1]);V+=M}else xe==="REP"?(Y=E.split(/\s+/),Y.length===3&&this.replacementTable.push([Y[1],Y[2]])):this.flags[xe]=Ee[1]}return R},_removeAffixComments:function(B){return B.match(/^\s*#/,"")?"":B},_parseDIC:function(B){B=this._removeDicComments(B);var R=B.split(/\r?\n/),E={};function F(J,He){E.hasOwnProperty(J)||(E[J]=null),He.length>0&&(E[J]===null&&(E[J]=[]),E[J].push(He))}for(var M=1,Y=R.length;M<Y;M++){var V=R[M];if(V){var K=V.split("/",2),P=K[0];if(K.length>1){var oe=this.parseRuleCodes(K[1]);(!("NEEDAFFIX"in this.flags)||oe.indexOf(this.flags.NEEDAFFIX)==-1)&&F(P,oe);for(var pe=0,Ee=oe.length;pe<Ee;pe++){var xe=oe[pe],Ce=this.rules[xe];if(Ce)for(var H=this._applyRule(P,Ce),U=0,q=H.length;U<q;U++){var te=H[U];if(F(te,[]),Ce.combineable)for(var X=pe+1;X<Ee;X++){var ue=oe[X],ne=this.rules[ue];if(ne&&ne.combineable&&Ce.type!=ne.type)for(var ge=this._applyRule(te,ne),Te=0,Z=ge.length;Te<Z;Te++){var Ae=ge[Te];F(Ae,[])}}}xe in this.compoundRuleCodes&&this.compoundRuleCodes[xe].push(P)}}else F(P.trim(),[])}}return E},_removeDicComments:function(B){return B=B.replace(/^\t.*$/mg,""),B},parseRuleCodes:function(B){if(B)if("FLAG"in this.flags)if(this.flags.FLAG==="long"){for(var R=[],E=0,F=B.length;E<F;E+=2)R.push(B.substr(E,2));return R}else return this.flags.FLAG==="num"?B.split(","):this.flags.FLAG==="UTF-8"?Array.from(B):B.split("");else return B.split("");else return[]},_applyRule:function(B,R){for(var E=R.entries,F=[],M=0,Y=E.length;M<Y;M++){var V=E[M];if(!V.match||B.match(V.match)){var K=B;if(V.remove&&(K=K.replace(V.remove,"")),R.type==="SFX"?K=K+V.add:K=V.add+K,F.push(K),"continuationClasses"in V)for(var P=0,oe=V.continuationClasses.length;P<oe;P++){var pe=this.rules[V.continuationClasses[P]];pe&&(F=F.concat(this._applyRule(K,pe)))}}}return F},check:function(B){if(!this.loaded)throw"Dictionary not loaded.";var R=B.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(R))return!0;if(R.toUpperCase()===R){var E=R[0]+R.substring(1).toLowerCase();if(this.hasFlag(E,"KEEPCASE"))return!1;if(this.checkExact(E)||this.checkExact(R.toLowerCase()))return!0}var F=R[0].toLowerCase()+R.substring(1);if(F!==R){if(this.hasFlag(F,"KEEPCASE"))return!1;if(this.checkExact(F))return!0}return!1},checkExact:function(B){if(!this.loaded)throw"Dictionary not loaded.";var R=this.dictionaryTable[B],E,F;if(typeof R=="undefined"){if("COMPOUNDMIN"in this.flags&&B.length>=this.flags.COMPOUNDMIN){for(E=0,F=this.compoundRules.length;E<F;E++)if(B.match(this.compoundRules[E]))return!0}}else{if(R===null)return!0;if(typeof R=="object"){for(E=0,F=R.length;E<F;E++)if(!this.hasFlag(B,"ONLYINCOMPOUND",R[E]))return!0}}return!1},hasFlag:function(B,R,E){if(!this.loaded)throw"Dictionary not loaded.";return!!(R in this.flags&&(typeof E=="undefined"&&(E=Array.prototype.concat.apply([],this.dictionaryTable[B])),E&&E.indexOf(this.flags[R])!==-1))},alphabet:"",suggest:function(B,R){if(!this.loaded)throw"Dictionary not loaded.";if(R=R||5,this.memoized.hasOwnProperty(B)){var E=this.memoized[B].limit;if(R<=E||this.memoized[B].suggestions.length<E)return this.memoized[B].suggestions.slice(0,R)}if(this.check(B))return[];for(var F=0,M=this.replacementTable.length;F<M;F++){var Y=this.replacementTable[F];if(B.indexOf(Y[0])!==-1){var V=B.replace(Y[0],Y[1]);if(this.check(V))return[V]}}if(!this.alphabet){this.alphabet="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ","TRY"in this.flags&&(this.alphabet+=this.flags.TRY),"WORDCHARS"in this.flags&&(this.alphabet+=this.flags.WORDCHARS);var K=this.alphabet.split("");K.sort();for(var P={},F=0;F<K.length;F++)P[K[F]]=!0;this.alphabet="";for(var F in P)this.alphabet+=F}var oe=this;function pe(xe,Ce){var H={},U,q,te,X,ue,ne,ge=oe.alphabet.length;if(typeof xe=="string"){var Te=xe;xe={},xe[Te]=!0}for(var Te in xe)for(U=0,X=Te.length+1;U<X;U++){var Z=[Te.substring(0,U),Te.substring(U)];if(Z[1]&&(ne=Z[0]+Z[1].substring(1),(!Ce||oe.check(ne))&&(ne in H?H[ne]+=1:H[ne]=1)),Z[1].length>1&&Z[1][1]!==Z[1][0]&&(ne=Z[0]+Z[1][1]+Z[1][0]+Z[1].substring(2),(!Ce||oe.check(ne))&&(ne in H?H[ne]+=1:H[ne]=1)),Z[1]){var Ae=Z[1].substring(0,1).toUpperCase()===Z[1].substring(0,1)?"uppercase":"lowercase";for(q=0;q<ge;q++){var J=oe.alphabet[q];Ae==="uppercase"&&(J=J.toUpperCase()),J!=Z[1].substring(0,1)&&(ne=Z[0]+J+Z[1].substring(1),(!Ce||oe.check(ne))&&(ne in H?H[ne]+=1:H[ne]=1))}}if(Z[1])for(q=0;q<ge;q++){var Ae=Z[0].substring(-1).toUpperCase()===Z[0].substring(-1)&&Z[1].substring(0,1).toUpperCase()===Z[1].substring(0,1)?"uppercase":"lowercase",J=oe.alphabet[q];Ae==="uppercase"&&(J=J.toUpperCase()),ne=Z[0]+J+Z[1],(!Ce||oe.check(ne))&&(ne in H?H[ne]+=1:H[ne]=1)}}return H}function Ee(xe){var Ce=pe(xe),H=pe(Ce,!0),U=H;for(var q in Ce)oe.check(q)&&(q in U?U[q]+=Ce[q]:U[q]=Ce[q]);var te,X,ue=[];for(te in U)U.hasOwnProperty(te)&&ue.push([te,U[te]]);function ne(Ae,J){var He=Ae[1],_=J[1];return He<_?-1:He>_?1:J[0].localeCompare(Ae[0])}ue.sort(ne).reverse();var ge=[],Te="lowercase";xe.toUpperCase()===xe?Te="uppercase":xe.substr(0,1).toUpperCase()+xe.substr(1).toLowerCase()===xe&&(Te="capitalized");var Z=R;for(te=0;te<Math.min(Z,ue.length);te++)Te==="uppercase"?ue[te][0]=ue[te][0].toUpperCase():Te==="capitalized"&&(ue[te][0]=ue[te][0].substr(0,1).toUpperCase()+ue[te][0].substr(1)),!oe.hasFlag(ue[te][0],"NOSUGGEST")&&ge.indexOf(ue[te][0])==-1?ge.push(ue[te][0]):Z++;return ge}return this.memoized[B]={suggestions:Ee(B),limit:R},this.memoized[B].suggestions}}})(),ut.exports=Q},"?b2fd":function(){},"./node_modules/marked/lib/marked.cjs":function(ut,Ie){"use strict";var ye;function W(O,I){for(var L=0;L<I.length;L++){var c=I[L];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(O,Y(c.key),c)}}function Q(O,I,L){return I&&W(O.prototype,I),L&&W(O,L),Object.defineProperty(O,"prototype",{writable:!1}),O}function B(){return B=Object.assign?Object.assign.bind():function(O){for(var I=1;I<arguments.length;I++){var L=arguments[I];for(var c in L)Object.prototype.hasOwnProperty.call(L,c)&&(O[c]=L[c])}return O},B.apply(this,arguments)}function R(O,I){if(O){if(typeof O=="string")return E(O,I);var L=Object.prototype.toString.call(O).slice(8,-1);if(L==="Object"&&O.constructor&&(L=O.constructor.name),L==="Map"||L==="Set")return Array.from(O);if(L==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(L))return E(O,I)}}function E(O,I){(I==null||I>O.length)&&(I=O.length);for(var L=0,c=new Array(I);L<I;L++)c[L]=O[L];return c}function F(O,I){var L=typeof Symbol!="undefined"&&O[Symbol.iterator]||O["@@iterator"];if(L)return(L=L.call(O)).next.bind(L);if(Array.isArray(O)||(L=R(O))||I&&O&&typeof O.length=="number"){L&&(O=L);var c=0;return function(){return c>=O.length?{done:!0}:{done:!1,value:O[c++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M(O,I){if(typeof O!="object"||O===null)return O;var L=O[Symbol.toPrimitive];if(L!==void 0){var c=L.call(O,I||"default");if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(I==="string"?String:Number)(O)}function Y(O){var I=M(O,"string");return typeof I=="symbol"?I:String(I)}function V(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}Ie.ce=V();function K(O){Ie.ce=O}var P=/[&<>"']/,oe=new RegExp(P.source,"g"),pe=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ee=new RegExp(pe.source,"g"),xe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ce=function(I){return xe[I]};function H(O,I){if(I){if(P.test(O))return O.replace(oe,Ce)}else if(pe.test(O))return O.replace(Ee,Ce);return O}var U=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function q(O){return O.replace(U,function(I,L){return L=L.toLowerCase(),L==="colon"?":":L.charAt(0)==="#"?L.charAt(1)==="x"?String.fromCharCode(parseInt(L.substring(2),16)):String.fromCharCode(+L.substring(1)):""})}var te=/(^|[^\[])\^/g;function X(O,I){O=typeof O=="string"?O:O.source,I=I||"";var L={replace:function(p,g){return g=g.source||g,g=g.replace(te,"$1"),O=O.replace(p,g),L},getRegex:function(){return new RegExp(O,I)}};return L}var ue=/[^\w:]/g,ne=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ge(O,I,L){if(O){var c;try{c=decodeURIComponent(q(L)).replace(ue,"").toLowerCase()}catch(p){return null}if(c.indexOf("javascript:")===0||c.indexOf("vbscript:")===0||c.indexOf("data:")===0)return null}I&&!ne.test(L)&&(L=He(I,L));try{L=encodeURI(L).replace(/%25/g,"%")}catch(p){return null}return L}var Te={},Z=/^[^:]+:\/*[^/]*$/,Ae=/^([^:]+:)[\s\S]*$/,J=/^([^:]+:\/*[^/]*)[\s\S]*$/;function He(O,I){Te[" "+O]||(Z.test(O)?Te[" "+O]=O+"/":Te[" "+O]=$(O,"/",!0)),O=Te[" "+O];var L=O.indexOf(":")===-1;return I.substring(0,2)==="//"?L?I:O.replace(Ae,"$1")+I:I.charAt(0)==="/"?L?I:O.replace(J,"$1")+I:O+I}var _={exec:function(){}};function le(O,I){var L=O.replace(/\|/g,function(g,b,l){for(var d=!1,x=b;--x>=0&&l[x]==="\\";)d=!d;return d?"|":" |"}),c=L.split(/ \|/),p=0;if(c[0].trim()||c.shift(),c.length>0&&!c[c.length-1].trim()&&c.pop(),c.length>I)c.splice(I);else for(;c.length<I;)c.push("");for(;p<c.length;p++)c[p]=c[p].trim().replace(/\\\|/g,"|");return c}function $(O,I,L){var c=O.length;if(c===0)return"";for(var p=0;p<c;){var g=O.charAt(c-p-1);if(g===I&&!L)p++;else if(g!==I&&L)p++;else break}return O.slice(0,c-p)}function ke(O,I){if(O.indexOf(I[1])===-1)return-1;for(var L=O.length,c=0,p=0;p<L;p++)if(O[p]==="\\")p++;else if(O[p]===I[0])c++;else if(O[p]===I[1]&&(c--,c<0))return p;return-1}function Qe(O){O&&O.sanitize&&!O.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function at(O,I){if(I<1)return"";for(var L="";I>1;)I&1&&(L+=O),I>>=1,O+=O;return L+O}function rt(O,I,L,c){var p=I.href,g=I.title?H(I.title):null,b=O[1].replace(/\\([\[\]])/g,"$1");if(O[0].charAt(0)!=="!"){c.state.inLink=!0;var l={type:"link",raw:L,href:p,title:g,text:b,tokens:c.inlineTokens(b)};return c.state.inLink=!1,l}return{type:"image",raw:L,href:p,title:g,text:H(b)}}function k(O,I){var L=O.match(/^(\s+)(?:```)/);if(L===null)return I;var c=L[1];return I.split(`
`).map(function(p){var g=p.match(/^\s+/);if(g===null)return p;var b=g[0];return b.length>=c.length?p.slice(c.length):p}).join(`
`)}var h=function(){function O(L){this.options=L||Ie.ce}var I=O.prototype;return I.space=function(c){var p=this.rules.block.newline.exec(c);if(p&&p[0].length>0)return{type:"space",raw:p[0]}},I.code=function(c){var p=this.rules.block.code.exec(c);if(p){var g=p[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:p[0],codeBlockStyle:"indented",text:this.options.pedantic?g:$(g,`
`)}}},I.fences=function(c){var p=this.rules.block.fences.exec(c);if(p){var g=p[0],b=k(g,p[3]||"");return{type:"code",raw:g,lang:p[2]?p[2].trim().replace(this.rules.inline._escapes,"$1"):p[2],text:b}}},I.heading=function(c){var p=this.rules.block.heading.exec(c);if(p){var g=p[2].trim();if(/#$/.test(g)){var b=$(g,"#");(this.options.pedantic||!b||/ $/.test(b))&&(g=b.trim())}return{type:"heading",raw:p[0],depth:p[1].length,text:g,tokens:this.lexer.inline(g)}}},I.hr=function(c){var p=this.rules.block.hr.exec(c);if(p)return{type:"hr",raw:p[0]}},I.blockquote=function(c){var p=this.rules.block.blockquote.exec(c);if(p){var g=p[0].replace(/^ *>[ \t]?/gm,""),b=this.lexer.state.top;this.lexer.state.top=!0;var l=this.lexer.blockTokens(g);return this.lexer.state.top=b,{type:"blockquote",raw:p[0],tokens:l,text:g}}},I.list=function(c){var p=this.rules.block.list.exec(c);if(p){var g,b,l,d,x,m,w,N,D,C,S,ie,he=p[1].trim(),be=he.length>1,De={type:"list",raw:"",ordered:be,start:be?+he.slice(0,-1):"",loose:!1,items:[]};he=be?"\\d{1,9}\\"+he.slice(-1):"\\"+he,this.options.pedantic&&(he=be?he:"[*+-]");for(var me=new RegExp("^( {0,3}"+he+")((?:[ ][^\\n]*)?(?:\\n|$))");c&&(ie=!1,!(!(p=me.exec(c))||this.rules.block.hr.test(c)));){if(g=p[0],c=c.substring(g.length),N=p[2].split(`
`,1)[0].replace(/^\t+/,function(xt){return" ".repeat(3*xt.length)}),D=c.split(`
`,1)[0],this.options.pedantic?(d=2,S=N.trimLeft()):(d=p[2].search(/[^ ]/),d=d>4?1:d,S=N.slice(d),d+=p[1].length),m=!1,!N&&/^ *$/.test(D)&&(g+=D+`
`,c=c.substring(D.length+1),ie=!0),!ie)for(var Re=new RegExp("^ {0,"+Math.min(3,d-1)+"}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))"),Pe=new RegExp("^ {0,"+Math.min(3,d-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),Ne=new RegExp("^ {0,"+Math.min(3,d-1)+"}(?:```|~~~)"),We=new RegExp("^ {0,"+Math.min(3,d-1)+"}#");c&&(C=c.split(`
`,1)[0],D=C,this.options.pedantic&&(D=D.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(Ne.test(D)||We.test(D)||Re.test(D)||Pe.test(c)));){if(D.search(/[^ ]/)>=d||!D.trim())S+=`
`+D.slice(d);else{if(m||N.search(/[^ ]/)>=4||Ne.test(N)||We.test(N)||Pe.test(N))break;S+=`
`+D}!m&&!D.trim()&&(m=!0),g+=C+`
`,c=c.substring(C.length+1),N=D.slice(d)}De.loose||(w?De.loose=!0:/\n *\n *$/.test(g)&&(w=!0)),this.options.gfm&&(b=/^\[[ xX]\] /.exec(S),b&&(l=b[0]!=="[ ] ",S=S.replace(/^\[[ xX]\] +/,""))),De.items.push({type:"list_item",raw:g,task:!!b,checked:l,loose:!1,text:S}),De.raw+=g}De.items[De.items.length-1].raw=g.trimRight(),De.items[De.items.length-1].text=S.trimRight(),De.raw=De.raw.trimRight();var Ze=De.items.length;for(x=0;x<Ze;x++)if(this.lexer.state.top=!1,De.items[x].tokens=this.lexer.blockTokens(De.items[x].text,[]),!De.loose){var Je=De.items[x].tokens.filter(function(xt){return xt.type==="space"}),Tt=Je.length>0&&Je.some(function(xt){return/\n.*\n/.test(xt.raw)});De.loose=Tt}if(De.loose)for(x=0;x<Ze;x++)De.items[x].loose=!0;return De}},I.html=function(c){var p=this.rules.block.html.exec(c);if(p){var g={type:"html",raw:p[0],pre:!this.options.sanitizer&&(p[1]==="pre"||p[1]==="script"||p[1]==="style"),text:p[0]};if(this.options.sanitize){var b=this.options.sanitizer?this.options.sanitizer(p[0]):H(p[0]);g.type="paragraph",g.text=b,g.tokens=this.lexer.inline(b)}return g}},I.def=function(c){var p=this.rules.block.def.exec(c);if(p){var g=p[1].toLowerCase().replace(/\s+/g," "),b=p[2]?p[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",l=p[3]?p[3].substring(1,p[3].length-1).replace(this.rules.inline._escapes,"$1"):p[3];return{type:"def",tag:g,raw:p[0],href:b,title:l}}},I.table=function(c){var p=this.rules.block.table.exec(c);if(p){var g={type:"table",header:le(p[1]).map(function(w){return{text:w}}),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:p[3]&&p[3].trim()?p[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(g.header.length===g.align.length){g.raw=p[0];var b=g.align.length,l,d,x,m;for(l=0;l<b;l++)/^ *-+: *$/.test(g.align[l])?g.align[l]="right":/^ *:-+: *$/.test(g.align[l])?g.align[l]="center":/^ *:-+ *$/.test(g.align[l])?g.align[l]="left":g.align[l]=null;for(b=g.rows.length,l=0;l<b;l++)g.rows[l]=le(g.rows[l],g.header.length).map(function(w){return{text:w}});for(b=g.header.length,d=0;d<b;d++)g.header[d].tokens=this.lexer.inline(g.header[d].text);for(b=g.rows.length,d=0;d<b;d++)for(m=g.rows[d],x=0;x<m.length;x++)m[x].tokens=this.lexer.inline(m[x].text);return g}}},I.lheading=function(c){var p=this.rules.block.lheading.exec(c);if(p)return{type:"heading",raw:p[0],depth:p[2].charAt(0)==="="?1:2,text:p[1],tokens:this.lexer.inline(p[1])}},I.paragraph=function(c){var p=this.rules.block.paragraph.exec(c);if(p){var g=p[1].charAt(p[1].length-1)===`
`?p[1].slice(0,-1):p[1];return{type:"paragraph",raw:p[0],text:g,tokens:this.lexer.inline(g)}}},I.text=function(c){var p=this.rules.block.text.exec(c);if(p)return{type:"text",raw:p[0],text:p[0],tokens:this.lexer.inline(p[0])}},I.escape=function(c){var p=this.rules.inline.escape.exec(c);if(p)return{type:"escape",raw:p[0],text:H(p[1])}},I.tag=function(c){var p=this.rules.inline.tag.exec(c);if(p)return!this.lexer.state.inLink&&/^<a /i.test(p[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(p[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(p[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(p[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:p[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(p[0]):H(p[0]):p[0]}},I.link=function(c){var p=this.rules.inline.link.exec(c);if(p){var g=p[2].trim();if(!this.options.pedantic&&/^</.test(g)){if(!/>$/.test(g))return;var b=$(g.slice(0,-1),"\\");if((g.length-b.length)%2===0)return}else{var l=ke(p[2],"()");if(l>-1){var d=p[0].indexOf("!")===0?5:4,x=d+p[1].length+l;p[2]=p[2].substring(0,l),p[0]=p[0].substring(0,x).trim(),p[3]=""}}var m=p[2],w="";if(this.options.pedantic){var N=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(m);N&&(m=N[1],w=N[3])}else w=p[3]?p[3].slice(1,-1):"";return m=m.trim(),/^</.test(m)&&(this.options.pedantic&&!/>$/.test(g)?m=m.slice(1):m=m.slice(1,-1)),rt(p,{href:m&&m.replace(this.rules.inline._escapes,"$1"),title:w&&w.replace(this.rules.inline._escapes,"$1")},p[0],this.lexer)}},I.reflink=function(c,p){var g;if((g=this.rules.inline.reflink.exec(c))||(g=this.rules.inline.nolink.exec(c))){var b=(g[2]||g[1]).replace(/\s+/g," ");if(b=p[b.toLowerCase()],!b){var l=g[0].charAt(0);return{type:"text",raw:l,text:l}}return rt(g,b,g[0],this.lexer)}},I.emStrong=function(c,p,g){g===void 0&&(g="");var b=this.rules.inline.emStrong.lDelim.exec(c);if(b&&!(b[3]&&g.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var l=b[1]||b[2]||"";if(!l||l&&(g===""||this.rules.inline.punctuation.exec(g))){var d=b[0].length-1,x,m,w=d,N=0,D=b[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(D.lastIndex=0,p=p.slice(-1*c.length+d);(b=D.exec(p))!=null;)if(x=b[1]||b[2]||b[3]||b[4]||b[5]||b[6],!!x){if(m=x.length,b[3]||b[4]){w+=m;continue}else if((b[5]||b[6])&&d%3&&!((d+m)%3)){N+=m;continue}if(w-=m,!(w>0)){m=Math.min(m,m+w+N);var C=c.slice(0,d+b.index+(b[0].length-x.length)+m);if(Math.min(d,m)%2){var S=C.slice(1,-1);return{type:"em",raw:C,text:S,tokens:this.lexer.inlineTokens(S)}}var ie=C.slice(2,-2);return{type:"strong",raw:C,text:ie,tokens:this.lexer.inlineTokens(ie)}}}}}},I.codespan=function(c){var p=this.rules.inline.code.exec(c);if(p){var g=p[2].replace(/\n/g," "),b=/[^ ]/.test(g),l=/^ /.test(g)&&/ $/.test(g);return b&&l&&(g=g.substring(1,g.length-1)),g=H(g,!0),{type:"codespan",raw:p[0],text:g}}},I.br=function(c){var p=this.rules.inline.br.exec(c);if(p)return{type:"br",raw:p[0]}},I.del=function(c){var p=this.rules.inline.del.exec(c);if(p)return{type:"del",raw:p[0],text:p[2],tokens:this.lexer.inlineTokens(p[2])}},I.autolink=function(c,p){var g=this.rules.inline.autolink.exec(c);if(g){var b,l;return g[2]==="@"?(b=H(this.options.mangle?p(g[1]):g[1]),l="mailto:"+b):(b=H(g[1]),l=b),{type:"link",raw:g[0],text:b,href:l,tokens:[{type:"text",raw:b,text:b}]}}},I.url=function(c,p){var g;if(g=this.rules.inline.url.exec(c)){var b,l;if(g[2]==="@")b=H(this.options.mangle?p(g[0]):g[0]),l="mailto:"+b;else{var d;do d=g[0],g[0]=this.rules.inline._backpedal.exec(g[0])[0];while(d!==g[0]);b=H(g[0]),g[1]==="www."?l="http://"+g[0]:l=g[0]}return{type:"link",raw:g[0],text:b,href:l,tokens:[{type:"text",raw:b,text:b}]}}},I.inlineText=function(c,p){var g=this.rules.inline.text.exec(c);if(g){var b;return this.lexer.state.inRawBlock?b=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(g[0]):H(g[0]):g[0]:b=H(this.options.smartypants?p(g[0]):g[0]),{type:"text",raw:g[0],text:b}}},O}(),j={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:_,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};j._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,j._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,j.def=X(j.def).replace("label",j._label).replace("title",j._title).getRegex(),j.bullet=/(?:[*+-]|\d{1,9}[.)])/,j.listItemStart=X(/^( *)(bull) */).replace("bull",j.bullet).getRegex(),j.list=X(j.list).replace(/bull/g,j.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+j.def.source+")").getRegex(),j._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",j._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,j.html=X(j.html,"i").replace("comment",j._comment).replace("tag",j._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),j.paragraph=X(j._paragraph).replace("hr",j.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",j._tag).getRegex(),j.blockquote=X(j.blockquote).replace("paragraph",j.paragraph).getRegex(),j.normal=B({},j),j.gfm=B({},j.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),j.gfm.table=X(j.gfm.table).replace("hr",j.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",j._tag).getRegex(),j.gfm.paragraph=X(j._paragraph).replace("hr",j.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",j.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",j._tag).getRegex(),j.pedantic=B({},j.normal,{html:X(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",j._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X(j.normal._paragraph).replace("hr",j.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",j.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ee={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:_,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:_,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};ee._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ee.punctuation=X(ee.punctuation).replace(/punctuation/g,ee._punctuation).getRegex(),ee.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,ee.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,ee._comment=X(j._comment).replace("(?:-->|$)","-->").getRegex(),ee.emStrong.lDelim=X(ee.emStrong.lDelim).replace(/punct/g,ee._punctuation).getRegex(),ee.emStrong.rDelimAst=X(ee.emStrong.rDelimAst,"g").replace(/punct/g,ee._punctuation).getRegex(),ee.emStrong.rDelimUnd=X(ee.emStrong.rDelimUnd,"g").replace(/punct/g,ee._punctuation).getRegex(),ee._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ee._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ee._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,ee.autolink=X(ee.autolink).replace("scheme",ee._scheme).replace("email",ee._email).getRegex(),ee._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ee.tag=X(ee.tag).replace("comment",ee._comment).replace("attribute",ee._attribute).getRegex(),ee._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ee._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,ee._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ee.link=X(ee.link).replace("label",ee._label).replace("href",ee._href).replace("title",ee._title).getRegex(),ee.reflink=X(ee.reflink).replace("label",ee._label).replace("ref",j._label).getRegex(),ee.nolink=X(ee.nolink).replace("ref",j._label).getRegex(),ee.reflinkSearch=X(ee.reflinkSearch,"g").replace("reflink",ee.reflink).replace("nolink",ee.nolink).getRegex(),ee.normal=B({},ee),ee.pedantic=B({},ee.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:X(/^!?\[(label)\]\((.*?)\)/).replace("label",ee._label).getRegex(),reflink:X(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ee._label).getRegex()}),ee.gfm=B({},ee.normal,{escape:X(ee.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),ee.gfm.url=X(ee.gfm.url,"i").replace("email",ee.gfm._extended_email).getRegex(),ee.breaks=B({},ee.gfm,{br:X(ee.br).replace("{2,}","*").getRegex(),text:X(ee.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function Le(O){return O.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Ue(O){var I="",L,c,p=O.length;for(L=0;L<p;L++)c=O.charCodeAt(L),Math.random()>.5&&(c="x"+c.toString(16)),I+="&#"+c+";";return I}var st=function(){function O(L){this.tokens=[],this.tokens.links=Object.create(null),this.options=L||Ie.ce,this.options.tokenizer=this.options.tokenizer||new h,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var c={block:j.normal,inline:ee.normal};this.options.pedantic?(c.block=j.pedantic,c.inline=ee.pedantic):this.options.gfm&&(c.block=j.gfm,this.options.breaks?c.inline=ee.breaks:c.inline=ee.gfm),this.tokenizer.rules=c}O.lex=function(c,p){var g=new O(p);return g.lex(c)},O.lexInline=function(c,p){var g=new O(p);return g.inlineTokens(c)};var I=O.prototype;return I.lex=function(c){c=c.replace(/\r\n|\r/g,`
`),this.blockTokens(c,this.tokens);for(var p;p=this.inlineQueue.shift();)this.inlineTokens(p.src,p.tokens);return this.tokens},I.blockTokens=function(c,p){var g=this;p===void 0&&(p=[]),this.options.pedantic?c=c.replace(/\t/g," ").replace(/^ +$/gm,""):c=c.replace(/^( *)(\t+)/gm,function(w,N,D){return N+" ".repeat(D.length)});for(var b,l,d,x;c;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(w){return(b=w.call({lexer:g},c,p))?(c=c.substring(b.raw.length),p.push(b),!0):!1}))){if(b=this.tokenizer.space(c)){c=c.substring(b.raw.length),b.raw.length===1&&p.length>0?p[p.length-1].raw+=`
`:p.push(b);continue}if(b=this.tokenizer.code(c)){c=c.substring(b.raw.length),l=p[p.length-1],l&&(l.type==="paragraph"||l.type==="text")?(l.raw+=`
`+b.raw,l.text+=`
`+b.text,this.inlineQueue[this.inlineQueue.length-1].src=l.text):p.push(b);continue}if(b=this.tokenizer.fences(c)){c=c.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.heading(c)){c=c.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.hr(c)){c=c.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.blockquote(c)){c=c.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.list(c)){c=c.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.html(c)){c=c.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.def(c)){c=c.substring(b.raw.length),l=p[p.length-1],l&&(l.type==="paragraph"||l.type==="text")?(l.raw+=`
`+b.raw,l.text+=`
`+b.raw,this.inlineQueue[this.inlineQueue.length-1].src=l.text):this.tokens.links[b.tag]||(this.tokens.links[b.tag]={href:b.href,title:b.title});continue}if(b=this.tokenizer.table(c)){c=c.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.lheading(c)){c=c.substring(b.raw.length),p.push(b);continue}if(d=c,this.options.extensions&&this.options.extensions.startBlock&&function(){var w=1/0,N=c.slice(1),D=void 0;g.options.extensions.startBlock.forEach(function(C){D=C.call({lexer:this},N),typeof D=="number"&&D>=0&&(w=Math.min(w,D))}),w<1/0&&w>=0&&(d=c.substring(0,w+1))}(),this.state.top&&(b=this.tokenizer.paragraph(d))){l=p[p.length-1],x&&l.type==="paragraph"?(l.raw+=`
`+b.raw,l.text+=`
`+b.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=l.text):p.push(b),x=d.length!==c.length,c=c.substring(b.raw.length);continue}if(b=this.tokenizer.text(c)){c=c.substring(b.raw.length),l=p[p.length-1],l&&l.type==="text"?(l.raw+=`
`+b.raw,l.text+=`
`+b.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=l.text):p.push(b);continue}if(c){var m="Infinite loop on byte: "+c.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return this.state.top=!0,p},I.inline=function(c,p){return p===void 0&&(p=[]),this.inlineQueue.push({src:c,tokens:p}),p},I.inlineTokens=function(c,p){var g=this;p===void 0&&(p=[]);var b,l,d,x=c,m,w,N;if(this.tokens.links){var D=Object.keys(this.tokens.links);if(D.length>0)for(;(m=this.tokenizer.rules.inline.reflinkSearch.exec(x))!=null;)D.includes(m[0].slice(m[0].lastIndexOf("[")+1,-1))&&(x=x.slice(0,m.index)+"["+at("a",m[0].length-2)+"]"+x.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(m=this.tokenizer.rules.inline.blockSkip.exec(x))!=null;)x=x.slice(0,m.index)+"["+at("a",m[0].length-2)+"]"+x.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(m=this.tokenizer.rules.inline.escapedEmSt.exec(x))!=null;)x=x.slice(0,m.index+m[0].length-2)+"++"+x.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;c;)if(w||(N=""),w=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(S){return(b=S.call({lexer:g},c,p))?(c=c.substring(b.raw.length),p.push(b),!0):!1}))){if(b=this.tokenizer.escape(c)){c=c.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.tag(c)){c=c.substring(b.raw.length),l=p[p.length-1],l&&b.type==="text"&&l.type==="text"?(l.raw+=b.raw,l.text+=b.text):p.push(b);continue}if(b=this.tokenizer.link(c)){c=c.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.reflink(c,this.tokens.links)){c=c.substring(b.raw.length),l=p[p.length-1],l&&b.type==="text"&&l.type==="text"?(l.raw+=b.raw,l.text+=b.text):p.push(b);continue}if(b=this.tokenizer.emStrong(c,x,N)){c=c.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.codespan(c)){c=c.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.br(c)){c=c.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.del(c)){c=c.substring(b.raw.length),p.push(b);continue}if(b=this.tokenizer.autolink(c,Ue)){c=c.substring(b.raw.length),p.push(b);continue}if(!this.state.inLink&&(b=this.tokenizer.url(c,Ue))){c=c.substring(b.raw.length),p.push(b);continue}if(d=c,this.options.extensions&&this.options.extensions.startInline&&function(){var S=1/0,ie=c.slice(1),he=void 0;g.options.extensions.startInline.forEach(function(be){he=be.call({lexer:this},ie),typeof he=="number"&&he>=0&&(S=Math.min(S,he))}),S<1/0&&S>=0&&(d=c.substring(0,S+1))}(),b=this.tokenizer.inlineText(d,Le)){c=c.substring(b.raw.length),b.raw.slice(-1)!=="_"&&(N=b.raw.slice(-1)),w=!0,l=p[p.length-1],l&&l.type==="text"?(l.raw+=b.raw,l.text+=b.text):p.push(b);continue}if(c){var C="Infinite loop on byte: "+c.charCodeAt(0);if(this.options.silent){console.error(C);break}else throw new Error(C)}}return p},Q(O,null,[{key:"rules",get:function(){return{block:j,inline:ee}}}]),O}(),nt=function(){function O(L){this.options=L||Ie.ce}var I=O.prototype;return I.code=function(c,p,g){var b=(p||"").match(/\S*/)[0];if(this.options.highlight){var l=this.options.highlight(c,b);l!=null&&l!==c&&(g=!0,c=l)}return c=c.replace(/\n$/,"")+`
`,b?'<pre><code class="'+this.options.langPrefix+H(b)+'">'+(g?c:H(c,!0))+`</code></pre>
`:"<pre><code>"+(g?c:H(c,!0))+`</code></pre>
`},I.blockquote=function(c){return`<blockquote>
`+c+`</blockquote>
`},I.html=function(c){return c},I.heading=function(c,p,g,b){if(this.options.headerIds){var l=this.options.headerPrefix+b.slug(g);return"<h"+p+' id="'+l+'">'+c+"</h"+p+`>
`}return"<h"+p+">"+c+"</h"+p+`>
`},I.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},I.list=function(c,p,g){var b=p?"ol":"ul",l=p&&g!==1?' start="'+g+'"':"";return"<"+b+l+`>
`+c+"</"+b+`>
`},I.listitem=function(c){return"<li>"+c+`</li>
`},I.checkbox=function(c){return"<input "+(c?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},I.paragraph=function(c){return"<p>"+c+`</p>
`},I.table=function(c,p){return p&&(p="<tbody>"+p+"</tbody>"),`<table>
<thead>
`+c+`</thead>
`+p+`</table>
`},I.tablerow=function(c){return`<tr>
`+c+`</tr>
`},I.tablecell=function(c,p){var g=p.header?"th":"td",b=p.align?"<"+g+' align="'+p.align+'">':"<"+g+">";return b+c+("</"+g+`>
`)},I.strong=function(c){return"<strong>"+c+"</strong>"},I.em=function(c){return"<em>"+c+"</em>"},I.codespan=function(c){return"<code>"+c+"</code>"},I.br=function(){return this.options.xhtml?"<br/>":"<br>"},I.del=function(c){return"<del>"+c+"</del>"},I.link=function(c,p,g){if(c=ge(this.options.sanitize,this.options.baseUrl,c),c===null)return g;var b='<a href="'+c+'"';return p&&(b+=' title="'+p+'"'),b+=">"+g+"</a>",b},I.image=function(c,p,g){if(c=ge(this.options.sanitize,this.options.baseUrl,c),c===null)return g;var b='<img src="'+c+'" alt="'+g+'"';return p&&(b+=' title="'+p+'"'),b+=this.options.xhtml?"/>":">",b},I.text=function(c){return c},O}(),Xe=function(){function O(){}var I=O.prototype;return I.strong=function(c){return c},I.em=function(c){return c},I.codespan=function(c){return c},I.del=function(c){return c},I.html=function(c){return c},I.text=function(c){return c},I.link=function(c,p,g){return""+g},I.image=function(c,p,g){return""+g},I.br=function(){return""},O}(),ft=function(){function O(){this.seen={}}var I=O.prototype;return I.serialize=function(c){return c.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},I.getNextSafeSlug=function(c,p){var g=c,b=0;if(this.seen.hasOwnProperty(g)){b=this.seen[c];do b++,g=c+"-"+b;while(this.seen.hasOwnProperty(g))}return p||(this.seen[c]=b,this.seen[g]=0),g},I.slug=function(c,p){p===void 0&&(p={});var g=this.serialize(c);return this.getNextSafeSlug(g,p.dryrun)},O}(),_e=function(){function O(L){this.options=L||Ie.ce,this.options.renderer=this.options.renderer||new nt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Xe,this.slugger=new ft}O.parse=function(c,p){var g=new O(p);return g.parse(c)},O.parseInline=function(c,p){var g=new O(p);return g.parseInline(c)};var I=O.prototype;return I.parse=function(c,p){p===void 0&&(p=!0);var g="",b,l,d,x,m,w,N,D,C,S,ie,he,be,De,me,Re,Pe,Ne,We,Ze=c.length;for(b=0;b<Ze;b++){if(S=c[b],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[S.type]&&(We=this.options.extensions.renderers[S.type].call({parser:this},S),We!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(S.type))){g+=We||"";continue}switch(S.type){case"space":continue;case"hr":{g+=this.renderer.hr();continue}case"heading":{g+=this.renderer.heading(this.parseInline(S.tokens),S.depth,q(this.parseInline(S.tokens,this.textRenderer)),this.slugger);continue}case"code":{g+=this.renderer.code(S.text,S.lang,S.escaped);continue}case"table":{for(D="",N="",x=S.header.length,l=0;l<x;l++)N+=this.renderer.tablecell(this.parseInline(S.header[l].tokens),{header:!0,align:S.align[l]});for(D+=this.renderer.tablerow(N),C="",x=S.rows.length,l=0;l<x;l++){for(w=S.rows[l],N="",m=w.length,d=0;d<m;d++)N+=this.renderer.tablecell(this.parseInline(w[d].tokens),{header:!1,align:S.align[d]});C+=this.renderer.tablerow(N)}g+=this.renderer.table(D,C);continue}case"blockquote":{C=this.parse(S.tokens),g+=this.renderer.blockquote(C);continue}case"list":{for(ie=S.ordered,he=S.start,be=S.loose,x=S.items.length,C="",l=0;l<x;l++)me=S.items[l],Re=me.checked,Pe=me.task,De="",me.task&&(Ne=this.renderer.checkbox(Re),be?me.tokens.length>0&&me.tokens[0].type==="paragraph"?(me.tokens[0].text=Ne+" "+me.tokens[0].text,me.tokens[0].tokens&&me.tokens[0].tokens.length>0&&me.tokens[0].tokens[0].type==="text"&&(me.tokens[0].tokens[0].text=Ne+" "+me.tokens[0].tokens[0].text)):me.tokens.unshift({type:"text",text:Ne}):De+=Ne),De+=this.parse(me.tokens,be),C+=this.renderer.listitem(De,Pe,Re);g+=this.renderer.list(C,ie,he);continue}case"html":{g+=this.renderer.html(S.text);continue}case"paragraph":{g+=this.renderer.paragraph(this.parseInline(S.tokens));continue}case"text":{for(C=S.tokens?this.parseInline(S.tokens):S.text;b+1<Ze&&c[b+1].type==="text";)S=c[++b],C+=`
`+(S.tokens?this.parseInline(S.tokens):S.text);g+=p?this.renderer.paragraph(C):C;continue}default:{var Je='Token with "'+S.type+'" type was not found.';if(this.options.silent){console.error(Je);return}else throw new Error(Je)}}}return g},I.parseInline=function(c,p){p=p||this.renderer;var g="",b,l,d,x=c.length;for(b=0;b<x;b++){if(l=c[b],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[l.type]&&(d=this.options.extensions.renderers[l.type].call({parser:this},l),d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type))){g+=d||"";continue}switch(l.type){case"escape":{g+=p.text(l.text);break}case"html":{g+=p.html(l.text);break}case"link":{g+=p.link(l.href,l.title,this.parseInline(l.tokens,p));break}case"image":{g+=p.image(l.href,l.title,l.text);break}case"strong":{g+=p.strong(this.parseInline(l.tokens,p));break}case"em":{g+=p.em(this.parseInline(l.tokens,p));break}case"codespan":{g+=p.codespan(l.text);break}case"br":{g+=p.br();break}case"del":{g+=p.del(this.parseInline(l.tokens,p));break}case"text":{g+=p.text(l.text);break}default:{var m='Token with "'+l.type+'" type was not found.';if(this.options.silent){console.error(m);return}else throw new Error(m)}}}return g},O}(),je=function(){function O(L){this.options=L||Ie.ce}var I=O.prototype;return I.preprocess=function(c){return c},I.postprocess=function(c){return c},O}();je.passThroughHooks=new Set(["preprocess","postprocess"]);function At(O,I,L){return function(c){if(c.message+=`
Please report this to https://github.com/markedjs/marked.`,O){var p="<p>An error occurred:</p><pre>"+H(c.message+"",!0)+"</pre>";if(I)return Promise.resolve(p);if(L){L(null,p);return}return p}if(I)return Promise.reject(c);if(L){L(c);return}throw c}}function qt(O,I){return function(L,c,p){typeof c=="function"&&(p=c,c=null);var g=B({},c);c=B({},se.defaults,g);var b=At(c.silent,c.async,p);if(typeof L=="undefined"||L===null)return b(new Error("marked(): input parameter is undefined or null"));if(typeof L!="string")return b(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(L)+", string expected"));if(Qe(c),c.hooks&&(c.hooks.options=c),p){var l=c.highlight,d;try{c.hooks&&(L=c.hooks.preprocess(L)),d=O(L,c)}catch(D){return b(D)}var x=function(C){var S;if(!C)try{c.walkTokens&&se.walkTokens(d,c.walkTokens),S=I(d,c),c.hooks&&(S=c.hooks.postprocess(S))}catch(ie){C=ie}return c.highlight=l,C?b(C):p(null,S)};if(!l||l.length<3||(delete c.highlight,!d.length))return x();var m=0;se.walkTokens(d,function(D){D.type==="code"&&(m++,setTimeout(function(){l(D.text,D.lang,function(C,S){if(C)return x(C);S!=null&&S!==D.text&&(D.text=S,D.escaped=!0),m--,m===0&&x()})},0))}),m===0&&x();return}if(c.async)return Promise.resolve(c.hooks?c.hooks.preprocess(L):L).then(function(D){return O(D,c)}).then(function(D){return c.walkTokens?Promise.all(se.walkTokens(D,c.walkTokens)).then(function(){return D}):D}).then(function(D){return I(D,c)}).then(function(D){return c.hooks?c.hooks.postprocess(D):D}).catch(b);try{c.hooks&&(L=c.hooks.preprocess(L));var w=O(L,c);c.walkTokens&&se.walkTokens(w,c.walkTokens);var N=I(w,c);return c.hooks&&(N=c.hooks.postprocess(N)),N}catch(D){return b(D)}}}function se(O,I,L){return qt(st.lex,_e.parse)(O,I,L)}se.options=se.setOptions=function(O){return se.defaults=B({},se.defaults,O),K(se.defaults),se},se.getDefaults=V,se.defaults=Ie.ce,se.use=function(){for(var O=se.defaults.extensions||{renderers:{},childTokens:{}},I=arguments.length,L=new Array(I),c=0;c<I;c++)L[c]=arguments[c];L.forEach(function(p){var g=B({},p);if(g.async=se.defaults.async||g.async||!1,p.extensions&&(p.extensions.forEach(function(l){if(!l.name)throw new Error("extension name required");if(l.renderer){var d=O.renderers[l.name];d?O.renderers[l.name]=function(){for(var x=arguments.length,m=new Array(x),w=0;w<x;w++)m[w]=arguments[w];var N=l.renderer.apply(this,m);return N===!1&&(N=d.apply(this,m)),N}:O.renderers[l.name]=l.renderer}if(l.tokenizer){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");O[l.level]?O[l.level].unshift(l.tokenizer):O[l.level]=[l.tokenizer],l.start&&(l.level==="block"?O.startBlock?O.startBlock.push(l.start):O.startBlock=[l.start]:l.level==="inline"&&(O.startInline?O.startInline.push(l.start):O.startInline=[l.start]))}l.childTokens&&(O.childTokens[l.name]=l.childTokens)}),g.extensions=O),p.renderer&&function(){var l=se.defaults.renderer||new nt,d=function(w){var N=l[w];l[w]=function(){for(var D=arguments.length,C=new Array(D),S=0;S<D;S++)C[S]=arguments[S];var ie=p.renderer[w].apply(l,C);return ie===!1&&(ie=N.apply(l,C)),ie}};for(var x in p.renderer)d(x);g.renderer=l}(),p.tokenizer&&function(){var l=se.defaults.tokenizer||new h,d=function(w){var N=l[w];l[w]=function(){for(var D=arguments.length,C=new Array(D),S=0;S<D;S++)C[S]=arguments[S];var ie=p.tokenizer[w].apply(l,C);return ie===!1&&(ie=N.apply(l,C)),ie}};for(var x in p.tokenizer)d(x);g.tokenizer=l}(),p.hooks&&function(){var l=se.defaults.hooks||new je,d=function(w){var N=l[w];je.passThroughHooks.has(w)?l[w]=function(D){if(se.defaults.async)return Promise.resolve(p.hooks[w].call(l,D)).then(function(S){return N.call(l,S)});var C=p.hooks[w].call(l,D);return N.call(l,C)}:l[w]=function(){for(var D=arguments.length,C=new Array(D),S=0;S<D;S++)C[S]=arguments[S];var ie=p.hooks[w].apply(l,C);return ie===!1&&(ie=N.apply(l,C)),ie}};for(var x in p.hooks)d(x);g.hooks=l}(),p.walkTokens){var b=se.defaults.walkTokens;g.walkTokens=function(l){var d=[];return d.push(p.walkTokens.call(this,l)),b&&(d=d.concat(b.call(this,l))),d}}se.setOptions(g)})},se.walkTokens=function(O,I){for(var L=[],c=function(){var l=g.value;switch(L=L.concat(I.call(se,l)),l.type){case"table":{for(var d=F(l.header),x;!(x=d()).done;){var m=x.value;L=L.concat(se.walkTokens(m.tokens,I))}for(var w=F(l.rows),N;!(N=w()).done;)for(var D=N.value,C=F(D),S;!(S=C()).done;){var ie=S.value;L=L.concat(se.walkTokens(ie.tokens,I))}break}case"list":{L=L.concat(se.walkTokens(l.items,I));break}default:se.defaults.extensions&&se.defaults.extensions.childTokens&&se.defaults.extensions.childTokens[l.type]?se.defaults.extensions.childTokens[l.type].forEach(function(he){L=L.concat(se.walkTokens(l[he],I))}):l.tokens&&(L=L.concat(se.walkTokens(l.tokens,I)))}},p=F(O),g;!(g=p()).done;)c();return L},se.parseInline=qt(st.lexInline,_e.parseInline),se.Parser=_e,se.parser=_e.parse,se.Renderer=nt,se.TextRenderer=Xe,se.Lexer=st,se.lexer=st.lex,se.Tokenizer=h,se.Slugger=ft,se.Hooks=je,se.parse=se;var Et=se.options,Lt=se.setOptions,Ut=se.use,ht=se.walkTokens,Rt=se.parseInline,ze=se,kt=_e.parse,Br=st.lex;ye=je,ye=st,ye=_e,ye=nt,ye=ft,ye=Xe,ye=h,ye=V,ye=Br,Ie.TU=se,ye=Et,ye=ze,ye=Rt,ye=kt,ye=Lt,ye=Ut,ye=ht}}]);