98 lines
323 KiB
JavaScript
98 lines
323 KiB
JavaScript
(self.webpackChunkgitea=self.webpackChunkgitea||[]).push([["easymde"],{"./node_modules/codemirror-spell-checker/src/js/spell-checker.js":function(ht,We,be){"use strict";var q=be("./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(_){if(!Q.aff_loading){Q.aff_loading=!0;var w=new XMLHttpRequest;w.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),w.onload=function(){w.readyState===4&&w.status===200&&(Q.aff_data=w.responseText,Q.num_loaded++,Q.num_loaded==2&&(Q.typo=new q("en_US",Q.aff_data,Q.dic_data,{platform:"any"})))},w.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 q("en_US",Q.aff_data,Q.dic_data,{platform:"any"})))},F.send(null)}var T='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',Y={token:function(G){var j=G.peek(),ue="";if(T.includes(j))return G.next(),null;for(;(j=G.peek())!=null&&!T.includes(j);)ue+=j,G.next();return Q.typo&&!Q.typo.check(ue)?"spell-error":null}},ee=B.codeMirrorInstance.getMode(_,_.backdrop||"text/plain");return B.codeMirrorInstance.overlayMode(ee,Y,!0)})}Q.num_loaded=0,Q.aff_loading=!1,Q.dic_loading=!1,Q.aff_data="",Q.dic_data="",Q.typo,ht.exports=Q},"./node_modules/codemirror/addon/display/autorefresh.js":function(ht,We,be){(function(q){q(be("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";q.defineOption("autoRefresh",!1,function(_,w){_.state.autoRefresh&&(B(_,_.state.autoRefresh),_.state.autoRefresh=null),w&&_.display.wrapper.offsetHeight==0&&Q(_,_.state.autoRefresh={delay:w.delay||250})});function Q(_,w){function F(){_.display.wrapper.offsetHeight?(B(_,w),_.display.lastWrapHeight!=_.display.wrapper.clientHeight&&_.refresh()):w.timeout=setTimeout(F,w.delay)}w.timeout=setTimeout(F,w.delay),w.hurry=function(){clearTimeout(w.timeout),w.timeout=setTimeout(F,50)},q.on(window,"mouseup",w.hurry),q.on(window,"keyup",w.hurry)}function B(_,w){clearTimeout(w.timeout),q.off(window,"mouseup",w.hurry),q.off(window,"keyup",w.hurry)}})},"./node_modules/codemirror/addon/display/fullscreen.js":function(ht,We,be){(function(q){q(be("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";q.defineOption("fullScreen",!1,function(_,w,F){F==q.Init&&(F=!1),!F!=!w&&(w?Q(_):B(_))});function Q(_){var w=_.getWrapperElement();_.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:w.style.width,height:w.style.height},w.style.width="",w.style.height="auto",w.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",_.refresh()}function B(_){var w=_.getWrapperElement();w.className=w.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var F=_.state.fullScreenRestore;w.style.width=F.width,w.style.height=F.height,window.scrollTo(F.scrollLeft,F.scrollTop),_.refresh()}})},"./node_modules/codemirror/addon/display/placeholder.js":function(ht,We,be){(function(q){q(be("./node_modules/codemirror/lib/codemirror.js"))})(function(q){q.defineOption("placeholder","",function(Y,ee,G){var j=G&&G!=q.Init;if(ee&&!j)Y.on("blur",w),Y.on("change",F),Y.on("swapDoc",F),q.on(Y.getInputField(),"compositionupdate",Y.state.placeholderCompose=function(){_(Y)}),F(Y);else if(!ee&&j){Y.off("blur",w),Y.off("change",F),Y.off("swapDoc",F),q.off(Y.getInputField(),"compositionupdate",Y.state.placeholderCompose),Q(Y);var ue=Y.getWrapperElement();ue.className=ue.className.replace(" CodeMirror-empty","")}ee&&!Y.hasFocus()&&w(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 ee=Y.state.placeholder=document.createElement("pre");ee.style.cssText="height: 0; overflow: visible",ee.style.direction=Y.getOption("direction"),ee.className="CodeMirror-placeholder CodeMirror-line-like";var G=Y.getOption("placeholder");typeof G=="string"&&(G=document.createTextNode(G)),ee.appendChild(G),Y.display.lineSpace.insertBefore(ee,Y.display.lineSpace.firstChild)}function _(Y){setTimeout(function(){var ee=!1;if(Y.lineCount()==1){var G=Y.getInputField();ee=G.nodeName=="TEXTAREA"?!Y.getLine(0).length:!/[^\u200b]/.test(G.querySelector(".CodeMirror-line").textContent)}ee?B(Y):Q(Y)},20)}function w(Y){T(Y)&&B(Y)}function F(Y){var ee=Y.getWrapperElement(),G=T(Y);ee.className=ee.className.replace(" CodeMirror-empty","")+(G?" CodeMirror-empty":""),G?B(Y):Q(Y)}function T(Y){return Y.lineCount()===1&&Y.getLine(0)===""}})},"./node_modules/codemirror/addon/edit/continuelist.js":function(ht,We,be){(function(q){q(be("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";var Q=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,B=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,_=/[*+-]\s/;q.commands.newlineAndIndentContinueMarkdownList=function(F){if(F.getOption("disableInput"))return q.Pass;for(var T=F.listSelections(),Y=[],ee=0;ee<T.length;ee++){var G=T[ee].head,j=F.getStateAfter(G.line),ue=q.innerMode(F.getMode(),j);if(ue.mode.name!=="markdown"&&ue.mode.helperType!=="markdown"){F.execCommand("newlineAndIndent");return}else j=ue.state;var se=j.list!==!1,pe=j.quote!==0,me=F.getLine(G.line),Ce=Q.exec(me),P=/^\s*$/.test(me.slice(0,G.ch));if(!T[ee].empty()||!se&&!pe||!Ce||P){F.execCommand("newlineAndIndent");return}if(B.test(me)){var I=pe&&/>\s*$/.test(me),V=!/>\s*$/.test(me);(I||V)&&F.replaceRange("",{line:G.line,ch:0},{line:G.line,ch:G.ch+1}),Y[ee]=`
|
|
`}else{var re=Ce[1],J=Ce[5],le=!(_.test(Ce[2])||Ce[2].indexOf(">")>=0),fe=le?parseInt(Ce[3],10)+1+Ce[4]:Ce[2].replace("x"," ");Y[ee]=`
|
|
`+re+fe+J,le&&w(F,G)}}F.replaceSelections(Y)};function w(F,T){var Y=T.line,ee=0,G=0,j=Q.exec(F.getLine(Y)),ue=j[1];do{ee+=1;var se=Y+ee,pe=F.getLine(se),me=Q.exec(pe);if(me){var Ce=me[1],P=parseInt(j[3],10)+ee-G,I=parseInt(me[3],10),V=I;if(ue===Ce&&!isNaN(I))P===I&&(V=I+1),P>I&&(V=P+1),F.replaceRange(pe.replace(Q,Ce+V+me[4]+me[5]),{line:se,ch:0},{line:se,ch:pe.length});else{if(ue.length>Ce.length||ue.length<Ce.length&&ee===1)return;G+=1}}}while(me)}})},"./node_modules/codemirror/addon/mode/overlay.js":function(ht,We,be){(function(q){q(be("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";q.overlayMode=function(Q,B,_){return{startState:function(){return{base:q.startState(Q),overlay:q.startState(B),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(w){return{base:q.copyState(Q,w.base),overlay:q.copyState(B,w.overlay),basePos:w.basePos,baseCur:null,overlayPos:w.overlayPos,overlayCur:null}},token:function(w,F){return(w!=F.streamSeen||Math.min(F.basePos,F.overlayPos)<w.start)&&(F.streamSeen=w,F.basePos=F.overlayPos=w.start),w.start==F.basePos&&(F.baseCur=Q.token(w,F.base),F.basePos=w.pos),w.start==F.overlayPos&&(w.pos=w.start,F.overlayCur=B.token(w,F.overlay),F.overlayPos=w.pos),w.pos=Math.min(F.basePos,F.overlayPos),F.overlayCur==null?F.baseCur:F.baseCur!=null&&F.overlay.combineTokens||_&&F.overlay.combineTokens==null?F.baseCur+" "+F.overlayCur:F.overlayCur},indent:Q.indent&&function(w,F,T){return Q.indent(w.base,F,T)},electricChars:Q.electricChars,innerMode:function(w){return{state:w.base,mode:Q}},blankLine:function(w){var F,T;return Q.blankLine&&(F=Q.blankLine(w.base)),B.blankLine&&(T=B.blankLine(w.overlay)),T==null?F:_&&F!=null?F+" "+T:T}}}})},"./node_modules/codemirror/addon/search/searchcursor.js":function(ht,We,be){(function(q){q(be("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";var Q=q.Pos;function B(P){var I=P.flags;return I!=null?I:(P.ignoreCase?"i":"")+(P.global?"g":"")+(P.multiline?"m":"")}function _(P,I){for(var V=B(P),re=V,J=0;J<I.length;J++)re.indexOf(I.charAt(J))==-1&&(re+=I.charAt(J));return V==re?P:new RegExp(P.source,re)}function w(P){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(P.source)}function F(P,I,V){I=_(I,"g");for(var re=V.line,J=V.ch,le=P.lastLine();re<=le;re++,J=0){I.lastIndex=J;var fe=P.getLine(re),ae=I.exec(fe);if(ae)return{from:Q(re,ae.index),to:Q(re,ae.index+ae[0].length),match:ae}}}function T(P,I,V){if(!w(I))return F(P,I,V);I=_(I,"gm");for(var re,J=1,le=V.line,fe=P.lastLine();le<=fe;){for(var ae=0;ae<J&&!(le>fe);ae++){var Re=P.getLine(le++);re=re==null?Re:re+`
|
|
`+Re}J=J*2,I.lastIndex=V.ch;var ne=I.exec(re);if(ne){var Me=re.slice(0,ne.index).split(`
|
|
`),Z=ne[0].split(`
|
|
`),je=V.line+Me.length-1,z=Me[Me.length-1].length;return{from:Q(je,z),to:Q(je+Z.length-1,Z.length==1?z+Z[0].length:Z[Z.length-1].length),match:ne}}}}function Y(P,I,V){for(var re,J=0;J<=P.length;){I.lastIndex=J;var le=I.exec(P);if(!le)break;var fe=le.index+le[0].length;if(fe>P.length-V)break;(!re||fe>re.index+re[0].length)&&(re=le),J=le.index+1}return re}function ee(P,I,V){I=_(I,"g");for(var re=V.line,J=V.ch,le=P.firstLine();re>=le;re--,J=-1){var fe=P.getLine(re),ae=Y(fe,I,J<0?0:fe.length-J);if(ae)return{from:Q(re,ae.index),to:Q(re,ae.index+ae[0].length),match:ae}}}function G(P,I,V){if(!w(I))return ee(P,I,V);I=_(I,"gm");for(var re,J=1,le=P.getLine(V.line).length-V.ch,fe=V.line,ae=P.firstLine();fe>=ae;){for(var Re=0;Re<J&&fe>=ae;Re++){var ne=P.getLine(fe--);re=re==null?ne:ne+`
|
|
`+re}J*=2;var Me=Y(re,I,le);if(Me){var Z=re.slice(0,Me.index).split(`
|
|
`),je=Me[0].split(`
|
|
`),z=fe+Z.length,oe=Z[Z.length-1].length;return{from:Q(z,oe),to:Q(z+je.length-1,je.length==1?oe+je[0].length:je[je.length-1].length),match:Me}}}}var j,ue;String.prototype.normalize?(j=function(P){return P.normalize("NFD").toLowerCase()},ue=function(P){return P.normalize("NFD")}):(j=function(P){return P.toLowerCase()},ue=function(P){return P});function se(P,I,V,re){if(P.length==I.length)return V;for(var J=0,le=V+Math.max(0,P.length-I.length);;){if(J==le)return J;var fe=J+le>>1,ae=re(P.slice(0,fe)).length;if(ae==V)return fe;ae>V?le=fe:J=fe+1}}function pe(P,I,V,re){if(!I.length)return null;var J=re?j:ue,le=J(I).split(/\r|\n\r?/);e:for(var fe=V.line,ae=V.ch,Re=P.lastLine()+1-le.length;fe<=Re;fe++,ae=0){var ne=P.getLine(fe).slice(ae),Me=J(ne);if(le.length==1){var Z=Me.indexOf(le[0]);if(Z==-1)continue e;var V=se(ne,Me,Z,J)+ae;return{from:Q(fe,se(ne,Me,Z,J)+ae),to:Q(fe,se(ne,Me,Z+le[0].length,J)+ae)}}else{var je=Me.length-le[0].length;if(Me.slice(je)!=le[0])continue e;for(var z=1;z<le.length-1;z++)if(J(P.getLine(fe+z))!=le[z])continue e;var oe=P.getLine(fe+le.length-1),$=J(oe),ke=le[le.length-1];if($.slice(0,ke.length)!=ke)continue e;return{from:Q(fe,se(ne,Me,je,J)+ae),to:Q(fe+le.length-1,se(oe,$,ke.length,J))}}}}function me(P,I,V,re){if(!I.length)return null;var J=re?j:ue,le=J(I).split(/\r|\n\r?/);e:for(var fe=V.line,ae=V.ch,Re=P.firstLine()-1+le.length;fe>=Re;fe--,ae=-1){var ne=P.getLine(fe);ae>-1&&(ne=ne.slice(0,ae));var Me=J(ne);if(le.length==1){var Z=Me.lastIndexOf(le[0]);if(Z==-1)continue e;return{from:Q(fe,se(ne,Me,Z,J)),to:Q(fe,se(ne,Me,Z+le[0].length,J))}}else{var je=le[le.length-1];if(Me.slice(0,je.length)!=je)continue e;for(var z=1,V=fe-le.length+1;z<le.length-1;z++)if(J(P.getLine(V+z))!=le[z])continue e;var oe=P.getLine(fe+1-le.length),$=J(oe);if($.slice($.length-le[0].length)!=le[0])continue e;return{from:Q(fe+1-le.length,se(oe,$,oe.length-le[0].length,J)),to:Q(fe,se(ne,Me,je.length,J))}}}}function Ce(P,I,V,re){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=P,V=V?P.clipPos(V):Q(0,0),this.pos={from:V,to:V};var J;typeof re=="object"?J=re.caseFold:(J=re,re=null),typeof I=="string"?(J==null&&(J=!1),this.matches=function(le,fe){return(le?me:pe)(P,I,fe,J)}):(I=_(I,"gm"),!re||re.multiline!==!1?this.matches=function(le,fe){return(le?G:T)(P,I,fe)}:this.matches=function(le,fe){return(le?ee:F)(P,I,fe)})}Ce.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(P){var I=this.doc.clipPos(P?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(I=Q(I.line,I.ch),P?(I.ch--,I.ch<0&&(I.line--,I.ch=(this.doc.getLine(I.line)||"").length)):(I.ch++,I.ch>(this.doc.getLine(I.line)||"").length&&(I.ch=0,I.line++)),q.cmpPos(I,this.doc.clipPos(I))!=0))return this.atOccurrence=!1;var V=this.matches(P,I);if(this.afterEmptyMatch=V&&q.cmpPos(V.from,V.to)==0,V)return this.pos=V,this.atOccurrence=!0,this.pos.match||!0;var re=Q(P?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:re,to:re},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(P,I){if(!!this.atOccurrence){var V=q.splitLines(P);this.doc.replaceRange(V,this.pos.from,this.pos.to,I),this.pos.to=Q(this.pos.from.line+V.length-1,V[V.length-1].length+(V.length==1?this.pos.from.ch:0))}}},q.defineExtension("getSearchCursor",function(P,I,V){return new Ce(this.doc,P,I,V)}),q.defineDocExtension("getSearchCursor",function(P,I,V){return new Ce(this,P,I,V)}),q.defineExtension("selectMatches",function(P,I){for(var V=[],re=this.getSearchCursor(P,this.getCursor("from"),I);re.findNext()&&!(q.cmpPos(re.to(),this.getCursor("to"))>0);)V.push({anchor:re.from(),head:re.to()});V.length&&this.setSelections(V,0)})})},"./node_modules/codemirror/addon/selection/mark-selection.js":function(ht,We,be){(function(q){q(be("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";q.defineOption("styleSelectedText",!1,function(j,ue,se){var pe=se&&se!=q.Init;ue&&!pe?(j.state.markedSelection=[],j.state.markedSelectionStyle=typeof ue=="string"?ue:"CodeMirror-selectedtext",ee(j),j.on("cursorActivity",Q),j.on("change",B)):!ue&&pe&&(j.off("cursorActivity",Q),j.off("change",B),Y(j),j.state.markedSelection=j.state.markedSelectionStyle=null)});function Q(j){j.state.markedSelection&&j.operation(function(){G(j)})}function B(j){j.state.markedSelection&&j.state.markedSelection.length&&j.operation(function(){Y(j)})}var _=8,w=q.Pos,F=q.cmpPos;function T(j,ue,se,pe){if(F(ue,se)!=0)for(var me=j.state.markedSelection,Ce=j.state.markedSelectionStyle,P=ue.line;;){var I=P==ue.line?ue:w(P,0),V=P+_,re=V>=se.line,J=re?se:w(V,0),le=j.markText(I,J,{className:Ce});if(pe==null?me.push(le):me.splice(pe++,0,le),re)break;P=V}}function Y(j){for(var ue=j.state.markedSelection,se=0;se<ue.length;++se)ue[se].clear();ue.length=0}function ee(j){Y(j);for(var ue=j.listSelections(),se=0;se<ue.length;se++)T(j,ue[se].from(),ue[se].to())}function G(j){if(!j.somethingSelected())return Y(j);if(j.listSelections().length>1)return ee(j);var ue=j.getCursor("start"),se=j.getCursor("end"),pe=j.state.markedSelection;if(!pe.length)return T(j,ue,se);var me=pe[0].find(),Ce=pe[pe.length-1].find();if(!me||!Ce||se.line-ue.line<=_||F(ue,Ce.to)>=0||F(se,me.from)<=0)return ee(j);for(;F(ue,me.from)>0;)pe.shift().clear(),me=pe[0].find();for(F(ue,me.from)<0&&(me.to.line-ue.line<_?(pe.shift().clear(),T(j,ue,me.to,0)):T(j,ue,me.from,0));F(se,Ce.to)<0;)pe.pop().clear(),Ce=pe[pe.length-1].find();F(se,Ce.to)>0&&(se.line-Ce.from.line<_?(pe.pop().clear(),T(j,Ce.from,se)):T(j,Ce.to,se))}})},"./node_modules/codemirror/lib/codemirror.js":function(ht){(function(We,be){ht.exports=be()})(this,function(){"use strict";var We=navigator.userAgent,be=navigator.platform,q=/gecko\/\d/i.test(We),Q=/MSIE \d/.test(We),B=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(We),_=/Edge\/(\d+)/.exec(We),w=Q||B||_,F=w&&(Q?document.documentMode||6:+(_||B)[1]),T=!_&&/WebKit\//.test(We),Y=T&&/Qt\/\d+\.\d+/.test(We),ee=!_&&/Chrome\/(\d+)/.exec(We),G=ee&&+ee[1],j=/Opera\//.test(We),ue=/Apple Computer/.test(navigator.vendor),se=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(We),pe=/PhantomJS/.test(We),me=ue&&(/Mobile\/\w+/.test(We)||navigator.maxTouchPoints>2),Ce=/Android/.test(We),P=me||Ce||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(We),I=me||/Mac/.test(be),V=/\bCrOS\b/.test(We),re=/win/i.test(be),J=j&&We.match(/Version\/(\d*\.\d*)/);J&&(J=Number(J[1])),J&&J>=15&&(j=!1,T=!0);var le=I&&(Y||j&&(J==null||J<12.11)),fe=q||w&&F>=9;function ae(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Re=function(e,t){var i=e.className,r=ae(t).exec(i);if(r){var n=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(n?r[1]+n:"")}};function ne(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Me(e,t){return ne(e).appendChild(t)}function Z(e,t,i,r){var n=document.createElement(e);if(i&&(n.className=i),r&&(n.style.cssText=r),typeof t=="string")n.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)n.appendChild(t[a]);return n}function je(e,t,i,r){var n=Z(e,t,i,r);return n.setAttribute("role","presentation"),n}var z;document.createRange?z=function(e,t,i,r){var n=document.createRange();return n.setEnd(r||e,i),n.setStart(e,t),n}:z=function(e,t,i){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(n){return r}return r.collapse(!0),r.moveEnd("character",i),r.moveStart("character",t),r};function oe(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(i){t=e.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function ke(e,t){var i=e.className;ae(t).test(i)||(e.className+=(i?" ":"")+t)}function et(e,t){for(var i=e.split(" "),r=0;r<i.length;r++)i[r]&&!ae(i[r]).test(t)&&(t+=" "+i[r]);return t}var dt=function(e){e.select()};me?dt=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:w&&(dt=function(e){try{e.select()}catch(t){}});function rt(e){return e.display.wrapper.ownerDocument}function m(e){return rt(e).defaultView}function c(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function ye(e,t,i){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(i!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function He(e,t,i,r,n){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=r||0,o=n||0;;){var l=e.indexOf(" ",a);if(l<0||l>=t)return o+(t-a);o+=l-a,o+=i-o%i,a=l+1}}var Ee=function(){this.id=null,this.f=null,this.time=0,this.handler=c(this.onTimeout,this)};Ee.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Ee.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function qe(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var Ct=50,ut={toString:function(){return"CodeMirror.Pass"}},Ke={scroll:!1},we={origin:"*mouse"},Ge={origin:"+move"};function Qe(e,t,i){for(var r=0,n=0;;){var a=e.indexOf(" ",r);a==-1&&(a=e.length);var o=a-r;if(a==e.length||n+o>=t)return r+Math.min(o,t-n);if(n+=a-r,n+=i-n%i,r=a+1,n>=t)return r}}var Lt=[""];function Qt(e){for(;Lt.length<=e;)Lt.push(_e(Lt)+" ");return Lt[e]}function _e(e){return e[e.length-1]}function Tt(e,t){for(var i=[],r=0;r<e.length;r++)i[r]=t(e[r],r);return i}function Bt(e,t,i){for(var r=0,n=i(t);r<e.length&&i(e[r])<=n;)r++;e.splice(r,0,t)}function jt(){}function N(e,t){var i;return Object.create?i=Object.create(e):(jt.prototype=e,i=new jt),t&&ye(t,i),i}var E=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function C(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||E.test(e))}function h(e,t){return t?t.source.indexOf("\\w")>-1&&C(e)?!0:t.test(e):C(e)}function d(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var b=/[\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 y(e){return e.charCodeAt(0)>=768&&b.test(e)}function R(e,t,i){for(;(i<0?t>0:t<e.length)&&y(e.charAt(t));)t+=i;return t}function X(e,t,i){for(var r=t>i?-1:1;;){if(t==i)return t;var n=(t+i)/2,a=r<0?Math.ceil(n):Math.floor(n);if(a==t)return e(a)?t:i;e(a)?i=a:t=a+r}}function de(e,t,i,r){if(!e)return r(t,i,"ltr",0);for(var n=!1,a=0;a<e.length;++a){var o=e[a];(o.from<i&&o.to>t||t==i&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,i),o.level==1?"rtl":"ltr",a),n=!0)}n||r(t,i,"ltr")}var O=null;function Te(e,t,i){var r;O=null;for(var n=0;n<e.length;++n){var a=e[n];if(a.from<t&&a.to>t)return n;a.to==t&&(a.from!=a.to&&i=="before"?r=n:O=n),a.from==t&&(a.from!=a.to&&i!="before"?r=n:O=n)}return r!=null?r:O}var s=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(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]/,n=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function u(f,p,x){this.level=f,this.from=p,this.to=x}return function(f,p){var x=p=="ltr"?"L":"R";if(f.length==0||p=="ltr"&&!r.test(f))return!1;for(var L=f.length,k=[],U=0;U<L;++U)k.push(i(f.charCodeAt(U)));for(var K=0,ie=x;K<L;++K){var ce=k[K];ce=="m"?k[K]=ie:ie=ce}for(var ge=0,he=x;ge<L;++ge){var xe=k[ge];xe=="1"&&he=="r"?k[ge]="n":a.test(xe)&&(he=xe,xe=="r"&&(k[ge]="R"))}for(var Be=1,Ae=k[0];Be<L-1;++Be){var ze=k[Be];ze=="+"&&Ae=="1"&&k[Be+1]=="1"?k[Be]="1":ze==","&&Ae==k[Be+1]&&(Ae=="1"||Ae=="n")&&(k[Be]=Ae),Ae=ze}for(var Ve=0;Ve<L;++Ve){var xt=k[Ve];if(xt==",")k[Ve]="N";else if(xt=="%"){var nt=void 0;for(nt=Ve+1;nt<L&&k[nt]=="%";++nt);for(var Rt=Ve&&k[Ve-1]=="!"||nt<L&&k[nt]=="1"?"1":"N",It=Ve;It<nt;++It)k[It]=Rt;Ve=nt-1}}for(var ft=0,Ot=x;ft<L;++ft){var bt=k[ft];Ot=="L"&&bt=="1"?k[ft]="L":a.test(bt)&&(Ot=bt)}for(var pt=0;pt<L;++pt)if(n.test(k[pt])){var ct=void 0;for(ct=pt+1;ct<L&&n.test(k[ct]);++ct);for(var ot=(pt?k[pt-1]:x)=="L",Ht=(ct<L?k[ct]:x)=="L",$r=ot==Ht?ot?"L":"R":x,xr=pt;xr<ct;++xr)k[xr]=$r;pt=ct-1}for(var kt=[],tr,yt=0;yt<L;)if(o.test(k[yt])){var aa=yt;for(++yt;yt<L&&o.test(k[yt]);++yt);kt.push(new u(0,aa,yt))}else{var ur=yt,Tr=kt.length,Br=p=="rtl"?1:0;for(++yt;yt<L&&k[yt]!="L";++yt);for(var Et=ur;Et<yt;)if(l.test(k[Et])){ur<Et&&(kt.splice(Tr,0,new u(1,ur,Et)),Tr+=Br);var Vr=Et;for(++Et;Et<yt&&l.test(k[Et]);++Et);kt.splice(Tr,0,new u(2,Vr,Et)),Tr+=Br,ur=Et}else++Et;ur<yt&&kt.splice(Tr,0,new u(1,ur,yt))}return p=="ltr"&&(kt[0].level==1&&(tr=f.match(/^\s+/))&&(kt[0].from=tr[0].length,kt.unshift(new u(0,0,tr[0].length))),_e(kt).level==1&&(tr=f.match(/\s+$/))&&(_e(kt).to-=tr[0].length,kt.push(new u(0,L-tr[0].length,L)))),p=="rtl"?kt.reverse():kt}}();function g(e,t){var i=e.order;return i==null&&(i=e.order=s(e.text,t)),i}var D=[],v=function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||D).concat(i)}};function M(e,t){return e._handlers&&e._handlers[t]||D}function H(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var r=e._handlers,n=r&&r[t];if(n){var a=qe(n,i);a>-1&&(r[t]=n.slice(0,a).concat(n.slice(a+1)))}}}function A(e,t){var i=M(e,t);if(!!i.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n<i.length;++n)i[n].apply(null,r)}function S(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),A(e,i||t.type,e,t),Le(t)||t.codemirrorIgnore}function W(e){var t=e._handlers&&e._handlers.cursorActivity;if(!!t)for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)qe(i,t[r])==-1&&i.push(t[r])}function ve(e,t){return M(e,t).length>0}function De(e){e.prototype.on=function(t,i){v(this,t,i)},e.prototype.off=function(t,i){H(this,t,i)}}function Se(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ne(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Le(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Pe(e){Se(e),Ne(e)}function Xe(e){return e.target||e.srcElement}function Ue(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),I&&e.ctrlKey&&t==1&&(t=3),t}var Ye=function(){if(w&&F<9)return!1;var e=Z("div");return"draggable"in e||"dragDrop"in e}(),at;function st(e){if(at==null){var t=Z("span","\u200B");Me(e,Z("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(at=t.offsetWidth<=1&&t.offsetHeight>2&&!(w&&F<8))}var i=at?Z("span","\u200B"):Z("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var St;function _t(e){if(St!=null)return St;var t=Me(e,document.createTextNode("A\u062EA")),i=z(t,0,1).getBoundingClientRect(),r=z(t,1,2).getBoundingClientRect();return ne(e),!i||i.left==i.right?!1:St=r.right-i.right<3}var qt=`
|
|
|
|
b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],r=e.length;t<=r;){var n=e.indexOf(`
|
|
`,t);n==-1&&(n=e.length);var a=e.slice(t,e.charAt(n-1)=="\r"?n-1:n),o=a.indexOf("\r");o!=-1?(i.push(a.slice(0,o)),t+=o+1):(i.push(a),t=n+1)}return i}: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(i){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},Ei=function(){var e=Z("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Nr=null;function sn(e){if(Nr!=null)return Nr;var t=Me(e,Z("span","x")),i=t.getBoundingClientRect(),r=z(t,0,1).getBoundingClientRect();return Nr=Math.abs(i.left-r.left)>1}var yr={},sr={};function fn(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),yr[e]=t}function Dt(e,t){sr[e]=t}function Gt(e){if(typeof e=="string"&&sr.hasOwnProperty(e))e=sr[e];else if(e&&typeof e.name=="string"&&sr.hasOwnProperty(e.name)){var t=sr[e.name];typeof t=="string"&&(t={name:t}),e=N(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 Pt(e,t){t=Gt(t);var i=yr[t.name];if(!i)return Pt(e,"text/plain");var r=i(e,t);if(Ft.hasOwnProperty(t.name)){var n=Ft[t.name];for(var a in n)!n.hasOwnProperty(a)||(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=n[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 Ft={};function rr(e,t){var i=Ft.hasOwnProperty(e)?Ft[e]:Ft[e]={};ye(t,i)}function Wt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var r in t){var n=t[r];n instanceof Array&&(n=n.concat([])),i[r]=n}return i}function Ir(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}function Li(e,t,i){return e.startState?e.startState(t,i):!0}var it=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};it.prototype.eol=function(){return this.pos>=this.string.length},it.prototype.sol=function(){return this.pos==this.lineStart},it.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},it.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},it.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},it.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},it.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},it.prototype.skipToEnd=function(){this.pos=this.string.length},it.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},it.prototype.backUp=function(e){this.pos-=e},it.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=He(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?He(this.string,this.lineStart,this.tabSize):0)},it.prototype.indentation=function(){return He(this.string,null,this.tabSize)-(this.lineStart?He(this.string,this.lineStart,this.tabSize):0)},it.prototype.match=function(e,t,i){if(typeof e=="string"){var r=function(o){return i?o.toLowerCase():o},n=this.string.substr(this.pos,e.length);if(r(n)==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)}},it.prototype.current=function(){return this.string.slice(this.start,this.pos)},it.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},it.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},it.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function Fe(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 i=e;!i.lines;)for(var r=0;;++r){var n=i.children[r],a=n.chunkSize();if(t<a){i=n;break}t-=a}return i.lines[t]}function Dr(e,t,i){var r=[],n=t.line;return e.iter(t.line,i.line+1,function(a){var o=a.text;n==i.line&&(o=o.slice(0,i.ch)),n==t.line&&(o=o.slice(t.ch)),r.push(o),++n}),r}function cn(e,t,i){var r=[];return e.iter(t,i,function(n){r.push(n.text)}),r}function Jt(e,t){var i=t-e.height;if(i)for(var r=e;r;r=r.parent)r.height+=i}function Je(e){if(e.parent==null)return null;for(var t=e.parent,i=qe(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var n=0;r.children[n]!=t;++n)i+=r.children[n].chunkSize();return i+t.first}function br(e,t){var i=e.first;e:do{for(var r=0;r<e.children.length;++r){var n=e.children[r],a=n.height;if(t<a){e=n;continue e}t-=a,i+=n.chunkSize()}return i}while(!e.lines);for(var o=0;o<e.lines.length;++o){var l=e.lines[o],u=l.height;if(t<u)break;t-=u}return i+o}function ei(e,t){return t>=e.first&&t<e.first+e.size}function hn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function te(e,t,i){if(i===void 0&&(i=null),!(this instanceof te))return new te(e,t,i);this.line=e,this.ch=t,this.sticky=i}function Ie(e,t){return e.line-t.line||e.ch-t.ch}function dn(e,t){return e.sticky==t.sticky&&Ie(e,t)==0}function pn(e){return te(e.line,e.ch)}function Ti(e,t){return Ie(e,t)<0?t:e}function Bi(e,t){return Ie(e,t)<0?e:t}function la(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Oe(e,t){if(t.line<e.first)return te(e.first,0);var i=e.first+e.size-1;return t.line>i?te(i,Fe(e,i).text.length):ul(t,Fe(e,t.line).text.length)}function ul(e,t){var i=e.ch;return i==null||i>t?te(e.line,t):i<0?te(e.line,0):e}function ua(e,t){for(var i=[],r=0;r<t.length;r++)i[r]=Oe(e,t[r]);return i}var Mi=function(e,t){this.state=e,this.lookAhead=t},$t=function(e,t,i,r){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};$t.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},$t.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}},$t.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},$t.fromSaved=function(e,t,i){return t instanceof Mi?new $t(e,Wt(e.mode,t.state),i,t.lookAhead):new $t(e,Wt(e.mode,t),i)},$t.prototype.save=function(e){var t=e!==!1?Wt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Mi(t,this.maxLookAhead):t};function sa(e,t,i,r){var n=[e.state.modeGen],a={};ga(e,t.text,e.doc.mode,i,function(f,p){return n.push(f,p)},a,r);for(var o=i.state,l=function(f){i.baseTokens=n;var p=e.state.overlays[f],x=1,L=0;i.state=!0,ga(e,t.text,p.mode,i,function(k,U){for(var K=x;L<k;){var ie=n[x];ie>k&&n.splice(x,1,k,n[x+1],ie),x+=2,L=Math.min(k,ie)}if(!!U)if(p.opaque)n.splice(K,x-K,k,"overlay "+U),x=K+2;else for(;K<x;K+=2){var ce=n[K+1];n[K+1]=(ce?ce+" ":"")+"overlay "+U}},a),i.state=o,i.baseTokens=null,i.baseTokenPos=1},u=0;u<e.state.overlays.length;++u)l(u);return{styles:n,classes:a.bgClass||a.textClass?a:null}}function fa(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=ti(e,Je(t)),n=t.text.length>e.options.maxHighlightLength&&Wt(e.doc.mode,r.state),a=sa(e,t,r);n&&(r.state=n),t.stateAfter=r.save(!n),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ti(e,t,i){var r=e.doc,n=e.display;if(!r.mode.startState)return new $t(r,!0,t);var a=sl(e,t,i),o=a>r.first&&Fe(r,a-1).stateAfter,l=o?$t.fromSaved(r,o,a):new $t(r,Li(r.mode),a);return r.iter(a,t,function(u){gn(e,u.text,l);var f=l.line;u.stateAfter=f==t-1||f%5==0||f>=n.viewFrom&&f<n.viewTo?l.save():null,l.nextLine()}),i&&(r.modeFrontier=l.line),l}function gn(e,t,i,r){var n=e.doc.mode,a=new it(t,e.options.tabSize,i);for(a.start=a.pos=r||0,t==""&&ca(n,i.state);!a.eol();)vn(n,a,i.state),a.start=a.pos}function ca(e,t){if(e.blankLine)return e.blankLine(t);if(!!e.innerMode){var i=Ir(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}}function vn(e,t,i,r){for(var n=0;n<10;n++){r&&(r[0]=Ir(e,i).mode);var a=e.token(t,i);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var ha=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function da(e,t,i,r){var n=e.doc,a=n.mode,o;t=Oe(n,t);var l=Fe(n,t.line),u=ti(e,t.line,i),f=new it(l.text,e.options.tabSize,u),p;for(r&&(p=[]);(r||f.pos<t.ch)&&!f.eol();)f.start=f.pos,o=vn(a,f,u.state),r&&p.push(new ha(f,o,Wt(n.mode,u.state)));return r?p:new ha(f,o,u.state)}function pa(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var r=i[1]?"bgClass":"textClass";t[r]==null?t[r]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+i[2])}return e}function ga(e,t,i,r,n,a,o){var l=i.flattenSpans;l==null&&(l=e.options.flattenSpans);var u=0,f=null,p=new it(t,e.options.tabSize,r),x,L=e.options.addModeClass&&[null];for(t==""&&pa(ca(i,r.state),a);!p.eol();){if(p.pos>e.options.maxHighlightLength?(l=!1,o&&gn(e,t,r,p.pos),p.pos=t.length,x=null):x=pa(vn(i,p,r.state,L),a),L){var k=L[0].name;k&&(x="m-"+(x?k+" "+x:k))}if(!l||f!=x){for(;u<p.start;)u=Math.min(p.start,u+5e3),n(u,f);f=x}p.start=p.pos}for(;u<p.pos;){var U=Math.min(p.pos,u+5e3);n(U,f),u=U}}function sl(e,t,i){for(var r,n,a=e.doc,o=i?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>o;--l){if(l<=a.first)return a.first;var u=Fe(a,l-1),f=u.stateAfter;if(f&&(!i||l+(f instanceof Mi?f.lookAhead:0)<=a.modeFrontier))return l;var p=He(u.text,null,e.options.tabSize);(n==null||r>p)&&(n=l-1,r=p)}return n}function fl(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var i=e.first,r=t-1;r>i;r--){var n=Fe(e,r).stateAfter;if(n&&(!(n instanceof Mi)||r+n.lookAhead<t)){i=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}}var va=!1,ir=!1;function cl(){va=!0}function hl(){ir=!0}function Ni(e,t,i){this.marker=e,this.from=t,this.to=i}function ri(e,t){if(e)for(var i=0;i<e.length;++i){var r=e[i];if(r.marker==t)return r}}function dl(e,t){for(var i,r=0;r<e.length;++r)e[r]!=t&&(i||(i=[])).push(e[r]);return i}function pl(e,t,i){var r=i&&window.WeakSet&&(i.markedSpans||(i.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,i){var r;if(e)for(var n=0;n<e.length;++n){var a=e[n],o=a.marker,l=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);if(l||a.from==t&&o.type=="bookmark"&&(!i||!a.marker.insertLeft)){var u=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(r||(r=[])).push(new Ni(o,a.from,u?null:a.to))}}return r}function vl(e,t,i){var r;if(e)for(var n=0;n<e.length;++n){var a=e[n],o=a.marker,l=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);if(l||a.from==t&&o.type=="bookmark"&&(!i||a.marker.insertLeft)){var u=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(r||(r=[])).push(new Ni(o,u?null:a.from-t,a.to==null?null:a.to-t))}}return r}function mn(e,t){if(t.full)return null;var i=ei(e,t.from.line)&&Fe(e,t.from.line).markedSpans,r=ei(e,t.to.line)&&Fe(e,t.to.line).markedSpans;if(!i&&!r)return null;var n=t.from.ch,a=t.to.ch,o=Ie(t.from,t.to)==0,l=gl(i,n,o),u=vl(r,a,o),f=t.text.length==1,p=_e(t.text).length+(f?n:0);if(l)for(var x=0;x<l.length;++x){var L=l[x];if(L.to==null){var k=ri(u,L.marker);k?f&&(L.to=k.to==null?null:k.to+p):L.to=n}}if(u)for(var U=0;U<u.length;++U){var K=u[U];if(K.to!=null&&(K.to+=p),K.from==null){var ie=ri(l,K.marker);ie||(K.from=p,f&&(l||(l=[])).push(K))}else K.from+=p,f&&(l||(l=[])).push(K)}l&&(l=ma(l)),u&&u!=l&&(u=ma(u));var ce=[l];if(!f){var ge=t.text.length-2,he;if(ge>0&&l)for(var xe=0;xe<l.length;++xe)l[xe].to==null&&(he||(he=[])).push(new Ni(l[xe].marker,null,null));for(var Be=0;Be<ge;++Be)ce.push(he);ce.push(u)}return ce}function ma(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function ml(e,t,i){var r=null;if(e.iter(t.line,i.line+1,function(k){if(k.markedSpans)for(var U=0;U<k.markedSpans.length;++U){var K=k.markedSpans[U].marker;K.readOnly&&(!r||qe(r,K)==-1)&&(r||(r=[])).push(K)}}),!r)return null;for(var n=[{from:t,to:i}],a=0;a<r.length;++a)for(var o=r[a],l=o.find(0),u=0;u<n.length;++u){var f=n[u];if(!(Ie(f.to,l.from)<0||Ie(f.from,l.to)>0)){var p=[u,1],x=Ie(f.from,l.from),L=Ie(f.to,l.to);(x<0||!o.inclusiveLeft&&!x)&&p.push({from:f.from,to:l.from}),(L>0||!o.inclusiveRight&&!L)&&p.push({from:l.to,to:f.to}),n.splice.apply(n,p),u+=p.length-3}}return n}function xa(e){var t=e.markedSpans;if(!!t){for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}}function ya(e,t){if(!!t){for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}}function Ii(e){return e.inclusiveLeft?-1:0}function Oi(e){return e.inclusiveRight?1:0}function xn(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var r=e.find(),n=t.find(),a=Ie(r.from,n.from)||Ii(e)-Ii(t);if(a)return-a;var o=Ie(r.to,n.to)||Oi(e)-Oi(t);return o||t.id-e.id}function Da(e,t){var i=ir&&e.markedSpans,r;if(i)for(var n=void 0,a=0;a<i.length;++a)n=i[a],n.marker.collapsed&&(t?n.from:n.to)==null&&(!r||xn(r,n.marker)<0)&&(r=n.marker);return r}function ba(e){return Da(e,!0)}function Hi(e){return Da(e,!1)}function xl(e,t){var i=ir&&e.markedSpans,r;if(i)for(var n=0;n<i.length;++n){var a=i[n];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!r||xn(r,a.marker)<0)&&(r=a.marker)}return r}function Ca(e,t,i,r,n){var a=Fe(e,t),o=ir&&a.markedSpans;if(o)for(var l=0;l<o.length;++l){var u=o[l];if(!!u.marker.collapsed){var f=u.marker.find(0),p=Ie(f.from,i)||Ii(u.marker)-Ii(n),x=Ie(f.to,r)||Oi(u.marker)-Oi(n);if(!(p>=0&&x<=0||p<=0&&x>=0)&&(p<=0&&(u.marker.inclusiveRight&&n.inclusiveLeft?Ie(f.to,i)>=0:Ie(f.to,i)>0)||p>=0&&(u.marker.inclusiveRight&&n.inclusiveLeft?Ie(f.from,r)<=0:Ie(f.from,r)<0)))return!0}}}function Kt(e){for(var t;t=ba(e);)e=t.find(-1,!0).line;return e}function yl(e){for(var t;t=Hi(e);)e=t.find(1,!0).line;return e}function Dl(e){for(var t,i;t=Hi(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function yn(e,t){var i=Fe(e,t),r=Kt(i);return i==r?t:Je(r)}function wa(e,t){if(t>e.lastLine())return t;var i=Fe(e,t),r;if(!fr(e,i))return t;for(;r=Hi(i);)i=r.find(1,!0).line;return Je(i)+1}function fr(e,t){var i=ir&&t.markedSpans;if(i){for(var r=void 0,n=0;n<i.length;++n)if(r=i[n],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&Dn(e,t,r))return!0}}}function Dn(e,t,i){if(i.to==null){var r=i.marker.find(1,!0);return Dn(e,r.line,ri(r.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var n=void 0,a=0;a<t.markedSpans.length;++a)if(n=t.markedSpans[a],n.marker.collapsed&&!n.marker.widgetNode&&n.from==i.to&&(n.to==null||n.to!=i.from)&&(n.marker.inclusiveLeft||i.marker.inclusiveRight)&&Dn(e,t,n))return!0}function nr(e){e=Kt(e);for(var t=0,i=e.parent,r=0;r<i.lines.length;++r){var n=i.lines[r];if(n==e)break;t+=n.height}for(var a=i.parent;a;i=a,a=i.parent)for(var o=0;o<a.children.length;++o){var l=a.children[o];if(l==i)break;t+=l.height}return t}function _i(e){if(e.height==0)return 0;for(var t=e.text.length,i,r=e;i=ba(r);){var n=i.find(0,!0);r=n.from.line,t+=n.from.ch-n.to.ch}for(r=e;i=Hi(r);){var a=i.find(0,!0);t-=r.text.length-a.from.ch,r=a.to.line,t+=r.text.length-a.to.ch}return t}function bn(e){var t=e.display,i=e.doc;t.maxLine=Fe(i,i.first),t.maxLineLength=_i(t.maxLine),t.maxLineChanged=!0,i.iter(function(r){var n=_i(r);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=r)})}var Or=function(e,t,i){this.text=e,ya(this,t),this.height=i?i(this):1};Or.prototype.lineNo=function(){return Je(this)},De(Or);function bl(e,t,i,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),xa(e),ya(e,i);var n=r?r(e):1;n!=e.height&&Jt(e,n)}function Cl(e){e.parent=null,xa(e)}var wl={},kl={};function ka(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?kl:wl;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Sa(e,t){var i=je("span",null,null,T?"padding-right: .1px":null),r={pre:je("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var n=0;n<=(t.rest?t.rest.length:0);n++){var a=n?t.rest[n-1]:t.line,o=void 0;r.pos=0,r.addToken=Fl,_t(e.display.measure)&&(o=g(a,e.doc.direction))&&(r.addToken=El(r.addToken,o)),r.map=[];var l=t!=e.display.externalMeasured&&Je(a);Ll(a,r,fa(e,a,l)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=et(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=et(a.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(st(e.display.measure))),n==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(T){var u=r.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return A(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=et(r.pre.className,r.textClass||"")),r}function Sl(e){var t=Z("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Fl(e,t,i,r,n,a,o){if(!!t){var l=e.splitSpaces?Al(t,e.trailingSpace):t,u=e.cm.state.specialChars,f=!1,p;if(!u.test(t))e.col+=t.length,p=document.createTextNode(l),e.map.push(e.pos,e.pos+t.length,p),w&&F<9&&(f=!0),e.pos+=t.length;else{p=document.createDocumentFragment();for(var x=0;;){u.lastIndex=x;var L=u.exec(t),k=L?L.index-x:t.length-x;if(k){var U=document.createTextNode(l.slice(x,x+k));w&&F<9?p.appendChild(Z("span",[U])):p.appendChild(U),e.map.push(e.pos,e.pos+k,U),e.col+=k,e.pos+=k}if(!L)break;x+=k+1;var K=void 0;if(L[0]==" "){var ie=e.cm.options.tabSize,ce=ie-e.col%ie;K=p.appendChild(Z("span",Qt(ce),"cm-tab")),K.setAttribute("role","presentation"),K.setAttribute("cm-text"," "),e.col+=ce}else L[0]=="\r"||L[0]==`
|
|
`?(K=p.appendChild(Z("span",L[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),K.setAttribute("cm-text",L[0]),e.col+=1):(K=e.cm.options.specialCharPlaceholder(L[0]),K.setAttribute("cm-text",L[0]),w&&F<9?p.appendChild(Z("span",[K])):p.appendChild(K),e.col+=1);e.map.push(e.pos,e.pos+1,K),e.pos++}}if(e.trailingSpace=l.charCodeAt(t.length-1)==32,i||r||n||f||a||o){var ge=i||"";r&&(ge+=r),n&&(ge+=n);var he=Z("span",[p],ge,a);if(o)for(var xe in o)o.hasOwnProperty(xe)&&xe!="style"&&xe!="class"&&he.setAttribute(xe,o[xe]);return e.content.appendChild(he)}e.content.appendChild(p)}}function Al(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,r="",n=0;n<e.length;n++){var a=e.charAt(n);a==" "&&i&&(n==e.length-1||e.charCodeAt(n+1)==32)&&(a="\xA0"),r+=a,i=a==" "}return r}function El(e,t){return function(i,r,n,a,o,l,u){n=n?n+" cm-force-border":"cm-force-border";for(var f=i.pos,p=f+r.length;;){for(var x=void 0,L=0;L<t.length&&(x=t[L],!(x.to>f&&x.from<=f));L++);if(x.to>=p)return e(i,r,n,a,o,l,u);e(i,r.slice(0,x.to-f),n,a,null,l,u),a=null,r=r.slice(x.to-f),f=x.to}}}function Fa(e,t,i,r){var n=!r&&i.widgetNode;n&&e.map.push(e.pos,e.pos+t,n),!r&&e.cm.display.input.needsContentAttribute&&(n||(n=e.content.appendChild(document.createElement("span"))),n.setAttribute("cm-marker",i.id)),n&&(e.cm.display.input.setUneditable(n),e.content.appendChild(n)),e.pos+=t,e.trailingSpace=!1}function Ll(e,t,i){var r=e.markedSpans,n=e.text,a=0;if(!r){for(var o=1;o<i.length;o+=2)t.addToken(t,n.slice(a,a=i[o]),ka(i[o+1],t.cm.options));return}for(var l=n.length,u=0,f=1,p="",x,L,k=0,U,K,ie,ce,ge;;){if(k==u){U=K=ie=L="",ge=null,ce=null,k=1/0;for(var he=[],xe=void 0,Be=0;Be<r.length;++Be){var Ae=r[Be],ze=Ae.marker;if(ze.type=="bookmark"&&Ae.from==u&&ze.widgetNode)he.push(ze);else if(Ae.from<=u&&(Ae.to==null||Ae.to>u||ze.collapsed&&Ae.to==u&&Ae.from==u)){if(Ae.to!=null&&Ae.to!=u&&k>Ae.to&&(k=Ae.to,K=""),ze.className&&(U+=" "+ze.className),ze.css&&(L=(L?L+";":"")+ze.css),ze.startStyle&&Ae.from==u&&(ie+=" "+ze.startStyle),ze.endStyle&&Ae.to==k&&(xe||(xe=[])).push(ze.endStyle,Ae.to),ze.title&&((ge||(ge={})).title=ze.title),ze.attributes)for(var Ve in ze.attributes)(ge||(ge={}))[Ve]=ze.attributes[Ve];ze.collapsed&&(!ce||xn(ce.marker,ze)<0)&&(ce=Ae)}else Ae.from>u&&k>Ae.from&&(k=Ae.from)}if(xe)for(var xt=0;xt<xe.length;xt+=2)xe[xt+1]==k&&(K+=" "+xe[xt]);if(!ce||ce.from==u)for(var nt=0;nt<he.length;++nt)Fa(t,0,he[nt]);if(ce&&(ce.from||0)==u){if(Fa(t,(ce.to==null?l+1:ce.to)-u,ce.marker,ce.from==null),ce.to==null)return;ce.to==u&&(ce=!1)}}if(u>=l)break;for(var Rt=Math.min(l,k);;){if(p){var It=u+p.length;if(!ce){var ft=It>Rt?p.slice(0,Rt-u):p;t.addToken(t,ft,x?x+U:U,ie,u+ft.length==k?K:"",L,ge)}if(It>=Rt){p=p.slice(Rt-u),u=Rt;break}u=It,ie=""}p=n.slice(a,a=i[f++]),x=ka(i[f++],t.cm.options)}}}function Aa(e,t,i){this.line=t,this.rest=Dl(t),this.size=this.rest?Je(_e(this.rest))-i+1:1,this.node=this.text=null,this.hidden=fr(e,t)}function zi(e,t,i){for(var r=[],n,a=t;a<i;a=n){var o=new Aa(e.doc,Fe(e.doc,a),a);n=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,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var r=0;r<e.ops.length;r++){var n=e.ops[r];if(n.cursorActivityHandlers)for(;n.cursorActivityCalled<n.cursorActivityHandlers.length;)n.cursorActivityHandlers[n.cursorActivityCalled++].call(null,n.cm)}}while(i<t.length)}function Ml(e,t){var i=e.ownsGroup;if(!!i)try{Bl(i)}finally{Hr=null,t(i)}}var ii=null;function gt(e,t){var i=M(e,t);if(!!i.length){var r=Array.prototype.slice.call(arguments,2),n;Hr?n=Hr.delayedCallbacks:ii?n=ii:(n=ii=[],setTimeout(Nl,0));for(var a=function(l){n.push(function(){return i[l].apply(null,r)})},o=0;o<i.length;++o)a(o)}}function Nl(){var e=ii;ii=null;for(var t=0;t<e.length;++t)e[t]()}function Ea(e,t,i,r){for(var n=0;n<t.changes.length;n++){var a=t.changes[n];a=="text"?Ol(e,t):a=="gutter"?Ta(e,t,i,r):a=="class"?Cn(e,t):a=="widget"&&Hl(e,t,r)}t.changes=null}function ni(e){return e.node==e.text&&(e.node=Z("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),w&&F<8&&(e.node.style.zIndex=2)),e.node}function Il(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var r=ni(t);t.background=r.insertBefore(Z("div",null,i),r.firstChild),e.display.input.setUneditable(t.background)}}function La(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):Sa(e,t)}function Ol(e,t){var i=t.text.className,r=La(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,Cn(e,t)):i&&(t.text.className=i)}function Cn(e,t){Il(e,t),t.line.wrapClass?ni(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function Ta(e,t,i,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 n=ni(t);t.gutterBackground=Z("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),n.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=ni(t),l=t.gutter=Z("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(l.setAttribute("aria-hidden","true"),e.display.input.setUneditable(l),o.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=l.appendChild(Z("div",hn(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var u=0;u<e.display.gutterSpecs.length;++u){var f=e.display.gutterSpecs[u].className,p=a.hasOwnProperty(f)&&a[f];p&&l.appendChild(Z("div",[p],"CodeMirror-gutter-elt","left: "+r.gutterLeft[f]+"px; width: "+r.gutterWidth[f]+"px"))}}}function Hl(e,t,i){t.alignable&&(t.alignable=null);for(var r=ae("CodeMirror-linewidget"),n=t.node.firstChild,a=void 0;n;n=a)a=n.nextSibling,r.test(n.className)&&t.node.removeChild(n);Ba(e,t,i)}function _l(e,t,i,r){var n=La(e,t);return t.text=t.node=n.pre,n.bgClass&&(t.bgClass=n.bgClass),n.textClass&&(t.textClass=n.textClass),Cn(e,t),Ta(e,t,i,r),Ba(e,t,r),t.node}function Ba(e,t,i){if(Ma(e,t.line,t,i,!0),t.rest)for(var r=0;r<t.rest.length;r++)Ma(e,t.rest[r],t,i,!1)}function Ma(e,t,i,r,n){if(!!t.widgets)for(var a=ni(i),o=0,l=t.widgets;o<l.length;++o){var u=l[o],f=Z("div",[u.node],"CodeMirror-linewidget"+(u.className?" "+u.className:""));u.handleMouseEvents||f.setAttribute("cm-ignore-events","true"),zl(u,f,i,r),e.display.input.setUneditable(f),n&&u.above?a.insertBefore(f,i.gutter||i.text):a.appendChild(f),gt(u,"redraw")}}function zl(e,t,i,r){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var n=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(n-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=n+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function ai(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!oe(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),Me(t.display.measure,Z("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function ar(e,t){for(var i=Xe(t);i!=e.wrapper;i=i.parentNode)if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover)return!0}function Ri(e){return e.lineSpace.offsetTop}function wn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Na(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Me(e.measure,Z("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function Vt(e){return Ct-e.display.nativeBarWidth}function Cr(e){return e.display.scroller.clientWidth-Vt(e)-e.display.barWidth}function kn(e){return e.display.scroller.clientHeight-Vt(e)-e.display.barHeight}function Rl(e,t,i){var r=e.options.lineWrapping,n=r&&Cr(e);if(!t.measure.heights||r&&t.measure.width!=n){var a=t.measure.heights=[];if(r){t.measure.width=n;for(var o=t.text.firstChild.getClientRects(),l=0;l<o.length-1;l++){var u=o[l],f=o[l+1];Math.abs(u.bottom-f.bottom)>2&&a.push((u.bottom+f.top)/2-i.top)}}a.push(i.bottom-i.top)}}function Ia(e,t,i){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 n=0;n<e.rest.length;n++)if(Je(e.rest[n])>i)return{map:e.measure.maps[n],cache:e.measure.caches[n],before:!0}}}function Pl(e,t){t=Kt(t);var i=Je(t),r=e.display.externalMeasured=new Aa(e.doc,t,i);r.lineN=i;var n=r.built=Sa(e,r);return r.text=n.pre,Me(e.display.lineMeasure,n.pre),r}function Oa(e,t,i,r){return er(e,_r(e,t),i,r)}function Sn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Sr(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function _r(e,t){var i=Je(t),r=Sn(e,i);r&&!r.text?r=null:r&&r.changes&&(Ea(e,r,i,Tn(e)),e.curOp.forceUpdate=!0),r||(r=Pl(e,t));var n=Ia(r,t,i);return{line:t,view:r,rect:null,map:n.map,cache:n.cache,before:n.before,hasHeights:!1}}function er(e,t,i,r,n){t.before&&(i=-1);var a=i+(r||""),o;return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Rl(e,t.view,t.rect),t.hasHeights=!0),o=Ul(e,t,i,r),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:n?o.rtop:o.top,bottom:n?o.rbottom:o.bottom}}var Ha={left:0,right:0,top:0,bottom:0};function _a(e,t,i){for(var r,n,a,o,l,u,f=0;f<e.length;f+=3)if(l=e[f],u=e[f+1],t<l?(n=0,a=1,o="left"):t<u?(n=t-l,a=n+1):(f==e.length-3||t==u&&e[f+3]>t)&&(a=u-l,n=a-1,t>=u&&(o="right")),n!=null){if(r=e[f+2],l==u&&i==(r.insertLeft?"left":"right")&&(o=i),i=="left"&&n==0)for(;f&&e[f-2]==e[f-3]&&e[f-1].insertLeft;)r=e[(f-=3)+2],o="left";if(i=="right"&&n==u-l)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:n,end:a,collapse:o,coverStart:l,coverEnd:u}}function Wl(e,t){var i=Ha;if(t=="left")for(var r=0;r<e.length&&(i=e[r]).left==i.right;r++);else for(var n=e.length-1;n>=0&&(i=e[n]).left==i.right;n--);return i}function Ul(e,t,i,r){var n=_a(t.map,i,r),a=n.node,o=n.start,l=n.end,u=n.collapse,f;if(a.nodeType==3){for(var p=0;p<4;p++){for(;o&&y(t.line.text.charAt(n.coverStart+o));)--o;for(;n.coverStart+l<n.coverEnd&&y(t.line.text.charAt(n.coverStart+l));)++l;if(w&&F<9&&o==0&&l==n.coverEnd-n.coverStart?f=a.parentNode.getBoundingClientRect():f=Wl(z(a,o,l).getClientRects(),r),f.left||f.right||o==0)break;l=o,o=o-1,u="right"}w&&F<11&&(f=jl(e.display.measure,f))}else{o>0&&(u=r="right");var x;e.options.lineWrapping&&(x=a.getClientRects()).length>1?f=x[r=="right"?x.length-1:0]:f=a.getBoundingClientRect()}if(w&&F<9&&!o&&(!f||!f.left&&!f.right)){var L=a.parentNode.getClientRects()[0];L?f={left:L.left,right:L.left+Rr(e.display),top:L.top,bottom:L.bottom}:f=Ha}for(var k=f.top-t.rect.top,U=f.bottom-t.rect.top,K=(k+U)/2,ie=t.view.measure.heights,ce=0;ce<ie.length-1&&!(K<ie[ce]);ce++);var ge=ce?ie[ce-1]:0,he=ie[ce],xe={left:(u=="right"?f.right:f.left)-t.rect.left,right:(u=="left"?f.left:f.right)-t.rect.left,top:ge,bottom:he};return!f.left&&!f.right&&(xe.bogus=!0),e.options.singleCursorHeightPerLine||(xe.rtop=k,xe.rbottom=U),xe}function jl(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!sn(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,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 Ra(e){e.display.externalMeasure=null,ne(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)za(e.display.view[t])}function oi(e){Ra(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Pa(e){return ee&&Ce?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function Wa(e){return ee&&Ce?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function Fn(e){var t=Kt(e),i=t.widgets,r=0;if(i)for(var n=0;n<i.length;++n)i[n].above&&(r+=ai(i[n]));return r}function Pi(e,t,i,r,n){if(!n){var a=Fn(t);i.top+=a,i.bottom+=a}if(r=="line")return i;r||(r="local");var o=nr(t);if(r=="local"?o+=Ri(e.display):o-=e.display.viewOffset,r=="page"||r=="window"){var l=e.display.lineSpace.getBoundingClientRect();o+=l.top+(r=="window"?0:Wa(rt(e)));var u=l.left+(r=="window"?0:Pa(rt(e)));i.left+=u,i.right+=u}return i.top+=o,i.bottom+=o,i}function Ua(e,t,i){if(i=="div")return t;var r=t.left,n=t.top;if(i=="page")r-=Pa(rt(e)),n-=Wa(rt(e));else if(i=="local"||!i){var a=e.display.sizer.getBoundingClientRect();r+=a.left,n+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:r-o.left,top:n-o.top}}function Wi(e,t,i,r,n){return r||(r=Fe(e.doc,t.line)),Pi(e,r,Oa(e,r,t.ch,n),i)}function Xt(e,t,i,r,n,a){r=r||Fe(e.doc,t.line),n||(n=_r(e,r));function o(U,K){var ie=er(e,n,U,K?"right":"left",a);return K?ie.left=ie.right:ie.right=ie.left,Pi(e,r,ie,i)}var l=g(r,e.doc.direction),u=t.ch,f=t.sticky;if(u>=r.text.length?(u=r.text.length,f="before"):u<=0&&(u=0,f="after"),!l)return o(f=="before"?u-1:u,f=="before");function p(U,K,ie){var ce=l[K],ge=ce.level==1;return o(ie?U-1:U,ge!=ie)}var x=Te(l,u,f),L=O,k=p(u,x,f=="before");return L!=null&&(k.other=p(u,L,f!="before")),k}function ja(e,t){var i=0;t=Oe(e.doc,t),e.options.lineWrapping||(i=Rr(e.display)*t.ch);var r=Fe(e.doc,t.line),n=nr(r)+Ri(e.display);return{left:i,right:i,top:n,bottom:n+r.height}}function An(e,t,i,r,n){var a=te(e,t,i);return a.xRel=n,r&&(a.outside=r),a}function En(e,t,i){var r=e.doc;if(i+=e.display.viewOffset,i<0)return An(r.first,0,null,-1,-1);var n=br(r,i),a=r.first+r.size-1;if(n>a)return An(r.first+r.size-1,Fe(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=Fe(r,n);;){var l=ql(e,o,n,t,i),u=xl(o,l.ch+(l.xRel>0||l.outside>0?1:0));if(!u)return l;var f=u.find(1);if(f.line==n)return f;o=Fe(r,n=f.line)}}function qa(e,t,i,r){r-=Fn(t);var n=t.text.length,a=X(function(o){return er(e,i,o-1).bottom<=r},n,0);return n=X(function(o){return er(e,i,o).top>r},a,n),{begin:a,end:n}}function Ga(e,t,i,r){i||(i=_r(e,t));var n=Pi(e,t,er(e,i,r),"line").top;return qa(e,t,i,n)}function Ln(e,t,i,r){return e.bottom<=i?!1:e.top>i?!0:(r?e.left:e.right)>t}function ql(e,t,i,r,n){n-=nr(t);var a=_r(e,t),o=Fn(t),l=0,u=t.text.length,f=!0,p=g(t,e.doc.direction);if(p){var x=(e.options.lineWrapping?Kl:Gl)(e,t,i,a,p,r,n);f=x.level!=1,l=f?x.from:x.to-1,u=f?x.to:x.from-1}var L=null,k=null,U=X(function(Be){var Ae=er(e,a,Be);return Ae.top+=o,Ae.bottom+=o,Ln(Ae,r,n,!1)?(Ae.top<=n&&Ae.left<=r&&(L=Be,k=Ae),!0):!1},l,u),K,ie,ce=!1;if(k){var ge=r-k.left<k.right-r,he=ge==f;U=L+(he?0:1),ie=he?"after":"before",K=ge?k.left:k.right}else{!f&&(U==u||U==l)&&U++,ie=U==0?"after":U==t.text.length?"before":er(e,a,U-(f?1:0)).bottom+o<=n==f?"after":"before";var xe=Xt(e,te(i,U,ie),"line",t,a);K=xe.left,ce=n<xe.top?-1:n>=xe.bottom?1:0}return U=R(t.text,U,1),An(i,U,ie,ce,r-K)}function Gl(e,t,i,r,n,a,o){var l=X(function(x){var L=n[x],k=L.level!=1;return Ln(Xt(e,te(i,k?L.to:L.from,k?"before":"after"),"line",t,r),a,o,!0)},0,n.length-1),u=n[l];if(l>0){var f=u.level!=1,p=Xt(e,te(i,f?u.from:u.to,f?"after":"before"),"line",t,r);Ln(p,a,o,!0)&&p.top>o&&(u=n[l-1])}return u}function Kl(e,t,i,r,n,a,o){var l=qa(e,t,r,o),u=l.begin,f=l.end;/\s/.test(t.text.charAt(f-1))&&f--;for(var p=null,x=null,L=0;L<n.length;L++){var k=n[L];if(!(k.from>=f||k.to<=u)){var U=k.level!=1,K=er(e,r,U?Math.min(f,k.to)-1:Math.max(u,k.from)).right,ie=K<a?a-K+1e9:K-a;(!p||x>ie)&&(p=k,x=ie)}}return p||(p=n[n.length-1]),p.from<u&&(p={from:u,to:p.to,level:p.level}),p.to>f&&(p={from:p.from,to:f,level:p.level}),p}var wr;function zr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(wr==null){wr=Z("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)wr.appendChild(document.createTextNode("x")),wr.appendChild(Z("br"));wr.appendChild(document.createTextNode("x"))}Me(e.measure,wr);var i=wr.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),ne(e.measure),i||1}function Rr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=Z("span","xxxxxxxxxx"),i=Z("pre",[t],"CodeMirror-line-like");Me(e.measure,i);var r=t.getBoundingClientRect(),n=(r.right-r.left)/10;return n>2&&(e.cachedCharWidth=n),n||10}function Tn(e){for(var t=e.display,i={},r={},n=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var l=e.display.gutterSpecs[o].className;i[l]=a.offsetLeft+a.clientLeft+n,r[l]=a.clientWidth}return{fixedPos:Bn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Bn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ka(e){var t=zr(e.display),i=e.options.lineWrapping,r=i&&Math.max(5,e.display.scroller.clientWidth/Rr(e.display)-3);return function(n){if(fr(e.doc,n))return 0;var a=0;if(n.widgets)for(var o=0;o<n.widgets.length;o++)n.widgets[o].height&&(a+=n.widgets[o].height);return i?a+(Math.ceil(n.text.length/r)||1)*t:a+t}}function Mn(e){var t=e.doc,i=Ka(e);t.iter(function(r){var n=i(r);n!=r.height&&Jt(r,n)})}function kr(e,t,i,r){var n=e.display;if(!i&&Xe(t).getAttribute("cm-not-content")=="true")return null;var a,o,l=n.lineSpace.getBoundingClientRect();try{a=t.clientX-l.left,o=t.clientY-l.top}catch(x){return null}var u=En(e,a,o),f;if(r&&u.xRel>0&&(f=Fe(e.doc,u.line).text).length==u.ch){var p=He(f,f.length,e.options.tabSize)-f.length;u=te(u.line,Math.max(0,Math.round((a-Na(e.display).left)/Rr(e.display))-p))}return u}function Sr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var i=e.display.view,r=0;r<i.length;r++)if(t-=i[r].size,t<0)return r}function Mt(e,t,i,r){t==null&&(t=e.doc.first),i==null&&(i=e.doc.first+e.doc.size),r||(r=0);var n=e.display;if(r&&i<n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>t)&&(n.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=n.viewTo)ir&&yn(e.doc,t)<n.viewTo&&hr(e);else if(i<=n.viewFrom)ir&&wa(e.doc,i+r)>n.viewFrom?hr(e):(n.viewFrom+=r,n.viewTo+=r);else if(t<=n.viewFrom&&i>=n.viewTo)hr(e);else if(t<=n.viewFrom){var a=Ui(e,i,i+r,1);a?(n.view=n.view.slice(a.index),n.viewFrom=a.lineN,n.viewTo+=r):hr(e)}else if(i>=n.viewTo){var o=Ui(e,t,t,-1);o?(n.view=n.view.slice(0,o.index),n.viewTo=o.lineN):hr(e)}else{var l=Ui(e,t,t,-1),u=Ui(e,i,i+r,1);l&&u?(n.view=n.view.slice(0,l.index).concat(zi(e,l.lineN,u.lineN)).concat(n.view.slice(u.index)),n.viewTo+=r):hr(e)}var f=n.externalMeasured;f&&(i<f.lineN?f.lineN+=r:t<f.lineN+f.size&&(n.externalMeasured=null))}function cr(e,t,i){e.curOp.viewChanged=!0;var r=e.display,n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var a=r.view[Sr(e,t)];if(a.node!=null){var o=a.changes||(a.changes=[]);qe(o,i)==-1&&o.push(i)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ui(e,t,i,r){var n=Sr(e,t),a,o=e.display.view;if(!ir||i==e.doc.first+e.doc.size)return{index:n,lineN:i};for(var l=e.display.viewFrom,u=0;u<n;u++)l+=o[u].size;if(l!=t){if(r>0){if(n==o.length-1)return null;a=l+o[n].size-t,n++}else a=l-t;t+=a,i+=a}for(;yn(e.doc,i)!=i;){if(n==(r<0?0:o.length-1))return null;i+=r*o[n-(r<0?1:0)].size,n+=r}return{index:n,lineN:i}}function Xl(e,t,i){var r=e.display,n=r.view;n.length==0||t>=r.viewTo||i<=r.viewFrom?(r.view=zi(e,t,i),r.viewFrom=t):(r.viewFrom>t?r.view=zi(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Sr(e,t))),r.viewFrom=t,r.viewTo<i?r.view=r.view.concat(zi(e,r.viewTo,i)):r.viewTo>i&&(r.view=r.view.slice(0,Sr(e,i)))),r.viewTo=i}function Xa(e){for(var t=e.display.view,i=0,r=0;r<t.length;r++){var n=t[r];!n.hidden&&(!n.node||n.changes)&&++i}return i}function li(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ya(e,t){t===void 0&&(t=!0);var i=e.doc,r={},n=r.cursors=document.createDocumentFragment(),a=r.selection=document.createDocumentFragment(),o=e.options.$customCursor;o&&(t=!0);for(var l=0;l<i.sel.ranges.length;l++)if(!(!t&&l==i.sel.primIndex)){var u=i.sel.ranges[l];if(!(u.from().line>=e.display.viewTo||u.to().line<e.display.viewFrom)){var f=u.empty();if(o){var p=o(e,u);p&&Nn(e,p,n)}else(f||e.options.showCursorWhenSelecting)&&Nn(e,u.head,n);f||Yl(e,u,a)}}return r}function Nn(e,t,i){var r=Xt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),n=i.appendChild(Z("div","\xA0","CodeMirror-cursor"));if(n.style.left=r.left+"px",n.style.top=r.top+"px",n.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var a=Wi(e,t,"div",null,null),o=a.right-a.left;n.style.width=(o>0?o:e.defaultCharWidth())+"px"}if(r.other){var l=i.appendChild(Z("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=r.other.left+"px",l.style.top=r.other.top+"px",l.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function ji(e,t){return e.top-t.top||e.left-t.left}function Yl(e,t,i){var r=e.display,n=e.doc,a=document.createDocumentFragment(),o=Na(e.display),l=o.left,u=Math.max(r.sizerWidth,Cr(e)-r.sizer.offsetLeft)-o.right,f=n.direction=="ltr";function p(he,xe,Be,Ae){xe<0&&(xe=0),xe=Math.round(xe),Ae=Math.round(Ae),a.appendChild(Z("div",null,"CodeMirror-selected","position: absolute; left: "+he+`px;
|
|
top: `+xe+"px; width: "+(Be==null?u-he:Be)+`px;
|
|
height: `+(Ae-xe)+"px"))}function x(he,xe,Be){var Ae=Fe(n,he),ze=Ae.text.length,Ve,xt;function nt(ft,Ot){return Wi(e,te(he,ft),"div",Ae,Ot)}function Rt(ft,Ot,bt){var pt=Ga(e,Ae,null,ft),ct=Ot=="ltr"==(bt=="after")?"left":"right",ot=bt=="after"?pt.begin:pt.end-(/\s/.test(Ae.text.charAt(pt.end-1))?2:1);return nt(ot,ct)[ct]}var It=g(Ae,n.direction);return de(It,xe||0,Be==null?ze:Be,function(ft,Ot,bt,pt){var ct=bt=="ltr",ot=nt(ft,ct?"left":"right"),Ht=nt(Ot-1,ct?"right":"left"),$r=xe==null&&ft==0,xr=Be==null&&Ot==ze,kt=pt==0,tr=!It||pt==It.length-1;if(Ht.top-ot.top<=3){var yt=(f?$r:xr)&&kt,aa=(f?xr:$r)&&tr,ur=yt?l:(ct?ot:Ht).left,Tr=aa?u:(ct?Ht:ot).right;p(ur,ot.top,Tr-ur,ot.bottom)}else{var Br,Et,Vr,oa;ct?(Br=f&&$r&&kt?l:ot.left,Et=f?u:Rt(ft,bt,"before"),Vr=f?l:Rt(Ot,bt,"after"),oa=f&&xr&&tr?u:Ht.right):(Br=f?Rt(ft,bt,"before"):l,Et=!f&&$r&&kt?u:ot.right,Vr=!f&&xr&&tr?l:Ht.left,oa=f?Rt(Ot,bt,"after"):u),p(Br,ot.top,Et-Br,ot.bottom),ot.bottom<Ht.top&&p(l,ot.bottom,null,Ht.top),p(Vr,Ht.top,oa-Vr,Ht.bottom)}(!Ve||ji(ot,Ve)<0)&&(Ve=ot),ji(Ht,Ve)<0&&(Ve=Ht),(!xt||ji(ot,xt)<0)&&(xt=ot),ji(Ht,xt)<0&&(xt=Ht)}),{start:Ve,end:xt}}var L=t.from(),k=t.to();if(L.line==k.line)x(L.line,L.ch,k.ch);else{var U=Fe(n,L.line),K=Fe(n,k.line),ie=Kt(U)==Kt(K),ce=x(L.line,L.ch,ie?U.text.length+1:null).end,ge=x(k.line,ie?0:null,k.ch).start;ie&&(ce.top<ge.top-2?(p(ce.right,ce.top,null,ce.bottom),p(l,ge.top,ge.left,ge.bottom)):p(ce.right,ce.top,ge.left-ce.right,ce.bottom)),ce.bottom<ge.top&&p(l,ce.bottom,null,ge.top)}i.appendChild(a)}function In(e){if(!!e.state.focused){var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Pr(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Za(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Hn(e))}function On(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Pr(e))},100)}function Hn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(A(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(),T&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),In(e))}function Pr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(A(e,"blur",e,t),e.state.focused=!1,Re(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function qi(e){for(var t=e.display,i=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),n=t.lineDiv.getBoundingClientRect().top,a=0,o=0;o<t.view.length;o++){var l=t.view[o],u=e.options.lineWrapping,f=void 0,p=0;if(!l.hidden){if(n+=l.line.height,w&&F<8){var x=l.node.offsetTop+l.node.offsetHeight;f=x-i,i=x}else{var L=l.node.getBoundingClientRect();f=L.bottom-L.top,!u&&l.text.firstChild&&(p=l.text.firstChild.getBoundingClientRect().right-L.left-1)}var k=l.line.height-f;if((k>.005||k<-.005)&&(n<r&&(a-=k),Jt(l.line,f),Qa(l.line),l.rest))for(var U=0;U<l.rest.length;U++)Qa(l.rest[U]);if(p>e.display.sizerWidth){var K=Math.ceil(p/Rr(e.display));K>e.display.maxLineLength&&(e.display.maxLineLength=K,e.display.maxLine=l.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Qa(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],r=i.node.parentNode;r&&(i.height=r.offsetHeight)}}function Gi(e,t,i){var r=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;r=Math.floor(r-Ri(e));var n=i&&i.bottom!=null?i.bottom:r+e.wrapper.clientHeight,a=br(t,r),o=br(t,n);if(i&&i.ensure){var l=i.ensure.from.line,u=i.ensure.to.line;l<a?(a=l,o=br(t,nr(Fe(t,l))+e.wrapper.clientHeight)):Math.min(u,t.lastLine())>=o&&(a=br(t,nr(Fe(t,u))-e.wrapper.clientHeight),o=u)}return{from:a,to:Math.max(o,a+1)}}function Zl(e,t){if(!S(e,"scrollCursorIntoView")){var i=e.display,r=i.sizer.getBoundingClientRect(),n=null,a=i.wrapper.ownerDocument;if(t.top+r.top<0?n=!0:t.bottom+r.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(n=!1),n!=null&&!pe){var o=Z("div","\u200B",null,`position: absolute;
|
|
top: `+(t.top-i.viewOffset-Ri(e.display))+`px;
|
|
height: `+(t.bottom-t.top+Vt(e)+i.barHeight)+`px;
|
|
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(n),e.display.lineSpace.removeChild(o)}}}function Ql(e,t,i,r){r==null&&(r=0);var n;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?te(t.line,t.ch+1,"before"):t,t=t.ch?te(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var o=!1,l=Xt(e,t),u=!i||i==t?l:Xt(e,i);n={left:Math.min(l.left,u.left),top:Math.min(l.top,u.top)-r,right:Math.max(l.left,u.left),bottom:Math.max(l.bottom,u.bottom)+r};var f=_n(e,n),p=e.doc.scrollTop,x=e.doc.scrollLeft;if(f.scrollTop!=null&&(si(e,f.scrollTop),Math.abs(e.doc.scrollTop-p)>1&&(o=!0)),f.scrollLeft!=null&&(Fr(e,f.scrollLeft),Math.abs(e.doc.scrollLeft-x)>1&&(o=!0)),!o)break}return n}function Jl(e,t){var i=_n(e,t);i.scrollTop!=null&&si(e,i.scrollTop),i.scrollLeft!=null&&Fr(e,i.scrollLeft)}function _n(e,t){var i=e.display,r=zr(e.display);t.top<0&&(t.top=0);var n=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,a=kn(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var l=e.doc.height+wn(i),u=t.top<r,f=t.bottom>l-r;if(t.top<n)o.scrollTop=u?0:t.top;else if(t.bottom>n+a){var p=Math.min(t.top,(f?l:t.bottom)-a);p!=n&&(o.scrollTop=p)}var x=e.options.fixedGutter?0:i.gutters.offsetWidth,L=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-x,k=Cr(e)-i.gutters.offsetWidth,U=t.right-t.left>k;return U&&(t.right=t.left+k),t.left<10?o.scrollLeft=0:t.left<L?o.scrollLeft=Math.max(0,t.left+x-(U?0:10)):t.right>k+L-3&&(o.scrollLeft=t.right+(U?0:10)-k),o}function zn(e,t){t!=null&&(Ki(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Wr(e){Ki(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function ui(e,t,i){(t!=null||i!=null)&&Ki(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function $l(e,t){Ki(e),e.curOp.scrollToPos=t}function Ki(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=ja(e,t.from),r=ja(e,t.to);Ja(e,i,r,t.margin)}}function Ja(e,t,i,r){var n=_n(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-r,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+r});ui(e,n.scrollLeft,n.scrollTop)}function si(e,t){Math.abs(e.doc.scrollTop-t)<2||(q||Pn(e,{top:t}),$a(e,t,!0),q&&Pn(e),hi(e,100))}function $a(e,t,i){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!i)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Fr(e,t,i,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((i?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 fi(e){var t=e.display,i=t.gutters.offsetWidth,r=Math.round(e.doc.height+wn(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?i:0,docHeight:r,scrollHeight:r+Vt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var Ar=function(e,t,i){this.cm=i;var r=this.vert=Z("div",[Z("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n=this.horiz=Z("div",[Z("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=n.tabIndex=-1,e(r),e(n),v(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),v(n,"scroll",function(){n.clientWidth&&t(n.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,w&&F<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ar.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var n=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+n)+"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=i?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(i?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:i?r:0,bottom:t?r:0}},Ar.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ar.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ar.prototype.zeroWidthHack=function(){var e=I&&!se?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Ee,this.disableVert=new Ee},Ar.prototype.enableZeroWidthBar=function(e,t,i){e.style.visibility="";function r(){var n=e.getBoundingClientRect(),a=i=="vert"?document.elementFromPoint(n.right-1,(n.top+n.bottom)/2):document.elementFromPoint((n.right+n.left)/2,n.bottom-1);a!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Ar.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ci=function(){};ci.prototype.update=function(){return{bottom:0,right:0}},ci.prototype.setScrollLeft=function(){},ci.prototype.setScrollTop=function(){},ci.prototype.clear=function(){};function Ur(e,t){t||(t=fi(e));var i=e.display.barWidth,r=e.display.barHeight;Va(e,t);for(var n=0;n<4&&i!=e.display.barWidth||r!=e.display.barHeight;n++)i!=e.display.barWidth&&e.options.lineWrapping&&qi(e),Va(e,fi(e)),i=e.display.barWidth,r=e.display.barHeight}function Va(e,t){var i=e.display,r=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=r.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=r.bottom)+"px",i.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=r.bottom+"px",i.scrollbarFiller.style.width=r.right+"px"):i.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=r.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var eo={native:Ar,null:ci};function to(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Re(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new eo[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),v(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?Fr(e,t):si(e,t)},e),e.display.scrollbars.addClass&&ke(e.display.wrapper,e.display.scrollbars.addClass)}var Vl=0;function Er(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 Lr(e){var t=e.curOp;t&&Ml(t,function(i){for(var r=0;r<i.ops.length;r++)i.ops[r].cm.curOp=null;eu(i)})}function eu(e){for(var t=e.ops,i=0;i<t.length;i++)tu(t[i]);for(var r=0;r<t.length;r++)ru(t[r]);for(var n=0;n<t.length;n++)iu(t[n]);for(var a=0;a<t.length;a++)nu(t[a]);for(var o=0;o<t.length;o++)au(t[o])}function tu(e){var t=e.cm,i=t.display;lu(t),e.updateMaxLine&&bn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Xi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ru(e){e.updatedDisplay=e.mustUpdate&&Rn(e.cm,e.update)}function iu(e){var t=e.cm,i=t.display;e.updatedDisplay&&qi(t),e.barMeasure=fi(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Oa(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+Vt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-Cr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function nu(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Fr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==$(rt(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ur(t,e.barMeasure),e.updatedDisplay&&Un(t,e.barMeasure),e.selectionChanged&&In(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&Za(e.cm)}function au(e){var t=e.cm,i=t.display,r=t.doc;if(e.updatedDisplay&&ro(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&$a(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Fr(t,e.scrollLeft,!0,!0),e.scrollToPos){var n=Ql(t,Oe(r,e.scrollToPos.from),Oe(r,e.scrollToPos.to),e.scrollToPos.margin);Zl(t,n)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var l=0;l<a.length;++l)a[l].lines.length||A(a[l],"hide");if(o)for(var u=0;u<o.length;++u)o[u].lines.length&&A(o[u],"unhide");i.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&A(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function zt(e,t){if(e.curOp)return t();Er(e);try{return t()}finally{Lr(e)}}function vt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Er(e);try{return t.apply(e,arguments)}finally{Lr(e)}}}function At(e){return function(){if(this.curOp)return e.apply(this,arguments);Er(this);try{return e.apply(this,arguments)}finally{Lr(this)}}}function mt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Er(t);try{return e.apply(this,arguments)}finally{Lr(t)}}}function hi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,c(ou,e))}function ou(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var i=+new Date+e.options.workTime,r=ti(e,t.highlightFrontier),n=[];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,l=a.text.length>e.options.maxHighlightLength?Wt(t.mode,r.state):null,u=sa(e,a,r,!0);l&&(r.state=l),a.styles=u.styles;var f=a.styleClasses,p=u.classes;p?a.styleClasses=p:f&&(a.styleClasses=null);for(var x=!o||o.length!=a.styles.length||f!=p&&(!f||!p||f.bgClass!=p.bgClass||f.textClass!=p.textClass),L=0;!x&&L<o.length;++L)x=o[L]!=a.styles[L];x&&n.push(r.line),a.stateAfter=r.save(),r.nextLine()}else a.text.length<=e.options.maxHighlightLength&&gn(e,a.text,r),a.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>i)return hi(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),n.length&&zt(e,function(){for(var a=0;a<n.length;a++)cr(e,n[a],"text")})}}var Xi=function(e,t,i){var r=e.display;this.viewport=t,this.visible=Gi(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Cr(e),this.force=i,this.dims=Tn(e),this.events=[]};Xi.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},Xi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)A.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=Vt(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Vt(e)+"px",t.scrollbarsClipped=!0)}function uu(e){if(e.hasFocus())return null;var t=$(rt(e));if(!t||!oe(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var r=m(e).getSelection();r.anchorNode&&r.extend&&oe(e.display.lineDiv,r.anchorNode)&&(i.anchorNode=r.anchorNode,i.anchorOffset=r.anchorOffset,i.focusNode=r.focusNode,i.focusOffset=r.focusOffset)}return i}function su(e){if(!(!e||!e.activeElt||e.activeElt==$(e.activeElt.ownerDocument))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&oe(document.body,e.anchorNode)&&oe(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,i=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),i.removeAllRanges(),i.addRange(r),i.extend(e.focusNode,e.focusOffset)}}function Rn(e,t){var i=e.display,r=e.doc;if(t.editorIsHidden)return hr(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&Xa(e)==0)return!1;no(e)&&(hr(e),t.dims=Tn(e));var n=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(n,t.visible.to+e.options.viewportMargin);i.viewFrom<a&&a-i.viewFrom<20&&(a=Math.max(r.first,i.viewFrom)),i.viewTo>o&&i.viewTo-o<20&&(o=Math.min(n,i.viewTo)),ir&&(a=yn(e.doc,a),o=wa(e.doc,o));var l=a!=i.viewFrom||o!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Xl(e,a,o),i.viewOffset=nr(Fe(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var u=Xa(e);if(!l&&u==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var f=uu(e);return u>4&&(i.lineDiv.style.display="none"),fu(e,i.updateLineNumbers,t.dims),u>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,su(f),ne(i.cursorDiv),ne(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,hi(e,400)),i.updateLineNumbers=null,!0}function ro(e,t){for(var i=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==Cr(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+wn(e.display)-kn(e),i.top)}),t.visible=Gi(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Gi(e.display,e.doc,i));if(!Rn(e,t))break;qi(e);var n=fi(e);li(e),Ur(e,n),Un(e,n),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 Pn(e,t){var i=new Xi(e,t);if(Rn(e,i)){qi(e),ro(e,i);var r=fi(e);li(e),Ur(e,r),Un(e,r),i.finish()}}function fu(e,t,i){var r=e.display,n=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function l(U){var K=U.nextSibling;return T&&I&&e.display.currentWheelTarget==U?U.style.display="none":U.parentNode.removeChild(U),K}for(var u=r.view,f=r.viewFrom,p=0;p<u.length;p++){var x=u[p];if(!x.hidden)if(!x.node||x.node.parentNode!=a){var L=_l(e,x,f,i);a.insertBefore(L,o)}else{for(;o!=x.node;)o=l(o);var k=n&&t!=null&&t<=f&&x.lineNumber;x.changes&&(qe(x.changes,"gutter")>-1&&(k=!1),Ea(e,x,f,i)),k&&(ne(x.lineNumber),x.lineNumber.appendChild(document.createTextNode(hn(e.options,f)))),o=x.node.nextSibling}f+=x.size}for(;o;)o=l(o)}function Wn(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",gt(e,"gutterChanged",e)}function Un(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+Vt(e)+"px"}function io(e){var t=e.display,i=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Bn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,n=t.gutters.offsetWidth,a=r+"px",o=0;o<i.length;o++)if(!i[o].hidden){e.options.fixedGutter&&(i[o].gutter&&(i[o].gutter.style.left=a),i[o].gutterBackground&&(i[o].gutterBackground.style.left=a));var l=i[o].alignable;if(l)for(var u=0;u<l.length;u++)l[u].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=r+n+"px")}}function no(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=hn(e.options,t.first+t.size-1),r=e.display;if(i.length!=r.lineNumChars){var n=r.measure.appendChild(Z("div",[Z("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=n.firstChild.offsetWidth,o=n.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?i.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Wn(e.display),!0}return!1}function jn(e,t){for(var i=[],r=!1,n=0;n<e.length;n++){var a=e[n],o=null;if(typeof a!="string"&&(o=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)r=!0;else continue;i.push({className:a,style:o})}return t&&!r&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function ao(e){var t=e.gutters,i=e.gutterSpecs;ne(t),e.lineGutter=null;for(var r=0;r<i.length;++r){var n=i[r],a=n.className,o=n.style,l=t.appendChild(Z("div",null,"CodeMirror-gutter "+a));o&&(l.style.cssText=o),a=="CodeMirror-linenumbers"&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",Wn(e)}function di(e){ao(e.display),Mt(e),io(e)}function cu(e,t,i,r){var n=this;this.input=i,n.scrollbarFiller=Z("div",null,"CodeMirror-scrollbar-filler"),n.scrollbarFiller.setAttribute("cm-not-content","true"),n.gutterFiller=Z("div",null,"CodeMirror-gutter-filler"),n.gutterFiller.setAttribute("cm-not-content","true"),n.lineDiv=je("div",null,"CodeMirror-code"),n.selectionDiv=Z("div",null,null,"position: relative; z-index: 1"),n.cursorDiv=Z("div",null,"CodeMirror-cursors"),n.measure=Z("div",null,"CodeMirror-measure"),n.lineMeasure=Z("div",null,"CodeMirror-measure"),n.lineSpace=je("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none");var a=je("div",[n.lineSpace],"CodeMirror-lines");n.mover=Z("div",[a],null,"position: relative"),n.sizer=Z("div",[n.mover],"CodeMirror-sizer"),n.sizerWidth=null,n.heightForcer=Z("div",null,null,"position: absolute; height: "+Ct+"px; width: 1px;"),n.gutters=Z("div",null,"CodeMirror-gutters"),n.lineGutter=null,n.scroller=Z("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll"),n.scroller.setAttribute("tabIndex","-1"),n.wrapper=Z("div",[n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),ee&&G>=105&&(n.wrapper.style.clipPath="inset(0px)"),n.wrapper.setAttribute("translate","no"),w&&F<8&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),!T&&!(q&&P)&&(n.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper)),n.viewFrom=n.viewTo=t.first,n.reportedViewFrom=n.reportedViewTo=t.first,n.view=[],n.renderedView=null,n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.nativeBarWidth=n.barHeight=n.barWidth=0,n.scrollbarsClipped=!1,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.alignWidgets=!1,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null,n.activeTouch=null,n.gutterSpecs=jn(r.gutters,r.lineNumbers),ao(n),i.init(n)}var Yi=0,or=null;w?or=-.53:q?or=15:ee?or=-.7:ue&&(or=-1/3);function oo(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function hu(e){var t=oo(e);return t.x*=or,t.y*=or,t}function lo(e,t){ee&&G==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 i=oo(t),r=i.x,n=i.y,a=or;t.deltaMode===0&&(r=t.deltaX,n=t.deltaY,a=1);var o=e.display,l=o.scroller,u=l.scrollWidth>l.clientWidth,f=l.scrollHeight>l.clientHeight;if(!!(r&&u||n&&f)){if(n&&I&&T){e:for(var p=t.target,x=o.view;p!=l;p=p.parentNode)for(var L=0;L<x.length;L++)if(x[L].node==p){e.display.currentWheelTarget=p;break e}}if(r&&!q&&!j&&a!=null){n&&f&&si(e,Math.max(0,l.scrollTop+n*a)),Fr(e,Math.max(0,l.scrollLeft+r*a)),(!n||n&&f)&&Se(t),o.wheelStartX=null;return}if(n&&a!=null){var k=n*a,U=e.doc.scrollTop,K=U+o.wrapper.clientHeight;k<0?U=Math.max(0,U+k-50):K=Math.min(e.doc.height,K+k+50),Pn(e,{top:U,bottom:K})}Yi<20&&t.deltaMode!==0&&(o.wheelStartX==null?(o.wheelStartX=l.scrollLeft,o.wheelStartY=l.scrollTop,o.wheelDX=r,o.wheelDY=n,setTimeout(function(){if(o.wheelStartX!=null){var ie=l.scrollLeft-o.wheelStartX,ce=l.scrollTop-o.wheelStartY,ge=ce&&o.wheelDY&&ce/o.wheelDY||ie&&o.wheelDX&&ie/o.wheelDX;o.wheelStartX=o.wheelStartY=null,ge&&(or=(or*Yi+ge)/(Yi+1),++Yi)}},200)):(o.wheelDX+=r,o.wheelDY+=n))}}var Ut=function(e,t){this.ranges=e,this.primIndex=t};Ut.prototype.primary=function(){return this.ranges[this.primIndex]},Ut.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 i=this.ranges[t],r=e.ranges[t];if(!dn(i.anchor,r.anchor)||!dn(i.head,r.head))return!1}return!0},Ut.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ze(pn(this.ranges[t].anchor),pn(this.ranges[t].head));return new Ut(e,this.primIndex)},Ut.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Ut.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var r=this.ranges[i];if(Ie(t,r.from())>=0&&Ie(e,r.to())<=0)return i}return-1};var Ze=function(e,t){this.anchor=e,this.head=t};Ze.prototype.from=function(){return Bi(this.anchor,this.head)},Ze.prototype.to=function(){return Ti(this.anchor,this.head)},Ze.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Yt(e,t,i){var r=e&&e.options.selectionsMayTouch,n=t[i];t.sort(function(L,k){return Ie(L.from(),k.from())}),i=qe(t,n);for(var a=1;a<t.length;a++){var o=t[a],l=t[a-1],u=Ie(l.to(),o.from());if(r&&!o.empty()?u>0:u>=0){var f=Bi(l.from(),o.from()),p=Ti(l.to(),o.to()),x=l.empty()?o.from()==o.head:l.from()==l.head;a<=i&&--i,t.splice(--a,2,new Ze(x?p:f,x?f:p))}}return new Ut(t,i)}function dr(e,t){return new Ut([new Ze(e,t||e)],0)}function pr(e){return e.text?te(e.from.line+e.text.length-1,_e(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function uo(e,t){if(Ie(e,t.from)<0)return e;if(Ie(e,t.to)<=0)return pr(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=pr(t).ch-t.to.ch),te(i,r)}function qn(e,t){for(var i=[],r=0;r<e.sel.ranges.length;r++){var n=e.sel.ranges[r];i.push(new Ze(uo(n.anchor,t),uo(n.head,t)))}return Yt(e.cm,i,e.sel.primIndex)}function so(e,t,i){return e.line==t.line?te(i.line,e.ch-t.ch+i.ch):te(i.line+(e.line-t.line),e.ch)}function du(e,t,i){for(var r=[],n=te(e.first,0),a=n,o=0;o<t.length;o++){var l=t[o],u=so(l.from,n,a),f=so(pr(l),n,a);if(n=l.to,a=f,i=="around"){var p=e.sel.ranges[o],x=Ie(p.head,p.anchor)<0;r[o]=new Ze(x?f:u,x?u:f)}else r[o]=new Ze(u,u)}return new Ut(r,e.sel.primIndex)}function Gn(e){e.doc.mode=Pt(e.options,e.doc.modeOption),pi(e)}function pi(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,hi(e,100),e.state.modeGen++,e.curOp&&Mt(e)}function fo(e,t){return t.from.ch==0&&t.to.ch==0&&_e(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Kn(e,t,i,r){function n(ge){return i?i[ge]:null}function a(ge,he,xe){bl(ge,he,xe,r),gt(ge,"change",ge,t)}function o(ge,he){for(var xe=[],Be=ge;Be<he;++Be)xe.push(new Or(f[Be],n(Be),r));return xe}var l=t.from,u=t.to,f=t.text,p=Fe(e,l.line),x=Fe(e,u.line),L=_e(f),k=n(f.length-1),U=u.line-l.line;if(t.full)e.insert(0,o(0,f.length)),e.remove(f.length,e.size-f.length);else if(fo(e,t)){var K=o(0,f.length-1);a(x,x.text,k),U&&e.remove(l.line,U),K.length&&e.insert(l.line,K)}else if(p==x)if(f.length==1)a(p,p.text.slice(0,l.ch)+L+p.text.slice(u.ch),k);else{var ie=o(1,f.length-1);ie.push(new Or(L+p.text.slice(u.ch),k,r)),a(p,p.text.slice(0,l.ch)+f[0],n(0)),e.insert(l.line+1,ie)}else if(f.length==1)a(p,p.text.slice(0,l.ch)+f[0]+x.text.slice(u.ch),n(0)),e.remove(l.line+1,U);else{a(p,p.text.slice(0,l.ch)+f[0],n(0)),a(x,L+x.text.slice(u.ch),k);var ce=o(1,f.length-1);U>1&&e.remove(l.line+1,U-1),e.insert(l.line+1,ce)}gt(e,"change",e,t)}function gr(e,t,i){function r(n,a,o){if(n.linked)for(var l=0;l<n.linked.length;++l){var u=n.linked[l];if(u.doc!=a){var f=o&&u.sharedHist;i&&!f||(t(u.doc,f),r(u.doc,n,f))}}}r(e,null,!0)}function co(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Mn(e),Gn(e),ho(e),e.options.direction=t.direction,e.options.lineWrapping||bn(e),e.options.mode=t.modeOption,Mt(e)}function ho(e){(e.doc.direction=="rtl"?ke:Re)(e.display.lineDiv,"CodeMirror-rtl")}function pu(e){zt(e,function(){ho(e),Mt(e)})}function Zi(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 Xn(e,t){var i={from:pn(t.from),to:pr(t),text:Dr(e,t.from,t.to)};return vo(e,i,t.from.line,t.to.line+1),gr(e,function(r){return vo(r,i,t.from.line,t.to.line+1)},!0),i}function po(e){for(;e.length;){var t=_e(e);if(t.ranges)e.pop();else break}}function gu(e,t){if(t)return po(e.done),_e(e.done);if(e.done.length&&!_e(e.done).ranges)return _e(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),_e(e.done)}function go(e,t,i,r){var n=e.history;n.undone.length=0;var a=+new Date,o,l;if((n.lastOp==r||n.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&n.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=gu(n,n.lastOp==r)))l=_e(o.changes),Ie(t.from,t.to)==0&&Ie(t.from,l.to)==0?l.to=pr(t):o.changes.push(Xn(e,t));else{var u=_e(n.done);for((!u||!u.ranges)&&Qi(e.sel,n.done),o={changes:[Xn(e,t)],generation:n.generation},n.done.push(o);n.done.length>n.undoDepth;)n.done.shift(),n.done[0].ranges||n.done.shift()}n.done.push(i),n.generation=++n.maxGeneration,n.lastModTime=n.lastSelTime=a,n.lastOp=n.lastSelOp=r,n.lastOrigin=n.lastSelOrigin=t.origin,l||A(e,"historyAdded")}function vu(e,t,i,r){var n=t.charAt(0);return n=="*"||n=="+"&&i.ranges.length==r.ranges.length&&i.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function mu(e,t,i,r){var n=e.history,a=r&&r.origin;i==n.lastSelOp||a&&n.lastSelOrigin==a&&(n.lastModTime==n.lastSelTime&&n.lastOrigin==a||vu(e,a,_e(n.done),t))?n.done[n.done.length-1]=t:Qi(t,n.done),n.lastSelTime=+new Date,n.lastSelOrigin=a,n.lastSelOp=i,r&&r.clearRedo!==!1&&po(n.undone)}function Qi(e,t){var i=_e(t);i&&i.ranges&&i.equals(e)||t.push(e)}function vo(e,t,i,r){var n=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,r),function(o){o.markedSpans&&((n||(n=t["spans_"+e.id]={}))[a]=o.markedSpans),++a})}function xu(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}function yu(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var r=[],n=0;n<t.text.length;++n)r.push(xu(i[n]));return r}function mo(e,t){var i=yu(e,t),r=mn(e,t);if(!i)return r;if(!r)return i;for(var n=0;n<i.length;++n){var a=i[n],o=r[n];if(a&&o){e:for(var l=0;l<o.length;++l){for(var u=o[l],f=0;f<a.length;++f)if(a[f].marker==u.marker)continue e;a.push(u)}}else o&&(i[n]=o)}return i}function jr(e,t,i){for(var r=[],n=0;n<e.length;++n){var a=e[n];if(a.ranges){r.push(i?Ut.prototype.deepCopy.call(a):a);continue}var o=a.changes,l=[];r.push({changes:l});for(var u=0;u<o.length;++u){var f=o[u],p=void 0;if(l.push({from:f.from,to:f.to,text:f.text}),t)for(var x in f)(p=x.match(/^spans_(\d+)$/))&&qe(t,Number(p[1]))>-1&&(_e(l)[x]=f[x],delete f[x])}}return r}function Yn(e,t,i,r){if(r){var n=e.anchor;if(i){var a=Ie(t,n)<0;a!=Ie(i,n)<0?(n=t,t=i):a!=Ie(t,i)<0&&(t=i)}return new Ze(n,t)}else return new Ze(i||t,t)}function Ji(e,t,i,r,n){n==null&&(n=e.cm&&(e.cm.display.shift||e.extend)),wt(e,new Ut([Yn(e.sel.primary(),t,i,n)],0),r)}function xo(e,t,i){for(var r=[],n=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)r[a]=Yn(e.sel.ranges[a],t[a],null,n);var o=Yt(e.cm,r,e.sel.primIndex);wt(e,o,i)}function Zn(e,t,i,r){var n=e.sel.ranges.slice(0);n[t]=i,wt(e,Yt(e.cm,n,e.sel.primIndex),r)}function yo(e,t,i,r){wt(e,dr(t,i),r)}function Du(e,t,i){var r={ranges:t.ranges,update:function(n){this.ranges=[];for(var a=0;a<n.length;a++)this.ranges[a]=new Ze(Oe(e,n[a].anchor),Oe(e,n[a].head))},origin:i&&i.origin};return A(e,"beforeSelectionChange",e,r),e.cm&&A(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Yt(e.cm,r.ranges,r.ranges.length-1):t}function Do(e,t,i){var r=e.history.done,n=_e(r);n&&n.ranges?(r[r.length-1]=t,$i(e,t,i)):wt(e,t,i)}function wt(e,t,i){$i(e,t,i),mu(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function $i(e,t,i){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=Du(e,t,i));var r=i&&i.bias||(Ie(t.primary().head,e.sel.primary().head)<0?-1:1);bo(e,wo(e,t,r,!0)),!(i&&i.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Wr(e.cm)}function bo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,W(e.cm)),gt(e,"cursorActivity",e))}function Co(e){bo(e,wo(e,e.sel,null,!1))}function wo(e,t,i,r){for(var n,a=0;a<t.ranges.length;a++){var o=t.ranges[a],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],u=Vi(e,o.anchor,l&&l.anchor,i,r),f=o.head==o.anchor?u:Vi(e,o.head,l&&l.head,i,r);(n||u!=o.anchor||f!=o.head)&&(n||(n=t.ranges.slice(0,a)),n[a]=new Ze(u,f))}return n?Yt(e.cm,n,t.primIndex):t}function qr(e,t,i,r,n){var a=Fe(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var l=a.markedSpans[o],u=l.marker,f="selectLeft"in u?!u.selectLeft:u.inclusiveLeft,p="selectRight"in u?!u.selectRight:u.inclusiveRight;if((l.from==null||(f?l.from<=t.ch:l.from<t.ch))&&(l.to==null||(p?l.to>=t.ch:l.to>t.ch))){if(n&&(A(u,"beforeCursorEnter"),u.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!u.atomic)continue;if(i){var x=u.find(r<0?1:-1),L=void 0;if((r<0?p:f)&&(x=ko(e,x,-r,x&&x.line==t.line?a:null)),x&&x.line==t.line&&(L=Ie(x,i))&&(r<0?L<0:L>0))return qr(e,x,t,r,n)}var k=u.find(r<0?-1:1);return(r<0?f:p)&&(k=ko(e,k,r,k.line==t.line?a:null)),k?qr(e,k,t,r,n):null}}return t}function Vi(e,t,i,r,n){var a=r||1,o=qr(e,t,i,a,n)||!n&&qr(e,t,i,a,!0)||qr(e,t,i,-a,n)||!n&&qr(e,t,i,-a,!0);return o||(e.cantEdit=!0,te(e.first,0))}function ko(e,t,i,r){return i<0&&t.ch==0?t.line>e.first?Oe(e,te(t.line-1)):null:i>0&&t.ch==(r||Fe(e,t.line)).text.length?t.line<e.first+e.size-1?te(t.line+1,0):null:new te(t.line,t.ch+i)}function So(e){e.setSelection(te(e.firstLine(),0),te(e.lastLine()),Ke)}function Fo(e,t,i){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return i&&(r.update=function(n,a,o,l){n&&(r.from=Oe(e,n)),a&&(r.to=Oe(e,a)),o&&(r.text=o),l!==void 0&&(r.origin=l)}),A(e,"beforeChange",e,r),e.cm&&A(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,i){if(e.cm){if(!e.cm.curOp)return vt(e.cm,Gr)(e,t,i);if(e.cm.state.suppressEdits)return}if(!((ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))&&(t=Fo(e,t,!0),!t))){var r=va&&!i&&ml(e,t.from,t.to);if(r)for(var n=r.length-1;n>=0;--n)Ao(e,{from:r[n].from,to:r[n].to,text:n?[""]:t.text,origin:t.origin});else Ao(e,t)}}function Ao(e,t){if(!(t.text.length==1&&t.text[0]==""&&Ie(t.from,t.to)==0)){var i=qn(e,t);go(e,t,i,e.cm?e.cm.curOp.id:NaN),gi(e,t,i,mn(e,t));var r=[];gr(e,function(n,a){!a&&qe(r,n.history)==-1&&(Bo(n.history,t),r.push(n.history)),gi(n,t,null,mn(n,t))})}}function en(e,t,i){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!i)){for(var n=e.history,a,o=e.sel,l=t=="undo"?n.done:n.undone,u=t=="undo"?n.undone:n.done,f=0;f<l.length&&(a=l[f],!(i?a.ranges&&!a.equals(e.sel):!a.ranges));f++);if(f!=l.length){for(n.lastOrigin=n.lastSelOrigin=null;;)if(a=l.pop(),a.ranges){if(Qi(a,u),i&&!a.equals(e.sel)){wt(e,a,{clearRedo:!1});return}o=a}else if(r){l.push(a);return}else break;var p=[];Qi(o,u),u.push({changes:p,generation:n.generation}),n.generation=a.generation||++n.maxGeneration;for(var x=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),L=function(K){var ie=a.changes[K];if(ie.origin=t,x&&!Fo(e,ie,!1))return l.length=0,{};p.push(Xn(e,ie));var ce=K?qn(e,ie):_e(l);gi(e,ie,ce,mo(e,ie)),!K&&e.cm&&e.cm.scrollIntoView({from:ie.from,to:pr(ie)});var ge=[];gr(e,function(he,xe){!xe&&qe(ge,he.history)==-1&&(Bo(he.history,ie),ge.push(he.history)),gi(he,ie,null,mo(he,ie))})},k=a.changes.length-1;k>=0;--k){var U=L(k);if(U)return U.v}}}}function Eo(e,t){if(t!=0&&(e.first+=t,e.sel=new Ut(Tt(e.sel.ranges,function(n){return new Ze(te(n.anchor.line+t,n.anchor.ch),te(n.head.line+t,n.head.ch))}),e.sel.primIndex),e.cm)){Mt(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,r=i.viewFrom;r<i.viewTo;r++)cr(e.cm,r,"gutter")}}function gi(e,t,i,r){if(e.cm&&!e.cm.curOp)return vt(e.cm,gi)(e,t,i,r);if(t.to.line<e.first){Eo(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 n=t.text.length-1-(e.first-t.from.line);Eo(e,n),t={from:te(e.first,0),to:te(t.to.line+n,t.to.ch),text:[_e(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:te(a,Fe(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Dr(e,t.from,t.to),i||(i=qn(e,t)),e.cm?bu(e.cm,t,r):Kn(e,t,r),$i(e,i,Ke),e.cantEdit&&Vi(e,te(e.firstLine(),0))&&(e.cantEdit=!1)}}function bu(e,t,i){var r=e.doc,n=e.display,a=t.from,o=t.to,l=!1,u=a.line;e.options.lineWrapping||(u=Je(Kt(Fe(r,a.line))),r.iter(u,o.line+1,function(k){if(k==n.maxLine)return l=!0,!0})),r.sel.contains(t.from,t.to)>-1&&W(e),Kn(r,t,i,Ka(e)),e.options.lineWrapping||(r.iter(u,a.line+t.text.length,function(k){var U=_i(k);U>n.maxLineLength&&(n.maxLine=k,n.maxLineLength=U,n.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),fl(r,a.line),hi(e,400);var f=t.text.length-(o.line-a.line)-1;t.full?Mt(e):a.line==o.line&&t.text.length==1&&!fo(e.doc,t)?cr(e,a.line,"text"):Mt(e,a.line,o.line+1,f);var p=ve(e,"changes"),x=ve(e,"change");if(x||p){var L={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};x&>(e,"change",e,L),p&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(L)}e.display.selForContextMenu=null}function Kr(e,t,i,r,n){var a;r||(r=i),Ie(r,i)<0&&(a=[r,i],i=a[0],r=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Gr(e,{from:i,to:r,text:t,origin:n})}function Lo(e,t,i,r){i<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function To(e,t,i,r){for(var n=0;n<e.length;++n){var a=e[n],o=!0;if(a.ranges){a.copied||(a=e[n]=a.deepCopy(),a.copied=!0);for(var l=0;l<a.ranges.length;l++)Lo(a.ranges[l].anchor,t,i,r),Lo(a.ranges[l].head,t,i,r);continue}for(var u=0;u<a.changes.length;++u){var f=a.changes[u];if(i<f.from.line)f.from=te(f.from.line+r,f.from.ch),f.to=te(f.to.line+r,f.to.ch);else if(t<=f.to.line){o=!1;break}}o||(e.splice(0,n+1),n=0)}}function Bo(e,t){var i=t.from.line,r=t.to.line,n=t.text.length-(r-i)-1;To(e.done,i,r,n),To(e.undone,i,r,n)}function vi(e,t,i,r){var n=t,a=t;return typeof t=="number"?a=Fe(e,la(e,t)):n=Je(t),n==null?null:(r(a,n)&&e.cm&&cr(e.cm,n,i),a)}function mi(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}mi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,r=e+t;i<r;++i){var n=this.lines[i];this.height-=n.height,Cl(n),gt(n,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,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,i){for(var r=e+t;e<r;++e)if(i(this.lines[e]))return!0}};function xi(e){this.children=e;for(var t=0,i=0,r=0;r<e.length;++r){var n=e[r];t+=n.chunkSize(),i+=n.height,n.parent=this}this.size=t,this.height=i,this.parent=null}xi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var r=this.children[i],n=r.chunkSize();if(e<n){var a=Math.min(t,n-e),o=r.height;if(r.removeInner(e,a),this.height-=o-r.height,n==a&&(this.children.splice(i--,1),r.parent=null),(t-=a)==0)break;e=0}else e-=n}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof mi))){var l=[];this.collapse(l),this.children=[new mi(l)],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,i){this.size+=t.length,this.height+=i;for(var r=0;r<this.children.length;++r){var n=this.children[r],a=n.chunkSize();if(e<=a){if(n.insertInner(e,t,i),n.lines&&n.lines.length>50){for(var o=n.lines.length%25+25,l=o;l<n.lines.length;){var u=new mi(n.lines.slice(l,l+=25));n.height-=u.height,this.children.splice(++r,0,u),u.parent=this}n.lines=n.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),i=new xi(t);if(e.parent){e.size-=i.size,e.height-=i.height;var n=qe(e.parent.children,e);e.parent.children.splice(n+1,0,i)}else{var r=new xi(e.children);r.parent=e,e.children=[r,i],e=r}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,i){for(var r=0;r<this.children.length;++r){var n=this.children[r],a=n.chunkSize();if(e<a){var o=Math.min(t,a-e);if(n.iterN(e,o,i))return!0;if((t-=o)==0)break;e=0}else e-=a}}};var yi=function(e,t,i){if(i)for(var r in i)i.hasOwnProperty(r)&&(this[r]=i[r]);this.doc=e,this.node=t};yi.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,r=Je(i);if(!(r==null||!t)){for(var n=0;n<t.length;++n)t[n]==this&&t.splice(n--,1);t.length||(i.widgets=null);var a=ai(this);Jt(i,Math.max(0,i.height-a)),e&&(zt(e,function(){Mo(e,i,-a),cr(e,r,"widget")}),gt(e,"lineWidgetCleared",e,this,r))}},yi.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,r=this.line;this.height=null;var n=ai(this)-t;!n||(fr(this.doc,r)||Jt(r,r.height+n),i&&zt(i,function(){i.curOp.forceUpdate=!0,Mo(i,r,n),gt(i,"lineWidgetChanged",i,e,Je(r))}))},De(yi);function Mo(e,t,i){nr(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&zn(e,i)}function Cu(e,t,i,r){var n=new yi(e,i,r),a=e.cm;return a&&n.noHScroll&&(a.display.alignWidgets=!0),vi(e,t,"widget",function(o){var l=o.widgets||(o.widgets=[]);if(n.insertAt==null?l.push(n):l.splice(Math.min(l.length,Math.max(0,n.insertAt)),0,n),n.line=o,a&&!fr(e,o)){var u=nr(o)<e.scrollTop;Jt(o,o.height+ai(n)),u&&zn(a,n.height),a.curOp.forceUpdate=!0}return!0}),a&>(a,"lineWidgetAdded",a,n,typeof t=="number"?t:Je(t)),n}var No=0,vr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++No};vr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Er(e),ve(this,"clear")){var i=this.find();i&>(this,"clear",i.from,i.to)}for(var r=null,n=null,a=0;a<this.lines.length;++a){var o=this.lines[a],l=ri(o.markedSpans,this);e&&!this.collapsed?cr(e,Je(o),"text"):e&&(l.to!=null&&(n=Je(o)),l.from!=null&&(r=Je(o))),o.markedSpans=dl(o.markedSpans,l),l.from==null&&this.collapsed&&!fr(this.doc,o)&&e&&Jt(o,zr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var f=Kt(this.lines[u]),p=_i(f);p>e.display.maxLineLength&&(e.display.maxLine=f,e.display.maxLineLength=p,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Mt(e,r,n+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Co(e.doc)),e&>(e,"markerCleared",e,this,r,n),t&&Lr(e),this.parent&&this.parent.clear()}},vr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,r,n=0;n<this.lines.length;++n){var a=this.lines[n],o=ri(a.markedSpans,this);if(o.from!=null&&(i=te(t?a:Je(a),o.from),e==-1))return i;if(o.to!=null&&(r=te(t?a:Je(a),o.to),e==1))return r}return i&&{from:i,to:r}},vr.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,r=this.doc.cm;!t||!r||zt(r,function(){var n=t.line,a=Je(t.line),o=Sn(r,a);if(o&&(za(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!fr(i.doc,n)&&i.height!=null){var l=i.height;i.height=null;var u=ai(i)-l;u&&Jt(n,n.height+u)}gt(r,"markerChanged",r,e)})},vr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||qe(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},vr.prototype.detachLine=function(e){if(this.lines.splice(qe(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},De(vr);function Xr(e,t,i,r,n){if(r&&r.shared)return wu(e,t,i,r,n);if(e.cm&&!e.cm.curOp)return vt(e.cm,Xr)(e,t,i,r,n);var a=new vr(e,n),o=Ie(t,i);if(r&&ye(r,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=je("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Ca(e,t.line,t,i,a)||t.line!=i.line&&Ca(e,i.line,t,i,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");hl()}a.addToHistory&&go(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var l=t.line,u=e.cm,f;if(e.iter(l,i.line+1,function(x){u&&a.collapsed&&!u.options.lineWrapping&&Kt(x)==u.display.maxLine&&(f=!0),a.collapsed&&l!=t.line&&Jt(x,0),pl(x,new Ni(a,l==t.line?t.ch:null,l==i.line?i.ch:null),e.cm&&e.cm.curOp),++l}),a.collapsed&&e.iter(t.line,i.line+1,function(x){fr(e,x)&&Jt(x,0)}),a.clearOnEnter&&v(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(cl(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++No,a.atomic=!0),u){if(f&&(u.curOp.updateMaxLine=!0),a.collapsed)Mt(u,t.line,i.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var p=t.line;p<=i.line;p++)cr(u,p,"text");a.atomic&&Co(u.doc),gt(u,"markerAdded",u,a)}return a}var Di=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};Di.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();gt(this,"clear")}},Di.prototype.find=function(e,t){return this.primary.find(e,t)},De(Di);function wu(e,t,i,r,n){r=ye(r),r.shared=!1;var a=[Xr(e,t,i,r,n)],o=a[0],l=r.widgetNode;return gr(e,function(u){l&&(r.widgetNode=l.cloneNode(!0)),a.push(Xr(u,Oe(u,t),Oe(u,i),r,n));for(var f=0;f<u.linked.length;++f)if(u.linked[f].isParent)return;o=_e(a)}),new Di(a,o)}function Io(e){return e.findMarks(te(e.first,0),e.clipPos(te(e.lastLine())),function(t){return t.parent})}function ku(e,t){for(var i=0;i<t.length;i++){var r=t[i],n=r.find(),a=e.clipPos(n.from),o=e.clipPos(n.to);if(Ie(a,o)){var l=Xr(e,a,o,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function Su(e){for(var t=function(r){var n=e[r],a=[n.primary.doc];gr(n.primary.doc,function(u){return a.push(u)});for(var o=0;o<n.markers.length;o++){var l=n.markers[o];qe(a,l.doc)==-1&&(l.parent=null,n.markers.splice(o--,1))}},i=0;i<e.length;i++)t(i)}var Fu=0,Nt=function(e,t,i,r,n){if(!(this instanceof Nt))return new Nt(e,t,i,r,n);i==null&&(i=0),xi.call(this,[new mi([new Or("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var a=te(i,0);this.sel=dr(a),this.history=new Zi(null),this.id=++Fu,this.modeOption=t,this.lineSep=r,this.direction=n=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Kn(this,{from:a,to:a,text:e}),wt(this,dr(a),Ke)};Nt.prototype=N(xi.prototype,{constructor:Nt,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,r=0;r<t.length;++r)i+=t[r].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=cn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:mt(function(e){var t=te(this.first,0),i=this.first+this.size-1;Gr(this,{from:t,to:te(i,Fe(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&ui(this.cm,0,0),wt(this,dr(t),Ke)}),replaceRange:function(e,t,i,r){t=Oe(this,t),i=i?Oe(this,i):t,Kr(this,e,t,i,r)},getRange:function(e,t,i){var r=Dr(this,Oe(this,e),Oe(this,t));return i===!1?r:i===""?r.join(""):r.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(ei(this,e))return Fe(this,e)},getLineNumber:function(e){return Je(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=Fe(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 Oe(this,e)},getCursor:function(e){var t=this.sel.primary(),i;return e==null||e=="head"?i=t.head:e=="anchor"?i=t.anchor:e=="end"||e=="to"||e===!1?i=t.to():i=t.from(),i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:mt(function(e,t,i){yo(this,Oe(this,typeof e=="number"?te(e,t||0):e),null,i)}),setSelection:mt(function(e,t,i){yo(this,Oe(this,e),Oe(this,t||e),i)}),extendSelection:mt(function(e,t,i){Ji(this,Oe(this,e),t&&Oe(this,t),i)}),extendSelections:mt(function(e,t){xo(this,ua(this,e),t)}),extendSelectionsBy:mt(function(e,t){var i=Tt(this.sel.ranges,e);xo(this,ua(this,i),t)}),setSelections:mt(function(e,t,i){if(!!e.length){for(var r=[],n=0;n<e.length;n++)r[n]=new Ze(Oe(this,e[n].anchor),Oe(this,e[n].head||e[n].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),wt(this,Yt(this.cm,r,t),i)}}),addSelection:mt(function(e,t,i){var r=this.sel.ranges.slice(0);r.push(new Ze(Oe(this,e),Oe(this,t||e))),wt(this,Yt(this.cm,r,r.length-1),i)}),getSelection:function(e){for(var t=this.sel.ranges,i,r=0;r<t.length;r++){var n=Dr(this,t[r].from(),t[r].to());i=i?i.concat(n):n}return e===!1?i:i.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,r=0;r<i.length;r++){var n=Dr(this,i[r].from(),i[r].to());e!==!1&&(n=n.join(e||this.lineSeparator())),t[r]=n}return t},replaceSelection:function(e,t,i){for(var r=[],n=0;n<this.sel.ranges.length;n++)r[n]=e;this.replaceSelections(r,t,i||"+input")},replaceSelections:mt(function(e,t,i){for(var r=[],n=this.sel,a=0;a<n.ranges.length;a++){var o=n.ranges[a];r[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:i}}for(var l=t&&t!="end"&&du(this,r,t),u=r.length-1;u>=0;u--)Gr(this,r[u]);l?Do(this,l):this.cm&&Wr(this.cm)}),undo:mt(function(){en(this,"undo")}),redo:mt(function(){en(this,"redo")}),undoSelection:mt(function(){en(this,"undo",!0)}),redoSelection:mt(function(){en(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var n=0;n<e.undone.length;n++)e.undone[n].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new Zi(this.history),gr(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 Zi(this.history);t.done=jr(e.done.slice(0),null,!0),t.undone=jr(e.undone.slice(0),null,!0)},setGutterMarker:mt(function(e,t,i){return vi(this,e,"gutter",function(r){var n=r.gutterMarkers||(r.gutterMarkers={});return n[t]=i,!i&&d(n)&&(r.gutterMarkers=null),!0})}),clearGutter:mt(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&vi(t,i,"gutter",function(){return i.gutterMarkers[e]=null,d(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!ei(this,e)||(t=e,e=Fe(this,e),!e))return null}else if(t=Je(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:mt(function(e,t,i){return vi(this,e,t=="gutter"?"gutter":"class",function(r){var n=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[n])r[n]=i;else{if(ae(i).test(r[n]))return!1;r[n]+=" "+i}return!0})}),removeLineClass:mt(function(e,t,i){return vi(this,e,t=="gutter"?"gutter":"class",function(r){var n=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",a=r[n];if(a)if(i==null)r[n]=null;else{var o=a.match(ae(i));if(!o)return!1;var l=o.index+o[0].length;r[n]=a.slice(0,o.index)+(!o.index||l==a.length?"":" ")+a.slice(l)||null}else return!1;return!0})}),addLineWidget:mt(function(e,t,i){return Cu(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return Xr(this,Oe(this,e),Oe(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Oe(this,e),Xr(this,e,e,i,"bookmark")},findMarksAt:function(e){e=Oe(this,e);var t=[],i=Fe(this,e.line).markedSpans;if(i)for(var r=0;r<i.length;++r){var n=i[r];(n.from==null||n.from<=e.ch)&&(n.to==null||n.to>=e.ch)&&t.push(n.marker.parent||n.marker)}return t},findMarks:function(e,t,i){e=Oe(this,e),t=Oe(this,t);var r=[],n=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var l=0;l<o.length;l++){var u=o[l];!(u.to!=null&&n==e.line&&e.ch>=u.to||u.from==null&&n!=e.line||u.from!=null&&n==t.line&&u.from>=t.ch)&&(!i||i(u.marker))&&r.push(u.marker.parent||u.marker)}++n}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var r=0;r<i.length;++r)i[r].from!=null&&e.push(i[r].marker)}),e},posFromIndex:function(e){var t,i=this.first,r=this.lineSeparator().length;return this.iter(function(n){var a=n.text.length+r;if(a>e)return t=e,!0;e-=a,++i}),Oe(this,te(i,t))},indexFromPos:function(e){e=Oe(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+i}),t},copy:function(e){var t=new Nt(cn(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,i=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<i&&(i=e.to);var r=new Nt(cn(this,t,i),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}],ku(r,Io(this)),r},unlinkDoc:function(e){if(e instanceof tt&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Su(Io(this));break}}if(e.history==this.history){var r=[e.id];gr(e,function(n){return r.push(n.id)},!0),e.history=new Zi(null),e.history.done=jr(this.history.done,r),e.history.undone=jr(this.history.undone,r)}},iterLinkedDocs:function(e){gr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):qt(e)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:mt(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))})}),Nt.prototype.eachLine=Nt.prototype.iter;var Oo=0;function Au(e){var t=this;if(Ho(t),!(S(t,e)||ar(t.display,e))){Se(e),w&&(Oo=+new Date);var i=kr(t,e,!0),r=e.dataTransfer.files;if(!(!i||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var n=r.length,a=Array(n),o=0,l=function(){++o==n&&vt(t,function(){i=Oe(t.doc,i);var k={from:i,to:i,text:t.doc.splitLines(a.filter(function(U){return U!=null}).join(t.doc.lineSeparator())),origin:"paste"};Gr(t.doc,k),Do(t.doc,dr(Oe(t.doc,i),Oe(t.doc,pr(k))))})()},u=function(k,U){if(t.options.allowDropFileTypes&&qe(t.options.allowDropFileTypes,k.type)==-1){l();return}var K=new FileReader;K.onerror=function(){return l()},K.onload=function(){var ie=K.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ie)){l();return}a[U]=ie,l()},K.readAsText(k)},f=0;f<r.length;f++)u(r[f],f);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var p=e.dataTransfer.getData("Text");if(p){var x;if(t.state.draggingText&&!t.state.draggingText.copy&&(x=t.listSelections()),$i(t.doc,dr(i,i)),x)for(var L=0;L<x.length;++L)Kr(t.doc,"",x[L].anchor,x[L].head,"drag");t.replaceSelection(p,"around","paste"),t.display.input.focus()}}catch(k){}}}}function Eu(e,t){if(w&&(!e.state.draggingText||+new Date-Oo<100)){Pe(t);return}if(!(S(e,t)||ar(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!ue)){var i=Z("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",j&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),j&&i.parentNode.removeChild(i)}}function Lu(e,t){var i=kr(e,t);if(!!i){var r=document.createDocumentFragment();Nn(e,i,r),e.display.dragCursor||(e.display.dragCursor=Z("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Me(e.display.dragCursor,r)}}function Ho(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function _o(e){if(!!document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),i=[],r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&i.push(n)}i.length&&i[0].operation(function(){for(var a=0;a<i.length;a++)e(i[a])})}}var zo=!1;function Tu(){zo||(Bu(),zo=!0)}function Bu(){var e;v(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,_o(Mu)},100))}),v(window,"blur",function(){return _o(Pr)})}function Mu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var mr={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"},bi=0;bi<10;bi++)mr[bi+48]=mr[bi+96]=String(bi);for(var tn=65;tn<=90;tn++)mr[tn]=String.fromCharCode(tn);for(var Ci=1;Ci<=12;Ci++)mr[Ci+111]=mr[Ci+63235]="F"+Ci;var lr={};lr.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"},lr.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"},lr.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"},lr.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"]},lr.default=I?lr.macDefault:lr.pcDefault;function Nu(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,r,n,a,o=0;o<t.length-1;o++){var l=t[o];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))i=!0;else if(/^(c|ctrl|control)$/i.test(l))r=!0;else if(/^s(hift)?$/i.test(l))n=!0;else throw new Error("Unrecognized modifier name: "+l)}return i&&(e="Alt-"+e),r&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Iu(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if(r=="..."){delete e[i];continue}for(var n=Tt(i.split(" "),Nu),a=0;a<n.length;a++){var o=void 0,l=void 0;a==n.length-1?(l=n.join(" "),o=r):(l=n.slice(0,a+1).join(" "),o="...");var u=t[l];if(!u)t[l]=o;else if(u!=o)throw new Error("Inconsistent bindings for "+l)}delete e[i]}for(var f in t)e[f]=t[f];return e}function Yr(e,t,i,r){t=rn(t);var n=t.call?t.call(e,r):t[e];if(n===!1)return"nothing";if(n==="...")return"multi";if(n!=null&&i(n))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Yr(e,t.fallthrough,i,r);for(var a=0;a<t.fallthrough.length;a++){var o=Yr(e,t.fallthrough[a],i,r);if(o)return o}}}function Ro(e){var t=typeof e=="string"?e:mr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function Po(e,t,i){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(le?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(le?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function Wo(e,t){if(j&&e.keyCode==34&&e.char)return!1;var i=mr[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),Po(i,e,t))}function rn(e){return typeof e=="string"?lr[e]:e}function Zr(e,t){for(var i=e.doc.sel.ranges,r=[],n=0;n<i.length;n++){for(var a=t(i[n]);r.length&&Ie(a.from,_e(r).to)<=0;){var o=r.pop();if(Ie(o.from,a.from)<0){a.from=o.from;break}}r.push(a)}zt(e,function(){for(var l=r.length-1;l>=0;l--)Kr(e.doc,"",r[l].from,r[l].to,"+delete");Wr(e)})}function Qn(e,t,i){var r=R(e.text,t+i,i);return r<0||r>e.text.length?null:r}function Jn(e,t,i){var r=Qn(e,t.ch,i);return r==null?null:new te(t.line,r,i<0?"after":"before")}function $n(e,t,i,r,n){if(e){t.doc.direction=="rtl"&&(n=-n);var a=g(i,t.doc.direction);if(a){var o=n<0?_e(a):a[0],l=n<0==(o.level==1),u=l?"after":"before",f;if(o.level>0||t.doc.direction=="rtl"){var p=_r(t,i);f=n<0?i.text.length-1:0;var x=er(t,p,f).top;f=X(function(L){return er(t,p,L).top==x},n<0==(o.level==1)?o.from:o.to-1,f),u=="before"&&(f=Qn(i,f,1))}else f=n<0?o.to:o.from;return new te(r,f,u)}}return new te(r,n<0?i.text.length:0,n<0?"before":"after")}function Ou(e,t,i,r){var n=g(t,e.doc.direction);if(!n)return Jn(t,i,r);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var a=Te(n,i.ch,i.sticky),o=n[a];if(e.doc.direction=="ltr"&&o.level%2==0&&(r>0?o.to>i.ch:o.from<i.ch))return Jn(t,i,r);var l=function(ce,ge){return Qn(t,ce instanceof te?ce.ch:ce,ge)},u,f=function(ce){return e.options.lineWrapping?(u=u||_r(e,t),Ga(e,t,u,ce)):{begin:0,end:t.text.length}},p=f(i.sticky=="before"?l(i,-1):i.ch);if(e.doc.direction=="rtl"||o.level==1){var x=o.level==1==r<0,L=l(i,x?1:-1);if(L!=null&&(x?L<=o.to&&L<=p.end:L>=o.from&&L>=p.begin)){var k=x?"before":"after";return new te(i.line,L,k)}}var U=function(ce,ge,he){for(var xe=function(Ve,xt){return xt?new te(i.line,l(Ve,1),"before"):new te(i.line,Ve,"after")};ce>=0&&ce<n.length;ce+=ge){var Be=n[ce],Ae=ge>0==(Be.level!=1),ze=Ae?he.begin:l(he.end,-1);if(Be.from<=ze&&ze<Be.to||(ze=Ae?Be.from:l(Be.to,-1),he.begin<=ze&&ze<he.end))return xe(ze,Ae)}},K=U(a+r,r,p);if(K)return K;var ie=r>0?p.end:l(p.begin,-1);return ie!=null&&!(r>0&&ie==t.text.length)&&(K=U(r>0?0:n.length-1,r,f(ie)),K)?K:null}var wi={selectAll:So,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ke)},killLine:function(e){return Zr(e,function(t){if(t.empty()){var i=Fe(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:te(t.head.line+1,0)}:{from:t.head,to:te(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Zr(e,function(t){return{from:te(t.from().line,0),to:Oe(e.doc,te(t.to().line+1,0))}})},delLineLeft:function(e){return Zr(e,function(t){return{from:te(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Zr(e,function(t){var i=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:i},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return Zr(e,function(t){var i=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"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(te(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(te(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Uo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return jo(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 i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},Ge)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},Ge)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:i},"div");return r.ch<e.getLine(r.line).search(/\S/)?jo(e,t.head):r},Ge)},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=[],i=e.listSelections(),r=e.options.tabSize,n=0;n<i.length;n++){var a=i[n].from(),o=He(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 zt(e,function(){for(var t=e.listSelections(),i=[],r=0;r<t.length;r++)if(!!t[r].empty()){var n=t[r].head,a=Fe(e.doc,n.line).text;if(a){if(n.ch==a.length&&(n=new te(n.line,n.ch-1)),n.ch>0)n=new te(n.line,n.ch+1),e.replaceRange(a.charAt(n.ch-1)+a.charAt(n.ch-2),te(n.line,n.ch-2),n,"+transpose");else if(n.line>e.doc.first){var o=Fe(e.doc,n.line-1).text;o&&(n=new te(n.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),te(n.line-1,o.length-1),n,"+transpose"))}}i.push(new Ze(n,n))}e.setSelections(i)})},newlineAndIndent:function(e){return zt(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].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 Uo(e,t){var i=Fe(e.doc,t),r=Kt(i);return r!=i&&(t=Je(r)),$n(!0,e,r,t,1)}function Hu(e,t){var i=Fe(e.doc,t),r=yl(i);return r!=i&&(t=Je(r)),$n(!0,e,i,t,-1)}function jo(e,t){var i=Uo(e,t.line),r=Fe(e.doc,i.line),n=g(r,e.doc.direction);if(!n||n[0].level==0){var a=Math.max(i.ch,r.text.search(/\S/)),o=t.line==i.line&&t.ch<=a&&t.ch;return te(i.line,o?0:a,i.sticky)}return i}function nn(e,t,i){if(typeof t=="string"&&(t=wi[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),n=t(e)!=ut}finally{e.display.shift=r,e.state.suppressEdits=!1}return n}function _u(e,t,i){for(var r=0;r<e.state.keyMaps.length;r++){var n=Yr(t,e.state.keyMaps[r],i,e);if(n)return n}return e.options.extraKeys&&Yr(t,e.options.extraKeys,i,e)||Yr(t,e.options.keyMap,i,e)}var zu=new Ee;function ki(e,t,i,r){var n=e.state.keySeq;if(n){if(Ro(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:zu.set(50,function(){e.state.keySeq==n&&(e.state.keySeq=null,e.display.input.reset())}),qo(e,n+" "+t,i,r))return!0}return qo(e,t,i,r)}function qo(e,t,i,r){var n=_u(e,t,r);return n=="multi"&&(e.state.keySeq=t),n=="handled"&>(e,"keyHandled",e,t,i),(n=="handled"||n=="multi")&&(Se(i),In(e)),!!n}function Go(e,t){var i=Wo(t,!0);return i?t.shiftKey&&!e.state.keySeq?ki(e,"Shift-"+i,t,function(r){return nn(e,r,!0)})||ki(e,i,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return nn(e,r)}):ki(e,i,t,function(r){return nn(e,r)}):!1}function Ru(e,t,i){return ki(e,"'"+i+"'",t,function(r){return nn(e,r,!0)})}var Vn=null;function Ko(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=$(rt(t)),!S(t,e))){w&&F<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var r=Go(t,e);j&&(Vn=r?i:null,!r&&i==88&&!Ei&&(I?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),q&&!I&&!r&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Pu(t)}}function Pu(e){var t=e.display.lineDiv;ke(t,"CodeMirror-crosshair");function i(r){(r.keyCode==18||!r.altKey)&&(Re(t,"CodeMirror-crosshair"),H(document,"keyup",i),H(document,"mouseover",i))}v(document,"keyup",i),v(document,"mouseover",i)}function Xo(e){e.keyCode==16&&(this.doc.sel.shift=!1),S(this,e)}function Yo(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(ar(t.display,e)||S(t,e)||e.ctrlKey&&!e.altKey||I&&e.metaKey)){var i=e.keyCode,r=e.charCode;if(j&&i==Vn){Vn=null,Se(e);return}if(!(j&&(!e.which||e.which<10)&&Go(t,e))){var n=String.fromCharCode(r==null?i:r);n!="\b"&&(Ru(t,e,n)||t.display.input.onKeyPress(e))}}}var Wu=400,ea=function(e,t,i){this.time=e,this.pos=t,this.button=i};ea.prototype.compare=function(e,t,i){return this.time+Wu>e&&Ie(t,this.pos)==0&&i==this.button};var Si,Fi;function Uu(e,t){var i=+new Date;return Fi&&Fi.compare(i,e,t)?(Si=Fi=null,"triple"):Si&&Si.compare(i,e,t)?(Fi=new ea(i,e,t),Si=null,"double"):(Si=new ea(i,e,t),Fi=null,"single")}function Zo(e){var t=this,i=t.display;if(!(S(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,ar(i,e)){T||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!ta(t,e)){var r=kr(t,e),n=Ue(e),a=r?Uu(r,n):"single";m(t).focus(),n==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&ju(t,n,r,a,e))&&(n==1?r?Gu(t,r,a,e):Xe(e)==i.scroller&&Se(e):n==2?(r&&Ji(t.doc,r),setTimeout(function(){return i.input.focus()},20)):n==3&&(fe?t.display.input.onContextMenu(e):On(t)))}}}function ju(e,t,i,r,n){var a="Click";return r=="double"?a="Double"+a:r=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,ki(e,Po(a,n),n,function(o){if(typeof o=="string"&&(o=wi[o]),!o)return!1;var l=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),l=o(e,i)!=ut}finally{e.state.suppressEdits=!1}return l})}function qu(e,t,i){var r=e.getOption("configureMouse"),n=r?r(e,t,i):{};if(n.unit==null){var a=V?i.shiftKey&&i.metaKey:i.altKey;n.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(n.extend==null||e.doc.extend)&&(n.extend=e.doc.extend||i.shiftKey),n.addNew==null&&(n.addNew=I?i.metaKey:i.ctrlKey),n.moveOnDrag==null&&(n.moveOnDrag=!(I?i.altKey:i.ctrlKey)),n}function Gu(e,t,i,r){w?setTimeout(c(Za,e),0):e.curOp.focus=$(rt(e));var n=qu(e,i,r),a=e.doc.sel,o;e.options.dragDrop&&Ye&&!e.isReadOnly()&&i=="single"&&(o=a.contains(t))>-1&&(Ie((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(Ie(o.to(),t)>0||t.xRel<0)?Ku(e,r,t,n):Xu(e,r,t,n)}function Ku(e,t,i,r){var n=e.display,a=!1,o=vt(e,function(f){T&&(n.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:On(e)),H(n.wrapper.ownerDocument,"mouseup",o),H(n.wrapper.ownerDocument,"mousemove",l),H(n.scroller,"dragstart",u),H(n.scroller,"drop",o),a||(Se(f),r.addNew||Ji(e.doc,i,null,null,r.extend),T&&!ue||w&&F==9?setTimeout(function(){n.wrapper.ownerDocument.body.focus({preventScroll:!0}),n.input.focus()},20):n.input.focus())}),l=function(f){a=a||Math.abs(t.clientX-f.clientX)+Math.abs(t.clientY-f.clientY)>=10},u=function(){return a=!0};T&&(n.scroller.draggable=!0),e.state.draggingText=o,o.copy=!r.moveOnDrag,v(n.wrapper.ownerDocument,"mouseup",o),v(n.wrapper.ownerDocument,"mousemove",l),v(n.scroller,"dragstart",u),v(n.scroller,"drop",o),e.state.delayingBlurEvent=!0,setTimeout(function(){return n.input.focus()},20),n.scroller.dragDrop&&n.scroller.dragDrop()}function Qo(e,t,i){if(i=="char")return new Ze(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Ze(te(t.line,0),Oe(e.doc,te(t.line+1,0)));var r=i(e,t);return new Ze(r.from,r.to)}function Xu(e,t,i,r){w&&On(e);var n=e.display,a=e.doc;Se(t);var o,l,u=a.sel,f=u.ranges;if(r.addNew&&!r.extend?(l=a.sel.contains(i),l>-1?o=f[l]:o=new Ze(i,i)):(o=a.sel.primary(),l=a.sel.primIndex),r.unit=="rectangle")r.addNew||(o=new Ze(i,i)),i=kr(e,t,!0,!0),l=-1;else{var p=Qo(e,i,r.unit);r.extend?o=Yn(o,p.anchor,p.head,r.extend):o=p}r.addNew?l==-1?(l=f.length,wt(a,Yt(e,f.concat([o]),l),{scroll:!1,origin:"*mouse"})):f.length>1&&f[l].empty()&&r.unit=="char"&&!r.extend?(wt(a,Yt(e,f.slice(0,l).concat(f.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=a.sel):Zn(a,l,o,we):(l=0,wt(a,new Ut([o],0),we),u=a.sel);var x=i;function L(he){if(Ie(x,he)!=0)if(x=he,r.unit=="rectangle"){for(var xe=[],Be=e.options.tabSize,Ae=He(Fe(a,i.line).text,i.ch,Be),ze=He(Fe(a,he.line).text,he.ch,Be),Ve=Math.min(Ae,ze),xt=Math.max(Ae,ze),nt=Math.min(i.line,he.line),Rt=Math.min(e.lastLine(),Math.max(i.line,he.line));nt<=Rt;nt++){var It=Fe(a,nt).text,ft=Qe(It,Ve,Be);Ve==xt?xe.push(new Ze(te(nt,ft),te(nt,ft))):It.length>ft&&xe.push(new Ze(te(nt,ft),te(nt,Qe(It,xt,Be))))}xe.length||xe.push(new Ze(i,i)),wt(a,Yt(e,u.ranges.slice(0,l).concat(xe),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(he)}else{var Ot=o,bt=Qo(e,he,r.unit),pt=Ot.anchor,ct;Ie(bt.anchor,pt)>0?(ct=bt.head,pt=Bi(Ot.from(),bt.anchor)):(ct=bt.anchor,pt=Ti(Ot.to(),bt.head));var ot=u.ranges.slice(0);ot[l]=Yu(e,new Ze(Oe(a,pt),ct)),wt(a,Yt(e,ot,l),we)}}var k=n.wrapper.getBoundingClientRect(),U=0;function K(he){var xe=++U,Be=kr(e,he,!0,r.unit=="rectangle");if(!!Be)if(Ie(Be,x)!=0){e.curOp.focus=$(rt(e)),L(Be);var Ae=Gi(n,a);(Be.line>=Ae.to||Be.line<Ae.from)&&setTimeout(vt(e,function(){U==xe&&K(he)}),150)}else{var ze=he.clientY<k.top?-20:he.clientY>k.bottom?20:0;ze&&setTimeout(vt(e,function(){U==xe&&(n.scroller.scrollTop+=ze,K(he))}),50)}}function ie(he){e.state.selectingText=!1,U=1/0,he&&(Se(he),n.input.focus()),H(n.wrapper.ownerDocument,"mousemove",ce),H(n.wrapper.ownerDocument,"mouseup",ge),a.history.lastSelOrigin=null}var ce=vt(e,function(he){he.buttons===0||!Ue(he)?ie(he):K(he)}),ge=vt(e,ie);e.state.selectingText=ge,v(n.wrapper.ownerDocument,"mousemove",ce),v(n.wrapper.ownerDocument,"mouseup",ge)}function Yu(e,t){var i=t.anchor,r=t.head,n=Fe(e.doc,i.line);if(Ie(i,r)==0&&i.sticky==r.sticky)return t;var a=g(n);if(!a)return t;var o=Te(a,i.ch,i.sticky),l=a[o];if(l.from!=i.ch&&l.to!=i.ch)return t;var u=o+(l.from==i.ch==(l.level!=1)?0:1);if(u==0||u==a.length)return t;var f;if(r.line!=i.line)f=(r.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var p=Te(a,r.ch,r.sticky),x=p-o||(r.ch-i.ch)*(l.level==1?-1:1);p==u-1||p==u?f=x<0:f=x>0}var L=a[u+(f?-1:0)],k=f==(L.level==1),U=k?L.from:L.to,K=k?"after":"before";return i.ch==U&&i.sticky==K?t:new Ze(new te(i.line,U,K),r)}function Jo(e,t,i,r){var n,a;if(t.touches)n=t.touches[0].clientX,a=t.touches[0].clientY;else try{n=t.clientX,a=t.clientY}catch(L){return!1}if(n>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Se(t);var o=e.display,l=o.lineDiv.getBoundingClientRect();if(a>l.bottom||!ve(e,i))return Le(t);a-=l.top-o.viewOffset;for(var u=0;u<e.display.gutterSpecs.length;++u){var f=o.gutters.childNodes[u];if(f&&f.getBoundingClientRect().right>=n){var p=br(e.doc,a),x=e.display.gutterSpecs[u];return A(e,i,e,p,x.className,t),Le(t)}}}function ta(e,t){return Jo(e,t,"gutterClick",!0)}function $o(e,t){ar(e.display,t)||Zu(e,t)||S(e,t,"contextmenu")||fe||e.display.input.onContextMenu(t)}function Zu(e,t){return ve(e,"gutterContextMenu")?Jo(e,t,"gutterContextMenu",!1):!1}function Vo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),oi(e)}var Qr={toString:function(){return"CodeMirror.Init"}},el={},an={};function Qu(e){var t=e.optionHandlers;function i(r,n,a,o){e.defaults[r]=n,a&&(t[r]=o?function(l,u,f){f!=Qr&&a(l,u,f)}:a)}e.defineOption=i,e.Init=Qr,i("value","",function(r,n){return r.setValue(n)},!0),i("mode",null,function(r,n){r.doc.modeOption=n,Gn(r)},!0),i("indentUnit",2,Gn,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(r){pi(r),oi(r),Mt(r)},!0),i("lineSeparator",null,function(r,n){if(r.doc.lineSep=n,!!n){var a=[],o=r.doc.first;r.doc.iter(function(u){for(var f=0;;){var p=u.text.indexOf(n,f);if(p==-1)break;f=p+n.length,a.push(te(o,p))}o++});for(var l=a.length-1;l>=0;l--)Kr(r.doc,n,a[l],te(a[l].line,a[l].ch+n.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,n,a){r.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),a!=Qr&&r.refresh()}),i("specialCharPlaceholder",Sl,function(r){return r.refresh()},!0),i("electricChars",!0),i("inputStyle",P?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(r,n){return r.getInputField().spellcheck=n},!0),i("autocorrect",!1,function(r,n){return r.getInputField().autocorrect=n},!0),i("autocapitalize",!1,function(r,n){return r.getInputField().autocapitalize=n},!0),i("rtlMoveVisually",!re),i("wholeLineUpdateBefore",!0),i("theme","default",function(r){Vo(r),di(r)},!0),i("keyMap","default",function(r,n,a){var o=rn(n),l=a!=Qr&&rn(a);l&&l.detach&&l.detach(r,o),o.attach&&o.attach(r,l||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,$u,!0),i("gutters",[],function(r,n){r.display.gutterSpecs=jn(n,r.options.lineNumbers),di(r)},!0),i("fixedGutter",!0,function(r,n){r.display.gutters.style.left=n?Bn(r.display)+"px":"0",r.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(r){return Ur(r)},!0),i("scrollbarStyle","native",function(r){to(r),Ur(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),i("lineNumbers",!1,function(r,n){r.display.gutterSpecs=jn(r.options.gutters,n),di(r)},!0),i("firstLineNumber",1,di,!0),i("lineNumberFormatter",function(r){return r},di,!0),i("showCursorWhenSelecting",!1,li,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(r,n){n=="nocursor"&&(Pr(r),r.display.input.blur()),r.display.input.readOnlyChanged(n)}),i("screenReaderLabel",null,function(r,n){n=n===""?null:n,r.display.input.screenReaderLabelChanged(n)}),i("disableInput",!1,function(r,n){n||r.display.input.reset()},!0),i("dragDrop",!0,Ju),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,li,!0),i("singleCursorHeightPerLine",!0,li,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,pi,!0),i("addModeClass",!1,pi,!0),i("pollInterval",100),i("undoDepth",200,function(r,n){return r.doc.history.undoDepth=n}),i("historyEventDelay",1250),i("viewportMargin",10,function(r){return r.refresh()},!0),i("maxHighlightLength",1e4,pi,!0),i("moveInputWithCursor",!0,function(r,n){n||r.display.input.resetPosition()}),i("tabindex",null,function(r,n){return r.display.input.getField().tabIndex=n||""}),i("autofocus",null),i("direction","ltr",function(r,n){return r.doc.setDirection(n)},!0),i("phrases",null)}function Ju(e,t,i){var r=i&&i!=Qr;if(!t!=!r){var n=e.display.dragFunctions,a=t?v:H;a(e.display.scroller,"dragstart",n.start),a(e.display.scroller,"dragenter",n.enter),a(e.display.scroller,"dragover",n.over),a(e.display.scroller,"dragleave",n.leave),a(e.display.scroller,"drop",n.drop)}}function $u(e){e.options.lineWrapping?(ke(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Re(e.display.wrapper,"CodeMirror-wrap"),bn(e)),Mn(e),Mt(e),oi(e),setTimeout(function(){return Ur(e)},100)}function tt(e,t){var i=this;if(!(this instanceof tt))return new tt(e,t);this.options=t=t?ye(t):{},ye(el,t,!1);var r=t.value;typeof r=="string"?r=new Nt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var n=new tt.inputStyles[t.inputStyle](this),a=this.display=new cu(e,r,n,t);a.wrapper.CodeMirror=this,Vo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),to(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 Ee,keySeq:null,specialChars:null},t.autofocus&&!P&&a.input.focus(),w&&F<11&&setTimeout(function(){return i.display.input.reset(!0)},20),Vu(this),Tu(),Er(this),this.curOp.forceUpdate=!0,co(this,r),t.autofocus&&!P||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&Hn(i)},20):Pr(this);for(var o in an)an.hasOwnProperty(o)&&an[o](this,t[o],Qr);no(this),t.finishInit&&t.finishInit(this);for(var l=0;l<ra.length;++l)ra[l](this);Lr(this),T&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}tt.defaults=el,tt.optionHandlers=an;function Vu(e){var t=e.display;v(t.scroller,"mousedown",vt(e,Zo)),w&&F<11?v(t.scroller,"dblclick",vt(e,function(u){if(!S(e,u)){var f=kr(e,u);if(!(!f||ta(e,u)||ar(e.display,u))){Se(u);var p=e.findWordAt(f);Ji(e.doc,p.anchor,p.head)}}})):v(t.scroller,"dblclick",function(u){return S(e,u)||Se(u)}),v(t.scroller,"contextmenu",function(u){return $o(e,u)}),v(t.input.getField(),"contextmenu",function(u){t.scroller.contains(u.target)||$o(e,u)});var i,r={end:0};function n(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function a(u){if(u.touches.length!=1)return!1;var f=u.touches[0];return f.radiusX<=1&&f.radiusY<=1}function o(u,f){if(f.left==null)return!0;var p=f.left-u.left,x=f.top-u.top;return p*p+x*x>20*20}v(t.scroller,"touchstart",function(u){if(!S(e,u)&&!a(u)&&!ta(e,u)){t.input.ensurePolled(),clearTimeout(i);var f=+new Date;t.activeTouch={start:f,moved:!1,prev:f-r.end<=300?r:null},u.touches.length==1&&(t.activeTouch.left=u.touches[0].pageX,t.activeTouch.top=u.touches[0].pageY)}}),v(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),v(t.scroller,"touchend",function(u){var f=t.activeTouch;if(f&&!ar(t,u)&&f.left!=null&&!f.moved&&new Date-f.start<300){var p=e.coordsChar(t.activeTouch,"page"),x;!f.prev||o(f,f.prev)?x=new Ze(p,p):!f.prev.prev||o(f,f.prev.prev)?x=e.findWordAt(p):x=new Ze(te(p.line,0),Oe(e.doc,te(p.line+1,0))),e.setSelection(x.anchor,x.head),e.focus(),Se(u)}n()}),v(t.scroller,"touchcancel",n),v(t.scroller,"scroll",function(){t.scroller.clientHeight&&(si(e,t.scroller.scrollTop),Fr(e,t.scroller.scrollLeft,!0),A(e,"scroll",e))}),v(t.scroller,"mousewheel",function(u){return lo(e,u)}),v(t.scroller,"DOMMouseScroll",function(u){return lo(e,u)}),v(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(u){S(e,u)||Pe(u)},over:function(u){S(e,u)||(Lu(e,u),Pe(u))},start:function(u){return Eu(e,u)},drop:vt(e,Au),leave:function(u){S(e,u)||Ho(e)}};var l=t.input.getField();v(l,"keyup",function(u){return Xo.call(e,u)}),v(l,"keydown",vt(e,Ko)),v(l,"keypress",vt(e,Yo)),v(l,"focus",function(u){return Hn(e,u)}),v(l,"blur",function(u){return Pr(e,u)})}var ra=[];tt.defineInitHook=function(e){return ra.push(e)};function Ai(e,t,i,r){var n=e.doc,a;i==null&&(i="add"),i=="smart"&&(n.mode.indent?a=ti(e,t).state:i="prev");var o=e.options.tabSize,l=Fe(n,t),u=He(l.text,null,o);l.stateAfter&&(l.stateAfter=null);var f=l.text.match(/^\s*/)[0],p;if(!r&&!/\S/.test(l.text))p=0,i="not";else if(i=="smart"&&(p=n.mode.indent(a,l.text.slice(f.length),l.text),p==ut||p>150)){if(!r)return;i="prev"}i=="prev"?t>n.first?p=He(Fe(n,t-1).text,null,o):p=0:i=="add"?p=u+e.options.indentUnit:i=="subtract"?p=u-e.options.indentUnit:typeof i=="number"&&(p=u+i),p=Math.max(0,p);var x="",L=0;if(e.options.indentWithTabs)for(var k=Math.floor(p/o);k;--k)L+=o,x+=" ";if(L<p&&(x+=Qt(p-L)),x!=f)return Kr(n,x,te(t,0),te(t,f.length),"+input"),l.stateAfter=null,!0;for(var U=0;U<n.sel.ranges.length;U++){var K=n.sel.ranges[U];if(K.head.line==t&&K.head.ch<f.length){var ie=te(t,f.length);Zn(n,U,new Ze(ie,ie));break}}}var Zt=null;function on(e){Zt=e}function ia(e,t,i,r,n){var a=e.doc;e.display.shift=!1,r||(r=a.sel);var o=+new Date-200,l=n=="paste"||e.state.pasteIncoming>o,u=qt(t),f=null;if(l&&r.ranges.length>1)if(Zt&&Zt.text.join(`
|
|
`)==t){if(r.ranges.length%Zt.text.length==0){f=[];for(var p=0;p<Zt.text.length;p++)f.push(a.splitLines(Zt.text[p]))}}else u.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(f=Tt(u,function(ce){return[ce]}));for(var x=e.curOp.updateInput,L=r.ranges.length-1;L>=0;L--){var k=r.ranges[L],U=k.from(),K=k.to();k.empty()&&(i&&i>0?U=te(U.line,U.ch-i):e.state.overwrite&&!l?K=te(K.line,Math.min(Fe(a,K.line).text.length,K.ch+_e(u).length)):l&&Zt&&Zt.lineWise&&Zt.text.join(`
|
|
`)==u.join(`
|
|
`)&&(U=K=te(U.line,0)));var ie={from:U,to:K,text:f?f[L%f.length]:u,origin:n||(l?"paste":e.state.cutIncoming>o?"cut":"+input")};Gr(e.doc,ie),gt(e,"inputRead",e,ie)}t&&!l&&rl(e,t),Wr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=x),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function tl(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&zt(t,function(){return ia(t,i,0,null,"paste")}),!0}function rl(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var i=e.doc.sel,r=i.ranges.length-1;r>=0;r--){var n=i.ranges[r];if(!(n.head.ch>100||r&&i.ranges[r-1].head.line==n.head.line)){var a=e.getModeAt(n.head),o=!1;if(a.electricChars){for(var l=0;l<a.electricChars.length;l++)if(t.indexOf(a.electricChars.charAt(l))>-1){o=Ai(e,n.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(Fe(e.doc,n.head.line).text.slice(0,n.head.ch))&&(o=Ai(e,n.head.line,"smart"));o&>(e,"electricInput",e,n.head.line)}}}function il(e){for(var t=[],i=[],r=0;r<e.doc.sel.ranges.length;r++){var n=e.doc.sel.ranges[r].head.line,a={anchor:te(n,0),head:te(n+1,0)};i.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:i}}function nl(e,t,i,r){e.setAttribute("autocorrect",i?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function al(){var e=Z("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=Z("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return T?e.style.width="1000px":e.setAttribute("wrap","off"),me&&(e.style.border="1px solid black"),nl(e),t}function es(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){m(this).focus(),this.display.input.focus()},setOption:function(r,n){var a=this.options,o=a[r];a[r]==n&&r!="mode"||(a[r]=n,t.hasOwnProperty(r)&&vt(this,t[r])(this,n,o),A(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,n){this.state.keyMaps[n?"push":"unshift"](rn(r))},removeKeyMap:function(r){for(var n=this.state.keyMaps,a=0;a<n.length;++a)if(n[a]==r||n[a].name==r)return n.splice(a,1),!0},addOverlay:At(function(r,n){var a=r.token?r:e.getMode(this.options,r);if(a.startState)throw new Error("Overlays may not be stateful.");Bt(this.state.overlays,{mode:a,modeSpec:r,opaque:n&&n.opaque,priority:n&&n.priority||0},function(o){return o.priority}),this.state.modeGen++,Mt(this)}),removeOverlay:At(function(r){for(var n=this.state.overlays,a=0;a<n.length;++a){var o=n[a].modeSpec;if(o==r||typeof r=="string"&&o.name==r){n.splice(a,1),this.state.modeGen++,Mt(this);return}}}),indentLine:At(function(r,n,a){typeof n!="string"&&typeof n!="number"&&(n==null?n=this.options.smartIndent?"smart":"prev":n=n?"add":"subtract"),ei(this.doc,r)&&Ai(this,r,n,a)}),indentSelection:At(function(r){for(var n=this.doc.sel.ranges,a=-1,o=0;o<n.length;o++){var l=n[o];if(l.empty())l.head.line>a&&(Ai(this,l.head.line,r,!0),a=l.head.line,o==this.doc.sel.primIndex&&Wr(this));else{var u=l.from(),f=l.to(),p=Math.max(a,u.line);a=Math.min(this.lastLine(),f.line-(f.ch?0:1))+1;for(var x=p;x<a;++x)Ai(this,x,r);var L=this.doc.sel.ranges;u.ch==0&&n.length==L.length&&L[o].from().ch>0&&Zn(this.doc,o,new Ze(u,L[o].to()),Ke)}}}),getTokenAt:function(r,n){return da(this,r,n)},getLineTokens:function(r,n){return da(this,te(r),n,!0)},getTokenTypeAt:function(r){r=Oe(this.doc,r);var n=fa(this,Fe(this.doc,r.line)),a=0,o=(n.length-1)/2,l=r.ch,u;if(l==0)u=n[2];else for(;;){var f=a+o>>1;if((f?n[f*2-1]:0)>=l)o=f;else if(n[f*2+1]<l)a=f+1;else{u=n[f*2+2];break}}var p=u?u.indexOf("overlay "):-1;return p<0?u:p==0?null:u.slice(0,p-1)},getModeAt:function(r){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(r).state).mode:n},getHelper:function(r,n){return this.getHelpers(r,n)[0]},getHelpers:function(r,n){var a=[];if(!i.hasOwnProperty(n))return a;var o=i[n],l=this.getModeAt(r);if(typeof l[n]=="string")o[l[n]]&&a.push(o[l[n]]);else if(l[n])for(var u=0;u<l[n].length;u++){var f=o[l[n][u]];f&&a.push(f)}else l.helperType&&o[l.helperType]?a.push(o[l.helperType]):o[l.name]&&a.push(o[l.name]);for(var p=0;p<o._global.length;p++){var x=o._global[p];x.pred(l,this)&&qe(a,x.val)==-1&&a.push(x.val)}return a},getStateAfter:function(r,n){var a=this.doc;return r=la(a,r==null?a.first+a.size-1:r),ti(this,r+1,n).state},cursorCoords:function(r,n){var a,o=this.doc.sel.primary();return r==null?a=o.head:typeof r=="object"?a=Oe(this.doc,r):a=r?o.from():o.to(),Xt(this,a,n||"page")},charCoords:function(r,n){return Wi(this,Oe(this.doc,r),n||"page")},coordsChar:function(r,n){return r=Ua(this,r,n||"page"),En(this,r.left,r.top)},lineAtHeight:function(r,n){return r=Ua(this,{top:r,left:0},n||"page").top,br(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,n,a){var o=!1,l;if(typeof r=="number"){var u=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>u&&(r=u,o=!0),l=Fe(this.doc,r)}else l=r;return Pi(this,l,{top:0,left:0},n||"page",a||o).top+(o?this.doc.height-nr(l):0)},defaultTextHeight:function(){return zr(this.display)},defaultCharWidth:function(){return Rr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,n,a,o,l){var u=this.display;r=Xt(this,Oe(this.doc,r));var f=r.bottom,p=r.left;if(n.style.position="absolute",n.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(n),u.sizer.appendChild(n),o=="over")f=r.top;else if(o=="above"||o=="near"){var x=Math.max(u.wrapper.clientHeight,this.doc.height),L=Math.max(u.sizer.clientWidth,u.lineSpace.clientWidth);(o=="above"||r.bottom+n.offsetHeight>x)&&r.top>n.offsetHeight?f=r.top-n.offsetHeight:r.bottom+n.offsetHeight<=x&&(f=r.bottom),p+n.offsetWidth>L&&(p=L-n.offsetWidth)}n.style.top=f+"px",n.style.left=n.style.right="",l=="right"?(p=u.sizer.clientWidth-n.offsetWidth,n.style.right="0px"):(l=="left"?p=0:l=="middle"&&(p=(u.sizer.clientWidth-n.offsetWidth)/2),n.style.left=p+"px"),a&&Jl(this,{left:p,top:f,right:p+n.offsetWidth,bottom:f+n.offsetHeight})},triggerOnKeyDown:At(Ko),triggerOnKeyPress:At(Yo),triggerOnKeyUp:Xo,triggerOnMouseDown:At(Zo),execCommand:function(r){if(wi.hasOwnProperty(r))return wi[r].call(null,this)},triggerElectric:At(function(r){rl(this,r)}),findPosH:function(r,n,a,o){var l=1;n<0&&(l=-1,n=-n);for(var u=Oe(this.doc,r),f=0;f<n&&(u=na(this.doc,u,l,a,o),!u.hitSide);++f);return u},moveH:At(function(r,n){var a=this;this.extendSelectionsBy(function(o){return a.display.shift||a.doc.extend||o.empty()?na(a.doc,o.head,r,n,a.options.rtlMoveVisually):r<0?o.from():o.to()},Ge)}),deleteH:At(function(r,n){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Zr(this,function(l){var u=na(o,l.head,r,n,!1);return r<0?{from:u,to:l.head}:{from:l.head,to:u}})}),findPosV:function(r,n,a,o){var l=1,u=o;n<0&&(l=-1,n=-n);for(var f=Oe(this.doc,r),p=0;p<n;++p){var x=Xt(this,f,"div");if(u==null?u=x.left:x.left=u,f=ol(this,x,l,a),f.hitSide)break}return f},moveV:At(function(r,n){var a=this,o=this.doc,l=[],u=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(p){if(u)return r<0?p.from():p.to();var x=Xt(a,p.head,"div");p.goalColumn!=null&&(x.left=p.goalColumn),l.push(x.left);var L=ol(a,x,r,n);return n=="page"&&p==o.sel.primary()&&zn(a,Wi(a,L,"div").top-x.top),L},Ge),l.length)for(var f=0;f<o.sel.ranges.length;f++)o.sel.ranges[f].goalColumn=l[f]}),findWordAt:function(r){var n=this.doc,a=Fe(n,r.line).text,o=r.ch,l=r.ch;if(a){var u=this.getHelper(r,"wordChars");(r.sticky=="before"||l==a.length)&&o?--o:++l;for(var f=a.charAt(o),p=h(f,u)?function(x){return h(x,u)}:/\s/.test(f)?function(x){return/\s/.test(x)}:function(x){return!/\s/.test(x)&&!h(x)};o>0&&p(a.charAt(o-1));)--o;for(;l<a.length&&p(a.charAt(l));)++l}return new Ze(te(r.line,o),te(r.line,l))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ke(this.display.cursorDiv,"CodeMirror-overwrite"):Re(this.display.cursorDiv,"CodeMirror-overwrite"),A(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:At(function(r,n){ui(this,r,n)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-Vt(this)-this.display.barHeight,width:r.scrollWidth-Vt(this)-this.display.barWidth,clientHeight:kn(this),clientWidth:Cr(this)}},scrollIntoView:At(function(r,n){r==null?(r={from:this.doc.sel.primary().head,to:null},n==null&&(n=this.options.cursorScrollMargin)):typeof r=="number"?r={from:te(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=n||0,r.from.line!=null?$l(this,r):Ja(this,r.from,r.to,r.margin)}),setSize:At(function(r,n){var a=this,o=function(u){return typeof u=="number"||/^\d+$/.test(String(u))?u+"px":u};r!=null&&(this.display.wrapper.style.width=o(r)),n!=null&&(this.display.wrapper.style.height=o(n)),this.options.lineWrapping&&Ra(this);var l=this.display.viewFrom;this.doc.iter(l,this.display.viewTo,function(u){if(u.widgets){for(var f=0;f<u.widgets.length;f++)if(u.widgets[f].noHScroll){cr(a,l,"widget");break}}++l}),this.curOp.forceUpdate=!0,A(this,"refresh",this)}),operation:function(r){return zt(this,r)},startOperation:function(){return Er(this)},endOperation:function(){return Lr(this)},refresh:At(function(){var r=this.display.cachedTextHeight;Mt(this),this.curOp.forceUpdate=!0,oi(this),ui(this,this.doc.scrollLeft,this.doc.scrollTop),Wn(this.display),(r==null||Math.abs(r-zr(this.display))>.5||this.options.lineWrapping)&&Mn(this),A(this,"refresh",this)}),swapDoc:At(function(r){var n=this.doc;return n.cm=null,this.state.selectingText&&this.state.selectingText(),co(this,r),oi(this),this.display.input.reset(),ui(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,gt(this,"swapDoc",this,n),n}),phrase:function(r){var n=this.options.phrases;return n&&Object.prototype.hasOwnProperty.call(n,r)?n[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}},De(e),e.registerHelper=function(r,n,a){i.hasOwnProperty(r)||(i[r]=e[r]={_global:[]}),i[r][n]=a},e.registerGlobalHelper=function(r,n,a,o){e.registerHelper(r,n,o),i[r]._global.push({pred:a,val:o})}}function na(e,t,i,r,n){var a=t,o=i,l=Fe(e,t.line),u=n&&e.direction=="rtl"?-i:i;function f(){var ge=t.line+u;return ge<e.first||ge>=e.first+e.size?!1:(t=new te(ge,t.ch,t.sticky),l=Fe(e,ge))}function p(ge){var he;if(r=="codepoint"){var xe=l.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN(xe))he=null;else{var Be=i>0?xe>=55296&&xe<56320:xe>=56320&&xe<57343;he=new te(t.line,Math.max(0,Math.min(l.text.length,t.ch+i*(Be?2:1))),-i)}}else n?he=Ou(e.cm,l,t,i):he=Jn(l,t,i);if(he==null)if(!ge&&f())t=$n(n,e.cm,l,t.line,u);else return!1;else t=he;return!0}if(r=="char"||r=="codepoint")p();else if(r=="column")p(!0);else if(r=="word"||r=="group")for(var x=null,L=r=="group",k=e.cm&&e.cm.getHelper(t,"wordChars"),U=!0;!(i<0&&!p(!U));U=!1){var K=l.text.charAt(t.ch)||`
|
|
`,ie=h(K,k)?"w":L&&K==`
|
|
`?"n":!L||/\s/.test(K)?null:"p";if(L&&!U&&!ie&&(ie="s"),x&&x!=ie){i<0&&(i=1,p(),t.sticky="after");break}if(ie&&(x=ie),i>0&&!p(!U))break}var ce=Vi(e,t,a,o,!0);return dn(a,ce)&&(ce.hitSide=!0),ce}function ol(e,t,i,r){var n=e.doc,a=t.left,o;if(r=="page"){var l=Math.min(e.display.wrapper.clientHeight,m(e).innerHeight||n(e).documentElement.clientHeight),u=Math.max(l-.5*zr(e.display),3);o=(i>0?t.bottom:t.top)+i*u}else r=="line"&&(o=i>0?t.bottom+3:t.top-3);for(var f;f=En(e,a,o),!!f.outside;){if(i<0?o<=0:o>=n.height){f.hitSide=!0;break}o+=i*5}return f}var $e=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ee,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};$e.prototype.init=function(e){var t=this,i=this,r=i.cm,n=i.div=e.lineDiv;n.contentEditable=!0,nl(n,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function a(l){for(var u=l.target;u;u=u.parentNode){if(u==n)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(u.className))break}return!1}v(n,"paste",function(l){!a(l)||S(r,l)||tl(l,r)||F<=11&&setTimeout(vt(r,function(){return t.updateFromDOM()}),20)}),v(n,"compositionstart",function(l){t.composing={data:l.data,done:!1}}),v(n,"compositionupdate",function(l){t.composing||(t.composing={data:l.data,done:!1})}),v(n,"compositionend",function(l){t.composing&&(l.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),v(n,"touchstart",function(){return i.forceCompositionEnd()}),v(n,"input",function(){t.composing||t.readFromDOMSoon()});function o(l){if(!(!a(l)||S(r,l))){if(r.somethingSelected())on({lineWise:!1,text:r.getSelections()}),l.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var u=il(r);on({lineWise:!0,text:u.text}),l.type=="cut"&&r.operation(function(){r.setSelections(u.ranges,0,Ke),r.replaceSelection("",null,"cut")})}else return;if(l.clipboardData){l.clipboardData.clearData();var f=Zt.text.join(`
|
|
`);if(l.clipboardData.setData("Text",f),l.clipboardData.getData("Text")==f){l.preventDefault();return}}var p=al(),x=p.firstChild;r.display.lineSpace.insertBefore(p,r.display.lineSpace.firstChild),x.value=Zt.text.join(`
|
|
`);var L=$(n.ownerDocument);dt(x),setTimeout(function(){r.display.lineSpace.removeChild(p),L.focus(),L==n&&i.showPrimarySelection()},50)}}v(n,"copy",o),v(n,"cut",o)},$e.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=Ya(this.cm,!1);return e.focus=$(this.div.ownerDocument)==this.div,e},$e.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},$e.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},$e.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),r=i.from(),n=i.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||n.line<t.display.viewFrom){e.removeAllRanges();return}var a=ln(t,e.anchorNode,e.anchorOffset),o=ln(t,e.focusNode,e.focusOffset);if(!(a&&!a.bad&&o&&!o.bad&&Ie(Bi(a,o),r)==0&&Ie(Ti(a,o),n)==0)){var l=t.display.view,u=r.line>=t.display.viewFrom&&ll(t,r)||{node:l[0].measure.map[2],offset:0},f=n.line<t.display.viewTo&&ll(t,n);if(!f){var p=l[l.length-1].measure,x=p.maps?p.maps[p.maps.length-1]:p.map;f={node:x[x.length-1],offset:x[x.length-2]-x[x.length-3]}}if(!u||!f){e.removeAllRanges();return}var L=e.rangeCount&&e.getRangeAt(0),k;try{k=z(u.node,u.offset,f.offset,f.node)}catch(U){}k&&(!q&&t.state.focused?(e.collapse(u.node,u.offset),k.collapsed||(e.removeAllRanges(),e.addRange(k))):(e.removeAllRanges(),e.addRange(k)),L&&e.anchorNode==null?e.addRange(L):q&&this.startGracePeriod()),this.rememberSelection()}},$e.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)},$e.prototype.showMultipleSelections=function(e){Me(this.cm.display.cursorDiv,e.cursors),Me(this.cm.display.selectionDiv,e.selection)},$e.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},$e.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return oe(this.div,t)},$e.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||$(this.div.ownerDocument)!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},$e.prototype.blur=function(){this.div.blur()},$e.prototype.getField=function(){return this.div},$e.prototype.supportsTouch=function(){return!0},$e.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):zt(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function i(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,i))}this.polling.set(this.cm.options.pollInterval,i)},$e.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},$e.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(Ce&&ee&&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 i=ln(t,e.anchorNode,e.anchorOffset),r=ln(t,e.focusNode,e.focusOffset);i&&r&&zt(t,function(){wt(t.doc,dr(i,r),Ke),(i.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},$e.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,i=e.doc.sel.primary(),r=i.from(),n=i.to();if(r.ch==0&&r.line>e.firstLine()&&(r=te(r.line-1,Fe(e.doc,r.line-1).length)),n.ch==Fe(e.doc,n.line).text.length&&n.line<e.lastLine()&&(n=te(n.line+1,0)),r.line<t.viewFrom||n.line>t.viewTo-1)return!1;var a,o,l;r.line==t.viewFrom||(a=Sr(e,r.line))==0?(o=Je(t.view[0].line),l=t.view[0].node):(o=Je(t.view[a].line),l=t.view[a-1].node.nextSibling);var u=Sr(e,n.line),f,p;if(u==t.view.length-1?(f=t.viewTo-1,p=t.lineDiv.lastChild):(f=Je(t.view[u+1].line)-1,p=t.view[u+1].node.previousSibling),!l)return!1;for(var x=e.doc.splitLines(rs(e,l,p,o,f)),L=Dr(e.doc,te(o,0),te(f,Fe(e.doc,f).text.length));x.length>1&&L.length>1;)if(_e(x)==_e(L))x.pop(),L.pop(),f--;else if(x[0]==L[0])x.shift(),L.shift(),o++;else break;for(var k=0,U=0,K=x[0],ie=L[0],ce=Math.min(K.length,ie.length);k<ce&&K.charCodeAt(k)==ie.charCodeAt(k);)++k;for(var ge=_e(x),he=_e(L),xe=Math.min(ge.length-(x.length==1?k:0),he.length-(L.length==1?k:0));U<xe&&ge.charCodeAt(ge.length-U-1)==he.charCodeAt(he.length-U-1);)++U;if(x.length==1&&L.length==1&&o==r.line)for(;k&&k>r.ch&&ge.charCodeAt(ge.length-U-1)==he.charCodeAt(he.length-U-1);)k--,U++;x[x.length-1]=ge.slice(0,ge.length-U).replace(/^\u200b+/,""),x[0]=x[0].slice(k).replace(/\u200b+$/,"");var Be=te(o,k),Ae=te(f,L.length?_e(L).length-U:0);if(x.length>1||x[0]||Ie(Be,Ae))return Kr(e.doc,x,Be,Ae,"+input"),!0},$e.prototype.ensurePolled=function(){this.forceCompositionEnd()},$e.prototype.reset=function(){this.forceCompositionEnd()},$e.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},$e.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))},$e.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&zt(this.cm,function(){return Mt(e.cm)})},$e.prototype.setUneditable=function(e){e.contentEditable="false"},$e.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||vt(this.cm,ia)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},$e.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},$e.prototype.onContextMenu=function(){},$e.prototype.resetPosition=function(){},$e.prototype.needsContentAttribute=!0;function ll(e,t){var i=Sn(e,t.line);if(!i||i.hidden)return null;var r=Fe(e.doc,t.line),n=Ia(i,r,t.line),a=g(r,e.doc.direction),o="left";if(a){var l=Te(a,t.ch);o=l%2?"right":"left"}var u=_a(n.map,t.ch,o);return u.offset=u.collapse=="right"?u.end:u.start,u}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,i,r,n){var a="",o=!1,l=e.doc.lineSeparator(),u=!1;function f(k){return function(U){return U.id==k}}function p(){o&&(a+=l,u&&(a+=l),o=u=!1)}function x(k){k&&(p(),a+=k)}function L(k){if(k.nodeType==1){var U=k.getAttribute("cm-text");if(U){x(U);return}var K=k.getAttribute("cm-marker"),ie;if(K){var ce=e.findMarks(te(r,0),te(n+1,0),f(+K));ce.length&&(ie=ce[0].find(0))&&x(Dr(e.doc,ie.from,ie.to).join(l));return}if(k.getAttribute("contenteditable")=="false")return;var ge=/^(pre|div|p|li|table|br)$/i.test(k.nodeName);if(!/^br$/i.test(k.nodeName)&&k.textContent.length==0)return;ge&&p();for(var he=0;he<k.childNodes.length;he++)L(k.childNodes[he]);/^(pre|p)$/i.test(k.nodeName)&&(u=!0),ge&&(o=!0)}else k.nodeType==3&&x(k.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;L(t),t!=i;)t=t.nextSibling,u=!1;return a}function ln(e,t,i){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[i],!r)return Jr(e.clipPos(te(e.display.viewTo-1)),!0);t=null,i=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 n=0;n<e.display.view.length;n++){var a=e.display.view[n];if(a.node==r)return is(a,t,i)}}function is(e,t,i){var r=e.text.firstChild,n=!1;if(!t||!oe(r,t))return Jr(te(Je(e.line),0),!0);if(t==r&&(n=!0,t=r.childNodes[i],i=0,!t)){var a=e.rest?_e(e.rest):e.line;return Jr(te(Je(a),a.text.length),n)}var o=t.nodeType==3?t:null,l=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,i&&(i=o.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var u=e.measure,f=u.maps;function p(ie,ce,ge){for(var he=-1;he<(f?f.length:0);he++)for(var xe=he<0?u.map:f[he],Be=0;Be<xe.length;Be+=3){var Ae=xe[Be+2];if(Ae==ie||Ae==ce){var ze=Je(he<0?e.line:e.rest[he]),Ve=xe[Be]+ge;return(ge<0||Ae!=ie)&&(Ve=xe[Be+(ge?1:0)]),te(ze,Ve)}}}var x=p(o,l,i);if(x)return Jr(x,n);for(var L=l.nextSibling,k=o?o.nodeValue.length-i:0;L;L=L.nextSibling){if(x=p(L,L.firstChild,0),x)return Jr(te(x.line,x.ch-k),n);k+=L.textContent.length}for(var U=l.previousSibling,K=i;U;U=U.previousSibling){if(x=p(U,U.firstChild,-1),x)return Jr(te(x.line,x.ch+K),n);K+=U.textContent.length}}var lt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ee,this.hasSelection=!1,this.composing=null,this.resetting=!1};lt.prototype.init=function(e){var t=this,i=this,r=this.cm;this.createField(e);var n=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),me&&(n.style.width="0px"),v(n,"input",function(){w&&F>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),v(n,"paste",function(o){S(r,o)||tl(o,r)||(r.state.pasteIncoming=+new Date,i.fastPoll())});function a(o){if(!S(r,o)){if(r.somethingSelected())on({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var l=il(r);on({lineWise:!0,text:l.text}),o.type=="cut"?r.setSelections(l.ranges,null,Ke):(i.prevInput="",n.value=l.text.join(`
|
|
`),dt(n))}else return;o.type=="cut"&&(r.state.cutIncoming=+new Date)}}v(n,"cut",a),v(n,"copy",a),v(e.scroller,"paste",function(o){if(!(ar(e,o)||S(r,o))){if(!n.dispatchEvent){r.state.pasteIncoming=+new Date,i.focus();return}var l=new Event("paste");l.clipboardData=o.clipboardData,n.dispatchEvent(l)}}),v(e.lineSpace,"selectstart",function(o){ar(e,o)||Se(o)}),v(n,"compositionstart",function(){var o=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:o,range:r.markText(o,r.getCursor("to"),{className:"CodeMirror-composing"})}}),v(n,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},lt.prototype.createField=function(e){this.wrapper=al(),this.textarea=this.wrapper.firstChild},lt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},lt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,r=Ya(e);if(e.options.moveInputWithCursor){var n=Xt(e,i.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,n.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,n.left+o.left-a.left))}return r},lt.prototype.showSelection=function(e){var t=this.cm,i=t.display;Me(i.cursorDiv,e.cursors),Me(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},lt.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&dt(this.textarea),w&&F>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",w&&F>=9&&(this.hasSelection=null));this.resetting=!1}},lt.prototype.getField=function(){return this.textarea},lt.prototype.supportsTouch=function(){return!1},lt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!P||$(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch(e){}},lt.prototype.blur=function(){this.textarea.blur()},lt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},lt.prototype.receivedFocus=function(){this.slowPoll()},lt.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},lt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},lt.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Mr(i)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var n=i.value;if(n==r&&!t.somethingSelected())return!1;if(w&&F>=9&&this.hasSelection===n||I&&/[\uf700-\uf7ff]/.test(n))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=n.charCodeAt(0);if(a==8203&&!r&&(r="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,l=Math.min(r.length,n.length);o<l&&r.charCodeAt(o)==n.charCodeAt(o);)++o;return zt(t,function(){ia(t,n.slice(o),r.length-o,null,e.composing?"*compose":null),n.length>1e3||n.indexOf(`
|
|
`)>-1?i.value=e.prevInput="":e.prevInput=n,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},lt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},lt.prototype.onKeyPress=function(){w&&F>=9&&(this.hasSelection=null),this.fastPoll()},lt.prototype.onContextMenu=function(e){var t=this,i=t.cm,r=i.display,n=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=kr(i,e),o=r.scroller.scrollTop;if(!a||j)return;var l=i.options.resetSelectionOnContextMenu;l&&i.doc.sel.contains(a)==-1&&vt(i,wt)(i.doc,dr(a),Ke);var u=n.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",n.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+`px;
|
|
z-index: 1000; background: `+(w?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var x;T&&(x=n.ownerDocument.defaultView.scrollY),r.input.focus(),T&&n.ownerDocument.defaultView.scrollTo(null,x),r.input.reset(),i.somethingSelected()||(n.value=t.prevInput=" "),t.contextMenuPending=k,r.selForContextMenu=i.doc.sel,clearTimeout(r.detectingSelectAll);function L(){if(n.selectionStart!=null){var K=i.somethingSelected(),ie="\u200B"+(K?n.value:"");n.value="\u21DA",n.value=ie,t.prevInput=K?"":"\u200B",n.selectionStart=1,n.selectionEnd=ie.length,r.selForContextMenu=i.doc.sel}}function k(){if(t.contextMenuPending==k&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,n.style.cssText=u,w&&F<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=o),n.selectionStart!=null)){(!w||w&&F<9)&&L();var K=0,ie=function(){r.selForContextMenu==i.doc.sel&&n.selectionStart==0&&n.selectionEnd>0&&t.prevInput=="\u200B"?vt(i,So)(i):K++<10?r.detectingSelectAll=setTimeout(ie,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(ie,200)}}if(w&&F>=9&&L(),fe){Pe(e);var U=function(){H(window,"mouseup",U),setTimeout(k,20)};v(window,"mouseup",U)}else setTimeout(k,50)},lt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},lt.prototype.setUneditable=function(){},lt.prototype.needsContentAttribute=!1;function ns(e,t){if(t=t?ye(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 i=$(e.ownerDocument);t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function r(){e.value=l.getValue()}var n;if(e.form&&(v(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;n=a.submit;try{var o=a.submit=function(){r(),a.submit=n,a.submit(),a.submit=o}}catch(u){}}t.finishInit=function(u){u.save=r,u.getTextArea=function(){return e},u.toTextArea=function(){u.toTextArea=isNaN,r(),e.parentNode.removeChild(u.getWrapperElement()),e.style.display="",e.form&&(H(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=n))}},e.style.display="none";var l=tt(function(u){return e.parentNode.insertBefore(u,e.nextSibling)},t);return l}function as(e){e.off=H,e.on=v,e.wheelEventPixels=hu,e.Doc=Nt,e.splitLines=qt,e.countColumn=He,e.findColumn=Qe,e.isWordChar=C,e.Pass=ut,e.signal=A,e.Line=Or,e.changeEnd=pr,e.scrollbarModel=eo,e.Pos=te,e.cmpPos=Ie,e.modes=yr,e.mimeModes=sr,e.resolveMode=Gt,e.getMode=Pt,e.modeExtensions=Ft,e.extendMode=rr,e.copyState=Wt,e.startState=Li,e.innerMode=Ir,e.commands=wi,e.keyMap=lr,e.keyName=Wo,e.isModifierKey=Ro,e.lookupKey=Yr,e.normalizeKeyMap=Iu,e.StringStream=it,e.SharedTextMarker=Di,e.TextMarker=vr,e.LineWidget=yi,e.e_preventDefault=Se,e.e_stopPropagation=Ne,e.e_stop=Pe,e.addClass=ke,e.contains=oe,e.rmClass=Re,e.keyNames=mr}Qu(tt),es(tt);var os="iter insert remove copy getEditor constructor".split(" ");for(var un in Nt.prototype)Nt.prototype.hasOwnProperty(un)&&qe(os,un)<0&&(tt.prototype[un]=function(e){return function(){return e.apply(this.doc,arguments)}}(Nt.prototype[un]));return De(Nt),tt.inputStyles={textarea:lt,contenteditable:$e},tt.defineMode=function(e){!tt.defaults.mode&&e!="null"&&(tt.defaults.mode=e),fn.apply(this,arguments)},tt.defineMIME=Dt,tt.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),tt.defineMIME("text/plain","null"),tt.defineExtension=function(e,t){tt.prototype[e]=t},tt.defineDocExtension=function(e,t){Nt.prototype[e]=t},tt.fromTextArea=ns,as(tt),tt.version="5.65.9",tt})},"./node_modules/codemirror/mode/gfm/gfm.js":function(ht,We,be){(function(q){q(be("./node_modules/codemirror/lib/codemirror.js"),be("./node_modules/codemirror/mode/markdown/markdown.js"),be("./node_modules/codemirror/addon/mode/overlay.js"))})(function(q){"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;q.defineMode("gfm",function(B,_){var w=0;function F(G){return G.code=!1,null}var T={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(G){return{code:G.code,codeBlock:G.codeBlock,ateSpace:G.ateSpace}},token:function(G,j){if(j.combineTokens=null,j.codeBlock)return G.match(/^```+/)?(j.codeBlock=!1,null):(G.skipToEnd(),null);if(G.sol()&&(j.code=!1),G.sol()&&G.match(/^```+/))return G.skipToEnd(),j.codeBlock=!0,null;if(G.peek()==="`"){G.next();var ue=G.pos;G.eatWhile("`");var se=1+G.pos-ue;return j.code?se===w&&(j.code=!1):(w=se,j.code=!0),null}else if(j.code)return G.next(),null;if(G.eatSpace())return j.ateSpace=!0,null;if((G.sol()||j.ateSpace)&&(j.ateSpace=!1,_.gitHubSpice!==!1)){if(G.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return j.combineTokens=!0,"link";if(G.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return j.combineTokens=!0,"link"}return G.match(Q)&&G.string.slice(G.start-2,G.start)!="]("&&(G.start==0||/\W/.test(G.string.charAt(G.start-1)))?(j.combineTokens=!0,"link"):(G.next(),null)},blankLine:F},Y={taskLists:!0,strikethrough:!0,emoji:!0};for(var ee in _)Y[ee]=_[ee];return Y.name="markdown",q.overlayMode(q.getMode(B,Y),T)},"markdown"),q.defineMIME("text/x-gfm","gfm")})},"./node_modules/codemirror/mode/markdown/markdown.js":function(ht,We,be){(function(q){q(be("./node_modules/codemirror/lib/codemirror.js"),be("./node_modules/codemirror/mode/xml/xml.js"),be("./node_modules/codemirror/mode/meta.js"))})(function(q){"use strict";q.defineMode("markdown",function(Q,B){var _=q.getMode(Q,"text/html"),w=_.name=="null";function F(m){if(q.findModeByName){var c=q.findModeByName(m);c&&(m=c.mime||c.mimes[0])}var ye=q.getMode(Q,m);return ye.name=="null"?null:ye}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 T={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 T)T.hasOwnProperty(Y)&&B.tokenTypeOverrides[Y]&&(T[Y]=B.tokenTypeOverrides[Y]);var ee=/^([*\-_])(?:\s*\1){2,}\s*$/,G=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,j=/^\[(x| )\](?=\s)/i,ue=B.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,se=/^ {0,3}(?:\={1,}|-{2,})\s*$/,pe=/^[^#!\[\]*_\\<>` "'(~:]+/,me=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Ce=/^\s*\[[^\]]+?\]:.*$/,P=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,I=" ";function V(m,c,ye){return c.f=c.inline=ye,ye(m,c)}function re(m,c,ye){return c.f=c.block=ye,ye(m,c)}function J(m){return!m||!/\S/.test(m.string)}function le(m){if(m.linkTitle=!1,m.linkHref=!1,m.linkText=!1,m.em=!1,m.strong=!1,m.strikethrough=!1,m.quote=0,m.indentedCode=!1,m.f==ae){var c=w;if(!c){var ye=q.innerMode(_,m.htmlState);c=ye.mode.name=="xml"&&ye.state.tagStart===null&&!ye.state.context&&ye.state.tokenize.isInText}c&&(m.f=Z,m.block=fe,m.htmlState=null)}return m.trailingSpace=0,m.trailingSpaceNewLine=!1,m.prevLine=m.thisLine,m.thisLine={stream:null},null}function fe(m,c){var ye=m.column()===c.indentation,He=J(c.prevLine.stream),Ee=c.indentedCode,qe=c.prevLine.hr,Ct=c.list!==!1,ut=(c.listStack[c.listStack.length-1]||0)+3;c.indentedCode=!1;var Ke=c.indentation;if(c.indentationDiff===null&&(c.indentationDiff=c.indentation,Ct)){for(c.list=null;Ke<c.listStack[c.listStack.length-1];)c.listStack.pop(),c.listStack.length?c.indentation=c.listStack[c.listStack.length-1]:c.list=!1;c.list!==!1&&(c.indentationDiff=Ke-c.listStack[c.listStack.length-1])}var we=!He&&!qe&&!c.prevLine.header&&(!Ct||!Ee)&&!c.prevLine.fencedCodeEnd,Ge=(c.list===!1||qe||He)&&c.indentation<=ut&&m.match(ee),Qe=null;if(c.indentationDiff>=4&&(Ee||c.prevLine.fencedCodeEnd||c.prevLine.header||He))return m.skipToEnd(),c.indentedCode=!0,T.code;if(m.eatSpace())return null;if(ye&&c.indentation<=ut&&(Qe=m.match(ue))&&Qe[1].length<=6)return c.quote=0,c.header=Qe[1].length,c.thisLine.header=!0,B.highlightFormatting&&(c.formatting="header"),c.f=c.inline,ne(c);if(c.indentation<=ut&&m.eat(">"))return c.quote=ye?1:c.quote+1,B.highlightFormatting&&(c.formatting="quote"),m.eatSpace(),ne(c);if(!Ge&&!c.setext&&ye&&c.indentation<=ut&&(Qe=m.match(G))){var Lt=Qe[1]?"ol":"ul";return c.indentation=Ke+m.current().length,c.list=!0,c.quote=0,c.listStack.push(c.indentation),c.em=!1,c.strong=!1,c.code=!1,c.strikethrough=!1,B.taskLists&&m.match(j,!1)&&(c.taskList=!0),c.f=c.inline,B.highlightFormatting&&(c.formatting=["list","list-"+Lt]),ne(c)}else{if(ye&&c.indentation<=ut&&(Qe=m.match(me,!0)))return c.quote=0,c.fencedEndRE=new RegExp(Qe[1]+"+ *$"),c.localMode=B.fencedCodeBlockHighlighting&&F(Qe[2]||B.fencedCodeBlockDefaultMode),c.localMode&&(c.localState=q.startState(c.localMode)),c.f=c.block=Re,B.highlightFormatting&&(c.formatting="code-block"),c.code=-1,ne(c);if(c.setext||(!we||!Ct)&&!c.quote&&c.list===!1&&!c.code&&!Ge&&!Ce.test(m.string)&&(Qe=m.lookAhead(1))&&(Qe=Qe.match(se)))return c.setext?(c.header=c.setext,c.setext=0,m.skipToEnd(),B.highlightFormatting&&(c.formatting="header")):(c.header=Qe[0].charAt(0)=="="?1:2,c.setext=c.header),c.thisLine.header=!0,c.f=c.inline,ne(c);if(Ge)return m.skipToEnd(),c.hr=!0,c.thisLine.hr=!0,T.hr;if(m.peek()==="[")return V(m,c,ke)}return V(m,c,c.inline)}function ae(m,c){var ye=_.token(m,c.htmlState);if(!w){var He=q.innerMode(_,c.htmlState);(He.mode.name=="xml"&&He.state.tagStart===null&&!He.state.context&&He.state.tokenize.isInText||c.md_inside&&m.current().indexOf(">")>-1)&&(c.f=Z,c.block=fe,c.htmlState=null)}return ye}function Re(m,c){var ye=c.listStack[c.listStack.length-1]||0,He=c.indentation<ye,Ee=ye+3;if(c.fencedEndRE&&c.indentation<=Ee&&(He||m.match(c.fencedEndRE))){B.highlightFormatting&&(c.formatting="code-block");var qe;return He||(qe=ne(c)),c.localMode=c.localState=null,c.block=fe,c.f=Z,c.fencedEndRE=null,c.code=0,c.thisLine.fencedCodeEnd=!0,He?re(m,c,c.block):qe}else return c.localMode?c.localMode.token(m,c.localState):(m.skipToEnd(),T.code)}function ne(m){var c=[];if(m.formatting){c.push(T.formatting),typeof m.formatting=="string"&&(m.formatting=[m.formatting]);for(var ye=0;ye<m.formatting.length;ye++)c.push(T.formatting+"-"+m.formatting[ye]),m.formatting[ye]==="header"&&c.push(T.formatting+"-"+m.formatting[ye]+"-"+m.header),m.formatting[ye]==="quote"&&(!B.maxBlockquoteDepth||B.maxBlockquoteDepth>=m.quote?c.push(T.formatting+"-"+m.formatting[ye]+"-"+m.quote):c.push("error"))}if(m.taskOpen)return c.push("meta"),c.length?c.join(" "):null;if(m.taskClosed)return c.push("property"),c.length?c.join(" "):null;if(m.linkHref?c.push(T.linkHref,"url"):(m.strong&&c.push(T.strong),m.em&&c.push(T.em),m.strikethrough&&c.push(T.strikethrough),m.emoji&&c.push(T.emoji),m.linkText&&c.push(T.linkText),m.code&&c.push(T.code),m.image&&c.push(T.image),m.imageAltText&&c.push(T.imageAltText,"link"),m.imageMarker&&c.push(T.imageMarker)),m.header&&c.push(T.header,T.header+"-"+m.header),m.quote&&(c.push(T.quote),!B.maxBlockquoteDepth||B.maxBlockquoteDepth>=m.quote?c.push(T.quote+"-"+m.quote):c.push(T.quote+"-"+B.maxBlockquoteDepth)),m.list!==!1){var He=(m.listStack.length-1)%3;He?He===1?c.push(T.list2):c.push(T.list3):c.push(T.list1)}return m.trailingSpaceNewLine?c.push("trailing-space-new-line"):m.trailingSpace&&c.push("trailing-space-"+(m.trailingSpace%2?"a":"b")),c.length?c.join(" "):null}function Me(m,c){if(m.match(pe,!0))return ne(c)}function Z(m,c){var ye=c.text(m,c);if(typeof ye!="undefined")return ye;if(c.list)return c.list=null,ne(c);if(c.taskList){var He=m.match(j,!0)[1]===" ";return He?c.taskOpen=!0:c.taskClosed=!0,B.highlightFormatting&&(c.formatting="task"),c.taskList=!1,ne(c)}if(c.taskOpen=!1,c.taskClosed=!1,c.header&&m.match(/^#+$/,!0))return B.highlightFormatting&&(c.formatting="header"),ne(c);var Ee=m.next();if(c.linkTitle){c.linkTitle=!1;var qe=Ee;Ee==="("&&(qe=")"),qe=(qe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ct="^\\s*(?:[^"+qe+"\\\\]+|\\\\\\\\|\\\\.)"+qe;if(m.match(new RegExp(Ct),!0))return T.linkHref}if(Ee==="`"){var ut=c.formatting;B.highlightFormatting&&(c.formatting="code"),m.eatWhile("`");var Ke=m.current().length;if(c.code==0&&(!c.quote||Ke==1))return c.code=Ke,ne(c);if(Ke==c.code){var we=ne(c);return c.code=0,we}else return c.formatting=ut,ne(c)}else if(c.code)return ne(c);if(Ee==="\\"&&(m.next(),B.highlightFormatting)){var Ge=ne(c),Qe=T.formatting+"-escape";return Ge?Ge+" "+Qe:Qe}if(Ee==="!"&&m.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return c.imageMarker=!0,c.image=!0,B.highlightFormatting&&(c.formatting="image"),ne(c);if(Ee==="["&&c.imageMarker&&m.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return c.imageMarker=!1,c.imageAltText=!0,B.highlightFormatting&&(c.formatting="image"),ne(c);if(Ee==="]"&&c.imageAltText){B.highlightFormatting&&(c.formatting="image");var Ge=ne(c);return c.imageAltText=!1,c.image=!1,c.inline=c.f=z,Ge}if(Ee==="["&&!c.image)return c.linkText&&m.match(/^.*?\]/)||(c.linkText=!0,B.highlightFormatting&&(c.formatting="link")),ne(c);if(Ee==="]"&&c.linkText){B.highlightFormatting&&(c.formatting="link");var Ge=ne(c);return c.linkText=!1,c.inline=c.f=m.match(/\(.*?\)| ?\[.*?\]/,!1)?z:Z,Ge}if(Ee==="<"&&m.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=je,B.highlightFormatting&&(c.formatting="link");var Ge=ne(c);return Ge?Ge+=" ":Ge="",Ge+T.linkInline}if(Ee==="<"&&m.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){c.f=c.inline=je,B.highlightFormatting&&(c.formatting="link");var Ge=ne(c);return Ge?Ge+=" ":Ge="",Ge+T.linkEmail}if(B.xml&&Ee==="<"&&m.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Lt=m.string.indexOf(">",m.pos);if(Lt!=-1){var Qt=m.string.substring(m.start,Lt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Qt)&&(c.md_inside=!0)}return m.backUp(1),c.htmlState=q.startState(_),re(m,c,ae)}if(B.xml&&Ee==="<"&&m.match(/^\/\w*?>/))return c.md_inside=!1,"tag";if(Ee==="*"||Ee==="_"){for(var _e=1,Tt=m.pos==1?" ":m.string.charAt(m.pos-2);_e<3&&m.eat(Ee);)_e++;var Bt=m.peek()||" ",jt=!/\s/.test(Bt)&&(!P.test(Bt)||/\s/.test(Tt)||P.test(Tt)),N=!/\s/.test(Tt)&&(!P.test(Tt)||/\s/.test(Bt)||P.test(Bt)),E=null,C=null;if(_e%2&&(!c.em&&jt&&(Ee==="*"||!N||P.test(Tt))?E=!0:c.em==Ee&&N&&(Ee==="*"||!jt||P.test(Bt))&&(E=!1)),_e>1&&(!c.strong&&jt&&(Ee==="*"||!N||P.test(Tt))?C=!0:c.strong==Ee&&N&&(Ee==="*"||!jt||P.test(Bt))&&(C=!1)),C!=null||E!=null){B.highlightFormatting&&(c.formatting=E==null?"strong":C==null?"em":"strong em"),E===!0&&(c.em=Ee),C===!0&&(c.strong=Ee);var we=ne(c);return E===!1&&(c.em=!1),C===!1&&(c.strong=!1),we}}else if(Ee===" "&&(m.eat("*")||m.eat("_"))){if(m.peek()===" ")return ne(c);m.backUp(1)}if(B.strikethrough){if(Ee==="~"&&m.eatWhile(Ee)){if(c.strikethrough){B.highlightFormatting&&(c.formatting="strikethrough");var we=ne(c);return c.strikethrough=!1,we}else if(m.match(/^[^\s]/,!1))return c.strikethrough=!0,B.highlightFormatting&&(c.formatting="strikethrough"),ne(c)}else if(Ee===" "&&m.match("~~",!0)){if(m.peek()===" ")return ne(c);m.backUp(2)}}if(B.emoji&&Ee===":"&&m.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){c.emoji=!0,B.highlightFormatting&&(c.formatting="emoji");var h=ne(c);return c.emoji=!1,h}return Ee===" "&&(m.match(/^ +$/,!1)?c.trailingSpace++:c.trailingSpace&&(c.trailingSpaceNewLine=!0)),ne(c)}function je(m,c){var ye=m.next();if(ye===">"){c.f=c.inline=Z,B.highlightFormatting&&(c.formatting="link");var He=ne(c);return He?He+=" ":He="",He+T.linkInline}return m.match(/^[^>]+/,!0),T.linkInline}function z(m,c){if(m.eatSpace())return null;var ye=m.next();return ye==="("||ye==="["?(c.f=c.inline=$(ye==="("?")":"]"),B.highlightFormatting&&(c.formatting="link-string"),c.linkHref=!0,ne(c)):"error"}var oe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function $(m){return function(c,ye){var He=c.next();if(He===m){ye.f=ye.inline=Z,B.highlightFormatting&&(ye.formatting="link-string");var Ee=ne(ye);return ye.linkHref=!1,Ee}return c.match(oe[m]),ye.linkHref=!0,ne(ye)}}function ke(m,c){return m.match(/^([^\]\\]|\\.)*\]:/,!1)?(c.f=et,m.next(),B.highlightFormatting&&(c.formatting="link"),c.linkText=!0,ne(c)):V(m,c,Z)}function et(m,c){if(m.match("]:",!0)){c.f=c.inline=dt,B.highlightFormatting&&(c.formatting="link");var ye=ne(c);return c.linkText=!1,ye}return m.match(/^([^\]\\]|\\.)+/,!0),T.linkText}function dt(m,c){return m.eatSpace()?null:(m.match(/^[^\s]+/,!0),m.peek()===void 0?c.linkTitle=!0:m.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),c.f=c.inline=Z,T.linkHref+" url")}var rt={startState:function(){return{f:fe,prevLine:{stream:null},thisLine:{stream:null},block:fe,htmlState:null,indentation:0,inline:Z,text:Me,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(m){return{f:m.f,prevLine:m.prevLine,thisLine:m.thisLine,block:m.block,htmlState:m.htmlState&&q.copyState(_,m.htmlState),indentation:m.indentation,localMode:m.localMode,localState:m.localMode?q.copyState(m.localMode,m.localState):null,inline:m.inline,text:m.text,formatting:!1,linkText:m.linkText,linkTitle:m.linkTitle,linkHref:m.linkHref,code:m.code,em:m.em,strong:m.strong,strikethrough:m.strikethrough,emoji:m.emoji,header:m.header,setext:m.setext,hr:m.hr,taskList:m.taskList,list:m.list,listStack:m.listStack.slice(0),quote:m.quote,indentedCode:m.indentedCode,trailingSpace:m.trailingSpace,trailingSpaceNewLine:m.trailingSpaceNewLine,md_inside:m.md_inside,fencedEndRE:m.fencedEndRE}},token:function(m,c){if(c.formatting=!1,m!=c.thisLine.stream){if(c.header=0,c.hr=!1,m.match(/^\s*$/,!0))return le(c),null;if(c.prevLine=c.thisLine,c.thisLine={stream:m},c.taskList=!1,c.trailingSpace=0,c.trailingSpaceNewLine=!1,!c.localState&&(c.f=c.block,c.f!=ae)){var ye=m.match(/^\s*/,!0)[0].replace(/\t/g,I).length;if(c.indentation=ye,c.indentationDiff=null,ye>0)return null}}return c.f(m,c)},innerMode:function(m){return m.block==ae?{state:m.htmlState,mode:_}:m.localState?{state:m.localState,mode:m.localMode}:{state:m,mode:rt}},indent:function(m,c,ye){return m.block==ae&&_.indent?_.indent(m.htmlState,c,ye):m.localState&&m.localMode.indent?m.localMode.indent(m.localState,c,ye):q.Pass},blankLine:le,getType:ne,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return rt},"xml"),q.defineMIME("text/markdown","markdown"),q.defineMIME("text/x-markdown","markdown")})},"./node_modules/codemirror/mode/meta.js":function(ht,We,be){(function(q){q(be("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"use strict";q.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<q.modeInfo.length;Q++){var B=q.modeInfo[Q];B.mimes&&(B.mime=B.mimes[0])}q.findModeByMIME=function(_){_=_.toLowerCase();for(var w=0;w<q.modeInfo.length;w++){var F=q.modeInfo[w];if(F.mime==_)return F;if(F.mimes){for(var T=0;T<F.mimes.length;T++)if(F.mimes[T]==_)return F}}if(/\+xml$/.test(_))return q.findModeByMIME("application/xml");if(/\+json$/.test(_))return q.findModeByMIME("application/json")},q.findModeByExtension=function(_){_=_.toLowerCase();for(var w=0;w<q.modeInfo.length;w++){var F=q.modeInfo[w];if(F.ext){for(var T=0;T<F.ext.length;T++)if(F.ext[T]==_)return F}}},q.findModeByFileName=function(_){for(var w=0;w<q.modeInfo.length;w++){var F=q.modeInfo[w];if(F.file&&F.file.test(_))return F}var T=_.lastIndexOf("."),Y=T>-1&&_.substring(T+1,_.length);if(Y)return q.findModeByExtension(Y)},q.findModeByName=function(_){_=_.toLowerCase();for(var w=0;w<q.modeInfo.length;w++){var F=q.modeInfo[w];if(F.name.toLowerCase()==_)return F;if(F.alias){for(var T=0;T<F.alias.length;T++)if(F.alias[T].toLowerCase()==_)return F}}}})},"./node_modules/codemirror/mode/xml/xml.js":function(ht,We,be){(function(q){q(be("./node_modules/codemirror/lib/codemirror.js"))})(function(q){"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};q.defineMode("xml",function(_,w){var F=_.indentUnit,T={},Y=w.htmlMode?Q:B;for(var ee in Y)T[ee]=Y[ee];for(var ee in w)T[ee]=w[ee];var G,j;function ue(z,oe){function $(dt){return oe.tokenize=dt,dt(z,oe)}var ke=z.next();if(ke=="<")return z.eat("!")?z.eat("[")?z.match("CDATA[")?$(me("atom","]]>")):null:z.match("--")?$(me("comment","-->")):z.match("DOCTYPE",!0,!0)?(z.eatWhile(/[\w\._\-]/),$(Ce(1))):null:z.eat("?")?(z.eatWhile(/[\w\._\-]/),oe.tokenize=me("meta","?>"),"meta"):(G=z.eat("/")?"closeTag":"openTag",oe.tokenize=se,"tag bracket");if(ke=="&"){var et;return z.eat("#")?z.eat("x")?et=z.eatWhile(/[a-fA-F\d]/)&&z.eat(";"):et=z.eatWhile(/[\d]/)&&z.eat(";"):et=z.eatWhile(/[\w\.\-:]/)&&z.eat(";"),et?"atom":"error"}else return z.eatWhile(/[^&<]/),null}ue.isInText=!0;function se(z,oe){var $=z.next();if($==">"||$=="/"&&z.eat(">"))return oe.tokenize=ue,G=$==">"?"endTag":"selfcloseTag","tag bracket";if($=="=")return G="equals",null;if($=="<"){oe.tokenize=ue,oe.state=J,oe.tagName=oe.tagStart=null;var ke=oe.tokenize(z,oe);return ke?ke+" tag error":"tag error"}else return/[\'\"]/.test($)?(oe.tokenize=pe($),oe.stringStartCol=z.column(),oe.tokenize(z,oe)):(z.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function pe(z){var oe=function($,ke){for(;!$.eol();)if($.next()==z){ke.tokenize=se;break}return"string"};return oe.isInAttribute=!0,oe}function me(z,oe){return function($,ke){for(;!$.eol();){if($.match(oe)){ke.tokenize=ue;break}$.next()}return z}}function Ce(z){return function(oe,$){for(var ke;(ke=oe.next())!=null;){if(ke=="<")return $.tokenize=Ce(z+1),$.tokenize(oe,$);if(ke==">")if(z==1){$.tokenize=ue;break}else return $.tokenize=Ce(z-1),$.tokenize(oe,$)}return"meta"}}function P(z){return z&&z.toLowerCase()}function I(z,oe,$){this.prev=z.context,this.tagName=oe||"",this.indent=z.indented,this.startOfLine=$,(T.doNotIndent.hasOwnProperty(oe)||z.context&&z.context.noIndent)&&(this.noIndent=!0)}function V(z){z.context&&(z.context=z.context.prev)}function re(z,oe){for(var $;;){if(!z.context||($=z.context.tagName,!T.contextGrabbers.hasOwnProperty(P($))||!T.contextGrabbers[P($)].hasOwnProperty(P(oe))))return;V(z)}}function J(z,oe,$){return z=="openTag"?($.tagStart=oe.column(),le):z=="closeTag"?fe:J}function le(z,oe,$){return z=="word"?($.tagName=oe.current(),j="tag",ne):T.allowMissingTagName&&z=="endTag"?(j="tag bracket",ne(z,oe,$)):(j="error",le)}function fe(z,oe,$){if(z=="word"){var ke=oe.current();return $.context&&$.context.tagName!=ke&&T.implicitlyClosed.hasOwnProperty(P($.context.tagName))&&V($),$.context&&$.context.tagName==ke||T.matchClosing===!1?(j="tag",ae):(j="tag error",Re)}else return T.allowMissingTagName&&z=="endTag"?(j="tag bracket",ae(z,oe,$)):(j="error",Re)}function ae(z,oe,$){return z!="endTag"?(j="error",ae):(V($),J)}function Re(z,oe,$){return j="error",ae(z,oe,$)}function ne(z,oe,$){if(z=="word")return j="attribute",Me;if(z=="endTag"||z=="selfcloseTag"){var ke=$.tagName,et=$.tagStart;return $.tagName=$.tagStart=null,z=="selfcloseTag"||T.autoSelfClosers.hasOwnProperty(P(ke))?re($,ke):(re($,ke),$.context=new I($,ke,et==$.indented)),J}return j="error",ne}function Me(z,oe,$){return z=="equals"?Z:(T.allowMissing||(j="error"),ne(z,oe,$))}function Z(z,oe,$){return z=="string"?je:z=="word"&&T.allowUnquoted?(j="string",ne):(j="error",ne(z,oe,$))}function je(z,oe,$){return z=="string"?je:ne(z,oe,$)}return{startState:function(z){var oe={tokenize:ue,state:J,indented:z||0,tagName:null,tagStart:null,context:null};return z!=null&&(oe.baseIndent=z),oe},token:function(z,oe){if(!oe.tagName&&z.sol()&&(oe.indented=z.indentation()),z.eatSpace())return null;G=null;var $=oe.tokenize(z,oe);return($||G)&&$!="comment"&&(j=null,oe.state=oe.state(G||$,z,oe),j&&($=j=="error"?$+" error":j)),$},indent:function(z,oe,$){var ke=z.context;if(z.tokenize.isInAttribute)return z.tagStart==z.indented?z.stringStartCol+1:z.indented+F;if(ke&&ke.noIndent)return q.Pass;if(z.tokenize!=se&&z.tokenize!=ue)return $?$.match(/^(\s*)/)[0].length:0;if(z.tagName)return T.multilineTagIndentPastTag!==!1?z.tagStart+z.tagName.length+2:z.tagStart+F*(T.multilineTagIndentFactor||1);if(T.alignCDATA&&/<!\[CDATA\[/.test(oe))return 0;var et=oe&&/^<(\/)?([\w_:\.-]*)/.exec(oe);if(et&&et[1])for(;ke;)if(ke.tagName==et[2]){ke=ke.prev;break}else if(T.implicitlyClosed.hasOwnProperty(P(ke.tagName)))ke=ke.prev;else break;else if(et)for(;ke;){var dt=T.contextGrabbers[P(ke.tagName)];if(dt&&dt.hasOwnProperty(P(et[2])))ke=ke.prev;else break}for(;ke&&ke.prev&&!ke.startOfLine;)ke=ke.prev;return ke?ke.indent+F:z.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:T.htmlMode?"html":"xml",helperType:T.htmlMode?"html":"xml",skipAttribute:function(z){z.state==Z&&(z.state=ne)},xmlCurrentTag:function(z){return z.tagName?{name:z.tagName,close:z.type=="closeTag"}:null},xmlCurrentContext:function(z){for(var oe=[],$=z.context;$;$=$.prev)oe.push($.tagName);return oe.reverse()}}}),q.defineMIME("text/xml","xml"),q.defineMIME("application/xml","xml"),q.mimeModes.hasOwnProperty("text/html")||q.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"./node_modules/easymde/src/js/codemirror/tablist.js":function(ht,We,be){var q=be("./node_modules/codemirror/lib/codemirror.js");q.commands.tabAndIndentMarkdownList=function(Q){var B=Q.listSelections(),_=B[0].head,w=Q.getStateAfter(_.line),F=w.list!==!1;if(F){Q.execCommand("indentMore");return}if(Q.options.indentWithTabs)Q.execCommand("insertTab");else{var T=Array(Q.options.tabSize+1).join(" ");Q.replaceSelection(T)}},q.commands.shiftTabAndUnindentMarkdownList=function(Q){var B=Q.listSelections(),_=B[0].head,w=Q.getStateAfter(_.line),F=w.list!==!1;if(F){Q.execCommand("indentLess");return}if(Q.options.indentWithTabs)Q.execCommand("insertTab");else{var T=Array(Q.options.tabSize+1).join(" ");Q.replaceSelection(T)}}},"./node_modules/easymde/src/js/easymde.js":function(ht,We,be){"use strict";var q=be("./node_modules/codemirror/lib/codemirror.js");be("./node_modules/codemirror/addon/edit/continuelist.js"),be("./node_modules/easymde/src/js/codemirror/tablist.js"),be("./node_modules/codemirror/addon/display/fullscreen.js"),be("./node_modules/codemirror/mode/markdown/markdown.js"),be("./node_modules/codemirror/addon/mode/overlay.js"),be("./node_modules/codemirror/addon/display/placeholder.js"),be("./node_modules/codemirror/addon/display/autorefresh.js"),be("./node_modules/codemirror/addon/selection/mark-selection.js"),be("./node_modules/codemirror/addon/search/searchcursor.js"),be("./node_modules/codemirror/mode/gfm/gfm.js"),be("./node_modules/codemirror/mode/xml/xml.js");var Q=be("./node_modules/codemirror-spell-checker/src/js/spell-checker.js"),B=be("./node_modules/marked/lib/marked.cjs").TU,_=/Mac/.test(navigator.platform),w=new RegExp(/(<a.*?https?:\/\/.*?[^a]>)+?/g),F={toggleBold:re,toggleItalic:J,drawLink:rt,toggleHeadingSmaller:Re,toggleHeadingBigger:ne,drawImage:m,toggleBlockquote:ae,toggleOrderedList:et,toggleUnorderedList:ke,toggleCodeBlock:fe,togglePreview:we,toggleStrikethrough:le,toggleHeading1:Me,toggleHeading2:Z,toggleHeading3:je,toggleHeading4:z,toggleHeading5:oe,toggleHeading6:$,cleanBlock:dt,drawTable:Ee,drawHorizontalRule:qe,undo:Ct,redo:ut,toggleSideBySide:Ke,toggleFullScreen:V},T={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(s){for(var g in F)if(F[g]===s)return g;return null},ee=function(){var s=!1;return function(g){(/(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(g)||/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(g.substr(0,4)))&&(s=!0)}(navigator.userAgent||navigator.vendor||window.opera),s};function G(s){for(var g;(g=w.exec(s))!==null;){var D=g[0];if(D.indexOf("target=")===-1){var v=D.replace(/>$/,' target="_blank">');s=s.replace(D,v)}}return s}function j(s){for(var g=new DOMParser,D=g.parseFromString(s,"text/html"),v=D.getElementsByTagName("li"),M=0;M<v.length;M++)for(var H=v[M],A=0;A<H.children.length;A++){var S=H.children[A];S instanceof HTMLInputElement&&S.type==="checkbox"&&(H.style.marginLeft="-1.5em",H.style.listStyleType="none")}return D.documentElement.innerHTML}function ue(s){return _?s=s.replace("Ctrl","Cmd"):s=s.replace("Cmd","Ctrl"),s}function se(s,g,D,v){var M=pe(s,!1,g,D,"button",v);M.classList.add("easymde-dropdown"),M.onclick=function(){M.focus()};var H=document.createElement("div");H.className="easymde-dropdown-content";for(var A=0;A<s.children.length;A++){var S=s.children[A],W;typeof S=="string"&&S in h?W=pe(h[S],!0,g,D,"button",v):W=pe(S,!0,g,D,"button",v),W.addEventListener("click",function(ve){ve.stopPropagation()},!1),H.appendChild(W)}return M.appendChild(H),M}function pe(s,g,D,v,M,H){s=s||{};var A=document.createElement(M);if(s.attributes)for(var S in s.attributes)Object.prototype.hasOwnProperty.call(s.attributes,S)&&A.setAttribute(S,s.attributes[S]);var W=H.options.toolbarButtonClassPrefix?H.options.toolbarButtonClassPrefix+"-":"";A.className=W+s.name,A.setAttribute("type",M),D=D==null?!0:D,s.text&&(A.innerText=s.text),s.name&&s.name in v&&(F[s.name]=s.action),s.title&&D&&(A.title=Ce(s.title,s.action,v),_&&(A.title=A.title.replace("Ctrl","\u2318"),A.title=A.title.replace("Alt","\u2325"))),s.title&&A.setAttribute("aria-label",s.title),s.noDisable&&A.classList.add("no-disable"),s.noMobile&&A.classList.add("no-mobile");var ve=[];typeof s.className!="undefined"&&(ve=s.className.split(" "));for(var De=[],Se=0;Se<ve.length;Se++){var Ne=ve[Se];Ne.match(/^fa([srlb]|(-[\w-]*)|$)/)?De.push(Ne):A.classList.add(Ne)}if(A.tabIndex=-1,De.length>0){for(var Le=document.createElement("i"),Pe=0;Pe<De.length;Pe++){var Xe=De[Pe];Le.classList.add(Xe)}A.appendChild(Le)}return typeof s.icon!="undefined"&&(A.innerHTML=s.icon),s.action&&g&&(typeof s.action=="function"?A.onclick=function(Ue){Ue.preventDefault(),s.action(H)}:typeof s.action=="string"&&(A.onclick=function(Ue){Ue.preventDefault(),window.open(s.action,"_blank")})),A}function me(){var s=document.createElement("i");return s.className="separator",s.innerHTML="|",s}function Ce(s,g,D){var v,M=s;return g&&(v=Y(g),D[v]&&(M+=" ("+ue(D[v])+")")),M}function P(s,g){g=g||s.getCursor("start");var D=s.getTokenAt(g);if(!D.type)return{};for(var v=D.type.split(" "),M={},H,A,S=0;S<v.length;S++)H=v[S],H==="strong"?M.bold=!0:H==="variable-2"?(A=s.getLine(g.line),/^\s*\d+\.\s/.test(A)?M["ordered-list"]=!0:M["unordered-list"]=!0):H==="atom"?M.quote=!0:H==="em"?M.italic=!0:H==="quote"?M.quote=!0:H==="strikethrough"?M.strikethrough=!0:H==="comment"?M.code=!0:H==="link"&&!M.image?M.link=!0:H==="image"?M.image=!0:H.match(/^header(-[1-6])?$/)&&(M[H.replace("header","heading")]=!0);return M}var I="";function V(s){var g=s.codemirror;g.setOption("fullScreen",!g.getOption("fullScreen")),g.getOption("fullScreen")?(I=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=I;var D=g.getWrapperElement(),v=D.nextSibling;if(v.classList.contains("editor-preview-active-side"))if(s.options.sideBySideFullscreen===!1){var M=D.parentNode;g.getOption("fullScreen")?M.classList.remove("sided--no-fullscreen"):M.classList.add("sided--no-fullscreen")}else Ke(s);if(s.options.onToggleFullScreen&&s.options.onToggleFullScreen(g.getOption("fullScreen")||!1),typeof s.options.maxHeight!="undefined"&&(g.getOption("fullScreen")?(g.getScrollerElement().style.removeProperty("height"),v.style.removeProperty("height")):(g.getScrollerElement().style.height=s.options.maxHeight,s.setPreviewMaxHeight())),s.toolbar_div.classList.toggle("fullscreen"),s.toolbarElements&&s.toolbarElements.fullscreen){var H=s.toolbarElements.fullscreen;H.classList.toggle("active")}}function re(s){_e(s,"bold",s.options.blockStyles.bold)}function J(s){_e(s,"italic",s.options.blockStyles.italic)}function le(s){_e(s,"strikethrough","~~")}function fe(s){var g=s.options.blockStyles.code;function D(Dt){if(typeof Dt!="object")throw"fencing_line() takes a 'line' object (not a line number, or line text). Got: "+typeof Dt+": "+Dt;return Dt.styles&&Dt.styles[2]&&Dt.styles[2].indexOf("formatting-code-block")!==-1}function v(Dt){return Dt.state.base.base||Dt.state.base}function M(Dt,Gt,Pt,Ft,rr){Pt=Pt||Dt.getLineHandle(Gt),Ft=Ft||Dt.getTokenAt({line:Gt,ch:1}),rr=rr||!!Pt.text&&Dt.getTokenAt({line:Gt,ch:Pt.text.length-1});var Wt=Ft.type?Ft.type.split(" "):[];return rr&&v(rr).indentedCode?"indented":Wt.indexOf("comment")===-1?!1:v(Ft).fencedChars||v(rr).fencedChars||D(Pt)?"fenced":"single"}function H(Dt,Gt,Pt,Ft){var rr=Gt.line+1,Wt=Pt.line+1,Ir=Gt.line!==Pt.line,Li=Ft+`
|
|
`,it=`
|
|
`+Ft;Ir&&Wt++,Ir&&Pt.ch===0&&(it=Ft+`
|
|
`,Wt--),Ge(Dt,!1,[Li,it]),Dt.setSelection({line:rr,ch:0},{line:Wt,ch:0})}var A=s.codemirror,S=A.getCursor("start"),W=A.getCursor("end"),ve=A.getTokenAt({line:S.line,ch:S.ch||1}),De=A.getLineHandle(S.line),Se=M(A,S.line,De,ve),Ne,Le,Pe;if(Se==="single"){var Xe=De.text.slice(0,S.ch).replace("`",""),Ue=De.text.slice(S.ch).replace("`","");A.replaceRange(Xe+Ue,{line:S.line,ch:0},{line:S.line,ch:99999999999999}),S.ch--,S!==W&&W.ch--,A.setSelection(S,W),A.focus()}else if(Se==="fenced")if(S.line!==W.line||S.ch!==W.ch){for(Ne=S.line;Ne>=0&&(De=A.getLineHandle(Ne),!D(De));Ne--);var Ye=A.getTokenAt({line:Ne,ch:1}),at=v(Ye).fencedChars,st,St,_t,qt;D(A.getLineHandle(S.line))?(st="",St=S.line):D(A.getLineHandle(S.line-1))?(st="",St=S.line-1):(st=at+`
|
|
`,St=S.line),D(A.getLineHandle(W.line))?(_t="",qt=W.line,W.ch===0&&(qt+=1)):W.ch!==0&&D(A.getLineHandle(W.line+1))?(_t="",qt=W.line+1):(_t=at+`
|
|
`,qt=W.line+1),W.ch===0&&(qt-=1),A.operation(function(){A.replaceRange(_t,{line:qt,ch:0},{line:qt+(_t?0:1),ch:0}),A.replaceRange(st,{line:St,ch:0},{line:St+(st?0:1),ch:0})}),A.setSelection({line:St+(st?1:0),ch:0},{line:qt+(st?1:-1),ch:0}),A.focus()}else{var Mr=S.line;if(D(A.getLineHandle(S.line))&&(M(A,S.line+1)==="fenced"?(Ne=S.line,Mr=S.line+1):(Le=S.line,Mr=S.line-1)),Ne===void 0)for(Ne=Mr;Ne>=0&&(De=A.getLineHandle(Ne),!D(De));Ne--);if(Le===void 0)for(Pe=A.lineCount(),Le=Mr;Le<Pe&&(De=A.getLineHandle(Le),!D(De));Le++);A.operation(function(){A.replaceRange("",{line:Ne,ch:0},{line:Ne+1,ch:0}),A.replaceRange("",{line:Le-1,ch:0},{line:Le,ch:0})}),A.focus()}else if(Se==="indented"){if(S.line!==W.line||S.ch!==W.ch)Ne=S.line,Le=W.line,W.ch===0&&Le--;else{for(Ne=S.line;Ne>=0;Ne--)if(De=A.getLineHandle(Ne),!De.text.match(/^\s*$/)&&M(A,Ne,De)!=="indented"){Ne+=1;break}for(Pe=A.lineCount(),Le=S.line;Le<Pe;Le++)if(De=A.getLineHandle(Le),!De.text.match(/^\s*$/)&&M(A,Le,De)!=="indented"){Le-=1;break}}var Ei=A.getLineHandle(Le+1),Nr=Ei&&A.getTokenAt({line:Le+1,ch:Ei.text.length-1}),sn=Nr&&v(Nr).indentedCode;sn&&A.replaceRange(`
|
|
`,{line:Le+1,ch:0});for(var yr=Ne;yr<=Le;yr++)A.indentLine(yr,"subtract");A.focus()}else{var sr=S.line===W.line&&S.ch===W.ch&&S.ch===0,fn=S.line!==W.line;sr||fn?H(A,S,W,g):Ge(A,!1,["`","`"])}}function ae(s){Lt(s.codemirror,"quote")}function Re(s){Qe(s.codemirror,"smaller")}function ne(s){Qe(s.codemirror,"bigger")}function Me(s){Qe(s.codemirror,void 0,1)}function Z(s){Qe(s.codemirror,void 0,2)}function je(s){Qe(s.codemirror,void 0,3)}function z(s){Qe(s.codemirror,void 0,4)}function oe(s){Qe(s.codemirror,void 0,5)}function $(s){Qe(s.codemirror,void 0,6)}function ke(s){var g=s.codemirror,D="*";["-","+","*"].includes(s.options.unorderedListStyle)&&(D=s.options.unorderedListStyle),Lt(g,"unordered-list",D)}function et(s){Lt(s.codemirror,"ordered-list")}function dt(s){Tt(s.codemirror)}function rt(s){var g=s.options,D="https://";if(g.promptURLs){var v=prompt(g.promptTexts.link,D);if(!v)return!1;D=c(v)}Qt(s,"link",g.insertTexts.link,D)}function m(s){var g=s.options,D="https://";if(g.promptURLs){var v=prompt(g.promptTexts.image,D);if(!v)return!1;D=c(v)}Qt(s,"image",g.insertTexts.image,D)}function c(s){return encodeURI(s).replace(/([\\()])/g,"\\$1")}function ye(s){s.openBrowseFileWindow()}function He(s,g){var D=s.codemirror,v=P(D),M=s.options,H=g.substr(g.lastIndexOf("/")+1),A=H.substring(H.lastIndexOf(".")+1).replace(/\?.*$/,"").toLowerCase();if(["png","jpg","jpeg","gif","svg","apng","avif","webp"].includes(A))Ge(D,v.image,M.insertTexts.uploadedImage,g);else{var S=M.insertTexts.link;S[0]="["+H,Ge(D,v.link,S,g)}s.updateStatusBar("upload-image",s.options.imageTexts.sbOnUploaded.replace("#image_name#",H)),setTimeout(function(){s.updateStatusBar("upload-image",s.options.imageTexts.sbInit)},1e3)}function Ee(s){var g=s.codemirror,D=P(g),v=s.options;Ge(g,D.table,v.insertTexts.table)}function qe(s){var g=s.codemirror,D=P(g),v=s.options;Ge(g,D.image,v.insertTexts.horizontalRule)}function Ct(s){var g=s.codemirror;g.undo(),g.focus()}function ut(s){var g=s.codemirror;g.redo(),g.focus()}function Ke(s){var g=s.codemirror,D=g.getWrapperElement(),v=D.nextSibling,M=s.toolbarElements&&s.toolbarElements["side-by-side"],H=!1,A=D.parentNode;v.classList.contains("editor-preview-active-side")?(s.options.sideBySideFullscreen===!1&&A.classList.remove("sided--no-fullscreen"),v.classList.remove("editor-preview-active-side"),M&&M.classList.remove("active"),D.classList.remove("CodeMirror-sided")):(setTimeout(function(){g.getOption("fullScreen")||(s.options.sideBySideFullscreen===!1?A.classList.add("sided--no-fullscreen"):V(s)),v.classList.add("editor-preview-active-side")},1),M&&M.classList.add("active"),D.classList.add("CodeMirror-sided"),H=!0);var S=D.lastChild;if(S.classList.contains("editor-preview-active")){S.classList.remove("editor-preview-active");var W=s.toolbarElements.preview,ve=s.toolbar_div;W.classList.remove("active"),ve.classList.remove("disabled-for-preview")}var De=function(){var Ne=s.options.previewRender(s.value(),v);Ne!=null&&(v.innerHTML=Ne)};if(g.sideBySideRenderingFunction||(g.sideBySideRenderingFunction=De),H){var Se=s.options.previewRender(s.value(),v);Se!=null&&(v.innerHTML=Se),g.on("update",g.sideBySideRenderingFunction)}else g.off("update",g.sideBySideRenderingFunction);g.refresh()}function we(s){var g=s.codemirror,D=g.getWrapperElement(),v=s.toolbar_div,M=s.options.toolbar?s.toolbarElements.preview:!1,H=D.lastChild,A=g.getWrapperElement().nextSibling;if(A.classList.contains("editor-preview-active-side")&&Ke(s),!H||!H.classList.contains("editor-preview-full")){if(H=document.createElement("div"),H.className="editor-preview-full",s.options.previewClass)if(Array.isArray(s.options.previewClass))for(var S=0;S<s.options.previewClass.length;S++)H.classList.add(s.options.previewClass[S]);else typeof s.options.previewClass=="string"&&H.classList.add(s.options.previewClass);D.appendChild(H)}H.classList.contains("editor-preview-active")?(H.classList.remove("editor-preview-active"),M&&(M.classList.remove("active"),v.classList.remove("disabled-for-preview"))):(setTimeout(function(){H.classList.add("editor-preview-active")},1),M&&(M.classList.add("active"),v.classList.add("disabled-for-preview")));var W=s.options.previewRender(s.value(),H);W!==null&&(H.innerHTML=W)}function Ge(s,g,D,v){if(!s.getWrapperElement().lastChild.classList.contains("editor-preview-active")){var M,H=D[0],A=D[1],S={},W={};Object.assign(S,s.getCursor("start")),Object.assign(W,s.getCursor("end")),v&&(H=H.replace("#url#",v),A=A.replace("#url#",v)),g?(M=s.getLine(S.line),H=M.slice(0,S.ch),A=M.slice(S.ch),s.replaceRange(H+A,{line:S.line,ch:0})):(M=s.getSelection(),s.replaceSelection(H+M+A),S.ch+=H.length,S!==W&&(W.ch+=H.length)),s.setSelection(S,W),s.focus()}}function Qe(s,g,D){if(!s.getWrapperElement().lastChild.classList.contains("editor-preview-active")){for(var v=s.getCursor("start"),M=s.getCursor("end"),H=v.line;H<=M.line;H++)(function(A){var S=s.getLine(A),W=S.search(/[^#]/);g!==void 0?W<=0?g=="bigger"?S="###### "+S:S="# "+S:W==6&&g=="smaller"?S=S.substr(7):W==1&&g=="bigger"?S=S.substr(2):g=="bigger"?S=S.substr(1):S="#"+S:W<=0?S="#".repeat(D)+" "+S:W==D?S=S.substr(W+1):S="#".repeat(D)+" "+S.substr(W+1),s.replaceRange(S,{line:A,ch:0},{line:A,ch:99999999999999})})(H);s.focus()}}function Lt(s,g,D){if(!s.getWrapperElement().lastChild.classList.contains("editor-preview-active")){for(var v=/^(\s*)(\*|-|\+|\d*\.)(\s+)/,M=/^\s*/,H=P(s),A=s.getCursor("start"),S=s.getCursor("end"),W={quote:/^(\s*)>\s+/,"unordered-list":v,"ordered-list":v},ve=function(Pe,Xe){var Ue={quote:">","unordered-list":D,"ordered-list":"%%i."};return Ue[Pe].replace("%%i",Xe)},De=function(Pe,Xe){var Ue={quote:">","unordered-list":"\\"+D,"ordered-list":"\\d+."},Ye=new RegExp(Ue[Pe]);return Xe&&Ye.test(Xe)},Se=function(Pe,Xe,Ue){var Ye=v.exec(Xe),at=ve(Pe,Ne);return Ye!==null?(De(Pe,Ye[2])&&(at=""),Xe=Ye[1]+at+Ye[3]+Xe.replace(M,"").replace(W[Pe],"$1")):Ue==!1&&(Xe=at+" "+Xe),Xe},Ne=1,Le=A.line;Le<=S.line;Le++)(function(Pe){var Xe=s.getLine(Pe);H[g]?Xe=Xe.replace(W[g],"$1"):(g=="unordered-list"&&(Xe=Se("ordered-list",Xe,!0)),Xe=Se(g,Xe,!1),Ne+=1),s.replaceRange(Xe,{line:Pe,ch:0},{line:Pe,ch:99999999999999})})(Le);s.focus()}}function Qt(s,g,D,v){if(!(!s.codemirror||s.isPreviewActive())){var M=s.codemirror,H=P(M),A=H[g];if(!A){Ge(M,A,D,v);return}var S=M.getCursor("start"),W=M.getCursor("end"),ve=M.getLine(S.line),De=ve.slice(0,S.ch),Se=ve.slice(S.ch);g=="link"?De=De.replace(/(.*)[^!]\[/,"$1"):g=="image"&&(De=De.replace(/(.*)!\[$/,"$1")),Se=Se.replace(/]\(.*?\)/,""),M.replaceRange(De+Se,{line:S.line,ch:0},{line:S.line,ch:99999999999999}),S.ch-=D[0].length,S!==W&&(W.ch-=D[0].length),M.setSelection(S,W),M.focus()}}function _e(s,g,D,v){if(!(!s.codemirror||s.isPreviewActive())){v=typeof v=="undefined"?D:v;var M=s.codemirror,H=P(M),A,S=D,W=v,ve=M.getCursor("start"),De=M.getCursor("end");H[g]?(A=M.getLine(ve.line),S=A.slice(0,ve.ch),W=A.slice(ve.ch),g=="bold"?(S=S.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),W=W.replace(/(\*\*|__)/,"")):g=="italic"?(S=S.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),W=W.replace(/(\*|_)/,"")):g=="strikethrough"&&(S=S.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),W=W.replace(/(\*\*|~~)/,"")),M.replaceRange(S+W,{line:ve.line,ch:0},{line:ve.line,ch:99999999999999}),g=="bold"||g=="strikethrough"?(ve.ch-=2,ve!==De&&(De.ch-=2)):g=="italic"&&(ve.ch-=1,ve!==De&&(De.ch-=1))):(A=M.getSelection(),g=="bold"?(A=A.split("**").join(""),A=A.split("__").join("")):g=="italic"?(A=A.split("*").join(""),A=A.split("_").join("")):g=="strikethrough"&&(A=A.split("~~").join("")),M.replaceSelection(S+A+W),ve.ch+=D.length,De.ch=ve.ch+A.length),M.setSelection(ve,De),M.focus()}}function Tt(s){if(!s.getWrapperElement().lastChild.classList.contains("editor-preview-active"))for(var g=s.getCursor("start"),D=s.getCursor("end"),v,M=g.line;M<=D.line;M++)v=s.getLine(M),v=v.replace(/^[ ]*([# ]+|\*|-|[> ]+|[0-9]+(.|\)))[ ]*/,""),s.replaceRange(v,{line:M,ch:0},{line:M,ch:99999999999999})}function Bt(s,g){if(Math.abs(s)<1024)return""+s+g[0];var D=0;do s/=1024,++D;while(Math.abs(s)>=1024&&D<g.length);return""+s.toFixed(1)+g[D]}function jt(s,g){for(var D in g)Object.prototype.hasOwnProperty.call(g,D)&&(g[D]instanceof Array?s[D]=g[D].concat(s[D]instanceof Array?s[D]:[]):g[D]!==null&&typeof g[D]=="object"&&g[D].constructor===Object?s[D]=jt(s[D]||{},g[D]):s[D]=g[D]);return s}function N(s){for(var g=1;g<arguments.length;g++)s=jt(s,arguments[g]);return s}function E(s){var g=/[a-zA-Z0-9_\u00A0-\u02AF\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g,D=s.match(g),v=0;if(D===null)return v;for(var M=0;M<D.length;M++)D[M].charCodeAt(0)>=19968?v+=D[M].length:v+=1;return v}var C={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"},h={bold:{name:"bold",action:re,className:C.bold,title:"Bold",default:!0},italic:{name:"italic",action:J,className:C.italic,title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:le,className:C.strikethrough,title:"Strikethrough"},heading:{name:"heading",action:Re,className:C.heading,title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:Re,className:C["heading-smaller"],title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:ne,className:C["heading-bigger"],title:"Bigger Heading"},"heading-1":{name:"heading-1",action:Me,className:C["heading-1"],title:"Big Heading"},"heading-2":{name:"heading-2",action:Z,className:C["heading-2"],title:"Medium Heading"},"heading-3":{name:"heading-3",action:je,className:C["heading-3"],title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:fe,className:C.code,title:"Code"},quote:{name:"quote",action:ae,className:C.quote,title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:ke,className:C["unordered-list"],title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:et,className:C["ordered-list"],title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:dt,className:C["clean-block"],title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:rt,className:C.link,title:"Create Link",default:!0},image:{name:"image",action:m,className:C.image,title:"Insert Image",default:!0},"upload-image":{name:"upload-image",action:ye,className:C["upload-image"],title:"Import an image"},table:{name:"table",action:Ee,className:C.table,title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:qe,className:C["horizontal-rule"],title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:we,className:C.preview,noDisable:!0,title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:Ke,className:C["side-by-side"],noDisable:!0,noMobile:!0,title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:V,className:C.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:C.guide,noDisable:!0,title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:Ct,className:C.undo,noDisable:!0,title:"Undo"},redo:{name:"redo",action:ut,className:C.redo,noDisable:!0,title:"Redo"}},d={link:["[","](#url#)"],image:["![","](#url#)"],uploadedImage:["![](#url#)",""],table:["",`
|
|
|
|
| Column 1 | Column 2 | Column 3 |
|
|
| -------- | -------- | -------- |
|
|
| Text | Text | Text |
|
|
|
|
`],horizontalRule:["",`
|
|
|
|
-----
|
|
|
|
`]},b={link:"URL for the link:",image:"URL of the image:"},y={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},R={bold:"**",code:"```",italic:"*"},X={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"},de={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 O(s){s=s||{},s.parent=this;var g=!0;if(s.autoDownloadFontAwesome===!1&&(g=!1),s.autoDownloadFontAwesome!==!0)for(var D=document.styleSheets,v=0;v<D.length;v++)!D[v].href||D[v].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(g=!1);if(g){var M=document.createElement("link");M.rel="stylesheet",M.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(M)}if(s.element)this.element=s.element;else if(s.element===null){console.log("EasyMDE: Error. No element was found.");return}if(s.toolbar===void 0){s.toolbar=[];for(var H in h)Object.prototype.hasOwnProperty.call(h,H)&&(H.indexOf("separator-")!=-1&&s.toolbar.push("|"),(h[H].default===!0||s.showIcons&&s.showIcons.constructor===Array&&s.showIcons.indexOf(H)!=-1)&&s.toolbar.push(H))}if(Object.prototype.hasOwnProperty.call(s,"previewClass")||(s.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(s,"status")||(s.status=["autosave","lines","words","cursor"],s.uploadImage&&s.status.unshift("upload-image")),s.previewRender||(s.previewRender=function(S){return this.parent.markdown(S)}),s.parsingConfig=N({highlightFormatting:!0},s.parsingConfig||{}),s.insertTexts=N({},d,s.insertTexts||{}),s.promptTexts=N({},b,s.promptTexts||{}),s.blockStyles=N({},R,s.blockStyles||{}),s.autosave!=null&&(s.autosave.timeFormat=N({},y,s.autosave.timeFormat||{})),s.iconClassMap=N({},C,s.iconClassMap||{}),s.shortcuts=N({},T,s.shortcuts||{}),s.maxHeight=s.maxHeight||void 0,s.direction=s.direction||"ltr",typeof s.maxHeight!="undefined"?s.minHeight=s.maxHeight:s.minHeight=s.minHeight||"300px",s.errorCallback=s.errorCallback||function(S){alert(S)},s.uploadImage=s.uploadImage||!1,s.imageMaxSize=s.imageMaxSize||2097152,s.imageAccept=s.imageAccept||"image/png, image/jpeg, image/gif, image/avif",s.imageTexts=N({},X,s.imageTexts||{}),s.errorMessages=N({},de,s.errorMessages||{}),s.imagePathAbsolute=s.imagePathAbsolute||!1,s.imageCSRFName=s.imageCSRFName||"csrfmiddlewaretoken",s.imageCSRFHeader=s.imageCSRFHeader||!1,s.autosave!=null&&s.autosave.unique_id!=null&&s.autosave.unique_id!=""&&(s.autosave.uniqueId=s.autosave.unique_id),s.overlayMode&&s.overlayMode.combine===void 0&&(s.overlayMode.combine=!0),this.options=s,this.render(),s.initialValue&&(!this.options.autosave||this.options.autosave.foundSavedValue!==!0)&&this.value(s.initialValue),s.uploadImage){var A=this;this.codemirror.on("dragenter",function(S,W){A.updateStatusBar("upload-image",A.options.imageTexts.sbOnDragEnter),W.stopPropagation(),W.preventDefault()}),this.codemirror.on("dragend",function(S,W){A.updateStatusBar("upload-image",A.options.imageTexts.sbInit),W.stopPropagation(),W.preventDefault()}),this.codemirror.on("dragleave",function(S,W){A.updateStatusBar("upload-image",A.options.imageTexts.sbInit),W.stopPropagation(),W.preventDefault()}),this.codemirror.on("dragover",function(S,W){A.updateStatusBar("upload-image",A.options.imageTexts.sbOnDragEnter),W.stopPropagation(),W.preventDefault()}),this.codemirror.on("drop",function(S,W){W.stopPropagation(),W.preventDefault(),s.imageUploadFunction?A.uploadImagesUsingCustomFunction(s.imageUploadFunction,W.dataTransfer.files):A.uploadImages(W.dataTransfer.files)}),this.codemirror.on("paste",function(S,W){s.imageUploadFunction?A.uploadImagesUsingCustomFunction(s.imageUploadFunction,W.clipboardData.files):A.uploadImages(W.clipboardData.files)})}}O.prototype.uploadImages=function(s,g,D){if(s.length!==0){for(var v=[],M=0;M<s.length;M++)v.push(s[M].name),this.uploadImage(s[M],g,D);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",v.join(", ")))}},O.prototype.uploadImagesUsingCustomFunction=function(s,g){if(g.length!==0){for(var D=[],v=0;v<g.length;v++)D.push(g[v].name),this.uploadImageUsingCustomFunction(s,g[v]);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",D.join(", ")))}},O.prototype.updateStatusBar=function(s,g){if(!!this.gui.statusbar){var D=this.gui.statusbar.getElementsByClassName(s);D.length===1?this.gui.statusbar.getElementsByClassName(s)[0].textContent=g:D.length===0?console.log("EasyMDE: status bar item "+s+" was not found."):console.log("EasyMDE: Several status bar items named "+s+" was found.")}},O.prototype.markdown=function(s){if(B){var g;if(this.options&&this.options.renderingConfig&&this.options.renderingConfig.markedOptions?g=this.options.renderingConfig.markedOptions:g={},this.options&&this.options.renderingConfig&&this.options.renderingConfig.singleLineBreaks===!1?g.breaks=!1:g.breaks=!0,this.options&&this.options.renderingConfig&&this.options.renderingConfig.codeSyntaxHighlighting===!0){var D=this.options.renderingConfig.hljs||window.hljs;D&&(g.highlight=function(M,H){return H&&D.getLanguage(H)?D.highlight(H,M).value:D.highlightAuto(M).value})}B.setOptions(g);var v=B.parse(s);return this.options.renderingConfig&&typeof this.options.renderingConfig.sanitizerFunction=="function"&&(v=this.options.renderingConfig.sanitizerFunction.call(this,v)),v=G(v),v=j(v),v}},O.prototype.render=function(s){if(s||(s=this.element||document.getElementsByTagName("textarea")[0]),this._rendered&&this._rendered===s)return;this.element=s;var g=this.options,D=this,v={};for(var M in g.shortcuts)g.shortcuts[M]!==null&&F[M]!==null&&function(Ue){v[ue(g.shortcuts[Ue])]=function(){var Ye=F[Ue];typeof Ye=="function"?Ye(D):typeof Ye=="string"&&window.open(Ye,"_blank")}}(M);v.Enter="newlineAndIndentContinueMarkdownList",v.Tab="tabAndIndentMarkdownList",v["Shift-Tab"]="shiftTabAndUnindentMarkdownList",v.Esc=function(Ue){Ue.getOption("fullScreen")&&V(D)},this.documentOnKeyDown=function(Ue){Ue=Ue||window.event,Ue.keyCode==27&&D.codemirror.getOption("fullScreen")&&V(D)},document.addEventListener("keydown",this.documentOnKeyDown,!1);var H,A;g.overlayMode?(q.defineMode("overlay-mode",function(Ue){return q.overlayMode(q.getMode(Ue,g.spellChecker!==!1?"spell-checker":"gfm"),g.overlayMode.mode,g.overlayMode.combine)}),H="overlay-mode",A=g.parsingConfig,A.gitHubSpice=!1):(H=g.parsingConfig,H.name="gfm",H.gitHubSpice=!1),g.spellChecker!==!1&&(H="spell-checker",A=g.parsingConfig,A.name="gfm",A.gitHubSpice=!1,typeof g.spellChecker=="function"?g.spellChecker({codeMirrorInstance:q}):Q({codeMirrorInstance:q}));function S(Ue,Ye,at){return{addNew:!1}}if(this.codemirror=q.fromTextArea(s,{mode:H,backdrop:A,theme:g.theme!=null?g.theme:"easymde",tabSize:g.tabSize!=null?g.tabSize:2,indentUnit:g.tabSize!=null?g.tabSize:2,indentWithTabs:g.indentWithTabs!==!1,lineNumbers:g.lineNumbers===!0,autofocus:g.autofocus===!0,extraKeys:v,direction:g.direction,lineWrapping:g.lineWrapping!==!1,allowDropFileTypes:["text/plain"],placeholder:g.placeholder||s.getAttribute("placeholder")||"",styleSelectedText:g.styleSelectedText!=null?g.styleSelectedText:!ee(),scrollbarStyle:g.scrollbarStyle!=null?g.scrollbarStyle:"native",configureMouse:S,inputStyle:g.inputStyle!=null?g.inputStyle:ee()?"contenteditable":"textarea",spellcheck:g.nativeSpellcheck!=null?g.nativeSpellcheck:!0,autoRefresh:g.autoRefresh!=null?g.autoRefresh:!1}),this.codemirror.getScrollerElement().style.minHeight=g.minHeight,typeof g.maxHeight!="undefined"&&(this.codemirror.getScrollerElement().style.height=g.maxHeight),g.forceSync===!0){var W=this.codemirror;W.on("change",function(){W.save()})}this.gui={};var ve=document.createElement("div");ve.classList.add("EasyMDEContainer"),ve.setAttribute("role","application");var De=this.codemirror.getWrapperElement();De.parentNode.insertBefore(ve,De),ve.appendChild(De),g.toolbar!==!1&&(this.gui.toolbar=this.createToolbar()),g.status!==!1&&(this.gui.statusbar=this.createStatusbar()),g.autosave!=null&&g.autosave.enabled===!0&&(this.autosave(),this.codemirror.on("change",function(){clearTimeout(D._autosave_timeout),D._autosave_timeout=setTimeout(function(){D.autosave()},D.options.autosave.submit_delay||D.options.autosave.delay||1e3)}));function Se(Ue,Ye){var at,st=window.getComputedStyle(document.querySelector(".CodeMirror-sizer")).width.replace("px","");return Ue<st?at=Ye+"px":at=Ye/Ue*100+"%",at}var Ne=this;function Le(Ue,Ye){Ue.setAttribute("data-img-src",Ye.url),Ue.setAttribute("style","--bg-image:url("+Ye.url+");--width:"+Ye.naturalWidth+"px;--height:"+Se(Ye.naturalWidth,Ye.naturalHeight)),Ne.codemirror.setSize()}function Pe(){!g.previewImagesInEditor||ve.querySelectorAll(".cm-image-marker").forEach(function(Ue){var Ye=Ue.parentElement;if(!!Ye.innerText.match(/^!\[.*?\]\(.*\)/g)&&!Ye.hasAttribute("data-img-src")){var at=Ye.innerText.match("\\((.*)\\)");if(window.EMDEimagesCache||(window.EMDEimagesCache={}),at&&at.length>=2){var st=at[1];if(g.imagesPreviewHandler){var St=g.imagesPreviewHandler(at[1]);typeof St=="string"&&(st=St)}if(window.EMDEimagesCache[st])Le(Ye,window.EMDEimagesCache[st]);else{var _t=document.createElement("img");_t.onload=function(){window.EMDEimagesCache[st]={naturalWidth:_t.naturalWidth,naturalHeight:_t.naturalHeight,url:st},Le(Ye,window.EMDEimagesCache[st])},_t.src=st}}}})}this.codemirror.on("update",function(){Pe()}),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element,(g.autofocus===!0||s.autofocus)&&this.codemirror.focus();var Xe=this.codemirror;setTimeout(function(){Xe.refresh()}.bind(Xe),0)},O.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)};function Te(){if(typeof localStorage=="object")try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(s){return!1}else return!1;return!0}O.prototype.autosave=function(){if(Te()){var s=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&&(s.element.form!=null&&s.element.form!=null&&s.element.form.addEventListener("submit",function(){clearTimeout(s.autosaveTimeoutId),s.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+s.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 g=s.value();g!==""?localStorage.setItem("smde_"+this.options.autosave.uniqueId,g):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var D=document.getElementById("autosaved");if(D!=null&&D!=null&&D!=""){var v=new Date,M=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(v),H=this.options.autosave.text==null?"Autosaved: ":this.options.autosave.text;D.innerHTML=H+M}}else console.log("EasyMDE: localStorage not available, cannot autosave")},O.prototype.clearAutosavedValue=function(){if(Te()){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")},O.prototype.openBrowseFileWindow=function(s,g){var D=this,v=this.gui.toolbar.getElementsByClassName("imageInput")[0];v.click();function M(H){D.options.imageUploadFunction?D.uploadImagesUsingCustomFunction(D.options.imageUploadFunction,H.target.files):D.uploadImages(H.target.files,s,g),v.removeEventListener("change",M)}v.addEventListener("change",M)},O.prototype.uploadImage=function(s,g,D){var v=this;g=g||function(ve){He(v,ve)};function M(W){v.updateStatusBar("upload-image",W),setTimeout(function(){v.updateStatusBar("upload-image",v.options.imageTexts.sbInit)},1e4),D&&typeof D=="function"&&D(W),v.options.errorCallback(W)}function H(W){var ve=v.options.imageTexts.sizeUnits.split(",");return W.replace("#image_name#",s.name).replace("#image_size#",Bt(s.size,ve)).replace("#image_max_size#",Bt(v.options.imageMaxSize,ve))}if(s.size>this.options.imageMaxSize){M(H(this.options.errorMessages.fileTooLarge));return}var A=new FormData;A.append("image",s),v.options.imageCSRFToken&&!v.options.imageCSRFHeader&&A.append(v.options.imageCSRFName,v.options.imageCSRFToken);var S=new XMLHttpRequest;S.upload.onprogress=function(W){if(W.lengthComputable){var ve=""+Math.round(W.loaded*100/W.total);v.updateStatusBar("upload-image",v.options.imageTexts.sbProgress.replace("#file_name#",s.name).replace("#progress#",ve))}},S.open("POST",this.options.imageUploadEndpoint),v.options.imageCSRFToken&&v.options.imageCSRFHeader&&S.setRequestHeader(v.options.imageCSRFName,v.options.imageCSRFToken),S.onload=function(){try{var W=JSON.parse(this.responseText)}catch(ve){console.error("EasyMDE: The server did not return a valid json."),M(H(v.options.errorMessages.importError));return}this.status===200&&W&&!W.error&&W.data&&W.data.filePath?g((v.options.imagePathAbsolute?"":window.location.origin+"/")+W.data.filePath):W.error&&W.error in v.options.errorMessages?M(H(v.options.errorMessages[W.error])):W.error?M(H(W.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),M(H(v.options.errorMessages.importError)))},S.onerror=function(W){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+W.target.status+" ("+W.target.statusText+")"),M(v.options.errorMessages.importError)},S.send(A)},O.prototype.uploadImageUsingCustomFunction=function(s,g){var D=this;function v(A){He(D,A)}function M(A){var S=H(A);D.updateStatusBar("upload-image",S),setTimeout(function(){D.updateStatusBar("upload-image",D.options.imageTexts.sbInit)},1e4),D.options.errorCallback(S)}function H(A){var S=D.options.imageTexts.sizeUnits.split(",");return A.replace("#image_name#",g.name).replace("#image_size#",Bt(g.size,S)).replace("#image_max_size#",Bt(D.options.imageMaxSize,S))}s.apply(this,[g,v,M])},O.prototype.setPreviewMaxHeight=function(){var s=this.codemirror,g=s.getWrapperElement(),D=g.nextSibling,v=parseInt(window.getComputedStyle(g).paddingTop),M=parseInt(window.getComputedStyle(g).borderTopWidth),H=parseInt(this.options.maxHeight),A=H+v*2+M*2,S=A.toString()+"px";D.style.height=S},O.prototype.createSideBySide=function(){var s=this.codemirror,g=s.getWrapperElement(),D=g.nextSibling;if(!D||!D.classList.contains("editor-preview-side")){if(D=document.createElement("div"),D.className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var v=0;v<this.options.previewClass.length;v++)D.classList.add(this.options.previewClass[v]);else typeof this.options.previewClass=="string"&&D.classList.add(this.options.previewClass);g.parentNode.insertBefore(D,g.nextSibling)}if(typeof this.options.maxHeight!="undefined"&&this.setPreviewMaxHeight(),this.options.syncSideBySidePreviewScroll===!1)return D;var M=!1,H=!1;return s.on("scroll",function(A){if(M){M=!1;return}H=!0;var S=A.getScrollInfo().height-A.getScrollInfo().clientHeight,W=parseFloat(A.getScrollInfo().top)/S,ve=(D.scrollHeight-D.clientHeight)*W;D.scrollTop=ve}),D.onscroll=function(){if(H){H=!1;return}M=!0;var A=D.scrollHeight-D.clientHeight,S=parseFloat(D.scrollTop)/A,W=(s.getScrollInfo().height-s.getScrollInfo().clientHeight)*S;s.scrollTo(0,W)},D},O.prototype.createToolbar=function(s){if(s=s||this.options.toolbar,!(!s||s.length===0)){var g;for(g=0;g<s.length;g++)h[s[g]]!=null&&(s[g]=h[s[g]]);var D=document.createElement("div");D.className="editor-toolbar",D.setAttribute("role","toolbar");var v=this,M={};for(v.toolbar=s,g=0;g<s.length;g++)if(!(s[g].name=="guide"&&v.options.toolbarGuideIcon===!1)&&!(v.options.hideIcons&&v.options.hideIcons.indexOf(s[g].name)!=-1)&&!((s[g].name=="fullscreen"||s[g].name=="side-by-side")&&ee())){if(s[g]==="|"){for(var H=!1,A=g+1;A<s.length;A++)s[A]!=="|"&&(!v.options.hideIcons||v.options.hideIcons.indexOf(s[A].name)==-1)&&(H=!0);if(!H)continue}(function(ve){var De;if(ve==="|"?De=me():ve.children?De=se(ve,v.options.toolbarTips,v.options.shortcuts,v):De=pe(ve,!0,v.options.toolbarTips,v.options.shortcuts,"button",v),M[ve.name||ve]=De,D.appendChild(De),ve.name==="upload-image"){var Se=document.createElement("input");Se.className="imageInput",Se.type="file",Se.multiple=!0,Se.name="image",Se.accept=v.options.imageAccept,Se.style.display="none",Se.style.opacity=0,D.appendChild(Se)}})(s[g])}v.toolbar_div=D,v.toolbarElements=M;var S=this.codemirror;S.on("cursorActivity",function(){var ve=P(S);for(var De in M)(function(Se){var Ne=M[Se];ve[Se]?Ne.classList.add("active"):Se!="fullscreen"&&Se!="side-by-side"&&Ne.classList.remove("active")})(De)});var W=S.getWrapperElement();return W.parentNode.insertBefore(D,W),D}},O.prototype.createStatusbar=function(s){s=s||this.options.status;var g=this.options,D=this.codemirror;if(!(!s||s.length===0)){var v=[],M,H,A,S;for(M=0;M<s.length;M++)if(H=void 0,A=void 0,S=void 0,typeof s[M]=="object")v.push({className:s[M].className,defaultValue:s[M].defaultValue,onUpdate:s[M].onUpdate,onActivity:s[M].onActivity});else{var W=s[M];W==="words"?(S=function(Le){Le.innerHTML=E(D.getValue())},H=function(Le){Le.innerHTML=E(D.getValue())}):W==="lines"?(S=function(Le){Le.innerHTML=D.lineCount()},H=function(Le){Le.innerHTML=D.lineCount()}):W==="cursor"?(S=function(Le){Le.innerHTML="1:1"},A=function(Le){var Pe=D.getCursor(),Xe=Pe.line+1,Ue=Pe.ch+1;Le.innerHTML=Xe+":"+Ue}):W==="autosave"?S=function(Le){g.autosave!=null&&g.autosave.enabled===!0&&Le.setAttribute("id","autosaved")}:W==="upload-image"&&(S=function(Le){Le.innerHTML=g.imageTexts.sbInit}),v.push({className:W,defaultValue:S,onUpdate:H,onActivity:A})}var ve=document.createElement("div");for(ve.className="editor-statusbar",M=0;M<v.length;M++){var De=v[M],Se=document.createElement("span");Se.className=De.className,typeof De.defaultValue=="function"&&De.defaultValue(Se),typeof De.onUpdate=="function"&&this.codemirror.on("update",function(Le,Pe){return function(){Pe.onUpdate(Le)}}(Se,De)),typeof De.onActivity=="function"&&this.codemirror.on("cursorActivity",function(Le,Pe){return function(){Pe.onActivity(Le)}}(Se,De)),ve.appendChild(Se)}var Ne=this.codemirror.getWrapperElement();return Ne.parentNode.insertBefore(ve,Ne.nextSibling),ve}},O.prototype.value=function(s){var g=this.codemirror;if(s===void 0)return g.getValue();if(g.getDoc().setValue(s),this.isPreviewActive()){var D=g.getWrapperElement(),v=D.lastChild,M=this.options.previewRender(s,v);M!==null&&(v.innerHTML=M)}return this},O.toggleBold=re,O.toggleItalic=J,O.toggleStrikethrough=le,O.toggleBlockquote=ae,O.toggleHeadingSmaller=Re,O.toggleHeadingBigger=ne,O.toggleHeading1=Me,O.toggleHeading2=Z,O.toggleHeading3=je,O.toggleHeading4=z,O.toggleHeading5=oe,O.toggleHeading6=$,O.toggleCodeBlock=fe,O.toggleUnorderedList=ke,O.toggleOrderedList=et,O.cleanBlock=dt,O.drawLink=rt,O.drawImage=m,O.drawUploadedImage=ye,O.drawTable=Ee,O.drawHorizontalRule=qe,O.undo=Ct,O.redo=ut,O.togglePreview=we,O.toggleSideBySide=Ke,O.toggleFullScreen=V,O.prototype.toggleBold=function(){re(this)},O.prototype.toggleItalic=function(){J(this)},O.prototype.toggleStrikethrough=function(){le(this)},O.prototype.toggleBlockquote=function(){ae(this)},O.prototype.toggleHeadingSmaller=function(){Re(this)},O.prototype.toggleHeadingBigger=function(){ne(this)},O.prototype.toggleHeading1=function(){Me(this)},O.prototype.toggleHeading2=function(){Z(this)},O.prototype.toggleHeading3=function(){je(this)},O.prototype.toggleHeading4=function(){z(this)},O.prototype.toggleHeading5=function(){oe(this)},O.prototype.toggleHeading6=function(){$(this)},O.prototype.toggleCodeBlock=function(){fe(this)},O.prototype.toggleUnorderedList=function(){ke(this)},O.prototype.toggleOrderedList=function(){et(this)},O.prototype.cleanBlock=function(){dt(this)},O.prototype.drawLink=function(){rt(this)},O.prototype.drawImage=function(){m(this)},O.prototype.drawUploadedImage=function(){ye(this)},O.prototype.drawTable=function(){Ee(this)},O.prototype.drawHorizontalRule=function(){qe(this)},O.prototype.undo=function(){Ct(this)},O.prototype.redo=function(){ut(this)},O.prototype.togglePreview=function(){we(this)},O.prototype.toggleSideBySide=function(){Ke(this)},O.prototype.toggleFullScreen=function(){V(this)},O.prototype.isPreviewActive=function(){var s=this.codemirror,g=s.getWrapperElement(),D=g.lastChild;return D.classList.contains("editor-preview-active")},O.prototype.isSideBySideActive=function(){var s=this.codemirror,g=s.getWrapperElement(),D=g.nextSibling;return D.classList.contains("editor-preview-active-side")},O.prototype.isFullscreenActive=function(){var s=this.codemirror;return s.getOption("fullScreen")},O.prototype.getState=function(){var s=this.codemirror;return P(s)},O.prototype.toTextArea=function(){var s=this.codemirror,g=s.getWrapperElement(),D=g.parentNode;D&&(this.gui.toolbar&&D.removeChild(this.gui.toolbar),this.gui.statusbar&&D.removeChild(this.gui.statusbar),this.gui.sideBySide&&D.removeChild(this.gui.sideBySide)),D.parentNode.insertBefore(g,D),D.remove(),s.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())},ht.exports=O},"./node_modules/typo-js/typo.js":function(ht,We,be){var q="/",Q;(function(){"use strict";Q=function(B,_,w,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 T=this,Y,ee,G,j,ue;B&&(T.dictionary=B,_&&w?Ce():typeof window!="undefined"&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(F.dictionaryPath?Y=F.dictionaryPath:Y="typo/dictionaries",_||se(chrome.extension.getURL(Y+"/"+B+"/"+B+".aff"),pe),w||se(chrome.extension.getURL(Y+"/"+B+"/"+B+".dic"),me)):(F.dictionaryPath?Y=F.dictionaryPath:Y=q+"/dictionaries",_||se(Y+"/"+B+"/"+B+".aff",pe),w||se(Y+"/"+B+"/"+B+".dic",me)));function se(P,I){var V=T._readFile(P,null,F.asyncLoad);F.asyncLoad?V.then(function(re){I(re)}):I(V)}function pe(P){_=P,w&&Ce()}function me(P){w=P,_&&Ce()}function Ce(){for(T.rules=T._parseAFF(_),T.compoundRuleCodes={},ee=0,j=T.compoundRules.length;ee<j;ee++){var P=T.compoundRules[ee];for(G=0,ue=P.length;G<ue;G++)T.compoundRuleCodes[P[G]]=[]}"ONLYINCOMPOUND"in T.flags&&(T.compoundRuleCodes[T.flags.ONLYINCOMPOUND]=[]),T.dictionaryTable=T._parseDIC(w);for(ee in T.compoundRuleCodes)T.compoundRuleCodes[ee].length===0&&delete T.compoundRuleCodes[ee];for(ee=0,j=T.compoundRules.length;ee<j;ee++){var I=T.compoundRules[ee],V="";for(G=0,ue=I.length;G<ue;G++){var re=I[G];re in T.compoundRuleCodes?V+="("+T.compoundRuleCodes[re].join("|")+")":V+=re}T.compoundRules[ee]=new RegExp(V,"i")}T.loaded=!0,F.asyncLoad&&F.loadedCallback&&F.loadedCallback(T)}return this},Q.prototype={load:function(B){for(var _ in B)B.hasOwnProperty(_)&&(this[_]=B[_]);return this},_readFile:function(B,_,w){if(_=_||"utf8",typeof XMLHttpRequest!="undefined"){var F,T=new XMLHttpRequest;return T.open("GET",B,w),w&&(F=new Promise(function(ee,G){T.onload=function(){T.status===200?ee(T.responseText):G(T.statusText)},T.onerror=function(){G(T.statusText)}})),T.overrideMimeType&&T.overrideMimeType("text/plain; charset="+_),T.send(null),w?F:T.responseText}else{var Y=be("?b2fd");try{if(Y.existsSync(B))return Y.readFileSync(B,_);console.log("Path "+B+" does not exist.")}catch(ee){return console.log(ee),""}}},_parseAFF:function(B){var _={},w,F,T,Y,ee,G,j,ue,se=B.split(/\r?\n/);for(ee=0,j=se.length;ee<j;ee++)if(w=this._removeAffixComments(se[ee]),w=w.trim(),!!w){var pe=w.split(/\s+/),me=pe[0];if(me=="PFX"||me=="SFX"){var Ce=pe[1],P=pe[2];T=parseInt(pe[3],10);var I=[];for(G=ee+1,ue=ee+1+T;G<ue;G++){F=se[G],Y=F.split(/\s+/);var V=Y[2],re=Y[3].split("/"),J=re[0];J==="0"&&(J="");var le=this.parseRuleCodes(re[1]),fe=Y[4],ae={};ae.add=J,le.length>0&&(ae.continuationClasses=le),fe!=="."&&(me==="SFX"?ae.match=new RegExp(fe+"$"):ae.match=new RegExp("^"+fe)),V!="0"&&(me==="SFX"?ae.remove=new RegExp(V+"$"):ae.remove=V),I.push(ae)}_[Ce]={type:me,combineable:P=="Y",entries:I},ee+=T}else if(me==="COMPOUNDRULE"){for(T=parseInt(pe[1],10),G=ee+1,ue=ee+1+T;G<ue;G++)w=se[G],Y=w.split(/\s+/),this.compoundRules.push(Y[1]);ee+=T}else me==="REP"?(Y=w.split(/\s+/),Y.length===3&&this.replacementTable.push([Y[1],Y[2]])):this.flags[me]=pe[1]}return _},_removeAffixComments:function(B){return B.match(/^\s*#/,"")?"":B},_parseDIC:function(B){B=this._removeDicComments(B);var _=B.split(/\r?\n/),w={};function F(Z,je){w.hasOwnProperty(Z)||(w[Z]=null),je.length>0&&(w[Z]===null&&(w[Z]=[]),w[Z].push(je))}for(var T=1,Y=_.length;T<Y;T++){var ee=_[T];if(!!ee){var G=ee.split("/",2),j=G[0];if(G.length>1){var ue=this.parseRuleCodes(G[1]);(!("NEEDAFFIX"in this.flags)||ue.indexOf(this.flags.NEEDAFFIX)==-1)&&F(j,ue);for(var se=0,pe=ue.length;se<pe;se++){var me=ue[se],Ce=this.rules[me];if(Ce)for(var P=this._applyRule(j,Ce),I=0,V=P.length;I<V;I++){var re=P[I];if(F(re,[]),Ce.combineable)for(var J=se+1;J<pe;J++){var le=ue[J],fe=this.rules[le];if(fe&&fe.combineable&&Ce.type!=fe.type)for(var ae=this._applyRule(re,fe),Re=0,ne=ae.length;Re<ne;Re++){var Me=ae[Re];F(Me,[])}}}me in this.compoundRuleCodes&&this.compoundRuleCodes[me].push(j)}}else F(j.trim(),[])}}return w},_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 _=[],w=0,F=B.length;w<F;w+=2)_.push(B.substr(w,2));return _}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,_){for(var w=_.entries,F=[],T=0,Y=w.length;T<Y;T++){var ee=w[T];if(!ee.match||B.match(ee.match)){var G=B;if(ee.remove&&(G=G.replace(ee.remove,"")),_.type==="SFX"?G=G+ee.add:G=ee.add+G,F.push(G),"continuationClasses"in ee)for(var j=0,ue=ee.continuationClasses.length;j<ue;j++){var se=this.rules[ee.continuationClasses[j]];se&&(F=F.concat(this._applyRule(G,se)))}}}return F},check:function(B){if(!this.loaded)throw"Dictionary not loaded.";var _=B.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(_))return!0;if(_.toUpperCase()===_){var w=_[0]+_.substring(1).toLowerCase();if(this.hasFlag(w,"KEEPCASE"))return!1;if(this.checkExact(w)||this.checkExact(_.toLowerCase()))return!0}var F=_[0].toLowerCase()+_.substring(1);if(F!==_){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 _=this.dictionaryTable[B],w,F;if(typeof _=="undefined"){if("COMPOUNDMIN"in this.flags&&B.length>=this.flags.COMPOUNDMIN){for(w=0,F=this.compoundRules.length;w<F;w++)if(B.match(this.compoundRules[w]))return!0}}else{if(_===null)return!0;if(typeof _=="object"){for(w=0,F=_.length;w<F;w++)if(!this.hasFlag(B,"ONLYINCOMPOUND",_[w]))return!0}}return!1},hasFlag:function(B,_,w){if(!this.loaded)throw"Dictionary not loaded.";return!!(_ in this.flags&&(typeof w=="undefined"&&(w=Array.prototype.concat.apply([],this.dictionaryTable[B])),w&&w.indexOf(this.flags[_])!==-1))},alphabet:"",suggest:function(B,_){if(!this.loaded)throw"Dictionary not loaded.";if(_=_||5,this.memoized.hasOwnProperty(B)){var w=this.memoized[B].limit;if(_<=w||this.memoized[B].suggestions.length<w)return this.memoized[B].suggestions.slice(0,_)}if(this.check(B))return[];for(var F=0,T=this.replacementTable.length;F<T;F++){var Y=this.replacementTable[F];if(B.indexOf(Y[0])!==-1){var ee=B.replace(Y[0],Y[1]);if(this.check(ee))return[ee]}}var G=this;G.alphabet="abcdefghijklmnopqrstuvwxyz";function j(se,pe){var me={},Ce,P,I,V,re,J,le=G.alphabet.length;if(typeof se=="string"){var fe=se;se={},se[fe]=!0}for(var fe in se)for(Ce=0,V=fe.length+1;Ce<V;Ce++){var ae=[fe.substring(0,Ce),fe.substring(Ce)];if(ae[1]&&(J=ae[0]+ae[1].substring(1),(!pe||G.check(J))&&(J in me?me[J]+=1:me[J]=1)),ae[1].length>1&&ae[1][1]!==ae[1][0]&&(J=ae[0]+ae[1][1]+ae[1][0]+ae[1].substring(2),(!pe||G.check(J))&&(J in me?me[J]+=1:me[J]=1)),ae[1]){var Re=ae[1].substring(0,1).toUpperCase()===ae[1].substring(0,1)?"uppercase":"lowercase";for(P=0;P<le;P++){var ne=G.alphabet[P];Re==="uppercase"&&(ne=ne.toUpperCase()),ne!=ae[1].substring(0,1)&&(J=ae[0]+ne+ae[1].substring(1),(!pe||G.check(J))&&(J in me?me[J]+=1:me[J]=1))}}if(ae[1])for(P=0;P<le;P++){var Re=ae[0].substring(-1).toUpperCase()===ae[0].substring(-1)&&ae[1].substring(0,1).toUpperCase()===ae[1].substring(0,1)?"uppercase":"lowercase",ne=G.alphabet[P];Re==="uppercase"&&(ne=ne.toUpperCase()),J=ae[0]+ne+ae[1],(!pe||G.check(J))&&(J in me?me[J]+=1:me[J]=1)}}return me}function ue(se){var pe=j(se),me=j(pe,!0),Ce=me;for(var P in pe)!G.check(P)||(P in Ce?Ce[P]+=pe[P]:Ce[P]=pe[P]);var I,V,re=[];for(I in Ce)Ce.hasOwnProperty(I)&&re.push([I,Ce[I]]);function J(Re,ne){var Me=Re[1],Z=ne[1];return Me<Z?-1:Me>Z?1:ne[0].localeCompare(Re[0])}re.sort(J).reverse();var le=[],fe="lowercase";se.toUpperCase()===se?fe="uppercase":se.substr(0,1).toUpperCase()+se.substr(1).toLowerCase()===se&&(fe="capitalized");var ae=_;for(I=0;I<Math.min(ae,re.length);I++)fe==="uppercase"?re[I][0]=re[I][0].toUpperCase():fe==="capitalized"&&(re[I][0]=re[I][0].substr(0,1).toUpperCase()+re[I][0].substr(1)),!G.hasFlag(re[I][0],"NOSUGGEST")&&le.indexOf(re[I][0])==-1?le.push(re[I][0]):ae++;return le}return this.memoized[B]={suggestions:ue(B),limit:_},this.memoized[B].suggestions}}})(),ht.exports=Q},"?b2fd":function(){},"./node_modules/marked/lib/marked.cjs":function(ht,We){"use strict";var be;be={value:!0};function q(N,E){for(var C=0;C<E.length;C++){var h=E[C];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(N,h.key,h)}}function Q(N,E,C){return E&&q(N.prototype,E),C&&q(N,C),Object.defineProperty(N,"prototype",{writable:!1}),N}function B(N,E){if(!!N){if(typeof N=="string")return _(N,E);var C=Object.prototype.toString.call(N).slice(8,-1);if(C==="Object"&&N.constructor&&(C=N.constructor.name),C==="Map"||C==="Set")return Array.from(N);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return _(N,E)}}function _(N,E){(E==null||E>N.length)&&(E=N.length);for(var C=0,h=new Array(E);C<E;C++)h[C]=N[C];return h}function w(N,E){var C=typeof Symbol!="undefined"&&N[Symbol.iterator]||N["@@iterator"];if(C)return(C=C.call(N)).next.bind(C);if(Array.isArray(N)||(C=B(N))||E&&N&&typeof N.length=="number"){C&&(N=C);var h=0;return function(){return h>=N.length?{done:!0}:{done:!1,value:N[h++]}}}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 F(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}We.ce=F();function T(N){We.ce=N}var Y=/[&<>"']/,ee=/[&<>"']/g,G=/[<>"']|&(?!#?\w+;)/,j=/[<>"']|&(?!#?\w+;)/g,ue={"&":"&","<":"<",">":">",'"':""","'":"'"},se=function(E){return ue[E]};function pe(N,E){if(E){if(Y.test(N))return N.replace(ee,se)}else if(G.test(N))return N.replace(j,se);return N}var me=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Ce(N){return N.replace(me,function(E,C){return C=C.toLowerCase(),C==="colon"?":":C.charAt(0)==="#"?C.charAt(1)==="x"?String.fromCharCode(parseInt(C.substring(2),16)):String.fromCharCode(+C.substring(1)):""})}var P=/(^|[^\[])\^/g;function I(N,E){N=typeof N=="string"?N:N.source,E=E||"";var C={replace:function(d,b){return b=b.source||b,b=b.replace(P,"$1"),N=N.replace(d,b),C},getRegex:function(){return new RegExp(N,E)}};return C}var V=/[^\w:]/g,re=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function J(N,E,C){if(N){var h;try{h=decodeURIComponent(Ce(C)).replace(V,"").toLowerCase()}catch(d){return null}if(h.indexOf("javascript:")===0||h.indexOf("vbscript:")===0||h.indexOf("data:")===0)return null}E&&!re.test(C)&&(C=ne(E,C));try{C=encodeURI(C).replace(/%25/g,"%")}catch(d){return null}return C}var le={},fe=/^[^:]+:\/*[^/]*$/,ae=/^([^:]+:)[\s\S]*$/,Re=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ne(N,E){le[" "+N]||(fe.test(N)?le[" "+N]=N+"/":le[" "+N]=z(N,"/",!0)),N=le[" "+N];var C=N.indexOf(":")===-1;return E.substring(0,2)==="//"?C?E:N.replace(ae,"$1")+E:E.charAt(0)==="/"?C?E:N.replace(Re,"$1")+E:N+E}var Me={exec:function(){}};function Z(N){for(var E=1,C,h;E<arguments.length;E++){C=arguments[E];for(h in C)Object.prototype.hasOwnProperty.call(C,h)&&(N[h]=C[h])}return N}function je(N,E){var C=N.replace(/\|/g,function(b,y,R){for(var X=!1,de=y;--de>=0&&R[de]==="\\";)X=!X;return X?"|":" |"}),h=C.split(/ \|/),d=0;if(h[0].trim()||h.shift(),h.length>0&&!h[h.length-1].trim()&&h.pop(),h.length>E)h.splice(E);else for(;h.length<E;)h.push("");for(;d<h.length;d++)h[d]=h[d].trim().replace(/\\\|/g,"|");return h}function z(N,E,C){var h=N.length;if(h===0)return"";for(var d=0;d<h;){var b=N.charAt(h-d-1);if(b===E&&!C)d++;else if(b!==E&&C)d++;else break}return N.slice(0,h-d)}function oe(N,E){if(N.indexOf(E[1])===-1)return-1;for(var C=N.length,h=0,d=0;d<C;d++)if(N[d]==="\\")d++;else if(N[d]===E[0])h++;else if(N[d]===E[1]&&(h--,h<0))return d;return-1}function $(N){N&&N.sanitize&&!N.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 ke(N,E){if(E<1)return"";for(var C="";E>1;)E&1&&(C+=N),E>>=1,N+=N;return C+N}function et(N,E,C,h){var d=E.href,b=E.title?pe(E.title):null,y=N[1].replace(/\\([\[\]])/g,"$1");if(N[0].charAt(0)!=="!"){h.state.inLink=!0;var R={type:"link",raw:C,href:d,title:b,text:y,tokens:h.inlineTokens(y)};return h.state.inLink=!1,R}return{type:"image",raw:C,href:d,title:b,text:pe(y)}}function dt(N,E){var C=N.match(/^(\s+)(?:```)/);if(C===null)return E;var h=C[1];return E.split(`
|
|
`).map(function(d){var b=d.match(/^\s+/);if(b===null)return d;var y=b[0];return y.length>=h.length?d.slice(h.length):d}).join(`
|
|
`)}var rt=function(){function N(C){this.options=C||We.ce}var E=N.prototype;return E.space=function(h){var d=this.rules.block.newline.exec(h);if(d&&d[0].length>0)return{type:"space",raw:d[0]}},E.code=function(h){var d=this.rules.block.code.exec(h);if(d){var b=d[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:d[0],codeBlockStyle:"indented",text:this.options.pedantic?b:z(b,`
|
|
`)}}},E.fences=function(h){var d=this.rules.block.fences.exec(h);if(d){var b=d[0],y=dt(b,d[3]||"");return{type:"code",raw:b,lang:d[2]?d[2].trim():d[2],text:y}}},E.heading=function(h){var d=this.rules.block.heading.exec(h);if(d){var b=d[2].trim();if(/#$/.test(b)){var y=z(b,"#");(this.options.pedantic||!y||/ $/.test(y))&&(b=y.trim())}return{type:"heading",raw:d[0],depth:d[1].length,text:b,tokens:this.lexer.inline(b)}}},E.hr=function(h){var d=this.rules.block.hr.exec(h);if(d)return{type:"hr",raw:d[0]}},E.blockquote=function(h){var d=this.rules.block.blockquote.exec(h);if(d){var b=d[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:d[0],tokens:this.lexer.blockTokens(b,[]),text:b}}},E.list=function(h){var d=this.rules.block.list.exec(h);if(d){var b,y,R,X,de,O,Te,s,g,D,v,M,H=d[1].trim(),A=H.length>1,S={type:"list",raw:"",ordered:A,start:A?+H.slice(0,-1):"",loose:!1,items:[]};H=A?"\\d{1,9}\\"+H.slice(-1):"\\"+H,this.options.pedantic&&(H=A?H:"[*+-]");for(var W=new RegExp("^( {0,3}"+H+")((?:[ ][^\\n]*)?(?:\\n|$))");h&&(M=!1,!(!(d=W.exec(h))||this.rules.block.hr.test(h)));){if(b=d[0],h=h.substring(b.length),s=d[2].split(`
|
|
`,1)[0],g=h.split(`
|
|
`,1)[0],this.options.pedantic?(X=2,v=s.trimLeft()):(X=d[2].search(/[^ ]/),X=X>4?1:X,v=s.slice(X),X+=d[1].length),O=!1,!s&&/^ *$/.test(g)&&(b+=g+`
|
|
`,h=h.substring(g.length+1),M=!0),!M)for(var ve=new RegExp("^ {0,"+Math.min(3,X-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),De=new RegExp("^ {0,"+Math.min(3,X-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),Se=new RegExp("^ {0,"+Math.min(3,X-1)+"}(?:```|~~~)"),Ne=new RegExp("^ {0,"+Math.min(3,X-1)+"}#");h&&(D=h.split(`
|
|
`,1)[0],s=D,this.options.pedantic&&(s=s.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(Se.test(s)||Ne.test(s)||ve.test(s)||De.test(h)));){if(s.search(/[^ ]/)>=X||!s.trim())v+=`
|
|
`+s.slice(X);else if(!O)v+=`
|
|
`+s;else break;!O&&!s.trim()&&(O=!0),b+=D+`
|
|
`,h=h.substring(D.length+1)}S.loose||(Te?S.loose=!0:/\n *\n *$/.test(b)&&(Te=!0)),this.options.gfm&&(y=/^\[[ xX]\] /.exec(v),y&&(R=y[0]!=="[ ] ",v=v.replace(/^\[[ xX]\] +/,""))),S.items.push({type:"list_item",raw:b,task:!!y,checked:R,loose:!1,text:v}),S.raw+=b}S.items[S.items.length-1].raw=b.trimRight(),S.items[S.items.length-1].text=v.trimRight(),S.raw=S.raw.trimRight();var Le=S.items.length;for(de=0;de<Le;de++){this.lexer.state.top=!1,S.items[de].tokens=this.lexer.blockTokens(S.items[de].text,[]);var Pe=S.items[de].tokens.filter(function(Ue){return Ue.type==="space"}),Xe=Pe.every(function(Ue){for(var Ye=Ue.raw.split(""),at=0,st=w(Ye),St;!(St=st()).done;){var _t=St.value;if(_t===`
|
|
`&&(at+=1),at>1)return!0}return!1});!S.loose&&Pe.length&&Xe&&(S.loose=!0,S.items[de].loose=!0)}return S}},E.html=function(h){var d=this.rules.block.html.exec(h);if(d){var b={type:"html",raw:d[0],pre:!this.options.sanitizer&&(d[1]==="pre"||d[1]==="script"||d[1]==="style"),text:d[0]};if(this.options.sanitize){var y=this.options.sanitizer?this.options.sanitizer(d[0]):pe(d[0]);b.type="paragraph",b.text=y,b.tokens=this.lexer.inline(y)}return b}},E.def=function(h){var d=this.rules.block.def.exec(h);if(d){d[3]&&(d[3]=d[3].substring(1,d[3].length-1));var b=d[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:b,raw:d[0],href:d[2],title:d[3]}}},E.table=function(h){var d=this.rules.block.table.exec(h);if(d){var b={type:"table",header:je(d[1]).map(function(Te){return{text:Te}}),align:d[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:d[3]&&d[3].trim()?d[3].replace(/\n[ \t]*$/,"").split(`
|
|
`):[]};if(b.header.length===b.align.length){b.raw=d[0];var y=b.align.length,R,X,de,O;for(R=0;R<y;R++)/^ *-+: *$/.test(b.align[R])?b.align[R]="right":/^ *:-+: *$/.test(b.align[R])?b.align[R]="center":/^ *:-+ *$/.test(b.align[R])?b.align[R]="left":b.align[R]=null;for(y=b.rows.length,R=0;R<y;R++)b.rows[R]=je(b.rows[R],b.header.length).map(function(Te){return{text:Te}});for(y=b.header.length,X=0;X<y;X++)b.header[X].tokens=this.lexer.inline(b.header[X].text);for(y=b.rows.length,X=0;X<y;X++)for(O=b.rows[X],de=0;de<O.length;de++)O[de].tokens=this.lexer.inline(O[de].text);return b}}},E.lheading=function(h){var d=this.rules.block.lheading.exec(h);if(d)return{type:"heading",raw:d[0],depth:d[2].charAt(0)==="="?1:2,text:d[1],tokens:this.lexer.inline(d[1])}},E.paragraph=function(h){var d=this.rules.block.paragraph.exec(h);if(d){var b=d[1].charAt(d[1].length-1)===`
|
|
`?d[1].slice(0,-1):d[1];return{type:"paragraph",raw:d[0],text:b,tokens:this.lexer.inline(b)}}},E.text=function(h){var d=this.rules.block.text.exec(h);if(d)return{type:"text",raw:d[0],text:d[0],tokens:this.lexer.inline(d[0])}},E.escape=function(h){var d=this.rules.inline.escape.exec(h);if(d)return{type:"escape",raw:d[0],text:pe(d[1])}},E.tag=function(h){var d=this.rules.inline.tag.exec(h);if(d)return!this.lexer.state.inLink&&/^<a /i.test(d[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(d[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(d[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(d[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:d[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(d[0]):pe(d[0]):d[0]}},E.link=function(h){var d=this.rules.inline.link.exec(h);if(d){var b=d[2].trim();if(!this.options.pedantic&&/^</.test(b)){if(!/>$/.test(b))return;var y=z(b.slice(0,-1),"\\");if((b.length-y.length)%2===0)return}else{var R=oe(d[2],"()");if(R>-1){var X=d[0].indexOf("!")===0?5:4,de=X+d[1].length+R;d[2]=d[2].substring(0,R),d[0]=d[0].substring(0,de).trim(),d[3]=""}}var O=d[2],Te="";if(this.options.pedantic){var s=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(O);s&&(O=s[1],Te=s[3])}else Te=d[3]?d[3].slice(1,-1):"";return O=O.trim(),/^</.test(O)&&(this.options.pedantic&&!/>$/.test(b)?O=O.slice(1):O=O.slice(1,-1)),et(d,{href:O&&O.replace(this.rules.inline._escapes,"$1"),title:Te&&Te.replace(this.rules.inline._escapes,"$1")},d[0],this.lexer)}},E.reflink=function(h,d){var b;if((b=this.rules.inline.reflink.exec(h))||(b=this.rules.inline.nolink.exec(h))){var y=(b[2]||b[1]).replace(/\s+/g," ");if(y=d[y.toLowerCase()],!y||!y.href){var R=b[0].charAt(0);return{type:"text",raw:R,text:R}}return et(b,y,b[0],this.lexer)}},E.emStrong=function(h,d,b){b===void 0&&(b="");var y=this.rules.inline.emStrong.lDelim.exec(h);if(!!y&&!(y[3]&&b.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 R=y[1]||y[2]||"";if(!R||R&&(b===""||this.rules.inline.punctuation.exec(b))){var X=y[0].length-1,de,O,Te=X,s=0,g=y[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(g.lastIndex=0,d=d.slice(-1*h.length+X);(y=g.exec(d))!=null;)if(de=y[1]||y[2]||y[3]||y[4]||y[5]||y[6],!!de){if(O=de.length,y[3]||y[4]){Te+=O;continue}else if((y[5]||y[6])&&X%3&&!((X+O)%3)){s+=O;continue}if(Te-=O,!(Te>0)){if(O=Math.min(O,O+Te+s),Math.min(X,O)%2){var D=h.slice(1,X+y.index+O);return{type:"em",raw:h.slice(0,X+y.index+O+1),text:D,tokens:this.lexer.inlineTokens(D)}}var v=h.slice(2,X+y.index+O-1);return{type:"strong",raw:h.slice(0,X+y.index+O+1),text:v,tokens:this.lexer.inlineTokens(v)}}}}}},E.codespan=function(h){var d=this.rules.inline.code.exec(h);if(d){var b=d[2].replace(/\n/g," "),y=/[^ ]/.test(b),R=/^ /.test(b)&&/ $/.test(b);return y&&R&&(b=b.substring(1,b.length-1)),b=pe(b,!0),{type:"codespan",raw:d[0],text:b}}},E.br=function(h){var d=this.rules.inline.br.exec(h);if(d)return{type:"br",raw:d[0]}},E.del=function(h){var d=this.rules.inline.del.exec(h);if(d)return{type:"del",raw:d[0],text:d[2],tokens:this.lexer.inlineTokens(d[2])}},E.autolink=function(h,d){var b=this.rules.inline.autolink.exec(h);if(b){var y,R;return b[2]==="@"?(y=pe(this.options.mangle?d(b[1]):b[1]),R="mailto:"+y):(y=pe(b[1]),R=y),{type:"link",raw:b[0],text:y,href:R,tokens:[{type:"text",raw:y,text:y}]}}},E.url=function(h,d){var b;if(b=this.rules.inline.url.exec(h)){var y,R;if(b[2]==="@")y=pe(this.options.mangle?d(b[0]):b[0]),R="mailto:"+y;else{var X;do X=b[0],b[0]=this.rules.inline._backpedal.exec(b[0])[0];while(X!==b[0]);y=pe(b[0]),b[1]==="www."?R="http://"+y:R=y}return{type:"link",raw:b[0],text:y,href:R,tokens:[{type:"text",raw:y,text:y}]}}},E.inlineText=function(h,d){var b=this.rules.inline.text.exec(h);if(b){var y;return this.lexer.state.inRawBlock?y=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(b[0]):pe(b[0]):b[0]:y=pe(this.options.smartypants?d(b[0]):b[0]),{type:"text",raw:b[0],text:y}}},N}(),m={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>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Me,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};m._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,m._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,m.def=I(m.def).replace("label",m._label).replace("title",m._title).getRegex(),m.bullet=/(?:[*+-]|\d{1,9}[.)])/,m.listItemStart=I(/^( *)(bull) */).replace("bull",m.bullet).getRegex(),m.list=I(m.list).replace(/bull/g,m.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+m.def.source+")").getRegex(),m._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",m._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,m.html=I(m.html,"i").replace("comment",m._comment).replace("tag",m._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),m.paragraph=I(m._paragraph).replace("hr",m.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",m._tag).getRegex(),m.blockquote=I(m.blockquote).replace("paragraph",m.paragraph).getRegex(),m.normal=Z({},m),m.gfm=Z({},m.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),m.gfm.table=I(m.gfm.table).replace("hr",m.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",m._tag).getRegex(),m.gfm.paragraph=I(m._paragraph).replace("hr",m.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",m.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",m._tag).getRegex(),m.pedantic=Z({},m.normal,{html:I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",m._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:Me,paragraph:I(m.normal._paragraph).replace("hr",m.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",m.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var c={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Me,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:Me,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};c._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",c.punctuation=I(c.punctuation).replace(/punctuation/g,c._punctuation).getRegex(),c.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,c.escapedEmSt=/\\\*|\\_/g,c._comment=I(m._comment).replace("(?:-->|$)","-->").getRegex(),c.emStrong.lDelim=I(c.emStrong.lDelim).replace(/punct/g,c._punctuation).getRegex(),c.emStrong.rDelimAst=I(c.emStrong.rDelimAst,"g").replace(/punct/g,c._punctuation).getRegex(),c.emStrong.rDelimUnd=I(c.emStrong.rDelimUnd,"g").replace(/punct/g,c._punctuation).getRegex(),c._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,c._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,c._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])?)+(?![-_])/,c.autolink=I(c.autolink).replace("scheme",c._scheme).replace("email",c._email).getRegex(),c._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,c.tag=I(c.tag).replace("comment",c._comment).replace("attribute",c._attribute).getRegex(),c._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,c._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,c._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,c.link=I(c.link).replace("label",c._label).replace("href",c._href).replace("title",c._title).getRegex(),c.reflink=I(c.reflink).replace("label",c._label).replace("ref",m._label).getRegex(),c.nolink=I(c.nolink).replace("ref",m._label).getRegex(),c.reflinkSearch=I(c.reflinkSearch,"g").replace("reflink",c.reflink).replace("nolink",c.nolink).getRegex(),c.normal=Z({},c),c.pedantic=Z({},c.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:I(/^!?\[(label)\]\((.*?)\)/).replace("label",c._label).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",c._label).getRegex()}),c.gfm=Z({},c.normal,{escape:I(c.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),c.gfm.url=I(c.gfm.url,"i").replace("email",c.gfm._extended_email).getRegex(),c.breaks=Z({},c.gfm,{br:I(c.br).replace("{2,}","*").getRegex(),text:I(c.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function ye(N){return N.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 He(N){var E="",C,h,d=N.length;for(C=0;C<d;C++)h=N.charCodeAt(C),Math.random()>.5&&(h="x"+h.toString(16)),E+="&#"+h+";";return E}var Ee=function(){function N(C){this.tokens=[],this.tokens.links=Object.create(null),this.options=C||We.ce,this.options.tokenizer=this.options.tokenizer||new rt,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 h={block:m.normal,inline:c.normal};this.options.pedantic?(h.block=m.pedantic,h.inline=c.pedantic):this.options.gfm&&(h.block=m.gfm,this.options.breaks?h.inline=c.breaks:h.inline=c.gfm),this.tokenizer.rules=h}N.lex=function(h,d){var b=new N(d);return b.lex(h)},N.lexInline=function(h,d){var b=new N(d);return b.inlineTokens(h)};var E=N.prototype;return E.lex=function(h){h=h.replace(/\r\n|\r/g,`
|
|
`),this.blockTokens(h,this.tokens);for(var d;d=this.inlineQueue.shift();)this.inlineTokens(d.src,d.tokens);return this.tokens},E.blockTokens=function(h,d){var b=this;d===void 0&&(d=[]),this.options.pedantic?h=h.replace(/\t/g," ").replace(/^ +$/gm,""):h=h.replace(/^( *)(\t+)/gm,function(Te,s,g){return s+" ".repeat(g.length)});for(var y,R,X,de;h;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(Te){return(y=Te.call({lexer:b},h,d))?(h=h.substring(y.raw.length),d.push(y),!0):!1}))){if(y=this.tokenizer.space(h)){h=h.substring(y.raw.length),y.raw.length===1&&d.length>0?d[d.length-1].raw+=`
|
|
`:d.push(y);continue}if(y=this.tokenizer.code(h)){h=h.substring(y.raw.length),R=d[d.length-1],R&&(R.type==="paragraph"||R.type==="text")?(R.raw+=`
|
|
`+y.raw,R.text+=`
|
|
`+y.text,this.inlineQueue[this.inlineQueue.length-1].src=R.text):d.push(y);continue}if(y=this.tokenizer.fences(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.heading(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.hr(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.blockquote(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.list(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.html(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.def(h)){h=h.substring(y.raw.length),R=d[d.length-1],R&&(R.type==="paragraph"||R.type==="text")?(R.raw+=`
|
|
`+y.raw,R.text+=`
|
|
`+y.raw,this.inlineQueue[this.inlineQueue.length-1].src=R.text):this.tokens.links[y.tag]||(this.tokens.links[y.tag]={href:y.href,title:y.title});continue}if(y=this.tokenizer.table(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.lheading(h)){h=h.substring(y.raw.length),d.push(y);continue}if(X=h,this.options.extensions&&this.options.extensions.startBlock&&function(){var Te=1/0,s=h.slice(1),g=void 0;b.options.extensions.startBlock.forEach(function(D){g=D.call({lexer:this},s),typeof g=="number"&&g>=0&&(Te=Math.min(Te,g))}),Te<1/0&&Te>=0&&(X=h.substring(0,Te+1))}(),this.state.top&&(y=this.tokenizer.paragraph(X))){R=d[d.length-1],de&&R.type==="paragraph"?(R.raw+=`
|
|
`+y.raw,R.text+=`
|
|
`+y.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=R.text):d.push(y),de=X.length!==h.length,h=h.substring(y.raw.length);continue}if(y=this.tokenizer.text(h)){h=h.substring(y.raw.length),R=d[d.length-1],R&&R.type==="text"?(R.raw+=`
|
|
`+y.raw,R.text+=`
|
|
`+y.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=R.text):d.push(y);continue}if(h){var O="Infinite loop on byte: "+h.charCodeAt(0);if(this.options.silent){console.error(O);break}else throw new Error(O)}}return this.state.top=!0,d},E.inline=function(h,d){return d===void 0&&(d=[]),this.inlineQueue.push({src:h,tokens:d}),d},E.inlineTokens=function(h,d){var b=this;d===void 0&&(d=[]);var y,R,X,de=h,O,Te,s;if(this.tokens.links){var g=Object.keys(this.tokens.links);if(g.length>0)for(;(O=this.tokenizer.rules.inline.reflinkSearch.exec(de))!=null;)g.includes(O[0].slice(O[0].lastIndexOf("[")+1,-1))&&(de=de.slice(0,O.index)+"["+ke("a",O[0].length-2)+"]"+de.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(O=this.tokenizer.rules.inline.blockSkip.exec(de))!=null;)de=de.slice(0,O.index)+"["+ke("a",O[0].length-2)+"]"+de.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(O=this.tokenizer.rules.inline.escapedEmSt.exec(de))!=null;)de=de.slice(0,O.index)+"++"+de.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;h;)if(Te||(s=""),Te=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(v){return(y=v.call({lexer:b},h,d))?(h=h.substring(y.raw.length),d.push(y),!0):!1}))){if(y=this.tokenizer.escape(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.tag(h)){h=h.substring(y.raw.length),R=d[d.length-1],R&&y.type==="text"&&R.type==="text"?(R.raw+=y.raw,R.text+=y.text):d.push(y);continue}if(y=this.tokenizer.link(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.reflink(h,this.tokens.links)){h=h.substring(y.raw.length),R=d[d.length-1],R&&y.type==="text"&&R.type==="text"?(R.raw+=y.raw,R.text+=y.text):d.push(y);continue}if(y=this.tokenizer.emStrong(h,de,s)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.codespan(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.br(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.del(h)){h=h.substring(y.raw.length),d.push(y);continue}if(y=this.tokenizer.autolink(h,He)){h=h.substring(y.raw.length),d.push(y);continue}if(!this.state.inLink&&(y=this.tokenizer.url(h,He))){h=h.substring(y.raw.length),d.push(y);continue}if(X=h,this.options.extensions&&this.options.extensions.startInline&&function(){var v=1/0,M=h.slice(1),H=void 0;b.options.extensions.startInline.forEach(function(A){H=A.call({lexer:this},M),typeof H=="number"&&H>=0&&(v=Math.min(v,H))}),v<1/0&&v>=0&&(X=h.substring(0,v+1))}(),y=this.tokenizer.inlineText(X,ye)){h=h.substring(y.raw.length),y.raw.slice(-1)!=="_"&&(s=y.raw.slice(-1)),Te=!0,R=d[d.length-1],R&&R.type==="text"?(R.raw+=y.raw,R.text+=y.text):d.push(y);continue}if(h){var D="Infinite loop on byte: "+h.charCodeAt(0);if(this.options.silent){console.error(D);break}else throw new Error(D)}}return d},Q(N,null,[{key:"rules",get:function(){return{block:m,inline:c}}}]),N}(),qe=function(){function N(C){this.options=C||We.ce}var E=N.prototype;return E.code=function(h,d,b){var y=(d||"").match(/\S*/)[0];if(this.options.highlight){var R=this.options.highlight(h,y);R!=null&&R!==h&&(b=!0,h=R)}return h=h.replace(/\n$/,"")+`
|
|
`,y?'<pre><code class="'+this.options.langPrefix+pe(y,!0)+'">'+(b?h:pe(h,!0))+`</code></pre>
|
|
`:"<pre><code>"+(b?h:pe(h,!0))+`</code></pre>
|
|
`},E.blockquote=function(h){return`<blockquote>
|
|
`+h+`</blockquote>
|
|
`},E.html=function(h){return h},E.heading=function(h,d,b,y){if(this.options.headerIds){var R=this.options.headerPrefix+y.slug(b);return"<h"+d+' id="'+R+'">'+h+"</h"+d+`>
|
|
`}return"<h"+d+">"+h+"</h"+d+`>
|
|
`},E.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},E.list=function(h,d,b){var y=d?"ol":"ul",R=d&&b!==1?' start="'+b+'"':"";return"<"+y+R+`>
|
|
`+h+"</"+y+`>
|
|
`},E.listitem=function(h){return"<li>"+h+`</li>
|
|
`},E.checkbox=function(h){return"<input "+(h?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},E.paragraph=function(h){return"<p>"+h+`</p>
|
|
`},E.table=function(h,d){return d&&(d="<tbody>"+d+"</tbody>"),`<table>
|
|
<thead>
|
|
`+h+`</thead>
|
|
`+d+`</table>
|
|
`},E.tablerow=function(h){return`<tr>
|
|
`+h+`</tr>
|
|
`},E.tablecell=function(h,d){var b=d.header?"th":"td",y=d.align?"<"+b+' align="'+d.align+'">':"<"+b+">";return y+h+("</"+b+`>
|
|
`)},E.strong=function(h){return"<strong>"+h+"</strong>"},E.em=function(h){return"<em>"+h+"</em>"},E.codespan=function(h){return"<code>"+h+"</code>"},E.br=function(){return this.options.xhtml?"<br/>":"<br>"},E.del=function(h){return"<del>"+h+"</del>"},E.link=function(h,d,b){if(h=J(this.options.sanitize,this.options.baseUrl,h),h===null)return b;var y='<a href="'+pe(h)+'"';return d&&(y+=' title="'+d+'"'),y+=">"+b+"</a>",y},E.image=function(h,d,b){if(h=J(this.options.sanitize,this.options.baseUrl,h),h===null)return b;var y='<img src="'+h+'" alt="'+b+'"';return d&&(y+=' title="'+d+'"'),y+=this.options.xhtml?"/>":">",y},E.text=function(h){return h},N}(),Ct=function(){function N(){}var E=N.prototype;return E.strong=function(h){return h},E.em=function(h){return h},E.codespan=function(h){return h},E.del=function(h){return h},E.html=function(h){return h},E.text=function(h){return h},E.link=function(h,d,b){return""+b},E.image=function(h,d,b){return""+b},E.br=function(){return""},N}(),ut=function(){function N(){this.seen={}}var E=N.prototype;return E.serialize=function(h){return h.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},E.getNextSafeSlug=function(h,d){var b=h,y=0;if(this.seen.hasOwnProperty(b)){y=this.seen[h];do y++,b=h+"-"+y;while(this.seen.hasOwnProperty(b))}return d||(this.seen[h]=y,this.seen[b]=0),b},E.slug=function(h,d){d===void 0&&(d={});var b=this.serialize(h);return this.getNextSafeSlug(b,d.dryrun)},N}(),Ke=function(){function N(C){this.options=C||We.ce,this.options.renderer=this.options.renderer||new qe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ct,this.slugger=new ut}N.parse=function(h,d){var b=new N(d);return b.parse(h)},N.parseInline=function(h,d){var b=new N(d);return b.parseInline(h)};var E=N.prototype;return E.parse=function(h,d){d===void 0&&(d=!0);var b="",y,R,X,de,O,Te,s,g,D,v,M,H,A,S,W,ve,De,Se,Ne,Le=h.length;for(y=0;y<Le;y++){if(v=h[y],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[v.type]&&(Ne=this.options.extensions.renderers[v.type].call({parser:this},v),Ne!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(v.type))){b+=Ne||"";continue}switch(v.type){case"space":continue;case"hr":{b+=this.renderer.hr();continue}case"heading":{b+=this.renderer.heading(this.parseInline(v.tokens),v.depth,Ce(this.parseInline(v.tokens,this.textRenderer)),this.slugger);continue}case"code":{b+=this.renderer.code(v.text,v.lang,v.escaped);continue}case"table":{for(g="",s="",de=v.header.length,R=0;R<de;R++)s+=this.renderer.tablecell(this.parseInline(v.header[R].tokens),{header:!0,align:v.align[R]});for(g+=this.renderer.tablerow(s),D="",de=v.rows.length,R=0;R<de;R++){for(Te=v.rows[R],s="",O=Te.length,X=0;X<O;X++)s+=this.renderer.tablecell(this.parseInline(Te[X].tokens),{header:!1,align:v.align[X]});D+=this.renderer.tablerow(s)}b+=this.renderer.table(g,D);continue}case"blockquote":{D=this.parse(v.tokens),b+=this.renderer.blockquote(D);continue}case"list":{for(M=v.ordered,H=v.start,A=v.loose,de=v.items.length,D="",R=0;R<de;R++)W=v.items[R],ve=W.checked,De=W.task,S="",W.task&&(Se=this.renderer.checkbox(ve),A?W.tokens.length>0&&W.tokens[0].type==="paragraph"?(W.tokens[0].text=Se+" "+W.tokens[0].text,W.tokens[0].tokens&&W.tokens[0].tokens.length>0&&W.tokens[0].tokens[0].type==="text"&&(W.tokens[0].tokens[0].text=Se+" "+W.tokens[0].tokens[0].text)):W.tokens.unshift({type:"text",text:Se}):S+=Se),S+=this.parse(W.tokens,A),D+=this.renderer.listitem(S,De,ve);b+=this.renderer.list(D,M,H);continue}case"html":{b+=this.renderer.html(v.text);continue}case"paragraph":{b+=this.renderer.paragraph(this.parseInline(v.tokens));continue}case"text":{for(D=v.tokens?this.parseInline(v.tokens):v.text;y+1<Le&&h[y+1].type==="text";)v=h[++y],D+=`
|
|
`+(v.tokens?this.parseInline(v.tokens):v.text);b+=d?this.renderer.paragraph(D):D;continue}default:{var Pe='Token with "'+v.type+'" type was not found.';if(this.options.silent){console.error(Pe);return}else throw new Error(Pe)}}}return b},E.parseInline=function(h,d){d=d||this.renderer;var b="",y,R,X,de=h.length;for(y=0;y<de;y++){if(R=h[y],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[R.type]&&(X=this.options.extensions.renderers[R.type].call({parser:this},R),X!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(R.type))){b+=X||"";continue}switch(R.type){case"escape":{b+=d.text(R.text);break}case"html":{b+=d.html(R.text);break}case"link":{b+=d.link(R.href,R.title,this.parseInline(R.tokens,d));break}case"image":{b+=d.image(R.href,R.title,R.text);break}case"strong":{b+=d.strong(this.parseInline(R.tokens,d));break}case"em":{b+=d.em(this.parseInline(R.tokens,d));break}case"codespan":{b+=d.codespan(R.text);break}case"br":{b+=d.br();break}case"del":{b+=d.del(this.parseInline(R.tokens,d));break}case"text":{b+=d.text(R.text);break}default:{var O='Token with "'+R.type+'" type was not found.';if(this.options.silent){console.error(O);return}else throw new Error(O)}}}return b},N}();function we(N,E,C){if(typeof N=="undefined"||N===null)throw new Error("marked(): input parameter is undefined or null");if(typeof N!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(N)+", string expected");if(typeof E=="function"&&(C=E,E=null),E=Z({},we.defaults,E||{}),$(E),C){var h=E.highlight,d;try{d=Ee.lex(N,E)}catch(de){return C(de)}var b=function(O){var Te;if(!O)try{E.walkTokens&&we.walkTokens(d,E.walkTokens),Te=Ke.parse(d,E)}catch(s){O=s}return E.highlight=h,O?C(O):C(null,Te)};if(!h||h.length<3||(delete E.highlight,!d.length))return b();var y=0;we.walkTokens(d,function(de){de.type==="code"&&(y++,setTimeout(function(){h(de.text,de.lang,function(O,Te){if(O)return b(O);Te!=null&&Te!==de.text&&(de.text=Te,de.escaped=!0),y--,y===0&&b()})},0))}),y===0&&b();return}function R(de){if(de.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,E.silent)return"<p>An error occurred:</p><pre>"+pe(de.message+"",!0)+"</pre>";throw de}try{var X=Ee.lex(N,E);if(E.walkTokens){if(E.async)return Promise.all(we.walkTokens(X,E.walkTokens)).then(function(){return Ke.parse(X,E)}).catch(R);we.walkTokens(X,E.walkTokens)}return Ke.parse(X,E)}catch(de){R(de)}}we.options=we.setOptions=function(N){return Z(we.defaults,N),T(we.defaults),we},we.getDefaults=F,we.defaults=We.ce,we.use=function(){for(var N=arguments.length,E=new Array(N),C=0;C<N;C++)E[C]=arguments[C];var h=Z.apply(void 0,[{}].concat(E)),d=we.defaults.extensions||{renderers:{},childTokens:{}},b;E.forEach(function(y){if(y.extensions&&(b=!0,y.extensions.forEach(function(X){if(!X.name)throw new Error("extension name required");if(X.renderer){var de=d.renderers?d.renderers[X.name]:null;de?d.renderers[X.name]=function(){for(var O=arguments.length,Te=new Array(O),s=0;s<O;s++)Te[s]=arguments[s];var g=X.renderer.apply(this,Te);return g===!1&&(g=de.apply(this,Te)),g}:d.renderers[X.name]=X.renderer}if(X.tokenizer){if(!X.level||X.level!=="block"&&X.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");d[X.level]?d[X.level].unshift(X.tokenizer):d[X.level]=[X.tokenizer],X.start&&(X.level==="block"?d.startBlock?d.startBlock.push(X.start):d.startBlock=[X.start]:X.level==="inline"&&(d.startInline?d.startInline.push(X.start):d.startInline=[X.start]))}X.childTokens&&(d.childTokens[X.name]=X.childTokens)})),y.renderer&&function(){var X=we.defaults.renderer||new qe,de=function(s){var g=X[s];X[s]=function(){for(var D=arguments.length,v=new Array(D),M=0;M<D;M++)v[M]=arguments[M];var H=y.renderer[s].apply(X,v);return H===!1&&(H=g.apply(X,v)),H}};for(var O in y.renderer)de(O);h.renderer=X}(),y.tokenizer&&function(){var X=we.defaults.tokenizer||new rt,de=function(s){var g=X[s];X[s]=function(){for(var D=arguments.length,v=new Array(D),M=0;M<D;M++)v[M]=arguments[M];var H=y.tokenizer[s].apply(X,v);return H===!1&&(H=g.apply(X,v)),H}};for(var O in y.tokenizer)de(O);h.tokenizer=X}(),y.walkTokens){var R=we.defaults.walkTokens;h.walkTokens=function(X){var de=[];return de.push(y.walkTokens.call(this,X)),R&&(de=de.concat(R.call(this,X))),de}}b&&(h.extensions=d),we.setOptions(h)})},we.walkTokens=function(N,E){for(var C=[],h=function(){var R=b.value;switch(C=C.concat(E.call(we,R)),R.type){case"table":{for(var X=w(R.header),de;!(de=X()).done;){var O=de.value;C=C.concat(we.walkTokens(O.tokens,E))}for(var Te=w(R.rows),s;!(s=Te()).done;)for(var g=s.value,D=w(g),v;!(v=D()).done;){var M=v.value;C=C.concat(we.walkTokens(M.tokens,E))}break}case"list":{C=C.concat(we.walkTokens(R.items,E));break}default:we.defaults.extensions&&we.defaults.extensions.childTokens&&we.defaults.extensions.childTokens[R.type]?we.defaults.extensions.childTokens[R.type].forEach(function(H){C=C.concat(we.walkTokens(R[H],E))}):R.tokens&&(C=C.concat(we.walkTokens(R.tokens,E)))}},d=w(N),b;!(b=d()).done;)h();return C},we.parseInline=function(N,E){if(typeof N=="undefined"||N===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof N!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(N)+", string expected");E=Z({},we.defaults,E||{}),$(E);try{var C=Ee.lexInline(N,E);return E.walkTokens&&we.walkTokens(C,E.walkTokens),Ke.parseInline(C,E)}catch(h){if(h.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,E.silent)return"<p>An error occurred:</p><pre>"+pe(h.message+"",!0)+"</pre>";throw h}},we.Parser=Ke,we.parser=Ke.parse,we.Renderer=qe,we.TextRenderer=Ct,we.Lexer=Ee,we.lexer=Ee.lex,we.Tokenizer=rt,we.Slugger=ut,we.parse=we;var Ge=we.options,Qe=we.setOptions,Lt=we.use,Qt=we.walkTokens,_e=we.parseInline,Tt=we,Bt=Ke.parse,jt=Ee.lex;be=Ee,be=Ke,be=qe,be=ut,be=Ct,be=rt,be=F,be=jt,We.TU=we,be=Ge,be=Tt,be=_e,be=Bt,be=Qe,be=Lt,be=Qt}}]);
|