-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.js
3 lines (3 loc) · 501 KB
/
index.js
1
2
3
/*! For license information please see index.js.LICENSE.txt */
(()=>{var e={"./node_modules/codemirror-spell-checker/src/js/spell-checker.js":(e,t,r)=>{"use strict";var n=r("./node_modules/typo-js/typo.js");function i(e){"function"==typeof(e=e||{}).codeMirrorInstance&&"function"==typeof e.codeMirrorInstance.defineMode?(String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),e.codeMirrorInstance.defineMode("spell-checker",(function(t){if(!i.aff_loading){i.aff_loading=!0;var r=new XMLHttpRequest;r.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),r.onload=function(){4===r.readyState&&200===r.status&&(i.aff_data=r.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new n("en_US",i.aff_data,i.dic_data,{platform:"any"})))},r.send(null)}if(!i.dic_loading){i.dic_loading=!0;var o=new XMLHttpRequest;o.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),o.onload=function(){4===o.readyState&&200===o.status&&(i.dic_data=o.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new n("en_US",i.aff_data,i.dic_data,{platform:"any"})))},o.send(null)}var a='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',s={token:function(e){var t=e.peek(),r="";if(a.includes(t))return e.next(),null;for(;null!=(t=e.peek())&&!a.includes(t);)r+=t,e.next();return i.typo&&!i.typo.check(r)?"spell-error":null}},l=e.codeMirrorInstance.getMode(t,t.backdrop||"text/plain");return e.codeMirrorInstance.overlayMode(l,s,!0)}))):console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`")}i.num_loaded=0,i.aff_loading=!1,i.dic_loading=!1,i.aff_data="",i.dic_data="",i.typo,e.exports=i},"./node_modules/codemirror/addon/dialog/dialog.js":(e,t,r)=>{!function(e){function t(t,r,n){var i,o=t.getWrapperElement();return(i=o.appendChild(document.createElement("div"))).className=n?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof r?i.innerHTML=r:i.appendChild(r),e.addClass(o,"dialog-opened"),i}function r(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(n,i,o){o||(o={}),r(this,null);var a=t(this,n,o.bottom),s=!1,l=this;function c(t){if("string"==typeof t)d.value=t;else{if(s)return;s=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),l.focus(),o.onClose&&o.onClose(a)}}var u,d=a.getElementsByTagName("input")[0];return d?(d.focus(),o.value&&(d.value=o.value,!1!==o.selectValueOnOpen&&d.select()),o.onInput&&e.on(d,"input",(function(e){o.onInput(e,d.value,c)})),o.onKeyUp&&e.on(d,"keyup",(function(e){o.onKeyUp(e,d.value,c)})),e.on(d,"keydown",(function(t){o&&o.onKeyDown&&o.onKeyDown(t,d.value,c)||((27==t.keyCode||!1!==o.closeOnEnter&&13==t.keyCode)&&(d.blur(),e.e_stop(t),c()),13==t.keyCode&&i(d.value,t))})),!1!==o.closeOnBlur&&e.on(a,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(u=a.getElementsByTagName("button")[0])&&(e.on(u,"click",(function(){c(),l.focus()})),!1!==o.closeOnBlur&&e.on(u,"blur",c),u.focus()),c})),e.defineExtension("openConfirm",(function(n,i,o){r(this,null);var a=t(this,n,o&&o.bottom),s=a.getElementsByTagName("button"),l=!1,c=this,u=1;function d(){l||(l=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),c.focus())}s[0].focus();for(var h=0;h<s.length;++h){var p=s[h];!function(t){e.on(p,"click",(function(r){e.e_preventDefault(r),d(),t&&t(c)}))}(i[h]),e.on(p,"blur",(function(){--u,setTimeout((function(){u<=0&&d()}),200)})),e.on(p,"focus",(function(){++u}))}})),e.defineExtension("openNotification",(function(n,i){r(this,c);var o,a=t(this,n,i&&i.bottom),s=!1,l=i&&void 0!==i.duration?i.duration:5e3;function c(){s||(s=!0,clearTimeout(o),e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a))}return e.on(a,"click",(function(t){e.e_preventDefault(t),c()})),l&&(o=setTimeout(c,l)),c}))}(r("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/codemirror/addon/display/autorefresh.js":(e,t,r)=>{!function(e){"use strict";function t(t,r){clearTimeout(r.timeout),e.off(window,"mouseup",r.hurry),e.off(window,"keyup",r.hurry)}e.defineOption("autoRefresh",!1,(function(r,n){r.state.autoRefresh&&(t(0,r.state.autoRefresh),r.state.autoRefresh=null),n&&0==r.display.wrapper.offsetHeight&&function(r,n){function i(){r.display.wrapper.offsetHeight?(t(0,n),r.display.lastWrapHeight!=r.display.wrapper.clientHeight&&r.refresh()):n.timeout=setTimeout(i,n.delay)}n.timeout=setTimeout(i,n.delay),n.hurry=function(){clearTimeout(n.timeout),n.timeout=setTimeout(i,50)},e.on(window,"mouseup",n.hurry),e.on(window,"keyup",n.hurry)}(r,r.state.autoRefresh={delay:n.delay||250})}))}(r("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/codemirror/addon/display/fullscreen.js":(e,t,r)=>{!function(e){"use strict";e.defineOption("fullScreen",!1,(function(t,r,n){n==e.Init&&(n=!1),!n!=!r&&(r?function(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}(t):function(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var r=e.state.fullScreenRestore;t.style.width=r.width,t.style.height=r.height,window.scrollTo(r.scrollLeft,r.scrollTop),e.refresh()}(t))}))}(r("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/codemirror/addon/display/placeholder.js":(e,t,r)=>{!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function r(e){t(e);var r=e.state.placeholder=document.createElement("pre");r.style.cssText="height: 0; overflow: visible",r.style.direction=e.getOption("direction"),r.className="CodeMirror-placeholder CodeMirror-line-like";var n=e.getOption("placeholder");"string"==typeof n&&(n=document.createTextNode(n)),r.appendChild(n),e.display.lineSpace.insertBefore(r,e.display.lineSpace.firstChild)}function n(e){o(e)&&r(e)}function i(e){var n=e.getWrapperElement(),i=o(e);n.className=n.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?r(e):t(e)}function o(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(o,a,s){var l=s&&s!=e.Init;if(a&&!l)o.on("blur",n),o.on("change",i),o.on("swapDoc",i),e.on(o.getInputField(),"compositionupdate",o.state.placeholderCompose=function(){!function(e){setTimeout((function(){var n=!1,i=e.getInputField();"TEXTAREA"==i.nodeName?n=!i.value:1==e.lineCount()&&(n=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),n?r(e):t(e)}),20)}(o)}),i(o);else if(!a&&l){o.off("blur",n),o.off("change",i),o.off("swapDoc",i),e.off(o.getInputField(),"compositionupdate",o.state.placeholderCompose),t(o);var c=o.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}a&&!o.hasFocus()&&n(o)}))}(r("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/codemirror/addon/edit/continuelist.js":(e,t,r)=>{!function(e){"use strict";var t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,r=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,n=/[*+-]\s/;function i(e,r){var n=r.line,i=0,o=0,a=t.exec(e.getLine(n)),s=a[1];do{var l=n+(i+=1),c=e.getLine(l),u=t.exec(c);if(u){var d=u[1],h=parseInt(a[3],10)+i-o,p=parseInt(u[3],10),f=p;if(s!==d||isNaN(p)){if(s.length>d.length)return;if(s.length<d.length&&1===i)return;o+=1}else h===p&&(f=p+1),h>p&&(f=h+1),e.replaceRange(c.replace(t,d+f+u[4]+u[5]),{line:l,ch:0},{line:l,ch:c.length})}}while(u)}e.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return e.Pass;for(var a=o.listSelections(),s=[],l=0;l<a.length;l++){var c=a[l].head,u=o.getStateAfter(c.line),d=e.innerMode(o.getMode(),u);if("markdown"!==d.mode.name)return void o.execCommand("newlineAndIndent");var h=!1!==(u=d.state).list,p=0!==u.quote,f=o.getLine(c.line),m=t.exec(f),g=/^\s*$/.test(f.slice(0,c.ch));if(!a[l].empty()||!h&&!p||!m||g)return void o.execCommand("newlineAndIndent");if(r.test(f)){var v=p&&/>\s*$/.test(f),y=!/>\s*$/.test(f);(v||y)&&o.replaceRange("",{line:c.line,ch:0},{line:c.line,ch:c.ch+1}),s[l]="\n"}else{var b=m[1],k=m[5],x=!(n.test(m[2])||m[2].indexOf(">")>=0),w=x?parseInt(m[3],10)+1+m[4]:m[2].replace("x"," ");s[l]="\n"+b+w+k,x&&i(o,c)}}o.replaceSelections(s)}}(r("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/codemirror/addon/edit/matchbrackets.js":(e,t,r)=>{!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),r=e.Pos,n={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var s=e.getLineHandle(t.line),l=t.ch-1,c=o&&o.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var u=i(o),d=!c&&l>=0&&u.test(s.text.charAt(l))&&n[s.text.charAt(l)]||u.test(s.text.charAt(l+1))&&n[s.text.charAt(++l)];if(!d)return null;var h=">"==d.charAt(1)?1:-1;if(o&&o.strict&&h>0!=(l==t.ch))return null;var p=e.getTokenTypeAt(r(t.line,l+1)),f=a(e,r(t.line,l+(h>0?1:0)),h,p||null,o);return null==f?null:{from:r(t.line,l),to:f&&f.pos,match:f&&f.ch==d.charAt(0),forward:h>0}}function a(e,t,o,a,s){for(var l=s&&s.maxScanLineLength||1e4,c=s&&s.maxScanLines||1e3,u=[],d=i(s),h=o>0?Math.min(t.line+c,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-c),p=t.line;p!=h;p+=o){var f=e.getLine(p);if(f){var m=o>0?0:f.length-1,g=o>0?f.length:-1;if(!(f.length>l))for(p==t.line&&(m=t.ch-(o<0?1:0));m!=g;m+=o){var v=f.charAt(m);if(d.test(v)&&(void 0===a||e.getTokenTypeAt(r(p,m+1))==a)){var y=n[v];if(y&&">"==y.charAt(1)==o>0)u.push(v);else{if(!u.length)return{pos:r(p,m),ch:v};u.pop()}}}}}return p-o!=(o>0?e.lastLine():e.firstLine())&&null}function s(e,n,i){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,s=[],l=e.listSelections(),c=0;c<l.length;c++){var u=l[c].empty()&&o(e,l[c].head,i);if(u&&e.getLine(u.from.line).length<=a){var d=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";s.push(e.markText(u.from,r(u.from.line,u.from.ch+1),{className:d})),u.to&&e.getLine(u.to.line).length<=a&&s.push(e.markText(u.to,r(u.to.line,u.to.ch+1),{className:d}))}}if(s.length){t&&e.state.focused&&e.focus();var h=function(){e.operation((function(){for(var e=0;e<s.length;e++)s[e].clear()}))};if(!n)return h;setTimeout(h,800)}}function l(e){e.operation((function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=s(e,!1,e.state.matchBrackets)}))}e.defineOption("matchBrackets",!1,(function(t,r,n){function i(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}n&&n!=e.Init&&(t.off("cursorActivity",l),t.off("focus",l),t.off("blur",i),i(t)),r&&(t.state.matchBrackets="object"==typeof r?r:{},t.on("cursorActivity",l),t.on("focus",l),t.on("blur",i))})),e.defineExtension("matchBrackets",(function(){s(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,r){return(r||"boolean"==typeof t)&&(r?(r.strict=t,t=r):t=t?{strict:!0}:null),o(this,e,t)})),e.defineExtension("scanForBracket",(function(e,t,r,n){return a(this,e,t,r,n)}))}(r("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/codemirror/addon/mode/overlay.js":(e,t,r)=>{!function(e){"use strict";e.overlayMode=function(t,r,n){return{startState:function(){return{base:e.startState(t),overlay:e.startState(r),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(n){return{base:e.copyState(t,n.base),overlay:e.copyState(r,n.overlay),basePos:n.basePos,baseCur:null,overlayPos:n.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)<e.start)&&(i.streamSeen=e,i.basePos=i.overlayPos=e.start),e.start==i.basePos&&(i.baseCur=t.token(e,i.base),i.basePos=e.pos),e.start==i.overlayPos&&(e.pos=e.start,i.overlayCur=r.token(e,i.overlay),i.overlayPos=e.pos),e.pos=Math.min(i.basePos,i.overlayPos),null==i.overlayCur?i.baseCur:null!=i.baseCur&&i.overlay.combineTokens||n&&null==i.overlay.combineTokens?i.baseCur+" "+i.overlayCur:i.overlayCur},indent:t.indent&&function(e,r,n){return t.indent(e.base,r,n)},electricChars:t.electricChars,innerMode:function(e){return{state:e.base,mode:t}},blankLine:function(e){var i,o;return t.blankLine&&(i=t.blankLine(e.base)),r.blankLine&&(o=r.blankLine(e.overlay)),null==o?i:n&&null!=i?i+" "+o:o}}}}(r("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/codemirror/addon/search/searchcursor.js":(e,t,r)=>{!function(e){"use strict";var t,r,n=e.Pos;function i(e,t){for(var r=function(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}(e),n=r,i=0;i<t.length;i++)-1==n.indexOf(t.charAt(i))&&(n+=t.charAt(i));return r==n?e:new RegExp(e.source,n)}function o(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function a(e,t,r){t=i(t,"g");for(var o=r.line,a=r.ch,s=e.lastLine();o<=s;o++,a=0){t.lastIndex=a;var l=e.getLine(o),c=t.exec(l);if(c)return{from:n(o,c.index),to:n(o,c.index+c[0].length),match:c}}}function s(e,t,r){if(!o(t))return a(e,t,r);t=i(t,"gm");for(var s,l=1,c=r.line,u=e.lastLine();c<=u;){for(var d=0;d<l&&!(c>u);d++){var h=e.getLine(c++);s=null==s?h:s+"\n"+h}l*=2,t.lastIndex=r.ch;var p=t.exec(s);if(p){var f=s.slice(0,p.index).split("\n"),m=p[0].split("\n"),g=r.line+f.length-1,v=f[f.length-1].length;return{from:n(g,v),to:n(g+m.length-1,1==m.length?v+m[0].length:m[m.length-1].length),match:p}}}}function l(e,t,r){for(var n,i=0;i<=e.length;){t.lastIndex=i;var o=t.exec(e);if(!o)break;var a=o.index+o[0].length;if(a>e.length-r)break;(!n||a>n.index+n[0].length)&&(n=o),i=o.index+1}return n}function c(e,t,r){t=i(t,"g");for(var o=r.line,a=r.ch,s=e.firstLine();o>=s;o--,a=-1){var c=e.getLine(o),u=l(c,t,a<0?0:c.length-a);if(u)return{from:n(o,u.index),to:n(o,u.index+u[0].length),match:u}}}function u(e,t,r){if(!o(t))return c(e,t,r);t=i(t,"gm");for(var a,s=1,u=e.getLine(r.line).length-r.ch,d=r.line,h=e.firstLine();d>=h;){for(var p=0;p<s&&d>=h;p++){var f=e.getLine(d--);a=null==a?f:f+"\n"+a}s*=2;var m=l(a,t,u);if(m){var g=a.slice(0,m.index).split("\n"),v=m[0].split("\n"),y=d+g.length,b=g[g.length-1].length;return{from:n(y,b),to:n(y+v.length-1,1==v.length?b+v[0].length:v[v.length-1].length),match:m}}}}function d(e,t,r,n){if(e.length==t.length)return r;for(var i=0,o=r+Math.max(0,e.length-t.length);;){if(i==o)return i;var a=i+o>>1,s=n(e.slice(0,a)).length;if(s==r)return a;s>r?o=a:i=a+1}}function h(e,i,o,a){if(!i.length)return null;var s=a?t:r,l=s(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,h=e.lastLine()+1-l.length;c<=h;c++,u=0){var p=e.getLine(c).slice(u),f=s(p);if(1==l.length){var m=f.indexOf(l[0]);if(-1==m)continue e;return o=d(p,f,m,s)+u,{from:n(c,d(p,f,m,s)+u),to:n(c,d(p,f,m+l[0].length,s)+u)}}var g=f.length-l[0].length;if(f.slice(g)==l[0]){for(var v=1;v<l.length-1;v++)if(s(e.getLine(c+v))!=l[v])continue e;var y=e.getLine(c+l.length-1),b=s(y),k=l[l.length-1];if(b.slice(0,k.length)==k)return{from:n(c,d(p,f,g,s)+u),to:n(c+l.length-1,d(y,b,k.length,s))}}}}function p(e,i,o,a){if(!i.length)return null;var s=a?t:r,l=s(i).split(/\r|\n\r?/);e:for(var c=o.line,u=o.ch,h=e.firstLine()-1+l.length;c>=h;c--,u=-1){var p=e.getLine(c);u>-1&&(p=p.slice(0,u));var f=s(p);if(1==l.length){var m=f.lastIndexOf(l[0]);if(-1==m)continue e;return{from:n(c,d(p,f,m,s)),to:n(c,d(p,f,m+l[0].length,s))}}var g=l[l.length-1];if(f.slice(0,g.length)==g){var v=1;for(o=c-l.length+1;v<l.length-1;v++)if(s(e.getLine(o+v))!=l[v])continue e;var y=e.getLine(c+1-l.length),b=s(y);if(b.slice(b.length-l[0].length)==l[0])return{from:n(c+1-l.length,d(y,b,y.length-l[0].length,s)),to:n(c,d(p,f,g.length,s))}}}}function f(e,t,r,o){var l;this.atOccurrence=!1,this.doc=e,r=r?e.clipPos(r):n(0,0),this.pos={from:r,to:r},"object"==typeof o?l=o.caseFold:(l=o,o=null),"string"==typeof t?(null==l&&(l=!1),this.matches=function(r,n){return(r?p:h)(e,t,n,l)}):(t=i(t,"gm"),o&&!1===o.multiline?this.matches=function(r,n){return(r?c:a)(e,t,n)}:this.matches=function(r,n){return(r?u:s)(e,t,n)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},r=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},r=function(e){return e}),f.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){for(var r=this.matches(t,this.doc.clipPos(t?this.pos.from:this.pos.to));r&&0==e.cmpPos(r.from,r.to);)t?r.from.ch?r.from=n(r.from.line,r.from.ch-1):r=r.from.line==this.doc.firstLine()?null:this.matches(t,this.doc.clipPos(n(r.from.line-1))):r.to.ch<this.doc.getLine(r.to.line).length?r.to=n(r.to.line,r.to.ch+1):r=r.to.line==this.doc.lastLine()?null:this.matches(t,n(r.to.line+1,0));if(r)return this.pos=r,this.atOccurrence=!0,this.pos.match||!0;var i=n(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:i,to:i},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,r){if(this.atOccurrence){var i=e.splitLines(t);this.doc.replaceRange(i,this.pos.from,this.pos.to,r),this.pos.to=n(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,r){return new f(this.doc,e,t,r)})),e.defineDocExtension("getSearchCursor",(function(e,t,r){return new f(this,e,t,r)})),e.defineExtension("selectMatches",(function(t,r){for(var n=[],i=this.getSearchCursor(t,this.getCursor("from"),r);i.findNext()&&!(e.cmpPos(i.to(),this.getCursor("to"))>0);)n.push({anchor:i.from(),head:i.to()});n.length&&this.setSelections(n,0)}))}(r("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/codemirror/addon/selection/mark-selection.js":(e,t,r)=>{!function(e){"use strict";function t(e){e.state.markedSelection&&e.operation((function(){!function(e){if(!e.somethingSelected())return a(e);if(e.listSelections().length>1)return s(e);var t=e.getCursor("start"),r=e.getCursor("end"),n=e.state.markedSelection;if(!n.length)return o(e,t,r);var l=n[0].find(),c=n[n.length-1].find();if(!l||!c||r.line-t.line<=8||i(t,c.to)>=0||i(r,l.from)<=0)return s(e);for(;i(t,l.from)>0;)n.shift().clear(),l=n[0].find();for(i(t,l.from)<0&&(l.to.line-t.line<8?(n.shift().clear(),o(e,t,l.to,0)):o(e,t,l.from,0));i(r,c.to)<0;)n.pop().clear(),c=n[n.length-1].find();i(r,c.to)>0&&(r.line-c.from.line<8?(n.pop().clear(),o(e,c.from,r)):o(e,c.to,r))}(e)}))}function r(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation((function(){a(e)}))}e.defineOption("styleSelectedText",!1,(function(n,i,o){var l=o&&o!=e.Init;i&&!l?(n.state.markedSelection=[],n.state.markedSelectionStyle="string"==typeof i?i:"CodeMirror-selectedtext",s(n),n.on("cursorActivity",t),n.on("change",r)):!i&&l&&(n.off("cursorActivity",t),n.off("change",r),a(n),n.state.markedSelection=n.state.markedSelectionStyle=null)}));var n=e.Pos,i=e.cmpPos;function o(e,t,r,o){if(0!=i(t,r))for(var a=e.state.markedSelection,s=e.state.markedSelectionStyle,l=t.line;;){var c=l==t.line?t:n(l,0),u=l+8,d=u>=r.line,h=d?r:n(u,0),p=e.markText(c,h,{className:s});if(null==o?a.push(p):a.splice(o++,0,p),d)break;l=u}}function a(e){for(var t=e.state.markedSelection,r=0;r<t.length;++r)t[r].clear();t.length=0}function s(e){a(e);for(var t=e.listSelections(),r=0;r<t.length;r++)o(e,t[r].from(),t[r].to())}}(r("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/codemirror/keymap/vim.js":(e,t,r)=>{!function(e){"use strict";var t=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<Del>",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],r=t.length,n=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],i=e.Pos;e.Vim=function(){function o(t,r){this==e.keyMap.vim&&(e.rmClass(t.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==t.getOption("inputStyle")&&null!=document.body.style.caretColor&&(function(e){l(e),e.off("cursorActivity",s),e.state.fatCursorMarks=null}(t),t.getInputField().style.caretColor="")),r&&r.attach==a||function(t){t.setOption("disableInput",!1),t.off("cursorActivity",et),e.off(t.getInputField(),"paste",h(t)),t.state.vim=null}(t)}function a(t,r){this==e.keyMap.vim&&(e.addClass(t.getWrapperElement(),"cm-fat-cursor"),"contenteditable"==t.getOption("inputStyle")&&null!=document.body.style.caretColor&&(function(e){e.state.fatCursorMarks=[],s(e),e.on("cursorActivity",s)}(t),t.getInputField().style.caretColor="transparent")),r&&r.attach==a||function(t){t.setOption("disableInput",!0),t.setOption("showCursorWhenSelecting",!1),e.signal(t,"vim-mode-change",{mode:"normal"}),t.on("cursorActivity",et),j(t),e.on(t.getInputField(),"paste",h(t))}(t)}function s(e){if(e.state.fatCursorMarks){l(e);for(var t=e.listSelections(),r=[],n=0;n<t.length;n++){var o=t[n];if(o.empty()){var a=e.getLine(o.anchor.line).length;o.anchor.ch<a?r.push(e.markText(o.anchor,i(o.anchor.line,o.anchor.ch+1),{className:"cm-fat-cursor-mark"})):r.push(e.markText(i(o.anchor.line,a-1),i(o.anchor.line,a),{className:"cm-fat-cursor-mark"}))}}e.state.fatCursorMarks=r}}function l(e){var t=e.state.fatCursorMarks;if(t)for(var r=0;r<t.length;r++)t[r].clear()}function c(t,r){if(r){if(this[t])return this[t];var n=function(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),r=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==r.length)return!1;for(var n=!1,i=0;i<t.length;i++){var o=t[i];o in u?t[i]=u[o]:n=!0,o in d&&(t[i]=d[o])}return!!n&&(_(r)&&(t[t.length-1]=r.toLowerCase()),"<"+t.join("-")+">")}(t);if(!n)return!1;var i=e.Vim.findKey(r,n);return"function"==typeof i&&e.signal(r,"vim-keypress",n),i}}e.defineOption("vimMode",!1,(function(t,r,n){r&&"vim"!=t.getOption("keyMap")?t.setOption("keyMap","vim"):!r&&n!=e.Init&&/^vim/.test(t.getOption("keyMap"))&&t.setOption("keyMap","default")}));var u={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A"},d={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function h(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(Y(e.getCursor(),0,1)),Z.enterInsertMode(e,{},t))}),t.onPasteFn}var p=/[\d]/,f=[e.isWordChar,function(t){return t&&!e.isWordChar(t)&&!/\s/.test(t)}],m=[function(e){return/\S/.test(e)}];function g(e,t){for(var r=[],n=e;n<e+t;n++)r.push(String.fromCharCode(n));return r}var v=g(65,26),y=g(97,26),b=g(48,10),k=[].concat(v,y,b,["<",">"]),x=[].concat(v,y,b,["-",'"',".",":","_","/"]);function w(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function C(e){return/^[a-z]$/.test(e)}function _(e){return/^[A-Z]$/.test(e)}function S(e){return/^\s*$/.test(e)}function A(e){return-1!=".?!".indexOf(e)}function L(e,t){for(var r=0;r<t.length;r++)if(t[r]==e)return!0;return!1}var M={};function T(e,t,r,n,i){if(void 0===t&&!i)throw Error("defaultValue is required unless callback is provided");if(r||(r="string"),M[e]={type:r,defaultValue:t,callback:i},n)for(var o=0;o<n.length;o++)M[n[o]]=M[e];t&&E(e,t)}function E(e,t,r,n){var i=M[e],o=(n=n||{}).scope;if(!i)return new Error("Unknown option: "+e);if("boolean"==i.type){if(t&&!0!==t)return new Error("Invalid argument: "+e+"="+t);!1!==t&&(t=!0)}i.callback?("local"!==o&&i.callback(t,void 0),"global"!==o&&r&&i.callback(t,r)):("local"!==o&&(i.value="boolean"==i.type?!!t:t),"global"!==o&&r&&(r.state.vim.options[e]={value:t}))}function D(e,t,r){var n=M[e],i=(r=r||{}).scope;if(!n)return new Error("Unknown option: "+e);if(n.callback){var o=t&&n.callback(void 0,t);return"global"!==i&&void 0!==o?o:"local"!==i?n.callback():void 0}return((o="global"!==i&&t&&t.state.vim.options[e])||"local"!==i&&n||{}).value}T("filetype",void 0,"string",["ft"],(function(e,t){if(void 0!==t){if(void 0===e)return"null"==(r=t.getOption("mode"))?"":r;var r=""==e?"null":e;t.setOption("mode",r)}}));var F,N,I=function(){var e=100,t=-1,r=0,n=0,i=new Array(e);function o(o,a){(t+=a)>r?t=r:t<n&&(t=n);var s=i[(e+t)%e];if(s&&!s.find()){var l,c=a>0?1:-1,u=o.getCursor();do{if((s=i[(e+(t+=c))%e])&&(l=s.find())&&!re(u,l))break}while(t<r&&t>n)}return s}return{cachedCursor:void 0,add:function(o,a,s){var l=i[t%e];function c(r){var n=++t%e,a=i[n];a&&a.clear(),i[n]=o.setBookmark(r)}if(l){var u=l.find();u&&!re(u,a)&&c(a)}else c(a);c(s),r=t,(n=t-e+1)<0&&(n=0)},find:function(e,r){var n=t,i=o(e,r);return t=n,i&&i.find()},move:o}},O=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function R(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=O()}function j(e){return e.state.vim||(e.state.vim={inputState:new P,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function z(){for(var e in F={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:I(),macroModeState:new R,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new W({}),searchHistoryController:new U,exCommandHistoryController:new U},M){var t=M[e];t.value=t.defaultValue}}R.prototype={exitMacroRecordMode:function(){var e=F.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var r=F.registerController.getRegister(t);r&&(r.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}};var B={buildKeyMap:function(){},getRegisterController:function(){return F.registerController},resetVimGlobalState_:z,getVimGlobalState_:function(){return F},maybeInitVimState_:j,suppressErrorLogging:!1,InsertModeKey:nt,map:function(e,t,r){Ze.map(e,t,r)},unmap:function(e,t){Ze.unmap(e,t)},noremap:function(e,n,i){function o(e){return e?[e]:["normal","insert","visual"]}for(var a=o(i),s=t.length,l=s-r;l<s&&a.length;l++){var c=t[l];if(!(c.keys!=n||i&&c.context&&c.context!==i||"ex"===c.type.substr(0,2)||"key"===c.type.substr(0,3))){var u={};for(var d in c)u[d]=c[d];u.keys=e,i&&!u.context&&(u.context=i),this._mapCommand(u);var h=o(c.context);a=a.filter((function(e){return-1===h.indexOf(e)}))}}},mapclear:function(e){var n=t.length,i=r,o=t.slice(0,n-i);if(t=t.slice(n-i),e)for(var a=o.length-1;a>=0;a--){var s=o[a];if(e!==s.context)if(s.context)this._mapCommand(s);else{var l=["normal","insert","visual"];for(var c in l)if(l[c]!==e){var u={};for(var d in s)u[d]=s[d];u.context=l[c],this._mapCommand(u)}}}},setOption:E,getOption:D,defineOption:T,defineEx:function(e,t,r){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;Ge[e]=r,Ze.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,r){var n=this.findKey(e,t,r);if("function"==typeof n)return n()},findKey:function(r,n,i){var o,a=j(r);function s(){var e=F.macroModeState;if(e.isRecording){if("q"==n)return e.exitMacroRecordMode(),q(r),!0;"mapping"!=i&&function(e,t){if(!e.isPlaying){var r=e.latestRegister,n=F.registerController.getRegister(r);n&&n.pushText(t)}}(e,n)}}function l(){if("<Esc>"==n)return q(r),a.visualMode?me(r):a.insertMode&&Xe(r),!0}return!1===(o=a.insertMode?function(){if(l())return!0;for(var e=a.inputState.keyBuffer=a.inputState.keyBuffer+n,i=1==n.length,o=$.matchCommand(e,t,a.inputState,"insert");e.length>1&&"full"!=o.type;){e=a.inputState.keyBuffer=e.slice(1);var s=$.matchCommand(e,t,a.inputState,"insert");"none"!=s.type&&(o=s)}if("none"==o.type)return q(r),!1;if("partial"==o.type)return N&&window.clearTimeout(N),N=window.setTimeout((function(){a.insertMode&&a.inputState.keyBuffer&&q(r)}),D("insertModeEscKeysTimeout")),!i;if(N&&window.clearTimeout(N),i){for(var c=r.listSelections(),u=0;u<c.length;u++){var d=c[u].head;r.replaceRange("",Y(d,0,-(e.length-1)),d,"+input")}F.macroModeState.lastInsertModeChanges.changes.pop()}return q(r),o.command}():function(){if(s()||l())return!0;var e=a.inputState.keyBuffer=a.inputState.keyBuffer+n;if(/^[1-9]\d*$/.test(e))return!0;if(!(i=/^(\d*)(.*)$/.exec(e)))return q(r),!1;var i,o=a.visualMode?"visual":"normal",c=$.matchCommand(i[2]||i[1],t,a.inputState,o);return"none"==c.type?(q(r),!1):"partial"==c.type||(a.inputState.keyBuffer="",(i=/^(\d*)(.*)$/.exec(e))[1]&&"0"!=i[1]&&a.inputState.pushRepeatDigit(i[1]),c.command)}())?a.insertMode||1!==n.length?void 0:function(){return!0}:!0===o?function(){return!0}:function(){return r.operation((function(){r.curOp.isVimOp=!0;try{"keyToKey"==o.type?function(t){for(var i;t;)i=/<\w+-.+?>|<\w+>|./.exec(t),n=i[0],t=t.substring(i.index+n.length),e.Vim.handleKey(r,n,"mapping")}(o.toKeys):$.processCommand(r,a,o)}catch(t){throw r.state.vim=void 0,j(r),e.Vim.suppressErrorLogging||console.log(t),t}return!0}))}},handleEx:function(e,t){Ze.processCommand(e,t)},defineMotion:function(e,t){V[e]=t},defineAction:function(e,t){Z[e]=t},defineOperator:function(e,t){G[e]=t},mapCommand:function(e,t,r,n,i){var o={keys:e,type:t};for(var a in o[t]=r,o[t+"Args"]=n,i)o[a]=i[a];Je(o)},_mapCommand:Je,defineRegister:function(e,t){var r=F.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(r[e])throw Error("Register already defined "+e);r[e]=t,x.push(e)},exitVisualMode:me,exitInsertMode:Xe};function P(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function q(t,r){t.state.vim.inputState=new P,e.signal(t,"vim-command-done",r)}function H(e,t,r){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!r}function W(e){this.registers=e,this.unnamedRegister=e['"']=new H,e["."]=new H,e[":"]=new H,e["/"]=new H}function U(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}P.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},P.prototype.getRepeat=function(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},H.prototype={setText:function(e,t,r){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!r},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(O(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},W.prototype={pushText:function(e,t,r,n,i){if("_"!==e){n&&"\n"!==r.charAt(r.length-1)&&(r+="\n");var o=this.isValidRegister(e)?this.getRegister(e):null;if(o)_(e)?o.pushText(r,n):o.setText(r,n,i),this.unnamedRegister.setText(o.toString(),n);else{switch(t){case"yank":this.registers[0]=new H(r,n,i);break;case"delete":case"change":-1==r.indexOf("\n")?this.registers["-"]=new H(r,n):(this.shiftNumericRegisters_(),this.registers[1]=new H(r,n))}this.unnamedRegister.setText(r,n,i)}}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new H),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&L(e,x)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},U.prototype={nextMatch:function(e,t){var r=this.historyBuffer,n=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var i=this.iterator+n;t?i>=0:i<r.length;i+=n)for(var o=r[i],a=0;a<=o.length;a++)if(this.initialPrefix==o.substring(0,a))return this.iterator=i,o;return i>=r.length?(this.iterator=r.length,this.initialPrefix):i<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var $={matchCommand:function(e,t,r,n){var i,o=function(e,t,r,n){for(var i,o=[],a=[],s=0;s<t.length;s++){var l=t[s];"insert"==r&&"insert"!=l.context||l.context&&l.context!=r||n.operator&&"action"==l.type||!(i=Q(e,l.keys))||("partial"==i&&o.push(l),"full"==i&&a.push(l))}return{partial:o.length&&o,full:a.length&&a}}(e,t,n,r);if(!o.full&&!o.partial)return{type:"none"};if(!o.full&&o.partial)return{type:"partial"};for(var a=0;a<o.full.length;a++){var s=o.full[a];i||(i=s)}if("<character>"==i.keys.slice(-11)){var l=function(e){var t=/^.*(<[^>]+>)$/.exec(e),r=t?t[1]:e.slice(-1);if(r.length>1)switch(r){case"<CR>":r="\n";break;case"<Space>":r=" ";break;default:r=""}return r}(e);if(!l)return{type:"none"};r.selectedCharacter=l}return{type:"full",command:i}},processCommand:function(e,t,r){switch(t.inputState.repeatOverride=r.repeatOverride,r.type){case"motion":this.processMotion(e,t,r);break;case"operator":this.processOperator(e,t,r);break;case"operatorMotion":this.processOperatorMotion(e,t,r);break;case"action":this.processAction(e,t,r);break;case"search":this.processSearch(e,t,r);break;case"ex":case"keyToEx":this.processEx(e,t,r)}},processMotion:function(e,t,r){t.inputState.motion=r.motion,t.inputState.motionArgs=J(r.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,r){var n=t.inputState;if(n.operator){if(n.operator==r.operator)return n.motion="expandToLine",n.motionArgs={linewise:!0},void this.evalInput(e,t);q(e)}n.operator=r.operator,n.operatorArgs=J(r.operatorArgs),r.exitVisualBlock&&(t.visualBlock=!1,pe(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,r){var n=t.visualMode,i=J(r.operatorMotionArgs);i&&n&&i.visualLine&&(t.visualLine=!0),this.processOperator(e,t,r),n||this.processMotion(e,t,r)},processAction:function(e,t,r){var n=t.inputState,i=n.getRepeat(),o=!!i,a=J(r.actionArgs)||{};n.selectedCharacter&&(a.selectedCharacter=n.selectedCharacter),r.operator&&this.processOperator(e,t,r),r.motion&&this.processMotion(e,t,r),(r.motion||r.operator)&&this.evalInput(e,t),a.repeat=i||1,a.repeatIsExplicit=o,a.registerName=n.registerName,q(e),t.lastMotion=null,r.isEdit&&this.recordLastEdit(t,n,r),Z[r.action](e,a,t)},processSearch:function(t,r,n){if(t.getSearchCursor){var i=n.searchArgs.forward,o=n.searchArgs.wholeWordOnly;Te(t).setReversed(!i);var a=i?"/":"?",s=Te(t).getQuery(),l=t.getScrollInfo();switch(n.searchArgs.querySrc){case"prompt":var c=F.macroModeState;c.isPlaying?p(h=c.replaySearchQueries.shift(),!0,!1):je(t,{onClose:function(e){t.scrollTo(l.left,l.top),p(e,!0,!0);var r=F.macroModeState;r.isRecording&&function(e,t){if(!e.isPlaying){var r=e.latestRegister,n=F.registerController.getRegister(r);n&&n.pushSearchQuery&&n.pushSearchQuery(t)}}(r,e)},prefix:a,desc:Re,onKeyUp:function(r,n,o){var a,s,c,u=e.keyName(r);"Up"==u||"Down"==u?(a="Up"==u,s=r.target?r.target.selectionEnd:0,o(n=F.searchHistoryController.nextMatch(n,a)||""),s&&r.target&&(r.target.selectionEnd=r.target.selectionStart=Math.min(s,r.target.value.length))):"Left"!=u&&"Right"!=u&&"Ctrl"!=u&&"Alt"!=u&&"Shift"!=u&&F.searchHistoryController.reset();try{c=ze(t,n,!0,!0)}catch(r){}c?t.scrollIntoView(qe(t,!i,c),30):(He(t),t.scrollTo(l.left,l.top))},onKeyDown:function(r,n,i){var o=e.keyName(r);"Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==n?(F.searchHistoryController.pushInput(n),F.searchHistoryController.reset(),ze(t,s),He(t),t.scrollTo(l.left,l.top),e.e_stop(r),q(t),i(),t.focus()):"Up"==o||"Down"==o?e.e_stop(r):"Ctrl-U"==o&&(e.e_stop(r),i(""))}});break;case"wordUnderCursor":var u=ve(t,!1,0,!1,!0),d=!0;if(u||(u=ve(t,!1,0,!1,!1),d=!1),!u)return;var h=t.getLine(u.start.line).substring(u.start.ch,u.end.ch);h=d&&o?"\\b"+h+"\\b":h.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),F.jumpList.cachedCursor=t.getCursor(),t.setCursor(u.start),p(h,!0,!1)}}function p(e,i,o){F.searchHistoryController.pushInput(e),F.searchHistoryController.reset();try{ze(t,e,i,o)}catch(r){return Oe(t,"Invalid regex: "+e),void q(t)}$.processMotion(t,r,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:n.searchArgs.toJumplist}})}},processEx:function(t,r,n){function i(e){F.exCommandHistoryController.pushInput(e),F.exCommandHistoryController.reset(),Ze.processCommand(t,e)}function o(r,n,i){var o,a,s=e.keyName(r);("Esc"==s||"Ctrl-C"==s||"Ctrl-["==s||"Backspace"==s&&""==n)&&(F.exCommandHistoryController.pushInput(n),F.exCommandHistoryController.reset(),e.e_stop(r),q(t),i(),t.focus()),"Up"==s||"Down"==s?(e.e_stop(r),o="Up"==s,a=r.target?r.target.selectionEnd:0,i(n=F.exCommandHistoryController.nextMatch(n,o)||""),a&&r.target&&(r.target.selectionEnd=r.target.selectionStart=Math.min(a,r.target.value.length))):"Ctrl-U"==s?(e.e_stop(r),i("")):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&F.exCommandHistoryController.reset()}"keyToEx"==n.type?Ze.processCommand(t,n.exArgs.input):r.visualMode?je(t,{onClose:i,prefix:":",value:"'<,'>",onKeyDown:o,selectValueOnOpen:!1}):je(t,{onClose:i,prefix:":",onKeyDown:o})},evalInput:function(e,t){var r,n,o,a=t.inputState,s=a.motion,l=a.motionArgs||{},c=a.operator,u=a.operatorArgs||{},d=a.registerName,h=t.sel,p=te(t.visualMode?X(e,h.head):e.getCursor("head")),f=te(t.visualMode?X(e,h.anchor):e.getCursor("anchor")),m=te(p),g=te(f);if(c&&this.recordLastEdit(t,a),(o=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat())>0&&l.explicitRepeat?l.repeatIsExplicit=!0:(l.noRepeat||!l.explicitRepeat&&0===o)&&(o=1,l.repeatIsExplicit=!1),a.selectedCharacter&&(l.selectedCharacter=u.selectedCharacter=a.selectedCharacter),l.repeat=o,q(e),s){var v=V[s](e,p,l,t,a);if(t.lastMotion=V[s],!v)return;if(l.toJumplist){var y=F.jumpList,b=y.cachedCursor;b?(ye(e,b,v),delete y.cachedCursor):ye(e,p,v)}v instanceof Array?(n=v[0],r=v[1]):r=v,r||(r=te(p)),t.visualMode?(t.visualBlock&&r.ch===1/0||(r=X(e,r)),n&&(n=X(e,n)),n=n||g,h.anchor=n,h.head=r,pe(e),Se(e,t,"<",ne(n,r)?n:r),Se(e,t,">",ne(n,r)?r:n)):c||(r=X(e,r),e.setCursor(r.line,r.ch))}if(c){if(u.lastSel){n=g;var k=u.lastSel,x=Math.abs(k.head.line-k.anchor.line),w=Math.abs(k.head.ch-k.anchor.ch);r=k.visualLine?i(g.line+x,g.ch):k.visualBlock?i(g.line+x,g.ch+w):k.head.line==k.anchor.line?i(g.line,g.ch+w):i(g.line+x,g.ch),t.visualMode=!0,t.visualLine=k.visualLine,t.visualBlock=k.visualBlock,h=t.sel={anchor:n,head:r},pe(e)}else t.visualMode&&(u.lastSel={anchor:te(h.anchor),head:te(h.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var C,_,A,L,M;if(t.visualMode){if(C=ie(h.head,h.anchor),_=oe(h.head,h.anchor),A=t.visualLine||u.linewise,M=fe(e,{anchor:C,head:_},L=t.visualBlock?"block":A?"line":"char"),A){var T=M.ranges;if("block"==L)for(var E=0;E<T.length;E++)T[E].head.ch=se(e,T[E].head.line);else"line"==L&&(T[0].head=i(T[0].head.line+1,0))}}else{if(C=te(n||g),ne(_=te(r||m),C)){var D=C;C=_,_=D}(A=l.linewise||u.linewise)?function(e,t,r){t.ch=0,r.ch=0,r.line++}(0,C,_):l.forward&&function(e,t,r){var n=e.getRange(t,r);if(/\n\s*$/.test(n)){var i=n.split("\n");i.pop();for(var o=i.pop();i.length>0&&o&&S(o);o=i.pop())r.line--,r.ch=0;o?(r.line--,r.ch=se(e,r.line)):r.ch=0}}(e,C,_),M=fe(e,{anchor:C,head:_},L="char",!l.inclusive||A)}e.setSelections(M.ranges,M.primary),t.lastMotion=null,u.repeat=o,u.registerName=d,u.linewise=A;var N=G[c](e,u,M.ranges,g,r);t.visualMode&&me(e,null!=N),N&&e.setCursor(N)}},recordLastEdit:function(e,t,r){var n=F.macroModeState;n.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=r,n.lastInsertModeChanges.changes=[],n.lastInsertModeChanges.expectCursorActivityForChange=!1,n.lastInsertModeChanges.visualBlock=e.visualBlock?e.sel.head.line-e.sel.anchor.line:0)}},V={moveToTopLine:function(e,t,r){var n=Ue(e).top+r.repeat-1;return i(n,ge(e.getLine(n)))},moveToMiddleLine:function(e){var t=Ue(e),r=Math.floor(.5*(t.top+t.bottom));return i(r,ge(e.getLine(r)))},moveToBottomLine:function(e,t,r){var n=Ue(e).bottom-r.repeat+1;return i(n,ge(e.getLine(n)))},expandToLine:function(e,t,r){return i(t.line+r.repeat-1,1/0)},findNext:function(e,t,r){var n=Te(e),i=n.getQuery();if(i){var o=!r.forward;return o=n.isReversed()?!o:o,Pe(e,i),qe(e,o,i,r.repeat)}},findAndSelectNextInclusive:function(t,r,n,o,a){var s=Te(t),l=s.getQuery();if(l){var c=!n.forward,u=function(e,t,r,n,o){return void 0===n&&(n=1),e.operation((function(){var a=e.getCursor(),s=e.getSearchCursor(r,a),l=s.find(!t);!o.visualMode&&l&&re(s.from(),a)&&s.find(!t);for(var c=0;c<n;c++)if(!(l=s.find(t))&&!(s=e.getSearchCursor(r,t?i(e.lastLine()):i(e.firstLine(),0))).find(t))return;return[s.from(),s.to()]}))}(t,c=s.isReversed()?!c:c,l,n.repeat,o);if(u){if(a.operator)return u;var d=u[0],h=i(u[1].line,u[1].ch-1);if(o.visualMode){(o.visualLine||o.visualBlock)&&(o.visualLine=!1,o.visualBlock=!1,e.signal(t,"vim-mode-change",{mode:"visual",subMode:""}));var p=o.sel.anchor;if(p)return s.isReversed()?n.forward?[p,d]:[p,h]:n.forward?[p,h]:[p,d]}else o.visualMode=!0,o.visualLine=!1,o.visualBlock=!1,e.signal(t,"vim-mode-change",{mode:"visual",subMode:""});return c?[h,d]:[d,h]}}},goToMark:function(e,t,r,n){var i=$e(e,n,r.selectedCharacter);return i?r.linewise?{line:i.line,ch:ge(e.getLine(i.line))}:i:null},moveToOtherHighlightedEnd:function(e,t,r,n){if(n.visualBlock&&r.sameLine){var o=n.sel;return[X(e,i(o.anchor.line,o.head.ch)),X(e,i(o.head.line,o.anchor.ch))]}return[n.sel.head,n.sel.anchor]},jumpToMark:function(e,t,r,n){for(var o=t,a=0;a<r.repeat;a++){var s=o;for(var l in n.marks)if(C(l)){var c=n.marks[l].find();if(!((r.forward?ne(c,s):ne(s,c))||r.linewise&&c.line==s.line)){var u=re(s,o),d=r.forward?ae(s,c,o):ae(o,c,s);(u||d)&&(o=c)}}}return r.linewise&&(o=i(o.line,ge(e.getLine(o.line)))),o},moveByCharacters:function(e,t,r){var n=t,o=r.repeat,a=r.forward?n.ch+o:n.ch-o;return i(n.line,a)},moveByLines:function(e,t,r,n){var o=t,a=o.ch;switch(n.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:a=n.lastHPos;break;default:n.lastHPos=a}var s=r.repeat+(r.repeatOffset||0),l=r.forward?o.line+s:o.line-s,c=e.firstLine(),u=e.lastLine(),d=e.findPosV(o,r.forward?s:-s,"line",n.lastHSPos);return(r.forward?d.line>l:d.line<l)&&(l=d.line,a=d.ch),l<c&&o.line==c?this.moveToStartOfLine(e,t,r,n):l>u&&o.line==u?Ce(e,t,r,n,!0):(r.toFirstChar&&(a=ge(e.getLine(l)),n.lastHPos=a),n.lastHSPos=e.charCoords(i(l,a),"div").left,i(l,a))},moveByDisplayLines:function(e,t,r,n){var o=t;switch(n.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:n.lastHSPos=e.charCoords(o,"div").left}var a=r.repeat;if((l=e.findPosV(o,r.forward?a:-a,"line",n.lastHSPos)).hitSide)if(r.forward)var s={top:e.charCoords(l,"div").top+8,left:n.lastHSPos},l=e.coordsChar(s,"div");else{var c=e.charCoords(i(e.firstLine(),0),"div");c.left=n.lastHSPos,l=e.coordsChar(c,"div")}return n.lastHPos=l.ch,l},moveByPage:function(e,t,r){var n=t,i=r.repeat;return e.findPosV(n,r.forward?i:-i,"page")},moveByParagraph:function(e,t,r){var n=r.forward?1:-1;return Le(e,t,r.repeat,n)},moveBySentence:function(e,t,r){var n=r.forward?1:-1;return function(e,t,r,n){function o(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!w(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}function a(e,t,r,n){var i=""===(c=e.getLine(t)),a={line:c,ln:t,pos:r,dir:n},s={ln:a.ln,pos:a.pos},l=""===a.line;for(o(e,a);null!==a.line;){if(s.ln=a.ln,s.pos=a.pos,""===a.line&&!l)return{ln:a.ln,pos:a.pos};if(i&&""!==a.line&&!S(a.line[a.pos]))return{ln:a.ln,pos:a.pos};!A(a.line[a.pos])||i||a.pos!==a.line.length-1&&!S(a.line[a.pos+1])||(i=!0),o(e,a)}var c=e.getLine(s.ln);s.pos=0;for(var u=c.length-1;u>=0;--u)if(!S(c[u])){s.pos=u;break}return s}function s(e,t,r,n){var i={line:l=e.getLine(t),ln:t,pos:r,dir:n},a={ln:i.ln,pos:null},s=""===i.line;for(o(e,i);null!==i.line;){if(""===i.line&&!s)return null!==a.pos?a:{ln:i.ln,pos:i.pos};if(A(i.line[i.pos])&&null!==a.pos&&(i.ln!==a.ln||i.pos+1!==a.pos))return a;""===i.line||S(i.line[i.pos])||(s=!1,a={ln:i.ln,pos:i.pos}),o(e,i)}var l=e.getLine(a.ln);a.pos=0;for(var c=0;c<l.length;++c)if(!S(l[c])){a.pos=c;break}return a}for(var l={ln:t.line,pos:t.ch};r>0;)l=n<0?s(e,l.ln,l.pos,n):a(e,l.ln,l.pos,n),r--;return i(l.ln,l.pos)}(e,t,r.repeat,n)},moveByScroll:function(e,t,r,n){var i,o=e.getScrollInfo(),a=r.repeat;a||(a=o.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");if(r.repeat=a,!(i=V.moveByDisplayLines(e,t,r,n)))return null;var l=e.charCoords(i,"local");return e.scrollTo(null,o.top+l.top-s.top),i},moveByWords:function(e,t,r){return function(e,t,r,n,o,a){var s=te(t),l=[];(n&&!o||!n&&o)&&r++;for(var c=!(n&&o),u=0;u<r;u++){var d=we(e,t,n,a,c);if(!d){var h=se(e,e.lastLine());l.push(n?{line:e.lastLine(),from:h,to:h}:{line:0,from:0,to:0});break}l.push(d),t=i(d.line,n?d.to-1:d.from)}var p=l.length!=r,f=l[0],m=l.pop();return n&&!o?(p||f.from==s.ch&&f.line==s.line||(m=l.pop()),i(m.line,m.from)):n&&o?i(m.line,m.to-1):!n&&o?(p||f.to==s.ch&&f.line==s.line||(m=l.pop()),i(m.line,m.to)):i(m.line,m.from)}(e,t,r.repeat,!!r.forward,!!r.wordEnd,!!r.bigWord)},moveTillCharacter:function(e,t,r){var n=_e(e,r.repeat,r.forward,r.selectedCharacter),i=r.forward?-1:1;return be(i,r),n?(n.ch+=i,n):null},moveToCharacter:function(e,t,r){var n=r.repeat;return be(0,r),_e(e,n,r.forward,r.selectedCharacter)||t},moveToSymbol:function(e,t,r){return function(e,t,r,n){var o=te(e.getCursor()),a=r?1:-1,s=r?e.lineCount():-1,l=o.ch,c=o.line,u=e.getLine(c),d={lineText:u,nextCh:u.charAt(l),lastCh:null,index:l,symb:n,reverseSymb:(r?{")":"(","}":"{"}:{"(":")","{":"}"})[n],forward:r,depth:0,curMoveThrough:!1},h=ke[n];if(!h)return o;var p=xe[h].init,f=xe[h].isComplete;for(p&&p(d);c!==s&&t;){if(d.index+=a,d.nextCh=d.lineText.charAt(d.index),!d.nextCh){if(c+=a,d.lineText=e.getLine(c)||"",a>0)d.index=0;else{var m=d.lineText.length;d.index=m>0?m-1:0}d.nextCh=d.lineText.charAt(d.index)}f(d)&&(o.line=c,o.ch=d.index,t--)}return d.nextCh||d.curMoveThrough?i(c,d.index):o}(e,r.repeat,r.forward,r.selectedCharacter)||t},moveToColumn:function(e,t,r,n){var o=r.repeat;return n.lastHPos=o-1,n.lastHSPos=e.charCoords(t,"div").left,function(e,t){var r=e.getCursor().line;return X(e,i(r,t-1))}(e,o)},moveToEol:function(e,t,r,n){return Ce(e,t,r,n,!1)},moveToFirstNonWhiteSpaceCharacter:function(e,t){var r=t;return i(r.line,ge(e.getLine(r.line)))},moveToMatchedSymbol:function(e,t){for(var r,n=t,o=n.line,a=n.ch,s=e.getLine(o);a<s.length;a++)if((r=s.charAt(a))&&-1!="()[]{}".indexOf(r)){var l=e.getTokenTypeAt(i(o,a+1));if("string"!==l&&"comment"!==l)break}if(a<s.length){var c="<"===a||">"===a?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(i(o,a),{bracketRegex:c}).to}return n},moveToStartOfLine:function(e,t){return i(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,r){var n=r.forward?e.lastLine():e.firstLine();return r.repeatIsExplicit&&(n=r.repeat-e.getOption("firstLineNumber")),i(n,ge(e.getLine(n)))},textObjectManipulation:function(t,r,n,o){var a=n.selectedCharacter;"b"==a?a="(":"B"==a&&(a="{");var s,l=!n.textObjectInner;if({"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"}[a])s=function(e,t,r,n){var o,a,s=t,l={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[r],c={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[r],u=e.getLine(s.line).charAt(s.ch)===c?1:0;if(o=e.scanForBracket(i(s.line,s.ch+u),-1,void 0,{bracketRegex:l}),a=e.scanForBracket(i(s.line,s.ch+u),1,void 0,{bracketRegex:l}),!o||!a)return{start:s,end:s};if(o=o.pos,a=a.pos,o.line==a.line&&o.ch>a.ch||o.line>a.line){var d=o;o=a,a=d}return n?a.ch+=1:o.ch+=1,{start:o,end:a}}(t,r,a,l);else if({"'":!0,'"':!0,"`":!0}[a])s=function(e,t,r,n){var o,a,s,l,c=te(t),u=e.getLine(c.line).split(""),d=u.indexOf(r);if(c.ch<d?c.ch=d:d<c.ch&&u[c.ch]==r&&(a=c.ch,--c.ch),u[c.ch]!=r||a)for(s=c.ch;s>-1&&!o;s--)u[s]==r&&(o=s+1);else o=c.ch+1;if(o&&!a)for(s=o,l=u.length;s<l&&!a;s++)u[s]==r&&(a=s);return o&&a?(n&&(--o,++a),{start:i(c.line,o),end:i(c.line,a)}):{start:c,end:c}}(t,r,a,l);else if("W"===a)s=ve(t,l,0,!0);else if("w"===a)s=ve(t,l,0,!1);else if("p"===a)if(s=Le(t,r,n.repeat,0,l),n.linewise=!0,o.visualMode)o.visualLine||(o.visualLine=!0);else{var c=o.inputState.operatorArgs;c&&(c.linewise=!0),s.end.line--}else{if("t"!==a)return null;s=function(t,r,n){var i=r;if(!e.findMatchingTag||!e.findEnclosingTag)return{start:i,end:i};var o=e.findMatchingTag(t,r)||e.findEnclosingTag(t,r);return o&&o.open&&o.close?n?{start:o.open.from,end:o.close.to}:{start:o.open.to,end:o.close.from}:{start:i,end:i}}(t,r,l)}return t.state.vim.visualMode?function(e,t,r){var n,o=e.state.vim.sel,a=o.head,s=o.anchor;return ne(r,t)&&(n=r,r=t,t=n),ne(a,s)?(a=ie(t,a),s=oe(s,r)):(s=ie(t,s),-1==(a=Y(a=oe(a,r),0,-1)).ch&&a.line!=e.firstLine()&&(a=i(a.line-1,se(e,a.line-1)))),[s,a]}(t,s.start,s.end):[s.start,s.end]},repeatLastCharacterSearch:function(e,t,r){var n=F.lastCharacterSearch,i=r.repeat,o=r.forward===n.forward,a=(n.increment?1:0)*(o?-1:1);e.moveH(-a,"char"),r.inclusive=!!o;var s=_e(e,i,o,n.selectedCharacter);return s?(s.ch+=a,s):(e.moveH(a,"char"),t)}};function K(e,t){for(var r=[],n=0;n<t;n++)r.push(e);return r}var G={change:function(t,r,n){var o,a,s=t.state.vim,l=n[0].anchor,c=n[0].head;if(s.visualMode)if(r.fullLine)c.ch=Number.MAX_VALUE,c.line--,t.setSelection(l,c),a=t.getSelection(),t.replaceSelection(""),o=l;else{a=t.getSelection();var u=K("",n.length);t.replaceSelections(u),o=ie(n[0].head,n[0].anchor)}else{a=t.getRange(l,c);var d=s.lastEditInputState||{};if("moveByWords"==d.motion&&!S(a)){var h=/\s+$/.exec(a);h&&d.motionArgs&&d.motionArgs.forward&&(c=Y(c,0,-h[0].length),a=a.slice(0,-h[0].length))}var p=new i(l.line-1,Number.MAX_VALUE),f=t.firstLine()==t.lastLine();c.line>t.lastLine()&&r.linewise&&!f?t.replaceRange("",p,c):t.replaceRange("",l,c),r.linewise&&(f||(t.setCursor(p),e.commands.newlineAndIndent(t)),l.ch=Number.MAX_VALUE),o=l}F.registerController.pushText(r.registerName,"change",a,r.linewise,n.length>1),Z.enterInsertMode(t,{head:o},t.state.vim)},delete:function(e,t,r){var n,o,a=e.state.vim;if(a.visualBlock){o=e.getSelection();var s=K("",r.length);e.replaceSelections(s),n=r[0].anchor}else{var l=r[0].anchor,c=r[0].head;t.linewise&&c.line!=e.firstLine()&&l.line==e.lastLine()&&l.line==c.line-1&&(l.line==e.firstLine()?l.ch=0:l=i(l.line-1,se(e,l.line-1))),o=e.getRange(l,c),e.replaceRange("",l,c),n=l,t.linewise&&(n=V.moveToFirstNonWhiteSpaceCharacter(e,l))}return F.registerController.pushText(t.registerName,"delete",o,t.linewise,a.visualBlock),X(e,n)},indent:function(e,t,r){var n=e.state.vim,i=r[0].anchor.line,o=n.visualBlock?r[r.length-1].anchor.line:r[0].head.line,a=n.visualMode?t.repeat:1;t.linewise&&o--;for(var s=i;s<=o;s++)for(var l=0;l<a;l++)e.indentLine(s,t.indentRight);return V.moveToFirstNonWhiteSpaceCharacter(e,r[0].anchor)},indentAuto:function(e,t,r){return e.execCommand("indentAuto"),V.moveToFirstNonWhiteSpaceCharacter(e,r[0].anchor)},changeCase:function(e,t,r,n,i){for(var o=e.getSelections(),a=[],s=t.toLower,l=0;l<o.length;l++){var c=o[l],u="";if(!0===s)u=c.toLowerCase();else if(!1===s)u=c.toUpperCase();else for(var d=0;d<c.length;d++){var h=c.charAt(d);u+=_(h)?h.toLowerCase():h.toUpperCase()}a.push(u)}return e.replaceSelections(a),t.shouldMoveCursor?i:!e.state.vim.visualMode&&t.linewise&&r[0].anchor.line+1==r[0].head.line?V.moveToFirstNonWhiteSpaceCharacter(e,n):t.linewise?n:ie(r[0].anchor,r[0].head)},yank:function(e,t,r,n){var i=e.state.vim,o=e.getSelection(),a=i.visualMode?ie(i.sel.anchor,i.sel.head,r[0].head,r[0].anchor):n;return F.registerController.pushText(t.registerName,"yank",o,t.linewise,i.visualBlock),a}};var Z={jumpListWalk:function(e,t,r){if(!r.visualMode){var n=t.repeat,i=t.forward,o=F.jumpList.move(e,i?n:-n),a=o?o.find():void 0;a=a||e.getCursor(),e.setCursor(a)}},scroll:function(e,t,r){if(!r.visualMode){var n=t.repeat||1,i=e.defaultTextHeight(),o=e.getScrollInfo().top,a=i*n,s=t.forward?o+a:o-a,l=te(e.getCursor()),c=e.charCoords(l,"local");if(t.forward)s>c.top?(l.line+=(s-c.top)/i,l.line=Math.ceil(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,s);else{var u=s+e.getScrollInfo().clientHeight;u<c.bottom?(l.line-=(c.bottom-u)/i,l.line=Math.floor(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.bottom-e.getScrollInfo().clientHeight)):e.scrollTo(null,s)}}},scrollToCursor:function(e,t){var r=e.getCursor().line,n=e.charCoords(i(r,0),"local"),o=e.getScrollInfo().clientHeight,a=n.top,s=n.bottom-a;switch(t.position){case"center":a=a-o/2+s;break;case"bottom":a=a-o+s}e.scrollTo(null,a)},replayMacro:function(e,t,r){var n=t.selectedCharacter,i=t.repeat,o=F.macroModeState;for("@"==n?n=o.latestRegister:o.latestRegister=n;i--;)Ye(e,r,o,n)},enterMacroRecordMode:function(e,t){var r=F.macroModeState,n=t.selectedCharacter;F.registerController.isValidRegister(n)&&r.enterMacroRecordMode(e,n)},toggleOverwrite:function(t){t.state.overwrite?(t.toggleOverwrite(!1),t.setOption("keyMap","vim-insert"),e.signal(t,"vim-mode-change",{mode:"insert"})):(t.toggleOverwrite(!0),t.setOption("keyMap","vim-replace"),e.signal(t,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(t,r,n){if(!t.getOption("readOnly")){n.insertMode=!0,n.insertModeRepeat=r&&r.repeat||1;var o=r?r.insertAt:null,a=n.sel,s=r.head||t.getCursor("head"),l=t.listSelections().length;if("eol"==o)s=i(s.line,se(t,s.line));else if("bol"==o)s=i(s.line,0);else if("charAfter"==o)s=Y(s,0,1);else if("firstNonBlank"==o)s=V.moveToFirstNonWhiteSpaceCharacter(t,s);else if("startOfSelectedArea"==o){if(!n.visualMode)return;n.visualBlock?(s=i(Math.min(a.head.line,a.anchor.line),Math.min(a.head.ch,a.anchor.ch)),l=Math.abs(a.head.line-a.anchor.line)+1):s=a.head.line<a.anchor.line?a.head:i(a.anchor.line,0)}else if("endOfSelectedArea"==o){if(!n.visualMode)return;n.visualBlock?(s=i(Math.min(a.head.line,a.anchor.line),Math.max(a.head.ch+1,a.anchor.ch)),l=Math.abs(a.head.line-a.anchor.line)+1):s=a.head.line>=a.anchor.line?Y(a.head,0,1):i(a.anchor.line,0)}else if("inplace"==o){if(n.visualMode)return}else"lastEdit"==o&&(s=Ve(t)||s);t.setOption("disableInput",!1),r&&r.replace?(t.toggleOverwrite(!0),t.setOption("keyMap","vim-replace"),e.signal(t,"vim-mode-change",{mode:"replace"})):(t.toggleOverwrite(!1),t.setOption("keyMap","vim-insert"),e.signal(t,"vim-mode-change",{mode:"insert"})),F.macroModeState.isPlaying||(t.on("change",Qe),e.on(t.getInputField(),"keydown",it)),n.visualMode&&me(t),de(t,s,l)}},toggleVisualMode:function(t,r,n){var o,a=r.repeat,s=t.getCursor();n.visualMode?n.visualLine^r.linewise||n.visualBlock^r.blockwise?(n.visualLine=!!r.linewise,n.visualBlock=!!r.blockwise,e.signal(t,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),pe(t)):me(t):(n.visualMode=!0,n.visualLine=!!r.linewise,n.visualBlock=!!r.blockwise,o=X(t,i(s.line,s.ch+a-1)),n.sel={anchor:s,head:o},e.signal(t,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),pe(t),Se(t,n,"<",ie(s,o)),Se(t,n,">",oe(s,o)))},reselectLastSelection:function(t,r,n){var i=n.lastSelection;if(n.visualMode&&he(t,n),i){var o=i.anchorMark.find(),a=i.headMark.find();if(!o||!a)return;n.sel={anchor:o,head:a},n.visualMode=!0,n.visualLine=i.visualLine,n.visualBlock=i.visualBlock,pe(t),Se(t,n,"<",ie(o,a)),Se(t,n,">",oe(o,a)),e.signal(t,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,r){var n,o;if(r.visualMode){if(n=e.getCursor("anchor"),ne(o=e.getCursor("head"),n)){var a=o;o=n,n=a}o.ch=se(e,o.line)-1}else{var s=Math.max(t.repeat,2);n=e.getCursor(),o=X(e,i(n.line+s-1,1/0))}for(var l=0,c=n.line;c<o.line;c++){l=se(e,n.line),a=i(n.line+1,se(e,n.line+1));var u=e.getRange(n,a);u=t.keepSpaces?u.replace(/\n\r?/g,""):u.replace(/\n\s*/g," "),e.replaceRange(u,n,a)}var d=i(n.line,l);r.visualMode&&me(e,!1),e.setCursor(d)},newLineAndEnterInsertMode:function(t,r,n){n.insertMode=!0;var o=te(t.getCursor());o.line!==t.firstLine()||r.after?(o.line=r.after?o.line:o.line-1,o.ch=se(t,o.line),t.setCursor(o),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(t)):(t.replaceRange("\n",i(t.firstLine(),0)),t.setCursor(t.firstLine(),0)),this.enterInsertMode(t,{repeat:r.repeat},n)},paste:function(e,t,r){var n=te(e.getCursor()),o=F.registerController.getRegister(t.registerName);if(p=o.toString()){if(t.matchIndent){var a=e.getOption("tabSize"),s=function(e){var t=e.split("\t").length-1,r=e.split(" ").length-1;return t*a+1*r},l=e.getLine(e.getCursor().line),c=s(l.match(/^\s*/)[0]),u=p.replace(/\n$/,""),d=p!==u,h=s(p.match(/^\s*/)[0]),p=u.replace(/^\s*/gm,(function(t){var r=c+(s(t)-h);if(r<0)return"";if(e.getOption("indentWithTabs")){var n=Math.floor(r/a);return Array(n+1).join("\t")}return Array(r+1).join(" ")}));p+=d?"\n":""}t.repeat>1&&(p=Array(t.repeat+1).join(p));var f,m,g=o.linewise,v=o.blockwise;if(v){p=p.split("\n"),g&&p.pop();for(var y=0;y<p.length;y++)p[y]=""==p[y]?" ":p[y];n.ch+=t.after?1:0,n.ch=Math.min(se(e,n.line),n.ch)}else g?r.visualMode?p=r.visualLine?p.slice(0,-1):"\n"+p.slice(0,p.length-1)+"\n":t.after?(p="\n"+p.slice(0,p.length-1),n.ch=se(e,n.line)):n.ch=0:n.ch+=t.after?1:0;if(r.visualMode){var b;r.lastPastedText=p;var k=function(e,t){var r=t.lastSelection,n=function(){var t=e.listSelections(),r=t[0],n=t[t.length-1];return[ne(r.anchor,r.head)?r.anchor:r.head,ne(n.anchor,n.head)?n.head:n.anchor]},o=function(){var t=e.getCursor(),n=e.getCursor(),o=r.visualBlock;if(o){var a=o.width,s=o.height;n=i(t.line+s,t.ch+a);for(var l=[],c=t.line;c<n.line;c++){var u={anchor:i(c,t.ch),head:i(c,n.ch)};l.push(u)}e.setSelections(l)}else{var d=r.anchorMark.find(),h=r.headMark.find(),p=h.line-d.line,f=h.ch-d.ch;n={line:n.line+p,ch:p?n.ch:f+n.ch},r.visualLine&&(t=i(t.line,0),n=i(n.line,se(e,n.line))),e.setSelection(t,n)}return[t,n]};return t.visualMode?n():o()}(e,r),x=k[0],w=k[1],C=e.getSelection(),_=e.listSelections(),S=new Array(_.length).join("1").split("1");r.lastSelection&&(b=r.lastSelection.headMark.find()),F.registerController.unnamedRegister.setText(C),v?(e.replaceSelections(S),w=i(x.line+p.length-1,x.ch),e.setCursor(x),ue(e,w),e.replaceSelections(p),f=x):r.visualBlock?(e.replaceSelections(S),e.setCursor(x),e.replaceRange(p,x,x),f=x):(e.replaceRange(p,x,w),f=e.posFromIndex(e.indexFromPos(x)+p.length-1)),b&&(r.lastSelection.headMark=e.setBookmark(b)),g&&(f.ch=0)}else if(v){for(e.setCursor(n),y=0;y<p.length;y++){var A=n.line+y;A>e.lastLine()&&e.replaceRange("\n",i(A,0)),se(e,A)<n.ch&&ce(e,A,n.ch)}e.setCursor(n),ue(e,i(n.line+p.length-1,n.ch)),e.replaceSelections(p),f=n}else e.replaceRange(p,n),g&&t.after?f=i(n.line+1,ge(e.getLine(n.line+1))):g&&!t.after?f=i(n.line,ge(e.getLine(n.line))):!g&&t.after?(m=e.indexFromPos(n),f=e.posFromIndex(m+p.length-1)):(m=e.indexFromPos(n),f=e.posFromIndex(m+p.length));r.visualMode&&me(e,!1),e.setCursor(f)}},undo:function(t,r){t.operation((function(){ee(t,e.commands.undo,r.repeat)(),t.setCursor(t.getCursor("anchor"))}))},redo:function(t,r){ee(t,e.commands.redo,r.repeat)()},setRegister:function(e,t,r){r.inputState.registerName=t.selectedCharacter},setMark:function(e,t,r){Se(e,r,t.selectedCharacter,e.getCursor())},replace:function(t,r,n){var o,a,s=r.selectedCharacter,l=t.getCursor(),c=t.listSelections();if(n.visualMode)l=t.getCursor("start"),a=t.getCursor("end");else{var u=t.getLine(l.line);(o=l.ch+r.repeat)>u.length&&(o=u.length),a=i(l.line,o)}if("\n"==s)n.visualMode||t.replaceRange("",l,a),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(t);else{var d=t.getRange(l,a);if(d=d.replace(/[^\n]/g,s),n.visualBlock){var h=new Array(t.getOption("tabSize")+1).join(" ");d=(d=t.getSelection()).replace(/\t/g,h).replace(/[^\n]/g,s).split("\n"),t.replaceSelections(d)}else t.replaceRange(d,l,a);n.visualMode?(l=ne(c[0].anchor,c[0].head)?c[0].anchor:c[0].head,t.setCursor(l),me(t,!1)):t.setCursor(Y(a,0,-1))}},incrementNumberToken:function(e,t){for(var r,n,o,a,s=e.getCursor(),l=e.getLine(s.line),c=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(r=c.exec(l))&&(o=(n=r.index)+r[0].length,!(s.ch<o)););if((t.backtrack||!(o<=s.ch))&&r){var u=r[2]||r[4],d=r[3]||r[5],h=t.increase?1:-1,p={"0b":2,0:8,"":10,"0x":16}[u.toLowerCase()];a=(parseInt(r[1]+d,p)+h*t.repeat).toString(p);var f=u?new Array(d.length-a.length+1+r[1].length).join("0"):"";a="-"===a.charAt(0)?"-"+u+f+a.substr(1):u+f+a;var m=i(s.line,n),g=i(s.line,o);e.replaceRange(a,m,g),e.setCursor(i(s.line,n+a.length-1))}},repeatLastEdit:function(e,t,r){if(r.lastEditInputState){var n=t.repeat;n&&t.repeatIsExplicit?r.lastEditInputState.repeatOverride=n:n=r.lastEditInputState.repeatOverride||n,ot(e,r,n,!1)}},indent:function(e,t){e.indentLine(e.getCursor().line,t.indentRight)},exitInsertMode:Xe};function X(e,t){var r=e.state.vim,n=r.insertMode||r.visualMode,o=Math.min(Math.max(e.firstLine(),t.line),e.lastLine()),a=se(e,o)-1+!!n,s=Math.min(Math.max(0,t.ch),a);return i(o,s)}function J(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function Y(e,t,r){return"object"==typeof t&&(r=t.ch,t=t.line),i(e.line+t,e.ch+r)}function Q(e,t){if("<character>"==t.slice(-11)){var r=t.length-11,n=e.slice(0,r),i=t.slice(0,r);return n==i&&e.length>r?"full":0==i.indexOf(n)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function ee(e,t,r){return function(){for(var n=0;n<r;n++)t(e)}}function te(e){return i(e.line,e.ch)}function re(e,t){return e.ch==t.ch&&e.line==t.line}function ne(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function ie(e,t){return arguments.length>2&&(t=ie.apply(void 0,Array.prototype.slice.call(arguments,1))),ne(e,t)?e:t}function oe(e,t){return arguments.length>2&&(t=oe.apply(void 0,Array.prototype.slice.call(arguments,1))),ne(e,t)?t:e}function ae(e,t,r){var n=ne(e,t),i=ne(t,r);return n&&i}function se(e,t){return e.getLine(t).length}function le(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function ce(e,t,r){var n=se(e,t),o=new Array(r-n+1).join(" ");e.setCursor(i(t,n)),e.replaceRange(o,e.getCursor())}function ue(e,t){var r=[],n=e.listSelections(),o=te(e.clipPos(t)),a=!re(t,o),s=function(e,t,r){for(var n=0;n<e.length;n++){var i="head"!=r&&re(e[n].anchor,t),o="anchor"!=r&&re(e[n].head,t);if(i||o)return n}return-1}(n,e.getCursor("head")),l=re(n[s].head,n[s].anchor),c=n.length-1,u=c-s>s?c:0,d=n[u].anchor,h=Math.min(d.line,o.line),p=Math.max(d.line,o.line),f=d.ch,m=o.ch,g=n[u].head.ch-f,v=m-f;g>0&&v<=0?(f++,a||m--):g<0&&v>=0?(f--,l||m++):g<0&&-1==v&&(f--,m++);for(var y=h;y<=p;y++){var b={anchor:new i(y,f),head:new i(y,m)};r.push(b)}return e.setSelections(r),t.ch=m,d.ch=f,d}function de(e,t,r){for(var n=[],i=0;i<r;i++){var o=Y(t,i,0);n.push({anchor:o,head:o})}e.setSelections(n,0)}function he(e,t){var r=t.sel.anchor,n=t.sel.head;t.lastPastedText&&(n=e.posFromIndex(e.indexFromPos(r)+t.lastPastedText.length),t.lastPastedText=null),t.lastSelection={anchorMark:e.setBookmark(r),headMark:e.setBookmark(n),anchor:te(r),head:te(n),visualMode:t.visualMode,visualLine:t.visualLine,visualBlock:t.visualBlock}}function pe(e,t,r){var n=e.state.vim,i=fe(e,t=t||n.sel,r=r||n.visualLine?"line":n.visualBlock?"block":"char");e.setSelections(i.ranges,i.primary),tt(e)}function fe(e,t,r,n){var o=te(t.head),a=te(t.anchor);if("char"==r){var s=n||ne(t.head,t.anchor)?0:1,l=ne(t.head,t.anchor)?1:0;return o=Y(t.head,0,s),{ranges:[{anchor:a=Y(t.anchor,0,l),head:o}],primary:0}}if("line"==r){if(ne(t.head,t.anchor))o.ch=0,a.ch=se(e,a.line);else{a.ch=0;var c=e.lastLine();o.line>c&&(o.line=c),o.ch=se(e,o.line)}return{ranges:[{anchor:a,head:o}],primary:0}}if("block"==r){for(var u=Math.min(a.line,o.line),d=Math.min(a.ch,o.ch),h=Math.max(a.line,o.line),p=Math.max(a.ch,o.ch)+1,f=h-u+1,m=o.line==u?0:f-1,g=[],v=0;v<f;v++)g.push({anchor:i(u+v,d),head:i(u+v,p)});return{ranges:g,primary:m}}}function me(t,r){var n=t.state.vim;!1!==r&&t.setCursor(X(t,n.sel.head)),he(t,n),n.visualMode=!1,n.visualLine=!1,n.visualBlock=!1,n.insertMode||e.signal(t,"vim-mode-change",{mode:"normal"}),rt(n)}function ge(e){if(!e)return 0;var t=e.search(/\S/);return-1==t?e.length:t}function ve(e,t,r,n,o){for(var a=function(e){var t=e.getCursor("head");return 1==e.getSelection().length&&(t=ie(t,e.getCursor("anchor"))),t}(e),s=e.getLine(a.line),l=a.ch,c=o?f[0]:m[0];!c(s.charAt(l));)if(++l>=s.length)return null;n?c=m[0]:(c=f[0])(s.charAt(l))||(c=f[1]);for(var u=l,d=l;c(s.charAt(u))&&u<s.length;)u++;for(;c(s.charAt(d))&&d>=0;)d--;if(d++,t){for(var h=u;/\s/.test(s.charAt(u))&&u<s.length;)u++;if(h==u){for(var p=d;/\s/.test(s.charAt(d-1))&&d>0;)d--;d||(d=p)}}return{start:i(a.line,d),end:i(a.line,u)}}function ye(e,t,r){re(t,r)||F.jumpList.add(e,t,r)}function be(e,t){F.lastCharacterSearch.increment=e,F.lastCharacterSearch.forward=t.forward,F.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var ke={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},xe={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function we(e,t,r,n,i){var o=t.line,a=t.ch,s=e.getLine(o),l=r?1:-1,c=n?m:f;if(i&&""==s){if(o+=l,s=e.getLine(o),!w(e,o))return null;a=r?0:s.length}for(;;){if(i&&""==s)return{from:0,to:0,line:o};for(var u=l>0?s.length:-1,d=u,h=u;a!=u;){for(var p=!1,g=0;g<c.length&&!p;++g)if(c[g](s.charAt(a))){for(d=a;a!=u&&c[g](s.charAt(a));)a+=l;if(p=d!=(h=a),d==t.ch&&o==t.line&&h==d+l)continue;return{from:Math.min(d,h+1),to:Math.max(d,h),line:o}}p||(a+=l)}if(!w(e,o+=l))return null;s=e.getLine(o),a=l>0?0:s.length}}function Ce(e,t,r,n,o){var a=i(t.line+r.repeat-1,1/0),s=e.clipPos(a);return s.ch--,o||(n.lastHPos=1/0,n.lastHSPos=e.charCoords(s,"div").left),a}function _e(e,t,r,n){for(var o,a=e.getCursor(),s=a.ch,l=0;l<t;l++){if(-1==(o=Ae(s,e.getLine(a.line),n,r,!0)))return null;s=o}return i(e.getCursor().line,o)}function Se(e,t,r,n){L(r,k)&&(t.marks[r]&&t.marks[r].clear(),t.marks[r]=e.setBookmark(n))}function Ae(e,t,r,n,i){var o;return n?-1==(o=t.indexOf(r,e+1))||i||(o-=1):-1==(o=t.lastIndexOf(r,e-1))||i||(o+=1),o}function Le(e,t,r,n,o){var a,s=t.line,l=e.firstLine(),c=e.lastLine(),u=s;function d(t){return!e.getLine(t)}function h(e,t,r){return r?d(e)!=d(e+t):!d(e)&&d(e+t)}if(n){for(;l<=u&&u<=c&&r>0;)h(u,n)&&r--,u+=n;return new i(u,0)}var p=e.state.vim;if(p.visualLine&&h(s,1,!0)){var f=p.sel.anchor;h(f.line,-1,!0)&&(o&&f.line==s||(s+=1))}var m=d(s);for(u=s;u<=c&&r;u++)h(u,1,!0)&&(o&&d(u)==m||r--);for(a=new i(u,0),u>c&&!m?m=!0:o=!1,u=s;u>l&&(o&&d(u)!=m&&u!=s||!h(u,-1,!0));u--);return{start:new i(u,0),end:a}}function Me(){}function Te(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new Me)}function Ee(e,t){var r=De(e,t)||[];if(!r.length)return[];var n=[];if(0===r[0]){for(var i=0;i<r.length;i++)"number"==typeof r[i]&&n.push(e.substring(r[i]+1,r[i+1]));return n}}function De(e,t){t||(t="/");for(var r=!1,n=[],i=0;i<e.length;i++){var o=e.charAt(i);r||o!=t||n.push(i),r=!r&&"\\"==o}return n}T("pcre",!0,"boolean"),Me.prototype={getQuery:function(){return F.query},setQuery:function(e){F.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return F.isReversed},setReversed:function(e){F.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var Fe={"\\n":"\n","\\r":"\r","\\t":"\t"};var Ne={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t","\\&":"&"};function Ie(e,t,r){if(F.registerController.getRegister("/").setText(e),e instanceof RegExp)return e;var n,i,o=De(e,"/");return o.length?(n=e.substring(0,o[0]),i=-1!=e.substring(o[0]).indexOf("i")):n=e,n?(D("pcre")||(n=function(e){for(var t=!1,r=[],n=-1;n<e.length;n++){var i=e.charAt(n)||"",o=e.charAt(n+1)||"",a=o&&-1!="|(){".indexOf(o);t?("\\"===i&&a||r.push(i),t=!1):"\\"===i?(t=!0,o&&-1!="}".indexOf(o)&&(a=!0),a&&"\\"!==o||r.push(i)):(r.push(i),a&&"\\"!==o&&r.push("\\"))}return r.join("")}(n)),r&&(t=/^[^A-Z]*$/.test(n)),new RegExp(n,t||i?"i":void 0)):null}function Oe(e,t){e.openNotification?e.openNotification('<span style="color: red">'+t+"</span>",{bottom:!0,duration:5e3}):alert(t)}var Re="(Javascript regexp)";function je(e,t){var r,n,i,o=(t.prefix||"")+" "+(t.desc||"");!function(e,t,r,n,i){e.openDialog?e.openDialog(t,n,{bottom:!0,value:i.value,onKeyDown:i.onKeyDown,onKeyUp:i.onKeyUp,selectValueOnOpen:!1}):n(prompt(r,""))}(e,(r=t.prefix,n=t.desc,i='<span style="font-family: monospace; white-space: pre">'+(r||"")+'<input type="text" autocorrect="off" autocapitalize="off" spellcheck="false"></span>',n&&(i+=' <span style="color: #888">'+n+"</span>"),i),o,t.onClose,t)}function ze(e,t,r,n){if(t){var i=Te(e),o=Ie(t,!!r,!!n);if(o)return Pe(e,o),function(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var r=["global","multiline","ignoreCase","source"],n=0;n<r.length;n++){var i=r[n];if(e[i]!==t[i])return!1}return!0}return!1}(o,i.getQuery())||i.setQuery(o),o}}var Be=0;function Pe(e,t){clearTimeout(Be),Be=setTimeout((function(){var r=Te(e),n=r.getOverlay();n&&t==n.query||(n&&e.removeOverlay(n),n=function(e){if("^"==e.source.charAt(0))var t=!0;return{token:function(r){if(!t||r.sol()){var n=r.match(e,!1);if(n)return 0==n[0].length?(r.next(),"searching"):r.sol()||(r.backUp(1),e.exec(r.next()+n[0]))?(r.match(e),"searching"):(r.next(),null);for(;!r.eol()&&(r.next(),!r.match(e,!1)););}else r.skipToEnd()},query:e}}(t),e.addOverlay(n),e.showMatchesOnScrollbar&&(r.getScrollbarAnnotate()&&r.getScrollbarAnnotate().clear(),r.setScrollbarAnnotate(e.showMatchesOnScrollbar(t))),r.setOverlay(n))}),50)}function qe(e,t,r,n){return void 0===n&&(n=1),e.operation((function(){for(var o=e.getCursor(),a=e.getSearchCursor(r,o),s=0;s<n;s++){var l=a.find(t);if(0==s&&l&&re(a.from(),o)&&(l=a.find(t)),!l&&!(a=e.getSearchCursor(r,t?i(e.lastLine()):i(e.firstLine(),0))).find(t))return}return a.from()}))}function He(e){var t=Te(e);e.removeOverlay(Te(e).getOverlay()),t.setOverlay(null),t.getScrollbarAnnotate()&&(t.getScrollbarAnnotate().clear(),t.setScrollbarAnnotate(null))}function We(e,t,r){return"number"!=typeof e&&(e=e.line),t instanceof Array?L(e,t):r?e>=t&&e<=r:e==t}function Ue(e){var t=e.getScrollInfo(),r=e.coordsChar({left:0,top:6+t.top},"local"),n=t.clientHeight-10+t.top,i=e.coordsChar({left:0,top:n},"local");return{top:r.line,bottom:i.line}}function $e(e,t,r){if("'"==r||"`"==r)return F.jumpList.find(e,-1)||i(0,0);if("."==r)return Ve(e);var n=t.marks[r];return n&&n.find()}function Ve(e){for(var t=e.doc.history.done,r=t.length;r--;)if(t[r].changes)return te(t[r].changes[0].to)}var Ke=function(){this.buildCommandMap_()};Ke.prototype={processCommand:function(e,t,r){var n=this;e.operation((function(){e.curOp.isVimOp=!0,n._processCommand(e,t,r)}))},_processCommand:function(t,r,n){var i=t.state.vim,o=F.registerController.getRegister(":"),a=o.toString();i.visualMode&&me(t);var s=new e.StringStream(r);o.setText(r);var l,c,u=n||{};u.input=r;try{this.parseInput_(t,s,u)}catch(e){throw Oe(t,e),e}if(u.commandName){if(l=this.matchCommand_(u.commandName)){if(c=l.name,l.excludeFromCommandHistory&&o.setText(a),this.parseCommandArgs_(s,u,l),"exToKey"==l.type){for(var d=0;d<l.toKeys.length;d++)e.Vim.handleKey(t,l.toKeys[d],"mapping");return}if("exToEx"==l.type)return void this.processCommand(t,l.toInput)}}else void 0!==u.line&&(c="move");if(c)try{Ge[c](t,u),l&&l.possiblyAsync||!u.callback||u.callback()}catch(e){throw Oe(t,e),e}else Oe(t,'Not an editor command ":'+r+'"')},parseInput_:function(e,t,r){t.eatWhile(":"),t.eat("%")?(r.line=e.firstLine(),r.lineEnd=e.lastLine()):(r.line=this.parseLineSpec_(e,t),void 0!==r.line&&t.eat(",")&&(r.lineEnd=this.parseLineSpec_(e,t)));var n=t.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return r.commandName=n?n[1]:t.match(/.*/)[0],r},parseLineSpec_:function(e,t){var r=t.match(/^(\d+)/);if(r)return parseInt(r[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var n=t.next(),i=$e(e,e.state.vim,n);if(!i)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,i.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return void t.backUp(1)}},parseLineSpecOffset_:function(e,t){var r=e.match(/^([+-])?(\d+)/);if(r){var n=parseInt(r[2],10);"-"==r[1]?t-=n:t+=n}return t},parseCommandArgs_:function(e,t,r){if(!e.eol()){t.argString=e.match(/.*/)[0];var n=r.argDelimiter||/\s+/,i=le(t.argString).split(n);i.length&&i[0]&&(t.args=i)}},matchCommand_:function(e){for(var t=e.length;t>0;t--){var r=e.substring(0,t);if(this.commandMap_[r]){var n=this.commandMap_[r];if(0===n.name.indexOf(e))return n}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e<n.length;e++){var t=n[e],r=t.shortName||t.name;this.commandMap_[r]=t}},map:function(e,r,n){if(":"!=e&&":"==e.charAt(0)){if(n)throw Error("Mode not supported for ex mappings");var i=e.substring(1);":"!=r&&":"==r.charAt(0)?this.commandMap_[i]={name:i,type:"exToEx",toInput:r.substring(1),user:!0}:this.commandMap_[i]={name:i,type:"exToKey",toKeys:r,user:!0}}else if(":"!=r&&":"==r.charAt(0)){var o={keys:e,type:"keyToEx",exArgs:{input:r.substring(1)}};n&&(o.context=n),t.unshift(o)}else o={keys:e,type:"keyToKey",toKeys:r},n&&(o.context=n),t.unshift(o)},unmap:function(e,r){if(":"!=e&&":"==e.charAt(0)){if(r)throw Error("Mode not supported for ex mappings");var n=e.substring(1);if(this.commandMap_[n]&&this.commandMap_[n].user)return void delete this.commandMap_[n]}else for(var i=e,o=0;o<t.length;o++)if(i==t[o].keys&&t[o].context===r)return void t.splice(o,1);throw Error("No such mapping.")}};var Ge={colorscheme:function(e,t){!t.args||t.args.length<1?Oe(e,e.getOption("theme")):e.setOption("theme",t.args[0])},map:function(e,t,r){var n=t.args;!n||n.length<2?e&&Oe(e,"Invalid mapping: "+t.input):Ze.map(n[0],n[1],r)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},unmap:function(e,t,r){var n=t.args;!n||n.length<1?e&&Oe(e,"No such mapping: "+t.input):Ze.unmap(n[0],r)},move:function(e,t){$.processCommand(e,e.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var r=t.args,n=t.setCfg||{};if(!r||r.length<1)e&&Oe(e,"Invalid mapping: "+t.input);else{var i=r[0].split("="),o=i[0],a=i[1],s=!1;if("?"==o.charAt(o.length-1)){if(a)throw Error("Trailing characters: "+t.argString);o=o.substring(0,o.length-1),s=!0}void 0===a&&"no"==o.substring(0,2)&&(o=o.substring(2),a=!1);var l=M[o]&&"boolean"==M[o].type;if(l&&null==a&&(a=!0),!l&&void 0===a||s){var c=D(o,e,n);c instanceof Error?Oe(e,c.message):Oe(e,!0===c||!1===c?" "+(c?"":"no")+o:" "+o+"="+c)}else{var u=E(o,a,e,n);u instanceof Error&&Oe(e,u.message)}}},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,t){var r=t.args,n=F.registerController.registers,i="----------Registers----------<br><br>";if(r){r=r.join("");for(var o=0;o<r.length;o++)a=r.charAt(o),F.registerController.isValidRegister(a)&&(i+='"'+a+" "+(n[a]||new H).toString()+"<br>")}else for(var a in n){var s=n[a].toString();s.length&&(i+='"'+a+" "+s+"<br>")}Oe(e,i)},sort:function(t,r){var n,o,a,s,l;var c=function(){if(r.argString){var t=new e.StringStream(r.argString);if(t.eat("!")&&(n=!0),t.eol())return;if(!t.eatSpace())return"Invalid arguments";var i=t.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!i&&!t.eol())return"Invalid arguments";if(i[1]){o=-1!=i[1].indexOf("i"),a=-1!=i[1].indexOf("u");var c=-1!=i[1].indexOf("d")||-1!=i[1].indexOf("n")&&1,u=-1!=i[1].indexOf("x")&&1,d=-1!=i[1].indexOf("o")&&1;if(c+u+d>1)return"Invalid arguments";s=(c?"decimal":u&&"hex")||d&&"octal"}i[2]&&(l=new RegExp(i[2].substr(1,i[2].length-2),o?"i":""))}}();if(c)Oe(t,c+": "+r.argString);else{var u=r.line||t.firstLine(),d=r.lineEnd||r.line||t.lastLine();if(u!=d){var h=i(u,0),p=i(d,se(t,d)),f=t.getRange(h,p).split("\n"),m=l||("decimal"==s?/(-?)([\d]+)/:"hex"==s?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==s?/([0-7]+)/:null),g="decimal"==s?10:"hex"==s?16:"octal"==s?8:null,v=[],y=[];if(s||l)for(var b=0;b<f.length;b++){var k=l?f[b].match(l):null;k&&""!=k[0]?v.push(k):!l&&m.exec(f[b])?v.push(f[b]):y.push(f[b])}else y=f;if(v.sort(l?function(e,t){var r;return n&&(r=e,e=t,t=r),o&&(e[0]=e[0].toLowerCase(),t[0]=t[0].toLowerCase()),e[0]<t[0]?-1:1}:C),l)for(b=0;b<v.length;b++)v[b]=v[b].input;else s||y.sort(C);if(f=n?v.concat(y):y.concat(v),a){var x,w=f;for(f=[],b=0;b<w.length;b++)w[b]!=x&&f.push(w[b]),x=w[b]}t.replaceRange(f.join("\n"),h,p)}}function C(e,t){var r;n&&(r=e,e=t,t=r),o&&(e=e.toLowerCase(),t=t.toLowerCase());var i=s&&m.exec(e),a=s&&m.exec(t);return i?(i=parseInt((i[1]+i[2]).toLowerCase(),g))-(a=parseInt((a[1]+a[2]).toLowerCase(),g)):e<t?-1:1}},global:function(e,t){var r=t.argString;if(r){var n,i=void 0!==t.line?t.line:e.firstLine(),o=t.lineEnd||t.line||e.lastLine(),a=function(e){return Ee(e,"/")}(r),s=r;if(a.length&&(s=a[0],n=a.slice(1,a.length).join("/")),s)try{ze(e,s,!0,!0)}catch(t){return void Oe(e,"Invalid regex: "+s)}for(var l=Te(e).getQuery(),c=[],u="",d=i;d<=o;d++)l.test(e.getLine(d))&&(c.push(d+1),u+=e.getLine(d)+"<br>");if(n){var h=0,p=function(){if(h<c.length){var t=c[h]+n;Ze.processCommand(e,t,{callback:p})}h++};p()}else Oe(e,u)}else Oe(e,"Regular Expression missing from global")},substitute:function(t,r){if(!t.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var n,o,a,s,l=r.argString,c=l?Ee(l,l[0]):[],u="",d=!1,h=!1;if(c.length)n=c[0],D("pcre")&&""!==n&&(n=new RegExp(n).source),u=c[1],n&&"$"===n[n.length-1]&&(n=n.slice(0,n.length-1)+"\\n",u=u?u+"\n":"\n"),void 0!==u&&(u=D("pcre")?function(t){for(var r=new e.StringStream(t),n=[];!r.eol();){for(;r.peek()&&"\\"!=r.peek();)n.push(r.next());var i=!1;for(var o in Ne)if(r.match(o,!0)){i=!0,n.push(Ne[o]);break}i||n.push(r.next())}return n.join("")}(u.replace(/([^\\])&/g,"$1$$&")):function(e){for(var t=!1,r=[],n=-1;n<e.length;n++){var i=e.charAt(n)||"",o=e.charAt(n+1)||"";Fe[i+o]?(r.push(Fe[i+o]),n++):t?(r.push(i),t=!1):"\\"===i?(t=!0,a=o,p.test(a)||"$"===o?r.push("$"):"/"!==o&&"\\"!==o&&r.push("\\")):("$"===i&&r.push("$"),r.push(i),"/"===o&&r.push("\\"))}var a;return r.join("")}(u),F.lastSubstituteReplacePart=u),o=c[2]?c[2].split(" "):[];else if(l&&l.length)return void Oe(t,"Substitutions should be of the form :s/pattern/replace/");if(o&&(a=o[0],s=parseInt(o[1]),a&&(-1!=a.indexOf("c")&&(d=!0,a.replace("c","")),-1!=a.indexOf("g")&&(h=!0,a.replace("g","")),n=D("pcre")?n+"/"+a:n.replace(/\//g,"\\/")+"/"+a)),n)try{ze(t,n,!0,!0)}catch(e){return void Oe(t,"Invalid regex: "+n)}if(void 0!==(u=u||F.lastSubstituteReplacePart)){var f=Te(t).getQuery(),m=void 0!==r.line?r.line:t.getCursor().line,g=r.lineEnd||m;m==t.firstLine()&&g==t.lastLine()&&(g=1/0),s&&(g=(m=g)+s-1);var v=X(t,i(m,0)),y=t.getSearchCursor(f,v);!function(t,r,n,i,o,a,s,l,c){t.state.vim.exMode=!0;var u=!1,d=a.from();function h(){t.operation((function(){for(;!u;)p(),f();m()}))}function p(){var e=t.getRange(a.from(),a.to()).replace(s,l);a.replace(e)}function f(){for(;a.findNext()&&We(a.from(),i,o);)if(n||!d||a.from().line!=d.line)return t.scrollIntoView(a.from(),30),t.setSelection(a.from(),a.to()),d=a.from(),void(u=!1);u=!0}function m(e){if(e&&e(),t.focus(),d){t.setCursor(d);var r=t.state.vim;r.exMode=!1,r.lastHPos=r.lastHSPos=d.ch}c&&c()}function g(r,n,i){switch(e.e_stop(r),e.keyName(r)){case"Y":p(),f();break;case"N":f();break;case"A":var o=c;c=void 0,t.operation(h),c=o;break;case"L":p();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":m(i)}return u&&m(i),!0}if(f(),!u)return r?void je(t,{prefix:"replace with <strong>"+l+"</strong> (y/n/a/q/l)",onKeyDown:g}):(h(),void(c&&c()));Oe(t,"No matches for "+s.source)}(t,d,h,m,g,y,f,u,r.callback)}else Oe(t,"No previous substitute regular expression")},redo:e.commands.redo,undo:e.commands.undo,write:function(t){e.commands.save?e.commands.save(t):t.save&&t.save()},nohlsearch:function(e){He(e)},yank:function(e){var t=te(e.getCursor()).line,r=e.getLine(t);F.registerController.pushText("0","yank",r,!0,!0)},delmarks:function(t,r){if(r.argString&&le(r.argString))for(var n=t.state.vim,i=new e.StringStream(le(r.argString));!i.eol();){i.eatSpace();var o=i.pos;if(!i.match(/[a-zA-Z]/,!1))return void Oe(t,"Invalid argument: "+r.argString.substring(o));var a=i.next();if(i.match("-",!0)){if(!i.match(/[a-zA-Z]/,!1))return void Oe(t,"Invalid argument: "+r.argString.substring(o));var s=a,l=i.next();if(!(C(s)&&C(l)||_(s)&&_(l)))return void Oe(t,"Invalid argument: "+s+"-");var c=s.charCodeAt(0),u=l.charCodeAt(0);if(c>=u)return void Oe(t,"Invalid argument: "+r.argString.substring(o));for(var d=0;d<=u-c;d++){var h=String.fromCharCode(c+d);delete n.marks[h]}}else delete n.marks[a]}else Oe(t,"Argument required")}},Ze=new Ke;function Xe(t){var r=t.state.vim,n=F.macroModeState,i=F.registerController.getRegister("."),o=n.isPlaying,a=n.lastInsertModeChanges;o||(t.off("change",Qe),e.off(t.getInputField(),"keydown",it)),!o&&r.insertModeRepeat>1&&(ot(t,r,r.insertModeRepeat-1,!0),r.lastEditInputState.repeatOverride=r.insertModeRepeat),delete r.insertModeRepeat,r.insertMode=!1,t.setCursor(t.getCursor().line,t.getCursor().ch-1),t.setOption("keyMap","vim"),t.setOption("disableInput",!0),t.toggleOverwrite(!1),i.setText(a.changes.join("")),e.signal(t,"vim-mode-change",{mode:"normal"}),n.isRecording&&function(e){if(!e.isPlaying){var t=e.latestRegister,r=F.registerController.getRegister(t);r&&r.pushInsertModeChanges&&r.pushInsertModeChanges(e.lastInsertModeChanges)}}(n)}function Je(e){t.unshift(e)}function Ye(t,r,n,i){var o=F.registerController.getRegister(i);if(":"==i)return o.keyBuffer[0]&&Ze.processCommand(t,o.keyBuffer[0]),void(n.isPlaying=!1);var a=o.keyBuffer,s=0;n.isPlaying=!0,n.replaySearchQueries=o.searchQueries.slice(0);for(var l=0;l<a.length;l++)for(var c,u,d=a[l];d;)if(u=(c=/<\w+-.+?>|<\w+>|./.exec(d))[0],d=d.substring(c.index+u.length),e.Vim.handleKey(t,u,"macro"),r.insertMode){var h=o.insertModeChanges[s++].changes;F.macroModeState.lastInsertModeChanges.changes=h,at(t,h,1),Xe(t)}n.isPlaying=!1}function Qe(e,t){var r=F.macroModeState,n=r.lastInsertModeChanges;if(!r.isPlaying)for(;t;){if(n.expectCursorActivityForChange=!0,n.ignoreCount>1)n.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||void 0===t.origin){var i=e.listSelections().length;i>1&&(n.ignoreCount=i);var o=t.text.join("\n");n.maybeReset&&(n.changes=[],n.maybeReset=!1),o&&(e.state.overwrite&&!/\n/.test(o)?n.changes.push([o]):n.changes.push(o))}t=t.next}}function et(t){var r=t.state.vim;if(r.insertMode){var n=F.macroModeState;if(n.isPlaying)return;var i=n.lastInsertModeChanges;i.expectCursorActivityForChange?i.expectCursorActivityForChange=!1:i.maybeReset=!0}else t.curOp.isVimOp||function(t,r){var n=t.getCursor("anchor"),i=t.getCursor("head");if(r.visualMode&&!t.somethingSelected()?me(t,!1):r.visualMode||r.insertMode||!t.somethingSelected()||(r.visualMode=!0,r.visualLine=!1,e.signal(t,"vim-mode-change",{mode:"visual"})),r.visualMode){var o=ne(i,n)?0:-1,a=ne(i,n)?-1:0;i=Y(i,0,o),n=Y(n,0,a),r.sel={anchor:n,head:i},Se(t,r,"<",ie(i,n)),Se(t,r,">",oe(i,n))}else r.insertMode||(r.lastHPos=t.getCursor().ch)}(t,r);r.visualMode&&tt(t)}function tt(e){var t="cm-animate-fat-cursor",r=e.state.vim,n=X(e,te(r.sel.head)),i=Y(n,0,1);if(rt(r),n.ch==e.getLine(n.line).length){var o=document.createElement("span");o.textContent=" ",o.className=t,r.fakeCursorBookmark=e.setBookmark(n,{widget:o})}else r.fakeCursor=e.markText(n,i,{className:t})}function rt(e){e.fakeCursor&&(e.fakeCursor.clear(),e.fakeCursor=null),e.fakeCursorBookmark&&(e.fakeCursorBookmark.clear(),e.fakeCursorBookmark=null)}function nt(e){this.keyName=e}function it(t){var r=F.macroModeState.lastInsertModeChanges,n=e.keyName(t);n&&(-1==n.indexOf("Delete")&&-1==n.indexOf("Backspace")||e.lookupKey(n,"vim-insert",(function(){return r.maybeReset&&(r.changes=[],r.maybeReset=!1),r.changes.push(new nt(n)),!0})))}function ot(e,t,r,n){var i=F.macroModeState;i.isPlaying=!0;var o=!!t.lastEditActionCommand,a=t.inputState;function s(){o?$.processAction(e,t,t.lastEditActionCommand):$.evalInput(e,t)}function l(r){if(i.lastInsertModeChanges.changes.length>0){r=t.lastEditActionCommand?r:1;var n=i.lastInsertModeChanges;at(e,n.changes,r)}}if(t.inputState=t.lastEditInputState,o&&t.lastEditActionCommand.interlaceInsertRepeat)for(var c=0;c<r;c++)s(),l(1);else n||s(),l(r);t.inputState=a,t.insertMode&&!n&&Xe(e),i.isPlaying=!1}function at(t,r,n){function i(r){return"string"==typeof r?e.commands[r](t):r(t),!0}var o=t.getCursor("head"),a=F.macroModeState.lastInsertModeChanges.visualBlock;a&&(de(t,o,a+1),n=t.listSelections().length,t.setCursor(o));for(var s=0;s<n;s++){a&&t.setCursor(Y(o,s,0));for(var l=0;l<r.length;l++){var c=r[l];if(c instanceof nt)e.lookupKey(c.keyName,"vim-insert",i);else if("string"==typeof c){var u=t.getCursor();t.replaceRange(c,u,u)}else{var d=t.getCursor(),h=Y(d,0,c[0].length);t.replaceRange(c[0],d,h)}}}a&&t.setCursor(Y(o,0,1))}return e.keyMap.vim={attach:a,detach:o,call:c},T("insertModeEscKeysTimeout",200,"number"),e.keyMap["vim-insert"]={fallthrough:["default"],attach:a,detach:o,call:c},e.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:a,detach:o,call:c},z(),B}()}(r("./node_modules/codemirror/lib/codemirror.js"),r("./node_modules/codemirror/addon/search/searchcursor.js"),r("./node_modules/codemirror/addon/dialog/dialog.js"),r("./node_modules/codemirror/addon/edit/matchbrackets.js"))},"./node_modules/codemirror/lib/codemirror.js":function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=n||i||o,s=a&&(n?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),f=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),k=/win/i.test(t),x=d&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,l=!0);var w=y&&(c||d&&(null==x||x<12.11)),C=r||a&&s>=9;function _(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,A=function(e,t){var r=e.className,n=_(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function L(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function M(e,t){return L(e).appendChild(t)}function T(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function E(e,t,r,n){var i=T(e,t,r,n);return i.setAttribute("role","presentation"),i}function D(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function F(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function N(e,t){var r=e.className;_(t).test(r)||(e.className+=(r?" ":"")+t)}function I(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!_(r[n]).test(t)&&(t+=" "+r[n]);return t}S=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var O=function(e){e.select()};function R(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function j(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function z(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=r-a%r,o=s+1}}m?O=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(O=function(e){try{e.select()}catch(e){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=R(this.onTimeout,this)};function P(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}B.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},B.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};var q={toString:function(){return"CodeMirror.Pass"}},H={scroll:!1},W={origin:"*mouse"},U={origin:"+move"};function $(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var V=[""];function K(e){for(;V.length<=e;)V.push(G(V)+" ");return V[e]}function G(e){return e[e.length-1]}function Z(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function X(){}function J(e,t){var r;return Object.create?r=Object.create(e):(X.prototype=e,r=new X),t&&j(t,r),r}var Y=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Q(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Y.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Q(e))||t.test(e):Q(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\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 ne(e){return e.charCodeAt(0)>=768&&re.test(e)}function ie(e,t,r){for(;(r<0?t>0:t<e.length)&&ne(e.charAt(t));)t+=r;return t}function oe(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}var ae=null;function se(e,t,r){var n;ae=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:ae=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:ae=i)}return null!=n?n:ae}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,r=/[LRr]/,n=/[Lb1n]/,i=/[1n]/;function o(e,t,r){this.level=e,this.from=t,this.to=r}return function(a,s){var l,c="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var u=a.length,d=[],h=0;h<u;++h)d.push((l=a.charCodeAt(h))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(l):1424<=l&&l<=1524?"R":1536<=l&&l<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(l-1536):1774<=l&&l<=2220?"r":8192<=l&&l<=8203?"w":8204==l?"b":"L");for(var p=0,f=c;p<u;++p){var m=d[p];"m"==m?d[p]=f:f=m}for(var g=0,v=c;g<u;++g){var y=d[g];"1"==y&&"r"==v?d[g]="n":r.test(y)&&(v=y,"r"==y&&(d[g]="R"))}for(var b=1,k=d[0];b<u-1;++b){var x=d[b];"+"==x&&"1"==k&&"1"==d[b+1]?d[b]="1":","!=x||k!=d[b+1]||"1"!=k&&"n"!=k||(d[b]=k),k=x}for(var w=0;w<u;++w){var C=d[w];if(","==C)d[w]="N";else if("%"==C){var _=void 0;for(_=w+1;_<u&&"%"==d[_];++_);for(var S=w&&"!"==d[w-1]||_<u&&"1"==d[_]?"1":"N",A=w;A<_;++A)d[A]=S;w=_-1}}for(var L=0,M=c;L<u;++L){var T=d[L];"L"==M&&"1"==T?d[L]="L":r.test(T)&&(M=T)}for(var E=0;E<u;++E)if(t.test(d[E])){var D=void 0;for(D=E+1;D<u&&t.test(d[D]);++D);for(var F="L"==(E?d[E-1]:c),N=F==("L"==(D<u?d[D]:c))?F?"L":"R":c,I=E;I<D;++I)d[I]=N;E=D-1}for(var O,R=[],j=0;j<u;)if(n.test(d[j])){var z=j;for(++j;j<u&&n.test(d[j]);++j);R.push(new o(0,z,j))}else{var B=j,P=R.length,q="rtl"==s?1:0;for(++j;j<u&&"L"!=d[j];++j);for(var H=B;H<j;)if(i.test(d[H])){B<H&&(R.splice(P,0,new o(1,B,H)),P+=q);var W=H;for(++H;H<j&&i.test(d[H]);++H);R.splice(P,0,new o(2,W,H)),P+=q,B=H}else++H;B<j&&R.splice(P,0,new o(1,B,j))}return"ltr"==s&&(1==R[0].level&&(O=a.match(/^\s+/))&&(R[0].from=O[0].length,R.unshift(new o(0,0,O[0].length))),1==G(R).level&&(O=a.match(/\s+$/))&&(G(R).to-=O[0].length,R.push(new o(0,u-O[0].length,u)))),"rtl"==s?R.reverse():R}}();function ce(e,t){var r=e.order;return null==r&&(r=e.order=le(e.text,t)),r}var ue=[],de=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||ue).concat(r)}};function he(e,t){return e._handlers&&e._handlers[t]||ue}function pe(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=P(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function fe(e,t){var r=he(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function me(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),fe(e,r||t.type,e,t),xe(t)||t.codemirrorIgnore}function ge(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==P(r,t[n])&&r.push(t[n])}function ve(e,t){return he(e,t).length>0}function ye(e){e.prototype.on=function(e,t){de(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function we(e){be(e),ke(e)}function Ce(e){return e.target||e.srcElement}function _e(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Se,Ae,Le=function(){if(a&&s<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}();function Me(e){if(null==Se){var t=T("span","");M(e,T("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Se=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var r=Se?T("span",""):T("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Te(e){if(null!=Ae)return Ae;var t=M(e,document.createTextNode("AخA")),r=S(t,0,1).getBoundingClientRect(),n=S(t,1,2).getBoundingClientRect();return L(e),!(!r||r.left==r.right)&&(Ae=n.right-r.right<3)}var Ee,De=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Fe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ne="oncopy"in(Ee=T("div"))||(Ee.setAttribute("oncopy","return;"),"function"==typeof Ee.oncopy),Ie=null;var Oe={},Re={};function je(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Oe[e]=t}function ze(e){if("string"==typeof e&&Re.hasOwnProperty(e))e=Re[e];else if(e&&"string"==typeof e.name&&Re.hasOwnProperty(e.name)){var t=Re[e.name];"string"==typeof t&&(t={name:t}),(e=J(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=ze(t);var r=Oe[t.name];if(!r)return Be(e,"text/plain");var n=r(e,t);if(Pe.hasOwnProperty(t.name)){var i=Pe[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)n[a]=t.modeProps[a];return n}var Pe={};function qe(e,t){j(t,Pe.hasOwnProperty(e)?Pe[e]:Pe[e]={})}function He(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function We(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ue(e,t,r){return!e.startState||e.startState(t,r)}var $e=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Ve(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function Ke(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,(function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i})),n}function Ge(e,t,r){var n=[];return e.iter(t,r,(function(e){n.push(e.text)})),n}function Ze(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function Xe(e){if(null==e.parent)return null;for(var t=e.parent,r=P(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function Je(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return r+a}function Ye(e,t){return t>=e.first&&t<e.first+e.size}function Qe(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function et(e,t,r){if(void 0===r&&(r=null),!(this instanceof et))return new et(e,t,r);this.line=e,this.ch=t,this.sticky=r}function tt(e,t){return e.line-t.line||e.ch-t.ch}function rt(e,t){return e.sticky==t.sticky&&0==tt(e,t)}function nt(e){return et(e.line,e.ch)}function it(e,t){return tt(e,t)<0?t:e}function ot(e,t){return tt(e,t)<0?e:t}function at(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function st(e,t){if(t.line<e.first)return et(e.first,0);var r=e.first+e.size-1;return t.line>r?et(r,Ve(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?et(e.line,t):r<0?et(e.line,0):e}(t,Ve(e,t.line).text.length)}function lt(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=st(e,t[n]);return r}$e.prototype.eol=function(){return this.pos>=this.string.length},$e.prototype.sol=function(){return this.pos==this.lineStart},$e.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},$e.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},$e.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},$e.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},$e.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},$e.prototype.skipToEnd=function(){this.pos=this.string.length},$e.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},$e.prototype.backUp=function(e){this.pos-=e},$e.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=z(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?z(this.string,this.lineStart,this.tabSize):0)},$e.prototype.indentation=function(){return z(this.string,null,this.tabSize)-(this.lineStart?z(this.string,this.lineStart,this.tabSize):0)},$e.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},$e.prototype.current=function(){return this.string.slice(this.start,this.pos)},$e.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},$e.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},$e.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,r,n){var i=[e.state.modeGen],o={};kt(e,t.text,e.doc.mode,r,(function(e,t){return i.push(e,t)}),o,n);for(var a=r.state,s=function(n){r.baseTokens=i;var s=e.state.overlays[n],l=1,c=0;r.state=!0,kt(e,t.text,s.mode,r,(function(e,t){for(var r=l;c<e;){var n=i[l];n>e&&i.splice(l,1,e,i[l+1],n),l+=2,c=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,l-r,e,"overlay "+t),l=r+2;else for(;r<l;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}}),o),r.state=a,r.baseTokens=null,r.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function ht(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=pt(e,Xe(t)),i=t.text.length>e.options.maxHighlightLength&&He(e.doc.mode,n.state),o=dt(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function pt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new ut(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Ve(o,s-1),c=l.stateAfter;if(c&&(!r||s+(c instanceof ct?c.lookAhead:0)<=o.modeFrontier))return s;var u=z(l.text,null,e.options.tabSize);(null==i||n>u)&&(i=s-1,n=u)}return i}(e,t,r),a=o>n.first&&Ve(n,o-1).stateAfter,s=a?ut.fromSaved(n,a,o):new ut(n,Ue(n.mode),o);return n.iter(o,t,(function(r){ft(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?s.save():null,s.nextLine()})),r&&(n.modeFrontier=s.line),s}function ft(e,t,r,n){var i=e.doc.mode,o=new $e(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&mt(i,r.state);!o.eol();)gt(i,o,r.state),o.start=o.pos}function mt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=We(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function gt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=We(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.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}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,r){return t instanceof ct?new ut(e,He(e.mode,t.state),r,t.lookAhead):new ut(e,He(e.mode,t),r)},ut.prototype.save=function(e){var t=!1!==e?He(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function yt(e,t,r,n){var i,o,a=e.doc,s=a.mode,l=Ve(a,(t=st(a,t)).line),c=pt(e,t.line,r),u=new $e(l.text,e.options.tabSize,c);for(n&&(o=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=gt(s,u,c.state),n&&o.push(new vt(u,i,He(a.mode,c.state)));return n?o:new vt(u,i,c.state)}function bt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|\\s)"+r[2]+"(?:$|\\s)").test(t[n])||(t[n]+=" "+r[2])}return e}function kt(e,t,r,n,i,o,a){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,d=new $e(t,e.options.tabSize,n),h=e.options.addModeClass&&[null];for(""==t&&bt(mt(r,n.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&ft(e,t,n,d.pos),d.pos=t.length,l=null):l=bt(gt(r,d,n.state,h),o),h){var p=h[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var f=Math.min(d.pos,c+5e3);i(f,u),c=f}}var xt=!1,wt=!1;function Ct(e,t,r){this.marker=e,this.from=t,this.to=r}function _t(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function St(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function At(e,t){if(t.full)return null;var r=Ye(e,t.from.line)&&Ve(e,t.from.line).markedSpans,n=Ye(e,t.to.line)&&Ve(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==tt(t.from,t.to),s=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Ct(a,o.from,s?null:o.to))}}return n}(r,i,a),l=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Ct(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,a),c=1==t.text.length,u=G(t.text).length+(c?i:0);if(s)for(var d=0;d<s.length;++d){var h=s[d];if(null==h.to){var p=_t(l,h.marker);p?c&&(h.to=null==p.to?null:p.to+u):h.to=i}}if(l)for(var f=0;f<l.length;++f){var m=l[f];null!=m.to&&(m.to+=u),null==m.from?_t(s,m.marker)||(m.from=u,c&&(s||(s=[])).push(m)):(m.from+=u,c&&(s||(s=[])).push(m))}s&&(s=Lt(s)),l&&l!=s&&(l=Lt(l));var g=[s];if(!c){var v,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(v||(v=[])).push(new Ct(s[b].marker,null,null));for(var k=0;k<y;++k)g.push(v);g.push(l)}return g}function Lt(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Mt(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Tt(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Et(e){return e.inclusiveLeft?-1:0}function Dt(e){return e.inclusiveRight?1:0}function Ft(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=tt(n.from,i.from)||Et(e)-Et(t);return o?-o:tt(n.to,i.to)||Dt(e)-Dt(t)||t.id-e.id}function Nt(e,t){var r,n=wt&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Ft(r,i.marker)<0)&&(r=i.marker);return r}function It(e){return Nt(e,!0)}function Ot(e){return Nt(e,!1)}function Rt(e,t){var r,n=wt&&e.markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!r||Ft(r,o.marker)<0)&&(r=o.marker)}return r}function jt(e,t,r,n,i){var o=Ve(e,t),a=wt&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=tt(c.from,r)||Et(l.marker)-Et(i),d=tt(c.to,n)||Dt(l.marker)-Dt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,r)>=0:tt(c.to,r)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,n)<=0:tt(c.from,n)<0)))return!0}}}function zt(e){for(var t;t=It(e);)e=t.find(-1,!0).line;return e}function Bt(e,t){var r=Ve(e,t),n=zt(r);return r==n?t:Xe(n)}function Pt(e,t){if(t>e.lastLine())return t;var r,n=Ve(e,t);if(!qt(e,n))return t;for(;r=Ot(n);)n=r.find(1,!0).line;return Xe(n)+1}function qt(e,t){var r=wt&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&Ht(e,t,n))return!0}}function Ht(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return Ht(e,n.line,_t(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&Ht(e,t,i))return!0}function Wt(e){for(var t=0,r=(e=zt(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;o=(r=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==r)break;t+=s.height}return t}function Ut(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=It(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=Ot(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function $t(e){var t=e.display,r=e.doc;t.maxLine=Ve(r,r.first),t.maxLineLength=Ut(t.maxLine),t.maxLineChanged=!0,r.iter((function(e){var r=Ut(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var Vt=function(e,t,r){this.text=e,Tt(this,t),this.height=r?r(this):1};function Kt(e){e.parent=null,Mt(e)}Vt.prototype.lineNo=function(){return Xe(this)},ye(Vt);var Gt={},Zt={};function Xt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Zt:Gt;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Jt(e,t){var r=E("span",null,null,l?"padding-right: .1px":null),n={pre:E("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;n.pos=0,n.addToken=Qt,Te(e.display.measure)&&(a=ce(o,e.doc.direction))&&(n.addToken=er(n.addToken,a)),n.map=[],rr(o,n,ht(e,o,t!=e.display.externalMeasured&&Xe(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=I(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=I(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Me(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return fe(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=I(n.pre.className,n.textClass||"")),n}function Yt(e){var t=T("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Qt(e,t,r,n,i,o,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}(t,e.trailingSpace):t,d=e.cm.state.specialChars,h=!1;if(d.test(t)){c=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var f=d.exec(t),m=f?f.index-p:t.length-p;if(m){var g=document.createTextNode(u.slice(p,p+m));a&&s<9?c.appendChild(T("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!f)break;p+=m+1;var v=void 0;if("\t"==f[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(v=c.appendChild(T("span",K(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=b}else"\r"==f[0]||"\n"==f[0]?((v=c.appendChild(T("span","\r"==f[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",f[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),a&&s<9?c.appendChild(T("span",[v])):c.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(h=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),r||n||i||h||o||l){var k=r||"";n&&(k+=n),i&&(k+=i);var x=T("span",[c],k,o);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&x.setAttribute(w,l[w]);return e.content.appendChild(x)}e.content.appendChild(c)}}function er(e,t){return function(r,n,i,o,a,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=r.pos,u=c+n.length;;){for(var d=void 0,h=0;h<t.length&&!((d=t[h]).to>c&&d.from<=c);h++);if(d.to>=u)return e(r,n,i,o,a,s,l);e(r,n.slice(0,d.to-c),i,o,null,s,l),o=null,n=n.slice(d.to-c),c=d.to}}}function tr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function rr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a,s,l,c,u,d,h,p=i.length,f=0,m=1,g="",v=0;;){if(v==f){l=c=u=s="",h=null,d=null,v=1/0;for(var y=[],b=void 0,k=0;k<n.length;++k){var x=n[k],w=x.marker;if("bookmark"==w.type&&x.from==f&&w.widgetNode)y.push(w);else if(x.from<=f&&(null==x.to||x.to>f||w.collapsed&&x.to==f&&x.from==f)){if(null!=x.to&&x.to!=f&&v>x.to&&(v=x.to,c=""),w.className&&(l+=" "+w.className),w.css&&(s=(s?s+";":"")+w.css),w.startStyle&&x.from==f&&(u+=" "+w.startStyle),w.endStyle&&x.to==v&&(b||(b=[])).push(w.endStyle,x.to),w.title&&((h||(h={})).title=w.title),w.attributes)for(var C in w.attributes)(h||(h={}))[C]=w.attributes[C];w.collapsed&&(!d||Ft(d.marker,w)<0)&&(d=x)}else x.from>f&&v>x.from&&(v=x.from)}if(b)for(var _=0;_<b.length;_+=2)b[_+1]==v&&(c+=" "+b[_]);if(!d||d.from==f)for(var S=0;S<y.length;++S)tr(t,0,y[S]);if(d&&(d.from||0)==f){if(tr(t,(null==d.to?p+1:d.to)-f,d.marker,null==d.from),null==d.to)return;d.to==f&&(d=!1)}}if(f>=p)break;for(var A=Math.min(p,v);;){if(g){var L=f+g.length;if(!d){var M=L>A?g.slice(0,A-f):g;t.addToken(t,M,a?a+l:l,u,f+M.length==v?c:"",s,h)}if(L>=A){g=g.slice(A-f),f=A;break}f=L,u=""}g=i.slice(o,o=r[m++]),a=Xt(r[m++],t.cm.options)}}else for(var T=1;T<r.length;T+=2)t.addToken(t,i.slice(o,o=r[T]),Xt(r[T+1],t.cm.options))}function nr(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=Ot(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?Xe(G(this.rest))-r+1:1,this.node=this.text=null,this.hidden=qt(e,t)}function ir(e,t,r){for(var n,i=[],o=t;o<r;o=n){var a=new nr(e.doc,Ve(e.doc,o),o);n=o+a.size,i.push(a)}return i}var or=null;var ar=null;function sr(e,t){var r=he(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);or?n=or.delayedCallbacks:ar?n=ar:(n=ar=[],setTimeout(lr,0));for(var o=function(e){n.push((function(){return r[e].apply(null,i)}))},a=0;a<r.length;++a)o(a)}}function lr(){var e=ar;ar=null;for(var t=0;t<e.length;++t)e[t]()}function cr(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?hr(e,t):"gutter"==o?fr(e,t,r,n):"class"==o?pr(e,t):"widget"==o&&mr(e,t,n)}t.changes=null}function ur(e){return e.node==e.text&&(e.node=T("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function dr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Jt(e,t)}function hr(e,t){var r=t.text.className,n=dr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,pr(e,t)):r&&(t.text.className=r)}function pr(e,t){(function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=ur(t);t.background=n.insertBefore(T("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}})(e,t),t.line.wrapClass?ur(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function fr(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=ur(t);t.gutterBackground=T("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=ur(t),s=t.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(T("div",Qe(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=o.hasOwnProperty(c)&&o[c];u&&s.appendChild(T("div",[u],"CodeMirror-gutter-elt","left: "+n.gutterLeft[c]+"px; width: "+n.gutterWidth[c]+"px"))}}}function mr(e,t,r){t.alignable&&(t.alignable=null);for(var n=_("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,n.test(i.className)&&t.node.removeChild(i);vr(e,t,r)}function gr(e,t,r,n){var i=dr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),pr(e,t),fr(e,t,r,n),vr(e,t,n),t.node}function vr(e,t,r){if(yr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)yr(e,t.rest[n],t,r,!1)}function yr(e,t,r,n,i){if(t.widgets)for(var o=ur(r),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=T("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),br(l,c,r,n),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,r.gutter||r.text):o.appendChild(c),sr(l,"redraw")}}function br(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function kr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!D(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),M(t.display.measure,T("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function xr(e,t){for(var r=Ce(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function wr(e){return e.lineSpace.offsetTop}function Cr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function _r(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=M(e.measure,T("pre","x","CodeMirror-line-like")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Sr(e){return 50-e.display.nativeBarWidth}function Ar(e){return e.display.scroller.clientWidth-Sr(e)-e.display.barWidth}function Lr(e){return e.display.scroller.clientHeight-Sr(e)-e.display.barHeight}function Mr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(Xe(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Tr(e,t,r,n){return Fr(e,Dr(e,t),r,n)}function Er(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[un(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Dr(e,t){var r=Xe(t),n=Er(e,r);n&&!n.text?n=null:n&&n.changes&&(cr(e,n,r,on(e)),e.curOp.forceUpdate=!0),n||(n=function(e,t){var r=Xe(t=zt(t)),n=e.display.externalMeasured=new nr(e.doc,t,r);n.lineN=r;var i=n.built=Jt(e,n);return n.text=i.pre,M(e.display.lineMeasure,i.pre),n}(e,t));var i=Mr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Fr(e,t,r,n,i){t.before&&(r=-1);var o,l=r+(n||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,r){var n=e.options.lineWrapping,i=n&&Ar(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Or(t.map,r,n),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){for(;c&&ne(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&ne(t.line.text.charAt(o.coverStart+u));)++u;if((i=a&&s<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():Rr(S(l,c,u).getClientRects(),n)).left||i.right||0==c)break;u=c,c-=1,d="right"}a&&s<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Ie)return Ie;var t=M(e,T("span","x")),r=t.getBoundingClientRect(),n=S(t,0,1).getBoundingClientRect();return Ie=Math.abs(r.left-n.left)>1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var p;c>0&&(d=n="right"),i=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==n?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var f=l.parentNode.getClientRects()[0];i=f?{left:f.left,right:f.left+nn(e.display),top:f.top,bottom:f.bottom}:Ir}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(v<y[b]);b++);var k=b?y[b-1]:0,x=y[b],w={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:k,bottom:x};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=m,w.rbottom=g),w}(e,t,r,n)).bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Nr,Ir={left:0,right:0,top:0,bottom:0};function Or(e,t,r){for(var n,i,o,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(i=0,o=1,a="left"):t<l?o=1+(i=t-s):(c==e.length-3||t==l&&e[c+3]>t)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(n=e[c+2],s==l&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)n=e[2+(c-=3)],a="left";if("right"==r&&i==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)n=e[(c+=3)+2],a="right";break}return{node:n,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function Rr(e,t){var r=Ir;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function jr(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 zr(e){e.display.externalMeasure=null,L(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)jr(e.display.view[t])}function Br(e){zr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Pr(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function qr(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Hr(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=kr(e.widgets[r]));return t}function Wr(e,t,r,n,i){if(!i){var o=Hr(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=Wt(t);if("local"==n?a+=wr(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==n?0:qr());var l=s.left+("window"==n?0:Pr());r.left+=l,r.right+=l}return r.top+=a,r.bottom+=a,r}function Ur(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=Pr(),i-=qr();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function $r(e,t,r,n,i){return n||(n=Ve(e.doc,t.line)),Wr(e,n,Tr(e,n,t.ch,i),r)}function Vr(e,t,r,n,i,o){function a(t,a){var s=Fr(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,Wr(e,n,s,r)}n=n||Ve(e.doc,t.line),i||(i=Dr(e,n));var s=ce(n,e.doc.direction),l=t.ch,c=t.sticky;if(l>=n.text.length?(l=n.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,r){return a(r?e-1:e,1==s[t].level!=r)}var d=se(s,l,c),h=ae,p=u(l,d,"before"==c);return null!=h&&(p.other=u(l,h,"before"!=c)),p}function Kr(e,t){var r=0;t=st(e.doc,t),e.options.lineWrapping||(r=nn(e.display)*t.ch);var n=Ve(e.doc,t.line),i=Wt(n)+wr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Gr(e,t,r,n,i){var o=et(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function Zr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return Gr(n.first,0,null,-1,-1);var i=Je(n,r),o=n.first+n.size-1;if(i>o)return Gr(n.first+n.size-1,Ve(n,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ve(n,i);;){var s=Qr(e,a,i,t,r),l=Rt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Ve(n,i=c.line)}}function Xr(e,t,r,n){n-=Hr(t);var i=t.text.length,o=oe((function(t){return Fr(e,r,t-1).bottom<=n}),i,0);return{begin:o,end:i=oe((function(t){return Fr(e,r,t).top>n}),o,i)}}function Jr(e,t,r,n){return r||(r=Dr(e,t)),Xr(e,t,r,Wr(e,t,Fr(e,r,n),"line").top)}function Yr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Qr(e,t,r,n,i){i-=Wt(t);var o=Dr(e,t),a=Hr(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?tn:en)(e,t,r,o,u,n,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var h,p,f=null,m=null,g=oe((function(t){var r=Fr(e,o,t);return r.top+=a,r.bottom+=a,!!Yr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(f=t,m=r),!0)}),s,l),v=!1;if(m){var y=n-m.left<m.right-n,b=y==c;g=f+(b?0:1),p=b?"after":"before",h=y?m.left:m.right}else{c||g!=l&&g!=s||g++,p=0==g?"after":g==t.text.length?"before":Fr(e,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var k=Vr(e,et(r,g,p),"line",t,o);h=k.left,v=i<k.top?-1:i>=k.bottom?1:0}return Gr(r,g=ie(t.text,g,1),p,v,n-h)}function en(e,t,r,n,i,o,a){var s=oe((function(s){var l=i[s],c=1!=l.level;return Yr(Vr(e,et(r,c?l.to:l.from,c?"before":"after"),"line",t,n),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Vr(e,et(r,c?l.from:l.to,c?"after":"before"),"line",t,n);Yr(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function tn(e,t,r,n,i,o,a){var s=Xr(e,t,n,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h<i.length;h++){var p=i[h];if(!(p.from>=c||p.to<=l)){var f=Fr(e,n,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=f<o?o-f+1e9:f-o;(!u||d>m)&&(u=p,d=m)}}return u||(u=i[i.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function rn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Nr){Nr=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Nr.appendChild(document.createTextNode("x")),Nr.appendChild(T("br"));Nr.appendChild(document.createTextNode("x"))}M(e.measure,Nr);var r=Nr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),L(e.measure),r||1}function nn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=T("span","xxxxxxxxxx"),r=T("pre",[t],"CodeMirror-line-like");M(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function on(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;r[s]=o.offsetLeft+o.clientLeft+i,n[s]=o.clientWidth}return{fixedPos:an(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function an(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sn(e){var t=rn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/nn(e.display)-3);return function(i){if(qt(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function ln(e){var t=e.doc,r=sn(e);t.iter((function(e){var t=r(e);t!=e.height&&Ze(e,t)}))}function cn(e,t,r,n){var i=e.display;if(!r&&"true"==Ce(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var l,c=Zr(e,o,a);if(n&&c.xRel>0&&(l=Ve(e.doc,c.line).text).length==c.ch){var u=z(l,l.length,e.options.tabSize)-l.length;c=et(c.line,Math.max(0,Math.round((o-_r(e.display).left)/nn(e.display))-u))}return c}function un(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function dn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)wt&&Bt(e.doc,t)<i.viewTo&&pn(e);else if(r<=i.viewFrom)wt&&Pt(e.doc,r+n)>i.viewFrom?pn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)pn(e);else if(t<=i.viewFrom){var o=fn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):pn(e)}else if(r>=i.viewTo){var a=fn(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):pn(e)}else{var s=fn(e,t,t,-1),l=fn(e,r,r+n,1);s&&l?(i.view=i.view.slice(0,s.index).concat(ir(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=n):pn(e)}var c=i.externalMeasured;c&&(r<c.lineN?c.lineN+=n:t<c.lineN+c.size&&(i.externalMeasured=null))}function hn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[un(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==P(a,r)&&a.push(r)}}}function pn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function fn(e,t,r,n){var i,o=un(e,t),a=e.display.view;if(!wt||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=t){if(n>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;Bt(e.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function mn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function gn(e){e.display.input.showSelection(e.display.input.prepareSelection())}function vn(e,t){void 0===t&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),a=0;a<r.sel.ranges.length;a++)if(t||a!=r.sel.primIndex){var s=r.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&yn(e,s.head,i),l||kn(e,s,o)}}return n}function yn(e,t,r){var n=Vr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(T("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(T("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function bn(e,t){return e.top-t.top||e.left-t.left}function kn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),a=_r(e.display),s=a.left,l=Math.max(n.sizerWidth,Ar(e)-n.sizer.offsetLeft)-a.right,c="ltr"==i.direction;function u(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?l-e:r)+"px;\n height: "+(n-t)+"px"))}function d(t,r,n){var o,a,d=Ve(i,t),h=d.text.length;function p(r,n){return $r(e,et(t,r),"div",d,n)}function f(t,r,n){var i=Jr(e,d,null,t),o="ltr"==r==("after"==n)?"left":"right";return p("after"==n?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}var m=ce(d,i.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(m,r||0,null==n?h:n,(function(e,t,i,d){var g="ltr"==i,v=p(e,g?"left":"right"),y=p(t-1,g?"right":"left"),b=null==r&&0==e,k=null==n&&t==h,x=0==d,w=!m||d==m.length-1;if(y.top-v.top<=3){var C=(c?k:b)&&w,_=(c?b:k)&&x?s:(g?v:y).left,S=C?l:(g?y:v).right;u(_,v.top,S-_,v.bottom)}else{var A,L,M,T;g?(A=c&&b&&x?s:v.left,L=c?l:f(e,i,"before"),M=c?s:f(t,i,"after"),T=c&&k&&w?l:y.right):(A=c?f(e,i,"before"):s,L=!c&&b&&x?l:v.right,M=!c&&k&&w?s:y.left,T=c?f(t,i,"after"):l),u(A,v.top,L-A,v.bottom),v.bottom<y.top&&u(s,v.bottom,null,y.top),u(M,y.top,T-M,y.bottom)}(!o||bn(v,o)<0)&&(o=v),bn(y,o)<0&&(o=y),(!a||bn(v,a)<0)&&(a=v),bn(y,a)<0&&(a=y)})),{start:o,end:a}}var h=t.from(),p=t.to();if(h.line==p.line)d(h.line,h.ch,p.ch);else{var f=Ve(i,h.line),m=Ve(i,p.line),g=zt(f)==zt(m),v=d(h.line,h.ch,g?f.text.length+1:null).end,y=d(p.line,g?0:null,p.ch).start;g&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(s,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(s,v.bottom,null,y.top)}r.appendChild(o)}function xn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Sn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function wn(e){e.state.focused||(e.display.input.focus(),_n(e))}function Cn(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Sn(e))}),100)}function _n(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(fe(e,"focus",e,t),e.state.focused=!0,N(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),xn(e))}function Sn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(fe(e,"blur",e,t),e.state.focused=!1,A(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function An(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=e.options.lineWrapping,l=void 0,c=0;if(!i.hidden){if(a&&s<8){var u=i.node.offsetTop+i.node.offsetHeight;l=u-r,r=u}else{var d=i.node.getBoundingClientRect();l=d.bottom-d.top,!o&&i.text.firstChild&&(c=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var h=i.line.height-l;if((h>.005||h<-.005)&&(Ze(i.line,l),Ln(i.line),i.rest))for(var p=0;p<i.rest.length;p++)Ln(i.rest[p]);if(c>e.display.sizerWidth){var f=Math.ceil(c/nn(e.display));f>e.display.maxLineLength&&(e.display.maxLineLength=f,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Ln(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function Mn(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-wr(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=Je(t,n),a=Je(t,i);if(r&&r.ensure){var s=r.ensure.from.line,l=r.ensure.to.line;s<o?(o=s,a=Je(t,Wt(Ve(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=Je(t,Wt(Ve(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Tn(e,t){var r=e.display,n=rn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Lr(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Cr(r),l=t.top<n,c=t.bottom>s-n;if(t.top<i)a.scrollTop=l?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:r.gutters.offsetWidth,h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-d,p=Ar(e)-r.gutters.offsetWidth,f=t.right-t.left>p;return f&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.left<h?a.scrollLeft=Math.max(0,t.left+d-(f?0:10)):t.right>p+h-3&&(a.scrollLeft=t.right+(f?0:10)-p),a}function En(e,t){null!=t&&(Nn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Dn(e){Nn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Fn(e,t,r){null==t&&null==r||Nn(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Nn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,In(e,Kr(e,t.from),Kr(e,t.to),t.margin))}function In(e,t,r,n){var i=Tn(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Fn(e,i.scrollLeft,i.scrollTop)}function On(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||li(e,{top:t}),Rn(e,t,!0),r&&li(e),ni(e,100))}function Rn(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function jn(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,di(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function zn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Cr(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?r:0,docHeight:n,scrollHeight:n+Sr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Bn=function(e,t,r){this.cm=r;var n=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),de(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),de(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Bn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Bn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Bn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Bn.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Bn.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,(function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}))},Bn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Pn=function(){};function qn(e,t){t||(t=zn(e));var r=e.display.barWidth,n=e.display.barHeight;Hn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&An(e),Hn(e,zn(e)),r=e.display.barWidth,n=e.display.barHeight}function Hn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}Pn.prototype.update=function(){return{bottom:0,right:0}},Pn.prototype.setScrollLeft=function(){},Pn.prototype.setScrollTop=function(){},Pn.prototype.clear=function(){};var Wn={native:Bn,null:Pn};function Un(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&A(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Wn[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?jn(e,t):On(e,t)}),e),e.display.scrollbars.addClass&&N(e.display.wrapper,e.display.scrollbars.addClass)}var $n=0;function Vn(e){var t;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:++$n},t=e.curOp,or?or.ops.push(t):t.ownsGroup=or={ops:[t],delayedCallbacks:[]}}function Kn(e){var t=e.curOp;t&&function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}(r)}finally{or=null,t(r)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)Gn(t[r]);for(var n=0;n<t.length;n++)Zn(t[n]);for(var i=0;i<t.length;i++)Xn(t[i]);for(var o=0;o<t.length;o++)Jn(t[o]);for(var a=0;a<t.length;a++)Yn(t[a])}(e)}))}function Gn(e){var t=e.cm,r=t.display;(function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Sr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Sr(e)+"px",t.scrollbarsClipped=!0)})(t),e.updateMaxLine&&$t(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new oi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Zn(e){e.updatedDisplay=e.mustUpdate&&ai(e.cm,e.update)}function Xn(e){var t=e.cm,r=t.display;e.updatedDisplay&&An(t),e.barMeasure=zn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Tr(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Sr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Ar(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Jn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&jn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==F();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&qn(t,e.barMeasure),e.updatedDisplay&&ui(t,e.barMeasure),e.selectionChanged&&xn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&wn(e.cm)}function Yn(e){var t=e.cm,r=t.display,n=t.doc;e.updatedDisplay&&si(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Rn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&jn(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!me(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!f){var o=T("div","",null,"position: absolute;\n top: "+(t.top-r.viewOffset-wr(e.display))+"px;\n height: "+(t.bottom-t.top+Sr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=Vr(e,t),l=r&&r!=t?Vr(e,r):s,c=Tn(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-n,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+n}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(On(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(jn(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(t,st(n,e.scrollToPos.from),st(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||fe(i[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&fe(o[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&fe(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Qn(e,t){if(e.curOp)return t();Vn(e);try{return t()}finally{Kn(e)}}function ei(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Vn(e);try{return t.apply(e,arguments)}finally{Kn(e)}}}function ti(e){return function(){if(this.curOp)return e.apply(this,arguments);Vn(this);try{return e.apply(this,arguments)}finally{Kn(this)}}}function ri(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Vn(t);try{return e.apply(this,arguments)}finally{Kn(t)}}}function ni(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,R(ii,e))}function ii(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=pt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(n.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?He(t.mode,n.state):null,l=dt(e,o,n,!0);s&&(n.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&h<a.length;++h)d=a[h]!=o.styles[h];d&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&ft(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ni(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Qn(e,(function(){for(var t=0;t<i.length;t++)hn(e,i[t],"text")}))}}var oi=function(e,t,r){var n=e.display;this.viewport=t,this.visible=Mn(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Ar(e),this.force=r,this.dims=on(e),this.events=[]};function ai(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return pn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==mn(e))return!1;hi(e)&&(pn(e),t.dims=on(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>a&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),wt&&(o=Bt(e.doc,o),a=Pt(e.doc,a));var s=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;(function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=ir(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=ir(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(un(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(ir(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,un(e,r)))),n.viewTo=r})(e,o,a),r.viewOffset=Wt(Ve(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var c=mn(e);if(!s&&0==c&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=F();if(!t||!D(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&D(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return c>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function s(t){var r=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var c=n.view,u=n.viewFrom,d=0;d<c.length;d++){var h=c[d];if(h.hidden);else if(h.node&&h.node.parentNode==o){for(;a!=h.node;)a=s(a);var p=i&&null!=t&&t<=u&&h.lineNumber;h.changes&&(P(h.changes,"gutter")>-1&&(p=!1),cr(e,h,u,r)),p&&(L(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(Qe(e.options,u)))),a=h.node.nextSibling}else{var f=gr(e,h,u,r);o.insertBefore(f,a)}u+=h.size}for(;a;)a=s(a)}(e,r.updateLineNumbers,t.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=F()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(u),L(r.cursorDiv),L(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ni(e,400)),r.updateLineNumbers=null,!0}function si(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Ar(e))n&&(t.visible=Mn(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Cr(e.display)-Lr(e),r.top)}),t.visible=Mn(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ai(e,t))break;An(e);var i=zn(e);gn(e),qn(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function li(e,t){var r=new oi(e,t);if(ai(e,r)){An(e),si(e,r);var n=zn(e);gn(e),qn(e,n),ui(e,n),r.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Sr(e)+"px"}function di(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=an(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&(r[a].gutter&&(r[a].gutter.style.left=o),r[a].gutterBackground&&(r[a].gutterBackground.style.left=o));var s=r[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function hi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=Qe(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(T("div",[T("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a)+1,n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",ci(e.display),!0}return!1}function pi(e,t){for(var r=[],n=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;n=!0}r.push({className:o,style:a})}return t&&!n&&r.push({className:"CodeMirror-linenumbers",style:null}),r}function fi(e){var t=e.gutters,r=e.gutterSpecs;L(t),e.lineGutter=null;for(var n=0;n<r.length;++n){var i=r[n],o=i.className,a=i.style,s=t.appendChild(T("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=r.length?"":"none",ci(e)}function mi(e){fi(e.display),dn(e),di(e)}function gi(e,t,n,i){var o=this;this.input=n,o.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=E("div",null,"CodeMirror-code"),o.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=T("div",null,"CodeMirror-cursors"),o.measure=T("div",null,"CodeMirror-measure"),o.lineMeasure=T("div",null,"CodeMirror-measure"),o.lineSpace=E("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=E("div",[o.lineSpace],"CodeMirror-lines");o.mover=T("div",[c],null,"position: relative"),o.sizer=T("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=T("div",null,null,"position: absolute; height: 50px; width: 1px;"),o.gutters=T("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=T("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=T("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),a&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||r&&v||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=pi(i.gutters,i.lineNumbers),fi(o),n.init(o)}oi.prototype.signal=function(e,t){ve(e,t)&&this.events.push(arguments)},oi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)fe.apply(null,this.events[e])};var vi=0,yi=null;function bi(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function ki(e){var t=bi(e);return t.x*=yi,t.y*=yi,t}function xi(e,t){var n=bi(t),i=n.x,o=n.y,a=e.display,s=a.scroller,c=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)e:for(var h=t.target,p=a.view;h!=s;h=h.parentNode)for(var f=0;f<p.length;f++)if(p[f].node==h){e.display.currentWheelTarget=h;break e}if(i&&!r&&!d&&null!=yi)return o&&u&&On(e,Math.max(0,s.scrollTop+o*yi)),jn(e,Math.max(0,s.scrollLeft+i*yi)),(!o||o&&u)&&be(t),void(a.wheelStartX=null);if(o&&null!=yi){var m=o*yi,g=e.doc.scrollTop,v=g+a.wrapper.clientHeight;m<0?g=Math.max(0,g+m-50):v=Math.min(e.doc.height,v+m+50),li(e,{top:g,bottom:v})}vi<20&&(null==a.wheelStartX?(a.wheelStartX=s.scrollLeft,a.wheelStartY=s.scrollTop,a.wheelDX=i,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var e=s.scrollLeft-a.wheelStartX,t=s.scrollTop-a.wheelStartY,r=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,r&&(yi=(yi*vi+r)/(vi+1),++vi)}}),200)):(a.wheelDX+=i,a.wheelDY+=o))}}a?yi=-.53:r?yi=15:u?yi=-.7:h&&(yi=-1/3);var wi=function(e,t){this.ranges=e,this.primIndex=t};wi.prototype.primary=function(){return this.ranges[this.primIndex]},wi.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 r=this.ranges[t],n=e.ranges[t];if(!rt(r.anchor,n.anchor)||!rt(r.head,n.head))return!1}return!0},wi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ci(nt(this.ranges[t].anchor),nt(this.ranges[t].head));return new wi(e,this.primIndex)},wi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},wi.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(tt(t,n.from())>=0&&tt(e,n.to())<=0)return r}return-1};var Ci=function(e,t){this.anchor=e,this.head=t};function _i(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((function(e,t){return tt(e.from(),t.from())})),r=P(t,i);for(var o=1;o<t.length;o++){var a=t[o],s=t[o-1],l=tt(s.to(),a.from());if(n&&!a.empty()?l>0:l>=0){var c=ot(s.from(),a.from()),u=it(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=r&&--r,t.splice(--o,2,new Ci(d?u:c,d?c:u))}}return new wi(t,r)}function Si(e,t){return new wi([new Ci(e,t||e)],0)}function Ai(e){return e.text?et(e.from.line+e.text.length-1,G(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Li(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Ai(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Ai(t).ch-t.to.ch),et(r,n)}function Mi(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new Ci(Li(i.anchor,t),Li(i.head,t)))}return _i(e.cm,r,e.sel.primIndex)}function Ti(e,t,r){return e.line==t.line?et(r.line,e.ch-t.ch+r.ch):et(r.line+(e.line-t.line),e.ch)}function Ei(e){e.doc.mode=Be(e.options,e.doc.modeOption),Di(e)}function Di(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ni(e,100),e.state.modeGen++,e.curOp&&dn(e)}function Fi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==G(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ni(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){(function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Mt(e),Tt(e,r);var i=n?n(e):1;i!=e.height&&Ze(e,i)})(e,r,i,n),sr(e,"change",e,t)}function a(e,t){for(var r=[],o=e;o<t;++o)r.push(new Vt(c[o],i(o),n));return r}var s=t.from,l=t.to,c=t.text,u=Ve(e,s.line),d=Ve(e,l.line),h=G(c),p=i(c.length-1),f=l.line-s.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Fi(e,t)){var m=a(0,c.length-1);o(d,d.text,p),f&&e.remove(s.line,f),m.length&&e.insert(s.line,m)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,s.ch)+h+u.text.slice(l.ch),p);else{var g=a(1,c.length-1);g.push(new Vt(h+u.text.slice(l.ch),p,n)),o(u,u.text.slice(0,s.ch)+c[0],i(0)),e.insert(s.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,s.ch)+c[0]+d.text.slice(l.ch),i(0)),e.remove(s.line+1,f);else{o(u,u.text.slice(0,s.ch)+c[0],i(0)),o(d,h+d.text.slice(l.ch),p);var v=a(1,c.length-1);f>1&&e.remove(s.line+1,f-1),e.insert(s.line+1,v)}sr(e,"change",e,t)}function Ii(e,t,r){!function e(n,i,o){if(n.linked)for(var a=0;a<n.linked.length;++a){var s=n.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;r&&!l||(t(s.doc,l),e(s.doc,n,l))}}}(e,null,!0)}function Oi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ln(e),Ei(e),Ri(e),e.options.lineWrapping||$t(e),e.options.mode=t.modeOption,dn(e)}function Ri(e){("rtl"==e.doc.direction?N:A)(e.display.lineDiv,"CodeMirror-rtl")}function ji(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function zi(e,t){var r={from:nt(t.from),to:Ai(t),text:Ke(e,t.from,t.to)};return Wi(e,r,t.from.line,t.to.line+1),Ii(e,(function(e){return Wi(e,r,t.from.line,t.to.line+1)}),!0),r}function Bi(e){for(;e.length&&G(e).ranges;)e.pop()}function Pi(e,t,r,n){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Bi(e.done),G(e.done)):e.done.length&&!G(e.done).ranges?G(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),G(e.done)):void 0}(i,i.lastOp==n)))a=G(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=Ai(t):o.changes.push(zi(e,t));else{var l=G(i.done);for(l&&l.ranges||Hi(e.sel,i.done),o={changes:[zi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,a||fe(e,"historyAdded")}function qi(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,G(i.done),t))?i.done[i.done.length-1]=t:Hi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Bi(i.undone)}function Hi(e,t){var r=G(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Wi(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o}))}function Ui(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function $i(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(Ui(r[i]));return n}(e,t),n=At(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else a&&(r[i]=a)}return r}function Vi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?wi.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];n.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&P(t,Number(u[1]))>-1&&(G(s)[d]=c[d],delete c[d])}}}return n}function Ki(e,t,r,n){if(n){var i=e.anchor;if(r){var o=tt(t,i)<0;o!=tt(r,i)<0?(i=t,t=r):o!=tt(t,r)<0&&(t=r)}return new Ci(i,t)}return new Ci(r||t,t)}function Gi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Qi(e,new wi([Ki(e.sel.primary(),t,r,i)],0),n)}function Zi(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=Ki(e.sel.ranges[o],t[o],null,i);Qi(e,_i(e.cm,n,e.sel.primIndex),r)}function Xi(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,Qi(e,_i(e.cm,i,e.sel.primIndex),n)}function Ji(e,t,r,n){Qi(e,Si(t,r),n)}function Yi(e,t,r){var n=e.history.done,i=G(n);i&&i.ranges?(n[n.length-1]=t,eo(e,t,r)):Qi(e,t,r)}function Qi(e,t,r){eo(e,t,r),qi(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function eo(e,t,r){(ve(e,"beforeSelectionChange")||e.cm&&ve(e.cm,"beforeSelectionChange"))&&(t=function(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new Ci(st(e,t[r].anchor),st(e,t[r].head))},origin:r&&r.origin};return fe(e,"beforeSelectionChange",e,n),e.cm&&fe(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?_i(e.cm,n.ranges,n.ranges.length-1):t}(e,t,r));var n=r&&r.bias||(tt(t.primary().head,e.sel.primary().head)<0?-1:1);to(e,no(e,t,n,!0)),r&&!1===r.scroll||!e.cm||Dn(e.cm)}function to(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ge(e.cm)),sr(e,"cursorActivity",e))}function ro(e){to(e,no(e,e.sel,null,!1))}function no(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=oo(e,a.anchor,s&&s.anchor,r,n),c=oo(e,a.head,s&&s.head,r,n);(i||l!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Ci(l,c))}return i?_i(e.cm,i,t.primIndex):t}function io(e,t,r,n,i){var o=Ve(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(fe(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(r){var d=l.find(n<0?1:-1),h=void 0;if((n<0?u:c)&&(d=ao(e,d,-n,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(h=tt(d,r))&&(n<0?h<0:h>0))return io(e,d,t,n,i)}var p=l.find(n<0?-1:1);return(n<0?c:u)&&(p=ao(e,p,n,p.line==t.line?o:null)),p?io(e,p,t,n,i):null}}return t}function oo(e,t,r,n,i){var o=n||1;return io(e,t,r,o,i)||!i&&io(e,t,r,o,!0)||io(e,t,r,-o,i)||!i&&io(e,t,r,-o,!0)||(e.cantEdit=!0,et(e.first,0))}function ao(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:r>0&&t.ch==(n||Ve(e,t.line)).text.length?t.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+r)}function so(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),H)}function lo(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=st(e,t)),r&&(n.to=st(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),fe(e,"beforeChange",e,n),e.cm&&fe(e.cm,"beforeChange",e.cm,n),n.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:n.from,to:n.to,text:n.text,origin:n.origin}}function co(e,t,r){if(e.cm){if(!e.cm.curOp)return ei(e.cm,co)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"))||(t=lo(e,t,!0))){var n=xt&&!r&&function(e,t,r){var n=null;if(e.iter(t.line,r.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=P(n,r)||(n||(n=[])).push(r)}})),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],s=a.find(0),l=0;l<i.length;++l){var c=i[l];if(!(tt(c.to,s.from)<0||tt(c.from,s.to)>0)){var u=[l,1],d=tt(c.from,s.from),h=tt(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)uo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else uo(e,t)}}function uo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var r=Mi(e,t);Pi(e,t,r,e.cm?e.cm.curOp.id:NaN),fo(e,t,r,At(e,t));var n=[];Ii(e,(function(e,r){r||-1!=P(n,e.history)||(yo(e.history,t),n.push(e.history)),fo(e,t,null,At(e,t))}))}}function ho(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c<s.length&&(i=s[c],r?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(n)return void s.push(i);break}if(Hi(i,l),r&&!i.equals(e.sel))return void Qi(e,i,{clearRedo:!1});a=i}var u=[];Hi(a,l),l.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var d=ve(e,"beforeChange")||e.cm&&ve(e.cm,"beforeChange"),h=function(r){var n=i.changes[r];if(n.origin=t,d&&!lo(e,n,!1))return s.length=0,{};u.push(zi(e,n));var o=r?Mi(e,n):G(s);fo(e,n,o,$i(e,n)),!r&&e.cm&&e.cm.scrollIntoView({from:n.from,to:Ai(n)});var a=[];Ii(e,(function(e,t){t||-1!=P(a,e.history)||(yo(e.history,n),a.push(e.history)),fo(e,n,null,$i(e,n))}))},p=i.changes.length-1;p>=0;--p){var f=h(p);if(f)return f.v}}}}function po(e,t){if(0!=t&&(e.first+=t,e.sel=new wi(Z(e.sel.ranges,(function(e){return new Ci(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){dn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)hn(e.cm,n,"gutter")}}function fo(e,t,r,n){if(e.cm&&!e.cm.curOp)return ei(e.cm,fo)(e,t,r,n);if(t.to.line<e.first)po(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);po(e,i),t={from:et(e.first,0),to:et(t.to.line+i,t.to.ch),text:[G(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:et(o,Ve(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ke(e,t.from,t.to),r||(r=Mi(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=Xe(zt(Ve(n,o.line))),n.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&ge(e),Ni(n,t,r,sn(e)),e.options.lineWrapping||(n.iter(l,o.line+t.text.length,(function(e){var t=Ut(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=Ve(e,n).stateAfter;if(i&&(!(i instanceof ct)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}}(n,o.line),ni(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?dn(e):o.line!=a.line||1!=t.text.length||Fi(e.doc,t)?dn(e,o.line,a.line+1,c):hn(e,o.line,"text");var u=ve(e,"changes"),d=ve(e,"change");if(d||u){var h={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&sr(e,"change",e,h),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}(e.cm,t,n):Ni(e,t,n),eo(e,r,H),e.cantEdit&&oo(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}}function mo(e,t,r,n,i){var o;n||(n=r),tt(n,r)<0&&(r=(o=[n,r])[0],n=o[1]),"string"==typeof t&&(t=e.splitLines(t)),co(e,{from:r,to:n,text:t,origin:i})}function go(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function vo(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)go(o.ranges[s].anchor,t,r,n),go(o.ranges[s].head,t,r,n)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(r<c.from.line)c.from=et(c.from.line+n,c.from.ch),c.to=et(c.to.line+n,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function yo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;vo(e.done,r,n,i),vo(e.undone,r,n,i)}function bo(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=Ve(e,at(e,t)):i=Xe(t),null==i?null:(n(o,i)&&e.cm&&hn(e.cm,i,r),o)}function ko(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function xo(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}Ci.prototype.from=function(){return ot(this.anchor,this.head)},Ci.prototype.to=function(){return it(this.anchor,this.head)},Ci.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ko.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Kt(i),sr(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},xo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ko))){var s=[];this.collapse(s),this.children=[new ko(s)],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,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var l=new ko(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++n,0,l),l.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new xo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=P(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new xo(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var wo=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function Co(e,t,r){Wt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&En(e,r)}wo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=Xe(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=kr(this);Ze(r,Math.max(0,r.height-o)),e&&(Qn(e,(function(){Co(e,r,-o),hn(e,n,"widget")})),sr(e,"lineWidgetCleared",e,this,n))}},wo.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=kr(this)-t;i&&(qt(this.doc,n)||Ze(n,n.height+i),r&&Qn(r,(function(){r.curOp.forceUpdate=!0,Co(r,n,i),sr(r,"lineWidgetChanged",r,e,Xe(n))})))},ye(wo);var _o=0,So=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++_o};function Ao(e,t,r,n,i){if(n&&n.shared)return function(e,t,r,n,i){(n=j(n)).shared=!1;var o=[Ao(e,t,r,n,i)],a=o[0],s=n.widgetNode;return Ii(e,(function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(Ao(e,st(e,t),st(e,r),n,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=G(o)})),new Lo(o,a)}(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return ei(e.cm,Ao)(e,t,r,n,i);var o=new So(e,i),a=tt(t,r);if(n&&j(n,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=E("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(jt(e,t.line,t,r,o)||t.line!=r.line&&jt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");wt=!0}o.addToHistory&&Pi(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,r.line+1,(function(e){c&&o.collapsed&&!c.options.lineWrapping&&zt(e)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Ze(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Ct(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l})),o.collapsed&&e.iter(t.line,r.line+1,(function(t){qt(e,t)&&Ze(t,0)})),o.clearOnEnter&&de(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(xt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++_o,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)dn(c,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=r.line;u++)hn(c,u,"text");o.atomic&&ro(c.doc),sr(c,"markerAdded",c,o)}return o}So.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Vn(e),ve(this,"clear")){var r=this.find();r&&sr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=_t(a.markedSpans,this);e&&!this.collapsed?hn(e,Xe(a),"text"):e&&(null!=s.to&&(i=Xe(a)),null!=s.from&&(n=Xe(a))),a.markedSpans=St(a.markedSpans,s),null==s.from&&this.collapsed&&!qt(this.doc,a)&&e&&Ze(a,rn(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=zt(this.lines[l]),u=Ut(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&dn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ro(e.doc)),e&&sr(e,"markerCleared",e,this,n,i),t&&Kn(e),this.parent&&this.parent.clear()}},So.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=_t(o.markedSpans,this);if(null!=a.from&&(r=et(t?o:Xe(o),a.from),-1==e))return r;if(null!=a.to&&(n=et(t?o:Xe(o),a.to),1==e))return n}return r&&{from:r,to:n}},So.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&Qn(n,(function(){var i=t.line,o=Xe(t.line),a=Er(n,o);if(a&&(jr(a),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!qt(r.doc,i)&&null!=r.height){var s=r.height;r.height=null;var l=kr(r)-s;l&&Ze(i,i.height+l)}sr(n,"markerChanged",n,e)}))},So.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=P(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},So.prototype.detachLine=function(e){if(this.lines.splice(P(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ye(So);var Lo=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function Mo(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),(function(e){return e.parent}))}function To(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];Ii(r.primary.doc,(function(e){return n.push(e)}));for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==P(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}Lo.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();sr(this,"clear")}},Lo.prototype.find=function(e,t){return this.primary.find(e,t)},ye(Lo);var Eo=0,Do=function(e,t,r,n,i){if(!(this instanceof Do))return new Do(e,t,r,n,i);null==r&&(r=0),xo.call(this,[new ko([new Vt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=et(r,0);this.sel=Si(o),this.history=new ji(null),this.id=++Eo,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ni(this,{from:o,to:o,text:e}),Qi(this,Si(o),H)};Do.prototype=J(xo.prototype,{constructor:Do,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ge(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:ri((function(e){var t=et(this.first,0),r=this.first+this.size-1;co(this,{from:t,to:et(r,Ve(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Fn(this.cm,0,0),Qi(this,Si(t),H)})),replaceRange:function(e,t,r,n){mo(this,e,t=st(this,t),r=r?st(this,r):t,n)},getRange:function(e,t,r){var n=Ke(this,st(this,e),st(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Ye(this,e))return Ve(this,e)},getLineNumber:function(e){return Xe(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ve(this,e)),zt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return st(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ri((function(e,t,r){Ji(this,st(this,"number"==typeof e?et(e,t||0):e),null,r)})),setSelection:ri((function(e,t,r){Ji(this,st(this,e),st(this,t||e),r)})),extendSelection:ri((function(e,t,r){Gi(this,st(this,e),t&&st(this,t),r)})),extendSelections:ri((function(e,t){Zi(this,lt(this,e),t)})),extendSelectionsBy:ri((function(e,t){Zi(this,lt(this,Z(this.sel.ranges,e)),t)})),setSelections:ri((function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new Ci(st(this,e[i].anchor),st(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Qi(this,_i(this.cm,n,t),r)}})),addSelection:ri((function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new Ci(st(this,e),st(this,t||e))),Qi(this,_i(this.cm,n,n.length-1),r)})),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=Ke(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=Ke(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:ri((function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:r}}for(var s=t&&"end"!=t&&function(e,t,r){for(var n=[],i=et(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=Ti(s.from,i,o),c=Ti(Ai(s),i,o);if(i=s.to,o=c,"around"==r){var u=e.sel.ranges[a],d=tt(u.head,u.anchor)<0;n[a]=new Ci(d?c:l,d?l:c)}else n[a]=new Ci(l,l)}return new wi(n,e.sel.primIndex)}(this,n,t),l=n.length-1;l>=0;l--)co(this,n[l]);s?Yi(this,s):this.cm&&Dn(this.cm)})),undo:ri((function(){ho(this,"undo")})),redo:ri((function(){ho(this,"redo")})),undoSelection:ri((function(){ho(this,"undo",!0)})),redoSelection:ri((function(){ho(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){var e=this;this.history=new ji(this.history.maxGeneration),Ii(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:Vi(this.history.done),undone:Vi(this.history.undone)}},setHistory:function(e){var t=this.history=new ji(this.history.maxGeneration);t.done=Vi(e.done.slice(0),null,!0),t.undone=Vi(e.undone.slice(0),null,!0)},setGutterMarker:ri((function(e,t,r){return bo(this,e,"gutter",(function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&te(n)&&(e.gutterMarkers=null),!0}))})),clearGutter:ri((function(e){var t=this;this.iter((function(r){r.gutterMarkers&&r.gutterMarkers[e]&&bo(t,r,"gutter",(function(){return r.gutterMarkers[e]=null,te(r.gutterMarkers)&&(r.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Ye(this,e))return null;if(t=e,!(e=Ve(this,e)))return null}else if(null==(t=Xe(e)))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:ri((function(e,t,r){return bo(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(_(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0}))})),removeLineClass:ri((function(e,t,r){return bo(this,e,"gutter"==t?"gutter":"class",(function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(_(r));if(!o)return!1;var a=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:ri((function(e,t,r){return function(e,t,r,n){var i=new wo(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),bo(e,t,"widget",(function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!qt(e,t)){var n=Wt(t)<e.scrollTop;Ze(t,t.height+kr(i)),n&&En(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&sr(o,"lineWidgetAdded",o,i,"number"==typeof t?t:Xe(t)),i}(this,e,t,r)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Ao(this,st(this,e),st(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Ao(this,e=st(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=Ve(this,(e=st(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=st(this,e),t=st(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||r&&!r(l.marker)||n.push(l.marker.parent||l.marker)}++i})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)})),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r})),st(this,et(r,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+r})),t},copy:function(e){var t=new Do(Ge(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,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new Do(Ge(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(tt(o,a)){var s=Ao(e,o,a,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}(n,Mo(this)),n},unlinkDoc:function(e){if(e instanceof La&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),To(Mo(this));break}if(e.history==this.history){var r=[e.id];Ii(e,(function(e){return r.push(e.id)}),!0),e.history=new ji(null),e.history.done=Vi(this.history.done,r),e.history.undone=Vi(this.history.undone,r)}},iterLinkedDocs:function(e){Ii(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):De(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ri((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Qn(t=this.cm,(function(){Ri(t),dn(t)})))}))}),Do.prototype.eachLine=Do.prototype.iter;var Fo=0;function No(e){var t=this;if(Io(t),!me(t,e)&&!xr(t.display,e)){be(e),a&&(Fo=+new Date);var r=cn(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),s=0,l=function(){++s==i&&ei(t,(function(){var e={from:r=st(t.doc,r),to:r,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};co(t.doc,e),Yi(t.doc,Si(st(t.doc,r),st(t.doc,Ai(e))))}))()},c=function(e,r){if(t.options.allowDropFileTypes&&-1==P(t.options.allowDropFileTypes,e.type))l();else{var n=new FileReader;n.onerror=function(){return l()},n.onload=function(){var e=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[r]=e),l()},n.readAsText(e)}},u=0;u<n.length;u++)c(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),eo(t.doc,Si(r,r)),h)for(var p=0;p<h.length;++p)mo(t.doc,"",h[p].anchor,h[p].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Io(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Oo(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),r=[],n=0;n<t.length;n++){var i=t[n].CodeMirror;i&&r.push(i)}r.length&&r[0].operation((function(){for(var t=0;t<r.length;t++)e(r[t])}))}}var Ro=!1;function jo(){var e;Ro||(de(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Oo(zo)}),100))})),de(window,"blur",(function(){return Oo(Sn)})),Ro=!0)}function zo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Bo={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"},Po=0;Po<10;Po++)Bo[Po+48]=Bo[Po+96]=String(Po);for(var qo=65;qo<=90;qo++)Bo[qo]=String.fromCharCode(qo);for(var Ho=1;Ho<=12;Ho++)Bo[Ho+111]=Bo[Ho+63235]="F"+Ho;var Wo={};function Uo(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function $o(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=Z(r.split(" "),Uo),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=n):(s=i.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[r]}for(var c in t)e[c]=t[c];return e}function Vo(e,t,r,n){var i=(t=Xo(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Vo(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var a=Vo(e,t.fallthrough[o],r,n);if(a)return a}}}function Ko(e){var t="string"==typeof e?e:Bo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Go(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(w?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(w?t.ctrlKey:t.metaKey)&&"Mod"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Zo(e,t){if(d&&34==e.keyCode&&e.char)return!1;var r=Bo[e.keyCode];return null!=r&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(r=e.code),Go(r,e,t))}function Xo(e){return"string"==typeof e?Wo[e]:e}function Jo(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&tt(o.from,G(n).to)<=0;){var a=n.pop();if(tt(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}Qn(e,(function(){for(var t=n.length-1;t>=0;t--)mo(e.doc,"",n[t].from,n[t].to,"+delete");Dn(e)}))}function Yo(e,t,r){var n=ie(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Qo(e,t,r){var n=Yo(e,t.ch,r);return null==n?null:new et(t.line,n,r<0?"after":"before")}function ea(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ce(r,t.doc.direction);if(o){var a,s=i<0?G(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Dr(t,r);a=i<0?r.text.length-1:0;var u=Fr(t,c,a).top;a=oe((function(e){return Fr(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Yo(r,a,1))}else a=i<0?s.to:s.from;return new et(n,a,l)}}return new et(n,i<0?r.text.length:0,i<0?"before":"after")}Wo.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"},Wo.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"},Wo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Wo.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"]},Wo.default=y?Wo.macDefault:Wo.pcDefault;var ta={selectAll:so,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),H)},killLine:function(e){return Jo(e,(function(t){if(t.empty()){var r=Ve(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:et(t.head.line+1,0)}:{from:t.head,to:et(t.head.line,r)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Jo(e,(function(t){return{from:et(t.from().line,0),to:st(e.doc,et(t.to().line+1,0))}}))},delLineLeft:function(e){return Jo(e,(function(e){return{from:et(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Jo(e,(function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Jo(e,(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}}))},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(et(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(et(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return ra(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return na(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var r=Ve(e.doc,t),n=function(e){for(var t;t=Ot(e);)e=t.find(1,!0).line;return e}(r);return n!=r&&(t=Xe(n)),ea(!0,e,r,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")}),U)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")}),U)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?na(e,t.head):n}),U)},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("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=z(e.getLine(o.line),o.ch,n);t.push(K(n-a%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Qn(e,(function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=Ve(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new et(i.line,i.ch-1)),i.ch>0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ve(e.doc,i.line-1).text;a&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(i.line-1,a.length-1),i,"+transpose"))}r.push(new Ci(i,i))}e.setSelections(r)}))},newlineAndIndent:function(e){return Qn(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Dn(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function ra(e,t){var r=Ve(e.doc,t),n=zt(r);return n!=r&&(t=Xe(n)),ea(!0,e,n,t,1)}function na(e,t){var r=ra(e,t.line),n=Ve(e.doc,r.line),i=ce(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(r.ch,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;return et(r.line,a?0:o,r.sticky)}return r}function ia(e,t,r){if("string"==typeof t&&!(t=ta[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=q}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}var oa=new B;function aa(e,t,r,n){var i=e.state.keySeq;if(i){if(Ko(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:oa.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),sa(e,i+" "+t,r,n))return!0}return sa(e,t,r,n)}function sa(e,t,r,n){var i=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Vo(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Vo(t,e.options.extraKeys,r,e)||Vo(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&sr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(be(r),xn(e)),!!i}function la(e,t){var r=Zo(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?aa(e,"Shift-"+r,t,(function(t){return ia(e,t,!0)}))||aa(e,r,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ia(e,t)})):aa(e,r,t,(function(t){return ia(e,t)})))}var ca=null;function ua(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=F(),me(t,e)))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var i=la(t,e);d&&(ca=i?n:null,i||88!=n||Ne||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),r&&!y&&!i&&46==n&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(A(t,"CodeMirror-crosshair"),pe(document,"keyup",r),pe(document,"mouseover",r))}N(t,"CodeMirror-crosshair"),de(document,"keyup",r),de(document,"mouseover",r)}(t)}}function da(e){16==e.keyCode&&(this.doc.sel.shift=!1),me(this,e)}function ha(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||xr(t.display,e)||me(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(d&&r==ca)return ca=null,void be(e);if(!d||e.which&&!(e.which<10)||!la(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(function(e,t,r){return aa(e,"'"+r+"'",t,(function(t){return ia(e,t,!0)}))}(t,e,i)||t.display.input.onKeyPress(e))}}}var pa,fa,ma=function(e,t,r){this.time=e,this.pos=t,this.button=r};function ga(e){var t=this,r=t.display;if(!(me(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,xr(r,e))l||(r.scroller.draggable=!1,setTimeout((function(){return r.scroller.draggable=!0}),100));else if(!ba(t,e)){var n=cn(t,e),i=_e(e),o=n?function(e,t){var r=+new Date;return fa&&fa.compare(r,e,t)?(pa=fa=null,"triple"):pa&&pa.compare(r,e,t)?(fa=new ma(r,e,t),pa=null,"double"):(pa=new ma(r,e,t),fa=null,"single")}(n,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&function(e,t,r,n,i){var o="Click";return"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o),aa(e,Go(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=ta[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=q}finally{e.state.suppressEdits=!1}return n}))}(t,i,n,o,e)||(1==i?n?function(e,t,r,n){a?setTimeout(R(wn,e),0):e.curOp.focus=F();var i,o=function(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=b?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey),null==i.addNew&&(i.addNew=y?r.metaKey:r.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(y?r.altKey:r.ctrlKey)),i}(e,r,n),c=e.doc.sel;e.options.dragDrop&&Le&&!e.isReadOnly()&&"single"==r&&(i=c.contains(t))>-1&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,r,n){var i=e.display,o=!1,c=ei(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,pe(i.wrapper.ownerDocument,"mouseup",c),pe(i.wrapper.ownerDocument,"mousemove",u),pe(i.scroller,"dragstart",d),pe(i.scroller,"drop",c),o||(be(t),n.addNew||Gi(e.doc,r,null,null,n.extend),l&&!h||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),de(i.wrapper.ownerDocument,"mouseup",c),de(i.wrapper.ownerDocument,"mousemove",u),de(i.scroller,"dragstart",d),de(i.scroller,"drop",c),Cn(e),setTimeout((function(){return i.input.focus()}),20)}(e,n,t,o):function(e,t,r,n){var i=e.display,o=e.doc;be(t);var a,s,l=o.sel,c=l.ranges;if(n.addNew&&!n.extend?(s=o.sel.contains(r),a=s>-1?c[s]:new Ci(r,r)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(a=new Ci(r,r)),r=cn(e,t,!0,!0),s=-1;else{var u=va(e,r,n.unit);a=n.extend?Ki(a,u.anchor,u.head,n.extend):u}n.addNew?-1==s?(s=c.length,Qi(o,_i(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==n.unit&&!n.extend?(Qi(o,_i(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Xi(o,s,a,W):(s=0,Qi(o,new wi([a],0),W),l=o.sel);var d=r;function h(t){if(0!=tt(d,t))if(d=t,"rectangle"==n.unit){for(var i=[],c=e.options.tabSize,u=z(Ve(o,r.line).text,r.ch,c),h=z(Ve(o,t.line).text,t.ch,c),p=Math.min(u,h),f=Math.max(u,h),m=Math.min(r.line,t.line),g=Math.min(e.lastLine(),Math.max(r.line,t.line));m<=g;m++){var v=Ve(o,m).text,y=$(v,p,c);p==f?i.push(new Ci(et(m,y),et(m,y))):v.length>y&&i.push(new Ci(et(m,y),et(m,$(v,f,c))))}i.length||i.push(new Ci(r,r)),Qi(o,_i(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,k=a,x=va(e,t,n.unit),w=k.anchor;tt(x.anchor,w)>0?(b=x.head,w=ot(k.from(),x.anchor)):(b=x.anchor,w=it(k.to(),x.head));var C=l.ranges.slice(0);C[s]=function(e,t){var r=t.anchor,n=t.head,i=Ve(e.doc,r.line);if(0==tt(r,n)&&r.sticky==n.sticky)return t;var o=ce(i);if(!o)return t;var a=se(o,r.ch,r.sticky),s=o[a];if(s.from!=r.ch&&s.to!=r.ch)return t;var l,c=a+(s.from==r.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(n.line!=r.line)l=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(o,n.ch,n.sticky),d=u-a||(n.ch-r.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=o[c+(l?-1:0)],p=l==(1==h.level),f=p?h.from:h.to,m=p?"after":"before";return r.ch==f&&r.sticky==m?t:new Ci(new et(r.line,f,m),n)}(e,new Ci(st(o,w),b)),Qi(o,_i(e,C,s),W)}}var p=i.wrapper.getBoundingClientRect(),f=0;function m(t){var r=++f,a=cn(e,t,!0,"rectangle"==n.unit);if(a)if(0!=tt(a,d)){e.curOp.focus=F(),h(a);var s=Mn(i,o);(a.line>=s.to||a.line<s.from)&&setTimeout(ei(e,(function(){f==r&&m(t)})),150)}else{var l=t.clientY<p.top?-20:t.clientY>p.bottom?20:0;l&&setTimeout(ei(e,(function(){f==r&&(i.scroller.scrollTop+=l,m(t))})),50)}}function g(t){e.state.selectingText=!1,f=1/0,t&&(be(t),i.input.focus()),pe(i.wrapper.ownerDocument,"mousemove",v),pe(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var v=ei(e,(function(e){0!==e.buttons&&_e(e)?m(e):g(e)})),y=ei(e,g);e.state.selectingText=y,de(i.wrapper.ownerDocument,"mousemove",v),de(i.wrapper.ownerDocument,"mouseup",y)}(e,n,t,o)}(t,n,o,e):Ce(e)==r.scroller&&be(e):2==i?(n&&Gi(t.doc,n),setTimeout((function(){return r.input.focus()}),20)):3==i&&(C?t.display.input.onContextMenu(e):Cn(t)))}}function va(e,t,r){if("char"==r)return new Ci(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new Ci(et(t.line,0),st(e.doc,et(t.line+1,0)));var n=r(e,t);return new Ci(n.from,n.to)}function ya(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&be(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ve(e,r))return xe(t);o-=s.top-a.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return fe(e,r,e,Je(e.doc,o),e.display.gutterSpecs[l].className,t),xe(t)}}function ba(e,t){return ya(e,t,"gutterClick",!0)}function ka(e,t){xr(e.display,t)||function(e,t){return!!ve(e,"gutterContextMenu")&&ya(e,t,"gutterContextMenu",!1)}(e,t)||me(e,t,"contextmenu")||C||e.display.input.onContextMenu(t)}function xa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Br(e)}ma.prototype.compare=function(e,t,r){return this.time+400>e&&0==tt(t,this.pos)&&r==this.button};var wa={toString:function(){return"CodeMirror.Init"}},Ca={},_a={};function Sa(e,t,r){if(!t!=!(r&&r!=wa)){var n=e.display.dragFunctions,i=t?de:pe;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Aa(e){e.options.lineWrapping?(N(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(A(e.display.wrapper,"CodeMirror-wrap"),$t(e)),ln(e),dn(e),Br(e),setTimeout((function(){return qn(e)}),100)}function La(e,t){var r=this;if(!(this instanceof La))return new La(e,t);this.options=t=t?j(t):{},j(Ca,t,!1);var n=t.value;"string"==typeof n?n=new Do(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new La.inputStyles[t.inputStyle](this),o=this.display=new gi(e,n,i,t);for(var c in o.wrapper.CodeMirror=this,xa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Un(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 B,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),function(e){var t=e.display;de(t.scroller,"mousedown",ei(e,ga)),de(t.scroller,"dblclick",a&&s<11?ei(e,(function(t){if(!me(e,t)){var r=cn(e,t);if(r&&!ba(e,t)&&!xr(e.display,t)){be(t);var n=e.findWordAt(r);Gi(e.doc,n.anchor,n.head)}}})):function(t){return me(e,t)||be(t)}),de(t.scroller,"contextmenu",(function(t){return ka(e,t)})),de(t.input.getField(),"contextmenu",(function(r){t.scroller.contains(r.target)||ka(e,r)}));var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout((function(){return t.activeTouch=null}),1e3),(n=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function l(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}de(t.scroller,"touchstart",(function(i){if(!me(e,i)&&!o(i)&&!ba(e,i)){t.input.ensurePolled(),clearTimeout(r);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),de(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),de(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!xr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!n.prev||l(n,n.prev)?new Ci(a,a):!n.prev.prev||l(n,n.prev.prev)?e.findWordAt(a):new Ci(et(a.line,0),st(e.doc,et(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),be(r)}i()})),de(t.scroller,"touchcancel",i),de(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(On(e,t.scroller.scrollTop),jn(e,t.scroller.scrollLeft,!0),fe(e,"scroll",e))})),de(t.scroller,"mousewheel",(function(t){return xi(e,t)})),de(t.scroller,"DOMMouseScroll",(function(t){return xi(e,t)})),de(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){me(e,t)||we(t)},over:function(t){me(e,t)||(function(e,t){var r=cn(e,t);if(r){var n=document.createDocumentFragment();yn(e,r,n),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),M(e.display.dragCursor,n)}}(e,t),we(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Fo<100))we(t);else if(!me(e,t)&&!xr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var r=T("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),d&&r.parentNode.removeChild(r)}}(e,t)},drop:ei(e,No),leave:function(t){me(e,t)||Io(e)}};var c=t.input.getField();de(c,"keyup",(function(t){return da.call(e,t)})),de(c,"keydown",ei(e,ua)),de(c,"keypress",ei(e,ha)),de(c,"focus",(function(t){return _n(e,t)})),de(c,"blur",(function(t){return Sn(e,t)}))}(this),jo(),Vn(this),this.curOp.forceUpdate=!0,Oi(this,n),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&_n(r)}),20):Sn(this),_a)_a.hasOwnProperty(c)&&_a[c](this,t[c],wa);hi(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ma.length;++u)Ma[u](this);Kn(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}La.defaults=Ca,La.optionHandlers=_a;var Ma=[];function Ta(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=pt(e,t).state:r="prev");var a=e.options.tabSize,s=Ve(o,t),l=z(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((c=o.mode.indent(i,s.text.slice(u.length),s.text))==q||c>150)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>o.first?z(Ve(o,t-1).text,null,a):0:"add"==r?c=l+e.options.indentUnit:"subtract"==r?c=l-e.options.indentUnit:"number"==typeof r&&(c=l+r),c=Math.max(0,c);var d="",h=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)h+=a,d+="\t";if(h<c&&(d+=K(c-h)),d!=u)return mo(o,d,et(t,0),et(t,u.length),"+input"),s.stateAfter=null,!0;for(var f=0;f<o.sel.ranges.length;f++){var m=o.sel.ranges[f];if(m.head.line==t&&m.head.ch<u.length){var g=et(t,u.length);Xi(o,f,new Ci(g,g));break}}}La.defineInitHook=function(e){return Ma.push(e)};var Ea=null;function Da(e){Ea=e}function Fa(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var a=+new Date-200,s="paste"==i||e.state.pasteIncoming>a,l=De(t),c=null;if(s&&n.ranges.length>1)if(Ea&&Ea.text.join("\n")==t){if(n.ranges.length%Ea.text.length==0){c=[];for(var u=0;u<Ea.text.length;u++)c.push(o.splitLines(Ea.text[u]))}}else l.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(c=Z(l,(function(e){return[e]})));for(var d=e.curOp.updateInput,h=n.ranges.length-1;h>=0;h--){var p=n.ranges[h],f=p.from(),m=p.to();p.empty()&&(r&&r>0?f=et(f.line,f.ch-r):e.state.overwrite&&!s?m=et(m.line,Math.min(Ve(o,m.line).text.length,m.ch+G(l).length)):s&&Ea&&Ea.lineWise&&Ea.text.join("\n")==l.join("\n")&&(f=m=et(f.line,0)));var g={from:f,to:m,text:c?c[h%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};co(e.doc,g),sr(e,"inputRead",e,g)}t&&!s&&Ia(e,t),Dn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Na(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Qn(t,(function(){return Fa(t,r,0,null,"paste")})),!0}function Ia(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Ta(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ve(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ta(e,i.head.line,"smart"));a&&sr(e,"electricInput",e,i.head.line)}}}function Oa(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:et(i,0),head:et(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Ra(e,t,r,n){e.setAttribute("autocorrect",r?"":"off"),e.setAttribute("autocapitalize",n?"":"off"),e.setAttribute("spellcheck",!!t)}function ja(){var e=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),Ra(e),t}function za(e,t,r,n,i){var o=t,a=r,s=Ve(e,t.line),l=i&&"rtl"==e.direction?-r:r;function c(o){var a,c;if("codepoint"==n){var u=s.text.charCodeAt(t.ch+(n>0?0:-1));a=isNaN(u)?null:new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(u>=55296&&u<56320?2:1))),-r)}else a=i?function(e,t,r,n){var i=ce(t,e.doc.direction);if(!i)return Qo(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=se(i,r.ch,r.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from<r.ch))return Qo(t,r,n);var s,l=function(e,r){return Yo(t,e instanceof et?e.ch:e,r)},c=function(r){return e.options.lineWrapping?(s=s||Dr(e,t),Jr(e,t,s,r)):{begin:0,end:t.text.length}},u=c("before"==r.sticky?l(r,-1):r.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==n<0,h=l(r,d?1:-1);if(null!=h&&(d?h<=a.to&&h<=u.end:h>=a.from&&h>=u.begin)){var p=d?"before":"after";return new et(r.line,h,p)}}var f=function(e,t,n){for(var o=function(e,t){return t?new et(r.line,l(e,1),"before"):new et(r.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],s=t>0==(1!=a.level),c=s?n.begin:l(n.end,-1);if(a.from<=c&&c<a.to)return o(c,s);if(c=s?a.from:l(a.to,-1),n.begin<=c&&c<n.end)return o(c,s)}},m=f(o+n,n,u);if(m)return m;var g=n>0?u.end:l(u.begin,-1);return null==g||n>0&&g==t.text.length||!(m=f(n>0?0:i.length-1,n,c(g)))?null:m}(e.cm,s,t,r):Qo(s,t,r);if(null==a){if(o||((c=t.line+l)<e.first||c>=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(s=Ve(e,c)))))return!1;t=ea(i,e.cm,s,t.line,l)}else t=a;return!0}if("char"==n||"codepoint"==n)c();else if("column"==n)c(!0);else if("word"==n||"group"==n)for(var u=null,d="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(r<0)||c(!p);p=!1){var f=s.text.charAt(t.ch)||"\n",m=ee(f,h)?"w":d&&"\n"==f?"n":!d||/\s/.test(f)?null:"p";if(!d||p||m||(m="s"),u&&u!=m){r<0&&(r=1,c(),t.sticky="after");break}if(m&&(u=m),r>0&&!c(!p))break}var g=oo(e,t,o,a,!0);return rt(o,g)&&(g.hitSide=!0),g}function Ba(e,t,r,n){var i,o,a=e.doc,s=t.left;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rn(e.display),3);i=(r>0?t.bottom:t.top)+r*c}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=Zr(e,s,i)).outside;){if(r<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*r}return o}var Pa=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function qa(e,t){var r=Er(e,t.line);if(!r||r.hidden)return null;var n=Ve(e.doc,t.line),i=Mr(r,n,t.line),o=ce(n,e.doc.direction),a="left";o&&(a=se(o,t.ch)%2?"right":"left");var s=Or(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ha(e,t){return t&&(e.bad=!0),e}function Wa(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Ha(e.clipPos(et(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return Ua(o,t,r)}}function Ua(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!D(n,t))return Ha(et(Xe(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?G(e.rest):e.line;return Ha(et(Xe(o),o.text.length),i)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,r&&(r=a.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,r,n){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?l.map:c[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==t||s==r){var u=Xe(i<0?e.line:e.rest[i]),d=o[a]+n;return(n<0||s!=t)&&(d=o[a+(n?1:0)]),et(u,d)}}}var d=u(a,s,r);if(d)return Ha(d,i);for(var h=s.nextSibling,p=a?a.nodeValue.length-r:0;h;h=h.nextSibling){if(d=u(h,h.firstChild,0))return Ha(et(d.line,d.ch-p),i);p+=h.textContent.length}for(var f=s.previousSibling,m=r;f;f=f.previousSibling){if(d=u(f,f.firstChild,-1))return Ha(et(d.line,d.ch+m),i);m+=f.textContent.length}}Pa.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!me(n,e)){if(n.somethingSelected())Da({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Oa(n);Da({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation((function(){n.setSelections(t.ranges,0,H),n.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Ea.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=ja(),l=s.firstChild;n.display.lineSpace.insertBefore(s,n.display.lineSpace.firstChild),l.value=Ea.text.join("\n");var c=document.activeElement;O(l),setTimeout((function(){n.display.lineSpace.removeChild(s),c.focus(),c==i&&r.showPrimarySelection()}),50)}}Ra(i,n.options.spellcheck,n.options.autocorrect,n.options.autocapitalize),de(i,"paste",(function(e){!o(e)||me(n,e)||Na(e,n)||s<=11&&setTimeout(ei(n,(function(){return t.updateFromDOM()})),20)})),de(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),de(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),de(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),de(i,"touchstart",(function(){return r.forceCompositionEnd()})),de(i,"input",(function(){t.composing||t.readFromDOMSoon()})),de(i,"copy",a),de(i,"cut",a)},Pa.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Pa.prototype.prepareSelection=function(){var e=vn(this.cm,!1);return e.focus=document.activeElement==this.div,e},Pa.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Pa.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Pa.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),i=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=Wa(t,e.anchorNode,e.anchorOffset),s=Wa(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=tt(ot(a,s),i)||0!=tt(it(a,s),o)){var l=t.display.view,c=i.line>=t.display.viewFrom&&qa(t,i)||{node:l[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&qa(t,o);if(!u){var d=l[l.length-1].measure,h=d.maps?d.maps[d.maps.length-1]:d.map;u={node:h[h.length-1],offset:h[h.length-2]-h[h.length-3]}}if(c&&u){var p,f=e.rangeCount&&e.getRangeAt(0);try{p=S(c.node,c.offset,u.offset,u.node)}catch(e){}p&&(!r&&t.state.focused?(e.collapse(c.node,c.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),f&&null==e.anchorNode?e.addRange(f):r&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Pa.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)},Pa.prototype.showMultipleSelections=function(e){M(this.cm.display.cursorDiv,e.cursors),M(this.cm.display.selectionDiv,e.selection)},Pa.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Pa.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return D(this.div,t)},Pa.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Pa.prototype.blur=function(){this.div.blur()},Pa.prototype.getField=function(){return this.div},Pa.prototype.supportsTouch=function(){return!0},Pa.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Qn(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}))},Pa.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Pa.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(g&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Wa(t,e.anchorNode,e.anchorOffset),n=Wa(t,e.focusNode,e.focusOffset);r&&n&&Qn(t,(function(){Qi(t.doc,Si(r,n),H),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)}))}}},Pa.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>n.firstLine()&&(a=et(a.line-1,Ve(n.doc,a.line-1).length)),s.ch==Ve(n.doc,s.line).text.length&&s.line<n.lastLine()&&(s=et(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=un(n,a.line))?(t=Xe(i.view[0].line),r=i.view[0].node):(t=Xe(i.view[e].line),r=i.view[e-1].node.nextSibling);var l,c,u=un(n,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=Xe(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!r)return!1;for(var d=n.doc.splitLines(function(e,t,r,n,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(e){e&&(c(),o+=e)}function d(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void u(r);var o,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(et(n,0),et(i+1,0),(g=+h,function(e){return e.id==g}));return void(p.length&&(o=p[0].find(0))&&u(Ke(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var f=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;f&&c();for(var m=0;m<t.childNodes.length;m++)d(t.childNodes[m]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),f&&(a=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var g}for(;d(t),t!=r;)t=t.nextSibling,l=!1;return o}(n,r,c,t,l)),h=Ke(n.doc,et(t,0),et(l,Ve(n.doc,l).text.length));d.length>1&&h.length>1;)if(G(d)==G(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),t++}for(var p=0,f=0,m=d[0],g=h[0],v=Math.min(m.length,g.length);p<v&&m.charCodeAt(p)==g.charCodeAt(p);)++p;for(var y=G(d),b=G(h),k=Math.min(y.length-(1==d.length?p:0),b.length-(1==h.length?p:0));f<k&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1);)++f;if(1==d.length&&1==h.length&&t==a.line)for(;p&&p>a.ch&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1);)p--,f++;d[d.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var x=et(t,p),w=et(l,h.length?G(h).length-f:0);return d.length>1||d[0]||tt(x,w)?(mo(n.doc,d,x,w,"+input"),!0):void 0},Pa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Pa.prototype.reset=function(){this.forceCompositionEnd()},Pa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Pa.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Pa.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Qn(this.cm,(function(){return dn(e.cm)}))},Pa.prototype.setUneditable=function(e){e.contentEditable="false"},Pa.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ei(this.cm,Fa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Pa.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Pa.prototype.onContextMenu=function(){},Pa.prototype.resetPosition=function(){},Pa.prototype.needsContentAttribute=!0;var $a=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};$a.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!me(n,e)){if(n.somethingSelected())Da({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Oa(n);Da({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,H):(r.prevInput="",i.value=t.text.join("\n"),O(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),de(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),de(i,"paste",(function(e){me(n,e)||Na(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),de(i,"cut",o),de(i,"copy",o),de(e.scroller,"paste",(function(t){if(!xr(e,t)&&!me(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),de(e.lineSpace,"selectstart",(function(t){xr(e,t)||be(t)})),de(i,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),de(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},$a.prototype.createField=function(e){this.wrapper=ja(),this.textarea=this.wrapper.firstChild},$a.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$a.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=vn(e);if(e.options.moveInputWithCursor){var i=Vr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},$a.prototype.showSelection=function(e){var t=this.cm.display;M(t.cursorDiv,e.cursors),M(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$a.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&O(this.textarea),a&&s>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},$a.prototype.getField=function(){return this.textarea},$a.prototype.supportsTouch=function(){return!1},$a.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||F()!=this.textarea))try{this.textarea.focus()}catch(e){}},$a.prototype.blur=function(){this.textarea.blur()},$a.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$a.prototype.receivedFocus=function(){this.slowPoll()},$a.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},$a.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}))},$a.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Fe(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(n.length,i.length);l<c&&n.charCodeAt(l)==i.charCodeAt(l);)++l;return Qn(t,(function(){Fa(t,i.slice(l),n.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},$a.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$a.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},$a.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=cn(r,e),c=n.scroller.scrollTop;if(o&&!d){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&ei(r,Qi)(r.doc,Si(o),H);var u,h=i.style.cssText,p=t.wrapper.style.cssText,f=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),n.input.focus(),l&&window.scrollTo(null,u),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=v,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),a&&s>=9&&g(),C){we(e);var m=function(){pe(window,"mouseup",m),setTimeout(v,20)};de(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=i.selectionStart){var e=r.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function v(){if(t.contextMenuPending==v&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=h,a&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&g();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?ei(r,so)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},$a.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},$a.prototype.setUneditable=function(){},$a.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=wa&&i(e,t,r)}:i)}e.defineOption=r,e.Init=wa,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,Ei(e)}),!0),r("indentUnit",2,Ei,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){Di(e),Br(e),dn(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(et(n,o))}n++}));for(var i=r.length-1;i>=0;i--)mo(e.doc,t,r[i],et(r[i].line,r[i].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=wa&&e.refresh()})),r("specialCharPlaceholder",Yt,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!k),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){xa(e),mi(e)}),!0),r("keyMap","default",(function(e,t,r){var n=Xo(t),i=r!=wa&&Xo(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Aa,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=pi(t,e.options.lineNumbers),mi(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?an(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return qn(e)}),!0),r("scrollbarStyle","native",(function(e){Un(e),qn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=pi(e.options.gutters,t),mi(e)}),!0),r("firstLineNumber",1,mi,!0),r("lineNumberFormatter",(function(e){return e}),mi,!0),r("showCursorWhenSelecting",!1,gn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(Sn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Sa),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,gn,!0),r("singleCursorHeightPerLine",!0,gn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Di,!0),r("addModeClass",!1,Di,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,Di,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}(La),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&ei(this,t[e])(this,r,i),fe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Xo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:ti((function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");(function(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)})(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},(function(e){return e.priority})),this.state.modeGen++,dn(this)})),removeOverlay:ti((function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void dn(this)}})),indentLine:ti((function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Ye(this.doc,e)&&Ta(this,e,t,r)})),indentSelection:ti((function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(Ta(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&Dn(this));else{var o=i.from(),a=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<r;++l)Ta(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[n].from().ch>0&&Xi(this.doc,n,new Ci(o,c[n].to()),H)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,r=ht(this,Ve(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]<o)){t=r[2*a+2];break}n=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var s=i[o[t][a]];s&&n.push(s)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(o,this)&&-1==P(n,c.val)&&n.push(c.val)}return n},getStateAfter:function(e,t){var r=this.doc;return pt(this,(e=at(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return Vr(this,null==e?r.head:"object"==typeof e?st(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return $r(this,st(this.doc,e),t||"page")},coordsChar:function(e,t){return Zr(this,(e=Ur(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Ur(this,{top:e,left:0},t||"page").top,Je(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=Ve(this.doc,e)}else n=e;return Wr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-Wt(n):0)},defaultTextHeight:function(){return rn(this.display)},defaultCharWidth:function(){return nn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,a,s,l=this.display,c=(e=Vr(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==n)c=e.top;else if("above"==n||"near"==n){var d=Math.max(l.wrapper.clientHeight,this.doc.height),h=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(c=e.bottom),u+t.offsetWidth>h&&(u=h-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),r&&(o=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Tn(o,a)).scrollTop&&On(o,s.scrollTop),null!=s.scrollLeft&&jn(o,s.scrollLeft))},triggerOnKeyDown:ti(ua),triggerOnKeyPress:ti(ha),triggerOnKeyUp:da,triggerOnMouseDown:ti(ga),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:ti((function(e){Ia(this,e)})),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),a=0;a<t&&!(o=za(this.doc,o,i,r,n)).hitSide;++a);return o},moveH:ti((function(e,t){var r=this;this.extendSelectionsBy((function(n){return r.display.shift||r.doc.extend||n.empty()?za(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()}),U)})),deleteH:ti((function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Jo(this,(function(r){var i=za(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}}))})),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var a=st(this.doc,e),s=0;s<t;++s){var l=Vr(this,a,"div");if(null==o?o=l.left:l.left=o,(a=Ba(this,l,i,r)).hitSide)break}return a},moveV:ti((function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var s=Vr(r,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Ba(r,s,e,t);return"page"==t&&a==n.sel.primary()&&En(r,$r(r,l,"div").top-s.top),l}),U),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=Ve(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),a=ee(o,i)?function(e){return ee(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ee(e)};r>0&&a(t.charAt(r-1));)--r;for(;n<t.length&&a(t.charAt(n));)++n}return new Ci(et(e.line,r),et(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?N(this.display.cursorDiv,"CodeMirror-overwrite"):A(this.display.cursorDiv,"CodeMirror-overwrite"),fe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==F()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ti((function(e,t){Fn(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Sr(this)-this.display.barHeight,width:e.scrollWidth-Sr(this)-this.display.barWidth,clientHeight:Lr(this),clientWidth:Ar(this)}},scrollIntoView:ti((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:et(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Nn(e),e.curOp.scrollToPos=t}(this,e):In(this,e.from,e.to,e.margin)})),setSize:ti((function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&zr(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){hn(r,i,"widget");break}++i})),this.curOp.forceUpdate=!0,fe(this,"refresh",this)})),operation:function(e){return Qn(this,e)},startOperation:function(){return Vn(this)},endOperation:function(){return Kn(this)},refresh:ti((function(){var e=this.display.cachedTextHeight;dn(this),this.curOp.forceUpdate=!0,Br(this),Fn(this,this.doc.scrollLeft,this.doc.scrollTop),ci(this.display),(null==e||Math.abs(e-rn(this.display))>.5||this.options.lineWrapping)&&ln(this),fe(this,"refresh",this)})),swapDoc:ti((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Oi(this,e),Br(this),this.display.input.reset(),Fn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},ye(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(La);var Va="iter insert remove copy getEditor constructor".split(" ");for(var Ka in Do.prototype)Do.prototype.hasOwnProperty(Ka)&&P(Va,Ka)<0&&(La.prototype[Ka]=function(e){return function(){return e.apply(this.doc,arguments)}}(Do.prototype[Ka]));return ye(Do),La.inputStyles={textarea:$a,contenteditable:Pa},La.defineMode=function(e){La.defaults.mode||"null"==e||(La.defaults.mode=e),je.apply(this,arguments)},La.defineMIME=function(e,t){Re[e]=t},La.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),La.defineMIME("text/plain","null"),La.defineExtension=function(e,t){La.prototype[e]=t},La.defineDocExtension=function(e,t){Do.prototype[e]=t},La.fromTextArea=function(e,t){if((t=t?j(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=F();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(de(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=La((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=pe,e.on=de,e.wheelEventPixels=ki,e.Doc=Do,e.splitLines=De,e.countColumn=z,e.findColumn=$,e.isWordChar=Q,e.Pass=q,e.signal=fe,e.Line=Vt,e.changeEnd=Ai,e.scrollbarModel=Wn,e.Pos=et,e.cmpPos=tt,e.modes=Oe,e.mimeModes=Re,e.resolveMode=ze,e.getMode=Be,e.modeExtensions=Pe,e.extendMode=qe,e.copyState=He,e.startState=Ue,e.innerMode=We,e.commands=ta,e.keyMap=Wo,e.keyName=Zo,e.isModifierKey=Ko,e.lookupKey=Vo,e.normalizeKeyMap=$o,e.StringStream=$e,e.SharedTextMarker=Lo,e.TextMarker=So,e.LineWidget=wo,e.e_preventDefault=be,e.e_stopPropagation=ke,e.e_stop=we,e.addClass=N,e.contains=D,e.rmClass=A,e.keyNames=Bo}(La),La.version="5.58.2",La}()},"./node_modules/codemirror/mode/gfm/gfm.js":(e,t,r)=>{!function(e){"use strict";var t=/^((?:(?: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;e.defineMode("gfm",(function(r,n){var i=0;var o={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,r){if(r.combineTokens=null,r.codeBlock)return e.match(/^```+/)?(r.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(r.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),r.codeBlock=!0,null;if("`"===e.peek()){e.next();var o=e.pos;e.eatWhile("`");var a=1+e.pos-o;return r.code?a===i&&(r.code=!1):(i=a,r.code=!0),null}if(r.code)return e.next(),null;if(e.eatSpace())return r.ateSpace=!0,null;if((e.sol()||r.ateSpace)&&(r.ateSpace=!1,!1!==n.gitHubSpice)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return r.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return r.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(r.combineTokens=!0,"link"):(e.next(),null)},blankLine:function(e){return e.code=!1,null}},a={taskLists:!0,strikethrough:!0,emoji:!0};for(var s in n)a[s]=n[s];return a.name="markdown",e.overlayMode(e.getMode(r,a),o)}),"markdown"),e.defineMIME("text/x-gfm","gfm")}(r("./node_modules/codemirror/lib/codemirror.js"),r("./node_modules/codemirror/mode/markdown/markdown.js"),r("./node_modules/codemirror/addon/mode/overlay.js"))},"./node_modules/codemirror/mode/markdown/markdown.js":(e,t,r)=>{!function(e){"use strict";e.defineMode("markdown",(function(t,r){var n=e.getMode(t,"text/html"),i="null"==n.name;void 0===r.highlightFormatting&&(r.highlightFormatting=!1),void 0===r.maxBlockquoteDepth&&(r.maxBlockquoteDepth=0),void 0===r.taskLists&&(r.taskLists=!1),void 0===r.strikethrough&&(r.strikethrough=!1),void 0===r.emoji&&(r.emoji=!1),void 0===r.fencedCodeBlockHighlighting&&(r.fencedCodeBlockHighlighting=!0),void 0===r.fencedCodeBlockDefaultMode&&(r.fencedCodeBlockDefaultMode="text/plain"),void 0===r.xml&&(r.xml=!0),void 0===r.tokenTypeOverrides&&(r.tokenTypeOverrides={});var o={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 a in o)o.hasOwnProperty(a)&&r.tokenTypeOverrides[a]&&(o[a]=r.tokenTypeOverrides[a]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,l=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,c=/^\[(x| )\](?=\s)/i,u=r.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,h=/^[^#!\[\]*_\\<>` "'(~:]+/,p=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/;function g(e,t,r){return t.f=t.inline=r,r(e,t)}function v(e,t,r){return t.f=t.block=r,r(e,t)}function y(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==k){var r=i;if(!r){var o=e.innerMode(n,t.htmlState);r="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}r&&(t.f=_,t.block=b,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function b(n,i){var a,h=n.column()===i.indentation,m=!(a=i.prevLine.stream)||!/\S/.test(a.string),v=i.indentedCode,y=i.prevLine.hr,b=!1!==i.list,k=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var C=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,b)){for(i.list=null;C<i.listStack[i.listStack.length-1];)i.listStack.pop(),i.listStack.length?i.indentation=i.listStack[i.listStack.length-1]:i.list=!1;!1!==i.list&&(i.indentationDiff=C-i.listStack[i.listStack.length-1])}var _=!(m||y||i.prevLine.header||b&&v||i.prevLine.fencedCodeEnd),S=(!1===i.list||y||m)&&i.indentation<=k&&n.match(s),A=null;if(i.indentationDiff>=4&&(v||i.prevLine.fencedCodeEnd||i.prevLine.header||m))return n.skipToEnd(),i.indentedCode=!0,o.code;if(n.eatSpace())return null;if(h&&i.indentation<=k&&(A=n.match(u))&&A[1].length<=6)return i.quote=0,i.header=A[1].length,i.thisLine.header=!0,r.highlightFormatting&&(i.formatting="header"),i.f=i.inline,w(i);if(i.indentation<=k&&n.eat(">"))return i.quote=h?1:i.quote+1,r.highlightFormatting&&(i.formatting="quote"),n.eatSpace(),w(i);if(!S&&!i.setext&&h&&i.indentation<=k&&(A=n.match(l))){var L=A[1]?"ol":"ul";return i.indentation=C+n.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,r.taskLists&&n.match(c,!1)&&(i.taskList=!0),i.f=i.inline,r.highlightFormatting&&(i.formatting=["list","list-"+L]),w(i)}return h&&i.indentation<=k&&(A=n.match(p,!0))?(i.quote=0,i.fencedEndRE=new RegExp(A[1]+"+ *$"),i.localMode=r.fencedCodeBlockHighlighting&&function(r){if(e.findModeByName){var n=e.findModeByName(r);n&&(r=n.mime||n.mimes[0])}var i=e.getMode(t,r);return"null"==i.name?null:i}(A[2]||r.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=x,r.highlightFormatting&&(i.formatting="code-block"),i.code=-1,w(i)):i.setext||!(_&&b||i.quote||!1!==i.list||i.code||S||f.test(n.string))&&(A=n.lookAhead(1))&&(A=A.match(d))?(i.setext?(i.header=i.setext,i.setext=0,n.skipToEnd(),r.highlightFormatting&&(i.formatting="header")):(i.header="="==A[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,w(i)):S?(n.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,o.hr):"["===n.peek()?g(n,i,M):g(n,i,i.inline)}function k(t,r){var o=n.token(t,r.htmlState);if(!i){var a=e.innerMode(n,r.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||r.md_inside&&t.current().indexOf(">")>-1)&&(r.f=_,r.block=b,r.htmlState=null)}return o}function x(e,t){var n,i=t.listStack[t.listStack.length-1]||0,a=t.indentation<i,s=i+3;return t.fencedEndRE&&t.indentation<=s&&(a||e.match(t.fencedEndRE))?(r.highlightFormatting&&(t.formatting="code-block"),a||(n=w(t)),t.localMode=t.localState=null,t.block=b,t.f=_,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,a?v(e,t,t.block):n):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),o.code)}function w(e){var t=[];if(e.formatting){t.push(o.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var n=0;n<e.formatting.length;n++)t.push(o.formatting+"-"+e.formatting[n]),"header"===e.formatting[n]&&t.push(o.formatting+"-"+e.formatting[n]+"-"+e.header),"quote"===e.formatting[n]&&(!r.maxBlockquoteDepth||r.maxBlockquoteDepth>=e.quote?t.push(o.formatting+"-"+e.formatting[n]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(o.linkHref,"url"):(e.strong&&t.push(o.strong),e.em&&t.push(o.em),e.strikethrough&&t.push(o.strikethrough),e.emoji&&t.push(o.emoji),e.linkText&&t.push(o.linkText),e.code&&t.push(o.code),e.image&&t.push(o.image),e.imageAltText&&t.push(o.imageAltText,"link"),e.imageMarker&&t.push(o.imageMarker)),e.header&&t.push(o.header,o.header+"-"+e.header),e.quote&&(t.push(o.quote),!r.maxBlockquoteDepth||r.maxBlockquoteDepth>=e.quote?t.push(o.quote+"-"+e.quote):t.push(o.quote+"-"+r.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(o.list2):t.push(o.list3):t.push(o.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function C(e,t){if(e.match(h,!0))return w(t)}function _(t,i){var a=i.text(t,i);if(void 0!==a)return a;if(i.list)return i.list=null,w(i);if(i.taskList)return" "===t.match(c,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,r.highlightFormatting&&(i.formatting="task"),i.taskList=!1,w(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return r.highlightFormatting&&(i.formatting="header"),w(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var l=s;"("===s&&(l=")");var u="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(u),!0))return o.linkHref}if("`"===s){var d=i.formatting;r.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var h=t.current().length;if(0!=i.code||i.quote&&1!=h){if(h==i.code){var p=w(i);return i.code=0,p}return i.formatting=d,w(i)}return i.code=h,w(i)}if(i.code)return w(i);if("\\"===s&&(t.next(),r.highlightFormatting)){var f=w(i),g=o.formatting+"-escape";return f?f+" "+g:g}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,r.highlightFormatting&&(i.formatting="image"),w(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,r.highlightFormatting&&(i.formatting="image"),w(i);if("]"===s&&i.imageAltText){r.highlightFormatting&&(i.formatting="image");f=w(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=A,f}if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,r.highlightFormatting&&(i.formatting="link")),w(i);if("]"===s&&i.linkText){r.highlightFormatting&&(i.formatting="link");f=w(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?A:_,f}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=S,r.highlightFormatting&&(i.formatting="link"),(f=w(i))?f+=" ":f="",f+o.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=S,r.highlightFormatting&&(i.formatting="link"),(f=w(i))?f+=" ":f="",f+o.linkEmail;if(r.xml&&"<"===s&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var y=t.string.indexOf(">",t.pos);if(-1!=y){var b=t.string.substring(t.start,y);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(b)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(n),v(t,i,k)}if(r.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var x=1,C=1==t.pos?" ":t.string.charAt(t.pos-2);x<3&&t.eat(s);)x++;var L=t.peek()||" ",M=!/\s/.test(L)&&(!m.test(L)||/\s/.test(C)||m.test(C)),T=!/\s/.test(C)&&(!m.test(C)||/\s/.test(L)||m.test(L)),E=null,D=null;if(x%2&&(i.em||!M||"*"!==s&&T&&!m.test(C)?i.em!=s||!T||"*"!==s&&M&&!m.test(L)||(E=!1):E=!0),x>1&&(i.strong||!M||"*"!==s&&T&&!m.test(C)?i.strong!=s||!T||"*"!==s&&M&&!m.test(L)||(D=!1):D=!0),null!=D||null!=E)return r.highlightFormatting&&(i.formatting=null==E?"strong":null==D?"em":"strong em"),!0===E&&(i.em=s),!0===D&&(i.strong=s),p=w(i),!1===E&&(i.em=!1),!1===D&&(i.strong=!1),p}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return w(i);t.backUp(1)}if(r.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return r.highlightFormatting&&(i.formatting="strikethrough"),p=w(i),i.strikethrough=!1,p;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,r.highlightFormatting&&(i.formatting="strikethrough"),w(i)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return w(i);t.backUp(2)}if(r.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,r.highlightFormatting&&(i.formatting="emoji");var F=w(i);return i.emoji=!1,F}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),w(i)}function S(e,t){if(">"===e.next()){t.f=t.inline=_,r.highlightFormatting&&(t.formatting="link");var n=w(t);return n?n+=" ":n="",n+o.linkInline}return e.match(/^[^>]+/,!0),o.linkInline}function A(e,t){if(e.eatSpace())return null;var n,i=e.next();return"("===i||"["===i?(t.f=t.inline=(n="("===i?")":"]",function(e,t){if(e.next()===n){t.f=t.inline=_,r.highlightFormatting&&(t.formatting="link-string");var i=w(t);return t.linkHref=!1,i}return e.match(L[n]),t.linkHref=!0,w(t)}),r.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,w(t)):"error"}var L={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function M(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=T,e.next(),r.highlightFormatting&&(t.formatting="link"),t.linkText=!0,w(t)):g(e,t,_)}function T(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=E,r.highlightFormatting&&(t.formatting="link");var n=w(t);return t.linkText=!1,n}return e.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function E(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=_,o.linkHref+" url")}var D={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:_,text:C,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(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(n,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return y(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=k)){var r=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentation=r,t.indentationDiff=null,r>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==k?{state:e.htmlState,mode:n}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:D}},indent:function(t,r,i){return t.block==k&&n.indent?n.indent(t.htmlState,r,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,r,i):e.Pass},blankLine:y,getType:w,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return D}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(r("./node_modules/codemirror/lib/codemirror.js"),r("./node_modules/codemirror/mode/xml/xml.js"),r("./node_modules/codemirror/mode/meta.js"))},"./node_modules/codemirror/mode/meta.js":(e,t,r)=>{!function(e){"use strict";e.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"]},{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"]},{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 t=0;t<e.modeInfo.length;t++){var r=e.modeInfo[t];r.mimes&&(r.mime=r.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.mime==t)return n;if(n.mimes)for(var i=0;i<n.mimes.length;i++)if(n.mimes[i]==t)return n}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.ext)for(var i=0;i<n.ext.length;i++)if(n.ext[i]==t)return n}},e.findModeByFileName=function(t){for(var r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.file&&n.file.test(t))return n}var i=t.lastIndexOf("."),o=i>-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var r=0;r<e.modeInfo.length;r++){var n=e.modeInfo[r];if(n.name.toLowerCase()==t)return n;if(n.alias)for(var i=0;i<n.alias.length;i++)if(n.alias[i].toLowerCase()==t)return n}}}(r("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/codemirror/mode/xml/xml.js":(e,t,r)=>{!function(e){"use strict";var t={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},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(n,i){var o,a,s=n.indentUnit,l={},c=i.htmlMode?t:r;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function d(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();return"<"==n?e.eat("!")?e.eat("[")?e.match("CDATA[")?r(p("atom","]]>")):null:e.match("--")?r(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(f(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=h,"tag bracket"):"&"==n?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function h(e,t){var r,n,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=d,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){t.tokenize=d,t.state=y,t.tagName=t.tagStart=null;var a=t.tokenize(e,t);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(r=i,(n=function(e,t){for(;!e.eol();)if(e.next()==r){t.tokenize=h;break}return"string"}).isInAttribute=!0,n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e,t){return function(r,n){for(;!r.eol();){if(r.match(t)){n.tokenize=d;break}r.next()}return e}}function f(e){return function(t,r){for(var n;null!=(n=t.next());){if("<"==n)return r.tokenize=f(e+1),r.tokenize(t,r);if(">"==n){if(1==e){r.tokenize=d;break}return r.tokenize=f(e-1),r.tokenize(t,r)}}return"meta"}}function m(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function g(e){e.context&&(e.context=e.context.prev)}function v(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!l.contextGrabbers.hasOwnProperty(r)||!l.contextGrabbers[r].hasOwnProperty(t))return;g(e)}}function y(e,t,r){return"openTag"==e?(r.tagStart=t.column(),b):"closeTag"==e?k:y}function b(e,t,r){return"word"==e?(r.tagName=t.current(),a="tag",C):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",C(e,0,r)):(a="error",b)}function k(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&l.implicitlyClosed.hasOwnProperty(r.context.tagName)&&g(r),r.context&&r.context.tagName==n||!1===l.matchClosing?(a="tag",x):(a="tag error",w)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",x(e,0,r)):(a="error",w)}function x(e,t,r){return"endTag"!=e?(a="error",x):(g(r),y)}function w(e,t,r){return a="error",x(e,0,r)}function C(e,t,r){if("word"==e)return a="attribute",_;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(n)?v(r,n):(v(r,n),r.context=new m(r,n,i==r.indented)),y}return a="error",C}function _(e,t,r){return"equals"==e?S:(l.allowMissing||(a="error"),C(e,0,r))}function S(e,t,r){return"string"==e?A:"word"==e&&l.allowUnquoted?(a="string",C):(a="error",C(e,0,r))}function A(e,t,r){return"string"==e?A:C(e,0,r)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:y,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var r=t.tokenize(e,t);return(r||o)&&"comment"!=r&&(a=null,t.state=t.state(o||r,e,t),a&&(r="error"==a?r+" error":a)),r},indent:function(t,r,n){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=h&&t.tokenize!=d)return n?n.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(r))return 0;var o=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(o&&o[1])for(;i;){if(i.tagName==o[2]){i=i.prev;break}if(!l.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(o)for(;i;){var a=l.contextGrabbers[i.tagName];if(!a||!a.hasOwnProperty(o[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+s:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==S&&(e.state=C)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],r=e.context;r;r=r.prev)r.tagName&&t.push(r.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(r("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/easymde/src/js/codemirror/tablist.js":(e,t,r)=>{var n=r("./node_modules/codemirror/lib/codemirror.js");n.commands.tabAndIndentMarkdownList=function(e){var t=e.listSelections()[0].head;if(!1!==e.getStateAfter(t.line).list)e.execCommand("indentMore");else if(e.options.indentWithTabs)e.execCommand("insertTab");else{var r=Array(e.options.tabSize+1).join(" ");e.replaceSelection(r)}},n.commands.shiftTabAndUnindentMarkdownList=function(e){var t=e.listSelections()[0].head;if(!1!==e.getStateAfter(t.line).list)e.execCommand("indentLess");else if(e.options.indentWithTabs)e.execCommand("insertTab");else{var r=Array(e.options.tabSize+1).join(" ");e.replaceSelection(r)}}},"./node_modules/easymde/src/js/easymde.js":(e,t,r)=>{"use strict";var n=r("./node_modules/codemirror/lib/codemirror.js");r("./node_modules/codemirror/addon/edit/continuelist.js"),r("./node_modules/easymde/src/js/codemirror/tablist.js"),r("./node_modules/codemirror/addon/display/fullscreen.js"),r("./node_modules/codemirror/mode/markdown/markdown.js"),r("./node_modules/codemirror/addon/mode/overlay.js"),r("./node_modules/codemirror/addon/display/placeholder.js"),r("./node_modules/codemirror/addon/display/autorefresh.js"),r("./node_modules/codemirror/addon/selection/mark-selection.js"),r("./node_modules/codemirror/addon/search/searchcursor.js"),r("./node_modules/codemirror/mode/gfm/gfm.js"),r("./node_modules/codemirror/mode/xml/xml.js");var i=r("./node_modules/codemirror-spell-checker/src/js/spell-checker.js"),o=r("./node_modules/marked/lib/marked.js"),a=/Mac/.test(navigator.platform),s=new RegExp(/(<a.*?https?:\/\/.*?[^a]>)+?/g),l={toggleBold:y,toggleItalic:b,drawLink:D,toggleHeadingSmaller:C,toggleHeadingBigger:_,drawImage:F,toggleBlockquote:w,toggleOrderedList:T,toggleUnorderedList:M,toggleCodeBlock:x,togglePreview:P,toggleStrikethrough:k,toggleHeading1:S,toggleHeading2:A,toggleHeading3:L,cleanBlock:E,drawTable:O,drawHorizontalRule:R,undo:j,redo:z,toggleSideBySide:B,toggleFullScreen:v},c={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",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"},u=function(){var e,t=!1;return e=navigator.userAgent||navigator.vendor||window.opera,(/(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(e)||/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(e.substr(0,4)))&&(t=!0),t};function d(e){return a?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}function h(e,t,r,n){var i=p(e,!1,t,r,"button",n);i.className+=" easymde-dropdown";var o=document.createElement("div");o.className="easymde-dropdown-content";for(var a=0;a<e.children.length;a++){var s,l=e.children[a];s=p("string"==typeof l&&l in Z?Z[l]:l,!0,t,r,"button",n),o.appendChild(s)}return i.appendChild(o),i}function p(e,t,r,n,i,o){e=e||{};var s=document.createElement(i);s.className=e.name,s.setAttribute("type",i),r=null==r||r,e.name&&e.name in n&&(l[e.name]=e.action),e.title&&r&&(s.title=function(e,t,r){var n,i=e;return t&&r[n=function(e){for(var t in l)if(l[t]===e)return t;return null}(t)]&&(i+=" ("+d(r[n])+")"),i}(e.title,e.action,n),a&&(s.title=s.title.replace("Ctrl","⌘"),s.title=s.title.replace("Alt","⌥"))),e.noDisable&&s.classList.add("no-disable"),e.noMobile&&s.classList.add("no-mobile");var c=[];void 0!==e.className&&(c=e.className.split(" "));for(var u=[],h=0;h<c.length;h++){var p=c[h];p.match(/^fa([srlb]|(-[\w-]*)|$)/)?u.push(p):s.classList.add(p)}s.tabIndex=-1;for(var f=document.createElement("i"),m=0;m<u.length;m++){var g=u[m];f.classList.add(g)}return s.appendChild(f),void 0!==e.icon&&(s.innerHTML=e.icon),e.action&&t&&("function"==typeof e.action?s.onclick=function(t){t.preventDefault(),e.action(o)}:"string"==typeof e.action&&(s.onclick=function(t){t.preventDefault(),window.open(e.action,"_blank")})),s}function f(){var e=document.createElement("i");return e.className="separator",e.innerHTML="|",e}function m(e,t){t=t||e.getCursor("start");var r=e.getTokenAt(t);if(!r.type)return{};for(var n,i,o=r.type.split(" "),a={},s=0;s<o.length;s++)"strong"===(n=o[s])?a.bold=!0:"variable-2"===n?(i=e.getLine(t.line),/^\s*\d+\.\s/.test(i)?a["ordered-list"]=!0:a["unordered-list"]=!0):"atom"===n?a.quote=!0:"em"===n?a.italic=!0:"quote"===n?a.quote=!0:"strikethrough"===n?a.strikethrough=!0:"comment"===n?a.code=!0:"link"===n?a.link=!0:"tag"===n?a.image=!0:n.match(/^header(-[1-6])?$/)&&(a[n.replace("header","heading")]=!0);return a}var g="";function v(e){var t=e.codemirror;t.setOption("fullScreen",!t.getOption("fullScreen")),t.getOption("fullScreen")?(g=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=g;var r=t.getWrapperElement().nextSibling;if(/editor-preview-active-side/.test(r.className)&&B(e),e.options.onToggleFullScreen&&e.options.onToggleFullScreen(t.getOption("fullScreen")||!1),void 0!==e.options.maxHeight&&(t.getOption("fullScreen")?(t.getScrollerElement().style.removeProperty("height"),r.style.removeProperty("height")):(t.getScrollerElement().style.height=e.options.maxHeight,e.setPreviewMaxHeight())),/fullscreen/.test(e.toolbar_div.className)?e.toolbar_div.className=e.toolbar_div.className.replace(/\s*fullscreen\b/,""):e.toolbar_div.className+=" fullscreen",e.toolbarElements&&e.toolbarElements.fullscreen){var n=e.toolbarElements.fullscreen;/active/.test(n.className)?n.className=n.className.replace(/\s*active\s*/g,""):n.className+=" active"}}function y(e){U(e,"bold",e.options.blockStyles.bold)}function b(e){U(e,"italic",e.options.blockStyles.italic)}function k(e){U(e,"strikethrough","~~")}function x(e){var t=e.options.blockStyles.code;function r(e){if("object"!=typeof e)throw"fencing_line() takes a 'line' object (not a line number, or line text). Got: "+typeof e+": "+e;return e.styles&&e.styles[2]&&-1!==e.styles[2].indexOf("formatting-code-block")}function n(e){return e.state.base.base||e.state.base}function i(e,t,i,o,a){i=i||e.getLineHandle(t),o=o||e.getTokenAt({line:t,ch:1}),a=a||!!i.text&&e.getTokenAt({line:t,ch:i.text.length-1});var s=o.type?o.type.split(" "):[];return a&&n(a).indentedCode?"indented":-1!==s.indexOf("comment")&&(n(o).fencedChars||n(a).fencedChars||r(i)?"fenced":"single")}var o,a,s,l=e.codemirror,c=l.getCursor("start"),u=l.getCursor("end"),d=l.getTokenAt({line:c.line,ch:c.ch||1}),h=l.getLineHandle(c.line),p=i(l,c.line,h,d);if("single"===p){var f=h.text.slice(0,c.ch).replace("`",""),m=h.text.slice(c.ch).replace("`","");l.replaceRange(f+m,{line:c.line,ch:0},{line:c.line,ch:99999999999999}),c.ch--,c!==u&&u.ch--,l.setSelection(c,u),l.focus()}else if("fenced"===p)if(c.line!==u.line||c.ch!==u.ch){for(o=c.line;o>=0&&!r(h=l.getLineHandle(o));o--);var g,v,y,b,k=n(l.getTokenAt({line:o,ch:1})).fencedChars;r(l.getLineHandle(c.line))?(g="",v=c.line):r(l.getLineHandle(c.line-1))?(g="",v=c.line-1):(g=k+"\n",v=c.line),r(l.getLineHandle(u.line))?(y="",b=u.line,0===u.ch&&(b+=1)):0!==u.ch&&r(l.getLineHandle(u.line+1))?(y="",b=u.line+1):(y=k+"\n",b=u.line+1),0===u.ch&&(b-=1),l.operation((function(){l.replaceRange(y,{line:b,ch:0},{line:b+(y?0:1),ch:0}),l.replaceRange(g,{line:v,ch:0},{line:v+(g?0:1),ch:0})})),l.setSelection({line:v+(g?1:0),ch:0},{line:b+(g?1:-1),ch:0}),l.focus()}else{var x=c.line;if(r(l.getLineHandle(c.line))&&("fenced"===i(l,c.line+1)?(o=c.line,x=c.line+1):(a=c.line,x=c.line-1)),void 0===o)for(o=x;o>=0&&!r(h=l.getLineHandle(o));o--);if(void 0===a)for(s=l.lineCount(),a=x;a<s&&!r(h=l.getLineHandle(a));a++);l.operation((function(){l.replaceRange("",{line:o,ch:0},{line:o+1,ch:0}),l.replaceRange("",{line:a-1,ch:0},{line:a,ch:0})})),l.focus()}else if("indented"===p){if(c.line!==u.line||c.ch!==u.ch)o=c.line,a=u.line,0===u.ch&&a--;else{for(o=c.line;o>=0;o--)if(!(h=l.getLineHandle(o)).text.match(/^\s*$/)&&"indented"!==i(l,o,h)){o+=1;break}for(s=l.lineCount(),a=c.line;a<s;a++)if(!(h=l.getLineHandle(a)).text.match(/^\s*$/)&&"indented"!==i(l,a,h)){a-=1;break}}var w=l.getLineHandle(a+1),C=w&&l.getTokenAt({line:a+1,ch:w.text.length-1});C&&n(C).indentedCode&&l.replaceRange("\n",{line:a+1,ch:0});for(var _=o;_<=a;_++)l.indentLine(_,"subtract");l.focus()}else{var S=c.line===u.line&&c.ch===u.ch&&0===c.ch,A=c.line!==u.line;S||A?function(e,t,r,n){var i=t.line+1,o=r.line+1,a=t.line!==r.line,s=n+"\n",l="\n"+n;a&&o++,a&&0===r.ch&&(l=n+"\n",o--),q(e,!1,[s,l]),e.setSelection({line:i,ch:0},{line:o,ch:0})}(l,c,u,t):q(l,!1,["`","`"])}}function w(e){W(e.codemirror,"quote")}function C(e){H(e.codemirror,"smaller")}function _(e){H(e.codemirror,"bigger")}function S(e){H(e.codemirror,void 0,1)}function A(e){H(e.codemirror,void 0,2)}function L(e){H(e.codemirror,void 0,3)}function M(e){W(e.codemirror,"unordered-list")}function T(e){W(e.codemirror,"ordered-list")}function E(e){!function(e){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className))for(var t,r=e.getCursor("start"),n=e.getCursor("end"),i=r.line;i<=n.line;i++)t=(t=e.getLine(i)).replace(/^[ ]*([# ]+|\*|-|[> ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:i,ch:0},{line:i,ch:99999999999999})}(e.codemirror)}function D(e){var t=e.codemirror,r=m(t),n=e.options,i="https://";if(n.promptURLs&&!(i=prompt(n.promptTexts.link,"https://")))return!1;q(t,r.link,n.insertTexts.link,i)}function F(e){var t=e.codemirror,r=m(t),n=e.options,i="https://";if(n.promptURLs&&!(i=prompt(n.promptTexts.image,"https://")))return!1;q(t,r.image,n.insertTexts.image,i)}function N(e){e.openBrowseFileWindow()}function I(e,t){var r=e.codemirror,n=m(r),i=e.options,o=t.substr(t.lastIndexOf("/")+1);q(r,n.image,i.insertTexts.uploadedImage,t),e.updateStatusBar("upload-image",e.options.imageTexts.sbOnUploaded.replace("#image_name#",o)),setTimeout((function(){e.updateStatusBar("upload-image",e.options.imageTexts.sbInit)}),1e3)}function O(e){var t=e.codemirror,r=m(t),n=e.options;q(t,r.table,n.insertTexts.table)}function R(e){var t=e.codemirror,r=m(t),n=e.options;q(t,r.image,n.insertTexts.horizontalRule)}function j(e){var t=e.codemirror;t.undo(),t.focus()}function z(e){var t=e.codemirror;t.redo(),t.focus()}function B(e){var t=e.codemirror,r=t.getWrapperElement(),n=r.nextSibling,i=e.toolbarElements&&e.toolbarElements["side-by-side"],o=!1,a=[r.parentNode,e.gui.toolbar,r,n,e.gui.statusbar];/editor-preview-active-side/.test(n.className)?(t.getOption("sideBySideNoFullscreen")&&(t.setOption("sideBySideNoFullscreen",!1),a.forEach((function(e){!function(e){e.className=e.className.replace(/\s*sided--no-fullscreen\s*/g,"")}(e)}))),n.className=n.className.replace(/\s*editor-preview-active-side\s*/g,""),i&&(i.className=i.className.replace(/\s*active\s*/g,"")),r.className=r.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout((function(){t.getOption("fullScreen")||(!1===e.options.sideBySideFullscreen?(t.setOption("sideBySideNoFullscreen",!0),a.forEach((function(e){!function(e){e.className+=" sided--no-fullscreen"}(e)}))):v(e)),n.className+=" editor-preview-active-side"}),1),i&&(i.className+=" active"),r.className+=" CodeMirror-sided",o=!0);var s=r.lastChild;if(/editor-preview-active/.test(s.className)){s.className=s.className.replace(/\s*editor-preview-active\s*/g,"");var l=e.toolbarElements.preview,c=e.toolbar_div;l.className=l.className.replace(/\s*active\s*/g,""),c.className=c.className.replace(/\s*disabled-for-preview*/g,"")}if(t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=function(){var t=e.options.previewRender(e.value(),n);null!=t&&(n.innerHTML=t)}),o){var u=e.options.previewRender(e.value(),n);null!=u&&(n.innerHTML=u),t.on("update",t.sideBySideRenderingFunction)}else t.off("update",t.sideBySideRenderingFunction);t.refresh()}function P(e){var t=e.codemirror,r=t.getWrapperElement(),n=e.toolbar_div,i=!!e.options.toolbar&&e.toolbarElements.preview,o=r.lastChild,a=t.getWrapperElement().nextSibling;if(/editor-preview-active-side/.test(a.className)&&B(e),!o||!/editor-preview-full/.test(o.className)){if((o=document.createElement("div")).className="editor-preview-full",e.options.previewClass)if(Array.isArray(e.options.previewClass))for(var s=0;s<e.options.previewClass.length;s++)o.className+=" "+e.options.previewClass[s];else"string"==typeof e.options.previewClass&&(o.className+=" "+e.options.previewClass);r.appendChild(o)}/editor-preview-active/.test(o.className)?(o.className=o.className.replace(/\s*editor-preview-active\s*/g,""),i&&(i.className=i.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout((function(){o.className+=" editor-preview-active"}),1),i&&(i.className+=" active",n.className+=" disabled-for-preview")),o.innerHTML=e.options.previewRender(e.value(),o)}function q(e,t,r,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var i,o=r[0],a=r[1],s={},l={};Object.assign(s,e.getCursor("start")),Object.assign(l,e.getCursor("end")),n&&(o=o.replace("#url#",n),a=a.replace("#url#",n)),t?(o=(i=e.getLine(s.line)).slice(0,s.ch),a=i.slice(s.ch),e.replaceRange(o+a,{line:s.line,ch:0})):(i=e.getSelection(),e.replaceSelection(o+i+a),s.ch+=o.length,s!==l&&(l.ch+=o.length)),e.setSelection(s,l),e.focus()}}function H(e,t,r){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=e.getCursor("start"),i=e.getCursor("end"),o=n.line;o<=i.line;o++)!function(n){var i=e.getLine(n),o=i.search(/[^#]/);i=void 0!==t?o<=0?"bigger"==t?"###### "+i:"# "+i:6==o&&"smaller"==t?i.substr(7):1==o&&"bigger"==t?i.substr(2):"bigger"==t?i.substr(1):"#"+i:1==r?o<=0?"# "+i:o==r?i.substr(o+1):"# "+i.substr(o+1):2==r?o<=0?"## "+i:o==r?i.substr(o+1):"## "+i.substr(o+1):o<=0?"### "+i:o==r?i.substr(o+1):"### "+i.substr(o+1),e.replaceRange(i,{line:n,ch:0},{line:n,ch:99999999999999})}(o);e.focus()}}function W(e,t){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var r=/^(\s*)(\*|-|\+|\d*\.)(\s+)/,n=/^\s*/,i=m(e),o=e.getCursor("start"),a=e.getCursor("end"),s={quote:/^(\s*)>\s+/,"unordered-list":r,"ordered-list":r},l=function(e,t,i){var o=r.exec(t),a=function(e,t){return{quote:">","unordered-list":"*","ordered-list":"%%i."}[e].replace("%%i",t)}(e,c);return null!==o?(function(e,t){var r=new RegExp({quote:">","unordered-list":"*","ordered-list":"\\d+."}[e]);return t&&r.test(t)}(e,o[2])&&(a=""),t=o[1]+a+o[3]+t.replace(n,"").replace(s[e],"$1")):0==i&&(t=a+" "+t),t},c=1,u=o.line;u<=a.line;u++)!function(r){var n=e.getLine(r);i[t]?n=n.replace(s[t],"$1"):("unordered-list"==t&&(n=l("ordered-list",n,!0)),n=l(t,n,!1),c+=1),e.replaceRange(n,{line:r,ch:0},{line:r,ch:99999999999999})}(u);e.focus()}}function U(e,t,r,n){if(!/editor-preview-active/.test(e.codemirror.getWrapperElement().lastChild.className)){n=void 0===n?r:n;var i,o=e.codemirror,a=m(o),s=r,l=n,c=o.getCursor("start"),u=o.getCursor("end");a[t]?(s=(i=o.getLine(c.line)).slice(0,c.ch),l=i.slice(c.ch),"bold"==t?(s=s.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),l=l.replace(/(\*\*|__)/,"")):"italic"==t?(s=s.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),l=l.replace(/(\*|_)/,"")):"strikethrough"==t&&(s=s.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),l=l.replace(/(\*\*|~~)/,"")),o.replaceRange(s+l,{line:c.line,ch:0},{line:c.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(c.ch-=2,c!==u&&(u.ch-=2)):"italic"==t&&(c.ch-=1,c!==u&&(u.ch-=1))):(i=o.getSelection(),"bold"==t?i=(i=i.split("**").join("")).split("__").join(""):"italic"==t?i=(i=i.split("*").join("")).split("_").join(""):"strikethrough"==t&&(i=i.split("~~").join("")),o.replaceSelection(s+i+l),c.ch+=r.length,u.ch=c.ch+i.length),o.setSelection(c,u),o.focus()}}function $(e,t){if(Math.abs(e)<1024)return""+e+t[0];var r=0;do{e/=1024,++r}while(Math.abs(e)>=1024&&r<t.length);return""+e.toFixed(1)+t[r]}function V(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]instanceof Array?e[r]=t[r].concat(e[r]instanceof Array?e[r]:[]):null!==t[r]&&"object"==typeof t[r]&&t[r].constructor===Object?e[r]=V(e[r]||{},t[r]):e[r]=t[r]);return e}function K(e){for(var t=1;t<arguments.length;t++)e=V(e,arguments[t]);return e}function G(e){var t=e.match(/[a-zA-Z0-9_\u00A0-\u02AF\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g),r=0;if(null===t)return r;for(var n=0;n<t.length;n++)t[n].charCodeAt(0)>=19968?r+=t[n].length:r+=1;return r}var Z={bold:{name:"bold",action:y,className:"fa fa-bold",title:"Bold",default:!0},italic:{name:"italic",action:b,className:"fa fa-italic",title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:k,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:C,className:"fa fa-header fa-heading",title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:C,className:"fa fa-header fa-heading header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:_,className:"fa fa-header fa-heading header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:S,className:"fa fa-header fa-heading header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:A,className:"fa fa-header fa-heading header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:L,className:"fa fa-header fa-heading header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:x,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:w,className:"fa fa-quote-left",title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:M,className:"fa fa-list-ul",title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:T,className:"fa fa-list-ol",title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:E,className:"fa fa-eraser",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:D,className:"fa fa-link",title:"Create Link",default:!0},image:{name:"image",action:F,className:"fa fa-image",title:"Insert Image",default:!0},"upload-image":{name:"upload-image",action:N,className:"fa fa-image",title:"Import an image"},table:{name:"table",action:O,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:R,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:P,className:"fa fa-eye",noDisable:!0,title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:B,className:"fa fa-columns",noDisable:!0,noMobile:!0,title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:v,className:"fa fa-arrows-alt",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:"fa fa-question-circle",noDisable:!0,title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:j,className:"fa fa-undo",noDisable:!0,title:"Undo"},redo:{name:"redo",action:z,className:"fa fa-repeat fa-redo",noDisable:!0,title:"Redo"}},X={link:["[","](#url#)"],image:["![](","#url#)"],uploadedImage:["![](#url#)",""],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],horizontalRule:["","\n\n-----\n\n"]},J={link:"URL for the link:",image:"URL of the image:"},Y={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},Q={bold:"**",code:"```",italic:"*"},ee={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"},te={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:"Image #image_name# is too big (#image_size#).\nMaximum file size is #image_max_size#.",importError:"Something went wrong when uploading the image #image_name#."};function re(e){(e=e||{}).parent=this;var t=!0;if(!1===e.autoDownloadFontAwesome&&(t=!1),!0!==e.autoDownloadFontAwesome)for(var r=document.styleSheets,n=0;n<r.length;n++)r[n].href&&r[n].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(t=!1);if(t){var i=document.createElement("link");i.rel="stylesheet",i.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(i)}if(e.element)this.element=e.element;else if(null===e.element)return void console.log("EasyMDE: Error. No element was found.");if(void 0===e.toolbar)for(var o in e.toolbar=[],Z)Object.prototype.hasOwnProperty.call(Z,o)&&(-1!=o.indexOf("separator-")&&e.toolbar.push("|"),(!0===Z[o].default||e.showIcons&&e.showIcons.constructor===Array&&-1!=e.showIcons.indexOf(o))&&e.toolbar.push(o));if(Object.prototype.hasOwnProperty.call(e,"previewClass")||(e.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(e,"status")||(e.status=["autosave","lines","words","cursor"],e.uploadImage&&e.status.unshift("upload-image")),e.previewRender||(e.previewRender=function(e){return this.parent.markdown(e)}),e.parsingConfig=K({highlightFormatting:!0},e.parsingConfig||{}),e.insertTexts=K({},X,e.insertTexts||{}),e.promptTexts=K({},J,e.promptTexts||{}),e.blockStyles=K({},Q,e.blockStyles||{}),null!=e.autosave&&(e.autosave.timeFormat=K({},Y,e.autosave.timeFormat||{})),e.shortcuts=K({},c,e.shortcuts||{}),e.maxHeight=e.maxHeight||void 0,void 0!==e.maxHeight?e.minHeight=e.maxHeight:e.minHeight=e.minHeight||"300px",e.errorCallback=e.errorCallback||function(e){alert(e)},e.uploadImage=e.uploadImage||!1,e.imageMaxSize=e.imageMaxSize||2097152,e.imageAccept=e.imageAccept||"image/png, image/jpeg",e.imageTexts=K({},ee,e.imageTexts||{}),e.errorMessages=K({},te,e.errorMessages||{}),null!=e.autosave&&null!=e.autosave.unique_id&&""!=e.autosave.unique_id&&(e.autosave.uniqueId=e.autosave.unique_id),e.overlayMode&&void 0===e.overlayMode.combine&&(e.overlayMode.combine=!0),this.options=e,this.render(),!e.initialValue||this.options.autosave&&!0===this.options.autosave.foundSavedValue||this.value(e.initialValue),e.uploadImage){var a=this;this.codemirror.on("dragenter",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbOnDragEnter),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragend",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbInit),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragleave",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbInit),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("dragover",(function(e,t){a.updateStatusBar("upload-image",a.options.imageTexts.sbOnDragEnter),t.stopPropagation(),t.preventDefault()})),this.codemirror.on("drop",(function(t,r){r.stopPropagation(),r.preventDefault(),e.imageUploadFunction?a.uploadImagesUsingCustomFunction(e.imageUploadFunction,r.dataTransfer.files):a.uploadImages(r.dataTransfer.files)})),this.codemirror.on("paste",(function(t,r){e.imageUploadFunction?a.uploadImagesUsingCustomFunction(e.imageUploadFunction,r.clipboardData.files):a.uploadImages(r.clipboardData.files)}))}}function ne(){if("object"!=typeof localStorage)return!1;try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(e){return!1}return!0}re.prototype.uploadImages=function(e,t,r){if(0!==e.length){for(var n=[],i=0;i<e.length;i++)n.push(e[i].name),this.uploadImage(e[i],t,r);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",n.join(", ")))}},re.prototype.uploadImagesUsingCustomFunction=function(e,t){if(0!==t.length){for(var r=[],n=0;n<t.length;n++)r.push(t[n].name),this.uploadImageUsingCustomFunction(e,t[n]);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",r.join(", ")))}},re.prototype.updateStatusBar=function(e,t){if(this.gui.statusbar){var r=this.gui.statusbar.getElementsByClassName(e);1===r.length?this.gui.statusbar.getElementsByClassName(e)[0].textContent=t:0===r.length?console.log("EasyMDE: status bar item "+e+" was not found."):console.log("EasyMDE: Several status bar items named "+e+" was found.")}},re.prototype.markdown=function(e){if(o){var t;if(t=this.options&&this.options.renderingConfig&&this.options.renderingConfig.markedOptions?this.options.renderingConfig.markedOptions:{},this.options&&this.options.renderingConfig&&!1===this.options.renderingConfig.singleLineBreaks?t.breaks=!1:t.breaks=!0,this.options&&this.options.renderingConfig&&!0===this.options.renderingConfig.codeSyntaxHighlighting){var r=this.options.renderingConfig.hljs||window.hljs;r&&(t.highlight=function(e,t){return t&&r.getLanguage(t)?r.highlight(t,e).value:r.highlightAuto(e).value})}o.setOptions(t);var n=o(e);return this.options.renderingConfig&&"function"==typeof this.options.renderingConfig.sanitizerFunction&&(n=this.options.renderingConfig.sanitizerFunction.call(this,n)),function(e){for(var t=(new DOMParser).parseFromString(e,"text/html"),r=t.getElementsByTagName("li"),n=0;n<r.length;n++)for(var i=r[n],o=0;o<i.children.length;o++){var a=i.children[o];a instanceof HTMLInputElement&&"checkbox"===a.type&&(i.style.marginLeft="-1.5em",i.style.listStyleType="none")}return t.documentElement.innerHTML}(n=function(e){for(var t;null!==(t=s.exec(e));){var r=t[0];if(-1===r.indexOf("target=")){var n=r.replace(/>$/,' target="_blank">');e=e.replace(r,n)}}return e}(n))}},re.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;var t,r,o=this.options,a=this,s={};for(var c in o.shortcuts)null!==o.shortcuts[c]&&null!==l[c]&&function(e){s[d(o.shortcuts[e])]=function(){var t=l[e];"function"==typeof t?t(a):"string"==typeof t&&window.open(t,"_blank")}}(c);if(s.Enter="newlineAndIndentContinueMarkdownList",s.Tab="tabAndIndentMarkdownList",s["Shift-Tab"]="shiftTabAndUnindentMarkdownList",s.Esc=function(e){e.getOption("fullScreen")&&v(a)},this.documentOnKeyDown=function(e){27==(e=e||window.event).keyCode&&a.codemirror.getOption("fullScreen")&&v(a)},document.addEventListener("keydown",this.documentOnKeyDown,!1),o.overlayMode?(n.defineMode("overlay-mode",(function(e){return n.overlayMode(n.getMode(e,!1!==o.spellChecker?"spell-checker":"gfm"),o.overlayMode.mode,o.overlayMode.combine)})),t="overlay-mode",(r=o.parsingConfig).gitHubSpice=!1,!1!==o.spellChecker?(r.name="gfm",i({codeMirrorInstance:n})):!1!==o.spellChecker&&(t="spell-checker",(r=o.parsingConfig).name="gfm",r.gitHubSpice=!1,i({codeMirrorInstance:n}))):((t=o.parsingConfig).name="gfm",t.gitHubSpice=!1),this.codemirror=n.fromTextArea(e,{mode:t,backdrop:r,theme:null!=o.theme?o.theme:"easymde",tabSize:null!=o.tabSize?o.tabSize:2,indentUnit:null!=o.tabSize?o.tabSize:2,indentWithTabs:!1!==o.indentWithTabs,lineNumbers:!0===o.lineNumbers,autofocus:!0===o.autofocus,extraKeys:s,lineWrapping:!1!==o.lineWrapping,allowDropFileTypes:["text/plain"],placeholder:o.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:null!=o.styleSelectedText?o.styleSelectedText:!u(),configureMouse:function(e,t,r){return{addNew:!1}},inputStyle:null!=o.inputStyle?o.inputStyle:u()?"contenteditable":"textarea",spellcheck:null==o.nativeSpellcheck||o.nativeSpellcheck,autoRefresh:null!=o.autoRefresh&&o.autoRefresh}),this.codemirror.getScrollerElement().style.minHeight=o.minHeight,void 0!==o.maxHeight&&(this.codemirror.getScrollerElement().style.height=o.maxHeight),!0===o.forceSync){var h=this.codemirror;h.on("change",(function(){h.save()}))}this.gui={};var p=document.createElement("div");p.classList.add("EasyMDEContainer");var f=this.codemirror.getWrapperElement();f.parentNode.insertBefore(p,f),p.appendChild(f),!1!==o.toolbar&&(this.gui.toolbar=this.createToolbar()),!1!==o.status&&(this.gui.statusbar=this.createStatusbar()),null!=o.autosave&&!0===o.autosave.enabled&&(this.autosave(),this.codemirror.on("change",(function(){clearTimeout(a._autosave_timeout),a._autosave_timeout=setTimeout((function(){a.autosave()}),a.options.autosave.submit_delay||a.options.autosave.delay||1e3)}))),this.codemirror.on("update",(function(){g()})),this.onWindowResize=function(){g()},window.addEventListener("resize",this.onWindowResize,!0),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var m=this.codemirror;setTimeout(function(){m.refresh()}.bind(m),0)}function g(){function e(e,t){return e<window.getComputedStyle(document.querySelector(".CodeMirror-sizer")).width.replace("px","")?t+"px":t/e*100+"%"}o.previewImagesInEditor&&p.querySelectorAll(".cm-formatting-image").forEach((function(t){var r=t.parentElement;if(r.hasAttribute("data-img-src")){var n=r.getAttribute("data-img-src"),i=+r.getAttribute("data-img-width"),o=+r.getAttribute("data-img-height");r.setAttribute("style","--bg-image:url("+n+");--width:"+i+"px;--height:"+e(i,o))}else{var a=r.innerText.match("\\((.*)\\)");if(a&&a.length>=2){var s=document.createElement("img");s.onload=function(){r.setAttribute("data-img-src",a[1]),r.setAttribute("data-img-width",s.naturalWidth),r.setAttribute("data-img-height",s.naturalHeight),r.setAttribute("style","--bg-image:url("+a[1]+");--width:"+s.naturalWidth+"px;--height:"+e(s.naturalWidth,s.naturalHeight))},s.src=a[1]}}}))}},re.prototype.cleanup=function(){window.removeEventListener(this.onWindowResize),document.removeEventListener("keydown",this.documentOnKeyDown)},re.prototype.autosave=function(){if(ne()){var e=this;if(null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("EasyMDE: You must set a uniqueId to use the autosave feature");!0!==this.options.autosave.binded&&(null!=e.element.form&&null!=e.element.form&&e.element.form.addEventListener("submit",(function(){clearTimeout(e.autosaveTimeoutId),e.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+e.options.autosave.uniqueId)})),this.options.autosave.binded=!0),!0!==this.options.autosave.loaded&&("string"==typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=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 t=e.value();""!==t?localStorage.setItem("smde_"+this.options.autosave.uniqueId,t):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var r=document.getElementById("autosaved");if(null!=r&&null!=r&&""!=r){var n=new Date,i=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(n),o=null==this.options.autosave.text?"Autosaved: ":this.options.autosave.text;r.innerHTML=o+i}}else console.log("EasyMDE: localStorage not available, cannot autosave")},re.prototype.clearAutosavedValue=function(){if(ne()){if(null==this.options.autosave||null==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("EasyMDE: You must set a uniqueId to clear the autosave value");localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")},re.prototype.openBrowseFileWindow=function(e,t){var r=this,n=this.gui.toolbar.getElementsByClassName("imageInput")[0];n.click(),n.addEventListener("change",(function i(o){r.options.imageUploadFunction?r.uploadImagesUsingCustomFunction(r.options.imageUploadFunction,o.target.files):r.uploadImages(o.target.files,e,t),n.removeEventListener("change",i)}))},re.prototype.uploadImage=function(e,t,r){var n=this;function i(e){n.updateStatusBar("upload-image",e),setTimeout((function(){n.updateStatusBar("upload-image",n.options.imageTexts.sbInit)}),1e4),r&&"function"==typeof r&&r(e),n.options.errorCallback(e)}function o(t){var r=n.options.imageTexts.sizeUnits.split(",");return t.replace("#image_name#",e.name).replace("#image_size#",$(e.size,r)).replace("#image_max_size#",$(n.options.imageMaxSize,r))}if(t=t||function(e){I(n,e)},e.size>this.options.imageMaxSize)i(o(this.options.errorMessages.fileTooLarge));else{var a=new FormData;a.append("image",e),n.options.imageCSRFToken&&a.append("csrfmiddlewaretoken",n.options.imageCSRFToken);var s=new XMLHttpRequest;s.upload.onprogress=function(t){if(t.lengthComputable){var r=""+Math.round(100*t.loaded/t.total);n.updateStatusBar("upload-image",n.options.imageTexts.sbProgress.replace("#file_name#",e.name).replace("#progress#",r))}},s.open("POST",this.options.imageUploadEndpoint),s.onload=function(){try{var e=JSON.parse(this.responseText)}catch(e){return console.error("EasyMDE: The server did not return a valid json."),void i(o(n.options.errorMessages.importError))}200===this.status&&e&&!e.error&&e.data&&e.data.filePath?t(window.location.origin+"/"+e.data.filePath):e.error&&e.error in n.options.errorMessages?i(o(n.options.errorMessages[e.error])):e.error?i(o(e.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),i(o(n.options.errorMessages.importError)))},s.onerror=function(e){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+e.target.status+" ("+e.target.statusText+")"),i(n.options.errorMessages.importError)},s.send(a)}},re.prototype.uploadImageUsingCustomFunction=function(e,t){var r=this;e.apply(this,[t,function(e){I(r,e)},function(e){var n=function(e){var n=r.options.imageTexts.sizeUnits.split(",");return e.replace("#image_name#",t.name).replace("#image_size#",$(t.size,n)).replace("#image_max_size#",$(r.options.imageMaxSize,n))}(e);r.updateStatusBar("upload-image",n),setTimeout((function(){r.updateStatusBar("upload-image",r.options.imageTexts.sbInit)}),1e4),r.options.errorCallback(n)}])},re.prototype.setPreviewMaxHeight=function(){var e=this.codemirror.getWrapperElement(),t=e.nextSibling,r=parseInt(window.getComputedStyle(e).paddingTop),n=parseInt(window.getComputedStyle(e).borderTopWidth),i=(parseInt(this.options.maxHeight)+2*r+2*n).toString()+"px";t.style.height=i},re.prototype.createSideBySide=function(){var e=this.codemirror,t=e.getWrapperElement(),r=t.nextSibling;if(!r||!/editor-preview-side/.test(r.className)){if((r=document.createElement("div")).className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var n=0;n<this.options.previewClass.length;n++)r.className+=" "+this.options.previewClass[n];else"string"==typeof this.options.previewClass&&(r.className+=" "+this.options.previewClass);t.parentNode.insertBefore(r,t.nextSibling)}if(void 0!==this.options.maxHeight&&this.setPreviewMaxHeight(),!1===this.options.syncSideBySidePreviewScroll)return r;var i=!1,o=!1;return e.on("scroll",(function(e){if(i)i=!1;else{o=!0;var t=e.getScrollInfo().height-e.getScrollInfo().clientHeight,n=parseFloat(e.getScrollInfo().top)/t,a=(r.scrollHeight-r.clientHeight)*n;r.scrollTop=a}})),r.onscroll=function(){if(o)o=!1;else{i=!0;var t=r.scrollHeight-r.clientHeight,n=parseFloat(r.scrollTop)/t,a=(e.getScrollInfo().height-e.getScrollInfo().clientHeight)*n;e.scrollTo(0,a)}},r},re.prototype.createToolbar=function(e){if((e=e||this.options.toolbar)&&0!==e.length){var t;for(t=0;t<e.length;t++)null!=Z[e[t]]&&(e[t]=Z[e[t]]);var r=document.createElement("div");r.className="editor-toolbar";var n=this,i={};for(n.toolbar=e,t=0;t<e.length;t++)if(("guide"!=e[t].name||!1!==n.options.toolbarGuideIcon)&&!(n.options.hideIcons&&-1!=n.options.hideIcons.indexOf(e[t].name)||("fullscreen"==e[t].name||"side-by-side"==e[t].name)&&u())){if("|"===e[t]){for(var o=!1,a=t+1;a<e.length;a++)"|"===e[a]||n.options.hideIcons&&-1!=n.options.hideIcons.indexOf(e[a].name)||(o=!0);if(!o)continue}!function(e){var t;if(t="|"===e?f():e.children?h(e,n.options.toolbarTips,n.options.shortcuts,n):p(e,!0,n.options.toolbarTips,n.options.shortcuts,"button",n),i[e.name||e]=t,r.appendChild(t),"upload-image"===e.name){var o=document.createElement("input");o.className="imageInput",o.type="file",o.multiple=!0,o.name="image",o.accept=n.options.imageAccept,o.style.display="none",o.style.opacity=0,r.appendChild(o)}}(e[t])}n.toolbar_div=r,n.toolbarElements=i;var s=this.codemirror;s.on("cursorActivity",(function(){var e=m(s);for(var t in i)!function(t){var r=i[t];e[t]?r.className+=" active":"fullscreen"!=t&&"side-by-side"!=t&&(r.className=r.className.replace(/\s*active\s*/g,""))}(t)}));var l=s.getWrapperElement();return l.parentNode.insertBefore(r,l),r}},re.prototype.createStatusbar=function(e){e=e||this.options.status;var t=this.options,r=this.codemirror;if(e&&0!==e.length){var n,i,o,a,s=[];for(n=0;n<e.length;n++)if(i=void 0,o=void 0,a=void 0,"object"==typeof e[n])s.push({className:e[n].className,defaultValue:e[n].defaultValue,onUpdate:e[n].onUpdate,onActivity:e[n].onActivity});else{var l=e[n];"words"===l?(a=function(e){e.innerHTML=G(r.getValue())},i=function(e){e.innerHTML=G(r.getValue())}):"lines"===l?(a=function(e){e.innerHTML=r.lineCount()},i=function(e){e.innerHTML=r.lineCount()}):"cursor"===l?(a=function(e){e.innerHTML="0:0"},o=function(e){var t=r.getCursor();e.innerHTML=t.line+":"+t.ch}):"autosave"===l?a=function(e){null!=t.autosave&&!0===t.autosave.enabled&&e.setAttribute("id","autosaved")}:"upload-image"===l&&(a=function(e){e.innerHTML=t.imageTexts.sbInit}),s.push({className:l,defaultValue:a,onUpdate:i,onActivity:o})}var c=document.createElement("div");for(c.className="editor-statusbar",n=0;n<s.length;n++){var u=s[n],d=document.createElement("span");d.className=u.className,"function"==typeof u.defaultValue&&u.defaultValue(d),"function"==typeof u.onUpdate&&this.codemirror.on("update",function(e,t){return function(){t.onUpdate(e)}}(d,u)),"function"==typeof u.onActivity&&this.codemirror.on("cursorActivity",function(e,t){return function(){t.onActivity(e)}}(d,u)),c.appendChild(d)}var h=this.codemirror.getWrapperElement();return h.parentNode.insertBefore(c,h.nextSibling),c}},re.prototype.value=function(e){var t=this.codemirror;if(void 0===e)return t.getValue();if(t.getDoc().setValue(e),this.isPreviewActive()){var r=t.getWrapperElement().lastChild;r.innerHTML=this.options.previewRender(e,r)}return this},re.toggleBold=y,re.toggleItalic=b,re.toggleStrikethrough=k,re.toggleBlockquote=w,re.toggleHeadingSmaller=C,re.toggleHeadingBigger=_,re.toggleHeading1=S,re.toggleHeading2=A,re.toggleHeading3=L,re.toggleCodeBlock=x,re.toggleUnorderedList=M,re.toggleOrderedList=T,re.cleanBlock=E,re.drawLink=D,re.drawImage=F,re.drawUploadedImage=N,re.drawTable=O,re.drawHorizontalRule=R,re.undo=j,re.redo=z,re.togglePreview=P,re.toggleSideBySide=B,re.toggleFullScreen=v,re.prototype.toggleBold=function(){y(this)},re.prototype.toggleItalic=function(){b(this)},re.prototype.toggleStrikethrough=function(){k(this)},re.prototype.toggleBlockquote=function(){w(this)},re.prototype.toggleHeadingSmaller=function(){C(this)},re.prototype.toggleHeadingBigger=function(){_(this)},re.prototype.toggleHeading1=function(){S(this)},re.prototype.toggleHeading2=function(){A(this)},re.prototype.toggleHeading3=function(){L(this)},re.prototype.toggleCodeBlock=function(){x(this)},re.prototype.toggleUnorderedList=function(){M(this)},re.prototype.toggleOrderedList=function(){T(this)},re.prototype.cleanBlock=function(){E(this)},re.prototype.drawLink=function(){D(this)},re.prototype.drawImage=function(){F(this)},re.prototype.drawUploadedImage=function(){N(this)},re.prototype.drawTable=function(){O(this)},re.prototype.drawHorizontalRule=function(){R(this)},re.prototype.undo=function(){j(this)},re.prototype.redo=function(){z(this)},re.prototype.togglePreview=function(){P(this)},re.prototype.toggleSideBySide=function(){B(this)},re.prototype.toggleFullScreen=function(){v(this)},re.prototype.isPreviewActive=function(){var e=this.codemirror.getWrapperElement().lastChild;return/editor-preview-active/.test(e.className)},re.prototype.isSideBySideActive=function(){var e=this.codemirror.getWrapperElement().nextSibling;return/editor-preview-active-side/.test(e.className)},re.prototype.isFullscreenActive=function(){return this.codemirror.getOption("fullScreen")},re.prototype.getState=function(){return m(this.codemirror)},re.prototype.toTextArea=function(){var e=this.codemirror,t=e.getWrapperElement(),r=t.parentNode;r&&(this.gui.toolbar&&r.removeChild(this.gui.toolbar),this.gui.statusbar&&r.removeChild(this.gui.statusbar),this.gui.sideBySide&&r.removeChild(this.gui.sideBySide)),r.parentNode.insertBefore(t,r),r.remove(),e.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())},e.exports=re},"./node_modules/entities/lib/maps/entities.json":e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"","InvisibleTimes":"","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"","NegativeThickSpace":"","NegativeThinSpace":"","NegativeVeryThinSpace":"","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":" ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"","zwnj":""}')},"./node_modules/linkify-it/index.js":(e,t,r)=>{"use strict";function n(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(r){e[r]=t[r]}))})),e}function i(e){return Object.prototype.toString.call(e)}function o(e){return"[object Function]"===i(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},l={"http:":{validate:function(e,t,r){var n=e.slice(t);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,r){var n=e.slice(t);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,r){var n=e.slice(t);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(e){var t=e.re=r("./node_modules/linkify-it/lib/re.js")(e.__opts__),n=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||n.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),n.push(t.src_xn),t.src_tlds=n.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var r=e.__schemas__[t];if(null!==r){var n={validate:null,link:null};if(e.__compiled__[t]=n,"[object Object]"===i(r))return"[object RegExp]"!==i(r.validate)?o(r.validate)?n.validate=r.validate:c(t,r):n.validate=function(e){return function(t,r){var n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}(r.validate),void(o(r.normalize)?n.normalize=r.normalize:r.normalize?c(t,r):n.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===i(e)}(r)?c(t,r):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var u=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function d(e,t){var r=e.__index__,n=e.__last_index__,i=e.__text_cache__.slice(r,n);this.schema=e.__schema__.toLowerCase(),this.index=r+t,this.lastIndex=n+t,this.raw=i,this.text=i,this.url=i}function h(e,t){var r=new d(e,t);return e.__compiled__[r.schema].normalize(r,e),r}function p(e,t){if(!(this instanceof p))return new p(e,t);var r;t||(r=e,Object.keys(r||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=n({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=n({},l,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},u(this)}p.prototype.add=function(e,t){return this.__schemas__[e]=t,u(this),this},p.prototype.set=function(e){return this.__opts__=n(this.__opts__,e),this},p.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,r,n,i,o,a,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(i=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(r=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(o=r.index+r[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=r.index+r[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(n=e.match(this.re.email_fuzzy))&&(o=n.index+n[1].length,a=n.index+n[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a)),this.__index__>=0},p.prototype.pretest=function(e){return this.re.pretest.test(e)},p.prototype.testSchemaAt=function(e,t,r){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,r,this):0},p.prototype.match=function(e){var t=0,r=[];this.__index__>=0&&this.__text_cache__===e&&(r.push(h(this,t)),t=this.__last_index__);for(var n=t?e.slice(t):e;this.test(n);)r.push(h(this,t)),n=n.slice(this.__last_index__),t+=this.__last_index__;return r.length?r:null},p.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,r){return e!==r[t-1]})).reverse(),u(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,u(this),this)},p.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},p.prototype.onCompile=function(){},e.exports=p},"./node_modules/linkify-it/lib/re.js":(e,t,r)=>{"use strict";e.exports=function(e){var t={};return t.src_Any=r("./node_modules/uc.micro/properties/Any/regex.js").source,t.src_Cc=r("./node_modules/uc.micro/categories/Cc/regex.js").source,t.src_Z=r("./node_modules/uc.micro/categories/Z/regex.js").source,t.src_P=r("./node_modules/uc.micro/categories/P/regex.js").source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|"),t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|[><|]|[()[\\]{}.,\"'?!\\-]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+"\\,(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},"./node_modules/markdown-it-container/index.js":e=>{"use strict";e.exports=function(e,t,r){var n=(r=r||{}).marker||":",i=n.charCodeAt(0),o=n.length,a=r.validate||function(e){return e.trim().split(" ",2)[0]===t},s=r.render||function(e,r,n,i,o){return 1===e[r].nesting&&e[r].attrJoin("class",t),o.renderToken(e,r,n,i,o)};e.block.ruler.before("fence","container_"+t,(function(e,r,s,l){var c,u,d,h,p,f,m,g,v=!1,y=e.bMarks[r]+e.tShift[r],b=e.eMarks[r];if(i!==e.src.charCodeAt(y))return!1;for(c=y+1;c<=b&&n[(c-y)%o]===e.src[c];c++);if((d=Math.floor((c-y)/o))<3)return!1;if(c-=(c-y)%o,h=e.src.slice(y,c),p=e.src.slice(c,b),!a(p,h))return!1;if(l)return!0;for(u=r;!(++u>=s||(y=e.bMarks[u]+e.tShift[u])<(b=e.eMarks[u])&&e.sCount[u]<e.blkIndent);)if(i===e.src.charCodeAt(y)&&!(e.sCount[u]-e.blkIndent>=4)){for(c=y+1;c<=b&&n[(c-y)%o]===e.src[c];c++);if(!(Math.floor((c-y)/o)<d||(c-=(c-y)%o,(c=e.skipSpaces(c))<b))){v=!0;break}}return m=e.parentType,g=e.lineMax,e.parentType="container",e.lineMax=u,(f=e.push("container_"+t+"_open","div",1)).markup=h,f.block=!0,f.info=p,f.map=[r,u],e.md.block.tokenize(e,r+1,u),(f=e.push("container_"+t+"_close","div",-1)).markup=e.src.slice(y,c),f.block=!0,e.parentType=m,e.lineMax=g,e.line=u+(v?1:0),!0}),{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules["container_"+t+"_open"]=s,e.renderer.rules["container_"+t+"_close"]=s}},"./node_modules/markdown-it/index.js":(e,t,r)=>{"use strict";e.exports=r("./node_modules/markdown-it/lib/index.js")},"./node_modules/markdown-it/lib/common/entities.js":(e,t,r)=>{"use strict";e.exports=r("./node_modules/entities/lib/maps/entities.json")},"./node_modules/markdown-it/lib/common/html_blocks.js":e=>{"use strict";e.exports=["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","h1","h2","h3","h4","h5","h6","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"]},"./node_modules/markdown-it/lib/common/html_re.js":e=>{"use strict";var t="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",r="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",n=new RegExp("^(?:"+t+"|"+r+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?].*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),i=new RegExp("^(?:"+t+"|"+r+")");e.exports.HTML_TAG_RE=n,e.exports.HTML_OPEN_CLOSE_TAG_RE=i},"./node_modules/markdown-it/lib/common/utils.js":(e,t,r)=>{"use strict";var n=Object.prototype.hasOwnProperty;function i(e,t){return n.call(e,t)}function o(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)||e>=0&&e<=8||11===e||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function a(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=r("./node_modules/markdown-it/lib/common/entities.js"),d=/[&<>"]/,h=/[&<>"]/g,p={"&":"&","<":"<",">":">",'"':"""};function f(e){return p[e]}var m=/[.?*+^$[\]\\(){}|-]/g,g=r("./node_modules/uc.micro/categories/P/regex.js");t.lib={},t.lib.mdurl=r("./node_modules/mdurl/index.js"),t.lib.ucmicro=r("./node_modules/uc.micro/index.js"),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(r){e[r]=t[r]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,r){return t||function(e,t){var r=0;return i(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&o(r="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(r):e}(e,r)}))},t.isValidEntityCode=o,t.fromCodePoint=a,t.escapeHtml=function(e){return d.test(e)?e.replace(h,f):e},t.arrayReplaceAt=function(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},"./node_modules/markdown-it/lib/helpers/index.js":(e,t,r)=>{"use strict";t.parseLinkLabel=r("./node_modules/markdown-it/lib/helpers/parse_link_label.js"),t.parseLinkDestination=r("./node_modules/markdown-it/lib/helpers/parse_link_destination.js"),t.parseLinkTitle=r("./node_modules/markdown-it/lib/helpers/parse_link_title.js")},"./node_modules/markdown-it/lib/helpers/parse_link_destination.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js").unescapeAll;e.exports=function(e,t,r){var i,o,a=t,s={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<r;){if(10===(i=e.charCodeAt(t)))return s;if(62===i)return s.pos=t+1,s.str=n(e.slice(a+1,t)),s.ok=!0,s;92===i&&t+1<r?t+=2:t++}return s}for(o=0;t<r&&32!==(i=e.charCodeAt(t))&&!(i<32||127===i);)if(92===i&&t+1<r)t+=2;else{if(40===i&&o++,41===i){if(0===o)break;o--}t++}return a===t||0!==o||(s.str=n(e.slice(a,t)),s.lines=0,s.pos=t,s.ok=!0),s}},"./node_modules/markdown-it/lib/helpers/parse_link_label.js":e=>{"use strict";e.exports=function(e,t,r){var n,i,o,a,s=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,n=1;e.pos<l;){if(93===(o=e.src.charCodeAt(e.pos))&&0==--n){i=!0;break}if(a=e.pos,e.md.inline.skipToken(e),91===o)if(a===e.pos-1)n++;else if(r)return e.pos=c,-1}return i&&(s=e.pos),e.pos=c,s}},"./node_modules/markdown-it/lib/helpers/parse_link_title.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js").unescapeAll;e.exports=function(e,t,r){var i,o,a=0,s=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=r)return l;if(34!==(o=e.charCodeAt(t))&&39!==o&&40!==o)return l;for(t++,40===o&&(o=41);t<r;){if((i=e.charCodeAt(t))===o)return l.pos=t+1,l.lines=a,l.str=n(e.slice(s+1,t)),l.ok=!0,l;10===i?a++:92===i&&t+1<r&&(t++,10===e.charCodeAt(t)&&a++),t++}return l}},"./node_modules/markdown-it/lib/index.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js"),i=r("./node_modules/markdown-it/lib/helpers/index.js"),o=r("./node_modules/markdown-it/lib/renderer.js"),a=r("./node_modules/markdown-it/lib/parser_core.js"),s=r("./node_modules/markdown-it/lib/parser_block.js"),l=r("./node_modules/markdown-it/lib/parser_inline.js"),c=r("./node_modules/linkify-it/index.js"),u=r("./node_modules/mdurl/index.js"),d=r("./node_modules/punycode/punycode.es6.js"),h={default:r("./node_modules/markdown-it/lib/presets/default.js"),zero:r("./node_modules/markdown-it/lib/presets/zero.js"),commonmark:r("./node_modules/markdown-it/lib/presets/commonmark.js")},p=/^(vbscript|javascript|file|data):/,f=/^data:image\/(gif|png|jpeg|webp);/;function m(e){var t=e.trim().toLowerCase();return!p.test(t)||!!f.test(t)}var g=["http:","https:","mailto:"];function v(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=d.toASCII(t.hostname)}catch(e){}return u.encode(u.format(t))}function y(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=d.toUnicode(t.hostname)}catch(e){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function b(e,t){if(!(this instanceof b))return new b(e,t);t||n.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new s,this.core=new a,this.renderer=new o,this.linkify=new c,this.validateLink=m,this.normalizeLink=v,this.normalizeLinkText=y,this.utils=n,this.helpers=n.assign({},i),this.options={},this.configure(e),t&&this.set(t)}b.prototype.set=function(e){return n.assign(this.options,e),this},b.prototype.configure=function(e){var t,r=this;if(n.isString(e)&&!(e=h[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&r.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&r[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&r[t].ruler2.enableOnly(e.components[t].rules2)})),this},b.prototype.enable=function(e,t){var r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){r=r.concat(this[t].ruler.enable(e,!0))}),this),r=r.concat(this.inline.ruler2.enable(e,!0));var n=e.filter((function(e){return r.indexOf(e)<0}));if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},b.prototype.disable=function(e,t){var r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){r=r.concat(this[t].ruler.disable(e,!0))}),this),r=r.concat(this.inline.ruler2.disable(e,!0));var n=e.filter((function(e){return r.indexOf(e)<0}));if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},b.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},b.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var r=new this.core.State(e,this,t);return this.core.process(r),r.tokens},b.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},b.prototype.parseInline=function(e,t){var r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens},b.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=b},"./node_modules/markdown-it/lib/parser_block.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/ruler.js"),i=[["table",r("./node_modules/markdown-it/lib/rules_block/table.js"),["paragraph","reference"]],["code",r("./node_modules/markdown-it/lib/rules_block/code.js")],["fence",r("./node_modules/markdown-it/lib/rules_block/fence.js"),["paragraph","reference","blockquote","list"]],["blockquote",r("./node_modules/markdown-it/lib/rules_block/blockquote.js"),["paragraph","reference","blockquote","list"]],["hr",r("./node_modules/markdown-it/lib/rules_block/hr.js"),["paragraph","reference","blockquote","list"]],["list",r("./node_modules/markdown-it/lib/rules_block/list.js"),["paragraph","reference","blockquote"]],["reference",r("./node_modules/markdown-it/lib/rules_block/reference.js")],["heading",r("./node_modules/markdown-it/lib/rules_block/heading.js"),["paragraph","reference","blockquote"]],["lheading",r("./node_modules/markdown-it/lib/rules_block/lheading.js")],["html_block",r("./node_modules/markdown-it/lib/rules_block/html_block.js"),["paragraph","reference","blockquote"]],["paragraph",r("./node_modules/markdown-it/lib/rules_block/paragraph.js")]];function o(){this.ruler=new n;for(var e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1],{alt:(i[e][2]||[]).slice()})}o.prototype.tokenize=function(e,t,r){for(var n,i=this.ruler.getRules(""),o=i.length,a=t,s=!1,l=e.md.options.maxNesting;a<r&&(e.line=a=e.skipEmptyLines(a),!(a>=r))&&!(e.sCount[a]<e.blkIndent);){if(e.level>=l){e.line=r;break}for(n=0;n<o&&!i[n](e,a,r,!1);n++);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),(a=e.line)<r&&e.isEmpty(a)&&(s=!0,a++,e.line=a)}},o.prototype.parse=function(e,t,r,n){var i;e&&(i=new this.State(e,t,r,n),this.tokenize(i,i.line,i.lineMax))},o.prototype.State=r("./node_modules/markdown-it/lib/rules_block/state_block.js"),e.exports=o},"./node_modules/markdown-it/lib/parser_core.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/ruler.js"),i=[["normalize",r("./node_modules/markdown-it/lib/rules_core/normalize.js")],["block",r("./node_modules/markdown-it/lib/rules_core/block.js")],["inline",r("./node_modules/markdown-it/lib/rules_core/inline.js")],["linkify",r("./node_modules/markdown-it/lib/rules_core/linkify.js")],["replacements",r("./node_modules/markdown-it/lib/rules_core/replacements.js")],["smartquotes",r("./node_modules/markdown-it/lib/rules_core/smartquotes.js")]];function o(){this.ruler=new n;for(var e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1])}o.prototype.process=function(e){var t,r,n;for(t=0,r=(n=this.ruler.getRules("")).length;t<r;t++)n[t](e)},o.prototype.State=r("./node_modules/markdown-it/lib/rules_core/state_core.js"),e.exports=o},"./node_modules/markdown-it/lib/parser_inline.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/ruler.js"),i=[["text",r("./node_modules/markdown-it/lib/rules_inline/text.js")],["newline",r("./node_modules/markdown-it/lib/rules_inline/newline.js")],["escape",r("./node_modules/markdown-it/lib/rules_inline/escape.js")],["backticks",r("./node_modules/markdown-it/lib/rules_inline/backticks.js")],["strikethrough",r("./node_modules/markdown-it/lib/rules_inline/strikethrough.js").tokenize],["emphasis",r("./node_modules/markdown-it/lib/rules_inline/emphasis.js").tokenize],["link",r("./node_modules/markdown-it/lib/rules_inline/link.js")],["image",r("./node_modules/markdown-it/lib/rules_inline/image.js")],["autolink",r("./node_modules/markdown-it/lib/rules_inline/autolink.js")],["html_inline",r("./node_modules/markdown-it/lib/rules_inline/html_inline.js")],["entity",r("./node_modules/markdown-it/lib/rules_inline/entity.js")]],o=[["balance_pairs",r("./node_modules/markdown-it/lib/rules_inline/balance_pairs.js")],["strikethrough",r("./node_modules/markdown-it/lib/rules_inline/strikethrough.js").postProcess],["emphasis",r("./node_modules/markdown-it/lib/rules_inline/emphasis.js").postProcess],["text_collapse",r("./node_modules/markdown-it/lib/rules_inline/text_collapse.js")]];function a(){var e;for(this.ruler=new n,e=0;e<i.length;e++)this.ruler.push(i[e][0],i[e][1]);for(this.ruler2=new n,e=0;e<o.length;e++)this.ruler2.push(o[e][0],o[e][1])}a.prototype.skipToken=function(e){var t,r,n=e.pos,i=this.ruler.getRules(""),o=i.length,a=e.md.options.maxNesting,s=e.cache;if(void 0===s[n]){if(e.level<a)for(r=0;r<o&&(e.level++,t=i[r](e,!0),e.level--,!t);r++);else e.pos=e.posMax;t||e.pos++,s[n]=e.pos}else e.pos=s[n]},a.prototype.tokenize=function(e){for(var t,r,n=this.ruler.getRules(""),i=n.length,o=e.posMax,a=e.md.options.maxNesting;e.pos<o;){if(e.level<a)for(r=0;r<i&&!(t=n[r](e,!1));r++);if(t){if(e.pos>=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},a.prototype.parse=function(e,t,r,n){var i,o,a,s=new this.State(e,t,r,n);for(this.tokenize(s),a=(o=this.ruler2.getRules("")).length,i=0;i<a;i++)o[i](s)},a.prototype.State=r("./node_modules/markdown-it/lib/rules_inline/state_inline.js"),e.exports=a},"./node_modules/markdown-it/lib/presets/commonmark.js":e=>{"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},"./node_modules/markdown-it/lib/presets/default.js":e=>{"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},"./node_modules/markdown-it/lib/presets/zero.js":e=>{"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},"./node_modules/markdown-it/lib/renderer.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js").assign,i=r("./node_modules/markdown-it/lib/common/utils.js").unescapeAll,o=r("./node_modules/markdown-it/lib/common/utils.js").escapeHtml,a={};function s(){this.rules=n({},a)}a.code_inline=function(e,t,r,n,i){var a=e[t];return"<code"+i.renderAttrs(a)+">"+o(e[t].content)+"</code>"},a.code_block=function(e,t,r,n,i){var a=e[t];return"<pre"+i.renderAttrs(a)+"><code>"+o(e[t].content)+"</code></pre>\n"},a.fence=function(e,t,r,n,a){var s,l,c,u,d,h=e[t],p=h.info?i(h.info).trim():"",f="",m="";return p&&(f=(c=p.split(/(\s+)/g))[0],m=c.slice(2).join("")),0===(s=r.highlight&&r.highlight(h.content,f,m)||o(h.content)).indexOf("<pre")?s+"\n":p?(l=h.attrIndex("class"),u=h.attrs?h.attrs.slice():[],l<0?u.push(["class",r.langPrefix+f]):u[l][1]+=" "+r.langPrefix+f,d={attrs:u},"<pre><code"+a.renderAttrs(d)+">"+s+"</code></pre>\n"):"<pre><code"+a.renderAttrs(h)+">"+s+"</code></pre>\n"},a.image=function(e,t,r,n,i){var o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,r,n),i.renderToken(e,t,r)},a.hardbreak=function(e,t,r){return r.xhtmlOut?"<br />\n":"<br>\n"},a.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?"<br />\n":"<br>\n":"\n"},a.text=function(e,t){return o(e[t].content)},a.html_block=function(e,t){return e[t].content},a.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,r,n;if(!e.attrs)return"";for(n="",t=0,r=e.attrs.length;t<r;t++)n+=" "+o(e.attrs[t][0])+'="'+o(e.attrs[t][1])+'"';return n},s.prototype.renderToken=function(e,t,r){var n,i="",o=!1,a=e[t];return a.hidden?"":(a.block&&-1!==a.nesting&&t&&e[t-1].hidden&&(i+="\n"),i+=(-1===a.nesting?"</":"<")+a.tag,i+=this.renderAttrs(a),0===a.nesting&&r.xhtmlOut&&(i+=" /"),a.block&&(o=!0,1===a.nesting&&t+1<e.length&&("inline"===(n=e[t+1]).type||n.hidden||-1===n.nesting&&n.tag===a.tag)&&(o=!1)),i+=o?">\n":">")},s.prototype.renderInline=function(e,t,r){for(var n,i="",o=this.rules,a=0,s=e.length;a<s;a++)void 0!==o[n=e[a].type]?i+=o[n](e,a,t,r,this):i+=this.renderToken(e,a,t);return i},s.prototype.renderInlineAsText=function(e,t,r){for(var n="",i=0,o=e.length;i<o;i++)"text"===e[i].type?n+=e[i].content:"image"===e[i].type&&(n+=this.renderInlineAsText(e[i].children,t,r));return n},s.prototype.render=function(e,t,r){var n,i,o,a="",s=this.rules;for(n=0,i=e.length;n<i;n++)"inline"===(o=e[n].type)?a+=this.renderInline(e[n].children,t,r):void 0!==s[o]?a+=s[e[n].type](e,n,t,r,this):a+=this.renderToken(e,n,t,r);return a},e.exports=s},"./node_modules/markdown-it/lib/ruler.js":e=>{"use strict";function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},t.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(r){r.enabled&&(t&&r.alt.indexOf(t)<0||e.__cache__[t].push(r.fn))}))}))},t.prototype.at=function(e,t,r){var n=this.__find__(e),i=r||{};if(-1===n)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=i.alt||[],this.__cache__=null},t.prototype.before=function(e,t,r,n){var i=this.__find__(e),o=n||{};if(-1===i)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:r,alt:o.alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,r,n){var i=this.__find__(e),o=n||{};if(-1===i)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:r,alt:o.alt||[]}),this.__cache__=null},t.prototype.push=function(e,t,r){var n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null},t.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var r=[];return e.forEach((function(e){var n=this.__find__(e);if(n<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,r.push(e)}),this),this.__cache__=null,r},t.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},t.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var r=[];return e.forEach((function(e){var n=this.__find__(e);if(n<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,r.push(e)}),this),this.__cache__=null,r},t.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=t},"./node_modules/markdown-it/lib/rules_block/blockquote.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js").isSpace;e.exports=function(e,t,r,i){var o,a,s,l,c,u,d,h,p,f,m,g,v,y,b,k,x,w,C,_,S=e.lineMax,A=e.bMarks[t]+e.tShift[t],L=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(A++))return!1;if(i)return!0;for(l=p=e.sCount[t]+1,32===e.src.charCodeAt(A)?(A++,l++,p++,o=!1,k=!0):9===e.src.charCodeAt(A)?(k=!0,(e.bsCount[t]+p)%4==3?(A++,l++,p++,o=!1):o=!0):k=!1,f=[e.bMarks[t]],e.bMarks[t]=A;A<L&&(a=e.src.charCodeAt(A),n(a));)9===a?p+=4-(p+e.bsCount[t]+(o?1:0))%4:p++,A++;for(m=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(k?1:0),u=A>=L,y=[e.sCount[t]],e.sCount[t]=p-l,b=[e.tShift[t]],e.tShift[t]=A-e.bMarks[t],w=e.md.block.ruler.getRules("blockquote"),v=e.parentType,e.parentType="blockquote",h=t+1;h<r&&(_=e.sCount[h]<e.blkIndent,!((A=e.bMarks[h]+e.tShift[h])>=(L=e.eMarks[h])));h++)if(62!==e.src.charCodeAt(A++)||_){if(u)break;for(x=!1,s=0,c=w.length;s<c;s++)if(w[s](e,h,r,!0)){x=!0;break}if(x){e.lineMax=h,0!==e.blkIndent&&(f.push(e.bMarks[h]),m.push(e.bsCount[h]),b.push(e.tShift[h]),y.push(e.sCount[h]),e.sCount[h]-=e.blkIndent);break}f.push(e.bMarks[h]),m.push(e.bsCount[h]),b.push(e.tShift[h]),y.push(e.sCount[h]),e.sCount[h]=-1}else{for(l=p=e.sCount[h]+1,32===e.src.charCodeAt(A)?(A++,l++,p++,o=!1,k=!0):9===e.src.charCodeAt(A)?(k=!0,(e.bsCount[h]+p)%4==3?(A++,l++,p++,o=!1):o=!0):k=!1,f.push(e.bMarks[h]),e.bMarks[h]=A;A<L&&(a=e.src.charCodeAt(A),n(a));)9===a?p+=4-(p+e.bsCount[h]+(o?1:0))%4:p++,A++;u=A>=L,m.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(k?1:0),y.push(e.sCount[h]),e.sCount[h]=p-l,b.push(e.tShift[h]),e.tShift[h]=A-e.bMarks[h]}for(g=e.blkIndent,e.blkIndent=0,(C=e.push("blockquote_open","blockquote",1)).markup=">",C.map=d=[t,0],e.md.block.tokenize(e,t,h),(C=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=S,e.parentType=v,d[1]=e.line,s=0;s<b.length;s++)e.bMarks[s+t]=f[s],e.tShift[s+t]=b[s],e.sCount[s+t]=y[s],e.bsCount[s+t]=m[s];return e.blkIndent=g,!0}},"./node_modules/markdown-it/lib/rules_block/code.js":e=>{"use strict";e.exports=function(e,t,r){var n,i,o;if(e.sCount[t]-e.blkIndent<4)return!1;for(i=n=t+1;n<r;)if(e.isEmpty(n))n++;else{if(!(e.sCount[n]-e.blkIndent>=4))break;i=++n}return e.line=i,(o=e.push("code_block","code",0)).content=e.getLines(t,i,4+e.blkIndent,!0),o.map=[t,e.line],!0}},"./node_modules/markdown-it/lib/rules_block/fence.js":e=>{"use strict";e.exports=function(e,t,r,n){var i,o,a,s,l,c,u,d=!1,h=e.bMarks[t]+e.tShift[t],p=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(h+3>p)return!1;if(126!==(i=e.src.charCodeAt(h))&&96!==i)return!1;if(l=h,(o=(h=e.skipChars(h,i))-l)<3)return!1;if(u=e.src.slice(l,h),a=e.src.slice(h,p),96===i&&a.indexOf(String.fromCharCode(i))>=0)return!1;if(n)return!0;for(s=t;!(++s>=r||(h=l=e.bMarks[s]+e.tShift[s])<(p=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(e.src.charCodeAt(h)===i&&!(e.sCount[s]-e.blkIndent>=4||(h=e.skipChars(h,i))-l<o||(h=e.skipSpaces(h))<p)){d=!0;break}return o=e.sCount[t],e.line=s+(d?1:0),(c=e.push("fence","code",0)).info=a,c.content=e.getLines(t+1,s,o,!0),c.markup=u,c.map=[t,e.line],!0}},"./node_modules/markdown-it/lib/rules_block/heading.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js").isSpace;e.exports=function(e,t,r,i){var o,a,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(o=e.src.charCodeAt(c))||c>=u)return!1;for(a=1,o=e.src.charCodeAt(++c);35===o&&c<u&&a<=6;)a++,o=e.src.charCodeAt(++c);return!(a>6||c<u&&!n(o)||(i||(u=e.skipSpacesBack(u,c),(s=e.skipCharsBack(u,35,c))>c&&n(e.src.charCodeAt(s-1))&&(u=s),e.line=t+1,(l=e.push("heading_open","h"+String(a),1)).markup="########".slice(0,a),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(c,u).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(a),-1)).markup="########".slice(0,a)),0))}},"./node_modules/markdown-it/lib/rules_block/hr.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js").isSpace;e.exports=function(e,t,r,i){var o,a,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(o=e.src.charCodeAt(c++))&&45!==o&&95!==o)return!1;for(a=1;c<u;){if((s=e.src.charCodeAt(c++))!==o&&!n(s))return!1;s===o&&a++}return!(a<3||(i||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(a+1).join(String.fromCharCode(o))),0))}},"./node_modules/markdown-it/lib/rules_block/html_block.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/html_blocks.js"),i=r("./node_modules/markdown-it/lib/common/html_re.js").HTML_OPEN_CLOSE_TAG_RE,o=[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+n.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(i.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,r,n){var i,a,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(l=e.src.slice(c,u),i=0;i<o.length&&!o[i][0].test(l);i++);if(i===o.length)return!1;if(n)return o[i][2];if(a=t+1,!o[i][1].test(l))for(;a<r&&!(e.sCount[a]<e.blkIndent);a++)if(c=e.bMarks[a]+e.tShift[a],u=e.eMarks[a],l=e.src.slice(c,u),o[i][1].test(l)){0!==l.length&&a++;break}return e.line=a,(s=e.push("html_block","",0)).map=[t,a],s.content=e.getLines(t,a,e.blkIndent,!0),!0}},"./node_modules/markdown-it/lib/rules_block/lheading.js":e=>{"use strict";e.exports=function(e,t,r){var n,i,o,a,s,l,c,u,d,h,p=t+1,f=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(h=e.parentType,e.parentType="paragraph";p<r&&!e.isEmpty(p);p++)if(!(e.sCount[p]-e.blkIndent>3)){if(e.sCount[p]>=e.blkIndent&&(l=e.bMarks[p]+e.tShift[p])<(c=e.eMarks[p])&&(45===(d=e.src.charCodeAt(l))||61===d)&&(l=e.skipChars(l,d),(l=e.skipSpaces(l))>=c)){u=61===d?1:2;break}if(!(e.sCount[p]<0)){for(i=!1,o=0,a=f.length;o<a;o++)if(f[o](e,p,r,!0)){i=!0;break}if(i)break}}return!!u&&(n=e.getLines(t,p,e.blkIndent,!1).trim(),e.line=p+1,(s=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(d),s.map=[t,e.line],(s=e.push("inline","",0)).content=n,s.map=[t,e.line-1],s.children=[],(s=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(d),e.parentType=h,!0)}},"./node_modules/markdown-it/lib/rules_block/list.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js").isSpace;function i(e,t){var r,i,o,a;return i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],42!==(r=e.src.charCodeAt(i++))&&45!==r&&43!==r||i<o&&(a=e.src.charCodeAt(i),!n(a))?-1:i}function o(e,t){var r,i=e.bMarks[t]+e.tShift[t],o=i,a=e.eMarks[t];if(o+1>=a)return-1;if((r=e.src.charCodeAt(o++))<48||r>57)return-1;for(;;){if(o>=a)return-1;if(!((r=e.src.charCodeAt(o++))>=48&&r<=57)){if(41===r||46===r)break;return-1}if(o-i>=10)return-1}return o<a&&(r=e.src.charCodeAt(o),!n(r))?-1:o}e.exports=function(e,t,r,n){var a,s,l,c,u,d,h,p,f,m,g,v,y,b,k,x,w,C,_,S,A,L,M,T,E,D,F,N,I=!1,O=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(n&&"paragraph"===e.parentType&&e.tShift[t]>=e.blkIndent&&(I=!0),(M=o(e,t))>=0){if(h=!0,E=e.bMarks[t]+e.tShift[t],y=Number(e.src.substr(E,M-E-1)),I&&1!==y)return!1}else{if(!((M=i(e,t))>=0))return!1;h=!1}if(I&&e.skipSpaces(M)>=e.eMarks[t])return!1;if(v=e.src.charCodeAt(M-1),n)return!0;for(g=e.tokens.length,h?(N=e.push("ordered_list_open","ol",1),1!==y&&(N.attrs=[["start",y]])):N=e.push("bullet_list_open","ul",1),N.map=m=[t,0],N.markup=String.fromCharCode(v),k=t,T=!1,F=e.md.block.ruler.getRules("list"),C=e.parentType,e.parentType="list";k<r;){for(L=M,b=e.eMarks[k],d=x=e.sCount[k]+M-(e.bMarks[t]+e.tShift[t]);L<b;){if(9===(a=e.src.charCodeAt(L)))x+=4-(x+e.bsCount[k])%4;else{if(32!==a)break;x++}L++}if((u=(s=L)>=b?1:x-d)>4&&(u=1),c=d+u,(N=e.push("list_item_open","li",1)).markup=String.fromCharCode(v),N.map=p=[t,0],A=e.tight,S=e.tShift[t],_=e.sCount[t],w=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=x,s>=b&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,t,r,!0),e.tight&&!T||(O=!1),T=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=w,e.tShift[t]=S,e.sCount[t]=_,e.tight=A,(N=e.push("list_item_close","li",-1)).markup=String.fromCharCode(v),k=t=e.line,p[1]=k,s=e.bMarks[t],k>=r)break;if(e.sCount[k]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(D=!1,l=0,f=F.length;l<f;l++)if(F[l](e,k,r,!0)){D=!0;break}if(D)break;if(h){if((M=o(e,k))<0)break}else if((M=i(e,k))<0)break;if(v!==e.src.charCodeAt(M-1))break}return(N=h?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(v),m[1]=k,e.line=k,e.parentType=C,O&&function(e,t){var r,n,i=e.level+2;for(r=t+2,n=e.tokens.length-2;r<n;r++)e.tokens[r].level===i&&"paragraph_open"===e.tokens[r].type&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}(e,g),!0}},"./node_modules/markdown-it/lib/rules_block/paragraph.js":e=>{"use strict";e.exports=function(e,t){var r,n,i,o,a,s,l=t+1,c=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(s=e.parentType,e.parentType="paragraph";l<u&&!e.isEmpty(l);l++)if(!(e.sCount[l]-e.blkIndent>3||e.sCount[l]<0)){for(n=!1,i=0,o=c.length;i<o;i++)if(c[i](e,l,u,!0)){n=!0;break}if(n)break}return r=e.getLines(t,l,e.blkIndent,!1).trim(),e.line=l,(a=e.push("paragraph_open","p",1)).map=[t,e.line],(a=e.push("inline","",0)).content=r,a.map=[t,e.line],a.children=[],a=e.push("paragraph_close","p",-1),e.parentType=s,!0}},"./node_modules/markdown-it/lib/rules_block/reference.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js").normalizeReference,i=r("./node_modules/markdown-it/lib/common/utils.js").isSpace;e.exports=function(e,t,r,o){var a,s,l,c,u,d,h,p,f,m,g,v,y,b,k,x,w=0,C=e.bMarks[t]+e.tShift[t],_=e.eMarks[t],S=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(C))return!1;for(;++C<_;)if(93===e.src.charCodeAt(C)&&92!==e.src.charCodeAt(C-1)){if(C+1===_)return!1;if(58!==e.src.charCodeAt(C+1))return!1;break}for(c=e.lineMax,k=e.md.block.ruler.getRules("reference"),m=e.parentType,e.parentType="reference";S<c&&!e.isEmpty(S);S++)if(!(e.sCount[S]-e.blkIndent>3||e.sCount[S]<0)){for(b=!1,d=0,h=k.length;d<h;d++)if(k[d](e,S,c,!0)){b=!0;break}if(b)break}for(_=(y=e.getLines(t,S,e.blkIndent,!1).trim()).length,C=1;C<_;C++){if(91===(a=y.charCodeAt(C)))return!1;if(93===a){f=C;break}(10===a||92===a&&++C<_&&10===y.charCodeAt(C))&&w++}if(f<0||58!==y.charCodeAt(f+1))return!1;for(C=f+2;C<_;C++)if(10===(a=y.charCodeAt(C)))w++;else if(!i(a))break;if(!(g=e.md.helpers.parseLinkDestination(y,C,_)).ok)return!1;if(u=e.md.normalizeLink(g.str),!e.md.validateLink(u))return!1;for(s=C=g.pos,l=w+=g.lines,v=C;C<_;C++)if(10===(a=y.charCodeAt(C)))w++;else if(!i(a))break;for(g=e.md.helpers.parseLinkTitle(y,C,_),C<_&&v!==C&&g.ok?(x=g.str,C=g.pos,w+=g.lines):(x="",C=s,w=l);C<_&&(a=y.charCodeAt(C),i(a));)C++;if(C<_&&10!==y.charCodeAt(C)&&x)for(x="",C=s,w=l;C<_&&(a=y.charCodeAt(C),i(a));)C++;return!(C<_&&10!==y.charCodeAt(C)||!(p=n(y.slice(1,f)))||(o||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[p]&&(e.env.references[p]={title:x,href:u}),e.parentType=m,e.line=t+w+1),0))}},"./node_modules/markdown-it/lib/rules_block/state_block.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/token.js"),i=r("./node_modules/markdown-it/lib/common/utils.js").isSpace;function o(e,t,r,n){var o,a,s,l,c,u,d,h;for(this.src=e,this.md=t,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",h=!1,s=l=u=d=0,c=(a=this.src).length;l<c;l++){if(o=a.charCodeAt(l),!h){if(i(o)){u++,9===o?d+=4-d%4:d++;continue}h=!0}10!==o&&l!==c-1||(10!==o&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(u),this.sCount.push(d),this.bsCount.push(0),h=!1,u=0,d=0,s=l+1)}this.bMarks.push(a.length),this.eMarks.push(a.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}o.prototype.push=function(e,t,r){var i=new n(e,t,r);return i.block=!0,r<0&&this.level--,i.level=this.level,r>0&&this.level++,this.tokens.push(i),i},o.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},o.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},o.prototype.skipSpaces=function(e){for(var t,r=this.src.length;e<r&&(t=this.src.charCodeAt(e),i(t));e++);return e},o.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!i(this.src.charCodeAt(--e)))return e+1;return e},o.prototype.skipChars=function(e,t){for(var r=this.src.length;e<r&&this.src.charCodeAt(e)===t;e++);return e},o.prototype.skipCharsBack=function(e,t,r){if(e<=r)return e;for(;e>r;)if(t!==this.src.charCodeAt(--e))return e+1;return e},o.prototype.getLines=function(e,t,r,n){var o,a,s,l,c,u,d,h=e;if(e>=t)return"";for(u=new Array(t-e),o=0;h<t;h++,o++){for(a=0,d=l=this.bMarks[h],c=h+1<t||n?this.eMarks[h]+1:this.eMarks[h];l<c&&a<r;){if(s=this.src.charCodeAt(l),i(s))9===s?a+=4-(a+this.bsCount[h])%4:a++;else{if(!(l-d<this.tShift[h]))break;a++}l++}u[o]=a>r?new Array(a-r+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return u.join("")},o.prototype.Token=n,e.exports=o},"./node_modules/markdown-it/lib/rules_block/table.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js").isSpace;function i(e,t){var r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.substr(r,n-r)}function o(e){var t,r=[],n=0,i=e.length,o=!1,a=0,s="";for(t=e.charCodeAt(n);n<i;)124===t&&(o?(s+=e.substring(a,n-1),a=n):(r.push(s+e.substring(a,n)),s="",a=n+1)),o=92===t,n++,t=e.charCodeAt(n);return r.push(s+e.substring(a)),r}e.exports=function(e,t,r,a){var s,l,c,u,d,h,p,f,m,g,v,y,b,k,x,w;if(t+2>r)return!1;if(h=t+1,e.sCount[h]<e.blkIndent)return!1;if(e.sCount[h]-e.blkIndent>=4)return!1;if((c=e.bMarks[h]+e.tShift[h])>=e.eMarks[h])return!1;if(124!==(s=e.src.charCodeAt(c++))&&45!==s&&58!==s)return!1;for(;c<e.eMarks[h];){if(124!==(s=e.src.charCodeAt(c))&&45!==s&&58!==s&&!n(s))return!1;c++}for(p=(l=i(e,t+1)).split("|"),g=[],u=0;u<p.length;u++){if(!(v=p[u].trim())){if(0===u||u===p.length-1)continue;return!1}if(!/^:?-+:?$/.test(v))return!1;58===v.charCodeAt(v.length-1)?g.push(58===v.charCodeAt(0)?"center":"right"):58===v.charCodeAt(0)?g.push("left"):g.push("")}if(-1===(l=i(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((p=o(l)).length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),0===(f=p.length)||f!==g.length)return!1;if(a)return!0;for(k=e.parentType,e.parentType="table",w=e.md.block.ruler.getRules("blockquote"),(m=e.push("table_open","table",1)).map=y=[t,0],(m=e.push("thead_open","thead",1)).map=[t,t+1],(m=e.push("tr_open","tr",1)).map=[t,t+1],u=0;u<p.length;u++)m=e.push("th_open","th",1),g[u]&&(m.attrs=[["style","text-align:"+g[u]]]),(m=e.push("inline","",0)).content=p[u].trim(),m.children=[],m=e.push("th_close","th",-1);for(m=e.push("tr_close","tr",-1),m=e.push("thead_close","thead",-1),h=t+2;h<r&&!(e.sCount[h]<e.blkIndent);h++){for(x=!1,u=0,d=w.length;u<d;u++)if(w[u](e,h,r,!0)){x=!0;break}if(x)break;if(!(l=i(e,h).trim()))break;if(e.sCount[h]-e.blkIndent>=4)break;for((p=o(l)).length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),h===t+2&&((m=e.push("tbody_open","tbody",1)).map=b=[t+2,0]),(m=e.push("tr_open","tr",1)).map=[h,h+1],u=0;u<f;u++)m=e.push("td_open","td",1),g[u]&&(m.attrs=[["style","text-align:"+g[u]]]),(m=e.push("inline","",0)).content=p[u]?p[u].trim():"",m.children=[],m=e.push("td_close","td",-1);m=e.push("tr_close","tr",-1)}return b&&(m=e.push("tbody_close","tbody",-1),b[1]=h),m=e.push("table_close","table",-1),y[1]=h,e.parentType=k,e.line=h,!0}},"./node_modules/markdown-it/lib/rules_core/block.js":e=>{"use strict";e.exports=function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},"./node_modules/markdown-it/lib/rules_core/inline.js":e=>{"use strict";e.exports=function(e){var t,r,n,i=e.tokens;for(r=0,n=i.length;r<n;r++)"inline"===(t=i[r]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},"./node_modules/markdown-it/lib/rules_core/linkify.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js").arrayReplaceAt;function i(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,r,o,a,s,l,c,u,d,h,p,f,m,g,v,y,b,k,x=e.tokens;if(e.md.options.linkify)for(r=0,o=x.length;r<o;r++)if("inline"===x[r].type&&e.md.linkify.pretest(x[r].content))for(m=0,t=(a=x[r].children).length-1;t>=0;t--)if("link_close"!==(l=a[t]).type){if("html_inline"===l.type&&(k=l.content,/^<a[>\s]/i.test(k)&&m>0&&m--,i(l.content)&&m++),!(m>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(d=l.content,b=e.md.linkify.match(d),c=[],f=l.level,p=0,u=0;u<b.length;u++)g=b[u].url,v=e.md.normalizeLink(g),e.md.validateLink(v)&&(y=b[u].text,y=b[u].schema?"mailto:"!==b[u].schema||/^mailto:/i.test(y)?e.md.normalizeLinkText(y):e.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,""),(h=b[u].index)>p&&((s=new e.Token("text","",0)).content=d.slice(p,h),s.level=f,c.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",v]],s.level=f++,s.markup="linkify",s.info="auto",c.push(s),(s=new e.Token("text","",0)).content=y,s.level=f,c.push(s),(s=new e.Token("link_close","a",-1)).level=--f,s.markup="linkify",s.info="auto",c.push(s),p=b[u].lastIndex);p<d.length&&((s=new e.Token("text","",0)).content=d.slice(p),s.level=f,c.push(s)),x[r].children=a=n(a,t,c)}}else for(t--;a[t].level!==l.level&&"link_open"!==a[t].type;)t--}},"./node_modules/markdown-it/lib/rules_core/normalize.js":e=>{"use strict";var t=/\r\n?|\n/g,r=/\0/g;e.exports=function(e){var n;n=(n=e.src.replace(t,"\n")).replace(r,"�"),e.src=n}},"./node_modules/markdown-it/lib/rules_core/replacements.js":e=>{"use strict";var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,r=/\((c|tm|r|p)\)/i,n=/\((c|tm|r|p)\)/gi,i={c:"©",r:"®",p:"§",tm:"™"};function o(e,t){return i[t.toLowerCase()]}function a(e){var t,r,i=0;for(t=e.length-1;t>=0;t--)"text"!==(r=e[t]).type||i||(r.content=r.content.replace(n,o)),"link_open"===r.type&&"auto"===r.info&&i--,"link_close"===r.type&&"auto"===r.info&&i++}function s(e){var r,n,i=0;for(r=e.length-1;r>=0;r--)"text"!==(n=e[r]).type||i||t.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&i--,"link_close"===n.type&&"auto"===n.info&&i++}e.exports=function(e){var n;if(e.md.options.typographer)for(n=e.tokens.length-1;n>=0;n--)"inline"===e.tokens[n].type&&(r.test(e.tokens[n].content)&&a(e.tokens[n].children),t.test(e.tokens[n].content)&&s(e.tokens[n].children))}},"./node_modules/markdown-it/lib/rules_core/smartquotes.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js").isWhiteSpace,i=r("./node_modules/markdown-it/lib/common/utils.js").isPunctChar,o=r("./node_modules/markdown-it/lib/common/utils.js").isMdAsciiPunct,a=/['"]/,s=/['"]/g;function l(e,t,r){return e.substr(0,t)+r+e.substr(t+1)}function c(e,t){var r,a,c,u,d,h,p,f,m,g,v,y,b,k,x,w,C,_,S,A,L;for(S=[],r=0;r<e.length;r++){for(a=e[r],p=e[r].level,C=S.length-1;C>=0&&!(S[C].level<=p);C--);if(S.length=C+1,"text"===a.type){d=0,h=(c=a.content).length;e:for(;d<h&&(s.lastIndex=d,u=s.exec(c));){if(x=w=!0,d=u.index+1,_="'"===u[0],m=32,u.index-1>=0)m=c.charCodeAt(u.index-1);else for(C=r-1;C>=0&&"softbreak"!==e[C].type&&"hardbreak"!==e[C].type;C--)if(e[C].content){m=e[C].content.charCodeAt(e[C].content.length-1);break}if(g=32,d<h)g=c.charCodeAt(d);else for(C=r+1;C<e.length&&"softbreak"!==e[C].type&&"hardbreak"!==e[C].type;C++)if(e[C].content){g=e[C].content.charCodeAt(0);break}if(v=o(m)||i(String.fromCharCode(m)),y=o(g)||i(String.fromCharCode(g)),b=n(m),(k=n(g))?x=!1:y&&(b||v||(x=!1)),b?w=!1:v&&(k||y||(w=!1)),34===g&&'"'===u[0]&&m>=48&&m<=57&&(w=x=!1),x&&w&&(x=v,w=y),x||w){if(w)for(C=S.length-1;C>=0&&(f=S[C],!(S[C].level<p));C--)if(f.single===_&&S[C].level===p){f=S[C],_?(A=t.md.options.quotes[2],L=t.md.options.quotes[3]):(A=t.md.options.quotes[0],L=t.md.options.quotes[1]),a.content=l(a.content,u.index,L),e[f.token].content=l(e[f.token].content,f.pos,A),d+=L.length-1,f.token===r&&(d+=A.length-1),h=(c=a.content).length,S.length=C;continue e}x?S.push({token:r,pos:u.index,single:_,level:p}):w&&_&&(a.content=l(a.content,u.index,"’"))}else _&&(a.content=l(a.content,u.index,"’"))}}}}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&a.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},"./node_modules/markdown-it/lib/rules_core/state_core.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/token.js");function i(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}i.prototype.Token=n,e.exports=i},"./node_modules/markdown-it/lib/rules_inline/autolink.js":e=>{"use strict";var t=/^<([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])?)*)>/,r=/^<([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)>/;e.exports=function(e,n){var i,o,a,s,l,c,u=e.pos;return!(60!==e.src.charCodeAt(u)||(i=e.src.slice(u)).indexOf(">")<0||(r.test(i)?(s=(o=i.match(r))[0].slice(1,-1),l=e.md.normalizeLink(s),!e.md.validateLink(l)||(n||((c=e.push("link_open","a",1)).attrs=[["href",l]],c.markup="autolink",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(s),(c=e.push("link_close","a",-1)).markup="autolink",c.info="auto"),e.pos+=o[0].length,0)):!t.test(i)||(s=(a=i.match(t))[0].slice(1,-1),l=e.md.normalizeLink("mailto:"+s),!e.md.validateLink(l)||(n||((c=e.push("link_open","a",1)).attrs=[["href",l]],c.markup="autolink",c.info="auto",(c=e.push("text","",0)).content=e.md.normalizeLinkText(s),(c=e.push("link_close","a",-1)).markup="autolink",c.info="auto"),e.pos+=a[0].length,0))))}},"./node_modules/markdown-it/lib/rules_inline/backticks.js":e=>{"use strict";e.exports=function(e,t){var r,n,i,o,a,s,l=e.pos;if(96!==e.src.charCodeAt(l))return!1;for(r=l,l++,n=e.posMax;l<n&&96===e.src.charCodeAt(l);)l++;for(i=e.src.slice(r,l),o=a=l;-1!==(o=e.src.indexOf("`",a));){for(a=o+1;a<n&&96===e.src.charCodeAt(a);)a++;if(a-o===i.length)return t||((s=e.push("code_inline","code",0)).markup=i,s.content=e.src.slice(l,o).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=a,!0}return t||(e.pending+=i),e.pos+=i.length,!0}},"./node_modules/markdown-it/lib/rules_inline/balance_pairs.js":e=>{"use strict";function t(e,t){var r,n,i,o,a,s,l,c,u={},d=t.length;for(r=0;r<d;r++)if((i=t[r]).length=i.length||0,i.close){for(u.hasOwnProperty(i.marker)||(u[i.marker]=[-1,-1,-1]),a=u[i.marker][i.length%3],s=-1,n=r-i.jump-1;n>a;n-=o.jump+1)if((o=t[n]).marker===i.marker&&(-1===s&&(s=n),o.open&&o.end<0&&(l=!1,(o.close||i.open)&&(o.length+i.length)%3==0&&(o.length%3==0&&i.length%3==0||(l=!0)),!l))){c=n>0&&!t[n-1].open?t[n-1].jump+1:0,i.jump=r-n+c,i.open=!1,o.end=r,o.jump=c,o.close=!1,s=-1;break}-1!==s&&(u[i.marker][(i.length||0)%3]=s)}}e.exports=function(e){var r,n=e.tokens_meta,i=e.tokens_meta.length;for(t(0,e.delimiters),r=0;r<i;r++)n[r]&&n[r].delimiters&&t(0,n[r].delimiters)}},"./node_modules/markdown-it/lib/rules_inline/emphasis.js":e=>{"use strict";function t(e,t){var r,n,i,o,a,s;for(r=t.length-1;r>=0;r--)95!==(n=t[r]).marker&&42!==n.marker||-1!==n.end&&(i=t[n.end],s=r>0&&t[r-1].end===n.end+1&&t[r-1].token===n.token-1&&t[n.end+1].token===i.token+1&&t[r-1].marker===n.marker,a=String.fromCharCode(n.marker),(o=e.tokens[n.token]).type=s?"strong_open":"em_open",o.tag=s?"strong":"em",o.nesting=1,o.markup=s?a+a:a,o.content="",(o=e.tokens[i.token]).type=s?"strong_close":"em_close",o.tag=s?"strong":"em",o.nesting=-1,o.markup=s?a+a:a,o.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[n.end+1].token].content="",r--))}e.exports.tokenize=function(e,t){var r,n,i=e.pos,o=e.src.charCodeAt(i);if(t)return!1;if(95!==o&&42!==o)return!1;for(n=e.scanDelims(e.pos,42===o),r=0;r<n.length;r++)e.push("text","",0).content=String.fromCharCode(o),e.delimiters.push({marker:o,length:n.length,jump:r,token:e.tokens.length-1,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},e.exports.postProcess=function(e){var r,n=e.tokens_meta,i=e.tokens_meta.length;for(t(e,e.delimiters),r=0;r<i;r++)n[r]&&n[r].delimiters&&t(e,n[r].delimiters)}},"./node_modules/markdown-it/lib/rules_inline/entity.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/entities.js"),i=r("./node_modules/markdown-it/lib/common/utils.js").has,o=r("./node_modules/markdown-it/lib/common/utils.js").isValidEntityCode,a=r("./node_modules/markdown-it/lib/common/utils.js").fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var r,c,u=e.pos,d=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(u+1<d)if(35===e.src.charCodeAt(u+1)){if(c=e.src.slice(u).match(s))return t||(r="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=o(r)?a(r):a(65533)),e.pos+=c[0].length,!0}else if((c=e.src.slice(u).match(l))&&i(n,c[1]))return t||(e.pending+=n[c[1]]),e.pos+=c[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},"./node_modules/markdown-it/lib/rules_inline/escape.js":(e,t,r)=>{"use strict";for(var n=r("./node_modules/markdown-it/lib/common/utils.js").isSpace,i=[],o=0;o<256;o++)i.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){i[e.charCodeAt(0)]=1})),e.exports=function(e,t){var r,o=e.pos,a=e.posMax;if(92!==e.src.charCodeAt(o))return!1;if(++o<a){if((r=e.src.charCodeAt(o))<256&&0!==i[r])return t||(e.pending+=e.src[o]),e.pos+=2,!0;if(10===r){for(t||e.push("hardbreak","br",0),o++;o<a&&(r=e.src.charCodeAt(o),n(r));)o++;return e.pos=o,!0}}return t||(e.pending+="\\"),e.pos++,!0}},"./node_modules/markdown-it/lib/rules_inline/html_inline.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/html_re.js").HTML_TAG_RE;e.exports=function(e,t){var r,i,o,a=e.pos;return!(!e.md.options.html||(o=e.posMax,60!==e.src.charCodeAt(a)||a+2>=o||33!==(r=e.src.charCodeAt(a+1))&&63!==r&&47!==r&&!function(e){var t=32|e;return t>=97&&t<=122}(r)||!(i=e.src.slice(a).match(n))||(t||(e.push("html_inline","",0).content=e.src.slice(a,a+i[0].length)),e.pos+=i[0].length,0)))}},"./node_modules/markdown-it/lib/rules_inline/image.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js").normalizeReference,i=r("./node_modules/markdown-it/lib/common/utils.js").isSpace;e.exports=function(e,t){var r,o,a,s,l,c,u,d,h,p,f,m,g,v="",y=e.pos,b=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((u=l+1)<b&&40===e.src.charCodeAt(u)){for(u++;u<b&&(o=e.src.charCodeAt(u),i(o)||10===o);u++);if(u>=b)return!1;for(g=u,(h=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(v=e.md.normalizeLink(h.str),e.md.validateLink(v)?u=h.pos:v=""),g=u;u<b&&(o=e.src.charCodeAt(u),i(o)||10===o);u++);if(h=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<b&&g!==u&&h.ok)for(p=h.str,u=h.pos;u<b&&(o=e.src.charCodeAt(u),i(o)||10===o);u++);else p="";if(u>=b||41!==e.src.charCodeAt(u))return e.pos=y,!1;u++}else{if(void 0===e.env.references)return!1;if(u<b&&91===e.src.charCodeAt(u)?(g=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?s=e.src.slice(g,u++):u=l+1):u=l+1,s||(s=e.src.slice(c,l)),!(d=e.env.references[n(s)]))return e.pos=y,!1;v=d.href,p=d.title}return t||(a=e.src.slice(c,l),e.md.inline.parse(a,e.md,e.env,m=[]),(f=e.push("image","img",0)).attrs=r=[["src",v],["alt",""]],f.children=m,f.content=a,p&&r.push(["title",p])),e.pos=u,e.posMax=b,!0}},"./node_modules/markdown-it/lib/rules_inline/link.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js").normalizeReference,i=r("./node_modules/markdown-it/lib/common/utils.js").isSpace;e.exports=function(e,t){var r,o,a,s,l,c,u,d,h,p="",f=e.pos,m=e.posMax,g=e.pos,v=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(s=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((c=s+1)<m&&40===e.src.charCodeAt(c)){for(v=!1,c++;c<m&&(o=e.src.charCodeAt(c),i(o)||10===o);c++);if(c>=m)return!1;for(g=c,(u=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok&&(p=e.md.normalizeLink(u.str),e.md.validateLink(p)?c=u.pos:p=""),g=c;c<m&&(o=e.src.charCodeAt(c),i(o)||10===o);c++);if(u=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<m&&g!==c&&u.ok)for(h=u.str,c=u.pos;c<m&&(o=e.src.charCodeAt(c),i(o)||10===o);c++);else h="";(c>=m||41!==e.src.charCodeAt(c))&&(v=!0),c++}if(v){if(void 0===e.env.references)return!1;if(c<m&&91===e.src.charCodeAt(c)?(g=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?a=e.src.slice(g,c++):c=s+1):c=s+1,a||(a=e.src.slice(l,s)),!(d=e.env.references[n(a)]))return e.pos=f,!1;p=d.href,h=d.title}return t||(e.pos=l,e.posMax=s,e.push("link_open","a",1).attrs=r=[["href",p]],h&&r.push(["title",h]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=m,!0}},"./node_modules/markdown-it/lib/rules_inline/newline.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/common/utils.js").isSpace;e.exports=function(e,t){var r,i,o=e.pos;if(10!==e.src.charCodeAt(o))return!1;for(r=e.pending.length-1,i=e.posMax,t||(r>=0&&32===e.pending.charCodeAt(r)?r>=1&&32===e.pending.charCodeAt(r-1)?(e.pending=e.pending.replace(/ +$/,""),e.push("hardbreak","br",0)):(e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0)):e.push("softbreak","br",0)),o++;o<i&&n(e.src.charCodeAt(o));)o++;return e.pos=o,!0}},"./node_modules/markdown-it/lib/rules_inline/state_inline.js":(e,t,r)=>{"use strict";var n=r("./node_modules/markdown-it/lib/token.js"),i=r("./node_modules/markdown-it/lib/common/utils.js").isWhiteSpace,o=r("./node_modules/markdown-it/lib/common/utils.js").isPunctChar,a=r("./node_modules/markdown-it/lib/common/utils.js").isMdAsciiPunct;function s(e,t,r,n){this.src=e,this.env=r,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[]}s.prototype.pushPending=function(){var e=new n("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},s.prototype.push=function(e,t,r){this.pending&&this.pushPending();var i=new n(e,t,r),o=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(o),i},s.prototype.scanDelims=function(e,t){var r,n,s,l,c,u,d,h,p,f=e,m=!0,g=!0,v=this.posMax,y=this.src.charCodeAt(e);for(r=e>0?this.src.charCodeAt(e-1):32;f<v&&this.src.charCodeAt(f)===y;)f++;return s=f-e,n=f<v?this.src.charCodeAt(f):32,d=a(r)||o(String.fromCharCode(r)),p=a(n)||o(String.fromCharCode(n)),u=i(r),(h=i(n))?m=!1:p&&(u||d||(m=!1)),u?g=!1:d&&(h||p||(g=!1)),t?(l=m,c=g):(l=m&&(!g||d),c=g&&(!m||p)),{can_open:l,can_close:c,length:s}},s.prototype.Token=n,e.exports=s},"./node_modules/markdown-it/lib/rules_inline/strikethrough.js":e=>{"use strict";function t(e,t){var r,n,i,o,a,s=[],l=t.length;for(r=0;r<l;r++)126===(i=t[r]).marker&&-1!==i.end&&(o=t[i.end],(a=e.tokens[i.token]).type="s_open",a.tag="s",a.nesting=1,a.markup="~~",a.content="",(a=e.tokens[o.token]).type="s_close",a.tag="s",a.nesting=-1,a.markup="~~",a.content="","text"===e.tokens[o.token-1].type&&"~"===e.tokens[o.token-1].content&&s.push(o.token-1));for(;s.length;){for(n=(r=s.pop())+1;n<e.tokens.length&&"s_close"===e.tokens[n].type;)n++;r!==--n&&(a=e.tokens[n],e.tokens[n]=e.tokens[r],e.tokens[r]=a)}}e.exports.tokenize=function(e,t){var r,n,i,o,a=e.pos,s=e.src.charCodeAt(a);if(t)return!1;if(126!==s)return!1;if(i=(n=e.scanDelims(e.pos,!0)).length,o=String.fromCharCode(s),i<2)return!1;for(i%2&&(e.push("text","",0).content=o,i--),r=0;r<i;r+=2)e.push("text","",0).content=o+o,e.delimiters.push({marker:s,length:0,jump:r,token:e.tokens.length-1,end:-1,open:n.can_open,close:n.can_close});return e.pos+=n.length,!0},e.exports.postProcess=function(e){var r,n=e.tokens_meta,i=e.tokens_meta.length;for(t(e,e.delimiters),r=0;r<i;r++)n[r]&&n[r].delimiters&&t(e,n[r].delimiters)}},"./node_modules/markdown-it/lib/rules_inline/text.js":e=>{"use strict";function t(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(e,r){for(var n=e.pos;n<e.posMax&&!t(e.src.charCodeAt(n));)n++;return n!==e.pos&&(r||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}},"./node_modules/markdown-it/lib/rules_inline/text_collapse.js":e=>{"use strict";e.exports=function(e){var t,r,n=0,i=e.tokens,o=e.tokens.length;for(t=r=0;t<o;t++)i[t].nesting<0&&n--,i[t].level=n,i[t].nesting>0&&n++,"text"===i[t].type&&t+1<o&&"text"===i[t+1].type?i[t+1].content=i[t].content+i[t+1].content:(t!==r&&(i[r]=i[t]),r++);t!==r&&(i.length=r)}},"./node_modules/markdown-it/lib/token.js":e=>{"use strict";function t(e,t,r){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(e){var t,r,n;if(!this.attrs)return-1;for(r=0,n=(t=this.attrs).length;r<n;r++)if(t[r][0]===e)return r;return-1},t.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},t.prototype.attrSet=function(e,t){var r=this.attrIndex(e),n=[e,t];r<0?this.attrPush(n):this.attrs[r]=n},t.prototype.attrGet=function(e){var t=this.attrIndex(e),r=null;return t>=0&&(r=this.attrs[t][1]),r},t.prototype.attrJoin=function(e,t){var r=this.attrIndex(e);r<0?this.attrPush([e,t]):this.attrs[r][1]=this.attrs[r][1]+" "+t},e.exports=t},"./node_modules/marked/lib/marked.js":function(e){e.exports=function(){"use strict";function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function r(e,r){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}(e))||r&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var n=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),i=(n.defaults,n.getDefaults,n.changeDefaults,/[&<>"']/),o=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]};var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function d(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var h=/(^|[^\[])\^/g;var p=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var m={},g=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,y=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){m[" "+e]||(g.test(e)?m[" "+e]=e+"/":m[" "+e]=k(e,"/",!0));var r=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?r?t:e.replace(v,"$1")+t:"/"===t.charAt(0)?r?t:e.replace(y,"$1")+t:e+t}function k(e,t,r){var n=e.length;if(0===n)return"";for(var i=0;i<n;){var o=e.charAt(n-i-1);if(o!==t||r){if(o===t||!r)break;i++}else i++}return e.substr(0,n-i)}var x=function(e,t){if(t){if(i.test(e))return e.replace(o,c)}else if(a.test(e))return e.replace(s,c);return e},w=d,C=function(e,t){e=e.source||e,t=t||"";var r={replace:function(t,n){return n=(n=n.source||n).replace(h,"$1"),e=e.replace(t,n),r},getRegex:function(){return new RegExp(e,t)}};return r},_=function(e,t,r){if(e){var n;try{n=decodeURIComponent(d(r)).replace(p,"").toLowerCase()}catch(e){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}t&&!f.test(r)&&(r=b(t,r));try{r=encodeURI(r).replace(/%25/g,"%")}catch(e){return null}return r},S={exec:function(){}},A=function(e){for(var t,r,n=1;n<arguments.length;n++)for(r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},L=function(e,t){var r=e.replace(/\|/g,(function(e,t,r){for(var n=!1,i=t;--i>=0&&"\\"===r[i];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;n<r.length;n++)r[n]=r[n].trim().replace(/\\\|/g,"|");return r},M=k,T=function(e,t){if(-1===e.indexOf(t[1]))return-1;for(var r=e.length,n=0,i=0;i<r;i++)if("\\"===e[i])i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&--n<0)return i;return-1},E=function(e){e&&e.sanitize&&!e.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")},D=function(e,t){if(t<1)return"";for(var r="";t>1;)1&t&&(r+=e),t>>=1,e+=e;return r+e},F=n.defaults,N=M,I=L,O=x,R=T;function j(e,t,r){var n=t.href,i=t.title?O(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:r,href:n,title:i,text:o}:{type:"image",raw:r,href:n,title:i,text:O(o)}}var z=function(){function e(e){this.options=e||F}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var r=this.rules.block.code.exec(e);if(r){var n=t[t.length-1];if(n&&"paragraph"===n.type)return{raw:r[0],text:r[0].trimRight()};var i=r[0].replace(/^ {4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:N(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var r=t[0],n=function(e,t){var r=e.match(/^(\s+)(?:```)/);if(null===r)return t;var n=r[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(r,t[3]||"");return{type:"code",raw:r,lang:t[2]?t[2].trim():t[2],text:n}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var r={type:"table",header:I(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(r.header.length===r.align.length){var n,i=r.align.length;for(n=0;n<i;n++)/^ *-+: *$/.test(r.align[n])?r.align[n]="right":/^ *:-+: *$/.test(r.align[n])?r.align[n]="center":/^ *:-+ *$/.test(r.align[n])?r.align[n]="left":r.align[n]=null;for(i=r.cells.length,n=0;n<i;n++)r.cells[n]=I(r.cells[n],r.header.length);return r}}},t.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},t.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var r=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:r}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var r,n,i,o,a,s,l,c,u=t[0],d=t[2],h=d.length>1,p={type:"list",raw:u,ordered:h,start:h?+d.slice(0,-1):"",loose:!1,items:[]},f=t[0].match(this.rules.block.item),m=!1,g=f.length;i=this.rules.block.listItemStart.exec(f[0]);for(var v=0;v<g;v++){if(u=r=f[v],v!==g-1){if((o=this.rules.block.listItemStart.exec(f[v+1]))[1].length>i[0].length||o[1].length>3){f.splice(v,2,f[v]+"\n"+f[v+1]),v--,g--;continue}(!this.options.pedantic||this.options.smartLists?o[2][o[2].length-1]!==d[d.length-1]:h===(1===o[2].length))&&(a=f.slice(v+1).join("\n"),p.raw=p.raw.substring(0,p.raw.length-a.length),v=g-1),i=o}n=r.length,~(r=r.replace(/^ *([*+-]|\d+[.)]) ?/,"")).indexOf("\n ")&&(n-=r.length,r=this.options.pedantic?r.replace(/^ {1,4}/gm,""):r.replace(new RegExp("^ {1,"+n+"}","gm"),"")),s=m||/\n\n(?!\s*$)/.test(r),v!==g-1&&(m="\n"===r.charAt(r.length-1),s||(s=m)),s&&(p.loose=!0),c=void 0,(l=/^\[[ xX]\] /.test(r))&&(c=" "!==r[1],r=r.replace(/^\[[ xX]\] +/,"")),p.items.push({type:"list_item",raw:u,task:l,checked:c,loose:s,text:r})}return p}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):O(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var r={type:"table",header:I(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(r.header.length===r.align.length){r.raw=t[0];var n,i=r.align.length;for(n=0;n<i;n++)/^ *-+: *$/.test(r.align[n])?r.align[n]="right":/^ *:-+: *$/.test(r.align[n])?r.align[n]="center":/^ *:-+ *$/.test(r.align[n])?r.align[n]="left":r.align[n]=null;for(i=r.cells.length,n=0;n<i;n++)r.cells[n]=I(r.cells[n].replace(/^ *\| *| *\| *$/g,""),r.header.length);return r}}},t.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1]}},t.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t)return{type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1]}},t.text=function(e,t){var r=this.rules.block.text.exec(e);if(r){var n=t[t.length-1];return n&&"text"===n.type?{raw:r[0],text:r[0]}:{type:"text",raw:r[0],text:r[0]}}},t.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:O(t[1])}},t.tag=function(e,t,r){var n=this.rules.inline.tag.exec(e);if(n)return!t&&/^<a /i.test(n[0])?t=!0:t&&/^<\/a>/i.test(n[0])&&(t=!1),!r&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?r=!0:r&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(r=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:t,inRawBlock:r,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):O(n[0]):n[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var r=R(t[2],"()");if(r>-1){var n=(0===t[0].indexOf("!")?5:4)+t[1].length+r;t[2]=t[2].substring(0,r),t[0]=t[0].substring(0,n).trim(),t[3]=""}var i=t[2],o="";if(this.options.pedantic){var a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a?(i=a[1],o=a[3]):o=""}else o=t[3]?t[3].slice(1,-1):"";return j(t,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:o?o.replace(this.rules.inline._escapes,"$1"):o},t[0])}},t.reflink=function(e,t){var r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){var n=(r[2]||r[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return j(r,n,r[0])}},t.strong=function(e,t,r){void 0===r&&(r="");var n=this.rules.inline.strong.start.exec(e);if(n&&(!n[1]||n[1]&&(""===r||this.rules.inline.punctuation.exec(r)))){t=t.slice(-1*e.length);var i,o="**"===n[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(n=o.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,n.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,r){void 0===r&&(r="");var n=this.rules.inline.em.start.exec(e);if(n&&(!n[1]||n[1]&&(""===r||this.rules.inline.punctuation.exec(r)))){t=t.slice(-1*e.length);var i,o="*"===n[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(n=o.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,n.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var r=t[2].replace(/\n/g," "),n=/[^ ]/.test(r),i=r.startsWith(" ")&&r.endsWith(" ");return n&&i&&(r=r.substring(1,r.length-1)),r=O(r,!0),{type:"codespan",raw:t[0],text:r}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}},t.autolink=function(e,t){var r,n,i=this.rules.inline.autolink.exec(e);if(i)return n="@"===i[2]?"mailto:"+(r=O(this.options.mangle?t(i[1]):i[1])):r=O(i[1]),{type:"link",raw:i[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}},t.url=function(e,t){var r;if(r=this.rules.inline.url.exec(e)){var n,i;if("@"===r[2])i="mailto:"+(n=O(this.options.mangle?t(r[0]):r[0]));else{var o;do{o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0]}while(o!==r[0]);n=O(r[0]),i="www."===r[1]?"http://"+n:n}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}},t.inlineText=function(e,t,r){var n,i=this.rules.inline.text.exec(e);if(i)return n=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):O(i[0]):i[0]:O(this.options.smartypants?r(i[0]):i[0]),{type:"text",raw:i[0],text:n}},e}(),B=S,P=C,q=A,H={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\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{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:B,table:B,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=P(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,H.item=P(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.listItemStart=P(/^( *)(bull)/).replace("bull",H.bullet).getRegex(),H.list=P(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._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",H._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,H.html=P(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=P(H._paragraph).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").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|!--)").replace("tag",H._tag).getRegex(),H.blockquote=P(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=q({},H),H.gfm=q({},H.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),H.gfm.nptable=P(H.gfm.nptable).replace("hr",H.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|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=P(H.gfm.table).replace("hr",H.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|!--)").replace("tag",H._tag).getRegex(),H.pedantic=q({},H.normal,{html:P("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._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]+?) *(?:#+ *)?(?:\n+|$)/,fences:B,paragraph:P(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var W={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:B,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)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:B,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\s*punctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};W.punctuation=P(W.punctuation).replace(/punctuation/g,W._punctuation).getRegex(),W._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",W._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",W._comment=P(H._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),W.em.start=P(W.em.start).replace(/punctuation/g,W._punctuation).getRegex(),W.em.middle=P(W.em.middle).replace(/punctuation/g,W._punctuation).replace(/overlapSkip/g,W._overlapSkip).getRegex(),W.em.endAst=P(W.em.endAst,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.em.endUnd=P(W.em.endUnd,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.strong.start=P(W.strong.start).replace(/punctuation/g,W._punctuation).getRegex(),W.strong.middle=P(W.strong.middle).replace(/punctuation/g,W._punctuation).replace(/overlapSkip/g,W._overlapSkip).getRegex(),W.strong.endAst=P(W.strong.endAst,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.strong.endUnd=P(W.strong.endUnd,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.blockSkip=P(W._blockSkip,"g").getRegex(),W.overlapSkip=P(W._overlapSkip,"g").getRegex(),W._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,W._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,W._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])?)+(?![-_])/,W.autolink=P(W.autolink).replace("scheme",W._scheme).replace("email",W._email).getRegex(),W._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,W.tag=P(W.tag).replace("comment",W._comment).replace("attribute",W._attribute).getRegex(),W._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,W._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,W._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,W.link=P(W.link).replace("label",W._label).replace("href",W._href).replace("title",W._title).getRegex(),W.reflink=P(W.reflink).replace("label",W._label).getRegex(),W.reflinkSearch=P(W.reflinkSearch,"g").replace("reflink",W.reflink).replace("nolink",W.nolink).getRegex(),W.normal=q({},W),W.pedantic=q({},W.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:P(/^!?\[(label)\]\((.*?)\)/).replace("label",W._label).getRegex(),reflink:P(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",W._label).getRegex()}),W.gfm=q({},W.normal,{escape:P(W.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)|[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),W.gfm.url=P(W.gfm.url,"i").replace("email",W.gfm._extended_email).getRegex(),W.breaks=q({},W.gfm,{br:P(W.br).replace("{2,}","*").getRegex(),text:P(W.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var U={block:H,inline:W},$=n.defaults,V=U.block,K=U.inline,G=D;function Z(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function X(e){var t,r,n="",i=e.length;for(t=0;t<i;t++)r=e.charCodeAt(t),Math.random()>.5&&(r="x"+r.toString(16)),n+="&#"+r+";";return n}var J=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||$,this.options.tokenizer=this.options.tokenizer||new z,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:V.normal,inline:K.normal};this.options.pedantic?(t.block=V.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=V.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}t.lex=function(e,r){return new t(r).lex(e)},t.lexInline=function(e,r){return new t(r).inlineTokens(e)};var r,n,i,o=t.prototype;return o.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},o.blockTokens=function(e,t,r){var n,i,o,a;for(void 0===t&&(t=[]),void 0===r&&(r=!0),e=e.replace(/^ +$/gm,"");e;)if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),n.type&&t.push(n);else if(n=this.tokenizer.code(e,t))e=e.substring(n.raw.length),n.type?t.push(n):((a=t[t.length-1]).raw+="\n"+n.raw,a.text+="\n"+n.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.nptable(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),n.tokens=this.blockTokens(n.text,[],r),t.push(n);else if(n=this.tokenizer.list(e)){for(e=e.substring(n.raw.length),o=n.items.length,i=0;i<o;i++)n.items[i].tokens=this.blockTokens(n.items[i].text,[],!1);t.push(n)}else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(r&&(n=this.tokenizer.def(e)))e=e.substring(n.raw.length),this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else if(r&&(n=this.tokenizer.paragraph(e)))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.text(e,t))e=e.substring(n.raw.length),n.type?t.push(n):((a=t[t.length-1]).raw+="\n"+n.raw,a.text+="\n"+n.text);else if(e){var s="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(s);break}throw new Error(s)}return t},o.inline=function(e){var t,r,n,i,o,a,s=e.length;for(t=0;t<s;t++)switch((a=e[t]).type){case"paragraph":case"text":case"heading":a.tokens=[],this.inlineTokens(a.text,a.tokens);break;case"table":for(a.tokens={header:[],cells:[]},i=a.header.length,r=0;r<i;r++)a.tokens.header[r]=[],this.inlineTokens(a.header[r],a.tokens.header[r]);for(i=a.cells.length,r=0;r<i;r++)for(o=a.cells[r],a.tokens.cells[r]=[],n=0;n<o.length;n++)a.tokens.cells[r][n]=[],this.inlineTokens(o[n],a.tokens.cells[r][n]);break;case"blockquote":this.inline(a.tokens);break;case"list":for(i=a.items.length,r=0;r<i;r++)this.inline(a.items[r].tokens)}return e},o.inlineTokens=function(e,t,r,n,i){var o;void 0===t&&(t=[]),void 0===r&&(r=!1),void 0===n&&(n=!1),void 0===i&&(i="");var a,s=e;if(this.tokens.links){var l=Object.keys(this.tokens.links);if(l.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+G("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,a.index)+"["+G("a",a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(o=this.tokenizer.escape(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.tag(e,r,n))e=e.substring(o.raw.length),r=o.inLink,n=o.inRawBlock,t.push(o);else if(o=this.tokenizer.link(e))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,n)),t.push(o);else if(o=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,n)),t.push(o);else if(o=this.tokenizer.strong(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],r,n),t.push(o);else if(o=this.tokenizer.em(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],r,n),t.push(o);else if(o=this.tokenizer.codespan(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.br(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.del(e))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],r,n),t.push(o);else if(o=this.tokenizer.autolink(e,X))e=e.substring(o.raw.length),t.push(o);else if(r||!(o=this.tokenizer.url(e,X))){if(o=this.tokenizer.inlineText(e,n,Z))e=e.substring(o.raw.length),i=o.raw.slice(-1),t.push(o);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(o.raw.length),t.push(o);return t},r=t,i=[{key:"rules",get:function(){return{block:V,inline:K}}}],(n=null)&&e(r.prototype,n),i&&e(r,i),t}(),Y=n.defaults,Q=_,ee=x,te=function(){function e(e){this.options=e||Y}var t=e.prototype;return t.code=function(e,t,r){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,n);null!=i&&i!==e&&(r=!0,e=i)}return n?'<pre><code class="'+this.options.langPrefix+ee(n,!0)+'">'+(r?e:ee(e,!0))+"</code></pre>\n":"<pre><code>"+(r?e:ee(e,!0))+"</code></pre>\n"},t.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},t.html=function(e){return e},t.heading=function(e,t,r,n){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+n.slug(r)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},t.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},t.list=function(e,t,r){var n=t?"ol":"ul";return"<"+n+(t&&1!==r?' start="'+r+'"':"")+">\n"+e+"</"+n+">\n"},t.listitem=function(e){return"<li>"+e+"</li>\n"},t.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},t.paragraph=function(e){return"<p>"+e+"</p>\n"},t.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},t.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},t.tablecell=function(e,t){var r=t.header?"th":"td";return(t.align?"<"+r+' align="'+t.align+'">':"<"+r+">")+e+"</"+r+">\n"},t.strong=function(e){return"<strong>"+e+"</strong>"},t.em=function(e){return"<em>"+e+"</em>"},t.codespan=function(e){return"<code>"+e+"</code>"},t.br=function(){return this.options.xhtml?"<br/>":"<br>"},t.del=function(e){return"<del>"+e+"</del>"},t.link=function(e,t,r){if(null===(e=Q(this.options.sanitize,this.options.baseUrl,e)))return r;var n='<a href="'+ee(e)+'"';return t&&(n+=' title="'+t+'"'),n+">"+r+"</a>"},t.image=function(e,t,r){if(null===(e=Q(this.options.sanitize,this.options.baseUrl,e)))return r;var n='<img src="'+e+'" alt="'+r+'"';return t&&(n+=' title="'+t+'"'),n+(this.options.xhtml?"/>":">")},t.text=function(e){return e},e}(),re=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,r){return""+r},t.image=function(e,t,r){return""+r},t.br=function(){return""},e}(),ne=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var r=e,n=0;if(this.seen.hasOwnProperty(r)){n=this.seen[e];do{r=e+"-"+ ++n}while(this.seen.hasOwnProperty(r))}return t||(this.seen[e]=n,this.seen[r]=0),r},t.slug=function(e,t){void 0===t&&(t={});var r=this.serialize(e);return this.getNextSafeSlug(r,t.dryrun)},e}(),ie=n.defaults,oe=w,ae=function(){function e(e){this.options=e||ie,this.options.renderer=this.options.renderer||new te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new re,this.slugger=new ne}e.parse=function(t,r){return new e(r).parse(t)},e.parseInline=function(t,r){return new e(r).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var r,n,i,o,a,s,l,c,u,d,h,p,f,m,g,v,y,b,k="",x=e.length;for(r=0;r<x;r++)switch((d=e[r]).type){case"space":continue;case"hr":k+=this.renderer.hr();continue;case"heading":k+=this.renderer.heading(this.parseInline(d.tokens),d.depth,oe(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":k+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(c="",l="",o=d.header.length,n=0;n<o;n++)l+=this.renderer.tablecell(this.parseInline(d.tokens.header[n]),{header:!0,align:d.align[n]});for(c+=this.renderer.tablerow(l),u="",o=d.cells.length,n=0;n<o;n++){for(l="",a=(s=d.tokens.cells[n]).length,i=0;i<a;i++)l+=this.renderer.tablecell(this.parseInline(s[i]),{header:!1,align:d.align[i]});u+=this.renderer.tablerow(l)}k+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(d.tokens),k+=this.renderer.blockquote(u);continue;case"list":for(h=d.ordered,p=d.start,f=d.loose,o=d.items.length,u="",n=0;n<o;n++)v=(g=d.items[n]).checked,y=g.task,m="",g.task&&(b=this.renderer.checkbox(v),f?g.tokens.length>0&&"text"===g.tokens[0].type?(g.tokens[0].text=b+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=b+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:b}):m+=b),m+=this.parse(g.tokens,f),u+=this.renderer.listitem(m,y,v);k+=this.renderer.list(u,h,p);continue;case"html":k+=this.renderer.html(d.text);continue;case"paragraph":k+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;r+1<x&&"text"===e[r+1].type;)u+="\n"+((d=e[++r]).tokens?this.parseInline(d.tokens):d.text);k+=t?this.renderer.paragraph(u):u;continue;default:var w='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(w);throw new Error(w)}return k},t.parseInline=function(e,t){t=t||this.renderer;var r,n,i="",o=e.length;for(r=0;r<o;r++)switch((n=e[r]).type){case"escape":i+=t.text(n.text);break;case"html":i+=t.html(n.text);break;case"link":i+=t.link(n.href,n.title,this.parseInline(n.tokens,t));break;case"image":i+=t.image(n.href,n.title,n.text);break;case"strong":i+=t.strong(this.parseInline(n.tokens,t));break;case"em":i+=t.em(this.parseInline(n.tokens,t));break;case"codespan":i+=t.codespan(n.text);break;case"br":i+=t.br();break;case"del":i+=t.del(this.parseInline(n.tokens,t));break;case"text":i+=t.text(n.text);break;default:var a='Token with "'+n.type+'" type was not found.';if(this.options.silent)return void console.error(a);throw new Error(a)}return i},e}(),se=A,le=E,ce=x,ue=n.getDefaults,de=n.changeDefaults,he=n.defaults;function pe(e,t,r){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(r=t,t=null),t=se({},pe.defaults,t||{}),le(t),r){var n,i=t.highlight;try{n=J.lex(e,t)}catch(e){return r(e)}var o=function(e){var o;if(!e)try{o=ae.parse(n,t)}catch(t){e=t}return t.highlight=i,e?r(e):r(null,o)};if(!i||i.length<3)return o();if(delete t.highlight,!n.length)return o();var a=0;return pe.walkTokens(n,(function(e){"code"===e.type&&(a++,setTimeout((function(){i(e.text,e.lang,(function(t,r){if(t)return o(t);null!=r&&r!==e.text&&(e.text=r,e.escaped=!0),0==--a&&o()}))}),0))})),void(0===a&&o())}try{var s=J.lex(e,t);return t.walkTokens&&pe.walkTokens(s,t.walkTokens),ae.parse(s,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+ce(e.message+"",!0)+"</pre>";throw e}}return pe.options=pe.setOptions=function(e){return se(pe.defaults,e),de(pe.defaults),pe},pe.getDefaults=ue,pe.defaults=he,pe.use=function(e){var t=se({},e);if(e.renderer&&function(){var r=pe.defaults.renderer||new te,n=function(t){var n=r[t];r[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=e.renderer[t].apply(r,o);return!1===s&&(s=n.apply(r,o)),s}};for(var i in e.renderer)n(i);t.renderer=r}(),e.tokenizer&&function(){var r=pe.defaults.tokenizer||new z,n=function(t){var n=r[t];r[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var s=e.tokenizer[t].apply(r,o);return!1===s&&(s=n.apply(r,o)),s}};for(var i in e.tokenizer)n(i);t.tokenizer=r}(),e.walkTokens){var r=pe.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens(t),r&&r(t)}}pe.setOptions(t)},pe.walkTokens=function(e,t){for(var n,i=r(e);!(n=i()).done;){var o=n.value;switch(t(o),o.type){case"table":for(var a,s=r(o.tokens.header);!(a=s()).done;){var l=a.value;pe.walkTokens(l,t)}for(var c,u=r(o.tokens.cells);!(c=u()).done;)for(var d,h=r(c.value);!(d=h()).done;){var p=d.value;pe.walkTokens(p,t)}break;case"list":pe.walkTokens(o.items,t);break;default:o.tokens&&pe.walkTokens(o.tokens,t)}}},pe.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=se({},pe.defaults,t||{}),le(t);try{var r=J.lexInline(e,t);return t.walkTokens&&pe.walkTokens(r,t.walkTokens),ae.parseInline(r,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+ce(e.message+"",!0)+"</pre>";throw e}},pe.Parser=ae,pe.parser=ae.parse,pe.Renderer=te,pe.TextRenderer=re,pe.Lexer=J,pe.lexer=J.lex,pe.Tokenizer=z,pe.Slugger=ne,pe.parse=pe,pe}()},"./node_modules/mdurl/decode.js":e=>{"use strict";var t={};function r(e,n){var i;return"string"!=typeof n&&(n=r.defaultChars),i=function(e){var r,n,i=t[e];if(i)return i;for(i=t[e]=[],r=0;r<128;r++)n=String.fromCharCode(r),i.push(n);for(r=0;r<e.length;r++)i[n=e.charCodeAt(r)]="%"+("0"+n.toString(16).toUpperCase()).slice(-2);return i}(n),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,r,n,o,a,s,l,c="";for(t=0,r=e.length;t<r;t+=3)(n=parseInt(e.slice(t+1,t+3),16))<128?c+=i[n]:192==(224&n)&&t+3<r&&128==(192&(o=parseInt(e.slice(t+4,t+6),16)))?(c+=(l=n<<6&1984|63&o)<128?"��":String.fromCharCode(l),t+=3):224==(240&n)&&t+6<r&&(o=parseInt(e.slice(t+4,t+6),16),a=parseInt(e.slice(t+7,t+9),16),128==(192&o)&&128==(192&a))?(c+=(l=n<<12&61440|o<<6&4032|63&a)<2048||l>=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&n)&&t+9<r&&(o=parseInt(e.slice(t+4,t+6),16),a=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&o)&&128==(192&a)&&128==(192&s))?((l=n<<18&1835008|o<<12&258048|a<<6&4032|63&s)<65536||l>1114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="�";return c}))}r.defaultChars=";/?:@&=+$,#",r.componentChars="",e.exports=r},"./node_modules/mdurl/encode.js":e=>{"use strict";var t={};function r(e,n,i){var o,a,s,l,c,u="";for("string"!=typeof n&&(i=n,n=r.defaultChars),void 0===i&&(i=!0),c=function(e){var r,n,i=t[e];if(i)return i;for(i=t[e]=[],r=0;r<128;r++)n=String.fromCharCode(r),/^[0-9a-z]$/i.test(n)?i.push(n):i.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2));for(r=0;r<e.length;r++)i[e.charCodeAt(r)]=e[r];return i}(n),o=0,a=e.length;o<a;o++)if(s=e.charCodeAt(o),i&&37===s&&o+2<a&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3)))u+=e.slice(o,o+3),o+=2;else if(s<128)u+=c[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1<a&&(l=e.charCodeAt(o+1))>=56320&&l<=57343){u+=encodeURIComponent(e[o]+e[o+1]),o++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[o]);return u}r.defaultChars=";/?:@&=+$,-_.!~*'()#",r.componentChars="-_.!~*'()",e.exports=r},"./node_modules/mdurl/format.js":e=>{"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",(t+=e.search||"")+(e.hash||"")}},"./node_modules/mdurl/index.js":(e,t,r)=>{"use strict";e.exports.encode=r("./node_modules/mdurl/encode.js"),e.exports.decode=r("./node_modules/mdurl/decode.js"),e.exports.format=r("./node_modules/mdurl/format.js"),e.exports.parse=r("./node_modules/mdurl/parse.js")},"./node_modules/mdurl/parse.js":e=>{"use strict";function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var r=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,i=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),a=["'"].concat(o),s=["%","/","?",";","#"].concat(a),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},h={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var n,o,a,p,f,m=e;if(m=m.trim(),!t&&1===e.split("#").length){var g=i.exec(m);if(g)return this.pathname=g[1],g[2]&&(this.search=g[2]),this}var v=r.exec(m);if(v&&(a=(v=v[0]).toLowerCase(),this.protocol=v,m=m.substr(v.length)),(t||v||m.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(f="//"===m.substr(0,2))||v&&d[v]||(m=m.substr(2),this.slashes=!0)),!d[v]&&(f||v&&!h[v])){var y,b,k=-1;for(n=0;n<l.length;n++)-1!==(p=m.indexOf(l[n]))&&(-1===k||p<k)&&(k=p);for(-1!==(b=-1===k?m.lastIndexOf("@"):m.lastIndexOf("@",k))&&(y=m.slice(0,b),m=m.slice(b+1),this.auth=y),k=-1,n=0;n<s.length;n++)-1!==(p=m.indexOf(s[n]))&&(-1===k||p<k)&&(k=p);-1===k&&(k=m.length),":"===m[k-1]&&k--;var x=m.slice(0,k);m=m.slice(k),this.parseHost(x),this.hostname=this.hostname||"";var w="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!w){var C=this.hostname.split(/\./);for(n=0,o=C.length;n<o;n++){var _=C[n];if(_&&!_.match(c)){for(var S="",A=0,L=_.length;A<L;A++)_.charCodeAt(A)>127?S+="x":S+=_[A];if(!S.match(c)){var M=C.slice(0,n),T=C.slice(n+1),E=_.match(u);E&&(M.push(E[1]),T.unshift(E[2])),T.length&&(m=T.join(".")+m),this.hostname=M.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var D=m.indexOf("#");-1!==D&&(this.hash=m.substr(D),m=m.slice(0,D));var F=m.indexOf("?");return-1!==F&&(this.search=m.substr(F),m=m.slice(0,F)),m&&(this.pathname=m),h[a]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(e){var t=n.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,r){if(e&&e instanceof t)return e;var n=new t;return n.parse(e,r),n}},"./node_modules/punycode/punycode.es6.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{ucs2decode:()=>p,ucs2encode:()=>f,decode:()=>v,encode:()=>y,toASCII:()=>k,toUnicode:()=>b,default:()=>x});const n=2147483647,i=36,o=/^xn--/,a=/[^\0-\x7E]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,u=String.fromCharCode;function d(e){throw new RangeError(l[e])}function h(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]);const i=function(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}((e=e.replace(s,".")).split("."),t).join(".");return n+i}function p(e){const t=[];let r=0;const n=e.length;for(;r<n;){const i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){const n=e.charCodeAt(r++);56320==(64512&n)?t.push(((1023&i)<<10)+(1023&n)+65536):(t.push(i),r--)}else t.push(i)}return t}const f=e=>String.fromCodePoint(...e),m=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},g=function(e,t,r){let n=0;for(e=r?c(e/700):e>>1,e+=c(e/t);e>455;n+=i)e=c(e/35);return c(n+36*e/(e+38))},v=function(e){const t=[],r=e.length;let o=0,a=128,s=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let r=0;r<l;++r)e.charCodeAt(r)>=128&&d("not-basic"),t.push(e.charCodeAt(r));for(let h=l>0?l+1:0;h<r;){let l=o;for(let t=1,a=i;;a+=i){h>=r&&d("invalid-input");const l=(u=e.charCodeAt(h++))-48<10?u-22:u-65<26?u-65:u-97<26?u-97:i;(l>=i||l>c((n-o)/t))&&d("overflow"),o+=l*t;const p=a<=s?1:a>=s+26?26:a-s;if(l<p)break;const f=i-p;t>c(n/f)&&d("overflow"),t*=f}const p=t.length+1;s=g(o-l,p,0==l),c(o/p)>n-a&&d("overflow"),a+=c(o/p),o%=p,t.splice(o++,0,a)}var u;return String.fromCodePoint(...t)},y=function(e){const t=[];let r=(e=p(e)).length,o=128,a=0,s=72;for(const r of e)r<128&&t.push(u(r));let l=t.length,h=l;for(l&&t.push("-");h<r;){let r=n;for(const t of e)t>=o&&t<r&&(r=t);const p=h+1;r-o>c((n-a)/p)&&d("overflow"),a+=(r-o)*p,o=r;for(const r of e)if(r<o&&++a>n&&d("overflow"),r==o){let e=a;for(let r=i;;r+=i){const n=r<=s?1:r>=s+26?26:r-s;if(e<n)break;const o=e-n,a=i-n;t.push(u(m(n+o%a,0))),e=c(o/a)}t.push(u(m(e,0))),s=g(a,p,h==l),a=0,++h}++a,++o}return t.join("")},b=function(e){return h(e,(function(e){return o.test(e)?v(e.slice(4).toLowerCase()):e}))},k=function(e){return h(e,(function(e){return a.test(e)?"xn--"+y(e):e}))},x={version:"2.1.0",ucs2:{decode:p,encode:f},decode:v,encode:y,toASCII:k,toUnicode:b}},"./node_modules/typo-js/typo.js":(e,t,r)=>{var n;!function(){"use strict";(n=function(e,t,r,n){n=n||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=n.flags||{},this.memoized={},this.loaded=!1;var i,o,a,s,l,c=this;function u(e,t){var r=c._readFile(e,null,n.asyncLoad);n.asyncLoad?r.then((function(e){t(e)})):t(r)}function d(e){t=e,r&&p()}function h(e){r=e,t&&p()}function p(){for(c.rules=c._parseAFF(t),c.compoundRuleCodes={},o=0,s=c.compoundRules.length;o<s;o++){var e=c.compoundRules[o];for(a=0,l=e.length;a<l;a++)c.compoundRuleCodes[e[a]]=[]}for(o in"ONLYINCOMPOUND"in c.flags&&(c.compoundRuleCodes[c.flags.ONLYINCOMPOUND]=[]),c.dictionaryTable=c._parseDIC(r),c.compoundRuleCodes)0===c.compoundRuleCodes[o].length&&delete c.compoundRuleCodes[o];for(o=0,s=c.compoundRules.length;o<s;o++){var i=c.compoundRules[o],u="";for(a=0,l=i.length;a<l;a++){var d=i[a];d in c.compoundRuleCodes?u+="("+c.compoundRuleCodes[d].join("|")+")":u+=d}c.compoundRules[o]=new RegExp(u,"i")}c.loaded=!0,n.asyncLoad&&n.loadedCallback&&n.loadedCallback(c)}return e&&(c.dictionary=e,t&&r?p():"undefined"!=typeof window&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(i=n.dictionaryPath?n.dictionaryPath:"typo/dictionaries",t||u(chrome.extension.getURL(i+"/"+e+"/"+e+".aff"),d),r||u(chrome.extension.getURL(i+"/"+e+"/"+e+".dic"),h)):(i=n.dictionaryPath?n.dictionaryPath:"//dictionaries",t||u(i+"/"+e+"/"+e+".aff",d),r||u(i+"/"+e+"/"+e+".dic",h))),this}).prototype={load:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);return this},_readFile:function(e,t,n){if(t=t||"utf8","undefined"!=typeof XMLHttpRequest){var i,o=new XMLHttpRequest;return o.open("GET",e,n),n&&(i=new Promise((function(e,t){o.onload=function(){200===o.status?e(o.responseText):t(o.statusText)},o.onerror=function(){t(o.statusText)}}))),o.overrideMimeType&&o.overrideMimeType("text/plain; charset="+t),o.send(null),n?i:o.responseText}var a=r("?65c5");try{if(a.existsSync(e))return a.readFileSync(e,t);console.log("Path "+e+" does not exist.")}catch(e){return console.log(e),""}},_parseAFF:function(e){var t,r,n,i,o,a,s,l={},c=(e=this._removeAffixComments(e)).split(/\r?\n/);for(i=0,a=c.length;i<a;i++){var u=(t=c[i]).split(/\s+/),d=u[0];if("PFX"==d||"SFX"==d){var h=u[1],p=u[2],f=[];for(o=i+1,s=i+1+(r=parseInt(u[3],10));o<s;o++){var m=(n=c[o].split(/\s+/))[2],g=n[3].split("/"),v=g[0];"0"===v&&(v="");var y=this.parseRuleCodes(g[1]),b=n[4],k={};k.add=v,y.length>0&&(k.continuationClasses=y),"."!==b&&(k.match="SFX"===d?new RegExp(b+"$"):new RegExp("^"+b)),"0"!=m&&(k.remove="SFX"===d?new RegExp(m+"$"):m),f.push(k)}l[h]={type:d,combineable:"Y"==p,entries:f},i+=r}else if("COMPOUNDRULE"===d){for(o=i+1,s=i+1+(r=parseInt(u[1],10));o<s;o++)n=(t=c[o]).split(/\s+/),this.compoundRules.push(n[1]);i+=r}else"REP"===d?3===(n=t.split(/\s+/)).length&&this.replacementTable.push([n[1],n[2]]):this.flags[d]=u[1]}return l},_removeAffixComments:function(e){return(e=(e=(e=e.replace(/^\s*#.*$/gm,"")).replace(/^\s\s*/m,"").replace(/\s\s*$/m,"")).replace(/\n{2,}/g,"\n")).replace(/^\s\s*/,"").replace(/\s\s*$/,"")},_parseDIC:function(e){var t=(e=this._removeDicComments(e)).split(/\r?\n/),r={};function n(e,t){r.hasOwnProperty(e)||(r[e]=null),t.length>0&&(null===r[e]&&(r[e]=[]),r[e].push(t))}for(var i=1,o=t.length;i<o;i++){var a=t[i];if(a){var s=a.split("/",2),l=s[0];if(s.length>1){var c=this.parseRuleCodes(s[1]);"NEEDAFFIX"in this.flags&&-1!=c.indexOf(this.flags.NEEDAFFIX)||n(l,c);for(var u=0,d=c.length;u<d;u++){var h=c[u],p=this.rules[h];if(p)for(var f=this._applyRule(l,p),m=0,g=f.length;m<g;m++){var v=f[m];if(n(v,[]),p.combineable)for(var y=u+1;y<d;y++){var b=c[y],k=this.rules[b];if(k&&k.combineable&&p.type!=k.type)for(var x=this._applyRule(v,k),w=0,C=x.length;w<C;w++)n(x[w],[])}}h in this.compoundRuleCodes&&this.compoundRuleCodes[h].push(l)}}else n(l.trim(),[])}}return r},_removeDicComments:function(e){return e.replace(/^\t.*$/gm,"")},parseRuleCodes:function(e){if(!e)return[];if(!("FLAG"in this.flags))return e.split("");if("long"===this.flags.FLAG){for(var t=[],r=0,n=e.length;r<n;r+=2)t.push(e.substr(r,2));return t}return"num"===this.flags.FLAG?e.split(","):void 0},_applyRule:function(e,t){for(var r=t.entries,n=[],i=0,o=r.length;i<o;i++){var a=r[i];if(!a.match||e.match(a.match)){var s=e;if(a.remove&&(s=s.replace(a.remove,"")),"SFX"===t.type?s+=a.add:s=a.add+s,n.push(s),"continuationClasses"in a)for(var l=0,c=a.continuationClasses.length;l<c;l++){var u=this.rules[a.continuationClasses[l]];u&&(n=n.concat(this._applyRule(s,u)))}}}return n},check:function(e){if(!this.loaded)throw"Dictionary not loaded.";var t=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(t))return!0;if(t.toUpperCase()===t){var r=t[0]+t.substring(1).toLowerCase();if(this.hasFlag(r,"KEEPCASE"))return!1;if(this.checkExact(r))return!0}var n=t.toLowerCase();if(n!==t){if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0}return!1},checkExact:function(e){if(!this.loaded)throw"Dictionary not loaded.";var t,r,n=this.dictionaryTable[e];if(void 0===n){if("COMPOUNDMIN"in this.flags&&e.length>=this.flags.COMPOUNDMIN)for(t=0,r=this.compoundRules.length;t<r;t++)if(e.match(this.compoundRules[t]))return!0}else{if(null===n)return!0;if("object"==typeof n)for(t=0,r=n.length;t<r;t++)if(!this.hasFlag(e,"ONLYINCOMPOUND",n[t]))return!0}return!1},hasFlag:function(e,t,r){if(!this.loaded)throw"Dictionary not loaded.";return!(!(t in this.flags)||(void 0===r&&(r=Array.prototype.concat.apply([],this.dictionaryTable[e])),!r||-1===r.indexOf(this.flags[t])))},alphabet:"",suggest:function(e,t){if(!this.loaded)throw"Dictionary not loaded.";if(t=t||5,this.memoized.hasOwnProperty(e)){var r=this.memoized[e].limit;if(t<=r||this.memoized[e].suggestions.length<r)return this.memoized[e].suggestions.slice(0,t)}if(this.check(e))return[];for(var n=0,i=this.replacementTable.length;n<i;n++){var o=this.replacementTable[n];if(-1!==e.indexOf(o[0])){var a=e.replace(o[0],o[1]);if(this.check(a))return[a]}}var s=this;function l(e,t){var r,n,i,o,a,l={};if("string"==typeof e){var c=e;(e={})[c]=!0}for(var c in e)for(r=0,i=c.length+1;r<i;r++){var u=[c.substring(0,r),c.substring(r)];if(u[1]&&(a=u[0]+u[1].substring(1),t&&!s.check(a)||(a in l?l[a]+=1:l[a]=1)),u[1].length>1&&u[1][1]!==u[1][0]&&(a=u[0]+u[1][1]+u[1][0]+u[1].substring(2),t&&!s.check(a)||(a in l?l[a]+=1:l[a]=1)),u[1])for(n=0,o=s.alphabet.length;n<o;n++)s.alphabet[n]!=u[1].substring(0,1)&&(a=u[0]+s.alphabet[n]+u[1].substring(1),t&&!s.check(a)||(a in l?l[a]+=1:l[a]=1));if(u[1])for(n=0,o=s.alphabet.length;n<o;n++)a=u[0]+s.alphabet[n]+u[1],t&&!s.check(a)||(a in l?l[a]+=1:l[a]=1)}return l}return s.alphabet="abcdefghijklmnopqrstuvwxyz",this.memoized[e]={suggestions:function(e){var r,n=l(e),i=l(n,!0);for(var o in n)s.check(o)&&(o in i?i[o]+=n[o]:i[o]=n[o]);var a=[];for(r in i)i.hasOwnProperty(r)&&a.push([r,i[r]]);a.sort((function(e,t){var r=e[1],n=t[1];return r<n?-1:r>n?1:t[0].localeCompare(e[0])})).reverse();var c=[],u="lowercase";e.toUpperCase()===e?u="uppercase":e.substr(0,1).toUpperCase()+e.substr(1).toLowerCase()===e&&(u="capitalized");var d=t;for(r=0;r<Math.min(d,a.length);r++)"uppercase"===u?a[r][0]=a[r][0].toUpperCase():"capitalized"===u&&(a[r][0]=a[r][0].substr(0,1).toUpperCase()+a[r][0].substr(1)),s.hasFlag(a[r][0],"NOSUGGEST")||-1!=c.indexOf(a[r][0])?d++:c.push(a[r][0]);return c}(e),limit:t},this.memoized[e].suggestions}}}(),e.exports=n},"./node_modules/uc.micro/categories/Cc/regex.js":e=>{e.exports=/[\0-\x1F\x7F-\x9F]/},"./node_modules/uc.micro/categories/Cf/regex.js":e=>{e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},"./node_modules/uc.micro/categories/P/regex.js":e=>{e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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\u09FD\u0A76\u0AF0\u0C84\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-\u2E4E\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]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},"./node_modules/uc.micro/categories/Z/regex.js":e=>{e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},"./node_modules/uc.micro/index.js":(e,t,r)=>{"use strict";t.Any=r("./node_modules/uc.micro/properties/Any/regex.js"),t.Cc=r("./node_modules/uc.micro/categories/Cc/regex.js"),t.Cf=r("./node_modules/uc.micro/categories/Cf/regex.js"),t.P=r("./node_modules/uc.micro/categories/P/regex.js"),t.Z=r("./node_modules/uc.micro/categories/Z/regex.js")},"./node_modules/uc.micro/properties/Any/regex.js":e=>{e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},"./src/scripts/index.js":(e,t,r)=>{"use strict";r.r(t);var n=r("./src/scripts/mmde.js"),i=r("./src/scripts/plugins/quick-insert.js"),o=r("./src/scripts/settings.js");window.MEME={ChatMeme:n.ChatMeme,markdownIt:n.markdownIt,BaseMeme:n.Meme},Hooks.on("init",(function(){o.MemeSettings.init(),i.QuickInsertPlugin.init(),o.MemeSettings.isRichTextActive&&function(){Handlebars.unregisterHelper("editor"),Handlebars.registerHelper("editor",(function(e){let t=e.hash.target,r=(e.hash.content,Boolean(e.hash.button)),n=Boolean(e.hash.owner),i=Boolean(e.hash.editable);if(!t)throw new Error("You must define the name of a target field.");let o=$(`<div class="editor" ${n?'data-owner="1"':""}><textarea class="editor-content" ${i?'data-editable="true"':""} name="${t}" data-dtype="String"></textarea></div>`);return r&&i&&o.append($('<a class="editor-edit"><i class="fas fa-edit"></i></a>')),new Handlebars.SafeString(o[0].outerHTML)}));const e=FormApplication.prototype.activateListeners;FormApplication.prototype.activateListeners=function(t){e.bind(this)(t),t.find(".editor-content").each(((e,t)=>this._activateEditor(t)))},FormApplication.prototype._activateEditor=function(e){const t=e.parentNode,r=e.name;let n=getProperty(this.object.data,r)||getProperty(this.object,r)||"";const i=!!e.dataset.editable;let o={element:e,owner:!!t.dataset.owner,saveCallback:t=>this._onEditorSave(r,e,t),content:n,toolbar:MEME.BaseMeme.toolbar};if(Hooks.callAll("MemeActivateEditor",this,o),console.log(o),e.innerHTML=o.content,delete o.content,i||(o.toolbar=!1),this.editors[r]=new MEME.BaseMeme(o),!i)return void this.editors[r].makePreviewOnly();this.editors[r].togglePreview(),t.querySelector(".editor-toolbar").classList.add("hidden");const a=t.querySelector(".editor-edit");a&&a.addEventListener("click",(e=>{e.currentTarget.style.display="none",e.currentTarget.parentNode.querySelector(".editor-toolbar").classList.remove("hidden");const t=this.editors[r].codemirror;this.editors[r].togglePreview(),t.focus(),t.setCursor(t.lineCount(),0)}))},FormApplication.prototype._onEditorSave=function(e,t,r){let n=new Event("memesave");return this._onSubmit(n)}}(),o.MemeSettings.isChatActive&&Hooks.on("renderChatLog",((e,t,r)=>{let n={element:t[0].querySelector("#chat-message")};Hooks.callAll("MemeActivateChat",n),e.editor=new MEME.ChatMeme(n)}))}))},"./src/scripts/mmde.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{markdownIt:()=>a,Meme:()=>s,ChatMeme:()=>l});var n=r("./node_modules/easymde/src/js/easymde.js"),i=r.n(n);const o=r("./node_modules/markdown-it/index.js")({html:!0,linkify:!0}),a=o;r("./node_modules/codemirror/keymap/vim.js"),o.use(r("./node_modules/markdown-it-container/index.js"),"secret",{validate:function(e){return!0},marker:"$",render:function(e,t){return e[t].nesting>0?'<section class="secret">':"</section>"}}),o.renderer.rules.heading_open=function(e,t){const r=e[t],n=e[t+1].content;return`<${r.tag} name='${r.markup}${n}'>`};class s extends(i()){constructor(e={}){super({...s.defaultOptions,...e})}static get defaultOptions(){return{autoDownloadFontAwesome:!1,forceSync:!0,minHeight:"0px",status:!1,spellChecker:!1,toolbar:this.toolbar,owner:!0}}static get toolbar(){return["bold","italic","strikethrough","heading","|","ordered-list","unordered-list",{name:"secret",action:this.toggleSecretBlock,className:"fas fa-user-secret",title:"Make Secret block"},"quote","table","|","link",{name:"image",action:this.chooseImage,className:"fa fa-image",title:"Image"},"horizontal-rule","|","preview","side-by-side","fullscreen","|",{name:"plugins",title:"Plugins",className:"fas fa-list",children:[]},{name:"save",action:this.save,className:"fas fa-save",title:"Save",noDisable:!0},"|","guide"]}static toggleSecretBlock(e){let t=e.codemirror;const r=t.getSelection();let n=t.getCursor("start"),i=t.getCursor("end");if(n.line!==i.line||n.ch!==i.ch){const e=n.line,r=i.line,o=t.getLineHandle(r).text,a=t.getRange({line:n.line,ch:0},{line:i.line,ch:o.length}),s=rules.block.secret.exec(a);let l,c,u=a;s&&s[0].length===a.length?(u=s[3],l={line:r-2,ch:t.getLineHandle(r-1).text.length},c={line:e,ch:0}):(u="\n$$$\n"+a+"\n$$$\n",c={line:e+1,ch:0},l={line:r+3,ch:3}),t.replaceRange(u,{line:n.line,ch:0},{line:i.line,ch:o.length}),t.setSelection(c,l)}else t.replaceSelection("\n$$$\n"+r+"\n$$$\n");t.focus()}toggleSecretBlock(){this.constructor.toggleSecretBlock(this)}static chooseImage(e){const t=e.codemirror,r=t.getWrapperElement();new FilePicker({type:"image",callback:e=>{t.replaceSelection(`![](${e})`)},top:r.style.position.top+40,left:r.style.position.left+10}).browse()}static save(e){const t=e.element.parentNode;t.querySelector(".editor-edit").style.display="",e.isPreviewActive()||e.togglePreview(),t.querySelector(".editor-toolbar").classList.add("hidden"),e.options.saveCallback&&e.options.saveCallback(e.codemirror.getValue())}save(){this.constructor.name.save(this)}makePreviewOnly(){const e=this.codemirror.getWrapperElement(),t=e.lastChild;t&&t.classList.contains("editor-preview-full")||this.togglePreview(),e.classList.add("preview-only")}render(){super.render(),this.codemirror.on("drop",this._onDrop),game.settings.get("markdown-editor","vim-mode")&&(delete this.codemirror.options.extraKeys.Esc,this.codemirror.setOption("vimMode",!0)),Hooks.callAll("MemeRenderEditor",this,this.options.parent)}_onDrop(e,t){let r;try{r=JSON.parse(event.dataTransfer.getData("text/plain"))}catch(e){return}if(!r)return;t.preventDefault();const n=function(r){const n=e.coordsChar({left:t.clientX,top:t.clientY});e.setCursor(n),e.replaceSelection(r),e.focus()};try{if(r.pack)game.packs.get(r.pack).getEntity(r.id).then((e=>n(`@Compendium[${r.pack}.${r.id}]{${e.name}}`)));else{const e=CONFIG[r.type].collection.instance.get(r.id);n(`@${r.type}[${e._id}]{${e.name}}`)}}catch(e){console.error("Dropped incorrect data!",r)}}markdown(e){return TextEditor.enrichHTML(o.render(e),{secrets:this.options.owner,entities:!0})}createToolbar(e){const t=super.createToolbar(e);console.log(t);const r=t.querySelector(".plugins"),n=Array.from(r.querySelectorAll(".easymde-dropdown-content button"));if(0===n.length)r.remove();else for(let e of n)e.appendChild(document.createTextNode(e.title));return t}}class l extends s{constructor(e){super({...l.defaultOptions,...e})}static get defaultOptions(){return{toolbar:!1}}render(){super.render(),this.codemirror.options.extraKeys.Enter=this._sendChatMessage.bind(this),this.codemirror.options.extraKeys.PageDown=this._chatRecallMessageDown.bind(this),this.codemirror.options.extraKeys.PageUp=this._chatRecallMessageUp.bind(this),Hooks.on("emojuleSelectEmoji",(e=>{const t=this.codemirror.findWordAt(this.codemirror.getCursor());return this.codemirror.replaceRange(e.substring(1),t.anchor,t.head),!1}))}markdown(e){return o.render(e)}_sendChatMessage(){const e=this,t=e.element;if(!e.value())return;let r=e.value(),[n,i]=ui.chat.constructor.parse(r);"whisper"===n?r=i[1]+i[2]+" "+this.markdown(i[3]).replace(/\n/g,""):["ic","ooc","emote"].includes(n)?r=i[1]+" "+this.markdown(i[2]).replace(/\n/g,""):"none"===n&&(r=this.markdown(r).replace(/\n/g,"")),ui.chat.processMessage(r).then((()=>{ui.chat._remember(e.value()),t.value="",e.value("")})).catch((e=>{throw ui.notifications.error(e),e}))}_chatRecallMessageUp(){this.value(ui.chat._recall(1))}_chatRecallMessageDown(){this.value(ui.chat._recall(-1))}}},"./src/scripts/plugins/base.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{PluginBase:()=>n});class n{static init(){return!1}static onRender(e){}}},"./src/scripts/plugins/quick-insert.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{QuickInsertPlugin:()=>s});var n=r("./src/scripts/plugins/base.js");let i,o,a;class s extends n.PluginBase{static init(){const e=game.modules.get("quick-insert");return!(!e||!e.active||(a=this.loadDependencies(),Hooks.on("MemeRenderEditor",s.onRender),0))}static async loadDependencies(){const e=await import("/modules/quick-insert/quick-insert.js");return i=e.QuickInsert,o=e.SearchContext,console.log("MEME | finished loading quick insert dependencies."),e}static onRender(e){a.then((()=>{e.codemirror.on("keydown",((e,t)=>{const r=window.Azzu.SettingsTypes.KeyBinding.parse(game.settings.get("quick-insert","quickOpen"));if(!window.Azzu.SettingsTypes.KeyBinding.eventIsForBinding(t,r))return;t.stopPropagation();const n=new o;n.spawnCSS=s.spawnCSS(e),n.onSubmit=t=>{e.replaceSelection(t.journalLink),e.focus()},i.open(n)}))}))}static spawnCSS(e){const{left:t,right:r,top:n,bottom:i}=e.cursorCoords(!0,"page"),o=(i-n-22)/2,a=e.getWrapperElement().getBoundingClientRect(),s=document.body.getBoundingClientRect();return{left:Math.min(t,a.right-Math.min(a.width,300)),bottom:s.height-i+o,maxWidth:a.width-10}}}},"./src/scripts/settings.js":(e,t,r)=>{"use strict";r.r(t),r.d(t,{MemeSettings:()=>n});class n extends FormApplication{static init(){game.settings.registerMenu("markdown-editor","menu",{name:"",label:"GM Settings",icon:"fas fa-mug-hot",type:n,restricted:!0}),game.settings.register("markdown-editor","world-settings",{name:"Settings object for world level markdown editor settings",type:Object,default:{chat:!0,richText:!0},config:!1,onChange:()=>{new Dialog({content:"<p>Some settings have changed, that require a refresh of the page to be applied.</p>",buttons:{yes:{icon:'<i class="fas fa-check"></i>',label:"Refresh page.",callback:()=>location.reload()},no:{icon:'<i class="fas fa-times"></i>',label:"I'll refresh later."}}}).render(!0)}}),game.settings.register("markdown-editor","vim-mode",{name:"VIM Keybindings",hint:"Enable VIM keybindings for the markdown editor. [User Setting]",scope:"client",default:!1,type:Boolean,restricted:!1,config:!0})}static get defaultOptions(){return{...super.defaultOptions,template:"modules/markdown-editor/html/settings.html",height:"auto",title:"MEME - Settings & Info",width:600,classes:["meme","settings"],tabs:[{navSelector:".tabs",contentSelector:"form",initial:"info"}],submitOnClose:!0}}static get isRichTextActive(){return game.settings.get("markdown-editor","world-settings").richText}static get isChatActive(){return game.settings.get("markdown-editor","world-settings").chat}constructor(e={},t){super(e,t)}_getHeaderButtons(){let e=super._getHeaderButtons();return e[0].label="Save & Close",e}getSettingsData(){return game.settings.get("markdown-editor","world-settings")}getData(){let e=super.getData();return e.settings=this.getSettingsData(),e}activateListeners(e){super.activateListeners(e)}_updateObject(e,t){const r=expandObject(t);game.settings.set("markdown-editor","world-settings",r)}}},"?65c5":()=>{}},t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r("./src/scripts/index.js")})();
//# sourceMappingURL=index.js.map