vue-admin-beautiful/static/js/vab-chunk-a72bc5c3.401c2e4c.js
2022-02-26 00:27:18 +08:00

7 lines
302 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*!
* build: vue-admin-better
* vue-admin-beautiful.com
* https://gitee.com/chu1204505056/vue-admin-better
* time: 2022-2-26 00:26:40
*/
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["vab-chunk-a72bc5c3"],{"05eb":function(e,t,n){(function(t,n){e.exports=n()})("undefined"!==typeof self&&self,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="f4a0")}({0:function(e,t){},"05cd":function(e,t){e.exports=class{constructor(){this.seen={}}slug(e){let t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){const e=t;do{this.seen[e]++,t=e+"-"+this.seen[e]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t}}},"064b":function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},"0654":function(e,t,n){(function(t){var r;(function(){"use strict";r=function(e,n,r,i){i=i||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=i.flags||{},this.memoized={},this.loaded=!1;var o,a,l,s,c,u=this;function d(e,t){var n=u._readFile(e,null,i.asyncLoad);i.asyncLoad?n.then((function(e){t(e)})):t(n)}function f(e){n=e,r&&p()}function h(e){r=e,n&&p()}function p(){for(u.rules=u._parseAFF(n),u.compoundRuleCodes={},a=0,s=u.compoundRules.length;a<s;a++){var e=u.compoundRules[a];for(l=0,c=e.length;l<c;l++)u.compoundRuleCodes[e[l]]=[]}for(a in"ONLYINCOMPOUND"in u.flags&&(u.compoundRuleCodes[u.flags.ONLYINCOMPOUND]=[]),u.dictionaryTable=u._parseDIC(r),u.compoundRuleCodes)0===u.compoundRuleCodes[a].length&&delete u.compoundRuleCodes[a];for(a=0,s=u.compoundRules.length;a<s;a++){var t=u.compoundRules[a],o="";for(l=0,c=t.length;l<c;l++){var d=t[l];d in u.compoundRuleCodes?o+="("+u.compoundRuleCodes[d].join("|")+")":o+=d}u.compoundRules[a]=new RegExp(o,"i")}u.loaded=!0,i.asyncLoad&&i.loadedCallback&&i.loadedCallback(u)}return e&&(u.dictionary=e,n&&r?p():"undefined"!==typeof window&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(o=i.dictionaryPath?i.dictionaryPath:"typo/dictionaries",n||d(chrome.extension.getURL(o+"/"+e+"/"+e+".aff"),f),r||d(chrome.extension.getURL(o+"/"+e+"/"+e+".dic"),h)):(o=i.dictionaryPath?i.dictionaryPath:t+"/dictionaries",n||d(o+"/"+e+"/"+e+".aff",f),r||d(o+"/"+e+"/"+e+".dic",h))),this},r.prototype={load:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);return this},_readFile:function(e,t,r){if(t=t||"utf8","undefined"!==typeof XMLHttpRequest){var i,o=new XMLHttpRequest;return o.open("GET",e,r),r&&(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),r?i:o.responseText}var a=n(0);try{if(a.existsSync(e))return a.readFileSync(e,t);console.log("Path "+e+" does not exist.")}catch(l){return console.log(l),""}},_parseAFF:function(e){var t,n,r,i,o,a,l,s,c={};e=this._removeAffixComments(e);var u=e.split(/\r?\n/);for(o=0,l=u.length;o<l;o++){t=u[o];var d=t.split(/\s+/),f=d[0];if("PFX"==f||"SFX"==f){var h=d[1],p=d[2];r=parseInt(d[3],10);var m=[];for(a=o+1,s=o+1+r;a<s;a++){n=u[a],i=n.split(/\s+/);var g=i[2],v=i[3].split("/"),y=v[0];"0"===y&&(y="");var x=this.parseRuleCodes(v[1]),b=i[4],w={};w.add=y,x.length>0&&(w.continuationClasses=x),"."!==b&&(w.match="SFX"===f?new RegExp(b+"$"):new RegExp("^"+b)),"0"!=g&&(w.remove="SFX"===f?new RegExp(g+"$"):g),m.push(w)}c[h]={type:f,combineable:"Y"==p,entries:m},o+=r}else if("COMPOUNDRULE"===f){for(r=parseInt(d[1],10),a=o+1,s=o+1+r;a<s;a++)t=u[a],i=t.split(/\s+/),this.compoundRules.push(i[1]);o+=r}else"REP"===f?(i=t.split(/\s+/),3===i.length&&this.replacementTable.push([i[1],i[2]])):this.flags[f]=d[1]}return c},_removeAffixComments:function(e){return e=e.replace(/^\s*#.*$/gm,""),e=e.replace(/^\s\s*/m,"").replace(/\s\s*$/m,""),e=e.replace(/\n{2,}/g,"\n"),e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),e},_parseDIC:function(e){e=this._removeDicComments(e);var t=e.split(/\r?\n/),n={};function r(e,t){n.hasOwnProperty(e)||(n[e]=null),t.length>0&&(null===n[e]&&(n[e]=[]),n[e].push(t))}for(var i=1,o=t.length;i<o;i++){var a=t[i];if(a){var l=a.split("/",2),s=l[0];if(l.length>1){var c=this.parseRuleCodes(l[1]);"NEEDAFFIX"in this.flags&&-1!=c.indexOf(this.flags.NEEDAFFIX)||r(s,c);for(var u=0,d=c.length;u<d;u++){var f=c[u],h=this.rules[f];if(h)for(var p=this._applyRule(s,h),m=0,g=p.length;m<g;m++){var v=p[m];if(r(v,[]),h.combineable)for(var y=u+1;y<d;y++){var x=c[y],b=this.rules[x];if(b&&b.combineable&&h.type!=b.type)for(var w=this._applyRule(v,b),k=0,S=w.length;k<S;k++){var C=w[k];r(C,[])}}}f in this.compoundRuleCodes&&this.compoundRuleCodes[f].push(s)}}else r(s.trim(),[])}}return n},_removeDicComments:function(e){return e=e.replace(/^\t.*$/gm,""),e},parseRuleCodes:function(e){if(!e)return[];if(!("FLAG"in this.flags))return e.split("");if("long"===this.flags.FLAG){for(var t=[],n=0,r=e.length;n<r;n+=2)t.push(e.substr(n,2));return t}return"num"===this.flags.FLAG?e.split(","):void 0},_applyRule:function(e,t){for(var n=t.entries,r=[],i=0,o=n.length;i<o;i++){var a=n[i];if(!a.match||e.match(a.match)){var l=e;if(a.remove&&(l=l.replace(a.remove,"")),"SFX"===t.type?l+=a.add:l=a.add+l,r.push(l),"continuationClasses"in a)for(var s=0,c=a.continuationClasses.length;s<c;s++){var u=this.rules[a.continuationClasses[s]];u&&(r=r.concat(this._applyRule(l,u)))}}}return r},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 n=t[0]+t.substring(1).toLowerCase();if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0}var r=t.toLowerCase();if(r!==t){if(this.hasFlag(r,"KEEPCASE"))return!1;if(this.checkExact(r))return!0}return!1},checkExact:function(e){if(!this.loaded)throw"Dictionary not loaded.";var t,n,r=this.dictionaryTable[e];if("undefined"===typeof r){if("COMPOUNDMIN"in this.flags&&e.length>=this.flags.COMPOUNDMIN)for(t=0,n=this.compoundRules.length;t<n;t++)if(e.match(this.compoundRules[t]))return!0}else{if(null===r)return!0;if("object"===typeof r)for(t=0,n=r.length;t<n;t++)if(!this.hasFlag(e,"ONLYINCOMPOUND",r[t]))return!0}return!1},hasFlag:function(e,t,n){if(!this.loaded)throw"Dictionary not loaded.";return!(!(t in this.flags)||("undefined"===typeof n&&(n=Array.prototype.concat.apply([],this.dictionaryTable[e])),!n||-1===n.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 n=this.memoized[e]["limit"];if(t<=n||this.memoized[e]["suggestions"].length<n)return this.memoized[e]["suggestions"].slice(0,t)}if(this.check(e))return[];for(var r=0,i=this.replacementTable.length;r<i;r++){var o=this.replacementTable[r];if(-1!==e.indexOf(o[0])){var a=e.replace(o[0],o[1]);if(this.check(a))return[a]}}var l=this;function s(e,t){var n,r,i,o,a,s={};if("string"==typeof e){var c=e;e={},e[c]=!0}for(var c in e)for(n=0,i=c.length+1;n<i;n++){var u=[c.substring(0,n),c.substring(n)];if(u[1]&&(a=u[0]+u[1].substring(1),t&&!l.check(a)||(a in s?s[a]+=1:s[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&&!l.check(a)||(a in s?s[a]+=1:s[a]=1)),u[1])for(r=0,o=l.alphabet.length;r<o;r++)l.alphabet[r]!=u[1].substring(0,1)&&(a=u[0]+l.alphabet[r]+u[1].substring(1),t&&!l.check(a)||(a in s?s[a]+=1:s[a]=1));if(u[1])for(r=0,o=l.alphabet.length;r<o;r++)a=u[0]+l.alphabet[r]+u[1],t&&!l.check(a)||(a in s?s[a]+=1:s[a]=1)}return s}function c(e){var n,r=s(e),i=s(r,!0),o=i;for(var a in r)l.check(a)&&(a in o?o[a]+=r[a]:o[a]=r[a]);var c=[];for(n in o)o.hasOwnProperty(n)&&c.push([n,o[n]]);function u(e,t){var n=e[1],r=t[1];return n<r?-1:n>r?1:t[0].localeCompare(e[0])}c.sort(u).reverse();var d=[],f="lowercase";e.toUpperCase()===e?f="uppercase":e.substr(0,1).toUpperCase()+e.substr(1).toLowerCase()===e&&(f="capitalized");var h=t;for(n=0;n<Math.min(h,c.length);n++)"uppercase"===f?c[n][0]=c[n][0].toUpperCase():"capitalized"===f&&(c[n][0]=c[n][0].substr(0,1).toUpperCase()+c[n][0].substr(1)),l.hasFlag(c[n][0],"NOSUGGEST")||-1!=d.indexOf(c[n][0])?h++:d.push(c[n][0]);return d}return l.alphabet="abcdefghijklmnopqrstuvwxyz",this.memoized[e]={suggestions:c(e),limit:t},this.memoized[e]["suggestions"]}}})(),e.exports=r}).call(this,"/")},"08ba":function(e,t,n){var r=n("d890"),i=n("064b"),o=n("3c10"),a=n("0fc1");for(var l in i){var s=r[l],c=s&&s.prototype;if(c&&c.forEach!==o)try{a(c,"forEach",o)}catch(u){c.forEach=o}}},"094f":function(e,t,n){const r=n("6c31"),i=n("7727"),o=n("5a9c"),a=n("155c"),l=n("f5ef"),s=n("05cd"),{merge:c,checkSanitizeDeprecation:u,escape:d}=n("322c"),{getDefaults:f,changeDefaults:h,defaults:p}=n("a8a2");function m(e,t,n){if("undefined"===typeof e||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(n||"function"===typeof t){n||(n=t,t=null),t=c({},m.defaults,t||{}),u(t);const a=t.highlight;let l,s,d=0;try{l=r.lex(e,t)}catch(o){return n(o)}s=l.length;const f=function(e){if(e)return t.highlight=a,n(e);let r;try{r=i.parse(l,t)}catch(o){e=o}return t.highlight=a,e?n(e):n(null,r)};if(!a||a.length<3)return f();if(delete t.highlight,!s)return f();for(;d<l.length;d++)(function(e){"code"!==e.type?--s||f():a(e.text,e.lang,(function(t,n){return t?f(t):null==n||n===e.text?--s||f():(e.text=n,e.escaped=!0,void(--s||f()))}))})(l[d])}else try{return t=c({},m.defaults,t||{}),u(t),i.parse(r.lex(e,t),t)}catch(o){if(o.message+="\nPlease report this to https://github.com/markedjs/marked.",(t||m.defaults).silent)return"<p>An error occurred:</p><pre>"+d(o.message+"",!0)+"</pre>";throw o}}m.options=m.setOptions=function(e){return c(m.defaults,e),h(m.defaults),m},m.getDefaults=f,m.defaults=p,m.use=function(e){const t=c({},e);if(e.renderer){const n=m.defaults.renderer||new a;for(const t in e.renderer){const r=n[t];n[t]=(...i)=>{let o=e.renderer[t].apply(n,i);return!1===o&&(o=r.apply(n,i)),o}}t.renderer=n}if(e.tokenizer){const n=m.defaults.tokenizer||new o;for(const t in e.tokenizer){const r=n[t];n[t]=(...i)=>{let o=e.tokenizer[t].apply(n,i);return!1===o&&(o=r.apply(n,i)),o}}t.tokenizer=n}m.setOptions(t)},m.Parser=i,m.parser=i.parse,m.Renderer=a,m.TextRenderer=l,m.Lexer=r,m.lexer=r.lex,m.Tokenizer=o,m.Slugger=s,m.parse=m,e.exports=m},"0a60":function(e,t){t.f=Object.getOwnPropertySymbols},"0c3c":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},"0e50":function(e,t,n){},"0fc1":function(e,t,n){var r=n("1e2c"),i=n("d910"),o=n("38b9");e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},1025:function(e,t,n){var r=n("3a08"),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},"155c":function(e,t,n){const{defaults:r}=n("a8a2"),{cleanUrl:i,escape:o}=n("322c");e.exports=class{constructor(e){this.options=e||r}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return r?'<pre><code class="'+this.options.langPrefix+o(r,!0)+'">'+(n?e:o(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:o(e,!0))+"</code></pre>"}blockquote(e){return"<blockquote>\n"+e+"</blockquote>\n"}html(e){return e}heading(e,t,n,r){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+r.slug(n)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,n){const r=t?"ol":"ul",i=t&&1!==n?' start="'+n+'"':"";return"<"+r+i+">\n"+e+"</"+r+">\n"}listitem(e){return"<li>"+e+"</li>\n"}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return"<p>"+e+"</p>\n"}table(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return"<tr>\n"+e+"</tr>\n"}tablecell(e,t){const n=t.header?"th":"td",r=t.align?"<"+n+' align="'+t.align+'">':"<"+n+">";return r+e+"</"+n+">\n"}strong(e){return"<strong>"+e+"</strong>"}em(e){return"<em>"+e+"</em>"}codespan(e){return"<code>"+e+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return"<del>"+e+"</del>"}link(e,t,n){if(e=i(this.options.sanitize,this.options.baseUrl,e),null===e)return n;let r='<a href="'+o(e)+'"';return t&&(r+=' title="'+t+'"'),r+=">"+n+"</a>",r}image(e,t,n){if(e=i(this.options.sanitize,this.options.baseUrl,e),null===e)return n;let r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">",r}text(e){return e}}},"18f6":function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},1944:function(e,t,n){var r=n("d890"),i=n("0fc1"),o=n("faa8"),a=n("e4db"),l=n("1025"),s=n("b702"),c=s.get,u=s.enforce,d=String(String).split("String");(e.exports=function(e,t,n,l){var s=!!l&&!!l.unsafe,c=!!l&&!!l.enumerable,f=!!l&&!!l.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),u(n).source=d.join("string"==typeof t?t:"")),e!==r?(s?!f&&e[t]&&(c=!0):delete e[t],c?e[t]=n:i(e,t,n)):c?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||l(this)}))},"1b99":function(e,t,n){var r=n("d890");e.exports=r},"1bbd":function(e,t,n){"use strict";var r=n("9f67"),i=n("d910"),o=n("38b9");e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},"1c8b":function(e,t,n){var r=n("d890"),i=n("aa6b").f,o=n("0fc1"),a=n("1944"),l=n("e4db"),s=n("c69d"),c=n("e8d6");e.exports=function(e,t){var n,u,d,f,h,p,m=e.target,g=e.global,v=e.stat;if(u=g?r:v?r[m]||l(m,{}):(r[m]||{}).prototype,u)for(d in t){if(h=t[d],e.noTargetGet?(p=i(u,d),f=p&&p.value):f=u[d],n=c(g?d:m+(v?".":"#")+d,e.forced),!n&&void 0!==f){if(typeof h===typeof f)continue;s(h,f)}(e.sham||f&&f.sham)&&o(h,"sham",!0),a(u,d,h,e)}}},"1ca1":function(e,t,n){var r=n("a719"),i=n("74e7"),o=n("90fb"),a=o("species");e.exports=function(e,t){var n;return i(e)&&(n=e.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?r(n)&&(n=n[a],null===n&&(n=void 0)):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},"1e2c":function(e,t,n){var r=n("efe2");e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"1ea7":function(e,t,n){var r=n("efe2"),i=n("90fb"),o=n("f594"),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[],n=t.constructor={};return n[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},2039:function(e,t,n){var r=n("1e2c"),i=n("efe2"),o=n("ae25");e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},2118:function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"21ed":function(e,t,n){(function(e){e(n("a564"))})((function(e){"use strict";function t(e){e.state.markedSelection&&e.operation((function(){c(e)}))}function n(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation((function(){l(e)}))}e.defineOption("styleSelectedText",!1,(function(r,i,o){var a=o&&o!=e.Init;i&&!a?(r.state.markedSelection=[],r.state.markedSelectionStyle="string"==typeof i?i:"CodeMirror-selectedtext",s(r),r.on("cursorActivity",t),r.on("change",n)):!i&&a&&(r.off("cursorActivity",t),r.off("change",n),l(r),r.state.markedSelection=r.state.markedSelectionStyle=null)}));var r=8,i=e.Pos,o=e.cmpPos;function a(e,t,n,a){if(0!=o(t,n))for(var l=e.state.markedSelection,s=e.state.markedSelectionStyle,c=t.line;;){var u=c==t.line?t:i(c,0),d=c+r,f=d>=n.line,h=f?n:i(d,0),p=e.markText(u,h,{className:s});if(null==a?l.push(p):l.splice(a++,0,p),f)break;c=d}}function l(e){for(var t=e.state.markedSelection,n=0;n<t.length;++n)t[n].clear();t.length=0}function s(e){l(e);for(var t=e.listSelections(),n=0;n<t.length;n++)a(e,t[n].from(),t[n].to())}function c(e){if(!e.somethingSelected())return l(e);if(e.listSelections().length>1)return s(e);var t=e.getCursor("start"),n=e.getCursor("end"),i=e.state.markedSelection;if(!i.length)return a(e,t,n);var c=i[0].find(),u=i[i.length-1].find();if(!c||!u||n.line-t.line<=r||o(t,u.to)>=0||o(n,c.from)<=0)return s(e);while(o(t,c.from)>0)i.shift().clear(),c=i[0].find();o(t,c.from)<0&&(c.to.line-t.line<r?(i.shift().clear(),a(e,t,c.to,0)):a(e,t,c.from,0));while(o(n,u.to)<0)i.pop().clear(),u=i[i.length-1].find();o(n,u.to)>0&&(n.line-u.from.line<r?(i.pop().clear(),a(e,u.from,n)):a(e,u.to,n))}}))},2732:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},"27b3":function(e,t,n){var r=n("a564");r.commands.tabAndIndentMarkdownList=function(e){var t=e.listSelections(),n=t[0].head,r=e.getStateAfter(n.line),i=!1!==r.list;if(i)e.execCommand("indentMore");else if(e.options.indentWithTabs)e.execCommand("insertTab");else{var o=Array(e.options.tabSize+1).join(" ");e.replaceSelection(o)}},r.commands.shiftTabAndUnindentMarkdownList=function(e){var t=e.listSelections(),n=t[0].head,r=e.getStateAfter(n.line),i=!1!==r.list;if(i)e.execCommand("indentLess");else if(e.options.indentWithTabs)e.execCommand("insertTab");else{var o=Array(e.options.tabSize+1).join(" ");e.replaceSelection(o)}}},"27b5":function(e,t,n){var r=n("d910").f,i=n("faa8"),o=n("90fb"),a=o("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},"31e2":function(e,t,n){(function(e){e(n("a564"))})((function(e){"use strict";function t(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()}function n(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}e.defineOption("fullScreen",!1,(function(r,i,o){o==e.Init&&(o=!1),!o!=!i&&(i?t(r):n(r))}))}))},"322c":function(e,t){const n=/[&<>"']/,r=/[&<>"']/g,i=/[<>"']|&(?!#?\w+;)/,o=/[<>"']|&(?!#?\w+;)/g,a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},l=e=>a[e];function s(e,t){if(t){if(n.test(e))return e.replace(r,l)}else if(i.test(e))return e.replace(o,l);return e}const c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function u(e){return e.replace(c,(e,t)=>(t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const d=/(^|[^\[])\^/g;function f(e,t){e=e.source||e,t=t||"";const n={replace:(t,r)=>(r=r.source||r,r=r.replace(d,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n}const h=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function m(e,t,n){if(e){let e;try{e=decodeURIComponent(u(n)).replace(h,"").toLowerCase()}catch(r){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!p.test(n)&&(n=b(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(r){return null}return n}const g={},v=/^[^:]+:\/*[^/]*$/,y=/^([^:]+:)[\s\S]*$/,x=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){g[" "+e]||(v.test(e)?g[" "+e]=e+"/":g[" "+e]=C(e,"/",!0)),e=g[" "+e];const n=-1===e.indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(y,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(x,"$1")+t:e+t}const w={exec:function(){}};function k(e){let t,n,r=1;for(;r<arguments.length;r++)for(n in t=arguments[r],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function S(e,t){const n=e.replace(/\|/g,(e,t,n)=>{let r=!1,i=t;while(--i>=0&&"\\"===n[i])r=!r;return r?"|":" |"}),r=n.split(/ \|/);let i=0;if(r.length>t)r.splice(t);else while(r.length<t)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function C(e,t,n){const r=e.length;if(0===r)return"";let i=0;while(i<r){const o=e.charAt(r-i-1);if(o!==t||n){if(o===t||!n)break;i++}else i++}return e.substr(0,r-i)}function L(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let r=0,i=0;for(;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return-1}function T(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")}e.exports={escape:s,unescape:u,edit:f,cleanUrl:m,resolveUrl:b,noopTest:w,merge:k,splitCells:S,rtrim:C,findClosingBracket:L,checkSanitizeDeprecation:T}},3553:function(e,t,n){var r=n("2732");e.exports=function(e){return Object(r(e))}},3787:function(e,t,n){(function(e){e(n("a564"),n("fe5a"),n("d776"))})((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(n,r){var i=0;function o(e){return e.code=!1,null}var a={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,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var o=e.pos;e.eatWhile("`");var a=1+e.pos-o;return n.code?a===i&&(n.code=!1):(i=a,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,!1!==r.gitHubSpice)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.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)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:o},l={taskLists:!0,strikethrough:!0,emoji:!0};for(var s in r)l[s]=r[s];return l.name="markdown",e.overlayMode(e.getMode(n,l),a)}),"markdown"),e.defineMIME("text/x-gfm","gfm")}))},"38b9":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"3a08":function(e,t,n){var r=n("d890"),i=n("e4db"),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},"3c10":function(e,t,n){"use strict";var r=n("5dfd").forEach,i=n("d7e1"),o=n("ff9c"),a=i("forEach"),l=o("forEach");e.exports=a&&l?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},"3da3":function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},4350:function(e,t,n){var r=n("90fb");t.f=r},"45af":function(e,t,n){var r=n("da10"),i=n("d88d"),o=n("e1d6"),a=function(e){return function(t,n,a){var l,s=r(t),c=i(s.length),u=o(a,c);if(e&&n!=n){while(c>u)if(l=s[u++],l!=l)return!0}else for(;c>u;u++)if((e||u in s)&&s[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"4cd0":function(e,t,n){"use strict";var r=n("0654");function i(e){e=e||{},"function"===typeof 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 n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),n.onload=function(){4===n.readyState&&200===n.status&&(i.aff_data=n.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new r("en_US",i.aff_data,i.dic_data,{platform:"any"})))},n.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 r("en_US",i.aff_data,i.dic_data,{platform:"any"})))},o.send(null)}var a='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',l={token:function(e){var t=e.peek(),n="";if(a.includes(t))return e.next(),null;while(null!=(t=e.peek())&&!a.includes(t))n+=t,e.next();return i.typo&&!i.typo.check(n)?"spell-error":null}},s=e.codeMirrorInstance.getMode(t,t.backdrop||"text/plain");return e.codeMirrorInstance.overlayMode(s,l,!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},"4d02":function(e,t,n){"use strict";var r=n("a564");n("7899"),n("27b3"),n("31e2"),n("fe5a"),n("d776"),n("f590"),n("21ed"),n("3787"),n("b2e0");var i=n("4cd0"),o=n("094f"),a=/Mac/.test(navigator.platform),l={toggleBold:y,toggleItalic:x,drawLink:D,toggleHeadingSmaller:S,toggleHeadingBigger:C,drawImage:E,toggleBlockquote:k,toggleOrderedList:N,toggleUnorderedList:A,toggleCodeBlock:w,togglePreview:R,toggleStrikethrough:b,toggleHeading1:L,toggleHeading2:T,toggleHeading3:M,cleanBlock:O,drawTable:F,drawHorizontalRule:z,undo:I,redo:P,toggleSideBySide:H,toggleFullScreen:v},s={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"},c=function(e){for(var t in l)if(l[t]===e)return t;return null},u=function(){var e=!1;return function(t){(/(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(t)||/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(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e};function d(e){return e=a?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl"),e}function f(e,t,n){e=e||{};var r=document.createElement("a");return t=void 0==t||t,e.title&&t&&(r.title=p(e.title,e.action,n),a&&(r.title=r.title.replace("Ctrl","⌘"),r.title=r.title.replace("Alt","⌥"))),r.tabIndex=-1,r.className=e.className,r}function h(){var e=document.createElement("i");return e.className="separator",e.innerHTML="|",e}function p(e,t,n){var r,i=e;return t&&(r=c(t),n[r]&&(i+=" ("+d(n[r])+")")),i}function m(e,t){t=t||e.getCursor("start");var n=e.getTokenAt(t);if(!n.type)return{};for(var r,i,o=n.type.split(" "),a={},l=0;l<o.length;l++)r=o[l],"strong"===r?a.bold=!0:"variable-2"===r?(i=e.getLine(t.line),/^\s*\d+\.\s/.test(i)?a["ordered-list"]=!0:a["unordered-list"]=!0):"atom"===r?a.quote=!0:"em"===r?a.italic=!0:"quote"===r?a.quote=!0:"strikethrough"===r?a.strikethrough=!0:"comment"===r?a.code=!0:"link"===r?a.link=!0:"tag"===r?a.image=!0:r.match(/^header(\-[1-6])?$/)&&(a[r.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 n=t.getWrapperElement();/fullscreen/.test(n.previousSibling.className)?n.previousSibling.className=n.previousSibling.className.replace(/\s*fullscreen\b/,""):n.previousSibling.className+=" fullscreen";var r=e.toolbarElements.fullscreen;/active/.test(r.className)?r.className=r.className.replace(/\s*active\s*/g,""):r.className+=" active";var i=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(i.className)&&H(e)}function y(e){j(e,"bold",e.options.blockStyles.bold)}function x(e){j(e,"italic",e.options.blockStyles.italic)}function b(e){j(e,"strikethrough","~~")}function w(e){var t=e.options.blockStyles.code;function n(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 r(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 l=o.type?o.type.split(" "):[];return a&&r(a).indentedCode?"indented":-1!==l.indexOf("comment")&&(r(o).fencedChars||r(a).fencedChars||n(i)?"fenced":"single")}function o(e,t,n,r){var i=t.line+1,o=n.line+1,a=t.line!==n.line,l=r+"\n",s="\n"+r;a&&o++,a&&0===n.ch&&(s=r+"\n",o--),W(e,!1,[l,s]),e.setSelection({line:i,ch:0},{line:o,ch:0})}var a,l,s,c=e.codemirror,u=c.getCursor("start"),d=c.getCursor("end"),f=c.getTokenAt({line:u.line,ch:u.ch||1}),h=c.getLineHandle(u.line),p=i(c,u.line,h,f);if("single"===p){var m=h.text.slice(0,u.ch).replace("`",""),g=h.text.slice(u.ch).replace("`","");c.replaceRange(m+g,{line:u.line,ch:0},{line:u.line,ch:99999999999999}),u.ch--,u!==d&&d.ch--,c.setSelection(u,d),c.focus()}else if("fenced"===p)if(u.line!==d.line||u.ch!==d.ch){for(a=u.line;a>=0;a--)if(h=c.getLineHandle(a),n(h))break;var v,y,x,b,w=c.getTokenAt({line:a,ch:1}),k=r(w).fencedChars;n(c.getLineHandle(u.line))?(v="",y=u.line):n(c.getLineHandle(u.line-1))?(v="",y=u.line-1):(v=k+"\n",y=u.line),n(c.getLineHandle(d.line))?(x="",b=d.line,0===d.ch&&(b+=1)):0!==d.ch&&n(c.getLineHandle(d.line+1))?(x="",b=d.line+1):(x=k+"\n",b=d.line+1),0===d.ch&&(b-=1),c.operation((function(){c.replaceRange(x,{line:b,ch:0},{line:b+(x?0:1),ch:0}),c.replaceRange(v,{line:y,ch:0},{line:y+(v?0:1),ch:0})})),c.setSelection({line:y+(v?1:0),ch:0},{line:b+(v?1:-1),ch:0}),c.focus()}else{var S=u.line;if(n(c.getLineHandle(u.line))&&("fenced"===i(c,u.line+1)?(a=u.line,S=u.line+1):(l=u.line,S=u.line-1)),void 0===a)for(a=S;a>=0;a--)if(h=c.getLineHandle(a),n(h))break;if(void 0===l)for(s=c.lineCount(),l=S;l<s;l++)if(h=c.getLineHandle(l),n(h))break;c.operation((function(){c.replaceRange("",{line:a,ch:0},{line:a+1,ch:0}),c.replaceRange("",{line:l-1,ch:0},{line:l,ch:0})})),c.focus()}else if("indented"===p){if(u.line!==d.line||u.ch!==d.ch)a=u.line,l=d.line,0===d.ch&&l--;else{for(a=u.line;a>=0;a--)if(h=c.getLineHandle(a),!h.text.match(/^\s*$/)&&"indented"!==i(c,a,h)){a+=1;break}for(s=c.lineCount(),l=u.line;l<s;l++)if(h=c.getLineHandle(l),!h.text.match(/^\s*$/)&&"indented"!==i(c,l,h)){l-=1;break}}var C=c.getLineHandle(l+1),L=C&&c.getTokenAt({line:l+1,ch:C.text.length-1}),T=L&&r(L).indentedCode;T&&c.replaceRange("\n",{line:l+1,ch:0});for(var M=a;M<=l;M++)c.indentLine(M,"subtract");c.focus()}else{var A=u.line===d.line&&u.ch===d.ch&&0===u.ch,N=u.line!==d.line;A||N?o(c,u,d,t):W(c,!1,["`","`"])}}function k(e){var t=e.codemirror;_(t,"quote")}function S(e){var t=e.codemirror;B(t,"smaller")}function C(e){var t=e.codemirror;B(t,"bigger")}function L(e){var t=e.codemirror;B(t,void 0,1)}function T(e){var t=e.codemirror;B(t,void 0,2)}function M(e){var t=e.codemirror;B(t,void 0,3)}function A(e){var t=e.codemirror;_(t,"unordered-list")}function N(e){var t=e.codemirror;_(t,"ordered-list")}function O(e){var t=e.codemirror;q(t)}function D(e){var t=e.codemirror,n=m(t),r=e.options,i="http://";if(r.promptURLs&&(i=prompt(r.promptTexts.link),!i))return!1;W(t,n.link,r.insertTexts.link,i)}function E(e){var t=e.codemirror,n=m(t),r=e.options,i="http://";if(r.promptURLs&&(i=prompt(r.promptTexts.image),!i))return!1;W(t,n.image,r.insertTexts.image,i)}function F(e){var t=e.codemirror,n=m(t),r=e.options;W(t,n.table,r.insertTexts.table)}function z(e){var t=e.codemirror,n=m(t),r=e.options;W(t,n.image,r.insertTexts.horizontalRule)}function I(e){var t=e.codemirror;t.undo(),t.focus()}function P(e){var t=e.codemirror;t.redo(),t.focus()}function H(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.nextSibling,i=e.toolbarElements["side-by-side"],o=!1;/editor-preview-active-side/.test(r.className)?(r.className=r.className.replace(/\s*editor-preview-active-side\s*/g,""),i.className=i.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout((function(){t.getOption("fullScreen")||v(e),r.className+=" editor-preview-active-side"}),1),i.className+=" active",n.className+=" CodeMirror-sided",o=!0);var a=n.lastChild;if(/editor-preview-active/.test(a.className)){a.className=a.className.replace(/\s*editor-preview-active\s*/g,"");var l=e.toolbarElements.preview,s=n.previousSibling;l.className=l.className.replace(/\s*active\s*/g,""),s.className=s.className.replace(/\s*disabled-for-preview*/g,"")}var c=function(){r.innerHTML=e.options.previewRender(e.value(),r)};t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=c),o?(r.innerHTML=e.options.previewRender(e.value(),r),t.on("update",t.sideBySideRenderingFunction)):t.off("update",t.sideBySideRenderingFunction),t.refresh()}function R(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.previousSibling,i=!!e.options.toolbar&&e.toolbarElements.preview,o=n.lastChild;o&&/editor-preview/.test(o.className)||(o=document.createElement("div"),o.className="editor-preview",n.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,""),r.className=r.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout((function(){o.className+=" editor-preview-active"}),1),i&&(i.className+=" active",r.className+=" disabled-for-preview")),o.innerHTML=e.options.previewRender(e.value(),o);var a=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(a.className)&&H(e)}function W(e,t,n,r){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var i,o=n[0],a=n[1],l=e.getCursor("start"),s=e.getCursor("end");r&&(a=a.replace("#url#",r)),t?(i=e.getLine(l.line),o=i.slice(0,l.ch),a=i.slice(l.ch),e.replaceRange(o+a,{line:l.line,ch:0})):(i=e.getSelection(),e.replaceSelection(o+i+a),l.ch+=o.length,l!==s&&(s.ch+=o.length)),e.setSelection(l,s),e.focus()}}function B(e,t,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var r=e.getCursor("start"),i=e.getCursor("end"),o=r.line;o<=i.line;o++)(function(r){var i=e.getLine(r),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==n?o<=0?"# "+i:o==n?i.substr(o+1):"# "+i.substr(o+1):2==n?o<=0?"## "+i:o==n?i.substr(o+1):"## "+i.substr(o+1):o<=0?"### "+i:o==n?i.substr(o+1):"### "+i.substr(o+1),e.replaceRange(i,{line:r,ch:0},{line:r,ch:99999999999999})})(o);e.focus()}}function _(e,t){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=m(e),r=e.getCursor("start"),i=e.getCursor("end"),o={quote:/^(\s*)\>\s+/,"unordered-list":/^(\s*)(\*|\-|\+)\s+/,"ordered-list":/^(\s*)\d+\.\s+/},a={quote:"> ","unordered-list":"* ","ordered-list":"1. "},l=r.line;l<=i.line;l++)(function(r){var i=e.getLine(r);i=n[t]?i.replace(o[t],"$1"):a[t]+i,e.replaceRange(i,{line:r,ch:0},{line:r,ch:99999999999999})})(l);e.focus()}}function j(e,t,n,r){if(!/editor-preview-active/.test(e.codemirror.getWrapperElement().lastChild.className)){r="undefined"===typeof r?n:r;var i,o=e.codemirror,a=m(o),l=n,s=r,c=o.getCursor("start"),u=o.getCursor("end");a[t]?(i=o.getLine(c.line),l=i.slice(0,c.ch),s=i.slice(c.ch),"bold"==t?(l=l.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),s=s.replace(/(\*\*|__)/,"")):"italic"==t?(l=l.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),s=s.replace(/(\*|_)/,"")):"strikethrough"==t&&(l=l.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),s=s.replace(/(\*\*|~~)/,"")),o.replaceRange(l+s,{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.split("**").join(""),i=i.split("__").join("")):"italic"==t?(i=i.split("*").join(""),i=i.split("_").join("")):"strikethrough"==t&&(i=i.split("~~").join("")),o.replaceSelection(l+i+s),c.ch+=n.length,u.ch=c.ch+i.length),o.setSelection(c,u),o.focus()}}function q(e){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className))for(var t,n=e.getCursor("start"),r=e.getCursor("end"),i=n.line;i<=r.line;i++)t=e.getLine(i),t=t.replace(/^[ ]*([# ]+|\*|\-|[> ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:i,ch:0},{line:i,ch:99999999999999})}function $(e,t){for(var n in t)t.hasOwnProperty(n)&&(t[n]instanceof Array?e[n]=t[n].concat(e[n]instanceof Array?e[n]:[]):null!==t[n]&&"object"===typeof t[n]&&t[n].constructor===Object?e[n]=$(e[n]||{},t[n]):e[n]=t[n]);return e}function U(e){for(var t=1;t<arguments.length;t++)e=$(e,arguments[t]);return e}function G(e){var t=/[a-zA-Z0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g,n=e.match(t),r=0;if(null===n)return r;for(var i=0;i<n.length;i++)n[i].charCodeAt(0)>=19968?r+=n[i].length:r+=1;return r}var V={bold:{name:"bold",action:y,className:"fa fa-bold",title:"Bold",default:!0},italic:{name:"italic",action:x,className:"fa fa-italic",title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:b,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:S,className:"fa fa-header",title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:S,className:"fa fa-header fa-header-x fa-header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:C,className:"fa fa-header fa-header-x fa-header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:L,className:"fa fa-header fa-header-x fa-header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:T,className:"fa fa-header fa-header-x fa-header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:M,className:"fa fa-header fa-header-x fa-header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:w,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:k,className:"fa fa-quote-left",title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:A,className:"fa fa-list-ul",title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:N,className:"fa fa-list-ol",title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:O,className:"fa fa-eraser fa-clean-block",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:E,className:"fa fa-picture-o",title:"Insert Image",default:!0},table:{name:"table",action:F,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:z,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:R,className:"fa fa-eye no-disable",title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:H,className:"fa fa-columns no-disable no-mobile",title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:v,className:"fa fa-arrows-alt no-disable no-mobile",title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle",title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:I,className:"fa fa-undo no-disable",title:"Undo"},redo:{name:"redo",action:P,className:"fa fa-repeat no-disable",title:"Redo"}},X={link:["[","](#url#)"],image:["![](","#url#)"],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],horizontalRule:["","\n\n-----\n\n"]},K={link:"URL for the link:",image:"URL of the image:"},Z={bold:"**",code:"```",italic:"*"};function Y(e){e=e||{},e.parent=this;var t=!0;if(!1===e.autoDownloadFontAwesome&&(t=!1),!0!==e.autoDownloadFontAwesome)for(var n=document.styleSheets,r=0;r<n.length;r++)n[r].href&&n[r].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("SimpleMDE: Error. No element was found.");if(void 0===e.toolbar)for(var o in e.toolbar=[],V)V.hasOwnProperty(o)&&(-1!=o.indexOf("separator-")&&e.toolbar.push("|"),(!0===V[o].default||e.showIcons&&e.showIcons.constructor===Array&&-1!=e.showIcons.indexOf(o))&&e.toolbar.push(o));e.hasOwnProperty("status")||(e.status=["autosave","lines","words","cursor"]),e.previewRender||(e.previewRender=function(e){return this.parent.markdown(e)}),e.parsingConfig=U({highlightFormatting:!0},e.parsingConfig||{}),e.insertTexts=U({},X,e.insertTexts||{}),e.promptTexts=K,e.blockStyles=U({},Z,e.blockStyles||{}),e.shortcuts=U({},s,e.shortcuts||{}),void 0!=e.autosave&&void 0!=e.autosave.unique_id&&""!=e.autosave.unique_id&&(e.autosave.uniqueId=e.autosave.unique_id),this.options=e,this.render(),!e.initialValue||this.options.autosave&&!0===this.options.autosave.foundSavedValue||this.value(e.initialValue)}function J(){if("object"!==typeof localStorage)return!1;try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(e){return!1}return!0}Y.prototype.markdown=function(e){if(o){var t={};return 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&&window.hljs&&(t.highlight=function(e){return window.hljs.highlightAuto(e).value}),o.setOptions(t),o(e)}},Y.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;var t,n,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(){l[e](a)}}(c);if(s["Enter"]="newlineAndIndentContinueMarkdownList",s["Tab"]="tabAndIndentMarkdownList",s["Shift-Tab"]="shiftTabAndUnindentMarkdownList",s["Esc"]=function(e){e.getOption("fullScreen")&&v(a)},document.addEventListener("keydown",(function(e){e=e||window.event,27==e.keyCode&&a.codemirror.getOption("fullScreen")&&v(a)}),!1),!1!==o.spellChecker?(t="spell-checker",n=o.parsingConfig,n.name="gfm",n.gitHubSpice=!1,i({codeMirrorInstance:r})):(t=o.parsingConfig,t.name="gfm",t.gitHubSpice=!1),this.codemirror=r.fromTextArea(e,{mode:t,backdrop:n,theme:"paper",tabSize:void 0!=o.tabSize?o.tabSize:2,indentUnit:void 0!=o.tabSize?o.tabSize:2,indentWithTabs:!1!==o.indentWithTabs,lineNumbers:!1,autofocus:!0===o.autofocus,extraKeys:s,lineWrapping:!1!==o.lineWrapping,allowDropFileTypes:["text/plain"],placeholder:o.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:void 0==o.styleSelectedText||o.styleSelectedText}),!0===o.forceSync){var u=this.codemirror;u.on("change",(function(){u.save()}))}this.gui={},!1!==o.toolbar&&(this.gui.toolbar=this.createToolbar()),!1!==o.status&&(this.gui.statusbar=this.createStatusbar()),void 0!=o.autosave&&!0===o.autosave.enabled&&this.autosave(),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var f=this.codemirror;setTimeout(function(){f.refresh()}.bind(f),0)}},Y.prototype.autosave=function(){if(J()){var e=this;if(void 0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to use the autosave feature");null!=e.element.form&&void 0!=e.element.form&&e.element.form.addEventListener("submit",(function(){localStorage.removeItem("smde_"+e.options.autosave.uniqueId)})),!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),localStorage.setItem("smde_"+this.options.autosave.uniqueId,e.value());var t=document.getElementById("autosaved");if(null!=t&&void 0!=t&&""!=t){var n=new Date,r=n.getHours(),i=n.getMinutes(),o="am",a=r;a>=12&&(a=r-12,o="pm"),0==a&&(a=12),i=i<10?"0"+i:i,t.innerHTML="Autosaved: "+a+":"+i+" "+o}this.autosaveTimeoutId=setTimeout((function(){e.autosave()}),this.options.autosave.delay||1e4)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},Y.prototype.clearAutosavedValue=function(){if(J()){if(void 0==this.options.autosave||void 0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to clear the autosave value");localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},Y.prototype.createSideBySide=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling;n&&/editor-preview-side/.test(n.className)||(n=document.createElement("div"),n.className="editor-preview-side",t.parentNode.insertBefore(n,t.nextSibling));var r=!1,i=!1;return e.on("scroll",(function(e){if(r)r=!1;else{i=!0;var t=e.getScrollInfo().height-e.getScrollInfo().clientHeight,o=parseFloat(e.getScrollInfo().top)/t,a=(n.scrollHeight-n.clientHeight)*o;n.scrollTop=a}})),n.onscroll=function(){if(i)i=!1;else{r=!0;var t=n.scrollHeight-n.clientHeight,o=parseFloat(n.scrollTop)/t,a=(e.getScrollInfo().height-e.getScrollInfo().clientHeight)*o;e.scrollTo(0,a)}},n},Y.prototype.createToolbar=function(e){if(e=e||this.options.toolbar,e&&0!==e.length){var t;for(t=0;t<e.length;t++)void 0!=V[e[t]]&&(e[t]=V[e[t]]);var n=document.createElement("div");n.className="editor-toolbar";var r=this,i={};for(r.toolbar=e,t=0;t<e.length;t++)if(("guide"!=e[t].name||!1!==r.options.toolbarGuideIcon)&&(!r.options.hideIcons||-1==r.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]||r.options.hideIcons&&-1!=r.options.hideIcons.indexOf(e[a].name)||(o=!0);if(!o)continue}(function(e){var t;t="|"===e?h():f(e,r.options.toolbarTips,r.options.shortcuts),e.action&&("function"===typeof e.action?t.onclick=function(t){t.preventDefault(),e.action(r)}:"string"===typeof e.action&&(t.href=e.action,t.target="_blank")),i[e.name||e]=t,n.appendChild(t)})(e[t])}r.toolbarElements=i;var l=this.codemirror;l.on("cursorActivity",(function(){var e=m(l);for(var t in i)(function(t){var n=i[t];e[t]?n.className+=" active":"fullscreen"!=t&&"side-by-side"!=t&&(n.className=n.className.replace(/\s*active\s*/g,""))})(t)}));var s=l.getWrapperElement();return s.parentNode.insertBefore(n,s),n}},Y.prototype.createStatusbar=function(e){e=e||this.options.status;var t=this.options,n=this.codemirror;if(e&&0!==e.length){var r,i,o,a=[];for(r=0;r<e.length;r++)if(i=void 0,o=void 0,"object"===typeof e[r])a.push({className:e[r].className,defaultValue:e[r].defaultValue,onUpdate:e[r].onUpdate});else{var l=e[r];"words"===l?(o=function(e){e.innerHTML=G(n.getValue())},i=function(e){e.innerHTML=G(n.getValue())}):"lines"===l?(o=function(e){e.innerHTML=n.lineCount()},i=function(e){e.innerHTML=n.lineCount()}):"cursor"===l?(o=function(e){e.innerHTML="0:0"},i=function(e){var t=n.getCursor();e.innerHTML=t.line+":"+t.ch}):"autosave"===l&&(o=function(e){void 0!=t.autosave&&!0===t.autosave.enabled&&e.setAttribute("id","autosaved")}),a.push({className:l,defaultValue:o,onUpdate:i})}var s=document.createElement("div");for(s.className="editor-statusbar",r=0;r<a.length;r++){var c=a[r],u=document.createElement("span");u.className=c.className,"function"===typeof c.defaultValue&&c.defaultValue(u),"function"===typeof c.onUpdate&&this.codemirror.on("update",function(e,t){return function(){t.onUpdate(e)}}(u,c)),s.appendChild(u)}var d=this.codemirror.getWrapperElement();return d.parentNode.insertBefore(s,d.nextSibling),s}},Y.prototype.value=function(e){return void 0===e?this.codemirror.getValue():(this.codemirror.getDoc().setValue(e),this)},Y.toggleBold=y,Y.toggleItalic=x,Y.toggleStrikethrough=b,Y.toggleBlockquote=k,Y.toggleHeadingSmaller=S,Y.toggleHeadingBigger=C,Y.toggleHeading1=L,Y.toggleHeading2=T,Y.toggleHeading3=M,Y.toggleCodeBlock=w,Y.toggleUnorderedList=A,Y.toggleOrderedList=N,Y.cleanBlock=O,Y.drawLink=D,Y.drawImage=E,Y.drawTable=F,Y.drawHorizontalRule=z,Y.undo=I,Y.redo=P,Y.togglePreview=R,Y.toggleSideBySide=H,Y.toggleFullScreen=v,Y.prototype.toggleBold=function(){y(this)},Y.prototype.toggleItalic=function(){x(this)},Y.prototype.toggleStrikethrough=function(){b(this)},Y.prototype.toggleBlockquote=function(){k(this)},Y.prototype.toggleHeadingSmaller=function(){S(this)},Y.prototype.toggleHeadingBigger=function(){C(this)},Y.prototype.toggleHeading1=function(){L(this)},Y.prototype.toggleHeading2=function(){T(this)},Y.prototype.toggleHeading3=function(){M(this)},Y.prototype.toggleCodeBlock=function(){w(this)},Y.prototype.toggleUnorderedList=function(){A(this)},Y.prototype.toggleOrderedList=function(){N(this)},Y.prototype.cleanBlock=function(){O(this)},Y.prototype.drawLink=function(){D(this)},Y.prototype.drawImage=function(){E(this)},Y.prototype.drawTable=function(){F(this)},Y.prototype.drawHorizontalRule=function(){z(this)},Y.prototype.undo=function(){I(this)},Y.prototype.redo=function(){P(this)},Y.prototype.togglePreview=function(){R(this)},Y.prototype.toggleSideBySide=function(){H(this)},Y.prototype.toggleFullScreen=function(){v(this)},Y.prototype.isPreviewActive=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.lastChild;return/editor-preview-active/.test(n.className)},Y.prototype.isSideBySideActive=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling;return/editor-preview-active-side/.test(n.className)},Y.prototype.isFullscreenActive=function(){var e=this.codemirror;return e.getOption("fullScreen")},Y.prototype.getState=function(){var e=this.codemirror;return m(e)},Y.prototype.toTextArea=function(){var e=this.codemirror,t=e.getWrapperElement();t.parentNode&&(this.gui.toolbar&&t.parentNode.removeChild(this.gui.toolbar),this.gui.statusbar&&t.parentNode.removeChild(this.gui.statusbar),this.gui.sideBySide&&t.parentNode.removeChild(this.gui.sideBySide)),e.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())},e.exports=Y},"4fda":function(e,t,n){var r=n("6d7a");e.exports=r("navigator","userAgent")||""},"508f":function(e,t,n){},"5a9c":function(e,t,n){const{defaults:r}=n("a8a2"),{rtrim:i,splitCells:o,escape:a,findClosingBracket:l}=n("322c");function s(e,t,n){const r=t.href,i=t.title?a(t.title):null;return"!"!==e[0].charAt(0)?{type:"link",raw:n,href:r,title:i,text:e[1]}:{type:"image",raw:n,text:a(e[1]),href:r,title:i}}e.exports=class{constructor(e){this.options=e||r}space(e){const t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}}code(e,t){const n=this.rules.block.code.exec(e);if(n){const e=t[t.length-1];if(e&&"paragraph"===e.type)return t.pop(),e.text+="\n"+n[0].trimRight(),e.raw+="\n"+n[0],e;{const e=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?e:i(e,"\n")}}}}fences(e){const t=this.rules.block.fences.exec(e);if(t)return{type:"code",raw:t[0],lang:t[2]?t[2].trim():t[2],text:t[3]||""}}heading(e){const t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}}nptable(e){const t=this.rules.block.nptable.exec(e);if(t){const e={type:"table",header:o(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(e.header.length===e.align.length){let t,n=e.align.length;for(t=0;t<n;t++)/^ *-+: *$/.test(e.align[t])?e.align[t]="right":/^ *:-+: *$/.test(e.align[t])?e.align[t]="center":/^ *:-+ *$/.test(e.align[t])?e.align[t]="left":e.align[t]=null;for(n=e.cells.length,t=0;t<n;t++)e.cells[t]=o(e.cells[t],e.header.length);return e}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:e}}}list(e){const t=this.rules.block.list.exec(e);if(t){let e=t[0];const n=t[2],r=n.length>1,i={type:"list",raw:e,ordered:r,start:r?+n:"",loose:!1,items:[]},o=t[0].match(this.rules.block.item);let a,l,s,c,u,d,f,h=!1;const p=o.length;for(let t=0;t<p;t++)a=o[t],e=a,l=a.length,a=a.replace(/^ *([*+-]|\d+\.) */,""),~a.indexOf("\n ")&&(l-=a.length,a=this.options.pedantic?a.replace(/^ {1,4}/gm,""):a.replace(new RegExp("^ {1,"+l+"}","gm"),"")),t!==p-1&&(s=this.rules.block.bullet.exec(o[t+1])[0],(n.length>1?1===s.length:s.length>1||this.options.smartLists&&s!==n)&&(c=o.slice(t+1).join("\n"),i.raw=i.raw.substring(0,i.raw.length-c.length),t=p-1)),u=h||/\n\n(?!\s*$)/.test(a),t!==p-1&&(h="\n"===a.charAt(a.length-1),u||(u=h)),u&&(i.loose=!0),d=/^\[[ xX]\] /.test(a),f=void 0,d&&(f=" "!==a[1],a=a.replace(/^\[[ xX]\] +/,"")),i.items.push({raw:e,task:d,checked:f,loose:u,text:a});return i}}html(e){const 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]):a(t[0]):t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));const e=t[1].toLowerCase().replace(/\s+/g," ");return{tag:e,raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:o(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,r=e.align.length;for(n=0;n<r;n++)/^ *-+: *$/.test(e.align[n])?e.align[n]="right":/^ *:-+: *$/.test(e.align[n])?e.align[n]="center":/^ *:-+ *$/.test(e.align[n])?e.align[n]="left":e.align[n]=null;for(r=e.cells.length,n=0;n<r;n++)e.cells[n]=o(e.cells[n].replace(/^ *\| *| *\| *$/g,""),e.header.length);return e}}}lheading(e){const 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]}}paragraph(e){const 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]}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0]}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:a(t[1])}}tag(e,t,n){const r=this.rules.inline.tag.exec(e);if(r)return!t&&/^<a /i.test(r[0])?t=!0:t&&/^<\/a>/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):a(r[0]):r[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=l(t[2],"()");if(e>-1){const n=0===t[0].indexOf("!")?5:4,r=n+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e?(n=e[1],r=e[3]):r=""}else r=t[3]?t[3].slice(1,-1):"";n=n.trim().replace(/^<([\s\S]*)>$/,"$1");const i=s(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},t[0]);return i}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}const r=s(n,e,n[0]);return r}}strong(e){const t=this.rules.inline.strong.exec(e);if(t)return{type:"strong",raw:t[0],text:t[4]||t[3]||t[2]||t[1]}}em(e){const t=this.rules.inline.em.exec(e);if(t)return{type:"em",raw:t[0],text:t[6]||t[5]||t[4]||t[3]||t[2]||t[1]}}codespan(e){const t=this.rules.inline.code.exec(e);if(t)return{type:"codespan",raw:t[0],text:a(t[2].trim(),!0)}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,r;return"@"===n[2]?(e=a(this.options.mangle?t(n[1]):n[1]),r="mailto:"+e):(e=a(n[1]),r=e),{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=a(this.options.mangle?t(n[0]):n[0]),r="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=a(n[0]),r="www."===n[1]?"http://"+e:e}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t,n){const r=this.rules.inline.text.exec(e);if(r){let e;return e=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):a(r[0]):r[0]:a(this.options.smartypants?n(r[0]):r[0]),{type:"text",raw:r[0],text:e}}}}},"5dfd":function(e,t,n){var r=n("e349"),i=n("692f"),o=n("3553"),a=n("d88d"),l=n("1ca1"),s=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,u=4==e,d=6==e,f=5==e||d;return function(h,p,m,g){for(var v,y,x=o(h),b=i(x),w=r(p,m,3),k=a(b.length),S=0,C=g||l,L=t?C(h,k):n?C(h,0):void 0;k>S;S++)if((f||S in b)&&(v=b[S],y=w(v,S,x),e))if(t)L[S]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return S;case 2:s.call(L,v)}else if(u)return!1;return d?-1:c||u?u:L}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},"604f":function(e,t,n){var r=n("d890"),i=n("1025"),o=r.WeakMap;e.exports="function"===typeof o&&/native code/.test(i(o))},"692f":function(e,t,n){var r=n("efe2"),i=n("2118"),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},"6c31":function(e,t,n){const r=n("5a9c"),{defaults:i}=n("a8a2"),{block:o,inline:a}=n("ac30");function l(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 s(e){let t,n,r="";const i=e.length;for(t=0;t<i;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}e.exports=class e{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||i,this.options.tokenizer=this.options.tokenizer||new r,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;const t={block:o.normal,inline:a.normal};this.options.pedantic?(t.block=o.pedantic,t.inline=a.pedantic):this.options.gfm&&(t.block=o.gfm,this.options.breaks?t.inline=a.breaks:t.inline=a.gfm),this.tokenizer.rules=t}static get rules(){return{block:o,inline:a}}static lex(t,n){const r=new e(n);return r.lex(t)}lex(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}blockTokens(e,t=[],n=!0){let r,i,o;e=e.replace(/^ +$/gm,"");while(e)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),o=r.items.length,i=0;i<o;i++)r.items[i].tokens=this.blockTokens(r.items[i].text,[],!1);t.push(r)}else if(r=this.tokenizer.html(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.def(e)))e=e.substring(r.raw.length),this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});else if(r=this.tokenizer.table(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.lheading(e))e=e.substring(r.raw.length),t.push(r);else if(n&&(r=this.tokenizer.paragraph(e)))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.text(e))e=e.substring(r.raw.length),t.push(r);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}return t}inline(e){let t,n,r,i,o,a;const l=e.length;for(t=0;t<l;t++)switch(a=e[t],a.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,n=0;n<i;n++)a.tokens.header[n]=[],this.inlineTokens(a.header[n],a.tokens.header[n]);for(i=a.cells.length,n=0;n<i;n++)for(o=a.cells[n],a.tokens.cells[n]=[],r=0;r<o.length;r++)a.tokens.cells[n][r]=[],this.inlineTokens(o[r],a.tokens.cells[n][r]);break;case"blockquote":this.inline(a.tokens);break;case"list":for(i=a.items.length,n=0;n<i;n++)this.inline(a.items[n].tokens);break;default:}return e}inlineTokens(e,t=[],n=!1,r=!1){let i;while(e)if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e,n,r))e=e.substring(i.raw.length),n=i.inLink,r=i.inRawBlock,t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,r)),t.push(i);else if(i=this.tokenizer.strong(e))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.em(e))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],n,r),t.push(i);else if(i=this.tokenizer.autolink(e,s))e=e.substring(i.raw.length),t.push(i);else if(n||!(i=this.tokenizer.url(e,s))){if(i=this.tokenizer.inlineText(e,r,l))e=e.substring(i.raw.length),t.push(i);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(i.raw.length),t.push(i);return t}}},"6d28":function(e,t,n){var r=n("9b9d"),i=n("3a08");(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"6d51":function(e,t,n){var r=n("1b99"),i=n("faa8"),o=n("4350"),a=n("d910").f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},"6d60":function(e,t,n){var r,i=n("857c"),o=n("dbe8"),a=n("18f6"),l=n("d5a8"),s=n("6fdf"),c=n("ae25"),u=n("7db2"),d=">",f="<",h="prototype",p="script",m=u("IE_PROTO"),g=function(){},v=function(e){return f+p+d+e+f+"/"+p+d},y=function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t},x=function(){var e,t=c("iframe"),n="java"+p+":";return t.style.display="none",s.appendChild(t),t.src=String(n),e=t.contentWindow.document,e.open(),e.write(v("document.F=Object")),e.close(),e.F},b=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}b=r?y(r):x();var e=a.length;while(e--)delete b[h][a[e]];return b()};l[m]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(g[h]=i(e),n=new g,g[h]=null,n[m]=e):n=b(),void 0===t?n:o(n,t)}},"6d7a":function(e,t,n){var r=n("1b99"),i=n("d890"),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},"6d86":function(e,t,n){(function(e){e(n("a564"))})((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"]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes)for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}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 n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext)for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}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 n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias)for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}}))},"6fdf":function(e,t,n){var r=n("6d7a");e.exports=r("document","documentElement")},"74cb":function(e,t,n){var r=n("c54b");e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"74e7":function(e,t,n){var r=n("2118");e.exports=Array.isArray||function(e){return"Array"==r(e)}},7727:function(e,t,n){const r=n("155c"),i=n("f5ef"),o=n("05cd"),{defaults:a}=n("a8a2"),{unescape:l}=n("322c");e.exports=class e{constructor(e){this.options=e||a,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new i,this.slugger=new o}static parse(t,n){const r=new e(n);return r.parse(t)}parse(e,t=!0){let n,r,i,o,a,s,c,u,d,f,h,p,m,g,v,y,x,b,w="";const k=e.length;for(n=0;n<k;n++)switch(f=e[n],f.type){case"space":continue;case"hr":w+=this.renderer.hr();continue;case"heading":w+=this.renderer.heading(this.parseInline(f.tokens),f.depth,l(this.parseInline(f.tokens,this.textRenderer)),this.slugger);continue;case"code":w+=this.renderer.code(f.text,f.lang,f.escaped);continue;case"table":for(u="",c="",o=f.header.length,r=0;r<o;r++)c+=this.renderer.tablecell(this.parseInline(f.tokens.header[r]),{header:!0,align:f.align[r]});for(u+=this.renderer.tablerow(c),d="",o=f.cells.length,r=0;r<o;r++){for(s=f.tokens.cells[r],c="",a=s.length,i=0;i<a;i++)c+=this.renderer.tablecell(this.parseInline(s[i]),{header:!1,align:f.align[i]});d+=this.renderer.tablerow(c)}w+=this.renderer.table(u,d);continue;case"blockquote":d=this.parse(f.tokens),w+=this.renderer.blockquote(d);continue;case"list":for(h=f.ordered,p=f.start,m=f.loose,o=f.items.length,d="",r=0;r<o;r++)v=f.items[r],y=v.checked,x=v.task,g="",v.task&&(b=this.renderer.checkbox(y),m?"text"===v.tokens[0].type?(v.tokens[0].text=b+" "+v.tokens[0].text,v.tokens[0].tokens&&v.tokens[0].tokens.length>0&&"text"===v.tokens[0].tokens[0].type&&(v.tokens[0].tokens[0].text=b+" "+v.tokens[0].tokens[0].text)):v.tokens.unshift({type:"text",text:b}):g+=b),g+=this.parse(v.tokens,m),d+=this.renderer.listitem(g,x,y);w+=this.renderer.list(d,h,p);continue;case"html":w+=this.renderer.html(f.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(f.tokens));continue;case"text":d=f.tokens?this.parseInline(f.tokens):f.text;while(n+1<k&&"text"===e[n+1].type)f=e[++n],d+="\n"+(f.tokens?this.parseInline(f.tokens):f.text);w+=t?this.renderer.paragraph(d):d;continue;default:{const e='Token with "'+f.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return w}parseInline(e,t){t=t||this.renderer;let n,r,i="";const o=e.length;for(n=0;n<o;n++)switch(r=e[n],r.type){case"escape":i+=t.text(r.text);break;case"html":i+=t.html(r.text);break;case"link":i+=t.link(r.href,r.title,this.parseInline(r.tokens,t));break;case"image":i+=t.image(r.href,r.title,r.text);break;case"strong":i+=t.strong(this.parseInline(r.tokens,t));break;case"em":i+=t.em(this.parseInline(r.tokens,t));break;case"codespan":i+=t.codespan(r.text);break;case"br":i+=t.br();break;case"del":i+=t.del(this.parseInline(r.tokens,t));break;case"text":i+=t.text(r.text);break;default:{const e='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return i}}},7899:function(e,t,n){(function(e){e(n("a564"))})((function(e){"use strict";var t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,r=/[*+-]\s/;function i(e,n){var r=n.line,i=0,o=0,a=t.exec(e.getLine(r)),l=a[1];do{i+=1;var s=r+i,c=e.getLine(s),u=t.exec(c);if(u){var d=u[1],f=parseInt(a[3],10)+i-o,h=parseInt(u[3],10),p=h;if(l!==d||isNaN(h)){if(l.length>d.length)return;if(l.length<d.length&&1===i)return;o+=1}else f===h&&(p=h+1),f>h&&(p=f+1),e.replaceRange(c.replace(t,d+p+u[4]+u[5]),{line:s,ch:0},{line:s,ch:c.length})}}while(u)}e.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return e.Pass;for(var a=o.listSelections(),l=[],s=0;s<a.length;s++){var c=a[s].head,u=o.getStateAfter(c.line),d=e.innerMode(o.getMode(),u);if("markdown"!==d.mode.name)return void o.execCommand("newlineAndIndent");u=d.state;var f=!1!==u.list,h=0!==u.quote,p=o.getLine(c.line),m=t.exec(p),g=/^\s*$/.test(p.slice(0,c.ch));if(!a[s].empty()||!f&&!h||!m||g)return void o.execCommand("newlineAndIndent");if(n.test(p)){var v=h&&/>\s*$/.test(p),y=!/>\s*$/.test(p);(v||y)&&o.replaceRange("",{line:c.line,ch:0},{line:c.line,ch:c.ch+1}),l[s]="\n"}else{var x=m[1],b=m[5],w=!(r.test(m[2])||m[2].indexOf(">")>=0),k=w?parseInt(m[3],10)+1+m[4]:m[2].replace("x"," ");l[s]="\n"+x+k+b,w&&i(o,c)}}o.replaceSelections(l)}}))},"7db2":function(e,t,n){var r=n("6d28"),i=n("7e8b"),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},"7e8b":function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},"857c":function(e,t,n){var r=n("a719");e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},"8d44":function(e,t,n){var r=n("6d7a"),i=n("b338"),o=n("0a60"),a=n("857c");e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},"90fb":function(e,t,n){var r=n("d890"),i=n("6d28"),o=n("faa8"),a=n("7e8b"),l=n("c54b"),s=n("74cb"),c=i("wks"),u=r.Symbol,d=s?u:u&&u.withoutSetter||a;e.exports=function(e){return o(c,e)||(l&&o(u,e)?c[e]=u[e]:c[e]=d("Symbol."+e)),c[e]}},"9b9d":function(e,t){e.exports=!1},"9edd":function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}e.exports=n},"9f67":function(e,t,n){var r=n("a719");e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},a564:function(e,t,n){(function(t,n){e.exports=n()})(0,(function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,l=a&&(r?document.documentMode||6:+(o||i)[1]),s=!o&&/WebKit\//.test(e),c=s&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/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),x=/\bCrOS\b/.test(e),b=/win/i.test(t),w=d&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(d=!1,s=!0);var k=y&&(c||d&&(null==w||w<12.11)),S=n||a&&l>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var L,T=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function A(e,t){return M(e).appendChild(t)}function N(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"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 O(e,t,n,r){var i=N(e,t,n,r);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 E(){var e;try{e=document.activeElement}catch(t){e=document.body||null}while(e&&e.shadowRoot&&e.shadowRoot.activeElement)e=e.shadowRoot.activeElement;return e}function F(e,t){var n=e.className;C(t).test(n)||(e.className+=(n?" ":"")+t)}function z(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!C(n[r]).test(t)&&(t+=" "+n[r]);return t}L=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var I=function(e){e.select()};function P(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function H(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function R(e,t,n,r,i){null==t&&(t=e.search(/[^\s\u00a0]/),-1==t&&(t=e.length));for(var o=r||0,a=i||0;;){var l=e.indexOf("\t",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}m?I=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(I=function(e){try{e.select()}catch(t){}});var W=function(){this.id=null,this.f=null,this.time=0,this.handler=P(this.onTimeout,this)};function B(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}W.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},W.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var _=30,j={toString:function(){return"CodeMirror.Pass"}},q={scroll:!1},$={origin:"*mouse"},U={origin:"+move"};function G(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var V=[""];function X(e){while(V.length<=e)V.push(K(V)+" ");return V[e]}function K(e){return e[e.length-1]}function Z(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Y(e,t,n){var r=0,i=n(t);while(r<e.length&&n(e[r])<=i)r++;e.splice(r,0,t)}function J(){}function Q(e,t){var n;return Object.create?n=Object.create(e):(J.prototype=e,n=new J),t&&H(t,n),n}var ee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\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 oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function ae(e,t,n){while((n<0?t>0:t<e.length)&&oe(e.charAt(t)))t+=n;return t}function le(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function se(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var ce=null;function ue(e,t,n){var r;ce=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"==n?r=i:ce=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ce=i)}return null!=r?r:ce}var de=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function s(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var u=e.length,d=[],f=0;f<u;++f)d.push(n(e.charCodeAt(f)));for(var h=0,p=c;h<u;++h){var m=d[h];"m"==m?d[h]=p:p=m}for(var g=0,v=c;g<u;++g){var y=d[g];"1"==y&&"r"==v?d[g]="n":o.test(y)&&(v=y,"r"==y&&(d[g]="R"))}for(var x=1,b=d[0];x<u-1;++x){var w=d[x];"+"==w&&"1"==b&&"1"==d[x+1]?d[x]="1":","!=w||b!=d[x+1]||"1"!=b&&"n"!=b||(d[x]=b),b=w}for(var k=0;k<u;++k){var S=d[k];if(","==S)d[k]="N";else if("%"==S){var C=void 0;for(C=k+1;C<u&&"%"==d[C];++C);for(var L=k&&"!"==d[k-1]||C<u&&"1"==d[C]?"1":"N",T=k;T<C;++T)d[T]=L;k=C-1}}for(var M=0,A=c;M<u;++M){var N=d[M];"L"==A&&"1"==N?d[M]="L":o.test(N)&&(A=N)}for(var O=0;O<u;++O)if(i.test(d[O])){var D=void 0;for(D=O+1;D<u&&i.test(d[D]);++D);for(var E="L"==(O?d[O-1]:c),F="L"==(D<u?d[D]:c),z=E==F?E?"L":"R":c,I=O;I<D;++I)d[I]=z;O=D-1}for(var P,H=[],R=0;R<u;)if(a.test(d[R])){var W=R;for(++R;R<u&&a.test(d[R]);++R);H.push(new s(0,W,R))}else{var B=R,_=H.length,j="rtl"==t?1:0;for(++R;R<u&&"L"!=d[R];++R);for(var q=B;q<R;)if(l.test(d[q])){B<q&&(H.splice(_,0,new s(1,B,q)),_+=j);var $=q;for(++q;q<R&&l.test(d[q]);++q);H.splice(_,0,new s(2,$,q)),_+=j,B=q}else++q;B<R&&H.splice(_,0,new s(1,B,R))}return"ltr"==t&&(1==H[0].level&&(P=e.match(/^\s+/))&&(H[0].from=P[0].length,H.unshift(new s(0,0,P[0].length))),1==K(H).level&&(P=e.match(/\s+$/))&&(K(H).to-=P[0].length,H.push(new s(0,u-P[0].length,u)))),"rtl"==t?H.reverse():H}}();function fe(e,t){var n=e.order;return null==n&&(n=e.order=de(e.text,t)),n}var he=[],pe=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||he).concat(n)}};function me(e,t){return e._handlers&&e._handlers[t]||he}function ge(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=B(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ve(e,t){var n=me(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function ye(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ve(e,n||t.type,e,t),Ce(t)||t.codemirrorIgnore}function xe(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==B(n,t[r])&&n.push(t[r])}function be(e,t){return me(e,t).length>0}function we(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){ge(this,e,t)}}function ke(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Se(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ce(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Le(e){ke(e),Se(e)}function Te(e){return e.target||e.srcElement}function Me(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 Ae,Ne,Oe=function(){if(a&&l<9)return!1;var e=N("div");return"draggable"in e||"dragDrop"in e}();function De(e){if(null==Ae){var t=N("span","");A(e,N("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ae=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var n=Ae?N("span",""):N("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ee(e){if(null!=Ne)return Ne;var t=A(e,document.createTextNode("AخA")),n=L(t,0,1).getBoundingClientRect(),r=L(t,1,2).getBoundingClientRect();return M(e),!(!n||n.left==n.right)&&(Ne=r.right-n.right<3)}var Fe=3!="\n\nb".split(/\n/).length?function(e){var t=0,n=[],r=e.length;while(t<=r){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?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ze=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(n){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ie=function(){var e=N("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Pe=null;function He(e){if(null!=Pe)return Pe;var t=A(e,N("span","x")),n=t.getBoundingClientRect(),r=L(t,0,1).getBoundingClientRect();return Pe=Math.abs(n.left-r.left)>1}var Re={},We={};function Be(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Re[e]=t}function _e(e,t){We[e]=t}function je(e){if("string"==typeof e&&We.hasOwnProperty(e))e=We[e];else if(e&&"string"==typeof e.name&&We.hasOwnProperty(e.name)){var t=We[e.name];"string"==typeof t&&(t={name:t}),e=Q(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return je("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return je("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function qe(e,t){t=je(t);var n=Re[t.name];if(!n)return qe(e,"text/plain");var r=n(e,t);if($e.hasOwnProperty(t.name)){var i=$e[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var $e={};function Ue(e,t){var n=$e.hasOwnProperty(e)?$e[e]:$e[e]={};H(t,n)}function Ge(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ve(e,t){var n;while(e.innerMode){if(n=e.innerMode(t),!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}}function Xe(e,t,n){return!e.startState||e.startState(t,n)}var Ke=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ze(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");var n=e;while(!n.lines)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Ye(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function Je(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Qe(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function et(e){if(null==e.parent)return null;for(var t=e.parent,n=B(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;;++i){if(r.children[i]==t)break;n+=r.children[i].chunkSize()}return n+t.first}function tt(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a],s=l.height;if(t<s)break;t-=s}return n+a}function nt(e,t){return t>=e.first&&t<e.first+e.size}function rt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function it(e,t,n){if(void 0===n&&(n=null),!(this instanceof it))return new it(e,t,n);this.line=e,this.ch=t,this.sticky=n}function ot(e,t){return e.line-t.line||e.ch-t.ch}function at(e,t){return e.sticky==t.sticky&&0==ot(e,t)}function lt(e){return it(e.line,e.ch)}function st(e,t){return ot(e,t)<0?t:e}function ct(e,t){return ot(e,t)<0?e:t}function ut(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function dt(e,t){if(t.line<e.first)return it(e.first,0);var n=e.first+e.size-1;return t.line>n?it(n,Ze(e,n).text.length):ft(t,Ze(e,t.line).text.length)}function ft(e,t){var n=e.ch;return null==n||n>t?it(e.line,t):n<0?it(e.line,0):e}function ht(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=dt(e,t[r]);return n}Ke.prototype.eol=function(){return this.pos>=this.string.length},Ke.prototype.sol=function(){return this.pos==this.lineStart},Ke.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ke.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ke.prototype.eat=function(e){var t,n=this.string.charAt(this.pos);if(t="string"==typeof e?n==e:n&&(e.test?e.test(n):e(n)),t)return++this.pos,n},Ke.prototype.eatWhile=function(e){var t=this.pos;while(this.eat(e));return this.pos>t},Ke.prototype.eatSpace=function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},Ke.prototype.skipToEnd=function(){this.pos=this.string.length},Ke.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ke.prototype.backUp=function(e){this.pos-=e},Ke.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=R(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},Ke.prototype.indentation=function(){return R(this.string,null,this.tabSize)-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},Ke.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return!1!==t&&(this.pos+=e.length),!0},Ke.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ke.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ke.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ke.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var pt=function(e,t){this.state=e,this.lookAhead=t},mt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function gt(e,t,n,r){var i=[e.state.modeGen],o={};Lt(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,l=function(r){n.baseTokens=i;var l=e.state.overlays[r],s=1,c=0;n.state=!0,Lt(e,t.text,l.mode,n,(function(e,t){var n=s;while(c<e){var r=i[s];r>e&&i.splice(s,1,e,i[s+1],r),s+=2,c=Math.min(e,r)}if(t)if(l.opaque)i.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;n<s;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function vt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=yt(e,et(t)),i=t.text.length>e.options.maxHighlightLength&&Ge(e.doc.mode,r.state),o=gt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function yt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new mt(r,!0,t);var o=Tt(e,t,n),a=o>r.first&&Ze(r,o-1).stateAfter,l=a?mt.fromSaved(r,a,o):new mt(r,Xe(r.mode),o);return r.iter(o,t,(function(n){xt(e,n.text,l);var r=l.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?l.save():null,l.nextLine()})),n&&(r.modeFrontier=l.line),l}function xt(e,t,n,r){var i=e.doc.mode,o=new Ke(t,e.options.tabSize,n);o.start=o.pos=r||0,""==t&&bt(i,n.state);while(!o.eol())wt(i,o,n.state),o.start=o.pos}function bt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ve(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function wt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ve(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}mt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},mt.prototype.baseToken=function(e){if(!this.baseTokens)return null;while(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}},mt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},mt.fromSaved=function(e,t,n){return t instanceof pt?new mt(e,Ge(e.mode,t.state),n,t.lookAhead):new mt(e,Ge(e.mode,t),n)},mt.prototype.save=function(e){var t=!1!==e?Ge(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new pt(t,this.maxLookAhead):t};var kt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function St(e,t,n,r){var i,o=e.doc,a=o.mode;t=dt(o,t);var l,s=Ze(o,t.line),c=yt(e,t.line,n),u=new Ke(s.text,e.options.tabSize,c);r&&(l=[]);while((r||u.pos<t.ch)&&!u.eol())u.start=u.pos,i=wt(a,u,c.state),r&&l.push(new kt(u,i,Ge(o.mode,c.state)));return r?l:new kt(u,i,c.state)}function Ct(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|s)"+n[2]+"(?:$|s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Lt(e,t,n,r,i,o,a){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new Ke(t,e.options.tabSize,r),f=e.options.addModeClass&&[null];""==t&&Ct(bt(n,r.state),o);while(!d.eol()){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&xt(e,t,r,d.pos),d.pos=t.length,s=null):s=Ct(wt(n,d,r.state,f),o),f){var h=f[0].name;h&&(s="m-"+(s?h+" "+s:h))}if(!l||u!=s){while(c<d.start)c=Math.min(d.start,c+5e3),i(c,u);u=s}d.start=d.pos}while(c<d.pos){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}function Tt(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=Ze(o,l-1),c=s.stateAfter;if(c&&(!n||l+(c instanceof pt?c.lookAhead:0)<=o.modeFrontier))return l;var u=R(s.text,null,e.options.tabSize);(null==i||r>u)&&(i=l-1,r=u)}return i}function Mt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=Ze(e,r).stateAfter;if(i&&(!(i instanceof pt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var At=!1,Nt=!1;function Ot(){At=!0}function Dt(){Nt=!0}function Et(e,t,n){this.marker=e,this.from=t,this.to=n}function Ft(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function zt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function It(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Pt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Et(a,o.from,s?null:o.to))}}return r}function Ht(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker,l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Et(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return r}function Rt(e,t){if(t.full)return null;var n=nt(e,t.from.line)&&Ze(e,t.from.line).markedSpans,r=nt(e,t.to.line)&&Ze(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==ot(t.from,t.to),l=Pt(n,i,a),s=Ht(r,o,a),c=1==t.text.length,u=K(t.text).length+(c?i:0);if(l)for(var d=0;d<l.length;++d){var f=l[d];if(null==f.to){var h=Ft(s,f.marker);h?c&&(f.to=null==h.to?null:h.to+u):f.to=i}}if(s)for(var p=0;p<s.length;++p){var m=s[p];if(null!=m.to&&(m.to+=u),null==m.from){var g=Ft(l,m.marker);g||(m.from=u,c&&(l||(l=[])).push(m))}else m.from+=u,c&&(l||(l=[])).push(m)}l&&(l=Wt(l)),s&&s!=l&&(s=Wt(s));var v=[l];if(!c){var y,x=t.text.length-2;if(x>0&&l)for(var b=0;b<l.length;++b)null==l[b].to&&(y||(y=[])).push(new Et(l[b].marker,null,null));for(var w=0;w<x;++w)v.push(y);v.push(s)}return v}function Wt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Bt(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=B(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],l=a.find(0),s=0;s<i.length;++s){var c=i[s];if(!(ot(c.to,l.from)<0||ot(c.from,l.to)>0)){var u=[s,1],d=ot(c.from,l.from),f=ot(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-3}}return i}function _t(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function jt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function qt(e){return e.inclusiveLeft?-1:0}function $t(e){return e.inclusiveRight?1:0}function Ut(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=ot(r.from,i.from)||qt(e)-qt(t);if(o)return-o;var a=ot(r.to,i.to)||$t(e)-$t(t);return a||t.id-e.id}function Gt(e,t){var n,r=Nt&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!n||Ut(n,i.marker)<0)&&(n=i.marker);return n}function Vt(e){return Gt(e,!0)}function Xt(e){return Gt(e,!1)}function Kt(e,t){var n,r=Nt&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Ut(n,o.marker)<0)&&(n=o.marker)}return n}function Zt(e,t,n,r,i){var o=Ze(e,t),a=Nt&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=ot(c.from,n)||qt(s.marker)-qt(i),d=ot(c.to,r)||$t(s.marker)-$t(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ot(c.to,n)>=0:ot(c.to,n)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?ot(c.from,r)<=0:ot(c.from,r)<0)))return!0}}}function Yt(e){var t;while(t=Vt(e))e=t.find(-1,!0).line;return e}function Jt(e){var t;while(t=Xt(e))e=t.find(1,!0).line;return e}function Qt(e){var t,n;while(t=Xt(e))e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function en(e,t){var n=Ze(e,t),r=Yt(n);return n==r?t:et(r)}function tn(e,t){if(t>e.lastLine())return t;var n,r=Ze(e,t);if(!nn(e,r))return t;while(n=Xt(r))r=n.find(1,!0).line;return et(r)+1}function nn(e,t){var n=Nt&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],r.marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&rn(e,t,r))return!0}}function rn(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return rn(e,r.line,Ft(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&rn(e,t,i))return!0}function on(e){e=Yt(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==n)break;t+=l.height}return t}function an(e){if(0==e.height)return 0;var t,n=e.text.length,r=e;while(t=Vt(r)){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}r=e;while(t=Xt(r)){var o=t.find(0,!0);n-=r.text.length-o.from.ch,r=o.to.line,n+=r.text.length-o.to.ch}return n}function ln(e){var t=e.display,n=e.doc;t.maxLine=Ze(n,n.first),t.maxLineLength=an(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=an(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var sn=function(e,t,n){this.text=e,jt(this,t),this.height=n?n(this):1};function cn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),_t(e),jt(e,n);var i=r?r(e):1;i!=e.height&&Qe(e,i)}function un(e){e.parent=null,_t(e)}sn.prototype.lineNo=function(){return et(this)},we(sn);var dn={},fn={};function hn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?fn:dn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function pn(e,t){var n=O("span",null,null,s?"padding-right: .1px":null),r={pre:O("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=gn,Ee(e.display.measure)&&(a=fe(o,e.doc.direction))&&(r.addToken=yn(r.addToken,a)),r.map=[];var l=t!=e.display.externalMeasured&&et(o);bn(o,r,vt(e,o,l)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=z(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=z(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(De(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var c=r.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=z(r.pre.className,r.textClass||"")),r}function mn(e){var t=N("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function gn(e,t,n,r,i,o,s){if(t){var c,u=e.splitSpaces?vn(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){c=document.createDocumentFragment();var h=0;while(1){d.lastIndex=h;var p=d.exec(t),m=p?p.index-h:t.length-h;if(m){var g=document.createTextNode(u.slice(h,h+m));a&&l<9?c.appendChild(N("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!p)break;h+=m+1;var v=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,x=y-e.col%y;v=c.appendChild(N("span",X(x),"cm-tab")),v.setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=x}else"\r"==p[0]||"\n"==p[0]?(v=c.appendChild(N("span","\r"==p[0]?"␍":"␤","cm-invalidchar")),v.setAttribute("cm-text",p[0]),e.col+=1):(v=e.cm.options.specialCharPlaceholder(p[0]),v.setAttribute("cm-text",p[0]),a&&l<9?c.appendChild(N("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&&l<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||f||o){var b=n||"";r&&(b+=r),i&&(b+=i);var w=N("span",[c],b,o);if(s)for(var k in s)s.hasOwnProperty(k)&&"style"!=k&&"class"!=k&&w.setAttribute(k,s[k]);return e.content.appendChild(w)}e.content.appendChild(c)}}function vn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}function yn(e,t){return function(n,r,i,o,a,l,s){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,f=0;f<t.length;f++)if(d=t[f],d.to>c&&d.from<=c)break;if(d.to>=u)return e(n,r,i,o,a,l,s);e(n,r.slice(0,d.to-c),i,o,null,l,s),o=null,r=r.slice(d.to-c),c=d.to}}}function xn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function bn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,l,s,c,u,d,f,h=i.length,p=0,m=1,g="",v=0;;){if(v==p){s=c=u=l="",f=null,d=null,v=1/0;for(var y=[],x=void 0,b=0;b<r.length;++b){var w=r[b],k=w.marker;if("bookmark"==k.type&&w.from==p&&k.widgetNode)y.push(k);else if(w.from<=p&&(null==w.to||w.to>p||k.collapsed&&w.to==p&&w.from==p)){if(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,c=""),k.className&&(s+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&w.from==p&&(u+=" "+k.startStyle),k.endStyle&&w.to==v&&(x||(x=[])).push(k.endStyle,w.to),k.title&&((f||(f={})).title=k.title),k.attributes)for(var S in k.attributes)(f||(f={}))[S]=k.attributes[S];k.collapsed&&(!d||Ut(d.marker,k)<0)&&(d=w)}else w.from>p&&v>w.from&&(v=w.from)}if(x)for(var C=0;C<x.length;C+=2)x[C+1]==v&&(c+=" "+x[C]);if(!d||d.from==p)for(var L=0;L<y.length;++L)xn(t,0,y[L]);if(d&&(d.from||0)==p){if(xn(t,(null==d.to?h+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(p>=h)break;var T=Math.min(h,v);while(1){if(g){var M=p+g.length;if(!d){var A=M>T?g.slice(0,T-p):g;t.addToken(t,A,a?a+s:s,u,p+A.length==v?c:"",l,f)}if(M>=T){g=g.slice(T-p),p=T;break}p=M,u=""}g=i.slice(o,o=n[m++]),a=hn(n[m++],t.cm.options)}}else for(var N=1;N<n.length;N+=2)t.addToken(t,i.slice(o,o=n[N]),hn(n[N+1],t.cm.options))}function wn(e,t,n){this.line=t,this.rest=Qt(t),this.size=this.rest?et(K(this.rest))-n+1:1,this.node=this.text=null,this.hidden=nn(e,t)}function kn(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new wn(e.doc,Ze(e.doc,o),o);r=o+a.size,i.push(a)}return i}var Sn=null;function Cn(e){Sn?Sn.ops.push(e):e.ownsGroup=Sn={ops:[e],delayedCallbacks:[]}}function Ln(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)while(i.cursorActivityCalled<i.cursorActivityHandlers.length)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function Tn(e,t){var n=e.ownsGroup;if(n)try{Ln(n)}finally{Sn=null,t(n)}}var Mn=null;function An(e,t){var n=me(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);Sn?r=Sn.delayedCallbacks:Mn?r=Mn:(r=Mn=[],setTimeout(Nn,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},a=0;a<n.length;++a)o(a)}}function Nn(){var e=Mn;Mn=null;for(var t=0;t<e.length;++t)e[t]()}function On(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?zn(e,t):"gutter"==o?Pn(e,t,n,r):"class"==o?In(e,t):"widget"==o&&Hn(e,t,r)}t.changes=null}function Dn(e){return e.node==e.text&&(e.node=N("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&l<8&&(e.node.style.zIndex=2)),e.node}function En(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=Dn(t);t.background=r.insertBefore(N("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Fn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):pn(e,t)}function zn(e,t){var n=t.text.className,r=Fn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,In(e,t)):n&&(t.text.className=n)}function In(e,t){En(e,t),t.line.wrapClass?Dn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Pn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=Dn(t);t.gutterBackground=N("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=Dn(t),l=t.gutter=N("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(N("div",rt(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var c=e.display.gutterSpecs[s].className,u=o.hasOwnProperty(c)&&o[c];u&&l.appendChild(N("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function Hn(e,t,n){t.alignable&&(t.alignable=null);for(var r=C("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Wn(e,t,n)}function Rn(e,t,n,r){var i=Fn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),In(e,t),Pn(e,t,n,r),Wn(e,t,r),t.node}function Wn(e,t,n){if(Bn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Bn(e,t.rest[r],t,n,!1)}function Bn(e,t,n,r,i){if(t.widgets)for(var o=Dn(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],c=N("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),_n(s,c,n,r),e.display.input.setUneditable(c),i&&s.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),An(s,"redraw")}}function _n(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function jn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!D(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),A(t.display.measure,N("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function qn(e,t){for(var n=Te(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function $n(e){return e.lineSpace.offsetTop}function Un(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Gn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=A(e.measure,N("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Vn(e){return _-e.display.nativeBarWidth}function Xn(e){return e.display.scroller.clientWidth-Vn(e)-e.display.barWidth}function Kn(e){return e.display.scroller.clientHeight-Vn(e)-e.display.barHeight}function Zn(e,t,n){var r=e.options.lineWrapping,i=r&&Xn(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Yn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(et(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Jn(e,t){t=Yt(t);var n=et(t),r=e.display.externalMeasured=new wn(e.doc,t,n);r.lineN=n;var i=r.built=pn(e,r);return r.text=i.pre,A(e.display.lineMeasure,i.pre),r}function Qn(e,t,n,r){return nr(e,tr(e,t),n,r)}function er(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Ir(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function tr(e,t){var n=et(t),r=er(e,n);r&&!r.text?r=null:r&&r.changes&&(On(e,r,n,Or(e)),e.curOp.forceUpdate=!0),r||(r=Jn(e,t));var i=Yn(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function nr(e,t,n,r,i){t.before&&(n=-1);var o,a=n+(r||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Zn(e,t.view,t.rect),t.hasHeights=!0),o=lr(e,t,n,r),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var rr,ir={left:0,right:0,top:0,bottom:0};function or(e,t,n){for(var r,i,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(i=0,o=1,a="left"):t<s?(i=t-l,o=i+1):(c==e.length-3||t==s&&e[c+3]>t)&&(o=s-l,i=o-1,t>=s&&(a="right")),null!=i){if(r=e[c+2],l==s&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)while(c&&e[c-2]==e[c-3]&&e[c-1].insertLeft)r=e[2+(c-=3)],a="left";if("right"==n&&i==s-l)while(c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft)r=e[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:l,coverEnd:s}}function ar(e,t){var n=ir;if("left"==t){for(var r=0;r<e.length;r++)if((n=e[r]).left!=n.right)break}else for(var i=e.length-1;i>=0;i--)if((n=e[i]).left!=n.right)break;return n}function lr(e,t,n,r){var i,o=or(t.map,n,r),s=o.node,c=o.start,u=o.end,d=o.collapse;if(3==s.nodeType){for(var f=0;f<4;f++){while(c&&oe(t.line.text.charAt(o.coverStart+c)))--c;while(o.coverStart+u<o.coverEnd&&oe(t.line.text.charAt(o.coverStart+u)))++u;if(i=a&&l<9&&0==c&&u==o.coverEnd-o.coverStart?s.parentNode.getBoundingClientRect():ar(L(s,c,u).getClientRects(),r),i.left||i.right||0==c)break;u=c,c-=1,d="right"}a&&l<11&&(i=sr(e.display.measure,i))}else{var h;c>0&&(d=r="right"),i=e.options.lineWrapping&&(h=s.getClientRects()).length>1?h["right"==r?h.length-1:0]:s.getBoundingClientRect()}if(a&&l<9&&!c&&(!i||!i.left&&!i.right)){var p=s.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Nr(e.display),top:p.top,bottom:p.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,x=0;x<y.length-1;x++)if(v<y[x])break;var b=x?y[x-1]:0,w=y[x],k={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:b,bottom:w};return i.left||i.right||(k.bogus=!0),e.options.singleCursorHeightPerLine||(k.rtop=m,k.rbottom=g),k}function sr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!He(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function cr(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 ur(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)cr(e.display.view[t])}function dr(e){ur(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function fr(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function hr(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function pr(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=jn(e.widgets[n]));return t}function mr(e,t,n,r,i){if(!i){var o=pr(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=on(t);if("local"==r?a+=$n(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==r?0:hr());var s=l.left+("window"==r?0:fr());n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function gr(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=fr(),i-=hr();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function vr(e,t,n,r,i){return r||(r=Ze(e.doc,t.line)),mr(e,r,Qn(e,r,t.ch,i),n)}function yr(e,t,n,r,i,o){function a(t,a){var l=nr(e,i,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,mr(e,r,l,n)}r=r||Ze(e.doc,t.line),i||(i=tr(e,r));var l=fe(r,e.doc.direction),s=t.ch,c=t.sticky;if(s>=r.text.length?(s=r.text.length,c="before"):s<=0&&(s=0,c="after"),!l)return a("before"==c?s-1:s,"before"==c);function u(e,t,n){var r=l[t],i=1==r.level;return a(n?e-1:e,i!=n)}var d=ue(l,s,c),f=ce,h=u(s,d,"before"==c);return null!=f&&(h.other=u(s,f,"before"!=c)),h}function xr(e,t){var n=0;t=dt(e.doc,t),e.options.lineWrapping||(n=Nr(e.display)*t.ch);var r=Ze(e.doc,t.line),i=on(r)+$n(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function br(e,t,n,r,i){var o=it(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function wr(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,n<0)return br(r.first,0,null,-1,-1);var i=tt(r,n),o=r.first+r.size-1;if(i>o)return br(r.first+r.size-1,Ze(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ze(r,i);;){var l=Lr(e,a,i,t,n),s=Kt(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var c=s.find(1);if(c.line==i)return c;a=Ze(r,i=c.line)}}function kr(e,t,n,r){r-=pr(t);var i=t.text.length,o=le((function(t){return nr(e,n,t-1).bottom<=r}),i,0);return i=le((function(t){return nr(e,n,t).top>r}),o,i),{begin:o,end:i}}function Sr(e,t,n,r){n||(n=tr(e,t));var i=mr(e,t,nr(e,n,r),"line").top;return kr(e,t,n,i)}function Cr(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Lr(e,t,n,r,i){i-=on(t);var o=tr(e,t),a=pr(t),l=0,s=t.text.length,c=!0,u=fe(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?Mr:Tr)(e,t,n,o,u,r,i);c=1!=d.level,l=c?d.from:d.to-1,s=c?d.to:d.from-1}var f,h,p=null,m=null,g=le((function(t){var n=nr(e,o,t);return n.top+=a,n.bottom+=a,!!Cr(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)}),l,s),v=!1;if(m){var y=r-m.left<m.right-r,x=y==c;g=p+(x?0:1),h=x?"after":"before",f=y?m.left:m.right}else{c||g!=s&&g!=l||g++,h=0==g?"after":g==t.text.length?"before":nr(e,o,g-(c?1:0)).bottom+a<=i==c?"after":"before";var b=yr(e,it(n,g,h),"line",t,o);f=b.left,v=i<b.top?-1:i>=b.bottom?1:0}return g=ae(t.text,g,1),br(n,g,h,v,r-f)}function Tr(e,t,n,r,i,o,a){var l=le((function(l){var s=i[l],c=1!=s.level;return Cr(yr(e,it(n,c?s.to:s.from,c?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),s=i[l];if(l>0){var c=1!=s.level,u=yr(e,it(n,c?s.from:s.to,c?"after":"before"),"line",t,r);Cr(u,o,a,!0)&&u.top>a&&(s=i[l-1])}return s}function Mr(e,t,n,r,i,o,a){var l=kr(e,t,r,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<i.length;f++){var h=i[f];if(!(h.from>=c||h.to<=s)){var p=1!=h.level,m=nr(e,r,p?Math.min(c,h.to)-1:Math.max(s,h.from)).right,g=m<o?o-m+1e9:m-o;(!u||d>g)&&(u=h,d=g)}}return u||(u=i[i.length-1]),u.from<s&&(u={from:s,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function Ar(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==rr){rr=N("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)rr.appendChild(document.createTextNode("x")),rr.appendChild(N("br"));rr.appendChild(document.createTextNode("x"))}A(e.measure,rr);var n=rr.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),M(e.measure),n||1}function Nr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=N("span","xxxxxxxxxx"),n=N("pre",[t],"CodeMirror-line-like");A(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Or(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=o.offsetLeft+o.clientLeft+i,r[l]=o.clientWidth}return{fixedPos:Dr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Dr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Er(e){var t=Ar(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Nr(e.display)-3);return function(i){if(nn(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 n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function Fr(e){var t=e.doc,n=Er(e);t.iter((function(e){var t=n(e);t!=e.height&&Qe(e,t)}))}function zr(e,t,n,r){var i=e.display;if(!n&&"true"==Te(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(t){return null}var s,c=wr(e,o,a);if(r&&c.xRel>0&&(s=Ze(e.doc,c.line).text).length==c.ch){var u=R(s,s.length,e.options.tabSize)-s.length;c=it(c.line,Math.max(0,Math.round((o-Gn(e.display).left)/Nr(e.display))-u))}return c}function Ir(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,t<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if(t-=n[r].size,t<0)return r}function Pr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Nt&&en(e.doc,t)<i.viewTo&&Rr(e);else if(n<=i.viewFrom)Nt&&tn(e.doc,n+r)>i.viewFrom?Rr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Rr(e);else if(t<=i.viewFrom){var o=Wr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Rr(e)}else if(n>=i.viewTo){var a=Wr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Rr(e)}else{var l=Wr(e,t,t,-1),s=Wr(e,n,n+r,1);l&&s?(i.view=i.view.slice(0,l.index).concat(kn(e,l.lineN,s.lineN)).concat(i.view.slice(s.index)),i.viewTo+=r):Rr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function Hr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[Ir(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==B(a,n)&&a.push(n)}}}function Rr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Wr(e,t,n,r){var i,o=Ir(e,t),a=e.display.view;if(!Nt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=t){if(r>0){if(o==a.length-1)return null;i=l+a[o].size-t,o++}else i=l-t;t+=i,n+=i}while(en(e.doc,n)!=n){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function Br(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=kn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=kn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Ir(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(kn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Ir(e,n)))),r.viewTo=n}function _r(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function jr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function qr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var l=n.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&$r(e,l.head,i),s||Gr(e,l,o)}}return r}function $r(e,t,n){var r=yr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(N("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(N("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Ur(e,t){return e.top-t.top||e.left-t.left}function Gr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=Gn(e.display),l=a.left,s=Math.max(r.sizerWidth,Xn(e)-r.sizer.offsetLeft)-a.right,c="ltr"==i.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(N("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?s-e:n)+"px;\n height: "+(r-t)+"px"))}function d(t,n,r){var o,a,d=Ze(i,t),f=d.text.length;function h(n,r){return vr(e,it(t,n),"div",d,r)}function p(t,n,r){var i=Sr(e,d,null,t),o="ltr"==n==("after"==r)?"left":"right",a="after"==r?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1);return h(a,o)[o]}var m=fe(d,i.direction);return se(m,n||0,null==r?f:r,(function(e,t,i,d){var g="ltr"==i,v=h(e,g?"left":"right"),y=h(t-1,g?"right":"left"),x=null==n&&0==e,b=null==r&&t==f,w=0==d,k=!m||d==m.length-1;if(y.top-v.top<=3){var S=(c?x:b)&&w,C=(c?b:x)&&k,L=S?l:(g?v:y).left,T=C?s:(g?y:v).right;u(L,v.top,T-L,v.bottom)}else{var M,A,N,O;g?(M=c&&x&&w?l:v.left,A=c?s:p(e,i,"before"),N=c?l:p(t,i,"after"),O=c&&b&&k?s:y.right):(M=c?p(e,i,"before"):l,A=!c&&x&&w?s:v.right,N=!c&&b&&k?l:y.left,O=c?p(t,i,"after"):s),u(M,v.top,A-M,v.bottom),v.bottom<y.top&&u(l,v.bottom,null,y.top),u(N,y.top,O-N,y.bottom)}(!o||Ur(v,o)<0)&&(o=v),Ur(y,o)<0&&(o=y),(!a||Ur(v,a)<0)&&(a=v),Ur(y,a)<0&&(a=y)})),{start:o,end:a}}var f=t.from(),h=t.to();if(f.line==h.line)d(f.line,f.ch,h.ch);else{var p=Ze(i,f.line),m=Ze(i,h.line),g=Yt(p)==Yt(m),v=d(f.line,f.ch,g?p.text.length+1:null).end,y=d(h.line,g?0:null,h.ch).start;g&&(v.top<y.top-2?(u(v.right,v.top,null,v.bottom),u(l,y.top,y.left,y.bottom)):u(v.right,v.top,y.left-v.right,v.bottom)),v.bottom<y.top&&u(l,v.bottom,null,y.top)}n.appendChild(o)}function Vr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Xr(e){e.state.focused||(e.display.input.focus(),Zr(e))}function Kr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Yr(e))}),100)}function Zr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Vr(e))}function Yr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Jr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],o=e.options.lineWrapping,s=void 0,c=0;if(!i.hidden){if(a&&l<8){var u=i.node.offsetTop+i.node.offsetHeight;s=u-n,n=u}else{var d=i.node.getBoundingClientRect();s=d.bottom-d.top,!o&&i.text.firstChild&&(c=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var f=i.line.height-s;if((f>.005||f<-.005)&&(Qe(i.line,s),Qr(i.line),i.rest))for(var h=0;h<i.rest.length;h++)Qr(i.rest[h]);if(c>e.display.sizerWidth){var p=Math.ceil(c/Nr(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Qr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function ei(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-$n(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=tt(t,r),a=tt(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?(o=l,a=tt(t,on(Ze(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=tt(t,on(Ze(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function ti(e,t){if(!ye(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=N("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-$n(e.display))+"px;\n height: "+(t.bottom-t.top+Vn(e)+n.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)}}}function ni(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(t=t.ch?it(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,n="before"==t.sticky?it(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=yr(e,t),s=n&&n!=t?yr(e,n):l;i={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-r,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+r};var c=ii(e,i),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(di(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(hi(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}function ri(e,t){var n=ii(e,t);null!=n.scrollTop&&di(e,n.scrollTop),null!=n.scrollLeft&&hi(e,n.scrollLeft)}function ii(e,t){var n=e.display,r=Ar(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Kn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Un(n),s=t.top<r,c=t.bottom>l-r;if(t.top<i)a.scrollTop=s?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?l:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,f=Xn(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),h=t.right-t.left>f;return h&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left-(h?0:10)):t.right>f+d-3&&(a.scrollLeft=t.right+(h?0:10)-f),a}function oi(e,t){null!=t&&(ci(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ai(e){ci(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function li(e,t,n){null==t&&null==n||ci(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function si(e,t){ci(e),e.curOp.scrollToPos=t}function ci(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=xr(e,t.from),r=xr(e,t.to);ui(e,n,r,t.margin)}}function ui(e,t,n,r){var i=ii(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});li(e,i.scrollLeft,i.scrollTop)}function di(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||ji(e,{top:t}),fi(e,t,!0),n&&ji(e),zi(e,100))}function fi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function hi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Gi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function pi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Un(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Vn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var mi=function(e,t,n){this.cm=n;var r=this.vert=N("div",[N("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=N("div",[N("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),pe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),pe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};mi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r: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==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},mi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},mi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},mi.prototype.zeroWidthHack=function(){var e=y&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new W,this.disableVert=new W},mi.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},mi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var gi=function(){};function vi(e,t){t||(t=pi(e));var n=e.display.barWidth,r=e.display.barHeight;yi(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Jr(e),yi(e,pi(e)),n=e.display.barWidth,r=e.display.barHeight}function yi(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}gi.prototype.update=function(){return{bottom:0,right:0}},gi.prototype.setScrollLeft=function(){},gi.prototype.setScrollTop=function(){},gi.prototype.clear=function(){};var xi={native:mi,null:gi};function bi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new xi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?hi(e,t):di(e,t)}),e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var wi=0;function ki(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++wi},Cn(e.curOp)}function Si(e){var t=e.curOp;t&&Tn(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Ci(e)}))}function Ci(e){for(var t=e.ops,n=0;n<t.length;n++)Li(t[n]);for(var r=0;r<t.length;r++)Ti(t[r]);for(var i=0;i<t.length;i++)Mi(t[i]);for(var o=0;o<t.length;o++)Ai(t[o]);for(var a=0;a<t.length;a++)Ni(t[a])}function Li(e){var t=e.cm,n=t.display;Hi(t),e.updateMaxLine&&ln(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Pi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ti(e){e.updatedDisplay=e.mustUpdate&&Bi(e.cm,e.update)}function Mi(e){var t=e.cm,n=t.display;e.updatedDisplay&&Jr(t),e.barMeasure=pi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Qn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Vn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Xn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Ai(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&hi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==E();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&vi(t,e.barMeasure),e.updatedDisplay&&Ui(t,e.barMeasure),e.selectionChanged&&Vr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Xr(e.cm)}function Ni(e){var t=e.cm,n=t.display,r=t.doc;if(e.updatedDisplay&&_i(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&fi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&hi(t,e.scrollLeft,!0,!0),e.scrollToPos){var i=ni(t,dt(r,e.scrollToPos.from),dt(r,e.scrollToPos.to),e.scrollToPos.margin);ti(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var l=0;l<o.length;++l)o[l].lines.length||ve(o[l],"hide");if(a)for(var s=0;s<a.length;++s)a[s].lines.length&&ve(a[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ve(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Oi(e,t){if(e.curOp)return t();ki(e);try{return t()}finally{Si(e)}}function Di(e,t){return function(){if(e.curOp)return t.apply(e,arguments);ki(e);try{return t.apply(e,arguments)}finally{Si(e)}}}function Ei(e){return function(){if(this.curOp)return e.apply(this,arguments);ki(this);try{return e.apply(this,arguments)}finally{Si(this)}}}function Fi(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);ki(t);try{return e.apply(this,arguments)}finally{Si(t)}}}function zi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,P(Ii,e))}function Ii(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=yt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?Ge(t.mode,r.state):null,s=gt(e,o,r,!0);l&&(r.state=l),o.styles=s.styles;var c=o.styleClasses,u=s.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),f=0;!d&&f<a.length;++f)d=a[f]!=o.styles[f];d&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&xt(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return zi(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Oi(e,(function(){for(var t=0;t<i.length;t++)Hr(e,i[t],"text")}))}}var Pi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=ei(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Xn(e),this.force=n,this.dims=Or(e),this.events=[]};function Hi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Vn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Vn(e)+"px",t.scrollbarsClipped=!0)}function Ri(e){if(e.hasFocus())return null;var t=E();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Wi(e){if(e&&e.activeElt&&e.activeElt!=E()&&(e.activeElt.focus(),e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}function Bi(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Rr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==_r(e))return!1;Vi(e)&&(Rr(e),t.dims=Or(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Nt&&(o=en(e.doc,o),a=tn(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Br(e,o,a),n.viewOffset=on(Ze(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=_r(e);if(!l&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Ri(e);return s>4&&(n.lineDiv.style.display="none"),qi(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Wi(c),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,zi(e,400)),n.updateLineNumbers=null,!0}function _i(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Xn(e))r&&(t.visible=ei(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Un(e.display)-Kn(e),n.top)}),t.visible=ei(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Bi(e,t))break;Jr(e);var i=pi(e);jr(e),vi(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 ji(e,t){var n=new Pi(e,t);if(Bi(e,n)){Jr(e),_i(e,n);var r=pi(e);jr(e),vi(e,r),Ui(e,r),n.finish()}}function qi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function l(t){var n=t.nextSibling;return s&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d<c.length;d++){var f=c[d];if(f.hidden);else if(f.node&&f.node.parentNode==o){while(a!=f.node)a=l(a);var h=i&&null!=t&&t<=u&&f.lineNumber;f.changes&&(B(f.changes,"gutter")>-1&&(h=!1),On(e,f,u,n)),h&&(M(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(rt(e.options,u)))),a=f.node.nextSibling}else{var p=Rn(e,f,u,n);o.insertBefore(p,a)}u+=f.size}while(a)a=l(a)}function $i(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+Vn(e)+"px"}function Gi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Dr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var l=n[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function Vi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=rt(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(N("div",[N("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",$i(e.display),!0}return!1}function Xi(e,t){for(var n=[],r=!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;r=!0}n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Ki(e){var t=e.gutters,n=e.gutterSpecs;M(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,l=t.appendChild(N("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",$i(e)}function Zi(e){Ki(e.display),Pr(e),Gi(e)}function Yi(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=N("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=N("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=O("div",null,"CodeMirror-code"),o.selectionDiv=N("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=N("div",null,"CodeMirror-cursors"),o.measure=N("div",null,"CodeMirror-measure"),o.lineMeasure=N("div",null,"CodeMirror-measure"),o.lineSpace=O("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=O("div",[o.lineSpace],"CodeMirror-lines");o.mover=N("div",[c],null,"position: relative"),o.sizer=N("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=N("div",null,null,"position: absolute; height: "+_+"px; width: 1px;"),o.gutters=N("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=N("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=N("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),a&&l<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),s||n&&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=Xi(i.gutters,i.lineNumbers),Ki(o),r.init(o)}Pi.prototype.signal=function(e,t){be(e,t)&&this.events.push(arguments)},Pi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ve.apply(null,this.events[e])};var Ji=0,Qi=null;function eo(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function to(e){var t=eo(e);return t.x*=Qi,t.y*=Qi,t}function no(e,t){var r=eo(t),i=r.x,o=r.y,a=e.display,l=a.scroller,c=l.scrollWidth>l.clientWidth,u=l.scrollHeight>l.clientHeight;if(i&&c||o&&u){if(o&&y&&s)e:for(var f=t.target,h=a.view;f!=l;f=f.parentNode)for(var p=0;p<h.length;p++)if(h[p].node==f){e.display.currentWheelTarget=f;break e}if(i&&!n&&!d&&null!=Qi)return o&&u&&di(e,Math.max(0,l.scrollTop+o*Qi)),hi(e,Math.max(0,l.scrollLeft+i*Qi)),(!o||o&&u)&&ke(t),void(a.wheelStartX=null);if(o&&null!=Qi){var m=o*Qi,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),ji(e,{top:g,bottom:v})}Ji<20&&(null==a.wheelStartX?(a.wheelStartX=l.scrollLeft,a.wheelStartY=l.scrollTop,a.wheelDX=i,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var e=l.scrollLeft-a.wheelStartX,t=l.scrollTop-a.wheelStartY,n=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(Qi=(Qi*Ji+n)/(Ji+1),++Ji)}}),200)):(a.wheelDX+=i,a.wheelDY+=o))}}a?Qi=-.53:n?Qi=15:u?Qi=-.7:f&&(Qi=-1/3);var ro=function(e,t){this.ranges=e,this.primIndex=t};ro.prototype.primary=function(){return this.ranges[this.primIndex]},ro.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!at(n.anchor,r.anchor)||!at(n.head,r.head))return!1}return!0},ro.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new io(lt(this.ranges[t].anchor),lt(this.ranges[t].head));return new ro(e,this.primIndex)},ro.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ro.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(ot(t,r.from())>=0&&ot(e,r.to())<=0)return n}return-1};var io=function(e,t){this.anchor=e,this.head=t};function oo(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return ot(e.from(),t.from())})),n=B(t,i);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=ot(l.to(),a.from());if(r&&!a.empty()?s>0:s>=0){var c=ct(l.from(),a.from()),u=st(l.to(),a.to()),d=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new io(d?u:c,d?c:u))}}return new ro(t,n)}function ao(e,t){return new ro([new io(e,t||e)],0)}function lo(e){return e.text?it(e.from.line+e.text.length-1,K(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function so(e,t){if(ot(e,t.from)<0)return e;if(ot(e,t.to)<=0)return lo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=lo(t).ch-t.to.ch),it(n,r)}function co(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new io(so(i.anchor,t),so(i.head,t)))}return oo(e.cm,n,e.sel.primIndex)}function uo(e,t,n){return e.line==t.line?it(n.line,e.ch-t.ch+n.ch):it(n.line+(e.line-t.line),e.ch)}function fo(e,t,n){for(var r=[],i=it(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=uo(l.from,i,o),c=uo(lo(l),i,o);if(i=l.to,o=c,"around"==n){var u=e.sel.ranges[a],d=ot(u.head,u.anchor)<0;r[a]=new io(d?c:s,d?s:c)}else r[a]=new io(s,s)}return new ro(r,e.sel.primIndex)}function ho(e){e.doc.mode=qe(e.options,e.doc.modeOption),po(e)}function po(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,zi(e,100),e.state.modeGen++,e.curOp&&Pr(e)}function mo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==K(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function go(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){cn(e,n,i,r),An(e,"change",e,t)}function a(e,t){for(var n=[],o=e;o<t;++o)n.push(new sn(c[o],i(o),r));return n}var l=t.from,s=t.to,c=t.text,u=Ze(e,l.line),d=Ze(e,s.line),f=K(c),h=i(c.length-1),p=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(mo(e,t)){var m=a(0,c.length-1);o(d,d.text,h),p&&e.remove(l.line,p),m.length&&e.insert(l.line,m)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,l.ch)+f+u.text.slice(s.ch),h);else{var g=a(1,c.length-1);g.push(new sn(f+u.text.slice(s.ch),h,r)),o(u,u.text.slice(0,l.ch)+c[0],i(0)),e.insert(l.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),i(0)),e.remove(l.line+1,p);else{o(u,u.text.slice(0,l.ch)+c[0],i(0)),o(d,f+d.text.slice(s.ch),h);var v=a(1,c.length-1);p>1&&e.remove(l.line+1,p-1),e.insert(l.line+1,v)}An(e,"change",e,t)}function vo(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=i){var s=o&&l.sharedHist;n&&!s||(t(l.doc,s),r(l.doc,e,s))}}}r(e,null,!0)}function yo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Fr(e),ho(e),xo(e),e.options.lineWrapping||ln(e),e.options.mode=t.modeOption,Pr(e)}function xo(e){("rtl"==e.doc.direction?F:T)(e.display.lineDiv,"CodeMirror-rtl")}function bo(e){Oi(e,(function(){xo(e),Pr(e)}))}function wo(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 ko(e,t){var n={from:lt(t.from),to:lo(t),text:Ye(e,t.from,t.to)};return No(e,n,t.from.line,t.to.line+1),vo(e,(function(e){return No(e,n,t.from.line,t.to.line+1)}),!0),n}function So(e){while(e.length){var t=K(e);if(!t.ranges)break;e.pop()}}function Co(e,t){return t?(So(e.done),K(e.done)):e.done.length&&!K(e.done).ranges?K(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),K(e.done)):void 0}function Lo(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,l=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=Co(i,i.lastOp==r)))a=K(o.changes),0==ot(t.from,t.to)&&0==ot(t.from,a.to)?a.to=lo(t):o.changes.push(ko(e,t));else{var s=K(i.done);s&&s.ranges||Ao(e.sel,i.done),o={changes:[ko(e,t)],generation:i.generation},i.done.push(o);while(i.done.length>i.undoDepth)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||ve(e,"historyAdded")}function To(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Mo(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||To(e,o,K(i.done),t))?i.done[i.done.length-1]=t:Ao(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&So(i.undone)}function Ao(e,t){var n=K(t);n&&n.ranges&&n.equals(e)||t.push(e)}function No(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Oo(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Do(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Oo(n[i]));return r}function Eo(e,t){var n=Do(e,t),r=Rt(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(n[i]=a)}return n}function Fo(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?ro.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];r.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&B(t,Number(u[1]))>-1&&(K(l)[d]=c[d],delete c[d])}}}return r}function zo(e,t,n,r){if(r){var i=e.anchor;if(n){var o=ot(t,i)<0;o!=ot(n,i)<0?(i=t,t=n):o!=ot(t,n)<0&&(t=n)}return new io(i,t)}return new io(n||t,t)}function Io(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),_o(e,new ro([zo(e.sel.primary(),t,n,i)],0),r)}function Po(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=zo(e.sel.ranges[o],t[o],null,i);var a=oo(e.cm,r,e.sel.primIndex);_o(e,a,n)}function Ho(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,_o(e,oo(e.cm,i,e.sel.primIndex),r)}function Ro(e,t,n,r){_o(e,ao(t,n),r)}function Wo(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new io(dt(e,t[n].anchor),dt(e,t[n].head))},origin:n&&n.origin};return ve(e,"beforeSelectionChange",e,r),e.cm&&ve(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?oo(e.cm,r.ranges,r.ranges.length-1):t}function Bo(e,t,n){var r=e.history.done,i=K(r);i&&i.ranges?(r[r.length-1]=t,jo(e,t,n)):_o(e,t,n)}function _o(e,t,n){jo(e,t,n),Mo(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function jo(e,t,n){(be(e,"beforeSelectionChange")||e.cm&&be(e.cm,"beforeSelectionChange"))&&(t=Wo(e,t,n));var r=n&&n.bias||(ot(t.primary().head,e.sel.primary().head)<0?-1:1);qo(e,Uo(e,t,r,!0)),n&&!1===n.scroll||!e.cm||ai(e.cm)}function qo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,xe(e.cm)),An(e,"cursorActivity",e))}function $o(e){qo(e,Uo(e,e.sel,null,!1))}function Uo(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=Vo(e,a.anchor,l&&l.anchor,n,r),c=Vo(e,a.head,l&&l.head,n,r);(i||s!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new io(s,c))}return i?oo(e.cm,i,t.primIndex):t}function Go(e,t,n,r,i){var o=Ze(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,u="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(c?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(u?l.to>=t.ch:l.to>t.ch))){if(i&&(ve(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var d=s.find(r<0?1:-1),f=void 0;if((r<0?u:c)&&(d=Xo(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(f=ot(d,n))&&(r<0?f<0:f>0))return Go(e,d,t,r,i)}var h=s.find(r<0?-1:1);return(r<0?c:u)&&(h=Xo(e,h,r,h.line==t.line?o:null)),h?Go(e,h,t,r,i):null}}return t}function Vo(e,t,n,r,i){var o=r||1,a=Go(e,t,n,o,i)||!i&&Go(e,t,n,o,!0)||Go(e,t,n,-o,i)||!i&&Go(e,t,n,-o,!0);return a||(e.cantEdit=!0,it(e.first,0))}function Xo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?dt(e,it(t.line-1)):null:n>0&&t.ch==(r||Ze(e,t.line)).text.length?t.line<e.first+e.size-1?it(t.line+1,0):null:new it(t.line,t.ch+n)}function Ko(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),q)}function Zo(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=dt(e,t)),n&&(r.to=dt(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),ve(e,"beforeChange",e,r),e.cm&&ve(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Yo(e,t,n){if(e.cm){if(!e.cm.curOp)return Di(e.cm,Yo)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"))||(t=Zo(e,t,!0),t)){var r=At&&!n&&Bt(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)Jo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Jo(e,t)}}function Jo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=ot(t.from,t.to)){var n=co(e,t);Lo(e,t,n,e.cm?e.cm.curOp.id:NaN),ta(e,t,n,Rt(e,t));var r=[];vo(e,(function(e,n){n||-1!=B(r,e.history)||(aa(e.history,t),r.push(e.history)),ta(e,t,null,Rt(e,t))}))}}function Qo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,l="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,c=0;c<l.length;c++)if(i=l[c],n?i.ranges&&!i.equals(e.sel):!i.ranges)break;if(c!=l.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(i=l.pop(),!i.ranges){if(r)return void l.push(i);break}if(Ao(i,s),n&&!i.equals(e.sel))return void _o(e,i,{clearRedo:!1});a=i}var u=[];Ao(a,s),s.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var d=be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"),f=function(n){var r=i.changes[n];if(r.origin=t,d&&!Zo(e,r,!1))return l.length=0,{};u.push(ko(e,r));var o=n?co(e,r):K(l);ta(e,r,o,Eo(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:lo(r)});var a=[];vo(e,(function(e,t){t||-1!=B(a,e.history)||(aa(e.history,r),a.push(e.history)),ta(e,r,null,Eo(e,r))}))},h=i.changes.length-1;h>=0;--h){var p=f(h);if(p)return p.v}}}}function ea(e,t){if(0!=t&&(e.first+=t,e.sel=new ro(Z(e.sel.ranges,(function(e){return new io(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Pr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Hr(e.cm,r,"gutter")}}function ta(e,t,n,r){if(e.cm&&!e.cm.curOp)return Di(e.cm,ta)(e,t,n,r);if(t.to.line<e.first)ea(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);ea(e,i),t={from:it(e.first,0),to:it(t.to.line+i,t.to.ch),text:[K(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:it(o,Ze(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ye(e,t.from,t.to),n||(n=co(e,t)),e.cm?na(e.cm,t,r):go(e,t,r),jo(e,n,q),e.cantEdit&&Vo(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}}function na(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=et(Yt(Ze(r,o.line))),r.iter(s,a.line+1,(function(e){if(e==i.maxLine)return l=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&xe(e),go(r,t,n,Er(e)),e.options.lineWrapping||(r.iter(s,o.line+t.text.length,(function(e){var t=an(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),Mt(r,o.line),zi(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Pr(e):o.line!=a.line||1!=t.text.length||mo(e.doc,t)?Pr(e,o.line,a.line+1,c):Hr(e,o.line,"text");var u=be(e,"changes"),d=be(e,"change");if(d||u){var f={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&An(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}function ra(e,t,n,r,i){var o;r||(r=n),ot(r,n)<0&&(o=[r,n],n=o[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Yo(e,{from:n,to:r,text:t,origin:i})}function ia(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function oa(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)ia(o.ranges[l].anchor,t,n,r),ia(o.ranges[l].head,t,n,r)}else{for(var s=0;s<o.changes.length;++s){var c=o.changes[s];if(n<c.from.line)c.from=it(c.from.line+r,c.from.ch),c.to=it(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function aa(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;oa(e.done,n,r,i),oa(e.undone,n,r,i)}function la(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Ze(e,ut(e,t)):i=et(t),null==i?null:(r(o,i)&&e.cm&&Hr(e.cm,i,n),o)}function sa(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function ca(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}io.prototype.from=function(){return ct(this.anchor,this.head)},io.prototype.to=function(){return st(this.anchor,this.head)},io.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},sa.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,un(i),An(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},ca.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof sa))){var l=[];this.collapse(l),this.children=[new sa(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l<i.lines.length;){var s=new sa(i.lines.slice(l,l+=25));i.height-=s.height,this.children.splice(++r,0,s),s.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=e.children.splice(e.children.length-5,5),n=new ca(t);if(e.parent){e.size-=n.size,e.height-=n.height;var r=B(e.parent.children,e);e.parent.children.splice(r+1,0,n)}else{var i=new ca(e.children);i.parent=e,e.children=[i,n],e=i}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var ua=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function da(e,t,n){on(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&oi(e,n)}function fa(e,t,n,r){var i=new ua(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),la(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!nn(e,t)){var r=on(t)<e.scrollTop;Qe(t,t.height+jn(i)),r&&oi(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&An(o,"lineWidgetAdded",o,i,"number"==typeof t?t:et(t)),i}ua.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=et(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=jn(this);Qe(n,Math.max(0,n.height-o)),e&&(Oi(e,(function(){da(e,n,-o),Hr(e,r,"widget")})),An(e,"lineWidgetCleared",e,this,r))}},ua.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=jn(this)-t;i&&(nn(this.doc,r)||Qe(r,r.height+i),n&&Oi(n,(function(){n.curOp.forceUpdate=!0,da(n,r,i),An(n,"lineWidgetChanged",n,e,et(r))})))},we(ua);var ha=0,pa=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ha};function ma(e,t,n,r,i){if(r&&r.shared)return va(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Di(e.cm,ma)(e,t,n,r,i);var o=new pa(e,i),a=ot(t,n);if(r&&H(r,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=O("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Zt(e,t.line,t,n,o)||t.line!=n.line&&Zt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Dt()}o.addToHistory&&Lo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,s=t.line,c=e.cm;if(e.iter(s,n.line+1,(function(e){c&&o.collapsed&&!c.options.lineWrapping&&Yt(e)==c.display.maxLine&&(l=!0),o.collapsed&&s!=t.line&&Qe(e,0),It(e,new Et(o,s==t.line?t.ch:null,s==n.line?n.ch:null)),++s})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){nn(e,t)&&Qe(t,0)})),o.clearOnEnter&&pe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Ot(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ha,o.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),o.collapsed)Pr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)Hr(c,u,"text");o.atomic&&$o(c.doc),An(c,"markerAdded",c,o)}return o}pa.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&ki(e),be(this,"clear")){var n=this.find();n&&An(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=Ft(a.markedSpans,this);e&&!this.collapsed?Hr(e,et(a),"text"):e&&(null!=l.to&&(i=et(a)),null!=l.from&&(r=et(a))),a.markedSpans=zt(a.markedSpans,l),null==l.from&&this.collapsed&&!nn(this.doc,a)&&e&&Qe(a,Ar(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=Yt(this.lines[s]),u=an(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Pr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&$o(e.doc)),e&&An(e,"markerCleared",e,this,r,i),t&&Si(e),this.parent&&this.parent.clear()}},pa.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=Ft(o.markedSpans,this);if(null!=a.from&&(n=it(t?o:et(o),a.from),-1==e))return n;if(null!=a.to&&(r=it(t?o:et(o),a.to),1==e))return r}return n&&{from:n,to:r}},pa.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Oi(r,(function(){var i=t.line,o=et(t.line),a=er(r,o);if(a&&(cr(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!nn(n.doc,i)&&null!=n.height){var l=n.height;n.height=null;var s=jn(n)-l;s&&Qe(i,i.height+s)}An(r,"markerChanged",r,e)}))},pa.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=B(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},pa.prototype.detachLine=function(e){if(this.lines.splice(B(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},we(pa);var ga=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function va(e,t,n,r,i){r=H(r),r.shared=!1;var o=[ma(e,t,n,r,i)],a=o[0],l=r.widgetNode;return vo(e,(function(e){l&&(r.widgetNode=l.cloneNode(!0)),o.push(ma(e,dt(e,t),dt(e,n),r,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=K(o)})),new ga(o,a)}function ya(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine())),(function(e){return e.parent}))}function xa(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(ot(o,a)){var l=ma(e,o,a,r.primary,r.primary.type);r.markers.push(l),l.parent=r}}}function ba(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];vo(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==B(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}ga.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();An(this,"clear")}},ga.prototype.find=function(e,t){return this.primary.find(e,t)},we(ga);var wa=0,ka=function(e,t,n,r,i){if(!(this instanceof ka))return new ka(e,t,n,r,i);null==n&&(n=0),ca.call(this,[new sa([new sn("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=it(n,0);this.sel=ao(o),this.history=new wo(null),this.id=++wa,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),go(this,{from:o,to:o,text:e}),_o(this,ao(o),q)};ka.prototype=Q(ca.prototype,{constructor:ka,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Je(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Fi((function(e){var t=it(this.first,0),n=this.first+this.size-1;Yo(this,{from:t,to:it(n,Ze(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&li(this.cm,0,0),_o(this,ao(t),q)})),replaceRange:function(e,t,n,r){t=dt(this,t),n=n?dt(this,n):t,ra(this,e,t,n,r)},getRange:function(e,t,n){var r=Ye(this,dt(this,e),dt(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(nt(this,e))return Ze(this,e)},getLineNumber:function(e){return et(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ze(this,e)),Yt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return dt(this,e)},getCursor:function(e){var t,n=this.sel.primary();return t=null==e||"head"==e?n.head:"anchor"==e?n.anchor:"end"==e||"to"==e||!1===e?n.to():n.from(),t},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Fi((function(e,t,n){Ro(this,dt(this,"number"==typeof e?it(e,t||0):e),null,n)})),setSelection:Fi((function(e,t,n){Ro(this,dt(this,e),dt(this,t||e),n)})),extendSelection:Fi((function(e,t,n){Io(this,dt(this,e),t&&dt(this,t),n)})),extendSelections:Fi((function(e,t){Po(this,ht(this,e),t)})),extendSelectionsBy:Fi((function(e,t){var n=Z(this.sel.ranges,e);Po(this,ht(this,n),t)})),setSelections:Fi((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new io(dt(this,e[i].anchor),dt(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),_o(this,oo(this.cm,r,t),n)}})),addSelection:Fi((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new io(dt(this,e),dt(this,t||e))),_o(this,oo(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=Ye(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Ye(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Fi((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var l=t&&"end"!=t&&fo(this,r,t),s=r.length-1;s>=0;s--)Yo(this,r[s]);l?Bo(this,l):this.cm&&ai(this.cm)})),undo:Fi((function(){Qo(this,"undo")})),redo:Fi((function(){Qo(this,"redo")})),undoSelection:Fi((function(){Qo(this,"undo",!0)})),redoSelection:Fi((function(){Qo(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new wo(this.history.maxGeneration),vo(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:Fo(this.history.done),undone:Fo(this.history.undone)}},setHistory:function(e){var t=this.history=new wo(this.history.maxGeneration);t.done=Fo(e.done.slice(0),null,!0),t.undone=Fo(e.undone.slice(0),null,!0)},setGutterMarker:Fi((function(e,t,n){return la(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&re(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:Fi((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&la(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,re(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!nt(this,e))return null;if(t=e,e=Ze(this,e),!e)return null}else if(t=et(e),null==t)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:Fi((function(e,t,n){return la(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(C(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:Fi((function(e,t,n){return la(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(C(n));if(!o)return!1;var a=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:Fi((function(e,t,n){return fa(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return ma(this,dt(this,e),dt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=dt(this,e),ma(this,e,e,n,"bookmark")},findMarksAt:function(e){e=dt(this,e);var t=[],n=Ze(this,e.line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(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,n){e=dt(this,e),t=dt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&i==e.line&&e.ch>=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),dt(this,it(n,t))},indexFromPos:function(e){e=dt(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new ka(Je(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new ka(Je(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],xa(r,ya(this)),r},unlinkDoc:function(e){if(e instanceof Pl&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var n=this.linked[t];if(n.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),ba(ya(this));break}}if(e.history==this.history){var r=[e.id];vo(e,(function(e){return r.push(e.id)}),!0),e.history=new wo(null),e.history.done=Fo(this.history.done,r),e.history.undone=Fo(this.history.undone,r)}},iterLinkedDocs:function(e){vo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Fe(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Fi((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&bo(this.cm))}))}),ka.prototype.eachLine=ka.prototype.iter;var Sa=0;function Ca(e){var t=this;if(Ma(t),!ye(t,e)&&!qn(t.display,e)){ke(e),a&&(Sa=+new Date);var n=zr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),l=0,s=function(){++l==i&&Di(t,(function(){n=dt(t.doc,n);var e={from:n,to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};Yo(t.doc,e),Bo(t.doc,ao(dt(t.doc,n),dt(t.doc,lo(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==B(t.options.allowDropFileTypes,e.type))s();else{var r=new FileReader;r.onerror=function(){return s()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),s()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-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 f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),jo(t.doc,ao(n,n)),f)for(var h=0;h<f.length;++h)ra(t.doc,"",f[h].anchor,f[h].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function La(e,t){if(a&&(!e.state.draggingText||+new Date-Sa<100))Le(t);else if(!ye(e,t)&&!qn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var n=N("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}function Ta(e,t){var n=zr(e,t);if(n){var r=document.createDocumentFragment();$r(e,n,r),e.display.dragCursor||(e.display.dragCursor=N("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),A(e.display.dragCursor,r)}}function Ma(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Aa(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Na=!1;function Oa(){Na||(Da(),Na=!0)}function Da(){var e;pe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Aa(Ea)}),100))})),pe(window,"blur",(function(){return Aa(Yr)}))}function Ea(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Fa={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:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},za=0;za<10;za++)Fa[za+48]=Fa[za+96]=String(za);for(var Ia=65;Ia<=90;Ia++)Fa[Ia]=String.fromCharCode(Ia);for(var Pa=1;Pa<=12;Pa++)Fa[Pa+111]=Fa[Pa+63235]="F"+Pa;var Ha={};function Ra(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var l=o[a];if(/^(cmd|meta|m)$/i.test(l))i=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Wa(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Z(n.split(" "),Ra),o=0;o<i.length;o++){var a=void 0,l=void 0;o==i.length-1?(l=i.join(" "),a=r):(l=i.slice(0,o+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Ba(e,t,n,r){t=$a(t);var i=t.call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Ba(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=Ba(e,t.fallthrough[o],n,r);if(a)return a}}}function _a(e){var t="string"==typeof e?e:Fa[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function ja(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(k?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(k?t.ctrlKey:t.metaKey)&&"Cmd"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function qa(e,t){if(d&&34==e.keyCode&&e["char"])return!1;var n=Fa[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),ja(n,e,t))}function $a(e){return"string"==typeof e?Ha[e]:e}function Ua(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){var o=t(n[i]);while(r.length&&ot(o.from,K(r).to)<=0){var a=r.pop();if(ot(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}Oi(e,(function(){for(var t=r.length-1;t>=0;t--)ra(e.doc,"",r[t].from,r[t].to,"+delete");ai(e)}))}function Ga(e,t,n){var r=ae(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Va(e,t,n){var r=Ga(e,t.ch,n);return null==r?null:new it(t.line,r,n<0?"after":"before")}function Xa(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=fe(n,t.doc.direction);if(o){var a,l=i<0?K(o):o[0],s=i<0==(1==l.level),c=s?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var u=tr(t,n);a=i<0?n.text.length-1:0;var d=nr(t,u,a).top;a=le((function(e){return nr(t,u,e).top==d}),i<0==(1==l.level)?l.from:l.to-1,a),"before"==c&&(a=Ga(n,a,1))}else a=i<0?l.to:l.from;return new it(r,a,c)}}return new it(r,i<0?n.text.length:0,i<0?"before":"after")}function Ka(e,t,n,r){var i=fe(t,e.doc.direction);if(!i)return Va(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ue(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return Va(t,n,r);var l,s=function(e,n){return Ga(t,e instanceof it?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(l=l||tr(e,t),Sr(e,t,l,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?s(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==r<0,f=s(n,d?1:-1);if(null!=f&&(d?f<=a.to&&f<=u.end:f>=a.from&&f>=u.begin)){var h=d?"before":"after";return new it(n.line,f,h)}}var p=function(e,t,r){for(var o=function(e,t){return t?new it(n.line,s(e,1),"before"):new it(n.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],l=t>0==(1!=a.level),c=l?r.begin:s(r.end,-1);if(a.from<=c&&c<a.to)return o(c,l);if(c=l?a.from:s(a.to,-1),r.begin<=c&&c<r.end)return o(c,l)}},m=p(o+r,r,u);if(m)return m;var g=r>0?u.end:s(u.begin,-1);return null==g||r>0&&g==t.text.length||(m=p(r>0?0:i.length-1,r,c(g)),!m)?null:m}Ha.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"},Ha.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"},Ha.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"},Ha.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"]},Ha["default"]=y?Ha.macDefault:Ha.pcDefault;var Za={selectAll:Ko,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),q)},killLine:function(e){return Ua(e,(function(t){if(t.empty()){var n=Ze(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:it(t.head.line+1,0)}:{from:t.head,to:it(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Ua(e,(function(t){return{from:it(t.from().line,0),to:dt(e.doc,it(t.to().line+1,0))}}))},delLineLeft:function(e){return Ua(e,(function(e){return{from:it(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Ua(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return{from:r,to:t.from()}}))},delWrappedLineRight:function(e){return Ua(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(it(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(it(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return Ya(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return Qa(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return Ja(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),U)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),U)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?Qa(e,t.head):r}),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,"char")},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=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=R(e.getLine(o.line),o.ch,r);t.push(X(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Oi(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=Ze(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new it(i.line,i.ch-1)),i.ch>0)i=new it(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),it(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ze(e.doc,i.line-1).text;a&&(i=new it(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),it(i.line-1,a.length-1),i,"+transpose"))}n.push(new io(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Oi(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);ai(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Ya(e,t){var n=Ze(e.doc,t),r=Yt(n);return r!=n&&(t=et(r)),Xa(!0,e,r,t,1)}function Ja(e,t){var n=Ze(e.doc,t),r=Jt(n);return r!=n&&(t=et(r)),Xa(!0,e,n,t,-1)}function Qa(e,t){var n=Ya(e,t.line),r=Ze(e.doc,n.line),i=fe(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return it(n.line,a?0:o,n.sticky)}return n}function el(e,t,n){if("string"==typeof t&&(t=Za[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=j}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function tl(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Ba(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Ba(t,e.options.extraKeys,n,e)||Ba(t,e.options.keyMap,n,e)}var nl=new W;function rl(e,t,n,r){var i=e.state.keySeq;if(i){if(_a(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:nl.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),il(e,i+" "+t,n,r))return!0}return il(e,t,n,r)}function il(e,t,n,r){var i=tl(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&An(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(ke(n),Vr(e)),!!i}function ol(e,t){var n=qa(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?rl(e,"Shift-"+n,t,(function(t){return el(e,t,!0)}))||rl(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return el(e,t)})):rl(e,n,t,(function(t){return el(e,t)})))}function al(e,t,n){return rl(e,"'"+n+"'",t,(function(t){return el(e,t,!0)}))}var ll=null;function sl(e){var t=this;if(t.curOp.focus=E(),!ye(t,e)){a&&l<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=ol(t,e);d&&(ll=i?r:null,i||88!=r||Ie||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||cl(t)}}function cl(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(T(t,"CodeMirror-crosshair"),ge(document,"keyup",n),ge(document,"mouseover",n))}F(t,"CodeMirror-crosshair"),pe(document,"keyup",n),pe(document,"mouseover",n)}function ul(e){16==e.keyCode&&(this.doc.sel.shift=!1),ye(this,e)}function dl(e){var t=this;if(!(qn(t.display,e)||ye(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==ll)return ll=null,void ke(e);if(!d||e.which&&!(e.which<10)||!ol(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(al(t,e,i)||t.display.input.onKeyPress(e))}}}var fl,hl,pl=400,ml=function(e,t,n){this.time=e,this.pos=t,this.button=n};function gl(e,t){var n=+new Date;return hl&&hl.compare(n,e,t)?(fl=hl=null,"triple"):fl&&fl.compare(n,e,t)?(hl=new ml(n,e,t),fl=null,"double"):(fl=new ml(n,e,t),hl=null,"single")}function vl(e){var t=this,n=t.display;if(!(ye(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,qn(n,e))s||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Tl(t,e)){var r=zr(t,e),i=Me(e),o=r?gl(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&yl(t,i,r,o,e)||(1==i?r?bl(t,r,o,e):Te(e)==n.scroller&&ke(e):2==i?(r&&Io(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(S?t.display.input.onContextMenu(e):Kr(t)))}}function yl(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),o=(1==t?"Left":2==t?"Middle":"Right")+o,rl(e,ja(o,i),i,(function(t){if("string"==typeof t&&(t=Za[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=j}finally{e.state.suppressEdits=!1}return r}))}function xl(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=x?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=y?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(y?n.altKey:n.ctrlKey)),i}function bl(e,t,n,r){a?setTimeout(P(Xr,e),0):e.curOp.focus=E();var i,o=xl(e,n,r),l=e.doc.sel;e.options.dragDrop&&Oe&&!e.isReadOnly()&&"single"==n&&(i=l.contains(t))>-1&&(ot((i=l.ranges[i]).from(),t)<0||t.xRel>0)&&(ot(i.to(),t)>0||t.xRel<0)?wl(e,r,t,o):Sl(e,r,t,o)}function wl(e,t,n,r){var i=e.display,o=!1,c=Di(e,(function(t){s&&(i.scroller.draggable=!1),e.state.draggingText=!1,ge(i.wrapper.ownerDocument,"mouseup",c),ge(i.wrapper.ownerDocument,"mousemove",u),ge(i.scroller,"dragstart",d),ge(i.scroller,"drop",c),o||(ke(t),r.addNew||Io(e.doc,n,null,null,r.extend),s||a&&9==l?setTimeout((function(){i.wrapper.ownerDocument.body.focus(),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};s&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),pe(i.wrapper.ownerDocument,"mouseup",c),pe(i.wrapper.ownerDocument,"mousemove",u),pe(i.scroller,"dragstart",d),pe(i.scroller,"drop",c),Kr(e),setTimeout((function(){return i.input.focus()}),20)}function kl(e,t,n){if("char"==n)return new io(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new io(it(t.line,0),dt(e.doc,it(t.line+1,0)));var r=n(e,t);return new io(r.from,r.to)}function Sl(e,t,n,r){var i=e.display,o=e.doc;ke(t);var a,l,s=o.sel,c=s.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),a=l>-1?c[l]:new io(n,n)):(a=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new io(n,n)),n=zr(e,t,!0,!0),l=-1;else{var u=kl(e,n,r.unit);a=r.extend?zo(a,u.anchor,u.head,r.extend):u}r.addNew?-1==l?(l=c.length,_o(o,oo(e,c.concat([a]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"char"==r.unit&&!r.extend?(_o(o,oo(e,c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):Ho(o,l,a,$):(l=0,_o(o,new ro([a],0),$),s=o.sel);var d=n;function f(t){if(0!=ot(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,u=R(Ze(o,n.line).text,n.ch,c),f=R(Ze(o,t.line).text,t.ch,c),h=Math.min(u,f),p=Math.max(u,f),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ze(o,m).text,y=G(v,h,c);h==p?i.push(new io(it(m,y),it(m,y))):v.length>y&&i.push(new io(it(m,y),it(m,G(v,p,c))))}i.length||i.push(new io(n,n)),_o(o,oo(e,s.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,b=a,w=kl(e,t,r.unit),k=b.anchor;ot(w.anchor,k)>0?(x=w.head,k=ct(b.from(),w.anchor)):(x=w.anchor,k=st(b.to(),w.head));var S=s.ranges.slice(0);S[l]=Cl(e,new io(dt(o,k),x)),_o(o,oo(e,S,l),$)}}var h=i.wrapper.getBoundingClientRect(),p=0;function m(t){var n=++p,a=zr(e,t,!0,"rectangle"==r.unit);if(a)if(0!=ot(a,d)){e.curOp.focus=E(),f(a);var l=ei(i,o);(a.line>=l.to||a.line<l.from)&&setTimeout(Di(e,(function(){p==n&&m(t)})),150)}else{var s=t.clientY<h.top?-20:t.clientY>h.bottom?20:0;s&&setTimeout(Di(e,(function(){p==n&&(i.scroller.scrollTop+=s,m(t))})),50)}}function g(t){e.state.selectingText=!1,p=1/0,t&&(ke(t),i.input.focus()),ge(i.wrapper.ownerDocument,"mousemove",v),ge(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var v=Di(e,(function(e){0!==e.buttons&&Me(e)?m(e):g(e)})),y=Di(e,g);e.state.selectingText=y,pe(i.wrapper.ownerDocument,"mousemove",v),pe(i.wrapper.ownerDocument,"mouseup",y)}function Cl(e,t){var n=t.anchor,r=t.head,i=Ze(e.doc,n.line);if(0==ot(n,r)&&n.sticky==r.sticky)return t;var o=fe(i);if(!o)return t;var a=ue(o,n.ch,n.sticky),l=o[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s,c=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)s=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ue(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==l.level?-1:1);s=u==c-1||u==c?d<0:d>0}var f=o[c+(s?-1:0)],h=s==(1==f.level),p=h?f.from:f.to,m=h?"after":"before";return n.ch==p&&n.sticky==m?t:new io(new it(n.line,p,m),r)}function Ll(e,t,n,r){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(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ke(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!be(e,n))return Ce(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=i){var u=tt(e.doc,o),d=e.display.gutterSpecs[s];return ve(e,n,e,u,d.className,t),Ce(t)}}}function Tl(e,t){return Ll(e,t,"gutterClick",!0)}function Ml(e,t){qn(e.display,t)||Al(e,t)||ye(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function Al(e,t){return!!be(e,"gutterContextMenu")&&Ll(e,t,"gutterContextMenu",!1)}function Nl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),dr(e)}ml.prototype.compare=function(e,t,n){return this.time+pl>e&&0==ot(t,this.pos)&&n==this.button};var Ol={toString:function(){return"CodeMirror.Init"}},Dl={},El={};function Fl(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ol&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ol,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,ho(e)}),!0),n("indentUnit",2,ho,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){po(e),dr(e),Pr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=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,n.push(it(r,o))}r++}));for(var i=n.length-1;i>=0;i--)ra(e.doc,t,n[i],it(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ol&&e.refresh()})),n("specialCharPlaceholder",mn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!b),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Nl(e),Zi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=$a(t),i=n!=Ol&&$a(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Il,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Xi(t,e.options.lineNumbers),Zi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Dr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return vi(e)}),!0),n("scrollbarStyle","native",(function(e){bi(e),vi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Xi(e.options.gutters,t),Zi(e)}),!0),n("firstLineNumber",1,Zi,!0),n("lineNumberFormatter",(function(e){return e}),Zi,!0),n("showCursorWhenSelecting",!1,jr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Yr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,zl),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,jr,!0),n("singleCursorHeightPerLine",!0,jr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,po,!0),n("addModeClass",!1,po,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,po,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function zl(e,t,n){var r=n&&n!=Ol;if(!t!=!r){var i=e.display.dragFunctions,o=t?pe:ge;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Il(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),ln(e)),Fr(e),Pr(e),dr(e),setTimeout((function(){return vi(e)}),100)}function Pl(e,t){var n=this;if(!(this instanceof Pl))return new Pl(e,t);this.options=t=t?H(t):{},H(Dl,t,!1);var r=t.value;"string"==typeof r?r=new ka(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Pl.inputStyles[t.inputStyle](this),o=this.display=new Yi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,Nl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),bi(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 W,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&l<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Hl(this),Oa(),ki(this),this.curOp.forceUpdate=!0,yo(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout(P(Zr,this),20):Yr(this),El)El.hasOwnProperty(c)&&El[c](this,t[c],Ol);Vi(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Rl.length;++u)Rl[u](this);Si(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Hl(e){var t=e.display;pe(t.scroller,"mousedown",Di(e,vl)),pe(t.scroller,"dblclick",a&&l<11?Di(e,(function(t){if(!ye(e,t)){var n=zr(e,t);if(n&&!Tl(e,t)&&!qn(e.display,t)){ke(t);var r=e.findWordAt(n);Io(e.doc,r.anchor,r.head)}}})):function(t){return ye(e,t)||ke(t)}),pe(t.scroller,"contextmenu",(function(t){return Ml(e,t)})),pe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Ml(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),r=t.activeTouch,r.end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function s(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}pe(t.scroller,"touchstart",(function(i){if(!ye(e,i)&&!o(i)&&!Tl(e,i)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!qn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!r.prev||s(r,r.prev)?new io(a,a):!r.prev.prev||s(r,r.prev.prev)?e.findWordAt(a):new io(it(a.line,0),dt(e.doc,it(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),ke(n)}i()})),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(di(e,t.scroller.scrollTop),hi(e,t.scroller.scrollLeft,!0),ve(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return no(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return no(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||Le(t)},over:function(t){ye(e,t)||(Ta(e,t),Le(t))},start:function(t){return La(e,t)},drop:Di(e,Ca),leave:function(t){ye(e,t)||Ma(e)}};var c=t.input.getField();pe(c,"keyup",(function(t){return ul.call(e,t)})),pe(c,"keydown",Di(e,sl)),pe(c,"keypress",Di(e,dl)),pe(c,"focus",(function(t){return Zr(e,t)})),pe(c,"blur",(function(t){return Yr(e,t)}))}Pl.defaults=Dl,Pl.optionHandlers=El;var Rl=[];function Wl(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=yt(e,t).state:n="prev");var a=e.options.tabSize,l=Ze(o,t),s=R(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&(c=o.mode.indent(i,l.text.slice(u.length),l.text),c==j||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?R(Ze(o,t-1).text,null,a):0:"add"==n?c=s+e.options.indentUnit:"subtract"==n?c=s-e.options.indentUnit:"number"==typeof n&&(c=s+n),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)f+=a,d+="\t";if(f<c&&(d+=X(c-f)),d!=u)return ra(o,d,it(t,0),it(t,u.length),"+input"),l.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==t&&m.head.ch<u.length){var g=it(t,u.length);Ho(o,p,new io(g,g));break}}}Pl.defineInitHook=function(e){return Rl.push(e)};var Bl=null;function _l(e){Bl=e}function jl(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=+new Date-200,l="paste"==i||e.state.pasteIncoming>a,s=Fe(t),c=null;if(l&&r.ranges.length>1)if(Bl&&Bl.text.join("\n")==t){if(r.ranges.length%Bl.text.length==0){c=[];for(var u=0;u<Bl.text.length;u++)c.push(o.splitLines(Bl.text[u]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=Z(s,(function(e){return[e]})));for(var d=e.curOp.updateInput,f=r.ranges.length-1;f>=0;f--){var h=r.ranges[f],p=h.from(),m=h.to();h.empty()&&(n&&n>0?p=it(p.line,p.ch-n):e.state.overwrite&&!l?m=it(m.line,Math.min(Ze(o,m.line).text.length,m.ch+K(s).length)):l&&Bl&&Bl.lineWise&&Bl.text.join("\n")==t&&(p=m=it(p.line,0)));var g={from:p,to:m,text:c?c[f%c.length]:s,origin:i||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Yo(e.doc,g),An(e,"inputRead",e,g)}t&&!l&&$l(e,t),ai(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function ql(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Oi(t,(function(){return jl(t,n,0,null,"paste")})),!0}function $l(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Wl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ze(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Wl(e,i.head.line,"smart"));a&&An(e,"electricInput",e,i.head.line)}}}function Ul(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:it(i,0),head:it(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Gl(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Vl(){var e=N("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=N("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),Gl(e),t}function Xl(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Di(this,t[e])(this,n,i),ve(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"]($a(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Ei((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");Y(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,Pr(this)})),removeOverlay:Ei((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void Pr(this)}})),indentLine:Ei((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),nt(this.doc,e)&&Wl(this,e,t,n)})),indentSelection:Ei((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Wl(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&ai(this));else{var o=i.from(),a=i.to(),l=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<n;++s)Wl(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&Ho(this.doc,r,new io(o,c[r].to()),q)}}})),getTokenAt:function(e,t){return St(this,e,t)},getLineTokens:function(e,t){return St(this,it(e),t,!0)},getTokenTypeAt:function(e){e=dt(this.doc,e);var t,n=vt(this,Ze(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var l=i[o[t][a]];l&&r.push(l)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var s=0;s<i._global.length;s++){var c=i._global[s];c.pred(o,this)&&-1==B(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return e=ut(n,null==e?n.first+n.size-1:e),yt(this,e+1,t).state},cursorCoords:function(e,t){var n,r=this.doc.sel.primary();return n=null==e?r.head:"object"==typeof e?dt(this.doc,e):e?r.from():r.to(),yr(this,n,t||"page")},charCoords:function(e,t){return vr(this,dt(this.doc,e),t||"page")},coordsChar:function(e,t){return e=gr(this,e,t||"page"),wr(this,e.left,e.top)},lineAtHeight:function(e,t){return e=gr(this,{top:e,left:0},t||"page").top,tt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,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),r=Ze(this.doc,e)}else r=e;return mr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-on(r):0)},defaultTextHeight:function(){return Ar(this.display)},defaultCharWidth:function(){return Nr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=yr(this,dt(this.doc,e));var a=e.bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&ri(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Ei(sl),triggerOnKeyPress:Ei(dl),triggerOnKeyUp:ul,triggerOnMouseDown:Ei(vl),execCommand:function(e){if(Za.hasOwnProperty(e))return Za[e].call(null,this)},triggerElectric:Ei((function(e){$l(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=dt(this.doc,e),a=0;a<t;++a)if(o=Kl(this.doc,o,i,n,r),o.hitSide)break;return o},moveH:Ei((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Kl(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),U)})),deleteH:Ei((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Ua(this,(function(n){var i=Kl(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=dt(this.doc,e),l=0;l<t;++l){var s=yr(this,a,"div");if(null==o?o=s.left:s.left=o,a=Zl(this,s,i,n),a.hitSide)break}return a},moveV:Ei((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var l=yr(n,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=Zl(n,l,e,t);return"page"==t&&a==r.sel.primary()&&oi(n,vr(n,s,"div").top-l.top),s}),U),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=this.doc,n=Ze(t,e.line).text,r=e.ch,i=e.ch;if(n){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=n.length||!r?++i:--r;var a=n.charAt(r),l=ne(a,o)?function(e){return ne(e,o)}:/\s/.test(a)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ne(e)};while(r>0&&l(n.charAt(r-1)))--r;while(i<n.length&&l(n.charAt(i)))++i}return new io(it(e.line,r),it(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?F(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),ve(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==E()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Ei((function(e,t){li(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Vn(this)-this.display.barHeight,width:e.scrollWidth-Vn(this)-this.display.barWidth,clientHeight:Kn(this),clientWidth:Xn(this)}},scrollIntoView:Ei((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:it(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?si(this,e):ui(this,e.from,e.to,e.margin)})),setSize:Ei((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&ur(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){Hr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,ve(this,"refresh",this)})),operation:function(e){return Oi(this,e)},startOperation:function(){return ki(this)},endOperation:function(){return Si(this)},refresh:Ei((function(){var e=this.display.cachedTextHeight;Pr(this),this.curOp.forceUpdate=!0,dr(this),li(this,this.doc.scrollLeft,this.doc.scrollTop),$i(this.display),(null==e||Math.abs(e-Ar(this.display))>.5||this.options.lineWrapping)&&Fr(this),ve(this,"refresh",this)})),swapDoc:Ei((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),yo(this,e),dr(this),this.display.input.reset(),li(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,An(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}},we(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function Kl(e,t,n,r,i){var o=t,a=n,l=Ze(e,t.line),s=i&&"rtl"==e.direction?-n:n;function c(){var n=t.line+s;return!(n<e.first||n>=e.first+e.size)&&(t=new it(n,t.ch,t.sticky),l=Ze(e,n))}function u(r){var o;if(o=i?Ka(e.cm,l,t,n):Va(l,t,n),null==o){if(r||!c())return!1;t=Xa(i,e.cm,l,t.line,s)}else t=o;return!0}if("char"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var d=null,f="group"==r,h=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;;p=!1){if(n<0&&!u(!p))break;var m=l.text.charAt(t.ch)||"\n",g=ne(m,h)?"w":f&&"\n"==m?"n":!f||/\s/.test(m)?null:"p";if(!f||p||g||(g="s"),d&&d!=g){n<0&&(n=1,u(),t.sticky="after");break}if(g&&(d=g),n>0&&!u(!p))break}var v=Vo(e,t,o,a,!0);return at(o,v)&&(v.hitSide=!0),v}function Zl(e,t,n,r){var i,o,a=e.doc,l=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(s-.5*Ar(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){if(o=wr(e,l,i),!o.outside)break;if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Yl=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new W,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Jl(e,t){var n=er(e,t.line);if(!n||n.hidden)return null;var r=Ze(e.doc,t.line),i=Yn(n,r,t.line),o=fe(r,e.doc.direction),a="left";if(o){var l=ue(o,t.ch);a=l%2?"right":"left"}var s=or(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ql(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function es(e,t){return t&&(e.bad=!0),e}function ts(e,t,n,r,i){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function c(e){return function(t){return t.id==e}}function u(){a&&(o+=l,s&&(o+=l),a=s=!1)}function d(e){e&&(u(),o+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void d(n);var o,h=t.getAttribute("cm-marker");if(h){var p=e.findMarks(it(r,0),it(i+1,0),c(+h));return void(p.length&&(o=p[0].find(0))&&d(Ye(e.doc,o.from,o.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&u();for(var g=0;g<t.childNodes.length;g++)f(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(s=!0),m&&(a=!0)}else 3==t.nodeType&&d(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;;){if(f(t),t==n)break;t=t.nextSibling,s=!1}return o}function ns(e,t,n){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[n],!r)return es(e.clipPos(it(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return rs(o,t,n)}}function rs(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!D(r,t))return es(it(et(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?K(e.rest):e.line;return es(it(et(o),o.text.length),i)}var a=3==t.nodeType?t:null,l=t;a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));while(l.parentNode!=r)l=l.parentNode;var s=e.measure,c=s.maps;function u(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?s.map:c[i],a=0;a<o.length;a+=3){var l=o[a+2];if(l==t||l==n){var u=et(i<0?e.line:e.rest[i]),d=o[a]+r;return(r<0||l!=t)&&(d=o[a+(r?1:0)]),it(u,d)}}}var d=u(a,l,n);if(d)return es(d,i);for(var f=l.nextSibling,h=a?a.nodeValue.length-n:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0),d)return es(it(d.line,d.ch-h),i);h+=f.textContent.length}for(var p=l.previousSibling,m=n;p;p=p.previousSibling){if(d=u(p,p.firstChild,-1),d)return es(it(d.line,d.ch+m),i);m+=p.textContent.length}}Yl.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){if(!ye(r,e)){if(r.somethingSelected())_l({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Ul(r);_l({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,q),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var o=Bl.text.join("\n");if(e.clipboardData.setData("Text",o),e.clipboardData.getData("Text")==o)return void e.preventDefault()}var a=Vl(),l=a.firstChild;r.display.lineSpace.insertBefore(a,r.display.lineSpace.firstChild),l.value=Bl.text.join("\n");var s=document.activeElement;I(l),setTimeout((function(){r.display.lineSpace.removeChild(a),s.focus(),s==i&&n.showPrimarySelection()}),50)}}Gl(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),pe(i,"paste",(function(e){ye(r,e)||ql(e,r)||l<=11&&setTimeout(Di(r,(function(){return t.updateFromDOM()})),20)})),pe(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),pe(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),pe(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),pe(i,"touchstart",(function(){return n.forceCompositionEnd()})),pe(i,"input",(function(){t.composing||t.readFromDOMSoon()})),pe(i,"copy",o),pe(i,"cut",o)},Yl.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Yl.prototype.prepareSelection=function(){var e=qr(this.cm,!1);return e.focus=document.activeElement==this.div,e},Yl.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Yl.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Yl.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=ns(t,e.anchorNode,e.anchorOffset),l=ns(t,e.focusNode,e.focusOffset);if(!a||a.bad||!l||l.bad||0!=ot(ct(a,l),i)||0!=ot(st(a,l),o)){var s=t.display.view,c=i.line>=t.display.viewFrom&&Jl(t,i)||{node:s[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&Jl(t,o);if(!u){var d=s[s.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(c&&u){var h,p=e.rangeCount&&e.getRangeAt(0);try{h=L(c.node,c.offset,u.offset,u.node)}catch(m){}h&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),p&&null==e.anchorNode?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Yl.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)},Yl.prototype.showMultipleSelections=function(e){A(this.cm.display.cursorDiv,e.cursors),A(this.cm.display.selectionDiv,e.selection)},Yl.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Yl.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return D(this.div,t)},Yl.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Yl.prototype.blur=function(){this.div.blur()},Yl.prototype.getField=function(){return this.div},Yl.prototype.supportsTouch=function(){return!0},Yl.prototype.receivedFocus=function(){var e=this;function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.selectionInEditor()?this.pollSelection():Oi(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,t)},Yl.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Yl.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&&Ql(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=ns(t,e.anchorNode,e.anchorOffset),r=ns(t,e.focusNode,e.focusOffset);n&&r&&Oi(t,(function(){_o(t.doc,ao(n,r),q),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Yl.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),l=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=it(a.line-1,Ze(r.doc,a.line-1).length)),l.ch==Ze(r.doc,l.line).text.length&&l.line<r.lastLine()&&(l=it(l.line+1,0)),a.line<i.viewFrom||l.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=Ir(r,a.line))?(t=et(i.view[0].line),n=i.view[0].node):(t=et(i.view[e].line),n=i.view[e-1].node.nextSibling);var s,c,u=Ir(r,l.line);if(u==i.view.length-1?(s=i.viewTo-1,c=i.lineDiv.lastChild):(s=et(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;var d=r.doc.splitLines(ts(r,n,c,t,s)),f=Ye(r.doc,it(t,0),it(s,Ze(r.doc,s).text.length));while(d.length>1&&f.length>1)if(K(d)==K(f))d.pop(),f.pop(),s--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}var h=0,p=0,m=d[0],g=f[0],v=Math.min(m.length,g.length);while(h<v&&m.charCodeAt(h)==g.charCodeAt(h))++h;var y=K(d),x=K(f),b=Math.min(y.length-(1==d.length?h:0),x.length-(1==f.length?h:0));while(p<b&&y.charCodeAt(y.length-p-1)==x.charCodeAt(x.length-p-1))++p;if(1==d.length&&1==f.length&&t==a.line)while(h&&h>a.ch&&y.charCodeAt(y.length-p-1)==x.charCodeAt(x.length-p-1))h--,p++;d[d.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var w=it(t,h),k=it(s,f.length?K(f).length-p:0);return d.length>1||d[0]||ot(w,k)?(ra(r.doc,d,w,k,"+input"),!0):void 0},Yl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Yl.prototype.reset=function(){this.forceCompositionEnd()},Yl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Yl.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))},Yl.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Oi(this.cm,(function(){return Pr(e.cm)}))},Yl.prototype.setUneditable=function(e){e.contentEditable="false"},Yl.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Di(this.cm,jl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Yl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Yl.prototype.onContextMenu=function(){},Yl.prototype.resetPosition=function(){},Yl.prototype.needsContentAttribute=!0;var is=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new W,this.hasSelection=!1,this.composing=null};function os(e,t){if(t=t?H(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=E();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=l.getValue()}var i;if(e.form&&(pe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(s){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ge(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var l=Pl((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return l}function as(e){e.off=ge,e.on=pe,e.wheelEventPixels=to,e.Doc=ka,e.splitLines=Fe,e.countColumn=R,e.findColumn=G,e.isWordChar=te,e.Pass=j,e.signal=ve,e.Line=sn,e.changeEnd=lo,e.scrollbarModel=xi,e.Pos=it,e.cmpPos=ot,e.modes=Re,e.mimeModes=We,e.resolveMode=je,e.getMode=qe,e.modeExtensions=$e,e.extendMode=Ue,e.copyState=Ge,e.startState=Xe,e.innerMode=Ve,e.commands=Za,e.keyMap=Ha,e.keyName=qa,e.isModifierKey=_a,e.lookupKey=Ba,e.normalizeKeyMap=Wa,e.StringStream=Ke,e.SharedTextMarker=ga,e.TextMarker=pa,e.LineWidget=ua,e.e_preventDefault=ke,e.e_stopPropagation=Se,e.e_stop=Le,e.addClass=F,e.contains=D,e.rmClass=T,e.keyNames=Fa}is.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ye(r,e)){if(r.somethingSelected())_l({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Ul(r);_l({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,q):(n.prevInput="",i.value=t.text.join("\n"),I(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),pe(i,"input",(function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),pe(i,"paste",(function(e){ye(r,e)||ql(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",(function(t){if(!qn(e,t)&&!ye(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),pe(e.lineSpace,"selectstart",(function(t){qn(e,t)||ke(t)})),pe(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},is.prototype.createField=function(e){this.wrapper=Vl(),this.textarea=this.wrapper.firstChild},is.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},is.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=qr(e);if(e.options.moveInputWithCursor){var i=yr(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},is.prototype.showSelection=function(e){var t=this.cm,n=t.display;A(n.cursorDiv,e.cursors),A(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},is.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&I(this.textarea),a&&l>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null))}},is.prototype.getField=function(){return this.textarea},is.prototype.supportsTouch=function(){return!1},is.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||E()!=this.textarea))try{this.textarea.focus()}catch(e){}},is.prototype.blur=function(){this.textarea.blur()},is.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},is.prototype.receivedFocus=function(){this.slowPoll()},is.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},is.prototype.fastPoll=function(){var e=!1,t=this;function n(){var r=t.poll();r||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},is.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||ze(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&l>=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||r||(r=""),8666==o)return this.reset(),this.cm.execCommand("undo")}var s=0,c=Math.min(r.length,i.length);while(s<c&&r.charCodeAt(s)==i.charCodeAt(s))++s;return Oi(t,(function(){jl(t,i.slice(s),r.length-s,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},is.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},is.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},is.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=zr(n,e),c=r.scroller.scrollTop;if(o&&!d){var u=n.options.resetSelectionOnContextMenu;u&&-1==n.doc.sel.contains(o)&&Di(n,_o)(n.doc,ao(o),q);var f,h=i.style.cssText,p=t.wrapper.style.cssText,m=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-m.top-5)+"px; left: "+(e.clientX-m.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);",s&&(f=window.scrollY),r.input.focus(),s&&window.scrollTo(null,f),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&l>=9&&v(),S){Le(e);var g=function(){ge(window,"mouseup",g),setTimeout(y,20)};pe(window,"mouseup",g)}else setTimeout(y,50)}function v(){if(null!=i.selectionStart){var e=n.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,i.style.cssText=h,a&&l<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&l<9)&&v();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?Di(n,Ko)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},is.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},is.prototype.setUneditable=function(){},is.prototype.needsContentAttribute=!1,Fl(Pl),Xl(Pl);var ls="iter insert remove copy getEditor constructor".split(" ");for(var ss in ka.prototype)ka.prototype.hasOwnProperty(ss)&&B(ls,ss)<0&&(Pl.prototype[ss]=function(e){return function(){return e.apply(this.doc,arguments)}}(ka.prototype[ss]));return we(ka),Pl.inputStyles={textarea:is,contenteditable:Yl},Pl.defineMode=function(e){Pl.defaults.mode||"null"==e||(Pl.defaults.mode=e),Be.apply(this,arguments)},Pl.defineMIME=_e,Pl.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Pl.defineMIME("text/plain","null"),Pl.defineExtension=function(e,t){Pl.prototype[e]=t},Pl.defineDocExtension=function(e,t){ka.prototype[e]=t},Pl.fromTextArea=os,as(Pl),Pl.version="5.53.2",Pl}))},a719:function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},a8a2:function(e,t){function n(){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,xhtml:!1}}function r(t){e.exports.defaults=t}e.exports={defaults:n(),getDefaults:n,changeDefaults:r}},aa6b:function(e,t,n){var r=n("1e2c"),i=n("ef71"),o=n("38b9"),a=n("da10"),l=n("9f67"),s=n("faa8"),c=n("2039"),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=a(e),t=l(t,!0),c)try{return u(e,t)}catch(n){}if(s(e,t))return o(!i.f.call(e,t),e[t])}},ac30:function(e,t,n){const{noopTest:r,edit:i,merge:o}=n("322c"),a={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,}(?! )(?!\1bull )\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:r,table:r,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?'|\([^()]*\))/};a.def=i(a.def).replace("label",a._label).replace("title",a._title).getRegex(),a.bullet=/(?:[*+-]|\d{1,9}\.)/,a.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,a.item=i(a.item,"gm").replace(/bull/g,a.bullet).getRegex(),a.list=i(a.list).replace(/bull/g,a.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+a.def.source+")").getRegex(),a._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",a._comment=/<!--(?!-?>)[\s\S]*?-->/,a.html=i(a.html,"i").replace("comment",a._comment).replace("tag",a._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),a.paragraph=i(a._paragraph).replace("hr",a.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",a._tag).getRegex(),a.blockquote=i(a.blockquote).replace("paragraph",a.paragraph).getRegex(),a.normal=o({},a),a.gfm=o({},a.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),a.gfm.nptable=i(a.gfm.nptable).replace("hr",a.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",a._tag).getRegex(),a.gfm.table=i(a.gfm.table).replace("hr",a.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",a._tag).getRegex(),a.pedantic=o({},a.normal,{html:i("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",a._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:r,paragraph:i(a.normal._paragraph).replace("hr",a.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",a.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const l={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:r,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*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^_([^\s_<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s*<\[])\*(?!\*)|^\*([^\s<"][\s\S]*?[^\s\[\*])\*(?![\]`punctuation])|^\*([^\s*"<\[][\s\S]*[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:r,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,_punctuation:"!\"#$%&'()*+\\-./:;<=>?@\\[^_{|}~"};l.em=i(l.em).replace(/punctuation/g,l._punctuation).getRegex(),l._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,l._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,l._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])?)+(?![-_])/,l.autolink=i(l.autolink).replace("scheme",l._scheme).replace("email",l._email).getRegex(),l._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,l.tag=i(l.tag).replace("comment",a._comment).replace("attribute",l._attribute).getRegex(),l._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,l._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,l._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,l.link=i(l.link).replace("label",l._label).replace("href",l._href).replace("title",l._title).getRegex(),l.reflink=i(l.reflink).replace("label",l._label).getRegex(),l.normal=o({},l),l.pedantic=o({},l.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:i(/^!?\[(label)\]\((.*?)\)/).replace("label",l._label).getRegex(),reflink:i(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",l._label).getRegex()}),l.gfm=o({},l.normal,{escape:i(l.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)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),l.gfm.url=i(l.gfm.url,"i").replace("email",l.gfm._extended_email).getRegex(),l.breaks=o({},l.gfm,{br:i(l.br).replace("{2,}","*").getRegex(),text:i(l.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),e.exports={block:a,inline:l}},ae25:function(e,t,n){var r=n("d890"),i=n("a719"),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},b2e0:function(e,t,n){(function(e){e(n("a564"))})((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},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var o,a,l=r.indentUnit,s={},c=i.htmlMode?t:n;for(var u in c)s[u]=c[u];for(var u in i)s[u]=i[u];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r,i=e.next();return"<"==i?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(p("atom","]]>")):null:e.match("--")?n(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(m(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=f,"tag bracket"):"&"==i?(r=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),r?"atom":"error"):(e.eatWhile(/[^&<]/),null)}function f(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=d,o=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return o="equals",null;if("<"==n){t.tokenize=d,t.state=x,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=h(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(e){var t=function(t,n){while(!t.eol())if(t.next()==e){n.tokenize=f;break}return"string"};return t.isInAttribute=!0,t}function p(e,t){return function(n,r){while(!n.eol()){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function m(e){return function(t,n){var r;while(null!=(r=t.next())){if("<"==r)return n.tokenize=m(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=d;break}return n.tokenize=m(e-1),n.tokenize(t,n)}}return"meta"}}function g(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(s.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function v(e){e.context&&(e.context=e.context.prev)}function y(e,t){var n;while(1){if(!e.context)return;if(n=e.context.tagName,!s.contextGrabbers.hasOwnProperty(n)||!s.contextGrabbers[n].hasOwnProperty(t))return;v(e)}}function x(e,t,n){return"openTag"==e?(n.tagStart=t.column(),b):"closeTag"==e?w:x}function b(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",C):s.allowMissingTagName&&"endTag"==e?(a="tag bracket",C(e,t,n)):(a="error",b)}function w(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&s.implicitlyClosed.hasOwnProperty(n.context.tagName)&&v(n),n.context&&n.context.tagName==r||!1===s.matchClosing?(a="tag",k):(a="tag error",S)}return s.allowMissingTagName&&"endTag"==e?(a="tag bracket",k(e,t,n)):(a="error",S)}function k(e,t,n){return"endTag"!=e?(a="error",k):(v(n),x)}function S(e,t,n){return a="error",k(e,t,n)}function C(e,t,n){if("word"==e)return a="attribute",L;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||s.autoSelfClosers.hasOwnProperty(r)?y(n,r):(y(n,r),n.context=new g(n,r,i==n.indented)),x}return a="error",C}function L(e,t,n){return"equals"==e?T:(s.allowMissing||(a="error"),C(e,t,n))}function T(e,t,n){return"string"==e?M:"word"==e&&s.allowUnquoted?(a="string",C):(a="error",C(e,t,n))}function M(e,t,n){return"string"==e?M:C(e,t,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:x,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 n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=f&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==s.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(s.multilineTagIndentFactor||1);if(s.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])while(i){if(i.tagName==o[2]){i=i.prev;break}if(!s.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(o)while(i){var a=s.contextGrabbers[i.tagName];if(!a||!a.hasOwnProperty(o[2]))break;i=i.prev}while(i&&i.prev&&!i.startOfLine)i=i.prev;return i?i.indent+l:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:s.htmlMode?"html":"xml",helperType:s.htmlMode?"html":"xml",skipAttribute:function(e){e.state==T&&(e.state=C)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.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})}))},b338:function(e,t,n){var r=n("ead4"),i=n("18f6"),o=i.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},b702:function(e,t,n){var r,i,o,a=n("604f"),l=n("d890"),s=n("a719"),c=n("0fc1"),u=n("faa8"),d=n("7db2"),f=n("d5a8"),h=l.WeakMap,p=function(e){return o(e)?i(e):r(e,{})},m=function(e){return function(t){var n;if(!s(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(a){var g=new h,v=g.get,y=g.has,x=g.set;r=function(e,t){return x.call(g,e,t),t},i=function(e){return v.call(g,e)||{}},o=function(e){return y.call(g,e)}}else{var b=d("state");f[b]=!0,r=function(e,t){return c(e,b,t),t},i=function(e){return u(e,b)?e[b]:{}},o=function(e){return u(e,b)}}e.exports={set:r,get:i,has:o,enforce:p,getterFor:m}},b73f:function(e,t,n){var r=n("1c8b"),i=n("efe2"),o=n("da10"),a=n("aa6b").f,l=n("1e2c"),s=i((function(){a(1)})),c=!l||s;r({target:"Object",stat:!0,forced:c,sham:!l},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},bf84:function(e,t,n){var r=n("1c8b"),i=n("1e2c"),o=n("8d44"),a=n("da10"),l=n("aa6b"),s=n("1bbd");r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){var t,n,r=a(e),i=l.f,c=o(r),u={},d=0;while(c.length>d)n=i(r,t=c[d++]),void 0!==n&&s(u,t,n);return u}})},c051:function(e,t,n){var r=n("da10"),i=n("b338").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],l=function(e){try{return i(e)}catch(t){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?l(e):i(r(e))}},c54b:function(e,t,n){var r=n("efe2");e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},c59c:function(e,t,n){var r,i,o;(function(n,a){i=[],r=a,o="function"===typeof r?r.apply(t,i):r,void 0===o||(e.exports=o)})("undefined"!==typeof self&&self,(function(){function e(){if(document.currentScript)return document.currentScript;try{throw new Error}catch(d){var e,t,n,r=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,i=/@([^@]*):(\d+):(\d+)\s*$/gi,o=r.exec(d.stack)||i.exec(d.stack),a=o&&o[1]||!1,l=o&&o[2]||!1,s=document.location.href.replace(document.location.hash,""),c=document.getElementsByTagName("script");a===s&&(e=document.documentElement.outerHTML,t=new RegExp("(?:[^\\n]+?\\n){0,"+(l-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),n=e.replace(t,"$1").trim());for(var u=0;u<c.length;u++){if("interactive"===c[u].readyState)return c[u];if(c[u].src===a)return c[u];if(a===s&&c[u].innerHTML&&c[u].innerHTML.trim()===n)return c[u]}return null}}return e}))},c69d:function(e,t,n){var r=n("faa8"),i=n("8d44"),o=n("aa6b"),a=n("d910");e.exports=function(e,t){for(var n=i(t),l=a.f,s=o.f,c=0;c<n.length;c++){var u=n[c];r(e,u)||l(e,u,s(t,u))}}},cbab:function(e,t,n){var r=n("ead4"),i=n("18f6");e.exports=Object.keys||function(e){return r(e,i)}},ccf5:function(e,t,n){},d5a8:function(e,t){e.exports={}},d776:function(e,t,n){(function(e){e(n("a564"))})((function(e){"use strict";e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.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=n.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||r&&null==i.overlay.combineTokens?i.baseCur+" "+i.overlayCur:i.overlayCur},indent:t.indent&&function(e,n,r){return t.indent(e.base,n,r)},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)),n.blankLine&&(o=n.blankLine(e.overlay)),null==o?i:r&&null!=i?i+" "+o:o}}}}))},d7e1:function(e,t,n){"use strict";var r=n("efe2");e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},d88d:function(e,t,n){var r=n("3da3"),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},d890:function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n("9edd"))},d910:function(e,t,n){var r=n("1e2c"),i=n("2039"),o=n("857c"),a=n("9f67"),l=Object.defineProperty;t.f=r?l:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return l(e,t,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},da10:function(e,t,n){var r=n("692f"),i=n("2732");e.exports=function(e){return r(i(e))}},dbb3:function(e,t,n){"use strict";var r=n("1c8b"),i=n("5dfd").filter,o=n("1ea7"),a=n("ff9c"),l=o("filter"),s=a("filter");r({target:"Array",proto:!0,forced:!l||!s},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},dbe8:function(e,t,n){var r=n("1e2c"),i=n("d910"),o=n("857c"),a=n("cbab");e.exports=r?Object.defineProperties:function(e,t){o(e);var n,r=a(t),l=r.length,s=0;while(l>s)i.f(e,n=r[s++],t[n]);return e}},e1d6:function(e,t,n){var r=n("3da3"),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},e349:function(e,t,n){var r=n("0c3c");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},e4db:function(e,t,n){var r=n("d890"),i=n("0fc1");e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},e8d6:function(e,t,n){var r=n("efe2"),i=/#|\.prototype\./,o=function(e,t){var n=l[a(e)];return n==c||n!=s&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=o.data={},s=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},ead4:function(e,t,n){var r=n("faa8"),i=n("da10"),o=n("45af").indexOf,a=n("d5a8");e.exports=function(e,t){var n,l=i(e),s=0,c=[];for(n in l)!r(a,n)&&r(l,n)&&c.push(n);while(t.length>s)r(l,n=t[s++])&&(~o(c,n)||c.push(n));return c}},ef71:function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},efe2:function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},f3dd:function(e,t,n){"use strict";var r=n("1c8b"),i=n("d890"),o=n("6d7a"),a=n("9b9d"),l=n("1e2c"),s=n("c54b"),c=n("74cb"),u=n("efe2"),d=n("faa8"),f=n("74e7"),h=n("a719"),p=n("857c"),m=n("3553"),g=n("da10"),v=n("9f67"),y=n("38b9"),x=n("6d60"),b=n("cbab"),w=n("b338"),k=n("c051"),S=n("0a60"),C=n("aa6b"),L=n("d910"),T=n("ef71"),M=n("0fc1"),A=n("1944"),N=n("6d28"),O=n("7db2"),D=n("d5a8"),E=n("7e8b"),F=n("90fb"),z=n("4350"),I=n("6d51"),P=n("27b5"),H=n("b702"),R=n("5dfd").forEach,W=O("hidden"),B="Symbol",_="prototype",j=F("toPrimitive"),q=H.set,$=H.getterFor(B),U=Object[_],G=i.Symbol,V=o("JSON","stringify"),X=C.f,K=L.f,Z=k.f,Y=T.f,J=N("symbols"),Q=N("op-symbols"),ee=N("string-to-symbol-registry"),te=N("symbol-to-string-registry"),ne=N("wks"),re=i.QObject,ie=!re||!re[_]||!re[_].findChild,oe=l&&u((function(){return 7!=x(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=X(U,t);r&&delete U[t],K(e,t,n),r&&e!==U&&K(U,t,r)}:K,ae=function(e,t){var n=J[e]=x(G[_]);return q(n,{type:B,tag:e,description:t}),l||(n.description=t),n},le=c?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof G},se=function(e,t,n){e===U&&se(Q,t,n),p(e);var r=v(t,!0);return p(n),d(J,r)?(n.enumerable?(d(e,W)&&e[W][r]&&(e[W][r]=!1),n=x(n,{enumerable:y(0,!1)})):(d(e,W)||K(e,W,y(1,{})),e[W][r]=!0),oe(e,r,n)):K(e,r,n)},ce=function(e,t){p(e);var n=g(t),r=b(n).concat(pe(n));return R(r,(function(t){l&&!de.call(n,t)||se(e,t,n[t])})),e},ue=function(e,t){return void 0===t?x(e):ce(x(e),t)},de=function(e){var t=v(e,!0),n=Y.call(this,t);return!(this===U&&d(J,t)&&!d(Q,t))&&(!(n||!d(this,t)||!d(J,t)||d(this,W)&&this[W][t])||n)},fe=function(e,t){var n=g(e),r=v(t,!0);if(n!==U||!d(J,r)||d(Q,r)){var i=X(n,r);return!i||!d(J,r)||d(n,W)&&n[W][r]||(i.enumerable=!0),i}},he=function(e){var t=Z(g(e)),n=[];return R(t,(function(e){d(J,e)||d(D,e)||n.push(e)})),n},pe=function(e){var t=e===U,n=Z(t?Q:g(e)),r=[];return R(n,(function(e){!d(J,e)||t&&!d(U,e)||r.push(J[e])})),r};if(s||(G=function(){if(this instanceof G)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=E(e),n=function(e){this===U&&n.call(Q,e),d(this,W)&&d(this[W],t)&&(this[W][t]=!1),oe(this,t,y(1,e))};return l&&ie&&oe(U,t,{configurable:!0,set:n}),ae(t,e)},A(G[_],"toString",(function(){return $(this).tag})),A(G,"withoutSetter",(function(e){return ae(E(e),e)})),T.f=de,L.f=se,C.f=fe,w.f=k.f=he,S.f=pe,z.f=function(e){return ae(F(e),e)},l&&(K(G[_],"description",{configurable:!0,get:function(){return $(this).description}}),a||A(U,"propertyIsEnumerable",de,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!s,sham:!s},{Symbol:G}),R(b(ne),(function(e){I(e)})),r({target:B,stat:!0,forced:!s},{for:function(e){var t=String(e);if(d(ee,t))return ee[t];var n=G(t);return ee[t]=n,te[n]=t,n},keyFor:function(e){if(!le(e))throw TypeError(e+" is not a symbol");if(d(te,e))return te[e]},useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),r({target:"Object",stat:!0,forced:!s,sham:!l},{create:ue,defineProperty:se,defineProperties:ce,getOwnPropertyDescriptor:fe}),r({target:"Object",stat:!0,forced:!s},{getOwnPropertyNames:he,getOwnPropertySymbols:pe}),r({target:"Object",stat:!0,forced:u((function(){S.f(1)}))},{getOwnPropertySymbols:function(e){return S.f(m(e))}}),V){var me=!s||u((function(){var e=G();return"[null]"!=V([e])||"{}"!=V({a:e})||"{}"!=V(Object(e))}));r({target:"JSON",stat:!0,forced:me},{stringify:function(e,t,n){var r,i=[e],o=1;while(arguments.length>o)i.push(arguments[o++]);if(r=t,(h(t)||void 0!==e)&&!le(e))return f(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!le(t))return t}),i[1]=t,V.apply(null,i)}})}G[_][j]||M(G[_],j,G[_].valueOf),P(G,B),D[W]=!0},f4a0:function(e,t,n){"use strict";if(n.r(t),"undefined"!==typeof window){var r=window.document.currentScript,i=n("c59c");r=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"simple-mde",class:e.classes},[n("textarea",{ref:"mde"})])},l=[];function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n("f3dd"),n("dbb3"),n("fe59"),n("b73f"),n("bf84"),n("fe8a"),n("08ba"),n("508f");var d=n("4d02"),f=n.n(d),h=(n("ccf5"),n("094f")),p=n.n(h),m=(n("0e50"),{name:"MarkdownEditor",props:{value:{type:String,default:""},border:{type:Boolean,default:!1},config:{type:Object,default:function(){return{}}}},data:function(){return{mde:null,defaultConfig:{}}},computed:{classes:function(){return[{"i-mde-no-border":!this.border}]}},mounted:function(){this.init()},beforeDestroy:function(){this.mde=null},methods:{init:function(){var e=this,t=Object.assign({},this.defaultConfig,this.config);this.mde=new f.a(u(u({},t),{},{initialValue:this.value,element:this.$refs.mde,autoDownloadFontAwesome:!1})),this.mde.codemirror.on("change",(function(){e.$emit("input",e.mde.value()),e.$emit("on-change",e.mde.value());var t=p()(e.mde.value()||"",{renderer:new p.a.Renderer,gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,smartLists:!0,smartypants:!1});e.$emit("show-html",'<div class="markdown-body" >'+t+"</div>")}))},add:function(e){this.mde&&this.mde.value(this.value+e)},replace:function(e){this.mde&&this.mde.value(e)}}}),g=m;function v(e,t,n,r,i,o,a,l){var s,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(s=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=s):i&&(s=l?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),s)if(c.functional){c._injectStyles=s;var u=c.render;c.render=function(e,t){return s.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,s):[s]}return{exports:e,options:c}}var y=v(g,a,l,!1,null,null,null),x=y.exports,b=x;"undefined"!==typeof window&&window.Vue&&window.Vue.component("zx-markdown-editor",x),t["default"]=b},f590:function(e,t,n){(function(e){e(n("a564"))})((function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){o(e)&&n(e)}function i(e){var r=e.getWrapperElement(),i=o(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function o(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(n,o,a){var l=a&&a!=e.Init;if(o&&!l)n.on("blur",r),n.on("change",i),n.on("swapDoc",i),i(n);else if(!o&&l){n.off("blur",r),n.off("change",i),n.off("swapDoc",i),t(n);var s=n.getWrapperElement();s.className=s.className.replace(" CodeMirror-empty","")}o&&!n.hasFocus()&&r(n)}))}))},f594:function(e,t,n){var r,i,o=n("d890"),a=n("4fda"),l=o.process,s=l&&l.versions,c=s&&s.v8;c?(r=c.split("."),i=r[0]+r[1]):a&&(r=a.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/),r&&(i=r[1]))),e.exports=i&&+i},f5ef:function(e,t){e.exports=class{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}},faa8:function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},fe59:function(e,t,n){"use strict";var r=n("1c8b"),i=n("3c10");r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},fe5a:function(e,t,n){(function(e){e(n("a564"),n("b2e0"),n("6d86"))})((function(e){"use strict";e.defineMode("markdown",(function(t,n){var r=e.getMode(t,"text/html"),i="null"==r.name;function o(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var a={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 l in a)a.hasOwnProperty(l)&&n.tokenTypeOverrides[l]&&(a[l]=n.tokenTypeOverrides[l]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,c=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,d=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,f=/^ {0,3}(?:\={1,}|-{2,})\s*$/,h=/^[^#!\[\]*_\\<>` "'(~:]+/,p=/^(~~~+|```+)[ \t]*([\w+#-]*)[^\n`]*$/,m=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,v=" ";function y(e,t,n){return t.f=t.inline=n,n(e,t)}function x(e,t,n){return t.f=t.block=n,n(e,t)}function b(e){return!e||!/\S/.test(e.string)}function w(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==S){var n=i;if(!n){var o=e.innerMode(r,t.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(t.f=M,t.block=k,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function k(t,r){var i=t.column()===r.indentation,l=b(r.prevLine.stream),h=r.indentedCode,g=r.prevLine.hr,v=!1!==r.list,x=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var w=r.indentation;if(null===r.indentationDiff&&(r.indentationDiff=r.indentation,v)){r.list=null;while(w<r.listStack[r.listStack.length-1])r.listStack.pop(),r.listStack.length?r.indentation=r.listStack[r.listStack.length-1]:r.list=!1;!1!==r.list&&(r.indentationDiff=w-r.listStack[r.listStack.length-1])}var k=!l&&!g&&!r.prevLine.header&&(!v||!h)&&!r.prevLine.fencedCodeEnd,S=(!1===r.list||g||l)&&r.indentation<=x&&t.match(s),T=null;if(r.indentationDiff>=4&&(h||r.prevLine.fencedCodeEnd||r.prevLine.header||l))return t.skipToEnd(),r.indentedCode=!0,a.code;if(t.eatSpace())return null;if(i&&r.indentation<=x&&(T=t.match(d))&&T[1].length<=6)return r.quote=0,r.header=T[1].length,r.thisLine.header=!0,n.highlightFormatting&&(r.formatting="header"),r.f=r.inline,L(r);if(r.indentation<=x&&t.eat(">"))return r.quote=i?1:r.quote+1,n.highlightFormatting&&(r.formatting="quote"),t.eatSpace(),L(r);if(!S&&!r.setext&&i&&r.indentation<=x&&(T=t.match(c))){var M=T[1]?"ol":"ul";return r.indentation=w+t.current().length,r.list=!0,r.quote=0,r.listStack.push(r.indentation),r.em=!1,r.strong=!1,r.code=!1,r.strikethrough=!1,n.taskLists&&t.match(u,!1)&&(r.taskList=!0),r.f=r.inline,n.highlightFormatting&&(r.formatting=["list","list-"+M]),L(r)}return i&&r.indentation<=x&&(T=t.match(p,!0))?(r.quote=0,r.fencedEndRE=new RegExp(T[1]+"+ *$"),r.localMode=n.fencedCodeBlockHighlighting&&o(T[2]),r.localMode&&(r.localState=e.startState(r.localMode)),r.f=r.block=C,n.highlightFormatting&&(r.formatting="code-block"),r.code=-1,L(r)):r.setext||!(k&&v||r.quote||!1!==r.list||r.code||S||m.test(t.string))&&(T=t.lookAhead(1))&&(T=T.match(f))?(r.setext?(r.header=r.setext,r.setext=0,t.skipToEnd(),n.highlightFormatting&&(r.formatting="header")):(r.header="="==T[0].charAt(0)?1:2,r.setext=r.header),r.thisLine.header=!0,r.f=r.inline,L(r)):S?(t.skipToEnd(),r.hr=!0,r.thisLine.hr=!0,a.hr):"["===t.peek()?y(t,r,E):y(t,r,r.inline)}function S(t,n){var o=r.token(t,n.htmlState);if(!i){var a=e.innerMode(r,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=M,n.block=k,n.htmlState=null)}return o}function C(e,t){var r,i=t.listStack[t.listStack.length-1]||0,o=t.indentation<i,l=i+3;return t.fencedEndRE&&t.indentation<=l&&(o||e.match(t.fencedEndRE))?(n.highlightFormatting&&(t.formatting="code-block"),o||(r=L(t)),t.localMode=t.localState=null,t.block=k,t.f=M,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,o?x(e,t,t.block):r):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),a.code)}function L(e){var t=[];if(e.formatting){t.push(a.formatting),"string"===typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(a.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&t.push(a.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.formatting+"-"+e.formatting[r]+"-"+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(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(a.list2):t.push(a.list3):t.push(a.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 T(e,t){if(e.match(h,!0))return L(t)}function M(t,i){var o=i.text(t,i);if("undefined"!==typeof o)return o;if(i.list)return i.list=null,L(i);if(i.taskList){var l=" "===t.match(u,!0)[1];return l?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,L(i)}if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),L(i);var s=t.next();if(i.linkTitle){i.linkTitle=!1;var c=s;"("===s&&(c=")"),c=(c+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var d="^\\s*(?:[^"+c+"\\\\]+|\\\\\\\\|\\\\.)"+c;if(t.match(new RegExp(d),!0))return a.linkHref}if("`"===s){var f=i.formatting;n.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=L(i);return i.code=0,p}return i.formatting=f,L(i)}return i.code=h,L(i)}if(i.code)return L(i);if("\\"===s&&(t.next(),n.highlightFormatting)){var m=L(i),v=a.formatting+"-escape";return m?m+" "+v:v}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),L(i);if("["===s&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),L(i);if("]"===s&&i.imageAltText)return n.highlightFormatting&&(i.formatting="image"),m=L(i),i.imageAltText=!1,i.image=!1,i.inline=i.f=N,m;if("["===s&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),L(i);if("]"===s&&i.linkText)return n.highlightFormatting&&(i.formatting="link"),m=L(i),i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?N:M,m;if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=A,n.highlightFormatting&&(i.formatting="link"),m=L(i),m?m+=" ":m="",m+a.linkInline;if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=A,n.highlightFormatting&&(i.formatting="link"),m=L(i),m?m+=" ":m="",m+a.linkEmail;if(n.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(r),x(t,i,S)}if(n.xml&&"<"===s&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){var w=1,k=1==t.pos?" ":t.string.charAt(t.pos-2);while(w<3&&t.eat(s))w++;var C=t.peek()||" ",T=!/\s/.test(C)&&(!g.test(C)||/\s/.test(k)||g.test(k)),O=!/\s/.test(k)&&(!g.test(k)||/\s/.test(C)||g.test(C)),D=null,E=null;if(w%2&&(i.em||!T||"*"!==s&&O&&!g.test(k)?i.em!=s||!O||"*"!==s&&T&&!g.test(C)||(D=!1):D=!0),w>1&&(i.strong||!T||"*"!==s&&O&&!g.test(k)?i.strong!=s||!O||"*"!==s&&T&&!g.test(C)||(E=!1):E=!0),null!=E||null!=D)return n.highlightFormatting&&(i.formatting=null==D?"strong":null==E?"em":"strong em"),!0===D&&(i.em=s),!0===E&&(i.strong=s),p=L(i),!1===D&&(i.em=!1),!1===E&&(i.strong=!1),p}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return L(i);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),p=L(i),i.strikethrough=!1,p;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),L(i)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return L(i);t.backUp(2)}if(n.emoji&&":"===s&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var F=L(i);return i.emoji=!1,F}return" "===s&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),L(i)}function A(e,t){var r=e.next();if(">"===r){t.f=t.inline=M,n.highlightFormatting&&(t.formatting="link");var i=L(t);return i?i+=" ":i="",i+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function N(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(t.f=t.inline=D("("===r?")":"]"),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,L(t)):"error"}var O={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function D(e){return function(t,r){var i=t.next();if(i===e){r.f=r.inline=M,n.highlightFormatting&&(r.formatting="link-string");var o=L(r);return r.linkHref=!1,o}return t.match(O[e]),r.linkHref=!0,L(r)}}function E(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=F,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,L(t)):y(e,t,M)}function F(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=z,n.highlightFormatting&&(t.formatting="link");var r=L(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function z(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=M,a.linkHref+" url")}var I={startState:function(){return{f:k,prevLine:{stream:null},thisLine:{stream:null},block:k,htmlState:null,indentation:0,inline:M,text:T,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(r,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 w(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!=S)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,v).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==S?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:I}},indent:function(t,n,i){return t.block==S&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:w,getType:L,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return I}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}))},fe8a:function(e,t,n){var r=n("1c8b"),i=n("3553"),o=n("cbab"),a=n("efe2"),l=a((function(){o(1)}));r({target:"Object",stat:!0,forced:l},{keys:function(e){return o(i(e))}})},ff9c:function(e,t,n){var r=n("1e2c"),i=n("efe2"),o=n("faa8"),a=Object.defineProperty,l={},s=function(e){throw e};e.exports=function(e,t){if(o(l,e))return l[e];t||(t={});var n=[][e],c=!!o(t,"ACCESSORS")&&t.ACCESSORS,u=o(t,0)?t[0]:s,d=o(t,1)?t[1]:void 0;return l[e]=!!n&&!i((function(){if(c&&!r)return!0;var e={length:-1};c?a(e,1,{enumerable:!0,get:s}):e[1]=1,n.call(e,u,d)}))}}})}))},"06ba":function(e,t,n){"use strict";n("3058")},"1d57":function(e,t,n){},3058:function(e,t,n){},f92c:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"pic-img"},[n("div",{staticClass:"img-container",on:{mousemove:function(t){!e.moveEvent&&e.mouseMove(t)},mouseleave:function(t){!e.leaveEvent&&e.mouseLeave(t)}}},[n("img",{ref:"img",staticStyle:{width:"100%"},attrs:{src:e.lazyload?e.imgLoadedFlag&&e.url:e.url},on:{load:function(t){!e.lazyload&&e.imgLoaded(t)}}}),e.hideZoom||!e.imgLoadedFlag||e.hideSelector?e._e():n("div",{class:["img-selector",{circle:"circle"===e.type}],style:[e.imgSelectorStyle,e.imgSelectorSize,e.imgSelectorPosition,!e.outShow&&e.imgBg,!e.outShow&&e.imgBgSize,!e.outShow&&e.imgBgPosition]},[e._t("default")],2),e.outShow?n("div",{directives:[{name:"show",rawName:"v-show",value:!e.hideOutShow,expression:"!hideOutShow"}],class:["img-out-show",{"base-line":e.baseline}],style:[e.imgOutShowSize,e.imgOutShowPosition,e.imgBg,e.imgBgSize,e.imgBgPosition]},[e.pointer?n("div",{staticClass:"img-selector-point"}):e._e()]):e._e()])])},i=[],o=(n("51b3"),n("b3d9"),n("89a8"),n("87d5"),{props:{url:{type:String,default:""},highUrl:{type:String,default:""},width:{type:Number,default:168},type:{type:String,default:"circle",validator:function(e){return-1!==["circle","square"].indexOf(e)}},selectorStyle:{type:Object,default:function(){return{}}},outShowStyle:{},scale:{type:Number,default:3},lazyload:{type:Boolean,default:!1},moveEvent:{type:[Object,MouseEvent],default:null},leaveEvent:{type:[Object,MouseEvent],default:null},hideZoom:{type:Boolean,default:!1},outShow:{type:Boolean,default:!1},pointer:{type:Boolean,default:!1},baseline:{type:Boolean,default:!1}},data:function(){return{selector:{width:this.width,top:0,left:0,bgTop:0,bgLeft:0,rightBound:0,bottomBound:0,absoluteLeft:0,absoluteTop:0},imgInfo:{},$img:null,screenWidth:document.body.clientWidth,outShowInitTop:0,outShowTop:0,hideOutShow:!0,imgLoadedFlag:!1,highImgLoadedFlag:!1,hideSelector:!0,timer:null}},computed:{addWidth:function(){return this.outShow?0:this.width/2*(1-this.scale)},imgSelectorPosition:function(){var e=this.selector,t=e.top,n=e.left;return{top:"".concat(t,"px"),left:"".concat(n,"px")}},imgSelectorSize:function(){var e=this.selector.width;return{width:"".concat(e,"px"),height:"".concat(e,"px")}},imgSelectorStyle:function(){return this.selectorStyle},imgOutShowSize:function(){var e=this.scale,t=this.selector.width;return{width:"".concat(t*e,"px"),height:"".concat(t*e,"px")}},imgOutShowPosition:function(){return{top:"".concat(this.outShowTop,"px"),right:"".concat(-8,"px")}},imgBg:function(){return{backgroundImage:"url(".concat(this.highUrl||this.url,")")}},imgBgSize:function(){var e=this.scale,t=this.imgInfo,n=t.height,r=t.width;return{backgroundSize:"".concat(r*e,"px ").concat(n*e,"px")}},imgBgPosition:function(){var e=this.selector,t=e.bgLeft,n=e.bgTop;return{backgroundPosition:"".concat(t,"px ").concat(n,"px")}}},watch:{moveEvent:function(e){this.mouseMove(e)},leaveEvent:function(e){this.mouseLeave(e)},url:function(){this.handlerUrlChange()},width:function(e){this.initSelectorProperty(e)},screenWidth:function(e){var t=this;this.timer||(this.screenWidth=e,this.timer=setTimeout((function(){t.imgLoaded(),clearTimeout(t.timer),t.timer=null}),400))}},created:function(){this.url&&this.lazyload&&this.handlerUrlChange()},mounted:function(){this.$img=this.$refs["img"]},methods:{handlerUrlChange:function(){this.imgLoadedFlag=!1,this.lazyload&&this.loadImg(this.url).then(this.imgLoaded,(function(e){return console.error(e)}))},loadImg:function(e){return new Promise((function(t,n){var r=document.createElement("img");r.addEventListener("load",t),r.addEventListener("error",n),r.src=e}))},imgLoaded:function(){var e=this.$img.getBoundingClientRect();JSON.stringify(this.imgInfo)!=JSON.stringify(e)&&(this.imgInfo=e,this.initSelectorProperty(this.width),this.resetOutShowInitPosition()),this.imgLoadedFlag||(this.imgLoadedFlag=!0,this.$emit("created",e))},mouseMove:function(e){if(!this.hideZoom&&this.imgLoadedFlag){this.imgLoaded();var t=e.pageX,n=e.pageY,r=e.clientY,i=this.scale,o=this.selector,a=this.outShow,l=this.addWidth,s=(this.outShowAutoScroll,this.outShowInitTop),c=n-r,u=o.absoluteLeft,d=o.absoluteTop,f=o.rightBound,h=o.bottomBound,p=t-u,m=n-d;a&&(s||(s=this.outShowInitTop=c+this.imgInfo.top),this.hideOutShow&&(this.hideOutShow=!1),this.outShowTop=c>s?c-s:0),this.hideSelector&&(this.hideSelector=!1),o.top=m>0?m<h?m:h:0,o.left=p>0?p<f?p:f:0,o.bgLeft=l-p*i,o.bgTop=l-m*i}},initSelectorProperty:function(e){var t=e/2,n=this.selector,r=this.imgInfo,i=r.width,o=r.height,a=r.left,l=r.top,s=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,c=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft;n.width=e,n.rightBound=i-e,n.bottomBound=o-e,n.absoluteLeft=a+t+c,n.absoluteTop=l+t+s},mouseLeave:function(){this.hideSelector=!0,this.outShow&&(this.hideOutShow=!0)},reset:function(){Object.assign(this.selector,{top:0,left:0,bgLeft:0,bgTop:0}),this.resetOutShowInitPosition()},resetOutShowInitPosition:function(){this.outShowInitTop=0}}}),a=o,l=(n("06ba"),n("cba8")),s=Object(l["a"])(a,r,i,!1,null,"3381376e",null),c=s.exports;t["a"]=c;"undefined"!==typeof window&&window.Vue&&window.Vue.component("zx-magnifie",c)}}]);